cool-workflow 0.2.2 → 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 +13 -6
- package/dist/cli/entry.js +41 -1
- package/dist/cli/io.js +12 -22
- package/dist/cli/parseargv.js +1 -0
- package/dist/core/capability-data.js +3 -2
- package/dist/core/format/completion.js +68 -0
- package/dist/core/format/help.js +31 -6
- package/dist/core/format/safe-json.js +73 -0
- package/dist/core/format/state-explosion-text.js +1 -1
- package/dist/core/multi-agent/candidate-scoring.js +5 -1
- package/dist/core/multi-agent/collaboration.js +3 -3
- package/dist/core/multi-agent/coordinator.js +5 -5
- package/dist/core/multi-agent/runtime.js +4 -4
- package/dist/core/multi-agent/topology.js +3 -3
- package/dist/core/pipeline/dispatch.js +18 -4
- package/dist/core/pipeline/drive-decide.js +2 -1
- package/dist/core/state/migrations.js +16 -1
- package/dist/core/state/state-explosion/digest.js +13 -13
- package/dist/core/state/state-explosion/graph.js +17 -11
- package/dist/core/state/state-explosion/report.js +6 -6
- package/dist/core/util/cli-args.js +33 -0
- package/dist/core/util/numeric-flag.js +40 -0
- package/dist/core/version.js +1 -1
- package/dist/mcp/server.js +99 -11
- package/dist/shell/audit-cli.js +57 -25
- package/dist/shell/coordinator-io.js +73 -13
- package/dist/shell/dispatch.js +1 -1
- package/dist/shell/doctor.js +80 -1
- package/dist/shell/drive.js +251 -49
- package/dist/shell/eval-text.js +2 -2
- package/dist/shell/evidence-reasoning.js +4 -4
- package/dist/shell/execution-backend/agent.js +30 -2
- package/dist/shell/execution-backend/container.js +4 -1
- package/dist/shell/execution-backend/local.js +19 -11
- package/dist/shell/feedback-cli.js +6 -6
- package/dist/shell/fs-atomic.js +218 -29
- package/dist/shell/man-cli.js +6 -0
- package/dist/shell/metrics-cli.js +2 -1
- package/dist/shell/multi-agent-cli.js +367 -323
- package/dist/shell/multi-agent-host.js +9 -9
- package/dist/shell/multi-agent-operator-ux.js +80 -38
- package/dist/shell/node-store.js +10 -4
- package/dist/shell/observability.js +1 -1
- package/dist/shell/operator-ux-text.js +22 -22
- package/dist/shell/operator-ux.js +15 -14
- package/dist/shell/orchestrator.js +49 -38
- package/dist/shell/pipeline-cli.js +107 -42
- package/dist/shell/reclamation-io.js +88 -10
- package/dist/shell/registry-cli.js +23 -17
- package/dist/shell/remote-source.js +13 -8
- package/dist/shell/report-cli.js +45 -0
- package/dist/shell/report.js +2 -1
- package/dist/shell/run-registry-io.js +78 -19
- package/dist/shell/run-store.js +74 -2
- package/dist/shell/scheduling-io.js +12 -13
- package/dist/shell/state-cli.js +2 -7
- package/dist/shell/state-explosion-cli.js +17 -9
- package/dist/shell/topology-io.js +36 -5
- package/dist/shell/trust-audit.js +224 -22
- package/dist/shell/trust-policy-io.js +1 -1
- package/dist/shell/worker-cli.js +35 -31
- package/dist/shell/workflow-app-loader.js +67 -1
- package/dist/wiring/capability-table/basics.js +33 -8
- package/dist/wiring/capability-table/exec-backend.js +28 -19
- package/dist/wiring/capability-table/multi-agent.js +187 -180
- package/dist/wiring/capability-table/parity.js +1 -0
- package/dist/wiring/capability-table/pipeline.js +64 -52
- package/dist/wiring/capability-table/registry-core.js +30 -11
- package/dist/wiring/capability-table/reporting.js +147 -106
- package/dist/wiring/capability-table/scheduling-registry.js +201 -167
- package/dist/wiring/capability-table/state.js +59 -51
- package/dist/wiring/capability-table/trust-ledger.js +52 -28
- package/dist/wiring/capability-table/workflow-apps.js +85 -70
- package/docs/agent-delegation-drive.7.md +4 -0
- package/docs/candidate-scoring.7.md +1 -1
- package/docs/canonical-workflow-apps.7.md +7 -7
- package/docs/cli-mcp-parity.7.md +26 -16
- package/docs/contract-migration-tooling.7.md +4 -0
- package/docs/control-plane-scheduling.7.md +4 -0
- package/docs/coordinator-blackboard.7.md +17 -17
- package/docs/dogfood-one-real-repo.7.md +11 -11
- package/docs/durable-state-and-locking.7.md +4 -0
- package/docs/end-to-end-golden-path.7.md +14 -14
- package/docs/evidence-adoption-reasoning-chain.7.md +4 -0
- package/docs/execution-backends.7.md +4 -0
- package/docs/getting-started.md +37 -37
- package/docs/multi-agent-cli-mcp-surface.7.md +21 -17
- package/docs/multi-agent-eval-replay-harness.7.md +17 -13
- package/docs/multi-agent-operator-ux.7.md +23 -19
- package/docs/multi-agent-runtime-core.7.md +22 -22
- package/docs/multi-agent-topologies.7.md +6 -6
- package/docs/multi-agent-trust-policy-audit.7.md +11 -11
- package/docs/node-snapshot-diff-replay.7.md +4 -0
- package/docs/observability-cost-accounting.7.md +4 -0
- package/docs/operator-ux.7.md +34 -34
- package/docs/pipeline-runner.7.md +4 -4
- package/docs/project-index.md +31 -4
- package/docs/real-execution-backends.7.md +4 -0
- package/docs/release-and-migration.7.md +5 -1
- package/docs/release-tooling.7.md +22 -0
- package/docs/routines.md +4 -4
- package/docs/run-registry-control-plane.7.md +23 -19
- package/docs/run-retention-reclamation.7.md +24 -3
- package/docs/scheduled-tasks.md +14 -14
- package/docs/security-trust-hardening.7.md +15 -15
- package/docs/state-explosion-management.7.md +14 -10
- package/docs/team-collaboration.7.md +4 -0
- package/docs/trust-audit-anchor.7.md +4 -0
- package/docs/unix-principles.md +3 -1
- package/docs/verifier-gated-commit.7.md +1 -1
- package/docs/web-desktop-workbench.7.md +4 -0
- package/docs/workflow-app-framework.7.md +13 -13
- package/manifest/plugin.manifest.json +1 -1
- package/package.json +3 -2
- package/scripts/agents/claude-p-agent.js +2 -2
- package/scripts/block-unapproved-tag.sh +42 -6
- package/scripts/bump-version.js +27 -10
- package/scripts/canonical-apps.js +4 -4
- package/scripts/children/batch-delegate-child.js +52 -2
- package/scripts/dogfood-release.js +1 -1
- package/scripts/fake-date-for-reproduction.js +44 -0
- package/scripts/golden-path.js +4 -4
- package/scripts/purity-baseline.json +0 -27
- package/scripts/release-flow.js +194 -13
- package/scripts/release-oneclick.js +407 -0
- package/scripts/verdict-keygen.js +83 -0
- package/scripts/verify-bump-reproduction.sh +148 -0
- package/scripts/verify-verdict-signature.js +61 -0
- package/scripts/version-sync-check.js +39 -22
- package/skills/cool-workflow/SKILL.md +9 -9
- package/skills/cool-workflow/references/commands.md +89 -88
- package/ui/workbench/app.css +37 -1
- package/ui/workbench/app.js +124 -6
|
@@ -5,68 +5,75 @@
|
|
|
5
5
|
// byte-for-byte (extracted with sed, not retyped).
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
const registry_core_1 = require("./registry-core");
|
|
8
|
-
const
|
|
9
|
-
const operator_ux_text_1 = require("../../shell/operator-ux-text");
|
|
8
|
+
const cli_args_1 = require("../../core/util/cli-args");
|
|
10
9
|
const state_explosion_text_1 = require("../../core/format/state-explosion-text");
|
|
11
|
-
|
|
12
|
-
//
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
10
|
+
// This whole module is required unconditionally at startup for EVERY
|
|
11
|
+
// command (see wiring/capability-table/index.ts) — a top-level import of
|
|
12
|
+
// each shell module below would cost every invocation its full load, even
|
|
13
|
+
// though only that one capability's own handler ever calls into it.
|
|
14
|
+
function loadOperatorUxText() {
|
|
15
|
+
return require("../../shell/operator-ux-text");
|
|
16
|
+
}
|
|
17
|
+
function loadEvalText() {
|
|
18
|
+
return require("../../shell/eval-text");
|
|
19
|
+
}
|
|
20
|
+
function loadMultiAgentCli() {
|
|
21
|
+
return require("../../shell/multi-agent-cli");
|
|
22
|
+
}
|
|
23
|
+
function loadCollaborationIo() {
|
|
24
|
+
return require("../../shell/collaboration-io");
|
|
25
|
+
}
|
|
26
|
+
function loadTopologyIo() {
|
|
27
|
+
return require("../../shell/topology-io");
|
|
28
|
+
}
|
|
29
|
+
(0, registry_core_1.attachCliBinding)("topology.list", { path: ["topology", "list"], jsonMode: "default", handler: () => ({ json: loadMultiAgentCli().topologyList() }) });
|
|
30
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("topology.list").mcp.handler = () => loadMultiAgentCli().topologyList();
|
|
24
31
|
(0, registry_core_1.attachCliBinding)("topology.show", {
|
|
25
32
|
path: ["topology", "show"],
|
|
26
33
|
jsonMode: "default",
|
|
27
|
-
handler: (args) => ({ json: (
|
|
34
|
+
handler: (args) => ({ json: loadMultiAgentCli().topologyShowCli((0, cli_args_1.required)(args.positionals[0], "topology id")) }),
|
|
28
35
|
});
|
|
29
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("topology.show").mcp.handler = (args) => (
|
|
36
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("topology.show").mcp.handler = (args) => loadMultiAgentCli().topologyShowCli((0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.topologyId ?? args.id), "topology id"));
|
|
30
37
|
(0, registry_core_1.attachCliBinding)("topology.validate", {
|
|
31
38
|
path: ["topology", "validate"],
|
|
32
39
|
jsonMode: "default",
|
|
33
40
|
handler: (args) => {
|
|
34
|
-
const result = (
|
|
41
|
+
const result = loadMultiAgentCli().topologyValidateCli((0, cli_args_1.required)(args.positionals[0], "topology id"));
|
|
35
42
|
return { json: result, exitCode: result.valid ? undefined : 1 };
|
|
36
43
|
},
|
|
37
44
|
});
|
|
38
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("topology.validate").mcp.handler = (args) => (
|
|
45
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("topology.validate").mcp.handler = (args) => loadMultiAgentCli().topologyValidateCli((0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.topologyId ?? args.id), "topology id"));
|
|
39
46
|
(0, registry_core_1.attachCliBinding)("topology.apply", {
|
|
40
47
|
path: ["topology", "apply"],
|
|
41
48
|
jsonMode: "default",
|
|
42
49
|
handler: (args) => ({
|
|
43
|
-
json: (
|
|
50
|
+
json: loadMultiAgentCli().topologyApplyCli({ ...args.options, runId: (0, cli_args_1.required)(args.positionals[0], "run id"), topologyId: (0, cli_args_1.required)(args.positionals[1], "topology id") }),
|
|
44
51
|
}),
|
|
45
52
|
});
|
|
46
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("topology.apply").mcp.handler = (args) => (
|
|
53
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("topology.apply").mcp.handler = (args) => loadMultiAgentCli().topologyApplyCli({ ...args, topologyId: args.topologyId ?? args.id });
|
|
47
54
|
// jsonMode "flag": human `Topologies` panel by default, canonical JSON
|
|
48
55
|
// under --json (old build's topology.summary was flag).
|
|
49
56
|
(0, registry_core_1.attachCliBinding)("topology.summary", {
|
|
50
57
|
path: ["topology", "summary"],
|
|
51
58
|
jsonMode: "flag",
|
|
52
59
|
handler: (args) => {
|
|
53
|
-
const summary = (
|
|
54
|
-
return { json: summary, text: `${(
|
|
60
|
+
const summary = loadMultiAgentCli().topologySummaryCli({ runId: (0, cli_args_1.required)(args.positionals[0], "run id"), ...args.options });
|
|
61
|
+
return { json: summary, text: `${loadTopologyIo().formatTopologySummaryText(summary)}\n` };
|
|
55
62
|
},
|
|
56
63
|
});
|
|
57
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("topology.summary").mcp.handler = (args) => (
|
|
64
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("topology.summary").mcp.handler = (args) => loadMultiAgentCli().topologySummaryCli(args);
|
|
58
65
|
// jsonMode "flag": human `Run Graph:` render by default, canonical JSON
|
|
59
66
|
// under --json (old build's topology.graph was flag).
|
|
60
67
|
(0, registry_core_1.attachCliBinding)("topology.graph", {
|
|
61
68
|
path: ["topology", "graph"],
|
|
62
69
|
jsonMode: "flag",
|
|
63
70
|
handler: (args) => {
|
|
64
|
-
const runId = (0,
|
|
65
|
-
const graph = (
|
|
66
|
-
return { json: graph, text: `${(
|
|
71
|
+
const runId = (0, cli_args_1.required)(args.positionals[0], "run id");
|
|
72
|
+
const graph = loadMultiAgentCli().topologyGraphCli({ runId, ...args.options });
|
|
73
|
+
return { json: graph, text: `${loadTopologyIo().formatTopologyGraphText(runId, graph)}\n` };
|
|
67
74
|
},
|
|
68
75
|
});
|
|
69
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("topology.graph").mcp.handler = (args) => (
|
|
76
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("topology.graph").mcp.handler = (args) => loadMultiAgentCli().topologyGraphCli(args);
|
|
70
77
|
// ---- multi-agent kernel + host -----------------------------------------
|
|
71
78
|
(0, registry_core_1.attachCliBinding)("multi-agent.run", {
|
|
72
79
|
path: ["multi-agent", "run"],
|
|
@@ -77,58 +84,58 @@ registry_core_1.REGISTRY_BY_CAPABILITY.get("topology.graph").mcp.handler = (args
|
|
|
77
84
|
// only when no `--id` create flag was passed (old handler took `id` from
|
|
78
85
|
// the 3rd positional token).
|
|
79
86
|
handler: (args) => ({
|
|
80
|
-
json: (
|
|
87
|
+
json: loadMultiAgentCli().multiAgentRunCli({
|
|
81
88
|
...args.options,
|
|
82
|
-
runId: (0,
|
|
89
|
+
runId: (0, cli_args_1.required)(args.positionals[0], "run id"),
|
|
83
90
|
multiAgentRunId: args.options.id === undefined ? (args.positionals[1] ?? args.options.multiAgentRunId) : args.options.multiAgentRunId,
|
|
84
91
|
}),
|
|
85
92
|
}),
|
|
86
93
|
});
|
|
87
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.run").mcp.handler = (args) => (
|
|
94
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.run").mcp.handler = (args) => loadMultiAgentCli().multiAgentRunCli(args);
|
|
88
95
|
(0, registry_core_1.attachCliBinding)("multi-agent.status", {
|
|
89
96
|
path: ["multi-agent", "status"],
|
|
90
97
|
jsonMode: "flag",
|
|
91
98
|
handler: (args) => ({
|
|
92
|
-
json: (
|
|
93
|
-
text: (
|
|
99
|
+
json: loadMultiAgentCli().multiAgentStatusCli({ runId: (0, cli_args_1.required)(args.positionals[0], "run id"), ...args.options }),
|
|
100
|
+
text: loadMultiAgentCli().multiAgentStatusText({ runId: (0, cli_args_1.required)(args.positionals[0], "run id"), ...args.options }),
|
|
94
101
|
}),
|
|
95
102
|
});
|
|
96
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.status").mcp.handler = (args) => (
|
|
103
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.status").mcp.handler = (args) => loadMultiAgentCli().multiAgentStatusCli(args);
|
|
97
104
|
(0, registry_core_1.attachCliBinding)("multi-agent.step", {
|
|
98
105
|
path: ["multi-agent", "step"],
|
|
99
106
|
jsonMode: "default",
|
|
100
|
-
handler: (args) => ({ json: (
|
|
107
|
+
handler: (args) => ({ json: loadMultiAgentCli().multiAgentStepCli({ ...args.options, runId: (0, cli_args_1.required)(args.positionals[0], "run id") }) }),
|
|
101
108
|
});
|
|
102
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.step").mcp.handler = (args) => (
|
|
109
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.step").mcp.handler = (args) => loadMultiAgentCli().multiAgentStepCli(args);
|
|
103
110
|
(0, registry_core_1.attachCliBinding)("multi-agent.blackboard", {
|
|
104
111
|
path: ["multi-agent", "blackboard"],
|
|
105
112
|
jsonMode: "default",
|
|
106
|
-
handler: (args) => ({ json: (
|
|
113
|
+
handler: (args) => ({ json: loadMultiAgentCli().multiAgentBlackboardCli({ ...args.options, runId: (0, cli_args_1.required)(args.positionals[0], "run id") }, args.positionals[1]) }),
|
|
107
114
|
});
|
|
108
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.blackboard").mcp.handler = (args) => (
|
|
115
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.blackboard").mcp.handler = (args) => loadMultiAgentCli().multiAgentBlackboardCli(args, args.action);
|
|
109
116
|
(0, registry_core_1.attachCliBinding)("multi-agent.score", {
|
|
110
117
|
path: ["multi-agent", "score"],
|
|
111
118
|
jsonMode: "default",
|
|
112
|
-
handler: (args) => ({ json: (
|
|
119
|
+
handler: (args) => ({ json: loadMultiAgentCli().multiAgentScoreCli({ ...args.options, runId: (0, cli_args_1.required)(args.positionals[0], "run id"), candidate: args.options.candidate ?? args.positionals[1] }) }),
|
|
113
120
|
});
|
|
114
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.score").mcp.handler = (args) => (
|
|
121
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.score").mcp.handler = (args) => loadMultiAgentCli().multiAgentScoreCli(args);
|
|
115
122
|
(0, registry_core_1.attachCliBinding)("multi-agent.select", {
|
|
116
123
|
path: ["multi-agent", "select"],
|
|
117
124
|
jsonMode: "default",
|
|
118
|
-
handler: (args) => ({ json: (
|
|
125
|
+
handler: (args) => ({ json: loadMultiAgentCli().multiAgentSelectCli({ ...args.options, runId: (0, cli_args_1.required)(args.positionals[0], "run id"), candidate: args.options.candidate ?? args.positionals[1] }) }),
|
|
119
126
|
});
|
|
120
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.select").mcp.handler = (args) => (
|
|
127
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.select").mcp.handler = (args) => loadMultiAgentCli().multiAgentSelectCli(args);
|
|
121
128
|
// jsonMode "flag": human `Multi-Agent` panel by default, canonical JSON
|
|
122
129
|
// under --json (old build's multi-agent.summary was flag).
|
|
123
130
|
(0, registry_core_1.attachCliBinding)("multi-agent.summary", {
|
|
124
131
|
path: ["multi-agent", "summary"],
|
|
125
132
|
jsonMode: "flag",
|
|
126
133
|
handler: (args) => {
|
|
127
|
-
const summary = (
|
|
128
|
-
return { json: summary, text: `${(
|
|
134
|
+
const summary = loadMultiAgentCli().multiAgentSummaryCli({ runId: (0, cli_args_1.required)(args.positionals[0], "run id"), ...args.options });
|
|
135
|
+
return { json: summary, text: `${loadOperatorUxText().formatMultiAgentSummaryText(summary)}\n` };
|
|
129
136
|
},
|
|
130
137
|
});
|
|
131
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.summary").mcp.handler = (args) => (
|
|
138
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.summary").mcp.handler = (args) => loadMultiAgentCli().multiAgentSummaryCli(args);
|
|
132
139
|
// `cw multi-agent graph <run>` is one dispatch path served by two capability
|
|
133
140
|
// rows (multi-agent.graph — the operator graph — and multi-agent.graph.compact
|
|
134
141
|
// — the state-explosion view under --view/--focus/--depth), exactly like
|
|
@@ -136,16 +143,16 @@ registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.summary").mcp.handler =
|
|
|
136
143
|
// second row exists so both capabilities carry a cli binding (the
|
|
137
144
|
// both-surface pairing) and `cw help multi-agent` can list both forms.
|
|
138
145
|
function multiAgentGraphHandler(args) {
|
|
139
|
-
const call = { runId: (0,
|
|
146
|
+
const call = { runId: (0, cli_args_1.required)(args.positionals[0], "run id"), ...args.options };
|
|
140
147
|
if (args.options.view !== undefined || args.options.focus !== undefined || args.options.depth !== undefined) {
|
|
141
|
-
const compact = (
|
|
148
|
+
const compact = loadMultiAgentCli().multiAgentGraphCompactCli(call);
|
|
142
149
|
return { json: compact, text: (0, state_explosion_text_1.formatCompactGraph)(compact) };
|
|
143
150
|
}
|
|
144
|
-
return { json: (
|
|
151
|
+
return { json: loadMultiAgentCli().multiAgentGraphCli(call), text: loadMultiAgentCli().multiAgentGraphText(call) };
|
|
145
152
|
}
|
|
146
153
|
(0, registry_core_1.attachCliBinding)("multi-agent.graph", { path: ["multi-agent", "graph"], helpPath: ["multi-agent", "graph"], jsonMode: "flag", handler: multiAgentGraphHandler });
|
|
147
154
|
(0, registry_core_1.attachCliBinding)("multi-agent.graph.compact", { path: ["multi-agent", "graph"], helpPath: ["multi-agent", "graph"], jsonMode: "flag", handler: multiAgentGraphHandler });
|
|
148
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.graph").mcp.handler = (args) => (
|
|
155
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.graph").mcp.handler = (args) => loadMultiAgentCli().multiAgentGraphCli(args);
|
|
149
156
|
// GAP: `cw multi-agent dependencies|failures|evidence` — the MCP tool rows
|
|
150
157
|
// (cw_multi_agent_dependencies/failures/evidence) were declared but had no
|
|
151
158
|
// CLI path binding and their mcp.handler was still notYetImplemented. Wire
|
|
@@ -155,29 +162,29 @@ registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.graph").mcp.handler = (a
|
|
|
155
162
|
path: ["multi-agent", "dependencies"],
|
|
156
163
|
jsonMode: "flag",
|
|
157
164
|
handler: (args) => ({
|
|
158
|
-
json: (
|
|
159
|
-
text: (
|
|
165
|
+
json: loadMultiAgentCli().multiAgentDependenciesCli({ runId: (0, cli_args_1.required)(args.positionals[0], "run id"), ...args.options }),
|
|
166
|
+
text: loadMultiAgentCli().multiAgentDependenciesText({ runId: (0, cli_args_1.required)(args.positionals[0], "run id"), ...args.options }),
|
|
160
167
|
}),
|
|
161
168
|
});
|
|
162
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.dependencies").mcp.handler = (args) => (
|
|
169
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.dependencies").mcp.handler = (args) => loadMultiAgentCli().multiAgentDependenciesCli(args);
|
|
163
170
|
(0, registry_core_1.attachCliBinding)("multi-agent.failures", {
|
|
164
171
|
path: ["multi-agent", "failures"],
|
|
165
172
|
jsonMode: "flag",
|
|
166
173
|
handler: (args) => ({
|
|
167
|
-
json: (
|
|
168
|
-
text: (
|
|
174
|
+
json: loadMultiAgentCli().multiAgentFailuresCli({ runId: (0, cli_args_1.required)(args.positionals[0], "run id"), ...args.options }),
|
|
175
|
+
text: loadMultiAgentCli().multiAgentFailuresText({ runId: (0, cli_args_1.required)(args.positionals[0], "run id"), ...args.options }),
|
|
169
176
|
}),
|
|
170
177
|
});
|
|
171
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.failures").mcp.handler = (args) => (
|
|
178
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.failures").mcp.handler = (args) => loadMultiAgentCli().multiAgentFailuresCli(args);
|
|
172
179
|
(0, registry_core_1.attachCliBinding)("multi-agent.evidence", {
|
|
173
180
|
path: ["multi-agent", "evidence"],
|
|
174
181
|
jsonMode: "flag",
|
|
175
182
|
handler: (args) => ({
|
|
176
|
-
json: (
|
|
177
|
-
text: (
|
|
183
|
+
json: loadMultiAgentCli().multiAgentEvidenceCli({ runId: (0, cli_args_1.required)(args.positionals[0], "run id"), ...args.options }),
|
|
184
|
+
text: loadMultiAgentCli().multiAgentEvidenceText({ runId: (0, cli_args_1.required)(args.positionals[0], "run id"), ...args.options }),
|
|
178
185
|
}),
|
|
179
186
|
});
|
|
180
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.evidence").mcp.handler = (args) => (
|
|
187
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.evidence").mcp.handler = (args) => loadMultiAgentCli().multiAgentEvidenceCli(args);
|
|
181
188
|
// GAP: `cw multi-agent reasoning <run> [--refresh|--evidence <id>]` — the
|
|
182
189
|
// evidence-adoption reasoning chain (cw_evidence_reasoning /
|
|
183
190
|
// cw_evidence_reasoning_refresh MCP tools were declared but notYetImplemented,
|
|
@@ -185,11 +192,11 @@ registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.evidence").mcp.handler =
|
|
|
185
192
|
// matching the old handler's printJson refresh arm); otherwise it prints the
|
|
186
193
|
// report (text, or JSON under --json).
|
|
187
194
|
function multiAgentReasoningHandler(args) {
|
|
188
|
-
const call = { runId: (0,
|
|
195
|
+
const call = { runId: (0, cli_args_1.required)(args.positionals[0], "run id"), ...args.options };
|
|
189
196
|
if (args.options.refresh && args.options.evidence === undefined && args.options.evidenceId === undefined) {
|
|
190
|
-
return { json: (
|
|
197
|
+
return { json: loadMultiAgentCli().multiAgentReasoningRefreshCli(call) };
|
|
191
198
|
}
|
|
192
|
-
return { json: (
|
|
199
|
+
return { json: loadMultiAgentCli().multiAgentReasoningCli(call), text: loadMultiAgentCli().multiAgentReasoningText(call) };
|
|
193
200
|
}
|
|
194
201
|
(0, registry_core_1.attachCliBinding)("multi-agent.reasoning", { path: ["multi-agent", "reasoning"], helpPath: ["multi-agent", "reasoning"], jsonMode: "flag", handler: multiAgentReasoningHandler });
|
|
195
202
|
// `multi-agent.reasoning.refresh` (the durable evidence-adoption index) shares
|
|
@@ -198,8 +205,8 @@ function multiAgentReasoningHandler(args) {
|
|
|
198
205
|
// This row exists so the refresh capability also carries a cli binding (the
|
|
199
206
|
// both-surface pairing) and `cw help multi-agent` lists it. Same handler.
|
|
200
207
|
(0, registry_core_1.attachCliBinding)("multi-agent.reasoning.refresh", { path: ["multi-agent", "reasoning"], helpPath: ["multi-agent", "reasoning"], jsonMode: "default", handler: multiAgentReasoningHandler });
|
|
201
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.reasoning").mcp.handler = (args) => (
|
|
202
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.reasoning.refresh").mcp.handler = (args) => (
|
|
208
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.reasoning").mcp.handler = (args) => loadMultiAgentCli().multiAgentReasoningCli(args);
|
|
209
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.reasoning.refresh").mcp.handler = (args) => loadMultiAgentCli().multiAgentReasoningRefreshCli(args);
|
|
203
210
|
// GAP: the state-explosion / contract read views (cw_multi_agent_summarize /
|
|
204
211
|
// cw_blackboard_summarize / cw_multi_agent_graph_compact / cw_contract_show)
|
|
205
212
|
// were declared MCP tools left on notYetImplemented, and their CLI verbs were
|
|
@@ -208,32 +215,32 @@ registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.reasoning.refresh").mcp.
|
|
|
208
215
|
path: ["multi-agent", "summarize"],
|
|
209
216
|
jsonMode: "flag",
|
|
210
217
|
handler: (args) => {
|
|
211
|
-
const result = (
|
|
218
|
+
const result = loadMultiAgentCli().multiAgentSummarizeCli({ runId: (0, cli_args_1.required)(args.positionals[0], "run id"), ...args.options });
|
|
212
219
|
return { json: result, text: (0, state_explosion_text_1.formatStateExplosionReport)(result) };
|
|
213
220
|
},
|
|
214
221
|
});
|
|
215
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.summarize").mcp.handler = (args) => (
|
|
216
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.graph.compact").mcp.handler = (args) => (
|
|
222
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.summarize").mcp.handler = (args) => loadMultiAgentCli().multiAgentSummarizeCli(args);
|
|
223
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.graph.compact").mcp.handler = (args) => loadMultiAgentCli().multiAgentGraphCompactCli(args);
|
|
217
224
|
(0, registry_core_1.attachCliBinding)("blackboard.summarize", {
|
|
218
225
|
path: ["blackboard", "summarize"],
|
|
219
226
|
jsonMode: "flag",
|
|
220
|
-
handler: (args) => ({ json: (
|
|
227
|
+
handler: (args) => ({ json: loadMultiAgentCli().blackboardSummarizeCli({ runId: (0, cli_args_1.required)(args.positionals[0], "run id"), ...args.options }) }),
|
|
221
228
|
});
|
|
222
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("blackboard.summarize").mcp.handler = (args) => (
|
|
229
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("blackboard.summarize").mcp.handler = (args) => loadMultiAgentCli().blackboardSummarizeCli(args);
|
|
223
230
|
(0, registry_core_1.attachCliBinding)("contract.show", {
|
|
224
231
|
path: ["contract", "show"],
|
|
225
232
|
jsonMode: "default",
|
|
226
|
-
handler: (args) => ({ json: (
|
|
233
|
+
handler: (args) => ({ json: loadMultiAgentCli().contractShowCli({ runId: (0, cli_args_1.required)(args.positionals[0], "run id"), ...args.options }, args.positionals[1]) }),
|
|
227
234
|
});
|
|
228
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("contract.show").mcp.handler = (args) => (
|
|
235
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("contract.show").mcp.handler = (args) => loadMultiAgentCli().contractShowCli(args);
|
|
229
236
|
(0, registry_core_1.attachCliBinding)("multi-agent.run.create", {
|
|
230
237
|
path: ["multi-agent", "role"],
|
|
231
238
|
helpPath: ["multi-agent", "role"],
|
|
232
239
|
jsonMode: "default",
|
|
233
240
|
handler: (args) => ({
|
|
234
|
-
json: (
|
|
241
|
+
json: loadMultiAgentCli().multiAgentRoleCli({
|
|
235
242
|
...args.options,
|
|
236
|
-
runId: (0,
|
|
243
|
+
runId: (0, cli_args_1.required)(args.positionals[0], "run id"),
|
|
237
244
|
roleId: args.options.id === undefined && args.positionals.length >= 2 ? args.positionals[1] : args.options.roleId,
|
|
238
245
|
}),
|
|
239
246
|
}),
|
|
@@ -243,9 +250,9 @@ registry_core_1.REGISTRY_BY_CAPABILITY.get("contract.show").mcp.handler = (args)
|
|
|
243
250
|
helpPath: ["multi-agent", "group"],
|
|
244
251
|
jsonMode: "default",
|
|
245
252
|
handler: (args) => ({
|
|
246
|
-
json: (
|
|
253
|
+
json: loadMultiAgentCli().multiAgentGroupCli({
|
|
247
254
|
...args.options,
|
|
248
|
-
runId: (0,
|
|
255
|
+
runId: (0, cli_args_1.required)(args.positionals[0], "run id"),
|
|
249
256
|
groupId: args.options.id === undefined && args.positionals.length >= 2 ? args.positionals[1] : args.options.groupId,
|
|
250
257
|
}),
|
|
251
258
|
}),
|
|
@@ -255,9 +262,9 @@ registry_core_1.REGISTRY_BY_CAPABILITY.get("contract.show").mcp.handler = (args)
|
|
|
255
262
|
helpPath: ["multi-agent", "membership"],
|
|
256
263
|
jsonMode: "default",
|
|
257
264
|
handler: (args) => ({
|
|
258
|
-
json: (
|
|
265
|
+
json: loadMultiAgentCli().multiAgentMembershipCli({
|
|
259
266
|
...args.options,
|
|
260
|
-
runId: (0,
|
|
267
|
+
runId: (0, cli_args_1.required)(args.positionals[0], "run id"),
|
|
261
268
|
membershipId: args.options.id === undefined && args.positionals.length >= 2 ? args.positionals[1] : args.options.membershipId,
|
|
262
269
|
}),
|
|
263
270
|
}),
|
|
@@ -267,9 +274,9 @@ registry_core_1.REGISTRY_BY_CAPABILITY.get("contract.show").mcp.handler = (args)
|
|
|
267
274
|
helpPath: ["multi-agent", "fanout"],
|
|
268
275
|
jsonMode: "default",
|
|
269
276
|
handler: (args) => ({
|
|
270
|
-
json: (
|
|
277
|
+
json: loadMultiAgentCli().multiAgentFanoutCli({
|
|
271
278
|
...args.options,
|
|
272
|
-
runId: (0,
|
|
279
|
+
runId: (0, cli_args_1.required)(args.positionals[0], "run id"),
|
|
273
280
|
fanoutId: args.options.id === undefined && args.positionals.length >= 2 ? args.positionals[1] : args.options.fanoutId,
|
|
274
281
|
}),
|
|
275
282
|
}),
|
|
@@ -279,26 +286,26 @@ registry_core_1.REGISTRY_BY_CAPABILITY.get("contract.show").mcp.handler = (args)
|
|
|
279
286
|
helpPath: ["multi-agent", "fanin"],
|
|
280
287
|
jsonMode: "default",
|
|
281
288
|
handler: (args) => ({
|
|
282
|
-
json: (
|
|
289
|
+
json: loadMultiAgentCli().multiAgentFaninCli({
|
|
283
290
|
...args.options,
|
|
284
|
-
runId: (0,
|
|
291
|
+
runId: (0, cli_args_1.required)(args.positionals[0], "run id"),
|
|
285
292
|
faninId: args.options.id === undefined && args.positionals.length >= 2 ? args.positionals[1] : args.options.faninId,
|
|
286
293
|
}),
|
|
287
294
|
}),
|
|
288
295
|
});
|
|
289
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.run.create").mcp.handler = (args) => (
|
|
290
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.role.create").mcp.handler = (args) => (
|
|
291
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.group.create").mcp.handler = (args) => (
|
|
292
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.membership.create").mcp.handler = (args) => (
|
|
293
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.fanout.create").mcp.handler = (args) => (
|
|
294
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.fanin.collect").mcp.handler = (args) => (
|
|
296
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.run.create").mcp.handler = (args) => loadMultiAgentCli().multiAgentRoleCli(args);
|
|
297
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.role.create").mcp.handler = (args) => loadMultiAgentCli().multiAgentRoleCli(args);
|
|
298
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.group.create").mcp.handler = (args) => loadMultiAgentCli().multiAgentGroupCli(args);
|
|
299
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.membership.create").mcp.handler = (args) => loadMultiAgentCli().multiAgentMembershipCli(args);
|
|
300
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.fanout.create").mcp.handler = (args) => loadMultiAgentCli().multiAgentFanoutCli(args);
|
|
301
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.fanin.collect").mcp.handler = (args) => loadMultiAgentCli().multiAgentFaninCli(args);
|
|
295
302
|
// GAP: the *.show MCP tools were declared but left notYetImplemented. Route
|
|
296
303
|
// each to its create CLI fn's read arm (id-only args return the record).
|
|
297
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.role.show").mcp.handler = (args) => (
|
|
298
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.group.show").mcp.handler = (args) => (
|
|
299
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.membership.show").mcp.handler = (args) => (
|
|
300
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.fanout.show").mcp.handler = (args) => (
|
|
301
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.fanin.show").mcp.handler = (args) => (
|
|
304
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.role.show").mcp.handler = (args) => loadMultiAgentCli().multiAgentRoleCli({ ...args, roleId: args.roleId ?? args.id });
|
|
305
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.group.show").mcp.handler = (args) => loadMultiAgentCli().multiAgentGroupCli({ ...args, groupId: args.groupId ?? args.id });
|
|
306
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.membership.show").mcp.handler = (args) => loadMultiAgentCli().multiAgentMembershipCli({ ...args, membershipId: args.membershipId ?? args.id });
|
|
307
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.fanout.show").mcp.handler = (args) => loadMultiAgentCli().multiAgentFanoutCli({ ...args, fanoutId: args.fanoutId ?? args.id });
|
|
308
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.fanin.show").mcp.handler = (args) => loadMultiAgentCli().multiAgentFaninCli({ ...args, faninId: args.faninId ?? args.id });
|
|
302
309
|
// The create/show pairs for role/group/membership/fanout/fanin each SHARE
|
|
303
310
|
// one dispatch path (["multi-agent","role"] etc.); `cw multi-agent role
|
|
304
311
|
// <run> [id]` is served by the create binding declared above (first row
|
|
@@ -310,9 +317,9 @@ registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.fanin.show").mcp.handler
|
|
|
310
317
|
// exactly like blackboard.message.post/list. Same handler, same shell fn.
|
|
311
318
|
function multiAgentRoleHandler(args) {
|
|
312
319
|
return {
|
|
313
|
-
json: (
|
|
320
|
+
json: loadMultiAgentCli().multiAgentRoleCli({
|
|
314
321
|
...args.options,
|
|
315
|
-
runId: (0,
|
|
322
|
+
runId: (0, cli_args_1.required)(args.positionals[0], "run id"),
|
|
316
323
|
roleId: args.options.id === undefined && args.positionals.length >= 2 ? args.positionals[1] : args.options.roleId,
|
|
317
324
|
}),
|
|
318
325
|
};
|
|
@@ -323,57 +330,57 @@ function multiAgentRoleHandler(args) {
|
|
|
323
330
|
path: ["multi-agent", "group"],
|
|
324
331
|
helpPath: ["multi-agent", "group"],
|
|
325
332
|
jsonMode: "default",
|
|
326
|
-
handler: (args) => ({ json: (
|
|
333
|
+
handler: (args) => ({ json: loadMultiAgentCli().multiAgentGroupCli({ ...args.options, runId: (0, cli_args_1.required)(args.positionals[0], "run id"), groupId: args.options.id === undefined && args.positionals.length >= 2 ? args.positionals[1] : args.options.groupId }) }),
|
|
327
334
|
});
|
|
328
335
|
(0, registry_core_1.attachCliBinding)("multi-agent.membership.show", {
|
|
329
336
|
path: ["multi-agent", "membership"],
|
|
330
337
|
helpPath: ["multi-agent", "membership"],
|
|
331
338
|
jsonMode: "default",
|
|
332
|
-
handler: (args) => ({ json: (
|
|
339
|
+
handler: (args) => ({ json: loadMultiAgentCli().multiAgentMembershipCli({ ...args.options, runId: (0, cli_args_1.required)(args.positionals[0], "run id"), membershipId: args.options.id === undefined && args.positionals.length >= 2 ? args.positionals[1] : args.options.membershipId }) }),
|
|
333
340
|
});
|
|
334
341
|
(0, registry_core_1.attachCliBinding)("multi-agent.fanout.show", {
|
|
335
342
|
path: ["multi-agent", "fanout"],
|
|
336
343
|
helpPath: ["multi-agent", "fanout"],
|
|
337
344
|
jsonMode: "default",
|
|
338
|
-
handler: (args) => ({ json: (
|
|
345
|
+
handler: (args) => ({ json: loadMultiAgentCli().multiAgentFanoutCli({ ...args.options, runId: (0, cli_args_1.required)(args.positionals[0], "run id"), fanoutId: args.options.id === undefined && args.positionals.length >= 2 ? args.positionals[1] : args.options.fanoutId }) }),
|
|
339
346
|
});
|
|
340
347
|
(0, registry_core_1.attachCliBinding)("multi-agent.fanin.show", {
|
|
341
348
|
path: ["multi-agent", "fanin"],
|
|
342
349
|
helpPath: ["multi-agent", "fanin"],
|
|
343
350
|
jsonMode: "default",
|
|
344
|
-
handler: (args) => ({ json: (
|
|
351
|
+
handler: (args) => ({ json: loadMultiAgentCli().multiAgentFaninCli({ ...args.options, runId: (0, cli_args_1.required)(args.positionals[0], "run id"), faninId: args.options.id === undefined && args.positionals.length >= 2 ? args.positionals[1] : args.options.faninId }) }),
|
|
345
352
|
});
|
|
346
353
|
(0, registry_core_1.attachCliBinding)("multi-agent.run.transition", {
|
|
347
354
|
path: ["multi-agent", "transition"],
|
|
348
355
|
jsonMode: "default",
|
|
349
|
-
handler: (args) => ({ json: (
|
|
356
|
+
handler: (args) => ({ json: loadMultiAgentCli().multiAgentRunCli({ ...args.options, runId: (0, cli_args_1.required)(args.positionals[0], "run id") }) }),
|
|
350
357
|
});
|
|
351
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.run.transition").mcp.handler = (args) => (
|
|
358
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.run.transition").mcp.handler = (args) => loadMultiAgentCli().multiAgentRunCli(args);
|
|
352
359
|
(0, registry_core_1.attachCliBinding)("multi-agent.run.show", {
|
|
353
360
|
path: ["multi-agent", "show"],
|
|
354
361
|
jsonMode: "default",
|
|
355
|
-
handler: (args) => ({ json: (
|
|
362
|
+
handler: (args) => ({ json: loadMultiAgentCli().multiAgentShowCli({ runId: (0, cli_args_1.required)(args.positionals[0], "run id"), ...args.options }, (0, cli_args_1.required)(args.positionals[1], "id")) }),
|
|
356
363
|
});
|
|
357
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.run.show").mcp.handler = (args) => (
|
|
364
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("multi-agent.run.show").mcp.handler = (args) => loadMultiAgentCli().multiAgentShowCli(args, (0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.multiAgentRunId ?? args.id), "id"));
|
|
358
365
|
// ---- blackboard / coordinator -------------------------------------------
|
|
359
366
|
(0, registry_core_1.attachCliBinding)("blackboard.summary", {
|
|
360
367
|
path: ["blackboard", "summary"],
|
|
361
368
|
jsonMode: "default",
|
|
362
|
-
handler: (args) => ({ json: (
|
|
369
|
+
handler: (args) => ({ json: loadMultiAgentCli().blackboardSummaryCli({ runId: (0, cli_args_1.required)(args.positionals[0], "run id"), ...args.options }) }),
|
|
363
370
|
});
|
|
364
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("blackboard.summary").mcp.handler = (args) => (
|
|
371
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("blackboard.summary").mcp.handler = (args) => loadMultiAgentCli().blackboardSummaryCli(args);
|
|
365
372
|
(0, registry_core_1.attachCliBinding)("blackboard.graph", {
|
|
366
373
|
path: ["blackboard", "graph"],
|
|
367
374
|
jsonMode: "default",
|
|
368
|
-
handler: (args) => ({ json: (
|
|
375
|
+
handler: (args) => ({ json: loadMultiAgentCli().blackboardGraphCli({ runId: (0, cli_args_1.required)(args.positionals[0], "run id"), ...args.options }) }),
|
|
369
376
|
});
|
|
370
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("blackboard.graph").mcp.handler = (args) => (
|
|
377
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("blackboard.graph").mcp.handler = (args) => loadMultiAgentCli().blackboardGraphCli(args);
|
|
371
378
|
(0, registry_core_1.attachCliBinding)("blackboard.resolve", {
|
|
372
379
|
path: ["blackboard", "resolve"],
|
|
373
380
|
jsonMode: "default",
|
|
374
|
-
handler: (args) => ({ json: (
|
|
381
|
+
handler: (args) => ({ json: loadMultiAgentCli().blackboardResolveCli({ ...args.options, runId: (0, cli_args_1.required)(args.positionals[0], "run id") }) }),
|
|
375
382
|
});
|
|
376
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("blackboard.resolve").mcp.handler = (args) => (
|
|
383
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("blackboard.resolve").mcp.handler = (args) => loadMultiAgentCli().blackboardResolveCli(args);
|
|
377
384
|
// GAP: the blackboard write/read verbs accept the sub-verb's ACTION word
|
|
378
385
|
// ("create"/"post"/"put"/"add"/"list") in EITHER of two slots around the run
|
|
379
386
|
// id, per the smokes' varied spellings:
|
|
@@ -391,146 +398,146 @@ const BLACKBOARD_ACTION_WORDS = new Set(["create", "post", "put", "add", "list",
|
|
|
391
398
|
function blackboardRunAndAction(args) {
|
|
392
399
|
const [first, second] = args.positionals;
|
|
393
400
|
if (first !== undefined && BLACKBOARD_ACTION_WORDS.has(first)) {
|
|
394
|
-
return { runId: (0,
|
|
401
|
+
return { runId: (0, cli_args_1.required)(second, "run id"), action: first };
|
|
395
402
|
}
|
|
396
|
-
return { runId: (0,
|
|
403
|
+
return { runId: (0, cli_args_1.required)(first, "run id"), action: second };
|
|
397
404
|
}
|
|
398
405
|
(0, registry_core_1.attachCliBinding)("blackboard.topic.create", {
|
|
399
406
|
path: ["blackboard", "topic"],
|
|
400
407
|
helpPath: ["blackboard", "topic", "create"],
|
|
401
408
|
jsonMode: "default",
|
|
402
|
-
handler: (args) => ({ json: (
|
|
409
|
+
handler: (args) => ({ json: loadMultiAgentCli().blackboardTopicCreateCli({ ...args.options, runId: blackboardRunAndAction(args).runId }) }),
|
|
403
410
|
});
|
|
404
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("blackboard.topic.create").mcp.handler = (args) => (
|
|
411
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("blackboard.topic.create").mcp.handler = (args) => loadMultiAgentCli().blackboardTopicCreateCli(args);
|
|
405
412
|
function blackboardMessageHandler(args) {
|
|
406
413
|
const { runId, action } = blackboardRunAndAction(args);
|
|
407
414
|
if (action === "list")
|
|
408
|
-
return { json: (
|
|
409
|
-
return { json: (
|
|
415
|
+
return { json: loadMultiAgentCli().blackboardMessageListCli({ ...args.options, runId }) };
|
|
416
|
+
return { json: loadMultiAgentCli().blackboardMessagePostCli({ ...args.options, runId }) };
|
|
410
417
|
}
|
|
411
418
|
(0, registry_core_1.attachCliBinding)("blackboard.message.post", { path: ["blackboard", "message"], helpPath: ["blackboard", "message", "post"], jsonMode: "default", handler: blackboardMessageHandler });
|
|
412
419
|
(0, registry_core_1.attachCliBinding)("blackboard.message.list", { path: ["blackboard", "message"], helpPath: ["blackboard", "message", "list"], jsonMode: "default", handler: blackboardMessageHandler });
|
|
413
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("blackboard.message.post").mcp.handler = (args) => (
|
|
414
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("blackboard.message.list").mcp.handler = (args) => (
|
|
420
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("blackboard.message.post").mcp.handler = (args) => loadMultiAgentCli().blackboardMessagePostCli(args);
|
|
421
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("blackboard.message.list").mcp.handler = (args) => loadMultiAgentCli().blackboardMessageListCli(args);
|
|
415
422
|
(0, registry_core_1.attachCliBinding)("blackboard.context.put", {
|
|
416
423
|
path: ["blackboard", "context"],
|
|
417
424
|
helpPath: ["blackboard", "context", "put"],
|
|
418
425
|
jsonMode: "default",
|
|
419
|
-
handler: (args) => ({ json: (
|
|
426
|
+
handler: (args) => ({ json: loadMultiAgentCli().blackboardContextPutCli({ ...args.options, runId: blackboardRunAndAction(args).runId }) }),
|
|
420
427
|
});
|
|
421
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("blackboard.context.put").mcp.handler = (args) => (
|
|
428
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("blackboard.context.put").mcp.handler = (args) => loadMultiAgentCli().blackboardContextPutCli(args);
|
|
422
429
|
function blackboardArtifactHandler(args) {
|
|
423
430
|
const { runId, action } = blackboardRunAndAction(args);
|
|
424
431
|
if (action === "list")
|
|
425
|
-
return { json: (
|
|
426
|
-
return { json: (
|
|
432
|
+
return { json: loadMultiAgentCli().blackboardArtifactListCli({ ...args.options, runId }) };
|
|
433
|
+
return { json: loadMultiAgentCli().blackboardArtifactAddCli({ ...args.options, runId }) };
|
|
427
434
|
}
|
|
428
435
|
(0, registry_core_1.attachCliBinding)("blackboard.artifact.add", { path: ["blackboard", "artifact"], helpPath: ["blackboard", "artifact", "add"], jsonMode: "default", handler: blackboardArtifactHandler });
|
|
429
436
|
(0, registry_core_1.attachCliBinding)("blackboard.artifact.list", { path: ["blackboard", "artifact"], helpPath: ["blackboard", "artifact", "list"], jsonMode: "default", handler: blackboardArtifactHandler });
|
|
430
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("blackboard.artifact.add").mcp.handler = (args) => (
|
|
431
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("blackboard.artifact.list").mcp.handler = (args) => (
|
|
437
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("blackboard.artifact.add").mcp.handler = (args) => loadMultiAgentCli().blackboardArtifactAddCli(args);
|
|
438
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("blackboard.artifact.list").mcp.handler = (args) => loadMultiAgentCli().blackboardArtifactListCli(args);
|
|
432
439
|
(0, registry_core_1.attachCliBinding)("blackboard.snapshot", {
|
|
433
440
|
path: ["blackboard", "snapshot"],
|
|
434
441
|
jsonMode: "default",
|
|
435
|
-
handler: (args) => ({ json: (
|
|
442
|
+
handler: (args) => ({ json: loadMultiAgentCli().blackboardSnapshotCli({ ...args.options, runId: (0, cli_args_1.required)(args.positionals[0], "run id") }) }),
|
|
436
443
|
});
|
|
437
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("blackboard.snapshot").mcp.handler = (args) => (
|
|
444
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("blackboard.snapshot").mcp.handler = (args) => loadMultiAgentCli().blackboardSnapshotCli(args);
|
|
438
445
|
(0, registry_core_1.attachCliBinding)("coordinator.summary", {
|
|
439
446
|
path: ["coordinator", "summary"],
|
|
440
447
|
jsonMode: "default",
|
|
441
|
-
handler: (args) => ({ json: (
|
|
448
|
+
handler: (args) => ({ json: loadMultiAgentCli().coordinatorSummaryCli({ runId: (0, cli_args_1.required)(args.positionals[0], "run id"), ...args.options }) }),
|
|
442
449
|
});
|
|
443
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("coordinator.summary").mcp.handler = (args) => (
|
|
450
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("coordinator.summary").mcp.handler = (args) => loadMultiAgentCli().coordinatorSummaryCli(args);
|
|
444
451
|
(0, registry_core_1.attachCliBinding)("coordinator.decision", {
|
|
445
452
|
path: ["coordinator", "decision"],
|
|
446
453
|
jsonMode: "default",
|
|
447
|
-
handler: (args) => ({ json: (
|
|
454
|
+
handler: (args) => ({ json: loadMultiAgentCli().coordinatorDecisionCli({ ...args.options, runId: (0, cli_args_1.required)(args.positionals[0], "run id") }) }),
|
|
448
455
|
});
|
|
449
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("coordinator.decision").mcp.handler = (args) => (
|
|
456
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("coordinator.decision").mcp.handler = (args) => loadMultiAgentCli().coordinatorDecisionCli(args);
|
|
450
457
|
// ---- candidate scoring ----------------------------------------------------
|
|
451
458
|
(0, registry_core_1.attachCliBinding)("candidate.list", {
|
|
452
459
|
path: ["candidate", "list"],
|
|
453
460
|
jsonMode: "default",
|
|
454
|
-
handler: (args) => ({ json: (
|
|
461
|
+
handler: (args) => ({ json: loadMultiAgentCli().candidateListCli({ runId: (0, cli_args_1.required)(args.positionals[0], "run id"), ...args.options }) }),
|
|
455
462
|
});
|
|
456
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("candidate.list").mcp.handler = (args) => (
|
|
463
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("candidate.list").mcp.handler = (args) => loadMultiAgentCli().candidateListCli(args);
|
|
457
464
|
(0, registry_core_1.attachCliBinding)("candidate.show", {
|
|
458
465
|
path: ["candidate", "show"],
|
|
459
466
|
jsonMode: "default",
|
|
460
|
-
handler: (args) => ({ json: (
|
|
467
|
+
handler: (args) => ({ json: loadMultiAgentCli().candidateShowCli({ runId: (0, cli_args_1.required)(args.positionals[0], "run id"), ...args.options }, (0, cli_args_1.required)(args.positionals[1], "candidate id")) }),
|
|
461
468
|
});
|
|
462
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("candidate.show").mcp.handler = (args) => (
|
|
469
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("candidate.show").mcp.handler = (args) => loadMultiAgentCli().candidateShowCli(args, (0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.candidateId), "candidate id"));
|
|
463
470
|
(0, registry_core_1.attachCliBinding)("candidate.register", {
|
|
464
471
|
path: ["candidate", "register"],
|
|
465
472
|
jsonMode: "default",
|
|
466
|
-
handler: (args) => ({ json: (
|
|
473
|
+
handler: (args) => ({ json: loadMultiAgentCli().candidateRegisterCli({ ...args.options, runId: (0, cli_args_1.required)(args.positionals[0], "run id") }) }),
|
|
467
474
|
});
|
|
468
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("candidate.register").mcp.handler = (args) => (
|
|
475
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("candidate.register").mcp.handler = (args) => loadMultiAgentCli().candidateRegisterCli(args);
|
|
469
476
|
(0, registry_core_1.attachCliBinding)("candidate.score", {
|
|
470
477
|
path: ["candidate", "score"],
|
|
471
478
|
jsonMode: "default",
|
|
472
|
-
handler: (args) => ({ json: (
|
|
479
|
+
handler: (args) => ({ json: loadMultiAgentCli().candidateScoreCli({ ...args.options, runId: (0, cli_args_1.required)(args.positionals[0], "run id") }, (0, cli_args_1.required)(args.positionals[1], "candidate id")) }),
|
|
473
480
|
});
|
|
474
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("candidate.score").mcp.handler = (args) => (
|
|
481
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("candidate.score").mcp.handler = (args) => loadMultiAgentCli().candidateScoreCli(args, (0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.candidateId), "candidate id"));
|
|
475
482
|
(0, registry_core_1.attachCliBinding)("candidate.rank", {
|
|
476
483
|
path: ["candidate", "rank"],
|
|
477
484
|
jsonMode: "default",
|
|
478
|
-
handler: (args) => ({ json: (
|
|
485
|
+
handler: (args) => ({ json: loadMultiAgentCli().candidateRankCli({ runId: (0, cli_args_1.required)(args.positionals[0], "run id"), ...args.options }) }),
|
|
479
486
|
});
|
|
480
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("candidate.rank").mcp.handler = (args) => (
|
|
487
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("candidate.rank").mcp.handler = (args) => loadMultiAgentCli().candidateRankCli(args);
|
|
481
488
|
(0, registry_core_1.attachCliBinding)("candidate.select", {
|
|
482
489
|
path: ["candidate", "select"],
|
|
483
490
|
jsonMode: "default",
|
|
484
|
-
handler: (args) => ({ json: (
|
|
491
|
+
handler: (args) => ({ json: loadMultiAgentCli().candidateSelectCli({ ...args.options, runId: (0, cli_args_1.required)(args.positionals[0], "run id") }, (0, cli_args_1.required)(args.positionals[1], "candidate id")) }),
|
|
485
492
|
});
|
|
486
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("candidate.select").mcp.handler = (args) => (
|
|
493
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("candidate.select").mcp.handler = (args) => loadMultiAgentCli().candidateSelectCli(args, (0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.candidateId), "candidate id"));
|
|
487
494
|
(0, registry_core_1.attachCliBinding)("candidate.reject", {
|
|
488
495
|
path: ["candidate", "reject"],
|
|
489
496
|
jsonMode: "default",
|
|
490
|
-
handler: (args) => ({ json: (
|
|
497
|
+
handler: (args) => ({ json: loadMultiAgentCli().candidateRejectCli({ ...args.options, runId: (0, cli_args_1.required)(args.positionals[0], "run id") }, (0, cli_args_1.required)(args.positionals[1], "candidate id")) }),
|
|
491
498
|
});
|
|
492
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("candidate.reject").mcp.handler = (args) => (
|
|
499
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("candidate.reject").mcp.handler = (args) => loadMultiAgentCli().candidateRejectCli(args, (0, cli_args_1.required)((0, cli_args_1.optionalArg)(args.candidateId), "candidate id"));
|
|
493
500
|
// jsonMode "flag": human `Candidates` panel by default, canonical JSON under
|
|
494
501
|
// --json (old build's candidate.summary was flag).
|
|
495
502
|
(0, registry_core_1.attachCliBinding)("candidate.summary", {
|
|
496
503
|
path: ["candidate", "summary"],
|
|
497
504
|
jsonMode: "flag",
|
|
498
505
|
handler: (args) => {
|
|
499
|
-
const summary = (
|
|
500
|
-
return { json: summary, text: `${(
|
|
506
|
+
const summary = loadMultiAgentCli().candidateSummaryCli({ runId: (0, cli_args_1.required)(args.positionals[0], "run id"), ...args.options });
|
|
507
|
+
return { json: summary, text: `${loadOperatorUxText().formatCandidateSummaryText(summary)}\n` };
|
|
501
508
|
},
|
|
502
509
|
});
|
|
503
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("candidate.summary").mcp.handler = (args) => (
|
|
510
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("candidate.summary").mcp.handler = (args) => loadMultiAgentCli().candidateSummaryCli(args);
|
|
504
511
|
// ---- collaboration ---------------------------------------------------------
|
|
505
512
|
(0, registry_core_1.attachCliBinding)("approve", {
|
|
506
513
|
path: ["approve"],
|
|
507
514
|
jsonMode: "default",
|
|
508
|
-
handler: (args) => ({ json: (
|
|
515
|
+
handler: (args) => ({ json: loadMultiAgentCli().approveCli({ ...args.options, runId: (0, cli_args_1.required)(args.positionals[1], "run id"), body: args.positionals[3] }, args.positionals[0], args.positionals[2]) }),
|
|
509
516
|
});
|
|
510
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("approve").mcp.handler = (args) => (
|
|
517
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("approve").mcp.handler = (args) => loadMultiAgentCli().approveCli(args);
|
|
511
518
|
(0, registry_core_1.attachCliBinding)("reject", {
|
|
512
519
|
path: ["reject"],
|
|
513
520
|
jsonMode: "default",
|
|
514
|
-
handler: (args) => ({ json: (
|
|
521
|
+
handler: (args) => ({ json: loadMultiAgentCli().rejectCollabCli({ ...args.options, runId: (0, cli_args_1.required)(args.positionals[1], "run id") }, args.positionals[0], args.positionals[2]) }),
|
|
515
522
|
});
|
|
516
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("reject").mcp.handler = (args) => (
|
|
523
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("reject").mcp.handler = (args) => loadMultiAgentCli().rejectCollabCli(args);
|
|
517
524
|
(0, registry_core_1.attachCliBinding)("comment.add", {
|
|
518
525
|
path: ["comment", "add"],
|
|
519
526
|
jsonMode: "default",
|
|
520
|
-
handler: (args) => ({ json: (
|
|
527
|
+
handler: (args) => ({ json: loadMultiAgentCli().commentAddCli({ ...args.options, runId: (0, cli_args_1.required)(args.positionals[1], "run id"), body: args.options.body ?? args.positionals[3] }, args.positionals[0], args.positionals[2]) }),
|
|
521
528
|
});
|
|
522
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("comment.add").mcp.handler = (args) => (
|
|
529
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("comment.add").mcp.handler = (args) => loadMultiAgentCli().commentAddCli(args);
|
|
523
530
|
// jsonMode "flag": human comment list by default, canonical JSON under
|
|
524
531
|
// --json (old build's comment.list was flag).
|
|
525
532
|
(0, registry_core_1.attachCliBinding)("comment.list", {
|
|
526
533
|
path: ["comment", "list"],
|
|
527
534
|
jsonMode: "flag",
|
|
528
535
|
handler: (args) => {
|
|
529
|
-
const report = (
|
|
530
|
-
return { json: report, text: `${(
|
|
536
|
+
const report = loadMultiAgentCli().commentListCli({ runId: (0, cli_args_1.required)(args.positionals[0], "run id"), ...args.options });
|
|
537
|
+
return { json: report, text: `${loadCollaborationIo().formatCommentList(report)}\n` };
|
|
531
538
|
},
|
|
532
539
|
});
|
|
533
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("comment.list").mcp.handler = (args) => (
|
|
540
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("comment.list").mcp.handler = (args) => loadMultiAgentCli().commentListCli(args);
|
|
534
541
|
(0, registry_core_1.attachCliBinding)("handoff", {
|
|
535
542
|
path: ["handoff"],
|
|
536
543
|
jsonMode: "default",
|
|
@@ -539,29 +546,29 @@ registry_core_1.REGISTRY_BY_CAPABILITY.get("comment.list").mcp.handler = (args)
|
|
|
539
546
|
// positional, so a bare `cw handoff` fails with "Missing target kind" — not
|
|
540
547
|
// "Missing run id". The kind check must fire before the run-id read.
|
|
541
548
|
handler: (args) => {
|
|
542
|
-
const kind = (0,
|
|
543
|
-
const runId = (0,
|
|
544
|
-
return { json: (
|
|
549
|
+
const kind = (0, cli_args_1.required)(args.positionals[0], "target kind");
|
|
550
|
+
const runId = (0, cli_args_1.required)(args.positionals[1], "run id");
|
|
551
|
+
return { json: loadMultiAgentCli().handoffCli({ ...args.options, runId }, kind, args.positionals[2]) };
|
|
545
552
|
},
|
|
546
553
|
});
|
|
547
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("handoff").mcp.handler = (args) => (
|
|
554
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("handoff").mcp.handler = (args) => loadMultiAgentCli().handoffCli(args);
|
|
548
555
|
// jsonMode "flag": human review-status report by default, canonical JSON
|
|
549
556
|
// under --json (old build's review.status was flag).
|
|
550
557
|
(0, registry_core_1.attachCliBinding)("review.status", {
|
|
551
558
|
path: ["review", "status"],
|
|
552
559
|
jsonMode: "flag",
|
|
553
560
|
handler: (args) => {
|
|
554
|
-
const report = (
|
|
555
|
-
return { json: report, text: `${(
|
|
561
|
+
const report = loadMultiAgentCli().reviewStatusCli({ runId: (0, cli_args_1.required)(args.positionals[0], "run id"), ...args.options });
|
|
562
|
+
return { json: report, text: `${loadCollaborationIo().formatReviewStatus(report)}\n` };
|
|
556
563
|
},
|
|
557
564
|
});
|
|
558
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("review.status").mcp.handler = (args) => (
|
|
565
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("review.status").mcp.handler = (args) => loadMultiAgentCli().reviewStatusCli(args);
|
|
559
566
|
(0, registry_core_1.attachCliBinding)("review.policy", {
|
|
560
567
|
path: ["review", "policy"],
|
|
561
568
|
jsonMode: "default",
|
|
562
|
-
handler: (args) => ({ json: (
|
|
569
|
+
handler: (args) => ({ json: loadMultiAgentCli().reviewPolicyCli({ ...args.options, runId: (0, cli_args_1.required)(args.positionals[0], "run id") }) }),
|
|
563
570
|
});
|
|
564
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("review.policy").mcp.handler = (args) => (
|
|
571
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("review.policy").mcp.handler = (args) => loadMultiAgentCli().reviewPolicyCli(args);
|
|
565
572
|
// ---- eval replay harness ---------------------------------------------------
|
|
566
573
|
// eval snapshot|replay|compare|score|gate|report — `jsonMode: flag` so a bare
|
|
567
574
|
// call renders the human eval report (formatMultiAgentEval) and `--json`
|
|
@@ -570,54 +577,54 @@ registry_core_1.REGISTRY_BY_CAPABILITY.get("review.policy").mcp.handler = (args)
|
|
|
570
577
|
path: ["eval", "snapshot"],
|
|
571
578
|
jsonMode: "flag",
|
|
572
579
|
handler: (args) => {
|
|
573
|
-
const result = (
|
|
574
|
-
return { json: result, text: (
|
|
580
|
+
const result = loadMultiAgentCli().evalSnapshotCli({ runId: (0, cli_args_1.required)(args.positionals[0], "run id"), ...args.options });
|
|
581
|
+
return { json: result, text: loadEvalText().formatMultiAgentEval(result) };
|
|
575
582
|
},
|
|
576
583
|
});
|
|
577
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("eval.snapshot").mcp.handler = (args) => (
|
|
584
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("eval.snapshot").mcp.handler = (args) => loadMultiAgentCli().evalSnapshotCli(args);
|
|
578
585
|
(0, registry_core_1.attachCliBinding)("eval.replay", {
|
|
579
586
|
path: ["eval", "replay"],
|
|
580
587
|
jsonMode: "flag",
|
|
581
588
|
handler: (args) => {
|
|
582
|
-
const result = (
|
|
583
|
-
return { json: result, text: (
|
|
589
|
+
const result = loadMultiAgentCli().evalReplayCli({ snapshot: args.positionals[0], ...args.options });
|
|
590
|
+
return { json: result, text: loadEvalText().formatMultiAgentEval(result) };
|
|
584
591
|
},
|
|
585
592
|
});
|
|
586
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("eval.replay").mcp.handler = (args) => (
|
|
593
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("eval.replay").mcp.handler = (args) => loadMultiAgentCli().evalReplayCli(args);
|
|
587
594
|
(0, registry_core_1.attachCliBinding)("eval.compare", {
|
|
588
595
|
path: ["eval", "compare"],
|
|
589
596
|
jsonMode: "flag",
|
|
590
597
|
handler: (args) => {
|
|
591
|
-
const result = (
|
|
592
|
-
return { json: result, text: (
|
|
598
|
+
const result = loadMultiAgentCli().evalCompareCli({ baseline: args.positionals[0], replay: args.positionals[1], ...args.options });
|
|
599
|
+
return { json: result, text: loadEvalText().formatMultiAgentEval(result) };
|
|
593
600
|
},
|
|
594
601
|
});
|
|
595
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("eval.compare").mcp.handler = (args) => (
|
|
602
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("eval.compare").mcp.handler = (args) => loadMultiAgentCli().evalCompareCli(args);
|
|
596
603
|
(0, registry_core_1.attachCliBinding)("eval.score", {
|
|
597
604
|
path: ["eval", "score"],
|
|
598
605
|
jsonMode: "flag",
|
|
599
606
|
handler: (args) => {
|
|
600
|
-
const result = (
|
|
601
|
-
return { json: result, text: (
|
|
607
|
+
const result = loadMultiAgentCli().evalScoreCli({ replay: args.positionals[0], ...args.options });
|
|
608
|
+
return { json: result, text: loadEvalText().formatMultiAgentEval(result) };
|
|
602
609
|
},
|
|
603
610
|
});
|
|
604
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("eval.score").mcp.handler = (args) => (
|
|
611
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("eval.score").mcp.handler = (args) => loadMultiAgentCli().evalScoreCli(args);
|
|
605
612
|
(0, registry_core_1.attachCliBinding)("eval.gate", {
|
|
606
613
|
path: ["eval", "gate"],
|
|
607
614
|
jsonMode: "flag",
|
|
608
615
|
handler: (args) => {
|
|
609
|
-
const gate = (
|
|
610
|
-
return { json: gate, text: (
|
|
616
|
+
const gate = loadMultiAgentCli().evalGateCli({ suite: args.positionals[0], ...args.options });
|
|
617
|
+
return { json: gate, text: loadEvalText().formatMultiAgentEval(gate), exitCode: gate.verdict === "ship" ? undefined : 1 };
|
|
611
618
|
},
|
|
612
619
|
});
|
|
613
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("eval.gate").mcp.handler = (args) => (
|
|
620
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("eval.gate").mcp.handler = (args) => loadMultiAgentCli().evalGateCli(args);
|
|
614
621
|
(0, registry_core_1.attachCliBinding)("eval.report", {
|
|
615
622
|
path: ["eval", "report"],
|
|
616
623
|
jsonMode: "flag",
|
|
617
624
|
handler: (args) => {
|
|
618
|
-
const result = (
|
|
619
|
-
return { json: result, text: (
|
|
625
|
+
const result = loadMultiAgentCli().evalReportCli({ replay: args.positionals[0], ...args.options });
|
|
626
|
+
return { json: result, text: loadEvalText().formatMultiAgentEval(result) };
|
|
620
627
|
},
|
|
621
628
|
});
|
|
622
|
-
registry_core_1.REGISTRY_BY_CAPABILITY.get("eval.report").mcp.handler = (args) => (
|
|
629
|
+
registry_core_1.REGISTRY_BY_CAPABILITY.get("eval.report").mcp.handler = (args) => loadMultiAgentCli().evalReportCli(args);
|
|
623
630
|
// ---------------------------------------------------------------------
|