@astrosheep/keiyaku 4.6.30 → 4.6.32
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 +39 -22
- package/build/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/build/plugins/claude/skills/keiyaku/SKILL.md +12 -12
- package/build/plugins/claude/skills/keiyaku-akuma/SKILL.md +27 -22
- package/build/plugins/claude/skills/keiyaku-akuma/references/automation.md +14 -14
- package/build/plugins/claude/skills/keiyaku-babysit/SKILL.md +15 -13
- package/build/plugins/claude/skills/keiyaku-bind/SKILL.md +18 -17
- package/build/plugins/claude/skills/keiyaku-debt/SKILL.md +30 -30
- package/build/plugins/claude/skills/keiyaku-workflow/SKILL.md +24 -23
- package/build/plugins/codex/.codex-plugin/plugin.json +1 -1
- package/build/plugins/codex/skills/keiyaku/SKILL.md +12 -12
- package/build/plugins/codex/skills/keiyaku-akuma/SKILL.md +27 -22
- package/build/plugins/codex/skills/keiyaku-akuma/references/automation.md +14 -14
- package/build/plugins/codex/skills/keiyaku-babysit/SKILL.md +15 -13
- package/build/plugins/codex/skills/keiyaku-bind/SKILL.md +18 -17
- package/build/plugins/codex/skills/keiyaku-debt/SKILL.md +30 -30
- package/build/plugins/codex/skills/keiyaku-workflow/SKILL.md +24 -23
- package/build/plugins/opencode/package.json +1 -1
- package/build/plugins/opencode/skills/keiyaku/SKILL.md +12 -12
- package/build/plugins/opencode/skills/keiyaku-akuma/SKILL.md +27 -22
- package/build/plugins/opencode/skills/keiyaku-akuma/references/automation.md +14 -14
- package/build/plugins/opencode/skills/keiyaku-babysit/SKILL.md +15 -13
- package/build/plugins/opencode/skills/keiyaku-bind/SKILL.md +18 -17
- package/build/plugins/opencode/skills/keiyaku-debt/SKILL.md +30 -30
- package/build/plugins/opencode/skills/keiyaku-workflow/SKILL.md +24 -23
- package/build/plugins/pi/README.md +20 -22
- package/build/plugins/pi/akuma-tools.ts +43 -56
- package/build/plugins/pi/keiyaku.ts +15 -4
- package/build/skills/keiyaku/SKILL.md +12 -12
- package/build/skills/keiyaku-akuma/SKILL.md +27 -22
- package/build/skills/keiyaku-akuma/references/automation.md +14 -14
- package/build/skills/keiyaku-babysit/SKILL.md +15 -13
- package/build/skills/keiyaku-bind/SKILL.md +18 -17
- package/build/skills/keiyaku-debt/SKILL.md +30 -30
- package/build/skills/keiyaku-workflow/SKILL.md +24 -23
- package/build/src/akuma/akuma-call.d.ts +4 -6
- package/build/src/akuma/akuma-call.js +12 -15
- package/build/src/akuma/akuma-errors.d.ts +12 -9
- package/build/src/akuma/akuma-errors.js +16 -12
- package/build/src/akuma/akuma-instance.d.ts +102 -23
- package/build/src/akuma/akuma-instance.js +66 -66
- package/build/src/akuma/akuma-observe.d.ts +15 -15
- package/build/src/akuma/akuma-observe.js +34 -32
- package/build/src/akuma/akuma-owner.d.ts +46 -17
- package/build/src/akuma/akuma-owner.js +68 -43
- package/build/src/akuma/akuma-probe.d.ts +3 -3
- package/build/src/akuma/akuma-probe.js +2 -2
- package/build/src/akuma/akuma-selection-execution.d.ts +992 -5
- package/build/src/akuma/akuma-selection-execution.js +96 -125
- package/build/src/akuma/akuma-stream.d.ts +2 -2
- package/build/src/akuma/akuma-stream.js +1 -1
- package/build/src/akuma/akuma-wait.d.ts +7 -7
- package/build/src/akuma/akuma-wait.js +52 -14
- package/build/src/akuma/akuma.d.ts +88 -451
- package/build/src/akuma/akuma.js +58 -56
- package/build/src/akuma/archetype.d.ts +31 -21
- package/build/src/akuma/archetype.js +67 -52
- package/build/src/akuma/body-launch.d.ts +2 -2
- package/build/src/akuma/body.js +35 -30
- package/build/src/akuma/call-initial-tell.d.ts +63 -44
- package/build/src/akuma/call-initial-tell.js +50 -3
- package/build/src/akuma/call-input.d.ts +8 -1
- package/build/src/akuma/call-input.js +27 -18
- package/build/src/akuma/caller.d.ts +26 -17
- package/build/src/akuma/caller.js +24 -10
- package/build/src/akuma/coordinate.d.ts +9 -0
- package/build/src/akuma/coordinate.js +13 -0
- package/build/src/akuma/detached-body.js +3 -3
- package/build/src/akuma/dispatch-association.d.ts +4 -4
- package/build/src/akuma/dispatch-association.js +12 -3
- package/build/src/akuma/execution-instructions.js +2 -2
- package/build/src/akuma/heart/facts.d.ts +32 -9
- package/build/src/akuma/heart/facts.js +18 -5
- package/build/src/akuma/heart/index.d.ts +0 -3
- package/build/src/akuma/heart/index.js +3 -6
- package/build/src/akuma/heart/rows.js +2 -2
- package/build/src/akuma/heart/soul.js +25 -9
- package/build/src/akuma/identity.d.ts +18 -17
- package/build/src/akuma/identity.js +29 -23
- package/build/src/akuma/index.d.ts +7 -9
- package/build/src/akuma/index.js +2 -3
- package/build/src/akuma/lineage-cache.d.ts +4 -4
- package/build/src/akuma/lineage-cache.js +10 -10
- package/build/src/akuma/projection-read.d.ts +2 -5
- package/build/src/akuma/projection-read.js +34 -47
- package/build/src/akuma/projection.d.ts +662 -569
- package/build/src/akuma/projection.js +203 -94
- package/build/src/akuma/provider-recipe.js +3 -2
- package/build/src/akuma/providers/acp/config.js +11 -10
- package/build/src/akuma/providers/acp/index.js +3 -2
- package/build/src/akuma/providers/codex-app-server/index.js +7 -1
- package/build/src/akuma/providers/execution-environment.d.ts +1 -3
- package/build/src/akuma/providers/execution-environment.js +0 -4
- package/build/src/akuma/providers/grok-build/index.js +2 -1
- package/build/src/akuma/providers/index.d.ts +0 -1
- package/build/src/akuma/providers/index.js +0 -8
- package/build/src/akuma/providers/paseo/index.js +7 -4
- package/build/src/akuma/providers/pi/index.js +4 -3
- package/build/src/akuma/publication.d.ts +3 -4
- package/build/src/akuma/publication.js +19 -17
- package/build/src/akuma/retention.js +2 -2
- package/build/src/akuma/schema.d.ts +3 -49
- package/build/src/akuma/schema.js +6 -147
- package/build/src/akuma/selection-observation.d.ts +559 -54
- package/build/src/akuma/selection-observation.js +207 -1
- package/build/src/akuma/status-projection.d.ts +52 -0
- package/build/src/akuma/status-projection.js +194 -0
- package/build/src/akuma/turn-drive.js +0 -3
- package/build/src/alias/index.d.ts +9 -4
- package/build/src/alias/index.js +11 -9
- package/build/src/body/amend.js +2 -1
- package/build/src/body/arc.js +3 -2
- package/build/src/body/criteria.js +4 -3
- package/build/src/body/decode.js +2 -1
- package/build/src/body/envelope.js +2 -1
- package/build/src/body/region.d.ts +1 -3
- package/build/src/body/region.js +3 -8
- package/build/src/body-host.d.ts +4 -11
- package/build/src/body-host.js +5 -4
- package/build/src/bounded-list.d.ts +8 -0
- package/build/src/bounded-list.js +11 -1
- package/build/src/cli/commands/akuma-grammar.d.ts +109 -66
- package/build/src/cli/commands/akuma-grammar.js +90 -110
- package/build/src/cli/commands/akuma.d.ts +8 -4
- package/build/src/cli/commands/akuma.js +92 -287
- package/build/src/cli/commands/contract-grammar.d.ts +3 -134
- package/build/src/cli/commands/contract-grammar.js +127 -203
- package/build/src/cli/commands/contract-help.d.ts +26 -21
- package/build/src/cli/commands/contract-help.js +45 -36
- package/build/src/cli/commands/contract.d.ts +6 -15
- package/build/src/cli/commands/contract.js +80 -518
- package/build/src/cli/commands/debt-grammar.d.ts +2 -4
- package/build/src/cli/commands/debt-grammar.js +22 -190
- package/build/src/cli/commands/debt.d.ts +2 -3
- package/build/src/cli/commands/debt.js +41 -334
- package/build/src/cli/commands/report.d.ts +2 -4
- package/build/src/cli/commands/report.js +11 -28
- package/build/src/cli/commands/whoami.d.ts +3 -43
- package/build/src/cli/commands/whoami.js +8 -121
- package/build/src/cli/coordinates.d.ts +3 -34
- package/build/src/cli/coordinates.js +13 -129
- package/build/src/cli/main.js +9 -3
- package/build/src/cli/parse.d.ts +78 -7
- package/build/src/cli/parse.js +49 -32
- package/build/src/cli/render/akuma-activity.d.ts +41 -31
- package/build/src/cli/render/akuma-activity.js +262 -349
- package/build/src/cli/render/akuma.d.ts +26 -27
- package/build/src/cli/render/akuma.js +99 -135
- package/build/src/cli/render/catalog.d.ts +3 -9
- package/build/src/cli/render/catalog.js +27 -105
- package/build/src/cli/render/contract-history.d.ts +3 -1
- package/build/src/cli/render/contract-history.js +139 -215
- package/build/src/cli/render/contract-observation.d.ts +36 -30
- package/build/src/cli/render/contract-observation.js +64 -34
- package/build/src/cli/render/contract-wait.js +6 -6
- package/build/src/cli/render/contract.d.ts +39 -6
- package/build/src/cli/render/contract.js +249 -374
- package/build/src/cli/render/debt.d.ts +7 -25
- package/build/src/cli/render/debt.js +74 -210
- package/build/src/cli/render/delivery-preview.d.ts +4 -3
- package/build/src/cli/render/delivery-preview.js +68 -96
- package/build/src/cli/render/kanshi-akuma.d.ts +8 -6
- package/build/src/cli/render/kanshi-akuma.js +77 -62
- package/build/src/cli/render/kanshi.d.ts +2 -4
- package/build/src/cli/render/kanshi.js +184 -223
- package/build/src/cli/render/marks.d.ts +11 -2
- package/build/src/cli/render/marks.js +13 -3
- package/build/src/cli/render/nuke.d.ts +3 -3
- package/build/src/cli/render/nuke.js +13 -16
- package/build/src/cli/render/receipt.d.ts +46 -43
- package/build/src/cli/render/receipt.js +318 -236
- package/build/src/cli/render/reconcile.d.ts +6 -4
- package/build/src/cli/render/reconcile.js +53 -137
- package/build/src/cli/render/refusal.d.ts +6 -4
- package/build/src/cli/render/refusal.js +82 -65
- package/build/src/cli/render/region.d.ts +11 -2
- package/build/src/cli/render/region.js +17 -23
- package/build/src/cli/render/settings.d.ts +1 -2
- package/build/src/cli/render/settings.js +8 -17
- package/build/src/cli/render/terminal.d.ts +11 -8
- package/build/src/cli/render/terminal.js +48 -32
- package/build/src/cli/render/verbs.d.ts +6 -0
- package/build/src/cli/render/verbs.js +270 -0
- package/build/src/cli/render/whoami.d.ts +1 -1
- package/build/src/cli/render/whoami.js +24 -31
- package/build/src/cli/runtime.d.ts +3 -11
- package/build/src/cli/runtime.js +119 -101
- package/build/src/cli/scan.d.ts +1 -1
- package/build/src/cli/streams.d.ts +2 -9
- package/build/src/cli/streams.js +9 -1
- package/build/src/cli/usage.d.ts +2 -1
- package/build/src/cli/usage.js +3 -2
- package/build/src/contract-guidance.js +2 -2
- package/build/src/contract-worktree.d.ts +2 -15
- package/build/src/contract-worktree.js +20 -44
- package/build/src/core/facts/codec.js +9 -23
- package/build/src/core/facts/errors.d.ts +2 -1
- package/build/src/core/facts/errors.js +3 -3
- package/build/src/core/facts/observation.d.ts +4 -5
- package/build/src/core/facts/observation.js +7 -9
- package/build/src/core/facts/types.d.ts +2 -13
- package/build/src/core/facts/types.js +1 -6
- package/build/src/core/verbs/abandon.d.ts +1 -2
- package/build/src/core/verbs/amend.d.ts +1 -3
- package/build/src/core/verbs/amend.js +3 -3
- package/build/src/core/verbs/arc.d.ts +1 -2
- package/build/src/core/verbs/attestation.d.ts +1 -2
- package/build/src/core/verbs/bind.d.ts +1 -3
- package/build/src/core/verbs/bind.js +5 -5
- package/build/src/core/verbs/deliver.d.ts +4 -4
- package/build/src/core/verbs/deliver.js +2 -2
- package/build/src/core/verbs/placement.d.ts +1 -7
- package/build/src/core/verbs/placement.js +4 -6
- package/build/src/core/verbs/reintegrate.d.ts +1 -3
- package/build/src/core/verbs/reintegrate.js +2 -2
- package/build/src/debt/board.d.ts +70 -134
- package/build/src/debt/board.js +99 -190
- package/build/src/debt/catalog.d.ts +4 -6
- package/build/src/debt/catalog.js +3 -40
- package/build/src/debt/document.d.ts +23 -21
- package/build/src/debt/document.js +32 -58
- package/build/src/debt/identity.d.ts +2 -14
- package/build/src/debt/identity.js +19 -49
- package/build/src/debt/index.d.ts +239 -54
- package/build/src/debt/index.js +85 -88
- package/build/src/debt/input.d.ts +21 -6
- package/build/src/debt/input.js +57 -169
- package/build/src/debt/lifecycle-operations.d.ts +1 -3
- package/build/src/debt/lifecycle-operations.js +6 -86
- package/build/src/debt/operation-types.d.ts +97 -79
- package/build/src/debt/operation-types.js +57 -1
- package/build/src/debt/operations.d.ts +11 -19
- package/build/src/debt/operations.js +70 -191
- package/build/src/debt/store.d.ts +4 -4
- package/build/src/debt/store.js +40 -95
- package/build/src/debt/view.d.ts +0 -3
- package/build/src/debt/view.js +0 -4
- package/build/src/dispatch/index.d.ts +22 -5
- package/build/src/dispatch/index.js +46 -37
- package/build/src/errors.d.ts +28 -0
- package/build/src/errors.js +26 -0
- package/build/src/git/admission.d.ts +2 -2
- package/build/src/git/admission.js +2 -1
- package/build/src/git/hooks.d.ts +15 -36
- package/build/src/git/hooks.js +45 -25
- package/build/src/git/integration.d.ts +6 -24
- package/build/src/git/integration.js +10 -16
- package/build/src/git/observe.d.ts +3 -0
- package/build/src/git/observe.js +19 -5
- package/build/src/git/private-state-seat.d.ts +2 -2
- package/build/src/git/private-state-seat.js +2 -1
- package/build/src/git/reconcile.d.ts +20 -95
- package/build/src/git/reconcile.js +37 -70
- package/build/src/git/repository.d.ts +2 -1
- package/build/src/git/repository.js +3 -3
- package/build/src/git/scratch.d.ts +3 -3
- package/build/src/git/scratch.js +4 -1
- package/build/src/git/target-placement.d.ts +27 -35
- package/build/src/git/target-placement.js +42 -27
- package/build/src/git/target.d.ts +4 -4
- package/build/src/git/target.js +2 -1
- package/build/src/git/tender.d.ts +8 -41
- package/build/src/git/tender.js +26 -66
- package/build/src/git/terminal-reconcile.js +15 -18
- package/build/src/git/terminal-seal.d.ts +2 -4
- package/build/src/git/terminal-seal.js +7 -33
- package/build/src/git/workspace.d.ts +65 -41
- package/build/src/git/workspace.js +45 -14
- package/build/src/identity/coordinates.d.ts +1 -1
- package/build/src/identity/coordinates.js +3 -2
- package/build/src/identity/normalize.js +2 -1
- package/build/src/identity/selector.d.ts +2 -0
- package/build/src/identity/selector.js +17 -6
- package/build/src/index.d.ts +37 -66
- package/build/src/index.js +10 -47
- package/build/src/kanshi/counts.d.ts +44 -15
- package/build/src/kanshi/counts.js +18 -15
- package/build/src/kanshi/index.d.ts +22 -7
- package/build/src/kanshi/index.js +30 -3
- package/build/src/kanshi/read.d.ts +309 -15
- package/build/src/kanshi/read.js +226 -535
- package/build/src/kanshi/report.d.ts +1225 -103
- package/build/src/kanshi/report.js +153 -1
- package/build/src/kanshi/select.d.ts +0 -8
- package/build/src/kanshi/select.js +20 -59
- package/build/src/library/address.d.ts +17 -17
- package/build/src/library/address.js +41 -34
- package/build/src/library/akuma-creation.d.ts +828 -91
- package/build/src/library/akuma-creation.js +292 -273
- package/build/src/library/akuma-retention.d.ts +2 -2
- package/build/src/library/akuma-retention.js +2 -2
- package/build/src/library/akumas.d.ts +33 -10
- package/build/src/library/akumas.js +109 -25
- package/build/src/library/bind.d.ts +32 -61
- package/build/src/library/bind.js +8 -12
- package/build/src/library/continuation.d.ts +133 -505
- package/build/src/library/continuation.js +37 -29
- package/build/src/library/contract-address.d.ts +8 -10
- package/build/src/library/contract-address.js +16 -23
- package/build/src/library/contract-composition.d.ts +18 -13
- package/build/src/library/contract-composition.js +62 -61
- package/build/src/library/contract-creation.d.ts +3 -2
- package/build/src/library/contract-creation.js +54 -49
- package/build/src/library/contract-outcomes.d.ts +2365 -43
- package/build/src/library/contract-outcomes.js +73 -16
- package/build/src/library/contract-settings.d.ts +3 -4
- package/build/src/library/contract-settings.js +21 -19
- package/build/src/library/contract-types.d.ts +227 -75
- package/build/src/library/contract-types.js +90 -1
- package/build/src/library/contract-wait.d.ts +75 -17
- package/build/src/library/contract-wait.js +61 -24
- package/build/src/library/delivery.d.ts +566 -37
- package/build/src/library/delivery.js +16 -28
- package/build/src/library/input.d.ts +31 -5
- package/build/src/library/input.js +40 -41
- package/build/src/library/invocation.d.ts +18 -12
- package/build/src/library/invocation.js +98 -96
- package/build/src/library/kei.d.ts +56 -0
- package/build/src/library/kei.js +696 -0
- package/build/src/{cli/delivery-identity.js → library/keiyaku-attribution.js} +1 -1
- package/build/src/library/keiyaku-classify.d.ts +11 -0
- package/build/src/library/keiyaku-classify.js +127 -0
- package/build/src/library/keiyaku-coordinates.d.ts +26 -0
- package/build/src/library/keiyaku-coordinates.js +83 -0
- package/build/src/library/keiyaku-debt.d.ts +70 -0
- package/build/src/library/keiyaku-debt.js +39 -0
- package/build/src/library/keiyaku-identity.d.ts +58 -0
- package/build/src/library/keiyaku-identity.js +177 -0
- package/build/src/library/keiyaku-verbs.d.ts +6893 -0
- package/build/src/library/keiyaku-verbs.js +496 -0
- package/build/src/library/keiyaku.d.ts +41 -38
- package/build/src/library/keiyaku.js +590 -127
- package/build/src/library/nuke.d.ts +25 -1
- package/build/src/library/nuke.js +9 -2
- package/build/src/library/outcome.d.ts +867 -736
- package/build/src/library/outcome.js +431 -211
- package/build/src/library/reconcile.d.ts +652 -116
- package/build/src/library/reconcile.js +146 -108
- package/build/src/library/refusal.d.ts +118 -590
- package/build/src/library/refusal.js +54 -51
- package/build/src/library/region.d.ts +5 -24
- package/build/src/library/region.js +6 -21
- package/build/src/library/repo.js +4 -3
- package/build/src/library/selection.d.ts +205 -45
- package/build/src/library/selection.js +139 -128
- package/build/src/mcp/adapter.d.ts +17 -0
- package/build/src/mcp/adapter.js +241 -0
- package/build/src/mcp/help.d.ts +1 -0
- package/build/src/mcp/help.js +31 -0
- package/build/src/mcp/index.d.ts +2 -0
- package/build/src/mcp/index.js +37 -0
- package/build/src/mcp/output.d.ts +385 -0
- package/build/src/mcp/output.js +193 -0
- package/build/src/plugin/public.d.ts +5 -1
- package/build/src/plugin/runtime.d.ts +1 -1
- package/build/src/plugin/runtime.js +19 -16
- package/build/src/protocol/amend.d.ts +1 -1
- package/build/src/protocol/amend.js +2 -2
- package/build/src/protocol/arc.d.ts +4 -1
- package/build/src/protocol/arc.js +7 -1
- package/build/src/protocol/attempt.d.ts +2 -3
- package/build/src/protocol/attempt.js +1 -10
- package/build/src/protocol/bind.d.ts +10 -13
- package/build/src/protocol/bind.js +12 -8
- package/build/src/protocol/completion.d.ts +412 -13
- package/build/src/protocol/completion.js +202 -28
- package/build/src/protocol/deliver.d.ts +35 -28
- package/build/src/protocol/deliver.js +52 -80
- package/build/src/protocol/delivery-preview.d.ts +102 -250
- package/build/src/protocol/delivery-preview.js +134 -130
- package/build/src/protocol/execution-observation.d.ts +136 -121
- package/build/src/protocol/execution-observation.js +9 -6
- package/build/src/protocol/intent.d.ts +14 -56
- package/build/src/protocol/intent.js +46 -73
- package/build/src/protocol/operations.d.ts +240 -543
- package/build/src/protocol/operations.js +89 -151
- package/build/src/protocol/outcome.d.ts +3 -1
- package/build/src/protocol/placement.d.ts +1 -3
- package/build/src/protocol/placement.js +6 -3
- package/build/src/protocol/progress.d.ts +8 -97
- package/build/src/protocol/progress.js +7 -55
- package/build/src/protocol/read/observation.d.ts +13 -6
- package/build/src/protocol/read/observation.js +10 -9
- package/build/src/protocol/read/status.d.ts +386 -98
- package/build/src/protocol/read/status.js +400 -139
- package/build/src/protocol/reconcile.d.ts +2 -0
- package/build/src/protocol/reconcile.js +12 -11
- package/build/src/protocol/reintegrate.d.ts +1 -3
- package/build/src/protocol/reintegrate.js +4 -5
- package/build/src/protocol/result-leaves.d.ts +507 -0
- package/build/src/protocol/result-leaves.js +156 -0
- package/build/src/protocol/result-reasons.d.ts +129 -0
- package/build/src/protocol/result-reasons.js +87 -0
- package/build/src/protocol/review.d.ts +14 -11
- package/build/src/protocol/review.js +30 -15
- package/build/src/protocol/run.d.ts +4 -4
- package/build/src/protocol/run.js +4 -1
- package/build/src/protocol/verify.d.ts +406 -31
- package/build/src/protocol/verify.js +137 -34
- package/build/src/region.d.ts +26 -0
- package/build/src/region.js +28 -0
- package/build/src/runtime/proc/diagnostic.d.ts +11 -0
- package/build/src/runtime/proc/diagnostic.js +20 -0
- package/build/src/runtime/proc/windows-launch.exe +0 -0
- package/build/src/settings.d.ts +133 -40
- package/build/src/settings.js +122 -46
- package/build/src/settlement/holder.js +2 -2
- package/build/src/settlement/settle.d.ts +29 -18
- package/build/src/settlement/settle.js +22 -19
- package/build/src/verification/declaration.d.ts +4 -9
- package/build/src/verification/declaration.js +5 -10
- package/build/src/verification/execution.d.ts +7 -19
- package/build/src/verification/execution.js +37 -16
- package/build/src/verification/observation.d.ts +11 -11
- package/build/src/verification/observation.js +9 -7
- package/build/src/world.d.ts +11 -2
- package/build/src/world.js +12 -6
- package/package.json +6 -5
- package/plugins/paseo/plugin/index.server.ts +1 -1
- package/plugins/paseo/plugin/server/attach.ts +74 -67
- package/plugins/paseo/plugin/server/keiyaku.ts +73 -40
- package/plugins/paseo/plugin/server/message.ts +9 -30
- package/plugins/paseo/plugin/server/mirror-identity.ts +6 -4
- package/plugins/paseo/plugin/server/mirror.ts +16 -20
- package/plugins/paseo/plugin/server/provider.ts +1 -1
- package/plugins/paseo/plugin/server/sdk.ts +12 -6
- package/plugins/paseo/plugin/server/transport.ts +24 -1
- package/plugins/pi/README.md +20 -22
- package/plugins/pi/akuma-tools.ts +43 -56
- package/plugins/pi/keiyaku.ts +15 -4
- package/skills/keiyaku/SKILL.md +12 -12
- package/skills/keiyaku-akuma/SKILL.md +27 -22
- package/skills/keiyaku-akuma/references/automation.md +14 -14
- package/skills/keiyaku-babysit/SKILL.md +15 -13
- package/skills/keiyaku-bind/SKILL.md +18 -17
- package/skills/keiyaku-debt/SKILL.md +30 -30
- package/skills/keiyaku-workflow/SKILL.md +24 -23
- package/build/src/akuma/providers/codex-app-server/configuration.d.ts +0 -5
- package/build/src/akuma/providers/codex-app-server/configuration.js +0 -72
- package/build/src/cli/actor.d.ts +0 -10
- package/build/src/cli/actor.js +0 -24
- package/build/src/cli/akuma-caller.d.ts +0 -3
- package/build/src/cli/akuma-caller.js +0 -31
- package/build/src/cli/commands/debt-query.d.ts +0 -5
- package/build/src/cli/commands/debt-query.js +0 -194
- package/build/src/cli/render/akuma-tool-command.d.ts +0 -6
- package/build/src/cli/render/akuma-tool-command.js +0 -143
- package/build/src/cli/render/akuma-tool.d.ts +0 -32
- package/build/src/cli/render/akuma-tool.js +0 -219
- package/build/src/cli/render/effects.d.ts +0 -26
- package/build/src/cli/render/effects.js +0 -41
- package/build/src/cli/selectors.d.ts +0 -10
- package/build/src/cli/selectors.js +0 -42
- package/build/src/debt/context.d.ts +0 -16
- package/build/src/debt/context.js +0 -91
- package/build/src/debt/created-observation.d.ts +0 -38
- package/build/src/debt/created-observation.js +0 -30
- package/build/src/debt/query.d.ts +0 -76
- package/build/src/debt/query.js +0 -292
- package/build/src/library/contract-execution.d.ts +0 -28
- package/build/src/library/contract-execution.js +0 -467
- package/build/src/markdown/diff.d.ts +0 -1
- package/build/src/markdown/diff.js +0 -4
- /package/build/src/{cli/delivery-identity.d.ts → library/keiyaku-attribution.d.ts} +0 -0
|
@@ -0,0 +1,496 @@
|
|
|
1
|
+
/** @architectureCompositionRoot */
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
export { classifyVerb } from "./keiyaku-classify.js";
|
|
4
|
+
import { durationSchema } from "../akuma/call-input.js";
|
|
5
|
+
import { parseDuration } from "../duration.js";
|
|
6
|
+
import { addDebtInputSchema, updateDebtInputSchema } from "../debt/input.js";
|
|
7
|
+
import { amendInputSchemas } from "./input.js";
|
|
8
|
+
import { askProgressSchema } from "../akuma/akuma-selection-execution.js";
|
|
9
|
+
import { akumaReportResultSchema } from "../akuma/akuma-instance.js";
|
|
10
|
+
import { akumaIdSchema } from "../akuma/identity.js";
|
|
11
|
+
import { contractIdSchema } from "../git/identity.js";
|
|
12
|
+
import { akumaNameCatalogSchema } from "../akuma/archetype.js";
|
|
13
|
+
import { akumaCatalogueSchema, akumaObservationSchema, akumaAskResultSchema, akumaAskNormalResultSchema, akumaKillResultSchema, akumaTellResultSchema, akumaWaitResultSchema, akumaWaitNormalResultSchema, } from "../akuma/selection-observation.js";
|
|
14
|
+
import { regionResultSchema, kanshiReportSchema, contractStatusSchema, contractNormalStatusSchema, } from "../kanshi/report.js";
|
|
15
|
+
import { settingsSchema } from "../settings.js";
|
|
16
|
+
import { contractCatalogueSchema } from "../protocol/read/status.js";
|
|
17
|
+
import { executionObservationSchema } from "../protocol/execution-observation.js";
|
|
18
|
+
import { spawnProgressSchema, spawnResultSchema, spawnNormalResultSchema, forkResultSchema, forkNormalResultSchema, } from "./akuma-creation.js";
|
|
19
|
+
import { bindOutcomeSchema, bindNormalOutcomeSchema, amendOutcomeSchema, arcOutcomeSchema, deliverOutcomeSchema, deliveryPreviewOutcomeSchema, verifyOutcomeSchema, verifyNormalOutcomeSchema, reviewOutcomeSchema, abandonOutcomeSchema, } from "./contract-outcomes.js";
|
|
20
|
+
import { contractHistorySchema } from "./contract-types.js";
|
|
21
|
+
import { guidanceSchema, guidanceNormalSchema } from "./kei.js";
|
|
22
|
+
import { contractWaitDurationSchema, contractWaitResultSchema, contractWaitNormalResultSchema, } from "./contract-wait.js";
|
|
23
|
+
import { reconcileResultSchema } from "./reconcile.js";
|
|
24
|
+
import { akumaHistoryResultSchema, historySelectionSchemas } from "./selection.js";
|
|
25
|
+
import { whoamiFactsSchema } from "./keiyaku-identity.js";
|
|
26
|
+
import { resetOutcomeSchema } from "./outcome.js";
|
|
27
|
+
import { debtAbsentSchema, debtShowResultSchema, debtShowNormalResultSchema, debtDoctorReportSchema, debtMutationResultSchema, debtMutationNormalResultSchema, debtCatalogueSchema, debtListSchema, debtUpdateResultSchema, } from "../debt/index.js";
|
|
28
|
+
import { debtIdSchema } from "../debt/identity.js";
|
|
29
|
+
const text = z.string();
|
|
30
|
+
const nonblank = text.regex(/\S/u, "Must not be blank");
|
|
31
|
+
const optText = text.exactOptional();
|
|
32
|
+
const optBool = z.boolean().exactOptional();
|
|
33
|
+
const strings = z.array(text).readonly();
|
|
34
|
+
const positive = z.number().int().positive();
|
|
35
|
+
const timeout = durationSchema.exactOptional();
|
|
36
|
+
const waitDuration = text.refine((value) => parseDuration(value).kind === "parsed", {
|
|
37
|
+
message: "wait requires an integer duration with unit ms, s, m, or h within the safe millisecond range",
|
|
38
|
+
});
|
|
39
|
+
const contract = {
|
|
40
|
+
contract: optText.describe("Target Contract selector (kei/...); omit to resolve from cwd when inside an appointed Contract worktree."),
|
|
41
|
+
};
|
|
42
|
+
const commonBind = {
|
|
43
|
+
target: text
|
|
44
|
+
.nullable()
|
|
45
|
+
.exactOptional()
|
|
46
|
+
.describe("Integration target: branch name, active kei/... to stack on, or null for a targetless Contract. Omit to target the current branch."),
|
|
47
|
+
};
|
|
48
|
+
const jsonDocument = z.record(z.string(), z.unknown()).readonly();
|
|
49
|
+
const contractSelector = text.startsWith("kei/");
|
|
50
|
+
const akumaSelector = text.regex(/^(?!kei\/)/u);
|
|
51
|
+
const debtSelection = z
|
|
52
|
+
.enum(["active", "closed", "all"])
|
|
53
|
+
.exactOptional()
|
|
54
|
+
.describe('Debt lifecycle filter (valid only with "debt"/"debt/"): "active" (open, default), "closed" (done or drop), or "all".');
|
|
55
|
+
const listBound = { limit: positive.exactOptional().describe("Maximum rows to return (positive integer).") };
|
|
56
|
+
const catalogueSelector = 'Catalogue path selector: "kei"/"kei/", "debt"/"debt/", "aku"/"aku/" (akumaName values), or "aku/*" / "aku/*/*" / "aku/<name>" / "aku/<name>/*" (instances).';
|
|
57
|
+
const lsInputSchema = z.union([
|
|
58
|
+
z.strictObject({ selector: text.regex(/^(?:kei|aku)\/?$/u).describe(catalogueSelector), ...listBound }).readonly(),
|
|
59
|
+
z
|
|
60
|
+
.strictObject({
|
|
61
|
+
selector: text.regex(/^debt\/?$/u).describe(catalogueSelector),
|
|
62
|
+
selection: debtSelection,
|
|
63
|
+
...listBound,
|
|
64
|
+
})
|
|
65
|
+
.readonly(),
|
|
66
|
+
z
|
|
67
|
+
.strictObject({
|
|
68
|
+
selector: text.regex(/^aku\/(?:\*(?:\/\*)?|[^/*]+(?:\/\*|\/)?)$/u).describe(catalogueSelector),
|
|
69
|
+
mine: optBool.describe("When true on an Akuma-instance selector, restrict to direct and transitive descendants of this server environment's caller identity."),
|
|
70
|
+
...listBound,
|
|
71
|
+
})
|
|
72
|
+
.readonly(),
|
|
73
|
+
]);
|
|
74
|
+
const spawnFields = {
|
|
75
|
+
akumaName: nonblank.describe('akumaName to spawn. Use ls {"selector":"aku/"} to list valid names, including when the selected name is not found. Always births a new instance; use tell or ask to continue an existing Akuma.'),
|
|
76
|
+
contract: optText.describe("Contract ID (kei/...) to record as Dispatch association for status/kanshi; does not set workdir or inject Contract text."),
|
|
77
|
+
workdir: optText.describe("Execution directory for the Akuma (relative paths resolve from cwd; defaults to cwd)."),
|
|
78
|
+
alias: optText.describe("World-local alias (with or without leading @) assigned to this Akuma, reassigning any previous holder."),
|
|
79
|
+
bare: optBool.describe("Omit Keiyaku runtime instructions for this Akuma's lifetime (required for generic ACP providers)."),
|
|
80
|
+
};
|
|
81
|
+
const tellFields = {
|
|
82
|
+
akuma: text.describe("Target Akuma selector (aku/<name>/<hex> or @alias)."),
|
|
83
|
+
prompt: nonblank.describe("Nonblank text instruction to admit."),
|
|
84
|
+
interrupt: optBool.describe("Request the currently running turn to yield before waking a successor turn for this prompt."),
|
|
85
|
+
};
|
|
86
|
+
export const verbs = Object.freeze({
|
|
87
|
+
bind: {
|
|
88
|
+
description: "Bind a Contract: one tracked delivery with fixed terms. Complete Markdown terms in (or forkOf to copy another's); a kei/... id and its own worktree out. target is where the work lands once accepted; gates is what must pass first. Runs no checks.",
|
|
89
|
+
input: z.union([
|
|
90
|
+
z
|
|
91
|
+
.strictObject({
|
|
92
|
+
markdown: text.describe("Complete Contract Markdown document (# Title, ## Context, ## Objective, ## Design, ## Region, ## Criteria, optional ## Verification). Mutually exclusive with forkOf."),
|
|
93
|
+
debt: debtIdSchema
|
|
94
|
+
.exactOptional()
|
|
95
|
+
.describe("Open Debt ID (debt/<slug>-<hex>) to associate as this Contract's held Debt."),
|
|
96
|
+
...commonBind,
|
|
97
|
+
after: strings
|
|
98
|
+
.exactOptional()
|
|
99
|
+
.describe("Logical prerequisite Contract IDs (kei/...) that must be accepted before placement completes."),
|
|
100
|
+
gates: strings
|
|
101
|
+
.exactOptional()
|
|
102
|
+
.describe('Acceptance gate names overriding default gates (for example ["reviewed", "verified"], or [] for ungated placement).'),
|
|
103
|
+
})
|
|
104
|
+
.readonly(),
|
|
105
|
+
z
|
|
106
|
+
.strictObject({
|
|
107
|
+
forkOf: text.describe("Existing Contract selector (kei/...) whose terms are copied into a new Contract. Mutually exclusive with markdown, debt, after, and gates."),
|
|
108
|
+
...commonBind,
|
|
109
|
+
})
|
|
110
|
+
.readonly(),
|
|
111
|
+
]),
|
|
112
|
+
output: bindOutcomeSchema,
|
|
113
|
+
normal: bindNormalOutcomeSchema,
|
|
114
|
+
effect: "write",
|
|
115
|
+
},
|
|
116
|
+
amend: {
|
|
117
|
+
description: "Rewrite an active Contract's terms, prerequisites (after), or gates. markdown is H2 edits such as ## Replace: Objective, not a new Contract. Returns only what changed.",
|
|
118
|
+
input: z.union(amendInputSchemas.map((branch) => branch.extend({
|
|
119
|
+
markdown: branch.shape.markdown.describe("Replacement Contract Markdown document or section-level amendment."),
|
|
120
|
+
after: branch.shape.after.describe("Replacement prerequisite Contract IDs (kei/...); pass [] to clear prerequisites."),
|
|
121
|
+
gates: branch.shape.gates.describe("Replacement acceptance gate names; pass [] to clear all gates."),
|
|
122
|
+
})
|
|
123
|
+
.extend(contract)
|
|
124
|
+
.readonly())),
|
|
125
|
+
output: amendOutcomeSchema,
|
|
126
|
+
effect: "write",
|
|
127
|
+
},
|
|
128
|
+
arc: {
|
|
129
|
+
description: "Open the next chapter of an active Contract: a # Title and optional notes telling its Akumas what is being done now. The terms stay as bound.",
|
|
130
|
+
input: z
|
|
131
|
+
.strictObject({
|
|
132
|
+
...contract,
|
|
133
|
+
markdown: text.describe("Arc Markdown body naming and scoping the current chapter."),
|
|
134
|
+
})
|
|
135
|
+
.readonly(),
|
|
136
|
+
output: arcOutcomeSchema,
|
|
137
|
+
effect: "write",
|
|
138
|
+
},
|
|
139
|
+
deliver: {
|
|
140
|
+
description: "Hand in the work from a Contract's worktree. It lands on the target once prerequisites are accepted and every gate passes (reviewed: a satisfied review; verified: passing verify results); until then it waits, delivered. Uncommitted changes need includeDirty. dryRun: true only looks. Runs no checks and records no review.",
|
|
141
|
+
input: z.union([
|
|
142
|
+
z
|
|
143
|
+
.strictObject({
|
|
144
|
+
...contract,
|
|
145
|
+
dryRun: z
|
|
146
|
+
.literal(true)
|
|
147
|
+
.describe("When true, read-only preview of candidate integration, standing gate evidence, and target followability without recording delivery or mutating refs."),
|
|
148
|
+
includeDirty: optBool.describe("Capture uncommitted worktree and untracked changes via a private index without altering the worktree's real Git index."),
|
|
149
|
+
showDiff: optBool.describe("Include the candidate patch diff in dryRun preview output (valid only with dryRun: true)."),
|
|
150
|
+
})
|
|
151
|
+
.readonly(),
|
|
152
|
+
z
|
|
153
|
+
.strictObject({
|
|
154
|
+
...contract,
|
|
155
|
+
dryRun: z
|
|
156
|
+
.literal(false)
|
|
157
|
+
.exactOptional()
|
|
158
|
+
.describe("When true, read-only preview of candidate integration, standing gate evidence, and target followability without recording delivery or mutating refs."),
|
|
159
|
+
message: optText.describe("Optional commit/integration message for the delivered candidate (submission only)."),
|
|
160
|
+
includeDirty: optBool.describe("Capture uncommitted worktree and untracked changes via a private index without altering the worktree's real Git index."),
|
|
161
|
+
materializeConflict: optBool.describe("When target integration conflicts, materialize conflict markers into the appointed worktree for resolution instead of refusing cleanly (submission only)."),
|
|
162
|
+
overwrite: optBool.describe("Allow replacing an earlier delivered candidate when required by conflict or rewrite state (submission only)."),
|
|
163
|
+
})
|
|
164
|
+
.readonly(),
|
|
165
|
+
]),
|
|
166
|
+
output: z.union([deliverOutcomeSchema, deliveryPreviewOutcomeSchema]),
|
|
167
|
+
progress: executionObservationSchema,
|
|
168
|
+
effect: "write",
|
|
169
|
+
},
|
|
170
|
+
verify: {
|
|
171
|
+
description: "Run the Contract's ## Verification checks now. A failed check is a verdict, not a tool error. Results are bound to the exact integration tree they ran on: any change to the work or the target makes them stale. They count only under the verified gate, and may land an already-delivered Contract.",
|
|
172
|
+
input: z
|
|
173
|
+
.strictObject({
|
|
174
|
+
...contract,
|
|
175
|
+
index: positive
|
|
176
|
+
.exactOptional()
|
|
177
|
+
.describe("1-based position of a single ## Verification fence to execute; omit to run all declared fences."),
|
|
178
|
+
includeDirty: optBool.describe("Verify a prospective snapshot that includes uncommitted worktree changes without staging them."),
|
|
179
|
+
})
|
|
180
|
+
.readonly(),
|
|
181
|
+
output: verifyOutcomeSchema,
|
|
182
|
+
normal: verifyNormalOutcomeSchema,
|
|
183
|
+
progress: executionObservationSchema,
|
|
184
|
+
effect: "write",
|
|
185
|
+
},
|
|
186
|
+
review: {
|
|
187
|
+
description: "Record your verdict on a Contract's diff: satisfied or unsatisfied, with reasons. Valid before or after deliver. Bound to the diff content: a pure rebase keeps it, a changed diff makes it stale. Satisfied may land an already-delivered Contract.",
|
|
188
|
+
input: z
|
|
189
|
+
.strictObject({
|
|
190
|
+
...contract,
|
|
191
|
+
verdict: z
|
|
192
|
+
.enum(["satisfied", "unsatisfied"])
|
|
193
|
+
.describe('Review judgment for the candidate: "satisfied" or "unsatisfied".'),
|
|
194
|
+
summary: nonblank.describe("Nonblank review rationale and findings recorded as testimony."),
|
|
195
|
+
})
|
|
196
|
+
.readonly(),
|
|
197
|
+
output: reviewOutcomeSchema,
|
|
198
|
+
progress: executionObservationSchema,
|
|
199
|
+
effect: "write",
|
|
200
|
+
},
|
|
201
|
+
abandon: {
|
|
202
|
+
description: "Break an active Contract. Its work never lands; its worktree is reclaimed. No undo.",
|
|
203
|
+
input: z
|
|
204
|
+
.strictObject({
|
|
205
|
+
...contract,
|
|
206
|
+
note: optText.describe("Optional reason recorded on the abandonment entry."),
|
|
207
|
+
})
|
|
208
|
+
.readonly(),
|
|
209
|
+
output: abandonOutcomeSchema,
|
|
210
|
+
effect: "destroy",
|
|
211
|
+
},
|
|
212
|
+
show: {
|
|
213
|
+
description: "Read a Contract in full: terms, current chapter, and working instructions. Or read one Debt in full with its prerequisites. Omit id to read the Contract whose worktree you stand in.",
|
|
214
|
+
input: z
|
|
215
|
+
.strictObject({
|
|
216
|
+
id: text
|
|
217
|
+
.superRefine((id, context) => {
|
|
218
|
+
if (debtIdSchema.safeParse(id).success ||
|
|
219
|
+
contractIdSchema.safeParse(id.startsWith("@") ? `kei/${id.slice(1)}` : id).success)
|
|
220
|
+
return;
|
|
221
|
+
context.addIssue({
|
|
222
|
+
code: "custom",
|
|
223
|
+
message: id.startsWith("@kei/")
|
|
224
|
+
? `redundant short contract selector: ${id}`
|
|
225
|
+
: "show requires one Contract selector or one Debt ID",
|
|
226
|
+
});
|
|
227
|
+
})
|
|
228
|
+
.exactOptional()
|
|
229
|
+
.describe("One kei/... or @name for Contract guidance, or one debt/... ID. Omit for contextual Contract guidance from cwd."),
|
|
230
|
+
})
|
|
231
|
+
.readonly(),
|
|
232
|
+
output: z.union([guidanceSchema, debtShowResultSchema, debtAbsentSchema]),
|
|
233
|
+
normal: z.union([guidanceNormalSchema, debtShowNormalResultSchema]),
|
|
234
|
+
effect: "read",
|
|
235
|
+
},
|
|
236
|
+
reconcile: {
|
|
237
|
+
description: "Finish what an interrupted or lagging call left half done: Git, worktree, and hook steps, for one Contract or all. Safe to repeat; never undoes a recorded result.",
|
|
238
|
+
input: z
|
|
239
|
+
.strictObject({
|
|
240
|
+
contract: optText.describe("Contract selector (kei/...) to reconcile; omit to reconcile all Contracts in the repo."),
|
|
241
|
+
retryHooks: optBool.describe("Re-run failed worktree lifecycle hooks during reconciliation."),
|
|
242
|
+
})
|
|
243
|
+
.readonly(),
|
|
244
|
+
output: reconcileResultSchema,
|
|
245
|
+
effect: "write",
|
|
246
|
+
},
|
|
247
|
+
spawn: {
|
|
248
|
+
description: "Birth a new Akuma from akumaName (ls aku/), with an optional first order. contract only marks whose work it is; give it a workdir and the terms yourself. A failed result with an akumaId still left an Akuma alive.",
|
|
249
|
+
input: z
|
|
250
|
+
.strictObject({
|
|
251
|
+
...spawnFields,
|
|
252
|
+
wait: waitDuration
|
|
253
|
+
.exactOptional()
|
|
254
|
+
.describe("Wait for the opening turn's text answer up to this duration (e.g. 10m); requires prompt. The deadline never kills the Akuma. Omit to return after birth and admission."),
|
|
255
|
+
prompt: nonblank.exactOptional().describe("Opening instruction text; omit to birth idle. Required with wait."),
|
|
256
|
+
})
|
|
257
|
+
.refine((input) => input.wait === undefined || input.prompt !== undefined, "spawn wait requires prompt")
|
|
258
|
+
.readonly(),
|
|
259
|
+
output: spawnResultSchema,
|
|
260
|
+
normal: spawnNormalResultSchema,
|
|
261
|
+
progress: spawnProgressSchema,
|
|
262
|
+
effect: "write",
|
|
263
|
+
},
|
|
264
|
+
fork: {
|
|
265
|
+
description: "Birth a copy of an Akuma as it stood at an answered turn (turn/<n> from history), to try another path. The copy wakes idle; give it orders with tell. Needs provider support.",
|
|
266
|
+
input: z
|
|
267
|
+
.strictObject({
|
|
268
|
+
akuma: text.describe("Source Akuma selector (aku/<name>/<hex> or @alias)."),
|
|
269
|
+
at: text.describe("Exact retained answered turn coordinate (turn/<n>) to branch from."),
|
|
270
|
+
bare: optBool.describe("Omit Keiyaku runtime instructions on the forked child (a bare parent stays bare regardless)."),
|
|
271
|
+
})
|
|
272
|
+
.readonly(),
|
|
273
|
+
output: forkResultSchema,
|
|
274
|
+
normal: forkNormalResultSchema,
|
|
275
|
+
effect: "write",
|
|
276
|
+
},
|
|
277
|
+
tell: {
|
|
278
|
+
description: "Give an Akuma new orders: steers its current work or wakes it. Returns once accepted; wait (e.g. 10m) also returns that turn's answer. A timeout ends the waiting, not the work.",
|
|
279
|
+
input: z
|
|
280
|
+
.strictObject({
|
|
281
|
+
...tellFields,
|
|
282
|
+
wait: waitDuration
|
|
283
|
+
.exactOptional()
|
|
284
|
+
.describe("Wait for this exact turn's text answer up to this duration (e.g. 10m). Omit to return after admission; the deadline never retracts the Tell or kills the Akuma."),
|
|
285
|
+
})
|
|
286
|
+
.readonly(),
|
|
287
|
+
output: akumaTellResultSchema,
|
|
288
|
+
progress: askProgressSchema,
|
|
289
|
+
effect: "write",
|
|
290
|
+
},
|
|
291
|
+
ask: {
|
|
292
|
+
description: "Demand a structured answer from an Akuma: a prompt and a JSON Schema in, parsed JSON out. The answer is not checked against the schema; non-JSON is a failure. Not every provider honors schemas.",
|
|
293
|
+
input: z
|
|
294
|
+
.strictObject({
|
|
295
|
+
akuma: text.describe("Target Akuma selector (aku/<name>/<hex> or @alias)."),
|
|
296
|
+
prompt: nonblank.describe("Nonblank question or instruction to admit."),
|
|
297
|
+
timeoutMs: timeout.describe("Optional observation deadline in integer milliseconds (stops observation on deadline without retracting the prompt or killing the Akuma)."),
|
|
298
|
+
schema: jsonDocument.describe("JSON Schema object sent to the provider to constrain the turn's JSON output."),
|
|
299
|
+
interrupt: optBool.describe("Request the currently running turn to yield before running this Ask."),
|
|
300
|
+
})
|
|
301
|
+
.readonly(),
|
|
302
|
+
output: akumaAskResultSchema,
|
|
303
|
+
normal: akumaAskNormalResultSchema,
|
|
304
|
+
progress: askProgressSchema,
|
|
305
|
+
effect: "write",
|
|
306
|
+
},
|
|
307
|
+
kill: {
|
|
308
|
+
description: "Kill an Akuma's current execution. Nothing is erased: history and queued orders remain, and tell or ask wakes it.",
|
|
309
|
+
input: z
|
|
310
|
+
.strictObject({
|
|
311
|
+
akuma: nonblank.describe('One Akuma selector: aku/<name>/<hex>, @alias, kei/... (all Akumas dispatched to that Contract), or glob "aku/<name-pattern>/<hex-pattern>". Contract/glob selection may expand to several members.'),
|
|
312
|
+
})
|
|
313
|
+
.readonly(),
|
|
314
|
+
output: akumaKillResultSchema,
|
|
315
|
+
effect: "destroy",
|
|
316
|
+
},
|
|
317
|
+
wait: {
|
|
318
|
+
description: "Wait until selected Contracts change or close, or selected Akumas finish their current work. Contracts or Akumas, never both in one call. Already closed or finished returns at once. A timeout ends the waiting, not the work.",
|
|
319
|
+
input: z.union([
|
|
320
|
+
z
|
|
321
|
+
.strictObject({
|
|
322
|
+
selectors: z
|
|
323
|
+
.array(contractSelector)
|
|
324
|
+
.min(1)
|
|
325
|
+
.readonly()
|
|
326
|
+
.describe('Nonempty homogeneous selector list: either all Contract IDs (kei/...) or all Akuma selectors (aku/<name>/<hex>, @alias, or "aku/<name-pattern>/<hex-pattern>").'),
|
|
327
|
+
completion: z
|
|
328
|
+
.enum(["any", "all"])
|
|
329
|
+
.exactOptional()
|
|
330
|
+
.describe('Wake when "any" selected target settles/changes (default) or wait for "all".'),
|
|
331
|
+
timeoutMs: contractWaitDurationSchema
|
|
332
|
+
.exactOptional()
|
|
333
|
+
.describe('Observation deadline in integer milliseconds; returns reason "deadline" without canceling work.'),
|
|
334
|
+
})
|
|
335
|
+
.readonly(),
|
|
336
|
+
z
|
|
337
|
+
.strictObject({
|
|
338
|
+
selectors: z
|
|
339
|
+
.array(akumaSelector)
|
|
340
|
+
.min(1)
|
|
341
|
+
.readonly()
|
|
342
|
+
.describe('Nonempty homogeneous selector list: either all Contract IDs (kei/...) or all Akuma selectors (aku/<name>/<hex>, @alias, or "aku/<name-pattern>/<hex-pattern>").'),
|
|
343
|
+
completion: z
|
|
344
|
+
.enum(["any", "all"])
|
|
345
|
+
.exactOptional()
|
|
346
|
+
.describe('Wake when "any" selected target settles/changes (default) or wait for "all".'),
|
|
347
|
+
timeoutMs: timeout.describe('Observation deadline in integer milliseconds; returns reason "deadline" without canceling work.'),
|
|
348
|
+
})
|
|
349
|
+
.readonly(),
|
|
350
|
+
]),
|
|
351
|
+
output: z.union([contractWaitResultSchema, akumaWaitResultSchema]),
|
|
352
|
+
normal: z.union([contractWaitNormalResultSchema, akumaWaitNormalResultSchema]),
|
|
353
|
+
effect: "read",
|
|
354
|
+
},
|
|
355
|
+
history: {
|
|
356
|
+
description: "Look back: a Contract's journal, or an Akuma's recent activity. For an Akuma, last returns its latest answer and id opens one item such as turn/<n> or report/<n>.",
|
|
357
|
+
input: z.union([
|
|
358
|
+
z
|
|
359
|
+
.strictObject({
|
|
360
|
+
selector: contractSelector.describe("Single subject: kei/... for Contract history, or aku/<name>/<hex> / @alias for Akuma history."),
|
|
361
|
+
full: optBool.describe("Include full event details on Contract history (valid only for kei/... selectors)."),
|
|
362
|
+
})
|
|
363
|
+
.readonly(),
|
|
364
|
+
...historySelectionSchemas.map((branch) => branch.extend({
|
|
365
|
+
last: branch.shape.last.describe("When true, return only the Akuma's latest retained answer bytes (mutually exclusive with id, before, since, and limit)."),
|
|
366
|
+
...("id" in branch.shape
|
|
367
|
+
? {
|
|
368
|
+
id: branch.shape.id.describe("Exact Akuma item coordinate: turn/<n> (turn outcome), report/<n> (full progress report), or positive decimal activity sequence. Mutually exclusive with before, since, limit, and last."),
|
|
369
|
+
}
|
|
370
|
+
: {}),
|
|
371
|
+
...("before" in branch.shape
|
|
372
|
+
? {
|
|
373
|
+
before: branch.shape.before.describe("Page older Akuma timeline events strictly before this positive decimal sequence."),
|
|
374
|
+
}
|
|
375
|
+
: {}),
|
|
376
|
+
...("since" in branch.shape
|
|
377
|
+
? {
|
|
378
|
+
since: branch.shape.since.describe("Page newer Akuma timeline events strictly after this nonnegative decimal sequence (mutually exclusive with before)."),
|
|
379
|
+
}
|
|
380
|
+
: {}),
|
|
381
|
+
...("limit" in branch.shape
|
|
382
|
+
? { limit: branch.shape.limit.describe("Maximum Akuma timeline rows to return (1..5000, default 12).") }
|
|
383
|
+
: {}),
|
|
384
|
+
})
|
|
385
|
+
.extend({
|
|
386
|
+
selector: akumaSelector.describe("Single subject: kei/... for Contract history, or aku/<name>/<hex> / @alias for Akuma history."),
|
|
387
|
+
})
|
|
388
|
+
.readonly()),
|
|
389
|
+
]),
|
|
390
|
+
output: z.union([contractHistorySchema, akumaHistoryResultSchema]),
|
|
391
|
+
effect: "read",
|
|
392
|
+
},
|
|
393
|
+
report: {
|
|
394
|
+
description: "From inside a running Akuma, leave a progress note for whoever holds it and keep working. Only works when this server runs inside that Akuma.",
|
|
395
|
+
input: z
|
|
396
|
+
.strictObject({
|
|
397
|
+
text: nonblank.describe("Nonblank progress report Markdown/text recorded on the current turn timeline."),
|
|
398
|
+
})
|
|
399
|
+
.readonly(),
|
|
400
|
+
output: akumaReportResultSchema,
|
|
401
|
+
effect: "write",
|
|
402
|
+
},
|
|
403
|
+
whoami: {
|
|
404
|
+
description: "Who this server acts as: caller or Akuma identity, its Contract link and turn initiator, and which Contract worktree cwd stands in. Read from the environment; not authentication.",
|
|
405
|
+
input: z.strictObject({}).readonly(),
|
|
406
|
+
output: whoamiFactsSchema,
|
|
407
|
+
effect: "read",
|
|
408
|
+
},
|
|
409
|
+
settings: {
|
|
410
|
+
description: "Observe resolved Settings.",
|
|
411
|
+
input: z.strictObject({}).readonly(),
|
|
412
|
+
output: settingsSchema,
|
|
413
|
+
effect: "read",
|
|
414
|
+
},
|
|
415
|
+
nuke: {
|
|
416
|
+
description: "Reset the selected World with explicit confirmation.",
|
|
417
|
+
input: z.strictObject({ confirm: optText }).readonly(),
|
|
418
|
+
output: resetOutcomeSchema,
|
|
419
|
+
effect: "destroy",
|
|
420
|
+
},
|
|
421
|
+
kanshi: {
|
|
422
|
+
description: "Watch everything at once: active Contracts, Debts, and Akumas. Use status, show, or history to look closer.",
|
|
423
|
+
input: z.strictObject({}).readonly(),
|
|
424
|
+
output: kanshiReportSchema,
|
|
425
|
+
effect: "read",
|
|
426
|
+
},
|
|
427
|
+
status: {
|
|
428
|
+
description: "Where one Contract stands (stage, gates, prerequisites, worktree) or what one Akuma is doing (state, current work, changed files). Exact kei/... or aku/<name>/<id> only; no aliases.",
|
|
429
|
+
input: z
|
|
430
|
+
.strictObject({
|
|
431
|
+
id: z
|
|
432
|
+
.union([contractIdSchema, akumaIdSchema])
|
|
433
|
+
.describe("Exact Contract ID (kei/...) or Akuma ID (aku/<name>/<hex>); @aliases and category paths are refused."),
|
|
434
|
+
})
|
|
435
|
+
.readonly(),
|
|
436
|
+
output: z.union([contractStatusSchema, akumaObservationSchema]),
|
|
437
|
+
normal: z.union([contractNormalStatusSchema, akumaObservationSchema]),
|
|
438
|
+
effect: "read",
|
|
439
|
+
},
|
|
440
|
+
ls: {
|
|
441
|
+
description: "List ids of one kind: active Contracts (kei/), open Debts (debt/), akumaName values you can birth (aku/), or existing Akumas (aku/*).",
|
|
442
|
+
input: lsInputSchema,
|
|
443
|
+
output: z.union([contractCatalogueSchema, akumaCatalogueSchema, akumaNameCatalogSchema, debtCatalogueSchema]),
|
|
444
|
+
normal: z.union([contractCatalogueSchema, akumaCatalogueSchema, akumaNameCatalogSchema, debtListSchema]),
|
|
445
|
+
effect: "read",
|
|
446
|
+
},
|
|
447
|
+
region: {
|
|
448
|
+
description: "Before parallel work: which files active Contracts claim to change and where those claims overlap. Advisory only; no locks, no conflict prediction.",
|
|
449
|
+
input: z.union([
|
|
450
|
+
z.strictObject({}).readonly(),
|
|
451
|
+
z
|
|
452
|
+
.strictObject({
|
|
453
|
+
contract: text.describe("Contract selector (kei/...) whose declared Region and overlaps to inspect; mutually exclusive with paths."),
|
|
454
|
+
})
|
|
455
|
+
.readonly(),
|
|
456
|
+
z
|
|
457
|
+
.strictObject({
|
|
458
|
+
paths: z
|
|
459
|
+
.array(text)
|
|
460
|
+
.min(1)
|
|
461
|
+
.readonly()
|
|
462
|
+
.describe("Nonempty repository-relative path or glob patterns to check against active Contract Regions; mutually exclusive with contract."),
|
|
463
|
+
})
|
|
464
|
+
.readonly(),
|
|
465
|
+
]),
|
|
466
|
+
output: regionResultSchema,
|
|
467
|
+
effect: "read",
|
|
468
|
+
},
|
|
469
|
+
"debt.add": {
|
|
470
|
+
description: "Record open work still owed, with optional body, priority and prerequisite needs. Returns its debt/... id.",
|
|
471
|
+
input: addDebtInputSchema.readonly(),
|
|
472
|
+
output: debtMutationResultSchema,
|
|
473
|
+
normal: debtMutationNormalResultSchema,
|
|
474
|
+
effect: "write",
|
|
475
|
+
},
|
|
476
|
+
"debt.addDocument": {
|
|
477
|
+
description: "Create a Debt from Markdown.",
|
|
478
|
+
input: z.strictObject({ markdown: text }).readonly(),
|
|
479
|
+
output: debtMutationResultSchema,
|
|
480
|
+
effect: "write",
|
|
481
|
+
},
|
|
482
|
+
"debt.update": {
|
|
483
|
+
description: "Replace a Debt's text, priority or prerequisites, or set its disposition to open, done or drop. Any state may be reopened or changed; omitted fields are preserved and empty body, note or needs clears them.",
|
|
484
|
+
input: updateDebtInputSchema
|
|
485
|
+
.safeExtend({ id: debtIdSchema.describe("Target Debt ID (debt/<slug>-<hex>).") })
|
|
486
|
+
.readonly(),
|
|
487
|
+
output: debtUpdateResultSchema,
|
|
488
|
+
effect: "write",
|
|
489
|
+
},
|
|
490
|
+
"debt.doctor": {
|
|
491
|
+
description: "Diagnose Debt authority and prerequisites.",
|
|
492
|
+
input: z.strictObject({}).readonly(),
|
|
493
|
+
output: z.union([debtDoctorReportSchema, debtAbsentSchema]),
|
|
494
|
+
effect: "read",
|
|
495
|
+
},
|
|
496
|
+
});
|
|
@@ -1,41 +1,44 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
declare const KEIYAKU_HANDLE: unique symbol;
|
|
10
|
-
type HandleSeat = Readonly<{
|
|
11
|
-
id: ContractId;
|
|
12
|
-
scope: RepositoryScope;
|
|
1
|
+
import { verbs, type VerbName, type VerbInput, type VerbOutput, type VerbRunFor } from "./keiyaku-verbs.js";
|
|
2
|
+
import type { BindOutcome } from "./contract-outcomes.js";
|
|
3
|
+
export { KeiyakuArcDocumentError, KeiyakuUsageError } from "./keiyaku-coordinates.js";
|
|
4
|
+
export type KeiyakuAt = Readonly<{
|
|
5
|
+
cwd: string;
|
|
6
|
+
environment: Readonly<Record<string, string | undefined>>;
|
|
7
|
+
home?: string;
|
|
8
|
+
repo?: string;
|
|
13
9
|
}>;
|
|
14
10
|
export declare class Keiyaku {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
private
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
11
|
+
#private;
|
|
12
|
+
static readonly verbs: typeof verbs;
|
|
13
|
+
private constructor();
|
|
14
|
+
static at(input: KeiyakuAt): Keiyaku;
|
|
15
|
+
run<K extends VerbName>(name: K, input: VerbInput<K>, run?: VerbRunFor<K>): Promise<VerbOutput<K>>;
|
|
16
|
+
bind(input: VerbInput<"bind">, run?: VerbRunFor<"bind">): Promise<BindOutcome>;
|
|
17
|
+
amend(input: VerbInput<"amend">, run?: VerbRunFor<"amend">): Promise<VerbOutput<"amend">>;
|
|
18
|
+
arc(input: VerbInput<"arc">, run?: VerbRunFor<"arc">): Promise<VerbOutput<"arc">>;
|
|
19
|
+
deliver(input?: VerbInput<"deliver">, run?: VerbRunFor<"deliver">): Promise<VerbOutput<"deliver">>;
|
|
20
|
+
verify(input?: VerbInput<"verify">, run?: VerbRunFor<"verify">): Promise<VerbOutput<"verify">>;
|
|
21
|
+
review(input: VerbInput<"review">, run?: VerbRunFor<"review">): Promise<VerbOutput<"review">>;
|
|
22
|
+
abandon(input?: VerbInput<"abandon">, run?: VerbRunFor<"abandon">): Promise<VerbOutput<"abandon">>;
|
|
23
|
+
show(input?: VerbInput<"show">, run?: VerbRunFor<"show">): Promise<VerbOutput<"show">>;
|
|
24
|
+
reconcile(input?: VerbInput<"reconcile">, run?: VerbRunFor<"reconcile">): Promise<VerbOutput<"reconcile">>;
|
|
25
|
+
spawn(input: VerbInput<"spawn">, run?: VerbRunFor<"spawn">): Promise<VerbOutput<"spawn">>;
|
|
26
|
+
fork(input: VerbInput<"fork">, run?: VerbRunFor<"fork">): Promise<VerbOutput<"fork">>;
|
|
27
|
+
tell(input: VerbInput<"tell">, run?: VerbRunFor<"tell">): Promise<VerbOutput<"tell">>;
|
|
28
|
+
ask(input: VerbInput<"ask">, run?: VerbRunFor<"ask">): Promise<VerbOutput<"ask">>;
|
|
29
|
+
kill(input: VerbInput<"kill">, run?: VerbRunFor<"kill">): Promise<VerbOutput<"kill">>;
|
|
30
|
+
wait(input: VerbInput<"wait">, run?: VerbRunFor<"wait">): Promise<VerbOutput<"wait">>;
|
|
31
|
+
history(input: VerbInput<"history">, run?: VerbRunFor<"history">): Promise<VerbOutput<"history">>;
|
|
32
|
+
report(input: VerbInput<"report">, run?: VerbRunFor<"report">): Promise<VerbOutput<"report">>;
|
|
33
|
+
ls(input: VerbInput<"ls">, run?: VerbRunFor<"ls">): Promise<VerbOutput<"ls">>;
|
|
34
|
+
debtAdd(input: VerbInput<"debt.add">, run?: VerbRunFor<"debt.add">): Promise<VerbOutput<"debt.add">>;
|
|
35
|
+
debtAddDocument(input: VerbInput<"debt.addDocument">, run?: VerbRunFor<"debt.addDocument">): Promise<VerbOutput<"debt.addDocument">>;
|
|
36
|
+
debtUpdate(input: VerbInput<"debt.update">, run?: VerbRunFor<"debt.update">): Promise<VerbOutput<"debt.update">>;
|
|
37
|
+
debtDoctor(input?: VerbInput<"debt.doctor">, run?: VerbRunFor<"debt.doctor">): Promise<VerbOutput<"debt.doctor">>;
|
|
38
|
+
kanshi(input?: VerbInput<"kanshi">, run?: VerbRunFor<"kanshi">): Promise<VerbOutput<"kanshi">>;
|
|
39
|
+
status(input: VerbInput<"status">, run?: VerbRunFor<"status">): Promise<VerbOutput<"status">>;
|
|
40
|
+
region(input?: VerbInput<"region">, run?: VerbRunFor<"region">): Promise<VerbOutput<"region">>;
|
|
41
|
+
whoami(input?: VerbInput<"whoami">, run?: VerbRunFor<"whoami">): Promise<VerbOutput<"whoami">>;
|
|
42
|
+
settings(input?: VerbInput<"settings">, run?: VerbRunFor<"settings">): Promise<VerbOutput<"settings">>;
|
|
43
|
+
nuke(input?: VerbInput<"nuke">, run?: VerbRunFor<"nuke">): Promise<VerbOutput<"nuke">>;
|
|
36
44
|
}
|
|
37
|
-
/** Internal constructor capability; callers select a Contract through Keiyaku.with. */
|
|
38
|
-
export declare function createKeiyakuHandle(id: ContractId, scope: RepositoryScope, composition: LocalContractCompositionCapture): Keiyaku;
|
|
39
|
-
/** Internal package composition capability; not exported from the package root. */
|
|
40
|
-
export declare function seatForKeiyaku(value: unknown): HandleSeat | null;
|
|
41
|
-
export {};
|