@astrosheep/keiyaku 4.5.7 → 4.5.9

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 (244) hide show
  1. package/README.md +10 -0
  2. package/build/integrations/marketplace/plugins/keiyaku/.claude-plugin/plugin.json +1 -1
  3. package/build/integrations/marketplace/plugins/keiyaku/.codex-plugin/plugin.json +1 -1
  4. package/build/integrations/marketplace/plugins/keiyaku/opencode.js +3 -2
  5. package/build/integrations/marketplace/plugins/keiyaku/package.json +1 -1
  6. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku/SKILL.md +12 -11
  7. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-akuma/SKILL.md +33 -12
  8. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-babysit/SKILL.md +35 -96
  9. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-bind/SKILL.md +28 -49
  10. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-task/SKILL.md +21 -15
  11. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-workflow/SKILL.md +148 -89
  12. package/build/src/akuma/abort.d.ts +2 -1
  13. package/build/src/akuma/abort.js +6 -23
  14. package/build/src/akuma/akuma-handle.js +4 -2
  15. package/build/src/akuma/akuma-observe.d.ts +2 -0
  16. package/build/src/akuma/akuma-observe.js +1 -0
  17. package/build/src/akuma/akuma-product.js +9 -7
  18. package/build/src/akuma/akuma.d.ts +392 -9
  19. package/build/src/akuma/akuma.js +31 -1
  20. package/build/src/akuma/allowed.d.ts +1 -1
  21. package/build/src/akuma/allowed.js +1 -0
  22. package/build/src/akuma/archetype.js +1 -1
  23. package/build/src/akuma/body.d.ts +8 -5
  24. package/build/src/akuma/body.js +12 -5
  25. package/build/src/akuma/call-request.d.ts +80 -0
  26. package/build/src/akuma/call-request.js +211 -0
  27. package/build/src/akuma/heart/facts.d.ts +16 -78
  28. package/build/src/akuma/heart/facts.js +11 -0
  29. package/build/src/akuma/heart/index.d.ts +3 -2
  30. package/build/src/akuma/heart/index.js +4 -1
  31. package/build/src/akuma/heart/request-authority.d.ts +5 -4
  32. package/build/src/akuma/heart/request-authority.js +20 -34
  33. package/build/src/akuma/heart/request-rows.js +12 -23
  34. package/build/src/akuma/heart/schema.d.ts +1 -1
  35. package/build/src/akuma/heart/schema.js +5 -13
  36. package/build/src/akuma/index.d.ts +1 -1
  37. package/build/src/akuma/index.js +1 -1
  38. package/build/src/akuma/projection-read.d.ts +1 -0
  39. package/build/src/akuma/projection-read.js +8 -1
  40. package/build/src/akuma/projection.d.ts +907 -137
  41. package/build/src/akuma/projection.js +193 -9
  42. package/build/src/akuma/provider.d.ts +30 -3
  43. package/build/src/akuma/provider.js +111 -0
  44. package/build/src/akuma/providers/acp/core.d.ts +2 -2
  45. package/build/src/akuma/providers/acp/core.js +13 -6
  46. package/build/src/akuma/providers/acp/index.js +5 -4
  47. package/build/src/akuma/providers/claude/events.d.ts +2 -2
  48. package/build/src/akuma/providers/claude/events.js +16 -3
  49. package/build/src/akuma/providers/claude/index.d.ts +3 -3
  50. package/build/src/akuma/providers/claude/index.js +16 -5
  51. package/build/src/akuma/providers/codex-app-server/events.d.ts +2 -2
  52. package/build/src/akuma/providers/codex-app-server/events.js +25 -4
  53. package/build/src/akuma/providers/codex-app-server/index.js +18 -6
  54. package/build/src/akuma/providers/grok-build/index.js +5 -4
  55. package/build/src/akuma/providers/opencode-sdk/index.js +66 -25
  56. package/build/src/akuma/providers/opencode-sdk/session.d.ts +3 -2
  57. package/build/src/akuma/providers/opencode-sdk/session.js +28 -11
  58. package/build/src/akuma/providers/pi/index.js +72 -58
  59. package/build/src/akuma/request-lifecycle.d.ts +4 -10
  60. package/build/src/akuma/request-lifecycle.js +7 -5
  61. package/build/src/akuma/request-rendezvous.d.ts +26 -0
  62. package/build/src/akuma/request-rendezvous.js +100 -0
  63. package/build/src/akuma/request-serve.d.ts +6 -66
  64. package/build/src/akuma/request-serve.js +83 -210
  65. package/build/src/akuma/request-wire.d.ts +109 -115
  66. package/build/src/akuma/request-wire.js +63 -318
  67. package/build/src/akuma/requests.d.ts +19 -47
  68. package/build/src/akuma/requests.js +51 -107
  69. package/build/src/akuma/turn-drive.d.ts +5 -3
  70. package/build/src/akuma/turn-drive.js +39 -11
  71. package/build/src/akuma-body.d.ts +7 -2
  72. package/build/src/akuma-body.js +68 -46
  73. package/build/src/body/amend.js +18 -19
  74. package/build/src/cli/accepted.d.ts +1 -1
  75. package/build/src/cli/accepted.js +2 -2
  76. package/build/src/cli/commands/akuma-invoke.d.ts +2 -0
  77. package/build/src/cli/commands/akuma-invoke.js +17 -9
  78. package/build/src/cli/commands/akuma.js +8 -8
  79. package/build/src/cli/commands/contract-invoke.d.ts +3 -2
  80. package/build/src/cli/commands/contract-invoke.js +42 -30
  81. package/build/src/cli/commands/contract.d.ts +16 -20
  82. package/build/src/cli/commands/contract.js +58 -25
  83. package/build/src/cli/commands/install.d.ts +2 -1
  84. package/build/src/cli/commands/install.js +3 -2
  85. package/build/src/cli/commands/task-invoke.d.ts +3 -0
  86. package/build/src/cli/commands/task-invoke.js +23 -140
  87. package/build/src/cli/commands/task.js +54 -20
  88. package/build/src/cli/invoke.js +39 -25
  89. package/build/src/cli/main.js +2 -1
  90. package/build/src/cli/parse.d.ts +2 -2
  91. package/build/src/cli/parse.js +56 -27
  92. package/build/src/cli/render/akuma-activity.d.ts +3 -0
  93. package/build/src/cli/render/akuma-activity.js +45 -29
  94. package/build/src/cli/render/akuma-tool.d.ts +5 -1
  95. package/build/src/cli/render/akuma.js +4 -8
  96. package/build/src/cli/render/audit.js +1 -1
  97. package/build/src/cli/render/catalog.js +80 -21
  98. package/build/src/cli/render/contract-observation.d.ts +2 -0
  99. package/build/src/cli/render/contract-observation.js +11 -0
  100. package/build/src/cli/render/contract.js +35 -62
  101. package/build/src/cli/render/kanshi-akuma.d.ts +8 -0
  102. package/build/src/cli/render/kanshi-akuma.js +132 -0
  103. package/build/src/cli/render/kanshi.js +131 -213
  104. package/build/src/cli/render/receipt.d.ts +1 -2
  105. package/build/src/cli/render/receipt.js +76 -26
  106. package/build/src/cli/render/refusal.js +2 -10
  107. package/build/src/cli/render/region.js +5 -2
  108. package/build/src/cli/render/settings.d.ts +1 -1
  109. package/build/src/cli/render/settings.js +27 -8
  110. package/build/src/cli/render/task.js +22 -5
  111. package/build/src/cli/render/terminal.d.ts +32 -1
  112. package/build/src/cli/render/terminal.js +77 -1
  113. package/build/src/cli/result.d.ts +3 -3
  114. package/build/src/cli/runtime.js +4 -2
  115. package/build/src/cli/selectors.d.ts +2 -1
  116. package/build/src/cli/selectors.js +4 -3
  117. package/build/src/cli/square-edge.js +120 -36
  118. package/build/src/cli/usage.js +2 -1
  119. package/build/src/contract-guidance.d.ts +5 -0
  120. package/build/src/contract-guidance.js +121 -0
  121. package/build/src/contract-worktree.d.ts +0 -1
  122. package/build/src/contract-worktree.js +32 -83
  123. package/build/src/coordination/sqlite-transaction-lock.d.ts +1 -0
  124. package/build/src/coordination/sqlite-transaction-lock.js +5 -0
  125. package/build/src/core/facts/codec.d.ts +2 -0
  126. package/build/src/core/facts/codec.js +4 -0
  127. package/build/src/core/verbs/placement.d.ts +6 -1
  128. package/build/src/core/verbs/placement.js +5 -3
  129. package/build/src/dispatch/index.d.ts +0 -2
  130. package/build/src/dispatch/index.js +54 -55
  131. package/build/src/git/admission.js +2 -2
  132. package/build/src/git/hooks.d.ts +9 -15
  133. package/build/src/git/hooks.js +23 -317
  134. package/build/src/git/nuke.d.ts +2 -1
  135. package/build/src/git/nuke.js +39 -21
  136. package/build/src/git/private-state-seat.d.ts +12 -0
  137. package/build/src/git/private-state-seat.js +39 -0
  138. package/build/src/git/process.d.ts +6 -0
  139. package/build/src/git/process.js +26 -11
  140. package/build/src/git/read-observation.js +29 -20
  141. package/build/src/git/reconcile.d.ts +13 -1
  142. package/build/src/git/reconcile.js +70 -11
  143. package/build/src/git/ref-migration.d.ts +22 -0
  144. package/build/src/git/ref-migration.js +55 -0
  145. package/build/src/git/repository.d.ts +10 -6
  146. package/build/src/git/repository.js +16 -8
  147. package/build/src/git/target-placement.d.ts +1 -0
  148. package/build/src/git/target-placement.js +5 -0
  149. package/build/src/git/tender.d.ts +1 -0
  150. package/build/src/git/terminal-reconcile.d.ts +1 -1
  151. package/build/src/git/terminal-reconcile.js +22 -20
  152. package/build/src/git/workspace.d.ts +14 -0
  153. package/build/src/git/workspace.js +44 -0
  154. package/build/src/kanshi/index.d.ts +1 -1
  155. package/build/src/kanshi/read.js +16 -16
  156. package/build/src/kanshi/report.d.ts +2 -2
  157. package/build/src/library/address.d.ts +9 -3
  158. package/build/src/library/address.js +3 -2
  159. package/build/src/library/akuma-creation.d.ts +4 -3
  160. package/build/src/library/akuma-creation.js +19 -13
  161. package/build/src/library/audit.d.ts +14 -6
  162. package/build/src/library/audit.js +13 -23
  163. package/build/src/library/catalog.d.ts +3 -1
  164. package/build/src/library/catalog.js +20 -6
  165. package/build/src/library/composition.d.ts +385 -0
  166. package/build/src/library/composition.js +28 -0
  167. package/build/src/library/configuration.js +8 -2
  168. package/build/src/library/continuation.js +66 -30
  169. package/build/src/library/contract-bind.js +10 -2
  170. package/build/src/library/contract-forwarding-reconciliation-result.d.ts +102 -0
  171. package/build/src/library/contract-forwarding-reconciliation-result.js +92 -0
  172. package/build/src/library/contract-forwarding-result.d.ts +4464 -0
  173. package/build/src/library/contract-forwarding-result.js +521 -0
  174. package/build/src/library/contract-forwarding.d.ts +71 -0
  175. package/build/src/library/contract-forwarding.js +114 -0
  176. package/build/src/library/contract-handle.d.ts +38 -0
  177. package/build/src/library/contract-handle.js +314 -0
  178. package/build/src/library/contract-operations.d.ts +214 -69
  179. package/build/src/library/contract-operations.js +189 -118
  180. package/build/src/library/contract-types.d.ts +7 -3
  181. package/build/src/library/contract.d.ts +21 -34
  182. package/build/src/library/contract.js +29 -287
  183. package/build/src/library/fleet-result.d.ts +1580 -0
  184. package/build/src/library/fleet-result.js +98 -0
  185. package/build/src/library/fleet.d.ts +112 -54
  186. package/build/src/library/fleet.js +211 -71
  187. package/build/src/library/input.d.ts +3 -1
  188. package/build/src/library/input.js +11 -1
  189. package/build/src/library/keiyaku.d.ts +388 -20
  190. package/build/src/library/keiyaku.js +13 -21
  191. package/build/src/library/mutation.d.ts +3 -3
  192. package/build/src/library/mutation.js +5 -9
  193. package/build/src/library/nuke.d.ts +1 -1
  194. package/build/src/library/nuke.js +4 -3
  195. package/build/src/library/reconcile.d.ts +4 -0
  196. package/build/src/library/reconcile.js +2 -0
  197. package/build/src/library/refusal.d.ts +0 -9
  198. package/build/src/library/refusal.js +0 -7
  199. package/build/src/protocol/amend.js +56 -50
  200. package/build/src/protocol/attempt.d.ts +2 -0
  201. package/build/src/protocol/attempt.js +8 -1
  202. package/build/src/protocol/completion.js +7 -0
  203. package/build/src/protocol/deliver.js +6 -2
  204. package/build/src/protocol/operations.d.ts +4 -1
  205. package/build/src/protocol/operations.js +5 -2
  206. package/build/src/protocol/placement.d.ts +1 -0
  207. package/build/src/protocol/placement.js +52 -38
  208. package/build/src/protocol/read/observation.d.ts +1 -4
  209. package/build/src/protocol/read/observation.js +2 -15
  210. package/build/src/protocol/reintegrate.js +62 -58
  211. package/build/src/protocol/review.js +5 -0
  212. package/build/src/protocol/run.js +17 -13
  213. package/build/src/runtime/proc/run.d.ts +9 -0
  214. package/build/src/runtime/proc/run.js +51 -4
  215. package/build/src/runtime/proc/termination.js +26 -22
  216. package/build/src/runtime/proc/windows-launch.exe +0 -0
  217. package/build/src/settlement/holder.d.ts +2 -1
  218. package/build/src/settlement/holder.js +15 -4
  219. package/build/src/settlement/settle.js +99 -33
  220. package/build/src/task/board.d.ts +68 -27
  221. package/build/src/task/board.js +31 -1
  222. package/build/src/task/catalog.d.ts +4 -0
  223. package/build/src/task/catalog.js +23 -0
  224. package/build/src/task/compose-language.js +33 -7
  225. package/build/src/task/compose-parser.d.ts +1 -1
  226. package/build/src/task/compose-parser.js +1 -1
  227. package/build/src/task/compose.js +2 -0
  228. package/build/src/task/index.d.ts +12 -4
  229. package/build/src/task/index.js +97 -16
  230. package/build/src/task/mutation-result.d.ts +923 -0
  231. package/build/src/task/mutation-result.js +140 -0
  232. package/build/src/task/mutation.d.ts +552 -28
  233. package/build/src/task/mutation.js +304 -97
  234. package/build/src/task/operations.d.ts +1 -4
  235. package/build/src/task/operations.js +0 -6
  236. package/build/src/task/public.d.ts +2 -0
  237. package/build/src/task/public.js +1 -0
  238. package/build/src/workspace-place.d.ts +7 -2
  239. package/build/src/workspace-place.js +34 -24
  240. package/build/src/world.d.ts +1 -0
  241. package/build/src/world.js +11 -0
  242. package/package.json +8 -6
  243. package/build/src/akuma/request-execution.d.ts +0 -8
  244. package/build/src/akuma/request-execution.js +0 -98
@@ -0,0 +1,4464 @@
1
+ import type { AuditReport } from "../protocol/audit.js";
2
+ import type { ReviewValue } from "../protocol/review.js";
3
+ import type { ContinuationReport } from "./continuation.js";
4
+ import { z } from "zod";
5
+ export type Review = ReviewValue & Readonly<{
6
+ continuation?: ContinuationReport;
7
+ }>;
8
+ export declare const auditReportSchema: z.ZodType<AuditReport>;
9
+ export declare const deliveryResultSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
10
+ facts: z.ZodArray<z.ZodPipe<z.ZodUnknown, z.ZodTransform<Readonly<{
11
+ v: 1;
12
+ kind: "bound";
13
+ contract: import("../core/facts/types.js").ContractId;
14
+ entry: import("../core/facts/types.js").EntryUlid;
15
+ at: string;
16
+ actor?: import("../core/facts/types.js").ActorId;
17
+ data: Readonly<Record<string, never>>;
18
+ }> | Readonly<{
19
+ v: 1;
20
+ kind: "bind";
21
+ contract: import("../core/facts/types.js").ContractId;
22
+ entry: import("../core/facts/types.js").EntryUlid;
23
+ at: string;
24
+ actor?: import("../core/facts/types.js").ActorId;
25
+ data: Readonly<{
26
+ coordinates: import("../core/facts/types.js").ContractCoordinates;
27
+ terms: import("../core/facts/types.js").ContractTerms;
28
+ }>;
29
+ }> | Readonly<{
30
+ v: 1;
31
+ kind: "amend";
32
+ contract: import("../core/facts/types.js").ContractId;
33
+ entry: import("../core/facts/types.js").EntryUlid;
34
+ at: string;
35
+ actor?: import("../core/facts/types.js").ActorId;
36
+ data: Readonly<{
37
+ document: Readonly<{
38
+ bytes: string;
39
+ key: import("../core/facts/types.js").DocumentKey;
40
+ }>;
41
+ segments: readonly import("../core/facts/types.js").DocumentSegmentKey[];
42
+ gates: readonly import("../core/facts/types.js").Gate[];
43
+ after: readonly import("../core/facts/types.js").ContractId[];
44
+ }>;
45
+ }> | Readonly<{
46
+ v: 1;
47
+ kind: "deliver";
48
+ contract: import("../core/facts/types.js").ContractId;
49
+ entry: import("../core/facts/types.js").EntryUlid;
50
+ at: string;
51
+ actor?: import("../core/facts/types.js").ActorId;
52
+ data: Readonly<{
53
+ tenderSnapshot: import("../core/facts/types.js").SnapshotId;
54
+ integration: Readonly<{
55
+ predecessor: import("../core/facts/types.js").SnapshotId;
56
+ snapshot: import("../core/facts/types.js").SnapshotId;
57
+ changeId: import("../core/facts/types.js").ChangeId;
58
+ }>;
59
+ method: "squash";
60
+ policy: Readonly<{
61
+ requireBranchesToBeUpToDate: boolean;
62
+ }>;
63
+ }>;
64
+ }> | Readonly<{
65
+ v: 1;
66
+ kind: "reintegrated";
67
+ contract: import("../core/facts/types.js").ContractId;
68
+ entry: import("../core/facts/types.js").EntryUlid;
69
+ at: string;
70
+ actor?: import("../core/facts/types.js").ActorId;
71
+ data: Readonly<{
72
+ predecessor: import("../core/facts/types.js").SnapshotId;
73
+ snapshot: import("../core/facts/types.js").SnapshotId;
74
+ }>;
75
+ }> | Readonly<{
76
+ v: 1;
77
+ kind: "attestation";
78
+ contract: import("../core/facts/types.js").ContractId;
79
+ entry: import("../core/facts/types.js").EntryUlid;
80
+ at: string;
81
+ actor?: import("../core/facts/types.js").ActorId;
82
+ data: Readonly<{
83
+ gate: import("../core/facts/types.js").Gate;
84
+ subject: import("../core/facts/types.js").DependencyKeySet;
85
+ verdict: "satisfied" | "unsatisfied";
86
+ summary?: string;
87
+ }>;
88
+ }> | Readonly<{
89
+ v: 1;
90
+ kind: "claimed";
91
+ contract: import("../core/facts/types.js").ContractId;
92
+ entry: import("../core/facts/types.js").EntryUlid;
93
+ at: string;
94
+ actor?: import("../core/facts/types.js").ActorId;
95
+ data: Readonly<{
96
+ delivery: import("../core/facts/types.js").EntryUlid;
97
+ }>;
98
+ }> | Readonly<{
99
+ v: 1;
100
+ kind: "arc";
101
+ contract: import("../core/facts/types.js").ContractId;
102
+ entry: import("../core/facts/types.js").EntryUlid;
103
+ at: string;
104
+ actor?: import("../core/facts/types.js").ActorId;
105
+ data: Readonly<{
106
+ seq: number;
107
+ title: string;
108
+ objective: string;
109
+ brief: string;
110
+ }>;
111
+ }> | Readonly<{
112
+ v: 1;
113
+ kind: "abandoned";
114
+ contract: import("../core/facts/types.js").ContractId;
115
+ entry: import("../core/facts/types.js").EntryUlid;
116
+ at: string;
117
+ actor?: import("../core/facts/types.js").ActorId;
118
+ data: Readonly<{
119
+ note?: string;
120
+ }>;
121
+ }>, unknown>>>;
122
+ head: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ContractHead, string>>;
123
+ value: z.ZodType<{
124
+ continuation?: {
125
+ claimed: import("../core/facts/types.js").ContractId[];
126
+ stopped: {
127
+ contractId: import("../core/facts/types.js").ContractId;
128
+ stop: {
129
+ refusal: {
130
+ kind: "integration-failed";
131
+ contractId: import("../core/facts/types.js").ContractId;
132
+ reason: "conflict" | "not-based-on-target" | "unrelated-histories";
133
+ targetHead: import("../core/facts/types.js").SnapshotId;
134
+ } | {
135
+ conflictPaths: string[];
136
+ kind: "integration-failed";
137
+ contractId: import("../core/facts/types.js").ContractId;
138
+ reason: "conflict" | "not-based-on-target" | "unrelated-histories";
139
+ targetHead: import("../core/facts/types.js").SnapshotId;
140
+ } | {
141
+ kind: "checkout-not-followable";
142
+ contractId: import("../core/facts/types.js").ContractId;
143
+ target: string;
144
+ path: string;
145
+ reason: "conflict" | "staged" | "untracked";
146
+ paths: string[];
147
+ } | {
148
+ kind: "gates-unsatisfied";
149
+ contractId: import("../core/facts/types.js").ContractId;
150
+ unmet: {
151
+ gate: import("../core/facts/types.js").Gate;
152
+ current: {
153
+ kind: "attested";
154
+ verdict: "satisfied" | "unsatisfied";
155
+ at: string;
156
+ } | {
157
+ summary: string;
158
+ kind: "attested";
159
+ verdict: "satisfied" | "unsatisfied";
160
+ at: string;
161
+ } | {
162
+ kind: "stale";
163
+ priorVerdict: "satisfied" | "unsatisfied";
164
+ } | {
165
+ kind: "missing";
166
+ };
167
+ }[];
168
+ } | {
169
+ kind: "prerequisites-unsatisfied";
170
+ contractId: import("../core/facts/types.js").ContractId;
171
+ unmet: {
172
+ contractId: import("../core/facts/types.js").ContractId;
173
+ state: "missing" | "active" | "abandoned";
174
+ }[];
175
+ } | {
176
+ kind: "terminal" | "contract-missing" | "delivery-missing";
177
+ contractId: import("../core/facts/types.js").ContractId;
178
+ } | {
179
+ kind: "integration-unsupported";
180
+ contractId: import("../core/facts/types.js").ContractId;
181
+ requiredGit: "2.38";
182
+ } | {
183
+ kind: "target-missing";
184
+ contractId: import("../core/facts/types.js").ContractId;
185
+ };
186
+ } | {
187
+ retry: {
188
+ kind: "exhausted";
189
+ } | {
190
+ kind: "collision";
191
+ } | {
192
+ kind: "publication-failed";
193
+ diagnostic: string;
194
+ };
195
+ } | {
196
+ failure: "target-moved";
197
+ contractId: import("../core/facts/types.js").ContractId;
198
+ target: string;
199
+ expected: import("../core/facts/types.js").SnapshotId;
200
+ observed: import("../core/facts/types.js").SnapshotId | null;
201
+ observedTreeEqualsCandidate: boolean;
202
+ } | {
203
+ failure: "target-moved";
204
+ contractId: import("../core/facts/types.js").ContractId;
205
+ target: string;
206
+ integratedAt: import("../core/facts/types.js").SnapshotId;
207
+ observed: import("../core/facts/types.js").SnapshotId | null;
208
+ attempts: number;
209
+ observedTreeEqualsCandidate: boolean;
210
+ } | {
211
+ failure: "target-placement-failed";
212
+ diagnostic: string;
213
+ } | {
214
+ kind: "already-terminal";
215
+ };
216
+ }[];
217
+ };
218
+ leak?: {
219
+ path: string;
220
+ diagnostic: string;
221
+ };
222
+ cleanup?: {
223
+ phase: "destroy";
224
+ command: number;
225
+ detail: {
226
+ kind: "exit";
227
+ code: number;
228
+ stdout: string;
229
+ stderr: string;
230
+ truncated: boolean;
231
+ } | {
232
+ kind: "timeout";
233
+ } | {
234
+ kind: "spawn-error";
235
+ diagnostic: string;
236
+ } | {
237
+ kind: "unknown-exit";
238
+ };
239
+ };
240
+ placement?: {
241
+ refusal: {
242
+ kind: "integration-failed";
243
+ contractId: import("../core/facts/types.js").ContractId;
244
+ reason: "conflict" | "not-based-on-target" | "unrelated-histories";
245
+ targetHead: import("../core/facts/types.js").SnapshotId;
246
+ } | {
247
+ conflictPaths: string[];
248
+ kind: "integration-failed";
249
+ contractId: import("../core/facts/types.js").ContractId;
250
+ reason: "conflict" | "not-based-on-target" | "unrelated-histories";
251
+ targetHead: import("../core/facts/types.js").SnapshotId;
252
+ } | {
253
+ kind: "checkout-not-followable";
254
+ contractId: import("../core/facts/types.js").ContractId;
255
+ target: string;
256
+ path: string;
257
+ reason: "conflict" | "staged" | "untracked";
258
+ paths: string[];
259
+ } | {
260
+ kind: "gates-unsatisfied";
261
+ contractId: import("../core/facts/types.js").ContractId;
262
+ unmet: {
263
+ gate: import("../core/facts/types.js").Gate;
264
+ current: {
265
+ kind: "attested";
266
+ verdict: "satisfied" | "unsatisfied";
267
+ at: string;
268
+ } | {
269
+ summary: string;
270
+ kind: "attested";
271
+ verdict: "satisfied" | "unsatisfied";
272
+ at: string;
273
+ } | {
274
+ kind: "stale";
275
+ priorVerdict: "satisfied" | "unsatisfied";
276
+ } | {
277
+ kind: "missing";
278
+ };
279
+ }[];
280
+ } | {
281
+ kind: "prerequisites-unsatisfied";
282
+ contractId: import("../core/facts/types.js").ContractId;
283
+ unmet: {
284
+ contractId: import("../core/facts/types.js").ContractId;
285
+ state: "missing" | "active" | "abandoned";
286
+ }[];
287
+ } | {
288
+ kind: "terminal" | "contract-missing" | "delivery-missing";
289
+ contractId: import("../core/facts/types.js").ContractId;
290
+ } | {
291
+ kind: "integration-unsupported";
292
+ contractId: import("../core/facts/types.js").ContractId;
293
+ requiredGit: "2.38";
294
+ } | {
295
+ kind: "target-missing";
296
+ contractId: import("../core/facts/types.js").ContractId;
297
+ };
298
+ } | {
299
+ retry: {
300
+ kind: "exhausted";
301
+ } | {
302
+ kind: "collision";
303
+ } | {
304
+ kind: "publication-failed";
305
+ diagnostic: string;
306
+ };
307
+ } | {
308
+ failure: "target-moved";
309
+ contractId: import("../core/facts/types.js").ContractId;
310
+ target: string;
311
+ expected: import("../core/facts/types.js").SnapshotId;
312
+ observed: import("../core/facts/types.js").SnapshotId | null;
313
+ observedTreeEqualsCandidate: boolean;
314
+ } | {
315
+ failure: "target-moved";
316
+ contractId: import("../core/facts/types.js").ContractId;
317
+ target: string;
318
+ integratedAt: import("../core/facts/types.js").SnapshotId;
319
+ observed: import("../core/facts/types.js").SnapshotId | null;
320
+ attempts: number;
321
+ observedTreeEqualsCandidate: boolean;
322
+ } | {
323
+ failure: "target-placement-failed";
324
+ diagnostic: string;
325
+ };
326
+ verificationSummary?: string;
327
+ verificationReuse?: {
328
+ entry: import("../core/facts/types.js").EntryUlid;
329
+ verdict: "satisfied" | "unsatisfied";
330
+ } | {
331
+ summary: string;
332
+ entry: import("../core/facts/types.js").EntryUlid;
333
+ verdict: "satisfied" | "unsatisfied";
334
+ };
335
+ verification?: {
336
+ refusal: {
337
+ kind: "verification-declaration-invalid";
338
+ } | {
339
+ contractId: import("../core/facts/types.js").ContractId;
340
+ kind: "verification-declaration-invalid";
341
+ } | {
342
+ kind: "terminal" | "contract-missing";
343
+ contractId: import("../core/facts/types.js").ContractId;
344
+ };
345
+ } | {
346
+ retry: {
347
+ kind: "exhausted";
348
+ } | {
349
+ kind: "collision";
350
+ } | {
351
+ kind: "publication-failed";
352
+ diagnostic: string;
353
+ };
354
+ } | {
355
+ failure: "cancelled" | "unknown-exit";
356
+ } | {
357
+ failure: "spawn-error" | "candidate-unavailable";
358
+ diagnostic: string;
359
+ } | {
360
+ failure: "environment-failure";
361
+ diagnostic: string;
362
+ } | {
363
+ failure: "environment-failure";
364
+ command: number;
365
+ detail: {
366
+ kind: "exit";
367
+ code: number;
368
+ stdout: string;
369
+ stderr: string;
370
+ truncated: boolean;
371
+ } | {
372
+ kind: "timeout";
373
+ } | {
374
+ kind: "spawn-error";
375
+ diagnostic: string;
376
+ } | {
377
+ kind: "unknown-exit";
378
+ };
379
+ };
380
+ completion?: {
381
+ integration: import("../core/facts/types.js").SnapshotId;
382
+ } | {
383
+ verification: {
384
+ mode: "reused" | "ran";
385
+ verdict: "satisfied" | "unsatisfied";
386
+ };
387
+ integration: import("../core/facts/types.js").SnapshotId;
388
+ };
389
+ tenderSnapshot: import("../core/facts/types.js").SnapshotId;
390
+ integration: {
391
+ predecessor: import("../core/facts/types.js").SnapshotId;
392
+ snapshot: import("../core/facts/types.js").SnapshotId;
393
+ changeId: import("../core/facts/types.js").ChangeId;
394
+ };
395
+ method: "squash";
396
+ policy: {
397
+ requireBranchesToBeUpToDate: boolean;
398
+ };
399
+ }, unknown, z.core.$ZodTypeInternals<{
400
+ continuation?: {
401
+ claimed: import("../core/facts/types.js").ContractId[];
402
+ stopped: {
403
+ contractId: import("../core/facts/types.js").ContractId;
404
+ stop: {
405
+ refusal: {
406
+ kind: "integration-failed";
407
+ contractId: import("../core/facts/types.js").ContractId;
408
+ reason: "conflict" | "not-based-on-target" | "unrelated-histories";
409
+ targetHead: import("../core/facts/types.js").SnapshotId;
410
+ } | {
411
+ conflictPaths: string[];
412
+ kind: "integration-failed";
413
+ contractId: import("../core/facts/types.js").ContractId;
414
+ reason: "conflict" | "not-based-on-target" | "unrelated-histories";
415
+ targetHead: import("../core/facts/types.js").SnapshotId;
416
+ } | {
417
+ kind: "checkout-not-followable";
418
+ contractId: import("../core/facts/types.js").ContractId;
419
+ target: string;
420
+ path: string;
421
+ reason: "conflict" | "staged" | "untracked";
422
+ paths: string[];
423
+ } | {
424
+ kind: "gates-unsatisfied";
425
+ contractId: import("../core/facts/types.js").ContractId;
426
+ unmet: {
427
+ gate: import("../core/facts/types.js").Gate;
428
+ current: {
429
+ kind: "attested";
430
+ verdict: "satisfied" | "unsatisfied";
431
+ at: string;
432
+ } | {
433
+ summary: string;
434
+ kind: "attested";
435
+ verdict: "satisfied" | "unsatisfied";
436
+ at: string;
437
+ } | {
438
+ kind: "stale";
439
+ priorVerdict: "satisfied" | "unsatisfied";
440
+ } | {
441
+ kind: "missing";
442
+ };
443
+ }[];
444
+ } | {
445
+ kind: "prerequisites-unsatisfied";
446
+ contractId: import("../core/facts/types.js").ContractId;
447
+ unmet: {
448
+ contractId: import("../core/facts/types.js").ContractId;
449
+ state: "missing" | "active" | "abandoned";
450
+ }[];
451
+ } | {
452
+ kind: "terminal" | "contract-missing" | "delivery-missing";
453
+ contractId: import("../core/facts/types.js").ContractId;
454
+ } | {
455
+ kind: "integration-unsupported";
456
+ contractId: import("../core/facts/types.js").ContractId;
457
+ requiredGit: "2.38";
458
+ } | {
459
+ kind: "target-missing";
460
+ contractId: import("../core/facts/types.js").ContractId;
461
+ };
462
+ } | {
463
+ retry: {
464
+ kind: "exhausted";
465
+ } | {
466
+ kind: "collision";
467
+ } | {
468
+ kind: "publication-failed";
469
+ diagnostic: string;
470
+ };
471
+ } | {
472
+ failure: "target-moved";
473
+ contractId: import("../core/facts/types.js").ContractId;
474
+ target: string;
475
+ expected: import("../core/facts/types.js").SnapshotId;
476
+ observed: import("../core/facts/types.js").SnapshotId | null;
477
+ observedTreeEqualsCandidate: boolean;
478
+ } | {
479
+ failure: "target-moved";
480
+ contractId: import("../core/facts/types.js").ContractId;
481
+ target: string;
482
+ integratedAt: import("../core/facts/types.js").SnapshotId;
483
+ observed: import("../core/facts/types.js").SnapshotId | null;
484
+ attempts: number;
485
+ observedTreeEqualsCandidate: boolean;
486
+ } | {
487
+ failure: "target-placement-failed";
488
+ diagnostic: string;
489
+ } | {
490
+ kind: "already-terminal";
491
+ };
492
+ }[];
493
+ };
494
+ leak?: {
495
+ path: string;
496
+ diagnostic: string;
497
+ };
498
+ cleanup?: {
499
+ phase: "destroy";
500
+ command: number;
501
+ detail: {
502
+ kind: "exit";
503
+ code: number;
504
+ stdout: string;
505
+ stderr: string;
506
+ truncated: boolean;
507
+ } | {
508
+ kind: "timeout";
509
+ } | {
510
+ kind: "spawn-error";
511
+ diagnostic: string;
512
+ } | {
513
+ kind: "unknown-exit";
514
+ };
515
+ };
516
+ placement?: {
517
+ refusal: {
518
+ kind: "integration-failed";
519
+ contractId: import("../core/facts/types.js").ContractId;
520
+ reason: "conflict" | "not-based-on-target" | "unrelated-histories";
521
+ targetHead: import("../core/facts/types.js").SnapshotId;
522
+ } | {
523
+ conflictPaths: string[];
524
+ kind: "integration-failed";
525
+ contractId: import("../core/facts/types.js").ContractId;
526
+ reason: "conflict" | "not-based-on-target" | "unrelated-histories";
527
+ targetHead: import("../core/facts/types.js").SnapshotId;
528
+ } | {
529
+ kind: "checkout-not-followable";
530
+ contractId: import("../core/facts/types.js").ContractId;
531
+ target: string;
532
+ path: string;
533
+ reason: "conflict" | "staged" | "untracked";
534
+ paths: string[];
535
+ } | {
536
+ kind: "gates-unsatisfied";
537
+ contractId: import("../core/facts/types.js").ContractId;
538
+ unmet: {
539
+ gate: import("../core/facts/types.js").Gate;
540
+ current: {
541
+ kind: "attested";
542
+ verdict: "satisfied" | "unsatisfied";
543
+ at: string;
544
+ } | {
545
+ summary: string;
546
+ kind: "attested";
547
+ verdict: "satisfied" | "unsatisfied";
548
+ at: string;
549
+ } | {
550
+ kind: "stale";
551
+ priorVerdict: "satisfied" | "unsatisfied";
552
+ } | {
553
+ kind: "missing";
554
+ };
555
+ }[];
556
+ } | {
557
+ kind: "prerequisites-unsatisfied";
558
+ contractId: import("../core/facts/types.js").ContractId;
559
+ unmet: {
560
+ contractId: import("../core/facts/types.js").ContractId;
561
+ state: "missing" | "active" | "abandoned";
562
+ }[];
563
+ } | {
564
+ kind: "terminal" | "contract-missing" | "delivery-missing";
565
+ contractId: import("../core/facts/types.js").ContractId;
566
+ } | {
567
+ kind: "integration-unsupported";
568
+ contractId: import("../core/facts/types.js").ContractId;
569
+ requiredGit: "2.38";
570
+ } | {
571
+ kind: "target-missing";
572
+ contractId: import("../core/facts/types.js").ContractId;
573
+ };
574
+ } | {
575
+ retry: {
576
+ kind: "exhausted";
577
+ } | {
578
+ kind: "collision";
579
+ } | {
580
+ kind: "publication-failed";
581
+ diagnostic: string;
582
+ };
583
+ } | {
584
+ failure: "target-moved";
585
+ contractId: import("../core/facts/types.js").ContractId;
586
+ target: string;
587
+ expected: import("../core/facts/types.js").SnapshotId;
588
+ observed: import("../core/facts/types.js").SnapshotId | null;
589
+ observedTreeEqualsCandidate: boolean;
590
+ } | {
591
+ failure: "target-moved";
592
+ contractId: import("../core/facts/types.js").ContractId;
593
+ target: string;
594
+ integratedAt: import("../core/facts/types.js").SnapshotId;
595
+ observed: import("../core/facts/types.js").SnapshotId | null;
596
+ attempts: number;
597
+ observedTreeEqualsCandidate: boolean;
598
+ } | {
599
+ failure: "target-placement-failed";
600
+ diagnostic: string;
601
+ };
602
+ verificationSummary?: string;
603
+ verificationReuse?: {
604
+ entry: import("../core/facts/types.js").EntryUlid;
605
+ verdict: "satisfied" | "unsatisfied";
606
+ } | {
607
+ summary: string;
608
+ entry: import("../core/facts/types.js").EntryUlid;
609
+ verdict: "satisfied" | "unsatisfied";
610
+ };
611
+ verification?: {
612
+ refusal: {
613
+ kind: "verification-declaration-invalid";
614
+ } | {
615
+ contractId: import("../core/facts/types.js").ContractId;
616
+ kind: "verification-declaration-invalid";
617
+ } | {
618
+ kind: "terminal" | "contract-missing";
619
+ contractId: import("../core/facts/types.js").ContractId;
620
+ };
621
+ } | {
622
+ retry: {
623
+ kind: "exhausted";
624
+ } | {
625
+ kind: "collision";
626
+ } | {
627
+ kind: "publication-failed";
628
+ diagnostic: string;
629
+ };
630
+ } | {
631
+ failure: "cancelled" | "unknown-exit";
632
+ } | {
633
+ failure: "spawn-error" | "candidate-unavailable";
634
+ diagnostic: string;
635
+ } | {
636
+ failure: "environment-failure";
637
+ diagnostic: string;
638
+ } | {
639
+ failure: "environment-failure";
640
+ command: number;
641
+ detail: {
642
+ kind: "exit";
643
+ code: number;
644
+ stdout: string;
645
+ stderr: string;
646
+ truncated: boolean;
647
+ } | {
648
+ kind: "timeout";
649
+ } | {
650
+ kind: "spawn-error";
651
+ diagnostic: string;
652
+ } | {
653
+ kind: "unknown-exit";
654
+ };
655
+ };
656
+ completion?: {
657
+ integration: import("../core/facts/types.js").SnapshotId;
658
+ } | {
659
+ verification: {
660
+ mode: "reused" | "ran";
661
+ verdict: "satisfied" | "unsatisfied";
662
+ };
663
+ integration: import("../core/facts/types.js").SnapshotId;
664
+ };
665
+ tenderSnapshot: import("../core/facts/types.js").SnapshotId;
666
+ integration: {
667
+ predecessor: import("../core/facts/types.js").SnapshotId;
668
+ snapshot: import("../core/facts/types.js").SnapshotId;
669
+ changeId: import("../core/facts/types.js").ChangeId;
670
+ };
671
+ method: "squash";
672
+ policy: {
673
+ requireBranchesToBeUpToDate: boolean;
674
+ };
675
+ }, unknown>>;
676
+ lags: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
677
+ kind: z.ZodLiteral<"worktree-retained">;
678
+ path: z.ZodString;
679
+ }, z.core.$strict>, z.ZodPipe<z.ZodObject<{
680
+ kind: z.ZodLiteral<"worktree-follow-retained">;
681
+ path: z.ZodString;
682
+ tender: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
683
+ head: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
684
+ reason: z.ZodEnum<{
685
+ "head-moved": "head-moved";
686
+ "head-attached": "head-attached";
687
+ "operation-in-progress": "operation-in-progress";
688
+ "unsupported-parent-shape": "unsupported-parent-shape";
689
+ }>;
690
+ paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
691
+ }, z.core.$strict>, z.ZodTransform<{
692
+ kind: "worktree-follow-retained";
693
+ path: string;
694
+ tender: import("../core/facts/types.js").SnapshotId;
695
+ head: import("../core/facts/types.js").SnapshotId;
696
+ reason: "head-moved" | "head-attached" | "operation-in-progress" | "unsupported-parent-shape";
697
+ } | {
698
+ paths: string[];
699
+ kind: "worktree-follow-retained";
700
+ path: string;
701
+ tender: import("../core/facts/types.js").SnapshotId;
702
+ head: import("../core/facts/types.js").SnapshotId;
703
+ reason: "head-moved" | "head-attached" | "operation-in-progress" | "unsupported-parent-shape";
704
+ }, {
705
+ kind: "worktree-follow-retained";
706
+ path: string;
707
+ tender: import("../core/facts/types.js").SnapshotId;
708
+ head: import("../core/facts/types.js").SnapshotId;
709
+ reason: "head-moved" | "head-attached" | "operation-in-progress" | "unsupported-parent-shape";
710
+ paths?: string[] | undefined;
711
+ }>>, z.ZodPipe<z.ZodObject<{
712
+ kind: z.ZodLiteral<"unsealed-bytes">;
713
+ path: z.ZodString;
714
+ paths: z.ZodArray<z.ZodString>;
715
+ head: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>>;
716
+ }, z.core.$strict>, z.ZodTransform<{
717
+ kind: "unsealed-bytes";
718
+ path: string;
719
+ paths: string[];
720
+ } | {
721
+ head: import("../core/facts/types.js").SnapshotId;
722
+ kind: "unsealed-bytes";
723
+ path: string;
724
+ paths: string[];
725
+ }, {
726
+ kind: "unsealed-bytes";
727
+ path: string;
728
+ paths: string[];
729
+ head?: import("../core/facts/types.js").SnapshotId | undefined;
730
+ }>>, z.ZodObject<{
731
+ kind: z.ZodLiteral<"target-checkout-retained">;
732
+ path: z.ZodString;
733
+ target: z.ZodString;
734
+ diagnostic: z.ZodString;
735
+ }, z.core.$strict>, z.ZodObject<{
736
+ kind: z.ZodLiteral<"reconcile-failed">;
737
+ stage: z.ZodEnum<{
738
+ observation: "observation";
739
+ effect: "effect";
740
+ }>;
741
+ diagnostic: z.ZodString;
742
+ }, z.core.$strict>, z.ZodObject<{
743
+ kind: z.ZodLiteral<"ref-migration-conflict">;
744
+ legacyRef: z.ZodString;
745
+ legacyOid: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
746
+ currentRef: z.ZodString;
747
+ currentOid: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
748
+ }, z.core.$strict>, z.ZodObject<{
749
+ kind: z.ZodLiteral<"worktree-hook-failed">;
750
+ phase: z.ZodEnum<{
751
+ destroy: "destroy";
752
+ create: "create";
753
+ }>;
754
+ path: z.ZodString;
755
+ command: z.ZodNumber;
756
+ name: z.ZodString;
757
+ failure: z.ZodUnion<readonly [z.ZodObject<{
758
+ kind: z.ZodLiteral<"exit">;
759
+ code: z.ZodNumber;
760
+ stdout: z.ZodString;
761
+ stderr: z.ZodString;
762
+ truncated: z.ZodBoolean;
763
+ }, z.core.$strict>, z.ZodObject<{
764
+ kind: z.ZodLiteral<"timeout">;
765
+ }, z.core.$strict>, z.ZodObject<{
766
+ kind: z.ZodLiteral<"spawn-error">;
767
+ diagnostic: z.ZodString;
768
+ }, z.core.$strict>, z.ZodObject<{
769
+ kind: z.ZodLiteral<"unknown-exit">;
770
+ }, z.core.$strict>]>;
771
+ }, z.core.$strict>, z.ZodObject<{
772
+ kind: z.ZodLiteral<"contract-file-failed">;
773
+ worktree: z.ZodString;
774
+ path: z.ZodString;
775
+ diagnostic: z.ZodString;
776
+ }, z.core.$strict>]>>;
777
+ settlementLags: z.ZodArray<z.ZodPipe<z.ZodObject<{
778
+ kind: z.ZodLiteral<"settlement-failed">;
779
+ surface: z.ZodEnum<{
780
+ task: "task";
781
+ "namespace-context": "namespace-context";
782
+ "task-holder": "task-holder";
783
+ }>;
784
+ contractId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ContractId, string>>;
785
+ taskId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`task/${string}`, string>>>;
786
+ path: z.ZodOptional<z.ZodString>;
787
+ diagnostic: z.ZodString;
788
+ }, z.core.$strict>, z.ZodTransform<{
789
+ path?: string;
790
+ taskId?: `task/${string}`;
791
+ kind: "settlement-failed";
792
+ surface: "task" | "namespace-context" | "task-holder";
793
+ contractId: import("../core/facts/types.js").ContractId;
794
+ diagnostic: string;
795
+ }, {
796
+ kind: "settlement-failed";
797
+ surface: "task" | "namespace-context" | "task-holder";
798
+ contractId: import("../core/facts/types.js").ContractId;
799
+ diagnostic: string;
800
+ taskId?: `task/${string}` | undefined;
801
+ path?: string | undefined;
802
+ }>>>;
803
+ recoverySnapshot: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>>;
804
+ cleanup: z.ZodOptional<z.ZodObject<{
805
+ phase: z.ZodLiteral<"destroy">;
806
+ command: z.ZodNumber;
807
+ detail: z.ZodUnion<readonly [z.ZodObject<{
808
+ kind: z.ZodLiteral<"exit">;
809
+ code: z.ZodNumber;
810
+ stdout: z.ZodString;
811
+ stderr: z.ZodString;
812
+ truncated: z.ZodBoolean;
813
+ }, z.core.$strict>, z.ZodObject<{
814
+ kind: z.ZodLiteral<"timeout">;
815
+ }, z.core.$strict>, z.ZodObject<{
816
+ kind: z.ZodLiteral<"spawn-error">;
817
+ diagnostic: z.ZodString;
818
+ }, z.core.$strict>, z.ZodObject<{
819
+ kind: z.ZodLiteral<"unknown-exit">;
820
+ }, z.core.$strict>]>;
821
+ }, z.core.$strict>>;
822
+ leak: z.ZodOptional<z.ZodObject<{
823
+ path: z.ZodString;
824
+ diagnostic: z.ZodString;
825
+ }, z.core.$strict>>;
826
+ }, z.core.$strict>, z.ZodTransform<{
827
+ leak?: {
828
+ path: string;
829
+ diagnostic: string;
830
+ };
831
+ cleanup?: {
832
+ phase: "destroy";
833
+ command: number;
834
+ detail: {
835
+ kind: "exit";
836
+ code: number;
837
+ stdout: string;
838
+ stderr: string;
839
+ truncated: boolean;
840
+ } | {
841
+ kind: "timeout";
842
+ } | {
843
+ kind: "spawn-error";
844
+ diagnostic: string;
845
+ } | {
846
+ kind: "unknown-exit";
847
+ };
848
+ };
849
+ recoverySnapshot?: import("../core/facts/types.js").SnapshotId;
850
+ facts: (Readonly<{
851
+ v: 1;
852
+ kind: "bound";
853
+ contract: import("../core/facts/types.js").ContractId;
854
+ entry: import("../core/facts/types.js").EntryUlid;
855
+ at: string;
856
+ actor?: import("../core/facts/types.js").ActorId;
857
+ data: Readonly<Record<string, never>>;
858
+ }> | Readonly<{
859
+ v: 1;
860
+ kind: "bind";
861
+ contract: import("../core/facts/types.js").ContractId;
862
+ entry: import("../core/facts/types.js").EntryUlid;
863
+ at: string;
864
+ actor?: import("../core/facts/types.js").ActorId;
865
+ data: Readonly<{
866
+ coordinates: import("../core/facts/types.js").ContractCoordinates;
867
+ terms: import("../core/facts/types.js").ContractTerms;
868
+ }>;
869
+ }> | Readonly<{
870
+ v: 1;
871
+ kind: "amend";
872
+ contract: import("../core/facts/types.js").ContractId;
873
+ entry: import("../core/facts/types.js").EntryUlid;
874
+ at: string;
875
+ actor?: import("../core/facts/types.js").ActorId;
876
+ data: Readonly<{
877
+ document: Readonly<{
878
+ bytes: string;
879
+ key: import("../core/facts/types.js").DocumentKey;
880
+ }>;
881
+ segments: readonly import("../core/facts/types.js").DocumentSegmentKey[];
882
+ gates: readonly import("../core/facts/types.js").Gate[];
883
+ after: readonly import("../core/facts/types.js").ContractId[];
884
+ }>;
885
+ }> | Readonly<{
886
+ v: 1;
887
+ kind: "deliver";
888
+ contract: import("../core/facts/types.js").ContractId;
889
+ entry: import("../core/facts/types.js").EntryUlid;
890
+ at: string;
891
+ actor?: import("../core/facts/types.js").ActorId;
892
+ data: Readonly<{
893
+ tenderSnapshot: import("../core/facts/types.js").SnapshotId;
894
+ integration: Readonly<{
895
+ predecessor: import("../core/facts/types.js").SnapshotId;
896
+ snapshot: import("../core/facts/types.js").SnapshotId;
897
+ changeId: import("../core/facts/types.js").ChangeId;
898
+ }>;
899
+ method: "squash";
900
+ policy: Readonly<{
901
+ requireBranchesToBeUpToDate: boolean;
902
+ }>;
903
+ }>;
904
+ }> | Readonly<{
905
+ v: 1;
906
+ kind: "reintegrated";
907
+ contract: import("../core/facts/types.js").ContractId;
908
+ entry: import("../core/facts/types.js").EntryUlid;
909
+ at: string;
910
+ actor?: import("../core/facts/types.js").ActorId;
911
+ data: Readonly<{
912
+ predecessor: import("../core/facts/types.js").SnapshotId;
913
+ snapshot: import("../core/facts/types.js").SnapshotId;
914
+ }>;
915
+ }> | Readonly<{
916
+ v: 1;
917
+ kind: "attestation";
918
+ contract: import("../core/facts/types.js").ContractId;
919
+ entry: import("../core/facts/types.js").EntryUlid;
920
+ at: string;
921
+ actor?: import("../core/facts/types.js").ActorId;
922
+ data: Readonly<{
923
+ gate: import("../core/facts/types.js").Gate;
924
+ subject: import("../core/facts/types.js").DependencyKeySet;
925
+ verdict: "satisfied" | "unsatisfied";
926
+ summary?: string;
927
+ }>;
928
+ }> | Readonly<{
929
+ v: 1;
930
+ kind: "claimed";
931
+ contract: import("../core/facts/types.js").ContractId;
932
+ entry: import("../core/facts/types.js").EntryUlid;
933
+ at: string;
934
+ actor?: import("../core/facts/types.js").ActorId;
935
+ data: Readonly<{
936
+ delivery: import("../core/facts/types.js").EntryUlid;
937
+ }>;
938
+ }> | Readonly<{
939
+ v: 1;
940
+ kind: "arc";
941
+ contract: import("../core/facts/types.js").ContractId;
942
+ entry: import("../core/facts/types.js").EntryUlid;
943
+ at: string;
944
+ actor?: import("../core/facts/types.js").ActorId;
945
+ data: Readonly<{
946
+ seq: number;
947
+ title: string;
948
+ objective: string;
949
+ brief: string;
950
+ }>;
951
+ }> | Readonly<{
952
+ v: 1;
953
+ kind: "abandoned";
954
+ contract: import("../core/facts/types.js").ContractId;
955
+ entry: import("../core/facts/types.js").EntryUlid;
956
+ at: string;
957
+ actor?: import("../core/facts/types.js").ActorId;
958
+ data: Readonly<{
959
+ note?: string;
960
+ }>;
961
+ }>)[];
962
+ head: import("../core/facts/types.js").ContractHead;
963
+ value: {
964
+ continuation?: {
965
+ claimed: import("../core/facts/types.js").ContractId[];
966
+ stopped: {
967
+ contractId: import("../core/facts/types.js").ContractId;
968
+ stop: {
969
+ refusal: {
970
+ kind: "integration-failed";
971
+ contractId: import("../core/facts/types.js").ContractId;
972
+ reason: "conflict" | "not-based-on-target" | "unrelated-histories";
973
+ targetHead: import("../core/facts/types.js").SnapshotId;
974
+ } | {
975
+ conflictPaths: string[];
976
+ kind: "integration-failed";
977
+ contractId: import("../core/facts/types.js").ContractId;
978
+ reason: "conflict" | "not-based-on-target" | "unrelated-histories";
979
+ targetHead: import("../core/facts/types.js").SnapshotId;
980
+ } | {
981
+ kind: "checkout-not-followable";
982
+ contractId: import("../core/facts/types.js").ContractId;
983
+ target: string;
984
+ path: string;
985
+ reason: "conflict" | "staged" | "untracked";
986
+ paths: string[];
987
+ } | {
988
+ kind: "gates-unsatisfied";
989
+ contractId: import("../core/facts/types.js").ContractId;
990
+ unmet: {
991
+ gate: import("../core/facts/types.js").Gate;
992
+ current: {
993
+ kind: "attested";
994
+ verdict: "satisfied" | "unsatisfied";
995
+ at: string;
996
+ } | {
997
+ summary: string;
998
+ kind: "attested";
999
+ verdict: "satisfied" | "unsatisfied";
1000
+ at: string;
1001
+ } | {
1002
+ kind: "stale";
1003
+ priorVerdict: "satisfied" | "unsatisfied";
1004
+ } | {
1005
+ kind: "missing";
1006
+ };
1007
+ }[];
1008
+ } | {
1009
+ kind: "prerequisites-unsatisfied";
1010
+ contractId: import("../core/facts/types.js").ContractId;
1011
+ unmet: {
1012
+ contractId: import("../core/facts/types.js").ContractId;
1013
+ state: "missing" | "active" | "abandoned";
1014
+ }[];
1015
+ } | {
1016
+ kind: "terminal" | "contract-missing" | "delivery-missing";
1017
+ contractId: import("../core/facts/types.js").ContractId;
1018
+ } | {
1019
+ kind: "integration-unsupported";
1020
+ contractId: import("../core/facts/types.js").ContractId;
1021
+ requiredGit: "2.38";
1022
+ } | {
1023
+ kind: "target-missing";
1024
+ contractId: import("../core/facts/types.js").ContractId;
1025
+ };
1026
+ } | {
1027
+ retry: {
1028
+ kind: "exhausted";
1029
+ } | {
1030
+ kind: "collision";
1031
+ } | {
1032
+ kind: "publication-failed";
1033
+ diagnostic: string;
1034
+ };
1035
+ } | {
1036
+ failure: "target-moved";
1037
+ contractId: import("../core/facts/types.js").ContractId;
1038
+ target: string;
1039
+ expected: import("../core/facts/types.js").SnapshotId;
1040
+ observed: import("../core/facts/types.js").SnapshotId | null;
1041
+ observedTreeEqualsCandidate: boolean;
1042
+ } | {
1043
+ failure: "target-moved";
1044
+ contractId: import("../core/facts/types.js").ContractId;
1045
+ target: string;
1046
+ integratedAt: import("../core/facts/types.js").SnapshotId;
1047
+ observed: import("../core/facts/types.js").SnapshotId | null;
1048
+ attempts: number;
1049
+ observedTreeEqualsCandidate: boolean;
1050
+ } | {
1051
+ failure: "target-placement-failed";
1052
+ diagnostic: string;
1053
+ } | {
1054
+ kind: "already-terminal";
1055
+ };
1056
+ }[];
1057
+ };
1058
+ leak?: {
1059
+ path: string;
1060
+ diagnostic: string;
1061
+ };
1062
+ cleanup?: {
1063
+ phase: "destroy";
1064
+ command: number;
1065
+ detail: {
1066
+ kind: "exit";
1067
+ code: number;
1068
+ stdout: string;
1069
+ stderr: string;
1070
+ truncated: boolean;
1071
+ } | {
1072
+ kind: "timeout";
1073
+ } | {
1074
+ kind: "spawn-error";
1075
+ diagnostic: string;
1076
+ } | {
1077
+ kind: "unknown-exit";
1078
+ };
1079
+ };
1080
+ placement?: {
1081
+ refusal: {
1082
+ kind: "integration-failed";
1083
+ contractId: import("../core/facts/types.js").ContractId;
1084
+ reason: "conflict" | "not-based-on-target" | "unrelated-histories";
1085
+ targetHead: import("../core/facts/types.js").SnapshotId;
1086
+ } | {
1087
+ conflictPaths: string[];
1088
+ kind: "integration-failed";
1089
+ contractId: import("../core/facts/types.js").ContractId;
1090
+ reason: "conflict" | "not-based-on-target" | "unrelated-histories";
1091
+ targetHead: import("../core/facts/types.js").SnapshotId;
1092
+ } | {
1093
+ kind: "checkout-not-followable";
1094
+ contractId: import("../core/facts/types.js").ContractId;
1095
+ target: string;
1096
+ path: string;
1097
+ reason: "conflict" | "staged" | "untracked";
1098
+ paths: string[];
1099
+ } | {
1100
+ kind: "gates-unsatisfied";
1101
+ contractId: import("../core/facts/types.js").ContractId;
1102
+ unmet: {
1103
+ gate: import("../core/facts/types.js").Gate;
1104
+ current: {
1105
+ kind: "attested";
1106
+ verdict: "satisfied" | "unsatisfied";
1107
+ at: string;
1108
+ } | {
1109
+ summary: string;
1110
+ kind: "attested";
1111
+ verdict: "satisfied" | "unsatisfied";
1112
+ at: string;
1113
+ } | {
1114
+ kind: "stale";
1115
+ priorVerdict: "satisfied" | "unsatisfied";
1116
+ } | {
1117
+ kind: "missing";
1118
+ };
1119
+ }[];
1120
+ } | {
1121
+ kind: "prerequisites-unsatisfied";
1122
+ contractId: import("../core/facts/types.js").ContractId;
1123
+ unmet: {
1124
+ contractId: import("../core/facts/types.js").ContractId;
1125
+ state: "missing" | "active" | "abandoned";
1126
+ }[];
1127
+ } | {
1128
+ kind: "terminal" | "contract-missing" | "delivery-missing";
1129
+ contractId: import("../core/facts/types.js").ContractId;
1130
+ } | {
1131
+ kind: "integration-unsupported";
1132
+ contractId: import("../core/facts/types.js").ContractId;
1133
+ requiredGit: "2.38";
1134
+ } | {
1135
+ kind: "target-missing";
1136
+ contractId: import("../core/facts/types.js").ContractId;
1137
+ };
1138
+ } | {
1139
+ retry: {
1140
+ kind: "exhausted";
1141
+ } | {
1142
+ kind: "collision";
1143
+ } | {
1144
+ kind: "publication-failed";
1145
+ diagnostic: string;
1146
+ };
1147
+ } | {
1148
+ failure: "target-moved";
1149
+ contractId: import("../core/facts/types.js").ContractId;
1150
+ target: string;
1151
+ expected: import("../core/facts/types.js").SnapshotId;
1152
+ observed: import("../core/facts/types.js").SnapshotId | null;
1153
+ observedTreeEqualsCandidate: boolean;
1154
+ } | {
1155
+ failure: "target-moved";
1156
+ contractId: import("../core/facts/types.js").ContractId;
1157
+ target: string;
1158
+ integratedAt: import("../core/facts/types.js").SnapshotId;
1159
+ observed: import("../core/facts/types.js").SnapshotId | null;
1160
+ attempts: number;
1161
+ observedTreeEqualsCandidate: boolean;
1162
+ } | {
1163
+ failure: "target-placement-failed";
1164
+ diagnostic: string;
1165
+ };
1166
+ verificationSummary?: string;
1167
+ verificationReuse?: {
1168
+ entry: import("../core/facts/types.js").EntryUlid;
1169
+ verdict: "satisfied" | "unsatisfied";
1170
+ } | {
1171
+ summary: string;
1172
+ entry: import("../core/facts/types.js").EntryUlid;
1173
+ verdict: "satisfied" | "unsatisfied";
1174
+ };
1175
+ verification?: {
1176
+ refusal: {
1177
+ kind: "verification-declaration-invalid";
1178
+ } | {
1179
+ contractId: import("../core/facts/types.js").ContractId;
1180
+ kind: "verification-declaration-invalid";
1181
+ } | {
1182
+ kind: "terminal" | "contract-missing";
1183
+ contractId: import("../core/facts/types.js").ContractId;
1184
+ };
1185
+ } | {
1186
+ retry: {
1187
+ kind: "exhausted";
1188
+ } | {
1189
+ kind: "collision";
1190
+ } | {
1191
+ kind: "publication-failed";
1192
+ diagnostic: string;
1193
+ };
1194
+ } | {
1195
+ failure: "cancelled" | "unknown-exit";
1196
+ } | {
1197
+ failure: "spawn-error" | "candidate-unavailable";
1198
+ diagnostic: string;
1199
+ } | {
1200
+ failure: "environment-failure";
1201
+ diagnostic: string;
1202
+ } | {
1203
+ failure: "environment-failure";
1204
+ command: number;
1205
+ detail: {
1206
+ kind: "exit";
1207
+ code: number;
1208
+ stdout: string;
1209
+ stderr: string;
1210
+ truncated: boolean;
1211
+ } | {
1212
+ kind: "timeout";
1213
+ } | {
1214
+ kind: "spawn-error";
1215
+ diagnostic: string;
1216
+ } | {
1217
+ kind: "unknown-exit";
1218
+ };
1219
+ };
1220
+ completion?: {
1221
+ integration: import("../core/facts/types.js").SnapshotId;
1222
+ } | {
1223
+ verification: {
1224
+ mode: "reused" | "ran";
1225
+ verdict: "satisfied" | "unsatisfied";
1226
+ };
1227
+ integration: import("../core/facts/types.js").SnapshotId;
1228
+ };
1229
+ tenderSnapshot: import("../core/facts/types.js").SnapshotId;
1230
+ integration: {
1231
+ predecessor: import("../core/facts/types.js").SnapshotId;
1232
+ snapshot: import("../core/facts/types.js").SnapshotId;
1233
+ changeId: import("../core/facts/types.js").ChangeId;
1234
+ };
1235
+ method: "squash";
1236
+ policy: {
1237
+ requireBranchesToBeUpToDate: boolean;
1238
+ };
1239
+ };
1240
+ lags: ({
1241
+ kind: "worktree-follow-retained";
1242
+ path: string;
1243
+ tender: import("../core/facts/types.js").SnapshotId;
1244
+ head: import("../core/facts/types.js").SnapshotId;
1245
+ reason: "head-moved" | "head-attached" | "operation-in-progress" | "unsupported-parent-shape";
1246
+ } | {
1247
+ paths: string[];
1248
+ kind: "worktree-follow-retained";
1249
+ path: string;
1250
+ tender: import("../core/facts/types.js").SnapshotId;
1251
+ head: import("../core/facts/types.js").SnapshotId;
1252
+ reason: "head-moved" | "head-attached" | "operation-in-progress" | "unsupported-parent-shape";
1253
+ } | {
1254
+ kind: "unsealed-bytes";
1255
+ path: string;
1256
+ paths: string[];
1257
+ } | {
1258
+ head: import("../core/facts/types.js").SnapshotId;
1259
+ kind: "unsealed-bytes";
1260
+ path: string;
1261
+ paths: string[];
1262
+ } | {
1263
+ kind: "worktree-retained";
1264
+ path: string;
1265
+ } | {
1266
+ kind: "target-checkout-retained";
1267
+ path: string;
1268
+ target: string;
1269
+ diagnostic: string;
1270
+ } | {
1271
+ kind: "reconcile-failed";
1272
+ stage: "observation" | "effect";
1273
+ diagnostic: string;
1274
+ } | {
1275
+ kind: "ref-migration-conflict";
1276
+ legacyRef: string;
1277
+ legacyOid: import("../core/facts/types.js").SnapshotId;
1278
+ currentRef: string;
1279
+ currentOid: import("../core/facts/types.js").SnapshotId;
1280
+ } | {
1281
+ kind: "worktree-hook-failed";
1282
+ phase: "destroy" | "create";
1283
+ path: string;
1284
+ command: number;
1285
+ name: string;
1286
+ failure: {
1287
+ kind: "exit";
1288
+ code: number;
1289
+ stdout: string;
1290
+ stderr: string;
1291
+ truncated: boolean;
1292
+ } | {
1293
+ kind: "timeout";
1294
+ } | {
1295
+ kind: "spawn-error";
1296
+ diagnostic: string;
1297
+ } | {
1298
+ kind: "unknown-exit";
1299
+ };
1300
+ } | {
1301
+ kind: "contract-file-failed";
1302
+ worktree: string;
1303
+ path: string;
1304
+ diagnostic: string;
1305
+ })[];
1306
+ settlementLags: {
1307
+ path?: string;
1308
+ taskId?: `task/${string}`;
1309
+ kind: "settlement-failed";
1310
+ surface: "task" | "namespace-context" | "task-holder";
1311
+ contractId: import("../core/facts/types.js").ContractId;
1312
+ diagnostic: string;
1313
+ }[];
1314
+ }, {
1315
+ facts: (Readonly<{
1316
+ v: 1;
1317
+ kind: "bound";
1318
+ contract: import("../core/facts/types.js").ContractId;
1319
+ entry: import("../core/facts/types.js").EntryUlid;
1320
+ at: string;
1321
+ actor?: import("../core/facts/types.js").ActorId;
1322
+ data: Readonly<Record<string, never>>;
1323
+ }> | Readonly<{
1324
+ v: 1;
1325
+ kind: "bind";
1326
+ contract: import("../core/facts/types.js").ContractId;
1327
+ entry: import("../core/facts/types.js").EntryUlid;
1328
+ at: string;
1329
+ actor?: import("../core/facts/types.js").ActorId;
1330
+ data: Readonly<{
1331
+ coordinates: import("../core/facts/types.js").ContractCoordinates;
1332
+ terms: import("../core/facts/types.js").ContractTerms;
1333
+ }>;
1334
+ }> | Readonly<{
1335
+ v: 1;
1336
+ kind: "amend";
1337
+ contract: import("../core/facts/types.js").ContractId;
1338
+ entry: import("../core/facts/types.js").EntryUlid;
1339
+ at: string;
1340
+ actor?: import("../core/facts/types.js").ActorId;
1341
+ data: Readonly<{
1342
+ document: Readonly<{
1343
+ bytes: string;
1344
+ key: import("../core/facts/types.js").DocumentKey;
1345
+ }>;
1346
+ segments: readonly import("../core/facts/types.js").DocumentSegmentKey[];
1347
+ gates: readonly import("../core/facts/types.js").Gate[];
1348
+ after: readonly import("../core/facts/types.js").ContractId[];
1349
+ }>;
1350
+ }> | Readonly<{
1351
+ v: 1;
1352
+ kind: "deliver";
1353
+ contract: import("../core/facts/types.js").ContractId;
1354
+ entry: import("../core/facts/types.js").EntryUlid;
1355
+ at: string;
1356
+ actor?: import("../core/facts/types.js").ActorId;
1357
+ data: Readonly<{
1358
+ tenderSnapshot: import("../core/facts/types.js").SnapshotId;
1359
+ integration: Readonly<{
1360
+ predecessor: import("../core/facts/types.js").SnapshotId;
1361
+ snapshot: import("../core/facts/types.js").SnapshotId;
1362
+ changeId: import("../core/facts/types.js").ChangeId;
1363
+ }>;
1364
+ method: "squash";
1365
+ policy: Readonly<{
1366
+ requireBranchesToBeUpToDate: boolean;
1367
+ }>;
1368
+ }>;
1369
+ }> | Readonly<{
1370
+ v: 1;
1371
+ kind: "reintegrated";
1372
+ contract: import("../core/facts/types.js").ContractId;
1373
+ entry: import("../core/facts/types.js").EntryUlid;
1374
+ at: string;
1375
+ actor?: import("../core/facts/types.js").ActorId;
1376
+ data: Readonly<{
1377
+ predecessor: import("../core/facts/types.js").SnapshotId;
1378
+ snapshot: import("../core/facts/types.js").SnapshotId;
1379
+ }>;
1380
+ }> | Readonly<{
1381
+ v: 1;
1382
+ kind: "attestation";
1383
+ contract: import("../core/facts/types.js").ContractId;
1384
+ entry: import("../core/facts/types.js").EntryUlid;
1385
+ at: string;
1386
+ actor?: import("../core/facts/types.js").ActorId;
1387
+ data: Readonly<{
1388
+ gate: import("../core/facts/types.js").Gate;
1389
+ subject: import("../core/facts/types.js").DependencyKeySet;
1390
+ verdict: "satisfied" | "unsatisfied";
1391
+ summary?: string;
1392
+ }>;
1393
+ }> | Readonly<{
1394
+ v: 1;
1395
+ kind: "claimed";
1396
+ contract: import("../core/facts/types.js").ContractId;
1397
+ entry: import("../core/facts/types.js").EntryUlid;
1398
+ at: string;
1399
+ actor?: import("../core/facts/types.js").ActorId;
1400
+ data: Readonly<{
1401
+ delivery: import("../core/facts/types.js").EntryUlid;
1402
+ }>;
1403
+ }> | Readonly<{
1404
+ v: 1;
1405
+ kind: "arc";
1406
+ contract: import("../core/facts/types.js").ContractId;
1407
+ entry: import("../core/facts/types.js").EntryUlid;
1408
+ at: string;
1409
+ actor?: import("../core/facts/types.js").ActorId;
1410
+ data: Readonly<{
1411
+ seq: number;
1412
+ title: string;
1413
+ objective: string;
1414
+ brief: string;
1415
+ }>;
1416
+ }> | Readonly<{
1417
+ v: 1;
1418
+ kind: "abandoned";
1419
+ contract: import("../core/facts/types.js").ContractId;
1420
+ entry: import("../core/facts/types.js").EntryUlid;
1421
+ at: string;
1422
+ actor?: import("../core/facts/types.js").ActorId;
1423
+ data: Readonly<{
1424
+ note?: string;
1425
+ }>;
1426
+ }>)[];
1427
+ head: import("../core/facts/types.js").ContractHead;
1428
+ value: {
1429
+ continuation?: {
1430
+ claimed: import("../core/facts/types.js").ContractId[];
1431
+ stopped: {
1432
+ contractId: import("../core/facts/types.js").ContractId;
1433
+ stop: {
1434
+ refusal: {
1435
+ kind: "integration-failed";
1436
+ contractId: import("../core/facts/types.js").ContractId;
1437
+ reason: "conflict" | "not-based-on-target" | "unrelated-histories";
1438
+ targetHead: import("../core/facts/types.js").SnapshotId;
1439
+ } | {
1440
+ conflictPaths: string[];
1441
+ kind: "integration-failed";
1442
+ contractId: import("../core/facts/types.js").ContractId;
1443
+ reason: "conflict" | "not-based-on-target" | "unrelated-histories";
1444
+ targetHead: import("../core/facts/types.js").SnapshotId;
1445
+ } | {
1446
+ kind: "checkout-not-followable";
1447
+ contractId: import("../core/facts/types.js").ContractId;
1448
+ target: string;
1449
+ path: string;
1450
+ reason: "conflict" | "staged" | "untracked";
1451
+ paths: string[];
1452
+ } | {
1453
+ kind: "gates-unsatisfied";
1454
+ contractId: import("../core/facts/types.js").ContractId;
1455
+ unmet: {
1456
+ gate: import("../core/facts/types.js").Gate;
1457
+ current: {
1458
+ kind: "attested";
1459
+ verdict: "satisfied" | "unsatisfied";
1460
+ at: string;
1461
+ } | {
1462
+ summary: string;
1463
+ kind: "attested";
1464
+ verdict: "satisfied" | "unsatisfied";
1465
+ at: string;
1466
+ } | {
1467
+ kind: "stale";
1468
+ priorVerdict: "satisfied" | "unsatisfied";
1469
+ } | {
1470
+ kind: "missing";
1471
+ };
1472
+ }[];
1473
+ } | {
1474
+ kind: "prerequisites-unsatisfied";
1475
+ contractId: import("../core/facts/types.js").ContractId;
1476
+ unmet: {
1477
+ contractId: import("../core/facts/types.js").ContractId;
1478
+ state: "missing" | "active" | "abandoned";
1479
+ }[];
1480
+ } | {
1481
+ kind: "terminal" | "contract-missing" | "delivery-missing";
1482
+ contractId: import("../core/facts/types.js").ContractId;
1483
+ } | {
1484
+ kind: "integration-unsupported";
1485
+ contractId: import("../core/facts/types.js").ContractId;
1486
+ requiredGit: "2.38";
1487
+ } | {
1488
+ kind: "target-missing";
1489
+ contractId: import("../core/facts/types.js").ContractId;
1490
+ };
1491
+ } | {
1492
+ retry: {
1493
+ kind: "exhausted";
1494
+ } | {
1495
+ kind: "collision";
1496
+ } | {
1497
+ kind: "publication-failed";
1498
+ diagnostic: string;
1499
+ };
1500
+ } | {
1501
+ failure: "target-moved";
1502
+ contractId: import("../core/facts/types.js").ContractId;
1503
+ target: string;
1504
+ expected: import("../core/facts/types.js").SnapshotId;
1505
+ observed: import("../core/facts/types.js").SnapshotId | null;
1506
+ observedTreeEqualsCandidate: boolean;
1507
+ } | {
1508
+ failure: "target-moved";
1509
+ contractId: import("../core/facts/types.js").ContractId;
1510
+ target: string;
1511
+ integratedAt: import("../core/facts/types.js").SnapshotId;
1512
+ observed: import("../core/facts/types.js").SnapshotId | null;
1513
+ attempts: number;
1514
+ observedTreeEqualsCandidate: boolean;
1515
+ } | {
1516
+ failure: "target-placement-failed";
1517
+ diagnostic: string;
1518
+ } | {
1519
+ kind: "already-terminal";
1520
+ };
1521
+ }[];
1522
+ };
1523
+ leak?: {
1524
+ path: string;
1525
+ diagnostic: string;
1526
+ };
1527
+ cleanup?: {
1528
+ phase: "destroy";
1529
+ command: number;
1530
+ detail: {
1531
+ kind: "exit";
1532
+ code: number;
1533
+ stdout: string;
1534
+ stderr: string;
1535
+ truncated: boolean;
1536
+ } | {
1537
+ kind: "timeout";
1538
+ } | {
1539
+ kind: "spawn-error";
1540
+ diagnostic: string;
1541
+ } | {
1542
+ kind: "unknown-exit";
1543
+ };
1544
+ };
1545
+ placement?: {
1546
+ refusal: {
1547
+ kind: "integration-failed";
1548
+ contractId: import("../core/facts/types.js").ContractId;
1549
+ reason: "conflict" | "not-based-on-target" | "unrelated-histories";
1550
+ targetHead: import("../core/facts/types.js").SnapshotId;
1551
+ } | {
1552
+ conflictPaths: string[];
1553
+ kind: "integration-failed";
1554
+ contractId: import("../core/facts/types.js").ContractId;
1555
+ reason: "conflict" | "not-based-on-target" | "unrelated-histories";
1556
+ targetHead: import("../core/facts/types.js").SnapshotId;
1557
+ } | {
1558
+ kind: "checkout-not-followable";
1559
+ contractId: import("../core/facts/types.js").ContractId;
1560
+ target: string;
1561
+ path: string;
1562
+ reason: "conflict" | "staged" | "untracked";
1563
+ paths: string[];
1564
+ } | {
1565
+ kind: "gates-unsatisfied";
1566
+ contractId: import("../core/facts/types.js").ContractId;
1567
+ unmet: {
1568
+ gate: import("../core/facts/types.js").Gate;
1569
+ current: {
1570
+ kind: "attested";
1571
+ verdict: "satisfied" | "unsatisfied";
1572
+ at: string;
1573
+ } | {
1574
+ summary: string;
1575
+ kind: "attested";
1576
+ verdict: "satisfied" | "unsatisfied";
1577
+ at: string;
1578
+ } | {
1579
+ kind: "stale";
1580
+ priorVerdict: "satisfied" | "unsatisfied";
1581
+ } | {
1582
+ kind: "missing";
1583
+ };
1584
+ }[];
1585
+ } | {
1586
+ kind: "prerequisites-unsatisfied";
1587
+ contractId: import("../core/facts/types.js").ContractId;
1588
+ unmet: {
1589
+ contractId: import("../core/facts/types.js").ContractId;
1590
+ state: "missing" | "active" | "abandoned";
1591
+ }[];
1592
+ } | {
1593
+ kind: "terminal" | "contract-missing" | "delivery-missing";
1594
+ contractId: import("../core/facts/types.js").ContractId;
1595
+ } | {
1596
+ kind: "integration-unsupported";
1597
+ contractId: import("../core/facts/types.js").ContractId;
1598
+ requiredGit: "2.38";
1599
+ } | {
1600
+ kind: "target-missing";
1601
+ contractId: import("../core/facts/types.js").ContractId;
1602
+ };
1603
+ } | {
1604
+ retry: {
1605
+ kind: "exhausted";
1606
+ } | {
1607
+ kind: "collision";
1608
+ } | {
1609
+ kind: "publication-failed";
1610
+ diagnostic: string;
1611
+ };
1612
+ } | {
1613
+ failure: "target-moved";
1614
+ contractId: import("../core/facts/types.js").ContractId;
1615
+ target: string;
1616
+ expected: import("../core/facts/types.js").SnapshotId;
1617
+ observed: import("../core/facts/types.js").SnapshotId | null;
1618
+ observedTreeEqualsCandidate: boolean;
1619
+ } | {
1620
+ failure: "target-moved";
1621
+ contractId: import("../core/facts/types.js").ContractId;
1622
+ target: string;
1623
+ integratedAt: import("../core/facts/types.js").SnapshotId;
1624
+ observed: import("../core/facts/types.js").SnapshotId | null;
1625
+ attempts: number;
1626
+ observedTreeEqualsCandidate: boolean;
1627
+ } | {
1628
+ failure: "target-placement-failed";
1629
+ diagnostic: string;
1630
+ };
1631
+ verificationSummary?: string;
1632
+ verificationReuse?: {
1633
+ entry: import("../core/facts/types.js").EntryUlid;
1634
+ verdict: "satisfied" | "unsatisfied";
1635
+ } | {
1636
+ summary: string;
1637
+ entry: import("../core/facts/types.js").EntryUlid;
1638
+ verdict: "satisfied" | "unsatisfied";
1639
+ };
1640
+ verification?: {
1641
+ refusal: {
1642
+ kind: "verification-declaration-invalid";
1643
+ } | {
1644
+ contractId: import("../core/facts/types.js").ContractId;
1645
+ kind: "verification-declaration-invalid";
1646
+ } | {
1647
+ kind: "terminal" | "contract-missing";
1648
+ contractId: import("../core/facts/types.js").ContractId;
1649
+ };
1650
+ } | {
1651
+ retry: {
1652
+ kind: "exhausted";
1653
+ } | {
1654
+ kind: "collision";
1655
+ } | {
1656
+ kind: "publication-failed";
1657
+ diagnostic: string;
1658
+ };
1659
+ } | {
1660
+ failure: "cancelled" | "unknown-exit";
1661
+ } | {
1662
+ failure: "spawn-error" | "candidate-unavailable";
1663
+ diagnostic: string;
1664
+ } | {
1665
+ failure: "environment-failure";
1666
+ diagnostic: string;
1667
+ } | {
1668
+ failure: "environment-failure";
1669
+ command: number;
1670
+ detail: {
1671
+ kind: "exit";
1672
+ code: number;
1673
+ stdout: string;
1674
+ stderr: string;
1675
+ truncated: boolean;
1676
+ } | {
1677
+ kind: "timeout";
1678
+ } | {
1679
+ kind: "spawn-error";
1680
+ diagnostic: string;
1681
+ } | {
1682
+ kind: "unknown-exit";
1683
+ };
1684
+ };
1685
+ completion?: {
1686
+ integration: import("../core/facts/types.js").SnapshotId;
1687
+ } | {
1688
+ verification: {
1689
+ mode: "reused" | "ran";
1690
+ verdict: "satisfied" | "unsatisfied";
1691
+ };
1692
+ integration: import("../core/facts/types.js").SnapshotId;
1693
+ };
1694
+ tenderSnapshot: import("../core/facts/types.js").SnapshotId;
1695
+ integration: {
1696
+ predecessor: import("../core/facts/types.js").SnapshotId;
1697
+ snapshot: import("../core/facts/types.js").SnapshotId;
1698
+ changeId: import("../core/facts/types.js").ChangeId;
1699
+ };
1700
+ method: "squash";
1701
+ policy: {
1702
+ requireBranchesToBeUpToDate: boolean;
1703
+ };
1704
+ };
1705
+ lags: ({
1706
+ kind: "worktree-follow-retained";
1707
+ path: string;
1708
+ tender: import("../core/facts/types.js").SnapshotId;
1709
+ head: import("../core/facts/types.js").SnapshotId;
1710
+ reason: "head-moved" | "head-attached" | "operation-in-progress" | "unsupported-parent-shape";
1711
+ } | {
1712
+ paths: string[];
1713
+ kind: "worktree-follow-retained";
1714
+ path: string;
1715
+ tender: import("../core/facts/types.js").SnapshotId;
1716
+ head: import("../core/facts/types.js").SnapshotId;
1717
+ reason: "head-moved" | "head-attached" | "operation-in-progress" | "unsupported-parent-shape";
1718
+ } | {
1719
+ kind: "unsealed-bytes";
1720
+ path: string;
1721
+ paths: string[];
1722
+ } | {
1723
+ head: import("../core/facts/types.js").SnapshotId;
1724
+ kind: "unsealed-bytes";
1725
+ path: string;
1726
+ paths: string[];
1727
+ } | {
1728
+ kind: "worktree-retained";
1729
+ path: string;
1730
+ } | {
1731
+ kind: "target-checkout-retained";
1732
+ path: string;
1733
+ target: string;
1734
+ diagnostic: string;
1735
+ } | {
1736
+ kind: "reconcile-failed";
1737
+ stage: "observation" | "effect";
1738
+ diagnostic: string;
1739
+ } | {
1740
+ kind: "ref-migration-conflict";
1741
+ legacyRef: string;
1742
+ legacyOid: import("../core/facts/types.js").SnapshotId;
1743
+ currentRef: string;
1744
+ currentOid: import("../core/facts/types.js").SnapshotId;
1745
+ } | {
1746
+ kind: "worktree-hook-failed";
1747
+ phase: "destroy" | "create";
1748
+ path: string;
1749
+ command: number;
1750
+ name: string;
1751
+ failure: {
1752
+ kind: "exit";
1753
+ code: number;
1754
+ stdout: string;
1755
+ stderr: string;
1756
+ truncated: boolean;
1757
+ } | {
1758
+ kind: "timeout";
1759
+ } | {
1760
+ kind: "spawn-error";
1761
+ diagnostic: string;
1762
+ } | {
1763
+ kind: "unknown-exit";
1764
+ };
1765
+ } | {
1766
+ kind: "contract-file-failed";
1767
+ worktree: string;
1768
+ path: string;
1769
+ diagnostic: string;
1770
+ })[];
1771
+ settlementLags: {
1772
+ path?: string;
1773
+ taskId?: `task/${string}`;
1774
+ kind: "settlement-failed";
1775
+ surface: "task" | "namespace-context" | "task-holder";
1776
+ contractId: import("../core/facts/types.js").ContractId;
1777
+ diagnostic: string;
1778
+ }[];
1779
+ recoverySnapshot?: import("../core/facts/types.js").SnapshotId | undefined;
1780
+ cleanup?: {
1781
+ phase: "destroy";
1782
+ command: number;
1783
+ detail: {
1784
+ kind: "exit";
1785
+ code: number;
1786
+ stdout: string;
1787
+ stderr: string;
1788
+ truncated: boolean;
1789
+ } | {
1790
+ kind: "timeout";
1791
+ } | {
1792
+ kind: "spawn-error";
1793
+ diagnostic: string;
1794
+ } | {
1795
+ kind: "unknown-exit";
1796
+ };
1797
+ } | undefined;
1798
+ leak?: {
1799
+ path: string;
1800
+ diagnostic: string;
1801
+ } | undefined;
1802
+ }>>, z.ZodObject<{
1803
+ kind: z.ZodLiteral<"integration-conflict-materialized">;
1804
+ targetHead: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
1805
+ conflictPaths: z.ZodArray<z.ZodString>;
1806
+ workspace: z.ZodObject<{
1807
+ kind: z.ZodLiteral<"worktree">;
1808
+ path: z.ZodString;
1809
+ }, z.core.$strict>;
1810
+ }, z.core.$strict>]>;
1811
+ export declare const reviewResultSchema: z.ZodPipe<z.ZodObject<{
1812
+ facts: z.ZodArray<z.ZodPipe<z.ZodUnknown, z.ZodTransform<Readonly<{
1813
+ v: 1;
1814
+ kind: "bound";
1815
+ contract: import("../core/facts/types.js").ContractId;
1816
+ entry: import("../core/facts/types.js").EntryUlid;
1817
+ at: string;
1818
+ actor?: import("../core/facts/types.js").ActorId;
1819
+ data: Readonly<Record<string, never>>;
1820
+ }> | Readonly<{
1821
+ v: 1;
1822
+ kind: "bind";
1823
+ contract: import("../core/facts/types.js").ContractId;
1824
+ entry: import("../core/facts/types.js").EntryUlid;
1825
+ at: string;
1826
+ actor?: import("../core/facts/types.js").ActorId;
1827
+ data: Readonly<{
1828
+ coordinates: import("../core/facts/types.js").ContractCoordinates;
1829
+ terms: import("../core/facts/types.js").ContractTerms;
1830
+ }>;
1831
+ }> | Readonly<{
1832
+ v: 1;
1833
+ kind: "amend";
1834
+ contract: import("../core/facts/types.js").ContractId;
1835
+ entry: import("../core/facts/types.js").EntryUlid;
1836
+ at: string;
1837
+ actor?: import("../core/facts/types.js").ActorId;
1838
+ data: Readonly<{
1839
+ document: Readonly<{
1840
+ bytes: string;
1841
+ key: import("../core/facts/types.js").DocumentKey;
1842
+ }>;
1843
+ segments: readonly import("../core/facts/types.js").DocumentSegmentKey[];
1844
+ gates: readonly import("../core/facts/types.js").Gate[];
1845
+ after: readonly import("../core/facts/types.js").ContractId[];
1846
+ }>;
1847
+ }> | Readonly<{
1848
+ v: 1;
1849
+ kind: "deliver";
1850
+ contract: import("../core/facts/types.js").ContractId;
1851
+ entry: import("../core/facts/types.js").EntryUlid;
1852
+ at: string;
1853
+ actor?: import("../core/facts/types.js").ActorId;
1854
+ data: Readonly<{
1855
+ tenderSnapshot: import("../core/facts/types.js").SnapshotId;
1856
+ integration: Readonly<{
1857
+ predecessor: import("../core/facts/types.js").SnapshotId;
1858
+ snapshot: import("../core/facts/types.js").SnapshotId;
1859
+ changeId: import("../core/facts/types.js").ChangeId;
1860
+ }>;
1861
+ method: "squash";
1862
+ policy: Readonly<{
1863
+ requireBranchesToBeUpToDate: boolean;
1864
+ }>;
1865
+ }>;
1866
+ }> | Readonly<{
1867
+ v: 1;
1868
+ kind: "reintegrated";
1869
+ contract: import("../core/facts/types.js").ContractId;
1870
+ entry: import("../core/facts/types.js").EntryUlid;
1871
+ at: string;
1872
+ actor?: import("../core/facts/types.js").ActorId;
1873
+ data: Readonly<{
1874
+ predecessor: import("../core/facts/types.js").SnapshotId;
1875
+ snapshot: import("../core/facts/types.js").SnapshotId;
1876
+ }>;
1877
+ }> | Readonly<{
1878
+ v: 1;
1879
+ kind: "attestation";
1880
+ contract: import("../core/facts/types.js").ContractId;
1881
+ entry: import("../core/facts/types.js").EntryUlid;
1882
+ at: string;
1883
+ actor?: import("../core/facts/types.js").ActorId;
1884
+ data: Readonly<{
1885
+ gate: import("../core/facts/types.js").Gate;
1886
+ subject: import("../core/facts/types.js").DependencyKeySet;
1887
+ verdict: "satisfied" | "unsatisfied";
1888
+ summary?: string;
1889
+ }>;
1890
+ }> | Readonly<{
1891
+ v: 1;
1892
+ kind: "claimed";
1893
+ contract: import("../core/facts/types.js").ContractId;
1894
+ entry: import("../core/facts/types.js").EntryUlid;
1895
+ at: string;
1896
+ actor?: import("../core/facts/types.js").ActorId;
1897
+ data: Readonly<{
1898
+ delivery: import("../core/facts/types.js").EntryUlid;
1899
+ }>;
1900
+ }> | Readonly<{
1901
+ v: 1;
1902
+ kind: "arc";
1903
+ contract: import("../core/facts/types.js").ContractId;
1904
+ entry: import("../core/facts/types.js").EntryUlid;
1905
+ at: string;
1906
+ actor?: import("../core/facts/types.js").ActorId;
1907
+ data: Readonly<{
1908
+ seq: number;
1909
+ title: string;
1910
+ objective: string;
1911
+ brief: string;
1912
+ }>;
1913
+ }> | Readonly<{
1914
+ v: 1;
1915
+ kind: "abandoned";
1916
+ contract: import("../core/facts/types.js").ContractId;
1917
+ entry: import("../core/facts/types.js").EntryUlid;
1918
+ at: string;
1919
+ actor?: import("../core/facts/types.js").ActorId;
1920
+ data: Readonly<{
1921
+ note?: string;
1922
+ }>;
1923
+ }>, unknown>>>;
1924
+ head: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ContractHead, string>>;
1925
+ value: z.ZodType<{
1926
+ workspace?: {
1927
+ staged: string[];
1928
+ unstaged: string[];
1929
+ untracked: string[];
1930
+ shortStat: {
1931
+ filesChanged: number;
1932
+ insertions: number;
1933
+ deletions: number;
1934
+ };
1935
+ };
1936
+ continuation?: {
1937
+ claimed: import("../core/facts/types.js").ContractId[];
1938
+ stopped: {
1939
+ contractId: import("../core/facts/types.js").ContractId;
1940
+ stop: {
1941
+ refusal: {
1942
+ kind: "integration-failed";
1943
+ contractId: import("../core/facts/types.js").ContractId;
1944
+ reason: "conflict" | "not-based-on-target" | "unrelated-histories";
1945
+ targetHead: import("../core/facts/types.js").SnapshotId;
1946
+ } | {
1947
+ conflictPaths: string[];
1948
+ kind: "integration-failed";
1949
+ contractId: import("../core/facts/types.js").ContractId;
1950
+ reason: "conflict" | "not-based-on-target" | "unrelated-histories";
1951
+ targetHead: import("../core/facts/types.js").SnapshotId;
1952
+ } | {
1953
+ kind: "checkout-not-followable";
1954
+ contractId: import("../core/facts/types.js").ContractId;
1955
+ target: string;
1956
+ path: string;
1957
+ reason: "conflict" | "staged" | "untracked";
1958
+ paths: string[];
1959
+ } | {
1960
+ kind: "gates-unsatisfied";
1961
+ contractId: import("../core/facts/types.js").ContractId;
1962
+ unmet: {
1963
+ gate: import("../core/facts/types.js").Gate;
1964
+ current: {
1965
+ kind: "attested";
1966
+ verdict: "satisfied" | "unsatisfied";
1967
+ at: string;
1968
+ } | {
1969
+ summary: string;
1970
+ kind: "attested";
1971
+ verdict: "satisfied" | "unsatisfied";
1972
+ at: string;
1973
+ } | {
1974
+ kind: "stale";
1975
+ priorVerdict: "satisfied" | "unsatisfied";
1976
+ } | {
1977
+ kind: "missing";
1978
+ };
1979
+ }[];
1980
+ } | {
1981
+ kind: "prerequisites-unsatisfied";
1982
+ contractId: import("../core/facts/types.js").ContractId;
1983
+ unmet: {
1984
+ contractId: import("../core/facts/types.js").ContractId;
1985
+ state: "missing" | "active" | "abandoned";
1986
+ }[];
1987
+ } | {
1988
+ kind: "terminal" | "contract-missing" | "delivery-missing";
1989
+ contractId: import("../core/facts/types.js").ContractId;
1990
+ } | {
1991
+ kind: "integration-unsupported";
1992
+ contractId: import("../core/facts/types.js").ContractId;
1993
+ requiredGit: "2.38";
1994
+ } | {
1995
+ kind: "target-missing";
1996
+ contractId: import("../core/facts/types.js").ContractId;
1997
+ };
1998
+ } | {
1999
+ retry: {
2000
+ kind: "exhausted";
2001
+ } | {
2002
+ kind: "collision";
2003
+ } | {
2004
+ kind: "publication-failed";
2005
+ diagnostic: string;
2006
+ };
2007
+ } | {
2008
+ failure: "target-moved";
2009
+ contractId: import("../core/facts/types.js").ContractId;
2010
+ target: string;
2011
+ expected: import("../core/facts/types.js").SnapshotId;
2012
+ observed: import("../core/facts/types.js").SnapshotId | null;
2013
+ observedTreeEqualsCandidate: boolean;
2014
+ } | {
2015
+ failure: "target-moved";
2016
+ contractId: import("../core/facts/types.js").ContractId;
2017
+ target: string;
2018
+ integratedAt: import("../core/facts/types.js").SnapshotId;
2019
+ observed: import("../core/facts/types.js").SnapshotId | null;
2020
+ attempts: number;
2021
+ observedTreeEqualsCandidate: boolean;
2022
+ } | {
2023
+ failure: "target-placement-failed";
2024
+ diagnostic: string;
2025
+ } | {
2026
+ kind: "already-terminal";
2027
+ };
2028
+ }[];
2029
+ };
2030
+ leak?: {
2031
+ path: string;
2032
+ diagnostic: string;
2033
+ };
2034
+ cleanup?: {
2035
+ phase: "destroy";
2036
+ command: number;
2037
+ detail: {
2038
+ kind: "exit";
2039
+ code: number;
2040
+ stdout: string;
2041
+ stderr: string;
2042
+ truncated: boolean;
2043
+ } | {
2044
+ kind: "timeout";
2045
+ } | {
2046
+ kind: "spawn-error";
2047
+ diagnostic: string;
2048
+ } | {
2049
+ kind: "unknown-exit";
2050
+ };
2051
+ };
2052
+ placement?: {
2053
+ refusal: {
2054
+ kind: "integration-failed";
2055
+ contractId: import("../core/facts/types.js").ContractId;
2056
+ reason: "conflict" | "not-based-on-target" | "unrelated-histories";
2057
+ targetHead: import("../core/facts/types.js").SnapshotId;
2058
+ } | {
2059
+ conflictPaths: string[];
2060
+ kind: "integration-failed";
2061
+ contractId: import("../core/facts/types.js").ContractId;
2062
+ reason: "conflict" | "not-based-on-target" | "unrelated-histories";
2063
+ targetHead: import("../core/facts/types.js").SnapshotId;
2064
+ } | {
2065
+ kind: "checkout-not-followable";
2066
+ contractId: import("../core/facts/types.js").ContractId;
2067
+ target: string;
2068
+ path: string;
2069
+ reason: "conflict" | "staged" | "untracked";
2070
+ paths: string[];
2071
+ } | {
2072
+ kind: "gates-unsatisfied";
2073
+ contractId: import("../core/facts/types.js").ContractId;
2074
+ unmet: {
2075
+ gate: import("../core/facts/types.js").Gate;
2076
+ current: {
2077
+ kind: "attested";
2078
+ verdict: "satisfied" | "unsatisfied";
2079
+ at: string;
2080
+ } | {
2081
+ summary: string;
2082
+ kind: "attested";
2083
+ verdict: "satisfied" | "unsatisfied";
2084
+ at: string;
2085
+ } | {
2086
+ kind: "stale";
2087
+ priorVerdict: "satisfied" | "unsatisfied";
2088
+ } | {
2089
+ kind: "missing";
2090
+ };
2091
+ }[];
2092
+ } | {
2093
+ kind: "prerequisites-unsatisfied";
2094
+ contractId: import("../core/facts/types.js").ContractId;
2095
+ unmet: {
2096
+ contractId: import("../core/facts/types.js").ContractId;
2097
+ state: "missing" | "active" | "abandoned";
2098
+ }[];
2099
+ } | {
2100
+ kind: "terminal" | "contract-missing" | "delivery-missing";
2101
+ contractId: import("../core/facts/types.js").ContractId;
2102
+ } | {
2103
+ kind: "integration-unsupported";
2104
+ contractId: import("../core/facts/types.js").ContractId;
2105
+ requiredGit: "2.38";
2106
+ } | {
2107
+ kind: "target-missing";
2108
+ contractId: import("../core/facts/types.js").ContractId;
2109
+ };
2110
+ } | {
2111
+ retry: {
2112
+ kind: "exhausted";
2113
+ } | {
2114
+ kind: "collision";
2115
+ } | {
2116
+ kind: "publication-failed";
2117
+ diagnostic: string;
2118
+ };
2119
+ } | {
2120
+ failure: "target-moved";
2121
+ contractId: import("../core/facts/types.js").ContractId;
2122
+ target: string;
2123
+ expected: import("../core/facts/types.js").SnapshotId;
2124
+ observed: import("../core/facts/types.js").SnapshotId | null;
2125
+ observedTreeEqualsCandidate: boolean;
2126
+ } | {
2127
+ failure: "target-moved";
2128
+ contractId: import("../core/facts/types.js").ContractId;
2129
+ target: string;
2130
+ integratedAt: import("../core/facts/types.js").SnapshotId;
2131
+ observed: import("../core/facts/types.js").SnapshotId | null;
2132
+ attempts: number;
2133
+ observedTreeEqualsCandidate: boolean;
2134
+ } | {
2135
+ failure: "target-placement-failed";
2136
+ diagnostic: string;
2137
+ };
2138
+ verificationSummary?: string;
2139
+ verificationReuse?: {
2140
+ entry: import("../core/facts/types.js").EntryUlid;
2141
+ verdict: "satisfied" | "unsatisfied";
2142
+ } | {
2143
+ summary: string;
2144
+ entry: import("../core/facts/types.js").EntryUlid;
2145
+ verdict: "satisfied" | "unsatisfied";
2146
+ };
2147
+ verification?: {
2148
+ refusal: {
2149
+ kind: "verification-declaration-invalid";
2150
+ } | {
2151
+ contractId: import("../core/facts/types.js").ContractId;
2152
+ kind: "verification-declaration-invalid";
2153
+ } | {
2154
+ kind: "terminal" | "contract-missing";
2155
+ contractId: import("../core/facts/types.js").ContractId;
2156
+ };
2157
+ } | {
2158
+ retry: {
2159
+ kind: "exhausted";
2160
+ } | {
2161
+ kind: "collision";
2162
+ } | {
2163
+ kind: "publication-failed";
2164
+ diagnostic: string;
2165
+ };
2166
+ } | {
2167
+ failure: "cancelled" | "unknown-exit";
2168
+ } | {
2169
+ failure: "spawn-error" | "candidate-unavailable";
2170
+ diagnostic: string;
2171
+ } | {
2172
+ failure: "environment-failure";
2173
+ diagnostic: string;
2174
+ } | {
2175
+ failure: "environment-failure";
2176
+ command: number;
2177
+ detail: {
2178
+ kind: "exit";
2179
+ code: number;
2180
+ stdout: string;
2181
+ stderr: string;
2182
+ truncated: boolean;
2183
+ } | {
2184
+ kind: "timeout";
2185
+ } | {
2186
+ kind: "spawn-error";
2187
+ diagnostic: string;
2188
+ } | {
2189
+ kind: "unknown-exit";
2190
+ };
2191
+ };
2192
+ completion?: {
2193
+ integration: import("../core/facts/types.js").SnapshotId;
2194
+ } | {
2195
+ verification: {
2196
+ mode: "reused" | "ran";
2197
+ verdict: "satisfied" | "unsatisfied";
2198
+ };
2199
+ integration: import("../core/facts/types.js").SnapshotId;
2200
+ };
2201
+ }, unknown, z.core.$ZodTypeInternals<{
2202
+ workspace?: {
2203
+ staged: string[];
2204
+ unstaged: string[];
2205
+ untracked: string[];
2206
+ shortStat: {
2207
+ filesChanged: number;
2208
+ insertions: number;
2209
+ deletions: number;
2210
+ };
2211
+ };
2212
+ continuation?: {
2213
+ claimed: import("../core/facts/types.js").ContractId[];
2214
+ stopped: {
2215
+ contractId: import("../core/facts/types.js").ContractId;
2216
+ stop: {
2217
+ refusal: {
2218
+ kind: "integration-failed";
2219
+ contractId: import("../core/facts/types.js").ContractId;
2220
+ reason: "conflict" | "not-based-on-target" | "unrelated-histories";
2221
+ targetHead: import("../core/facts/types.js").SnapshotId;
2222
+ } | {
2223
+ conflictPaths: string[];
2224
+ kind: "integration-failed";
2225
+ contractId: import("../core/facts/types.js").ContractId;
2226
+ reason: "conflict" | "not-based-on-target" | "unrelated-histories";
2227
+ targetHead: import("../core/facts/types.js").SnapshotId;
2228
+ } | {
2229
+ kind: "checkout-not-followable";
2230
+ contractId: import("../core/facts/types.js").ContractId;
2231
+ target: string;
2232
+ path: string;
2233
+ reason: "conflict" | "staged" | "untracked";
2234
+ paths: string[];
2235
+ } | {
2236
+ kind: "gates-unsatisfied";
2237
+ contractId: import("../core/facts/types.js").ContractId;
2238
+ unmet: {
2239
+ gate: import("../core/facts/types.js").Gate;
2240
+ current: {
2241
+ kind: "attested";
2242
+ verdict: "satisfied" | "unsatisfied";
2243
+ at: string;
2244
+ } | {
2245
+ summary: string;
2246
+ kind: "attested";
2247
+ verdict: "satisfied" | "unsatisfied";
2248
+ at: string;
2249
+ } | {
2250
+ kind: "stale";
2251
+ priorVerdict: "satisfied" | "unsatisfied";
2252
+ } | {
2253
+ kind: "missing";
2254
+ };
2255
+ }[];
2256
+ } | {
2257
+ kind: "prerequisites-unsatisfied";
2258
+ contractId: import("../core/facts/types.js").ContractId;
2259
+ unmet: {
2260
+ contractId: import("../core/facts/types.js").ContractId;
2261
+ state: "missing" | "active" | "abandoned";
2262
+ }[];
2263
+ } | {
2264
+ kind: "terminal" | "contract-missing" | "delivery-missing";
2265
+ contractId: import("../core/facts/types.js").ContractId;
2266
+ } | {
2267
+ kind: "integration-unsupported";
2268
+ contractId: import("../core/facts/types.js").ContractId;
2269
+ requiredGit: "2.38";
2270
+ } | {
2271
+ kind: "target-missing";
2272
+ contractId: import("../core/facts/types.js").ContractId;
2273
+ };
2274
+ } | {
2275
+ retry: {
2276
+ kind: "exhausted";
2277
+ } | {
2278
+ kind: "collision";
2279
+ } | {
2280
+ kind: "publication-failed";
2281
+ diagnostic: string;
2282
+ };
2283
+ } | {
2284
+ failure: "target-moved";
2285
+ contractId: import("../core/facts/types.js").ContractId;
2286
+ target: string;
2287
+ expected: import("../core/facts/types.js").SnapshotId;
2288
+ observed: import("../core/facts/types.js").SnapshotId | null;
2289
+ observedTreeEqualsCandidate: boolean;
2290
+ } | {
2291
+ failure: "target-moved";
2292
+ contractId: import("../core/facts/types.js").ContractId;
2293
+ target: string;
2294
+ integratedAt: import("../core/facts/types.js").SnapshotId;
2295
+ observed: import("../core/facts/types.js").SnapshotId | null;
2296
+ attempts: number;
2297
+ observedTreeEqualsCandidate: boolean;
2298
+ } | {
2299
+ failure: "target-placement-failed";
2300
+ diagnostic: string;
2301
+ } | {
2302
+ kind: "already-terminal";
2303
+ };
2304
+ }[];
2305
+ };
2306
+ leak?: {
2307
+ path: string;
2308
+ diagnostic: string;
2309
+ };
2310
+ cleanup?: {
2311
+ phase: "destroy";
2312
+ command: number;
2313
+ detail: {
2314
+ kind: "exit";
2315
+ code: number;
2316
+ stdout: string;
2317
+ stderr: string;
2318
+ truncated: boolean;
2319
+ } | {
2320
+ kind: "timeout";
2321
+ } | {
2322
+ kind: "spawn-error";
2323
+ diagnostic: string;
2324
+ } | {
2325
+ kind: "unknown-exit";
2326
+ };
2327
+ };
2328
+ placement?: {
2329
+ refusal: {
2330
+ kind: "integration-failed";
2331
+ contractId: import("../core/facts/types.js").ContractId;
2332
+ reason: "conflict" | "not-based-on-target" | "unrelated-histories";
2333
+ targetHead: import("../core/facts/types.js").SnapshotId;
2334
+ } | {
2335
+ conflictPaths: string[];
2336
+ kind: "integration-failed";
2337
+ contractId: import("../core/facts/types.js").ContractId;
2338
+ reason: "conflict" | "not-based-on-target" | "unrelated-histories";
2339
+ targetHead: import("../core/facts/types.js").SnapshotId;
2340
+ } | {
2341
+ kind: "checkout-not-followable";
2342
+ contractId: import("../core/facts/types.js").ContractId;
2343
+ target: string;
2344
+ path: string;
2345
+ reason: "conflict" | "staged" | "untracked";
2346
+ paths: string[];
2347
+ } | {
2348
+ kind: "gates-unsatisfied";
2349
+ contractId: import("../core/facts/types.js").ContractId;
2350
+ unmet: {
2351
+ gate: import("../core/facts/types.js").Gate;
2352
+ current: {
2353
+ kind: "attested";
2354
+ verdict: "satisfied" | "unsatisfied";
2355
+ at: string;
2356
+ } | {
2357
+ summary: string;
2358
+ kind: "attested";
2359
+ verdict: "satisfied" | "unsatisfied";
2360
+ at: string;
2361
+ } | {
2362
+ kind: "stale";
2363
+ priorVerdict: "satisfied" | "unsatisfied";
2364
+ } | {
2365
+ kind: "missing";
2366
+ };
2367
+ }[];
2368
+ } | {
2369
+ kind: "prerequisites-unsatisfied";
2370
+ contractId: import("../core/facts/types.js").ContractId;
2371
+ unmet: {
2372
+ contractId: import("../core/facts/types.js").ContractId;
2373
+ state: "missing" | "active" | "abandoned";
2374
+ }[];
2375
+ } | {
2376
+ kind: "terminal" | "contract-missing" | "delivery-missing";
2377
+ contractId: import("../core/facts/types.js").ContractId;
2378
+ } | {
2379
+ kind: "integration-unsupported";
2380
+ contractId: import("../core/facts/types.js").ContractId;
2381
+ requiredGit: "2.38";
2382
+ } | {
2383
+ kind: "target-missing";
2384
+ contractId: import("../core/facts/types.js").ContractId;
2385
+ };
2386
+ } | {
2387
+ retry: {
2388
+ kind: "exhausted";
2389
+ } | {
2390
+ kind: "collision";
2391
+ } | {
2392
+ kind: "publication-failed";
2393
+ diagnostic: string;
2394
+ };
2395
+ } | {
2396
+ failure: "target-moved";
2397
+ contractId: import("../core/facts/types.js").ContractId;
2398
+ target: string;
2399
+ expected: import("../core/facts/types.js").SnapshotId;
2400
+ observed: import("../core/facts/types.js").SnapshotId | null;
2401
+ observedTreeEqualsCandidate: boolean;
2402
+ } | {
2403
+ failure: "target-moved";
2404
+ contractId: import("../core/facts/types.js").ContractId;
2405
+ target: string;
2406
+ integratedAt: import("../core/facts/types.js").SnapshotId;
2407
+ observed: import("../core/facts/types.js").SnapshotId | null;
2408
+ attempts: number;
2409
+ observedTreeEqualsCandidate: boolean;
2410
+ } | {
2411
+ failure: "target-placement-failed";
2412
+ diagnostic: string;
2413
+ };
2414
+ verificationSummary?: string;
2415
+ verificationReuse?: {
2416
+ entry: import("../core/facts/types.js").EntryUlid;
2417
+ verdict: "satisfied" | "unsatisfied";
2418
+ } | {
2419
+ summary: string;
2420
+ entry: import("../core/facts/types.js").EntryUlid;
2421
+ verdict: "satisfied" | "unsatisfied";
2422
+ };
2423
+ verification?: {
2424
+ refusal: {
2425
+ kind: "verification-declaration-invalid";
2426
+ } | {
2427
+ contractId: import("../core/facts/types.js").ContractId;
2428
+ kind: "verification-declaration-invalid";
2429
+ } | {
2430
+ kind: "terminal" | "contract-missing";
2431
+ contractId: import("../core/facts/types.js").ContractId;
2432
+ };
2433
+ } | {
2434
+ retry: {
2435
+ kind: "exhausted";
2436
+ } | {
2437
+ kind: "collision";
2438
+ } | {
2439
+ kind: "publication-failed";
2440
+ diagnostic: string;
2441
+ };
2442
+ } | {
2443
+ failure: "cancelled" | "unknown-exit";
2444
+ } | {
2445
+ failure: "spawn-error" | "candidate-unavailable";
2446
+ diagnostic: string;
2447
+ } | {
2448
+ failure: "environment-failure";
2449
+ diagnostic: string;
2450
+ } | {
2451
+ failure: "environment-failure";
2452
+ command: number;
2453
+ detail: {
2454
+ kind: "exit";
2455
+ code: number;
2456
+ stdout: string;
2457
+ stderr: string;
2458
+ truncated: boolean;
2459
+ } | {
2460
+ kind: "timeout";
2461
+ } | {
2462
+ kind: "spawn-error";
2463
+ diagnostic: string;
2464
+ } | {
2465
+ kind: "unknown-exit";
2466
+ };
2467
+ };
2468
+ completion?: {
2469
+ integration: import("../core/facts/types.js").SnapshotId;
2470
+ } | {
2471
+ verification: {
2472
+ mode: "reused" | "ran";
2473
+ verdict: "satisfied" | "unsatisfied";
2474
+ };
2475
+ integration: import("../core/facts/types.js").SnapshotId;
2476
+ };
2477
+ }, unknown>>;
2478
+ lags: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
2479
+ kind: z.ZodLiteral<"worktree-retained">;
2480
+ path: z.ZodString;
2481
+ }, z.core.$strict>, z.ZodPipe<z.ZodObject<{
2482
+ kind: z.ZodLiteral<"worktree-follow-retained">;
2483
+ path: z.ZodString;
2484
+ tender: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
2485
+ head: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
2486
+ reason: z.ZodEnum<{
2487
+ "head-moved": "head-moved";
2488
+ "head-attached": "head-attached";
2489
+ "operation-in-progress": "operation-in-progress";
2490
+ "unsupported-parent-shape": "unsupported-parent-shape";
2491
+ }>;
2492
+ paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
2493
+ }, z.core.$strict>, z.ZodTransform<{
2494
+ kind: "worktree-follow-retained";
2495
+ path: string;
2496
+ tender: import("../core/facts/types.js").SnapshotId;
2497
+ head: import("../core/facts/types.js").SnapshotId;
2498
+ reason: "head-moved" | "head-attached" | "operation-in-progress" | "unsupported-parent-shape";
2499
+ } | {
2500
+ paths: string[];
2501
+ kind: "worktree-follow-retained";
2502
+ path: string;
2503
+ tender: import("../core/facts/types.js").SnapshotId;
2504
+ head: import("../core/facts/types.js").SnapshotId;
2505
+ reason: "head-moved" | "head-attached" | "operation-in-progress" | "unsupported-parent-shape";
2506
+ }, {
2507
+ kind: "worktree-follow-retained";
2508
+ path: string;
2509
+ tender: import("../core/facts/types.js").SnapshotId;
2510
+ head: import("../core/facts/types.js").SnapshotId;
2511
+ reason: "head-moved" | "head-attached" | "operation-in-progress" | "unsupported-parent-shape";
2512
+ paths?: string[] | undefined;
2513
+ }>>, z.ZodPipe<z.ZodObject<{
2514
+ kind: z.ZodLiteral<"unsealed-bytes">;
2515
+ path: z.ZodString;
2516
+ paths: z.ZodArray<z.ZodString>;
2517
+ head: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>>;
2518
+ }, z.core.$strict>, z.ZodTransform<{
2519
+ kind: "unsealed-bytes";
2520
+ path: string;
2521
+ paths: string[];
2522
+ } | {
2523
+ head: import("../core/facts/types.js").SnapshotId;
2524
+ kind: "unsealed-bytes";
2525
+ path: string;
2526
+ paths: string[];
2527
+ }, {
2528
+ kind: "unsealed-bytes";
2529
+ path: string;
2530
+ paths: string[];
2531
+ head?: import("../core/facts/types.js").SnapshotId | undefined;
2532
+ }>>, z.ZodObject<{
2533
+ kind: z.ZodLiteral<"target-checkout-retained">;
2534
+ path: z.ZodString;
2535
+ target: z.ZodString;
2536
+ diagnostic: z.ZodString;
2537
+ }, z.core.$strict>, z.ZodObject<{
2538
+ kind: z.ZodLiteral<"reconcile-failed">;
2539
+ stage: z.ZodEnum<{
2540
+ observation: "observation";
2541
+ effect: "effect";
2542
+ }>;
2543
+ diagnostic: z.ZodString;
2544
+ }, z.core.$strict>, z.ZodObject<{
2545
+ kind: z.ZodLiteral<"ref-migration-conflict">;
2546
+ legacyRef: z.ZodString;
2547
+ legacyOid: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
2548
+ currentRef: z.ZodString;
2549
+ currentOid: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
2550
+ }, z.core.$strict>, z.ZodObject<{
2551
+ kind: z.ZodLiteral<"worktree-hook-failed">;
2552
+ phase: z.ZodEnum<{
2553
+ destroy: "destroy";
2554
+ create: "create";
2555
+ }>;
2556
+ path: z.ZodString;
2557
+ command: z.ZodNumber;
2558
+ name: z.ZodString;
2559
+ failure: z.ZodUnion<readonly [z.ZodObject<{
2560
+ kind: z.ZodLiteral<"exit">;
2561
+ code: z.ZodNumber;
2562
+ stdout: z.ZodString;
2563
+ stderr: z.ZodString;
2564
+ truncated: z.ZodBoolean;
2565
+ }, z.core.$strict>, z.ZodObject<{
2566
+ kind: z.ZodLiteral<"timeout">;
2567
+ }, z.core.$strict>, z.ZodObject<{
2568
+ kind: z.ZodLiteral<"spawn-error">;
2569
+ diagnostic: z.ZodString;
2570
+ }, z.core.$strict>, z.ZodObject<{
2571
+ kind: z.ZodLiteral<"unknown-exit">;
2572
+ }, z.core.$strict>]>;
2573
+ }, z.core.$strict>, z.ZodObject<{
2574
+ kind: z.ZodLiteral<"contract-file-failed">;
2575
+ worktree: z.ZodString;
2576
+ path: z.ZodString;
2577
+ diagnostic: z.ZodString;
2578
+ }, z.core.$strict>]>>;
2579
+ settlementLags: z.ZodArray<z.ZodPipe<z.ZodObject<{
2580
+ kind: z.ZodLiteral<"settlement-failed">;
2581
+ surface: z.ZodEnum<{
2582
+ task: "task";
2583
+ "namespace-context": "namespace-context";
2584
+ "task-holder": "task-holder";
2585
+ }>;
2586
+ contractId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ContractId, string>>;
2587
+ taskId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`task/${string}`, string>>>;
2588
+ path: z.ZodOptional<z.ZodString>;
2589
+ diagnostic: z.ZodString;
2590
+ }, z.core.$strict>, z.ZodTransform<{
2591
+ path?: string;
2592
+ taskId?: `task/${string}`;
2593
+ kind: "settlement-failed";
2594
+ surface: "task" | "namespace-context" | "task-holder";
2595
+ contractId: import("../core/facts/types.js").ContractId;
2596
+ diagnostic: string;
2597
+ }, {
2598
+ kind: "settlement-failed";
2599
+ surface: "task" | "namespace-context" | "task-holder";
2600
+ contractId: import("../core/facts/types.js").ContractId;
2601
+ diagnostic: string;
2602
+ taskId?: `task/${string}` | undefined;
2603
+ path?: string | undefined;
2604
+ }>>>;
2605
+ recoverySnapshot: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>>;
2606
+ cleanup: z.ZodOptional<z.ZodObject<{
2607
+ phase: z.ZodLiteral<"destroy">;
2608
+ command: z.ZodNumber;
2609
+ detail: z.ZodUnion<readonly [z.ZodObject<{
2610
+ kind: z.ZodLiteral<"exit">;
2611
+ code: z.ZodNumber;
2612
+ stdout: z.ZodString;
2613
+ stderr: z.ZodString;
2614
+ truncated: z.ZodBoolean;
2615
+ }, z.core.$strict>, z.ZodObject<{
2616
+ kind: z.ZodLiteral<"timeout">;
2617
+ }, z.core.$strict>, z.ZodObject<{
2618
+ kind: z.ZodLiteral<"spawn-error">;
2619
+ diagnostic: z.ZodString;
2620
+ }, z.core.$strict>, z.ZodObject<{
2621
+ kind: z.ZodLiteral<"unknown-exit">;
2622
+ }, z.core.$strict>]>;
2623
+ }, z.core.$strict>>;
2624
+ leak: z.ZodOptional<z.ZodObject<{
2625
+ path: z.ZodString;
2626
+ diagnostic: z.ZodString;
2627
+ }, z.core.$strict>>;
2628
+ }, z.core.$strict>, z.ZodTransform<{
2629
+ leak?: {
2630
+ path: string;
2631
+ diagnostic: string;
2632
+ };
2633
+ cleanup?: {
2634
+ phase: "destroy";
2635
+ command: number;
2636
+ detail: {
2637
+ kind: "exit";
2638
+ code: number;
2639
+ stdout: string;
2640
+ stderr: string;
2641
+ truncated: boolean;
2642
+ } | {
2643
+ kind: "timeout";
2644
+ } | {
2645
+ kind: "spawn-error";
2646
+ diagnostic: string;
2647
+ } | {
2648
+ kind: "unknown-exit";
2649
+ };
2650
+ };
2651
+ recoverySnapshot?: import("../core/facts/types.js").SnapshotId;
2652
+ facts: (Readonly<{
2653
+ v: 1;
2654
+ kind: "bound";
2655
+ contract: import("../core/facts/types.js").ContractId;
2656
+ entry: import("../core/facts/types.js").EntryUlid;
2657
+ at: string;
2658
+ actor?: import("../core/facts/types.js").ActorId;
2659
+ data: Readonly<Record<string, never>>;
2660
+ }> | Readonly<{
2661
+ v: 1;
2662
+ kind: "bind";
2663
+ contract: import("../core/facts/types.js").ContractId;
2664
+ entry: import("../core/facts/types.js").EntryUlid;
2665
+ at: string;
2666
+ actor?: import("../core/facts/types.js").ActorId;
2667
+ data: Readonly<{
2668
+ coordinates: import("../core/facts/types.js").ContractCoordinates;
2669
+ terms: import("../core/facts/types.js").ContractTerms;
2670
+ }>;
2671
+ }> | Readonly<{
2672
+ v: 1;
2673
+ kind: "amend";
2674
+ contract: import("../core/facts/types.js").ContractId;
2675
+ entry: import("../core/facts/types.js").EntryUlid;
2676
+ at: string;
2677
+ actor?: import("../core/facts/types.js").ActorId;
2678
+ data: Readonly<{
2679
+ document: Readonly<{
2680
+ bytes: string;
2681
+ key: import("../core/facts/types.js").DocumentKey;
2682
+ }>;
2683
+ segments: readonly import("../core/facts/types.js").DocumentSegmentKey[];
2684
+ gates: readonly import("../core/facts/types.js").Gate[];
2685
+ after: readonly import("../core/facts/types.js").ContractId[];
2686
+ }>;
2687
+ }> | Readonly<{
2688
+ v: 1;
2689
+ kind: "deliver";
2690
+ contract: import("../core/facts/types.js").ContractId;
2691
+ entry: import("../core/facts/types.js").EntryUlid;
2692
+ at: string;
2693
+ actor?: import("../core/facts/types.js").ActorId;
2694
+ data: Readonly<{
2695
+ tenderSnapshot: import("../core/facts/types.js").SnapshotId;
2696
+ integration: Readonly<{
2697
+ predecessor: import("../core/facts/types.js").SnapshotId;
2698
+ snapshot: import("../core/facts/types.js").SnapshotId;
2699
+ changeId: import("../core/facts/types.js").ChangeId;
2700
+ }>;
2701
+ method: "squash";
2702
+ policy: Readonly<{
2703
+ requireBranchesToBeUpToDate: boolean;
2704
+ }>;
2705
+ }>;
2706
+ }> | Readonly<{
2707
+ v: 1;
2708
+ kind: "reintegrated";
2709
+ contract: import("../core/facts/types.js").ContractId;
2710
+ entry: import("../core/facts/types.js").EntryUlid;
2711
+ at: string;
2712
+ actor?: import("../core/facts/types.js").ActorId;
2713
+ data: Readonly<{
2714
+ predecessor: import("../core/facts/types.js").SnapshotId;
2715
+ snapshot: import("../core/facts/types.js").SnapshotId;
2716
+ }>;
2717
+ }> | Readonly<{
2718
+ v: 1;
2719
+ kind: "attestation";
2720
+ contract: import("../core/facts/types.js").ContractId;
2721
+ entry: import("../core/facts/types.js").EntryUlid;
2722
+ at: string;
2723
+ actor?: import("../core/facts/types.js").ActorId;
2724
+ data: Readonly<{
2725
+ gate: import("../core/facts/types.js").Gate;
2726
+ subject: import("../core/facts/types.js").DependencyKeySet;
2727
+ verdict: "satisfied" | "unsatisfied";
2728
+ summary?: string;
2729
+ }>;
2730
+ }> | Readonly<{
2731
+ v: 1;
2732
+ kind: "claimed";
2733
+ contract: import("../core/facts/types.js").ContractId;
2734
+ entry: import("../core/facts/types.js").EntryUlid;
2735
+ at: string;
2736
+ actor?: import("../core/facts/types.js").ActorId;
2737
+ data: Readonly<{
2738
+ delivery: import("../core/facts/types.js").EntryUlid;
2739
+ }>;
2740
+ }> | Readonly<{
2741
+ v: 1;
2742
+ kind: "arc";
2743
+ contract: import("../core/facts/types.js").ContractId;
2744
+ entry: import("../core/facts/types.js").EntryUlid;
2745
+ at: string;
2746
+ actor?: import("../core/facts/types.js").ActorId;
2747
+ data: Readonly<{
2748
+ seq: number;
2749
+ title: string;
2750
+ objective: string;
2751
+ brief: string;
2752
+ }>;
2753
+ }> | Readonly<{
2754
+ v: 1;
2755
+ kind: "abandoned";
2756
+ contract: import("../core/facts/types.js").ContractId;
2757
+ entry: import("../core/facts/types.js").EntryUlid;
2758
+ at: string;
2759
+ actor?: import("../core/facts/types.js").ActorId;
2760
+ data: Readonly<{
2761
+ note?: string;
2762
+ }>;
2763
+ }>)[];
2764
+ head: import("../core/facts/types.js").ContractHead;
2765
+ value: {
2766
+ workspace?: {
2767
+ staged: string[];
2768
+ unstaged: string[];
2769
+ untracked: string[];
2770
+ shortStat: {
2771
+ filesChanged: number;
2772
+ insertions: number;
2773
+ deletions: number;
2774
+ };
2775
+ };
2776
+ continuation?: {
2777
+ claimed: import("../core/facts/types.js").ContractId[];
2778
+ stopped: {
2779
+ contractId: import("../core/facts/types.js").ContractId;
2780
+ stop: {
2781
+ refusal: {
2782
+ kind: "integration-failed";
2783
+ contractId: import("../core/facts/types.js").ContractId;
2784
+ reason: "conflict" | "not-based-on-target" | "unrelated-histories";
2785
+ targetHead: import("../core/facts/types.js").SnapshotId;
2786
+ } | {
2787
+ conflictPaths: string[];
2788
+ kind: "integration-failed";
2789
+ contractId: import("../core/facts/types.js").ContractId;
2790
+ reason: "conflict" | "not-based-on-target" | "unrelated-histories";
2791
+ targetHead: import("../core/facts/types.js").SnapshotId;
2792
+ } | {
2793
+ kind: "checkout-not-followable";
2794
+ contractId: import("../core/facts/types.js").ContractId;
2795
+ target: string;
2796
+ path: string;
2797
+ reason: "conflict" | "staged" | "untracked";
2798
+ paths: string[];
2799
+ } | {
2800
+ kind: "gates-unsatisfied";
2801
+ contractId: import("../core/facts/types.js").ContractId;
2802
+ unmet: {
2803
+ gate: import("../core/facts/types.js").Gate;
2804
+ current: {
2805
+ kind: "attested";
2806
+ verdict: "satisfied" | "unsatisfied";
2807
+ at: string;
2808
+ } | {
2809
+ summary: string;
2810
+ kind: "attested";
2811
+ verdict: "satisfied" | "unsatisfied";
2812
+ at: string;
2813
+ } | {
2814
+ kind: "stale";
2815
+ priorVerdict: "satisfied" | "unsatisfied";
2816
+ } | {
2817
+ kind: "missing";
2818
+ };
2819
+ }[];
2820
+ } | {
2821
+ kind: "prerequisites-unsatisfied";
2822
+ contractId: import("../core/facts/types.js").ContractId;
2823
+ unmet: {
2824
+ contractId: import("../core/facts/types.js").ContractId;
2825
+ state: "missing" | "active" | "abandoned";
2826
+ }[];
2827
+ } | {
2828
+ kind: "terminal" | "contract-missing" | "delivery-missing";
2829
+ contractId: import("../core/facts/types.js").ContractId;
2830
+ } | {
2831
+ kind: "integration-unsupported";
2832
+ contractId: import("../core/facts/types.js").ContractId;
2833
+ requiredGit: "2.38";
2834
+ } | {
2835
+ kind: "target-missing";
2836
+ contractId: import("../core/facts/types.js").ContractId;
2837
+ };
2838
+ } | {
2839
+ retry: {
2840
+ kind: "exhausted";
2841
+ } | {
2842
+ kind: "collision";
2843
+ } | {
2844
+ kind: "publication-failed";
2845
+ diagnostic: string;
2846
+ };
2847
+ } | {
2848
+ failure: "target-moved";
2849
+ contractId: import("../core/facts/types.js").ContractId;
2850
+ target: string;
2851
+ expected: import("../core/facts/types.js").SnapshotId;
2852
+ observed: import("../core/facts/types.js").SnapshotId | null;
2853
+ observedTreeEqualsCandidate: boolean;
2854
+ } | {
2855
+ failure: "target-moved";
2856
+ contractId: import("../core/facts/types.js").ContractId;
2857
+ target: string;
2858
+ integratedAt: import("../core/facts/types.js").SnapshotId;
2859
+ observed: import("../core/facts/types.js").SnapshotId | null;
2860
+ attempts: number;
2861
+ observedTreeEqualsCandidate: boolean;
2862
+ } | {
2863
+ failure: "target-placement-failed";
2864
+ diagnostic: string;
2865
+ } | {
2866
+ kind: "already-terminal";
2867
+ };
2868
+ }[];
2869
+ };
2870
+ leak?: {
2871
+ path: string;
2872
+ diagnostic: string;
2873
+ };
2874
+ cleanup?: {
2875
+ phase: "destroy";
2876
+ command: number;
2877
+ detail: {
2878
+ kind: "exit";
2879
+ code: number;
2880
+ stdout: string;
2881
+ stderr: string;
2882
+ truncated: boolean;
2883
+ } | {
2884
+ kind: "timeout";
2885
+ } | {
2886
+ kind: "spawn-error";
2887
+ diagnostic: string;
2888
+ } | {
2889
+ kind: "unknown-exit";
2890
+ };
2891
+ };
2892
+ placement?: {
2893
+ refusal: {
2894
+ kind: "integration-failed";
2895
+ contractId: import("../core/facts/types.js").ContractId;
2896
+ reason: "conflict" | "not-based-on-target" | "unrelated-histories";
2897
+ targetHead: import("../core/facts/types.js").SnapshotId;
2898
+ } | {
2899
+ conflictPaths: string[];
2900
+ kind: "integration-failed";
2901
+ contractId: import("../core/facts/types.js").ContractId;
2902
+ reason: "conflict" | "not-based-on-target" | "unrelated-histories";
2903
+ targetHead: import("../core/facts/types.js").SnapshotId;
2904
+ } | {
2905
+ kind: "checkout-not-followable";
2906
+ contractId: import("../core/facts/types.js").ContractId;
2907
+ target: string;
2908
+ path: string;
2909
+ reason: "conflict" | "staged" | "untracked";
2910
+ paths: string[];
2911
+ } | {
2912
+ kind: "gates-unsatisfied";
2913
+ contractId: import("../core/facts/types.js").ContractId;
2914
+ unmet: {
2915
+ gate: import("../core/facts/types.js").Gate;
2916
+ current: {
2917
+ kind: "attested";
2918
+ verdict: "satisfied" | "unsatisfied";
2919
+ at: string;
2920
+ } | {
2921
+ summary: string;
2922
+ kind: "attested";
2923
+ verdict: "satisfied" | "unsatisfied";
2924
+ at: string;
2925
+ } | {
2926
+ kind: "stale";
2927
+ priorVerdict: "satisfied" | "unsatisfied";
2928
+ } | {
2929
+ kind: "missing";
2930
+ };
2931
+ }[];
2932
+ } | {
2933
+ kind: "prerequisites-unsatisfied";
2934
+ contractId: import("../core/facts/types.js").ContractId;
2935
+ unmet: {
2936
+ contractId: import("../core/facts/types.js").ContractId;
2937
+ state: "missing" | "active" | "abandoned";
2938
+ }[];
2939
+ } | {
2940
+ kind: "terminal" | "contract-missing" | "delivery-missing";
2941
+ contractId: import("../core/facts/types.js").ContractId;
2942
+ } | {
2943
+ kind: "integration-unsupported";
2944
+ contractId: import("../core/facts/types.js").ContractId;
2945
+ requiredGit: "2.38";
2946
+ } | {
2947
+ kind: "target-missing";
2948
+ contractId: import("../core/facts/types.js").ContractId;
2949
+ };
2950
+ } | {
2951
+ retry: {
2952
+ kind: "exhausted";
2953
+ } | {
2954
+ kind: "collision";
2955
+ } | {
2956
+ kind: "publication-failed";
2957
+ diagnostic: string;
2958
+ };
2959
+ } | {
2960
+ failure: "target-moved";
2961
+ contractId: import("../core/facts/types.js").ContractId;
2962
+ target: string;
2963
+ expected: import("../core/facts/types.js").SnapshotId;
2964
+ observed: import("../core/facts/types.js").SnapshotId | null;
2965
+ observedTreeEqualsCandidate: boolean;
2966
+ } | {
2967
+ failure: "target-moved";
2968
+ contractId: import("../core/facts/types.js").ContractId;
2969
+ target: string;
2970
+ integratedAt: import("../core/facts/types.js").SnapshotId;
2971
+ observed: import("../core/facts/types.js").SnapshotId | null;
2972
+ attempts: number;
2973
+ observedTreeEqualsCandidate: boolean;
2974
+ } | {
2975
+ failure: "target-placement-failed";
2976
+ diagnostic: string;
2977
+ };
2978
+ verificationSummary?: string;
2979
+ verificationReuse?: {
2980
+ entry: import("../core/facts/types.js").EntryUlid;
2981
+ verdict: "satisfied" | "unsatisfied";
2982
+ } | {
2983
+ summary: string;
2984
+ entry: import("../core/facts/types.js").EntryUlid;
2985
+ verdict: "satisfied" | "unsatisfied";
2986
+ };
2987
+ verification?: {
2988
+ refusal: {
2989
+ kind: "verification-declaration-invalid";
2990
+ } | {
2991
+ contractId: import("../core/facts/types.js").ContractId;
2992
+ kind: "verification-declaration-invalid";
2993
+ } | {
2994
+ kind: "terminal" | "contract-missing";
2995
+ contractId: import("../core/facts/types.js").ContractId;
2996
+ };
2997
+ } | {
2998
+ retry: {
2999
+ kind: "exhausted";
3000
+ } | {
3001
+ kind: "collision";
3002
+ } | {
3003
+ kind: "publication-failed";
3004
+ diagnostic: string;
3005
+ };
3006
+ } | {
3007
+ failure: "cancelled" | "unknown-exit";
3008
+ } | {
3009
+ failure: "spawn-error" | "candidate-unavailable";
3010
+ diagnostic: string;
3011
+ } | {
3012
+ failure: "environment-failure";
3013
+ diagnostic: string;
3014
+ } | {
3015
+ failure: "environment-failure";
3016
+ command: number;
3017
+ detail: {
3018
+ kind: "exit";
3019
+ code: number;
3020
+ stdout: string;
3021
+ stderr: string;
3022
+ truncated: boolean;
3023
+ } | {
3024
+ kind: "timeout";
3025
+ } | {
3026
+ kind: "spawn-error";
3027
+ diagnostic: string;
3028
+ } | {
3029
+ kind: "unknown-exit";
3030
+ };
3031
+ };
3032
+ completion?: {
3033
+ integration: import("../core/facts/types.js").SnapshotId;
3034
+ } | {
3035
+ verification: {
3036
+ mode: "reused" | "ran";
3037
+ verdict: "satisfied" | "unsatisfied";
3038
+ };
3039
+ integration: import("../core/facts/types.js").SnapshotId;
3040
+ };
3041
+ };
3042
+ lags: ({
3043
+ kind: "worktree-follow-retained";
3044
+ path: string;
3045
+ tender: import("../core/facts/types.js").SnapshotId;
3046
+ head: import("../core/facts/types.js").SnapshotId;
3047
+ reason: "head-moved" | "head-attached" | "operation-in-progress" | "unsupported-parent-shape";
3048
+ } | {
3049
+ paths: string[];
3050
+ kind: "worktree-follow-retained";
3051
+ path: string;
3052
+ tender: import("../core/facts/types.js").SnapshotId;
3053
+ head: import("../core/facts/types.js").SnapshotId;
3054
+ reason: "head-moved" | "head-attached" | "operation-in-progress" | "unsupported-parent-shape";
3055
+ } | {
3056
+ kind: "unsealed-bytes";
3057
+ path: string;
3058
+ paths: string[];
3059
+ } | {
3060
+ head: import("../core/facts/types.js").SnapshotId;
3061
+ kind: "unsealed-bytes";
3062
+ path: string;
3063
+ paths: string[];
3064
+ } | {
3065
+ kind: "worktree-retained";
3066
+ path: string;
3067
+ } | {
3068
+ kind: "target-checkout-retained";
3069
+ path: string;
3070
+ target: string;
3071
+ diagnostic: string;
3072
+ } | {
3073
+ kind: "reconcile-failed";
3074
+ stage: "observation" | "effect";
3075
+ diagnostic: string;
3076
+ } | {
3077
+ kind: "ref-migration-conflict";
3078
+ legacyRef: string;
3079
+ legacyOid: import("../core/facts/types.js").SnapshotId;
3080
+ currentRef: string;
3081
+ currentOid: import("../core/facts/types.js").SnapshotId;
3082
+ } | {
3083
+ kind: "worktree-hook-failed";
3084
+ phase: "destroy" | "create";
3085
+ path: string;
3086
+ command: number;
3087
+ name: string;
3088
+ failure: {
3089
+ kind: "exit";
3090
+ code: number;
3091
+ stdout: string;
3092
+ stderr: string;
3093
+ truncated: boolean;
3094
+ } | {
3095
+ kind: "timeout";
3096
+ } | {
3097
+ kind: "spawn-error";
3098
+ diagnostic: string;
3099
+ } | {
3100
+ kind: "unknown-exit";
3101
+ };
3102
+ } | {
3103
+ kind: "contract-file-failed";
3104
+ worktree: string;
3105
+ path: string;
3106
+ diagnostic: string;
3107
+ })[];
3108
+ settlementLags: {
3109
+ path?: string;
3110
+ taskId?: `task/${string}`;
3111
+ kind: "settlement-failed";
3112
+ surface: "task" | "namespace-context" | "task-holder";
3113
+ contractId: import("../core/facts/types.js").ContractId;
3114
+ diagnostic: string;
3115
+ }[];
3116
+ }, {
3117
+ facts: (Readonly<{
3118
+ v: 1;
3119
+ kind: "bound";
3120
+ contract: import("../core/facts/types.js").ContractId;
3121
+ entry: import("../core/facts/types.js").EntryUlid;
3122
+ at: string;
3123
+ actor?: import("../core/facts/types.js").ActorId;
3124
+ data: Readonly<Record<string, never>>;
3125
+ }> | Readonly<{
3126
+ v: 1;
3127
+ kind: "bind";
3128
+ contract: import("../core/facts/types.js").ContractId;
3129
+ entry: import("../core/facts/types.js").EntryUlid;
3130
+ at: string;
3131
+ actor?: import("../core/facts/types.js").ActorId;
3132
+ data: Readonly<{
3133
+ coordinates: import("../core/facts/types.js").ContractCoordinates;
3134
+ terms: import("../core/facts/types.js").ContractTerms;
3135
+ }>;
3136
+ }> | Readonly<{
3137
+ v: 1;
3138
+ kind: "amend";
3139
+ contract: import("../core/facts/types.js").ContractId;
3140
+ entry: import("../core/facts/types.js").EntryUlid;
3141
+ at: string;
3142
+ actor?: import("../core/facts/types.js").ActorId;
3143
+ data: Readonly<{
3144
+ document: Readonly<{
3145
+ bytes: string;
3146
+ key: import("../core/facts/types.js").DocumentKey;
3147
+ }>;
3148
+ segments: readonly import("../core/facts/types.js").DocumentSegmentKey[];
3149
+ gates: readonly import("../core/facts/types.js").Gate[];
3150
+ after: readonly import("../core/facts/types.js").ContractId[];
3151
+ }>;
3152
+ }> | Readonly<{
3153
+ v: 1;
3154
+ kind: "deliver";
3155
+ contract: import("../core/facts/types.js").ContractId;
3156
+ entry: import("../core/facts/types.js").EntryUlid;
3157
+ at: string;
3158
+ actor?: import("../core/facts/types.js").ActorId;
3159
+ data: Readonly<{
3160
+ tenderSnapshot: import("../core/facts/types.js").SnapshotId;
3161
+ integration: Readonly<{
3162
+ predecessor: import("../core/facts/types.js").SnapshotId;
3163
+ snapshot: import("../core/facts/types.js").SnapshotId;
3164
+ changeId: import("../core/facts/types.js").ChangeId;
3165
+ }>;
3166
+ method: "squash";
3167
+ policy: Readonly<{
3168
+ requireBranchesToBeUpToDate: boolean;
3169
+ }>;
3170
+ }>;
3171
+ }> | Readonly<{
3172
+ v: 1;
3173
+ kind: "reintegrated";
3174
+ contract: import("../core/facts/types.js").ContractId;
3175
+ entry: import("../core/facts/types.js").EntryUlid;
3176
+ at: string;
3177
+ actor?: import("../core/facts/types.js").ActorId;
3178
+ data: Readonly<{
3179
+ predecessor: import("../core/facts/types.js").SnapshotId;
3180
+ snapshot: import("../core/facts/types.js").SnapshotId;
3181
+ }>;
3182
+ }> | Readonly<{
3183
+ v: 1;
3184
+ kind: "attestation";
3185
+ contract: import("../core/facts/types.js").ContractId;
3186
+ entry: import("../core/facts/types.js").EntryUlid;
3187
+ at: string;
3188
+ actor?: import("../core/facts/types.js").ActorId;
3189
+ data: Readonly<{
3190
+ gate: import("../core/facts/types.js").Gate;
3191
+ subject: import("../core/facts/types.js").DependencyKeySet;
3192
+ verdict: "satisfied" | "unsatisfied";
3193
+ summary?: string;
3194
+ }>;
3195
+ }> | Readonly<{
3196
+ v: 1;
3197
+ kind: "claimed";
3198
+ contract: import("../core/facts/types.js").ContractId;
3199
+ entry: import("../core/facts/types.js").EntryUlid;
3200
+ at: string;
3201
+ actor?: import("../core/facts/types.js").ActorId;
3202
+ data: Readonly<{
3203
+ delivery: import("../core/facts/types.js").EntryUlid;
3204
+ }>;
3205
+ }> | Readonly<{
3206
+ v: 1;
3207
+ kind: "arc";
3208
+ contract: import("../core/facts/types.js").ContractId;
3209
+ entry: import("../core/facts/types.js").EntryUlid;
3210
+ at: string;
3211
+ actor?: import("../core/facts/types.js").ActorId;
3212
+ data: Readonly<{
3213
+ seq: number;
3214
+ title: string;
3215
+ objective: string;
3216
+ brief: string;
3217
+ }>;
3218
+ }> | Readonly<{
3219
+ v: 1;
3220
+ kind: "abandoned";
3221
+ contract: import("../core/facts/types.js").ContractId;
3222
+ entry: import("../core/facts/types.js").EntryUlid;
3223
+ at: string;
3224
+ actor?: import("../core/facts/types.js").ActorId;
3225
+ data: Readonly<{
3226
+ note?: string;
3227
+ }>;
3228
+ }>)[];
3229
+ head: import("../core/facts/types.js").ContractHead;
3230
+ value: {
3231
+ workspace?: {
3232
+ staged: string[];
3233
+ unstaged: string[];
3234
+ untracked: string[];
3235
+ shortStat: {
3236
+ filesChanged: number;
3237
+ insertions: number;
3238
+ deletions: number;
3239
+ };
3240
+ };
3241
+ continuation?: {
3242
+ claimed: import("../core/facts/types.js").ContractId[];
3243
+ stopped: {
3244
+ contractId: import("../core/facts/types.js").ContractId;
3245
+ stop: {
3246
+ refusal: {
3247
+ kind: "integration-failed";
3248
+ contractId: import("../core/facts/types.js").ContractId;
3249
+ reason: "conflict" | "not-based-on-target" | "unrelated-histories";
3250
+ targetHead: import("../core/facts/types.js").SnapshotId;
3251
+ } | {
3252
+ conflictPaths: string[];
3253
+ kind: "integration-failed";
3254
+ contractId: import("../core/facts/types.js").ContractId;
3255
+ reason: "conflict" | "not-based-on-target" | "unrelated-histories";
3256
+ targetHead: import("../core/facts/types.js").SnapshotId;
3257
+ } | {
3258
+ kind: "checkout-not-followable";
3259
+ contractId: import("../core/facts/types.js").ContractId;
3260
+ target: string;
3261
+ path: string;
3262
+ reason: "conflict" | "staged" | "untracked";
3263
+ paths: string[];
3264
+ } | {
3265
+ kind: "gates-unsatisfied";
3266
+ contractId: import("../core/facts/types.js").ContractId;
3267
+ unmet: {
3268
+ gate: import("../core/facts/types.js").Gate;
3269
+ current: {
3270
+ kind: "attested";
3271
+ verdict: "satisfied" | "unsatisfied";
3272
+ at: string;
3273
+ } | {
3274
+ summary: string;
3275
+ kind: "attested";
3276
+ verdict: "satisfied" | "unsatisfied";
3277
+ at: string;
3278
+ } | {
3279
+ kind: "stale";
3280
+ priorVerdict: "satisfied" | "unsatisfied";
3281
+ } | {
3282
+ kind: "missing";
3283
+ };
3284
+ }[];
3285
+ } | {
3286
+ kind: "prerequisites-unsatisfied";
3287
+ contractId: import("../core/facts/types.js").ContractId;
3288
+ unmet: {
3289
+ contractId: import("../core/facts/types.js").ContractId;
3290
+ state: "missing" | "active" | "abandoned";
3291
+ }[];
3292
+ } | {
3293
+ kind: "terminal" | "contract-missing" | "delivery-missing";
3294
+ contractId: import("../core/facts/types.js").ContractId;
3295
+ } | {
3296
+ kind: "integration-unsupported";
3297
+ contractId: import("../core/facts/types.js").ContractId;
3298
+ requiredGit: "2.38";
3299
+ } | {
3300
+ kind: "target-missing";
3301
+ contractId: import("../core/facts/types.js").ContractId;
3302
+ };
3303
+ } | {
3304
+ retry: {
3305
+ kind: "exhausted";
3306
+ } | {
3307
+ kind: "collision";
3308
+ } | {
3309
+ kind: "publication-failed";
3310
+ diagnostic: string;
3311
+ };
3312
+ } | {
3313
+ failure: "target-moved";
3314
+ contractId: import("../core/facts/types.js").ContractId;
3315
+ target: string;
3316
+ expected: import("../core/facts/types.js").SnapshotId;
3317
+ observed: import("../core/facts/types.js").SnapshotId | null;
3318
+ observedTreeEqualsCandidate: boolean;
3319
+ } | {
3320
+ failure: "target-moved";
3321
+ contractId: import("../core/facts/types.js").ContractId;
3322
+ target: string;
3323
+ integratedAt: import("../core/facts/types.js").SnapshotId;
3324
+ observed: import("../core/facts/types.js").SnapshotId | null;
3325
+ attempts: number;
3326
+ observedTreeEqualsCandidate: boolean;
3327
+ } | {
3328
+ failure: "target-placement-failed";
3329
+ diagnostic: string;
3330
+ } | {
3331
+ kind: "already-terminal";
3332
+ };
3333
+ }[];
3334
+ };
3335
+ leak?: {
3336
+ path: string;
3337
+ diagnostic: string;
3338
+ };
3339
+ cleanup?: {
3340
+ phase: "destroy";
3341
+ command: number;
3342
+ detail: {
3343
+ kind: "exit";
3344
+ code: number;
3345
+ stdout: string;
3346
+ stderr: string;
3347
+ truncated: boolean;
3348
+ } | {
3349
+ kind: "timeout";
3350
+ } | {
3351
+ kind: "spawn-error";
3352
+ diagnostic: string;
3353
+ } | {
3354
+ kind: "unknown-exit";
3355
+ };
3356
+ };
3357
+ placement?: {
3358
+ refusal: {
3359
+ kind: "integration-failed";
3360
+ contractId: import("../core/facts/types.js").ContractId;
3361
+ reason: "conflict" | "not-based-on-target" | "unrelated-histories";
3362
+ targetHead: import("../core/facts/types.js").SnapshotId;
3363
+ } | {
3364
+ conflictPaths: string[];
3365
+ kind: "integration-failed";
3366
+ contractId: import("../core/facts/types.js").ContractId;
3367
+ reason: "conflict" | "not-based-on-target" | "unrelated-histories";
3368
+ targetHead: import("../core/facts/types.js").SnapshotId;
3369
+ } | {
3370
+ kind: "checkout-not-followable";
3371
+ contractId: import("../core/facts/types.js").ContractId;
3372
+ target: string;
3373
+ path: string;
3374
+ reason: "conflict" | "staged" | "untracked";
3375
+ paths: string[];
3376
+ } | {
3377
+ kind: "gates-unsatisfied";
3378
+ contractId: import("../core/facts/types.js").ContractId;
3379
+ unmet: {
3380
+ gate: import("../core/facts/types.js").Gate;
3381
+ current: {
3382
+ kind: "attested";
3383
+ verdict: "satisfied" | "unsatisfied";
3384
+ at: string;
3385
+ } | {
3386
+ summary: string;
3387
+ kind: "attested";
3388
+ verdict: "satisfied" | "unsatisfied";
3389
+ at: string;
3390
+ } | {
3391
+ kind: "stale";
3392
+ priorVerdict: "satisfied" | "unsatisfied";
3393
+ } | {
3394
+ kind: "missing";
3395
+ };
3396
+ }[];
3397
+ } | {
3398
+ kind: "prerequisites-unsatisfied";
3399
+ contractId: import("../core/facts/types.js").ContractId;
3400
+ unmet: {
3401
+ contractId: import("../core/facts/types.js").ContractId;
3402
+ state: "missing" | "active" | "abandoned";
3403
+ }[];
3404
+ } | {
3405
+ kind: "terminal" | "contract-missing" | "delivery-missing";
3406
+ contractId: import("../core/facts/types.js").ContractId;
3407
+ } | {
3408
+ kind: "integration-unsupported";
3409
+ contractId: import("../core/facts/types.js").ContractId;
3410
+ requiredGit: "2.38";
3411
+ } | {
3412
+ kind: "target-missing";
3413
+ contractId: import("../core/facts/types.js").ContractId;
3414
+ };
3415
+ } | {
3416
+ retry: {
3417
+ kind: "exhausted";
3418
+ } | {
3419
+ kind: "collision";
3420
+ } | {
3421
+ kind: "publication-failed";
3422
+ diagnostic: string;
3423
+ };
3424
+ } | {
3425
+ failure: "target-moved";
3426
+ contractId: import("../core/facts/types.js").ContractId;
3427
+ target: string;
3428
+ expected: import("../core/facts/types.js").SnapshotId;
3429
+ observed: import("../core/facts/types.js").SnapshotId | null;
3430
+ observedTreeEqualsCandidate: boolean;
3431
+ } | {
3432
+ failure: "target-moved";
3433
+ contractId: import("../core/facts/types.js").ContractId;
3434
+ target: string;
3435
+ integratedAt: import("../core/facts/types.js").SnapshotId;
3436
+ observed: import("../core/facts/types.js").SnapshotId | null;
3437
+ attempts: number;
3438
+ observedTreeEqualsCandidate: boolean;
3439
+ } | {
3440
+ failure: "target-placement-failed";
3441
+ diagnostic: string;
3442
+ };
3443
+ verificationSummary?: string;
3444
+ verificationReuse?: {
3445
+ entry: import("../core/facts/types.js").EntryUlid;
3446
+ verdict: "satisfied" | "unsatisfied";
3447
+ } | {
3448
+ summary: string;
3449
+ entry: import("../core/facts/types.js").EntryUlid;
3450
+ verdict: "satisfied" | "unsatisfied";
3451
+ };
3452
+ verification?: {
3453
+ refusal: {
3454
+ kind: "verification-declaration-invalid";
3455
+ } | {
3456
+ contractId: import("../core/facts/types.js").ContractId;
3457
+ kind: "verification-declaration-invalid";
3458
+ } | {
3459
+ kind: "terminal" | "contract-missing";
3460
+ contractId: import("../core/facts/types.js").ContractId;
3461
+ };
3462
+ } | {
3463
+ retry: {
3464
+ kind: "exhausted";
3465
+ } | {
3466
+ kind: "collision";
3467
+ } | {
3468
+ kind: "publication-failed";
3469
+ diagnostic: string;
3470
+ };
3471
+ } | {
3472
+ failure: "cancelled" | "unknown-exit";
3473
+ } | {
3474
+ failure: "spawn-error" | "candidate-unavailable";
3475
+ diagnostic: string;
3476
+ } | {
3477
+ failure: "environment-failure";
3478
+ diagnostic: string;
3479
+ } | {
3480
+ failure: "environment-failure";
3481
+ command: number;
3482
+ detail: {
3483
+ kind: "exit";
3484
+ code: number;
3485
+ stdout: string;
3486
+ stderr: string;
3487
+ truncated: boolean;
3488
+ } | {
3489
+ kind: "timeout";
3490
+ } | {
3491
+ kind: "spawn-error";
3492
+ diagnostic: string;
3493
+ } | {
3494
+ kind: "unknown-exit";
3495
+ };
3496
+ };
3497
+ completion?: {
3498
+ integration: import("../core/facts/types.js").SnapshotId;
3499
+ } | {
3500
+ verification: {
3501
+ mode: "reused" | "ran";
3502
+ verdict: "satisfied" | "unsatisfied";
3503
+ };
3504
+ integration: import("../core/facts/types.js").SnapshotId;
3505
+ };
3506
+ };
3507
+ lags: ({
3508
+ kind: "worktree-follow-retained";
3509
+ path: string;
3510
+ tender: import("../core/facts/types.js").SnapshotId;
3511
+ head: import("../core/facts/types.js").SnapshotId;
3512
+ reason: "head-moved" | "head-attached" | "operation-in-progress" | "unsupported-parent-shape";
3513
+ } | {
3514
+ paths: string[];
3515
+ kind: "worktree-follow-retained";
3516
+ path: string;
3517
+ tender: import("../core/facts/types.js").SnapshotId;
3518
+ head: import("../core/facts/types.js").SnapshotId;
3519
+ reason: "head-moved" | "head-attached" | "operation-in-progress" | "unsupported-parent-shape";
3520
+ } | {
3521
+ kind: "unsealed-bytes";
3522
+ path: string;
3523
+ paths: string[];
3524
+ } | {
3525
+ head: import("../core/facts/types.js").SnapshotId;
3526
+ kind: "unsealed-bytes";
3527
+ path: string;
3528
+ paths: string[];
3529
+ } | {
3530
+ kind: "worktree-retained";
3531
+ path: string;
3532
+ } | {
3533
+ kind: "target-checkout-retained";
3534
+ path: string;
3535
+ target: string;
3536
+ diagnostic: string;
3537
+ } | {
3538
+ kind: "reconcile-failed";
3539
+ stage: "observation" | "effect";
3540
+ diagnostic: string;
3541
+ } | {
3542
+ kind: "ref-migration-conflict";
3543
+ legacyRef: string;
3544
+ legacyOid: import("../core/facts/types.js").SnapshotId;
3545
+ currentRef: string;
3546
+ currentOid: import("../core/facts/types.js").SnapshotId;
3547
+ } | {
3548
+ kind: "worktree-hook-failed";
3549
+ phase: "destroy" | "create";
3550
+ path: string;
3551
+ command: number;
3552
+ name: string;
3553
+ failure: {
3554
+ kind: "exit";
3555
+ code: number;
3556
+ stdout: string;
3557
+ stderr: string;
3558
+ truncated: boolean;
3559
+ } | {
3560
+ kind: "timeout";
3561
+ } | {
3562
+ kind: "spawn-error";
3563
+ diagnostic: string;
3564
+ } | {
3565
+ kind: "unknown-exit";
3566
+ };
3567
+ } | {
3568
+ kind: "contract-file-failed";
3569
+ worktree: string;
3570
+ path: string;
3571
+ diagnostic: string;
3572
+ })[];
3573
+ settlementLags: {
3574
+ path?: string;
3575
+ taskId?: `task/${string}`;
3576
+ kind: "settlement-failed";
3577
+ surface: "task" | "namespace-context" | "task-holder";
3578
+ contractId: import("../core/facts/types.js").ContractId;
3579
+ diagnostic: string;
3580
+ }[];
3581
+ recoverySnapshot?: import("../core/facts/types.js").SnapshotId | undefined;
3582
+ cleanup?: {
3583
+ phase: "destroy";
3584
+ command: number;
3585
+ detail: {
3586
+ kind: "exit";
3587
+ code: number;
3588
+ stdout: string;
3589
+ stderr: string;
3590
+ truncated: boolean;
3591
+ } | {
3592
+ kind: "timeout";
3593
+ } | {
3594
+ kind: "spawn-error";
3595
+ diagnostic: string;
3596
+ } | {
3597
+ kind: "unknown-exit";
3598
+ };
3599
+ } | undefined;
3600
+ leak?: {
3601
+ path: string;
3602
+ diagnostic: string;
3603
+ } | undefined;
3604
+ }>>;
3605
+ export declare const auditResultSchema: z.ZodPipe<z.ZodObject<{
3606
+ facts: z.ZodArray<z.ZodPipe<z.ZodUnknown, z.ZodTransform<Readonly<{
3607
+ v: 1;
3608
+ kind: "bound";
3609
+ contract: import("../core/facts/types.js").ContractId;
3610
+ entry: import("../core/facts/types.js").EntryUlid;
3611
+ at: string;
3612
+ actor?: import("../core/facts/types.js").ActorId;
3613
+ data: Readonly<Record<string, never>>;
3614
+ }> | Readonly<{
3615
+ v: 1;
3616
+ kind: "bind";
3617
+ contract: import("../core/facts/types.js").ContractId;
3618
+ entry: import("../core/facts/types.js").EntryUlid;
3619
+ at: string;
3620
+ actor?: import("../core/facts/types.js").ActorId;
3621
+ data: Readonly<{
3622
+ coordinates: import("../core/facts/types.js").ContractCoordinates;
3623
+ terms: import("../core/facts/types.js").ContractTerms;
3624
+ }>;
3625
+ }> | Readonly<{
3626
+ v: 1;
3627
+ kind: "amend";
3628
+ contract: import("../core/facts/types.js").ContractId;
3629
+ entry: import("../core/facts/types.js").EntryUlid;
3630
+ at: string;
3631
+ actor?: import("../core/facts/types.js").ActorId;
3632
+ data: Readonly<{
3633
+ document: Readonly<{
3634
+ bytes: string;
3635
+ key: import("../core/facts/types.js").DocumentKey;
3636
+ }>;
3637
+ segments: readonly import("../core/facts/types.js").DocumentSegmentKey[];
3638
+ gates: readonly import("../core/facts/types.js").Gate[];
3639
+ after: readonly import("../core/facts/types.js").ContractId[];
3640
+ }>;
3641
+ }> | Readonly<{
3642
+ v: 1;
3643
+ kind: "deliver";
3644
+ contract: import("../core/facts/types.js").ContractId;
3645
+ entry: import("../core/facts/types.js").EntryUlid;
3646
+ at: string;
3647
+ actor?: import("../core/facts/types.js").ActorId;
3648
+ data: Readonly<{
3649
+ tenderSnapshot: import("../core/facts/types.js").SnapshotId;
3650
+ integration: Readonly<{
3651
+ predecessor: import("../core/facts/types.js").SnapshotId;
3652
+ snapshot: import("../core/facts/types.js").SnapshotId;
3653
+ changeId: import("../core/facts/types.js").ChangeId;
3654
+ }>;
3655
+ method: "squash";
3656
+ policy: Readonly<{
3657
+ requireBranchesToBeUpToDate: boolean;
3658
+ }>;
3659
+ }>;
3660
+ }> | Readonly<{
3661
+ v: 1;
3662
+ kind: "reintegrated";
3663
+ contract: import("../core/facts/types.js").ContractId;
3664
+ entry: import("../core/facts/types.js").EntryUlid;
3665
+ at: string;
3666
+ actor?: import("../core/facts/types.js").ActorId;
3667
+ data: Readonly<{
3668
+ predecessor: import("../core/facts/types.js").SnapshotId;
3669
+ snapshot: import("../core/facts/types.js").SnapshotId;
3670
+ }>;
3671
+ }> | Readonly<{
3672
+ v: 1;
3673
+ kind: "attestation";
3674
+ contract: import("../core/facts/types.js").ContractId;
3675
+ entry: import("../core/facts/types.js").EntryUlid;
3676
+ at: string;
3677
+ actor?: import("../core/facts/types.js").ActorId;
3678
+ data: Readonly<{
3679
+ gate: import("../core/facts/types.js").Gate;
3680
+ subject: import("../core/facts/types.js").DependencyKeySet;
3681
+ verdict: "satisfied" | "unsatisfied";
3682
+ summary?: string;
3683
+ }>;
3684
+ }> | Readonly<{
3685
+ v: 1;
3686
+ kind: "claimed";
3687
+ contract: import("../core/facts/types.js").ContractId;
3688
+ entry: import("../core/facts/types.js").EntryUlid;
3689
+ at: string;
3690
+ actor?: import("../core/facts/types.js").ActorId;
3691
+ data: Readonly<{
3692
+ delivery: import("../core/facts/types.js").EntryUlid;
3693
+ }>;
3694
+ }> | Readonly<{
3695
+ v: 1;
3696
+ kind: "arc";
3697
+ contract: import("../core/facts/types.js").ContractId;
3698
+ entry: import("../core/facts/types.js").EntryUlid;
3699
+ at: string;
3700
+ actor?: import("../core/facts/types.js").ActorId;
3701
+ data: Readonly<{
3702
+ seq: number;
3703
+ title: string;
3704
+ objective: string;
3705
+ brief: string;
3706
+ }>;
3707
+ }> | Readonly<{
3708
+ v: 1;
3709
+ kind: "abandoned";
3710
+ contract: import("../core/facts/types.js").ContractId;
3711
+ entry: import("../core/facts/types.js").EntryUlid;
3712
+ at: string;
3713
+ actor?: import("../core/facts/types.js").ActorId;
3714
+ data: Readonly<{
3715
+ note?: string;
3716
+ }>;
3717
+ }>, unknown>>>;
3718
+ head: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ContractHead, string>>;
3719
+ value: z.ZodType<Readonly<{
3720
+ candidate: Readonly<{
3721
+ kind: "blocked";
3722
+ refusal: import("./contract.js").DeliveryPreparationRefusal;
3723
+ }> | Readonly<{
3724
+ kind: "ready";
3725
+ workspace: Readonly<{
3726
+ kind: "worktree";
3727
+ path: string;
3728
+ }>;
3729
+ identity: import("../core/facts/types.js").DeliverData;
3730
+ scope: Readonly<{
3731
+ filesChanged: number;
3732
+ insertions: number;
3733
+ deletions: number;
3734
+ paths?: readonly string[];
3735
+ }>;
3736
+ diff?: string;
3737
+ }>;
3738
+ verification: Readonly<{
3739
+ kind: "not-run";
3740
+ }> | Readonly<{
3741
+ kind: "satisfied";
3742
+ passed: number;
3743
+ total: number;
3744
+ summary?: string;
3745
+ }> | Readonly<{
3746
+ kind: "unsatisfied";
3747
+ passed: number;
3748
+ total: number;
3749
+ summary?: string;
3750
+ }> | Readonly<{
3751
+ kind: "stopped";
3752
+ stop: import("./contract.js").VerificationStop;
3753
+ }>;
3754
+ target: Readonly<{
3755
+ kind: "not-observed";
3756
+ }> | import("../git/target-placement.js").AuditTargetAnswer;
3757
+ delivery?: Readonly<{
3758
+ changeId: import("../core/facts/types.js").ChangeId;
3759
+ relation: "identical" | "differs";
3760
+ }>;
3761
+ }>, unknown, z.core.$ZodTypeInternals<Readonly<{
3762
+ candidate: Readonly<{
3763
+ kind: "blocked";
3764
+ refusal: import("./contract.js").DeliveryPreparationRefusal;
3765
+ }> | Readonly<{
3766
+ kind: "ready";
3767
+ workspace: Readonly<{
3768
+ kind: "worktree";
3769
+ path: string;
3770
+ }>;
3771
+ identity: import("../core/facts/types.js").DeliverData;
3772
+ scope: Readonly<{
3773
+ filesChanged: number;
3774
+ insertions: number;
3775
+ deletions: number;
3776
+ paths?: readonly string[];
3777
+ }>;
3778
+ diff?: string;
3779
+ }>;
3780
+ verification: Readonly<{
3781
+ kind: "not-run";
3782
+ }> | Readonly<{
3783
+ kind: "satisfied";
3784
+ passed: number;
3785
+ total: number;
3786
+ summary?: string;
3787
+ }> | Readonly<{
3788
+ kind: "unsatisfied";
3789
+ passed: number;
3790
+ total: number;
3791
+ summary?: string;
3792
+ }> | Readonly<{
3793
+ kind: "stopped";
3794
+ stop: import("./contract.js").VerificationStop;
3795
+ }>;
3796
+ target: Readonly<{
3797
+ kind: "not-observed";
3798
+ }> | import("../git/target-placement.js").AuditTargetAnswer;
3799
+ delivery?: Readonly<{
3800
+ changeId: import("../core/facts/types.js").ChangeId;
3801
+ relation: "identical" | "differs";
3802
+ }>;
3803
+ }>, unknown>>;
3804
+ lags: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
3805
+ kind: z.ZodLiteral<"worktree-retained">;
3806
+ path: z.ZodString;
3807
+ }, z.core.$strict>, z.ZodPipe<z.ZodObject<{
3808
+ kind: z.ZodLiteral<"worktree-follow-retained">;
3809
+ path: z.ZodString;
3810
+ tender: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
3811
+ head: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
3812
+ reason: z.ZodEnum<{
3813
+ "head-moved": "head-moved";
3814
+ "head-attached": "head-attached";
3815
+ "operation-in-progress": "operation-in-progress";
3816
+ "unsupported-parent-shape": "unsupported-parent-shape";
3817
+ }>;
3818
+ paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
3819
+ }, z.core.$strict>, z.ZodTransform<{
3820
+ kind: "worktree-follow-retained";
3821
+ path: string;
3822
+ tender: import("../core/facts/types.js").SnapshotId;
3823
+ head: import("../core/facts/types.js").SnapshotId;
3824
+ reason: "head-moved" | "head-attached" | "operation-in-progress" | "unsupported-parent-shape";
3825
+ } | {
3826
+ paths: string[];
3827
+ kind: "worktree-follow-retained";
3828
+ path: string;
3829
+ tender: import("../core/facts/types.js").SnapshotId;
3830
+ head: import("../core/facts/types.js").SnapshotId;
3831
+ reason: "head-moved" | "head-attached" | "operation-in-progress" | "unsupported-parent-shape";
3832
+ }, {
3833
+ kind: "worktree-follow-retained";
3834
+ path: string;
3835
+ tender: import("../core/facts/types.js").SnapshotId;
3836
+ head: import("../core/facts/types.js").SnapshotId;
3837
+ reason: "head-moved" | "head-attached" | "operation-in-progress" | "unsupported-parent-shape";
3838
+ paths?: string[] | undefined;
3839
+ }>>, z.ZodPipe<z.ZodObject<{
3840
+ kind: z.ZodLiteral<"unsealed-bytes">;
3841
+ path: z.ZodString;
3842
+ paths: z.ZodArray<z.ZodString>;
3843
+ head: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>>;
3844
+ }, z.core.$strict>, z.ZodTransform<{
3845
+ kind: "unsealed-bytes";
3846
+ path: string;
3847
+ paths: string[];
3848
+ } | {
3849
+ head: import("../core/facts/types.js").SnapshotId;
3850
+ kind: "unsealed-bytes";
3851
+ path: string;
3852
+ paths: string[];
3853
+ }, {
3854
+ kind: "unsealed-bytes";
3855
+ path: string;
3856
+ paths: string[];
3857
+ head?: import("../core/facts/types.js").SnapshotId | undefined;
3858
+ }>>, z.ZodObject<{
3859
+ kind: z.ZodLiteral<"target-checkout-retained">;
3860
+ path: z.ZodString;
3861
+ target: z.ZodString;
3862
+ diagnostic: z.ZodString;
3863
+ }, z.core.$strict>, z.ZodObject<{
3864
+ kind: z.ZodLiteral<"reconcile-failed">;
3865
+ stage: z.ZodEnum<{
3866
+ observation: "observation";
3867
+ effect: "effect";
3868
+ }>;
3869
+ diagnostic: z.ZodString;
3870
+ }, z.core.$strict>, z.ZodObject<{
3871
+ kind: z.ZodLiteral<"ref-migration-conflict">;
3872
+ legacyRef: z.ZodString;
3873
+ legacyOid: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
3874
+ currentRef: z.ZodString;
3875
+ currentOid: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
3876
+ }, z.core.$strict>, z.ZodObject<{
3877
+ kind: z.ZodLiteral<"worktree-hook-failed">;
3878
+ phase: z.ZodEnum<{
3879
+ destroy: "destroy";
3880
+ create: "create";
3881
+ }>;
3882
+ path: z.ZodString;
3883
+ command: z.ZodNumber;
3884
+ name: z.ZodString;
3885
+ failure: z.ZodUnion<readonly [z.ZodObject<{
3886
+ kind: z.ZodLiteral<"exit">;
3887
+ code: z.ZodNumber;
3888
+ stdout: z.ZodString;
3889
+ stderr: z.ZodString;
3890
+ truncated: z.ZodBoolean;
3891
+ }, z.core.$strict>, z.ZodObject<{
3892
+ kind: z.ZodLiteral<"timeout">;
3893
+ }, z.core.$strict>, z.ZodObject<{
3894
+ kind: z.ZodLiteral<"spawn-error">;
3895
+ diagnostic: z.ZodString;
3896
+ }, z.core.$strict>, z.ZodObject<{
3897
+ kind: z.ZodLiteral<"unknown-exit">;
3898
+ }, z.core.$strict>]>;
3899
+ }, z.core.$strict>, z.ZodObject<{
3900
+ kind: z.ZodLiteral<"contract-file-failed">;
3901
+ worktree: z.ZodString;
3902
+ path: z.ZodString;
3903
+ diagnostic: z.ZodString;
3904
+ }, z.core.$strict>]>>;
3905
+ settlementLags: z.ZodArray<z.ZodPipe<z.ZodObject<{
3906
+ kind: z.ZodLiteral<"settlement-failed">;
3907
+ surface: z.ZodEnum<{
3908
+ task: "task";
3909
+ "namespace-context": "namespace-context";
3910
+ "task-holder": "task-holder";
3911
+ }>;
3912
+ contractId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ContractId, string>>;
3913
+ taskId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`task/${string}`, string>>>;
3914
+ path: z.ZodOptional<z.ZodString>;
3915
+ diagnostic: z.ZodString;
3916
+ }, z.core.$strict>, z.ZodTransform<{
3917
+ path?: string;
3918
+ taskId?: `task/${string}`;
3919
+ kind: "settlement-failed";
3920
+ surface: "task" | "namespace-context" | "task-holder";
3921
+ contractId: import("../core/facts/types.js").ContractId;
3922
+ diagnostic: string;
3923
+ }, {
3924
+ kind: "settlement-failed";
3925
+ surface: "task" | "namespace-context" | "task-holder";
3926
+ contractId: import("../core/facts/types.js").ContractId;
3927
+ diagnostic: string;
3928
+ taskId?: `task/${string}` | undefined;
3929
+ path?: string | undefined;
3930
+ }>>>;
3931
+ recoverySnapshot: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>>;
3932
+ cleanup: z.ZodOptional<z.ZodObject<{
3933
+ phase: z.ZodLiteral<"destroy">;
3934
+ command: z.ZodNumber;
3935
+ detail: z.ZodUnion<readonly [z.ZodObject<{
3936
+ kind: z.ZodLiteral<"exit">;
3937
+ code: z.ZodNumber;
3938
+ stdout: z.ZodString;
3939
+ stderr: z.ZodString;
3940
+ truncated: z.ZodBoolean;
3941
+ }, z.core.$strict>, z.ZodObject<{
3942
+ kind: z.ZodLiteral<"timeout">;
3943
+ }, z.core.$strict>, z.ZodObject<{
3944
+ kind: z.ZodLiteral<"spawn-error">;
3945
+ diagnostic: z.ZodString;
3946
+ }, z.core.$strict>, z.ZodObject<{
3947
+ kind: z.ZodLiteral<"unknown-exit">;
3948
+ }, z.core.$strict>]>;
3949
+ }, z.core.$strict>>;
3950
+ leak: z.ZodOptional<z.ZodObject<{
3951
+ path: z.ZodString;
3952
+ diagnostic: z.ZodString;
3953
+ }, z.core.$strict>>;
3954
+ }, z.core.$strict>, z.ZodTransform<{
3955
+ leak?: {
3956
+ path: string;
3957
+ diagnostic: string;
3958
+ };
3959
+ cleanup?: {
3960
+ phase: "destroy";
3961
+ command: number;
3962
+ detail: {
3963
+ kind: "exit";
3964
+ code: number;
3965
+ stdout: string;
3966
+ stderr: string;
3967
+ truncated: boolean;
3968
+ } | {
3969
+ kind: "timeout";
3970
+ } | {
3971
+ kind: "spawn-error";
3972
+ diagnostic: string;
3973
+ } | {
3974
+ kind: "unknown-exit";
3975
+ };
3976
+ };
3977
+ recoverySnapshot?: import("../core/facts/types.js").SnapshotId;
3978
+ facts: (Readonly<{
3979
+ v: 1;
3980
+ kind: "bound";
3981
+ contract: import("../core/facts/types.js").ContractId;
3982
+ entry: import("../core/facts/types.js").EntryUlid;
3983
+ at: string;
3984
+ actor?: import("../core/facts/types.js").ActorId;
3985
+ data: Readonly<Record<string, never>>;
3986
+ }> | Readonly<{
3987
+ v: 1;
3988
+ kind: "bind";
3989
+ contract: import("../core/facts/types.js").ContractId;
3990
+ entry: import("../core/facts/types.js").EntryUlid;
3991
+ at: string;
3992
+ actor?: import("../core/facts/types.js").ActorId;
3993
+ data: Readonly<{
3994
+ coordinates: import("../core/facts/types.js").ContractCoordinates;
3995
+ terms: import("../core/facts/types.js").ContractTerms;
3996
+ }>;
3997
+ }> | Readonly<{
3998
+ v: 1;
3999
+ kind: "amend";
4000
+ contract: import("../core/facts/types.js").ContractId;
4001
+ entry: import("../core/facts/types.js").EntryUlid;
4002
+ at: string;
4003
+ actor?: import("../core/facts/types.js").ActorId;
4004
+ data: Readonly<{
4005
+ document: Readonly<{
4006
+ bytes: string;
4007
+ key: import("../core/facts/types.js").DocumentKey;
4008
+ }>;
4009
+ segments: readonly import("../core/facts/types.js").DocumentSegmentKey[];
4010
+ gates: readonly import("../core/facts/types.js").Gate[];
4011
+ after: readonly import("../core/facts/types.js").ContractId[];
4012
+ }>;
4013
+ }> | Readonly<{
4014
+ v: 1;
4015
+ kind: "deliver";
4016
+ contract: import("../core/facts/types.js").ContractId;
4017
+ entry: import("../core/facts/types.js").EntryUlid;
4018
+ at: string;
4019
+ actor?: import("../core/facts/types.js").ActorId;
4020
+ data: Readonly<{
4021
+ tenderSnapshot: import("../core/facts/types.js").SnapshotId;
4022
+ integration: Readonly<{
4023
+ predecessor: import("../core/facts/types.js").SnapshotId;
4024
+ snapshot: import("../core/facts/types.js").SnapshotId;
4025
+ changeId: import("../core/facts/types.js").ChangeId;
4026
+ }>;
4027
+ method: "squash";
4028
+ policy: Readonly<{
4029
+ requireBranchesToBeUpToDate: boolean;
4030
+ }>;
4031
+ }>;
4032
+ }> | Readonly<{
4033
+ v: 1;
4034
+ kind: "reintegrated";
4035
+ contract: import("../core/facts/types.js").ContractId;
4036
+ entry: import("../core/facts/types.js").EntryUlid;
4037
+ at: string;
4038
+ actor?: import("../core/facts/types.js").ActorId;
4039
+ data: Readonly<{
4040
+ predecessor: import("../core/facts/types.js").SnapshotId;
4041
+ snapshot: import("../core/facts/types.js").SnapshotId;
4042
+ }>;
4043
+ }> | Readonly<{
4044
+ v: 1;
4045
+ kind: "attestation";
4046
+ contract: import("../core/facts/types.js").ContractId;
4047
+ entry: import("../core/facts/types.js").EntryUlid;
4048
+ at: string;
4049
+ actor?: import("../core/facts/types.js").ActorId;
4050
+ data: Readonly<{
4051
+ gate: import("../core/facts/types.js").Gate;
4052
+ subject: import("../core/facts/types.js").DependencyKeySet;
4053
+ verdict: "satisfied" | "unsatisfied";
4054
+ summary?: string;
4055
+ }>;
4056
+ }> | Readonly<{
4057
+ v: 1;
4058
+ kind: "claimed";
4059
+ contract: import("../core/facts/types.js").ContractId;
4060
+ entry: import("../core/facts/types.js").EntryUlid;
4061
+ at: string;
4062
+ actor?: import("../core/facts/types.js").ActorId;
4063
+ data: Readonly<{
4064
+ delivery: import("../core/facts/types.js").EntryUlid;
4065
+ }>;
4066
+ }> | Readonly<{
4067
+ v: 1;
4068
+ kind: "arc";
4069
+ contract: import("../core/facts/types.js").ContractId;
4070
+ entry: import("../core/facts/types.js").EntryUlid;
4071
+ at: string;
4072
+ actor?: import("../core/facts/types.js").ActorId;
4073
+ data: Readonly<{
4074
+ seq: number;
4075
+ title: string;
4076
+ objective: string;
4077
+ brief: string;
4078
+ }>;
4079
+ }> | Readonly<{
4080
+ v: 1;
4081
+ kind: "abandoned";
4082
+ contract: import("../core/facts/types.js").ContractId;
4083
+ entry: import("../core/facts/types.js").EntryUlid;
4084
+ at: string;
4085
+ actor?: import("../core/facts/types.js").ActorId;
4086
+ data: Readonly<{
4087
+ note?: string;
4088
+ }>;
4089
+ }>)[];
4090
+ head: import("../core/facts/types.js").ContractHead;
4091
+ value: Readonly<{
4092
+ candidate: Readonly<{
4093
+ kind: "blocked";
4094
+ refusal: import("./contract.js").DeliveryPreparationRefusal;
4095
+ }> | Readonly<{
4096
+ kind: "ready";
4097
+ workspace: Readonly<{
4098
+ kind: "worktree";
4099
+ path: string;
4100
+ }>;
4101
+ identity: import("../core/facts/types.js").DeliverData;
4102
+ scope: Readonly<{
4103
+ filesChanged: number;
4104
+ insertions: number;
4105
+ deletions: number;
4106
+ paths?: readonly string[];
4107
+ }>;
4108
+ diff?: string;
4109
+ }>;
4110
+ verification: Readonly<{
4111
+ kind: "not-run";
4112
+ }> | Readonly<{
4113
+ kind: "satisfied";
4114
+ passed: number;
4115
+ total: number;
4116
+ summary?: string;
4117
+ }> | Readonly<{
4118
+ kind: "unsatisfied";
4119
+ passed: number;
4120
+ total: number;
4121
+ summary?: string;
4122
+ }> | Readonly<{
4123
+ kind: "stopped";
4124
+ stop: import("./contract.js").VerificationStop;
4125
+ }>;
4126
+ target: Readonly<{
4127
+ kind: "not-observed";
4128
+ }> | import("../git/target-placement.js").AuditTargetAnswer;
4129
+ delivery?: Readonly<{
4130
+ changeId: import("../core/facts/types.js").ChangeId;
4131
+ relation: "identical" | "differs";
4132
+ }>;
4133
+ }>;
4134
+ lags: ({
4135
+ kind: "worktree-follow-retained";
4136
+ path: string;
4137
+ tender: import("../core/facts/types.js").SnapshotId;
4138
+ head: import("../core/facts/types.js").SnapshotId;
4139
+ reason: "head-moved" | "head-attached" | "operation-in-progress" | "unsupported-parent-shape";
4140
+ } | {
4141
+ paths: string[];
4142
+ kind: "worktree-follow-retained";
4143
+ path: string;
4144
+ tender: import("../core/facts/types.js").SnapshotId;
4145
+ head: import("../core/facts/types.js").SnapshotId;
4146
+ reason: "head-moved" | "head-attached" | "operation-in-progress" | "unsupported-parent-shape";
4147
+ } | {
4148
+ kind: "unsealed-bytes";
4149
+ path: string;
4150
+ paths: string[];
4151
+ } | {
4152
+ head: import("../core/facts/types.js").SnapshotId;
4153
+ kind: "unsealed-bytes";
4154
+ path: string;
4155
+ paths: string[];
4156
+ } | {
4157
+ kind: "worktree-retained";
4158
+ path: string;
4159
+ } | {
4160
+ kind: "target-checkout-retained";
4161
+ path: string;
4162
+ target: string;
4163
+ diagnostic: string;
4164
+ } | {
4165
+ kind: "reconcile-failed";
4166
+ stage: "observation" | "effect";
4167
+ diagnostic: string;
4168
+ } | {
4169
+ kind: "ref-migration-conflict";
4170
+ legacyRef: string;
4171
+ legacyOid: import("../core/facts/types.js").SnapshotId;
4172
+ currentRef: string;
4173
+ currentOid: import("../core/facts/types.js").SnapshotId;
4174
+ } | {
4175
+ kind: "worktree-hook-failed";
4176
+ phase: "destroy" | "create";
4177
+ path: string;
4178
+ command: number;
4179
+ name: string;
4180
+ failure: {
4181
+ kind: "exit";
4182
+ code: number;
4183
+ stdout: string;
4184
+ stderr: string;
4185
+ truncated: boolean;
4186
+ } | {
4187
+ kind: "timeout";
4188
+ } | {
4189
+ kind: "spawn-error";
4190
+ diagnostic: string;
4191
+ } | {
4192
+ kind: "unknown-exit";
4193
+ };
4194
+ } | {
4195
+ kind: "contract-file-failed";
4196
+ worktree: string;
4197
+ path: string;
4198
+ diagnostic: string;
4199
+ })[];
4200
+ settlementLags: {
4201
+ path?: string;
4202
+ taskId?: `task/${string}`;
4203
+ kind: "settlement-failed";
4204
+ surface: "task" | "namespace-context" | "task-holder";
4205
+ contractId: import("../core/facts/types.js").ContractId;
4206
+ diagnostic: string;
4207
+ }[];
4208
+ }, {
4209
+ facts: (Readonly<{
4210
+ v: 1;
4211
+ kind: "bound";
4212
+ contract: import("../core/facts/types.js").ContractId;
4213
+ entry: import("../core/facts/types.js").EntryUlid;
4214
+ at: string;
4215
+ actor?: import("../core/facts/types.js").ActorId;
4216
+ data: Readonly<Record<string, never>>;
4217
+ }> | Readonly<{
4218
+ v: 1;
4219
+ kind: "bind";
4220
+ contract: import("../core/facts/types.js").ContractId;
4221
+ entry: import("../core/facts/types.js").EntryUlid;
4222
+ at: string;
4223
+ actor?: import("../core/facts/types.js").ActorId;
4224
+ data: Readonly<{
4225
+ coordinates: import("../core/facts/types.js").ContractCoordinates;
4226
+ terms: import("../core/facts/types.js").ContractTerms;
4227
+ }>;
4228
+ }> | Readonly<{
4229
+ v: 1;
4230
+ kind: "amend";
4231
+ contract: import("../core/facts/types.js").ContractId;
4232
+ entry: import("../core/facts/types.js").EntryUlid;
4233
+ at: string;
4234
+ actor?: import("../core/facts/types.js").ActorId;
4235
+ data: Readonly<{
4236
+ document: Readonly<{
4237
+ bytes: string;
4238
+ key: import("../core/facts/types.js").DocumentKey;
4239
+ }>;
4240
+ segments: readonly import("../core/facts/types.js").DocumentSegmentKey[];
4241
+ gates: readonly import("../core/facts/types.js").Gate[];
4242
+ after: readonly import("../core/facts/types.js").ContractId[];
4243
+ }>;
4244
+ }> | Readonly<{
4245
+ v: 1;
4246
+ kind: "deliver";
4247
+ contract: import("../core/facts/types.js").ContractId;
4248
+ entry: import("../core/facts/types.js").EntryUlid;
4249
+ at: string;
4250
+ actor?: import("../core/facts/types.js").ActorId;
4251
+ data: Readonly<{
4252
+ tenderSnapshot: import("../core/facts/types.js").SnapshotId;
4253
+ integration: Readonly<{
4254
+ predecessor: import("../core/facts/types.js").SnapshotId;
4255
+ snapshot: import("../core/facts/types.js").SnapshotId;
4256
+ changeId: import("../core/facts/types.js").ChangeId;
4257
+ }>;
4258
+ method: "squash";
4259
+ policy: Readonly<{
4260
+ requireBranchesToBeUpToDate: boolean;
4261
+ }>;
4262
+ }>;
4263
+ }> | Readonly<{
4264
+ v: 1;
4265
+ kind: "reintegrated";
4266
+ contract: import("../core/facts/types.js").ContractId;
4267
+ entry: import("../core/facts/types.js").EntryUlid;
4268
+ at: string;
4269
+ actor?: import("../core/facts/types.js").ActorId;
4270
+ data: Readonly<{
4271
+ predecessor: import("../core/facts/types.js").SnapshotId;
4272
+ snapshot: import("../core/facts/types.js").SnapshotId;
4273
+ }>;
4274
+ }> | Readonly<{
4275
+ v: 1;
4276
+ kind: "attestation";
4277
+ contract: import("../core/facts/types.js").ContractId;
4278
+ entry: import("../core/facts/types.js").EntryUlid;
4279
+ at: string;
4280
+ actor?: import("../core/facts/types.js").ActorId;
4281
+ data: Readonly<{
4282
+ gate: import("../core/facts/types.js").Gate;
4283
+ subject: import("../core/facts/types.js").DependencyKeySet;
4284
+ verdict: "satisfied" | "unsatisfied";
4285
+ summary?: string;
4286
+ }>;
4287
+ }> | Readonly<{
4288
+ v: 1;
4289
+ kind: "claimed";
4290
+ contract: import("../core/facts/types.js").ContractId;
4291
+ entry: import("../core/facts/types.js").EntryUlid;
4292
+ at: string;
4293
+ actor?: import("../core/facts/types.js").ActorId;
4294
+ data: Readonly<{
4295
+ delivery: import("../core/facts/types.js").EntryUlid;
4296
+ }>;
4297
+ }> | Readonly<{
4298
+ v: 1;
4299
+ kind: "arc";
4300
+ contract: import("../core/facts/types.js").ContractId;
4301
+ entry: import("../core/facts/types.js").EntryUlid;
4302
+ at: string;
4303
+ actor?: import("../core/facts/types.js").ActorId;
4304
+ data: Readonly<{
4305
+ seq: number;
4306
+ title: string;
4307
+ objective: string;
4308
+ brief: string;
4309
+ }>;
4310
+ }> | Readonly<{
4311
+ v: 1;
4312
+ kind: "abandoned";
4313
+ contract: import("../core/facts/types.js").ContractId;
4314
+ entry: import("../core/facts/types.js").EntryUlid;
4315
+ at: string;
4316
+ actor?: import("../core/facts/types.js").ActorId;
4317
+ data: Readonly<{
4318
+ note?: string;
4319
+ }>;
4320
+ }>)[];
4321
+ head: import("../core/facts/types.js").ContractHead;
4322
+ value: Readonly<{
4323
+ candidate: Readonly<{
4324
+ kind: "blocked";
4325
+ refusal: import("./contract.js").DeliveryPreparationRefusal;
4326
+ }> | Readonly<{
4327
+ kind: "ready";
4328
+ workspace: Readonly<{
4329
+ kind: "worktree";
4330
+ path: string;
4331
+ }>;
4332
+ identity: import("../core/facts/types.js").DeliverData;
4333
+ scope: Readonly<{
4334
+ filesChanged: number;
4335
+ insertions: number;
4336
+ deletions: number;
4337
+ paths?: readonly string[];
4338
+ }>;
4339
+ diff?: string;
4340
+ }>;
4341
+ verification: Readonly<{
4342
+ kind: "not-run";
4343
+ }> | Readonly<{
4344
+ kind: "satisfied";
4345
+ passed: number;
4346
+ total: number;
4347
+ summary?: string;
4348
+ }> | Readonly<{
4349
+ kind: "unsatisfied";
4350
+ passed: number;
4351
+ total: number;
4352
+ summary?: string;
4353
+ }> | Readonly<{
4354
+ kind: "stopped";
4355
+ stop: import("./contract.js").VerificationStop;
4356
+ }>;
4357
+ target: Readonly<{
4358
+ kind: "not-observed";
4359
+ }> | import("../git/target-placement.js").AuditTargetAnswer;
4360
+ delivery?: Readonly<{
4361
+ changeId: import("../core/facts/types.js").ChangeId;
4362
+ relation: "identical" | "differs";
4363
+ }>;
4364
+ }>;
4365
+ lags: ({
4366
+ kind: "worktree-follow-retained";
4367
+ path: string;
4368
+ tender: import("../core/facts/types.js").SnapshotId;
4369
+ head: import("../core/facts/types.js").SnapshotId;
4370
+ reason: "head-moved" | "head-attached" | "operation-in-progress" | "unsupported-parent-shape";
4371
+ } | {
4372
+ paths: string[];
4373
+ kind: "worktree-follow-retained";
4374
+ path: string;
4375
+ tender: import("../core/facts/types.js").SnapshotId;
4376
+ head: import("../core/facts/types.js").SnapshotId;
4377
+ reason: "head-moved" | "head-attached" | "operation-in-progress" | "unsupported-parent-shape";
4378
+ } | {
4379
+ kind: "unsealed-bytes";
4380
+ path: string;
4381
+ paths: string[];
4382
+ } | {
4383
+ head: import("../core/facts/types.js").SnapshotId;
4384
+ kind: "unsealed-bytes";
4385
+ path: string;
4386
+ paths: string[];
4387
+ } | {
4388
+ kind: "worktree-retained";
4389
+ path: string;
4390
+ } | {
4391
+ kind: "target-checkout-retained";
4392
+ path: string;
4393
+ target: string;
4394
+ diagnostic: string;
4395
+ } | {
4396
+ kind: "reconcile-failed";
4397
+ stage: "observation" | "effect";
4398
+ diagnostic: string;
4399
+ } | {
4400
+ kind: "ref-migration-conflict";
4401
+ legacyRef: string;
4402
+ legacyOid: import("../core/facts/types.js").SnapshotId;
4403
+ currentRef: string;
4404
+ currentOid: import("../core/facts/types.js").SnapshotId;
4405
+ } | {
4406
+ kind: "worktree-hook-failed";
4407
+ phase: "destroy" | "create";
4408
+ path: string;
4409
+ command: number;
4410
+ name: string;
4411
+ failure: {
4412
+ kind: "exit";
4413
+ code: number;
4414
+ stdout: string;
4415
+ stderr: string;
4416
+ truncated: boolean;
4417
+ } | {
4418
+ kind: "timeout";
4419
+ } | {
4420
+ kind: "spawn-error";
4421
+ diagnostic: string;
4422
+ } | {
4423
+ kind: "unknown-exit";
4424
+ };
4425
+ } | {
4426
+ kind: "contract-file-failed";
4427
+ worktree: string;
4428
+ path: string;
4429
+ diagnostic: string;
4430
+ })[];
4431
+ settlementLags: {
4432
+ path?: string;
4433
+ taskId?: `task/${string}`;
4434
+ kind: "settlement-failed";
4435
+ surface: "task" | "namespace-context" | "task-holder";
4436
+ contractId: import("../core/facts/types.js").ContractId;
4437
+ diagnostic: string;
4438
+ }[];
4439
+ recoverySnapshot?: import("../core/facts/types.js").SnapshotId | undefined;
4440
+ cleanup?: {
4441
+ phase: "destroy";
4442
+ command: number;
4443
+ detail: {
4444
+ kind: "exit";
4445
+ code: number;
4446
+ stdout: string;
4447
+ stderr: string;
4448
+ truncated: boolean;
4449
+ } | {
4450
+ kind: "timeout";
4451
+ } | {
4452
+ kind: "spawn-error";
4453
+ diagnostic: string;
4454
+ } | {
4455
+ kind: "unknown-exit";
4456
+ };
4457
+ } | undefined;
4458
+ leak?: {
4459
+ path: string;
4460
+ diagnostic: string;
4461
+ } | undefined;
4462
+ }>>;
4463
+ export declare function encodeContractLiveFailure(error: unknown): unknown | null;
4464
+ export declare function decodeContractLiveFailure(value: unknown): Error | null;