@iowarp/clio-coder 0.3.6 → 0.3.8

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 (323) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/README.md +22 -6
  3. package/dist/{acp-2BEHC4DL.js → acp-U67UHUK2.js} +14 -14
  4. package/dist/{agents-LNNFTM53.js → agents-YU6SGALZ.js} +42 -35
  5. package/dist/assets/codewiki.json +1 -1
  6. package/dist/{auth-KXXFI2VS.js → auth-5ZPJOIVG.js} +32 -24
  7. package/dist/builtins-C6JMZVV6.js +17 -0
  8. package/dist/{chunk-E25LMLRW.js → chunk-26LEYJZH.js} +2 -2
  9. package/dist/{chunk-TSHXZTOQ.js → chunk-2HEJ2F35.js} +5 -5
  10. package/dist/{chunk-PBTHKCPN.js → chunk-2HFZQUHL.js} +7 -7
  11. package/dist/{chunk-FO5ZOVUY.js → chunk-3BINW3FP.js} +5 -5
  12. package/dist/{chunk-4OC57DA6.js → chunk-4DGYLA73.js} +53 -2
  13. package/dist/{chunk-CKXWIANG.js → chunk-4SPRNWDE.js} +18 -16
  14. package/dist/{chunk-E2ER4LJF.js → chunk-5C3AQNDW.js} +25 -1
  15. package/dist/{chunk-XF5N4U5A.js → chunk-5DHKRSMQ.js} +9 -8
  16. package/dist/{chunk-43AOLP7E.js → chunk-5FR74PWO.js} +2 -1
  17. package/dist/{chunk-EKY57CSP.js → chunk-5H3GB5BO.js} +68 -772
  18. package/dist/{chunk-6XXKFVSN.js → chunk-5Q2VVUKB.js} +4 -4
  19. package/dist/{chunk-DJVECN66.js → chunk-7RFXX52T.js} +295 -3705
  20. package/dist/{chunk-ZXF4XRKW.js → chunk-7RGZWPB6.js} +158 -8
  21. package/dist/{chunk-FYYLNIL5.js → chunk-A2NJGIB3.js} +2 -2
  22. package/dist/{chunk-XXQNGV4M.js → chunk-A3WNZD3P.js} +548 -72
  23. package/dist/{chunk-VEZEGCGW.js → chunk-B5CSFE7B.js} +23 -21
  24. package/dist/{chunk-2SFS6XQE.js → chunk-DGSYXYMX.js} +3 -2
  25. package/dist/chunk-DR52UMZW.js +21 -0
  26. package/dist/{chunk-ZWLZP4ZT.js → chunk-DYIM5TJT.js} +98 -12
  27. package/dist/{chunk-QKMUKYO7.js → chunk-E77JEWSD.js} +270 -125
  28. package/dist/{chunk-LYF7OHWH.js → chunk-EMYUUSFG.js} +12 -467
  29. package/dist/{chunk-4VP4KH3K.js → chunk-EQ63NRB7.js} +8 -8
  30. package/dist/chunk-FBVTI2TJ.js +518 -0
  31. package/dist/{chunk-R46L2BIR.js → chunk-FHJEP5SW.js} +19 -25
  32. package/dist/{chunk-WR67VIZY.js → chunk-GN57SG4G.js} +66 -8
  33. package/dist/{chunk-RD5U66HV.js → chunk-GPIEI3LY.js} +9 -9
  34. package/dist/{chunk-PCZJO5TI.js → chunk-GU2UIAFZ.js} +13 -178
  35. package/dist/chunk-GWS3VEIW.js +195 -0
  36. package/dist/chunk-H7IXIC72.js +103 -0
  37. package/dist/{chunk-3BPUFZDL.js → chunk-HLE42MG7.js} +3 -3
  38. package/dist/{chunk-24I7BN55.js → chunk-IFBNV6H6.js} +3 -3
  39. package/dist/{chunk-QNQHSOLF.js → chunk-IGWKHNIQ.js} +114 -55
  40. package/dist/chunk-IIZWH4XA.js +172 -0
  41. package/dist/{chunk-AD2SYQYC.js → chunk-IJ7RPIYJ.js} +124 -6
  42. package/dist/chunk-J3YUBZWY.js +382 -0
  43. package/dist/{chunk-5JGRAMKL.js → chunk-JOZYP4GM.js} +8 -6
  44. package/dist/{chunk-OH3TOQTB.js → chunk-K4XHGFR5.js} +751 -15
  45. package/dist/{chunk-EYPA3EGJ.js → chunk-KTYTFRMB.js} +178 -14
  46. package/dist/chunk-LU7P4LHA.js +33 -0
  47. package/dist/chunk-ME6CCNFO.js +108 -0
  48. package/dist/chunk-MXKJU4JB.js +1100 -0
  49. package/dist/{chunk-RY3LY4J5.js → chunk-N22QMJKY.js} +21 -18
  50. package/dist/chunk-NMPKI6XL.js +3006 -0
  51. package/dist/chunk-NUGM5KR6.js +165 -0
  52. package/dist/{chunk-22NAGB7X.js → chunk-P43ETTHK.js} +5 -94
  53. package/dist/{chunk-NILBFAPG.js → chunk-PMDBGQSJ.js} +2 -2
  54. package/dist/chunk-PT7HYKEM.js +165 -0
  55. package/dist/chunk-RVG5JXAL.js +41 -0
  56. package/dist/{chunk-GEYXPTRF.js → chunk-RWSI4YD7.js} +2 -2
  57. package/dist/{chunk-4BPJXDWC.js → chunk-TANS5ZJS.js} +35 -19
  58. package/dist/{verifiers-NCBTHHN2.js → chunk-TB5666IT.js} +67 -324
  59. package/dist/{chunk-QM3F2GKX.js → chunk-TLQJPP24.js} +7927 -8088
  60. package/dist/{chunk-G7MUEIGA.js → chunk-TT36MB5S.js} +2 -1
  61. package/dist/chunk-TTHACPOM.js +961 -0
  62. package/dist/{chunk-6US73PDB.js → chunk-TYPGUK6W.js} +7 -7
  63. package/dist/{chunk-MFFY33HR.js → chunk-U6MBIEMB.js} +554 -209
  64. package/dist/chunk-VAWNZU7Z.js +242 -0
  65. package/dist/{chunk-IR4CFBFN.js → chunk-VCBR6CU7.js} +12 -12
  66. package/dist/{chunk-WHJYKASB.js → chunk-VHN4MY6O.js} +2 -2
  67. package/dist/{chunk-XYDYPRZI.js → chunk-VWZOAB7K.js} +10 -10
  68. package/dist/{chunk-ZRGEBJ4T.js → chunk-WLFILSD5.js} +48 -48
  69. package/dist/{chunk-K7T3E2SR.js → chunk-WNIJTQQK.js} +12 -11
  70. package/dist/{chunk-CYQKWTG3.js → chunk-WSB3FPX7.js} +68 -20
  71. package/dist/{chunk-KHSFENX2.js → chunk-WWCZ5F23.js} +116 -14
  72. package/dist/{chunk-XE2VEJHX.js → chunk-WXY7KU3G.js} +2 -2
  73. package/dist/{chunk-PPAMZ32Z.js → chunk-XK56QHLX.js} +6 -1
  74. package/dist/{chunk-KOHPCX4K.js → chunk-XWSF374K.js} +5 -5
  75. package/dist/{chunk-CJUB2JJ2.js → chunk-YS5VLNH5.js} +10 -10
  76. package/dist/{chunk-ZZMN5OM4.js → chunk-ZNLWCMVZ.js} +2 -2
  77. package/dist/{chunk-WHGPSPT5.js → chunk-ZVJ5BLO2.js} +2 -2
  78. package/dist/cli/index.js +33 -31
  79. package/dist/{clio-M2KGYUFZ.js → clio-QVTYJ57A.js} +10 -10
  80. package/dist/{code-nav-GQNL7XA6.js → code-nav-FGGFIE7L.js} +5 -5
  81. package/dist/codewiki/build-worker.js +4 -4
  82. package/dist/{components-5TTYYX6G.js → components-ZFA3SAER.js} +9 -9
  83. package/dist/{config-XUUYQIWO.js → config-LW5IJFQN.js} +65 -55
  84. package/dist/{configure-IHJ7YOMV.js → configure-7XIZCOU4.js} +29 -24
  85. package/dist/{context-75MIWW3U.js → context-L3WL3X7K.js} +54 -43
  86. package/dist/{context-ZQ7SIFJV.js → context-N52ZA626.js} +30 -14
  87. package/dist/{context-74JLXAWD.js → context-Y6Y7QPR6.js} +12 -12
  88. package/dist/{context-clear-GYKWNUML.js → context-clear-MBQRLSDQ.js} +54 -43
  89. package/dist/{context-index-SSR5ECNE.js → context-index-HVMFQHK3.js} +5 -5
  90. package/dist/{context-working-set-UX5KEP4J.js → context-working-set-GS6DSO7F.js} +18 -18
  91. package/dist/{dispatch-runner-GIJBHNFL.js → dispatch-runner-22ZCNOM3.js} +367 -79
  92. package/dist/{docs-6FZSCG5B.js → docs-7LQ23DLM.js} +9 -9
  93. package/dist/{doctor-SVJ5BZCW.js → doctor-M7YEDGAE.js} +27 -23
  94. package/dist/{eval-CG6LLBLD.js → eval-BEC2WHDA.js} +73 -20
  95. package/dist/{evidence-ZYFIEN42.js → evidence-REJUMSKM.js} +70 -59
  96. package/dist/{evolve-QGEXEMDW.js → evolve-PY5ZBA5K.js} +50 -39
  97. package/dist/{extensions-ADGNCJJD.js → extensions-HVKU65YU.js} +7 -7
  98. package/dist/{fleet-S5R4ZOQY.js → fleet-7WZEWRFA.js} +236 -377
  99. package/dist/fleet-commands-UVHWM76J.js +70 -0
  100. package/dist/fleet-graph-6ULH7PES.js +125 -0
  101. package/dist/fleet-new-RDVJLHHH.js +48 -0
  102. package/dist/{fleet-preflight-BHSNPBMH.js → fleet-preflight-J53T6CCE.js} +5 -5
  103. package/dist/fleet-validate-72PC4SLA.js +79 -0
  104. package/dist/{init-5DRU55YR.js → init-OG3TPGQG.js} +69 -57
  105. package/dist/library-CNTMPLRF.js +217 -0
  106. package/dist/{memory-7YKKR6UC.js → memory-6IS7F275.js} +52 -41
  107. package/dist/{models-ZPOLRU2C.js → models-ENRJDA5W.js} +37 -31
  108. package/dist/{monitor-US5F5YGZ.js → monitor-XLDVO7TN.js} +79 -42
  109. package/dist/{orchestrator-E2AL4T5N.js → orchestrator-6KSPYRHA.js} +4126 -762
  110. package/dist/{paths-E7KYAQWE.js → paths-DBXMZMDU.js} +6 -6
  111. package/dist/registry-LG64LTF4.js +11 -0
  112. package/dist/{reset-KZ652EK6.js → reset-RZ4ER727.js} +12 -12
  113. package/dist/{run-SRNBKDWD.js → run-Y2CNK5RU.js} +89 -76
  114. package/dist/{share-CGZE33UP.js → share-A55GYP6Z.js} +37 -13
  115. package/dist/{skills-S2X4DLY5.js → skills-ALC5J6AT.js} +29 -13
  116. package/dist/{skills-eval-W2GGIC4R.js → skills-eval-JPBEBYQU.js} +60 -48
  117. package/dist/support-MIETYA5E.js +38 -0
  118. package/dist/{targets-54SWINWB.js → targets-VGNXIR3S.js} +46 -36
  119. package/dist/{terminal-lease-SAIF2OGY.js → terminal-lease-WOBR64YA.js} +4 -4
  120. package/dist/{uninstall-BVLWXKBT.js → uninstall-ZJF5H5ZN.js} +9 -9
  121. package/dist/{upgrade-JKAR27XC.js → upgrade-FUSUAGHR.js} +31 -28
  122. package/dist/{usage-MSAWCLX4.js → usage-N4MKVHKD.js} +140 -68
  123. package/dist/verifiers-YAWOJ3H2.js +336 -0
  124. package/dist/{verify-X5HDROLA.js → verify-LTDHYBGY.js} +10 -9
  125. package/dist/{wiki-generate-GUSOQ6ZP.js → wiki-generate-6M7GHTBJ.js} +75 -62
  126. package/dist/worker/entry.js +67 -57
  127. package/docs/README.md +3 -2
  128. package/docs/acp.md +1 -1
  129. package/docs/alcf-provider.md +1 -1
  130. package/docs/architecture.md +2 -2
  131. package/docs/artifact-versions.md +11 -6
  132. package/docs/built-in-agents.md +26 -2
  133. package/docs/capacity-and-scheduling.md +1 -1
  134. package/docs/commands-and-modes.md +83 -3
  135. package/docs/configuration-and-targets.md +86 -4
  136. package/docs/context-engine.md +1 -1
  137. package/docs/development-pipeline.md +1 -1
  138. package/docs/dispatch-architecture-rationale.md +1 -1
  139. package/docs/documentation-coverage.md +3 -3
  140. package/docs/documentation-guide.md +3 -3
  141. package/docs/eval-runner.md +1 -1
  142. package/docs/evals-internal.md +1 -1
  143. package/docs/evidence-and-memory.md +74 -10
  144. package/docs/evolution.md +1 -1
  145. package/docs/exit-codes-and-output.md +4 -1
  146. package/docs/extensions-and-sharing.md +6 -2
  147. package/docs/fleet-demo-runbook.md +2 -2
  148. package/docs/fleet-dispatch.md +228 -16
  149. package/docs/git-commit-provenance.md +2 -2
  150. package/docs/glossary.md +22 -2
  151. package/docs/installation-and-lifecycle.md +2 -2
  152. package/docs/middleware-and-components.md +2 -1
  153. package/docs/model-catalog.md +1 -1
  154. package/docs/observability.md +56 -9
  155. package/docs/proactive-memory.md +1 -1
  156. package/docs/prompt-envelope-and-tools.md +4 -2
  157. package/docs/provider-adapter-cookbook.md +1 -1
  158. package/docs/release-cut-checklist.md +83 -65
  159. package/docs/resource-library.md +59 -0
  160. package/docs/safety-model.md +2 -2
  161. package/docs/scientific-validation.md +3 -3
  162. package/docs/session-lifecycle.md +37 -1
  163. package/docs/skills-marketplace.md +16 -3
  164. package/docs/tool-usage.md +14 -7
  165. package/docs/trace-store.md +1 -1
  166. package/docs/troubleshooting.md +1 -1
  167. package/docs/tui-design.md +1 -1
  168. package/docs/worker-dispatch-mechanics.md +3 -3
  169. package/package.json +1 -2
  170. package/src/cli/argv.ts +5 -0
  171. package/src/cli/configure.ts +107 -23
  172. package/src/cli/doctor.ts +5 -1
  173. package/src/cli/evidence.ts +30 -25
  174. package/src/cli/fleet-commands.ts +37 -0
  175. package/src/cli/fleet-graph.ts +102 -0
  176. package/src/cli/fleet-new.ts +36 -0
  177. package/src/cli/fleet-preflight.ts +111 -0
  178. package/src/cli/fleet-validate.ts +30 -0
  179. package/src/cli/fleet.ts +173 -335
  180. package/src/cli/index.ts +3 -1
  181. package/src/cli/library.ts +190 -0
  182. package/src/cli/share.ts +13 -1
  183. package/src/cli/shared.ts +1 -0
  184. package/src/cli/targets.ts +4 -1
  185. package/src/cli/usage.ts +111 -19
  186. package/src/cli/validate-model.ts +60 -5
  187. package/src/core/bus-events.ts +29 -0
  188. package/src/core/commit-attribution.ts +4 -4
  189. package/src/core/config.ts +130 -0
  190. package/src/core/defaults.ts +81 -0
  191. package/src/core/path-boundary.ts +100 -0
  192. package/src/domains/agents/builtins/architect.md +1 -0
  193. package/src/domains/agents/builtins/oracle.md +33 -0
  194. package/src/domains/agents/catalog.ts +13 -1
  195. package/src/domains/agents/extension.ts +2 -11
  196. package/src/domains/agents/fleet-contract.ts +304 -24
  197. package/src/domains/agents/index.ts +14 -0
  198. package/src/domains/agents/recipe.ts +7 -1
  199. package/src/domains/agents/registry.ts +73 -5
  200. package/src/domains/agents/result-contract.ts +360 -15
  201. package/src/domains/agents/write-boundary.ts +15 -50
  202. package/src/domains/config/classify.ts +4 -0
  203. package/src/domains/context/project-rules.ts +51 -1
  204. package/src/domains/dispatch/active-route-planner.ts +14 -0
  205. package/src/domains/dispatch/assignment-reconcile.ts +22 -5
  206. package/src/domains/dispatch/assignment-store.ts +151 -14
  207. package/src/domains/dispatch/backoff.ts +2 -1
  208. package/src/domains/dispatch/capability-match.ts +1 -0
  209. package/src/domains/dispatch/checkout-writer-lease.ts +175 -0
  210. package/src/domains/dispatch/contract.ts +48 -0
  211. package/src/domains/dispatch/delegation-plan.ts +164 -0
  212. package/src/domains/dispatch/execution-plan.ts +76 -5
  213. package/src/domains/dispatch/execution-role.ts +12 -2
  214. package/src/domains/dispatch/execution-scheduler.ts +183 -67
  215. package/src/domains/dispatch/extension.ts +412 -74
  216. package/src/domains/dispatch/fleet-gate.ts +14 -0
  217. package/src/domains/dispatch/fleet-plan.ts +63 -3
  218. package/src/domains/dispatch/fleet-run.ts +791 -0
  219. package/src/domains/dispatch/gate-role-prompts.ts +47 -0
  220. package/src/domains/dispatch/host-verification.ts +178 -0
  221. package/src/domains/dispatch/index.ts +41 -1
  222. package/src/domains/dispatch/intent-requirements.ts +40 -0
  223. package/src/domains/dispatch/intent.ts +235 -0
  224. package/src/domains/dispatch/path-scope.ts +370 -0
  225. package/src/domains/dispatch/receipt-integrity.ts +9 -4
  226. package/src/domains/dispatch/state.ts +36 -3
  227. package/src/domains/dispatch/types.ts +64 -12
  228. package/src/domains/dispatch/validation.ts +69 -6
  229. package/src/domains/dispatch/write-boundary-enforcer.ts +45 -0
  230. package/src/domains/dispatch/write-boundary.ts +201 -22
  231. package/src/domains/eval/metrics/evidence.ts +79 -2
  232. package/src/domains/eval/runners/clio-run.ts +12 -2
  233. package/src/domains/evidence/build.ts +69 -11
  234. package/src/domains/evidence/index.ts +21 -0
  235. package/src/domains/evidence/provenance.ts +46 -11
  236. package/src/domains/evidence/trust-projection.ts +274 -0
  237. package/src/domains/evidence/trust-status.ts +155 -18
  238. package/src/domains/evidence/types.ts +4 -0
  239. package/src/domains/extensions/discovery.ts +88 -1
  240. package/src/domains/extensions/resources.ts +20 -8
  241. package/src/domains/extensions/state.ts +6 -2
  242. package/src/domains/extensions/types.ts +4 -1
  243. package/src/domains/lifecycle/doctor.ts +140 -1
  244. package/src/domains/middleware/index.ts +15 -0
  245. package/src/domains/middleware/watchdog.ts +281 -0
  246. package/src/domains/observability/contract.ts +3 -1
  247. package/src/domains/observability/cost.ts +12 -1
  248. package/src/domains/observability/extension.ts +2 -2
  249. package/src/domains/observability/index.ts +10 -0
  250. package/src/domains/observability/out-of-turn-usage.ts +223 -0
  251. package/src/domains/prompts/contract.ts +3 -5
  252. package/src/domains/providers/extension.ts +30 -2
  253. package/src/domains/resources/common-loader.ts +3 -0
  254. package/src/domains/resources/index.ts +20 -0
  255. package/src/domains/resources/library.ts +326 -0
  256. package/src/domains/resources/prompts/loader.ts +119 -14
  257. package/src/domains/resources/skills/marketplace.ts +37 -12
  258. package/src/domains/safety/policy-engine.ts +5 -5
  259. package/src/domains/safety/run-effects.ts +64 -1
  260. package/src/domains/safety/scope.ts +7 -12
  261. package/src/domains/session/handoff.ts +629 -0
  262. package/src/domains/share/archive.ts +67 -2
  263. package/src/engine/acp/server.ts +4 -1
  264. package/src/engine/prompt-templates.ts +18 -1
  265. package/src/engine/worker-runtime.ts +6 -3
  266. package/src/entry/orchestrator.ts +37 -0
  267. package/src/interactive/bus-notices.ts +26 -0
  268. package/src/interactive/chat-loop.ts +235 -1
  269. package/src/interactive/chat-renderer.ts +22 -0
  270. package/src/interactive/cost-overlay.ts +31 -3
  271. package/src/interactive/council-dispatch.ts +30 -0
  272. package/src/interactive/council-grid.ts +213 -0
  273. package/src/interactive/council.ts +99 -0
  274. package/src/interactive/dispatch-board.ts +311 -17
  275. package/src/interactive/fleet-run-preview.ts +307 -0
  276. package/src/interactive/footer/notifications.ts +219 -0
  277. package/src/interactive/handoff-round.ts +56 -0
  278. package/src/interactive/interactive-application.ts +43 -1
  279. package/src/interactive/interactive-event-projection.ts +23 -1
  280. package/src/interactive/interactive-slash-runtime.ts +52 -2
  281. package/src/interactive/interactive-subscriptions.ts +14 -2
  282. package/src/interactive/oracle.ts +179 -0
  283. package/src/interactive/overlay-ask-user-lifecycle.ts +6 -0
  284. package/src/interactive/overlay-general-openers.ts +190 -1
  285. package/src/interactive/overlay-key-routing.ts +17 -1
  286. package/src/interactive/overlay-lifecycle.ts +41 -1
  287. package/src/interactive/overlay-permission-lifecycle.ts +10 -0
  288. package/src/interactive/overlay-resource-openers.ts +11 -3
  289. package/src/interactive/overlay-session-lifecycle.ts +234 -2
  290. package/src/interactive/overlays/fleet-run-approval.ts +208 -0
  291. package/src/interactive/overlays/handoff-review.ts +185 -0
  292. package/src/interactive/overlays/library-install-confirm.ts +151 -0
  293. package/src/interactive/overlays/list-overlay.ts +168 -2
  294. package/src/interactive/overlays/settings.ts +221 -30
  295. package/src/interactive/overlays/side-question.ts +139 -0
  296. package/src/interactive/overlays/skills-hub.ts +401 -15
  297. package/src/interactive/side-question.ts +171 -0
  298. package/src/interactive/slash-commands.ts +439 -7
  299. package/src/interactive/slash-spec.ts +19 -6
  300. package/src/interactive/theme/tokens.ts +30 -0
  301. package/src/interactive/turn-middleware.ts +15 -1
  302. package/src/interactive/view/artifacts.ts +42 -9
  303. package/src/interactive/view/view-overlay.ts +15 -3
  304. package/src/interactive/watchdog-run.ts +75 -0
  305. package/src/interactive/worker-receipts.ts +14 -2
  306. package/src/interactive/worker-share.ts +56 -1
  307. package/src/interactive/worker-stream.ts +15 -0
  308. package/src/tools/bootstrap.ts +3 -0
  309. package/src/tools/compete-worktrees.ts +13 -79
  310. package/src/tools/dispatch-admission.ts +251 -18
  311. package/src/tools/dispatch-arguments.ts +84 -1
  312. package/src/tools/dispatch-plan.ts +165 -6
  313. package/src/tools/dispatch-runner.ts +364 -23
  314. package/src/tools/dispatch-types.ts +20 -1
  315. package/src/tools/dispatch.ts +72 -2
  316. package/src/tools/monitor.ts +29 -0
  317. package/src/tools/profiles.ts +18 -4
  318. package/src/tools/task-worktree.ts +238 -0
  319. package/src/tools/verify/authoring.ts +61 -1
  320. package/src/tools/verify/scripts.ts +62 -0
  321. package/src/tools/worker-evidence.ts +21 -14
  322. package/src/worker/spec-contract.ts +3 -1
  323. package/dist/chunk-HC4CLZ2Y.js +0 -68
@@ -16,25 +16,29 @@ import {
16
16
  resolveDeliveryTools,
17
17
  sanitizeLockedSynthesisMessage,
18
18
  workerLoopBlockBudget
19
- } from "../chunk-ZRGEBJ4T.js";
19
+ } from "../chunk-WLFILSD5.js";
20
20
  import "../chunk-K7VKOLQQ.js";
21
21
  import {
22
22
  createMiddlewareContractFromSnapshot,
23
23
  createMiddlewareToolChoiceControl,
24
24
  shouldRequestStalledTurnContinuation
25
- } from "../chunk-ZXF4XRKW.js";
25
+ } from "../chunk-7RGZWPB6.js";
26
26
  import {
27
27
  CONFIRMED_SCOPE,
28
28
  READONLY_SCOPE,
29
29
  WORKSPACE_SCOPE,
30
30
  isSubset
31
- } from "../chunk-IR4CFBFN.js";
31
+ } from "../chunk-VCBR6CU7.js";
32
32
  import {
33
33
  createLoopState,
34
34
  observe
35
35
  } from "../chunk-UOV2BYIW.js";
36
- import "../chunk-EYPA3EGJ.js";
37
- import "../chunk-WHGPSPT5.js";
36
+ import "../chunk-PMDBGQSJ.js";
37
+ import "../chunk-XN3L4EYL.js";
38
+ import "../chunk-SPULKLCF.js";
39
+ import "../chunk-KTYTFRMB.js";
40
+ import "../chunk-ZVJ5BLO2.js";
41
+ import "../chunk-VG7TBQIY.js";
38
42
  import {
39
43
  DEFAULT_ESCALATION_FALLBACK,
40
44
  DEFAULT_ESCALATION_TIMEOUT_MS,
@@ -50,22 +54,38 @@ import {
50
54
  startAntigravityWorkerRun,
51
55
  startClaudeCodeWorkerRun,
52
56
  validateRehydratedWorkerRuntime
53
- } from "../chunk-XXQNGV4M.js";
54
- import "../chunk-43AOLP7E.js";
57
+ } from "../chunk-A3WNZD3P.js";
58
+ import "../chunk-5FR74PWO.js";
59
+ import "../chunk-P43ETTHK.js";
60
+ import "../chunk-H7IXIC72.js";
61
+ import {
62
+ createSafetyPolicyEngine
63
+ } from "../chunk-5H3GB5BO.js";
64
+ import "../chunk-A2NJGIB3.js";
65
+ import "../chunk-OQE5J4C6.js";
66
+ import {
67
+ agentSkillToolPolicy
68
+ } from "../chunk-GOXNB3AO.js";
69
+ import {
70
+ DEFAULT_AUTONOMY_LEVEL
71
+ } from "../chunk-HWUFFB6L.js";
55
72
  import {
56
73
  RESULT_CONTRACT_REPAIR_LIMIT,
57
- createSafetyPolicyEngine,
58
- parseResultContract,
74
+ parseWorkerResultContract,
59
75
  resultContractRepairMessages,
60
76
  validateResultContract
61
- } from "../chunk-EKY57CSP.js";
62
- import "../chunk-22NAGB7X.js";
77
+ } from "../chunk-TTHACPOM.js";
63
78
  import {
64
79
  classify
65
80
  } from "../chunk-AOCYTWAV.js";
66
81
  import {
67
82
  protectedArtifactMutationBlockReason
68
83
  } from "../chunk-MV3K5QF2.js";
84
+ import "../chunk-UL3WSD3F.js";
85
+ import "../chunk-ODFEOB4F.js";
86
+ import "../chunk-OZNBF4L3.js";
87
+ import "../chunk-4BJ5BYCE.js";
88
+ import "../chunk-ECH6PKUQ.js";
69
89
  import {
70
90
  UNKNOWN_RESOURCE,
71
91
  WORKER_PROTOCOL_VERSION,
@@ -85,23 +105,6 @@ import {
85
105
  deleteInjectedCompileCacheFrom
86
106
  } from "../chunk-I4HZDVNP.js";
87
107
  import "../chunk-ZI647VB5.js";
88
- import "../chunk-NILBFAPG.js";
89
- import "../chunk-FYYLNIL5.js";
90
- import "../chunk-UL3WSD3F.js";
91
- import "../chunk-XN3L4EYL.js";
92
- import "../chunk-VG7TBQIY.js";
93
- import "../chunk-OQE5J4C6.js";
94
- import "../chunk-ECH6PKUQ.js";
95
- import "../chunk-SPULKLCF.js";
96
- import {
97
- agentSkillToolPolicy
98
- } from "../chunk-GOXNB3AO.js";
99
- import {
100
- DEFAULT_AUTONOMY_LEVEL
101
- } from "../chunk-HWUFFB6L.js";
102
- import "../chunk-ODFEOB4F.js";
103
- import "../chunk-OZNBF4L3.js";
104
- import "../chunk-4BJ5BYCE.js";
105
108
  import "../chunk-6XLNIQDB.js";
106
109
  import "../chunk-5B2AEOW5.js";
107
110
  import {
@@ -111,56 +114,63 @@ import "../chunk-65DEGPJ6.js";
111
114
  import {
112
115
  FileKnowledgeBase,
113
116
  applyModelCapabilityPatch,
114
- getRuntimeRegistry,
115
117
  loadPluginRuntimes,
116
- registerBuiltinRuntimes,
117
118
  registerClioApiProviders,
118
119
  resolveModelRuntimeCapabilitiesForModel,
119
120
  resolveProviderKnowledgeBaseRoots,
120
121
  setGlobalDefaultMaxOutputTokens,
121
122
  setProtectedModelsProvider,
122
123
  setResidencyNoticeSink
123
- } from "../chunk-DJVECN66.js";
124
+ } from "../chunk-7RFXX52T.js";
124
125
  import "../chunk-CFGTUFWB.js";
125
- import {
126
- readSettings,
127
- validateSettingsFile
128
- } from "../chunk-AD2SYQYC.js";
129
- import "../chunk-4OC57DA6.js";
130
- import "../chunk-LL4KHSZI.js";
131
- import "../chunk-4VP4KH3K.js";
126
+ import "../chunk-LU7P4LHA.js";
127
+ import "../chunk-RWSI4YD7.js";
128
+ import "../chunk-IHXBNWMM.js";
132
129
  import {
133
130
  setGitCommitAttributionEnabled,
134
131
  withManagedGitCommitAttributionEnvironment
135
- } from "../chunk-VEZEGCGW.js";
132
+ } from "../chunk-B5CSFE7B.js";
133
+ import {
134
+ readSettings,
135
+ validateSettingsFile
136
+ } from "../chunk-IJ7RPIYJ.js";
136
137
  import "../chunk-FQ4SKYE4.js";
137
- import "../chunk-IKCO5N3L.js";
138
- import "../chunk-3I7MS7N2.js";
139
- import "../chunk-IHXBNWMM.js";
140
- import "../chunk-GEYXPTRF.js";
141
- import "../chunk-SST6Z5JA.js";
142
- import "../chunk-FO5ZOVUY.js";
138
+ import "../chunk-ZGVHUX3M.js";
139
+ import "../chunk-TT36MB5S.js";
140
+ import "../chunk-3BINW3FP.js";
143
141
  import "../chunk-R346GLFC.js";
142
+ import {
143
+ AI_AGENT_NAME
144
+ } from "../chunk-6EJMN2Y3.js";
145
+ import {
146
+ readClioVersion
147
+ } from "../chunk-IWHMRKLL.js";
148
+ import {
149
+ registerBuiltinRuntimes
150
+ } from "../chunk-NMPKI6XL.js";
151
+ import "../chunk-4DGYLA73.js";
152
+ import "../chunk-LL4KHSZI.js";
144
153
  import {
145
154
  configureGuardrails,
146
155
  isWorkerToolCallCapExceededReason,
147
156
  isWorkerToolCallCapSynthesisReason
148
157
  } from "../chunk-4ZG3XFUR.js";
149
- import {
150
- registerFauxFromEnv
151
- } from "../chunk-FCSXB6T2.js";
158
+ import "../chunk-IIZWH4XA.js";
159
+ import "../chunk-EQ63NRB7.js";
160
+ import "../chunk-SST6Z5JA.js";
161
+ import "../chunk-IKCO5N3L.js";
162
+ import "../chunk-3I7MS7N2.js";
152
163
  import "../chunk-APJ265NV.js";
153
- import "../chunk-YXLYO42X.js";
154
164
  import "../chunk-BNAZZHFG.js";
155
- import {
156
- AI_AGENT_NAME
157
- } from "../chunk-6EJMN2Y3.js";
158
165
  import "../chunk-WEPFGWHJ.js";
159
- import "../chunk-ZGVHUX3M.js";
160
- import "../chunk-G7MUEIGA.js";
161
166
  import {
162
- readClioVersion
163
- } from "../chunk-IWHMRKLL.js";
167
+ getRuntimeRegistry
168
+ } from "../chunk-NUGM5KR6.js";
169
+ import "../chunk-PT7HYKEM.js";
170
+ import {
171
+ registerFauxFromEnv
172
+ } from "../chunk-FCSXB6T2.js";
173
+ import "../chunk-YXLYO42X.js";
164
174
  import {
165
175
  init_esm_shims
166
176
  } from "../chunk-3R73A4XB.js";
@@ -940,7 +950,7 @@ function resolveWorkerRuntimeBudget(input) {
940
950
  }
941
951
  function startWorkerRun(input, emit) {
942
952
  assertResponseSchemaRuntime(input);
943
- if (input.resultContract !== void 0) parseResultContract(input.resultContract, "WorkerSpec.resultContract");
953
+ if (input.resultContract !== void 0) parseWorkerResultContract(input.resultContract, "WorkerSpec.resultContract");
944
954
  if (input.runtime.id === "claude-sdk") {
945
955
  return startClaudeSdkWorkerRun(input, emit);
946
956
  }
package/docs/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # Clio Coder Documentation
6
6
 
7
- These pages document `v0.3.6` of Clio Coder, an open-source coding orchestrator within the [IOWarp](https://iowarp.ai) scientific computing platform, created by the [Gnosis Research Center](https://grc.iit.edu) at the [Illinois Institute of Technology](https://www.iit.edu).
7
+ These pages document `v0.3.7` of Clio Coder, an open-source coding orchestrator within the [IOWarp](https://iowarp.ai) scientific computing platform, created by the [Gnosis Research Center](https://grc.iit.edu) at the [Illinois Institute of Technology](https://www.iit.edu).
8
8
 
9
9
  They are source-aligned guides: when prose and source disagree, prefer the
10
10
  current source, tests, and `CHANGELOG.md`.
@@ -39,6 +39,7 @@ current source, tests, and `CHANGELOG.md`.
39
39
  | Advisory validation-contract patterns for scientific artifacts and HPC assumptions | [scientific-validation.md](scientific-validation.md) ([Interactive Blueprint](html/validation_blueprint.html)) |
40
40
  | Falsifiable Change Manifest JSON templates, auditability, and `clio-coder evolve` | [evolution.md](evolution.md) ([Interactive Blueprint](html/evolution_blueprint.html)) |
41
41
  | Source-first docs workflow, mapping matrix, and alpha wording guidance | [documentation-guide.md](documentation-guide.md) ([Interactive Blueprint](html/documentation_blueprint.html)) |
42
+ | Typed resource catalogs, private synchronization, installation roots, and library CLI | [resource-library.md](resource-library.md) |
42
43
  | Interface layout, colors palette, Unicode character vocabulary, and drawing choreography | [tui-design.md](tui-design.md) ([Interactive Blueprint](html/tui_design_blueprint.html)) |
43
44
  | NDJSON parent-child socket protocols, watchdog timers, and exit status mapping | [worker-dispatch-mechanics.md](worker-dispatch-mechanics.md) ([Interactive Blueprint](html/worker_dispatch_blueprint.html)) |
44
45
  | Multi-node fleet dispatch: process-safe admission, attested workers, measured routing, activation, agent automation, topologies, and receipts | [fleet-dispatch.md](fleet-dispatch.md) ([Interactive Blueprint](html/fleet_dispatch_blueprint.html)) |
@@ -83,7 +84,7 @@ under `src/`, run `npm run build` again or keep `npm run dev` running.
83
84
  ## Release Notes
84
85
 
85
86
  The release entry point is [../README.md](../README.md); detailed release
86
- history lives in [../CHANGELOG.md](../CHANGELOG.md). For v0.3.6 the supported
87
+ history lives in [../CHANGELOG.md](../CHANGELOG.md). For v0.3.7 the supported
87
88
  install paths are `npm install -g @iowarp/clio-coder` and a source checkout
88
89
  through `npm run install:local`, the deterministic release gate is
89
90
  `npm run ci:release`, and live model smoke validation is local/manual and
package/docs/acp.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Agent Client Protocol (ACP) Server
2
2
 
3
- This document defines the architecture, transport protocols, tool mediation layers, permission handling, and error taxonomy for Clio Coder's Agent Client Protocol (ACP) server implementation in `v0.3.6`.
3
+ This document defines the architecture, transport protocols, tool mediation layers, permission handling, and error taxonomy for Clio Coder's Agent Client Protocol (ACP) server implementation in `v0.3.7`.
4
4
 
5
5
  Source implementations: `src/engine/acp/` and `src/cli/acp.ts`.
6
6
 
@@ -1,7 +1,7 @@
1
1
  # ALCF Inference Provider
2
2
 
3
3
  > [!TIP]
4
- > **Interactive Spec Available:** An interactive target configurator and Globus OAuth flow diagram is located at [docs/html/alcf_blueprint.html](html/alcf_blueprint.html) (Version: 0.3.6).
4
+ > **Interactive Spec Available:** An interactive target configurator and Globus OAuth flow diagram is located at [docs/html/alcf_blueprint.html](html/alcf_blueprint.html) (Version: 0.3.8).
5
5
 
6
6
  Clio can use Argonne's ALCF inference gateway as an OpenAI-compatible target
7
7
  backed by Globus OAuth. The runtime id is `alcf`; each configured target points
@@ -1,11 +1,11 @@
1
1
  # Clio Coder Architecture and Boundaries
2
2
 
3
3
  > [!TIP]
4
- > **Interactive Spec Available:** An interactive dashboard is located at [docs/html/architecture_blueprint.html](html/architecture_blueprint.html) (Version: 0.3.6).
4
+ > **Interactive Spec Available:** An interactive dashboard is located at [docs/html/architecture_blueprint.html](html/architecture_blueprint.html) (Version: 0.3.8).
5
5
 
6
6
  Clio Coder is an experimental, terminal-first coding harness for the CLIO ecosystem. CLIO stands for Context Layer for Input/Output; the project is named for the Greek muse of history and developed by the Gnosis Research Center at Illinois Tech. Its architecture favors small, auditable subsystems over a single monolithic agent loop: CLI entry points, the interactive TUI, provider/runtime code, worker subprocesses, tools, and feature domains are kept separate so local-model support and scientific-software workflows can evolve without collapsing safety boundaries.
7
7
 
8
- This page is source-code aligned for the current `v0.3.6` development line.
8
+ This page is source-code aligned for the current `v0.3.7` development line.
9
9
 
10
10
  ---
11
11
 
@@ -1,6 +1,6 @@
1
1
  # Artifact Versions & Serialization Contracts
2
2
 
3
- This document is the canonical registry of all versioned file formats, serialized data structures, integrity digests, and migration rules across Clio Coder in `v0.3.6`.
3
+ This document is the canonical registry of all versioned file formats, serialized data structures, integrity digests, and migration rules across Clio Coder in `v0.3.8`.
4
4
 
5
5
  ---
6
6
 
@@ -10,23 +10,28 @@ Clio Coder strictly versions every persistent or network-transported data struct
10
10
 
11
11
  | Artifact / Subsystem | Current Version | Symbol / Type & Source Location | Persisted Path / Wire Location | Schema Semantics & Version Differences | Mismatch Handling |
12
12
  | :--- | :--- | :--- | :--- | :--- | :--- |
13
- | **Run Receipt** | `15` | `RUN_RECEIPT_INTEGRITY_VERSION = 15`<br>`src/domains/dispatch/receipt-integrity.ts:13` | `<stateDir>/receipts/<runId>.json` | Cryptographically sealed run record. Version 15 covers all base provenance fields, routing intent, quality labels, `validationGrounding`, and `capabilityMismatch`. | Fail-closed. Incompatible receipts fail verification and are never read as evidence. |
13
+ | **Run Receipt** | `20` | `RUN_RECEIPT_INTEGRITY_VERSION = 20`<br>`src/domains/dispatch/receipt-integrity.ts:13` | `<stateDir>/receipts/<runId>.json` | Cryptographically sealed run record. Version 20 adds `pathProvenance` on dispatch intent and the resolved `pathScope`, over the v19 base of provenance fields, routing intent, quality labels, `validationGrounding`, `capabilityMismatch`, council provenance, and fleet gate provenance. | Fail-closed. A receipt below v20 is reported as retired rather than invalid, is never read as evidence, and is never migrated; a malformed or tampered v20 receipt fails verification. |
14
14
  | **Session Ledger** | `3` | `CURRENT_SESSION_FORMAT_VERSION = 3`<br>`src/engine/session.ts:66` | `<stateDir>/sessions/<cwdHash>/<sessionId>/` (`meta.json`, `current.jsonl`, `tree.json`) | Append-only ledger format with UUIDv7 turn IDs, session header line, and tree graph linkage. | Automated migration via `src/domains/session/migrations/` on `/resume`. Earlier unmigratable versions rejected. |
15
15
  | **Worker Spec** | `3` | `WORKER_SPEC_VERSION = 3`<br>`src/worker/spec-contract.ts:22` | Subprocess `stdin` control plane JSON payload | Worker invocation parameters, tool surface profile, and execution bounds. | Fail-closed preflight rejection before worker activation. |
16
16
  | **Worker Runtime Descriptor** | `2` | `WORKER_RUNTIME_DESCRIPTOR_VERSION = 2`<br>`src/worker/spec-contract.ts:23` | Worker attestation descriptor payload | Attestation descriptor for worker runtime environment and hardware facts. | Attestation mismatch causes immediate process termination. |
17
17
  | **Worker Protected Artifact State** | `1` | `WORKER_PROTECTED_ARTIFACT_STATE_VERSION = 1`<br>`src/worker/spec-contract.ts:24` | Worker spec initialization snapshot | Snapshot of active protected artifact paths and validation commands passed to worker. | Worker fails closed before executing mutations. |
18
- | **Fleet Contract** | `1 \| 2 \| 3 \| 4` (Current: `4`) | `FleetContractVersion = 1 \| 2 \| 3 \| 4`<br>`FLEET_WRITE_BOUNDARY_VERSION = 4`<br>`src/domains/agents/fleet-contract.ts:37, 140` | `.clio-coder/fleets/<name>.yaml`, `.clio-coder/fleets/<name>.yml`, or built-in recipes | Multi-agent workflow contract. v1 is agent-only; v2 adds deterministic code steps; v3 adds bounded loops (`FLEET_LOOP_MAX_ATTEMPTS = 5`) and commit steps; v4 adds declared per-step write boundaries (`writes`). | Reader refuses contracts whose version features it does not support. |
18
+ | **Fleet Contract** | `1 \| 2 \| 3 \| 4 \| 5` (Current: `5`) | `FleetContractVersion = 1 \| 2 \| 3 \| 4 \| 5`<br>`FLEET_WRITE_BOUNDARY_VERSION = 4`<br>`FLEET_DYNAMIC_STEP_VERSION = 5`<br>`src/domains/agents/fleet-contract.ts` | `.clio-coder/fleets/<name>.yaml`, `.clio-coder/fleets/<name>.yml`, or built-in recipes | Multi-agent workflow contract. v1 is agent-only; v2 adds deterministic code steps; v3 adds bounded loops and commit steps; v4 adds declared per-step write boundaries; v5 adds plan steps, gate steps, per-step target or profile routing, and the single-writer declaration. | Reader refuses contracts whose version features it does not support. |
19
19
  | **Execution Plan** | `4` | `version: 4` in `interface ExecutionPlan`<br>`src/domains/dispatch/execution-plan.ts:98` | Statically compiled DAG representation in dispatch memory and receipts | Statically unrolled, deterministically hashed execution plan. v4 adds bounded loop nodes, verification staleness tracking, and commit nodes. | Preflight validation rejects unsupported plan versions. |
20
20
  | **Eval Artifact** | `4` | `version: 4` in `interface EvalArtifactV4`<br>`src/domains/eval/schema/artifact.ts:51-52` | `<stateDir>/evals/<evalId>.json` | Stored eval results with suite provenance, matrix parameters, and itemized metric outcomes. Note: `EVAL_ARTIFACT_VERSION = 1` in `src/domains/eval/types.ts:2` is legacy/dead code. | Incompatible eval artifacts are rejected during `clio-coder eval report` and `compare`. |
21
21
  | **Trace Database** | `1` | `TRACE_SCHEMA_VERSION = 1`<br>`src/domains/observability/trace-store.ts:23` | `<stateDir>/trace.sqlite` (`meta` table `schema_version`) | Schema version for the 7 SQLite trace mirror tables (`runs`, `phases`, `events`, `envelopes`, `gate_results`, `agent_sessions`, `processes`). | Log warning (`[clio:trace]`), trace writing degrades without failing the parent run. |
22
22
  | **Capacity State File** | `2` | `version: 2` in `interface CapacityStateFile`<br>`src/domains/dispatch/capacity-lease.ts:40` | `<stateDir>/dispatch-admission.json` | Active capacity leases, drain status, and cross-process lock state. | Corrupted or unparseable state file causes admission to fail closed. |
23
23
  | **Protected Artifact Journal** | `1` | `version: 1` in `interface PendingProtectedArtifactRecord`<br>`src/domains/session/protected-artifact-journal.ts:22` | `<stateDir>/protected-artifact-pending/<key>/<id>.json` | Write-ahead durability records for pending protected artifacts. | Leftover records reconciled during session initialization. |
24
+ | **Fleet Run Record** | `1` | `version: 1` in `interface FleetRunRecord`<br>`src/domains/dispatch/fleet-run.ts` | `<stateDir>/fleet-runs/<runId>.json` | Durable record of one fleet run: contract name, plan hash, static step ids and steps, `--var` values, replayed and settled step results, and the delegation plan hash a `kind: plan` step produced. Read by `fleet run --resume`. | Resume refuses a changed plan hash with a per-step diff and refuses differing `--var` values. |
25
+ | **Durable Assignment Store** | `1` | `version: 1` in `interface AssignmentStoreFile`<br>`DurableAssignmentRecord`<br>`src/domains/dispatch/assignment-store.ts` | `<stateDir>/assignments.json` | Machine-wide logical-dispatch records: assignment id, attempt ids, terminal run id, status, optional fleet verdict owner, and—while running—`processOwner {pid, processBirthToken, acquiredAt}`. The owner is cleared on a true terminal transition. | A live sibling owner keeps the row running; a genuinely dead or legacy ownerless row is reconciled. An unsupported or unreadable store is treated as empty, and malformed records are ignored. |
26
+ | **Checkout Writer Lease** | `1` | `version: 1` in `interface CheckoutWriterLeaseRecord`<br>`src/domains/dispatch/checkout-writer-lease.ts` | `<stateDir>/checkout-writer-leases/<key>.json` (key derived from the canonical checkout path) | Cross-process single-writer lease: checkout path, pid, process birth token, acquisition time. | A live sibling holder is refused with `checkout_writer_lease_held`; a dead owner is reclaimed; a malformed record is treated as absent. |
27
+ | **Out-of-turn Usage Ledger** | unversioned JSONL | `OutOfTurnUsageRow`<br>`src/domains/observability/out-of-turn-usage.ts` | `<stateDir>/usage/out-of-turn.jsonl` | One row per priced `/btw` or `/handoff` call: label, session id, repo identity, timestamp, target, attributed model, provider usage. Bounded ring of `MAX_OUT_OF_TURN_USAGE_ROWS = 1000`, rewritten atomically under the state-file lock. | Unparseable rows are skipped and counted by `usage report`; the session ledger is never affected. |
28
+ | **Library Pins** | unversioned YAML map | `readLibraryPins`<br>`src/domains/resources/library.ts` | `<configDir>/library-pins.yaml` | Typed ref (`skill:x`, `agent:y`, `prompt:p`, `fleet:z`) to `{sha256, sourceUrl}` for every resource `library add` or the Skills Hub installed. | A non-map document reads as empty; an entry whose installed file is missing is reported as available, not installed. |
24
29
 
25
30
  ---
26
31
 
27
32
  ## 2. Integrity Verification Contracts
28
33
 
29
- ### Receipt Integrity (Version 15)
34
+ ### Receipt Integrity (Version 20)
30
35
 
31
36
  Receipt integrity authenticates that a sealed receipt matches its ledger envelope without modification. Verification reproduces the canonical JSON serialization and computes the SHA-256 digest:
32
37
 
@@ -38,9 +43,9 @@ export function computeReceiptDigest(receipt: RunReceiptV15): string {
38
43
  ```
39
44
 
40
45
  Receipt verification checks:
41
- 1. `integrity.version === 15`.
46
+ 1. `integrity.version === 20`. A receipt sealed at a lower version is reported as retired rather than invalid: it is intact, but is not read as evidence and is never migrated.
42
47
  2. Calculated SHA-256 matches `integrity.digest`.
43
- 3. All optional fields present in the schema (`validationGrounding`, `capabilityMismatch`, `steering`, `gate`, `plan`, `briefing`) conform to the strict v15 specification.
48
+ 3. All optional fields present in the schema (`validationGrounding`, `capabilityMismatch`, `steering`, `gate`, `fleetGate`, `council`, `plan`, `briefing`) conform to the strict v20 specification.
44
49
 
45
50
  ---
46
51
 
@@ -3,7 +3,7 @@
3
3
  Clio Coder dispatches focused fleet agents from Markdown recipes. Recipes are data files, not hidden code plugins: YAML frontmatter declares identity, mode, tools, optional target/model hints, and thinking level; the Markdown body is the agent instruction text.
4
4
 
5
5
  > [!TIP]
6
- > **Interactive Spec Available:** An interactive dashboard for the agent registry and dispatch admission check gates is located at [docs/html/agents_blueprint.html](html/agents_blueprint.html) (Version: 0.3.6).
6
+ > **Interactive Spec Available:** An interactive dashboard for the agent registry and dispatch admission check gates is located at [docs/html/agents_blueprint.html](html/agents_blueprint.html) (Version: 0.3.8).
7
7
 
8
8
  The source of truth is `src/domains/agents/**`. Clio's agent dispatch engine and execution boundaries are built upon the [@earendil-works/pi-agent-core](https://www.npmjs.com/package/@earendil-works/pi-agent-core) library.
9
9
 
@@ -34,7 +34,7 @@ Recipe IDs are derived from filenames (e.g., `architect.md` -> `architect`). Rec
34
34
  * **Built-in Protection**: Project agents cannot override any shipped built-ins; they are strictly treated as custom/domain agents.
35
35
  * **Reserved IDs**: The IDs `worker` and `delegate` are strictly reserved for custom/internal contexts and cannot be registered as custom agent IDs.
36
36
  * **Local Ignored Custom Examples**: Local examples (e.g., `benchmark-runner`, `clio-dev`, `implementer`, `scientific-validator`) may exist under `.clio-coder/agents` for documentation or test purposes, but are ignored if they collide with reserved/built-in rules.
37
- * **Fleet Contracts**: Shipped builtin fleet contracts (`build-test`, `build-review`, `sdlc`) live under `src/domains/agents/fleets/*.md`. Project-level fleet contracts placed at `.clio-coder/fleets/<name>.md` shadow builtin fleets of the same name. Deterministic code steps reference commands declared in `.clio-coder/fleets/commands.yaml`. Contract v4 requires per-step write boundaries (`writes`).
37
+ * **Fleet Contracts**: Shipped builtin fleet contracts (`build-test`, `build-review`, `sdlc`) live under `src/domains/agents/fleets/*.md`. Library-installed contracts live at `<configDir>/fleets/<name>.md`. Project contracts at `.clio-coder/fleets/<name>.md` take highest precedence. Deterministic code steps reference commands declared in `.clio-coder/fleets/commands.yaml`. Contract v4 requires per-step write boundaries (`writes`).
38
38
 
39
39
  ---
40
40
 
@@ -64,12 +64,36 @@ Internal orchestration helpers and internal process agents. They are hidden from
64
64
  | `scout` | read, grep, find, ls, context, code_nav, git | Broad repository reconnaissance, codebase orientation, structure and entry-point mapping, and multi-file symbol hunting. | `read-only` | `fast` |
65
65
  | `researcher` | read, web_fetch, context | Shadow docs and external-source researcher for coding decisions. | `read-only` | `deep` |
66
66
  | `provenance` | read, grep, find, ls, git | Shadow evidence, receipt, diff, and telemetry reader for handoffs. | `read-only` | `balanced` |
67
+ | `oracle` | read, grep, find, ls, code_nav, context | Shadow advisor behind `/oracle` that protects consistency with prior decisions and returns the strongest challenge to a question. | `read-only` | `deep` |
67
68
  | `context-bootstrap` | read, grep, find, ls, context, code_nav | Internal agent behind `clio-coder context init` that parses repository and returns CLIO-CODER.md payload. | `read-only` | `balanced` |
68
69
 
70
+ The builtin `architect` also serves as the default author for a version 5 fleet `plan` step. In that role it returns the coordinator-owned `delegation-plan` result shape instead of writing its ordinary plan artifact. It may name only agents from the contract roster. The coordinator supplies the plan step's target or profile to every admitted task.
71
+
69
72
  `scout` is bound by a live-grounding contract: its whole final response is one `scout-report` object whose every finding carries the `claim` it observed and the `path:line` that grounds it, a lead it could not confirm live is simply left out, and wiki or index content is orientation only, never citable as evidence. It has an 18-call exploration phase followed by a tool-free synthesis phase; wide parallel batches cannot consume the synthesis backstop as separate violations. Dispatch labels its answer `reconnaissance output (advisory leads, not validation evidence):`.
70
73
 
71
74
  Grounding is checked against the run's own reads, not just against the file. The worker records the exact line span every successful read returned, and a cited line must fall inside one. A line that exists in the file but was never read fails, which is what stops an approximated or inferred line number from passing as observation. `grep` and `code_nav` hits are leads: read the file before citing what they point at.
72
75
 
76
+ `oracle` is the only shadow agent an operator reaches directly, and only through
77
+ `/oracle <question>`. It never receives a forked transcript. `/oracle` packs a
78
+ bounded digest instead and sends it as dispatch briefing data: the settled
79
+ decisions from the session decision board, the open tasks from the task board,
80
+ the last compaction summary when one exists, and the question. The digest is
81
+ capped at 12 KiB total, with per-section caps of 5120 bytes and 24 rows for
82
+ decisions, 3072 bytes and 24 rows for open tasks, 2048 bytes for the compaction
83
+ summary, and 1536 bytes for the question. Every cap that cuts content appends a
84
+ `[truncated]` marker, so an advisor always knows it is reading a tail-less
85
+ record. Entries are filtered to the active branch before the fold, so a `/tree`
86
+ switch never briefs the advisor on decisions the operator walked away from.
87
+
88
+ The run is an ordinary singular dispatch with `requestOrigin: "internal"` and
89
+ `autonomy: "read-only"`, so admission, receipts, and the Fleet Runs island apply
90
+ to it exactly as they apply to `/run`. Its `oracle-report` contract carries the
91
+ answer shape: a verdict line, the strongest challenge the advisor can mount, the
92
+ evidence that would change its mind, and the decisions it cited. The rendered
93
+ answer reaches the main agent the way `/share` puts a worker result there, as an
94
+ operator-authored note on the ordinary user-turn path. `/oracle` during an
95
+ in-flight turn is refused rather than queued.
96
+
73
97
  Every contract-bearing agent gets bounded in-worker repair. When the terminal result misses its contract, the worker replays the validator's own reason, the exact accepted shape, and the `path:line` locations this run actually read, then asks for the result again. Two repair rounds is the whole allowance; after that the run fails with `result_contract_exhausted`. This is what keeps a small local model that gathered the right evidence from being failed for a shape mistake nobody told it about.
74
98
 
75
99
  Two rounds only help when the reason is actionable, so a validator reason names the mistake and shows the value that would have passed. A `mutation-report` with `"validations":[]` is told the array was empty and is given one entry shaped like `{"name":"npm test","passed":true,"evidence":"exit 0"}`, and a report whose entries are malformed is told which keys each entry carries. Naming the requirement alone left a small model re-emitting the same empty array through both rounds.
@@ -1,6 +1,6 @@
1
1
  # Capacity Leases & Fleet Scheduling
2
2
 
3
- This document specifies the multi-process capacity leasing protocols, node scheduling models, cross-process transaction locks, and failure recovery mechanics implemented in Clio Coder `v0.3.6`.
3
+ This document specifies the multi-process capacity leasing protocols, node scheduling models, cross-process transaction locks, and failure recovery mechanics implemented in Clio Coder `v0.3.7`.
4
4
 
5
5
  Source implementations: `src/domains/scheduling/` and `src/domains/dispatch/capacity-lease.ts`.
6
6
 
@@ -1,7 +1,7 @@
1
1
  # Commands and Modes
2
2
 
3
3
  > [!TIP]
4
- > **Interactive Spec Available:** An interactive dashboard is located at [docs/html/commands_blueprint.html](html/commands_blueprint.html) (Version: 0.3.6).
4
+ > **Interactive Spec Available:** An interactive dashboard is located at [docs/html/commands_blueprint.html](html/commands_blueprint.html) (Version: 0.3.8).
5
5
 
6
6
 
7
7
  Clio Coder is a terminal-first alpha harness. This page keeps the command
@@ -131,7 +131,7 @@ Example:
131
131
  clio-coder run \
132
132
  "Find the test command and summarize the project structure." \
133
133
  --target local-lmstudio \
134
- --model your-model-id
134
+ --model qwen3.8-27b
135
135
  ```
136
136
 
137
137
  ## Interactive Slash Commands
@@ -145,17 +145,21 @@ The registry table below lists the available interactive slash commands. On a ba
145
145
  | `/quit` | `/quit` | Exit Clio Coder |
146
146
  | `/help` | `/help [query]` | Open the interactive help center showing commands and keys |
147
147
  | `/skill` | `/skill [name] [task]` | Open the Skills Hub or invoke a skill |
148
+ | `/library` | `/library [kind]` | Open the Skills Hub on a resource library tab |
148
149
  | `/prompts` | `/prompts` | List prompt templates |
149
150
  | `/extensions` | `/extensions` | List installed extensions |
150
151
  | `/interop` | `/interop` | Review other coding agents detected on this machine |
151
152
  | `/share` | `/share [runId] \| /share export <path> \| /share import [--dry-run] [--force] <path>` | Share a worker result with the main agent, or export and import Clio archives |
152
153
  | `/run` | `/run [--agent-profile <profile>] [--runtime <runtimeId>] [--target <id>] [--model <id>] [--thinking <level>] [--tool-profile <minimal-local\|science-local\|full-agent>] [--require <cap>] [--share] <agent> <task>` | Run a fleet agent |
153
154
  | `/delegate` | `/delegate [--share] <agent-id> <task>` | Run an ACP delegation agent |
155
+ | `/btw` | `/btw <question>` | Ask a side question that never enters the session transcript |
156
+ | `/oracle` | `/oracle <question>` | Ask a read-only advisor to challenge a question against this session's settled decisions |
157
+ | `/council` | `/council [--roster <name>] [--rounds <n>] [--synthesis <judge\|vote\|none>] <task>` | Ask a roster of read-only members the same task, with an optional vote or judge synthesis |
154
158
  | `/agents` | `/agents` | List Clio agents and ACP delegation agents |
155
159
  | `/targets` | `/targets` | Open Settings → Targets: health, use, connect, probe, remove |
156
160
  | `/cost` | `/cost` | Show session token and cost totals |
157
161
  | `/context` | `/context compact [instructions] \| /context recall <ref> \| /context init \| /context refresh \| /context reset` | Context hub: window overlay plus compact, recall, init, refresh, and reset |
158
- | `/fleet` | `/fleet` | Open Settings → Fleet: defaults, profiles, agent bindings, nodes |
162
+ | `/fleet` | `/fleet run [--var <key=value>] <name>` | Open Settings → Fleet, or run a fleet contract with an approval preview |
159
163
  | `/decisions` | `/decisions` | Show settled interview decisions and operator revisions |
160
164
  | `/tasks` | `/tasks add <text> \| /tasks hand <id> \| /tasks done <id> \| /tasks drop <id>` | Show the session board or manage project operator tasks |
161
165
  | `/memory` | `/memory seed` | Inspect, promote, or seed task memory |
@@ -167,6 +171,7 @@ The registry table below lists the available interactive slash commands. On a ba
167
171
  | `/settings` | `/settings [section]` | Open interactive settings |
168
172
  | `/resume` | `/resume` | Resume a past session |
169
173
  | `/new` | `/new` | Start a fresh session |
174
+ | `/handoff` | `/handoff <goal>` | Hand this session's working state to a fresh session for a stated goal |
170
175
  | `/tree` | `/tree` | Open session tree navigator |
171
176
  | `/fork` | `/fork` | Fork from an assistant turn |
172
177
  | `/export` | `/export [path]` | Export a self-contained HTML transcript by default; a `.md` path writes Markdown |
@@ -190,6 +195,72 @@ There are no slash-command aliases. `/context compact`, `/quit`, `/model`,
190
195
  spellings stay errors that name `/help` instead of guessing which operation the
191
196
  operator intended.
192
197
 
198
+ `/btw <question>` runs one model round beside the session and renders the answer
199
+ in an overlay. It sends the same compiled message history the next turn would
200
+ send, as read-only input, under a short system instruction saying this is a side
201
+ question, with no tools. Nothing about the round is appended: not the session
202
+ JSONL, not the transcript panel, not the context ledger, not the task board. That
203
+ is the point of it. A fleet run briefs its workers from the transcript, so a
204
+ question the operator asks to orient themselves mid-run would otherwise become
205
+ context every worker inherits. Esc closes the overlay, and cancels the round if it
206
+ is still streaming. `/btw` during an in-flight turn is refused with a notice
207
+ rather than queued, because a side question answered after the run it was asked
208
+ during has already missed its moment. The round's token usage still shows in
209
+ `/cost`, labeled as a side question, because it was a real call and cost real
210
+ money; it is deliberately not counted as a turn.
211
+
212
+ `/council [--roster <name>] [--rounds <n>] [--synthesis judge|vote|none] <task>`
213
+ asks a roster of two to five read-only members the same task and puts the group on
214
+ the Fleet Runs board as one card. It owns no dispatch path of its own: the command
215
+ builds dispatch-tool arguments and admits them through the tool registry, so a
216
+ supervised autonomy level parks the call and the approval overlay names every
217
+ member's label, target, model, node, round count, and synthesis mode before
218
+ anything runs. Members are pinned to read-only autonomy and the council tool
219
+ surface by admission, exactly as they are for a council the model asks for.
220
+
221
+ `--roster` names a `workers.rosters` entry. Without it the command takes
222
+ `workers.rosters.default` when that roster exists, and with neither it refuses
223
+ and names the setting to declare. A roster that is the only one configured is
224
+ still not the default: seating a council from whichever roster happens to be
225
+ present would run models the operator never chose. `--rounds` accepts one to
226
+ three and `--synthesis` accepts `judge`, `vote`, or `none`, which are the tool's
227
+ own bounds, enforced where the operator typed them so a council is never refused
228
+ after its plan has already been shown. `/council` during an in-flight turn is
229
+ refused with a notice rather than queued, for the same reason `/fleet run` is: an
230
+ approved plan describes the workspace as it stands. Nothing the members produce
231
+ enters the main agent's context until an operator runs `/share`.
232
+
233
+ `/handoff <goal>` carries this session's working state into a fresh session for a
234
+ goal the operator states. The goal is required and gated: a goal shorter than 12
235
+ characters is refused, and so is one of a small stoplist of non-goals such as
236
+ "continue", "next", or "resume". Both refusals name the rule they enforce, because
237
+ "keep going" is exactly the instruction a handoff exists to replace.
238
+
239
+ One model round then runs on the same out-of-turn seam `/btw` uses. It reads the
240
+ compiled message history the next turn would send, sends no tools, and answers
241
+ with JSON validated against a fixed response schema of decisions, facts, files,
242
+ commands, and open questions. Every list and every string is bounded; output over
243
+ a bound is truncated with a visible marker and the document names each bound that
244
+ fired, so nothing is cut silently and an over-eager answer is never a refusal.
245
+
246
+ Every file path the model names is checked against this session's read ledger and
247
+ never against the filesystem. Paths the session did not touch are dropped and
248
+ listed in the document under their own heading so the operator can see what the
249
+ model invented. Extracted decisions are merged with the session's settled decision
250
+ board, and the board wins. The result is one Markdown document opened for review:
251
+ Enter accepts it, `e` hands it to `$EDITOR`, and Esc cancels the whole handoff with
252
+ nothing written anywhere.
253
+
254
+ On accept, Clio mints a new session, writes the reviewed document into it as
255
+ bounded data labelled as a handoff from the old session id, and replays the old
256
+ session's skill activations so loaded skills carry forward. The document is never
257
+ written as a fabricated user turn. The old session is left untouched apart from one
258
+ terminal note recording the target session id. A handoff is a session operation
259
+ throughout: it writes no memory promotion candidate and never calls the task-memory
260
+ bank. `/handoff` during an in-flight turn is refused with a notice rather than
261
+ queued, because a document summarizing a session that is still moving would be
262
+ wrong by the time it was read.
263
+
193
264
  The `/resume` picker accepts Page Up and Page Down to move by its 12 visible rows. Arrow keys continue to move one session at a time, and typing continues to filter the list.
194
265
 
195
266
  Only active commands run. Typing anything command-shaped that the registry does
@@ -256,6 +327,15 @@ operator steering whose run id names a receipt it can read, so a model that
256
327
  never dispatched the run does not discard it as unattributed output. A turn
257
328
  that only relays a shared note does not trip the unbacked-worker-claim
258
329
  advisory.
330
+ A council run shares as a council. `/share <synthesis runId>` brings the whole
331
+ `council-report` in as one bounded block: every final-round member's answer under
332
+ its roster label, each with its verdict when it declared one, then the synthesis
333
+ line naming the mode, the verdict, the tally, and the judge run when there was
334
+ one. `/share <member runId>` brings that one member's answer in under its roster
335
+ label, so a single voice never reaches the main agent as an unattributed one. A
336
+ synthesis run whose sealed text does not parse as a report is shared verbatim
337
+ rather than dropped, because the operator named that run.
338
+
259
339
  `/new` resets the transcript and the pool bare `/share` draws from, so a run
260
340
  from the previous session cannot be shared into the new one. Worker tool
261
341
  arguments never cross at all: the transcript carries tool names only, the same