@astrosheep/keiyaku 4.6.7 → 4.6.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (336) hide show
  1. package/README.md +46 -16
  2. package/build/plugins/claude/.claude-plugin/plugin.json +1 -1
  3. package/build/plugins/claude/skills/keiyaku/SKILL.md +5 -6
  4. package/build/plugins/claude/skills/keiyaku-akuma/SKILL.md +1 -1
  5. package/build/plugins/claude/skills/keiyaku-akuma/references/automation.md +8 -8
  6. package/build/plugins/claude/skills/keiyaku-babysit/SKILL.md +1 -1
  7. package/build/plugins/claude/skills/keiyaku-bind/SKILL.md +9 -9
  8. package/build/plugins/claude/skills/keiyaku-debt/SKILL.md +91 -0
  9. package/build/plugins/claude/skills/keiyaku-workflow/SKILL.md +2 -2
  10. package/build/plugins/codex/.codex-plugin/plugin.json +1 -1
  11. package/build/plugins/codex/skills/keiyaku/SKILL.md +5 -6
  12. package/build/plugins/codex/skills/keiyaku-akuma/SKILL.md +1 -1
  13. package/build/plugins/codex/skills/keiyaku-akuma/references/automation.md +8 -8
  14. package/build/plugins/codex/skills/keiyaku-babysit/SKILL.md +1 -1
  15. package/build/plugins/codex/skills/keiyaku-bind/SKILL.md +9 -9
  16. package/build/plugins/codex/skills/keiyaku-debt/SKILL.md +91 -0
  17. package/build/plugins/codex/skills/keiyaku-workflow/SKILL.md +2 -2
  18. package/build/plugins/opencode/index.js +1 -1
  19. package/build/plugins/opencode/skills/keiyaku/SKILL.md +5 -6
  20. package/build/plugins/opencode/skills/keiyaku-akuma/SKILL.md +1 -1
  21. package/build/plugins/opencode/skills/keiyaku-akuma/references/automation.md +8 -8
  22. package/build/plugins/opencode/skills/keiyaku-babysit/SKILL.md +1 -1
  23. package/build/plugins/opencode/skills/keiyaku-bind/SKILL.md +9 -9
  24. package/build/plugins/opencode/skills/keiyaku-debt/SKILL.md +91 -0
  25. package/build/plugins/opencode/skills/keiyaku-workflow/SKILL.md +2 -2
  26. package/build/plugins/pi/keiyaku.ts +0 -5
  27. package/build/skills/keiyaku/SKILL.md +5 -6
  28. package/build/skills/keiyaku-akuma/SKILL.md +1 -1
  29. package/build/skills/keiyaku-akuma/references/automation.md +8 -8
  30. package/build/skills/keiyaku-babysit/SKILL.md +1 -1
  31. package/build/skills/keiyaku-bind/SKILL.md +9 -9
  32. package/build/skills/keiyaku-debt/SKILL.md +91 -0
  33. package/build/skills/keiyaku-workflow/SKILL.md +2 -2
  34. package/build/src/akuma/akuma-call.d.ts +2 -0
  35. package/build/src/akuma/akuma-call.js +8 -2
  36. package/build/src/akuma/akuma-instance.d.ts +14 -1
  37. package/build/src/akuma/akuma-instance.js +37 -7
  38. package/build/src/akuma/akuma-observe.d.ts +33 -8
  39. package/build/src/akuma/akuma-observe.js +89 -63
  40. package/build/src/akuma/akuma-owner.d.ts +14 -2
  41. package/build/src/akuma/akuma-owner.js +49 -35
  42. package/build/src/akuma/akuma-selection-execution.js +9 -1
  43. package/build/src/akuma/akuma-stream.d.ts +22 -0
  44. package/build/src/akuma/akuma-stream.js +116 -0
  45. package/build/src/akuma/akuma-wait.d.ts +1 -40
  46. package/build/src/akuma/akuma-wait.js +23 -84
  47. package/build/src/akuma/akuma.d.ts +52 -16
  48. package/build/src/akuma/akuma.js +10 -10
  49. package/build/src/akuma/allowed.d.ts +7 -12
  50. package/build/src/akuma/allowed.js +13 -4
  51. package/build/src/akuma/archetype.d.ts +7 -15
  52. package/build/src/akuma/archetype.js +36 -35
  53. package/build/src/akuma/body-supervisor.d.ts +5 -5
  54. package/build/src/akuma/body-supervisor.js +22 -20
  55. package/build/src/akuma/body.d.ts +5 -3
  56. package/build/src/akuma/body.js +57 -8
  57. package/build/src/akuma/call-request.d.ts +30 -32
  58. package/build/src/akuma/call-request.js +10 -3
  59. package/build/src/akuma/caller.d.ts +39 -0
  60. package/build/src/akuma/caller.js +36 -0
  61. package/build/src/akuma/dispatch-association.d.ts +0 -1
  62. package/build/src/akuma/dispatch-association.js +0 -3
  63. package/build/src/akuma/heart/activity-schema.d.ts +12 -0
  64. package/build/src/akuma/heart/activity-schema.js +6 -0
  65. package/build/src/akuma/heart/facts.d.ts +16 -12
  66. package/build/src/akuma/heart/facts.js +8 -0
  67. package/build/src/akuma/heart/index.d.ts +61 -9
  68. package/build/src/akuma/heart/index.js +89 -24
  69. package/build/src/akuma/heart/rows.d.ts +3 -3
  70. package/build/src/akuma/heart/rows.js +5 -3
  71. package/build/src/akuma/heart/soul.d.ts +10 -1
  72. package/build/src/akuma/heart/soul.js +34 -24
  73. package/build/src/akuma/heart/storage.d.ts +20 -0
  74. package/build/src/akuma/heart/storage.js +62 -3
  75. package/build/src/akuma/heart/timeline.d.ts +7 -0
  76. package/build/src/akuma/heart/timeline.js +10 -0
  77. package/build/src/akuma/identity.d.ts +0 -1
  78. package/build/src/akuma/identity.js +2 -5
  79. package/build/src/akuma/index.d.ts +6 -2
  80. package/build/src/akuma/index.js +1 -0
  81. package/build/src/akuma/nuke.js +6 -28
  82. package/build/src/akuma/projection.d.ts +25 -11
  83. package/build/src/akuma/projection.js +24 -7
  84. package/build/src/akuma/provider-recipe.d.ts +18 -6
  85. package/build/src/akuma/provider-recipe.js +24 -1
  86. package/build/src/akuma/provider.d.ts +31 -10
  87. package/build/src/akuma/provider.js +105 -14
  88. package/build/src/akuma/providers/acp/events.js +29 -19
  89. package/build/src/akuma/providers/acp/index.js +2 -3
  90. package/build/src/akuma/providers/claude/events.js +110 -69
  91. package/build/src/akuma/providers/claude/index.d.ts +2 -2
  92. package/build/src/akuma/providers/claude/index.js +4 -8
  93. package/build/src/akuma/providers/codex-app-server/events.js +17 -2
  94. package/build/src/akuma/providers/codex-app-server/index.js +17 -11
  95. package/build/src/akuma/providers/decode.d.ts +33 -0
  96. package/build/src/akuma/providers/decode.js +65 -0
  97. package/build/src/akuma/providers/execution-environment.d.ts +2 -1
  98. package/build/src/akuma/providers/execution-environment.js +3 -0
  99. package/build/src/akuma/providers/grok-build/index.js +16 -48
  100. package/build/src/akuma/providers/index.js +2 -0
  101. package/build/src/akuma/providers/lifecycle.d.ts +9 -0
  102. package/build/src/akuma/providers/lifecycle.js +10 -0
  103. package/build/src/akuma/providers/opencode-sdk/event-stream.d.ts +3 -3
  104. package/build/src/akuma/providers/opencode-sdk/event-stream.js +2 -25
  105. package/build/src/akuma/providers/opencode-sdk/events.d.ts +7 -43
  106. package/build/src/akuma/providers/opencode-sdk/events.js +146 -296
  107. package/build/src/akuma/providers/opencode-sdk/index.js +270 -431
  108. package/build/src/akuma/providers/opencode-sdk/native-http.d.ts +9 -0
  109. package/build/src/akuma/providers/opencode-sdk/native-http.js +69 -0
  110. package/build/src/akuma/providers/opencode-sdk/session.d.ts +42 -36
  111. package/build/src/akuma/providers/opencode-sdk/session.js +75 -84
  112. package/build/src/akuma/providers/paseo/events.d.ts +33 -0
  113. package/build/src/akuma/providers/paseo/events.js +204 -0
  114. package/build/src/akuma/providers/paseo/index.d.ts +9 -0
  115. package/build/src/akuma/providers/paseo/index.js +357 -0
  116. package/build/src/akuma/providers/pi/events.d.ts +2 -0
  117. package/build/src/akuma/providers/pi/events.js +36 -38
  118. package/build/src/akuma/providers/pi/index.js +21 -35
  119. package/build/src/akuma/publication.d.ts +2 -0
  120. package/build/src/akuma/publication.js +5 -0
  121. package/build/src/akuma/request-lifecycle.d.ts +4 -2
  122. package/build/src/akuma/request-lifecycle.js +27 -12
  123. package/build/src/akuma/request-rendezvous.js +38 -55
  124. package/build/src/akuma/request-serve.d.ts +1 -1
  125. package/build/src/akuma/request-serve.js +77 -113
  126. package/build/src/akuma/requests.d.ts +3 -1
  127. package/build/src/akuma/requests.js +32 -0
  128. package/build/src/akuma/selection-observation.d.ts +129 -53
  129. package/build/src/akuma/selection-observation.js +3 -9
  130. package/build/src/akuma/turn-drive.d.ts +3 -0
  131. package/build/src/akuma/turn-drive.js +28 -10
  132. package/build/src/akuma-body.js +12 -22
  133. package/build/src/cli/akuma-caller.d.ts +3 -0
  134. package/build/src/cli/akuma-caller.js +31 -0
  135. package/build/src/cli/commands/akuma-grammar.js +10 -16
  136. package/build/src/cli/commands/akuma.js +25 -55
  137. package/build/src/cli/commands/contract-grammar.d.ts +9 -7
  138. package/build/src/cli/commands/contract-grammar.js +40 -47
  139. package/build/src/cli/commands/contract-help.d.ts +17 -7
  140. package/build/src/cli/commands/contract-help.js +50 -11
  141. package/build/src/cli/commands/contract.js +34 -63
  142. package/build/src/cli/commands/debt-grammar.d.ts +19 -0
  143. package/build/src/cli/commands/debt-grammar.js +323 -0
  144. package/build/src/cli/commands/debt-query.d.ts +5 -0
  145. package/build/src/cli/commands/{task-query.js → debt-query.js} +9 -9
  146. package/build/src/cli/commands/{task.d.ts → debt.d.ts} +2 -2
  147. package/build/src/cli/commands/{task.js → debt.js} +87 -164
  148. package/build/src/cli/coordinates.d.ts +1 -1
  149. package/build/src/cli/coordinates.js +1 -1
  150. package/build/src/cli/parse.d.ts +5 -5
  151. package/build/src/cli/parse.js +17 -16
  152. package/build/src/cli/render/akuma-activity.d.ts +11 -83
  153. package/build/src/cli/render/akuma-activity.js +20 -382
  154. package/build/src/cli/render/catalog.d.ts +4 -7
  155. package/build/src/cli/render/catalog.js +5 -5
  156. package/build/src/cli/render/contract-history.js +3 -6
  157. package/build/src/cli/render/contract.js +17 -52
  158. package/build/src/cli/render/debt.d.ts +28 -0
  159. package/build/src/cli/render/{task.js → debt.js} +55 -133
  160. package/build/src/cli/render/kanshi.js +28 -28
  161. package/build/src/cli/render/marks.d.ts +5 -5
  162. package/build/src/cli/render/marks.js +4 -10
  163. package/build/src/cli/render/nuke.js +1 -1
  164. package/build/src/cli/render/receipt.js +3 -10
  165. package/build/src/cli/runtime.d.ts +1 -1
  166. package/build/src/cli/runtime.js +14 -20
  167. package/build/src/cli/scan.d.ts +1 -1
  168. package/build/src/cli/selectors.d.ts +3 -6
  169. package/build/src/cli/selectors.js +22 -53
  170. package/build/src/cli/usage.d.ts +1 -1
  171. package/build/src/cli/usage.js +4 -4
  172. package/build/src/contract-worktree.js +3 -3
  173. package/build/src/debt/board.d.ts +160 -0
  174. package/build/src/{task → debt}/board.js +89 -89
  175. package/build/src/debt/catalog.d.ts +11 -0
  176. package/build/src/debt/catalog.js +59 -0
  177. package/build/src/{task → debt}/context.d.ts +1 -1
  178. package/build/src/{task → debt}/context.js +1 -1
  179. package/build/src/{task → debt}/created-observation.d.ts +6 -10
  180. package/build/src/{task → debt}/created-observation.js +7 -7
  181. package/build/src/debt/document.d.ts +37 -0
  182. package/build/src/{task → debt}/document.js +37 -37
  183. package/build/src/debt/identity.d.ts +21 -0
  184. package/build/src/{task → debt}/identity.js +35 -35
  185. package/build/src/debt/index.d.ts +111 -0
  186. package/build/src/debt/index.js +203 -0
  187. package/build/src/{task → debt}/input.d.ts +8 -8
  188. package/build/src/{task → debt}/input.js +21 -21
  189. package/build/src/debt/lifecycle-operations.d.ts +6 -0
  190. package/build/src/{task → debt}/lifecycle-operations.js +27 -31
  191. package/build/src/debt/mutation-result.d.ts +981 -0
  192. package/build/src/debt/mutation-result.js +109 -0
  193. package/build/src/debt/mutation.d.ts +424 -0
  194. package/build/src/debt/mutation.js +223 -0
  195. package/build/src/debt/operation-types.d.ts +71 -0
  196. package/build/src/debt/operations.d.ts +28 -0
  197. package/build/src/{task → debt}/operations.js +59 -60
  198. package/build/src/debt/query.d.ts +76 -0
  199. package/build/src/{task → debt}/query.js +55 -55
  200. package/build/src/{task → debt}/store.d.ts +13 -13
  201. package/build/src/{task → debt}/store.js +58 -49
  202. package/build/src/debt/view.d.ts +4 -0
  203. package/build/src/debt/view.js +7 -0
  204. package/build/src/dispatch/index.d.ts +3 -3
  205. package/build/src/dispatch/index.js +1 -2
  206. package/build/src/git/observe.d.ts +6 -2
  207. package/build/src/git/observe.js +6 -2
  208. package/build/src/identity/coordinates.d.ts +1 -1
  209. package/build/src/index.d.ts +17 -17
  210. package/build/src/index.js +11 -11
  211. package/build/src/kanshi/index.d.ts +2 -2
  212. package/build/src/kanshi/read.js +54 -39
  213. package/build/src/kanshi/report.d.ts +7 -7
  214. package/build/src/kanshi/select.js +4 -4
  215. package/build/src/library/address.js +2 -4
  216. package/build/src/library/akuma-creation.d.ts +5 -1
  217. package/build/src/library/akuma-creation.js +27 -47
  218. package/build/src/library/akumas.d.ts +7 -7
  219. package/build/src/library/akumas.js +13 -9
  220. package/build/src/library/bind.d.ts +17 -17
  221. package/build/src/library/bind.js +16 -12
  222. package/build/src/library/contract-address.d.ts +9 -0
  223. package/build/src/library/contract-address.js +71 -0
  224. package/build/src/library/contract-composition.d.ts +4 -7
  225. package/build/src/library/contract-composition.js +6 -18
  226. package/build/src/library/contract-creation.d.ts +3 -5
  227. package/build/src/library/contract-creation.js +24 -22
  228. package/build/src/library/contract-execution.js +21 -26
  229. package/build/src/library/contract-outcomes.d.ts +2 -14
  230. package/build/src/library/contract-outcomes.js +2 -13
  231. package/build/src/library/contract-types.d.ts +38 -4
  232. package/build/src/library/delivery.d.ts +0 -2
  233. package/build/src/library/delivery.js +2 -5
  234. package/build/src/library/input.d.ts +2 -2
  235. package/build/src/library/input.js +5 -5
  236. package/build/src/library/invocation.js +2 -2
  237. package/build/src/library/keiyaku.d.ts +0 -5
  238. package/build/src/library/keiyaku.js +6 -12
  239. package/build/src/library/nuke.js +3 -3
  240. package/build/src/library/outcome.d.ts +626 -625
  241. package/build/src/library/outcome.js +13 -3
  242. package/build/src/library/reconcile.js +8 -16
  243. package/build/src/library/refusal.d.ts +2 -2
  244. package/build/src/library/repo.d.ts +3 -2
  245. package/build/src/library/repo.js +10 -5
  246. package/build/src/library/selection.d.ts +5 -8
  247. package/build/src/library/selection.js +22 -73
  248. package/build/src/plugin/akuma-signals.d.ts +2 -0
  249. package/build/src/plugin/akuma-signals.js +4 -0
  250. package/build/src/plugin/public.d.ts +32 -2
  251. package/build/src/plugin/runtime.js +5 -3
  252. package/build/src/protocol/amend.js +3 -2
  253. package/build/src/protocol/attempt.js +3 -8
  254. package/build/src/protocol/bind.d.ts +2 -2
  255. package/build/src/protocol/bind.js +1 -1
  256. package/build/src/protocol/deliver.js +3 -3
  257. package/build/src/protocol/operations.d.ts +1 -3
  258. package/build/src/protocol/operations.js +0 -8
  259. package/build/src/protocol/outcome.d.ts +1 -2
  260. package/build/src/protocol/outcome.js +1 -13
  261. package/build/src/protocol/placement.js +3 -10
  262. package/build/src/protocol/read/status.js +31 -70
  263. package/build/src/protocol/reintegrate.js +3 -10
  264. package/build/src/protocol/review.js +3 -3
  265. package/build/src/protocol/run.d.ts +5 -1
  266. package/build/src/protocol/run.js +3 -3
  267. package/build/src/runtime/proc/windows-launch.exe +0 -0
  268. package/build/src/settlement/fence.d.ts +3 -3
  269. package/build/src/settlement/fence.js +4 -4
  270. package/build/src/settlement/holder.d.ts +16 -16
  271. package/build/src/settlement/holder.js +69 -63
  272. package/build/src/settlement/settle.d.ts +5 -5
  273. package/build/src/settlement/settle.js +53 -53
  274. package/package.json +19 -9
  275. package/plugins/paseo/plugin/index.server.ts +17 -0
  276. package/plugins/paseo/plugin/paseo-plugin.json +4 -0
  277. package/plugins/paseo/plugin/server/attach.ts +52 -0
  278. package/plugins/paseo/plugin/server/keiyaku.ts +44 -0
  279. package/plugins/paseo/plugin/server/message.ts +60 -0
  280. package/plugins/paseo/plugin/server/mirror.ts +193 -0
  281. package/plugins/paseo/plugin/server/model.ts +14 -0
  282. package/plugins/paseo/plugin/server/provider.ts +276 -0
  283. package/plugins/paseo/plugin/server/sdk-worker.ts +237 -0
  284. package/plugins/paseo/plugin/server/sdk.ts +289 -0
  285. package/plugins/paseo/plugin/server/stop.ts +26 -0
  286. package/plugins/paseo/plugin/server/transport.ts +35 -0
  287. package/plugins/paseo/plugin/shared/attach-rpc.ts +10 -0
  288. package/plugins/paseo/plugin/shared/refresh-rpc.ts +6 -0
  289. package/plugins/paseo/plugin/tsconfig.json +6 -0
  290. package/plugins/pi/keiyaku.ts +57 -0
  291. package/skills/keiyaku/SKILL.md +43 -0
  292. package/skills/keiyaku-akuma/SKILL.md +130 -0
  293. package/skills/keiyaku-akuma/references/automation.md +269 -0
  294. package/skills/keiyaku-babysit/SKILL.md +65 -0
  295. package/skills/keiyaku-bind/SKILL.md +216 -0
  296. package/skills/keiyaku-bind/agents/openai.yaml +4 -0
  297. package/skills/keiyaku-debt/SKILL.md +91 -0
  298. package/skills/keiyaku-workflow/SKILL.md +129 -0
  299. package/build/plugins/claude/skills/keiyaku-task/SKILL.md +0 -104
  300. package/build/plugins/codex/skills/keiyaku-task/SKILL.md +0 -104
  301. package/build/plugins/opencode/skills/keiyaku-task/SKILL.md +0 -104
  302. package/build/skills/keiyaku-task/SKILL.md +0 -104
  303. package/build/src/cli/commands/amend.d.ts +0 -12
  304. package/build/src/cli/commands/amend.js +0 -10
  305. package/build/src/cli/commands/bind.d.ts +0 -11
  306. package/build/src/cli/commands/bind.js +0 -23
  307. package/build/src/cli/commands/task-grammar.d.ts +0 -19
  308. package/build/src/cli/commands/task-grammar.js +0 -384
  309. package/build/src/cli/commands/task-query.d.ts +0 -5
  310. package/build/src/cli/render/task.d.ts +0 -41
  311. package/build/src/dispatch/association.d.ts +0 -1
  312. package/build/src/dispatch/association.js +0 -1
  313. package/build/src/task/board.d.ts +0 -168
  314. package/build/src/task/catalog.d.ts +0 -11
  315. package/build/src/task/catalog.js +0 -59
  316. package/build/src/task/compose-language.d.ts +0 -57
  317. package/build/src/task/compose-language.js +0 -364
  318. package/build/src/task/compose-parser.d.ts +0 -32
  319. package/build/src/task/compose-parser.js +0 -180
  320. package/build/src/task/compose.d.ts +0 -16
  321. package/build/src/task/compose.js +0 -189
  322. package/build/src/task/document.d.ts +0 -39
  323. package/build/src/task/identity.d.ts +0 -21
  324. package/build/src/task/index.d.ts +0 -138
  325. package/build/src/task/index.js +0 -269
  326. package/build/src/task/lifecycle-operations.d.ts +0 -6
  327. package/build/src/task/mutation-result.d.ts +0 -1726
  328. package/build/src/task/mutation-result.js +0 -198
  329. package/build/src/task/mutation.d.ts +0 -590
  330. package/build/src/task/mutation.js +0 -262
  331. package/build/src/task/operation-types.d.ts +0 -71
  332. package/build/src/task/operations.d.ts +0 -28
  333. package/build/src/task/query.d.ts +0 -76
  334. package/build/src/task/view.d.ts +0 -4
  335. package/build/src/task/view.js +0 -7
  336. /package/build/src/{task → debt}/operation-types.js +0 -0
@@ -3,6 +3,30 @@ import { type AkumaStatus } from "./akuma.js";
3
3
  declare const akumaObservationSchema: z.ZodObject<{
4
4
  status: z.ZodObject<{
5
5
  id: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>;
6
+ birth: z.ZodObject<{
7
+ origin: z.ZodDiscriminatedUnion<[z.ZodObject<{
8
+ kind: z.ZodLiteral<"direct">;
9
+ }, z.core.$strip>, z.ZodObject<{
10
+ kind: z.ZodLiteral<"request">;
11
+ parent: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>;
12
+ requestId: z.ZodString;
13
+ }, z.core.$strip>, z.ZodObject<{
14
+ kind: z.ZodLiteral<"fork">;
15
+ parent: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>;
16
+ at: z.ZodString;
17
+ }, z.core.$strip>], "kind">;
18
+ caller: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
19
+ kind: z.ZodLiteral<"akuma">;
20
+ world: z.ZodCustom<import("../world.js").WorldRoot, import("../world.js").WorldRoot>;
21
+ akuId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>;
22
+ }, z.core.$strict>, z.ZodObject<{
23
+ kind: z.ZodLiteral<"external">;
24
+ integration: z.ZodString;
25
+ id: z.ZodString;
26
+ }, z.core.$strict>], "kind">, z.ZodObject<{
27
+ kind: z.ZodLiteral<"unknown">;
28
+ }, z.core.$strict>]>;
29
+ }, z.core.$strict>;
6
30
  life: z.ZodEnum<{
7
31
  killed: "killed";
8
32
  hung: "hung";
@@ -12,24 +36,21 @@ declare const akumaObservationSchema: z.ZodObject<{
12
36
  stranded: "stranded";
13
37
  }>;
14
38
  cwd: z.ZodOptional<z.ZodString>;
39
+ provider: z.ZodOptional<z.ZodString>;
40
+ model: z.ZodOptional<z.ZodString>;
15
41
  allowed: z.ZodPipe<z.ZodArray<z.ZodEnum<{
16
- "task.add": "task.add";
17
- "task.addDocument": "task.addDocument";
18
- "task.compose": "task.compose";
19
- "task.done": "task.done";
20
- "task.drop": "task.drop";
21
- "task.hold": "task.hold";
22
- "task.resume": "task.resume";
23
- "task.start": "task.start";
24
- "task.stop": "task.stop";
25
- "task.update": "task.update";
42
+ "debt.add": "debt.add";
43
+ "debt.addDocument": "debt.addDocument";
44
+ "debt.done": "debt.done";
45
+ "debt.drop": "debt.drop";
46
+ "debt.update": "debt.update";
26
47
  "akuma.call": "akuma.call";
27
48
  "akuma.kill": "akuma.kill";
28
49
  "akuma.tell": "akuma.tell";
29
50
  "contract.audit": "contract.audit";
30
51
  "contract.deliver": "contract.deliver";
31
52
  "contract.review": "contract.review";
32
- }>>, z.ZodTransform<import("./allowed.js").AllowedActions, ("task.add" | "task.addDocument" | "task.compose" | "task.done" | "task.drop" | "task.hold" | "task.resume" | "task.start" | "task.stop" | "task.update" | "akuma.call" | "akuma.kill" | "akuma.tell" | "contract.audit" | "contract.deliver" | "contract.review")[]>>;
53
+ }>>, z.ZodTransform<import("./allowed.js").AllowedActions, ("debt.add" | "debt.addDocument" | "debt.done" | "debt.drop" | "debt.update" | "akuma.call" | "akuma.kill" | "akuma.tell" | "contract.audit" | "contract.deliver" | "contract.review")[]>>;
33
54
  timeline: z.ZodUnion<readonly [z.ZodObject<{
34
55
  reportedChanges: z.ZodReadonly<z.ZodArray<z.ZodObject<{
35
56
  sequence: z.ZodNumber;
@@ -173,6 +194,7 @@ declare const akumaObservationSchema: z.ZodObject<{
173
194
  unspecified: "unspecified";
174
195
  }>;
175
196
  path: z.ZodString;
197
+ patch: z.ZodOptional<z.ZodString>;
176
198
  diffstat: z.ZodOptional<z.ZodObject<{
177
199
  added: z.ZodNumber;
178
200
  removed: z.ZodNumber;
@@ -187,6 +209,7 @@ declare const akumaObservationSchema: z.ZodObject<{
187
209
  }, z.core.$strict>>;
188
210
  }, z.core.$strict>]>;
189
211
  state: z.ZodLiteral<"active">;
212
+ toolId: z.ZodOptional<z.ZodString>;
190
213
  truncated: z.ZodOptional<z.ZodLiteral<true>>;
191
214
  }, z.core.$strict>, z.ZodObject<{
192
215
  kind: z.ZodLiteral<"tool">;
@@ -223,6 +246,7 @@ declare const akumaObservationSchema: z.ZodObject<{
223
246
  unspecified: "unspecified";
224
247
  }>;
225
248
  path: z.ZodString;
249
+ patch: z.ZodOptional<z.ZodString>;
226
250
  diffstat: z.ZodOptional<z.ZodObject<{
227
251
  added: z.ZodNumber;
228
252
  removed: z.ZodNumber;
@@ -242,8 +266,10 @@ declare const akumaObservationSchema: z.ZodObject<{
242
266
  ok: "ok";
243
267
  }>;
244
268
  message: z.ZodOptional<z.ZodString>;
269
+ output: z.ZodOptional<z.ZodString>;
245
270
  exitCode: z.ZodOptional<z.ZodNumber>;
246
271
  }, z.core.$strict>;
272
+ toolId: z.ZodOptional<z.ZodString>;
247
273
  truncated: z.ZodOptional<z.ZodLiteral<true>>;
248
274
  }, z.core.$strict>]>;
249
275
  }, z.core.$strict>]>>>;
@@ -276,6 +302,7 @@ declare const akumaObservationSchema: z.ZodObject<{
276
302
  kind: z.ZodLiteral<"answered">;
277
303
  historyId: z.ZodString;
278
304
  answer: z.ZodString;
305
+ foldedSaidSequence: z.ZodOptional<z.ZodNumber>;
279
306
  }, z.core.$strict>, z.ZodObject<{
280
307
  kind: z.ZodLiteral<"failed">;
281
308
  historyId: z.ZodString;
@@ -381,6 +408,7 @@ declare const akumaObservationSchema: z.ZodObject<{
381
408
  unspecified: "unspecified";
382
409
  }>;
383
410
  path: z.ZodString;
411
+ patch: z.ZodOptional<z.ZodString>;
384
412
  diffstat: z.ZodOptional<z.ZodObject<{
385
413
  added: z.ZodNumber;
386
414
  removed: z.ZodNumber;
@@ -400,8 +428,10 @@ declare const akumaObservationSchema: z.ZodObject<{
400
428
  ok: "ok";
401
429
  }>;
402
430
  message: z.ZodOptional<z.ZodString>;
431
+ output: z.ZodOptional<z.ZodString>;
403
432
  exitCode: z.ZodOptional<z.ZodNumber>;
404
433
  }, z.core.$strict>;
434
+ toolId: z.ZodOptional<z.ZodString>;
405
435
  truncated: z.ZodOptional<z.ZodLiteral<true>>;
406
436
  }, z.core.$strict>]>;
407
437
  }, z.core.$strict>]>>>;
@@ -418,22 +448,18 @@ declare const akumaObservationSchema: z.ZodObject<{
418
448
  kind: z.ZodLiteral<"failed">;
419
449
  diagnostic: z.ZodString;
420
450
  }, z.core.$strict>]>;
421
- createdTasks: z.ZodUnion<readonly [z.ZodObject<{
451
+ createdDebts: z.ZodUnion<readonly [z.ZodObject<{
422
452
  kind: z.ZodLiteral<"present">;
423
453
  rows: z.ZodReadonly<z.ZodArray<z.ZodObject<{
424
- id: z.ZodPipe<z.ZodString, z.ZodTransform<`task/${string}`, string>>;
454
+ id: z.ZodPipe<z.ZodString, z.ZodTransform<`debt/${string}`, string>>;
425
455
  title: z.ZodString;
426
456
  state: z.ZodEnum<{
427
457
  open: "open";
428
- in_progress: "in_progress";
429
- on_hold: "on_hold";
430
458
  done: "done";
431
459
  drop: "drop";
432
460
  }>;
433
461
  priority: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
434
462
  disposition: z.ZodEnum<{
435
- in_progress: "in_progress";
436
- on_hold: "on_hold";
437
463
  done: "done";
438
464
  drop: "drop";
439
465
  ready: "ready";
@@ -467,6 +493,30 @@ declare const akumaWaitResultSchema: z.ZodObject<{
467
493
  observations: z.ZodReadonly<z.ZodArray<z.ZodObject<{
468
494
  status: z.ZodObject<{
469
495
  id: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>;
496
+ birth: z.ZodObject<{
497
+ origin: z.ZodDiscriminatedUnion<[z.ZodObject<{
498
+ kind: z.ZodLiteral<"direct">;
499
+ }, z.core.$strip>, z.ZodObject<{
500
+ kind: z.ZodLiteral<"request">;
501
+ parent: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>;
502
+ requestId: z.ZodString;
503
+ }, z.core.$strip>, z.ZodObject<{
504
+ kind: z.ZodLiteral<"fork">;
505
+ parent: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>;
506
+ at: z.ZodString;
507
+ }, z.core.$strip>], "kind">;
508
+ caller: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
509
+ kind: z.ZodLiteral<"akuma">;
510
+ world: z.ZodCustom<import("../world.js").WorldRoot, import("../world.js").WorldRoot>;
511
+ akuId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>;
512
+ }, z.core.$strict>, z.ZodObject<{
513
+ kind: z.ZodLiteral<"external">;
514
+ integration: z.ZodString;
515
+ id: z.ZodString;
516
+ }, z.core.$strict>], "kind">, z.ZodObject<{
517
+ kind: z.ZodLiteral<"unknown">;
518
+ }, z.core.$strict>]>;
519
+ }, z.core.$strict>;
470
520
  life: z.ZodEnum<{
471
521
  killed: "killed";
472
522
  hung: "hung";
@@ -476,24 +526,21 @@ declare const akumaWaitResultSchema: z.ZodObject<{
476
526
  stranded: "stranded";
477
527
  }>;
478
528
  cwd: z.ZodOptional<z.ZodString>;
529
+ provider: z.ZodOptional<z.ZodString>;
530
+ model: z.ZodOptional<z.ZodString>;
479
531
  allowed: z.ZodPipe<z.ZodArray<z.ZodEnum<{
480
- "task.add": "task.add";
481
- "task.addDocument": "task.addDocument";
482
- "task.compose": "task.compose";
483
- "task.done": "task.done";
484
- "task.drop": "task.drop";
485
- "task.hold": "task.hold";
486
- "task.resume": "task.resume";
487
- "task.start": "task.start";
488
- "task.stop": "task.stop";
489
- "task.update": "task.update";
532
+ "debt.add": "debt.add";
533
+ "debt.addDocument": "debt.addDocument";
534
+ "debt.done": "debt.done";
535
+ "debt.drop": "debt.drop";
536
+ "debt.update": "debt.update";
490
537
  "akuma.call": "akuma.call";
491
538
  "akuma.kill": "akuma.kill";
492
539
  "akuma.tell": "akuma.tell";
493
540
  "contract.audit": "contract.audit";
494
541
  "contract.deliver": "contract.deliver";
495
542
  "contract.review": "contract.review";
496
- }>>, z.ZodTransform<import("./allowed.js").AllowedActions, ("task.add" | "task.addDocument" | "task.compose" | "task.done" | "task.drop" | "task.hold" | "task.resume" | "task.start" | "task.stop" | "task.update" | "akuma.call" | "akuma.kill" | "akuma.tell" | "contract.audit" | "contract.deliver" | "contract.review")[]>>;
543
+ }>>, z.ZodTransform<import("./allowed.js").AllowedActions, ("debt.add" | "debt.addDocument" | "debt.done" | "debt.drop" | "debt.update" | "akuma.call" | "akuma.kill" | "akuma.tell" | "contract.audit" | "contract.deliver" | "contract.review")[]>>;
497
544
  timeline: z.ZodUnion<readonly [z.ZodObject<{
498
545
  reportedChanges: z.ZodReadonly<z.ZodArray<z.ZodObject<{
499
546
  sequence: z.ZodNumber;
@@ -637,6 +684,7 @@ declare const akumaWaitResultSchema: z.ZodObject<{
637
684
  unspecified: "unspecified";
638
685
  }>;
639
686
  path: z.ZodString;
687
+ patch: z.ZodOptional<z.ZodString>;
640
688
  diffstat: z.ZodOptional<z.ZodObject<{
641
689
  added: z.ZodNumber;
642
690
  removed: z.ZodNumber;
@@ -651,6 +699,7 @@ declare const akumaWaitResultSchema: z.ZodObject<{
651
699
  }, z.core.$strict>>;
652
700
  }, z.core.$strict>]>;
653
701
  state: z.ZodLiteral<"active">;
702
+ toolId: z.ZodOptional<z.ZodString>;
654
703
  truncated: z.ZodOptional<z.ZodLiteral<true>>;
655
704
  }, z.core.$strict>, z.ZodObject<{
656
705
  kind: z.ZodLiteral<"tool">;
@@ -687,6 +736,7 @@ declare const akumaWaitResultSchema: z.ZodObject<{
687
736
  unspecified: "unspecified";
688
737
  }>;
689
738
  path: z.ZodString;
739
+ patch: z.ZodOptional<z.ZodString>;
690
740
  diffstat: z.ZodOptional<z.ZodObject<{
691
741
  added: z.ZodNumber;
692
742
  removed: z.ZodNumber;
@@ -706,8 +756,10 @@ declare const akumaWaitResultSchema: z.ZodObject<{
706
756
  ok: "ok";
707
757
  }>;
708
758
  message: z.ZodOptional<z.ZodString>;
759
+ output: z.ZodOptional<z.ZodString>;
709
760
  exitCode: z.ZodOptional<z.ZodNumber>;
710
761
  }, z.core.$strict>;
762
+ toolId: z.ZodOptional<z.ZodString>;
711
763
  truncated: z.ZodOptional<z.ZodLiteral<true>>;
712
764
  }, z.core.$strict>]>;
713
765
  }, z.core.$strict>]>>>;
@@ -740,6 +792,7 @@ declare const akumaWaitResultSchema: z.ZodObject<{
740
792
  kind: z.ZodLiteral<"answered">;
741
793
  historyId: z.ZodString;
742
794
  answer: z.ZodString;
795
+ foldedSaidSequence: z.ZodOptional<z.ZodNumber>;
743
796
  }, z.core.$strict>, z.ZodObject<{
744
797
  kind: z.ZodLiteral<"failed">;
745
798
  historyId: z.ZodString;
@@ -845,6 +898,7 @@ declare const akumaWaitResultSchema: z.ZodObject<{
845
898
  unspecified: "unspecified";
846
899
  }>;
847
900
  path: z.ZodString;
901
+ patch: z.ZodOptional<z.ZodString>;
848
902
  diffstat: z.ZodOptional<z.ZodObject<{
849
903
  added: z.ZodNumber;
850
904
  removed: z.ZodNumber;
@@ -864,8 +918,10 @@ declare const akumaWaitResultSchema: z.ZodObject<{
864
918
  ok: "ok";
865
919
  }>;
866
920
  message: z.ZodOptional<z.ZodString>;
921
+ output: z.ZodOptional<z.ZodString>;
867
922
  exitCode: z.ZodOptional<z.ZodNumber>;
868
923
  }, z.core.$strict>;
924
+ toolId: z.ZodOptional<z.ZodString>;
869
925
  truncated: z.ZodOptional<z.ZodLiteral<true>>;
870
926
  }, z.core.$strict>]>;
871
927
  }, z.core.$strict>]>>>;
@@ -882,22 +938,18 @@ declare const akumaWaitResultSchema: z.ZodObject<{
882
938
  kind: z.ZodLiteral<"failed">;
883
939
  diagnostic: z.ZodString;
884
940
  }, z.core.$strict>]>;
885
- createdTasks: z.ZodUnion<readonly [z.ZodObject<{
941
+ createdDebts: z.ZodUnion<readonly [z.ZodObject<{
886
942
  kind: z.ZodLiteral<"present">;
887
943
  rows: z.ZodReadonly<z.ZodArray<z.ZodObject<{
888
- id: z.ZodPipe<z.ZodString, z.ZodTransform<`task/${string}`, string>>;
944
+ id: z.ZodPipe<z.ZodString, z.ZodTransform<`debt/${string}`, string>>;
889
945
  title: z.ZodString;
890
946
  state: z.ZodEnum<{
891
947
  open: "open";
892
- in_progress: "in_progress";
893
- on_hold: "on_hold";
894
948
  done: "done";
895
949
  drop: "drop";
896
950
  }>;
897
951
  priority: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
898
952
  disposition: z.ZodEnum<{
899
- in_progress: "in_progress";
900
- on_hold: "on_hold";
901
953
  done: "done";
902
954
  drop: "drop";
903
955
  ready: "ready";
@@ -1164,8 +1216,6 @@ export type AkumaAskResult<T = unknown> = Omit<z.infer<typeof akumaAskResultSche
1164
1216
  }>;
1165
1217
  /** Compose one native status into the canonical observation its crossing transports. */
1166
1218
  export declare function akumaObservationOf(status: AkumaStatus): AkumaObservation;
1167
- export declare function isTellResult(value: unknown): value is AkumaTellResult;
1168
- export declare function isAskResult(value: unknown): value is AkumaAskResult;
1169
1219
  export declare const selectionResultSchemas: {
1170
1220
  wait: z.ZodObject<{
1171
1221
  mode: z.ZodEnum<{
@@ -1179,6 +1229,30 @@ export declare const selectionResultSchemas: {
1179
1229
  observations: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1180
1230
  status: z.ZodObject<{
1181
1231
  id: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>;
1232
+ birth: z.ZodObject<{
1233
+ origin: z.ZodDiscriminatedUnion<[z.ZodObject<{
1234
+ kind: z.ZodLiteral<"direct">;
1235
+ }, z.core.$strip>, z.ZodObject<{
1236
+ kind: z.ZodLiteral<"request">;
1237
+ parent: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>;
1238
+ requestId: z.ZodString;
1239
+ }, z.core.$strip>, z.ZodObject<{
1240
+ kind: z.ZodLiteral<"fork">;
1241
+ parent: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>;
1242
+ at: z.ZodString;
1243
+ }, z.core.$strip>], "kind">;
1244
+ caller: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
1245
+ kind: z.ZodLiteral<"akuma">;
1246
+ world: z.ZodCustom<import("../world.js").WorldRoot, import("../world.js").WorldRoot>;
1247
+ akuId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>;
1248
+ }, z.core.$strict>, z.ZodObject<{
1249
+ kind: z.ZodLiteral<"external">;
1250
+ integration: z.ZodString;
1251
+ id: z.ZodString;
1252
+ }, z.core.$strict>], "kind">, z.ZodObject<{
1253
+ kind: z.ZodLiteral<"unknown">;
1254
+ }, z.core.$strict>]>;
1255
+ }, z.core.$strict>;
1182
1256
  life: z.ZodEnum<{
1183
1257
  killed: "killed";
1184
1258
  hung: "hung";
@@ -1188,24 +1262,21 @@ export declare const selectionResultSchemas: {
1188
1262
  stranded: "stranded";
1189
1263
  }>;
1190
1264
  cwd: z.ZodOptional<z.ZodString>;
1265
+ provider: z.ZodOptional<z.ZodString>;
1266
+ model: z.ZodOptional<z.ZodString>;
1191
1267
  allowed: z.ZodPipe<z.ZodArray<z.ZodEnum<{
1192
- "task.add": "task.add";
1193
- "task.addDocument": "task.addDocument";
1194
- "task.compose": "task.compose";
1195
- "task.done": "task.done";
1196
- "task.drop": "task.drop";
1197
- "task.hold": "task.hold";
1198
- "task.resume": "task.resume";
1199
- "task.start": "task.start";
1200
- "task.stop": "task.stop";
1201
- "task.update": "task.update";
1268
+ "debt.add": "debt.add";
1269
+ "debt.addDocument": "debt.addDocument";
1270
+ "debt.done": "debt.done";
1271
+ "debt.drop": "debt.drop";
1272
+ "debt.update": "debt.update";
1202
1273
  "akuma.call": "akuma.call";
1203
1274
  "akuma.kill": "akuma.kill";
1204
1275
  "akuma.tell": "akuma.tell";
1205
1276
  "contract.audit": "contract.audit";
1206
1277
  "contract.deliver": "contract.deliver";
1207
1278
  "contract.review": "contract.review";
1208
- }>>, z.ZodTransform<import("./allowed.js").AllowedActions, ("task.add" | "task.addDocument" | "task.compose" | "task.done" | "task.drop" | "task.hold" | "task.resume" | "task.start" | "task.stop" | "task.update" | "akuma.call" | "akuma.kill" | "akuma.tell" | "contract.audit" | "contract.deliver" | "contract.review")[]>>;
1279
+ }>>, z.ZodTransform<import("./allowed.js").AllowedActions, ("debt.add" | "debt.addDocument" | "debt.done" | "debt.drop" | "debt.update" | "akuma.call" | "akuma.kill" | "akuma.tell" | "contract.audit" | "contract.deliver" | "contract.review")[]>>;
1209
1280
  timeline: z.ZodUnion<readonly [z.ZodObject<{
1210
1281
  reportedChanges: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1211
1282
  sequence: z.ZodNumber;
@@ -1349,6 +1420,7 @@ export declare const selectionResultSchemas: {
1349
1420
  unspecified: "unspecified";
1350
1421
  }>;
1351
1422
  path: z.ZodString;
1423
+ patch: z.ZodOptional<z.ZodString>;
1352
1424
  diffstat: z.ZodOptional<z.ZodObject<{
1353
1425
  added: z.ZodNumber;
1354
1426
  removed: z.ZodNumber;
@@ -1363,6 +1435,7 @@ export declare const selectionResultSchemas: {
1363
1435
  }, z.core.$strict>>;
1364
1436
  }, z.core.$strict>]>;
1365
1437
  state: z.ZodLiteral<"active">;
1438
+ toolId: z.ZodOptional<z.ZodString>;
1366
1439
  truncated: z.ZodOptional<z.ZodLiteral<true>>;
1367
1440
  }, z.core.$strict>, z.ZodObject<{
1368
1441
  kind: z.ZodLiteral<"tool">;
@@ -1399,6 +1472,7 @@ export declare const selectionResultSchemas: {
1399
1472
  unspecified: "unspecified";
1400
1473
  }>;
1401
1474
  path: z.ZodString;
1475
+ patch: z.ZodOptional<z.ZodString>;
1402
1476
  diffstat: z.ZodOptional<z.ZodObject<{
1403
1477
  added: z.ZodNumber;
1404
1478
  removed: z.ZodNumber;
@@ -1418,8 +1492,10 @@ export declare const selectionResultSchemas: {
1418
1492
  ok: "ok";
1419
1493
  }>;
1420
1494
  message: z.ZodOptional<z.ZodString>;
1495
+ output: z.ZodOptional<z.ZodString>;
1421
1496
  exitCode: z.ZodOptional<z.ZodNumber>;
1422
1497
  }, z.core.$strict>;
1498
+ toolId: z.ZodOptional<z.ZodString>;
1423
1499
  truncated: z.ZodOptional<z.ZodLiteral<true>>;
1424
1500
  }, z.core.$strict>]>;
1425
1501
  }, z.core.$strict>]>>>;
@@ -1452,6 +1528,7 @@ export declare const selectionResultSchemas: {
1452
1528
  kind: z.ZodLiteral<"answered">;
1453
1529
  historyId: z.ZodString;
1454
1530
  answer: z.ZodString;
1531
+ foldedSaidSequence: z.ZodOptional<z.ZodNumber>;
1455
1532
  }, z.core.$strict>, z.ZodObject<{
1456
1533
  kind: z.ZodLiteral<"failed">;
1457
1534
  historyId: z.ZodString;
@@ -1557,6 +1634,7 @@ export declare const selectionResultSchemas: {
1557
1634
  unspecified: "unspecified";
1558
1635
  }>;
1559
1636
  path: z.ZodString;
1637
+ patch: z.ZodOptional<z.ZodString>;
1560
1638
  diffstat: z.ZodOptional<z.ZodObject<{
1561
1639
  added: z.ZodNumber;
1562
1640
  removed: z.ZodNumber;
@@ -1576,8 +1654,10 @@ export declare const selectionResultSchemas: {
1576
1654
  ok: "ok";
1577
1655
  }>;
1578
1656
  message: z.ZodOptional<z.ZodString>;
1657
+ output: z.ZodOptional<z.ZodString>;
1579
1658
  exitCode: z.ZodOptional<z.ZodNumber>;
1580
1659
  }, z.core.$strict>;
1660
+ toolId: z.ZodOptional<z.ZodString>;
1581
1661
  truncated: z.ZodOptional<z.ZodLiteral<true>>;
1582
1662
  }, z.core.$strict>]>;
1583
1663
  }, z.core.$strict>]>>>;
@@ -1594,22 +1674,18 @@ export declare const selectionResultSchemas: {
1594
1674
  kind: z.ZodLiteral<"failed">;
1595
1675
  diagnostic: z.ZodString;
1596
1676
  }, z.core.$strict>]>;
1597
- createdTasks: z.ZodUnion<readonly [z.ZodObject<{
1677
+ createdDebts: z.ZodUnion<readonly [z.ZodObject<{
1598
1678
  kind: z.ZodLiteral<"present">;
1599
1679
  rows: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1600
- id: z.ZodPipe<z.ZodString, z.ZodTransform<`task/${string}`, string>>;
1680
+ id: z.ZodPipe<z.ZodString, z.ZodTransform<`debt/${string}`, string>>;
1601
1681
  title: z.ZodString;
1602
1682
  state: z.ZodEnum<{
1603
1683
  open: "open";
1604
- in_progress: "in_progress";
1605
- on_hold: "on_hold";
1606
1684
  done: "done";
1607
1685
  drop: "drop";
1608
1686
  }>;
1609
1687
  priority: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
1610
1688
  disposition: z.ZodEnum<{
1611
- in_progress: "in_progress";
1612
- on_hold: "on_hold";
1613
1689
  done: "done";
1614
1690
  drop: "drop";
1615
1691
  ready: "ready";
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { EMPTY_CREATED_TASK_OBSERVATION, createdTaskObservationSchema } from "../task/created-observation.js";
2
+ import { EMPTY_CREATED_DEBT_OBSERVATION, createdDebtObservationSchema } from "../debt/created-observation.js";
3
3
  import { akumaStatusSchema } from "./akuma.js";
4
4
  import { tellResultSchema } from "./call-initial-tell.js";
5
5
  import { NO_DISPATCH_ASSOCIATION, dispatchAssociationSchema } from "./dispatch-association.js";
@@ -16,7 +16,7 @@ const akumaObservationSchema = z
16
16
  .object({
17
17
  status: akumaStatusSchema,
18
18
  contract: dispatchAssociationSchema,
19
- createdTasks: createdTaskObservationSchema,
19
+ createdDebts: createdDebtObservationSchema,
20
20
  })
21
21
  .strict();
22
22
  const akumaUnobservedSchema = z.object({ id: akumaIdSchema, diagnostic: z.string() }).strict();
@@ -48,13 +48,7 @@ const akumaAskResultSchema = z
48
48
  .strict();
49
49
  /** Compose one native status into the canonical observation its crossing transports. */
50
50
  export function akumaObservationOf(status) {
51
- return { status, contract: NO_DISPATCH_ASSOCIATION, createdTasks: EMPTY_CREATED_TASK_OBSERVATION };
52
- }
53
- export function isTellResult(value) {
54
- return akumaTellResultSchema.safeParse(value).success;
55
- }
56
- export function isAskResult(value) {
57
- return akumaAskResultSchema.safeParse(value).success;
51
+ return { status, contract: NO_DISPATCH_ASSOCIATION, createdDebts: EMPTY_CREATED_DEBT_OBSERVATION };
58
52
  }
59
53
  export const selectionResultSchemas = {
60
54
  wait: akumaWaitResultSchema,
@@ -34,6 +34,9 @@ export type DriveTurnInput = Readonly<{
34
34
  admitInitialTell(input: InitialTellAdmissionRequest): Promise<CallInitialTellAdmission>;
35
35
  world: import("../world.js").WorldRoot;
36
36
  externalCommands: Readonly<Record<string, ErasedRequestCommand>>;
37
+ turnStarted: Readonly<{
38
+ emit(turnSequence: number): Promise<void>;
39
+ }>;
37
40
  now(): string;
38
41
  }>;
39
42
  export declare function driveTurn(input: DriveTurnInput): Promise<(DrivenTurn & Readonly<{
@@ -1,6 +1,7 @@
1
1
  import { abortableDelay } from "./abort.js";
2
2
  /* eslint-disable max-lines-per-function -- Turn setup and consumption each preserve one ordered lifecycle transaction. */
3
- import { appendActivity, beginTurn, bindTellsToTurn, breakBody, drainPendingTells, heartExists, readHeart, recordSession, recordTellDeliveries, recordTellReceipt, } from "./heart/index.js";
3
+ import { appendActivity, beginTurn, bindTellsToTurn, breakBody, drainPendingTells, heartExists, readHeart, recordCurrentModel, recordSession, recordTellDeliveries, recordTellReceipt, } from "./heart/index.js";
4
+ import { withoutModel } from "./provider-recipe.js";
4
5
  import { encodeAgentEvent, } from "./provider.js";
5
6
  import { akumaCallRequestCommands } from "./call-request.js";
6
7
  import { BodyRequestPump } from "./request-serve.js";
@@ -27,12 +28,20 @@ function serializeEffects() {
27
28
  return serialize;
28
29
  }
29
30
  export async function turnRecipe(paths, soul) {
30
- const latest = (await readHeart(paths)).latestSession;
31
+ const heart = await readHeart(paths);
32
+ const latest = heart.latestSession;
31
33
  const admitted = latest?.provider === soul.provider.name ? latest : undefined;
32
34
  const session = admitted?.coordinate;
35
+ // The current model is the one mutable member of the recipe and lives only
36
+ // in the Soul, so every Turn reads it freshly and no session copy, cached
37
+ // birth Soul, or stale option can re-admit a model that already moved.
38
+ const current = heart.soul?.options.model;
33
39
  return {
34
40
  cwd: soul.cwd,
35
- options: admitted?.options ?? soul.options,
41
+ options: {
42
+ ...withoutModel(admitted?.options ?? soul.options),
43
+ ...(current === undefined ? {} : { model: current }),
44
+ },
36
45
  ...(session === undefined ? {} : { session }),
37
46
  };
38
47
  }
@@ -51,7 +60,7 @@ async function failedTurnSetup(input, turnSequence, requests, cancelDrive, error
51
60
  }
52
61
  return { kind: "failed", turnSequence, diagnostic: error instanceof Error ? error.message : String(error) };
53
62
  }
54
- async function writeProviderEvent(input, active, event) {
63
+ async function writeProviderEvent(input, active, event, witness) {
55
64
  if (input.supervisor.signal.aborted)
56
65
  return;
57
66
  const at = input.now();
@@ -64,6 +73,16 @@ async function writeProviderEvent(input, active, event) {
64
73
  admittedAt: at,
65
74
  });
66
75
  }
76
+ if (event.type === "model") {
77
+ // Native model evidence is authoritative current state, not narration: it
78
+ // moves the Soul's one model and is never appended to activity.
79
+ if (witness.written && witness.model === event.model)
80
+ return;
81
+ witness.written = true;
82
+ witness.model = event.model;
83
+ await recordCurrentModel(input.paths, { bodySequence: input.bodySequence, model: event.model });
84
+ return;
85
+ }
67
86
  await appendActivity(input.paths, { turnSequence: active.turnSequence, event: encodeAgentEvent(event), at });
68
87
  }
69
88
  async function startTurnDrive(input) {
@@ -87,6 +106,7 @@ async function startTurnDrive(input) {
87
106
  boundAt: input.now(),
88
107
  });
89
108
  }
109
+ await input.turnStarted.emit(turn.sequence);
90
110
  const { world, paths, soul: parent, runtimeSpawn: spawn, externalCommands, admitInitialTell } = input;
91
111
  const commands = composeRequestCommands(akumaCallRequestCommands({ world, paths, parent, spawn, admitInitialTell }), externalCommands);
92
112
  const requests = await BodyRequestPump.open({
@@ -115,7 +135,7 @@ async function startTurnDrive(input) {
115
135
  cwd,
116
136
  options,
117
137
  signal: driveController.signal,
118
- requests: { dir: requests.directory },
138
+ requests: { dir: requests.directory, entry: requests.entry },
119
139
  ...(schemaJson === undefined ? {} : { schemaJson }),
120
140
  };
121
141
  const attempt = session === undefined
@@ -232,9 +252,6 @@ function pumpReceipts(writers) {
232
252
  function observeFailure(settlement) {
233
253
  return settlement.then(() => new Promise(() => { }), (error) => Promise.reject(error));
234
254
  }
235
- function observeReceiptFailure(receiptPump) {
236
- return observeFailure(receiptPump);
237
- }
238
255
  function observeCompletionFailure(drive) {
239
256
  return drive.completion.then(() => new Promise(() => { }), (error) => ({ kind: "completion-failed", error }));
240
257
  }
@@ -354,9 +371,10 @@ async function consumeTurnDrive(input, active) {
354
371
  let writesOpen = true;
355
372
  const mayWrite = () => writesOpen && !input.supervisor.signal.aborted;
356
373
  const writers = { input, turnSequence, drive, writeWitness, mayWrite };
357
- const receiptFailure = observeReceiptFailure(pumpReceipts(writers));
374
+ const receiptFailure = observeFailure(pumpReceipts(writers));
358
375
  const completionFailure = observeCompletionFailure(drive);
359
376
  const iterator = drive.events[Symbol.asyncIterator]();
377
+ const witness = { written: false, model: undefined };
360
378
  let liveTells = true;
361
379
  let tellPump = null;
362
380
  const wakeups = createTurnWakeups((after) => input.supervisor.next(after));
@@ -401,7 +419,7 @@ async function consumeTurnDrive(input, active) {
401
419
  }
402
420
  if (next.event.done)
403
421
  break;
404
- await writeProviderEvent(input, active, next.event.value);
422
+ await writeProviderEvent(input, active, next.event.value, witness);
405
423
  if (next.event.value.type === "session")
406
424
  turnSession = next.event.value.coordinate;
407
425
  wakeups.event(iterator.next());