cool-workflow 0.1.96 → 0.1.97

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 (62) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/apps/architecture-review/app.json +1 -1
  4. package/apps/architecture-review-fast/app.json +1 -1
  5. package/apps/end-to-end-golden-path/app.json +1 -1
  6. package/apps/pr-review-fix-ci/app.json +1 -1
  7. package/apps/release-cut/app.json +1 -1
  8. package/apps/research-synthesis/app.json +1 -1
  9. package/dist/candidate-scoring.js +3 -3
  10. package/dist/capability-core.js +6 -1
  11. package/dist/cli/handlers/scheduling.js +7 -1
  12. package/dist/drive.js +10 -0
  13. package/dist/execution-backend/agent.js +1 -1
  14. package/dist/execution-backend.js +25 -5
  15. package/dist/mcp-server.js +4 -0
  16. package/dist/onramp.js +2 -0
  17. package/dist/orchestrator/app-operations.js +6 -0
  18. package/dist/orchestrator/cli-options.js +8 -2
  19. package/dist/orchestrator/lifecycle-operations.js +3 -0
  20. package/dist/orchestrator/migration-operations.js +1 -1
  21. package/dist/run-export.js +10 -1
  22. package/dist/sandbox-profile.js +6 -1
  23. package/dist/triggers.js +7 -1
  24. package/dist/version.js +1 -1
  25. package/dist/workbench-host.js +7 -1
  26. package/docs/agent-delegation-drive.7.md +2 -0
  27. package/docs/cli-mcp-parity.7.md +2 -0
  28. package/docs/contract-migration-tooling.7.md +2 -0
  29. package/docs/control-plane-scheduling.7.md +2 -0
  30. package/docs/demo.7.md +80 -0
  31. package/docs/doctor.7.md +97 -0
  32. package/docs/durable-state-and-locking.7.md +2 -0
  33. package/docs/evidence-adoption-reasoning-chain.7.md +2 -0
  34. package/docs/execution-backends.7.md +2 -0
  35. package/docs/fix.7.md +44 -0
  36. package/docs/init.7.md +62 -0
  37. package/docs/multi-agent-cli-mcp-surface.7.md +2 -0
  38. package/docs/multi-agent-eval-replay-harness.7.md +2 -0
  39. package/docs/multi-agent-operator-ux.7.md +2 -0
  40. package/docs/node-snapshot-diff-replay.7.md +2 -0
  41. package/docs/observability-cost-accounting.7.md +2 -0
  42. package/docs/pipeline-verbs.7.md +93 -0
  43. package/docs/project-index.md +16 -4
  44. package/docs/real-execution-backends.7.md +2 -0
  45. package/docs/release-and-migration.7.md +2 -0
  46. package/docs/release-tooling.7.md +2 -0
  47. package/docs/routine.7.md +73 -0
  48. package/docs/run-registry-control-plane.7.md +2 -0
  49. package/docs/run-retention-reclamation.7.md +2 -0
  50. package/docs/state-explosion-management.7.md +2 -0
  51. package/docs/team-collaboration.7.md +2 -0
  52. package/docs/web-desktop-workbench.7.md +2 -0
  53. package/manifest/README.md +16 -10
  54. package/manifest/plugin.manifest.json +1 -1
  55. package/package.json +1 -1
  56. package/scripts/agents/agent-adapter-core.js +4 -1
  57. package/scripts/canonical-apps.js +4 -4
  58. package/scripts/children/batch-delegate-child.js +10 -3
  59. package/scripts/children/http-delegate-child.js +2 -1
  60. package/scripts/dogfood-release.js +1 -1
  61. package/scripts/golden-path.js +4 -4
  62. package/scripts/release-flow.js +24 -16
package/docs/fix.7.md ADDED
@@ -0,0 +1,44 @@
1
+ # FIX(7)
2
+
3
+ ## NAME
4
+
5
+ `cw fix` — give back the fix commands for all setup problems
6
+
7
+ ## SYNOPSIS
8
+
9
+ ```text
10
+ node dist/cli.js fix
11
+ node dist/cli.js fix --json
12
+ ```
13
+
14
+ ## DESCRIPTION
15
+
16
+ `cw fix` runs the same setup checks as `cw doctor`, but gives back only the
17
+ fix commands — one numbered step for every check that has a problem. No
18
+ running check detail, no status glyphs; just the directions you need to put
19
+ things right.
20
+
21
+ When the output is empty ("No fixes needed."), the setup is clean and nothing
22
+ needs doing.
23
+
24
+ Like `cw doctor`, the command only reads — it never makes a file or does a
25
+ fix on its own. You are meant to run the fix commands yourself.
26
+
27
+ If any check has status `fail`, the command exits with code 1.
28
+
29
+ ## OPTIONS
30
+
31
+ `--json`
32
+ : Give back the full doctor report as a stable JSON object, with the same shape
33
+ as `cw doctor --json`. The `checks` array carries every fix string.
34
+
35
+ ## EXIT CODES
36
+
37
+ | Exit | Meaning |
38
+ | --- | --- |
39
+ | 0 | No fixes needed — all checks ok or only warnings |
40
+ | 1 | One or more checks have status `fail` |
41
+
42
+ ## SEE ALSO
43
+
44
+ cw doctor — the full setup check with detail for every check
package/docs/init.7.md ADDED
@@ -0,0 +1,62 @@
1
+ # INIT(7)
2
+
3
+ ## NAME
4
+
5
+ `cw init` — scaffold a new workflow definition from nothing
6
+
7
+ ## SYNOPSIS
8
+
9
+ ```text
10
+ node dist/cli.js init <workflow-id> [--title TITLE] [--output PATH] [--force]
11
+ ```
12
+
13
+ ## DESCRIPTION
14
+
15
+ `cw init` makes a new workflow definition file — a `.workflow.js` file filled
16
+ with a simple template. The template has a basic run shape: one step with a
17
+ sandbox profile, one evidence gate, and the hooks you need to add your own
18
+ steps.
19
+
20
+ This is how you start a new workflow app from zero. After `init`, you have a
21
+ real file you can edit to make your own run shape.
22
+
23
+ The workflow id you give is turned into a safe file name (spaces become dashes,
24
+ special signs are taken out). By default, the file is written to the current
25
+ working directory, but you can point it somewhere else with `--output`.
26
+
27
+ If a file of that name is already there, the command refuses to overwrite it
28
+ unless you pass `--force`.
29
+
30
+ ## OPTIONS
31
+
32
+ `--title TITLE`
33
+ : A human name for the workflow. If not given, a title is made from the id.
34
+
35
+ `--output PATH`
36
+ : Where to write the workflow file. Default is `<id>.workflow.js` in the
37
+ current directory.
38
+
39
+ `--force`
40
+ : Overwrite an existing file. Without this flag, the command fails if the
41
+ file already exists.
42
+
43
+ ## EXIT CODES
44
+
45
+ | Exit | Meaning |
46
+ | --- | --- |
47
+ | 0 | Workflow file written |
48
+ | 1 | Missing workflow id, invalid id, or file exists without `--force` |
49
+
50
+ ## FILES
51
+
52
+ ```text
53
+ src/orchestrator.ts (init method)
54
+ src/workflow-app-framework.ts (template renderer)
55
+ ```
56
+
57
+ ## SEE ALSO
58
+
59
+ cw list — see all workflow apps you have
60
+ cw info <id> — read the shape of a workflow app
61
+ workflow-app-framework.7.md — the full framework for writing workflow apps
62
+ pipeline-verbs.7.md — plan, dispatch, result (the pipeline engine)
@@ -319,3 +319,5 @@ The host-facing surface tracks the CLI golden-path fixes (`cw -q` routing + repo
319
319
  0.1.95
320
320
 
321
321
  0.1.96
322
+
323
+ 0.1.97
@@ -345,3 +345,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
345
345
  0.1.95
346
346
 
347
347
  0.1.96
348
+
349
+ 0.1.97
@@ -357,3 +357,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
357
357
  0.1.95
358
358
 
359
359
  0.1.96
360
+
361
+ 0.1.97
@@ -178,3 +178,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
178
178
  0.1.95
179
179
 
180
180
  0.1.96
181
+
182
+ 0.1.97
@@ -237,3 +237,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
237
237
  0.1.95
238
238
 
239
239
  0.1.96
240
+
241
+ 0.1.97
@@ -0,0 +1,93 @@
1
+ # PIPELINE-VERBS(7)
2
+
3
+ ## NAME
4
+
5
+ `cw plan`, `cw dispatch`, `cw result` — the three core pipeline engine verbs
6
+
7
+ ## SYNOPSIS
8
+
9
+ ```text
10
+ node dist/cli.js plan <workflow-id> [--question Q] [--repo PATH] [--sandbox PROFILE]
11
+ node dist/cli.js dispatch <run-id> [--sandbox PROFILE]
12
+ node dist/cli.js result <run-id> <task-id> <result-file>
13
+ ```
14
+
15
+ ## DESCRIPTION
16
+
17
+ These three verbs are the engine that drives every CW run. A run goes through
18
+ three stages: plan (get ready), dispatch (hand out work), and result (take work
19
+ back). Together they make the CW pipeline loop — a worker gets a task, does it,
20
+ and hands in a result file; CW checks the result and moves the run forward.
21
+
22
+ None of these verbs starts or stops the agent host. They give the control-plane
23
+ data that the host reads and acts on. The host keeps its own loop: call
24
+ `dispatch`, give the task to an agent, get back a result file, call `result`.
25
+
26
+ ## PLAN
27
+
28
+ `cw plan <workflow-id>` makes a new run and gives back its canonical plan
29
+ summary in JSON. The plan has the run id, the first task (or tasks) to do,
30
+ the sandbox profile, and the state of the run.
31
+
32
+ The workflow id names a workflow app that gives the run its shape: inputs,
33
+ steps, evidence gates, and sandbox policy. Use `cw list` to see the workflow
34
+ apps you have.
35
+
36
+ The plan output is stable JSON, good for scripts and the agent host.
37
+
38
+ Options:
39
+ : `--question`, `--repo`, `--sandbox` — the same inputs the workflow app
40
+ expects. Different apps take different inputs; see `cw info <workflow-id>`
41
+ for the list.
42
+
43
+ ## DISPATCH
44
+
45
+ `cw dispatch <run-id>` makes the next task ready for a worker. It gives back
46
+ a dispatch manifest in JSON: the task id, the prompt, the sandbox profile, and
47
+ the input and output paths the worker should use.
48
+
49
+ The dispatch picks the next runnable task in the pipeline. If no task is ready
50
+ — for example, all tasks are done or waiting on evidence — the dispatch payload
51
+ says so, and the host should wait or check the run status.
52
+
53
+ Options:
54
+ : `--sandbox PROFILE` — pick a sandbox profile for the worker. The default is
55
+ the one the workflow app asked for.
56
+
57
+ ## RESULT
58
+
59
+ `cw result <run-id> <task-id> <result-file>` records a worker's result against
60
+ a task. The result file is a Markdown file the agent wrote — it must have a
61
+ `cw:result` JSON fence with the agent's `findings` and `evidence`.
62
+
63
+ CW accepts the result, checks it, and advances the run pipeline. If the result
64
+ is bad (missing, broken, or the evidence does not check out), CW rejects it and
65
+ gives back an error feedback record. The host can then try again or give the
66
+ task a different agent.
67
+
68
+ After `result`, the run may be done or have more tasks waiting. Check with
69
+ `cw status <run-id>` or `cw next <run-id>`.
70
+
71
+ ## FILES
72
+
73
+ ```text
74
+ .cw/runs/<run-id>/state.json
75
+ .cw/runs/<run-id>/dispatches/<dispatch-id>.json
76
+ .cw/runs/<run-id>/tasks/<task-id>.json
77
+ .cw/runs/<run-id>/results/<task-id>.md
78
+ .cw/runs/<run-id>/workers/<worker-id>/worker.json
79
+ ```
80
+
81
+ ## PIPELINE FLOW
82
+
83
+ ```text
84
+ plan -> dispatch -> [agent does work] -> result -> [dispatch...] -> done
85
+ └─ rejected -> feedback -> retry
86
+ ```
87
+
88
+ ## SEE ALSO
89
+
90
+ cw init — make a new workflow definition from nothing
91
+ cw status — see the current state of a run
92
+ cw next — find the next action for a run
93
+ pipeline-runner.7.md — the full pipeline engine detail
@@ -1,15 +1,15 @@
1
1
  # Cool Workflow Project Index
2
2
 
3
- Generated from the current repository code on 2026-06-28 by `npm run sync:project-index`.
3
+ Generated from the current repository code on 2026-06-30 by `npm run sync:project-index`.
4
4
 
5
5
  ## Snapshot
6
6
 
7
7
  - Package: `cool-workflow`
8
- - Version: `0.1.96`
8
+ - Version: `0.1.97`
9
9
  - Source modules: `68`
10
10
  - Workflow apps: `8`
11
- - Docs: `53`
12
- - Smoke tests: `158`
11
+ - Docs: `59`
12
+ - Smoke tests: `164`
13
13
  - Repository: https://github.com/coo1white/cool-workflow
14
14
 
15
15
  ## Architecture
@@ -145,14 +145,18 @@ multi-agent host -> topology -> blackboard/coordinator
145
145
  - [Contract Migration Tooling](contract-migration-tooling.7.md)
146
146
  - [Control-Plane Scheduling](control-plane-scheduling.7.md)
147
147
  - [Coordinator / Blackboard](coordinator-blackboard.7.md)
148
+ - [DEMO(7)](demo.7.md)
149
+ - [DOCTOR(7)](doctor.7.md)
148
150
  - [Dogfood One Real Repo](dogfood-one-real-repo.7.md)
149
151
  - [Durable State & Locking](durable-state-and-locking.7.md)
150
152
  - [End-to-End Golden Path](end-to-end-golden-path.7.md)
151
153
  - [ERROR-FEEDBACK(7)](error-feedback.7.md)
152
154
  - [Evidence Adoption Reasoning Chain](evidence-adoption-reasoning-chain.7.md)
153
155
  - [EXECUTION-BACKENDS(7)](execution-backends.7.md)
156
+ - [FIX(7)](fix.7.md)
154
157
  - [Getting Started](getting-started.md)
155
158
  - [Cool Workflow Docs](index.md)
159
+ - [INIT(7)](init.7.md)
156
160
  - [MCP App Surface](mcp-app-surface.7.md)
157
161
  - [Multi-Agent CLI + MCP Surface](multi-agent-cli-mcp-surface.7.md)
158
162
  - [Multi-Agent Eval & Replay Harness](multi-agent-eval-replay-harness.7.md)
@@ -164,6 +168,7 @@ multi-agent host -> topology -> blackboard/coordinator
164
168
  - [Observability + Cost Accounting](observability-cost-accounting.7.md)
165
169
  - [Operator UX](operator-ux.7.md)
166
170
  - [PIPELINE-RUNNER(7)](pipeline-runner.7.md)
171
+ - [PIPELINE-VERBS(7)](pipeline-verbs.7.md)
167
172
  - [Cool Workflow Project Index](project-index.md)
168
173
  - [Cool Workflow](readme-v0.1.87-full.md)
169
174
  - [Real Execution Backend Integrations](real-execution-backends.7.md)
@@ -172,6 +177,7 @@ multi-agent host -> topology -> blackboard/coordinator
172
177
  - [Release Tooling](release-tooling.7.md)
173
178
  - [Remote-Source Review (`--link`)](remote-source-review.7.md)
174
179
  - [Verifiable Report Bundle](report-verifiable-bundle.7.md)
180
+ - [ROUTINE(7)](routine.7.md)
175
181
  - [Routines](routines.md)
176
182
  - [Run Registry / Control Plane](run-registry-control-plane.7.md)
177
183
  - [Run Retention & Provable Reclamation](run-retention-reclamation.7.md)
@@ -196,6 +202,7 @@ Smoke tests mirror the public contracts. The high-signal suites are:
196
202
 
197
203
  - [agent-config-atomic-write-smoke.js](../test/agent-config-atomic-write-smoke.js)
198
204
  - [agent-delegation-drive-smoke.js](../test/agent-delegation-drive-smoke.js)
205
+ - [agent-stream-gate-smoke.js](../test/agent-stream-gate-smoke.js)
199
206
  - [append-run-node-no-realloc-smoke.js](../test/append-run-node-no-realloc-smoke.js)
200
207
  - [architecture-review-fast-automation-smoke.js](../test/architecture-review-fast-automation-smoke.js)
201
208
  - [architecture-review-fast-phase-cache-smoke.js](../test/architecture-review-fast-phase-cache-smoke.js)
@@ -282,6 +289,9 @@ Smoke tests mirror the public contracts. The high-signal suites are:
282
289
  - [operator-ux-smoke.js](../test/operator-ux-smoke.js)
283
290
  - [parallel-onramp-smoke.js](../test/parallel-onramp-smoke.js)
284
291
  - [parity-doc-sync-smoke.js](../test/parity-doc-sync-smoke.js)
292
+ - [parse-guard-smoke.js](../test/parse-guard-smoke.js)
293
+ - [parse-hardening-round2-smoke.js](../test/parse-hardening-round2-smoke.js)
294
+ - [path-containment-smoke.js](../test/path-containment-smoke.js)
285
295
  - [pdca-blackboard-loop-smoke.js](../test/pdca-blackboard-loop-smoke.js)
286
296
  - [pii-redaction-smoke.js](../test/pii-redaction-smoke.js)
287
297
  - [pipeline-auto-advance-smoke.js](../test/pipeline-auto-advance-smoke.js)
@@ -300,6 +310,7 @@ Smoke tests mirror the public contracts. The high-signal suites are:
300
310
  - [release-check-skip-smoke.js](../test/release-check-skip-smoke.js)
301
311
  - [release-flow-smoke.js](../test/release-flow-smoke.js)
302
312
  - [release-gate-smoke.js](../test/release-gate-smoke.js)
313
+ - [release-pipeline-hygiene-smoke.js](../test/release-pipeline-hygiene-smoke.js)
303
314
  - [release-tooling-smoke.js](../test/release-tooling-smoke.js)
304
315
  - [remote-link-archive-smoke.js](../test/remote-link-archive-smoke.js)
305
316
  - [remote-link-git-smoke.js](../test/remote-link-git-smoke.js)
@@ -323,6 +334,7 @@ Smoke tests mirror the public contracts. The high-signal suites are:
323
334
  - [run-resume-drive-smoke.js](../test/run-resume-drive-smoke.js)
324
335
  - [run-retention-reclamation-smoke.js](../test/run-retention-reclamation-smoke.js)
325
336
  - [sample-determinism-smoke.js](../test/sample-determinism-smoke.js)
337
+ - [sandbox-env-batch-hardening-smoke.js](../test/sandbox-env-batch-hardening-smoke.js)
326
338
  - [sandbox-profile-smoke.js](../test/sandbox-profile-smoke.js)
327
339
  - [sched-policy-validation-smoke.js](../test/sched-policy-validation-smoke.js)
328
340
  - [schedule-routine-daemon-smoke.js](../test/schedule-routine-daemon-smoke.js)
@@ -185,3 +185,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
185
185
  0.1.95
186
186
 
187
187
  0.1.96
188
+
189
+ 0.1.97
@@ -325,3 +325,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
325
325
  0.1.95
326
326
 
327
327
  0.1.96
328
+
329
+ 0.1.97
@@ -288,3 +288,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
288
288
  0.1.95
289
289
 
290
290
  0.1.96
291
+
292
+ 0.1.97
@@ -0,0 +1,73 @@
1
+ # ROUTINE(7)
2
+
3
+ ## NAME
4
+
5
+ `cw routine` — make and manage trigger-based workflow routines
6
+
7
+ ## SYNOPSIS
8
+
9
+ ```text
10
+ node dist/cli.js routine create --kind api|github --prompt PROMPT [--match JSON]
11
+ node dist/cli.js routine list [--kind KIND]
12
+ node dist/cli.js routine delete <trigger-id>
13
+ node dist/cli.js routine fire <kind> <payload-file>
14
+ node dist/cli.js routine events [<trigger-id>]
15
+ ```
16
+
17
+ ## DESCRIPTION
18
+
19
+ `cw routine` is the local trigger bridge for CW. It lets you make named
20
+ triggers that fire when something happens — an API event, a GitHub webhook, or
21
+ another outside signal. Each trigger carries a prompt template; when fired,
22
+ the prompt gets filled with the event data and handed to an agent host.
23
+
24
+ CW keeps routine data in:
25
+
26
+ ```text
27
+ .cw/routines/triggers.json
28
+ .cw/routines/payloads/
29
+ ```
30
+
31
+ CW itself does not run a web server or listen for webhooks. The routine bridge
32
+ is a local data store that can be joined to GitHub Actions, webhooks, cron, or
33
+ a small HTTP adapter.
34
+
35
+ ## COMMANDS
36
+
37
+ **create**
38
+ : Make a new trigger. `--kind` is `api` or `github`. `--prompt` is the prompt
39
+ template the agent will see. `--match` is an optional JSON object that filters
40
+ events (for example, `{"action":"opened"}` for GitHub pull requests).
41
+
42
+ **list**
43
+ : List all triggers, or filter by kind with `--kind`.
44
+
45
+ **delete**
46
+ : Remove a trigger by its id.
47
+
48
+ **fire**
49
+ : Record an event against a trigger. Give the trigger kind and a path to a
50
+ JSON payload file. CW matches the payload against the trigger's match rules
51
+ and fills out the prompt.
52
+
53
+ **events**
54
+ : List the events that have been recorded for a trigger.
55
+
56
+ ## FILES
57
+
58
+ ```text
59
+ .cw/routines/triggers.json
60
+ .cw/routines/payloads/<event-id>.json
61
+ ```
62
+
63
+ ## EXIT CODES
64
+
65
+ | Exit | Meaning |
66
+ | --- | --- |
67
+ | 0 | Command done |
68
+ | 1 | Error (bad arguments, missing trigger, etc.) |
69
+
70
+ ## SEE ALSO
71
+
72
+ cw sched — durable run-queue scheduling for workflow runs
73
+ control-plane-scheduling.7.md — the full scheduling and run management design
@@ -468,3 +468,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
468
468
  0.1.95
469
469
 
470
470
  0.1.96
471
+
472
+ 0.1.97
@@ -236,3 +236,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
236
236
  0.1.95
237
237
 
238
238
  0.1.96
239
+
240
+ 0.1.97
@@ -314,3 +314,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
314
314
  0.1.95
315
315
 
316
316
  0.1.96
317
+
318
+ 0.1.97
@@ -250,3 +250,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
250
250
  0.1.95
251
251
 
252
252
  0.1.96
253
+
254
+ 0.1.97
@@ -258,3 +258,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
258
258
  0.1.95
259
259
 
260
260
  0.1.96
261
+
262
+ 0.1.97
@@ -1,11 +1,12 @@
1
1
  # Vendor Manifest Source of Truth
2
2
 
3
3
  Every agent host scans a different, hard-coded manifest directory
4
- (`.claude-plugin/`, `.codex-plugin/`, `.agents/`) with a different JSON shape.
5
- You cannot unify the directory or the schema so we do not try. Instead, all
6
- vendor manifests are **generated** from one neutral source and point at the same
7
- shared runtime (`skills/`, `dist/`, `apps/`, the MCP server). No vendor forks the
8
- logic; each manifest is a thin adapter.
4
+ (`.claude-plugin/`, `.codex-plugin/`, `.agents/`, `.gemini-plugin/`,
5
+ `.opencode-plugin/`) with a different JSON shape. You cannot unify the directory
6
+ or the schema so we do not try. Instead, all vendor manifests are **generated**
7
+ from one neutral source and point at the same shared runtime (`skills/`, `dist/`,
8
+ `apps/`, the MCP server). No vendor forks the logic; each manifest is a thin
9
+ adapter.
9
10
 
10
11
  This is the mechanism/policy split: shared assets are mechanism, per-vendor
11
12
  manifests are policy.
@@ -25,13 +26,18 @@ npm run gen:manifests -- --check # fail (exit 1) if any generated file drifted
25
26
 
26
27
  ## Generated outputs (do NOT hand-edit)
27
28
 
29
+ Five vendors are generated today. Paths are repo-root-relative.
30
+
28
31
  | Vendor | Marketplace | Plugin manifest | MCP config | MCP path var |
29
32
  | --- | --- | --- | --- | --- |
30
- | Claude Code | `../../../.claude-plugin/marketplace.json` | `../.claude-plugin/plugin.json` | `../.mcp.json` (auto-discovered) | `${CLAUDE_PLUGIN_ROOT}/` |
31
- | Codex / `.agents` | `../../../.agents/plugins/marketplace.json` | `../.codex-plugin/plugin.json` | `../.codex-plugin/mcp.json` | `./` |
32
-
33
- The two vendors read **different** MCP files, so the plugin-root path variable
34
- never collides.
33
+ | Claude Code | `.claude-plugin/marketplace.json` | `plugins/cool-workflow/.claude-plugin/plugin.json` | `plugins/cool-workflow/.mcp.json` (auto-discovered) | `${CLAUDE_PLUGIN_ROOT}/` |
34
+ | Codex | `.agents/plugins/marketplace.json` | `plugins/cool-workflow/.codex-plugin/plugin.json` | `plugins/cool-workflow/.codex-plugin/mcp.json` | `./` |
35
+ | `.agents` | — | `.agents/plugins/cool-workflow/plugin.json` | `.agents/plugins/cool-workflow/mcp.json` | `./` |
36
+ | Gemini | | `plugins/cool-workflow/.gemini-plugin/plugin.json` | `plugins/cool-workflow/.gemini-plugin/mcp.json` | `./` |
37
+ | OpenCode | — | `plugins/cool-workflow/.opencode-plugin/plugin.json` | `plugins/cool-workflow/.opencode-plugin/mcp.json` | `./` |
38
+
39
+ Each vendor reads its **own** MCP file, so the plugin-root path variable never
40
+ collides.
35
41
 
36
42
  ## Adding a new vendor (Cursor, Windsurf, …)
37
43
 
@@ -2,7 +2,7 @@
2
2
  "_comment": "SINGLE SOURCE OF TRUTH for every vendor manifest. Edit THIS file, then run `npm run gen:manifests`. Do NOT hand-edit the generated vendor manifests (.claude-plugin/, .codex-plugin/, .agents/, .mcp.json) — `npm run gen:manifests -- --check` (run by release:check) will fail if they drift from this source.",
3
3
  "identity": {
4
4
  "name": "cool-workflow",
5
- "version": "0.1.96",
5
+ "version": "0.1.97",
6
6
  "license": "BSD-2-Clause",
7
7
  "homepage": "https://github.com/coo1white/cool-workflow",
8
8
  "author": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cool-workflow",
3
- "version": "0.1.96",
3
+ "version": "0.1.97",
4
4
  "bin": {
5
5
  "cool-workflow": "scripts/cw.js",
6
6
  "cw": "scripts/cw.js"
@@ -457,9 +457,12 @@ function emitReport(model, usage, resultText) {
457
457
  // `logs/agent-stderr.log` sibling is the natural home. Advisory only: never throws,
458
458
  // never changes the exit code or the recorded evidence.
459
459
  function persistStderr(resultPath, text) {
460
- const t = String(text || "").trim();
460
+ let t = String(text || "").trim();
461
461
  if (!t || !resultPath) return;
462
462
  try {
463
+ t = String(t).replace(/\b(sk-[A-Za-z0-9_-]{20,}|ghp_[A-Za-z0-9]{20,}|xox[bprs]-[A-Za-z0-9-]{20,}|Bearer\s+\S+|Authorization:\s*\S+|api[_-]?key[=:]\s*\S+|token[=:]\s*\S+)/gi, (match) => match.slice(0, 4) + "***[REDACTED]");
464
+ const cap = 4096;
465
+ if (t.length > cap) t = t.slice(0, cap) + `\n [truncated from ${t.length} bytes]`;
463
466
  const dir = path.join(path.dirname(resultPath), "logs");
464
467
  fs.mkdirSync(dir, { recursive: true });
465
468
  fs.writeFileSync(path.join(dir, "agent-stderr.log"), `${t}\n`, "utf8");
@@ -83,7 +83,7 @@ const canonicalApps = [
83
83
  "--source",
84
84
  "plugins/cool-workflow/docs/workflow-app-framework.7.md",
85
85
  "--scope",
86
- "Cool Workflow v0.1.96",
86
+ "Cool Workflow v0.1.97",
87
87
  "--freshness",
88
88
  "as of release preparation"
89
89
  ]
@@ -117,14 +117,14 @@ function main() {
117
117
  assert.ok(summary, `${app.id} must appear in app list`);
118
118
  assert.equal(summary.sourceKind, "app-directory");
119
119
  assert.equal(summary.legacy, false);
120
- assert.equal(summary.version, "0.1.96");
120
+ assert.equal(summary.version, "0.1.97");
121
121
 
122
122
  const validation = runJson(["app", "validate", manifestPath]);
123
123
  assert.equal(validation.valid, true, `${app.id} manifest must validate`);
124
124
 
125
125
  const shown = runJson(["app", "show", app.id]);
126
126
  assert.equal(shown.app.id, app.id);
127
- assert.equal(shown.app.version, "0.1.96");
127
+ assert.equal(shown.app.version, "0.1.97");
128
128
  assert.ok(shown.app.metadata.canonical, `${app.id} must be marked canonical`);
129
129
  assert.ok(shown.app.sandboxProfiles.length > 0, `${app.id} must declare sandbox profiles`);
130
130
  assertTaskIdsUnique(shown);
@@ -135,7 +135,7 @@ function main() {
135
135
  const plan = runJson(["plan", app.id, ...app.args(workspace)]);
136
136
  const state = JSON.parse(fs.readFileSync(plan.statePath, "utf8"));
137
137
  assert.equal(state.workflow.app.id, app.id);
138
- assert.equal(state.workflow.app.version, "0.1.96");
138
+ assert.equal(state.workflow.app.version, "0.1.97");
139
139
  assert.equal(state.workflow.app.metadata.canonical, true);
140
140
  assert.ok(state.tasks.some((task) => task.requiresEvidence), `${app.id} plan must include evidence gates`);
141
141
  assert.ok(state.tasks.every((task) => task.sandboxProfileId), `${app.id} plan must include sandbox hints`);
@@ -18,10 +18,17 @@
18
18
 
19
19
  const { spawn } = require("node:child_process");
20
20
  let raw = "";
21
+ const MAX_STDIN_BYTES = 32 * 1024 * 1024;
21
22
  process.stdin.setEncoding("utf8");
22
- process.stdin.on("data", (d) => (raw += d));
23
+ process.stdin.on("data", (d) => { if (raw.length < MAX_STDIN_BYTES) raw += d; });
23
24
  process.stdin.on("end", () => {
24
- const jobs = JSON.parse(raw);
25
+ let jobs;
26
+ try {
27
+ jobs = JSON.parse(raw);
28
+ } catch (e) {
29
+ process.stdout.write(JSON.stringify([{ spawnError: `invalid stdin JSON: ${String(e && e.message || e)}`, exitCode: null, stdout: "" }]));
30
+ return;
31
+ }
25
32
  if (!jobs.length) { process.stdout.write("[]"); return; }
26
33
  const out = new Array(jobs.length);
27
34
  let pending = jobs.length;
@@ -37,7 +44,7 @@ process.stdin.on("end", () => {
37
44
  };
38
45
  let child;
39
46
  try {
40
- child = spawn(job.binary, job.args, { cwd: job.cwd, env: process.env, shell: false });
47
+ child = spawn(job.binary, job.args, { cwd: job.cwd, env: job.env || process.env, shell: false });
41
48
  } catch (error) {
42
49
  settle({ spawnError: String((error && error.message) || error), exitCode: null, stdout: "" });
43
50
  return;
@@ -15,7 +15,8 @@
15
15
  // API request. Behavior MUST stay byte-identical to the previous embedded string.
16
16
 
17
17
  (async () => {
18
- const read = () => new Promise((res) => { let b = ""; process.stdin.on("data", (c) => (b += c)); process.stdin.on("end", () => res(b)); });
18
+ const MAX_STDIN_BYTES = 32 * 1024 * 1024;
19
+ const read = () => new Promise((res) => { let b = ""; process.stdin.on("data", (c) => { if (b.length < MAX_STDIN_BYTES) b += c; }); process.stdin.on("end", () => res(b)); });
19
20
  try {
20
21
  const job = JSON.parse((await read()) || "{}");
21
22
  const endpoint = process.env.CW_DELEGATE_ENDPOINT;
@@ -6,7 +6,7 @@ const fs = require("node:fs");
6
6
  const path = require("node:path");
7
7
  const { CoolWorkflowRunner } = require("../dist/orchestrator.js");
8
8
 
9
- const TARGET_VERSION = "0.1.96";
9
+ const TARGET_VERSION = "0.1.97";
10
10
  const PREVIOUS_VERSION = "0.1.31";
11
11
  const pluginRoot = path.resolve(__dirname, "..");
12
12
  const repoRoot = path.resolve(pluginRoot, "..", "..");
@@ -33,7 +33,7 @@ function main() {
33
33
  const appValidation = runJson(["app", "validate", "end-to-end-golden-path"], pluginRoot);
34
34
  assert.equal(appValidation.valid, true);
35
35
  assert.equal(appValidation.summary.id, "end-to-end-golden-path");
36
- assert.equal(appValidation.summary.version, "0.1.96");
36
+ assert.equal(appValidation.summary.version, "0.1.97");
37
37
 
38
38
  const plan = runJson(
39
39
  [
@@ -42,7 +42,7 @@ function main() {
42
42
  "--repo",
43
43
  tmp,
44
44
  "--question",
45
- "Prove the deterministic v0.1.96 end-to-end golden path."
45
+ "Prove the deterministic v0.1.97 end-to-end golden path."
46
46
  ],
47
47
  pluginRoot
48
48
  );
@@ -52,7 +52,7 @@ function main() {
52
52
 
53
53
  let state = readJson(plan.statePath);
54
54
  assert.equal(state.workflow.app.id, "end-to-end-golden-path");
55
- assert.equal(state.workflow.app.version, "0.1.96");
55
+ assert.equal(state.workflow.app.version, "0.1.97");
56
56
  assert.equal(state.loopStage, "interpret");
57
57
 
58
58
  const dispatch = runJson(["dispatch", plan.runId, "--limit", "1", "--sandbox", "readonly"], tmp);
@@ -195,7 +195,7 @@ function main() {
195
195
  assert.equal(reportPath, plan.reportPath);
196
196
  assert.ok(fs.existsSync(reportPath));
197
197
  const report = fs.readFileSync(reportPath, "utf8");
198
- assert.match(report, /Workflow App: end-to-end-golden-path@0\.1\.96/);
198
+ assert.match(report, /Workflow App: end-to-end-golden-path@0\.1\.97/);
199
199
  assert.match(report, /## Candidates/);
200
200
  assert.match(report, /## Trust Audit/);
201
201
  assert.match(report, /## Acceptance Rationale/);