cool-workflow 0.2.2 → 0.2.3

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.
Files changed (136) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/apps/architecture-review/app.json +1 -1
  4. package/apps/architecture-review-fast/app.json +1 -1
  5. package/apps/end-to-end-golden-path/app.json +1 -1
  6. package/apps/pr-review-fix-ci/app.json +1 -1
  7. package/apps/release-cut/app.json +1 -1
  8. package/apps/research-synthesis/app.json +1 -1
  9. package/dist/cli/dispatch.js +11 -5
  10. package/dist/cli/entry.js +41 -1
  11. package/dist/cli/io.js +6 -2
  12. package/dist/cli/parseargv.js +1 -0
  13. package/dist/core/capability-data.js +1 -0
  14. package/dist/core/format/completion.js +68 -0
  15. package/dist/core/format/help.js +25 -6
  16. package/dist/core/format/safe-json.js +73 -0
  17. package/dist/core/format/state-explosion-text.js +1 -1
  18. package/dist/core/multi-agent/candidate-scoring.js +5 -1
  19. package/dist/core/multi-agent/collaboration.js +3 -3
  20. package/dist/core/multi-agent/coordinator.js +5 -5
  21. package/dist/core/multi-agent/runtime.js +4 -4
  22. package/dist/core/multi-agent/topology.js +3 -3
  23. package/dist/core/pipeline/dispatch.js +18 -4
  24. package/dist/core/pipeline/drive-decide.js +2 -1
  25. package/dist/core/state/migrations.js +16 -1
  26. package/dist/core/state/state-explosion/digest.js +13 -13
  27. package/dist/core/state/state-explosion/graph.js +17 -11
  28. package/dist/core/state/state-explosion/report.js +6 -6
  29. package/dist/core/util/numeric-flag.js +40 -0
  30. package/dist/core/version.js +1 -1
  31. package/dist/mcp/server.js +99 -11
  32. package/dist/shell/audit-cli.js +57 -25
  33. package/dist/shell/coordinator-io.js +73 -13
  34. package/dist/shell/dispatch.js +1 -1
  35. package/dist/shell/doctor.js +80 -1
  36. package/dist/shell/drive.js +243 -49
  37. package/dist/shell/eval-text.js +2 -2
  38. package/dist/shell/evidence-reasoning.js +4 -4
  39. package/dist/shell/execution-backend/agent.js +20 -1
  40. package/dist/shell/execution-backend/container.js +4 -1
  41. package/dist/shell/execution-backend/local.js +4 -1
  42. package/dist/shell/feedback-cli.js +6 -6
  43. package/dist/shell/fs-atomic.js +218 -29
  44. package/dist/shell/man-cli.js +6 -0
  45. package/dist/shell/metrics-cli.js +2 -1
  46. package/dist/shell/multi-agent-cli.js +367 -323
  47. package/dist/shell/multi-agent-host.js +9 -9
  48. package/dist/shell/multi-agent-operator-ux.js +80 -38
  49. package/dist/shell/node-store.js +10 -4
  50. package/dist/shell/observability.js +1 -1
  51. package/dist/shell/operator-ux-text.js +22 -22
  52. package/dist/shell/operator-ux.js +15 -14
  53. package/dist/shell/orchestrator.js +49 -38
  54. package/dist/shell/pipeline-cli.js +87 -40
  55. package/dist/shell/reclamation-io.js +14 -4
  56. package/dist/shell/registry-cli.js +19 -17
  57. package/dist/shell/remote-source.js +13 -8
  58. package/dist/shell/report-cli.js +45 -0
  59. package/dist/shell/report.js +2 -1
  60. package/dist/shell/run-registry-io.js +77 -19
  61. package/dist/shell/run-store.js +74 -2
  62. package/dist/shell/scheduling-io.js +12 -13
  63. package/dist/shell/state-cli.js +2 -7
  64. package/dist/shell/state-explosion-cli.js +17 -9
  65. package/dist/shell/topology-io.js +36 -5
  66. package/dist/shell/trust-audit.js +224 -22
  67. package/dist/shell/trust-policy-io.js +1 -1
  68. package/dist/shell/worker-cli.js +35 -31
  69. package/dist/wiring/capability-table/basics.js +33 -8
  70. package/dist/wiring/capability-table/exec-backend.js +20 -11
  71. package/dist/wiring/capability-table/multi-agent.js +172 -165
  72. package/dist/wiring/capability-table/parity.js +1 -0
  73. package/dist/wiring/capability-table/pipeline.js +54 -42
  74. package/dist/wiring/capability-table/registry-core.js +29 -10
  75. package/dist/wiring/capability-table/reporting.js +137 -96
  76. package/dist/wiring/capability-table/scheduling-registry.js +195 -161
  77. package/dist/wiring/capability-table/state.js +36 -28
  78. package/dist/wiring/capability-table/trust-ledger.js +46 -22
  79. package/dist/wiring/capability-table/workflow-apps.js +83 -68
  80. package/docs/agent-delegation-drive.7.md +2 -0
  81. package/docs/candidate-scoring.7.md +1 -1
  82. package/docs/canonical-workflow-apps.7.md +7 -7
  83. package/docs/cli-mcp-parity.7.md +8 -3
  84. package/docs/contract-migration-tooling.7.md +2 -0
  85. package/docs/control-plane-scheduling.7.md +2 -0
  86. package/docs/coordinator-blackboard.7.md +17 -17
  87. package/docs/dogfood-one-real-repo.7.md +11 -11
  88. package/docs/durable-state-and-locking.7.md +2 -0
  89. package/docs/end-to-end-golden-path.7.md +14 -14
  90. package/docs/evidence-adoption-reasoning-chain.7.md +2 -0
  91. package/docs/execution-backends.7.md +2 -0
  92. package/docs/getting-started.md +37 -37
  93. package/docs/multi-agent-cli-mcp-surface.7.md +19 -17
  94. package/docs/multi-agent-eval-replay-harness.7.md +15 -13
  95. package/docs/multi-agent-operator-ux.7.md +21 -19
  96. package/docs/multi-agent-runtime-core.7.md +22 -22
  97. package/docs/multi-agent-topologies.7.md +6 -6
  98. package/docs/multi-agent-trust-policy-audit.7.md +11 -11
  99. package/docs/node-snapshot-diff-replay.7.md +2 -0
  100. package/docs/observability-cost-accounting.7.md +2 -0
  101. package/docs/operator-ux.7.md +34 -34
  102. package/docs/pipeline-runner.7.md +4 -4
  103. package/docs/project-index.md +27 -4
  104. package/docs/real-execution-backends.7.md +2 -0
  105. package/docs/release-and-migration.7.md +3 -1
  106. package/docs/release-tooling.7.md +2 -0
  107. package/docs/routines.md +4 -4
  108. package/docs/run-registry-control-plane.7.md +21 -19
  109. package/docs/run-retention-reclamation.7.md +2 -0
  110. package/docs/scheduled-tasks.md +14 -14
  111. package/docs/security-trust-hardening.7.md +15 -15
  112. package/docs/state-explosion-management.7.md +12 -10
  113. package/docs/team-collaboration.7.md +2 -0
  114. package/docs/trust-audit-anchor.7.md +2 -0
  115. package/docs/unix-principles.md +3 -1
  116. package/docs/verifier-gated-commit.7.md +1 -1
  117. package/docs/web-desktop-workbench.7.md +2 -0
  118. package/docs/workflow-app-framework.7.md +13 -13
  119. package/manifest/plugin.manifest.json +1 -1
  120. package/package.json +2 -2
  121. package/scripts/agents/claude-p-agent.js +2 -2
  122. package/scripts/block-unapproved-tag.sh +23 -2
  123. package/scripts/canonical-apps.js +4 -4
  124. package/scripts/children/batch-delegate-child.js +52 -2
  125. package/scripts/dogfood-release.js +1 -1
  126. package/scripts/fake-date-for-reproduction.js +44 -0
  127. package/scripts/golden-path.js +4 -4
  128. package/scripts/purity-baseline.json +3 -0
  129. package/scripts/release-flow.js +57 -1
  130. package/scripts/verdict-keygen.js +83 -0
  131. package/scripts/verify-bump-reproduction.sh +148 -0
  132. package/scripts/verify-verdict-signature.js +61 -0
  133. package/skills/cool-workflow/SKILL.md +9 -9
  134. package/skills/cool-workflow/references/commands.md +89 -88
  135. package/ui/workbench/app.css +37 -1
  136. package/ui/workbench/app.js +124 -6
@@ -41,8 +41,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
41
41
  const registry_core_1 = require("./registry-core");
42
42
  const io_1 = require("../../cli/io");
43
43
  const state_explosion_text_1 = require("../../core/format/state-explosion-text");
44
- const state_explosion_cli_1 = require("../../shell/state-explosion-cli");
45
- const run_store_1 = require("../../shell/run-store");
44
+ // This file is required at startup for every command. Loading these shell
45
+ // modules only when their handler runs, not at import time, keeps that
46
+ // load cost out of commands that never touch reporting/status/graph.
47
+ function loadStateExplosionCli() {
48
+ return require("../../shell/state-explosion-cli");
49
+ }
50
+ function loadRunStore() {
51
+ return require("../../shell/run-store");
52
+ }
46
53
  // MILESTONE 11 (reporting, observability, doctor/fix, workbench, run
47
54
  // export/bundle) CLI bindings: report, status (real run id), graph,
48
55
  // operator.status|report|graph. Handler bodies live in shell/report-
@@ -50,22 +57,27 @@ const run_store_1 = require("../../shell/run-store");
50
57
  // report`, re-write report.md); this table only wires argv shape ->
51
58
  // handler call, per cli/dispatch.ts's generic executor contract.
52
59
  // ---------------------------------------------------------------------
53
- const report_view_cli_1 = require("../../shell/report-view-cli");
54
- const operator_ux_text_1 = require("../../shell/operator-ux-text");
60
+ function loadReportViewCli() {
61
+ return require("../../shell/report-view-cli");
62
+ }
63
+ function loadOperatorUxText() {
64
+ return require("../../shell/operator-ux-text");
65
+ }
55
66
  (0, registry_core_1.attachCliBinding)("report", {
56
67
  path: ["report"],
57
68
  jsonMode: "flag",
58
69
  handler: (args) => {
59
70
  const runId = (0, io_1.required)((0, io_1.optionalArg)(args.positionals[0]), "run id");
60
- const result = (0, report_view_cli_1.reportWriteCli)(runId, args.options);
71
+ const reportViewCli = loadReportViewCli();
72
+ const result = reportViewCli.reportWriteCli(runId, args.options);
61
73
  if (args.options.show || args.options.summary) {
62
- const stateExplosion = (0, state_explosion_text_1.formatStateExplosionReport)((0, state_explosion_cli_1.summaryShowCli)(runId, args.options));
63
- return { json: result, text: `${(0, report_view_cli_1.operatorReportText)(runId, args.options)}\n\n${stateExplosion}\n` };
74
+ const stateExplosion = (0, state_explosion_text_1.formatStateExplosionReport)(loadStateExplosionCli().summaryShowCli(runId, args.options));
75
+ return { json: result, text: `${reportViewCli.operatorReportText(runId, args.options)}\n\n${stateExplosion}\n` };
64
76
  }
65
77
  return { json: result, text: `${result.path}\n` };
66
78
  },
67
79
  });
68
- registry_core_1.REGISTRY_BY_CAPABILITY.get("report").mcp.handler = (args) => (0, report_view_cli_1.reportWriteCli)((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
80
+ registry_core_1.REGISTRY_BY_CAPABILITY.get("report").mcp.handler = (args) => loadReportViewCli().reportWriteCli((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
69
81
  // `status` already carries a milestone-2 CLI binding (`attachCliBinding("status", ...)`
70
82
  // above); replace its handler here with the real run-id-aware body while
71
83
  // keeping the same row/path (no reshape needed — see byte-compat item 5).
@@ -73,83 +85,97 @@ registry_core_1.REGISTRY_BY_CAPABILITY.get("status").cli = {
73
85
  path: ["status"],
74
86
  jsonMode: "flag",
75
87
  handler: (args) => {
76
- const runId = (0, io_1.optionalArg)(args.positionals[0]);
88
+ // `cw status <id>` (positional) and `cw status --run <id>` must both
89
+ // resolve the same run — the flag form used to be silently ignored
90
+ // (positionals[0] only), so a bogus id given via --run and a real one
91
+ // looked identical ("No run selected" for both).
92
+ const runId = (0, io_1.optionalArg)(args.positionals[0]) || (0, io_1.optionalArg)(args.options.run) || (0, io_1.optionalArg)(args.options.runId);
93
+ const reportViewCli = loadReportViewCli();
77
94
  if (!runId)
78
- return { json: (0, report_view_cli_1.statusCli)(undefined, args.options), text: `No run selected\n\nNext Action\n${adviseNoRunLines()}` };
95
+ return { json: reportViewCli.statusCli(undefined, args.options), text: `No run selected\n\nNext Action\n${adviseNoRunLines()}` };
79
96
  if (args.options.summary || args.options.brief) {
80
- return { json: (0, report_view_cli_1.statusCli)(runId, args.options), text: `${(0, report_view_cli_1.statusSummaryText)(runId, args.options)}\n` };
97
+ return { json: reportViewCli.statusCli(runId, args.options), text: `${reportViewCli.statusSummaryText(runId, args.options)}\n` };
81
98
  }
82
- return { json: (0, report_view_cli_1.statusCli)(runId, args.options), text: `${(0, report_view_cli_1.statusFullText)(runId, args.options)}\n` };
99
+ return { json: reportViewCli.statusCli(runId, args.options), text: `${reportViewCli.statusFullText(runId, args.options)}\n` };
83
100
  },
84
101
  };
85
- registry_core_1.REGISTRY_BY_CAPABILITY.get("status").mcp.handler = (args) => (0, report_view_cli_1.statusCli)((0, io_1.optionalArg)(args.runId), args);
102
+ registry_core_1.REGISTRY_BY_CAPABILITY.get("status").mcp.handler = (args) => loadReportViewCli().statusCli((0, io_1.optionalArg)(args.runId), args);
86
103
  function adviseNoRunLines() {
87
- return " node scripts/cw.js plan <workflow-id> --repo <path>\n reason: No run id is available yet; create a workflow run before dispatching or recording evidence.\n";
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";
88
105
  }
89
106
  (0, registry_core_1.attachCliBinding)("graph", {
90
107
  path: ["graph"],
91
108
  jsonMode: "flag",
92
109
  handler: (args) => {
93
110
  const runId = (0, io_1.required)((0, io_1.optionalArg)(args.positionals[0]), "run id");
94
- return { json: (0, report_view_cli_1.graphCli)(runId, args.options), text: `${(0, report_view_cli_1.graphText)(runId, args.options)}\n` };
111
+ const reportViewCli = loadReportViewCli();
112
+ return { json: reportViewCli.graphCli(runId, args.options), text: `${reportViewCli.graphText(runId, args.options)}\n` };
95
113
  },
96
114
  });
97
- registry_core_1.REGISTRY_BY_CAPABILITY.get("graph").mcp.handler = (args) => (0, report_view_cli_1.graphCli)((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
115
+ registry_core_1.REGISTRY_BY_CAPABILITY.get("graph").mcp.handler = (args) => loadReportViewCli().graphCli((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
98
116
  (0, registry_core_1.attachCliBinding)("operator.status", {
99
117
  path: ["operator", "status"],
100
118
  jsonMode: "flag",
101
119
  handler: (args) => {
102
120
  const runId = (0, io_1.required)((0, io_1.optionalArg)(args.positionals[0]), "run id");
121
+ const reportViewCli = loadReportViewCli();
103
122
  if (args.options.summary || args.options.brief) {
104
- return { json: (0, report_view_cli_1.operatorStatusCli)(runId, args.options), text: `${(0, report_view_cli_1.statusSummaryText)(runId, args.options)}\n` };
123
+ return { json: reportViewCli.operatorStatusCli(runId, args.options), text: `${reportViewCli.statusSummaryText(runId, args.options)}\n` };
105
124
  }
106
- return { json: (0, report_view_cli_1.operatorStatusCli)(runId, args.options), text: `${(0, report_view_cli_1.statusFullText)(runId, args.options)}\n` };
125
+ return { json: reportViewCli.operatorStatusCli(runId, args.options), text: `${reportViewCli.statusFullText(runId, args.options)}\n` };
107
126
  },
108
127
  });
109
- registry_core_1.REGISTRY_BY_CAPABILITY.get("operator.status").mcp.handler = (args) => (0, report_view_cli_1.operatorStatusCli)((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
128
+ registry_core_1.REGISTRY_BY_CAPABILITY.get("operator.status").mcp.handler = (args) => loadReportViewCli().operatorStatusCli((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
110
129
  (0, registry_core_1.attachCliBinding)("operator.report", {
111
130
  path: ["operator", "report"],
112
131
  jsonMode: "flag",
113
132
  handler: (args) => {
114
133
  const runId = (0, io_1.required)((0, io_1.optionalArg)(args.positionals[0]), "run id");
115
- return { json: (0, report_view_cli_1.operatorReportCli)(runId, args.options), text: `${(0, report_view_cli_1.operatorReportText)(runId, args.options)}\n` };
134
+ const reportViewCli = loadReportViewCli();
135
+ return { json: reportViewCli.operatorReportCli(runId, args.options), text: `${reportViewCli.operatorReportText(runId, args.options)}\n` };
116
136
  },
117
137
  });
118
- registry_core_1.REGISTRY_BY_CAPABILITY.get("operator.report").mcp.handler = (args) => (0, report_view_cli_1.operatorReportCli)((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
138
+ registry_core_1.REGISTRY_BY_CAPABILITY.get("operator.report").mcp.handler = (args) => loadReportViewCli().operatorReportCli((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
119
139
  // ---- metrics.show / metrics.summary -----------------------------------
120
- const metrics_cli_1 = require("../../shell/metrics-cli");
121
- const observability_1 = require("../../shell/observability");
140
+ function loadMetricsCli() {
141
+ return require("../../shell/metrics-cli");
142
+ }
143
+ function loadObservability() {
144
+ return require("../../shell/observability");
145
+ }
122
146
  (0, registry_core_1.attachCliBinding)("metrics.show", {
123
147
  path: ["metrics", "show"],
124
148
  jsonMode: "flag",
125
149
  handler: (args) => {
126
150
  const runId = (0, io_1.required)((0, io_1.optionalArg)(args.positionals[0]), "run id");
127
- const report = (0, metrics_cli_1.metricsShowCli)(runId, args.options);
128
- return { json: report, text: `${(0, observability_1.formatMetricsReport)(report)}\n` };
151
+ const report = loadMetricsCli().metricsShowCli(runId, args.options);
152
+ return { json: report, text: `${loadObservability().formatMetricsReport(report)}\n` };
129
153
  },
130
154
  });
131
- registry_core_1.REGISTRY_BY_CAPABILITY.get("metrics.show").mcp.handler = (args) => (0, metrics_cli_1.metricsShowCli)((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
155
+ registry_core_1.REGISTRY_BY_CAPABILITY.get("metrics.show").mcp.handler = (args) => loadMetricsCli().metricsShowCli((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
132
156
  (0, registry_core_1.attachCliBinding)("metrics.summary", {
133
157
  path: ["metrics", "summary"],
134
158
  jsonMode: "flag",
135
159
  handler: (args) => {
136
- const report = (0, metrics_cli_1.metricsSummaryCli)(args.options);
137
- return { json: report, text: `${(0, observability_1.formatMetricsSummary)(report)}\n` };
160
+ const report = loadMetricsCli().metricsSummaryCli(args.options);
161
+ return { json: report, text: `${loadObservability().formatMetricsSummary(report)}\n` };
138
162
  },
139
163
  });
140
- registry_core_1.REGISTRY_BY_CAPABILITY.get("metrics.summary").mcp.handler = (args) => (0, metrics_cli_1.metricsSummaryCli)(args);
164
+ registry_core_1.REGISTRY_BY_CAPABILITY.get("metrics.summary").mcp.handler = (args) => loadMetricsCli().metricsSummaryCli(args);
141
165
  // ---- worker.summary (the workbench worker panel + `cw worker summary`) ----
142
- const worker_isolation_1 = require("../../shell/worker-isolation");
166
+ function loadWorkerIsolation() {
167
+ return require("../../shell/worker-isolation");
168
+ }
143
169
  const workerPath = __importStar(require("node:path"));
144
170
  function workerSummaryCli(args) {
145
171
  const runId = (0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id");
146
- const run = (0, run_store_1.loadRunFromCwd)(runId, invocationCwdFor(args));
147
- return (0, worker_isolation_1.summarizeWorkers)(run);
172
+ const run = loadRunStore().loadRunFromCwd(runId, invocationCwdFor(args));
173
+ return loadWorkerIsolation().summarizeWorkers(run);
148
174
  }
149
175
  function workerSummaryText(args) {
150
176
  const runId = (0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id");
151
- const run = (0, run_store_1.loadRunFromCwd)(runId, invocationCwdFor(args));
152
- return (0, worker_isolation_1.formatWorkerSummaryText)(run);
177
+ const run = loadRunStore().loadRunFromCwd(runId, invocationCwdFor(args));
178
+ return loadWorkerIsolation().formatWorkerSummaryText(run);
153
179
  }
154
180
  function invocationCwdFor(args) {
155
181
  return typeof args.cwd === "string" && args.cwd.trim() ? workerPath.resolve(args.cwd) : process.cwd();
@@ -170,114 +196,125 @@ registry_core_1.REGISTRY_BY_CAPABILITY.get("worker.summary").mcp.handler = (args
170
196
  // via src/cli/handlers/worker.ts; v2 shipped only worker.summary bound, so the
171
197
  // rest fell through to the worker.usage error. positionals: [runId, workerId,
172
198
  // resultFile].
173
- const worker_cli_1 = require("../../shell/worker-cli");
199
+ function loadWorkerCli() {
200
+ return require("../../shell/worker-cli");
201
+ }
174
202
  (0, registry_core_1.attachCliBinding)("worker.list", {
175
203
  path: ["worker", "list"],
176
204
  jsonMode: "default",
177
- handler: (args) => ({ json: (0, worker_cli_1.workerListCli)({ ...args.options, runId: args.positionals[0] }) }),
205
+ handler: (args) => ({ json: loadWorkerCli().workerListCli({ ...args.options, runId: args.positionals[0] }) }),
178
206
  });
179
- registry_core_1.REGISTRY_BY_CAPABILITY.get("worker.list").mcp.handler = (args) => (0, worker_cli_1.workerListCli)(args);
207
+ registry_core_1.REGISTRY_BY_CAPABILITY.get("worker.list").mcp.handler = (args) => loadWorkerCli().workerListCli(args);
180
208
  (0, registry_core_1.attachCliBinding)("worker.show", {
181
209
  path: ["worker", "show"],
182
210
  jsonMode: "default",
183
- handler: (args) => ({ json: (0, worker_cli_1.workerShowCli)({ ...args.options, runId: args.positionals[0], workerId: args.positionals[1] }) }),
211
+ handler: (args) => ({ json: loadWorkerCli().workerShowCli({ ...args.options, runId: args.positionals[0], workerId: args.positionals[1] }) }),
184
212
  });
185
- registry_core_1.REGISTRY_BY_CAPABILITY.get("worker.show").mcp.handler = (args) => (0, worker_cli_1.workerShowCli)(args);
213
+ registry_core_1.REGISTRY_BY_CAPABILITY.get("worker.show").mcp.handler = (args) => loadWorkerCli().workerShowCli(args);
186
214
  (0, registry_core_1.attachCliBinding)("worker.manifest", {
187
215
  path: ["worker", "manifest"],
188
216
  jsonMode: "default",
189
- handler: (args) => ({ json: (0, worker_cli_1.workerManifestCli)({ ...args.options, runId: args.positionals[0], workerId: args.positionals[1] }) }),
217
+ handler: (args) => ({ json: loadWorkerCli().workerManifestCli({ ...args.options, runId: args.positionals[0], workerId: args.positionals[1] }) }),
190
218
  });
191
- registry_core_1.REGISTRY_BY_CAPABILITY.get("worker.manifest").mcp.handler = (args) => (0, worker_cli_1.workerManifestCli)(args);
219
+ registry_core_1.REGISTRY_BY_CAPABILITY.get("worker.manifest").mcp.handler = (args) => loadWorkerCli().workerManifestCli(args);
192
220
  (0, registry_core_1.attachCliBinding)("worker.output", {
193
221
  path: ["worker", "output"],
194
222
  jsonMode: "default",
195
- handler: (args) => ({ json: (0, worker_cli_1.workerOutputCli)({ ...args.options, runId: args.positionals[0], workerId: args.positionals[1], resultPath: args.positionals[2] }) }),
223
+ handler: (args) => ({ json: loadWorkerCli().workerOutputCli({ ...args.options, runId: args.positionals[0], workerId: args.positionals[1], resultPath: args.positionals[2] }) }),
196
224
  });
197
- registry_core_1.REGISTRY_BY_CAPABILITY.get("worker.output").mcp.handler = (args) => (0, worker_cli_1.workerOutputCli)(args);
225
+ registry_core_1.REGISTRY_BY_CAPABILITY.get("worker.output").mcp.handler = (args) => loadWorkerCli().workerOutputCli(args);
198
226
  (0, registry_core_1.attachCliBinding)("worker.fail", {
199
227
  path: ["worker", "fail"],
200
228
  jsonMode: "default",
201
- handler: (args) => ({ json: (0, worker_cli_1.workerFailCli)({ ...args.options, runId: args.positionals[0], workerId: args.positionals[1], resultPath: args.positionals[2] }) }),
229
+ handler: (args) => ({ json: loadWorkerCli().workerFailCli({ ...args.options, runId: args.positionals[0], workerId: args.positionals[1], resultPath: args.positionals[2] }) }),
202
230
  });
203
- registry_core_1.REGISTRY_BY_CAPABILITY.get("worker.fail").mcp.handler = (args) => (0, worker_cli_1.workerFailCli)(args);
231
+ registry_core_1.REGISTRY_BY_CAPABILITY.get("worker.fail").mcp.handler = (args) => loadWorkerCli().workerFailCli(args);
204
232
  (0, registry_core_1.attachCliBinding)("worker.validate", {
205
233
  path: ["worker", "validate"],
206
234
  jsonMode: "default",
207
235
  handler: (args) => {
208
- const { violation, exitCode } = (0, worker_cli_1.workerValidateCli)({ ...args.options, runId: args.positionals[0], workerId: args.positionals[1], resultPath: args.positionals[2] });
236
+ const { violation, exitCode } = loadWorkerCli().workerValidateCli({ ...args.options, runId: args.positionals[0], workerId: args.positionals[1], resultPath: args.positionals[2] });
209
237
  return { json: violation, exitCode };
210
238
  },
211
239
  });
212
- registry_core_1.REGISTRY_BY_CAPABILITY.get("worker.validate").mcp.handler = (args) => (0, worker_cli_1.workerValidateCli)(args).violation;
240
+ registry_core_1.REGISTRY_BY_CAPABILITY.get("worker.validate").mcp.handler = (args) => loadWorkerCli().workerValidateCli(args).violation;
213
241
  // ---- feedback list|show|summary|collect|task|resolve (CLI + MCP) ---------
214
242
  // The operator feedback lifecycle. MCP rows were declared but stubbed
215
243
  // (notYetImplemented) and no CLI verb was bound; the old build routed all of
216
244
  // these. positionals: [runId, feedbackId].
217
- const feedback_cli_1 = require("../../shell/feedback-cli");
245
+ function loadFeedbackCli() {
246
+ return require("../../shell/feedback-cli");
247
+ }
218
248
  // jsonMode "flag": human `Feedback` panel by default, canonical JSON under
219
249
  // --json (old build's feedback.summary was flag).
220
250
  (0, registry_core_1.attachCliBinding)("feedback.summary", {
221
251
  path: ["feedback", "summary"],
222
252
  jsonMode: "flag",
223
253
  handler: (args) => {
224
- const summary = (0, feedback_cli_1.feedbackSummaryCli)({ ...args.options, runId: args.positionals[0] });
225
- return { json: summary, text: `${(0, operator_ux_text_1.formatFeedbackSummaryText)(summary)}\n` };
254
+ const summary = loadFeedbackCli().feedbackSummaryCli({ ...args.options, runId: args.positionals[0] });
255
+ return { json: summary, text: `${loadOperatorUxText().formatFeedbackSummaryText(summary)}\n` };
226
256
  },
227
257
  });
228
- registry_core_1.REGISTRY_BY_CAPABILITY.get("feedback.summary").mcp.handler = (args) => (0, feedback_cli_1.feedbackSummaryCli)(args);
258
+ registry_core_1.REGISTRY_BY_CAPABILITY.get("feedback.summary").mcp.handler = (args) => loadFeedbackCli().feedbackSummaryCli(args);
229
259
  (0, registry_core_1.attachCliBinding)("feedback.list", {
230
260
  path: ["feedback", "list"],
231
261
  jsonMode: "default",
232
- handler: (args) => ({ json: (0, feedback_cli_1.feedbackListCli)({ ...args.options, runId: args.positionals[0] }) }),
262
+ handler: (args) => ({ json: loadFeedbackCli().feedbackListCli({ ...args.options, runId: args.positionals[0] }) }),
233
263
  });
234
- registry_core_1.REGISTRY_BY_CAPABILITY.get("feedback.list").mcp.handler = (args) => (0, feedback_cli_1.feedbackListCli)(args);
264
+ registry_core_1.REGISTRY_BY_CAPABILITY.get("feedback.list").mcp.handler = (args) => loadFeedbackCli().feedbackListCli(args);
235
265
  (0, registry_core_1.attachCliBinding)("feedback.show", {
236
266
  path: ["feedback", "show"],
237
267
  jsonMode: "default",
238
- handler: (args) => ({ json: (0, feedback_cli_1.feedbackShowCli)({ ...args.options, runId: args.positionals[0], feedbackId: args.positionals[1] }) }),
268
+ handler: (args) => ({ json: loadFeedbackCli().feedbackShowCli({ ...args.options, runId: args.positionals[0], feedbackId: args.positionals[1] }) }),
239
269
  });
240
- registry_core_1.REGISTRY_BY_CAPABILITY.get("feedback.show").mcp.handler = (args) => (0, feedback_cli_1.feedbackShowCli)(args);
270
+ registry_core_1.REGISTRY_BY_CAPABILITY.get("feedback.show").mcp.handler = (args) => loadFeedbackCli().feedbackShowCli(args);
241
271
  (0, registry_core_1.attachCliBinding)("feedback.collect", {
242
272
  path: ["feedback", "collect"],
243
273
  jsonMode: "default",
244
- handler: (args) => ({ json: (0, feedback_cli_1.feedbackCollectCli)({ ...args.options, runId: args.positionals[0] }) }),
274
+ handler: (args) => ({ json: loadFeedbackCli().feedbackCollectCli({ ...args.options, runId: args.positionals[0] }) }),
245
275
  });
246
- registry_core_1.REGISTRY_BY_CAPABILITY.get("feedback.collect").mcp.handler = (args) => (0, feedback_cli_1.feedbackCollectCli)(args);
276
+ registry_core_1.REGISTRY_BY_CAPABILITY.get("feedback.collect").mcp.handler = (args) => loadFeedbackCli().feedbackCollectCli(args);
247
277
  (0, registry_core_1.attachCliBinding)("feedback.task", {
248
278
  path: ["feedback", "task"],
249
279
  jsonMode: "default",
250
- handler: (args) => ({ json: (0, feedback_cli_1.feedbackTaskCli)({ ...args.options, runId: args.positionals[0], feedbackId: args.positionals[1] }) }),
280
+ handler: (args) => ({ json: loadFeedbackCli().feedbackTaskCli({ ...args.options, runId: args.positionals[0], feedbackId: args.positionals[1] }) }),
251
281
  });
252
- registry_core_1.REGISTRY_BY_CAPABILITY.get("feedback.task").mcp.handler = (args) => (0, feedback_cli_1.feedbackTaskCli)(args);
282
+ registry_core_1.REGISTRY_BY_CAPABILITY.get("feedback.task").mcp.handler = (args) => loadFeedbackCli().feedbackTaskCli(args);
253
283
  (0, registry_core_1.attachCliBinding)("feedback.resolve", {
254
284
  path: ["feedback", "resolve"],
255
285
  jsonMode: "default",
256
- handler: (args) => ({ json: (0, feedback_cli_1.feedbackResolveCli)({ ...args.options, runId: args.positionals[0], feedbackId: args.positionals[1] }) }),
286
+ handler: (args) => ({ json: loadFeedbackCli().feedbackResolveCli({ ...args.options, runId: args.positionals[0], feedbackId: args.positionals[1] }) }),
257
287
  });
258
- registry_core_1.REGISTRY_BY_CAPABILITY.get("feedback.resolve").mcp.handler = (args) => (0, feedback_cli_1.feedbackResolveCli)(args);
288
+ registry_core_1.REGISTRY_BY_CAPABILITY.get("feedback.resolve").mcp.handler = (args) => loadFeedbackCli().feedbackResolveCli(args);
259
289
  // ---- workbench.view / workbench.serve ---------------------------------
260
- const workbench_1 = require("../../shell/workbench");
261
- const workbench_text_1 = require("../../shell/workbench-text");
262
- const workbench_host_1 = require("../../shell/workbench-host");
290
+ function loadWorkbench() {
291
+ return require("../../shell/workbench");
292
+ }
293
+ function loadWorkbenchText() {
294
+ return require("../../shell/workbench-text");
295
+ }
296
+ function loadWorkbenchHost() {
297
+ return require("../../shell/workbench-host");
298
+ }
263
299
  (0, registry_core_1.attachCliBinding)("workbench.view", {
264
300
  path: ["workbench", "view"],
265
301
  jsonMode: "flag",
266
302
  handler: (args) => {
267
303
  const runId = (0, io_1.required)((0, io_1.optionalArg)(args.positionals[0]), "run id");
268
- const view = (0, workbench_1.buildWorkbenchRunView)(runId, args.options);
269
- return { json: view, text: `${(0, workbench_text_1.formatWorkbenchView)(view)}\n` };
304
+ const view = loadWorkbench().buildWorkbenchRunView(runId, args.options);
305
+ return { json: view, text: `${loadWorkbenchText().formatWorkbenchView(view)}\n` };
270
306
  },
271
307
  });
272
308
  // The MCP path is CLI-facing byte-identical (buildWorkbenchRunView takes
273
309
  // the same args shape either way) — required here since `.cli` and
274
310
  // `.mcp` never share a handler object per byte-compat item 5.
275
- registry_core_1.REGISTRY_BY_CAPABILITY.get("workbench.view").mcp.handler = (args) => (0, workbench_1.buildWorkbenchRunView)((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
311
+ registry_core_1.REGISTRY_BY_CAPABILITY.get("workbench.view").mcp.handler = (args) => loadWorkbench().buildWorkbenchRunView((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
276
312
  (0, registry_core_1.attachCliBinding)("workbench.serve", {
277
313
  path: ["workbench", "serve"],
278
314
  jsonMode: "flag",
279
315
  handler: (args) => {
280
- const host = new workbench_host_1.WorkbenchHost(args.options);
316
+ const { WorkbenchHost } = loadWorkbenchHost();
317
+ const host = new WorkbenchHost(args.options);
281
318
  if (args.options.once || (0, io_1.wantsJson)(args.options)) {
282
319
  return { json: host.descriptor(true) };
283
320
  }
@@ -296,7 +333,7 @@ registry_core_1.REGISTRY_BY_CAPABILITY.get("workbench.view").mcp.handler = (args
296
333
  // `once: true` unconditionally, per SPEC/reporting-ux.md's "one declared
297
334
  // divergence": an MCP client must never be able to make the server
298
335
  // process open a persistent listening socket.
299
- registry_core_1.REGISTRY_BY_CAPABILITY.get("workbench.serve").mcp.handler = (args) => new workbench_host_1.WorkbenchHost(args).descriptor(true);
336
+ registry_core_1.REGISTRY_BY_CAPABILITY.get("workbench.serve").mcp.handler = (args) => new (loadWorkbenchHost().WorkbenchHost)(args).descriptor(true);
300
337
  // PARITY: both surfaces route through the single core entry
301
338
  // buildWorkbenchServeDescriptor and return the IDENTICAL serve
302
339
  // descriptor under `cw workbench serve --json`/`--once` and
@@ -309,41 +346,45 @@ registry_core_1.REGISTRY_BY_CAPABILITY.get("workbench.serve").payloadIdentical =
309
346
  registry_core_1.REGISTRY_BY_CAPABILITY.get("workbench.serve").reason =
310
347
  "Both surfaces route through the single core entry buildWorkbenchServeDescriptor and return the IDENTICAL serve descriptor under `cw workbench serve --json`/`--once` and `cw_workbench_serve`. They diverge only in side effect, not payload: the CLI's default `cw workbench serve` (no --once) additionally STARTS the blocking localhost host, which an MCP stdio host cannot do, so cw_workbench_serve only ever returns the descriptor. Declared divergence, not drift.";
311
348
  // ---- audit.summary / audit.multi-agent / audit.policy / audit.judge ----
312
- const audit_cli_1 = require("../../shell/audit-cli");
313
- const operator_ux_text_2 = require("../../shell/operator-ux-text");
349
+ function loadAuditCli() {
350
+ return require("../../shell/audit-cli");
351
+ }
352
+ function loadEvalText() {
353
+ return require("../../shell/eval-text");
354
+ }
314
355
  (0, registry_core_1.attachCliBinding)("audit.summary", {
315
356
  path: ["audit", "summary"],
316
357
  jsonMode: "default",
317
- handler: (args) => ({ json: (0, audit_cli_1.auditSummaryCli)((0, io_1.required)(args.positionals[0], "run id"), args.options) }),
358
+ handler: (args) => ({ json: loadAuditCli().auditSummaryCli((0, io_1.required)(args.positionals[0], "run id"), args.options) }),
318
359
  });
319
- registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.summary").mcp.handler = (args) => (0, audit_cli_1.auditSummaryCli)((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
360
+ registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.summary").mcp.handler = (args) => loadAuditCli().auditSummaryCli((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
320
361
  (0, registry_core_1.attachCliBinding)("audit.multi-agent", {
321
362
  path: ["audit", "multi-agent"],
322
363
  jsonMode: "flag",
323
364
  handler: (args) => {
324
- const view = (0, audit_cli_1.auditMultiAgentCli)((0, io_1.required)(args.positionals[0], "run id"), args.options);
325
- return { json: view, text: (0, operator_ux_text_2.formatMultiAgentTrustAudit)(view) };
365
+ const view = loadAuditCli().auditMultiAgentCli((0, io_1.required)(args.positionals[0], "run id"), args.options);
366
+ return { json: view, text: loadOperatorUxText().formatMultiAgentTrustAudit(view) };
326
367
  },
327
368
  });
328
- registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.multi-agent").mcp.handler = (args) => (0, audit_cli_1.auditMultiAgentCli)((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
369
+ registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.multi-agent").mcp.handler = (args) => loadAuditCli().auditMultiAgentCli((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
329
370
  (0, registry_core_1.attachCliBinding)("audit.policy", {
330
371
  path: ["audit", "policy"],
331
372
  jsonMode: "flag",
332
373
  handler: (args) => {
333
- const view = (0, audit_cli_1.auditPolicyCli)((0, io_1.required)(args.positionals[0], "run id"), args.options);
334
- return { json: view, text: (0, operator_ux_text_2.formatMultiAgentTrustAudit)(view) };
374
+ const view = loadAuditCli().auditPolicyCli((0, io_1.required)(args.positionals[0], "run id"), args.options);
375
+ return { json: view, text: loadOperatorUxText().formatMultiAgentTrustAudit(view) };
335
376
  },
336
377
  });
337
- registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.policy").mcp.handler = (args) => (0, audit_cli_1.auditPolicyCli)((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
378
+ registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.policy").mcp.handler = (args) => loadAuditCli().auditPolicyCli((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
338
379
  (0, registry_core_1.attachCliBinding)("audit.judge", {
339
380
  path: ["audit", "judge"],
340
381
  jsonMode: "flag",
341
382
  handler: (args) => {
342
- const view = (0, audit_cli_1.auditJudgeCli)((0, io_1.required)(args.positionals[0], "run id"), args.options);
343
- return { json: view, text: (0, operator_ux_text_2.formatMultiAgentTrustAudit)(view) };
383
+ const view = loadAuditCli().auditJudgeCli((0, io_1.required)(args.positionals[0], "run id"), args.options);
384
+ return { json: view, text: loadOperatorUxText().formatMultiAgentTrustAudit(view) };
344
385
  },
345
386
  });
346
- registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.judge").mcp.handler = (args) => (0, audit_cli_1.auditJudgeCli)((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
387
+ registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.judge").mcp.handler = (args) => loadAuditCli().auditJudgeCli((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
347
388
  // GAP: `cw audit worker|provenance|role|blackboard|attest|decision` — the MCP
348
389
  // tool rows (cw_audit_worker/provenance/role/blackboard/attest/decision) were
349
390
  // declared but had no CLI path binding and their mcp.handler was still
@@ -352,43 +393,43 @@ registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.judge").mcp.handler = (args) =
352
393
  (0, registry_core_1.attachCliBinding)("audit.worker", {
353
394
  path: ["audit", "worker"],
354
395
  jsonMode: "default",
355
- handler: (args) => ({ json: (0, audit_cli_1.auditWorkerCli)((0, io_1.required)(args.positionals[0], "run id"), (0, io_1.required)(args.positionals[1], "worker id"), args.options) }),
396
+ handler: (args) => ({ json: loadAuditCli().auditWorkerCli((0, io_1.required)(args.positionals[0], "run id"), (0, io_1.required)(args.positionals[1], "worker id"), args.options) }),
356
397
  });
357
- registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.worker").mcp.handler = (args) => (0, audit_cli_1.auditWorkerCli)((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), (0, io_1.required)((0, io_1.optionalArg)(args.workerId ?? args.worker), "worker id"), args);
398
+ registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.worker").mcp.handler = (args) => loadAuditCli().auditWorkerCli((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), (0, io_1.required)((0, io_1.optionalArg)(args.workerId ?? args.worker), "worker id"), args);
358
399
  (0, registry_core_1.attachCliBinding)("audit.provenance", {
359
400
  path: ["audit", "provenance"],
360
401
  jsonMode: "default",
361
- handler: (args) => ({ json: (0, audit_cli_1.auditProvenanceCli)((0, io_1.required)(args.positionals[0], "run id"), args.options) }),
402
+ handler: (args) => ({ json: loadAuditCli().auditProvenanceCli((0, io_1.required)(args.positionals[0], "run id"), args.options) }),
362
403
  });
363
- registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.provenance").mcp.handler = (args) => (0, audit_cli_1.auditProvenanceCli)((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
404
+ registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.provenance").mcp.handler = (args) => loadAuditCli().auditProvenanceCli((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
364
405
  (0, registry_core_1.attachCliBinding)("audit.role", {
365
406
  path: ["audit", "role"],
366
407
  jsonMode: "flag",
367
408
  handler: (args) => {
368
- const view = (0, audit_cli_1.auditRoleCli)((0, io_1.required)(args.positionals[0], "run id"), (0, io_1.required)(args.positionals[1], "role id"), args.options);
369
- return { json: view, text: (0, operator_ux_text_2.formatMultiAgentTrustAudit)(view) };
409
+ const view = loadAuditCli().auditRoleCli((0, io_1.required)(args.positionals[0], "run id"), (0, io_1.required)(args.positionals[1], "role id"), args.options);
410
+ return { json: view, text: loadOperatorUxText().formatMultiAgentTrustAudit(view) };
370
411
  },
371
412
  });
372
- registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.role").mcp.handler = (args) => (0, audit_cli_1.auditRoleCli)((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), (0, io_1.required)((0, io_1.optionalArg)(args.roleId ?? args.id), "role id"), args);
413
+ registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.role").mcp.handler = (args) => loadAuditCli().auditRoleCli((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), (0, io_1.required)((0, io_1.optionalArg)(args.roleId ?? args.id), "role id"), args);
373
414
  (0, registry_core_1.attachCliBinding)("audit.blackboard", {
374
415
  path: ["audit", "blackboard"],
375
416
  jsonMode: "flag",
376
417
  handler: (args) => {
377
- const view = (0, audit_cli_1.auditBlackboardCli)((0, io_1.required)(args.positionals[0], "run id"), args.options);
378
- return { json: view, text: (0, operator_ux_text_2.formatMultiAgentTrustAudit)(view) };
418
+ const view = loadAuditCli().auditBlackboardCli((0, io_1.required)(args.positionals[0], "run id"), args.options);
419
+ return { json: view, text: loadOperatorUxText().formatMultiAgentTrustAudit(view) };
379
420
  },
380
421
  });
381
- registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.blackboard").mcp.handler = (args) => (0, audit_cli_1.auditBlackboardCli)((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
422
+ registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.blackboard").mcp.handler = (args) => loadAuditCli().auditBlackboardCli((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
382
423
  (0, registry_core_1.attachCliBinding)("audit.attest", {
383
424
  path: ["audit", "attest"],
384
425
  jsonMode: "default",
385
- handler: (args) => ({ json: (0, audit_cli_1.auditAttestCli)((0, io_1.required)(args.positionals[0], "run id"), args.options) }),
426
+ handler: (args) => ({ json: loadAuditCli().auditAttestCli((0, io_1.required)(args.positionals[0], "run id"), args.options) }),
386
427
  });
387
- registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.attest").mcp.handler = (args) => (0, audit_cli_1.auditAttestCli)((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
428
+ registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.attest").mcp.handler = (args) => loadAuditCli().auditAttestCli((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), args);
388
429
  (0, registry_core_1.attachCliBinding)("audit.decision", {
389
430
  path: ["audit", "decision"],
390
431
  jsonMode: "default",
391
- handler: (args) => ({ json: (0, audit_cli_1.auditDecisionCli)((0, io_1.required)(args.positionals[0], "run id"), (0, io_1.required)(args.positionals[1], "worker id"), args.options) }),
432
+ handler: (args) => ({ json: loadAuditCli().auditDecisionCli((0, io_1.required)(args.positionals[0], "run id"), (0, io_1.required)(args.positionals[1], "worker id"), args.options) }),
392
433
  });
393
- registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.decision").mcp.handler = (args) => (0, audit_cli_1.auditDecisionCli)((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), (0, io_1.required)((0, io_1.optionalArg)(args.workerId), "worker id"), args);
434
+ registry_core_1.REGISTRY_BY_CAPABILITY.get("audit.decision").mcp.handler = (args) => loadAuditCli().auditDecisionCli((0, io_1.required)((0, io_1.optionalArg)(args.runId), "run id"), (0, io_1.required)((0, io_1.optionalArg)(args.workerId), "worker id"), args);
394
435
  // ---- app.list / app.show / app.validate / app.init / app.package -------