cool-workflow 0.1.86 → 0.1.87

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 (54) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/README.md +8 -1
  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/capability-registry.js +24 -0
  11. package/dist/cli/command-surface.js +80 -10
  12. package/dist/cli.js +2 -1
  13. package/dist/doctor.js +13 -4
  14. package/dist/execution-backend.js +8 -0
  15. package/dist/operator-ux/format.js +21 -15
  16. package/dist/operator-ux.js +2 -1
  17. package/dist/orchestrator.js +172 -74
  18. package/dist/term.js +93 -0
  19. package/dist/version.js +1 -1
  20. package/docs/agent-delegation-drive.7.md +24 -6
  21. package/docs/cli-mcp-parity.7.md +12 -2
  22. package/docs/contract-migration-tooling.7.md +4 -0
  23. package/docs/control-plane-scheduling.7.md +4 -0
  24. package/docs/durable-state-and-locking.7.md +4 -0
  25. package/docs/evidence-adoption-reasoning-chain.7.md +4 -0
  26. package/docs/execution-backends.7.md +4 -0
  27. package/docs/multi-agent-cli-mcp-surface.7.md +4 -0
  28. package/docs/multi-agent-eval-replay-harness.7.md +4 -0
  29. package/docs/multi-agent-operator-ux.7.md +4 -0
  30. package/docs/node-snapshot-diff-replay.7.md +4 -0
  31. package/docs/observability-cost-accounting.7.md +4 -0
  32. package/docs/project-index.md +9 -3
  33. package/docs/real-execution-backends.7.md +4 -0
  34. package/docs/release-and-migration.7.md +4 -0
  35. package/docs/release-history.md +10 -0
  36. package/docs/release-tooling.7.md +12 -0
  37. package/docs/run-registry-control-plane.7.md +4 -0
  38. package/docs/run-retention-reclamation.7.md +4 -0
  39. package/docs/state-explosion-management.7.md +4 -0
  40. package/docs/team-collaboration.7.md +4 -0
  41. package/docs/web-desktop-workbench.7.md +4 -0
  42. package/manifest/plugin.manifest.json +1 -1
  43. package/package.json +1 -1
  44. package/scripts/agents/agent-adapter-core.js +180 -0
  45. package/scripts/agents/builtin-templates.json +4 -1
  46. package/scripts/agents/codex-agent.js +134 -0
  47. package/scripts/agents/gemini-agent.js +115 -0
  48. package/scripts/agents/opencode-agent.js +119 -0
  49. package/scripts/canonical-apps.js +4 -4
  50. package/scripts/dogfood-release.js +1 -1
  51. package/scripts/golden-path.js +4 -4
  52. package/scripts/parity-check.js +6 -5
  53. package/scripts/release-check.js +3 -3
  54. package/scripts/release-gate.sh +1 -1
@@ -36,8 +36,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
36
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.CoolWorkflowRunner = void 0;
39
+ exports.KNOWN_COMMANDS = exports.CoolWorkflowRunner = void 0;
40
40
  exports.parseArgv = parseArgv;
41
+ exports.suggestCommand = suggestCommand;
42
+ exports.formatSearchResults = formatSearchResults;
43
+ exports.formatInfo = formatInfo;
41
44
  exports.formatHelp = formatHelp;
42
45
  const node_fs_1 = __importDefault(require("node:fs"));
43
46
  const node_path_1 = __importDefault(require("node:path"));
@@ -68,6 +71,7 @@ const feedbackOps = __importStar(require("./orchestrator/feedback-operations"));
68
71
  const topologyOps = __importStar(require("./orchestrator/topology-operations"));
69
72
  const lifecycleOps = __importStar(require("./orchestrator/lifecycle-operations"));
70
73
  const migrationOps = __importStar(require("./orchestrator/migration-operations"));
74
+ const term_1 = require("./term");
71
75
  // CoolWorkflowRunner — the single FACADE both surfaces (cli.ts and the MCP server)
72
76
  // call through. It is deliberately WIDE but THIN: each method either
73
77
  // (a) loads the run's durable state and delegates to a domain function in
@@ -816,83 +820,177 @@ function parseArgv(argv) {
816
820
  }
817
821
  return { command, positionals, options };
818
822
  }
823
+ /** All known top-level CW commands. Used for "did you mean?" suggestions. */
824
+ exports.KNOWN_COMMANDS = new Set([
825
+ "help", "list", "doctor", "info", "search", "man", "init", "quickstart", "plan", "status", "next",
826
+ "dispatch", "result", "state", "commit", "report", "app", "sandbox",
827
+ "backend", "contract", "node", "feedback", "worker", "audit", "candidate",
828
+ "review", "loop", "schedule", "routine", "registry", "run", "queue",
829
+ "history", "audit-run", "multi-agent", "topology", "summary", "blackboard",
830
+ "coordinator", "metrics", "operator", "sched", "gc", "telemetry",
831
+ "migration", "demo", "workbench", "approve", "reject", "comment", "handoff",
832
+ "graph", "eval"
833
+ ]);
834
+ /** Levenshtein distance between two short strings. */
835
+ function levenshtein(a, b) {
836
+ const m = a.length;
837
+ const n = b.length;
838
+ let prev = Array.from({ length: n + 1 }, (_, j) => j);
839
+ let curr = new Array(n + 1);
840
+ for (let i = 1; i <= m; i++) {
841
+ curr[0] = i;
842
+ for (let j = 1; j <= n; j++) {
843
+ curr[j] = Math.min(prev[j] + 1, curr[j - 1] + 1, prev[j - 1] + (a[i - 1] === b[j - 1] ? 0 : 1));
844
+ }
845
+ [prev, curr] = [curr, prev];
846
+ }
847
+ return prev[n];
848
+ }
849
+ /** Suggest the closest known command for a typo. Returns undefined if no match
850
+ * within half the length of the input (avoiding wild guesses on short strings). */
851
+ function suggestCommand(input) {
852
+ if (!input || input.length < 2)
853
+ return undefined;
854
+ const lower = input.toLowerCase();
855
+ let best = "";
856
+ let bestDist = Infinity;
857
+ for (const cmd of exports.KNOWN_COMMANDS) {
858
+ const dist = levenshtein(lower, cmd);
859
+ if (dist < bestDist) {
860
+ best = cmd;
861
+ bestDist = dist;
862
+ }
863
+ }
864
+ // Threshold: distance must be <= half the input length AND <= 3
865
+ if (bestDist <= 3 && bestDist <= lower.length / 2)
866
+ return best;
867
+ return undefined;
868
+ }
869
+ function formatSearchResults(keyword, results) {
870
+ if (!results.length)
871
+ return `No workflows matched "${keyword}".\n Tip: cw list for all available workflows.`;
872
+ return [
873
+ (0, term_1.bold)(`${results.length} workflow${results.length !== 1 ? "s" : ""} matching "${keyword}"`),
874
+ ...results.map((r) => ` ${r.id} — ${r.title}\n ${(0, term_1.dim)(r.summary.slice(0, 120))}${r.summary.length > 120 ? "…" : ""}`),
875
+ "",
876
+ (0, term_1.dim)("Use cw info <id> for full details.")
877
+ ].join("\n");
878
+ }
879
+ function formatInfo(appId, data) {
880
+ const app = (data.app || {});
881
+ const inputs = (Array.isArray(data.inputs) ? data.inputs : []);
882
+ const phases = (Array.isArray(data.phases) ? data.phases : []);
883
+ const lines = [(0, term_1.bold)(`cw info ${appId}`)];
884
+ if (data.title)
885
+ lines.push(` Title: ${data.title}`);
886
+ if (data.version)
887
+ lines.push(` Version: ${data.version}`);
888
+ if (data.summary)
889
+ lines.push(` Summary: ${data.summary}`);
890
+ if (data.author)
891
+ lines.push(` Author: ${typeof data.author === "object" ? data.author.name : data.author}`);
892
+ if (data.compatible !== undefined)
893
+ lines.push(` Compatible: ${data.compatible ? "yes" : "no"}`);
894
+ if (inputs.length > 0) {
895
+ lines.push(" Inputs:");
896
+ for (const input of inputs) {
897
+ const name = input.name || "";
898
+ const type = input.type || "string";
899
+ const required = input.required ? ", required" : "";
900
+ const def = input.default ? `, default: ${input.default}` : "";
901
+ const desc = input.description ? ` — ${input.description}` : "";
902
+ lines.push(` - ${name} (${type}${required}${def})${desc}`);
903
+ }
904
+ }
905
+ if (Array.isArray(data.sandboxProfiles) && data.sandboxProfiles.length > 0) {
906
+ lines.push(` Sandbox: ${data.sandboxProfiles.join(", ")}`);
907
+ }
908
+ const taskCount = data.taskCount || 0;
909
+ if (phases.length > 0) {
910
+ lines.push(` Phases: ${phases.length} phase${phases.length !== 1 ? "s" : ""}, ${taskCount} task${taskCount !== 1 ? "s" : ""}`);
911
+ }
912
+ lines.push(` Run: cw quickstart ${appId} --repo . --question "..."`);
913
+ return lines.join("\n");
914
+ }
819
915
  function formatHelp() {
820
916
  return [
821
- "Cool Workflow",
917
+ (0, term_1.bold)("Cool Workflow"),
918
+ "",
919
+ " Quick start (one command — plan → drive → report):",
920
+ " cw quickstart [app] --repo . --question \"...\" --agent-command builtin:claude",
921
+ " (--preview for a dry run without an agent; --bundle for a portable sealed report)",
922
+ "",
923
+ (0, term_1.bold)("Getting Started"),
924
+ " list List available workflow apps",
925
+ " search <keyword> Search workflows by title or description",
926
+ " info <app-id> [--json] Show what a workflow app does and how to run it",
927
+ " doctor [--json] [--onramp] [--fix] Check setup (--fix for consolidated fix commands)",
928
+ " init <id> [--title T] Create a new workflow app",
929
+ " quickstart [app] [...] Plan → drive → report in one command",
930
+ " demo tamper|bundle Prove trust checks work (30s, no agent needed)",
931
+ " man <topic> Show a man page (e.g. cw man release-tooling)",
932
+ "",
933
+ (0, term_1.bold)("Run Management"),
934
+ " plan <id> [--repo P] [--question Q] Create a new run plan",
935
+ " quickstart|audit-run [app] [...] Plan → drive → report in one command",
936
+ " status <run-id> [--json] [--brief] Show run status (--brief for compact summary)",
937
+ " next <run-id> [--limit N] Show pending dispatch tasks",
938
+ " dispatch <run-id> [--limit N] Dispatch tasks to workers",
939
+ " result <run-id> <task-id> <file> Record a task result",
940
+ " state check <run-id> [--write] Validate run state",
941
+ " commit <run-id> <mode> [...] Record a gated commit",
942
+ " report <run-id> [--show|--summary] Show the report (or bundle/verify-bundle)",
943
+ " graph <run-id> [--json] Show operator graph",
944
+ "",
945
+ (0, term_1.bold)("Inspection & Diagnostics"),
946
+ " operator status|report <run-id> [--json] Human-friendly operator panel",
947
+ " metrics show|summary <run-id> [--json] Cost and usage metrics",
948
+ " telemetry verify <run-id> [--pubkey P] Verify tamper-evident telemetry",
949
+ " migration list|check|prove [target] Schema migration tools",
950
+ " gc plan|run|verify [run-id] Garbage collection",
951
+ "",
952
+ (0, term_1.bold)("Audit & Trust"),
953
+ " audit summary|worker|provenance|multi-agent|... <run-id> Trust audit operations",
954
+ " candidate list|register|score|rank|select|reject <run-id> Candidate management",
955
+ " node list|show|graph|snapshot|diff|replay|verify <run-id> State-node inspection",
956
+ " eval snapshot|replay|compare|score|gate|report Eval/replay harness",
957
+ "",
958
+ (0, term_1.bold)("Multi‑Agent & Collaboration"),
959
+ " multi-agent run|status|step|blackboard|score|... <run-id> Multi-agent coordination",
960
+ " topology list|show|validate|apply|summary|graph Topology management",
961
+ " blackboard summary|graph|resolve|topic|message|... <run-id> Blackboard workspace",
962
+ " coordinator summary|decision <run-id> Coordinator interface",
963
+ " summary refresh|show <run-id> State explosion summaries",
964
+ " approve|reject|comment <kind> <run-id> <id> [--reason T] Team approval actions",
965
+ " handoff <kind> <run-id> <id> [--to ROLE] Team handoff",
966
+ " review status|policy <run-id> [--json] Review status",
967
+ "",
968
+ (0, term_1.bold)("Run Registry & Scheduling"),
969
+ " run search|list|show|resume|archive|export|import <id> Cross-repo run management",
970
+ " registry refresh|show [--scope repo|home] [--json] Run registry index",
971
+ " queue add|list|drain|show [queue-id] Work queue operations",
972
+ " history [--scope repo|home] [--json] Run history",
973
+ " schedule create|list|due|complete|... Scheduled tasks",
974
+ " routine create|fire|list|events|delete Event-driven triggers",
975
+ " sched plan|lease|release|complete|... Lease-based scheduling",
976
+ " loop --prompt T [--interval-minutes N] Continuous loop runner",
822
977
  "",
823
- "Quick start (ONE command — plan -> drive -> report):",
824
- " quickstart [architecture-review] --repo PATH --question TEXT --agent-command \"claude -p\"",
825
- " (delegates each worker to YOUR configured agent backend; --preview for a dry run)",
978
+ (0, term_1.bold)("Developer & Workspace"),
979
+ " app list|show|validate|init|package|run [id|path] Workflow app management",
980
+ " sandbox list|show|validate|choose|resolve [id] Sandbox profiles",
981
+ " backend list|show|probe [id] Agent execution backends",
982
+ " contract show <run-id> [id] Run contract view",
983
+ " worker list|summary|show|manifest|output|... <id> Worker operations",
984
+ " feedback list|show|summary|collect|task|resolve <id> Feedback loop",
985
+ " workbench serve [--port N] | view <run-id> Optional localhost workbench",
826
986
  "",
827
- "Commands:",
828
- " list",
829
- " doctor [--json] [--onramp] [--changed-from REF] (check setup and show the shortest safe next steps)",
830
- " init <workflow-id> [--title TEXT] [--output PATH]",
831
- " quickstart [app-id] [--repo PATH] [--question TEXT] [--agent-command CMD] [--check] [--once] [--preview]",
832
- " plan <workflow-id> [--repo PATH] [--question TEXT] [--invariant TEXT]",
833
- " status <run-id> [--json|--format json]",
834
- " next <run-id> [--limit N]",
835
- " graph <run-id> [--json]",
836
- " dispatch <run-id> [--limit N] [--sandbox PROFILE] [--backend node|bun|shell|container|remote|ci]",
837
- " result <run-id> <task-id> <result-file>",
838
- " state check <run-id> [--state PATH] [--write]",
839
- " commit <run-id> --verifier <node-id> [--reason TEXT]",
840
- " commit <run-id> --candidate <candidate-id> [--reason TEXT]",
841
- " commit <run-id> --selection <selection-id> [--reason TEXT]",
842
- " commit <run-id> --allow-unverified-checkpoint [--reason TEXT]",
843
- " commit summary <run-id> [--json]",
844
- " report <run-id> [--show|--summary]",
845
- " app list|show|validate|init|package",
846
- " sandbox list|show|validate",
847
- " backend list|show|probe [backend-id]",
848
- " contract show <run-id> [contract-id]",
849
- " node list|show|graph <run-id>",
850
- " feedback list|summary|show|collect|task|resolve <run-id>",
851
- " worker list|summary|show|manifest|output|fail|validate <run-id>",
852
- " audit summary <run-id>",
853
- " audit worker <run-id> <worker-id>",
854
- " audit provenance <run-id> [--worker ID|--candidate ID|--commit ID]",
855
- " audit multi-agent <run-id> [--json]",
856
- " audit policy <run-id> [--json]",
857
- " audit role <run-id> <role-id> [--json]",
858
- " audit blackboard <run-id> [--json]",
859
- " audit judge <run-id> [--json]",
860
- " audit attest <run-id> [--worker ID] [--hostEnforced true] [--env NAME]",
861
- " audit decision <run-id> <worker-id> [--path PATH|--command CMD|--network TARGET|--env NAME]",
862
- " candidate list|summary|register|score|rank|select|reject <run-id>",
863
- " eval snapshot|replay|compare|score|gate|report",
864
- " summary refresh|show <run-id> [--json]",
865
- " blackboard summary|summarize|graph|resolve <run-id>",
866
- " blackboard topic create <run-id> --id <topic-id> --title TEXT",
867
- " blackboard message post|list <run-id>",
868
- " blackboard context put <run-id>",
869
- " blackboard artifact add|list <run-id>",
870
- " blackboard snapshot <run-id>",
871
- " coordinator summary <run-id>",
872
- " coordinator decision <run-id> --kind KIND --outcome OUTCOME --reason TEXT",
873
- " multi-agent run|status|step|blackboard|score|select|summary|summarize|graph|dependencies|failures|evidence <run-id>",
874
- " multi-agent graph <run-id> --view full|compact|critical-path|failures|evidence|trust|topology|blackboard|candidate|commit-gate [--focus ID] [--depth N]",
875
- " topology list|show|validate|apply|summary|graph",
876
- " schedule create|list|due|complete|pause|resume|run-now|history|daemon|delete",
877
- " routine create|fire|list|events|delete",
878
- " registry refresh|show [--scope repo|home] [--json]",
879
- " run search|list|show|resume|archive|rerun|export|import|verify-import [run-id|archive] [--scope repo|home] [--json]",
880
- " queue add|list|drain|show [queue-id] [--repo PATH] [--priority N]",
881
- " history [--scope repo|home] [--app ID] [--status STATE] [--json]",
882
- " audit-run <app-id> [--repo PATH] [--question TEXT] [--agent-command CMD]",
883
- " metrics show|summary <run-id> [--scope repo|home] [--json]",
884
- " telemetry verify <run-id> [--pubkey PEM|PATH] [--json]",
885
- " gc plan|run|verify [run-id] [--json]",
886
- " sched plan|lease|release|complete|reclaim|reset|policy [--json]",
887
- " migration list|check|prove [target] [--json]",
888
- " operator status|report <run-id> [--json]",
889
- " review status|policy <run-id> [--json]",
890
- " approve|reject|comment <kind> <run-id> <target-id> [--reason TEXT]",
891
- " handoff <kind> <run-id> <target-id> [--to ROLE]",
892
- " loop --prompt TEXT [--interval-minutes N]",
893
- " demo tamper",
894
- " workbench view <run-id> [--json]",
895
- " workbench serve [--port N] [--scope repo|home] [--once|--json]",
987
+ (0, term_1.bold)("Common Flags"),
988
+ " --json, --format json Machine-readable JSON output",
989
+ " --repo PATH Target repository path",
990
+ " --question TEXT The task or question to answer",
991
+ " --agent-command CMD Agent backend (e.g. builtin:claude, builtin:codex)",
992
+ " --scope repo|home Scope for cross-repo operations",
993
+ " --cwd PATH Working directory override",
896
994
  ""
897
995
  ].join("\n");
898
996
  }
package/dist/term.js ADDED
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ // src/term.ts — zero-dependency terminal styling.
3
+ //
4
+ // Provides TTY-gated ANSI formatting for human-readable output. When output is
5
+ // piped (non-TTY), styled calls return plain text. This keeps data channels
6
+ // (stdout) and diagnostics (stderr) clean — never adds escape codes to pipes.
7
+ //
8
+ // Used by: doctor, help, error messages, status summaries.
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.bold = bold;
11
+ exports.dim = dim;
12
+ exports.green = green;
13
+ exports.yellow = yellow;
14
+ exports.red = red;
15
+ exports.cyan = cyan;
16
+ exports.doctorGlyph = doctorGlyph;
17
+ exports.cwLabel = cwLabel;
18
+ exports.indent = indent;
19
+ exports.printSuccessSummary = printSuccessSummary;
20
+ function isTTY(stream = process.stderr) {
21
+ return Boolean(stream.isTTY);
22
+ }
23
+ // ---- ansi codes ----
24
+ const ansi = {
25
+ reset: "\x1b[0m",
26
+ bold: "\x1b[1m",
27
+ dim: "\x1b[2m",
28
+ green: "\x1b[32m",
29
+ yellow: "\x1b[33m",
30
+ red: "\x1b[31m",
31
+ cyan: "\x1b[36m",
32
+ };
33
+ // ---- styled text ----
34
+ function style(code, text, stream) {
35
+ if (!isTTY(stream))
36
+ return text;
37
+ return `${code}${text}${ansi.reset}`;
38
+ }
39
+ function bold(text, stream) {
40
+ return style(ansi.bold, text, stream);
41
+ }
42
+ function dim(text, stream) {
43
+ return style(ansi.dim, text, stream);
44
+ }
45
+ function green(text, stream) {
46
+ return style(ansi.green, text, stream);
47
+ }
48
+ function yellow(text, stream) {
49
+ return style(ansi.yellow, text, stream);
50
+ }
51
+ function red(text, stream) {
52
+ return style(ansi.red, text, stream);
53
+ }
54
+ function cyan(text, stream) {
55
+ return style(ansi.cyan, text, stream);
56
+ }
57
+ // ---- semantic helpers ----
58
+ /** Returns the styled glyph + label for a doctor check severity. */
59
+ function doctorGlyph(status, stream) {
60
+ const glyph = { ok: "✓", warn: "!", fail: "✗" };
61
+ const color = {
62
+ ok: green,
63
+ warn: yellow,
64
+ fail: red,
65
+ };
66
+ return color[status](`${glyph[status]}`, stream);
67
+ }
68
+ /** "cw:" prefix with bold and optional color. */
69
+ function cwLabel(stream) {
70
+ return bold("cw:", stream);
71
+ }
72
+ /** Render a multi-line block with consistent 2-space indentation. */
73
+ function indent(text, spaces = 2) {
74
+ const prefix = " ".repeat(spaces);
75
+ return text.split("\n").map((line) => `${prefix}${line}`).join("\n");
76
+ }
77
+ /** Print a success summary to stderr (TTY-gated). Shows the report path and a
78
+ * suggested next command. Pipe-friendly: silent when stderr is not a TTY. */
79
+ function printSuccessSummary(fields, stream) {
80
+ if (!isTTY(stream))
81
+ return;
82
+ const s = stream || process.stderr;
83
+ s.write(`\n${green("✓")} Report: ${fields.reportPath}\n`);
84
+ if (fields.status === "complete") {
85
+ s.write(` Next: cw status ${fields.runId} --brief\n`);
86
+ if (fields.bundle !== false) {
87
+ s.write(` Bundle: cw report bundle ${fields.runId}\n`);
88
+ }
89
+ }
90
+ else {
91
+ s.write(` ${yellow("!")} Status: ${fields.status}. Next: cw status ${fields.runId}\n`);
92
+ }
93
+ }
package/dist/version.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MIN_SUPPORTED_RUN_STATE_SCHEMA_VERSION = exports.LEGACY_RUN_STATE_SCHEMA_VERSION = exports.CURRENT_RUN_STATE_SCHEMA_VERSION = exports.WORKFLOW_APP_SCHEMA_VERSION = exports.CURRENT_COOL_WORKFLOW_VERSION = void 0;
4
- exports.CURRENT_COOL_WORKFLOW_VERSION = "0.1.86";
4
+ exports.CURRENT_COOL_WORKFLOW_VERSION = "0.1.87";
5
5
  exports.WORKFLOW_APP_SCHEMA_VERSION = 1;
6
6
  exports.CURRENT_RUN_STATE_SCHEMA_VERSION = 1;
7
7
  exports.LEGACY_RUN_STATE_SCHEMA_VERSION = 0;
@@ -204,13 +204,15 @@ A drive can show the agent's activity live, without touching the evidence
204
204
  contract, when the operator opts in with `CW_AGENT_STREAM=1`:
205
205
 
206
206
  - **Default stays buffered.** Without `CW_AGENT_STREAM=1`, the bundled wrapper
207
- keeps the legacy `--output-format json` path and forwards claude's JSON stdout
208
- word for word after writing `result.md`.
207
+ keeps the buffered path and writes one JSON report to stdout after writing
208
+ `result.md`.
209
209
  - **The opt-in wrapper renders; stderr only.** With `CW_AGENT_STREAM=1`, the
210
- bundled wrapper runs claude in `--output-format stream-json` and renders a short
211
- human trace (tool uses, assistant text, per-turn summaries) to its
212
- **stderr** diagnostics, never data. It builds the single
213
- `{model, usage, result}` object for stdout again only on that opt-in path.
210
+ bundled Claude wrapper runs claude in `--output-format stream-json`, and the
211
+ bundled Codex wrapper runs `codex exec --json --output-last-message`.
212
+ Each wrapper renders a short human trace (tool uses, assistant text, per-turn
213
+ summaries where present) to its **stderr** diagnostics, never data. It builds
214
+ the single `{model, usage, result}` object for stdout after the final answer is
215
+ captured.
214
216
  - **Core forwards, never parses.** `runAgentProcess` passes the agent child's
215
217
  stderr straight through to the operator's terminal (`stdio` inherit) only when
216
218
  `CW_AGENT_STREAM=1`, CW's own stderr is a TTY, and `CW_NO_STREAM` is not set.
@@ -219,6 +221,18 @@ contract, when the operator opts in with `CW_AGENT_STREAM=1`:
219
221
  - **Determinism intact.** The backend evidence triple hashes stdout only, so
220
222
  the live stderr stream never changes recorded evidence or replay.
221
223
 
224
+ The built-in templates are:
225
+
226
+ ```text
227
+ --agent-command builtin:claude
228
+ --agent-command builtin:codex
229
+ ```
230
+
231
+ Gemini, OpenCode, DeepSeek, and GLM stay as external agent commands or HTTP
232
+ endpoints until their stream format is proven by a local, deterministic wrapper
233
+ smoke. DeepSeek and GLM are best reached through OpenCode or an HTTP agent
234
+ adapter first; CW still imports no model SDK.
235
+
222
236
  ## Compatibility
223
237
 
224
238
  Agent Delegation Drive comes in first in CW v0.1.38. Adding the `agent` row leaves
@@ -291,3 +305,7 @@ No other change to this page in v0.1.84.
291
305
  0.1.85
292
306
 
293
307
  0.1.86
308
+
309
+ ## 0.1.87 (v0.1.87)
310
+
311
+ npm test parallel, 4-vendor wrappers (Claude/Codex/Gemini/OpenCode), Homebrew-style CLI UX (colors/did-you-mean/categorized help/error tips/cw info/cw search/cw man/doctor --fix), post-success summaries, agent execution timing
@@ -82,7 +82,7 @@ relationship. `identical` means `cw <cmd> --json` is equal to the `cw_<tool>`
82
82
  payload; `projected` means a declared divergence with a reason; `cli-only` marks
83
83
  a surface-specific capability with a recorded reason. The matrix is
84
84
  <!-- gen:parity:count -->
85
- machine-complete by design: 193 capabilities, 186 MCP tools.
85
+ machine-complete by design: 196 capabilities, 186 MCP tools.
86
86
  <!-- /gen:parity:count -->
87
87
 
88
88
  <!-- gen:parity:table -->
@@ -90,6 +90,9 @@ machine-complete by design: 193 capabilities, 186 MCP tools.
90
90
  | --- | --- | --- | --- | --- | --- |
91
91
  | `help` | `cw help` | `—` | `formatHelp` | cli-only | cli-only |
92
92
  | `list` | `cw list` | `cw_list` | `listWorkflows` | both | identical |
93
+ | `info` | `cw info` | `—` | `showApp` | cli-only | cli-only |
94
+ | `search` | `cw search` | `—` | `listApps` | cli-only | cli-only |
95
+ | `man` | `cw man` | `—` | `n/a` | cli-only | cli-only |
93
96
  | `doctor` | `cw doctor` | `—` | `runDoctor` | cli-only | cli-only |
94
97
  | `init` | `cw init` | `cw_init` | `init` | both | identical |
95
98
  | `plan` | `cw plan` | `cw_plan` | `planSummary` | both | identical |
@@ -295,9 +298,12 @@ A capability may be on one surface only, but never without word of it — it mus
295
298
  carry a recorded reason in the registry.
296
299
 
297
300
  <!-- gen:parity:cliOnly -->
298
- Seven capabilities are CLI-only:
301
+ Ten capabilities are CLI-only:
299
302
 
300
303
  - `help` — Human help text. MCP hosts enumerate capabilities via tools/list, not a help command.
304
+ - `info` — Human-focused workflow discovery tool (like Homebrew's `brew info`). MCP agents discover workflows via cw_list and cw_app_show tools.
305
+ - `search` — Human-focused workflow discovery (like Homebrew's `brew search`). MCP agents discover workflows via cw_list tool.
306
+ - `man` — Human documentation viewer. MCP agents read docs/ directly via file tools.
301
307
  - `doctor` — Environment diagnostics are inherently local to the CLI host — Node version, $PATH, $CW_HOME/cwd writability. An MCP client diagnosing the server process's environment is not meaningful; agents already receive the same readiness facts in their typed results (e.g. status: blocked, agentConfigured). Inspired by `brew doctor`.
302
308
  - `loop` — Convenience alias of `schedule create` with kind=loop. MCP hosts use cw_schedule_create with kind=loop.
303
309
  - `schedule daemon` — Long-running desktop daemon process, not a request/response tool. MCP hosts drive ticks via cw_schedule_due + cw_schedule_run_now.
@@ -497,3 +503,7 @@ No other change to this page in v0.1.84.
497
503
  0.1.85
498
504
 
499
505
  0.1.86
506
+
507
+ ## 0.1.87 (v0.1.87)
508
+
509
+ npm test parallel, 4-vendor wrappers (Claude/Codex/Gemini/OpenCode), Homebrew-style CLI UX (colors/did-you-mean/categorized help/error tips/cw info/cw search/cw man/doctor --fix), post-success summaries, agent execution timing
@@ -145,3 +145,7 @@ No other change to this page in v0.1.84.
145
145
  0.1.85
146
146
 
147
147
  0.1.86
148
+
149
+ ## 0.1.87 (v0.1.87)
150
+
151
+ npm test parallel, 4-vendor wrappers (Claude/Codex/Gemini/OpenCode), Homebrew-style CLI UX (colors/did-you-mean/categorized help/error tips/cw info/cw search/cw man/doctor --fix), post-success summaries, agent execution timing
@@ -129,3 +129,7 @@ No other change to this page in v0.1.84.
129
129
  0.1.85
130
130
 
131
131
  0.1.86
132
+
133
+ ## 0.1.87 (v0.1.87)
134
+
135
+ npm test parallel, 4-vendor wrappers (Claude/Codex/Gemini/OpenCode), Homebrew-style CLI UX (colors/did-you-mean/categorized help/error tips/cw info/cw search/cw man/doctor --fix), post-success summaries, agent execution timing
@@ -128,3 +128,7 @@ No other change to this page in v0.1.84.
128
128
  0.1.85
129
129
 
130
130
  0.1.86
131
+
132
+ ## 0.1.87 (v0.1.87)
133
+
134
+ npm test parallel, 4-vendor wrappers (Claude/Codex/Gemini/OpenCode), Homebrew-style CLI UX (colors/did-you-mean/categorized help/error tips/cw info/cw search/cw man/doctor --fix), post-success summaries, agent execution timing
@@ -289,3 +289,7 @@ No other change to this page in v0.1.84.
289
289
  0.1.85
290
290
 
291
291
  0.1.86
292
+
293
+ ## 0.1.87 (v0.1.87)
294
+
295
+ npm test parallel, 4-vendor wrappers (Claude/Codex/Gemini/OpenCode), Homebrew-style CLI UX (colors/did-you-mean/categorized help/error tips/cw info/cw search/cw man/doctor --fix), post-success summaries, agent execution timing
@@ -319,3 +319,7 @@ No other change to this page in v0.1.84.
319
319
  0.1.85
320
320
 
321
321
  0.1.86
322
+
323
+ ## 0.1.87 (v0.1.87)
324
+
325
+ npm test parallel, 4-vendor wrappers (Claude/Codex/Gemini/OpenCode), Homebrew-style CLI UX (colors/did-you-mean/categorized help/error tips/cw info/cw search/cw man/doctor --fix), post-success summaries, agent execution timing
@@ -287,3 +287,7 @@ No other change to this page in v0.1.84.
287
287
  0.1.85
288
288
 
289
289
  0.1.86
290
+
291
+ ## 0.1.87 (v0.1.87)
292
+
293
+ npm test parallel, 4-vendor wrappers (Claude/Codex/Gemini/OpenCode), Homebrew-style CLI UX (colors/did-you-mean/categorized help/error tips/cw info/cw search/cw man/doctor --fix), post-success summaries, agent execution timing
@@ -321,3 +321,7 @@ No other change to this page in v0.1.84.
321
321
  0.1.85
322
322
 
323
323
  0.1.86
324
+
325
+ ## 0.1.87 (v0.1.87)
326
+
327
+ npm test parallel, 4-vendor wrappers (Claude/Codex/Gemini/OpenCode), Homebrew-style CLI UX (colors/did-you-mean/categorized help/error tips/cw info/cw search/cw man/doctor --fix), post-success summaries, agent execution timing
@@ -333,3 +333,7 @@ No other change to this page in v0.1.84.
333
333
  0.1.85
334
334
 
335
335
  0.1.86
336
+
337
+ ## 0.1.87 (v0.1.87)
338
+
339
+ npm test parallel, 4-vendor wrappers (Claude/Codex/Gemini/OpenCode), Homebrew-style CLI UX (colors/did-you-mean/categorized help/error tips/cw info/cw search/cw man/doctor --fix), post-success summaries, agent execution timing
@@ -154,3 +154,7 @@ No other change to this page in v0.1.84.
154
154
  0.1.85
155
155
 
156
156
  0.1.86
157
+
158
+ ## 0.1.87 (v0.1.87)
159
+
160
+ npm test parallel, 4-vendor wrappers (Claude/Codex/Gemini/OpenCode), Homebrew-style CLI UX (colors/did-you-mean/categorized help/error tips/cw info/cw search/cw man/doctor --fix), post-success summaries, agent execution timing
@@ -213,3 +213,7 @@ No other change to this page in v0.1.84.
213
213
  0.1.85
214
214
 
215
215
  0.1.86
216
+
217
+ ## 0.1.87 (v0.1.87)
218
+
219
+ npm test parallel, 4-vendor wrappers (Claude/Codex/Gemini/OpenCode), Homebrew-style CLI UX (colors/did-you-mean/categorized help/error tips/cw info/cw search/cw man/doctor --fix), post-success summaries, agent execution timing
@@ -5,11 +5,11 @@ Generated from the current repository code on 2026-06-19 by `npm run sync:projec
5
5
  ## Snapshot
6
6
 
7
7
  - Package: `cool-workflow`
8
- - Version: `0.1.86`
9
- - Source modules: `63`
8
+ - Version: `0.1.87`
9
+ - Source modules: `64`
10
10
  - Workflow apps: `7`
11
11
  - Docs: `51`
12
- - Smoke tests: `110`
12
+ - Smoke tests: `115`
13
13
  - Repository: https://github.com/coo1white/cool-workflow
14
14
 
15
15
  ## Architecture
@@ -112,6 +112,7 @@ multi-agent host -> topology -> blackboard/coordinator
112
112
  - [telemetry-attestation.ts](../src/telemetry-attestation.ts)
113
113
  - [telemetry-demo.ts](../src/telemetry-demo.ts)
114
114
  - [telemetry-ledger.ts](../src/telemetry-ledger.ts)
115
+ - [term.ts](../src/term.ts)
115
116
  - [validation.ts](../src/validation.ts)
116
117
  - [workbench-host.ts](../src/workbench-host.ts)
117
118
  - [workbench.ts](../src/workbench.ts)
@@ -201,6 +202,8 @@ Smoke tests mirror the public contracts. The high-signal suites are:
201
202
  - [cli-command-surface-smoke.js](../test/cli-command-surface-smoke.js)
202
203
  - [cli-jsonmode-parity-smoke.js](../test/cli-jsonmode-parity-smoke.js)
203
204
  - [cli-mcp-parity-smoke.js](../test/cli-mcp-parity-smoke.js)
205
+ - [codex-agent-wrapper-smoke.js](../test/codex-agent-wrapper-smoke.js)
206
+ - [concurrency-default-smoke.js](../test/concurrency-default-smoke.js)
204
207
  - [concurrent-failure-semantics-smoke.js](../test/concurrent-failure-semantics-smoke.js)
205
208
  - [concurrent-workflow-dsl-smoke.js](../test/concurrent-workflow-dsl-smoke.js)
206
209
  - [contract-migration-tooling-smoke.js](../test/contract-migration-tooling-smoke.js)
@@ -220,6 +223,7 @@ Smoke tests mirror the public contracts. The high-signal suites are:
220
223
  - [evidence-content-extraction-smoke.js](../test/evidence-content-extraction-smoke.js)
221
224
  - [execution-backends-smoke.js](../test/execution-backends-smoke.js)
222
225
  - [freebsd-audit-fixes-smoke.js](../test/freebsd-audit-fixes-smoke.js)
226
+ - [gemini-agent-wrapper-smoke.js](../test/gemini-agent-wrapper-smoke.js)
223
227
  - [h7-custom-profile-persist-smoke.js](../test/h7-custom-profile-persist-smoke.js)
224
228
  - [mcp-app-surface-smoke.js](../test/mcp-app-surface-smoke.js)
225
229
  - [mcp-surface-registry-smoke.js](../test/mcp-surface-registry-smoke.js)
@@ -235,9 +239,11 @@ Smoke tests mirror the public contracts. The high-signal suites are:
235
239
  - [multi-agent-trust-policy-audit-smoke.js](../test/multi-agent-trust-policy-audit-smoke.js)
236
240
  - [no-false-green-smoke.js](../test/no-false-green-smoke.js)
237
241
  - [node-snapshot-diff-replay-smoke.js](../test/node-snapshot-diff-replay-smoke.js)
242
+ - [npm-trusted-publish-smoke.js](../test/npm-trusted-publish-smoke.js)
238
243
  - [observability-cost-accounting-smoke.js](../test/observability-cost-accounting-smoke.js)
239
244
  - [one-way-boundary-smoke.js](../test/one-way-boundary-smoke.js)
240
245
  - [onramp-check-smoke.js](../test/onramp-check-smoke.js)
246
+ - [opencode-agent-wrapper-smoke.js](../test/opencode-agent-wrapper-smoke.js)
241
247
  - [operator-ux-smoke.js](../test/operator-ux-smoke.js)
242
248
  - [parallel-onramp-smoke.js](../test/parallel-onramp-smoke.js)
243
249
  - [parity-doc-sync-smoke.js](../test/parity-doc-sync-smoke.js)
@@ -161,3 +161,7 @@ No other change to this page in v0.1.84.
161
161
  0.1.85
162
162
 
163
163
  0.1.86
164
+
165
+ ## 0.1.87 (v0.1.87)
166
+
167
+ npm test parallel, 4-vendor wrappers (Claude/Codex/Gemini/OpenCode), Homebrew-style CLI UX (colors/did-you-mean/categorized help/error tips/cw info/cw search/cw man/doctor --fix), post-success summaries, agent execution timing
@@ -301,3 +301,7 @@ No other change to this page in v0.1.84.
301
301
  0.1.85
302
302
 
303
303
  0.1.86
304
+
305
+ ## 0.1.87 (v0.1.87)
306
+
307
+ npm test parallel, 4-vendor wrappers (Claude/Codex/Gemini/OpenCode), Homebrew-style CLI UX (colors/did-you-mean/categorized help/error tips/cw info/cw search/cw man/doctor --fix), post-success summaries, agent execution timing
@@ -323,6 +323,16 @@ The orchestration vision came in one release, all reviewer-gated:
323
323
 
324
324
  Set `CW_AGENT_STREAM=1` to see each worker's live agent trace. The bundled claude wrapper (`builtin:claude` / `scripts/agents/claude-p-agent.js`) keeps the legacy `--output-format json` path by default; only the opt-in path runs claude in `--output-format stream-json` and renders a short human trace (tool uses, assistant text, per-turn summaries) to **stderr**. CW core sends that stderr on to the operator's terminal only when `CW_AGENT_STREAM=1`, CW's own stderr is a TTY, and `CW_NO_STREAM` is not set; piped/CI runs stay quiet (Rule of Silence). Core only sends the stream on, never reads it — vendor-specific rendering is the wrapper's business (policy), not the kernel's (mechanism).
325
325
 
326
+ ## Builtin Codex agent wrapper (on main, ships next)
327
+
328
+ `--agent-command builtin:codex` points to a bundled read-only Codex wrapper. It
329
+ runs `codex exec --json --output-last-message`, sends the worker prompt on stdin,
330
+ writes the final answer to `result.md`, and writes one `{model, usage, result}`
331
+ JSON object to stdout for CW provenance. With `CW_AGENT_STREAM=1`, it renders a
332
+ short stderr trace from Codex JSONL events. Gemini, OpenCode, DeepSeek, and GLM
333
+ stay outside CW until their wrapper stream shape is proven by a local smoke; CW
334
+ still imports no model SDK.
335
+
326
336
  v0.1.79
327
337
 
328
338
  ## Fast Architecture Review (v0.1.80)