cool-workflow 0.2.3 → 0.2.4
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 +2 -1
- package/dist/cli/io.js +6 -20
- package/dist/core/capability-data.js +2 -2
- package/dist/core/format/help.js +7 -1
- package/dist/core/util/cli-args.js +33 -0
- package/dist/core/version.js +1 -1
- package/dist/shell/drive.js +14 -6
- package/dist/shell/execution-backend/agent.js +10 -1
- package/dist/shell/execution-backend/local.js +15 -10
- package/dist/shell/pipeline-cli.js +20 -2
- package/dist/shell/reclamation-io.js +74 -6
- package/dist/shell/registry-cli.js +4 -0
- package/dist/shell/run-registry-io.js +1 -0
- package/dist/shell/workflow-app-loader.js +67 -1
- package/dist/wiring/capability-table/basics.js +2 -2
- package/dist/wiring/capability-table/exec-backend.js +9 -9
- package/dist/wiring/capability-table/multi-agent.js +69 -69
- package/dist/wiring/capability-table/pipeline.js +28 -28
- package/dist/wiring/capability-table/registry-core.js +3 -3
- package/dist/wiring/capability-table/reporting.js +38 -38
- package/dist/wiring/capability-table/scheduling-registry.js +58 -58
- package/dist/wiring/capability-table/state.js +34 -34
- package/dist/wiring/capability-table/trust-ledger.js +12 -12
- package/dist/wiring/capability-table/workflow-apps.js +15 -15
- package/docs/agent-delegation-drive.7.md +2 -0
- package/docs/cli-mcp-parity.7.md +18 -13
- 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 +2 -0
- package/docs/evidence-adoption-reasoning-chain.7.md +2 -0
- package/docs/execution-backends.7.md +2 -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 +8 -4
- package/docs/real-execution-backends.7.md +2 -0
- package/docs/release-and-migration.7.md +2 -0
- package/docs/release-tooling.7.md +20 -0
- package/docs/run-registry-control-plane.7.md +2 -0
- package/docs/run-retention-reclamation.7.md +22 -3
- package/docs/state-explosion-management.7.md +2 -0
- package/docs/team-collaboration.7.md +2 -0
- package/docs/trust-audit-anchor.7.md +2 -0
- package/docs/web-desktop-workbench.7.md +2 -0
- package/manifest/plugin.manifest.json +1 -1
- package/package.json +2 -1
- package/scripts/block-unapproved-tag.sh +19 -4
- package/scripts/bump-version.js +27 -10
- 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 +0 -30
- package/scripts/release-flow.js +137 -12
- package/scripts/release-oneclick.js +407 -0
- package/scripts/version-sync-check.js +39 -22
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
// retyped).
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
const registry_core_1 = require("./registry-core");
|
|
9
|
-
const
|
|
10
|
-
const
|
|
9
|
+
const cli_args_1 = require("../../core/util/cli-args");
|
|
10
|
+
const cli_args_2 = require("../../core/util/cli-args");
|
|
11
11
|
// MILESTONE 6+7 (combined; see docs/rebuild/PLAN.md Open risk 10) CLI bindings:
|
|
12
12
|
// plan, quickstart, run --drive, run drive (preview), dispatch, result,
|
|
13
13
|
// commit. Handler BODIES live in shell/pipeline-cli.ts (impure — they
|
|
@@ -28,7 +28,7 @@ function loadCommitSummary() {
|
|
|
28
28
|
path: ["plan"],
|
|
29
29
|
jsonMode: "default",
|
|
30
30
|
handler: (args) => {
|
|
31
|
-
const workflowId = (0,
|
|
31
|
+
const workflowId = (0, cli_args_2.optionalArg)(args.positionals[0]);
|
|
32
32
|
if (!workflowId) {
|
|
33
33
|
throw new Error('Missing workflow id.\n Tip: plan an architecture review with "cw plan architecture-review"');
|
|
34
34
|
}
|
|
@@ -51,7 +51,7 @@ function loadCommitSummary() {
|
|
|
51
51
|
const registrySubcommands = new Set(["drive", "search", "list", "show", "resume", "archive", "rerun", "export", "import", "verify-import", "inspect-archive", "restore"]);
|
|
52
52
|
const target = args.positionals[0];
|
|
53
53
|
if (args.options.drive && !registrySubcommands.has(String(target || ""))) {
|
|
54
|
-
const runId = (0,
|
|
54
|
+
const runId = (0, cli_args_2.optionalArg)(args.options.run) || (0, cli_args_2.optionalArg)(args.options.runId);
|
|
55
55
|
if (args.options.preview)
|
|
56
56
|
return { json: loadPipelineCli().runDrivePreview({ ...args.options, runId: runId || target }) };
|
|
57
57
|
const driveArgs = { ...args.options };
|
|
@@ -69,29 +69,29 @@ function loadCommitSummary() {
|
|
|
69
69
|
driveArgs.runId = id;
|
|
70
70
|
return { json: await loadPipelineCli().runDriveStep(driveArgs) };
|
|
71
71
|
}
|
|
72
|
-
return { json: loadPipelineCli().runDrivePreview({ ...args.options, runId: (0,
|
|
72
|
+
return { json: loadPipelineCli().runDrivePreview({ ...args.options, runId: (0, cli_args_1.required)(id, "run id") }) };
|
|
73
73
|
}
|
|
74
74
|
// MILESTONE 11 (reporting/run-export) — the archive family. Handler
|
|
75
75
|
// bodies live in shell/run-export-cli.ts; this arm only wires argv
|
|
76
76
|
// shape -> handler call.
|
|
77
77
|
if (subcommand === "export") {
|
|
78
|
-
const result = loadRunExportCli().runExportCli((0,
|
|
78
|
+
const result = loadRunExportCli().runExportCli((0, cli_args_1.required)(id, "run id"), args.options);
|
|
79
79
|
return { json: result };
|
|
80
80
|
}
|
|
81
81
|
if (subcommand === "import") {
|
|
82
|
-
const result = loadRunExportCli().runImportCli((0,
|
|
82
|
+
const result = loadRunExportCli().runImportCli((0, cli_args_1.required)(id, "archive path"), args.options);
|
|
83
83
|
return { json: result };
|
|
84
84
|
}
|
|
85
85
|
if (subcommand === "verify-import") {
|
|
86
|
-
const result = loadRunExportCli().runVerifyImportCli((0,
|
|
86
|
+
const result = loadRunExportCli().runVerifyImportCli((0, cli_args_1.required)(id, "run id"), args.options);
|
|
87
87
|
return { json: result, exitCode: args.options.strict && !result.ok ? 1 : undefined };
|
|
88
88
|
}
|
|
89
89
|
if (subcommand === "inspect-archive") {
|
|
90
|
-
const result = loadRunExportCli().runInspectArchiveCli((0,
|
|
90
|
+
const result = loadRunExportCli().runInspectArchiveCli((0, cli_args_1.required)(id, "archive path"), args.options);
|
|
91
91
|
return { json: result, exitCode: result.ok ? undefined : 1 };
|
|
92
92
|
}
|
|
93
93
|
if (subcommand === "restore") {
|
|
94
|
-
const result = loadRunExportCli().runRestoreCli((0,
|
|
94
|
+
const result = loadRunExportCli().runRestoreCli((0, cli_args_1.required)(id, "archive path"), args.options);
|
|
95
95
|
return { json: result, exitCode: result.ok ? undefined : 1 };
|
|
96
96
|
}
|
|
97
97
|
throw new Error("Usage: cw run search|list|show|resume|archive|rerun|drive|export|import|verify-import|inspect-archive|restore [run-id|archive] [--scope repo|home] [--json] | cw run <app> --drive [--once] [--incremental] [--repo R --question Q]");
|
|
@@ -119,7 +119,7 @@ function loadCommitSummary() {
|
|
|
119
119
|
driveArgs.runId = id;
|
|
120
120
|
return { json: await loadPipelineCli().runDriveStep(driveArgs) };
|
|
121
121
|
}
|
|
122
|
-
return { json: loadPipelineCli().runDrivePreview({ ...args.options, runId: (0,
|
|
122
|
+
return { json: loadPipelineCli().runDrivePreview({ ...args.options, runId: (0, cli_args_1.required)(id, "run id") }) };
|
|
123
123
|
},
|
|
124
124
|
});
|
|
125
125
|
registry_core_1.REGISTRY_BY_CAPABILITY.get("run.drive").mcp.handler = (args) => loadPipelineCli().runDrivePreview(args);
|
|
@@ -180,11 +180,11 @@ registry_core_1.REGISTRY_BY_CAPABILITY.get("commit").reason =
|
|
|
180
180
|
function loadRunExportCli() {
|
|
181
181
|
return require("../../shell/run-export-cli");
|
|
182
182
|
}
|
|
183
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("run.export").mcp.handler = (args) => loadRunExportCli().runExportCli((0,
|
|
184
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("run.import").mcp.handler = (args) => loadRunExportCli().runImportCli((0,
|
|
185
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("run.verify-import").mcp.handler = (args) => loadRunExportCli().runVerifyImportCli((0,
|
|
186
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("run.inspect-archive").mcp.handler = (args) => loadRunExportCli().runInspectArchiveCli((0,
|
|
187
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("run.restore").mcp.handler = (args) => loadRunExportCli().runRestoreCli((0,
|
|
183
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("run.export").mcp.handler = (args) => loadRunExportCli().runExportCli((0, cli_args_1.required)((0, cli_args_2.optionalArg)(args.runId), "run id"), args);
|
|
184
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("run.import").mcp.handler = (args) => loadRunExportCli().runImportCli((0, cli_args_1.required)((0, cli_args_2.optionalArg)(args.archive || args.path || args.file), "archive path"), args);
|
|
185
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("run.verify-import").mcp.handler = (args) => loadRunExportCli().runVerifyImportCli((0, cli_args_1.required)((0, cli_args_2.optionalArg)(args.runId), "run id"), args);
|
|
186
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("run.inspect-archive").mcp.handler = (args) => loadRunExportCli().runInspectArchiveCli((0, cli_args_1.required)((0, cli_args_2.optionalArg)(args.archive || args.path || args.file), "archive path"), args);
|
|
187
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("run.restore").mcp.handler = (args) => loadRunExportCli().runRestoreCli((0, cli_args_1.required)((0, cli_args_2.optionalArg)(args.archive || args.path || args.file), "archive path"), args);
|
|
188
188
|
// `run export|import|verify-import|inspect-archive|restore` each carry their
|
|
189
189
|
// own two-token cli.path (found before the ["run"] run.drive.step catch-all
|
|
190
190
|
// per the reversed candidate order), calling the same shell fns with the
|
|
@@ -195,20 +195,20 @@ registry_core_1.REGISTRY_BY_CAPABILITY.get("run.restore").mcp.handler = (args) =
|
|
|
195
195
|
path: ["run", "export"],
|
|
196
196
|
jsonMode: "default",
|
|
197
197
|
hiddenFromHelp: true,
|
|
198
|
-
handler: (args) => ({ json: loadRunExportCli().runExportCli((0,
|
|
198
|
+
handler: (args) => ({ json: loadRunExportCli().runExportCli((0, cli_args_1.required)(args.positionals[0], "run id"), args.options) }),
|
|
199
199
|
});
|
|
200
200
|
(0, registry_core_1.attachCliBinding)("run.import", {
|
|
201
201
|
path: ["run", "import"],
|
|
202
202
|
jsonMode: "default",
|
|
203
203
|
hiddenFromHelp: true,
|
|
204
|
-
handler: (args) => ({ json: loadRunExportCli().runImportCli((0,
|
|
204
|
+
handler: (args) => ({ json: loadRunExportCli().runImportCli((0, cli_args_1.required)(args.positionals[0], "archive path"), args.options) }),
|
|
205
205
|
});
|
|
206
206
|
(0, registry_core_1.attachCliBinding)("run.verify-import", {
|
|
207
207
|
path: ["run", "verify-import"],
|
|
208
208
|
jsonMode: "default",
|
|
209
209
|
hiddenFromHelp: true,
|
|
210
210
|
handler: (args) => {
|
|
211
|
-
const result = loadRunExportCli().runVerifyImportCli((0,
|
|
211
|
+
const result = loadRunExportCli().runVerifyImportCli((0, cli_args_1.required)(args.positionals[0], "run id"), args.options);
|
|
212
212
|
return { json: result, exitCode: args.options.strict && !result.ok ? 1 : undefined };
|
|
213
213
|
},
|
|
214
214
|
});
|
|
@@ -217,7 +217,7 @@ registry_core_1.REGISTRY_BY_CAPABILITY.get("run.restore").mcp.handler = (args) =
|
|
|
217
217
|
jsonMode: "default",
|
|
218
218
|
hiddenFromHelp: true,
|
|
219
219
|
handler: (args) => {
|
|
220
|
-
const result = loadRunExportCli().runInspectArchiveCli((0,
|
|
220
|
+
const result = loadRunExportCli().runInspectArchiveCli((0, cli_args_1.required)(args.positionals[0], "archive path"), args.options);
|
|
221
221
|
return { json: result, exitCode: result.ok ? undefined : 1 };
|
|
222
222
|
},
|
|
223
223
|
});
|
|
@@ -226,7 +226,7 @@ registry_core_1.REGISTRY_BY_CAPABILITY.get("run.restore").mcp.handler = (args) =
|
|
|
226
226
|
jsonMode: "default",
|
|
227
227
|
hiddenFromHelp: true,
|
|
228
228
|
handler: (args) => {
|
|
229
|
-
const result = loadRunExportCli().runRestoreCli((0,
|
|
229
|
+
const result = loadRunExportCli().runRestoreCli((0, cli_args_1.required)(args.positionals[0], "archive path"), args.options);
|
|
230
230
|
return { json: result, exitCode: result.ok ? undefined : 1 };
|
|
231
231
|
},
|
|
232
232
|
});
|
|
@@ -237,7 +237,7 @@ registry_core_1.REGISTRY_BY_CAPABILITY.get("run.restore").mcp.handler = (args) =
|
|
|
237
237
|
caseTokens: ["quickstart", "audit-run"],
|
|
238
238
|
jsonMode: "default",
|
|
239
239
|
handler: async (args) => {
|
|
240
|
-
const appId = (0,
|
|
240
|
+
const appId = (0, cli_args_2.optionalArg)(args.positionals[0]);
|
|
241
241
|
const result = (await loadPipelineCli().quickstartRun({ ...args.options, appId }));
|
|
242
242
|
// Fail closed on both known bad outcomes: a --check preflight that
|
|
243
243
|
// found a blocking gap, OR a --bundle that did not self-verify.
|
|
@@ -251,7 +251,7 @@ registry_core_1.REGISTRY_BY_CAPABILITY.get("run.restore").mcp.handler = (args) =
|
|
|
251
251
|
path: ["dispatch"],
|
|
252
252
|
jsonMode: "default",
|
|
253
253
|
handler: (args) => {
|
|
254
|
-
const runId = (0,
|
|
254
|
+
const runId = (0, cli_args_1.required)((0, cli_args_2.optionalArg)(args.positionals[0]), "run id");
|
|
255
255
|
return { json: loadPipelineCli().dispatchRun({ ...args.options, runId }) };
|
|
256
256
|
},
|
|
257
257
|
});
|
|
@@ -259,9 +259,9 @@ registry_core_1.REGISTRY_BY_CAPABILITY.get("run.restore").mcp.handler = (args) =
|
|
|
259
259
|
path: ["result"],
|
|
260
260
|
jsonMode: "default",
|
|
261
261
|
handler: (args) => {
|
|
262
|
-
const runId = (0,
|
|
263
|
-
const taskId = (0,
|
|
264
|
-
const resultPath = (0,
|
|
262
|
+
const runId = (0, cli_args_1.required)((0, cli_args_2.optionalArg)(args.positionals[0]), "run id");
|
|
263
|
+
const taskId = (0, cli_args_1.required)((0, cli_args_2.optionalArg)(args.positionals[1]), "task id");
|
|
264
|
+
const resultPath = (0, cli_args_1.required)((0, cli_args_2.optionalArg)(args.positionals[2]), "result file path");
|
|
265
265
|
return { json: loadPipelineCli().recordResultRun({ ...args.options, runId, taskId, resultPath }) };
|
|
266
266
|
},
|
|
267
267
|
});
|
|
@@ -269,7 +269,7 @@ registry_core_1.REGISTRY_BY_CAPABILITY.get("run.restore").mcp.handler = (args) =
|
|
|
269
269
|
path: ["commit"],
|
|
270
270
|
jsonMode: "default",
|
|
271
271
|
handler: (args) => {
|
|
272
|
-
const runId = (0,
|
|
272
|
+
const runId = (0, cli_args_1.required)((0, cli_args_2.optionalArg)(args.positionals[0]), "run id");
|
|
273
273
|
return { json: loadPipelineCli().commitRun({ ...args.options, runId }) };
|
|
274
274
|
},
|
|
275
275
|
});
|
|
@@ -284,7 +284,7 @@ registry_core_1.REGISTRY_BY_CAPABILITY.get("run.restore").mcp.handler = (args) =
|
|
|
284
284
|
jsonMode: "flag",
|
|
285
285
|
handler: (args) => {
|
|
286
286
|
const commitSummary = loadCommitSummary();
|
|
287
|
-
const summary = commitSummary.commitSummaryCli({ ...args.options, runId: (0,
|
|
287
|
+
const summary = commitSummary.commitSummaryCli({ ...args.options, runId: (0, cli_args_1.required)(args.positionals[0], "run id") });
|
|
288
288
|
return { json: summary, text: `${commitSummary.formatCommitSummaryText(summary)}\n` };
|
|
289
289
|
},
|
|
290
290
|
});
|
|
@@ -32,7 +32,7 @@ exports.mcpToolDefinitions = mcpToolDefinitions;
|
|
|
32
32
|
exports.declaredMcpTools = declaredMcpTools;
|
|
33
33
|
exports.findCapabilityByMcpTool = findCapabilityByMcpTool;
|
|
34
34
|
const capability_data_1 = require("../../core/capability-data");
|
|
35
|
-
const
|
|
35
|
+
const cli_args_1 = require("../../core/util/cli-args");
|
|
36
36
|
// Every capability-table module (this file plus each domain slice) is
|
|
37
37
|
// required unconditionally at CLI/MCP startup, for every single command
|
|
38
38
|
// (index.ts's whole point is to populate REGISTRY before dispatch can
|
|
@@ -65,8 +65,8 @@ const MCP_REAL_HANDLERS = {
|
|
|
65
65
|
list: () => listBundledWorkflows(),
|
|
66
66
|
"sandbox.list": () => listBundledSandboxProfiles(),
|
|
67
67
|
status: (args) => statusPayload(optionalString(args.runId)),
|
|
68
|
-
"summary.refresh": (args) => loadStateExplosionCli().summaryRefreshCli((0,
|
|
69
|
-
"summary.show": (args) => loadStateExplosionCli().summaryShowCli((0,
|
|
68
|
+
"summary.refresh": (args) => loadStateExplosionCli().summaryRefreshCli((0, cli_args_1.required)(optionalString(args.runId), "run id"), args),
|
|
69
|
+
"summary.show": (args) => loadStateExplosionCli().summaryShowCli((0, cli_args_1.required)(optionalString(args.runId), "run id"), args),
|
|
70
70
|
};
|
|
71
71
|
function optionalString(value) {
|
|
72
72
|
return typeof value === "string" && value.trim() ? value.trim() : undefined;
|
|
@@ -39,7 +39,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
39
39
|
})();
|
|
40
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
41
|
const registry_core_1 = require("./registry-core");
|
|
42
|
-
const
|
|
42
|
+
const cli_args_1 = require("../../core/util/cli-args");
|
|
43
43
|
const state_explosion_text_1 = require("../../core/format/state-explosion-text");
|
|
44
44
|
// This file is required at startup for every command. Loading these shell
|
|
45
45
|
// modules only when their handler runs, not at import time, keeps that
|
|
@@ -67,7 +67,7 @@ function loadOperatorUxText() {
|
|
|
67
67
|
path: ["report"],
|
|
68
68
|
jsonMode: "flag",
|
|
69
69
|
handler: (args) => {
|
|
70
|
-
const runId = (0,
|
|
70
|
+
const runId = (0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.positionals[0]), "run id");
|
|
71
71
|
const reportViewCli = loadReportViewCli();
|
|
72
72
|
const result = reportViewCli.reportWriteCli(runId, args.options);
|
|
73
73
|
if (args.options.show || args.options.summary) {
|
|
@@ -77,7 +77,7 @@ function loadOperatorUxText() {
|
|
|
77
77
|
return { json: result, text: `${result.path}\n` };
|
|
78
78
|
},
|
|
79
79
|
});
|
|
80
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("report").mcp.handler = (args) => loadReportViewCli().reportWriteCli((0,
|
|
80
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("report").mcp.handler = (args) => loadReportViewCli().reportWriteCli((0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.runId), "run id"), args);
|
|
81
81
|
// `status` already carries a milestone-2 CLI binding (`attachCliBinding("status", ...)`
|
|
82
82
|
// above); replace its handler here with the real run-id-aware body while
|
|
83
83
|
// keeping the same row/path (no reshape needed — see byte-compat item 5).
|
|
@@ -89,7 +89,7 @@ registry_core_1.REGISTRY_BY_CAPABILITY.get("status").cli = {
|
|
|
89
89
|
// resolve the same run — the flag form used to be silently ignored
|
|
90
90
|
// (positionals[0] only), so a bogus id given via --run and a real one
|
|
91
91
|
// looked identical ("No run selected" for both).
|
|
92
|
-
const runId = (0,
|
|
92
|
+
const runId = (0, cli_args_1.optionalArg)(args.positionals[0]) || (0, cli_args_1.optionalArg)(args.options.run) || (0, cli_args_1.optionalArg)(args.options.runId);
|
|
93
93
|
const reportViewCli = loadReportViewCli();
|
|
94
94
|
if (!runId)
|
|
95
95
|
return { json: reportViewCli.statusCli(undefined, args.options), text: `No run selected\n\nNext Action\n${adviseNoRunLines()}` };
|
|
@@ -99,7 +99,7 @@ registry_core_1.REGISTRY_BY_CAPABILITY.get("status").cli = {
|
|
|
99
99
|
return { json: reportViewCli.statusCli(runId, args.options), text: `${reportViewCli.statusFullText(runId, args.options)}\n` };
|
|
100
100
|
},
|
|
101
101
|
};
|
|
102
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("status").mcp.handler = (args) => loadReportViewCli().statusCli((0,
|
|
102
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("status").mcp.handler = (args) => loadReportViewCli().statusCli((0, cli_args_1.optionalArg)(args.runId), args);
|
|
103
103
|
function adviseNoRunLines() {
|
|
104
104
|
return " cw plan <workflow-id> --repo <path>\n reason: No run id is available yet; create a workflow run before dispatching or recording evidence.\n";
|
|
105
105
|
}
|
|
@@ -107,17 +107,17 @@ function adviseNoRunLines() {
|
|
|
107
107
|
path: ["graph"],
|
|
108
108
|
jsonMode: "flag",
|
|
109
109
|
handler: (args) => {
|
|
110
|
-
const runId = (0,
|
|
110
|
+
const runId = (0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.positionals[0]), "run id");
|
|
111
111
|
const reportViewCli = loadReportViewCli();
|
|
112
112
|
return { json: reportViewCli.graphCli(runId, args.options), text: `${reportViewCli.graphText(runId, args.options)}\n` };
|
|
113
113
|
},
|
|
114
114
|
});
|
|
115
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("graph").mcp.handler = (args) => loadReportViewCli().graphCli((0,
|
|
115
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("graph").mcp.handler = (args) => loadReportViewCli().graphCli((0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.runId), "run id"), args);
|
|
116
116
|
(0, registry_core_1.attachCliBinding)("operator.status", {
|
|
117
117
|
path: ["operator", "status"],
|
|
118
118
|
jsonMode: "flag",
|
|
119
119
|
handler: (args) => {
|
|
120
|
-
const runId = (0,
|
|
120
|
+
const runId = (0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.positionals[0]), "run id");
|
|
121
121
|
const reportViewCli = loadReportViewCli();
|
|
122
122
|
if (args.options.summary || args.options.brief) {
|
|
123
123
|
return { json: reportViewCli.operatorStatusCli(runId, args.options), text: `${reportViewCli.statusSummaryText(runId, args.options)}\n` };
|
|
@@ -125,17 +125,17 @@ registry_core_1.REGISTRY_BY_CAPABILITY.get("graph").mcp.handler = (args) => load
|
|
|
125
125
|
return { json: reportViewCli.operatorStatusCli(runId, args.options), text: `${reportViewCli.statusFullText(runId, args.options)}\n` };
|
|
126
126
|
},
|
|
127
127
|
});
|
|
128
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("operator.status").mcp.handler = (args) => loadReportViewCli().operatorStatusCli((0,
|
|
128
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("operator.status").mcp.handler = (args) => loadReportViewCli().operatorStatusCli((0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.runId), "run id"), args);
|
|
129
129
|
(0, registry_core_1.attachCliBinding)("operator.report", {
|
|
130
130
|
path: ["operator", "report"],
|
|
131
131
|
jsonMode: "flag",
|
|
132
132
|
handler: (args) => {
|
|
133
|
-
const runId = (0,
|
|
133
|
+
const runId = (0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.positionals[0]), "run id");
|
|
134
134
|
const reportViewCli = loadReportViewCli();
|
|
135
135
|
return { json: reportViewCli.operatorReportCli(runId, args.options), text: `${reportViewCli.operatorReportText(runId, args.options)}\n` };
|
|
136
136
|
},
|
|
137
137
|
});
|
|
138
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("operator.report").mcp.handler = (args) => loadReportViewCli().operatorReportCli((0,
|
|
138
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("operator.report").mcp.handler = (args) => loadReportViewCli().operatorReportCli((0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.runId), "run id"), args);
|
|
139
139
|
// ---- metrics.show / metrics.summary -----------------------------------
|
|
140
140
|
function loadMetricsCli() {
|
|
141
141
|
return require("../../shell/metrics-cli");
|
|
@@ -147,12 +147,12 @@ function loadObservability() {
|
|
|
147
147
|
path: ["metrics", "show"],
|
|
148
148
|
jsonMode: "flag",
|
|
149
149
|
handler: (args) => {
|
|
150
|
-
const runId = (0,
|
|
150
|
+
const runId = (0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.positionals[0]), "run id");
|
|
151
151
|
const report = loadMetricsCli().metricsShowCli(runId, args.options);
|
|
152
152
|
return { json: report, text: `${loadObservability().formatMetricsReport(report)}\n` };
|
|
153
153
|
},
|
|
154
154
|
});
|
|
155
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("metrics.show").mcp.handler = (args) => loadMetricsCli().metricsShowCli((0,
|
|
155
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("metrics.show").mcp.handler = (args) => loadMetricsCli().metricsShowCli((0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.runId), "run id"), args);
|
|
156
156
|
(0, registry_core_1.attachCliBinding)("metrics.summary", {
|
|
157
157
|
path: ["metrics", "summary"],
|
|
158
158
|
jsonMode: "flag",
|
|
@@ -168,12 +168,12 @@ function loadWorkerIsolation() {
|
|
|
168
168
|
}
|
|
169
169
|
const workerPath = __importStar(require("node:path"));
|
|
170
170
|
function workerSummaryCli(args) {
|
|
171
|
-
const runId = (0,
|
|
171
|
+
const runId = (0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.runId), "run id");
|
|
172
172
|
const run = loadRunStore().loadRunFromCwd(runId, invocationCwdFor(args));
|
|
173
173
|
return loadWorkerIsolation().summarizeWorkers(run);
|
|
174
174
|
}
|
|
175
175
|
function workerSummaryText(args) {
|
|
176
|
-
const runId = (0,
|
|
176
|
+
const runId = (0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.runId), "run id");
|
|
177
177
|
const run = loadRunStore().loadRunFromCwd(runId, invocationCwdFor(args));
|
|
178
178
|
return loadWorkerIsolation().formatWorkerSummaryText(run);
|
|
179
179
|
}
|
|
@@ -300,7 +300,7 @@ function loadWorkbenchHost() {
|
|
|
300
300
|
path: ["workbench", "view"],
|
|
301
301
|
jsonMode: "flag",
|
|
302
302
|
handler: (args) => {
|
|
303
|
-
const runId = (0,
|
|
303
|
+
const runId = (0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.positionals[0]), "run id");
|
|
304
304
|
const view = loadWorkbench().buildWorkbenchRunView(runId, args.options);
|
|
305
305
|
return { json: view, text: `${loadWorkbenchText().formatWorkbenchView(view)}\n` };
|
|
306
306
|
},
|
|
@@ -308,14 +308,14 @@ function loadWorkbenchHost() {
|
|
|
308
308
|
// The MCP path is CLI-facing byte-identical (buildWorkbenchRunView takes
|
|
309
309
|
// the same args shape either way) — required here since `.cli` and
|
|
310
310
|
// `.mcp` never share a handler object per byte-compat item 5.
|
|
311
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("workbench.view").mcp.handler = (args) => loadWorkbench().buildWorkbenchRunView((0,
|
|
311
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("workbench.view").mcp.handler = (args) => loadWorkbench().buildWorkbenchRunView((0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.runId), "run id"), args);
|
|
312
312
|
(0, registry_core_1.attachCliBinding)("workbench.serve", {
|
|
313
313
|
path: ["workbench", "serve"],
|
|
314
314
|
jsonMode: "flag",
|
|
315
315
|
handler: (args) => {
|
|
316
316
|
const { WorkbenchHost } = loadWorkbenchHost();
|
|
317
317
|
const host = new WorkbenchHost(args.options);
|
|
318
|
-
if (args.options.once || (0,
|
|
318
|
+
if (args.options.once || (0, cli_args_1.wantsJson)(args.options)) {
|
|
319
319
|
return { json: host.descriptor(true) };
|
|
320
320
|
}
|
|
321
321
|
// The default (no --once, no --json) actually binds and blocks — this
|
|
@@ -355,36 +355,36 @@ function loadEvalText() {
|
|
|
355
355
|
(0, registry_core_1.attachCliBinding)("audit.summary", {
|
|
356
356
|
path: ["audit", "summary"],
|
|
357
357
|
jsonMode: "default",
|
|
358
|
-
handler: (args) => ({ json: loadAuditCli().auditSummaryCli((0,
|
|
358
|
+
handler: (args) => ({ json: loadAuditCli().auditSummaryCli((0, cli_args_1.required)(args.positionals[0], "run id"), args.options) }),
|
|
359
359
|
});
|
|
360
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.summary").mcp.handler = (args) => loadAuditCli().auditSummaryCli((0,
|
|
360
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.summary").mcp.handler = (args) => loadAuditCli().auditSummaryCli((0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.runId), "run id"), args);
|
|
361
361
|
(0, registry_core_1.attachCliBinding)("audit.multi-agent", {
|
|
362
362
|
path: ["audit", "multi-agent"],
|
|
363
363
|
jsonMode: "flag",
|
|
364
364
|
handler: (args) => {
|
|
365
|
-
const view = loadAuditCli().auditMultiAgentCli((0,
|
|
365
|
+
const view = loadAuditCli().auditMultiAgentCli((0, cli_args_1.required)(args.positionals[0], "run id"), args.options);
|
|
366
366
|
return { json: view, text: loadOperatorUxText().formatMultiAgentTrustAudit(view) };
|
|
367
367
|
},
|
|
368
368
|
});
|
|
369
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.multi-agent").mcp.handler = (args) => loadAuditCli().auditMultiAgentCli((0,
|
|
369
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.multi-agent").mcp.handler = (args) => loadAuditCli().auditMultiAgentCli((0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.runId), "run id"), args);
|
|
370
370
|
(0, registry_core_1.attachCliBinding)("audit.policy", {
|
|
371
371
|
path: ["audit", "policy"],
|
|
372
372
|
jsonMode: "flag",
|
|
373
373
|
handler: (args) => {
|
|
374
|
-
const view = loadAuditCli().auditPolicyCli((0,
|
|
374
|
+
const view = loadAuditCli().auditPolicyCli((0, cli_args_1.required)(args.positionals[0], "run id"), args.options);
|
|
375
375
|
return { json: view, text: loadOperatorUxText().formatMultiAgentTrustAudit(view) };
|
|
376
376
|
},
|
|
377
377
|
});
|
|
378
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.policy").mcp.handler = (args) => loadAuditCli().auditPolicyCli((0,
|
|
378
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.policy").mcp.handler = (args) => loadAuditCli().auditPolicyCli((0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.runId), "run id"), args);
|
|
379
379
|
(0, registry_core_1.attachCliBinding)("audit.judge", {
|
|
380
380
|
path: ["audit", "judge"],
|
|
381
381
|
jsonMode: "flag",
|
|
382
382
|
handler: (args) => {
|
|
383
|
-
const view = loadAuditCli().auditJudgeCli((0,
|
|
383
|
+
const view = loadAuditCli().auditJudgeCli((0, cli_args_1.required)(args.positionals[0], "run id"), args.options);
|
|
384
384
|
return { json: view, text: loadOperatorUxText().formatMultiAgentTrustAudit(view) };
|
|
385
385
|
},
|
|
386
386
|
});
|
|
387
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.judge").mcp.handler = (args) => loadAuditCli().auditJudgeCli((0,
|
|
387
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.judge").mcp.handler = (args) => loadAuditCli().auditJudgeCli((0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.runId), "run id"), args);
|
|
388
388
|
// GAP: `cw audit worker|provenance|role|blackboard|attest|decision` — the MCP
|
|
389
389
|
// tool rows (cw_audit_worker/provenance/role/blackboard/attest/decision) were
|
|
390
390
|
// declared but had no CLI path binding and their mcp.handler was still
|
|
@@ -393,43 +393,43 @@ registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.judge").mcp.handler = (args) =
|
|
|
393
393
|
(0, registry_core_1.attachCliBinding)("audit.worker", {
|
|
394
394
|
path: ["audit", "worker"],
|
|
395
395
|
jsonMode: "default",
|
|
396
|
-
handler: (args) => ({ json: loadAuditCli().auditWorkerCli((0,
|
|
396
|
+
handler: (args) => ({ json: loadAuditCli().auditWorkerCli((0, cli_args_1.required)(args.positionals[0], "run id"), (0, cli_args_1.required)(args.positionals[1], "worker id"), args.options) }),
|
|
397
397
|
});
|
|
398
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.worker").mcp.handler = (args) => loadAuditCli().auditWorkerCli((0,
|
|
398
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.worker").mcp.handler = (args) => loadAuditCli().auditWorkerCli((0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.runId), "run id"), (0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.workerId ?? args.worker), "worker id"), args);
|
|
399
399
|
(0, registry_core_1.attachCliBinding)("audit.provenance", {
|
|
400
400
|
path: ["audit", "provenance"],
|
|
401
401
|
jsonMode: "default",
|
|
402
|
-
handler: (args) => ({ json: loadAuditCli().auditProvenanceCli((0,
|
|
402
|
+
handler: (args) => ({ json: loadAuditCli().auditProvenanceCli((0, cli_args_1.required)(args.positionals[0], "run id"), args.options) }),
|
|
403
403
|
});
|
|
404
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.provenance").mcp.handler = (args) => loadAuditCli().auditProvenanceCli((0,
|
|
404
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.provenance").mcp.handler = (args) => loadAuditCli().auditProvenanceCli((0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.runId), "run id"), args);
|
|
405
405
|
(0, registry_core_1.attachCliBinding)("audit.role", {
|
|
406
406
|
path: ["audit", "role"],
|
|
407
407
|
jsonMode: "flag",
|
|
408
408
|
handler: (args) => {
|
|
409
|
-
const view = loadAuditCli().auditRoleCli((0,
|
|
409
|
+
const view = loadAuditCli().auditRoleCli((0, cli_args_1.required)(args.positionals[0], "run id"), (0, cli_args_1.required)(args.positionals[1], "role id"), args.options);
|
|
410
410
|
return { json: view, text: loadOperatorUxText().formatMultiAgentTrustAudit(view) };
|
|
411
411
|
},
|
|
412
412
|
});
|
|
413
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.role").mcp.handler = (args) => loadAuditCli().auditRoleCli((0,
|
|
413
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.role").mcp.handler = (args) => loadAuditCli().auditRoleCli((0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.runId), "run id"), (0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.roleId ?? args.id), "role id"), args);
|
|
414
414
|
(0, registry_core_1.attachCliBinding)("audit.blackboard", {
|
|
415
415
|
path: ["audit", "blackboard"],
|
|
416
416
|
jsonMode: "flag",
|
|
417
417
|
handler: (args) => {
|
|
418
|
-
const view = loadAuditCli().auditBlackboardCli((0,
|
|
418
|
+
const view = loadAuditCli().auditBlackboardCli((0, cli_args_1.required)(args.positionals[0], "run id"), args.options);
|
|
419
419
|
return { json: view, text: loadOperatorUxText().formatMultiAgentTrustAudit(view) };
|
|
420
420
|
},
|
|
421
421
|
});
|
|
422
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.blackboard").mcp.handler = (args) => loadAuditCli().auditBlackboardCli((0,
|
|
422
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.blackboard").mcp.handler = (args) => loadAuditCli().auditBlackboardCli((0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.runId), "run id"), args);
|
|
423
423
|
(0, registry_core_1.attachCliBinding)("audit.attest", {
|
|
424
424
|
path: ["audit", "attest"],
|
|
425
425
|
jsonMode: "default",
|
|
426
|
-
handler: (args) => ({ json: loadAuditCli().auditAttestCli((0,
|
|
426
|
+
handler: (args) => ({ json: loadAuditCli().auditAttestCli((0, cli_args_1.required)(args.positionals[0], "run id"), args.options) }),
|
|
427
427
|
});
|
|
428
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.attest").mcp.handler = (args) => loadAuditCli().auditAttestCli((0,
|
|
428
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.attest").mcp.handler = (args) => loadAuditCli().auditAttestCli((0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.runId), "run id"), args);
|
|
429
429
|
(0, registry_core_1.attachCliBinding)("audit.decision", {
|
|
430
430
|
path: ["audit", "decision"],
|
|
431
431
|
jsonMode: "default",
|
|
432
|
-
handler: (args) => ({ json: loadAuditCli().auditDecisionCli((0,
|
|
432
|
+
handler: (args) => ({ json: loadAuditCli().auditDecisionCli((0, cli_args_1.required)(args.positionals[0], "run id"), (0, cli_args_1.required)(args.positionals[1], "worker id"), args.options) }),
|
|
433
433
|
});
|
|
434
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.decision").mcp.handler = (args) => loadAuditCli().auditDecisionCli((0,
|
|
434
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.decision").mcp.handler = (args) => loadAuditCli().auditDecisionCli((0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.runId), "run id"), (0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.workerId), "worker id"), args);
|
|
435
435
|
// ---- app.list / app.show / app.validate / app.init / app.package -------
|