cool-workflow 0.1.97 → 0.2.0

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 (309) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/README.md +11 -2
  4. package/apps/architecture-review/app.json +1 -1
  5. package/apps/architecture-review-fast/app.json +1 -1
  6. package/apps/end-to-end-golden-path/app.json +1 -1
  7. package/apps/pr-review-fix-ci/app.json +1 -1
  8. package/apps/release-cut/app.json +1 -1
  9. package/apps/research-synthesis/app.json +1 -1
  10. package/dist/cli/dispatch.js +236 -0
  11. package/dist/cli/entry.js +120 -0
  12. package/dist/cli/io.js +21 -4
  13. package/dist/cli/parseargv.js +157 -0
  14. package/dist/cli.js +6 -33
  15. package/dist/core/capability-table.js +3534 -0
  16. package/dist/core/format/help.js +314 -0
  17. package/dist/{state-explosion/format.js → core/format/state-explosion-text.js} +10 -1
  18. package/dist/core/hash.js +137 -0
  19. package/dist/core/multi-agent/candidate-scoring.js +219 -0
  20. package/dist/core/multi-agent/collaboration.js +481 -0
  21. package/dist/core/multi-agent/coordinator.js +515 -0
  22. package/dist/core/multi-agent/eval-replay.js +306 -0
  23. package/dist/core/multi-agent/runtime.js +929 -0
  24. package/dist/core/multi-agent/topology.js +298 -0
  25. package/dist/core/multi-agent/trust-policy.js +197 -0
  26. package/dist/core/pipeline/commit-gate.js +320 -0
  27. package/dist/{pipeline-contract.js → core/pipeline/contract.js} +24 -37
  28. package/dist/core/pipeline/dispatch.js +103 -0
  29. package/dist/core/pipeline/drive-decide.js +227 -0
  30. package/dist/core/pipeline/error-feedback.js +161 -0
  31. package/dist/core/pipeline/loop-expansion.js +124 -0
  32. package/dist/{result-normalize.js → core/pipeline/result-normalize.js} +14 -37
  33. package/dist/core/pipeline/runner.js +230 -0
  34. package/dist/{contract-migration.js → core/state/contract-migration.js} +68 -92
  35. package/dist/{state-migrations.js → core/state/migrations.js} +103 -96
  36. package/dist/core/state/node-projection.js +95 -0
  37. package/dist/core/state/node-snapshot.js +230 -0
  38. package/dist/core/state/run-paths.js +93 -0
  39. package/dist/{schema-validate.js → core/state/schema-validate.js} +35 -28
  40. package/dist/core/state/schema.js +50 -0
  41. package/dist/core/state/state-explosion/digest.js +243 -0
  42. package/dist/core/state/state-explosion/graph.js +527 -0
  43. package/dist/{state-explosion → core/state/state-explosion}/helpers.js +34 -3
  44. package/dist/core/state/state-explosion/report.js +187 -0
  45. package/dist/{state-explosion → core/state/state-explosion}/size.js +25 -7
  46. package/dist/{state-node.js → core/state/state-node.js} +90 -113
  47. package/dist/core/state/types.js +19 -0
  48. package/dist/{validation.js → core/state/validation.js} +64 -131
  49. package/dist/core/trust/evidence-grounding.js +134 -0
  50. package/dist/core/trust/ledger.js +199 -0
  51. package/dist/{telemetry-attestation.js → core/trust/telemetry-attestation.js} +94 -68
  52. package/dist/core/trust/telemetry-ledger.js +127 -0
  53. package/dist/core/types.js +20 -0
  54. package/dist/core/version.js +16 -0
  55. package/dist/{workflow-app-framework.js → core/workflow-apps/app-schema.js} +337 -426
  56. package/dist/mcp/dispatch.js +104 -0
  57. package/dist/mcp/server.js +144 -0
  58. package/dist/mcp-server.js +6 -84
  59. package/dist/{agent-config.js → shell/agent-config.js} +118 -71
  60. package/dist/shell/app-run-cli.js +88 -0
  61. package/dist/shell/audit-cli.js +259 -0
  62. package/dist/shell/audit-provenance.js +83 -0
  63. package/dist/shell/candidate-scoring-io.js +459 -0
  64. package/dist/shell/collaboration-io.js +264 -0
  65. package/dist/shell/commit-summary.js +104 -0
  66. package/dist/shell/commit.js +290 -0
  67. package/dist/shell/coordinator-io.js +476 -0
  68. package/dist/shell/demo-cli.js +19 -0
  69. package/dist/shell/dispatch.js +162 -0
  70. package/dist/{doctor.js → shell/doctor.js} +123 -56
  71. package/dist/shell/drive.js +873 -0
  72. package/dist/shell/error-feedback-io.js +305 -0
  73. package/dist/shell/eval-io.js +473 -0
  74. package/dist/{multi-agent-eval/format.js → shell/eval-text.js} +78 -49
  75. package/dist/{evidence-reasoning.js → shell/evidence-reasoning.js} +124 -255
  76. package/dist/shell/exec-backend-cli.js +88 -0
  77. package/dist/shell/execution-backend/agent.js +475 -0
  78. package/dist/shell/execution-backend/ci.js +15 -0
  79. package/dist/shell/execution-backend/container.js +69 -0
  80. package/dist/shell/execution-backend/envelopes.js +55 -0
  81. package/dist/shell/execution-backend/local.js +113 -0
  82. package/dist/shell/execution-backend/probes.js +175 -0
  83. package/dist/shell/execution-backend/registry.js +402 -0
  84. package/dist/shell/execution-backend/remote.js +128 -0
  85. package/dist/shell/execution-backend/types.js +11 -0
  86. package/dist/shell/feedback-cli.js +81 -0
  87. package/dist/shell/feedback-operations.js +48 -0
  88. package/dist/shell/fs-atomic.js +276 -0
  89. package/dist/shell/harness.js +98 -0
  90. package/dist/shell/ledger-cli.js +212 -0
  91. package/dist/shell/ledger-io.js +169 -0
  92. package/dist/shell/man-cli.js +89 -0
  93. package/dist/shell/metrics-cli.js +98 -0
  94. package/dist/shell/multi-agent-cli.js +1002 -0
  95. package/dist/shell/multi-agent-host.js +563 -0
  96. package/dist/shell/multi-agent-io.js +387 -0
  97. package/dist/{multi-agent-operator-ux.js → shell/multi-agent-operator-ux.js} +234 -191
  98. package/dist/shell/node-store.js +124 -0
  99. package/dist/{observability/format.js → shell/observability-format.js} +7 -1
  100. package/dist/{observability/intake.js → shell/observability-intake.js} +79 -56
  101. package/dist/{observability.js → shell/observability.js} +159 -332
  102. package/dist/{onramp.js → shell/onramp.js} +11 -0
  103. package/dist/{operator-ux/format.js → shell/operator-ux-text.js} +250 -239
  104. package/dist/shell/operator-ux.js +431 -0
  105. package/dist/shell/orchestrator.js +231 -0
  106. package/dist/shell/pipeline-cli.js +667 -0
  107. package/dist/shell/pipeline.js +217 -0
  108. package/dist/shell/reclamation-io.js +1366 -0
  109. package/dist/shell/registry-cli.js +329 -0
  110. package/dist/{remote-source.js → shell/remote-source.js} +12 -5
  111. package/dist/shell/report-cli.js +101 -0
  112. package/dist/shell/report-view-cli.js +117 -0
  113. package/dist/{orchestrator → shell}/report.js +289 -282
  114. package/dist/shell/reporter.js +62 -0
  115. package/dist/shell/run-export-cli.js +106 -0
  116. package/dist/shell/run-export.js +680 -0
  117. package/dist/shell/run-registry-io.js +1014 -0
  118. package/dist/shell/run-store.js +164 -0
  119. package/dist/{sandbox-profile.js → shell/sandbox-profile.js} +134 -95
  120. package/dist/{scheduler.js → shell/scheduler-io.js} +248 -48
  121. package/dist/shell/scheduling-io.js +311 -0
  122. package/dist/shell/state-cli.js +181 -0
  123. package/dist/shell/state-explosion-cli.js +197 -0
  124. package/dist/shell/telemetry-cli.js +85 -0
  125. package/dist/{telemetry-demo.js → shell/telemetry-demo.js} +149 -119
  126. package/dist/shell/telemetry-ledger-io.js +132 -0
  127. package/dist/{term.js → shell/term.js} +36 -46
  128. package/dist/shell/topology-io.js +361 -0
  129. package/dist/shell/trust-audit.js +471 -0
  130. package/dist/{multi-agent-trust.js → shell/trust-policy-io.js} +67 -205
  131. package/dist/shell/verifier.js +48 -0
  132. package/dist/shell/workbench-host.js +250 -0
  133. package/dist/shell/workbench-text.js +18 -0
  134. package/dist/shell/workbench.js +175 -0
  135. package/dist/shell/worker-cli.js +124 -0
  136. package/dist/shell/worker-isolation.js +852 -0
  137. package/dist/shell/workflow-app-loader.js +650 -0
  138. package/docs/agent-delegation-drive.7.md +4 -0
  139. package/docs/cli-mcp-parity.7.md +284 -211
  140. package/docs/contract-migration-tooling.7.md +4 -0
  141. package/docs/control-plane-scheduling.7.md +4 -0
  142. package/docs/cross-agent-ledger.7.md +217 -0
  143. package/docs/designs/handoff-ledger.md +145 -0
  144. package/docs/durable-state-and-locking.7.md +4 -0
  145. package/docs/evidence-adoption-reasoning-chain.7.md +4 -0
  146. package/docs/execution-backends.7.md +4 -0
  147. package/docs/handoff-setup.md +120 -0
  148. package/docs/multi-agent-cli-mcp-surface.7.md +4 -0
  149. package/docs/multi-agent-eval-replay-harness.7.md +4 -0
  150. package/docs/multi-agent-operator-ux.7.md +4 -0
  151. package/docs/node-snapshot-diff-replay.7.md +4 -0
  152. package/docs/observability-cost-accounting.7.md +4 -0
  153. package/docs/project-index.md +143 -71
  154. package/docs/real-execution-backends.7.md +4 -0
  155. package/docs/release-and-migration.7.md +4 -0
  156. package/docs/release-tooling.7.md +4 -0
  157. package/docs/run-registry-control-plane.7.md +4 -0
  158. package/docs/run-retention-reclamation.7.md +25 -0
  159. package/docs/state-explosion-management.7.md +4 -0
  160. package/docs/team-collaboration.7.md +4 -0
  161. package/docs/web-desktop-workbench.7.md +4 -0
  162. package/manifest/plugin.manifest.json +1 -1
  163. package/manifest/source-context-profiles.json +9 -13
  164. package/package.json +1 -1
  165. package/scripts/agents/codex-agent.js +34 -4
  166. package/scripts/agents/cw-attest-wrap.js +2 -2
  167. package/scripts/bump-version.js +4 -3
  168. package/scripts/canonical-apps.js +4 -4
  169. package/scripts/children/batch-delegate-child.js +30 -10
  170. package/scripts/dogfood-architecture-review.js +2 -3
  171. package/scripts/dogfood-release.js +3 -3
  172. package/scripts/gen-parity-doc.js +15 -2
  173. package/scripts/golden-path.js +4 -4
  174. package/scripts/onramp-check.js +1 -1
  175. package/scripts/parity-check.js +38 -21
  176. package/scripts/release-flow.js +9 -3
  177. package/scripts/sync-project-index.js +51 -27
  178. package/scripts/validate-run-state-schema.js +2 -2
  179. package/scripts/version-sync-check.js +30 -30
  180. package/dist/candidate-scoring.js +0 -729
  181. package/dist/capability-core.js +0 -1186
  182. package/dist/capability-registry.js +0 -879
  183. package/dist/cli/command-surface.js +0 -490
  184. package/dist/cli/format.js +0 -56
  185. package/dist/cli/handlers/audit.js +0 -82
  186. package/dist/cli/handlers/blackboard.js +0 -81
  187. package/dist/cli/handlers/candidate.js +0 -40
  188. package/dist/cli/handlers/clones.js +0 -34
  189. package/dist/cli/handlers/collaboration.js +0 -61
  190. package/dist/cli/handlers/eval.js +0 -40
  191. package/dist/cli/handlers/maintenance.js +0 -107
  192. package/dist/cli/handlers/multi-agent.js +0 -165
  193. package/dist/cli/handlers/node.js +0 -41
  194. package/dist/cli/handlers/operational.js +0 -155
  195. package/dist/cli/handlers/operator.js +0 -146
  196. package/dist/cli/handlers/registry.js +0 -68
  197. package/dist/cli/handlers/run.js +0 -153
  198. package/dist/cli/handlers/scheduling.js +0 -132
  199. package/dist/cli/handlers/workbench.js +0 -41
  200. package/dist/cli/handlers/worker.js +0 -45
  201. package/dist/cli/run-summary.js +0 -45
  202. package/dist/clones.js +0 -162
  203. package/dist/collaboration.js +0 -726
  204. package/dist/commit.js +0 -592
  205. package/dist/compare.js +0 -18
  206. package/dist/coordinator/classify.js +0 -45
  207. package/dist/coordinator/paths.js +0 -42
  208. package/dist/coordinator/util.js +0 -126
  209. package/dist/coordinator.js +0 -990
  210. package/dist/daemon.js +0 -44
  211. package/dist/dispatch.js +0 -250
  212. package/dist/drive.js +0 -827
  213. package/dist/error-feedback.js +0 -419
  214. package/dist/evidence-grounding.js +0 -184
  215. package/dist/execution-backend/agent.js +0 -294
  216. package/dist/execution-backend/probes.js +0 -112
  217. package/dist/execution-backend/util.js +0 -47
  218. package/dist/execution-backend.js +0 -961
  219. package/dist/gates.js +0 -48
  220. package/dist/harness.js +0 -61
  221. package/dist/loop-expansion.js +0 -60
  222. package/dist/mcp/tool-call.js +0 -434
  223. package/dist/mcp/tool-definitions.js +0 -1040
  224. package/dist/mcp-surface.js +0 -30
  225. package/dist/multi-agent/graph.js +0 -84
  226. package/dist/multi-agent/helpers.js +0 -141
  227. package/dist/multi-agent/ids.js +0 -20
  228. package/dist/multi-agent/paths.js +0 -22
  229. package/dist/multi-agent-eval/normalize.js +0 -51
  230. package/dist/multi-agent-eval.js +0 -678
  231. package/dist/multi-agent-host.js +0 -777
  232. package/dist/multi-agent.js +0 -984
  233. package/dist/node-projection.js +0 -59
  234. package/dist/node-snapshot.js +0 -260
  235. package/dist/operator-ux.js +0 -631
  236. package/dist/orchestrator/app-operations.js +0 -211
  237. package/dist/orchestrator/audit-operations.js +0 -182
  238. package/dist/orchestrator/candidate-operations.js +0 -117
  239. package/dist/orchestrator/cli-options.js +0 -294
  240. package/dist/orchestrator/collaboration-operations.js +0 -86
  241. package/dist/orchestrator/feedback-operations.js +0 -81
  242. package/dist/orchestrator/host-operations.js +0 -78
  243. package/dist/orchestrator/lifecycle-operations.js +0 -626
  244. package/dist/orchestrator/migration-operations.js +0 -44
  245. package/dist/orchestrator/multi-agent-operations.js +0 -362
  246. package/dist/orchestrator/topology-operations.js +0 -84
  247. package/dist/orchestrator.js +0 -917
  248. package/dist/pipeline-runner.js +0 -285
  249. package/dist/reclamation/hash.js +0 -72
  250. package/dist/reclamation.js +0 -812
  251. package/dist/reporter.js +0 -67
  252. package/dist/run-export.js +0 -784
  253. package/dist/run-registry/derive.js +0 -175
  254. package/dist/run-registry/format.js +0 -124
  255. package/dist/run-registry/gc.js +0 -251
  256. package/dist/run-registry/policy.js +0 -16
  257. package/dist/run-registry/queue.js +0 -115
  258. package/dist/run-registry.js +0 -850
  259. package/dist/run-state-schema.js +0 -68
  260. package/dist/scheduling.js +0 -184
  261. package/dist/state-explosion.js +0 -1014
  262. package/dist/state.js +0 -367
  263. package/dist/telemetry-ledger.js +0 -196
  264. package/dist/topology.js +0 -565
  265. package/dist/triggers.js +0 -184
  266. package/dist/trust-audit.js +0 -644
  267. package/dist/types/blackboard.js +0 -2
  268. package/dist/types/candidate.js +0 -2
  269. package/dist/types/collaboration.js +0 -2
  270. package/dist/types/core.js +0 -2
  271. package/dist/types/drive.js +0 -10
  272. package/dist/types/error-feedback.js +0 -2
  273. package/dist/types/evidence-reasoning.js +0 -2
  274. package/dist/types/execution-backend.js +0 -2
  275. package/dist/types/multi-agent.js +0 -2
  276. package/dist/types/observability.js +0 -2
  277. package/dist/types/pipeline.js +0 -2
  278. package/dist/types/reclamation.js +0 -8
  279. package/dist/types/report-bundle.js +0 -6
  280. package/dist/types/result.js +0 -2
  281. package/dist/types/run-registry.js +0 -2
  282. package/dist/types/run.js +0 -2
  283. package/dist/types/sandbox.js +0 -2
  284. package/dist/types/schedule.js +0 -2
  285. package/dist/types/state-node.js +0 -2
  286. package/dist/types/topology.js +0 -2
  287. package/dist/types/trust.js +0 -2
  288. package/dist/types/workbench.js +0 -2
  289. package/dist/types/worker.js +0 -2
  290. package/dist/types/workflow-app.js +0 -2
  291. package/dist/types.js +0 -44
  292. package/dist/util/fingerprint.js +0 -19
  293. package/dist/util/fingerprint.test.js +0 -27
  294. package/dist/verifier.js +0 -78
  295. package/dist/version.js +0 -8
  296. package/dist/workbench-host.js +0 -182
  297. package/dist/workbench.js +0 -192
  298. package/dist/worker-accept/acceptance.js +0 -114
  299. package/dist/worker-accept/blackboard-fanout.js +0 -80
  300. package/dist/worker-accept/blackboard-linkage.js +0 -19
  301. package/dist/worker-accept/context.js +0 -2
  302. package/dist/worker-accept/telemetry-ledger.js +0 -126
  303. package/dist/worker-accept/validation.js +0 -77
  304. package/dist/worker-accept/verifier-completion.js +0 -73
  305. package/dist/worker-isolation/helpers.js +0 -51
  306. package/dist/worker-isolation/paths.js +0 -46
  307. package/dist/worker-isolation.js +0 -656
  308. package/dist/workflow-api.js +0 -131
  309. /package/dist/{types → core/types}/boundary.js +0 -0
@@ -1,15 +1,15 @@
1
1
  # Cool Workflow Project Index
2
2
 
3
- Generated from the current repository code on 2026-06-30 by `npm run sync:project-index`.
3
+ Generated from the current repository code on 2026-07-05 by `npm run sync:project-index`.
4
4
 
5
5
  ## Snapshot
6
6
 
7
7
  - Package: `cool-workflow`
8
- - Version: `0.1.97`
9
- - Source modules: `68`
8
+ - Version: `0.2.0`
9
+ - Source modules: `129`
10
10
  - Workflow apps: `8`
11
- - Docs: `59`
12
- - Smoke tests: `164`
11
+ - Docs: `61`
12
+ - Smoke tests: `173`
13
13
  - Repository: https://github.com/coo1white/cool-workflow
14
14
 
15
15
  ## Architecture
@@ -29,40 +29,40 @@ multi-agent host -> topology -> blackboard/coordinator
29
29
 
30
30
  | Module | Responsibility |
31
31
  | --- | --- |
32
- | [orchestrator.ts](../src/orchestrator.ts) | Plans runs, loads workflows, records results, writes reports, and exposes runner commands. |
33
- | [state.ts](../src/state.ts) | Persists run checkpoints, JSON state, run paths, and state migration entrypoints. |
34
- | [state-node.ts](../src/state-node.ts) | Defines explicit state nodes, pipeline transitions, evidence checks, and node persistence. |
35
- | [pipeline-contract.ts](../src/pipeline-contract.ts) | Builds the default pipeline contract used by run state. |
36
- | [pipeline-runner.ts](../src/pipeline-runner.ts) | Finds runnable stages and advances/fails pipeline nodes with retry-aware errors. |
37
- | [types.ts](../src/types.ts) | Owns the shared workflow, run, app, evidence, worker, candidate, audit, and topology types. |
32
+ | [shell/orchestrator.ts](../src/shell/orchestrator.ts) | Plans runs, loads workflows, records results, writes reports, and exposes runner commands (a thin facade over the shell functions below). |
33
+ | [shell/run-store.ts](../src/shell/run-store.ts) | Persists run checkpoints, JSON state, run paths, and state migration entrypoints. |
34
+ | [core/state/state-node.ts](../src/core/state/state-node.ts) | Defines explicit state nodes, pipeline transitions, evidence checks, and node persistence. |
35
+ | [core/pipeline/contract.ts](../src/core/pipeline/contract.ts) | Builds the default pipeline contract used by run state. |
36
+ | [core/pipeline/runner.ts](../src/core/pipeline/runner.ts) | Finds runnable stages and advances/fails pipeline nodes with retry-aware errors. |
37
+ | [core/state/types.ts](../src/core/state/types.ts) | Owns the shared run/state types: WorkflowRun and everything it carries, StateNode, and the pipeline contract shape. |
38
38
 
39
39
  ### Verification and state gates
40
40
 
41
41
  | Module | Responsibility |
42
42
  | --- | --- |
43
- | [verifier.ts](../src/verifier.ts) | Validates result envelopes, findings, evidence, and run gate completion. |
44
- | [commit.ts](../src/commit.ts) | Creates verifier-gated commits and explicit manual checkpoints. |
45
- | [candidate-scoring.ts](../src/candidate-scoring.ts) | Registers, scores, ranks, selects, rejects, and summarizes candidate outputs. |
46
- | [error-feedback.ts](../src/error-feedback.ts) | Turns failures into persisted feedback records and correction tasks. |
47
- | [trust-audit.ts](../src/trust-audit.ts) | Records provenance, sandbox decisions, host attestations, and acceptance rationale. |
43
+ | [shell/verifier.ts](../src/shell/verifier.ts) | Validates result envelopes, findings, evidence, and run gate completion. |
44
+ | [shell/commit.ts](../src/shell/commit.ts) | Creates verifier-gated commits and explicit manual checkpoints. |
45
+ | [core/multi-agent/candidate-scoring.ts](../src/core/multi-agent/candidate-scoring.ts) | Registers, scores, ranks, selects, rejects, and summarizes candidate outputs. |
46
+ | [core/pipeline/error-feedback.ts](../src/core/pipeline/error-feedback.ts) | Turns failures into persisted feedback records and correction tasks. |
47
+ | [shell/trust-audit.ts](../src/shell/trust-audit.ts) | Records provenance, sandbox decisions, host attestations, and acceptance rationale. |
48
48
 
49
49
  ### Workers and policy
50
50
 
51
51
  | Module | Responsibility |
52
52
  | --- | --- |
53
- | [dispatch.ts](../src/dispatch.ts) | Selects runnable tasks and writes dispatch manifests. |
54
- | [worker-isolation.ts](../src/worker-isolation.ts) | Allocates worker scopes, writes manifests, records worker outputs, and validates boundaries. |
55
- | [sandbox-profile.ts](../src/sandbox-profile.ts) | Resolves named sandbox policy contracts and validates read/write/command/network boundaries. |
56
- | [harness.ts](../src/harness.ts) | Renders task files for dispatched work. |
53
+ | [shell/dispatch.ts](../src/shell/dispatch.ts) | Selects runnable tasks and writes dispatch manifests. |
54
+ | [shell/worker-isolation.ts](../src/shell/worker-isolation.ts) | Allocates worker scopes, writes manifests, records worker outputs, and validates boundaries. |
55
+ | [shell/sandbox-profile.ts](../src/shell/sandbox-profile.ts) | Resolves named sandbox policy contracts and validates read/write/command/network boundaries. |
56
+ | [shell/harness.ts](../src/shell/harness.ts) | Renders task files for dispatched work. |
57
57
 
58
58
  ### Multi-agent layer
59
59
 
60
60
  | Module | Responsibility |
61
61
  | --- | --- |
62
- | [multi-agent.ts](../src/multi-agent.ts) | Persists multi-agent runs, roles, groups, memberships, fanouts, and fanins. |
63
- | [coordinator.ts](../src/coordinator.ts) | Owns blackboard topics, messages, context, artifacts, snapshots, and coordinator decisions. |
64
- | [topology.ts](../src/topology.ts) | Defines and applies official map-reduce, debate, and judge-panel topologies. |
65
- | [multi-agent-host.ts](../src/multi-agent-host.ts) | Provides the preferred host loop for run, status, step, blackboard, score, and select. |
62
+ | [core/multi-agent/runtime.ts](../src/core/multi-agent/runtime.ts) | Persists multi-agent runs, roles, groups, memberships, fanouts, and fanins. |
63
+ | [core/multi-agent/coordinator.ts](../src/core/multi-agent/coordinator.ts) | Owns blackboard topics, messages, context, artifacts, snapshots, and coordinator decisions. |
64
+ | [core/multi-agent/topology.ts](../src/core/multi-agent/topology.ts) | Defines and applies official map-reduce, debate, and judge-panel topologies. |
65
+ | [shell/multi-agent-host.ts](../src/shell/multi-agent-host.ts) | Provides the preferred host loop for run, status, step, blackboard, score, and select. |
66
66
 
67
67
  ### User and host surfaces
68
68
 
@@ -70,56 +70,117 @@ multi-agent host -> topology -> blackboard/coordinator
70
70
  | --- | --- |
71
71
  | [cli.ts](../src/cli.ts) | Routes human CLI commands to runtime, app, topology, multi-agent, and operator flows. |
72
72
  | [mcp-server.ts](../src/mcp-server.ts) | Exposes JSON-RPC/MCP tool parity for agent hosts. |
73
- | [operator-ux.ts](../src/operator-ux.ts) | Formats status, reports, graph, worker, candidate, feedback, commit, and trust summaries. |
74
- | [workflow-app-framework.ts](../src/workflow-app-framework.ts) | Validates app manifests and loads app entrypoints. |
75
- | [workflow-api.ts](../src/workflow-api.ts) | Provides the fluent workflow, phase, task, artifact, and input API. |
76
- | [daemon.ts](../src/daemon.ts) | Runs scheduled tasks through the desktop scheduler daemon. |
77
- | [scheduler.ts](../src/scheduler.ts) | Creates, stores, computes, and runs schedules. |
78
- | [triggers.ts](../src/triggers.ts) | Bridges routine triggers to explicit workflow events. |
79
- | [version.ts](../src/version.ts) | Defines current package and state schema versions. |
73
+ | [shell/operator-ux.ts](../src/shell/operator-ux.ts) | Formats status, reports, graph, worker, candidate, feedback, commit, and trust summaries. |
74
+ | [shell/workflow-app-loader.ts](../src/shell/workflow-app-loader.ts) | Validates app manifests and loads app entrypoints. |
75
+ | [core/workflow-apps/app-schema.ts](../src/core/workflow-apps/app-schema.ts) | Provides the fluent workflow, phase, task, artifact, and input API. |
76
+ | [shell/scheduler-io.ts](../src/shell/scheduler-io.ts) | Runs wall-clock schedules, the desktop scheduler daemon tick, and routine triggers. |
77
+ | [core/version.ts](../src/core/version.ts) | Defines current package and state schema versions. |
80
78
 
81
79
  ### Other Source Modules
82
80
 
83
- - [agent-config.ts](../src/agent-config.ts)
84
- - [capability-core.ts](../src/capability-core.ts)
85
- - [capability-registry.ts](../src/capability-registry.ts)
86
- - [clones.ts](../src/clones.ts)
87
- - [collaboration.ts](../src/collaboration.ts)
88
- - [compare.ts](../src/compare.ts)
89
- - [contract-migration.ts](../src/contract-migration.ts)
90
- - [doctor.ts](../src/doctor.ts)
91
- - [drive.ts](../src/drive.ts)
92
- - [evidence-grounding.ts](../src/evidence-grounding.ts)
93
- - [evidence-reasoning.ts](../src/evidence-reasoning.ts)
94
- - [execution-backend.ts](../src/execution-backend.ts)
95
- - [gates.ts](../src/gates.ts)
96
- - [loop-expansion.ts](../src/loop-expansion.ts)
97
- - [mcp-surface.ts](../src/mcp-surface.ts)
98
- - [multi-agent-eval.ts](../src/multi-agent-eval.ts)
99
- - [multi-agent-operator-ux.ts](../src/multi-agent-operator-ux.ts)
100
- - [multi-agent-trust.ts](../src/multi-agent-trust.ts)
101
- - [node-projection.ts](../src/node-projection.ts)
102
- - [node-snapshot.ts](../src/node-snapshot.ts)
103
- - [observability.ts](../src/observability.ts)
104
- - [onramp.ts](../src/onramp.ts)
105
- - [reclamation.ts](../src/reclamation.ts)
106
- - [remote-source.ts](../src/remote-source.ts)
107
- - [reporter.ts](../src/reporter.ts)
108
- - [result-normalize.ts](../src/result-normalize.ts)
109
- - [run-export.ts](../src/run-export.ts)
110
- - [run-registry.ts](../src/run-registry.ts)
111
- - [run-state-schema.ts](../src/run-state-schema.ts)
112
- - [scheduling.ts](../src/scheduling.ts)
113
- - [schema-validate.ts](../src/schema-validate.ts)
114
- - [state-explosion.ts](../src/state-explosion.ts)
115
- - [state-migrations.ts](../src/state-migrations.ts)
116
- - [telemetry-attestation.ts](../src/telemetry-attestation.ts)
117
- - [telemetry-demo.ts](../src/telemetry-demo.ts)
118
- - [telemetry-ledger.ts](../src/telemetry-ledger.ts)
119
- - [term.ts](../src/term.ts)
120
- - [validation.ts](../src/validation.ts)
121
- - [workbench-host.ts](../src/workbench-host.ts)
122
- - [workbench.ts](../src/workbench.ts)
81
+ - [cli/dispatch.ts](../src/cli/dispatch.ts)
82
+ - [cli/entry.ts](../src/cli/entry.ts)
83
+ - [cli/io.ts](../src/cli/io.ts)
84
+ - [cli/parseargv.ts](../src/cli/parseargv.ts)
85
+ - [core/capability-table.ts](../src/core/capability-table.ts)
86
+ - [core/format/help.ts](../src/core/format/help.ts)
87
+ - [core/format/state-explosion-text.ts](../src/core/format/state-explosion-text.ts)
88
+ - [core/hash.ts](../src/core/hash.ts)
89
+ - [core/multi-agent/collaboration.ts](../src/core/multi-agent/collaboration.ts)
90
+ - [core/multi-agent/eval-replay.ts](../src/core/multi-agent/eval-replay.ts)
91
+ - [core/multi-agent/trust-policy.ts](../src/core/multi-agent/trust-policy.ts)
92
+ - [core/pipeline/commit-gate.ts](../src/core/pipeline/commit-gate.ts)
93
+ - [core/pipeline/dispatch.ts](../src/core/pipeline/dispatch.ts)
94
+ - [core/pipeline/drive-decide.ts](../src/core/pipeline/drive-decide.ts)
95
+ - [core/pipeline/loop-expansion.ts](../src/core/pipeline/loop-expansion.ts)
96
+ - [core/pipeline/result-normalize.ts](../src/core/pipeline/result-normalize.ts)
97
+ - [core/state/contract-migration.ts](../src/core/state/contract-migration.ts)
98
+ - [core/state/migrations.ts](../src/core/state/migrations.ts)
99
+ - [core/state/node-projection.ts](../src/core/state/node-projection.ts)
100
+ - [core/state/node-snapshot.ts](../src/core/state/node-snapshot.ts)
101
+ - [core/state/run-paths.ts](../src/core/state/run-paths.ts)
102
+ - [core/state/schema-validate.ts](../src/core/state/schema-validate.ts)
103
+ - [core/state/schema.ts](../src/core/state/schema.ts)
104
+ - [core/state/state-explosion/digest.ts](../src/core/state/state-explosion/digest.ts)
105
+ - [core/state/state-explosion/graph.ts](../src/core/state/state-explosion/graph.ts)
106
+ - [core/state/state-explosion/helpers.ts](../src/core/state/state-explosion/helpers.ts)
107
+ - [core/state/state-explosion/report.ts](../src/core/state/state-explosion/report.ts)
108
+ - [core/state/state-explosion/size.ts](../src/core/state/state-explosion/size.ts)
109
+ - [core/state/validation.ts](../src/core/state/validation.ts)
110
+ - [core/trust/evidence-grounding.ts](../src/core/trust/evidence-grounding.ts)
111
+ - [core/trust/ledger.ts](../src/core/trust/ledger.ts)
112
+ - [core/trust/telemetry-attestation.ts](../src/core/trust/telemetry-attestation.ts)
113
+ - [core/trust/telemetry-ledger.ts](../src/core/trust/telemetry-ledger.ts)
114
+ - [core/types.ts](../src/core/types.ts)
115
+ - [core/types/boundary.ts](../src/core/types/boundary.ts)
116
+ - [mcp/dispatch.ts](../src/mcp/dispatch.ts)
117
+ - [mcp/server.ts](../src/mcp/server.ts)
118
+ - [shell/agent-config.ts](../src/shell/agent-config.ts)
119
+ - [shell/app-run-cli.ts](../src/shell/app-run-cli.ts)
120
+ - [shell/audit-cli.ts](../src/shell/audit-cli.ts)
121
+ - [shell/audit-provenance.ts](../src/shell/audit-provenance.ts)
122
+ - [shell/candidate-scoring-io.ts](../src/shell/candidate-scoring-io.ts)
123
+ - [shell/collaboration-io.ts](../src/shell/collaboration-io.ts)
124
+ - [shell/commit-summary.ts](../src/shell/commit-summary.ts)
125
+ - [shell/coordinator-io.ts](../src/shell/coordinator-io.ts)
126
+ - [shell/demo-cli.ts](../src/shell/demo-cli.ts)
127
+ - [shell/doctor.ts](../src/shell/doctor.ts)
128
+ - [shell/drive.ts](../src/shell/drive.ts)
129
+ - [shell/error-feedback-io.ts](../src/shell/error-feedback-io.ts)
130
+ - [shell/eval-io.ts](../src/shell/eval-io.ts)
131
+ - [shell/eval-text.ts](../src/shell/eval-text.ts)
132
+ - [shell/evidence-reasoning.ts](../src/shell/evidence-reasoning.ts)
133
+ - [shell/exec-backend-cli.ts](../src/shell/exec-backend-cli.ts)
134
+ - [shell/execution-backend/agent.ts](../src/shell/execution-backend/agent.ts)
135
+ - [shell/execution-backend/ci.ts](../src/shell/execution-backend/ci.ts)
136
+ - [shell/execution-backend/container.ts](../src/shell/execution-backend/container.ts)
137
+ - [shell/execution-backend/envelopes.ts](../src/shell/execution-backend/envelopes.ts)
138
+ - [shell/execution-backend/local.ts](../src/shell/execution-backend/local.ts)
139
+ - [shell/execution-backend/probes.ts](../src/shell/execution-backend/probes.ts)
140
+ - [shell/execution-backend/registry.ts](../src/shell/execution-backend/registry.ts)
141
+ - [shell/execution-backend/remote.ts](../src/shell/execution-backend/remote.ts)
142
+ - [shell/execution-backend/types.ts](../src/shell/execution-backend/types.ts)
143
+ - [shell/feedback-cli.ts](../src/shell/feedback-cli.ts)
144
+ - [shell/feedback-operations.ts](../src/shell/feedback-operations.ts)
145
+ - [shell/fs-atomic.ts](../src/shell/fs-atomic.ts)
146
+ - [shell/ledger-cli.ts](../src/shell/ledger-cli.ts)
147
+ - [shell/ledger-io.ts](../src/shell/ledger-io.ts)
148
+ - [shell/man-cli.ts](../src/shell/man-cli.ts)
149
+ - [shell/metrics-cli.ts](../src/shell/metrics-cli.ts)
150
+ - [shell/multi-agent-cli.ts](../src/shell/multi-agent-cli.ts)
151
+ - [shell/multi-agent-io.ts](../src/shell/multi-agent-io.ts)
152
+ - [shell/multi-agent-operator-ux.ts](../src/shell/multi-agent-operator-ux.ts)
153
+ - [shell/node-store.ts](../src/shell/node-store.ts)
154
+ - [shell/observability-format.ts](../src/shell/observability-format.ts)
155
+ - [shell/observability-intake.ts](../src/shell/observability-intake.ts)
156
+ - [shell/observability.ts](../src/shell/observability.ts)
157
+ - [shell/onramp.ts](../src/shell/onramp.ts)
158
+ - [shell/operator-ux-text.ts](../src/shell/operator-ux-text.ts)
159
+ - [shell/pipeline-cli.ts](../src/shell/pipeline-cli.ts)
160
+ - [shell/pipeline.ts](../src/shell/pipeline.ts)
161
+ - [shell/reclamation-io.ts](../src/shell/reclamation-io.ts)
162
+ - [shell/registry-cli.ts](../src/shell/registry-cli.ts)
163
+ - [shell/remote-source.ts](../src/shell/remote-source.ts)
164
+ - [shell/report-cli.ts](../src/shell/report-cli.ts)
165
+ - [shell/report-view-cli.ts](../src/shell/report-view-cli.ts)
166
+ - [shell/report.ts](../src/shell/report.ts)
167
+ - [shell/reporter.ts](../src/shell/reporter.ts)
168
+ - [shell/run-export-cli.ts](../src/shell/run-export-cli.ts)
169
+ - [shell/run-export.ts](../src/shell/run-export.ts)
170
+ - [shell/run-registry-io.ts](../src/shell/run-registry-io.ts)
171
+ - [shell/scheduling-io.ts](../src/shell/scheduling-io.ts)
172
+ - [shell/state-cli.ts](../src/shell/state-cli.ts)
173
+ - [shell/state-explosion-cli.ts](../src/shell/state-explosion-cli.ts)
174
+ - [shell/telemetry-cli.ts](../src/shell/telemetry-cli.ts)
175
+ - [shell/telemetry-demo.ts](../src/shell/telemetry-demo.ts)
176
+ - [shell/telemetry-ledger-io.ts](../src/shell/telemetry-ledger-io.ts)
177
+ - [shell/term.ts](../src/shell/term.ts)
178
+ - [shell/topology-io.ts](../src/shell/topology-io.ts)
179
+ - [shell/trust-policy-io.ts](../src/shell/trust-policy-io.ts)
180
+ - [shell/workbench-host.ts](../src/shell/workbench-host.ts)
181
+ - [shell/workbench-text.ts](../src/shell/workbench-text.ts)
182
+ - [shell/workbench.ts](../src/shell/workbench.ts)
183
+ - [shell/worker-cli.ts](../src/shell/worker-cli.ts)
123
184
 
124
185
  ## Workflow Apps
125
186
 
@@ -145,6 +206,7 @@ multi-agent host -> topology -> blackboard/coordinator
145
206
  - [Contract Migration Tooling](contract-migration-tooling.7.md)
146
207
  - [Control-Plane Scheduling](control-plane-scheduling.7.md)
147
208
  - [Coordinator / Blackboard](coordinator-blackboard.7.md)
209
+ - [Cross-Agent Handoff Ledger](cross-agent-ledger.7.md)
148
210
  - [DEMO(7)](demo.7.md)
149
211
  - [DOCTOR(7)](doctor.7.md)
150
212
  - [Dogfood One Real Repo](dogfood-one-real-repo.7.md)
@@ -155,6 +217,7 @@ multi-agent host -> topology -> blackboard/coordinator
155
217
  - [EXECUTION-BACKENDS(7)](execution-backends.7.md)
156
218
  - [FIX(7)](fix.7.md)
157
219
  - [Getting Started](getting-started.md)
220
+ - [Handoff ledger — shared-repo setup (T2a)](handoff-setup.md)
158
221
  - [Cool Workflow Docs](index.md)
159
222
  - [INIT(7)](init.7.md)
160
223
  - [MCP App Surface](mcp-app-surface.7.md)
@@ -210,6 +273,7 @@ Smoke tests mirror the public contracts. The high-signal suites are:
210
273
  - [artifact-integrity-smoke.js](../test/artifact-integrity-smoke.js)
211
274
  - [audit-verify-smoke.js](../test/audit-verify-smoke.js)
212
275
  - [backend-registry-smoke.js](../test/backend-registry-smoke.js)
276
+ - [batch-output-overflow-smoke.js](../test/batch-output-overflow-smoke.js)
213
277
  - [blackboard-state-explosion-management-smoke.js](../test/blackboard-state-explosion-management-smoke.js)
214
278
  - [block-unapproved-tag-smoke.js](../test/block-unapproved-tag-smoke.js)
215
279
  - [budget-scaling-loop-smoke.js](../test/budget-scaling-loop-smoke.js)
@@ -235,6 +299,7 @@ Smoke tests mirror the public contracts. The high-signal suites are:
235
299
  - [collaboration-ops-unit-smoke.js](../test/collaboration-ops-unit-smoke.js)
236
300
  - [concurrency-default-smoke.js](../test/concurrency-default-smoke.js)
237
301
  - [concurrent-failure-semantics-smoke.js](../test/concurrent-failure-semantics-smoke.js)
302
+ - [concurrent-subworkflow-cache-nesting-smoke.js](../test/concurrent-subworkflow-cache-nesting-smoke.js)
238
303
  - [concurrent-workflow-dsl-smoke.js](../test/concurrent-workflow-dsl-smoke.js)
239
304
  - [contract-migration-tooling-smoke.js](../test/contract-migration-tooling-smoke.js)
240
305
  - [control-plane-scheduling-smoke.js](../test/control-plane-scheduling-smoke.js)
@@ -242,11 +307,14 @@ Smoke tests mirror the public contracts. The high-signal suites are:
242
307
  - [cw-help-per-command-smoke.js](../test/cw-help-per-command-smoke.js)
243
308
  - [dead-export-removal-guard-smoke.js](../test/dead-export-removal-guard-smoke.js)
244
309
  - [deepseek-agent-wrapper-smoke.js](../test/deepseek-agent-wrapper-smoke.js)
310
+ - [deferred-checkpoint-batching-smoke.js](../test/deferred-checkpoint-batching-smoke.js)
245
311
  - [demo-bundle-smoke.js](../test/demo-bundle-smoke.js)
246
312
  - [det-ids-b-smoke.js](../test/det-ids-b-smoke.js)
247
313
  - [doctor-smoke.js](../test/doctor-smoke.js)
248
314
  - [dogfood-architecture-review-smoke.js](../test/dogfood-architecture-review-smoke.js)
249
315
  - [dogfood-release-smoke.js](../test/dogfood-release-smoke.js)
316
+ - [drive-concurrency-flag-smoke.js](../test/drive-concurrency-flag-smoke.js)
317
+ - [drive-exhaustion-blocked-smoke.js](../test/drive-exhaustion-blocked-smoke.js)
250
318
  - [durable-atomic-write-smoke.js](../test/durable-atomic-write-smoke.js)
251
319
  - [end-to-end-demo-smoke.js](../test/end-to-end-demo-smoke.js)
252
320
  - [end-to-end-golden-path-smoke.js](../test/end-to-end-golden-path-smoke.js)
@@ -264,6 +332,9 @@ Smoke tests mirror the public contracts. The high-signal suites are:
264
332
  - [h7-custom-profile-persist-smoke.js](../test/h7-custom-profile-persist-smoke.js)
265
333
  - [headline-commands-smoke.js](../test/headline-commands-smoke.js)
266
334
  - [incremental-resume-smoke.js](../test/incremental-resume-smoke.js)
335
+ - [ledger-apply-smoke.js](../test/ledger-apply-smoke.js)
336
+ - [ledger-resolution-smoke.js](../test/ledger-resolution-smoke.js)
337
+ - [ledger-verify-smoke.js](../test/ledger-verify-smoke.js)
267
338
  - [loop-bounded-expansion-smoke.js](../test/loop-bounded-expansion-smoke.js)
268
339
  - [mcp-app-surface-smoke.js](../test/mcp-app-surface-smoke.js)
269
340
  - [mcp-surface-registry-smoke.js](../test/mcp-surface-registry-smoke.js)
@@ -287,6 +358,7 @@ Smoke tests mirror the public contracts. The high-signal suites are:
287
358
  - [onramp-check-smoke.js](../test/onramp-check-smoke.js)
288
359
  - [opencode-agent-wrapper-smoke.js](../test/opencode-agent-wrapper-smoke.js)
289
360
  - [operator-ux-smoke.js](../test/operator-ux-smoke.js)
361
+ - [orphan-runs-gc-smoke.js](../test/orphan-runs-gc-smoke.js)
290
362
  - [parallel-onramp-smoke.js](../test/parallel-onramp-smoke.js)
291
363
  - [parity-doc-sync-smoke.js](../test/parity-doc-sync-smoke.js)
292
364
  - [parse-guard-smoke.js](../test/parse-guard-smoke.js)
@@ -187,3 +187,7 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
187
187
  0.1.96
188
188
 
189
189
  0.1.97
190
+
191
+ 0.1.98
192
+
193
+ 0.2.0
@@ -327,3 +327,7 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
327
327
  0.1.96
328
328
 
329
329
  0.1.97
330
+
331
+ 0.1.98
332
+
333
+ 0.2.0
@@ -290,3 +290,7 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
290
290
  0.1.96
291
291
 
292
292
  0.1.97
293
+
294
+ 0.1.98
295
+
296
+ 0.2.0
@@ -470,3 +470,7 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
470
470
  0.1.96
471
471
 
472
472
  0.1.97
473
+
474
+ 0.1.98
475
+
476
+ 0.2.0
@@ -107,6 +107,27 @@ scratch dir) is **re-pointed** to the retained `results/<task-id>.md` copy, and
107
107
  result-node snapshot is shown to stay `valid` (not `absent`) — so no surviving
108
108
  node points to a freed path. Opt out with `--keep-scratch`.
109
109
 
110
+ ## Orphan runs — a second pure-scratch case, OUTSIDE this transaction
111
+
112
+ A run directory can also be pure scratch a different way: a process killed or
113
+ interrupted before it ever wrote a first `state.json` (the window between
114
+ `ensureRunDirs` and the first `saveCheckpoint`). Such a directory never becomes a
115
+ `RunRecord` at all, so `gc plan`/`gc run` can never see it, let alone reclaim it —
116
+ `reclaimEligibility` requires a record to classify in the first place. `cw orphans
117
+ list`/`cw orphans gc` (`src/run-registry/orphans.ts`) reclaim exactly this case,
118
+ age-gated by default. Unlike everything else on this page, an orphan sweep
119
+ produces **no skeleton and no tombstone** — there is no durable state to seal, so
120
+ there is nothing to prove. It is a plain, un-audited delete of a directory the
121
+ registry never knew existed, not a new tier of the `live -> archived -> reclaimed`
122
+ lifecycle above.
123
+
124
+ **Known gap, not covered by either mechanism:** a run stuck `running`/`queued`/
125
+ `blocked` with a perfectly valid but stale `state.json` (its owning process died
126
+ without ever reaching a terminal state) is reclaimed by NEITHER `gc.ts` (fail-closes
127
+ on `non-terminal`, no age override) NOR `orphans.ts` (it has a `state.json`, so it
128
+ is not an orphan candidate). As of this writing nothing in `cw` reclaims that
129
+ class of run; it is left `retained` indefinitely rather than guessed at.
130
+
110
131
  ## CLI
111
132
 
112
133
  ```
@@ -238,3 +259,7 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
238
259
  0.1.96
239
260
 
240
261
  0.1.97
262
+
263
+ 0.1.98
264
+
265
+ 0.2.0
@@ -316,3 +316,7 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
316
316
  0.1.96
317
317
 
318
318
  0.1.97
319
+
320
+ 0.1.98
321
+
322
+ 0.2.0
@@ -252,3 +252,7 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
252
252
  0.1.96
253
253
 
254
254
  0.1.97
255
+
256
+ 0.1.98
257
+
258
+ 0.2.0
@@ -260,3 +260,7 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
260
260
  0.1.96
261
261
 
262
262
  0.1.97
263
+
264
+ 0.1.98
265
+
266
+ 0.2.0
@@ -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.97",
5
+ "version": "0.2.0",
6
6
  "license": "BSD-2-Clause",
7
7
  "homepage": "https://github.com/coo1white/cool-workflow",
8
8
  "author": {
@@ -47,11 +47,11 @@
47
47
  "description": "MCP and CLI surface context for capability registry, MCP server, CLI routing, and MCP launcher wrappers.",
48
48
  "maxLines": 18000,
49
49
  "include": [
50
- "plugins/cool-workflow/src/capability-core.ts",
51
- "plugins/cool-workflow/src/capability-registry.ts",
50
+ "plugins/cool-workflow/src/core/capability-table.ts",
52
51
  "plugins/cool-workflow/src/cli.ts",
52
+ "plugins/cool-workflow/src/cli/**",
53
53
  "plugins/cool-workflow/src/mcp-server.ts",
54
- "plugins/cool-workflow/src/types/**",
54
+ "plugins/cool-workflow/src/mcp/**",
55
55
  "plugins/cool-workflow/scripts/cw.js",
56
56
  "plugins/cool-workflow/scripts/mcp-server.js",
57
57
  "plugins/cool-workflow/package.json",
@@ -72,11 +72,9 @@
72
72
  "maxLines": 18000,
73
73
  "include": [
74
74
  "plugins/cool-workflow/apps/**",
75
- "plugins/cool-workflow/src/workflow-app-framework.ts",
76
- "plugins/cool-workflow/src/orchestrator.ts",
77
- "plugins/cool-workflow/src/orchestrator/**",
78
- "plugins/cool-workflow/src/types/workflow-app.ts",
79
- "plugins/cool-workflow/src/types/run.ts",
75
+ "plugins/cool-workflow/src/shell/workflow-app-loader.ts",
76
+ "plugins/cool-workflow/src/shell/app-run-cli.ts",
77
+ "plugins/cool-workflow/src/core/workflow-apps/**",
80
78
  "plugins/cool-workflow/scripts/canonical-apps.js",
81
79
  "plugins/cool-workflow/package.json",
82
80
  "plugins/cool-workflow/tsconfig.json"
@@ -121,11 +119,9 @@
121
119
  "include": [
122
120
  "plugins/cool-workflow/scripts/agents/**",
123
121
  "plugins/cool-workflow/scripts/architecture-review-fast.js",
124
- "plugins/cool-workflow/src/agent-config.ts",
125
- "plugins/cool-workflow/src/execution-backend.ts",
126
- "plugins/cool-workflow/src/drive.ts",
127
- "plugins/cool-workflow/src/types/execution-backend.ts",
128
- "plugins/cool-workflow/src/types/drive.ts",
122
+ "plugins/cool-workflow/src/shell/agent-config.ts",
123
+ "plugins/cool-workflow/src/shell/execution-backend/**",
124
+ "plugins/cool-workflow/src/shell/drive.ts",
129
125
  "plugins/cool-workflow/package.json",
130
126
  "plugins/cool-workflow/docs/agent-delegation-drive.7.md"
131
127
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cool-workflow",
3
- "version": "0.1.97",
3
+ "version": "0.2.0",
4
4
  "bin": {
5
5
  "cool-workflow": "scripts/cw.js",
6
6
  "cw": "scripts/cw.js"
@@ -21,6 +21,16 @@
21
21
  // per-run override that does NOT touch the user's interactive codex. Tune with
22
22
  // CW_CODEX_REASONING_EFFORT (default "low"); set it to "medium"/"high" to opt back
23
23
  // into more thinking.
24
+ //
25
+ // REVIEW MODE: the default low-effort / read-only sandbox is right for a fast
26
+ // delegated worker or a liveness probe — but WRONG for an independent RELEASE
27
+ // reviewer, which must actually RE-RUN the gate (build, tests, regenerate dist)
28
+ // to earn its verdict. A read-only sandbox can't execute that gate, so the model
29
+ // is structurally unable to verify and tends to fabricate a REJECTED. The release
30
+ // path therefore sets CW_RELEASE_REVIEW=1 (a vendor-agnostic signal from
31
+ // release-flow.js): on that signal this wrapper raises reasoning to "high" and
32
+ // opens the sandbox to "workspace-write" so codex can run the gate it is judging.
33
+ // Explicit CW_CODEX_REASONING_EFFORT / CW_CODEX_SANDBOX always win over the signal.
24
34
 
25
35
  const fs = require("node:fs");
26
36
  const os = require("node:os");
@@ -80,11 +90,31 @@ function recordJsonLine(line) {
80
90
  }
81
91
  }
82
92
 
83
- render.action("codex: reading the repo (read-only)…");
93
+ // A release review (CW_RELEASE_REVIEW=1) must execute the gate it judges, so it
94
+ // needs both stronger reasoning and a sandbox that can write inside the workspace.
95
+ // Explicit env overrides win; otherwise the review signal lifts the fast defaults.
96
+ const reviewMode = process.env.CW_RELEASE_REVIEW === "1";
84
97
 
85
98
  // Cap codex's reasoning effort for CW runs (speed) — overrides config.toml for
86
- // THIS invocation only. Default "low"; CW_CODEX_REASONING_EFFORT opts back up.
87
- const effort = process.env.CW_CODEX_REASONING_EFFORT || "low";
99
+ // THIS invocation only. Default "low"; CW_CODEX_REASONING_EFFORT opts back up, and
100
+ // a release review defaults to "high".
101
+ const effort = process.env.CW_CODEX_REASONING_EFFORT || (reviewMode ? "high" : "low");
102
+
103
+ // Sandbox: read-only is the POLA default (a worker/probe only reads). A release
104
+ // review opens to workspace-write so codex can build/test/regenerate the gate.
105
+ // CW_CODEX_SANDBOX overrides both; an unknown value fails closed (never silently
106
+ // downgraded to read-only, which would re-create the can't-verify failure mode).
107
+ const SANDBOX_MODES = new Set(["read-only", "workspace-write", "danger-full-access"]);
108
+ const sandbox = process.env.CW_CODEX_SANDBOX || (reviewMode ? "workspace-write" : "read-only");
109
+ if (!SANDBOX_MODES.has(sandbox)) {
110
+ process.stderr.write(
111
+ `codex-agent: invalid CW_CODEX_SANDBOX="${sandbox}" — expected one of ${[...SANDBOX_MODES].join(", ")}\n`
112
+ );
113
+ process.exit(2);
114
+ }
115
+
116
+ render.action(`codex: reading the repo (${sandbox})…`);
117
+
88
118
  const args = [
89
119
  "exec",
90
120
  "--json",
@@ -93,7 +123,7 @@ const args = [
93
123
  "--output-last-message",
94
124
  finalPath,
95
125
  "--sandbox",
96
- "read-only",
126
+ sandbox,
97
127
  "--color",
98
128
  "never",
99
129
  "-"
@@ -12,7 +12,7 @@
12
12
  //
13
13
  // It signs the EXACT same canonical payload CW verifies — {usage, runId, taskId,
14
14
  // promptDigest} — sharing the canonicalization with the verifier via
15
- // dist/telemetry-attestation.js, so signer and verifier can never drift.
15
+ // dist/core/trust/telemetry-attestation.js, so signer and verifier can never drift.
16
16
  //
17
17
  // Usage (wrap any agent that prints a {model, usage} JSON report on stdout):
18
18
  // node cw-attest-wrap.js --manifest {{manifest}} -- <agent-cmd> [agent-args...]
@@ -32,7 +32,7 @@ const crypto = require("node:crypto");
32
32
  const path = require("node:path");
33
33
  const { spawnSync } = require("node:child_process");
34
34
 
35
- const ta = require(path.resolve(__dirname, "..", "..", "dist", "telemetry-attestation.js"));
35
+ const ta = require(path.resolve(__dirname, "..", "..", "dist", "core", "trust", "telemetry-attestation.js"));
36
36
 
37
37
  function fail(message) {
38
38
  process.stderr.write(`cw-attest-wrap: ${message}\n`);
@@ -89,8 +89,9 @@ function main() {
89
89
  note("server.json");
90
90
  }
91
91
 
92
- // 3. src/version.ts runtime constant
93
- const versionTs = path.join(pluginRoot, "src", "version.ts");
92
+ // 3. src/core/version.ts runtime constant (v2 moved it from the old flat
93
+ // src/version.ts into the core state layer)
94
+ const versionTs = path.join(pluginRoot, "src", "core", "version.ts");
94
95
  const vtsText = fs.readFileSync(versionTs, "utf8");
95
96
  const vtsNext = vtsText.replace(
96
97
  /(CURRENT_COOL_WORKFLOW_VERSION\s*=\s*)"[^"]*"/,
@@ -98,7 +99,7 @@ function main() {
98
99
  );
99
100
  if (vtsNext !== vtsText) {
100
101
  fs.writeFileSync(versionTs, vtsNext);
101
- note("src/version.ts");
102
+ note("src/core/version.ts");
102
103
  }
103
104
 
104
105
  // 4. manifest/plugin.manifest.json (identity.version) — gen:manifests then
@@ -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.97",
86
+ "Cool Workflow v0.2.0",
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.97");
120
+ assert.equal(summary.version, "0.2.0");
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.97");
127
+ assert.equal(shown.app.version, "0.2.0");
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.97");
138
+ assert.equal(state.workflow.app.version, "0.2.0");
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`);