eval-quality 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +142 -67
- package/corpus/dev/README.md +20 -13
- package/corpus/dev/compile-seal-example/brief.json +1 -1
- package/corpus/dev/compile-seal-example/contract.json +1 -1
- package/corpus/dev/contracts/absent-collection-locations.json +1 -1
- package/corpus/dev/contracts/absent-sibling-groups.json +1 -1
- package/corpus/dev/contracts/absent-success-indicator.json +1 -1
- package/corpus/dev/contracts/empty-channel-roles.json +1 -1
- package/corpus/dev/contracts/empty-collection-locations.json +1 -1
- package/corpus/dev/contracts/empty-request-shapes.json +1 -1
- package/corpus/dev/contracts/empty-sibling-groups.json +1 -1
- package/corpus/dev/contracts/fragment-selection.json +1 -0
- package/corpus/dev/contracts/no-collection-quantifier.json +1 -1
- package/corpus/dev/contracts/no-operation-inventory.json +1 -1
- package/corpus/dev/contracts/no-read-back-relation.json +1 -1
- package/corpus/dev/contracts/no-state-change-marker.json +1 -1
- package/corpus/dev/contracts/no-type-violating-step.json +1 -1
- package/corpus/dev/contracts/per-key-split-oracles.json +1 -1
- package/corpus/dev/contracts/review-corpus.json +1 -0
- package/corpus/dev/contracts/satisfied-declarations.json +1 -1
- package/corpus/dev/contracts/single-required-response-key.json +1 -1
- package/corpus/dev/contracts/split-indicator-oracle.json +1 -1
- package/corpus/dev/contracts/unaddressed-parameter-sibling.json +1 -1
- package/corpus/dev/contracts/unnamed-reference-set.json +1 -1
- package/corpus/dev/contracts/wrong-cardinality-form.json +1 -1
- package/corpus/dev/index.json +1 -1
- package/dist/application/index.d.ts +2 -0
- package/dist/application/index.js +1 -0
- package/dist/application/score.d.ts +48 -0
- package/dist/application/score.js +186 -0
- package/dist/cli/arguments.d.ts +7 -3
- package/dist/cli/arguments.js +73 -5
- package/dist/cli/exit-codes.d.ts +6 -2
- package/dist/cli/exit-codes.js +8 -9
- package/dist/cli/main.js +9 -0
- package/dist/cli/render.d.ts +3 -6
- package/dist/cli/render.js +57 -5
- package/dist/cli/run.d.ts +13 -3
- package/dist/cli/run.js +136 -16
- package/dist/core/canonical/canonicalize.d.ts +12 -0
- package/dist/core/canonical/canonicalize.js +18 -4
- package/dist/core/compile/bindings.d.ts +89 -0
- package/dist/core/compile/bindings.js +334 -0
- package/dist/core/compile/compile.d.ts +17 -0
- package/dist/core/compile/compile.js +37 -1
- package/dist/core/compile/excluded-content.d.ts +11 -0
- package/dist/core/compile/excluded-content.js +42 -0
- package/dist/core/compile/expression-legality.d.ts +49 -0
- package/dist/core/compile/expression-legality.js +158 -38
- package/dist/core/compile/forbidden-inputs.d.ts +8 -1
- package/dist/core/compile/forbidden-inputs.js +16 -3
- package/dist/core/compile/interface-inventory.d.ts +57 -2
- package/dist/core/compile/interface-inventory.js +119 -13
- package/dist/core/compile/reachability.d.ts +28 -1
- package/dist/core/compile/reachability.js +167 -35
- package/dist/core/compile/schema-version.d.ts +2 -0
- package/dist/core/compile/schema-version.js +25 -0
- package/dist/core/compile/sensitivity-witness.d.ts +31 -12
- package/dist/core/compile/sensitivity-witness.js +110 -23
- package/dist/core/compile/step-reference.d.ts +2 -0
- package/dist/core/compile/step-reference.js +49 -0
- package/dist/core/coverage/operations.d.ts +62 -0
- package/dist/core/coverage/operations.js +57 -0
- package/dist/core/coverage/relevance.d.ts +4 -2
- package/dist/core/coverage/relevance.js +22 -23
- package/dist/core/coverage/satisfaction.d.ts +2 -2
- package/dist/core/coverage/satisfaction.js +73 -48
- package/dist/core/declared-inputs.d.ts +83 -4
- package/dist/core/declared-inputs.js +105 -8
- package/dist/core/emit/emit.d.ts +9 -0
- package/dist/core/emit/emit.js +214 -0
- package/dist/core/emit/private-artifact-digest.d.ts +11 -0
- package/dist/core/emit/private-artifact-digest.js +31 -0
- package/dist/core/evaluate/evidence-resolution.d.ts +10 -3
- package/dist/core/evaluate/evidence-resolution.js +74 -11
- package/dist/core/evaluate/operators.d.ts +22 -0
- package/dist/core/evaluate/operators.js +17 -1
- package/dist/core/evaluate/resolution.d.ts +14 -3
- package/dist/core/evaluate/resolution.js +63 -3
- package/dist/core/excluded-content.d.ts +65 -0
- package/dist/core/excluded-content.js +113 -0
- package/dist/core/failure-codes.d.ts +2 -2
- package/dist/core/failure-codes.js +7 -2
- package/dist/core/ingest/conditions.d.ts +201 -0
- package/dist/core/ingest/conditions.js +48 -0
- package/dist/core/ingest/index.d.ts +13 -0
- package/dist/core/ingest/index.js +11 -0
- package/dist/core/ingest/ingest.d.ts +68 -0
- package/dist/core/ingest/ingest.js +318 -0
- package/dist/core/lineage/stage-table.d.ts +21 -4
- package/dist/core/lineage/stage-table.js +35 -3
- package/dist/core/preflight/plan.d.ts +7 -5
- package/dist/core/preflight/plan.js +75 -32
- package/dist/core/preflight/projection.d.ts +6 -3
- package/dist/core/preflight/projection.js +22 -2
- package/dist/core/preflight/reduce.js +47 -7
- package/dist/core/preflight/witness-evidence.d.ts +5 -5
- package/dist/core/preflight/witness-evidence.js +73 -20
- package/dist/core/schemas/artifact.d.ts +1049 -30
- package/dist/core/schemas/constraint-ledger.js +51 -0
- package/dist/core/schemas/defect-signature.d.ts +695 -0
- package/dist/core/schemas/defect-signature.js +175 -0
- package/dist/core/schemas/eval-contract.d.ts +550 -12
- package/dist/core/schemas/eval-contract.js +32 -2
- package/dist/core/schemas/evidence-artifact.d.ts +109 -19
- package/dist/core/schemas/evidence-artifact.js +64 -8
- package/dist/core/schemas/interface.d.ts +741 -13
- package/dist/core/schemas/interface.js +120 -7
- package/dist/core/schemas/isolation-manifest.js +16 -9
- package/dist/core/schemas/plan.d.ts +329 -3
- package/dist/core/schemas/plan.js +89 -3
- package/dist/core/schemas/pointer.d.ts +47 -1
- package/dist/core/schemas/pointer.js +89 -8
- package/dist/core/schemas/port-messages.d.ts +194 -10
- package/dist/core/schemas/port-messages.js +73 -6
- package/dist/core/schemas/probe-body.d.ts +18 -0
- package/dist/core/schemas/probe-body.js +13 -0
- package/dist/core/schemas/probe-qualification.d.ts +168 -0
- package/dist/core/schemas/probe-qualification.js +106 -0
- package/dist/core/schemas/probe.d.ts +431 -0
- package/dist/core/schemas/probe.js +6 -2
- package/dist/core/schemas/scoring-policy.d.ts +1 -0
- package/dist/core/schemas/scoring-policy.js +6 -1
- package/dist/core/schemas/sealed-evaluator-brief.d.ts +1 -0
- package/dist/core/schemas/sealed-evaluator-brief.js +4 -1
- package/dist/core/schemas/sealed-run-record.d.ts +161 -12
- package/dist/core/schemas/sealed-run-record.js +92 -15
- package/dist/core/schemas/sensitivity-witness.d.ts +108 -6
- package/dist/core/schemas/sensitivity-witness.js +61 -5
- package/dist/core/score/binding-order.d.ts +31 -0
- package/dist/core/score/binding-order.js +88 -0
- package/dist/core/score/bindings.d.ts +93 -0
- package/dist/core/score/bindings.js +309 -0
- package/dist/core/score/ladder-table.d.ts +23 -0
- package/dist/core/score/ladder-table.js +109 -0
- package/dist/core/score/ladder.d.ts +229 -0
- package/dist/core/score/ladder.js +464 -0
- package/dist/core/score/mode-agreement.d.ts +30 -0
- package/dist/core/score/mode-agreement.js +16 -0
- package/dist/core/score/outcome-table.d.ts +17 -0
- package/dist/core/score/outcome-table.js +172 -0
- package/dist/core/score/outcome.d.ts +466 -0
- package/dist/core/score/outcome.js +562 -0
- package/dist/core/score/qualification.d.ts +83 -0
- package/dist/core/score/qualification.js +645 -0
- package/dist/core/score/quotation.d.ts +56 -0
- package/dist/core/score/quotation.js +226 -0
- package/dist/core/score/reduce-trials.d.ts +80 -0
- package/dist/core/score/reduce-trials.js +90 -0
- package/dist/core/score/score.d.ts +72 -0
- package/dist/core/score/score.js +607 -0
- package/dist/core/score/selection.d.ts +80 -0
- package/dist/core/score/selection.js +98 -0
- package/dist/core/score/strength.d.ts +58 -0
- package/dist/core/score/strength.js +227 -0
- package/dist/core/score/witness.d.ts +138 -0
- package/dist/core/score/witness.js +320 -0
- package/dist/core/seal/derived-reference.d.ts +2 -9
- package/dist/core/seal/derived-reference.js +293 -46
- package/dist/core/seal/plan-index.d.ts +18 -3
- package/dist/core/seal/plan-index.js +44 -8
- package/dist/core/seal/seal.js +8 -3
- package/dist/core/stage-contracts.d.ts +62 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/ports/environment-probe-port.d.ts +60 -4
- package/dist/testing/index.d.ts +2 -0
- package/dist/testing/index.js +1 -0
- package/dist/testing/probe-conformance.d.ts +29 -0
- package/dist/testing/probe-conformance.js +34 -5
- package/package.json +12 -3
- package/schemas/eval-contract.schema.json +1787 -797
- package/schemas/evidence-artifact.schema.json +126 -9
- package/schemas/isolation-manifest.schema.json +17 -10
- package/schemas/probe.schema.json +636 -5
- package/schemas/rubric.schema.json +1 -1
- package/schemas/scoring-policy.schema.json +8 -1
- package/schemas/sealed-evaluator-brief.schema.json +11 -1
- package/schemas/sealed-run-record.schema.json +314 -40
|
@@ -85,7 +85,8 @@ export const PathTemplate = z
|
|
|
85
85
|
.string()
|
|
86
86
|
.regex(PATH_TEMPLATE_PATTERN)
|
|
87
87
|
.describe('A path template whose parameters are spelled `{name}` in braces. The `:name` spelling is rejected: AD-40 resolves a defect signature by comparing method and path template, and that comparison is not implementable against an unstated syntax.');
|
|
88
|
-
export const Operation = z
|
|
88
|
+
export const Operation = z
|
|
89
|
+
.strictObject({
|
|
89
90
|
operationId: Identifier,
|
|
90
91
|
method: HttpMethod,
|
|
91
92
|
pathTemplate: PathTemplate,
|
|
@@ -96,6 +97,91 @@ export const Operation = z.strictObject({
|
|
|
96
97
|
responseDescriptor: ResponseDescriptor,
|
|
97
98
|
volatilePointers: z.array(DescriptorPointer),
|
|
98
99
|
sensitivityWitness: SensitivityWitness.nullable().describe('AD-10, mandatory per declared operation rather than per interface. `null` is legal only for an operation declaring no keys in any request channel; AD-10 exempts that operation and requires the exemption to be recorded, which pre-flight does as an `exempt` check. An input-bearing operation declaring `null` fails a strict compilation under `undeclared-mandatory-input`, alongside the other declaration-completeness check that code already gates.'),
|
|
100
|
+
})
|
|
101
|
+
.meta({
|
|
102
|
+
id: 'Operation',
|
|
103
|
+
description: "AD-19's per-operation declaration inventory for an interface that speaks HTTP. Carried by the `api`, `web`, and `mcp` branches alike, so the export names it once instead of inlining three copies that could drift apart.",
|
|
104
|
+
});
|
|
105
|
+
/**
|
|
106
|
+
* AD-35 applied to a command: the operation names a logical executable and the
|
|
107
|
+
* caller maps it to something runnable outside the contract. `Identifier`'s
|
|
108
|
+
* charset admits no slash, dot, or colon, so `/usr/local/bin/tool`, `./tool`,
|
|
109
|
+
* and `http://host/tool` are parse errors rather than compile findings. That is
|
|
110
|
+
* what makes AD-35 structural here instead of advisory.
|
|
111
|
+
*
|
|
112
|
+
* The subcommand path is a list of segments rather than one string for the
|
|
113
|
+
* reason `PathTemplate` spells parameters in braces and nothing else: AD-40
|
|
114
|
+
* compares identities as segments, and a single string would force two
|
|
115
|
+
* implementations to agree on a separator no field declares.
|
|
116
|
+
*/
|
|
117
|
+
export const CommandInvocation = z.strictObject({
|
|
118
|
+
executable: Identifier.describe('A logical executable name, never a filesystem path, a URL, a host, or a port (AD-35). The caller maps it to an authorized target through configuration outside the contract.'),
|
|
119
|
+
subcommandPath: z
|
|
120
|
+
.array(Identifier)
|
|
121
|
+
.describe('The subcommand segments after the executable, outermost first. Empty is legal and means the executable is invoked with no subcommand.'),
|
|
122
|
+
});
|
|
123
|
+
/**
|
|
124
|
+
* The command counterpart of `RequestShape`, built as a four-key strict object
|
|
125
|
+
* for the reason the comment above `RequestShape` gives: a record over a
|
|
126
|
+
* channel enum demands every member at parse time, and the partial spelling
|
|
127
|
+
* that would relax it is the one the Consistency Conventions ban.
|
|
128
|
+
*/
|
|
129
|
+
export const CommandRequestShape = z.strictObject({
|
|
130
|
+
argument: KeyedShapeDescriptor.describe("Positional arguments, keyed by the name the contract gives each position. The key is the author's own label; position is not encoded here, because no AD-31 predicate reads argument order."),
|
|
131
|
+
option: KeyedShapeDescriptor,
|
|
132
|
+
environment: KeyedShapeDescriptor.describe('AD-18: an environment channel declaration names a variable and its type and never carries a credential value. The same rule the header channel carries, for the channel that plays the same role off an HTTP interface.'),
|
|
133
|
+
stdin: KeyedShapeDescriptor,
|
|
134
|
+
});
|
|
135
|
+
/**
|
|
136
|
+
* Which output channel the operation's one response descriptor describes.
|
|
137
|
+
*
|
|
138
|
+
* Tagged on `kind` rather than spelled as a bare channel name because `stdout`
|
|
139
|
+
* is itself a legal `Identifier`: an untagged root could not tell the stream
|
|
140
|
+
* from an artifact genuinely named `stdout`, which is exactly the ambiguity the
|
|
141
|
+
* two members below would otherwise share.
|
|
142
|
+
*/
|
|
143
|
+
export const CommandDescriptorChannel = z.discriminatedUnion('kind', [
|
|
144
|
+
z.strictObject({
|
|
145
|
+
kind: z.literal('stream'),
|
|
146
|
+
channel: z.enum(['stdout', 'stderr']),
|
|
147
|
+
}),
|
|
148
|
+
z.strictObject({
|
|
149
|
+
kind: z.literal('artifact'),
|
|
150
|
+
artifactId: Identifier.describe('One of the identifiers this operation declares in `artifacts`. A name absent from that list fails compilation under `unresolved-artifact-reference` rather than resolving absent, because a dangling declaration is an authoring fault the compiler can see.'),
|
|
151
|
+
}),
|
|
152
|
+
]);
|
|
153
|
+
/**
|
|
154
|
+
* A command-kind operation. It carries exactly one `ResponseDescriptor`, the
|
|
155
|
+
* same shape an api operation carries, and `descriptorChannel` says which
|
|
156
|
+
* output channel that descriptor describes.
|
|
157
|
+
*
|
|
158
|
+
* One descriptor rather than one per output channel: AD-19 fixes the descriptor
|
|
159
|
+
* per operation so that `requiredKeys` has a truthful value, and AD-20 rule 2
|
|
160
|
+
* reads "the required keys of the response descriptor belonging to the
|
|
161
|
+
* operation that step invokes" as its denominator. Several descriptors leave
|
|
162
|
+
* that phrase with several referents, which is the defect AD-19 already records
|
|
163
|
+
* one level up for an interface-wide union. An operation whose stream and whose
|
|
164
|
+
* written file both need declared structure is two operations.
|
|
165
|
+
*
|
|
166
|
+
* There is no declared success value space for the exit code. AD-19 already
|
|
167
|
+
* declares one nominated success indicator per operation, and an exit-code
|
|
168
|
+
* assertion is an ordinary oracle over `/interactions/{stepId}/exit-code`,
|
|
169
|
+
* which the pointer grammar carries as a scalar channel.
|
|
170
|
+
*/
|
|
171
|
+
export const CommandOperation = z.strictObject({
|
|
172
|
+
operationId: Identifier,
|
|
173
|
+
invocation: CommandInvocation,
|
|
174
|
+
stateChangeMarker: z
|
|
175
|
+
.boolean()
|
|
176
|
+
.describe('AD-19: whether the operation is intended to change state. AD-20 rule 7 relevance reads it, and AD-10 selects the sensitivity channel by it. Both values are legal and neither is a default.'),
|
|
177
|
+
requestShape: CommandRequestShape,
|
|
178
|
+
artifacts: z
|
|
179
|
+
.array(Identifier)
|
|
180
|
+
.describe("The files the operation writes, as bare declared identifiers with existence semantics only. No descriptor and no keys of their own: an artifact pointer's identifier segment resolves against this list, and structure comes from the operation's one response descriptor when `descriptorChannel` nominates that artifact. A pointer naming an identifier absent here fails compilation under `unresolved-artifact-reference`."),
|
|
181
|
+
descriptorChannel: CommandDescriptorChannel,
|
|
182
|
+
responseDescriptor: ResponseDescriptor,
|
|
183
|
+
volatilePointers: z.array(DescriptorPointer),
|
|
184
|
+
sensitivityWitness: SensitivityWitness.nullable().describe("AD-10, mandatory per declared operation rather than per interface, on the api operation's own terms. `null` is legal only for an operation declaring no keys in any request channel, which for a command means no argument, no option, no environment variable, and no standard input. An input-bearing operation declaring `null` fails a strict compilation under `undeclared-mandatory-input`."),
|
|
99
185
|
});
|
|
100
186
|
/**
|
|
101
187
|
* AD-19's four interface kinds, exported once so nothing else respells them:
|
|
@@ -106,10 +192,37 @@ export const Operation = z.strictObject({
|
|
|
106
192
|
*/
|
|
107
193
|
export const INTERFACE_KINDS = ['api', 'web', 'cli', 'mcp'];
|
|
108
194
|
export const InterfaceKind = z.enum(INTERFACE_KINDS);
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
195
|
+
const LOGICAL_ID_DESCRIPTION = "AD-35: a logical identifier for the interface, never a URL, host, or port. Mapping it to a target is the caller's, outside the contract.";
|
|
196
|
+
const OPERATIONS_DESCRIPTION = 'No uniqueness constraint: two operations colliding on their transport identity after parameter-name erasure is `duplicate-operation-signature`, a coded compile-time error, and a schema that deduped them would delete it.';
|
|
197
|
+
// `web` and `mcp` carry the api operation shape unchanged. A two-member union
|
|
198
|
+
// would make either one a parse failure, and a parse failure carries no AD-5
|
|
199
|
+
// code, no artifact path, and no name for the kind that is unsupported, which
|
|
200
|
+
// is the opposite of AD-10's "fails compilation honestly under
|
|
201
|
+
// `unsupported-interface-kind`".
|
|
202
|
+
const apiShapedInterface = (kind) => z.strictObject({
|
|
203
|
+
logicalId: Identifier.describe(LOGICAL_ID_DESCRIPTION),
|
|
204
|
+
kind: z.literal(kind),
|
|
205
|
+
operations: z.array(Operation).describe(OPERATIONS_DESCRIPTION),
|
|
115
206
|
});
|
|
207
|
+
/**
|
|
208
|
+
* Discriminated on `kind`, so an operation shape cannot be smuggled onto the
|
|
209
|
+
* wrong interface: a `cli` interface declaring `method` and an `api` interface
|
|
210
|
+
* declaring `invocation` are both parse errors.
|
|
211
|
+
*/
|
|
212
|
+
export const PermittedInterface = z.discriminatedUnion('kind', [
|
|
213
|
+
apiShapedInterface('api'),
|
|
214
|
+
apiShapedInterface('web'),
|
|
215
|
+
apiShapedInterface('mcp'),
|
|
216
|
+
z.strictObject({
|
|
217
|
+
logicalId: Identifier.describe(LOGICAL_ID_DESCRIPTION),
|
|
218
|
+
kind: z.literal('cli'),
|
|
219
|
+
operations: z.array(CommandOperation).describe(OPERATIONS_DESCRIPTION),
|
|
220
|
+
}),
|
|
221
|
+
]);
|
|
222
|
+
/**
|
|
223
|
+
* One interface's operations widened to the element union. TypeScript will not
|
|
224
|
+
* iterate `iface.operations` directly, because the union's branches give it a
|
|
225
|
+
* union of array types whose `map` signatures do not unify; this is the one
|
|
226
|
+
* place that widening is spelled, so no call site invents its own.
|
|
227
|
+
*/
|
|
228
|
+
export const operationsOf = (iface) => iface.operations;
|
|
@@ -56,11 +56,17 @@ const accountingShape = Object.fromEntries(FORBIDDEN_INPUT_FLOOR.map((member) =>
|
|
|
56
56
|
* reasoning behind `RequestShape`'s four-key object.
|
|
57
57
|
*/
|
|
58
58
|
export const ForbiddenInputAccountingMap = z.strictObject(accountingShape);
|
|
59
|
+
/**
|
|
60
|
+
* A label a reader has to be able to act on. Empty is not a mount, a network
|
|
61
|
+
* target, or a tool call, and an empty entry renders as a basis line with
|
|
62
|
+
* nothing after its colon.
|
|
63
|
+
*/
|
|
64
|
+
const NonEmptyLabel = z.string().min(1);
|
|
59
65
|
export const IsolationManifest = z
|
|
60
66
|
.strictObject({
|
|
61
67
|
...lineageFields,
|
|
62
68
|
runId: z.string().min(1),
|
|
63
|
-
contractId: Identifier.describe('The prior art\'s `taskId`, renamed. "Task" is experiment vocabulary with no product meaning, and the manifest keeps an identifier
|
|
69
|
+
contractId: Identifier.describe('The prior art\'s `taskId`, renamed. "Task" is experiment vocabulary with no product meaning, and the manifest keeps an identifier so a reader can say which contract the run was isolated for. It is a label and not a second operand for any check: `core/ingest` matches this artifact to a run on `runId`, `contractDigest`, and `evaluatorConfigurationDigest`, which is the whole of the agreement the two artifacts make. Nothing in the pipeline carries a contract identifier to compare this against, since the sealed run record pins its contract by digest and the eval contract is not among ingest\'s inputs.'),
|
|
64
70
|
conditionArm: z
|
|
65
71
|
.string()
|
|
66
72
|
.min(1)
|
|
@@ -70,21 +76,22 @@ export const IsolationManifest = z
|
|
|
70
76
|
contractDigest: Digest,
|
|
71
77
|
evaluatorConfigurationDigest: Digest.describe('Added here and absent from the prior art. AD-32 requires this digest to agree between the manifest and the run record, which was previously an agreement rule asserted over two fields that did not exist. Required and non-nullable on both, which is what makes the substitution cost two contradictions rather than one omission. The agreement itself is a cross-artifact rule no schema can see.'),
|
|
72
78
|
workspaceIdentity: z.string().min(1),
|
|
73
|
-
allowedMounts: z.array(
|
|
79
|
+
allowedMounts: z.array(NonEmptyLabel),
|
|
74
80
|
observedMounts: z
|
|
75
|
-
.array(
|
|
76
|
-
.describe('Observed mounts, network targets, and tool calls exceeding their allowlist is a violation AD-16 has `core/ingest` record; it is a cross-field rule with no AD-5 code and the schema admits it.'),
|
|
77
|
-
networkAllowlist: z.array(
|
|
78
|
-
observedNetworkTargets: z.array(
|
|
79
|
-
toolAllowlist: z.array(
|
|
80
|
-
observedToolCalls: z.array(
|
|
81
|
+
.array(NonEmptyLabel)
|
|
82
|
+
.describe('Observed mounts, network targets, and tool calls exceeding their allowlist is a violation AD-16 has `core/ingest` record; it is a cross-field rule with no AD-5 code and the schema admits it. Each entry is non-empty: an empty string is not a mount, and it renders as a basis line naming nothing after its colon.'),
|
|
83
|
+
networkAllowlist: z.array(NonEmptyLabel),
|
|
84
|
+
observedNetworkTargets: z.array(NonEmptyLabel),
|
|
85
|
+
toolAllowlist: z.array(NonEmptyLabel),
|
|
86
|
+
observedToolCalls: z.array(NonEmptyLabel),
|
|
81
87
|
resourceCeilings: ResourceCeilings,
|
|
82
88
|
actualResourceUse: ActualResourceUse,
|
|
83
89
|
forbiddenInputAccounting: ForbiddenInputAccountingMap.describe('The field AD-16 adds and the prior art lacks: "the isolation manifest\'s required fields … account for each forbidden input by name". Seven keys, generated from `FORBIDDEN_INPUT_FLOOR` so the floor has one home.'),
|
|
84
90
|
violation: z
|
|
85
91
|
.string()
|
|
92
|
+
.min(1)
|
|
86
93
|
.nullable()
|
|
87
|
-
.describe("The sixteenth of the prior art's sixteen required members, and the one that is not a description of the run: a non-null violation invalidates it. AD-16 says the schema is \"seeded from the prior art's fifteen\"; the prior art's `required` array has sixteen. Settled by construction: the fifteen are the fields describing the run and this is the invalidation outcome. All sixteen are carried."),
|
|
94
|
+
.describe("The sixteenth of the prior art's sixteen required members, and the one that is not a description of the run: a non-null violation invalidates it. Non-empty when present, on `QuotedEvidence.quote`'s precedent: `null` is the spelling for no violation, so an empty string is a violation that names nothing while still invalidating the run and rendering a blank basis entry. AD-16 says the schema is \"seeded from the prior art's fifteen\"; the prior art's `required` array has sixteen. Settled by construction: the fifteen are the fields describing the run and this is the invalidation outcome. All sixteen are carried."),
|
|
88
95
|
})
|
|
89
96
|
.meta({
|
|
90
97
|
id: 'IsolationManifest',
|
|
@@ -7,7 +7,52 @@ import { JsonValue } from './primitives.ts';
|
|
|
7
7
|
* one implementation and the literal string to another, and flipped a witness
|
|
8
8
|
* match between `caught` and `missed` on one record; that form is
|
|
9
9
|
* unrepresentable here.
|
|
10
|
+
*
|
|
11
|
+
* Four members, one tag each. `{ literal }` writes the sent value down;
|
|
12
|
+
* `{ matcher: 'any' }` binds whatever was sent and `{ matcher: 'type-violating' }`
|
|
13
|
+
* binds a value whose JSON type differs from the operation's declared type for
|
|
14
|
+
* the key, which is how AD-31 rule 3's malformed-input behaviour is addressed.
|
|
15
|
+
*
|
|
16
|
+
* `{ captured }` addresses an earlier step's declared scalar output. Owed item
|
|
17
|
+
* 3: a `POST` returning a server-generated identifier followed by a `GET`
|
|
18
|
+
* proving persistence is unwritable with the first two, since a literal
|
|
19
|
+
* hard-codes a resource the evaluator never created and `any` matches
|
|
20
|
+
* unrelated reads. "Earlier" is earlier in the capture graph's own topological
|
|
21
|
+
* order, which `binding-cycle` makes exist. It is deliberately not AD-39's
|
|
22
|
+
* `after` clause: `nested-temporal-clause` already rejects every `after` cycle,
|
|
23
|
+
* so a capture forced to follow an `after` edge would leave `binding-cycle`
|
|
24
|
+
* unfireable. At score time the ordering is the record's `sequence`.
|
|
25
|
+
*
|
|
26
|
+
* `{ principal }` names a principal `testData.principals` declares. The two
|
|
27
|
+
* critical-severity cross-user behaviours (act as A, read as B, must be denied
|
|
28
|
+
* or absent) bind a step to an account that is neither a literal, since AD-19
|
|
29
|
+
* forbids credential values in declarations, nor an earlier step's output,
|
|
30
|
+
* since accounts are provisioned outside the observation stream. The name is
|
|
31
|
+
* an opaque label carrying no account identifier, credential, or subject data
|
|
32
|
+
* (AD-18). An undeclared name fires `undeclared-mandatory-input` in strict
|
|
33
|
+
* mode; a Zod refinement here would be a cross-subtree constraint the export
|
|
34
|
+
* cannot carry, and the published-schema differential sweep synthesises a
|
|
35
|
+
* union-branch witness that would expose the disagreement.
|
|
36
|
+
*
|
|
37
|
+
* A captured pointer resolves to a declared scalar with no transform applied,
|
|
38
|
+
* which keeps AD-4's ban on arithmetic, projection, and user-defined functions
|
|
39
|
+
* holding by construction: the grammar has no place to write one.
|
|
10
40
|
*/
|
|
41
|
+
/**
|
|
42
|
+
* The first two members, named individually so the probe-side selector under
|
|
43
|
+
* AD-40 admits exactly these two and nothing else. Bare `export const` with no
|
|
44
|
+
* `.meta({ id })`: an id would collapse the branches to `$ref`s and mint new
|
|
45
|
+
* `$defs`, so the export stays byte-identical.
|
|
46
|
+
*/
|
|
47
|
+
export declare const LiteralBindingValue: z.ZodObject<{
|
|
48
|
+
literal: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
49
|
+
}, z.core.$strict>;
|
|
50
|
+
export declare const MatcherBindingValue: z.ZodObject<{
|
|
51
|
+
matcher: z.ZodEnum<{
|
|
52
|
+
any: "any";
|
|
53
|
+
"type-violating": "type-violating";
|
|
54
|
+
}>;
|
|
55
|
+
}, z.core.$strict>;
|
|
11
56
|
export declare const BindingValue: z.ZodUnion<readonly [z.ZodObject<{
|
|
12
57
|
literal: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
13
58
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -15,6 +60,10 @@ export declare const BindingValue: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
15
60
|
any: "any";
|
|
16
61
|
"type-violating": "type-violating";
|
|
17
62
|
}>;
|
|
63
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
64
|
+
captured: z.ZodString;
|
|
65
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
66
|
+
principal: z.ZodString;
|
|
18
67
|
}, z.core.$strict>]>;
|
|
19
68
|
/** the constraint identifier the ledger carries for the check below. */
|
|
20
69
|
export declare const BINDING_CHANNEL_NON_EMPTY = "binding-channel-non-empty";
|
|
@@ -25,6 +74,10 @@ export declare const BindingChannel: z.ZodNullable<z.ZodRecord<z.ZodString, z.Zo
|
|
|
25
74
|
any: "any";
|
|
26
75
|
"type-violating": "type-violating";
|
|
27
76
|
}>;
|
|
77
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
78
|
+
captured: z.ZodString;
|
|
79
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
80
|
+
principal: z.ZodString;
|
|
28
81
|
}, z.core.$strict>]>>>;
|
|
29
82
|
/**
|
|
30
83
|
* A four-key strict object with each channel nullable, not a record over the
|
|
@@ -32,7 +85,7 @@ export declare const BindingChannel: z.ZodNullable<z.ZodRecord<z.ZodString, z.Zo
|
|
|
32
85
|
* requires every member at parse time and fails five of the Gate C fixture's
|
|
33
86
|
* six steps, all of which bind a subset of the channels.
|
|
34
87
|
*/
|
|
35
|
-
export declare const
|
|
88
|
+
export declare const ApiInputBinding: z.ZodObject<{
|
|
36
89
|
path: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
37
90
|
literal: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
38
91
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -40,6 +93,10 @@ export declare const InputBinding: z.ZodObject<{
|
|
|
40
93
|
any: "any";
|
|
41
94
|
"type-violating": "type-violating";
|
|
42
95
|
}>;
|
|
96
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
97
|
+
captured: z.ZodString;
|
|
98
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
99
|
+
principal: z.ZodString;
|
|
43
100
|
}, z.core.$strict>]>>>;
|
|
44
101
|
query: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
45
102
|
literal: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
@@ -48,6 +105,10 @@ export declare const InputBinding: z.ZodObject<{
|
|
|
48
105
|
any: "any";
|
|
49
106
|
"type-violating": "type-violating";
|
|
50
107
|
}>;
|
|
108
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
109
|
+
captured: z.ZodString;
|
|
110
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
111
|
+
principal: z.ZodString;
|
|
51
112
|
}, z.core.$strict>]>>>;
|
|
52
113
|
header: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
53
114
|
literal: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
@@ -56,6 +117,10 @@ export declare const InputBinding: z.ZodObject<{
|
|
|
56
117
|
any: "any";
|
|
57
118
|
"type-violating": "type-violating";
|
|
58
119
|
}>;
|
|
120
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
121
|
+
captured: z.ZodString;
|
|
122
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
123
|
+
principal: z.ZodString;
|
|
59
124
|
}, z.core.$strict>]>>>;
|
|
60
125
|
body: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
61
126
|
literal: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
@@ -64,8 +129,199 @@ export declare const InputBinding: z.ZodObject<{
|
|
|
64
129
|
any: "any";
|
|
65
130
|
"type-violating": "type-violating";
|
|
66
131
|
}>;
|
|
132
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
133
|
+
captured: z.ZodString;
|
|
134
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
135
|
+
principal: z.ZodString;
|
|
136
|
+
}, z.core.$strict>]>>>;
|
|
137
|
+
}, z.core.$strict>;
|
|
138
|
+
/** The same shape over the four channels a command-kind operation accepts. */
|
|
139
|
+
export declare const CommandInputBinding: z.ZodObject<{
|
|
140
|
+
argument: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
141
|
+
literal: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
142
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
143
|
+
matcher: z.ZodEnum<{
|
|
144
|
+
any: "any";
|
|
145
|
+
"type-violating": "type-violating";
|
|
146
|
+
}>;
|
|
147
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
148
|
+
captured: z.ZodString;
|
|
149
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
150
|
+
principal: z.ZodString;
|
|
151
|
+
}, z.core.$strict>]>>>;
|
|
152
|
+
option: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
153
|
+
literal: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
154
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
155
|
+
matcher: z.ZodEnum<{
|
|
156
|
+
any: "any";
|
|
157
|
+
"type-violating": "type-violating";
|
|
158
|
+
}>;
|
|
159
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
160
|
+
captured: z.ZodString;
|
|
161
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
162
|
+
principal: z.ZodString;
|
|
163
|
+
}, z.core.$strict>]>>>;
|
|
164
|
+
environment: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
165
|
+
literal: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
166
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
167
|
+
matcher: z.ZodEnum<{
|
|
168
|
+
any: "any";
|
|
169
|
+
"type-violating": "type-violating";
|
|
170
|
+
}>;
|
|
171
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
172
|
+
captured: z.ZodString;
|
|
173
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
174
|
+
principal: z.ZodString;
|
|
175
|
+
}, z.core.$strict>]>>>;
|
|
176
|
+
stdin: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
177
|
+
literal: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
178
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
179
|
+
matcher: z.ZodEnum<{
|
|
180
|
+
any: "any";
|
|
181
|
+
"type-violating": "type-violating";
|
|
182
|
+
}>;
|
|
183
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
184
|
+
captured: z.ZodString;
|
|
185
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
186
|
+
principal: z.ZodString;
|
|
67
187
|
}, z.core.$strict>]>>>;
|
|
68
188
|
}, z.core.$strict>;
|
|
189
|
+
/**
|
|
190
|
+
* A plain union rather than a discriminated one, and the agreement between a
|
|
191
|
+
* step's bound channels and its operation's kind is a compile-time check
|
|
192
|
+
* rather than a schema refinement.
|
|
193
|
+
*
|
|
194
|
+
* A step names an `operationId` and nothing else; the kind of the interface
|
|
195
|
+
* declaring that operation lives in a different subtree of the same document.
|
|
196
|
+
* That is the cross-subtree constraint the `{ principal }` comment above
|
|
197
|
+
* already records as unrepresentable in the export. Adding a `kind` field to
|
|
198
|
+
* the step itself was the other option and duplicates a fact the operation
|
|
199
|
+
* already carries, which makes a disagreeing step a second inconsistency to
|
|
200
|
+
* check rather than one fewer.
|
|
201
|
+
*/
|
|
202
|
+
export declare const InputBinding: z.ZodUnion<readonly [z.ZodObject<{
|
|
203
|
+
path: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
204
|
+
literal: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
205
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
206
|
+
matcher: z.ZodEnum<{
|
|
207
|
+
any: "any";
|
|
208
|
+
"type-violating": "type-violating";
|
|
209
|
+
}>;
|
|
210
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
211
|
+
captured: z.ZodString;
|
|
212
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
213
|
+
principal: z.ZodString;
|
|
214
|
+
}, z.core.$strict>]>>>;
|
|
215
|
+
query: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
216
|
+
literal: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
217
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
218
|
+
matcher: z.ZodEnum<{
|
|
219
|
+
any: "any";
|
|
220
|
+
"type-violating": "type-violating";
|
|
221
|
+
}>;
|
|
222
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
223
|
+
captured: z.ZodString;
|
|
224
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
225
|
+
principal: z.ZodString;
|
|
226
|
+
}, z.core.$strict>]>>>;
|
|
227
|
+
header: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
228
|
+
literal: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
229
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
230
|
+
matcher: z.ZodEnum<{
|
|
231
|
+
any: "any";
|
|
232
|
+
"type-violating": "type-violating";
|
|
233
|
+
}>;
|
|
234
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
235
|
+
captured: z.ZodString;
|
|
236
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
237
|
+
principal: z.ZodString;
|
|
238
|
+
}, z.core.$strict>]>>>;
|
|
239
|
+
body: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
240
|
+
literal: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
241
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
242
|
+
matcher: z.ZodEnum<{
|
|
243
|
+
any: "any";
|
|
244
|
+
"type-violating": "type-violating";
|
|
245
|
+
}>;
|
|
246
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
247
|
+
captured: z.ZodString;
|
|
248
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
249
|
+
principal: z.ZodString;
|
|
250
|
+
}, z.core.$strict>]>>>;
|
|
251
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
252
|
+
argument: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
253
|
+
literal: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
254
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
255
|
+
matcher: z.ZodEnum<{
|
|
256
|
+
any: "any";
|
|
257
|
+
"type-violating": "type-violating";
|
|
258
|
+
}>;
|
|
259
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
260
|
+
captured: z.ZodString;
|
|
261
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
262
|
+
principal: z.ZodString;
|
|
263
|
+
}, z.core.$strict>]>>>;
|
|
264
|
+
option: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
265
|
+
literal: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
266
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
267
|
+
matcher: z.ZodEnum<{
|
|
268
|
+
any: "any";
|
|
269
|
+
"type-violating": "type-violating";
|
|
270
|
+
}>;
|
|
271
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
272
|
+
captured: z.ZodString;
|
|
273
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
274
|
+
principal: z.ZodString;
|
|
275
|
+
}, z.core.$strict>]>>>;
|
|
276
|
+
environment: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
277
|
+
literal: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
278
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
279
|
+
matcher: z.ZodEnum<{
|
|
280
|
+
any: "any";
|
|
281
|
+
"type-violating": "type-violating";
|
|
282
|
+
}>;
|
|
283
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
284
|
+
captured: z.ZodString;
|
|
285
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
286
|
+
principal: z.ZodString;
|
|
287
|
+
}, z.core.$strict>]>>>;
|
|
288
|
+
stdin: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
289
|
+
literal: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
290
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
291
|
+
matcher: z.ZodEnum<{
|
|
292
|
+
any: "any";
|
|
293
|
+
"type-violating": "type-violating";
|
|
294
|
+
}>;
|
|
295
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
296
|
+
captured: z.ZodString;
|
|
297
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
298
|
+
principal: z.ZodString;
|
|
299
|
+
}, z.core.$strict>]>>>;
|
|
300
|
+
}, z.core.$strict>]>;
|
|
301
|
+
export type InputBinding = z.infer<typeof InputBinding>;
|
|
302
|
+
export type BindingChannel = z.infer<typeof BindingChannel>;
|
|
303
|
+
/**
|
|
304
|
+
* AD-39's declared selector cardinality (owed item 2): what a step means when
|
|
305
|
+
* its selector matches more than one observation was not decided at the
|
|
306
|
+
* architecture layer, so a first-match scorer and a last-match scorer could
|
|
307
|
+
* bind different evidence. The contract now declares the rule per step.
|
|
308
|
+
* `several` under `exactly-one`/`at-most-one` is a named ambiguity condition;
|
|
309
|
+
* a reference function returns it as data. Routing that ambiguity to a
|
|
310
|
+
* verdict rung is later work. `any` is unrelated to
|
|
311
|
+
* `BindingValue`'s `{ matcher: 'any' }` above: same string, different field,
|
|
312
|
+
* no type-level collision. `ExpectedCardinality` (`interface.ts`) is a
|
|
313
|
+
* second, unrelated reuse of the word for AD-20's response-collection
|
|
314
|
+
* cardinality, and its `at-most` mode is a near-miss for `at-most-one` here;
|
|
315
|
+
* different type, different field, no collision, but easy to misread as the
|
|
316
|
+
* same declaration.
|
|
317
|
+
*/
|
|
318
|
+
export declare const SELECTOR_CARDINALITIES: readonly ['exactly-one', 'at-most-one', 'any'];
|
|
319
|
+
export type SelectorCardinalityValue = (typeof SELECTOR_CARDINALITIES)[number];
|
|
320
|
+
export declare const SelectorCardinality: z.ZodEnum<{
|
|
321
|
+
any: "any";
|
|
322
|
+
"at-most-one": "at-most-one";
|
|
323
|
+
"exactly-one": "exactly-one";
|
|
324
|
+
}>;
|
|
69
325
|
/**
|
|
70
326
|
* AD-39: a step is a selector over observations the evaluator produced, never
|
|
71
327
|
* an instruction. Its selection predicate is spelled as its two members, the
|
|
@@ -76,7 +332,7 @@ export declare const InputBinding: z.ZodObject<{
|
|
|
76
332
|
export declare const InteractionStep: z.ZodObject<{
|
|
77
333
|
stepId: z.ZodString;
|
|
78
334
|
operationId: z.ZodString;
|
|
79
|
-
inputBinding: z.ZodObject<{
|
|
335
|
+
inputBinding: z.ZodUnion<readonly [z.ZodObject<{
|
|
80
336
|
path: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
81
337
|
literal: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
82
338
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -84,6 +340,10 @@ export declare const InteractionStep: z.ZodObject<{
|
|
|
84
340
|
any: "any";
|
|
85
341
|
"type-violating": "type-violating";
|
|
86
342
|
}>;
|
|
343
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
344
|
+
captured: z.ZodString;
|
|
345
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
346
|
+
principal: z.ZodString;
|
|
87
347
|
}, z.core.$strict>]>>>;
|
|
88
348
|
query: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
89
349
|
literal: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
@@ -92,6 +352,10 @@ export declare const InteractionStep: z.ZodObject<{
|
|
|
92
352
|
any: "any";
|
|
93
353
|
"type-violating": "type-violating";
|
|
94
354
|
}>;
|
|
355
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
356
|
+
captured: z.ZodString;
|
|
357
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
358
|
+
principal: z.ZodString;
|
|
95
359
|
}, z.core.$strict>]>>>;
|
|
96
360
|
header: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
97
361
|
literal: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
@@ -100,6 +364,10 @@ export declare const InteractionStep: z.ZodObject<{
|
|
|
100
364
|
any: "any";
|
|
101
365
|
"type-violating": "type-violating";
|
|
102
366
|
}>;
|
|
367
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
368
|
+
captured: z.ZodString;
|
|
369
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
370
|
+
principal: z.ZodString;
|
|
103
371
|
}, z.core.$strict>]>>>;
|
|
104
372
|
body: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
105
373
|
literal: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
@@ -108,8 +376,66 @@ export declare const InteractionStep: z.ZodObject<{
|
|
|
108
376
|
any: "any";
|
|
109
377
|
"type-violating": "type-violating";
|
|
110
378
|
}>;
|
|
379
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
380
|
+
captured: z.ZodString;
|
|
381
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
382
|
+
principal: z.ZodString;
|
|
383
|
+
}, z.core.$strict>]>>>;
|
|
384
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
385
|
+
argument: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
386
|
+
literal: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
387
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
388
|
+
matcher: z.ZodEnum<{
|
|
389
|
+
any: "any";
|
|
390
|
+
"type-violating": "type-violating";
|
|
391
|
+
}>;
|
|
392
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
393
|
+
captured: z.ZodString;
|
|
394
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
395
|
+
principal: z.ZodString;
|
|
396
|
+
}, z.core.$strict>]>>>;
|
|
397
|
+
option: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
398
|
+
literal: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
399
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
400
|
+
matcher: z.ZodEnum<{
|
|
401
|
+
any: "any";
|
|
402
|
+
"type-violating": "type-violating";
|
|
403
|
+
}>;
|
|
404
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
405
|
+
captured: z.ZodString;
|
|
406
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
407
|
+
principal: z.ZodString;
|
|
408
|
+
}, z.core.$strict>]>>>;
|
|
409
|
+
environment: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
410
|
+
literal: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
411
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
412
|
+
matcher: z.ZodEnum<{
|
|
413
|
+
any: "any";
|
|
414
|
+
"type-violating": "type-violating";
|
|
415
|
+
}>;
|
|
416
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
417
|
+
captured: z.ZodString;
|
|
418
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
419
|
+
principal: z.ZodString;
|
|
111
420
|
}, z.core.$strict>]>>>;
|
|
112
|
-
|
|
421
|
+
stdin: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
422
|
+
literal: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
423
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
424
|
+
matcher: z.ZodEnum<{
|
|
425
|
+
any: "any";
|
|
426
|
+
"type-violating": "type-violating";
|
|
427
|
+
}>;
|
|
428
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
429
|
+
captured: z.ZodString;
|
|
430
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
431
|
+
principal: z.ZodString;
|
|
432
|
+
}, z.core.$strict>]>>>;
|
|
433
|
+
}, z.core.$strict>]>;
|
|
113
434
|
after: z.ZodNullable<z.ZodString>;
|
|
435
|
+
cardinality: z.ZodEnum<{
|
|
436
|
+
any: "any";
|
|
437
|
+
"at-most-one": "at-most-one";
|
|
438
|
+
"exactly-one": "exactly-one";
|
|
439
|
+
}>;
|
|
114
440
|
}, z.core.$strict>;
|
|
115
441
|
export type InteractionStep = z.infer<typeof InteractionStep>;
|