devcontour-harness 0.1.0-alpha.34 → 0.1.0-alpha.37

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 +22 -2
  2. package/docs/contracts.md +309 -35
  3. package/docs/release-notes/0.1.0-alpha.35.md +27 -0
  4. package/docs/release-notes/0.1.0-alpha.36.md +26 -0
  5. package/docs/release-notes/0.1.0-alpha.37.md +40 -0
  6. package/docs/standalone.md +20 -0
  7. package/docs/toolchains.md +57 -2
  8. package/docs/upgrade.md +143 -0
  9. package/lib/agents/cli-adapter.d.ts +10 -1
  10. package/lib/agents/cli-adapter.js +38 -7
  11. package/lib/agents/schemas.d.ts +84 -2
  12. package/lib/agents/schemas.js +49 -1
  13. package/lib/agents/usage.d.ts +9 -0
  14. package/lib/agents/usage.js +22 -1
  15. package/lib/cli.js +149 -1
  16. package/lib/contracts/cli.d.ts +1544 -171
  17. package/lib/contracts/cli.js +233 -2
  18. package/lib/contracts/diagnosis.d.ts +10 -4
  19. package/lib/contracts/diagnosis.js +4 -0
  20. package/lib/contracts/errors.d.ts +9 -1
  21. package/lib/contracts/errors.js +8 -0
  22. package/lib/contracts/events.d.ts +468 -60
  23. package/lib/contracts/events.js +79 -0
  24. package/lib/contracts/execution.d.ts +301 -50
  25. package/lib/contracts/execution.js +60 -0
  26. package/lib/contracts/failure.d.ts +20 -3
  27. package/lib/contracts/failure.js +14 -2
  28. package/lib/contracts/handoff.d.ts +79 -20
  29. package/lib/contracts/handoff.js +42 -1
  30. package/lib/contracts/index.d.ts +1 -0
  31. package/lib/contracts/index.js +1 -0
  32. package/lib/contracts/input-state.d.ts +13 -0
  33. package/lib/contracts/input-state.js +32 -0
  34. package/lib/contracts/input.d.ts +442 -0
  35. package/lib/contracts/input.js +321 -0
  36. package/lib/contracts/planning.d.ts +4 -0
  37. package/lib/contracts/policy.d.ts +17 -2
  38. package/lib/contracts/policy.js +31 -2
  39. package/lib/contracts/ports.d.ts +64 -2
  40. package/lib/contracts/project.d.ts +127 -0
  41. package/lib/contracts/project.js +99 -0
  42. package/lib/contracts/published.d.ts +631 -92
  43. package/lib/contracts/published.js +4 -1
  44. package/lib/contracts/repair-policy.d.ts +30 -1
  45. package/lib/contracts/repair-policy.js +52 -0
  46. package/lib/contracts/report.d.ts +55 -21
  47. package/lib/contracts/report.js +33 -2
  48. package/lib/contracts/result.d.ts +28 -24
  49. package/lib/contracts/review.d.ts +47 -8
  50. package/lib/contracts/review.js +21 -1
  51. package/lib/control/harness.d.ts +2555 -51
  52. package/lib/control/harness.js +112 -6
  53. package/lib/control/recovery.d.ts +2 -2
  54. package/lib/control/report.js +1 -0
  55. package/lib/control/status.d.ts +30 -22
  56. package/lib/control/status.js +11 -1
  57. package/lib/control/workflow.d.ts +8 -8
  58. package/lib/engine/budget.d.ts +86 -3
  59. package/lib/engine/budget.js +45 -10
  60. package/lib/engine/classify.js +1 -1
  61. package/lib/engine/engine.d.ts +3091 -83
  62. package/lib/engine/engine.js +1209 -101
  63. package/lib/engine/failure.d.ts +1 -1
  64. package/lib/engine/failure.js +1 -1
  65. package/lib/engine/input-policy.d.ts +68 -0
  66. package/lib/engine/input-policy.js +285 -0
  67. package/lib/engine/input-requests.d.ts +64 -0
  68. package/lib/engine/input-requests.js +187 -0
  69. package/lib/engine/measured.d.ts +6 -1
  70. package/lib/engine/measured.js +12 -1
  71. package/lib/engine/prompt.d.ts +4 -2
  72. package/lib/engine/prompt.js +13 -1
  73. package/lib/engine/property-recovery.js +4 -0
  74. package/lib/engine/repair.d.ts +2 -0
  75. package/lib/engine/repair.js +13 -4
  76. package/lib/engine/reuse.js +2 -0
  77. package/lib/engine/runner.d.ts +33 -4
  78. package/lib/engine/runner.js +275 -23
  79. package/lib/environment/lifecycle.d.ts +8 -0
  80. package/lib/environment/lifecycle.js +15 -2
  81. package/lib/explain/state.d.ts +16 -2
  82. package/lib/explain/state.js +262 -79
  83. package/lib/handoff/markdown.js +10 -0
  84. package/lib/handoff/pack.js +42 -1
  85. package/lib/index.d.ts +11 -1
  86. package/lib/index.js +11 -1
  87. package/lib/init/inspect.d.ts +34 -0
  88. package/lib/init/inspect.js +292 -0
  89. package/lib/init/project.js +14 -31
  90. package/lib/integrations/connector/commands.d.ts +12 -12
  91. package/lib/integrations/connector/config.d.ts +4 -4
  92. package/lib/integrations/connector/delivery.d.ts +1 -1
  93. package/lib/integrations/relay-v2/protocol.d.ts +4 -4
  94. package/lib/profiles/resolve.d.ts +2 -1
  95. package/lib/projections/enums.d.ts +1 -1
  96. package/lib/projections/enums.js +4 -0
  97. package/lib/projections/index.d.ts +1 -0
  98. package/lib/projections/index.js +1 -0
  99. package/lib/projections/input.d.ts +17 -0
  100. package/lib/projections/input.js +28 -0
  101. package/lib/projections/stop.d.ts +42 -1
  102. package/lib/projections/stop.js +117 -6
  103. package/lib/report/compute.d.ts +4 -1
  104. package/lib/report/compute.js +26 -0
  105. package/lib/report/document.js +2 -1
  106. package/lib/storage/document.d.ts +68 -28
  107. package/lib/testing/index.d.ts +1 -1
  108. package/lib/testing/index.js +1 -1
  109. package/lib/testing/store-contract.d.ts +8 -1
  110. package/lib/testing/store-contract.js +194 -1
  111. package/lib/verification/confirm.d.ts +3 -3
  112. package/lib/verification/corpus.d.ts +9 -9
  113. package/lib/verification/gates.d.ts +119 -0
  114. package/lib/verification/gates.js +311 -4
  115. package/package.json +1 -1
  116. package/schemas/execution-document.schema.json +141 -0
  117. package/schemas/execution-policy.schema.json +26 -0
  118. package/schemas/handoff-pack.schema.json +155 -4
  119. package/schemas/input-request.schema.json +665 -0
  120. package/schemas/project-facts.schema.json +393 -0
  121. package/schemas/result-envelope.schema.json +2 -0
  122. package/schemas/run-event.schema.json +628 -0
  123. package/schemas/run-result.schema.json +2 -0
  124. package/schemas/stop-diagnosis.schema.json +7 -1
  125. package/schemas/value-report.schema.json +79 -7
@@ -51,8 +51,8 @@ export declare const eventPayloads: {
51
51
  }, z.core.$strict>;
52
52
  readonly 'graph.reviewed': z.ZodObject<{
53
53
  kind: z.ZodEnum<{
54
- plan: "plan";
55
54
  contract: "contract";
55
+ plan: "plan";
56
56
  }>;
57
57
  subject: z.ZodString;
58
58
  digest: z.ZodString;
@@ -63,8 +63,8 @@ export declare const eventPayloads: {
63
63
  readonly 'graph.approved': z.ZodObject<{
64
64
  digest: z.ZodString;
65
65
  actor: z.ZodEnum<{
66
- agent: "agent";
67
66
  operator: "operator";
67
+ agent: "agent";
68
68
  }>;
69
69
  }, z.core.$strict>;
70
70
  readonly 'work.ready': z.ZodObject<{
@@ -92,10 +92,10 @@ export declare const eventPayloads: {
92
92
  }, z.core.$strict>;
93
93
  readonly 'attempt.phase': z.ZodObject<{
94
94
  phase: z.ZodEnum<{
95
- ready: "ready";
96
- failed: "failed";
97
95
  cancelled: "cancelled";
98
96
  draft: "draft";
97
+ ready: "ready";
98
+ failed: "failed";
99
99
  running: "running";
100
100
  verifying: "verifying";
101
101
  reviewing: "reviewing";
@@ -180,8 +180,8 @@ export declare const eventPayloads: {
180
180
  activity: z.ZodOptional<z.ZodObject<{
181
181
  kind: z.ZodEnum<{
182
182
  gate: "gate";
183
- command: "command";
184
183
  agent: "agent";
184
+ command: "command";
185
185
  step: "step";
186
186
  }>;
187
187
  label: z.ZodString;
@@ -213,6 +213,7 @@ export declare const eventPayloads: {
213
213
  timeout: "timeout";
214
214
  "provider-auth": "provider-auth";
215
215
  stalled: "stalled";
216
+ "context-exhausted": "context-exhausted";
216
217
  "stale-base": "stale-base";
217
218
  "empty-result": "empty-result";
218
219
  unfinished: "unfinished";
@@ -221,6 +222,7 @@ export declare const eventPayloads: {
221
222
  merge: "merge";
222
223
  budget: "budget";
223
224
  "needs-lead": "needs-lead";
225
+ "needs-input": "needs-input";
224
226
  }>;
225
227
  message: z.ZodString;
226
228
  blocked: z.ZodBoolean;
@@ -240,6 +242,7 @@ export declare const eventPayloads: {
240
242
  timeout: "timeout";
241
243
  "provider-auth": "provider-auth";
242
244
  stalled: "stalled";
245
+ "context-exhausted": "context-exhausted";
243
246
  "stale-base": "stale-base";
244
247
  "empty-result": "empty-result";
245
248
  unfinished: "unfinished";
@@ -248,6 +251,7 @@ export declare const eventPayloads: {
248
251
  merge: "merge";
249
252
  budget: "budget";
250
253
  "needs-lead": "needs-lead";
254
+ "needs-input": "needs-input";
251
255
  }>;
252
256
  cause: z.ZodEnum<{
253
257
  preflight: "preflight";
@@ -290,8 +294,8 @@ export declare const eventPayloads: {
290
294
  readonly 'work.retried': z.ZodObject<{
291
295
  by: z.ZodEnum<{
292
296
  operator: "operator";
293
- recovery: "recovery";
294
297
  host: "host";
298
+ recovery: "recovery";
295
299
  }>;
296
300
  reset: z.ZodBoolean;
297
301
  spent: z.ZodOptional<z.ZodNumber>;
@@ -305,8 +309,8 @@ export declare const eventPayloads: {
305
309
  readonly 'work.cancelled': z.ZodObject<{
306
310
  by: z.ZodEnum<{
307
311
  operator: "operator";
308
- graph: "graph";
309
312
  host: "host";
313
+ graph: "graph";
310
314
  }>;
311
315
  hadAttempt: z.ZodBoolean;
312
316
  }, z.core.$strict>;
@@ -316,8 +320,8 @@ export declare const eventPayloads: {
316
320
  }, z.core.$strict>;
317
321
  readonly 'control.paused': z.ZodObject<{
318
322
  reason: z.ZodEnum<{
319
- runtime: "runtime";
320
323
  operator: "operator";
324
+ runtime: "runtime";
321
325
  shutdown: "shutdown";
322
326
  "base-check": "base-check";
323
327
  reconfigure: "reconfigure";
@@ -331,6 +335,7 @@ export declare const eventPayloads: {
331
335
  timeout: "timeout";
332
336
  "provider-auth": "provider-auth";
333
337
  stalled: "stalled";
338
+ "context-exhausted": "context-exhausted";
334
339
  "stale-base": "stale-base";
335
340
  "empty-result": "empty-result";
336
341
  unfinished: "unfinished";
@@ -339,12 +344,13 @@ export declare const eventPayloads: {
339
344
  merge: "merge";
340
345
  budget: "budget";
341
346
  "needs-lead": "needs-lead";
347
+ "needs-input": "needs-input";
342
348
  }>>>;
343
349
  }, z.core.$strict>;
344
350
  readonly 'control.resumed': z.ZodObject<{
345
351
  reason: z.ZodEnum<{
346
- runtime: "runtime";
347
352
  operator: "operator";
353
+ runtime: "runtime";
348
354
  shutdown: "shutdown";
349
355
  "base-check": "base-check";
350
356
  reconfigure: "reconfigure";
@@ -360,8 +366,8 @@ export declare const eventPayloads: {
360
366
  readonly 'base.moved': z.ZodObject<{
361
367
  by: z.ZodEnum<{
362
368
  operator: "operator";
363
- controller: "controller";
364
369
  host: "host";
370
+ controller: "controller";
365
371
  }>;
366
372
  }, z.core.$strict>;
367
373
  readonly 'controller.released': z.ZodObject<{
@@ -435,8 +441,8 @@ export declare const eventPayloads: {
435
441
  activity: z.ZodOptional<z.ZodObject<{
436
442
  kind: z.ZodEnum<{
437
443
  gate: "gate";
438
- command: "command";
439
444
  agent: "agent";
445
+ command: "command";
440
446
  step: "step";
441
447
  }>;
442
448
  label: z.ZodString;
@@ -487,6 +493,104 @@ export declare const eventPayloads: {
487
493
  }>;
488
494
  error: z.ZodOptional<z.ZodString>;
489
495
  }, z.core.$strict>;
496
+ /**
497
+ * Исполнитель остановился с вопросом или controller записал неблокирующий
498
+ * запрос (follow-up, отклонённый вопрос): только ID, вид, серьёзность,
499
+ * минимумы и digests — текста вопроса в журнале нет.
500
+ */
501
+ readonly 'input.requested': z.ZodObject<{
502
+ requestId: z.ZodString;
503
+ kind: z.ZodEnum<{
504
+ question: "question";
505
+ "follow-up": "follow-up";
506
+ }>;
507
+ blocking: z.ZodBoolean;
508
+ lifecycle: z.ZodEnum<{
509
+ pending: "pending";
510
+ cancelled: "cancelled";
511
+ }>;
512
+ effectiveSeverity: z.ZodNumber;
513
+ floors: z.ZodArray<z.ZodEnum<{
514
+ declared: "declared";
515
+ "critical-path": "critical-path";
516
+ }>>;
517
+ criticalHits: z.ZodNumber;
518
+ questionDigest: z.ZodString;
519
+ draftDigest: z.ZodNullable<z.ZodString>;
520
+ }, z.core.$strict>;
521
+ /** Записан ответ (новая версия): digest и вид, без текста. */
522
+ readonly 'input.answered': z.ZodObject<{
523
+ requestId: z.ZodString;
524
+ revision: z.ZodNumber;
525
+ answerDigest: z.ZodString;
526
+ kind: z.ZodEnum<{
527
+ clarification: "clarification";
528
+ "requirement-change": "requirement-change";
529
+ }>;
530
+ actor: z.ZodEnum<{
531
+ operator: "operator";
532
+ lead: "lead";
533
+ host: "host";
534
+ }>;
535
+ }, z.core.$strict>;
536
+ /**
537
+ * Ответ применён: основание продолжения активировано, поручение
538
+ * возвращено в очередь (`retried`) — одной транзакцией, без вызова модели.
539
+ */
540
+ readonly 'input.applied': z.ZodObject<{
541
+ requestId: z.ZodString;
542
+ answerDigest: z.ZodString;
543
+ targetDigest: z.ZodString;
544
+ contextDigest: z.ZodNullable<z.ZodString>;
545
+ retried: z.ZodBoolean;
546
+ }, z.core.$strict>;
547
+ /** Запрос закрыт без продолжения: отменён или заменён преемником. */
548
+ readonly 'input.closed': z.ZodObject<{
549
+ requestId: z.ZodString;
550
+ lifecycle: z.ZodEnum<{
551
+ cancelled: "cancelled";
552
+ superseded: "superseded";
553
+ }>;
554
+ by: z.ZodEnum<{
555
+ operator: "operator";
556
+ lead: "lead";
557
+ host: "host";
558
+ controller: "controller";
559
+ }>;
560
+ successor: z.ZodOptional<z.ZodString>;
561
+ }, z.core.$strict>;
562
+ /**
563
+ * Применённое основание устарело до выдачи (claim): запрос снова
564
+ * `answered`, работа ждёт нового применения; без текста.
565
+ */
566
+ readonly 'input.stale': z.ZodObject<{
567
+ requestId: z.ZodString;
568
+ targetDigest: z.ZodString;
569
+ reason: z.ZodEnum<{
570
+ context: "context";
571
+ graph: "graph";
572
+ order: "order";
573
+ policy: "policy";
574
+ }>;
575
+ }, z.core.$strict>;
576
+ /** Ответ передан исполнителю: начался вызов runtime попытки с этим ответом. */
577
+ readonly 'input.delivered': z.ZodObject<{
578
+ requestId: z.ZodString;
579
+ answerDigest: z.ZodString;
580
+ callId: z.ZodString;
581
+ }, z.core.$strict>;
582
+ /**
583
+ * Развилки, решённые исполнителем: только число, наибольшая действующая
584
+ * серьёзность, число сработавших минимумов и неблокирующих запросов,
585
+ * digest списка — текста допущений в журнале нет.
586
+ */
587
+ readonly 'attempt.assumptions': z.ZodObject<{
588
+ count: z.ZodNumber;
589
+ maxSeverity: z.ZodNumber;
590
+ floors: z.ZodNumber;
591
+ followUps: z.ZodNumber;
592
+ digest: z.ZodString;
593
+ }, z.core.$strict>;
490
594
  readonly 'delivery.pending': z.ZodObject<{
491
595
  sink: z.ZodString;
492
596
  key: z.ZodString;
@@ -550,7 +654,7 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
550
654
  workId: z.ZodOptional<z.ZodString>;
551
655
  runId: z.ZodOptional<z.ZodString>;
552
656
  attempt: z.ZodOptional<z.ZodNumber>;
553
- type: z.ZodLiteral<"graph.registered" | "graph.reviewed" | "graph.approved" | "work.ready" | "work.held" | "attempt.claimed" | "attempt.phase" | "attempt.gate" | "attempt.review" | "attempt.stage" | "attempt.liveness" | "attempt.failed" | "attempt.diagnosed" | "attempt.expired" | "attempt.cancelled" | "attempt.recovered" | "work.accepted" | "work.retried" | "work.cancelled" | "work.blocked" | "control.paused" | "control.resumed" | "controller.acquired" | "base.moved" | "controller.released" | "budget.blocked" | "corpus.adopted" | "work.recovery" | "joint.started" | "joint.liveness" | "joint.finished" | "policy.applied" | "policy.reconfigure" | "delivery.pending" | "delivery.delivered" | "delivery.failed" | "delivery.conflict" | "delivery.uncertain">;
657
+ type: z.ZodLiteral<"graph.registered" | "graph.reviewed" | "graph.approved" | "work.ready" | "work.held" | "attempt.claimed" | "attempt.phase" | "attempt.gate" | "attempt.review" | "attempt.stage" | "attempt.liveness" | "attempt.failed" | "attempt.diagnosed" | "attempt.expired" | "attempt.cancelled" | "attempt.recovered" | "work.accepted" | "work.retried" | "work.cancelled" | "work.blocked" | "control.paused" | "control.resumed" | "controller.acquired" | "base.moved" | "controller.released" | "budget.blocked" | "corpus.adopted" | "work.recovery" | "joint.started" | "joint.liveness" | "joint.finished" | "policy.applied" | "policy.reconfigure" | "input.requested" | "input.answered" | "input.applied" | "input.closed" | "input.stale" | "input.delivered" | "attempt.assumptions" | "delivery.pending" | "delivery.delivered" | "delivery.failed" | "delivery.conflict" | "delivery.uncertain">;
554
658
  payload: z.ZodObject<{
555
659
  digest: z.ZodString;
556
660
  orders: z.ZodNumber;
@@ -561,8 +665,8 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
561
665
  }, z.core.$strict>;
562
666
  }, z.core.$strict> | z.ZodObject<{
563
667
  kind: z.ZodEnum<{
564
- plan: "plan";
565
668
  contract: "contract";
669
+ plan: "plan";
566
670
  }>;
567
671
  subject: z.ZodString;
568
672
  digest: z.ZodString;
@@ -572,8 +676,8 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
572
676
  }, z.core.$strict> | z.ZodObject<{
573
677
  digest: z.ZodString;
574
678
  actor: z.ZodEnum<{
575
- agent: "agent";
576
679
  operator: "operator";
680
+ agent: "agent";
577
681
  }>;
578
682
  }, z.core.$strict> | z.ZodObject<{
579
683
  orderDigest: z.ZodString;
@@ -597,10 +701,10 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
597
701
  engineVersion: z.ZodString;
598
702
  }, z.core.$strict> | z.ZodObject<{
599
703
  phase: z.ZodEnum<{
600
- ready: "ready";
601
- failed: "failed";
602
704
  cancelled: "cancelled";
603
705
  draft: "draft";
706
+ ready: "ready";
707
+ failed: "failed";
604
708
  running: "running";
605
709
  verifying: "verifying";
606
710
  reviewing: "reviewing";
@@ -669,8 +773,8 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
669
773
  activity: z.ZodOptional<z.ZodObject<{
670
774
  kind: z.ZodEnum<{
671
775
  gate: "gate";
672
- command: "command";
673
776
  agent: "agent";
777
+ command: "command";
674
778
  step: "step";
675
779
  }>;
676
780
  label: z.ZodString;
@@ -701,6 +805,7 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
701
805
  timeout: "timeout";
702
806
  "provider-auth": "provider-auth";
703
807
  stalled: "stalled";
808
+ "context-exhausted": "context-exhausted";
704
809
  "stale-base": "stale-base";
705
810
  "empty-result": "empty-result";
706
811
  unfinished: "unfinished";
@@ -709,6 +814,7 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
709
814
  merge: "merge";
710
815
  budget: "budget";
711
816
  "needs-lead": "needs-lead";
817
+ "needs-input": "needs-input";
712
818
  }>;
713
819
  message: z.ZodString;
714
820
  blocked: z.ZodBoolean;
@@ -722,6 +828,7 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
722
828
  timeout: "timeout";
723
829
  "provider-auth": "provider-auth";
724
830
  stalled: "stalled";
831
+ "context-exhausted": "context-exhausted";
725
832
  "stale-base": "stale-base";
726
833
  "empty-result": "empty-result";
727
834
  unfinished: "unfinished";
@@ -730,6 +837,7 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
730
837
  merge: "merge";
731
838
  budget: "budget";
732
839
  "needs-lead": "needs-lead";
840
+ "needs-input": "needs-input";
733
841
  }>;
734
842
  cause: z.ZodEnum<{
735
843
  preflight: "preflight";
@@ -762,8 +870,8 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
762
870
  }, z.core.$strict> | z.ZodObject<{
763
871
  by: z.ZodEnum<{
764
872
  operator: "operator";
765
- recovery: "recovery";
766
873
  host: "host";
874
+ recovery: "recovery";
767
875
  }>;
768
876
  reset: z.ZodBoolean;
769
877
  spent: z.ZodOptional<z.ZodNumber>;
@@ -771,8 +879,8 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
771
879
  }, z.core.$strict> | z.ZodObject<{
772
880
  by: z.ZodEnum<{
773
881
  operator: "operator";
774
- graph: "graph";
775
882
  host: "host";
883
+ graph: "graph";
776
884
  }>;
777
885
  hadAttempt: z.ZodBoolean;
778
886
  }, z.core.$strict> | z.ZodObject<{
@@ -780,8 +888,8 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
780
888
  message: z.ZodString;
781
889
  }, z.core.$strict> | z.ZodObject<{
782
890
  reason: z.ZodEnum<{
783
- runtime: "runtime";
784
891
  operator: "operator";
892
+ runtime: "runtime";
785
893
  shutdown: "shutdown";
786
894
  "base-check": "base-check";
787
895
  reconfigure: "reconfigure";
@@ -795,6 +903,7 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
795
903
  timeout: "timeout";
796
904
  "provider-auth": "provider-auth";
797
905
  stalled: "stalled";
906
+ "context-exhausted": "context-exhausted";
798
907
  "stale-base": "stale-base";
799
908
  "empty-result": "empty-result";
800
909
  unfinished: "unfinished";
@@ -803,11 +912,12 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
803
912
  merge: "merge";
804
913
  budget: "budget";
805
914
  "needs-lead": "needs-lead";
915
+ "needs-input": "needs-input";
806
916
  }>>>;
807
917
  }, z.core.$strict> | z.ZodObject<{
808
918
  reason: z.ZodEnum<{
809
- runtime: "runtime";
810
919
  operator: "operator";
920
+ runtime: "runtime";
811
921
  shutdown: "shutdown";
812
922
  "base-check": "base-check";
813
923
  reconfigure: "reconfigure";
@@ -817,8 +927,8 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
817
927
  }, z.core.$strict> | z.ZodObject<{
818
928
  by: z.ZodEnum<{
819
929
  operator: "operator";
820
- controller: "controller";
821
930
  host: "host";
931
+ controller: "controller";
822
932
  }>;
823
933
  }, z.core.$strict> | z.ZodObject<{
824
934
  owner: z.ZodString;
@@ -878,8 +988,8 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
878
988
  activity: z.ZodOptional<z.ZodObject<{
879
989
  kind: z.ZodEnum<{
880
990
  gate: "gate";
881
- command: "command";
882
991
  agent: "agent";
992
+ command: "command";
883
993
  step: "step";
884
994
  }>;
885
995
  label: z.ZodString;
@@ -923,6 +1033,76 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
923
1033
  cleared: "cleared";
924
1034
  }>;
925
1035
  error: z.ZodOptional<z.ZodString>;
1036
+ }, z.core.$strict> | z.ZodObject<{
1037
+ requestId: z.ZodString;
1038
+ kind: z.ZodEnum<{
1039
+ question: "question";
1040
+ "follow-up": "follow-up";
1041
+ }>;
1042
+ blocking: z.ZodBoolean;
1043
+ lifecycle: z.ZodEnum<{
1044
+ pending: "pending";
1045
+ cancelled: "cancelled";
1046
+ }>;
1047
+ effectiveSeverity: z.ZodNumber;
1048
+ floors: z.ZodArray<z.ZodEnum<{
1049
+ declared: "declared";
1050
+ "critical-path": "critical-path";
1051
+ }>>;
1052
+ criticalHits: z.ZodNumber;
1053
+ questionDigest: z.ZodString;
1054
+ draftDigest: z.ZodNullable<z.ZodString>;
1055
+ }, z.core.$strict> | z.ZodObject<{
1056
+ requestId: z.ZodString;
1057
+ revision: z.ZodNumber;
1058
+ answerDigest: z.ZodString;
1059
+ kind: z.ZodEnum<{
1060
+ clarification: "clarification";
1061
+ "requirement-change": "requirement-change";
1062
+ }>;
1063
+ actor: z.ZodEnum<{
1064
+ operator: "operator";
1065
+ lead: "lead";
1066
+ host: "host";
1067
+ }>;
1068
+ }, z.core.$strict> | z.ZodObject<{
1069
+ requestId: z.ZodString;
1070
+ answerDigest: z.ZodString;
1071
+ targetDigest: z.ZodString;
1072
+ contextDigest: z.ZodNullable<z.ZodString>;
1073
+ retried: z.ZodBoolean;
1074
+ }, z.core.$strict> | z.ZodObject<{
1075
+ requestId: z.ZodString;
1076
+ lifecycle: z.ZodEnum<{
1077
+ cancelled: "cancelled";
1078
+ superseded: "superseded";
1079
+ }>;
1080
+ by: z.ZodEnum<{
1081
+ operator: "operator";
1082
+ lead: "lead";
1083
+ host: "host";
1084
+ controller: "controller";
1085
+ }>;
1086
+ successor: z.ZodOptional<z.ZodString>;
1087
+ }, z.core.$strict> | z.ZodObject<{
1088
+ requestId: z.ZodString;
1089
+ targetDigest: z.ZodString;
1090
+ reason: z.ZodEnum<{
1091
+ context: "context";
1092
+ graph: "graph";
1093
+ order: "order";
1094
+ policy: "policy";
1095
+ }>;
1096
+ }, z.core.$strict> | z.ZodObject<{
1097
+ requestId: z.ZodString;
1098
+ answerDigest: z.ZodString;
1099
+ callId: z.ZodString;
1100
+ }, z.core.$strict> | z.ZodObject<{
1101
+ count: z.ZodNumber;
1102
+ maxSeverity: z.ZodNumber;
1103
+ floors: z.ZodNumber;
1104
+ followUps: z.ZodNumber;
1105
+ digest: z.ZodString;
926
1106
  }, z.core.$strict> | z.ZodObject<{
927
1107
  sink: z.ZodString;
928
1108
  key: z.ZodString;
@@ -962,7 +1142,7 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
962
1142
  workId: z.ZodOptional<z.ZodString>;
963
1143
  runId: z.ZodOptional<z.ZodString>;
964
1144
  attempt: z.ZodOptional<z.ZodNumber>;
965
- type: z.ZodLiteral<"graph.registered" | "graph.reviewed" | "graph.approved" | "work.ready" | "work.held" | "attempt.claimed" | "attempt.phase" | "attempt.gate" | "attempt.review" | "attempt.stage" | "attempt.liveness" | "attempt.failed" | "attempt.diagnosed" | "attempt.expired" | "attempt.cancelled" | "attempt.recovered" | "work.accepted" | "work.retried" | "work.cancelled" | "work.blocked" | "control.paused" | "control.resumed" | "controller.acquired" | "base.moved" | "controller.released" | "budget.blocked" | "corpus.adopted" | "work.recovery" | "joint.started" | "joint.liveness" | "joint.finished" | "policy.applied" | "policy.reconfigure" | "delivery.pending" | "delivery.delivered" | "delivery.failed" | "delivery.conflict" | "delivery.uncertain">;
1145
+ type: z.ZodLiteral<"graph.registered" | "graph.reviewed" | "graph.approved" | "work.ready" | "work.held" | "attempt.claimed" | "attempt.phase" | "attempt.gate" | "attempt.review" | "attempt.stage" | "attempt.liveness" | "attempt.failed" | "attempt.diagnosed" | "attempt.expired" | "attempt.cancelled" | "attempt.recovered" | "work.accepted" | "work.retried" | "work.cancelled" | "work.blocked" | "control.paused" | "control.resumed" | "controller.acquired" | "base.moved" | "controller.released" | "budget.blocked" | "corpus.adopted" | "work.recovery" | "joint.started" | "joint.liveness" | "joint.finished" | "policy.applied" | "policy.reconfigure" | "input.requested" | "input.answered" | "input.applied" | "input.closed" | "input.stale" | "input.delivered" | "attempt.assumptions" | "delivery.pending" | "delivery.delivered" | "delivery.failed" | "delivery.conflict" | "delivery.uncertain">;
966
1146
  payload: z.ZodObject<{
967
1147
  digest: z.ZodString;
968
1148
  orders: z.ZodNumber;
@@ -973,8 +1153,8 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
973
1153
  }, z.core.$strict>;
974
1154
  }, z.core.$strict> | z.ZodObject<{
975
1155
  kind: z.ZodEnum<{
976
- plan: "plan";
977
1156
  contract: "contract";
1157
+ plan: "plan";
978
1158
  }>;
979
1159
  subject: z.ZodString;
980
1160
  digest: z.ZodString;
@@ -984,8 +1164,8 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
984
1164
  }, z.core.$strict> | z.ZodObject<{
985
1165
  digest: z.ZodString;
986
1166
  actor: z.ZodEnum<{
987
- agent: "agent";
988
1167
  operator: "operator";
1168
+ agent: "agent";
989
1169
  }>;
990
1170
  }, z.core.$strict> | z.ZodObject<{
991
1171
  orderDigest: z.ZodString;
@@ -1009,10 +1189,10 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1009
1189
  engineVersion: z.ZodString;
1010
1190
  }, z.core.$strict> | z.ZodObject<{
1011
1191
  phase: z.ZodEnum<{
1012
- ready: "ready";
1013
- failed: "failed";
1014
1192
  cancelled: "cancelled";
1015
1193
  draft: "draft";
1194
+ ready: "ready";
1195
+ failed: "failed";
1016
1196
  running: "running";
1017
1197
  verifying: "verifying";
1018
1198
  reviewing: "reviewing";
@@ -1081,8 +1261,8 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1081
1261
  activity: z.ZodOptional<z.ZodObject<{
1082
1262
  kind: z.ZodEnum<{
1083
1263
  gate: "gate";
1084
- command: "command";
1085
1264
  agent: "agent";
1265
+ command: "command";
1086
1266
  step: "step";
1087
1267
  }>;
1088
1268
  label: z.ZodString;
@@ -1113,6 +1293,7 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1113
1293
  timeout: "timeout";
1114
1294
  "provider-auth": "provider-auth";
1115
1295
  stalled: "stalled";
1296
+ "context-exhausted": "context-exhausted";
1116
1297
  "stale-base": "stale-base";
1117
1298
  "empty-result": "empty-result";
1118
1299
  unfinished: "unfinished";
@@ -1121,6 +1302,7 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1121
1302
  merge: "merge";
1122
1303
  budget: "budget";
1123
1304
  "needs-lead": "needs-lead";
1305
+ "needs-input": "needs-input";
1124
1306
  }>;
1125
1307
  message: z.ZodString;
1126
1308
  blocked: z.ZodBoolean;
@@ -1134,6 +1316,7 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1134
1316
  timeout: "timeout";
1135
1317
  "provider-auth": "provider-auth";
1136
1318
  stalled: "stalled";
1319
+ "context-exhausted": "context-exhausted";
1137
1320
  "stale-base": "stale-base";
1138
1321
  "empty-result": "empty-result";
1139
1322
  unfinished: "unfinished";
@@ -1142,6 +1325,7 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1142
1325
  merge: "merge";
1143
1326
  budget: "budget";
1144
1327
  "needs-lead": "needs-lead";
1328
+ "needs-input": "needs-input";
1145
1329
  }>;
1146
1330
  cause: z.ZodEnum<{
1147
1331
  preflight: "preflight";
@@ -1174,8 +1358,8 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1174
1358
  }, z.core.$strict> | z.ZodObject<{
1175
1359
  by: z.ZodEnum<{
1176
1360
  operator: "operator";
1177
- recovery: "recovery";
1178
1361
  host: "host";
1362
+ recovery: "recovery";
1179
1363
  }>;
1180
1364
  reset: z.ZodBoolean;
1181
1365
  spent: z.ZodOptional<z.ZodNumber>;
@@ -1183,8 +1367,8 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1183
1367
  }, z.core.$strict> | z.ZodObject<{
1184
1368
  by: z.ZodEnum<{
1185
1369
  operator: "operator";
1186
- graph: "graph";
1187
1370
  host: "host";
1371
+ graph: "graph";
1188
1372
  }>;
1189
1373
  hadAttempt: z.ZodBoolean;
1190
1374
  }, z.core.$strict> | z.ZodObject<{
@@ -1192,8 +1376,8 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1192
1376
  message: z.ZodString;
1193
1377
  }, z.core.$strict> | z.ZodObject<{
1194
1378
  reason: z.ZodEnum<{
1195
- runtime: "runtime";
1196
1379
  operator: "operator";
1380
+ runtime: "runtime";
1197
1381
  shutdown: "shutdown";
1198
1382
  "base-check": "base-check";
1199
1383
  reconfigure: "reconfigure";
@@ -1207,6 +1391,7 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1207
1391
  timeout: "timeout";
1208
1392
  "provider-auth": "provider-auth";
1209
1393
  stalled: "stalled";
1394
+ "context-exhausted": "context-exhausted";
1210
1395
  "stale-base": "stale-base";
1211
1396
  "empty-result": "empty-result";
1212
1397
  unfinished: "unfinished";
@@ -1215,11 +1400,12 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1215
1400
  merge: "merge";
1216
1401
  budget: "budget";
1217
1402
  "needs-lead": "needs-lead";
1403
+ "needs-input": "needs-input";
1218
1404
  }>>>;
1219
1405
  }, z.core.$strict> | z.ZodObject<{
1220
1406
  reason: z.ZodEnum<{
1221
- runtime: "runtime";
1222
1407
  operator: "operator";
1408
+ runtime: "runtime";
1223
1409
  shutdown: "shutdown";
1224
1410
  "base-check": "base-check";
1225
1411
  reconfigure: "reconfigure";
@@ -1229,8 +1415,8 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1229
1415
  }, z.core.$strict> | z.ZodObject<{
1230
1416
  by: z.ZodEnum<{
1231
1417
  operator: "operator";
1232
- controller: "controller";
1233
1418
  host: "host";
1419
+ controller: "controller";
1234
1420
  }>;
1235
1421
  }, z.core.$strict> | z.ZodObject<{
1236
1422
  owner: z.ZodString;
@@ -1290,8 +1476,8 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1290
1476
  activity: z.ZodOptional<z.ZodObject<{
1291
1477
  kind: z.ZodEnum<{
1292
1478
  gate: "gate";
1293
- command: "command";
1294
1479
  agent: "agent";
1480
+ command: "command";
1295
1481
  step: "step";
1296
1482
  }>;
1297
1483
  label: z.ZodString;
@@ -1335,6 +1521,76 @@ export declare const runEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1335
1521
  cleared: "cleared";
1336
1522
  }>;
1337
1523
  error: z.ZodOptional<z.ZodString>;
1524
+ }, z.core.$strict> | z.ZodObject<{
1525
+ requestId: z.ZodString;
1526
+ kind: z.ZodEnum<{
1527
+ question: "question";
1528
+ "follow-up": "follow-up";
1529
+ }>;
1530
+ blocking: z.ZodBoolean;
1531
+ lifecycle: z.ZodEnum<{
1532
+ pending: "pending";
1533
+ cancelled: "cancelled";
1534
+ }>;
1535
+ effectiveSeverity: z.ZodNumber;
1536
+ floors: z.ZodArray<z.ZodEnum<{
1537
+ declared: "declared";
1538
+ "critical-path": "critical-path";
1539
+ }>>;
1540
+ criticalHits: z.ZodNumber;
1541
+ questionDigest: z.ZodString;
1542
+ draftDigest: z.ZodNullable<z.ZodString>;
1543
+ }, z.core.$strict> | z.ZodObject<{
1544
+ requestId: z.ZodString;
1545
+ revision: z.ZodNumber;
1546
+ answerDigest: z.ZodString;
1547
+ kind: z.ZodEnum<{
1548
+ clarification: "clarification";
1549
+ "requirement-change": "requirement-change";
1550
+ }>;
1551
+ actor: z.ZodEnum<{
1552
+ operator: "operator";
1553
+ lead: "lead";
1554
+ host: "host";
1555
+ }>;
1556
+ }, z.core.$strict> | z.ZodObject<{
1557
+ requestId: z.ZodString;
1558
+ answerDigest: z.ZodString;
1559
+ targetDigest: z.ZodString;
1560
+ contextDigest: z.ZodNullable<z.ZodString>;
1561
+ retried: z.ZodBoolean;
1562
+ }, z.core.$strict> | z.ZodObject<{
1563
+ requestId: z.ZodString;
1564
+ lifecycle: z.ZodEnum<{
1565
+ cancelled: "cancelled";
1566
+ superseded: "superseded";
1567
+ }>;
1568
+ by: z.ZodEnum<{
1569
+ operator: "operator";
1570
+ lead: "lead";
1571
+ host: "host";
1572
+ controller: "controller";
1573
+ }>;
1574
+ successor: z.ZodOptional<z.ZodString>;
1575
+ }, z.core.$strict> | z.ZodObject<{
1576
+ requestId: z.ZodString;
1577
+ targetDigest: z.ZodString;
1578
+ reason: z.ZodEnum<{
1579
+ context: "context";
1580
+ graph: "graph";
1581
+ order: "order";
1582
+ policy: "policy";
1583
+ }>;
1584
+ }, z.core.$strict> | z.ZodObject<{
1585
+ requestId: z.ZodString;
1586
+ answerDigest: z.ZodString;
1587
+ callId: z.ZodString;
1588
+ }, z.core.$strict> | z.ZodObject<{
1589
+ count: z.ZodNumber;
1590
+ maxSeverity: z.ZodNumber;
1591
+ floors: z.ZodNumber;
1592
+ followUps: z.ZodNumber;
1593
+ digest: z.ZodString;
1338
1594
  }, z.core.$strict> | z.ZodObject<{
1339
1595
  sink: z.ZodString;
1340
1596
  key: z.ZodString;
@@ -1404,7 +1660,7 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1404
1660
  workId: z.ZodOptional<z.ZodString>;
1405
1661
  runId: z.ZodOptional<z.ZodString>;
1406
1662
  attempt: z.ZodOptional<z.ZodNumber>;
1407
- type: z.ZodLiteral<"graph.registered" | "graph.reviewed" | "graph.approved" | "work.ready" | "work.held" | "attempt.claimed" | "attempt.phase" | "attempt.gate" | "attempt.review" | "attempt.stage" | "attempt.liveness" | "attempt.failed" | "attempt.diagnosed" | "attempt.expired" | "attempt.cancelled" | "attempt.recovered" | "work.accepted" | "work.retried" | "work.cancelled" | "work.blocked" | "control.paused" | "control.resumed" | "controller.acquired" | "base.moved" | "controller.released" | "budget.blocked" | "corpus.adopted" | "work.recovery" | "joint.started" | "joint.liveness" | "joint.finished" | "policy.applied" | "policy.reconfigure" | "delivery.pending" | "delivery.delivered" | "delivery.failed" | "delivery.conflict" | "delivery.uncertain">;
1663
+ type: z.ZodLiteral<"graph.registered" | "graph.reviewed" | "graph.approved" | "work.ready" | "work.held" | "attempt.claimed" | "attempt.phase" | "attempt.gate" | "attempt.review" | "attempt.stage" | "attempt.liveness" | "attempt.failed" | "attempt.diagnosed" | "attempt.expired" | "attempt.cancelled" | "attempt.recovered" | "work.accepted" | "work.retried" | "work.cancelled" | "work.blocked" | "control.paused" | "control.resumed" | "controller.acquired" | "base.moved" | "controller.released" | "budget.blocked" | "corpus.adopted" | "work.recovery" | "joint.started" | "joint.liveness" | "joint.finished" | "policy.applied" | "policy.reconfigure" | "input.requested" | "input.answered" | "input.applied" | "input.closed" | "input.stale" | "input.delivered" | "attempt.assumptions" | "delivery.pending" | "delivery.delivered" | "delivery.failed" | "delivery.conflict" | "delivery.uncertain">;
1408
1664
  payload: z.ZodObject<{
1409
1665
  digest: z.ZodString;
1410
1666
  orders: z.ZodNumber;
@@ -1415,8 +1671,8 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1415
1671
  }, z.core.$strict>;
1416
1672
  }, z.core.$strict> | z.ZodObject<{
1417
1673
  kind: z.ZodEnum<{
1418
- plan: "plan";
1419
1674
  contract: "contract";
1675
+ plan: "plan";
1420
1676
  }>;
1421
1677
  subject: z.ZodString;
1422
1678
  digest: z.ZodString;
@@ -1426,8 +1682,8 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1426
1682
  }, z.core.$strict> | z.ZodObject<{
1427
1683
  digest: z.ZodString;
1428
1684
  actor: z.ZodEnum<{
1429
- agent: "agent";
1430
1685
  operator: "operator";
1686
+ agent: "agent";
1431
1687
  }>;
1432
1688
  }, z.core.$strict> | z.ZodObject<{
1433
1689
  orderDigest: z.ZodString;
@@ -1451,10 +1707,10 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1451
1707
  engineVersion: z.ZodString;
1452
1708
  }, z.core.$strict> | z.ZodObject<{
1453
1709
  phase: z.ZodEnum<{
1454
- ready: "ready";
1455
- failed: "failed";
1456
1710
  cancelled: "cancelled";
1457
1711
  draft: "draft";
1712
+ ready: "ready";
1713
+ failed: "failed";
1458
1714
  running: "running";
1459
1715
  verifying: "verifying";
1460
1716
  reviewing: "reviewing";
@@ -1523,8 +1779,8 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1523
1779
  activity: z.ZodOptional<z.ZodObject<{
1524
1780
  kind: z.ZodEnum<{
1525
1781
  gate: "gate";
1526
- command: "command";
1527
1782
  agent: "agent";
1783
+ command: "command";
1528
1784
  step: "step";
1529
1785
  }>;
1530
1786
  label: z.ZodString;
@@ -1555,6 +1811,7 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1555
1811
  timeout: "timeout";
1556
1812
  "provider-auth": "provider-auth";
1557
1813
  stalled: "stalled";
1814
+ "context-exhausted": "context-exhausted";
1558
1815
  "stale-base": "stale-base";
1559
1816
  "empty-result": "empty-result";
1560
1817
  unfinished: "unfinished";
@@ -1563,6 +1820,7 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1563
1820
  merge: "merge";
1564
1821
  budget: "budget";
1565
1822
  "needs-lead": "needs-lead";
1823
+ "needs-input": "needs-input";
1566
1824
  }>;
1567
1825
  message: z.ZodString;
1568
1826
  blocked: z.ZodBoolean;
@@ -1576,6 +1834,7 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1576
1834
  timeout: "timeout";
1577
1835
  "provider-auth": "provider-auth";
1578
1836
  stalled: "stalled";
1837
+ "context-exhausted": "context-exhausted";
1579
1838
  "stale-base": "stale-base";
1580
1839
  "empty-result": "empty-result";
1581
1840
  unfinished: "unfinished";
@@ -1584,6 +1843,7 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1584
1843
  merge: "merge";
1585
1844
  budget: "budget";
1586
1845
  "needs-lead": "needs-lead";
1846
+ "needs-input": "needs-input";
1587
1847
  }>;
1588
1848
  cause: z.ZodEnum<{
1589
1849
  preflight: "preflight";
@@ -1616,8 +1876,8 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1616
1876
  }, z.core.$strict> | z.ZodObject<{
1617
1877
  by: z.ZodEnum<{
1618
1878
  operator: "operator";
1619
- recovery: "recovery";
1620
1879
  host: "host";
1880
+ recovery: "recovery";
1621
1881
  }>;
1622
1882
  reset: z.ZodBoolean;
1623
1883
  spent: z.ZodOptional<z.ZodNumber>;
@@ -1625,8 +1885,8 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1625
1885
  }, z.core.$strict> | z.ZodObject<{
1626
1886
  by: z.ZodEnum<{
1627
1887
  operator: "operator";
1628
- graph: "graph";
1629
1888
  host: "host";
1889
+ graph: "graph";
1630
1890
  }>;
1631
1891
  hadAttempt: z.ZodBoolean;
1632
1892
  }, z.core.$strict> | z.ZodObject<{
@@ -1634,8 +1894,8 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1634
1894
  message: z.ZodString;
1635
1895
  }, z.core.$strict> | z.ZodObject<{
1636
1896
  reason: z.ZodEnum<{
1637
- runtime: "runtime";
1638
1897
  operator: "operator";
1898
+ runtime: "runtime";
1639
1899
  shutdown: "shutdown";
1640
1900
  "base-check": "base-check";
1641
1901
  reconfigure: "reconfigure";
@@ -1649,6 +1909,7 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1649
1909
  timeout: "timeout";
1650
1910
  "provider-auth": "provider-auth";
1651
1911
  stalled: "stalled";
1912
+ "context-exhausted": "context-exhausted";
1652
1913
  "stale-base": "stale-base";
1653
1914
  "empty-result": "empty-result";
1654
1915
  unfinished: "unfinished";
@@ -1657,11 +1918,12 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1657
1918
  merge: "merge";
1658
1919
  budget: "budget";
1659
1920
  "needs-lead": "needs-lead";
1921
+ "needs-input": "needs-input";
1660
1922
  }>>>;
1661
1923
  }, z.core.$strict> | z.ZodObject<{
1662
1924
  reason: z.ZodEnum<{
1663
- runtime: "runtime";
1664
1925
  operator: "operator";
1926
+ runtime: "runtime";
1665
1927
  shutdown: "shutdown";
1666
1928
  "base-check": "base-check";
1667
1929
  reconfigure: "reconfigure";
@@ -1671,8 +1933,8 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1671
1933
  }, z.core.$strict> | z.ZodObject<{
1672
1934
  by: z.ZodEnum<{
1673
1935
  operator: "operator";
1674
- controller: "controller";
1675
1936
  host: "host";
1937
+ controller: "controller";
1676
1938
  }>;
1677
1939
  }, z.core.$strict> | z.ZodObject<{
1678
1940
  owner: z.ZodString;
@@ -1732,8 +1994,8 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1732
1994
  activity: z.ZodOptional<z.ZodObject<{
1733
1995
  kind: z.ZodEnum<{
1734
1996
  gate: "gate";
1735
- command: "command";
1736
1997
  agent: "agent";
1998
+ command: "command";
1737
1999
  step: "step";
1738
2000
  }>;
1739
2001
  label: z.ZodString;
@@ -1777,6 +2039,76 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1777
2039
  cleared: "cleared";
1778
2040
  }>;
1779
2041
  error: z.ZodOptional<z.ZodString>;
2042
+ }, z.core.$strict> | z.ZodObject<{
2043
+ requestId: z.ZodString;
2044
+ kind: z.ZodEnum<{
2045
+ question: "question";
2046
+ "follow-up": "follow-up";
2047
+ }>;
2048
+ blocking: z.ZodBoolean;
2049
+ lifecycle: z.ZodEnum<{
2050
+ pending: "pending";
2051
+ cancelled: "cancelled";
2052
+ }>;
2053
+ effectiveSeverity: z.ZodNumber;
2054
+ floors: z.ZodArray<z.ZodEnum<{
2055
+ declared: "declared";
2056
+ "critical-path": "critical-path";
2057
+ }>>;
2058
+ criticalHits: z.ZodNumber;
2059
+ questionDigest: z.ZodString;
2060
+ draftDigest: z.ZodNullable<z.ZodString>;
2061
+ }, z.core.$strict> | z.ZodObject<{
2062
+ requestId: z.ZodString;
2063
+ revision: z.ZodNumber;
2064
+ answerDigest: z.ZodString;
2065
+ kind: z.ZodEnum<{
2066
+ clarification: "clarification";
2067
+ "requirement-change": "requirement-change";
2068
+ }>;
2069
+ actor: z.ZodEnum<{
2070
+ operator: "operator";
2071
+ lead: "lead";
2072
+ host: "host";
2073
+ }>;
2074
+ }, z.core.$strict> | z.ZodObject<{
2075
+ requestId: z.ZodString;
2076
+ answerDigest: z.ZodString;
2077
+ targetDigest: z.ZodString;
2078
+ contextDigest: z.ZodNullable<z.ZodString>;
2079
+ retried: z.ZodBoolean;
2080
+ }, z.core.$strict> | z.ZodObject<{
2081
+ requestId: z.ZodString;
2082
+ lifecycle: z.ZodEnum<{
2083
+ cancelled: "cancelled";
2084
+ superseded: "superseded";
2085
+ }>;
2086
+ by: z.ZodEnum<{
2087
+ operator: "operator";
2088
+ lead: "lead";
2089
+ host: "host";
2090
+ controller: "controller";
2091
+ }>;
2092
+ successor: z.ZodOptional<z.ZodString>;
2093
+ }, z.core.$strict> | z.ZodObject<{
2094
+ requestId: z.ZodString;
2095
+ targetDigest: z.ZodString;
2096
+ reason: z.ZodEnum<{
2097
+ context: "context";
2098
+ graph: "graph";
2099
+ order: "order";
2100
+ policy: "policy";
2101
+ }>;
2102
+ }, z.core.$strict> | z.ZodObject<{
2103
+ requestId: z.ZodString;
2104
+ answerDigest: z.ZodString;
2105
+ callId: z.ZodString;
2106
+ }, z.core.$strict> | z.ZodObject<{
2107
+ count: z.ZodNumber;
2108
+ maxSeverity: z.ZodNumber;
2109
+ floors: z.ZodNumber;
2110
+ followUps: z.ZodNumber;
2111
+ digest: z.ZodString;
1780
2112
  }, z.core.$strict> | z.ZodObject<{
1781
2113
  sink: z.ZodString;
1782
2114
  key: z.ZodString;
@@ -1816,7 +2148,7 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1816
2148
  workId: z.ZodOptional<z.ZodString>;
1817
2149
  runId: z.ZodOptional<z.ZodString>;
1818
2150
  attempt: z.ZodOptional<z.ZodNumber>;
1819
- type: z.ZodLiteral<"graph.registered" | "graph.reviewed" | "graph.approved" | "work.ready" | "work.held" | "attempt.claimed" | "attempt.phase" | "attempt.gate" | "attempt.review" | "attempt.stage" | "attempt.liveness" | "attempt.failed" | "attempt.diagnosed" | "attempt.expired" | "attempt.cancelled" | "attempt.recovered" | "work.accepted" | "work.retried" | "work.cancelled" | "work.blocked" | "control.paused" | "control.resumed" | "controller.acquired" | "base.moved" | "controller.released" | "budget.blocked" | "corpus.adopted" | "work.recovery" | "joint.started" | "joint.liveness" | "joint.finished" | "policy.applied" | "policy.reconfigure" | "delivery.pending" | "delivery.delivered" | "delivery.failed" | "delivery.conflict" | "delivery.uncertain">;
2151
+ type: z.ZodLiteral<"graph.registered" | "graph.reviewed" | "graph.approved" | "work.ready" | "work.held" | "attempt.claimed" | "attempt.phase" | "attempt.gate" | "attempt.review" | "attempt.stage" | "attempt.liveness" | "attempt.failed" | "attempt.diagnosed" | "attempt.expired" | "attempt.cancelled" | "attempt.recovered" | "work.accepted" | "work.retried" | "work.cancelled" | "work.blocked" | "control.paused" | "control.resumed" | "controller.acquired" | "base.moved" | "controller.released" | "budget.blocked" | "corpus.adopted" | "work.recovery" | "joint.started" | "joint.liveness" | "joint.finished" | "policy.applied" | "policy.reconfigure" | "input.requested" | "input.answered" | "input.applied" | "input.closed" | "input.stale" | "input.delivered" | "attempt.assumptions" | "delivery.pending" | "delivery.delivered" | "delivery.failed" | "delivery.conflict" | "delivery.uncertain">;
1820
2152
  payload: z.ZodObject<{
1821
2153
  digest: z.ZodString;
1822
2154
  orders: z.ZodNumber;
@@ -1827,8 +2159,8 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1827
2159
  }, z.core.$strict>;
1828
2160
  }, z.core.$strict> | z.ZodObject<{
1829
2161
  kind: z.ZodEnum<{
1830
- plan: "plan";
1831
2162
  contract: "contract";
2163
+ plan: "plan";
1832
2164
  }>;
1833
2165
  subject: z.ZodString;
1834
2166
  digest: z.ZodString;
@@ -1838,8 +2170,8 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1838
2170
  }, z.core.$strict> | z.ZodObject<{
1839
2171
  digest: z.ZodString;
1840
2172
  actor: z.ZodEnum<{
1841
- agent: "agent";
1842
2173
  operator: "operator";
2174
+ agent: "agent";
1843
2175
  }>;
1844
2176
  }, z.core.$strict> | z.ZodObject<{
1845
2177
  orderDigest: z.ZodString;
@@ -1863,10 +2195,10 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1863
2195
  engineVersion: z.ZodString;
1864
2196
  }, z.core.$strict> | z.ZodObject<{
1865
2197
  phase: z.ZodEnum<{
1866
- ready: "ready";
1867
- failed: "failed";
1868
2198
  cancelled: "cancelled";
1869
2199
  draft: "draft";
2200
+ ready: "ready";
2201
+ failed: "failed";
1870
2202
  running: "running";
1871
2203
  verifying: "verifying";
1872
2204
  reviewing: "reviewing";
@@ -1935,8 +2267,8 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1935
2267
  activity: z.ZodOptional<z.ZodObject<{
1936
2268
  kind: z.ZodEnum<{
1937
2269
  gate: "gate";
1938
- command: "command";
1939
2270
  agent: "agent";
2271
+ command: "command";
1940
2272
  step: "step";
1941
2273
  }>;
1942
2274
  label: z.ZodString;
@@ -1967,6 +2299,7 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1967
2299
  timeout: "timeout";
1968
2300
  "provider-auth": "provider-auth";
1969
2301
  stalled: "stalled";
2302
+ "context-exhausted": "context-exhausted";
1970
2303
  "stale-base": "stale-base";
1971
2304
  "empty-result": "empty-result";
1972
2305
  unfinished: "unfinished";
@@ -1975,6 +2308,7 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1975
2308
  merge: "merge";
1976
2309
  budget: "budget";
1977
2310
  "needs-lead": "needs-lead";
2311
+ "needs-input": "needs-input";
1978
2312
  }>;
1979
2313
  message: z.ZodString;
1980
2314
  blocked: z.ZodBoolean;
@@ -1988,6 +2322,7 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1988
2322
  timeout: "timeout";
1989
2323
  "provider-auth": "provider-auth";
1990
2324
  stalled: "stalled";
2325
+ "context-exhausted": "context-exhausted";
1991
2326
  "stale-base": "stale-base";
1992
2327
  "empty-result": "empty-result";
1993
2328
  unfinished: "unfinished";
@@ -1996,6 +2331,7 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1996
2331
  merge: "merge";
1997
2332
  budget: "budget";
1998
2333
  "needs-lead": "needs-lead";
2334
+ "needs-input": "needs-input";
1999
2335
  }>;
2000
2336
  cause: z.ZodEnum<{
2001
2337
  preflight: "preflight";
@@ -2028,8 +2364,8 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2028
2364
  }, z.core.$strict> | z.ZodObject<{
2029
2365
  by: z.ZodEnum<{
2030
2366
  operator: "operator";
2031
- recovery: "recovery";
2032
2367
  host: "host";
2368
+ recovery: "recovery";
2033
2369
  }>;
2034
2370
  reset: z.ZodBoolean;
2035
2371
  spent: z.ZodOptional<z.ZodNumber>;
@@ -2037,8 +2373,8 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2037
2373
  }, z.core.$strict> | z.ZodObject<{
2038
2374
  by: z.ZodEnum<{
2039
2375
  operator: "operator";
2040
- graph: "graph";
2041
2376
  host: "host";
2377
+ graph: "graph";
2042
2378
  }>;
2043
2379
  hadAttempt: z.ZodBoolean;
2044
2380
  }, z.core.$strict> | z.ZodObject<{
@@ -2046,8 +2382,8 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2046
2382
  message: z.ZodString;
2047
2383
  }, z.core.$strict> | z.ZodObject<{
2048
2384
  reason: z.ZodEnum<{
2049
- runtime: "runtime";
2050
2385
  operator: "operator";
2386
+ runtime: "runtime";
2051
2387
  shutdown: "shutdown";
2052
2388
  "base-check": "base-check";
2053
2389
  reconfigure: "reconfigure";
@@ -2061,6 +2397,7 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2061
2397
  timeout: "timeout";
2062
2398
  "provider-auth": "provider-auth";
2063
2399
  stalled: "stalled";
2400
+ "context-exhausted": "context-exhausted";
2064
2401
  "stale-base": "stale-base";
2065
2402
  "empty-result": "empty-result";
2066
2403
  unfinished: "unfinished";
@@ -2069,11 +2406,12 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2069
2406
  merge: "merge";
2070
2407
  budget: "budget";
2071
2408
  "needs-lead": "needs-lead";
2409
+ "needs-input": "needs-input";
2072
2410
  }>>>;
2073
2411
  }, z.core.$strict> | z.ZodObject<{
2074
2412
  reason: z.ZodEnum<{
2075
- runtime: "runtime";
2076
2413
  operator: "operator";
2414
+ runtime: "runtime";
2077
2415
  shutdown: "shutdown";
2078
2416
  "base-check": "base-check";
2079
2417
  reconfigure: "reconfigure";
@@ -2083,8 +2421,8 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2083
2421
  }, z.core.$strict> | z.ZodObject<{
2084
2422
  by: z.ZodEnum<{
2085
2423
  operator: "operator";
2086
- controller: "controller";
2087
2424
  host: "host";
2425
+ controller: "controller";
2088
2426
  }>;
2089
2427
  }, z.core.$strict> | z.ZodObject<{
2090
2428
  owner: z.ZodString;
@@ -2144,8 +2482,8 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2144
2482
  activity: z.ZodOptional<z.ZodObject<{
2145
2483
  kind: z.ZodEnum<{
2146
2484
  gate: "gate";
2147
- command: "command";
2148
2485
  agent: "agent";
2486
+ command: "command";
2149
2487
  step: "step";
2150
2488
  }>;
2151
2489
  label: z.ZodString;
@@ -2189,6 +2527,76 @@ export declare const readRunEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2189
2527
  cleared: "cleared";
2190
2528
  }>;
2191
2529
  error: z.ZodOptional<z.ZodString>;
2530
+ }, z.core.$strict> | z.ZodObject<{
2531
+ requestId: z.ZodString;
2532
+ kind: z.ZodEnum<{
2533
+ question: "question";
2534
+ "follow-up": "follow-up";
2535
+ }>;
2536
+ blocking: z.ZodBoolean;
2537
+ lifecycle: z.ZodEnum<{
2538
+ pending: "pending";
2539
+ cancelled: "cancelled";
2540
+ }>;
2541
+ effectiveSeverity: z.ZodNumber;
2542
+ floors: z.ZodArray<z.ZodEnum<{
2543
+ declared: "declared";
2544
+ "critical-path": "critical-path";
2545
+ }>>;
2546
+ criticalHits: z.ZodNumber;
2547
+ questionDigest: z.ZodString;
2548
+ draftDigest: z.ZodNullable<z.ZodString>;
2549
+ }, z.core.$strict> | z.ZodObject<{
2550
+ requestId: z.ZodString;
2551
+ revision: z.ZodNumber;
2552
+ answerDigest: z.ZodString;
2553
+ kind: z.ZodEnum<{
2554
+ clarification: "clarification";
2555
+ "requirement-change": "requirement-change";
2556
+ }>;
2557
+ actor: z.ZodEnum<{
2558
+ operator: "operator";
2559
+ lead: "lead";
2560
+ host: "host";
2561
+ }>;
2562
+ }, z.core.$strict> | z.ZodObject<{
2563
+ requestId: z.ZodString;
2564
+ answerDigest: z.ZodString;
2565
+ targetDigest: z.ZodString;
2566
+ contextDigest: z.ZodNullable<z.ZodString>;
2567
+ retried: z.ZodBoolean;
2568
+ }, z.core.$strict> | z.ZodObject<{
2569
+ requestId: z.ZodString;
2570
+ lifecycle: z.ZodEnum<{
2571
+ cancelled: "cancelled";
2572
+ superseded: "superseded";
2573
+ }>;
2574
+ by: z.ZodEnum<{
2575
+ operator: "operator";
2576
+ lead: "lead";
2577
+ host: "host";
2578
+ controller: "controller";
2579
+ }>;
2580
+ successor: z.ZodOptional<z.ZodString>;
2581
+ }, z.core.$strict> | z.ZodObject<{
2582
+ requestId: z.ZodString;
2583
+ targetDigest: z.ZodString;
2584
+ reason: z.ZodEnum<{
2585
+ context: "context";
2586
+ graph: "graph";
2587
+ order: "order";
2588
+ policy: "policy";
2589
+ }>;
2590
+ }, z.core.$strict> | z.ZodObject<{
2591
+ requestId: z.ZodString;
2592
+ answerDigest: z.ZodString;
2593
+ callId: z.ZodString;
2594
+ }, z.core.$strict> | z.ZodObject<{
2595
+ count: z.ZodNumber;
2596
+ maxSeverity: z.ZodNumber;
2597
+ floors: z.ZodNumber;
2598
+ followUps: z.ZodNumber;
2599
+ digest: z.ZodString;
2192
2600
  }, z.core.$strict> | z.ZodObject<{
2193
2601
  sink: z.ZodString;
2194
2602
  key: z.ZodString;
@@ -2249,6 +2657,6 @@ export type RunEventDraft = {
2249
2657
  * остановки очереди), поэтому harness использует те же имена, а не новые.
2250
2658
  * `heartbeat` продлевает сроки и события не создаёт.
2251
2659
  */
2252
- export declare const transactionKinds: readonly ["run.claimed", "heartbeat", "run.heartbeat-failed", "run.phase", "run.context", "run.dependencies", "run.dependency-freshness", "run.consumer-checked", "run.implementation-basis", "run.partial", "run.continuation", "run.model", "run.timing.started", "run.timing.finished", "run.liveness", "evidence.recorded", "reproduction.recorded", "findings.recorded", "task.done", "run.failed", "run.recovered", "recovery.rejected", "runs.expired", "task.retry", "task.cancelled", "task.held", "task.released", "task.hold-transferred", "wait.started", "wait.cleared", "recovery.reserved", "recovery.decided", "recovery.applied", "recovery.interrupted", "scheduler.started", "scheduler.paused", "scheduler.released", "scheduler.error", "scheduler.blockers", "config.started", "config.reconfigured", "config.reconfigure-requested", "config.reconfigure-cleared", "graph.registered", "graph.reviewed", "graph.approved", "delivery.recorded", "workspace.verification.started", "workspace.manifest", "workspace.evidence", "workspace.verified", "workspace.failed", "workspace.liveness", "base.moved", "workflow.updated", "usage.recorded", "checks.recorded", "checks.adopted", "checks.awaiting-operator", "checks.adoption-abandoned", "checks.spike"];
2660
+ export declare const transactionKinds: readonly ["run.claimed", "heartbeat", "run.heartbeat-failed", "run.phase", "run.context", "run.dependencies", "run.dependency-freshness", "run.consumer-checked", "run.implementation-basis", "run.partial", "run.continuation", "run.model", "run.timing.started", "run.timing.finished", "run.liveness", "evidence.recorded", "reproduction.recorded", "findings.recorded", "task.done", "run.failed", "run.recovered", "recovery.rejected", "runs.expired", "task.retry", "task.cancelled", "task.held", "task.released", "task.hold-transferred", "wait.started", "wait.cleared", "recovery.reserved", "recovery.decided", "recovery.applied", "recovery.interrupted", "scheduler.started", "scheduler.paused", "scheduler.released", "scheduler.error", "scheduler.blockers", "config.started", "config.reconfigured", "config.reconfigure-requested", "config.reconfigure-cleared", "graph.registered", "graph.reviewed", "graph.approved", "delivery.recorded", "workspace.verification.started", "workspace.manifest", "workspace.evidence", "workspace.verified", "workspace.failed", "workspace.liveness", "base.moved", "workflow.updated", "usage.recorded", "checks.recorded", "checks.adopted", "checks.awaiting-operator", "checks.adoption-abandoned", "checks.spike", "input.answered", "input.applied", "input.closed", "input.delivered"];
2253
2661
  export type TransactionKind = (typeof transactionKinds)[number];
2254
2662
  export {};