@astrosheep/keiyaku 4.6.32 → 4.6.34

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 +18 -7
  2. package/build/plugins/claude/skills/keiyaku-akuma/SKILL.md +18 -11
  3. package/build/plugins/claude/skills/keiyaku-babysit/SKILL.md +8 -6
  4. package/build/plugins/claude/skills/keiyaku-debt/SKILL.md +2 -1
  5. package/build/plugins/claude/skills/keiyaku-workflow/SKILL.md +2 -1
  6. package/build/plugins/codex/skills/keiyaku-akuma/SKILL.md +18 -11
  7. package/build/plugins/codex/skills/keiyaku-babysit/SKILL.md +8 -6
  8. package/build/plugins/codex/skills/keiyaku-debt/SKILL.md +2 -1
  9. package/build/plugins/codex/skills/keiyaku-workflow/SKILL.md +2 -1
  10. package/build/plugins/opencode/skills/keiyaku-akuma/SKILL.md +18 -11
  11. package/build/plugins/opencode/skills/keiyaku-babysit/SKILL.md +8 -6
  12. package/build/plugins/opencode/skills/keiyaku-debt/SKILL.md +2 -1
  13. package/build/plugins/opencode/skills/keiyaku-workflow/SKILL.md +2 -1
  14. package/build/plugins/pi/README.md +55 -97
  15. package/build/plugins/pi/keiyaku.ts +1 -142
  16. package/build/skills/keiyaku-akuma/SKILL.md +18 -11
  17. package/build/skills/keiyaku-babysit/SKILL.md +8 -6
  18. package/build/skills/keiyaku-debt/SKILL.md +2 -1
  19. package/build/skills/keiyaku-workflow/SKILL.md +2 -1
  20. package/build/src/akuma/akuma-instance.d.ts +11 -0
  21. package/build/src/akuma/akuma-instance.js +1 -2
  22. package/build/src/akuma/akuma-observe.d.ts +8 -0
  23. package/build/src/akuma/akuma-observe.js +81 -14
  24. package/build/src/akuma/akuma-owner.d.ts +1 -0
  25. package/build/src/akuma/akuma-owner.js +3 -5
  26. package/build/src/akuma/akuma-selection-execution.d.ts +82 -7
  27. package/build/src/akuma/akuma-selection-execution.js +26 -27
  28. package/build/src/akuma/akuma-wait.d.ts +155 -1
  29. package/build/src/akuma/akuma-wait.js +94 -34
  30. package/build/src/akuma/akuma.d.ts +17 -1
  31. package/build/src/akuma/akuma.js +37 -18
  32. package/build/src/akuma/body.js +13 -18
  33. package/build/src/akuma/call-initial-tell.d.ts +0 -1
  34. package/build/src/akuma/call-initial-tell.js +0 -1
  35. package/build/src/akuma/heart/activity-schema.d.ts +16 -0
  36. package/build/src/akuma/heart/activity-schema.js +7 -0
  37. package/build/src/akuma/heart/facts.d.ts +1 -0
  38. package/build/src/akuma/heart/facts.js +14 -0
  39. package/build/src/akuma/heart/index.d.ts +7 -1
  40. package/build/src/akuma/heart/index.js +35 -9
  41. package/build/src/akuma/heart/rows.d.ts +1 -0
  42. package/build/src/akuma/heart/rows.js +4 -0
  43. package/build/src/akuma/heart/timeline.js +4 -4
  44. package/build/src/akuma/lineage-cache.d.ts +7 -2
  45. package/build/src/akuma/lineage-cache.js +48 -24
  46. package/build/src/akuma/projection-read.d.ts +4 -2
  47. package/build/src/akuma/projection-read.js +25 -23
  48. package/build/src/akuma/projection.d.ts +94 -2
  49. package/build/src/akuma/projection.js +47 -47
  50. package/build/src/akuma/provider.d.ts +2 -2
  51. package/build/src/akuma/provider.js +27 -20
  52. package/build/src/akuma/providers/acp/core.js +2 -5
  53. package/build/src/akuma/providers/opencode-sdk/events.d.ts +2 -1
  54. package/build/src/akuma/providers/opencode-sdk/events.js +31 -1
  55. package/build/src/akuma/publication.js +3 -2
  56. package/build/src/akuma/selection-observation.d.ts +645 -0
  57. package/build/src/akuma/selection-observation.js +22 -7
  58. package/build/src/akuma/status-projection.d.ts +14 -1
  59. package/build/src/akuma/status-projection.js +40 -2
  60. package/build/src/akuma/turn-drive.js +21 -15
  61. package/build/src/body/amend.js +5 -17
  62. package/build/src/body/decode.js +11 -1
  63. package/build/src/body/envelope.d.ts +5 -1
  64. package/build/src/body/envelope.js +4 -2
  65. package/build/src/body/render.js +4 -6
  66. package/build/src/bounded-list.d.ts +8 -0
  67. package/build/src/bounded-list.js +10 -0
  68. package/build/src/cli/commands/akuma-grammar.d.ts +5 -8
  69. package/build/src/cli/commands/akuma-grammar.js +52 -77
  70. package/build/src/cli/commands/akuma.d.ts +1 -2
  71. package/build/src/cli/commands/akuma.js +12 -61
  72. package/build/src/cli/commands/contract-grammar.d.ts +1 -0
  73. package/build/src/cli/commands/contract-grammar.js +39 -42
  74. package/build/src/cli/commands/contract-help.d.ts +6 -5
  75. package/build/src/cli/commands/contract-help.js +21 -13
  76. package/build/src/cli/commands/contract.d.ts +3 -3
  77. package/build/src/cli/commands/contract.js +13 -9
  78. package/build/src/cli/commands/debt-grammar.js +2 -4
  79. package/build/src/cli/parse.d.ts +4 -10
  80. package/build/src/cli/parse.js +2 -5
  81. package/build/src/cli/render/akuma-activity.d.ts +12 -34
  82. package/build/src/cli/render/akuma-activity.js +99 -180
  83. package/build/src/cli/render/akuma.d.ts +5 -11
  84. package/build/src/cli/render/akuma.js +22 -30
  85. package/build/src/cli/render/catalog.js +4 -6
  86. package/build/src/cli/render/contract-history.d.ts +1 -3
  87. package/build/src/cli/render/contract-history.js +70 -49
  88. package/build/src/cli/render/contract-observation.d.ts +2 -1
  89. package/build/src/cli/render/contract-observation.js +25 -1
  90. package/build/src/cli/render/contract-wait.d.ts +2 -2
  91. package/build/src/cli/render/contract-wait.js +21 -17
  92. package/build/src/cli/render/contract.js +12 -9
  93. package/build/src/cli/render/debt.js +1 -2
  94. package/build/src/cli/render/execution-progress.js +1 -3
  95. package/build/src/cli/render/kanshi-akuma.d.ts +4 -3
  96. package/build/src/cli/render/kanshi-akuma.js +27 -23
  97. package/build/src/cli/render/kanshi.js +45 -60
  98. package/build/src/cli/render/receipt.d.ts +1 -1
  99. package/build/src/cli/render/receipt.js +33 -28
  100. package/build/src/cli/render/reconcile.js +2 -5
  101. package/build/src/cli/render/refusal.js +3 -6
  102. package/build/src/cli/render/terminal.d.ts +2 -4
  103. package/build/src/cli/render/terminal.js +10 -17
  104. package/build/src/cli/render/verbs.d.ts +1 -0
  105. package/build/src/cli/render/verbs.js +39 -34
  106. package/build/src/cli/runtime.js +12 -32
  107. package/build/src/core/facts/codec.js +7 -2
  108. package/build/src/core/facts/eligibility.d.ts +4 -4
  109. package/build/src/core/facts/eligibility.js +11 -0
  110. package/build/src/core/facts/fold.js +9 -5
  111. package/build/src/core/facts/gate.d.ts +5 -1
  112. package/build/src/core/facts/gate.js +14 -10
  113. package/build/src/core/facts/types.d.ts +5 -1
  114. package/build/src/core/facts/types.js +7 -0
  115. package/build/src/core/subject.d.ts +4 -1
  116. package/build/src/core/subject.js +10 -2
  117. package/build/src/core/verbs/amend.d.ts +15 -4
  118. package/build/src/core/verbs/amend.js +19 -9
  119. package/build/src/debt/board.d.ts +2 -1
  120. package/build/src/debt/board.js +3 -3
  121. package/build/src/debt/catalog.js +2 -1
  122. package/build/src/debt/document.d.ts +1 -0
  123. package/build/src/debt/document.js +3 -0
  124. package/build/src/debt/index.d.ts +2 -2
  125. package/build/src/debt/index.js +9 -14
  126. package/build/src/debt/input.d.ts +2 -1
  127. package/build/src/debt/input.js +6 -4
  128. package/build/src/debt/operations.d.ts +2 -1
  129. package/build/src/dispatch/index.d.ts +0 -17
  130. package/build/src/dispatch/index.js +1 -10
  131. package/build/src/git/identity.js +16 -45
  132. package/build/src/git/nuke.js +13 -23
  133. package/build/src/git/observe.d.ts +7 -3
  134. package/build/src/git/observe.js +29 -26
  135. package/build/src/git/process.js +11 -18
  136. package/build/src/git/read-observation.d.ts +5 -4
  137. package/build/src/git/repository.d.ts +2 -0
  138. package/build/src/git/repository.js +13 -1
  139. package/build/src/git/scratch.js +2 -14
  140. package/build/src/git/terminal-reconcile.js +1 -13
  141. package/build/src/history.d.ts +26 -0
  142. package/build/src/history.js +43 -0
  143. package/build/src/index.d.ts +6 -3
  144. package/build/src/kanshi/counts.d.ts +15 -1
  145. package/build/src/kanshi/counts.js +14 -3
  146. package/build/src/kanshi/index.d.ts +3 -4
  147. package/build/src/kanshi/index.js +2 -3
  148. package/build/src/kanshi/read.d.ts +21 -0
  149. package/build/src/kanshi/read.js +7 -3
  150. package/build/src/kanshi/report.d.ts +94 -0
  151. package/build/src/library/address.d.ts +12 -5
  152. package/build/src/library/address.js +18 -32
  153. package/build/src/library/akuma-creation.d.ts +39 -0
  154. package/build/src/library/akuma-creation.js +3 -9
  155. package/build/src/library/akumas.d.ts +5 -1
  156. package/build/src/library/akumas.js +11 -5
  157. package/build/src/library/continuation.d.ts +10 -0
  158. package/build/src/library/contract-composition.js +10 -10
  159. package/build/src/library/contract-creation.js +12 -13
  160. package/build/src/library/contract-outcomes.d.ts +72 -1
  161. package/build/src/library/contract-outcomes.js +1 -0
  162. package/build/src/library/contract-types.d.ts +233 -25
  163. package/build/src/library/contract-types.js +32 -12
  164. package/build/src/library/contract-wait.d.ts +212 -0
  165. package/build/src/library/contract-wait.js +65 -49
  166. package/build/src/library/delivery.d.ts +25 -0
  167. package/build/src/library/input.d.ts +8 -26
  168. package/build/src/library/input.js +17 -12
  169. package/build/src/library/kei.js +167 -90
  170. package/build/src/library/keiyaku-attribution.d.ts +1 -1
  171. package/build/src/library/keiyaku-attribution.js +3 -1
  172. package/build/src/library/keiyaku-classify.js +8 -4
  173. package/build/src/library/keiyaku-debt.d.ts +8 -7
  174. package/build/src/library/keiyaku-debt.js +1 -2
  175. package/build/src/library/keiyaku-identity.d.ts +4 -3
  176. package/build/src/library/keiyaku-identity.js +35 -7
  177. package/build/src/library/keiyaku-verbs.d.ts +974 -1409
  178. package/build/src/library/keiyaku-verbs.js +154 -161
  179. package/build/src/library/keiyaku-wait.d.ts +753 -0
  180. package/build/src/library/keiyaku-wait.js +230 -0
  181. package/build/src/library/keiyaku.d.ts +3110 -29
  182. package/build/src/library/keiyaku.js +342 -438
  183. package/build/src/library/model-tools.d.ts +754 -0
  184. package/build/src/library/model-tools.js +362 -0
  185. package/build/src/library/outcome.js +5 -6
  186. package/build/src/library/refusal.d.ts +25 -1
  187. package/build/src/library/refusal.js +4 -5
  188. package/build/src/library/selection.d.ts +18 -5
  189. package/build/src/library/selection.js +11 -5
  190. package/build/src/mcp/adapter.d.ts +0 -6
  191. package/build/src/mcp/adapter.js +11 -160
  192. package/build/src/mcp/description.d.ts +2 -0
  193. package/build/src/mcp/description.js +2 -0
  194. package/build/src/mcp/help.d.ts +1 -1
  195. package/build/src/mcp/help.js +10 -7
  196. package/build/src/pi/index.d.ts +5 -0
  197. package/build/src/pi/index.js +99 -0
  198. package/build/src/pi/status.d.ts +12 -0
  199. package/build/src/pi/status.js +140 -0
  200. package/build/src/protocol/amend.d.ts +14 -3
  201. package/build/src/protocol/amend.js +113 -46
  202. package/build/src/protocol/bind.d.ts +1 -1
  203. package/build/src/protocol/bind.js +5 -16
  204. package/build/src/protocol/completion.d.ts +30 -0
  205. package/build/src/protocol/completion.js +8 -5
  206. package/build/src/protocol/deliver.js +7 -20
  207. package/build/src/protocol/delivery-preview.d.ts +5 -0
  208. package/build/src/protocol/execution-observation.d.ts +8 -0
  209. package/build/src/protocol/intent.d.ts +1 -0
  210. package/build/src/protocol/intent.js +4 -1
  211. package/build/src/protocol/operations.d.ts +56 -16
  212. package/build/src/protocol/operations.js +18 -32
  213. package/build/src/protocol/placement.js +7 -1
  214. package/build/src/protocol/progress.js +0 -6
  215. package/build/src/protocol/read/status.d.ts +52 -4
  216. package/build/src/protocol/read/status.js +26 -22
  217. package/build/src/protocol/reintegrate.js +2 -2
  218. package/build/src/protocol/result-leaves.d.ts +56 -8
  219. package/build/src/protocol/result-leaves.js +11 -2
  220. package/build/src/protocol/run.js +1 -4
  221. package/build/src/protocol/verify.d.ts +10 -0
  222. package/build/src/protocol/verify.js +1 -0
  223. package/build/src/runtime/proc/windows-launch.exe +0 -0
  224. package/build/src/settlement/settle.js +19 -68
  225. package/package.json +7 -3
  226. package/plugins/paseo/plugin/index.server.ts +6 -2
  227. package/plugins/paseo/plugin/server/attach.ts +68 -48
  228. package/plugins/paseo/plugin/server/directory.ts +259 -0
  229. package/plugins/paseo/plugin/server/mirror-identity.ts +3 -32
  230. package/plugins/paseo/plugin/server/reopen.ts +52 -38
  231. package/plugins/pi/README.md +55 -97
  232. package/plugins/pi/keiyaku.ts +1 -142
  233. package/skills/keiyaku-akuma/SKILL.md +18 -11
  234. package/skills/keiyaku-babysit/SKILL.md +8 -6
  235. package/skills/keiyaku-debt/SKILL.md +2 -1
  236. package/skills/keiyaku-workflow/SKILL.md +2 -1
  237. package/build/plugins/pi/akuma-tools.ts +0 -283
  238. package/build/src/body/keys.d.ts +0 -4
  239. package/build/src/body/keys.js +0 -11
  240. package/build/src/kanshi/roster.d.ts +0 -2
  241. package/build/src/kanshi/roster.js +0 -2
  242. package/build/src/mcp/output.d.ts +0 -385
  243. package/build/src/mcp/output.js +0 -193
  244. package/plugins/pi/akuma-tools.ts +0 -283
@@ -1,44 +1,3125 @@
1
+ import { type Owner } from "@astrosheep/square";
2
+ import { type z } from "zod";
1
3
  import { verbs, type VerbName, type VerbInput, type VerbOutput, type VerbRunFor } from "./keiyaku-verbs.js";
4
+ import { type ContractId } from "../core/facts/types.js";
2
5
  import type { BindOutcome } from "./contract-outcomes.js";
6
+ import type { AkumaAlias } from "../identity/selector.js";
3
7
  export { KeiyakuArcDocumentError, KeiyakuUsageError } from "./keiyaku-coordinates.js";
4
- export type KeiyakuAt = Readonly<{
8
+ export type KeiyakuFor = Readonly<{
5
9
  cwd: string;
6
10
  environment: Readonly<Record<string, string | undefined>>;
7
11
  home?: string;
8
12
  repo?: string;
13
+ identity?: Readonly<{
14
+ owner: Owner;
15
+ }>;
9
16
  }>;
10
17
  export declare class Keiyaku {
11
18
  #private;
12
19
  static readonly verbs: typeof verbs;
13
20
  private constructor();
14
- static at(input: KeiyakuAt): Keiyaku;
21
+ static for(input: KeiyakuFor): Keiyaku;
15
22
  run<K extends VerbName>(name: K, input: VerbInput<K>, run?: VerbRunFor<K>): Promise<VerbOutput<K>>;
16
23
  bind(input: VerbInput<"bind">, run?: VerbRunFor<"bind">): Promise<BindOutcome>;
17
- amend(input: VerbInput<"amend">, run?: VerbRunFor<"amend">): Promise<VerbOutput<"amend">>;
18
- arc(input: VerbInput<"arc">, run?: VerbRunFor<"arc">): Promise<VerbOutput<"arc">>;
19
- deliver(input?: VerbInput<"deliver">, run?: VerbRunFor<"deliver">): Promise<VerbOutput<"deliver">>;
20
- verify(input?: VerbInput<"verify">, run?: VerbRunFor<"verify">): Promise<VerbOutput<"verify">>;
21
- review(input: VerbInput<"review">, run?: VerbRunFor<"review">): Promise<VerbOutput<"review">>;
22
- abandon(input?: VerbInput<"abandon">, run?: VerbRunFor<"abandon">): Promise<VerbOutput<"abandon">>;
23
- show(input?: VerbInput<"show">, run?: VerbRunFor<"show">): Promise<VerbOutput<"show">>;
24
- reconcile(input?: VerbInput<"reconcile">, run?: VerbRunFor<"reconcile">): Promise<VerbOutput<"reconcile">>;
25
- spawn(input: VerbInput<"spawn">, run?: VerbRunFor<"spawn">): Promise<VerbOutput<"spawn">>;
26
- fork(input: VerbInput<"fork">, run?: VerbRunFor<"fork">): Promise<VerbOutput<"fork">>;
27
- tell(input: VerbInput<"tell">, run?: VerbRunFor<"tell">): Promise<VerbOutput<"tell">>;
28
- ask(input: VerbInput<"ask">, run?: VerbRunFor<"ask">): Promise<VerbOutput<"ask">>;
29
- kill(input: VerbInput<"kill">, run?: VerbRunFor<"kill">): Promise<VerbOutput<"kill">>;
30
- wait(input: VerbInput<"wait">, run?: VerbRunFor<"wait">): Promise<VerbOutput<"wait">>;
31
- history(input: VerbInput<"history">, run?: VerbRunFor<"history">): Promise<VerbOutput<"history">>;
32
- report(input: VerbInput<"report">, run?: VerbRunFor<"report">): Promise<VerbOutput<"report">>;
33
- ls(input: VerbInput<"ls">, run?: VerbRunFor<"ls">): Promise<VerbOutput<"ls">>;
34
- debtAdd(input: VerbInput<"debt.add">, run?: VerbRunFor<"debt.add">): Promise<VerbOutput<"debt.add">>;
35
- debtAddDocument(input: VerbInput<"debt.addDocument">, run?: VerbRunFor<"debt.addDocument">): Promise<VerbOutput<"debt.addDocument">>;
36
- debtUpdate(input: VerbInput<"debt.update">, run?: VerbRunFor<"debt.update">): Promise<VerbOutput<"debt.update">>;
37
- debtDoctor(input?: VerbInput<"debt.doctor">, run?: VerbRunFor<"debt.doctor">): Promise<VerbOutput<"debt.doctor">>;
38
- kanshi(input?: VerbInput<"kanshi">, run?: VerbRunFor<"kanshi">): Promise<VerbOutput<"kanshi">>;
39
- status(input: VerbInput<"status">, run?: VerbRunFor<"status">): Promise<VerbOutput<"status">>;
40
- region(input?: VerbInput<"region">, run?: VerbRunFor<"region">): Promise<VerbOutput<"region">>;
41
- whoami(input?: VerbInput<"whoami">, run?: VerbRunFor<"whoami">): Promise<VerbOutput<"whoami">>;
42
- settings(input?: VerbInput<"settings">, run?: VerbRunFor<"settings">): Promise<VerbOutput<"settings">>;
43
- nuke(input?: VerbInput<"nuke">, run?: VerbRunFor<"nuke">): Promise<VerbOutput<"nuke">>;
24
+ amend: (input?: Readonly<{
25
+ edits?: string;
26
+ after?: readonly string[];
27
+ gates?: readonly string[];
28
+ target?: string;
29
+ contract?: string;
30
+ }> | undefined, run?: VerbRunFor<"amend"> | undefined) => Promise<Readonly<{
31
+ kind: "accepted";
32
+ contractId: ContractId;
33
+ issues?: readonly (Readonly<{
34
+ kind: "worktree-retained";
35
+ path: string;
36
+ severity: "optional" | "required";
37
+ diagnostic?: string;
38
+ contractId?: ContractId;
39
+ }> | Readonly<{
40
+ kind: "worktree-hook-failed";
41
+ phase: "create" | "destroy";
42
+ path: string;
43
+ name: string;
44
+ diagnostic: string;
45
+ severity: "optional" | "required";
46
+ contractId?: ContractId;
47
+ }> | Readonly<{
48
+ kind: "reconcile-failed";
49
+ diagnostic: string;
50
+ severity: "optional" | "required";
51
+ contractId?: ContractId;
52
+ }> | Readonly<{
53
+ kind: "target-workspace-retained";
54
+ targetContractId: ContractId;
55
+ reason: "unappointed" | "missing" | "association" | "replaced" | "attached" | "uncommitted" | "operation";
56
+ severity: "optional" | "required";
57
+ contractId?: ContractId;
58
+ }> | Readonly<{
59
+ kind: "target-checkout-retained";
60
+ path: string;
61
+ target: string;
62
+ diagnostic: string;
63
+ severity: "optional" | "required";
64
+ contractId?: ContractId;
65
+ }> | Readonly<{
66
+ kind: "unsealed-bytes";
67
+ path: string;
68
+ severity: "optional" | "required";
69
+ contractId?: ContractId;
70
+ }> | Readonly<{
71
+ kind: "contract-file-failed";
72
+ path: string;
73
+ diagnostic: string;
74
+ severity: "optional" | "required";
75
+ contractId?: ContractId;
76
+ }> | Readonly<{
77
+ kind: "diagnostic";
78
+ severity: "optional" | "required";
79
+ diagnostic: string;
80
+ snapshot?: import("../core/facts/types.js").SnapshotId;
81
+ requirement?: string;
82
+ index?: number;
83
+ name?: string;
84
+ path?: string;
85
+ contractId?: ContractId;
86
+ }> | Readonly<{
87
+ kind: "execution-stopped";
88
+ reason: "failed" | "cancelled";
89
+ diagnostic: string;
90
+ severity: "required";
91
+ contractId?: ContractId;
92
+ }> | Readonly<{
93
+ kind: "settlement-failed";
94
+ severity: "required";
95
+ diagnostic: string;
96
+ debtId?: string;
97
+ contractId?: ContractId;
98
+ }>)[];
99
+ recoverySnapshots?: readonly Readonly<{
100
+ snapshot: import("../core/facts/types.js").SnapshotId;
101
+ contractId?: ContractId;
102
+ }>[] & readonly import("../core/facts/types.js").SnapshotId[];
103
+ overlaps?: readonly Readonly<{
104
+ contractId: ContractId;
105
+ patterns: readonly Readonly<{
106
+ mine: string;
107
+ theirs: string;
108
+ relation?: "mine-within-theirs" | "theirs-within-mine" | "intersect";
109
+ }>[];
110
+ }>[];
111
+ overlapError?: string;
112
+ target?: string;
113
+ changedSections?: readonly string[];
114
+ gatesChanged?: true;
115
+ afterChanged?: true;
116
+ }> | Readonly<{
117
+ kind: "refused";
118
+ contractId: ContractId;
119
+ reason: Readonly<{
120
+ kind: "target-contract-missing" | "target-contract-terminal";
121
+ targetContractId: ContractId;
122
+ }> | Readonly<{
123
+ kind: "target-workspace-unavailable";
124
+ targetContractId: ContractId;
125
+ reason: "unappointed" | "missing" | "association" | "replaced" | "attached" | "uncommitted" | "operation";
126
+ }> | Readonly<{
127
+ kind: "verification-declaration-invalid";
128
+ }> | Readonly<{
129
+ kind: "contract-missing" | "terminal" | "unknown-prerequisite" | "terms-moved" | "cyclic-prerequisite" | "cyclic-target";
130
+ }> | Readonly<{
131
+ kind: "target-missing" | "invalid-target";
132
+ }>;
133
+ }> | Readonly<{
134
+ kind: "retry";
135
+ reason: "exhausted" | "collision";
136
+ contractId: ContractId;
137
+ }> | Readonly<{
138
+ kind: "retry";
139
+ reason: "publication-failed";
140
+ diagnostic: string;
141
+ contractId: ContractId;
142
+ }>>;
143
+ arc: (input: Readonly<{
144
+ body: string;
145
+ contract?: string;
146
+ }>, run?: VerbRunFor<"arc"> | undefined) => Promise<Readonly<{
147
+ kind: "accepted";
148
+ contractId: ContractId;
149
+ chapter: number;
150
+ issues?: readonly (Readonly<{
151
+ kind: "worktree-retained";
152
+ path: string;
153
+ severity: "optional" | "required";
154
+ diagnostic?: string;
155
+ contractId?: ContractId;
156
+ }> | Readonly<{
157
+ kind: "worktree-hook-failed";
158
+ phase: "create" | "destroy";
159
+ path: string;
160
+ name: string;
161
+ diagnostic: string;
162
+ severity: "optional" | "required";
163
+ contractId?: ContractId;
164
+ }> | Readonly<{
165
+ kind: "reconcile-failed";
166
+ diagnostic: string;
167
+ severity: "optional" | "required";
168
+ contractId?: ContractId;
169
+ }> | Readonly<{
170
+ kind: "target-workspace-retained";
171
+ targetContractId: ContractId;
172
+ reason: "unappointed" | "missing" | "association" | "replaced" | "attached" | "uncommitted" | "operation";
173
+ severity: "optional" | "required";
174
+ contractId?: ContractId;
175
+ }> | Readonly<{
176
+ kind: "target-checkout-retained";
177
+ path: string;
178
+ target: string;
179
+ diagnostic: string;
180
+ severity: "optional" | "required";
181
+ contractId?: ContractId;
182
+ }> | Readonly<{
183
+ kind: "unsealed-bytes";
184
+ path: string;
185
+ severity: "optional" | "required";
186
+ contractId?: ContractId;
187
+ }> | Readonly<{
188
+ kind: "contract-file-failed";
189
+ path: string;
190
+ diagnostic: string;
191
+ severity: "optional" | "required";
192
+ contractId?: ContractId;
193
+ }> | Readonly<{
194
+ kind: "diagnostic";
195
+ severity: "optional" | "required";
196
+ diagnostic: string;
197
+ snapshot?: import("../core/facts/types.js").SnapshotId;
198
+ requirement?: string;
199
+ index?: number;
200
+ name?: string;
201
+ path?: string;
202
+ contractId?: ContractId;
203
+ }> | Readonly<{
204
+ kind: "execution-stopped";
205
+ reason: "failed" | "cancelled";
206
+ diagnostic: string;
207
+ severity: "required";
208
+ contractId?: ContractId;
209
+ }> | Readonly<{
210
+ kind: "settlement-failed";
211
+ severity: "required";
212
+ diagnostic: string;
213
+ debtId?: string;
214
+ contractId?: ContractId;
215
+ }>)[];
216
+ recoverySnapshots?: readonly Readonly<{
217
+ snapshot: import("../core/facts/types.js").SnapshotId;
218
+ contractId?: ContractId;
219
+ }>[] & readonly import("../core/facts/types.js").SnapshotId[];
220
+ }> | Readonly<{
221
+ kind: "refused";
222
+ contractId: ContractId;
223
+ reason: Readonly<{
224
+ kind: "contract-missing" | "terminal";
225
+ }>;
226
+ }> | Readonly<{
227
+ kind: "retry";
228
+ reason: "exhausted" | "collision";
229
+ contractId: ContractId;
230
+ }> | Readonly<{
231
+ kind: "retry";
232
+ reason: "publication-failed";
233
+ diagnostic: string;
234
+ contractId: ContractId;
235
+ }>>;
236
+ deliver: (input?: Readonly<{
237
+ dryRun: true;
238
+ includeDirty?: boolean;
239
+ showDiff?: boolean;
240
+ contract?: string;
241
+ }> | Readonly<{
242
+ dryRun?: false;
243
+ message?: string;
244
+ includeDirty?: boolean;
245
+ materializeConflict?: boolean;
246
+ overwrite?: boolean;
247
+ contract?: string;
248
+ }> | undefined, run?: VerbRunFor<"deliver"> | undefined) => Promise<Readonly<{
249
+ kind: "accepted";
250
+ contractId: ContractId;
251
+ candidate: import("../core/facts/types.js").SnapshotId;
252
+ integration: import("../core/facts/types.js").SnapshotId;
253
+ contentId: import("../core/facts/types.js").ChangeId;
254
+ issues?: readonly (Readonly<{
255
+ kind: "worktree-retained";
256
+ path: string;
257
+ severity: "optional" | "required";
258
+ diagnostic?: string;
259
+ contractId?: ContractId;
260
+ }> | Readonly<{
261
+ kind: "worktree-hook-failed";
262
+ phase: "create" | "destroy";
263
+ path: string;
264
+ name: string;
265
+ diagnostic: string;
266
+ severity: "optional" | "required";
267
+ contractId?: ContractId;
268
+ }> | Readonly<{
269
+ kind: "reconcile-failed";
270
+ diagnostic: string;
271
+ severity: "optional" | "required";
272
+ contractId?: ContractId;
273
+ }> | Readonly<{
274
+ kind: "target-workspace-retained";
275
+ targetContractId: ContractId;
276
+ reason: "unappointed" | "missing" | "association" | "replaced" | "attached" | "uncommitted" | "operation";
277
+ severity: "optional" | "required";
278
+ contractId?: ContractId;
279
+ }> | Readonly<{
280
+ kind: "target-checkout-retained";
281
+ path: string;
282
+ target: string;
283
+ diagnostic: string;
284
+ severity: "optional" | "required";
285
+ contractId?: ContractId;
286
+ }> | Readonly<{
287
+ kind: "unsealed-bytes";
288
+ path: string;
289
+ severity: "optional" | "required";
290
+ contractId?: ContractId;
291
+ }> | Readonly<{
292
+ kind: "worktree-follow-retained";
293
+ path: string;
294
+ reason: "head-moved" | "head-attached" | "operation-in-progress";
295
+ severity: "optional" | "required";
296
+ contractId?: ContractId;
297
+ }> | Readonly<{
298
+ kind: "contract-file-failed";
299
+ path: string;
300
+ diagnostic: string;
301
+ severity: "optional" | "required";
302
+ contractId?: ContractId;
303
+ }> | Readonly<{
304
+ kind: "diagnostic";
305
+ severity: "optional" | "required";
306
+ diagnostic: string;
307
+ snapshot?: import("../core/facts/types.js").SnapshotId;
308
+ requirement?: string;
309
+ index?: number;
310
+ name?: string;
311
+ path?: string;
312
+ contractId?: ContractId;
313
+ }> | Readonly<{
314
+ kind: "execution-stopped";
315
+ reason: "failed" | "cancelled";
316
+ diagnostic: string;
317
+ severity: "required";
318
+ contractId?: ContractId;
319
+ }> | Readonly<{
320
+ kind: "settlement-failed";
321
+ severity: "required";
322
+ diagnostic: string;
323
+ debtId?: string;
324
+ contractId?: ContractId;
325
+ }>)[];
326
+ recoverySnapshots?: readonly Readonly<{
327
+ snapshot: import("../core/facts/types.js").SnapshotId;
328
+ contractId?: ContractId;
329
+ }>[];
330
+ admission?: "reused";
331
+ previousContentId?: import("../core/facts/types.js").ChangeId;
332
+ placement?: Readonly<{
333
+ kind: "delivery-missing";
334
+ }> | Readonly<{
335
+ kind: "prerequisites-unsatisfied";
336
+ unmet: readonly Readonly<{
337
+ contractId: ContractId;
338
+ state: "missing" | "abandoned" | "active";
339
+ }>[];
340
+ }> | Readonly<{
341
+ kind: "gates-unsatisfied";
342
+ unmet: readonly (Readonly<{
343
+ state: "missing";
344
+ gate: string;
345
+ requirement: import("../core/facts/types.js").RequirementId;
346
+ }> | Readonly<{
347
+ state: "unsatisfied";
348
+ gate: string;
349
+ requirement: import("../core/facts/types.js").RequirementId;
350
+ summary?: string;
351
+ }> | Readonly<{
352
+ state: "stale";
353
+ gate: string;
354
+ requirement: import("../core/facts/types.js").RequirementId;
355
+ reason?: Readonly<{
356
+ kind: "snapshot-changed";
357
+ previousSnapshot: import("../core/facts/types.js").SnapshotId;
358
+ currentSnapshot: import("../core/facts/types.js").SnapshotId;
359
+ }>;
360
+ previousContentId?: string;
361
+ currentContentId?: string;
362
+ }>)[];
363
+ }> | Readonly<{
364
+ kind: "not-based-on-target" | "unrelated-histories";
365
+ targetHead: import("../core/facts/types.js").SnapshotId;
366
+ }> | Readonly<{
367
+ kind: "integration-conflict";
368
+ targetHead: import("../core/facts/types.js").SnapshotId;
369
+ conflictPaths: readonly string[];
370
+ }> | Readonly<{
371
+ kind: "integration-unsupported";
372
+ }> | Readonly<{
373
+ kind: "contract-missing" | "terminal";
374
+ }> | Readonly<{
375
+ kind: "target-contract-missing" | "target-contract-terminal";
376
+ targetContractId: ContractId;
377
+ }> | Readonly<{
378
+ kind: "target-workspace-unavailable";
379
+ targetContractId: ContractId;
380
+ reason: "unappointed" | "missing" | "association" | "replaced" | "attached" | "uncommitted" | "operation";
381
+ }> | Readonly<{
382
+ kind: "target-missing";
383
+ }> | Readonly<{
384
+ kind: "checkout-not-followable";
385
+ target: string;
386
+ path: string;
387
+ paths: readonly string[];
388
+ }> | Readonly<{
389
+ kind: "retry";
390
+ reason: "exhausted" | "collision";
391
+ }> | Readonly<{
392
+ kind: "retry";
393
+ reason: "publication-failed";
394
+ diagnostic: string;
395
+ }> | Readonly<{
396
+ kind: "physical-lag";
397
+ }> | Readonly<{
398
+ kind: "execution-stopped";
399
+ reason: "failed" | "cancelled";
400
+ diagnostic: string;
401
+ }> | Readonly<{
402
+ kind: "failed";
403
+ diagnostic: string;
404
+ }> | Readonly<{
405
+ kind: "target-content-identical";
406
+ target: string;
407
+ expected: import("../core/facts/types.js").SnapshotId;
408
+ observed: import("../core/facts/types.js").SnapshotId;
409
+ }> | Readonly<{
410
+ kind: "target-moved";
411
+ target: string;
412
+ integration: import("../core/facts/types.js").SnapshotId;
413
+ observed: import("../core/facts/types.js").SnapshotId | null;
414
+ }> | Readonly<{
415
+ kind: "placed";
416
+ target?: string;
417
+ predecessor?: import("../core/facts/types.js").SnapshotId;
418
+ }>;
419
+ continuation?: Readonly<{
420
+ claimed?: readonly ContractId[];
421
+ stopped?: readonly Readonly<{
422
+ contractId: ContractId;
423
+ stop: Readonly<{
424
+ kind: "delivery-missing";
425
+ }> | Readonly<{
426
+ kind: "prerequisites-unsatisfied";
427
+ unmet: readonly Readonly<{
428
+ contractId: ContractId;
429
+ state: "missing" | "abandoned" | "active";
430
+ }>[];
431
+ }> | Readonly<{
432
+ kind: "gates-unsatisfied";
433
+ unmet: readonly (Readonly<{
434
+ state: "missing";
435
+ gate: string;
436
+ requirement: import("../core/facts/types.js").RequirementId;
437
+ }> | Readonly<{
438
+ state: "unsatisfied";
439
+ gate: string;
440
+ requirement: import("../core/facts/types.js").RequirementId;
441
+ summary?: string;
442
+ }> | Readonly<{
443
+ state: "stale";
444
+ gate: string;
445
+ requirement: import("../core/facts/types.js").RequirementId;
446
+ reason?: Readonly<{
447
+ kind: "snapshot-changed";
448
+ previousSnapshot: import("../core/facts/types.js").SnapshotId;
449
+ currentSnapshot: import("../core/facts/types.js").SnapshotId;
450
+ }>;
451
+ previousContentId?: string;
452
+ currentContentId?: string;
453
+ }>)[];
454
+ }> | Readonly<{
455
+ kind: "not-based-on-target" | "unrelated-histories";
456
+ targetHead: import("../core/facts/types.js").SnapshotId;
457
+ }> | Readonly<{
458
+ kind: "integration-conflict";
459
+ targetHead: import("../core/facts/types.js").SnapshotId;
460
+ conflictPaths: readonly string[];
461
+ }> | Readonly<{
462
+ kind: "integration-unsupported";
463
+ }> | Readonly<{
464
+ kind: "contract-missing" | "terminal";
465
+ }> | Readonly<{
466
+ kind: "target-contract-missing" | "target-contract-terminal";
467
+ targetContractId: ContractId;
468
+ }> | Readonly<{
469
+ kind: "target-workspace-unavailable";
470
+ targetContractId: ContractId;
471
+ reason: "unappointed" | "missing" | "association" | "replaced" | "attached" | "uncommitted" | "operation";
472
+ }> | Readonly<{
473
+ kind: "target-missing";
474
+ }> | Readonly<{
475
+ kind: "checkout-not-followable";
476
+ target: string;
477
+ path: string;
478
+ paths: readonly string[];
479
+ }> | Readonly<{
480
+ kind: "retry";
481
+ reason: "exhausted" | "collision";
482
+ }> | Readonly<{
483
+ kind: "retry";
484
+ reason: "publication-failed";
485
+ diagnostic: string;
486
+ }> | Readonly<{
487
+ kind: "physical-lag";
488
+ }> | Readonly<{
489
+ kind: "execution-stopped";
490
+ reason: "failed" | "cancelled";
491
+ diagnostic: string;
492
+ }> | Readonly<{
493
+ kind: "failed";
494
+ diagnostic: string;
495
+ }> | Readonly<{
496
+ kind: "target-content-identical";
497
+ target: string;
498
+ expected: import("../core/facts/types.js").SnapshotId;
499
+ observed: import("../core/facts/types.js").SnapshotId;
500
+ }> | Readonly<{
501
+ kind: "target-moved";
502
+ target: string;
503
+ integration: import("../core/facts/types.js").SnapshotId;
504
+ observed: import("../core/facts/types.js").SnapshotId | null;
505
+ }>;
506
+ }>[];
507
+ }>;
508
+ }> | Readonly<{
509
+ kind: "refused";
510
+ contractId: ContractId;
511
+ reason: Readonly<{
512
+ kind: "not-based-on-target" | "unrelated-histories";
513
+ targetHead: import("../core/facts/types.js").SnapshotId;
514
+ }> | Readonly<{
515
+ kind: "integration-conflict";
516
+ targetHead: import("../core/facts/types.js").SnapshotId;
517
+ conflictPaths: readonly string[];
518
+ }> | Readonly<{
519
+ kind: "integration-unsupported";
520
+ }> | Readonly<{
521
+ kind: "contract-missing" | "terminal";
522
+ }> | Readonly<{
523
+ kind: "target-contract-missing" | "target-contract-terminal";
524
+ targetContractId: ContractId;
525
+ }> | Readonly<{
526
+ kind: "target-workspace-unavailable";
527
+ targetContractId: ContractId;
528
+ reason: "unappointed" | "missing" | "association" | "replaced" | "attached" | "uncommitted" | "operation";
529
+ }> | Readonly<{
530
+ kind: "verification-declaration-invalid";
531
+ }> | Readonly<{
532
+ kind: "target-missing" | "worktree-missing";
533
+ }> | Readonly<{
534
+ kind: "dirty-workspace";
535
+ paths?: readonly string[];
536
+ submodules?: readonly string[];
537
+ }> | Readonly<{
538
+ kind: "merge-state-present";
539
+ worktreePath: string;
540
+ }>;
541
+ }> | Readonly<{
542
+ kind: "retry";
543
+ reason: "exhausted" | "collision";
544
+ contractId: ContractId;
545
+ }> | Readonly<{
546
+ kind: "retry";
547
+ reason: "publication-failed";
548
+ diagnostic: string;
549
+ contractId: ContractId;
550
+ }> | Readonly<{
551
+ kind: "handoff";
552
+ contractId: ContractId;
553
+ worktreePath: string;
554
+ targetHead: import("../core/facts/types.js").SnapshotId;
555
+ conflictPaths: readonly string[];
556
+ handoffBase: import("../core/facts/types.js").SnapshotId;
557
+ }> | Readonly<{
558
+ kind: "ready";
559
+ contractId: ContractId;
560
+ candidate: import("../core/facts/types.js").SnapshotId;
561
+ integration: import("../core/facts/types.js").SnapshotId;
562
+ contentId: import("../core/facts/types.js").ChangeId;
563
+ scope: Readonly<{
564
+ filesChanged?: number;
565
+ insertions?: number;
566
+ deletions?: number;
567
+ paths?: readonly string[];
568
+ }>;
569
+ diff?: Readonly<{
570
+ kind: "present";
571
+ text: string;
572
+ }> | Readonly<{
573
+ kind: "unavailable";
574
+ }>;
575
+ unmetGates?: readonly (Readonly<{
576
+ state: "missing";
577
+ gate: string;
578
+ requirement: import("../core/facts/types.js").RequirementId;
579
+ }> | Readonly<{
580
+ state: "unsatisfied";
581
+ gate: string;
582
+ requirement: import("../core/facts/types.js").RequirementId;
583
+ summary?: string;
584
+ }> | Readonly<{
585
+ state: "stale";
586
+ gate: string;
587
+ requirement: import("../core/facts/types.js").RequirementId;
588
+ reason?: Readonly<{
589
+ kind: "snapshot-changed";
590
+ previousSnapshot: import("../core/facts/types.js").SnapshotId;
591
+ currentSnapshot: import("../core/facts/types.js").SnapshotId;
592
+ }>;
593
+ previousContentId?: string;
594
+ currentContentId?: string;
595
+ }>)[];
596
+ unmetPrerequisites?: readonly Readonly<{
597
+ contractId: ContractId;
598
+ state: "missing" | "abandoned" | "active";
599
+ }>[];
600
+ target?: Readonly<{
601
+ kind: "moved";
602
+ ref: string;
603
+ expected: import("../core/facts/types.js").SnapshotId;
604
+ observed: import("../core/facts/types.js").SnapshotId | null;
605
+ }> | Readonly<{
606
+ kind: "failed";
607
+ diagnostic: string;
608
+ }> | Readonly<{
609
+ kind: "placeable";
610
+ ref: string;
611
+ head: import("../core/facts/types.js").SnapshotId;
612
+ behind?: number | "unknown";
613
+ checkouts?: readonly Readonly<{
614
+ path: string;
615
+ diagnostic: string;
616
+ }>[];
617
+ }> | Readonly<{
618
+ kind: "refused";
619
+ reason: Readonly<{
620
+ kind: "target-workspace-unavailable";
621
+ targetContractId: ContractId;
622
+ reason: "unappointed" | "missing" | "association" | "replaced" | "attached" | "uncommitted" | "operation";
623
+ }> | Readonly<{
624
+ kind: "checkout-not-followable";
625
+ target: string;
626
+ path: string;
627
+ paths: readonly string[];
628
+ }>;
629
+ }>;
630
+ previousContentId?: import("../core/facts/types.js").ChangeId;
631
+ issues?: readonly Readonly<{
632
+ kind: "diagnostic";
633
+ diagnostic: string;
634
+ severity: "optional" | "required";
635
+ snapshot?: import("../core/facts/types.js").SnapshotId;
636
+ path?: string;
637
+ name?: string;
638
+ requirement?: string;
639
+ index?: number;
640
+ }>[];
641
+ }> | Readonly<{
642
+ kind: "blocked";
643
+ contractId: ContractId;
644
+ reason: Readonly<{
645
+ kind: "not-based-on-target" | "unrelated-histories";
646
+ targetHead: import("../core/facts/types.js").SnapshotId;
647
+ }> | Readonly<{
648
+ kind: "integration-conflict";
649
+ targetHead: import("../core/facts/types.js").SnapshotId;
650
+ conflictPaths: readonly string[];
651
+ }> | Readonly<{
652
+ kind: "integration-unsupported";
653
+ }> | Readonly<{
654
+ kind: "target-workspace-unavailable";
655
+ targetContractId: ContractId;
656
+ reason: "unappointed" | "missing" | "association" | "replaced" | "attached" | "uncommitted" | "operation";
657
+ }> | Readonly<{
658
+ kind: "target-missing" | "worktree-missing";
659
+ }> | Readonly<{
660
+ kind: "dirty-workspace";
661
+ paths?: readonly string[];
662
+ submodules?: readonly string[];
663
+ }>;
664
+ issues?: readonly Readonly<{
665
+ kind: "diagnostic";
666
+ diagnostic: string;
667
+ severity: "optional" | "required";
668
+ snapshot?: import("../core/facts/types.js").SnapshotId;
669
+ path?: string;
670
+ name?: string;
671
+ requirement?: string;
672
+ index?: number;
673
+ }>[];
674
+ }> | Readonly<{
675
+ kind: "refused";
676
+ contractId: ContractId;
677
+ reason: Readonly<{
678
+ kind: "contract-missing" | "terminal";
679
+ }> | Readonly<{
680
+ kind: "target-contract-missing" | "target-contract-terminal";
681
+ targetContractId: ContractId;
682
+ }> | Readonly<{
683
+ kind: "verification-declaration-invalid";
684
+ }>;
685
+ }>>;
686
+ verify: (input?: Readonly<{
687
+ index?: number;
688
+ includeDirty?: boolean;
689
+ contract?: string;
690
+ }> | undefined, run?: VerbRunFor<"verify"> | undefined) => Promise<Readonly<{
691
+ kind: "accepted";
692
+ contractId: ContractId;
693
+ snapshot: import("../core/facts/types.js").SnapshotId;
694
+ checks: readonly (Readonly<{
695
+ verdict: "satisfied";
696
+ kind: "terminal";
697
+ admission: "admitted" | "reused" | Readonly<{
698
+ kind: "retry";
699
+ reason: "exhausted" | "collision";
700
+ }> | Readonly<{
701
+ kind: "retry";
702
+ reason: "publication-failed";
703
+ diagnostic: string;
704
+ }> | "unrecorded" | Readonly<{
705
+ kind: "refused";
706
+ reason: Readonly<{
707
+ kind: "contract-missing" | "terminal";
708
+ }>;
709
+ }> | Readonly<{
710
+ kind: "cancelled";
711
+ }>;
712
+ index: number;
713
+ requirement: string;
714
+ retainedPath?: string;
715
+ }> | Readonly<{
716
+ verdict: "unsatisfied";
717
+ summary: string;
718
+ kind: "terminal";
719
+ admission: "admitted" | "reused" | Readonly<{
720
+ kind: "retry";
721
+ reason: "exhausted" | "collision";
722
+ }> | Readonly<{
723
+ kind: "retry";
724
+ reason: "publication-failed";
725
+ diagnostic: string;
726
+ }> | "unrecorded" | Readonly<{
727
+ kind: "refused";
728
+ reason: Readonly<{
729
+ kind: "contract-missing" | "terminal";
730
+ }>;
731
+ }> | Readonly<{
732
+ kind: "cancelled";
733
+ }>;
734
+ index: number;
735
+ requirement: string;
736
+ retainedPath?: string;
737
+ }> | Readonly<{
738
+ kind: "stopped";
739
+ stop: Readonly<{
740
+ kind: "cancelled" | "unknown-exit";
741
+ diagnostic?: string;
742
+ }> | Readonly<{
743
+ kind: "candidate-unavailable" | "spawn-error" | "environment-failure";
744
+ diagnostic: string;
745
+ }> | Readonly<{
746
+ kind: "environment-hook-failure";
747
+ name: string;
748
+ diagnostic: string;
749
+ }>;
750
+ index: number;
751
+ requirement: string;
752
+ retainedPath?: string;
753
+ }>)[];
754
+ issues?: readonly (Readonly<{
755
+ kind: "worktree-retained";
756
+ path: string;
757
+ severity: "optional" | "required";
758
+ diagnostic?: string;
759
+ contractId?: ContractId;
760
+ }> | Readonly<{
761
+ kind: "worktree-hook-failed";
762
+ phase: "create" | "destroy";
763
+ path: string;
764
+ name: string;
765
+ diagnostic: string;
766
+ severity: "optional" | "required";
767
+ contractId?: ContractId;
768
+ }> | Readonly<{
769
+ kind: "reconcile-failed";
770
+ diagnostic: string;
771
+ severity: "optional" | "required";
772
+ contractId?: ContractId;
773
+ }> | Readonly<{
774
+ kind: "target-workspace-retained";
775
+ targetContractId: ContractId;
776
+ reason: "unappointed" | "missing" | "association" | "replaced" | "attached" | "uncommitted" | "operation";
777
+ severity: "optional" | "required";
778
+ contractId?: ContractId;
779
+ }> | Readonly<{
780
+ kind: "target-checkout-retained";
781
+ path: string;
782
+ target: string;
783
+ diagnostic: string;
784
+ severity: "optional" | "required";
785
+ contractId?: ContractId;
786
+ }> | Readonly<{
787
+ kind: "unsealed-bytes";
788
+ path: string;
789
+ severity: "optional" | "required";
790
+ contractId?: ContractId;
791
+ }> | Readonly<{
792
+ kind: "worktree-follow-retained";
793
+ path: string;
794
+ reason: "head-moved" | "head-attached" | "operation-in-progress";
795
+ severity: "optional" | "required";
796
+ contractId?: ContractId;
797
+ }> | Readonly<{
798
+ kind: "contract-file-failed";
799
+ path: string;
800
+ diagnostic: string;
801
+ severity: "optional" | "required";
802
+ contractId?: ContractId;
803
+ }> | Readonly<{
804
+ kind: "diagnostic";
805
+ severity: "optional" | "required";
806
+ diagnostic: string;
807
+ snapshot?: import("../core/facts/types.js").SnapshotId;
808
+ requirement?: string;
809
+ index?: number;
810
+ name?: string;
811
+ path?: string;
812
+ contractId?: ContractId;
813
+ }> | Readonly<{
814
+ kind: "execution-stopped";
815
+ reason: "failed" | "cancelled";
816
+ diagnostic: string;
817
+ severity: "required";
818
+ contractId?: ContractId;
819
+ }> | Readonly<{
820
+ kind: "settlement-failed";
821
+ severity: "required";
822
+ diagnostic: string;
823
+ debtId?: string;
824
+ contractId?: ContractId;
825
+ }>)[];
826
+ recoverySnapshots?: readonly Readonly<{
827
+ snapshot: import("../core/facts/types.js").SnapshotId;
828
+ contractId?: ContractId;
829
+ }>[];
830
+ continuation?: Readonly<{
831
+ claimed?: readonly ContractId[];
832
+ stopped?: readonly Readonly<{
833
+ contractId: ContractId;
834
+ stop: Readonly<{
835
+ kind: "delivery-missing";
836
+ }> | Readonly<{
837
+ kind: "prerequisites-unsatisfied";
838
+ unmet: readonly Readonly<{
839
+ contractId: ContractId;
840
+ state: "missing" | "abandoned" | "active";
841
+ }>[];
842
+ }> | Readonly<{
843
+ kind: "gates-unsatisfied";
844
+ unmet: readonly (Readonly<{
845
+ state: "missing";
846
+ gate: string;
847
+ requirement: import("../core/facts/types.js").RequirementId;
848
+ }> | Readonly<{
849
+ state: "unsatisfied";
850
+ gate: string;
851
+ requirement: import("../core/facts/types.js").RequirementId;
852
+ summary?: string;
853
+ }> | Readonly<{
854
+ state: "stale";
855
+ gate: string;
856
+ requirement: import("../core/facts/types.js").RequirementId;
857
+ reason?: Readonly<{
858
+ kind: "snapshot-changed";
859
+ previousSnapshot: import("../core/facts/types.js").SnapshotId;
860
+ currentSnapshot: import("../core/facts/types.js").SnapshotId;
861
+ }>;
862
+ previousContentId?: string;
863
+ currentContentId?: string;
864
+ }>)[];
865
+ }> | Readonly<{
866
+ kind: "not-based-on-target" | "unrelated-histories";
867
+ targetHead: import("../core/facts/types.js").SnapshotId;
868
+ }> | Readonly<{
869
+ kind: "integration-conflict";
870
+ targetHead: import("../core/facts/types.js").SnapshotId;
871
+ conflictPaths: readonly string[];
872
+ }> | Readonly<{
873
+ kind: "integration-unsupported";
874
+ }> | Readonly<{
875
+ kind: "contract-missing" | "terminal";
876
+ }> | Readonly<{
877
+ kind: "target-contract-missing" | "target-contract-terminal";
878
+ targetContractId: ContractId;
879
+ }> | Readonly<{
880
+ kind: "target-workspace-unavailable";
881
+ targetContractId: ContractId;
882
+ reason: "unappointed" | "missing" | "association" | "replaced" | "attached" | "uncommitted" | "operation";
883
+ }> | Readonly<{
884
+ kind: "target-missing";
885
+ }> | Readonly<{
886
+ kind: "checkout-not-followable";
887
+ target: string;
888
+ path: string;
889
+ paths: readonly string[];
890
+ }> | Readonly<{
891
+ kind: "retry";
892
+ reason: "exhausted" | "collision";
893
+ }> | Readonly<{
894
+ kind: "retry";
895
+ reason: "publication-failed";
896
+ diagnostic: string;
897
+ }> | Readonly<{
898
+ kind: "physical-lag";
899
+ }> | Readonly<{
900
+ kind: "execution-stopped";
901
+ reason: "failed" | "cancelled";
902
+ diagnostic: string;
903
+ }> | Readonly<{
904
+ kind: "failed";
905
+ diagnostic: string;
906
+ }> | Readonly<{
907
+ kind: "target-content-identical";
908
+ target: string;
909
+ expected: import("../core/facts/types.js").SnapshotId;
910
+ observed: import("../core/facts/types.js").SnapshotId;
911
+ }> | Readonly<{
912
+ kind: "target-moved";
913
+ target: string;
914
+ integration: import("../core/facts/types.js").SnapshotId;
915
+ observed: import("../core/facts/types.js").SnapshotId | null;
916
+ }>;
917
+ }>[];
918
+ }>;
919
+ placement?: Readonly<{
920
+ kind: "delivery-missing";
921
+ }> | Readonly<{
922
+ kind: "prerequisites-unsatisfied";
923
+ unmet: readonly Readonly<{
924
+ contractId: ContractId;
925
+ state: "missing" | "abandoned" | "active";
926
+ }>[];
927
+ }> | Readonly<{
928
+ kind: "gates-unsatisfied";
929
+ unmet: readonly (Readonly<{
930
+ state: "missing";
931
+ gate: string;
932
+ requirement: import("../core/facts/types.js").RequirementId;
933
+ }> | Readonly<{
934
+ state: "unsatisfied";
935
+ gate: string;
936
+ requirement: import("../core/facts/types.js").RequirementId;
937
+ summary?: string;
938
+ }> | Readonly<{
939
+ state: "stale";
940
+ gate: string;
941
+ requirement: import("../core/facts/types.js").RequirementId;
942
+ reason?: Readonly<{
943
+ kind: "snapshot-changed";
944
+ previousSnapshot: import("../core/facts/types.js").SnapshotId;
945
+ currentSnapshot: import("../core/facts/types.js").SnapshotId;
946
+ }>;
947
+ previousContentId?: string;
948
+ currentContentId?: string;
949
+ }>)[];
950
+ }> | Readonly<{
951
+ kind: "not-based-on-target" | "unrelated-histories";
952
+ targetHead: import("../core/facts/types.js").SnapshotId;
953
+ }> | Readonly<{
954
+ kind: "integration-conflict";
955
+ targetHead: import("../core/facts/types.js").SnapshotId;
956
+ conflictPaths: readonly string[];
957
+ }> | Readonly<{
958
+ kind: "integration-unsupported";
959
+ }> | Readonly<{
960
+ kind: "contract-missing" | "terminal";
961
+ }> | Readonly<{
962
+ kind: "target-contract-missing" | "target-contract-terminal";
963
+ targetContractId: ContractId;
964
+ }> | Readonly<{
965
+ kind: "target-workspace-unavailable";
966
+ targetContractId: ContractId;
967
+ reason: "unappointed" | "missing" | "association" | "replaced" | "attached" | "uncommitted" | "operation";
968
+ }> | Readonly<{
969
+ kind: "target-missing";
970
+ }> | Readonly<{
971
+ kind: "checkout-not-followable";
972
+ target: string;
973
+ path: string;
974
+ paths: readonly string[];
975
+ }> | Readonly<{
976
+ kind: "retry";
977
+ reason: "exhausted" | "collision";
978
+ }> | Readonly<{
979
+ kind: "retry";
980
+ reason: "publication-failed";
981
+ diagnostic: string;
982
+ }> | Readonly<{
983
+ kind: "physical-lag";
984
+ }> | Readonly<{
985
+ kind: "execution-stopped";
986
+ reason: "failed" | "cancelled";
987
+ diagnostic: string;
988
+ }> | Readonly<{
989
+ kind: "failed";
990
+ diagnostic: string;
991
+ }> | Readonly<{
992
+ kind: "target-content-identical";
993
+ target: string;
994
+ expected: import("../core/facts/types.js").SnapshotId;
995
+ observed: import("../core/facts/types.js").SnapshotId;
996
+ }> | Readonly<{
997
+ kind: "target-moved";
998
+ target: string;
999
+ integration: import("../core/facts/types.js").SnapshotId;
1000
+ observed: import("../core/facts/types.js").SnapshotId | null;
1001
+ }> | Readonly<{
1002
+ kind: "placed";
1003
+ integration: import("../core/facts/types.js").SnapshotId;
1004
+ target?: string;
1005
+ predecessor?: import("../core/facts/types.js").SnapshotId;
1006
+ }>;
1007
+ }> | Readonly<{
1008
+ kind: "refused";
1009
+ contractId: ContractId;
1010
+ reason: Readonly<{
1011
+ kind: "not-based-on-target" | "unrelated-histories";
1012
+ targetHead: import("../core/facts/types.js").SnapshotId;
1013
+ }> | Readonly<{
1014
+ kind: "integration-conflict";
1015
+ targetHead: import("../core/facts/types.js").SnapshotId;
1016
+ conflictPaths: readonly string[];
1017
+ }> | Readonly<{
1018
+ kind: "integration-unsupported";
1019
+ }> | Readonly<{
1020
+ kind: "contract-missing" | "terminal";
1021
+ }> | Readonly<{
1022
+ kind: "target-contract-missing" | "target-contract-terminal";
1023
+ targetContractId: ContractId;
1024
+ }> | Readonly<{
1025
+ kind: "target-workspace-unavailable";
1026
+ targetContractId: ContractId;
1027
+ reason: "unappointed" | "missing" | "association" | "replaced" | "attached" | "uncommitted" | "operation";
1028
+ }> | Readonly<{
1029
+ kind: "verification-declaration-invalid";
1030
+ }> | Readonly<{
1031
+ kind: "target-missing" | "worktree-missing";
1032
+ }> | Readonly<{
1033
+ kind: "dirty-workspace";
1034
+ paths?: readonly string[];
1035
+ submodules?: readonly string[];
1036
+ }> | Readonly<{
1037
+ kind: "verification-index-out-of-range";
1038
+ total: number;
1039
+ }>;
1040
+ }>>;
1041
+ review: (input: Readonly<{
1042
+ verdict: "satisfied" | "unsatisfied";
1043
+ summary: string;
1044
+ contract?: string;
1045
+ }>, run?: VerbRunFor<"review"> | undefined) => Promise<Readonly<{
1046
+ kind: "accepted";
1047
+ contractId: ContractId;
1048
+ issues?: readonly (Readonly<{
1049
+ kind: "worktree-retained";
1050
+ path: string;
1051
+ severity: "optional" | "required";
1052
+ diagnostic?: string;
1053
+ contractId?: ContractId;
1054
+ }> | Readonly<{
1055
+ kind: "worktree-hook-failed";
1056
+ phase: "create" | "destroy";
1057
+ path: string;
1058
+ name: string;
1059
+ diagnostic: string;
1060
+ severity: "optional" | "required";
1061
+ contractId?: ContractId;
1062
+ }> | Readonly<{
1063
+ kind: "reconcile-failed";
1064
+ diagnostic: string;
1065
+ severity: "optional" | "required";
1066
+ contractId?: ContractId;
1067
+ }> | Readonly<{
1068
+ kind: "target-workspace-retained";
1069
+ targetContractId: ContractId;
1070
+ reason: "unappointed" | "missing" | "association" | "replaced" | "attached" | "uncommitted" | "operation";
1071
+ severity: "optional" | "required";
1072
+ contractId?: ContractId;
1073
+ }> | Readonly<{
1074
+ kind: "target-checkout-retained";
1075
+ path: string;
1076
+ target: string;
1077
+ diagnostic: string;
1078
+ severity: "optional" | "required";
1079
+ contractId?: ContractId;
1080
+ }> | Readonly<{
1081
+ kind: "unsealed-bytes";
1082
+ path: string;
1083
+ severity: "optional" | "required";
1084
+ contractId?: ContractId;
1085
+ }> | Readonly<{
1086
+ kind: "worktree-follow-retained";
1087
+ path: string;
1088
+ reason: "head-moved" | "head-attached" | "operation-in-progress";
1089
+ severity: "optional" | "required";
1090
+ contractId?: ContractId;
1091
+ }> | Readonly<{
1092
+ kind: "contract-file-failed";
1093
+ path: string;
1094
+ diagnostic: string;
1095
+ severity: "optional" | "required";
1096
+ contractId?: ContractId;
1097
+ }> | Readonly<{
1098
+ kind: "diagnostic";
1099
+ severity: "optional" | "required";
1100
+ diagnostic: string;
1101
+ snapshot?: import("../core/facts/types.js").SnapshotId;
1102
+ requirement?: string;
1103
+ index?: number;
1104
+ name?: string;
1105
+ path?: string;
1106
+ contractId?: ContractId;
1107
+ }> | Readonly<{
1108
+ kind: "execution-stopped";
1109
+ reason: "failed" | "cancelled";
1110
+ diagnostic: string;
1111
+ severity: "required";
1112
+ contractId?: ContractId;
1113
+ }> | Readonly<{
1114
+ kind: "settlement-failed";
1115
+ severity: "required";
1116
+ diagnostic: string;
1117
+ debtId?: string;
1118
+ contractId?: ContractId;
1119
+ }>)[];
1120
+ recoverySnapshots?: readonly Readonly<{
1121
+ snapshot: import("../core/facts/types.js").SnapshotId;
1122
+ contractId?: ContractId;
1123
+ }>[];
1124
+ placement?: Readonly<{
1125
+ kind: "delivery-missing";
1126
+ }> | Readonly<{
1127
+ kind: "prerequisites-unsatisfied";
1128
+ unmet: readonly Readonly<{
1129
+ contractId: ContractId;
1130
+ state: "missing" | "abandoned" | "active";
1131
+ }>[];
1132
+ }> | Readonly<{
1133
+ kind: "gates-unsatisfied";
1134
+ unmet: readonly (Readonly<{
1135
+ state: "missing";
1136
+ gate: string;
1137
+ requirement: import("../core/facts/types.js").RequirementId;
1138
+ }> | Readonly<{
1139
+ state: "unsatisfied";
1140
+ gate: string;
1141
+ requirement: import("../core/facts/types.js").RequirementId;
1142
+ summary?: string;
1143
+ }> | Readonly<{
1144
+ state: "stale";
1145
+ gate: string;
1146
+ requirement: import("../core/facts/types.js").RequirementId;
1147
+ reason?: Readonly<{
1148
+ kind: "snapshot-changed";
1149
+ previousSnapshot: import("../core/facts/types.js").SnapshotId;
1150
+ currentSnapshot: import("../core/facts/types.js").SnapshotId;
1151
+ }>;
1152
+ previousContentId?: string;
1153
+ currentContentId?: string;
1154
+ }>)[];
1155
+ }> | Readonly<{
1156
+ kind: "not-based-on-target" | "unrelated-histories";
1157
+ targetHead: import("../core/facts/types.js").SnapshotId;
1158
+ }> | Readonly<{
1159
+ kind: "integration-conflict";
1160
+ targetHead: import("../core/facts/types.js").SnapshotId;
1161
+ conflictPaths: readonly string[];
1162
+ }> | Readonly<{
1163
+ kind: "integration-unsupported";
1164
+ }> | Readonly<{
1165
+ kind: "contract-missing" | "terminal";
1166
+ }> | Readonly<{
1167
+ kind: "target-contract-missing" | "target-contract-terminal";
1168
+ targetContractId: ContractId;
1169
+ }> | Readonly<{
1170
+ kind: "target-workspace-unavailable";
1171
+ targetContractId: ContractId;
1172
+ reason: "unappointed" | "missing" | "association" | "replaced" | "attached" | "uncommitted" | "operation";
1173
+ }> | Readonly<{
1174
+ kind: "target-missing";
1175
+ }> | Readonly<{
1176
+ kind: "checkout-not-followable";
1177
+ target: string;
1178
+ path: string;
1179
+ paths: readonly string[];
1180
+ }> | Readonly<{
1181
+ kind: "retry";
1182
+ reason: "exhausted" | "collision";
1183
+ }> | Readonly<{
1184
+ kind: "retry";
1185
+ reason: "publication-failed";
1186
+ diagnostic: string;
1187
+ }> | Readonly<{
1188
+ kind: "physical-lag";
1189
+ }> | Readonly<{
1190
+ kind: "execution-stopped";
1191
+ reason: "failed" | "cancelled";
1192
+ diagnostic: string;
1193
+ }> | Readonly<{
1194
+ kind: "failed";
1195
+ diagnostic: string;
1196
+ }> | Readonly<{
1197
+ kind: "target-content-identical";
1198
+ target: string;
1199
+ expected: import("../core/facts/types.js").SnapshotId;
1200
+ observed: import("../core/facts/types.js").SnapshotId;
1201
+ }> | Readonly<{
1202
+ kind: "target-moved";
1203
+ target: string;
1204
+ integration: import("../core/facts/types.js").SnapshotId;
1205
+ observed: import("../core/facts/types.js").SnapshotId | null;
1206
+ }> | Readonly<{
1207
+ kind: "placed";
1208
+ integration: import("../core/facts/types.js").SnapshotId;
1209
+ target?: string;
1210
+ predecessor?: import("../core/facts/types.js").SnapshotId;
1211
+ }>;
1212
+ worktreeChanges?: Readonly<{
1213
+ staged?: readonly string[];
1214
+ unstaged?: readonly string[];
1215
+ untracked?: readonly string[];
1216
+ unmergedPaths?: readonly string[];
1217
+ }>;
1218
+ continuation?: Readonly<{
1219
+ claimed?: readonly ContractId[];
1220
+ stopped?: readonly Readonly<{
1221
+ contractId: ContractId;
1222
+ stop: Readonly<{
1223
+ kind: "delivery-missing";
1224
+ }> | Readonly<{
1225
+ kind: "prerequisites-unsatisfied";
1226
+ unmet: readonly Readonly<{
1227
+ contractId: ContractId;
1228
+ state: "missing" | "abandoned" | "active";
1229
+ }>[];
1230
+ }> | Readonly<{
1231
+ kind: "gates-unsatisfied";
1232
+ unmet: readonly (Readonly<{
1233
+ state: "missing";
1234
+ gate: string;
1235
+ requirement: import("../core/facts/types.js").RequirementId;
1236
+ }> | Readonly<{
1237
+ state: "unsatisfied";
1238
+ gate: string;
1239
+ requirement: import("../core/facts/types.js").RequirementId;
1240
+ summary?: string;
1241
+ }> | Readonly<{
1242
+ state: "stale";
1243
+ gate: string;
1244
+ requirement: import("../core/facts/types.js").RequirementId;
1245
+ reason?: Readonly<{
1246
+ kind: "snapshot-changed";
1247
+ previousSnapshot: import("../core/facts/types.js").SnapshotId;
1248
+ currentSnapshot: import("../core/facts/types.js").SnapshotId;
1249
+ }>;
1250
+ previousContentId?: string;
1251
+ currentContentId?: string;
1252
+ }>)[];
1253
+ }> | Readonly<{
1254
+ kind: "not-based-on-target" | "unrelated-histories";
1255
+ targetHead: import("../core/facts/types.js").SnapshotId;
1256
+ }> | Readonly<{
1257
+ kind: "integration-conflict";
1258
+ targetHead: import("../core/facts/types.js").SnapshotId;
1259
+ conflictPaths: readonly string[];
1260
+ }> | Readonly<{
1261
+ kind: "integration-unsupported";
1262
+ }> | Readonly<{
1263
+ kind: "contract-missing" | "terminal";
1264
+ }> | Readonly<{
1265
+ kind: "target-contract-missing" | "target-contract-terminal";
1266
+ targetContractId: ContractId;
1267
+ }> | Readonly<{
1268
+ kind: "target-workspace-unavailable";
1269
+ targetContractId: ContractId;
1270
+ reason: "unappointed" | "missing" | "association" | "replaced" | "attached" | "uncommitted" | "operation";
1271
+ }> | Readonly<{
1272
+ kind: "target-missing";
1273
+ }> | Readonly<{
1274
+ kind: "checkout-not-followable";
1275
+ target: string;
1276
+ path: string;
1277
+ paths: readonly string[];
1278
+ }> | Readonly<{
1279
+ kind: "retry";
1280
+ reason: "exhausted" | "collision";
1281
+ }> | Readonly<{
1282
+ kind: "retry";
1283
+ reason: "publication-failed";
1284
+ diagnostic: string;
1285
+ }> | Readonly<{
1286
+ kind: "physical-lag";
1287
+ }> | Readonly<{
1288
+ kind: "execution-stopped";
1289
+ reason: "failed" | "cancelled";
1290
+ diagnostic: string;
1291
+ }> | Readonly<{
1292
+ kind: "failed";
1293
+ diagnostic: string;
1294
+ }> | Readonly<{
1295
+ kind: "target-content-identical";
1296
+ target: string;
1297
+ expected: import("../core/facts/types.js").SnapshotId;
1298
+ observed: import("../core/facts/types.js").SnapshotId;
1299
+ }> | Readonly<{
1300
+ kind: "target-moved";
1301
+ target: string;
1302
+ integration: import("../core/facts/types.js").SnapshotId;
1303
+ observed: import("../core/facts/types.js").SnapshotId | null;
1304
+ }>;
1305
+ }>[];
1306
+ }>;
1307
+ }> | Readonly<{
1308
+ kind: "refused";
1309
+ contractId: ContractId;
1310
+ reason: Readonly<{
1311
+ kind: "contract-missing" | "terminal";
1312
+ }> | Readonly<{
1313
+ kind: "worktree-missing";
1314
+ }> | Readonly<{
1315
+ kind: "dirty-submodules";
1316
+ paths: readonly string[];
1317
+ }>;
1318
+ }> | Readonly<{
1319
+ kind: "retry";
1320
+ reason: "exhausted" | "collision";
1321
+ contractId: ContractId;
1322
+ }> | Readonly<{
1323
+ kind: "retry";
1324
+ reason: "publication-failed";
1325
+ diagnostic: string;
1326
+ contractId: ContractId;
1327
+ }>>;
1328
+ abandon: (input?: Readonly<{
1329
+ note?: string;
1330
+ contract?: string;
1331
+ }> | undefined, run?: VerbRunFor<"abandon"> | undefined) => Promise<Readonly<{
1332
+ kind: "accepted";
1333
+ contractId: ContractId;
1334
+ issues?: readonly (Readonly<{
1335
+ kind: "worktree-retained";
1336
+ path: string;
1337
+ severity: "optional" | "required";
1338
+ diagnostic?: string;
1339
+ contractId?: ContractId;
1340
+ }> | Readonly<{
1341
+ kind: "worktree-hook-failed";
1342
+ phase: "create" | "destroy";
1343
+ path: string;
1344
+ name: string;
1345
+ diagnostic: string;
1346
+ severity: "optional" | "required";
1347
+ contractId?: ContractId;
1348
+ }> | Readonly<{
1349
+ kind: "reconcile-failed";
1350
+ diagnostic: string;
1351
+ severity: "optional" | "required";
1352
+ contractId?: ContractId;
1353
+ }> | Readonly<{
1354
+ kind: "target-workspace-retained";
1355
+ targetContractId: ContractId;
1356
+ reason: "unappointed" | "missing" | "association" | "replaced" | "attached" | "uncommitted" | "operation";
1357
+ severity: "optional" | "required";
1358
+ contractId?: ContractId;
1359
+ }> | Readonly<{
1360
+ kind: "target-checkout-retained";
1361
+ path: string;
1362
+ target: string;
1363
+ diagnostic: string;
1364
+ severity: "optional" | "required";
1365
+ contractId?: ContractId;
1366
+ }> | Readonly<{
1367
+ kind: "unsealed-bytes";
1368
+ path: string;
1369
+ severity: "optional" | "required";
1370
+ contractId?: ContractId;
1371
+ }> | Readonly<{
1372
+ kind: "contract-file-failed";
1373
+ path: string;
1374
+ diagnostic: string;
1375
+ severity: "optional" | "required";
1376
+ contractId?: ContractId;
1377
+ }> | Readonly<{
1378
+ kind: "diagnostic";
1379
+ severity: "optional" | "required";
1380
+ diagnostic: string;
1381
+ snapshot?: import("../core/facts/types.js").SnapshotId;
1382
+ requirement?: string;
1383
+ index?: number;
1384
+ name?: string;
1385
+ path?: string;
1386
+ contractId?: ContractId;
1387
+ }> | Readonly<{
1388
+ kind: "execution-stopped";
1389
+ reason: "failed" | "cancelled";
1390
+ diagnostic: string;
1391
+ severity: "required";
1392
+ contractId?: ContractId;
1393
+ }> | Readonly<{
1394
+ kind: "settlement-failed";
1395
+ severity: "required";
1396
+ diagnostic: string;
1397
+ debtId?: string;
1398
+ contractId?: ContractId;
1399
+ }>)[];
1400
+ recoverySnapshots?: readonly Readonly<{
1401
+ snapshot: import("../core/facts/types.js").SnapshotId;
1402
+ contractId?: ContractId;
1403
+ }>[] & readonly import("../core/facts/types.js").SnapshotId[];
1404
+ }> | Readonly<{
1405
+ kind: "refused";
1406
+ contractId: ContractId;
1407
+ reason: Readonly<{
1408
+ kind: "contract-missing" | "terminal";
1409
+ }>;
1410
+ }> | Readonly<{
1411
+ kind: "retry";
1412
+ reason: "exhausted" | "collision";
1413
+ contractId: ContractId;
1414
+ }> | Readonly<{
1415
+ kind: "retry";
1416
+ reason: "publication-failed";
1417
+ diagnostic: string;
1418
+ contractId: ContractId;
1419
+ }>>;
1420
+ show: (input: Readonly<{
1421
+ selector: string;
1422
+ }>, run?: VerbRunFor<"show"> | undefined) => Promise<Readonly<{
1423
+ kind: "absent";
1424
+ }> | Readonly<{
1425
+ kind: "debt-complete";
1426
+ items: readonly Readonly<{
1427
+ title: string;
1428
+ state: "open" | "drop" | "done";
1429
+ priority: import("../index.js").DebtPriority;
1430
+ createdAt: string;
1431
+ updatedAt: string;
1432
+ kind: "found";
1433
+ id: `debt/${string}`;
1434
+ body?: string;
1435
+ note?: string;
1436
+ needs?: readonly Readonly<{
1437
+ id: `debt/${string}`;
1438
+ state: "missing" | "open" | "drop" | "done";
1439
+ }>[];
1440
+ }>[];
1441
+ }> | Readonly<{
1442
+ kind: "debt-partial";
1443
+ items: readonly (Readonly<{
1444
+ title: string;
1445
+ state: "open" | "drop" | "done";
1446
+ priority: import("../index.js").DebtPriority;
1447
+ createdAt: string;
1448
+ updatedAt: string;
1449
+ kind: "found";
1450
+ id: `debt/${string}`;
1451
+ body?: string;
1452
+ note?: string;
1453
+ needs?: readonly Readonly<{
1454
+ id: `debt/${string}`;
1455
+ state: "missing" | "open" | "drop" | "done";
1456
+ }>[];
1457
+ }> | Readonly<{
1458
+ kind: "missing";
1459
+ id: `debt/${string}`;
1460
+ }>)[];
1461
+ }> | Readonly<{
1462
+ kind: "debt-missing";
1463
+ items: readonly Readonly<{
1464
+ kind: "missing";
1465
+ id: `debt/${string}`;
1466
+ }>[];
1467
+ }> | Readonly<{
1468
+ kind: "present";
1469
+ guidance: string;
1470
+ }> | Readonly<{
1471
+ kind: "missing";
1472
+ }>>;
1473
+ reconcile: (input?: Readonly<{
1474
+ contract?: string;
1475
+ retryHooks?: boolean;
1476
+ }> | undefined, run?: VerbRunFor<"reconcile"> | undefined) => Promise<Readonly<{
1477
+ contractId: ContractId;
1478
+ kind: "contract";
1479
+ effects?: readonly (Readonly<{
1480
+ kind: "worktree-created" | "worktree-removed";
1481
+ path: string;
1482
+ }> | Readonly<{
1483
+ kind: "recovery-snapshot";
1484
+ snapshot: import("../core/facts/types.js").SnapshotId;
1485
+ }> | Readonly<{
1486
+ kind: "target-checkout";
1487
+ path: string;
1488
+ target: string;
1489
+ }> | Readonly<{
1490
+ kind: "ref";
1491
+ name: string;
1492
+ before: string | null;
1493
+ after: string | null;
1494
+ }> | Readonly<{
1495
+ kind: "debt-settled";
1496
+ debtId: string;
1497
+ }>)[];
1498
+ issues?: readonly (Readonly<{
1499
+ kind: "worktree-retained";
1500
+ path: string;
1501
+ severity: "optional" | "required";
1502
+ diagnostic?: string;
1503
+ contractId?: ContractId;
1504
+ }> | Readonly<{
1505
+ kind: "worktree-hook-failed";
1506
+ phase: "create" | "destroy";
1507
+ path: string;
1508
+ name: string;
1509
+ diagnostic: string;
1510
+ severity: "optional" | "required";
1511
+ contractId?: ContractId;
1512
+ }> | Readonly<{
1513
+ kind: "reconcile-failed";
1514
+ diagnostic: string;
1515
+ severity: "optional" | "required";
1516
+ contractId?: ContractId;
1517
+ }> | Readonly<{
1518
+ kind: "target-workspace-retained";
1519
+ targetContractId: ContractId;
1520
+ reason: "unappointed" | "missing" | "association" | "replaced" | "attached" | "uncommitted" | "operation";
1521
+ severity: "optional" | "required";
1522
+ contractId?: ContractId;
1523
+ }> | Readonly<{
1524
+ kind: "target-checkout-retained";
1525
+ path: string;
1526
+ target: string;
1527
+ diagnostic: string;
1528
+ severity: "optional" | "required";
1529
+ contractId?: ContractId;
1530
+ }> | Readonly<{
1531
+ kind: "unsealed-bytes";
1532
+ path: string;
1533
+ severity: "optional" | "required";
1534
+ contractId?: ContractId;
1535
+ }> | Readonly<{
1536
+ kind: "contract-file-failed";
1537
+ path: string;
1538
+ diagnostic: string;
1539
+ severity: "optional" | "required";
1540
+ contractId?: ContractId;
1541
+ }> | Readonly<{
1542
+ kind: "diagnostic";
1543
+ severity: "optional" | "required";
1544
+ diagnostic: string;
1545
+ snapshot?: import("../core/facts/types.js").SnapshotId;
1546
+ requirement?: string;
1547
+ index?: number;
1548
+ name?: string;
1549
+ path?: string;
1550
+ contractId?: ContractId;
1551
+ }> | Readonly<{
1552
+ kind: "settlement-failed";
1553
+ severity: "required";
1554
+ diagnostic: string;
1555
+ debtId?: string;
1556
+ contractId?: ContractId;
1557
+ }>)[];
1558
+ }> | Readonly<{
1559
+ kind: "missing";
1560
+ contractId: ContractId;
1561
+ }> | Readonly<{
1562
+ kind: "world";
1563
+ contracts?: readonly Readonly<{
1564
+ contractId: ContractId;
1565
+ effects?: readonly (Readonly<{
1566
+ kind: "worktree-created" | "worktree-removed";
1567
+ path: string;
1568
+ }> | Readonly<{
1569
+ kind: "recovery-snapshot";
1570
+ snapshot: import("../core/facts/types.js").SnapshotId;
1571
+ }> | Readonly<{
1572
+ kind: "target-checkout";
1573
+ path: string;
1574
+ target: string;
1575
+ }> | Readonly<{
1576
+ kind: "ref";
1577
+ name: string;
1578
+ before: string | null;
1579
+ after: string | null;
1580
+ }> | Readonly<{
1581
+ kind: "debt-settled";
1582
+ debtId: string;
1583
+ }>)[];
1584
+ issues?: readonly (Readonly<{
1585
+ kind: "worktree-retained";
1586
+ path: string;
1587
+ severity: "optional" | "required";
1588
+ diagnostic?: string;
1589
+ contractId?: ContractId;
1590
+ }> | Readonly<{
1591
+ kind: "worktree-hook-failed";
1592
+ phase: "create" | "destroy";
1593
+ path: string;
1594
+ name: string;
1595
+ diagnostic: string;
1596
+ severity: "optional" | "required";
1597
+ contractId?: ContractId;
1598
+ }> | Readonly<{
1599
+ kind: "reconcile-failed";
1600
+ diagnostic: string;
1601
+ severity: "optional" | "required";
1602
+ contractId?: ContractId;
1603
+ }> | Readonly<{
1604
+ kind: "target-workspace-retained";
1605
+ targetContractId: ContractId;
1606
+ reason: "unappointed" | "missing" | "association" | "replaced" | "attached" | "uncommitted" | "operation";
1607
+ severity: "optional" | "required";
1608
+ contractId?: ContractId;
1609
+ }> | Readonly<{
1610
+ kind: "target-checkout-retained";
1611
+ path: string;
1612
+ target: string;
1613
+ diagnostic: string;
1614
+ severity: "optional" | "required";
1615
+ contractId?: ContractId;
1616
+ }> | Readonly<{
1617
+ kind: "unsealed-bytes";
1618
+ path: string;
1619
+ severity: "optional" | "required";
1620
+ contractId?: ContractId;
1621
+ }> | Readonly<{
1622
+ kind: "contract-file-failed";
1623
+ path: string;
1624
+ diagnostic: string;
1625
+ severity: "optional" | "required";
1626
+ contractId?: ContractId;
1627
+ }> | Readonly<{
1628
+ kind: "diagnostic";
1629
+ severity: "optional" | "required";
1630
+ diagnostic: string;
1631
+ snapshot?: import("../core/facts/types.js").SnapshotId;
1632
+ requirement?: string;
1633
+ index?: number;
1634
+ name?: string;
1635
+ path?: string;
1636
+ contractId?: ContractId;
1637
+ }> | Readonly<{
1638
+ kind: "settlement-failed";
1639
+ severity: "required";
1640
+ diagnostic: string;
1641
+ debtId?: string;
1642
+ contractId?: ContractId;
1643
+ }>)[];
1644
+ }>[];
1645
+ }> | Readonly<{
1646
+ kind: "world-observation-failed";
1647
+ diagnostic: string;
1648
+ }>>;
1649
+ spawn: (input: Readonly<{
1650
+ akumaName: string;
1651
+ prompt?: string;
1652
+ contract?: string;
1653
+ workdir?: string;
1654
+ alias?: string;
1655
+ bare?: boolean;
1656
+ }>, run?: VerbRunFor<"spawn"> | undefined) => Promise<Readonly<{
1657
+ akumaId: import("../index.js").AkumaId;
1658
+ kind: "spawned";
1659
+ tellId?: string;
1660
+ wake?: Readonly<{
1661
+ kind: "pending";
1662
+ }>;
1663
+ input?: Readonly<{
1664
+ kind: "answered";
1665
+ answer: string;
1666
+ completedAt?: string;
1667
+ }> | Readonly<{
1668
+ kind: "unanswered";
1669
+ }> | Readonly<{
1670
+ kind: "deadline";
1671
+ }>;
1672
+ dispatchWarning?: string;
1673
+ alias?: Readonly<{
1674
+ kind: "moved";
1675
+ previousAkumaId: import("../index.js").AkumaId;
1676
+ }>;
1677
+ }> | Readonly<{
1678
+ failures: readonly [Readonly<{
1679
+ diagnostic: string;
1680
+ stage: "wake";
1681
+ logPath?: string;
1682
+ }> | Readonly<{
1683
+ stage: "observation";
1684
+ diagnostic: string;
1685
+ }> | Readonly<{
1686
+ kind: "authority-corruption" | "infrastructure";
1687
+ diagnostic: string;
1688
+ stage: "tell" | "birth";
1689
+ attemptedTellId?: string;
1690
+ }> | Readonly<{
1691
+ stage: "dispatch";
1692
+ failure: Readonly<{
1693
+ kind: "authority-corruption" | "infrastructure";
1694
+ diagnostic: string;
1695
+ }> | Readonly<{
1696
+ kind: "conflict";
1697
+ currentContractId: ContractId;
1698
+ }> | Readonly<{
1699
+ kind: "publication-failed";
1700
+ diagnostic: string;
1701
+ }>;
1702
+ }> | Readonly<{
1703
+ kind: "authority-corruption" | "infrastructure";
1704
+ diagnostic: string;
1705
+ stage: "alias";
1706
+ }>, ...(Readonly<{
1707
+ diagnostic: string;
1708
+ stage: "wake";
1709
+ logPath?: string;
1710
+ }> | Readonly<{
1711
+ stage: "observation";
1712
+ diagnostic: string;
1713
+ }> | Readonly<{
1714
+ kind: "authority-corruption" | "infrastructure";
1715
+ diagnostic: string;
1716
+ stage: "tell" | "birth";
1717
+ attemptedTellId?: string;
1718
+ }> | Readonly<{
1719
+ stage: "dispatch";
1720
+ failure: Readonly<{
1721
+ kind: "authority-corruption" | "infrastructure";
1722
+ diagnostic: string;
1723
+ }> | Readonly<{
1724
+ kind: "conflict";
1725
+ currentContractId: ContractId;
1726
+ }> | Readonly<{
1727
+ kind: "publication-failed";
1728
+ diagnostic: string;
1729
+ }>;
1730
+ }> | Readonly<{
1731
+ kind: "authority-corruption" | "infrastructure";
1732
+ diagnostic: string;
1733
+ stage: "alias";
1734
+ }>)[]];
1735
+ akumaId: import("../index.js").AkumaId;
1736
+ kind: "failed";
1737
+ tellId?: string;
1738
+ wake?: Readonly<{
1739
+ kind: "pending";
1740
+ }>;
1741
+ input?: Readonly<{
1742
+ kind: "answered";
1743
+ answer: string;
1744
+ completedAt?: string;
1745
+ }> | Readonly<{
1746
+ kind: "unanswered";
1747
+ }> | Readonly<{
1748
+ kind: "deadline";
1749
+ }>;
1750
+ dispatchWarning?: string;
1751
+ alias?: Readonly<{
1752
+ kind: "moved";
1753
+ previousAkumaId: import("../index.js").AkumaId;
1754
+ }>;
1755
+ }>>;
1756
+ fork: (input: Readonly<{
1757
+ akuma: string;
1758
+ at: string;
1759
+ bare?: boolean;
1760
+ }>, run?: VerbRunFor<"fork"> | undefined) => Promise<Readonly<{
1761
+ kind: "forked";
1762
+ childAkumaId: import("../index.js").AkumaId;
1763
+ dispatchWarning?: string;
1764
+ parentAkumaId?: import("../index.js").AkumaId;
1765
+ }> | Readonly<{
1766
+ failure: Readonly<{
1767
+ stage: "dispatch";
1768
+ failure: Readonly<{
1769
+ kind: "authority-corruption" | "infrastructure";
1770
+ diagnostic: string;
1771
+ }> | Readonly<{
1772
+ kind: "conflict";
1773
+ currentContractId: ContractId;
1774
+ }> | Readonly<{
1775
+ kind: "publication-failed";
1776
+ diagnostic: string;
1777
+ }>;
1778
+ }>;
1779
+ kind: "failed";
1780
+ childAkumaId: import("../index.js").AkumaId;
1781
+ parentAkumaId?: import("../index.js").AkumaId;
1782
+ }> | Readonly<{
1783
+ kind: "provider-cannot-fork";
1784
+ parentAkumaId?: import("../index.js").AkumaId;
1785
+ }> | Readonly<{
1786
+ kind: "unknown-history";
1787
+ parentAkumaId?: import("../index.js").AkumaId;
1788
+ }> | Readonly<{
1789
+ kind: "fork-failed";
1790
+ diagnostic: string;
1791
+ parentAkumaId?: import("../index.js").AkumaId;
1792
+ }> | Readonly<{
1793
+ kind: "provider-forked-local-birth-failed";
1794
+ session: Readonly<{
1795
+ kind: "file";
1796
+ sessionFile: string;
1797
+ }> | Readonly<{
1798
+ kind: "session";
1799
+ sessionId: string;
1800
+ }>;
1801
+ diagnostic: string;
1802
+ parentAkumaId?: import("../index.js").AkumaId;
1803
+ }>>;
1804
+ tell: (input: Readonly<{
1805
+ akuma: string;
1806
+ prompt: string;
1807
+ interrupt?: boolean;
1808
+ }>, run?: VerbRunFor<"tell"> | undefined) => Promise<Readonly<{
1809
+ akumaId: import("../index.js").AkumaId;
1810
+ tellId: string;
1811
+ kind: "admitted";
1812
+ wake?: Readonly<{
1813
+ kind: "pending";
1814
+ }>;
1815
+ input?: Readonly<{
1816
+ kind: "answered";
1817
+ answer: string;
1818
+ completedAt?: string;
1819
+ }> | Readonly<{
1820
+ kind: "unanswered";
1821
+ }> | Readonly<{
1822
+ kind: "deadline";
1823
+ }>;
1824
+ interrupt?: Readonly<{
1825
+ kind: "pending";
1826
+ }> | Readonly<{
1827
+ kind: "unavailable";
1828
+ evidence: "hung" | "untidy";
1829
+ }>;
1830
+ }> | Readonly<{
1831
+ failures: readonly [Readonly<{
1832
+ diagnostic: string;
1833
+ stage: "wake";
1834
+ logPath?: string;
1835
+ }> | Readonly<{
1836
+ stage: "observation";
1837
+ diagnostic: string;
1838
+ }>, ...(Readonly<{
1839
+ diagnostic: string;
1840
+ stage: "wake";
1841
+ logPath?: string;
1842
+ }> | Readonly<{
1843
+ stage: "observation";
1844
+ diagnostic: string;
1845
+ }>)[]];
1846
+ akumaId: import("../index.js").AkumaId;
1847
+ tellId: string;
1848
+ kind: "failed";
1849
+ wake?: Readonly<{
1850
+ kind: "pending";
1851
+ }>;
1852
+ input?: Readonly<{
1853
+ kind: "answered";
1854
+ answer: string;
1855
+ completedAt?: string;
1856
+ }> | Readonly<{
1857
+ kind: "unanswered";
1858
+ }> | Readonly<{
1859
+ kind: "deadline";
1860
+ }>;
1861
+ interrupt?: Readonly<{
1862
+ kind: "pending";
1863
+ }> | Readonly<{
1864
+ kind: "unavailable";
1865
+ evidence: "hung" | "untidy";
1866
+ }>;
1867
+ }>>;
1868
+ ask: (input: Readonly<{
1869
+ akuma: string;
1870
+ prompt: string;
1871
+ schema: Readonly<Record<string, unknown>>;
1872
+ timeout?: string;
1873
+ interrupt?: boolean;
1874
+ }>, run?: VerbRunFor<"ask"> | undefined) => Promise<Readonly<{
1875
+ kind: "answered";
1876
+ answer: z.core.util.JSONType;
1877
+ akumaId: import("../index.js").AkumaId;
1878
+ tellId: string;
1879
+ completedAt?: string;
1880
+ wake?: Readonly<{
1881
+ kind: "failed";
1882
+ diagnostic: string;
1883
+ logPath?: string;
1884
+ }>;
1885
+ interrupt?: Readonly<{
1886
+ kind: "pending";
1887
+ }> | Readonly<{
1888
+ kind: "unavailable";
1889
+ evidence: "hung" | "untidy";
1890
+ }>;
1891
+ }> | Readonly<{
1892
+ kind: "unanswered";
1893
+ akumaId: import("../index.js").AkumaId;
1894
+ tellId: string;
1895
+ wake?: Readonly<{
1896
+ kind: "pending";
1897
+ }> | Readonly<{
1898
+ kind: "failed";
1899
+ diagnostic: string;
1900
+ logPath?: string;
1901
+ }>;
1902
+ interrupt?: Readonly<{
1903
+ kind: "pending";
1904
+ }> | Readonly<{
1905
+ kind: "unavailable";
1906
+ evidence: "hung" | "untidy";
1907
+ }>;
1908
+ }> | Readonly<{
1909
+ kind: "deadline";
1910
+ akumaId: import("../index.js").AkumaId;
1911
+ tellId: string;
1912
+ wake?: Readonly<{
1913
+ kind: "pending";
1914
+ }> | Readonly<{
1915
+ kind: "failed";
1916
+ diagnostic: string;
1917
+ logPath?: string;
1918
+ }>;
1919
+ interrupt?: Readonly<{
1920
+ kind: "pending";
1921
+ }> | Readonly<{
1922
+ kind: "unavailable";
1923
+ evidence: "hung" | "untidy";
1924
+ }>;
1925
+ }> | Readonly<{
1926
+ kind: "failed";
1927
+ diagnostic: string;
1928
+ akumaId: import("../index.js").AkumaId;
1929
+ tellId: string;
1930
+ completedAt?: string;
1931
+ wake?: Readonly<{
1932
+ kind: "failed";
1933
+ diagnostic: string;
1934
+ logPath?: string;
1935
+ }>;
1936
+ interrupt?: Readonly<{
1937
+ kind: "pending";
1938
+ }> | Readonly<{
1939
+ kind: "unavailable";
1940
+ evidence: "hung" | "untidy";
1941
+ }>;
1942
+ }> | Readonly<{
1943
+ kind: "invalid-output";
1944
+ diagnostic: string;
1945
+ answer: string;
1946
+ akumaId: import("../index.js").AkumaId;
1947
+ tellId: string;
1948
+ completedAt?: string;
1949
+ wake?: Readonly<{
1950
+ kind: "failed";
1951
+ diagnostic: string;
1952
+ logPath?: string;
1953
+ }>;
1954
+ interrupt?: Readonly<{
1955
+ kind: "pending";
1956
+ }> | Readonly<{
1957
+ kind: "unavailable";
1958
+ evidence: "hung" | "untidy";
1959
+ }>;
1960
+ }>>;
1961
+ kill: (input: Readonly<{
1962
+ akuma: string;
1963
+ }>, run?: VerbRunFor<"kill"> | undefined) => Promise<Readonly<{
1964
+ results: readonly Readonly<{
1965
+ id: import("../index.js").AkumaId;
1966
+ outcome: "unavailable" | "hung" | "untidy" | "killed" | "already-killed" | "already-stopped";
1967
+ }>[];
1968
+ }>>;
1969
+ wait: (input: Readonly<{
1970
+ selectors: readonly string[];
1971
+ completion?: "any" | "all";
1972
+ timeout?: string;
1973
+ }>, run?: VerbRunFor<"wait"> | undefined) => Promise<Readonly<{
1974
+ kind: "wait";
1975
+ reason: "deadline" | "unavailable" | "missing" | "completed";
1976
+ members: readonly (Readonly<{
1977
+ kind: "contract";
1978
+ observation: Readonly<{
1979
+ id: ContractId;
1980
+ changed?: true;
1981
+ presence?: "unknown" | "missing";
1982
+ terminal?: "claimed" | "abandoned";
1983
+ summary?: Readonly<{
1984
+ id: ContractId;
1985
+ phase: "claimed" | "abandoned" | "bound";
1986
+ phaseAt: string;
1987
+ title?: string;
1988
+ delivered?: true;
1989
+ gates?: readonly Readonly<{
1990
+ name: string;
1991
+ verdict: "missing" | "satisfied" | "unsatisfied" | "stale";
1992
+ }>[];
1993
+ attention?: readonly (Readonly<{
1994
+ kind: "workspace-unavailable";
1995
+ path: string;
1996
+ }> | Readonly<{
1997
+ kind: "workspace-unappointed";
1998
+ }> | Readonly<{
1999
+ kind: "workspace-failed";
2000
+ path: string;
2001
+ diagnostic: string;
2002
+ }> | Readonly<{
2003
+ kind: "merge-in-progress";
2004
+ path: string;
2005
+ conflicts?: number;
2006
+ }> | Readonly<{
2007
+ kind: "target-behind";
2008
+ behind: number;
2009
+ subject?: string;
2010
+ }> | Readonly<{
2011
+ kind: "target-unknown";
2012
+ subject?: string;
2013
+ }>)[];
2014
+ }>;
2015
+ }>;
2016
+ }> | Readonly<{
2017
+ kind: "akuma";
2018
+ observation: Readonly<{
2019
+ kind: "observed";
2020
+ id: import("../index.js").AkumaId;
2021
+ life: "hung" | "untidy" | "killed" | "running" | "asleep" | "stranded";
2022
+ lastActivityAt?: string;
2023
+ events?: readonly (Readonly<{
2024
+ kind: "tell";
2025
+ sequence: number;
2026
+ at: string;
2027
+ tellId: string;
2028
+ text: string;
2029
+ state: "pending" | "told";
2030
+ deliveries: readonly Readonly<{
2031
+ deliveredAt: string;
2032
+ route: "launch" | "live";
2033
+ turnSequence: number;
2034
+ }>[];
2035
+ }> | Readonly<{
2036
+ kind: "report";
2037
+ sequence: number;
2038
+ bodySequence: number;
2039
+ turnSequence: number;
2040
+ text: string;
2041
+ at: string;
2042
+ }> | Readonly<{
2043
+ kind: "permission";
2044
+ sequence: number;
2045
+ turnSequence: number;
2046
+ at: string;
2047
+ requests: readonly Readonly<{
2048
+ id: string;
2049
+ action: string;
2050
+ resources: readonly string[];
2051
+ tool?: string;
2052
+ }>[];
2053
+ truncated?: true;
2054
+ }> | Readonly<{
2055
+ kind: "call";
2056
+ sequence: number;
2057
+ turnSequence: number;
2058
+ at: string;
2059
+ text: string;
2060
+ }> | Readonly<{
2061
+ kind: "thought" | "note" | "said";
2062
+ sequence: number;
2063
+ turnSequence: number;
2064
+ at: string;
2065
+ text: string;
2066
+ truncated?: true;
2067
+ }> | Readonly<{
2068
+ kind: "turn";
2069
+ sequence: number;
2070
+ bodySequence: number;
2071
+ at: string;
2072
+ }> | Readonly<{
2073
+ kind: "outcome";
2074
+ sequence: number;
2075
+ turnSequence: number;
2076
+ at: string;
2077
+ outcome: Readonly<{
2078
+ kind: "answered";
2079
+ answer: string;
2080
+ foldedSaidSequence?: number;
2081
+ }> | Readonly<{
2082
+ kind: "failed";
2083
+ diagnostic: string;
2084
+ }> | Readonly<{
2085
+ kind: "canceled";
2086
+ }>;
2087
+ }> | Readonly<{
2088
+ kind: "tool";
2089
+ sequence: number;
2090
+ turnSequence: number;
2091
+ at: string;
2092
+ name: string;
2093
+ call: Readonly<{
2094
+ kind: "run";
2095
+ command: string;
2096
+ }> | Readonly<{
2097
+ kind: "read";
2098
+ path: string;
2099
+ offset?: number;
2100
+ limit?: number;
2101
+ }> | Readonly<{
2102
+ kind: "search";
2103
+ query: string;
2104
+ scope?: "content" | "files" | "web";
2105
+ path?: string;
2106
+ glob?: string;
2107
+ }> | Readonly<{
2108
+ kind: "fileChange";
2109
+ changes: readonly Readonly<{
2110
+ op: "add" | "update" | "delete" | "unspecified";
2111
+ path: string;
2112
+ diffstat?: Readonly<{
2113
+ added: number;
2114
+ removed: number;
2115
+ }>;
2116
+ patch?: string;
2117
+ }>[];
2118
+ }> | Readonly<{
2119
+ kind: "other";
2120
+ input?: Readonly<{
2121
+ json: string;
2122
+ truncated?: true;
2123
+ }>;
2124
+ }>;
2125
+ toolId: string;
2126
+ state: "active" | "unsettled" | Readonly<{
2127
+ status: "error" | "ok";
2128
+ message?: string;
2129
+ output?: string;
2130
+ exitCode?: number;
2131
+ }>;
2132
+ durationMs?: number;
2133
+ truncated?: true;
2134
+ }>)[];
2135
+ eventsUnavailable?: string;
2136
+ pending?: true;
2137
+ outcome?: Readonly<{
2138
+ kind: "answered";
2139
+ historyId: `turn/${number}`;
2140
+ answer: string;
2141
+ }> | Readonly<{
2142
+ kind: "failed";
2143
+ historyId: `turn/${number}`;
2144
+ diagnostic: string;
2145
+ }> | Readonly<{
2146
+ kind: "canceled";
2147
+ historyId: `turn/${number}`;
2148
+ }>;
2149
+ strandedReason?: "resume-unsupported";
2150
+ }> | Readonly<{
2151
+ kind: "unobserved";
2152
+ id: import("../index.js").AkumaId;
2153
+ diagnostic: string;
2154
+ }> | Readonly<{
2155
+ kind: "missing";
2156
+ id: import("../index.js").AkumaId;
2157
+ }> | Readonly<{
2158
+ kind: "unknown";
2159
+ id: import("../index.js").AkumaId;
2160
+ }>;
2161
+ }>)[];
2162
+ }>>;
2163
+ history: (input: Readonly<{
2164
+ selector: string;
2165
+ before?: number;
2166
+ limit?: number;
2167
+ }> | Readonly<{
2168
+ since: number;
2169
+ selector: string;
2170
+ limit?: number;
2171
+ }> | Readonly<{
2172
+ selector: string;
2173
+ item: string;
2174
+ }> | Readonly<{
2175
+ selector: string;
2176
+ item: string;
2177
+ }>, run?: VerbRunFor<"history"> | undefined) => Promise<Readonly<{
2178
+ events: readonly (Readonly<{
2179
+ kind: "tell";
2180
+ sequence: number;
2181
+ at: string;
2182
+ tellId: string;
2183
+ text: string;
2184
+ state: "pending" | "told";
2185
+ deliveries: readonly Readonly<{
2186
+ deliveredAt: string;
2187
+ route: "launch" | "live";
2188
+ turnSequence: number;
2189
+ }>[];
2190
+ }> | Readonly<{
2191
+ kind: "report";
2192
+ sequence: number;
2193
+ bodySequence: number;
2194
+ turnSequence: number;
2195
+ text: string;
2196
+ at: string;
2197
+ }> | Readonly<{
2198
+ kind: "permission";
2199
+ sequence: number;
2200
+ turnSequence: number;
2201
+ at: string;
2202
+ requests: readonly Readonly<{
2203
+ id: string;
2204
+ action: string;
2205
+ resources: readonly string[];
2206
+ tool?: string;
2207
+ }>[];
2208
+ truncated?: true;
2209
+ }> | Readonly<{
2210
+ kind: "call";
2211
+ sequence: number;
2212
+ turnSequence: number;
2213
+ at: string;
2214
+ text: string;
2215
+ }> | Readonly<{
2216
+ kind: "thought" | "note" | "said";
2217
+ sequence: number;
2218
+ turnSequence: number;
2219
+ at: string;
2220
+ text: string;
2221
+ truncated?: true;
2222
+ }> | Readonly<{
2223
+ kind: "turn";
2224
+ sequence: number;
2225
+ bodySequence: number;
2226
+ at: string;
2227
+ }> | Readonly<{
2228
+ kind: "outcome";
2229
+ sequence: number;
2230
+ turnSequence: number;
2231
+ at: string;
2232
+ outcome: Readonly<{
2233
+ kind: "answered";
2234
+ answer: string;
2235
+ foldedSaidSequence?: number;
2236
+ }> | Readonly<{
2237
+ kind: "failed";
2238
+ diagnostic: string;
2239
+ }> | Readonly<{
2240
+ kind: "canceled";
2241
+ }>;
2242
+ }> | Readonly<{
2243
+ kind: "tool";
2244
+ sequence: number;
2245
+ turnSequence: number;
2246
+ at: string;
2247
+ name: string;
2248
+ call: Readonly<{
2249
+ kind: "run";
2250
+ command: string;
2251
+ }> | Readonly<{
2252
+ kind: "read";
2253
+ path: string;
2254
+ offset?: number;
2255
+ limit?: number;
2256
+ }> | Readonly<{
2257
+ kind: "search";
2258
+ query: string;
2259
+ scope?: "content" | "files" | "web";
2260
+ path?: string;
2261
+ glob?: string;
2262
+ }> | Readonly<{
2263
+ kind: "fileChange";
2264
+ changes: readonly Readonly<{
2265
+ op: "add" | "update" | "delete" | "unspecified";
2266
+ path: string;
2267
+ diffstat?: Readonly<{
2268
+ added: number;
2269
+ removed: number;
2270
+ }>;
2271
+ patch?: string;
2272
+ }>[];
2273
+ }> | Readonly<{
2274
+ kind: "other";
2275
+ input?: Readonly<{
2276
+ json: string;
2277
+ truncated?: true;
2278
+ }>;
2279
+ }>;
2280
+ toolId: string;
2281
+ state: "active" | "unsettled" | Readonly<{
2282
+ status: "error" | "ok";
2283
+ message?: string;
2284
+ output?: string;
2285
+ exitCode?: number;
2286
+ }>;
2287
+ durationMs?: number;
2288
+ truncated?: true;
2289
+ }>)[];
2290
+ akumaId: import("../index.js").AkumaId;
2291
+ kind: "akuma";
2292
+ omitted?: number;
2293
+ retentionLost?: true;
2294
+ lowestRetainedSequence?: number;
2295
+ highestSequence?: number;
2296
+ }> | Readonly<{
2297
+ sequence: number;
2298
+ turnSequence: number;
2299
+ at: string;
2300
+ outcome: Readonly<{
2301
+ kind: "answered";
2302
+ answer: string;
2303
+ foldedSaidSequence?: number;
2304
+ }> | Readonly<{
2305
+ kind: "failed";
2306
+ diagnostic: string;
2307
+ }> | Readonly<{
2308
+ kind: "canceled";
2309
+ }>;
2310
+ akumaId: import("../index.js").AkumaId;
2311
+ kind: "akuma-exact";
2312
+ }> | Readonly<{
2313
+ sequence: number;
2314
+ bodySequence: number;
2315
+ turnSequence: number;
2316
+ text: string;
2317
+ at: string;
2318
+ akumaId: import("../index.js").AkumaId;
2319
+ kind: "akuma-report";
2320
+ }> | Readonly<{
2321
+ akumaId: import("../index.js").AkumaId;
2322
+ kind: "akuma-unknown-history";
2323
+ }> | Readonly<{
2324
+ historyId: `turn/${number}`;
2325
+ answer: string;
2326
+ akumaId: import("../index.js").AkumaId;
2327
+ kind: "akuma-answer";
2328
+ }> | Readonly<{
2329
+ akumaId: import("../index.js").AkumaId;
2330
+ kind: "akuma-no-answer";
2331
+ }> | Readonly<{
2332
+ kind: "contract";
2333
+ contractId: ContractId;
2334
+ events: readonly (Readonly<{
2335
+ kind: "bind";
2336
+ id: string;
2337
+ at: string;
2338
+ start: import("../core/facts/types.js").SnapshotId;
2339
+ target?: string | Readonly<{
2340
+ kind: "contract";
2341
+ contractId: ContractId;
2342
+ }>;
2343
+ gates?: readonly string[];
2344
+ after?: readonly ContractId[];
2345
+ document?: string;
2346
+ targetIncarnation?: Readonly<{
2347
+ id: string;
2348
+ identity: string;
2349
+ }>;
2350
+ }> | Readonly<{
2351
+ kind: "amend";
2352
+ id: string;
2353
+ at: string;
2354
+ target?: string | Readonly<{
2355
+ kind: "contract";
2356
+ contractId: ContractId;
2357
+ }>;
2358
+ targetIncarnation?: Readonly<{
2359
+ id: string;
2360
+ identity: string;
2361
+ }>;
2362
+ changedSections?: readonly string[];
2363
+ gates?: readonly string[];
2364
+ after?: readonly ContractId[];
2365
+ document?: string;
2366
+ }> | Readonly<{
2367
+ kind: "deliver";
2368
+ id: string;
2369
+ at: string;
2370
+ candidate: import("../core/facts/types.js").SnapshotId;
2371
+ integration: import("../core/facts/types.js").SnapshotId;
2372
+ contentId: string;
2373
+ predecessor: import("../core/facts/types.js").SnapshotId;
2374
+ note?: string;
2375
+ requireBranchesToBeUpToDate?: boolean;
2376
+ }> | Readonly<{
2377
+ kind: "reintegrated";
2378
+ id: string;
2379
+ at: string;
2380
+ predecessor: import("../core/facts/types.js").SnapshotId;
2381
+ integration: import("../core/facts/types.js").SnapshotId;
2382
+ }> | Readonly<{
2383
+ kind: "attestation";
2384
+ id: string;
2385
+ at: string;
2386
+ gate: string;
2387
+ requirement: import("../core/facts/types.js").RequirementId;
2388
+ verdict: "satisfied" | "unsatisfied";
2389
+ subject: string;
2390
+ summary?: string;
2391
+ }> | Readonly<{
2392
+ kind: "claimed";
2393
+ id: string;
2394
+ at: string;
2395
+ deliveryId: string;
2396
+ }> | Readonly<{
2397
+ kind: "arc";
2398
+ id: string;
2399
+ at: string;
2400
+ chapter: number;
2401
+ title: string;
2402
+ body?: string;
2403
+ }> | Readonly<{
2404
+ kind: "abandoned";
2405
+ id: string;
2406
+ at: string;
2407
+ note?: string;
2408
+ }> | Readonly<{
2409
+ kind: "dispatch";
2410
+ at: string;
2411
+ akumaId: import("../index.js").AkumaId;
2412
+ }>)[];
2413
+ omitted?: number;
2414
+ lowestRetainedSequence?: number;
2415
+ highestSequence?: number;
2416
+ dispatches?: Readonly<{
2417
+ kind: "unavailable";
2418
+ category: "authority-corruption" | "internal";
2419
+ diagnostic: string;
2420
+ }>;
2421
+ }> | Readonly<{
2422
+ kind: "contract-exact";
2423
+ contractId: ContractId;
2424
+ event: Readonly<{
2425
+ kind: "bind";
2426
+ id: string;
2427
+ at: string;
2428
+ start: import("../core/facts/types.js").SnapshotId;
2429
+ target?: string | Readonly<{
2430
+ kind: "contract";
2431
+ contractId: ContractId;
2432
+ }>;
2433
+ gates?: readonly string[];
2434
+ after?: readonly ContractId[];
2435
+ document?: string;
2436
+ targetIncarnation?: Readonly<{
2437
+ id: string;
2438
+ identity: string;
2439
+ }>;
2440
+ }> | Readonly<{
2441
+ kind: "amend";
2442
+ id: string;
2443
+ at: string;
2444
+ target?: string | Readonly<{
2445
+ kind: "contract";
2446
+ contractId: ContractId;
2447
+ }>;
2448
+ targetIncarnation?: Readonly<{
2449
+ id: string;
2450
+ identity: string;
2451
+ }>;
2452
+ changedSections?: readonly string[];
2453
+ gates?: readonly string[];
2454
+ after?: readonly ContractId[];
2455
+ document?: string;
2456
+ }> | Readonly<{
2457
+ kind: "deliver";
2458
+ id: string;
2459
+ at: string;
2460
+ candidate: import("../core/facts/types.js").SnapshotId;
2461
+ integration: import("../core/facts/types.js").SnapshotId;
2462
+ contentId: string;
2463
+ predecessor: import("../core/facts/types.js").SnapshotId;
2464
+ note?: string;
2465
+ requireBranchesToBeUpToDate?: boolean;
2466
+ }> | Readonly<{
2467
+ kind: "reintegrated";
2468
+ id: string;
2469
+ at: string;
2470
+ predecessor: import("../core/facts/types.js").SnapshotId;
2471
+ integration: import("../core/facts/types.js").SnapshotId;
2472
+ }> | Readonly<{
2473
+ kind: "attestation";
2474
+ id: string;
2475
+ at: string;
2476
+ gate: string;
2477
+ requirement: import("../core/facts/types.js").RequirementId;
2478
+ verdict: "satisfied" | "unsatisfied";
2479
+ subject: string;
2480
+ summary?: string;
2481
+ }> | Readonly<{
2482
+ kind: "claimed";
2483
+ id: string;
2484
+ at: string;
2485
+ deliveryId: string;
2486
+ }> | Readonly<{
2487
+ kind: "arc";
2488
+ id: string;
2489
+ at: string;
2490
+ chapter: number;
2491
+ title: string;
2492
+ body?: string;
2493
+ }> | Readonly<{
2494
+ kind: "abandoned";
2495
+ id: string;
2496
+ at: string;
2497
+ note?: string;
2498
+ }>;
2499
+ }> | Readonly<{
2500
+ kind: "contract-unknown-history";
2501
+ contractId: ContractId;
2502
+ }> | Readonly<{
2503
+ kind: "contract-missing";
2504
+ contractId: ContractId;
2505
+ }>>;
2506
+ report: (input: Readonly<{
2507
+ text: string;
2508
+ }>, run?: VerbRunFor<"report"> | undefined) => Promise<Readonly<{
2509
+ kind: "recorded";
2510
+ reportId: string;
2511
+ }> | Readonly<{
2512
+ kind: "refused";
2513
+ reason: "not-born" | "not-executing";
2514
+ }>>;
2515
+ ls: (input: Readonly<{
2516
+ selector: string;
2517
+ limit?: number;
2518
+ lifecycle?: "active" | "settled" | "all";
2519
+ mine?: boolean;
2520
+ }>, run?: VerbRunFor<"ls"> | undefined) => Promise<Readonly<{
2521
+ kind: "contract-catalogue";
2522
+ observedAt: string;
2523
+ rows?: readonly Readonly<{
2524
+ id: ContractId;
2525
+ phase: "claimed" | "abandoned" | "bound";
2526
+ phaseAt: string;
2527
+ title?: string;
2528
+ delivered?: true;
2529
+ gates?: readonly Readonly<{
2530
+ name: string;
2531
+ verdict: "missing" | "satisfied" | "unsatisfied" | "stale";
2532
+ }>[];
2533
+ attention?: readonly (Readonly<{
2534
+ kind: "workspace-unavailable";
2535
+ path: string;
2536
+ }> | Readonly<{
2537
+ kind: "workspace-unappointed";
2538
+ }> | Readonly<{
2539
+ kind: "workspace-failed";
2540
+ path: string;
2541
+ diagnostic: string;
2542
+ }> | Readonly<{
2543
+ kind: "merge-in-progress";
2544
+ path: string;
2545
+ conflicts?: number;
2546
+ }> | Readonly<{
2547
+ kind: "target-behind";
2548
+ behind: number;
2549
+ subject?: string;
2550
+ }> | Readonly<{
2551
+ kind: "target-unknown";
2552
+ subject?: string;
2553
+ }>)[];
2554
+ }>[];
2555
+ more?: true;
2556
+ }> | Readonly<{
2557
+ kind: "akuma-name-catalogue";
2558
+ rows?: readonly Readonly<{
2559
+ name: string;
2560
+ model?: string;
2561
+ description?: string;
2562
+ }>[];
2563
+ more?: true;
2564
+ }> | Readonly<{
2565
+ kind: "debt-catalogue";
2566
+ rows?: readonly Readonly<{
2567
+ id: `debt/${string}`;
2568
+ title: string;
2569
+ priority: import("../index.js").DebtPriority;
2570
+ disposition: "ready" | "blocked" | "drop" | "done";
2571
+ }>[];
2572
+ more?: true;
2573
+ }> | Readonly<{
2574
+ kind: "debt-catalogue";
2575
+ absent: true;
2576
+ }> | Readonly<{
2577
+ kind: "akuma-catalogue";
2578
+ observedAt: string;
2579
+ rows?: readonly Readonly<{
2580
+ id: import("../index.js").AkumaId;
2581
+ life: "hung" | "untidy" | "killed" | "running" | "asleep" | "stranded" | "unborn" | "stillborn";
2582
+ lifeAt?: string;
2583
+ lastActivityAt?: string;
2584
+ pending?: number;
2585
+ diagnostic?: string;
2586
+ aliases?: readonly AkumaAlias[];
2587
+ parentAkumaId?: import("../index.js").AkumaId;
2588
+ contract?: Readonly<{
2589
+ kind: "associated";
2590
+ contractId: ContractId;
2591
+ }> | Readonly<{
2592
+ kind: "unavailable";
2593
+ }>;
2594
+ }>[];
2595
+ more?: true;
2596
+ aliasesError?: string;
2597
+ }>>;
2598
+ debtAdd: (input: Readonly<{
2599
+ title: string;
2600
+ body?: string;
2601
+ priority?: import("../index.js").DebtPriority;
2602
+ needs?: readonly string[];
2603
+ }>, run?: VerbRunFor<"debt.add"> | undefined) => Promise<Readonly<{
2604
+ kind: "refused";
2605
+ reason: "invalid-graph";
2606
+ diagnostic: string;
2607
+ }> | Readonly<{
2608
+ kind: "retry";
2609
+ reason: "busy" | "concurrent-modification";
2610
+ }> | Readonly<{
2611
+ kind: "accepted";
2612
+ id: `debt/${string}`;
2613
+ warning?: string;
2614
+ }>>;
2615
+ debtAddDocument: (input: Readonly<{
2616
+ markdown: string;
2617
+ }>, run?: VerbRunFor<"debt.addDocument"> | undefined) => Promise<Readonly<{
2618
+ kind: "refused";
2619
+ reason: "invalid-graph";
2620
+ diagnostic: string;
2621
+ }> | Readonly<{
2622
+ kind: "retry";
2623
+ reason: "busy" | "concurrent-modification";
2624
+ }> | Readonly<{
2625
+ kind: "accepted";
2626
+ id: `debt/${string}`;
2627
+ warning?: string;
2628
+ }>>;
2629
+ debtUpdate: (input: Readonly<{
2630
+ id: string;
2631
+ title?: string;
2632
+ body?: string;
2633
+ note?: string;
2634
+ state?: "open" | "drop" | "done";
2635
+ priority?: import("../index.js").DebtPriority;
2636
+ needs?: readonly string[];
2637
+ }>, run?: VerbRunFor<"debt.update"> | undefined) => Promise<Readonly<{
2638
+ kind: "refused";
2639
+ reason: "debt-missing";
2640
+ }> | Readonly<{
2641
+ kind: "refused";
2642
+ reason: "invalid-graph";
2643
+ diagnostic: string;
2644
+ }> | Readonly<{
2645
+ kind: "retry";
2646
+ reason: "busy" | "concurrent-modification";
2647
+ }> | Readonly<{
2648
+ kind: "accepted";
2649
+ changes?: readonly ("title" | "state" | "note" | "body" | "priority" | "needs")[];
2650
+ warning?: string;
2651
+ }>>;
2652
+ debtDoctor: (input?: Readonly<Record<string, never>> | undefined, run?: VerbRunFor<"debt.doctor"> | undefined) => Promise<Readonly<{
2653
+ kind: "absent";
2654
+ }> | Readonly<{
2655
+ kind: "present";
2656
+ issues?: readonly (Readonly<{
2657
+ kind: "missing-target";
2658
+ debtId: `debt/${string}`;
2659
+ relation: "needs";
2660
+ target: `debt/${string}`;
2661
+ }> | Readonly<{
2662
+ kind: "self-relation";
2663
+ debtId: `debt/${string}`;
2664
+ relation: "needs";
2665
+ }> | Readonly<{
2666
+ kind: "cycle";
2667
+ relation: "needs";
2668
+ debts: readonly `debt/${string}`[];
2669
+ }>)[];
2670
+ }>>;
2671
+ kanshi: (input?: Readonly<Record<string, never>> | undefined, run?: VerbRunFor<"kanshi"> | undefined) => Promise<Readonly<{
2672
+ kind: "world";
2673
+ observedAt: string;
2674
+ contracts: Readonly<{
2675
+ kind: "failed";
2676
+ diagnostic: string;
2677
+ }> | Readonly<{
2678
+ kind: "absent";
2679
+ }> | Readonly<{
2680
+ kind: "present";
2681
+ rows?: readonly Readonly<{
2682
+ id: ContractId;
2683
+ phase: "claimed" | "abandoned" | "bound";
2684
+ phaseAt: string;
2685
+ title?: string;
2686
+ delivered?: true;
2687
+ gates?: readonly Readonly<{
2688
+ name: string;
2689
+ verdict: "missing" | "satisfied" | "unsatisfied" | "stale";
2690
+ }>[];
2691
+ attention?: readonly (Readonly<{
2692
+ kind: "workspace-unavailable";
2693
+ path: string;
2694
+ }> | Readonly<{
2695
+ kind: "workspace-unappointed";
2696
+ }> | Readonly<{
2697
+ kind: "workspace-failed";
2698
+ path: string;
2699
+ diagnostic: string;
2700
+ }> | Readonly<{
2701
+ kind: "merge-in-progress";
2702
+ path: string;
2703
+ conflicts?: number;
2704
+ }> | Readonly<{
2705
+ kind: "target-behind";
2706
+ behind: number;
2707
+ subject?: string;
2708
+ }> | Readonly<{
2709
+ kind: "target-unknown";
2710
+ subject?: string;
2711
+ }>)[];
2712
+ associations?: readonly (Readonly<{
2713
+ kind: "debt";
2714
+ debtId: string;
2715
+ }> | Readonly<{
2716
+ kind: "akuma";
2717
+ akumaId: string;
2718
+ aliases?: readonly string[];
2719
+ aliasesUnavailable?: true;
2720
+ }> | Readonly<{
2721
+ kind: "unavailable";
2722
+ source: "holder" | "roster";
2723
+ diagnostic: string;
2724
+ }>)[];
2725
+ }>[];
2726
+ more?: true;
2727
+ }>;
2728
+ debts: Readonly<{
2729
+ kind: "absent";
2730
+ }> | Readonly<{
2731
+ kind: "failed";
2732
+ diagnostic: string;
2733
+ coordinate?: string;
2734
+ }> | Readonly<{
2735
+ kind: "present";
2736
+ rows?: readonly Readonly<{
2737
+ id: `debt/${string}`;
2738
+ title: string;
2739
+ priority: import("../index.js").DebtPriority;
2740
+ disposition: "ready" | "blocked";
2741
+ contract?: Readonly<{
2742
+ kind: "associated";
2743
+ contractId: ContractId;
2744
+ }> | Readonly<{
2745
+ kind: "unavailable";
2746
+ }>;
2747
+ }>[];
2748
+ more?: true;
2749
+ }>;
2750
+ akumas: Readonly<{
2751
+ kind: "failed";
2752
+ diagnostic: string;
2753
+ }> | Readonly<{
2754
+ kind: "absent";
2755
+ }> | Readonly<{
2756
+ kind: "present";
2757
+ more?: true;
2758
+ aliasesError?: string;
2759
+ rows?: readonly Readonly<{
2760
+ id: import("../index.js").AkumaId;
2761
+ life: "hung" | "untidy" | "killed" | "running" | "asleep" | "stranded" | "unborn" | "stillborn";
2762
+ lifeAt?: string;
2763
+ lastActivityAt?: string;
2764
+ pending?: number;
2765
+ diagnostic?: string;
2766
+ aliases?: readonly AkumaAlias[];
2767
+ parentAkumaId?: import("../index.js").AkumaId;
2768
+ contract?: Readonly<{
2769
+ kind: "associated";
2770
+ contractId: ContractId;
2771
+ }> | Readonly<{
2772
+ kind: "unavailable";
2773
+ }>;
2774
+ work?: Readonly<{
2775
+ kind: "open" | "idle";
2776
+ turn?: Readonly<{
2777
+ sequence: number;
2778
+ bodySequence: number;
2779
+ }>;
2780
+ activeTools?: readonly Readonly<{
2781
+ id: number;
2782
+ turnSequence: number;
2783
+ toolId: string;
2784
+ }>[];
2785
+ latestActivity?: number;
2786
+ awaiting?: Readonly<{
2787
+ kind: "permission";
2788
+ id: number;
2789
+ requests: readonly Readonly<{
2790
+ id: string;
2791
+ action: string;
2792
+ resources: readonly string[];
2793
+ tool?: string;
2794
+ }>[];
2795
+ clipped?: true;
2796
+ }>;
2797
+ pending?: readonly Readonly<{
2798
+ id: number;
2799
+ tellId: string;
2800
+ }>[];
2801
+ outcome?: Readonly<{
2802
+ historyId: `turn/${number}`;
2803
+ activityId: number;
2804
+ verdict: "answered" | "failed" | "canceled";
2805
+ }>;
2806
+ summary?: Readonly<{
2807
+ id: number;
2808
+ text: string;
2809
+ clipped?: true;
2810
+ }>;
2811
+ }> | Readonly<{
2812
+ kind: "unavailable";
2813
+ diagnostic: string;
2814
+ }>;
2815
+ }>[];
2816
+ }>;
2817
+ }>>;
2818
+ status: (input: Readonly<{
2819
+ selector: string;
2820
+ }>, run?: VerbRunFor<"status"> | undefined) => Promise<Readonly<{
2821
+ kind: "akuma";
2822
+ id: import("../index.js").AkumaId;
2823
+ life: "hung" | "untidy" | "killed" | "running" | "asleep" | "stranded";
2824
+ cwd: string;
2825
+ provider: string;
2826
+ work: Readonly<{
2827
+ kind: "open" | "idle";
2828
+ turn?: Readonly<{
2829
+ sequence: number;
2830
+ bodySequence: number;
2831
+ }>;
2832
+ activeTools?: readonly Readonly<{
2833
+ id: number;
2834
+ turnSequence: number;
2835
+ toolId: string;
2836
+ }>[];
2837
+ latestActivity?: number;
2838
+ awaiting?: Readonly<{
2839
+ kind: "permission";
2840
+ id: number;
2841
+ requests: readonly Readonly<{
2842
+ id: string;
2843
+ action: string;
2844
+ resources: readonly string[];
2845
+ tool?: string;
2846
+ }>[];
2847
+ clipped?: true;
2848
+ }>;
2849
+ pending?: readonly Readonly<{
2850
+ id: number;
2851
+ tellId: string;
2852
+ }>[];
2853
+ outcome?: Readonly<{
2854
+ historyId: `turn/${number}`;
2855
+ activityId: number;
2856
+ verdict: "answered" | "failed" | "canceled";
2857
+ }>;
2858
+ summary?: Readonly<{
2859
+ id: number;
2860
+ text: string;
2861
+ clipped?: true;
2862
+ }>;
2863
+ }>;
2864
+ model?: string;
2865
+ lastActivityAt?: string;
2866
+ strandedReason?: "resume-unsupported";
2867
+ contract?: Readonly<{
2868
+ kind: "associated";
2869
+ contractId: ContractId;
2870
+ }> | Readonly<{
2871
+ kind: "failed";
2872
+ diagnostic: string;
2873
+ }>;
2874
+ changes?: readonly Readonly<{
2875
+ path: string;
2876
+ diffstat?: Readonly<{
2877
+ added: number;
2878
+ removed: number;
2879
+ }>;
2880
+ }>[];
2881
+ moreChanges?: true;
2882
+ outsideChanges?: number;
2883
+ }> | Readonly<{
2884
+ id: ContractId;
2885
+ phase: "claimed" | "abandoned" | "bound";
2886
+ workspace: Readonly<{
2887
+ kind: "present";
2888
+ path: string;
2889
+ counts?: Readonly<{
2890
+ staged?: number;
2891
+ unstaged?: number;
2892
+ untracked?: number;
2893
+ submodules?: number;
2894
+ }>;
2895
+ merge?: readonly string[];
2896
+ }> | Readonly<{
2897
+ kind: "unavailable";
2898
+ path: string;
2899
+ }> | Readonly<{
2900
+ kind: "unappointed";
2901
+ }>;
2902
+ kind: "contract";
2903
+ title?: string;
2904
+ target?: string;
2905
+ targetLag?: Readonly<{
2906
+ kind: "counted";
2907
+ behind?: number;
2908
+ }> | Readonly<{
2909
+ kind: "unknown";
2910
+ }>;
2911
+ delivery?: Readonly<{
2912
+ candidate: import("../core/facts/types.js").SnapshotId;
2913
+ integration: import("../core/facts/types.js").SnapshotId;
2914
+ }>;
2915
+ targetObservation?: Readonly<{
2916
+ kind: "moved";
2917
+ before: import("../core/facts/types.js").SnapshotId;
2918
+ after: import("../core/facts/types.js").SnapshotId;
2919
+ }> | Readonly<{
2920
+ kind: "unknown";
2921
+ }>;
2922
+ gates?: readonly Readonly<{
2923
+ gate: string;
2924
+ requirements: readonly Readonly<{
2925
+ current: Readonly<{
2926
+ kind: "missing";
2927
+ }> | Readonly<{
2928
+ kind: "stale";
2929
+ reason?: Readonly<{
2930
+ kind: "snapshot-changed";
2931
+ previousSnapshot: import("../core/facts/types.js").SnapshotId;
2932
+ currentSnapshot: import("../core/facts/types.js").SnapshotId;
2933
+ }> | Readonly<{
2934
+ kind: "candidate-content-changed";
2935
+ previousChange: import("../core/facts/types.js").ChangeId;
2936
+ currentChange: import("../core/facts/types.js").ChangeId;
2937
+ target?: string;
2938
+ }>;
2939
+ }> | Readonly<{
2940
+ kind: "attested";
2941
+ verdict: "satisfied" | "unsatisfied";
2942
+ summary?: string;
2943
+ }>;
2944
+ requirement?: string;
2945
+ index?: number;
2946
+ }>[];
2947
+ }>[];
2948
+ after?: readonly Readonly<{
2949
+ contractId: ContractId;
2950
+ state: "missing" | "abandoned" | "active";
2951
+ }>[];
2952
+ issue?: Readonly<{
2953
+ kind: "target-checkout-retained";
2954
+ }> | Readonly<{
2955
+ kind: "unavailable";
2956
+ diagnostic: string;
2957
+ }>;
2958
+ abandonNote?: string;
2959
+ holder?: `debt/${string}` | Readonly<{
2960
+ kind: "unavailable";
2961
+ }>;
2962
+ roster?: readonly Readonly<{
2963
+ id: string;
2964
+ aliases?: readonly AkumaAlias[];
2965
+ aliasesUnavailable?: true;
2966
+ }>[] | Readonly<{
2967
+ kind: "unavailable";
2968
+ }>;
2969
+ }> | Readonly<{
2970
+ kind: "contract-failed";
2971
+ id: ContractId;
2972
+ diagnostic: string;
2973
+ }> | Readonly<{
2974
+ kind: "contract-missing";
2975
+ id: ContractId;
2976
+ }>>;
2977
+ region: (input?: Readonly<{
2978
+ contract?: string;
2979
+ paths?: readonly string[];
2980
+ }> | undefined, run?: VerbRunFor<"region"> | undefined) => Promise<Readonly<{
2981
+ kind: "failed";
2982
+ diagnostic: string;
2983
+ }> | Readonly<{
2984
+ kind: "present";
2985
+ declarations?: readonly Readonly<{
2986
+ id: ContractId;
2987
+ patterns: readonly string[];
2988
+ }>[];
2989
+ }> | Readonly<{
2990
+ kind: "present";
2991
+ id: ContractId;
2992
+ patterns: readonly string[];
2993
+ overlaps?: readonly Readonly<{
2994
+ contractId: ContractId;
2995
+ patterns: readonly Readonly<{
2996
+ mine: string;
2997
+ theirs: string;
2998
+ relation?: "mine-within-theirs" | "theirs-within-mine" | "intersect";
2999
+ }>[];
3000
+ }>[];
3001
+ }> | Readonly<{
3002
+ kind: "present";
3003
+ overlaps?: readonly Readonly<{
3004
+ contractId: ContractId;
3005
+ patterns: readonly Readonly<{
3006
+ mine: string;
3007
+ theirs: string;
3008
+ relation?: "mine-within-theirs" | "theirs-within-mine" | "intersect";
3009
+ }>[];
3010
+ }>[];
3011
+ }> | Readonly<{
3012
+ kind: "contract-missing";
3013
+ id: ContractId;
3014
+ }> | Readonly<{
3015
+ kind: "contract-terminal";
3016
+ id: ContractId;
3017
+ }>>;
3018
+ whoami: (input?: Readonly<Record<string, never>> | undefined, run?: VerbRunFor<"whoami"> | undefined) => Promise<Readonly<{
3019
+ self: Readonly<{
3020
+ kind: "akuma";
3021
+ world: import("../world.js").WorldRoot;
3022
+ akumaId: import("../index.js").AkumaId;
3023
+ }> | Readonly<{
3024
+ kind: "external";
3025
+ id: string;
3026
+ }> | Readonly<{
3027
+ kind: "none";
3028
+ }> | Readonly<{
3029
+ kind: "invalid";
3030
+ diagnostic: string;
3031
+ }>;
3032
+ world?: import("../world.js").WorldRoot;
3033
+ initiator?: string | Readonly<{
3034
+ kind: "unavailable";
3035
+ diagnostic: string;
3036
+ }>;
3037
+ contextContract?: ContractId | Readonly<{
3038
+ kind: "unavailable";
3039
+ diagnostic: string;
3040
+ }> | Readonly<{
3041
+ kind: "ambiguous";
3042
+ }>;
3043
+ aliases?: readonly string[];
3044
+ workdir?: string;
3045
+ provider?: string;
3046
+ model?: string;
3047
+ dispatchContract?: ContractId;
3048
+ birthCaller?: Readonly<{
3049
+ kind: "akuma";
3050
+ world: import("../world.js").WorldRoot;
3051
+ akumaId: import("../index.js").AkumaId;
3052
+ }> | Readonly<{
3053
+ kind: "external";
3054
+ id: string;
3055
+ }> | Readonly<{
3056
+ kind: "unknown";
3057
+ }>;
3058
+ forkOrigin?: import("../index.js").AkumaId;
3059
+ profileUnavailable?: string;
3060
+ }>>;
3061
+ settings: (input?: Readonly<Record<string, never>> | undefined, run?: VerbRunFor<"settings"> | undefined) => Promise<Readonly<{
3062
+ scopes: Readonly<{
3063
+ project: Readonly<{
3064
+ kind: "absent";
3065
+ path?: string;
3066
+ }> | Readonly<{
3067
+ kind: "failed";
3068
+ path: string;
3069
+ diagnostic: string;
3070
+ }> | Readonly<{
3071
+ kind: "read";
3072
+ path: string;
3073
+ }>;
3074
+ user: Readonly<{
3075
+ kind: "absent";
3076
+ path?: string;
3077
+ }> | Readonly<{
3078
+ kind: "failed";
3079
+ path: string;
3080
+ diagnostic: string;
3081
+ }> | Readonly<{
3082
+ kind: "read";
3083
+ path: string;
3084
+ }>;
3085
+ }>;
3086
+ namespaces?: Readonly<Record<string, Readonly<{
3087
+ kind: "read";
3088
+ entries?: Readonly<Record<string, Readonly<{
3089
+ value: z.core.util.JSONType;
3090
+ source: "user" | "project";
3091
+ shadows?: true;
3092
+ }>>>;
3093
+ }> | Readonly<{
3094
+ kind: "failed";
3095
+ failures: readonly Readonly<{
3096
+ scope: "user" | "project";
3097
+ diagnostic?: string;
3098
+ }>[];
3099
+ entries?: Readonly<Record<string, Readonly<{
3100
+ value: z.core.util.JSONType;
3101
+ source: "user" | "project";
3102
+ shadows?: true;
3103
+ }>>>;
3104
+ }>>>;
3105
+ }>>;
3106
+ nuke: (input?: Readonly<{
3107
+ confirm?: string;
3108
+ }> | undefined, run?: VerbRunFor<"nuke"> | undefined) => Promise<Readonly<{
3109
+ kind: "accepted";
3110
+ refsRemoved?: number;
3111
+ worktreesRemoved?: number;
3112
+ debtsRemoved?: number;
3113
+ issues?: readonly (Readonly<{
3114
+ kind: "reset-owner-stopped";
3115
+ owner: "world" | "akuma" | "git" | "debt";
3116
+ diagnostic: string;
3117
+ }> | Readonly<{
3118
+ kind: "reset-residue";
3119
+ diagnostic: string;
3120
+ }>)[];
3121
+ }> | Readonly<{
3122
+ kind: "refused";
3123
+ world: import("../world.js").WorldRoot;
3124
+ }>>;
44
3125
  }