cool-workflow 0.1.78 → 0.1.80
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/README.md +29 -3
- package/apps/architecture-review/app.json +1 -1
- package/apps/architecture-review-fast/app.json +64 -0
- package/apps/architecture-review-fast/workflow.js +153 -0
- 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/capability-core.js +71 -0
- package/dist/capability-registry.js +13 -8
- package/dist/cli.js +49 -1
- package/dist/drive.js +74 -1
- package/dist/evidence-reasoning.js +2 -2
- package/dist/execution-backend.js +6 -1
- package/dist/mcp-server.js +56 -13
- package/dist/orchestrator/lifecycle-operations.js +2 -1
- package/dist/orchestrator.js +1 -1
- package/dist/run-export.js +370 -25
- package/dist/run-registry.js +11 -4
- package/dist/state-explosion.js +100 -21
- package/dist/telemetry-demo.js +154 -0
- package/dist/version.js +1 -1
- package/docs/agent-delegation-drive.7.md +60 -0
- package/docs/canonical-workflow-apps.7.md +37 -0
- package/docs/cli-mcp-parity.7.md +14 -0
- package/docs/contract-migration-tooling.7.md +6 -0
- package/docs/control-plane-scheduling.7.md +6 -0
- package/docs/durable-state-and-locking.7.md +6 -0
- package/docs/evidence-adoption-reasoning-chain.7.md +6 -0
- package/docs/execution-backends.7.md +6 -0
- package/docs/index.md +1 -0
- package/docs/launch/demo.tape +28 -0
- package/docs/launch/launch-kit.md +172 -0
- package/docs/launch/pre-launch-checklist.md +53 -0
- package/docs/multi-agent-cli-mcp-surface.7.md +6 -0
- package/docs/multi-agent-eval-replay-harness.7.md +6 -0
- package/docs/multi-agent-operator-ux.7.md +6 -0
- package/docs/node-snapshot-diff-replay.7.md +6 -0
- package/docs/observability-cost-accounting.7.md +6 -0
- package/docs/project-index.md +16 -6
- package/docs/real-execution-backends.7.md +6 -0
- package/docs/release-and-migration.7.md +6 -0
- package/docs/release-tooling.7.md +6 -0
- package/docs/routines.md +23 -0
- package/docs/run-registry-control-plane.7.md +44 -1
- package/docs/run-retention-reclamation.7.md +6 -0
- package/docs/source-context-profiles.7.md +119 -0
- package/docs/state-explosion-management.7.md +13 -0
- package/docs/team-collaboration.7.md +6 -0
- package/docs/unix-principles.md +49 -1
- package/docs/web-desktop-workbench.7.md +6 -0
- package/manifest/plugin.manifest.json +1 -1
- package/manifest/source-context-profiles.json +142 -0
- package/package.json +2 -1
- package/scripts/agents/claude-p-agent.js +129 -43
- package/scripts/architecture-review-fast.js +362 -0
- package/scripts/bump-version.js +1 -0
- package/scripts/canonical-apps.js +21 -4
- package/scripts/coverage-gate.js +211 -0
- package/scripts/dogfood-release.js +1 -1
- package/scripts/golden-path.js +4 -4
- package/scripts/source-context.js +291 -0
- package/scripts/version-sync-check.js +1 -0
- package/skills/ci-triage/SKILL.md +50 -0
- package/skills/ci-triage/agents/openai.yaml +4 -0
- package/skills/cool-workflow/SKILL.md +4 -1
- package/skills/deploy-check/SKILL.md +55 -0
- package/skills/deploy-check/agents/openai.yaml +4 -0
- package/skills/design-qa/SKILL.md +49 -0
- package/skills/design-qa/agents/openai.yaml +4 -0
- package/skills/pr-review/SKILL.md +45 -0
- package/skills/pr-review/agents/openai.yaml +4 -0
package/dist/drive.js
CHANGED
|
@@ -31,12 +31,14 @@ exports.driveConcurrentRound = driveConcurrentRound;
|
|
|
31
31
|
exports.drive = drive;
|
|
32
32
|
exports.drivePreview = drivePreview;
|
|
33
33
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
34
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
34
35
|
const dispatch_1 = require("./dispatch");
|
|
35
36
|
const execution_backend_1 = require("./execution-backend");
|
|
36
37
|
const worker_isolation_1 = require("./worker-isolation");
|
|
37
38
|
const agent_config_1 = require("./agent-config");
|
|
38
39
|
const scheduling_1 = require("./scheduling");
|
|
39
40
|
const observability_1 = require("./observability");
|
|
41
|
+
const state_1 = require("./state");
|
|
40
42
|
exports.DRIVE_SCHEMA_VERSION = 1;
|
|
41
43
|
/** The task the next drive step would advance: a RUNNING (already-dispatched,
|
|
42
44
|
* awaiting fulfillment / retry) task first, else the next PENDING task in the
|
|
@@ -198,8 +200,26 @@ function processSelectedTask(ctx, selected, preparedOutcome) {
|
|
|
198
200
|
// Progress BEFORE the (possibly multi-minute) agent spawn, so a live drive shows
|
|
199
201
|
// immediate activity instead of a long silence on the first worker. task.label
|
|
200
202
|
// is the human-facing display name; the id stays the stable reference.
|
|
201
|
-
emitProgress(`→ ${selected.label || selected.id} (${selected.phase}) — ${dispatched ? "dispatched, " : ""}spawning agent, may take minutes…`);
|
|
202
203
|
const promptDigest = node_fs_1.default.existsSync(manifest.inputPath) ? (0, execution_backend_1.sha256)(node_fs_1.default.readFileSync(manifest.inputPath, "utf8")) : (0, execution_backend_1.sha256)(manifest.prompt || "");
|
|
204
|
+
const cachePath = resultCachePath(run, selected, (0, execution_backend_1.sha256)(selected.prompt));
|
|
205
|
+
if (cachePath && node_fs_1.default.existsSync(cachePath)) {
|
|
206
|
+
emitProgress(`↺ ${selected.label || selected.id} (${selected.phase}) — accepting cached result`);
|
|
207
|
+
try {
|
|
208
|
+
node_fs_1.default.writeFileSync(manifest.resultPath, node_fs_1.default.readFileSync(cachePath, "utf8"), "utf8");
|
|
209
|
+
runner.recordWorkerOutput(runId, workerId, manifest.resultPath, {});
|
|
210
|
+
}
|
|
211
|
+
catch (error) {
|
|
212
|
+
return handleHop(ctx, selected, workerId, `result cache rejected: ${error instanceof Error ? error.message : String(error)}`, dispatched);
|
|
213
|
+
}
|
|
214
|
+
return step("accept", "ok", {
|
|
215
|
+
runId,
|
|
216
|
+
taskId: selected.id,
|
|
217
|
+
phase: selected.phase,
|
|
218
|
+
handleKind: "result-cache",
|
|
219
|
+
reason: "result cache hit"
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
emitProgress(`→ ${selected.label || selected.id} (${selected.phase}) — ${dispatched ? "dispatched, " : ""}spawning agent, may take minutes…`);
|
|
203
223
|
const envelope = (0, execution_backend_1.runBackend)(buildAgentRequest(ctx, run, selected, manifest, preparedOutcome));
|
|
204
224
|
const handle = envelope.provenance.handle;
|
|
205
225
|
const reportedModel = handle?.metadata?.reportedModel || "unreported";
|
|
@@ -236,6 +256,9 @@ function processSelectedTask(ctx, selected, preparedOutcome) {
|
|
|
236
256
|
catch (error) {
|
|
237
257
|
return handleHop(ctx, selected, workerId, `result.md rejected: ${error instanceof Error ? error.message : String(error)}`, dispatched);
|
|
238
258
|
}
|
|
259
|
+
if (cachePath && manifest.resultPath && node_fs_1.default.existsSync(manifest.resultPath)) {
|
|
260
|
+
writeResultCache(cachePath, node_fs_1.default.readFileSync(manifest.resultPath, "utf8"));
|
|
261
|
+
}
|
|
239
262
|
return step("accept", "ok", {
|
|
240
263
|
runId,
|
|
241
264
|
taskId: selected.id,
|
|
@@ -245,6 +268,53 @@ function processSelectedTask(ctx, selected, preparedOutcome) {
|
|
|
245
268
|
reportedModel
|
|
246
269
|
});
|
|
247
270
|
}
|
|
271
|
+
function resultCachePath(run, task, promptDigest) {
|
|
272
|
+
const policy = task.resultCache;
|
|
273
|
+
if (!policy || policy.mode !== "read-write")
|
|
274
|
+
return undefined;
|
|
275
|
+
const keyInput = policy.keyInput;
|
|
276
|
+
const keyValue = keyInput ? String(run.inputs[keyInput] || "").trim() : "";
|
|
277
|
+
if (!keyInput || !keyValue)
|
|
278
|
+
return undefined;
|
|
279
|
+
const completedResultsDigest = completedResultsCacheDigest(run, task);
|
|
280
|
+
if (completedResultsDigest === undefined)
|
|
281
|
+
return undefined;
|
|
282
|
+
const digest = (0, execution_backend_1.sha256)(JSON.stringify({
|
|
283
|
+
schemaVersion: 1,
|
|
284
|
+
workflowId: run.workflow.id,
|
|
285
|
+
taskId: task.id,
|
|
286
|
+
keyInput,
|
|
287
|
+
keyValue,
|
|
288
|
+
promptDigest,
|
|
289
|
+
completedResultsDigest
|
|
290
|
+
})).replace(/^sha256:/, "");
|
|
291
|
+
return node_path_1.default.join(run.cwd, ".cw", "cache", "worker-results", (0, state_1.safeFileName)(run.workflow.id), `${(0, state_1.safeFileName)(task.id)}-${digest.slice(0, 32)}.md`);
|
|
292
|
+
}
|
|
293
|
+
function completedResultsCacheDigest(run, task) {
|
|
294
|
+
if (task.resultCache?.includeCompletedResults !== "previous-phases")
|
|
295
|
+
return "";
|
|
296
|
+
const phaseIndex = run.phases.findIndex((phase) => phase.name === task.phase || phase.id === task.phase);
|
|
297
|
+
if (phaseIndex < 0)
|
|
298
|
+
return undefined;
|
|
299
|
+
const previousTaskIds = new Set(run.phases.slice(0, phaseIndex).flatMap((phase) => phase.taskIds));
|
|
300
|
+
const records = run.tasks
|
|
301
|
+
.filter((candidate) => previousTaskIds.has(candidate.id))
|
|
302
|
+
.sort((a, b) => a.id.localeCompare(b.id))
|
|
303
|
+
.map((candidate) => {
|
|
304
|
+
if (candidate.status !== "completed" || !candidate.resultPath || !node_fs_1.default.existsSync(candidate.resultPath))
|
|
305
|
+
return undefined;
|
|
306
|
+
return [candidate.id, (0, execution_backend_1.sha256)(node_fs_1.default.readFileSync(candidate.resultPath, "utf8"))];
|
|
307
|
+
});
|
|
308
|
+
if (records.some((record) => record === undefined))
|
|
309
|
+
return undefined;
|
|
310
|
+
return (0, execution_backend_1.sha256)(JSON.stringify(records));
|
|
311
|
+
}
|
|
312
|
+
function writeResultCache(file, content) {
|
|
313
|
+
node_fs_1.default.mkdirSync(node_path_1.default.dirname(file), { recursive: true });
|
|
314
|
+
const tmp = `${file}.${process.pid}.tmp`;
|
|
315
|
+
node_fs_1.default.writeFileSync(tmp, content, "utf8");
|
|
316
|
+
node_fs_1.default.renameSync(tmp, file);
|
|
317
|
+
}
|
|
248
318
|
/** Advance ONE concurrent ROUND: fulfill up to `limit` ready tasks in the first
|
|
249
319
|
* runnable phase as a single batch, recording results in DETERMINISTIC task
|
|
250
320
|
* order (the existing phase/dispatch order) regardless of completion order — so
|
|
@@ -322,6 +392,9 @@ function prepareConcurrentOutcomes(ctx, batch) {
|
|
|
322
392
|
continue;
|
|
323
393
|
}
|
|
324
394
|
const manifest = runner.showWorkerManifest(runId, workerId);
|
|
395
|
+
const cachePath = resultCachePath(run, task, (0, execution_backend_1.sha256)(task.prompt));
|
|
396
|
+
if (cachePath && node_fs_1.default.existsSync(cachePath))
|
|
397
|
+
continue;
|
|
325
398
|
const job = (0, execution_backend_1.prepareAgentSpawn)(buildAgentRequest(ctx, run, task, manifest));
|
|
326
399
|
if (job) {
|
|
327
400
|
jobs.push(job);
|
|
@@ -389,11 +389,11 @@ function deriveCounterfactuals(run, scores) {
|
|
|
389
389
|
// node. This returns the operator-graph node ids backing every decision-bearing
|
|
390
390
|
// reasoning step of an adopted chain, so state-explosion can protect them.
|
|
391
391
|
// ---------------------------------------------------------------------------
|
|
392
|
-
function reasoningCriticalNodeIds(run) {
|
|
392
|
+
function reasoningCriticalNodeIds(run, operator = (0, multi_agent_operator_ux_1.summarizeMultiAgentOperator)(run)) {
|
|
393
393
|
const ids = new Set();
|
|
394
394
|
const faninIds = new Set((run.multiAgent?.fanins || []).map((entry) => entry.id));
|
|
395
395
|
const commitById = new Map((run.commits || []).map((commit) => [commit.id, commit]));
|
|
396
|
-
for (const evidence of
|
|
396
|
+
for (const evidence of operator.evidence) {
|
|
397
397
|
if (evidence.status !== "adopted")
|
|
398
398
|
continue;
|
|
399
399
|
for (const id of evidence.candidateIds)
|
|
@@ -887,13 +887,18 @@ function runAgentProcess(descriptor, policy, request, label, handle, attestation
|
|
|
887
887
|
outcome = request.preparedAgentOutcome;
|
|
888
888
|
}
|
|
889
889
|
else {
|
|
890
|
+
// Live output is opt-in (POLA): stdout is always captured as data, while
|
|
891
|
+
// stderr is forwarded only when the operator explicitly asks for a stream
|
|
892
|
+
// and this process is attached to a terminal. CI/pipes stay silent.
|
|
893
|
+
const streamStderr = process.env.CW_AGENT_STREAM === "1" && Boolean(process.stderr.isTTY) && process.env.CW_NO_STREAM !== "1";
|
|
890
894
|
const child = (0, node_child_process_1.spawnSync)(resolved.binary, realArgs, {
|
|
891
895
|
cwd: request.cwd,
|
|
892
896
|
env: { ...process.env },
|
|
893
897
|
encoding: "utf8",
|
|
894
898
|
timeout: resolved.timeoutMs || 600000,
|
|
895
899
|
maxBuffer: 32 * 1024 * 1024,
|
|
896
|
-
shell: false
|
|
900
|
+
shell: false,
|
|
901
|
+
stdio: ["ignore", "pipe", streamStderr ? "inherit" : "pipe"]
|
|
897
902
|
});
|
|
898
903
|
outcome = {
|
|
899
904
|
...(child.error ? { spawnError: messageOf(child.error) } : {}),
|
package/dist/mcp-server.js
CHANGED
|
@@ -391,6 +391,12 @@ function callTool(name, args) {
|
|
|
391
391
|
return (0, capability_core_1.runArchive)((0, capability_core_1.runRegistryFor)(args, runner), (0, capability_core_1.optionalString)(args.runId), args);
|
|
392
392
|
case "cw_run_rerun":
|
|
393
393
|
return (0, capability_core_1.runRerun)((0, capability_core_1.runRegistryFor)(args, runner), String(args.runId || ""), args);
|
|
394
|
+
case "cw_run_export":
|
|
395
|
+
return (0, capability_core_1.runExportArchive)(runner, String(args.runId || ""), args);
|
|
396
|
+
case "cw_run_import":
|
|
397
|
+
return (0, capability_core_1.runImportArchive)(runner, args);
|
|
398
|
+
case "cw_run_verify_import":
|
|
399
|
+
return (0, capability_core_1.runVerifyImport)(runner, String(args.runId || ""), args);
|
|
394
400
|
case "cw_run_drive":
|
|
395
401
|
return (0, capability_core_1.runDrivePreview)(runner, args);
|
|
396
402
|
case "cw_run_drive_step":
|
|
@@ -425,6 +431,8 @@ function callTool(name, args) {
|
|
|
425
431
|
return (0, capability_core_1.gcRun)((0, capability_core_1.runRegistryFor)(args, runner), (0, capability_core_1.optionalString)(args.runId), args);
|
|
426
432
|
case "cw_gc_verify":
|
|
427
433
|
return (0, capability_core_1.gcVerify)((0, capability_core_1.runRegistryFor)(args, runner), String(args.runId || ""), args);
|
|
434
|
+
case "cw_telemetry_verify":
|
|
435
|
+
return (0, capability_core_1.telemetryVerify)(runner, args);
|
|
428
436
|
case "cw_history":
|
|
429
437
|
return (0, capability_core_1.runHistory)((0, capability_core_1.runRegistryFor)(args, runner), args);
|
|
430
438
|
case "cw_workbench_view":
|
|
@@ -510,12 +518,16 @@ function requiredArgsForTool(name) {
|
|
|
510
518
|
return ["runId", "targetKind|kind", "targetId|target", "body|message|text"];
|
|
511
519
|
if (name === "cw_handoff")
|
|
512
520
|
return ["runId", "targetKind|kind", "targetId|target", "to|toActor"];
|
|
513
|
-
if (name === "cw_run_show" || name === "cw_run_resume" || name === "cw_run_rerun")
|
|
521
|
+
if (name === "cw_run_show" || name === "cw_run_resume" || name === "cw_run_rerun" || name === "cw_run_export" || name === "cw_run_verify_import")
|
|
514
522
|
return ["runId"];
|
|
523
|
+
if (name === "cw_run_import")
|
|
524
|
+
return ["archive|path|file"];
|
|
515
525
|
if (name === "cw_run_archive")
|
|
516
526
|
return ["runId|olderThanDays"];
|
|
517
527
|
if (name === "cw_gc_verify")
|
|
518
528
|
return ["runId"];
|
|
529
|
+
if (name === "cw_telemetry_verify")
|
|
530
|
+
return ["runId"];
|
|
519
531
|
if (name === "cw_queue_show")
|
|
520
532
|
return ["id"];
|
|
521
533
|
if (name.endsWith("_show")) {
|
|
@@ -700,24 +712,23 @@ function toolDefinitions() {
|
|
|
700
712
|
contract: stringSchema("run-state | workflow-app (default run-state)"),
|
|
701
713
|
cwd: stringSchema("Run workspace")
|
|
702
714
|
}),
|
|
703
|
-
|
|
704
|
-
tool("cw_operator_graph", "Read the structured Operator UX run graph.", runIdSchema()),
|
|
705
|
-
tool("cw_operator_report", "Refresh and read the structured Operator UX report summary.", runIdSchema()),
|
|
706
|
-
tool("cw_worker_summary", "Read the structured worker summary for a run.", runIdSchema()),
|
|
715
|
+
...runIdCapabilityTools(["operator.status", "graph", "operator.report", "worker.summary"]),
|
|
707
716
|
tool("cw_workbench_view", "Read the read-only five-panel Workbench view (graph, blackboard, worker, candidate, audit) for one run. Each panel embeds the verbatim `cw <cmd> --json` payload of one existing capability; absent panels are surfaced honestly. Peer of `cw workbench view`.", runIdSchema()),
|
|
708
717
|
tool("cw_workbench_serve", "Describe the optional localhost-only, read-only Workbench host (bind, scope, routes). Returns the serve descriptor identical to `cw workbench serve --json`; MCP never starts the blocking server.", {
|
|
709
718
|
cwd: stringSchema("Run workspace"),
|
|
710
719
|
port: numberSchema("Optional loopback port, defaults to 7717"),
|
|
711
720
|
scope: stringSchema("Registry scope: repo|home")
|
|
712
721
|
}),
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
722
|
+
...runIdCapabilityTools([
|
|
723
|
+
"candidate.summary",
|
|
724
|
+
"feedback.summary",
|
|
725
|
+
"commit.summary",
|
|
726
|
+
"multi-agent.summary",
|
|
727
|
+
"multi-agent.graph",
|
|
728
|
+
"multi-agent.dependencies",
|
|
729
|
+
"multi-agent.failures",
|
|
730
|
+
"multi-agent.evidence"
|
|
731
|
+
]),
|
|
721
732
|
tool("cw_evidence_reasoning", "Explain WHY each evidence item was adopted/rejected/superseded/conflicting: a derived, fingerprinted reasoning chain with decision, basis, authority, rationale, and counterfactual per gate (fanin, candidate-score, selection, verifier, commit). Fails closed to `unexplained` when a rationale cannot be traced. Reads valid|stale|absent freshness against current source state.", {
|
|
722
733
|
...runIdSchema(),
|
|
723
734
|
evidence: stringSchema("Optional evidence id/ref to explain a single adoption"),
|
|
@@ -1436,6 +1447,25 @@ function toolDefinitions() {
|
|
|
1436
1447
|
scope: stringSchema("home (default, cross-repo) or repo"),
|
|
1437
1448
|
reason: stringSchema("Rerun reason")
|
|
1438
1449
|
}),
|
|
1450
|
+
tool("cw_run_export", "Export a run to a portable, digest-checked archive containing run-local artifacts, audit overlays, telemetry, reports, workers, and commit snapshots.", {
|
|
1451
|
+
runId: stringSchema("Run id to export"),
|
|
1452
|
+
cwd: stringSchema("Repo workspace containing .cw/runs/<run-id>"),
|
|
1453
|
+
output: stringSchema("Archive output path"),
|
|
1454
|
+
path: stringSchema("Alias for output"),
|
|
1455
|
+
archive: stringSchema("Alias for output")
|
|
1456
|
+
}),
|
|
1457
|
+
tool("cw_run_import", "Restore a portable run archive into a target repo and immediately verify restored file digests.", {
|
|
1458
|
+
archive: stringSchema("Archive path"),
|
|
1459
|
+
path: stringSchema("Alias for archive"),
|
|
1460
|
+
file: stringSchema("Alias for archive"),
|
|
1461
|
+
target: stringSchema("Restore target repo directory"),
|
|
1462
|
+
repo: stringSchema("Alias for target"),
|
|
1463
|
+
cwd: stringSchema("Invocation workspace")
|
|
1464
|
+
}),
|
|
1465
|
+
tool("cw_run_verify_import", "Verify an imported run against its restore manifest and telemetry chain; detects missing or tampered restored files.", {
|
|
1466
|
+
runId: stringSchema("Imported run id to verify"),
|
|
1467
|
+
cwd: stringSchema("Restored repo workspace")
|
|
1468
|
+
}),
|
|
1439
1469
|
tool("cw_run_drive", "Preview the next agent-delegation drive step for a run (read-only, deterministic). Counts come from state; no spawn, no mutation.", {
|
|
1440
1470
|
runId: stringSchema("Run id to preview"),
|
|
1441
1471
|
cwd: stringSchema("Run workspace")
|
|
@@ -1531,6 +1561,10 @@ function toolDefinitions() {
|
|
|
1531
1561
|
scope: stringSchema("home (default, cross-repo) or repo"),
|
|
1532
1562
|
runId: stringSchema("Run id to verify")
|
|
1533
1563
|
}),
|
|
1564
|
+
tool("cw_telemetry_verify", "Re-prove a run's telemetry attestation ledger offline: prevHash chain linkage + independent per-record hash recompute (never trusts the stored hash). A forged or edited record fails it. Peer of `cw telemetry verify`.", {
|
|
1565
|
+
cwd: stringSchema("Repo workspace"),
|
|
1566
|
+
runId: stringSchema("Run id to verify")
|
|
1567
|
+
}),
|
|
1534
1568
|
tool("cw_history", "Read a cross-repo unified run timeline (newest first), deterministic and paginated, with provenance links.", {
|
|
1535
1569
|
cwd: stringSchema("Repo workspace"),
|
|
1536
1570
|
scope: stringSchema("home (default, cross-repo) or repo"),
|
|
@@ -1552,6 +1586,15 @@ function tool(name, description, properties) {
|
|
|
1552
1586
|
}
|
|
1553
1587
|
};
|
|
1554
1588
|
}
|
|
1589
|
+
function runIdCapabilityTools(capabilityIds) {
|
|
1590
|
+
return capabilityIds.map((capabilityId) => capabilityTool(capabilityId, runIdSchema()));
|
|
1591
|
+
}
|
|
1592
|
+
function capabilityTool(capabilityId, properties) {
|
|
1593
|
+
const descriptor = capability_registry_1.CAPABILITY_REGISTRY.find((capability) => capability.capability === capabilityId);
|
|
1594
|
+
if (!descriptor?.mcp)
|
|
1595
|
+
throw new Error(`MCP capability not declared: ${capabilityId}`);
|
|
1596
|
+
return tool(descriptor.mcp.tool, descriptor.summary, properties);
|
|
1597
|
+
}
|
|
1555
1598
|
function stringSchema(description) {
|
|
1556
1599
|
return { type: "string", description };
|
|
1557
1600
|
}
|
|
@@ -435,7 +435,8 @@ function flattenTasks(workflow, inputs) {
|
|
|
435
435
|
// model (per-task delegation override), agentType (dispatch backend).
|
|
436
436
|
...(task.label ? { label: task.label } : {}),
|
|
437
437
|
...(task.model ? { model: task.model } : {}),
|
|
438
|
-
...(task.agentType ? { agentType: task.agentType } : {})
|
|
438
|
+
...(task.agentType ? { agentType: task.agentType } : {}),
|
|
439
|
+
...(task.resultCache ? { resultCache: task.resultCache } : {})
|
|
439
440
|
});
|
|
440
441
|
}
|
|
441
442
|
}
|
package/dist/orchestrator.js
CHANGED
|
@@ -838,7 +838,7 @@ function formatHelp() {
|
|
|
838
838
|
" schedule create|list|due|complete|pause|resume|run-now|history|daemon|delete",
|
|
839
839
|
" routine create|fire|list|events|delete",
|
|
840
840
|
" registry refresh|show [--scope repo|home] [--json]",
|
|
841
|
-
" run search|list|show|resume|archive|rerun [run-id] [--scope repo|home] [--json]",
|
|
841
|
+
" run search|list|show|resume|archive|rerun|export|import|verify-import [run-id|archive] [--scope repo|home] [--json]",
|
|
842
842
|
" queue add|list|drain|show [queue-id] [--repo PATH] [--priority N]",
|
|
843
843
|
" history [--scope repo|home] [--app ID] [--status STATE] [--json]",
|
|
844
844
|
" workbench view <run-id> [--json]",
|