@astrosheep/keiyaku 4.5.11 → 4.5.13

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 (272) hide show
  1. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-workflow/SKILL.md +135 -377
  2. package/build/integrations/pi/keiyaku.ts +11 -116
  3. package/build/src/akuma/akuma-errors.d.ts +1 -0
  4. package/build/src/akuma/akuma-errors.js +1 -0
  5. package/build/src/akuma/akuma-handle.d.ts +1 -0
  6. package/build/src/akuma/akuma-handle.js +6 -7
  7. package/build/src/akuma/akuma-product.d.ts +6 -8
  8. package/build/src/akuma/akuma-product.js +141 -57
  9. package/build/src/akuma/akuma.d.ts +5 -7
  10. package/build/src/akuma/akuma.js +1 -22
  11. package/build/src/akuma/archetype.d.ts +6 -5
  12. package/build/src/akuma/archetype.js +137 -38
  13. package/build/src/akuma/body.d.ts +5 -5
  14. package/build/src/akuma/body.js +223 -63
  15. package/build/src/akuma/call-input.d.ts +4 -0
  16. package/build/src/akuma/call-input.js +21 -0
  17. package/build/src/akuma/call-request.d.ts +5 -8
  18. package/build/src/akuma/call-request.js +28 -73
  19. package/build/src/akuma/fleet-execution.d.ts +26 -0
  20. package/build/src/akuma/fleet-execution.js +109 -0
  21. package/build/src/{library/fleet-result.d.ts → akuma/fleet-observation.d.ts} +13 -57
  22. package/build/src/{library/fleet-result.js → akuma/fleet-observation.js} +4 -25
  23. package/build/src/akuma/fleet-request.d.ts +122 -0
  24. package/build/src/akuma/fleet-request.js +168 -0
  25. package/build/src/akuma/heart/facts.d.ts +23 -0
  26. package/build/src/akuma/heart/facts.js +7 -0
  27. package/build/src/akuma/heart/index.d.ts +43 -4
  28. package/build/src/akuma/heart/index.js +107 -7
  29. package/build/src/akuma/heart/request-authority.d.ts +2 -0
  30. package/build/src/akuma/heart/request-authority.js +28 -3
  31. package/build/src/akuma/heart/request-rows.d.ts +2 -0
  32. package/build/src/akuma/heart/request-rows.js +24 -5
  33. package/build/src/akuma/heart/rows.d.ts +4 -1
  34. package/build/src/akuma/heart/rows.js +46 -19
  35. package/build/src/akuma/heart/schema.d.ts +1 -1
  36. package/build/src/akuma/heart/schema.js +28 -6
  37. package/build/src/akuma/heart/storage.d.ts +1 -1
  38. package/build/src/akuma/heart/tells.d.ts +29 -0
  39. package/build/src/akuma/heart/tells.js +136 -5
  40. package/build/src/akuma/heart/timeline.js +9 -3
  41. package/build/src/akuma/projection-read.js +36 -3
  42. package/build/src/akuma/projection.js +3 -4
  43. package/build/src/akuma/provider.d.ts +4 -0
  44. package/build/src/akuma/provider.js +56 -3
  45. package/build/src/akuma/providers/claude/index.js +3 -0
  46. package/build/src/akuma/providers/codex-app-server/index.js +14 -12
  47. package/build/src/akuma/providers/pi/index.js +7 -1
  48. package/build/src/akuma/publication.js +65 -49
  49. package/build/src/akuma/request-lifecycle.d.ts +5 -4
  50. package/build/src/akuma/request-lifecycle.js +29 -16
  51. package/build/src/akuma/request-rendezvous.d.ts +15 -12
  52. package/build/src/akuma/request-rendezvous.js +80 -51
  53. package/build/src/akuma/request-serve.d.ts +1 -2
  54. package/build/src/akuma/request-serve.js +94 -39
  55. package/build/src/akuma/request-wire.d.ts +57 -26
  56. package/build/src/akuma/request-wire.js +64 -25
  57. package/build/src/akuma/turn-drive.d.ts +5 -4
  58. package/build/src/akuma/turn-drive.js +27 -11
  59. package/build/src/akuma-body.d.ts +4 -6
  60. package/build/src/akuma-body.js +19 -17
  61. package/build/src/bounded-list.d.ts +8 -0
  62. package/build/src/bounded-list.js +14 -0
  63. package/build/src/cli/accepted.d.ts +1 -1
  64. package/build/src/cli/accepted.js +1 -0
  65. package/build/src/cli/commands/akuma-invoke.js +1 -25
  66. package/build/src/cli/commands/contract-help.d.ts +5 -2
  67. package/build/src/cli/commands/contract-help.js +62 -12
  68. package/build/src/cli/commands/contract-invoke.d.ts +5 -0
  69. package/build/src/cli/commands/contract-invoke.js +26 -1
  70. package/build/src/cli/commands/contract.js +50 -18
  71. package/build/src/cli/commands/task-invoke.js +10 -2
  72. package/build/src/cli/commands/task-query.js +3 -4
  73. package/build/src/cli/coordinates.d.ts +13 -0
  74. package/build/src/cli/coordinates.js +38 -24
  75. package/build/src/cli/draft.d.ts +1 -1
  76. package/build/src/cli/invoke.js +14 -1
  77. package/build/src/cli/render/akuma-activity.d.ts +0 -1
  78. package/build/src/cli/render/akuma-activity.js +5 -38
  79. package/build/src/cli/render/akuma.js +4 -1
  80. package/build/src/cli/render/audit.js +4 -1
  81. package/build/src/cli/render/catalog.js +13 -39
  82. package/build/src/cli/render/contract.js +4 -14
  83. package/build/src/cli/render/kanshi-akuma.js +3 -8
  84. package/build/src/cli/render/kanshi.js +8 -34
  85. package/build/src/cli/render/nuke.js +7 -3
  86. package/build/src/cli/render/receipt.d.ts +1 -0
  87. package/build/src/cli/render/receipt.js +8 -0
  88. package/build/src/cli/render/refusal.js +4 -3
  89. package/build/src/cli/render/task.js +4 -37
  90. package/build/src/cli/render/terminal.d.ts +2 -6
  91. package/build/src/cli/render/terminal.js +4 -9
  92. package/build/src/cli/result.d.ts +2 -1
  93. package/build/src/contract-guidance.js +13 -3
  94. package/build/src/contract-worktree.d.ts +1 -0
  95. package/build/src/contract-worktree.js +26 -2
  96. package/build/src/core/facts/codec.d.ts +2 -1
  97. package/build/src/core/facts/codec.js +3 -0
  98. package/build/src/core/facts/gate.d.ts +2 -1
  99. package/build/src/core/facts/gate.js +63 -0
  100. package/build/src/core/verbs/abandon.d.ts +2 -1
  101. package/build/src/core/verbs/abandon.js +16 -0
  102. package/build/src/core/verbs/amend.d.ts +2 -1
  103. package/build/src/core/verbs/amend.js +20 -0
  104. package/build/src/core/verbs/arc.d.ts +2 -1
  105. package/build/src/core/verbs/arc.js +16 -0
  106. package/build/src/core/verbs/attestation.d.ts +2 -1
  107. package/build/src/core/verbs/attestation.js +16 -0
  108. package/build/src/core/verbs/bind.d.ts +2 -1
  109. package/build/src/core/verbs/bind.js +16 -0
  110. package/build/src/core/verbs/deliver.d.ts +2 -1
  111. package/build/src/core/verbs/deliver.js +16 -0
  112. package/build/src/core/verbs/placement.d.ts +2 -1
  113. package/build/src/core/verbs/placement.js +58 -1
  114. package/build/src/dispatch/association.d.ts +13 -0
  115. package/build/src/dispatch/association.js +20 -0
  116. package/build/src/dispatch/index.d.ts +6 -0
  117. package/build/src/dispatch/index.js +27 -3
  118. package/build/src/git/hooks.d.ts +9 -1
  119. package/build/src/git/hooks.js +79 -1
  120. package/build/src/git/nuke.d.ts +2 -1
  121. package/build/src/git/nuke.js +6 -11
  122. package/build/src/git/private-state-seat.d.ts +26 -1
  123. package/build/src/git/private-state-seat.js +78 -13
  124. package/build/src/git/process.d.ts +2 -0
  125. package/build/src/git/reconcile.d.ts +1 -2
  126. package/build/src/git/reconcile.js +0 -6
  127. package/build/src/git/repository.d.ts +0 -2
  128. package/build/src/git/repository.js +27 -25
  129. package/build/src/git/result-codec.d.ts +29 -0
  130. package/build/src/git/result-codec.js +306 -0
  131. package/build/src/git/target-placement.js +2 -8
  132. package/build/src/git/workspace.d.ts +2 -0
  133. package/build/src/git/workspace.js +4 -0
  134. package/build/src/index.d.ts +1 -0
  135. package/build/src/kanshi/fleet.js +1 -1
  136. package/build/src/kanshi/read.js +55 -28
  137. package/build/src/kanshi/report.d.ts +4 -3
  138. package/build/src/kanshi/select.js +14 -1
  139. package/build/src/library/address.d.ts +1 -0
  140. package/build/src/library/address.js +4 -7
  141. package/build/src/library/akuma-creation.d.ts +5 -3
  142. package/build/src/library/akuma-creation.js +90 -33
  143. package/build/src/library/audit.js +2 -1
  144. package/build/src/library/catalog.d.ts +10 -2
  145. package/build/src/library/catalog.js +65 -25
  146. package/build/src/library/composition.d.ts +1 -0
  147. package/build/src/library/composition.js +1 -0
  148. package/build/src/library/configuration.d.ts +4 -21
  149. package/build/src/library/configuration.js +2 -158
  150. package/build/src/library/continuation.d.ts +20 -1
  151. package/build/src/library/continuation.js +36 -0
  152. package/build/src/library/contract-bind.d.ts +1 -0
  153. package/build/src/library/contract-bind.js +16 -5
  154. package/build/src/library/contract-forwarding.d.ts +2 -2
  155. package/build/src/library/contract-forwarding.js +18 -4
  156. package/build/src/library/contract-handle.js +4 -3
  157. package/build/src/library/contract-operations.d.ts +5 -9
  158. package/build/src/library/contract-operations.js +34 -47
  159. package/build/src/library/contract.d.ts +11 -2
  160. package/build/src/library/contract.js +21 -1
  161. package/build/src/library/delivery.d.ts +4 -1
  162. package/build/src/library/delivery.js +47 -0
  163. package/build/src/library/fleet.d.ts +4 -136
  164. package/build/src/library/fleet.js +31 -315
  165. package/build/src/library/keiyaku.d.ts +7 -3
  166. package/build/src/library/keiyaku.js +1 -0
  167. package/build/src/library/mutation.d.ts +431 -3
  168. package/build/src/library/mutation.js +192 -19
  169. package/build/src/library/nuke.d.ts +7 -1
  170. package/build/src/library/nuke.js +18 -4
  171. package/build/src/library/reconcile.d.ts +14 -0
  172. package/build/src/library/reconcile.js +22 -8
  173. package/build/src/library/refusal.d.ts +9 -1
  174. package/build/src/library/refusal.js +76 -0
  175. package/build/src/library/region.d.ts +0 -8
  176. package/build/src/library/region.js +1 -29
  177. package/build/src/library/result-codec.d.ts +2 -0
  178. package/build/src/library/result-codec.js +12 -0
  179. package/build/src/markdown/lex.js +9 -2
  180. package/build/src/markdown/types.d.ts +2 -1
  181. package/build/src/markdown/types.js +3 -1
  182. package/build/src/plugin/akuma-signals.d.ts +12 -0
  183. package/build/src/plugin/akuma-signals.js +14 -0
  184. package/build/src/plugin/public.d.ts +51 -0
  185. package/build/src/plugin/public.js +1 -0
  186. package/build/src/plugin/runtime.d.ts +14 -0
  187. package/build/src/plugin/runtime.js +357 -0
  188. package/build/src/protocol/amend.js +3 -3
  189. package/build/src/protocol/attempt.d.ts +2 -1
  190. package/build/src/protocol/attempt.js +1 -1
  191. package/build/src/protocol/audit.d.ts +1 -1
  192. package/build/src/protocol/audit.js +1 -1
  193. package/build/src/protocol/bind.d.ts +3 -1
  194. package/build/src/protocol/bind.js +26 -0
  195. package/build/src/protocol/completion.js +0 -1
  196. package/build/src/protocol/deliver.d.ts +1 -1
  197. package/build/src/protocol/deliver.js +136 -57
  198. package/build/src/protocol/intent.d.ts +0 -1
  199. package/build/src/protocol/intent.js +0 -1
  200. package/build/src/protocol/operations.d.ts +9 -2
  201. package/build/src/protocol/operations.js +16 -1
  202. package/build/src/protocol/outcome.d.ts +3 -0
  203. package/build/src/protocol/outcome.js +17 -1
  204. package/build/src/protocol/placement.js +10 -3
  205. package/build/src/protocol/read/status.d.ts +8 -0
  206. package/build/src/protocol/read/status.js +49 -0
  207. package/build/src/protocol/reintegrate.js +10 -3
  208. package/build/src/protocol/result-codec.d.ts +22 -0
  209. package/build/src/protocol/result-codec.js +442 -0
  210. package/build/src/protocol/review.d.ts +1 -1
  211. package/build/src/protocol/review.js +81 -46
  212. package/build/src/protocol/run.d.ts +22 -2
  213. package/build/src/protocol/run.js +119 -29
  214. package/build/src/runtime/proc/lifecycle.js +1 -1
  215. package/build/src/runtime/proc/line-rpc.d.ts +7 -1
  216. package/build/src/runtime/proc/line-rpc.js +49 -9
  217. package/build/src/runtime/proc/run.d.ts +0 -1
  218. package/build/src/runtime/proc/run.js +1 -11
  219. package/build/src/runtime/proc/termination.d.ts +1 -0
  220. package/build/src/runtime/proc/termination.js +63 -18
  221. package/build/src/runtime/proc/windows-launch.exe +0 -0
  222. package/build/src/settings.d.ts +10 -0
  223. package/build/src/settings.js +88 -2
  224. package/build/src/settlement/result-codec.d.ts +2 -0
  225. package/build/src/settlement/result-codec.js +56 -0
  226. package/build/src/settlement/settle.d.ts +5 -12
  227. package/build/src/settlement/settle.js +60 -55
  228. package/build/src/task/board.d.ts +3 -0
  229. package/build/src/task/board.js +22 -4
  230. package/build/src/task/catalog.d.ts +13 -2
  231. package/build/src/task/catalog.js +59 -5
  232. package/build/src/task/compose.d.ts +4 -2
  233. package/build/src/task/compose.js +56 -30
  234. package/build/src/task/created-observation.d.ts +39 -0
  235. package/build/src/task/created-observation.js +26 -0
  236. package/build/src/task/identity.d.ts +6 -0
  237. package/build/src/task/identity.js +48 -7
  238. package/build/src/task/index.d.ts +4 -3
  239. package/build/src/task/index.js +19 -16
  240. package/build/src/task/input.d.ts +3 -1
  241. package/build/src/task/input.js +7 -4
  242. package/build/src/task/lifecycle-operations.d.ts +6 -0
  243. package/build/src/task/lifecycle-operations.js +116 -0
  244. package/build/src/task/mutation-result.d.ts +762 -20
  245. package/build/src/task/mutation-result.js +34 -9
  246. package/build/src/task/mutation.d.ts +4 -9
  247. package/build/src/task/mutation.js +17 -52
  248. package/build/src/task/operation-types.d.ts +114 -0
  249. package/build/src/task/operation-types.js +1 -0
  250. package/build/src/task/operations.d.ts +6 -113
  251. package/build/src/task/operations.js +75 -117
  252. package/build/src/task/query.d.ts +8 -11
  253. package/build/src/task/query.js +7 -14
  254. package/build/src/task/store.d.ts +11 -1
  255. package/build/src/task/store.js +169 -55
  256. package/build/src/task/view.d.ts +4 -0
  257. package/build/src/task/view.js +7 -0
  258. package/build/src/verification/declaration.d.ts +1 -0
  259. package/build/src/verification/declaration.js +18 -1
  260. package/build/src/verification/execution.d.ts +0 -1
  261. package/build/src/verification/execution.js +5 -5
  262. package/build/src/world.d.ts +0 -2
  263. package/build/src/world.js +3 -7
  264. package/package.json +17 -5
  265. package/build/src/cli/square-edge.d.ts +0 -7
  266. package/build/src/cli/square-edge.js +0 -159
  267. package/build/src/git/ref-migration.d.ts +0 -22
  268. package/build/src/git/ref-migration.js +0 -55
  269. package/build/src/library/contract-forwarding-reconciliation-result.d.ts +0 -102
  270. package/build/src/library/contract-forwarding-reconciliation-result.js +0 -92
  271. package/build/src/library/contract-forwarding-result.d.ts +0 -4270
  272. package/build/src/library/contract-forwarding-result.js +0 -521
@@ -2,8 +2,13 @@ import type { TaskCompositionResult } from "./compose.js";
2
2
  import type { TaskBatchResult, TaskMutationResult, TaskUpdateResult } from "./operations.js";
3
3
  import { z } from "zod";
4
4
  export type TaskMutationExecutionResult = TaskMutationResult | TaskUpdateResult | TaskBatchResult | TaskCompositionResult;
5
+ type WithoutUndefined<Value> = {
6
+ [Key in keyof Value as undefined extends Value[Key] ? never : Key]: Value[Key];
7
+ } & {
8
+ [Key in keyof Value as undefined extends Value[Key] ? Key : never]?: Exclude<Value[Key], undefined>;
9
+ };
5
10
  export declare const taskMutationIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<`task/${string}`, string>>;
6
- export declare const taskMutationResultSchema: z.ZodUnion<readonly [z.ZodObject<{
11
+ export declare const taskMutationResultSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
7
12
  kind: z.ZodLiteral<"accepted">;
8
13
  value: z.ZodPipe<z.ZodObject<{
9
14
  id: z.ZodPipe<z.ZodString, z.ZodTransform<`task/${string}`, string>>;
@@ -71,7 +76,83 @@ export declare const taskMutationResultSchema: z.ZodUnion<readonly [z.ZodObject<
71
76
  body: string;
72
77
  createdBy?: string | undefined;
73
78
  }>>;
74
- }, z.core.$strict>, z.ZodObject<{
79
+ cleanup: z.ZodOptional<z.ZodObject<{
80
+ kind: z.ZodLiteral<"lock-release-failed">;
81
+ diagnostics: z.ZodArray<z.ZodString>;
82
+ }, z.core.$strict>>;
83
+ }, z.core.$strict>, z.ZodTransform<WithoutUndefined<{
84
+ kind: "accepted";
85
+ value: {
86
+ id: `task/${string}`;
87
+ namespace: string[];
88
+ title: string;
89
+ state: "open" | "in_progress" | "on_hold" | "done" | "drop";
90
+ priority: 0 | 1 | 2 | 3;
91
+ needs: `task/${string}`[];
92
+ parent: `task/${string}` | null;
93
+ supersedes: `task/${string}`[];
94
+ relates: `task/${string}`[];
95
+ note: string;
96
+ createdAt: string;
97
+ updatedAt: string;
98
+ body: string;
99
+ } | {
100
+ createdBy: string;
101
+ id: `task/${string}`;
102
+ namespace: string[];
103
+ title: string;
104
+ state: "open" | "in_progress" | "on_hold" | "done" | "drop";
105
+ priority: 0 | 1 | 2 | 3;
106
+ needs: `task/${string}`[];
107
+ parent: `task/${string}` | null;
108
+ supersedes: `task/${string}`[];
109
+ relates: `task/${string}`[];
110
+ note: string;
111
+ createdAt: string;
112
+ updatedAt: string;
113
+ body: string;
114
+ };
115
+ cleanup?: {
116
+ kind: "lock-release-failed";
117
+ diagnostics: string[];
118
+ } | undefined;
119
+ }>, {
120
+ kind: "accepted";
121
+ value: {
122
+ id: `task/${string}`;
123
+ namespace: string[];
124
+ title: string;
125
+ state: "open" | "in_progress" | "on_hold" | "done" | "drop";
126
+ priority: 0 | 1 | 2 | 3;
127
+ needs: `task/${string}`[];
128
+ parent: `task/${string}` | null;
129
+ supersedes: `task/${string}`[];
130
+ relates: `task/${string}`[];
131
+ note: string;
132
+ createdAt: string;
133
+ updatedAt: string;
134
+ body: string;
135
+ } | {
136
+ createdBy: string;
137
+ id: `task/${string}`;
138
+ namespace: string[];
139
+ title: string;
140
+ state: "open" | "in_progress" | "on_hold" | "done" | "drop";
141
+ priority: 0 | 1 | 2 | 3;
142
+ needs: `task/${string}`[];
143
+ parent: `task/${string}` | null;
144
+ supersedes: `task/${string}`[];
145
+ relates: `task/${string}`[];
146
+ note: string;
147
+ createdAt: string;
148
+ updatedAt: string;
149
+ body: string;
150
+ };
151
+ cleanup?: {
152
+ kind: "lock-release-failed";
153
+ diagnostics: string[];
154
+ } | undefined;
155
+ }>>, z.ZodObject<{
75
156
  kind: z.ZodLiteral<"refused">;
76
157
  refusal: z.ZodUnion<readonly [z.ZodObject<{
77
158
  kind: z.ZodLiteral<"task-missing">;
@@ -120,7 +201,7 @@ export declare const taskMutationResultSchema: z.ZodUnion<readonly [z.ZodObject<
120
201
  busy: "busy";
121
202
  }>;
122
203
  }, z.core.$strict>]>;
123
- export declare const taskUpdateResultSchema: z.ZodUnion<readonly [z.ZodObject<{
204
+ export declare const taskUpdateResultSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
124
205
  kind: z.ZodLiteral<"accepted">;
125
206
  value: z.ZodObject<{
126
207
  task: z.ZodPipe<z.ZodObject<{
@@ -191,7 +272,89 @@ export declare const taskUpdateResultSchema: z.ZodUnion<readonly [z.ZodObject<{
191
272
  }>>;
192
273
  documentDiff: z.ZodString;
193
274
  }, z.core.$strict>;
194
- }, z.core.$strict>, z.ZodObject<{
275
+ cleanup: z.ZodOptional<z.ZodObject<{
276
+ kind: z.ZodLiteral<"lock-release-failed">;
277
+ diagnostics: z.ZodArray<z.ZodString>;
278
+ }, z.core.$strict>>;
279
+ }, z.core.$strict>, z.ZodTransform<WithoutUndefined<{
280
+ kind: "accepted";
281
+ value: {
282
+ task: {
283
+ id: `task/${string}`;
284
+ namespace: string[];
285
+ title: string;
286
+ state: "open" | "in_progress" | "on_hold" | "done" | "drop";
287
+ priority: 0 | 1 | 2 | 3;
288
+ needs: `task/${string}`[];
289
+ parent: `task/${string}` | null;
290
+ supersedes: `task/${string}`[];
291
+ relates: `task/${string}`[];
292
+ note: string;
293
+ createdAt: string;
294
+ updatedAt: string;
295
+ body: string;
296
+ } | {
297
+ createdBy: string;
298
+ id: `task/${string}`;
299
+ namespace: string[];
300
+ title: string;
301
+ state: "open" | "in_progress" | "on_hold" | "done" | "drop";
302
+ priority: 0 | 1 | 2 | 3;
303
+ needs: `task/${string}`[];
304
+ parent: `task/${string}` | null;
305
+ supersedes: `task/${string}`[];
306
+ relates: `task/${string}`[];
307
+ note: string;
308
+ createdAt: string;
309
+ updatedAt: string;
310
+ body: string;
311
+ };
312
+ documentDiff: string;
313
+ };
314
+ cleanup?: {
315
+ kind: "lock-release-failed";
316
+ diagnostics: string[];
317
+ } | undefined;
318
+ }>, {
319
+ kind: "accepted";
320
+ value: {
321
+ task: {
322
+ id: `task/${string}`;
323
+ namespace: string[];
324
+ title: string;
325
+ state: "open" | "in_progress" | "on_hold" | "done" | "drop";
326
+ priority: 0 | 1 | 2 | 3;
327
+ needs: `task/${string}`[];
328
+ parent: `task/${string}` | null;
329
+ supersedes: `task/${string}`[];
330
+ relates: `task/${string}`[];
331
+ note: string;
332
+ createdAt: string;
333
+ updatedAt: string;
334
+ body: string;
335
+ } | {
336
+ createdBy: string;
337
+ id: `task/${string}`;
338
+ namespace: string[];
339
+ title: string;
340
+ state: "open" | "in_progress" | "on_hold" | "done" | "drop";
341
+ priority: 0 | 1 | 2 | 3;
342
+ needs: `task/${string}`[];
343
+ parent: `task/${string}` | null;
344
+ supersedes: `task/${string}`[];
345
+ relates: `task/${string}`[];
346
+ note: string;
347
+ createdAt: string;
348
+ updatedAt: string;
349
+ body: string;
350
+ };
351
+ documentDiff: string;
352
+ };
353
+ cleanup?: {
354
+ kind: "lock-release-failed";
355
+ diagnostics: string[];
356
+ } | undefined;
357
+ }>>, z.ZodObject<{
195
358
  kind: z.ZodLiteral<"refused">;
196
359
  refusal: z.ZodUnion<readonly [z.ZodObject<{
197
360
  kind: z.ZodLiteral<"task-missing">;
@@ -243,7 +406,7 @@ export declare const taskUpdateResultSchema: z.ZodUnion<readonly [z.ZodObject<{
243
406
  export declare const taskBatchResultSchema: z.ZodObject<{
244
407
  items: z.ZodArray<z.ZodObject<{
245
408
  id: z.ZodPipe<z.ZodString, z.ZodTransform<`task/${string}`, string>>;
246
- outcome: z.ZodUnion<readonly [z.ZodObject<{
409
+ outcome: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
247
410
  kind: z.ZodLiteral<"accepted">;
248
411
  value: z.ZodPipe<z.ZodObject<{
249
412
  id: z.ZodPipe<z.ZodString, z.ZodTransform<`task/${string}`, string>>;
@@ -311,7 +474,83 @@ export declare const taskBatchResultSchema: z.ZodObject<{
311
474
  body: string;
312
475
  createdBy?: string | undefined;
313
476
  }>>;
314
- }, z.core.$strict>, z.ZodObject<{
477
+ cleanup: z.ZodOptional<z.ZodObject<{
478
+ kind: z.ZodLiteral<"lock-release-failed">;
479
+ diagnostics: z.ZodArray<z.ZodString>;
480
+ }, z.core.$strict>>;
481
+ }, z.core.$strict>, z.ZodTransform<WithoutUndefined<{
482
+ kind: "accepted";
483
+ value: {
484
+ id: `task/${string}`;
485
+ namespace: string[];
486
+ title: string;
487
+ state: "open" | "in_progress" | "on_hold" | "done" | "drop";
488
+ priority: 0 | 1 | 2 | 3;
489
+ needs: `task/${string}`[];
490
+ parent: `task/${string}` | null;
491
+ supersedes: `task/${string}`[];
492
+ relates: `task/${string}`[];
493
+ note: string;
494
+ createdAt: string;
495
+ updatedAt: string;
496
+ body: string;
497
+ } | {
498
+ createdBy: string;
499
+ id: `task/${string}`;
500
+ namespace: string[];
501
+ title: string;
502
+ state: "open" | "in_progress" | "on_hold" | "done" | "drop";
503
+ priority: 0 | 1 | 2 | 3;
504
+ needs: `task/${string}`[];
505
+ parent: `task/${string}` | null;
506
+ supersedes: `task/${string}`[];
507
+ relates: `task/${string}`[];
508
+ note: string;
509
+ createdAt: string;
510
+ updatedAt: string;
511
+ body: string;
512
+ };
513
+ cleanup?: {
514
+ kind: "lock-release-failed";
515
+ diagnostics: string[];
516
+ } | undefined;
517
+ }>, {
518
+ kind: "accepted";
519
+ value: {
520
+ id: `task/${string}`;
521
+ namespace: string[];
522
+ title: string;
523
+ state: "open" | "in_progress" | "on_hold" | "done" | "drop";
524
+ priority: 0 | 1 | 2 | 3;
525
+ needs: `task/${string}`[];
526
+ parent: `task/${string}` | null;
527
+ supersedes: `task/${string}`[];
528
+ relates: `task/${string}`[];
529
+ note: string;
530
+ createdAt: string;
531
+ updatedAt: string;
532
+ body: string;
533
+ } | {
534
+ createdBy: string;
535
+ id: `task/${string}`;
536
+ namespace: string[];
537
+ title: string;
538
+ state: "open" | "in_progress" | "on_hold" | "done" | "drop";
539
+ priority: 0 | 1 | 2 | 3;
540
+ needs: `task/${string}`[];
541
+ parent: `task/${string}` | null;
542
+ supersedes: `task/${string}`[];
543
+ relates: `task/${string}`[];
544
+ note: string;
545
+ createdAt: string;
546
+ updatedAt: string;
547
+ body: string;
548
+ };
549
+ cleanup?: {
550
+ kind: "lock-release-failed";
551
+ diagnostics: string[];
552
+ } | undefined;
553
+ }>>, z.ZodObject<{
315
554
  kind: z.ZodLiteral<"refused">;
316
555
  refusal: z.ZodUnion<readonly [z.ZodObject<{
317
556
  kind: z.ZodLiteral<"task-missing">;
@@ -375,7 +614,7 @@ export declare const taskCompositionResultSchema: z.ZodUnion<readonly [z.ZodObje
375
614
  }, z.core.$strict>>;
376
615
  admissionOrder: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<`task/${string}`, string>>>;
377
616
  kind: z.ZodLiteral<"planned">;
378
- }, z.core.$strict>, z.ZodObject<{
617
+ }, z.core.$strict>, z.ZodPipe<z.ZodObject<{
379
618
  documentChanges: z.ZodArray<z.ZodObject<{
380
619
  taskId: z.ZodPipe<z.ZodString, z.ZodTransform<`task/${string}`, string>>;
381
620
  kind: z.ZodEnum<{
@@ -384,13 +623,49 @@ export declare const taskCompositionResultSchema: z.ZodUnion<readonly [z.ZodObje
384
623
  }>;
385
624
  documentDiff: z.ZodString;
386
625
  }, z.core.$strict>>;
626
+ cleanup: z.ZodOptional<z.ZodObject<{
627
+ kind: z.ZodLiteral<"lock-release-failed">;
628
+ diagnostics: z.ZodArray<z.ZodString>;
629
+ }, z.core.$strict>>;
387
630
  aliases: z.ZodArray<z.ZodObject<{
388
631
  alias: z.ZodString;
389
632
  taskId: z.ZodPipe<z.ZodString, z.ZodTransform<`task/${string}`, string>>;
390
633
  }, z.core.$strict>>;
391
634
  admissionOrder: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<`task/${string}`, string>>>;
392
635
  kind: z.ZodLiteral<"accepted">;
393
- }, z.core.$strict>, z.ZodObject<{
636
+ }, z.core.$strict>, z.ZodTransform<WithoutUndefined<{
637
+ documentChanges: {
638
+ taskId: `task/${string}`;
639
+ kind: "created" | "updated";
640
+ documentDiff: string;
641
+ }[];
642
+ aliases: {
643
+ alias: string;
644
+ taskId: `task/${string}`;
645
+ }[];
646
+ admissionOrder: `task/${string}`[];
647
+ kind: "accepted";
648
+ cleanup?: {
649
+ kind: "lock-release-failed";
650
+ diagnostics: string[];
651
+ } | undefined;
652
+ }>, {
653
+ documentChanges: {
654
+ taskId: `task/${string}`;
655
+ kind: "created" | "updated";
656
+ documentDiff: string;
657
+ }[];
658
+ aliases: {
659
+ alias: string;
660
+ taskId: `task/${string}`;
661
+ }[];
662
+ admissionOrder: `task/${string}`[];
663
+ kind: "accepted";
664
+ cleanup?: {
665
+ kind: "lock-release-failed";
666
+ diagnostics: string[];
667
+ } | undefined;
668
+ }>>, z.ZodObject<{
394
669
  kind: z.ZodLiteral<"refused">;
395
670
  refusal: z.ZodObject<{
396
671
  kind: z.ZodLiteral<"invalid-composition">;
@@ -400,7 +675,7 @@ export declare const taskCompositionResultSchema: z.ZodUnion<readonly [z.ZodObje
400
675
  token: z.ZodString;
401
676
  }, z.core.$strict>>;
402
677
  }, z.core.$strict>;
403
- }, z.core.$strict>, z.ZodObject<{
678
+ }, z.core.$strict>, z.ZodPipe<z.ZodObject<{
404
679
  documentChanges: z.ZodArray<z.ZodObject<{
405
680
  taskId: z.ZodPipe<z.ZodString, z.ZodTransform<`task/${string}`, string>>;
406
681
  kind: z.ZodEnum<{
@@ -409,6 +684,10 @@ export declare const taskCompositionResultSchema: z.ZodUnion<readonly [z.ZodObje
409
684
  }>;
410
685
  documentDiff: z.ZodString;
411
686
  }, z.core.$strict>>;
687
+ cleanup: z.ZodOptional<z.ZodObject<{
688
+ kind: z.ZodLiteral<"lock-release-failed">;
689
+ diagnostics: z.ZodArray<z.ZodString>;
690
+ }, z.core.$strict>>;
412
691
  stopped: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
413
692
  kind: z.ZodLiteral<"task-missing">;
414
693
  taskId: z.ZodPipe<z.ZodString, z.ZodTransform<`task/${string}`, string>>;
@@ -462,11 +741,105 @@ export declare const taskCompositionResultSchema: z.ZodUnion<readonly [z.ZodObje
462
741
  }, z.core.$strict>>;
463
742
  admissionOrder: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<`task/${string}`, string>>>;
464
743
  kind: z.ZodLiteral<"incomplete">;
465
- }, z.core.$strict>]>;
744
+ }, z.core.$strict>, z.ZodTransform<WithoutUndefined<{
745
+ documentChanges: {
746
+ taskId: `task/${string}`;
747
+ kind: "created" | "updated";
748
+ documentDiff: string;
749
+ }[];
750
+ stopped: {
751
+ kind: "task-missing";
752
+ taskId: `task/${string}`;
753
+ } | {
754
+ kind: "invalid-lifecycle-transition";
755
+ taskId: `task/${string}`;
756
+ state: "open" | "in_progress" | "on_hold" | "done" | "drop";
757
+ verb: "done" | "drop" | "start" | "stop" | "hold" | "resume";
758
+ } | {
759
+ kind: "invalid-graph";
760
+ diagnostic: string;
761
+ } | {
762
+ kind: "invalid-namespace-context";
763
+ path: string;
764
+ } | {
765
+ kind: "relation-owned-by-other";
766
+ taskId: `task/${string}`;
767
+ related: `task/${string}`;
768
+ declaringTask: `task/${string}`;
769
+ } | {
770
+ kind: "invalid-composition";
771
+ diagnostics: {
772
+ line: number;
773
+ reason: string;
774
+ token: string;
775
+ }[];
776
+ } | {
777
+ kind: "retry";
778
+ reason: "concurrent-modification" | "busy";
779
+ };
780
+ draft: string;
781
+ aliases: {
782
+ alias: string;
783
+ taskId: `task/${string}`;
784
+ }[];
785
+ admissionOrder: `task/${string}`[];
786
+ kind: "incomplete";
787
+ cleanup?: {
788
+ kind: "lock-release-failed";
789
+ diagnostics: string[];
790
+ } | undefined;
791
+ }>, {
792
+ documentChanges: {
793
+ taskId: `task/${string}`;
794
+ kind: "created" | "updated";
795
+ documentDiff: string;
796
+ }[];
797
+ stopped: {
798
+ kind: "task-missing";
799
+ taskId: `task/${string}`;
800
+ } | {
801
+ kind: "invalid-lifecycle-transition";
802
+ taskId: `task/${string}`;
803
+ state: "open" | "in_progress" | "on_hold" | "done" | "drop";
804
+ verb: "done" | "drop" | "start" | "stop" | "hold" | "resume";
805
+ } | {
806
+ kind: "invalid-graph";
807
+ diagnostic: string;
808
+ } | {
809
+ kind: "invalid-namespace-context";
810
+ path: string;
811
+ } | {
812
+ kind: "relation-owned-by-other";
813
+ taskId: `task/${string}`;
814
+ related: `task/${string}`;
815
+ declaringTask: `task/${string}`;
816
+ } | {
817
+ kind: "invalid-composition";
818
+ diagnostics: {
819
+ line: number;
820
+ reason: string;
821
+ token: string;
822
+ }[];
823
+ } | {
824
+ kind: "retry";
825
+ reason: "concurrent-modification" | "busy";
826
+ };
827
+ draft: string;
828
+ aliases: {
829
+ alias: string;
830
+ taskId: `task/${string}`;
831
+ }[];
832
+ admissionOrder: `task/${string}`[];
833
+ kind: "incomplete";
834
+ cleanup?: {
835
+ kind: "lock-release-failed";
836
+ diagnostics: string[];
837
+ } | undefined;
838
+ }>>]>;
466
839
  export declare const taskMutationExecutionResultSchema: z.ZodUnion<readonly [z.ZodObject<{
467
840
  items: z.ZodArray<z.ZodObject<{
468
841
  id: z.ZodPipe<z.ZodString, z.ZodTransform<`task/${string}`, string>>;
469
- outcome: z.ZodUnion<readonly [z.ZodObject<{
842
+ outcome: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
470
843
  kind: z.ZodLiteral<"accepted">;
471
844
  value: z.ZodPipe<z.ZodObject<{
472
845
  id: z.ZodPipe<z.ZodString, z.ZodTransform<`task/${string}`, string>>;
@@ -534,7 +907,83 @@ export declare const taskMutationExecutionResultSchema: z.ZodUnion<readonly [z.Z
534
907
  body: string;
535
908
  createdBy?: string | undefined;
536
909
  }>>;
537
- }, z.core.$strict>, z.ZodObject<{
910
+ cleanup: z.ZodOptional<z.ZodObject<{
911
+ kind: z.ZodLiteral<"lock-release-failed">;
912
+ diagnostics: z.ZodArray<z.ZodString>;
913
+ }, z.core.$strict>>;
914
+ }, z.core.$strict>, z.ZodTransform<WithoutUndefined<{
915
+ kind: "accepted";
916
+ value: {
917
+ id: `task/${string}`;
918
+ namespace: string[];
919
+ title: string;
920
+ state: "open" | "in_progress" | "on_hold" | "done" | "drop";
921
+ priority: 0 | 1 | 2 | 3;
922
+ needs: `task/${string}`[];
923
+ parent: `task/${string}` | null;
924
+ supersedes: `task/${string}`[];
925
+ relates: `task/${string}`[];
926
+ note: string;
927
+ createdAt: string;
928
+ updatedAt: string;
929
+ body: string;
930
+ } | {
931
+ createdBy: string;
932
+ id: `task/${string}`;
933
+ namespace: string[];
934
+ title: string;
935
+ state: "open" | "in_progress" | "on_hold" | "done" | "drop";
936
+ priority: 0 | 1 | 2 | 3;
937
+ needs: `task/${string}`[];
938
+ parent: `task/${string}` | null;
939
+ supersedes: `task/${string}`[];
940
+ relates: `task/${string}`[];
941
+ note: string;
942
+ createdAt: string;
943
+ updatedAt: string;
944
+ body: string;
945
+ };
946
+ cleanup?: {
947
+ kind: "lock-release-failed";
948
+ diagnostics: string[];
949
+ } | undefined;
950
+ }>, {
951
+ kind: "accepted";
952
+ value: {
953
+ id: `task/${string}`;
954
+ namespace: string[];
955
+ title: string;
956
+ state: "open" | "in_progress" | "on_hold" | "done" | "drop";
957
+ priority: 0 | 1 | 2 | 3;
958
+ needs: `task/${string}`[];
959
+ parent: `task/${string}` | null;
960
+ supersedes: `task/${string}`[];
961
+ relates: `task/${string}`[];
962
+ note: string;
963
+ createdAt: string;
964
+ updatedAt: string;
965
+ body: string;
966
+ } | {
967
+ createdBy: string;
968
+ id: `task/${string}`;
969
+ namespace: string[];
970
+ title: string;
971
+ state: "open" | "in_progress" | "on_hold" | "done" | "drop";
972
+ priority: 0 | 1 | 2 | 3;
973
+ needs: `task/${string}`[];
974
+ parent: `task/${string}` | null;
975
+ supersedes: `task/${string}`[];
976
+ relates: `task/${string}`[];
977
+ note: string;
978
+ createdAt: string;
979
+ updatedAt: string;
980
+ body: string;
981
+ };
982
+ cleanup?: {
983
+ kind: "lock-release-failed";
984
+ diagnostics: string[];
985
+ } | undefined;
986
+ }>>, z.ZodObject<{
538
987
  kind: z.ZodLiteral<"refused">;
539
988
  refusal: z.ZodUnion<readonly [z.ZodObject<{
540
989
  kind: z.ZodLiteral<"task-missing">;
@@ -584,7 +1033,7 @@ export declare const taskMutationExecutionResultSchema: z.ZodUnion<readonly [z.Z
584
1033
  }>;
585
1034
  }, z.core.$strict>]>;
586
1035
  }, z.core.$strict>>;
587
- }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
1036
+ }, z.core.$strict>, z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
588
1037
  kind: z.ZodLiteral<"accepted">;
589
1038
  value: z.ZodPipe<z.ZodObject<{
590
1039
  id: z.ZodPipe<z.ZodString, z.ZodTransform<`task/${string}`, string>>;
@@ -652,7 +1101,83 @@ export declare const taskMutationExecutionResultSchema: z.ZodUnion<readonly [z.Z
652
1101
  body: string;
653
1102
  createdBy?: string | undefined;
654
1103
  }>>;
655
- }, z.core.$strict>, z.ZodObject<{
1104
+ cleanup: z.ZodOptional<z.ZodObject<{
1105
+ kind: z.ZodLiteral<"lock-release-failed">;
1106
+ diagnostics: z.ZodArray<z.ZodString>;
1107
+ }, z.core.$strict>>;
1108
+ }, z.core.$strict>, z.ZodTransform<WithoutUndefined<{
1109
+ kind: "accepted";
1110
+ value: {
1111
+ id: `task/${string}`;
1112
+ namespace: string[];
1113
+ title: string;
1114
+ state: "open" | "in_progress" | "on_hold" | "done" | "drop";
1115
+ priority: 0 | 1 | 2 | 3;
1116
+ needs: `task/${string}`[];
1117
+ parent: `task/${string}` | null;
1118
+ supersedes: `task/${string}`[];
1119
+ relates: `task/${string}`[];
1120
+ note: string;
1121
+ createdAt: string;
1122
+ updatedAt: string;
1123
+ body: string;
1124
+ } | {
1125
+ createdBy: string;
1126
+ id: `task/${string}`;
1127
+ namespace: string[];
1128
+ title: string;
1129
+ state: "open" | "in_progress" | "on_hold" | "done" | "drop";
1130
+ priority: 0 | 1 | 2 | 3;
1131
+ needs: `task/${string}`[];
1132
+ parent: `task/${string}` | null;
1133
+ supersedes: `task/${string}`[];
1134
+ relates: `task/${string}`[];
1135
+ note: string;
1136
+ createdAt: string;
1137
+ updatedAt: string;
1138
+ body: string;
1139
+ };
1140
+ cleanup?: {
1141
+ kind: "lock-release-failed";
1142
+ diagnostics: string[];
1143
+ } | undefined;
1144
+ }>, {
1145
+ kind: "accepted";
1146
+ value: {
1147
+ id: `task/${string}`;
1148
+ namespace: string[];
1149
+ title: string;
1150
+ state: "open" | "in_progress" | "on_hold" | "done" | "drop";
1151
+ priority: 0 | 1 | 2 | 3;
1152
+ needs: `task/${string}`[];
1153
+ parent: `task/${string}` | null;
1154
+ supersedes: `task/${string}`[];
1155
+ relates: `task/${string}`[];
1156
+ note: string;
1157
+ createdAt: string;
1158
+ updatedAt: string;
1159
+ body: string;
1160
+ } | {
1161
+ createdBy: string;
1162
+ id: `task/${string}`;
1163
+ namespace: string[];
1164
+ title: string;
1165
+ state: "open" | "in_progress" | "on_hold" | "done" | "drop";
1166
+ priority: 0 | 1 | 2 | 3;
1167
+ needs: `task/${string}`[];
1168
+ parent: `task/${string}` | null;
1169
+ supersedes: `task/${string}`[];
1170
+ relates: `task/${string}`[];
1171
+ note: string;
1172
+ createdAt: string;
1173
+ updatedAt: string;
1174
+ body: string;
1175
+ };
1176
+ cleanup?: {
1177
+ kind: "lock-release-failed";
1178
+ diagnostics: string[];
1179
+ } | undefined;
1180
+ }>>, z.ZodObject<{
656
1181
  kind: z.ZodLiteral<"refused">;
657
1182
  refusal: z.ZodUnion<readonly [z.ZodObject<{
658
1183
  kind: z.ZodLiteral<"task-missing">;
@@ -700,7 +1225,7 @@ export declare const taskMutationExecutionResultSchema: z.ZodUnion<readonly [z.Z
700
1225
  "concurrent-modification": "concurrent-modification";
701
1226
  busy: "busy";
702
1227
  }>;
703
- }, z.core.$strict>]>, z.ZodUnion<readonly [z.ZodObject<{
1228
+ }, z.core.$strict>]>, z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
704
1229
  kind: z.ZodLiteral<"accepted">;
705
1230
  value: z.ZodObject<{
706
1231
  task: z.ZodPipe<z.ZodObject<{
@@ -771,7 +1296,89 @@ export declare const taskMutationExecutionResultSchema: z.ZodUnion<readonly [z.Z
771
1296
  }>>;
772
1297
  documentDiff: z.ZodString;
773
1298
  }, z.core.$strict>;
774
- }, z.core.$strict>, z.ZodObject<{
1299
+ cleanup: z.ZodOptional<z.ZodObject<{
1300
+ kind: z.ZodLiteral<"lock-release-failed">;
1301
+ diagnostics: z.ZodArray<z.ZodString>;
1302
+ }, z.core.$strict>>;
1303
+ }, z.core.$strict>, z.ZodTransform<WithoutUndefined<{
1304
+ kind: "accepted";
1305
+ value: {
1306
+ task: {
1307
+ id: `task/${string}`;
1308
+ namespace: string[];
1309
+ title: string;
1310
+ state: "open" | "in_progress" | "on_hold" | "done" | "drop";
1311
+ priority: 0 | 1 | 2 | 3;
1312
+ needs: `task/${string}`[];
1313
+ parent: `task/${string}` | null;
1314
+ supersedes: `task/${string}`[];
1315
+ relates: `task/${string}`[];
1316
+ note: string;
1317
+ createdAt: string;
1318
+ updatedAt: string;
1319
+ body: string;
1320
+ } | {
1321
+ createdBy: string;
1322
+ id: `task/${string}`;
1323
+ namespace: string[];
1324
+ title: string;
1325
+ state: "open" | "in_progress" | "on_hold" | "done" | "drop";
1326
+ priority: 0 | 1 | 2 | 3;
1327
+ needs: `task/${string}`[];
1328
+ parent: `task/${string}` | null;
1329
+ supersedes: `task/${string}`[];
1330
+ relates: `task/${string}`[];
1331
+ note: string;
1332
+ createdAt: string;
1333
+ updatedAt: string;
1334
+ body: string;
1335
+ };
1336
+ documentDiff: string;
1337
+ };
1338
+ cleanup?: {
1339
+ kind: "lock-release-failed";
1340
+ diagnostics: string[];
1341
+ } | undefined;
1342
+ }>, {
1343
+ kind: "accepted";
1344
+ value: {
1345
+ task: {
1346
+ id: `task/${string}`;
1347
+ namespace: string[];
1348
+ title: string;
1349
+ state: "open" | "in_progress" | "on_hold" | "done" | "drop";
1350
+ priority: 0 | 1 | 2 | 3;
1351
+ needs: `task/${string}`[];
1352
+ parent: `task/${string}` | null;
1353
+ supersedes: `task/${string}`[];
1354
+ relates: `task/${string}`[];
1355
+ note: string;
1356
+ createdAt: string;
1357
+ updatedAt: string;
1358
+ body: string;
1359
+ } | {
1360
+ createdBy: string;
1361
+ id: `task/${string}`;
1362
+ namespace: string[];
1363
+ title: string;
1364
+ state: "open" | "in_progress" | "on_hold" | "done" | "drop";
1365
+ priority: 0 | 1 | 2 | 3;
1366
+ needs: `task/${string}`[];
1367
+ parent: `task/${string}` | null;
1368
+ supersedes: `task/${string}`[];
1369
+ relates: `task/${string}`[];
1370
+ note: string;
1371
+ createdAt: string;
1372
+ updatedAt: string;
1373
+ body: string;
1374
+ };
1375
+ documentDiff: string;
1376
+ };
1377
+ cleanup?: {
1378
+ kind: "lock-release-failed";
1379
+ diagnostics: string[];
1380
+ } | undefined;
1381
+ }>>, z.ZodObject<{
775
1382
  kind: z.ZodLiteral<"refused">;
776
1383
  refusal: z.ZodUnion<readonly [z.ZodObject<{
777
1384
  kind: z.ZodLiteral<"task-missing">;
@@ -832,7 +1439,7 @@ export declare const taskMutationExecutionResultSchema: z.ZodUnion<readonly [z.Z
832
1439
  }, z.core.$strict>>;
833
1440
  admissionOrder: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<`task/${string}`, string>>>;
834
1441
  kind: z.ZodLiteral<"planned">;
835
- }, z.core.$strict>, z.ZodObject<{
1442
+ }, z.core.$strict>, z.ZodPipe<z.ZodObject<{
836
1443
  documentChanges: z.ZodArray<z.ZodObject<{
837
1444
  taskId: z.ZodPipe<z.ZodString, z.ZodTransform<`task/${string}`, string>>;
838
1445
  kind: z.ZodEnum<{
@@ -841,13 +1448,49 @@ export declare const taskMutationExecutionResultSchema: z.ZodUnion<readonly [z.Z
841
1448
  }>;
842
1449
  documentDiff: z.ZodString;
843
1450
  }, z.core.$strict>>;
1451
+ cleanup: z.ZodOptional<z.ZodObject<{
1452
+ kind: z.ZodLiteral<"lock-release-failed">;
1453
+ diagnostics: z.ZodArray<z.ZodString>;
1454
+ }, z.core.$strict>>;
844
1455
  aliases: z.ZodArray<z.ZodObject<{
845
1456
  alias: z.ZodString;
846
1457
  taskId: z.ZodPipe<z.ZodString, z.ZodTransform<`task/${string}`, string>>;
847
1458
  }, z.core.$strict>>;
848
1459
  admissionOrder: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<`task/${string}`, string>>>;
849
1460
  kind: z.ZodLiteral<"accepted">;
850
- }, z.core.$strict>, z.ZodObject<{
1461
+ }, z.core.$strict>, z.ZodTransform<WithoutUndefined<{
1462
+ documentChanges: {
1463
+ taskId: `task/${string}`;
1464
+ kind: "created" | "updated";
1465
+ documentDiff: string;
1466
+ }[];
1467
+ aliases: {
1468
+ alias: string;
1469
+ taskId: `task/${string}`;
1470
+ }[];
1471
+ admissionOrder: `task/${string}`[];
1472
+ kind: "accepted";
1473
+ cleanup?: {
1474
+ kind: "lock-release-failed";
1475
+ diagnostics: string[];
1476
+ } | undefined;
1477
+ }>, {
1478
+ documentChanges: {
1479
+ taskId: `task/${string}`;
1480
+ kind: "created" | "updated";
1481
+ documentDiff: string;
1482
+ }[];
1483
+ aliases: {
1484
+ alias: string;
1485
+ taskId: `task/${string}`;
1486
+ }[];
1487
+ admissionOrder: `task/${string}`[];
1488
+ kind: "accepted";
1489
+ cleanup?: {
1490
+ kind: "lock-release-failed";
1491
+ diagnostics: string[];
1492
+ } | undefined;
1493
+ }>>, z.ZodObject<{
851
1494
  kind: z.ZodLiteral<"refused">;
852
1495
  refusal: z.ZodObject<{
853
1496
  kind: z.ZodLiteral<"invalid-composition">;
@@ -857,7 +1500,7 @@ export declare const taskMutationExecutionResultSchema: z.ZodUnion<readonly [z.Z
857
1500
  token: z.ZodString;
858
1501
  }, z.core.$strict>>;
859
1502
  }, z.core.$strict>;
860
- }, z.core.$strict>, z.ZodObject<{
1503
+ }, z.core.$strict>, z.ZodPipe<z.ZodObject<{
861
1504
  documentChanges: z.ZodArray<z.ZodObject<{
862
1505
  taskId: z.ZodPipe<z.ZodString, z.ZodTransform<`task/${string}`, string>>;
863
1506
  kind: z.ZodEnum<{
@@ -866,6 +1509,10 @@ export declare const taskMutationExecutionResultSchema: z.ZodUnion<readonly [z.Z
866
1509
  }>;
867
1510
  documentDiff: z.ZodString;
868
1511
  }, z.core.$strict>>;
1512
+ cleanup: z.ZodOptional<z.ZodObject<{
1513
+ kind: z.ZodLiteral<"lock-release-failed">;
1514
+ diagnostics: z.ZodArray<z.ZodString>;
1515
+ }, z.core.$strict>>;
869
1516
  stopped: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
870
1517
  kind: z.ZodLiteral<"task-missing">;
871
1518
  taskId: z.ZodPipe<z.ZodString, z.ZodTransform<`task/${string}`, string>>;
@@ -919,5 +1566,100 @@ export declare const taskMutationExecutionResultSchema: z.ZodUnion<readonly [z.Z
919
1566
  }, z.core.$strict>>;
920
1567
  admissionOrder: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<`task/${string}`, string>>>;
921
1568
  kind: z.ZodLiteral<"incomplete">;
922
- }, z.core.$strict>]>]>;
1569
+ }, z.core.$strict>, z.ZodTransform<WithoutUndefined<{
1570
+ documentChanges: {
1571
+ taskId: `task/${string}`;
1572
+ kind: "created" | "updated";
1573
+ documentDiff: string;
1574
+ }[];
1575
+ stopped: {
1576
+ kind: "task-missing";
1577
+ taskId: `task/${string}`;
1578
+ } | {
1579
+ kind: "invalid-lifecycle-transition";
1580
+ taskId: `task/${string}`;
1581
+ state: "open" | "in_progress" | "on_hold" | "done" | "drop";
1582
+ verb: "done" | "drop" | "start" | "stop" | "hold" | "resume";
1583
+ } | {
1584
+ kind: "invalid-graph";
1585
+ diagnostic: string;
1586
+ } | {
1587
+ kind: "invalid-namespace-context";
1588
+ path: string;
1589
+ } | {
1590
+ kind: "relation-owned-by-other";
1591
+ taskId: `task/${string}`;
1592
+ related: `task/${string}`;
1593
+ declaringTask: `task/${string}`;
1594
+ } | {
1595
+ kind: "invalid-composition";
1596
+ diagnostics: {
1597
+ line: number;
1598
+ reason: string;
1599
+ token: string;
1600
+ }[];
1601
+ } | {
1602
+ kind: "retry";
1603
+ reason: "concurrent-modification" | "busy";
1604
+ };
1605
+ draft: string;
1606
+ aliases: {
1607
+ alias: string;
1608
+ taskId: `task/${string}`;
1609
+ }[];
1610
+ admissionOrder: `task/${string}`[];
1611
+ kind: "incomplete";
1612
+ cleanup?: {
1613
+ kind: "lock-release-failed";
1614
+ diagnostics: string[];
1615
+ } | undefined;
1616
+ }>, {
1617
+ documentChanges: {
1618
+ taskId: `task/${string}`;
1619
+ kind: "created" | "updated";
1620
+ documentDiff: string;
1621
+ }[];
1622
+ stopped: {
1623
+ kind: "task-missing";
1624
+ taskId: `task/${string}`;
1625
+ } | {
1626
+ kind: "invalid-lifecycle-transition";
1627
+ taskId: `task/${string}`;
1628
+ state: "open" | "in_progress" | "on_hold" | "done" | "drop";
1629
+ verb: "done" | "drop" | "start" | "stop" | "hold" | "resume";
1630
+ } | {
1631
+ kind: "invalid-graph";
1632
+ diagnostic: string;
1633
+ } | {
1634
+ kind: "invalid-namespace-context";
1635
+ path: string;
1636
+ } | {
1637
+ kind: "relation-owned-by-other";
1638
+ taskId: `task/${string}`;
1639
+ related: `task/${string}`;
1640
+ declaringTask: `task/${string}`;
1641
+ } | {
1642
+ kind: "invalid-composition";
1643
+ diagnostics: {
1644
+ line: number;
1645
+ reason: string;
1646
+ token: string;
1647
+ }[];
1648
+ } | {
1649
+ kind: "retry";
1650
+ reason: "concurrent-modification" | "busy";
1651
+ };
1652
+ draft: string;
1653
+ aliases: {
1654
+ alias: string;
1655
+ taskId: `task/${string}`;
1656
+ }[];
1657
+ admissionOrder: `task/${string}`[];
1658
+ kind: "incomplete";
1659
+ cleanup?: {
1660
+ kind: "lock-release-failed";
1661
+ diagnostics: string[];
1662
+ } | undefined;
1663
+ }>>]>]>;
923
1664
  export declare function isTaskMutationExecutionResult(value: unknown): value is TaskMutationExecutionResult;
1665
+ export {};