@cleocode/cleo 2026.10.2 → 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.
- package/bin/cleo.js +11 -1
- package/dist/cli/adapter-LVXHFBC4.js +158 -0
- package/dist/cli/add-WUAV7LDT.js +443 -0
- package/dist/cli/add-batch-U2DLKAQC.js +163 -0
- package/dist/cli/admin-I7BQYVZD.js +340 -0
- package/dist/cli/adr-K2THMQBS.js +171 -0
- package/dist/cli/agent-WQ6XY2DW.js +2366 -0
- package/dist/cli/agent-outputs-BJIYLVTU.js +84 -0
- package/dist/cli/analyze-PGQZWGOC.js +48 -0
- package/dist/cli/archive-5LZPF7C3.js +64 -0
- package/dist/cli/archive-stats-U6CYC6JM.js +100 -0
- package/dist/cli/attention-SOURWCNI.js +167 -0
- package/dist/cli/audit-FO2Y4LH2.js +122 -0
- package/dist/cli/auth-ED7TAIXI.js +491 -0
- package/dist/cli/backfill-32TRAYRD.js +156 -0
- package/dist/cli/backup-LEJMZJKL.js +587 -0
- package/dist/cli/backup-inspect-6HPLUEI2.js +26 -0
- package/dist/cli/backup-recover-2BTYBZU2.js +29 -0
- package/dist/cli/blockers-5JULUJTV.js +54 -0
- package/dist/cli/brain-273N3FW4.js +400 -0
- package/dist/cli/briefing-7H6OLECX.js +212 -0
- package/dist/cli/caamp-MFQVN6VU.js +181 -0
- package/dist/cli/cancel-SCMJTXZB.js +84 -0
- package/dist/cli/canon-NPF5RODM.js +142 -0
- package/dist/cli/canon-docs-2GTOLF7Y.js +26 -0
- package/dist/cli/cant-46XCUP4P.js +239 -0
- package/dist/cli/changeset-32NMBGG2.js +248 -0
- package/dist/cli/check-RWJLBCI2.js +907 -0
- package/dist/cli/checkpoint-37HMMKD7.js +128 -0
- package/dist/cli/chunk-2JIJD2I7.js +108 -0
- package/dist/cli/chunk-37NU2XDP.js +171 -0
- package/dist/cli/chunk-3IOQVUO7.js +17308 -0
- package/dist/cli/chunk-3PGH67MT.js +175 -0
- package/dist/cli/chunk-3ZO3M37V.js +1002 -0
- package/dist/cli/chunk-47JYZAMS.js +30 -0
- package/dist/cli/chunk-5J2VH3BC.js +66 -0
- package/dist/cli/chunk-5ZFFUFH7.js +92 -0
- package/dist/cli/chunk-6JSJNYH2.js +114 -0
- package/dist/cli/chunk-7INMKEAD.js +85 -0
- package/dist/cli/chunk-A2IUEIM5.js +278 -0
- package/dist/cli/chunk-AWCQH2W5.js +35 -0
- package/dist/cli/chunk-AYA6F4ZT.js +56 -0
- package/dist/cli/chunk-BCEXRFA2.js +76 -0
- package/dist/cli/chunk-BPEVD37G.js +124 -0
- package/dist/cli/chunk-C3B7C43W.js +16 -0
- package/dist/cli/chunk-DVTPIZJM.js +72 -0
- package/dist/cli/chunk-DYABOIHB.js +96 -0
- package/dist/cli/chunk-EBRZ76HS.js +51 -0
- package/dist/cli/chunk-EGOTK2HA.js +57 -0
- package/dist/cli/chunk-EOPQFCSR.js +148 -0
- package/dist/cli/chunk-FORFDPP5.js +288 -0
- package/dist/cli/chunk-GFGLLDXX.js +110 -0
- package/dist/cli/chunk-GH37QXW5.js +280 -0
- package/dist/cli/chunk-GZFVDR44.js +320 -0
- package/dist/cli/chunk-I3CRQQAD.js +225 -0
- package/dist/cli/chunk-J3ZFM3UQ.js +754 -0
- package/dist/cli/chunk-JNZJPIPJ.js +90 -0
- package/dist/cli/chunk-KHB52JNB.js +209 -0
- package/dist/cli/chunk-KJDWWQFY.js +46 -0
- package/dist/cli/chunk-LKNUA3SB.js +83 -0
- package/dist/cli/chunk-LVGIFMCV.js +163 -0
- package/dist/cli/chunk-LWQBJQSE.js +67 -0
- package/dist/cli/chunk-MNJRLSEQ.js +107 -0
- package/dist/cli/chunk-NRKWJLMS.js +91 -0
- package/dist/cli/chunk-NSHV2JNM.js +48 -0
- package/dist/cli/chunk-NWTATTEQ.js +210 -0
- package/dist/cli/chunk-OAPN46TC.js +89 -0
- package/dist/cli/chunk-OGV57L4J.js +59 -0
- package/dist/cli/chunk-OILHT47L.js +252 -0
- package/dist/cli/chunk-OPTEQKBB.js +258 -0
- package/dist/cli/chunk-PKKZPOOP.js +352 -0
- package/dist/cli/chunk-QA6T2LQ5.js +71 -0
- package/dist/cli/chunk-QFFQSKRC.js +4497 -0
- package/dist/cli/chunk-QPUY2HQZ.js +74 -0
- package/dist/cli/chunk-REUTEW3O.js +258 -0
- package/dist/cli/chunk-S24YI723.js +88 -0
- package/dist/cli/chunk-SXXOC6KZ.js +209 -0
- package/dist/cli/chunk-ULN4OKQQ.js +259 -0
- package/dist/cli/chunk-V5GBGOGM.js +46 -0
- package/dist/cli/chunk-VLEYOOPH.js +31 -0
- package/dist/cli/chunk-W33Q3FBH.js +66 -0
- package/dist/cli/chunk-W3JLYKKY.js +140 -0
- package/dist/cli/chunk-XRAX6XFP.js +48 -0
- package/dist/cli/chunk-YGKEECTI.js +78 -0
- package/dist/cli/chunk-YUZJI67I.js +108 -0
- package/dist/cli/chunk-YY66LFZF.js +29 -0
- package/dist/cli/chunk-ZBISIPCK.js +78 -0
- package/dist/cli/chunk-ZZTHTMQP.js +77 -0
- package/dist/cli/claim-KPENYHIQ.js +96 -0
- package/dist/cli/classify-DRVMCFQU.js +117 -0
- package/dist/cli/cli-T3CR7J57.js +48 -0
- package/dist/cli/cloud-PPQ4O5TX.js +565 -0
- package/dist/cli/cockpit-RZKLGYPN.js +790 -0
- package/dist/cli/code-Z5CTMVTD.js +178 -0
- package/dist/cli/complete-UBOCOBRB.js +34 -0
- package/dist/cli/complexity-BV2AGQRZ.js +56 -0
- package/dist/cli/compliance-32PD5Y47.js +276 -0
- package/dist/cli/conduit-VDKCH33F.js +307 -0
- package/dist/cli/config-I72JAXK4.js +516 -0
- package/dist/cli/consensus-LFILLSTK.js +121 -0
- package/dist/cli/context-XUUVFVTP.js +141 -0
- package/dist/cli/contribution-37NQ4N5R.js +111 -0
- package/dist/cli/curator-TFDXU2EX.js +139 -0
- package/dist/cli/current-C4SN5BWV.js +42 -0
- package/dist/cli/daemon-DV25JQ62.js +451 -0
- package/dist/cli/dash-TFU4RLQW.js +70 -0
- package/dist/cli/decide-5VPMNTSI.js +419 -0
- package/dist/cli/decompose-KOYEZNJL.js +77 -0
- package/dist/cli/decomposition-7OHUFIQN.js +121 -0
- package/dist/cli/delete-Q7YCAFY5.js +68 -0
- package/dist/cli/deps-6UZKLDGJ.js +463 -0
- package/dist/cli/detect-FERY35UL.js +45 -0
- package/dist/cli/detect-drift-UL2JTPUK.js +408 -0
- package/dist/cli/diagnostics-TI5QAZXR.js +132 -0
- package/dist/cli/docs-QI2PRN3T.js +3095 -0
- package/dist/cli/doctor-AX5TICQO.js +1253 -0
- package/dist/cli/doctor-ac-bindings-YPMYHU2G.js +26 -0
- package/dist/cli/doctor-acceptance-drift-PYNFGMKB.js +26 -0
- package/dist/cli/doctor-credentials-UZRIADKM.js +26 -0
- package/dist/cli/doctor-db-substrate-Q2TOYM2S.js +27 -0
- package/dist/cli/doctor-dep-cycles-GCVYZY6F.js +26 -0
- package/dist/cli/doctor-exodus-RO5SUTC2.js +26 -0
- package/dist/cli/doctor-exodus-residue-EM2AWQXP.js +26 -0
- package/dist/cli/doctor-fk-check-Q3FOLECE.js +26 -0
- package/dist/cli/doctor-global-delivery-TNOAQ3NP.js +26 -0
- package/dist/cli/doctor-heavy-command-hook-IO3QAQLG.js +26 -0
- package/dist/cli/doctor-legacy-backups-O2YH5VLS.js +26 -0
- package/dist/cli/doctor-legacy-reaper-VSEJEIFA.js +26 -0
- package/dist/cli/doctor-malformed-ids-LQ766V5K.js +26 -0
- package/dist/cli/doctor-manifest-rows-6FQDNHLH.js +26 -0
- package/dist/cli/doctor-memory-guard-J4PSEKB5.js +26 -0
- package/dist/cli/doctor-migrations-ONOH56YM.js +26 -0
- package/dist/cli/doctor-nexus-residency-FUQAX7PV.js +26 -0
- package/dist/cli/doctor-project-identity-GUDK3HYX.js +26 -0
- package/dist/cli/doctor-projects-7L3BNL4O.js +30 -0
- package/dist/cli/doctor-projects-registry-TEAVHFQU.js +26 -0
- package/dist/cli/doctor-release-readiness-IEGHX6SL.js +26 -0
- package/dist/cli/doctor-repair-NBONOSZU.js +26 -0
- package/dist/cli/doctor-skill-fixtures-7Y6L34A3.js +26 -0
- package/dist/cli/doctor-split-brain-TUKIGVHF.js +26 -0
- package/dist/cli/doctor-superseded-store-BHZY2B2L.js +26 -0
- package/dist/cli/doctor-tool-locks-REQMIVYK.js +26 -0
- package/dist/cli/doctor-twin-collapse-222GOSPE.js +26 -0
- package/dist/cli/doctor-worktree-stores-J7TCRVJ3.js +26 -0
- package/dist/cli/done-V3AOO65B.js +195 -0
- package/dist/cli/dynamic-RR4HB7BB.js +29 -0
- package/dist/cli/event-EGNPGE5A.js +372 -0
- package/dist/cli/exists-H4SDCBPL.js +65 -0
- package/dist/cli/exodus-KALO3B3X.js +401 -0
- package/dist/cli/export-ROFOCG4M.js +92 -0
- package/dist/cli/export-tasks-US3WBIEQ.js +96 -0
- package/dist/cli/federation-SUIB5QWT.js +145 -0
- package/dist/cli/find-YICG4BG6.js +177 -0
- package/dist/cli/focus-TKCZPKOM.js +55 -0
- package/dist/cli/gateway-H4HFDC3E.js +77 -0
- package/dist/cli/gateway-auto-start-EDK7XI6E.js +36 -0
- package/dist/cli/gc-5R2TUY5T.js +291 -0
- package/dist/cli/go-PRQFK5YG.js +206 -0
- package/dist/cli/goal-7CZRMLHC.js +212 -0
- package/dist/cli/grade-PY2YRPUS.js +56 -0
- package/dist/cli/graph-XIXMCFKG.js +878 -0
- package/dist/cli/history-EIXADPAD.js +137 -0
- package/dist/cli/hook-UF7J7R6D.js +57 -0
- package/dist/cli/hook-entry.js +244 -19
- package/dist/cli/hygiene-3QZ2NI7P.js +55 -0
- package/dist/cli/import-R73SO444.js +88 -0
- package/dist/cli/import-tasks-O22FZJ4U.js +108 -0
- package/dist/cli/index.js +419 -94607
- package/dist/cli/init-IHEJDQWU.js +40 -0
- package/dist/cli/inject-LSRVWNCP.js +82 -0
- package/dist/cli/install-global-4AZUCH6U.js +95 -0
- package/dist/cli/intelligence-2OSFOGD2.js +181 -0
- package/dist/cli/issue-IIWEDNFC.js +158 -0
- package/dist/cli/janitor-GPMC7VOR.js +111 -0
- package/dist/cli/labels-5NPOIQXN.js +87 -0
- package/dist/cli/lifecycle-4FFS2K2T.js +272 -0
- package/dist/cli/list-47KEUGPQ.js +108 -0
- package/dist/cli/llm-G5B3I6GD.js +703 -0
- package/dist/cli/llm-cost-S7RS6BVA.js +25 -0
- package/dist/cli/llm-stream-24A45NTS.js +27 -0
- package/dist/cli/log-XF6H2XSD.js +75 -0
- package/dist/cli/login-LBPLGHYG.js +43 -0
- package/dist/cli/logout-SX4JSJIV.js +74 -0
- package/dist/cli/manifest-NMCW4PIW.js +353 -0
- package/dist/cli/map-BU72KMGF.js +52 -0
- package/dist/cli/memory-UHYIVGVM.js +1956 -0
- package/dist/cli/migrate-agents-v2-OO7OILZK.js +33 -0
- package/dist/cli/migrate-claude-mem-EDNYUY3K.js +201 -0
- package/dist/cli/next-RZFRG5X7.js +56 -0
- package/dist/cli/nexus-4S4Z5EVU.js +2923 -0
- package/dist/cli/ops-KR7AWCG3.js +51 -0
- package/dist/cli/orchestrate-HOYZY3VX.js +948 -0
- package/dist/cli/otel-U7IIRBCT.js +188 -0
- package/dist/cli/phase-NYZFHUE5.js +220 -0
- package/dist/cli/pivot-FF2CVUZL.js +87 -0
- package/dist/cli/plan-3SL2NTRV.js +48 -0
- package/dist/cli/playbook-2FCBV7N3.js +229 -0
- package/dist/cli/project-WDX2TGMC.js +330 -0
- package/dist/cli/promote-YINYFBZY.js +52 -0
- package/dist/cli/provenance-C7AYD7WG.js +128 -0
- package/dist/cli/provider-QLJEDQBR.js +212 -0
- package/dist/cli/reason-JF5BHBM5.js +137 -0
- package/dist/cli/reconcile-NMISHDGX.js +127 -0
- package/dist/cli/refresh-memory-EY5YNICV.js +45 -0
- package/dist/cli/relates-R3ZPICAY.js +259 -0
- package/dist/cli/release-4ZJTMUUT.js +524 -0
- package/dist/cli/remote-QSONJDIK.js +279 -0
- package/dist/cli/renderers-64OR3IWX.js +37 -0
- package/dist/cli/reorder-J3DOE7ST.js +86 -0
- package/dist/cli/reparent-2OUMKEZX.js +58 -0
- package/dist/cli/req-TZB7OFKO.js +129 -0
- package/dist/cli/research-MTD7EX45.js +365 -0
- package/dist/cli/restore-VEUOX7NF.js +423 -0
- package/dist/cli/revert-3YF2IL5G.js +240 -0
- package/dist/cli/roadmap-7OOQLXKG.js +61 -0
- package/dist/cli/run-2U5NZV5Z.js +211 -0
- package/dist/cli/safestop-VR4VK56D.js +88 -0
- package/dist/cli/saga-SEWPIOX2.js +285 -0
- package/dist/cli/schema-C52WZ35V.js +195 -0
- package/dist/cli/self-update-GQIGUDPS.js +504 -0
- package/dist/cli/selfimprove-3Y5L4ECT.js +88 -0
- package/dist/cli/sentient-M4YMAVGV.js +1088 -0
- package/dist/cli/sequence-6UBMA4IF.js +93 -0
- package/dist/cli/service-5R7SILZ7.js +155 -0
- package/dist/cli/session-3C6AAC4Y.js +707 -0
- package/dist/cli/setup-BTUBW5PU.js +323 -0
- package/dist/cli/show-MXT2V7TF.js +122 -0
- package/dist/cli/skill-GFUZOU2C.js +84 -0
- package/dist/cli/skills-EDWLKAF3.js +928 -0
- package/dist/cli/smoke-provider-SKUFMZXU.js +218 -0
- package/dist/cli/snapshot-GUWMURCM.js +119 -0
- package/dist/cli/src-66GAKPXR.js +80 -0
- package/dist/cli/start-QFG56RGN.js +67 -0
- package/dist/cli/stats-GW55P7RR.js +95 -0
- package/dist/cli/status-46HTKNRR.js +157 -0
- package/dist/cli/sticky-2DUZOUGI.js +338 -0
- package/dist/cli/stop-J2QEUKHX.js +42 -0
- package/dist/cli/sync-GJP2QYT5.js +154 -0
- package/dist/cli/tasks-BNXTM7PB.js +174 -0
- package/dist/cli/telemetry-55Z2XJWL.js +120 -0
- package/dist/cli/templates-7O77TKPV.js +611 -0
- package/dist/cli/testing-37YTBNKP.js +146 -0
- package/dist/cli/token-UAVJMNUI.js +220 -0
- package/dist/cli/transcript-LORQTV5Z.js +440 -0
- package/dist/cli/tui-BPUFHYKK.js +51 -0
- package/dist/cli/update-NVCYV2FT.js +476 -0
- package/dist/cli/upgrade-OXJXOGEF.js +243 -0
- package/dist/cli/verify-LYLDHPT2.js +190 -0
- package/dist/cli/web-QP2RP266.js +275 -0
- package/dist/cli/workgraph-FXBSZDQE.js +232 -0
- package/dist/cli/worktree-6RXAJIST.js +370 -0
- package/package.json +13 -13
- package/studio-dist/client/_app/immutable/chunks/{Buaay_Q8.js → Btgeq_wq.js} +1 -1
- package/studio-dist/client/_app/immutable/chunks/{BJp57kf2.js → CgBjxmu6.js} +1 -1
- package/studio-dist/client/_app/immutable/chunks/{CLP4JZvZ.js → DgEKqO6r.js} +1 -1
- package/studio-dist/client/_app/immutable/chunks/t81h7afa.js +1 -0
- package/studio-dist/client/_app/immutable/entry/{app.CczVILch.js → app.a02HWaRB.js} +2 -2
- package/studio-dist/client/_app/immutable/entry/start.BreMSngo.js +1 -0
- package/studio-dist/client/_app/immutable/nodes/{0.Zy2IsLEl.js → 0.nTXyRfc-.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{1.DJN1QI3l.js → 1.4zrWeHtl.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{15.B4rwqbHV.js → 15.D9mk4JyY.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{16.jn-5BG_L.js → 16._-wt-sQf.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{17.DnWGC4t9.js → 17.CUu6LQDj.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{18.0zddLZOY.js → 18.Dz4QRTkX.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{20.DEKHq9Tc.js → 20.CJ2_EB0U.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{24.CQB9KP-p.js → 24.Igj2FS7k.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{25.BaqToZD-.js → 25.BnATjVGN.js} +2 -2
- package/studio-dist/client/_app/immutable/nodes/{26.BiE1i4iE.js → 26.6iPyjT44.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{3.BObAOu_-.js → 3.AA5GwNgP.js} +1 -1
- package/studio-dist/client/_app/version.json +1 -1
- package/studio-dist/server/chunks/{0-BmUoS2yd.js → 0-DGmsoBYm.js} +3 -3
- package/studio-dist/server/chunks/1-8PfxPvlK.js +9 -0
- package/studio-dist/server/chunks/{15-Dt4kqUxW.js → 15-Bg6YTndh.js} +3 -3
- package/studio-dist/server/chunks/{16-kgTLJvbO.js → 16-BObLwgyD.js} +3 -3
- package/studio-dist/server/chunks/{17-mRYB5141.js → 17-BNXGyAHX.js} +3 -3
- package/studio-dist/server/chunks/{18-BjZ325q5.js → 18-UqQFRIID.js} +3 -3
- package/studio-dist/server/chunks/{20-DQ2Vrujq.js → 20-CMn8a_yP.js} +3 -3
- package/studio-dist/server/chunks/{24-DAeuAfXN.js → 24-BuOTDzib.js} +3 -3
- package/studio-dist/server/chunks/{25-DGCNmzAS.js → 25-CIMSmjVx.js} +4 -4
- package/studio-dist/server/chunks/{26-CiN6bbmR.js → 26-DWGObn2T.js} +3 -3
- package/studio-dist/server/chunks/{3-BS2FXYjP.js → 3-CyiffdJZ.js} +3 -3
- package/studio-dist/server/chunks/{_layout.svelte-DJ_UWmGp.js → _layout.svelte-DYtClaIk.js} +4 -4
- package/studio-dist/server/chunks/{_page.svelte-WR6jUiQE.js → _page.svelte-1h9E6s_f.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-BUq8_eQH.js → _page.svelte-BNNF62Nm.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-CRnYa4cW.js → _page.svelte-BT1EUadj.js} +5 -5
- package/studio-dist/server/chunks/{_page.svelte-Dk0znswQ.js → _page.svelte-Bip079LT.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-CcP_KW3Y.js → _page.svelte-CEATWp_5.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-Ca7x-ZvH.js → _page.svelte-CV3xiD1y.js} +4 -4
- package/studio-dist/server/chunks/{_page.svelte-Cfv9tDBA.js → _page.svelte-Cv_KVJDV.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-J4HjPhfO.js → _page.svelte-DSSy6LuK.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-D8dLEr7O.js → _page.svelte-TF795TAS.js} +3 -3
- package/studio-dist/server/chunks/{_server.ts-Bih2-_5O.js → _server.ts-BlhRFLY3.js} +2 -2
- package/studio-dist/server/chunks/{_server.ts-Cr57EKWf.js → _server.ts-C4w6UdU0.js} +3 -3
- package/studio-dist/server/chunks/{_server.ts-P4wVVksg.js → _server.ts-CzrwbhkQ.js} +3 -3
- package/studio-dist/server/chunks/{_server.ts-2BazvYRP.js → _server.ts-DWt8Dziu.js} +3 -3
- package/studio-dist/server/chunks/{_server.ts-C0evMKCk.js → _server.ts-Db6mEile.js} +3 -3
- package/studio-dist/server/chunks/{client-Cl295FWH.js → client-D8f2k-H_.js} +2 -2
- package/studio-dist/server/chunks/{dist-CdoCt9zT.js → dist-B8xbIrdB.js} +3 -1
- package/studio-dist/server/chunks/{error.svelte-ajn1HNOb.js → error.svelte-DbbOwIme.js} +3 -3
- package/studio-dist/server/chunks/{http-BiQjEmVU.js → http-1ftNGTs5.js} +2 -2
- package/studio-dist/server/chunks/{internal-D9MtKHIF.js → internal-CTULuLPB.js} +2 -2
- package/studio-dist/server/chunks/{stores-BlknvZ80.js → stores-CS5XOReX.js} +2 -2
- package/studio-dist/server/index.js +1 -1
- package/studio-dist/server/manifest.js +17 -17
- package/studio-dist/client/_app/immutable/chunks/C3l-lTkq.js +0 -1
- package/studio-dist/client/_app/immutable/entry/start.D7gHmBNS.js +0 -1
- package/studio-dist/server/chunks/1-CTjj2MYz.js +0 -9
|
@@ -0,0 +1,90 @@
|
|
|
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-3ZO3M37V.js";
|
|
22
|
+
|
|
23
|
+
// packages/cleo/src/cli/commands/doctor-legacy-backups.ts
|
|
24
|
+
import { getProjectRoot } from "@cleocode/core";
|
|
25
|
+
import { pruneLegacyBackups, scanLegacyBackups } from "@cleocode/core/doctor/legacy-backups.js";
|
|
26
|
+
function parsePositiveInt(raw, fallback) {
|
|
27
|
+
if (raw === void 0 || raw === null) return fallback;
|
|
28
|
+
const parsed = Number.parseInt(String(raw), 10);
|
|
29
|
+
if (!Number.isFinite(parsed) || parsed <= 0) return fallback;
|
|
30
|
+
return parsed;
|
|
31
|
+
}
|
|
32
|
+
var doctorLegacyBackupsCommand = defineCommand({
|
|
33
|
+
meta: {
|
|
34
|
+
name: "legacy-backups",
|
|
35
|
+
description: "Enumerate legacy *-pre-cleo.db.bak / brain.db.PRE-DUP-FIX-* / pre-untrack / rotation-overflow artefacts and report origin + retention recommendation. Use --prune to delete 'delete'-recommended files (always dry-run unless --no-dry-run is passed)."
|
|
36
|
+
},
|
|
37
|
+
args: {
|
|
38
|
+
prune: {
|
|
39
|
+
type: "boolean",
|
|
40
|
+
description: "Remove every artefact whose recommendation is 'delete'. Defaults to --dry-run; pass --no-dry-run to physically remove."
|
|
41
|
+
},
|
|
42
|
+
"dry-run": {
|
|
43
|
+
type: "boolean",
|
|
44
|
+
description: "Combine with --prune to preview deletions without touching the filesystem.",
|
|
45
|
+
default: true
|
|
46
|
+
},
|
|
47
|
+
"soft-retention-days": {
|
|
48
|
+
type: "string",
|
|
49
|
+
description: "Days under which artefacts are always kept (default 30)."
|
|
50
|
+
},
|
|
51
|
+
"hard-retention-days": {
|
|
52
|
+
type: "string",
|
|
53
|
+
description: "Days over which artefacts are eligible for prune (default 90)."
|
|
54
|
+
},
|
|
55
|
+
json: { type: "boolean", description: "Output as JSON" },
|
|
56
|
+
human: { type: "boolean", description: "Force human-readable output" },
|
|
57
|
+
quiet: { type: "boolean", description: "Suppress non-essential output" }
|
|
58
|
+
},
|
|
59
|
+
async run({ args }) {
|
|
60
|
+
const softRetentionDays = parsePositiveInt(args["soft-retention-days"], 30);
|
|
61
|
+
const hardRetentionDays = parsePositiveInt(args["hard-retention-days"], 90);
|
|
62
|
+
const projectRoot = getProjectRoot();
|
|
63
|
+
let result;
|
|
64
|
+
if (args.prune === true) {
|
|
65
|
+
const dryRun = args["dry-run"] !== false;
|
|
66
|
+
result = pruneLegacyBackups(projectRoot, {
|
|
67
|
+
softRetentionDays,
|
|
68
|
+
hardRetentionDays,
|
|
69
|
+
dryRun
|
|
70
|
+
});
|
|
71
|
+
} else {
|
|
72
|
+
result = scanLegacyBackups(projectRoot, {
|
|
73
|
+
softRetentionDays,
|
|
74
|
+
hardRetentionDays
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
cliOutput(result, {
|
|
78
|
+
command: "doctor",
|
|
79
|
+
operation: "doctor.legacy-backups.run"
|
|
80
|
+
});
|
|
81
|
+
if (result.errors.length > 0 && (process.exitCode === void 0 || process.exitCode === 0)) {
|
|
82
|
+
process.exitCode = 1;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
export {
|
|
88
|
+
doctorLegacyBackupsCommand
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=chunk-JNZJPIPJ.js.map
|
|
@@ -0,0 +1,209 @@
|
|
|
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-3ZO3M37V.js";
|
|
26
|
+
|
|
27
|
+
// packages/cleo/src/cli/commands/doctor-db-substrate.ts
|
|
28
|
+
import { dirname } from "node:path";
|
|
29
|
+
import { getProjectRoot, pushWarning } from "@cleocode/core";
|
|
30
|
+
import { surveyDbSubstrate, surveyFleetDbSubstrate } from "@cleocode/core/doctor/db-substrate.js";
|
|
31
|
+
import { NexusRegistryReadError } from "@cleocode/core/nexus/registry-errors.js";
|
|
32
|
+
import { listRegistryParentRoots } from "@cleocode/core/nexus/registry-roots.js";
|
|
33
|
+
async function defaultFleetRoots() {
|
|
34
|
+
const roots = await listRegistryParentRoots();
|
|
35
|
+
return roots.length > 0 ? roots : [dirname(getProjectRoot())];
|
|
36
|
+
}
|
|
37
|
+
function reportRegistryReadError(error) {
|
|
38
|
+
cliError(
|
|
39
|
+
error.message,
|
|
40
|
+
error.code,
|
|
41
|
+
{
|
|
42
|
+
name: error.codeName,
|
|
43
|
+
fix: `Pass \`--fleet-root <dir>\` to survey without the registry. ${error.fix ?? ""}`.trim(),
|
|
44
|
+
details: error.details
|
|
45
|
+
},
|
|
46
|
+
{ operation: "doctor.db-substrate.run" }
|
|
47
|
+
);
|
|
48
|
+
process.exitCode = error.code;
|
|
49
|
+
}
|
|
50
|
+
function pushSubstrateWarnings(result) {
|
|
51
|
+
for (const warning of result.warnings) {
|
|
52
|
+
const context = {
|
|
53
|
+
kind: warning.kind,
|
|
54
|
+
path: warning.path,
|
|
55
|
+
lastWriteMs: warning.lastWriteMs
|
|
56
|
+
};
|
|
57
|
+
if (warning.kind === "orphan-project-root") {
|
|
58
|
+
context["parentWorkspace"] = warning.parentWorkspace ?? null;
|
|
59
|
+
}
|
|
60
|
+
pushWarning({
|
|
61
|
+
code: warning.kind === "orphan-project-root" ? "W_DB_SUBSTRATE_ORPHAN_PROJECT_ROOT" : "W_DB_SUBSTRATE_NESTED_NEXUS_DUPLICATE",
|
|
62
|
+
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)`,
|
|
63
|
+
severity: "warn",
|
|
64
|
+
context
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
for (const projectSurvey of result.projects) {
|
|
68
|
+
for (const [role, entry] of Object.entries(projectSurvey.dbs)) {
|
|
69
|
+
if (entry.pragmaDrift === null || entry.pragmaDrift.length === 0) continue;
|
|
70
|
+
for (const drift of entry.pragmaDrift) {
|
|
71
|
+
pushWarning({
|
|
72
|
+
code: "W_DB_SUBSTRATE_PRAGMA_DRIFT",
|
|
73
|
+
message: `Pragma drift on ${role} (${entry.filePath}): expected ${drift.pragma}=${drift.expected}, actual=${drift.actual ?? "<unmeasurable>"}`,
|
|
74
|
+
severity: "warn",
|
|
75
|
+
context: {
|
|
76
|
+
role,
|
|
77
|
+
filePath: entry.filePath,
|
|
78
|
+
pragma: drift.pragma,
|
|
79
|
+
expected: drift.expected,
|
|
80
|
+
actual: drift.actual
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
for (const report of result.crossDbOrphans) {
|
|
87
|
+
if (report.skipped || report.orphanCount === 0) continue;
|
|
88
|
+
pushWarning({
|
|
89
|
+
code: `W_DB_SUBSTRATE_CROSS_DB_${report.invariant}`,
|
|
90
|
+
message: `${report.invariant}: ${report.orphanCount} orphan row${report.orphanCount === 1 ? "" : "s"} \u2014 ${report.description}. ${report.suggestedFix}`,
|
|
91
|
+
severity: "warn",
|
|
92
|
+
context: {
|
|
93
|
+
invariant: report.invariant,
|
|
94
|
+
orphanCount: report.orphanCount,
|
|
95
|
+
sample: report.sample.join(","),
|
|
96
|
+
suggestedFix: report.suggestedFix
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
function pushPerDbWarnings(result) {
|
|
102
|
+
for (const projectSurvey of result.projects) {
|
|
103
|
+
for (const [role, dbEntry] of Object.entries(projectSurvey.dbs)) {
|
|
104
|
+
if (dbEntry.quarantinedTo !== null) {
|
|
105
|
+
pushWarning({
|
|
106
|
+
code: "W_DB_SUBSTRATE_AUTO_QUARANTINED",
|
|
107
|
+
message: `Auto-quarantined corrupt ${role} DB at ${dbEntry.filePath} \u2192 ${dbEntry.quarantinedTo}. Recover via: cleo backup recover ${role}`,
|
|
108
|
+
severity: "warn",
|
|
109
|
+
context: {
|
|
110
|
+
role,
|
|
111
|
+
filePath: dbEntry.filePath,
|
|
112
|
+
quarantinedTo: dbEntry.quarantinedTo,
|
|
113
|
+
integrityCheckMs: dbEntry.integrityCheckMs
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
if (dbEntry.timedOut) {
|
|
118
|
+
pushWarning({
|
|
119
|
+
code: "W_DB_SUBSTRATE_INTEGRITY_TIMEOUT",
|
|
120
|
+
message: `integrity_check on ${role} DB at ${dbEntry.filePath} took ${dbEntry.integrityCheckMs}ms \u2014 slow substrate flagged for operator attention`,
|
|
121
|
+
severity: "warn",
|
|
122
|
+
context: {
|
|
123
|
+
role,
|
|
124
|
+
filePath: dbEntry.filePath,
|
|
125
|
+
integrityCheckMs: dbEntry.integrityCheckMs
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
var doctorDbSubstrateCommand = defineCommand({
|
|
133
|
+
meta: {
|
|
134
|
+
name: "db-substrate",
|
|
135
|
+
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)."
|
|
136
|
+
},
|
|
137
|
+
args: {
|
|
138
|
+
fleet: {
|
|
139
|
+
type: "boolean",
|
|
140
|
+
description: "Multi-project survey \u2014 walk every .cleo/-bearing subdir under --fleet-root"
|
|
141
|
+
},
|
|
142
|
+
"fleet-root": {
|
|
143
|
+
type: "string",
|
|
144
|
+
description: "Fleet root path (default: parent directories of registered projects). Only used with --fleet."
|
|
145
|
+
},
|
|
146
|
+
"integrity-timeout-ms": {
|
|
147
|
+
type: "string",
|
|
148
|
+
description: "Wall-clock budget for each PRAGMA integrity_check call (ms; default 60000; 0 disables)."
|
|
149
|
+
},
|
|
150
|
+
"no-quarantine": {
|
|
151
|
+
type: "boolean",
|
|
152
|
+
description: "Disable auto-quarantine of corrupt DBs (leaves them in place; report-only mode)."
|
|
153
|
+
},
|
|
154
|
+
"confirm-owner-store": {
|
|
155
|
+
type: "boolean",
|
|
156
|
+
description: "From inside a git worktree: allow quarantining the owning project's LIVE store (skipped without it)",
|
|
157
|
+
default: false
|
|
158
|
+
},
|
|
159
|
+
json: { type: "boolean", description: "Output as JSON" },
|
|
160
|
+
human: { type: "boolean", description: "Force human-readable output" },
|
|
161
|
+
quiet: { type: "boolean", description: "Suppress non-essential output" }
|
|
162
|
+
},
|
|
163
|
+
async run({ args }) {
|
|
164
|
+
const isFleet = args.fleet === true;
|
|
165
|
+
let parsedTimeoutMs;
|
|
166
|
+
if (typeof args["integrity-timeout-ms"] === "string" && args["integrity-timeout-ms"].length > 0) {
|
|
167
|
+
const n = Number.parseInt(args["integrity-timeout-ms"], 10);
|
|
168
|
+
if (Number.isFinite(n) && n >= 0) {
|
|
169
|
+
parsedTimeoutMs = n;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
const options = {
|
|
173
|
+
...parsedTimeoutMs !== void 0 ? { integrityCheckTimeoutMs: parsedTimeoutMs } : {},
|
|
174
|
+
autoQuarantine: !negatedFlag(args, "quarantine"),
|
|
175
|
+
// T12708: the invocation directory; the quarantine guard checks it.
|
|
176
|
+
cwd: process.cwd(),
|
|
177
|
+
confirmOwnerStore: args["confirm-owner-store"] === true
|
|
178
|
+
};
|
|
179
|
+
let fleetRoots;
|
|
180
|
+
if (isFleet) {
|
|
181
|
+
if (typeof args["fleet-root"] === "string" && args["fleet-root"].length > 0) {
|
|
182
|
+
fleetRoots = args["fleet-root"];
|
|
183
|
+
} else {
|
|
184
|
+
try {
|
|
185
|
+
fleetRoots = await defaultFleetRoots();
|
|
186
|
+
} catch (error) {
|
|
187
|
+
if (!(error instanceof NexusRegistryReadError)) throw error;
|
|
188
|
+
reportRegistryReadError(error);
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
const result = fleetRoots !== void 0 ? surveyFleetDbSubstrate(fleetRoots, options) : surveyDbSubstrate(getProjectRoot(), options);
|
|
194
|
+
pushSubstrateWarnings(result);
|
|
195
|
+
pushPerDbWarnings(result);
|
|
196
|
+
cliOutput(result, {
|
|
197
|
+
command: "doctor",
|
|
198
|
+
operation: "doctor.db-substrate.run"
|
|
199
|
+
});
|
|
200
|
+
if (result.summary.corrupt > 0 && (process.exitCode === void 0 || process.exitCode === 0)) {
|
|
201
|
+
process.exitCode = 2;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
export {
|
|
207
|
+
doctorDbSubstrateCommand
|
|
208
|
+
};
|
|
209
|
+
//# sourceMappingURL=chunk-KHB52JNB.js.map
|
|
@@ -0,0 +1,46 @@
|
|
|
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-3ZO3M37V.js";
|
|
22
|
+
|
|
23
|
+
// packages/cleo/src/cli/commands/doctor-migrations.ts
|
|
24
|
+
import { getProjectRoot } from "@cleocode/core";
|
|
25
|
+
import { inspectMigrations } from "@cleocode/core/doctor/migrations.js";
|
|
26
|
+
var doctorMigrationsCommand = defineCommand({
|
|
27
|
+
meta: {
|
|
28
|
+
name: "migrations",
|
|
29
|
+
description: "Report the migration journal of the project and global stores: row count, head, applied and pending files per lineage, hash drift, and a journal rebuilt on a store that already held its schema. Read-only."
|
|
30
|
+
},
|
|
31
|
+
args: {
|
|
32
|
+
json: { type: "boolean", description: "Output as JSON" },
|
|
33
|
+
human: { type: "boolean", description: "Force human-readable output" },
|
|
34
|
+
quiet: { type: "boolean", description: "Suppress non-essential output" }
|
|
35
|
+
},
|
|
36
|
+
async run() {
|
|
37
|
+
const report = inspectMigrations(getProjectRoot());
|
|
38
|
+
cliOutput(report, { command: "doctor", operation: "doctor.migrations.run" });
|
|
39
|
+
if (report.scopes.some((s) => s.drift.length > 0)) process.exitCode = 1;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export {
|
|
44
|
+
doctorMigrationsCommand
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=chunk-KJDWWQFY.js.map
|
|
@@ -0,0 +1,83 @@
|
|
|
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-3ZO3M37V.js";
|
|
23
|
+
|
|
24
|
+
// packages/cleo/src/cli/commands/doctor-global-delivery.ts
|
|
25
|
+
import {
|
|
26
|
+
auditGlobalDelivery,
|
|
27
|
+
repairGlobalDelivery
|
|
28
|
+
} from "@cleocode/core/system/global-delivery.js";
|
|
29
|
+
var doctorGlobalDeliveryCommand = defineCommand({
|
|
30
|
+
meta: {
|
|
31
|
+
name: "global-delivery",
|
|
32
|
+
description: "Check that ~/.cleo, the global hub reference and every harness CLEO skill install resolve. Read-only; --repair relinks them with a receipt (--dry-run to preview)."
|
|
33
|
+
},
|
|
34
|
+
args: {
|
|
35
|
+
repair: {
|
|
36
|
+
type: "boolean",
|
|
37
|
+
description: "Relink ~/.cleo to the OS data dir and every dangling or ~/.cleo-routed skill entry to the physical skills dir (verified symlink, else copy). Appends a receipt."
|
|
38
|
+
},
|
|
39
|
+
"dry-run": {
|
|
40
|
+
type: "boolean",
|
|
41
|
+
description: "With --repair: report the receipt without touching disk"
|
|
42
|
+
},
|
|
43
|
+
json: { type: "boolean", description: "Output as JSON" },
|
|
44
|
+
human: { type: "boolean", description: "Force human-readable output" },
|
|
45
|
+
quiet: { type: "boolean", description: "Suppress non-essential output" }
|
|
46
|
+
},
|
|
47
|
+
async run({ args }) {
|
|
48
|
+
const dryRun = args["dry-run"] === true;
|
|
49
|
+
let result = null;
|
|
50
|
+
if (args.repair === true) {
|
|
51
|
+
try {
|
|
52
|
+
result = await repairGlobalDelivery({ dryRun });
|
|
53
|
+
} catch (err) {
|
|
54
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
55
|
+
cliError(
|
|
56
|
+
message,
|
|
57
|
+
1,
|
|
58
|
+
{
|
|
59
|
+
name: "E_CLEO_LINK_REPAIR_FAILED",
|
|
60
|
+
fix: "The entry that failed was restored to its previous link (~/.cleo or the skill link). The intent and failed receipts under <cleoHome>/audit list every planned entry with its previous target. On Windows enable Developer Mode or run as administrator, then re-run `cleo doctor global-delivery --repair`."
|
|
61
|
+
},
|
|
62
|
+
{ operation: "doctor.global-delivery.run" }
|
|
63
|
+
);
|
|
64
|
+
process.exitCode = 1;
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
const audit = result?.audit ?? await auditGlobalDelivery();
|
|
69
|
+
cliOutput(
|
|
70
|
+
{ ...audit, receipt: result?.receipt ?? null },
|
|
71
|
+
{ command: "doctor", operation: "doctor.global-delivery.run" }
|
|
72
|
+
);
|
|
73
|
+
const refused = result?.receipt.link.action === "refused";
|
|
74
|
+
if ((refused || !audit.healthy && !dryRun) && (process.exitCode ?? 0) === 0) {
|
|
75
|
+
process.exitCode = 1;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
export {
|
|
81
|
+
doctorGlobalDeliveryCommand
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=chunk-LKNUA3SB.js.map
|
|
@@ -0,0 +1,163 @@
|
|
|
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/lib/gateway-auto-start.ts
|
|
18
|
+
import { once } from "node:events";
|
|
19
|
+
import { createWriteStream, existsSync, readFileSync, realpathSync } from "node:fs";
|
|
20
|
+
import { mkdir } from "node:fs/promises";
|
|
21
|
+
import * as net from "node:net";
|
|
22
|
+
import { dirname, join } from "node:path";
|
|
23
|
+
import { fileURLToPath } from "node:url";
|
|
24
|
+
import { spawnWrapped } from "@cleocode/core/resources/spawn-wrapper.js";
|
|
25
|
+
var GATEWAY_DEFAULT_PORT = 7777;
|
|
26
|
+
var GATEWAY_DEFAULT_HOST = "127.0.0.1";
|
|
27
|
+
var GATEWAY_WAIT_TIMEOUT_MS = 1e4;
|
|
28
|
+
var POLL_INITIAL_DELAY_MS = 100;
|
|
29
|
+
var POLL_MAX_DELAY_MS = 1e3;
|
|
30
|
+
var CLEO_PACKAGE_NAME = "@cleocode/cleo";
|
|
31
|
+
function shouldAutoStartGateway(config) {
|
|
32
|
+
if (config === null || config === void 0) return true;
|
|
33
|
+
const daemon = config["daemon"];
|
|
34
|
+
if (daemon === null || daemon === void 0) return true;
|
|
35
|
+
if (typeof daemon !== "object") return true;
|
|
36
|
+
const daemonObj = daemon;
|
|
37
|
+
const autoStart = daemonObj["autoStart"];
|
|
38
|
+
if (autoStart === false) return false;
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
function probePort(port, host = GATEWAY_DEFAULT_HOST) {
|
|
42
|
+
return new Promise((resolve) => {
|
|
43
|
+
const socket = net.connect({ port, host });
|
|
44
|
+
socket.once("connect", () => {
|
|
45
|
+
socket.destroy();
|
|
46
|
+
resolve(true);
|
|
47
|
+
});
|
|
48
|
+
socket.once("error", () => {
|
|
49
|
+
socket.destroy();
|
|
50
|
+
resolve(false);
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
async function pollPort(port, host, timeoutMs) {
|
|
55
|
+
const deadline = Date.now() + timeoutMs;
|
|
56
|
+
let delay = POLL_INITIAL_DELAY_MS;
|
|
57
|
+
while (Date.now() < deadline) {
|
|
58
|
+
const ok = await probePort(port, host);
|
|
59
|
+
if (ok) return true;
|
|
60
|
+
const remaining = deadline - Date.now();
|
|
61
|
+
const wait = Math.min(delay, remaining, POLL_MAX_DELAY_MS);
|
|
62
|
+
if (wait <= 0) break;
|
|
63
|
+
await new Promise((r) => setTimeout(r, wait));
|
|
64
|
+
delay = Math.min(delay * 2, POLL_MAX_DELAY_MS);
|
|
65
|
+
}
|
|
66
|
+
return probePort(port, host);
|
|
67
|
+
}
|
|
68
|
+
function resolveCliEntryPath(startUrl = import.meta.url) {
|
|
69
|
+
const startFile = realpathSync(fileURLToPath(startUrl));
|
|
70
|
+
let current = dirname(startFile);
|
|
71
|
+
for (let i = 0; i < 20; i++) {
|
|
72
|
+
const pkgJsonPath = join(current, "package.json");
|
|
73
|
+
if (existsSync(pkgJsonPath)) {
|
|
74
|
+
let pkgName;
|
|
75
|
+
try {
|
|
76
|
+
const raw = readFileSync(pkgJsonPath, "utf8");
|
|
77
|
+
const parsed = JSON.parse(raw);
|
|
78
|
+
pkgName = typeof parsed["name"] === "string" ? parsed["name"] : void 0;
|
|
79
|
+
} catch {
|
|
80
|
+
}
|
|
81
|
+
if (pkgName === CLEO_PACKAGE_NAME) {
|
|
82
|
+
const entry = join(current, "dist", "cli", "index.js");
|
|
83
|
+
if (!existsSync(entry)) {
|
|
84
|
+
throw new Error(
|
|
85
|
+
`@cleocode/cleo package root found at ${current} but dist/cli/index.js is missing \u2014 run \`pnpm --filter @cleocode/cleo run build\` to generate it`
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
return entry;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
const parent = dirname(current);
|
|
92
|
+
if (parent === current) break;
|
|
93
|
+
current = parent;
|
|
94
|
+
}
|
|
95
|
+
throw new Error(
|
|
96
|
+
`could not locate ${CLEO_PACKAGE_NAME} package root starting from ${startFile} \u2014 checked up to 20 ancestor directories`
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
async function spawnGatewayIfDown(opts = {}) {
|
|
100
|
+
const port = opts.port ?? GATEWAY_DEFAULT_PORT;
|
|
101
|
+
const host = opts.host ?? GATEWAY_DEFAULT_HOST;
|
|
102
|
+
const waitTimeoutMs = opts.waitTimeoutMs ?? GATEWAY_WAIT_TIMEOUT_MS;
|
|
103
|
+
if (await probePort(port, host)) {
|
|
104
|
+
return { reachable: true, spawned: false };
|
|
105
|
+
}
|
|
106
|
+
let cliEntry;
|
|
107
|
+
try {
|
|
108
|
+
cliEntry = opts.cliEntryPath ?? resolveCliEntryPath();
|
|
109
|
+
} catch (err) {
|
|
110
|
+
const reason = `gateway auto-start: cannot resolve CLI entry path \u2014 ${err instanceof Error ? err.message : String(err)}`;
|
|
111
|
+
return { reachable: false, spawned: false, reason };
|
|
112
|
+
}
|
|
113
|
+
let outFd = "ignore";
|
|
114
|
+
let errFd = "ignore";
|
|
115
|
+
try {
|
|
116
|
+
const { getCleoLogDir } = await import("@cleocode/core");
|
|
117
|
+
const logDir = getCleoLogDir();
|
|
118
|
+
await mkdir(logDir, { recursive: true });
|
|
119
|
+
const outStream = createWriteStream(join(logDir, "gateway.log"), { flags: "a" });
|
|
120
|
+
const errStream = createWriteStream(join(logDir, "gateway.err"), { flags: "a" });
|
|
121
|
+
await Promise.all([once(outStream, "open"), once(errStream, "open")]);
|
|
122
|
+
outFd = outStream;
|
|
123
|
+
errFd = errStream;
|
|
124
|
+
} catch {
|
|
125
|
+
}
|
|
126
|
+
const spawnArgs = ["daemon", "serve"];
|
|
127
|
+
if (port !== GATEWAY_DEFAULT_PORT) spawnArgs.push("--port", String(port));
|
|
128
|
+
if (host !== GATEWAY_DEFAULT_HOST) spawnArgs.push("--host", host);
|
|
129
|
+
try {
|
|
130
|
+
const { child } = spawnWrapped(
|
|
131
|
+
process.execPath,
|
|
132
|
+
[cliEntry, ...spawnArgs],
|
|
133
|
+
{
|
|
134
|
+
detached: true,
|
|
135
|
+
stdio: ["ignore", outFd, errFd],
|
|
136
|
+
env: { ...process.env, CLEO_GATEWAY_AUTO_STARTED: "1" }
|
|
137
|
+
},
|
|
138
|
+
{ scopeClass: "daemon", scopeId: "gateway" }
|
|
139
|
+
);
|
|
140
|
+
child.unref();
|
|
141
|
+
} catch (err) {
|
|
142
|
+
const reason = `gateway auto-start: spawn failed \u2014 ${err instanceof Error ? err.message : String(err)}`;
|
|
143
|
+
return { reachable: false, spawned: false, reason };
|
|
144
|
+
}
|
|
145
|
+
const reachable = await pollPort(port, host, waitTimeoutMs);
|
|
146
|
+
return {
|
|
147
|
+
reachable,
|
|
148
|
+
spawned: true,
|
|
149
|
+
reason: reachable ? void 0 : "gateway did not become reachable within the timeout"
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export {
|
|
154
|
+
GATEWAY_DEFAULT_PORT,
|
|
155
|
+
GATEWAY_DEFAULT_HOST,
|
|
156
|
+
GATEWAY_WAIT_TIMEOUT_MS,
|
|
157
|
+
shouldAutoStartGateway,
|
|
158
|
+
probePort,
|
|
159
|
+
pollPort,
|
|
160
|
+
resolveCliEntryPath,
|
|
161
|
+
spawnGatewayIfDown
|
|
162
|
+
};
|
|
163
|
+
//# sourceMappingURL=chunk-LVGIFMCV.js.map
|
|
@@ -0,0 +1,67 @@
|
|
|
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-3ZO3M37V.js";
|
|
22
|
+
|
|
23
|
+
// packages/cleo/src/cli/commands/doctor-acceptance-drift.ts
|
|
24
|
+
import { getProjectRoot } from "@cleocode/core";
|
|
25
|
+
import {
|
|
26
|
+
scanAcceptanceDrift,
|
|
27
|
+
writeAcceptanceDriftBaseline
|
|
28
|
+
} from "@cleocode/core/doctor/acceptance-drift.js";
|
|
29
|
+
var doctorAcceptanceDriftCommand = defineCommand({
|
|
30
|
+
meta: {
|
|
31
|
+
name: "acceptance-drift",
|
|
32
|
+
description: "Report tasks whose acceptance criteria disagree between the JSON column and the typed rows table, separating legacy-convention rows from current-era regressions. Read-only \u2014 repairs nothing."
|
|
33
|
+
},
|
|
34
|
+
args: {
|
|
35
|
+
"update-baseline": {
|
|
36
|
+
type: "boolean",
|
|
37
|
+
description: "Accept every current drifting task, so only NEW drift fails afterwards"
|
|
38
|
+
},
|
|
39
|
+
all: {
|
|
40
|
+
type: "boolean",
|
|
41
|
+
description: "Exit non-zero for every drifting task, baselined or not"
|
|
42
|
+
},
|
|
43
|
+
json: { type: "boolean", description: "Output as JSON" },
|
|
44
|
+
human: { type: "boolean", description: "Force human-readable output" },
|
|
45
|
+
quiet: { type: "boolean", description: "Suppress non-essential output" }
|
|
46
|
+
},
|
|
47
|
+
async run(ctx) {
|
|
48
|
+
const result = scanAcceptanceDrift(getProjectRoot());
|
|
49
|
+
cliOutput(result, {
|
|
50
|
+
command: "doctor",
|
|
51
|
+
operation: "doctor.acceptance-drift.run"
|
|
52
|
+
});
|
|
53
|
+
if (ctx.args["update-baseline"]) {
|
|
54
|
+
writeAcceptanceDriftBaseline(result);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const failing = ctx.args.all ? result.entries.length : result.unbaselined.length;
|
|
58
|
+
if (failing > 0 && (process.exitCode === void 0 || process.exitCode === 0)) {
|
|
59
|
+
process.exitCode = 1;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
export {
|
|
65
|
+
doctorAcceptanceDriftCommand
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=chunk-LWQBJQSE.js.map
|