@cleocode/cleo 2026.10.3 → 2026.10.5-rc.ci.672

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 (352) hide show
  1. package/README.md +7 -0
  2. package/bin/cleo.js +11 -1
  3. package/dist/cli/adapter-OUQRSFZL.js +159 -0
  4. package/dist/cli/add-4SRRJL4U.js +443 -0
  5. package/dist/cli/add-batch-TSWICA5J.js +164 -0
  6. package/dist/cli/admin-L3F6CDYH.js +1428 -0
  7. package/dist/cli/admin-YMU55YCU.js +341 -0
  8. package/dist/cli/adr-XESRMFMP.js +172 -0
  9. package/dist/cli/agent-TAFPIYUU.js +2404 -0
  10. package/dist/cli/agent-outputs-HVJJIPS4.js +84 -0
  11. package/dist/cli/analyze-YQ22QVGW.js +49 -0
  12. package/dist/cli/archive-W5XX6AH7.js +65 -0
  13. package/dist/cli/archive-stats-HP2KPAJU.js +101 -0
  14. package/dist/cli/attention-7JBDCRZX.js +124 -0
  15. package/dist/cli/attention-ZXZANHKC.js +168 -0
  16. package/dist/cli/audit-ICA2SEFN.js +122 -0
  17. package/dist/cli/auth-DXIG5OG7.js +491 -0
  18. package/dist/cli/backfill-LBSYBWLR.js +156 -0
  19. package/dist/cli/backup-NUGBZ7NA.js +588 -0
  20. package/dist/cli/backup-inspect-PDRXI45A.js +26 -0
  21. package/dist/cli/backup-recover-TVKAPERB.js +29 -0
  22. package/dist/cli/blockers-ZOPCGHDW.js +55 -0
  23. package/dist/cli/brain-EJOBKL4A.js +397 -0
  24. package/dist/cli/briefing-RDQJ6WHS.js +213 -0
  25. package/dist/cli/caamp-Z3XPKEHB.js +181 -0
  26. package/dist/cli/cancel-S7EHLCJN.js +85 -0
  27. package/dist/cli/canon-NPF5RODM.js +142 -0
  28. package/dist/cli/canon-docs-2GTOLF7Y.js +26 -0
  29. package/dist/cli/cant-CHNN6O57.js +239 -0
  30. package/dist/cli/changeset-RYPHPN2B.js +246 -0
  31. package/dist/cli/check-C67YAU7W.js +759 -0
  32. package/dist/cli/check-DHMURGHC.js +924 -0
  33. package/dist/cli/checkpoint-UWDFOGYQ.js +128 -0
  34. package/dist/cli/chunk-22YPFZYB.js +91 -0
  35. package/dist/cli/chunk-2MGFDMDF.js +272 -0
  36. package/dist/cli/chunk-47JYZAMS.js +30 -0
  37. package/dist/cli/chunk-4JYHPP4C.js +76 -0
  38. package/dist/cli/chunk-4PEODTHY.js +278 -0
  39. package/dist/cli/chunk-4RGSNUUP.js +950 -0
  40. package/dist/cli/chunk-4VASFLUW.js +35 -0
  41. package/dist/cli/chunk-5PNI276X.js +124 -0
  42. package/dist/cli/chunk-6JSJNYH2.js +114 -0
  43. package/dist/cli/chunk-6N6WGLXE.js +63 -0
  44. package/dist/cli/chunk-75UH3BLS.js +210 -0
  45. package/dist/cli/chunk-7ACK4EIN.js +92 -0
  46. package/dist/cli/chunk-7NMKLVMI.js +107 -0
  47. package/dist/cli/chunk-7SINJXB6.js +110 -0
  48. package/dist/cli/chunk-7UARFJYS.js +46 -0
  49. package/dist/cli/chunk-7ZYPQV4N.js +90 -0
  50. package/dist/cli/chunk-AQCYT3L4.js +72 -0
  51. package/dist/cli/chunk-BQK6XTOH.js +57 -0
  52. package/dist/cli/chunk-C3B7C43W.js +16 -0
  53. package/dist/cli/chunk-CAPAGD5E.js +98 -0
  54. package/dist/cli/chunk-CHGEDCKG.js +77 -0
  55. package/dist/cli/chunk-COXFJ3PT.js +74 -0
  56. package/dist/cli/chunk-D7BAQNV2.js +55 -0
  57. package/dist/cli/chunk-EIUXVHNF.js +258 -0
  58. package/dist/cli/chunk-EUGB6P5V.js +173 -0
  59. package/dist/cli/chunk-EW2CKNNZ.js +304 -0
  60. package/dist/cli/chunk-FSKN4DWC.js +108 -0
  61. package/dist/cli/chunk-FVKLULL7.js +48 -0
  62. package/dist/cli/chunk-GAGUBU4Z.js +280 -0
  63. package/dist/cli/chunk-GKRFH2YG.js +171 -0
  64. package/dist/cli/chunk-GRU74UE4.js +270 -0
  65. package/dist/cli/chunk-GZFVDR44.js +320 -0
  66. package/dist/cli/chunk-HFLLZE6A.js +83 -0
  67. package/dist/cli/chunk-HXRXT3XU.js +78 -0
  68. package/dist/cli/chunk-IIOGUY3B.js +258 -0
  69. package/dist/cli/chunk-ILWWL462.js +60 -0
  70. package/dist/cli/chunk-J5USPJKZ.js +48 -0
  71. package/dist/cli/chunk-KEQS36GD.js +88 -0
  72. package/dist/cli/chunk-L7ONYSV6.js +2497 -0
  73. package/dist/cli/chunk-LVGIFMCV.js +163 -0
  74. package/dist/cli/chunk-NEFMQYLE.js +656 -0
  75. package/dist/cli/chunk-NU6CQQVB.js +4501 -0
  76. package/dist/cli/chunk-OILHT47L.js +252 -0
  77. package/dist/cli/chunk-PKKZPOOP.js +352 -0
  78. package/dist/cli/chunk-PN4WW5VX.js +66 -0
  79. package/dist/cli/chunk-PSJ33WVO.js +56 -0
  80. package/dist/cli/chunk-QA6T2LQ5.js +71 -0
  81. package/dist/cli/chunk-QJJWWCIC.js +288 -0
  82. package/dist/cli/chunk-QKMBWYAS.js +93 -0
  83. package/dist/cli/chunk-QWNKLLLG.js +84 -0
  84. package/dist/cli/chunk-QWUFFDL3.js +85 -0
  85. package/dist/cli/chunk-QY76BRUZ.js +35 -0
  86. package/dist/cli/chunk-R45KVF5Y.js +117 -0
  87. package/dist/cli/chunk-RRKP7HLU.js +66 -0
  88. package/dist/cli/chunk-SXXOC6KZ.js +209 -0
  89. package/dist/cli/chunk-T6GZJYL3.js +108 -0
  90. package/dist/cli/chunk-TLQ37HRE.js +67 -0
  91. package/dist/cli/chunk-TPTNEJZJ.js +52 -0
  92. package/dist/cli/chunk-TYC7G5LF.js +100 -0
  93. package/dist/cli/chunk-UWCZY52R.js +766 -0
  94. package/dist/cli/chunk-VB3LDPL5.js +46 -0
  95. package/dist/cli/chunk-VLEYOOPH.js +31 -0
  96. package/dist/cli/chunk-W3JLYKKY.js +140 -0
  97. package/dist/cli/chunk-WWCYZYSN.js +56 -0
  98. package/dist/cli/chunk-XA5WISNV.js +52 -0
  99. package/dist/cli/chunk-XHRZ7OYZ.js +132 -0
  100. package/dist/cli/chunk-XLPMIGJJ.js +148 -0
  101. package/dist/cli/chunk-YY66LFZF.js +29 -0
  102. package/dist/cli/chunk-ZMGDZMSJ.js +210 -0
  103. package/dist/cli/claim-IGOG2QOC.js +97 -0
  104. package/dist/cli/classify-MG4N7GMQ.js +117 -0
  105. package/dist/cli/cli-A23Q335V.js +51 -0
  106. package/dist/cli/cloud-SILYJVKO.js +731 -0
  107. package/dist/cli/cockpit-RZKLGYPN.js +790 -0
  108. package/dist/cli/code-H2FQCVMW.js +178 -0
  109. package/dist/cli/complete-JLX7NBI4.js +35 -0
  110. package/dist/cli/complexity-OKV7PVZH.js +57 -0
  111. package/dist/cli/compliance-QMGZHJNQ.js +277 -0
  112. package/dist/cli/conduit-4H32UYEA.js +308 -0
  113. package/dist/cli/conduit-EY54WTZA.js +535 -0
  114. package/dist/cli/config-TDYOC7XO.js +519 -0
  115. package/dist/cli/consensus-4XCOFPPT.js +122 -0
  116. package/dist/cli/context-FN4YTGHD.js +142 -0
  117. package/dist/cli/contribution-7RWFBJLC.js +112 -0
  118. package/dist/cli/curator-HKZJCVRL.js +139 -0
  119. package/dist/cli/current-B2NU7V3G.js +43 -0
  120. package/dist/cli/daemon-GBD4TVCD.js +452 -0
  121. package/dist/cli/dash-IGDANIE5.js +71 -0
  122. package/dist/cli/decide-26SXC2V6.js +416 -0
  123. package/dist/cli/decompose-LQ76TEZG.js +78 -0
  124. package/dist/cli/decomposition-WFRWNUSJ.js +122 -0
  125. package/dist/cli/delete-T5DUQHOX.js +69 -0
  126. package/dist/cli/deps-UTPZJBXL.js +462 -0
  127. package/dist/cli/detect-FFZSMVDT.js +46 -0
  128. package/dist/cli/detect-drift-TVCJOFYJ.js +408 -0
  129. package/dist/cli/diagnostics-GN5CVD3N.js +93 -0
  130. package/dist/cli/diagnostics-ZNBKH6GX.js +133 -0
  131. package/dist/cli/docs-CLQKEEUK.js +1710 -0
  132. package/dist/cli/docs-DPPDFTWR.js +3098 -0
  133. package/dist/cli/doctor-GPENOP4N.js +1270 -0
  134. package/dist/cli/doctor-ac-bindings-S3IOEFP4.js +26 -0
  135. package/dist/cli/doctor-acceptance-drift-VNFKPBSQ.js +26 -0
  136. package/dist/cli/doctor-credentials-A5H4JMTF.js +26 -0
  137. package/dist/cli/doctor-db-substrate-FGCISE4Z.js +27 -0
  138. package/dist/cli/doctor-dep-cycles-BKKKHHYG.js +26 -0
  139. package/dist/cli/doctor-exodus-ND2DH2KP.js +26 -0
  140. package/dist/cli/doctor-exodus-residue-4EMRYMEQ.js +26 -0
  141. package/dist/cli/doctor-fk-check-VY3RIQV3.js +26 -0
  142. package/dist/cli/doctor-global-delivery-JN6IGHUL.js +26 -0
  143. package/dist/cli/doctor-heavy-command-hook-XSN44WXU.js +26 -0
  144. package/dist/cli/doctor-legacy-backups-QAG5NHYP.js +26 -0
  145. package/dist/cli/doctor-legacy-reaper-CIRGFE6R.js +26 -0
  146. package/dist/cli/doctor-malformed-ids-WL7HT4TB.js +26 -0
  147. package/dist/cli/doctor-manifest-rows-SMQCKJ2T.js +26 -0
  148. package/dist/cli/doctor-memory-guard-LJDOJG76.js +26 -0
  149. package/dist/cli/doctor-migrations-ETQPFNUP.js +26 -0
  150. package/dist/cli/doctor-nexus-residency-A4JMKBEJ.js +26 -0
  151. package/dist/cli/doctor-project-identity-FFQJ5LNX.js +26 -0
  152. package/dist/cli/doctor-projects-MFUTKRHP.js +30 -0
  153. package/dist/cli/doctor-projects-registry-76X6VTGM.js +26 -0
  154. package/dist/cli/doctor-release-readiness-QJCOPFTK.js +26 -0
  155. package/dist/cli/doctor-repair-AU76FIKY.js +26 -0
  156. package/dist/cli/doctor-row-identity-KW6JYZQE.js +26 -0
  157. package/dist/cli/doctor-skill-fixtures-G3T7JUHS.js +26 -0
  158. package/dist/cli/doctor-split-brain-FUW6L7FS.js +26 -0
  159. package/dist/cli/doctor-superseded-store-DUHGSBLC.js +26 -0
  160. package/dist/cli/doctor-sync-journal-SXMUIKF7.js +26 -0
  161. package/dist/cli/doctor-sync-triggers-6WNJZFRM.js +26 -0
  162. package/dist/cli/doctor-tool-locks-66LSLUBN.js +26 -0
  163. package/dist/cli/doctor-twin-collapse-AYBYBFC4.js +26 -0
  164. package/dist/cli/doctor-worktree-stores-C5XEH5OG.js +26 -0
  165. package/dist/cli/done-R64XRZ32.js +196 -0
  166. package/dist/cli/dynamic-RR4HB7BB.js +29 -0
  167. package/dist/cli/entities-3JIHDIOK.js +361 -0
  168. package/dist/cli/event-45KEWV5H.js +372 -0
  169. package/dist/cli/exists-BEDZS5RI.js +65 -0
  170. package/dist/cli/exodus-DUX62344.js +401 -0
  171. package/dist/cli/export-C5PQIQ5O.js +93 -0
  172. package/dist/cli/export-tasks-CUXDZPJB.js +97 -0
  173. package/dist/cli/federation-ESM35EGG.js +145 -0
  174. package/dist/cli/find-5EUZHHQJ.js +178 -0
  175. package/dist/cli/focus-6AH4KLRO.js +368 -0
  176. package/dist/cli/focus-ANKAIRO5.js +56 -0
  177. package/dist/cli/gateway-2GW2KTK3.js +77 -0
  178. package/dist/cli/gateway-auto-start-EDK7XI6E.js +36 -0
  179. package/dist/cli/gc-CTOQLUSA.js +291 -0
  180. package/dist/cli/go-YJPNHHYT.js +206 -0
  181. package/dist/cli/goal-4GW4G77D.js +213 -0
  182. package/dist/cli/grade-25WSZH4X.js +57 -0
  183. package/dist/cli/graph-JUO3TMF3.js +879 -0
  184. package/dist/cli/history-NACNUQTC.js +138 -0
  185. package/dist/cli/hook-UF7J7R6D.js +57 -0
  186. package/dist/cli/hook-entry.js +244 -19
  187. package/dist/cli/hygiene-3QZ2NI7P.js +55 -0
  188. package/dist/cli/import-7ESGL5SS.js +89 -0
  189. package/dist/cli/import-tasks-FLE2RPBR.js +109 -0
  190. package/dist/cli/index.js +601 -94637
  191. package/dist/cli/init-AN4DZ2XO.js +40 -0
  192. package/dist/cli/inject-HQWA5GWY.js +83 -0
  193. package/dist/cli/install-global-YQV4W5OG.js +95 -0
  194. package/dist/cli/intelligence-OFFNQGHE.js +238 -0
  195. package/dist/cli/intelligence-QIC4SN4X.js +182 -0
  196. package/dist/cli/issue-P5RNMRDG.js +159 -0
  197. package/dist/cli/janitor-ZNCFQ7E3.js +111 -0
  198. package/dist/cli/labels-ORBM3T57.js +88 -0
  199. package/dist/cli/lifecycle-MHR22TVI.js +273 -0
  200. package/dist/cli/list-LB6GCYYU.js +109 -0
  201. package/dist/cli/llm-H7LZWQKX.js +130 -0
  202. package/dist/cli/llm-OTJWPMGI.js +704 -0
  203. package/dist/cli/llm-cost-MLMXEAR4.js +25 -0
  204. package/dist/cli/llm-stream-AAEUNKRP.js +27 -0
  205. package/dist/cli/log-W2A5M2NA.js +76 -0
  206. package/dist/cli/login-SIXFFZSP.js +45 -0
  207. package/dist/cli/logout-G3KVLQQM.js +74 -0
  208. package/dist/cli/manifest-G4T6EBSI.js +354 -0
  209. package/dist/cli/map-VU5M72TK.js +53 -0
  210. package/dist/cli/memory-2E27G2G5.js +1952 -0
  211. package/dist/cli/memory-IAEYKXG6.js +1895 -0
  212. package/dist/cli/migrate-agents-v2-A52QIYNJ.js +33 -0
  213. package/dist/cli/migrate-claude-mem-TPDW3R4Z.js +206 -0
  214. package/dist/cli/next-SVH4LIDY.js +57 -0
  215. package/dist/cli/nexus-FPQV2EAF.js +1059 -0
  216. package/dist/cli/nexus-XSFXN5E6.js +2924 -0
  217. package/dist/cli/ops-K6LHY5J6.js +52 -0
  218. package/dist/cli/orchestrate-CZ2J6W3L.js +1650 -0
  219. package/dist/cli/orchestrate-HURUCQFT.js +950 -0
  220. package/dist/cli/otel-JCNPVJLZ.js +188 -0
  221. package/dist/cli/phase-VDFRASSO.js +221 -0
  222. package/dist/cli/pipeline-TCZPOEDR.js +697 -0
  223. package/dist/cli/pivot-V5MSQZ7L.js +88 -0
  224. package/dist/cli/plan-SQUGCKSM.js +49 -0
  225. package/dist/cli/playbook-L47GLDQD.js +230 -0
  226. package/dist/cli/playbook-NJVO4R6P.js +33 -0
  227. package/dist/cli/project-YZEC7GYF.js +331 -0
  228. package/dist/cli/promote-FINF4HVK.js +53 -0
  229. package/dist/cli/provenance-3TUWVBFR.js +141 -0
  230. package/dist/cli/provenance-YZG33JGM.js +129 -0
  231. package/dist/cli/provider-23JVLLG3.js +213 -0
  232. package/dist/cli/reason-FHN54O7O.js +138 -0
  233. package/dist/cli/reconcile-MOM5T4AX.js +128 -0
  234. package/dist/cli/refresh-memory-3OSTRAVK.js +45 -0
  235. package/dist/cli/relates-6FWUFUS2.js +260 -0
  236. package/dist/cli/release-G2DPSG5M.js +347 -0
  237. package/dist/cli/release-URX6JHZ2.js +525 -0
  238. package/dist/cli/remote-VIULU2T5.js +279 -0
  239. package/dist/cli/renderers-TGSW77J4.js +37 -0
  240. package/dist/cli/reorder-UIPN6TQY.js +87 -0
  241. package/dist/cli/reparent-ALOWWUIU.js +59 -0
  242. package/dist/cli/req-RH2Y3H7A.js +130 -0
  243. package/dist/cli/research-G2Y72HRC.js +366 -0
  244. package/dist/cli/restore-VBR5XNML.js +470 -0
  245. package/dist/cli/revert-32LDNSGP.js +240 -0
  246. package/dist/cli/roadmap-LFU3AG7D.js +62 -0
  247. package/dist/cli/run-HXRILSR7.js +245 -0
  248. package/dist/cli/safestop-Z5UC7NGQ.js +89 -0
  249. package/dist/cli/saga-Y6FZS6AM.js +286 -0
  250. package/dist/cli/schema-OOOKLWUE.js +195 -0
  251. package/dist/cli/self-update-26SOTJMH.js +504 -0
  252. package/dist/cli/selfimprove-4SMOCLUV.js +89 -0
  253. package/dist/cli/selfimprove-EB4RQLP4.js +139 -0
  254. package/dist/cli/sentient-QPETVE53.js +254 -0
  255. package/dist/cli/sentient-RGMWR4XJ.js +1088 -0
  256. package/dist/cli/sequence-H7DSAJPF.js +94 -0
  257. package/dist/cli/service-EK5MGB2D.js +156 -0
  258. package/dist/cli/service-GLOMZWPQ.js +437 -0
  259. package/dist/cli/session-HYUXAQGC.js +708 -0
  260. package/dist/cli/session-N5ISU56W.js +568 -0
  261. package/dist/cli/setup-L3YYV53D.js +323 -0
  262. package/dist/cli/show-364V3KY2.js +123 -0
  263. package/dist/cli/skill-F2KR6HW5.js +84 -0
  264. package/dist/cli/skills-FS3DCP6E.js +929 -0
  265. package/dist/cli/smoke-provider-SKUFMZXU.js +218 -0
  266. package/dist/cli/snapshot-EGXEQ5PR.js +120 -0
  267. package/dist/cli/src-LYLXHXHH.js +80 -0
  268. package/dist/cli/start-6DXOCCKL.js +68 -0
  269. package/dist/cli/stats-UVUQEGYC.js +96 -0
  270. package/dist/cli/status-XLKYLN42.js +157 -0
  271. package/dist/cli/sticky-VSTQ2I2O.js +264 -0
  272. package/dist/cli/sticky-XZXZDCFW.js +339 -0
  273. package/dist/cli/stop-VNOAFWNB.js +43 -0
  274. package/dist/cli/sync-YYPARW3A.js +155 -0
  275. package/dist/cli/tasks-C24KHTFF.js +1118 -0
  276. package/dist/cli/tasks-LBJC7CZV.js +175 -0
  277. package/dist/cli/telemetry-CU7W5WAY.js +120 -0
  278. package/dist/cli/templates-G42JBUY4.js +609 -0
  279. package/dist/cli/testing-HSRITHEY.js +147 -0
  280. package/dist/cli/token-J74E7TSU.js +221 -0
  281. package/dist/cli/tools-BI74W7VE.js +652 -0
  282. package/dist/cli/transcript-RGK7RSGQ.js +440 -0
  283. package/dist/cli/tui-BPUFHYKK.js +51 -0
  284. package/dist/cli/update-2KQWA27S.js +478 -0
  285. package/dist/cli/update-check-entry.js +124 -0
  286. package/dist/cli/update-notice-6SQ6WPQG.js +68 -0
  287. package/dist/cli/upgrade-E2MJAPC7.js +136 -0
  288. package/dist/cli/upgrade-XRSQ4RWH.js +243 -0
  289. package/dist/cli/verify-WASRGDBA.js +191 -0
  290. package/dist/cli/web-NJ3P67EU.js +275 -0
  291. package/dist/cli/workgraph-OHJ2VKJD.js +232 -0
  292. package/dist/cli/worktree-FVQLORFY.js +371 -0
  293. package/dist/cli/worktree-ZJ6JTQNG.js +287 -0
  294. package/package.json +13 -13
  295. package/studio-dist/client/_app/immutable/chunks/{DMj27Pxj.js → AH7dIemv.js} +1 -1
  296. package/studio-dist/client/_app/immutable/chunks/{Dc2owyvE.js → BDgH40i3.js} +1 -1
  297. package/studio-dist/client/_app/immutable/chunks/BXDCSJ7U.js +1 -0
  298. package/studio-dist/client/_app/immutable/chunks/{qq3pe1aT.js → Gg4iYl59.js} +1 -1
  299. package/studio-dist/client/_app/immutable/entry/{app.CHWXLeE9.js → app.DUDNK-37.js} +2 -2
  300. package/studio-dist/client/_app/immutable/entry/start.DNmZ0pA4.js +1 -0
  301. package/studio-dist/client/_app/immutable/nodes/{0.DmKQGvFh.js → 0.DWqP3ail.js} +1 -1
  302. package/studio-dist/client/_app/immutable/nodes/{1.DqJk_REO.js → 1.CZGVUP5B.js} +1 -1
  303. package/studio-dist/client/_app/immutable/nodes/{15.GUy6kdW1.js → 15.DGaflZRS.js} +1 -1
  304. package/studio-dist/client/_app/immutable/nodes/{16.CcnKZ8f9.js → 16.uYlarGXl.js} +1 -1
  305. package/studio-dist/client/_app/immutable/nodes/{17.DAlQF3lQ.js → 17.CZMR0E47.js} +1 -1
  306. package/studio-dist/client/_app/immutable/nodes/{18.vQFr-vFj.js → 18.CBC-AKH_.js} +1 -1
  307. package/studio-dist/client/_app/immutable/nodes/{20.GVOj5j_r.js → 20.BGi43MvQ.js} +1 -1
  308. package/studio-dist/client/_app/immutable/nodes/{24.2-wC6DOh.js → 24.Dv8ftCyR.js} +1 -1
  309. package/studio-dist/client/_app/immutable/nodes/25.DQPVlTDQ.js +39 -0
  310. package/studio-dist/client/_app/immutable/nodes/{26.C3rNqzZF.js → 26.Cl800304.js} +1 -1
  311. package/studio-dist/client/_app/immutable/nodes/{3.b-7pzc3M.js → 3.D_fQKj9f.js} +1 -1
  312. package/studio-dist/client/_app/version.json +1 -1
  313. package/studio-dist/server/chunks/{0-BaCce-O1.js → 0-BpOagOst.js} +3 -3
  314. package/studio-dist/server/chunks/1-D0oRGR-C.js +9 -0
  315. package/studio-dist/server/chunks/{15-DRMOSIC9.js → 15-BcjHz7Tv.js} +3 -3
  316. package/studio-dist/server/chunks/{16-BulXhoZZ.js → 16-CXm8TUk7.js} +3 -3
  317. package/studio-dist/server/chunks/{17-DUEOCM0H.js → 17-mSgUK-cp.js} +3 -3
  318. package/studio-dist/server/chunks/{18-DP7Q8zPs.js → 18-BtfnIw1d.js} +3 -3
  319. package/studio-dist/server/chunks/{20-9ta6MI7q.js → 20-By1e4QDS.js} +3 -3
  320. package/studio-dist/server/chunks/{24-DysdL1ab.js → 24-0i2YLVxG.js} +3 -3
  321. package/studio-dist/server/chunks/{dist-CdoCt9zT.js → 25-DPsrqbrh.js} +797 -10736
  322. package/studio-dist/server/chunks/{26-Df4YXgg0.js → 26-P0XkOibm.js} +3 -3
  323. package/studio-dist/server/chunks/{3-BEhOhYpL.js → 3-WudjUK7e.js} +3 -3
  324. package/studio-dist/server/chunks/{_layout.svelte-CnLcXYG-.js → _layout.svelte-D9m81Rle.js} +4 -4
  325. package/studio-dist/server/chunks/{_page.svelte-DGhXqeRc.js → _page.svelte-2PDLOF83.js} +3 -3
  326. package/studio-dist/server/chunks/{_page.svelte-Dv8tmDEC.js → _page.svelte-BjE3jm2K.js} +3 -3
  327. package/studio-dist/server/chunks/{_page.svelte-C0qgUvzA.js → _page.svelte-Clc0vmiZ.js} +4 -4
  328. package/studio-dist/server/chunks/{_page.svelte-ui7LnWkL.js → _page.svelte-DABdRT3h.js} +3 -3
  329. package/studio-dist/server/chunks/{_page.svelte-HUqTICJR.js → _page.svelte-DG3PjiHj.js} +3 -3
  330. package/studio-dist/server/chunks/{_page.svelte-DzcZljiy.js → _page.svelte-Edy9CaE8.js} +20 -7
  331. package/studio-dist/server/chunks/{_page.svelte-DOl0DGOO.js → _page.svelte-Hrf3-ZR8.js} +3 -3
  332. package/studio-dist/server/chunks/{_page.svelte-Da4q5l93.js → _page.svelte-VB4O4Nl5.js} +3 -3
  333. package/studio-dist/server/chunks/{_page.svelte-CbyEPj2j.js → _page.svelte-d3jEgjsI.js} +3 -3
  334. package/studio-dist/server/chunks/{_server.ts-P4wVVksg.js → _server.ts-BcRFsyo3.js} +4 -5
  335. package/studio-dist/server/chunks/{_server.ts-Cr57EKWf.js → _server.ts-CEWpIFrj.js} +6 -5
  336. package/studio-dist/server/chunks/{_server.ts-CnKVmf_s.js → _server.ts-CLVdVIF9.js} +2 -2
  337. package/studio-dist/server/chunks/{_server.ts-C0evMKCk.js → _server.ts-D_j7aSy5.js} +6 -5
  338. package/studio-dist/server/chunks/{_server.ts-2BazvYRP.js → _server.ts-QEZF8h2q.js} +4 -5
  339. package/studio-dist/server/chunks/{client-CPM4LrO2.js → client-Kp1dP1od.js} +2 -2
  340. package/studio-dist/server/chunks/{error.svelte-ShcZo43D.js → error.svelte-WOCioJVX.js} +3 -3
  341. package/studio-dist/server/chunks/{hooks.server-D2qbf3Zp.js → hooks.server-DH9zkIrJ.js} +3 -1
  342. package/studio-dist/server/chunks/{http-BiQjEmVU.js → http-DT5kxaWk.js} +5 -4
  343. package/studio-dist/server/chunks/{internal-Cgsrya1j.js → internal-z0vqd5_u.js} +3 -3
  344. package/studio-dist/server/chunks/operations-registry-DdzmYzqX.js +10584 -0
  345. package/studio-dist/server/chunks/{stores-BGrpEDMK.js → stores-s2kaL315.js} +2 -2
  346. package/studio-dist/server/index.js +1 -1
  347. package/studio-dist/server/manifest.js +17 -17
  348. package/studio-dist/client/_app/immutable/chunks/Bw6J8NDM.js +0 -1
  349. package/studio-dist/client/_app/immutable/entry/start.C9bwPpvc.js +0 -1
  350. package/studio-dist/client/_app/immutable/nodes/25.D1vYaH8g.js +0 -39
  351. package/studio-dist/server/chunks/1-CVo7Nk6d.js +0 -9
  352. package/studio-dist/server/chunks/25-CYsps38R.js +0 -366
@@ -0,0 +1,704 @@
1
+ (() => {
2
+ const _installed = Symbol.for('cleocode.cli.sqliteWarningFilter');
3
+ if (globalThis[_installed]) return;
4
+ globalThis[_installed] = true;
5
+ const _origEmitWarning = process.emitWarning;
6
+ process.emitWarning = function(warning, type, code, ctor) {
7
+ if (typeof warning === 'object' && warning.name === 'ExperimentalWarning' && typeof warning.message === 'string' && /SQLite is an experimental feature/i.test(warning.message)) {
8
+ return;
9
+ }
10
+ if (typeof warning === 'string' && /SQLite is an experimental feature/i.test(warning)) {
11
+ return;
12
+ }
13
+ return _origEmitWarning.call(process, warning, type, code, ctor);
14
+ };
15
+ })();
16
+ import {
17
+ costCommand
18
+ } from "./chunk-5PNI276X.js";
19
+ import {
20
+ streamCommand
21
+ } from "./chunk-ZMGDZMSJ.js";
22
+ import {
23
+ LOGIN_ARGS,
24
+ runLoginCommand
25
+ } from "./chunk-UWCZY52R.js";
26
+ import "./chunk-GZFVDR44.js";
27
+ import "./chunk-GRU74UE4.js";
28
+ import "./chunk-47JYZAMS.js";
29
+ import "./chunk-C3B7C43W.js";
30
+ import {
31
+ dispatchFromCli
32
+ } from "./chunk-L7ONYSV6.js";
33
+ import "./chunk-6N6WGLXE.js";
34
+ import "./chunk-4VASFLUW.js";
35
+ import {
36
+ defineCommand,
37
+ showUsage
38
+ } from "./chunk-PKKZPOOP.js";
39
+ import "./chunk-QKMBWYAS.js";
40
+ import {
41
+ cliError,
42
+ cliOutput,
43
+ humanLine,
44
+ isHumanOutput
45
+ } from "./chunk-4RGSNUUP.js";
46
+ import "./chunk-6JSJNYH2.js";
47
+ import "./chunk-D7BAQNV2.js";
48
+ import "./chunk-TYC7G5LF.js";
49
+
50
+ // packages/cleo/src/cli/commands/llm.ts
51
+ import { pushWarning } from "@cleocode/core";
52
+
53
+ // packages/cleo/src/cli/commands/llm-refresh-catalog.ts
54
+ import {
55
+ buildContextIndex,
56
+ fetchAndCacheCatalog,
57
+ findLatestCacheFile,
58
+ getCatalogDir,
59
+ readCacheFile
60
+ } from "@cleocode/core/llm/catalog-cache";
61
+ async function runLlmRefreshCatalog(dir) {
62
+ const cacheDir = dir ?? getCatalogDir();
63
+ try {
64
+ const { filePath, catalog } = await fetchAndCacheCatalog(cacheDir);
65
+ const index = buildContextIndex(catalog);
66
+ const providerCount = Object.keys(catalog).length;
67
+ const modelCount = Object.keys(index).length;
68
+ return {
69
+ success: true,
70
+ data: { providers: providerCount, models: modelCount, filePath, source: "live" }
71
+ };
72
+ } catch {
73
+ }
74
+ const latestPath = findLatestCacheFile(cacheDir);
75
+ if (latestPath) {
76
+ const catalog = readCacheFile(latestPath);
77
+ if (catalog) {
78
+ const index = buildContextIndex(catalog);
79
+ return {
80
+ success: true,
81
+ data: {
82
+ providers: Object.keys(catalog).length,
83
+ models: Object.keys(index).length,
84
+ filePath: latestPath,
85
+ source: "stale-cache"
86
+ }
87
+ };
88
+ }
89
+ }
90
+ return {
91
+ success: false,
92
+ error: {
93
+ message: "Failed to fetch model catalog and no cached snapshot found.",
94
+ code: "E_CATALOG_UNAVAILABLE"
95
+ }
96
+ };
97
+ }
98
+
99
+ // packages/cleo/src/cli/commands/llm.ts
100
+ async function getListProviders() {
101
+ const { listProviders } = await import(
102
+ /* webpackIgnore: true */
103
+ "@cleocode/core/llm/provider-registry"
104
+ );
105
+ return listProviders;
106
+ }
107
+ async function readApiKeyFromStdin() {
108
+ if (process.stdin.isTTY) return "";
109
+ process.stdin.setEncoding("utf-8");
110
+ let buf = "";
111
+ for await (const chunk of process.stdin) {
112
+ buf += chunk;
113
+ }
114
+ return buf.replace(/\r?\n$/, "").trim();
115
+ }
116
+ function makeLlmSubcommand(opts) {
117
+ const mergedArgs = {
118
+ ...opts.args,
119
+ json: {
120
+ type: "boolean",
121
+ description: "Output as JSON"
122
+ }
123
+ };
124
+ return defineCommand({
125
+ meta: { name: opts.name, description: opts.description },
126
+ args: mergedArgs,
127
+ async run({ args }) {
128
+ const params = opts.paramBuilder(args);
129
+ await dispatchFromCli(opts.gateway, "llm", opts.operation, params, opts.output);
130
+ }
131
+ });
132
+ }
133
+ var API_KEY_FLAG_DEPRECATION = "[warning] --api-key exposes the secret to 'ps' listings and shell history. Prefer --api-key-stdin or --api-key-env=NAME for production use.";
134
+ var addCommand = defineCommand({
135
+ meta: {
136
+ name: "add",
137
+ // Help text lists --api-key-stdin first (recommended path) and
138
+ // --api-key last (deprecated). See S-11 in T9258 for the rationale.
139
+ description: "Upsert a credential into the multi-credential pool. Reads the secret from stdin (--api-key-stdin, recommended), from an env var (--api-key-env=NAME), or as a literal flag value (--api-key, DEPRECATED \u2014 visible to ps + shell history). Auto-detects authType from token prefix (sk-ant-oat-* \u2192 oauth)."
140
+ },
141
+ args: {
142
+ provider: {
143
+ type: "positional",
144
+ description: "Provider transport (anthropic | openai | gemini | moonshot)",
145
+ required: true
146
+ },
147
+ // Recommended path — listed first to surface it in --help output.
148
+ "api-key-stdin": {
149
+ type: "boolean",
150
+ description: '(recommended) Read the API key from stdin. Example: `echo "$KEY" | cleo llm add anthropic --api-key-stdin`. Not visible to `ps` listings or shell history.'
151
+ },
152
+ // Named-env mode — second-priority. Lets users put the key in a
153
+ // .envrc / secret manager and reference it by name.
154
+ "api-key-env": {
155
+ type: "string",
156
+ description: "Read the API key from the env var named here. Example: `cleo llm add anthropic --api-key-env=ANTHROPIC_API_KEY`."
157
+ },
158
+ // Deprecated literal-value mode — last in the help order. Backward
159
+ // compat for CI scripts; emits a stderr warning when used.
160
+ "api-key": {
161
+ type: "string",
162
+ description: "(DEPRECATED) API key or OAuth bearer token as a literal flag value. Exposes the secret to `ps` and shell history. Prefer --api-key-stdin or --api-key-env=NAME."
163
+ },
164
+ label: {
165
+ type: "string",
166
+ description: "Human-readable label, unique within provider (default: 'default')"
167
+ },
168
+ "base-url": {
169
+ type: "string",
170
+ description: "Optional override for the provider base URL"
171
+ },
172
+ "auth-type": {
173
+ type: "string",
174
+ description: "Explicit auth type override ('api_key' | 'oauth' | 'aws_sdk')"
175
+ },
176
+ priority: {
177
+ type: "string",
178
+ description: "Optional priority override (lower wins)"
179
+ },
180
+ json: {
181
+ type: "boolean",
182
+ description: "Output as JSON"
183
+ }
184
+ },
185
+ async run({ args }) {
186
+ const a = args;
187
+ let apiKey = "";
188
+ let source = "none";
189
+ if (a["api-key-stdin"] === true) {
190
+ apiKey = await readApiKeyFromStdin();
191
+ source = "stdin";
192
+ if (!apiKey) {
193
+ cliError(
194
+ '--api-key-stdin set but stdin is empty or a TTY. Pipe the secret in, e.g. `echo "$KEY" | cleo llm add ...`.',
195
+ 2,
196
+ { name: "E_VALIDATION", fix: "Pipe the secret to stdin or use --api-key-env=NAME." },
197
+ { operation: "llm.add" }
198
+ );
199
+ process.exit(2);
200
+ }
201
+ } else if (typeof a["api-key-env"] === "string" && a["api-key-env"]) {
202
+ const envName = a["api-key-env"];
203
+ const envValue = process.env[envName];
204
+ if (!envValue) {
205
+ cliError(
206
+ `--api-key-env=${envName} is not set in the environment.`,
207
+ 2,
208
+ {
209
+ name: "E_VALIDATION",
210
+ fix: `Export ${envName} before running, or use --api-key-stdin.`
211
+ },
212
+ { operation: "llm.add" }
213
+ );
214
+ process.exit(2);
215
+ }
216
+ apiKey = envValue;
217
+ source = "env";
218
+ } else if (typeof a["api-key"] === "string" && a["api-key"]) {
219
+ pushWarning({
220
+ code: "W_DEPRECATED_FLAG",
221
+ message: API_KEY_FLAG_DEPRECATION,
222
+ deprecated: "--api-key=<value>",
223
+ replacement: "--api-key-stdin or --api-key-env=NAME"
224
+ });
225
+ apiKey = a["api-key"];
226
+ source = "flag";
227
+ } else {
228
+ cliError(
229
+ "cleo llm add requires one of --api-key-stdin (recommended), --api-key-env=NAME, or --api-key=<value> (deprecated).",
230
+ 2,
231
+ {
232
+ name: "E_VALIDATION",
233
+ fix: "Provide the credential via --api-key-stdin, --api-key-env=NAME, or --api-key=<value>."
234
+ },
235
+ { operation: "llm.add" }
236
+ );
237
+ process.exit(2);
238
+ }
239
+ const params = {
240
+ provider: a["provider"],
241
+ apiKey,
242
+ _source: source
243
+ // surfaces in audit logs for incident response
244
+ };
245
+ if (a["label"] !== void 0) params["label"] = a["label"];
246
+ if (a["base-url"] !== void 0) params["baseUrl"] = a["base-url"];
247
+ if (a["auth-type"] !== void 0) params["authType"] = a["auth-type"];
248
+ if (a["priority"] !== void 0) params["priority"] = Number(a["priority"]);
249
+ await dispatchFromCli("mutate", "llm", "add", params, {
250
+ command: "llm-add",
251
+ operation: "llm.add"
252
+ });
253
+ }
254
+ });
255
+ var listCommand = makeLlmSubcommand({
256
+ name: "list",
257
+ description: "List redacted credentials from the multi-credential pool (tokens shown as last 4 chars only).",
258
+ args: {
259
+ provider: {
260
+ type: "positional",
261
+ description: "Optional provider filter",
262
+ required: false
263
+ }
264
+ },
265
+ gateway: "query",
266
+ operation: "list",
267
+ output: { command: "llm-list", operation: "llm.list" },
268
+ paramBuilder: (args) => ({
269
+ ...args["provider"] !== void 0 && args["provider"] !== "" ? { provider: args["provider"] } : {}
270
+ })
271
+ });
272
+ var removeCommand = makeLlmSubcommand({
273
+ name: "remove",
274
+ description: "Delete a (provider, label) credential pair from the pool.",
275
+ args: {
276
+ provider: {
277
+ type: "positional",
278
+ description: "Provider transport",
279
+ required: true
280
+ },
281
+ label: {
282
+ type: "string",
283
+ description: "Label of the credential to remove",
284
+ required: true
285
+ }
286
+ },
287
+ gateway: "mutate",
288
+ operation: "remove",
289
+ output: { command: "llm-remove", operation: "llm.remove" },
290
+ paramBuilder: (args) => ({
291
+ provider: args["provider"],
292
+ label: args["label"]
293
+ })
294
+ });
295
+ var useCommand = makeLlmSubcommand({
296
+ name: "use",
297
+ description: "Set llm.default.{provider,model} in the global config.",
298
+ args: {
299
+ provider: {
300
+ type: "positional",
301
+ description: "Provider transport to mark as default",
302
+ required: true
303
+ },
304
+ model: {
305
+ type: "string",
306
+ description: "Optional default model identifier"
307
+ }
308
+ },
309
+ gateway: "mutate",
310
+ operation: "use",
311
+ output: { command: "llm-use", operation: "llm.use" },
312
+ paramBuilder: (args) => ({
313
+ provider: args["provider"],
314
+ ...args["model"] !== void 0 && { model: args["model"] }
315
+ })
316
+ });
317
+ var profileCommand = makeLlmSubcommand({
318
+ name: "profile",
319
+ description: "Pin a logical role (extraction | consolidation | derivation | hygiene | judgement) to a specific provider / model / credential label.",
320
+ args: {
321
+ role: {
322
+ type: "positional",
323
+ description: "Role name",
324
+ required: true
325
+ },
326
+ provider: {
327
+ type: "positional",
328
+ description: "Provider transport for this role",
329
+ required: true
330
+ },
331
+ model: {
332
+ type: "string",
333
+ description: "Optional model identifier for this role"
334
+ },
335
+ "credential-label": {
336
+ type: "string",
337
+ description: "Optional credential label to pin this role to a specific store entry"
338
+ }
339
+ },
340
+ gateway: "mutate",
341
+ operation: "profile",
342
+ output: { command: "llm-profile", operation: "llm.profile" },
343
+ paramBuilder: (args) => ({
344
+ role: args["role"],
345
+ provider: args["provider"],
346
+ ...args["model"] !== void 0 && { model: args["model"] },
347
+ ...args["credential-label"] !== void 0 && { credentialLabel: args["credential-label"] }
348
+ })
349
+ });
350
+ var testCommand = makeLlmSubcommand({
351
+ name: "test",
352
+ description: "Round-trip ping against the resolved provider (1-token prompt). Returns latency + response id; tokens never surfaced.",
353
+ args: {
354
+ provider: {
355
+ type: "positional",
356
+ description: "Provider transport to probe",
357
+ required: true
358
+ },
359
+ label: {
360
+ type: "string",
361
+ description: "Credential label to pin the test to a specific store entry"
362
+ },
363
+ model: {
364
+ type: "string",
365
+ description: "Model override (defaults to the provider's implicit fallback)"
366
+ }
367
+ },
368
+ gateway: "query",
369
+ operation: "test",
370
+ output: { command: "llm-test", operation: "llm.test" },
371
+ paramBuilder: (args) => ({
372
+ provider: args["provider"],
373
+ ...args["label"] !== void 0 && { label: args["label"] },
374
+ ...args["model"] !== void 0 && { model: args["model"] }
375
+ })
376
+ });
377
+ var whoamiCommand = makeLlmSubcommand({
378
+ name: "whoami",
379
+ description: "For each role, resolve and report which provider / model / credential would be picked today.",
380
+ args: {
381
+ role: {
382
+ type: "string",
383
+ description: "Optional role filter"
384
+ }
385
+ },
386
+ gateway: "query",
387
+ operation: "whoami",
388
+ output: { command: "llm-whoami", operation: "llm.whoami" },
389
+ paramBuilder: (args) => ({
390
+ ...args["role"] !== void 0 && args["role"] !== "" ? { role: args["role"] } : {}
391
+ })
392
+ });
393
+ var listProvidersCommand = defineCommand({
394
+ meta: {
395
+ name: "list-providers",
396
+ description: "List all registered LLM provider profiles (builtins + user plugins from $CLEO_HOME/plugins/model-providers/)."
397
+ },
398
+ args: {
399
+ json: {
400
+ type: "boolean",
401
+ description: "Output as JSON"
402
+ }
403
+ },
404
+ async run() {
405
+ const listProviders = await getListProviders();
406
+ const profiles = await listProviders();
407
+ const providers = profiles.map((p) => ({
408
+ name: p.name,
409
+ displayName: p.displayName,
410
+ authTypes: p.authTypes,
411
+ defaultModel: p.defaultModel,
412
+ baseUrl: p.baseUrl
413
+ }));
414
+ cliOutput(
415
+ { providers },
416
+ {
417
+ command: "llm-list-providers",
418
+ operation: "llm.listProviders"
419
+ }
420
+ );
421
+ }
422
+ });
423
+ var contextEnginesListCommand = defineCommand({
424
+ meta: {
425
+ name: "list",
426
+ description: "List all registered ContextEngine names (builtins + user plugins)."
427
+ },
428
+ args: {
429
+ json: {
430
+ type: "boolean",
431
+ description: "Output as JSON"
432
+ }
433
+ },
434
+ async run() {
435
+ const { listContextEngines } = await import(
436
+ /* webpackIgnore: true */
437
+ "@cleocode/core/llm/executor-factory"
438
+ );
439
+ const engines = listContextEngines();
440
+ cliOutput(
441
+ { engines: [...engines] },
442
+ {
443
+ command: "llm-context-engines-list",
444
+ operation: "llm.contextEngines.list"
445
+ }
446
+ );
447
+ }
448
+ });
449
+ var contextEnginesCommand = defineCommand({
450
+ meta: {
451
+ name: "context-engines",
452
+ description: "Manage registered ContextEngine plugins."
453
+ },
454
+ subCommands: {
455
+ list: contextEnginesListCommand
456
+ },
457
+ async run({ cmd, rawArgs }) {
458
+ const firstArg = rawArgs?.find((a) => !a.startsWith("-"));
459
+ if (firstArg && cmd.subCommands && firstArg in cmd.subCommands) return;
460
+ await showUsage(cmd);
461
+ }
462
+ });
463
+ var loginCommand = defineCommand({
464
+ meta: {
465
+ name: "login",
466
+ description: "Log in to an LLM provider and bind a usable profile (alias of `cleo login`). Picks a provider + auth method (browser OAuth: anthropic, openai/codex; device-code: kimi-code; or API key), selects a model, binds it, and validates the binding. Prompts/URLs go to stderr; the result is a human line on a terminal or a JSON envelope when piped/--json."
467
+ },
468
+ args: LOGIN_ARGS,
469
+ async run({ args }) {
470
+ await runLoginCommand(args, "llm.login");
471
+ }
472
+ });
473
+ var refreshCatalogCommand = defineCommand({
474
+ meta: {
475
+ name: "refresh-catalog",
476
+ description: "Fetch the live model catalog from models.dev and persist it to disk. Falls back to the most-recent cached snapshot on network failure."
477
+ },
478
+ args: {
479
+ json: {
480
+ type: "boolean",
481
+ description: "Output result as JSON"
482
+ }
483
+ },
484
+ async run() {
485
+ const result = await runLlmRefreshCatalog();
486
+ if (result.success && result.data) {
487
+ const d = result.data;
488
+ if (isHumanOutput()) {
489
+ humanLine(
490
+ `Catalog refreshed: ${d.providers} providers, ${d.models} models written to ${d.filePath}`
491
+ );
492
+ } else {
493
+ cliOutput(result.data, { command: "llm-refresh-catalog", operation: "llm.refreshCatalog" });
494
+ }
495
+ return;
496
+ }
497
+ if (!result.success) {
498
+ cliError(
499
+ result.error?.message ?? "refresh failed",
500
+ result.error?.code ?? 1,
501
+ { name: "E_REFRESH_FAILED" },
502
+ { operation: "llm.refreshCatalog" }
503
+ );
504
+ process.exit(1);
505
+ }
506
+ }
507
+ });
508
+ var providersCommand = defineCommand({
509
+ meta: {
510
+ name: "providers",
511
+ description: "Show provisioning state, reachability, and resolver scores for all builtin LLM providers (DHQ-081)."
512
+ },
513
+ args: {
514
+ json: {
515
+ type: "boolean",
516
+ description: "Output as JSON"
517
+ },
518
+ role: {
519
+ type: "string",
520
+ description: "Role to compute scores against (default: consolidation). One of: consolidation, judgement, hygiene, extraction, derivation."
521
+ }
522
+ },
523
+ async run({ args }) {
524
+ const { enumerateProvisionedProviders, roleTierFor } = await import(
525
+ /* webpackIgnore: true */
526
+ "@cleocode/core/llm/cross-provider-selector"
527
+ );
528
+ const typedArgs = args;
529
+ const role = typeof typedArgs["role"] === "string" ? typedArgs["role"] : "consolidation";
530
+ const taskTier = roleTierFor(role);
531
+ const providers = await enumerateProvisionedProviders(taskTier);
532
+ const provisioned = providers.filter((p) => p.provisioningState === "provisioned");
533
+ const winner = provisioned.length > 0 ? provisioned.reduce(
534
+ (best, p) => (p.resolverScore ?? -Infinity) > (best.resolverScore ?? -Infinity) ? p : best
535
+ ) : null;
536
+ const envelope = {
537
+ providers,
538
+ implicitFallbackWouldUse: "anthropic",
539
+ explainCrossProvider: {
540
+ winner: winner?.id ?? null,
541
+ scores: Object.fromEntries(providers.map((p) => [p.id, p.resolverScore ?? 0])),
542
+ reason: winner ? `${winner.id} (tier: ${winner.tier}, score: ${winner.resolverScore}) selected as best provisioned provider for role '${role}'` : `No provisioned provider found; falling back to anthropic implicit fallback`
543
+ }
544
+ };
545
+ if (isHumanOutput() && !typedArgs["json"]) {
546
+ const lines = ["", "LLM Providers \u2014 Provisioning State", "=".repeat(40)];
547
+ for (const p of providers) {
548
+ const star = p.id === winner?.id ? " \u2605" : "";
549
+ const runnable = p.machineRunnable === null ? "" : ` [local:${p.machineRunnable ? "up" : "down"}]`;
550
+ lines.push(
551
+ ` ${p.id.padEnd(12)} ${p.provisioningState.padEnd(16)} score:${String(p.resolverScore ?? "-").padStart(4)} ${p.reachabilityState}${runnable}${star}`
552
+ );
553
+ }
554
+ if (winner) {
555
+ lines.push(
556
+ "",
557
+ `Winner: ${winner.id} \u2014 would pick model: ${winner.wouldPickModel ?? "unknown"}`
558
+ );
559
+ }
560
+ humanLine(lines.join("\n"));
561
+ } else {
562
+ cliOutput(envelope, { command: "llm-providers", operation: "llm.providers" });
563
+ }
564
+ }
565
+ });
566
+ var healthCommand = defineCommand({
567
+ meta: {
568
+ name: "health",
569
+ description: "Show lightweight provisioning health for all builtin LLM providers (DHQ-081). Alias for cleo llm providers --brief."
570
+ },
571
+ args: {
572
+ json: {
573
+ type: "boolean",
574
+ description: "Output as JSON"
575
+ }
576
+ },
577
+ async run({ args }) {
578
+ const { enumerateProvisionedProviders } = await import(
579
+ /* webpackIgnore: true */
580
+ "@cleocode/core/llm/cross-provider-selector"
581
+ );
582
+ const typedArgs = args;
583
+ const providers = await enumerateProvisionedProviders("frontier");
584
+ const healthEnvelope = {
585
+ providers: providers.map((p) => ({
586
+ id: p.id,
587
+ displayName: p.displayName,
588
+ provisioningState: p.provisioningState,
589
+ reachabilityState: p.reachabilityState,
590
+ machineRunnable: p.machineRunnable
591
+ })),
592
+ implicitFallbackWouldUse: "anthropic"
593
+ };
594
+ if (isHumanOutput() && !typedArgs["json"]) {
595
+ const lines = ["", "LLM Health", "=".repeat(30)];
596
+ for (const p of healthEnvelope.providers) {
597
+ const icon = p.provisioningState === "provisioned" ? "\u2713" : "\u2717";
598
+ const runnable = p.machineRunnable === null ? "" : ` [local:${p.machineRunnable ? "up" : "down"}]`;
599
+ lines.push(
600
+ ` ${icon} ${p.id.padEnd(12)} ${p.provisioningState.padEnd(16)} ${p.reachabilityState}${runnable}`
601
+ );
602
+ }
603
+ humanLine(lines.join("\n"));
604
+ } else {
605
+ cliOutput(healthEnvelope, { command: "llm-health", operation: "llm.health" });
606
+ }
607
+ }
608
+ });
609
+ var fitCommand = defineCommand({
610
+ meta: {
611
+ name: "fit",
612
+ description: "Rank 2\u20133 best-fit local open-weight models for this machine (RAM/VRAM check). Wizard building block for local Ollama setup."
613
+ },
614
+ args: {
615
+ json: {
616
+ type: "boolean",
617
+ description: "Output as JSON (LAFS envelope)"
618
+ },
619
+ "ollama-url": {
620
+ type: "string",
621
+ description: "Override Ollama base URL (default: http://localhost:11434)"
622
+ }
623
+ },
624
+ async run({ args }) {
625
+ const { rankLocalModelFit } = await import(
626
+ /* webpackIgnore: true */
627
+ "@cleocode/core/llm/local-model-fit"
628
+ );
629
+ const typedArgs = args;
630
+ const ollamaBaseUrl = typeof typedArgs["ollama-url"] === "string" ? typedArgs["ollama-url"] : "http://localhost:11434";
631
+ const envelope = await rankLocalModelFit({ ollamaBaseUrl });
632
+ if (isHumanOutput() && !typedArgs["json"]) {
633
+ const lines = ["", "Local Model Fit \u2014 Hardware Summary", "=".repeat(42)];
634
+ const hw = envelope.hardware;
635
+ lines.push(` RAM total : ${hw.totalRamGb.toFixed(1)} GB`);
636
+ lines.push(` RAM avail : ${hw.availableRamGb.toFixed(1)} GB`);
637
+ if (hw.vramTotalGb !== null) {
638
+ lines.push(` VRAM total : ${hw.vramTotalGb.toFixed(1)} GB (${hw.vramMethod})`);
639
+ lines.push(
640
+ ` VRAM free : ${hw.vramFreeGb !== null ? hw.vramFreeGb.toFixed(1) + " GB" : "unknown"}`
641
+ );
642
+ } else {
643
+ lines.push(` VRAM : not detected (${hw.vramMethod})`);
644
+ }
645
+ lines.push(` Ollama : ${envelope.ollamaRunning ? "running" : "not running"}`);
646
+ if (envelope.pulledModels.length > 0) {
647
+ lines.push(` Pulled : ${envelope.pulledModels.map((m) => m.name).join(", ")}`);
648
+ }
649
+ lines.push("");
650
+ if (envelope.noRecommendationReason) {
651
+ lines.push(" No local model recommendations:");
652
+ lines.push(` ${envelope.noRecommendationReason}`);
653
+ } else {
654
+ lines.push("Recommended Models", "-".repeat(42));
655
+ for (let i = 0; i < envelope.recommendations.length; i++) {
656
+ const rec = envelope.recommendations[i];
657
+ const pulled = rec.alreadyPulled ? " [already pulled]" : "";
658
+ lines.push(` ${i + 1}. ${rec.candidate.displayName}${pulled} (fit: ${rec.fitTier})`);
659
+ for (const reason of rec.reasons) {
660
+ lines.push(` \u2022 ${reason}`);
661
+ }
662
+ lines.push(` pull: ${rec.pullCommand}`);
663
+ lines.push("");
664
+ }
665
+ }
666
+ humanLine(lines.join("\n"));
667
+ } else {
668
+ cliOutput(envelope, { command: "llm-fit", operation: "llm.fit" });
669
+ }
670
+ }
671
+ });
672
+ var llmCommand = defineCommand({
673
+ meta: {
674
+ name: "llm",
675
+ description: "Manage LLM credentials, role profiles, and resolver diagnostics"
676
+ },
677
+ subCommands: {
678
+ add: addCommand,
679
+ "context-engines": contextEnginesCommand,
680
+ cost: costCommand,
681
+ fit: fitCommand,
682
+ health: healthCommand,
683
+ list: listCommand,
684
+ login: loginCommand,
685
+ providers: providersCommand,
686
+ remove: removeCommand,
687
+ stream: streamCommand,
688
+ use: useCommand,
689
+ profile: profileCommand,
690
+ "refresh-catalog": refreshCatalogCommand,
691
+ test: testCommand,
692
+ whoami: whoamiCommand,
693
+ "list-providers": listProvidersCommand
694
+ },
695
+ async run({ cmd, rawArgs }) {
696
+ const firstArg = rawArgs?.find((a) => !a.startsWith("-"));
697
+ if (firstArg && cmd.subCommands && firstArg in cmd.subCommands) return;
698
+ await showUsage(cmd);
699
+ }
700
+ });
701
+ export {
702
+ llmCommand
703
+ };
704
+ //# sourceMappingURL=llm-OTJWPMGI.js.map