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.
Files changed (110) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/README.md +42 -2
  4. package/apps/architecture-review/app.json +1 -1
  5. package/apps/architecture-review-fast/app.json +1 -1
  6. package/apps/end-to-end-golden-path/app.json +1 -1
  7. package/apps/pr-review-fix-ci/app.json +1 -1
  8. package/apps/release-cut/app.json +1 -1
  9. package/apps/research-synthesis/app.json +1 -1
  10. package/dist/agent-config.js +21 -7
  11. package/dist/candidate-scoring.js +42 -22
  12. package/dist/capability-core.js +94 -17
  13. package/dist/capability-registry.js +138 -171
  14. package/dist/cli.js +90 -100
  15. package/dist/collaboration.js +5 -6
  16. package/dist/commit.js +20 -6
  17. package/dist/compare.js +18 -0
  18. package/dist/coordinator/classify.js +45 -0
  19. package/dist/coordinator/paths.js +42 -0
  20. package/dist/coordinator/util.js +129 -0
  21. package/dist/coordinator.js +127 -300
  22. package/dist/dispatch.js +35 -0
  23. package/dist/drive.js +7 -7
  24. package/dist/error-feedback.js +8 -4
  25. package/dist/evidence-reasoning.js +1 -1
  26. package/dist/execution-backend/agent.js +331 -0
  27. package/dist/execution-backend/probes.js +96 -0
  28. package/dist/execution-backend/util.js +47 -0
  29. package/dist/execution-backend.js +67 -420
  30. package/dist/mcp-server.js +34 -173
  31. package/dist/multi-agent/graph.js +84 -0
  32. package/dist/multi-agent/helpers.js +145 -0
  33. package/dist/multi-agent/paths.js +22 -0
  34. package/dist/multi-agent-eval/format.js +194 -0
  35. package/dist/multi-agent-eval/normalize.js +51 -0
  36. package/dist/multi-agent-eval.js +39 -244
  37. package/dist/multi-agent-host.js +0 -19
  38. package/dist/multi-agent.js +125 -314
  39. package/dist/node-snapshot.js +3 -3
  40. package/dist/observability/format.js +61 -0
  41. package/dist/observability/intake.js +98 -0
  42. package/dist/observability.js +14 -160
  43. package/dist/operator-ux/format.js +364 -0
  44. package/dist/operator-ux.js +22 -363
  45. package/dist/orchestrator/report.js +8 -0
  46. package/dist/orchestrator.js +25 -8
  47. package/dist/reclamation.js +26 -21
  48. package/dist/run-export.js +138 -14
  49. package/dist/run-registry/derive.js +172 -0
  50. package/dist/run-registry/format.js +124 -0
  51. package/dist/run-registry/gc.js +251 -0
  52. package/dist/run-registry/policy.js +16 -0
  53. package/dist/run-registry/queue.js +116 -0
  54. package/dist/run-registry.js +78 -593
  55. package/dist/run-state-schema.js +1 -0
  56. package/dist/sandbox-profile.js +43 -2
  57. package/dist/state-explosion/format.js +159 -0
  58. package/dist/state-explosion/helpers.js +82 -0
  59. package/dist/state-explosion.js +65 -283
  60. package/dist/state-node.js +19 -4
  61. package/dist/telemetry-attestation.js +55 -0
  62. package/dist/telemetry-demo.js +15 -3
  63. package/dist/telemetry-ledger.js +60 -15
  64. package/dist/topology.js +25 -8
  65. package/dist/triggers.js +33 -14
  66. package/dist/trust-audit.js +145 -33
  67. package/dist/version.js +1 -1
  68. package/dist/worker-isolation/helpers.js +51 -0
  69. package/dist/worker-isolation/paths.js +46 -0
  70. package/dist/worker-isolation.js +39 -115
  71. package/docs/agent-delegation-drive.7.md +13 -0
  72. package/docs/cli-mcp-parity.7.md +4 -0
  73. package/docs/contract-migration-tooling.7.md +2 -0
  74. package/docs/control-plane-scheduling.7.md +2 -0
  75. package/docs/dogfood/resume-drive-real-agent-2026-06-14.md +40 -0
  76. package/docs/durable-state-and-locking.7.md +4 -0
  77. package/docs/evidence-adoption-reasoning-chain.7.md +2 -0
  78. package/docs/execution-backends.7.md +2 -0
  79. package/docs/index.md +1 -0
  80. package/docs/launch/launch-kit.md +46 -23
  81. package/docs/launch/pre-launch-checklist.md +14 -14
  82. package/docs/multi-agent-cli-mcp-surface.7.md +4 -0
  83. package/docs/multi-agent-eval-replay-harness.7.md +2 -0
  84. package/docs/multi-agent-operator-ux.7.md +2 -0
  85. package/docs/multi-agent-trust-policy-audit.7.md +27 -0
  86. package/docs/node-snapshot-diff-replay.7.md +2 -0
  87. package/docs/observability-cost-accounting.7.md +2 -0
  88. package/docs/project-index.md +18 -5
  89. package/docs/real-execution-backends.7.md +2 -0
  90. package/docs/release-and-migration.7.md +4 -0
  91. package/docs/release-tooling.7.md +2 -0
  92. package/docs/run-registry-control-plane.7.md +54 -8
  93. package/docs/run-retention-reclamation.7.md +4 -0
  94. package/docs/state-explosion-management.7.md +2 -0
  95. package/docs/team-collaboration.7.md +2 -0
  96. package/docs/trust-model.md +267 -0
  97. package/docs/vendor-manifest-loadability.7.md +43 -0
  98. package/docs/web-desktop-workbench.7.md +2 -0
  99. package/manifest/plugin.manifest.json +1 -1
  100. package/package.json +4 -2
  101. package/scripts/agents/builtin-templates.json +7 -0
  102. package/scripts/bump-version.js +5 -11
  103. package/scripts/canonical-apps-list.js +64 -0
  104. package/scripts/canonical-apps.js +19 -4
  105. package/scripts/dogfood-release.js +1 -1
  106. package/scripts/golden-path.js +4 -4
  107. package/scripts/parity-check.js +5 -0
  108. package/scripts/release-check.js +5 -1
  109. package/scripts/version-sync-check.js +5 -8
  110. 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
+ }