eval-quality 0.2.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 (125) hide show
  1. package/README.md +3 -3
  2. package/corpus/dev/README.md +3 -2
  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/cli/render.d.ts +2 -5
  28. package/dist/cli/render.js +51 -1
  29. package/dist/core/compile/bindings.d.ts +26 -7
  30. package/dist/core/compile/bindings.js +49 -32
  31. package/dist/core/compile/compile.d.ts +12 -0
  32. package/dist/core/compile/compile.js +28 -1
  33. package/dist/core/compile/excluded-content.d.ts +11 -0
  34. package/dist/core/compile/excluded-content.js +42 -0
  35. package/dist/core/compile/expression-legality.d.ts +2 -2
  36. package/dist/core/compile/expression-legality.js +58 -12
  37. package/dist/core/compile/interface-inventory.d.ts +34 -1
  38. package/dist/core/compile/interface-inventory.js +88 -11
  39. package/dist/core/compile/reachability.d.ts +12 -2
  40. package/dist/core/compile/reachability.js +123 -36
  41. package/dist/core/compile/schema-version.d.ts +2 -0
  42. package/dist/core/compile/schema-version.js +25 -0
  43. package/dist/core/compile/sensitivity-witness.d.ts +31 -12
  44. package/dist/core/compile/sensitivity-witness.js +110 -23
  45. package/dist/core/compile/step-reference.d.ts +2 -0
  46. package/dist/core/compile/step-reference.js +49 -0
  47. package/dist/core/coverage/operations.d.ts +62 -0
  48. package/dist/core/coverage/operations.js +57 -0
  49. package/dist/core/coverage/relevance.d.ts +4 -2
  50. package/dist/core/coverage/relevance.js +22 -23
  51. package/dist/core/coverage/satisfaction.d.ts +2 -2
  52. package/dist/core/coverage/satisfaction.js +73 -48
  53. package/dist/core/declared-inputs.d.ts +83 -4
  54. package/dist/core/declared-inputs.js +105 -8
  55. package/dist/core/evaluate/evidence-resolution.d.ts +9 -12
  56. package/dist/core/evaluate/evidence-resolution.js +70 -10
  57. package/dist/core/evaluate/operators.d.ts +22 -0
  58. package/dist/core/evaluate/operators.js +17 -1
  59. package/dist/core/evaluate/resolution.d.ts +14 -3
  60. package/dist/core/evaluate/resolution.js +63 -3
  61. package/dist/core/excluded-content.d.ts +65 -0
  62. package/dist/core/excluded-content.js +113 -0
  63. package/dist/core/failure-codes.d.ts +2 -2
  64. package/dist/core/failure-codes.js +5 -2
  65. package/dist/core/ingest/conditions.d.ts +1 -1
  66. package/dist/core/ingest/ingest.js +8 -0
  67. package/dist/core/preflight/plan.d.ts +7 -5
  68. package/dist/core/preflight/plan.js +75 -32
  69. package/dist/core/preflight/projection.d.ts +6 -3
  70. package/dist/core/preflight/projection.js +22 -2
  71. package/dist/core/preflight/reduce.js +47 -7
  72. package/dist/core/preflight/witness-evidence.d.ts +5 -5
  73. package/dist/core/preflight/witness-evidence.js +63 -20
  74. package/dist/core/schemas/artifact.d.ts +683 -35
  75. package/dist/core/schemas/constraint-ledger.js +11 -0
  76. package/dist/core/schemas/defect-signature.d.ts +438 -16
  77. package/dist/core/schemas/defect-signature.js +58 -10
  78. package/dist/core/schemas/eval-contract.d.ts +517 -12
  79. package/dist/core/schemas/eval-contract.js +18 -2
  80. package/dist/core/schemas/evidence-artifact.d.ts +14 -4
  81. package/dist/core/schemas/evidence-artifact.js +1 -1
  82. package/dist/core/schemas/interface.d.ts +741 -13
  83. package/dist/core/schemas/interface.js +120 -7
  84. package/dist/core/schemas/isolation-manifest.js +16 -9
  85. package/dist/core/schemas/plan.d.ts +217 -3
  86. package/dist/core/schemas/plan.js +22 -1
  87. package/dist/core/schemas/pointer.d.ts +47 -1
  88. package/dist/core/schemas/pointer.js +89 -8
  89. package/dist/core/schemas/port-messages.d.ts +194 -10
  90. package/dist/core/schemas/port-messages.js +73 -6
  91. package/dist/core/schemas/probe-body.d.ts +18 -0
  92. package/dist/core/schemas/probe-body.js +13 -0
  93. package/dist/core/schemas/probe.d.ts +122 -3
  94. package/dist/core/schemas/probe.js +1 -1
  95. package/dist/core/schemas/sealed-run-record.d.ts +131 -9
  96. package/dist/core/schemas/sealed-run-record.js +56 -11
  97. package/dist/core/schemas/sensitivity-witness.d.ts +108 -6
  98. package/dist/core/schemas/sensitivity-witness.js +61 -5
  99. package/dist/core/score/bindings.d.ts +2 -2
  100. package/dist/core/score/bindings.js +25 -13
  101. package/dist/core/score/qualification.d.ts +5 -5
  102. package/dist/core/score/qualification.js +67 -37
  103. package/dist/core/score/quotation.d.ts +1 -24
  104. package/dist/core/score/quotation.js +29 -4
  105. package/dist/core/score/score.js +28 -2
  106. package/dist/core/score/strength.d.ts +9 -0
  107. package/dist/core/score/strength.js +35 -1
  108. package/dist/core/score/witness.d.ts +21 -0
  109. package/dist/core/score/witness.js +9 -4
  110. package/dist/core/seal/derived-reference.d.ts +2 -9
  111. package/dist/core/seal/derived-reference.js +62 -23
  112. package/dist/core/seal/plan-index.d.ts +18 -3
  113. package/dist/core/seal/plan-index.js +44 -8
  114. package/dist/index.d.ts +1 -1
  115. package/dist/index.js +1 -1
  116. package/dist/ports/environment-probe-port.d.ts +60 -4
  117. package/dist/testing/probe-conformance.d.ts +29 -0
  118. package/dist/testing/probe-conformance.js +34 -5
  119. package/package.json +1 -1
  120. package/schemas/eval-contract.schema.json +1356 -464
  121. package/schemas/evidence-artifact.schema.json +59 -29
  122. package/schemas/isolation-manifest.schema.json +17 -10
  123. package/schemas/probe.schema.json +197 -71
  124. package/schemas/rubric.schema.json +1 -1
  125. package/schemas/sealed-run-record.schema.json +296 -39
@@ -75,6 +75,7 @@ export declare const ResponseDescriptor: z.ZodObject<{
75
75
  referenceSet: z.ZodNullable<z.ZodString>;
76
76
  }, z.core.$strict>>>;
77
77
  }, z.core.$strict>;
78
+ export type ResponseDescriptor = z.infer<typeof ResponseDescriptor>;
78
79
  /**
79
80
  * AD-19's four transport channels, spelled as a four-key strict object rather
80
81
  * than a record over a channel enum: a record over an enum key demands every
@@ -248,13 +249,17 @@ export declare const Operation: z.ZodObject<{
248
249
  sensitivityWitness: z.ZodNullable<z.ZodObject<{
249
250
  witnessId: z.ZodString;
250
251
  channel: z.ZodEnum<{
252
+ argument: "argument";
251
253
  body: "body";
254
+ environment: "environment";
255
+ option: "option";
252
256
  path: "path";
253
257
  query: "query";
258
+ stdin: "stdin";
254
259
  }>;
255
260
  legs: z.ZodArray<z.ZodObject<{
256
261
  legId: z.ZodString;
257
- inputs: z.ZodObject<{
262
+ inputs: z.ZodUnion<readonly [z.ZodObject<{
258
263
  path: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
259
264
  query: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
260
265
  header: z.ZodRecord<z.ZodString, z.ZodString>;
@@ -264,12 +269,282 @@ export declare const Operation: z.ZodObject<{
264
269
  }, z.core.$strict>, z.ZodObject<{
265
270
  kind: z.ZodLiteral<"absent">;
266
271
  }, z.core.$strict>], "kind">;
267
- }, z.core.$strict>;
272
+ }, z.core.$strict>, z.ZodObject<{
273
+ argument: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
274
+ option: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
275
+ environment: z.ZodRecord<z.ZodString, z.ZodString>;
276
+ stdin: z.ZodDiscriminatedUnion<[z.ZodObject<{
277
+ kind: z.ZodLiteral<"json">;
278
+ value: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
279
+ }, z.core.$strict>, z.ZodObject<{
280
+ kind: z.ZodLiteral<"text">;
281
+ value: z.ZodString;
282
+ }, z.core.$strict>, z.ZodObject<{
283
+ kind: z.ZodLiteral<"absent">;
284
+ }, z.core.$strict>], "kind">;
285
+ }, z.core.$strict>]>;
268
286
  }, z.core.$strict>>;
269
287
  relation: z.ZodType<import("./expression.ts").Expression, unknown, z.core.$ZodTypeInternals<import("./expression.ts").Expression, unknown>>;
270
288
  }, z.core.$strict>>;
271
289
  }, z.core.$strict>;
272
290
  export type Operation = z.infer<typeof Operation>;
291
+ /**
292
+ * AD-35 applied to a command: the operation names a logical executable and the
293
+ * caller maps it to something runnable outside the contract. `Identifier`'s
294
+ * charset admits no slash, dot, or colon, so `/usr/local/bin/tool`, `./tool`,
295
+ * and `http://host/tool` are parse errors rather than compile findings. That is
296
+ * what makes AD-35 structural here instead of advisory.
297
+ *
298
+ * The subcommand path is a list of segments rather than one string for the
299
+ * reason `PathTemplate` spells parameters in braces and nothing else: AD-40
300
+ * compares identities as segments, and a single string would force two
301
+ * implementations to agree on a separator no field declares.
302
+ */
303
+ export declare const CommandInvocation: z.ZodObject<{
304
+ executable: z.ZodString;
305
+ subcommandPath: z.ZodArray<z.ZodString>;
306
+ }, z.core.$strict>;
307
+ export type CommandInvocation = z.infer<typeof CommandInvocation>;
308
+ /**
309
+ * The command counterpart of `RequestShape`, built as a four-key strict object
310
+ * for the reason the comment above `RequestShape` gives: a record over a
311
+ * channel enum demands every member at parse time, and the partial spelling
312
+ * that would relax it is the one the Consistency Conventions ban.
313
+ */
314
+ export declare const CommandRequestShape: z.ZodObject<{
315
+ argument: z.ZodObject<{
316
+ requiredKeys: z.ZodArray<z.ZodString>;
317
+ permittedKeys: z.ZodArray<z.ZodString>;
318
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
319
+ array: "array";
320
+ boolean: "boolean";
321
+ null: "null";
322
+ number: "number";
323
+ object: "object";
324
+ string: "string";
325
+ }>>>;
326
+ }, z.core.$strict>;
327
+ option: z.ZodObject<{
328
+ requiredKeys: z.ZodArray<z.ZodString>;
329
+ permittedKeys: z.ZodArray<z.ZodString>;
330
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
331
+ array: "array";
332
+ boolean: "boolean";
333
+ null: "null";
334
+ number: "number";
335
+ object: "object";
336
+ string: "string";
337
+ }>>>;
338
+ }, z.core.$strict>;
339
+ environment: z.ZodObject<{
340
+ requiredKeys: z.ZodArray<z.ZodString>;
341
+ permittedKeys: z.ZodArray<z.ZodString>;
342
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
343
+ array: "array";
344
+ boolean: "boolean";
345
+ null: "null";
346
+ number: "number";
347
+ object: "object";
348
+ string: "string";
349
+ }>>>;
350
+ }, z.core.$strict>;
351
+ stdin: z.ZodObject<{
352
+ requiredKeys: z.ZodArray<z.ZodString>;
353
+ permittedKeys: z.ZodArray<z.ZodString>;
354
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
355
+ array: "array";
356
+ boolean: "boolean";
357
+ null: "null";
358
+ number: "number";
359
+ object: "object";
360
+ string: "string";
361
+ }>>>;
362
+ }, z.core.$strict>;
363
+ }, z.core.$strict>;
364
+ export type CommandRequestShape = z.infer<typeof CommandRequestShape>;
365
+ /**
366
+ * Which output channel the operation's one response descriptor describes.
367
+ *
368
+ * Tagged on `kind` rather than spelled as a bare channel name because `stdout`
369
+ * is itself a legal `Identifier`: an untagged root could not tell the stream
370
+ * from an artifact genuinely named `stdout`, which is exactly the ambiguity the
371
+ * two members below would otherwise share.
372
+ */
373
+ export declare const CommandDescriptorChannel: z.ZodDiscriminatedUnion<[z.ZodObject<{
374
+ kind: z.ZodLiteral<"stream">;
375
+ channel: z.ZodEnum<{
376
+ stderr: "stderr";
377
+ stdout: "stdout";
378
+ }>;
379
+ }, z.core.$strict>, z.ZodObject<{
380
+ kind: z.ZodLiteral<"artifact">;
381
+ artifactId: z.ZodString;
382
+ }, z.core.$strict>], "kind">;
383
+ export type CommandDescriptorChannel = z.infer<typeof CommandDescriptorChannel>;
384
+ /**
385
+ * A command-kind operation. It carries exactly one `ResponseDescriptor`, the
386
+ * same shape an api operation carries, and `descriptorChannel` says which
387
+ * output channel that descriptor describes.
388
+ *
389
+ * One descriptor rather than one per output channel: AD-19 fixes the descriptor
390
+ * per operation so that `requiredKeys` has a truthful value, and AD-20 rule 2
391
+ * reads "the required keys of the response descriptor belonging to the
392
+ * operation that step invokes" as its denominator. Several descriptors leave
393
+ * that phrase with several referents, which is the defect AD-19 already records
394
+ * one level up for an interface-wide union. An operation whose stream and whose
395
+ * written file both need declared structure is two operations.
396
+ *
397
+ * There is no declared success value space for the exit code. AD-19 already
398
+ * declares one nominated success indicator per operation, and an exit-code
399
+ * assertion is an ordinary oracle over `/interactions/{stepId}/exit-code`,
400
+ * which the pointer grammar carries as a scalar channel.
401
+ */
402
+ export declare const CommandOperation: z.ZodObject<{
403
+ operationId: z.ZodString;
404
+ invocation: z.ZodObject<{
405
+ executable: z.ZodString;
406
+ subcommandPath: z.ZodArray<z.ZodString>;
407
+ }, z.core.$strict>;
408
+ stateChangeMarker: z.ZodBoolean;
409
+ requestShape: z.ZodObject<{
410
+ argument: z.ZodObject<{
411
+ requiredKeys: z.ZodArray<z.ZodString>;
412
+ permittedKeys: z.ZodArray<z.ZodString>;
413
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
414
+ array: "array";
415
+ boolean: "boolean";
416
+ null: "null";
417
+ number: "number";
418
+ object: "object";
419
+ string: "string";
420
+ }>>>;
421
+ }, z.core.$strict>;
422
+ option: z.ZodObject<{
423
+ requiredKeys: z.ZodArray<z.ZodString>;
424
+ permittedKeys: z.ZodArray<z.ZodString>;
425
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
426
+ array: "array";
427
+ boolean: "boolean";
428
+ null: "null";
429
+ number: "number";
430
+ object: "object";
431
+ string: "string";
432
+ }>>>;
433
+ }, z.core.$strict>;
434
+ environment: z.ZodObject<{
435
+ requiredKeys: z.ZodArray<z.ZodString>;
436
+ permittedKeys: z.ZodArray<z.ZodString>;
437
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
438
+ array: "array";
439
+ boolean: "boolean";
440
+ null: "null";
441
+ number: "number";
442
+ object: "object";
443
+ string: "string";
444
+ }>>>;
445
+ }, z.core.$strict>;
446
+ stdin: z.ZodObject<{
447
+ requiredKeys: z.ZodArray<z.ZodString>;
448
+ permittedKeys: z.ZodArray<z.ZodString>;
449
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
450
+ array: "array";
451
+ boolean: "boolean";
452
+ null: "null";
453
+ number: "number";
454
+ object: "object";
455
+ string: "string";
456
+ }>>>;
457
+ }, z.core.$strict>;
458
+ }, z.core.$strict>;
459
+ artifacts: z.ZodArray<z.ZodString>;
460
+ descriptorChannel: z.ZodDiscriminatedUnion<[z.ZodObject<{
461
+ kind: z.ZodLiteral<"stream">;
462
+ channel: z.ZodEnum<{
463
+ stderr: "stderr";
464
+ stdout: "stdout";
465
+ }>;
466
+ }, z.core.$strict>, z.ZodObject<{
467
+ kind: z.ZodLiteral<"artifact">;
468
+ artifactId: z.ZodString;
469
+ }, z.core.$strict>], "kind">;
470
+ responseDescriptor: z.ZodObject<{
471
+ requiredKeys: z.ZodArray<z.ZodString>;
472
+ permittedKeys: z.ZodArray<z.ZodString>;
473
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
474
+ array: "array";
475
+ boolean: "boolean";
476
+ null: "null";
477
+ number: "number";
478
+ object: "object";
479
+ string: "string";
480
+ }>>>;
481
+ successIndicator: z.ZodNullable<z.ZodString>;
482
+ channelRoles: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodEnum<{
483
+ collection: "collection";
484
+ diagnostic: "diagnostic";
485
+ payload: "payload";
486
+ "success-indicator": "success-indicator";
487
+ }>>>;
488
+ collectionLocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
489
+ pointer: z.ZodString;
490
+ expectedCardinality: z.ZodDiscriminatedUnion<[z.ZodObject<{
491
+ mode: z.ZodLiteral<"exact">;
492
+ count: z.ZodInt;
493
+ }, z.core.$strict>, z.ZodObject<{
494
+ mode: z.ZodLiteral<"at-most">;
495
+ max: z.ZodInt;
496
+ }, z.core.$strict>, z.ZodObject<{
497
+ mode: z.ZodLiteral<"page-bounded">;
498
+ max: z.ZodInt;
499
+ }, z.core.$strict>], "mode">;
500
+ referenceSet: z.ZodNullable<z.ZodString>;
501
+ }, z.core.$strict>>>;
502
+ }, z.core.$strict>;
503
+ volatilePointers: z.ZodArray<z.ZodString>;
504
+ sensitivityWitness: z.ZodNullable<z.ZodObject<{
505
+ witnessId: z.ZodString;
506
+ channel: z.ZodEnum<{
507
+ argument: "argument";
508
+ body: "body";
509
+ environment: "environment";
510
+ option: "option";
511
+ path: "path";
512
+ query: "query";
513
+ stdin: "stdin";
514
+ }>;
515
+ legs: z.ZodArray<z.ZodObject<{
516
+ legId: z.ZodString;
517
+ inputs: z.ZodUnion<readonly [z.ZodObject<{
518
+ path: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
519
+ query: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
520
+ header: z.ZodRecord<z.ZodString, z.ZodString>;
521
+ body: z.ZodDiscriminatedUnion<[z.ZodObject<{
522
+ kind: z.ZodLiteral<"json">;
523
+ value: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
524
+ }, z.core.$strict>, z.ZodObject<{
525
+ kind: z.ZodLiteral<"absent">;
526
+ }, z.core.$strict>], "kind">;
527
+ }, z.core.$strict>, z.ZodObject<{
528
+ argument: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
529
+ option: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
530
+ environment: z.ZodRecord<z.ZodString, z.ZodString>;
531
+ stdin: z.ZodDiscriminatedUnion<[z.ZodObject<{
532
+ kind: z.ZodLiteral<"json">;
533
+ value: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
534
+ }, z.core.$strict>, z.ZodObject<{
535
+ kind: z.ZodLiteral<"text">;
536
+ value: z.ZodString;
537
+ }, z.core.$strict>, z.ZodObject<{
538
+ kind: z.ZodLiteral<"absent">;
539
+ }, z.core.$strict>], "kind">;
540
+ }, z.core.$strict>]>;
541
+ }, z.core.$strict>>;
542
+ relation: z.ZodType<import("./expression.ts").Expression, unknown, z.core.$ZodTypeInternals<import("./expression.ts").Expression, unknown>>;
543
+ }, z.core.$strict>>;
544
+ }, z.core.$strict>;
545
+ export type CommandOperation = z.infer<typeof CommandOperation>;
546
+ /** Either operation shape, for the consumers that read only kind-neutral fields. */
547
+ export type AnyOperation = Operation | CommandOperation;
273
548
  /**
274
549
  * AD-19's four interface kinds, exported once so nothing else respells them:
275
550
  * the sealed evaluator brief carries interface identity without the operation
@@ -278,20 +553,21 @@ export type Operation = z.infer<typeof Operation>;
278
553
  * site exactly as the literal did.
279
554
  */
280
555
  export declare const INTERFACE_KINDS: readonly ['api', 'web', 'cli', 'mcp'];
556
+ export type InterfaceKindName = (typeof INTERFACE_KINDS)[number];
281
557
  export declare const InterfaceKind: z.ZodEnum<{
282
558
  api: "api";
283
559
  cli: "cli";
284
560
  mcp: "mcp";
285
561
  web: "web";
286
562
  }>;
287
- export declare const PermittedInterface: z.ZodObject<{
563
+ /**
564
+ * Discriminated on `kind`, so an operation shape cannot be smuggled onto the
565
+ * wrong interface: a `cli` interface declaring `method` and an `api` interface
566
+ * declaring `invocation` are both parse errors.
567
+ */
568
+ export declare const PermittedInterface: z.ZodDiscriminatedUnion<[z.ZodObject<{
288
569
  logicalId: z.ZodString;
289
- kind: z.ZodEnum<{
290
- api: "api";
291
- cli: "cli";
292
- mcp: "mcp";
293
- web: "web";
294
- }>;
570
+ kind: z.ZodLiteral<"api">;
295
571
  operations: z.ZodArray<z.ZodObject<{
296
572
  operationId: z.ZodString;
297
573
  method: z.ZodEnum<{
@@ -392,13 +668,17 @@ export declare const PermittedInterface: z.ZodObject<{
392
668
  sensitivityWitness: z.ZodNullable<z.ZodObject<{
393
669
  witnessId: z.ZodString;
394
670
  channel: z.ZodEnum<{
671
+ argument: "argument";
395
672
  body: "body";
673
+ environment: "environment";
674
+ option: "option";
396
675
  path: "path";
397
676
  query: "query";
677
+ stdin: "stdin";
398
678
  }>;
399
679
  legs: z.ZodArray<z.ZodObject<{
400
680
  legId: z.ZodString;
401
- inputs: z.ZodObject<{
681
+ inputs: z.ZodUnion<readonly [z.ZodObject<{
402
682
  path: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
403
683
  query: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
404
684
  header: z.ZodRecord<z.ZodString, z.ZodString>;
@@ -408,10 +688,458 @@ export declare const PermittedInterface: z.ZodObject<{
408
688
  }, z.core.$strict>, z.ZodObject<{
409
689
  kind: z.ZodLiteral<"absent">;
410
690
  }, z.core.$strict>], "kind">;
411
- }, z.core.$strict>;
691
+ }, z.core.$strict>, z.ZodObject<{
692
+ argument: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
693
+ option: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
694
+ environment: z.ZodRecord<z.ZodString, z.ZodString>;
695
+ stdin: z.ZodDiscriminatedUnion<[z.ZodObject<{
696
+ kind: z.ZodLiteral<"json">;
697
+ value: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
698
+ }, z.core.$strict>, z.ZodObject<{
699
+ kind: z.ZodLiteral<"text">;
700
+ value: z.ZodString;
701
+ }, z.core.$strict>, z.ZodObject<{
702
+ kind: z.ZodLiteral<"absent">;
703
+ }, z.core.$strict>], "kind">;
704
+ }, z.core.$strict>]>;
412
705
  }, z.core.$strict>>;
413
706
  relation: z.ZodType<import("./expression.ts").Expression, unknown, z.core.$ZodTypeInternals<import("./expression.ts").Expression, unknown>>;
414
707
  }, z.core.$strict>>;
415
708
  }, z.core.$strict>>;
416
- }, z.core.$strict>;
417
- export type PermittedInterface = z.infer<typeof PermittedInterface>;
709
+ }, z.core.$strict>, z.ZodObject<{
710
+ logicalId: z.ZodString;
711
+ kind: z.ZodLiteral<"web">;
712
+ operations: z.ZodArray<z.ZodObject<{
713
+ operationId: z.ZodString;
714
+ method: z.ZodEnum<{
715
+ DELETE: "DELETE";
716
+ GET: "GET";
717
+ HEAD: "HEAD";
718
+ OPTIONS: "OPTIONS";
719
+ PATCH: "PATCH";
720
+ POST: "POST";
721
+ PUT: "PUT";
722
+ }>;
723
+ pathTemplate: z.ZodString;
724
+ stateChangeMarker: z.ZodBoolean;
725
+ requestShape: z.ZodObject<{
726
+ path: z.ZodObject<{
727
+ requiredKeys: z.ZodArray<z.ZodString>;
728
+ permittedKeys: z.ZodArray<z.ZodString>;
729
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
730
+ array: "array";
731
+ boolean: "boolean";
732
+ null: "null";
733
+ number: "number";
734
+ object: "object";
735
+ string: "string";
736
+ }>>>;
737
+ }, z.core.$strict>;
738
+ query: z.ZodObject<{
739
+ requiredKeys: z.ZodArray<z.ZodString>;
740
+ permittedKeys: z.ZodArray<z.ZodString>;
741
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
742
+ array: "array";
743
+ boolean: "boolean";
744
+ null: "null";
745
+ number: "number";
746
+ object: "object";
747
+ string: "string";
748
+ }>>>;
749
+ }, z.core.$strict>;
750
+ header: z.ZodObject<{
751
+ requiredKeys: z.ZodArray<z.ZodString>;
752
+ permittedKeys: z.ZodArray<z.ZodString>;
753
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
754
+ array: "array";
755
+ boolean: "boolean";
756
+ null: "null";
757
+ number: "number";
758
+ object: "object";
759
+ string: "string";
760
+ }>>>;
761
+ }, z.core.$strict>;
762
+ body: z.ZodObject<{
763
+ requiredKeys: z.ZodArray<z.ZodString>;
764
+ permittedKeys: z.ZodArray<z.ZodString>;
765
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
766
+ array: "array";
767
+ boolean: "boolean";
768
+ null: "null";
769
+ number: "number";
770
+ object: "object";
771
+ string: "string";
772
+ }>>>;
773
+ }, z.core.$strict>;
774
+ }, z.core.$strict>;
775
+ responseDescriptor: z.ZodObject<{
776
+ requiredKeys: z.ZodArray<z.ZodString>;
777
+ permittedKeys: z.ZodArray<z.ZodString>;
778
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
779
+ array: "array";
780
+ boolean: "boolean";
781
+ null: "null";
782
+ number: "number";
783
+ object: "object";
784
+ string: "string";
785
+ }>>>;
786
+ successIndicator: z.ZodNullable<z.ZodString>;
787
+ channelRoles: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodEnum<{
788
+ collection: "collection";
789
+ diagnostic: "diagnostic";
790
+ payload: "payload";
791
+ "success-indicator": "success-indicator";
792
+ }>>>;
793
+ collectionLocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
794
+ pointer: z.ZodString;
795
+ expectedCardinality: z.ZodDiscriminatedUnion<[z.ZodObject<{
796
+ mode: z.ZodLiteral<"exact">;
797
+ count: z.ZodInt;
798
+ }, z.core.$strict>, z.ZodObject<{
799
+ mode: z.ZodLiteral<"at-most">;
800
+ max: z.ZodInt;
801
+ }, z.core.$strict>, z.ZodObject<{
802
+ mode: z.ZodLiteral<"page-bounded">;
803
+ max: z.ZodInt;
804
+ }, z.core.$strict>], "mode">;
805
+ referenceSet: z.ZodNullable<z.ZodString>;
806
+ }, z.core.$strict>>>;
807
+ }, z.core.$strict>;
808
+ volatilePointers: z.ZodArray<z.ZodString>;
809
+ sensitivityWitness: z.ZodNullable<z.ZodObject<{
810
+ witnessId: z.ZodString;
811
+ channel: z.ZodEnum<{
812
+ argument: "argument";
813
+ body: "body";
814
+ environment: "environment";
815
+ option: "option";
816
+ path: "path";
817
+ query: "query";
818
+ stdin: "stdin";
819
+ }>;
820
+ legs: z.ZodArray<z.ZodObject<{
821
+ legId: z.ZodString;
822
+ inputs: z.ZodUnion<readonly [z.ZodObject<{
823
+ path: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
824
+ query: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
825
+ header: z.ZodRecord<z.ZodString, z.ZodString>;
826
+ body: z.ZodDiscriminatedUnion<[z.ZodObject<{
827
+ kind: z.ZodLiteral<"json">;
828
+ value: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
829
+ }, z.core.$strict>, z.ZodObject<{
830
+ kind: z.ZodLiteral<"absent">;
831
+ }, z.core.$strict>], "kind">;
832
+ }, z.core.$strict>, z.ZodObject<{
833
+ argument: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
834
+ option: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
835
+ environment: z.ZodRecord<z.ZodString, z.ZodString>;
836
+ stdin: z.ZodDiscriminatedUnion<[z.ZodObject<{
837
+ kind: z.ZodLiteral<"json">;
838
+ value: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
839
+ }, z.core.$strict>, z.ZodObject<{
840
+ kind: z.ZodLiteral<"text">;
841
+ value: z.ZodString;
842
+ }, z.core.$strict>, z.ZodObject<{
843
+ kind: z.ZodLiteral<"absent">;
844
+ }, z.core.$strict>], "kind">;
845
+ }, z.core.$strict>]>;
846
+ }, z.core.$strict>>;
847
+ relation: z.ZodType<import("./expression.ts").Expression, unknown, z.core.$ZodTypeInternals<import("./expression.ts").Expression, unknown>>;
848
+ }, z.core.$strict>>;
849
+ }, z.core.$strict>>;
850
+ }, z.core.$strict>, z.ZodObject<{
851
+ logicalId: z.ZodString;
852
+ kind: z.ZodLiteral<"mcp">;
853
+ operations: z.ZodArray<z.ZodObject<{
854
+ operationId: z.ZodString;
855
+ method: z.ZodEnum<{
856
+ DELETE: "DELETE";
857
+ GET: "GET";
858
+ HEAD: "HEAD";
859
+ OPTIONS: "OPTIONS";
860
+ PATCH: "PATCH";
861
+ POST: "POST";
862
+ PUT: "PUT";
863
+ }>;
864
+ pathTemplate: z.ZodString;
865
+ stateChangeMarker: z.ZodBoolean;
866
+ requestShape: z.ZodObject<{
867
+ path: z.ZodObject<{
868
+ requiredKeys: z.ZodArray<z.ZodString>;
869
+ permittedKeys: z.ZodArray<z.ZodString>;
870
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
871
+ array: "array";
872
+ boolean: "boolean";
873
+ null: "null";
874
+ number: "number";
875
+ object: "object";
876
+ string: "string";
877
+ }>>>;
878
+ }, z.core.$strict>;
879
+ query: z.ZodObject<{
880
+ requiredKeys: z.ZodArray<z.ZodString>;
881
+ permittedKeys: z.ZodArray<z.ZodString>;
882
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
883
+ array: "array";
884
+ boolean: "boolean";
885
+ null: "null";
886
+ number: "number";
887
+ object: "object";
888
+ string: "string";
889
+ }>>>;
890
+ }, z.core.$strict>;
891
+ header: z.ZodObject<{
892
+ requiredKeys: z.ZodArray<z.ZodString>;
893
+ permittedKeys: z.ZodArray<z.ZodString>;
894
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
895
+ array: "array";
896
+ boolean: "boolean";
897
+ null: "null";
898
+ number: "number";
899
+ object: "object";
900
+ string: "string";
901
+ }>>>;
902
+ }, z.core.$strict>;
903
+ body: z.ZodObject<{
904
+ requiredKeys: z.ZodArray<z.ZodString>;
905
+ permittedKeys: z.ZodArray<z.ZodString>;
906
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
907
+ array: "array";
908
+ boolean: "boolean";
909
+ null: "null";
910
+ number: "number";
911
+ object: "object";
912
+ string: "string";
913
+ }>>>;
914
+ }, z.core.$strict>;
915
+ }, z.core.$strict>;
916
+ responseDescriptor: z.ZodObject<{
917
+ requiredKeys: z.ZodArray<z.ZodString>;
918
+ permittedKeys: z.ZodArray<z.ZodString>;
919
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
920
+ array: "array";
921
+ boolean: "boolean";
922
+ null: "null";
923
+ number: "number";
924
+ object: "object";
925
+ string: "string";
926
+ }>>>;
927
+ successIndicator: z.ZodNullable<z.ZodString>;
928
+ channelRoles: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodEnum<{
929
+ collection: "collection";
930
+ diagnostic: "diagnostic";
931
+ payload: "payload";
932
+ "success-indicator": "success-indicator";
933
+ }>>>;
934
+ collectionLocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
935
+ pointer: z.ZodString;
936
+ expectedCardinality: z.ZodDiscriminatedUnion<[z.ZodObject<{
937
+ mode: z.ZodLiteral<"exact">;
938
+ count: z.ZodInt;
939
+ }, z.core.$strict>, z.ZodObject<{
940
+ mode: z.ZodLiteral<"at-most">;
941
+ max: z.ZodInt;
942
+ }, z.core.$strict>, z.ZodObject<{
943
+ mode: z.ZodLiteral<"page-bounded">;
944
+ max: z.ZodInt;
945
+ }, z.core.$strict>], "mode">;
946
+ referenceSet: z.ZodNullable<z.ZodString>;
947
+ }, z.core.$strict>>>;
948
+ }, z.core.$strict>;
949
+ volatilePointers: z.ZodArray<z.ZodString>;
950
+ sensitivityWitness: z.ZodNullable<z.ZodObject<{
951
+ witnessId: z.ZodString;
952
+ channel: z.ZodEnum<{
953
+ argument: "argument";
954
+ body: "body";
955
+ environment: "environment";
956
+ option: "option";
957
+ path: "path";
958
+ query: "query";
959
+ stdin: "stdin";
960
+ }>;
961
+ legs: z.ZodArray<z.ZodObject<{
962
+ legId: z.ZodString;
963
+ inputs: z.ZodUnion<readonly [z.ZodObject<{
964
+ path: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
965
+ query: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
966
+ header: z.ZodRecord<z.ZodString, z.ZodString>;
967
+ body: z.ZodDiscriminatedUnion<[z.ZodObject<{
968
+ kind: z.ZodLiteral<"json">;
969
+ value: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
970
+ }, z.core.$strict>, z.ZodObject<{
971
+ kind: z.ZodLiteral<"absent">;
972
+ }, z.core.$strict>], "kind">;
973
+ }, z.core.$strict>, z.ZodObject<{
974
+ argument: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
975
+ option: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
976
+ environment: z.ZodRecord<z.ZodString, z.ZodString>;
977
+ stdin: z.ZodDiscriminatedUnion<[z.ZodObject<{
978
+ kind: z.ZodLiteral<"json">;
979
+ value: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
980
+ }, z.core.$strict>, z.ZodObject<{
981
+ kind: z.ZodLiteral<"text">;
982
+ value: z.ZodString;
983
+ }, z.core.$strict>, z.ZodObject<{
984
+ kind: z.ZodLiteral<"absent">;
985
+ }, z.core.$strict>], "kind">;
986
+ }, z.core.$strict>]>;
987
+ }, z.core.$strict>>;
988
+ relation: z.ZodType<import("./expression.ts").Expression, unknown, z.core.$ZodTypeInternals<import("./expression.ts").Expression, unknown>>;
989
+ }, z.core.$strict>>;
990
+ }, z.core.$strict>>;
991
+ }, z.core.$strict>, z.ZodObject<{
992
+ logicalId: z.ZodString;
993
+ kind: z.ZodLiteral<"cli">;
994
+ operations: z.ZodArray<z.ZodObject<{
995
+ operationId: z.ZodString;
996
+ invocation: z.ZodObject<{
997
+ executable: z.ZodString;
998
+ subcommandPath: z.ZodArray<z.ZodString>;
999
+ }, z.core.$strict>;
1000
+ stateChangeMarker: z.ZodBoolean;
1001
+ requestShape: z.ZodObject<{
1002
+ argument: z.ZodObject<{
1003
+ requiredKeys: z.ZodArray<z.ZodString>;
1004
+ permittedKeys: z.ZodArray<z.ZodString>;
1005
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
1006
+ array: "array";
1007
+ boolean: "boolean";
1008
+ null: "null";
1009
+ number: "number";
1010
+ object: "object";
1011
+ string: "string";
1012
+ }>>>;
1013
+ }, z.core.$strict>;
1014
+ option: z.ZodObject<{
1015
+ requiredKeys: z.ZodArray<z.ZodString>;
1016
+ permittedKeys: z.ZodArray<z.ZodString>;
1017
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
1018
+ array: "array";
1019
+ boolean: "boolean";
1020
+ null: "null";
1021
+ number: "number";
1022
+ object: "object";
1023
+ string: "string";
1024
+ }>>>;
1025
+ }, z.core.$strict>;
1026
+ environment: z.ZodObject<{
1027
+ requiredKeys: z.ZodArray<z.ZodString>;
1028
+ permittedKeys: z.ZodArray<z.ZodString>;
1029
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
1030
+ array: "array";
1031
+ boolean: "boolean";
1032
+ null: "null";
1033
+ number: "number";
1034
+ object: "object";
1035
+ string: "string";
1036
+ }>>>;
1037
+ }, z.core.$strict>;
1038
+ stdin: z.ZodObject<{
1039
+ requiredKeys: z.ZodArray<z.ZodString>;
1040
+ permittedKeys: z.ZodArray<z.ZodString>;
1041
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
1042
+ array: "array";
1043
+ boolean: "boolean";
1044
+ null: "null";
1045
+ number: "number";
1046
+ object: "object";
1047
+ string: "string";
1048
+ }>>>;
1049
+ }, z.core.$strict>;
1050
+ }, z.core.$strict>;
1051
+ artifacts: z.ZodArray<z.ZodString>;
1052
+ descriptorChannel: z.ZodDiscriminatedUnion<[z.ZodObject<{
1053
+ kind: z.ZodLiteral<"stream">;
1054
+ channel: z.ZodEnum<{
1055
+ stderr: "stderr";
1056
+ stdout: "stdout";
1057
+ }>;
1058
+ }, z.core.$strict>, z.ZodObject<{
1059
+ kind: z.ZodLiteral<"artifact">;
1060
+ artifactId: z.ZodString;
1061
+ }, z.core.$strict>], "kind">;
1062
+ responseDescriptor: z.ZodObject<{
1063
+ requiredKeys: z.ZodArray<z.ZodString>;
1064
+ permittedKeys: z.ZodArray<z.ZodString>;
1065
+ types: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodEnum<{
1066
+ array: "array";
1067
+ boolean: "boolean";
1068
+ null: "null";
1069
+ number: "number";
1070
+ object: "object";
1071
+ string: "string";
1072
+ }>>>;
1073
+ successIndicator: z.ZodNullable<z.ZodString>;
1074
+ channelRoles: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodEnum<{
1075
+ collection: "collection";
1076
+ diagnostic: "diagnostic";
1077
+ payload: "payload";
1078
+ "success-indicator": "success-indicator";
1079
+ }>>>;
1080
+ collectionLocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
1081
+ pointer: z.ZodString;
1082
+ expectedCardinality: z.ZodDiscriminatedUnion<[z.ZodObject<{
1083
+ mode: z.ZodLiteral<"exact">;
1084
+ count: z.ZodInt;
1085
+ }, z.core.$strict>, z.ZodObject<{
1086
+ mode: z.ZodLiteral<"at-most">;
1087
+ max: z.ZodInt;
1088
+ }, z.core.$strict>, z.ZodObject<{
1089
+ mode: z.ZodLiteral<"page-bounded">;
1090
+ max: z.ZodInt;
1091
+ }, z.core.$strict>], "mode">;
1092
+ referenceSet: z.ZodNullable<z.ZodString>;
1093
+ }, z.core.$strict>>>;
1094
+ }, z.core.$strict>;
1095
+ volatilePointers: z.ZodArray<z.ZodString>;
1096
+ sensitivityWitness: z.ZodNullable<z.ZodObject<{
1097
+ witnessId: z.ZodString;
1098
+ channel: z.ZodEnum<{
1099
+ argument: "argument";
1100
+ body: "body";
1101
+ environment: "environment";
1102
+ option: "option";
1103
+ path: "path";
1104
+ query: "query";
1105
+ stdin: "stdin";
1106
+ }>;
1107
+ legs: z.ZodArray<z.ZodObject<{
1108
+ legId: z.ZodString;
1109
+ inputs: z.ZodUnion<readonly [z.ZodObject<{
1110
+ path: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
1111
+ query: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
1112
+ header: z.ZodRecord<z.ZodString, z.ZodString>;
1113
+ body: z.ZodDiscriminatedUnion<[z.ZodObject<{
1114
+ kind: z.ZodLiteral<"json">;
1115
+ value: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
1116
+ }, z.core.$strict>, z.ZodObject<{
1117
+ kind: z.ZodLiteral<"absent">;
1118
+ }, z.core.$strict>], "kind">;
1119
+ }, z.core.$strict>, z.ZodObject<{
1120
+ argument: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
1121
+ option: z.ZodType<import("./primitives.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonObject, unknown>>;
1122
+ environment: z.ZodRecord<z.ZodString, z.ZodString>;
1123
+ stdin: z.ZodDiscriminatedUnion<[z.ZodObject<{
1124
+ kind: z.ZodLiteral<"json">;
1125
+ value: z.ZodType<import("./primitives.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("./primitives.ts").JsonValue, unknown>>;
1126
+ }, z.core.$strict>, z.ZodObject<{
1127
+ kind: z.ZodLiteral<"text">;
1128
+ value: z.ZodString;
1129
+ }, z.core.$strict>, z.ZodObject<{
1130
+ kind: z.ZodLiteral<"absent">;
1131
+ }, z.core.$strict>], "kind">;
1132
+ }, z.core.$strict>]>;
1133
+ }, z.core.$strict>>;
1134
+ relation: z.ZodType<import("./expression.ts").Expression, unknown, z.core.$ZodTypeInternals<import("./expression.ts").Expression, unknown>>;
1135
+ }, z.core.$strict>>;
1136
+ }, z.core.$strict>>;
1137
+ }, z.core.$strict>], "kind">;
1138
+ export type PermittedInterface = z.infer<typeof PermittedInterface>;
1139
+ /**
1140
+ * One interface's operations widened to the element union. TypeScript will not
1141
+ * iterate `iface.operations` directly, because the union's branches give it a
1142
+ * union of array types whose `map` signatures do not unify; this is the one
1143
+ * place that widening is spelled, so no call site invents its own.
1144
+ */
1145
+ export declare const operationsOf: (iface: PermittedInterface) => readonly AnyOperation[];