@cleocode/cleo 2026.10.3 → 2026.10.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 -94612
- 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/{DMj27Pxj.js → Btgeq_wq.js} +1 -1
- package/studio-dist/client/_app/immutable/chunks/{qq3pe1aT.js → CgBjxmu6.js} +1 -1
- package/studio-dist/client/_app/immutable/chunks/{Dc2owyvE.js → DgEKqO6r.js} +1 -1
- package/studio-dist/client/_app/immutable/chunks/t81h7afa.js +1 -0
- package/studio-dist/client/_app/immutable/entry/{app.CHWXLeE9.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.DmKQGvFh.js → 0.nTXyRfc-.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{1.DqJk_REO.js → 1.4zrWeHtl.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{15.GUy6kdW1.js → 15.D9mk4JyY.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{16.CcnKZ8f9.js → 16._-wt-sQf.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{17.DAlQF3lQ.js → 17.CUu6LQDj.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{18.vQFr-vFj.js → 18.Dz4QRTkX.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{20.GVOj5j_r.js → 20.CJ2_EB0U.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{24.2-wC6DOh.js → 24.Igj2FS7k.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{25.D1vYaH8g.js → 25.BnATjVGN.js} +2 -2
- package/studio-dist/client/_app/immutable/nodes/{26.C3rNqzZF.js → 26.6iPyjT44.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{3.b-7pzc3M.js → 3.AA5GwNgP.js} +1 -1
- package/studio-dist/client/_app/version.json +1 -1
- package/studio-dist/server/chunks/{0-BaCce-O1.js → 0-DGmsoBYm.js} +3 -3
- package/studio-dist/server/chunks/1-8PfxPvlK.js +9 -0
- package/studio-dist/server/chunks/{15-DRMOSIC9.js → 15-Bg6YTndh.js} +3 -3
- package/studio-dist/server/chunks/{16-BulXhoZZ.js → 16-BObLwgyD.js} +3 -3
- package/studio-dist/server/chunks/{17-DUEOCM0H.js → 17-BNXGyAHX.js} +3 -3
- package/studio-dist/server/chunks/{18-DP7Q8zPs.js → 18-UqQFRIID.js} +3 -3
- package/studio-dist/server/chunks/{20-9ta6MI7q.js → 20-CMn8a_yP.js} +3 -3
- package/studio-dist/server/chunks/{24-DysdL1ab.js → 24-BuOTDzib.js} +3 -3
- package/studio-dist/server/chunks/{25-CYsps38R.js → 25-CIMSmjVx.js} +4 -4
- package/studio-dist/server/chunks/{26-Df4YXgg0.js → 26-DWGObn2T.js} +3 -3
- package/studio-dist/server/chunks/{3-BEhOhYpL.js → 3-CyiffdJZ.js} +3 -3
- package/studio-dist/server/chunks/{_layout.svelte-CnLcXYG-.js → _layout.svelte-DYtClaIk.js} +4 -4
- package/studio-dist/server/chunks/{_page.svelte-HUqTICJR.js → _page.svelte-1h9E6s_f.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-DOl0DGOO.js → _page.svelte-BNNF62Nm.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-DzcZljiy.js → _page.svelte-BT1EUadj.js} +5 -5
- package/studio-dist/server/chunks/{_page.svelte-Dv8tmDEC.js → _page.svelte-Bip079LT.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-DGhXqeRc.js → _page.svelte-CEATWp_5.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-C0qgUvzA.js → _page.svelte-CV3xiD1y.js} +4 -4
- package/studio-dist/server/chunks/{_page.svelte-CbyEPj2j.js → _page.svelte-Cv_KVJDV.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-ui7LnWkL.js → _page.svelte-DSSy6LuK.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-Da4q5l93.js → _page.svelte-TF795TAS.js} +3 -3
- package/studio-dist/server/chunks/{_server.ts-CnKVmf_s.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-CPM4LrO2.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-ShcZo43D.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-Cgsrya1j.js → internal-CTULuLPB.js} +2 -2
- package/studio-dist/server/chunks/{stores-BGrpEDMK.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/Bw6J8NDM.js +0 -1
- package/studio-dist/client/_app/immutable/entry/start.C9bwPpvc.js +0 -1
- package/studio-dist/server/chunks/1-CVo7Nk6d.js +0 -9
|
@@ -0,0 +1,878 @@
|
|
|
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
|
+
showUsage
|
|
19
|
+
} from "./chunk-PKKZPOOP.js";
|
|
20
|
+
import {
|
|
21
|
+
dispatchFromCli,
|
|
22
|
+
dispatchRaw
|
|
23
|
+
} from "./chunk-3IOQVUO7.js";
|
|
24
|
+
import "./chunk-AWCQH2W5.js";
|
|
25
|
+
import "./chunk-OGV57L4J.js";
|
|
26
|
+
import "./chunk-ZBISIPCK.js";
|
|
27
|
+
import {
|
|
28
|
+
cliError,
|
|
29
|
+
cliOutput,
|
|
30
|
+
humanWarn
|
|
31
|
+
} from "./chunk-3ZO3M37V.js";
|
|
32
|
+
import {
|
|
33
|
+
getFormatContext,
|
|
34
|
+
setFormatContext
|
|
35
|
+
} from "./chunk-6JSJNYH2.js";
|
|
36
|
+
import "./chunk-QFFQSKRC.js";
|
|
37
|
+
|
|
38
|
+
// packages/cleo/src/cli/commands/graph.ts
|
|
39
|
+
import path from "node:path";
|
|
40
|
+
import { pushWarning } from "@cleocode/core";
|
|
41
|
+
import { resolveNexusQueryProjectId } from "@cleocode/core/nexus/registry.js";
|
|
42
|
+
function applyJsonFlag(jsonFlag) {
|
|
43
|
+
if (jsonFlag) {
|
|
44
|
+
setFormatContext({ format: "json", source: "flag", quiet: false });
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
var statusCommand = defineCommand({
|
|
48
|
+
meta: {
|
|
49
|
+
name: "status",
|
|
50
|
+
description: "Show code intelligence index freshness: file count, node/relation counts, last indexed time."
|
|
51
|
+
},
|
|
52
|
+
args: {
|
|
53
|
+
path: {
|
|
54
|
+
type: "positional",
|
|
55
|
+
description: "Path to the project directory (default: cwd)",
|
|
56
|
+
required: false
|
|
57
|
+
},
|
|
58
|
+
"project-id": {
|
|
59
|
+
type: "string",
|
|
60
|
+
description: "Override the project ID (default: auto-detected from path)"
|
|
61
|
+
},
|
|
62
|
+
json: {
|
|
63
|
+
type: "boolean",
|
|
64
|
+
description: "Output as JSON (LAFS envelope format)"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
async run({ args }) {
|
|
68
|
+
applyJsonFlag(args.json);
|
|
69
|
+
const projectIdOverride = args["project-id"];
|
|
70
|
+
const repoPath = args.path ? path.resolve(args.path) : process.cwd();
|
|
71
|
+
const startTime = Date.now();
|
|
72
|
+
try {
|
|
73
|
+
const [{ getNexusDb, nexusSchema }, { getIndexStats }] = await Promise.all([
|
|
74
|
+
import("@cleocode/core/store/nexus-sqlite"),
|
|
75
|
+
import("@cleocode/nexus/pipeline")
|
|
76
|
+
]);
|
|
77
|
+
const projectId = await resolveNexusQueryProjectId(repoPath, projectIdOverride);
|
|
78
|
+
const db = await getNexusDb();
|
|
79
|
+
const tables = {
|
|
80
|
+
nexusNodes: nexusSchema.nexusNodes,
|
|
81
|
+
nexusRelations: nexusSchema.nexusRelations
|
|
82
|
+
};
|
|
83
|
+
const stats = await getIndexStats(
|
|
84
|
+
projectId,
|
|
85
|
+
repoPath,
|
|
86
|
+
db,
|
|
87
|
+
tables
|
|
88
|
+
);
|
|
89
|
+
const durationMs = Date.now() - startTime;
|
|
90
|
+
cliOutput(
|
|
91
|
+
{ projectId, repoPath, ...stats },
|
|
92
|
+
{
|
|
93
|
+
command: "graph-status",
|
|
94
|
+
operation: "nexus.status",
|
|
95
|
+
extensions: { duration_ms: durationMs }
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
} catch (err) {
|
|
99
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
100
|
+
const ctx = getFormatContext();
|
|
101
|
+
if (ctx.format === "json") {
|
|
102
|
+
cliError(msg, 1, { name: "E_STATUS_FAILED" }, { operation: "nexus.status" });
|
|
103
|
+
} else {
|
|
104
|
+
humanWarn(`[graph] Error: ${msg}`);
|
|
105
|
+
await dispatchFromCli("query", "nexus", "status", {}, { command: "graph" });
|
|
106
|
+
}
|
|
107
|
+
process.exitCode = 1;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
var resolveCommand = defineCommand({
|
|
112
|
+
meta: { name: "resolve", description: "Resolve a symbol name to graph node(s)" },
|
|
113
|
+
args: {
|
|
114
|
+
taskRef: {
|
|
115
|
+
type: "positional",
|
|
116
|
+
description: "Symbol or task reference to resolve",
|
|
117
|
+
required: true
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
async run({ args }) {
|
|
121
|
+
await dispatchFromCli(
|
|
122
|
+
"query",
|
|
123
|
+
"nexus",
|
|
124
|
+
"resolve",
|
|
125
|
+
{ query: args.taskRef },
|
|
126
|
+
{ command: "graph" }
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
var depsCommand = defineCommand({
|
|
131
|
+
meta: { name: "deps", description: "List dependencies of a symbol (callers or callees)" },
|
|
132
|
+
args: {
|
|
133
|
+
symbol: {
|
|
134
|
+
type: "positional",
|
|
135
|
+
description: "Symbol name",
|
|
136
|
+
required: true
|
|
137
|
+
},
|
|
138
|
+
direction: {
|
|
139
|
+
type: "string",
|
|
140
|
+
description: "upstream|downstream (default: downstream)",
|
|
141
|
+
default: "downstream"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
async run({ args }) {
|
|
145
|
+
await dispatchFromCli(
|
|
146
|
+
"query",
|
|
147
|
+
"nexus",
|
|
148
|
+
"deps",
|
|
149
|
+
{ symbol: args.symbol, direction: args.direction },
|
|
150
|
+
{ command: "graph" }
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
var rawCommand = defineCommand({
|
|
155
|
+
meta: { name: "raw", description: "Return the raw graph (nodes + relations) for a project" },
|
|
156
|
+
args: {
|
|
157
|
+
"project-id": {
|
|
158
|
+
type: "string",
|
|
159
|
+
description: "Project ID (default: auto-detected from cwd)"
|
|
160
|
+
},
|
|
161
|
+
json: { type: "boolean", description: "Output as JSON" }
|
|
162
|
+
},
|
|
163
|
+
async run({ args }) {
|
|
164
|
+
applyJsonFlag(args.json);
|
|
165
|
+
const projectId = args["project-id"];
|
|
166
|
+
await dispatchFromCli("query", "nexus", "graph", { projectId }, { command: "graph" });
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
var discoverCommand = defineCommand({
|
|
170
|
+
meta: {
|
|
171
|
+
name: "discover",
|
|
172
|
+
description: "Find code relevant to a task query (searches labels, descriptions, and file paths)"
|
|
173
|
+
},
|
|
174
|
+
args: {
|
|
175
|
+
taskQuery: {
|
|
176
|
+
type: "positional",
|
|
177
|
+
description: "Task query to find relevant code for (required)",
|
|
178
|
+
required: true
|
|
179
|
+
},
|
|
180
|
+
method: {
|
|
181
|
+
type: "string",
|
|
182
|
+
description: "Discovery method: labels|description|files|auto",
|
|
183
|
+
default: "auto"
|
|
184
|
+
},
|
|
185
|
+
limit: { type: "string", description: "Max results", default: "10" }
|
|
186
|
+
},
|
|
187
|
+
async run({ args }) {
|
|
188
|
+
await dispatchFromCli(
|
|
189
|
+
"query",
|
|
190
|
+
"nexus",
|
|
191
|
+
"discover",
|
|
192
|
+
{
|
|
193
|
+
query: args.taskQuery,
|
|
194
|
+
method: args.method,
|
|
195
|
+
limit: parseInt(args.limit, 10)
|
|
196
|
+
},
|
|
197
|
+
{ command: "graph" }
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
var searchCommand = defineCommand({
|
|
202
|
+
meta: {
|
|
203
|
+
name: "search",
|
|
204
|
+
description: "Full-text / semantic search over symbol names and docstrings"
|
|
205
|
+
},
|
|
206
|
+
args: {
|
|
207
|
+
query: {
|
|
208
|
+
type: "positional",
|
|
209
|
+
description: "Search query",
|
|
210
|
+
required: true
|
|
211
|
+
},
|
|
212
|
+
limit: { type: "string", description: "Max results", default: "20" },
|
|
213
|
+
json: { type: "boolean", description: "Output as JSON" }
|
|
214
|
+
},
|
|
215
|
+
async run({ args }) {
|
|
216
|
+
applyJsonFlag(args.json);
|
|
217
|
+
await dispatchFromCli(
|
|
218
|
+
"query",
|
|
219
|
+
"nexus",
|
|
220
|
+
"search",
|
|
221
|
+
{ query: args.query, limit: parseInt(args.limit, 10) },
|
|
222
|
+
{ command: "graph" }
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
var augmentCommand = defineCommand({
|
|
227
|
+
meta: {
|
|
228
|
+
name: "augment",
|
|
229
|
+
description: "Augment symbol pattern with code context (for PreToolUse hooks)"
|
|
230
|
+
},
|
|
231
|
+
args: {
|
|
232
|
+
pattern: {
|
|
233
|
+
type: "positional",
|
|
234
|
+
description: "Symbol name or file pattern",
|
|
235
|
+
required: true
|
|
236
|
+
},
|
|
237
|
+
limit: { type: "string", description: "Max results (default: 5)", default: "5" }
|
|
238
|
+
},
|
|
239
|
+
async run({ args }) {
|
|
240
|
+
await dispatchFromCli(
|
|
241
|
+
"query",
|
|
242
|
+
"nexus",
|
|
243
|
+
"augment",
|
|
244
|
+
{ pattern: args.pattern, limit: parseInt(args.limit, 10) || 5 },
|
|
245
|
+
{ command: "graph" }
|
|
246
|
+
);
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
var contextCommand = defineCommand({
|
|
250
|
+
meta: {
|
|
251
|
+
name: "context",
|
|
252
|
+
description: "Return project context summary (node/relation counts, freshness)"
|
|
253
|
+
},
|
|
254
|
+
args: {
|
|
255
|
+
path: { type: "positional", description: "Project path (default: cwd)", required: false },
|
|
256
|
+
"project-id": { type: "string", description: "Override project ID" },
|
|
257
|
+
json: { type: "boolean", description: "Output as JSON" },
|
|
258
|
+
limit: { type: "string", description: "Max symbols", default: "20" },
|
|
259
|
+
kind: { type: "string", description: "Filter by node kind" }
|
|
260
|
+
},
|
|
261
|
+
async run({ args }) {
|
|
262
|
+
applyJsonFlag(args.json);
|
|
263
|
+
const repoPath = args.path ? path.resolve(args.path) : process.cwd();
|
|
264
|
+
const projectIdOverride = args["project-id"];
|
|
265
|
+
const projectId = await resolveNexusQueryProjectId(repoPath, projectIdOverride);
|
|
266
|
+
const limit = Number.parseInt(args.limit, 10) || 20;
|
|
267
|
+
const kind = args.kind ?? void 0;
|
|
268
|
+
const params = { projectId, limit };
|
|
269
|
+
if (kind) params["kind"] = kind;
|
|
270
|
+
await dispatchFromCli("query", "nexus", "context", params, { command: "graph" });
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
var impactCommand = defineCommand({
|
|
274
|
+
meta: {
|
|
275
|
+
name: "impact",
|
|
276
|
+
description: "Compute the blast radius (upstream/downstream) of a change"
|
|
277
|
+
},
|
|
278
|
+
args: {
|
|
279
|
+
symbol: {
|
|
280
|
+
type: "positional",
|
|
281
|
+
description: "Symbol name or ID to analyze",
|
|
282
|
+
required: true
|
|
283
|
+
},
|
|
284
|
+
direction: {
|
|
285
|
+
type: "string",
|
|
286
|
+
description: "upstream|downstream (default: upstream)",
|
|
287
|
+
default: "upstream"
|
|
288
|
+
},
|
|
289
|
+
json: { type: "boolean", description: "Output as JSON" }
|
|
290
|
+
},
|
|
291
|
+
async run({ args }) {
|
|
292
|
+
applyJsonFlag(args.json);
|
|
293
|
+
await dispatchFromCli(
|
|
294
|
+
"query",
|
|
295
|
+
"nexus",
|
|
296
|
+
"impact",
|
|
297
|
+
{ symbol: args.symbol, direction: args.direction },
|
|
298
|
+
{ command: "graph" }
|
|
299
|
+
);
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
var impactFullCommand = defineCommand({
|
|
303
|
+
meta: {
|
|
304
|
+
name: "impact-full",
|
|
305
|
+
description: "Full merged impact report: structural blast radius + open tasks + brain risk notes"
|
|
306
|
+
},
|
|
307
|
+
args: {
|
|
308
|
+
symbol: {
|
|
309
|
+
type: "positional",
|
|
310
|
+
description: "Symbol name or nexus node ID",
|
|
311
|
+
required: true
|
|
312
|
+
},
|
|
313
|
+
json: { type: "boolean", description: "Output as JSON" }
|
|
314
|
+
},
|
|
315
|
+
async run({ args }) {
|
|
316
|
+
applyJsonFlag(args.json);
|
|
317
|
+
const startTime = Date.now();
|
|
318
|
+
const response = await dispatchRaw("query", "nexus", "impact-full", { symbol: args.symbol });
|
|
319
|
+
const durationMs = Date.now() - startTime;
|
|
320
|
+
if (!response.success) {
|
|
321
|
+
cliError(
|
|
322
|
+
response.error?.message ?? "Unknown error",
|
|
323
|
+
1,
|
|
324
|
+
{ name: response.error?.code ?? "E_IMPACT_FULL_FAILED" },
|
|
325
|
+
{ operation: "nexus.impact-full", duration_ms: durationMs }
|
|
326
|
+
);
|
|
327
|
+
process.exitCode = 1;
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
cliOutput(
|
|
331
|
+
{ ...response.data ?? {}, _durationMs: durationMs },
|
|
332
|
+
{
|
|
333
|
+
command: "graph-impact-full",
|
|
334
|
+
operation: "nexus.impact-full",
|
|
335
|
+
extensions: { duration_ms: durationMs }
|
|
336
|
+
}
|
|
337
|
+
);
|
|
338
|
+
}
|
|
339
|
+
});
|
|
340
|
+
var clustersCommand = defineCommand({
|
|
341
|
+
meta: { name: "clusters", description: "Return detected community clusters in the graph" },
|
|
342
|
+
args: {
|
|
343
|
+
json: { type: "boolean", description: "Output as JSON" },
|
|
344
|
+
limit: { type: "string", description: "Max clusters", default: "10" },
|
|
345
|
+
"project-id": { type: "string", description: "Override project ID" }
|
|
346
|
+
},
|
|
347
|
+
async run({ args }) {
|
|
348
|
+
applyJsonFlag(args.json);
|
|
349
|
+
const projectId = args["project-id"];
|
|
350
|
+
const limit = Number.parseInt(args.limit, 10) || 10;
|
|
351
|
+
await dispatchFromCli("query", "nexus", "clusters", { projectId, limit }, { command: "graph" });
|
|
352
|
+
}
|
|
353
|
+
});
|
|
354
|
+
var flowsCommand = defineCommand({
|
|
355
|
+
meta: { name: "flows", description: "Return detected execution flows (process traces)" },
|
|
356
|
+
args: {
|
|
357
|
+
json: { type: "boolean", description: "Output as JSON" },
|
|
358
|
+
"project-id": { type: "string", description: "Override project ID" }
|
|
359
|
+
},
|
|
360
|
+
async run({ args }) {
|
|
361
|
+
applyJsonFlag(args.json);
|
|
362
|
+
const projectId = args["project-id"];
|
|
363
|
+
await dispatchFromCli("query", "nexus", "flows", { projectId }, { command: "graph" });
|
|
364
|
+
}
|
|
365
|
+
});
|
|
366
|
+
var diffCommand = defineCommand({
|
|
367
|
+
meta: { name: "diff", description: "Diff the graph between two commits or snapshots" },
|
|
368
|
+
args: {
|
|
369
|
+
from: { type: "string", description: "Base commit/ref" },
|
|
370
|
+
to: { type: "string", description: "Target commit/ref (default: HEAD)" },
|
|
371
|
+
json: { type: "boolean", description: "Output as JSON" }
|
|
372
|
+
},
|
|
373
|
+
async run({ args }) {
|
|
374
|
+
applyJsonFlag(args.json);
|
|
375
|
+
await dispatchFromCli(
|
|
376
|
+
"query",
|
|
377
|
+
"nexus",
|
|
378
|
+
"diff",
|
|
379
|
+
{ from: args.from, to: args.to },
|
|
380
|
+
{ command: "graph" }
|
|
381
|
+
);
|
|
382
|
+
}
|
|
383
|
+
});
|
|
384
|
+
var routeMapCommand = defineCommand({
|
|
385
|
+
meta: {
|
|
386
|
+
name: "route-map",
|
|
387
|
+
description: "Display all routes with their handlers and dependencies"
|
|
388
|
+
},
|
|
389
|
+
args: {
|
|
390
|
+
path: { type: "positional", description: "Project path (default: cwd)", required: false },
|
|
391
|
+
json: { type: "boolean", description: "Output as JSON" },
|
|
392
|
+
"project-id": { type: "string", description: "Override project ID" }
|
|
393
|
+
},
|
|
394
|
+
async run({ args }) {
|
|
395
|
+
applyJsonFlag(args.json);
|
|
396
|
+
const repoPath = args.path ? path.resolve(args.path) : process.cwd();
|
|
397
|
+
const projectIdOverride = args["project-id"];
|
|
398
|
+
const projectId = await resolveNexusQueryProjectId(repoPath, projectIdOverride);
|
|
399
|
+
await dispatchFromCli("query", "nexus", "route-map", { projectId }, { command: "graph" });
|
|
400
|
+
}
|
|
401
|
+
});
|
|
402
|
+
var shapeCheckCommand = defineCommand({
|
|
403
|
+
meta: {
|
|
404
|
+
name: "shape-check",
|
|
405
|
+
description: "Check response shape compatibility for a route handler"
|
|
406
|
+
},
|
|
407
|
+
args: {
|
|
408
|
+
routeSymbol: {
|
|
409
|
+
type: "positional",
|
|
410
|
+
description: "Route symbol ID (format: <filePath>::<routeName>)",
|
|
411
|
+
required: true
|
|
412
|
+
},
|
|
413
|
+
json: { type: "boolean", description: "Output as JSON" },
|
|
414
|
+
"project-id": { type: "string", description: "Override project ID" }
|
|
415
|
+
},
|
|
416
|
+
async run({ args }) {
|
|
417
|
+
applyJsonFlag(args.json);
|
|
418
|
+
const projectId = args["project-id"];
|
|
419
|
+
await dispatchFromCli(
|
|
420
|
+
"query",
|
|
421
|
+
"nexus",
|
|
422
|
+
"shape-check",
|
|
423
|
+
{ routeSymbol: args.routeSymbol, projectId },
|
|
424
|
+
{ command: "graph" }
|
|
425
|
+
);
|
|
426
|
+
}
|
|
427
|
+
});
|
|
428
|
+
var searchCodeCommand = defineCommand({
|
|
429
|
+
meta: { name: "search-code", description: "Search code by pattern across the project graph" },
|
|
430
|
+
args: {
|
|
431
|
+
pattern: {
|
|
432
|
+
type: "positional",
|
|
433
|
+
description: "Search pattern",
|
|
434
|
+
required: true
|
|
435
|
+
},
|
|
436
|
+
limit: { type: "string", description: "Max results", default: "20" },
|
|
437
|
+
json: { type: "boolean", description: "Output as JSON" }
|
|
438
|
+
},
|
|
439
|
+
async run({ args }) {
|
|
440
|
+
applyJsonFlag(args.json);
|
|
441
|
+
await dispatchFromCli(
|
|
442
|
+
"query",
|
|
443
|
+
"nexus",
|
|
444
|
+
"search-code",
|
|
445
|
+
{ pattern: args.pattern, limit: parseInt(args.limit, 10) },
|
|
446
|
+
{ command: "graph" }
|
|
447
|
+
);
|
|
448
|
+
}
|
|
449
|
+
});
|
|
450
|
+
var wikiCommand = defineCommand({
|
|
451
|
+
meta: { name: "wiki", description: "Generate a wiki-style description for a symbol or module" },
|
|
452
|
+
args: {
|
|
453
|
+
symbol: {
|
|
454
|
+
type: "positional",
|
|
455
|
+
description: "Symbol name or ID",
|
|
456
|
+
required: true
|
|
457
|
+
},
|
|
458
|
+
json: { type: "boolean", description: "Output as JSON" }
|
|
459
|
+
},
|
|
460
|
+
async run({ args }) {
|
|
461
|
+
applyJsonFlag(args.json);
|
|
462
|
+
await dispatchFromCli("query", "nexus", "wiki", { symbol: args.symbol }, { command: "graph" });
|
|
463
|
+
}
|
|
464
|
+
});
|
|
465
|
+
var hotPathsCommand = defineCommand({
|
|
466
|
+
meta: {
|
|
467
|
+
name: "hot-paths",
|
|
468
|
+
description: "List highest-weight relation edges by Hebbian plasticity weight"
|
|
469
|
+
},
|
|
470
|
+
args: {
|
|
471
|
+
limit: { type: "string", description: "Max edges (default: 20)", default: "20" },
|
|
472
|
+
json: { type: "boolean", description: "Output as JSON", default: false }
|
|
473
|
+
},
|
|
474
|
+
async run({ args }) {
|
|
475
|
+
applyJsonFlag(args.json);
|
|
476
|
+
const limit = Number.parseInt(args.limit, 10) || 20;
|
|
477
|
+
const startTime = Date.now();
|
|
478
|
+
const response = await dispatchRaw("query", "nexus", "hot-paths", { limit });
|
|
479
|
+
const durationMs = Date.now() - startTime;
|
|
480
|
+
if (!response.success) {
|
|
481
|
+
cliError(
|
|
482
|
+
response.error?.message ?? "Unknown error",
|
|
483
|
+
1,
|
|
484
|
+
{ name: response.error?.code ?? "E_HOT_PATHS_FAILED" },
|
|
485
|
+
{ operation: "nexus.hot-paths", duration_ms: durationMs }
|
|
486
|
+
);
|
|
487
|
+
process.exitCode = 1;
|
|
488
|
+
return;
|
|
489
|
+
}
|
|
490
|
+
cliOutput(response.data, {
|
|
491
|
+
command: "graph-hot-paths",
|
|
492
|
+
operation: "nexus.hot-paths",
|
|
493
|
+
extensions: { duration_ms: durationMs }
|
|
494
|
+
});
|
|
495
|
+
}
|
|
496
|
+
});
|
|
497
|
+
var hotNodesCommand = defineCommand({
|
|
498
|
+
meta: { name: "hot-nodes", description: "List symbols with highest aggregate Hebbian weight" },
|
|
499
|
+
args: {
|
|
500
|
+
limit: { type: "string", description: "Max nodes (default: 20)", default: "20" },
|
|
501
|
+
json: { type: "boolean", description: "Output as JSON", default: false }
|
|
502
|
+
},
|
|
503
|
+
async run({ args }) {
|
|
504
|
+
applyJsonFlag(args.json);
|
|
505
|
+
const limit = Number.parseInt(args.limit, 10) || 20;
|
|
506
|
+
const startTime = Date.now();
|
|
507
|
+
const response = await dispatchRaw("query", "nexus", "hot-nodes", { limit });
|
|
508
|
+
const durationMs = Date.now() - startTime;
|
|
509
|
+
if (!response.success) {
|
|
510
|
+
cliError(
|
|
511
|
+
response.error?.message ?? "Unknown error",
|
|
512
|
+
1,
|
|
513
|
+
{ name: response.error?.code ?? "E_HOT_NODES_FAILED" },
|
|
514
|
+
{ operation: "nexus.hot-nodes", duration_ms: durationMs }
|
|
515
|
+
);
|
|
516
|
+
process.exitCode = 1;
|
|
517
|
+
return;
|
|
518
|
+
}
|
|
519
|
+
cliOutput(response.data, {
|
|
520
|
+
command: "graph-hot-nodes",
|
|
521
|
+
operation: "nexus.hot-nodes",
|
|
522
|
+
extensions: { duration_ms: durationMs }
|
|
523
|
+
});
|
|
524
|
+
}
|
|
525
|
+
});
|
|
526
|
+
var coldSymbolsCommand = defineCommand({
|
|
527
|
+
meta: {
|
|
528
|
+
name: "cold-symbols",
|
|
529
|
+
description: "List cold symbols (stale access + low weight) for pruning candidates"
|
|
530
|
+
},
|
|
531
|
+
args: {
|
|
532
|
+
days: { type: "string", description: "Age threshold in days (default: 30)", default: "30" },
|
|
533
|
+
json: { type: "boolean", description: "Output as JSON", default: false }
|
|
534
|
+
},
|
|
535
|
+
async run({ args }) {
|
|
536
|
+
applyJsonFlag(args.json);
|
|
537
|
+
const days = Number.parseInt(args.days, 10) || 30;
|
|
538
|
+
await dispatchFromCli("query", "nexus", "cold-symbols", { days }, { command: "graph" });
|
|
539
|
+
}
|
|
540
|
+
});
|
|
541
|
+
var orphansCommand = defineCommand({
|
|
542
|
+
meta: { name: "orphans", description: "List graph nodes with no incoming or outgoing edges" },
|
|
543
|
+
async run() {
|
|
544
|
+
await dispatchFromCli("query", "nexus", "orphans.list", {}, { command: "graph" });
|
|
545
|
+
}
|
|
546
|
+
});
|
|
547
|
+
var queryCommand = defineCommand({
|
|
548
|
+
meta: { name: "query", description: "Execute recursive CTE queries against nexus.db" },
|
|
549
|
+
args: {
|
|
550
|
+
cte: {
|
|
551
|
+
type: "positional",
|
|
552
|
+
description: "CTE SQL or template alias",
|
|
553
|
+
required: true
|
|
554
|
+
},
|
|
555
|
+
params: { type: "string", description: "Comma-separated parameters" }
|
|
556
|
+
},
|
|
557
|
+
async run({ args }) {
|
|
558
|
+
const cteOrAlias = args.cte;
|
|
559
|
+
const paramsStr = args.params || "";
|
|
560
|
+
const ctParams = paramsStr.split(",").map((p) => p.trim()).filter(Boolean);
|
|
561
|
+
const startTime = Date.now();
|
|
562
|
+
const response = await dispatchRaw("query", "nexus", "query-cte", {
|
|
563
|
+
cte: cteOrAlias,
|
|
564
|
+
params: ctParams
|
|
565
|
+
});
|
|
566
|
+
const durationMs = Date.now() - startTime;
|
|
567
|
+
if (!response.success) {
|
|
568
|
+
const code = response.error?.code;
|
|
569
|
+
const msg = response.error?.message ?? "Unknown error";
|
|
570
|
+
const exitCode = code === "E_INVALID_INPUT" ? 6 : 77;
|
|
571
|
+
cliError(
|
|
572
|
+
msg,
|
|
573
|
+
exitCode,
|
|
574
|
+
{ name: code ?? "E_QUERY_FAILED" },
|
|
575
|
+
{ operation: "nexus.query-cte", duration_ms: durationMs }
|
|
576
|
+
);
|
|
577
|
+
process.exitCode = exitCode;
|
|
578
|
+
return;
|
|
579
|
+
}
|
|
580
|
+
const result = response.data;
|
|
581
|
+
if (!result.success) {
|
|
582
|
+
cliError(
|
|
583
|
+
result.error ?? "Unknown",
|
|
584
|
+
77,
|
|
585
|
+
{ name: "E_QUERY_FAILED" },
|
|
586
|
+
{ operation: "nexus.query-cte", duration_ms: durationMs }
|
|
587
|
+
);
|
|
588
|
+
process.exitCode = 77;
|
|
589
|
+
return;
|
|
590
|
+
}
|
|
591
|
+
const { formatCteResultAsMarkdown } = await import("@cleocode/core/nexus/query-dsl.js");
|
|
592
|
+
const markdown = formatCteResultAsMarkdown(result);
|
|
593
|
+
cliOutput(
|
|
594
|
+
{ ...result, _markdown: markdown },
|
|
595
|
+
{
|
|
596
|
+
command: "graph-query",
|
|
597
|
+
operation: "nexus.query-cte",
|
|
598
|
+
extensions: { duration_ms: durationMs }
|
|
599
|
+
}
|
|
600
|
+
);
|
|
601
|
+
}
|
|
602
|
+
});
|
|
603
|
+
var initCommand = defineCommand({
|
|
604
|
+
meta: { name: "init", description: "Initialize a new Nexus project database" },
|
|
605
|
+
async run() {
|
|
606
|
+
await dispatchFromCli("mutate", "nexus", "init", {}, { command: "graph" });
|
|
607
|
+
}
|
|
608
|
+
});
|
|
609
|
+
var syncCommand = defineCommand({
|
|
610
|
+
meta: {
|
|
611
|
+
name: "sync",
|
|
612
|
+
description: "Refresh registry metadata (task counts, labels, last-seen) for registered projects. Does NOT index source code \u2014 use `cleo nexus analyze` for the code graph."
|
|
613
|
+
},
|
|
614
|
+
args: {
|
|
615
|
+
path: { type: "positional", description: "Project path (default: cwd)", required: false },
|
|
616
|
+
json: { type: "boolean", description: "Output as JSON" }
|
|
617
|
+
},
|
|
618
|
+
async run({ args }) {
|
|
619
|
+
applyJsonFlag(args.json);
|
|
620
|
+
const repoPath = args.path ? path.resolve(args.path) : process.cwd();
|
|
621
|
+
pushWarning({
|
|
622
|
+
code: "W_GRAPH_SYNC_IS_METADATA_ONLY",
|
|
623
|
+
severity: "info",
|
|
624
|
+
message: "graph sync refreshes project REGISTRY metadata only \u2014 the `synced` count is registered projects, not source files. To build or refresh the code graph, run `cleo nexus analyze` and check `cleo nexus status`."
|
|
625
|
+
});
|
|
626
|
+
await dispatchFromCli("mutate", "nexus", "sync", { path: repoPath }, { command: "graph" });
|
|
627
|
+
}
|
|
628
|
+
});
|
|
629
|
+
var reconcileCommand = defineCommand({
|
|
630
|
+
meta: { name: "reconcile", description: "Reconcile graph state with on-disk source files" },
|
|
631
|
+
args: {
|
|
632
|
+
"project-id": { type: "string", description: "Project ID (default: auto-detected)" }
|
|
633
|
+
},
|
|
634
|
+
async run({ args }) {
|
|
635
|
+
await dispatchFromCli(
|
|
636
|
+
"mutate",
|
|
637
|
+
"nexus",
|
|
638
|
+
"reconcile",
|
|
639
|
+
{ projectId: args["project-id"] },
|
|
640
|
+
{ command: "graph" }
|
|
641
|
+
);
|
|
642
|
+
}
|
|
643
|
+
});
|
|
644
|
+
var livingFullContextCommand = defineCommand({
|
|
645
|
+
meta: {
|
|
646
|
+
name: "full-context",
|
|
647
|
+
description: "Show full Living Brain context for a symbol: NEXUS callers/callees, BRAIN memories, TASKS, sentient proposals, conduit threads"
|
|
648
|
+
},
|
|
649
|
+
args: {
|
|
650
|
+
symbol: {
|
|
651
|
+
type: "positional",
|
|
652
|
+
description: "Symbol name or nexus node ID",
|
|
653
|
+
required: true
|
|
654
|
+
},
|
|
655
|
+
json: { type: "boolean", description: "Output as JSON" }
|
|
656
|
+
},
|
|
657
|
+
async run({ args }) {
|
|
658
|
+
applyJsonFlag(args.json);
|
|
659
|
+
const startTime = Date.now();
|
|
660
|
+
const symbolId = args.symbol;
|
|
661
|
+
const response = await dispatchRaw("query", "nexus", "full-context", { symbol: symbolId });
|
|
662
|
+
if (!response.success) {
|
|
663
|
+
cliError(
|
|
664
|
+
response.error?.message ?? "Unknown error",
|
|
665
|
+
1,
|
|
666
|
+
{ name: response.error?.code ?? "E_FULL_CONTEXT_FAILED" },
|
|
667
|
+
{ operation: "nexus.full-context" }
|
|
668
|
+
);
|
|
669
|
+
process.exitCode = 1;
|
|
670
|
+
return;
|
|
671
|
+
}
|
|
672
|
+
const durationMs = Date.now() - startTime;
|
|
673
|
+
cliOutput(
|
|
674
|
+
{ ...response.data ?? {}, _durationMs: durationMs },
|
|
675
|
+
{
|
|
676
|
+
command: "graph-living-full-context",
|
|
677
|
+
operation: "nexus.full-context",
|
|
678
|
+
extensions: { duration_ms: durationMs }
|
|
679
|
+
}
|
|
680
|
+
);
|
|
681
|
+
}
|
|
682
|
+
});
|
|
683
|
+
var livingTaskFootprintCommand = defineCommand({
|
|
684
|
+
meta: {
|
|
685
|
+
name: "task-footprint",
|
|
686
|
+
description: "Show full code impact of a task: files, symbols, blast radius, brain observations, decisions, risk tier"
|
|
687
|
+
},
|
|
688
|
+
args: {
|
|
689
|
+
taskId: {
|
|
690
|
+
type: "positional",
|
|
691
|
+
description: "Task ID (e.g., T001)",
|
|
692
|
+
required: true
|
|
693
|
+
},
|
|
694
|
+
json: { type: "boolean", description: "Output as JSON" }
|
|
695
|
+
},
|
|
696
|
+
async run({ args }) {
|
|
697
|
+
applyJsonFlag(args.json);
|
|
698
|
+
const startTime = Date.now();
|
|
699
|
+
const taskId = args.taskId;
|
|
700
|
+
const response = await dispatchRaw("query", "nexus", "task-footprint", { taskId });
|
|
701
|
+
if (!response.success) {
|
|
702
|
+
cliError(
|
|
703
|
+
response.error?.message ?? "Unknown error",
|
|
704
|
+
1,
|
|
705
|
+
{ name: response.error?.code ?? "E_TASK_FOOTPRINT_FAILED" },
|
|
706
|
+
{ operation: "nexus.task-footprint" }
|
|
707
|
+
);
|
|
708
|
+
process.exitCode = 1;
|
|
709
|
+
return;
|
|
710
|
+
}
|
|
711
|
+
const durationMs = Date.now() - startTime;
|
|
712
|
+
cliOutput(
|
|
713
|
+
{ ...response.data ?? {}, _durationMs: durationMs },
|
|
714
|
+
{
|
|
715
|
+
command: "graph-living-task-footprint",
|
|
716
|
+
operation: "nexus.task-footprint",
|
|
717
|
+
extensions: { duration_ms: durationMs }
|
|
718
|
+
}
|
|
719
|
+
);
|
|
720
|
+
}
|
|
721
|
+
});
|
|
722
|
+
var livingBrainAnchorsCommand = defineCommand({
|
|
723
|
+
meta: {
|
|
724
|
+
name: "brain-anchors",
|
|
725
|
+
description: "Show code anchors for a brain memory entry: linked nexus nodes, tasks, plasticity signal"
|
|
726
|
+
},
|
|
727
|
+
args: {
|
|
728
|
+
entryId: {
|
|
729
|
+
type: "positional",
|
|
730
|
+
description: "Brain entry node ID (e.g., observation:abc123)",
|
|
731
|
+
required: true
|
|
732
|
+
},
|
|
733
|
+
json: { type: "boolean", description: "Output as JSON" }
|
|
734
|
+
},
|
|
735
|
+
async run({ args }) {
|
|
736
|
+
applyJsonFlag(args.json);
|
|
737
|
+
const startTime = Date.now();
|
|
738
|
+
const entryId = args.entryId;
|
|
739
|
+
const response = await dispatchRaw("query", "nexus", "brain-anchors", { entryId });
|
|
740
|
+
if (!response.success) {
|
|
741
|
+
cliError(
|
|
742
|
+
response.error?.message ?? "Unknown error",
|
|
743
|
+
1,
|
|
744
|
+
{ name: response.error?.code ?? "E_BRAIN_ANCHORS_FAILED" },
|
|
745
|
+
{ operation: "nexus.brain-anchors" }
|
|
746
|
+
);
|
|
747
|
+
process.exitCode = 1;
|
|
748
|
+
return;
|
|
749
|
+
}
|
|
750
|
+
const durationMs = Date.now() - startTime;
|
|
751
|
+
cliOutput(
|
|
752
|
+
{ ...response.data ?? {}, _durationMs: durationMs },
|
|
753
|
+
{
|
|
754
|
+
command: "graph-living-brain-anchors",
|
|
755
|
+
operation: "nexus.brain-anchors",
|
|
756
|
+
extensions: { duration_ms: durationMs }
|
|
757
|
+
}
|
|
758
|
+
);
|
|
759
|
+
}
|
|
760
|
+
});
|
|
761
|
+
var livingWhyCommand = defineCommand({
|
|
762
|
+
meta: {
|
|
763
|
+
name: "why",
|
|
764
|
+
description: "Trace why a code symbol is structured this way: walks BRAIN decisions, observations, tasks via code_reference edges"
|
|
765
|
+
},
|
|
766
|
+
args: {
|
|
767
|
+
symbol: {
|
|
768
|
+
type: "positional",
|
|
769
|
+
description: "Symbol name or nexus node ID",
|
|
770
|
+
required: true
|
|
771
|
+
},
|
|
772
|
+
json: { type: "boolean", description: "Output as JSON" }
|
|
773
|
+
},
|
|
774
|
+
async run({ args }) {
|
|
775
|
+
applyJsonFlag(args.json);
|
|
776
|
+
const startTime = Date.now();
|
|
777
|
+
const symbolId = args.symbol;
|
|
778
|
+
const response = await dispatchRaw("query", "nexus", "why", { symbol: symbolId });
|
|
779
|
+
if (!response.success) {
|
|
780
|
+
cliError(
|
|
781
|
+
response.error?.message ?? "Unknown error",
|
|
782
|
+
1,
|
|
783
|
+
{ name: response.error?.code ?? "E_WHY_FAILED" },
|
|
784
|
+
{ operation: "nexus.why" }
|
|
785
|
+
);
|
|
786
|
+
process.exitCode = 1;
|
|
787
|
+
return;
|
|
788
|
+
}
|
|
789
|
+
const durationMs = Date.now() - startTime;
|
|
790
|
+
cliOutput(
|
|
791
|
+
{ ...response.data ?? {}, _durationMs: durationMs },
|
|
792
|
+
{
|
|
793
|
+
command: "graph-living-why",
|
|
794
|
+
operation: "nexus.why",
|
|
795
|
+
extensions: { duration_ms: durationMs }
|
|
796
|
+
}
|
|
797
|
+
);
|
|
798
|
+
}
|
|
799
|
+
});
|
|
800
|
+
var livingConduitScanCommand = defineCommand({
|
|
801
|
+
meta: {
|
|
802
|
+
name: "conduit-scan",
|
|
803
|
+
description: "Scan Conduit messaging patterns into the graph"
|
|
804
|
+
},
|
|
805
|
+
args: {
|
|
806
|
+
"project-id": { type: "string", description: "Project ID (default: auto-detected)" },
|
|
807
|
+
json: { type: "boolean", description: "Output as JSON" }
|
|
808
|
+
},
|
|
809
|
+
async run({ args }) {
|
|
810
|
+
applyJsonFlag(args.json);
|
|
811
|
+
await dispatchFromCli(
|
|
812
|
+
"mutate",
|
|
813
|
+
"nexus",
|
|
814
|
+
"conduit-scan",
|
|
815
|
+
{ projectId: args["project-id"] },
|
|
816
|
+
{ command: "graph" }
|
|
817
|
+
);
|
|
818
|
+
}
|
|
819
|
+
});
|
|
820
|
+
var livingCommand = defineCommand({
|
|
821
|
+
meta: {
|
|
822
|
+
name: "living",
|
|
823
|
+
description: "Living Brain ops \u2014 bridge code graph + BRAIN memory (task-footprint, brain-anchors, why, full-context, conduit-scan)"
|
|
824
|
+
},
|
|
825
|
+
subCommands: {
|
|
826
|
+
"full-context": livingFullContextCommand,
|
|
827
|
+
"task-footprint": livingTaskFootprintCommand,
|
|
828
|
+
"brain-anchors": livingBrainAnchorsCommand,
|
|
829
|
+
why: livingWhyCommand,
|
|
830
|
+
"conduit-scan": livingConduitScanCommand
|
|
831
|
+
},
|
|
832
|
+
async run({ cmd }) {
|
|
833
|
+
await showUsage(cmd);
|
|
834
|
+
}
|
|
835
|
+
});
|
|
836
|
+
var graphCommand = defineCommand({
|
|
837
|
+
meta: {
|
|
838
|
+
name: "graph",
|
|
839
|
+
description: "Project-scoped code intelligence: symbol graph, impact analysis, clusters, flows"
|
|
840
|
+
},
|
|
841
|
+
subCommands: {
|
|
842
|
+
status: statusCommand,
|
|
843
|
+
resolve: resolveCommand,
|
|
844
|
+
deps: depsCommand,
|
|
845
|
+
raw: rawCommand,
|
|
846
|
+
discover: discoverCommand,
|
|
847
|
+
search: searchCommand,
|
|
848
|
+
augment: augmentCommand,
|
|
849
|
+
context: contextCommand,
|
|
850
|
+
impact: impactCommand,
|
|
851
|
+
"impact-full": impactFullCommand,
|
|
852
|
+
clusters: clustersCommand,
|
|
853
|
+
flows: flowsCommand,
|
|
854
|
+
diff: diffCommand,
|
|
855
|
+
"route-map": routeMapCommand,
|
|
856
|
+
"shape-check": shapeCheckCommand,
|
|
857
|
+
"search-code": searchCodeCommand,
|
|
858
|
+
wiki: wikiCommand,
|
|
859
|
+
"hot-paths": hotPathsCommand,
|
|
860
|
+
"hot-nodes": hotNodesCommand,
|
|
861
|
+
"cold-symbols": coldSymbolsCommand,
|
|
862
|
+
orphans: orphansCommand,
|
|
863
|
+
query: queryCommand,
|
|
864
|
+
init: initCommand,
|
|
865
|
+
sync: syncCommand,
|
|
866
|
+
reconcile: reconcileCommand,
|
|
867
|
+
living: livingCommand
|
|
868
|
+
},
|
|
869
|
+
async run({ cmd, rawArgs }) {
|
|
870
|
+
const firstArg = rawArgs?.find((a) => !a.startsWith("-"));
|
|
871
|
+
if (firstArg && cmd.subCommands && firstArg in cmd.subCommands) return;
|
|
872
|
+
await showUsage(cmd);
|
|
873
|
+
}
|
|
874
|
+
});
|
|
875
|
+
export {
|
|
876
|
+
graphCommand
|
|
877
|
+
};
|
|
878
|
+
//# sourceMappingURL=graph-XIXMCFKG.js.map
|