@astrosheep/keiyaku 4.6.7 → 4.6.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -16
- package/build/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/build/plugins/claude/skills/keiyaku/SKILL.md +5 -6
- package/build/plugins/claude/skills/keiyaku-akuma/SKILL.md +1 -1
- package/build/plugins/claude/skills/keiyaku-akuma/references/automation.md +8 -8
- package/build/plugins/claude/skills/keiyaku-babysit/SKILL.md +1 -1
- package/build/plugins/claude/skills/keiyaku-bind/SKILL.md +9 -9
- package/build/plugins/claude/skills/keiyaku-debt/SKILL.md +91 -0
- package/build/plugins/claude/skills/keiyaku-workflow/SKILL.md +2 -2
- package/build/plugins/codex/.codex-plugin/plugin.json +1 -1
- package/build/plugins/codex/skills/keiyaku/SKILL.md +5 -6
- package/build/plugins/codex/skills/keiyaku-akuma/SKILL.md +1 -1
- package/build/plugins/codex/skills/keiyaku-akuma/references/automation.md +8 -8
- package/build/plugins/codex/skills/keiyaku-babysit/SKILL.md +1 -1
- package/build/plugins/codex/skills/keiyaku-bind/SKILL.md +9 -9
- package/build/plugins/codex/skills/keiyaku-debt/SKILL.md +91 -0
- package/build/plugins/codex/skills/keiyaku-workflow/SKILL.md +2 -2
- package/build/plugins/opencode/index.js +1 -1
- package/build/plugins/opencode/skills/keiyaku/SKILL.md +5 -6
- package/build/plugins/opencode/skills/keiyaku-akuma/SKILL.md +1 -1
- package/build/plugins/opencode/skills/keiyaku-akuma/references/automation.md +8 -8
- package/build/plugins/opencode/skills/keiyaku-babysit/SKILL.md +1 -1
- package/build/plugins/opencode/skills/keiyaku-bind/SKILL.md +9 -9
- package/build/plugins/opencode/skills/keiyaku-debt/SKILL.md +91 -0
- package/build/plugins/opencode/skills/keiyaku-workflow/SKILL.md +2 -2
- package/build/plugins/pi/keiyaku.ts +0 -5
- package/build/skills/keiyaku/SKILL.md +5 -6
- package/build/skills/keiyaku-akuma/SKILL.md +1 -1
- package/build/skills/keiyaku-akuma/references/automation.md +8 -8
- package/build/skills/keiyaku-babysit/SKILL.md +1 -1
- package/build/skills/keiyaku-bind/SKILL.md +9 -9
- package/build/skills/keiyaku-debt/SKILL.md +91 -0
- package/build/skills/keiyaku-workflow/SKILL.md +2 -2
- package/build/src/akuma/akuma-call.d.ts +2 -0
- package/build/src/akuma/akuma-call.js +8 -2
- package/build/src/akuma/akuma-instance.d.ts +14 -1
- package/build/src/akuma/akuma-instance.js +37 -7
- package/build/src/akuma/akuma-observe.d.ts +33 -8
- package/build/src/akuma/akuma-observe.js +89 -63
- package/build/src/akuma/akuma-owner.d.ts +14 -2
- package/build/src/akuma/akuma-owner.js +49 -35
- package/build/src/akuma/akuma-selection-execution.js +9 -1
- package/build/src/akuma/akuma-stream.d.ts +22 -0
- package/build/src/akuma/akuma-stream.js +116 -0
- package/build/src/akuma/akuma-wait.d.ts +1 -40
- package/build/src/akuma/akuma-wait.js +23 -84
- package/build/src/akuma/akuma.d.ts +52 -16
- package/build/src/akuma/akuma.js +10 -10
- package/build/src/akuma/allowed.d.ts +7 -12
- package/build/src/akuma/allowed.js +13 -4
- package/build/src/akuma/archetype.d.ts +7 -15
- package/build/src/akuma/archetype.js +36 -35
- package/build/src/akuma/body-supervisor.d.ts +5 -5
- package/build/src/akuma/body-supervisor.js +22 -20
- package/build/src/akuma/body.d.ts +5 -3
- package/build/src/akuma/body.js +57 -8
- package/build/src/akuma/call-request.d.ts +30 -32
- package/build/src/akuma/call-request.js +10 -3
- package/build/src/akuma/caller.d.ts +39 -0
- package/build/src/akuma/caller.js +36 -0
- package/build/src/akuma/dispatch-association.d.ts +0 -1
- package/build/src/akuma/dispatch-association.js +0 -3
- package/build/src/akuma/heart/activity-schema.d.ts +12 -0
- package/build/src/akuma/heart/activity-schema.js +6 -0
- package/build/src/akuma/heart/facts.d.ts +16 -12
- package/build/src/akuma/heart/facts.js +8 -0
- package/build/src/akuma/heart/index.d.ts +61 -9
- package/build/src/akuma/heart/index.js +89 -24
- package/build/src/akuma/heart/rows.d.ts +3 -3
- package/build/src/akuma/heart/rows.js +5 -3
- package/build/src/akuma/heart/soul.d.ts +10 -1
- package/build/src/akuma/heart/soul.js +34 -24
- package/build/src/akuma/heart/storage.d.ts +20 -0
- package/build/src/akuma/heart/storage.js +62 -3
- package/build/src/akuma/heart/timeline.d.ts +7 -0
- package/build/src/akuma/heart/timeline.js +10 -0
- package/build/src/akuma/identity.d.ts +0 -1
- package/build/src/akuma/identity.js +2 -5
- package/build/src/akuma/index.d.ts +6 -2
- package/build/src/akuma/index.js +1 -0
- package/build/src/akuma/nuke.js +6 -28
- package/build/src/akuma/projection.d.ts +25 -11
- package/build/src/akuma/projection.js +24 -7
- package/build/src/akuma/provider-recipe.d.ts +18 -6
- package/build/src/akuma/provider-recipe.js +24 -1
- package/build/src/akuma/provider.d.ts +31 -10
- package/build/src/akuma/provider.js +105 -14
- package/build/src/akuma/providers/acp/events.js +29 -19
- package/build/src/akuma/providers/acp/index.js +2 -3
- package/build/src/akuma/providers/claude/events.js +110 -69
- package/build/src/akuma/providers/claude/index.d.ts +2 -2
- package/build/src/akuma/providers/claude/index.js +4 -8
- package/build/src/akuma/providers/codex-app-server/events.js +17 -2
- package/build/src/akuma/providers/codex-app-server/index.js +17 -11
- package/build/src/akuma/providers/decode.d.ts +33 -0
- package/build/src/akuma/providers/decode.js +65 -0
- package/build/src/akuma/providers/execution-environment.d.ts +2 -1
- package/build/src/akuma/providers/execution-environment.js +3 -0
- package/build/src/akuma/providers/grok-build/index.js +16 -48
- package/build/src/akuma/providers/index.js +2 -0
- package/build/src/akuma/providers/lifecycle.d.ts +9 -0
- package/build/src/akuma/providers/lifecycle.js +10 -0
- package/build/src/akuma/providers/opencode-sdk/event-stream.d.ts +3 -3
- package/build/src/akuma/providers/opencode-sdk/event-stream.js +2 -25
- package/build/src/akuma/providers/opencode-sdk/events.d.ts +7 -43
- package/build/src/akuma/providers/opencode-sdk/events.js +146 -296
- package/build/src/akuma/providers/opencode-sdk/index.js +270 -431
- package/build/src/akuma/providers/opencode-sdk/native-http.d.ts +9 -0
- package/build/src/akuma/providers/opencode-sdk/native-http.js +69 -0
- package/build/src/akuma/providers/opencode-sdk/session.d.ts +42 -36
- package/build/src/akuma/providers/opencode-sdk/session.js +75 -84
- package/build/src/akuma/providers/paseo/events.d.ts +33 -0
- package/build/src/akuma/providers/paseo/events.js +204 -0
- package/build/src/akuma/providers/paseo/index.d.ts +9 -0
- package/build/src/akuma/providers/paseo/index.js +357 -0
- package/build/src/akuma/providers/pi/events.d.ts +2 -0
- package/build/src/akuma/providers/pi/events.js +36 -38
- package/build/src/akuma/providers/pi/index.js +21 -35
- package/build/src/akuma/publication.d.ts +2 -0
- package/build/src/akuma/publication.js +5 -0
- package/build/src/akuma/request-lifecycle.d.ts +4 -2
- package/build/src/akuma/request-lifecycle.js +27 -12
- package/build/src/akuma/request-rendezvous.js +38 -55
- package/build/src/akuma/request-serve.d.ts +1 -1
- package/build/src/akuma/request-serve.js +77 -113
- package/build/src/akuma/requests.d.ts +3 -1
- package/build/src/akuma/requests.js +32 -0
- package/build/src/akuma/selection-observation.d.ts +129 -53
- package/build/src/akuma/selection-observation.js +3 -9
- package/build/src/akuma/turn-drive.d.ts +3 -0
- package/build/src/akuma/turn-drive.js +28 -10
- package/build/src/akuma-body.js +12 -22
- package/build/src/cli/akuma-caller.d.ts +3 -0
- package/build/src/cli/akuma-caller.js +31 -0
- package/build/src/cli/commands/akuma-grammar.js +10 -16
- package/build/src/cli/commands/akuma.js +25 -55
- package/build/src/cli/commands/contract-grammar.d.ts +9 -7
- package/build/src/cli/commands/contract-grammar.js +40 -47
- package/build/src/cli/commands/contract-help.d.ts +17 -7
- package/build/src/cli/commands/contract-help.js +50 -11
- package/build/src/cli/commands/contract.js +34 -63
- package/build/src/cli/commands/debt-grammar.d.ts +19 -0
- package/build/src/cli/commands/debt-grammar.js +323 -0
- package/build/src/cli/commands/debt-query.d.ts +5 -0
- package/build/src/cli/commands/{task-query.js → debt-query.js} +9 -9
- package/build/src/cli/commands/{task.d.ts → debt.d.ts} +2 -2
- package/build/src/cli/commands/{task.js → debt.js} +87 -164
- package/build/src/cli/coordinates.d.ts +1 -1
- package/build/src/cli/coordinates.js +1 -1
- package/build/src/cli/parse.d.ts +5 -5
- package/build/src/cli/parse.js +17 -16
- package/build/src/cli/render/akuma-activity.d.ts +11 -83
- package/build/src/cli/render/akuma-activity.js +20 -382
- package/build/src/cli/render/catalog.d.ts +4 -7
- package/build/src/cli/render/catalog.js +5 -5
- package/build/src/cli/render/contract-history.js +3 -6
- package/build/src/cli/render/contract.js +17 -52
- package/build/src/cli/render/debt.d.ts +28 -0
- package/build/src/cli/render/{task.js → debt.js} +55 -133
- package/build/src/cli/render/kanshi.js +28 -28
- package/build/src/cli/render/marks.d.ts +5 -5
- package/build/src/cli/render/marks.js +4 -10
- package/build/src/cli/render/nuke.js +1 -1
- package/build/src/cli/render/receipt.js +3 -10
- package/build/src/cli/runtime.d.ts +1 -1
- package/build/src/cli/runtime.js +14 -20
- package/build/src/cli/scan.d.ts +1 -1
- package/build/src/cli/selectors.d.ts +3 -6
- package/build/src/cli/selectors.js +22 -53
- package/build/src/cli/usage.d.ts +1 -1
- package/build/src/cli/usage.js +4 -4
- package/build/src/contract-worktree.js +3 -3
- package/build/src/debt/board.d.ts +160 -0
- package/build/src/{task → debt}/board.js +89 -89
- package/build/src/debt/catalog.d.ts +11 -0
- package/build/src/debt/catalog.js +59 -0
- package/build/src/{task → debt}/context.d.ts +1 -1
- package/build/src/{task → debt}/context.js +1 -1
- package/build/src/{task → debt}/created-observation.d.ts +6 -10
- package/build/src/{task → debt}/created-observation.js +7 -7
- package/build/src/debt/document.d.ts +37 -0
- package/build/src/{task → debt}/document.js +37 -37
- package/build/src/debt/identity.d.ts +21 -0
- package/build/src/{task → debt}/identity.js +35 -35
- package/build/src/debt/index.d.ts +111 -0
- package/build/src/debt/index.js +203 -0
- package/build/src/{task → debt}/input.d.ts +8 -8
- package/build/src/{task → debt}/input.js +21 -21
- package/build/src/debt/lifecycle-operations.d.ts +6 -0
- package/build/src/{task → debt}/lifecycle-operations.js +27 -31
- package/build/src/debt/mutation-result.d.ts +981 -0
- package/build/src/debt/mutation-result.js +109 -0
- package/build/src/debt/mutation.d.ts +424 -0
- package/build/src/debt/mutation.js +223 -0
- package/build/src/debt/operation-types.d.ts +71 -0
- package/build/src/debt/operations.d.ts +28 -0
- package/build/src/{task → debt}/operations.js +59 -60
- package/build/src/debt/query.d.ts +76 -0
- package/build/src/{task → debt}/query.js +55 -55
- package/build/src/{task → debt}/store.d.ts +13 -13
- package/build/src/{task → debt}/store.js +58 -49
- package/build/src/debt/view.d.ts +4 -0
- package/build/src/debt/view.js +7 -0
- package/build/src/dispatch/index.d.ts +3 -3
- package/build/src/dispatch/index.js +1 -2
- package/build/src/git/observe.d.ts +6 -2
- package/build/src/git/observe.js +6 -2
- package/build/src/identity/coordinates.d.ts +1 -1
- package/build/src/index.d.ts +17 -17
- package/build/src/index.js +11 -11
- package/build/src/kanshi/index.d.ts +2 -2
- package/build/src/kanshi/read.js +54 -39
- package/build/src/kanshi/report.d.ts +7 -7
- package/build/src/kanshi/select.js +4 -4
- package/build/src/library/address.js +2 -4
- package/build/src/library/akuma-creation.d.ts +5 -1
- package/build/src/library/akuma-creation.js +27 -47
- package/build/src/library/akumas.d.ts +7 -7
- package/build/src/library/akumas.js +13 -9
- package/build/src/library/bind.d.ts +17 -17
- package/build/src/library/bind.js +16 -12
- package/build/src/library/contract-address.d.ts +9 -0
- package/build/src/library/contract-address.js +71 -0
- package/build/src/library/contract-composition.d.ts +4 -7
- package/build/src/library/contract-composition.js +6 -18
- package/build/src/library/contract-creation.d.ts +3 -5
- package/build/src/library/contract-creation.js +24 -22
- package/build/src/library/contract-execution.js +21 -26
- package/build/src/library/contract-outcomes.d.ts +2 -14
- package/build/src/library/contract-outcomes.js +2 -13
- package/build/src/library/contract-types.d.ts +38 -4
- package/build/src/library/delivery.d.ts +0 -2
- package/build/src/library/delivery.js +2 -5
- package/build/src/library/input.d.ts +2 -2
- package/build/src/library/input.js +5 -5
- package/build/src/library/invocation.js +2 -2
- package/build/src/library/keiyaku.d.ts +0 -5
- package/build/src/library/keiyaku.js +6 -12
- package/build/src/library/nuke.js +3 -3
- package/build/src/library/outcome.d.ts +626 -625
- package/build/src/library/outcome.js +13 -3
- package/build/src/library/reconcile.js +8 -16
- package/build/src/library/refusal.d.ts +2 -2
- package/build/src/library/repo.d.ts +3 -2
- package/build/src/library/repo.js +10 -5
- package/build/src/library/selection.d.ts +5 -8
- package/build/src/library/selection.js +22 -73
- package/build/src/plugin/akuma-signals.d.ts +2 -0
- package/build/src/plugin/akuma-signals.js +4 -0
- package/build/src/plugin/public.d.ts +32 -2
- package/build/src/plugin/runtime.js +5 -3
- package/build/src/protocol/amend.js +3 -2
- package/build/src/protocol/attempt.js +3 -8
- package/build/src/protocol/bind.d.ts +2 -2
- package/build/src/protocol/bind.js +1 -1
- package/build/src/protocol/deliver.js +3 -3
- package/build/src/protocol/operations.d.ts +1 -3
- package/build/src/protocol/operations.js +0 -8
- package/build/src/protocol/outcome.d.ts +1 -2
- package/build/src/protocol/outcome.js +1 -13
- package/build/src/protocol/placement.js +3 -10
- package/build/src/protocol/read/status.js +31 -70
- package/build/src/protocol/reintegrate.js +3 -10
- package/build/src/protocol/review.js +3 -3
- package/build/src/protocol/run.d.ts +5 -1
- package/build/src/protocol/run.js +3 -3
- package/build/src/runtime/proc/windows-launch.exe +0 -0
- package/build/src/settlement/fence.d.ts +3 -3
- package/build/src/settlement/fence.js +4 -4
- package/build/src/settlement/holder.d.ts +16 -16
- package/build/src/settlement/holder.js +69 -63
- package/build/src/settlement/settle.d.ts +5 -5
- package/build/src/settlement/settle.js +53 -53
- package/package.json +19 -9
- package/plugins/paseo/plugin/index.server.ts +17 -0
- package/plugins/paseo/plugin/paseo-plugin.json +4 -0
- package/plugins/paseo/plugin/server/attach.ts +52 -0
- package/plugins/paseo/plugin/server/keiyaku.ts +44 -0
- package/plugins/paseo/plugin/server/message.ts +60 -0
- package/plugins/paseo/plugin/server/mirror.ts +193 -0
- package/plugins/paseo/plugin/server/model.ts +14 -0
- package/plugins/paseo/plugin/server/provider.ts +276 -0
- package/plugins/paseo/plugin/server/sdk-worker.ts +237 -0
- package/plugins/paseo/plugin/server/sdk.ts +289 -0
- package/plugins/paseo/plugin/server/stop.ts +26 -0
- package/plugins/paseo/plugin/server/transport.ts +35 -0
- package/plugins/paseo/plugin/shared/attach-rpc.ts +10 -0
- package/plugins/paseo/plugin/shared/refresh-rpc.ts +6 -0
- package/plugins/paseo/plugin/tsconfig.json +6 -0
- package/plugins/pi/keiyaku.ts +57 -0
- package/skills/keiyaku/SKILL.md +43 -0
- package/skills/keiyaku-akuma/SKILL.md +130 -0
- package/skills/keiyaku-akuma/references/automation.md +269 -0
- package/skills/keiyaku-babysit/SKILL.md +65 -0
- package/skills/keiyaku-bind/SKILL.md +216 -0
- package/skills/keiyaku-bind/agents/openai.yaml +4 -0
- package/skills/keiyaku-debt/SKILL.md +91 -0
- package/skills/keiyaku-workflow/SKILL.md +129 -0
- package/build/plugins/claude/skills/keiyaku-task/SKILL.md +0 -104
- package/build/plugins/codex/skills/keiyaku-task/SKILL.md +0 -104
- package/build/plugins/opencode/skills/keiyaku-task/SKILL.md +0 -104
- package/build/skills/keiyaku-task/SKILL.md +0 -104
- package/build/src/cli/commands/amend.d.ts +0 -12
- package/build/src/cli/commands/amend.js +0 -10
- package/build/src/cli/commands/bind.d.ts +0 -11
- package/build/src/cli/commands/bind.js +0 -23
- package/build/src/cli/commands/task-grammar.d.ts +0 -19
- package/build/src/cli/commands/task-grammar.js +0 -384
- package/build/src/cli/commands/task-query.d.ts +0 -5
- package/build/src/cli/render/task.d.ts +0 -41
- package/build/src/dispatch/association.d.ts +0 -1
- package/build/src/dispatch/association.js +0 -1
- package/build/src/task/board.d.ts +0 -168
- package/build/src/task/catalog.d.ts +0 -11
- package/build/src/task/catalog.js +0 -59
- package/build/src/task/compose-language.d.ts +0 -57
- package/build/src/task/compose-language.js +0 -364
- package/build/src/task/compose-parser.d.ts +0 -32
- package/build/src/task/compose-parser.js +0 -180
- package/build/src/task/compose.d.ts +0 -16
- package/build/src/task/compose.js +0 -189
- package/build/src/task/document.d.ts +0 -39
- package/build/src/task/identity.d.ts +0 -21
- package/build/src/task/index.d.ts +0 -138
- package/build/src/task/index.js +0 -269
- package/build/src/task/lifecycle-operations.d.ts +0 -6
- package/build/src/task/mutation-result.d.ts +0 -1726
- package/build/src/task/mutation-result.js +0 -198
- package/build/src/task/mutation.d.ts +0 -590
- package/build/src/task/mutation.js +0 -262
- package/build/src/task/operation-types.d.ts +0 -71
- package/build/src/task/operations.d.ts +0 -28
- package/build/src/task/query.d.ts +0 -76
- package/build/src/task/view.d.ts +0 -4
- package/build/src/task/view.js +0 -7
- /package/build/src/{task → debt}/operation-types.js +0 -0
|
@@ -5,16 +5,23 @@ export const CONTRACT_COMMAND_SPECS = {
|
|
|
5
5
|
stdin: "optional",
|
|
6
6
|
flags: {
|
|
7
7
|
actor: "value",
|
|
8
|
-
|
|
8
|
+
debt: "value",
|
|
9
9
|
target: "value",
|
|
10
|
+
"no-target": "boolean",
|
|
10
11
|
after: "repeat",
|
|
11
12
|
gates: "raw-value",
|
|
12
13
|
"fork-of": "value",
|
|
13
14
|
json: "boolean",
|
|
14
15
|
},
|
|
15
|
-
usage: "bind [--
|
|
16
|
+
usage: "bind [--debt <debt/...>] [--target <ref> | --no-target] [--after <kei/...> ...] [--gates <name,...>] [--actor <actor>] - | bind --fork-of <kei/...> [--target <ref> | --no-target] [--actor <actor>]",
|
|
16
17
|
purpose: "Create a Contract from stdin Markdown or copy an existing Contract as a starting point.",
|
|
17
18
|
details: [
|
|
19
|
+
"--target names one existing local branch literally; it is never created and never",
|
|
20
|
+
"guessed. Omitting it binds to the current branch of the invocation worktree",
|
|
21
|
+
"coordinate, or binds without a target on a detached committed HEAD. --no-target",
|
|
22
|
+
"binds without a target on purpose, and is refused together with --target.",
|
|
23
|
+
"A fork copies its source target when neither flag is given.",
|
|
24
|
+
"",
|
|
18
25
|
"Gates are acceptance obligations checked at placement: reviewed awaits a",
|
|
19
26
|
"satisfied review, verified awaits a passing Verification run.",
|
|
20
27
|
"",
|
|
@@ -140,11 +147,24 @@ export const CONTRACT_COMMAND_SPECS = {
|
|
|
140
147
|
usage: "abandon [<contract>|@<contract>] [--note <text>] [--actor <actor>]",
|
|
141
148
|
purpose: "End work on a Contract without delivering it; optionally record why.",
|
|
142
149
|
},
|
|
150
|
+
show: {
|
|
151
|
+
positional: "optional",
|
|
152
|
+
stdin: "none",
|
|
153
|
+
flags: { json: "boolean" },
|
|
154
|
+
usage: "show [<contract>|@<contract>]",
|
|
155
|
+
purpose: "Read one Contract's guidance.",
|
|
156
|
+
details: [
|
|
157
|
+
"Accepts a complete Contract identity or exact @<contract> short selector.",
|
|
158
|
+
"Omitted selection uses the exact managed worktree's installed Contract context.",
|
|
159
|
+
"Akuma, category, and plural selections are refused before reading guidance.",
|
|
160
|
+
"Text returns guidance directly; --json serializes the same native value.",
|
|
161
|
+
].join("\n"),
|
|
162
|
+
},
|
|
143
163
|
status: {
|
|
144
164
|
positional: "optional",
|
|
145
165
|
stdin: "none",
|
|
146
|
-
flags: {
|
|
147
|
-
usage: "status [<contract>|@name|<aku/...>]...\nstatus (aku|aku/|aku/*) [--limit <count>]\nstatus (kei|kei/|kei/*) [--limit <count>]
|
|
166
|
+
flags: { limit: "value", json: "boolean" },
|
|
167
|
+
usage: "status [<contract>|@name|<aku/...>]...\nstatus (aku|aku/|aku/*) [--limit <count>]\nstatus (kei|kei/|kei/*) [--limit <count>]",
|
|
148
168
|
purpose: "Show the world overview or selected Contract and Akuma status.",
|
|
149
169
|
details: [
|
|
150
170
|
"Akuma entries show the directory each Akuma was started in.",
|
|
@@ -152,18 +172,14 @@ export const CONTRACT_COMMAND_SPECS = {
|
|
|
152
172
|
"aku, aku/, and aku/* show the recent Akuma board; kei, kei/, and kei/* show the",
|
|
153
173
|
"recent active Contract board. --limit bounds the board to that many recent rows",
|
|
154
174
|
"(default 10). The Contract category requires a Repo; the Akuma category does not.",
|
|
155
|
-
"",
|
|
156
|
-
"--guidance reads one Contract's guidance instead of status. It accepts one Contract",
|
|
157
|
-
"selector or the installed Contract selection context, and refuses an Akuma, plural,",
|
|
158
|
-
"or world selection before the read.",
|
|
159
175
|
].join("\n"),
|
|
160
176
|
},
|
|
161
177
|
ls: {
|
|
162
178
|
positional: "optional",
|
|
163
179
|
stdin: "none",
|
|
164
180
|
flags: { limit: "value", json: "boolean" },
|
|
165
|
-
usage: 'ls
|
|
166
|
-
purpose: "List
|
|
181
|
+
usage: 'ls debt[/] [--limit <count>]\nls kei[/] [--limit <count>]\nls aku[/] [--limit <count>]\nls aku/<name>[/] [--limit <count>]\nls "aku/<name>/*" [--limit <count>]\nls "aku/*/*" [--limit <count>]',
|
|
182
|
+
purpose: "List debts (ls debt), contracts (ls kei), or akumas (ls aku).",
|
|
167
183
|
details: [
|
|
168
184
|
"ls kei lists active Contracts; accepted and abandoned ones leave the list, and their record stays in history and Git.",
|
|
169
185
|
"ls aku/ lists the callable Akuma-name catalog; ls aku/<name> lists the living Akumas under one name.",
|
|
@@ -198,7 +214,7 @@ export const CONTRACT_COMMAND_SPECS = {
|
|
|
198
214
|
flags: { confirm: "value", json: "boolean" },
|
|
199
215
|
usage: "nuke [--confirm <world-directory>]",
|
|
200
216
|
purpose: "Remove Keiyaku-owned data from this World.",
|
|
201
|
-
details: "Stops Akumas and removes this World's
|
|
217
|
+
details: "Stops Akumas and removes this World's Debts and Keiyaku-created worktrees and Git references. --confirm must exactly match this World's directory; source files are not deleted.",
|
|
202
218
|
},
|
|
203
219
|
settings: {
|
|
204
220
|
positional: "none",
|
|
@@ -245,6 +261,29 @@ export function renderContractHelp(command) {
|
|
|
245
261
|
"effort, network, allowed, systemPromptMode, and description; the body is",
|
|
246
262
|
"an optional system prompt.",
|
|
247
263
|
"",
|
|
264
|
+
"Local Paseo provider in settings.json:",
|
|
265
|
+
' { "providers": { "paseo": {',
|
|
266
|
+
' "kind": "paseo",',
|
|
267
|
+
' "config": { "url": "ws://127.0.0.1:6767/ws", "provider": "claude" }',
|
|
268
|
+
" } } }",
|
|
269
|
+
"The native provider id is bare (claude, codex, pi), not provider/model.",
|
|
270
|
+
"Example .keiyaku/akuma/paseo-worker.md frontmatter:",
|
|
271
|
+
" ---",
|
|
272
|
+
" provider: paseo",
|
|
273
|
+
" model: <native-model-id>",
|
|
274
|
+
" effort: high",
|
|
275
|
+
" ---",
|
|
276
|
+
"Model and effort must be offered by the selected native provider;",
|
|
277
|
+
"effort names its native thinking option id.",
|
|
278
|
+
'PASEO_PASSWORD=<password> keiyaku call paseo-worker "<prompt>"',
|
|
279
|
+
"Paseo must already be running locally. Resume keeps its live native",
|
|
280
|
+
"runtime; after Paseo native reload/restart create a fresh Akuma.",
|
|
281
|
+
"Observed busy agents refuse; native steer still has a check/send race.",
|
|
282
|
+
"Explicit control cancels native current execution session-wide and may",
|
|
283
|
+
"affect concurrent human work. Normal completion only retires the client",
|
|
284
|
+
"and its sockets; it never cancels later work or closes the native runtime.",
|
|
285
|
+
"Socket closure does not prove native cancellation succeeded.",
|
|
286
|
+
"",
|
|
248
287
|
usageLine(spec.usage),
|
|
249
288
|
].join("\n");
|
|
250
289
|
}
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { listArchetypeDefinitions } from "../../akuma/archetype.js";
|
|
2
1
|
import { executionChannel } from "../../akuma/requests.js";
|
|
3
|
-
import { Akumas, Keiyaku, KeiyakuError, nuke } from "../../index.js";
|
|
4
|
-
import { kanshi,
|
|
2
|
+
import { Akumas, Keiyaku, KeiyakuError, kanshiCategory, listArchetypeDefinitions, nuke } from "../../index.js";
|
|
3
|
+
import { kanshi, observeKanshi, selectRegion } from "../../kanshi/index.js";
|
|
5
4
|
import { resolveNamedAddress } from "../../library/address.js";
|
|
6
5
|
import { composeContractLibrary, observeKeiyaku } from "../../library/contract-composition.js";
|
|
7
6
|
import { validateArcMarkdown, validateContractMarkdown } from "../../library/input.js";
|
|
8
7
|
import { createKeiyakuHandle } from "../../library/keiyaku.js";
|
|
9
8
|
import { SettingsError, settings } from "../../settings.js";
|
|
10
|
-
import {
|
|
9
|
+
import { Debts } from "../../debt/index.js";
|
|
11
10
|
import { actorFromEdge } from "../actor.js";
|
|
12
11
|
import { resolveInvocationCwd } from "../coordinates.js";
|
|
13
12
|
import { BindDraftError, preserveBindDraft } from "../draft.js";
|
|
14
13
|
import { snapshotText } from "../render/akuma-activity.js";
|
|
15
|
-
import { renderAkumaCatalogue, renderArchetypeCatalogue, renderContractCatalogue,
|
|
14
|
+
import { renderAkumaCatalogue, renderArchetypeCatalogue, renderContractCatalogue, renderDebtCatalogue, } from "../render/catalog.js";
|
|
16
15
|
import { renderAccepted, renderContractHistory, renderRetry } from "../render/contract.js";
|
|
17
16
|
import { renderKanshiCategoryText, renderKanshiText } from "../render/kanshi.js";
|
|
18
17
|
import { nukeExitCode, renderNukeText } from "../render/nuke.js";
|
|
@@ -20,11 +19,9 @@ import { reconcileHasFailure, renderReconcile } from "../render/reconcile.js";
|
|
|
20
19
|
import { renderConflictMaterialized, renderRefusal } from "../render/refusal.js";
|
|
21
20
|
import { renderRegionText } from "../render/region.js";
|
|
22
21
|
import { renderSettingsText, settingsJsonValue } from "../render/settings.js";
|
|
23
|
-
import { canonicalContractSelector, contractFromInput, resolveContractId
|
|
24
|
-
import { displayContext, emit, writeJson, writeStdout } from "../streams.js";
|
|
22
|
+
import { canonicalContractSelector, contractFromInput, resolveContractId } from "../selectors.js";
|
|
23
|
+
import { displayContext, emit, writeJson, writeStderr, writeStdout } from "../streams.js";
|
|
25
24
|
import { CliUsageError, isBlankInput } from "../usage.js";
|
|
26
|
-
import { amendFromCommand } from "./amend.js";
|
|
27
|
-
import { bindFromCommand } from "./bind.js";
|
|
28
25
|
function requiredRepo(coordinates) {
|
|
29
26
|
if (coordinates.repo === undefined)
|
|
30
27
|
throw new CliUsageError("this command requires a resolved Repo");
|
|
@@ -50,17 +47,6 @@ async function contractSettings(command, execution, world, home) {
|
|
|
50
47
|
function draftWarning(error) {
|
|
51
48
|
return { warning: `bind draft could not be preserved: ${error instanceof Error ? error.message : String(error)}` };
|
|
52
49
|
}
|
|
53
|
-
/** Preserve a refused bind draft at the invocation cwd; coordinates are not yet available. */
|
|
54
|
-
async function bindDraftReceiptAtCwd(input, markdown) {
|
|
55
|
-
try {
|
|
56
|
-
return await preserveBindDraft(await resolveInvocationCwd(input), markdown);
|
|
57
|
-
}
|
|
58
|
-
catch (error) {
|
|
59
|
-
if (error instanceof Error && "executionReceipt" in error)
|
|
60
|
-
throw error;
|
|
61
|
-
return draftWarning(error);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
50
|
/**
|
|
65
51
|
* The one bind-document admission that runs before coordinate resolution, so a malformed document
|
|
66
52
|
* refuses as a draft-bearing refusal instead of a later Repo/Git failure. Reads the memoized stdin.
|
|
@@ -76,7 +62,7 @@ export async function admitBindMarkdown(input) {
|
|
|
76
62
|
throw error;
|
|
77
63
|
if (!(error instanceof TypeError) && !(error instanceof KeiyakuError && error.category === "invalid-input"))
|
|
78
64
|
throw error;
|
|
79
|
-
throw new BindDraftError(error, await
|
|
65
|
+
throw new BindDraftError(error, await bindDraftReceipt(() => resolveInvocationCwd(input), input.markdown));
|
|
80
66
|
}
|
|
81
67
|
}
|
|
82
68
|
async function bindDraftReceipt(world, markdown) {
|
|
@@ -145,41 +131,32 @@ async function contractLibrary(command, execution, configuration, runtime) {
|
|
|
145
131
|
return composeContractLibrary(execution, createKeiyakuHandle, {
|
|
146
132
|
...(configuration === undefined ? {} : { settings: configuration }),
|
|
147
133
|
...(actor === undefined ? {} : { actor }),
|
|
148
|
-
}
|
|
149
|
-
// The CLI owns this default: an omitted Markdown --target names the invocation branch.
|
|
150
|
-
{ kind: "current-branch" });
|
|
134
|
+
});
|
|
151
135
|
}
|
|
152
136
|
async function runBind(command, input, library) {
|
|
153
137
|
const { coordinates, runtime } = input;
|
|
154
138
|
const repo = requiredRepo(coordinates);
|
|
155
139
|
const actor = actorFromEdge(command.actor, runtime.environment);
|
|
156
140
|
if (command.forkOf !== undefined) {
|
|
157
|
-
const answer = await
|
|
158
|
-
command,
|
|
141
|
+
const answer = await library.bind({
|
|
159
142
|
repo,
|
|
160
|
-
|
|
143
|
+
forkOf: contractFromInput(repo, command.forkOf).id,
|
|
144
|
+
...(command.target === undefined ? {} : { target: command.target }),
|
|
161
145
|
...(actor === undefined ? {} : { actor }),
|
|
162
146
|
});
|
|
163
147
|
return await finishContractAnswer(answer, command.output);
|
|
164
148
|
}
|
|
165
149
|
const markdown = await runtime.readStdin();
|
|
166
|
-
if (isBlankInput(markdown))
|
|
167
|
-
throw new CliUsageError("bind requires a nonblank stdin document");
|
|
168
150
|
try {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
catch (error) {
|
|
172
|
-
if (!(error instanceof TypeError) && !(error instanceof KeiyakuError && error.category === "invalid-input"))
|
|
173
|
-
throw error;
|
|
174
|
-
throw new BindDraftError(error, await bindDraftReceipt(coordinates.establishWorld, markdown));
|
|
175
|
-
}
|
|
176
|
-
try {
|
|
177
|
-
const answer = await bindFromCommand({
|
|
178
|
-
command,
|
|
151
|
+
const after = command.after?.map((id) => contractFromInput(repo, id).id);
|
|
152
|
+
const answer = await library.bind({
|
|
179
153
|
repo,
|
|
180
|
-
library,
|
|
181
154
|
markdown,
|
|
155
|
+
...(command.debt === undefined ? {} : { debt: command.debt }),
|
|
156
|
+
...(command.target === undefined ? {} : { target: command.target }),
|
|
182
157
|
...(actor === undefined ? {} : { actor }),
|
|
158
|
+
...(after === undefined ? {} : { after }),
|
|
159
|
+
...(command.gates === undefined ? {} : { gates: command.gates }),
|
|
183
160
|
});
|
|
184
161
|
if (answer.kind !== "refused")
|
|
185
162
|
return await finishContractAnswer(answer, command.output);
|
|
@@ -203,13 +180,13 @@ async function runAmend(command, input, seat) {
|
|
|
203
180
|
const markdown = command.stdin === true ? await runtime.readStdin() : undefined;
|
|
204
181
|
if (markdown !== undefined && isBlankInput(markdown))
|
|
205
182
|
throw new CliUsageError("amend requires a nonblank stdin document");
|
|
206
|
-
const
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
contract: seat.contract,
|
|
183
|
+
const repo = requiredRepo(coordinates);
|
|
184
|
+
const after = command.clearAfter === true ? [] : command.after?.map((id) => contractFromInput(repo, id).id);
|
|
185
|
+
const answer = await seat.contract.amend({
|
|
210
186
|
...(markdown === undefined ? {} : { markdown }),
|
|
211
|
-
...(command.gates === undefined ? {} : { gates: command.gates }),
|
|
212
187
|
...(seat.actor === undefined ? {} : { actor: seat.actor }),
|
|
188
|
+
...(after === undefined ? {} : { after }),
|
|
189
|
+
...(command.gates === undefined ? {} : { gates: command.gates }),
|
|
213
190
|
});
|
|
214
191
|
return await finishContractAnswer(answer, command.output);
|
|
215
192
|
}
|
|
@@ -347,15 +324,15 @@ async function runLs(command, coordinates, home) {
|
|
|
347
324
|
}
|
|
348
325
|
if (coordinates.world === null)
|
|
349
326
|
throw new CliUsageError("no Keiyaku world contains the invocation cwd");
|
|
350
|
-
if (query.kind === "
|
|
351
|
-
const listed = await
|
|
327
|
+
if (query.kind === "debts") {
|
|
328
|
+
const listed = await Debts.of(coordinates.world).list({
|
|
352
329
|
selection: "all",
|
|
353
330
|
namespace: query.namespace ?? [],
|
|
354
331
|
...(query.limit === undefined ? {} : { limit: query.limit }),
|
|
355
332
|
});
|
|
356
333
|
if (listed.kind !== "accepted")
|
|
357
|
-
throw new Error("
|
|
358
|
-
return emit(command.output, listed, () =>
|
|
334
|
+
throw new Error("Debt list did not return an accepted observation");
|
|
335
|
+
return emit(command.output, listed, () => renderDebtCatalogue(listed.value, query.namespace ?? []), 0);
|
|
359
336
|
}
|
|
360
337
|
const listed = await Akumas.of(coordinates.world).list({
|
|
361
338
|
...(query.archetype === undefined ? {} : { archetype: query.archetype }),
|
|
@@ -366,7 +343,7 @@ async function runLs(command, coordinates, home) {
|
|
|
366
343
|
async function readAkumaStatus(akuma, alias, coordinates) {
|
|
367
344
|
if (coordinates.world === null)
|
|
368
345
|
throw new CliUsageError("no Keiyaku world contains the Akuma selector");
|
|
369
|
-
const status = await Akumas.of(coordinates.world).status({
|
|
346
|
+
const status = await Akumas.of(coordinates.world, { reportDiagnostic: writeStderr }).status({
|
|
370
347
|
akuma,
|
|
371
348
|
...(coordinates.repo === undefined ? {} : { repo: coordinates.repo }),
|
|
372
349
|
});
|
|
@@ -398,14 +375,14 @@ async function namedStatus(selector, coordinates, named) {
|
|
|
398
375
|
return await readAkumaStatus(address.id, selector, coordinates);
|
|
399
376
|
return await readContractStatus(address.id, coordinates, named);
|
|
400
377
|
}
|
|
401
|
-
async function
|
|
378
|
+
async function runShow(command, coordinates) {
|
|
402
379
|
const repo = coordinates.repo;
|
|
403
380
|
if (repo === undefined)
|
|
404
381
|
throw new CliUsageError("cannot select a contract while the Contract world is absent");
|
|
405
382
|
const selected = await selectedContract(repo, command.contract, coordinates.cwd);
|
|
406
383
|
const guidance = await selected.contract.guidance();
|
|
407
384
|
if (guidance === null) {
|
|
408
|
-
const refusal = statusRefusal(
|
|
385
|
+
const refusal = statusRefusal(command.command, selected.id);
|
|
409
386
|
return emit(command.output, null, () => renderRefusal(refusal, undefined, displayContext()), 1);
|
|
410
387
|
}
|
|
411
388
|
return emit(command.output, guidance, () => guidance, 0);
|
|
@@ -473,17 +450,9 @@ async function runStatusIdentity(command, coordinates) {
|
|
|
473
450
|
}
|
|
474
451
|
return emit(command.output, report, () => renderKanshiText(report, displayContext(), "contract"), 0);
|
|
475
452
|
}
|
|
476
|
-
|
|
477
|
-
world: coordinates.world,
|
|
478
|
-
...(coordinates.repo === undefined ? {} : { repo: coordinates.repo }),
|
|
479
|
-
});
|
|
480
|
-
const contract = resolveKanshiContract(report, command.contract);
|
|
481
|
-
const selected = selectKanshi({ report, contract });
|
|
482
|
-
return emit(command.output, selected, () => renderKanshiText(selected, displayContext(), "contract"), 0);
|
|
453
|
+
throw new CliUsageError(`contract selector must use kei/: ${command.contract}`);
|
|
483
454
|
}
|
|
484
455
|
async function runStatus(command, coordinates) {
|
|
485
|
-
if (command.guidance === true)
|
|
486
|
-
return await runStatusGuidance(command, coordinates);
|
|
487
456
|
if (command.category !== undefined)
|
|
488
457
|
return await runStatusCategory(command, coordinates);
|
|
489
458
|
if ("selectors" in command && command.selectors !== undefined)
|
|
@@ -501,10 +470,10 @@ async function runRegion(command, coordinates) {
|
|
|
501
470
|
const report = await kanshi({ world: coordinates.world, repo, region: { kind: "path", patterns: command.paths } });
|
|
502
471
|
return emitSection(report.region ?? { kind: "absent" });
|
|
503
472
|
}
|
|
473
|
+
const contract = command.contract === undefined ? undefined : await resolveContractId(repo, command.contract, coordinates.cwd);
|
|
504
474
|
const report = await kanshi({ world: coordinates.world, repo, region: { kind: "declarations" } });
|
|
505
|
-
if (
|
|
475
|
+
if (contract === undefined)
|
|
506
476
|
return emitSection(report.region ?? { kind: "absent" });
|
|
507
|
-
const contract = resolveKanshiContract(report, command.contract);
|
|
508
477
|
const observed = await observeKeiyaku({ repo, id: contract });
|
|
509
478
|
if (observed.kind === "missing" || observed.row.phase === "claimed" || observed.row.phase === "abandoned") {
|
|
510
479
|
const refusal = {
|
|
@@ -579,6 +548,8 @@ export async function runContractCommand(command, coordinates, runtime) {
|
|
|
579
548
|
return await runNuke(command, coordinates);
|
|
580
549
|
case "ls":
|
|
581
550
|
return await runLs(command, coordinates, home);
|
|
551
|
+
case "show":
|
|
552
|
+
return await runShow(command, coordinates);
|
|
582
553
|
case "status":
|
|
583
554
|
return await runStatus(command, coordinates);
|
|
584
555
|
case "region":
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type CliUsageGuide } from "../usage.js";
|
|
2
|
+
import { type DebtQueryExpression } from "./debt-query.js";
|
|
3
|
+
export type DebtAction = "add" | "show" | "ls" | "ready" | "blocked" | "tree" | "doctor" | "update" | "query" | "done" | "drop" | "context";
|
|
4
|
+
type DebtFlagValue = string | true | readonly string[];
|
|
5
|
+
type DebtStdin = "document" | "body" | "append" | "note";
|
|
6
|
+
export type ParsedDebtCommand = Readonly<{
|
|
7
|
+
command: "debt";
|
|
8
|
+
action: DebtAction;
|
|
9
|
+
output: "text" | "json";
|
|
10
|
+
positionals: readonly string[];
|
|
11
|
+
flags: Readonly<Record<string, DebtFlagValue>>;
|
|
12
|
+
stdin?: DebtStdin;
|
|
13
|
+
where?: DebtQueryExpression;
|
|
14
|
+
}>;
|
|
15
|
+
export declare function isDebtAction(value: string | undefined): value is DebtAction;
|
|
16
|
+
export declare function renderDebtHelp(action?: DebtAction): string;
|
|
17
|
+
export declare function debtUsageGuide(action: DebtAction): CliUsageGuide;
|
|
18
|
+
export declare function parseDebtCommand(argv: readonly string[]): ParsedDebtCommand;
|
|
19
|
+
export {};
|