@astrosheep/keiyaku 4.6.8 → 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 (253) hide show
  1. package/README.md +40 -14
  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/skills/keiyaku/SKILL.md +5 -6
  27. package/build/skills/keiyaku-akuma/SKILL.md +1 -1
  28. package/build/skills/keiyaku-akuma/references/automation.md +8 -8
  29. package/build/skills/keiyaku-babysit/SKILL.md +1 -1
  30. package/build/skills/keiyaku-bind/SKILL.md +9 -9
  31. package/build/skills/keiyaku-debt/SKILL.md +91 -0
  32. package/build/skills/keiyaku-workflow/SKILL.md +2 -2
  33. package/build/src/akuma/akuma-instance.d.ts +2 -0
  34. package/build/src/akuma/akuma-instance.js +10 -0
  35. package/build/src/akuma/akuma-observe.d.ts +33 -8
  36. package/build/src/akuma/akuma-observe.js +88 -64
  37. package/build/src/akuma/akuma-owner.d.ts +11 -2
  38. package/build/src/akuma/akuma-owner.js +45 -35
  39. package/build/src/akuma/akuma-selection-execution.js +9 -1
  40. package/build/src/akuma/akuma-stream.d.ts +22 -0
  41. package/build/src/akuma/akuma-stream.js +116 -0
  42. package/build/src/akuma/akuma-wait.d.ts +1 -40
  43. package/build/src/akuma/akuma-wait.js +23 -84
  44. package/build/src/akuma/akuma.d.ts +17 -11
  45. package/build/src/akuma/akuma.js +2 -0
  46. package/build/src/akuma/allowed.d.ts +7 -12
  47. package/build/src/akuma/allowed.js +13 -4
  48. package/build/src/akuma/body-supervisor.d.ts +5 -5
  49. package/build/src/akuma/body-supervisor.js +22 -20
  50. package/build/src/akuma/body.js +28 -1
  51. package/build/src/akuma/call-request.d.ts +12 -22
  52. package/build/src/akuma/heart/activity-schema.d.ts +12 -0
  53. package/build/src/akuma/heart/activity-schema.js +6 -0
  54. package/build/src/akuma/heart/index.d.ts +59 -2
  55. package/build/src/akuma/heart/index.js +87 -8
  56. package/build/src/akuma/heart/rows.js +5 -3
  57. package/build/src/akuma/heart/soul.d.ts +9 -0
  58. package/build/src/akuma/heart/soul.js +29 -0
  59. package/build/src/akuma/heart/storage.d.ts +15 -0
  60. package/build/src/akuma/heart/storage.js +55 -0
  61. package/build/src/akuma/heart/timeline.d.ts +7 -0
  62. package/build/src/akuma/heart/timeline.js +10 -0
  63. package/build/src/akuma/index.d.ts +1 -0
  64. package/build/src/akuma/projection.d.ts +25 -0
  65. package/build/src/akuma/projection.js +24 -7
  66. package/build/src/akuma/provider-recipe.d.ts +11 -0
  67. package/build/src/akuma/provider-recipe.js +23 -0
  68. package/build/src/akuma/provider.d.ts +25 -0
  69. package/build/src/akuma/provider.js +99 -7
  70. package/build/src/akuma/providers/acp/events.js +25 -2
  71. package/build/src/akuma/providers/claude/events.js +76 -10
  72. package/build/src/akuma/providers/claude/index.js +2 -5
  73. package/build/src/akuma/providers/codex-app-server/events.js +17 -2
  74. package/build/src/akuma/providers/codex-app-server/index.js +15 -9
  75. package/build/src/akuma/providers/decode.d.ts +8 -0
  76. package/build/src/akuma/providers/decode.js +21 -0
  77. package/build/src/akuma/providers/grok-build/index.js +10 -26
  78. package/build/src/akuma/providers/opencode-sdk/event-stream.d.ts +3 -3
  79. package/build/src/akuma/providers/opencode-sdk/event-stream.js +2 -25
  80. package/build/src/akuma/providers/opencode-sdk/events.d.ts +7 -43
  81. package/build/src/akuma/providers/opencode-sdk/events.js +147 -284
  82. package/build/src/akuma/providers/opencode-sdk/index.js +267 -421
  83. package/build/src/akuma/providers/opencode-sdk/native-http.d.ts +9 -0
  84. package/build/src/akuma/providers/opencode-sdk/native-http.js +69 -0
  85. package/build/src/akuma/providers/opencode-sdk/session.d.ts +42 -36
  86. package/build/src/akuma/providers/opencode-sdk/session.js +75 -82
  87. package/build/src/akuma/providers/paseo/events.d.ts +8 -0
  88. package/build/src/akuma/providers/paseo/events.js +58 -11
  89. package/build/src/akuma/providers/paseo/index.js +11 -7
  90. package/build/src/akuma/providers/pi/events.d.ts +2 -0
  91. package/build/src/akuma/providers/pi/events.js +32 -24
  92. package/build/src/akuma/providers/pi/index.js +21 -35
  93. package/build/src/akuma/request-lifecycle.d.ts +1 -2
  94. package/build/src/akuma/request-lifecycle.js +2 -8
  95. package/build/src/akuma/request-rendezvous.js +38 -55
  96. package/build/src/akuma/request-serve.d.ts +1 -1
  97. package/build/src/akuma/request-serve.js +77 -113
  98. package/build/src/akuma/selection-observation.d.ts +57 -51
  99. package/build/src/akuma/selection-observation.js +3 -3
  100. package/build/src/akuma/turn-drive.d.ts +3 -0
  101. package/build/src/akuma/turn-drive.js +26 -5
  102. package/build/src/akuma-body.js +12 -22
  103. package/build/src/cli/akuma-caller.js +10 -0
  104. package/build/src/cli/commands/akuma-grammar.js +3 -4
  105. package/build/src/cli/commands/akuma.js +13 -51
  106. package/build/src/cli/commands/contract-grammar.d.ts +7 -6
  107. package/build/src/cli/commands/contract-grammar.js +27 -32
  108. package/build/src/cli/commands/contract-help.d.ts +16 -7
  109. package/build/src/cli/commands/contract-help.js +20 -11
  110. package/build/src/cli/commands/contract.js +11 -11
  111. package/build/src/cli/commands/debt-grammar.d.ts +19 -0
  112. package/build/src/cli/commands/debt-grammar.js +323 -0
  113. package/build/src/cli/commands/debt-query.d.ts +5 -0
  114. package/build/src/cli/commands/{task-query.js → debt-query.js} +9 -9
  115. package/build/src/cli/commands/{task.d.ts → debt.d.ts} +2 -2
  116. package/build/src/cli/commands/{task.js → debt.js} +83 -143
  117. package/build/src/cli/coordinates.d.ts +1 -1
  118. package/build/src/cli/coordinates.js +1 -1
  119. package/build/src/cli/parse.d.ts +4 -4
  120. package/build/src/cli/parse.js +17 -16
  121. package/build/src/cli/render/akuma-activity.d.ts +11 -83
  122. package/build/src/cli/render/akuma-activity.js +20 -382
  123. package/build/src/cli/render/catalog.d.ts +2 -2
  124. package/build/src/cli/render/catalog.js +5 -5
  125. package/build/src/cli/render/contract.js +2 -2
  126. package/build/src/cli/render/debt.d.ts +28 -0
  127. package/build/src/cli/render/{task.js → debt.js} +51 -112
  128. package/build/src/cli/render/kanshi.js +28 -28
  129. package/build/src/cli/render/marks.d.ts +5 -5
  130. package/build/src/cli/render/marks.js +4 -10
  131. package/build/src/cli/render/nuke.js +1 -1
  132. package/build/src/cli/runtime.js +3 -3
  133. package/build/src/cli/scan.d.ts +1 -1
  134. package/build/src/cli/usage.d.ts +1 -1
  135. package/build/src/cli/usage.js +4 -4
  136. package/build/src/contract-worktree.js +3 -3
  137. package/build/src/debt/board.d.ts +160 -0
  138. package/build/src/{task → debt}/board.js +89 -89
  139. package/build/src/debt/catalog.d.ts +11 -0
  140. package/build/src/debt/catalog.js +59 -0
  141. package/build/src/{task → debt}/context.d.ts +1 -1
  142. package/build/src/{task → debt}/context.js +1 -1
  143. package/build/src/{task → debt}/created-observation.d.ts +6 -10
  144. package/build/src/{task → debt}/created-observation.js +7 -7
  145. package/build/src/debt/document.d.ts +37 -0
  146. package/build/src/{task → debt}/document.js +37 -37
  147. package/build/src/debt/identity.d.ts +21 -0
  148. package/build/src/{task → debt}/identity.js +35 -35
  149. package/build/src/debt/index.d.ts +111 -0
  150. package/build/src/debt/index.js +203 -0
  151. package/build/src/{task → debt}/input.d.ts +8 -8
  152. package/build/src/{task → debt}/input.js +21 -21
  153. package/build/src/debt/lifecycle-operations.d.ts +6 -0
  154. package/build/src/{task → debt}/lifecycle-operations.js +27 -31
  155. package/build/src/debt/mutation-result.d.ts +981 -0
  156. package/build/src/debt/mutation-result.js +109 -0
  157. package/build/src/debt/mutation.d.ts +424 -0
  158. package/build/src/debt/mutation.js +223 -0
  159. package/build/src/debt/operation-types.d.ts +71 -0
  160. package/build/src/debt/operations.d.ts +28 -0
  161. package/build/src/{task → debt}/operations.js +59 -60
  162. package/build/src/debt/query.d.ts +76 -0
  163. package/build/src/{task → debt}/query.js +55 -55
  164. package/build/src/{task → debt}/store.d.ts +13 -13
  165. package/build/src/{task → debt}/store.js +58 -49
  166. package/build/src/debt/view.d.ts +4 -0
  167. package/build/src/debt/view.js +7 -0
  168. package/build/src/identity/coordinates.d.ts +1 -1
  169. package/build/src/index.d.ts +13 -13
  170. package/build/src/index.js +9 -9
  171. package/build/src/kanshi/index.d.ts +1 -1
  172. package/build/src/kanshi/read.js +33 -33
  173. package/build/src/kanshi/report.d.ts +7 -7
  174. package/build/src/kanshi/select.js +4 -4
  175. package/build/src/library/akumas.d.ts +2 -3
  176. package/build/src/library/bind.d.ts +3 -3
  177. package/build/src/library/bind.js +5 -5
  178. package/build/src/library/contract-creation.js +5 -5
  179. package/build/src/library/contract-execution.js +4 -4
  180. package/build/src/library/contract-types.d.ts +2 -2
  181. package/build/src/library/input.d.ts +2 -2
  182. package/build/src/library/input.js +5 -5
  183. package/build/src/library/invocation.js +2 -2
  184. package/build/src/library/nuke.js +3 -3
  185. package/build/src/library/outcome.d.ts +126 -126
  186. package/build/src/library/outcome.js +3 -3
  187. package/build/src/library/selection.d.ts +1 -4
  188. package/build/src/library/selection.js +11 -62
  189. package/build/src/plugin/public.d.ts +5 -0
  190. package/build/src/plugin/runtime.js +3 -1
  191. package/build/src/runtime/proc/windows-launch.exe +0 -0
  192. package/build/src/settlement/fence.d.ts +3 -3
  193. package/build/src/settlement/fence.js +4 -4
  194. package/build/src/settlement/holder.d.ts +16 -16
  195. package/build/src/settlement/holder.js +69 -63
  196. package/build/src/settlement/settle.d.ts +5 -5
  197. package/build/src/settlement/settle.js +53 -53
  198. package/package.json +12 -6
  199. package/plugins/paseo/plugin/index.server.ts +17 -0
  200. package/plugins/paseo/plugin/paseo-plugin.json +4 -0
  201. package/plugins/paseo/plugin/server/attach.ts +52 -0
  202. package/plugins/paseo/plugin/server/keiyaku.ts +44 -0
  203. package/plugins/paseo/plugin/server/message.ts +60 -0
  204. package/plugins/paseo/plugin/server/mirror.ts +193 -0
  205. package/plugins/paseo/plugin/server/model.ts +14 -0
  206. package/plugins/paseo/plugin/server/provider.ts +276 -0
  207. package/plugins/paseo/plugin/server/sdk-worker.ts +237 -0
  208. package/plugins/paseo/plugin/server/sdk.ts +289 -0
  209. package/plugins/paseo/plugin/server/stop.ts +26 -0
  210. package/plugins/paseo/plugin/server/transport.ts +35 -0
  211. package/plugins/paseo/plugin/shared/attach-rpc.ts +10 -0
  212. package/plugins/paseo/plugin/shared/refresh-rpc.ts +6 -0
  213. package/plugins/paseo/plugin/tsconfig.json +6 -0
  214. package/skills/keiyaku/SKILL.md +5 -6
  215. package/skills/keiyaku-akuma/SKILL.md +1 -1
  216. package/skills/keiyaku-akuma/references/automation.md +8 -8
  217. package/skills/keiyaku-babysit/SKILL.md +1 -1
  218. package/skills/keiyaku-bind/SKILL.md +9 -9
  219. package/skills/keiyaku-debt/SKILL.md +91 -0
  220. package/skills/keiyaku-workflow/SKILL.md +2 -2
  221. package/build/plugins/claude/skills/keiyaku-task/SKILL.md +0 -104
  222. package/build/plugins/codex/skills/keiyaku-task/SKILL.md +0 -104
  223. package/build/plugins/opencode/skills/keiyaku-task/SKILL.md +0 -104
  224. package/build/skills/keiyaku-task/SKILL.md +0 -104
  225. package/build/src/cli/commands/task-grammar.d.ts +0 -19
  226. package/build/src/cli/commands/task-grammar.js +0 -384
  227. package/build/src/cli/commands/task-query.d.ts +0 -5
  228. package/build/src/cli/render/task.d.ts +0 -39
  229. package/build/src/task/board.d.ts +0 -168
  230. package/build/src/task/catalog.d.ts +0 -11
  231. package/build/src/task/catalog.js +0 -59
  232. package/build/src/task/compose-language.d.ts +0 -57
  233. package/build/src/task/compose-language.js +0 -364
  234. package/build/src/task/compose-parser.d.ts +0 -32
  235. package/build/src/task/compose-parser.js +0 -180
  236. package/build/src/task/compose.d.ts +0 -16
  237. package/build/src/task/compose.js +0 -189
  238. package/build/src/task/document.d.ts +0 -39
  239. package/build/src/task/identity.d.ts +0 -21
  240. package/build/src/task/index.d.ts +0 -138
  241. package/build/src/task/index.js +0 -269
  242. package/build/src/task/lifecycle-operations.d.ts +0 -6
  243. package/build/src/task/mutation-result.d.ts +0 -1726
  244. package/build/src/task/mutation-result.js +0 -198
  245. package/build/src/task/mutation.d.ts +0 -590
  246. package/build/src/task/mutation.js +0 -262
  247. package/build/src/task/operation-types.d.ts +0 -71
  248. package/build/src/task/operations.d.ts +0 -28
  249. package/build/src/task/query.d.ts +0 -76
  250. package/build/src/task/view.d.ts +0 -4
  251. package/build/src/task/view.js +0 -7
  252. package/skills/keiyaku-task/SKILL.md +0 -104
  253. /package/build/src/{task → debt}/operation-types.js +0 -0
@@ -1,57 +1,57 @@
1
1
  /**
2
- * The package root: the curated Contract, Akuma, Akumas, Task, Kanshi, World,
2
+ * The package root: the curated Contract, Akuma, Akumas, Debt, Kanshi, World,
3
3
  * Settings, and Plugin surfaces. Internal composition, execution, and
4
4
  * configuration helpers stay off this entry; only CLI and Body import them.
5
5
  */
6
6
  /**
7
- * The package root: the curated Contract, Akuma, Akumas, Task, Kanshi, World,
7
+ * The package root: the curated Contract, Akuma, Akumas, Debt, Kanshi, World,
8
8
  * Settings, and Plugin surfaces. Internal composition, execution, and
9
9
  * configuration helpers stay off this entry; only CLI and Body import them.
10
10
  */
11
11
  export { AuthorityCorruptionError } from "./core/facts/errors.js";
12
12
  /**
13
- * The package root: the curated Contract, Akuma, Akumas, Task, Kanshi, World,
13
+ * The package root: the curated Contract, Akuma, Akumas, Debt, Kanshi, World,
14
14
  * Settings, and Plugin surfaces. Internal composition, execution, and
15
15
  * configuration helpers stay off this entry; only CLI and Body import them.
16
16
  */
17
17
  export { Delivery } from "./library/delivery.js";
18
18
  /**
19
- * The package root: the curated Contract, Akuma, Akumas, Task, Kanshi, World,
19
+ * The package root: the curated Contract, Akuma, Akumas, Debt, Kanshi, World,
20
20
  * Settings, and Plugin surfaces. Internal composition, execution, and
21
21
  * configuration helpers stay off this entry; only CLI and Body import them.
22
22
  */
23
23
  export { Keiyaku } from "./library/keiyaku.js";
24
24
  /**
25
- * The package root: the curated Contract, Akuma, Akumas, Task, Kanshi, World,
25
+ * The package root: the curated Contract, Akuma, Akumas, Debt, Kanshi, World,
26
26
  * Settings, and Plugin surfaces. Internal composition, execution, and
27
27
  * configuration helpers stay off this entry; only CLI and Body import them.
28
28
  */
29
29
  export { KeiyakuError } from "./library/outcome.js";
30
30
  /**
31
- * The package root: the curated Contract, Akuma, Akumas, Task, Kanshi, World,
31
+ * The package root: the curated Contract, Akuma, Akumas, Debt, Kanshi, World,
32
32
  * Settings, and Plugin surfaces. Internal composition, execution, and
33
33
  * configuration helpers stay off this entry; only CLI and Body import them.
34
34
  */
35
35
  export { NoGitWorldError, Repo } from "./library/repo.js";
36
36
  /**
37
- * The package root: the curated Contract, Akuma, Akumas, Task, Kanshi, World,
37
+ * The package root: the curated Contract, Akuma, Akumas, Debt, Kanshi, World,
38
38
  * Settings, and Plugin surfaces. Internal composition, execution, and
39
39
  * configuration helpers stay off this entry; only CLI and Body import them.
40
40
  */
41
41
  export { actorId } from "./core/facts/types.js";
42
42
  /**
43
- * The package root: the curated Contract, Akuma, Akumas, Task, Kanshi, World,
43
+ * The package root: the curated Contract, Akuma, Akumas, Debt, Kanshi, World,
44
44
  * Settings, and Plugin surfaces. Internal composition, execution, and
45
45
  * configuration helpers stay off this entry; only CLI and Body import them.
46
46
  */
47
47
  export { z } from "zod";
48
48
  export { ALLOWED_ACTIONS, Akuma, AkumaArchetypeError, AkumaBusyError, AkumaDecodeError, AkumaNotBornError, AkumaProviderError, Schema, listArchetypeDefinitions, } from "./akuma/index.js";
49
- export type { AkumaCaller, AkumaOrigin, ActivityHistory, ActivityRow, AkuId, AkumaAskObservation, AkumaAskOptions, AkumaAskResult, AkumaBirthInput, AkumaHistoryOptions, AkumaHostOptions, AkumaIdleOptions, AkumaIdleResult, AkumaSignalOptions, AkumaStatus, AkumaTellOptions, AkumaTellResult, AllowedAction, AllowedActions, ArchetypeCatalog, ArchetypeCatalogInput, ArchetypeCatalogRow, InterruptReceipt, JsonSchema, JsonSchemaDocument, KillEvidence, SchemaLike, StandardSchemaV1, } from "./akuma/index.js";
49
+ export type { AkumaCaller, AkumaOrigin, ActivityHistory, ActivityRow, AkuId, AkumaAskObservation, AkumaAskOptions, AkumaAskResult, AkumaBirthInput, AkumaHistoryOptions, AkumaHostOptions, AkumaIdleOptions, AkumaIdleResult, AkumaSignalOptions, AkumaStatus, AkumaStreamSnapshot, AkumaTellOptions, AkumaTellResult, AllowedAction, AllowedActions, ArchetypeCatalog, ArchetypeCatalogInput, ArchetypeCatalogRow, InterruptReceipt, JsonSchema, JsonSchemaDocument, KillEvidence, SchemaLike, StandardSchemaV1, } from "./akuma/index.js";
50
50
  export type { ActorId, ChangeId, ContractHead, ContractId, ContractState, JournalEntry as Fact, FactKind, SnapshotId, } from "./core/facts/types.js";
51
51
  export { kanshi, kanshiCategory, observeKanshi, selectKanshi, selectRegion } from "./kanshi/index.js";
52
- export type { AkumaKanshiRow, AkumaKanshiWorld, ContractEndpointObservation, ContractHolderObservation, ContractKanshiBoard, ContractKanshiRow, KanshiCategoryInput, KanshiCategoryReport, KanshiInput, KanshiRegionSelection, KanshiReport, KanshiSelection, RegionDeclaration, RegionRead, Section, TaskKanshiRow, TaskKanshiWorld, } from "./kanshi/index.js";
52
+ export type { AkumaKanshiRow, AkumaKanshiWorld, ContractEndpointObservation, ContractHolderObservation, ContractKanshiBoard, ContractKanshiRow, KanshiCategoryInput, KanshiCategoryReport, KanshiInput, KanshiRegionSelection, KanshiReport, KanshiSelection, RegionDeclaration, RegionRead, Section, DebtKanshiRow, DebtKanshiWorld, } from "./kanshi/index.js";
53
53
  export { AkumaAddressError, AkumaWorldScopeError, Akumas } from "./library/akumas.js";
54
- export type { AkumaAddressInput, AkumaAskInput, AkumaHistoryInput, AkumaHistoryResult, AkumaKillInput, AkumaKillResult, AkumaList, AkumaListInput, AkumaObservation, AkumaObservationStage, AkumaTellInput, AkumaWaitInput, AkumaWaitResult, AkumaWorldScopeRefusal, CallInput, CallResult, CallWaitHead, CreatedTaskObservation, DispatchAssociation, DispatchStage, ForkInput, ForkResult, TellResult, TellWake, WaitObservedAkuma, WaitObserver, WaitSelectedAkuma, } from "./library/akumas.js";
54
+ export type { AkumaAddressInput, AkumaAskInput, AkumaHistoryInput, AkumaHistoryResult, AkumaKillInput, AkumaKillResult, AkumaList, AkumaListInput, AkumaObservation, AkumaObservationStage, AkumaTellInput, AkumaWaitInput, AkumaWaitResult, AkumaWorldScopeRefusal, CallInput, CallResult, CallWaitHead, CreatedDebtObservation, DispatchAssociation, DispatchStage, ForkInput, ForkResult, TellResult, TellWake, } from "./library/akumas.js";
55
55
  export type { ContinuationReport } from "./library/continuation.js";
56
56
  export type { KeiyakuLibrary, ReconcileInput } from "./library/contract-composition.js";
57
57
  export type { AbandonOutcome, AmendOutcome, ArcOutcome, AuditOutcome, BindOutcome, BindResult, DeliverOutcome, ReviewOutcome, } from "./library/contract-outcomes.js";
@@ -74,8 +74,8 @@ export { SettingsError, settings } from "./settings.js";
74
74
  export type { Gate } from "./library/contract-types.js";
75
75
  export type { Settings, SettingsEntry, SettingsInput, SettingsNamespaceFailure, SettingsNamespaceView, SettingsScope, SettingsScopeState, } from "./settings.js";
76
76
  export type { SettlementAction, SettlementLag, SettlementReport } from "./settlement/settle.js";
77
- export type * from "./task/index.js";
78
- export { TASK_RELATION_PREDICATE_FIELDS, TaskAuthorityCorruptionError, Tasks } from "./task/index.js";
77
+ export type * from "./debt/index.js";
78
+ export { DEBT_RELATION_PREDICATE_FIELDS, DebtAuthorityCorruptionError, Debts } from "./debt/index.js";
79
79
  export { World, WorldError } from "./world.js";
80
80
  export type { WorldResolution, WorldResolutionInput, WorldRoot } from "./world.js";
81
81
  export type { ReconcileReport, TopologyEffect } from "./library/reconcile.js";
@@ -1,46 +1,46 @@
1
1
  /**
2
- * The package root: the curated Contract, Akuma, Akumas, Task, Kanshi, World,
2
+ * The package root: the curated Contract, Akuma, Akumas, Debt, Kanshi, World,
3
3
  * Settings, and Plugin surfaces. Internal composition, execution, and
4
4
  * configuration helpers stay off this entry; only CLI and Body import them.
5
5
  */
6
6
  /**
7
- * The package root: the curated Contract, Akuma, Akumas, Task, Kanshi, World,
7
+ * The package root: the curated Contract, Akuma, Akumas, Debt, Kanshi, World,
8
8
  * Settings, and Plugin surfaces. Internal composition, execution, and
9
9
  * configuration helpers stay off this entry; only CLI and Body import them.
10
10
  */
11
11
  export { AuthorityCorruptionError } from "./core/facts/errors.js";
12
12
  /**
13
- * The package root: the curated Contract, Akuma, Akumas, Task, Kanshi, World,
13
+ * The package root: the curated Contract, Akuma, Akumas, Debt, Kanshi, World,
14
14
  * Settings, and Plugin surfaces. Internal composition, execution, and
15
15
  * configuration helpers stay off this entry; only CLI and Body import them.
16
16
  */
17
17
  export { Delivery } from "./library/delivery.js";
18
18
  /**
19
- * The package root: the curated Contract, Akuma, Akumas, Task, Kanshi, World,
19
+ * The package root: the curated Contract, Akuma, Akumas, Debt, Kanshi, World,
20
20
  * Settings, and Plugin surfaces. Internal composition, execution, and
21
21
  * configuration helpers stay off this entry; only CLI and Body import them.
22
22
  */
23
23
  export { Keiyaku } from "./library/keiyaku.js";
24
24
  /**
25
- * The package root: the curated Contract, Akuma, Akumas, Task, Kanshi, World,
25
+ * The package root: the curated Contract, Akuma, Akumas, Debt, Kanshi, World,
26
26
  * Settings, and Plugin surfaces. Internal composition, execution, and
27
27
  * configuration helpers stay off this entry; only CLI and Body import them.
28
28
  */
29
29
  export { KeiyakuError } from "./library/outcome.js";
30
30
  /**
31
- * The package root: the curated Contract, Akuma, Akumas, Task, Kanshi, World,
31
+ * The package root: the curated Contract, Akuma, Akumas, Debt, Kanshi, World,
32
32
  * Settings, and Plugin surfaces. Internal composition, execution, and
33
33
  * configuration helpers stay off this entry; only CLI and Body import them.
34
34
  */
35
35
  export { NoGitWorldError, Repo } from "./library/repo.js";
36
36
  /**
37
- * The package root: the curated Contract, Akuma, Akumas, Task, Kanshi, World,
37
+ * The package root: the curated Contract, Akuma, Akumas, Debt, Kanshi, World,
38
38
  * Settings, and Plugin surfaces. Internal composition, execution, and
39
39
  * configuration helpers stay off this entry; only CLI and Body import them.
40
40
  */
41
41
  export { actorId } from "./core/facts/types.js";
42
42
  /**
43
- * The package root: the curated Contract, Akuma, Akumas, Task, Kanshi, World,
43
+ * The package root: the curated Contract, Akuma, Akumas, Debt, Kanshi, World,
44
44
  * Settings, and Plugin surfaces. Internal composition, execution, and
45
45
  * configuration helpers stay off this entry; only CLI and Body import them.
46
46
  */
@@ -50,5 +50,5 @@ export { kanshi, kanshiCategory, observeKanshi, selectKanshi, selectRegion } fro
50
50
  export { AkumaAddressError, AkumaWorldScopeError, Akumas } from "./library/akumas.js";
51
51
  export { nukeKeiyaku as nuke } from "./library/nuke.js";
52
52
  export { SettingsError, settings } from "./settings.js";
53
- export { TASK_RELATION_PREDICATE_FIELDS, TaskAuthorityCorruptionError, Tasks } from "./task/index.js";
53
+ export { DEBT_RELATION_PREDICATE_FIELDS, DebtAuthorityCorruptionError, Debts } from "./debt/index.js";
54
54
  export { World, WorldError } from "./world.js";
@@ -1,5 +1,5 @@
1
1
  export { kanshi, kanshiCategory, observeKanshi } from "./read.js";
2
2
  export { selectKanshi, selectRegion } from "./select.js";
3
3
  export type { KanshiCategoryInput, KanshiInput } from "./read.js";
4
- export type { AkumaKanshiRow, AkumaKanshiWorld, ContractEndpointObservation, ContractHolderObservation, ContractKanshiBoard, ContractKanshiRow, KanshiCategoryReport, KanshiReport, Section, TaskKanshiRow, TaskKanshiWorld, KanshiRegionSelection, RegionDeclaration, RegionOverlap, RegionRead, } from "./report.js";
4
+ export type { AkumaKanshiRow, AkumaKanshiWorld, ContractEndpointObservation, ContractHolderObservation, ContractKanshiBoard, ContractKanshiRow, KanshiCategoryReport, KanshiReport, Section, DebtKanshiRow, DebtKanshiWorld, KanshiRegionSelection, RegionDeclaration, RegionOverlap, RegionRead, } from "./report.js";
5
5
  export type { KanshiSelection } from "./select.js";
@@ -10,10 +10,10 @@ import { Repo, scopeForRepo } from "../library/repo.js";
10
10
  import { readDocuments } from "../protocol/read/documents.js";
11
11
  import { observeCurrentPhysicalIssue } from "../protocol/read/observation.js";
12
12
  import { readContractBoard, readContractCatalogue, readContractPhase } from "../protocol/read/status.js";
13
- import { readTaskHolderProjectionAt } from "../settlement/holder.js";
14
- import { contractNamespace } from "../task/identity.js";
15
- import { observeRecentTaskStatus, TaskAuthorityCorruptionError } from "../task/index.js";
16
- import { observeTaskBoard } from "../task/operations.js";
13
+ import { readDebtHolderProjectionAt } from "../settlement/holder.js";
14
+ import { contractNamespace } from "../debt/identity.js";
15
+ import { observeRecentDebtStatus, DebtAuthorityCorruptionError } from "../debt/index.js";
16
+ import { observeDebtBoard } from "../debt/operations.js";
17
17
  import { ROSTER_SNAPSHOT_ROWS, ROSTER_VISIBLE_ROWS } from "./roster.js";
18
18
  import { selectKanshi, selectRegion } from "./select.js";
19
19
  const WORLD_CONTRACT_ROWS = 10;
@@ -146,7 +146,7 @@ async function readContracts(observation, include, limit = WORLD_CONTRACT_ROWS)
146
146
  }
147
147
  async function readHolders(observation) {
148
148
  try {
149
- return { kind: "present", value: await readTaskHolderProjectionAt(observation) };
149
+ return { kind: "present", value: await readDebtHolderProjectionAt(observation) };
150
150
  }
151
151
  catch (error) {
152
152
  return { kind: "failed", failure: { message: diagnostic(error) } };
@@ -173,7 +173,7 @@ function attachRoster(contracts, akuma) {
173
173
  },
174
174
  };
175
175
  }
176
- function decorateContracts(contracts, holders, namespaceTasks) {
176
+ function decorateContracts(contracts, holders, namespaceDebts) {
177
177
  if (contracts.kind !== "present")
178
178
  return contracts;
179
179
  return {
@@ -181,22 +181,22 @@ function decorateContracts(contracts, holders, namespaceTasks) {
181
181
  value: {
182
182
  ...contracts.value,
183
183
  rows: contracts.value.rows.map((row) => {
184
- const selected = namespaceTasks?.(row.id);
184
+ const selected = namespaceDebts?.(row.id);
185
185
  if (holders.kind === "failed") {
186
186
  return {
187
187
  ...row,
188
188
  holder: { kind: "unavailable" },
189
189
  roster: [],
190
- ...(selected === undefined ? {} : { namespaceTasks: selected }),
190
+ ...(selected === undefined ? {} : { namespaceDebts: selected }),
191
191
  };
192
192
  }
193
193
  const holder = holders.kind === "present" ? holders.value.get(row.id) : undefined;
194
194
  return {
195
195
  ...row,
196
196
  roster: [],
197
- ...(selected === undefined ? {} : { namespaceTasks: selected }),
197
+ ...(selected === undefined ? {} : { namespaceDebts: selected }),
198
198
  holder: holder?.disposition === "held"
199
- ? { kind: "held", taskId: holder.taskId }
199
+ ? { kind: "held", debtId: holder.debtId }
200
200
  : { kind: "none" },
201
201
  };
202
202
  }),
@@ -214,11 +214,11 @@ function contractEndpointObserver(contracts) {
214
214
  return "hasMore" in contracts.value ? "unavailable" : "missing";
215
215
  };
216
216
  }
217
- function joinTasks(rows, holders, observeContract) {
217
+ function joinDebts(rows, holders, observeContract) {
218
218
  const associations = new Map(holders.kind === "present"
219
219
  ? [...holders.value.values()]
220
220
  .filter((holder) => holder.disposition === "held")
221
- .map((holder) => [holder.taskId, holder.contractId])
221
+ .map((holder) => [holder.debtId, holder.contractId])
222
222
  : []);
223
223
  return rows.map((row) => {
224
224
  const contractId = associations.get(row.id);
@@ -227,43 +227,43 @@ function joinTasks(rows, holders, observeContract) {
227
227
  return { ...row, contract: { id: contractId, observed: observeContract(contractId) } };
228
228
  });
229
229
  }
230
- /** Attribute a Task board failure to the malformed document that caused it, when one is known. */
231
- function taskFailure(error) {
230
+ /** Attribute a Debt board failure to the malformed document that caused it, when one is known. */
231
+ function debtFailure(error) {
232
232
  return {
233
233
  message: diagnostic(error),
234
- ...(error instanceof TaskAuthorityCorruptionError && error.coordinate !== undefined
234
+ ...(error instanceof DebtAuthorityCorruptionError && error.coordinate !== undefined
235
235
  ? { coordinate: error.coordinate }
236
236
  : {}),
237
237
  };
238
238
  }
239
- async function readTaskWorld(path) {
239
+ async function readDebtWorld(path) {
240
240
  if (path === null)
241
241
  return { kind: "absent" };
242
242
  try {
243
- return { kind: "present", observation: await observeTaskBoard(path) };
243
+ return { kind: "present", observation: await observeDebtBoard(path) };
244
244
  }
245
245
  catch (error) {
246
- return { kind: "failed", failure: taskFailure(error) };
246
+ return { kind: "failed", failure: debtFailure(error) };
247
247
  }
248
248
  }
249
249
  /**
250
- * A selected Contract's own Task namespace view. A failed Task board is reported once by the
251
- * board's Task section, so the entity block omits it rather than repeating the same row.
250
+ * A selected Contract's own Debt namespace view. A failed Debt board is reported once by the
251
+ * board's Debt section, so the entity block omits it rather than repeating the same row.
252
252
  */
253
- function namespaceTaskSection(board, id) {
253
+ function namespaceDebtSection(board, id) {
254
254
  if (board.kind === "absent")
255
255
  return { kind: "absent" };
256
256
  if (board.kind === "failed")
257
257
  return undefined;
258
258
  return { kind: "present", value: board.observation.selectNamespace(contractNamespace(id)) };
259
259
  }
260
- async function readTasks(path, holders, observeContract) {
260
+ async function readDebts(path, holders, observeContract) {
261
261
  if (holders.kind === "failed")
262
262
  return { kind: "failed", failure: holders.failure };
263
- return observeRecentTaskStatus(path, { limit: 10 }).then((recent) => ({
263
+ return observeRecentDebtStatus(path, { limit: 10 }).then((recent) => ({
264
264
  kind: "present",
265
- value: { root: path, hasMore: recent.hasMore, rows: joinTasks(recent.rows, holders, observeContract) },
266
- }), (error) => ({ kind: "failed", failure: taskFailure(error) }));
265
+ value: { root: path, hasMore: recent.hasMore, rows: joinDebts(recent.rows, holders, observeContract) },
266
+ }), (error) => ({ kind: "failed", failure: debtFailure(error) }));
267
267
  }
268
268
  /**
269
269
  * Placement discharge for the observed roster snapshots: an associated Contract
@@ -357,7 +357,7 @@ async function observeWithoutRepo(world, region, observedAt, branch) {
357
357
  const contracts = { kind: "absent" };
358
358
  const holders = { kind: "absent" };
359
359
  const observeContract = contractEndpointObserver(contracts);
360
- const tasks = world === null ? { kind: "absent" } : await readTasks(world, holders, observeContract);
360
+ const debts = world === null ? { kind: "absent" } : await readDebts(world, holders, observeContract);
361
361
  const aliases = world === null ? { kind: "absent" } : await readAliasBindings(world);
362
362
  const akuma = world === null
363
363
  ? { kind: "absent" }
@@ -368,7 +368,7 @@ async function observeWithoutRepo(world, region, observedAt, branch) {
368
368
  observedAt,
369
369
  branch,
370
370
  contracts,
371
- tasks,
371
+ debts,
372
372
  akuma,
373
373
  ...(region === undefined ? {} : { region: { kind: "absent" } }),
374
374
  },
@@ -388,11 +388,11 @@ async function observeRepo(input) {
388
388
  const selectedContract = contract !== undefined &&
389
389
  contractSection.kind === "present" &&
390
390
  contractSection.value.rows.some((row) => row.id === contract);
391
- const board = selectedContract ? await readTaskWorld(world) : undefined;
392
- const contracts = decorateContracts(contractSection, holders, selectedContract ? (id) => (id === contract ? namespaceTaskSection(board, id) : undefined) : undefined);
391
+ const board = selectedContract ? await readDebtWorld(world) : undefined;
392
+ const contracts = decorateContracts(contractSection, holders, selectedContract ? (id) => (id === contract ? namespaceDebtSection(board, id) : undefined) : undefined);
393
393
  const observeContract = contractEndpointObserver(contracts);
394
394
  const aliases = world === null ? { kind: "absent" } : await readAliasBindings(world);
395
- const tasks = world === null ? { kind: "absent" } : await readTasks(world, holders, observeContract);
395
+ const debts = world === null ? { kind: "absent" } : await readDebts(world, holders, observeContract);
396
396
  const claimed = dispatches.kind === "present"
397
397
  ? await claimedAssociatedContracts(observation, dispatches.value)
398
398
  : new Set();
@@ -406,7 +406,7 @@ async function observeRepo(input) {
406
406
  observedAt,
407
407
  branch,
408
408
  contracts: attachRoster(contracts, akuma),
409
- tasks,
409
+ debts,
410
410
  akuma,
411
411
  ...(regionSection === undefined ? {} : { region: regionSection }),
412
412
  };
@@ -430,7 +430,7 @@ async function observeRepo(input) {
430
430
  observedAt,
431
431
  branch,
432
432
  contracts: failure,
433
- tasks: world === null ? { kind: "absent" } : failure,
433
+ debts: world === null ? { kind: "absent" } : failure,
434
434
  akuma: world === null ? { kind: "absent" } : failure,
435
435
  ...(region === undefined ? {} : { region: failure }),
436
436
  },
@@ -449,7 +449,7 @@ export async function observeKanshi(input) {
449
449
  export async function kanshi(input) {
450
450
  return (await observeKanshi(input)).report;
451
451
  }
452
- /** Category observations reuse owner rows without reading the Task board. */
452
+ /** Category observations reuse owner rows without reading the Debt board. */
453
453
  async function observeAkumaCategory(world, repo, limit, observedAt) {
454
454
  const report = (akuma) => ({
455
455
  category: "akuma",
@@ -6,7 +6,7 @@ import type { ContractId } from "../index.js";
6
6
  import type { RegionOverlap } from "../library/region.js";
7
7
  import type { CurrentPhysicalIssue } from "../protocol/read/observation.js";
8
8
  import type { ContractBoard, ContractDisposition, ContractPhase } from "../protocol/read/status.js";
9
- import type { TaskId, TaskRef, TaskRow } from "../task/index.js";
9
+ import type { DebtId, DebtRef, DebtRow } from "../debt/index.js";
10
10
  import type { WorldRoot } from "../world.js";
11
11
  export type { RegionOverlap };
12
12
  export type Section<Value> = Readonly<{
@@ -24,7 +24,7 @@ export type Section<Value> = Readonly<{
24
24
  export type ContractEndpointObservation = ContractDisposition | "missing" | "unavailable";
25
25
  export type ContractHolderObservation = Readonly<{
26
26
  kind: "held";
27
- taskId: TaskId;
27
+ debtId: DebtId;
28
28
  }> | Readonly<{
29
29
  kind: "none";
30
30
  }> | Readonly<{
@@ -38,21 +38,21 @@ export type ContractKanshiRow = ContractBoard["rows"][number] & Readonly<{
38
38
  phase: ContractPhase;
39
39
  holder: ContractHolderObservation;
40
40
  roster: readonly ContractRosterAttachment[];
41
- namespaceTasks?: Section<readonly TaskRow[]>;
41
+ namespaceDebts?: Section<readonly DebtRow[]>;
42
42
  issue?: CurrentPhysicalIssue;
43
43
  }>;
44
44
  export type ContractKanshiBoard = Omit<ContractBoard, "rows"> & Readonly<{
45
45
  rows: readonly ContractKanshiRow[];
46
46
  hasMore?: boolean;
47
47
  }>;
48
- export type TaskKanshiRow = TaskRow & Readonly<{
48
+ export type DebtKanshiRow = DebtRow & Readonly<{
49
49
  contract?: Readonly<{
50
50
  id: string;
51
51
  observed: ContractEndpointObservation;
52
52
  }>;
53
- blockers?: readonly TaskRef[];
53
+ blockers?: readonly DebtRef[];
54
54
  }>;
55
- export type TaskKanshiWorld = BoundedList<TaskKanshiRow> & Readonly<{
55
+ export type DebtKanshiWorld = BoundedList<DebtKanshiRow> & Readonly<{
56
56
  root: WorldRoot;
57
57
  }>;
58
58
  export type AkumaKanshiRow = (AkumaListRow | UnbornAkumaListRow) & Readonly<{
@@ -96,7 +96,7 @@ export type KanshiReport = Readonly<{
96
96
  observedAt: string;
97
97
  branch: string | null;
98
98
  contracts: Section<ContractKanshiBoard>;
99
- tasks: Section<TaskKanshiWorld>;
99
+ debts: Section<DebtKanshiWorld>;
100
100
  akuma: Section<AkumaKanshiWorld>;
101
101
  region?: Section<RegionRead>;
102
102
  }>;
@@ -29,15 +29,15 @@ export function selectKanshi(input) {
29
29
  },
30
30
  }
31
31
  : report.contracts,
32
- tasks: report.tasks.kind === "present"
32
+ debts: report.debts.kind === "present"
33
33
  ? {
34
34
  kind: "present",
35
35
  value: {
36
- ...report.tasks.value,
37
- rows: report.tasks.value.rows.filter((row) => row.contract?.id === contract),
36
+ ...report.debts.value,
37
+ rows: report.debts.value.rows.filter((row) => row.contract?.id === contract),
38
38
  },
39
39
  }
40
- : report.tasks,
40
+ : report.debts,
41
41
  akuma: report.akuma.kind === "present"
42
42
  ? {
43
43
  kind: "present",
@@ -4,7 +4,7 @@ import type { AkumaList, AkumaListInput } from "../akuma/akuma.js";
4
4
  import type { TellResult, TellWake } from "../akuma/body.js";
5
5
  import { type ExecutionContext } from "../akuma/requests.js";
6
6
  import type { DispatchAssociation } from "../akuma/dispatch-association.js";
7
- import type { CreatedTaskObservation } from "../task/created-observation.js";
7
+ import type { CreatedDebtObservation } from "../debt/created-observation.js";
8
8
  import { type WorldRoot } from "../world.js";
9
9
  import type { AkumaAddressInput, AkumaWorldScopeRefusal } from "./address.js";
10
10
  import type { CallInput, CallResult, CallWaitHead, DispatchStage, ForkInput, ForkResult } from "./akuma-creation.js";
@@ -13,9 +13,8 @@ export { AkumaAddressError, AkumaWorldScopeError } from "./address.js";
13
13
  export type { AkumaAddressInput } from "./address.js";
14
14
  export type { CallInput, ForkInput } from "./akuma-creation.js";
15
15
  export type { AkumaAskInput, AkumaHistoryInput, AkumaKillInput, AkumaTellInput, AkumaWaitInput } from "./selection.js";
16
- export type { AkumaAskResult, AkumaHistoryResult, AkumaKillResult, AkumaList, AkumaListInput, AkumaObservation, AkumaObservationStage, AkumaTellResult, AkumaWaitResult, AkumaWorldScopeRefusal, CallResult, CallWaitHead, CreatedTaskObservation, DispatchAssociation, DispatchStage, ForkResult, TellResult, TellWake, };
16
+ export type { AkumaAskResult, AkumaHistoryResult, AkumaKillResult, AkumaList, AkumaListInput, AkumaObservation, AkumaObservationStage, AkumaTellResult, AkumaWaitResult, AkumaWorldScopeRefusal, CallResult, CallWaitHead, CreatedDebtObservation, DispatchAssociation, DispatchStage, ForkResult, TellResult, TellWake, };
17
17
  /** The existing native wait-observation seam, exposed type-only for CLI composition. */
18
- export type { WaitObservedAkuma, WaitObserver, WaitSelectedAkuma } from "../akuma/akuma-wait.js";
19
18
  export type Akumas = AkumasHandle;
20
19
  declare class AkumasHandle {
21
20
  #private;
@@ -4,7 +4,7 @@ import type { GitDecodeChannel } from "../git/read-observation.js";
4
4
  import { type BindTargetSelection } from "../protocol/bind.js";
5
5
  import { type IntentOutcome, type RepositoryScope } from "../protocol/operations.js";
6
6
  import type { ProtocolProgress } from "../protocol/progress.js";
7
- import type { TaskId } from "../task/identity.js";
7
+ import type { DebtId } from "../debt/identity.js";
8
8
  import type { ForkSourceRefusal, OperationRefusals } from "./refusal.js";
9
9
  type ForkBindAdmission = Readonly<{
10
10
  kind: "document";
@@ -36,7 +36,7 @@ export declare function prepareMarkdownBind(input: Readonly<{
36
36
  after: readonly ContractId[];
37
37
  workspace: "worktree";
38
38
  targetSelection: BindTargetSelection;
39
- task?: TaskId;
39
+ debt?: DebtId;
40
40
  progress?: ProtocolProgress;
41
41
  actor?: ActorId;
42
42
  }>): Promise<{
@@ -78,7 +78,7 @@ export declare function prepareMarkdownBind(input: Readonly<{
78
78
  kind: "fork-source-missing" | "fork-source-unavailable";
79
79
  contractId: ContractId;
80
80
  }>;
81
- taskId: TaskId;
81
+ debtId: DebtId;
82
82
  diagnostic: string;
83
83
  }>) | null;
84
84
  result: IntentOutcome<Readonly<{
@@ -7,7 +7,7 @@ import { mintIdentitySegment } from "../identity/mint.js";
7
7
  import { fitIdentityStemWords, normalizeIdentityStem } from "../identity/normalize.js";
8
8
  import { bindOperation } from "../protocol/bind.js";
9
9
  import { stateOperation } from "../protocol/operations.js";
10
- import { admitWithTaskHolderFence, claimTaskHolder } from "../settlement/holder.js";
10
+ import { admitWithDebtHolderFence, claimDebtHolder } from "../settlement/holder.js";
11
11
  import { KeiyakuError } from "./outcome.js";
12
12
  import { contractTerms, documentDerivation } from "./input.js";
13
13
  const CONTRACT_ID_CODE_POINTS = 32;
@@ -34,10 +34,10 @@ async function attempt(input, id) {
34
34
  ...(input.coordinates === undefined ? {} : { coordinates: input.coordinates }),
35
35
  ...(input.source === undefined ? {} : { source: input.source }),
36
36
  contractId: id,
37
- ...(input.task === undefined
37
+ ...(input.debt === undefined
38
38
  ? {}
39
39
  : {
40
- decorateOffer: ({ contractId: owner }) => [claimTaskHolder(input.task, owner)],
40
+ decorateOffer: ({ contractId: owner }) => [claimDebtHolder(input.debt, owner)],
41
41
  }),
42
42
  ...(input.actor === undefined ? {} : { actor: input.actor }),
43
43
  ...(input.progress === undefined ? {} : { progress: input.progress }),
@@ -130,10 +130,10 @@ export async function prepareMarkdownBind(input) {
130
130
  verification: documentDerivation(input.document, terms.gates).verification,
131
131
  workspace: input.workspace,
132
132
  targetSelection: input.targetSelection,
133
- ...(input.task === undefined ? {} : { task: input.task }),
133
+ ...(input.debt === undefined ? {} : { debt: input.debt }),
134
134
  ...(input.actor === undefined ? {} : { actor: input.actor }),
135
135
  ...(input.progress === undefined ? {} : { progress: input.progress }),
136
136
  });
137
- const admission = input.task === undefined ? null : await admitWithTaskHolderFence(input.scope, input.task, admitCandidate);
137
+ const admission = input.debt === undefined ? null : await admitWithDebtHolderFence(input.scope, input.debt, admitCandidate);
138
138
  return { admission, result: admission === null ? await admitCandidate() : admission.result };
139
139
  }
@@ -9,7 +9,7 @@ import { readManagedWorktreeAppointment } from "../workspace-place.js";
9
9
  import { admitForkBindWithAppointment, prepareMarkdownBind } from "./bind.js";
10
10
  import { acceptedOutcome, expected, retainAdmission } from "./contract-outcomes.js";
11
11
  import { captureLocalContractComposition, derivedGates, derivedHooks, gateNames, } from "./contract-settings.js";
12
- import { actorOption, normalizedList, requireInput, requireMarkdown, taskOption } from "./input.js";
12
+ import { actorOption, normalizedList, requireInput, requireMarkdown, debtOption } from "./input.js";
13
13
  import { InvocationAccumulator } from "./invocation.js";
14
14
  import { project, validated } from "./outcome.js";
15
15
  import { reconcileAffectedContracts } from "./reconcile.js";
@@ -26,7 +26,7 @@ function bindInput(input, composition) {
26
26
  const values = requireInput(input, "Keiyaku.bind input");
27
27
  const forkOf = values.forkOf;
28
28
  const allowed = forkOf === undefined
29
- ? ["repo", "markdown", "task", "target", "workspace", "actor", "after", "gates"]
29
+ ? ["repo", "markdown", "debt", "target", "workspace", "actor", "after", "gates"]
30
30
  : ["repo", "forkOf", "target", "workspace", "actor"];
31
31
  requireInput(input, "Keiyaku.bind input", allowed);
32
32
  if ((values.workspace ?? "worktree") !== "worktree")
@@ -46,7 +46,7 @@ function bindInput(input, composition) {
46
46
  document,
47
47
  actor,
48
48
  target: values.target,
49
- task: forkOf === undefined ? taskOption(values.task) : undefined,
49
+ debt: forkOf === undefined ? debtOption(values.debt) : undefined,
50
50
  gates: derived,
51
51
  after: forkOf === undefined ? normalizedList(values.after, "after", contractId) : undefined,
52
52
  };
@@ -143,7 +143,7 @@ async function bindComplete(accumulator, id, scope, channel, leading, hooks, val
143
143
  }
144
144
  // eslint-disable-next-line max-params -- Keep this local operation's custody, admission, and policy witnesses explicit.
145
145
  async function markdownBind(prepared, document, hooks, scope, channel, accumulator, handle) {
146
- const { task, target, actor, gates, after } = prepared;
146
+ const { debt, target, actor, gates, after } = prepared;
147
147
  if (gates === undefined || after === undefined)
148
148
  throw new Error("Markdown bind requires prepared terms");
149
149
  const targetSelection = bindTargetSelection(target);
@@ -156,7 +156,7 @@ async function markdownBind(prepared, document, hooks, scope, channel, accumulat
156
156
  after,
157
157
  workspace: "worktree",
158
158
  targetSelection,
159
- ...(task === undefined ? {} : { task }),
159
+ ...(debt === undefined ? {} : { debt }),
160
160
  ...actor,
161
161
  });
162
162
  const leading = admission.admission === null ? admission.result : admission.admission.result;
@@ -16,7 +16,7 @@ import { admitDeliveryOperation } from "../protocol/deliver.js";
16
16
  import { withScopeAbortSignal, } from "../protocol/operations.js";
17
17
  import { executionStop, isOperationalFailure, isOperationalStop, } from "../protocol/progress.js";
18
18
  import { admitReviewOperation } from "../protocol/review.js";
19
- import { releaseTaskHolder, releaseTaskHolderWithFence, taskHolderObservationSelection } from "../settlement/holder.js";
19
+ import { releaseDebtHolder, releaseDebtHolderWithFence, debtHolderObservationSelection } from "../settlement/holder.js";
20
20
  import { continueDeliveredDependents } from "./continuation.js";
21
21
  import { requestForwardedContractLive } from "./contract-operations.js";
22
22
  import { acceptedOutcome, expected, retainAdmission } from "./contract-outcomes.js";
@@ -245,16 +245,16 @@ export class ContractExecution {
245
245
  });
246
246
  const hooks = derivedHooks(this.composition);
247
247
  return await this.local("abandon", async (accumulator, channel, scope) => {
248
- const admission = (await releaseTaskHolderWithFence(scope, channel, this.id, () => abandonOperation({
248
+ const admission = (await releaseDebtHolderWithFence(scope, channel, this.id, () => abandonOperation({
249
249
  scope,
250
250
  channel,
251
251
  contractId: this.id,
252
252
  ...actor,
253
253
  ...(note === undefined ? {} : { note }),
254
- observationSelection: taskHolderObservationSelection(),
254
+ observationSelection: debtHolderObservationSelection(),
255
255
  progress: accumulator,
256
256
  decorateOffer: async ({ observation, contractId: owner }) => {
257
- const companion = await releaseTaskHolder(channel, observation, owner);
257
+ const companion = await releaseDebtHolder(channel, observation, owner);
258
258
  return companion === null ? [] : [companion];
259
259
  },
260
260
  }))).result;
@@ -2,7 +2,7 @@ import type { AttestationData, ContractId, JournalEntry, SnapshotId } from "../c
2
2
  import type { Dispatch } from "../dispatch/index.js";
3
3
  import type { ContractBoard, ContractRow } from "../protocol/read/status.js";
4
4
  import type { Settings } from "../settings.js";
5
- import type { TaskId } from "../task/identity.js";
5
+ import type { DebtId } from "../debt/identity.js";
6
6
  import type { Repo } from "./repo.js";
7
7
  /** Public gate words remain ordinary strings; private policy interprets them. */
8
8
  export type Gate = string;
@@ -25,7 +25,7 @@ export type ContractHistory = Readonly<{
25
25
  type MarkdownBindInput = Readonly<{
26
26
  repo: Repo;
27
27
  markdown: string;
28
- task?: TaskId;
28
+ debt?: DebtId;
29
29
  /** A literal target branch; `null` is deliberately targetless; omitted is the Repo worktree's current branch. */
30
30
  target?: string | null;
31
31
  workspace?: "worktree";
@@ -1,13 +1,13 @@
1
1
  import type { DecodedContractDocument } from "../body/types.js";
2
2
  import { type ActorId, type ContractId, type ContractTerms, type Gate } from "../core/facts/types.js";
3
- import { type TaskId } from "../task/identity.js";
3
+ import { type DebtId } from "../debt/identity.js";
4
4
  import type { DocumentDerivation } from "../protocol/operations.js";
5
5
  export declare function actorOption(actor: unknown): Readonly<{
6
6
  actor?: ActorId;
7
7
  }>;
8
8
  export declare function requireMarkdown(value: unknown, label?: string): string;
9
9
  export declare function requireInput(value: unknown, label: string, allowed?: readonly string[]): Record<string, unknown>;
10
- export declare function taskOption(value: unknown): TaskId | undefined;
10
+ export declare function debtOption(value: unknown): DebtId | undefined;
11
11
  export declare function optionalNonblank(value: unknown, label: string): string | undefined;
12
12
  export declare function optionalBoolean(value: unknown, label: string): boolean | undefined;
13
13
  export declare function optionalSignal(value: unknown): AbortSignal | undefined;