@astrosheep/keiyaku 4.6.29 → 4.6.31

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 (400) hide show
  1. package/README.md +5 -5
  2. package/build/plugins/claude/.claude-plugin/plugin.json +1 -1
  3. package/build/plugins/claude/skills/keiyaku/SKILL.md +24 -24
  4. package/build/plugins/claude/skills/keiyaku-akuma/SKILL.md +44 -168
  5. package/build/plugins/claude/skills/keiyaku-akuma/references/automation.md +61 -231
  6. package/build/plugins/claude/skills/keiyaku-babysit/SKILL.md +47 -58
  7. package/build/plugins/claude/skills/keiyaku-bind/SKILL.md +44 -185
  8. package/build/plugins/claude/skills/keiyaku-debt/SKILL.md +40 -89
  9. package/build/plugins/claude/skills/keiyaku-workflow/SKILL.md +56 -116
  10. package/build/plugins/codex/.codex-plugin/plugin.json +1 -1
  11. package/build/plugins/codex/skills/keiyaku/SKILL.md +24 -24
  12. package/build/plugins/codex/skills/keiyaku-akuma/SKILL.md +44 -168
  13. package/build/plugins/codex/skills/keiyaku-akuma/references/automation.md +61 -231
  14. package/build/plugins/codex/skills/keiyaku-babysit/SKILL.md +47 -58
  15. package/build/plugins/codex/skills/keiyaku-bind/SKILL.md +44 -185
  16. package/build/plugins/codex/skills/keiyaku-debt/SKILL.md +40 -89
  17. package/build/plugins/codex/skills/keiyaku-workflow/SKILL.md +56 -116
  18. package/build/plugins/opencode/package.json +1 -1
  19. package/build/plugins/opencode/skills/keiyaku/SKILL.md +24 -24
  20. package/build/plugins/opencode/skills/keiyaku-akuma/SKILL.md +44 -168
  21. package/build/plugins/opencode/skills/keiyaku-akuma/references/automation.md +61 -231
  22. package/build/plugins/opencode/skills/keiyaku-babysit/SKILL.md +47 -58
  23. package/build/plugins/opencode/skills/keiyaku-bind/SKILL.md +44 -185
  24. package/build/plugins/opencode/skills/keiyaku-debt/SKILL.md +40 -89
  25. package/build/plugins/opencode/skills/keiyaku-workflow/SKILL.md +56 -116
  26. package/build/plugins/pi/README.md +5 -5
  27. package/build/plugins/pi/akuma-tools.ts +17 -23
  28. package/build/skills/keiyaku/SKILL.md +24 -24
  29. package/build/skills/keiyaku-akuma/SKILL.md +44 -168
  30. package/build/skills/keiyaku-akuma/references/automation.md +61 -231
  31. package/build/skills/keiyaku-babysit/SKILL.md +47 -58
  32. package/build/skills/keiyaku-bind/SKILL.md +44 -185
  33. package/build/skills/keiyaku-debt/SKILL.md +40 -89
  34. package/build/skills/keiyaku-workflow/SKILL.md +56 -116
  35. package/build/src/akuma/akuma-call.d.ts +1 -1
  36. package/build/src/akuma/akuma-call.js +9 -9
  37. package/build/src/akuma/akuma-errors.d.ts +5 -5
  38. package/build/src/akuma/akuma-instance.d.ts +355 -12
  39. package/build/src/akuma/akuma-instance.js +20 -20
  40. package/build/src/akuma/akuma-observe.d.ts +11 -12
  41. package/build/src/akuma/akuma-observe.js +34 -26
  42. package/build/src/akuma/akuma-owner.d.ts +32 -11
  43. package/build/src/akuma/akuma-owner.js +35 -16
  44. package/build/src/akuma/akuma-probe.d.ts +3 -3
  45. package/build/src/akuma/akuma-probe.js +2 -2
  46. package/build/src/akuma/akuma-selection-execution.d.ts +985 -1
  47. package/build/src/akuma/akuma-selection-execution.js +42 -18
  48. package/build/src/akuma/akuma-stream.d.ts +2 -2
  49. package/build/src/akuma/akuma-stream.js +1 -1
  50. package/build/src/akuma/akuma-wait.d.ts +5 -5
  51. package/build/src/akuma/akuma-wait.js +52 -14
  52. package/build/src/akuma/akuma.d.ts +245 -271
  53. package/build/src/akuma/akuma.js +98 -46
  54. package/build/src/akuma/archetype.d.ts +19 -6
  55. package/build/src/akuma/archetype.js +25 -9
  56. package/build/src/akuma/body-launch.d.ts +2 -2
  57. package/build/src/akuma/body.js +4 -4
  58. package/build/src/akuma/call-initial-tell.d.ts +60 -44
  59. package/build/src/akuma/call-initial-tell.js +41 -2
  60. package/build/src/akuma/caller.d.ts +26 -17
  61. package/build/src/akuma/caller.js +22 -9
  62. package/build/src/akuma/coordinate.d.ts +9 -0
  63. package/build/src/akuma/coordinate.js +13 -0
  64. package/build/src/akuma/detached-body.js +2 -2
  65. package/build/src/akuma/dispatch-association.d.ts +4 -4
  66. package/build/src/akuma/dispatch-association.js +12 -3
  67. package/build/src/akuma/execution-instructions.js +2 -2
  68. package/build/src/akuma/heart/facts.d.ts +29 -7
  69. package/build/src/akuma/heart/facts.js +13 -0
  70. package/build/src/akuma/heart/index.d.ts +0 -3
  71. package/build/src/akuma/heart/index.js +3 -6
  72. package/build/src/akuma/heart/rows.js +2 -2
  73. package/build/src/akuma/heart/soul.js +5 -5
  74. package/build/src/akuma/identity.d.ts +17 -16
  75. package/build/src/akuma/identity.js +20 -19
  76. package/build/src/akuma/index.d.ts +1 -2
  77. package/build/src/akuma/lineage-cache.d.ts +4 -4
  78. package/build/src/akuma/lineage-cache.js +10 -10
  79. package/build/src/akuma/projection-read.d.ts +2 -5
  80. package/build/src/akuma/projection-read.js +34 -47
  81. package/build/src/akuma/projection.d.ts +659 -569
  82. package/build/src/akuma/projection.js +203 -94
  83. package/build/src/akuma/providers/acp/index.js +1 -1
  84. package/build/src/akuma/providers/execution-environment.d.ts +1 -3
  85. package/build/src/akuma/providers/execution-environment.js +0 -4
  86. package/build/src/akuma/publication.d.ts +2 -2
  87. package/build/src/akuma/publication.js +3 -3
  88. package/build/src/akuma/retention.js +2 -2
  89. package/build/src/akuma/selection-observation.d.ts +507 -43
  90. package/build/src/akuma/selection-observation.js +153 -1
  91. package/build/src/akuma/status-projection.d.ts +288 -0
  92. package/build/src/akuma/status-projection.js +154 -0
  93. package/build/src/akuma/turn-drive.js +0 -3
  94. package/build/src/alias/index.d.ts +9 -4
  95. package/build/src/alias/index.js +11 -9
  96. package/build/src/bounded-list.d.ts +8 -0
  97. package/build/src/bounded-list.js +9 -0
  98. package/build/src/cli/commands/akuma-grammar.d.ts +2 -2
  99. package/build/src/cli/commands/akuma-grammar.js +21 -21
  100. package/build/src/cli/commands/akuma.d.ts +1 -2
  101. package/build/src/cli/commands/akuma.js +115 -251
  102. package/build/src/cli/commands/contract-grammar.d.ts +4 -3
  103. package/build/src/cli/commands/contract-grammar.js +39 -22
  104. package/build/src/cli/commands/contract-help.d.ts +3 -1
  105. package/build/src/cli/commands/contract-help.js +4 -3
  106. package/build/src/cli/commands/contract.d.ts +6 -3
  107. package/build/src/cli/commands/contract.js +203 -434
  108. package/build/src/cli/commands/debt.d.ts +2 -3
  109. package/build/src/cli/commands/debt.js +101 -317
  110. package/build/src/cli/commands/report.js +11 -28
  111. package/build/src/cli/commands/whoami.d.ts +3 -43
  112. package/build/src/cli/commands/whoami.js +8 -121
  113. package/build/src/cli/coordinates.d.ts +4 -35
  114. package/build/src/cli/coordinates.js +13 -129
  115. package/build/src/cli/parse.d.ts +0 -6
  116. package/build/src/cli/parse.js +5 -48
  117. package/build/src/cli/render/akuma-activity.d.ts +31 -16
  118. package/build/src/cli/render/akuma-activity.js +162 -122
  119. package/build/src/cli/render/akuma-tool.d.ts +3 -6
  120. package/build/src/cli/render/akuma-tool.js +20 -14
  121. package/build/src/cli/render/akuma.d.ts +25 -26
  122. package/build/src/cli/render/akuma.js +100 -129
  123. package/build/src/cli/render/catalog.d.ts +4 -7
  124. package/build/src/cli/render/catalog.js +52 -99
  125. package/build/src/cli/render/contract-history.d.ts +3 -1
  126. package/build/src/cli/render/contract-history.js +140 -215
  127. package/build/src/cli/render/contract-observation.d.ts +43 -30
  128. package/build/src/cli/render/contract-observation.js +64 -31
  129. package/build/src/cli/render/contract-wait.js +6 -6
  130. package/build/src/cli/render/contract.d.ts +41 -6
  131. package/build/src/cli/render/contract.js +274 -370
  132. package/build/src/cli/render/debt.d.ts +9 -19
  133. package/build/src/cli/render/debt.js +120 -185
  134. package/build/src/cli/render/delivery-preview.d.ts +4 -3
  135. package/build/src/cli/render/delivery-preview.js +68 -96
  136. package/build/src/cli/render/kanshi-akuma.d.ts +5 -4
  137. package/build/src/cli/render/kanshi-akuma.js +70 -59
  138. package/build/src/cli/render/kanshi.d.ts +4 -4
  139. package/build/src/cli/render/kanshi.js +205 -207
  140. package/build/src/cli/render/marks.d.ts +11 -2
  141. package/build/src/cli/render/marks.js +13 -3
  142. package/build/src/cli/render/nuke.d.ts +3 -3
  143. package/build/src/cli/render/nuke.js +13 -16
  144. package/build/src/cli/render/receipt.d.ts +37 -43
  145. package/build/src/cli/render/receipt.js +313 -236
  146. package/build/src/cli/render/reconcile.d.ts +6 -4
  147. package/build/src/cli/render/reconcile.js +53 -137
  148. package/build/src/cli/render/refusal.d.ts +3 -2
  149. package/build/src/cli/render/refusal.js +73 -54
  150. package/build/src/cli/render/region.d.ts +11 -2
  151. package/build/src/cli/render/region.js +17 -23
  152. package/build/src/cli/render/settings.d.ts +0 -1
  153. package/build/src/cli/render/settings.js +8 -17
  154. package/build/src/cli/render/terminal.d.ts +2 -0
  155. package/build/src/cli/render/verbs.d.ts +4 -0
  156. package/build/src/cli/render/verbs.js +312 -0
  157. package/build/src/cli/render/whoami.d.ts +1 -1
  158. package/build/src/cli/render/whoami.js +24 -31
  159. package/build/src/cli/runtime.d.ts +3 -11
  160. package/build/src/cli/runtime.js +96 -79
  161. package/build/src/cli/scan.d.ts +1 -1
  162. package/build/src/cli/streams.js +1 -0
  163. package/build/src/contract-guidance.js +2 -2
  164. package/build/src/contract-worktree.d.ts +2 -15
  165. package/build/src/contract-worktree.js +35 -36
  166. package/build/src/core/facts/observation.d.ts +4 -5
  167. package/build/src/core/facts/observation.js +7 -9
  168. package/build/src/core/verbs/amend.d.ts +0 -1
  169. package/build/src/core/verbs/amend.js +3 -3
  170. package/build/src/core/verbs/bind.d.ts +0 -1
  171. package/build/src/core/verbs/bind.js +5 -5
  172. package/build/src/core/verbs/deliver.d.ts +3 -2
  173. package/build/src/core/verbs/deliver.js +2 -2
  174. package/build/src/core/verbs/placement.d.ts +0 -5
  175. package/build/src/core/verbs/placement.js +4 -6
  176. package/build/src/core/verbs/reintegrate.d.ts +0 -1
  177. package/build/src/core/verbs/reintegrate.js +2 -2
  178. package/build/src/debt/board.d.ts +132 -116
  179. package/build/src/debt/board.js +138 -94
  180. package/build/src/debt/catalog.d.ts +4 -4
  181. package/build/src/debt/catalog.js +2 -18
  182. package/build/src/debt/context.d.ts +15 -3
  183. package/build/src/debt/context.js +12 -1
  184. package/build/src/debt/created-observation.d.ts +5 -17
  185. package/build/src/debt/created-observation.js +14 -6
  186. package/build/src/debt/document.d.ts +20 -15
  187. package/build/src/debt/document.js +18 -1
  188. package/build/src/debt/index.d.ts +346 -23
  189. package/build/src/debt/index.js +68 -22
  190. package/build/src/debt/input.d.ts +2 -1
  191. package/build/src/debt/input.js +14 -0
  192. package/build/src/debt/lifecycle-operations.d.ts +2 -2
  193. package/build/src/debt/lifecycle-operations.js +14 -22
  194. package/build/src/debt/operation-types.d.ts +188 -66
  195. package/build/src/debt/operation-types.js +113 -1
  196. package/build/src/debt/operations.d.ts +11 -10
  197. package/build/src/debt/operations.js +46 -71
  198. package/build/src/debt/query.d.ts +14 -10
  199. package/build/src/debt/query.js +3 -12
  200. package/build/src/debt/store.d.ts +4 -2
  201. package/build/src/debt/store.js +8 -8
  202. package/build/src/debt/view.d.ts +0 -3
  203. package/build/src/debt/view.js +0 -4
  204. package/build/src/dispatch/index.d.ts +22 -5
  205. package/build/src/dispatch/index.js +46 -37
  206. package/build/src/git/admission.d.ts +2 -2
  207. package/build/src/git/admission.js +2 -1
  208. package/build/src/git/hooks.d.ts +14 -35
  209. package/build/src/git/hooks.js +45 -25
  210. package/build/src/git/integration.d.ts +6 -24
  211. package/build/src/git/integration.js +10 -16
  212. package/build/src/git/observe.d.ts +2 -1
  213. package/build/src/git/observe.js +29 -20
  214. package/build/src/git/private-state-seat.d.ts +2 -2
  215. package/build/src/git/private-state-seat.js +2 -1
  216. package/build/src/git/reconcile.d.ts +17 -79
  217. package/build/src/git/reconcile.js +37 -52
  218. package/build/src/git/scratch.d.ts +3 -3
  219. package/build/src/git/scratch.js +4 -1
  220. package/build/src/git/target-placement.d.ts +23 -31
  221. package/build/src/git/target-placement.js +42 -27
  222. package/build/src/git/target.d.ts +2 -2
  223. package/build/src/git/target.js +2 -1
  224. package/build/src/git/tender.d.ts +7 -39
  225. package/build/src/git/tender.js +21 -54
  226. package/build/src/git/terminal-reconcile.js +15 -18
  227. package/build/src/git/terminal-seal.d.ts +2 -4
  228. package/build/src/git/terminal-seal.js +7 -33
  229. package/build/src/git/workspace.d.ts +65 -41
  230. package/build/src/git/workspace.js +45 -14
  231. package/build/src/identity/selector.d.ts +2 -0
  232. package/build/src/identity/selector.js +13 -3
  233. package/build/src/index.d.ts +48 -54
  234. package/build/src/index.js +31 -43
  235. package/build/src/kanshi/counts.d.ts +42 -8
  236. package/build/src/kanshi/counts.js +13 -2
  237. package/build/src/kanshi/index.d.ts +5 -5
  238. package/build/src/kanshi/index.js +4 -3
  239. package/build/src/kanshi/read.d.ts +489 -6
  240. package/build/src/kanshi/read.js +334 -483
  241. package/build/src/kanshi/report.d.ts +2504 -103
  242. package/build/src/kanshi/report.js +165 -1
  243. package/build/src/kanshi/select.d.ts +0 -8
  244. package/build/src/kanshi/select.js +20 -59
  245. package/build/src/library/address.d.ts +8 -8
  246. package/build/src/library/address.js +7 -7
  247. package/build/src/library/akuma-creation.d.ts +690 -84
  248. package/build/src/library/akuma-creation.js +202 -142
  249. package/build/src/library/akuma-retention.d.ts +2 -2
  250. package/build/src/library/akuma-retention.js +2 -2
  251. package/build/src/library/akumas.d.ts +10 -6
  252. package/build/src/library/akumas.js +24 -7
  253. package/build/src/library/bind.d.ts +28 -54
  254. package/build/src/library/bind.js +6 -4
  255. package/build/src/library/continuation.d.ts +197 -479
  256. package/build/src/library/continuation.js +40 -23
  257. package/build/src/library/contract-address.d.ts +6 -5
  258. package/build/src/library/contract-address.js +5 -7
  259. package/build/src/library/contract-composition.d.ts +18 -12
  260. package/build/src/library/contract-composition.js +55 -47
  261. package/build/src/library/contract-creation.d.ts +3 -2
  262. package/build/src/library/contract-creation.js +38 -32
  263. package/build/src/library/contract-execution.js +77 -38
  264. package/build/src/library/contract-outcomes.d.ts +1877 -27
  265. package/build/src/library/contract-outcomes.js +93 -10
  266. package/build/src/library/contract-settings.d.ts +2 -2
  267. package/build/src/library/contract-settings.js +18 -14
  268. package/build/src/library/contract-types.d.ts +238 -61
  269. package/build/src/library/contract-types.js +131 -1
  270. package/build/src/library/contract-wait.d.ts +38 -17
  271. package/build/src/library/contract-wait.js +40 -10
  272. package/build/src/library/delivery.d.ts +588 -36
  273. package/build/src/library/delivery.js +35 -27
  274. package/build/src/library/input.d.ts +1 -1
  275. package/build/src/library/input.js +1 -2
  276. package/build/src/library/invocation.d.ts +11 -7
  277. package/build/src/library/invocation.js +42 -51
  278. package/build/src/library/kei.d.ts +48 -0
  279. package/build/src/library/kei.js +256 -0
  280. package/build/src/library/keiyaku-attribution.d.ts +11 -0
  281. package/build/src/{cli/delivery-identity.js → library/keiyaku-attribution.js} +12 -1
  282. package/build/src/library/keiyaku-classify.d.ts +11 -0
  283. package/build/src/library/keiyaku-classify.js +146 -0
  284. package/build/src/library/keiyaku-coordinates.d.ts +31 -0
  285. package/build/src/library/keiyaku-coordinates.js +103 -0
  286. package/build/src/library/keiyaku-debt.d.ts +142 -0
  287. package/build/src/library/keiyaku-debt.js +188 -0
  288. package/build/src/library/keiyaku-identity.d.ts +58 -0
  289. package/build/src/library/keiyaku-identity.js +176 -0
  290. package/build/src/library/keiyaku-policy.d.ts +27 -0
  291. package/build/src/library/keiyaku-policy.js +44 -0
  292. package/build/src/library/keiyaku-status.d.ts +1487 -0
  293. package/build/src/library/keiyaku-status.js +92 -0
  294. package/build/src/library/keiyaku-verbs.d.ts +6774 -0
  295. package/build/src/library/keiyaku-verbs.js +458 -0
  296. package/build/src/library/keiyaku.d.ts +871 -38
  297. package/build/src/library/keiyaku.js +677 -127
  298. package/build/src/library/nuke.d.ts +22 -0
  299. package/build/src/library/nuke.js +4 -1
  300. package/build/src/library/outcome.d.ts +706 -692
  301. package/build/src/library/outcome.js +582 -167
  302. package/build/src/library/reconcile.d.ts +464 -116
  303. package/build/src/library/reconcile.js +174 -102
  304. package/build/src/library/refusal.d.ts +113 -577
  305. package/build/src/library/refusal.js +64 -51
  306. package/build/src/library/region.d.ts +5 -24
  307. package/build/src/library/region.js +6 -21
  308. package/build/src/library/selection.d.ts +181 -32
  309. package/build/src/library/selection.js +99 -64
  310. package/build/src/mcp/adapter.d.ts +11 -0
  311. package/build/src/mcp/adapter.js +106 -0
  312. package/build/src/mcp/help.d.ts +1 -0
  313. package/build/src/mcp/help.js +26 -0
  314. package/build/src/mcp/index.d.ts +2 -0
  315. package/build/src/mcp/index.js +37 -0
  316. package/build/src/plugin/public.d.ts +1 -1
  317. package/build/src/plugin/runtime.js +17 -14
  318. package/build/src/protocol/arc.d.ts +4 -1
  319. package/build/src/protocol/arc.js +7 -1
  320. package/build/src/protocol/attempt.d.ts +2 -3
  321. package/build/src/protocol/attempt.js +1 -10
  322. package/build/src/protocol/bind.d.ts +6 -7
  323. package/build/src/protocol/bind.js +9 -5
  324. package/build/src/protocol/completion.d.ts +448 -12
  325. package/build/src/protocol/completion.js +164 -26
  326. package/build/src/protocol/deliver.d.ts +26 -24
  327. package/build/src/protocol/deliver.js +24 -52
  328. package/build/src/protocol/delivery-preview.d.ts +97 -247
  329. package/build/src/protocol/delivery-preview.js +132 -128
  330. package/build/src/protocol/execution-observation.d.ts +146 -123
  331. package/build/src/protocol/execution-observation.js +9 -6
  332. package/build/src/protocol/intent.d.ts +9 -48
  333. package/build/src/protocol/intent.js +32 -46
  334. package/build/src/protocol/operations.d.ts +207 -505
  335. package/build/src/protocol/operations.js +81 -134
  336. package/build/src/protocol/placement.d.ts +0 -1
  337. package/build/src/protocol/placement.js +5 -2
  338. package/build/src/protocol/progress.d.ts +7 -97
  339. package/build/src/protocol/progress.js +7 -55
  340. package/build/src/protocol/read/observation.d.ts +13 -6
  341. package/build/src/protocol/read/observation.js +10 -9
  342. package/build/src/protocol/read/status.d.ts +466 -95
  343. package/build/src/protocol/read/status.js +380 -91
  344. package/build/src/protocol/reconcile.d.ts +2 -0
  345. package/build/src/protocol/reconcile.js +12 -11
  346. package/build/src/protocol/reintegrate.d.ts +0 -1
  347. package/build/src/protocol/reintegrate.js +4 -4
  348. package/build/src/protocol/result-leaves.d.ts +528 -0
  349. package/build/src/protocol/result-leaves.js +195 -0
  350. package/build/src/protocol/result-reasons.d.ts +129 -0
  351. package/build/src/protocol/result-reasons.js +87 -0
  352. package/build/src/protocol/review.d.ts +14 -11
  353. package/build/src/protocol/review.js +30 -14
  354. package/build/src/protocol/run.d.ts +4 -4
  355. package/build/src/protocol/run.js +4 -1
  356. package/build/src/protocol/verify.d.ts +359 -30
  357. package/build/src/protocol/verify.js +118 -28
  358. package/build/src/region.d.ts +26 -0
  359. package/build/src/region.js +28 -0
  360. package/build/src/runtime/proc/diagnostic.d.ts +11 -0
  361. package/build/src/runtime/proc/diagnostic.js +20 -0
  362. package/build/src/runtime/proc/windows-launch.exe +0 -0
  363. package/build/src/settings.d.ts +126 -32
  364. package/build/src/settings.js +107 -34
  365. package/build/src/settlement/settle.d.ts +29 -12
  366. package/build/src/settlement/settle.js +22 -15
  367. package/build/src/verification/declaration.d.ts +1 -3
  368. package/build/src/verification/declaration.js +2 -5
  369. package/build/src/verification/execution.d.ts +7 -19
  370. package/build/src/verification/execution.js +37 -16
  371. package/build/src/verification/observation.d.ts +13 -13
  372. package/build/src/verification/observation.js +9 -7
  373. package/build/src/world.d.ts +8 -0
  374. package/build/src/world.js +7 -0
  375. package/package.json +6 -5
  376. package/plugins/paseo/plugin/server/keiyaku.ts +13 -46
  377. package/plugins/paseo/plugin/server/message.ts +8 -30
  378. package/plugins/paseo/plugin/server/mirror.ts +16 -20
  379. package/plugins/paseo/plugin/server/provider.ts +1 -1
  380. package/plugins/paseo/plugin/server/sdk.ts +14 -6
  381. package/plugins/pi/README.md +5 -5
  382. package/plugins/pi/akuma-tools.ts +17 -23
  383. package/skills/keiyaku/SKILL.md +24 -24
  384. package/skills/keiyaku-akuma/SKILL.md +44 -168
  385. package/skills/keiyaku-akuma/references/automation.md +61 -231
  386. package/skills/keiyaku-babysit/SKILL.md +47 -58
  387. package/skills/keiyaku-bind/SKILL.md +44 -185
  388. package/skills/keiyaku-debt/SKILL.md +40 -89
  389. package/skills/keiyaku-workflow/SKILL.md +56 -116
  390. package/build/src/cli/actor.d.ts +0 -10
  391. package/build/src/cli/actor.js +0 -24
  392. package/build/src/cli/akuma-caller.d.ts +0 -3
  393. package/build/src/cli/akuma-caller.js +0 -31
  394. package/build/src/cli/delivery-identity.d.ts +0 -3
  395. package/build/src/cli/render/effects.d.ts +0 -26
  396. package/build/src/cli/render/effects.js +0 -41
  397. package/build/src/cli/selectors.d.ts +0 -10
  398. package/build/src/cli/selectors.js +0 -42
  399. package/build/src/markdown/diff.d.ts +0 -1
  400. package/build/src/markdown/diff.js +0 -4
@@ -7,7 +7,8 @@ import {
7
7
  Schema,
8
8
  World,
9
9
  listArchetypeDefinitions,
10
- type CallResult,
10
+ projectFailure,
11
+ type SpawnResult,
11
12
  type AkumaHostScope,
12
13
  type AkumaCaller,
13
14
  type AkumaAddressInput,
@@ -112,6 +113,7 @@ export function registerAkumaTools(pi: ExtensionAPI, exposure: "hidden" | "direc
112
113
  if (owned.closed) throw new Error("Keiyaku Pi session is shutting down");
113
114
  const { detach: detached, ...input } = raw as Input & LaunchChoice;
114
115
  let result: object;
116
+ let failed = false;
115
117
  try {
116
118
  result = await run(
117
119
  input as Input,
@@ -121,23 +123,15 @@ export function registerAkumaTools(pi: ExtensionAPI, exposure: "hidden" | "direc
121
123
  world,
122
124
  );
123
125
  } catch (error) {
124
- // SDK exceptions can retain a leading birth. Do not turn that known
125
- // identity into a text-only error or pretend the birth was rolled back.
126
- if (!(error instanceof Error) || !("akuma" in error) || typeof error.akuma !== "string") throw error;
127
- result = { akuma: error.akuma, failure: { diagnostic: error.message } };
128
- const text = JSON.stringify(result);
129
- return {
130
- content: [{ type: "text", text }],
131
- details: result,
132
- structuredContent: JSON.parse(text),
133
- isError: true,
134
- };
126
+ result = projectFailure(error);
127
+ failed = true;
135
128
  }
136
129
  const text = JSON.stringify(result);
137
130
  return {
138
131
  content: [{ type: "text", text }],
139
132
  details: result,
140
133
  structuredContent: JSON.parse(text),
134
+ ...(failed ? { isError: true } : {}),
141
135
  };
142
136
  },
143
137
  });
@@ -149,7 +143,7 @@ export function registerAkumaTools(pi: ExtensionAPI, exposure: "hidden" | "direc
149
143
  }
150
144
 
151
145
  register<{
152
- akuma: string;
146
+ akumaName: string;
153
147
  body: string;
154
148
  workdir?: string;
155
149
  writableDirectories?: readonly string[];
@@ -158,14 +152,14 @@ export function registerAkumaTools(pi: ExtensionAPI, exposure: "hidden" | "direc
158
152
  timeoutMs?: number;
159
153
  schema?: JsonSchemaDocument;
160
154
  }>(
161
- "akuma_call",
162
- "Call any configured Akuma provider. By default launch in this Pi session and return birth plus first-Tell receipt immediately. detach selects detached hosting; wait separately observes the first answer (default five-minute bound). Deadlines/abort stop observation, not admitted execution. Session shutdown retires only this session's in-process launches.",
155
+ "akuma_spawn",
156
+ "Spawn any configured Akuma provider. By default launch in this Pi session and return birth plus first-Tell receipt immediately. detach selects detached hosting; wait separately observes the first answer (default five-minute bound). Deadlines/abort stop observation, not admitted execution. Session shutdown retires only this session's in-process launches.",
163
157
  {
164
- akuma: {
158
+ akumaName: {
165
159
  type: "string",
166
160
  minLength: 1,
167
161
  pattern: "\\S",
168
- description: "Callable definition name (see akuma_definitions)",
162
+ description: "Spawnable Akuma name (see akuma_definitions)",
169
163
  },
170
164
  body,
171
165
  workdir: { type: "string", minLength: 1, description: "Execution directory relative to Pi cwd (default Pi cwd)" },
@@ -181,11 +175,11 @@ export function registerAkumaTools(pi: ExtensionAPI, exposure: "hidden" | "direc
181
175
  timeoutMs,
182
176
  schema: { type: "object", additionalProperties: true },
183
177
  },
184
- ["akuma", "body"],
178
+ ["akumaName", "body"],
185
179
  async (input, akumas, ctx, signal) => {
186
180
  if (input.timeoutMs !== undefined && input.wait !== true) throw new TypeError("timeoutMs requires wait: true");
187
- const result: CallResult = await akumas.call({
188
- archetype: input.akuma,
181
+ const result: SpawnResult = await akumas.spawn({
182
+ akumaName: input.akumaName,
189
183
  body: input.body,
190
184
  cwd: resolve(ctx.cwd, input.workdir ?? "."),
191
185
  ...(input.writableDirectories === undefined ? {} : { writableDirectories: input.writableDirectories }),
@@ -209,14 +203,14 @@ export function registerAkumaTools(pi: ExtensionAPI, exposure: "hidden" | "direc
209
203
  );
210
204
  register<AkumaListInput>(
211
205
  "akuma_list",
212
- "List a bounded recent-activity roster of Akuma instances, with aliases. Use akuma_definitions for callable names.",
213
- { archetype: { type: "string", minLength: 1 }, limit },
206
+ "List a bounded recent-activity roster of Akuma instances, with aliases. Use akuma_definitions for spawnable names.",
207
+ { akumaName: { type: "string", minLength: 1 }, limit },
214
208
  [],
215
209
  async (input, akumas) => akumas.list(input),
216
210
  );
217
211
  register<{ limit?: number }>(
218
212
  "akuma_definitions",
219
- "List visible callable Akuma definitions for all configured providers (not running instances).",
213
+ "List visible spawnable Akuma definitions for all configured providers (not running instances).",
220
214
  { limit },
221
215
  [],
222
216
  async (input, _akumas, _ctx, _signal, world) => listArchetypeDefinitions({ project: world, ...input }),
@@ -1,36 +1,36 @@
1
1
  ---
2
2
  name: keiyaku
3
3
  description: >-
4
- Keiyaku is a CLI that records unresolved work, writes handoff terms for deliveries,
5
- and calls delegates. Use this skill when you need to figure out which
6
- Keiyaku skill or command to reach for.
4
+ Keiyaku records unresolved work, writes handoff terms for deliveries, and
5
+ spawns delegates. Use this skill when deciding which Keiyaku concept or skill
6
+ to reach for.
7
7
  ---
8
8
 
9
9
  # Keiyaku
10
10
 
11
- ## Model
11
+ ## Three Independent Pillars
12
12
 
13
- Keiyaku has three independent pillars: **Debt** records unresolved work,
14
- **Contract** makes acceptance auditable, **Akuma** runs delegates. Use any one
15
- alone. Each Contract in flight has one holder who runs its loop: you by
16
- default, or one Aku you hand the whole loop to.
13
+ Keiyaku has three pillars that work alone or together:
17
14
 
18
- - Shaping and binding a Contract: `keiyaku-bind`
19
- - Holding a Contract to acceptance: `keiyaku-workflow`
20
- - Calling and steering Akumas: `keiyaku-akuma`
21
- - Recording unresolved work: `keiyaku-debt`
22
- - Watching many lanes at once: `keiyaku-babysit`
15
+ - **`Debt` (`keiyaku-debt`):** confirmed unresolved work and its dependencies.
16
+ Does **not** require a closed design — record a `Debt` as soon as a problem or
17
+ prerequisite is confirmed, even while the solution is still open.
18
+ - **`Contract` (`kei`):** one independently acceptable delivery whose objective,
19
+ design, and acceptance boundary are already closed, owned by **one and only
20
+ one holder** (you by default, or one `Akuma` handed the whole `Contract` loop). If
21
+ the design is not closed yet, investigate the codebase yourself or send an
22
+ `Akuma` to settle the approach before binding. Complex `kei`s divide their
23
+ execution into **`Arcs`** (chapters inside that one acceptance boundary).
24
+ - **`Akuma` (`keiyaku-akuma`):** delegated workers addressed by `@alias` or
25
+ `AkuId` across parallel lanes.
23
26
 
24
- ## Quick Start
27
+ ## Which Skill To Read
25
28
 
26
- ```bash
27
- keiyaku -C <repo> debt add "title"
28
- keiyaku -C <repo> bind [--debt <debt/...>] -
29
- keiyaku -C <repo> status
30
- keiyaku -C <repo> deliver [<contract>|@<contract>]
31
- keiyaku -C <repo> review [<contract>|@<contract>] --satisfied --summary "<evidence>"
32
- ```
29
+ - Recording or querying unresolved work and prerequisites: `keiyaku-debt`
30
+ - Splitting acceptance boundaries and authoring a `Contract`: `keiyaku-bind`
31
+ - Running a `Contract`'s fulfillment loop (`deliver`, `verify`, `review`): `keiyaku-workflow`
32
+ - Spawning, aliasing, steering, and waiting on `Akumas`: `keiyaku-akuma`
33
+ - Supervising multiple active `Contracts` and `Akumas` in parallel: `keiyaku-babysit`
33
34
 
34
- `-C <path>` sets the invocation directory and with it the World. `--repo <path>`
35
- only picks the Contract repository. `call --workdir <path>` only picks where the
36
- Akuma runs.
35
+ Get exact command or tool syntax from CLI `--help` or the exposed tool
36
+ descriptions.
@@ -1,177 +1,53 @@
1
1
  ---
2
2
  name: keiyaku-akuma
3
3
  description: >-
4
- Use when the work involves Akuma or Aku, or when you want other hands on
4
+ Use when the work involves `Akuma` or `Aku`, or when you want other hands on
5
5
  it: delegating a job, or fanning out research, checks, or other parallel
6
6
  work.
7
7
  ---
8
8
 
9
9
  # Keiyaku Akuma
10
10
 
11
- Use Akumas to delegate work to another worker. `call` creates a new Akuma;
12
- `tell` admits a Tell for an existing Akuma; `ask` admits one and observes its
13
- exact answer. Keep the complete AkuId, such as `aku/worker/1234abcd`, when you
14
- need to address the same worker later. An alias such as `@reviewer` is a
15
- shorter, world-local name.
16
-
17
- ## Call a new Akuma
18
-
19
- ```bash
20
- keiyaku call worker "Summarize the recent changes in src/cli"
21
- keiyaku call worker --alias @reviewer --wait 10m - < brief.md
22
- keiyaku call worker
23
- ```
24
-
25
- The prompt is optional for prompt-free birth. Otherwise it is the new Akuma's
26
- first prompt: give it as one argument, or use `-` to read stdin, never both.
27
- Calls are detached by default: they return the new identity after birth without
28
- waiting for the first answer. Use explicit `--wait <duration>` when this
29
- invocation should block while observing that initial work. `--wait` only bounds
30
- this command; it never stops the Akuma. Read `call --help` for flag syntax and
31
- defaults.
32
- To hand a Contract role to an Akuma, use the commissioning table in
33
- `keiyaku-workflow`.
34
-
35
- The selected Akuma name is a reusable worker configuration, not an individual.
36
- Calling it again creates an independent Akuma. Use different names for
37
- capabilities, not merely for parallelism.
38
-
39
- ## Commission Context
40
-
41
- `--contract` only records the association. It neither tells the Akuma about the
42
- Contract nor picks its worktree: pass `--workdir`, and put both in the prompt.
43
-
44
- ```bash
45
- keiyaku call worker --contract kei/add-rate-limit-a1b2 --workdir /path/to/worktree - <<'EOF'
46
- Contract: kei/add-rate-limit-a1b2
47
- Worktree: /path/to/worktree
48
- This Arc: implement the limiter and its tests
49
- EOF
50
- ```
51
-
52
- An Akuma can `keiyaku report` to you mid-turn without stopping. For long work,
53
- ask for it in the prompt (e.g. "report each milestone or blocker"); reports
54
- show up in its `history`.
55
-
56
- ### Verification brief
57
-
58
- When commissioning checks, name the appointed worktree, Contract, all declarations
59
- or current one-based index, and whether dirty capture is authorized:
60
-
61
- ```bash
62
- keiyaku -C <appointed-path> verify <kei/...>
63
- keiyaku -C <appointed-path> verify <kei/...> --index 2 --include-dirty
64
- ```
65
-
66
- Only explicit verify executes declarations. Deliver, review, preview, target
67
- refresh, and dependent completion consume current evidence only. Each check has
68
- independent clean scratch, setup, and cleanup: a required build belongs in that
69
- check's script or setup, never another fence. Evidence names the exact prospective
70
- integration and stable content-derived requirement; the index is only a current
71
- selector. Verify admits no delivery and can place only a previously delivered
72
- candidate whose prerequisites and every gate pass.
73
-
74
- Ask for every executed check's verdict, new or reused testimony admission,
75
- operational stops, retained diagnostic paths, and completion. Reused admission
76
- never means execution was skipped. Normal failure or timeout affects only that
77
- requirement and full verify continues; an operational stop admits no verdict for
78
- the affected check and preserves prior admissions. A selected success establishes
79
- no verdict for other requirements; the generic gate judgment decides whole-gate
80
- satisfaction. Verify runs in the invoking process with its native Git and
81
- process custody.
82
-
83
- ## Tell or ask an existing Akuma
84
-
85
- ```bash
86
- keiyaku tell @reviewer "The candidate moved; re-examine the worktree"
87
- keiyaku tell @reviewer --interrupt - < new-priority.md
88
- keiyaku ask @reviewer --wait 10m "What is your verdict?"
89
- keiyaku ask @reviewer --schema verdict.schema.json - < question.md
90
- ```
91
-
92
- `tell` queues the next instruction and returns without waiting for an answer.
93
- `ask` queues it and waits for that exact answer, bounded by `--wait`.
94
- `--interrupt` admits the Tell and asks current work to yield; the Tell remains
95
- admitted even if yielding cannot be confirmed. A deadline never withdraws it.
96
- Only `ask` takes `--schema`. Read `tell --help` and `ask --help` for syntax.
97
-
98
- ## Observe work
99
-
100
- ```bash
101
- keiyaku wait @deliverer @reviewer
102
- keiyaku wait --all --timeout 30m @deliverer @reviewer
103
- ```
104
-
105
- `wait` returns when any selected Akuma finishes (`--all`: every one). `--timeout`
106
- ends the wait, not the workers. An already finished Akuma counts immediately.
107
- Unlike `ask`, this observes existing work, not a newly submitted instruction.
108
-
109
- `keiyaku wait kei/...` instead waits for the named Contract's next journal
110
- change or terminal state, even without a dispatched Akuma. Each invocation
111
- starts at the current head; an already accepted or abandoned Contract counts
112
- immediately, without being reported as changed. Use `--all` to wait for every
113
- selected Contract, and do not mix Contract and Akuma selectors in one wait.
114
- `kill kei/...` still selects the associated Akumas.
115
-
116
- ## Inspect and retrieve results
117
-
118
- ```bash
119
- keiyaku whoami
120
- keiyaku status
121
- keiyaku status @reviewer
122
- keiyaku ls aku/
123
- keiyaku ls "aku/*/*"
124
- keiyaku ls --mine
125
- keiyaku history @reviewer --last
126
- keiyaku history @reviewer --id turn/3
127
- keiyaku history @reviewer --id report/5
128
- ```
129
-
130
- - `whoami`: who you are; for an Akuma, also who started its current turn.
131
- - `status [<aku>]`: the roster, or one Akuma's state and workdir.
132
- - `ls aku/`: callable names. `ls "aku/*/*"`: recent instances.
133
- `ls --mine`: Akumas you called, plus their descendants in this World.
134
- `--caller` selects another caller; see `ls --help`.
135
- - `history <aku> --id report/N`: the exact retained report text, including during an open Turn.
136
- - `history <aku> --last`: latest answer. `--id turn/N`: one exact turn's
137
- answer or failure diagnostic (ids are in `history <aku> --json`).
138
- Keep the complete AkuId if an alias may move.
139
-
140
- ## Retention
141
-
142
- Akumas idle for more than fifteen days may be cleaned up after a later
143
- successful `call` or `fork`. Running Akumas, alias targets, and Akumas
144
- dispatched to an open Contract are kept, and nothing is killed. Read-only
145
- commands and `tell`/`ask`/`wait` never trigger cleanup.
146
-
147
- ## Stop and branch
148
-
149
- ```bash
150
- keiyaku kill @reviewer
151
- keiyaku fork @reviewer --at turn/3
152
- ```
153
-
154
- `kill` stops current work without admitting a Tell, deleting the Akuma, or
155
- removing its history. `fork` creates a new Akuma from one exact retained
156
- answered history point; the source is unchanged, and providers that cannot
157
- fork report that refusal. See `kill --help` and `fork --help` for the
158
- complete grammar.
159
-
160
- ## JavaScript automation
161
-
162
- Use [Automation With The Akuma API](references/automation.md) for a
163
- job-specific JavaScript coordinator, structured answers, or multi-worker
164
- orchestration. The CLI is enough for one commission and its return. A
165
- prompt-free birth followed by one input-bound ask uses the same identity:
166
-
167
- ```ts
168
- import { Akuma, Akumas, World } from "@astrosheep/keiyaku";
169
-
170
- const root = await World.at(process.cwd());
171
- const called = await Akumas.of(root).call({ archetype: "worker" });
172
- const worker = Akuma.select(root, called.akuma);
173
- const result = await worker.ask("Inspect the change");
174
- console.log(result.observation);
175
- ```
176
-
177
- The automation guide covers schema-based answer handling and longer workflows.
11
+ Use `Akumas` to delegate implementation, review, verification, or parallel
12
+ research.
13
+
14
+ ## 1. Aliases And Operations (`spawn`, `tell`, `ask`, `wait`)
15
+
16
+ - **Give every worker an `@alias` at birth:** assign a role or lane alias when
17
+ spawning an `Akuma` (`@deliverer`, `@reviewer`, `@scout`). Aliases make
18
+ `status`, `wait`, `tell`, `ask`, and `history` readable by role across
19
+ parallel lanes; keep the underlying `aku/<name>/<id>` only when reassigning
20
+ that `@alias` to a replacement worker. Spawning an archetype name (`worker`,
21
+ `review-akuma`) always spawns a new instance — address the existing `@alias`
22
+ or `AkuId` with `tell`/`ask` to continue with the same worker.
23
+ - **Detached `spawn` + `wait` for real work:** launch workers detached, then
24
+ supervise them together with `wait` (wakes on any settlement by default, or
25
+ all; a wait deadline never kills workers). `wait` on `kei/...` waits for a
26
+ `Contract`'s next journal change or terminal state.
27
+ - **`ask` for single-turn answers:** submits an instruction and waits for that
28
+ exact `Turn`'s answer (optionally validated against a JSON schema).
29
+ - **`tell` vs. interrupting `tell`:** `tell` queues steering instructions
30
+ without blocking; request an interrupt only when the worker is on the wrong
31
+ track and should yield its current attempt first.
32
+
33
+ ## 2. Commissioning Context
34
+
35
+ - **Set both `Contract` association and working directory:** associating a
36
+ `kei/...` records `Dispatch` for `status`, but neither sets the working
37
+ directory nor injects `Contract` terms into the prompt. Point the working
38
+ directory at the appointed worktree and write the `Contract` ID, worktree path,
39
+ current `Arc`, and expected return in the prompt.
40
+ - **Request `report` on long tasks:** a worker can record mid-turn progress
41
+ reports without stopping; inspect them in `history`.
42
+
43
+ ## 3. Observing, Branching, And Automation
44
+
45
+ - **`status` and `history`:** `status` shows the `World` board or one `Akuma`'s
46
+ live snapshot and file-change summary; `history` reads recent timeline
47
+ events, the latest answer, or one exact `turn/N` or `report/N` item.
48
+ - **`ls`, `fork`, and `kill`:** `ls` lists archetypes (`aku/`), recent
49
+ instances (`"aku/*/*"`), or your own call tree; `fork` branches a new `Akuma`
50
+ from an answered `turn/N`; `kill` stops active work while keeping history.
51
+ - **JavaScript orchestration:** for multi-agent tournaments, adversarial claim
52
+ checking, or custom concurrency control in code, read
53
+ [Automation With The `Akuma` API](references/automation.md).