@astrosheep/keiyaku 4.0.0 → 4.0.1

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 (241) hide show
  1. package/README.md +2 -9
  2. package/build/integrations/marketplace/plugins/keiyaku/.claude-plugin/plugin.json +2 -2
  3. package/build/integrations/marketplace/plugins/keiyaku/.codex-plugin/plugin.json +4 -4
  4. package/build/integrations/marketplace/plugins/keiyaku/opencode.js +2 -2
  5. package/build/integrations/marketplace/plugins/keiyaku/package.json +2 -2
  6. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku/SKILL.md +11 -3
  7. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-akuma/SKILL.md +9 -6
  8. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-bind/SKILL.md +94 -0
  9. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-bind/agents/openai.yaml +4 -0
  10. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-task/SKILL.md +41 -6
  11. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-workflow/SKILL.md +162 -45
  12. package/build/src/akuma/akuma.d.ts +33 -25
  13. package/build/src/akuma/akuma.js +93 -61
  14. package/build/src/akuma/archetype.d.ts +8 -0
  15. package/build/src/akuma/archetype.js +28 -9
  16. package/build/src/akuma/body.js +196 -84
  17. package/build/src/akuma/coordinate.d.ts +9 -0
  18. package/build/src/akuma/coordinate.js +22 -0
  19. package/build/src/akuma/heart/facts.d.ts +67 -15
  20. package/build/src/akuma/heart/facts.js +3 -3
  21. package/build/src/akuma/heart/index.d.ts +41 -29
  22. package/build/src/akuma/heart/index.js +72 -193
  23. package/build/src/akuma/heart/rows.d.ts +30 -53
  24. package/build/src/akuma/heart/rows.js +91 -111
  25. package/build/src/akuma/heart/schema.d.ts +1 -1
  26. package/build/src/akuma/heart/schema.js +55 -8
  27. package/build/src/akuma/heart/storage.d.ts +33 -0
  28. package/build/src/akuma/heart/storage.js +164 -0
  29. package/build/src/akuma/heart/tells.d.ts +12 -0
  30. package/build/src/akuma/heart/tells.js +79 -0
  31. package/build/src/akuma/heart/timeline.d.ts +15 -0
  32. package/build/src/akuma/heart/timeline.js +86 -0
  33. package/build/src/akuma/index.d.ts +4 -2
  34. package/build/src/akuma/index.js +1 -1
  35. package/build/src/akuma/projection.d.ts +97 -0
  36. package/build/src/akuma/projection.js +145 -0
  37. package/build/src/akuma/provider.d.ts +57 -11
  38. package/build/src/akuma/provider.js +57 -37
  39. package/build/src/akuma/providers/{claude.d.ts → claude/events.d.ts} +9 -41
  40. package/build/src/akuma/providers/claude/events.js +185 -0
  41. package/build/src/akuma/providers/claude/index.d.ts +46 -0
  42. package/build/src/akuma/providers/claude/index.js +265 -0
  43. package/build/src/akuma/providers/claude/input.d.ts +13 -0
  44. package/build/src/akuma/providers/claude/input.js +109 -0
  45. package/build/src/akuma/providers/codex-app-server/events.d.ts +1 -1
  46. package/build/src/akuma/providers/codex-app-server/events.js +12 -12
  47. package/build/src/akuma/providers/codex-app-server/index.d.ts +13 -11
  48. package/build/src/akuma/providers/codex-app-server/index.js +73 -22
  49. package/build/src/akuma/providers/index.js +22 -8
  50. package/build/src/akuma/providers/opencode-sdk/events.d.ts +48 -0
  51. package/build/src/akuma/providers/opencode-sdk/events.js +116 -0
  52. package/build/src/akuma/providers/opencode-sdk/index.d.ts +32 -0
  53. package/build/src/akuma/providers/opencode-sdk/index.js +203 -0
  54. package/build/src/akuma/providers/opencode-sdk/session.d.ts +41 -0
  55. package/build/src/akuma/providers/opencode-sdk/session.js +62 -0
  56. package/build/src/akuma/providers/pi/events.d.ts +33 -0
  57. package/build/src/akuma/providers/pi/events.js +128 -0
  58. package/build/src/akuma/providers/pi/index.d.ts +11 -0
  59. package/build/src/akuma/providers/pi/index.js +162 -0
  60. package/build/src/akuma/requests.d.ts +1 -0
  61. package/build/src/akuma/requests.js +5 -2
  62. package/build/src/alias/index.d.ts +4 -3
  63. package/build/src/alias/index.js +2 -3
  64. package/build/src/body/render.js +2 -1
  65. package/build/src/body/shape.js +7 -1
  66. package/build/src/body/verification.js +19 -4
  67. package/build/src/cli/accepted.d.ts +2 -0
  68. package/build/src/cli/accepted.js +2 -1
  69. package/build/src/cli/commands/akuma-invoke.d.ts +42 -18
  70. package/build/src/cli/commands/akuma-invoke.js +94 -50
  71. package/build/src/cli/commands/akuma.d.ts +15 -7
  72. package/build/src/cli/commands/akuma.js +94 -56
  73. package/build/src/cli/commands/contract.d.ts +142 -0
  74. package/build/src/cli/commands/contract.js +14 -0
  75. package/build/src/cli/commands/install.js +2 -0
  76. package/build/src/cli/commands/task-invoke.d.ts +3 -1
  77. package/build/src/cli/commands/task-invoke.js +27 -2
  78. package/build/src/cli/commands/task.js +2 -2
  79. package/build/src/cli/invoke.d.ts +6 -1
  80. package/build/src/cli/invoke.js +241 -43
  81. package/build/src/cli/main.js +20 -1
  82. package/build/src/cli/parse.d.ts +13 -116
  83. package/build/src/cli/parse.js +51 -78
  84. package/build/src/cli/render/akuma-tool.d.ts +2 -0
  85. package/build/src/cli/render/akuma-tool.js +6 -2
  86. package/build/src/cli/render/akuma.d.ts +2 -1
  87. package/build/src/cli/render/akuma.js +157 -217
  88. package/build/src/cli/render/catalog.d.ts +2 -0
  89. package/build/src/cli/render/catalog.js +16 -0
  90. package/build/src/cli/render/contract.d.ts +1 -1
  91. package/build/src/cli/render/contract.js +38 -5
  92. package/build/src/cli/render/kanshi.js +53 -5
  93. package/build/src/cli/render/refusal.js +17 -0
  94. package/build/src/cli/render/terminal.d.ts +13 -0
  95. package/build/src/cli/render/terminal.js +75 -0
  96. package/build/src/cli/render/text.js +5 -0
  97. package/build/src/cli/result.d.ts +15 -3
  98. package/build/src/contract-worktree.d.ts +43 -0
  99. package/build/src/contract-worktree.js +213 -0
  100. package/build/src/coordination/durable-file.d.ts +3 -0
  101. package/build/src/coordination/durable-file.js +44 -1
  102. package/build/src/core/facts/codec.js +23 -4
  103. package/build/src/core/facts/eligibility.d.ts +1 -10
  104. package/build/src/core/facts/eligibility.js +0 -49
  105. package/build/src/core/facts/observation.d.ts +3 -0
  106. package/build/src/core/facts/observation.js +12 -0
  107. package/build/src/core/facts/types.d.ts +10 -3
  108. package/build/src/core/subject.js +2 -2
  109. package/build/src/core/verbs/amend.js +12 -16
  110. package/build/src/core/verbs/bind.js +2 -16
  111. package/build/src/core/verbs/deliver.js +20 -4
  112. package/build/src/core/verbs/placement.js +3 -8
  113. package/build/src/dispatch/index.d.ts +3 -1
  114. package/build/src/dispatch/index.js +14 -5
  115. package/build/src/duration.d.ts +10 -0
  116. package/build/src/duration.js +22 -0
  117. package/build/src/git/admission.d.ts +2 -2
  118. package/build/src/git/admission.js +26 -16
  119. package/build/src/git/hooks.d.ts +15 -0
  120. package/build/src/git/hooks.js +57 -5
  121. package/build/src/git/identity.d.ts +5 -1
  122. package/build/src/git/identity.js +23 -4
  123. package/build/src/git/integration.d.ts +49 -0
  124. package/build/src/git/integration.js +214 -0
  125. package/build/src/git/observe.d.ts +25 -13
  126. package/build/src/git/observe.js +175 -72
  127. package/build/src/git/read-observation.d.ts +41 -0
  128. package/build/src/git/read-observation.js +361 -0
  129. package/build/src/git/reconcile.d.ts +15 -5
  130. package/build/src/git/reconcile.js +238 -85
  131. package/build/src/git/repository.d.ts +19 -4
  132. package/build/src/git/repository.js +77 -43
  133. package/build/src/git/scratch.d.ts +13 -0
  134. package/build/src/git/scratch.js +66 -0
  135. package/build/src/git/target-placement.d.ts +56 -0
  136. package/build/src/git/target-placement.js +255 -0
  137. package/build/src/git/tender.d.ts +48 -0
  138. package/build/src/git/tender.js +82 -0
  139. package/build/src/git/terminal-seal.d.ts +24 -0
  140. package/build/src/git/terminal-seal.js +87 -0
  141. package/build/src/git/tree.d.ts +2 -2
  142. package/build/src/git/tree.js +4 -0
  143. package/build/src/git/workspace.d.ts +21 -0
  144. package/build/src/git/workspace.js +104 -0
  145. package/build/src/identity/selector.d.ts +6 -0
  146. package/build/src/identity/selector.js +19 -0
  147. package/build/src/index.d.ts +4 -2
  148. package/build/src/index.js +2 -1
  149. package/build/src/kanshi/index.d.ts +1 -1
  150. package/build/src/kanshi/read.d.ts +5 -2
  151. package/build/src/kanshi/read.js +154 -45
  152. package/build/src/kanshi/report.d.ts +31 -6
  153. package/build/src/kanshi/select.js +1 -1
  154. package/build/src/library/address.d.ts +48 -0
  155. package/build/src/library/address.js +134 -0
  156. package/build/src/library/akuma-creation.d.ts +10 -6
  157. package/build/src/library/akuma-creation.js +12 -11
  158. package/build/src/library/bind.d.ts +21 -0
  159. package/build/src/library/bind.js +56 -0
  160. package/build/src/library/catalog.d.ts +58 -0
  161. package/build/src/library/catalog.js +72 -0
  162. package/build/src/library/configuration.d.ts +6 -15
  163. package/build/src/library/configuration.js +14 -17
  164. package/build/src/library/contract.d.ts +21 -46
  165. package/build/src/library/contract.js +193 -183
  166. package/build/src/library/delivery.d.ts +23 -0
  167. package/build/src/library/delivery.js +21 -0
  168. package/build/src/library/fleet.d.ts +65 -0
  169. package/build/src/library/fleet.js +189 -0
  170. package/build/src/library/input.d.ts +3 -0
  171. package/build/src/library/input.js +19 -0
  172. package/build/src/library/keiyaku.d.ts +16 -2
  173. package/build/src/library/keiyaku.js +11 -1
  174. package/build/src/library/mutation.d.ts +38 -0
  175. package/build/src/library/mutation.js +39 -0
  176. package/build/src/library/refusal.d.ts +21 -0
  177. package/build/src/library/refusal.js +29 -0
  178. package/build/src/library/region.d.ts +2 -1
  179. package/build/src/library/region.js +3 -3
  180. package/build/src/library/repo.d.ts +4 -1
  181. package/build/src/library/repo.js +31 -16
  182. package/build/src/protocol/attempt.d.ts +16 -3
  183. package/build/src/protocol/attempt.js +39 -8
  184. package/build/src/protocol/bind.d.ts +9 -2
  185. package/build/src/protocol/bind.js +47 -39
  186. package/build/src/protocol/intent.d.ts +42 -18
  187. package/build/src/protocol/intent.js +36 -75
  188. package/build/src/protocol/operations.d.ts +93 -35
  189. package/build/src/protocol/operations.js +235 -123
  190. package/build/src/protocol/outcome.d.ts +7 -2
  191. package/build/src/protocol/outcome.js +9 -3
  192. package/build/src/protocol/placement.d.ts +30 -0
  193. package/build/src/protocol/placement.js +114 -0
  194. package/build/src/protocol/read/audit.d.ts +9 -3
  195. package/build/src/protocol/read/audit.js +25 -9
  196. package/build/src/protocol/read/documents.d.ts +2 -2
  197. package/build/src/protocol/read/documents.js +4 -4
  198. package/build/src/protocol/read/status.d.ts +11 -5
  199. package/build/src/protocol/read/status.js +28 -15
  200. package/build/src/protocol/run.d.ts +49 -7
  201. package/build/src/protocol/run.js +53 -25
  202. package/build/src/runtime/proc/line-rpc.d.ts +1 -0
  203. package/build/src/runtime/proc/line-rpc.js +21 -0
  204. package/build/src/runtime/proc/run.d.ts +18 -2
  205. package/build/src/runtime/proc/run.js +34 -8
  206. package/build/src/settings.d.ts +6 -0
  207. package/build/src/settings.js +29 -14
  208. package/build/src/settlement/fence.d.ts +9 -0
  209. package/build/src/settlement/fence.js +23 -0
  210. package/build/src/settlement/holder.d.ts +25 -4
  211. package/build/src/settlement/holder.js +102 -28
  212. package/build/src/settlement/settle.d.ts +8 -0
  213. package/build/src/settlement/settle.js +102 -28
  214. package/build/src/task/board.d.ts +20 -2
  215. package/build/src/task/board.js +11 -1
  216. package/build/src/task/compose.d.ts +2 -2
  217. package/build/src/task/compose.js +2 -2
  218. package/build/src/task/context.js +2 -7
  219. package/build/src/task/index.d.ts +9 -9
  220. package/build/src/task/index.js +15 -12
  221. package/build/src/task/operations.d.ts +31 -12
  222. package/build/src/task/operations.js +8 -4
  223. package/build/src/task/store.d.ts +4 -6
  224. package/build/src/task/store.js +3 -3
  225. package/build/src/verification/declaration.d.ts +1 -0
  226. package/build/src/verification/execution.d.ts +49 -0
  227. package/build/src/verification/execution.js +104 -0
  228. package/build/src/world.d.ts +13 -0
  229. package/build/src/world.js +103 -0
  230. package/package.json +7 -4
  231. package/build/src/akuma/activity.d.ts +0 -66
  232. package/build/src/akuma/activity.js +0 -139
  233. package/build/src/akuma/providers/claude.js +0 -305
  234. package/build/src/context-root.d.ts +0 -4
  235. package/build/src/context-root.js +0 -15
  236. package/build/src/git/delivery.d.ts +0 -20
  237. package/build/src/git/delivery.js +0 -109
  238. package/build/src/git/verification.d.ts +0 -14
  239. package/build/src/git/verification.js +0 -56
  240. package/build/src/verification/producer.d.ts +0 -23
  241. package/build/src/verification/producer.js +0 -54
@@ -1,9 +1,11 @@
1
- import { type DeliveryPreparationRefusal, type ReviewPreparationRefusal } from "../git/delivery.js";
1
+ import { type IntegrationPreparationRefusal } from "../git/integration.js";
2
+ import { type DirtyWorkspaceRefusal, type WorkspaceDirtyDelta } from "../git/tender.js";
2
3
  import { type ReconcileResult } from "../git/reconcile.js";
3
4
  import type { WorktreeHooks } from "../git/hooks.js";
4
5
  import { NoGitWorldError, type GitRepository } from "../git/repository.js";
5
- import type { WorktreeLeak } from "../git/verification.js";
6
- import type { ActorId, AmendData, ArcData, AttestationData, ChangeId, ContractId, ContractState, ContractTerms, DocumentKey, SnapshotId } from "../core/facts/types.js";
6
+ import { type GitDecodeChannel, type GitTreeSelection } from "../git/read-observation.js";
7
+ import type { WorktreeLeak } from "../git/scratch.js";
8
+ import type { ActorId, AmendData, ArcData, AttestationData, ContractId, ContractState, ContractTerms, DeliverData, DocumentKey, SnapshotId } from "../core/facts/types.js";
7
9
  import { type AbandonRefusal } from "../core/verbs/abandon.js";
8
10
  import { type AmendRefusal } from "../core/verbs/amend.js";
9
11
  import { type ArcRefusal } from "../core/verbs/arc.js";
@@ -11,7 +13,8 @@ import { type DeliverRefusal } from "../core/verbs/deliver.js";
11
13
  import type { PlacementRefusal } from "../core/verbs/placement.js";
12
14
  import { type AttestationRefusal } from "../core/verbs/attestation.js";
13
15
  import type { VerificationDeclarationPreparation, VerificationDeclarationRefusal } from "../verification/declaration.js";
14
- import { type VerificationRuntimeStop } from "./intent.js";
16
+ import { type VerificationRuntimeStop, type VerificationCleanupFailure } from "./intent.js";
17
+ import type { TargetPlacementRefusal } from "../git/target-placement.js";
15
18
  import { type AuditReport as AuditReadReport } from "./read/audit.js";
16
19
  import { type ContractDocumentProjection } from "./read/documents.js";
17
20
  import { type ContractBoard, type ContractDisposition, type ContractGateCurrent, type ContractGateReport, type ContractObservation, type ContractPhase, type ContractRow } from "./read/status.js";
@@ -22,6 +25,14 @@ import type { ProtocolTerminal } from "./run.js";
22
25
  import type { CompanionDecorator } from "./run.js";
23
26
  export type { FactKind, TimelineEntry } from "./read/audit.js";
24
27
  export type { ContractDocumentProjection } from "./read/documents.js";
28
+ type DeliveryPreparationRefusal = Readonly<{
29
+ kind: "target-missing" | "worktree-missing";
30
+ contractId: ContractId;
31
+ }> | DirtyWorkspaceRefusal | IntegrationPreparationRefusal | TargetPlacementRefusal;
32
+ type ReviewPreparationRefusal = Readonly<{
33
+ kind: "target-missing" | "worktree-missing";
34
+ contractId: ContractId;
35
+ }> | DirtyWorkspaceRefusal | IntegrationPreparationRefusal;
25
36
  type ReviewRefusal = AttestationRefusal | ReviewPreparationRefusal;
26
37
  export type IntentRefusal = AbandonRefusal | AmendRefusal | ArcRefusal | BindRefusal | DeliverRefusal | DeliveryPreparationRefusal | PlacementRefusal | ReviewRefusal | TargetInputRefusal | VerificationDeclarationRefusal;
27
38
  export type { TargetInputRefusal } from "./bind.js";
@@ -32,8 +43,12 @@ type OperationInput = Readonly<{
32
43
  contractId: ContractId;
33
44
  actor?: ActorId;
34
45
  }>;
46
+ type MutationOperationInput = OperationInput & Readonly<{
47
+ channel: GitDecodeChannel;
48
+ }>;
35
49
  export type AuditReport = AuditReadReport & Readonly<{
36
50
  attempt?: VerificationStop;
51
+ cleanup?: VerificationCleanupFailure;
37
52
  leak?: WorktreeLeak;
38
53
  }>;
39
54
  export type DocumentDerivation = Readonly<{
@@ -49,7 +64,16 @@ export type StepStop<R> = Readonly<{
49
64
  refusal?: never;
50
65
  }>;
51
66
  export type VerificationStop = StepStop<AttestationRefusal> | VerificationRuntimeStop;
52
- export type PlacementStop = StepStop<PlacementRefusal>;
67
+ export type PlacementStop = StepStop<PlacementRefusal | TargetPlacementRefusal> | Readonly<{
68
+ failure: "target-moved";
69
+ contractId: ContractId;
70
+ target: string;
71
+ expected: SnapshotId;
72
+ observed: SnapshotId | null;
73
+ }> | Readonly<{
74
+ failure: "target-placement-failed";
75
+ diagnostic: string;
76
+ }>;
53
77
  type ScopeOperationInput = Readonly<{
54
78
  coordinate: string;
55
79
  }>;
@@ -61,61 +85,93 @@ export declare function currentBranchOperation(input: Readonly<{
61
85
  }>): string | null;
62
86
  export declare function contractsOperation(input: Readonly<{
63
87
  scope: RepositoryScope;
64
- }>): ContractBoard;
65
- export declare function contractObservationOperation(input: OperationInput): ContractObservation;
88
+ channel: GitDecodeChannel;
89
+ }>): Promise<ContractBoard>;
90
+ export declare function contractObservationOperation(input: MutationOperationInput): Promise<ContractObservation>;
66
91
  export type { ContractBoard, ContractDisposition, ContractGateCurrent, ContractGateReport, ContractObservation, ContractPhase, ContractRow };
67
- export declare function documentsOperation(input: Readonly<{
68
- scope: RepositoryScope;
69
- }>): readonly ContractDocumentProjection[];
70
- export declare function stateOperation(input: OperationInput): ContractState;
71
- export declare function readStateOperation(input: OperationInput): ContractState | null;
72
- type DeliveryIdentity = Readonly<{
73
- snapshotId: SnapshotId;
74
- changeId: ChangeId;
75
- expectedPredecessor: SnapshotId;
76
- }>;
77
- export declare function deliveryOperation(input: OperationInput): DeliveryIdentity | null;
92
+ export declare function documentsOperationAt(scope: RepositoryScope, channel: GitDecodeChannel): Promise<readonly ContractDocumentProjection[]>;
93
+ export declare function stateOperation(input: MutationOperationInput): Promise<ContractState>;
94
+ type DeliveryIdentity = DeliverData;
95
+ export declare function deliveryOperation(input: MutationOperationInput): Promise<DeliveryIdentity | null>;
78
96
  type DeliveryDiffOperationInput = Readonly<{
79
97
  scope: RepositoryScope;
80
- expectedPredecessor: SnapshotId;
81
- snapshotId: SnapshotId;
98
+ integrationPredecessor: SnapshotId;
99
+ integrationSnapshot: SnapshotId;
82
100
  }>;
83
101
  export declare function deliveryDiffOperation(input: DeliveryDiffOperationInput): Promise<string | null>;
84
- type AmendOperationInput = OperationInput & Readonly<{
85
- amendment?: Readonly<{
86
- source: ContractTerms;
102
+ type AmendOperationInput = MutationOperationInput & Readonly<{
103
+ source?: ContractTerms;
104
+ deriveAmendment?: (source: ContractTerms) => Readonly<{
87
105
  terms: AmendData;
88
106
  verification: VerificationDeclarationPreparation;
89
107
  }>;
90
108
  }>;
91
- export declare function amendOperation(input: AmendOperationInput): IntentOutcome<void, AmendRefusal | VerificationDeclarationRefusal>;
109
+ type Amendment = Readonly<{
110
+ source: ContractTerms;
111
+ }> & ReturnType<NonNullable<AmendOperationInput["deriveAmendment"]>>;
112
+ export declare function amendOperation(input: AmendOperationInput): Promise<IntentOutcome<Amendment, AmendRefusal | VerificationDeclarationRefusal>>;
92
113
  export type DeliverValue = DeliveryIdentity & Readonly<{
93
114
  verification?: VerificationStop;
94
115
  placement?: PlacementStop;
116
+ cleanup?: VerificationCleanupFailure;
95
117
  leak?: WorktreeLeak;
96
118
  }>;
97
- type DeliverOperationInput = OperationInput & Readonly<{
98
- derivation?: DocumentDerivation;
119
+ type DeliverOperationInput = MutationOperationInput & Readonly<{
120
+ deriveDocument?: (state: ContractState) => DocumentDerivation;
99
121
  message?: string;
122
+ requireBranchesToBeUpToDate: boolean;
123
+ includeDirty: boolean;
124
+ signal?: AbortSignal;
100
125
  }>;
126
+ export declare function prepareDelivery(repository: GitRepository, stage: Readonly<{
127
+ contractId: ContractId;
128
+ coordinates: ContractState["coordinates"];
129
+ }>, input: Readonly<{
130
+ title: string;
131
+ message?: string;
132
+ requireBranchesToBeUpToDate?: boolean;
133
+ includeDirty?: boolean;
134
+ }>): {
135
+ kind: "prepared";
136
+ data: DeliverData;
137
+ } | {
138
+ kind: "refused";
139
+ refusal: DeliveryPreparationRefusal;
140
+ };
141
+ export declare function prepareReview(repository: GitRepository, stage: Readonly<{
142
+ contractId: ContractId;
143
+ coordinates: ContractState["coordinates"];
144
+ }>): {
145
+ kind: "prepared";
146
+ data: Readonly<{
147
+ changeId: DeliverData["integration"]["changeId"];
148
+ workspace?: WorkspaceDirtyDelta;
149
+ }>;
150
+ } | {
151
+ kind: "refused";
152
+ refusal: ReviewPreparationRefusal;
153
+ };
101
154
  export declare function deliverOperation(input: DeliverOperationInput): Promise<IntentOutcome<DeliverValue>>;
102
- export declare function abandonOperation(input: OperationInput & Readonly<{
155
+ export declare function abandonOperation(input: MutationOperationInput & Readonly<{
103
156
  note?: string;
104
157
  decorateOffer?: CompanionDecorator;
105
- }>): IntentOutcome<void, AbandonRefusal>;
106
- export declare function arcOperation(input: OperationInput & Readonly<{
158
+ observationSelection?: GitTreeSelection;
159
+ }>): Promise<IntentOutcome<void, AbandonRefusal>>;
160
+ export declare function arcOperation(input: MutationOperationInput & Readonly<{
107
161
  chapter: Omit<ArcData, "seq">;
108
- }>): IntentOutcome<void, ArcRefusal>;
109
- type ReviewOperationInput = OperationInput & Readonly<{
162
+ }>): Promise<IntentOutcome<void, ArcRefusal>>;
163
+ type ReviewOperationInput = MutationOperationInput & Readonly<{
110
164
  verdict: AttestationData["verdict"];
111
165
  summary?: string;
112
166
  }>;
113
167
  export type ReviewValue = Readonly<{
114
168
  placement?: PlacementStop;
169
+ workspace?: WorkspaceDirtyDelta;
115
170
  }>;
116
- export declare function reviewOperation(input: ReviewOperationInput): IntentOutcome<ReviewValue, ReviewRefusal>;
117
- export declare function auditOperation(input: OperationInput & Readonly<{
118
- derivation?: DocumentDerivation;
171
+ export declare function reviewOperation(input: ReviewOperationInput): Promise<IntentOutcome<ReviewValue, ReviewRefusal>>;
172
+ export declare function auditOperation(input: MutationOperationInput & Readonly<{
173
+ deriveDocument?: (state: ContractState) => DocumentDerivation;
174
+ signal?: AbortSignal;
119
175
  }>): Promise<IntentOutcome<AuditReport>>;
120
176
  export type ReconcileReport = ReconcileResult;
121
177
  export type ReconcileObservation = Readonly<{
@@ -125,8 +181,9 @@ export type ReconcileObservation = Readonly<{
125
181
  type ReconcileOptions = Readonly<{
126
182
  hooks: WorktreeHooks;
127
183
  retryHooks: boolean;
184
+ retainTerminalWorktree?: boolean;
128
185
  }>;
129
- export declare function reconcileOperation(input: OperationInput & ReconcileOptions): Promise<ReconcileObservation>;
186
+ export declare function reconcileOperation(input: MutationOperationInput & ReconcileOptions): Promise<ReconcileObservation>;
130
187
  type RepoReconcileItem = Readonly<{
131
188
  contractId: ContractId;
132
189
  state: ContractState | null;
@@ -137,4 +194,5 @@ export type RepoReconcileReport = Readonly<{
137
194
  }>;
138
195
  export declare function reconcileAllOperation(input: Readonly<{
139
196
  scope: RepositoryScope;
197
+ channel: GitDecodeChannel;
140
198
  }> & ReconcileOptions): Promise<RepoReconcileReport>;