cool-workflow 0.1.80 → 0.1.81
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 +42 -22
- package/dist/capability-core.js +94 -17
- package/dist/capability-registry.js +138 -171
- package/dist/cli.js +90 -100
- package/dist/collaboration.js +5 -6
- package/dist/commit.js +20 -6
- 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 +129 -0
- package/dist/coordinator.js +127 -300
- package/dist/dispatch.js +35 -0
- package/dist/drive.js +7 -7
- package/dist/error-feedback.js +8 -4
- package/dist/evidence-reasoning.js +1 -1
- package/dist/execution-backend/agent.js +331 -0
- package/dist/execution-backend/probes.js +96 -0
- package/dist/execution-backend/util.js +47 -0
- package/dist/execution-backend.js +67 -420
- package/dist/mcp-server.js +34 -173
- package/dist/multi-agent/graph.js +84 -0
- package/dist/multi-agent/helpers.js +145 -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 +39 -244
- package/dist/multi-agent-host.js +0 -19
- package/dist/multi-agent.js +125 -314
- package/dist/node-snapshot.js +3 -3
- 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/report.js +8 -0
- package/dist/orchestrator.js +25 -8
- package/dist/reclamation.js +26 -21
- 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/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 +25 -8
- package/dist/triggers.js +33 -14
- package/dist/trust-audit.js +145 -33
- 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 +39 -115
- package/docs/agent-delegation-drive.7.md +13 -0
- package/docs/cli-mcp-parity.7.md +4 -0
- package/docs/contract-migration-tooling.7.md +2 -0
- package/docs/control-plane-scheduling.7.md +2 -0
- package/docs/dogfood/resume-drive-real-agent-2026-06-14.md +40 -0
- package/docs/durable-state-and-locking.7.md +4 -0
- package/docs/evidence-adoption-reasoning-chain.7.md +2 -0
- package/docs/execution-backends.7.md +2 -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 +4 -0
- package/docs/multi-agent-eval-replay-harness.7.md +2 -0
- package/docs/multi-agent-operator-ux.7.md +2 -0
- package/docs/multi-agent-trust-policy-audit.7.md +27 -0
- package/docs/node-snapshot-diff-replay.7.md +2 -0
- package/docs/observability-cost-accounting.7.md +2 -0
- package/docs/project-index.md +18 -5
- package/docs/real-execution-backends.7.md +2 -0
- package/docs/release-and-migration.7.md +4 -0
- package/docs/release-tooling.7.md +2 -0
- package/docs/run-registry-control-plane.7.md +54 -8
- package/docs/run-retention-reclamation.7.md +4 -0
- package/docs/state-explosion-management.7.md +2 -0
- package/docs/team-collaboration.7.md +2 -0
- package/docs/trust-model.md +267 -0
- package/docs/vendor-manifest-loadability.7.md +43 -0
- package/docs/web-desktop-workbench.7.md +2 -0
- package/manifest/plugin.manifest.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/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/version-sync-check.js +5 -8
- package/dist/capability-dispatcher.js +0 -86
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.checksumFile = checksumFile;
|
|
7
|
+
exports.assertUnique = assertUnique;
|
|
8
|
+
exports.assertNoRecordPathCollisions = assertNoRecordPathCollisions;
|
|
9
|
+
exports.indexRow = indexRow;
|
|
10
|
+
exports.compareRecords = compareRecords;
|
|
11
|
+
exports.uniqueEdges = uniqueEdges;
|
|
12
|
+
exports.createId = createId;
|
|
13
|
+
exports.touch = touch;
|
|
14
|
+
exports.timestamp = timestamp;
|
|
15
|
+
exports.unique = unique;
|
|
16
|
+
exports.sortTags = sortTags;
|
|
17
|
+
exports.truncate = truncate;
|
|
18
|
+
exports.compact = compact;
|
|
19
|
+
exports.scrub = scrub;
|
|
20
|
+
// Pure, self-contained primitive helpers for the coordinator/blackboard layer
|
|
21
|
+
// (FreeBSD-audit R-carve). Carved out of coordinator.ts so the module no longer
|
|
22
|
+
// bundles the generic id/string/redaction utilities alongside the stateful
|
|
23
|
+
// blackboard operations. Re-exported from coordinator.ts to keep the public
|
|
24
|
+
// surface byte-identical.
|
|
25
|
+
//
|
|
26
|
+
// BEHAVIOR-PRESERVING — pure code movement, zero logic change. Every function
|
|
27
|
+
// here is a function of its inputs only: no WorkflowRun, no blackboard state, no
|
|
28
|
+
// filesystem mutation. They depend on node:crypto / node:fs only for checksum +
|
|
29
|
+
// file read, and on ./compare + ./state for the byte comparator and safe file
|
|
30
|
+
// name (the same helpers the originals used).
|
|
31
|
+
const node_crypto_1 = __importDefault(require("node:crypto"));
|
|
32
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
33
|
+
const compare_1 = require("../compare");
|
|
34
|
+
const state_1 = require("../state");
|
|
35
|
+
function checksumFile(file) {
|
|
36
|
+
return `sha256:${node_crypto_1.default.createHash("sha256").update(node_fs_1.default.readFileSync(file)).digest("hex")}`;
|
|
37
|
+
}
|
|
38
|
+
function assertUnique(items, id, label) {
|
|
39
|
+
if (items.some((item) => item.id === id))
|
|
40
|
+
throw new Error(`Duplicate ${label} id: ${id}`);
|
|
41
|
+
}
|
|
42
|
+
function assertNoRecordPathCollisions(label, records) {
|
|
43
|
+
const seen = new Map();
|
|
44
|
+
for (const record of records) {
|
|
45
|
+
const safe = (0, state_1.safeFileName)(record.id);
|
|
46
|
+
const existing = seen.get(safe);
|
|
47
|
+
if (existing && existing !== record.id) {
|
|
48
|
+
throw new Error(`${label} ids ${existing} and ${record.id} collide on safe file name ${safe}`);
|
|
49
|
+
}
|
|
50
|
+
seen.set(safe, record.id);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function indexRow(record) {
|
|
54
|
+
return { id: record.id, blackboardId: record.blackboardId, topicId: record.topicId, status: record.status, updatedAt: record.updatedAt };
|
|
55
|
+
}
|
|
56
|
+
function compareRecords(left, right) {
|
|
57
|
+
return (0, compare_1.compareBytes)(left.createdAt, right.createdAt) || (0, compare_1.compareBytes)(left.id, right.id);
|
|
58
|
+
}
|
|
59
|
+
function uniqueEdges(edges) {
|
|
60
|
+
const seen = new Set();
|
|
61
|
+
const result = [];
|
|
62
|
+
for (const edge of edges) {
|
|
63
|
+
const key = `${edge.from}\0${edge.to}\0${edge.label || ""}`;
|
|
64
|
+
if (seen.has(key))
|
|
65
|
+
continue;
|
|
66
|
+
seen.add(key);
|
|
67
|
+
result.push(edge);
|
|
68
|
+
}
|
|
69
|
+
return result;
|
|
70
|
+
}
|
|
71
|
+
// Deterministic record id (FreeBSD-audit L12/L13): the record's POSITION in its
|
|
72
|
+
// per-run blackboard collection, threaded from the call site. No wall-clock stamp,
|
|
73
|
+
// no PRNG suffix — replaying the same coordination mints byte-identical ids, so
|
|
74
|
+
// snapshot/replay digests match. Each call site already asserts the minted id is
|
|
75
|
+
// unique within its collection, and these collections only ever append.
|
|
76
|
+
function createId(prefix, seq) {
|
|
77
|
+
return `${prefix}-${String(seq).padStart(4, "0")}`;
|
|
78
|
+
}
|
|
79
|
+
function touch(record) {
|
|
80
|
+
record.updatedAt = timestamp();
|
|
81
|
+
return record;
|
|
82
|
+
}
|
|
83
|
+
function timestamp() {
|
|
84
|
+
return new Date().toISOString();
|
|
85
|
+
}
|
|
86
|
+
function unique(values) {
|
|
87
|
+
return Array.from(new Set(values.filter(Boolean))).sort();
|
|
88
|
+
}
|
|
89
|
+
function sortTags(values) {
|
|
90
|
+
return unique(values || []);
|
|
91
|
+
}
|
|
92
|
+
function truncate(value) {
|
|
93
|
+
return value.length > 64 ? `${value.slice(0, 61)}...` : value;
|
|
94
|
+
}
|
|
95
|
+
function compact(value) {
|
|
96
|
+
return Object.fromEntries(Object.entries(value).filter(([, entry]) => entry !== undefined && (!Array.isArray(entry) || entry.length > 0)));
|
|
97
|
+
}
|
|
98
|
+
// Recursive secret redaction (v0.1.40 self-audit P3): the previous scrub only
|
|
99
|
+
// inspected TOP-LEVEL keys, so a secret nested under an allowed key
|
|
100
|
+
// (e.g. `metadata.config.token`) leaked into the recorded coordinator decision.
|
|
101
|
+
// Now we recurse into nested objects and arrays so a secret-named key at any depth
|
|
102
|
+
// is dropped and an obvious credential value is redacted.
|
|
103
|
+
const SECRET_KEY_RE = /secret|token|password|credential|authorization|api[_-]?key|env/i;
|
|
104
|
+
const SECRET_VALUE_RE = /secret|token|password|credential/i;
|
|
105
|
+
function scrubValue(value) {
|
|
106
|
+
if (Array.isArray(value))
|
|
107
|
+
return value.map(scrubValue);
|
|
108
|
+
if (value && typeof value === "object")
|
|
109
|
+
return scrub(value);
|
|
110
|
+
if (typeof value === "string" && SECRET_VALUE_RE.test(value))
|
|
111
|
+
return "[redacted]";
|
|
112
|
+
return value;
|
|
113
|
+
}
|
|
114
|
+
function scrub(value) {
|
|
115
|
+
if (!value)
|
|
116
|
+
return undefined;
|
|
117
|
+
const result = {};
|
|
118
|
+
for (const [key, entry] of Object.entries(value)) {
|
|
119
|
+
if (entry === undefined)
|
|
120
|
+
continue;
|
|
121
|
+
if (SECRET_KEY_RE.test(key)) {
|
|
122
|
+
result[key] = "[redacted]";
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
result[key] = scrubValue(entry);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return Object.keys(result).length ? result : undefined;
|
|
129
|
+
}
|