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.
Files changed (122) 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 +62 -48
  12. package/dist/capability-core.js +152 -96
  13. package/dist/capability-registry.js +160 -174
  14. package/dist/cli.js +90 -100
  15. package/dist/collaboration.js +5 -6
  16. package/dist/commit.js +232 -209
  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 +126 -0
  21. package/dist/coordinator.js +127 -300
  22. package/dist/dispatch.js +46 -3
  23. package/dist/drive.js +7 -7
  24. package/dist/error-feedback.js +8 -4
  25. package/dist/evidence-reasoning.js +5 -2
  26. package/dist/execution-backend/agent.js +294 -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 +77 -450
  30. package/dist/gates.js +48 -0
  31. package/dist/mcp-server.js +34 -173
  32. package/dist/multi-agent/graph.js +84 -0
  33. package/dist/multi-agent/helpers.js +141 -0
  34. package/dist/multi-agent/ids.js +20 -0
  35. package/dist/multi-agent/paths.js +22 -0
  36. package/dist/multi-agent-eval/format.js +194 -0
  37. package/dist/multi-agent-eval/normalize.js +51 -0
  38. package/dist/multi-agent-eval.js +63 -242
  39. package/dist/multi-agent-host.js +53 -40
  40. package/dist/multi-agent-operator-ux.js +2 -1
  41. package/dist/multi-agent-trust.js +5 -5
  42. package/dist/multi-agent.js +125 -314
  43. package/dist/node-projection.js +59 -0
  44. package/dist/node-snapshot.js +11 -21
  45. package/dist/observability/format.js +61 -0
  46. package/dist/observability/intake.js +98 -0
  47. package/dist/observability.js +14 -160
  48. package/dist/operator-ux/format.js +364 -0
  49. package/dist/operator-ux.js +22 -363
  50. package/dist/orchestrator/lifecycle-operations.js +22 -1
  51. package/dist/orchestrator/report.js +8 -0
  52. package/dist/orchestrator.js +41 -10
  53. package/dist/reclamation.js +32 -55
  54. package/dist/run-export.js +138 -14
  55. package/dist/run-registry/derive.js +172 -0
  56. package/dist/run-registry/format.js +124 -0
  57. package/dist/run-registry/gc.js +251 -0
  58. package/dist/run-registry/policy.js +16 -0
  59. package/dist/run-registry/queue.js +116 -0
  60. package/dist/run-registry.js +78 -593
  61. package/dist/run-state-schema.js +1 -0
  62. package/dist/sandbox-profile.js +43 -2
  63. package/dist/scheduler.js +34 -4
  64. package/dist/state-explosion/format.js +159 -0
  65. package/dist/state-explosion/helpers.js +82 -0
  66. package/dist/state-explosion.js +65 -283
  67. package/dist/state-node.js +19 -4
  68. package/dist/telemetry-attestation.js +55 -0
  69. package/dist/telemetry-demo.js +15 -3
  70. package/dist/telemetry-ledger.js +60 -15
  71. package/dist/topology.js +50 -12
  72. package/dist/triggers.js +33 -14
  73. package/dist/trust-audit.js +215 -71
  74. package/dist/validation.js +328 -0
  75. package/dist/version.js +1 -1
  76. package/dist/worker-isolation/helpers.js +51 -0
  77. package/dist/worker-isolation/paths.js +46 -0
  78. package/dist/worker-isolation.js +182 -173
  79. package/docs/agent-delegation-drive.7.md +14 -0
  80. package/docs/cli-mcp-parity.7.md +5 -0
  81. package/docs/contract-migration-tooling.7.md +3 -0
  82. package/docs/control-plane-scheduling.7.md +3 -0
  83. package/docs/dogfood/resume-drive-real-agent-2026-06-14.md +40 -0
  84. package/docs/durable-state-and-locking.7.md +5 -0
  85. package/docs/evidence-adoption-reasoning-chain.7.md +3 -0
  86. package/docs/execution-backends.7.md +3 -0
  87. package/docs/index.md +1 -0
  88. package/docs/launch/launch-kit.md +46 -23
  89. package/docs/launch/pre-launch-checklist.md +14 -14
  90. package/docs/multi-agent-cli-mcp-surface.7.md +5 -0
  91. package/docs/multi-agent-eval-replay-harness.7.md +3 -0
  92. package/docs/multi-agent-operator-ux.7.md +3 -0
  93. package/docs/multi-agent-trust-policy-audit.7.md +27 -0
  94. package/docs/node-snapshot-diff-replay.7.md +3 -0
  95. package/docs/observability-cost-accounting.7.md +3 -0
  96. package/docs/project-index.md +23 -6
  97. package/docs/real-execution-backends.7.md +3 -0
  98. package/docs/release-and-migration.7.md +5 -0
  99. package/docs/release-tooling.7.md +35 -2
  100. package/docs/run-registry-control-plane.7.md +55 -8
  101. package/docs/run-retention-reclamation.7.md +5 -0
  102. package/docs/state-explosion-management.7.md +3 -0
  103. package/docs/team-collaboration.7.md +3 -0
  104. package/docs/trust-model.md +267 -0
  105. package/docs/vendor-manifest-loadability.7.md +43 -0
  106. package/docs/web-desktop-workbench.7.md +3 -0
  107. package/manifest/plugin.manifest.json +1 -1
  108. package/manifest/source-context-profiles.json +1 -1
  109. package/package.json +4 -2
  110. package/scripts/agents/builtin-templates.json +7 -0
  111. package/scripts/bump-version.js +5 -11
  112. package/scripts/canonical-apps-list.js +64 -0
  113. package/scripts/canonical-apps.js +19 -4
  114. package/scripts/children/batch-delegate-child.js +58 -0
  115. package/scripts/children/http-delegate-child.js +39 -0
  116. package/scripts/dogfood-release.js +1 -1
  117. package/scripts/golden-path.js +4 -4
  118. package/scripts/parity-check.js +5 -0
  119. package/scripts/release-check.js +5 -1
  120. package/scripts/release-flow.js +181 -5
  121. package/scripts/version-sync-check.js +5 -8
  122. package/dist/capability-dispatcher.js +0 -86
@@ -0,0 +1,126 @@
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.createId = void 0;
7
+ exports.checksumFile = checksumFile;
8
+ exports.assertUnique = assertUnique;
9
+ exports.assertNoRecordPathCollisions = assertNoRecordPathCollisions;
10
+ exports.indexRow = indexRow;
11
+ exports.compareRecords = compareRecords;
12
+ exports.uniqueEdges = uniqueEdges;
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 — single source of truth in ../multi-agent/ids.
72
+ // Re-exported here so coordinator.ts importers stay byte-unchanged (F10 dedup:
73
+ // the multi-agent kernel shares the exact same helper).
74
+ var ids_1 = require("../multi-agent/ids");
75
+ Object.defineProperty(exports, "createId", { enumerable: true, get: function () { return ids_1.createId; } });
76
+ function touch(record) {
77
+ record.updatedAt = timestamp();
78
+ return record;
79
+ }
80
+ function timestamp() {
81
+ return new Date().toISOString();
82
+ }
83
+ function unique(values) {
84
+ return Array.from(new Set(values.filter(Boolean))).sort();
85
+ }
86
+ function sortTags(values) {
87
+ return unique(values || []);
88
+ }
89
+ function truncate(value) {
90
+ return value.length > 64 ? `${value.slice(0, 61)}...` : value;
91
+ }
92
+ function compact(value) {
93
+ return Object.fromEntries(Object.entries(value).filter(([, entry]) => entry !== undefined && (!Array.isArray(entry) || entry.length > 0)));
94
+ }
95
+ // Recursive secret redaction (v0.1.40 self-audit P3): the previous scrub only
96
+ // inspected TOP-LEVEL keys, so a secret nested under an allowed key
97
+ // (e.g. `metadata.config.token`) leaked into the recorded coordinator decision.
98
+ // Now we recurse into nested objects and arrays so a secret-named key at any depth
99
+ // is dropped and an obvious credential value is redacted.
100
+ const SECRET_KEY_RE = /secret|token|password|credential|authorization|api[_-]?key|env/i;
101
+ const SECRET_VALUE_RE = /secret|token|password|credential/i;
102
+ function scrubValue(value) {
103
+ if (Array.isArray(value))
104
+ return value.map(scrubValue);
105
+ if (value && typeof value === "object")
106
+ return scrub(value);
107
+ if (typeof value === "string" && SECRET_VALUE_RE.test(value))
108
+ return "[redacted]";
109
+ return value;
110
+ }
111
+ function scrub(value) {
112
+ if (!value)
113
+ return undefined;
114
+ const result = {};
115
+ for (const [key, entry] of Object.entries(value)) {
116
+ if (entry === undefined)
117
+ continue;
118
+ if (SECRET_KEY_RE.test(key)) {
119
+ result[key] = "[redacted]";
120
+ }
121
+ else {
122
+ result[key] = scrubValue(entry);
123
+ }
124
+ }
125
+ return Object.keys(result).length ? result : undefined;
126
+ }