cool-workflow 0.1.80 → 0.1.82
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 +42 -2
- 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/agent-config.js +21 -7
- package/dist/candidate-scoring.js +62 -48
- package/dist/capability-core.js +152 -96
- package/dist/capability-registry.js +160 -174
- package/dist/cli.js +90 -100
- package/dist/collaboration.js +5 -6
- package/dist/commit.js +232 -209
- package/dist/compare.js +18 -0
- package/dist/coordinator/classify.js +45 -0
- package/dist/coordinator/paths.js +42 -0
- package/dist/coordinator/util.js +126 -0
- package/dist/coordinator.js +127 -300
- package/dist/dispatch.js +46 -3
- package/dist/drive.js +7 -7
- package/dist/error-feedback.js +8 -4
- package/dist/evidence-reasoning.js +5 -2
- package/dist/execution-backend/agent.js +294 -0
- package/dist/execution-backend/probes.js +96 -0
- package/dist/execution-backend/util.js +47 -0
- package/dist/execution-backend.js +77 -450
- package/dist/gates.js +48 -0
- package/dist/mcp-server.js +34 -173
- package/dist/multi-agent/graph.js +84 -0
- package/dist/multi-agent/helpers.js +141 -0
- package/dist/multi-agent/ids.js +20 -0
- package/dist/multi-agent/paths.js +22 -0
- package/dist/multi-agent-eval/format.js +194 -0
- package/dist/multi-agent-eval/normalize.js +51 -0
- package/dist/multi-agent-eval.js +63 -242
- package/dist/multi-agent-host.js +53 -40
- package/dist/multi-agent-operator-ux.js +2 -1
- package/dist/multi-agent-trust.js +5 -5
- package/dist/multi-agent.js +125 -314
- package/dist/node-projection.js +59 -0
- package/dist/node-snapshot.js +11 -21
- package/dist/observability/format.js +61 -0
- package/dist/observability/intake.js +98 -0
- package/dist/observability.js +14 -160
- package/dist/operator-ux/format.js +364 -0
- package/dist/operator-ux.js +22 -363
- package/dist/orchestrator/lifecycle-operations.js +22 -1
- package/dist/orchestrator/report.js +8 -0
- package/dist/orchestrator.js +41 -10
- package/dist/reclamation.js +32 -55
- package/dist/run-export.js +138 -14
- package/dist/run-registry/derive.js +172 -0
- package/dist/run-registry/format.js +124 -0
- package/dist/run-registry/gc.js +251 -0
- package/dist/run-registry/policy.js +16 -0
- package/dist/run-registry/queue.js +116 -0
- package/dist/run-registry.js +78 -593
- package/dist/run-state-schema.js +1 -0
- package/dist/sandbox-profile.js +43 -2
- package/dist/scheduler.js +34 -4
- package/dist/state-explosion/format.js +159 -0
- package/dist/state-explosion/helpers.js +82 -0
- package/dist/state-explosion.js +65 -283
- package/dist/state-node.js +19 -4
- package/dist/telemetry-attestation.js +55 -0
- package/dist/telemetry-demo.js +15 -3
- package/dist/telemetry-ledger.js +60 -15
- package/dist/topology.js +50 -12
- package/dist/triggers.js +33 -14
- package/dist/trust-audit.js +215 -71
- package/dist/validation.js +328 -0
- package/dist/version.js +1 -1
- package/dist/worker-isolation/helpers.js +51 -0
- package/dist/worker-isolation/paths.js +46 -0
- package/dist/worker-isolation.js +182 -173
- package/docs/agent-delegation-drive.7.md +14 -0
- package/docs/cli-mcp-parity.7.md +5 -0
- package/docs/contract-migration-tooling.7.md +3 -0
- package/docs/control-plane-scheduling.7.md +3 -0
- package/docs/dogfood/resume-drive-real-agent-2026-06-14.md +40 -0
- package/docs/durable-state-and-locking.7.md +5 -0
- package/docs/evidence-adoption-reasoning-chain.7.md +3 -0
- package/docs/execution-backends.7.md +3 -0
- package/docs/index.md +1 -0
- package/docs/launch/launch-kit.md +46 -23
- package/docs/launch/pre-launch-checklist.md +14 -14
- package/docs/multi-agent-cli-mcp-surface.7.md +5 -0
- package/docs/multi-agent-eval-replay-harness.7.md +3 -0
- package/docs/multi-agent-operator-ux.7.md +3 -0
- package/docs/multi-agent-trust-policy-audit.7.md +27 -0
- package/docs/node-snapshot-diff-replay.7.md +3 -0
- package/docs/observability-cost-accounting.7.md +3 -0
- package/docs/project-index.md +23 -6
- package/docs/real-execution-backends.7.md +3 -0
- package/docs/release-and-migration.7.md +5 -0
- package/docs/release-tooling.7.md +35 -2
- package/docs/run-registry-control-plane.7.md +55 -8
- package/docs/run-retention-reclamation.7.md +5 -0
- package/docs/state-explosion-management.7.md +3 -0
- package/docs/team-collaboration.7.md +3 -0
- package/docs/trust-model.md +267 -0
- package/docs/vendor-manifest-loadability.7.md +43 -0
- package/docs/web-desktop-workbench.7.md +3 -0
- package/manifest/plugin.manifest.json +1 -1
- package/manifest/source-context-profiles.json +1 -1
- package/package.json +4 -2
- package/scripts/agents/builtin-templates.json +7 -0
- package/scripts/bump-version.js +5 -11
- package/scripts/canonical-apps-list.js +64 -0
- package/scripts/canonical-apps.js +19 -4
- package/scripts/children/batch-delegate-child.js +58 -0
- package/scripts/children/http-delegate-child.js +39 -0
- package/scripts/dogfood-release.js +1 -1
- package/scripts/golden-path.js +4 -4
- package/scripts/parity-check.js +5 -0
- package/scripts/release-check.js +5 -1
- package/scripts/release-flow.js +181 -5
- package/scripts/version-sync-check.js +5 -8
- package/dist/capability-dispatcher.js +0 -86
package/dist/multi-agent-host.js
CHANGED
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.hostRun = hostRun;
|
|
4
4
|
exports.hostStatus = hostStatus;
|
|
5
5
|
exports.hostStep = hostStep;
|
|
6
|
-
exports.hostAutoStep = hostAutoStep;
|
|
7
6
|
exports.hostBlackboard = hostBlackboard;
|
|
8
7
|
exports.hostScore = hostScore;
|
|
9
8
|
exports.hostSelect = hostSelect;
|
|
@@ -179,24 +178,6 @@ function hostStep(run, options = {}) {
|
|
|
179
178
|
requiredHostAction: "No safe deterministic step is available. Use multi-agent status for the next explicit command."
|
|
180
179
|
});
|
|
181
180
|
}
|
|
182
|
-
/** Auto-step: loop hostStep until blocked, complete, or max iterations reached
|
|
183
|
-
* (v0.1.74). Each iteration performs one deterministic step. Returns the final
|
|
184
|
-
* response and the number of steps taken. */
|
|
185
|
-
function hostAutoStep(run, options = {}) {
|
|
186
|
-
const maxSteps = Number(options.maxSteps || options["max-steps"] || 20);
|
|
187
|
-
const steps = [];
|
|
188
|
-
let response = envelope(run, "step", { performed: "none" });
|
|
189
|
-
for (let i = 0; i < maxSteps; i++) {
|
|
190
|
-
response = hostStep(run, options);
|
|
191
|
-
const performed = response.data?.performed;
|
|
192
|
-
steps.push({ step: i + 1, performed: String(performed || "none") });
|
|
193
|
-
if (performed === "none" || performed === undefined)
|
|
194
|
-
break;
|
|
195
|
-
if (response.data?.requiredHostAction)
|
|
196
|
-
break;
|
|
197
|
-
}
|
|
198
|
-
return { finalResponse: response, stepsTaken: steps.length, steps };
|
|
199
|
-
}
|
|
200
181
|
function hostBlackboard(run, action, options = {}) {
|
|
201
182
|
const topology = optionalSingleActiveTopology(run);
|
|
202
183
|
const blackboardId = resolveHostBlackboardId(run, topology, options);
|
|
@@ -403,22 +384,54 @@ function hostSelect(run, options = {}) {
|
|
|
403
384
|
}
|
|
404
385
|
return envelope(run, "select", { performed: "selected-candidate", data: selection });
|
|
405
386
|
}
|
|
387
|
+
function memoize(compute) {
|
|
388
|
+
let cached;
|
|
389
|
+
return (run) => (cached ??= { value: compute(run) }).value;
|
|
390
|
+
}
|
|
391
|
+
function createHostSummaryCache(run) {
|
|
392
|
+
const topologies = memoize(topology_1.summarizeTopologies);
|
|
393
|
+
const multiAgent = memoize(multi_agent_1.summarizeMultiAgent);
|
|
394
|
+
const blackboard = memoize(coordinator_1.summarizeBlackboard);
|
|
395
|
+
const workers = memoize(operator_ux_1.summarizeOperatorWorkers);
|
|
396
|
+
const candidates = memoize(operator_ux_1.summarizeOperatorCandidates);
|
|
397
|
+
const feedback = memoize(operator_ux_1.summarizeOperatorFeedback);
|
|
398
|
+
const commits = memoize(operator_ux_1.summarizeOperatorCommits);
|
|
399
|
+
const trust = memoize(trust_audit_1.summarizeTrustAudit);
|
|
400
|
+
const operator = memoize(operator_ux_1.summarizeOperatorRun);
|
|
401
|
+
const multiAgentOperator = memoize(multi_agent_operator_ux_1.summarizeMultiAgentOperator);
|
|
402
|
+
const active = memoize(activeTopologies);
|
|
403
|
+
return {
|
|
404
|
+
run,
|
|
405
|
+
topologies: () => topologies(run),
|
|
406
|
+
multiAgent: () => multiAgent(run),
|
|
407
|
+
blackboard: () => blackboard(run),
|
|
408
|
+
workers: () => workers(run),
|
|
409
|
+
candidates: () => candidates(run),
|
|
410
|
+
feedback: () => feedback(run),
|
|
411
|
+
commits: () => commits(run),
|
|
412
|
+
trust: () => trust(run),
|
|
413
|
+
operator: () => operator(run),
|
|
414
|
+
multiAgentOperator: () => multiAgentOperator(run),
|
|
415
|
+
active: () => active(run)
|
|
416
|
+
};
|
|
417
|
+
}
|
|
406
418
|
function envelope(run, command, options = {}) {
|
|
407
|
-
const
|
|
408
|
-
const
|
|
409
|
-
const
|
|
410
|
-
const
|
|
411
|
-
const
|
|
412
|
-
const
|
|
413
|
-
const
|
|
414
|
-
const
|
|
415
|
-
const
|
|
416
|
-
const
|
|
417
|
-
const
|
|
419
|
+
const cache = createHostSummaryCache(run);
|
|
420
|
+
const topologies = cache.topologies();
|
|
421
|
+
const multiAgent = cache.multiAgent();
|
|
422
|
+
const blackboard = cache.blackboard();
|
|
423
|
+
const workers = cache.workers();
|
|
424
|
+
const candidates = cache.candidates();
|
|
425
|
+
const feedback = cache.feedback();
|
|
426
|
+
const commits = cache.commits();
|
|
427
|
+
const trust = cache.trust();
|
|
428
|
+
const operator = cache.operator();
|
|
429
|
+
const multiAgentOperator = cache.multiAgentOperator();
|
|
430
|
+
const active = cache.active();
|
|
418
431
|
const blockedReasons = unique([...operator.blockedReasons, ...(options.extraBlockedReasons || [])]);
|
|
419
|
-
const state = blockedReasons.length ? "blocked" : classifyHostState(run);
|
|
432
|
+
const state = blockedReasons.length ? "blocked" : classifyHostState(run, cache);
|
|
420
433
|
const ids = activeIds(run, active);
|
|
421
|
-
const nextActions = hostNextActions(run, state, active, options.requiredHostAction);
|
|
434
|
+
const nextActions = hostNextActions(run, state, active, options.requiredHostAction, cache);
|
|
422
435
|
return {
|
|
423
436
|
schemaVersion: 1,
|
|
424
437
|
surface: "multi-agent-host",
|
|
@@ -446,12 +459,12 @@ function envelope(run, command, options = {}) {
|
|
|
446
459
|
data: options.data
|
|
447
460
|
};
|
|
448
461
|
}
|
|
449
|
-
function classifyHostState(run) {
|
|
450
|
-
const active =
|
|
451
|
-
const feedback =
|
|
452
|
-
const workers =
|
|
453
|
-
const candidates =
|
|
454
|
-
const commits =
|
|
462
|
+
function classifyHostState(run, cache = createHostSummaryCache(run)) {
|
|
463
|
+
const active = cache.active();
|
|
464
|
+
const feedback = cache.feedback();
|
|
465
|
+
const workers = cache.workers();
|
|
466
|
+
const candidates = cache.candidates();
|
|
467
|
+
const commits = cache.commits();
|
|
455
468
|
if (!active.length && !(run.multiAgent?.runs || []).length)
|
|
456
469
|
return "needs-run";
|
|
457
470
|
if (feedback.open.some((entry) => !entry.retryable))
|
|
@@ -494,7 +507,7 @@ function activeIds(run, active) {
|
|
|
494
507
|
auditEventIds: unique(active.flatMap((entry) => entry.links.auditEventIds))
|
|
495
508
|
};
|
|
496
509
|
}
|
|
497
|
-
function hostNextActions(run, state, active, requiredHostAction) {
|
|
510
|
+
function hostNextActions(run, state, active, requiredHostAction, cache = createHostSummaryCache(run)) {
|
|
498
511
|
if (requiredHostAction)
|
|
499
512
|
return [{ command: "host-action", reason: requiredHostAction, priority: "high" }];
|
|
500
513
|
const runId = run.id;
|
|
@@ -512,7 +525,7 @@ function hostNextActions(run, state, active, requiredHostAction) {
|
|
|
512
525
|
case "ready-for-selection":
|
|
513
526
|
return [{ command: `node scripts/cw.js multi-agent select ${runId} --candidate <candidate-id> --reason "<rationale>"`, reason: "Select a scored candidate after verifier gates pass.", priority: "high" }];
|
|
514
527
|
case "ready-for-commit": {
|
|
515
|
-
const ready =
|
|
528
|
+
const ready = cache.candidates().readyForCommit[0];
|
|
516
529
|
return [{ command: `node scripts/cw.js commit ${runId} --selection ${ready.selectionId} --reason "<verified rationale>"`, reason: "Create a verifier-gated CW state commit.", priority: "high" }];
|
|
517
530
|
}
|
|
518
531
|
case "complete":
|
|
@@ -15,6 +15,7 @@ const coordinator_1 = require("./coordinator");
|
|
|
15
15
|
const multi_agent_1 = require("./multi-agent");
|
|
16
16
|
const topology_1 = require("./topology");
|
|
17
17
|
const trust_audit_1 = require("./trust-audit");
|
|
18
|
+
const validation_1 = require("./validation");
|
|
18
19
|
function summarizeMultiAgentOperator(run) {
|
|
19
20
|
const topologies = (0, topology_1.summarizeTopologies)(run);
|
|
20
21
|
const multiAgent = (0, multi_agent_1.summarizeMultiAgent)(run);
|
|
@@ -447,7 +448,7 @@ function readScores(run, candidateId) {
|
|
|
447
448
|
.readdirSync(dir)
|
|
448
449
|
.filter((file) => file.endsWith(".json"))
|
|
449
450
|
.sort()
|
|
450
|
-
.map((file) => JSON.parse(node_fs_1.default.readFileSync(node_path_1.default.join(dir, file), "utf8")));
|
|
451
|
+
.map((file) => (0, validation_1.validateCandidateScore)(JSON.parse(node_fs_1.default.readFileSync(node_path_1.default.join(dir, file), "utf8"))));
|
|
451
452
|
}
|
|
452
453
|
function scorePath(run, candidateId, scoreId) {
|
|
453
454
|
const file = node_path_1.default.join(run.paths.candidatesDir || node_path_1.default.join(run.paths.runDir, "candidates"), safeFileName(candidateId), "scores", `${safeFileName(scoreId)}.json`);
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.policyForRole = policyForRole;
|
|
7
4
|
exports.policyForGroup = policyForGroup;
|
|
@@ -16,7 +13,7 @@ exports.summarizeMultiAgentTrust = summarizeMultiAgentTrust;
|
|
|
16
13
|
exports.hasAcceptedJudgeRationale = hasAcceptedJudgeRationale;
|
|
17
14
|
exports.sourceForActor = sourceForActor;
|
|
18
15
|
exports.hashText = hashText;
|
|
19
|
-
const
|
|
16
|
+
const execution_backend_1 = require("./execution-backend");
|
|
20
17
|
const trust_audit_1 = require("./trust-audit");
|
|
21
18
|
function policyForRole(role) {
|
|
22
19
|
const topologyRole = String(role.metadata?.topologyRoleId || role.title || "").toLowerCase();
|
|
@@ -294,8 +291,11 @@ function sourceForActor(actor) {
|
|
|
294
291
|
return "runtime-derived";
|
|
295
292
|
return "cw-validated";
|
|
296
293
|
}
|
|
294
|
+
// Delegates to the shared execution-backend sha256 (F10 dedup). Byte-identical:
|
|
295
|
+
// both emit `sha256:<hex>` and Node's Hash.update(string) defaults to utf8, the
|
|
296
|
+
// same encoding the shared helper passes explicitly.
|
|
297
297
|
function hashText(value) {
|
|
298
|
-
return
|
|
298
|
+
return (0, execution_backend_1.sha256)(value);
|
|
299
299
|
}
|
|
300
300
|
function resolvePolicy(run, input) {
|
|
301
301
|
const membership = input.membershipId ? run.multiAgent?.memberships.find((entry) => entry.id === input.membershipId) : undefined;
|