@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,588 @@
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
+ backupInspectSubCommand
18
+ } from "./chunk-QJJWWCIC.js";
19
+ import {
20
+ backupRecoverSubCommand
21
+ } from "./chunk-2MGFDMDF.js";
22
+ import "./chunk-47JYZAMS.js";
23
+ import "./chunk-C3B7C43W.js";
24
+ import {
25
+ isSubCommandDispatch
26
+ } from "./chunk-YY66LFZF.js";
27
+ import {
28
+ dispatchFromCli
29
+ } from "./chunk-L7ONYSV6.js";
30
+ import {
31
+ CLEO_DIR_NAME,
32
+ CLI_GLOBAL_BACKUP_FILES,
33
+ CLI_PROJECT_BACKUP_FILES,
34
+ CONFIG_JSON,
35
+ PROJECT_INFO_JSON,
36
+ RESTORE_CONFLICTS_MD,
37
+ RESTORE_IMPORTED_SUBDIR
38
+ } from "./chunk-6N6WGLXE.js";
39
+ import "./chunk-4VASFLUW.js";
40
+ import {
41
+ defineCommand
42
+ } from "./chunk-PKKZPOOP.js";
43
+ import "./chunk-QKMBWYAS.js";
44
+ import {
45
+ cliError,
46
+ cliOutput,
47
+ humanInfo
48
+ } from "./chunk-4RGSNUUP.js";
49
+ import "./chunk-6JSJNYH2.js";
50
+ import "./chunk-D7BAQNV2.js";
51
+ import "./chunk-TYC7G5LF.js";
52
+
53
+ // packages/cleo/src/cli/commands/backup.ts
54
+ import crypto from "node:crypto";
55
+ import fs from "node:fs";
56
+ import path from "node:path";
57
+ import readline from "node:readline";
58
+
59
+ // packages/cleo/src/cli/commands/backup-verify.ts
60
+ import { ExitCode } from "@cleocode/contracts/exit-codes.js";
61
+ import { getProjectRoot } from "@cleocode/core";
62
+ import { runBackupVerify } from "@cleocode/core/store/backup-verify.js";
63
+ var backupVerifySubCommand = defineCommand({
64
+ meta: {
65
+ name: "verify",
66
+ description: "Walk DB_INVENTORY and report per-DB freshness + integrity for each snapshot in BOTH .cleo/backups/sqlite/ (canonical) and .cleo/backups/snapshot/ (legacy). Exits non-zero on any stale/corrupt finding."
67
+ },
68
+ args: {
69
+ "per-db-timeout-ms": {
70
+ type: "string",
71
+ description: "Per-DB integrity-check timeout in milliseconds (default: 30000).",
72
+ default: "30000"
73
+ },
74
+ json: { type: "boolean", description: "Output as JSON" },
75
+ human: { type: "boolean", description: "Force human-readable output" },
76
+ quiet: { type: "boolean", description: "Suppress non-essential output" }
77
+ },
78
+ async run({ args }) {
79
+ const argsBag = args;
80
+ const rawTimeout = argsBag["per-db-timeout-ms"];
81
+ let perDbTimeoutMs = 3e4;
82
+ if (typeof rawTimeout === "string" && rawTimeout.length > 0) {
83
+ const parsed = Number.parseInt(rawTimeout, 10);
84
+ if (!Number.isFinite(parsed) || parsed <= 0) {
85
+ cliError(
86
+ `Invalid --per-db-timeout-ms value: ${rawTimeout}`,
87
+ ExitCode.VALIDATION_ERROR,
88
+ {
89
+ name: "E_VALIDATION",
90
+ fix: "Provide a positive integer number of milliseconds (e.g. --per-db-timeout-ms 30000)."
91
+ },
92
+ { operation: "backup.verify" }
93
+ );
94
+ process.exitCode = ExitCode.VALIDATION_ERROR;
95
+ return;
96
+ }
97
+ perDbTimeoutMs = parsed;
98
+ }
99
+ let result;
100
+ try {
101
+ result = runBackupVerify({
102
+ projectRoot: getProjectRoot(),
103
+ perDbTimeoutMs
104
+ });
105
+ } catch (err) {
106
+ const message = err instanceof Error ? err.message : String(err);
107
+ cliError(
108
+ message,
109
+ ExitCode.GENERAL_ERROR,
110
+ { name: "E_BACKUP_VERIFY_FAILED" },
111
+ { operation: "backup.verify" }
112
+ );
113
+ process.exitCode = ExitCode.GENERAL_ERROR;
114
+ return;
115
+ }
116
+ cliOutput(result, {
117
+ command: "backup",
118
+ operation: "backup.verify"
119
+ });
120
+ if ((result.summary.corrupt > 0 || result.summary.stale > 0) && (process.exitCode === void 0 || process.exitCode === 0)) {
121
+ process.exitCode = ExitCode.GENERAL_ERROR;
122
+ }
123
+ }
124
+ });
125
+
126
+ // packages/cleo/src/cli/commands/backup.ts
127
+ async function promptPassphrase() {
128
+ if (!process.stdin.isTTY) {
129
+ throw new Error(
130
+ "Cannot prompt for passphrase: stdin is not a TTY. Set the CLEO_BACKUP_PASSPHRASE environment variable for non-interactive use."
131
+ );
132
+ }
133
+ return new Promise((resolve) => {
134
+ process.stdout.write("Passphrase: ");
135
+ const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
136
+ rl.question("", (answer) => {
137
+ rl.close();
138
+ resolve(answer.trim());
139
+ });
140
+ });
141
+ }
142
+ var addCommand = defineCommand({
143
+ meta: {
144
+ name: "add",
145
+ description: "Add a new backup of all CLEO data files (backup create is an alias for backup add)"
146
+ },
147
+ args: {
148
+ destination: {
149
+ type: "string",
150
+ description: "Backup destination directory"
151
+ },
152
+ global: {
153
+ type: "boolean",
154
+ description: "Also back up the global store (<CLEO_HOME>/cleo.db: global brain, nexus, agent registry); restore it with cleo restore backup --scope global --id <id>"
155
+ }
156
+ },
157
+ async run({ args }) {
158
+ await dispatchFromCli(
159
+ "mutate",
160
+ "admin",
161
+ "backup",
162
+ {
163
+ type: "snapshot",
164
+ note: args.destination ? `destination:${args.destination}` : void 0,
165
+ includeGlobal: args.global === true
166
+ },
167
+ { command: "backup" }
168
+ );
169
+ }
170
+ });
171
+ var listCommand = defineCommand({
172
+ meta: {
173
+ name: "list",
174
+ description: "List available backups"
175
+ },
176
+ args: {
177
+ scope: {
178
+ type: "string",
179
+ description: "Filter by backup scope: project, global, or all (default: all)",
180
+ default: "all"
181
+ }
182
+ },
183
+ async run({ args }) {
184
+ const scope = args.scope || "all";
185
+ await dispatchFromCli(
186
+ "query",
187
+ "admin",
188
+ "backup",
189
+ {
190
+ type: "list",
191
+ scope
192
+ },
193
+ { command: "backup" }
194
+ );
195
+ }
196
+ });
197
+ var exportCommand = defineCommand({
198
+ meta: {
199
+ name: "export",
200
+ description: "Export CLEO state to a portable .cleobundle.tar.gz (scopes: project | global | all | machine)"
201
+ },
202
+ args: {
203
+ name: {
204
+ type: "positional",
205
+ description: "Bundle name (used as filename stem)",
206
+ required: true
207
+ },
208
+ scope: {
209
+ type: "string",
210
+ description: "project | global | all | machine",
211
+ default: "project"
212
+ },
213
+ encrypt: {
214
+ type: "boolean",
215
+ description: "Encrypt bundle with passphrase (AES-256-GCM via scrypt); required to carry secrets"
216
+ },
217
+ out: {
218
+ type: "string",
219
+ description: "Output bundle path (default: ./<name>[.enc].cleobundle.tar.gz)"
220
+ }
221
+ },
222
+ async run({ args }) {
223
+ const scope = args.scope;
224
+ if (scope !== "project" && scope !== "global" && scope !== "all" && scope !== "machine") {
225
+ cliError(`--scope must be project, global, all or machine (got "${scope}")`, 6, {
226
+ name: "E_VALIDATION"
227
+ });
228
+ process.exitCode = 6;
229
+ return;
230
+ }
231
+ const { exportPortableBundle, PortableBundleError } = await import("@cleocode/core/store/portable-bundle.js");
232
+ const { getProjectRoot: getProjectRoot2 } = await import("@cleocode/core");
233
+ const passphrase = args.encrypt === true ? await resolvePassphrase() : void 0;
234
+ if (args.encrypt === true && passphrase === void 0) return;
235
+ const encSuffix = args.encrypt === true ? "enc." : "";
236
+ try {
237
+ const result = await exportPortableBundle({
238
+ scope,
239
+ projectRoot: scope === "project" || scope === "all" ? getProjectRoot2() : void 0,
240
+ outputPath: args.out ?? `./${args.name}.${encSuffix}cleobundle.tar.gz`,
241
+ encrypt: args.encrypt === true,
242
+ passphrase,
243
+ label: args.name
244
+ });
245
+ cliOutput(result, { command: "backup", operation: "backup.export" });
246
+ humanInfo(`Bundle written to ${result.bundlePath} (${result.size} bytes)`);
247
+ humanInfo(result.memory.notice);
248
+ } catch (err) {
249
+ reportBundleError(err, err instanceof PortableBundleError ? err : null, "E_EXPORT_FAILED");
250
+ }
251
+ }
252
+ });
253
+ var importCommand = defineCommand({
254
+ meta: {
255
+ name: "import",
256
+ description: "Import a .cleobundle.tar.gz into the current project (and/or global tier)"
257
+ },
258
+ args: {
259
+ bundle: {
260
+ type: "positional",
261
+ description: "Path to the .cleobundle.tar.gz file",
262
+ required: true
263
+ },
264
+ force: {
265
+ type: "boolean",
266
+ description: "Overwrite existing live data at target without aborting"
267
+ },
268
+ target: {
269
+ type: "string",
270
+ description: "Portable bundles: place a single-project bundle at this project root (paths are relocated)"
271
+ },
272
+ map: {
273
+ type: "string",
274
+ description: "Portable bundles: rewrite project paths <oldPrefix>=<newPrefix> (repeatable; longest prefix wins)"
275
+ },
276
+ "confirm-owner-store": {
277
+ type: "boolean",
278
+ description: "From inside a git worktree: allow overwriting the owning project's LIVE store (refused without it)",
279
+ default: false
280
+ }
281
+ },
282
+ async run({ args, rawArgs }) {
283
+ const bundlePath = args.bundle;
284
+ const confirmOwnerStore = args["confirm-owner-store"] === true;
285
+ const { detectBundleFormat } = await import("@cleocode/core/store/portable-bundle-import.js");
286
+ if (await detectBundleFormat(bundlePath) === "v2") {
287
+ await portableImport(
288
+ bundlePath,
289
+ args.target,
290
+ collectFlagValues(rawArgs, "map"),
291
+ args.force,
292
+ confirmOwnerStore
293
+ );
294
+ return;
295
+ }
296
+ const { getProjectRoot: getProjectRoot2, getCleoHome, getCleoVersion } = await import("@cleocode/core");
297
+ const { BundleError, cleanupStaging, unpackBundle } = await import("@cleocode/core/store/backup-unpack.js");
298
+ const { regenerateConfigJson, regenerateProjectContextJson, regenerateProjectInfoJson } = await import("@cleocode/core/store/regenerators.js");
299
+ const { regenerateAndCompare } = await import("@cleocode/core/store/restore-json-merge.js");
300
+ const { buildConflictReport, writeConflictReport } = await import("@cleocode/core/store/restore-conflict-report.js");
301
+ const projectRoot = getProjectRoot2();
302
+ const { assertOwnerStoreRewriteConfirmed } = await import("@cleocode/core/store/worktree-isolation-guard.js");
303
+ try {
304
+ assertOwnerStoreRewriteConfirmed("backup import", path.join(projectRoot, ".cleo"), {
305
+ cwd: process.cwd(),
306
+ confirmOwnerStore
307
+ });
308
+ } catch (err) {
309
+ reportBundleError(err, null, "E_IMPORT_FAILED");
310
+ return;
311
+ }
312
+ if (args.force !== true) {
313
+ const existing = checkForExistingData(projectRoot, getCleoHome());
314
+ if (existing.length > 0) {
315
+ process.stderr.write(
316
+ JSON.stringify({
317
+ success: false,
318
+ error: {
319
+ code: 78,
320
+ codeName: "E_DATA_EXISTS",
321
+ message: `Target has existing data: ${existing.join(", ")}. Use --force to overwrite.`
322
+ }
323
+ }) + "\n"
324
+ );
325
+ process.exitCode = 78;
326
+ return;
327
+ }
328
+ }
329
+ let passphrase;
330
+ if (isBundleEncrypted(bundlePath)) {
331
+ passphrase = process.env["CLEO_BACKUP_PASSPHRASE"];
332
+ if (!passphrase) {
333
+ try {
334
+ passphrase = await promptPassphrase();
335
+ } catch (promptErr) {
336
+ const msg = promptErr instanceof Error ? promptErr.message : String(promptErr);
337
+ process.stderr.write(
338
+ JSON.stringify({ success: false, error: { code: 6, message: msg } }) + "\n"
339
+ );
340
+ process.exitCode = 6;
341
+ return;
342
+ }
343
+ }
344
+ }
345
+ let result;
346
+ try {
347
+ result = await unpackBundle({ bundlePath, passphrase });
348
+ } catch (err) {
349
+ if (err instanceof BundleError) {
350
+ process.stderr.write(
351
+ JSON.stringify({
352
+ success: false,
353
+ error: { code: err.code, codeName: err.codeName, message: err.message }
354
+ }) + "\n"
355
+ );
356
+ process.exitCode = err.code;
357
+ return;
358
+ }
359
+ const message = err instanceof Error ? err.message : String(err);
360
+ process.stderr.write(JSON.stringify({ success: false, error: { code: 1, message } }) + "\n");
361
+ process.exitCode = 1;
362
+ return;
363
+ }
364
+ const { stagingDir, manifest, warnings } = result;
365
+ try {
366
+ for (const dbEntry of manifest.databases) {
367
+ const src = path.join(stagingDir, dbEntry.filename);
368
+ if (!fs.existsSync(src)) continue;
369
+ const dst = resolveDbTarget(projectRoot, dbEntry.name, getCleoHome());
370
+ fs.mkdirSync(path.dirname(dst), { recursive: true });
371
+ const tmpDst = `${dst}.import-tmp-${Date.now()}`;
372
+ fs.copyFileSync(src, tmpDst);
373
+ fs.renameSync(tmpDst, dst);
374
+ for (const sidecar of [`${dst}-wal`, `${dst}-shm`]) {
375
+ if (fs.existsSync(sidecar)) {
376
+ try {
377
+ fs.unlinkSync(sidecar);
378
+ } catch {
379
+ }
380
+ }
381
+ }
382
+ }
383
+ const jsonReports = [];
384
+ for (const jsonEntry of manifest.json) {
385
+ const importedPath = path.join(stagingDir, jsonEntry.filename);
386
+ if (!fs.existsSync(importedPath)) continue;
387
+ const imported = JSON.parse(fs.readFileSync(importedPath, "utf-8"));
388
+ const basename = path.basename(jsonEntry.filename);
389
+ let localGenerated;
390
+ if (basename === CONFIG_JSON) {
391
+ localGenerated = regenerateConfigJson(projectRoot).content;
392
+ } else if (basename === PROJECT_INFO_JSON) {
393
+ localGenerated = regenerateProjectInfoJson(projectRoot).content;
394
+ } else {
395
+ localGenerated = regenerateProjectContextJson(projectRoot).content;
396
+ }
397
+ const report = regenerateAndCompare({
398
+ filename: basename,
399
+ imported,
400
+ localGenerated
401
+ });
402
+ jsonReports.push(report);
403
+ const targetPath = path.join(projectRoot, CLEO_DIR_NAME, basename);
404
+ fs.mkdirSync(path.dirname(targetPath), { recursive: true });
405
+ fs.writeFileSync(targetPath, JSON.stringify(report.applied, null, 2), "utf-8");
406
+ }
407
+ const cleoVersion = getCleoVersion();
408
+ const conflictMd = buildConflictReport({
409
+ reports: jsonReports,
410
+ bundlePath,
411
+ sourceMachineFingerprint: manifest.backup.machineFingerprint,
412
+ targetMachineFingerprint: sha256OfMachineKey(getCleoHome()),
413
+ cleoVersion,
414
+ schemaWarnings: warnings.map((w) => ({
415
+ db: w.db,
416
+ bundleVersion: w.bundleVersion,
417
+ localVersion: w.localVersion,
418
+ severity: w.severity
419
+ }))
420
+ });
421
+ writeConflictReport(projectRoot, conflictMd);
422
+ const importedDir = path.join(projectRoot, CLEO_DIR_NAME, RESTORE_IMPORTED_SUBDIR);
423
+ fs.mkdirSync(importedDir, { recursive: true });
424
+ for (const jsonEntry of manifest.json) {
425
+ const src = path.join(stagingDir, jsonEntry.filename);
426
+ if (!fs.existsSync(src)) continue;
427
+ const dst = path.join(importedDir, jsonEntry.filename);
428
+ fs.mkdirSync(path.dirname(dst), { recursive: true });
429
+ fs.copyFileSync(src, dst);
430
+ }
431
+ const totalConflicts = jsonReports.reduce((sum, r) => sum + r.conflictCount, 0);
432
+ const conflictReportPath = path.join(projectRoot, CLEO_DIR_NAME, RESTORE_CONFLICTS_MD);
433
+ cliOutput(
434
+ {
435
+ imported: bundlePath,
436
+ dbsRestored: manifest.databases.length,
437
+ jsonReports: jsonReports.map((r) => ({
438
+ filename: r.filename,
439
+ conflicts: r.conflictCount
440
+ })),
441
+ totalConflicts,
442
+ conflictReportPath
443
+ },
444
+ { command: "backup", operation: "backup.import" }
445
+ );
446
+ if (totalConflicts > 0) {
447
+ humanInfo(
448
+ `Restore complete with ${totalConflicts} unresolved conflict(s). Run 'cleo restore finalize' after resolving ${conflictReportPath}`
449
+ );
450
+ } else {
451
+ humanInfo(`Restore complete. Review ${conflictReportPath} for details.`);
452
+ }
453
+ } catch (restoreErr) {
454
+ const message = restoreErr instanceof Error ? restoreErr.message : String(restoreErr);
455
+ process.stderr.write(
456
+ JSON.stringify({
457
+ success: false,
458
+ error: { code: 79, codeName: "E_RESTORE_PARTIAL", message }
459
+ }) + "\n"
460
+ );
461
+ process.exitCode = 79;
462
+ } finally {
463
+ cleanupStaging(stagingDir);
464
+ }
465
+ }
466
+ });
467
+ var backupCommand = defineCommand({
468
+ meta: {
469
+ name: "backup",
470
+ description: "Add backup of todo files or list available backups"
471
+ },
472
+ subCommands: {
473
+ add: addCommand,
474
+ // 'create' is an alias for 'add' (citty duplicate-key pattern)
475
+ create: addCommand,
476
+ list: listCommand,
477
+ export: exportCommand,
478
+ import: importCommand,
479
+ inspect: backupInspectSubCommand,
480
+ recover: backupRecoverSubCommand,
481
+ verify: backupVerifySubCommand
482
+ },
483
+ async run({ cmd, rawArgs }) {
484
+ if (isSubCommandDispatch(rawArgs, cmd.subCommands)) return;
485
+ await dispatchFromCli("mutate", "admin", "backup", {}, { command: "backup" });
486
+ }
487
+ });
488
+ async function resolvePassphrase() {
489
+ let passphrase = process.env["CLEO_BACKUP_PASSPHRASE"];
490
+ if (!passphrase) {
491
+ try {
492
+ passphrase = await promptPassphrase();
493
+ } catch (promptErr) {
494
+ passphrase = void 0;
495
+ cliError(promptErr instanceof Error ? promptErr.message : String(promptErr), 6, {
496
+ name: "E_PASSPHRASE_REQUIRED"
497
+ });
498
+ }
499
+ }
500
+ if (!passphrase) {
501
+ if (process.exitCode === void 0) cliError("a passphrase is required", 6);
502
+ process.exitCode = 6;
503
+ return void 0;
504
+ }
505
+ return passphrase;
506
+ }
507
+ function collectFlagValues(rawArgs, flag) {
508
+ const values = [];
509
+ for (let i = 0; i < rawArgs.length; i++) {
510
+ const arg = rawArgs[i] ?? "";
511
+ if (arg === `--${flag}` && i + 1 < rawArgs.length) values.push(rawArgs[++i] ?? "");
512
+ else if (arg.startsWith(`--${flag}=`)) values.push(arg.slice(flag.length + 3));
513
+ }
514
+ return values;
515
+ }
516
+ async function portableImport(bundlePath, target, mapValues, force, confirmOwnerStore) {
517
+ const core = await import("@cleocode/core/store/portable-bundle-import.js");
518
+ const { PortableBundleError } = await import("@cleocode/core/store/portable-bundle.js");
519
+ try {
520
+ const needsPass = isBundleEncrypted(bundlePath);
521
+ const passphrase = needsPass ? await resolvePassphrase() : void 0;
522
+ if (needsPass && passphrase === void 0) return;
523
+ const result = await core.importPortableBundle({
524
+ bundlePath,
525
+ passphrase,
526
+ target,
527
+ maps: core.parsePathMappings(mapValues),
528
+ force: force === true,
529
+ requireLossless: true,
530
+ registerProject: core.registerRelocatedProject,
531
+ // T12708: the invocation directory; core never falls back to it.
532
+ cwd: process.cwd(),
533
+ confirmOwnerStore
534
+ });
535
+ cliOutput(result, { command: "backup", operation: "backup.import" });
536
+ } catch (err) {
537
+ reportBundleError(err, err instanceof PortableBundleError ? err : null, "E_IMPORT_FAILED");
538
+ }
539
+ }
540
+ function reportBundleError(err, bundleErr, fallbackName) {
541
+ const exitCode = bundleErr?.exitCode ?? 1;
542
+ cliError(err instanceof Error ? err.message : String(err), exitCode, {
543
+ name: bundleErr?.code ?? fallbackName,
544
+ ...bundleErr?.details !== void 0 ? { details: bundleErr.details } : {}
545
+ });
546
+ process.exitCode = exitCode;
547
+ }
548
+ function checkForExistingData(projectRoot, cleoHome) {
549
+ const projectFiles = CLI_PROJECT_BACKUP_FILES;
550
+ const globalFiles = CLI_GLOBAL_BACKUP_FILES;
551
+ const found = [];
552
+ for (const f of projectFiles) {
553
+ if (fs.existsSync(path.join(projectRoot, f))) found.push(f);
554
+ }
555
+ for (const f of globalFiles) {
556
+ const abs = path.join(cleoHome, f);
557
+ if (fs.existsSync(abs)) found.push(abs);
558
+ }
559
+ return found;
560
+ }
561
+ function resolveDbTarget(projectRoot, name, cleoHome) {
562
+ if (name === "nexus" || name === "signaldock") {
563
+ return path.join(cleoHome, `${name}.db`);
564
+ }
565
+ return path.join(projectRoot, CLEO_DIR_NAME, `${name}.db`);
566
+ }
567
+ function isBundleEncrypted(bundlePath) {
568
+ try {
569
+ const header = Buffer.alloc(8);
570
+ const fd = fs.openSync(bundlePath, "r");
571
+ fs.readSync(fd, header, 0, 8, 0);
572
+ fs.closeSync(fd);
573
+ return header.toString("utf8") === "CLEOENC1";
574
+ } catch {
575
+ return false;
576
+ }
577
+ }
578
+ function sha256OfMachineKey(cleoHome) {
579
+ const keyPath = path.join(cleoHome, "machine-key");
580
+ if (!fs.existsSync(keyPath)) {
581
+ return "0".repeat(64);
582
+ }
583
+ return crypto.createHash("sha256").update(fs.readFileSync(keyPath)).digest("hex");
584
+ }
585
+ export {
586
+ backupCommand
587
+ };
588
+ //# sourceMappingURL=backup-NUGBZ7NA.js.map
@@ -0,0 +1,26 @@
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
+ backupInspectSubCommand
18
+ } from "./chunk-QJJWWCIC.js";
19
+ import "./chunk-C3B7C43W.js";
20
+ import "./chunk-PKKZPOOP.js";
21
+ import "./chunk-4RGSNUUP.js";
22
+ import "./chunk-6JSJNYH2.js";
23
+ export {
24
+ backupInspectSubCommand
25
+ };
26
+ //# sourceMappingURL=backup-inspect-PDRXI45A.js.map
@@ -0,0 +1,29 @@
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
+ backupRecoverBrainLeaf,
18
+ backupRecoverSubCommand
19
+ } from "./chunk-2MGFDMDF.js";
20
+ import "./chunk-47JYZAMS.js";
21
+ import "./chunk-C3B7C43W.js";
22
+ import "./chunk-PKKZPOOP.js";
23
+ import "./chunk-4RGSNUUP.js";
24
+ import "./chunk-6JSJNYH2.js";
25
+ export {
26
+ backupRecoverBrainLeaf,
27
+ backupRecoverSubCommand
28
+ };
29
+ //# sourceMappingURL=backup-recover-TVKAPERB.js.map
@@ -0,0 +1,55 @@
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
+ dispatchFromCli
18
+ } from "./chunk-L7ONYSV6.js";
19
+ import "./chunk-6N6WGLXE.js";
20
+ import "./chunk-4VASFLUW.js";
21
+ import {
22
+ defineCommand
23
+ } from "./chunk-PKKZPOOP.js";
24
+ import "./chunk-QKMBWYAS.js";
25
+ import "./chunk-4RGSNUUP.js";
26
+ import "./chunk-6JSJNYH2.js";
27
+ import "./chunk-D7BAQNV2.js";
28
+ import "./chunk-TYC7G5LF.js";
29
+
30
+ // packages/cleo/src/cli/commands/blockers.ts
31
+ var blockersCommand = defineCommand({
32
+ meta: {
33
+ name: "blockers",
34
+ description: "Show blocked tasks and analyze blocking chains"
35
+ },
36
+ args: {
37
+ analyze: {
38
+ type: "boolean",
39
+ description: "Show full blocking chain analysis"
40
+ }
41
+ },
42
+ async run({ args }) {
43
+ await dispatchFromCli(
44
+ "query",
45
+ "tasks",
46
+ "blockers",
47
+ { analyze: !!args.analyze },
48
+ { command: "blockers" }
49
+ );
50
+ }
51
+ });
52
+ export {
53
+ blockersCommand
54
+ };
55
+ //# sourceMappingURL=blockers-ZOPCGHDW.js.map