@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,400 @@
|
|
|
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
|
+
cliError,
|
|
22
|
+
cliOutput,
|
|
23
|
+
humanInfo,
|
|
24
|
+
humanProgress
|
|
25
|
+
} from "./chunk-3ZO3M37V.js";
|
|
26
|
+
import "./chunk-6JSJNYH2.js";
|
|
27
|
+
|
|
28
|
+
// packages/cleo/src/cli/commands/brain.ts
|
|
29
|
+
import { getProjectRoot } from "@cleocode/core";
|
|
30
|
+
import {
|
|
31
|
+
backfillBrainGraph,
|
|
32
|
+
exportBrainAsGexf,
|
|
33
|
+
exportBrainAsJson,
|
|
34
|
+
getMemoryQualityReport,
|
|
35
|
+
getPlasticityStats,
|
|
36
|
+
purgeBrainNoise,
|
|
37
|
+
runBrainMaintenance
|
|
38
|
+
} from "@cleocode/core/memory";
|
|
39
|
+
var maintenanceCommand = defineCommand({
|
|
40
|
+
meta: {
|
|
41
|
+
name: "maintenance",
|
|
42
|
+
description: "Run brain maintenance: temporal decay, consolidation, and embedding backfill"
|
|
43
|
+
},
|
|
44
|
+
args: {
|
|
45
|
+
"skip-decay": {
|
|
46
|
+
type: "boolean",
|
|
47
|
+
description: "Skip the temporal decay step (confidence reduction on stale learnings)"
|
|
48
|
+
},
|
|
49
|
+
"skip-consolidation": {
|
|
50
|
+
type: "boolean",
|
|
51
|
+
description: "Skip the memory consolidation step (merging old observations)"
|
|
52
|
+
},
|
|
53
|
+
"skip-reconciliation": {
|
|
54
|
+
type: "boolean",
|
|
55
|
+
description: "Skip the cross-DB orphaned reference reconciliation step"
|
|
56
|
+
},
|
|
57
|
+
"skip-tier-promotion": {
|
|
58
|
+
type: "boolean",
|
|
59
|
+
description: "Skip the tier promotion step (short\u2192medium, medium\u2192long promotion)"
|
|
60
|
+
},
|
|
61
|
+
"skip-embeddings": {
|
|
62
|
+
type: "boolean",
|
|
63
|
+
description: "Skip the embedding backfill step (vector generation for observations)"
|
|
64
|
+
},
|
|
65
|
+
json: { type: "boolean", description: "Output results as JSON" }
|
|
66
|
+
},
|
|
67
|
+
async run({ args }) {
|
|
68
|
+
const root = getProjectRoot();
|
|
69
|
+
try {
|
|
70
|
+
const result = await runBrainMaintenance(root, {
|
|
71
|
+
skipDecay: !!args["skip-decay"],
|
|
72
|
+
skipConsolidation: !!args["skip-consolidation"],
|
|
73
|
+
skipReconciliation: !!args["skip-reconciliation"],
|
|
74
|
+
skipTierPromotion: !!args["skip-tier-promotion"],
|
|
75
|
+
skipEmbeddings: !!args["skip-embeddings"],
|
|
76
|
+
onProgress: (step, current, total) => {
|
|
77
|
+
if (step === "embeddings" && total > 0) {
|
|
78
|
+
if (process.stdout.isTTY) {
|
|
79
|
+
humanProgress(`\r [embeddings] ${current}/${total}...`);
|
|
80
|
+
} else if (current === 1 || current === total) {
|
|
81
|
+
humanInfo(` [embeddings] ${current}/${total}...`);
|
|
82
|
+
}
|
|
83
|
+
} else if (current === 0) {
|
|
84
|
+
humanInfo(` [${step}] starting...`);
|
|
85
|
+
} else if (current === total && total > 0) {
|
|
86
|
+
if (step === "embeddings" && process.stdout.isTTY) {
|
|
87
|
+
humanProgress("\n");
|
|
88
|
+
}
|
|
89
|
+
humanInfo(` [${step}] done`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
const data = {
|
|
94
|
+
duration: result.duration
|
|
95
|
+
};
|
|
96
|
+
if (!args["skip-decay"]) {
|
|
97
|
+
data["decay"] = result.decay;
|
|
98
|
+
}
|
|
99
|
+
if (!args["skip-consolidation"]) {
|
|
100
|
+
data["consolidation"] = result.consolidation;
|
|
101
|
+
}
|
|
102
|
+
if (!args["skip-tier-promotion"]) {
|
|
103
|
+
data["tierPromotion"] = result.tierPromotion;
|
|
104
|
+
}
|
|
105
|
+
if (!args["skip-reconciliation"]) {
|
|
106
|
+
data["reconciliation"] = result.reconciliation;
|
|
107
|
+
}
|
|
108
|
+
if (!args["skip-embeddings"]) {
|
|
109
|
+
data["embeddings"] = result.embeddings;
|
|
110
|
+
}
|
|
111
|
+
cliOutput(data, {
|
|
112
|
+
command: "brain-maintenance",
|
|
113
|
+
operation: "brain.maintenance",
|
|
114
|
+
message: `Maintenance complete in ${result.duration}ms`
|
|
115
|
+
});
|
|
116
|
+
} catch (err) {
|
|
117
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
118
|
+
cliError(
|
|
119
|
+
`Brain maintenance failed: ${message}`,
|
|
120
|
+
"E_INTERNAL",
|
|
121
|
+
{ name: "E_INTERNAL" },
|
|
122
|
+
{
|
|
123
|
+
operation: "brain.maintenance"
|
|
124
|
+
}
|
|
125
|
+
);
|
|
126
|
+
process.exit(1);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
var backfillBrainCommand = defineCommand({
|
|
131
|
+
meta: {
|
|
132
|
+
name: "backfill",
|
|
133
|
+
description: "Back-fill brain_page_nodes and brain_page_edges from all surviving typed table rows (decisions, patterns, learnings, observations, sticky notes). Safe to re-run \u2014 duplicates are silently skipped."
|
|
134
|
+
},
|
|
135
|
+
args: {
|
|
136
|
+
json: { type: "boolean", description: "Output results as JSON" }
|
|
137
|
+
},
|
|
138
|
+
async run({ args: _args }) {
|
|
139
|
+
const root = getProjectRoot();
|
|
140
|
+
try {
|
|
141
|
+
const result = await backfillBrainGraph(root);
|
|
142
|
+
cliOutput(
|
|
143
|
+
{
|
|
144
|
+
before: result.before,
|
|
145
|
+
nodesInserted: result.nodesInserted,
|
|
146
|
+
stubsCreated: result.stubsCreated,
|
|
147
|
+
edgesInserted: result.edgesInserted,
|
|
148
|
+
after: result.after,
|
|
149
|
+
byType: result.byType
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
command: "brain-backfill",
|
|
153
|
+
operation: "brain.backfill",
|
|
154
|
+
message: `Back-fill complete: ${result.nodesInserted} nodes, ${result.edgesInserted} edges inserted`
|
|
155
|
+
}
|
|
156
|
+
);
|
|
157
|
+
} catch (err) {
|
|
158
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
159
|
+
cliError(
|
|
160
|
+
`Brain backfill failed: ${message}`,
|
|
161
|
+
"E_INTERNAL",
|
|
162
|
+
{ name: "E_INTERNAL" },
|
|
163
|
+
{
|
|
164
|
+
operation: "brain.backfill"
|
|
165
|
+
}
|
|
166
|
+
);
|
|
167
|
+
process.exit(1);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
var purgeCommand = defineCommand({
|
|
172
|
+
meta: {
|
|
173
|
+
name: "purge",
|
|
174
|
+
description: "Purge noise entries from brain.db \u2014 removes duplicate patterns, all learnings, test decisions, and task-lifecycle observations. TAKE A BACKUP FIRST."
|
|
175
|
+
},
|
|
176
|
+
args: {
|
|
177
|
+
json: { type: "boolean", description: "Output results as JSON" }
|
|
178
|
+
},
|
|
179
|
+
async run({ args: _args }) {
|
|
180
|
+
const root = getProjectRoot();
|
|
181
|
+
try {
|
|
182
|
+
const result = await purgeBrainNoise(root);
|
|
183
|
+
cliOutput(
|
|
184
|
+
{
|
|
185
|
+
patternsDeleted: result.patternsDeleted,
|
|
186
|
+
learningsDeleted: result.learningsDeleted,
|
|
187
|
+
decisionsDeleted: result.decisionsDeleted,
|
|
188
|
+
observationsDeleted: result.observationsDeleted,
|
|
189
|
+
after: result.after,
|
|
190
|
+
fts5Rebuilt: result.fts5Rebuilt
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
command: "brain-purge",
|
|
194
|
+
operation: "brain.purge",
|
|
195
|
+
message: "Purge complete"
|
|
196
|
+
}
|
|
197
|
+
);
|
|
198
|
+
} catch (err) {
|
|
199
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
200
|
+
cliError(
|
|
201
|
+
`Brain purge failed: ${message}`,
|
|
202
|
+
"E_INTERNAL",
|
|
203
|
+
{ name: "E_INTERNAL" },
|
|
204
|
+
{
|
|
205
|
+
operation: "brain.purge"
|
|
206
|
+
}
|
|
207
|
+
);
|
|
208
|
+
process.exit(1);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
var plasticityStatsCommand = defineCommand({
|
|
213
|
+
meta: {
|
|
214
|
+
name: "stats",
|
|
215
|
+
description: "Show recent STDP plasticity events: LTP/LTD counts, net weight delta, and most recent events."
|
|
216
|
+
},
|
|
217
|
+
args: {
|
|
218
|
+
limit: {
|
|
219
|
+
type: "string",
|
|
220
|
+
description: "Maximum recent events to show (default 20)",
|
|
221
|
+
default: "20"
|
|
222
|
+
},
|
|
223
|
+
json: { type: "boolean", description: "Output results as JSON" }
|
|
224
|
+
},
|
|
225
|
+
async run({ args }) {
|
|
226
|
+
const root = getProjectRoot();
|
|
227
|
+
const limit = Number.parseInt(args.limit, 10) || 20;
|
|
228
|
+
try {
|
|
229
|
+
const stats = await getPlasticityStats(root, limit);
|
|
230
|
+
cliOutput(
|
|
231
|
+
{
|
|
232
|
+
totalEvents: stats.totalEvents,
|
|
233
|
+
ltpCount: stats.ltpCount,
|
|
234
|
+
ltdCount: stats.ltdCount,
|
|
235
|
+
netDeltaW: stats.netDeltaW,
|
|
236
|
+
lastEventAt: stats.lastEventAt,
|
|
237
|
+
recentEvents: stats.recentEvents,
|
|
238
|
+
limit
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
command: "brain-plasticity-stats",
|
|
242
|
+
operation: "brain.plasticity.stats",
|
|
243
|
+
message: `${stats.totalEvents} plasticity event(s) recorded`
|
|
244
|
+
}
|
|
245
|
+
);
|
|
246
|
+
} catch (err) {
|
|
247
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
248
|
+
cliError(
|
|
249
|
+
`Brain plasticity stats failed: ${message}`,
|
|
250
|
+
"E_INTERNAL",
|
|
251
|
+
{ name: "E_INTERNAL" },
|
|
252
|
+
{ operation: "brain.plasticity.stats" }
|
|
253
|
+
);
|
|
254
|
+
process.exit(1);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
var plasticityCommand = defineCommand({
|
|
259
|
+
meta: {
|
|
260
|
+
name: "plasticity",
|
|
261
|
+
description: "STDP timing-dependent plasticity operations (T626 phase 5)"
|
|
262
|
+
},
|
|
263
|
+
subCommands: {
|
|
264
|
+
stats: plasticityStatsCommand
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
var qualityCommand = defineCommand({
|
|
268
|
+
meta: {
|
|
269
|
+
name: "quality",
|
|
270
|
+
description: "Show memory quality metrics: retrieval rates, top/never-retrieved entries, quality distribution, and noise ratio."
|
|
271
|
+
},
|
|
272
|
+
args: {
|
|
273
|
+
json: { type: "boolean", description: "Output results as JSON" }
|
|
274
|
+
},
|
|
275
|
+
async run({ args: _args }) {
|
|
276
|
+
const root = getProjectRoot();
|
|
277
|
+
try {
|
|
278
|
+
const report = await getMemoryQualityReport(root);
|
|
279
|
+
cliOutput(
|
|
280
|
+
{
|
|
281
|
+
totalRetrievals: report.totalRetrievals,
|
|
282
|
+
uniqueEntriesRetrieved: report.uniqueEntriesRetrieved,
|
|
283
|
+
usageRate: report.usageRate,
|
|
284
|
+
noiseRatio: report.noiseRatio,
|
|
285
|
+
qualityDistribution: report.qualityDistribution,
|
|
286
|
+
tierDistribution: report.tierDistribution,
|
|
287
|
+
topRetrieved: report.topRetrieved,
|
|
288
|
+
neverRetrieved: report.neverRetrieved
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
command: "brain-quality",
|
|
292
|
+
operation: "brain.quality",
|
|
293
|
+
message: `Quality report: ${(report.usageRate * 100).toFixed(1)}% usage rate, ${(report.noiseRatio * 100).toFixed(1)}% noise`
|
|
294
|
+
}
|
|
295
|
+
);
|
|
296
|
+
} catch (err) {
|
|
297
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
298
|
+
cliError(
|
|
299
|
+
`Brain quality report failed: ${message}`,
|
|
300
|
+
"E_INTERNAL",
|
|
301
|
+
{ name: "E_INTERNAL" },
|
|
302
|
+
{ operation: "brain.quality" }
|
|
303
|
+
);
|
|
304
|
+
process.exit(1);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
var exportCommand = defineCommand({
|
|
309
|
+
meta: {
|
|
310
|
+
name: "export",
|
|
311
|
+
description: "Export brain graph as GEXF (Gephi) or JSON format"
|
|
312
|
+
},
|
|
313
|
+
args: {
|
|
314
|
+
format: {
|
|
315
|
+
type: "string",
|
|
316
|
+
description: "Export format: gexf (Gephi standard) or json (flat arrays)",
|
|
317
|
+
default: "gexf"
|
|
318
|
+
},
|
|
319
|
+
output: {
|
|
320
|
+
type: "string",
|
|
321
|
+
description: "Write to file instead of stdout (optional)"
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
async run({ args }) {
|
|
325
|
+
const root = getProjectRoot();
|
|
326
|
+
const format = args.format ?? "gexf";
|
|
327
|
+
if (format !== "gexf" && format !== "json") {
|
|
328
|
+
cliError(`Invalid format: ${format}. Use 'gexf' or 'json'.`, "E_VALIDATION", {
|
|
329
|
+
name: "E_VALIDATION"
|
|
330
|
+
});
|
|
331
|
+
process.exit(1);
|
|
332
|
+
}
|
|
333
|
+
try {
|
|
334
|
+
let content;
|
|
335
|
+
let nodeCount;
|
|
336
|
+
let edgeCount;
|
|
337
|
+
if (format === "gexf") {
|
|
338
|
+
const result = await exportBrainAsGexf(root);
|
|
339
|
+
content = result.content;
|
|
340
|
+
nodeCount = result.nodeCount;
|
|
341
|
+
edgeCount = result.edgeCount;
|
|
342
|
+
} else {
|
|
343
|
+
const result = await exportBrainAsJson(root);
|
|
344
|
+
content = JSON.stringify(result, null, 2);
|
|
345
|
+
nodeCount = result.nodeCount;
|
|
346
|
+
edgeCount = result.edgeCount;
|
|
347
|
+
}
|
|
348
|
+
if (args.output) {
|
|
349
|
+
const fs = await import("node:fs");
|
|
350
|
+
fs.writeFileSync(args.output, content, "utf-8");
|
|
351
|
+
cliOutput(
|
|
352
|
+
{
|
|
353
|
+
outputFile: args.output,
|
|
354
|
+
nodeCount,
|
|
355
|
+
edgeCount,
|
|
356
|
+
format
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
command: "brain-export",
|
|
360
|
+
operation: "brain.export",
|
|
361
|
+
message: `Exported to ${args.output}: ${nodeCount} nodes, ${edgeCount} edges (${format.toUpperCase()})`
|
|
362
|
+
}
|
|
363
|
+
);
|
|
364
|
+
} else {
|
|
365
|
+
process.stdout.write(content + "\n");
|
|
366
|
+
}
|
|
367
|
+
} catch (err) {
|
|
368
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
369
|
+
cliError(
|
|
370
|
+
`Brain export failed: ${message}`,
|
|
371
|
+
"E_INTERNAL",
|
|
372
|
+
{ name: "E_INTERNAL" },
|
|
373
|
+
{
|
|
374
|
+
operation: "brain.export"
|
|
375
|
+
}
|
|
376
|
+
);
|
|
377
|
+
process.exit(1);
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
});
|
|
381
|
+
var brainCommand = defineCommand({
|
|
382
|
+
meta: { name: "brain", description: "Brain memory optimization operations" },
|
|
383
|
+
subCommands: {
|
|
384
|
+
maintenance: maintenanceCommand,
|
|
385
|
+
backfill: backfillBrainCommand,
|
|
386
|
+
purge: purgeCommand,
|
|
387
|
+
plasticity: plasticityCommand,
|
|
388
|
+
quality: qualityCommand,
|
|
389
|
+
export: exportCommand
|
|
390
|
+
},
|
|
391
|
+
async run({ cmd, rawArgs }) {
|
|
392
|
+
const firstArg = rawArgs?.find((a) => !a.startsWith("-"));
|
|
393
|
+
if (firstArg && cmd.subCommands && firstArg in cmd.subCommands) return;
|
|
394
|
+
await showUsage(cmd);
|
|
395
|
+
}
|
|
396
|
+
});
|
|
397
|
+
export {
|
|
398
|
+
brainCommand
|
|
399
|
+
};
|
|
400
|
+
//# sourceMappingURL=brain-273N3FW4.js.map
|
|
@@ -0,0 +1,212 @@
|
|
|
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
|
+
isSubCommandDispatch
|
|
18
|
+
} from "./chunk-YY66LFZF.js";
|
|
19
|
+
import {
|
|
20
|
+
defineCommand
|
|
21
|
+
} from "./chunk-PKKZPOOP.js";
|
|
22
|
+
import {
|
|
23
|
+
dispatchFromCli
|
|
24
|
+
} from "./chunk-3IOQVUO7.js";
|
|
25
|
+
import "./chunk-AWCQH2W5.js";
|
|
26
|
+
import "./chunk-OGV57L4J.js";
|
|
27
|
+
import "./chunk-ZBISIPCK.js";
|
|
28
|
+
import {
|
|
29
|
+
cliError,
|
|
30
|
+
cliOutput
|
|
31
|
+
} from "./chunk-3ZO3M37V.js";
|
|
32
|
+
import "./chunk-6JSJNYH2.js";
|
|
33
|
+
import "./chunk-QFFQSKRC.js";
|
|
34
|
+
|
|
35
|
+
// packages/cleo/src/cli/commands/briefing.ts
|
|
36
|
+
import { pushWarning } from "@cleocode/core";
|
|
37
|
+
var ADAPTER_FORMATS = ["claude", "codex", "gemini", "compact-json"];
|
|
38
|
+
function renderForAdapter(sectionName, content, format) {
|
|
39
|
+
switch (format) {
|
|
40
|
+
case "claude":
|
|
41
|
+
case "gemini":
|
|
42
|
+
return content;
|
|
43
|
+
case "codex": {
|
|
44
|
+
const stripped = content.replace(/\*\*(.*?)\*\*/g, "$1").replace(/\*(.*?)\*/g, "$1").split("\n").filter((line) => !/^\|[-: |]+\|$/.test(line)).join("\n");
|
|
45
|
+
return stripped;
|
|
46
|
+
}
|
|
47
|
+
case "compact-json":
|
|
48
|
+
return JSON.stringify({ section: sectionName, content }, null, 0);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function failInject(message, fix) {
|
|
52
|
+
pushWarning({ code: "W_TEMPLATE_INJECT_FAILED", message });
|
|
53
|
+
cliError(message, 1, { name: "E_VALIDATION", fix }, { operation: "briefing.inject" });
|
|
54
|
+
process.exitCode = 1;
|
|
55
|
+
}
|
|
56
|
+
var briefingInjectCommand = defineCommand({
|
|
57
|
+
meta: {
|
|
58
|
+
name: "inject",
|
|
59
|
+
description: "Print one CLEO protocol section (core or on-demand reference) by name, e.g. --section task-creation"
|
|
60
|
+
},
|
|
61
|
+
args: {
|
|
62
|
+
section: {
|
|
63
|
+
type: "string",
|
|
64
|
+
description: "Section name (see the On-demand reference table in CLEO-INJECTION.md)",
|
|
65
|
+
required: true
|
|
66
|
+
},
|
|
67
|
+
format: {
|
|
68
|
+
type: "string",
|
|
69
|
+
description: "markdown (default) or adapter:<claude|codex|gemini|compact-json>",
|
|
70
|
+
default: "markdown"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
async run({ args }) {
|
|
74
|
+
const { readInjectionSection } = await import("@cleocode/core/injection");
|
|
75
|
+
const sectionName = String(args.section ?? "");
|
|
76
|
+
const lookup = readInjectionSection(sectionName);
|
|
77
|
+
if (lookup.content === null) {
|
|
78
|
+
const available = lookup.available.join(", ");
|
|
79
|
+
failInject(
|
|
80
|
+
lookup.available.length === 0 ? "No CLEO protocol template found (package templates and installed CLEO-INJECTION.md are missing)." : `Section "${sectionName}" not found. Available sections: ${available}`,
|
|
81
|
+
lookup.available.length === 0 ? "Re-run `cleo init` or reinstall @cleocode/cleo." : `Pass one of: ${available}`
|
|
82
|
+
);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const formatStr = String(args.format ?? "markdown");
|
|
86
|
+
let output = lookup.content;
|
|
87
|
+
if (formatStr.startsWith("adapter:")) {
|
|
88
|
+
const adapterName = formatStr.slice("adapter:".length);
|
|
89
|
+
if (!ADAPTER_FORMATS.includes(adapterName)) {
|
|
90
|
+
const supported = ADAPTER_FORMATS.join(", ");
|
|
91
|
+
failInject(
|
|
92
|
+
`Unknown adapter format "${adapterName}". Supported: ${supported}`,
|
|
93
|
+
`Pass one of: ${supported}`
|
|
94
|
+
);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
output = renderForAdapter(sectionName, lookup.content, adapterName);
|
|
98
|
+
}
|
|
99
|
+
cliOutput(
|
|
100
|
+
{ section: sectionName, source: lookup.source, content: output },
|
|
101
|
+
{ command: "briefing-inject", operation: "briefing.inject" }
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
var briefingCommand = defineCommand({
|
|
106
|
+
meta: {
|
|
107
|
+
name: "briefing",
|
|
108
|
+
description: "Session resume context: last handoff, current task, next tasks, bugs, blockers, epics, and memory. Use at session start to restore context."
|
|
109
|
+
},
|
|
110
|
+
args: {
|
|
111
|
+
scope: {
|
|
112
|
+
type: "string",
|
|
113
|
+
description: "Scope filter (global or epic:T###)",
|
|
114
|
+
alias: "s"
|
|
115
|
+
},
|
|
116
|
+
"max-next": {
|
|
117
|
+
type: "string",
|
|
118
|
+
description: "Maximum next tasks to show",
|
|
119
|
+
default: "3"
|
|
120
|
+
},
|
|
121
|
+
"max-bugs": {
|
|
122
|
+
type: "string",
|
|
123
|
+
description: "Maximum bugs to show",
|
|
124
|
+
default: "10"
|
|
125
|
+
},
|
|
126
|
+
"max-blocked": {
|
|
127
|
+
type: "string",
|
|
128
|
+
description: "Maximum blocked tasks to show",
|
|
129
|
+
default: "10"
|
|
130
|
+
},
|
|
131
|
+
"max-epics": {
|
|
132
|
+
type: "string",
|
|
133
|
+
description: "Maximum active epics to show",
|
|
134
|
+
default: "5"
|
|
135
|
+
},
|
|
136
|
+
/**
|
|
137
|
+
* T1905 / BBTT-W1-3: strict contract mode.
|
|
138
|
+
*
|
|
139
|
+
* When set, exit non-zero if the briefing contains any contract violations
|
|
140
|
+
* (stale data, duplicate IDs, excluded-provenance items). Use in CI to
|
|
141
|
+
* catch briefing regressions early.
|
|
142
|
+
*/
|
|
143
|
+
strict: {
|
|
144
|
+
type: "boolean",
|
|
145
|
+
description: "Exit non-zero when briefing contract violations are detected (T1905)",
|
|
146
|
+
alias: "x"
|
|
147
|
+
},
|
|
148
|
+
/**
|
|
149
|
+
* T9974: debug mode — surface peerPatterns and other verbose fields
|
|
150
|
+
* suppressed by default. Passing --debug --with-profile --max-next 5
|
|
151
|
+
* restores the ~pre-T9974 output shape.
|
|
152
|
+
*/
|
|
153
|
+
debug: {
|
|
154
|
+
type: "boolean",
|
|
155
|
+
description: "Include verbose debug fields (peerPatterns etc.) suppressed by default",
|
|
156
|
+
default: false
|
|
157
|
+
},
|
|
158
|
+
/**
|
|
159
|
+
* T9974: include cold.userProfile traits in the bundle.
|
|
160
|
+
* Off by default — large trait dump rarely needed at session start.
|
|
161
|
+
*/
|
|
162
|
+
"with-profile": {
|
|
163
|
+
type: "boolean",
|
|
164
|
+
description: "Include user profile traits in the bundle (suppressed by default)",
|
|
165
|
+
default: false
|
|
166
|
+
},
|
|
167
|
+
/**
|
|
168
|
+
* T9964: restore full text fields on peerLearnings and decisions.
|
|
169
|
+
* By default these are truncated to 80-char previews with a `_next.fetch`
|
|
170
|
+
* hint. Pass --memory-detail to restore the full `insight` and `decision`
|
|
171
|
+
* body fields (equivalent to pre-T9964 output for those fields).
|
|
172
|
+
*/
|
|
173
|
+
"memory-detail": {
|
|
174
|
+
type: "boolean",
|
|
175
|
+
description: "Restore full peerLearnings/decisions body text (suppressed by default for token budget)",
|
|
176
|
+
default: false
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
subCommands: {
|
|
180
|
+
inject: briefingInjectCommand
|
|
181
|
+
},
|
|
182
|
+
async run({ args, cmd, rawArgs }) {
|
|
183
|
+
if (isSubCommandDispatch(rawArgs, cmd.subCommands)) return;
|
|
184
|
+
const result = await dispatchFromCli(
|
|
185
|
+
"query",
|
|
186
|
+
"session",
|
|
187
|
+
"briefing.show",
|
|
188
|
+
{
|
|
189
|
+
scope: args.scope,
|
|
190
|
+
maxNextTasks: parseInt(args["max-next"], 10),
|
|
191
|
+
maxBugs: parseInt(args["max-bugs"], 10),
|
|
192
|
+
maxBlocked: parseInt(args["max-blocked"], 10),
|
|
193
|
+
maxEpics: parseInt(args["max-epics"], 10),
|
|
194
|
+
debug: args.debug,
|
|
195
|
+
withProfile: args["with-profile"],
|
|
196
|
+
memoryDetail: args["memory-detail"]
|
|
197
|
+
},
|
|
198
|
+
{ command: "briefing" }
|
|
199
|
+
);
|
|
200
|
+
if (args.strict) {
|
|
201
|
+
const data = result?.["data"];
|
|
202
|
+
const violations = data?.["contractViolations"];
|
|
203
|
+
if (violations && violations.length > 0) {
|
|
204
|
+
process.exitCode = 1;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
export {
|
|
210
|
+
briefingCommand
|
|
211
|
+
};
|
|
212
|
+
//# sourceMappingURL=briefing-7H6OLECX.js.map
|