cool-workflow 0.1.96 → 0.1.98
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/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/candidate-scoring.js +3 -3
- package/dist/capability-core.js +9 -1
- package/dist/capability-registry.js +7 -1
- package/dist/cli/command-surface.js +4 -0
- package/dist/cli/handlers/ledger.js +169 -0
- package/dist/cli/handlers/scheduling.js +7 -1
- package/dist/drive.js +108 -61
- package/dist/execution-backend/agent.js +84 -24
- package/dist/execution-backend.js +25 -5
- package/dist/ledger.js +313 -0
- package/dist/mcp/tool-call.js +36 -0
- package/dist/mcp/tool-definitions.js +26 -0
- package/dist/mcp-server.js +4 -0
- package/dist/onramp.js +2 -0
- package/dist/orchestrator/app-operations.js +6 -0
- package/dist/orchestrator/cli-options.js +8 -2
- package/dist/orchestrator/lifecycle-operations.js +40 -13
- package/dist/orchestrator/migration-operations.js +1 -1
- package/dist/orchestrator.js +11 -3
- package/dist/remote-source.js +10 -3
- package/dist/run-export.js +45 -5
- package/dist/sandbox-profile.js +6 -1
- package/dist/triggers.js +7 -1
- package/dist/version.js +1 -1
- package/dist/workbench-host.js +18 -2
- package/docs/agent-delegation-drive.7.md +4 -0
- package/docs/cli-mcp-parity.7.md +16 -2
- package/docs/contract-migration-tooling.7.md +4 -0
- package/docs/control-plane-scheduling.7.md +4 -0
- package/docs/cross-agent-ledger.7.md +217 -0
- package/docs/demo.7.md +80 -0
- package/docs/designs/handoff-ledger.md +145 -0
- package/docs/doctor.7.md +97 -0
- package/docs/durable-state-and-locking.7.md +4 -0
- package/docs/evidence-adoption-reasoning-chain.7.md +4 -0
- package/docs/execution-backends.7.md +4 -0
- package/docs/fix.7.md +44 -0
- package/docs/handoff-setup.md +120 -0
- package/docs/init.7.md +62 -0
- package/docs/multi-agent-cli-mcp-surface.7.md +4 -0
- package/docs/multi-agent-eval-replay-harness.7.md +4 -0
- package/docs/multi-agent-operator-ux.7.md +4 -0
- package/docs/node-snapshot-diff-replay.7.md +4 -0
- package/docs/observability-cost-accounting.7.md +4 -0
- package/docs/pipeline-verbs.7.md +93 -0
- package/docs/project-index.md +28 -5
- package/docs/real-execution-backends.7.md +4 -0
- package/docs/release-and-migration.7.md +4 -0
- package/docs/release-tooling.7.md +4 -0
- package/docs/routine.7.md +73 -0
- package/docs/run-registry-control-plane.7.md +4 -0
- package/docs/run-retention-reclamation.7.md +4 -0
- package/docs/state-explosion-management.7.md +4 -0
- package/docs/team-collaboration.7.md +4 -0
- package/docs/web-desktop-workbench.7.md +4 -0
- package/manifest/README.md +16 -10
- package/manifest/plugin.manifest.json +1 -1
- package/package.json +1 -1
- package/scripts/agents/agent-adapter-core.js +4 -1
- package/scripts/agents/codex-agent.js +34 -4
- package/scripts/canonical-apps.js +4 -4
- package/scripts/children/batch-delegate-child.js +40 -13
- package/scripts/children/http-delegate-child.js +2 -1
- package/scripts/dogfood-release.js +1 -1
- package/scripts/golden-path.js +4 -4
- package/scripts/release-flow.js +31 -17
package/scripts/release-flow.js
CHANGED
|
@@ -154,6 +154,11 @@ function runVendorPreflight() {
|
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
// ---- 2. independent reviewer, delegated to the configured agent -------------
|
|
157
|
+
// Default reviewer deadline. The zero-trust reviewer re-runs release-gate.sh,
|
|
158
|
+
// whose sequential test suite alone is ~12 min, then reads + reasons over the
|
|
159
|
+
// diff — so a 10-min default guaranteed a timeout on a real release. 30 min gives
|
|
160
|
+
// headroom; override with CW_AGENT_TIMEOUT_MS (or --agent-timeout-ms).
|
|
161
|
+
const REVIEWER_TIMEOUT_MS = 1800000;
|
|
157
162
|
function reviewerPromptBody() {
|
|
158
163
|
// Reuse the committed reviewer spec as the prompt; strip YAML frontmatter.
|
|
159
164
|
const specPath = path.join(pluginRoot, "agents", "release-reviewer.md");
|
|
@@ -278,9 +283,15 @@ function delegateReview(resultPath, inputPath) {
|
|
|
278
283
|
// the file takes precedence. stderr goes to the terminal for live output.
|
|
279
284
|
const r = spawnSync(bin, args, {
|
|
280
285
|
cwd: repoRoot,
|
|
281
|
-
|
|
286
|
+
// CW_RELEASE_REVIEW=1 is a vendor-agnostic signal that THIS spawn is a
|
|
287
|
+
// release verdict, not a fast worker turn. Wrappers that can re-run the gate
|
|
288
|
+
// (e.g. codex-agent.js) read it to raise reasoning effort and open an
|
|
289
|
+
// exec-capable sandbox — a read-only/low-effort reviewer can't execute the
|
|
290
|
+
// gate it judges and degrades to fabricated verdicts. Preflight liveness
|
|
291
|
+
// probes never set it, so they stay fast and read-only.
|
|
292
|
+
env: { ...process.env, CW_RELEASE_REVIEW: "1" },
|
|
282
293
|
encoding: "utf8",
|
|
283
|
-
timeout: cfg.timeoutMs ||
|
|
294
|
+
timeout: cfg.timeoutMs || REVIEWER_TIMEOUT_MS,
|
|
284
295
|
shell: false,
|
|
285
296
|
stdio: ["ignore", "pipe", "inherit"],
|
|
286
297
|
maxBuffer: 32 * 1024 * 1024
|
|
@@ -310,7 +321,7 @@ function delegateReview(resultPath, inputPath) {
|
|
|
310
321
|
say(`[2/3] reviewer — POSTing to endpoint ${cfg.endpoint} (model: ${cfg.model || "unreported"})`);
|
|
311
322
|
const body = JSON.stringify({ prompt: subMap.prompt, model: cfg.model, sha: HEAD });
|
|
312
323
|
const lib = cfg.endpoint.startsWith("https:") ? https : http;
|
|
313
|
-
const text = postSync(lib, cfg.endpoint, body, cfg.timeoutMs ||
|
|
324
|
+
const text = postSync(lib, cfg.endpoint, body, cfg.timeoutMs || REVIEWER_TIMEOUT_MS);
|
|
314
325
|
if (text === null) die("reviewer endpoint call failed — no verdict trusted.");
|
|
315
326
|
fs.writeFileSync(resultPath, text.endsWith("\n") ? text : `${text}\n`);
|
|
316
327
|
}
|
|
@@ -502,25 +513,28 @@ function cut(resultPath, capability) {
|
|
|
502
513
|
const bump = spawnSync("npm", ["run", "bump:version", "--", cutVersion], { cwd: pluginRoot, encoding: "utf8", stdio: "inherit" });
|
|
503
514
|
if (bump.status !== 0) die("bump:version failed");
|
|
504
515
|
// Regenerate the gated project index after the version bump (PR #87 gate).
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
//
|
|
509
|
-
//
|
|
510
|
-
//
|
|
511
|
-
//
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
git(["add", "
|
|
516
|
+
// Fail closed: a failed regen must not bake a stale index into the immutable tag.
|
|
517
|
+
const sync = spawnSync("npm", ["run", "sync:project-index", "--", "--repo-only"], { cwd: pluginRoot, encoding: "utf8", stdio: "inherit" });
|
|
518
|
+
if (sync.status !== 0) die("sync:project-index failed — refusing to cut with a stale project index");
|
|
519
|
+
// Stage ONLY tracked-file modifications (the bump surfaces, project-index, dist)
|
|
520
|
+
// plus the ONE intended new file: the reviewer verdict. NEVER `git add -A` — an
|
|
521
|
+
// untracked stray (e.g. the reviewer's narration transcript, which carries the
|
|
522
|
+
// operator's local home path) must never ride into the immutable tag commit
|
|
523
|
+
// (that tripped pii-redaction-smoke and red-failed release-gate for v0.1.96).
|
|
524
|
+
// `git add -u` touches tracked files only, so no untracked file can be swept in;
|
|
525
|
+
// the verdict is the single new path the cut is allowed to add.
|
|
526
|
+
git(["add", "-u"]);
|
|
527
|
+
git(["add", "--", path.relative(repoRoot, resultPath)]);
|
|
517
528
|
const commit = git(["commit", "-m", `chore(release): record APPROVED reviewer verdict for v${cutVersion}`]);
|
|
518
529
|
if (commit.code !== 0) die("verdict commit failed", commit.err);
|
|
519
530
|
const tag = git(["tag", "-a", `v${cutVersion}`, "-m", `v${cutVersion}: ${capability || "release"}`]);
|
|
520
531
|
if (tag.code !== 0) die("git tag failed", tag.err);
|
|
521
532
|
if (PUSH) {
|
|
522
|
-
|
|
523
|
-
|
|
533
|
+
// Atomic: the verdict commit on HEAD and the tag land together or not at all.
|
|
534
|
+
// A non-atomic two-push could leave main advanced with no tag, so CI's
|
|
535
|
+
// release-gate (which fires on the tag) never runs and the release silently stalls.
|
|
536
|
+
const push = git(["push", "--atomic", "origin", "HEAD", `v${cutVersion}`]);
|
|
537
|
+
if (push.code !== 0) die("atomic push of HEAD + tag failed (nothing partially pushed)", push.err);
|
|
524
538
|
}
|
|
525
539
|
say(`tagged v${cutVersion}${PUSH ? " and pushed" : " (local only; push when ready)"}`);
|
|
526
540
|
// Finishing step: create the GitHub Release for the just-pushed tag. Only when
|