@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,35 @@
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
+
17
+ // packages/cleo/src/dispatch/registry.ts
18
+ import {
19
+ deriveGatewayMatrix,
20
+ getActiveDomains,
21
+ getByDomain,
22
+ getByGateway,
23
+ getByTier,
24
+ getCounts,
25
+ getGatewayDomains,
26
+ OPERATIONS,
27
+ resolve,
28
+ validateRequiredParams
29
+ } from "@cleocode/runtime/gateway/dispatch";
30
+
31
+ export {
32
+ OPERATIONS,
33
+ resolve
34
+ };
35
+ //# sourceMappingURL=chunk-4VASFLUW.js.map
@@ -0,0 +1,124 @@
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
+ } from "./chunk-4RGSNUUP.js";
23
+
24
+ // packages/cleo/src/cli/commands/llm-cost.ts
25
+ import { getProjectRoot } from "@cleocode/core/internal";
26
+ import { computeCost } from "@cleocode/core/llm/usage-pricing";
27
+ function resolveSessionId(raw) {
28
+ if (raw === "current") {
29
+ const envId = process.env["CLEO_SESSION_ID"];
30
+ if (envId) return envId;
31
+ return "current";
32
+ }
33
+ return raw;
34
+ }
35
+ async function loadSessionCostBreakdown(projectRoot, sessionId) {
36
+ const { listTokenUsage } = await import(
37
+ /* webpackIgnore: true */
38
+ "@cleocode/core/internal"
39
+ );
40
+ const result = await listTokenUsage(projectRoot, {
41
+ sessionId,
42
+ limit: 1e3
43
+ // Practical upper bound for a single session.
44
+ });
45
+ const entries = result.records.map(
46
+ (row) => {
47
+ const usage = {
48
+ inputTokens: row.inputTokens,
49
+ outputTokens: row.outputTokens
50
+ };
51
+ const model = row.model ?? "unknown";
52
+ return {
53
+ id: row.id,
54
+ provider: row.provider,
55
+ model: row.model,
56
+ usage,
57
+ costUsd: computeCost(usage, model),
58
+ createdAt: row.createdAt
59
+ };
60
+ }
61
+ );
62
+ entries.sort((a, b) => a.createdAt.localeCompare(b.createdAt));
63
+ return entries;
64
+ }
65
+ var costCommand = defineCommand({
66
+ meta: {
67
+ name: "cost",
68
+ description: 'Compute cumulative USD cost for an LLM session from recorded token_usage entries. Use "current" to resolve the active session from CLEO_SESSION_ID. Returns totalUsd=0 when no usage records exist yet (ADR-072 Wave 4b pending).'
69
+ },
70
+ args: {
71
+ sessionId: {
72
+ type: "positional",
73
+ description: 'Session id to query, or "current" for the active session',
74
+ required: true
75
+ },
76
+ json: {
77
+ type: "boolean",
78
+ description: "Output as JSON"
79
+ }
80
+ },
81
+ async run({ args }) {
82
+ const a = args;
83
+ const rawSessionId = String(a["sessionId"] ?? "");
84
+ if (!rawSessionId) {
85
+ cliError("session-id is required", 6, {
86
+ name: "E_VALIDATION",
87
+ fix: 'Provide a session id or "current": cleo llm cost <session-id>'
88
+ });
89
+ process.exit(6);
90
+ }
91
+ const sessionId = resolveSessionId(rawSessionId);
92
+ const projectRoot = getProjectRoot(process.cwd());
93
+ let breakdown;
94
+ try {
95
+ breakdown = await loadSessionCostBreakdown(projectRoot, sessionId);
96
+ } catch (err) {
97
+ const message = err instanceof Error ? err.message : String(err);
98
+ cliError(`Failed to query token_usage: ${message}`, 1, {
99
+ name: "E_QUERY_FAILED",
100
+ fix: "Ensure tasks.db is initialized: cleo session start"
101
+ });
102
+ process.exit(1);
103
+ }
104
+ const totalUsd = breakdown.reduce((sum, entry) => sum + entry.costUsd, 0);
105
+ const result = {
106
+ sessionId,
107
+ totalUsd,
108
+ recordCount: breakdown.length,
109
+ breakdown
110
+ };
111
+ if (breakdown.length === 0) {
112
+ result.note = "No token_usage records found for this session. Live usage wiring is pending ADR-072 Wave 4b (LlmExecutor done event). Records will appear automatically once that wave ships.";
113
+ }
114
+ cliOutput(result, {
115
+ command: "llm-cost",
116
+ operation: "llm.cost"
117
+ });
118
+ }
119
+ });
120
+
121
+ export {
122
+ costCommand
123
+ };
124
+ //# sourceMappingURL=chunk-5PNI276X.js.map
@@ -0,0 +1,114 @@
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
+
17
+ // packages/cleo/src/cli/field-context.ts
18
+ import {
19
+ resolveFieldExtraction
20
+ } from "@cleocode/lafs";
21
+ var currentContext = {
22
+ mvi: "minimal",
23
+ mviSource: "default",
24
+ expectsCustomMvi: false
25
+ };
26
+ function setFieldContext(ctx) {
27
+ currentContext = ctx;
28
+ }
29
+ function getFieldContext() {
30
+ return currentContext;
31
+ }
32
+ function resolveFieldContext(opts) {
33
+ const input = {
34
+ fieldFlag: typeof opts["field"] === "string" ? opts["field"] : void 0,
35
+ fieldsFlag: typeof opts["fields"] === "string" ? opts["fields"] : void 0,
36
+ mviFlag: typeof opts["mvi"] === "string" ? opts["mvi"] : void 0
37
+ };
38
+ return resolveFieldExtraction(input);
39
+ }
40
+ async function withoutOutputPointer(step) {
41
+ const saved = currentContext;
42
+ const { field: _field, ...rest } = saved;
43
+ currentContext = rest;
44
+ try {
45
+ return await step();
46
+ } finally {
47
+ currentContext = saved;
48
+ }
49
+ }
50
+
51
+ // packages/cleo/src/cli/format-context.ts
52
+ var currentResolution = {
53
+ format: "json",
54
+ source: "default",
55
+ quiet: false
56
+ };
57
+ function setFormatContext(resolution) {
58
+ currentResolution = resolution;
59
+ }
60
+ function getFormatContext() {
61
+ return currentResolution;
62
+ }
63
+ function isJsonFormat() {
64
+ return currentResolution.format === "json";
65
+ }
66
+ function isQuiet() {
67
+ return currentResolution.quiet;
68
+ }
69
+
70
+ // packages/cleo/src/cli/output-context.ts
71
+ var OUTPUT_MODES = ["envelope", "id", "table", "count", "silent"];
72
+ var OUTPUT_MODE_ALIASES = {
73
+ json: "envelope"
74
+ };
75
+ function resolveOutputMode(value) {
76
+ if (isOutputMode(value)) return value;
77
+ return OUTPUT_MODE_ALIASES[value];
78
+ }
79
+ var currentMode = "envelope";
80
+ function setOutputMode(mode) {
81
+ currentMode = mode;
82
+ }
83
+ function getOutputMode() {
84
+ return currentMode;
85
+ }
86
+ function isOutputMode(value) {
87
+ return OUTPUT_MODES.includes(value);
88
+ }
89
+
90
+ // packages/cleo/src/cli/summary-context.ts
91
+ var currentSummary = false;
92
+ function setSummaryMode(on) {
93
+ currentSummary = on;
94
+ }
95
+ function getSummaryMode() {
96
+ return currentSummary;
97
+ }
98
+
99
+ export {
100
+ setFieldContext,
101
+ getFieldContext,
102
+ resolveFieldContext,
103
+ withoutOutputPointer,
104
+ setFormatContext,
105
+ getFormatContext,
106
+ isJsonFormat,
107
+ isQuiet,
108
+ resolveOutputMode,
109
+ setOutputMode,
110
+ getOutputMode,
111
+ setSummaryMode,
112
+ getSummaryMode
113
+ };
114
+ //# sourceMappingURL=chunk-6JSJNYH2.js.map
@@ -0,0 +1,63 @@
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
+
17
+ // packages/cleo/src/cli/paths.ts
18
+ import {
19
+ BRAIN_DB_FILENAME,
20
+ CLEO_DIR_NAME,
21
+ WORKFLOWS_SUBDIR
22
+ } from "@cleocode/runtime/gateway/dispatch";
23
+ var AGENTS_SUBDIR = "agents";
24
+ var CANT_AGENTS_SUBDIR = "cant/agents";
25
+ var TEMPLATES_SUBDIR = "templates";
26
+ var RESTORE_IMPORTED_SUBDIR = "restore-imported";
27
+ var TASKS_DB_FILENAME = "tasks.db";
28
+ var CONDUIT_DB_FILENAME = "conduit.db";
29
+ var NEXUS_DB_FILENAME = "nexus.db";
30
+ var SIGNALDOCK_DB_FILENAME = "signaldock.db";
31
+ var CONFIG_JSON = "config.json";
32
+ var PROJECT_INFO_JSON = "project-info.json";
33
+ var PROJECT_CONTEXT_JSON = "project-context.json";
34
+ var RESTORE_CONFLICTS_MD = "restore-conflicts.md";
35
+ var MIGRATE_MEMORY_HASHES_JSON = "migrate-memory-hashes.json";
36
+ var CLEO_INJECTION_MD = "CLEO-INJECTION.md";
37
+ var CLI_PROJECT_BACKUP_FILES = [
38
+ `${CLEO_DIR_NAME}/${TASKS_DB_FILENAME}`,
39
+ `${CLEO_DIR_NAME}/${BRAIN_DB_FILENAME}`,
40
+ `${CLEO_DIR_NAME}/${CONDUIT_DB_FILENAME}`,
41
+ `${CLEO_DIR_NAME}/${CONFIG_JSON}`,
42
+ `${CLEO_DIR_NAME}/${PROJECT_INFO_JSON}`,
43
+ `${CLEO_DIR_NAME}/${PROJECT_CONTEXT_JSON}`
44
+ ];
45
+ var CLI_GLOBAL_BACKUP_FILES = [NEXUS_DB_FILENAME, SIGNALDOCK_DB_FILENAME];
46
+ var RESTORE_DEFAULT_FILE = TASKS_DB_FILENAME;
47
+
48
+ export {
49
+ CLEO_DIR_NAME,
50
+ AGENTS_SUBDIR,
51
+ CANT_AGENTS_SUBDIR,
52
+ TEMPLATES_SUBDIR,
53
+ RESTORE_IMPORTED_SUBDIR,
54
+ CONFIG_JSON,
55
+ PROJECT_INFO_JSON,
56
+ RESTORE_CONFLICTS_MD,
57
+ MIGRATE_MEMORY_HASHES_JSON,
58
+ CLEO_INJECTION_MD,
59
+ CLI_PROJECT_BACKUP_FILES,
60
+ CLI_GLOBAL_BACKUP_FILES,
61
+ RESTORE_DEFAULT_FILE
62
+ };
63
+ //# sourceMappingURL=chunk-6N6WGLXE.js.map
@@ -0,0 +1,210 @@
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
+ negatedFlag
18
+ } from "./chunk-47JYZAMS.js";
19
+ import {
20
+ defineCommand
21
+ } from "./chunk-PKKZPOOP.js";
22
+ import {
23
+ cliError,
24
+ cliOutput
25
+ } from "./chunk-4RGSNUUP.js";
26
+
27
+ // packages/cleo/src/cli/commands/doctor-db-substrate.ts
28
+ import { dirname } from "node:path";
29
+ import { surveyDbSubstrate, surveyFleetDbSubstrate } from "@cleocode/core/doctor/db-substrate.js";
30
+ import { NexusRegistryReadError } from "@cleocode/core/nexus/registry-errors.js";
31
+ import { listRegistryParentRoots } from "@cleocode/core/nexus/registry-roots.js";
32
+ import { pushWarning } from "@cleocode/core/output";
33
+ import { getProjectRoot } from "@cleocode/core/project-scope";
34
+ async function defaultFleetRoots() {
35
+ const roots = await listRegistryParentRoots();
36
+ return roots.length > 0 ? roots : [dirname(getProjectRoot())];
37
+ }
38
+ function reportRegistryReadError(error) {
39
+ cliError(
40
+ error.message,
41
+ error.code,
42
+ {
43
+ name: error.codeName,
44
+ fix: `Pass \`--fleet-root <dir>\` to survey without the registry. ${error.fix ?? ""}`.trim(),
45
+ details: error.details
46
+ },
47
+ { operation: "doctor.db-substrate.run" }
48
+ );
49
+ process.exitCode = error.code;
50
+ }
51
+ function pushSubstrateWarnings(result) {
52
+ for (const warning of result.warnings) {
53
+ const context = {
54
+ kind: warning.kind,
55
+ path: warning.path,
56
+ lastWriteMs: warning.lastWriteMs
57
+ };
58
+ if (warning.kind === "orphan-project-root") {
59
+ context["parentWorkspace"] = warning.parentWorkspace ?? null;
60
+ }
61
+ pushWarning({
62
+ code: warning.kind === "orphan-project-root" ? "W_DB_SUBSTRATE_ORPHAN_PROJECT_ROOT" : "W_DB_SUBSTRATE_NESTED_NEXUS_DUPLICATE",
63
+ message: warning.kind === "orphan-project-root" ? `Orphan project-root .cleo/ at ${warning.path} (T9550 regression class \u2014 review then remove)` + (warning.parentWorkspace ? ` \u2014 attributed to workspace: ${warning.parentWorkspace}` : "") : `Nested-nexus duplicate at ${warning.path} (structural duplicate of the canonical flat layout)`,
64
+ severity: "warn",
65
+ context
66
+ });
67
+ }
68
+ for (const projectSurvey of result.projects) {
69
+ for (const [role, entry] of Object.entries(projectSurvey.dbs)) {
70
+ if (entry.pragmaDrift === null || entry.pragmaDrift.length === 0) continue;
71
+ for (const drift of entry.pragmaDrift) {
72
+ pushWarning({
73
+ code: "W_DB_SUBSTRATE_PRAGMA_DRIFT",
74
+ message: `Pragma drift on ${role} (${entry.filePath}): expected ${drift.pragma}=${drift.expected}, actual=${drift.actual ?? "<unmeasurable>"}`,
75
+ severity: "warn",
76
+ context: {
77
+ role,
78
+ filePath: entry.filePath,
79
+ pragma: drift.pragma,
80
+ expected: drift.expected,
81
+ actual: drift.actual
82
+ }
83
+ });
84
+ }
85
+ }
86
+ }
87
+ for (const report of result.crossDbOrphans) {
88
+ if (report.skipped || report.orphanCount === 0) continue;
89
+ pushWarning({
90
+ code: `W_DB_SUBSTRATE_CROSS_DB_${report.invariant}`,
91
+ message: `${report.invariant}: ${report.orphanCount} orphan row${report.orphanCount === 1 ? "" : "s"} \u2014 ${report.description}. ${report.suggestedFix}`,
92
+ severity: "warn",
93
+ context: {
94
+ invariant: report.invariant,
95
+ orphanCount: report.orphanCount,
96
+ sample: report.sample.join(","),
97
+ suggestedFix: report.suggestedFix
98
+ }
99
+ });
100
+ }
101
+ }
102
+ function pushPerDbWarnings(result) {
103
+ for (const projectSurvey of result.projects) {
104
+ for (const [role, dbEntry] of Object.entries(projectSurvey.dbs)) {
105
+ if (dbEntry.quarantinedTo !== null) {
106
+ pushWarning({
107
+ code: "W_DB_SUBSTRATE_AUTO_QUARANTINED",
108
+ message: `Auto-quarantined corrupt ${role} DB at ${dbEntry.filePath} \u2192 ${dbEntry.quarantinedTo}. Recover via: cleo backup recover ${role}`,
109
+ severity: "warn",
110
+ context: {
111
+ role,
112
+ filePath: dbEntry.filePath,
113
+ quarantinedTo: dbEntry.quarantinedTo,
114
+ integrityCheckMs: dbEntry.integrityCheckMs
115
+ }
116
+ });
117
+ }
118
+ if (dbEntry.timedOut) {
119
+ pushWarning({
120
+ code: "W_DB_SUBSTRATE_INTEGRITY_TIMEOUT",
121
+ message: `integrity_check on ${role} DB at ${dbEntry.filePath} took ${dbEntry.integrityCheckMs}ms \u2014 slow substrate flagged for operator attention`,
122
+ severity: "warn",
123
+ context: {
124
+ role,
125
+ filePath: dbEntry.filePath,
126
+ integrityCheckMs: dbEntry.integrityCheckMs
127
+ }
128
+ });
129
+ }
130
+ }
131
+ }
132
+ }
133
+ var doctorDbSubstrateCommand = defineCommand({
134
+ meta: {
135
+ name: "db-substrate",
136
+ description: "Walk every DB in the inventory + report integrity, row counts, orphan dirs. Use --fleet for a multi-project survey under --fleet-root (default: parent dirs of registered projects)."
137
+ },
138
+ args: {
139
+ fleet: {
140
+ type: "boolean",
141
+ description: "Multi-project survey \u2014 walk every .cleo/-bearing subdir under --fleet-root"
142
+ },
143
+ "fleet-root": {
144
+ type: "string",
145
+ description: "Fleet root path (default: parent directories of registered projects). Only used with --fleet."
146
+ },
147
+ "integrity-timeout-ms": {
148
+ type: "string",
149
+ description: "Wall-clock budget for each PRAGMA integrity_check call (ms; default 60000; 0 disables)."
150
+ },
151
+ "no-quarantine": {
152
+ type: "boolean",
153
+ description: "Disable auto-quarantine of corrupt DBs (leaves them in place; report-only mode)."
154
+ },
155
+ "confirm-owner-store": {
156
+ type: "boolean",
157
+ description: "From inside a git worktree: allow quarantining the owning project's LIVE store (skipped without it)",
158
+ default: false
159
+ },
160
+ json: { type: "boolean", description: "Output as JSON" },
161
+ human: { type: "boolean", description: "Force human-readable output" },
162
+ quiet: { type: "boolean", description: "Suppress non-essential output" }
163
+ },
164
+ async run({ args }) {
165
+ const isFleet = args.fleet === true;
166
+ let parsedTimeoutMs;
167
+ if (typeof args["integrity-timeout-ms"] === "string" && args["integrity-timeout-ms"].length > 0) {
168
+ const n = Number.parseInt(args["integrity-timeout-ms"], 10);
169
+ if (Number.isFinite(n) && n >= 0) {
170
+ parsedTimeoutMs = n;
171
+ }
172
+ }
173
+ const options = {
174
+ ...parsedTimeoutMs !== void 0 ? { integrityCheckTimeoutMs: parsedTimeoutMs } : {},
175
+ autoQuarantine: !negatedFlag(args, "quarantine"),
176
+ // T12708: the invocation directory; the quarantine guard checks it.
177
+ cwd: process.cwd(),
178
+ confirmOwnerStore: args["confirm-owner-store"] === true
179
+ };
180
+ let fleetRoots;
181
+ if (isFleet) {
182
+ if (typeof args["fleet-root"] === "string" && args["fleet-root"].length > 0) {
183
+ fleetRoots = args["fleet-root"];
184
+ } else {
185
+ try {
186
+ fleetRoots = await defaultFleetRoots();
187
+ } catch (error) {
188
+ if (!(error instanceof NexusRegistryReadError)) throw error;
189
+ reportRegistryReadError(error);
190
+ return;
191
+ }
192
+ }
193
+ }
194
+ const result = fleetRoots !== void 0 ? surveyFleetDbSubstrate(fleetRoots, options) : surveyDbSubstrate(getProjectRoot(), options);
195
+ pushSubstrateWarnings(result);
196
+ pushPerDbWarnings(result);
197
+ cliOutput(result, {
198
+ command: "doctor",
199
+ operation: "doctor.db-substrate.run"
200
+ });
201
+ if (result.summary.corrupt > 0 && (process.exitCode === void 0 || process.exitCode === 0)) {
202
+ process.exitCode = 2;
203
+ }
204
+ }
205
+ });
206
+
207
+ export {
208
+ doctorDbSubstrateCommand
209
+ };
210
+ //# sourceMappingURL=chunk-75UH3BLS.js.map
@@ -0,0 +1,92 @@
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
+ cliOutput
21
+ } from "./chunk-4RGSNUUP.js";
22
+
23
+ // packages/cleo/src/cli/commands/doctor-split-brain.ts
24
+ import { writeFileSync } from "node:fs";
25
+ import {
26
+ importSplitBrain,
27
+ verifyPreexistingRows
28
+ } from "@cleocode/core/store/split-brain-import.js";
29
+ var doctorSplitBrainCommand = defineCommand({
30
+ meta: {
31
+ name: "split-brain",
32
+ description: "Import rows that exist only in a diverged copy of a store (--source) into another (--target) under new task ids, with provenance. Dry-run unless --apply; --verify-before <snapshot> proves no pre-existing target row changed."
33
+ },
34
+ args: {
35
+ source: {
36
+ type: "string",
37
+ description: "Store with the extra rows (opened read-only)",
38
+ required: true
39
+ },
40
+ target: { type: "string", description: "Store that receives them", required: true },
41
+ apply: { type: "boolean", description: "Write the target (default: dry run)" },
42
+ label: { type: "string", description: "Provenance label for the source (default: its path)" },
43
+ "diverged-after": {
44
+ type: "string",
45
+ description: "Override the detected divergence point (ISO 8601)"
46
+ },
47
+ receipt: { type: "string", description: "Also write the receipt JSON to this file" },
48
+ task: {
49
+ type: "string",
50
+ description: "Task that records provenance of imported non-task rows (required with --apply when there are any)"
51
+ },
52
+ "verify-before": {
53
+ type: "string",
54
+ description: "Pre-import snapshot of the target; verify every one of its rows is unchanged"
55
+ },
56
+ json: { type: "boolean", description: "Output as JSON" },
57
+ human: { type: "boolean", description: "Force human-readable output" },
58
+ quiet: { type: "boolean", description: "Suppress non-essential output" }
59
+ },
60
+ async run({ args }) {
61
+ const report = importSplitBrain({
62
+ sourcePath: String(args.source),
63
+ targetPath: String(args.target),
64
+ dryRun: !args.apply,
65
+ sourceLabel: args.label ? String(args.label) : void 0,
66
+ divergedAfter: args["diverged-after"] ? String(args["diverged-after"]) : void 0,
67
+ provenanceTaskId: args.task ? String(args.task) : void 0
68
+ });
69
+ const verification = args["verify-before"] ? verifyPreexistingRows(String(args["verify-before"]), String(args.target)) : void 0;
70
+ const changed = verification?.filter((check) => check.missingOrChanged > 0) ?? [];
71
+ const result = {
72
+ ...report,
73
+ ...verification && {
74
+ verification: {
75
+ tablesChecked: verification.length,
76
+ rowsBefore: verification.reduce((sum, check) => sum + check.before, 0),
77
+ rowsAfter: verification.reduce((sum, check) => sum + check.after, 0),
78
+ missingOrChanged: changed
79
+ }
80
+ }
81
+ };
82
+ if (args.receipt) writeFileSync(String(args.receipt), `${JSON.stringify(result, null, 2)}
83
+ `);
84
+ cliOutput(result, { command: "doctor", operation: "doctor.split-brain.run" });
85
+ if (changed.length > 0 && (process.exitCode ?? 0) === 0) process.exitCode = 1;
86
+ }
87
+ });
88
+
89
+ export {
90
+ doctorSplitBrainCommand
91
+ };
92
+ //# sourceMappingURL=chunk-7ACK4EIN.js.map