cool-workflow 0.1.98 → 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 (306) 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} +2 -2
  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 +2 -0
  139. package/docs/cli-mcp-parity.7.md +280 -219
  140. package/docs/contract-migration-tooling.7.md +2 -0
  141. package/docs/control-plane-scheduling.7.md +2 -0
  142. package/docs/durable-state-and-locking.7.md +2 -0
  143. package/docs/evidence-adoption-reasoning-chain.7.md +2 -0
  144. package/docs/execution-backends.7.md +2 -0
  145. package/docs/multi-agent-cli-mcp-surface.7.md +2 -0
  146. package/docs/multi-agent-eval-replay-harness.7.md +2 -0
  147. package/docs/multi-agent-operator-ux.7.md +2 -0
  148. package/docs/node-snapshot-diff-replay.7.md +2 -0
  149. package/docs/observability-cost-accounting.7.md +2 -0
  150. package/docs/project-index.md +132 -71
  151. package/docs/real-execution-backends.7.md +2 -0
  152. package/docs/release-and-migration.7.md +2 -0
  153. package/docs/release-tooling.7.md +2 -0
  154. package/docs/run-registry-control-plane.7.md +2 -0
  155. package/docs/run-retention-reclamation.7.md +23 -0
  156. package/docs/state-explosion-management.7.md +2 -0
  157. package/docs/team-collaboration.7.md +2 -0
  158. package/docs/web-desktop-workbench.7.md +2 -0
  159. package/manifest/plugin.manifest.json +1 -1
  160. package/manifest/source-context-profiles.json +9 -13
  161. package/package.json +1 -1
  162. package/scripts/agents/cw-attest-wrap.js +2 -2
  163. package/scripts/bump-version.js +4 -3
  164. package/scripts/canonical-apps.js +4 -4
  165. package/scripts/dogfood-architecture-review.js +2 -3
  166. package/scripts/dogfood-release.js +3 -3
  167. package/scripts/gen-parity-doc.js +15 -2
  168. package/scripts/golden-path.js +4 -4
  169. package/scripts/onramp-check.js +1 -1
  170. package/scripts/parity-check.js +38 -21
  171. package/scripts/release-flow.js +2 -2
  172. package/scripts/sync-project-index.js +51 -27
  173. package/scripts/validate-run-state-schema.js +2 -2
  174. package/scripts/version-sync-check.js +30 -30
  175. package/dist/candidate-scoring.js +0 -729
  176. package/dist/capability-core.js +0 -1189
  177. package/dist/capability-registry.js +0 -885
  178. package/dist/cli/command-surface.js +0 -494
  179. package/dist/cli/format.js +0 -56
  180. package/dist/cli/handlers/audit.js +0 -82
  181. package/dist/cli/handlers/blackboard.js +0 -81
  182. package/dist/cli/handlers/candidate.js +0 -40
  183. package/dist/cli/handlers/clones.js +0 -34
  184. package/dist/cli/handlers/collaboration.js +0 -61
  185. package/dist/cli/handlers/eval.js +0 -40
  186. package/dist/cli/handlers/ledger.js +0 -169
  187. package/dist/cli/handlers/maintenance.js +0 -107
  188. package/dist/cli/handlers/multi-agent.js +0 -165
  189. package/dist/cli/handlers/node.js +0 -41
  190. package/dist/cli/handlers/operational.js +0 -155
  191. package/dist/cli/handlers/operator.js +0 -146
  192. package/dist/cli/handlers/registry.js +0 -68
  193. package/dist/cli/handlers/run.js +0 -153
  194. package/dist/cli/handlers/scheduling.js +0 -132
  195. package/dist/cli/handlers/workbench.js +0 -41
  196. package/dist/cli/handlers/worker.js +0 -45
  197. package/dist/cli/run-summary.js +0 -45
  198. package/dist/clones.js +0 -162
  199. package/dist/collaboration.js +0 -726
  200. package/dist/commit.js +0 -592
  201. package/dist/compare.js +0 -18
  202. package/dist/coordinator/classify.js +0 -45
  203. package/dist/coordinator/paths.js +0 -42
  204. package/dist/coordinator/util.js +0 -126
  205. package/dist/coordinator.js +0 -990
  206. package/dist/daemon.js +0 -44
  207. package/dist/dispatch.js +0 -250
  208. package/dist/drive.js +0 -864
  209. package/dist/error-feedback.js +0 -419
  210. package/dist/evidence-grounding.js +0 -184
  211. package/dist/execution-backend/agent.js +0 -354
  212. package/dist/execution-backend/probes.js +0 -112
  213. package/dist/execution-backend/util.js +0 -47
  214. package/dist/execution-backend.js +0 -961
  215. package/dist/gates.js +0 -48
  216. package/dist/harness.js +0 -61
  217. package/dist/ledger.js +0 -313
  218. package/dist/loop-expansion.js +0 -60
  219. package/dist/mcp/tool-call.js +0 -470
  220. package/dist/mcp/tool-definitions.js +0 -1066
  221. package/dist/mcp-surface.js +0 -30
  222. package/dist/multi-agent/graph.js +0 -84
  223. package/dist/multi-agent/helpers.js +0 -141
  224. package/dist/multi-agent/ids.js +0 -20
  225. package/dist/multi-agent/paths.js +0 -22
  226. package/dist/multi-agent-eval/normalize.js +0 -51
  227. package/dist/multi-agent-eval.js +0 -678
  228. package/dist/multi-agent-host.js +0 -777
  229. package/dist/multi-agent.js +0 -984
  230. package/dist/node-projection.js +0 -59
  231. package/dist/node-snapshot.js +0 -260
  232. package/dist/operator-ux.js +0 -631
  233. package/dist/orchestrator/app-operations.js +0 -211
  234. package/dist/orchestrator/audit-operations.js +0 -182
  235. package/dist/orchestrator/candidate-operations.js +0 -117
  236. package/dist/orchestrator/cli-options.js +0 -294
  237. package/dist/orchestrator/collaboration-operations.js +0 -86
  238. package/dist/orchestrator/feedback-operations.js +0 -81
  239. package/dist/orchestrator/host-operations.js +0 -78
  240. package/dist/orchestrator/lifecycle-operations.js +0 -650
  241. package/dist/orchestrator/migration-operations.js +0 -44
  242. package/dist/orchestrator/multi-agent-operations.js +0 -362
  243. package/dist/orchestrator/topology-operations.js +0 -84
  244. package/dist/orchestrator.js +0 -925
  245. package/dist/pipeline-runner.js +0 -285
  246. package/dist/reclamation/hash.js +0 -72
  247. package/dist/reclamation.js +0 -812
  248. package/dist/reporter.js +0 -67
  249. package/dist/run-export.js +0 -815
  250. package/dist/run-registry/derive.js +0 -175
  251. package/dist/run-registry/format.js +0 -124
  252. package/dist/run-registry/gc.js +0 -251
  253. package/dist/run-registry/policy.js +0 -16
  254. package/dist/run-registry/queue.js +0 -115
  255. package/dist/run-registry.js +0 -850
  256. package/dist/run-state-schema.js +0 -68
  257. package/dist/scheduling.js +0 -184
  258. package/dist/state-explosion.js +0 -1014
  259. package/dist/state.js +0 -367
  260. package/dist/telemetry-ledger.js +0 -196
  261. package/dist/topology.js +0 -565
  262. package/dist/triggers.js +0 -184
  263. package/dist/trust-audit.js +0 -644
  264. package/dist/types/blackboard.js +0 -2
  265. package/dist/types/candidate.js +0 -2
  266. package/dist/types/collaboration.js +0 -2
  267. package/dist/types/core.js +0 -2
  268. package/dist/types/drive.js +0 -10
  269. package/dist/types/error-feedback.js +0 -2
  270. package/dist/types/evidence-reasoning.js +0 -2
  271. package/dist/types/execution-backend.js +0 -2
  272. package/dist/types/multi-agent.js +0 -2
  273. package/dist/types/observability.js +0 -2
  274. package/dist/types/pipeline.js +0 -2
  275. package/dist/types/reclamation.js +0 -8
  276. package/dist/types/report-bundle.js +0 -6
  277. package/dist/types/result.js +0 -2
  278. package/dist/types/run-registry.js +0 -2
  279. package/dist/types/run.js +0 -2
  280. package/dist/types/sandbox.js +0 -2
  281. package/dist/types/schedule.js +0 -2
  282. package/dist/types/state-node.js +0 -2
  283. package/dist/types/topology.js +0 -2
  284. package/dist/types/trust.js +0 -2
  285. package/dist/types/workbench.js +0 -2
  286. package/dist/types/worker.js +0 -2
  287. package/dist/types/workflow-app.js +0 -2
  288. package/dist/types.js +0 -44
  289. package/dist/util/fingerprint.js +0 -19
  290. package/dist/util/fingerprint.test.js +0 -27
  291. package/dist/verifier.js +0 -78
  292. package/dist/version.js +0 -8
  293. package/dist/workbench-host.js +0 -192
  294. package/dist/workbench.js +0 -192
  295. package/dist/worker-accept/acceptance.js +0 -114
  296. package/dist/worker-accept/blackboard-fanout.js +0 -80
  297. package/dist/worker-accept/blackboard-linkage.js +0 -19
  298. package/dist/worker-accept/context.js +0 -2
  299. package/dist/worker-accept/telemetry-ledger.js +0 -126
  300. package/dist/worker-accept/validation.js +0 -77
  301. package/dist/worker-accept/verifier-completion.js +0 -73
  302. package/dist/worker-isolation/helpers.js +0 -51
  303. package/dist/worker-isolation/paths.js +0 -46
  304. package/dist/worker-isolation.js +0 -656
  305. package/dist/workflow-api.js +0 -131
  306. /package/dist/{types → core/types}/boundary.js +0 -0
@@ -173,3 +173,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
173
173
  0.1.97
174
174
 
175
175
  0.1.98
176
+
177
+ 0.2.0
@@ -157,3 +157,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
157
157
  0.1.97
158
158
 
159
159
  0.1.98
160
+
161
+ 0.2.0
@@ -156,3 +156,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
156
156
  0.1.97
157
157
 
158
158
  0.1.98
159
+
160
+ 0.2.0
@@ -317,3 +317,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
317
317
  0.1.97
318
318
 
319
319
  0.1.98
320
+
321
+ 0.2.0
@@ -347,3 +347,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
347
347
  0.1.97
348
348
 
349
349
  0.1.98
350
+
351
+ 0.2.0
@@ -323,3 +323,5 @@ The host-facing surface tracks the CLI golden-path fixes (`cw -q` routing + repo
323
323
  0.1.97
324
324
 
325
325
  0.1.98
326
+
327
+ 0.2.0
@@ -349,3 +349,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
349
349
  0.1.97
350
350
 
351
351
  0.1.98
352
+
353
+ 0.2.0
@@ -361,3 +361,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
361
361
  0.1.97
362
362
 
363
363
  0.1.98
364
+
365
+ 0.2.0
@@ -182,3 +182,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
182
182
  0.1.97
183
183
 
184
184
  0.1.98
185
+
186
+ 0.2.0
@@ -241,3 +241,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
241
241
  0.1.97
242
242
 
243
243
  0.1.98
244
+
245
+ 0.2.0
@@ -1,15 +1,15 @@
1
1
  # Cool Workflow Project Index
2
2
 
3
- Generated from the current repository code on 2026-07-03 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.98`
9
- - Source modules: `69`
8
+ - Version: `0.2.0`
9
+ - Source modules: `129`
10
10
  - Workflow apps: `8`
11
11
  - Docs: `61`
12
- - Smoke tests: `172`
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,57 +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
- - [ledger.ts](../src/ledger.ts)
97
- - [loop-expansion.ts](../src/loop-expansion.ts)
98
- - [mcp-surface.ts](../src/mcp-surface.ts)
99
- - [multi-agent-eval.ts](../src/multi-agent-eval.ts)
100
- - [multi-agent-operator-ux.ts](../src/multi-agent-operator-ux.ts)
101
- - [multi-agent-trust.ts](../src/multi-agent-trust.ts)
102
- - [node-projection.ts](../src/node-projection.ts)
103
- - [node-snapshot.ts](../src/node-snapshot.ts)
104
- - [observability.ts](../src/observability.ts)
105
- - [onramp.ts](../src/onramp.ts)
106
- - [reclamation.ts](../src/reclamation.ts)
107
- - [remote-source.ts](../src/remote-source.ts)
108
- - [reporter.ts](../src/reporter.ts)
109
- - [result-normalize.ts](../src/result-normalize.ts)
110
- - [run-export.ts](../src/run-export.ts)
111
- - [run-registry.ts](../src/run-registry.ts)
112
- - [run-state-schema.ts](../src/run-state-schema.ts)
113
- - [scheduling.ts](../src/scheduling.ts)
114
- - [schema-validate.ts](../src/schema-validate.ts)
115
- - [state-explosion.ts](../src/state-explosion.ts)
116
- - [state-migrations.ts](../src/state-migrations.ts)
117
- - [telemetry-attestation.ts](../src/telemetry-attestation.ts)
118
- - [telemetry-demo.ts](../src/telemetry-demo.ts)
119
- - [telemetry-ledger.ts](../src/telemetry-ledger.ts)
120
- - [term.ts](../src/term.ts)
121
- - [validation.ts](../src/validation.ts)
122
- - [workbench-host.ts](../src/workbench-host.ts)
123
- - [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)
124
184
 
125
185
  ## Workflow Apps
126
186
 
@@ -298,6 +358,7 @@ Smoke tests mirror the public contracts. The high-signal suites are:
298
358
  - [onramp-check-smoke.js](../test/onramp-check-smoke.js)
299
359
  - [opencode-agent-wrapper-smoke.js](../test/opencode-agent-wrapper-smoke.js)
300
360
  - [operator-ux-smoke.js](../test/operator-ux-smoke.js)
361
+ - [orphan-runs-gc-smoke.js](../test/orphan-runs-gc-smoke.js)
301
362
  - [parallel-onramp-smoke.js](../test/parallel-onramp-smoke.js)
302
363
  - [parity-doc-sync-smoke.js](../test/parity-doc-sync-smoke.js)
303
364
  - [parse-guard-smoke.js](../test/parse-guard-smoke.js)
@@ -189,3 +189,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
189
189
  0.1.97
190
190
 
191
191
  0.1.98
192
+
193
+ 0.2.0
@@ -329,3 +329,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
329
329
  0.1.97
330
330
 
331
331
  0.1.98
332
+
333
+ 0.2.0
@@ -292,3 +292,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
292
292
  0.1.97
293
293
 
294
294
  0.1.98
295
+
296
+ 0.2.0
@@ -472,3 +472,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
472
472
  0.1.97
473
473
 
474
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
  ```
@@ -240,3 +261,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
240
261
  0.1.97
241
262
 
242
263
  0.1.98
264
+
265
+ 0.2.0
@@ -318,3 +318,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
318
318
  0.1.97
319
319
 
320
320
  0.1.98
321
+
322
+ 0.2.0
@@ -254,3 +254,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
254
254
  0.1.97
255
255
 
256
256
  0.1.98
257
+
258
+ 0.2.0
@@ -262,3 +262,5 @@ _No behavioral change in v0.1.89 (CLI-surface golden-path + help-output fixes on
262
262
  0.1.97
263
263
 
264
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.98",
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.98",
3
+ "version": "0.2.0",
4
4
  "bin": {
5
5
  "cool-workflow": "scripts/cw.js",
6
6
  "cw": "scripts/cw.js"
@@ -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.98",
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.98");
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.98");
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.98");
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`);
@@ -23,9 +23,8 @@ const os = require("node:os");
23
23
  const path = require("node:path");
24
24
 
25
25
  const pluginRoot = path.resolve(__dirname, "..");
26
- const { CoolWorkflowRunner } = require(path.join(pluginRoot, "dist/orchestrator.js"));
27
- const { drive } = require(path.join(pluginRoot, "dist/drive.js"));
28
- const { resolveAgentConfig } = require(path.join(pluginRoot, "dist/agent-config.js"));
26
+ const { CoolWorkflowRunner, drive } = require(path.join(pluginRoot, "dist/shell/orchestrator.js"));
27
+ const { resolveAgentConfig } = require(path.join(pluginRoot, "dist/shell/agent-config.js"));
29
28
 
30
29
  const argv = process.argv.slice(2);
31
30
  const flags = new Set(argv.filter((a) => a.startsWith("--")));
@@ -4,9 +4,9 @@
4
4
  const { spawnSync } = require("node:child_process");
5
5
  const fs = require("node:fs");
6
6
  const path = require("node:path");
7
- const { CoolWorkflowRunner } = require("../dist/orchestrator.js");
7
+ const { CoolWorkflowRunner } = require("../dist/shell/orchestrator.js");
8
8
 
9
- const TARGET_VERSION = "0.1.98";
9
+ const TARGET_VERSION = "0.2.0";
10
10
  const PREVIOUS_VERSION = "0.1.31";
11
11
  const pluginRoot = path.resolve(__dirname, "..");
12
12
  const repoRoot = path.resolve(pluginRoot, "..", "..");
@@ -269,7 +269,7 @@ function commandsForTask(taskId, context) {
269
269
  "-e",
270
270
  [
271
271
  releaseSourceReaderSnippet(),
272
- "for (const f of ['plugins/cool-workflow/package.json','plugins/cool-workflow/src/version.ts','CHANGELOG.md','RELEASE.md']) {",
272
+ "for (const f of ['plugins/cool-workflow/package.json','plugins/cool-workflow/src/core/version.ts','CHANGELOG.md','RELEASE.md']) {",
273
273
  " const t=readSurface(f);",
274
274
  ` if (t===null) throw new Error(f+' missing from release commit');`,
275
275
  ` if (!t.includes('${TARGET_VERSION}')) throw new Error(f+' missing ${TARGET_VERSION}');`,