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.
Files changed (179) hide show
  1. package/README.md +142 -67
  2. package/corpus/dev/README.md +20 -13
  3. package/corpus/dev/compile-seal-example/brief.json +1 -1
  4. package/corpus/dev/compile-seal-example/contract.json +1 -1
  5. package/corpus/dev/contracts/absent-collection-locations.json +1 -1
  6. package/corpus/dev/contracts/absent-sibling-groups.json +1 -1
  7. package/corpus/dev/contracts/absent-success-indicator.json +1 -1
  8. package/corpus/dev/contracts/empty-channel-roles.json +1 -1
  9. package/corpus/dev/contracts/empty-collection-locations.json +1 -1
  10. package/corpus/dev/contracts/empty-request-shapes.json +1 -1
  11. package/corpus/dev/contracts/empty-sibling-groups.json +1 -1
  12. package/corpus/dev/contracts/fragment-selection.json +1 -0
  13. package/corpus/dev/contracts/no-collection-quantifier.json +1 -1
  14. package/corpus/dev/contracts/no-operation-inventory.json +1 -1
  15. package/corpus/dev/contracts/no-read-back-relation.json +1 -1
  16. package/corpus/dev/contracts/no-state-change-marker.json +1 -1
  17. package/corpus/dev/contracts/no-type-violating-step.json +1 -1
  18. package/corpus/dev/contracts/per-key-split-oracles.json +1 -1
  19. package/corpus/dev/contracts/review-corpus.json +1 -0
  20. package/corpus/dev/contracts/satisfied-declarations.json +1 -1
  21. package/corpus/dev/contracts/single-required-response-key.json +1 -1
  22. package/corpus/dev/contracts/split-indicator-oracle.json +1 -1
  23. package/corpus/dev/contracts/unaddressed-parameter-sibling.json +1 -1
  24. package/corpus/dev/contracts/unnamed-reference-set.json +1 -1
  25. package/corpus/dev/contracts/wrong-cardinality-form.json +1 -1
  26. package/corpus/dev/index.json +1 -1
  27. package/dist/application/index.d.ts +2 -0
  28. package/dist/application/index.js +1 -0
  29. package/dist/application/score.d.ts +48 -0
  30. package/dist/application/score.js +186 -0
  31. package/dist/cli/arguments.d.ts +7 -3
  32. package/dist/cli/arguments.js +73 -5
  33. package/dist/cli/exit-codes.d.ts +6 -2
  34. package/dist/cli/exit-codes.js +8 -9
  35. package/dist/cli/main.js +9 -0
  36. package/dist/cli/render.d.ts +3 -6
  37. package/dist/cli/render.js +57 -5
  38. package/dist/cli/run.d.ts +13 -3
  39. package/dist/cli/run.js +136 -16
  40. package/dist/core/canonical/canonicalize.d.ts +12 -0
  41. package/dist/core/canonical/canonicalize.js +18 -4
  42. package/dist/core/compile/bindings.d.ts +89 -0
  43. package/dist/core/compile/bindings.js +334 -0
  44. package/dist/core/compile/compile.d.ts +17 -0
  45. package/dist/core/compile/compile.js +37 -1
  46. package/dist/core/compile/excluded-content.d.ts +11 -0
  47. package/dist/core/compile/excluded-content.js +42 -0
  48. package/dist/core/compile/expression-legality.d.ts +49 -0
  49. package/dist/core/compile/expression-legality.js +158 -38
  50. package/dist/core/compile/forbidden-inputs.d.ts +8 -1
  51. package/dist/core/compile/forbidden-inputs.js +16 -3
  52. package/dist/core/compile/interface-inventory.d.ts +57 -2
  53. package/dist/core/compile/interface-inventory.js +119 -13
  54. package/dist/core/compile/reachability.d.ts +28 -1
  55. package/dist/core/compile/reachability.js +167 -35
  56. package/dist/core/compile/schema-version.d.ts +2 -0
  57. package/dist/core/compile/schema-version.js +25 -0
  58. package/dist/core/compile/sensitivity-witness.d.ts +31 -12
  59. package/dist/core/compile/sensitivity-witness.js +110 -23
  60. package/dist/core/compile/step-reference.d.ts +2 -0
  61. package/dist/core/compile/step-reference.js +49 -0
  62. package/dist/core/coverage/operations.d.ts +62 -0
  63. package/dist/core/coverage/operations.js +57 -0
  64. package/dist/core/coverage/relevance.d.ts +4 -2
  65. package/dist/core/coverage/relevance.js +22 -23
  66. package/dist/core/coverage/satisfaction.d.ts +2 -2
  67. package/dist/core/coverage/satisfaction.js +73 -48
  68. package/dist/core/declared-inputs.d.ts +83 -4
  69. package/dist/core/declared-inputs.js +105 -8
  70. package/dist/core/emit/emit.d.ts +9 -0
  71. package/dist/core/emit/emit.js +214 -0
  72. package/dist/core/emit/private-artifact-digest.d.ts +11 -0
  73. package/dist/core/emit/private-artifact-digest.js +31 -0
  74. package/dist/core/evaluate/evidence-resolution.d.ts +10 -3
  75. package/dist/core/evaluate/evidence-resolution.js +74 -11
  76. package/dist/core/evaluate/operators.d.ts +22 -0
  77. package/dist/core/evaluate/operators.js +17 -1
  78. package/dist/core/evaluate/resolution.d.ts +14 -3
  79. package/dist/core/evaluate/resolution.js +63 -3
  80. package/dist/core/excluded-content.d.ts +65 -0
  81. package/dist/core/excluded-content.js +113 -0
  82. package/dist/core/failure-codes.d.ts +2 -2
  83. package/dist/core/failure-codes.js +7 -2
  84. package/dist/core/ingest/conditions.d.ts +201 -0
  85. package/dist/core/ingest/conditions.js +48 -0
  86. package/dist/core/ingest/index.d.ts +13 -0
  87. package/dist/core/ingest/index.js +11 -0
  88. package/dist/core/ingest/ingest.d.ts +68 -0
  89. package/dist/core/ingest/ingest.js +318 -0
  90. package/dist/core/lineage/stage-table.d.ts +21 -4
  91. package/dist/core/lineage/stage-table.js +35 -3
  92. package/dist/core/preflight/plan.d.ts +7 -5
  93. package/dist/core/preflight/plan.js +75 -32
  94. package/dist/core/preflight/projection.d.ts +6 -3
  95. package/dist/core/preflight/projection.js +22 -2
  96. package/dist/core/preflight/reduce.js +47 -7
  97. package/dist/core/preflight/witness-evidence.d.ts +5 -5
  98. package/dist/core/preflight/witness-evidence.js +73 -20
  99. package/dist/core/schemas/artifact.d.ts +1049 -30
  100. package/dist/core/schemas/constraint-ledger.js +51 -0
  101. package/dist/core/schemas/defect-signature.d.ts +695 -0
  102. package/dist/core/schemas/defect-signature.js +175 -0
  103. package/dist/core/schemas/eval-contract.d.ts +550 -12
  104. package/dist/core/schemas/eval-contract.js +32 -2
  105. package/dist/core/schemas/evidence-artifact.d.ts +109 -19
  106. package/dist/core/schemas/evidence-artifact.js +64 -8
  107. package/dist/core/schemas/interface.d.ts +741 -13
  108. package/dist/core/schemas/interface.js +120 -7
  109. package/dist/core/schemas/isolation-manifest.js +16 -9
  110. package/dist/core/schemas/plan.d.ts +329 -3
  111. package/dist/core/schemas/plan.js +89 -3
  112. package/dist/core/schemas/pointer.d.ts +47 -1
  113. package/dist/core/schemas/pointer.js +89 -8
  114. package/dist/core/schemas/port-messages.d.ts +194 -10
  115. package/dist/core/schemas/port-messages.js +73 -6
  116. package/dist/core/schemas/probe-body.d.ts +18 -0
  117. package/dist/core/schemas/probe-body.js +13 -0
  118. package/dist/core/schemas/probe-qualification.d.ts +168 -0
  119. package/dist/core/schemas/probe-qualification.js +106 -0
  120. package/dist/core/schemas/probe.d.ts +431 -0
  121. package/dist/core/schemas/probe.js +6 -2
  122. package/dist/core/schemas/scoring-policy.d.ts +1 -0
  123. package/dist/core/schemas/scoring-policy.js +6 -1
  124. package/dist/core/schemas/sealed-evaluator-brief.d.ts +1 -0
  125. package/dist/core/schemas/sealed-evaluator-brief.js +4 -1
  126. package/dist/core/schemas/sealed-run-record.d.ts +161 -12
  127. package/dist/core/schemas/sealed-run-record.js +92 -15
  128. package/dist/core/schemas/sensitivity-witness.d.ts +108 -6
  129. package/dist/core/schemas/sensitivity-witness.js +61 -5
  130. package/dist/core/score/binding-order.d.ts +31 -0
  131. package/dist/core/score/binding-order.js +88 -0
  132. package/dist/core/score/bindings.d.ts +93 -0
  133. package/dist/core/score/bindings.js +309 -0
  134. package/dist/core/score/ladder-table.d.ts +23 -0
  135. package/dist/core/score/ladder-table.js +109 -0
  136. package/dist/core/score/ladder.d.ts +229 -0
  137. package/dist/core/score/ladder.js +464 -0
  138. package/dist/core/score/mode-agreement.d.ts +30 -0
  139. package/dist/core/score/mode-agreement.js +16 -0
  140. package/dist/core/score/outcome-table.d.ts +17 -0
  141. package/dist/core/score/outcome-table.js +172 -0
  142. package/dist/core/score/outcome.d.ts +466 -0
  143. package/dist/core/score/outcome.js +562 -0
  144. package/dist/core/score/qualification.d.ts +83 -0
  145. package/dist/core/score/qualification.js +645 -0
  146. package/dist/core/score/quotation.d.ts +56 -0
  147. package/dist/core/score/quotation.js +226 -0
  148. package/dist/core/score/reduce-trials.d.ts +80 -0
  149. package/dist/core/score/reduce-trials.js +90 -0
  150. package/dist/core/score/score.d.ts +72 -0
  151. package/dist/core/score/score.js +607 -0
  152. package/dist/core/score/selection.d.ts +80 -0
  153. package/dist/core/score/selection.js +98 -0
  154. package/dist/core/score/strength.d.ts +58 -0
  155. package/dist/core/score/strength.js +227 -0
  156. package/dist/core/score/witness.d.ts +138 -0
  157. package/dist/core/score/witness.js +320 -0
  158. package/dist/core/seal/derived-reference.d.ts +2 -9
  159. package/dist/core/seal/derived-reference.js +293 -46
  160. package/dist/core/seal/plan-index.d.ts +18 -3
  161. package/dist/core/seal/plan-index.js +44 -8
  162. package/dist/core/seal/seal.js +8 -3
  163. package/dist/core/stage-contracts.d.ts +62 -2
  164. package/dist/index.d.ts +1 -1
  165. package/dist/index.js +1 -1
  166. package/dist/ports/environment-probe-port.d.ts +60 -4
  167. package/dist/testing/index.d.ts +2 -0
  168. package/dist/testing/index.js +1 -0
  169. package/dist/testing/probe-conformance.d.ts +29 -0
  170. package/dist/testing/probe-conformance.js +34 -5
  171. package/package.json +12 -3
  172. package/schemas/eval-contract.schema.json +1787 -797
  173. package/schemas/evidence-artifact.schema.json +126 -9
  174. package/schemas/isolation-manifest.schema.json +17 -10
  175. package/schemas/probe.schema.json +636 -5
  176. package/schemas/rubric.schema.json +1 -1
  177. package/schemas/scoring-policy.schema.json +8 -1
  178. package/schemas/sealed-evaluator-brief.schema.json +11 -1
  179. package/schemas/sealed-run-record.schema.json +314 -40
@@ -87,12 +87,34 @@ export declare const SiblingGroups: z.ZodObject<{
87
87
  export declare const TestData: z.ZodObject<{
88
88
  setup: z.ZodNullable<z.ZodString>;
89
89
  cleanup: z.ZodNullable<z.ZodString>;
90
+ principals: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
91
+ kind: z.ZodString;
92
+ }, z.core.$strict>>>;
93
+ resources: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
94
+ kind: z.ZodString;
95
+ }, z.core.$strict>>>;
90
96
  }, z.core.$strict>;
91
97
  export declare const Budgets: z.ZodObject<{
92
98
  maxToolCalls: z.ZodInt;
93
99
  maxWallClockMinutes: z.ZodInt;
94
100
  maxCostUsd: z.ZodString;
95
101
  }, z.core.$strict>;
102
+ /**
103
+ * The one `schemaVersion` this build reads.
104
+ *
105
+ * AD-11 says "readers accept an equal `schemaVersion` only and throw
106
+ * `schema-version-mismatch` outside that", and puts the comparison on the
107
+ * reader rather than in the schema: `lineage.ts` records that a `z.literal`
108
+ * would turn a version-2 artifact into an anonymous parse failure instead of
109
+ * AD-28's dedicated fault. That left the rule stated everywhere and performed
110
+ * nowhere for this artifact, so a contract stamped 3 parsed and compiled clean
111
+ * and its stale version travelled into the scoring version, which is the one
112
+ * number AD-11 exists to keep comparable.
113
+ *
114
+ * `compile` is the reader that performs it. The constant lives here beside the
115
+ * schema whose version it names, so the bump and the constant are one edit.
116
+ */
117
+ export declare const EVAL_CONTRACT_SCHEMA_VERSION = 4;
96
118
  export declare const EvalContract: z.ZodObject<{
97
119
  schemaVersion: z.ZodInt;
98
120
  parentDigest: z.ZodNullable<z.ZodString>;
@@ -179,14 +201,9 @@ export declare const EvalContract: z.ZodObject<{
179
201
  approval: z.ZodNullable<z.ZodString>;
180
202
  expiresAt: z.ZodNullable<z.ZodISODateTime>;
181
203
  }, z.core.$strict>>;
182
- permittedInterfaces: z.ZodArray<z.ZodObject<{
204
+ permittedInterfaces: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
183
205
  logicalId: z.ZodString;
184
- kind: z.ZodEnum<{
185
- api: "api";
186
- cli: "cli";
187
- mcp: "mcp";
188
- web: "web";
189
- }>;
206
+ kind: z.ZodLiteral<"api">;
190
207
  operations: z.ZodArray<z.ZodObject<{
191
208
  operationId: z.ZodString;
192
209
  method: z.ZodEnum<{
@@ -287,13 +304,17 @@ export declare const EvalContract: z.ZodObject<{
287
304
  sensitivityWitness: z.ZodNullable<z.ZodObject<{
288
305
  witnessId: z.ZodString;
289
306
  channel: z.ZodEnum<{
307
+ argument: "argument";
290
308
  body: "body";
309
+ environment: "environment";
310
+ option: "option";
291
311
  path: "path";
292
312
  query: "query";
313
+ stdin: "stdin";
293
314
  }>;
294
315
  legs: z.ZodArray<z.ZodObject<{
295
316
  legId: z.ZodString;
296
- inputs: z.ZodObject<{
317
+ inputs: z.ZodUnion<readonly [z.ZodObject<{
297
318
  path: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
298
319
  query: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
299
320
  header: z.ZodRecord<z.ZodString, z.ZodString>;
@@ -303,12 +324,453 @@ export declare const EvalContract: z.ZodObject<{
303
324
  }, z.core.$strict>, z.ZodObject<{
304
325
  kind: z.ZodLiteral<"absent">;
305
326
  }, z.core.$strict>], "kind">;
306
- }, z.core.$strict>;
327
+ }, z.core.$strict>, z.ZodObject<{
328
+ argument: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
329
+ option: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
330
+ environment: z.ZodRecord<z.ZodString, z.ZodString>;
331
+ stdin: z.ZodDiscriminatedUnion<[z.ZodObject<{
332
+ kind: z.ZodLiteral<"json">;
333
+ value: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
334
+ }, z.core.$strict>, z.ZodObject<{
335
+ kind: z.ZodLiteral<"text">;
336
+ value: z.ZodString;
337
+ }, z.core.$strict>, z.ZodObject<{
338
+ kind: z.ZodLiteral<"absent">;
339
+ }, z.core.$strict>], "kind">;
340
+ }, z.core.$strict>]>;
307
341
  }, z.core.$strict>>;
308
342
  relation: z.ZodType<import("./expression.ts").Expression, unknown, z.core.$ZodTypeInternals<import("./expression.ts").Expression, unknown>>;
309
343
  }, z.core.$strict>>;
310
344
  }, z.core.$strict>>;
311
- }, z.core.$strict>>;
345
+ }, z.core.$strict>, z.ZodObject<{
346
+ logicalId: z.ZodString;
347
+ kind: z.ZodLiteral<"web">;
348
+ operations: z.ZodArray<z.ZodObject<{
349
+ operationId: z.ZodString;
350
+ method: z.ZodEnum<{
351
+ DELETE: "DELETE";
352
+ GET: "GET";
353
+ HEAD: "HEAD";
354
+ OPTIONS: "OPTIONS";
355
+ PATCH: "PATCH";
356
+ POST: "POST";
357
+ PUT: "PUT";
358
+ }>;
359
+ pathTemplate: z.ZodString;
360
+ stateChangeMarker: z.ZodBoolean;
361
+ requestShape: z.ZodObject<{
362
+ path: z.ZodObject<{
363
+ requiredKeys: z.ZodArray<z.ZodString>;
364
+ permittedKeys: z.ZodArray<z.ZodString>;
365
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
366
+ array: "array";
367
+ boolean: "boolean";
368
+ null: "null";
369
+ number: "number";
370
+ object: "object";
371
+ string: "string";
372
+ }>>>;
373
+ }, z.core.$strict>;
374
+ query: z.ZodObject<{
375
+ requiredKeys: z.ZodArray<z.ZodString>;
376
+ permittedKeys: z.ZodArray<z.ZodString>;
377
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
378
+ array: "array";
379
+ boolean: "boolean";
380
+ null: "null";
381
+ number: "number";
382
+ object: "object";
383
+ string: "string";
384
+ }>>>;
385
+ }, z.core.$strict>;
386
+ header: z.ZodObject<{
387
+ requiredKeys: z.ZodArray<z.ZodString>;
388
+ permittedKeys: z.ZodArray<z.ZodString>;
389
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
390
+ array: "array";
391
+ boolean: "boolean";
392
+ null: "null";
393
+ number: "number";
394
+ object: "object";
395
+ string: "string";
396
+ }>>>;
397
+ }, z.core.$strict>;
398
+ body: z.ZodObject<{
399
+ requiredKeys: z.ZodArray<z.ZodString>;
400
+ permittedKeys: z.ZodArray<z.ZodString>;
401
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
402
+ array: "array";
403
+ boolean: "boolean";
404
+ null: "null";
405
+ number: "number";
406
+ object: "object";
407
+ string: "string";
408
+ }>>>;
409
+ }, z.core.$strict>;
410
+ }, z.core.$strict>;
411
+ responseDescriptor: z.ZodObject<{
412
+ requiredKeys: z.ZodArray<z.ZodString>;
413
+ permittedKeys: z.ZodArray<z.ZodString>;
414
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
415
+ array: "array";
416
+ boolean: "boolean";
417
+ null: "null";
418
+ number: "number";
419
+ object: "object";
420
+ string: "string";
421
+ }>>>;
422
+ successIndicator: z.ZodNullable<z.ZodString>;
423
+ channelRoles: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodEnum<{
424
+ collection: "collection";
425
+ diagnostic: "diagnostic";
426
+ payload: "payload";
427
+ "success-indicator": "success-indicator";
428
+ }>>>;
429
+ collectionLocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
430
+ pointer: z.ZodString;
431
+ expectedCardinality: z.ZodDiscriminatedUnion<[z.ZodObject<{
432
+ mode: z.ZodLiteral<"exact">;
433
+ count: z.ZodInt;
434
+ }, z.core.$strict>, z.ZodObject<{
435
+ mode: z.ZodLiteral<"at-most">;
436
+ max: z.ZodInt;
437
+ }, z.core.$strict>, z.ZodObject<{
438
+ mode: z.ZodLiteral<"page-bounded">;
439
+ max: z.ZodInt;
440
+ }, z.core.$strict>], "mode">;
441
+ referenceSet: z.ZodNullable<z.ZodString>;
442
+ }, z.core.$strict>>>;
443
+ }, z.core.$strict>;
444
+ volatilePointers: z.ZodArray<z.ZodString>;
445
+ sensitivityWitness: z.ZodNullable<z.ZodObject<{
446
+ witnessId: z.ZodString;
447
+ channel: z.ZodEnum<{
448
+ argument: "argument";
449
+ body: "body";
450
+ environment: "environment";
451
+ option: "option";
452
+ path: "path";
453
+ query: "query";
454
+ stdin: "stdin";
455
+ }>;
456
+ legs: z.ZodArray<z.ZodObject<{
457
+ legId: z.ZodString;
458
+ inputs: z.ZodUnion<readonly [z.ZodObject<{
459
+ path: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
460
+ query: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
461
+ header: z.ZodRecord<z.ZodString, z.ZodString>;
462
+ body: z.ZodDiscriminatedUnion<[z.ZodObject<{
463
+ kind: z.ZodLiteral<"json">;
464
+ value: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
465
+ }, z.core.$strict>, z.ZodObject<{
466
+ kind: z.ZodLiteral<"absent">;
467
+ }, z.core.$strict>], "kind">;
468
+ }, z.core.$strict>, z.ZodObject<{
469
+ argument: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
470
+ option: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
471
+ environment: z.ZodRecord<z.ZodString, z.ZodString>;
472
+ stdin: z.ZodDiscriminatedUnion<[z.ZodObject<{
473
+ kind: z.ZodLiteral<"json">;
474
+ value: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
475
+ }, z.core.$strict>, z.ZodObject<{
476
+ kind: z.ZodLiteral<"text">;
477
+ value: z.ZodString;
478
+ }, z.core.$strict>, z.ZodObject<{
479
+ kind: z.ZodLiteral<"absent">;
480
+ }, z.core.$strict>], "kind">;
481
+ }, z.core.$strict>]>;
482
+ }, z.core.$strict>>;
483
+ relation: z.ZodType<import("./expression.ts").Expression, unknown, z.core.$ZodTypeInternals<import("./expression.ts").Expression, unknown>>;
484
+ }, z.core.$strict>>;
485
+ }, z.core.$strict>>;
486
+ }, z.core.$strict>, z.ZodObject<{
487
+ logicalId: z.ZodString;
488
+ kind: z.ZodLiteral<"mcp">;
489
+ operations: z.ZodArray<z.ZodObject<{
490
+ operationId: z.ZodString;
491
+ method: z.ZodEnum<{
492
+ DELETE: "DELETE";
493
+ GET: "GET";
494
+ HEAD: "HEAD";
495
+ OPTIONS: "OPTIONS";
496
+ PATCH: "PATCH";
497
+ POST: "POST";
498
+ PUT: "PUT";
499
+ }>;
500
+ pathTemplate: z.ZodString;
501
+ stateChangeMarker: z.ZodBoolean;
502
+ requestShape: z.ZodObject<{
503
+ path: z.ZodObject<{
504
+ requiredKeys: z.ZodArray<z.ZodString>;
505
+ permittedKeys: z.ZodArray<z.ZodString>;
506
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
507
+ array: "array";
508
+ boolean: "boolean";
509
+ null: "null";
510
+ number: "number";
511
+ object: "object";
512
+ string: "string";
513
+ }>>>;
514
+ }, z.core.$strict>;
515
+ query: z.ZodObject<{
516
+ requiredKeys: z.ZodArray<z.ZodString>;
517
+ permittedKeys: z.ZodArray<z.ZodString>;
518
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
519
+ array: "array";
520
+ boolean: "boolean";
521
+ null: "null";
522
+ number: "number";
523
+ object: "object";
524
+ string: "string";
525
+ }>>>;
526
+ }, z.core.$strict>;
527
+ header: z.ZodObject<{
528
+ requiredKeys: z.ZodArray<z.ZodString>;
529
+ permittedKeys: z.ZodArray<z.ZodString>;
530
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
531
+ array: "array";
532
+ boolean: "boolean";
533
+ null: "null";
534
+ number: "number";
535
+ object: "object";
536
+ string: "string";
537
+ }>>>;
538
+ }, z.core.$strict>;
539
+ body: z.ZodObject<{
540
+ requiredKeys: z.ZodArray<z.ZodString>;
541
+ permittedKeys: z.ZodArray<z.ZodString>;
542
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
543
+ array: "array";
544
+ boolean: "boolean";
545
+ null: "null";
546
+ number: "number";
547
+ object: "object";
548
+ string: "string";
549
+ }>>>;
550
+ }, z.core.$strict>;
551
+ }, z.core.$strict>;
552
+ responseDescriptor: z.ZodObject<{
553
+ requiredKeys: z.ZodArray<z.ZodString>;
554
+ permittedKeys: z.ZodArray<z.ZodString>;
555
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
556
+ array: "array";
557
+ boolean: "boolean";
558
+ null: "null";
559
+ number: "number";
560
+ object: "object";
561
+ string: "string";
562
+ }>>>;
563
+ successIndicator: z.ZodNullable<z.ZodString>;
564
+ channelRoles: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodEnum<{
565
+ collection: "collection";
566
+ diagnostic: "diagnostic";
567
+ payload: "payload";
568
+ "success-indicator": "success-indicator";
569
+ }>>>;
570
+ collectionLocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
571
+ pointer: z.ZodString;
572
+ expectedCardinality: z.ZodDiscriminatedUnion<[z.ZodObject<{
573
+ mode: z.ZodLiteral<"exact">;
574
+ count: z.ZodInt;
575
+ }, z.core.$strict>, z.ZodObject<{
576
+ mode: z.ZodLiteral<"at-most">;
577
+ max: z.ZodInt;
578
+ }, z.core.$strict>, z.ZodObject<{
579
+ mode: z.ZodLiteral<"page-bounded">;
580
+ max: z.ZodInt;
581
+ }, z.core.$strict>], "mode">;
582
+ referenceSet: z.ZodNullable<z.ZodString>;
583
+ }, z.core.$strict>>>;
584
+ }, z.core.$strict>;
585
+ volatilePointers: z.ZodArray<z.ZodString>;
586
+ sensitivityWitness: z.ZodNullable<z.ZodObject<{
587
+ witnessId: z.ZodString;
588
+ channel: z.ZodEnum<{
589
+ argument: "argument";
590
+ body: "body";
591
+ environment: "environment";
592
+ option: "option";
593
+ path: "path";
594
+ query: "query";
595
+ stdin: "stdin";
596
+ }>;
597
+ legs: z.ZodArray<z.ZodObject<{
598
+ legId: z.ZodString;
599
+ inputs: z.ZodUnion<readonly [z.ZodObject<{
600
+ path: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
601
+ query: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
602
+ header: z.ZodRecord<z.ZodString, z.ZodString>;
603
+ body: z.ZodDiscriminatedUnion<[z.ZodObject<{
604
+ kind: z.ZodLiteral<"json">;
605
+ value: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
606
+ }, z.core.$strict>, z.ZodObject<{
607
+ kind: z.ZodLiteral<"absent">;
608
+ }, z.core.$strict>], "kind">;
609
+ }, z.core.$strict>, z.ZodObject<{
610
+ argument: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
611
+ option: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
612
+ environment: z.ZodRecord<z.ZodString, z.ZodString>;
613
+ stdin: z.ZodDiscriminatedUnion<[z.ZodObject<{
614
+ kind: z.ZodLiteral<"json">;
615
+ value: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
616
+ }, z.core.$strict>, z.ZodObject<{
617
+ kind: z.ZodLiteral<"text">;
618
+ value: z.ZodString;
619
+ }, z.core.$strict>, z.ZodObject<{
620
+ kind: z.ZodLiteral<"absent">;
621
+ }, z.core.$strict>], "kind">;
622
+ }, z.core.$strict>]>;
623
+ }, z.core.$strict>>;
624
+ relation: z.ZodType<import("./expression.ts").Expression, unknown, z.core.$ZodTypeInternals<import("./expression.ts").Expression, unknown>>;
625
+ }, z.core.$strict>>;
626
+ }, z.core.$strict>>;
627
+ }, z.core.$strict>, z.ZodObject<{
628
+ logicalId: z.ZodString;
629
+ kind: z.ZodLiteral<"cli">;
630
+ operations: z.ZodArray<z.ZodObject<{
631
+ operationId: z.ZodString;
632
+ invocation: z.ZodObject<{
633
+ executable: z.ZodString;
634
+ subcommandPath: z.ZodArray<z.ZodString>;
635
+ }, z.core.$strict>;
636
+ stateChangeMarker: z.ZodBoolean;
637
+ requestShape: z.ZodObject<{
638
+ argument: z.ZodObject<{
639
+ requiredKeys: z.ZodArray<z.ZodString>;
640
+ permittedKeys: z.ZodArray<z.ZodString>;
641
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
642
+ array: "array";
643
+ boolean: "boolean";
644
+ null: "null";
645
+ number: "number";
646
+ object: "object";
647
+ string: "string";
648
+ }>>>;
649
+ }, z.core.$strict>;
650
+ option: z.ZodObject<{
651
+ requiredKeys: z.ZodArray<z.ZodString>;
652
+ permittedKeys: z.ZodArray<z.ZodString>;
653
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
654
+ array: "array";
655
+ boolean: "boolean";
656
+ null: "null";
657
+ number: "number";
658
+ object: "object";
659
+ string: "string";
660
+ }>>>;
661
+ }, z.core.$strict>;
662
+ environment: z.ZodObject<{
663
+ requiredKeys: z.ZodArray<z.ZodString>;
664
+ permittedKeys: z.ZodArray<z.ZodString>;
665
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
666
+ array: "array";
667
+ boolean: "boolean";
668
+ null: "null";
669
+ number: "number";
670
+ object: "object";
671
+ string: "string";
672
+ }>>>;
673
+ }, z.core.$strict>;
674
+ stdin: z.ZodObject<{
675
+ requiredKeys: z.ZodArray<z.ZodString>;
676
+ permittedKeys: z.ZodArray<z.ZodString>;
677
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
678
+ array: "array";
679
+ boolean: "boolean";
680
+ null: "null";
681
+ number: "number";
682
+ object: "object";
683
+ string: "string";
684
+ }>>>;
685
+ }, z.core.$strict>;
686
+ }, z.core.$strict>;
687
+ artifacts: z.ZodArray<z.ZodString>;
688
+ descriptorChannel: z.ZodDiscriminatedUnion<[z.ZodObject<{
689
+ kind: z.ZodLiteral<"stream">;
690
+ channel: z.ZodEnum<{
691
+ stderr: "stderr";
692
+ stdout: "stdout";
693
+ }>;
694
+ }, z.core.$strict>, z.ZodObject<{
695
+ kind: z.ZodLiteral<"artifact">;
696
+ artifactId: z.ZodString;
697
+ }, z.core.$strict>], "kind">;
698
+ responseDescriptor: z.ZodObject<{
699
+ requiredKeys: z.ZodArray<z.ZodString>;
700
+ permittedKeys: z.ZodArray<z.ZodString>;
701
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
702
+ array: "array";
703
+ boolean: "boolean";
704
+ null: "null";
705
+ number: "number";
706
+ object: "object";
707
+ string: "string";
708
+ }>>>;
709
+ successIndicator: z.ZodNullable<z.ZodString>;
710
+ channelRoles: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodEnum<{
711
+ collection: "collection";
712
+ diagnostic: "diagnostic";
713
+ payload: "payload";
714
+ "success-indicator": "success-indicator";
715
+ }>>>;
716
+ collectionLocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
717
+ pointer: z.ZodString;
718
+ expectedCardinality: z.ZodDiscriminatedUnion<[z.ZodObject<{
719
+ mode: z.ZodLiteral<"exact">;
720
+ count: z.ZodInt;
721
+ }, z.core.$strict>, z.ZodObject<{
722
+ mode: z.ZodLiteral<"at-most">;
723
+ max: z.ZodInt;
724
+ }, z.core.$strict>, z.ZodObject<{
725
+ mode: z.ZodLiteral<"page-bounded">;
726
+ max: z.ZodInt;
727
+ }, z.core.$strict>], "mode">;
728
+ referenceSet: z.ZodNullable<z.ZodString>;
729
+ }, z.core.$strict>>>;
730
+ }, z.core.$strict>;
731
+ volatilePointers: z.ZodArray<z.ZodString>;
732
+ sensitivityWitness: z.ZodNullable<z.ZodObject<{
733
+ witnessId: z.ZodString;
734
+ channel: z.ZodEnum<{
735
+ argument: "argument";
736
+ body: "body";
737
+ environment: "environment";
738
+ option: "option";
739
+ path: "path";
740
+ query: "query";
741
+ stdin: "stdin";
742
+ }>;
743
+ legs: z.ZodArray<z.ZodObject<{
744
+ legId: z.ZodString;
745
+ inputs: z.ZodUnion<readonly [z.ZodObject<{
746
+ path: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
747
+ query: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
748
+ header: z.ZodRecord<z.ZodString, z.ZodString>;
749
+ body: z.ZodDiscriminatedUnion<[z.ZodObject<{
750
+ kind: z.ZodLiteral<"json">;
751
+ value: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
752
+ }, z.core.$strict>, z.ZodObject<{
753
+ kind: z.ZodLiteral<"absent">;
754
+ }, z.core.$strict>], "kind">;
755
+ }, z.core.$strict>, z.ZodObject<{
756
+ argument: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
757
+ option: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
758
+ environment: z.ZodRecord<z.ZodString, z.ZodString>;
759
+ stdin: z.ZodDiscriminatedUnion<[z.ZodObject<{
760
+ kind: z.ZodLiteral<"json">;
761
+ value: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
762
+ }, z.core.$strict>, z.ZodObject<{
763
+ kind: z.ZodLiteral<"text">;
764
+ value: z.ZodString;
765
+ }, z.core.$strict>, z.ZodObject<{
766
+ kind: z.ZodLiteral<"absent">;
767
+ }, z.core.$strict>], "kind">;
768
+ }, z.core.$strict>]>;
769
+ }, z.core.$strict>>;
770
+ relation: z.ZodType<import("./expression.ts").Expression, unknown, z.core.$ZodTypeInternals<import("./expression.ts").Expression, unknown>>;
771
+ }, z.core.$strict>>;
772
+ }, z.core.$strict>>;
773
+ }, z.core.$strict>], "kind">>;
312
774
  referenceSets: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
313
775
  keys: z.ZodArray<z.ZodString>;
314
776
  members: z.ZodArray<z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>>;
@@ -321,7 +783,7 @@ export declare const EvalContract: z.ZodObject<{
321
783
  interactionPlan: z.ZodArray<z.ZodObject<{
322
784
  stepId: z.ZodString;
323
785
  operationId: z.ZodString;
324
- inputBinding: z.ZodObject<{
786
+ inputBinding: z.ZodUnion<readonly [z.ZodObject<{
325
787
  path: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
326
788
  literal: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
327
789
  }, z.core.$strict>, z.ZodObject<{
@@ -329,6 +791,10 @@ export declare const EvalContract: z.ZodObject<{
329
791
  any: "any";
330
792
  "type-violating": "type-violating";
331
793
  }>;
794
+ }, z.core.$strict>, z.ZodObject<{
795
+ captured: z.ZodString;
796
+ }, z.core.$strict>, z.ZodObject<{
797
+ principal: z.ZodString;
332
798
  }, z.core.$strict>]>>>;
333
799
  query: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
334
800
  literal: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
@@ -337,6 +803,10 @@ export declare const EvalContract: z.ZodObject<{
337
803
  any: "any";
338
804
  "type-violating": "type-violating";
339
805
  }>;
806
+ }, z.core.$strict>, z.ZodObject<{
807
+ captured: z.ZodString;
808
+ }, z.core.$strict>, z.ZodObject<{
809
+ principal: z.ZodString;
340
810
  }, z.core.$strict>]>>>;
341
811
  header: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
342
812
  literal: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
@@ -345,6 +815,10 @@ export declare const EvalContract: z.ZodObject<{
345
815
  any: "any";
346
816
  "type-violating": "type-violating";
347
817
  }>;
818
+ }, z.core.$strict>, z.ZodObject<{
819
+ captured: z.ZodString;
820
+ }, z.core.$strict>, z.ZodObject<{
821
+ principal: z.ZodString;
348
822
  }, z.core.$strict>]>>>;
349
823
  body: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
350
824
  literal: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
@@ -353,9 +827,67 @@ export declare const EvalContract: z.ZodObject<{
353
827
  any: "any";
354
828
  "type-violating": "type-violating";
355
829
  }>;
830
+ }, z.core.$strict>, z.ZodObject<{
831
+ captured: z.ZodString;
832
+ }, z.core.$strict>, z.ZodObject<{
833
+ principal: z.ZodString;
356
834
  }, z.core.$strict>]>>>;
357
- }, z.core.$strict>;
835
+ }, z.core.$strict>, z.ZodObject<{
836
+ argument: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
837
+ literal: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
838
+ }, z.core.$strict>, z.ZodObject<{
839
+ matcher: z.ZodEnum<{
840
+ any: "any";
841
+ "type-violating": "type-violating";
842
+ }>;
843
+ }, z.core.$strict>, z.ZodObject<{
844
+ captured: z.ZodString;
845
+ }, z.core.$strict>, z.ZodObject<{
846
+ principal: z.ZodString;
847
+ }, z.core.$strict>]>>>;
848
+ option: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
849
+ literal: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
850
+ }, z.core.$strict>, z.ZodObject<{
851
+ matcher: z.ZodEnum<{
852
+ any: "any";
853
+ "type-violating": "type-violating";
854
+ }>;
855
+ }, z.core.$strict>, z.ZodObject<{
856
+ captured: z.ZodString;
857
+ }, z.core.$strict>, z.ZodObject<{
858
+ principal: z.ZodString;
859
+ }, z.core.$strict>]>>>;
860
+ environment: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
861
+ literal: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
862
+ }, z.core.$strict>, z.ZodObject<{
863
+ matcher: z.ZodEnum<{
864
+ any: "any";
865
+ "type-violating": "type-violating";
866
+ }>;
867
+ }, z.core.$strict>, z.ZodObject<{
868
+ captured: z.ZodString;
869
+ }, z.core.$strict>, z.ZodObject<{
870
+ principal: z.ZodString;
871
+ }, z.core.$strict>]>>>;
872
+ stdin: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
873
+ literal: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
874
+ }, z.core.$strict>, z.ZodObject<{
875
+ matcher: z.ZodEnum<{
876
+ any: "any";
877
+ "type-violating": "type-violating";
878
+ }>;
879
+ }, z.core.$strict>, z.ZodObject<{
880
+ captured: z.ZodString;
881
+ }, z.core.$strict>, z.ZodObject<{
882
+ principal: z.ZodString;
883
+ }, z.core.$strict>]>>>;
884
+ }, z.core.$strict>]>;
358
885
  after: z.ZodNullable<z.ZodString>;
886
+ cardinality: z.ZodEnum<{
887
+ any: "any";
888
+ "at-most-one": "at-most-one";
889
+ "exactly-one": "exactly-one";
890
+ }>;
359
891
  }, z.core.$strict>>;
360
892
  scopedResources: z.ZodNullable<z.ZodArray<z.ZodObject<{
361
893
  reference: z.ZodString;
@@ -373,6 +905,12 @@ export declare const EvalContract: z.ZodObject<{
373
905
  testData: z.ZodObject<{
374
906
  setup: z.ZodNullable<z.ZodString>;
375
907
  cleanup: z.ZodNullable<z.ZodString>;
908
+ principals: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
909
+ kind: z.ZodString;
910
+ }, z.core.$strict>>>;
911
+ resources: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
912
+ kind: z.ZodString;
913
+ }, z.core.$strict>>>;
376
914
  }, z.core.$strict>;
377
915
  budgets: z.ZodObject<{
378
916
  maxToolCalls: z.ZodInt;