@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,408 @@
|
|
|
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
|
+
CLEO_DIR_NAME,
|
|
21
|
+
CLEO_INJECTION_MD,
|
|
22
|
+
TEMPLATES_SUBDIR
|
|
23
|
+
} from "./chunk-OGV57L4J.js";
|
|
24
|
+
import {
|
|
25
|
+
cliOutput
|
|
26
|
+
} from "./chunk-3ZO3M37V.js";
|
|
27
|
+
import "./chunk-6JSJNYH2.js";
|
|
28
|
+
|
|
29
|
+
// packages/cleo/src/cli/commands/detect-drift.ts
|
|
30
|
+
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
31
|
+
import { dirname, join } from "node:path";
|
|
32
|
+
import { getErrorMessage } from "@cleocode/contracts";
|
|
33
|
+
function findProjectRoot() {
|
|
34
|
+
let currentDir = process.cwd();
|
|
35
|
+
while (currentDir !== "/") {
|
|
36
|
+
if (existsSync(join(currentDir, "package.json"))) {
|
|
37
|
+
return currentDir;
|
|
38
|
+
}
|
|
39
|
+
const parent = dirname(currentDir);
|
|
40
|
+
if (parent === currentDir) break;
|
|
41
|
+
currentDir = parent;
|
|
42
|
+
}
|
|
43
|
+
return process.cwd();
|
|
44
|
+
}
|
|
45
|
+
var detectDriftCommand = defineCommand({
|
|
46
|
+
meta: {
|
|
47
|
+
name: "detect-drift",
|
|
48
|
+
description: "Detect documentation drift against TypeScript source of truth"
|
|
49
|
+
},
|
|
50
|
+
async run() {
|
|
51
|
+
const projectRoot = findProjectRoot();
|
|
52
|
+
const isCleoRepo = existsSync(join(projectRoot, "packages", "cleo", "src"));
|
|
53
|
+
const cleoSrcRoot = isCleoRepo ? join(projectRoot, "packages", "cleo", "src") : join(projectRoot, "src");
|
|
54
|
+
const safeRead = (filePath) => {
|
|
55
|
+
try {
|
|
56
|
+
return readFileSync(filePath, "utf-8");
|
|
57
|
+
} catch {
|
|
58
|
+
return "";
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
if (!isCleoRepo) {
|
|
62
|
+
const userResult = {
|
|
63
|
+
summary: { totalChecks: 1, passed: 0, warnings: 0, errors: 0, exitCode: 0 },
|
|
64
|
+
checks: [],
|
|
65
|
+
recommendations: []
|
|
66
|
+
};
|
|
67
|
+
const injPath = join(projectRoot, CLEO_DIR_NAME, TEMPLATES_SUBDIR, CLEO_INJECTION_MD);
|
|
68
|
+
if (existsSync(injPath)) {
|
|
69
|
+
const content = safeRead(injPath);
|
|
70
|
+
userResult.checks.push({
|
|
71
|
+
name: "Agent injection",
|
|
72
|
+
status: content.length > 100 ? "pass" : "warn",
|
|
73
|
+
message: content.length > 100 ? "Agent injection template exists" : "Template appears incomplete",
|
|
74
|
+
issues: []
|
|
75
|
+
});
|
|
76
|
+
userResult.summary.passed = content.length > 100 ? 1 : 0;
|
|
77
|
+
userResult.summary.warnings = content.length > 100 ? 0 : 1;
|
|
78
|
+
} else {
|
|
79
|
+
userResult.checks.push({
|
|
80
|
+
name: "Agent injection",
|
|
81
|
+
status: "warn",
|
|
82
|
+
message: "No injection template found \u2014 run `cleo init` to create one",
|
|
83
|
+
issues: []
|
|
84
|
+
});
|
|
85
|
+
userResult.summary.warnings = 1;
|
|
86
|
+
}
|
|
87
|
+
userResult.summary.exitCode = userResult.summary.errors > 0 ? 2 : userResult.summary.warnings > 0 ? 1 : 0;
|
|
88
|
+
userResult.recommendations.push(
|
|
89
|
+
"detect-drift source checks only apply to the CLEO monorepo. Run from the cleo source tree for full analysis."
|
|
90
|
+
);
|
|
91
|
+
cliOutput(userResult, { command: "detect-drift" });
|
|
92
|
+
process.exit(userResult.summary.exitCode);
|
|
93
|
+
}
|
|
94
|
+
const result = {
|
|
95
|
+
summary: {
|
|
96
|
+
totalChecks: 0,
|
|
97
|
+
passed: 0,
|
|
98
|
+
warnings: 0,
|
|
99
|
+
errors: 0,
|
|
100
|
+
exitCode: 0
|
|
101
|
+
},
|
|
102
|
+
checks: [],
|
|
103
|
+
recommendations: []
|
|
104
|
+
};
|
|
105
|
+
const addCheck = (name, status, message, issues = []) => {
|
|
106
|
+
result.checks.push({ name, status, message, issues });
|
|
107
|
+
result.summary.totalChecks++;
|
|
108
|
+
if (status === "pass") result.summary.passed++;
|
|
109
|
+
if (status === "warn") {
|
|
110
|
+
result.summary.warnings++;
|
|
111
|
+
result.summary.exitCode = Math.max(result.summary.exitCode, 1);
|
|
112
|
+
}
|
|
113
|
+
if (status === "fail") {
|
|
114
|
+
result.summary.errors++;
|
|
115
|
+
result.summary.exitCode = 2;
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
try {
|
|
119
|
+
const specPath = join(projectRoot, "docs", "specs", "CLEO-OPERATION-CONSTITUTION.md");
|
|
120
|
+
const registryPath = join(cleoSrcRoot, "dispatch", "registry.ts");
|
|
121
|
+
const dispatchDomainsDir = join(cleoSrcRoot, "dispatch", "domains");
|
|
122
|
+
if (!existsSync(specPath)) {
|
|
123
|
+
addCheck("Gateway-to-spec sync", "fail", "CLEO-OPERATION-CONSTITUTION.md missing", [
|
|
124
|
+
{
|
|
125
|
+
severity: "error",
|
|
126
|
+
category: "spec",
|
|
127
|
+
message: "Operations reference specification not found",
|
|
128
|
+
file: specPath,
|
|
129
|
+
recommendation: "Create docs/specs/CLEO-OPERATION-CONSTITUTION.md with canonical operation definitions"
|
|
130
|
+
}
|
|
131
|
+
]);
|
|
132
|
+
} else if (!existsSync(registryPath) || !existsSync(dispatchDomainsDir)) {
|
|
133
|
+
addCheck("Gateway-to-spec sync", "fail", "Dispatch registry or domains missing", [
|
|
134
|
+
{
|
|
135
|
+
severity: "error",
|
|
136
|
+
category: "implementation",
|
|
137
|
+
message: "Dispatch registry or domains directory not found",
|
|
138
|
+
file: registryPath,
|
|
139
|
+
recommendation: "Verify packages/cleo/src/dispatch/registry.ts and packages/cleo/src/dispatch/domains/ exist"
|
|
140
|
+
}
|
|
141
|
+
]);
|
|
142
|
+
} else {
|
|
143
|
+
const specContent = safeRead(specPath);
|
|
144
|
+
const registryContent = safeRead(registryPath);
|
|
145
|
+
const specOpsMatch = specContent.match(/## `([a-z_]+)`/g) || [];
|
|
146
|
+
const specOps = specOpsMatch.map((m) => m.replace(/## `|`/g, ""));
|
|
147
|
+
const registryOpsMatch = registryContent.match(/operation:\s*'([a-z_.]+)'/g) || [];
|
|
148
|
+
const registryOps = registryOpsMatch.map((m) => m.replace(/operation:\s*'|'/g, ""));
|
|
149
|
+
const specOnly = specOps.filter((op) => !registryOps.includes(op));
|
|
150
|
+
const gatewayOnly = registryOps.filter((op) => !specOps.includes(op));
|
|
151
|
+
if (specOnly.length === 0 && gatewayOnly.length === 0) {
|
|
152
|
+
addCheck("Gateway-to-spec sync", "pass", `All ${specOps.length} operations synchronized`);
|
|
153
|
+
} else {
|
|
154
|
+
const issues = [];
|
|
155
|
+
if (specOnly.length > 0) {
|
|
156
|
+
issues.push({
|
|
157
|
+
severity: "warning",
|
|
158
|
+
category: "spec-coverage",
|
|
159
|
+
message: `${specOnly.length} operations in spec but not in gateways: ${specOnly.join(", ")}`,
|
|
160
|
+
recommendation: "Add missing operation handlers to dispatch domains or remove from spec"
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
if (gatewayOnly.length > 0) {
|
|
164
|
+
issues.push({
|
|
165
|
+
severity: "warning",
|
|
166
|
+
category: "implementation-coverage",
|
|
167
|
+
message: `${gatewayOnly.length} operations in gateways but not in spec: ${gatewayOnly.join(", ")}`,
|
|
168
|
+
recommendation: "Document missing operations in CLEO-OPERATIONS-REFERENCE.md"
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
addCheck(
|
|
172
|
+
"Gateway-to-spec sync",
|
|
173
|
+
"warn",
|
|
174
|
+
`Found ${specOnly.length + gatewayOnly.length} operation mismatches`,
|
|
175
|
+
issues
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
} catch (e) {
|
|
180
|
+
addCheck("Gateway-to-spec sync", "fail", `Error: ${getErrorMessage(e)}`, [
|
|
181
|
+
{
|
|
182
|
+
severity: "error",
|
|
183
|
+
category: "system",
|
|
184
|
+
message: getErrorMessage(e),
|
|
185
|
+
recommendation: "Check file permissions and paths"
|
|
186
|
+
}
|
|
187
|
+
]);
|
|
188
|
+
}
|
|
189
|
+
try {
|
|
190
|
+
const cliDir = join(cleoSrcRoot, "cli", "commands");
|
|
191
|
+
const coreDir = isCleoRepo ? join(projectRoot, "packages", "core", "src") : join(projectRoot, "src", "core");
|
|
192
|
+
if (!existsSync(cliDir)) {
|
|
193
|
+
addCheck("CLI-to-core sync", "fail", "CLI commands directory missing", [
|
|
194
|
+
{
|
|
195
|
+
severity: "error",
|
|
196
|
+
category: "structure",
|
|
197
|
+
message: `${cliDir} directory not found`,
|
|
198
|
+
recommendation: "Verify TypeScript source structure is intact"
|
|
199
|
+
}
|
|
200
|
+
]);
|
|
201
|
+
} else if (!existsSync(coreDir)) {
|
|
202
|
+
addCheck("CLI-to-core sync", "fail", "Core directory missing", [
|
|
203
|
+
{
|
|
204
|
+
severity: "error",
|
|
205
|
+
category: "structure",
|
|
206
|
+
message: `${coreDir} directory not found`,
|
|
207
|
+
recommendation: "Verify TypeScript source structure is intact"
|
|
208
|
+
}
|
|
209
|
+
]);
|
|
210
|
+
} else {
|
|
211
|
+
const files = readdirSync(cliDir).filter((f) => f.endsWith(".ts") && !f.includes(".test."));
|
|
212
|
+
addCheck("CLI-to-core sync", "pass", `Found ${files.length} CLI command implementations`);
|
|
213
|
+
}
|
|
214
|
+
} catch (e) {
|
|
215
|
+
addCheck("CLI-to-core sync", "fail", `Error: ${getErrorMessage(e)}`);
|
|
216
|
+
}
|
|
217
|
+
try {
|
|
218
|
+
const domainsDir = join(cleoSrcRoot, "dispatch", "domains");
|
|
219
|
+
if (!existsSync(domainsDir)) {
|
|
220
|
+
addCheck("Domain handler coverage", "fail", "Dispatch domains directory missing", [
|
|
221
|
+
{
|
|
222
|
+
severity: "error",
|
|
223
|
+
category: "structure",
|
|
224
|
+
message: `${domainsDir} not found`,
|
|
225
|
+
recommendation: "Verify dispatch domain handlers are in place"
|
|
226
|
+
}
|
|
227
|
+
]);
|
|
228
|
+
} else {
|
|
229
|
+
const files = readdirSync(domainsDir).filter((f) => f.endsWith(".ts"));
|
|
230
|
+
addCheck("Domain handler coverage", "pass", `Found ${files.length} domain handlers`);
|
|
231
|
+
}
|
|
232
|
+
} catch (e) {
|
|
233
|
+
addCheck("Domain handler coverage", "fail", `Error: ${getErrorMessage(e)}`);
|
|
234
|
+
}
|
|
235
|
+
try {
|
|
236
|
+
const matrixPath = join(cleoSrcRoot, "dispatch", "lib", "capability-matrix.ts");
|
|
237
|
+
if (!existsSync(matrixPath)) {
|
|
238
|
+
addCheck("Capability matrix", "fail", "Capability matrix missing", [
|
|
239
|
+
{
|
|
240
|
+
severity: "error",
|
|
241
|
+
category: "configuration",
|
|
242
|
+
message: `${matrixPath} not found`,
|
|
243
|
+
recommendation: "Create capability matrix to document supported operations"
|
|
244
|
+
}
|
|
245
|
+
]);
|
|
246
|
+
} else {
|
|
247
|
+
addCheck("Capability matrix", "pass", "Capability matrix exists");
|
|
248
|
+
}
|
|
249
|
+
} catch (e) {
|
|
250
|
+
addCheck("Capability matrix", "fail", `Error: ${getErrorMessage(e)}`);
|
|
251
|
+
}
|
|
252
|
+
try {
|
|
253
|
+
const schemaPath = join(projectRoot, "src", "store", "schema.ts");
|
|
254
|
+
if (!existsSync(schemaPath)) {
|
|
255
|
+
addCheck("Schema validation", "fail", "Schema definition missing", [
|
|
256
|
+
{
|
|
257
|
+
severity: "error",
|
|
258
|
+
category: "data-model",
|
|
259
|
+
message: "src/store/schema.ts not found",
|
|
260
|
+
recommendation: "Create schema definition for database tables"
|
|
261
|
+
}
|
|
262
|
+
]);
|
|
263
|
+
} else {
|
|
264
|
+
const content = safeRead(schemaPath);
|
|
265
|
+
const tableCount = (content.match(/CREATE TABLE/g) || []).length;
|
|
266
|
+
if (tableCount === 0) {
|
|
267
|
+
addCheck(
|
|
268
|
+
"Schema validation",
|
|
269
|
+
"warn",
|
|
270
|
+
"Schema file exists but no CREATE TABLE statements",
|
|
271
|
+
[
|
|
272
|
+
{
|
|
273
|
+
severity: "warning",
|
|
274
|
+
category: "data-model",
|
|
275
|
+
message: "No SQL table definitions found in schema.ts",
|
|
276
|
+
recommendation: "Add CREATE TABLE statements for all database entities"
|
|
277
|
+
}
|
|
278
|
+
]
|
|
279
|
+
);
|
|
280
|
+
} else {
|
|
281
|
+
addCheck("Schema validation", "pass", `Schema defines ${tableCount} tables`);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
} catch (e) {
|
|
285
|
+
addCheck("Schema validation", "fail", `Error: ${getErrorMessage(e)}`);
|
|
286
|
+
}
|
|
287
|
+
try {
|
|
288
|
+
const visionPath = join(projectRoot, "docs", "concepts", "CLEO-VISION.md");
|
|
289
|
+
const specPath = join(projectRoot, "docs", "specs", "CLEO-PORTABLE-PROJECT-BRAIN-SPEC.md");
|
|
290
|
+
const issues = [];
|
|
291
|
+
if (!existsSync(visionPath)) {
|
|
292
|
+
issues.push({
|
|
293
|
+
severity: "error",
|
|
294
|
+
category: "vision",
|
|
295
|
+
message: "Vision document missing",
|
|
296
|
+
file: visionPath,
|
|
297
|
+
recommendation: "Create docs/concepts/CLEO-VISION.md with project vision"
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
if (!existsSync(specPath)) {
|
|
301
|
+
issues.push({
|
|
302
|
+
severity: "error",
|
|
303
|
+
category: "spec",
|
|
304
|
+
message: "Portable Brain spec missing",
|
|
305
|
+
file: specPath,
|
|
306
|
+
recommendation: "Create docs/specs/CLEO-PORTABLE-PROJECT-BRAIN-SPEC.md with canonical pillars"
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
if (issues.length > 0) {
|
|
310
|
+
addCheck("Canonical identity", "fail", "Canonical documents missing", issues);
|
|
311
|
+
} else {
|
|
312
|
+
const specContent = safeRead(specPath);
|
|
313
|
+
const requiredPillars = [
|
|
314
|
+
"Portable Memory",
|
|
315
|
+
"Provenance by Default",
|
|
316
|
+
"Interoperable Interfaces",
|
|
317
|
+
"Deterministic Safety",
|
|
318
|
+
"Cognitive Retrieval"
|
|
319
|
+
];
|
|
320
|
+
const missingPillars = requiredPillars.filter((p) => !specContent.includes(p));
|
|
321
|
+
if (missingPillars.length > 0) {
|
|
322
|
+
addCheck(
|
|
323
|
+
"Canonical identity",
|
|
324
|
+
"fail",
|
|
325
|
+
`Missing ${missingPillars.length} canonical pillars`,
|
|
326
|
+
[
|
|
327
|
+
{
|
|
328
|
+
severity: "error",
|
|
329
|
+
category: "vision",
|
|
330
|
+
message: `Missing pillars: ${missingPillars.join(", ")}`,
|
|
331
|
+
file: specPath,
|
|
332
|
+
recommendation: "Add all five canonical pillars to CLEO-PORTABLE-PROJECT-BRAIN-SPEC.md"
|
|
333
|
+
}
|
|
334
|
+
]
|
|
335
|
+
);
|
|
336
|
+
} else {
|
|
337
|
+
addCheck("Canonical identity", "pass", "All canonical pillars documented");
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
} catch (e) {
|
|
341
|
+
addCheck("Canonical identity", "fail", `Error: ${getErrorMessage(e)}`);
|
|
342
|
+
}
|
|
343
|
+
try {
|
|
344
|
+
const injectionPath = join(projectRoot, CLEO_DIR_NAME, TEMPLATES_SUBDIR, CLEO_INJECTION_MD);
|
|
345
|
+
if (!existsSync(injectionPath)) {
|
|
346
|
+
addCheck("Agent injection", "fail", "Agent injection template missing", [
|
|
347
|
+
{
|
|
348
|
+
severity: "error",
|
|
349
|
+
category: "agent-support",
|
|
350
|
+
message: "CLEO-INJECTION.md not found",
|
|
351
|
+
file: injectionPath,
|
|
352
|
+
recommendation: "Create agent injection template or run cleo init"
|
|
353
|
+
}
|
|
354
|
+
]);
|
|
355
|
+
} else {
|
|
356
|
+
const content = safeRead(injectionPath);
|
|
357
|
+
if (content.length < 100) {
|
|
358
|
+
addCheck("Agent injection", "warn", "Agent injection template appears incomplete", [
|
|
359
|
+
{
|
|
360
|
+
severity: "warning",
|
|
361
|
+
category: "agent-support",
|
|
362
|
+
message: "Template file is unusually short",
|
|
363
|
+
recommendation: "Verify template contains required agent instructions"
|
|
364
|
+
}
|
|
365
|
+
]);
|
|
366
|
+
} else {
|
|
367
|
+
addCheck("Agent injection", "pass", "Agent injection template exists");
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
} catch (e) {
|
|
371
|
+
addCheck("Agent injection", "fail", `Error: ${getErrorMessage(e)}`);
|
|
372
|
+
}
|
|
373
|
+
try {
|
|
374
|
+
const exitCodesPath = join(cleoSrcRoot, "dispatch", "lib", "exit-codes.ts");
|
|
375
|
+
if (!existsSync(exitCodesPath)) {
|
|
376
|
+
addCheck("Exit codes", "fail", "Exit codes definition missing", [
|
|
377
|
+
{
|
|
378
|
+
severity: "error",
|
|
379
|
+
category: "protocol",
|
|
380
|
+
message: `${exitCodesPath} not found`,
|
|
381
|
+
recommendation: "Create exit codes definition for CLI protocol compliance"
|
|
382
|
+
}
|
|
383
|
+
]);
|
|
384
|
+
} else {
|
|
385
|
+
const content = safeRead(exitCodesPath);
|
|
386
|
+
const codeCount = (content.match(/= \d+/g) || []).length;
|
|
387
|
+
addCheck("Exit codes", "pass", `${codeCount} exit codes defined`);
|
|
388
|
+
}
|
|
389
|
+
} catch (e) {
|
|
390
|
+
addCheck("Exit codes", "fail", `Error: ${getErrorMessage(e)}`);
|
|
391
|
+
}
|
|
392
|
+
if (result.summary.errors > 0) {
|
|
393
|
+
result.recommendations.push("Address all ERROR-level issues before proceeding");
|
|
394
|
+
}
|
|
395
|
+
if (result.summary.warnings > 0) {
|
|
396
|
+
result.recommendations.push("Review WARNING-level issues for documentation improvements");
|
|
397
|
+
}
|
|
398
|
+
if (result.summary.errors === 0 && result.summary.warnings === 0) {
|
|
399
|
+
result.recommendations.push("Documentation is synchronized with implementation");
|
|
400
|
+
}
|
|
401
|
+
cliOutput(result, { command: "detect-drift" });
|
|
402
|
+
process.exit(result.summary.exitCode);
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
export {
|
|
406
|
+
detectDriftCommand
|
|
407
|
+
};
|
|
408
|
+
//# sourceMappingURL=detect-drift-UL2JTPUK.js.map
|
|
@@ -0,0 +1,132 @@
|
|
|
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
|
+
showUsage
|
|
22
|
+
} from "./chunk-PKKZPOOP.js";
|
|
23
|
+
import {
|
|
24
|
+
dispatchFromCli
|
|
25
|
+
} from "./chunk-3IOQVUO7.js";
|
|
26
|
+
import "./chunk-AWCQH2W5.js";
|
|
27
|
+
import "./chunk-OGV57L4J.js";
|
|
28
|
+
import "./chunk-ZBISIPCK.js";
|
|
29
|
+
import "./chunk-3ZO3M37V.js";
|
|
30
|
+
import "./chunk-6JSJNYH2.js";
|
|
31
|
+
import "./chunk-QFFQSKRC.js";
|
|
32
|
+
|
|
33
|
+
// packages/cleo/src/cli/commands/diagnostics.ts
|
|
34
|
+
var enableCommand = defineCommand({
|
|
35
|
+
meta: {
|
|
36
|
+
name: "enable",
|
|
37
|
+
description: "Opt in to anonymous command telemetry for self-improvement analysis"
|
|
38
|
+
},
|
|
39
|
+
async run() {
|
|
40
|
+
await dispatchFromCli("mutate", "diagnostics", "enable", {}, { command: "diagnostics" });
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
var disableCommand = defineCommand({
|
|
44
|
+
meta: {
|
|
45
|
+
name: "disable",
|
|
46
|
+
description: "Opt out of telemetry collection (existing data is preserved)"
|
|
47
|
+
},
|
|
48
|
+
async run() {
|
|
49
|
+
await dispatchFromCli("mutate", "diagnostics", "disable", {}, { command: "diagnostics" });
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
var statusCommand = defineCommand({
|
|
53
|
+
meta: { name: "status", description: "Show telemetry opt-in state and database path" },
|
|
54
|
+
async run() {
|
|
55
|
+
await dispatchFromCli("query", "diagnostics", "status", {}, { command: "diagnostics" });
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
var analyzeCommand = defineCommand({
|
|
59
|
+
meta: {
|
|
60
|
+
name: "analyze",
|
|
61
|
+
description: "Aggregate telemetry patterns: top failing commands, slowest commands, BRAIN observations"
|
|
62
|
+
},
|
|
63
|
+
args: {
|
|
64
|
+
days: {
|
|
65
|
+
type: "string",
|
|
66
|
+
description: "Analysis window in days (default: 30)",
|
|
67
|
+
alias: "d"
|
|
68
|
+
},
|
|
69
|
+
"no-brain": {
|
|
70
|
+
type: "boolean",
|
|
71
|
+
description: "Skip pushing high-signal patterns to BRAIN"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
async run({ args }) {
|
|
75
|
+
await dispatchFromCli(
|
|
76
|
+
"query",
|
|
77
|
+
"diagnostics",
|
|
78
|
+
"analyze",
|
|
79
|
+
{
|
|
80
|
+
days: args.days !== void 0 ? Number.parseInt(args.days, 10) : 30,
|
|
81
|
+
noBrain: negatedFlag(args, "brain")
|
|
82
|
+
},
|
|
83
|
+
{ command: "diagnostics" }
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
var exportCommand = defineCommand({
|
|
88
|
+
meta: {
|
|
89
|
+
name: "export",
|
|
90
|
+
description: "Export all telemetry events as a JSON array for external analysis"
|
|
91
|
+
},
|
|
92
|
+
args: {
|
|
93
|
+
days: {
|
|
94
|
+
type: "string",
|
|
95
|
+
description: "Limit to last N days (default: all)",
|
|
96
|
+
alias: "d"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
async run({ args }) {
|
|
100
|
+
await dispatchFromCli(
|
|
101
|
+
"query",
|
|
102
|
+
"diagnostics",
|
|
103
|
+
"export",
|
|
104
|
+
{
|
|
105
|
+
days: args.days !== void 0 ? Number.parseInt(args.days, 10) : void 0
|
|
106
|
+
},
|
|
107
|
+
{ command: "diagnostics" }
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
var diagnosticsCommand = defineCommand({
|
|
112
|
+
meta: {
|
|
113
|
+
name: "diagnostics",
|
|
114
|
+
description: "Autonomous self-improvement telemetry \u2014 opt-in command analytics that feed BRAIN observations"
|
|
115
|
+
},
|
|
116
|
+
subCommands: {
|
|
117
|
+
enable: enableCommand,
|
|
118
|
+
disable: disableCommand,
|
|
119
|
+
status: statusCommand,
|
|
120
|
+
analyze: analyzeCommand,
|
|
121
|
+
export: exportCommand
|
|
122
|
+
},
|
|
123
|
+
async run({ cmd, rawArgs }) {
|
|
124
|
+
const firstArg = rawArgs?.find((a) => !a.startsWith("-"));
|
|
125
|
+
if (firstArg && cmd.subCommands && firstArg in cmd.subCommands) return;
|
|
126
|
+
await showUsage(cmd);
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
export {
|
|
130
|
+
diagnosticsCommand
|
|
131
|
+
};
|
|
132
|
+
//# sourceMappingURL=diagnostics-TI5QAZXR.js.map
|