@astrosheep/keiyaku 4.0.4 → 4.0.6
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/build/integrations/marketplace/plugins/keiyaku/.claude-plugin/plugin.json +1 -1
- package/build/integrations/marketplace/plugins/keiyaku/.codex-plugin/plugin.json +1 -1
- package/build/integrations/marketplace/plugins/keiyaku/package.json +1 -1
- package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku/SKILL.md +4 -4
- package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-akuma/SKILL.md +15 -7
- package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-bind/SKILL.md +5 -3
- package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-workflow/SKILL.md +24 -4
- package/build/src/akuma/akuma.d.ts +2 -1
- package/build/src/akuma/akuma.js +27 -9
- package/build/src/akuma/allowed.d.ts +1 -1
- package/build/src/akuma/allowed.js +3 -10
- package/build/src/akuma/archetype.d.ts +3 -1
- package/build/src/akuma/archetype.js +11 -6
- package/build/src/akuma/body-turn.d.ts +64 -0
- package/build/src/akuma/body-turn.js +449 -0
- package/build/src/akuma/body.d.ts +4 -5
- package/build/src/akuma/body.js +9 -414
- package/build/src/akuma/heart/facts.d.ts +37 -9
- package/build/src/akuma/heart/facts.js +3 -1
- package/build/src/akuma/heart/index.d.ts +4 -13
- package/build/src/akuma/heart/index.js +14 -135
- package/build/src/akuma/heart/request-authority.d.ts +12 -0
- package/build/src/akuma/heart/request-authority.js +119 -0
- package/build/src/akuma/heart/request-rows.d.ts +16 -0
- package/build/src/akuma/heart/request-rows.js +88 -0
- package/build/src/akuma/heart/rows.d.ts +1 -28
- package/build/src/akuma/heart/rows.js +4 -138
- package/build/src/akuma/heart/schema.d.ts +1 -1
- package/build/src/akuma/heart/schema.js +11 -3
- package/build/src/akuma/heart/soul.js +0 -36
- package/build/src/akuma/heart/timeline.d.ts +1 -0
- package/build/src/akuma/heart/timeline.js +19 -0
- package/build/src/akuma/index.d.ts +1 -1
- package/build/src/akuma/nuke.d.ts +2 -0
- package/build/src/akuma/nuke.js +152 -0
- package/build/src/akuma/provider-recipe.js +1 -11
- package/build/src/akuma/provider.d.ts +4 -7
- package/build/src/akuma/providers/acp/config.d.ts +8 -0
- package/build/src/akuma/providers/acp/config.js +37 -0
- package/build/src/akuma/providers/acp/core.js +12 -2
- package/build/src/akuma/providers/acp/index.d.ts +1 -8
- package/build/src/akuma/providers/acp/index.js +2 -38
- package/build/src/akuma/providers/claude/index.d.ts +0 -4
- package/build/src/akuma/providers/claude/index.js +12 -3
- package/build/src/akuma/providers/codex-app-server/index.d.ts +2 -27
- package/build/src/akuma/providers/codex-app-server/index.js +5 -2
- package/build/src/akuma/providers/grok-build/index.js +1 -2
- package/build/src/akuma/providers/index.d.ts +3 -2
- package/build/src/akuma/providers/index.js +36 -36
- package/build/src/akuma/providers/opencode-sdk/index.d.ts +2 -28
- package/build/src/akuma/providers/opencode-sdk/index.js +14 -4
- package/build/src/akuma/providers/opencode-sdk/session.d.ts +2 -2
- package/build/src/akuma/providers/opencode-sdk/session.js +2 -2
- package/build/src/akuma/providers/pi/index.d.ts +1 -1
- package/build/src/akuma/providers/pi/index.js +29 -6
- package/build/src/akuma/request-serve.d.ts +88 -0
- package/build/src/akuma/request-serve.js +484 -0
- package/build/src/akuma/request-wire.d.ts +125 -0
- package/build/src/akuma/request-wire.js +383 -0
- package/build/src/akuma/requests.d.ts +28 -94
- package/build/src/akuma/requests.js +52 -562
- package/build/src/akuma-body.d.ts +7 -0
- package/build/src/akuma-body.js +69 -2
- package/build/src/alias/index.d.ts +1 -0
- package/build/src/alias/index.js +34 -1
- package/build/src/body/arc.js +4 -29
- package/build/src/body/decode.js +5 -39
- package/build/src/body/envelope.d.ts +7 -0
- package/build/src/body/envelope.js +37 -0
- package/build/src/cli/accepted.js +21 -9
- package/build/src/cli/commands/akuma-invoke.js +1 -0
- package/build/src/cli/commands/akuma.d.ts +1 -0
- package/build/src/cli/commands/akuma.js +13 -10
- package/build/src/cli/commands/contract.d.ts +28 -17
- package/build/src/cli/commands/contract.js +23 -17
- package/build/src/cli/commands/install.d.ts +2 -2
- package/build/src/cli/commands/install.js +6 -6
- package/build/src/cli/commands/nuke.d.ts +10 -0
- package/build/src/cli/commands/nuke.js +20 -0
- package/build/src/cli/commands/task-invoke.d.ts +15 -0
- package/build/src/cli/commands/task-invoke.js +144 -24
- package/build/src/cli/commands/task-query.d.ts +2 -2
- package/build/src/cli/commands/task-query.js +1 -2
- package/build/src/cli/commands/task.js +22 -22
- package/build/src/cli/coordinates.d.ts +6 -2
- package/build/src/cli/coordinates.js +12 -56
- package/build/src/cli/invoke.d.ts +5 -4
- package/build/src/cli/invoke.js +112 -58
- package/build/src/cli/main.d.ts +0 -2
- package/build/src/cli/main.js +4 -140
- package/build/src/cli/parse.d.ts +17 -4
- package/build/src/cli/parse.js +93 -15
- package/build/src/cli/render/akuma.js +111 -53
- package/build/src/cli/render/audit.js +2 -6
- package/build/src/cli/render/contract.js +61 -20
- package/build/src/cli/render/kanshi.js +15 -5
- package/build/src/cli/render/nuke.d.ts +3 -0
- package/build/src/cli/render/nuke.js +8 -0
- package/build/src/cli/render/receipt.js +28 -1
- package/build/src/cli/render/refusal.d.ts +2 -1
- package/build/src/cli/render/refusal.js +31 -0
- package/build/src/cli/render/terminal.d.ts +0 -2
- package/build/src/cli/render/terminal.js +0 -29
- package/build/src/cli/render/text.js +6 -1
- package/build/src/cli/result.d.ts +36 -9
- package/build/src/cli/runtime.d.ts +2 -0
- package/build/src/cli/runtime.js +140 -0
- package/build/src/cli/usage.d.ts +0 -2
- package/build/src/cli/usage.js +0 -4
- package/build/src/contract-worktree.d.ts +29 -14
- package/build/src/contract-worktree.js +131 -70
- package/build/src/core/facts/codec.js +9 -0
- package/build/src/core/facts/fold.js +13 -1
- package/build/src/core/facts/types.d.ts +8 -1
- package/build/src/core/subject.js +4 -3
- package/build/src/core/verbs/placement.d.ts +9 -1
- package/build/src/core/verbs/placement.js +24 -6
- package/build/src/core/verbs/reintegrate.d.ts +13 -0
- package/build/src/core/verbs/reintegrate.js +24 -0
- package/build/src/dispatch/index.d.ts +1 -1
- package/build/src/git/admission.d.ts +2 -1
- package/build/src/git/hooks.d.ts +2 -0
- package/build/src/git/hooks.js +34 -1
- package/build/src/git/integration.d.ts +9 -2
- package/build/src/git/integration.js +92 -1
- package/build/src/git/nuke.d.ts +2 -0
- package/build/src/git/nuke.js +97 -0
- package/build/src/git/observe.d.ts +2 -1
- package/build/src/git/observe.js +6 -5
- package/build/src/git/process.d.ts +28 -0
- package/build/src/git/process.js +94 -0
- package/build/src/git/read-observation.d.ts +2 -1
- package/build/src/git/read-observation.js +3 -2
- package/build/src/git/reconcile.d.ts +4 -1
- package/build/src/git/reconcile.js +42 -8
- package/build/src/git/repository.d.ts +2 -29
- package/build/src/git/repository.js +7 -118
- package/build/src/git/scratch.d.ts +1 -1
- package/build/src/git/scratch.js +1 -1
- package/build/src/git/target-placement.d.ts +3 -2
- package/build/src/git/target-placement.js +15 -14
- package/build/src/git/tender.d.ts +2 -1
- package/build/src/git/tender.js +4 -3
- package/build/src/git/terminal-seal.d.ts +2 -2
- package/build/src/git/terminal-seal.js +3 -6
- package/build/src/git/workspace.d.ts +4 -1
- package/build/src/git/workspace.js +1 -1
- package/build/src/index.d.ts +1 -2
- package/build/src/index.js +1 -1
- package/build/src/kanshi/read.js +5 -1
- package/build/src/library/address.js +7 -1
- package/build/src/library/akuma-creation.d.ts +1 -0
- package/build/src/library/akuma-creation.js +8 -1
- package/build/src/library/audit.d.ts +3 -1
- package/build/src/library/audit.js +2 -1
- package/build/src/library/bind.d.ts +2 -1
- package/build/src/library/bind.js +1 -1
- package/build/src/library/configuration.d.ts +1 -1
- package/build/src/library/configuration.js +52 -18
- package/build/src/library/contract.d.ts +59 -4
- package/build/src/library/contract.js +195 -34
- package/build/src/library/delivery.d.ts +4 -2
- package/build/src/library/fleet.d.ts +27 -7
- package/build/src/library/fleet.js +79 -39
- package/build/src/library/input.d.ts +0 -1
- package/build/src/library/input.js +0 -5
- package/build/src/library/keiyaku.d.ts +6 -2
- package/build/src/library/keiyaku.js +2 -0
- package/build/src/library/mutation.d.ts +3 -1
- package/build/src/library/mutation.js +3 -0
- package/build/src/library/nuke.d.ts +14 -0
- package/build/src/library/nuke.js +54 -0
- package/build/src/library/reconcile.d.ts +2 -1
- package/build/src/library/reconcile.js +8 -3
- package/build/src/library/refusal.d.ts +10 -1
- package/build/src/library/region.d.ts +1 -1
- package/build/src/library/repo.d.ts +4 -1
- package/build/src/library/repo.js +10 -4
- package/build/src/protocol/abandon.d.ts +9 -0
- package/build/src/protocol/abandon.js +15 -0
- package/build/src/protocol/amend.d.ts +16 -0
- package/build/src/protocol/amend.js +77 -0
- package/build/src/protocol/arc.d.ts +6 -0
- package/build/src/protocol/arc.js +12 -0
- package/build/src/protocol/attempt.d.ts +2 -1
- package/build/src/protocol/audit.d.ts +53 -0
- package/build/src/protocol/audit.js +147 -0
- package/build/src/protocol/bind.d.ts +1 -1
- package/build/src/protocol/completion.d.ts +42 -0
- package/build/src/protocol/completion.js +183 -0
- package/build/src/protocol/deliver.d.ts +49 -0
- package/build/src/protocol/deliver.js +261 -0
- package/build/src/protocol/intent.d.ts +2 -1
- package/build/src/protocol/intent.js +8 -2
- package/build/src/protocol/operations.d.ts +93 -202
- package/build/src/protocol/operations.js +23 -642
- package/build/src/protocol/placement.d.ts +12 -13
- package/build/src/protocol/placement.js +8 -19
- package/build/src/protocol/read/status.d.ts +17 -5
- package/build/src/protocol/read/status.js +57 -13
- package/build/src/protocol/reconcile.d.ts +35 -0
- package/build/src/protocol/reconcile.js +41 -0
- package/build/src/protocol/reintegrate.d.ts +31 -0
- package/build/src/protocol/reintegrate.js +74 -0
- package/build/src/protocol/review.d.ts +34 -0
- package/build/src/protocol/review.js +156 -0
- package/build/src/protocol/run.d.ts +1 -1
- package/build/src/runtime/proc/run.js +9 -5
- package/build/src/settlement/fence.d.ts +3 -1
- package/build/src/settlement/fence.js +24 -0
- package/build/src/settlement/holder.d.ts +1 -1
- package/build/src/settlement/settle.d.ts +1 -1
- package/build/src/settlement/settle.js +1 -2
- package/build/src/task/board.d.ts +0 -1
- package/build/src/task/board.js +0 -3
- package/build/src/task/compose.d.ts +2 -2
- package/build/src/task/compose.js +13 -11
- package/build/src/task/context.d.ts +14 -2
- package/build/src/task/context.js +30 -7
- package/build/src/task/index.d.ts +7 -6
- package/build/src/task/index.js +17 -145
- package/build/src/task/input.d.ts +18 -0
- package/build/src/task/input.js +189 -0
- package/build/src/task/mutation.d.ts +44 -0
- package/build/src/task/mutation.js +93 -0
- package/build/src/task/operations.d.ts +14 -6
- package/build/src/task/operations.js +57 -57
- package/build/src/task/store.d.ts +1 -0
- package/build/src/task/store.js +91 -3
- package/build/src/verification/execution.d.ts +1 -1
- package/build/src/workspace-place.d.ts +3 -4
- package/build/src/workspace-place.js +26 -15
- package/package.json +3 -3
package/build/src/akuma-body.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { runAkumaBody } from "./akuma/body.js";
|
|
2
2
|
import { worldRootForAkumaPaths } from "./akuma/identity.js";
|
|
3
3
|
import { executeKillAkuma, executeTellAkuma, executeWaitAkuma, } from "./library/fleet.js";
|
|
4
|
-
|
|
4
|
+
import { requireBranchesToBeUpToDateFrom, worktreeHooksFrom, } from "./library/configuration.js";
|
|
5
|
+
import { executeForwardedDeliver, executeForwardedReview, } from "./library/contract.js";
|
|
6
|
+
import { Repo } from "./library/repo.js";
|
|
7
|
+
import { settings } from "./settings.js";
|
|
8
|
+
import { executeTaskMutation } from "./task/mutation.js";
|
|
9
|
+
export function upstreamFor(launch, processConfiguration) {
|
|
5
10
|
const path = worldRootForAkumaPaths(launch.paths);
|
|
6
11
|
return {
|
|
7
12
|
wait: async (input) => await executeWaitAkuma({
|
|
@@ -26,6 +31,68 @@ function upstreamFor(launch) {
|
|
|
26
31
|
service: result.results.map(({ id, evidence }) => ({ id, evidence })),
|
|
27
32
|
};
|
|
28
33
|
},
|
|
34
|
+
deliver: async (input) => {
|
|
35
|
+
const [repo, configuration] = await Promise.all([
|
|
36
|
+
Repo.at({
|
|
37
|
+
path: input.repoRoot,
|
|
38
|
+
...(processConfiguration.gitPath === undefined ? {} : { gitPath: processConfiguration.gitPath }),
|
|
39
|
+
}),
|
|
40
|
+
settings({
|
|
41
|
+
root: input.repoRoot,
|
|
42
|
+
...(processConfiguration.home === undefined ? {} : { home: processConfiguration.home }),
|
|
43
|
+
}),
|
|
44
|
+
]);
|
|
45
|
+
return await executeForwardedDeliver({
|
|
46
|
+
repo,
|
|
47
|
+
contractId: input.contractId,
|
|
48
|
+
requester: input.requester,
|
|
49
|
+
...(input.message === undefined ? {} : { message: input.message }),
|
|
50
|
+
includeDirty: input.includeDirty,
|
|
51
|
+
materializeConflict: input.materializeConflict,
|
|
52
|
+
requireBranchesToBeUpToDate: requireBranchesToBeUpToDateFrom({ settings: configuration }),
|
|
53
|
+
hooks: worktreeHooksFrom({ settings: configuration }),
|
|
54
|
+
signal: input.signal,
|
|
55
|
+
});
|
|
56
|
+
},
|
|
57
|
+
review: async (input) => {
|
|
58
|
+
const [repo, configuration] = await Promise.all([
|
|
59
|
+
Repo.at({
|
|
60
|
+
path: input.repoRoot,
|
|
61
|
+
...(processConfiguration.gitPath === undefined ? {} : { gitPath: processConfiguration.gitPath }),
|
|
62
|
+
}),
|
|
63
|
+
settings({
|
|
64
|
+
root: input.repoRoot,
|
|
65
|
+
...(processConfiguration.home === undefined ? {} : { home: processConfiguration.home }),
|
|
66
|
+
}),
|
|
67
|
+
]);
|
|
68
|
+
return await executeForwardedReview({
|
|
69
|
+
repo,
|
|
70
|
+
contractId: input.contractId,
|
|
71
|
+
requester: input.requester,
|
|
72
|
+
verdict: input.verdict,
|
|
73
|
+
...(input.summary === undefined ? {} : { summary: input.summary }),
|
|
74
|
+
hooks: worktreeHooksFrom({ settings: configuration }),
|
|
75
|
+
});
|
|
76
|
+
},
|
|
77
|
+
task: async (input) => await executeTaskMutation({
|
|
78
|
+
world: input.world,
|
|
79
|
+
request: input.request,
|
|
80
|
+
requester: input.requester,
|
|
81
|
+
signal: input.signal,
|
|
82
|
+
}),
|
|
29
83
|
};
|
|
30
84
|
}
|
|
31
|
-
|
|
85
|
+
const encoded = process.argv[2];
|
|
86
|
+
if (encoded === undefined)
|
|
87
|
+
throw new TypeError("Akuma body launch payload is missing");
|
|
88
|
+
const launch = JSON.parse(Buffer.from(encoded, "base64url").toString("utf8"));
|
|
89
|
+
const mappedHome = process.env.KEIYAKU_HOME?.trim();
|
|
90
|
+
const mappedGitPath = process.env.KEIYAKU_GIT_PATH;
|
|
91
|
+
if (mappedGitPath !== undefined && mappedGitPath.trim().length === 0) {
|
|
92
|
+
throw new TypeError("KEIYAKU_GIT_PATH requires a nonblank value");
|
|
93
|
+
}
|
|
94
|
+
const configuration = {
|
|
95
|
+
...(mappedHome === undefined || mappedHome.length === 0 ? {} : { home: mappedHome }),
|
|
96
|
+
...(mappedGitPath === undefined ? {} : { gitPath: mappedGitPath }),
|
|
97
|
+
};
|
|
98
|
+
await runAkumaBody(launch, upstreamFor(launch, configuration));
|
|
@@ -9,6 +9,7 @@ export type AliasMove = Readonly<{
|
|
|
9
9
|
alias: AliasBinding;
|
|
10
10
|
previous: AkuId | null;
|
|
11
11
|
}>;
|
|
12
|
+
export declare function nukeAliases(world: WorldRoot): Promise<void>;
|
|
12
13
|
export declare function readAliases(world: WorldRoot): Promise<readonly AliasBinding[]>;
|
|
13
14
|
export declare function resolveAlias(world: WorldRoot, value: AkumaAlias): Promise<AkuId | null>;
|
|
14
15
|
export declare function moveAlias(input: Readonly<{
|
package/build/src/alias/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mkdir, readFile } from "node:fs/promises";
|
|
1
|
+
import { lstat, mkdir, readFile, unlink } from "node:fs/promises";
|
|
2
2
|
import { dirname, resolve } from "node:path";
|
|
3
3
|
import { parseAkuId } from "../akuma/identity.js";
|
|
4
4
|
import { replaceFileDurably } from "../coordination/durable-file.js";
|
|
@@ -77,6 +77,39 @@ async function read(path) {
|
|
|
77
77
|
throw error;
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
+
async function regularFile(path) {
|
|
81
|
+
try {
|
|
82
|
+
const value = await lstat(path);
|
|
83
|
+
if (!value.isFile() || value.isSymbolicLink())
|
|
84
|
+
throw new Error(`Alias custody is not a regular file: ${path}`);
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
if (error.code === "ENOENT")
|
|
89
|
+
return false;
|
|
90
|
+
throw error;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
export async function nukeAliases(world) {
|
|
94
|
+
const location = paths(world);
|
|
95
|
+
const initialAuthority = await regularFile(location.authority);
|
|
96
|
+
const initialLock = await regularFile(location.lock);
|
|
97
|
+
if (!initialAuthority && !initialLock)
|
|
98
|
+
return;
|
|
99
|
+
const held = await acquireSqliteTransactionLock({ path: location.lock, mode: "immediate" });
|
|
100
|
+
try {
|
|
101
|
+
// Alias writers use this same custody lock. Observe after acquiring it so
|
|
102
|
+
// an authority committed by a prior holder is part of this reset sweep.
|
|
103
|
+
const authorityPresent = await regularFile(location.authority);
|
|
104
|
+
if (authorityPresent) {
|
|
105
|
+
await read(location.authority);
|
|
106
|
+
await unlink(location.authority);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
finally {
|
|
110
|
+
held.close();
|
|
111
|
+
}
|
|
112
|
+
}
|
|
80
113
|
export async function readAliases(world) {
|
|
81
114
|
return await read(paths(world).authority);
|
|
82
115
|
}
|
package/build/src/body/arc.js
CHANGED
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { sectionContent } from "../markdown/query.js";
|
|
2
|
+
import { decodeDocumentEnvelope } from "./envelope.js";
|
|
3
3
|
function refusal(message) {
|
|
4
4
|
throw new TypeError(message);
|
|
5
5
|
}
|
|
6
|
-
function nonblankRaw(document, node) {
|
|
7
|
-
return rawSlice(document, node.span).trim().length > 0;
|
|
8
|
-
}
|
|
9
|
-
function topLevelSections(document) {
|
|
10
|
-
return indexedHeadings(indexDocument(document), { level: 2 })
|
|
11
|
-
.filter((node) => node.type === "section");
|
|
12
|
-
}
|
|
13
6
|
function requiredProse(document, sections, name) {
|
|
14
7
|
const section = sections.get(name);
|
|
15
8
|
if (section === undefined)
|
|
@@ -20,31 +13,13 @@ function requiredProse(document, sections, name) {
|
|
|
20
13
|
return value;
|
|
21
14
|
}
|
|
22
15
|
export function decodeArcDocument(source) {
|
|
23
|
-
const document =
|
|
24
|
-
if (document.frontmatter !== undefined)
|
|
25
|
-
refusal("arc document may not contain frontmatter");
|
|
26
|
-
const titles = indexedHeadings(indexDocument(document), { level: 1 })
|
|
27
|
-
.filter((node) => node.type === "section");
|
|
28
|
-
if (titles.length !== 1)
|
|
29
|
-
refusal("arc document requires exactly one H1 title");
|
|
30
|
-
const title = titles[0];
|
|
16
|
+
const { document, title, sections } = decodeDocumentEnvelope(source, "arc");
|
|
31
17
|
if (title.title.trim().length === 0)
|
|
32
18
|
refusal("arc title must be nonblank");
|
|
33
|
-
|
|
34
|
-
refusal("arc title may not contain content before the first H2 section");
|
|
35
|
-
}
|
|
36
|
-
const stray = document.children.filter((node) => node.type !== "section" && nonblankRaw(document, node));
|
|
37
|
-
if (stray.length > 0)
|
|
38
|
-
refusal("arc document contains content outside an H1 or H2 section");
|
|
39
|
-
const sections = new Map();
|
|
40
|
-
for (const section of topLevelSections(document)) {
|
|
41
|
-
const name = normalizeTitle(section.title);
|
|
42
|
-
if (sections.has(name))
|
|
43
|
-
refusal(`duplicate arc section '${section.title}'`);
|
|
19
|
+
for (const [name, section] of sections) {
|
|
44
20
|
if (name !== "objective" && name !== "brief") {
|
|
45
21
|
refusal(`arc document does not allow ## ${section.title}`);
|
|
46
22
|
}
|
|
47
|
-
sections.set(name, section);
|
|
48
23
|
}
|
|
49
24
|
return {
|
|
50
25
|
title: title.title,
|
package/build/src/body/decode.js
CHANGED
|
@@ -1,29 +1,12 @@
|
|
|
1
1
|
import { mintDocumentKey, mintDocumentSegmentKey } from "./keys.js";
|
|
2
|
-
import {
|
|
3
|
-
import { directChildren,
|
|
2
|
+
import { decodeDocumentEnvelope } from "./envelope.js";
|
|
3
|
+
import { directChildren, normalizeTitle, rawSlice, sectionContent, } from "../markdown/query.js";
|
|
4
4
|
import { CONTRACT_SECTIONS, RESERVED_SECTIONS } from "./shape.js";
|
|
5
5
|
import { decodeRegion, RegionDocumentError } from "./region.js";
|
|
6
6
|
import { decodeVerificationDeclarations, VerificationDocumentError } from "./verification.js";
|
|
7
7
|
function refusal(message) {
|
|
8
8
|
throw new TypeError(message);
|
|
9
9
|
}
|
|
10
|
-
function nonblankRaw(document, node) {
|
|
11
|
-
return rawSlice(document, node.span).trim().length > 0;
|
|
12
|
-
}
|
|
13
|
-
function topLevelSections(document) {
|
|
14
|
-
return indexedHeadings(indexDocument(document), { level: 2 })
|
|
15
|
-
.filter((node) => node.type === "section");
|
|
16
|
-
}
|
|
17
|
-
function indexedSections(document) {
|
|
18
|
-
const sections = new Map();
|
|
19
|
-
for (const section of topLevelSections(document)) {
|
|
20
|
-
const title = normalizeTitle(section.title);
|
|
21
|
-
if (sections.has(title))
|
|
22
|
-
refusal(`duplicate contract section '${section.title}'`);
|
|
23
|
-
sections.set(title, section);
|
|
24
|
-
}
|
|
25
|
-
return sections;
|
|
26
|
-
}
|
|
27
10
|
function requireSections(sections) {
|
|
28
11
|
for (const [name, spec] of Object.entries(CONTRACT_SECTIONS)) {
|
|
29
12
|
if (spec.required && !sections.has(name))
|
|
@@ -72,14 +55,6 @@ function criteria(document, section) {
|
|
|
72
55
|
return { title, body };
|
|
73
56
|
});
|
|
74
57
|
}
|
|
75
|
-
function rejectUnownedBytes(document, title) {
|
|
76
|
-
if (title.children.some((node) => nonblankRaw(document, node))) {
|
|
77
|
-
refusal("contract title may not contain content before the first H2 section");
|
|
78
|
-
}
|
|
79
|
-
const stray = document.children.filter((node) => node.type !== "section" && nonblankRaw(document, node));
|
|
80
|
-
if (stray.length > 0)
|
|
81
|
-
refusal("contract document contains content outside an H1 or H2 section");
|
|
82
|
-
}
|
|
83
58
|
function verification(document, section) {
|
|
84
59
|
try {
|
|
85
60
|
return decodeVerificationDeclarations(document, section);
|
|
@@ -91,22 +66,14 @@ function verification(document, section) {
|
|
|
91
66
|
}
|
|
92
67
|
}
|
|
93
68
|
export function decodeContractDocument(source) {
|
|
94
|
-
let
|
|
69
|
+
let envelope;
|
|
95
70
|
try {
|
|
96
|
-
|
|
71
|
+
envelope = decodeDocumentEnvelope(source, "contract");
|
|
97
72
|
}
|
|
98
73
|
catch (error) {
|
|
99
74
|
refusal(error instanceof Error ? error.message : String(error));
|
|
100
75
|
}
|
|
101
|
-
|
|
102
|
-
refusal("contract document may not contain frontmatter");
|
|
103
|
-
const titles = indexedHeadings(indexDocument(document), { level: 1 })
|
|
104
|
-
.filter((node) => node.type === "section");
|
|
105
|
-
if (titles.length !== 1)
|
|
106
|
-
refusal("contract document requires exactly one H1 title");
|
|
107
|
-
const title = titles[0];
|
|
108
|
-
rejectUnownedBytes(document, title);
|
|
109
|
-
const sections = indexedSections(document);
|
|
76
|
+
const { document, title, sections, sectionNodes } = envelope;
|
|
110
77
|
requireSections(sections);
|
|
111
78
|
for (const name of RESERVED_SECTIONS) {
|
|
112
79
|
if (sections.has(name))
|
|
@@ -131,7 +98,6 @@ export function decodeContractDocument(source) {
|
|
|
131
98
|
verification: verificationSection === undefined ? [] : verification(document, verificationSection),
|
|
132
99
|
extensions,
|
|
133
100
|
};
|
|
134
|
-
const sectionNodes = topLevelSections(document);
|
|
135
101
|
const segments = sectionNodes.map((section) => mintDocumentSegmentKey(document.source, section.span));
|
|
136
102
|
return {
|
|
137
103
|
...body,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { DocumentNode, SectionNode } from "../markdown/types.js";
|
|
2
|
+
export declare function decodeDocumentEnvelope(source: string, kind: "arc" | "contract"): Readonly<{
|
|
3
|
+
document: DocumentNode;
|
|
4
|
+
title: SectionNode;
|
|
5
|
+
sections: ReadonlyMap<string, SectionNode>;
|
|
6
|
+
sectionNodes: readonly SectionNode[];
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { parseToAST } from "../markdown/parse.js";
|
|
2
|
+
import { indexDocument, indexedHeadings, normalizeTitle, rawSlice } from "../markdown/query.js";
|
|
3
|
+
function refusal(message) {
|
|
4
|
+
throw new TypeError(message);
|
|
5
|
+
}
|
|
6
|
+
function nonblankRaw(document, node) {
|
|
7
|
+
return rawSlice(document, node.span).trim().length > 0;
|
|
8
|
+
}
|
|
9
|
+
function topLevelSections(document) {
|
|
10
|
+
return indexedHeadings(indexDocument(document), { level: 2 })
|
|
11
|
+
.filter((node) => node.type === "section");
|
|
12
|
+
}
|
|
13
|
+
export function decodeDocumentEnvelope(source, kind) {
|
|
14
|
+
const document = parseToAST(source);
|
|
15
|
+
if (document.frontmatter !== undefined)
|
|
16
|
+
refusal(`${kind} document may not contain frontmatter`);
|
|
17
|
+
const titles = indexedHeadings(indexDocument(document), { level: 1 })
|
|
18
|
+
.filter((node) => node.type === "section");
|
|
19
|
+
if (titles.length !== 1)
|
|
20
|
+
refusal(`${kind} document requires exactly one H1 title`);
|
|
21
|
+
const title = titles[0];
|
|
22
|
+
if (title.children.some((node) => nonblankRaw(document, node))) {
|
|
23
|
+
refusal(`${kind} title may not contain content before the first H2 section`);
|
|
24
|
+
}
|
|
25
|
+
if (document.children.some((node) => node.type !== "section" && nonblankRaw(document, node))) {
|
|
26
|
+
refusal(`${kind} document contains content outside an H1 or H2 section`);
|
|
27
|
+
}
|
|
28
|
+
const sectionNodes = topLevelSections(document);
|
|
29
|
+
const sections = new Map();
|
|
30
|
+
for (const section of sectionNodes) {
|
|
31
|
+
const name = normalizeTitle(section.title);
|
|
32
|
+
if (sections.has(name))
|
|
33
|
+
refusal(`duplicate ${kind} section '${section.title}'`);
|
|
34
|
+
sections.set(name, section);
|
|
35
|
+
}
|
|
36
|
+
return { document, title, sections, sectionNodes };
|
|
37
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { KeiyakuRefused, KeiyakuRetry, } from "../index.js";
|
|
2
2
|
function acceptedFacts(result) {
|
|
3
|
-
return result.facts.map((fact) =>
|
|
4
|
-
contract: fact.contract,
|
|
5
|
-
entry: fact.entry,
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
return result.facts.map((fact) => fact.kind === "reintegrated"
|
|
4
|
+
? { contract: fact.contract, entry: fact.entry, kind: fact.kind, data: fact.data }
|
|
5
|
+
: { contract: fact.contract, entry: fact.entry, kind: fact.kind });
|
|
6
|
+
}
|
|
7
|
+
function attestationFor(facts, gate) {
|
|
8
|
+
return facts.findLast((fact) => fact.kind === "attestation" && fact.data.gate === gate);
|
|
8
9
|
}
|
|
9
10
|
function acceptedEnvelope(result, coordinate) {
|
|
10
11
|
const contract = coordinate ?? result.facts[0]?.contract;
|
|
@@ -45,14 +46,16 @@ export function acceptedAmend(result, coordinate) {
|
|
|
45
46
|
}
|
|
46
47
|
export function acceptedDeliver(result, coordinate) {
|
|
47
48
|
const value = result.value;
|
|
48
|
-
const attestation = result.facts
|
|
49
|
+
const attestation = attestationFor(result.facts, "verified");
|
|
49
50
|
const verificationVerdict = attestation?.data.verdict ?? value.verificationReuse?.verdict;
|
|
50
51
|
return {
|
|
51
52
|
...acceptedEnvelope(result, coordinate),
|
|
52
53
|
verb: "deliver",
|
|
54
|
+
...(value.completion === undefined ? {} : { completion: value.completion }),
|
|
53
55
|
...(verificationVerdict === undefined ? {} : { verificationVerdict }),
|
|
54
56
|
...(value.verification === undefined ? {} : { verification: value.verification }),
|
|
55
57
|
...(value.verificationReuse === undefined ? {} : { verificationReuse: value.verificationReuse }),
|
|
58
|
+
...(value.verificationSummary === undefined ? {} : { verificationSummary: value.verificationSummary }),
|
|
56
59
|
...(value.placement === undefined ? {} : { placement: value.placement }),
|
|
57
60
|
...(value.cleanup === undefined ? {} : { cleanup: value.cleanup }),
|
|
58
61
|
...(value.leak === undefined ? {} : { leak: value.leak }),
|
|
@@ -60,15 +63,24 @@ export function acceptedDeliver(result, coordinate) {
|
|
|
60
63
|
}
|
|
61
64
|
export function acceptedReview(result, coordinate) {
|
|
62
65
|
const value = result.value;
|
|
63
|
-
const
|
|
64
|
-
if (
|
|
66
|
+
const reviewAttestation = attestationFor(result.facts, "reviewed");
|
|
67
|
+
if (reviewAttestation === undefined)
|
|
65
68
|
throw new Error("accepted review is missing its attestation fact");
|
|
69
|
+
const verificationAttestation = attestationFor(result.facts, "verified");
|
|
70
|
+
const verificationVerdict = verificationAttestation?.data.verdict ?? value.verificationReuse?.verdict;
|
|
66
71
|
return {
|
|
67
72
|
...acceptedEnvelope(result, coordinate),
|
|
68
73
|
verb: "review",
|
|
69
|
-
verdict:
|
|
74
|
+
verdict: reviewAttestation.data.verdict,
|
|
75
|
+
...(value.completion === undefined ? {} : { completion: value.completion }),
|
|
76
|
+
...(verificationVerdict === undefined ? {} : { verificationVerdict }),
|
|
77
|
+
...(value.verification === undefined ? {} : { verification: value.verification }),
|
|
78
|
+
...(value.verificationReuse === undefined ? {} : { verificationReuse: value.verificationReuse }),
|
|
79
|
+
...(value.verificationSummary === undefined ? {} : { verificationSummary: value.verificationSummary }),
|
|
70
80
|
...(value.placement === undefined ? {} : { placement: value.placement }),
|
|
71
81
|
...(value.workspace === undefined ? {} : { workspace: value.workspace }),
|
|
82
|
+
...(value.cleanup === undefined ? {} : { cleanup: value.cleanup }),
|
|
83
|
+
...(value.leak === undefined ? {} : { leak: value.leak }),
|
|
72
84
|
};
|
|
73
85
|
}
|
|
74
86
|
export function acceptedArc(result, coordinate) {
|
|
@@ -102,6 +102,7 @@ export async function invokeAkuma(command, input) {
|
|
|
102
102
|
...(input.statedCwd === undefined ? {} : { cwd: input.statedCwd }),
|
|
103
103
|
mode: command.mode,
|
|
104
104
|
...(command.timeoutMs === undefined ? {} : { timeoutMs: command.timeoutMs }),
|
|
105
|
+
...(command.readonly === undefined ? {} : { readonly: command.readonly }),
|
|
105
106
|
...(input.contract === undefined ? {} : { contract: input.contract }),
|
|
106
107
|
...(command.alias === undefined ? {} : { alias: command.alias }),
|
|
107
108
|
...(command.allowed === undefined ? {} : { allowed: command.allowed }),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CliUsageError, isBlankInput, usageLine
|
|
1
|
+
import { CliUsageError, isBlankInput, usageLine } from "../usage.js";
|
|
2
2
|
import { archetypeName, parseAkuId } from "../../akuma/identity.js";
|
|
3
3
|
import { parseDuration as decodeDuration } from "../../duration.js";
|
|
4
4
|
import { parseAkumaAlias, parseAkumaGlob } from "../../identity/selector.js";
|
|
@@ -12,16 +12,18 @@ const AKUMA_COMMAND_SPECS = {
|
|
|
12
12
|
alias: "value",
|
|
13
13
|
wait: "value",
|
|
14
14
|
detach: "boolean",
|
|
15
|
+
readonly: "boolean",
|
|
15
16
|
allowed: "repeatable",
|
|
16
17
|
json: "boolean",
|
|
17
18
|
},
|
|
18
|
-
usage: "call <akuma-name> [--contract <kei/...>] [--alias @name] [--allowed <product.action>]... [--wait <duration> | -d | --detach]
|
|
19
|
+
usage: "call <akuma-name> [--contract <kei/...>] [--alias @name] [--readonly] [--allowed <product.action>]... [--wait <duration> | -d | --detach] (<prompt> | -)",
|
|
19
20
|
purpose: "Birth an Akuma from <akuma-name> with one prompt.",
|
|
20
21
|
details: [
|
|
21
22
|
"Give <prompt> as one argument, or use final - to read stdin.",
|
|
22
23
|
"Default: --wait 5m. An explicit --wait replaces that duration; -d and --detach return after birth.",
|
|
23
24
|
"--contract dispatches the born Akuma to that Contract.",
|
|
24
25
|
"--alias assigns the world-local @name selector to the born Akuma.",
|
|
26
|
+
"--readonly adds the one-way read-only birth restriction.",
|
|
25
27
|
"Repeated --allowed replaces the Archetype list; --allowed none selects an empty list.",
|
|
26
28
|
"With --contract, Dispatch succeeds first. If @name exists, the alias then moves.",
|
|
27
29
|
].join("\n"),
|
|
@@ -30,14 +32,14 @@ const AKUMA_COMMAND_SPECS = {
|
|
|
30
32
|
arity: "one-or-more",
|
|
31
33
|
stdin: false,
|
|
32
34
|
flags: { any: "boolean", all: "boolean", timeout: "value", json: "boolean" },
|
|
33
|
-
usage: "wait <akuma-selector>... [--any | --all] [--timeout <duration>]
|
|
35
|
+
usage: "wait <akuma-selector>... [--any | --all] [--timeout <duration>]",
|
|
34
36
|
purpose: "Wait for one Akuma or an explicitly selected Akuma set.",
|
|
35
37
|
},
|
|
36
38
|
tell: {
|
|
37
39
|
arity: 1,
|
|
38
40
|
stdin: true,
|
|
39
41
|
flags: { interrupt: "boolean", json: "boolean" },
|
|
40
|
-
usage: "tell <aku/...|@alias> [--interrupt]
|
|
42
|
+
usage: "tell <aku/...|@alias> [--interrupt] (<prompt> | -)",
|
|
41
43
|
purpose: "Send one prompt to an existing Akuma and wake it.",
|
|
42
44
|
details: [
|
|
43
45
|
"Give <prompt> as one argument, or use final - to read stdin.",
|
|
@@ -48,21 +50,21 @@ const AKUMA_COMMAND_SPECS = {
|
|
|
48
50
|
arity: 1,
|
|
49
51
|
stdin: false,
|
|
50
52
|
flags: { before: "value", since: "value", limit: "value", last: "boolean", json: "boolean" },
|
|
51
|
-
usage: "history <aku/...|@alias|kei/...> [--before <index> | --since <index>] [--limit <count>] [--last]
|
|
53
|
+
usage: "history <aku/...|@alias|kei/...> [--before <index> | --since <index>] [--limit <count>] [--last]",
|
|
52
54
|
purpose: "Read Akuma execution history or one complete Contract journal and Dispatch timeline.",
|
|
53
55
|
},
|
|
54
56
|
fork: {
|
|
55
57
|
arity: 1,
|
|
56
58
|
stdin: false,
|
|
57
59
|
flags: { at: "value", json: "boolean" },
|
|
58
|
-
usage: "fork <aku/...> --at <historyId>
|
|
60
|
+
usage: "fork <aku/...> --at <historyId>",
|
|
59
61
|
purpose: "Fork one Akuma at a retained answered history point.",
|
|
60
62
|
},
|
|
61
63
|
kill: {
|
|
62
64
|
arity: "one-or-more",
|
|
63
65
|
stdin: false,
|
|
64
66
|
flags: { json: "boolean" },
|
|
65
|
-
usage: "kill <akuma-selector>...
|
|
67
|
+
usage: "kill <akuma-selector>...",
|
|
66
68
|
purpose: "Put down the current Body of an Akuma selector snapshot.",
|
|
67
69
|
},
|
|
68
70
|
};
|
|
@@ -77,17 +79,17 @@ export function renderAkumaRootRows() {
|
|
|
77
79
|
}
|
|
78
80
|
export function renderAkumaHelp(action) {
|
|
79
81
|
const spec = AKUMA_COMMAND_SPECS[action];
|
|
80
|
-
return
|
|
82
|
+
return `${spec.purpose}\n\n${usageLine(spec.usage)}${spec.details === undefined ? "" : `\n\n${spec.details}`}`;
|
|
81
83
|
}
|
|
82
84
|
export function renderAkumaUsage(action) {
|
|
83
85
|
return usageLine(AKUMA_COMMAND_SPECS[action].usage);
|
|
84
86
|
}
|
|
85
87
|
export function parseAkumaCatalogPath(value) {
|
|
86
|
-
if (value === "aku/")
|
|
88
|
+
if (value === "aku" || value === "aku/")
|
|
87
89
|
return { kind: "archetypes" };
|
|
88
90
|
if (value === "aku/*/*")
|
|
89
91
|
return { kind: "akuma" };
|
|
90
|
-
const match = /^aku\/(
|
|
92
|
+
const match = /^aku\/([^/]+)\/?$/u.exec(value);
|
|
91
93
|
if (match === null)
|
|
92
94
|
return null;
|
|
93
95
|
return { kind: "akuma", archetype: archetypeName(match[1]) };
|
|
@@ -305,6 +307,7 @@ function parseCall(flags, archetype, prompt, output, fail) {
|
|
|
305
307
|
...(alias === undefined ? {} : { alias }),
|
|
306
308
|
mode,
|
|
307
309
|
...(timeoutMs === undefined ? {} : { timeoutMs }),
|
|
310
|
+
...(flags.readonly === true ? { readonly: true } : {}),
|
|
308
311
|
...(allowed === undefined ? {} : { allowed }),
|
|
309
312
|
prompt,
|
|
310
313
|
output,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ContractFlagKind = "boolean" | "value" | "repeat-value";
|
|
1
|
+
export type ContractFlagKind = "boolean" | "value" | "raw-value" | "repeat-value";
|
|
2
2
|
export type ContractCommandSpec = Readonly<{
|
|
3
3
|
positional: "none" | "optional";
|
|
4
4
|
stdin: "none" | "optional" | "required";
|
|
@@ -6,7 +6,7 @@ export type ContractCommandSpec = Readonly<{
|
|
|
6
6
|
usage: string;
|
|
7
7
|
purpose: string;
|
|
8
8
|
}>;
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const AMEND_OPERATIONS_HELP: string;
|
|
10
10
|
export declare const CONTRACT_COMMAND_SPECS: {
|
|
11
11
|
readonly bind: {
|
|
12
12
|
readonly positional: "none";
|
|
@@ -17,10 +17,10 @@ export declare const CONTRACT_COMMAND_SPECS: {
|
|
|
17
17
|
readonly target: "value";
|
|
18
18
|
readonly here: "boolean";
|
|
19
19
|
readonly after: "repeat-value";
|
|
20
|
-
readonly gates: "value";
|
|
20
|
+
readonly gates: "raw-value";
|
|
21
21
|
readonly json: "boolean";
|
|
22
22
|
};
|
|
23
|
-
readonly usage: "bind [--task <task/...>] [--target <ref>] [--here] [--after <kei/...> ...] [--gates <name
|
|
23
|
+
readonly usage: "bind [--task <task/...>] [--target <ref>] [--here] [--after <kei/...> ...] [--gates <name,...>] [--actor <actor>] -";
|
|
24
24
|
readonly purpose: "Create one Contract from stdin Markdown.";
|
|
25
25
|
};
|
|
26
26
|
readonly amend: {
|
|
@@ -30,10 +30,10 @@ export declare const CONTRACT_COMMAND_SPECS: {
|
|
|
30
30
|
readonly actor: "value";
|
|
31
31
|
readonly after: "repeat-value";
|
|
32
32
|
readonly "clear-after": "boolean";
|
|
33
|
-
readonly gates: "value";
|
|
33
|
+
readonly gates: "raw-value";
|
|
34
34
|
readonly json: "boolean";
|
|
35
35
|
};
|
|
36
|
-
readonly usage: "amend [<contract>|@<contract>] [--after <kei/...> ... | --clear-after] [--gates <name
|
|
36
|
+
readonly usage: "amend [<contract>|@<contract>] [--after <kei/...> ... | --clear-after] [--gates <name,...>] [--actor <actor>] [-]";
|
|
37
37
|
readonly purpose: "Amend one Contract's document operations or structured terms.";
|
|
38
38
|
};
|
|
39
39
|
readonly deliver: {
|
|
@@ -43,9 +43,10 @@ export declare const CONTRACT_COMMAND_SPECS: {
|
|
|
43
43
|
readonly actor: "value";
|
|
44
44
|
readonly message: "value";
|
|
45
45
|
readonly "include-dirty": "boolean";
|
|
46
|
+
readonly "materialize-conflict": "boolean";
|
|
46
47
|
readonly json: "boolean";
|
|
47
48
|
};
|
|
48
|
-
readonly usage: "deliver [<contract>|@<contract>] [--message <text>] [--include-dirty] [--actor <actor>]
|
|
49
|
+
readonly usage: "deliver [<contract>|@<contract>] [--message <text>] [--include-dirty] [--materialize-conflict] [--actor <actor>]";
|
|
49
50
|
readonly purpose: "Deliver one Contract candidate.";
|
|
50
51
|
};
|
|
51
52
|
readonly review: {
|
|
@@ -58,7 +59,7 @@ export declare const CONTRACT_COMMAND_SPECS: {
|
|
|
58
59
|
readonly summary: "value";
|
|
59
60
|
readonly json: "boolean";
|
|
60
61
|
};
|
|
61
|
-
readonly usage: "review [<contract>|@<contract>] (--satisfied | --unsatisfied) (--summary <text> | -) [--actor <actor>]
|
|
62
|
+
readonly usage: "review [<contract>|@<contract>] (--satisfied | --unsatisfied) (--summary <text> | -) [--actor <actor>]";
|
|
62
63
|
readonly purpose: "Record one review verdict.";
|
|
63
64
|
};
|
|
64
65
|
readonly arc: {
|
|
@@ -68,7 +69,7 @@ export declare const CONTRACT_COMMAND_SPECS: {
|
|
|
68
69
|
readonly actor: "value";
|
|
69
70
|
readonly json: "boolean";
|
|
70
71
|
};
|
|
71
|
-
readonly usage: "arc [<contract>|@<contract>] [--actor <actor>]
|
|
72
|
+
readonly usage: "arc [<contract>|@<contract>] [--actor <actor>] -";
|
|
72
73
|
readonly purpose: "Record stdin arc Markdown for one Contract.";
|
|
73
74
|
};
|
|
74
75
|
readonly abandon: {
|
|
@@ -79,7 +80,7 @@ export declare const CONTRACT_COMMAND_SPECS: {
|
|
|
79
80
|
readonly note: "value";
|
|
80
81
|
readonly json: "boolean";
|
|
81
82
|
};
|
|
82
|
-
readonly usage: "abandon [<contract>|@<contract>] [--note <text>] [--actor <actor>]
|
|
83
|
+
readonly usage: "abandon [<contract>|@<contract>] [--note <text>] [--actor <actor>]";
|
|
83
84
|
readonly purpose: "Abandon one Contract with an optional note.";
|
|
84
85
|
};
|
|
85
86
|
readonly status: {
|
|
@@ -88,7 +89,7 @@ export declare const CONTRACT_COMMAND_SPECS: {
|
|
|
88
89
|
readonly flags: {
|
|
89
90
|
readonly json: "boolean";
|
|
90
91
|
};
|
|
91
|
-
readonly usage: "status [<contract>|@name|<aku/...>]
|
|
92
|
+
readonly usage: "status [<contract>|@name|<aku/...>]";
|
|
92
93
|
readonly purpose: "Read the world status board or one Contract projection.";
|
|
93
94
|
};
|
|
94
95
|
readonly show: {
|
|
@@ -97,7 +98,7 @@ export declare const CONTRACT_COMMAND_SPECS: {
|
|
|
97
98
|
readonly flags: {
|
|
98
99
|
readonly json: "boolean";
|
|
99
100
|
};
|
|
100
|
-
readonly usage: "show [<contract>|@<contract>]
|
|
101
|
+
readonly usage: "show [<contract>|@<contract>]";
|
|
101
102
|
readonly purpose: "Read one Contract guidance projection.";
|
|
102
103
|
};
|
|
103
104
|
readonly ls: {
|
|
@@ -106,7 +107,7 @@ export declare const CONTRACT_COMMAND_SPECS: {
|
|
|
106
107
|
readonly flags: {
|
|
107
108
|
readonly json: "boolean";
|
|
108
109
|
};
|
|
109
|
-
readonly usage: "ls task/
|
|
110
|
+
readonly usage: "ls task[/]\n keiyaku ls kei[/]\n keiyaku ls aku[/]\n keiyaku ls aku/<akuma>[/]\n keiyaku ls \"aku/*/*\"";
|
|
110
111
|
readonly purpose: "List one identity directory.";
|
|
111
112
|
};
|
|
112
113
|
readonly audit: {
|
|
@@ -118,7 +119,7 @@ export declare const CONTRACT_COMMAND_SPECS: {
|
|
|
118
119
|
readonly actor: "value";
|
|
119
120
|
readonly json: "boolean";
|
|
120
121
|
};
|
|
121
|
-
readonly usage: "audit [<contract>|@<contract>] [--include-dirty] [--diff] [--actor <actor>]
|
|
122
|
+
readonly usage: "audit [<contract>|@<contract>] [--include-dirty] [--diff] [--actor <actor>]";
|
|
122
123
|
readonly purpose: "Ask what candidate preparation, Verification, and target placement would do.";
|
|
123
124
|
};
|
|
124
125
|
readonly reconcile: {
|
|
@@ -128,16 +129,26 @@ export declare const CONTRACT_COMMAND_SPECS: {
|
|
|
128
129
|
readonly "retry-hooks": "boolean";
|
|
129
130
|
readonly json: "boolean";
|
|
130
131
|
};
|
|
131
|
-
readonly usage: "reconcile [<contract>|@<contract>] [--retry-hooks]
|
|
132
|
+
readonly usage: "reconcile [<contract>|@<contract>] [--retry-hooks]";
|
|
132
133
|
readonly purpose: "Reconcile one Contract or the invocation world.";
|
|
133
134
|
};
|
|
135
|
+
readonly nuke: {
|
|
136
|
+
readonly positional: "none";
|
|
137
|
+
readonly stdin: "none";
|
|
138
|
+
readonly flags: {
|
|
139
|
+
readonly confirm: "value";
|
|
140
|
+
readonly json: "boolean";
|
|
141
|
+
};
|
|
142
|
+
readonly usage: "nuke [--confirm <WorldRoot>]";
|
|
143
|
+
readonly purpose: "Remove Keiyaku-owned data from one confirmed World.";
|
|
144
|
+
};
|
|
134
145
|
readonly settings: {
|
|
135
146
|
readonly positional: "none";
|
|
136
147
|
readonly stdin: "none";
|
|
137
148
|
readonly flags: {
|
|
138
149
|
readonly json: "boolean";
|
|
139
150
|
};
|
|
140
|
-
readonly usage: "settings
|
|
151
|
+
readonly usage: "settings";
|
|
141
152
|
readonly purpose: "Read user and project Settings resources.";
|
|
142
153
|
};
|
|
143
154
|
readonly region: {
|
|
@@ -148,7 +159,7 @@ export declare const CONTRACT_COMMAND_SPECS: {
|
|
|
148
159
|
readonly path: "value";
|
|
149
160
|
readonly json: "boolean";
|
|
150
161
|
};
|
|
151
|
-
readonly usage: "region [<contract>] [--overlap]
|
|
162
|
+
readonly usage: "region [<contract>] [--overlap]\n region --path <repo-relative-path>";
|
|
152
163
|
readonly purpose: "Read active declared Contract Regions.";
|
|
153
164
|
};
|
|
154
165
|
};
|