@iowarp/clio-coder 0.4.0 → 0.4.2

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 (751) hide show
  1. package/CHANGELOG.md +131 -0
  2. package/CONTRIBUTING.md +59 -36
  3. package/README.md +407 -375
  4. package/SECURITY.md +2 -1
  5. package/dist/{acp-G5WJBNCT.js → acp-TMDQZDIG.js} +14 -14
  6. package/dist/{agents-FMV2Q5G4.js → agents-5N5NG3XG.js} +45 -34
  7. package/dist/assets/codewiki.json +1 -1
  8. package/dist/{auth-3IDSJEIK.js → auth-Z5CCBXKQ.js} +22 -21
  9. package/dist/{builtins-XCZWXSC7.js → builtins-K6TNDT24.js} +6 -6
  10. package/dist/{chunk-GR5G2PVF.js → chunk-2HFQNRV3.js} +15 -10
  11. package/dist/{chunk-PQEFIJ36.js → chunk-2LEAKD4C.js} +1 -2
  12. package/dist/{chunk-HJJTYUHX.js → chunk-2NHR3NAY.js} +168 -1406
  13. package/dist/chunk-2X4RYJTJ.js +39 -0
  14. package/dist/{chunk-UXMFQ54G.js → chunk-2Z2IKEXI.js} +39 -43
  15. package/dist/{chunk-SST6Z5JA.js → chunk-336NSSKI.js} +1 -1
  16. package/dist/chunk-34BHNEE3.js +1846 -0
  17. package/dist/{chunk-YJX4SHTD.js → chunk-35MSIRKH.js} +9 -4
  18. package/dist/chunk-3EBYEESD.js +314 -0
  19. package/dist/{chunk-CTJ4RNAA.js → chunk-3F7VUY77.js} +2 -2
  20. package/dist/chunk-3KIPBMUA.js +308 -0
  21. package/dist/chunk-3M6DQK6S.js +362 -0
  22. package/dist/{chunk-BPKCPIL7.js → chunk-462T4EGZ.js} +3 -3
  23. package/dist/{chunk-QLFS5GO2.js → chunk-4JDLP6ZS.js} +44 -37
  24. package/dist/{chunk-LDQ2ZF2M.js → chunk-4O6MANBS.js} +6 -6
  25. package/dist/{chunk-O6TL7WWY.js → chunk-54ODD65L.js} +6 -6
  26. package/dist/{chunk-JDG2WCRO.js → chunk-5KW52TEP.js} +5 -5
  27. package/dist/{chunk-NHLBIGRH.js → chunk-5PFYMY2V.js} +41 -18
  28. package/dist/{chunk-P3FOHJT4.js → chunk-72GZI5EV.js} +2 -2
  29. package/dist/chunk-77QIVUZB.js +1334 -0
  30. package/dist/{chunk-HWHKMHUA.js → chunk-7BHIY2MW.js} +9 -15
  31. package/dist/{chunk-FWDFM5ZU.js → chunk-AK5XEFVZ.js} +3 -3
  32. package/dist/{chunk-VAZSBTKF.js → chunk-AZ4WMN4W.js} +2 -2
  33. package/dist/{chunk-B7OBL7PK.js → chunk-B74PXLU7.js} +21 -11
  34. package/dist/{chunk-CY6FY24N.js → chunk-B7HM5Z7T.js} +15 -15
  35. package/dist/{chunk-ULC6OTWO.js → chunk-BO7Y52RY.js} +88 -27
  36. package/dist/chunk-BTK3SSSK.js +67 -0
  37. package/dist/{chunk-M6L6IDJG.js → chunk-BWH6N36D.js} +1 -1
  38. package/dist/{chunk-DQITNCXG.js → chunk-BYMNWQ7O.js} +149 -159
  39. package/dist/{chunk-HI63TFOG.js → chunk-CDNVLKUX.js} +3 -3
  40. package/dist/{chunk-Z4TXYIEG.js → chunk-CRFOIAX3.js} +10 -10
  41. package/dist/{chunk-UM7N4G5A.js → chunk-CWVRRIEI.js} +2 -2
  42. package/dist/{chunk-3BT2XMV4.js → chunk-CYZW7JHJ.js} +53 -60
  43. package/dist/{chunk-BKFM6EJV.js → chunk-D4CJV46V.js} +2 -2
  44. package/dist/chunk-D7E7WCDF.js +27 -0
  45. package/dist/{chunk-X3YGUTOB.js → chunk-DYHAXKHD.js} +90 -62
  46. package/dist/{chunk-QBJA7R7N.js → chunk-DZAW46HP.js} +3 -3
  47. package/dist/{chunk-MLKNTWH2.js → chunk-DZEK6CJN.js} +22 -22
  48. package/dist/{chunk-K5C3NCBD.js → chunk-E7GT7O5N.js} +5 -5
  49. package/dist/{chunk-FQ4SKYE4.js → chunk-EBY63B7G.js} +2 -5
  50. package/dist/chunk-F2I26BDK.js +66 -0
  51. package/dist/{chunk-HLW2MRKE.js → chunk-F4EKGO4N.js} +3 -1
  52. package/dist/{chunk-RAPCMZL4.js → chunk-FSP7CMNU.js} +9 -1
  53. package/dist/{chunk-32KWKNSF.js → chunk-FVDGR2ZL.js} +4 -4
  54. package/dist/{chunk-TZSKNMZG.js → chunk-GTUD2WMY.js} +2 -1
  55. package/dist/{chunk-SJ5ZKQ4S.js → chunk-HIICAHCJ.js} +2 -2
  56. package/dist/chunk-HJWWJ6IL.js +184 -0
  57. package/dist/{chunk-WZR7K7ZX.js → chunk-HKMD33FO.js} +32 -83
  58. package/dist/chunk-HLAFFSEK.js +360 -0
  59. package/dist/{chunk-VO67MWHC.js → chunk-HRQMFLJP.js} +3 -3
  60. package/dist/{chunk-KFZI4NIL.js → chunk-I64IFBLB.js} +152 -31
  61. package/dist/{chunk-BKFJHQCA.js → chunk-I66EAJFY.js} +2 -2
  62. package/dist/{chunk-BUMFYQFY.js → chunk-I66ZTYNP.js} +543 -267
  63. package/dist/{chunk-2OQE55CK.js → chunk-I7XBWTYH.js} +2 -2
  64. package/dist/{chunk-GKF55TAZ.js → chunk-IDNA72AH.js} +104 -3
  65. package/dist/{chunk-GCSMB2KY.js → chunk-IKOZFYBN.js} +1 -1
  66. package/dist/{chunk-J4W7KFM7.js → chunk-IKSLQ4XV.js} +5439 -3475
  67. package/dist/{chunk-6DB53AJS.js → chunk-IMXMHHMQ.js} +171 -30
  68. package/dist/{chunk-AB44T6BB.js → chunk-JBCS7CRR.js} +8 -7
  69. package/dist/{chunk-BBVJUZHB.js → chunk-JIEGK6UF.js} +5 -173
  70. package/dist/{chunk-SP2RXXYO.js → chunk-JWJGP5DQ.js} +10 -10
  71. package/dist/{chunk-HZHHCK24.js → chunk-KKOJXO6R.js} +527 -325
  72. package/dist/chunk-KPXDY6QF.js +47 -0
  73. package/dist/{chunk-LQ3DZAMX.js → chunk-LJID3DYZ.js} +8 -2
  74. package/dist/{chunk-7MCTRUCE.js → chunk-M2DAX4F6.js} +2 -2
  75. package/dist/{chunk-VEO4AP2K.js → chunk-M2WXEHER.js} +4 -3
  76. package/dist/{chunk-YPI3QQCF.js → chunk-MCEPRMZW.js} +2 -4
  77. package/dist/{chunk-YDFRH54B.js → chunk-MCMZMDAC.js} +4 -4
  78. package/dist/{chunk-J5Q24KAG.js → chunk-MNJGS2IN.js} +5 -6
  79. package/dist/{chunk-76ONBSIA.js → chunk-MQXIVJ35.js} +14 -5
  80. package/dist/chunk-NDDGJUXD.js +81 -0
  81. package/dist/{chunk-TVHHYFHE.js → chunk-NEDJ26B5.js} +2 -2
  82. package/dist/chunk-NMJXSHBJ.js +283 -0
  83. package/dist/{chunk-VYMXRQI6.js → chunk-O3YUNJZ2.js} +88 -100
  84. package/dist/{chunk-VO2LKSTM.js → chunk-O42A54GG.js} +2 -2
  85. package/dist/{chunk-Z2RR6MAK.js → chunk-P75RZCJW.js} +28 -6
  86. package/dist/{chunk-NHCZP4K7.js → chunk-PBP4B7XR.js} +2 -2
  87. package/dist/{chunk-DYJP44XW.js → chunk-PGF63K6I.js} +2 -2
  88. package/dist/chunk-PJX3WQUQ.js +42 -0
  89. package/dist/{chunk-ZGVHUX3M.js → chunk-PMZVFWSR.js} +2 -2
  90. package/dist/{chunk-2JDWVJND.js → chunk-Q4XWMHX6.js} +5 -7
  91. package/dist/{chunk-W5VSYASO.js → chunk-QQLGQY2A.js} +46 -87
  92. package/dist/{chunk-KMVISBZR.js → chunk-RKSR6VSF.js} +1 -1
  93. package/dist/{chunk-C2LTL2W6.js → chunk-RLYRBIYQ.js} +463 -180
  94. package/dist/{chunk-4ZG3XFUR.js → chunk-S66XZJOF.js} +14 -23
  95. package/dist/{chunk-I5VEOC6I.js → chunk-SSEYRH53.js} +13 -14
  96. package/dist/chunk-SZAA6XDG.js +30 -0
  97. package/dist/{chunk-CODPRO7Q.js → chunk-TPEQIQIE.js} +7 -7
  98. package/dist/{chunk-QLL7ILRG.js → chunk-UBRFI4HS.js} +1151 -614
  99. package/dist/{chunk-O4XIVISU.js → chunk-UH347SHR.js} +227 -47
  100. package/dist/{chunk-OQBA45DZ.js → chunk-UH632ZYL.js} +2 -2
  101. package/dist/chunk-UXCU4E3T.js +303 -0
  102. package/dist/{chunk-CMZWFGD2.js → chunk-VAVR4IJY.js} +19 -15
  103. package/dist/{chunk-IQ7KR472.js → chunk-VIA6RFQZ.js} +8 -13
  104. package/dist/{chunk-V5DHCITQ.js → chunk-VKPAQYEB.js} +49 -19
  105. package/dist/{chunk-5LXZXPKX.js → chunk-VN3SHNBN.js} +2 -2
  106. package/dist/{chunk-UOSL25KY.js → chunk-VXMFAE2W.js} +1 -1
  107. package/dist/{chunk-3XML7CDN.js → chunk-W4YEMFBX.js} +3 -3
  108. package/dist/{chunk-U77AMWDL.js → chunk-W6NIE6OW.js} +44 -23
  109. package/dist/{chunk-BBVYXMFO.js → chunk-WNP7O5WZ.js} +2 -2
  110. package/dist/{chunk-QREDIESB.js → chunk-X7IARSHT.js} +15 -9
  111. package/dist/{chunk-3URVFKWK.js → chunk-XE3PCIXH.js} +5 -5
  112. package/dist/{chunk-FEFIFZTL.js → chunk-XGDPUNND.js} +2 -2
  113. package/dist/{chunk-F4CKPOEQ.js → chunk-XOXV5GKE.js} +119 -38
  114. package/dist/chunk-XQRY4DTA.js +657 -0
  115. package/dist/{chunk-NYS75XW5.js → chunk-YAKGTXEV.js} +5 -3
  116. package/dist/{chunk-NQQH3YT7.js → chunk-YJISEZKC.js} +3 -3
  117. package/dist/{chunk-X75E3D2N.js → chunk-ZGNYYXQ6.js} +18 -16
  118. package/dist/{chunk-LY4S7GJC.js → chunk-ZNT2M6TG.js} +20 -18
  119. package/dist/{chunk-HKIYEGME.js → chunk-ZTJUVLTU.js} +2 -2
  120. package/dist/{chunk-IBEBSCYA.js → chunk-ZW4HH5JJ.js} +43 -34
  121. package/dist/{chunk-2ANTL7MR.js → chunk-ZW55JB7N.js} +2 -2
  122. package/dist/cli/index.js +38 -37
  123. package/dist/{clio-2JXHBBY5.js → clio-7VB377CC.js} +12 -13
  124. package/dist/{code-nav-3YYRMYNF.js → code-nav-YVLCYA7V.js} +86 -18
  125. package/dist/codewiki/build-worker.js +1 -1
  126. package/dist/{compile-cache-7FPE6PS3.js → compile-cache-OQAVB7Y5.js} +2 -4
  127. package/dist/{components-RYZV4JGP.js → components-UBWCQSRW.js} +4 -4
  128. package/dist/{config-QZPCMYSO.js → config-4HVOS65E.js} +112 -63
  129. package/dist/{configure-TEGEBYCA.js → configure-PIWO7B24.js} +25 -22
  130. package/dist/{context-E6H5RNMC.js → context-IYEHL3WQ.js} +53 -47
  131. package/dist/{context-GSXUE4CT.js → context-KQYIWPWT.js} +68 -42
  132. package/dist/{context-AV7OEZ4D.js → context-N6ZE3LGJ.js} +11 -11
  133. package/dist/{context-clear-SHIBYK6T.js → context-clear-G4OGZJDS.js} +53 -47
  134. package/dist/{context-working-set-5ZGKPGZQ.js → context-working-set-BWLF6LJP.js} +12 -11
  135. package/dist/{dispatch-runner-EFMJT4LD.js → dispatch-runner-2QQAITS3.js} +67 -58
  136. package/dist/{docs-23KQS3XK.js → docs-PD3EXDKU.js} +20 -25
  137. package/dist/doctor-LHBD36VU.js +773 -0
  138. package/dist/{eval-TFBYQH4H.js → eval-C45FYRJ6.js} +68 -49
  139. package/dist/{eval-inventory-SXH7PDKX.js → eval-inventory-6DEJPLBF.js} +7 -8
  140. package/dist/{evidence-ERGESKGN.js → evidence-6SHONYAF.js} +50 -44
  141. package/dist/{evolve-VDXTSYCJ.js → evolve-KRKMV72X.js} +49 -43
  142. package/dist/{extensions-7BGBHN57.js → extensions-KPZ2UHBB.js} +8 -6
  143. package/dist/{fleet-2RRVDF2V.js → fleet-IVTCKDHT.js} +93 -79
  144. package/dist/{fleet-commands-VJ726XIA.js → fleet-commands-EDWL3IT7.js} +10 -9
  145. package/dist/{fleet-decisions-EPAPM3XJ.js → fleet-decisions-YP3YEFGK.js} +6 -6
  146. package/dist/{fleet-graph-JF5QOATM.js → fleet-graph-ZFWKHY2M.js} +19 -15
  147. package/dist/{fleet-inspect-VLY4S7QM.js → fleet-inspect-FVUNCBML.js} +50 -45
  148. package/dist/{fleet-preflight-AIZUEJOY.js → fleet-preflight-UN5XED4R.js} +5 -9
  149. package/dist/{fleet-validate-AJRPDMDV.js → fleet-validate-XOWC4HSX.js} +22 -17
  150. package/dist/{fleet-verify-JFEL2L3H.js → fleet-verify-UN3SODEL.js} +48 -43
  151. package/dist/fleet-view-TWHJKCN6.js +96 -0
  152. package/dist/{init-DN2WWLFE.js → init-T2QORQ3Y.js} +72 -66
  153. package/dist/{install-XGLBQY5E.js → install-NKNG7KD4.js} +2 -2
  154. package/dist/{interop-OZBKXAYL.js → interop-IN5I2A66.js} +13 -11
  155. package/dist/{library-YWZG7IMW.js → library-LSCATDLZ.js} +23 -18
  156. package/dist/{memory-I4C4HMLW.js → memory-HYOKAGGJ.js} +51 -45
  157. package/dist/{models-CEYXJBO6.js → models-2GPMFYCM.js} +42 -33
  158. package/dist/{monitor-NZ6GCI3P.js → monitor-E4ASVUJH.js} +56 -50
  159. package/dist/{orchestrator-GCGQ4N5I.js → orchestrator-DDMPR3PY.js} +2676 -1507
  160. package/dist/{panes-KY6W3V2E.js → panes-E3RUXOW5.js} +5 -5
  161. package/dist/panes-IXKLOKA2.js +75 -0
  162. package/dist/{paths-II4K7DNR.js → paths-L7LGY6RN.js} +4 -4
  163. package/dist/{reset-DQ6FGCSH.js → reset-OAQP3W4O.js} +7 -8
  164. package/dist/{resources-BB3MVJMD.js → resources-OTRSN34L.js} +23 -17
  165. package/dist/{run-H2GQDUER.js → run-5DEYH5QK.js} +95 -84
  166. package/dist/{share-GTJN6A5O.js → share-IHWTLO3M.js} +26 -19
  167. package/dist/{skills-L55TEW6R.js → skills-IYMXMKW4.js} +25 -20
  168. package/dist/{skills-eval-XVXPH2JI.js → skills-eval-DROHSJAR.js} +63 -65
  169. package/dist/{skills-inventory-S4MXPJFV.js → skills-inventory-D7X4L4ZX.js} +21 -16
  170. package/dist/{slash-commands-ZSGASKJC.js → slash-commands-QBM7UZ3B.js} +38 -33
  171. package/dist/{steer-RZGSCY4R.js → steer-Z5DO23FJ.js} +3 -3
  172. package/dist/{support-PKEUNNQL.js → support-U7QOWY26.js} +6 -6
  173. package/dist/{targets-NCPZ644J.js → targets-P2FUC4IL.js} +64 -61
  174. package/dist/{terminal-lease-44SV3YCN.js → terminal-lease-YREJ3JX2.js} +15 -10
  175. package/dist/{tools-DAF3DI3C.js → tools-5B7RO6MV.js} +10 -8
  176. package/dist/{trace-FYVW2MQA.js → trace-YMGMUM6A.js} +101 -8
  177. package/dist/{tui-primitives-2AKXQNZK.js → tui-primitives-K5PASC3O.js} +8 -4
  178. package/dist/{uninstall-DW2PNOIC.js → uninstall-N34PCTGJ.js} +4 -6
  179. package/dist/{upgrade-3XPP6OQL.js → upgrade-PXK3S2YM.js} +36 -61
  180. package/dist/{usage-3NLHGTU2.js → usage-ME5MPXGX.js} +58 -53
  181. package/dist/{verifiers-SSQONKRT.js → verifiers-BVZ7IWOO.js} +10 -9
  182. package/dist/{verify-3U6J7FZI.js → verify-5K7ZKQFC.js} +9 -8
  183. package/dist/{web-fetch-S7RR6GZ7.js → web-fetch-MPARV2K7.js} +2 -3
  184. package/dist/{wiki-generate-CEHYGPGQ.js → wiki-generate-F5W5QTYY.js} +74 -70
  185. package/dist/{with-panes-MKB46MPQ.js → with-panes-BYOJCLAM.js} +78 -246
  186. package/dist/worker/entry.js +83 -63
  187. package/docs/README.md +176 -81
  188. package/docs/{acp.md → architecture/acp.md} +36 -20
  189. package/docs/{alcf-provider.md → architecture/alcf-provider.md} +8 -5
  190. package/docs/{architecture.md → architecture/architecture.md} +43 -22
  191. package/docs/{artifact-placement.md → architecture/artifact-placement.md} +26 -23
  192. package/docs/architecture/artifact-versions.md +90 -0
  193. package/docs/{capacity-and-scheduling.md → architecture/capacity-and-scheduling.md} +26 -13
  194. package/docs/{context-engine.md → architecture/context-engine.md} +25 -25
  195. package/docs/{context-working-set.md → architecture/context-working-set.md} +13 -10
  196. package/docs/{dispatch-architecture-rationale.md → architecture/dispatch-architecture-rationale.md} +12 -9
  197. package/docs/{dispatch-typed-intent.md → architecture/dispatch-typed-intent.md} +68 -46
  198. package/docs/{evidence-and-memory.md → architecture/evidence-and-memory.md} +23 -16
  199. package/docs/{middleware-and-components.md → architecture/middleware-and-components.md} +11 -5
  200. package/docs/{model-catalog.md → architecture/model-catalog.md} +40 -17
  201. package/docs/{observability.md → architecture/observability.md} +26 -13
  202. package/docs/{pi-boundary.md → architecture/pi-boundary.md} +24 -11
  203. package/docs/{prompt-envelope-and-tools.md → architecture/prompt-envelope-and-tools.md} +55 -20
  204. package/docs/{provider-adapter-cookbook.md → architecture/provider-adapter-cookbook.md} +35 -24
  205. package/docs/{safety-model.md → architecture/safety-model.md} +20 -15
  206. package/docs/{session-lifecycle.md → architecture/session-lifecycle.md} +8 -5
  207. package/docs/architecture/time-conventions.md +125 -0
  208. package/docs/{trace-store.md → architecture/trace-store.md} +26 -13
  209. package/docs/{tui-design.md → architecture/tui-design.md} +13 -13
  210. package/docs/{worker-dispatch-mechanics.md → architecture/worker-dispatch-mechanics.md} +27 -30
  211. package/docs/{built-in-agents.md → guide/built-in-agents.md} +70 -46
  212. package/docs/{commands-and-modes.md → guide/commands-and-modes.md} +73 -62
  213. package/docs/{configuration-and-targets.md → guide/configuration-and-targets.md} +323 -444
  214. package/docs/guide/configuration-reference.md +1158 -0
  215. package/docs/{environment-variables.md → guide/environment-variables.md} +31 -27
  216. package/docs/{exit-codes-and-output.md → guide/exit-codes-and-output.md} +8 -3
  217. package/docs/{extensions-and-sharing.md → guide/extensions-and-sharing.md} +41 -14
  218. package/docs/{fleet-dispatch.md → guide/fleet-dispatch.md} +47 -49
  219. package/docs/{glossary.md → guide/glossary.md} +14 -11
  220. package/docs/{installation-and-lifecycle.md → guide/installation-and-lifecycle.md} +45 -14
  221. package/docs/guide/panes-and-files.md +290 -0
  222. package/docs/{proactive-memory.md → guide/proactive-memory.md} +79 -66
  223. package/docs/{resource-library.md → guide/resource-library.md} +13 -4
  224. package/docs/{skills-marketplace.md → guide/skills-marketplace.md} +7 -3
  225. package/docs/{tool-usage.md → guide/tool-usage.md} +87 -23
  226. package/docs/{troubleshooting.md → guide/troubleshooting.md} +10 -5
  227. package/docs/{config-knobs-audit.md → history/config-knobs-audit.md} +13 -10
  228. package/docs/history/release-cut-checklist.md +207 -0
  229. package/docs/{development-pipeline.md → process/development-pipeline.md} +24 -26
  230. package/docs/process/documentation-coverage.md +100 -0
  231. package/docs/process/documentation-guide.md +187 -0
  232. package/docs/{eval-runner.md → process/eval-runner.md} +41 -50
  233. package/docs/{evals-internal.md → process/evals-internal.md} +10 -10
  234. package/docs/{evolution.md → process/evolution.md} +2 -2
  235. package/docs/{fleet-demo-runbook.md → process/fleet-demo-runbook.md} +17 -10
  236. package/docs/{git-commit-provenance.md → process/git-commit-provenance.md} +11 -4
  237. package/docs/{performance-methodology.md → process/performance-methodology.md} +87 -69
  238. package/docs/{scientific-validation.md → process/scientific-validation.md} +4 -4
  239. package/evals/README.md +5 -0
  240. package/evals/behavioral-corpus-grader.mjs +103 -0
  241. package/evals/behavioral-machinery-baseline.json +2276 -0
  242. package/evals/behavioral-machinery-driver.ts +250 -0
  243. package/evals/behavioral-machinery-support.ts +253 -0
  244. package/evals/behavioral-machinery.yaml +614 -0
  245. package/evals/behavioral-model-negative-control.yaml +68 -0
  246. package/evals/behavioral-model.yaml +216 -0
  247. package/evals/fixtures/behavioral-facts.txt +3 -0
  248. package/evals/fixtures/behavioral-main.ts +7 -0
  249. package/evals/fixtures/decoy/note.txt +2 -0
  250. package/evals/fixtures/private/credentials.txt +1 -0
  251. package/evals/tracked-metrics-baseline.yaml +229 -0
  252. package/evals/tracked-metrics-grader.mjs +129 -0
  253. package/package.json +13 -21
  254. package/skills/README.md +51 -42
  255. package/skills/coding/ast-grep/SKILL.md +9 -3
  256. package/skills/coding/coding-standards/SKILL.md +9 -3
  257. package/skills/coding/prototype/SKILL.md +9 -3
  258. package/skills/coding/tdd/SKILL.md +9 -3
  259. package/skills/context/context-handoff/SKILL.md +13 -4
  260. package/skills/context/context-handoff/evals.md +3 -3
  261. package/skills/context/context-prime/SKILL.md +9 -3
  262. package/skills/context/context-prime/evals.md +2 -2
  263. package/skills/git/file-ticket/SKILL.md +10 -5
  264. package/skills/git/file-ticket/evals.md +2 -2
  265. package/skills/git/fix-issue/SKILL.md +12 -5
  266. package/skills/git/fix-issue/evals.md +4 -4
  267. package/skills/git/resolve-merge-conflicts/SKILL.md +9 -3
  268. package/skills/git/resolve-merge-conflicts/evals.md +2 -2
  269. package/skills/git/ship/SKILL.md +10 -4
  270. package/skills/git/ship/evals.md +4 -4
  271. package/skills/git/worktree-create/SKILL.md +8 -3
  272. package/skills/git/worktree-create/evals.md +6 -6
  273. package/skills/git/worktree-merge/SKILL.md +8 -3
  274. package/skills/git/worktree-merge/evals.md +6 -6
  275. package/skills/meta/{clio-dev → clio-coder-dev}/SKILL.md +22 -12
  276. package/skills/meta/{clio-dev → clio-coder-dev}/evals.md +5 -4
  277. package/skills/meta/clio-coder-test/SKILL.md +146 -0
  278. package/skills/meta/{clio-test → clio-coder-test}/evals.md +10 -5
  279. package/skills/meta/clio-coder-test/references/harness.md +102 -0
  280. package/skills/meta/clio-coder-test/references/test-map.md +96 -0
  281. package/skills/meta/credentials/SKILL.md +10 -3
  282. package/skills/meta/find-skills/SKILL.md +9 -3
  283. package/skills/meta/herdr/SKILL.md +9 -3
  284. package/skills/meta/skill-craft/SKILL.md +39 -16
  285. package/skills/planning/architecture/SKILL.md +9 -3
  286. package/skills/planning/backlog/SKILL.md +9 -3
  287. package/skills/planning/prd/SKILL.md +9 -3
  288. package/skills/planning/product-intent/SKILL.md +9 -3
  289. package/skills/planning/tech-spec/SKILL.md +9 -3
  290. package/skills/registry.yaml +66 -66
  291. package/skills/research/arxiv-literature/SKILL.md +9 -3
  292. package/skills/research/experiment-protocol/SKILL.md +10 -3
  293. package/skills/research/scientific-debugging/SKILL.md +10 -3
  294. package/skills/research/scientific-debugging/evals.md +2 -2
  295. package/skills/research/scientific-modernization/SKILL.md +10 -3
  296. package/skills/skill-marketplace.json +285 -66
  297. package/skills/workflow/cut-it/SKILL.md +11 -3
  298. package/skills/workflow/design-council/SKILL.md +12 -3
  299. package/skills/workflow/grill-me/SKILL.md +9 -3
  300. package/skills/workflow/workflow-distiller/SKILL.md +9 -3
  301. package/src/cli/acp.ts +2 -2
  302. package/src/cli/args.ts +2 -2
  303. package/src/cli/auth.ts +2 -2
  304. package/src/cli/bootstrap-generate.ts +6 -6
  305. package/src/cli/clio.ts +6 -1
  306. package/src/cli/config-inspect.ts +68 -15
  307. package/src/cli/configure-interop.ts +1 -1
  308. package/src/cli/configure.ts +27 -31
  309. package/src/cli/default-target.ts +1 -1
  310. package/src/cli/docs.ts +28 -20
  311. package/src/cli/doctor-naming.ts +323 -0
  312. package/src/cli/doctor-panes.ts +46 -14
  313. package/src/cli/doctor-toolchain.ts +31 -10
  314. package/src/cli/doctor.ts +15 -1
  315. package/src/cli/eval-inventory.ts +8 -8
  316. package/src/cli/eval.ts +1 -2
  317. package/src/cli/evidence-detail.ts +1 -1
  318. package/src/cli/evidence-inventory.ts +1 -1
  319. package/src/cli/extensions.ts +2 -1
  320. package/src/cli/fleet-decisions.ts +1 -1
  321. package/src/cli/fleet-inspect.ts +1 -1
  322. package/src/cli/fleet-preflight.ts +1 -1
  323. package/src/cli/fleet-verify.ts +1 -1
  324. package/src/cli/fleet-view.ts +40 -23
  325. package/src/cli/fleet.ts +9 -6
  326. package/src/cli/index.ts +2 -1
  327. package/src/cli/internal-dispatch.ts +3 -4
  328. package/src/cli/interop-inspect.ts +2 -2
  329. package/src/cli/models.ts +3 -3
  330. package/src/cli/modes/print.ts +1 -1
  331. package/src/cli/panes.ts +19 -5
  332. package/src/cli/reset.ts +1 -1
  333. package/src/cli/run.ts +13 -17
  334. package/src/cli/share.ts +6 -2
  335. package/src/cli/skills-eval.ts +14 -14
  336. package/src/cli/targets.ts +25 -30
  337. package/src/cli/trace-inspect.ts +1 -1
  338. package/src/cli/trace.ts +96 -4
  339. package/src/cli/uninstall.ts +2 -2
  340. package/src/cli/upgrade.ts +29 -34
  341. package/src/cli/usage.ts +2 -2
  342. package/src/cli/validate-model.ts +1 -1
  343. package/src/cli/verifiers-inspect.ts +1 -1
  344. package/src/cli/wiki-generate.ts +6 -6
  345. package/src/core/artifact-paths.ts +1 -1
  346. package/src/core/bash-exec.ts +132 -87
  347. package/src/core/boot-trace.ts +3 -3
  348. package/src/core/bus-events.ts +51 -6
  349. package/src/core/bus-trace.ts +2 -2
  350. package/src/core/compile-cache.ts +1 -1
  351. package/src/core/config.ts +1066 -886
  352. package/src/core/defaults.ts +326 -530
  353. package/src/core/dispatch-outcome.ts +16 -0
  354. package/src/core/domain-loader.ts +6 -4
  355. package/src/core/event-bus.ts +1 -1
  356. package/src/core/file-references.ts +78 -88
  357. package/src/core/git-commit-attribution.ts +3 -9
  358. package/src/core/guardrails.ts +33 -52
  359. package/src/core/naming-compat.ts +45 -0
  360. package/src/core/naming-events.ts +62 -0
  361. package/src/core/prompt-hint.ts +9 -0
  362. package/src/core/recent-models.ts +1 -7
  363. package/src/core/residency-protection.ts +4 -8
  364. package/src/core/resolve-config-value.ts +1 -1
  365. package/src/core/response-model-id.ts +0 -14
  366. package/src/core/session-routing.ts +84 -74
  367. package/src/core/skill-activation.ts +18 -0
  368. package/src/core/termination.ts +4 -4
  369. package/src/core/timers.ts +2 -12
  370. package/src/domains/agents/builtins/architect.md +2 -3
  371. package/src/domains/agents/builtins/coder.md +3 -2
  372. package/src/domains/agents/builtins/debugger.md +2 -2
  373. package/src/domains/agents/builtins/documenter.md +2 -2
  374. package/src/domains/agents/builtins/git-master.md +1 -1
  375. package/src/domains/agents/builtins/oracle.md +1 -1
  376. package/src/domains/agents/builtins/provenance.md +1 -1
  377. package/src/domains/agents/builtins/researcher.md +1 -1
  378. package/src/domains/agents/builtins/scout.md +1 -1
  379. package/src/domains/agents/builtins/tester.md +2 -2
  380. package/src/domains/agents/builtins/verifier.md +2 -2
  381. package/src/domains/agents/builtins/wiki-writer.md +1 -1
  382. package/src/domains/agents/catalog.ts +14 -26
  383. package/src/domains/agents/contract.ts +2 -0
  384. package/src/domains/agents/extension.ts +26 -4
  385. package/src/domains/agents/registry.ts +7 -7
  386. package/src/domains/agents/result-contract.ts +1 -1
  387. package/src/domains/agents/spec.ts +0 -11
  388. package/src/domains/config/classify.ts +35 -47
  389. package/src/domains/config/extension.ts +5 -5
  390. package/src/domains/config/keybindings.ts +56 -47
  391. package/src/domains/config/watcher.ts +1 -1
  392. package/src/domains/context/codewiki/indexer.ts +1 -1
  393. package/src/domains/context/extension.ts +3 -6
  394. package/src/domains/context/prompt-context.ts +1 -1
  395. package/src/domains/context/wiki/assemble.ts +2 -2
  396. package/src/domains/context/working-set/path-index.ts +1 -0
  397. package/src/domains/context/working-set/replay/metrics.ts +0 -4
  398. package/src/domains/context/working-set/replay/report.ts +1 -1
  399. package/src/domains/context/working-set/replay/synthetic.ts +2 -2
  400. package/src/domains/dispatch/active-route-planner.ts +2 -2
  401. package/src/domains/dispatch/agent-candidates.ts +1 -1
  402. package/src/domains/dispatch/agent-ledger-store.ts +1 -1
  403. package/src/domains/dispatch/agent-ledger.ts +1 -1
  404. package/src/domains/dispatch/assignment.ts +5 -5
  405. package/src/domains/dispatch/capability-match.ts +10 -0
  406. package/src/domains/dispatch/capacity-lease.ts +2 -5
  407. package/src/domains/dispatch/code-step.ts +1 -1
  408. package/src/domains/dispatch/contract.ts +2 -2
  409. package/src/domains/dispatch/extension.ts +169 -82
  410. package/src/domains/dispatch/fleet-node-prompt.ts +1 -1
  411. package/src/domains/dispatch/fleet-preflight.ts +8 -17
  412. package/src/domains/dispatch/fleet-run.ts +0 -7
  413. package/src/domains/dispatch/gate-decisions.ts +25 -14
  414. package/src/domains/dispatch/host-verification.ts +435 -39
  415. package/src/domains/dispatch/intent-requirements.ts +10 -0
  416. package/src/domains/dispatch/intent.ts +18 -1
  417. package/src/domains/dispatch/joint-route-resolver.ts +1 -1
  418. package/src/domains/dispatch/path-scope.ts +220 -70
  419. package/src/domains/dispatch/placement.ts +2 -2
  420. package/src/domains/dispatch/receipt-findings.ts +1 -1
  421. package/src/domains/dispatch/receipt-integrity.ts +20 -8
  422. package/src/domains/dispatch/reservation-store.ts +0 -23
  423. package/src/domains/dispatch/route-decision.ts +1 -1
  424. package/src/domains/dispatch/route-history.ts +1 -1
  425. package/src/domains/dispatch/route-policy.ts +1 -1
  426. package/src/domains/dispatch/route-readiness.ts +0 -28
  427. package/src/domains/dispatch/run-event-journal.ts +9 -19
  428. package/src/domains/dispatch/state.ts +2 -3
  429. package/src/domains/dispatch/tool-stats.ts +1 -1
  430. package/src/domains/dispatch/transport.ts +47 -40
  431. package/src/domains/dispatch/types.ts +58 -6
  432. package/src/domains/dispatch/worker-protocol.ts +2 -2
  433. package/src/domains/eval/artifacts/store.ts +10 -4
  434. package/src/domains/eval/compare/thresholds.ts +0 -8
  435. package/src/domains/eval/execution-provenance.ts +1 -1
  436. package/src/domains/eval/metrics/token-stream.ts +0 -7
  437. package/src/domains/eval/report.ts +1 -1
  438. package/src/domains/eval/runner.ts +1 -1
  439. package/src/domains/eval/runners/clio-run.ts +7 -6
  440. package/src/domains/eval/runners/external-command.ts +4 -3
  441. package/src/domains/eval/schema/artifact.ts +1 -1
  442. package/src/domains/eval/schema/behavioral-metrics.ts +3 -2
  443. package/src/domains/eval/schema/behavioral.ts +7 -6
  444. package/src/domains/eval/schema/execution-envelope.ts +4 -2
  445. package/src/domains/eval/schema/naming.ts +10 -0
  446. package/src/domains/eval/schema/suite.ts +2 -2
  447. package/src/domains/eval/schema/validate.ts +9 -5
  448. package/src/domains/eval/schema/verdict.ts +4 -2
  449. package/src/domains/eval/store.ts +20 -3
  450. package/src/domains/eval/suites/run.ts +12 -6
  451. package/src/domains/eval/types.ts +1 -1
  452. package/src/domains/eval/workspaces/git.ts +1 -1
  453. package/src/domains/eval/workspaces/temp-copy.ts +1 -1
  454. package/src/domains/evidence/build.ts +13 -5
  455. package/src/domains/evidence/trust-status.ts +10 -1
  456. package/src/domains/extensions/contract.ts +15 -1
  457. package/src/domains/extensions/discovery.ts +238 -41
  458. package/src/domains/extensions/extension.ts +105 -6
  459. package/src/domains/extensions/index.ts +24 -0
  460. package/src/domains/extensions/integrity.ts +189 -0
  461. package/src/domains/extensions/manager.ts +17 -1
  462. package/src/domains/extensions/resource-path.ts +27 -0
  463. package/src/domains/extensions/resources.ts +18 -38
  464. package/src/domains/extensions/snapshot-store.ts +39 -0
  465. package/src/domains/extensions/snapshot.ts +180 -0
  466. package/src/domains/extensions/state.ts +385 -57
  467. package/src/domains/extensions/types.ts +118 -1
  468. package/src/domains/interop/consent.ts +7 -7
  469. package/src/domains/interop/extension.ts +1 -1
  470. package/src/domains/lifecycle/doctor.ts +27 -21
  471. package/src/domains/lifecycle/migrations/2026-09-01-clio-coder-naming.ts +155 -0
  472. package/src/domains/lifecycle/migrations/2026-09-01-extension-install-digests.ts +27 -0
  473. package/src/domains/lifecycle/migrations/2026-09-01-retire-panes-knobs.ts +59 -0
  474. package/src/domains/lifecycle/migrations/2026-09-01-settings-v2.ts +338 -0
  475. package/src/domains/lifecycle/migrations/index.ts +22 -1
  476. package/src/domains/lifecycle/naming-history.ts +153 -0
  477. package/src/domains/lifecycle/naming-mutable-state.ts +104 -0
  478. package/src/domains/lifecycle/naming-resources.ts +276 -0
  479. package/src/domains/lifecycle/naming-tool-markers.ts +139 -0
  480. package/src/domains/lifecycle/naming-yazi.ts +86 -0
  481. package/src/domains/lifecycle/upgrade-notice.ts +1 -1
  482. package/src/domains/memory/task-memory-handoff.ts +6 -3
  483. package/src/domains/middleware/contract.ts +26 -0
  484. package/src/domains/middleware/extension.ts +24 -24
  485. package/src/domains/middleware/hook-receipts.ts +27 -4
  486. package/src/domains/middleware/hooks-io.ts +65 -32
  487. package/src/domains/middleware/hooks.ts +64 -0
  488. package/src/domains/middleware/index.ts +35 -4
  489. package/src/domains/middleware/marketplace-offer.ts +339 -0
  490. package/src/domains/middleware/registrations.ts +326 -0
  491. package/src/domains/middleware/runtime.ts +30 -2
  492. package/src/domains/middleware/snapshot.ts +20 -7
  493. package/src/domains/mux/contract.ts +195 -25
  494. package/src/domains/mux/detect.ts +23 -6
  495. package/src/domains/mux/dock-controller.ts +365 -0
  496. package/src/domains/mux/extension.ts +7 -1
  497. package/src/domains/mux/index.ts +21 -1
  498. package/src/domains/mux/operations.ts +72 -5
  499. package/src/domains/mux/protocol.ts +19 -6
  500. package/src/domains/mux/socket-client.ts +167 -19
  501. package/src/domains/mux/types.ts +49 -6
  502. package/src/domains/mux/yazi/assets/yazi.toml +2 -2
  503. package/src/domains/mux/yazi/event-stream.ts +6 -4
  504. package/src/domains/mux/yazi/profile.ts +1 -1
  505. package/src/domains/mux/yazi/session.ts +79 -7
  506. package/src/domains/mux/yazi/theme.ts +117 -17
  507. package/src/domains/observability/contract.ts +10 -11
  508. package/src/domains/observability/extension.ts +12 -4
  509. package/src/domains/observability/out-of-turn-usage.ts +2 -2
  510. package/src/domains/observability/projection.ts +15 -91
  511. package/src/domains/observability/trace-store.ts +65 -19
  512. package/src/domains/prompts/compiler.ts +75 -55
  513. package/src/domains/prompts/contract.ts +15 -3
  514. package/src/domains/prompts/extension.ts +100 -12
  515. package/src/domains/prompts/fragments/identity/clio-worker.md +2 -4
  516. package/src/domains/prompts/fragments/identity/clio.md +6 -12
  517. package/src/domains/prompts/fragments/identity/docs-routing.md +1 -2
  518. package/src/domains/prompts/fragments/identity/self-awareness.md +3 -11
  519. package/src/domains/prompts/fragments/operating/contract.md +7 -15
  520. package/src/domains/prompts/fragments/operating/delegation.md +32 -34
  521. package/src/domains/prompts/fragments/operating/skills.md +11 -18
  522. package/src/domains/prompts/fragments/operating/worker.md +1 -8
  523. package/src/domains/providers/extension.ts +5 -5
  524. package/src/domains/providers/index.ts +1 -1
  525. package/src/domains/providers/knowledge-base-path.ts +1 -1
  526. package/src/domains/providers/model-runtime-capabilities.ts +99 -23
  527. package/src/domains/providers/models/cloud-models/alcf.yaml +1 -1
  528. package/src/domains/providers/models/local-models/{clio-local-coding-targets.yaml → clio-coder-local-coding-targets.yaml} +671 -106
  529. package/src/domains/providers/plugins.ts +1 -1
  530. package/src/domains/providers/resolver.ts +1 -1
  531. package/src/domains/providers/runtime-resolution.ts +31 -0
  532. package/src/domains/providers/runtimes/cloud/alcf.ts +4 -4
  533. package/src/domains/providers/runtimes/common/lmstudio-http.ts +1 -5
  534. package/src/domains/providers/runtimes/common/local-synth.ts +3 -3
  535. package/src/domains/providers/runtimes/common/probe-helpers.ts +9 -4
  536. package/src/domains/providers/runtimes/local-native/llamacpp-completion.ts +1 -1
  537. package/src/domains/providers/runtimes/local-native/llamacpp.ts +9 -1
  538. package/src/domains/providers/runtimes/local-native/lmstudio.ts +2 -9
  539. package/src/domains/providers/runtimes/protocol/litellm.ts +1 -91
  540. package/src/domains/providers/types/cost-provenance.ts +19 -0
  541. package/src/domains/providers/types/knowledge-base.ts +13 -0
  542. package/src/domains/providers/types/local-model-quirks.ts +87 -39
  543. package/src/domains/providers/types/target-descriptor.ts +3 -3
  544. package/src/domains/resources/extension.ts +1 -1
  545. package/src/domains/resources/library.ts +6 -6
  546. package/src/domains/resources/prompts/loader.ts +1 -1
  547. package/src/domains/resources/skills/content-hash.ts +7 -6
  548. package/src/domains/resources/skills/evals.ts +1 -1
  549. package/src/domains/resources/skills/install.ts +36 -12
  550. package/src/domains/resources/skills/loader.ts +41 -18
  551. package/src/domains/resources/skills/marketplace.ts +21 -2
  552. package/src/domains/resources/skills/promotion.ts +214 -0
  553. package/src/domains/safety/audit.ts +2 -2
  554. package/src/domains/safety/call-target.ts +1 -1
  555. package/src/domains/safety/finish-contract.ts +2 -1
  556. package/src/domains/safety/loop-detector.ts +7 -4
  557. package/src/domains/safety/run-effects.ts +1 -1
  558. package/src/domains/scheduling/extension.ts +4 -4
  559. package/src/domains/session/archive-readers.ts +9 -1
  560. package/src/domains/session/compaction/branch-summary.ts +4 -0
  561. package/src/domains/session/compaction/compact.ts +1 -1
  562. package/src/domains/session/compaction/tokens.ts +4 -0
  563. package/src/domains/session/context-accounting.ts +1 -1
  564. package/src/domains/session/decision-board.ts +1 -1
  565. package/src/domains/session/extension.ts +1 -1
  566. package/src/domains/session/handoff.ts +2 -2
  567. package/src/domains/session/prompt-manifest.ts +0 -5
  568. package/src/domains/session/protected-artifact-journal.ts +12 -6
  569. package/src/domains/session/retry.ts +1 -1
  570. package/src/domains/session/task-board.ts +10 -9
  571. package/src/domains/share/archive.ts +249 -43
  572. package/src/domains/toolchain/install.ts +1 -1
  573. package/src/engine/acp/adapter.ts +3 -3
  574. package/src/engine/acp/event-mapper.ts +3 -3
  575. package/src/engine/acp/server.ts +89 -35
  576. package/src/engine/acp/tool-mediator.ts +2 -2
  577. package/src/engine/acp/types.ts +1 -1
  578. package/src/engine/alcf-oauth.ts +5 -5
  579. package/src/engine/antigravity/subprocess-runtime.ts +2 -2
  580. package/src/engine/api-registry.ts +1 -1
  581. package/src/engine/apis/llamacpp-residency.ts +4 -23
  582. package/src/engine/apis/lmstudio.ts +4 -9
  583. package/src/engine/apis/ollama-native.ts +9 -9
  584. package/src/engine/apis/openai-completions.ts +30 -27
  585. package/src/engine/apis/output-budget.ts +8 -18
  586. package/src/engine/apis/residency.ts +10 -35
  587. package/src/engine/claude/sdk-module.ts +1 -12
  588. package/src/engine/claude/sdk-runtime.ts +6 -6
  589. package/src/engine/claude/subprocess-runtime.ts +1 -1
  590. package/src/engine/claude/tool-safety.ts +4 -4
  591. package/src/engine/gemma-channel-filter.ts +19 -0
  592. package/src/engine/loop-guard.ts +92 -17
  593. package/src/engine/session.ts +14 -7
  594. package/src/engine/tui-primitives.ts +1 -1
  595. package/src/engine/worker-events.ts +6 -6
  596. package/src/engine/worker-runtime.ts +54 -24
  597. package/src/engine/worker-tools.ts +3 -1
  598. package/src/entry/extension-hook-sources.ts +28 -0
  599. package/src/entry/extension-reload.ts +309 -0
  600. package/src/entry/orchestrator.ts +163 -120
  601. package/src/interactive/application-controller.ts +23 -22
  602. package/src/interactive/bus-notices.ts +10 -3
  603. package/src/interactive/chat-loop-messages.ts +3 -13
  604. package/src/interactive/chat-loop.ts +18 -9
  605. package/src/interactive/chat-panel.ts +37 -14
  606. package/src/interactive/chat-renderer.ts +71 -7
  607. package/src/interactive/clio-editor.ts +105 -1
  608. package/src/interactive/context-activity.ts +8 -6
  609. package/src/interactive/context-meter.ts +3 -6
  610. package/src/interactive/context-overlay.ts +1 -1
  611. package/src/interactive/cost-overlay.ts +1 -1
  612. package/src/interactive/council-grid.ts +2 -2
  613. package/src/interactive/dispatch-board.ts +36 -44
  614. package/src/interactive/editor-bash.ts +21 -0
  615. package/src/interactive/editor-steer.ts +9 -4
  616. package/src/interactive/editor-submit.ts +24 -18
  617. package/src/interactive/external-editor.ts +1 -1
  618. package/src/interactive/file-reference-completion.ts +360 -0
  619. package/src/interactive/footer/dashboard.ts +15 -17
  620. package/src/interactive/footer/notifications.ts +14 -8
  621. package/src/interactive/footer/widgets.ts +15 -44
  622. package/src/interactive/interactive-application.ts +116 -61
  623. package/src/interactive/interactive-event-projection.ts +1 -1
  624. package/src/interactive/interactive-input-runtime.ts +6 -2
  625. package/src/interactive/interactive-presentation.ts +22 -17
  626. package/src/interactive/interactive-shell.ts +2 -2
  627. package/src/interactive/interactive-slash-runtime.ts +65 -17
  628. package/src/interactive/interactive-subscriptions.ts +1 -1
  629. package/src/interactive/interactive-tickers.ts +1 -1
  630. package/src/interactive/keybinding-manager.ts +4 -4
  631. package/src/interactive/layout.ts +1 -1
  632. package/src/interactive/memory-overlay.ts +2 -2
  633. package/src/interactive/modal-marker.ts +2 -21
  634. package/src/interactive/mutation-preview.ts +1 -1
  635. package/src/interactive/overlay-frame.ts +4 -12
  636. package/src/interactive/overlay-general-openers.ts +6 -2
  637. package/src/interactive/overlay-key-routing.ts +7 -7
  638. package/src/interactive/overlay-lifecycle.ts +1 -1
  639. package/src/interactive/overlay-model-selectors.ts +3 -3
  640. package/src/interactive/overlays/agents.ts +2 -2
  641. package/src/interactive/overlays/ask-user.ts +25 -11
  642. package/src/interactive/overlays/context-reset.ts +28 -4
  643. package/src/interactive/overlays/cwd-fallback.ts +28 -4
  644. package/src/interactive/overlays/decisions.ts +4 -2
  645. package/src/interactive/overlays/extensions.ts +9 -1
  646. package/src/interactive/overlays/fleet-run-approval.ts +3 -3
  647. package/src/interactive/overlays/handoff-review.ts +2 -2
  648. package/src/interactive/overlays/help-reference.ts +13 -0
  649. package/src/interactive/overlays/interop.ts +1 -1
  650. package/src/interactive/overlays/library-install-confirm.ts +1 -1
  651. package/src/interactive/overlays/message-picker.ts +1 -1
  652. package/src/interactive/overlays/model-selector.ts +39 -31
  653. package/src/interactive/overlays/prompts.ts +10 -4
  654. package/src/interactive/overlays/session-selector.ts +2 -2
  655. package/src/interactive/overlays/settings.ts +360 -303
  656. package/src/interactive/overlays/side-question.ts +2 -2
  657. package/src/interactive/overlays/skills-hub.ts +8 -8
  658. package/src/interactive/overlays/tree-selector.ts +2 -2
  659. package/src/interactive/panes-runtime.ts +145 -43
  660. package/src/interactive/permission-overlay.ts +2 -2
  661. package/src/interactive/prompt-cache-identity.ts +88 -0
  662. package/src/interactive/renderers/retry-status.ts +12 -4
  663. package/src/interactive/renderers/tool-execution.ts +4 -4
  664. package/src/interactive/session-transcript.ts +3 -3
  665. package/src/interactive/slash-autocomplete.ts +454 -165
  666. package/src/interactive/slash-commands.ts +401 -190
  667. package/src/interactive/slash-spec.ts +160 -17
  668. package/src/interactive/status/controller.ts +2 -2
  669. package/src/interactive/stream-pacing-policy.ts +1 -24
  670. package/src/interactive/tasks-overlay.ts +20 -13
  671. package/src/interactive/terminal-lease.ts +6 -7
  672. package/src/interactive/turn-context.ts +41 -26
  673. package/src/interactive/turn-persistence.ts +2 -2
  674. package/src/interactive/turn-prewarm.ts +2 -2
  675. package/src/interactive/turn-runtime.ts +8 -8
  676. package/src/interactive/turn-state.ts +1 -1
  677. package/src/interactive/view/artifacts.ts +12 -9
  678. package/src/interactive/view/view-overlay.ts +13 -10
  679. package/src/interactive/watch-pane.ts +38 -10
  680. package/src/interactive/welcome-dashboard.ts +15 -15
  681. package/src/interactive/worker-progress.ts +4 -4
  682. package/src/interactive/worker-receipts.ts +1 -1
  683. package/src/interactive/worker-stream.ts +1 -4
  684. package/src/interactive/yazi-bridge.ts +72 -11
  685. package/src/tools/agent-tools.ts +30 -1
  686. package/src/tools/artifact.ts +2 -2
  687. package/src/tools/ask-user.ts +6 -6
  688. package/src/tools/bash.ts +2 -2
  689. package/src/tools/bootstrap.ts +4 -0
  690. package/src/tools/builtin-tool-catalog.ts +52 -22
  691. package/src/tools/codewiki/code-nav-surface.ts +6 -0
  692. package/src/tools/codewiki/code-nav.ts +99 -13
  693. package/src/tools/compete-worktrees.ts +27 -17
  694. package/src/tools/context/docs-engine.ts +20 -7
  695. package/src/tools/context/index.ts +44 -13
  696. package/src/tools/core-bootstrap.ts +28 -6
  697. package/src/tools/credential-present.ts +1 -2
  698. package/src/tools/dispatch-admission.ts +4 -2
  699. package/src/tools/dispatch-arguments.ts +6 -2
  700. package/src/tools/dispatch-plan.ts +48 -15
  701. package/src/tools/dispatch-run-events.ts +13 -11
  702. package/src/tools/dispatch-runner.ts +11 -6
  703. package/src/tools/dispatch-schema.ts +338 -0
  704. package/src/tools/dispatch-types.ts +3 -0
  705. package/src/tools/dispatch.ts +9 -254
  706. package/src/tools/find.ts +1 -6
  707. package/src/tools/ledger.ts +3 -5
  708. package/src/tools/monitor-surface.ts +5 -13
  709. package/src/tools/monitor.ts +4 -4
  710. package/src/tools/observation.ts +4 -5
  711. package/src/tools/observers.ts +0 -33
  712. package/src/tools/panes-surface.ts +4 -11
  713. package/src/tools/panes.ts +4 -2
  714. package/src/tools/policy.ts +15 -2
  715. package/src/tools/read.ts +5 -6
  716. package/src/tools/registry.ts +30 -7
  717. package/src/tools/result-shaping.ts +18 -14
  718. package/src/tools/steer-surface.ts +1 -1
  719. package/src/tools/task-worktree.ts +28 -7
  720. package/src/tools/tasks.ts +1 -1
  721. package/src/tools/truncate.ts +6 -5
  722. package/src/tools/verify/authoring.ts +3 -6
  723. package/src/tools/verify/frontend.ts +1 -1
  724. package/src/tools/verify/surface.ts +6 -12
  725. package/src/tools/web-fetch-surface.ts +1 -3
  726. package/src/tools/web-fetch.ts +1 -1
  727. package/src/worker/entry.ts +4 -3
  728. package/src/worker/protocol.ts +16 -14
  729. package/src/worker/spec-contract.ts +2 -2
  730. package/src/worker/stdin-demux.ts +2 -2
  731. package/dist/chunk-36EJLSQQ.js +0 -814
  732. package/dist/chunk-GXNLGKAB.js +0 -571
  733. package/dist/chunk-K7VKOLQQ.js +0 -15
  734. package/dist/chunk-PMZCIOCJ.js +0 -25
  735. package/dist/chunk-SUCTJL45.js +0 -45
  736. package/dist/chunk-SUW5DORT.js +0 -819
  737. package/dist/chunk-TZ3SGWZZ.js +0 -48
  738. package/dist/chunk-UOV2BYIW.js +0 -107
  739. package/dist/chunk-VFA6GDY5.js +0 -1625
  740. package/dist/doctor-QOA5FNY5.js +0 -313
  741. package/dist/fleet-view-ZCON35AG.js +0 -102
  742. package/dist/panes-HMABYVO4.js +0 -58
  743. package/docs/artifact-versions.md +0 -67
  744. package/docs/documentation-coverage.md +0 -46
  745. package/docs/documentation-guide.md +0 -167
  746. package/docs/release-cut-checklist.md +0 -193
  747. package/docs/time-conventions.md +0 -101
  748. package/skills/meta/clio-test/SKILL.md +0 -133
  749. package/skills/meta/clio-test/references/harness.md +0 -126
  750. package/skills/meta/clio-test/references/test-map.md +0 -69
  751. package/src/engine/apis/degraded-inference.ts +0 -95
@@ -3,6 +3,7 @@ import {
3
3
  type ClioSettings,
4
4
  removeFleetProfileFromSettings,
5
5
  removeTargetFromSettings,
6
+ SETTINGS_V1_PATH_MOVES,
6
7
  setFleetProfileInSettings,
7
8
  useTargetInSettings,
8
9
  } from "../../core/config.js";
@@ -15,7 +16,6 @@ import {
15
16
  THINKING_LEVELS,
16
17
  type WorkerEscalationSettings,
17
18
  } from "../../core/defaults.js";
18
- import type { GuardrailValues } from "../../core/guardrails.js";
19
19
  import { getAtPath, isRoutingPath } from "../../core/session-routing.js";
20
20
  import { MAX_TIMER_DELAY_MS } from "../../core/timers.js";
21
21
  import { capacityLeaseUsage } from "../../domains/dispatch/capacity-lease.js";
@@ -63,9 +63,9 @@ export const SETTINGS_OVERLAY_WIDTH = "100%";
63
63
  export const SETTINGS_OVERLAY_MAX_HEIGHT = "100%";
64
64
  export const SETTINGS_OVERLAY_MARGIN = {
65
65
  top: 1,
66
- right: 2,
66
+ right: 0,
67
67
  bottom: 1,
68
- left: 2,
68
+ left: 0,
69
69
  } as const;
70
70
 
71
71
  const SECTION_LANE_WIDTH = 24;
@@ -90,16 +90,6 @@ const ULTRAWIDE_LAYOUT_MIN_WIDTH = 112;
90
90
  */
91
91
  const WIDE_LAYOUT_MIN_WIDTH = 72;
92
92
  const DROP_PATH_COLUMN_WIDTH = 52;
93
- /**
94
- * Terminal width below which Settings drops its two-cell side margins.
95
- *
96
- * The engine composites an overlay only across the columns its region covers,
97
- * and a left/right margin shrinks that region, so at 40 columns four of them
98
- * kept showing the transcript beside a modal that owns the keyboard. Above this
99
- * width the margins are cheap and the box reads better inset; below it the
100
- * overlay claims every terminal column instead.
101
- */
102
- const ULTRA_NARROW_TERMINAL_WIDTH = 60;
103
93
  /** Shown when no runtime is resolvable, so it offers the full vocabulary. */
104
94
  const FALLBACK_THINKING_VALUES: ReadonlyArray<string> = THINKING_LEVELS;
105
95
  const ROW_GAP = " ";
@@ -108,11 +98,11 @@ const ROW_GAP = " ";
108
98
  * the row that shows them and the mutation that writes them both need a
109
99
  * definite shipped value to fall back to.
110
100
  */
111
- const SHIPPED_ESCALATION: WorkerEscalationSettings = DEFAULT_SETTINGS.workers.escalation ?? {
101
+ const SHIPPED_ESCALATION: WorkerEscalationSettings = DEFAULT_SETTINGS.fleet.permissions.escalation ?? {
112
102
  timeoutMs: 120_000,
113
103
  fallback: "deny",
114
104
  };
115
- const SHIPPED_RESILIENCE_COOLDOWN_MS = DEFAULT_SETTINGS.workers.resilienceCooldownMs ?? 15_000;
105
+ const SHIPPED_RESILIENCE_COOLDOWN_MS = DEFAULT_SETTINGS.fleet.retry.routeCooldownMs ?? 15_000;
116
106
  /**
117
107
  * The product's cut marker, as the help center and every list overlay use it.
118
108
  *
@@ -187,7 +177,6 @@ export const SETTINGS_LABELS_BY_ID = {
187
177
  "orchestrator.model": "Model",
188
178
  "background.target": "Memory target",
189
179
  "background.model": "Memory model",
190
- "background.thinkingLevel": "Memory thinking level",
191
180
  "memory.intervention.enabled": "Proactive memory",
192
181
  "memory.intervention.everyNTools": "Memory cadence (tools)",
193
182
  "memory.intervention.windowSteps": "Memory trajectory steps",
@@ -206,16 +195,20 @@ export const SETTINGS_LABELS_BY_ID = {
206
195
  "routing.agentAutomation.activeAgentRoles": "Active agent routes",
207
196
  "panes.enabled": "Panes",
208
197
  "panes.notifications": "Pane notifications",
198
+ "panes.layout": "Boot layout",
199
+ "panes.workers.ratio": "Workers dock share",
209
200
  "panes.journal": "Run event journal",
210
201
  "panes.yazi.enabled": "Files pane",
211
202
  "panes.yazi.mode": "Files pane mode",
212
- "panes.yazi.profile": "Yazi profile",
203
+ "panes.yazi.profile": "Files pane profile",
213
204
  "panes.yazi.followCwd": "Follow conversation cwd",
205
+ "panes.yazi.ratio": "Files dock share",
214
206
  scope: "Model cycle set",
215
207
  "modelSelector.recentLimit": "Recent models kept",
216
208
  "modelSelector.favorites": "Pinned favorites",
217
209
  "budget.sessionCeilingUsd": "Session ceiling (USD)",
218
210
  "defaults.maxTokens": "Output budget (tokens)",
211
+ "context.toolResultMaxBytes": "Tool result cap (bytes)",
219
212
  "budget.concurrency": "Fleet concurrency",
220
213
  "guardrails.turnToolCallBudget": "Turn tool-call budget",
221
214
  "guardrails.workerToolCallCap": "Worker tool-call cap",
@@ -224,7 +217,6 @@ export const SETTINGS_LABELS_BY_ID = {
224
217
  "guardrails.observationTurnBudgetBytes": "Observation byte pool",
225
218
  "guardrails.internalDispatchTimeoutMs": "Internal dispatch timeout (ms)",
226
219
  "compaction.auto": "Auto-compact",
227
- "compaction.excludeLastTurns": "Protected recent turns",
228
220
  "compaction.threshold": "Compaction threshold",
229
221
  "context.workingSet.enabled": "Working-set eviction",
230
222
  "context.workingSet.policy": "Eviction policy",
@@ -245,7 +237,6 @@ export const SETTINGS_LABELS_BY_ID = {
245
237
  "watchdog.enabled": "Turn-end watchdog",
246
238
  "watchdog.target": "Watchdog target",
247
239
  "watchdog.cadenceToolCalls": "Watchdog cadence (tools)",
248
- theme: "Theme",
249
240
  runtimePlugins: "Runtime plugins",
250
241
  "compaction.model": "Compaction model",
251
242
  "compaction.systemPrompt": "Compaction prompt",
@@ -308,7 +299,6 @@ export const SETTINGS_SECTION_ROWS = {
308
299
  "orchestrator.model",
309
300
  "background.target",
310
301
  "background.model",
311
- "background.thinkingLevel",
312
302
  "memory.intervention.enabled",
313
303
  "memory.intervention.everyNTools",
314
304
  "memory.intervention.windowSteps",
@@ -329,12 +319,15 @@ export const SETTINGS_SECTION_ROWS = {
329
319
  "routing.agentAutomation.activeAgentRoles",
330
320
  "panes.enabled",
331
321
  "panes.notifications",
322
+ "panes.layout",
323
+ "panes.workers.ratio",
332
324
  "panes.journal",
333
325
  ],
334
326
  models: ["scope", "modelSelector.recentLimit", "modelSelector.favorites"],
335
327
  budget: [
336
328
  "budget.sessionCeilingUsd",
337
329
  "defaults.maxTokens",
330
+ "context.toolResultMaxBytes",
338
331
  "budget.concurrency",
339
332
  "guardrails.turnToolCallBudget",
340
333
  "guardrails.workerToolCallCap",
@@ -346,7 +339,6 @@ export const SETTINGS_SECTION_ROWS = {
346
339
  compaction: [
347
340
  "compaction.auto",
348
341
  "compaction.threshold",
349
- "compaction.excludeLastTurns",
350
342
  "context.workingSet.enabled",
351
343
  "context.workingSet.policy",
352
344
  "context.workingSet.target",
@@ -361,11 +353,11 @@ export const SETTINGS_SECTION_ROWS = {
361
353
  "terminal.fullscreenScrollbar",
362
354
  "terminal.smoothStreaming",
363
355
  "terminal.notify",
364
- "theme",
365
356
  "panes.yazi.enabled",
366
357
  "panes.yazi.mode",
367
358
  "panes.yazi.profile",
368
359
  "panes.yazi.followCwd",
360
+ "panes.yazi.ratio",
369
361
  ],
370
362
  watchdog: ["watchdog.enabled", "watchdog.target", "watchdog.cadenceToolCalls"],
371
363
  advanced: [
@@ -402,7 +394,6 @@ const SETTINGS_DESCRIPTIONS_BY_ID = {
402
394
  "orchestrator.model": "Active chat wire model id.",
403
395
  "background.target": "Optional target for LLM memory steps; unset keeps rules-only memory.",
404
396
  "background.model": "Small non-reasoning model used only for task memory steps.",
405
- "background.thinkingLevel": "Unused: memory steps always request thinking off.",
406
397
  "memory.intervention.enabled": "Master switch for rules-only and model-backed task memory.",
407
398
  "memory.intervention.everyNTools": "Maximum tool executions between prompted memory steps.",
408
399
  "memory.intervention.windowSteps": "Recent completed tool steps visible to the memory policy.",
@@ -422,16 +413,21 @@ const SETTINGS_DESCRIPTIONS_BY_ID = {
422
413
  "routing.agentAutomation.activeAgentRoles": "Exact agent and execution-role pairs whose agent choice may act.",
423
414
  "panes.enabled": "Default panes activation for new sessions; `--with-panes` / `--no-panes` beat it.",
424
415
  "panes.notifications": "Which terminal run states raise a pane-host toast.",
416
+ "panes.layout": "What composes itself at interactive boot: nothing, the workers dock, or workers plus files.",
417
+ "panes.workers.ratio": "Share of the width the workers dock takes, at most half.",
425
418
  "panes.journal": "Whether every dispatched run's event tail is written to disk for `clio-coder fleet view`.",
426
- "panes.yazi.enabled": "Whether `/panes open yazi` may open the files pane or one-shot chooser.",
427
- "panes.yazi.mode": "Keep Yazi beside the conversation, or close it after one selection.",
428
- "panes.yazi.profile": "Use Clio's managed pick profile or leave the operator's Yazi profile untouched.",
419
+ "panes.yazi.enabled":
420
+ "Whether `/files`, its key, and `/panes open files` may open the files pane or the one-shot pick.",
421
+ "panes.yazi.mode": "Keep the files pane beside the conversation, or close it after one selection.",
422
+ "panes.yazi.profile": "Use Clio's managed, themed engine profile or the operator's own file-manager configuration.",
429
423
  "panes.yazi.followCwd": "Push the conversation directory into an already-open companion pane.",
424
+ "panes.yazi.ratio": "Share of the height the files dock takes, at most half.",
430
425
  scope: "Alt+J and Alt+K model cycle set.",
431
426
  "modelSelector.recentLimit": "How many recently used models /model remembers.",
432
427
  "modelSelector.favorites": "Exact target/model refs pinned in /model.",
433
428
  "budget.sessionCeilingUsd": "Per-session cost cap.",
434
429
  "defaults.maxTokens": "Output tokens requested per turn, applied to every target.",
430
+ "context.toolResultMaxBytes": "Maximum bytes returned from one tool result before the full text spills to scratch.",
435
431
  "budget.concurrency": "Parallel workers allowed during dispatch.",
436
432
  "guardrails.turnToolCallBudget": "Soft per-turn tool-call budget for this chat loop.",
437
433
  "guardrails.workerToolCallCap": "Lifetime ceiling on tool calls one dispatched worker may execute.",
@@ -440,7 +436,6 @@ const SETTINGS_DESCRIPTIONS_BY_ID = {
440
436
  "guardrails.observationTurnBudgetBytes": "Shared per-turn byte pool across every observation-producing tool.",
441
437
  "guardrails.internalDispatchTimeoutMs": "Wall-clock cap for one internal generator dispatch.",
442
438
  "compaction.auto": "Auto-compact before a turn when context crosses the threshold.",
443
- "compaction.excludeLastTurns": "Recent user turns protected from observation masking.",
444
439
  "compaction.threshold": "Pressure at which compaction masks stale observations, then summarizes.",
445
440
  "context.workingSet.enabled": "Non-destructive eviction of stale tool results before a summary is ever needed.",
446
441
  "context.workingSet.policy": "Which candidates the eviction pass selects.",
@@ -463,7 +458,6 @@ const SETTINGS_DESCRIPTIONS_BY_ID = {
463
458
  "watchdog.enabled": "When enabled, a turn that changed the tree is reviewed by one read-only verifier run.",
464
459
  "watchdog.target": "Set target to route the run at a cheap local model; blank uses the session's active target.",
465
460
  "watchdog.cadenceToolCalls": "Also fire every N tool calls inside a turn; blank fires at turn end only.",
466
- theme: "Color palette. Clio ships a single tuned palette.",
467
461
  runtimePlugins: "npm packages exporting clioRuntimes: RuntimeDescriptor[].",
468
462
  "compaction.model": "Dedicated summarization model; blank uses the orchestrator.",
469
463
  "compaction.systemPrompt": "Path to a compaction prompt override; blank uses the built-in.",
@@ -485,6 +479,8 @@ const SETTINGS_HELP_BY_ID: Partial<Record<EditableSettingId, string>> = {
485
479
  "read-only observes; suggest parks non-read calls; auto-edit edits, dispatches, and runs recognized commands; full-auto runs except command substitution and system-level changes. A confirmation marked exposure=outward parks for you at suggest and auto-edit.",
486
480
  "defaults.maxTokens":
487
481
  "Clamped down to each model's max-output cap and the remaining context window. Set 0 to use per-model caps only.",
482
+ "context.toolResultMaxBytes":
483
+ "The 192KB per-turn observation pool remains authoritative. Three full 64KB results consume it, so a fourth finds it filled. Whole number of at least 4096 bytes · default: 65536 (64KB).",
488
484
  "compaction.threshold":
489
485
  "pressure = estimated tokens ÷ context window. Higher keeps more history but risks overflow before a summary runs.",
490
486
  "context.workingSet.enabled":
@@ -493,22 +489,21 @@ const SETTINGS_HELP_BY_ID: Partial<Record<EditableSettingId, string>> = {
493
489
  "structural-v1 selects by message structure; age-horizon is the older age-based rule. Legal values: structural-v1, age-horizon · default: structural-v1.",
494
490
  "context.workingSet.target":
495
491
  "An applied eviction batch keeps evicting until pressure reaches this ratio, so it sits below compaction.threshold. Greater than 0 and less than 1 · default: 0.6.",
496
- "context.workingSet.protectLastTurns":
497
- "Counted in user turns, the same unit compaction.excludeLastTurns uses. Whole number of at least 1 · default: 6.",
492
+ "context.workingSet.protectLastTurns": "Counted in user turns. Whole number of at least 1 · default: 6.",
498
493
  "context.workingSet.minEvictableTokens":
499
494
  "The floor sweep put marker break-even near 50 tokens; 200 is the churn guard. Whole number, 0 evicts anything · default: 200.",
500
495
  "guardrails.turnToolCallBudget":
501
- "Crossing it blocks further calls in the turn with a stop-and-summarize directive, and the hard interrupt ceiling sits a fixed margin above. A backstop against a model spraying unproductive calls, not a routine ceiling: a repo-wide audit legitimately runs dozens. Whole number of at least 1 · default: 60. Env override CLIO_CODER_TURN_TOOL_CALL_BUDGET beats this value.",
496
+ "Crossing it blocks further calls in the turn with a stop-and-summarize directive, and the hard interrupt ceiling sits a fixed margin above. A backstop against a model spraying unproductive calls, not a routine ceiling: a repo-wide audit legitimately runs dozens. Whole number of at least 1 · default: 60.",
502
497
  "guardrails.workerToolCallCap":
503
- "Bounds admitted calls, not attempts: a call the harness refuses never ran and never spends the cap. Dispatch takes the smaller of this and the agent recipe's own budget, so the recipe normally binds. Whole number of at least 1 · default: 150. Env override CLIO_CODER_WORKER_TOOL_CALL_CAP beats this value.",
498
+ "Bounds admitted calls, not attempts: a call the harness refuses never ran and never spends the cap. Dispatch takes the smaller of this and the agent recipe's own budget, so the recipe normally binds. Whole number of at least 1 · default: 150.",
504
499
  "guardrails.maxDispatchRuns":
505
- "Runs leaving the ring also lose their event journal directory. Whole number of at least 1 · default: 1000. Env override CLIO_CODER_MAX_DISPATCH_RUNS beats this value.",
500
+ "Runs leaving the ring also lose their event journal directory. Whole number of at least 1 · default: 1000.",
506
501
  "guardrails.readMaxBytes":
507
- "Clamped up to a 1KB floor at use. Whole number of bytes, at least 1 · default: 51200 (50KB). Env override CLIO_CODER_READ_MAX_BYTES beats this value.",
502
+ "Clamped up to a 1KB floor at use. Whole number of bytes, at least 1 · default: 51200 (50KB).",
508
503
  "guardrails.observationTurnBudgetBytes":
509
- "One pool shared by every observation-producing tool in a turn, so a single verbose tool cannot starve the rest. Whole number of bytes, at least 1 · default: 196608 (192KB). Env override CLIO_CODER_OBSERVATION_TURN_BUDGET_BYTES beats this value.",
504
+ "One pool shared by every observation-producing tool in a turn, so a single verbose tool cannot starve the rest. Whole number of bytes, at least 1 · default: 196608 (192KB).",
510
505
  "guardrails.internalDispatchTimeoutMs":
511
- "Covers the wiki documenter and the bootstrap scout. Continuous output satisfies the heartbeat watchdog and a run mid-generation spends no tool calls, so this is the only guard that ends a degenerate generator. Healthy runs finish in minutes. Whole milliseconds of at least 1 · default: 900000 (15 minutes). Env override CLIO_CODER_INTERNAL_DISPATCH_TIMEOUT_MS beats this value.",
506
+ "Covers the wiki documenter and the bootstrap scout. Continuous output satisfies the heartbeat watchdog and a run mid-generation spends no tool calls, so this is the only guard that ends a degenerate generator. Healthy runs finish in minutes. Whole milliseconds of at least 1 · default: 900000 (15 minutes).",
512
507
  "retry.streamStallMs":
513
508
  "Measured from the last token received, not from the request, so a slow-but-alive stream is never aborted. The retry then follows the same enabled/maxRetries/delay settings above. Whole milliseconds · default: 180000 (three minutes).",
514
509
  "library.catalog":
@@ -543,7 +538,7 @@ const SETTINGS_HELP_BY_ID: Partial<Record<EditableSettingId, string>> = {
543
538
  "workers.agentBindings":
544
539
  "Bind base, custom, and shadow native agents such as scout, researcher, and provenance to profiles. ACP delegation agents cannot be bound.",
545
540
  "delegation.defaults.toolGovernance":
546
- "clio-policy gates the agent through Clio's safety net; agent-managed trusts the agent; deny-all blocks every tool.",
541
+ "clio-coder-policy gates the agent through Clio's safety net; agent-managed trusts the agent; deny-all blocks every tool.",
547
542
  scope: "Choose target-level or exact target/model refs. Alt+J / Alt+K step the chat target through this list.",
548
543
  runtimePlugins: "Comma-separated package names, loaded at startup. Restart Clio after changing.",
549
544
  "terminal.notify":
@@ -596,7 +591,7 @@ const SETTINGS_VALUE_HELP_BY_ID: Partial<Record<EditableSettingId, Record<string
596
591
  false: "refuse every library network operation",
597
592
  },
598
593
  "delegation.defaults.toolGovernance": {
599
- "clio-policy": "Clio's safety policy gates the delegated agent's tools",
594
+ "clio-coder-policy": "Clio's safety policy gates the delegated agent's tools",
600
595
  "agent-managed": "the external agent governs its own tools",
601
596
  "deny-all": "block every tool the delegated agent requests",
602
597
  },
@@ -604,6 +599,13 @@ const SETTINGS_VALUE_HELP_BY_ID: Partial<Record<EditableSettingId, Record<string
604
599
  true: "compact automatically before a turn crosses the threshold",
605
600
  false: "context is only compacted when you run /context compact",
606
601
  },
602
+ // `embedded` is a declared rung with no implementation behind it yet; it
603
+ // runs as `auto` until Clio can own a pane host, and the hint says so.
604
+ "panes.enabled": {
605
+ auto: "detect a herdr session and join it as a guest; no pane host, no panes",
606
+ embedded: "not implemented yet; behaves as auto (guest mode inside herdr) until Clio can own a pane host",
607
+ off: "never detect or open a pane",
608
+ },
607
609
  "retry.enabled": {
608
610
  true: "retry transient provider errors automatically",
609
611
  false: "surface transient errors immediately without retrying",
@@ -678,7 +680,7 @@ export interface SettingsCenterItem extends SettingItem {
678
680
  label: string;
679
681
  description: string;
680
682
  section: SettingsSectionId;
681
- configPath: SettingsCenterRowId;
683
+ configPath: string;
682
684
  affordance: string;
683
685
  scope: SettingScope;
684
686
  readOnly: boolean;
@@ -776,7 +778,7 @@ function delegationAgentsAffordance(
776
778
  submenu: selectListSubmenu(
777
779
  "Delegation agents",
778
780
  choices,
779
- "An added peer runs under clio-policy governance and inherits projectContext: none.",
781
+ "An added peer runs under clio-coder-policy governance and inherits projectContext: none.",
780
782
  ),
781
783
  };
782
784
  }
@@ -930,6 +932,9 @@ const NUMBER_SETTING_RULES = {
930
932
  "guardrails.readMaxBytes": { min: 1, integer: true },
931
933
  "guardrails.observationTurnBudgetBytes": { min: 1, integer: true },
932
934
  "guardrails.internalDispatchTimeoutMs": { min: 1, integer: true },
935
+ // The config validator's bounds for both dock shares; half the axis is the cap.
936
+ "panes.workers.ratio": { min: 0.05, max: 0.5, integer: false },
937
+ "panes.yazi.ratio": { min: 0.05, max: 0.5, integer: false },
933
938
  } as const satisfies Partial<Record<EditableSettingId, NumberSettingRule>>;
934
939
 
935
940
  export type NumberSettingId = keyof typeof NUMBER_SETTING_RULES;
@@ -965,16 +970,6 @@ function parseNumberSetting(value: string, rule: NumberSettingRule): NumberSetti
965
970
  return { value: parsed };
966
971
  }
967
972
 
968
- /**
969
- * The reason a number row would refuse `value`, or null when it would apply.
970
- * This is the same check the editor and `applySettingChange` run, exposed so a
971
- * caller that bypasses the editor can still name the bound it hit.
972
- */
973
- export function describeNumberSettingRefusal(id: NumberSettingId, value: string): string | null {
974
- const outcome = parseNumberSetting(value, NUMBER_SETTING_RULES[id]);
975
- return "refusal" in outcome ? outcome.refusal : null;
976
- }
977
-
978
973
  function numberSettingNote(rule: NumberSettingRule): string {
979
974
  const noun = rule.integer ? "a whole number" : "a number";
980
975
  const clears = rule.allowBlank === true ? "; blank clears it" : "";
@@ -1368,7 +1363,7 @@ function profileTargetChoices(
1368
1363
  }
1369
1364
 
1370
1365
  function profileNameChoices(live: () => Readonly<ClioSettings>): Array<{ value: string; label: string }> {
1371
- const names = Object.keys(live().workers.profiles).sort();
1366
+ const names = Object.keys(live().fleet.profiles).sort();
1372
1367
  return names.map((name) => ({ value: name, label: name }));
1373
1368
  }
1374
1369
 
@@ -1482,13 +1477,45 @@ function scopeForId(id: EditableSettingId): SettingScope {
1482
1477
 
1483
1478
  /** Shipped default as a display string, for the "default: X" hint and the modified marker. */
1484
1479
  function defaultValueFor(id: EditableSettingId): string | undefined {
1485
- if (isRoutingPath(id)) return undefined;
1486
- const raw = getAtPath(DEFAULT_SETTINGS, id);
1480
+ const path = settingsV2PathForRow(id);
1481
+ if (isRoutingPath(path)) return undefined;
1482
+ const raw = getAtPath(DEFAULT_SETTINGS, path);
1487
1483
  if (raw === null || raw === undefined || typeof raw === "object") return undefined;
1488
1484
  if (id === "attribution.gitCommits") return raw === true ? "enabled" : "disabled";
1489
1485
  return String(raw);
1490
1486
  }
1491
1487
 
1488
+ const SETTINGS_CENTER_V2_PATH_OVERRIDES: Readonly<Record<string, string>> = {
1489
+ "workers.profiles": "fleet.profiles",
1490
+ "workers.agentBindings": "fleet.agentProfiles",
1491
+ "routing.agentAutomation.activeAgentRoles": "fleet.adaptiveRouting.agentRoles",
1492
+ "panes.enabled": "interface.panes.enabled",
1493
+ "panes.notifications": "interface.panes.notifications",
1494
+ "panes.journal": "fleet.history.journal",
1495
+ "panes.yazi.enabled": "interface.panes.files.enabled",
1496
+ "panes.yazi.mode": "interface.panes.files.mode",
1497
+ "panes.yazi.profile": "interface.panes.files.profile",
1498
+ "panes.yazi.followCwd": "interface.panes.files.followCwd",
1499
+ "panes.yazi.ratio": "interface.panes.files.ratio",
1500
+ "panes.layout": "interface.panes.layout",
1501
+ "panes.workers.ratio": "interface.panes.workers.ratio",
1502
+ "delegation.agents": "integrations.externalAgents.entries",
1503
+ keybindings: "interface.keybindings",
1504
+ };
1505
+
1506
+ /** Keep the existing Center navigation while showing and persisting only canonical v2 paths. */
1507
+ function settingsV2PathForRow(id: EditableSettingId): string {
1508
+ if (id.startsWith("workers.profiles.")) return `fleet.profiles.${id.slice("workers.profiles.".length)}`;
1509
+ if (id.startsWith("workers.agentBindings.")) return `fleet.agentProfiles.${id.slice("workers.agentBindings.".length)}`;
1510
+ const override = SETTINGS_CENTER_V2_PATH_OVERRIDES[id];
1511
+ if (override !== undefined) return override;
1512
+ for (const [v1Path, v2Path] of SETTINGS_V1_PATH_MOVES) {
1513
+ if (v1Path === id) return v2Path;
1514
+ if (v1Path === `${id}[]` && v2Path.endsWith("[]")) return v2Path.slice(0, -2);
1515
+ }
1516
+ return id;
1517
+ }
1518
+
1492
1519
  function settingItem(
1493
1520
  id: EditableSettingId,
1494
1521
  currentValue: string,
@@ -1511,7 +1538,7 @@ function settingItem(
1511
1538
  currentValue,
1512
1539
  description: options.description ?? SETTINGS_DESCRIPTIONS_BY_ID[id as keyof typeof SETTINGS_LABELS_BY_ID],
1513
1540
  section: sectionForSetting(id),
1514
- configPath: id,
1541
+ configPath: settingsV2PathForRow(id),
1515
1542
  affordance: options.affordance ?? (options.values ? cycleAffordance(options.values) : "opens picker"),
1516
1543
  scope: scopeForId(id),
1517
1544
  readOnly: options.readOnly ?? false,
@@ -1584,7 +1611,7 @@ function thinkingChoices(
1584
1611
  providers: ProvidersContract | undefined,
1585
1612
  target: string | null,
1586
1613
  model: string | null,
1587
- level: ClioSettings["orchestrator"]["thinkingLevel"],
1614
+ level: ClioSettings["chat"]["thinkingLevel"],
1588
1615
  ): { display: string; values: readonly string[] } {
1589
1616
  const resolved = providers
1590
1617
  ? resolveModelRuntimeCapabilitiesForProviders(providers, target, model, level ?? "off")?.thinking
@@ -1601,37 +1628,28 @@ function thinkingChoices(
1601
1628
  * read-only pointer rows (targets, keybindings, favorites, safety net) name the
1602
1629
  * surface that owns them so the Center has no dead-but-tappable rows.
1603
1630
  */
1604
- export function buildSettingItems(
1605
- settings: Readonly<ClioSettings>,
1606
- options?: BuildSettingItemsOptions,
1607
- ): SettingsCenterItem[] {
1631
+ function buildSettingItems(settings: Readonly<ClioSettings>, options?: BuildSettingItemsOptions): SettingsCenterItem[] {
1608
1632
  const live = options?.getSettings ?? ((): Readonly<ClioSettings> => settings);
1609
- const scopeList = settings.scope ?? [];
1633
+ const scopeList = settings.chat.modelPicker.cycleSet ?? [];
1610
1634
  const scopeText = scopeList.length > 0 ? scopeList.join(", ") : "(empty)";
1611
- const compaction = settings.compaction;
1612
- const retry = settings.retry;
1613
- const terminal = settings.terminal;
1614
- const watchdog = settings.watchdog;
1615
- const panes = settings.panes;
1635
+ const compaction = settings.context.compaction;
1636
+ const retry = settings.chat.retry;
1637
+ const terminal = settings.interface;
1638
+ const watchdog = settings.safety.review;
1639
+ const panes = settings.interface.panes;
1616
1640
  const orchestratorThinking = thinkingChoices(
1617
1641
  options?.providers,
1618
- settings.orchestrator.target,
1619
- settings.orchestrator.model,
1620
- settings.orchestrator.thinkingLevel,
1642
+ settings.chat.target,
1643
+ settings.chat.model,
1644
+ settings.chat.thinkingLevel,
1621
1645
  );
1622
1646
  const workerThinking = thinkingChoices(
1623
1647
  options?.providers,
1624
- settings.workers.default.target,
1625
- settings.workers.default.model,
1626
- settings.workers.default.thinkingLevel,
1648
+ settings.fleet.default.target,
1649
+ settings.fleet.default.model,
1650
+ settings.fleet.default.thinkingLevel,
1627
1651
  );
1628
- const backgroundThinking = thinkingChoices(
1629
- options?.providers,
1630
- settings.background.target,
1631
- settings.background.model,
1632
- settings.background.thinkingLevel,
1633
- );
1634
- const profileCount = Object.keys(settings.workers.profiles ?? {}).length;
1652
+ const profileCount = Object.keys(settings.fleet.profiles ?? {}).length;
1635
1653
  const addProfileSubmenu = chainSubmenus(
1636
1654
  textInputSubmenu("New profile name"),
1637
1655
  () => selectListSubmenu("Select the profile's target", profileTargetChoices(live, options?.providers)),
@@ -1644,34 +1662,35 @@ export function buildSettingItems(
1644
1662
  );
1645
1663
  const targetSubmenu = options?.providers ? selectTargetSubmenu(options.providers) : editTextSubmenu("Type target id");
1646
1664
  const orchestratorModelSubmenu = options?.providers
1647
- ? selectModelSubmenu(options.providers, () => live().orchestrator.target ?? undefined)
1665
+ ? selectModelSubmenu(options.providers, () => live().chat.target ?? undefined)
1648
1666
  : editTextSubmenu("Type model name");
1649
1667
  const workerModelSubmenu = options?.providers
1650
- ? selectModelSubmenu(options.providers, () => live().workers.default.target ?? undefined)
1668
+ ? selectModelSubmenu(options.providers, () => live().fleet.default.target ?? undefined)
1651
1669
  : editTextSubmenu("Type model name");
1652
1670
  const backgroundTargetSubmenu = options?.providers
1653
1671
  ? selectOptionalBackgroundTargetSubmenu(options.providers)
1654
1672
  : editTextSubmenu("Type memory target id", "Leave blank for rules-only memory.");
1655
1673
  const backgroundModelSubmenu = options?.providers
1656
- ? selectModelSubmenu(options.providers, () => live().background.target ?? undefined)
1674
+ ? selectModelSubmenu(options.providers, () => live().context.memory.target ?? undefined)
1657
1675
  : editTextSubmenu("Type memory model name");
1658
1676
  // Both are optional in the settings type, so the row falls back to the
1659
1677
  // shipped value rather than rendering a blank for a key that is in force.
1660
- const escalation = settings.workers.escalation ?? SHIPPED_ESCALATION;
1661
- const resilienceCooldownMs = settings.workers.resilienceCooldownMs ?? SHIPPED_RESILIENCE_COOLDOWN_MS;
1678
+ const escalation = settings.fleet.permissions.escalation ?? SHIPPED_ESCALATION;
1679
+ const resilienceCooldownMs = settings.fleet.retry.routeCooldownMs ?? SHIPPED_RESILIENCE_COOLDOWN_MS;
1662
1680
  const workingSet = settings.context.workingSet;
1663
- const guardrails = settings.guardrails;
1664
- const routing = settings.routing;
1665
- const library = settings.library;
1666
- const activeAgentRoles = routing.agentAutomation.activeAgentRoles;
1667
- const favorites = settings.modelSelector?.favorites ?? [];
1668
- const agents = settings.delegation?.agents ?? [];
1669
- const keybindingCount = Object.keys(settings.keybindings ?? {}).length;
1681
+ const safetyLimits = settings.safety.limits;
1682
+ const fleetLimits = settings.fleet.limits;
1683
+ const routing = settings.fleet.adaptiveRouting;
1684
+ const library = settings.integrations.library;
1685
+ const activeAgentRoles = routing.agentRoles;
1686
+ const favorites = settings.chat.modelPicker?.favorites ?? [];
1687
+ const agents = settings.integrations.externalAgents?.entries ?? [];
1688
+ const keybindingCount = Object.keys(settings.interface.keybindings ?? {}).length;
1670
1689
  return [
1671
- settingItem("autonomy", settings.autonomy, {
1690
+ settingItem("autonomy", settings.safety.autonomy, {
1672
1691
  values: ["read-only", "suggest", "auto-edit", "full-auto"],
1673
1692
  }),
1674
- settingItem("workers.onPermission", settings.workers.onPermission ?? "deny", {
1693
+ settingItem("workers.onPermission", settings.fleet.permissions.mode ?? "deny", {
1675
1694
  values: ["deny", "fail", "escalate"],
1676
1695
  }),
1677
1696
  settingItem("workers.escalation.timeoutMs", String(escalation.timeoutMs), {
@@ -1681,10 +1700,10 @@ export function buildSettingItems(
1681
1700
  settingItem("workers.escalation.fallback", escalation.fallback, {
1682
1701
  values: ["deny", "fail"],
1683
1702
  }),
1684
- settingItem("delegation.defaults.toolGovernance", settings.delegation.defaults.toolGovernance, {
1685
- values: ["clio-policy", "agent-managed", "deny-all"],
1703
+ settingItem("delegation.defaults.toolGovernance", settings.integrations.externalAgents.defaults.toolGovernance, {
1704
+ values: ["clio-coder-policy", "agent-managed", "deny-all"],
1686
1705
  }),
1687
- settingItem("skills.trustProjectCompatRoots", String(settings.skills.trustProjectCompatRoots), {
1706
+ settingItem("skills.trustProjectCompatRoots", String(settings.integrations.projectResources.trustProjectImports), {
1688
1707
  values: ["false", "true"],
1689
1708
  }),
1690
1709
  settingItem("safetyNet", "always on", {
@@ -1694,56 +1713,53 @@ export function buildSettingItems(
1694
1713
  settingItem("orchestrator.thinkingLevel", orchestratorThinking.display, {
1695
1714
  values: orchestratorThinking.values,
1696
1715
  }),
1697
- settingItem("orchestrator.target", settings.orchestrator.target ?? "(unset)", {
1716
+ settingItem("orchestrator.target", settings.chat.target ?? "(unset)", {
1698
1717
  submenu: targetSubmenu,
1699
1718
  affordance: options?.providers ? "opens picker" : "free text",
1700
1719
  }),
1701
- settingItem("orchestrator.model", settings.orchestrator.model ?? "(unset)", {
1720
+ settingItem("orchestrator.model", settings.chat.model ?? "(unset)", {
1702
1721
  submenu: orchestratorModelSubmenu,
1703
1722
  affordance: options?.providers ? "opens picker" : "free text",
1704
1723
  }),
1705
- settingItem("background.target", settings.background.target ?? "(unset — rules-only)", {
1724
+ settingItem("background.target", settings.context.memory.target ?? "(unset — rules-only)", {
1706
1725
  submenu: backgroundTargetSubmenu,
1707
1726
  affordance: options?.providers ? "opens picker" : "free text",
1708
1727
  }),
1709
- settingItem("background.model", settings.background.model ?? "(unset)", {
1728
+ settingItem("background.model", settings.context.memory.model ?? "(unset)", {
1710
1729
  submenu: backgroundModelSubmenu,
1711
1730
  affordance: options?.providers ? "opens picker" : "free text",
1712
1731
  }),
1713
- settingItem("background.thinkingLevel", backgroundThinking.display, {
1714
- values: backgroundThinking.values,
1715
- }),
1716
- settingItem("memory.intervention.enabled", String(settings.memory.intervention.enabled), {
1732
+ settingItem("memory.intervention.enabled", String(settings.context.memory.enabled), {
1717
1733
  values: ["true", "false"],
1718
1734
  }),
1719
- settingItem("memory.intervention.everyNTools", String(settings.memory.intervention.everyNTools), {
1735
+ settingItem("memory.intervention.everyNTools", String(settings.context.memory.cadenceToolCalls), {
1720
1736
  values: ["5", "10", "20", "30"],
1721
1737
  }),
1722
- settingItem("memory.intervention.windowSteps", String(settings.memory.intervention.windowSteps), {
1738
+ settingItem("memory.intervention.windowSteps", String(settings.context.memory.trajectorySteps), {
1723
1739
  values: ["4", "8", "12", "20"],
1724
1740
  }),
1725
- settingItem("memory.intervention.maxTokens", String(settings.memory.intervention.maxTokens), {
1741
+ settingItem("memory.intervention.maxTokens", String(settings.context.memory.maxOutputTokens), {
1726
1742
  values: ["100", "200", "400", "800"],
1727
1743
  }),
1728
- settingItem("memory.intervention.timeoutMs", String(settings.memory.intervention.timeoutMs), {
1744
+ settingItem("memory.intervention.timeoutMs", String(settings.context.memory.timeoutMs), {
1729
1745
  values: ["5000", "10000", "20000", "30000", "60000"],
1730
1746
  }),
1731
- settingItem("prewarm.enabled", String(settings.prewarm.enabled), {
1747
+ settingItem("prewarm.enabled", String(settings.chat.prewarm), {
1732
1748
  values: ["true", "false"],
1733
1749
  }),
1734
1750
  fleetGroupHeader("fleet.group.defaults", "Defaults"),
1735
- settingItem("workers.default.target", settings.workers.default.target ?? "(unset)", {
1751
+ settingItem("workers.default.target", settings.fleet.default.target ?? "(unset)", {
1736
1752
  submenu: targetSubmenu,
1737
1753
  affordance: options?.providers ? "opens picker" : "free text",
1738
1754
  }),
1739
- settingItem("workers.default.model", settings.workers.default.model ?? "(unset)", {
1755
+ settingItem("workers.default.model", settings.fleet.default.model ?? "(unset)", {
1740
1756
  submenu: workerModelSubmenu,
1741
1757
  affordance: options?.providers ? "opens picker" : "free text",
1742
1758
  }),
1743
1759
  settingItem("workers.default.thinkingLevel", workerThinking.display, {
1744
1760
  values: workerThinking.values,
1745
1761
  }),
1746
- settingItem("workers.maxRetries", String(settings.workers.maxRetries), {
1762
+ settingItem("workers.maxRetries", String(settings.fleet.retry.maxRetries), {
1747
1763
  values: ["0", "1", "2", "3", "5", "8"],
1748
1764
  }),
1749
1765
  settingItem("workers.resilienceCooldownMs", String(resilienceCooldownMs), {
@@ -1769,20 +1785,16 @@ export function buildSettingItems(
1769
1785
  valueSegments: [],
1770
1786
  }),
1771
1787
  fleetGroupHeader("fleet.group.route-activation", "Route activation"),
1772
- settingItem("routing.activeRoles", routing.activeRoles.length > 0 ? routing.activeRoles.join(", ") : "(none)", {
1788
+ settingItem("routing.activeRoles", routing.roles.length > 0 ? routing.roles.join(", ") : "(none)", {
1773
1789
  submenu: editEnumListSubmenu("Edit active routing roles", ACTIVE_ROUTING_ROLES),
1774
1790
  affordance: `free text from ${ACTIVE_ROUTING_ROLES.join(", ")}`,
1775
- editValue: routing.activeRoles.join(", "),
1791
+ editValue: routing.roles.join(", "),
1792
+ }),
1793
+ settingItem("routing.activePostures", routing.postures.length > 0 ? routing.postures.join(", ") : "(none)", {
1794
+ submenu: editEnumListSubmenu("Edit active routing postures", ACTIVE_ROUTING_POSTURES),
1795
+ affordance: `free text from ${ACTIVE_ROUTING_POSTURES.join(", ")}`,
1796
+ editValue: routing.postures.join(", "),
1776
1797
  }),
1777
- settingItem(
1778
- "routing.activePostures",
1779
- routing.activePostures.length > 0 ? routing.activePostures.join(", ") : "(none)",
1780
- {
1781
- submenu: editEnumListSubmenu("Edit active routing postures", ACTIVE_ROUTING_POSTURES),
1782
- affordance: `free text from ${ACTIVE_ROUTING_POSTURES.join(", ")}`,
1783
- editValue: routing.activePostures.join(", "),
1784
- },
1785
- ),
1786
1798
  settingItem(
1787
1799
  "routing.agentAutomation.activeAgentRoles",
1788
1800
  activeAgentRoles.length > 0
@@ -1796,7 +1808,12 @@ export function buildSettingItems(
1796
1808
  fleetGroupHeader("fleet.group.panes", "Panes"),
1797
1809
  settingItem("panes.enabled", panes.enabled, { values: ["auto", "embedded", "off"] }),
1798
1810
  settingItem("panes.notifications", panes.notifications, { values: ["failures", "all", "off"] }),
1799
- settingItem("panes.journal", String(panes.journal), { values: ["true", "false"] }),
1811
+ settingItem("panes.layout", panes.layout, { values: ["off", "workers", "cockpit"] }),
1812
+ settingItem("panes.workers.ratio", formatThreshold(panes.workers.ratio, "0.34"), {
1813
+ submenu: editNumberSubmenu("Edit workers dock share (0.05–0.5)", "panes.workers.ratio"),
1814
+ affordance: "free text",
1815
+ }),
1816
+ settingItem("panes.journal", String(settings.fleet.history.journal), { values: ["true", "false"] }),
1800
1817
  settingItem("targets", "", {
1801
1818
  description: "Live inference target inventory and routing roles.",
1802
1819
  affordance: "column heading",
@@ -1810,21 +1827,24 @@ export function buildSettingItems(
1810
1827
  submenu: scopedModelsSubmenu(scopeList, options?.providers),
1811
1828
  affordance: "opens provider-backed checklist",
1812
1829
  }),
1813
- settingItem("modelSelector.recentLimit", String(settings.modelSelector.recentLimit), {
1830
+ settingItem("modelSelector.recentLimit", String(settings.chat.modelPicker.recentLimit), {
1814
1831
  values: ["6", "12", "20", "50"],
1815
1832
  }),
1816
1833
  settingItem("modelSelector.favorites", favorites.length > 0 ? `${favorites.length} pinned` : "(none)", {
1817
1834
  affordance: "manage in /model",
1818
1835
  readOnly: true,
1819
1836
  }),
1820
- settingItem("budget.sessionCeilingUsd", String(settings.budget.sessionCeilingUsd), {
1837
+ settingItem("budget.sessionCeilingUsd", String(settings.safety.limits.sessionCostUsd), {
1821
1838
  submenu: editNumberSubmenu("Edit session cost ceiling USD", "budget.sessionCeilingUsd"),
1822
1839
  affordance: "free text",
1823
1840
  }),
1824
- settingItem("defaults.maxTokens", String(settings.defaults.maxTokens), {
1841
+ settingItem("defaults.maxTokens", String(settings.chat.maxOutputTokens), {
1825
1842
  values: ["0", "4096", "8192", "16384", "32768", "65536", "131072"],
1826
1843
  }),
1827
- settingItem("budget.concurrency", String(settings.budget.concurrency), {
1844
+ settingItem("context.toolResultMaxBytes", String(settings.context.toolResultMaxBytes), {
1845
+ values: ["4096", "8192", "16384", "32768", "65536", "131072"],
1846
+ }),
1847
+ settingItem("budget.concurrency", String(settings.fleet.concurrency), {
1828
1848
  values: ["auto", "1", "2", "4", "8"],
1829
1849
  }),
1830
1850
  groupHeader(
@@ -1833,27 +1853,27 @@ export function buildSettingItems(
1833
1853
  "Guardrails",
1834
1854
  "Numeric backstops that bound runaway agent behavior.",
1835
1855
  ),
1836
- settingItem("guardrails.turnToolCallBudget", String(guardrails.turnToolCallBudget), {
1856
+ settingItem("guardrails.turnToolCallBudget", String(safetyLimits.chatToolCallsPerTurn), {
1837
1857
  submenu: editNumberSubmenu("Edit turn tool-call budget", "guardrails.turnToolCallBudget"),
1838
1858
  affordance: "free text",
1839
1859
  }),
1840
- settingItem("guardrails.workerToolCallCap", String(guardrails.workerToolCallCap), {
1860
+ settingItem("guardrails.workerToolCallCap", String(fleetLimits.toolCallsPerRun), {
1841
1861
  submenu: editNumberSubmenu("Edit worker tool-call cap", "guardrails.workerToolCallCap"),
1842
1862
  affordance: "free text",
1843
1863
  }),
1844
- settingItem("guardrails.maxDispatchRuns", String(guardrails.maxDispatchRuns), {
1864
+ settingItem("guardrails.maxDispatchRuns", String(settings.fleet.history.maxRuns), {
1845
1865
  submenu: editNumberSubmenu("Edit run ledger retention", "guardrails.maxDispatchRuns"),
1846
1866
  affordance: "free text",
1847
1867
  }),
1848
- settingItem("guardrails.readMaxBytes", String(guardrails.readMaxBytes), {
1868
+ settingItem("guardrails.readMaxBytes", String(safetyLimits.readBytesPerCall), {
1849
1869
  submenu: editNumberSubmenu("Edit read byte cap", "guardrails.readMaxBytes"),
1850
1870
  affordance: "free text",
1851
1871
  }),
1852
- settingItem("guardrails.observationTurnBudgetBytes", String(guardrails.observationTurnBudgetBytes), {
1872
+ settingItem("guardrails.observationTurnBudgetBytes", String(safetyLimits.observationBytesPerTurn), {
1853
1873
  submenu: editNumberSubmenu("Edit observation byte pool", "guardrails.observationTurnBudgetBytes"),
1854
1874
  affordance: "free text",
1855
1875
  }),
1856
- settingItem("guardrails.internalDispatchTimeoutMs", String(guardrails.internalDispatchTimeoutMs), {
1876
+ settingItem("guardrails.internalDispatchTimeoutMs", String(fleetLimits.internalRunTimeoutMs), {
1857
1877
  submenu: editNumberSubmenu("Edit internal dispatch timeout (ms)", "guardrails.internalDispatchTimeoutMs"),
1858
1878
  affordance: "free text",
1859
1879
  }),
@@ -1863,9 +1883,6 @@ export function buildSettingItems(
1863
1883
  settingItem("compaction.threshold", formatThreshold(compaction.threshold), {
1864
1884
  values: ["0.7", "0.8", "0.85", "0.9"],
1865
1885
  }),
1866
- settingItem("compaction.excludeLastTurns", String(compaction.excludeLastTurns), {
1867
- values: ["3", "6", "10", "15"],
1868
- }),
1869
1886
  groupHeader(
1870
1887
  "compaction.group.working-set",
1871
1888
  "compaction",
@@ -1902,13 +1919,13 @@ export function buildSettingItems(
1902
1919
  settingItem("retry.streamStallMs", String(retry.streamStallMs), {
1903
1920
  values: ["60000", "120000", "180000", "300000", "600000"],
1904
1921
  }),
1905
- settingItem("terminal.showTerminalProgress", String(terminal.showTerminalProgress), {
1922
+ settingItem("terminal.showTerminalProgress", String(terminal.terminalProgress), {
1906
1923
  values: ["false", "true"],
1907
1924
  }),
1908
- settingItem("terminal.outputVerbosity", terminal.outputVerbosity, {
1925
+ settingItem("terminal.outputVerbosity", terminal.outputDetail, {
1909
1926
  values: ["minimal", "default", "verbose"],
1910
1927
  }),
1911
- settingItem("terminal.tuiMode", terminal.tuiMode, {
1928
+ settingItem("terminal.tuiMode", terminal.mode, {
1912
1929
  values: ["regular", "fullscreen"],
1913
1930
  }),
1914
1931
  settingItem("terminal.fullscreenScrollbar", terminal.fullscreenScrollbar, {
@@ -1917,18 +1934,18 @@ export function buildSettingItems(
1917
1934
  settingItem("terminal.smoothStreaming", terminal.smoothStreaming, {
1918
1935
  values: ["off", "auto", "on"],
1919
1936
  }),
1920
- settingItem("terminal.notify", String(terminal.notify), {
1937
+ settingItem("terminal.notify", String(terminal.desktopNotifications), {
1921
1938
  values: ["false", "true"],
1922
1939
  }),
1923
- settingItem("theme", settings.theme, {
1924
- affordance: "single clio-coder palette",
1925
- readOnly: true,
1926
- }),
1927
1940
  terminalGroupHeader("terminal.group.files-pane", "Files pane"),
1928
- settingItem("panes.yazi.enabled", String(panes.yazi.enabled), { values: ["true", "false"] }),
1929
- settingItem("panes.yazi.mode", panes.yazi.mode, { values: ["companion", "chooser"] }),
1930
- settingItem("panes.yazi.profile", panes.yazi.profile, { values: ["managed", "user"] }),
1931
- settingItem("panes.yazi.followCwd", String(panes.yazi.followCwd), { values: ["true", "false"] }),
1941
+ settingItem("panes.yazi.enabled", String(panes.files.enabled), { values: ["true", "false"] }),
1942
+ settingItem("panes.yazi.mode", panes.files.mode, { values: ["companion", "chooser"] }),
1943
+ settingItem("panes.yazi.profile", panes.files.profile, { values: ["managed", "user"] }),
1944
+ settingItem("panes.yazi.followCwd", String(panes.files.followCwd), { values: ["true", "false"] }),
1945
+ settingItem("panes.yazi.ratio", formatThreshold(panes.files.ratio, "0.3"), {
1946
+ submenu: editNumberSubmenu("Edit files dock share (0.05–0.5)", "panes.yazi.ratio"),
1947
+ affordance: "free text",
1948
+ }),
1932
1949
  settingItem("watchdog.enabled", String(watchdog.enabled), {
1933
1950
  values: ["false", "true"],
1934
1951
  }),
@@ -1952,11 +1969,15 @@ export function buildSettingItems(
1952
1969
  editValue: watchdog.cadenceToolCalls === undefined ? "" : String(watchdog.cadenceToolCalls),
1953
1970
  },
1954
1971
  ),
1955
- settingItem("runtimePlugins", settings.runtimePlugins.length > 0 ? settings.runtimePlugins.join(", ") : "(none)", {
1956
- submenu: editTextSubmenu("Edit runtime plugins comma-separated list", "Restart Clio to load changes."),
1957
- affordance: "free text",
1958
- }),
1959
- settingItem("attribution.gitCommits", settings.attribution.gitCommits ? "enabled" : "disabled", {
1972
+ settingItem(
1973
+ "runtimePlugins",
1974
+ settings.integrations.runtimePlugins.length > 0 ? settings.integrations.runtimePlugins.join(", ") : "(none)",
1975
+ {
1976
+ submenu: editTextSubmenu("Edit runtime plugins comma-separated list", "Restart Clio to load changes."),
1977
+ affordance: "free text",
1978
+ },
1979
+ ),
1980
+ settingItem("attribution.gitCommits", settings.integrations.git.commitAttribution ? "enabled" : "disabled", {
1960
1981
  values: ["enabled", "disabled"],
1961
1982
  }),
1962
1983
  settingItem("compaction.model", compaction.model ?? "(orchestrator target)", {
@@ -1967,18 +1988,30 @@ export function buildSettingItems(
1967
1988
  submenu: editTextSubmenu("Edit compaction prompt path; blank uses the built-in"),
1968
1989
  affordance: "free text",
1969
1990
  }),
1970
- settingItem("delegation.defaults.connectTimeoutMs", String(settings.delegation.defaults.connectTimeoutMs), {
1971
- submenu: editNumberSubmenu("Edit delegate connect timeout (ms)", "delegation.defaults.connectTimeoutMs"),
1972
- affordance: "free text",
1973
- }),
1974
- settingItem("delegation.defaults.turnTimeoutMs", String(settings.delegation.defaults.turnTimeoutMs), {
1975
- submenu: editNumberSubmenu("Edit delegate turn timeout (ms)", "delegation.defaults.turnTimeoutMs"),
1976
- affordance: "free text",
1977
- }),
1978
- settingItem("delegation.defaults.permissionTimeoutMs", String(settings.delegation.defaults.permissionTimeoutMs), {
1979
- submenu: editNumberSubmenu("Edit delegate permission timeout (ms)", "delegation.defaults.permissionTimeoutMs"),
1980
- affordance: "free text",
1981
- }),
1991
+ settingItem(
1992
+ "delegation.defaults.connectTimeoutMs",
1993
+ String(settings.integrations.externalAgents.defaults.connectTimeoutMs),
1994
+ {
1995
+ submenu: editNumberSubmenu("Edit delegate connect timeout (ms)", "delegation.defaults.connectTimeoutMs"),
1996
+ affordance: "free text",
1997
+ },
1998
+ ),
1999
+ settingItem(
2000
+ "delegation.defaults.turnTimeoutMs",
2001
+ String(settings.integrations.externalAgents.defaults.turnTimeoutMs),
2002
+ {
2003
+ submenu: editNumberSubmenu("Edit delegate turn timeout (ms)", "delegation.defaults.turnTimeoutMs"),
2004
+ affordance: "free text",
2005
+ },
2006
+ ),
2007
+ settingItem(
2008
+ "delegation.defaults.permissionTimeoutMs",
2009
+ String(settings.integrations.externalAgents.defaults.permissionTimeoutMs),
2010
+ {
2011
+ submenu: editNumberSubmenu("Edit delegate permission timeout (ms)", "delegation.defaults.permissionTimeoutMs"),
2012
+ affordance: "free text",
2013
+ },
2014
+ ),
1982
2015
  settingItem("keybindings", keybindingCount > 0 ? `${keybindingCount} override(s)` : "(defaults)", {
1983
2016
  affordance: "edit settings.yaml",
1984
2017
  readOnly: true,
@@ -2020,7 +2053,7 @@ function fleetProfileRows(
2020
2053
  options: BuildSettingItemsOptions | undefined,
2021
2054
  ): SettingsCenterItem[] {
2022
2055
  const providers = options?.providers;
2023
- return Object.entries(settings.workers.profiles)
2056
+ return Object.entries(settings.fleet.profiles)
2024
2057
  .sort(([a], [b]) => a.localeCompare(b))
2025
2058
  .map(([name, profile]) => {
2026
2059
  const thinking = thinkingChoices(providers, profile.target, profile.model, profile.thinkingLevel);
@@ -2030,7 +2063,7 @@ function fleetProfileRows(
2030
2063
  const summary = `${target}/${model} ${thinking.display} ${placement}`;
2031
2064
  const compactThinking = truncateProfileFact(thinking.display, 7);
2032
2065
  const compactPlacement = truncateProfileFact(placement, 7);
2033
- const route = target === settings.workers.default.target ? model : `${target}/${model}`;
2066
+ const route = target === settings.fleet.default.target ? model : `${target}/${model}`;
2034
2067
  const routeBudget = Math.max(
2035
2068
  8,
2036
2069
  PROFILE_SUMMARY_VALUE_BUDGET -
@@ -2042,7 +2075,7 @@ function fleetProfileRows(
2042
2075
  return settingItem(`workers.profiles.${name}`, summary, {
2043
2076
  label: name,
2044
2077
  description: `Profile ${name}. Enter to edit its target, model, thinking level, placement, or remove it.`,
2045
- help: ["target", "model", "thinkingLevel", "node"].map((field) => `workers.profiles.${name}.${field}`).join(" · "),
2078
+ help: ["target", "model", "thinkingLevel", "node"].map((field) => `fleet.profiles.${name}.${field}`).join(" · "),
2046
2079
  submenu: profileWorkbenchSubmenu(name, settings, live, options),
2047
2080
  affordance: "Enter: drill into profile fields",
2048
2081
  valueSegments: [
@@ -2078,7 +2111,7 @@ function profileWorkbenchSubmenu(
2078
2111
  done();
2079
2112
  return;
2080
2113
  }
2081
- const profile = live().workers.profiles[name];
2114
+ const profile = live().fleet.profiles[name];
2082
2115
  if (!profile) {
2083
2116
  done();
2084
2117
  return;
@@ -2099,7 +2132,7 @@ function profileWorkbenchSubmenu(
2099
2132
  }
2100
2133
  if (field === "model") {
2101
2134
  const submenu = options?.providers
2102
- ? selectModelSubmenu(options.providers, () => live().workers.profiles[name]?.target ?? undefined)
2135
+ ? selectModelSubmenu(options.providers, () => live().fleet.profiles[name]?.target ?? undefined)
2103
2136
  : editTextSubmenu("Type model name");
2104
2137
  active = submenu(profile.model ?? "(unset)", finish);
2105
2138
  return;
@@ -2147,10 +2180,10 @@ function profileNodeChoices(
2147
2180
  }
2148
2181
 
2149
2182
  function agentBindingRows(settings: Readonly<ClioSettings>, live: () => Readonly<ClioSettings>): SettingsCenterItem[] {
2150
- return Object.entries(settings.workers.agentBindings)
2183
+ return Object.entries(settings.fleet.agentProfiles)
2151
2184
  .sort(([a], [b]) => a.localeCompare(b))
2152
2185
  .map(([agentId, profileName]) => {
2153
- const missing = !settings.workers.profiles[profileName];
2186
+ const missing = !settings.fleet.profiles[profileName];
2154
2187
  return settingItem(`workers.agentBindings.${agentId}`, profileName, {
2155
2188
  label: `${agentId} · profile`,
2156
2189
  description: missing
@@ -2173,9 +2206,9 @@ function targetRows(
2173
2206
  return settings.targets.map((target) => {
2174
2207
  const status = statuses.get(target.id);
2175
2208
  const roles = [
2176
- settings.orchestrator.target === target.id ? "chat" : null,
2177
- settings.workers.default.target === target.id ? "fleet" : null,
2178
- settings.background.target === target.id ? "memory" : null,
2209
+ settings.chat.target === target.id ? "chat" : null,
2210
+ settings.fleet.default.target === target.id ? "fleet" : null,
2211
+ settings.context.memory.target === target.id ? "memory" : null,
2179
2212
  ].filter((role) => role !== null);
2180
2213
  const health = status?.health.status ?? "unknown";
2181
2214
  const operation = options?.getTargetOperation?.(target.id) ?? null;
@@ -2288,7 +2321,7 @@ function fleetEndpointRows(providers: ProvidersContract | undefined): SettingsCe
2288
2321
  });
2289
2322
  }
2290
2323
 
2291
- export function buildSettingsSections(items: readonly SettingsCenterItem[]): SettingsCenterSection[] {
2324
+ function buildSettingsSections(items: readonly SettingsCenterItem[]): SettingsCenterSection[] {
2292
2325
  return SETTINGS_SECTIONS.map((section) => ({
2293
2326
  id: section.id,
2294
2327
  label: section.label,
@@ -2355,48 +2388,48 @@ function applyNumberSetting(id: NumberSettingId, value: string, set: (next: numb
2355
2388
  function applyDelegationAgentChange(settings: ClioSettings, value: string): void {
2356
2389
  if (value.startsWith(DELEGATION_REMOVE_PREFIX)) {
2357
2390
  const id = value.slice(DELEGATION_REMOVE_PREFIX.length);
2358
- settings.delegation.agents = settings.delegation.agents.filter((agent) => agent.id !== id);
2391
+ settings.integrations.externalAgents.entries = settings.integrations.externalAgents.entries.filter(
2392
+ (agent) => agent.id !== id,
2393
+ );
2359
2394
  return;
2360
2395
  }
2361
2396
  if (!value.startsWith(DELEGATION_ADD_PREFIX)) return;
2362
2397
  const kind = interopAgentKind(value.slice(DELEGATION_ADD_PREFIX.length) as InteropAgentId);
2363
2398
  if (kind?.acp === undefined) return;
2364
- const entry = delegationEntryForKind(kind, settings.delegation.defaults);
2365
- if (settings.delegation.agents.some((agent) => agent.id === entry.id)) return;
2366
- settings.delegation.agents.push(entry);
2399
+ const entry = delegationEntryForKind(kind, settings.integrations.externalAgents.defaults);
2400
+ if (settings.integrations.externalAgents.entries.some((agent) => agent.id === entry.id)) return;
2401
+ settings.integrations.externalAgents.entries.push(entry);
2367
2402
  }
2368
2403
 
2369
- export function applySettingChange(settings: ClioSettings, id: string, value: string): void {
2404
+ function applySettingChange(settings: ClioSettings, id: string, value: string): void {
2370
2405
  if (applyEntrySettingChange(settings, id, value)) return;
2371
2406
  switch (id) {
2372
2407
  case "autonomy":
2373
2408
  if (value === "read-only" || value === "suggest" || value === "auto-edit" || value === "full-auto")
2374
- settings.autonomy = value;
2409
+ settings.safety.autonomy = value;
2375
2410
  return;
2376
2411
  case "workers.onPermission":
2377
- if (value === "deny" || value === "fail" || value === "escalate") settings.workers.onPermission = value;
2412
+ if (value === "deny" || value === "fail" || value === "escalate") settings.fleet.permissions.mode = value;
2378
2413
  return;
2379
2414
  case "delegation.defaults.toolGovernance":
2380
- if (value === "clio-policy" || value === "agent-managed" || value === "deny-all")
2381
- settings.delegation.defaults.toolGovernance = value;
2415
+ if (value === "clio-coder-policy" || value === "agent-managed" || value === "deny-all")
2416
+ settings.integrations.externalAgents.defaults.toolGovernance = value;
2382
2417
  return;
2383
2418
  case "delegation.agents":
2384
2419
  applyDelegationAgentChange(settings, value);
2385
2420
  return;
2386
2421
  case "skills.trustProjectCompatRoots":
2387
- if (value === "true" || value === "false") settings.skills.trustProjectCompatRoots = value === "true";
2422
+ if (value === "true" || value === "false")
2423
+ settings.integrations.projectResources.trustProjectImports = value === "true";
2388
2424
  return;
2389
2425
  case "attribution.gitCommits":
2390
- if (value === "enabled" || value === "disabled") settings.attribution.gitCommits = value === "enabled";
2426
+ if (value === "enabled" || value === "disabled") settings.integrations.git.commitAttribution = value === "enabled";
2391
2427
  return;
2392
2428
  case "orchestrator.thinkingLevel":
2393
- settings.orchestrator.thinkingLevel = thinkingLevelFromChoiceLabel(value) ?? settings.orchestrator.thinkingLevel;
2394
- return;
2395
- case "background.thinkingLevel":
2396
- settings.background.thinkingLevel = thinkingLevelFromChoiceLabel(value) ?? settings.background.thinkingLevel;
2429
+ settings.chat.thinkingLevel = thinkingLevelFromChoiceLabel(value) ?? settings.chat.thinkingLevel;
2397
2430
  return;
2398
2431
  case "memory.intervention.enabled":
2399
- if (value === "true" || value === "false") settings.memory.intervention.enabled = value === "true";
2432
+ if (value === "true" || value === "false") settings.context.memory.enabled = value === "true";
2400
2433
  return;
2401
2434
  case "memory.intervention.everyNTools":
2402
2435
  case "memory.intervention.windowSteps":
@@ -2404,123 +2437,139 @@ export function applySettingChange(settings: ClioSettings, id: string, value: st
2404
2437
  case "memory.intervention.timeoutMs":
2405
2438
  applyNonNegativeInteger(value, (next) => {
2406
2439
  if (next >= 1) {
2407
- const key = id.slice("memory.intervention.".length) as "everyNTools" | "windowSteps" | "maxTokens" | "timeoutMs";
2408
- settings.memory.intervention[key] = next;
2440
+ // The v1 row ids are the presentation vocabulary; the v2 fields they
2441
+ // write have their own names.
2442
+ const key = (
2443
+ {
2444
+ "memory.intervention.everyNTools": "cadenceToolCalls",
2445
+ "memory.intervention.windowSteps": "trajectorySteps",
2446
+ "memory.intervention.maxTokens": "maxOutputTokens",
2447
+ "memory.intervention.timeoutMs": "timeoutMs",
2448
+ } as const
2449
+ )[id];
2450
+ if (key) settings.context.memory[key] = next;
2409
2451
  }
2410
2452
  });
2411
2453
  return;
2412
2454
  case "workers.default.thinkingLevel":
2413
- settings.workers.default.thinkingLevel =
2414
- thinkingLevelFromChoiceLabel(value) ?? settings.workers.default.thinkingLevel;
2455
+ settings.fleet.default.thinkingLevel = thinkingLevelFromChoiceLabel(value) ?? settings.fleet.default.thinkingLevel;
2415
2456
  return;
2416
2457
  case "workers.maxRetries":
2417
2458
  applyNonNegativeInteger(value, (next) => {
2418
- settings.workers.maxRetries = next;
2459
+ settings.fleet.retry.maxRetries = next;
2419
2460
  });
2420
2461
  return;
2421
2462
  case "panes.enabled":
2422
- if (value === "auto" || value === "embedded" || value === "off") settings.panes.enabled = value;
2463
+ if (value === "auto" || value === "embedded" || value === "off") settings.interface.panes.enabled = value;
2423
2464
  return;
2424
2465
  case "panes.notifications":
2425
- if (value === "failures" || value === "all" || value === "off") settings.panes.notifications = value;
2466
+ if (value === "failures" || value === "all" || value === "off") settings.interface.panes.notifications = value;
2467
+ return;
2468
+ case "panes.layout":
2469
+ if (value === "off" || value === "workers" || value === "cockpit") settings.interface.panes.layout = value;
2470
+ return;
2471
+ case "panes.workers.ratio":
2472
+ applyNumberSetting(id, value, (next) => {
2473
+ if (next !== null) settings.interface.panes.workers.ratio = next;
2474
+ });
2475
+ return;
2476
+ case "panes.yazi.ratio":
2477
+ applyNumberSetting(id, value, (next) => {
2478
+ if (next !== null) settings.interface.panes.files.ratio = next;
2479
+ });
2426
2480
  return;
2427
2481
  case "panes.journal":
2428
- if (value === "true" || value === "false") settings.panes.journal = value === "true";
2482
+ if (value === "true" || value === "false") settings.fleet.history.journal = value === "true";
2429
2483
  return;
2430
2484
  case "panes.yazi.enabled":
2431
- if (value === "true" || value === "false") settings.panes.yazi.enabled = value === "true";
2485
+ if (value === "true" || value === "false") settings.interface.panes.files.enabled = value === "true";
2432
2486
  return;
2433
2487
  case "panes.yazi.mode":
2434
- if (value === "companion" || value === "chooser") settings.panes.yazi.mode = value;
2488
+ if (value === "companion" || value === "chooser") settings.interface.panes.files.mode = value;
2435
2489
  return;
2436
2490
  case "panes.yazi.profile":
2437
- if (value === "managed" || value === "user") settings.panes.yazi.profile = value;
2491
+ if (value === "managed" || value === "user") settings.interface.panes.files.profile = value;
2438
2492
  return;
2439
2493
  case "panes.yazi.followCwd":
2440
- if (value === "true" || value === "false") settings.panes.yazi.followCwd = value === "true";
2494
+ if (value === "true" || value === "false") settings.interface.panes.files.followCwd = value === "true";
2441
2495
  return;
2442
2496
  case "modelSelector.recentLimit":
2443
2497
  applyNonNegativeInteger(value, (next) => {
2444
- if (next >= 1) settings.modelSelector.recentLimit = next;
2498
+ if (next >= 1) settings.chat.modelPicker.recentLimit = next;
2445
2499
  });
2446
2500
  return;
2447
2501
  case "defaults.maxTokens":
2448
2502
  applyNonNegativeInteger(value, (next) => {
2449
- settings.defaults.maxTokens = next;
2503
+ settings.chat.maxOutputTokens = next;
2450
2504
  });
2451
2505
  return;
2452
2506
  case "budget.concurrency": {
2453
2507
  if (value === "auto") {
2454
- settings.budget.concurrency = "auto";
2508
+ settings.fleet.concurrency = "auto";
2455
2509
  return;
2456
2510
  }
2457
2511
  applyNonNegativeInteger(value, (next) => {
2458
- if (next >= 1) settings.budget.concurrency = next;
2512
+ if (next >= 1) settings.fleet.concurrency = next;
2459
2513
  });
2460
2514
  return;
2461
2515
  }
2462
2516
  case "compaction.auto":
2463
- if (value === "true" || value === "false") settings.compaction.auto = value === "true";
2464
- return;
2465
- case "compaction.excludeLastTurns":
2466
- applyNonNegativeInteger(value, (next) => {
2467
- if (next > 0) settings.compaction.excludeLastTurns = next;
2468
- });
2517
+ if (value === "true" || value === "false") settings.context.compaction.auto = value === "true";
2469
2518
  return;
2470
2519
  case "compaction.threshold": {
2471
2520
  const parsed = Number(value);
2472
- if (Number.isFinite(parsed) && parsed >= 0 && parsed <= 1) settings.compaction.threshold = parsed;
2521
+ if (Number.isFinite(parsed) && parsed >= 0 && parsed <= 1) settings.context.compaction.threshold = parsed;
2473
2522
  return;
2474
2523
  }
2475
2524
  case "compaction.model": {
2476
2525
  const trimmed = value.trim();
2477
- if (trimmed) settings.compaction.model = trimmed;
2478
- else delete settings.compaction.model;
2526
+ if (trimmed) settings.context.compaction.model = trimmed;
2527
+ else delete settings.context.compaction.model;
2479
2528
  return;
2480
2529
  }
2481
2530
  case "compaction.systemPrompt": {
2482
2531
  const trimmed = value.trim();
2483
- if (trimmed) settings.compaction.systemPrompt = trimmed;
2484
- else delete settings.compaction.systemPrompt;
2532
+ if (trimmed) settings.context.compaction.systemPrompt = trimmed;
2533
+ else delete settings.context.compaction.systemPrompt;
2485
2534
  return;
2486
2535
  }
2487
2536
  case "retry.enabled":
2488
- if (value === "true" || value === "false") settings.retry.enabled = value === "true";
2537
+ if (value === "true" || value === "false") settings.chat.retry.enabled = value === "true";
2489
2538
  return;
2490
2539
  case "retry.maxRetries":
2491
2540
  applyNonNegativeInteger(value, (next) => {
2492
- settings.retry.maxRetries = next;
2541
+ settings.chat.retry.maxRetries = next;
2493
2542
  });
2494
2543
  return;
2495
2544
  case "retry.baseDelayMs":
2496
2545
  applyNonNegativeInteger(value, (next) => {
2497
- settings.retry.baseDelayMs = next;
2546
+ settings.chat.retry.baseDelayMs = next;
2498
2547
  });
2499
2548
  return;
2500
2549
  case "retry.maxDelayMs":
2501
2550
  applyNonNegativeInteger(value, (next) => {
2502
- settings.retry.maxDelayMs = next;
2551
+ settings.chat.retry.maxDelayMs = next;
2503
2552
  });
2504
2553
  return;
2505
2554
  case "terminal.showTerminalProgress":
2506
- if (value === "true" || value === "false") settings.terminal.showTerminalProgress = value === "true";
2555
+ if (value === "true" || value === "false") settings.interface.terminalProgress = value === "true";
2507
2556
  return;
2508
2557
  case "terminal.outputVerbosity":
2509
- if (value === "minimal" || value === "default" || value === "verbose") settings.terminal.outputVerbosity = value;
2558
+ if (value === "minimal" || value === "default" || value === "verbose") settings.interface.outputDetail = value;
2510
2559
  return;
2511
2560
  case "terminal.tuiMode":
2512
- if (value === "regular" || value === "fullscreen") settings.terminal.tuiMode = value;
2561
+ if (value === "regular" || value === "fullscreen") settings.interface.mode = value;
2513
2562
  return;
2514
2563
  case "terminal.fullscreenScrollbar":
2515
2564
  if (value === "hidden" || value === "auto" || value === "always") {
2516
- settings.terminal.fullscreenScrollbar = value;
2565
+ settings.interface.fullscreenScrollbar = value;
2517
2566
  }
2518
2567
  return;
2519
2568
  case "terminal.notify":
2520
- if (value === "true" || value === "false") settings.terminal.notify = value === "true";
2569
+ if (value === "true" || value === "false") settings.interface.desktopNotifications = value === "true";
2521
2570
  return;
2522
2571
  case "watchdog.enabled":
2523
- if (value === "true" || value === "false") settings.watchdog.enabled = value === "true";
2572
+ if (value === "true" || value === "false") settings.safety.review.enabled = value === "true";
2524
2573
  return;
2525
2574
  // Both watchdog options are absent-by-default, and an empty submission is
2526
2575
  // how the operator says "go back to the default" from a text row. Deleting
@@ -2528,82 +2577,80 @@ export function applySettingChange(settings: ClioSettings, id: string, value: st
2528
2577
  // config validator accepts.
2529
2578
  case "watchdog.target": {
2530
2579
  const trimmed = value.trim();
2531
- if (trimmed) settings.watchdog.target = trimmed;
2532
- else delete settings.watchdog.target;
2580
+ if (trimmed) settings.safety.review.target = trimmed;
2581
+ else delete settings.safety.review.target;
2533
2582
  return;
2534
2583
  }
2535
2584
  case "watchdog.cadenceToolCalls":
2536
2585
  applyNumberSetting("watchdog.cadenceToolCalls", value, (next) => {
2537
- if (next === null) delete settings.watchdog.cadenceToolCalls;
2538
- else settings.watchdog.cadenceToolCalls = next;
2586
+ if (next === null) delete settings.safety.review.cadenceToolCalls;
2587
+ else settings.safety.review.cadenceToolCalls = next;
2539
2588
  });
2540
2589
  return;
2541
2590
  case "terminal.smoothStreaming":
2542
- if (value === "off" || value === "auto" || value === "on") settings.terminal.smoothStreaming = value;
2591
+ if (value === "off" || value === "auto" || value === "on") settings.interface.smoothStreaming = value;
2543
2592
  return;
2544
2593
  case "runtimePlugins":
2545
- settings.runtimePlugins = value
2594
+ settings.integrations.runtimePlugins = value
2546
2595
  .split(",")
2547
2596
  .map((entry) => entry.trim())
2548
2597
  .filter(Boolean);
2549
2598
  return;
2550
2599
  case "delegation.defaults.connectTimeoutMs":
2551
2600
  applyNumberSetting("delegation.defaults.connectTimeoutMs", value, (next) => {
2552
- if (next !== null) settings.delegation.defaults.connectTimeoutMs = next;
2601
+ if (next !== null) settings.integrations.externalAgents.defaults.connectTimeoutMs = next;
2553
2602
  });
2554
2603
  return;
2555
2604
  case "delegation.defaults.turnTimeoutMs":
2556
2605
  applyNumberSetting("delegation.defaults.turnTimeoutMs", value, (next) => {
2557
- if (next !== null) settings.delegation.defaults.turnTimeoutMs = next;
2606
+ if (next !== null) settings.integrations.externalAgents.defaults.turnTimeoutMs = next;
2558
2607
  });
2559
2608
  return;
2560
2609
  case "delegation.defaults.permissionTimeoutMs":
2561
2610
  applyNumberSetting("delegation.defaults.permissionTimeoutMs", value, (next) => {
2562
- if (next !== null) settings.delegation.defaults.permissionTimeoutMs = next;
2611
+ if (next !== null) settings.integrations.externalAgents.defaults.permissionTimeoutMs = next;
2563
2612
  });
2564
2613
  return;
2565
2614
  case "orchestrator.target": {
2566
2615
  const target = value === "(unset)" || value === "" ? null : value;
2567
2616
  // Switching targets re-bases the model on the new target default.
2568
- if (target !== settings.orchestrator.target) {
2569
- settings.orchestrator.model = target
2570
- ? (settings.targets.find((entry) => entry.id === target)?.defaultModel ?? null)
2571
- : null;
2617
+ if (target !== settings.chat.target) {
2618
+ settings.chat.model = target ? (settings.targets.find((entry) => entry.id === target)?.defaultModel ?? null) : null;
2572
2619
  }
2573
- settings.orchestrator.target = target;
2620
+ settings.chat.target = target;
2574
2621
  return;
2575
2622
  }
2576
2623
  case "orchestrator.model":
2577
- settings.orchestrator.model = value === "(unset)" || value === "" ? null : value;
2624
+ settings.chat.model = value === "(unset)" || value === "" ? null : value;
2578
2625
  return;
2579
2626
  case "background.target": {
2580
2627
  const target = value.startsWith("(unset") || value === "" ? null : value;
2581
- if (target !== settings.background.target) {
2582
- settings.background.model = target
2628
+ if (target !== settings.context.memory.target) {
2629
+ settings.context.memory.model = target
2583
2630
  ? (settings.targets.find((entry) => entry.id === target)?.defaultModel ?? null)
2584
2631
  : null;
2585
2632
  }
2586
- settings.background.target = target;
2633
+ settings.context.memory.target = target;
2587
2634
  return;
2588
2635
  }
2589
2636
  case "background.model":
2590
- settings.background.model = value === "(unset)" || value === "" ? null : value;
2637
+ settings.context.memory.model = value === "(unset)" || value === "" ? null : value;
2591
2638
  return;
2592
2639
  case "workers.default.target": {
2593
2640
  const target = value === "(unset)" || value === "" ? null : value;
2594
- if (target !== settings.workers.default.target) {
2595
- settings.workers.default.model = target
2641
+ if (target !== settings.fleet.default.target) {
2642
+ settings.fleet.default.model = target
2596
2643
  ? (settings.targets.find((entry) => entry.id === target)?.defaultModel ?? null)
2597
2644
  : null;
2598
2645
  }
2599
- settings.workers.default.target = target;
2646
+ settings.fleet.default.target = target;
2600
2647
  return;
2601
2648
  }
2602
2649
  case "workers.default.model":
2603
- settings.workers.default.model = value === "(unset)" || value === "" ? null : value;
2650
+ settings.fleet.default.model = value === "(unset)" || value === "" ? null : value;
2604
2651
  return;
2605
2652
  case "scope":
2606
- settings.scope =
2653
+ settings.chat.modelPicker.cycleSet =
2607
2654
  parseScopedModelSelection(value) ??
2608
2655
  value
2609
2656
  .split(",")
@@ -2612,37 +2659,43 @@ export function applySettingChange(settings: ClioSettings, id: string, value: st
2612
2659
  return;
2613
2660
  case "budget.sessionCeilingUsd":
2614
2661
  applyNumberSetting("budget.sessionCeilingUsd", value, (next) => {
2615
- if (next !== null) settings.budget.sessionCeilingUsd = next;
2662
+ if (next !== null) settings.safety.limits.sessionCostUsd = next;
2616
2663
  });
2617
2664
  return;
2618
2665
  case "workers.escalation.timeoutMs":
2619
2666
  applyNumberSetting("workers.escalation.timeoutMs", value, (next) => {
2620
2667
  if (next === null) return;
2621
- settings.workers.escalation = { ...(settings.workers.escalation ?? SHIPPED_ESCALATION), timeoutMs: next };
2668
+ settings.fleet.permissions.escalation = {
2669
+ ...(settings.fleet.permissions.escalation ?? SHIPPED_ESCALATION),
2670
+ timeoutMs: next,
2671
+ };
2622
2672
  });
2623
2673
  return;
2624
2674
  case "workers.escalation.fallback": {
2625
2675
  if (value !== "deny" && value !== "fail") return;
2626
- settings.workers.escalation = { ...(settings.workers.escalation ?? SHIPPED_ESCALATION), fallback: value };
2676
+ settings.fleet.permissions.escalation = {
2677
+ ...(settings.fleet.permissions.escalation ?? SHIPPED_ESCALATION),
2678
+ fallback: value,
2679
+ };
2627
2680
  return;
2628
2681
  }
2629
2682
  case "workers.resilienceCooldownMs":
2630
2683
  applyNumberSetting("workers.resilienceCooldownMs", value, (next) => {
2631
- if (next !== null) settings.workers.resilienceCooldownMs = next;
2684
+ if (next !== null) settings.fleet.retry.routeCooldownMs = next;
2632
2685
  });
2633
2686
  return;
2634
2687
  case "routing.activeRoles": {
2635
2688
  const outcome = parseEnumListSetting(value, ACTIVE_ROUTING_ROLES);
2636
- if ("values" in outcome) settings.routing.activeRoles = outcome.values as ActiveRoutingRole[];
2689
+ if ("values" in outcome) settings.fleet.adaptiveRouting.roles = outcome.values as ActiveRoutingRole[];
2637
2690
  return;
2638
2691
  }
2639
2692
  case "routing.activePostures": {
2640
2693
  const outcome = parseEnumListSetting(value, ACTIVE_ROUTING_POSTURES);
2641
- if ("values" in outcome) settings.routing.activePostures = outcome.values as ActiveRoutingPosture[];
2694
+ if ("values" in outcome) settings.fleet.adaptiveRouting.postures = outcome.values as ActiveRoutingPosture[];
2642
2695
  return;
2643
2696
  }
2644
2697
  case "prewarm.enabled":
2645
- if (value === "true" || value === "false") settings.prewarm.enabled = value === "true";
2698
+ if (value === "true" || value === "false") settings.chat.prewarm = value === "true";
2646
2699
  return;
2647
2700
  case "guardrails.turnToolCallBudget":
2648
2701
  case "guardrails.workerToolCallCap":
@@ -2651,7 +2704,18 @@ export function applySettingChange(settings: ClioSettings, id: string, value: st
2651
2704
  case "guardrails.observationTurnBudgetBytes":
2652
2705
  case "guardrails.internalDispatchTimeoutMs":
2653
2706
  applyNumberSetting(id, value, (next) => {
2654
- if (next !== null) settings.guardrails[id.slice("guardrails.".length) as keyof GuardrailValues] = next;
2707
+ if (next === null) return;
2708
+ if (id === "guardrails.turnToolCallBudget") settings.safety.limits.chatToolCallsPerTurn = next;
2709
+ else if (id === "guardrails.workerToolCallCap") settings.fleet.limits.toolCallsPerRun = next;
2710
+ else if (id === "guardrails.maxDispatchRuns") settings.fleet.history.maxRuns = next;
2711
+ else if (id === "guardrails.readMaxBytes") settings.safety.limits.readBytesPerCall = next;
2712
+ else if (id === "guardrails.observationTurnBudgetBytes") settings.safety.limits.observationBytesPerTurn = next;
2713
+ else settings.fleet.limits.internalRunTimeoutMs = next;
2714
+ });
2715
+ return;
2716
+ case "context.toolResultMaxBytes":
2717
+ applyNonNegativeInteger(value, (next) => {
2718
+ if (next >= 4096) settings.context.toolResultMaxBytes = next;
2655
2719
  });
2656
2720
  return;
2657
2721
  case "context.workingSet.enabled":
@@ -2679,18 +2743,18 @@ export function applySettingChange(settings: ClioSettings, id: string, value: st
2679
2743
  return;
2680
2744
  case "retry.streamStallMs":
2681
2745
  applyNonNegativeInteger(value, (next) => {
2682
- settings.retry.streamStallMs = next;
2746
+ settings.chat.retry.streamStallMs = next;
2683
2747
  });
2684
2748
  return;
2685
2749
  case "library.catalog":
2686
2750
  case "library.remote": {
2687
2751
  const key = id.slice("library.".length) as "catalog" | "remote";
2688
2752
  const trimmed = value.trim();
2689
- settings.library[key] = trimmed.length > 0 ? trimmed : null;
2753
+ settings.integrations.library[key] = trimmed.length > 0 ? trimmed : null;
2690
2754
  return;
2691
2755
  }
2692
2756
  case "library.sync":
2693
- if (value === "true" || value === "false") settings.library.sync = value === "true";
2757
+ if (value === "true" || value === "false") settings.integrations.library.sync = value === "true";
2694
2758
  return;
2695
2759
  }
2696
2760
  }
@@ -2711,11 +2775,11 @@ function applyEntrySettingChange(settings: ClioSettings, id: string, value: stri
2711
2775
  const legacySegments = id.split(".");
2712
2776
  const legacyField = legacySegments.at(-1);
2713
2777
  const usesLegacyField =
2714
- !settings.workers.profiles[summaryName] && ["target", "model", "thinkingLevel", "node"].includes(legacyField ?? "");
2778
+ !settings.fleet.profiles[summaryName] && ["target", "model", "thinkingLevel", "node"].includes(legacyField ?? "");
2715
2779
  const field = usesLegacyField ? legacyField : encoded.shift();
2716
2780
  const name = usesLegacyField ? legacySegments.slice(2, -1).join(".") : summaryName;
2717
2781
  const fieldValue = usesLegacyField ? value : encoded.join(PROFILE_FIELD_SEPARATOR);
2718
- const profile = settings.workers.profiles[name];
2782
+ const profile = settings.fleet.profiles[name];
2719
2783
  if (!profile) return true;
2720
2784
  if (value === REMOVE_PROFILE_CHOICE) {
2721
2785
  removeFleetProfileFromSettings(settings, name);
@@ -2733,7 +2797,7 @@ function applyEntrySettingChange(settings: ClioSettings, id: string, value: stri
2733
2797
  }
2734
2798
  if (id.startsWith("workers.agentBindings.")) {
2735
2799
  const agentId = id.slice("workers.agentBindings.".length);
2736
- if (value === UNBIND_CHOICE) delete settings.workers.agentBindings[agentId];
2800
+ if (value === UNBIND_CHOICE) delete settings.fleet.agentProfiles[agentId];
2737
2801
  else bindAgentProfileInSettings(settings, agentId, value);
2738
2802
  return true;
2739
2803
  }
@@ -2757,7 +2821,7 @@ function changedLeafPaths(before: Readonly<ClioSettings>, after: Readonly<ClioSe
2757
2821
  v !== null && typeof v === "object" && !Array.isArray(v);
2758
2822
  const visit = (a: unknown, b: unknown, path: string): void => {
2759
2823
  if (a === b) return;
2760
- const profileLeaf = path.startsWith("workers.profiles.") && path.split(".").length === 3;
2824
+ const profileLeaf = path.startsWith("fleet.profiles.") && path.split(".").length === 3;
2761
2825
  if (!isRecord(a) || !isRecord(b) || profileLeaf) {
2762
2826
  if (JSON.stringify(a) !== JSON.stringify(b)) out.push(path);
2763
2827
  return;
@@ -2817,9 +2881,9 @@ function propagationTiming(
2817
2881
  if (restartRequired) return "next-session";
2818
2882
  if (id.startsWith("targets.")) {
2819
2883
  if (selectedValue === "remove") return "next-dispatch";
2820
- return path.startsWith("orchestrator.") ? "now" : "next-dispatch";
2884
+ return path.startsWith("chat.") ? "now" : "next-dispatch";
2821
2885
  }
2822
- if (path.startsWith("workers.")) return "next-dispatch";
2886
+ if (path.startsWith("fleet.")) return "next-dispatch";
2823
2887
  return "now";
2824
2888
  }
2825
2889
 
@@ -2832,7 +2896,7 @@ function impactFor(propagation: SettingsChangePlan["propagation"]): string {
2832
2896
  return "takes effect now";
2833
2897
  }
2834
2898
 
2835
- export function createSettingsChangePlan(
2899
+ function createSettingsChangePlan(
2836
2900
  settings: Readonly<ClioSettings>,
2837
2901
  item: Pick<SettingsCenterItem, "id" | "label" | "currentValue" | "scope">,
2838
2902
  selectedValue: string,
@@ -3627,8 +3691,8 @@ export class SettingsCenter implements Component {
3627
3691
  list.onCancel = () => finish("cancel");
3628
3692
  const title = (width: number): string => formatScopeConfirmTitle(plan, width);
3629
3693
  const affectedBindings = plan.leaves
3630
- .filter((leaf) => leaf.path.startsWith("workers.agentBindings."))
3631
- .map((leaf) => leaf.path.slice("workers.agentBindings.".length));
3694
+ .filter((leaf) => leaf.path.startsWith("fleet.agentProfiles."))
3695
+ .map((leaf) => leaf.path.slice("fleet.agentProfiles.".length));
3632
3696
  const bindingPreflight =
3633
3697
  plan.selectedValue === REMOVE_PROFILE_CHOICE
3634
3698
  ? `Affected agent routes: ${affectedBindings.length > 0 ? affectedBindings.join(", ") : "none"} · `
@@ -3637,10 +3701,10 @@ export class SettingsCenter implements Component {
3637
3701
  if (!plan.rowId.startsWith("targets.") || plan.selectedValue !== "remove") return "";
3638
3702
  const paths = (prefix: string): string[] =>
3639
3703
  plan.leaves.filter((leaf) => leaf.path.startsWith(prefix)).map((leaf) => leaf.path);
3640
- const profiles = paths("workers.profiles.").map((path) => path.slice("workers.profiles.".length));
3704
+ const profiles = paths("fleet.profiles.").map((path) => path.slice("fleet.profiles.".length));
3641
3705
  const describe = (label: string, affected: readonly string[]): string =>
3642
3706
  `Affected ${label}: ${affected.length > 0 ? affected.join(", ") : "none"}`;
3643
- return `${describe("chat route", paths("orchestrator."))} · ${describe("fleet route", paths("workers.default."))} · ${describe("memory route", paths("background."))} · ${describe("profiles", profiles)} · `;
3707
+ return `${describe("chat route", paths("chat."))} · ${describe("fleet route", paths("fleet.default."))} · ${describe("memory route", paths("context.memory."))} · ${describe("profiles", profiles)} · `;
3644
3708
  })();
3645
3709
  const note = `${bindingPreflight}${targetRemovalPreflight}Affects ${plan.leaves.map((leaf) => leaf.path).join(", ")} · ${plan.impact}`;
3646
3710
  this.submenuComponent = new SubmenuWrapper(title, list, buildHint([{ key: "Enter", verb: "choose" }], "back"), note);
@@ -3772,7 +3836,7 @@ export class SettingsCenter implements Component {
3772
3836
  if (this.sections().length === 0) return [...head, ...this.emptyFilterLines(width, available)];
3773
3837
  // A detail page owns the work area, and the footer describes the row the
3774
3838
  // operator has already left, so it is suppressed while a submenu is open.
3775
- const footer = this.submenuComponent ? [] : this.renderFooter(width, this.footerBudget(available, width));
3839
+ const footer = this.submenuComponent ? [] : this.renderFooter(width, this.footerBudget(available));
3776
3840
  const contentHeight = Math.max(1, available - footer.length);
3777
3841
  const leftWidth = Math.min(SECTION_LANE_WIDTH, Math.max(16, Math.floor(width * 0.28)));
3778
3842
  const separator = barSep(clioTheme());
@@ -3789,19 +3853,15 @@ export class SettingsCenter implements Component {
3789
3853
  }
3790
3854
 
3791
3855
  /**
3792
- * The footer is help, and the list is the work. A fixed six-line ceiling spent
3793
- * a third of a 20-row body on prose, so the budget is what the body can spare
3794
- * once the list keeps six rows.
3795
- *
3796
- * The ceiling follows the scope note, which wraps rather than cuts: at 90
3797
- * columns that note needs two rows, and the flat four-line ceiling then paid
3798
- * for the second row out of the explanation above it. The note buys its own
3799
- * rows instead. A note that fits on one line leaves the ceiling at four, so
3800
- * every width above the wrap point renders exactly as it did.
3856
+ * The footer is the selected setting's detail surface at two-lane widths, so
3857
+ * it may use every row the list does not need. A fixed four-line ceiling left
3858
+ * a dozen blank body rows at an 80-column terminal while cutting the autonomy
3859
+ * explanation after its first sentence. Keeping six list rows makes the full
3860
+ * prose reachable when height is available and still degrades to no footer on
3861
+ * a short terminal.
3801
3862
  */
3802
- private footerBudget(bodyHeight: number, width: number): number {
3803
- const noteLines = wrapTextWithAnsi(this.footerNoteText(), Math.max(1, width)).length;
3804
- return Math.min(2 + noteLines + 1, Math.max(0, bodyHeight - 6));
3863
+ private footerBudget(bodyHeight: number): number {
3864
+ return Math.max(0, bodyHeight - 6);
3805
3865
  }
3806
3866
 
3807
3867
  private renderSectionLane(width: number, height: number): string[] {
@@ -4169,26 +4229,22 @@ export function openSettingsOverlay(tui: TUI, deps: OpenSettingsOverlayDeps): Se
4169
4229
  center.refreshItems();
4170
4230
  tui.requestRender();
4171
4231
  };
4172
- // The engine composites an overlay across the columns its region covers, and
4173
- // side margins shrink that region, so this margin is re-read every frame and
4174
- // drops to zero on an ultra-narrow terminal rather than leaving transcript
4175
- // columns beside a modal that owns the keyboard.
4176
- const margin: { top: number; right: number; bottom: number; left: number } = { ...SETTINGS_OVERLAY_MARGIN };
4177
4232
  const handle = showClioOverlayFrame(tui, center, {
4178
4233
  anchor: "top-left",
4179
4234
  width: SETTINGS_OVERLAY_WIDTH,
4180
4235
  maxHeight: SETTINGS_OVERLAY_MAX_HEIGHT,
4181
- margin,
4182
- visible: (terminalWidth) => {
4183
- const side = terminalWidth < ULTRA_NARROW_TERMINAL_WIDTH ? 0 : SETTINGS_OVERLAY_MARGIN.left;
4184
- margin.left = side;
4185
- margin.right = side;
4186
- return true;
4187
- },
4236
+ // A capturing overlay must own every horizontal cell. Leaving even a
4237
+ // two-column compositor margin exposes arbitrary transcript and footer
4238
+ // fragments beside the frame, where they read as modal content.
4239
+ margin: SETTINGS_OVERLAY_MARGIN,
4188
4240
  markerId: "settings",
4189
4241
  title: "Settings",
4190
- footerHint: (innerWidth) =>
4191
- innerWidth < WIDE_LAYOUT_MIN_WIDTH
4242
+ footerHint: (innerWidth) => {
4243
+ // The submenu renders its own authoritative choose/back legend. Keeping
4244
+ // the parent row controls in the outer border at the same time advertises
4245
+ // actions (preview, open, filter) that this input depth does not route.
4246
+ if (center.getSelection().submenuOpen) return undefined;
4247
+ return innerWidth < WIDE_LAYOUT_MIN_WIDTH
4192
4248
  ? buildHint(
4193
4249
  [
4194
4250
  { key: "↑↓", verb: "move" },
@@ -4205,7 +4261,8 @@ export function openSettingsOverlay(tui: TUI, deps: OpenSettingsOverlayDeps): Se
4205
4261
  { key: "/", verb: "filter" },
4206
4262
  ],
4207
4263
  "back",
4208
- ),
4264
+ );
4265
+ },
4209
4266
  });
4210
4267
  return Object.assign(handle, { refreshRows });
4211
4268
  }