@iowarp/clio-coder 0.3.3 → 0.3.6

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 (370) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/CONTRIBUTING.md +7 -7
  3. package/README.md +3 -3
  4. package/dist/{acp-P2AQILE2.js → acp-2BEHC4DL.js} +9 -8
  5. package/dist/{agents-72W3BI7I.js → agents-LNNFTM53.js} +29 -24
  6. package/dist/assets/codewiki.json +1 -1
  7. package/dist/{auth-5TWEIYDN.js → auth-KXXFI2VS.js} +14 -10
  8. package/dist/{chunk-GGXXDWE4.js → chunk-22NAGB7X.js} +2 -2
  9. package/dist/{chunk-YCWGATWI.js → chunk-24I7BN55.js} +2 -2
  10. package/dist/{chunk-EKMEHE4H.js → chunk-33YXPOE3.js} +2 -3
  11. package/dist/chunk-3BPUFZDL.js +37 -0
  12. package/dist/chunk-43AOLP7E.js +375 -0
  13. package/dist/{chunk-ZDOOVTXZ.js → chunk-4OC57DA6.js} +27 -4
  14. package/dist/{chunk-6SGHMWE3.js → chunk-5JGRAMKL.js} +5 -5
  15. package/dist/{chunk-V6RTAOC2.js → chunk-6US73PDB.js} +572 -51
  16. package/dist/{chunk-5UFT4SUX.js → chunk-6XXKFVSN.js} +3 -3
  17. package/dist/{chunk-A3CYT5EX.js → chunk-AD2SYQYC.js} +55 -2
  18. package/dist/chunk-AOCYTWAV.js +449 -0
  19. package/dist/chunk-CFGTUFWB.js +67 -0
  20. package/dist/chunk-CJUB2JJ2.js +1478 -0
  21. package/dist/{chunk-FNTMWMX5.js → chunk-CKXWIANG.js} +14 -12
  22. package/dist/{chunk-PIWWS5BL.js → chunk-CYQKWTG3.js} +63 -78
  23. package/dist/{chunk-LZSJBIVT.js → chunk-DJVECN66.js} +271 -762
  24. package/dist/{chunk-CBCAPZAA.js → chunk-E25LMLRW.js} +2 -2
  25. package/dist/{chunk-ZWMF7253.js → chunk-E2ER4LJF.js} +304 -9
  26. package/dist/{chunk-STBPMHSX.js → chunk-EKY57CSP.js} +51 -84
  27. package/dist/{chunk-DUYJ5IO6.js → chunk-EYPA3EGJ.js} +12 -4
  28. package/dist/{chunk-M6SHUN7Q.js → chunk-FO5ZOVUY.js} +2 -2
  29. package/dist/chunk-FYYLNIL5.js +313 -0
  30. package/dist/{chunk-OQ33BKR3.js → chunk-G7MUEIGA.js} +3 -60
  31. package/dist/chunk-GEYXPTRF.js +613 -0
  32. package/dist/chunk-GOXNB3AO.js +261 -0
  33. package/dist/{chunk-G4BMMOKF.js → chunk-HVDIIIQW.js} +2 -2
  34. package/dist/chunk-HWUFFB6L.js +83 -0
  35. package/dist/{chunk-4XUGQOHA.js → chunk-K7T3E2SR.js} +15 -8
  36. package/dist/chunk-K7VKOLQQ.js +15 -0
  37. package/dist/{chunk-UFIIWP2H.js → chunk-KHSFENX2.js} +8 -8
  38. package/dist/{chunk-BMEMKKIT.js → chunk-KOHPCX4K.js} +2 -2
  39. package/dist/chunk-LCGCVYZ4.js +57 -0
  40. package/dist/chunk-LL4KHSZI.js +22 -0
  41. package/dist/{chunk-PAJK6MAQ.js → chunk-LYF7OHWH.js} +42 -15
  42. package/dist/{chunk-POHLU5DW.js → chunk-M6L6IDJG.js} +3 -3
  43. package/dist/{chunk-5UUP6MWO.js → chunk-MV3K5QF2.js} +5 -436
  44. package/dist/{chunk-X4RCMKVQ.js → chunk-NDINPTJ4.js} +2 -2
  45. package/dist/{chunk-TZK7PACC.js → chunk-NILBFAPG.js} +14 -8
  46. package/dist/chunk-ODFEOB4F.js +1082 -0
  47. package/dist/{chunk-AGYYIBLL.js → chunk-OH3TOQTB.js} +6 -2
  48. package/dist/chunk-OZNBF4L3.js +23 -0
  49. package/dist/{chunk-DSELYM6W.js → chunk-PBTHKCPN.js} +30 -10
  50. package/dist/{verify-375KUB3Y.js → chunk-PCZJO5TI.js} +127 -42
  51. package/dist/{chunk-ED4KHGC3.js → chunk-PPAMZ32Z.js} +9 -2
  52. package/dist/{chunk-SRDMMSEP.js → chunk-QM3F2GKX.js} +1063 -1645
  53. package/dist/{chunk-X6IAEBZR.js → chunk-QNQHSOLF.js} +7 -7
  54. package/dist/{chunk-OC7FIQPC.js → chunk-R46L2BIR.js} +10 -7
  55. package/dist/{chunk-2TLUCQVG.js → chunk-RD5U66HV.js} +3 -3
  56. package/dist/{chunk-6N5PTWMY.js → chunk-RY3LY4J5.js} +50 -13
  57. package/dist/{chunk-OKGUZO2U.js → chunk-SPULKLCF.js} +4 -3
  58. package/dist/{chunk-OOJYHWRB.js → chunk-TSHXZTOQ.js} +6 -5
  59. package/dist/chunk-TZSKNMZG.js +434 -0
  60. package/dist/{chunk-7MNJORFF.js → chunk-UL3WSD3F.js} +6 -1
  61. package/dist/{chunk-VJWL6YS5.js → chunk-UUVG37B4.js} +2 -2
  62. package/dist/{chunk-COU2UHX6.js → chunk-VEZEGCGW.js} +170 -2
  63. package/dist/chunk-W6GROXXM.js +69 -0
  64. package/dist/{chunk-OAO4GE4M.js → chunk-WHGPSPT5.js} +2 -2
  65. package/dist/chunk-WHJYKASB.js +677 -0
  66. package/dist/{chunk-ORBHGJC5.js → chunk-WR67VIZY.js} +3 -3
  67. package/dist/{chunk-YHZX5GEU.js → chunk-XAKHZX5N.js} +2 -2
  68. package/dist/{chunk-TZTZS7QK.js → chunk-XE2VEJHX.js} +5 -3
  69. package/dist/{chunk-LM5TQCJZ.js → chunk-XF5N4U5A.js} +8 -7
  70. package/dist/{chunk-LWLEKMDQ.js → chunk-XXQNGV4M.js} +1073 -552
  71. package/dist/{chunk-KZWTDYJF.js → chunk-XYDYPRZI.js} +7 -7
  72. package/dist/chunk-ZGVHUX3M.js +66 -0
  73. package/dist/{chunk-LW6DSM3M.js → chunk-ZRGEBJ4T.js} +1192 -1119
  74. package/dist/{chunk-2DJ2KNFG.js → chunk-ZXF4XRKW.js} +202 -40
  75. package/dist/chunk-ZZMN5OM4.js +122 -0
  76. package/dist/cli/index.js +34 -30
  77. package/dist/{clio-JOU4FXVA.js → clio-M2KGYUFZ.js} +7 -6
  78. package/dist/{code-nav-7AX6FYE6.js → code-nav-GQNL7XA6.js} +8 -6
  79. package/dist/codewiki/build-worker.js +4 -4
  80. package/dist/{components-KELWS457.js → components-5TTYYX6G.js} +3 -3
  81. package/dist/{config-XCDVKR23.js → config-XUUYQIWO.js} +47 -35
  82. package/dist/{configure-4GAP54ZW.js → configure-IHJ7YOMV.js} +18 -15
  83. package/dist/{context-77FM5DV5.js → context-74JLXAWD.js} +18 -10
  84. package/dist/{context-4UOGGLQ5.js → context-75MIWW3U.js} +41 -29
  85. package/dist/{context-5VKGUVJJ.js → context-ZQ7SIFJV.js} +85 -9
  86. package/dist/{context-clear-XXJRLCJJ.js → context-clear-GYKWNUML.js} +41 -29
  87. package/dist/{context-index-BZ4UYMTC.js → context-index-SSR5ECNE.js} +3 -3
  88. package/dist/context-working-set-UX5KEP4J.js +1553 -0
  89. package/dist/{dispatch-runner-QPRDDBDX.js → dispatch-runner-GIJBHNFL.js} +47 -32
  90. package/dist/{docs-2C2LTVT2.js → docs-6FZSCG5B.js} +3 -3
  91. package/dist/{doctor-HR46URBJ.js → doctor-SVJ5BZCW.js} +12 -12
  92. package/dist/{eval-XSSNATB4.js → eval-CG6LLBLD.js} +54 -238
  93. package/dist/{evidence-6HG2PY2B.js → evidence-ZYFIEN42.js} +57 -28
  94. package/dist/{evolve-K7YU3NCY.js → evolve-QGEXEMDW.js} +36 -25
  95. package/dist/{extensions-QVDOHDGJ.js → extensions-ADGNCJJD.js} +3 -3
  96. package/dist/{fleet-VY3HHKN6.js → fleet-S5R4ZOQY.js} +73 -44
  97. package/dist/{fleet-preflight-DDN536IT.js → fleet-preflight-BHSNPBMH.js} +3 -3
  98. package/dist/{init-JYGXI3FK.js → init-5DRU55YR.js} +49 -37
  99. package/dist/memory-7YKKR6UC.js +467 -0
  100. package/dist/{models-I5QWSEOM.js → models-ZPOLRU2C.js} +24 -21
  101. package/dist/{monitor-GE4ID3IA.js → monitor-US5F5YGZ.js} +73 -46
  102. package/dist/{orchestrator-EM5MC3HM.js → orchestrator-E2AL4T5N.js} +1624 -1007
  103. package/dist/{paths-UXLN5YYZ.js → paths-E7KYAQWE.js} +3 -3
  104. package/dist/{reset-L2FQEE3E.js → reset-KZ652EK6.js} +6 -5
  105. package/dist/{run-ZU3QMZPZ.js → run-SRNBKDWD.js} +76 -54
  106. package/dist/{share-S5BZQC5I.js → share-CGZE33UP.js} +7 -6
  107. package/dist/{skills-X5VXCRNQ.js → skills-S2X4DLY5.js} +4 -4
  108. package/dist/{skills-eval-WKIHWTHR.js → skills-eval-W2GGIC4R.js} +40 -29
  109. package/dist/{targets-SNCPI2NR.js → targets-54SWINWB.js} +28 -23
  110. package/dist/{terminal-lease-BNAHVHBS.js → terminal-lease-SAIF2OGY.js} +6 -4
  111. package/dist/{uninstall-FZCQCDKC.js → uninstall-BVLWXKBT.js} +3 -3
  112. package/dist/{upgrade-JQHHPQ4K.js → upgrade-JKAR27XC.js} +20 -19
  113. package/dist/{usage-OR4O5SMZ.js → usage-MSAWCLX4.js} +79 -36
  114. package/dist/verifiers-NCBTHHN2.js +1220 -0
  115. package/dist/verify-X5HDROLA.js +25 -0
  116. package/dist/{wiki-generate-UEXP2ARI.js → wiki-generate-GUSOQ6ZP.js} +50 -37
  117. package/dist/worker/entry.js +90 -70
  118. package/dist/{workspace-G4ZWUIPR.js → workspace-ZJ6BFM3Q.js} +4 -4
  119. package/docs/README.md +8 -7
  120. package/docs/acp.md +1 -1
  121. package/docs/alcf-provider.md +1 -1
  122. package/docs/architecture.md +2 -2
  123. package/docs/artifact-placement.md +1 -2
  124. package/docs/artifact-versions.md +1 -1
  125. package/docs/built-in-agents.md +1 -1
  126. package/docs/capacity-and-scheduling.md +1 -1
  127. package/docs/commands-and-modes.md +60 -26
  128. package/docs/config-knobs-audit.md +1 -2
  129. package/docs/configuration-and-targets.md +26 -1
  130. package/docs/context-engine.md +67 -13
  131. package/docs/context-working-set.md +194 -0
  132. package/docs/development-pipeline.md +1 -1
  133. package/docs/documentation-coverage.md +6 -6
  134. package/docs/documentation-guide.md +7 -6
  135. package/docs/environment-variables.md +2 -1
  136. package/docs/eval-runner.md +1 -1
  137. package/docs/evals-internal.md +4 -32
  138. package/docs/evidence-and-memory.md +139 -7
  139. package/docs/evolution.md +1 -1
  140. package/docs/exit-codes-and-output.md +1 -1
  141. package/docs/extensions-and-sharing.md +2 -2
  142. package/docs/fleet-dispatch.md +49 -8
  143. package/docs/glossary.md +21 -1
  144. package/docs/installation-and-lifecycle.md +2 -2
  145. package/docs/middleware-and-components.md +19 -2
  146. package/docs/model-catalog.md +7 -9
  147. package/docs/observability.md +4 -4
  148. package/docs/proactive-memory.md +26 -16
  149. package/docs/prompt-envelope-and-tools.md +7 -5
  150. package/docs/provider-adapter-cookbook.md +1 -1
  151. package/docs/release-cut-checklist.md +43 -40
  152. package/docs/safety-model.md +49 -8
  153. package/docs/scientific-validation.md +21 -3
  154. package/docs/session-lifecycle.md +3 -3
  155. package/docs/skills-marketplace.md +1 -1
  156. package/docs/tool-usage.md +79 -12
  157. package/docs/trace-store.md +1 -1
  158. package/docs/troubleshooting.md +1 -1
  159. package/docs/tui-design.md +38 -4
  160. package/docs/worker-dispatch-mechanics.md +11 -1
  161. package/package.json +13 -13
  162. package/skills/meta/clio-test/SKILL.md +20 -17
  163. package/skills/meta/clio-test/evals.md +3 -3
  164. package/skills/meta/clio-test/references/harness.md +35 -6
  165. package/skills/meta/clio-test/references/test-map.md +20 -10
  166. package/skills/registry.yaml +2 -2
  167. package/skills/skill-marketplace.json +1 -1
  168. package/src/cli/agents.ts +2 -3
  169. package/src/cli/argv.ts +14 -1
  170. package/src/cli/context-working-set.ts +513 -0
  171. package/src/cli/context.ts +8 -0
  172. package/src/cli/evidence.ts +20 -2
  173. package/src/cli/fleet.ts +15 -0
  174. package/src/cli/index.ts +5 -1
  175. package/src/cli/memory.ts +272 -10
  176. package/src/cli/modes/json-stream.ts +2 -2
  177. package/src/cli/modes/print.ts +12 -1
  178. package/src/cli/run.ts +22 -2
  179. package/src/cli/targets.ts +12 -3
  180. package/src/cli/usage.ts +55 -7
  181. package/src/cli/verifiers.ts +325 -0
  182. package/src/core/bash-exec.ts +39 -14
  183. package/src/core/bus-events.ts +22 -4
  184. package/src/core/config.ts +54 -0
  185. package/src/core/defaults.ts +50 -3
  186. package/src/core/response-model-id.ts +134 -0
  187. package/src/core/toml.ts +62 -0
  188. package/src/core/verification-scripts.ts +6 -0
  189. package/src/core/workspace-files.ts +0 -1
  190. package/src/domains/agents/builtins/architect.md +1 -1
  191. package/src/domains/agents/builtins/verifier.md +3 -0
  192. package/src/domains/agents/catalog.ts +5 -4
  193. package/src/domains/agents/recipe.ts +54 -14
  194. package/src/domains/agents/result-contract.ts +7 -4
  195. package/src/domains/config/classify.ts +1 -0
  196. package/src/domains/context/bootstrap.ts +36 -27
  197. package/src/domains/context/project-metadata.ts +19 -63
  198. package/src/domains/context/prompt-context.ts +8 -0
  199. package/src/domains/context/working-set/contract.ts +161 -0
  200. package/src/domains/context/working-set/defaults.ts +28 -0
  201. package/src/domains/context/working-set/engine.ts +203 -0
  202. package/src/domains/context/working-set/fold.ts +62 -0
  203. package/src/domains/context/working-set/horizon.ts +38 -0
  204. package/src/domains/context/working-set/marker.ts +103 -0
  205. package/src/domains/context/working-set/path-index.ts +436 -0
  206. package/src/domains/context/working-set/payload.ts +152 -0
  207. package/src/domains/context/working-set/policies/age-horizon.ts +55 -0
  208. package/src/domains/context/working-set/policies/index.ts +20 -0
  209. package/src/domains/context/working-set/policies/structural.ts +160 -0
  210. package/src/domains/context/working-set/project.ts +132 -0
  211. package/src/domains/context/working-set/protect.ts +109 -0
  212. package/src/domains/context/working-set/recall.ts +177 -0
  213. package/src/domains/context/working-set/replay/controls.ts +112 -0
  214. package/src/domains/context/working-set/replay/load-clio.ts +199 -0
  215. package/src/domains/context/working-set/replay/metrics.ts +185 -0
  216. package/src/domains/context/working-set/replay/reference-graph.ts +79 -0
  217. package/src/domains/context/working-set/replay/report.ts +139 -0
  218. package/src/domains/context/working-set/replay/runner.ts +325 -0
  219. package/src/domains/context/working-set/replay/synthetic.ts +422 -0
  220. package/src/domains/context/working-set/replay/trace.ts +21 -0
  221. package/src/domains/context/working-set/visible.ts +54 -0
  222. package/src/domains/dispatch/budget-envelope.ts +396 -0
  223. package/src/domains/dispatch/contract.ts +2 -0
  224. package/src/domains/dispatch/extension.ts +81 -27
  225. package/src/domains/dispatch/orphan-recovery.ts +1 -0
  226. package/src/domains/dispatch/receipt-integrity.ts +4 -0
  227. package/src/domains/dispatch/state.ts +1 -0
  228. package/src/domains/dispatch/types.ts +10 -3
  229. package/src/domains/dispatch/validation.ts +14 -0
  230. package/src/domains/dispatch/worker-spawn.ts +14 -3
  231. package/src/domains/eval/metrics/evidence.ts +0 -116
  232. package/src/domains/eval/metrics/invariants.ts +1 -1
  233. package/src/domains/eval/runners/clio-run.ts +1 -10
  234. package/src/domains/eval/runners/external-command.ts +2 -29
  235. package/src/domains/eval/schema/suite.ts +0 -7
  236. package/src/domains/eval/suites/run.ts +1 -7
  237. package/src/domains/evidence/build.ts +112 -45
  238. package/src/domains/evidence/eval.ts +24 -7
  239. package/src/domains/evidence/index.ts +53 -0
  240. package/src/domains/evidence/ordering.ts +12 -0
  241. package/src/domains/evidence/run-trust.ts +221 -0
  242. package/src/domains/evidence/store.ts +46 -6
  243. package/src/domains/evidence/trust-status.ts +854 -0
  244. package/src/domains/evidence/types.ts +26 -0
  245. package/src/domains/memory/index.ts +22 -0
  246. package/src/domains/memory/operations.ts +58 -1
  247. package/src/domains/memory/promotion.ts +281 -0
  248. package/src/domains/memory/prompt-section.ts +25 -5
  249. package/src/domains/memory/proposal.ts +51 -7
  250. package/src/domains/memory/task-bank.ts +3 -2
  251. package/src/domains/memory/task-memory-handoff.ts +181 -24
  252. package/src/domains/memory/task-memory-policy.ts +3 -1
  253. package/src/domains/memory/types.ts +37 -0
  254. package/src/domains/memory/validate.ts +178 -0
  255. package/src/domains/middleware/memory-intervention.ts +38 -25
  256. package/src/domains/middleware/runtime.ts +6 -0
  257. package/src/domains/middleware/skills-reminder.ts +19 -4
  258. package/src/domains/middleware/stalled-turn.ts +208 -5
  259. package/src/domains/middleware/types.ts +10 -0
  260. package/src/domains/observability/contract.ts +6 -1
  261. package/src/domains/observability/cost.ts +20 -4
  262. package/src/domains/observability/extension.ts +2 -2
  263. package/src/domains/providers/index.ts +3 -0
  264. package/src/domains/providers/model-discovery.ts +9 -0
  265. package/src/domains/providers/runtime-resolution.ts +38 -1
  266. package/src/domains/providers/runtimes/common/probe-helpers.ts +97 -16
  267. package/src/domains/providers/types/context-window-slots.ts +18 -0
  268. package/src/domains/providers/types/runtime-descriptor.ts +3 -1
  269. package/src/domains/safety/autonomy.ts +1 -1
  270. package/src/domains/safety/call-target.ts +211 -14
  271. package/src/domains/safety/decision-presentation.ts +268 -0
  272. package/src/domains/safety/default-path-policy.ts +8 -0
  273. package/src/domains/safety/finish-contract.ts +4 -3
  274. package/src/domains/safety/policy-engine.ts +48 -6
  275. package/src/domains/safety/redaction.ts +73 -0
  276. package/src/domains/session/compaction/compact.ts +23 -1
  277. package/src/domains/session/compaction/cut-point.ts +2 -0
  278. package/src/domains/session/compaction/tokens.ts +16 -1
  279. package/src/domains/session/context-ledger.ts +12 -1
  280. package/src/domains/session/decision-board.ts +4 -0
  281. package/src/domains/session/entries.ts +110 -1
  282. package/src/domains/session/history.ts +68 -19
  283. package/src/domains/session/manager.ts +9 -2
  284. package/src/domains/session/migrations/index.ts +22 -3
  285. package/src/domains/session/usage.ts +24 -7
  286. package/src/engine/acp/event-mapper.ts +7 -0
  287. package/src/engine/acp/server.ts +32 -2
  288. package/src/engine/agent.ts +18 -1
  289. package/src/engine/apis/lmstudio.ts +25 -4
  290. package/src/engine/apis/openai-completions.ts +147 -22
  291. package/src/engine/claude/sdk-runtime.ts +8 -2
  292. package/src/engine/claude/tool-safety.ts +13 -0
  293. package/src/engine/loop-guard.ts +27 -3
  294. package/src/engine/session.ts +9 -3
  295. package/src/engine/worker-events.ts +4 -3
  296. package/src/engine/worker-runtime.ts +59 -54
  297. package/src/entry/orchestrator.ts +34 -5
  298. package/src/interactive/chat-loop-messages.ts +40 -6
  299. package/src/interactive/chat-loop.ts +13 -0
  300. package/src/interactive/chat-panel.ts +17 -1
  301. package/src/interactive/chat-renderer.ts +49 -24
  302. package/src/interactive/clio-editor.ts +44 -7
  303. package/src/interactive/context-meter.ts +10 -0
  304. package/src/interactive/context-overlay.ts +120 -7
  305. package/src/interactive/context-recall-command.ts +110 -0
  306. package/src/interactive/cost-overlay.ts +39 -8
  307. package/src/interactive/dispatch-board.ts +212 -35
  308. package/src/interactive/footer/widgets.ts +13 -0
  309. package/src/interactive/interactive-application.ts +6 -1
  310. package/src/interactive/interactive-input-runtime.ts +11 -1
  311. package/src/interactive/interactive-presentation.ts +11 -1
  312. package/src/interactive/interactive-slash-runtime.ts +37 -1
  313. package/src/interactive/memory-overlay.ts +89 -4
  314. package/src/interactive/model-session-replay.ts +21 -0
  315. package/src/interactive/overlay-ask-user-lifecycle.ts +1 -1
  316. package/src/interactive/overlay-frame.ts +5 -2
  317. package/src/interactive/overlay-general-openers.ts +46 -1
  318. package/src/interactive/overlay-key-routing.ts +41 -1
  319. package/src/interactive/overlay-lifecycle.ts +11 -4
  320. package/src/interactive/overlay-permission-lifecycle.ts +23 -8
  321. package/src/interactive/overlay-session-lifecycle.ts +8 -4
  322. package/src/interactive/overlay-transitions.ts +11 -0
  323. package/src/interactive/overlays/ask-user.ts +74 -30
  324. package/src/interactive/overlays/decisions.ts +3 -1
  325. package/src/interactive/permission-hint.ts +35 -0
  326. package/src/interactive/permission-overlay.ts +95 -45
  327. package/src/interactive/renderers/tool-execution.ts +37 -51
  328. package/src/interactive/session-last-turn.ts +8 -1
  329. package/src/interactive/session-transcript.ts +2 -2
  330. package/src/interactive/session-usage-reseed.ts +36 -10
  331. package/src/interactive/slash-commands.ts +31 -4
  332. package/src/interactive/status/summary.ts +5 -0
  333. package/src/interactive/status/types.ts +5 -0
  334. package/src/interactive/terminal-lease.ts +1 -0
  335. package/src/interactive/turn-context.ts +333 -110
  336. package/src/interactive/turn-middleware.ts +7 -6
  337. package/src/interactive/turn-runtime.ts +37 -8
  338. package/src/interactive/turn-state.ts +3 -0
  339. package/src/interactive/worker-progress.ts +440 -0
  340. package/src/interactive/worker-stream.ts +51 -110
  341. package/src/tools/agent-tools.ts +39 -7
  342. package/src/tools/ask-user.ts +21 -1
  343. package/src/tools/bash.ts +144 -82
  344. package/src/tools/builtin-tool-catalog.ts +11 -5
  345. package/src/tools/context/index.ts +107 -5
  346. package/src/tools/context/surface.ts +3 -2
  347. package/src/tools/core-bootstrap.ts +21 -0
  348. package/src/tools/dispatch-arguments.ts +8 -0
  349. package/src/tools/dispatch-event-text.ts +19 -0
  350. package/src/tools/dispatch-runner.ts +9 -7
  351. package/src/tools/dispatch.ts +24 -1
  352. package/src/tools/monitor.ts +43 -20
  353. package/src/tools/registry.ts +72 -10
  354. package/src/tools/result-disposition.ts +706 -0
  355. package/src/tools/result-shaping.ts +321 -20
  356. package/src/tools/safe-exec.ts +2 -0
  357. package/src/tools/verify/authoring.ts +1120 -0
  358. package/src/tools/verify/catalog.ts +346 -0
  359. package/src/tools/verify/index.ts +13 -3
  360. package/src/tools/verify/scripts.ts +135 -37
  361. package/src/tools/verify/surface.ts +9 -5
  362. package/src/tools/worker-evidence.ts +54 -12
  363. package/src/worker/spec-contract.ts +43 -3
  364. package/dist/chunk-J7CWMCQD.js +0 -255
  365. package/dist/chunk-T6YILFSB.js +0 -80
  366. package/dist/chunk-VAKQQHWR.js +0 -434
  367. package/dist/chunk-VPAYEGVX.js +0 -184
  368. package/dist/chunk-XBXAASKX.js +0 -18
  369. package/dist/memory-WFZMGYHX.js +0 -236
  370. package/src/domains/eval/metrics/chaos-stream.ts +0 -93
@@ -0,0 +1,25 @@
1
+ import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
2
+ import {
3
+ verifyTool
4
+ } from "./chunk-PCZJO5TI.js";
5
+ import "./chunk-NILBFAPG.js";
6
+ import "./chunk-FYYLNIL5.js";
7
+ import "./chunk-UL3WSD3F.js";
8
+ import "./chunk-VG7TBQIY.js";
9
+ import "./chunk-OQE5J4C6.js";
10
+ import "./chunk-ECH6PKUQ.js";
11
+ import "./chunk-6XLNIQDB.js";
12
+ import "./chunk-5B2AEOW5.js";
13
+ import "./chunk-CGKSTWHD.js";
14
+ import "./chunk-VEZEGCGW.js";
15
+ import "./chunk-FQ4SKYE4.js";
16
+ import "./chunk-FCSXB6T2.js";
17
+ import "./chunk-APJ265NV.js";
18
+ import "./chunk-YXLYO42X.js";
19
+ import "./chunk-BNAZZHFG.js";
20
+ import "./chunk-6EJMN2Y3.js";
21
+ import "./chunk-3R73A4XB.js";
22
+ export {
23
+ verifyTool
24
+ };
25
+ //# sourceMappingURL=verify-X5HDROLA.js.map
@@ -5,44 +5,46 @@ import {
5
5
  import {
6
6
  SchedulingDomainModule,
7
7
  createPromptsDomainModule
8
- } from "./chunk-LM5TQCJZ.js";
8
+ } from "./chunk-XF5N4U5A.js";
9
9
  import {
10
10
  AgentsDomainModule,
11
11
  SafetyDomainModule
12
- } from "./chunk-PAJK6MAQ.js";
12
+ } from "./chunk-LYF7OHWH.js";
13
13
  import {
14
14
  ConfigDomainModule,
15
15
  loadDomains
16
- } from "./chunk-OC7FIQPC.js";
16
+ } from "./chunk-R46L2BIR.js";
17
17
  import {
18
18
  createObservabilityDomainModule
19
- } from "./chunk-4XUGQOHA.js";
19
+ } from "./chunk-K7T3E2SR.js";
20
20
  import "./chunk-HC4CLZ2Y.js";
21
21
  import "./chunk-HFSBBKSQ.js";
22
- import "./chunk-CBCAPZAA.js";
22
+ import "./chunk-E25LMLRW.js";
23
23
  import {
24
24
  ContextDomainModule,
25
25
  buildWikiPagePrompt,
26
26
  buildWikiPlanPrompt
27
- } from "./chunk-PIWWS5BL.js";
27
+ } from "./chunk-CYQKWTG3.js";
28
+ import "./chunk-LCGCVYZ4.js";
28
29
  import "./chunk-5WIGXA4T.js";
29
- import "./chunk-V6RTAOC2.js";
30
+ import "./chunk-6US73PDB.js";
31
+ import {
32
+ DispatchDomainModule
33
+ } from "./chunk-QM3F2GKX.js";
30
34
  import {
31
- DispatchDomainModule,
32
35
  SessionDomainModule
33
- } from "./chunk-SRDMMSEP.js";
34
- import "./chunk-4BJ5BYCE.js";
36
+ } from "./chunk-CJUB2JJ2.js";
35
37
  import "./chunk-QKMUKYO7.js";
36
- import "./chunk-AGYYIBLL.js";
37
- import "./chunk-OOJYHWRB.js";
38
+ import "./chunk-OH3TOQTB.js";
39
+ import "./chunk-TSHXZTOQ.js";
38
40
  import "./chunk-TXOTCRLG.js";
39
- import "./chunk-G4BMMOKF.js";
41
+ import "./chunk-HVDIIIQW.js";
40
42
  import {
41
43
  MAX_PAGE_ATTEMPTS,
42
44
  pendingPages,
43
45
  readAuthoredWikiPlan,
44
46
  writeWikiPlanFile
45
- } from "./chunk-X4RCMKVQ.js";
47
+ } from "./chunk-NDINPTJ4.js";
46
48
  import "./chunk-MVVUPGPW.js";
47
49
  import {
48
50
  ResourcesDomainModule
@@ -50,58 +52,69 @@ import {
50
52
  import "./chunk-4BPJXDWC.js";
51
53
  import "./chunk-2SFS6XQE.js";
52
54
  import "./chunk-ZWLZP4ZT.js";
55
+ import "./chunk-W6GROXXM.js";
53
56
  import {
54
57
  MiddlewareDomainModule
55
- } from "./chunk-2DJ2KNFG.js";
58
+ } from "./chunk-ZXF4XRKW.js";
56
59
  import "./chunk-IR4CFBFN.js";
57
60
  import "./chunk-UOV2BYIW.js";
58
- import "./chunk-OAO4GE4M.js";
59
- import "./chunk-LWLEKMDQ.js";
60
- import "./chunk-STBPMHSX.js";
61
- import "./chunk-GGXXDWE4.js";
62
- import "./chunk-5UUP6MWO.js";
61
+ import "./chunk-WHGPSPT5.js";
62
+ import "./chunk-XXQNGV4M.js";
63
+ import "./chunk-43AOLP7E.js";
64
+ import "./chunk-EKY57CSP.js";
65
+ import "./chunk-22NAGB7X.js";
66
+ import "./chunk-AOCYTWAV.js";
67
+ import "./chunk-MV3K5QF2.js";
63
68
  import "./chunk-CMZWFGD2.js";
64
69
  import "./chunk-I4HZDVNP.js";
65
- import "./chunk-7MNJORFF.js";
70
+ import "./chunk-FYYLNIL5.js";
71
+ import "./chunk-UL3WSD3F.js";
66
72
  import "./chunk-VG7TBQIY.js";
67
73
  import "./chunk-OQE5J4C6.js";
68
74
  import "./chunk-ECH6PKUQ.js";
69
- import "./chunk-T6YILFSB.js";
70
- import "./chunk-VAKQQHWR.js";
75
+ import "./chunk-GOXNB3AO.js";
76
+ import "./chunk-HWUFFB6L.js";
77
+ import "./chunk-ODFEOB4F.js";
78
+ import "./chunk-OZNBF4L3.js";
79
+ import "./chunk-4BJ5BYCE.js";
71
80
  import "./chunk-6XLNIQDB.js";
72
81
  import "./chunk-5B2AEOW5.js";
73
82
  import {
74
83
  ToolNames
75
84
  } from "./chunk-CGKSTWHD.js";
76
- import "./chunk-POHLU5DW.js";
77
- import "./chunk-YHZX5GEU.js";
78
- import "./chunk-VJWL6YS5.js";
85
+ import "./chunk-M6L6IDJG.js";
86
+ import "./chunk-XAKHZX5N.js";
87
+ import "./chunk-UUVG37B4.js";
79
88
  import "./chunk-LBMZMYH2.js";
80
- import "./chunk-EKMEHE4H.js";
89
+ import "./chunk-33YXPOE3.js";
81
90
  import {
82
91
  ProvidersDomainModule,
83
92
  canonicalizeWireModelId
84
- } from "./chunk-LZSJBIVT.js";
85
- import "./chunk-A3CYT5EX.js";
86
- import "./chunk-ZDOOVTXZ.js";
93
+ } from "./chunk-DJVECN66.js";
94
+ import "./chunk-CFGTUFWB.js";
95
+ import "./chunk-AD2SYQYC.js";
96
+ import "./chunk-4OC57DA6.js";
97
+ import "./chunk-LL4KHSZI.js";
87
98
  import "./chunk-4VP4KH3K.js";
88
- import "./chunk-M6SHUN7Q.js";
89
- import "./chunk-R346GLFC.js";
90
- import "./chunk-COU2UHX6.js";
99
+ import "./chunk-VEZEGCGW.js";
91
100
  import "./chunk-FQ4SKYE4.js";
92
101
  import "./chunk-IKCO5N3L.js";
93
102
  import "./chunk-3I7MS7N2.js";
94
103
  import "./chunk-IHXBNWMM.js";
104
+ import "./chunk-GEYXPTRF.js";
95
105
  import "./chunk-SST6Z5JA.js";
106
+ import "./chunk-FO5ZOVUY.js";
107
+ import "./chunk-R346GLFC.js";
96
108
  import "./chunk-4ZG3XFUR.js";
97
- import "./chunk-APJ265NV.js";
98
109
  import "./chunk-FCSXB6T2.js";
110
+ import "./chunk-APJ265NV.js";
99
111
  import "./chunk-YXLYO42X.js";
100
112
  import "./chunk-BNAZZHFG.js";
101
113
  import "./chunk-6EJMN2Y3.js";
102
114
  import "./chunk-WEPFGWHJ.js";
103
- import "./chunk-TZTZS7QK.js";
104
- import "./chunk-OQ33BKR3.js";
115
+ import "./chunk-XE2VEJHX.js";
116
+ import "./chunk-ZGVHUX3M.js";
117
+ import "./chunk-G7MUEIGA.js";
105
118
  import "./chunk-JVCV3ICN.js";
106
119
  import "./chunk-7CR24IG7.js";
107
120
  import "./chunk-IWHMRKLL.js";
@@ -424,4 +437,4 @@ export {
424
437
  resolveDocumenterModelId,
425
438
  runWikiDispatch
426
439
  };
427
- //# sourceMappingURL=wiki-generate-UEXP2ARI.js.map
440
+ //# sourceMappingURL=wiki-generate-GUSOQ6ZP.js.map
@@ -6,7 +6,6 @@ import {
6
6
  createLoopGuardRegistration,
7
7
  createProtectedArtifactsRegistration,
8
8
  createRegistry,
9
- describeCallTarget,
10
9
  effectiveToolNames,
11
10
  isLoopGuardSynthesisBackstopReason,
12
11
  isReserveAdmittedTool,
@@ -17,13 +16,13 @@ import {
17
16
  resolveDeliveryTools,
18
17
  sanitizeLockedSynthesisMessage,
19
18
  workerLoopBlockBudget
20
- } from "../chunk-LW6DSM3M.js";
21
- import "../chunk-J7CWMCQD.js";
19
+ } from "../chunk-ZRGEBJ4T.js";
20
+ import "../chunk-K7VKOLQQ.js";
22
21
  import {
23
22
  createMiddlewareContractFromSnapshot,
24
23
  createMiddlewareToolChoiceControl,
25
24
  shouldRequestStalledTurnContinuation
26
- } from "../chunk-2DJ2KNFG.js";
25
+ } from "../chunk-ZXF4XRKW.js";
27
26
  import {
28
27
  CONFIRMED_SCOPE,
29
28
  READONLY_SCOPE,
@@ -34,8 +33,8 @@ import {
34
33
  createLoopState,
35
34
  observe
36
35
  } from "../chunk-UOV2BYIW.js";
37
- import "../chunk-DUYJ5IO6.js";
38
- import "../chunk-OAO4GE4M.js";
36
+ import "../chunk-EYPA3EGJ.js";
37
+ import "../chunk-WHGPSPT5.js";
39
38
  import {
40
39
  DEFAULT_ESCALATION_FALLBACK,
41
40
  DEFAULT_ESCALATION_TIMEOUT_MS,
@@ -43,6 +42,7 @@ import {
43
42
  claudeToolsOutsideProfile,
44
43
  coerceToolInput,
45
44
  createRunEffectsRecorder,
45
+ describeCallTarget,
46
46
  emitClaudeToolPermissionDecision,
47
47
  isClaudeCodeSessionId,
48
48
  parseWorkerSpec,
@@ -50,20 +50,22 @@ import {
50
50
  startAntigravityWorkerRun,
51
51
  startClaudeCodeWorkerRun,
52
52
  validateRehydratedWorkerRuntime
53
- } from "../chunk-LWLEKMDQ.js";
53
+ } from "../chunk-XXQNGV4M.js";
54
+ import "../chunk-43AOLP7E.js";
54
55
  import {
55
- DEFAULT_AUTONOMY_LEVEL,
56
56
  RESULT_CONTRACT_REPAIR_LIMIT,
57
57
  createSafetyPolicyEngine,
58
58
  parseResultContract,
59
59
  resultContractRepairMessages,
60
60
  validateResultContract
61
- } from "../chunk-STBPMHSX.js";
62
- import "../chunk-GGXXDWE4.js";
61
+ } from "../chunk-EKY57CSP.js";
62
+ import "../chunk-22NAGB7X.js";
63
+ import {
64
+ classify
65
+ } from "../chunk-AOCYTWAV.js";
63
66
  import {
64
- classify,
65
67
  protectedArtifactMutationBlockReason
66
- } from "../chunk-5UUP6MWO.js";
68
+ } from "../chunk-MV3K5QF2.js";
67
69
  import {
68
70
  UNKNOWN_RESOURCE,
69
71
  WORKER_PROTOCOL_VERSION,
@@ -83,17 +85,23 @@ import {
83
85
  deleteInjectedCompileCacheFrom
84
86
  } from "../chunk-I4HZDVNP.js";
85
87
  import "../chunk-ZI647VB5.js";
86
- import "../chunk-TZK7PACC.js";
87
- import "../chunk-7MNJORFF.js";
88
+ import "../chunk-NILBFAPG.js";
89
+ import "../chunk-FYYLNIL5.js";
90
+ import "../chunk-UL3WSD3F.js";
88
91
  import "../chunk-XN3L4EYL.js";
89
92
  import "../chunk-VG7TBQIY.js";
90
93
  import "../chunk-OQE5J4C6.js";
91
94
  import "../chunk-ECH6PKUQ.js";
92
- import "../chunk-OKGUZO2U.js";
95
+ import "../chunk-SPULKLCF.js";
93
96
  import {
94
97
  agentSkillToolPolicy
95
- } from "../chunk-T6YILFSB.js";
96
- import "../chunk-VAKQQHWR.js";
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";
97
105
  import "../chunk-6XLNIQDB.js";
98
106
  import "../chunk-5B2AEOW5.js";
99
107
  import {
@@ -112,41 +120,44 @@ import {
112
120
  setGlobalDefaultMaxOutputTokens,
113
121
  setProtectedModelsProvider,
114
122
  setResidencyNoticeSink
115
- } from "../chunk-LZSJBIVT.js";
123
+ } from "../chunk-DJVECN66.js";
124
+ import "../chunk-CFGTUFWB.js";
116
125
  import {
117
126
  readSettings,
118
127
  validateSettingsFile
119
- } from "../chunk-A3CYT5EX.js";
120
- import "../chunk-ZDOOVTXZ.js";
128
+ } from "../chunk-AD2SYQYC.js";
129
+ import "../chunk-4OC57DA6.js";
130
+ import "../chunk-LL4KHSZI.js";
121
131
  import "../chunk-4VP4KH3K.js";
122
- import "../chunk-M6SHUN7Q.js";
123
- import "../chunk-R346GLFC.js";
124
- import "../chunk-VPAYEGVX.js";
125
132
  import {
126
133
  setGitCommitAttributionEnabled,
127
134
  withManagedGitCommitAttributionEnvironment
128
- } from "../chunk-COU2UHX6.js";
135
+ } from "../chunk-VEZEGCGW.js";
129
136
  import "../chunk-FQ4SKYE4.js";
130
137
  import "../chunk-IKCO5N3L.js";
131
138
  import "../chunk-3I7MS7N2.js";
132
139
  import "../chunk-IHXBNWMM.js";
140
+ import "../chunk-GEYXPTRF.js";
133
141
  import "../chunk-SST6Z5JA.js";
142
+ import "../chunk-FO5ZOVUY.js";
143
+ import "../chunk-R346GLFC.js";
134
144
  import {
135
145
  configureGuardrails,
136
146
  isWorkerToolCallCapExceededReason,
137
147
  isWorkerToolCallCapSynthesisReason
138
148
  } from "../chunk-4ZG3XFUR.js";
139
- import "../chunk-APJ265NV.js";
140
149
  import {
141
150
  registerFauxFromEnv
142
151
  } from "../chunk-FCSXB6T2.js";
152
+ import "../chunk-APJ265NV.js";
143
153
  import "../chunk-YXLYO42X.js";
144
154
  import "../chunk-BNAZZHFG.js";
145
155
  import {
146
156
  AI_AGENT_NAME
147
157
  } from "../chunk-6EJMN2Y3.js";
148
158
  import "../chunk-WEPFGWHJ.js";
149
- import "../chunk-OQ33BKR3.js";
159
+ import "../chunk-ZGVHUX3M.js";
160
+ import "../chunk-G7MUEIGA.js";
150
161
  import {
151
162
  readClioVersion
152
163
  } from "../chunk-IWHMRKLL.js";
@@ -565,9 +576,10 @@ function permissionResultForDecision(decision, toolUseID, input) {
565
576
  if (toolUseID !== void 0) result.toolUseID = toolUseID;
566
577
  return result;
567
578
  }
568
- function decideToolUse(input, toolName, toolInput) {
579
+ function decideToolUse(input, toolCallId, toolName, toolInput) {
569
580
  return emitClaudeToolPermissionDecision({
570
581
  toolName,
582
+ ...toolCallId !== void 0 ? { toolCallId } : {},
571
583
  input: coerceToolInput(toolInput),
572
584
  safety: input.safety,
573
585
  cwd: input.cwd,
@@ -589,7 +601,7 @@ function decideToolUseOnce(input, toolUseID, toolName, toolInput) {
589
601
  return decideClaudeSdkToolUseOnce(
590
602
  input.handledToolDecisions,
591
603
  toolUseID,
592
- () => decideToolUse(input, toolName, toolInput)
604
+ () => decideToolUse(input, toolUseID, toolName, toolInput)
593
605
  );
594
606
  }
595
607
  function buildCanUseTool(input) {
@@ -968,6 +980,36 @@ function startWorkerRun(input, emit) {
968
980
  const deliveryTools = resolveDeliveryTools(input.allowedTools, input.product);
969
981
  const middlewareToolChoice = createMiddlewareToolChoiceControl();
970
982
  let workerModelRound = 0;
983
+ const loopGuardRegistration = createLoopGuardRegistration({
984
+ safety,
985
+ toolCallCap: workerBudget.hardCap,
986
+ toolCallSoftLimit: workerBudget.toolCalls,
987
+ // A worker's blocks all land in one run-long bucket, so the bound on
988
+ // them is a statement about this run's length, not about a turn.
989
+ turnBlockBudget: workerLoopBlockBudget(workerBudget.revision?.toolCalls ?? workerBudget.toolCalls),
990
+ toolCallSoftReadReserve: readReserve,
991
+ ...deliveryTools.length > 0 ? { deliveryTools } : {},
992
+ turnSynthesisLockout: workerBudget.synthesis,
993
+ // Once locked, the next model round is forced text-only at the
994
+ // request level. The lockout directive alone relies on model compliance.
995
+ onSynthesisLockout: () => {
996
+ if (workerBudget.synthesis) synthesisToolLock = true;
997
+ },
998
+ ...!workerBudget.synthesis ? {
999
+ onSoftLimitFinalCallAdmitted: (toolCallId) => {
1000
+ if (workerBoundFailure === null) {
1001
+ workerBoundFailure = `worker agent budget reached (${workerBudget.toolCalls}); synthesis is disabled`;
1002
+ }
1003
+ stopAfterToolResultCallId = toolCallId ?? STOP_AFTER_ANY_TOOL_RESULT;
1004
+ }
1005
+ } : {},
1006
+ // Requiring read is correct only when reading is the whole reserve.
1007
+ ...readReserve > 0 && deliveryTools.length === 0 ? {
1008
+ onSoftReadReserve: () => {
1009
+ middlewareToolChoice.apply([{ kind: "require_tool", toolName: ToolNames.Read }]);
1010
+ }
1011
+ } : {}
1012
+ });
971
1013
  const registry = createWorkerToolRegistry(
972
1014
  input.middlewareSnapshot,
973
1015
  safety,
@@ -986,45 +1028,7 @@ function startWorkerRun(input, emit) {
986
1028
  // and has no persistence sink. It can still absorb worker-local
987
1029
  // protect_path effects from snapshot rules for the rest of this run.
988
1030
  [
989
- createLoopGuardRegistration({
990
- safety,
991
- toolCallCap: workerBudget.hardCap,
992
- toolCallSoftLimit: workerBudget.toolCalls,
993
- // A worker's blocks all land in one run-long bucket, so the bound on
994
- // them is a statement about this run's length, not about a turn.
995
- turnBlockBudget: workerLoopBlockBudget(workerBudget.toolCalls),
996
- toolCallSoftReadReserve: readReserve,
997
- ...deliveryTools.length > 0 ? { deliveryTools } : {},
998
- turnSynthesisLockout: workerBudget.synthesis,
999
- // Once locked, the next model round is forced text-only at the
1000
- // request level (the tool surface is removed in onPayload below):
1001
- // the lockout directive alone relies on model compliance, and
1002
- // measured local models kept calling tools until the backstop
1003
- // aborted the run, or answered the forced round with tool-call
1004
- // markup that the loop guard then removed.
1005
- onSynthesisLockout: () => {
1006
- if (workerBudget.synthesis) {
1007
- synthesisToolLock = true;
1008
- }
1009
- },
1010
- ...!workerBudget.synthesis ? {
1011
- onSoftLimitFinalCallAdmitted: (toolCallId) => {
1012
- if (workerBoundFailure === null) {
1013
- workerBoundFailure = `worker agent budget reached (${workerBudget.toolCalls}); synthesis is disabled`;
1014
- }
1015
- stopAfterToolResultCallId = toolCallId ?? STOP_AFTER_ANY_TOOL_RESULT;
1016
- }
1017
- } : {},
1018
- // Forcing the next round to `read` is only correct when reading is
1019
- // the whole reserve. An agent with delivery tools must be able to
1020
- // write in its own reserve window, so it gets the steering directive
1021
- // without the request-level lock.
1022
- ...readReserve > 0 && deliveryTools.length === 0 ? {
1023
- onSoftReadReserve: () => {
1024
- middlewareToolChoice.apply([{ kind: "require_tool", toolName: ToolNames.Read }]);
1025
- }
1026
- } : {}
1027
- }),
1031
+ loopGuardRegistration,
1028
1032
  createProtectedArtifactsRegistration({
1029
1033
  ...input.protectedArtifactState !== void 0 ? { initialState: { artifacts: [...input.protectedArtifactState.artifacts] } } : {}
1030
1034
  })
@@ -1035,6 +1039,7 @@ function startWorkerRun(input, emit) {
1035
1039
  );
1036
1040
  const contractCwd = input.cwd ?? process.cwd();
1037
1041
  let resultContractRepairsQueued = 0;
1042
+ let resultContractRevisionActive = false;
1038
1043
  const pendingReadCitations = /* @__PURE__ */ new Map();
1039
1044
  const observedReadRanges = /* @__PURE__ */ new Map();
1040
1045
  const runEffects = createRunEffectsRecorder(contractCwd);
@@ -1173,9 +1178,24 @@ function startWorkerRun(input, emit) {
1173
1178
  if (violation !== null) {
1174
1179
  if (resultContractRepairsQueued < RESULT_CONTRACT_REPAIR_LIMIT) {
1175
1180
  resultContractRepairsQueued += 1;
1176
- synthesisToolLock = true;
1181
+ if (!resultContractRevisionActive && workerBudget.revision !== void 0) {
1182
+ resultContractRevisionActive = loopGuardRegistration.extendWorkerToolCallPhase(workerBudget.revision);
1183
+ if (resultContractRevisionActive) {
1184
+ synthesisToolLock = false;
1185
+ middlewareToolChoice.reset();
1186
+ stopAfterToolResultCallId = null;
1187
+ }
1188
+ }
1189
+ const revisionToolsAvailable = resultContractRevisionActive && !synthesisToolLock;
1190
+ if (!revisionToolsAvailable) synthesisToolLock = true;
1177
1191
  const repair = resultContractRepairMessages(
1178
- { contract, reason: violation, attempt: resultContractRepairsQueued, anchors: observedReadAnchors() },
1192
+ {
1193
+ contract,
1194
+ reason: violation,
1195
+ attempt: resultContractRepairsQueued,
1196
+ anchors: observedReadAnchors(),
1197
+ ...revisionToolsAvailable ? { toolsAvailable: true } : {}
1198
+ },
1179
1199
  { provider: model.provider, api: model.api, model: model.id }
1180
1200
  );
1181
1201
  for (const message of repair) agent.followUp(message);
@@ -1314,7 +1334,7 @@ function startWorkerRun(input, emit) {
1314
1334
  const requestId = meta.requestId;
1315
1335
  const timer = setTimeout(() => resolveEscalation(requestId, "deny", "timeout"), escalationConfig.timeoutMs);
1316
1336
  activeEscalation = { requestId, tool: call.tool, actionClass, callKey, timer };
1317
- const target = describeCallTarget(call.args).slice(0, 200);
1337
+ const target = describeCallTarget(call.tool, call.args);
1318
1338
  emit({
1319
1339
  type: "clio_permission_escalated",
1320
1340
  payload: {
@@ -6,9 +6,9 @@ import {
6
6
  probeGitStatusAsync,
7
7
  probeWorkspace,
8
8
  probeWorkspaceAsync
9
- } from "./chunk-G4BMMOKF.js";
10
- import "./chunk-YHZX5GEU.js";
11
- import "./chunk-EKMEHE4H.js";
9
+ } from "./chunk-HVDIIIQW.js";
10
+ import "./chunk-XAKHZX5N.js";
11
+ import "./chunk-33YXPOE3.js";
12
12
  import "./chunk-7CR24IG7.js";
13
13
  import "./chunk-3R73A4XB.js";
14
14
  export {
@@ -19,4 +19,4 @@ export {
19
19
  probeWorkspace,
20
20
  probeWorkspaceAsync
21
21
  };
22
- //# sourceMappingURL=workspace-G4ZWUIPR.js.map
22
+ //# sourceMappingURL=workspace-ZJ6BFM3Q.js.map
package/docs/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # Clio Coder Documentation
6
6
 
7
- These pages document `v0.3.3` 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.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).
8
8
 
9
9
  They are source-aligned guides: when prose and source disagree, prefer the
10
10
  current source, tests, and `CHANGELOG.md`.
@@ -15,6 +15,7 @@ current source, tests, and `CHANGELOG.md`.
15
15
  | --- | --- |
16
16
  | Commands, slash commands, operating posture, keybindings, dispatch, verification, and troubleshooting | [commands-and-modes.md](commands-and-modes.md) ([Interactive Blueprint](html/commands_blueprint.html)) |
17
17
  | Context window resolution, per-model probe capabilities, token accounting, per-turn snapshots, compaction, and context priming | [context-engine.md](context-engine.md) ([Interactive Blueprint](html/context_blueprint.html)) |
18
+ | Non-destructive working-set eviction, markers, eviction policies, recall by ref, and the `contextEviction` / `contextRecall` records | [context-working-set.md](context-working-set.md) |
18
19
  | Runtime targets, local model configuration, fleet profiles, and auth | [configuration-and-targets.md](configuration-and-targets.md) ([Interactive Blueprint](html/configuration_blueprint.html)) |
19
20
  | Every environment variable the runtime reads: guardrail overrides, directory layout, debug toggles, and internal plumbing | [environment-variables.md](environment-variables.md) ([Interactive Blueprint](html/environment_blueprint.html)) |
20
21
  | Argonne ALCF Sophia/Metis inference targets over Globus OAuth | [alcf-provider.md](alcf-provider.md) ([Interactive Blueprint](html/alcf_blueprint.html)) |
@@ -43,17 +44,17 @@ current source, tests, and `CHANGELOG.md`.
43
44
  | 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)) |
44
45
  | Multi-process capacity leases, heartbeat TTLs, cross-process locks, and cluster drain controls | [capacity-and-scheduling.md](capacity-and-scheduling.md) ([Interactive Blueprint](html/capacity_scheduling_blueprint.html)) |
45
46
  | Executable multi-node demo with reviewer gate and receipt provenance walkthrough | [fleet-demo-runbook.md](fleet-demo-runbook.md) |
46
- | Session lifecycle, on-disk ledger format v3, `/tree` active-path lineage, `/fork`, `/resume`, checkpoints, and recovery | [session-lifecycle.md](session-lifecycle.md) ([Interactive Blueprint](html/session_lifecycle_blueprint.html)) |
47
+ | Session lifecycle, on-disk ledger format v4, `/tree` active-path lineage, `/fork`, `/resume`, checkpoints, and recovery | [session-lifecycle.md](session-lifecycle.md) ([Interactive Blueprint](html/session_lifecycle_blueprint.html)) |
47
48
  | Agent Client Protocol (ACP) server over stdio, tool mediation, non-stall permissions, and error taxonomy | [acp.md](acp.md) ([Interactive Blueprint](html/acp_blueprint.html)) |
48
49
  | Version registry and migration policies for all 9 serialized artifact schemas | [artifact-versions.md](artifact-versions.md) ([Interactive Blueprint](html/artifact_versions_blueprint.html)) |
49
50
  | Process exit code taxonomy, `--help` standard, machine-readable JSON streaming, and headless output contracts | [exit-codes-and-output.md](exit-codes-and-output.md) ([Interactive Blueprint](html/exit_codes_blueprint.html)) |
50
51
  | Actionable error remediation and diagnostics keyed by exact user-facing messages | [troubleshooting.md](troubleshooting.md) ([Interactive Blueprint](html/troubleshooting_blueprint.html)) |
51
- | Canonical definitions of 40 core architectural concepts mapped to `src/` types | [glossary.md](glossary.md) ([Interactive Blueprint](html/glossary_blueprint.html)) |
52
+ | Canonical definitions of 45 core architectural concepts mapped to `src/` types | [glossary.md](glossary.md) ([Interactive Blueprint](html/glossary_blueprint.html)) |
52
53
  | Complete source-to-documentation mapping matrix and subsystem coverage status | [documentation-coverage.md](documentation-coverage.md) |
53
54
  | Issue-driven development lifecycle: file-ticket through release, label taxonomy, and dogfooding setup | [development-pipeline.md](development-pipeline.md) |
54
55
  | Proactive task memory architecture, session task bank, intervention rules, and handoff carrying | [proactive-memory.md](proactive-memory.md) ([Interactive Blueprint](html/memory_blueprint.html)) |
55
56
  | WAL SQLite trace mirror database schema, rowid cursor queries, rebuildability, and CLI trace subcommands | [trace-store.md](trace-store.md) ([Interactive Blueprint](html/trace_blueprint.html)) |
56
- | Private context index determinism, target smoke matrices, and Clio machinery soak benchmark suite | [evals-internal.md](evals-internal.md) ([Blueprints: evals_internal](html/evals_internal_blueprint.html), [soak](html/soak_blueprint.html)) |
57
+ | Private context index determinism and target smoke matrices | [evals-internal.md](evals-internal.md) ([Blueprint](html/evals_internal_blueprint.html)) |
57
58
  | Point-in-time inventory of legacy environment variables (Historical Appendix) | [config-knobs-audit.md](config-knobs-audit.md) ([Interactive Blueprint](html/config_knobs_audit_blueprint.html)) |
58
59
  | Clock and timestamp conventions: durations, instants, ordering, and formatting | [time-conventions.md](time-conventions.md) ([Interactive Blueprint](html/time_conventions_blueprint.html)) |
59
60
  | Correct render, PTY, startup, compile-cache, and import-graph measurement endpoints and the 0.3.3 baseline | [performance-methodology.md](performance-methodology.md) |
@@ -82,12 +83,12 @@ under `src/`, run `npm run build` again or keep `npm run dev` running.
82
83
  ## Release Notes
83
84
 
84
85
  The release entry point is [../README.md](../README.md); detailed release
85
- history lives in [../CHANGELOG.md](../CHANGELOG.md). For v0.3.3 the supported
86
+ history lives in [../CHANGELOG.md](../CHANGELOG.md). For v0.3.6 the supported
86
87
  install paths are `npm install -g @iowarp/clio-coder` and a source checkout
87
88
  through `npm run install:local`, the deterministic release gate is
88
89
  `npm run ci:release`, and live model smoke validation is local/manual and
89
- opt-in through `npm run test:live` (add `-- --delegation` for
90
- opencode/copilot checks).
90
+ opt-in through `npm run live:smoke -- --target <id>` (add `--delegation`
91
+ for opencode/copilot checks).
91
92
 
92
93
  ## Writing Documentation
93
94
 
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.3`.
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`.
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.3).
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).
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.3).
4
+ > **Interactive Spec Available:** An interactive dashboard is located at [docs/html/architecture_blueprint.html](html/architecture_blueprint.html) (Version: 0.3.6).
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.3` development line.
8
+ This page is source-code aligned for the current `v0.3.6` development line.
9
9
 
10
10
  ---
11
11
 
@@ -83,8 +83,7 @@ next to the ignore:
83
83
  ```
84
84
 
85
85
  This repository commits none of those, so its `.clio-coder/` stays fully
86
- ignored except the seeded soak fixtures under `benchmarks/soak/fixtures/`,
87
- which are test inputs rather than session output.
86
+ ignored. Benchmark workspaces are temporary external repositories.
88
87
 
89
88
  ## Finding what was hidden
90
89
 
@@ -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.3`.
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`.
4
4
 
5
5
  ---
6
6
 
@@ -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.3).
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).
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
 
@@ -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.3`.
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`.
4
4
 
5
5
  Source implementations: `src/domains/scheduling/` and `src/domains/dispatch/capacity-lease.ts`.
6
6