@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,181 @@
|
|
|
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
|
+
cliOutput,
|
|
24
|
+
humanLine
|
|
25
|
+
} from "./chunk-3ZO3M37V.js";
|
|
26
|
+
import "./chunk-6JSJNYH2.js";
|
|
27
|
+
|
|
28
|
+
// packages/cleo/src/cli/commands/caamp.ts
|
|
29
|
+
import { homedir } from "node:os";
|
|
30
|
+
import { join } from "node:path";
|
|
31
|
+
var dedupeCommand = defineCommand({
|
|
32
|
+
meta: {
|
|
33
|
+
name: "dedupe",
|
|
34
|
+
description: "Remove duplicate CAAMP injection blocks from AGENTS.md files"
|
|
35
|
+
},
|
|
36
|
+
args: {
|
|
37
|
+
file: {
|
|
38
|
+
type: "string",
|
|
39
|
+
description: "Path to a specific AGENTS.md file to deduplicate (default: all standard locations)"
|
|
40
|
+
},
|
|
41
|
+
"dry-run": {
|
|
42
|
+
type: "boolean",
|
|
43
|
+
description: "Preview what would be changed without writing",
|
|
44
|
+
default: false
|
|
45
|
+
},
|
|
46
|
+
json: {
|
|
47
|
+
type: "boolean",
|
|
48
|
+
description: "Output as JSON",
|
|
49
|
+
default: false
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
async run({ args }) {
|
|
53
|
+
const { dedupeFiles } = await import("@cleocode/caamp");
|
|
54
|
+
let filePaths;
|
|
55
|
+
if (args.file) {
|
|
56
|
+
filePaths = [args.file];
|
|
57
|
+
} else {
|
|
58
|
+
const home = homedir();
|
|
59
|
+
filePaths = [
|
|
60
|
+
join(home, ".agents", "AGENTS.md"),
|
|
61
|
+
// project-level AGENTS.md in cwd
|
|
62
|
+
join(process.cwd(), "AGENTS.md")
|
|
63
|
+
];
|
|
64
|
+
}
|
|
65
|
+
if (args["dry-run"]) {
|
|
66
|
+
const { parseCaampBlocks } = await import("@cleocode/caamp");
|
|
67
|
+
const { existsSync } = await import("node:fs");
|
|
68
|
+
const { readFile } = await import("node:fs/promises");
|
|
69
|
+
const dryResults = [];
|
|
70
|
+
for (const filePath of filePaths) {
|
|
71
|
+
if (!existsSync(filePath)) {
|
|
72
|
+
dryResults.push({ filePath, exists: false, blockCount: 0, wouldRemove: 0 });
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
const content = await readFile(filePath, "utf-8");
|
|
76
|
+
const blocks = parseCaampBlocks(content);
|
|
77
|
+
const uniqueContents = new Set(blocks.map((b) => b.content));
|
|
78
|
+
const wouldRemove = blocks.length - uniqueContents.size;
|
|
79
|
+
dryResults.push({ filePath, exists: true, blockCount: blocks.length, wouldRemove });
|
|
80
|
+
}
|
|
81
|
+
cliOutput(
|
|
82
|
+
{ dryRun: true, files: dryResults },
|
|
83
|
+
{ command: "caamp", operation: "caamp.dedupe" }
|
|
84
|
+
);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
const results = await dedupeFiles(filePaths);
|
|
88
|
+
const totalRemoved = results.reduce((n, r) => n + r.removed, 0);
|
|
89
|
+
const filesModified = results.filter((r) => r.modified).length;
|
|
90
|
+
cliOutput(
|
|
91
|
+
{
|
|
92
|
+
dryRun: false,
|
|
93
|
+
filesProcessed: results.length,
|
|
94
|
+
filesModified,
|
|
95
|
+
totalRemoved,
|
|
96
|
+
files: results
|
|
97
|
+
},
|
|
98
|
+
{ command: "caamp", operation: "caamp.dedupe" }
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
var repairCommand = defineCommand({
|
|
103
|
+
meta: {
|
|
104
|
+
name: "repair",
|
|
105
|
+
description: "Heal damaged CAAMP markers and remove duplicate blocks across all instruction files"
|
|
106
|
+
},
|
|
107
|
+
args: {
|
|
108
|
+
"dry-run": {
|
|
109
|
+
type: "boolean",
|
|
110
|
+
description: "Report what would change without writing",
|
|
111
|
+
default: false
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
async run({ args }) {
|
|
115
|
+
const { getInstalledProviders, instructionFileCascade, normalizeMarkers, parseBlocks } = await import("@cleocode/caamp");
|
|
116
|
+
const { existsSync } = await import("node:fs");
|
|
117
|
+
const { readFile } = await import("node:fs/promises");
|
|
118
|
+
const providers = getInstalledProviders();
|
|
119
|
+
const paths = instructionFileCascade(process.cwd(), providers).filter((p) => existsSync(p));
|
|
120
|
+
if (args["dry-run"]) {
|
|
121
|
+
const preview = [];
|
|
122
|
+
for (const filePath of paths) {
|
|
123
|
+
const raw = await readFile(filePath, "utf-8");
|
|
124
|
+
const { content, repaired } = normalizeMarkers(raw);
|
|
125
|
+
const blocks = parseBlocks(content);
|
|
126
|
+
const distinct = new Set(blocks.map((b) => b.content)).size;
|
|
127
|
+
preview.push({
|
|
128
|
+
filePath,
|
|
129
|
+
blocks: blocks.length,
|
|
130
|
+
damagedMarkers: repaired,
|
|
131
|
+
duplicateBlocks: blocks.length - distinct
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
cliOutput(
|
|
135
|
+
{
|
|
136
|
+
dryRun: true,
|
|
137
|
+
filesScanned: preview.length,
|
|
138
|
+
needsRepair: preview.filter((p) => p.damagedMarkers > 0 || p.duplicateBlocks > 0).length,
|
|
139
|
+
files: preview
|
|
140
|
+
},
|
|
141
|
+
{ command: "caamp", operation: "caamp.repair" }
|
|
142
|
+
);
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
const { repairInstructionFiles } = await import("@cleocode/caamp");
|
|
146
|
+
const result = await repairInstructionFiles(process.cwd(), providers);
|
|
147
|
+
cliOutput(
|
|
148
|
+
{
|
|
149
|
+
dryRun: false,
|
|
150
|
+
filesScanned: result.files.length,
|
|
151
|
+
filesModified: result.filesModified,
|
|
152
|
+
markersHealed: result.repaired,
|
|
153
|
+
duplicatesRemoved: result.removed,
|
|
154
|
+
files: result.files
|
|
155
|
+
},
|
|
156
|
+
{ command: "caamp", operation: "caamp.repair" }
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
var caampCommand = defineCommand({
|
|
161
|
+
meta: {
|
|
162
|
+
name: "caamp",
|
|
163
|
+
description: "CAAMP injection management: repair markers, deduplicate blocks"
|
|
164
|
+
},
|
|
165
|
+
subCommands: {
|
|
166
|
+
dedupe: dedupeCommand,
|
|
167
|
+
repair: repairCommand
|
|
168
|
+
},
|
|
169
|
+
async run({ cmd, rawArgs }) {
|
|
170
|
+
if (isSubCommandDispatch(rawArgs, cmd.subCommands)) return;
|
|
171
|
+
humanLine("Usage: cleo caamp <subcommand>");
|
|
172
|
+
humanLine("");
|
|
173
|
+
humanLine("Subcommands:");
|
|
174
|
+
humanLine(" repair Heal damaged CAAMP markers and remove duplicate blocks");
|
|
175
|
+
humanLine(" dedupe Remove duplicate CAAMP injection blocks from AGENTS.md files");
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
export {
|
|
179
|
+
caampCommand
|
|
180
|
+
};
|
|
181
|
+
//# sourceMappingURL=caamp-MFQVN6VU.js.map
|
|
@@ -0,0 +1,84 @@
|
|
|
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
|
+
dispatchFromCli
|
|
21
|
+
} from "./chunk-3IOQVUO7.js";
|
|
22
|
+
import "./chunk-AWCQH2W5.js";
|
|
23
|
+
import "./chunk-OGV57L4J.js";
|
|
24
|
+
import "./chunk-ZBISIPCK.js";
|
|
25
|
+
import "./chunk-3ZO3M37V.js";
|
|
26
|
+
import "./chunk-6JSJNYH2.js";
|
|
27
|
+
import "./chunk-QFFQSKRC.js";
|
|
28
|
+
|
|
29
|
+
// packages/cleo/src/cli/commands/cancel.ts
|
|
30
|
+
var cancelCommand = defineCommand({
|
|
31
|
+
meta: {
|
|
32
|
+
name: "cancel",
|
|
33
|
+
description: "Cancel a task (soft terminal state; reversible via restore)"
|
|
34
|
+
},
|
|
35
|
+
args: {
|
|
36
|
+
taskId: {
|
|
37
|
+
type: "positional",
|
|
38
|
+
description: "Task ID to cancel",
|
|
39
|
+
required: true
|
|
40
|
+
},
|
|
41
|
+
reason: {
|
|
42
|
+
type: "string",
|
|
43
|
+
description: "Reason for cancellation"
|
|
44
|
+
},
|
|
45
|
+
children: {
|
|
46
|
+
type: "string",
|
|
47
|
+
description: "Child handling mode: block (default), cascade (cancel subtree), or reparent (move children under --to)",
|
|
48
|
+
default: "block"
|
|
49
|
+
},
|
|
50
|
+
to: {
|
|
51
|
+
type: "string",
|
|
52
|
+
description: "Target parent ID for --children reparent (T11811): children move under this epic"
|
|
53
|
+
},
|
|
54
|
+
force: {
|
|
55
|
+
type: "boolean",
|
|
56
|
+
description: "Required waiver for cascade cancellation above the subtree threshold",
|
|
57
|
+
default: false
|
|
58
|
+
},
|
|
59
|
+
cascadeThreshold: {
|
|
60
|
+
type: "string",
|
|
61
|
+
description: "Maximum descendant count allowed for cascade without --force (default: 10)"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
async run({ args }) {
|
|
65
|
+
await dispatchFromCli(
|
|
66
|
+
"mutate",
|
|
67
|
+
"tasks",
|
|
68
|
+
"cancel",
|
|
69
|
+
{
|
|
70
|
+
taskId: args.taskId,
|
|
71
|
+
reason: args.reason,
|
|
72
|
+
children: args.children,
|
|
73
|
+
reparentTo: typeof args.to === "string" && args.to.length > 0 ? args.to : void 0,
|
|
74
|
+
force: args.force === true,
|
|
75
|
+
cascadeThreshold: typeof args.cascadeThreshold === "string" && args.cascadeThreshold.length > 0 ? Number.parseInt(args.cascadeThreshold, 10) : void 0
|
|
76
|
+
},
|
|
77
|
+
{ command: "cancel", operation: "tasks.cancel" }
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
export {
|
|
82
|
+
cancelCommand
|
|
83
|
+
};
|
|
84
|
+
//# sourceMappingURL=cancel-SCMJTXZB.js.map
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
(() => {
|
|
2
|
+
const _installed = Symbol.for('cleocode.cli.sqliteWarningFilter');
|
|
3
|
+
if (globalThis[_installed]) return;
|
|
4
|
+
globalThis[_installed] = true;
|
|
5
|
+
const _origEmitWarning = process.emitWarning;
|
|
6
|
+
process.emitWarning = function(warning, type, code, ctor) {
|
|
7
|
+
if (typeof warning === 'object' && warning.name === 'ExperimentalWarning' && typeof warning.message === 'string' && /SQLite is an experimental feature/i.test(warning.message)) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
if (typeof warning === 'string' && /SQLite is an experimental feature/i.test(warning)) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
return _origEmitWarning.call(process, warning, type, code, ctor);
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
|
|
17
|
+
// packages/cleo/src/dispatch/domains/check/canon.ts
|
|
18
|
+
import { readFileSync } from "node:fs";
|
|
19
|
+
import { join } from "node:path";
|
|
20
|
+
var FORBIDDEN_PHRASES = [
|
|
21
|
+
"Four Great Systems",
|
|
22
|
+
"Four systems",
|
|
23
|
+
"Circle of Ten",
|
|
24
|
+
"exactly 10 domains",
|
|
25
|
+
"exactly ten domains"
|
|
26
|
+
];
|
|
27
|
+
var EXCLUDED_FILENAMES = [
|
|
28
|
+
"CLEO-CANT.md",
|
|
29
|
+
"CLEO-AWAKENING-STORY.md",
|
|
30
|
+
"CLEO-FOUNDING-STORY.md",
|
|
31
|
+
"CLEO-MANIFESTO.md"
|
|
32
|
+
];
|
|
33
|
+
function readLines(filePath) {
|
|
34
|
+
try {
|
|
35
|
+
return readFileSync(filePath, "utf8").split("\n");
|
|
36
|
+
} catch {
|
|
37
|
+
return [];
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function scanForbiddenPhrases(filePath, lines) {
|
|
41
|
+
const results = [];
|
|
42
|
+
for (let i = 0; i < lines.length; i++) {
|
|
43
|
+
const line = lines[i];
|
|
44
|
+
for (const phrase of FORBIDDEN_PHRASES) {
|
|
45
|
+
if (line.includes(phrase)) {
|
|
46
|
+
results.push({ file: filePath, line: i + 1, phrase });
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return results;
|
|
51
|
+
}
|
|
52
|
+
function countCanonicalDomains(typesFilePath) {
|
|
53
|
+
const lines = readLines(typesFilePath);
|
|
54
|
+
let inArray = false;
|
|
55
|
+
let count = 0;
|
|
56
|
+
for (const line of lines) {
|
|
57
|
+
if (!inArray) {
|
|
58
|
+
if (line.includes("CANONICAL_DOMAINS") && line.includes("[")) {
|
|
59
|
+
inArray = true;
|
|
60
|
+
}
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
if (line.includes("] as const")) {
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
const trimmed = line.trim();
|
|
67
|
+
if (trimmed.startsWith("'") && trimmed.includes("'")) {
|
|
68
|
+
count++;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return count;
|
|
72
|
+
}
|
|
73
|
+
function countOperations(registryFilePath) {
|
|
74
|
+
const lines = readLines(registryFilePath);
|
|
75
|
+
let count = 0;
|
|
76
|
+
for (const line of lines) {
|
|
77
|
+
if (/^\s*gateway:/.test(line)) {
|
|
78
|
+
count++;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return count;
|
|
82
|
+
}
|
|
83
|
+
function runCanonCheck(params) {
|
|
84
|
+
const { projectRoot } = params;
|
|
85
|
+
const typesFile = join(projectRoot, "packages/cleo/src/dispatch/types.ts");
|
|
86
|
+
const registryFile = join(projectRoot, "packages/cleo/src/dispatch/registry.ts");
|
|
87
|
+
const archGuide = join(projectRoot, "docs/concepts/CLEO-ARCHITECTURE-GUIDE.md");
|
|
88
|
+
const visionDoc = join(projectRoot, "docs/concepts/CLEO-VISION.md");
|
|
89
|
+
const constitution = join(projectRoot, "docs/specs/CLEO-OPERATION-CONSTITUTION.md");
|
|
90
|
+
const domainsInCode = countCanonicalDomains(typesFile);
|
|
91
|
+
const operationsInCode = countOperations(registryFile);
|
|
92
|
+
const excludedSet = new Set(EXCLUDED_FILENAMES);
|
|
93
|
+
const auditedDocs = [archGuide, visionDoc, constitution].filter((f) => {
|
|
94
|
+
const basename = f.split("/").pop() ?? "";
|
|
95
|
+
return !excludedSet.has(basename);
|
|
96
|
+
});
|
|
97
|
+
const allViolations = [];
|
|
98
|
+
for (const docPath of auditedDocs) {
|
|
99
|
+
const lines = readLines(docPath);
|
|
100
|
+
allViolations.push(...scanForbiddenPhrases(docPath, lines));
|
|
101
|
+
}
|
|
102
|
+
const assertions = [];
|
|
103
|
+
const archLines = readLines(archGuide);
|
|
104
|
+
const archText = archLines.join("\n");
|
|
105
|
+
assertions.push({
|
|
106
|
+
file: archGuide,
|
|
107
|
+
assertion: 'Contains "Six Great Systems"',
|
|
108
|
+
passed: archText.includes("Six Great Systems")
|
|
109
|
+
});
|
|
110
|
+
assertions.push({
|
|
111
|
+
file: archGuide,
|
|
112
|
+
assertion: 'Contains "Circle of Eleven"',
|
|
113
|
+
passed: archText.includes("Circle of Eleven")
|
|
114
|
+
});
|
|
115
|
+
const visionLines = readLines(visionDoc);
|
|
116
|
+
const visionText = visionLines.join("\n");
|
|
117
|
+
assertions.push({
|
|
118
|
+
file: visionDoc,
|
|
119
|
+
assertion: "Contains reference to six systems",
|
|
120
|
+
passed: visionText.includes("six systems") || visionText.includes("Six systems") || visionText.includes("6 systems") || visionText.includes("six canonical systems")
|
|
121
|
+
});
|
|
122
|
+
const constLines = readLines(constitution);
|
|
123
|
+
const constText = constLines.join("\n");
|
|
124
|
+
assertions.push({
|
|
125
|
+
file: constitution,
|
|
126
|
+
assertion: 'Contains "11 canonical domains"',
|
|
127
|
+
passed: constText.includes("11 canonical domains") || constText.includes("eleven canonical domains")
|
|
128
|
+
});
|
|
129
|
+
const allAssertionsPassed = assertions.every((a) => a.passed);
|
|
130
|
+
const passed = allViolations.length === 0 && allAssertionsPassed;
|
|
131
|
+
return {
|
|
132
|
+
domainsInCode,
|
|
133
|
+
operationsInCode,
|
|
134
|
+
violations: allViolations,
|
|
135
|
+
assertions,
|
|
136
|
+
passed
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
export {
|
|
140
|
+
runCanonCheck
|
|
141
|
+
};
|
|
142
|
+
//# sourceMappingURL=canon-NPF5RODM.js.map
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
CanonDocsDiffError,
|
|
18
|
+
loadCanonRegistry,
|
|
19
|
+
runCanonDocsCheck
|
|
20
|
+
} from "./chunk-SXXOC6KZ.js";
|
|
21
|
+
export {
|
|
22
|
+
CanonDocsDiffError,
|
|
23
|
+
loadCanonRegistry,
|
|
24
|
+
runCanonDocsCheck
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=canon-docs-2GTOLF7Y.js.map
|
|
@@ -0,0 +1,239 @@
|
|
|
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
|
+
humanWarn
|
|
24
|
+
} from "./chunk-3ZO3M37V.js";
|
|
25
|
+
import "./chunk-6JSJNYH2.js";
|
|
26
|
+
|
|
27
|
+
// packages/cleo/src/cli/commands/cant.ts
|
|
28
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
29
|
+
import { dirname, isAbsolute, join, resolve } from "node:path";
|
|
30
|
+
function resolveFilePath(file) {
|
|
31
|
+
return isAbsolute(file) ? file : resolve(process.cwd(), file);
|
|
32
|
+
}
|
|
33
|
+
function ensureExists(filePath, operation) {
|
|
34
|
+
if (existsSync(filePath)) return true;
|
|
35
|
+
cliError(`File not found: ${filePath}`, "E_FILE_READ");
|
|
36
|
+
process.exitCode = 3;
|
|
37
|
+
if (process.env["CLEO_DEBUG"]) humanWarn(`(operation: ${operation})`);
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
function emitFailure(operation, code, err) {
|
|
41
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
42
|
+
cliError(`${operation} failed: ${message}`, code);
|
|
43
|
+
process.exitCode = process.exitCode ?? 1;
|
|
44
|
+
}
|
|
45
|
+
async function loadCantDocument() {
|
|
46
|
+
const paths = ["@cleocode/cant", "../../../../cant/dist/index", "../../../../cant/src/index"];
|
|
47
|
+
for (const p of paths) {
|
|
48
|
+
try {
|
|
49
|
+
const mod = await import(p);
|
|
50
|
+
if (typeof mod["parseDocument"] === "function" && typeof mod["validateDocument"] === "function" && typeof mod["listSections"] === "function" && typeof mod["executePipeline"] === "function") {
|
|
51
|
+
return mod;
|
|
52
|
+
}
|
|
53
|
+
} catch {
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
throw new Error("Cannot load CANT document API. Ensure @cleocode/cant is installed.");
|
|
57
|
+
}
|
|
58
|
+
async function loadMigrateEngine() {
|
|
59
|
+
const paths = ["@cleocode/cant", "../../../../cant/dist/index", "../../../../cant/src/index"];
|
|
60
|
+
for (const p of paths) {
|
|
61
|
+
try {
|
|
62
|
+
const mod = await import(p);
|
|
63
|
+
if (typeof mod["migrateMarkdown"] === "function" && typeof mod["showDiff"] === "function") {
|
|
64
|
+
return mod;
|
|
65
|
+
}
|
|
66
|
+
} catch {
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
throw new Error("Cannot load CANT migration engine. Ensure @cleocode/cant is installed.");
|
|
70
|
+
}
|
|
71
|
+
var cantParseCommand = defineCommand({
|
|
72
|
+
meta: { name: "parse", description: "Parse a .cant file and emit the AST" },
|
|
73
|
+
args: { file: { type: "positional", description: ".cant file to parse", required: true } },
|
|
74
|
+
async run({ args }) {
|
|
75
|
+
const filePath = resolveFilePath(args.file);
|
|
76
|
+
if (!ensureExists(filePath, "cant.parse")) return;
|
|
77
|
+
try {
|
|
78
|
+
const mod = await loadCantDocument();
|
|
79
|
+
const result = await mod.parseDocument(filePath);
|
|
80
|
+
cliOutput(result, { command: "cant", operation: "cant.parse" });
|
|
81
|
+
} catch (err) {
|
|
82
|
+
emitFailure("cant.parse", "E_PARSE_FAILED", err);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
var cantValidateCommand = defineCommand({
|
|
87
|
+
meta: { name: "validate", description: "Run the 42-rule validation suite on a .cant file" },
|
|
88
|
+
args: { file: { type: "positional", description: ".cant file to validate", required: true } },
|
|
89
|
+
async run({ args }) {
|
|
90
|
+
const filePath = resolveFilePath(args.file);
|
|
91
|
+
if (!ensureExists(filePath, "cant.validate")) return;
|
|
92
|
+
try {
|
|
93
|
+
const mod = await loadCantDocument();
|
|
94
|
+
const result = await mod.validateDocument(filePath);
|
|
95
|
+
cliOutput(result, { command: "cant", operation: "cant.validate" });
|
|
96
|
+
} catch (err) {
|
|
97
|
+
emitFailure("cant.validate", "E_VALIDATE_FAILED", err);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
var cantListCommand = defineCommand({
|
|
102
|
+
meta: {
|
|
103
|
+
name: "list",
|
|
104
|
+
description: "List agents, workflows, or pipelines in a .cant file"
|
|
105
|
+
},
|
|
106
|
+
args: {
|
|
107
|
+
file: { type: "positional", description: ".cant file to inspect", required: true },
|
|
108
|
+
kind: {
|
|
109
|
+
type: "string",
|
|
110
|
+
description: "One of: agent | workflow | pipeline (default: agent)",
|
|
111
|
+
default: "agent"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
async run({ args }) {
|
|
115
|
+
const filePath = resolveFilePath(args.file);
|
|
116
|
+
if (!ensureExists(filePath, "cant.list")) return;
|
|
117
|
+
const kind = (args.kind ?? "agent").toLowerCase();
|
|
118
|
+
if (kind !== "agent" && kind !== "pipeline" && kind !== "workflow") {
|
|
119
|
+
cliError(`Invalid --kind '${kind}'. Use one of: agent, pipeline, workflow.`, "E_BAD_KIND");
|
|
120
|
+
process.exitCode = 2;
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
try {
|
|
124
|
+
const mod = await loadCantDocument();
|
|
125
|
+
const result = await mod.listSections(filePath, kind);
|
|
126
|
+
cliOutput(result, { command: "cant", operation: `cant.list-${kind}s` });
|
|
127
|
+
} catch (err) {
|
|
128
|
+
emitFailure(`cant.list-${kind}s`, "E_LIST_FAILED", err);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
var cantExecuteCommand = defineCommand({
|
|
133
|
+
meta: {
|
|
134
|
+
name: "execute",
|
|
135
|
+
description: "Execute a deterministic pipeline from a .cant file. LLM-dependent workflow constructs run via the cant-bridge."
|
|
136
|
+
},
|
|
137
|
+
args: {
|
|
138
|
+
file: { type: "positional", description: ".cant file to execute", required: true },
|
|
139
|
+
pipeline: { type: "string", description: "Pipeline name to execute", required: true }
|
|
140
|
+
},
|
|
141
|
+
async run({ args }) {
|
|
142
|
+
const filePath = resolveFilePath(args.file);
|
|
143
|
+
if (!ensureExists(filePath, "cant.execute")) return;
|
|
144
|
+
const pipelineName = args.pipeline;
|
|
145
|
+
try {
|
|
146
|
+
const mod = await loadCantDocument();
|
|
147
|
+
const result = await mod.executePipeline(filePath, pipelineName);
|
|
148
|
+
cliOutput(result, { command: "cant", operation: "cant.execute" });
|
|
149
|
+
if (!result.success) process.exitCode = 1;
|
|
150
|
+
} catch (err) {
|
|
151
|
+
emitFailure("cant.execute", "E_PIPELINE_RUNTIME", err);
|
|
152
|
+
process.exitCode = 1;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
var cantMigrateCommand = defineCommand({
|
|
157
|
+
meta: { name: "migrate", description: "Convert markdown instruction files to .cant format" },
|
|
158
|
+
args: {
|
|
159
|
+
file: { type: "positional", description: "Markdown file to migrate", required: true },
|
|
160
|
+
write: { type: "boolean", description: "Write .cant files to disk (default: dry-run preview)" },
|
|
161
|
+
"dry-run": {
|
|
162
|
+
type: "boolean",
|
|
163
|
+
description: "Preview conversion without writing files (default behavior)"
|
|
164
|
+
},
|
|
165
|
+
"output-dir": {
|
|
166
|
+
type: "string",
|
|
167
|
+
description: "Output directory for .cant files (default: .cleo/agents/)"
|
|
168
|
+
},
|
|
169
|
+
verbose: { type: "boolean", description: "Show detailed conversion log" }
|
|
170
|
+
},
|
|
171
|
+
async run({ args }) {
|
|
172
|
+
const isWrite = !!args.write && !args["dry-run"];
|
|
173
|
+
const isVerbose = !!args.verbose;
|
|
174
|
+
const filePath = resolveFilePath(args.file);
|
|
175
|
+
if (!ensureExists(filePath, "cant.migrate")) return;
|
|
176
|
+
try {
|
|
177
|
+
const mod = await loadMigrateEngine();
|
|
178
|
+
const content = readFileSync(filePath, "utf-8");
|
|
179
|
+
const result = mod.migrateMarkdown(content, filePath, {
|
|
180
|
+
write: isWrite,
|
|
181
|
+
verbose: isVerbose,
|
|
182
|
+
outputDir: args["output-dir"]
|
|
183
|
+
});
|
|
184
|
+
if (isWrite) {
|
|
185
|
+
const projectRoot = process.cwd();
|
|
186
|
+
let written = 0;
|
|
187
|
+
for (const outputFile of result.outputFiles) {
|
|
188
|
+
const outputPath = isAbsolute(outputFile.path) ? outputFile.path : join(projectRoot, outputFile.path);
|
|
189
|
+
mkdirSync(dirname(outputPath), { recursive: true });
|
|
190
|
+
writeFileSync(outputPath, outputFile.content, "utf-8");
|
|
191
|
+
written++;
|
|
192
|
+
}
|
|
193
|
+
cliOutput(
|
|
194
|
+
{
|
|
195
|
+
inputFile: result.inputFile,
|
|
196
|
+
filesWritten: written,
|
|
197
|
+
outputFiles: result.outputFiles.map((f) => ({ path: f.path, kind: f.kind })),
|
|
198
|
+
unconverted: result.unconverted,
|
|
199
|
+
summary: result.summary
|
|
200
|
+
},
|
|
201
|
+
{ command: "cant-migrate", operation: "cant.migrate" }
|
|
202
|
+
);
|
|
203
|
+
} else {
|
|
204
|
+
cliOutput(
|
|
205
|
+
{
|
|
206
|
+
inputFile: result.inputFile,
|
|
207
|
+
dryRun: true,
|
|
208
|
+
outputFiles: result.outputFiles.map((f) => ({ path: f.path, kind: f.kind })),
|
|
209
|
+
unconverted: result.unconverted,
|
|
210
|
+
summary: result.summary
|
|
211
|
+
},
|
|
212
|
+
{ command: "cant-migrate", operation: "cant.migrate" }
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
} catch (err) {
|
|
216
|
+
emitFailure("cant.migrate", "E_MIGRATION_FAILED", err);
|
|
217
|
+
process.exitCode = 1;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
var cantCommand = defineCommand({
|
|
222
|
+
meta: { name: "cant", description: "CANT DSL tooling" },
|
|
223
|
+
subCommands: {
|
|
224
|
+
parse: cantParseCommand,
|
|
225
|
+
validate: cantValidateCommand,
|
|
226
|
+
list: cantListCommand,
|
|
227
|
+
execute: cantExecuteCommand,
|
|
228
|
+
migrate: cantMigrateCommand
|
|
229
|
+
},
|
|
230
|
+
async run({ cmd, rawArgs }) {
|
|
231
|
+
const firstArg = rawArgs?.find((a) => !a.startsWith("-"));
|
|
232
|
+
if (firstArg && cmd.subCommands && firstArg in cmd.subCommands) return;
|
|
233
|
+
await showUsage(cmd);
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
export {
|
|
237
|
+
cantCommand
|
|
238
|
+
};
|
|
239
|
+
//# sourceMappingURL=cant-46XCUP4P.js.map
|