@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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { abbreviateGitIds, afterWording, progressStrip, displayGitId, gateFact, gitIdsInRow, lifecycleWord, mergeSummary, targetMovementFacts, verificationFact, } from "./contract-observation.js";
|
|
2
2
|
import { DEFAULT_CLI_COLUMNS, emptyCatalogue, entityLines, elapsedMilliseconds, identityLine, plumbFacts, RECENT_TONE_MS, renderBoundedPayload, renderSectionBlock, safeText, tone, } from "./terminal.js";
|
|
3
3
|
import { endpointFact, formatAge, NARROW_COLUMNS, renderAkuma, renderAkumaBoard } from "./kanshi-akuma.js";
|
|
4
|
-
import { contractMark,
|
|
5
|
-
import { dispositionText } from "./
|
|
4
|
+
import { contractMark, debtDispositionMark } from "./marks.js";
|
|
5
|
+
import { dispositionText } from "./debt.js";
|
|
6
6
|
const REVIEW_ATTENTION_MS = 15 * 60 * 1_000;
|
|
7
7
|
const PENDING_ATTENTION_MS = 60 * 60 * 1_000;
|
|
8
8
|
function contractHasError(row) {
|
|
@@ -52,13 +52,13 @@ function mergeFacts(row) {
|
|
|
52
52
|
const summary = mergeSummary(row.workspaceObservation);
|
|
53
53
|
return summary === undefined ? [] : [summary];
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
if (
|
|
57
|
-
return `! ${
|
|
58
|
-
const
|
|
59
|
-
return
|
|
60
|
-
? `! ${
|
|
61
|
-
: `${
|
|
55
|
+
function linkedDebt(debts, debtId) {
|
|
56
|
+
if (debts.kind !== "present")
|
|
57
|
+
return `! ${debtId} · unavailable`;
|
|
58
|
+
const debt = debts.value.rows.find((candidate) => candidate.id === debtId);
|
|
59
|
+
return debt === undefined
|
|
60
|
+
? `! ${debtId} · unavailable`
|
|
61
|
+
: `${debtDispositionMark(debt.disposition)} ${debt.id} · ${dispositionText(debt.disposition)}`;
|
|
62
62
|
}
|
|
63
63
|
function isTerminalAkuma(life) {
|
|
64
64
|
return life === "killed" || life === "stillborn";
|
|
@@ -102,12 +102,12 @@ function payload(label, text, context) {
|
|
|
102
102
|
truncated: false,
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
|
-
function liveAlarms(row,
|
|
105
|
+
function liveAlarms(row, debts) {
|
|
106
106
|
return [
|
|
107
107
|
...mergeFacts(row),
|
|
108
|
-
...(row.holder.kind === "unavailable" ? ["
|
|
109
|
-
...(row.holder.kind === "held" &&
|
|
110
|
-
? ["
|
|
108
|
+
...(row.holder.kind === "unavailable" ? ["debt unavailable"] : []),
|
|
109
|
+
...(row.holder.kind === "held" && debts !== undefined && linkedDebt(debts, row.holder.debtId).startsWith("!")
|
|
110
|
+
? ["debt unavailable"]
|
|
111
111
|
: []),
|
|
112
112
|
...(row.issue === undefined ? [] : ["pending reconciliation"]),
|
|
113
113
|
...(row.workspaceObservation.kind === "failed" || row.workspaceObservation.kind === "unavailable"
|
|
@@ -173,7 +173,7 @@ function renderSelectedContractRow(row, facts, context, abbreviations) {
|
|
|
173
173
|
lines.push(...semanticBlock("akuma", [akuma], context));
|
|
174
174
|
if (row.worktreePath !== null)
|
|
175
175
|
lines.push(...semanticBlock("worktree", [`worktree ${row.worktreePath}`], context));
|
|
176
|
-
lines.push(...semanticBlock("alarms", liveAlarms(row, facts.
|
|
176
|
+
lines.push(...semanticBlock("alarms", liveAlarms(row, facts.debts), context));
|
|
177
177
|
return lines;
|
|
178
178
|
}
|
|
179
179
|
function renderWorldContractRow(row, facts, context, abbreviations) {
|
|
@@ -185,7 +185,7 @@ function renderWorldContractRow(row, facts, context, abbreviations) {
|
|
|
185
185
|
: [
|
|
186
186
|
progressStrip(row),
|
|
187
187
|
...(linkedAkumaSummary(row, facts.akuma) === undefined ? [] : [linkedAkumaSummary(row, facts.akuma)]),
|
|
188
|
-
...liveAlarms(row, facts.
|
|
188
|
+
...liveAlarms(row, facts.debts),
|
|
189
189
|
];
|
|
190
190
|
const statusTone = contractStatusTone(row, facts.observedAt);
|
|
191
191
|
return entityLines({
|
|
@@ -217,7 +217,7 @@ function renderContractBoard(section, facts, context, emptyRows) {
|
|
|
217
217
|
return [header, ...rendered.slice(1), ...(section.value.hasMore === true ? ["…"] : [])];
|
|
218
218
|
}
|
|
219
219
|
function renderContracts(report, context) {
|
|
220
|
-
return renderContractBoard(report.contracts, { observedAt: report.observedAt, akuma: report.akuma,
|
|
220
|
+
return renderContractBoard(report.contracts, { observedAt: report.observedAt, akuma: report.akuma, debts: report.debts }, context, []);
|
|
221
221
|
}
|
|
222
222
|
function renderSelectedContract(report, context) {
|
|
223
223
|
const section = report.contracts;
|
|
@@ -228,20 +228,20 @@ function renderSelectedContract(report, context) {
|
|
|
228
228
|
const row = section.value.rows[0];
|
|
229
229
|
return row === undefined
|
|
230
230
|
? [" keiyaku absent"]
|
|
231
|
-
: renderSelectedContractRow(row, { observedAt: report.observedAt, akuma: report.akuma,
|
|
231
|
+
: renderSelectedContractRow(row, { observedAt: report.observedAt, akuma: report.akuma, debts: report.debts }, context, contractAbbreviations(section.value));
|
|
232
232
|
}
|
|
233
|
-
function
|
|
233
|
+
function debtFailureFact(failure) {
|
|
234
234
|
return failure.coordinate === undefined ? failure.message : `${failure.coordinate} · failed ${failure.message}`;
|
|
235
235
|
}
|
|
236
|
-
function
|
|
237
|
-
const section = report.
|
|
236
|
+
function renderDebts(report, context) {
|
|
237
|
+
const section = report.debts;
|
|
238
238
|
if (section.kind === "absent")
|
|
239
|
-
return ["
|
|
239
|
+
return ["DEBTS // absent"];
|
|
240
240
|
if (section.kind === "failed")
|
|
241
241
|
return [
|
|
242
|
-
"
|
|
242
|
+
"DEBTS // unavailable",
|
|
243
243
|
"",
|
|
244
|
-
tone(`! ${safeText(
|
|
244
|
+
tone(`! ${safeText(debtFailureFact(section.failure))}`, "alert", context.color),
|
|
245
245
|
];
|
|
246
246
|
const rows = section.value.rows;
|
|
247
247
|
if (rows.length === 0)
|
|
@@ -253,12 +253,12 @@ function renderTasks(report, context) {
|
|
|
253
253
|
const association = relation.length === 0 ? "" : ` · ${relation.join(" · ")}`;
|
|
254
254
|
if (context.columns > NARROW_COLUMNS) {
|
|
255
255
|
return [
|
|
256
|
-
identityLine(
|
|
256
|
+
identityLine(debtDispositionMark(row.disposition), row.id, `· ${dispositionText(row.disposition)} · P${row.priority} · ${row.title}${association}`),
|
|
257
257
|
...plumbFacts([...childFacts, ...blockerFacts], context.columns),
|
|
258
258
|
];
|
|
259
259
|
}
|
|
260
260
|
return entityLines({
|
|
261
|
-
mark:
|
|
261
|
+
mark: debtDispositionMark(row.disposition),
|
|
262
262
|
identity: row.id,
|
|
263
263
|
state: `${dispositionText(row.disposition)} · P${row.priority}`,
|
|
264
264
|
title: row.title,
|
|
@@ -267,9 +267,9 @@ function renderTasks(report, context) {
|
|
|
267
267
|
});
|
|
268
268
|
});
|
|
269
269
|
return [
|
|
270
|
-
"
|
|
270
|
+
"DEBTS // recent",
|
|
271
271
|
...renderSectionBlock({
|
|
272
|
-
name: "
|
|
272
|
+
name: "DEBTS",
|
|
273
273
|
rows: rowLines,
|
|
274
274
|
}).slice(1),
|
|
275
275
|
...(section.value.hasMore ? ["…"] : []),
|
|
@@ -278,7 +278,7 @@ function renderTasks(report, context) {
|
|
|
278
278
|
export function renderKanshiText(report, context = { columns: DEFAULT_CLI_COLUMNS, color: false }, selection = "world") {
|
|
279
279
|
if (selection === "contract")
|
|
280
280
|
return renderSelectedContract(report, context).join("\n");
|
|
281
|
-
const blocks = [renderContracts(report, context), renderAkuma(report, context),
|
|
281
|
+
const blocks = [renderContracts(report, context), renderAkuma(report, context), renderDebts(report, context)].filter((block) => block.length > 0);
|
|
282
282
|
return blocks.length === 0 ? "○ world empty" : blocks.map((block) => block.join("\n")).join("\n\n");
|
|
283
283
|
}
|
|
284
284
|
/** One category board: the section the selector asked for, and nothing it did not read. */
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { AkumaLife } from "../../akuma/heart/index.js";
|
|
2
2
|
import type { ContractRow } from "../../protocol/read/status.js";
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
export type
|
|
3
|
+
import type { DebtDisposition } from "../../debt/board.js";
|
|
4
|
+
import type { DebtState } from "../../debt/document.js";
|
|
5
|
+
export type DebtMarkWord = DebtDisposition | DebtState | "missing";
|
|
6
6
|
/** Akuma life marks are one vocabulary; render surfaces consume and never re-derive them. */
|
|
7
7
|
export declare function akumaMark(life: AkumaLife | "unborn" | "stillborn"): string;
|
|
8
8
|
/** Contract board marks weigh phase, gates, and target knowledge in one fixed order. */
|
|
9
9
|
export declare function contractMark(row: ContractRow): string;
|
|
10
10
|
/** The board's derived dispositions have their own exhaustive source lock. */
|
|
11
|
-
export declare function
|
|
11
|
+
export declare function debtDispositionMark(disposition: DebtDisposition): string;
|
|
12
12
|
/** Document states and missing references reuse the board marks where they overlap. */
|
|
13
|
-
export declare function
|
|
13
|
+
export declare function debtMark(word: DebtMarkWord): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function unreachable(value) {
|
|
2
|
-
throw new Error(`unhandled
|
|
2
|
+
throw new Error(`unhandled Debt mark word: ${String(value)}`);
|
|
3
3
|
}
|
|
4
4
|
/** Akuma life marks are one vocabulary; render surfaces consume and never re-derive them. */
|
|
5
5
|
export function akumaMark(life) {
|
|
@@ -36,16 +36,12 @@ export function contractMark(row) {
|
|
|
36
36
|
return "⧗";
|
|
37
37
|
}
|
|
38
38
|
/** The board's derived dispositions have their own exhaustive source lock. */
|
|
39
|
-
export function
|
|
39
|
+
export function debtDispositionMark(disposition) {
|
|
40
40
|
switch (disposition) {
|
|
41
41
|
case "ready":
|
|
42
42
|
return "○";
|
|
43
43
|
case "blocked":
|
|
44
44
|
return "‖";
|
|
45
|
-
case "in_progress":
|
|
46
|
-
return "●";
|
|
47
|
-
case "on_hold":
|
|
48
|
-
return "⧗";
|
|
49
45
|
case "done":
|
|
50
46
|
return "✓";
|
|
51
47
|
case "drop":
|
|
@@ -55,7 +51,7 @@ export function taskDispositionMark(disposition) {
|
|
|
55
51
|
}
|
|
56
52
|
}
|
|
57
53
|
/** Document states and missing references reuse the board marks where they overlap. */
|
|
58
|
-
export function
|
|
54
|
+
export function debtMark(word) {
|
|
59
55
|
switch (word) {
|
|
60
56
|
case "open":
|
|
61
57
|
return "○";
|
|
@@ -63,11 +59,9 @@ export function taskMark(word) {
|
|
|
63
59
|
return "!";
|
|
64
60
|
case "ready":
|
|
65
61
|
case "blocked":
|
|
66
|
-
case "in_progress":
|
|
67
|
-
case "on_hold":
|
|
68
62
|
case "done":
|
|
69
63
|
case "drop":
|
|
70
|
-
return
|
|
64
|
+
return debtDispositionMark(word);
|
|
71
65
|
default:
|
|
72
66
|
return unreachable(word);
|
|
73
67
|
}
|
|
@@ -8,7 +8,7 @@ export function renderNukeText(result) {
|
|
|
8
8
|
`✓ nuke ${result.world}`,
|
|
9
9
|
` refs removed ${result.value.removed.refs}`,
|
|
10
10
|
` worktrees removed ${result.value.removed.worktrees}`,
|
|
11
|
-
`
|
|
11
|
+
` debt stores removed ${result.value.removed.debts}`,
|
|
12
12
|
" locks may remain · SQLite coordination files cannot be removed safely while concurrent writers may still hold them",
|
|
13
13
|
...seatClose,
|
|
14
14
|
].join("\n");
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { gateDisplayName } from "./contract-observation.js";
|
|
1
2
|
import { renderRefusalFacts } from "./refusal.js";
|
|
2
3
|
import { DEFAULT_CLI_COLUMNS, displayColumns, orderRefusalFacts, renderOpaqueBlock, safeText, quotedText, } from "./terminal.js";
|
|
3
4
|
export function receiptRow(lines, mark, label, segments, columns) {
|
|
@@ -73,14 +74,6 @@ function prerequisiteRows(stop, columns) {
|
|
|
73
74
|
}
|
|
74
75
|
return lines;
|
|
75
76
|
}
|
|
76
|
-
/** Requirement names speak as plain event nouns; the "gate" class word never prints on a receipt. */
|
|
77
|
-
function eventNoun(gate) {
|
|
78
|
-
if (gate === "reviewed")
|
|
79
|
-
return "review";
|
|
80
|
-
if (gate === "verified")
|
|
81
|
-
return "verification";
|
|
82
|
-
return gate;
|
|
83
|
-
}
|
|
84
77
|
/** Only a recorded unsatisfied verdict alarms; missing and stale requirements fold into the await line. */
|
|
85
78
|
function gateAlarmRows(stop, columns) {
|
|
86
79
|
if (!("refusal" in stop) || stop.refusal?.kind !== "gates-unsatisfied")
|
|
@@ -90,7 +83,7 @@ function gateAlarmRows(stop, columns) {
|
|
|
90
83
|
const { gate, current } = report;
|
|
91
84
|
if (current.kind !== "attested")
|
|
92
85
|
continue;
|
|
93
|
-
receiptRow(lines, "!",
|
|
86
|
+
receiptRow(lines, "!", gateDisplayName(gate), [{ text: `· ${current.verdict}` }, { text: `· at ${current.at}` }], columns);
|
|
94
87
|
if (current.summary !== undefined)
|
|
95
88
|
receiptPayload(lines, " summary", current.summary);
|
|
96
89
|
}
|
|
@@ -106,7 +99,7 @@ export function gatesAwaitLines(placement) {
|
|
|
106
99
|
return [];
|
|
107
100
|
const events = placement.refusal.unmet
|
|
108
101
|
.filter((report) => report.current.kind !== "attested")
|
|
109
|
-
.map((report) =>
|
|
102
|
+
.map((report) => gateDisplayName(report.gate));
|
|
110
103
|
if (events.length === 0)
|
|
111
104
|
return [];
|
|
112
105
|
return [`⧗ awaiting ${events.length > 3 ? `${events.length} gates` : events.join(", ")}`];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type LibraryExecution } from "../akuma/requests.js";
|
|
2
|
-
import type
|
|
2
|
+
import { type ActorId } from "../index.js";
|
|
3
3
|
import type { ExecutionObserver } from "../protocol/execution-observation.js";
|
|
4
4
|
import { type ParsedCommand, type ParsedInvocation } from "./parse.js";
|
|
5
5
|
export type ParsedCommandInvocation = Extract<ParsedInvocation, {
|
package/build/src/cli/runtime.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { AkumaNotBornError, AkumaObservationError } from "../akuma/akuma-errors.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { bodyRequestExecution, localExecutionContext } from "../akuma/requests.js";
|
|
2
|
+
import { executionForEnvironment } from "../akuma/requests.js";
|
|
3
|
+
import { AkumaArchetypeError } from "../index.js";
|
|
5
4
|
import { AkumaAddressError, AkumaWorldScopeError } from "../library/address.js";
|
|
6
5
|
import { encodeFailureWire, KeiyakuError } from "../library/outcome.js";
|
|
7
6
|
import { isParsedAkumaCommand, runAkumaCommand } from "./commands/akuma.js";
|
|
8
7
|
import { admitBindMarkdown, runContractCommand, runContractHistoryCommand } from "./commands/contract.js";
|
|
9
8
|
import { installExitCode, installHarnesses, renderInstallText, } from "./commands/install.js";
|
|
10
|
-
import {
|
|
9
|
+
import { runDebtCommand } from "./commands/debt.js";
|
|
11
10
|
import { resolveInvocationCoordinates } from "./coordinates.js";
|
|
12
11
|
import { BindDraftError } from "./draft.js";
|
|
13
12
|
import { assertExplicitRepoUse, CliUsageError, usageGuideForCommand, } from "./parse.js";
|
|
@@ -28,11 +27,6 @@ function memoized(reader) {
|
|
|
28
27
|
let value;
|
|
29
28
|
return () => (value ??= reader());
|
|
30
29
|
}
|
|
31
|
-
function executionForEnvironment(environment) {
|
|
32
|
-
return environment[AKUMA_REQUESTS_ENV] === undefined
|
|
33
|
-
? localExecutionContext()
|
|
34
|
-
: bodyRequestExecution({ directory: environment[AKUMA_REQUESTS_ENV] });
|
|
35
|
-
}
|
|
36
30
|
function homeFromEnvironment(environment) {
|
|
37
31
|
const mapped = environment.KEIYAKU_HOME?.trim();
|
|
38
32
|
return mapped === undefined || mapped.length === 0 ? undefined : mapped;
|
|
@@ -175,16 +169,16 @@ export async function runCliCommand(invocation, input = {}) {
|
|
|
175
169
|
const home = homeFromEnvironment(environment);
|
|
176
170
|
const cancellation = cliCancellation(input.signal);
|
|
177
171
|
let progress;
|
|
178
|
-
const runtime = {
|
|
179
|
-
environment,
|
|
180
|
-
execution: executionForEnvironment(environment),
|
|
181
|
-
...(home === undefined ? {} : { home }),
|
|
182
|
-
readStdin: memoized(input.readStdin ?? processStdin),
|
|
183
|
-
signal: cancellation.signal,
|
|
184
|
-
progress: () => (progress ??= writeExecutionProgress()),
|
|
185
|
-
...(input.actor === undefined ? {} : { actor: input.actor }),
|
|
186
|
-
};
|
|
187
172
|
try {
|
|
173
|
+
const runtime = {
|
|
174
|
+
environment,
|
|
175
|
+
execution: await executionForEnvironment(environment, cancellation.signal),
|
|
176
|
+
...(home === undefined ? {} : { home }),
|
|
177
|
+
readStdin: memoized(input.readStdin ?? processStdin),
|
|
178
|
+
signal: cancellation.signal,
|
|
179
|
+
progress: () => (progress ??= writeExecutionProgress()),
|
|
180
|
+
...(input.actor === undefined ? {} : { actor: input.actor }),
|
|
181
|
+
};
|
|
188
182
|
if (command.command === "install")
|
|
189
183
|
return await runInstall(command, environment);
|
|
190
184
|
await admitBindInput(command, invocation, runtime, input.cwd ?? process.cwd());
|
|
@@ -195,8 +189,8 @@ export async function runCliCommand(invocation, input = {}) {
|
|
|
195
189
|
...(invocation.workdir === undefined ? {} : { workdir: invocation.workdir }),
|
|
196
190
|
command,
|
|
197
191
|
}, environment);
|
|
198
|
-
if (command.command === "
|
|
199
|
-
return await
|
|
192
|
+
if (command.command === "debt")
|
|
193
|
+
return await runDebtCommand(command, coordinates, runtime);
|
|
200
194
|
if (isParsedAkumaCommand(command))
|
|
201
195
|
return await runAkumaCommand(command, coordinates, invocation.workdir, runtime);
|
|
202
196
|
if (command.command === "history" && "contract" in command)
|
package/build/src/cli/scan.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** One surface's option table, named the way its refusal text names the surface. */
|
|
2
2
|
export type ScanFlagKind = "boolean" | "value" | "raw-value" | "repeat";
|
|
3
3
|
export type ScanSpec<Reader extends string = string> = Readonly<{
|
|
4
|
-
/** Names this surface in refusal text: `bind`, `call`, `
|
|
4
|
+
/** Names this surface in refusal text: `bind`, `call`, `debt add`. */
|
|
5
5
|
subject: string;
|
|
6
6
|
flags: Readonly<Record<string, ScanFlagKind>>;
|
|
7
7
|
/** The reader that consumes `-` input; absent makes `-` invalid here. */
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { type ExecutionContext } from "../akuma/requests.js";
|
|
2
|
-
import
|
|
3
|
-
import type { KanshiReport } from "../kanshi/index.js";
|
|
2
|
+
import { Keiyaku, type ContractId, type Repo } from "../index.js";
|
|
4
3
|
type SelectedContract = Readonly<{
|
|
5
4
|
id: ContractId;
|
|
6
5
|
contract: Keiyaku;
|
|
7
6
|
}>;
|
|
8
7
|
export declare function contractFromInput(repo: Repo, value: string, execution?: ExecutionContext): SelectedContract;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export declare function resolveContractId(repo: Repo, selector: string | undefined, scope: string): Promise<ContractId>;
|
|
8
|
+
/** Adapt public Contract resolution evidence to the existing CLI usage diagnostics. */
|
|
9
|
+
export declare function resolveContractId(repo: Repo, selector: string | undefined, cwd: string): Promise<ContractId>;
|
|
12
10
|
export declare function canonicalContractSelector(selector: string): ContractId;
|
|
13
|
-
export declare function resolveKanshiContract(report: KanshiReport, selector: string): string;
|
|
14
11
|
export {};
|
|
@@ -1,76 +1,45 @@
|
|
|
1
|
-
import { resolve } from "node:path";
|
|
2
1
|
import { localExecutionContext } from "../akuma/requests.js";
|
|
3
2
|
import { identitySegments } from "../identity/coordinates.js";
|
|
3
|
+
import { Keiyaku } from "../index.js";
|
|
4
4
|
import { composeContractLibrary } from "../library/contract-composition.js";
|
|
5
5
|
import { createKeiyakuHandle } from "../library/keiyaku.js";
|
|
6
6
|
import { CliUsageError } from "./parse.js";
|
|
7
|
-
function selectorError(message) {
|
|
8
|
-
throw new CliUsageError(message);
|
|
9
|
-
}
|
|
10
|
-
function activeManagedCandidates(rows) {
|
|
11
|
-
return rows.flatMap((contract) => {
|
|
12
|
-
if (contract.disposition !== "active" || contract.workspace !== "worktree" || contract.worktreePath === null)
|
|
13
|
-
return [];
|
|
14
|
-
return [{ id: contract.id, worktreePath: contract.worktreePath }];
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
7
|
export function contractFromInput(repo, value, execution = localExecutionContext()) {
|
|
18
8
|
try {
|
|
19
9
|
const id = value;
|
|
20
10
|
return { id, contract: composeContractLibrary(execution, createKeiyakuHandle).select({ repo, id }) };
|
|
21
11
|
}
|
|
22
12
|
catch (error) {
|
|
23
|
-
|
|
13
|
+
throw new CliUsageError(error instanceof Error ? error.message : String(error));
|
|
24
14
|
}
|
|
25
15
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
16
|
+
/** Adapt public Contract resolution evidence to the existing CLI usage diagnostics. */
|
|
17
|
+
export async function resolveContractId(repo, selector, cwd) {
|
|
18
|
+
const result = await Keiyaku.with().resolve({ repo, ...(selector === undefined ? {} : { selector }), cwd });
|
|
19
|
+
if (result.kind === "resolved")
|
|
20
|
+
return result.id;
|
|
21
|
+
const refusal = result.refusal;
|
|
22
|
+
switch (refusal.kind) {
|
|
23
|
+
case "invalid-selector":
|
|
24
|
+
throw new CliUsageError(refusal.diagnostic);
|
|
25
|
+
case "redundant-short-selector":
|
|
26
|
+
throw new CliUsageError(`redundant short contract selector: ${refusal.selector}`);
|
|
27
|
+
case "unknown-short-selector":
|
|
28
|
+
throw new CliUsageError(`unknown contract selector: ${refusal.selector}`);
|
|
29
|
+
case "ambiguous-selector":
|
|
30
|
+
throw new CliUsageError("selector" in refusal
|
|
31
|
+
? `ambiguous contract selector: ${refusal.selector}`
|
|
32
|
+
: "ambiguous managed worktree contract selector");
|
|
33
|
+
case "no-contextual-match":
|
|
34
|
+
throw new CliUsageError("an explicit full or @ contract selector is required outside a managed worktree");
|
|
41
35
|
}
|
|
42
|
-
if (candidates.length !== 1)
|
|
43
|
-
selectorError("ambiguous managed worktree contract selector");
|
|
44
|
-
return candidates[0].id;
|
|
45
|
-
}
|
|
46
|
-
export function resolveContextualContract(board, selector, scope) {
|
|
47
|
-
if (selector === undefined)
|
|
48
|
-
return resolveOmittedContract(board, scope);
|
|
49
|
-
if (selector.startsWith("@"))
|
|
50
|
-
return resolveShortContract(board.rows, selector);
|
|
51
|
-
return selectorError(`contract selector must be kei/<contract-segment> or @<contract-segment>: ${selector}`);
|
|
52
|
-
}
|
|
53
|
-
/** Resolve one explicit, short, or worktree-contextual selector to its Contract id. */
|
|
54
|
-
export async function resolveContractId(repo, selector, scope) {
|
|
55
|
-
if (selector !== undefined && !selector.startsWith("@"))
|
|
56
|
-
return contractFromInput(repo, selector).id;
|
|
57
|
-
const { listKeiyaku } = await import("../library/contract-composition.js");
|
|
58
|
-
return resolveContextualContract(await listKeiyaku({ repo }), selector, scope);
|
|
59
36
|
}
|
|
60
37
|
export function canonicalContractSelector(selector) {
|
|
61
38
|
try {
|
|
62
39
|
identitySegments({ family: "kei", value: selector });
|
|
63
40
|
}
|
|
64
41
|
catch {
|
|
65
|
-
|
|
42
|
+
throw new CliUsageError(`contract selector must use kei/: ${selector}`);
|
|
66
43
|
}
|
|
67
44
|
return selector;
|
|
68
45
|
}
|
|
69
|
-
export function resolveKanshiContract(report, selector) {
|
|
70
|
-
if (report.contracts.kind !== "present") {
|
|
71
|
-
return selectorError(`cannot select a contract while the Contract world is ${report.contracts.kind}`);
|
|
72
|
-
}
|
|
73
|
-
if (selector.startsWith("@"))
|
|
74
|
-
return resolveShortContract(report.contracts.value.rows, selector);
|
|
75
|
-
return canonicalContractSelector(selector);
|
|
76
|
-
}
|
package/build/src/cli/usage.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export type CliUsageGuide = Readonly<{
|
|
|
6
6
|
hideDiagnostic?: boolean;
|
|
7
7
|
}>;
|
|
8
8
|
export declare const ROOT_USAGE_GUIDE: CliUsageGuide;
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const DEBT_FAMILY_USAGE_GUIDE: CliUsageGuide;
|
|
10
10
|
export declare function acceptsFromUsage(usage: string): string;
|
|
11
11
|
export declare function commandGuide(commandPath: string, usage: string): CliUsageGuide;
|
|
12
12
|
export declare function unknownCommandGuide(guide: CliUsageGuide, given: string): CliUsageGuide;
|
package/build/src/cli/usage.js
CHANGED
|
@@ -3,10 +3,10 @@ export const ROOT_USAGE_GUIDE = {
|
|
|
3
3
|
accepts: "keiyaku <command> [options]",
|
|
4
4
|
help: "keiyaku --help",
|
|
5
5
|
};
|
|
6
|
-
export const
|
|
7
|
-
scope: "keiyaku
|
|
8
|
-
accepts: "keiyaku
|
|
9
|
-
help: "keiyaku
|
|
6
|
+
export const DEBT_FAMILY_USAGE_GUIDE = {
|
|
7
|
+
scope: "keiyaku debt",
|
|
8
|
+
accepts: "keiyaku debt <command> ...",
|
|
9
|
+
help: "keiyaku debt --help",
|
|
10
10
|
};
|
|
11
11
|
export function acceptsFromUsage(usage) {
|
|
12
12
|
return usage
|
|
@@ -6,10 +6,10 @@ import { CONTRACT_DELIVERER_SKILL, CONTRACT_REVIEWER_SKILL, CONTRACT_ONBOARDING_
|
|
|
6
6
|
import { executeGit } from "./git/process.js";
|
|
7
7
|
import { worktreePath } from "./git/workspace.js";
|
|
8
8
|
import { appointmentFor, placeRegisterPath } from "./workspace-place.js";
|
|
9
|
-
import { repairNamespaceContext } from "./
|
|
10
|
-
import { contractNamespace } from "./
|
|
9
|
+
import { repairNamespaceContext } from "./debt/context.js";
|
|
10
|
+
import { contractNamespace } from "./debt/identity.js";
|
|
11
11
|
const IGNORE_BYTES = ".gitignore\nKEIYAKU.md\n";
|
|
12
|
-
const PRIMARY_IGNORE_BYTES = "*\n!settings.json\n!
|
|
12
|
+
const PRIMARY_IGNORE_BYTES = "*\n!settings.json\n!debts/\n!debts/**\n";
|
|
13
13
|
const SEAT_IGNORE_BYTES = ".gitignore\nSKILL.md\n";
|
|
14
14
|
const SEAT_SKILLS = [
|
|
15
15
|
["keiyaku-onboarding", CONTRACT_ONBOARDING_SKILL],
|