devcontour-harness 0.1.0-alpha.35 → 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 (116) hide show
  1. package/README.md +16 -2
  2. package/docs/contracts.md +261 -33
  3. package/docs/release-notes/0.1.0-alpha.36.md +26 -0
  4. package/docs/release-notes/0.1.0-alpha.37.md +40 -0
  5. package/docs/standalone.md +20 -0
  6. package/docs/toolchains.md +57 -2
  7. package/docs/upgrade.md +108 -0
  8. package/lib/agents/schemas.d.ts +84 -2
  9. package/lib/agents/schemas.js +49 -1
  10. package/lib/cli.js +149 -1
  11. package/lib/contracts/cli.d.ts +1495 -170
  12. package/lib/contracts/cli.js +232 -2
  13. package/lib/contracts/diagnosis.d.ts +8 -4
  14. package/lib/contracts/diagnosis.js +3 -0
  15. package/lib/contracts/errors.d.ts +7 -1
  16. package/lib/contracts/errors.js +6 -0
  17. package/lib/contracts/events.d.ts +453 -60
  18. package/lib/contracts/events.js +79 -0
  19. package/lib/contracts/execution.d.ts +270 -50
  20. package/lib/contracts/execution.js +41 -0
  21. package/lib/contracts/failure.d.ts +14 -1
  22. package/lib/contracts/failure.js +9 -1
  23. package/lib/contracts/handoff.d.ts +70 -20
  24. package/lib/contracts/handoff.js +42 -1
  25. package/lib/contracts/index.d.ts +1 -0
  26. package/lib/contracts/index.js +1 -0
  27. package/lib/contracts/input-state.d.ts +13 -0
  28. package/lib/contracts/input-state.js +32 -0
  29. package/lib/contracts/input.d.ts +442 -0
  30. package/lib/contracts/input.js +321 -0
  31. package/lib/contracts/planning.d.ts +2 -0
  32. package/lib/contracts/policy.d.ts +17 -2
  33. package/lib/contracts/policy.js +31 -2
  34. package/lib/contracts/ports.d.ts +54 -0
  35. package/lib/contracts/project.d.ts +127 -0
  36. package/lib/contracts/project.js +99 -0
  37. package/lib/contracts/published.d.ts +603 -92
  38. package/lib/contracts/published.js +4 -1
  39. package/lib/contracts/repair-policy.d.ts +20 -0
  40. package/lib/contracts/repair-policy.js +34 -0
  41. package/lib/contracts/report.d.ts +53 -21
  42. package/lib/contracts/report.js +33 -2
  43. package/lib/contracts/result.d.ts +26 -24
  44. package/lib/contracts/review.d.ts +47 -8
  45. package/lib/contracts/review.js +21 -1
  46. package/lib/control/harness.d.ts +2555 -51
  47. package/lib/control/harness.js +112 -6
  48. package/lib/control/recovery.d.ts +2 -2
  49. package/lib/control/report.js +1 -0
  50. package/lib/control/status.d.ts +30 -22
  51. package/lib/control/status.js +11 -1
  52. package/lib/control/workflow.d.ts +8 -8
  53. package/lib/engine/budget.d.ts +86 -3
  54. package/lib/engine/budget.js +45 -10
  55. package/lib/engine/engine.d.ts +3091 -85
  56. package/lib/engine/engine.js +1206 -101
  57. package/lib/engine/input-policy.d.ts +68 -0
  58. package/lib/engine/input-policy.js +285 -0
  59. package/lib/engine/input-requests.d.ts +64 -0
  60. package/lib/engine/input-requests.js +187 -0
  61. package/lib/engine/measured.d.ts +6 -1
  62. package/lib/engine/measured.js +12 -1
  63. package/lib/engine/prompt.d.ts +4 -2
  64. package/lib/engine/prompt.js +3 -1
  65. package/lib/engine/property-recovery.js +2 -0
  66. package/lib/engine/repair.d.ts +2 -0
  67. package/lib/engine/repair.js +10 -3
  68. package/lib/engine/runner.d.ts +33 -4
  69. package/lib/engine/runner.js +266 -23
  70. package/lib/environment/lifecycle.d.ts +8 -0
  71. package/lib/environment/lifecycle.js +15 -2
  72. package/lib/explain/state.d.ts +16 -2
  73. package/lib/explain/state.js +254 -77
  74. package/lib/handoff/markdown.js +10 -0
  75. package/lib/handoff/pack.js +42 -1
  76. package/lib/index.d.ts +10 -0
  77. package/lib/index.js +10 -0
  78. package/lib/init/inspect.d.ts +34 -0
  79. package/lib/init/inspect.js +292 -0
  80. package/lib/init/project.js +14 -31
  81. package/lib/integrations/connector/commands.d.ts +12 -12
  82. package/lib/integrations/connector/config.d.ts +4 -4
  83. package/lib/integrations/connector/delivery.d.ts +1 -1
  84. package/lib/integrations/relay-v2/protocol.d.ts +4 -4
  85. package/lib/profiles/resolve.d.ts +2 -1
  86. package/lib/projections/enums.d.ts +1 -1
  87. package/lib/projections/enums.js +4 -0
  88. package/lib/projections/index.d.ts +1 -0
  89. package/lib/projections/index.js +1 -0
  90. package/lib/projections/input.d.ts +17 -0
  91. package/lib/projections/input.js +28 -0
  92. package/lib/projections/stop.d.ts +40 -1
  93. package/lib/projections/stop.js +87 -4
  94. package/lib/report/compute.d.ts +4 -1
  95. package/lib/report/compute.js +25 -0
  96. package/lib/report/document.js +1 -0
  97. package/lib/storage/document.d.ts +66 -28
  98. package/lib/testing/index.d.ts +1 -1
  99. package/lib/testing/index.js +1 -1
  100. package/lib/testing/store-contract.d.ts +8 -1
  101. package/lib/testing/store-contract.js +194 -1
  102. package/lib/verification/confirm.d.ts +3 -3
  103. package/lib/verification/corpus.d.ts +9 -9
  104. package/lib/verification/gates.d.ts +119 -0
  105. package/lib/verification/gates.js +311 -4
  106. package/package.json +1 -1
  107. package/schemas/execution-document.schema.json +130 -0
  108. package/schemas/execution-policy.schema.json +26 -0
  109. package/schemas/handoff-pack.schema.json +146 -4
  110. package/schemas/input-request.schema.json +665 -0
  111. package/schemas/project-facts.schema.json +393 -0
  112. package/schemas/result-envelope.schema.json +1 -0
  113. package/schemas/run-event.schema.json +625 -0
  114. package/schemas/run-result.schema.json +1 -0
  115. package/schemas/stop-diagnosis.schema.json +5 -1
  116. package/schemas/value-report.schema.json +78 -7
@@ -13,10 +13,10 @@ import { z } from 'zod';
13
13
  */
14
14
  export declare const workStatuses: readonly ["draft", "ready", "running", "verifying", "reviewing", "integrating", "done", "failed", "cancelled"];
15
15
  export declare const workStatusSchema: z.ZodEnum<{
16
- ready: "ready";
17
- failed: "failed";
18
16
  cancelled: "cancelled";
19
17
  draft: "draft";
18
+ ready: "ready";
19
+ failed: "failed";
20
20
  running: "running";
21
21
  verifying: "verifying";
22
22
  reviewing: "reviewing";
@@ -24,7 +24,7 @@ export declare const workStatusSchema: z.ZodEnum<{
24
24
  done: "done";
25
25
  }>;
26
26
  export type WorkStatus = (typeof workStatuses)[number];
27
- export declare const failureKinds: readonly ["provider-auth", "environment", "timeout", "stalled", "context-exhausted", "stale-base", "empty-result", "unfinished", "scope-violation", "gate", "review", "review-protocol", "merge", "cancelled", "budget", "needs-lead", "unknown"];
27
+ export declare const failureKinds: readonly ["provider-auth", "environment", "timeout", "stalled", "context-exhausted", "stale-base", "empty-result", "unfinished", "scope-violation", "gate", "review", "review-protocol", "merge", "cancelled", "budget", "needs-lead", "needs-input", "unknown"];
28
28
  export declare const failureKindSchema: z.ZodEnum<{
29
29
  gate: "gate";
30
30
  unknown: "unknown";
@@ -43,6 +43,7 @@ export declare const failureKindSchema: z.ZodEnum<{
43
43
  merge: "merge";
44
44
  budget: "budget";
45
45
  "needs-lead": "needs-lead";
46
+ "needs-input": "needs-input";
46
47
  }>;
47
48
  export type FailureKind = (typeof failureKinds)[number];
48
49
  /**
@@ -76,8 +77,8 @@ export type LivenessState = (typeof livenessStates)[number];
76
77
  export declare const activitySchema: z.ZodObject<{
77
78
  kind: z.ZodEnum<{
78
79
  gate: "gate";
79
- command: "command";
80
80
  agent: "agent";
81
+ command: "command";
81
82
  step: "step";
82
83
  }>;
83
84
  label: z.ZodString;
@@ -100,8 +101,8 @@ export declare const attemptLivenessSchema: z.ZodObject<{
100
101
  activity: z.ZodOptional<z.ZodObject<{
101
102
  kind: z.ZodEnum<{
102
103
  gate: "gate";
103
- command: "command";
104
104
  agent: "agent";
105
+ command: "command";
105
106
  step: "step";
106
107
  }>;
107
108
  label: z.ZodString;
@@ -116,8 +117,8 @@ export type AttemptLiveness = z.infer<typeof attemptLivenessSchema>;
116
117
  /** Техническое согласование, привязанное к digest проверенного предложения. */
117
118
  export declare const technicalApprovalSchema: z.ZodObject<{
118
119
  actor: z.ZodEnum<{
119
- agent: "agent";
120
120
  operator: "operator";
121
+ agent: "agent";
121
122
  }>;
122
123
  authorRuntime: z.ZodOptional<z.ZodEnum<{
123
124
  codex: "codex";
@@ -274,9 +275,9 @@ export declare const reviewInspectionSchema: z.ZodObject<{
274
275
  }, z.core.$strict>], "type">>>;
275
276
  status: z.ZodOptional<z.ZodEnum<{
276
277
  error: "error";
278
+ cancelled: "cancelled";
277
279
  passed: "passed";
278
280
  failed: "failed";
279
- cancelled: "cancelled";
280
281
  completed: "completed";
281
282
  timeout: "timeout";
282
283
  }>>;
@@ -320,8 +321,8 @@ export declare const evidenceFindingSchema: z.ZodObject<{
320
321
  line: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
321
322
  id: z.ZodOptional<z.ZodString>;
322
323
  status: z.ZodOptional<z.ZodEnum<{
323
- open: "open";
324
324
  closed: "closed";
325
+ open: "open";
325
326
  withdrawn: "withdrawn";
326
327
  }>>;
327
328
  }, z.core.$strict>;
@@ -329,8 +330,8 @@ export declare const evidenceRecordSchema: z.ZodObject<{
329
330
  id: z.ZodString;
330
331
  runId: z.ZodString;
331
332
  kind: z.ZodEnum<{
332
- test: "test";
333
333
  review: "review";
334
+ test: "test";
334
335
  }>;
335
336
  phase: z.ZodEnum<{
336
337
  candidate: "candidate";
@@ -378,9 +379,9 @@ export declare const evidenceRecordSchema: z.ZodObject<{
378
379
  }, z.core.$strict>], "type">>>;
379
380
  status: z.ZodOptional<z.ZodEnum<{
380
381
  error: "error";
382
+ cancelled: "cancelled";
381
383
  passed: "passed";
382
384
  failed: "failed";
383
- cancelled: "cancelled";
384
385
  completed: "completed";
385
386
  timeout: "timeout";
386
387
  }>>;
@@ -424,8 +425,8 @@ export declare const evidenceRecordSchema: z.ZodObject<{
424
425
  line: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
425
426
  id: z.ZodOptional<z.ZodString>;
426
427
  status: z.ZodOptional<z.ZodEnum<{
427
- open: "open";
428
428
  closed: "closed";
429
+ open: "open";
429
430
  withdrawn: "withdrawn";
430
431
  }>>;
431
432
  }, z.core.$strict>>>;
@@ -456,13 +457,13 @@ export declare const evidenceRecordSchema: z.ZodObject<{
456
457
  transitions: z.ZodOptional<z.ZodArray<z.ZodObject<{
457
458
  id: z.ZodString;
458
459
  from: z.ZodEnum<{
459
- open: "open";
460
460
  closed: "closed";
461
+ open: "open";
461
462
  withdrawn: "withdrawn";
462
463
  }>;
463
464
  to: z.ZodEnum<{
464
- open: "open";
465
465
  closed: "closed";
466
+ open: "open";
466
467
  withdrawn: "withdrawn";
467
468
  }>;
468
469
  basis: z.ZodString;
@@ -681,6 +682,7 @@ export declare const continuationSchema: z.ZodObject<{
681
682
  merge: "merge";
682
683
  budget: "budget";
683
684
  "needs-lead": "needs-lead";
685
+ "needs-input": "needs-input";
684
686
  }>>;
685
687
  respecified: z.ZodOptional<z.ZodBoolean>;
686
688
  applied: z.ZodBoolean;
@@ -724,17 +726,17 @@ export declare const attemptStateSchema: z.ZodObject<{
724
726
  reviewerEffort: z.ZodOptional<z.ZodString>;
725
727
  policyDigest: z.ZodString;
726
728
  status: z.ZodEnum<{
727
- failed: "failed";
728
729
  cancelled: "cancelled";
730
+ failed: "failed";
729
731
  active: "active";
730
732
  expired: "expired";
731
733
  succeeded: "succeeded";
732
734
  }>;
733
735
  phase: z.ZodEnum<{
734
- ready: "ready";
735
- failed: "failed";
736
736
  cancelled: "cancelled";
737
737
  draft: "draft";
738
+ ready: "ready";
739
+ failed: "failed";
738
740
  running: "running";
739
741
  verifying: "verifying";
740
742
  reviewing: "reviewing";
@@ -768,6 +770,7 @@ export declare const attemptStateSchema: z.ZodObject<{
768
770
  merge: "merge";
769
771
  budget: "budget";
770
772
  "needs-lead": "needs-lead";
773
+ "needs-input": "needs-input";
771
774
  }>>;
772
775
  contextLimit: z.ZodOptional<z.ZodEnum<{
773
776
  "prompt-too-long": "prompt-too-long";
@@ -886,11 +889,39 @@ export declare const attemptStateSchema: z.ZodObject<{
886
889
  merge: "merge";
887
890
  budget: "budget";
888
891
  "needs-lead": "needs-lead";
892
+ "needs-input": "needs-input";
889
893
  }>>;
890
894
  respecified: z.ZodOptional<z.ZodBoolean>;
891
895
  applied: z.ZodBoolean;
892
896
  files: z.ZodArray<z.ZodString>;
893
897
  }, z.core.$strict>>;
898
+ inputPolicy: z.ZodOptional<z.ZodObject<{
899
+ threshold: z.ZodDefault<z.ZodNumber>;
900
+ criticalPaths: z.ZodDefault<z.ZodArray<z.ZodString>>;
901
+ }, z.core.$strict>>;
902
+ assumptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
903
+ question: z.ZodString;
904
+ chosen: z.ZodString;
905
+ rationale: z.ZodString;
906
+ severity: z.ZodNumber;
907
+ affects: z.ZodArray<z.ZodEnum<{
908
+ acceptance: "acceptance";
909
+ contract: "contract";
910
+ product: "product";
911
+ api: "api";
912
+ migration: "migration";
913
+ }>>;
914
+ effectiveSeverity: z.ZodNumber;
915
+ floors: z.ZodArray<z.ZodEnum<{
916
+ declared: "declared";
917
+ "critical-path": "critical-path";
918
+ }>>;
919
+ }, z.core.$strict>>>;
920
+ input: z.ZodOptional<z.ZodObject<{
921
+ requestId: z.ZodString;
922
+ answerDigest: z.ZodString;
923
+ targetDigest: z.ZodString;
924
+ }, z.core.$strict>>;
894
925
  callsRecorded: z.ZodOptional<z.ZodLiteral<true>>;
895
926
  dispatch: z.ZodOptional<z.ZodObject<{
896
927
  policy: z.ZodLiteral<"fifo-ready-v1">;
@@ -919,8 +950,8 @@ export declare const attemptStateSchema: z.ZodObject<{
919
950
  activity: z.ZodOptional<z.ZodObject<{
920
951
  kind: z.ZodEnum<{
921
952
  gate: "gate";
922
- command: "command";
923
953
  agent: "agent";
954
+ command: "command";
924
955
  step: "step";
925
956
  }>;
926
957
  label: z.ZodString;
@@ -951,6 +982,7 @@ export declare const attemptStateSchema: z.ZodObject<{
951
982
  ref: z.ZodString;
952
983
  revision: z.ZodString;
953
984
  }, z.core.$strict>;
985
+ contextDigest: z.ZodOptional<z.ZodNullable<z.ZodString>>;
954
986
  }, z.core.$strict>>;
955
987
  engineVersion: z.ZodOptional<z.ZodString>;
956
988
  consumerVersion: z.ZodOptional<z.ZodString>;
@@ -958,8 +990,8 @@ export declare const attemptStateSchema: z.ZodObject<{
958
990
  id: z.ZodString;
959
991
  runId: z.ZodString;
960
992
  kind: z.ZodEnum<{
961
- test: "test";
962
993
  review: "review";
994
+ test: "test";
963
995
  }>;
964
996
  phase: z.ZodEnum<{
965
997
  candidate: "candidate";
@@ -1007,9 +1039,9 @@ export declare const attemptStateSchema: z.ZodObject<{
1007
1039
  }, z.core.$strict>], "type">>>;
1008
1040
  status: z.ZodOptional<z.ZodEnum<{
1009
1041
  error: "error";
1042
+ cancelled: "cancelled";
1010
1043
  passed: "passed";
1011
1044
  failed: "failed";
1012
- cancelled: "cancelled";
1013
1045
  completed: "completed";
1014
1046
  timeout: "timeout";
1015
1047
  }>>;
@@ -1053,8 +1085,8 @@ export declare const attemptStateSchema: z.ZodObject<{
1053
1085
  line: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1054
1086
  id: z.ZodOptional<z.ZodString>;
1055
1087
  status: z.ZodOptional<z.ZodEnum<{
1056
- open: "open";
1057
1088
  closed: "closed";
1089
+ open: "open";
1058
1090
  withdrawn: "withdrawn";
1059
1091
  }>>;
1060
1092
  }, z.core.$strict>>>;
@@ -1085,13 +1117,13 @@ export declare const attemptStateSchema: z.ZodObject<{
1085
1117
  transitions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1086
1118
  id: z.ZodString;
1087
1119
  from: z.ZodEnum<{
1088
- open: "open";
1089
1120
  closed: "closed";
1121
+ open: "open";
1090
1122
  withdrawn: "withdrawn";
1091
1123
  }>;
1092
1124
  to: z.ZodEnum<{
1093
- open: "open";
1094
1125
  closed: "closed";
1126
+ open: "open";
1095
1127
  withdrawn: "withdrawn";
1096
1128
  }>;
1097
1129
  basis: z.ZodString;
@@ -1345,10 +1377,10 @@ export declare const workStateSchema: z.ZodObject<{
1345
1377
  context: z.ZodDefault<z.ZodArray<z.ZodString>>;
1346
1378
  }, z.core.$strict>;
1347
1379
  status: z.ZodEnum<{
1348
- ready: "ready";
1349
- failed: "failed";
1350
1380
  cancelled: "cancelled";
1351
1381
  draft: "draft";
1382
+ ready: "ready";
1383
+ failed: "failed";
1352
1384
  running: "running";
1353
1385
  verifying: "verifying";
1354
1386
  reviewing: "reviewing";
@@ -1377,6 +1409,7 @@ export declare const workStateSchema: z.ZodObject<{
1377
1409
  merge: "merge";
1378
1410
  budget: "budget";
1379
1411
  "needs-lead": "needs-lead";
1412
+ "needs-input": "needs-input";
1380
1413
  }>>;
1381
1414
  failureFingerprint: z.ZodOptional<z.ZodString>;
1382
1415
  approvedAt: z.ZodOptional<z.ZodISODateTime>;
@@ -1384,8 +1417,8 @@ export declare const workStateSchema: z.ZodObject<{
1384
1417
  approvedScope: z.ZodOptional<z.ZodString>;
1385
1418
  approval: z.ZodOptional<z.ZodObject<{
1386
1419
  actor: z.ZodEnum<{
1387
- agent: "agent";
1388
1420
  operator: "operator";
1421
+ agent: "agent";
1389
1422
  }>;
1390
1423
  authorRuntime: z.ZodOptional<z.ZodEnum<{
1391
1424
  codex: "codex";
@@ -1595,8 +1628,8 @@ export declare const graphStateSchema: z.ZodObject<{
1595
1628
  policyDigest: z.ZodString;
1596
1629
  approval: z.ZodOptional<z.ZodObject<{
1597
1630
  actor: z.ZodEnum<{
1598
- agent: "agent";
1599
1631
  operator: "operator";
1632
+ agent: "agent";
1600
1633
  }>;
1601
1634
  authorRuntime: z.ZodOptional<z.ZodEnum<{
1602
1635
  codex: "codex";
@@ -1629,8 +1662,8 @@ export type PauseReason = (typeof pauseReasons)[number];
1629
1662
  export declare const controlStateSchema: z.ZodObject<{
1630
1663
  paused: z.ZodBoolean;
1631
1664
  pauseReason: z.ZodOptional<z.ZodEnum<{
1632
- runtime: "runtime";
1633
1665
  operator: "operator";
1666
+ runtime: "runtime";
1634
1667
  shutdown: "shutdown";
1635
1668
  "base-check": "base-check";
1636
1669
  reconfigure: "reconfigure";
@@ -1655,6 +1688,7 @@ export declare const controlStateSchema: z.ZodObject<{
1655
1688
  merge: "merge";
1656
1689
  budget: "budget";
1657
1690
  "needs-lead": "needs-lead";
1691
+ "needs-input": "needs-input";
1658
1692
  }>>>;
1659
1693
  waits: z.ZodOptional<z.ZodArray<z.ZodObject<{
1660
1694
  kind: z.ZodEnum<{
@@ -1906,10 +1940,10 @@ export declare const checkSuiteSchema: z.ZodObject<{
1906
1940
  version: z.ZodOptional<z.ZodNumber>;
1907
1941
  origin: z.ZodObject<{
1908
1942
  kind: z.ZodEnum<{
1909
- review: "review";
1910
- agent: "agent";
1911
1943
  operator: "operator";
1912
1944
  lead: "lead";
1945
+ review: "review";
1946
+ agent: "agent";
1913
1947
  }>;
1914
1948
  runtime: z.ZodOptional<z.ZodString>;
1915
1949
  }, z.core.$strict>;
@@ -1982,11 +2016,11 @@ export declare const workflowJobSchema: z.ZodObject<{
1982
2016
  stage: z.ZodNumber;
1983
2017
  attempts: z.ZodNumber;
1984
2018
  status: z.ZodEnum<{
2019
+ stale: "stale";
1985
2020
  failed: "failed";
1986
2021
  completed: "completed";
1987
2022
  running: "running";
1988
2023
  queued: "queued";
1989
- stale: "stale";
1990
2024
  }>;
1991
2025
  repairs: z.ZodOptional<z.ZodNumber>;
1992
2026
  token: z.ZodOptional<z.ZodString>;
@@ -2208,9 +2242,9 @@ export declare const localSchemas: {
2208
2242
  key: z.ZodString;
2209
2243
  revision: z.ZodString;
2210
2244
  status: z.ZodEnum<{
2211
- failed: "failed";
2212
2245
  pending: "pending";
2213
2246
  delivered: "delivered";
2247
+ failed: "failed";
2214
2248
  conflict: "conflict";
2215
2249
  uncertain: "uncertain";
2216
2250
  }>;
@@ -2225,8 +2259,8 @@ export declare const localSchemas: {
2225
2259
  readonly reviews: z.ZodObject<{
2226
2260
  id: z.ZodString;
2227
2261
  kind: z.ZodEnum<{
2228
- plan: "plan";
2229
2262
  contract: "contract";
2263
+ plan: "plan";
2230
2264
  }>;
2231
2265
  subject: z.ZodString;
2232
2266
  digest: z.ZodString;
@@ -2260,8 +2294,8 @@ export declare const localSchemas: {
2260
2294
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2261
2295
  line: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2262
2296
  status: z.ZodEnum<{
2263
- open: "open";
2264
2297
  closed: "closed";
2298
+ open: "open";
2265
2299
  withdrawn: "withdrawn";
2266
2300
  }>;
2267
2301
  openedIn: z.ZodNumber;
@@ -2347,10 +2381,10 @@ export declare const localSchemas: {
2347
2381
  version: z.ZodOptional<z.ZodNumber>;
2348
2382
  origin: z.ZodObject<{
2349
2383
  kind: z.ZodEnum<{
2350
- review: "review";
2351
- agent: "agent";
2352
2384
  operator: "operator";
2353
2385
  lead: "lead";
2386
+ review: "review";
2387
+ agent: "agent";
2354
2388
  }>;
2355
2389
  runtime: z.ZodOptional<z.ZodString>;
2356
2390
  }, z.core.$strict>;
@@ -2416,11 +2450,11 @@ export declare const localSchemas: {
2416
2450
  stage: z.ZodNumber;
2417
2451
  attempts: z.ZodNumber;
2418
2452
  status: z.ZodEnum<{
2453
+ stale: "stale";
2419
2454
  failed: "failed";
2420
2455
  completed: "completed";
2421
2456
  running: "running";
2422
2457
  queued: "queued";
2423
- stale: "stale";
2424
2458
  }>;
2425
2459
  repairs: z.ZodOptional<z.ZodNumber>;
2426
2460
  token: z.ZodOptional<z.ZodString>;
@@ -2620,6 +2654,160 @@ export declare const localSchemas: {
2620
2654
  }, z.core.$strict>>;
2621
2655
  }, z.core.$strict>>;
2622
2656
  }, z.core.$strict>;
2657
+ /**
2658
+ * Вопросы исполнителей и ответы на них (`InputRequest`) по владельцу —
2659
+ * репозиторию поручения. Вопрос и основание неизменяемы, ответы только
2660
+ * дополняются, `version` — CAS записи: это правила движка (все записи —
2661
+ * через его операции); хранилище хранит запись целиком, как записана, и
2662
+ * отдаёт её в списке без владельца с `owner` и `key` (`executionStoreContract`).
2663
+ */
2664
+ readonly 'input-requests': z.ZodObject<{
2665
+ id: z.ZodString;
2666
+ kind: z.ZodEnum<{
2667
+ question: "question";
2668
+ "follow-up": "follow-up";
2669
+ }>;
2670
+ blocking: z.ZodBoolean;
2671
+ workId: z.ZodString;
2672
+ graphId: z.ZodString;
2673
+ runId: z.ZodString;
2674
+ attempt: z.ZodNumber;
2675
+ callId: z.ZodNullable<z.ZodString>;
2676
+ question: z.ZodObject<{
2677
+ question: z.ZodString;
2678
+ options: z.ZodArray<z.ZodObject<{
2679
+ id: z.ZodString;
2680
+ label: z.ZodString;
2681
+ consequence: z.ZodNullable<z.ZodString>;
2682
+ }, z.core.$strict>>;
2683
+ recommended: z.ZodNullable<z.ZodString>;
2684
+ severity: z.ZodNumber;
2685
+ rationale: z.ZodString;
2686
+ affects: z.ZodArray<z.ZodEnum<{
2687
+ acceptance: "acceptance";
2688
+ contract: "contract";
2689
+ product: "product";
2690
+ api: "api";
2691
+ migration: "migration";
2692
+ }>>;
2693
+ }, z.core.$strict>;
2694
+ effectiveSeverity: z.ZodNumber;
2695
+ floors: z.ZodArray<z.ZodEnum<{
2696
+ declared: "declared";
2697
+ "critical-path": "critical-path";
2698
+ }>>;
2699
+ criticalHits: z.ZodArray<z.ZodString>;
2700
+ draft: z.ZodNullable<z.ZodObject<{
2701
+ digest: z.ZodString;
2702
+ files: z.ZodArray<z.ZodString>;
2703
+ }, z.core.$strict>>;
2704
+ createdAt: z.ZodISODateTime;
2705
+ originBasis: z.ZodObject<{
2706
+ source: z.ZodObject<{
2707
+ connector: z.ZodString;
2708
+ ref: z.ZodString;
2709
+ revision: z.ZodString;
2710
+ }, z.core.$strict>;
2711
+ graphId: z.ZodString;
2712
+ graphDigest: z.ZodString;
2713
+ orderDigest: z.ZodString;
2714
+ policyDigest: z.ZodString;
2715
+ contextDigest: z.ZodNullable<z.ZodString>;
2716
+ baseSha: z.ZodNullable<z.ZodString>;
2717
+ inputPolicy: z.ZodObject<{
2718
+ threshold: z.ZodDefault<z.ZodNumber>;
2719
+ criticalPaths: z.ZodDefault<z.ZodArray<z.ZodString>>;
2720
+ }, z.core.$strict>;
2721
+ contentDigest: z.ZodOptional<z.ZodString>;
2722
+ }, z.core.$strict>;
2723
+ lifecycle: z.ZodEnum<{
2724
+ pending: "pending";
2725
+ answered: "answered";
2726
+ applied: "applied";
2727
+ cancelled: "cancelled";
2728
+ superseded: "superseded";
2729
+ }>;
2730
+ answers: z.ZodArray<z.ZodObject<{
2731
+ revision: z.ZodNumber;
2732
+ text: z.ZodString;
2733
+ optionId: z.ZodNullable<z.ZodString>;
2734
+ kind: z.ZodEnum<{
2735
+ clarification: "clarification";
2736
+ "requirement-change": "requirement-change";
2737
+ }>;
2738
+ actor: z.ZodObject<{
2739
+ kind: z.ZodEnum<{
2740
+ operator: "operator";
2741
+ lead: "lead";
2742
+ host: "host";
2743
+ }>;
2744
+ id: z.ZodOptional<z.ZodString>;
2745
+ }, z.core.$strict>;
2746
+ messageRef: z.ZodOptional<z.ZodString>;
2747
+ digest: z.ZodString;
2748
+ at: z.ZodISODateTime;
2749
+ }, z.core.$strict>>;
2750
+ target: z.ZodOptional<z.ZodObject<{
2751
+ originDigest: z.ZodString;
2752
+ answerDigest: z.ZodString;
2753
+ graphDigest: z.ZodString;
2754
+ orderDigest: z.ZodString;
2755
+ contentDigest: z.ZodOptional<z.ZodString>;
2756
+ policyDigest: z.ZodString;
2757
+ contextDigest: z.ZodNullable<z.ZodString>;
2758
+ review: z.ZodNullable<z.ZodObject<{
2759
+ round: z.ZodNumber;
2760
+ approved: z.ZodBoolean;
2761
+ reviewerBinding: z.ZodNullable<z.ZodString>;
2762
+ }, z.core.$strict>>;
2763
+ actor: z.ZodEnum<{
2764
+ operator: "operator";
2765
+ agent: "agent";
2766
+ }>;
2767
+ digest: z.ZodString;
2768
+ }, z.core.$strict>>;
2769
+ delivered: z.ZodOptional<z.ZodObject<{
2770
+ runId: z.ZodString;
2771
+ callId: z.ZodString;
2772
+ at: z.ZodISODateTime;
2773
+ }, z.core.$strict>>;
2774
+ closed: z.ZodOptional<z.ZodObject<{
2775
+ at: z.ZodISODateTime;
2776
+ by: z.ZodEnum<{
2777
+ operator: "operator";
2778
+ lead: "lead";
2779
+ host: "host";
2780
+ controller: "controller";
2781
+ }>;
2782
+ reason: z.ZodString;
2783
+ successor: z.ZodOptional<z.ZodString>;
2784
+ carry: z.ZodOptional<z.ZodBoolean>;
2785
+ previous: z.ZodOptional<z.ZodObject<{
2786
+ at: z.ZodISODateTime;
2787
+ by: z.ZodEnum<{
2788
+ operator: "operator";
2789
+ lead: "lead";
2790
+ host: "host";
2791
+ controller: "controller";
2792
+ }>;
2793
+ reason: z.ZodString;
2794
+ successor: z.ZodOptional<z.ZodString>;
2795
+ carry: z.ZodOptional<z.ZodBoolean>;
2796
+ }, z.core.$strict>>;
2797
+ }, z.core.$strict>>;
2798
+ stale: z.ZodOptional<z.ZodObject<{
2799
+ targetDigest: z.ZodString;
2800
+ reason: z.ZodEnum<{
2801
+ context: "context";
2802
+ graph: "graph";
2803
+ order: "order";
2804
+ policy: "policy";
2805
+ }>;
2806
+ at: z.ZodISODateTime;
2807
+ }, z.core.$strict>>;
2808
+ normalized: z.ZodOptional<z.ZodArray<z.ZodString>>;
2809
+ version: z.ZodNumber;
2810
+ }, z.core.$strict>;
2623
2811
  };
2624
2812
  export type LocalNamespace = keyof typeof localSchemas;
2625
2813
  export type LocalValue<N extends LocalNamespace> = z.infer<(typeof localSchemas)[N]>;
@@ -2904,8 +3092,8 @@ export declare const executionDocumentSchema: z.ZodObject<{
2904
3092
  policyDigest: z.ZodString;
2905
3093
  approval: z.ZodOptional<z.ZodObject<{
2906
3094
  actor: z.ZodEnum<{
2907
- agent: "agent";
2908
3095
  operator: "operator";
3096
+ agent: "agent";
2909
3097
  }>;
2910
3098
  authorRuntime: z.ZodOptional<z.ZodEnum<{
2911
3099
  codex: "codex";
@@ -2968,10 +3156,10 @@ export declare const executionDocumentSchema: z.ZodObject<{
2968
3156
  context: z.ZodDefault<z.ZodArray<z.ZodString>>;
2969
3157
  }, z.core.$strict>;
2970
3158
  status: z.ZodEnum<{
2971
- ready: "ready";
2972
- failed: "failed";
2973
3159
  cancelled: "cancelled";
2974
3160
  draft: "draft";
3161
+ ready: "ready";
3162
+ failed: "failed";
2975
3163
  running: "running";
2976
3164
  verifying: "verifying";
2977
3165
  reviewing: "reviewing";
@@ -3000,6 +3188,7 @@ export declare const executionDocumentSchema: z.ZodObject<{
3000
3188
  merge: "merge";
3001
3189
  budget: "budget";
3002
3190
  "needs-lead": "needs-lead";
3191
+ "needs-input": "needs-input";
3003
3192
  }>>;
3004
3193
  failureFingerprint: z.ZodOptional<z.ZodString>;
3005
3194
  approvedAt: z.ZodOptional<z.ZodISODateTime>;
@@ -3007,8 +3196,8 @@ export declare const executionDocumentSchema: z.ZodObject<{
3007
3196
  approvedScope: z.ZodOptional<z.ZodString>;
3008
3197
  approval: z.ZodOptional<z.ZodObject<{
3009
3198
  actor: z.ZodEnum<{
3010
- agent: "agent";
3011
3199
  operator: "operator";
3200
+ agent: "agent";
3012
3201
  }>;
3013
3202
  authorRuntime: z.ZodOptional<z.ZodEnum<{
3014
3203
  codex: "codex";
@@ -3174,17 +3363,17 @@ export declare const executionDocumentSchema: z.ZodObject<{
3174
3363
  reviewerEffort: z.ZodOptional<z.ZodString>;
3175
3364
  policyDigest: z.ZodString;
3176
3365
  status: z.ZodEnum<{
3177
- failed: "failed";
3178
3366
  cancelled: "cancelled";
3367
+ failed: "failed";
3179
3368
  active: "active";
3180
3369
  expired: "expired";
3181
3370
  succeeded: "succeeded";
3182
3371
  }>;
3183
3372
  phase: z.ZodEnum<{
3184
- ready: "ready";
3185
- failed: "failed";
3186
3373
  cancelled: "cancelled";
3187
3374
  draft: "draft";
3375
+ ready: "ready";
3376
+ failed: "failed";
3188
3377
  running: "running";
3189
3378
  verifying: "verifying";
3190
3379
  reviewing: "reviewing";
@@ -3218,6 +3407,7 @@ export declare const executionDocumentSchema: z.ZodObject<{
3218
3407
  merge: "merge";
3219
3408
  budget: "budget";
3220
3409
  "needs-lead": "needs-lead";
3410
+ "needs-input": "needs-input";
3221
3411
  }>>;
3222
3412
  contextLimit: z.ZodOptional<z.ZodEnum<{
3223
3413
  "prompt-too-long": "prompt-too-long";
@@ -3336,11 +3526,39 @@ export declare const executionDocumentSchema: z.ZodObject<{
3336
3526
  merge: "merge";
3337
3527
  budget: "budget";
3338
3528
  "needs-lead": "needs-lead";
3529
+ "needs-input": "needs-input";
3339
3530
  }>>;
3340
3531
  respecified: z.ZodOptional<z.ZodBoolean>;
3341
3532
  applied: z.ZodBoolean;
3342
3533
  files: z.ZodArray<z.ZodString>;
3343
3534
  }, z.core.$strict>>;
3535
+ inputPolicy: z.ZodOptional<z.ZodObject<{
3536
+ threshold: z.ZodDefault<z.ZodNumber>;
3537
+ criticalPaths: z.ZodDefault<z.ZodArray<z.ZodString>>;
3538
+ }, z.core.$strict>>;
3539
+ assumptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
3540
+ question: z.ZodString;
3541
+ chosen: z.ZodString;
3542
+ rationale: z.ZodString;
3543
+ severity: z.ZodNumber;
3544
+ affects: z.ZodArray<z.ZodEnum<{
3545
+ acceptance: "acceptance";
3546
+ contract: "contract";
3547
+ product: "product";
3548
+ api: "api";
3549
+ migration: "migration";
3550
+ }>>;
3551
+ effectiveSeverity: z.ZodNumber;
3552
+ floors: z.ZodArray<z.ZodEnum<{
3553
+ declared: "declared";
3554
+ "critical-path": "critical-path";
3555
+ }>>;
3556
+ }, z.core.$strict>>>;
3557
+ input: z.ZodOptional<z.ZodObject<{
3558
+ requestId: z.ZodString;
3559
+ answerDigest: z.ZodString;
3560
+ targetDigest: z.ZodString;
3561
+ }, z.core.$strict>>;
3344
3562
  callsRecorded: z.ZodOptional<z.ZodLiteral<true>>;
3345
3563
  dispatch: z.ZodOptional<z.ZodObject<{
3346
3564
  policy: z.ZodLiteral<"fifo-ready-v1">;
@@ -3369,8 +3587,8 @@ export declare const executionDocumentSchema: z.ZodObject<{
3369
3587
  activity: z.ZodOptional<z.ZodObject<{
3370
3588
  kind: z.ZodEnum<{
3371
3589
  gate: "gate";
3372
- command: "command";
3373
3590
  agent: "agent";
3591
+ command: "command";
3374
3592
  step: "step";
3375
3593
  }>;
3376
3594
  label: z.ZodString;
@@ -3401,6 +3619,7 @@ export declare const executionDocumentSchema: z.ZodObject<{
3401
3619
  ref: z.ZodString;
3402
3620
  revision: z.ZodString;
3403
3621
  }, z.core.$strict>;
3622
+ contextDigest: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3404
3623
  }, z.core.$strict>>;
3405
3624
  engineVersion: z.ZodOptional<z.ZodString>;
3406
3625
  consumerVersion: z.ZodOptional<z.ZodString>;
@@ -3408,8 +3627,8 @@ export declare const executionDocumentSchema: z.ZodObject<{
3408
3627
  id: z.ZodString;
3409
3628
  runId: z.ZodString;
3410
3629
  kind: z.ZodEnum<{
3411
- test: "test";
3412
3630
  review: "review";
3631
+ test: "test";
3413
3632
  }>;
3414
3633
  phase: z.ZodEnum<{
3415
3634
  candidate: "candidate";
@@ -3457,9 +3676,9 @@ export declare const executionDocumentSchema: z.ZodObject<{
3457
3676
  }, z.core.$strict>], "type">>>;
3458
3677
  status: z.ZodOptional<z.ZodEnum<{
3459
3678
  error: "error";
3679
+ cancelled: "cancelled";
3460
3680
  passed: "passed";
3461
3681
  failed: "failed";
3462
- cancelled: "cancelled";
3463
3682
  completed: "completed";
3464
3683
  timeout: "timeout";
3465
3684
  }>>;
@@ -3503,8 +3722,8 @@ export declare const executionDocumentSchema: z.ZodObject<{
3503
3722
  line: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3504
3723
  id: z.ZodOptional<z.ZodString>;
3505
3724
  status: z.ZodOptional<z.ZodEnum<{
3506
- open: "open";
3507
3725
  closed: "closed";
3726
+ open: "open";
3508
3727
  withdrawn: "withdrawn";
3509
3728
  }>>;
3510
3729
  }, z.core.$strict>>>;
@@ -3535,13 +3754,13 @@ export declare const executionDocumentSchema: z.ZodObject<{
3535
3754
  transitions: z.ZodOptional<z.ZodArray<z.ZodObject<{
3536
3755
  id: z.ZodString;
3537
3756
  from: z.ZodEnum<{
3538
- open: "open";
3539
3757
  closed: "closed";
3758
+ open: "open";
3540
3759
  withdrawn: "withdrawn";
3541
3760
  }>;
3542
3761
  to: z.ZodEnum<{
3543
- open: "open";
3544
3762
  closed: "closed";
3763
+ open: "open";
3545
3764
  withdrawn: "withdrawn";
3546
3765
  }>;
3547
3766
  basis: z.ZodString;
@@ -3879,8 +4098,8 @@ export declare const executionDocumentSchema: z.ZodObject<{
3879
4098
  control: z.ZodObject<{
3880
4099
  paused: z.ZodBoolean;
3881
4100
  pauseReason: z.ZodOptional<z.ZodEnum<{
3882
- runtime: "runtime";
3883
4101
  operator: "operator";
4102
+ runtime: "runtime";
3884
4103
  shutdown: "shutdown";
3885
4104
  "base-check": "base-check";
3886
4105
  reconfigure: "reconfigure";
@@ -3905,6 +4124,7 @@ export declare const executionDocumentSchema: z.ZodObject<{
3905
4124
  merge: "merge";
3906
4125
  budget: "budget";
3907
4126
  "needs-lead": "needs-lead";
4127
+ "needs-input": "needs-input";
3908
4128
  }>>>;
3909
4129
  waits: z.ZodOptional<z.ZodArray<z.ZodObject<{
3910
4130
  kind: z.ZodEnum<{