cool-workflow 0.1.79 → 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 +51 -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/agent-config.js +21 -7
- package/dist/candidate-scoring.js +42 -22
- package/dist/capability-core.js +132 -17
- package/dist/capability-registry.js +138 -168
- package/dist/cli.js +97 -98
- 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 +79 -6
- package/dist/error-feedback.js +8 -4
- package/dist/evidence-reasoning.js +3 -3
- 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 +73 -421
- package/dist/mcp-server.js +79 -183
- 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/lifecycle-operations.js +2 -1
- package/dist/orchestrator/report.js +8 -0
- package/dist/orchestrator.js +26 -9
- package/dist/reclamation.js +26 -21
- package/dist/run-export.js +494 -25
- 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 +89 -597
- 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 +165 -304
- 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 +71 -0
- package/docs/canonical-workflow-apps.7.md +37 -0
- package/docs/cli-mcp-parity.7.md +16 -0
- package/docs/contract-migration-tooling.7.md +6 -0
- package/docs/control-plane-scheduling.7.md +6 -0
- package/docs/dogfood/resume-drive-real-agent-2026-06-14.md +40 -0
- package/docs/durable-state-and-locking.7.md +8 -0
- package/docs/evidence-adoption-reasoning-chain.7.md +6 -0
- package/docs/execution-backends.7.md +6 -0
- package/docs/index.md +2 -0
- package/docs/launch/demo.tape +28 -0
- package/docs/launch/launch-kit.md +96 -17
- package/docs/launch/pre-launch-checklist.md +53 -0
- package/docs/multi-agent-cli-mcp-surface.7.md +8 -0
- package/docs/multi-agent-eval-replay-harness.7.md +6 -0
- package/docs/multi-agent-operator-ux.7.md +6 -0
- package/docs/multi-agent-trust-policy-audit.7.md +27 -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 +27 -6
- package/docs/real-execution-backends.7.md +6 -0
- package/docs/release-and-migration.7.md +8 -0
- package/docs/release-tooling.7.md +6 -0
- package/docs/routines.md +23 -0
- package/docs/run-registry-control-plane.7.md +89 -2
- package/docs/run-retention-reclamation.7.md +8 -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/trust-model.md +267 -0
- package/docs/unix-principles.md +49 -1
- package/docs/vendor-manifest-loadability.7.md +43 -0
- 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 +4 -1
- package/scripts/agents/builtin-templates.json +7 -0
- package/scripts/agents/claude-p-agent.js +129 -43
- package/scripts/architecture-review-fast.js +362 -0
- package/scripts/bump-version.js +5 -10
- package/scripts/canonical-apps-list.js +64 -0
- package/scripts/canonical-apps.js +36 -4
- package/scripts/coverage-gate.js +211 -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/source-context.js +291 -0
- package/scripts/version-sync-check.js +5 -7
- 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/capability-dispatcher.js +0 -86
package/dist/reclamation.js
CHANGED
|
@@ -29,7 +29,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
29
29
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
30
|
};
|
|
31
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
exports.ReclamationError = exports.ReclamationAbort = exports.SKELETON_REQUIRED_KEYS =
|
|
32
|
+
exports.ReclamationError = exports.ReclamationAbort = exports.SKELETON_REQUIRED_KEYS = void 0;
|
|
33
33
|
exports.sha256OfString = sha256OfString;
|
|
34
34
|
exports.sha256OfFile = sha256OfFile;
|
|
35
35
|
exports.dirBytes = dirBytes;
|
|
@@ -56,7 +56,7 @@ const multi_agent_eval_1 = require("./multi-agent-eval");
|
|
|
56
56
|
const node_snapshot_1 = require("./node-snapshot");
|
|
57
57
|
const state_1 = require("./state");
|
|
58
58
|
const trust_audit_1 = require("./trust-audit");
|
|
59
|
-
|
|
59
|
+
const compare_1 = require("./compare");
|
|
60
60
|
/** The skeleton schema is the contract for what MUST survive every reclamation.
|
|
61
61
|
* Machine-checkable via validateSkeleton(). If extraction can't produce all of
|
|
62
62
|
* these, reclamation fails closed and frees nothing. */
|
|
@@ -135,7 +135,7 @@ function contentDigest(p) {
|
|
|
135
135
|
return sha256OfFile(p);
|
|
136
136
|
const parts = [];
|
|
137
137
|
const walk = (dir, rel) => {
|
|
138
|
-
for (const entry of node_fs_1.default.readdirSync(dir, { withFileTypes: true }).sort((a, b) => a.name
|
|
138
|
+
for (const entry of node_fs_1.default.readdirSync(dir, { withFileTypes: true }).sort((a, b) => (0, compare_1.compareBytes)(a.name, b.name))) {
|
|
139
139
|
const abs = node_path_1.default.join(dir, entry.name);
|
|
140
140
|
const r = node_path_1.default.join(rel, entry.name);
|
|
141
141
|
if (entry.isDirectory())
|
|
@@ -261,7 +261,7 @@ function extractSkeleton(run) {
|
|
|
261
261
|
}
|
|
262
262
|
const evidenceDigests = [...evidenceMap.entries()]
|
|
263
263
|
.map(([ref, digest]) => ({ ref, digest }))
|
|
264
|
-
.sort((a, b) => a.ref
|
|
264
|
+
.sort((a, b) => (0, compare_1.compareBytes)(a.ref, b.ref));
|
|
265
265
|
const eventLog = auditEventLogPath(run);
|
|
266
266
|
const auditLogDigest = node_fs_1.default.existsSync(eventLog) ? sha256OfFile(eventLog) : sha256OfString("");
|
|
267
267
|
const events = node_fs_1.default.existsSync(eventLog)
|
|
@@ -287,7 +287,7 @@ function extractSkeleton(run) {
|
|
|
287
287
|
};
|
|
288
288
|
const collaboration = run.collaboration;
|
|
289
289
|
const collaborationLog = {
|
|
290
|
-
digest: sha256OfString((0, multi_agent_eval_1.
|
|
290
|
+
digest: sha256OfString((0, multi_agent_eval_1.replayStableStringify)(collaboration || {})),
|
|
291
291
|
approvals: collaboration?.approvals?.length || 0,
|
|
292
292
|
comments: collaboration?.comments?.length || 0,
|
|
293
293
|
handoffs: collaboration?.handoffs?.length || 0
|
|
@@ -414,12 +414,12 @@ function snapshotProjectionDigest(node) {
|
|
|
414
414
|
contractId: node.contractId,
|
|
415
415
|
metadata: node.metadata
|
|
416
416
|
});
|
|
417
|
-
return sha256OfString((0, multi_agent_eval_1.
|
|
417
|
+
return sha256OfString((0, multi_agent_eval_1.replayStableStringify)(body));
|
|
418
418
|
}
|
|
419
419
|
/** Body digest of the RETAINED node (lives in state.json). The reconstruction
|
|
420
420
|
* verifier re-derives the projection from this retained input. */
|
|
421
421
|
function nodeBodyDigest(node) {
|
|
422
|
-
return sha256OfString((0, multi_agent_eval_1.
|
|
422
|
+
return sha256OfString((0, multi_agent_eval_1.replayStableStringify)(rawNodeBody(node)));
|
|
423
423
|
}
|
|
424
424
|
function rawNodeBody(node) {
|
|
425
425
|
return {
|
|
@@ -449,7 +449,6 @@ function planReclamation(run, policy = {}) {
|
|
|
449
449
|
// freeable once the result node's worker-result artifact is re-pointed.
|
|
450
450
|
let reclaimedScratch = false;
|
|
451
451
|
if (!policy.keepScratch) {
|
|
452
|
-
const workersDir = run.paths.workersDir || node_path_1.default.join(runDir, "workers");
|
|
453
452
|
for (const scope of run.workers || []) {
|
|
454
453
|
const workerDir = scope.workerDir;
|
|
455
454
|
if (!workerDir || !node_fs_1.default.existsSync(workerDir))
|
|
@@ -472,7 +471,6 @@ function planReclamation(run, policy = {}) {
|
|
|
472
471
|
});
|
|
473
472
|
reclaimedScratch = true;
|
|
474
473
|
}
|
|
475
|
-
void workersDir;
|
|
476
474
|
}
|
|
477
475
|
// A node whose scratch is being re-pointed THIS pass must NOT also have its
|
|
478
476
|
// snapshot freed in the same pass — re-pointing mutates the node body, which
|
|
@@ -515,7 +513,7 @@ function planReclamation(run, policy = {}) {
|
|
|
515
513
|
const recipe = {
|
|
516
514
|
recipeKind: "node-snapshot-projection",
|
|
517
515
|
inputDigests: [inputDigest],
|
|
518
|
-
inputsDigest: sha256OfString((0, multi_agent_eval_1.
|
|
516
|
+
inputsDigest: sha256OfString((0, multi_agent_eval_1.replayStableStringify)([inputDigest])),
|
|
519
517
|
expectDigest: snapshotProjectionDigest(node),
|
|
520
518
|
sourceRef: node.id
|
|
521
519
|
};
|
|
@@ -531,6 +529,13 @@ function planReclamation(run, policy = {}) {
|
|
|
531
529
|
// retention, and we do not yet auto-capture reconstruction recipes for them.
|
|
532
530
|
// The reference graph is consulted so the door is closed, not merely unbuilt.
|
|
533
531
|
void buildReferenceGraph;
|
|
532
|
+
// Determinism (HARD constraint): the snapshot candidates above are gathered in
|
|
533
|
+
// fs.readdirSync order, which is filesystem-dependent. freeable feeds the freed
|
|
534
|
+
// manifest that buildTombstone binds into tombstoneHash (and the prevTombstoneHash
|
|
535
|
+
// chain), so an unsorted order makes the tombstone hash irreproducible across
|
|
536
|
+
// hosts. Sort by path — the same compareBytes discipline the directory reads at
|
|
537
|
+
// :128 and the reference list at :243 already use — before anything hashes it.
|
|
538
|
+
freeable.sort((a, b) => (0, compare_1.compareBytes)(a.path, b.path));
|
|
534
539
|
const byKind = {};
|
|
535
540
|
let bytesToFree = 0;
|
|
536
541
|
for (const entry of freeable) {
|
|
@@ -557,16 +562,16 @@ function planReclamation(run, policy = {}) {
|
|
|
557
562
|
return { freeable, bytesToFree, byKind, capability, capabilityReason };
|
|
558
563
|
}
|
|
559
564
|
function policyDigestOf(policy) {
|
|
560
|
-
return sha256OfString((0, multi_agent_eval_1.
|
|
565
|
+
return sha256OfString((0, multi_agent_eval_1.replayStableStringify)(policy));
|
|
561
566
|
}
|
|
562
567
|
/** genesis prevTombstoneHash = sha256 of the sealed skeleton. */
|
|
563
568
|
function genesisPrevHash(skeleton) {
|
|
564
|
-
return sha256OfString((0, multi_agent_eval_1.
|
|
569
|
+
return sha256OfString((0, multi_agent_eval_1.replayStableStringify)(skeleton));
|
|
565
570
|
}
|
|
566
571
|
/** The canonical bytes a tombstoneHash binds: freed-manifest + sealed skeleton +
|
|
567
572
|
* prevTombstoneHash + capability. Recomputed independently by `gc verify`. */
|
|
568
573
|
function tombstoneHashInput(t) {
|
|
569
|
-
return (0, multi_agent_eval_1.
|
|
574
|
+
return (0, multi_agent_eval_1.replayStableStringify)({
|
|
570
575
|
runId: t.runId,
|
|
571
576
|
tombstoneId: t.tombstoneId,
|
|
572
577
|
reclaimedAt: t.reclaimedAt,
|
|
@@ -574,7 +579,7 @@ function tombstoneHashInput(t) {
|
|
|
574
579
|
policyDigest: t.policyDigest,
|
|
575
580
|
freed: t.freed.map((f) => ({ path: f.path, kind: f.kind, bytes: f.bytes, sha256: f.sha256, recipe: f.recipe || null })),
|
|
576
581
|
bytesFreed: t.bytesFreed,
|
|
577
|
-
skeletonDigest: sha256OfString((0, multi_agent_eval_1.
|
|
582
|
+
skeletonDigest: sha256OfString((0, multi_agent_eval_1.replayStableStringify)(t.skeleton)),
|
|
578
583
|
capability: t.capability,
|
|
579
584
|
capabilityReason: t.capabilityReason,
|
|
580
585
|
prevTombstoneHash: t.prevTombstoneHash
|
|
@@ -583,11 +588,11 @@ function tombstoneHashInput(t) {
|
|
|
583
588
|
function computeTombstoneHash(t) {
|
|
584
589
|
return sha256OfString(tombstoneHashInput(t));
|
|
585
590
|
}
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
return `tomb-${
|
|
591
|
+
function tombstoneId(seq) {
|
|
592
|
+
// Deterministic (FreeBSD-audit L13): the chain POSITION, not a process-global
|
|
593
|
+
// counter or wall-clock stamp — tombstoneId is bound into the tombstoneHash
|
|
594
|
+
// chain that `gc verify` recomputes, so it must be reproducible.
|
|
595
|
+
return `tomb-${String(seq).padStart(3, "0")}`;
|
|
591
596
|
}
|
|
592
597
|
/** STEP 2: build the FULL tombstone (pre-deletion sha256 per freed path + the
|
|
593
598
|
* hash chain). Reads the freed files (still present); mutates nothing on disk. */
|
|
@@ -605,7 +610,7 @@ function buildTombstone(run, skeleton, plan, options = {}) {
|
|
|
605
610
|
const base = {
|
|
606
611
|
schemaVersion: 1,
|
|
607
612
|
runId: run.id,
|
|
608
|
-
tombstoneId: tombstoneId(
|
|
613
|
+
tombstoneId: tombstoneId(prior.length + 1),
|
|
609
614
|
reclaimedAt: now,
|
|
610
615
|
actor: options.actor,
|
|
611
616
|
policyDigest: policyDigestOf(options.policy || {}),
|
|
@@ -800,7 +805,7 @@ function reconstructArtifact(run, recipe) {
|
|
|
800
805
|
return { inputsDigest: sha256OfString("absent"), expectDigest: sha256OfString("absent") };
|
|
801
806
|
}
|
|
802
807
|
const inputDigest = nodeBodyDigest(node);
|
|
803
|
-
const inputsDigest = sha256OfString((0, multi_agent_eval_1.
|
|
808
|
+
const inputsDigest = sha256OfString((0, multi_agent_eval_1.replayStableStringify)([inputDigest]));
|
|
804
809
|
const expectDigest = snapshotProjectionDigest(node);
|
|
805
810
|
return { inputsDigest, expectDigest };
|
|
806
811
|
}
|