cool-workflow 0.2.1 → 0.2.2
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/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/apps/architecture-review/app.json +1 -1
- package/apps/architecture-review-fast/app.json +1 -1
- package/apps/end-to-end-golden-path/app.json +1 -1
- package/apps/pr-review-fix-ci/app.json +1 -1
- package/apps/release-cut/app.json +1 -1
- package/apps/research-synthesis/app.json +1 -1
- package/dist/cli/dispatch.js +18 -86
- package/dist/cli/parseargv.js +5 -2
- package/dist/core/capability-data.js +270 -0
- package/dist/core/capability-table.js +16 -3504
- package/dist/core/format/help.js +28 -5
- package/dist/core/multi-agent/collaboration.js +3 -2
- package/dist/core/multi-agent/coordinator.js +4 -3
- package/dist/core/pipeline/commit-gate.js +2 -1
- package/dist/core/state/state-explosion/digest.js +3 -2
- package/dist/core/state/state-explosion/graph.js +9 -8
- package/dist/core/state/state-explosion/helpers.js +2 -1
- package/dist/core/trust/ledger.js +2 -1
- package/dist/core/types/execution-backend.js +18 -0
- package/dist/core/types/observability.js +7 -0
- package/dist/core/util/collate.js +23 -0
- package/dist/core/version.js +1 -1
- package/dist/shell/audit-cli.js +46 -2
- package/dist/shell/commit-summary.js +2 -1
- package/dist/shell/drive.js +26 -10
- package/dist/shell/evidence-reasoning.js +4 -3
- package/dist/shell/execution-backend/registry.js +2 -1
- package/dist/shell/execution-backend/types.js +0 -9
- package/dist/shell/fs-atomic.js +14 -1
- package/dist/shell/multi-agent-operator-ux.js +4 -3
- package/dist/shell/observability.js +12 -11
- package/dist/shell/onramp.js +17 -1
- package/dist/shell/operator-ux-text.js +2 -1
- package/dist/shell/operator-ux.js +7 -6
- package/dist/shell/pipeline-cli.js +82 -72
- package/dist/shell/reclamation-io.js +2 -1
- package/dist/shell/report.js +2 -1
- package/dist/shell/run-store.js +17 -0
- package/dist/shell/state-explosion-cli.js +2 -1
- package/dist/shell/topology-io.js +2 -1
- package/dist/shell/trust-audit.js +41 -2
- package/dist/shell/worker-cli.js +9 -1
- package/dist/shell/worker-isolation.js +34 -9
- package/dist/shell/workflow-app-loader.js +3 -2
- package/dist/wiring/capability-table/basics.js +66 -0
- package/dist/wiring/capability-table/exec-backend.js +162 -0
- package/dist/wiring/capability-table/index.js +42 -0
- package/dist/wiring/capability-table/multi-agent.js +623 -0
- package/dist/wiring/capability-table/parity.js +466 -0
- package/dist/wiring/capability-table/pipeline.js +280 -0
- package/dist/wiring/capability-table/registry-core.js +189 -0
- package/dist/wiring/capability-table/reporting.js +394 -0
- package/dist/wiring/capability-table/scheduling-registry.js +558 -0
- package/dist/wiring/capability-table/state.js +173 -0
- package/dist/wiring/capability-table/trust-ledger.js +134 -0
- package/dist/wiring/capability-table/workflow-apps.js +366 -0
- package/docs/agent-delegation-drive.7.md +2 -0
- package/docs/cli-mcp-parity.7.md +7 -2
- package/docs/contract-migration-tooling.7.md +2 -0
- package/docs/control-plane-scheduling.7.md +2 -0
- package/docs/durable-state-and-locking.7.md +22 -0
- package/docs/evidence-adoption-reasoning-chain.7.md +2 -0
- package/docs/execution-backends.7.md +2 -0
- package/docs/index.md +1 -0
- package/docs/multi-agent-cli-mcp-surface.7.md +2 -0
- package/docs/multi-agent-eval-replay-harness.7.md +2 -0
- package/docs/multi-agent-operator-ux.7.md +2 -0
- package/docs/node-snapshot-diff-replay.7.md +2 -0
- package/docs/observability-cost-accounting.7.md +2 -0
- package/docs/project-index.md +25 -5
- package/docs/real-execution-backends.7.md +2 -0
- package/docs/release-and-migration.7.md +2 -0
- package/docs/release-tooling.7.md +2 -0
- package/docs/run-registry-control-plane.7.md +2 -0
- package/docs/run-retention-reclamation.7.md +2 -0
- package/docs/security-trust-hardening.7.md +30 -0
- package/docs/state-explosion-management.7.md +2 -0
- package/docs/team-collaboration.7.md +2 -0
- package/docs/trust-audit-anchor.7.md +69 -0
- package/docs/web-desktop-workbench.7.md +2 -0
- package/manifest/plugin.manifest.json +1 -1
- package/package.json +3 -1
- package/scripts/bump-version.js +24 -2
- package/scripts/canonical-apps.js +4 -4
- package/scripts/dogfood-release.js +1 -1
- package/scripts/golden-path.js +4 -4
- package/scripts/purity-baseline.json +68 -0
- package/scripts/purity-gate.js +239 -0
- package/scripts/release-check.js +8 -1
- package/scripts/version-sync-check.js +33 -12
- package/workflows/README.md +19 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// wiring/capability-table/state.ts — MILESTONE 3 (state kernel) + MILESTONE 4
|
|
3
|
+
// (state-explosion summaries) CLI bindings: state.check, migration.list|
|
|
4
|
+
// check|prove, node.list|show|graph|snapshot|diff|replay|replay.verify,
|
|
5
|
+
// summary.refresh|show. Split out of core/capability-table.ts, byte-for-byte
|
|
6
|
+
// (extracted with sed, not retyped).
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
const registry_core_1 = require("./registry-core");
|
|
9
|
+
const io_1 = require("../../cli/io");
|
|
10
|
+
const report_view_cli_1 = require("../../shell/report-view-cli");
|
|
11
|
+
// MILESTONE 3 (state kernel) CLI bindings: state.check, migration.list|
|
|
12
|
+
// check|prove, node.list|show|graph|snapshot|diff|replay|replay.verify.
|
|
13
|
+
// Handler BODIES live in shell/state-cli.ts (impure — they read/write
|
|
14
|
+
// run state on disk); this table only wires argv shape -> handler call
|
|
15
|
+
// and the row's own exit-code rule, per cli/dispatch.ts's generic
|
|
16
|
+
// executor contract. `required`/`optionalArg` are cli/io.ts's shared
|
|
17
|
+
// coercion helpers, imported here so the wiring stays a thin adapter
|
|
18
|
+
// (Usage-error strings copied byte-for-byte from the old build's
|
|
19
|
+
// handlers/*.ts).
|
|
20
|
+
// ---------------------------------------------------------------------
|
|
21
|
+
const io_2 = require("../../cli/io");
|
|
22
|
+
const state_cli_1 = require("../../shell/state-cli");
|
|
23
|
+
(0, registry_core_1.attachCliBinding)("state.check", {
|
|
24
|
+
path: ["state", "check"],
|
|
25
|
+
jsonMode: "default",
|
|
26
|
+
handler: (args) => {
|
|
27
|
+
const runId = (0, io_2.required)(args.positionals[0], "run id");
|
|
28
|
+
const report = (0, state_cli_1.checkState)(runId, args.options);
|
|
29
|
+
return { json: report, exitCode: report.status === "unsupported" ? 1 : undefined };
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
(0, registry_core_1.attachCliBinding)("migration.list", {
|
|
33
|
+
path: ["migration", "list"],
|
|
34
|
+
jsonMode: "default",
|
|
35
|
+
handler: () => ({ json: (0, state_cli_1.migrationList)() }),
|
|
36
|
+
});
|
|
37
|
+
(0, registry_core_1.attachCliBinding)("migration.check", {
|
|
38
|
+
path: ["migration", "check"],
|
|
39
|
+
jsonMode: "default",
|
|
40
|
+
handler: (args) => {
|
|
41
|
+
const target = (0, io_2.required)(args.positionals[0], "target (run-id or state/app file)");
|
|
42
|
+
const report = (0, state_cli_1.migrationCheck)(target, args.options);
|
|
43
|
+
return { json: report, exitCode: report.status === "unsupported" ? 1 : undefined };
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
(0, registry_core_1.attachCliBinding)("migration.prove", {
|
|
47
|
+
path: ["migration", "prove"],
|
|
48
|
+
jsonMode: "default",
|
|
49
|
+
handler: (args) => {
|
|
50
|
+
const target = (0, io_2.required)(args.positionals[0], "target (run-id or state/app file)");
|
|
51
|
+
const proof = (0, state_cli_1.migrationProve)(target, args.options);
|
|
52
|
+
return { json: proof, exitCode: proof.pass ? undefined : 1 };
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
(0, registry_core_1.attachCliBinding)("node.list", {
|
|
56
|
+
path: ["node", "list"],
|
|
57
|
+
jsonMode: "default",
|
|
58
|
+
handler: (args) => ({ json: (0, state_cli_1.listNodes)((0, io_2.required)(args.positionals[0], "run id"), args.options) }),
|
|
59
|
+
});
|
|
60
|
+
(0, registry_core_1.attachCliBinding)("node.show", {
|
|
61
|
+
path: ["node", "show"],
|
|
62
|
+
jsonMode: "default",
|
|
63
|
+
handler: (args) => {
|
|
64
|
+
const runId = (0, io_2.required)(args.positionals[0], "run id");
|
|
65
|
+
const nodeId = (0, io_2.required)(args.positionals[1], "node id");
|
|
66
|
+
return { json: (0, state_cli_1.showNode)(runId, nodeId, args.options) };
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
// jsonMode "flag": `--json` prints the node array (graphNodes); the bare
|
|
70
|
+
// verb prints the operator run-graph text, byte-for-byte the old build's
|
|
71
|
+
// `node graph` render (formatOperatorGraph over runner.operatorGraph).
|
|
72
|
+
(0, registry_core_1.attachCliBinding)("node.graph", {
|
|
73
|
+
path: ["node", "graph"],
|
|
74
|
+
jsonMode: "flag",
|
|
75
|
+
handler: (args) => {
|
|
76
|
+
const runId = (0, io_2.required)(args.positionals[0], "run id");
|
|
77
|
+
return { json: (0, state_cli_1.graphNodes)(runId, args.options), text: `${(0, report_view_cli_1.graphText)(runId, args.options)}\n` };
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
(0, registry_core_1.attachCliBinding)("node.snapshot", {
|
|
81
|
+
path: ["node", "snapshot"],
|
|
82
|
+
jsonMode: "default",
|
|
83
|
+
handler: (args) => {
|
|
84
|
+
const runId = (0, io_2.required)(args.positionals[0], "run id");
|
|
85
|
+
const nodeId = (0, io_2.required)(args.positionals[1], "node id");
|
|
86
|
+
return { json: (0, state_cli_1.nodeSnapshotCli)(runId, nodeId, args.options) };
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
(0, registry_core_1.attachCliBinding)("node.diff", {
|
|
90
|
+
path: ["node", "diff"],
|
|
91
|
+
jsonMode: "default",
|
|
92
|
+
handler: (args) => {
|
|
93
|
+
const runId = (0, io_2.required)(args.positionals[0], "run id");
|
|
94
|
+
const baselineSnapshotId = (0, io_2.required)(args.positionals[1], "baseline snapshot id");
|
|
95
|
+
const candidateSnapshotId = (0, io_2.required)(args.positionals[2], "candidate snapshot id");
|
|
96
|
+
return { json: (0, state_cli_1.nodeDiffCli)(runId, baselineSnapshotId, candidateSnapshotId, args.options) };
|
|
97
|
+
},
|
|
98
|
+
});
|
|
99
|
+
(0, registry_core_1.attachCliBinding)("node.replay", {
|
|
100
|
+
path: ["node", "replay"],
|
|
101
|
+
jsonMode: "default",
|
|
102
|
+
handler: (args) => {
|
|
103
|
+
const runId = (0, io_2.required)(args.positionals[0], "run id");
|
|
104
|
+
const snapshotId = (0, io_2.required)(args.positionals[1], "snapshot id");
|
|
105
|
+
return { json: (0, state_cli_1.nodeReplayCli)(runId, snapshotId, args.options) };
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
(0, registry_core_1.attachCliBinding)("node.replay.verify", {
|
|
109
|
+
path: ["node", "verify"],
|
|
110
|
+
jsonMode: "default",
|
|
111
|
+
handler: (args) => {
|
|
112
|
+
const runId = (0, io_2.required)(args.positionals[0], "run id");
|
|
113
|
+
const replayId = (0, io_2.required)(args.positionals[1], "replay id");
|
|
114
|
+
const verdict = (0, state_cli_1.nodeReplayVerifyCli)(runId, replayId, args.options);
|
|
115
|
+
return { json: verdict, exitCode: verdict.pass ? undefined : 1 };
|
|
116
|
+
},
|
|
117
|
+
});
|
|
118
|
+
// GAP #24: mirror the state-kernel CLI shell fns as MCP handlers (they were
|
|
119
|
+
// declared MCP tool rows but left on notYetImplemented). Arg-name reads copied
|
|
120
|
+
// byte-for-byte from the old build's mcp/tool-call.ts switch arms.
|
|
121
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("state.check").mcp.handler = (args) => (0, state_cli_1.checkState)((0, io_2.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
|
|
122
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("migration.list").mcp.handler = () => (0, state_cli_1.migrationList)();
|
|
123
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("migration.check").mcp.handler = (args) => (0, state_cli_1.migrationCheck)((0, io_2.required)((0, io_1.optionalArg)(args.target ?? args.runId), "target (run-id or state/app file)"), args);
|
|
124
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("migration.prove").mcp.handler = (args) => (0, state_cli_1.migrationProve)((0, io_2.required)((0, io_1.optionalArg)(args.target ?? args.runId), "target (run-id or state/app file)"), args);
|
|
125
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("node.list").mcp.handler = (args) => (0, state_cli_1.listNodes)((0, io_2.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
|
|
126
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("node.show").mcp.handler = (args) => (0, state_cli_1.showNode)((0, io_2.required)((0, io_1.optionalArg)(args.runId), "run id"), (0, io_2.required)((0, io_1.optionalArg)(args.nodeId), "node id"), args);
|
|
127
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("node.graph").mcp.handler = (args) => (0, state_cli_1.graphNodes)((0, io_2.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
|
|
128
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("node.snapshot").mcp.handler = (args) => (0, state_cli_1.nodeSnapshotCli)((0, io_2.required)((0, io_1.optionalArg)(args.runId), "run id"), (0, io_2.required)((0, io_1.optionalArg)(args.nodeId), "node id"), args);
|
|
129
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("node.diff").mcp.handler = (args) => (0, state_cli_1.nodeDiffCli)((0, io_2.required)((0, io_1.optionalArg)(args.runId), "run id"), (0, io_2.required)((0, io_1.optionalArg)(args.baselineSnapshotId ?? args.baseline), "baseline snapshot id"), (0, io_2.required)((0, io_1.optionalArg)(args.candidateSnapshotId ?? args.candidate), "candidate snapshot id"), args);
|
|
130
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("node.replay").mcp.handler = (args) => (0, state_cli_1.nodeReplayCli)((0, io_2.required)((0, io_1.optionalArg)(args.runId), "run id"), (0, io_2.required)((0, io_1.optionalArg)(args.snapshotId), "snapshot id"), args);
|
|
131
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("node.replay.verify").mcp.handler = (args) => (0, state_cli_1.nodeReplayVerifyCli)((0, io_2.required)((0, io_1.optionalArg)(args.runId), "run id"), (0, io_2.required)((0, io_1.optionalArg)(args.replayId), "replay id"), args);
|
|
132
|
+
// `contract.show` is not yet a declared MCP_TOOL_DATA row with a CLI peer
|
|
133
|
+
// wired here (it IS in MCP_TOOL_DATA already); no milestone-3 conformance
|
|
134
|
+
// case reaches it, so it is intentionally left on its placeholder handler
|
|
135
|
+
// until a case demands it — avoids speculative, untested wiring.
|
|
136
|
+
// ---------------------------------------------------------------------
|
|
137
|
+
// MILESTONE 4 (state-explosion summaries) CLI bindings: summary.refresh,
|
|
138
|
+
// summary.show. Handler BODIES live in shell/state-explosion-cli.ts
|
|
139
|
+
// (impure — disk reads/writes summaries under the run dir); this table
|
|
140
|
+
// only wires argv shape -> handler call, per cli/dispatch.ts's generic
|
|
141
|
+
// executor contract. Per SPEC/state-core.md's CLI verbs section: without
|
|
142
|
+
// `--json` both print `formatStateExplosionReport` text (jsonMode
|
|
143
|
+
// "flag" — text by default, JSON under --json/--format json).
|
|
144
|
+
// ---------------------------------------------------------------------
|
|
145
|
+
const state_explosion_text_1 = require("../../core/format/state-explosion-text");
|
|
146
|
+
const state_explosion_cli_1 = require("../../shell/state-explosion-cli");
|
|
147
|
+
const io_3 = require("../../cli/io");
|
|
148
|
+
(0, registry_core_1.attachCliBinding)("summary.refresh", {
|
|
149
|
+
path: ["summary", "refresh"],
|
|
150
|
+
jsonMode: "flag",
|
|
151
|
+
handler: (args) => {
|
|
152
|
+
const runId = (0, io_2.required)(args.positionals[0], "run id");
|
|
153
|
+
const index = (0, state_explosion_cli_1.summaryRefreshCli)(runId, args.options);
|
|
154
|
+
// Byte-exact port of the old build's handleSummary "refresh": the
|
|
155
|
+
// human-text branch re-reads via a fresh summaryShow call rather than
|
|
156
|
+
// formatting the refresh's own index record (src/cli/handlers/
|
|
157
|
+
// operator.ts:118-127); only computed when actually needed, so a
|
|
158
|
+
// --json call does exactly the one read the old build's if/else did.
|
|
159
|
+
if ((0, io_3.wantsJson)(args.options))
|
|
160
|
+
return { json: index };
|
|
161
|
+
return { json: index, text: (0, state_explosion_text_1.formatStateExplosionReport)((0, state_explosion_cli_1.summaryShowCli)(runId, args.options)) };
|
|
162
|
+
},
|
|
163
|
+
});
|
|
164
|
+
(0, registry_core_1.attachCliBinding)("summary.show", {
|
|
165
|
+
path: ["summary", "show"],
|
|
166
|
+
jsonMode: "flag",
|
|
167
|
+
handler: (args) => {
|
|
168
|
+
const runId = (0, io_2.required)(args.positionals[0], "run id");
|
|
169
|
+
const report = (0, state_explosion_cli_1.summaryShowCli)(runId, args.options);
|
|
170
|
+
return { json: report, text: (0, state_explosion_text_1.formatStateExplosionReport)(report) };
|
|
171
|
+
},
|
|
172
|
+
});
|
|
173
|
+
// ---------------------------------------------------------------------
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// wiring/capability-table/trust-ledger.ts — MILESTONE 8 (ledger, telemetry,
|
|
3
|
+
// trust-audit, tamper/bundle demos) CLI bindings: ledger.*, telemetry.verify,
|
|
4
|
+
// audit.verify, audit.head, demo.*, report.bundle/verify-bundle. Split out
|
|
5
|
+
// of core/capability-table.ts, byte-for-byte (extracted with sed, not
|
|
6
|
+
// retyped).
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
const registry_core_1 = require("./registry-core");
|
|
9
|
+
const io_1 = require("../../cli/io");
|
|
10
|
+
// MILESTONE 8 (ledger, telemetry, trust-audit, tamper/bundle demos) CLI
|
|
11
|
+
// bindings: ledger propose|review|verify|apply|list, telemetry verify,
|
|
12
|
+
// audit verify, demo tamper|bundle, report bundle|verify-bundle. Handler
|
|
13
|
+
// BODIES live in shell/ledger-cli.ts, shell/telemetry-cli.ts, shell/
|
|
14
|
+
// audit-cli.ts, shell/demo-cli.ts, shell/report-cli.ts (impure — file/
|
|
15
|
+
// stdin reads, run-state loads, archive IO); this table only wires argv
|
|
16
|
+
// shape -> handler call, per cli/dispatch.ts's generic executor
|
|
17
|
+
// contract. `ledger` is intentionally absent from KNOWN_COMMANDS (see
|
|
18
|
+
// cli/parseargv.ts) even though dispatchTable now handles it as a real
|
|
19
|
+
// row — a known, preserved wart.
|
|
20
|
+
// ---------------------------------------------------------------------
|
|
21
|
+
const ledger_cli_1 = require("../../shell/ledger-cli");
|
|
22
|
+
const telemetry_cli_1 = require("../../shell/telemetry-cli");
|
|
23
|
+
const audit_cli_1 = require("../../shell/audit-cli");
|
|
24
|
+
const demo_cli_1 = require("../../shell/demo-cli");
|
|
25
|
+
const telemetry_demo_1 = require("../../shell/telemetry-demo");
|
|
26
|
+
const report_cli_1 = require("../../shell/report-cli");
|
|
27
|
+
(0, registry_core_1.attachCliBinding)("ledger.propose", {
|
|
28
|
+
path: ["ledger", "propose"],
|
|
29
|
+
jsonMode: "default",
|
|
30
|
+
handler: (args) => ({ json: (0, ledger_cli_1.ledgerProposeCli)(args.options) }),
|
|
31
|
+
});
|
|
32
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("ledger.propose").mcp.handler = (args) => (0, ledger_cli_1.ledgerProposeMcp)(args);
|
|
33
|
+
(0, registry_core_1.attachCliBinding)("ledger.review", {
|
|
34
|
+
path: ["ledger", "review"],
|
|
35
|
+
jsonMode: "default",
|
|
36
|
+
handler: (args) => ({ json: (0, ledger_cli_1.ledgerReviewCli)(args.options) }),
|
|
37
|
+
});
|
|
38
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("ledger.review").mcp.handler = (args) => (0, ledger_cli_1.ledgerReviewMcp)(args);
|
|
39
|
+
(0, registry_core_1.attachCliBinding)("ledger.verify", {
|
|
40
|
+
path: ["ledger", "verify"],
|
|
41
|
+
jsonMode: "default",
|
|
42
|
+
handler: (args) => {
|
|
43
|
+
const result = (0, ledger_cli_1.ledgerVerifyCli)(args.options);
|
|
44
|
+
return { json: result, exitCode: result.ok ? undefined : 1 };
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("ledger.verify").mcp.handler = (args) => (0, ledger_cli_1.ledgerVerifyEntry)(args.entry);
|
|
48
|
+
(0, registry_core_1.attachCliBinding)("ledger.apply", {
|
|
49
|
+
path: ["ledger", "apply"],
|
|
50
|
+
jsonMode: "default",
|
|
51
|
+
handler: (args) => {
|
|
52
|
+
const result = (0, ledger_cli_1.ledgerApplyCli)(args.options);
|
|
53
|
+
return { json: result, exitCode: result.ok ? undefined : 1 };
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("ledger.apply").mcp.handler = (args) => (0, ledger_cli_1.ledgerApplyEntry)(args.entry);
|
|
57
|
+
(0, registry_core_1.attachCliBinding)("ledger.list", {
|
|
58
|
+
path: ["ledger", "list"],
|
|
59
|
+
jsonMode: "default",
|
|
60
|
+
handler: (args) => {
|
|
61
|
+
const result = (0, ledger_cli_1.ledgerListCli)(args.options);
|
|
62
|
+
return { json: result, exitCode: result.allOk ? undefined : 1 };
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("ledger.list").mcp.handler = (args) => (0, ledger_cli_1.ledgerListMcp)(args);
|
|
66
|
+
(0, registry_core_1.attachCliBinding)("telemetry.verify", {
|
|
67
|
+
path: ["telemetry", "verify"],
|
|
68
|
+
jsonMode: "flag",
|
|
69
|
+
handler: (args) => {
|
|
70
|
+
const runId = (0, io_1.required)((0, io_1.optionalArg)(args.positionals[0]) || (0, io_1.optionalArg)(args.options.runId) || (0, io_1.optionalArg)(args.options.run), "run id");
|
|
71
|
+
const result = (0, telemetry_cli_1.telemetryVerifyCli)(runId, args.options);
|
|
72
|
+
return { json: result, text: (0, telemetry_demo_1.formatTelemetryVerify)(result), exitCode: result.verified ? undefined : 1 };
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("telemetry.verify").mcp.handler = (args) => (0, telemetry_cli_1.telemetryVerifyCli)((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
|
|
76
|
+
(0, registry_core_1.attachCliBinding)("audit.verify", {
|
|
77
|
+
path: ["audit", "verify"],
|
|
78
|
+
jsonMode: "default",
|
|
79
|
+
handler: (args) => {
|
|
80
|
+
const runId = (0, io_1.required)((0, io_1.optionalArg)(args.positionals[0]), "run id");
|
|
81
|
+
const result = (0, audit_cli_1.auditVerifyCli)(runId, args.options);
|
|
82
|
+
return { json: result, exitCode: result.verified ? undefined : 1 };
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.verify").mcp.handler = (args) => (0, audit_cli_1.auditVerifyCli)((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
|
|
86
|
+
(0, registry_core_1.attachCliBinding)("audit.head", {
|
|
87
|
+
path: ["audit", "head"],
|
|
88
|
+
jsonMode: "default",
|
|
89
|
+
handler: (args) => {
|
|
90
|
+
const runId = (0, io_1.required)((0, io_1.optionalArg)(args.positionals[0]), "run id");
|
|
91
|
+
return { json: (0, audit_cli_1.auditHeadCli)(runId, args.options) };
|
|
92
|
+
},
|
|
93
|
+
});
|
|
94
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.head").mcp.handler = (args) => (0, audit_cli_1.auditHeadCli)((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
|
|
95
|
+
(0, registry_core_1.addCliOnlyCapability)("demo.tamper", "Prove tamper-evidence: build a signed telemetry ledger, forge it, watch verification fail offline.", {
|
|
96
|
+
path: ["demo", "tamper"],
|
|
97
|
+
jsonMode: "flag",
|
|
98
|
+
handler: (args) => {
|
|
99
|
+
const result = (0, demo_cli_1.demoTamperCli)();
|
|
100
|
+
return { json: result, text: (0, telemetry_demo_1.formatTamperDemo)(result), exitCode: result.proven ? undefined : 1 };
|
|
101
|
+
},
|
|
102
|
+
}, "Human-facing demonstration (operator/newcomer onboarding); the underlying integrity check is exposed programmatically as the both-surface telemetry.verify. No agent or MCP client needs to invoke a demo.");
|
|
103
|
+
(0, registry_core_1.addCliOnlyCapability)("demo.bundle", "Prove portable-bundle verification: export a sealed report bundle, forge it two ways, watch report verify-bundle catch both offline with only the embedded public key.", {
|
|
104
|
+
path: ["demo", "bundle"],
|
|
105
|
+
jsonMode: "flag",
|
|
106
|
+
handler: (args) => {
|
|
107
|
+
const result = (0, demo_cli_1.demoBundleCli)();
|
|
108
|
+
return { json: result, text: (0, telemetry_demo_1.formatBundleDemo)(result), exitCode: result.proven ? undefined : 1 };
|
|
109
|
+
},
|
|
110
|
+
}, "Human-facing demonstration (operator/newcomer onboarding); the underlying integrity check is exposed programmatically as the both-surface report.verify-bundle. No agent or MCP client needs to invoke a demo.");
|
|
111
|
+
(0, registry_core_1.attachCliBinding)("report.bundle", {
|
|
112
|
+
path: ["report", "bundle"],
|
|
113
|
+
jsonMode: "default",
|
|
114
|
+
handler: (args) => {
|
|
115
|
+
const runId = (0, io_1.required)((0, io_1.optionalArg)(args.positionals[0]), "run id");
|
|
116
|
+
const result = (0, report_cli_1.reportBundleCli)(runId, args.options);
|
|
117
|
+
return { json: result, exitCode: result.ok ? undefined : 1 };
|
|
118
|
+
},
|
|
119
|
+
});
|
|
120
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("report.bundle").mcp.handler = (args) => (0, report_cli_1.reportBundleCli)((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
|
|
121
|
+
(0, registry_core_1.attachCliBinding)("report.verify-bundle", {
|
|
122
|
+
path: ["report", "verify-bundle"],
|
|
123
|
+
jsonMode: "default",
|
|
124
|
+
handler: (args) => {
|
|
125
|
+
const archivePath = (0, io_1.required)((0, io_1.optionalArg)(args.positionals[0]), "bundle path");
|
|
126
|
+
const result = (0, report_cli_1.reportVerifyBundleCli)({ ...args.options, archive: archivePath });
|
|
127
|
+
return { json: result, exitCode: result.ok ? undefined : 1 };
|
|
128
|
+
},
|
|
129
|
+
});
|
|
130
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("report.verify-bundle").mcp.handler = (args) => {
|
|
131
|
+
const result = (0, report_cli_1.reportVerifyBundleCli)(args);
|
|
132
|
+
return result;
|
|
133
|
+
};
|
|
134
|
+
// ---------------------------------------------------------------------
|