devcontour-harness 0.1.0-alpha.28 → 0.1.0-alpha.30

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 (75) hide show
  1. package/README.md +36 -2
  2. package/docs/architecture.md +80 -0
  3. package/docs/compatibility.md +15 -14
  4. package/docs/contracts.md +244 -26
  5. package/docs/release-notes/0.1.0-alpha.29.md +32 -0
  6. package/docs/release-notes/0.1.0-alpha.30.md +40 -0
  7. package/docs/review-probes.md +23 -20
  8. package/docs/toolchains.md +12 -1
  9. package/docs/upgrade.md +124 -0
  10. package/lib/agents/review-probe.d.ts +1 -0
  11. package/lib/agents/review-probe.js +38 -0
  12. package/lib/cli.js +57 -1
  13. package/lib/contracts/cli.d.ts +1150 -22
  14. package/lib/contracts/cli.js +129 -4
  15. package/lib/contracts/events.d.ts +642 -3
  16. package/lib/contracts/events.js +48 -0
  17. package/lib/contracts/index.d.ts +1 -0
  18. package/lib/contracts/index.js +1 -0
  19. package/lib/contracts/ports.d.ts +5 -1
  20. package/lib/contracts/published.d.ts +559 -2
  21. package/lib/contracts/published.js +2 -0
  22. package/lib/contracts/report.d.ts +1149 -0
  23. package/lib/contracts/report.js +401 -0
  24. package/lib/control/harness.d.ts +454 -1
  25. package/lib/control/harness.js +83 -1
  26. package/lib/control/report-file.d.ts +19 -0
  27. package/lib/control/report-file.js +85 -0
  28. package/lib/control/report.d.ts +9 -0
  29. package/lib/control/report.js +27 -0
  30. package/lib/engine/engine.d.ts +5 -1
  31. package/lib/engine/engine.js +49 -7
  32. package/lib/engine/runner.js +5 -2
  33. package/lib/environment/dependency-network.d.ts +42 -0
  34. package/lib/environment/dependency-network.js +413 -0
  35. package/lib/environment/isolation.d.ts +23 -1
  36. package/lib/environment/isolation.js +61 -2
  37. package/lib/environment/lifecycle.d.ts +3 -1
  38. package/lib/environment/lifecycle.js +22 -4
  39. package/lib/environment/os-tools.d.ts +3 -1
  40. package/lib/environment/os-tools.js +3 -1
  41. package/lib/environment/process.d.ts +11 -0
  42. package/lib/environment/process.js +42 -2
  43. package/lib/explain/state.d.ts +38 -0
  44. package/lib/explain/state.js +19 -11
  45. package/lib/index.d.ts +2 -0
  46. package/lib/index.js +2 -0
  47. package/lib/projections/attempt.d.ts +101 -0
  48. package/lib/projections/attempt.js +64 -0
  49. package/lib/projections/index.d.ts +2 -1
  50. package/lib/projections/index.js +2 -1
  51. package/lib/projections/stop.d.ts +19 -0
  52. package/lib/projections/stop.js +33 -27
  53. package/lib/report/compute.d.ts +72 -0
  54. package/lib/report/compute.js +1219 -0
  55. package/lib/report/document.d.ts +27 -0
  56. package/lib/report/document.js +206 -0
  57. package/lib/report/format.d.ts +23 -0
  58. package/lib/report/format.js +53 -0
  59. package/lib/report/html.d.ts +7 -0
  60. package/lib/report/html.js +109 -0
  61. package/lib/report/index.d.ts +4 -0
  62. package/lib/report/index.js +7 -0
  63. package/lib/report/markdown.d.ts +7 -0
  64. package/lib/report/markdown.js +112 -0
  65. package/lib/storage/sqlite.d.ts +19 -0
  66. package/lib/storage/sqlite.js +61 -6
  67. package/lib/verification/dependency-store.d.ts +13 -1
  68. package/lib/verification/dependency-store.js +99 -25
  69. package/lib/verification/file-digests.d.ts +33 -0
  70. package/lib/verification/file-digests.js +121 -0
  71. package/lib/verification/gates.d.ts +34 -4
  72. package/lib/verification/gates.js +113 -11
  73. package/package.json +5 -1
  74. package/schemas/run-event.schema.json +95 -0
  75. package/schemas/value-report.schema.json +2541 -0
@@ -128,6 +128,11 @@ export declare const cliCommands: {
128
128
  readonly value: "id";
129
129
  readonly required: false;
130
130
  readonly description: "Только этот граф";
131
+ }, {
132
+ readonly name: "--detail";
133
+ readonly value: "flag";
134
+ readonly required: false;
135
+ readonly description: "Добавить detail: почему стоит выдача и активные попытки (стадия, владение, gates)";
131
136
  }];
132
137
  readonly refusals: ["NOT_FOUND"];
133
138
  };
@@ -330,6 +335,43 @@ export declare const cliCommands: {
330
335
  }];
331
336
  readonly refusals: ["NOT_FOUND"];
332
337
  };
338
+ readonly report: {
339
+ readonly description: "Отчёт об эффекте по данным каталога состояния: принятые поручения, отказы проверок и ревью, автономность, скорость, расход, окружение, недели; только чтение, без вызовов моделей";
340
+ readonly writes: false;
341
+ readonly idempotency: "Только чтение. Тот же каталог и те же параметры дают те же байты: момент отчёта по умолчанию — последняя метка времени в данных, а не часы";
342
+ readonly args: [CliArgument, {
343
+ readonly name: "--since";
344
+ readonly value: "text";
345
+ readonly required: false;
346
+ readonly description: "Начало окна включительно: ISO-время с поясом, дата YYYY-MM-DD или Nd/Nw до --as-of";
347
+ }, {
348
+ readonly name: "--until";
349
+ readonly value: "text";
350
+ readonly required: false;
351
+ readonly description: "Конец окна не включительно: ISO-время с поясом или дата";
352
+ }, {
353
+ readonly name: "--as-of";
354
+ readonly value: "text";
355
+ readonly required: false;
356
+ readonly description: "Момент отчёта; по умолчанию — последняя метка времени в данных";
357
+ }, {
358
+ readonly name: "--format";
359
+ readonly value: "text";
360
+ readonly required: false;
361
+ readonly description: "json (по умолчанию, в конверте), md или html (текст в stdout без конверта; отказ — JSON-конверт)";
362
+ }, {
363
+ readonly name: "--no-titles";
364
+ readonly value: "flag";
365
+ readonly required: false;
366
+ readonly description: "Без заголовков поручений и метки проекта";
367
+ }, {
368
+ readonly name: "--out";
369
+ readonly value: "path";
370
+ readonly required: false;
371
+ readonly description: "Записать отчёт выбранного формата в файл (не символическую ссылку и не файл состояния); в stdout — конверт с путём и размером";
372
+ }];
373
+ readonly refusals: ["NOT_FOUND", "PATH_CONFLICT"];
374
+ };
333
375
  readonly 'plan-request': {
334
376
  readonly description: "Собрать read-only запрос планирования из постановки и фактов проекта (роли, gates, репозитории, контекст, ресурсы, контракты, требования) для ведущего агента; модель не вызывается, ничего не пишется";
335
377
  readonly writes: false;
@@ -481,6 +523,166 @@ export declare const validateDataSchema: z.ZodObject<{
481
523
  contextDigest: z.ZodOptional<z.ZodString>;
482
524
  orders: z.ZodNumber;
483
525
  }, z.core.$strict>;
526
+ /** Активная попытка `status --detail` (`attemptView`). */
527
+ export declare const attemptViewSchema: z.ZodObject<{
528
+ runId: z.ZodString;
529
+ workId: z.ZodString;
530
+ attempt: z.ZodNumber;
531
+ status: z.ZodString;
532
+ phase: z.ZodEnum<{
533
+ ready: "ready";
534
+ failed: "failed";
535
+ cancelled: "cancelled";
536
+ draft: "draft";
537
+ running: "running";
538
+ verifying: "verifying";
539
+ reviewing: "reviewing";
540
+ integrating: "integrating";
541
+ done: "done";
542
+ }>;
543
+ runtime: z.ZodString;
544
+ model: z.ZodOptional<z.ZodString>;
545
+ startedAt: z.ZodISODateTime;
546
+ elapsedMs: z.ZodNumber;
547
+ stage: z.ZodOptional<z.ZodObject<{
548
+ name: z.ZodString;
549
+ family: z.ZodString;
550
+ startedAt: z.ZodISODateTime;
551
+ elapsedMs: z.ZodNumber;
552
+ }, z.core.$strict>>;
553
+ lease: z.ZodObject<{
554
+ owner: z.ZodString;
555
+ leaseUntil: z.ZodNumber;
556
+ leaseMs: z.ZodNumber;
557
+ sinceHeartbeatMs: z.ZodOptional<z.ZodNumber>;
558
+ stale: z.ZodBoolean;
559
+ }, z.core.$strict>;
560
+ gates: z.ZodObject<{
561
+ phase: z.ZodEnum<{
562
+ candidate: "candidate";
563
+ integration: "integration";
564
+ }>;
565
+ required: z.ZodNumber;
566
+ passed: z.ZodNumber;
567
+ failed: z.ZodNumber;
568
+ remaining: z.ZodNumber;
569
+ }, z.core.$strict>;
570
+ }, z.core.$strict>;
571
+ /**
572
+ * Почему выдача стоит (`status --detail`): причина паузы (`queueStop`), кто и
573
+ * что её снимает (`queuePause`, то же рассуждение, что у `explain`), классы
574
+ * отказа паузы runtime и последнее сообщение отказа этих классов.
575
+ */
576
+ export declare const queueViewSchema: z.ZodObject<{
577
+ paused: z.ZodBoolean;
578
+ reason: z.ZodOptional<z.ZodEnum<{
579
+ runtime: "runtime";
580
+ operator: "operator";
581
+ shutdown: "shutdown";
582
+ "base-check": "base-check";
583
+ reconfigure: "reconfigure";
584
+ }>>;
585
+ detail: z.ZodOptional<z.ZodString>;
586
+ since: z.ZodOptional<z.ZodISODateTime>;
587
+ operation: z.ZodOptional<z.ZodString>;
588
+ liftedByRun: z.ZodOptional<z.ZodLiteral<true>>;
589
+ failures: z.ZodOptional<z.ZodArray<z.ZodEnum<{
590
+ gate: "gate";
591
+ unknown: "unknown";
592
+ review: "review";
593
+ cancelled: "cancelled";
594
+ environment: "environment";
595
+ timeout: "timeout";
596
+ "provider-auth": "provider-auth";
597
+ "stale-base": "stale-base";
598
+ "empty-result": "empty-result";
599
+ unfinished: "unfinished";
600
+ "scope-violation": "scope-violation";
601
+ "review-protocol": "review-protocol";
602
+ merge: "merge";
603
+ budget: "budget";
604
+ "needs-lead": "needs-lead";
605
+ }>>>;
606
+ code: z.ZodOptional<z.ZodEnum<{
607
+ INVALID_INPUT: "INVALID_INPUT";
608
+ UNSUPPORTED_COMMAND: "UNSUPPORTED_COMMAND";
609
+ UNSUPPORTED_VERSION: "UNSUPPORTED_VERSION";
610
+ GRAPH_CYCLE: "GRAPH_CYCLE";
611
+ GRAPH_UNKNOWN_DEPENDENCY: "GRAPH_UNKNOWN_DEPENDENCY";
612
+ GRAPH_DUPLICATE_ID: "GRAPH_DUPLICATE_ID";
613
+ GATE_UNKNOWN: "GATE_UNKNOWN";
614
+ GATE_GROUP_CYCLE: "GATE_GROUP_CYCLE";
615
+ REVIEWER_SAME_VENDOR: "REVIEWER_SAME_VENDOR";
616
+ REVIEWER_MISSING: "REVIEWER_MISSING";
617
+ RESPONSE_TOO_LARGE: "RESPONSE_TOO_LARGE";
618
+ APPROVAL_STALE: "APPROVAL_STALE";
619
+ APPROVAL_REQUIRED: "APPROVAL_REQUIRED";
620
+ LEASE_STALE: "LEASE_STALE";
621
+ CONTROLLER_BUSY: "CONTROLLER_BUSY";
622
+ PAUSED: "PAUSED";
623
+ NOT_READY: "NOT_READY";
624
+ SCOPE_VIOLATION: "SCOPE_VIOLATION";
625
+ GATE_FAILED: "GATE_FAILED";
626
+ REVIEW_REJECTED: "REVIEW_REJECTED";
627
+ BUDGET_EXHAUSTED: "BUDGET_EXHAUSTED";
628
+ BUDGET_UNKNOWN: "BUDGET_UNKNOWN";
629
+ ATTEMPTS_EXHAUSTED: "ATTEMPTS_EXHAUSTED";
630
+ REVISION_CONFLICT: "REVISION_CONFLICT";
631
+ CANCELLED: "CANCELLED";
632
+ NOT_FOUND: "NOT_FOUND";
633
+ PATH_CONFLICT: "PATH_CONFLICT";
634
+ STATE_VERSION_UNSUPPORTED: "STATE_VERSION_UNSUPPORTED";
635
+ RUNTIME_UNAVAILABLE: "RUNTIME_UNAVAILABLE";
636
+ REVIEW_PROTOCOL_INVALID: "REVIEW_PROTOCOL_INVALID";
637
+ SANDBOX_UNAVAILABLE: "SANDBOX_UNAVAILABLE";
638
+ GIT_FAILED: "GIT_FAILED";
639
+ STORAGE_FAILED: "STORAGE_FAILED";
640
+ DELIVERY_FAILED: "DELIVERY_FAILED";
641
+ INTERNAL: "INTERNAL";
642
+ }>>;
643
+ cause: z.ZodOptional<z.ZodEnum<{
644
+ gate: "gate";
645
+ unknown: "unknown";
646
+ review: "review";
647
+ cancelled: "cancelled";
648
+ environment: "environment";
649
+ timeout: "timeout";
650
+ "provider-auth": "provider-auth";
651
+ "stale-base": "stale-base";
652
+ "empty-result": "empty-result";
653
+ unfinished: "unfinished";
654
+ "scope-violation": "scope-violation";
655
+ "review-protocol": "review-protocol";
656
+ merge: "merge";
657
+ budget: "budget";
658
+ "needs-lead": "needs-lead";
659
+ "runtime-missing": "runtime-missing";
660
+ "controller-busy": "controller-busy";
661
+ "operator-pause": "operator-pause";
662
+ "approval-required": "approval-required";
663
+ "not-ready": "not-ready";
664
+ }>>;
665
+ actor: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
666
+ controller: "controller";
667
+ lead: "lead";
668
+ user: "user";
669
+ }>>>;
670
+ action: z.ZodOptional<z.ZodEnum<{
671
+ none: "none";
672
+ wait: "wait";
673
+ retry: "retry";
674
+ "review-plan": "review-plan";
675
+ "diagnose-failure": "diagnose-failure";
676
+ "reset-attempts": "reset-attempts";
677
+ "raise-budget": "raise-budget";
678
+ "replan-dependents": "replan-dependents";
679
+ "recovery-decision": "recovery-decision";
680
+ "user-decision": "user-decision";
681
+ "resume-queue": "resume-queue";
682
+ "fix-environment": "fix-environment";
683
+ "fix-access": "fix-access";
684
+ }>>;
685
+ }, z.core.$strict>;
484
686
  export declare const statusDataSchema: z.ZodObject<{
485
687
  stateVersion: z.ZodLiteral<1>;
486
688
  control: z.ZodObject<{
@@ -644,6 +846,163 @@ export declare const statusDataSchema: z.ZodObject<{
644
846
  reason: z.ZodOptional<z.ZodString>;
645
847
  }, z.core.$strict>>;
646
848
  }, z.core.$strict>>;
849
+ detail: z.ZodOptional<z.ZodObject<{
850
+ at: z.ZodISODateTime;
851
+ queue: z.ZodObject<{
852
+ paused: z.ZodBoolean;
853
+ reason: z.ZodOptional<z.ZodEnum<{
854
+ runtime: "runtime";
855
+ operator: "operator";
856
+ shutdown: "shutdown";
857
+ "base-check": "base-check";
858
+ reconfigure: "reconfigure";
859
+ }>>;
860
+ detail: z.ZodOptional<z.ZodString>;
861
+ since: z.ZodOptional<z.ZodISODateTime>;
862
+ operation: z.ZodOptional<z.ZodString>;
863
+ liftedByRun: z.ZodOptional<z.ZodLiteral<true>>;
864
+ failures: z.ZodOptional<z.ZodArray<z.ZodEnum<{
865
+ gate: "gate";
866
+ unknown: "unknown";
867
+ review: "review";
868
+ cancelled: "cancelled";
869
+ environment: "environment";
870
+ timeout: "timeout";
871
+ "provider-auth": "provider-auth";
872
+ "stale-base": "stale-base";
873
+ "empty-result": "empty-result";
874
+ unfinished: "unfinished";
875
+ "scope-violation": "scope-violation";
876
+ "review-protocol": "review-protocol";
877
+ merge: "merge";
878
+ budget: "budget";
879
+ "needs-lead": "needs-lead";
880
+ }>>>;
881
+ code: z.ZodOptional<z.ZodEnum<{
882
+ INVALID_INPUT: "INVALID_INPUT";
883
+ UNSUPPORTED_COMMAND: "UNSUPPORTED_COMMAND";
884
+ UNSUPPORTED_VERSION: "UNSUPPORTED_VERSION";
885
+ GRAPH_CYCLE: "GRAPH_CYCLE";
886
+ GRAPH_UNKNOWN_DEPENDENCY: "GRAPH_UNKNOWN_DEPENDENCY";
887
+ GRAPH_DUPLICATE_ID: "GRAPH_DUPLICATE_ID";
888
+ GATE_UNKNOWN: "GATE_UNKNOWN";
889
+ GATE_GROUP_CYCLE: "GATE_GROUP_CYCLE";
890
+ REVIEWER_SAME_VENDOR: "REVIEWER_SAME_VENDOR";
891
+ REVIEWER_MISSING: "REVIEWER_MISSING";
892
+ RESPONSE_TOO_LARGE: "RESPONSE_TOO_LARGE";
893
+ APPROVAL_STALE: "APPROVAL_STALE";
894
+ APPROVAL_REQUIRED: "APPROVAL_REQUIRED";
895
+ LEASE_STALE: "LEASE_STALE";
896
+ CONTROLLER_BUSY: "CONTROLLER_BUSY";
897
+ PAUSED: "PAUSED";
898
+ NOT_READY: "NOT_READY";
899
+ SCOPE_VIOLATION: "SCOPE_VIOLATION";
900
+ GATE_FAILED: "GATE_FAILED";
901
+ REVIEW_REJECTED: "REVIEW_REJECTED";
902
+ BUDGET_EXHAUSTED: "BUDGET_EXHAUSTED";
903
+ BUDGET_UNKNOWN: "BUDGET_UNKNOWN";
904
+ ATTEMPTS_EXHAUSTED: "ATTEMPTS_EXHAUSTED";
905
+ REVISION_CONFLICT: "REVISION_CONFLICT";
906
+ CANCELLED: "CANCELLED";
907
+ NOT_FOUND: "NOT_FOUND";
908
+ PATH_CONFLICT: "PATH_CONFLICT";
909
+ STATE_VERSION_UNSUPPORTED: "STATE_VERSION_UNSUPPORTED";
910
+ RUNTIME_UNAVAILABLE: "RUNTIME_UNAVAILABLE";
911
+ REVIEW_PROTOCOL_INVALID: "REVIEW_PROTOCOL_INVALID";
912
+ SANDBOX_UNAVAILABLE: "SANDBOX_UNAVAILABLE";
913
+ GIT_FAILED: "GIT_FAILED";
914
+ STORAGE_FAILED: "STORAGE_FAILED";
915
+ DELIVERY_FAILED: "DELIVERY_FAILED";
916
+ INTERNAL: "INTERNAL";
917
+ }>>;
918
+ cause: z.ZodOptional<z.ZodEnum<{
919
+ gate: "gate";
920
+ unknown: "unknown";
921
+ review: "review";
922
+ cancelled: "cancelled";
923
+ environment: "environment";
924
+ timeout: "timeout";
925
+ "provider-auth": "provider-auth";
926
+ "stale-base": "stale-base";
927
+ "empty-result": "empty-result";
928
+ unfinished: "unfinished";
929
+ "scope-violation": "scope-violation";
930
+ "review-protocol": "review-protocol";
931
+ merge: "merge";
932
+ budget: "budget";
933
+ "needs-lead": "needs-lead";
934
+ "runtime-missing": "runtime-missing";
935
+ "controller-busy": "controller-busy";
936
+ "operator-pause": "operator-pause";
937
+ "approval-required": "approval-required";
938
+ "not-ready": "not-ready";
939
+ }>>;
940
+ actor: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
941
+ controller: "controller";
942
+ lead: "lead";
943
+ user: "user";
944
+ }>>>;
945
+ action: z.ZodOptional<z.ZodEnum<{
946
+ none: "none";
947
+ wait: "wait";
948
+ retry: "retry";
949
+ "review-plan": "review-plan";
950
+ "diagnose-failure": "diagnose-failure";
951
+ "reset-attempts": "reset-attempts";
952
+ "raise-budget": "raise-budget";
953
+ "replan-dependents": "replan-dependents";
954
+ "recovery-decision": "recovery-decision";
955
+ "user-decision": "user-decision";
956
+ "resume-queue": "resume-queue";
957
+ "fix-environment": "fix-environment";
958
+ "fix-access": "fix-access";
959
+ }>>;
960
+ }, z.core.$strict>;
961
+ attempts: z.ZodArray<z.ZodObject<{
962
+ runId: z.ZodString;
963
+ workId: z.ZodString;
964
+ attempt: z.ZodNumber;
965
+ status: z.ZodString;
966
+ phase: z.ZodEnum<{
967
+ ready: "ready";
968
+ failed: "failed";
969
+ cancelled: "cancelled";
970
+ draft: "draft";
971
+ running: "running";
972
+ verifying: "verifying";
973
+ reviewing: "reviewing";
974
+ integrating: "integrating";
975
+ done: "done";
976
+ }>;
977
+ runtime: z.ZodString;
978
+ model: z.ZodOptional<z.ZodString>;
979
+ startedAt: z.ZodISODateTime;
980
+ elapsedMs: z.ZodNumber;
981
+ stage: z.ZodOptional<z.ZodObject<{
982
+ name: z.ZodString;
983
+ family: z.ZodString;
984
+ startedAt: z.ZodISODateTime;
985
+ elapsedMs: z.ZodNumber;
986
+ }, z.core.$strict>>;
987
+ lease: z.ZodObject<{
988
+ owner: z.ZodString;
989
+ leaseUntil: z.ZodNumber;
990
+ leaseMs: z.ZodNumber;
991
+ sinceHeartbeatMs: z.ZodOptional<z.ZodNumber>;
992
+ stale: z.ZodBoolean;
993
+ }, z.core.$strict>;
994
+ gates: z.ZodObject<{
995
+ phase: z.ZodEnum<{
996
+ candidate: "candidate";
997
+ integration: "integration";
998
+ }>;
999
+ required: z.ZodNumber;
1000
+ passed: z.ZodNumber;
1001
+ failed: z.ZodNumber;
1002
+ remaining: z.ZodNumber;
1003
+ }, z.core.$strict>;
1004
+ }, z.core.$strict>>;
1005
+ }, z.core.$strict>>;
647
1006
  }, z.core.$strict>;
648
1007
  export declare const eventsDataSchema: z.ZodObject<{
649
1008
  events: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -654,7 +1013,7 @@ export declare const eventsDataSchema: z.ZodObject<{
654
1013
  workId: z.ZodOptional<z.ZodString>;
655
1014
  runId: z.ZodOptional<z.ZodString>;
656
1015
  attempt: z.ZodOptional<z.ZodNumber>;
657
- type: z.ZodLiteral<"graph.registered" | "graph.reviewed" | "graph.approved" | "work.ready" | "work.held" | "attempt.claimed" | "attempt.phase" | "attempt.gate" | "attempt.review" | "attempt.failed" | "attempt.expired" | "attempt.cancelled" | "attempt.recovered" | "work.accepted" | "work.blocked" | "control.paused" | "control.resumed" | "controller.acquired" | "controller.released" | "budget.blocked" | "corpus.adopted" | "work.recovery" | "joint.started" | "joint.finished" | "policy.applied" | "policy.reconfigure" | "delivery.pending" | "delivery.delivered" | "delivery.failed" | "delivery.conflict" | "delivery.uncertain">;
1016
+ type: z.ZodLiteral<"graph.registered" | "graph.reviewed" | "graph.approved" | "work.ready" | "work.held" | "attempt.claimed" | "attempt.phase" | "attempt.gate" | "attempt.review" | "attempt.stage" | "attempt.failed" | "attempt.expired" | "attempt.cancelled" | "attempt.recovered" | "work.accepted" | "work.blocked" | "control.paused" | "control.resumed" | "controller.acquired" | "controller.released" | "budget.blocked" | "corpus.adopted" | "work.recovery" | "joint.started" | "joint.finished" | "policy.applied" | "policy.reconfigure" | "delivery.pending" | "delivery.delivered" | "delivery.failed" | "delivery.conflict" | "delivery.uncertain">;
658
1017
  payload: z.ZodObject<{
659
1018
  digest: z.ZodString;
660
1019
  orders: z.ZodNumber;
@@ -744,6 +1103,19 @@ export declare const eventsDataSchema: z.ZodObject<{
744
1103
  }>;
745
1104
  sameVendor: z.ZodBoolean;
746
1105
  blocking: z.ZodNumber;
1106
+ }, z.core.$strict> | z.ZodObject<{
1107
+ timingId: z.ZodString;
1108
+ stage: z.ZodString;
1109
+ phase: z.ZodEnum<{
1110
+ started: "started";
1111
+ finished: "finished";
1112
+ }>;
1113
+ at: z.ZodISODateTime;
1114
+ durationMs: z.ZodOptional<z.ZodNumber>;
1115
+ outcome: z.ZodOptional<z.ZodEnum<{
1116
+ passed: "passed";
1117
+ failed: "failed";
1118
+ }>>;
747
1119
  }, z.core.$strict> | z.ZodObject<{
748
1120
  failureKind: z.ZodEnum<{
749
1121
  gate: "gate";
@@ -916,7 +1288,7 @@ export declare const eventsDataSchema: z.ZodObject<{
916
1288
  workId: z.ZodOptional<z.ZodString>;
917
1289
  runId: z.ZodOptional<z.ZodString>;
918
1290
  attempt: z.ZodOptional<z.ZodNumber>;
919
- type: z.ZodLiteral<"graph.registered" | "graph.reviewed" | "graph.approved" | "work.ready" | "work.held" | "attempt.claimed" | "attempt.phase" | "attempt.gate" | "attempt.review" | "attempt.failed" | "attempt.expired" | "attempt.cancelled" | "attempt.recovered" | "work.accepted" | "work.blocked" | "control.paused" | "control.resumed" | "controller.acquired" | "controller.released" | "budget.blocked" | "corpus.adopted" | "work.recovery" | "joint.started" | "joint.finished" | "policy.applied" | "policy.reconfigure" | "delivery.pending" | "delivery.delivered" | "delivery.failed" | "delivery.conflict" | "delivery.uncertain">;
1291
+ type: z.ZodLiteral<"graph.registered" | "graph.reviewed" | "graph.approved" | "work.ready" | "work.held" | "attempt.claimed" | "attempt.phase" | "attempt.gate" | "attempt.review" | "attempt.stage" | "attempt.failed" | "attempt.expired" | "attempt.cancelled" | "attempt.recovered" | "work.accepted" | "work.blocked" | "control.paused" | "control.resumed" | "controller.acquired" | "controller.released" | "budget.blocked" | "corpus.adopted" | "work.recovery" | "joint.started" | "joint.finished" | "policy.applied" | "policy.reconfigure" | "delivery.pending" | "delivery.delivered" | "delivery.failed" | "delivery.conflict" | "delivery.uncertain">;
920
1292
  payload: z.ZodObject<{
921
1293
  digest: z.ZodString;
922
1294
  orders: z.ZodNumber;
@@ -1006,6 +1378,19 @@ export declare const eventsDataSchema: z.ZodObject<{
1006
1378
  }>;
1007
1379
  sameVendor: z.ZodBoolean;
1008
1380
  blocking: z.ZodNumber;
1381
+ }, z.core.$strict> | z.ZodObject<{
1382
+ timingId: z.ZodString;
1383
+ stage: z.ZodString;
1384
+ phase: z.ZodEnum<{
1385
+ started: "started";
1386
+ finished: "finished";
1387
+ }>;
1388
+ at: z.ZodISODateTime;
1389
+ durationMs: z.ZodOptional<z.ZodNumber>;
1390
+ outcome: z.ZodOptional<z.ZodEnum<{
1391
+ passed: "passed";
1392
+ failed: "failed";
1393
+ }>>;
1009
1394
  }, z.core.$strict> | z.ZodObject<{
1010
1395
  failureKind: z.ZodEnum<{
1011
1396
  gate: "gate";
@@ -1170,7 +1555,17 @@ export declare const eventsDataSchema: z.ZodObject<{
1170
1555
  revision: z.ZodString;
1171
1556
  attempts: z.ZodNumber;
1172
1557
  }, z.core.$strict>;
1173
- }, z.core.$strict>[]], "type">>;
1558
+ }, z.core.$strict>[], z.ZodObject<{
1559
+ apiVersion: z.ZodLiteral<"devcontour-harness/v1alpha1">;
1560
+ seq: z.ZodNumber;
1561
+ at: z.ZodISODateTime;
1562
+ graphId: z.ZodOptional<z.ZodString>;
1563
+ workId: z.ZodOptional<z.ZodString>;
1564
+ runId: z.ZodOptional<z.ZodString>;
1565
+ attempt: z.ZodOptional<z.ZodNumber>;
1566
+ type: z.ZodLiteral<"unknown">;
1567
+ original: z.ZodString;
1568
+ }, z.core.$strict>], "type">>;
1174
1569
  next: z.ZodNumber;
1175
1570
  }, z.core.$strict>;
1176
1571
  export declare const runDataSchema: z.ZodObject<{
@@ -2437,24 +2832,181 @@ export declare const cliDataSchemas: {
2437
2832
  reason: z.ZodOptional<z.ZodString>;
2438
2833
  }, z.core.$strict>>;
2439
2834
  }, z.core.$strict>>;
2440
- }, z.core.$strict>;
2441
- readonly events: z.ZodObject<{
2442
- events: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
2443
- apiVersion: z.ZodLiteral<"devcontour-harness/v1alpha1">;
2444
- seq: z.ZodNumber;
2835
+ detail: z.ZodOptional<z.ZodObject<{
2445
2836
  at: z.ZodISODateTime;
2446
- graphId: z.ZodOptional<z.ZodString>;
2447
- workId: z.ZodOptional<z.ZodString>;
2448
- runId: z.ZodOptional<z.ZodString>;
2449
- attempt: z.ZodOptional<z.ZodNumber>;
2450
- type: z.ZodLiteral<"graph.registered" | "graph.reviewed" | "graph.approved" | "work.ready" | "work.held" | "attempt.claimed" | "attempt.phase" | "attempt.gate" | "attempt.review" | "attempt.failed" | "attempt.expired" | "attempt.cancelled" | "attempt.recovered" | "work.accepted" | "work.blocked" | "control.paused" | "control.resumed" | "controller.acquired" | "controller.released" | "budget.blocked" | "corpus.adopted" | "work.recovery" | "joint.started" | "joint.finished" | "policy.applied" | "policy.reconfigure" | "delivery.pending" | "delivery.delivered" | "delivery.failed" | "delivery.conflict" | "delivery.uncertain">;
2451
- payload: z.ZodObject<{
2452
- digest: z.ZodString;
2453
- orders: z.ZodNumber;
2454
- source: z.ZodObject<{
2455
- connector: z.ZodString;
2456
- ref: z.ZodString;
2457
- revision: z.ZodString;
2837
+ queue: z.ZodObject<{
2838
+ paused: z.ZodBoolean;
2839
+ reason: z.ZodOptional<z.ZodEnum<{
2840
+ runtime: "runtime";
2841
+ operator: "operator";
2842
+ shutdown: "shutdown";
2843
+ "base-check": "base-check";
2844
+ reconfigure: "reconfigure";
2845
+ }>>;
2846
+ detail: z.ZodOptional<z.ZodString>;
2847
+ since: z.ZodOptional<z.ZodISODateTime>;
2848
+ operation: z.ZodOptional<z.ZodString>;
2849
+ liftedByRun: z.ZodOptional<z.ZodLiteral<true>>;
2850
+ failures: z.ZodOptional<z.ZodArray<z.ZodEnum<{
2851
+ gate: "gate";
2852
+ unknown: "unknown";
2853
+ review: "review";
2854
+ cancelled: "cancelled";
2855
+ environment: "environment";
2856
+ timeout: "timeout";
2857
+ "provider-auth": "provider-auth";
2858
+ "stale-base": "stale-base";
2859
+ "empty-result": "empty-result";
2860
+ unfinished: "unfinished";
2861
+ "scope-violation": "scope-violation";
2862
+ "review-protocol": "review-protocol";
2863
+ merge: "merge";
2864
+ budget: "budget";
2865
+ "needs-lead": "needs-lead";
2866
+ }>>>;
2867
+ code: z.ZodOptional<z.ZodEnum<{
2868
+ INVALID_INPUT: "INVALID_INPUT";
2869
+ UNSUPPORTED_COMMAND: "UNSUPPORTED_COMMAND";
2870
+ UNSUPPORTED_VERSION: "UNSUPPORTED_VERSION";
2871
+ GRAPH_CYCLE: "GRAPH_CYCLE";
2872
+ GRAPH_UNKNOWN_DEPENDENCY: "GRAPH_UNKNOWN_DEPENDENCY";
2873
+ GRAPH_DUPLICATE_ID: "GRAPH_DUPLICATE_ID";
2874
+ GATE_UNKNOWN: "GATE_UNKNOWN";
2875
+ GATE_GROUP_CYCLE: "GATE_GROUP_CYCLE";
2876
+ REVIEWER_SAME_VENDOR: "REVIEWER_SAME_VENDOR";
2877
+ REVIEWER_MISSING: "REVIEWER_MISSING";
2878
+ RESPONSE_TOO_LARGE: "RESPONSE_TOO_LARGE";
2879
+ APPROVAL_STALE: "APPROVAL_STALE";
2880
+ APPROVAL_REQUIRED: "APPROVAL_REQUIRED";
2881
+ LEASE_STALE: "LEASE_STALE";
2882
+ CONTROLLER_BUSY: "CONTROLLER_BUSY";
2883
+ PAUSED: "PAUSED";
2884
+ NOT_READY: "NOT_READY";
2885
+ SCOPE_VIOLATION: "SCOPE_VIOLATION";
2886
+ GATE_FAILED: "GATE_FAILED";
2887
+ REVIEW_REJECTED: "REVIEW_REJECTED";
2888
+ BUDGET_EXHAUSTED: "BUDGET_EXHAUSTED";
2889
+ BUDGET_UNKNOWN: "BUDGET_UNKNOWN";
2890
+ ATTEMPTS_EXHAUSTED: "ATTEMPTS_EXHAUSTED";
2891
+ REVISION_CONFLICT: "REVISION_CONFLICT";
2892
+ CANCELLED: "CANCELLED";
2893
+ NOT_FOUND: "NOT_FOUND";
2894
+ PATH_CONFLICT: "PATH_CONFLICT";
2895
+ STATE_VERSION_UNSUPPORTED: "STATE_VERSION_UNSUPPORTED";
2896
+ RUNTIME_UNAVAILABLE: "RUNTIME_UNAVAILABLE";
2897
+ REVIEW_PROTOCOL_INVALID: "REVIEW_PROTOCOL_INVALID";
2898
+ SANDBOX_UNAVAILABLE: "SANDBOX_UNAVAILABLE";
2899
+ GIT_FAILED: "GIT_FAILED";
2900
+ STORAGE_FAILED: "STORAGE_FAILED";
2901
+ DELIVERY_FAILED: "DELIVERY_FAILED";
2902
+ INTERNAL: "INTERNAL";
2903
+ }>>;
2904
+ cause: z.ZodOptional<z.ZodEnum<{
2905
+ gate: "gate";
2906
+ unknown: "unknown";
2907
+ review: "review";
2908
+ cancelled: "cancelled";
2909
+ environment: "environment";
2910
+ timeout: "timeout";
2911
+ "provider-auth": "provider-auth";
2912
+ "stale-base": "stale-base";
2913
+ "empty-result": "empty-result";
2914
+ unfinished: "unfinished";
2915
+ "scope-violation": "scope-violation";
2916
+ "review-protocol": "review-protocol";
2917
+ merge: "merge";
2918
+ budget: "budget";
2919
+ "needs-lead": "needs-lead";
2920
+ "runtime-missing": "runtime-missing";
2921
+ "controller-busy": "controller-busy";
2922
+ "operator-pause": "operator-pause";
2923
+ "approval-required": "approval-required";
2924
+ "not-ready": "not-ready";
2925
+ }>>;
2926
+ actor: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2927
+ controller: "controller";
2928
+ lead: "lead";
2929
+ user: "user";
2930
+ }>>>;
2931
+ action: z.ZodOptional<z.ZodEnum<{
2932
+ none: "none";
2933
+ wait: "wait";
2934
+ retry: "retry";
2935
+ "review-plan": "review-plan";
2936
+ "diagnose-failure": "diagnose-failure";
2937
+ "reset-attempts": "reset-attempts";
2938
+ "raise-budget": "raise-budget";
2939
+ "replan-dependents": "replan-dependents";
2940
+ "recovery-decision": "recovery-decision";
2941
+ "user-decision": "user-decision";
2942
+ "resume-queue": "resume-queue";
2943
+ "fix-environment": "fix-environment";
2944
+ "fix-access": "fix-access";
2945
+ }>>;
2946
+ }, z.core.$strict>;
2947
+ attempts: z.ZodArray<z.ZodObject<{
2948
+ runId: z.ZodString;
2949
+ workId: z.ZodString;
2950
+ attempt: z.ZodNumber;
2951
+ status: z.ZodString;
2952
+ phase: z.ZodEnum<{
2953
+ ready: "ready";
2954
+ failed: "failed";
2955
+ cancelled: "cancelled";
2956
+ draft: "draft";
2957
+ running: "running";
2958
+ verifying: "verifying";
2959
+ reviewing: "reviewing";
2960
+ integrating: "integrating";
2961
+ done: "done";
2962
+ }>;
2963
+ runtime: z.ZodString;
2964
+ model: z.ZodOptional<z.ZodString>;
2965
+ startedAt: z.ZodISODateTime;
2966
+ elapsedMs: z.ZodNumber;
2967
+ stage: z.ZodOptional<z.ZodObject<{
2968
+ name: z.ZodString;
2969
+ family: z.ZodString;
2970
+ startedAt: z.ZodISODateTime;
2971
+ elapsedMs: z.ZodNumber;
2972
+ }, z.core.$strict>>;
2973
+ lease: z.ZodObject<{
2974
+ owner: z.ZodString;
2975
+ leaseUntil: z.ZodNumber;
2976
+ leaseMs: z.ZodNumber;
2977
+ sinceHeartbeatMs: z.ZodOptional<z.ZodNumber>;
2978
+ stale: z.ZodBoolean;
2979
+ }, z.core.$strict>;
2980
+ gates: z.ZodObject<{
2981
+ phase: z.ZodEnum<{
2982
+ candidate: "candidate";
2983
+ integration: "integration";
2984
+ }>;
2985
+ required: z.ZodNumber;
2986
+ passed: z.ZodNumber;
2987
+ failed: z.ZodNumber;
2988
+ remaining: z.ZodNumber;
2989
+ }, z.core.$strict>;
2990
+ }, z.core.$strict>>;
2991
+ }, z.core.$strict>>;
2992
+ }, z.core.$strict>;
2993
+ readonly events: z.ZodObject<{
2994
+ events: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
2995
+ apiVersion: z.ZodLiteral<"devcontour-harness/v1alpha1">;
2996
+ seq: z.ZodNumber;
2997
+ at: z.ZodISODateTime;
2998
+ graphId: z.ZodOptional<z.ZodString>;
2999
+ workId: z.ZodOptional<z.ZodString>;
3000
+ runId: z.ZodOptional<z.ZodString>;
3001
+ attempt: z.ZodOptional<z.ZodNumber>;
3002
+ type: z.ZodLiteral<"graph.registered" | "graph.reviewed" | "graph.approved" | "work.ready" | "work.held" | "attempt.claimed" | "attempt.phase" | "attempt.gate" | "attempt.review" | "attempt.stage" | "attempt.failed" | "attempt.expired" | "attempt.cancelled" | "attempt.recovered" | "work.accepted" | "work.blocked" | "control.paused" | "control.resumed" | "controller.acquired" | "controller.released" | "budget.blocked" | "corpus.adopted" | "work.recovery" | "joint.started" | "joint.finished" | "policy.applied" | "policy.reconfigure" | "delivery.pending" | "delivery.delivered" | "delivery.failed" | "delivery.conflict" | "delivery.uncertain">;
3003
+ payload: z.ZodObject<{
3004
+ digest: z.ZodString;
3005
+ orders: z.ZodNumber;
3006
+ source: z.ZodObject<{
3007
+ connector: z.ZodString;
3008
+ ref: z.ZodString;
3009
+ revision: z.ZodString;
2458
3010
  }, z.core.$strict>;
2459
3011
  }, z.core.$strict> | z.ZodObject<{
2460
3012
  kind: z.ZodEnum<{
@@ -2537,6 +3089,19 @@ export declare const cliDataSchemas: {
2537
3089
  }>;
2538
3090
  sameVendor: z.ZodBoolean;
2539
3091
  blocking: z.ZodNumber;
3092
+ }, z.core.$strict> | z.ZodObject<{
3093
+ timingId: z.ZodString;
3094
+ stage: z.ZodString;
3095
+ phase: z.ZodEnum<{
3096
+ started: "started";
3097
+ finished: "finished";
3098
+ }>;
3099
+ at: z.ZodISODateTime;
3100
+ durationMs: z.ZodOptional<z.ZodNumber>;
3101
+ outcome: z.ZodOptional<z.ZodEnum<{
3102
+ passed: "passed";
3103
+ failed: "failed";
3104
+ }>>;
2540
3105
  }, z.core.$strict> | z.ZodObject<{
2541
3106
  failureKind: z.ZodEnum<{
2542
3107
  gate: "gate";
@@ -2709,7 +3274,7 @@ export declare const cliDataSchemas: {
2709
3274
  workId: z.ZodOptional<z.ZodString>;
2710
3275
  runId: z.ZodOptional<z.ZodString>;
2711
3276
  attempt: z.ZodOptional<z.ZodNumber>;
2712
- type: z.ZodLiteral<"graph.registered" | "graph.reviewed" | "graph.approved" | "work.ready" | "work.held" | "attempt.claimed" | "attempt.phase" | "attempt.gate" | "attempt.review" | "attempt.failed" | "attempt.expired" | "attempt.cancelled" | "attempt.recovered" | "work.accepted" | "work.blocked" | "control.paused" | "control.resumed" | "controller.acquired" | "controller.released" | "budget.blocked" | "corpus.adopted" | "work.recovery" | "joint.started" | "joint.finished" | "policy.applied" | "policy.reconfigure" | "delivery.pending" | "delivery.delivered" | "delivery.failed" | "delivery.conflict" | "delivery.uncertain">;
3277
+ type: z.ZodLiteral<"graph.registered" | "graph.reviewed" | "graph.approved" | "work.ready" | "work.held" | "attempt.claimed" | "attempt.phase" | "attempt.gate" | "attempt.review" | "attempt.stage" | "attempt.failed" | "attempt.expired" | "attempt.cancelled" | "attempt.recovered" | "work.accepted" | "work.blocked" | "control.paused" | "control.resumed" | "controller.acquired" | "controller.released" | "budget.blocked" | "corpus.adopted" | "work.recovery" | "joint.started" | "joint.finished" | "policy.applied" | "policy.reconfigure" | "delivery.pending" | "delivery.delivered" | "delivery.failed" | "delivery.conflict" | "delivery.uncertain">;
2713
3278
  payload: z.ZodObject<{
2714
3279
  digest: z.ZodString;
2715
3280
  orders: z.ZodNumber;
@@ -2799,6 +3364,19 @@ export declare const cliDataSchemas: {
2799
3364
  }>;
2800
3365
  sameVendor: z.ZodBoolean;
2801
3366
  blocking: z.ZodNumber;
3367
+ }, z.core.$strict> | z.ZodObject<{
3368
+ timingId: z.ZodString;
3369
+ stage: z.ZodString;
3370
+ phase: z.ZodEnum<{
3371
+ started: "started";
3372
+ finished: "finished";
3373
+ }>;
3374
+ at: z.ZodISODateTime;
3375
+ durationMs: z.ZodOptional<z.ZodNumber>;
3376
+ outcome: z.ZodOptional<z.ZodEnum<{
3377
+ passed: "passed";
3378
+ failed: "failed";
3379
+ }>>;
2802
3380
  }, z.core.$strict> | z.ZodObject<{
2803
3381
  failureKind: z.ZodEnum<{
2804
3382
  gate: "gate";
@@ -2963,7 +3541,17 @@ export declare const cliDataSchemas: {
2963
3541
  revision: z.ZodString;
2964
3542
  attempts: z.ZodNumber;
2965
3543
  }, z.core.$strict>;
2966
- }, z.core.$strict>[]], "type">>;
3544
+ }, z.core.$strict>[], z.ZodObject<{
3545
+ apiVersion: z.ZodLiteral<"devcontour-harness/v1alpha1">;
3546
+ seq: z.ZodNumber;
3547
+ at: z.ZodISODateTime;
3548
+ graphId: z.ZodOptional<z.ZodString>;
3549
+ workId: z.ZodOptional<z.ZodString>;
3550
+ runId: z.ZodOptional<z.ZodString>;
3551
+ attempt: z.ZodOptional<z.ZodNumber>;
3552
+ type: z.ZodLiteral<"unknown">;
3553
+ original: z.ZodString;
3554
+ }, z.core.$strict>], "type">>;
2967
3555
  next: z.ZodNumber;
2968
3556
  }, z.core.$strict>;
2969
3557
  readonly pause: z.ZodObject<{
@@ -4478,6 +5066,546 @@ export declare const cliDataSchemas: {
4478
5066
  runId: z.ZodOptional<z.ZodString>;
4479
5067
  }, z.core.$strict>>;
4480
5068
  }, z.core.$strict>;
5069
+ readonly report: z.ZodUnion<readonly [z.ZodObject<{
5070
+ reportVersion: z.ZodLiteral<1>;
5071
+ harnessVersion: z.ZodString;
5072
+ label: z.ZodNullable<z.ZodString>;
5073
+ window: z.ZodObject<{
5074
+ since: z.ZodNullable<z.ZodISODateTime>;
5075
+ until: z.ZodNullable<z.ZodISODateTime>;
5076
+ asOf: z.ZodISODateTime;
5077
+ }, z.core.$strict>;
5078
+ enoughData: z.ZodBoolean;
5079
+ coverage: z.ZodObject<{
5080
+ works: z.ZodNumber;
5081
+ attempts: z.ZodNumber;
5082
+ failed: z.ZodNumber;
5083
+ withFailureKind: z.ZodNumber;
5084
+ withTimings: z.ZodNumber;
5085
+ withCalls: z.ZodNumber;
5086
+ doneWithoutAttempt: z.ZodNumber;
5087
+ withWait: z.ZodNumber;
5088
+ withEngineVersion: z.ZodNumber;
5089
+ engines: z.ZodArray<z.ZodString>;
5090
+ enginesTruncated: z.ZodBoolean;
5091
+ calls: z.ZodNumber;
5092
+ reviews: z.ZodNumber;
5093
+ events: z.ZodNumber;
5094
+ eventsFrom: z.ZodNullable<z.ZodISODateTime>;
5095
+ }, z.core.$strict>;
5096
+ summary: z.ZodDiscriminatedUnion<[z.ZodObject<{
5097
+ status: z.ZodLiteral<"ok">;
5098
+ headlines: z.ZodArray<z.ZodObject<{
5099
+ id: z.ZodEnum<{
5100
+ accepted: "accepted";
5101
+ environment: "environment";
5102
+ "sent-back": "sent-back";
5103
+ "lead-time": "lead-time";
5104
+ spend: "spend";
5105
+ }>;
5106
+ value: z.ZodString;
5107
+ text: z.ZodString;
5108
+ basis: z.ZodString;
5109
+ measure: z.ZodObject<{
5110
+ value: z.ZodNullable<z.ZodNumber>;
5111
+ n: z.ZodNumber;
5112
+ unknown: z.ZodNumber;
5113
+ bound: z.ZodEnum<{
5114
+ exact: "exact";
5115
+ unknown: "unknown";
5116
+ lower: "lower";
5117
+ upper: "upper";
5118
+ }>;
5119
+ }, z.core.$strict>;
5120
+ }, z.core.$strict>>;
5121
+ }, z.core.$strict>, z.ZodObject<{
5122
+ status: z.ZodLiteral<"not-enough-data">;
5123
+ text: z.ZodString;
5124
+ accepted: z.ZodNumber;
5125
+ attempts: z.ZodNumber;
5126
+ failedAttempts: z.ZodNumber;
5127
+ works: z.ZodNumber;
5128
+ }, z.core.$strict>], "status">;
5129
+ defects: z.ZodObject<{
5130
+ rejected: z.ZodNumber;
5131
+ byKind: z.ZodObject<{
5132
+ gate: z.ZodNumber;
5133
+ review: z.ZodNumber;
5134
+ 'scope-violation': z.ZodNumber;
5135
+ }, z.core.$strict>;
5136
+ byPhase: z.ZodObject<{
5137
+ candidate: z.ZodNumber;
5138
+ integration: z.ZodNumber;
5139
+ unknown: z.ZodNumber;
5140
+ }, z.core.$strict>;
5141
+ sentBack: z.ZodObject<{
5142
+ value: z.ZodNullable<z.ZodNumber>;
5143
+ n: z.ZodNumber;
5144
+ unknown: z.ZodNumber;
5145
+ bound: z.ZodEnum<{
5146
+ exact: "exact";
5147
+ unknown: "unknown";
5148
+ lower: "lower";
5149
+ upper: "upper";
5150
+ }>;
5151
+ }, z.core.$strict>;
5152
+ sentBackSetupOnly: z.ZodNumber;
5153
+ sentBackRange: z.ZodObject<{
5154
+ min: z.ZodNumber;
5155
+ max: z.ZodNumber;
5156
+ }, z.core.$strict>;
5157
+ byGate: z.ZodArray<z.ZodObject<{
5158
+ gate: z.ZodString;
5159
+ phase: z.ZodEnum<{
5160
+ candidate: "candidate";
5161
+ integration: "integration";
5162
+ }>;
5163
+ failed: z.ZodNumber;
5164
+ setup: z.ZodBoolean;
5165
+ }, z.core.$strict>>;
5166
+ byGateTruncated: z.ZodBoolean;
5167
+ reviews: z.ZodObject<{
5168
+ rejected: z.ZodNumber;
5169
+ candidate: z.ZodNumber;
5170
+ integration: z.ZodNumber;
5171
+ blockingFindings: z.ZodNumber;
5172
+ withoutFindings: z.ZodNumber;
5173
+ }, z.core.$strict>;
5174
+ afterGreenGates: z.ZodObject<{
5175
+ value: z.ZodNullable<z.ZodNumber>;
5176
+ n: z.ZodNumber;
5177
+ unknown: z.ZodNumber;
5178
+ bound: z.ZodEnum<{
5179
+ exact: "exact";
5180
+ unknown: "unknown";
5181
+ lower: "lower";
5182
+ upper: "upper";
5183
+ }>;
5184
+ }, z.core.$strict>;
5185
+ integration: z.ZodNumber;
5186
+ planContract: z.ZodObject<{
5187
+ rounds: z.ZodNumber;
5188
+ rejected: z.ZodNumber;
5189
+ plans: z.ZodObject<{
5190
+ rounds: z.ZodNumber;
5191
+ rejected: z.ZodNumber;
5192
+ }, z.core.$strict>;
5193
+ contracts: z.ZodObject<{
5194
+ rounds: z.ZodNumber;
5195
+ rejected: z.ZodNumber;
5196
+ }, z.core.$strict>;
5197
+ blockingClosed: z.ZodNumber;
5198
+ blockingOpen: z.ZodNumber;
5199
+ blockingWithdrawn: z.ZodNumber;
5200
+ }, z.core.$strict>;
5201
+ withdrawn: z.ZodObject<{
5202
+ value: z.ZodNullable<z.ZodNumber>;
5203
+ n: z.ZodNumber;
5204
+ unknown: z.ZodNumber;
5205
+ bound: z.ZodEnum<{
5206
+ exact: "exact";
5207
+ unknown: "unknown";
5208
+ lower: "lower";
5209
+ upper: "upper";
5210
+ }>;
5211
+ }, z.core.$strict>;
5212
+ items: z.ZodArray<z.ZodObject<{
5213
+ workId: z.ZodString;
5214
+ runId: z.ZodString;
5215
+ attempt: z.ZodNumber;
5216
+ kind: z.ZodEnum<{
5217
+ test: "test";
5218
+ review: "review";
5219
+ scope: "scope";
5220
+ }>;
5221
+ phase: z.ZodNullable<z.ZodEnum<{
5222
+ candidate: "candidate";
5223
+ integration: "integration";
5224
+ }>>;
5225
+ gate: z.ZodNullable<z.ZodString>;
5226
+ at: z.ZodISODateTime;
5227
+ sha: z.ZodNullable<z.ZodString>;
5228
+ log: z.ZodNullable<z.ZodString>;
5229
+ blocking: z.ZodNullable<z.ZodNumber>;
5230
+ }, z.core.$strict>>;
5231
+ itemsTotal: z.ZodNumber;
5232
+ itemsTruncated: z.ZodBoolean;
5233
+ }, z.core.$strict>;
5234
+ autonomy: z.ZodObject<{
5235
+ withAction: z.ZodObject<{
5236
+ value: z.ZodNullable<z.ZodNumber>;
5237
+ n: z.ZodNumber;
5238
+ unknown: z.ZodNumber;
5239
+ bound: z.ZodEnum<{
5240
+ exact: "exact";
5241
+ unknown: "unknown";
5242
+ lower: "lower";
5243
+ upper: "upper";
5244
+ }>;
5245
+ }, z.core.$strict>;
5246
+ withoutAction: z.ZodObject<{
5247
+ value: z.ZodNullable<z.ZodNumber>;
5248
+ n: z.ZodNumber;
5249
+ unknown: z.ZodNumber;
5250
+ bound: z.ZodEnum<{
5251
+ exact: "exact";
5252
+ unknown: "unknown";
5253
+ lower: "lower";
5254
+ upper: "upper";
5255
+ }>;
5256
+ }, z.core.$strict>;
5257
+ actions: z.ZodObject<{
5258
+ operatorDecisions: z.ZodNumber;
5259
+ holds: z.ZodNumber;
5260
+ cancelledAttempts: z.ZodNumber;
5261
+ retries: z.ZodNullable<z.ZodNumber>;
5262
+ resets: z.ZodNullable<z.ZodNumber>;
5263
+ baseMoves: z.ZodNullable<z.ZodNumber>;
5264
+ }, z.core.$strict>;
5265
+ approvals: z.ZodObject<{
5266
+ operator: z.ZodNumber;
5267
+ agent: z.ZodNumber;
5268
+ source: z.ZodEnum<{
5269
+ none: "none";
5270
+ state: "state";
5271
+ events: "events";
5272
+ mixed: "mixed";
5273
+ }>;
5274
+ }, z.core.$strict>;
5275
+ pauses: z.ZodArray<z.ZodObject<{
5276
+ reason: z.ZodEnum<{
5277
+ runtime: "runtime";
5278
+ operator: "operator";
5279
+ shutdown: "shutdown";
5280
+ "base-check": "base-check";
5281
+ reconfigure: "reconfigure";
5282
+ }>;
5283
+ count: z.ZodNumber;
5284
+ pausedMs: z.ZodNumber;
5285
+ open: z.ZodNumber;
5286
+ failures: z.ZodArray<z.ZodEnum<{
5287
+ gate: "gate";
5288
+ unknown: "unknown";
5289
+ review: "review";
5290
+ cancelled: "cancelled";
5291
+ environment: "environment";
5292
+ timeout: "timeout";
5293
+ "provider-auth": "provider-auth";
5294
+ "stale-base": "stale-base";
5295
+ "empty-result": "empty-result";
5296
+ unfinished: "unfinished";
5297
+ "scope-violation": "scope-violation";
5298
+ "review-protocol": "review-protocol";
5299
+ merge: "merge";
5300
+ budget: "budget";
5301
+ "needs-lead": "needs-lead";
5302
+ }>>;
5303
+ }, z.core.$strict>>;
5304
+ escalations: z.ZodNumber;
5305
+ }, z.core.$strict>;
5306
+ speed: z.ZodObject<{
5307
+ leadTime: z.ZodObject<{
5308
+ n: z.ZodNumber;
5309
+ unknown: z.ZodNumber;
5310
+ median: z.ZodNullable<z.ZodNumber>;
5311
+ p75: z.ZodNullable<z.ZodNumber>;
5312
+ max: z.ZodNullable<z.ZodNumber>;
5313
+ values: z.ZodArray<z.ZodNumber>;
5314
+ }, z.core.$strict>;
5315
+ leadTimeFallback: z.ZodNumber;
5316
+ dependencyWait: z.ZodObject<{
5317
+ n: z.ZodNumber;
5318
+ unknown: z.ZodNumber;
5319
+ median: z.ZodNullable<z.ZodNumber>;
5320
+ p75: z.ZodNullable<z.ZodNumber>;
5321
+ max: z.ZodNullable<z.ZodNumber>;
5322
+ values: z.ZodArray<z.ZodNumber>;
5323
+ }, z.core.$strict>;
5324
+ queueWait: z.ZodObject<{
5325
+ n: z.ZodNumber;
5326
+ unknown: z.ZodNumber;
5327
+ median: z.ZodNullable<z.ZodNumber>;
5328
+ p75: z.ZodNullable<z.ZodNumber>;
5329
+ max: z.ZodNullable<z.ZodNumber>;
5330
+ values: z.ZodArray<z.ZodNumber>;
5331
+ }, z.core.$strict>;
5332
+ stages: z.ZodArray<z.ZodObject<{
5333
+ family: z.ZodString;
5334
+ spans: z.ZodNumber;
5335
+ totalMs: z.ZodNumber;
5336
+ medianMs: z.ZodNullable<z.ZodNumber>;
5337
+ acceptedMs: z.ZodNumber;
5338
+ rejectedMs: z.ZodNumber;
5339
+ incomplete: z.ZodNumber;
5340
+ }, z.core.$strict>>;
5341
+ stagesTruncated: z.ZodBoolean;
5342
+ firstPass: z.ZodObject<{
5343
+ value: z.ZodNullable<z.ZodNumber>;
5344
+ n: z.ZodNumber;
5345
+ unknown: z.ZodNumber;
5346
+ bound: z.ZodEnum<{
5347
+ exact: "exact";
5348
+ unknown: "unknown";
5349
+ lower: "lower";
5350
+ upper: "upper";
5351
+ }>;
5352
+ }, z.core.$strict>;
5353
+ firstPassRaw: z.ZodObject<{
5354
+ value: z.ZodNullable<z.ZodNumber>;
5355
+ n: z.ZodNumber;
5356
+ unknown: z.ZodNumber;
5357
+ bound: z.ZodEnum<{
5358
+ exact: "exact";
5359
+ unknown: "unknown";
5360
+ lower: "lower";
5361
+ upper: "upper";
5362
+ }>;
5363
+ }, z.core.$strict>;
5364
+ finished: z.ZodObject<{
5365
+ accepted: z.ZodNumber;
5366
+ failed: z.ZodNumber;
5367
+ cancelled: z.ZodNumber;
5368
+ }, z.core.$strict>;
5369
+ attemptsPerAccepted: z.ZodObject<{
5370
+ n: z.ZodNumber;
5371
+ buckets: z.ZodObject<{
5372
+ '1': z.ZodNumber;
5373
+ '2': z.ZodNumber;
5374
+ '3': z.ZodNumber;
5375
+ '4-6': z.ZodNumber;
5376
+ '7+': z.ZodNumber;
5377
+ }, z.core.$strict>;
5378
+ median: z.ZodNullable<z.ZodNumber>;
5379
+ mean: z.ZodNullable<z.ZodNumber>;
5380
+ }, z.core.$strict>;
5381
+ attemptsOnOther: z.ZodNumber;
5382
+ machineTime: z.ZodObject<{
5383
+ n: z.ZodNumber;
5384
+ unknown: z.ZodNumber;
5385
+ median: z.ZodNullable<z.ZodNumber>;
5386
+ p75: z.ZodNullable<z.ZodNumber>;
5387
+ max: z.ZodNullable<z.ZodNumber>;
5388
+ values: z.ZodArray<z.ZodNumber>;
5389
+ }, z.core.$strict>;
5390
+ }, z.core.$strict>;
5391
+ cost: z.ZodObject<{
5392
+ calls: z.ZodNumber;
5393
+ knownCalls: z.ZodNumber;
5394
+ knownUsd: z.ZodNumber;
5395
+ reportedUsd: z.ZodNumber;
5396
+ estimatedUsd: z.ZodNumber;
5397
+ unknown: z.ZodObject<{
5398
+ total: z.ZodNumber;
5399
+ noPrice: z.ZodNumber;
5400
+ incomplete: z.ZodNumber;
5401
+ active: z.ZodNumber;
5402
+ abandoned: z.ZodNumber;
5403
+ byRuntime: z.ZodArray<z.ZodObject<{
5404
+ runtime: z.ZodString;
5405
+ calls: z.ZodNumber;
5406
+ }, z.core.$strict>>;
5407
+ }, z.core.$strict>;
5408
+ attemptsWithoutCalls: z.ZodNumber;
5409
+ attemptsPartialCalls: z.ZodNumber;
5410
+ perAccepted: z.ZodObject<{
5411
+ value: z.ZodNullable<z.ZodNumber>;
5412
+ n: z.ZodNumber;
5413
+ unknown: z.ZodNumber;
5414
+ bound: z.ZodEnum<{
5415
+ exact: "exact";
5416
+ unknown: "unknown";
5417
+ lower: "lower";
5418
+ upper: "upper";
5419
+ }>;
5420
+ }, z.core.$strict>;
5421
+ perAttempt: z.ZodObject<{
5422
+ n: z.ZodNumber;
5423
+ unknown: z.ZodNumber;
5424
+ median: z.ZodNullable<z.ZodNumber>;
5425
+ p75: z.ZodNullable<z.ZodNumber>;
5426
+ max: z.ZodNullable<z.ZodNumber>;
5427
+ values: z.ZodArray<z.ZodNumber>;
5428
+ }, z.core.$strict>;
5429
+ rejected: z.ZodObject<{
5430
+ bound: z.ZodEnum<{
5431
+ exact: "exact";
5432
+ unknown: "unknown";
5433
+ lower: "lower";
5434
+ upper: "upper";
5435
+ }>;
5436
+ usd: z.ZodNumber;
5437
+ totalUsd: z.ZodNumber;
5438
+ attempts: z.ZodNumber;
5439
+ byBucket: z.ZodArray<z.ZodObject<{
5440
+ bucket: z.ZodEnum<{
5441
+ unknown: "unknown";
5442
+ integration: "integration";
5443
+ environment: "environment";
5444
+ operator: "operator";
5445
+ budget: "budget";
5446
+ defect: "defect";
5447
+ incomplete: "incomplete";
5448
+ "time-limit": "time-limit";
5449
+ tool: "tool";
5450
+ unclassified: "unclassified";
5451
+ }>;
5452
+ usd: z.ZodNumber;
5453
+ }, z.core.$strict>>;
5454
+ }, z.core.$strict>;
5455
+ byStage: z.ZodArray<z.ZodObject<{
5456
+ stage: z.ZodString;
5457
+ calls: z.ZodNumber;
5458
+ knownUsd: z.ZodNumber;
5459
+ unknownCalls: z.ZodNumber;
5460
+ }, z.core.$strict>>;
5461
+ tokens: z.ZodObject<{
5462
+ input: z.ZodNumber;
5463
+ output: z.ZodNumber;
5464
+ cacheRead: z.ZodNumber;
5465
+ cacheWrite: z.ZodNumber;
5466
+ incompleteCalls: z.ZodNumber;
5467
+ }, z.core.$strict>;
5468
+ }, z.core.$strict>;
5469
+ environment: z.ZodObject<{
5470
+ failed: z.ZodNumber;
5471
+ classified: z.ZodNumber;
5472
+ interrupted: z.ZodNumber;
5473
+ buckets: z.ZodArray<z.ZodObject<{
5474
+ bucket: z.ZodEnum<{
5475
+ unknown: "unknown";
5476
+ integration: "integration";
5477
+ environment: "environment";
5478
+ operator: "operator";
5479
+ budget: "budget";
5480
+ defect: "defect";
5481
+ incomplete: "incomplete";
5482
+ "time-limit": "time-limit";
5483
+ tool: "tool";
5484
+ unclassified: "unclassified";
5485
+ }>;
5486
+ count: z.ZodNumber;
5487
+ }, z.core.$strict>>;
5488
+ share: z.ZodObject<{
5489
+ value: z.ZodNullable<z.ZodNumber>;
5490
+ n: z.ZodNumber;
5491
+ unknown: z.ZodNumber;
5492
+ bound: z.ZodEnum<{
5493
+ exact: "exact";
5494
+ unknown: "unknown";
5495
+ lower: "lower";
5496
+ upper: "upper";
5497
+ }>;
5498
+ }, z.core.$strict>;
5499
+ setupCheckFailures: z.ZodNumber;
5500
+ timeLimit: z.ZodNumber;
5501
+ causes: z.ZodNull;
5502
+ neutral: z.ZodObject<{
5503
+ costBound: z.ZodEnum<{
5504
+ exact: "exact";
5505
+ unknown: "unknown";
5506
+ lower: "lower";
5507
+ upper: "upper";
5508
+ }>;
5509
+ attempts: z.ZodNumber;
5510
+ blocked: z.ZodNumber;
5511
+ machineMs: z.ZodNumber;
5512
+ knownUsd: z.ZodNumber;
5513
+ runtimePauses: z.ZodNumber;
5514
+ }, z.core.$strict>;
5515
+ rechecks: z.ZodObject<{
5516
+ flaky: z.ZodNumber;
5517
+ confirmed: z.ZodNumber;
5518
+ }, z.core.$strict>;
5519
+ }, z.core.$strict>;
5520
+ weeks: z.ZodObject<{
5521
+ rows: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
5522
+ kind: z.ZodLiteral<"week">;
5523
+ week: z.ZodString;
5524
+ attempts: z.ZodNumber;
5525
+ accepted: z.ZodNumber;
5526
+ firstPass: z.ZodNumber;
5527
+ defects: z.ZodNumber;
5528
+ environment: z.ZodNumber;
5529
+ knownUsd: z.ZodNumber;
5530
+ unknownCalls: z.ZodNumber;
5531
+ leadMedianMs: z.ZodNullable<z.ZodNumber>;
5532
+ engines: z.ZodArray<z.ZodString>;
5533
+ engineChanged: z.ZodBoolean;
5534
+ enginesTruncated: z.ZodBoolean;
5535
+ }, z.core.$strict>, z.ZodObject<{
5536
+ kind: z.ZodLiteral<"gap">;
5537
+ from: z.ZodString;
5538
+ to: z.ZodString;
5539
+ }, z.core.$strict>]>>;
5540
+ earlier: z.ZodNullable<z.ZodObject<{
5541
+ kind: z.ZodLiteral<"earlier">;
5542
+ from: z.ZodString;
5543
+ to: z.ZodString;
5544
+ weeks: z.ZodNumber;
5545
+ attempts: z.ZodNumber;
5546
+ accepted: z.ZodNumber;
5547
+ firstPass: z.ZodNumber;
5548
+ defects: z.ZodNumber;
5549
+ environment: z.ZodNumber;
5550
+ knownUsd: z.ZodNumber;
5551
+ unknownCalls: z.ZodNumber;
5552
+ }, z.core.$strict>>;
5553
+ active: z.ZodNumber;
5554
+ }, z.core.$strict>;
5555
+ works: z.ZodObject<{
5556
+ rows: z.ZodArray<z.ZodObject<{
5557
+ id: z.ZodString;
5558
+ title: z.ZodOptional<z.ZodString>;
5559
+ outcome: z.ZodEnum<{
5560
+ failed: "failed";
5561
+ accepted: "accepted";
5562
+ cancelled: "cancelled";
5563
+ }>;
5564
+ finishedAt: z.ZodNullable<z.ZodISODateTime>;
5565
+ attempts: z.ZodNumber;
5566
+ counted: z.ZodNumber;
5567
+ leadMs: z.ZodNullable<z.ZodNumber>;
5568
+ knownUsd: z.ZodNumber;
5569
+ unknownCalls: z.ZodNumber;
5570
+ costBound: z.ZodEnum<{
5571
+ exact: "exact";
5572
+ unknown: "unknown";
5573
+ lower: "lower";
5574
+ upper: "upper";
5575
+ }>;
5576
+ rejections: z.ZodArray<z.ZodObject<{
5577
+ key: z.ZodEnum<{
5578
+ unknown: "unknown";
5579
+ integration: "integration";
5580
+ environment: "environment";
5581
+ operator: "operator";
5582
+ budget: "budget";
5583
+ defect: "defect";
5584
+ incomplete: "incomplete";
5585
+ "time-limit": "time-limit";
5586
+ tool: "tool";
5587
+ unclassified: "unclassified";
5588
+ }>;
5589
+ count: z.ZodNumber;
5590
+ }, z.core.$strict>>;
5591
+ }, z.core.$strict>>;
5592
+ total: z.ZodNumber;
5593
+ truncated: z.ZodBoolean;
5594
+ }, z.core.$strict>;
5595
+ limitations: z.ZodArray<z.ZodObject<{
5596
+ id: z.ZodString;
5597
+ text: z.ZodString;
5598
+ }, z.core.$strict>>;
5599
+ }, z.core.$strict>, z.ZodObject<{
5600
+ out: z.ZodString;
5601
+ format: z.ZodEnum<{
5602
+ json: "json";
5603
+ md: "md";
5604
+ html: "html";
5605
+ }>;
5606
+ bytes: z.ZodNumber;
5607
+ asOf: z.ZodISODateTime;
5608
+ }, z.core.$strict>]>;
4481
5609
  readonly 'plan-request': z.ZodObject<{
4482
5610
  prompt: z.ZodString;
4483
5611
  readOnly: z.ZodLiteral<true>;