@astrosheep/keiyaku 4.6.27 → 4.6.28

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 (285) hide show
  1. package/README.md +76 -35
  2. package/build/plugins/claude/.claude-plugin/plugin.json +1 -1
  3. package/build/plugins/claude/skills/keiyaku-akuma/SKILL.md +39 -4
  4. package/build/plugins/claude/skills/keiyaku-akuma/references/automation.md +4 -7
  5. package/build/plugins/claude/skills/keiyaku-babysit/SKILL.md +1 -1
  6. package/build/plugins/claude/skills/keiyaku-bind/SKILL.md +39 -15
  7. package/build/plugins/claude/skills/keiyaku-workflow/SKILL.md +42 -22
  8. package/build/plugins/codex/.codex-plugin/plugin.json +1 -1
  9. package/build/plugins/codex/skills/keiyaku-akuma/SKILL.md +39 -4
  10. package/build/plugins/codex/skills/keiyaku-akuma/references/automation.md +4 -7
  11. package/build/plugins/codex/skills/keiyaku-babysit/SKILL.md +1 -1
  12. package/build/plugins/codex/skills/keiyaku-bind/SKILL.md +39 -15
  13. package/build/plugins/codex/skills/keiyaku-workflow/SKILL.md +42 -22
  14. package/build/plugins/opencode/package.json +1 -1
  15. package/build/plugins/opencode/skills/keiyaku-akuma/SKILL.md +39 -4
  16. package/build/plugins/opencode/skills/keiyaku-akuma/references/automation.md +4 -7
  17. package/build/plugins/opencode/skills/keiyaku-babysit/SKILL.md +1 -1
  18. package/build/plugins/opencode/skills/keiyaku-bind/SKILL.md +39 -15
  19. package/build/plugins/opencode/skills/keiyaku-workflow/SKILL.md +42 -22
  20. package/build/plugins/pi/README.md +7 -12
  21. package/build/plugins/pi/akuma-tools.ts +3 -18
  22. package/build/skills/keiyaku-akuma/SKILL.md +39 -4
  23. package/build/skills/keiyaku-akuma/references/automation.md +4 -7
  24. package/build/skills/keiyaku-babysit/SKILL.md +1 -1
  25. package/build/skills/keiyaku-bind/SKILL.md +39 -15
  26. package/build/skills/keiyaku-workflow/SKILL.md +42 -22
  27. package/build/src/akuma/akuma-call.d.ts +15 -18
  28. package/build/src/akuma/akuma-call.js +55 -112
  29. package/build/src/akuma/akuma-errors.d.ts +0 -5
  30. package/build/src/akuma/akuma-errors.js +0 -9
  31. package/build/src/akuma/akuma-instance.d.ts +0 -2
  32. package/build/src/akuma/akuma-instance.js +18 -14
  33. package/build/src/akuma/akuma-observe.js +0 -1
  34. package/build/src/akuma/akuma-owner.js +0 -1
  35. package/build/src/akuma/akuma.d.ts +10 -26
  36. package/build/src/akuma/akuma.js +0 -2
  37. package/build/src/akuma/archetype.d.ts +0 -2
  38. package/build/src/akuma/archetype.js +3 -9
  39. package/build/src/akuma/body-launch.d.ts +12 -4
  40. package/build/src/akuma/body.d.ts +2 -5
  41. package/build/src/akuma/body.js +5 -49
  42. package/build/src/akuma/call-initial-tell.d.ts +39 -147
  43. package/build/src/akuma/call-initial-tell.js +0 -48
  44. package/build/src/akuma/caller.d.ts +0 -4
  45. package/build/src/akuma/custody.js +1 -57
  46. package/build/src/akuma/heart/facts.d.ts +0 -39
  47. package/build/src/akuma/heart/facts.js +0 -1
  48. package/build/src/akuma/heart/index.d.ts +1 -2
  49. package/build/src/akuma/heart/index.js +0 -1
  50. package/build/src/akuma/heart/schema.js +0 -26
  51. package/build/src/akuma/heart/soul.d.ts +2 -2
  52. package/build/src/akuma/heart/soul.js +2 -4
  53. package/build/src/akuma/identity.d.ts +0 -1
  54. package/build/src/akuma/identity.js +0 -2
  55. package/build/src/akuma/in-process-body.d.ts +1 -1
  56. package/build/src/akuma/index.d.ts +0 -2
  57. package/build/src/akuma/index.js +0 -1
  58. package/build/src/akuma/projection.d.ts +23 -23
  59. package/build/src/akuma/provider.d.ts +0 -5
  60. package/build/src/akuma/provider.js +0 -1
  61. package/build/src/akuma/providers/acp/core.js +1 -1
  62. package/build/src/akuma/providers/claude/index.js +1 -2
  63. package/build/src/akuma/providers/codex-app-server/index.js +1 -1
  64. package/build/src/akuma/providers/execution-environment.d.ts +1 -3
  65. package/build/src/akuma/providers/execution-environment.js +1 -7
  66. package/build/src/akuma/providers/opencode-sdk/index.js +0 -1
  67. package/build/src/akuma/providers/opencode-sdk/session.d.ts +0 -1
  68. package/build/src/akuma/providers/opencode-sdk/session.js +4 -4
  69. package/build/src/akuma/providers/paseo/index.js +2 -9
  70. package/build/src/akuma/providers/pi/index.js +8 -14
  71. package/build/src/akuma/publication.d.ts +24 -59
  72. package/build/src/akuma/publication.js +29 -64
  73. package/build/src/akuma/selection-observation.d.ts +47 -2036
  74. package/build/src/akuma/selection-observation.js +1 -59
  75. package/build/src/akuma/turn-drive.d.ts +0 -8
  76. package/build/src/akuma/turn-drive.js +19 -103
  77. package/build/src/akuma-body.js +3 -6
  78. package/build/src/body-host.d.ts +8 -2
  79. package/build/src/body-host.js +30 -4
  80. package/build/src/cli/commands/akuma-grammar.d.ts +0 -2
  81. package/build/src/cli/commands/akuma-grammar.js +10 -33
  82. package/build/src/cli/commands/akuma.js +31 -49
  83. package/build/src/cli/commands/contract-grammar.d.ts +7 -1
  84. package/build/src/cli/commands/contract-grammar.js +15 -0
  85. package/build/src/cli/commands/contract-help.d.ts +13 -1
  86. package/build/src/cli/commands/contract-help.js +47 -16
  87. package/build/src/cli/commands/contract.js +27 -26
  88. package/build/src/cli/commands/debt.js +3 -3
  89. package/build/src/cli/commands/whoami.d.ts +0 -2
  90. package/build/src/cli/commands/whoami.js +0 -5
  91. package/build/src/cli/coordinates.js +15 -0
  92. package/build/src/cli/delivery-identity.d.ts +3 -0
  93. package/build/src/cli/delivery-identity.js +23 -0
  94. package/build/src/cli/parse.js +1 -0
  95. package/build/src/cli/render/akuma-activity.d.ts +0 -1
  96. package/build/src/cli/render/akuma-activity.js +1 -4
  97. package/build/src/cli/render/catalog.js +7 -1
  98. package/build/src/cli/render/contract-history.js +16 -38
  99. package/build/src/cli/render/contract-observation.d.ts +23 -10
  100. package/build/src/cli/render/contract-observation.js +9 -6
  101. package/build/src/cli/render/contract-wait.d.ts +2 -0
  102. package/build/src/cli/render/contract-wait.js +18 -0
  103. package/build/src/cli/render/contract.d.ts +2 -2
  104. package/build/src/cli/render/contract.js +57 -39
  105. package/build/src/cli/render/delivery-preview.js +13 -26
  106. package/build/src/cli/render/execution-progress.js +9 -9
  107. package/build/src/cli/render/kanshi.js +4 -11
  108. package/build/src/cli/render/receipt.d.ts +18 -0
  109. package/build/src/cli/render/receipt.js +34 -10
  110. package/build/src/cli/render/reconcile.js +3 -0
  111. package/build/src/cli/render/refusal.js +28 -6
  112. package/build/src/cli/render/whoami.js +1 -4
  113. package/build/src/cli/runtime.d.ts +0 -2
  114. package/build/src/cli/runtime.js +3 -7
  115. package/build/src/cli/selectors.d.ts +1 -2
  116. package/build/src/cli/selectors.js +2 -5
  117. package/build/src/contract-guidance.js +4 -2
  118. package/build/src/contract-worktree.d.ts +3 -3
  119. package/build/src/core/facts/codec.js +38 -5
  120. package/build/src/core/facts/fold.js +1 -0
  121. package/build/src/core/facts/gate.d.ts +10 -4
  122. package/build/src/core/facts/gate.js +56 -39
  123. package/build/src/core/facts/observation.d.ts +7 -1
  124. package/build/src/core/facts/observation.js +15 -0
  125. package/build/src/core/facts/offer.d.ts +2 -2
  126. package/build/src/core/facts/types.d.ts +17 -1
  127. package/build/src/core/facts/types.js +6 -0
  128. package/build/src/core/verbs/amend.js +8 -0
  129. package/build/src/core/verbs/bind.d.ts +3 -1
  130. package/build/src/core/verbs/bind.js +9 -1
  131. package/build/src/core/verbs/deliver.d.ts +2 -1
  132. package/build/src/core/verbs/deliver.js +4 -1
  133. package/build/src/core/verbs/placement.d.ts +2 -1
  134. package/build/src/core/verbs/placement.js +7 -4
  135. package/build/src/core/verbs/reintegrate.d.ts +2 -1
  136. package/build/src/core/verbs/reintegrate.js +4 -1
  137. package/build/src/debt/board.d.ts +10 -10
  138. package/build/src/debt/created-observation.d.ts +3 -3
  139. package/build/src/debt/document.d.ts +1 -1
  140. package/build/src/debt/index.d.ts +2 -24
  141. package/build/src/debt/index.js +11 -71
  142. package/build/src/debt/operation-types.d.ts +44 -3
  143. package/build/src/git/admission.js +18 -6
  144. package/build/src/git/integration.d.ts +4 -4
  145. package/build/src/git/integration.js +7 -1
  146. package/build/src/git/observe.d.ts +6 -4
  147. package/build/src/git/observe.js +18 -17
  148. package/build/src/git/reconcile.d.ts +20 -8
  149. package/build/src/git/reconcile.js +94 -45
  150. package/build/src/git/repository.d.ts +3 -1
  151. package/build/src/git/repository.js +26 -4
  152. package/build/src/git/scratch.d.ts +1 -1
  153. package/build/src/git/scratch.js +19 -18
  154. package/build/src/git/target-placement.d.ts +33 -7
  155. package/build/src/git/target-placement.js +67 -18
  156. package/build/src/git/target.d.ts +32 -0
  157. package/build/src/git/target.js +84 -0
  158. package/build/src/git/terminal-reconcile.d.ts +1 -1
  159. package/build/src/git/terminal-reconcile.js +34 -6
  160. package/build/src/index.d.ts +9 -7
  161. package/build/src/index.js +1 -1
  162. package/build/src/library/address.d.ts +1 -20
  163. package/build/src/library/address.js +3 -24
  164. package/build/src/library/akuma-creation.d.ts +2 -5
  165. package/build/src/library/akuma-creation.js +60 -44
  166. package/build/src/library/akumas.d.ts +3 -9
  167. package/build/src/library/akumas.js +12 -25
  168. package/build/src/library/bind.d.ts +21 -9
  169. package/build/src/library/bind.js +5 -1
  170. package/build/src/library/continuation.d.ts +130 -155
  171. package/build/src/library/continuation.js +1 -4
  172. package/build/src/library/contract-composition.d.ts +4 -9
  173. package/build/src/library/contract-composition.js +8 -12
  174. package/build/src/library/contract-creation.d.ts +1 -3
  175. package/build/src/library/contract-creation.js +2 -3
  176. package/build/src/library/contract-execution.d.ts +3 -5
  177. package/build/src/library/contract-execution.js +55 -96
  178. package/build/src/library/contract-outcomes.d.ts +2 -1
  179. package/build/src/library/contract-types.d.ts +5 -0
  180. package/build/src/library/contract-wait.d.ts +35 -0
  181. package/build/src/library/contract-wait.js +141 -0
  182. package/build/src/library/delivery.d.ts +13 -525
  183. package/build/src/library/delivery.js +1 -12
  184. package/build/src/library/input.js +2 -1
  185. package/build/src/library/invocation.d.ts +5 -1
  186. package/build/src/library/invocation.js +9 -2
  187. package/build/src/library/keiyaku.d.ts +7 -6
  188. package/build/src/library/keiyaku.js +12 -7
  189. package/build/src/library/outcome.d.ts +461 -12586
  190. package/build/src/library/outcome.js +15 -234
  191. package/build/src/library/reconcile.d.ts +12 -0
  192. package/build/src/library/reconcile.js +1 -0
  193. package/build/src/library/refusal.d.ts +251 -34
  194. package/build/src/library/refusal.js +10 -5
  195. package/build/src/library/selection.d.ts +9 -35
  196. package/build/src/library/selection.js +59 -129
  197. package/build/src/plugin/akuma-signals.d.ts +2 -2
  198. package/build/src/plugin/akuma-signals.js +2 -2
  199. package/build/src/plugin/public.d.ts +0 -7
  200. package/build/src/plugin/runtime.d.ts +2 -2
  201. package/build/src/plugin/runtime.js +4 -3
  202. package/build/src/protocol/attempt.js +7 -3
  203. package/build/src/protocol/bind.d.ts +18 -4
  204. package/build/src/protocol/bind.js +102 -35
  205. package/build/src/protocol/completion.d.ts +18 -331
  206. package/build/src/protocol/completion.js +17 -130
  207. package/build/src/protocol/deliver.d.ts +3 -3
  208. package/build/src/protocol/deliver.js +64 -74
  209. package/build/src/protocol/delivery-preview.d.ts +85 -28
  210. package/build/src/protocol/delivery-preview.js +34 -22
  211. package/build/src/protocol/execution-observation.d.ts +12 -9
  212. package/build/src/protocol/execution-observation.js +0 -1
  213. package/build/src/protocol/intent.d.ts +20 -50
  214. package/build/src/protocol/intent.js +37 -44
  215. package/build/src/protocol/operations.d.ts +299 -19
  216. package/build/src/protocol/operations.js +68 -27
  217. package/build/src/protocol/outcome.d.ts +1 -1
  218. package/build/src/protocol/placement.d.ts +2 -2
  219. package/build/src/protocol/placement.js +4 -3
  220. package/build/src/protocol/progress.d.ts +35 -2
  221. package/build/src/protocol/progress.js +12 -1
  222. package/build/src/protocol/read/observation.js +15 -4
  223. package/build/src/protocol/read/status.d.ts +9 -14
  224. package/build/src/protocol/read/status.js +15 -22
  225. package/build/src/protocol/reintegrate.d.ts +4 -3
  226. package/build/src/protocol/reintegrate.js +21 -5
  227. package/build/src/protocol/review.d.ts +9 -15
  228. package/build/src/protocol/review.js +2 -6
  229. package/build/src/protocol/run.d.ts +1 -1
  230. package/build/src/protocol/verify.d.ts +51 -0
  231. package/build/src/protocol/verify.js +128 -0
  232. package/build/src/verification/declaration.d.ts +5 -1
  233. package/build/src/verification/declaration.js +19 -2
  234. package/build/src/verification/execution.d.ts +5 -2
  235. package/build/src/verification/execution.js +48 -53
  236. package/build/src/verification/observation.d.ts +10 -6
  237. package/build/src/verification/observation.js +5 -2
  238. package/package.json +3 -3
  239. package/plugins/paseo/plugin/index.server.ts +3 -0
  240. package/plugins/paseo/plugin/server/attach.ts +42 -0
  241. package/plugins/paseo/plugin/server/mirror-identity.ts +51 -0
  242. package/plugins/paseo/plugin/server/model.ts +26 -0
  243. package/plugins/paseo/plugin/server/provider.ts +4 -6
  244. package/plugins/paseo/plugin/server/reopen.ts +4 -39
  245. package/plugins/pi/README.md +7 -12
  246. package/plugins/pi/akuma-tools.ts +3 -18
  247. package/skills/keiyaku-akuma/SKILL.md +39 -4
  248. package/skills/keiyaku-akuma/references/automation.md +4 -7
  249. package/skills/keiyaku-babysit/SKILL.md +1 -1
  250. package/skills/keiyaku-bind/SKILL.md +39 -15
  251. package/skills/keiyaku-workflow/SKILL.md +42 -22
  252. package/build/src/akuma/allowed.d.ts +0 -23
  253. package/build/src/akuma/allowed.js +0 -63
  254. package/build/src/akuma/call-request.d.ts +0 -308
  255. package/build/src/akuma/call-request.js +0 -175
  256. package/build/src/akuma/heart/request-authority.d.ts +0 -16
  257. package/build/src/akuma/heart/request-authority.js +0 -140
  258. package/build/src/akuma/heart/request-rows.d.ts +0 -18
  259. package/build/src/akuma/heart/request-rows.js +0 -107
  260. package/build/src/akuma/request-lifecycle.d.ts +0 -42
  261. package/build/src/akuma/request-lifecycle.js +0 -197
  262. package/build/src/akuma/request-observation.d.ts +0 -45
  263. package/build/src/akuma/request-observation.js +0 -162
  264. package/build/src/akuma/request-rendezvous.d.ts +0 -32
  265. package/build/src/akuma/request-rendezvous.js +0 -189
  266. package/build/src/akuma/request-serve.d.ts +0 -16
  267. package/build/src/akuma/request-serve.js +0 -188
  268. package/build/src/akuma/request-wire.d.ts +0 -143
  269. package/build/src/akuma/request-wire.js +0 -146
  270. package/build/src/akuma/requests.d.ts +0 -20
  271. package/build/src/akuma/requests.js +0 -72
  272. package/build/src/akuma/selection-owner-port.d.ts +0 -14
  273. package/build/src/akuma/selection-owner-port.js +0 -54
  274. package/build/src/akuma/selection-request.d.ts +0 -305
  275. package/build/src/akuma/selection-request.js +0 -307
  276. package/build/src/body-requests.d.ts +0 -13
  277. package/build/src/body-requests.js +0 -131
  278. package/build/src/cli/square-identity.d.ts +0 -10
  279. package/build/src/cli/square-identity.js +0 -130
  280. package/build/src/debt/mutation-result.d.ts +0 -981
  281. package/build/src/debt/mutation-result.js +0 -109
  282. package/build/src/debt/mutation.d.ts +0 -424
  283. package/build/src/debt/mutation.js +0 -223
  284. package/build/src/library/contract-operations.d.ts +0 -382
  285. package/build/src/library/contract-operations.js +0 -300
@@ -1,223 +0,0 @@
1
- import { World } from "../world.js";
2
- import { requestBodyCommand } from "../akuma/request-rendezvous.js";
3
- import { eraseRequestCommand, } from "../akuma/request-wire.js";
4
- import { debtIdsSchema, debtNamespaceSchema } from "./identity.js";
5
- import { debtNonblankTextSchema, debtStateSchema, debtPrioritySchema } from "./document.js";
6
- import { debtBatchResultSchema, debtMutationIdSchema, debtMutationResultSchema, debtUpdateResultSchema, } from "./mutation-result.js";
7
- import { z } from "zod";
8
- export const DEBT_MUTATION_ACTIONS = Object.freeze([
9
- "debt.add",
10
- "debt.addDocument",
11
- "debt.done",
12
- "debt.drop",
13
- "debt.update",
14
- ]);
15
- const debtMutationActionSchema = z.enum(DEBT_MUTATION_ACTIONS);
16
- const nonemptyDebtIdsSchema = debtIdsSchema.unwrap().min(1).readonly();
17
- const addInputSchema = z
18
- .object({
19
- title: debtNonblankTextSchema,
20
- namespace: debtNamespaceSchema,
21
- body: z.string().optional(),
22
- note: z.string().optional(),
23
- state: debtStateSchema.optional(),
24
- priority: debtPrioritySchema.optional(),
25
- needs: debtIdsSchema.optional(),
26
- parent: debtMutationIdSchema.nullable().optional(),
27
- supersedes: debtIdsSchema.optional(),
28
- relates: debtIdsSchema.optional(),
29
- })
30
- .strict();
31
- const updateInputSchema = z
32
- .object({
33
- title: debtNonblankTextSchema.optional(),
34
- body: z.string().optional(),
35
- appendBody: z.string().optional(),
36
- note: z.string().optional(),
37
- priority: debtPrioritySchema.optional(),
38
- needs: debtIdsSchema.optional(),
39
- addNeeds: debtIdsSchema.optional(),
40
- dropNeeds: debtIdsSchema.optional(),
41
- parent: debtMutationIdSchema.nullable().optional(),
42
- supersedes: debtIdsSchema.optional(),
43
- addSupersedes: debtIdsSchema.optional(),
44
- dropSupersedes: debtIdsSchema.optional(),
45
- relates: debtIdsSchema.optional(),
46
- addRelates: debtIdsSchema.optional(),
47
- dropRelates: debtIdsSchema.optional(),
48
- })
49
- .strict()
50
- .superRefine((input, context) => {
51
- if (input.body !== undefined && input.appendBody !== undefined)
52
- context.addIssue({ code: "custom", message: "body and appendBody are mutually exclusive" });
53
- if (Object.values(input).every((value) => value === undefined))
54
- context.addIssue({ code: "custom", message: "update requires at least one field change" });
55
- });
56
- const addRequestSchema = z
57
- .object({ input: addInputSchema })
58
- .strict()
59
- .transform(({ input }) => ({ action: "debt.add", input }));
60
- const addDocumentRequestSchema = z
61
- .object({ input: z.object({ markdown: z.string(), namespace: debtNamespaceSchema }).strict() })
62
- .strict()
63
- .transform(({ input }) => ({ action: "debt.addDocument", input }));
64
- const updateRequestSchema = z
65
- .object({ id: debtMutationIdSchema, input: updateInputSchema })
66
- .strict()
67
- .transform((request) => ({ action: "debt.update", ...request }));
68
- const terminalRequestSchema = (action) => z.union([
69
- z
70
- .object({ id: debtMutationIdSchema, note: z.string().optional() })
71
- .strict()
72
- .transform(({ id, note }) => ({ action, id, ...(note === undefined ? {} : { note }) })),
73
- z
74
- .object({ ids: nonemptyDebtIdsSchema, note: z.string().optional() })
75
- .strict()
76
- .transform(({ ids, note }) => ({ action, ids, ...(note === undefined ? {} : { note }) })),
77
- ]);
78
- const debtRequestSchemas = {
79
- "debt.add": addRequestSchema,
80
- "debt.addDocument": addDocumentRequestSchema,
81
- "debt.done": terminalRequestSchema("debt.done"),
82
- "debt.drop": terminalRequestSchema("debt.drop"),
83
- "debt.update": updateRequestSchema,
84
- };
85
- const worldPathSchema = z.string().min(1);
86
- const debtBodyRequestSchema = z
87
- .object({ world: worldPathSchema, request: z.union(Object.values(debtRequestSchemas)) })
88
- .strict();
89
- const debtMutationServiceSchema = z.object({ action: debtMutationActionSchema }).strict();
90
- export const forwardedDebtReferenceSchema = z
91
- .object({ kind: z.literal("served-reference"), action: debtMutationActionSchema })
92
- .strict();
93
- function decodeDebtBodyRequest(action, value) {
94
- const parsed = debtBodyRequestSchema.extend({ request: debtRequestSchemas[action] }).safeParse(value);
95
- return parsed.success ? parsed.data : null;
96
- }
97
- function decodeDebtService(action, value) {
98
- const parsed = debtMutationServiceSchema.safeParse(value);
99
- if (!parsed.success || parsed.data.action !== action)
100
- throw new Error(`malformed stored Debt service evidence for ${action}`);
101
- return parsed.data;
102
- }
103
- function decodeDebtReference(action, value) {
104
- const parsed = forwardedDebtReferenceSchema.safeParse(value);
105
- if (!parsed.success || parsed.data.action !== action)
106
- throw new Error(`malformed Debt service reference for ${action}`);
107
- return parsed.data;
108
- }
109
- /** Debt owns forwarded mutation payload, live result, and durable service evidence. */
110
- export function debtMutationRequestProtocol(action, batch) {
111
- return {
112
- action,
113
- encodeRequest: (input) => {
114
- const { action: _action, ...request } = input.request;
115
- return { world: input.world, request };
116
- },
117
- decodeRequest: (value) => decodeDebtBodyRequest(action, value),
118
- encodeResult: (result) => result,
119
- decodeResult: (result) => {
120
- const schema = action === "debt.update"
121
- ? debtUpdateResultSchema
122
- : batch === undefined
123
- ? z.union([debtMutationResultSchema, debtBatchResultSchema])
124
- : batch
125
- ? debtBatchResultSchema
126
- : debtMutationResultSchema;
127
- const parsed = schema.safeParse(result);
128
- if (!parsed.success)
129
- throw new Error(`transport integrity: Debt ${action} returned an invalid live result`);
130
- return parsed.data;
131
- },
132
- decodeReference: (reference) => decodeDebtReference(action, reference),
133
- isPermitted: (allowed) => allowed.includes(action),
134
- };
135
- }
136
- export function debtMutationRequestCommand(action, port) {
137
- return {
138
- completion: "service",
139
- protocol: debtMutationRequestProtocol(action),
140
- encodeService: (service) => service,
141
- decodeService: (service) => decodeDebtService(action, service),
142
- projectService: (service) => ({ kind: "served-reference", action: service.action }),
143
- execute: async (request, facts) => {
144
- const world = await World.prove(request.world);
145
- const action = request.request.action;
146
- let result;
147
- switch (action) {
148
- case "debt.add":
149
- result = await port.add({
150
- world,
151
- options: addDebtOptions(request.request.input, facts.requester, facts.signal),
152
- });
153
- break;
154
- case "debt.addDocument":
155
- result = await port.addDocument({
156
- world,
157
- document: { ...request.request.input, actor: facts.requester, signal: facts.signal },
158
- });
159
- break;
160
- case "debt.update":
161
- result = await port.update({
162
- world,
163
- id: request.request.id,
164
- options: updateDebtOptions(request.request.input, facts.signal),
165
- });
166
- break;
167
- case "debt.done":
168
- case "debt.drop": {
169
- const verb = action.slice("debt.".length);
170
- const note = "note" in request.request ? request.request.note : undefined;
171
- result =
172
- "ids" in request.request
173
- ? await port.batch({
174
- world,
175
- verb,
176
- ids: request.request.ids,
177
- ...(note === undefined ? {} : { note }),
178
- signal: facts.signal,
179
- })
180
- : await port.lifecycle({
181
- world,
182
- verb,
183
- id: request.request.id,
184
- ...(note === undefined ? {} : { note }),
185
- signal: facts.signal,
186
- });
187
- break;
188
- }
189
- }
190
- return { kind: "served", result, service: { action } };
191
- },
192
- };
193
- }
194
- export function debtMutationRequestCommands(port) {
195
- return Object.fromEntries(DEBT_MUTATION_ACTIONS.map((action) => [action, eraseRequestCommand(debtMutationRequestCommand(action, port))]));
196
- }
197
- export async function requestForwardedDebt(input) {
198
- const response = await requestBodyCommand({
199
- directory: input.directory,
200
- ...(input.id === undefined ? {} : { id: input.id }),
201
- command: debtMutationRequestProtocol(input.request.action, "ids" in input.request),
202
- value: { world: input.world, request: input.request },
203
- ...(input.signal === undefined ? {} : { signal: input.signal }),
204
- });
205
- if (response.kind === "reference")
206
- return response.reference;
207
- return response.result;
208
- }
209
- /** Absent optional fields are omitted, never republished as an explicit undefined. */
210
- function definedFields(fields, additions = {}) {
211
- const selected = {};
212
- for (const [key, value] of Object.entries({ ...fields, ...additions })) {
213
- if (value !== undefined)
214
- selected[key] = value;
215
- }
216
- return selected;
217
- }
218
- function addDebtOptions(input, actor, signal) {
219
- return definedFields(input, { actor, signal });
220
- }
221
- function updateDebtOptions(input, signal) {
222
- return definedFields(input, { signal });
223
- }
@@ -1,382 +0,0 @@
1
- import { z } from "zod";
2
- import { type ErasedRequestCommand, type RequestProtocol, type ServiceRequestCommand } from "../akuma/request-wire.js";
3
- import type { ActorId } from "../core/facts/types.js";
4
- import { type ExecutionObserver } from "../protocol/execution-observation.js";
5
- type DeliveryResult = import("./contract-outcomes.js").DeliverOutcome;
6
- type ReviewResult = import("./contract-outcomes.js").ReviewOutcome;
7
- type DeliveryPreviewResult = import("./contract-outcomes.js").DeliveryPreviewOutcome;
8
- type ContractResult = DeliveryResult | ReviewResult | DeliveryPreviewResult;
9
- type ContractRequester = ActorId;
10
- declare const previewRequestSchema: z.ZodPipe<z.ZodObject<{
11
- repoRoot: z.ZodString;
12
- contractId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ContractId, string>>;
13
- includeDirty: z.ZodBoolean;
14
- showDiff: z.ZodBoolean;
15
- }, z.core.$strict>, z.ZodTransform<{
16
- repoRoot: string;
17
- contractId: import("../core/facts/types.js").ContractId;
18
- includeDirty: boolean;
19
- showDiff: boolean;
20
- action: "contract.preview-delivery";
21
- }, {
22
- repoRoot: string;
23
- contractId: import("../core/facts/types.js").ContractId;
24
- includeDirty: boolean;
25
- showDiff: boolean;
26
- }>>;
27
- declare const deliverRequestSchema: z.ZodPipe<z.ZodObject<{
28
- repoRoot: z.ZodString;
29
- contractId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ContractId, string>>;
30
- includeDirty: z.ZodBoolean;
31
- materializeConflict: z.ZodBoolean;
32
- overwrite: z.ZodOptional<z.ZodBoolean>;
33
- message: z.ZodOptional<z.ZodString>;
34
- }, z.core.$strict>, z.ZodTransform<{
35
- repoRoot: string;
36
- contractId: import("../core/facts/types.js").ContractId;
37
- includeDirty: boolean;
38
- materializeConflict: boolean;
39
- overwrite?: boolean | undefined;
40
- message?: string | undefined;
41
- action: "contract.deliver";
42
- }, {
43
- repoRoot: string;
44
- contractId: import("../core/facts/types.js").ContractId;
45
- includeDirty: boolean;
46
- materializeConflict: boolean;
47
- overwrite?: boolean | undefined;
48
- message?: string | undefined;
49
- }>>;
50
- declare const reviewRequestSchema: z.ZodPipe<z.ZodObject<{
51
- repoRoot: z.ZodString;
52
- contractId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ContractId, string>>;
53
- verdict: z.ZodEnum<{
54
- satisfied: "satisfied";
55
- unsatisfied: "unsatisfied";
56
- }>;
57
- summary: z.ZodOptional<z.ZodString>;
58
- actor: z.ZodOptional<z.ZodString>;
59
- }, z.core.$strict>, z.ZodTransform<{
60
- repoRoot: string;
61
- contractId: import("../core/facts/types.js").ContractId;
62
- verdict: "satisfied" | "unsatisfied";
63
- summary?: string | undefined;
64
- actor?: string | undefined;
65
- action: "contract.review";
66
- }, {
67
- repoRoot: string;
68
- contractId: import("../core/facts/types.js").ContractId;
69
- verdict: "satisfied" | "unsatisfied";
70
- summary?: string | undefined;
71
- actor?: string | undefined;
72
- }>>;
73
- export type ContractRequest = z.infer<typeof previewRequestSchema> | z.infer<typeof deliverRequestSchema> | z.infer<typeof reviewRequestSchema>;
74
- type DeliverRequest = Extract<ContractRequest, {
75
- action: "contract.deliver";
76
- }>;
77
- type ReviewRequest = Extract<ContractRequest, {
78
- action: "contract.review";
79
- }>;
80
- type DeliveryPreviewRequest = Extract<ContractRequest, {
81
- action: "contract.preview-delivery";
82
- }>;
83
- type ContractResultFor<Action extends ContractRequest["action"]> = Action extends "contract.deliver" ? DeliveryResult : Action extends "contract.review" ? ReviewResult : DeliveryPreviewResult;
84
- type ContractRequestFor<Action extends ContractRequest["action"]> = Extract<ContractRequest, {
85
- action: Action;
86
- }>;
87
- declare const materializedHandoffReferenceSchema: z.ZodObject<{
88
- kind: z.ZodLiteral<"integration-conflict-materialized">;
89
- targetHead: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
90
- conflictPaths: z.ZodReadonly<z.ZodArray<z.ZodString>>;
91
- workspace: z.ZodObject<{
92
- kind: z.ZodLiteral<"worktree">;
93
- path: z.ZodString;
94
- }, z.core.$strict>;
95
- handoffBase: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
96
- recovery: z.ZodObject<{
97
- materialize: z.ZodLiteral<"deliver --materialize-conflict --include-dirty">;
98
- deliver: z.ZodLiteral<"deliver --include-dirty">;
99
- staging: z.ZodLiteral<"not-required">;
100
- }, z.core.$strict>;
101
- }, z.core.$strict>;
102
- declare const contractServiceSchema: z.ZodUnion<readonly [z.ZodObject<{
103
- kind: z.ZodLiteral<"delivery-preview-report">;
104
- repoRoot: z.ZodString;
105
- contractId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ContractId, string>>;
106
- report: z.ZodObject<{
107
- candidate: z.ZodUnion<readonly [z.ZodObject<{
108
- kind: z.ZodLiteral<"blocked">;
109
- refusal: z.ZodUnion<readonly [z.ZodObject<{
110
- kind: z.ZodLiteral<"target-missing">;
111
- contractId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ContractId, string>>;
112
- }, z.core.$strict>, z.ZodObject<{
113
- kind: z.ZodLiteral<"worktree-missing">;
114
- contractId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ContractId, string>>;
115
- }, z.core.$strict>, z.ZodObject<{
116
- kind: z.ZodLiteral<"dirty-workspace">;
117
- contractId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ContractId, string>>;
118
- staged: z.ZodReadonly<z.ZodArray<z.ZodString>>;
119
- unstaged: z.ZodReadonly<z.ZodArray<z.ZodString>>;
120
- untracked: z.ZodReadonly<z.ZodArray<z.ZodString>>;
121
- submodules: z.ZodReadonly<z.ZodArray<z.ZodString>>;
122
- shortStat: z.ZodObject<{
123
- filesChanged: z.ZodNumber;
124
- insertions: z.ZodNumber;
125
- deletions: z.ZodNumber;
126
- }, z.core.$strict>;
127
- }, z.core.$strict>, z.ZodObject<{
128
- kind: z.ZodLiteral<"unmerged-paths">;
129
- contractId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ContractId, string>>;
130
- paths: z.ZodReadonly<z.ZodArray<z.ZodString>>;
131
- }, z.core.$strict>, z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
132
- kind: z.ZodLiteral<"integration-failed">;
133
- contractId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ContractId, string>>;
134
- reason: z.ZodEnum<{
135
- "not-based-on-target": "not-based-on-target";
136
- "unrelated-histories": "unrelated-histories";
137
- conflict: "conflict";
138
- }>;
139
- targetHead: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
140
- conflictPaths: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
141
- }, z.core.$strict>, z.ZodTransform<{
142
- kind: "integration-failed";
143
- contractId: import("../core/facts/types.js").ContractId;
144
- reason: "not-based-on-target" | "unrelated-histories" | "conflict";
145
- targetHead: import("../core/facts/types.js").SnapshotId;
146
- } & {
147
- conflictPaths?: readonly string[];
148
- }, {
149
- kind: "integration-failed";
150
- contractId: import("../core/facts/types.js").ContractId;
151
- reason: "not-based-on-target" | "unrelated-histories" | "conflict";
152
- targetHead: import("../core/facts/types.js").SnapshotId;
153
- conflictPaths?: readonly string[] | undefined;
154
- }>>, z.ZodObject<{
155
- kind: z.ZodLiteral<"integration-unsupported">;
156
- contractId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ContractId, string>>;
157
- requiredGit: z.ZodLiteral<"2.38">;
158
- }, z.core.$strict>]>, z.ZodObject<{
159
- kind: z.ZodLiteral<"merge-state-present">;
160
- contractId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ContractId, string>>;
161
- workspace: z.ZodObject<{
162
- kind: z.ZodLiteral<"worktree">;
163
- path: z.ZodString;
164
- }, z.core.$strict>;
165
- }, z.core.$strict>, z.ZodObject<{
166
- kind: z.ZodLiteral<"checkout-not-followable">;
167
- contractId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ContractId, string>>;
168
- target: z.ZodString;
169
- path: z.ZodString;
170
- reason: z.ZodLiteral<"untracked">;
171
- paths: z.ZodReadonly<z.ZodArray<z.ZodString>>;
172
- }, z.core.$strict>]>;
173
- }, z.core.$strict>, z.ZodObject<{
174
- kind: z.ZodLiteral<"ready">;
175
- workspace: z.ZodObject<{
176
- kind: z.ZodLiteral<"worktree">;
177
- path: z.ZodString;
178
- }, z.core.$strict>;
179
- identity: z.ZodObject<{
180
- note: z.ZodOptional<z.ZodString>;
181
- tenderSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
182
- integration: z.ZodObject<{
183
- predecessor: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
184
- snapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
185
- changeId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ChangeId, string>>;
186
- }, z.core.$strict>;
187
- method: z.ZodLiteral<"squash">;
188
- policy: z.ZodObject<{
189
- requireBranchesToBeUpToDate: z.ZodBoolean;
190
- }, z.core.$strict>;
191
- }, z.core.$strict>;
192
- scope: z.ZodObject<{
193
- filesChanged: z.ZodNumber;
194
- insertions: z.ZodNumber;
195
- deletions: z.ZodNumber;
196
- paths: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
197
- }, z.core.$strict>;
198
- diff: z.ZodOptional<z.ZodString>;
199
- requirements: z.ZodObject<{
200
- gates: z.ZodReadonly<z.ZodArray<z.ZodObject<{
201
- gate: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").Gate, string>>;
202
- current: z.ZodUnion<readonly [z.ZodObject<{
203
- kind: z.ZodLiteral<"missing">;
204
- }, z.core.$strict>, z.ZodObject<{
205
- kind: z.ZodLiteral<"attested">;
206
- verdict: z.ZodEnum<{
207
- satisfied: "satisfied";
208
- unsatisfied: "unsatisfied";
209
- }>;
210
- at: z.ZodString;
211
- summary: z.ZodOptional<z.ZodString>;
212
- }, z.core.$strict>, z.ZodObject<{
213
- kind: z.ZodLiteral<"stale">;
214
- priorVerdict: z.ZodEnum<{
215
- satisfied: "satisfied";
216
- unsatisfied: "unsatisfied";
217
- }>;
218
- reason: z.ZodOptional<z.ZodObject<{
219
- kind: z.ZodLiteral<"candidate-content-changed">;
220
- target: z.ZodOptional<z.ZodString>;
221
- previousChange: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ChangeId, string>>;
222
- currentChange: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ChangeId, string>>;
223
- }, z.core.$strict>>;
224
- }, z.core.$strict>]>;
225
- }, z.core.$strict>>>;
226
- unmetPrerequisites: z.ZodReadonly<z.ZodArray<z.ZodObject<{
227
- contractId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ContractId, string>>;
228
- state: z.ZodEnum<{
229
- abandoned: "abandoned";
230
- missing: "missing";
231
- active: "active";
232
- }>;
233
- }, z.core.$strict>>>;
234
- }, z.core.$strict>;
235
- }, z.core.$strict>]>;
236
- verification: z.ZodUnion<readonly [z.ZodObject<{
237
- kind: z.ZodLiteral<"not-run">;
238
- }, z.core.$strict>, z.ZodObject<{
239
- kind: z.ZodLiteral<"undeclared">;
240
- }, z.core.$strict>, z.ZodObject<{
241
- kind: z.ZodLiteral<"required">;
242
- }, z.core.$strict>, z.ZodObject<{
243
- entry: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").EntryUlid, string>>;
244
- verdict: z.ZodEnum<{
245
- satisfied: "satisfied";
246
- unsatisfied: "unsatisfied";
247
- }>;
248
- summary: z.ZodOptional<z.ZodString>;
249
- kind: z.ZodLiteral<"recorded">;
250
- }, z.core.$strict>]>;
251
- target: z.ZodUnion<readonly [z.ZodObject<{
252
- kind: z.ZodLiteral<"not-observed">;
253
- }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
254
- kind: z.ZodLiteral<"placeable">;
255
- ref: z.ZodString;
256
- head: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
257
- checkouts: z.ZodReadonly<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
258
- kind: z.ZodLiteral<"followable">;
259
- path: z.ZodString;
260
- }, z.core.$strict>, z.ZodObject<{
261
- kind: z.ZodLiteral<"not-followable">;
262
- path: z.ZodString;
263
- diagnostic: z.ZodString;
264
- }, z.core.$strict>]>>>;
265
- }, z.core.$strict>, z.ZodObject<{
266
- kind: z.ZodLiteral<"moved">;
267
- ref: z.ZodString;
268
- expected: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
269
- observed: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>>;
270
- }, z.core.$strict>, z.ZodObject<{
271
- kind: z.ZodLiteral<"refused">;
272
- refusal: z.ZodObject<{
273
- kind: z.ZodLiteral<"checkout-not-followable">;
274
- contractId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ContractId, string>>;
275
- target: z.ZodString;
276
- path: z.ZodString;
277
- reason: z.ZodLiteral<"untracked">;
278
- paths: z.ZodReadonly<z.ZodArray<z.ZodString>>;
279
- }, z.core.$strict>;
280
- }, z.core.$strict>, z.ZodObject<{
281
- kind: z.ZodLiteral<"failed">;
282
- diagnostic: z.ZodString;
283
- }, z.core.$strict>]>]>;
284
- targetLag: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
285
- kind: z.ZodLiteral<"none">;
286
- }, z.core.$strict>, z.ZodObject<{
287
- kind: z.ZodLiteral<"unknown">;
288
- subject: z.ZodOptional<z.ZodObject<{
289
- kind: z.ZodLiteral<"worktree">;
290
- path: z.ZodString;
291
- }, z.core.$strict>>;
292
- }, z.core.$strict>, z.ZodObject<{
293
- kind: z.ZodLiteral<"counted">;
294
- behind: z.ZodNumber;
295
- subject: z.ZodOptional<z.ZodObject<{
296
- kind: z.ZodLiteral<"worktree">;
297
- path: z.ZodString;
298
- }, z.core.$strict>>;
299
- }, z.core.$strict>]>>;
300
- delivery: z.ZodOptional<z.ZodObject<{
301
- changeId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ChangeId, string>>;
302
- relation: z.ZodEnum<{
303
- identical: "identical";
304
- differs: "differs";
305
- }>;
306
- verification: z.ZodUnion<readonly [z.ZodObject<{
307
- kind: z.ZodEnum<{
308
- undeclared: "undeclared";
309
- unrecorded: "unrecorded";
310
- }>;
311
- }, z.core.$strict>, z.ZodObject<{
312
- kind: z.ZodLiteral<"recorded">;
313
- verdict: z.ZodEnum<{
314
- satisfied: "satisfied";
315
- unsatisfied: "unsatisfied";
316
- }>;
317
- fact: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").EntryUlid, string>>;
318
- }, z.core.$strict>]>;
319
- }, z.core.$strict>>;
320
- }, z.core.$strict>;
321
- }, z.core.$strict>, z.ZodObject<{
322
- kind: z.ZodLiteral<"accepted-reference">;
323
- repoRoot: z.ZodString;
324
- contractId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ContractId, string>>;
325
- deliveryFactId: z.ZodString;
326
- }, z.core.$strict>, z.ZodObject<{
327
- targetHead: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
328
- conflictPaths: z.ZodReadonly<z.ZodArray<z.ZodString>>;
329
- workspace: z.ZodObject<{
330
- kind: z.ZodLiteral<"worktree">;
331
- path: z.ZodString;
332
- }, z.core.$strict>;
333
- handoffBase: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
334
- recovery: z.ZodObject<{
335
- materialize: z.ZodLiteral<"deliver --materialize-conflict --include-dirty">;
336
- deliver: z.ZodLiteral<"deliver --include-dirty">;
337
- staging: z.ZodLiteral<"not-required">;
338
- }, z.core.$strict>;
339
- kind: z.ZodLiteral<"materialized-handoff">;
340
- repoRoot: z.ZodString;
341
- contractId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ContractId, string>>;
342
- }, z.core.$strict>, z.ZodObject<{
343
- kind: z.ZodLiteral<"accepted-reference">;
344
- repoRoot: z.ZodString;
345
- contractId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ContractId, string>>;
346
- reviewFactId: z.ZodString;
347
- }, z.core.$strict>]>;
348
- type ContractService = z.infer<typeof contractServiceSchema>;
349
- type ContractReference = ContractService | z.infer<typeof materializedHandoffReferenceSchema>;
350
- export type ContractRequestPort = Readonly<{
351
- previewDelivery(input: DeliveryPreviewRequest & Readonly<{
352
- requester: ContractRequester;
353
- signal: AbortSignal;
354
- observe?: ExecutionObserver;
355
- }>): Promise<DeliveryPreviewResult>;
356
- deliver(input: DeliverRequest & Readonly<{
357
- requester: ContractRequester;
358
- signal: AbortSignal;
359
- observe?: ExecutionObserver;
360
- }>): Promise<DeliveryResult>;
361
- review(input: ReviewRequest & Readonly<{
362
- requester: ContractRequester;
363
- signal: AbortSignal;
364
- observe?: ExecutionObserver;
365
- }>): Promise<ReviewResult>;
366
- }>;
367
- export declare function contractRequestProtocol(action: ContractRequest["action"]): RequestProtocol<ContractRequest, ContractResult, ContractReference>;
368
- export declare function contractRequestCommand(action: ContractRequest["action"], port: ContractRequestPort): ServiceRequestCommand<ContractRequest, ContractResult, ContractService, ContractReference>;
369
- export declare function contractRequestCommands(port: ContractRequestPort): Readonly<Record<"contract.preview-delivery" | "contract.deliver" | "contract.review", ErasedRequestCommand>>;
370
- export declare function requestForwardedContractLive<Action extends ContractRequest["action"]>(input: Readonly<{
371
- directory: string;
372
- action: Action;
373
- request: ContractRequestFor<Action>;
374
- signal?: AbortSignal;
375
- observe?: ExecutionObserver;
376
- }>): Promise<ContractResultFor<Action>>;
377
- /** Map durable request disposition without reconstructing an expired owner answer. */
378
- export declare function mapForwardedContractFailure(error: unknown, request: ContractRequest): {
379
- kind: "returned";
380
- result: import("./outcome.js").ProjectedOutcome<"deliver" | "review" | "deliver-preview", unknown, unknown>;
381
- };
382
- export {};