@cleocode/cleo 2026.10.3 → 2026.10.4

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 (307) hide show
  1. package/bin/cleo.js +11 -1
  2. package/dist/cli/adapter-LVXHFBC4.js +158 -0
  3. package/dist/cli/add-WUAV7LDT.js +443 -0
  4. package/dist/cli/add-batch-U2DLKAQC.js +163 -0
  5. package/dist/cli/admin-I7BQYVZD.js +340 -0
  6. package/dist/cli/adr-K2THMQBS.js +171 -0
  7. package/dist/cli/agent-WQ6XY2DW.js +2366 -0
  8. package/dist/cli/agent-outputs-BJIYLVTU.js +84 -0
  9. package/dist/cli/analyze-PGQZWGOC.js +48 -0
  10. package/dist/cli/archive-5LZPF7C3.js +64 -0
  11. package/dist/cli/archive-stats-U6CYC6JM.js +100 -0
  12. package/dist/cli/attention-SOURWCNI.js +167 -0
  13. package/dist/cli/audit-FO2Y4LH2.js +122 -0
  14. package/dist/cli/auth-ED7TAIXI.js +491 -0
  15. package/dist/cli/backfill-32TRAYRD.js +156 -0
  16. package/dist/cli/backup-LEJMZJKL.js +587 -0
  17. package/dist/cli/backup-inspect-6HPLUEI2.js +26 -0
  18. package/dist/cli/backup-recover-2BTYBZU2.js +29 -0
  19. package/dist/cli/blockers-5JULUJTV.js +54 -0
  20. package/dist/cli/brain-273N3FW4.js +400 -0
  21. package/dist/cli/briefing-7H6OLECX.js +212 -0
  22. package/dist/cli/caamp-MFQVN6VU.js +181 -0
  23. package/dist/cli/cancel-SCMJTXZB.js +84 -0
  24. package/dist/cli/canon-NPF5RODM.js +142 -0
  25. package/dist/cli/canon-docs-2GTOLF7Y.js +26 -0
  26. package/dist/cli/cant-46XCUP4P.js +239 -0
  27. package/dist/cli/changeset-32NMBGG2.js +248 -0
  28. package/dist/cli/check-RWJLBCI2.js +907 -0
  29. package/dist/cli/checkpoint-37HMMKD7.js +128 -0
  30. package/dist/cli/chunk-2JIJD2I7.js +108 -0
  31. package/dist/cli/chunk-37NU2XDP.js +171 -0
  32. package/dist/cli/chunk-3IOQVUO7.js +17308 -0
  33. package/dist/cli/chunk-3PGH67MT.js +175 -0
  34. package/dist/cli/chunk-3ZO3M37V.js +1002 -0
  35. package/dist/cli/chunk-47JYZAMS.js +30 -0
  36. package/dist/cli/chunk-5J2VH3BC.js +66 -0
  37. package/dist/cli/chunk-5ZFFUFH7.js +92 -0
  38. package/dist/cli/chunk-6JSJNYH2.js +114 -0
  39. package/dist/cli/chunk-7INMKEAD.js +85 -0
  40. package/dist/cli/chunk-A2IUEIM5.js +278 -0
  41. package/dist/cli/chunk-AWCQH2W5.js +35 -0
  42. package/dist/cli/chunk-AYA6F4ZT.js +56 -0
  43. package/dist/cli/chunk-BCEXRFA2.js +76 -0
  44. package/dist/cli/chunk-BPEVD37G.js +124 -0
  45. package/dist/cli/chunk-C3B7C43W.js +16 -0
  46. package/dist/cli/chunk-DVTPIZJM.js +72 -0
  47. package/dist/cli/chunk-DYABOIHB.js +96 -0
  48. package/dist/cli/chunk-EBRZ76HS.js +51 -0
  49. package/dist/cli/chunk-EGOTK2HA.js +57 -0
  50. package/dist/cli/chunk-EOPQFCSR.js +148 -0
  51. package/dist/cli/chunk-FORFDPP5.js +288 -0
  52. package/dist/cli/chunk-GFGLLDXX.js +110 -0
  53. package/dist/cli/chunk-GH37QXW5.js +280 -0
  54. package/dist/cli/chunk-GZFVDR44.js +320 -0
  55. package/dist/cli/chunk-I3CRQQAD.js +225 -0
  56. package/dist/cli/chunk-J3ZFM3UQ.js +754 -0
  57. package/dist/cli/chunk-JNZJPIPJ.js +90 -0
  58. package/dist/cli/chunk-KHB52JNB.js +209 -0
  59. package/dist/cli/chunk-KJDWWQFY.js +46 -0
  60. package/dist/cli/chunk-LKNUA3SB.js +83 -0
  61. package/dist/cli/chunk-LVGIFMCV.js +163 -0
  62. package/dist/cli/chunk-LWQBJQSE.js +67 -0
  63. package/dist/cli/chunk-MNJRLSEQ.js +107 -0
  64. package/dist/cli/chunk-NRKWJLMS.js +91 -0
  65. package/dist/cli/chunk-NSHV2JNM.js +48 -0
  66. package/dist/cli/chunk-NWTATTEQ.js +210 -0
  67. package/dist/cli/chunk-OAPN46TC.js +89 -0
  68. package/dist/cli/chunk-OGV57L4J.js +59 -0
  69. package/dist/cli/chunk-OILHT47L.js +252 -0
  70. package/dist/cli/chunk-OPTEQKBB.js +258 -0
  71. package/dist/cli/chunk-PKKZPOOP.js +352 -0
  72. package/dist/cli/chunk-QA6T2LQ5.js +71 -0
  73. package/dist/cli/chunk-QFFQSKRC.js +4497 -0
  74. package/dist/cli/chunk-QPUY2HQZ.js +74 -0
  75. package/dist/cli/chunk-REUTEW3O.js +258 -0
  76. package/dist/cli/chunk-S24YI723.js +88 -0
  77. package/dist/cli/chunk-SXXOC6KZ.js +209 -0
  78. package/dist/cli/chunk-ULN4OKQQ.js +259 -0
  79. package/dist/cli/chunk-V5GBGOGM.js +46 -0
  80. package/dist/cli/chunk-VLEYOOPH.js +31 -0
  81. package/dist/cli/chunk-W33Q3FBH.js +66 -0
  82. package/dist/cli/chunk-W3JLYKKY.js +140 -0
  83. package/dist/cli/chunk-XRAX6XFP.js +48 -0
  84. package/dist/cli/chunk-YGKEECTI.js +78 -0
  85. package/dist/cli/chunk-YUZJI67I.js +108 -0
  86. package/dist/cli/chunk-YY66LFZF.js +29 -0
  87. package/dist/cli/chunk-ZBISIPCK.js +78 -0
  88. package/dist/cli/chunk-ZZTHTMQP.js +77 -0
  89. package/dist/cli/claim-KPENYHIQ.js +96 -0
  90. package/dist/cli/classify-DRVMCFQU.js +117 -0
  91. package/dist/cli/cli-T3CR7J57.js +48 -0
  92. package/dist/cli/cloud-PPQ4O5TX.js +565 -0
  93. package/dist/cli/cockpit-RZKLGYPN.js +790 -0
  94. package/dist/cli/code-Z5CTMVTD.js +178 -0
  95. package/dist/cli/complete-UBOCOBRB.js +34 -0
  96. package/dist/cli/complexity-BV2AGQRZ.js +56 -0
  97. package/dist/cli/compliance-32PD5Y47.js +276 -0
  98. package/dist/cli/conduit-VDKCH33F.js +307 -0
  99. package/dist/cli/config-I72JAXK4.js +516 -0
  100. package/dist/cli/consensus-LFILLSTK.js +121 -0
  101. package/dist/cli/context-XUUVFVTP.js +141 -0
  102. package/dist/cli/contribution-37NQ4N5R.js +111 -0
  103. package/dist/cli/curator-TFDXU2EX.js +139 -0
  104. package/dist/cli/current-C4SN5BWV.js +42 -0
  105. package/dist/cli/daemon-DV25JQ62.js +451 -0
  106. package/dist/cli/dash-TFU4RLQW.js +70 -0
  107. package/dist/cli/decide-5VPMNTSI.js +419 -0
  108. package/dist/cli/decompose-KOYEZNJL.js +77 -0
  109. package/dist/cli/decomposition-7OHUFIQN.js +121 -0
  110. package/dist/cli/delete-Q7YCAFY5.js +68 -0
  111. package/dist/cli/deps-6UZKLDGJ.js +463 -0
  112. package/dist/cli/detect-FERY35UL.js +45 -0
  113. package/dist/cli/detect-drift-UL2JTPUK.js +408 -0
  114. package/dist/cli/diagnostics-TI5QAZXR.js +132 -0
  115. package/dist/cli/docs-QI2PRN3T.js +3095 -0
  116. package/dist/cli/doctor-AX5TICQO.js +1253 -0
  117. package/dist/cli/doctor-ac-bindings-YPMYHU2G.js +26 -0
  118. package/dist/cli/doctor-acceptance-drift-PYNFGMKB.js +26 -0
  119. package/dist/cli/doctor-credentials-UZRIADKM.js +26 -0
  120. package/dist/cli/doctor-db-substrate-Q2TOYM2S.js +27 -0
  121. package/dist/cli/doctor-dep-cycles-GCVYZY6F.js +26 -0
  122. package/dist/cli/doctor-exodus-RO5SUTC2.js +26 -0
  123. package/dist/cli/doctor-exodus-residue-EM2AWQXP.js +26 -0
  124. package/dist/cli/doctor-fk-check-Q3FOLECE.js +26 -0
  125. package/dist/cli/doctor-global-delivery-TNOAQ3NP.js +26 -0
  126. package/dist/cli/doctor-heavy-command-hook-IO3QAQLG.js +26 -0
  127. package/dist/cli/doctor-legacy-backups-O2YH5VLS.js +26 -0
  128. package/dist/cli/doctor-legacy-reaper-VSEJEIFA.js +26 -0
  129. package/dist/cli/doctor-malformed-ids-LQ766V5K.js +26 -0
  130. package/dist/cli/doctor-manifest-rows-6FQDNHLH.js +26 -0
  131. package/dist/cli/doctor-memory-guard-J4PSEKB5.js +26 -0
  132. package/dist/cli/doctor-migrations-ONOH56YM.js +26 -0
  133. package/dist/cli/doctor-nexus-residency-FUQAX7PV.js +26 -0
  134. package/dist/cli/doctor-project-identity-GUDK3HYX.js +26 -0
  135. package/dist/cli/doctor-projects-7L3BNL4O.js +30 -0
  136. package/dist/cli/doctor-projects-registry-TEAVHFQU.js +26 -0
  137. package/dist/cli/doctor-release-readiness-IEGHX6SL.js +26 -0
  138. package/dist/cli/doctor-repair-NBONOSZU.js +26 -0
  139. package/dist/cli/doctor-skill-fixtures-7Y6L34A3.js +26 -0
  140. package/dist/cli/doctor-split-brain-TUKIGVHF.js +26 -0
  141. package/dist/cli/doctor-superseded-store-BHZY2B2L.js +26 -0
  142. package/dist/cli/doctor-tool-locks-REQMIVYK.js +26 -0
  143. package/dist/cli/doctor-twin-collapse-222GOSPE.js +26 -0
  144. package/dist/cli/doctor-worktree-stores-J7TCRVJ3.js +26 -0
  145. package/dist/cli/done-V3AOO65B.js +195 -0
  146. package/dist/cli/dynamic-RR4HB7BB.js +29 -0
  147. package/dist/cli/event-EGNPGE5A.js +372 -0
  148. package/dist/cli/exists-H4SDCBPL.js +65 -0
  149. package/dist/cli/exodus-KALO3B3X.js +401 -0
  150. package/dist/cli/export-ROFOCG4M.js +92 -0
  151. package/dist/cli/export-tasks-US3WBIEQ.js +96 -0
  152. package/dist/cli/federation-SUIB5QWT.js +145 -0
  153. package/dist/cli/find-YICG4BG6.js +177 -0
  154. package/dist/cli/focus-TKCZPKOM.js +55 -0
  155. package/dist/cli/gateway-H4HFDC3E.js +77 -0
  156. package/dist/cli/gateway-auto-start-EDK7XI6E.js +36 -0
  157. package/dist/cli/gc-5R2TUY5T.js +291 -0
  158. package/dist/cli/go-PRQFK5YG.js +206 -0
  159. package/dist/cli/goal-7CZRMLHC.js +212 -0
  160. package/dist/cli/grade-PY2YRPUS.js +56 -0
  161. package/dist/cli/graph-XIXMCFKG.js +878 -0
  162. package/dist/cli/history-EIXADPAD.js +137 -0
  163. package/dist/cli/hook-UF7J7R6D.js +57 -0
  164. package/dist/cli/hook-entry.js +244 -19
  165. package/dist/cli/hygiene-3QZ2NI7P.js +55 -0
  166. package/dist/cli/import-R73SO444.js +88 -0
  167. package/dist/cli/import-tasks-O22FZJ4U.js +108 -0
  168. package/dist/cli/index.js +419 -94612
  169. package/dist/cli/init-IHEJDQWU.js +40 -0
  170. package/dist/cli/inject-LSRVWNCP.js +82 -0
  171. package/dist/cli/install-global-4AZUCH6U.js +95 -0
  172. package/dist/cli/intelligence-2OSFOGD2.js +181 -0
  173. package/dist/cli/issue-IIWEDNFC.js +158 -0
  174. package/dist/cli/janitor-GPMC7VOR.js +111 -0
  175. package/dist/cli/labels-5NPOIQXN.js +87 -0
  176. package/dist/cli/lifecycle-4FFS2K2T.js +272 -0
  177. package/dist/cli/list-47KEUGPQ.js +108 -0
  178. package/dist/cli/llm-G5B3I6GD.js +703 -0
  179. package/dist/cli/llm-cost-S7RS6BVA.js +25 -0
  180. package/dist/cli/llm-stream-24A45NTS.js +27 -0
  181. package/dist/cli/log-XF6H2XSD.js +75 -0
  182. package/dist/cli/login-LBPLGHYG.js +43 -0
  183. package/dist/cli/logout-SX4JSJIV.js +74 -0
  184. package/dist/cli/manifest-NMCW4PIW.js +353 -0
  185. package/dist/cli/map-BU72KMGF.js +52 -0
  186. package/dist/cli/memory-UHYIVGVM.js +1956 -0
  187. package/dist/cli/migrate-agents-v2-OO7OILZK.js +33 -0
  188. package/dist/cli/migrate-claude-mem-EDNYUY3K.js +201 -0
  189. package/dist/cli/next-RZFRG5X7.js +56 -0
  190. package/dist/cli/nexus-4S4Z5EVU.js +2923 -0
  191. package/dist/cli/ops-KR7AWCG3.js +51 -0
  192. package/dist/cli/orchestrate-HOYZY3VX.js +948 -0
  193. package/dist/cli/otel-U7IIRBCT.js +188 -0
  194. package/dist/cli/phase-NYZFHUE5.js +220 -0
  195. package/dist/cli/pivot-FF2CVUZL.js +87 -0
  196. package/dist/cli/plan-3SL2NTRV.js +48 -0
  197. package/dist/cli/playbook-2FCBV7N3.js +229 -0
  198. package/dist/cli/project-WDX2TGMC.js +330 -0
  199. package/dist/cli/promote-YINYFBZY.js +52 -0
  200. package/dist/cli/provenance-C7AYD7WG.js +128 -0
  201. package/dist/cli/provider-QLJEDQBR.js +212 -0
  202. package/dist/cli/reason-JF5BHBM5.js +137 -0
  203. package/dist/cli/reconcile-NMISHDGX.js +127 -0
  204. package/dist/cli/refresh-memory-EY5YNICV.js +45 -0
  205. package/dist/cli/relates-R3ZPICAY.js +259 -0
  206. package/dist/cli/release-4ZJTMUUT.js +524 -0
  207. package/dist/cli/remote-QSONJDIK.js +279 -0
  208. package/dist/cli/renderers-64OR3IWX.js +37 -0
  209. package/dist/cli/reorder-J3DOE7ST.js +86 -0
  210. package/dist/cli/reparent-2OUMKEZX.js +58 -0
  211. package/dist/cli/req-TZB7OFKO.js +129 -0
  212. package/dist/cli/research-MTD7EX45.js +365 -0
  213. package/dist/cli/restore-VEUOX7NF.js +423 -0
  214. package/dist/cli/revert-3YF2IL5G.js +240 -0
  215. package/dist/cli/roadmap-7OOQLXKG.js +61 -0
  216. package/dist/cli/run-2U5NZV5Z.js +211 -0
  217. package/dist/cli/safestop-VR4VK56D.js +88 -0
  218. package/dist/cli/saga-SEWPIOX2.js +285 -0
  219. package/dist/cli/schema-C52WZ35V.js +195 -0
  220. package/dist/cli/self-update-GQIGUDPS.js +504 -0
  221. package/dist/cli/selfimprove-3Y5L4ECT.js +88 -0
  222. package/dist/cli/sentient-M4YMAVGV.js +1088 -0
  223. package/dist/cli/sequence-6UBMA4IF.js +93 -0
  224. package/dist/cli/service-5R7SILZ7.js +155 -0
  225. package/dist/cli/session-3C6AAC4Y.js +707 -0
  226. package/dist/cli/setup-BTUBW5PU.js +323 -0
  227. package/dist/cli/show-MXT2V7TF.js +122 -0
  228. package/dist/cli/skill-GFUZOU2C.js +84 -0
  229. package/dist/cli/skills-EDWLKAF3.js +928 -0
  230. package/dist/cli/smoke-provider-SKUFMZXU.js +218 -0
  231. package/dist/cli/snapshot-GUWMURCM.js +119 -0
  232. package/dist/cli/src-66GAKPXR.js +80 -0
  233. package/dist/cli/start-QFG56RGN.js +67 -0
  234. package/dist/cli/stats-GW55P7RR.js +95 -0
  235. package/dist/cli/status-46HTKNRR.js +157 -0
  236. package/dist/cli/sticky-2DUZOUGI.js +338 -0
  237. package/dist/cli/stop-J2QEUKHX.js +42 -0
  238. package/dist/cli/sync-GJP2QYT5.js +154 -0
  239. package/dist/cli/tasks-BNXTM7PB.js +174 -0
  240. package/dist/cli/telemetry-55Z2XJWL.js +120 -0
  241. package/dist/cli/templates-7O77TKPV.js +611 -0
  242. package/dist/cli/testing-37YTBNKP.js +146 -0
  243. package/dist/cli/token-UAVJMNUI.js +220 -0
  244. package/dist/cli/transcript-LORQTV5Z.js +440 -0
  245. package/dist/cli/tui-BPUFHYKK.js +51 -0
  246. package/dist/cli/update-NVCYV2FT.js +476 -0
  247. package/dist/cli/upgrade-OXJXOGEF.js +243 -0
  248. package/dist/cli/verify-LYLDHPT2.js +190 -0
  249. package/dist/cli/web-QP2RP266.js +275 -0
  250. package/dist/cli/workgraph-FXBSZDQE.js +232 -0
  251. package/dist/cli/worktree-6RXAJIST.js +370 -0
  252. package/package.json +13 -13
  253. package/studio-dist/client/_app/immutable/chunks/{DMj27Pxj.js → Btgeq_wq.js} +1 -1
  254. package/studio-dist/client/_app/immutable/chunks/{qq3pe1aT.js → CgBjxmu6.js} +1 -1
  255. package/studio-dist/client/_app/immutable/chunks/{Dc2owyvE.js → DgEKqO6r.js} +1 -1
  256. package/studio-dist/client/_app/immutable/chunks/t81h7afa.js +1 -0
  257. package/studio-dist/client/_app/immutable/entry/{app.CHWXLeE9.js → app.a02HWaRB.js} +2 -2
  258. package/studio-dist/client/_app/immutable/entry/start.BreMSngo.js +1 -0
  259. package/studio-dist/client/_app/immutable/nodes/{0.DmKQGvFh.js → 0.nTXyRfc-.js} +1 -1
  260. package/studio-dist/client/_app/immutable/nodes/{1.DqJk_REO.js → 1.4zrWeHtl.js} +1 -1
  261. package/studio-dist/client/_app/immutable/nodes/{15.GUy6kdW1.js → 15.D9mk4JyY.js} +1 -1
  262. package/studio-dist/client/_app/immutable/nodes/{16.CcnKZ8f9.js → 16._-wt-sQf.js} +1 -1
  263. package/studio-dist/client/_app/immutable/nodes/{17.DAlQF3lQ.js → 17.CUu6LQDj.js} +1 -1
  264. package/studio-dist/client/_app/immutable/nodes/{18.vQFr-vFj.js → 18.Dz4QRTkX.js} +1 -1
  265. package/studio-dist/client/_app/immutable/nodes/{20.GVOj5j_r.js → 20.CJ2_EB0U.js} +1 -1
  266. package/studio-dist/client/_app/immutable/nodes/{24.2-wC6DOh.js → 24.Igj2FS7k.js} +1 -1
  267. package/studio-dist/client/_app/immutable/nodes/{25.D1vYaH8g.js → 25.BnATjVGN.js} +2 -2
  268. package/studio-dist/client/_app/immutable/nodes/{26.C3rNqzZF.js → 26.6iPyjT44.js} +1 -1
  269. package/studio-dist/client/_app/immutable/nodes/{3.b-7pzc3M.js → 3.AA5GwNgP.js} +1 -1
  270. package/studio-dist/client/_app/version.json +1 -1
  271. package/studio-dist/server/chunks/{0-BaCce-O1.js → 0-DGmsoBYm.js} +3 -3
  272. package/studio-dist/server/chunks/1-8PfxPvlK.js +9 -0
  273. package/studio-dist/server/chunks/{15-DRMOSIC9.js → 15-Bg6YTndh.js} +3 -3
  274. package/studio-dist/server/chunks/{16-BulXhoZZ.js → 16-BObLwgyD.js} +3 -3
  275. package/studio-dist/server/chunks/{17-DUEOCM0H.js → 17-BNXGyAHX.js} +3 -3
  276. package/studio-dist/server/chunks/{18-DP7Q8zPs.js → 18-UqQFRIID.js} +3 -3
  277. package/studio-dist/server/chunks/{20-9ta6MI7q.js → 20-CMn8a_yP.js} +3 -3
  278. package/studio-dist/server/chunks/{24-DysdL1ab.js → 24-BuOTDzib.js} +3 -3
  279. package/studio-dist/server/chunks/{25-CYsps38R.js → 25-CIMSmjVx.js} +4 -4
  280. package/studio-dist/server/chunks/{26-Df4YXgg0.js → 26-DWGObn2T.js} +3 -3
  281. package/studio-dist/server/chunks/{3-BEhOhYpL.js → 3-CyiffdJZ.js} +3 -3
  282. package/studio-dist/server/chunks/{_layout.svelte-CnLcXYG-.js → _layout.svelte-DYtClaIk.js} +4 -4
  283. package/studio-dist/server/chunks/{_page.svelte-HUqTICJR.js → _page.svelte-1h9E6s_f.js} +3 -3
  284. package/studio-dist/server/chunks/{_page.svelte-DOl0DGOO.js → _page.svelte-BNNF62Nm.js} +3 -3
  285. package/studio-dist/server/chunks/{_page.svelte-DzcZljiy.js → _page.svelte-BT1EUadj.js} +5 -5
  286. package/studio-dist/server/chunks/{_page.svelte-Dv8tmDEC.js → _page.svelte-Bip079LT.js} +3 -3
  287. package/studio-dist/server/chunks/{_page.svelte-DGhXqeRc.js → _page.svelte-CEATWp_5.js} +3 -3
  288. package/studio-dist/server/chunks/{_page.svelte-C0qgUvzA.js → _page.svelte-CV3xiD1y.js} +4 -4
  289. package/studio-dist/server/chunks/{_page.svelte-CbyEPj2j.js → _page.svelte-Cv_KVJDV.js} +3 -3
  290. package/studio-dist/server/chunks/{_page.svelte-ui7LnWkL.js → _page.svelte-DSSy6LuK.js} +3 -3
  291. package/studio-dist/server/chunks/{_page.svelte-Da4q5l93.js → _page.svelte-TF795TAS.js} +3 -3
  292. package/studio-dist/server/chunks/{_server.ts-CnKVmf_s.js → _server.ts-BlhRFLY3.js} +2 -2
  293. package/studio-dist/server/chunks/{_server.ts-Cr57EKWf.js → _server.ts-C4w6UdU0.js} +3 -3
  294. package/studio-dist/server/chunks/{_server.ts-P4wVVksg.js → _server.ts-CzrwbhkQ.js} +3 -3
  295. package/studio-dist/server/chunks/{_server.ts-2BazvYRP.js → _server.ts-DWt8Dziu.js} +3 -3
  296. package/studio-dist/server/chunks/{_server.ts-C0evMKCk.js → _server.ts-Db6mEile.js} +3 -3
  297. package/studio-dist/server/chunks/{client-CPM4LrO2.js → client-D8f2k-H_.js} +2 -2
  298. package/studio-dist/server/chunks/{dist-CdoCt9zT.js → dist-B8xbIrdB.js} +3 -1
  299. package/studio-dist/server/chunks/{error.svelte-ShcZo43D.js → error.svelte-DbbOwIme.js} +3 -3
  300. package/studio-dist/server/chunks/{http-BiQjEmVU.js → http-1ftNGTs5.js} +2 -2
  301. package/studio-dist/server/chunks/{internal-Cgsrya1j.js → internal-CTULuLPB.js} +2 -2
  302. package/studio-dist/server/chunks/{stores-BGrpEDMK.js → stores-CS5XOReX.js} +2 -2
  303. package/studio-dist/server/index.js +1 -1
  304. package/studio-dist/server/manifest.js +17 -17
  305. package/studio-dist/client/_app/immutable/chunks/Bw6J8NDM.js +0 -1
  306. package/studio-dist/client/_app/immutable/entry/start.C9bwPpvc.js +0 -1
  307. package/studio-dist/server/chunks/1-CVo7Nk6d.js +0 -9
@@ -0,0 +1,491 @@
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
+ authRemoveCommand
18
+ } from "./chunk-7INMKEAD.js";
19
+ import {
20
+ LOGIN_ARGS,
21
+ runLoginCommand
22
+ } from "./chunk-J3ZFM3UQ.js";
23
+ import "./chunk-GZFVDR44.js";
24
+ import "./chunk-ULN4OKQQ.js";
25
+ import "./chunk-47JYZAMS.js";
26
+ import "./chunk-C3B7C43W.js";
27
+ import {
28
+ defineCommand,
29
+ showUsage
30
+ } from "./chunk-PKKZPOOP.js";
31
+ import {
32
+ cliError,
33
+ cliOutput
34
+ } from "./chunk-3ZO3M37V.js";
35
+ import "./chunk-6JSJNYH2.js";
36
+
37
+ // packages/cleo/src/cli/commands/auth/consent.ts
38
+ var authConsentCommand = defineCommand({
39
+ meta: {
40
+ name: "consent",
41
+ description: "Manage consent gates for external credential sources (e.g. Claude Code OAuth). Use --enable-claude-code / --disable-claude-code to toggle, --status to inspect."
42
+ },
43
+ args: {
44
+ "enable-claude-code": {
45
+ type: "boolean",
46
+ description: "Grant consent for the claude-code seeder: sets auth.claudeCodeConsentGiven=true in the global config and removes any suppression entry."
47
+ },
48
+ "disable-claude-code": {
49
+ type: "boolean",
50
+ description: "Revoke consent for the claude-code seeder: sets auth.claudeCodeConsentGiven=false, adds a suppression entry, and purges all source:claude-code entries from the pool."
51
+ },
52
+ status: {
53
+ type: "boolean",
54
+ description: "Print the current state of all consent gates."
55
+ },
56
+ json: {
57
+ type: "boolean",
58
+ description: "Output as JSON envelope"
59
+ }
60
+ },
61
+ async run({ args }) {
62
+ const a = args;
63
+ const enableClaudeCode = a["enable-claude-code"] === true;
64
+ const disableClaudeCode = a["disable-claude-code"] === true;
65
+ const showStatus = a["status"] === true;
66
+ if (!enableClaudeCode && !disableClaudeCode && !showStatus) {
67
+ cliError("Specify one of --enable-claude-code, --disable-claude-code, or --status.", 6, {
68
+ name: "E_INVALID_INPUT",
69
+ fix: "Run `cleo auth consent --status` to see current consent state."
70
+ });
71
+ process.exit(6);
72
+ }
73
+ if (enableClaudeCode && disableClaudeCode) {
74
+ cliError("--enable-claude-code and --disable-claude-code are mutually exclusive.", 6, {
75
+ name: "E_INVALID_INPUT"
76
+ });
77
+ process.exit(6);
78
+ }
79
+ const configMod = await import(
80
+ /* webpackIgnore: true */
81
+ "@cleocode/core/config.js"
82
+ );
83
+ const getConfigValue = configMod.getConfigValue;
84
+ const setConfigValue = configMod.setConfigValue;
85
+ const { addSuppression, removeSuppression, isSuppressed } = await import(
86
+ /* webpackIgnore: true */
87
+ "@cleocode/core/llm/credential-removal.js"
88
+ );
89
+ const CONSENT_KEY = "auth.claudeCodeConsentGiven";
90
+ const SOURCE_ID = "claude-code";
91
+ const PROVIDER = "anthropic";
92
+ if (showStatus) {
93
+ const resolved = await getConfigValue(CONSENT_KEY);
94
+ const consentEnabled = resolved.value === true;
95
+ const suppressed = isSuppressed(PROVIDER, SOURCE_ID);
96
+ const result2 = {
97
+ gates: [
98
+ {
99
+ gate: "claudeCode",
100
+ configKey: CONSENT_KEY,
101
+ enabled: consentEnabled,
102
+ suppressed
103
+ }
104
+ ]
105
+ };
106
+ cliOutput(result2, {
107
+ command: "auth-consent-status",
108
+ operation: "auth.consent.status"
109
+ });
110
+ return;
111
+ }
112
+ if (enableClaudeCode) {
113
+ await setConfigValue(CONSENT_KEY, true, void 0, { global: true });
114
+ const suppressionChanged2 = removeSuppression(PROVIDER, SOURCE_ID);
115
+ const result2 = {
116
+ action: "enabled",
117
+ gate: "claudeCode",
118
+ configKey: CONSENT_KEY,
119
+ value: true,
120
+ suppressionChanged: suppressionChanged2,
121
+ purgedCount: 0
122
+ };
123
+ cliOutput(result2, {
124
+ command: "auth-consent-enable",
125
+ operation: "auth.consent.enable"
126
+ });
127
+ return;
128
+ }
129
+ await setConfigValue(CONSENT_KEY, false, void 0, { global: true });
130
+ const wasAlreadySuppressed = isSuppressed(PROVIDER, SOURCE_ID);
131
+ addSuppression(PROVIDER, SOURCE_ID);
132
+ const suppressionChanged = !wasAlreadySuppressed;
133
+ const { listCredentials, removeCredential } = await import(
134
+ /* webpackIgnore: true */
135
+ "@cleocode/core/llm/credentials-store.js"
136
+ );
137
+ const allEntries = await listCredentials();
138
+ const claudeCodeEntries = allEntries.filter((c) => c.source === SOURCE_ID);
139
+ let purgedCount = 0;
140
+ for (const entry of claudeCodeEntries) {
141
+ const removed = await removeCredential(entry.provider, entry.label);
142
+ if (removed) purgedCount++;
143
+ }
144
+ const result = {
145
+ action: "disabled",
146
+ gate: "claudeCode",
147
+ configKey: CONSENT_KEY,
148
+ value: false,
149
+ suppressionChanged,
150
+ purgedCount
151
+ };
152
+ cliOutput(result, {
153
+ command: "auth-consent-disable",
154
+ operation: "auth.consent.disable"
155
+ });
156
+ }
157
+ });
158
+
159
+ // packages/cleo/src/cli/commands/auth/list.ts
160
+ import { existsSync } from "node:fs";
161
+ import { homedir } from "node:os";
162
+ import { join } from "node:path";
163
+ function formatExpiry(expiresAt) {
164
+ if (expiresAt == null) return "never";
165
+ const remaining = expiresAt - Date.now();
166
+ if (remaining <= 0) return "expired";
167
+ const minutes = Math.floor(remaining / 6e4);
168
+ if (minutes <= 90) return `expires in ${minutes}m`;
169
+ const hours = Math.floor(minutes / 60);
170
+ if (hours <= 36) return `expires in ${hours}h`;
171
+ const days = Math.floor(hours / 24);
172
+ return `expires in ${days}d`;
173
+ }
174
+ var authListCommand = defineCommand({
175
+ meta: {
176
+ name: "list",
177
+ description: "List ALL pool entries from ALL sources (env, claude-code, cleo-pkce, codex-cli, gemini-cli, gh-cli, manual). Tokens are never surfaced \u2014 use `cleo llm list` for the LLM-scoped view that mirrors the manual store only."
178
+ },
179
+ args: {
180
+ provider: {
181
+ type: "string",
182
+ description: "Filter to a single provider id (e.g. anthropic)"
183
+ },
184
+ json: {
185
+ type: "boolean",
186
+ description: "Output as JSON envelope"
187
+ }
188
+ },
189
+ async run({ args }) {
190
+ const a = args;
191
+ const providerFilter = typeof a["provider"] === "string" && a["provider"] !== "" ? a["provider"] : null;
192
+ const { getCredentialPool } = await import(
193
+ /* webpackIgnore: true */
194
+ "@cleocode/core/llm/credential-pool.js"
195
+ );
196
+ const pool = getCredentialPool();
197
+ await pool.seed();
198
+ const allStored = await pool.list();
199
+ const ghCliEntries = allStored.filter((c) => c.source === "gh-cli");
200
+ if (ghCliEntries.length > 0) {
201
+ const { removeCredential } = await import(
202
+ /* webpackIgnore: true */
203
+ "@cleocode/core/llm/credentials-store.js"
204
+ );
205
+ const { addSuppression } = await import(
206
+ /* webpackIgnore: true */
207
+ "@cleocode/core/llm/credential-removal.js"
208
+ );
209
+ for (const entry of ghCliEntries) {
210
+ await removeCredential(
211
+ entry.provider,
212
+ entry.label
213
+ );
214
+ }
215
+ addSuppression("openai", "gh-cli");
216
+ }
217
+ const stored = allStored.filter((c) => c.source !== "gh-cli");
218
+ const entries = stored.filter((c) => providerFilter ? c.provider === providerFilter : true).map((c) => ({
219
+ provider: c.provider,
220
+ label: c.label,
221
+ source: c.source ?? "manual",
222
+ authType: c.authType,
223
+ expiryStatus: formatExpiry(c.expiresAt),
224
+ // `current` is "is this entry not in active cooldown AND not disabled"
225
+ // — i.e. could it be served right now. A richer notion of "default
226
+ // credential per provider" would require resolver introspection,
227
+ // which lands in a follow-up task.
228
+ current: !c.disabled && (c.lastErrorResetAt == null || c.lastErrorResetAt <= Date.now())
229
+ })).sort((a2, b) => {
230
+ const p = a2.provider.localeCompare(b.provider);
231
+ return p !== 0 ? p : a2.label.localeCompare(b.label);
232
+ });
233
+ const claudeCredsPath = join(homedir(), ".claude", ".credentials.json");
234
+ const hint = existsSync(claudeCredsPath) && entries.every((e) => e.source !== "claude-code") ? "Hint: Claude Code OAuth detected at ~/.claude/.credentials.json but consent is off. Run `cleo auth consent --enable-claude-code` to seed it into the pool." : null;
235
+ const { getNexusAccountStatus } = await import(
236
+ /* webpackIgnore: true */
237
+ "@cleocode/core/cloud/nexus-auth.js"
238
+ );
239
+ const nexus = providerFilter === null || providerFilter === "nexus" ? await getNexusAccountStatus().catch(() => []) : [];
240
+ cliOutput(
241
+ { entries, nexus, ...hint !== null ? { hint } : {} },
242
+ {
243
+ command: "auth-list",
244
+ operation: "auth.list"
245
+ }
246
+ );
247
+ }
248
+ });
249
+
250
+ // packages/cleo/src/cli/commands/auth/login.ts
251
+ var authLoginCommand = defineCommand({
252
+ meta: {
253
+ name: "login",
254
+ description: "Log in to a Cleo Nexus account (auth login nexus) or to an LLM provider and bind a usable profile (alias of `cleo login`). Picks a provider + auth method (browser OAuth 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."
255
+ },
256
+ args: LOGIN_ARGS,
257
+ async run({ args }) {
258
+ await runLoginCommand(args, "auth.login");
259
+ }
260
+ });
261
+
262
+ // packages/cleo/src/cli/commands/auth/migrate-project-secrets.ts
263
+ import { existsSync as existsSync2, readFileSync, writeFileSync } from "node:fs";
264
+ import { join as join2 } from "node:path";
265
+ import { createInterface } from "node:readline";
266
+ function resolveProjectRootArg(arg) {
267
+ if (typeof arg === "string" && arg.length > 0) return arg;
268
+ return process.cwd();
269
+ }
270
+ function projectConfigPath(projectRoot) {
271
+ const cleoDir = process.env["CLEO_DIR"] ?? ".cleo";
272
+ return join2(projectRoot, cleoDir, "config.json");
273
+ }
274
+ function extractApiKeyEntries(config) {
275
+ if (!config || typeof config !== "object") return [];
276
+ const llm = config["llm"];
277
+ if (!llm || typeof llm !== "object") return [];
278
+ const providers = llm["providers"];
279
+ if (!providers || typeof providers !== "object") return [];
280
+ const out = [];
281
+ for (const [provider, raw] of Object.entries(providers)) {
282
+ if (!raw || typeof raw !== "object") continue;
283
+ const apiKey = raw["apiKey"];
284
+ if (typeof apiKey === "string" && apiKey.trim().length > 0) {
285
+ out.push({ provider, apiKey: apiKey.trim() });
286
+ }
287
+ }
288
+ return out;
289
+ }
290
+ function stripApiKeysFromConfig(config) {
291
+ const clone = structuredClone(config);
292
+ const llm = clone["llm"];
293
+ if (!llm || typeof llm !== "object") return clone;
294
+ const providers = llm["providers"];
295
+ if (!providers || typeof providers !== "object") return clone;
296
+ const cleanedProviders = {};
297
+ for (const [provider, raw] of Object.entries(providers)) {
298
+ if (!raw || typeof raw !== "object") {
299
+ cleanedProviders[provider] = raw;
300
+ continue;
301
+ }
302
+ const entry = { ...raw };
303
+ delete entry["apiKey"];
304
+ if (Object.keys(entry).length > 0) {
305
+ cleanedProviders[provider] = entry;
306
+ }
307
+ }
308
+ llm["providers"] = cleanedProviders;
309
+ return clone;
310
+ }
311
+ function detectAuthType(provider, token) {
312
+ if (provider !== "anthropic") return "api_key";
313
+ if (token.startsWith("sk-ant-oat-") || token.startsWith("sk-ant-ort-")) return "oauth";
314
+ return "api_key";
315
+ }
316
+ async function promptYesNo(question) {
317
+ const rl = createInterface({ input: process.stdin, output: process.stderr });
318
+ try {
319
+ const answer = await new Promise((resolve) => {
320
+ rl.question(question, (a) => resolve(a));
321
+ });
322
+ const clean = answer.trim().toLowerCase();
323
+ return clean === "y" || clean === "yes";
324
+ } finally {
325
+ rl.close();
326
+ }
327
+ }
328
+ async function runMigrateProjectSecrets(opts) {
329
+ const configPath = projectConfigPath(opts.projectRoot);
330
+ if (!existsSync2(configPath)) {
331
+ return {
332
+ configPath,
333
+ backupPath: null,
334
+ migrated: [],
335
+ cancelled: false,
336
+ dryRun: opts.dryRun
337
+ };
338
+ }
339
+ const raw = readFileSync(configPath, "utf-8");
340
+ let parsed;
341
+ try {
342
+ parsed = JSON.parse(raw);
343
+ } catch (err) {
344
+ throw new Error(
345
+ `Failed to parse ${configPath}: ${err instanceof Error ? err.message : String(err)}. Fix the JSON syntax error before running migrate-project-secrets.`
346
+ );
347
+ }
348
+ const entries = extractApiKeyEntries(parsed);
349
+ if (entries.length === 0) {
350
+ return {
351
+ configPath,
352
+ backupPath: null,
353
+ migrated: [],
354
+ cancelled: false,
355
+ dryRun: opts.dryRun
356
+ };
357
+ }
358
+ if (!opts.yes) {
359
+ process.stderr.write(
360
+ `Found ${entries.length} project-config secret(s) to migrate:
361
+ ` + entries.map((e) => ` - ${e.provider}
362
+ `).join("") + `
363
+ This will:
364
+ 1. Back up ${configPath} -> ${configPath}.pre-migration-bak
365
+ 2. Move each apiKey into the unified credential pool with label 'migrated-from-project-config'
366
+ 3. Remove the apiKey fields from the project config
367
+
368
+ `
369
+ );
370
+ const confirmed = await promptYesNo("Proceed? [y/N] ");
371
+ if (!confirmed) {
372
+ return {
373
+ configPath,
374
+ backupPath: null,
375
+ migrated: [],
376
+ cancelled: true,
377
+ dryRun: opts.dryRun
378
+ };
379
+ }
380
+ }
381
+ if (opts.dryRun) {
382
+ return {
383
+ configPath,
384
+ backupPath: null,
385
+ migrated: entries.map((e) => ({
386
+ provider: e.provider,
387
+ label: "migrated-from-project-config",
388
+ moved: false
389
+ })),
390
+ cancelled: false,
391
+ dryRun: true
392
+ };
393
+ }
394
+ const backupPath = `${configPath}.pre-migration-bak`;
395
+ writeFileSync(backupPath, raw, { mode: 384 });
396
+ const { addCredential } = await import(
397
+ /* webpackIgnore: true */
398
+ "@cleocode/core/llm/credentials-store.js"
399
+ );
400
+ const migrated = [];
401
+ for (const { provider, apiKey } of entries) {
402
+ await addCredential({
403
+ provider,
404
+ label: "migrated-from-project-config",
405
+ authType: detectAuthType(provider, apiKey),
406
+ accessToken: apiKey,
407
+ source: "manual"
408
+ });
409
+ migrated.push({ provider, label: "migrated-from-project-config", moved: true });
410
+ }
411
+ const stripped = stripApiKeysFromConfig(parsed);
412
+ writeFileSync(configPath, `${JSON.stringify(stripped, null, 2)}
413
+ `, "utf-8");
414
+ return {
415
+ configPath,
416
+ backupPath,
417
+ migrated,
418
+ cancelled: false,
419
+ dryRun: false
420
+ };
421
+ }
422
+ var authMigrateProjectSecretsCommand = defineCommand({
423
+ meta: {
424
+ name: "migrate-project-secrets",
425
+ description: "Move every llm.providers.*.apiKey out of .cleo/config.json (project-scoped, often committed to git) and into the unified credential pool. Atomic: backs up the original config to .cleo/config.json.pre-migration-bak first."
426
+ },
427
+ args: {
428
+ "project-root": {
429
+ type: "string",
430
+ description: "Override the project root (default: cwd)"
431
+ },
432
+ yes: {
433
+ type: "boolean",
434
+ description: "Skip the interactive confirmation prompt",
435
+ default: false
436
+ },
437
+ "dry-run": {
438
+ type: "boolean",
439
+ description: "Show what would be migrated without writing anything",
440
+ default: false
441
+ },
442
+ json: {
443
+ type: "boolean",
444
+ description: "Output as JSON envelope"
445
+ }
446
+ },
447
+ async run({ args }) {
448
+ const a = args;
449
+ const projectRoot = resolveProjectRootArg(a["project-root"]);
450
+ const yes = Boolean(a["yes"]);
451
+ const dryRun = Boolean(a["dry-run"]);
452
+ let result;
453
+ try {
454
+ result = await runMigrateProjectSecrets({ projectRoot, yes, dryRun });
455
+ } catch (err) {
456
+ const message = err instanceof Error ? err.message : String(err);
457
+ cliError(message, 6, { name: "E_VALIDATION" });
458
+ process.exit(6);
459
+ }
460
+ cliOutput(result, {
461
+ command: "auth-migrate-project-secrets",
462
+ operation: "auth.migrate-project-secrets"
463
+ });
464
+ }
465
+ });
466
+
467
+ // packages/cleo/src/cli/commands/auth.ts
468
+ var authCommand = defineCommand({
469
+ meta: {
470
+ name: "auth",
471
+ // ONE quoted literal, no backticks — see login.ts meta for the generator
472
+ // DESC_RE constraint.
473
+ description: "Unified credential surface: auth login (front-door provider login, alias of cleo login), auth list, auth remove, auth consent. (cleo llm list is the LLM-scoped sister command.)"
474
+ },
475
+ subCommands: {
476
+ consent: authConsentCommand,
477
+ list: authListCommand,
478
+ login: authLoginCommand,
479
+ remove: authRemoveCommand,
480
+ "migrate-project-secrets": authMigrateProjectSecretsCommand
481
+ },
482
+ async run({ cmd, rawArgs }) {
483
+ const firstArg = rawArgs?.find((a) => !a.startsWith("-"));
484
+ if (firstArg && cmd.subCommands && firstArg in cmd.subCommands) return;
485
+ await showUsage(cmd);
486
+ }
487
+ });
488
+ export {
489
+ authCommand
490
+ };
491
+ //# sourceMappingURL=auth-ED7TAIXI.js.map
@@ -0,0 +1,156 @@
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
+ defineCommand
18
+ } from "./chunk-PKKZPOOP.js";
19
+ import {
20
+ cliError,
21
+ cliOutput,
22
+ humanLine,
23
+ humanProgress,
24
+ humanWarn
25
+ } from "./chunk-3ZO3M37V.js";
26
+ import "./chunk-6JSJNYH2.js";
27
+
28
+ // packages/cleo/src/cli/commands/backfill.ts
29
+ import { backfillTasks, getProjectRoot, populateEmbeddings } from "@cleocode/core/internal";
30
+ var backfillCommand = defineCommand({
31
+ meta: {
32
+ name: "backfill",
33
+ description: "Retroactively add acceptance criteria and verification metadata to existing tasks"
34
+ },
35
+ args: {
36
+ "dry-run": {
37
+ type: "boolean",
38
+ description: "Show what would be changed without modifying any tasks",
39
+ default: false
40
+ },
41
+ rollback: {
42
+ type: "boolean",
43
+ description: "Revert a previous backfill (clear auto-generated AC and verification)",
44
+ default: false
45
+ },
46
+ tasks: {
47
+ type: "string",
48
+ description: "Comma-separated list of task IDs to restrict backfill to (e.g. T001,T002)"
49
+ },
50
+ embeddings: {
51
+ type: "boolean",
52
+ description: "Retroactively generate embeddings for brain observations that lack them",
53
+ default: false
54
+ }
55
+ },
56
+ async run({ args }) {
57
+ const root = getProjectRoot();
58
+ if (args.embeddings) {
59
+ try {
60
+ let lastLine = "";
61
+ const result = await populateEmbeddings(root, {
62
+ onProgress: (current, total) => {
63
+ if (process.stdout.isTTY) {
64
+ humanProgress(`\rEmbedding ${current}/${total}...`);
65
+ } else {
66
+ const line = `Embedding ${current}/${total}...`;
67
+ if (line !== lastLine) {
68
+ humanLine(line);
69
+ lastLine = line;
70
+ }
71
+ }
72
+ }
73
+ });
74
+ if (process.stdout.isTTY && result.processed + result.skipped + result.errors > 0) {
75
+ humanProgress("\n");
76
+ }
77
+ if (result.processed === 0 && result.skipped === 0 && result.errors === 0) {
78
+ cliOutput(
79
+ {
80
+ processed: 0,
81
+ skipped: 0,
82
+ errors: 0,
83
+ message: "No observations to embed (provider unavailable or nothing to backfill)."
84
+ },
85
+ { command: "backfill", operation: "admin.backfill", message: "Nothing to embed" }
86
+ );
87
+ return;
88
+ }
89
+ cliOutput(
90
+ { processed: result.processed, skipped: result.skipped, errors: result.errors },
91
+ {
92
+ command: "backfill",
93
+ operation: "admin.backfill",
94
+ message: `Processed ${result.processed}, skipped ${result.skipped}, errors ${result.errors}`
95
+ }
96
+ );
97
+ } catch (err) {
98
+ const message = err instanceof Error ? err.message : String(err);
99
+ cliError(
100
+ `Embedding backfill failed: ${message}`,
101
+ "E_INTERNAL",
102
+ {
103
+ name: "E_INTERNAL"
104
+ },
105
+ { operation: "admin.backfill" }
106
+ );
107
+ process.exit(1);
108
+ }
109
+ return;
110
+ }
111
+ const dryRun = !!args["dry-run"];
112
+ const rollback = !!args.rollback;
113
+ const taskIds = args.tasks?.trim() ? args.tasks.split(",").map((s) => s.trim()).filter(Boolean) : void 0;
114
+ if (!dryRun && !rollback && !process.env["CLEO_NONINTERACTIVE"]) {
115
+ humanWarn(
116
+ "Warning: Backfill will modify tasks in-place. Run with --dry-run first to preview changes.\n Set CLEO_NONINTERACTIVE=1 or pass --dry-run to suppress this warning.\n"
117
+ );
118
+ }
119
+ try {
120
+ const result = await backfillTasks(root, { dryRun, rollback, taskIds });
121
+ const output = {
122
+ dryRun,
123
+ rollback,
124
+ tasksScanned: result.tasksScanned,
125
+ tasksChanged: result.tasksChanged,
126
+ changes: result.changes
127
+ };
128
+ if (!rollback) {
129
+ output["acAdded"] = result.acAdded;
130
+ output["verificationAdded"] = result.verificationAdded;
131
+ }
132
+ const messagePrefix = dryRun ? "[dry run] " : rollback ? "[rollback] " : "";
133
+ const messageSuffix = result.changes.length === 0 ? "Nothing to do \u2014 all tasks already have AC and verification metadata." : `Scanned ${result.tasksScanned}, changed ${result.tasksChanged} task(s).`;
134
+ cliOutput(output, {
135
+ command: "backfill",
136
+ operation: "admin.backfill",
137
+ message: `${messagePrefix}${messageSuffix}`
138
+ });
139
+ } catch (err) {
140
+ const message = err instanceof Error ? err.message : String(err);
141
+ cliError(
142
+ `Backfill failed: ${message}`,
143
+ "E_INTERNAL",
144
+ {
145
+ name: "E_INTERNAL"
146
+ },
147
+ { operation: "admin.backfill" }
148
+ );
149
+ process.exit(1);
150
+ }
151
+ }
152
+ });
153
+ export {
154
+ backfillCommand
155
+ };
156
+ //# sourceMappingURL=backfill-32TRAYRD.js.map