@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,291 @@
|
|
|
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
|
+
} from "./chunk-3ZO3M37V.js";
|
|
24
|
+
import "./chunk-6JSJNYH2.js";
|
|
25
|
+
|
|
26
|
+
// packages/cleo/src/cli/commands/gc.ts
|
|
27
|
+
import { tmpdir } from "node:os";
|
|
28
|
+
import { join } from "node:path";
|
|
29
|
+
import { pruneOrphanTempDirs, pruneOrphanWorktrees } from "@cleocode/core/gc/cleanup.js";
|
|
30
|
+
import { runGC } from "@cleocode/core/gc/runner.js";
|
|
31
|
+
import { readGCState } from "@cleocode/core/gc/state.js";
|
|
32
|
+
import { getCleoWorktreesRoot, resolveLegacyCleoDir } from "@cleocode/paths";
|
|
33
|
+
|
|
34
|
+
// packages/utils/src/format-bytes.ts
|
|
35
|
+
var UNITS = ["B", "KB", "MB", "GB", "TB"];
|
|
36
|
+
function formatBytes(bytes) {
|
|
37
|
+
if (!Number.isFinite(bytes) || bytes <= 0) return "0 B";
|
|
38
|
+
const exp = Math.min(Math.floor(Math.log(bytes) / Math.log(1024)), UNITS.length - 1);
|
|
39
|
+
const value = bytes / 1024 ** exp;
|
|
40
|
+
return `${value.toFixed(exp === 0 ? 0 : 1)} ${UNITS[exp]}`;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// packages/utils/src/redact.ts
|
|
44
|
+
var ANTHROPIC_KEY_RE = /\bsk-ant-[A-Za-z0-9_-]{20,}\b/g;
|
|
45
|
+
var OPENAI_KEY_RE = /\bsk-(?:proj|svcacct|admin)-[A-Za-z0-9_-]{20,}\b|\bsk-[A-Za-z0-9]{32,}\b/g;
|
|
46
|
+
var GENERIC_SK_RE = /\bsk-[A-Za-z0-9_-]{20,}\b/g;
|
|
47
|
+
var SLACK_BOT_RE = /\bxoxb-[A-Za-z0-9_-]+\b/g;
|
|
48
|
+
var GITHUB_TOKEN_RE = /\bgh[pousr]_[A-Za-z0-9]{36,}\b|\bgithub_pat_[A-Za-z0-9]{22}_[A-Za-z0-9]{59}\b/g;
|
|
49
|
+
var JWT_RE = /\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b/g;
|
|
50
|
+
var BEARER_RE = /\bBearer\s+[A-Za-z0-9._~+/-]+=*/gi;
|
|
51
|
+
var HEX_SECRET_RE = /\b(?:key|token|secret|password|passwd|pwd)=([0-9a-f]{32,})\b/gi;
|
|
52
|
+
var JSON_PASSWORD_RE = /"(?:password|passwd|secret|token|apiKey|api_key|authToken|auth_token)"\s*:\s*"[^"]{4,}"/gi;
|
|
53
|
+
var ENV_ASSIGNMENT_RE = /\b(ANTHROPIC_API_KEY|OPENAI_API_KEY|GITHUB_TOKEN|NPM_TOKEN|AWS_(?:SECRET_)?ACCESS_KEY(?:_ID)?|GCP_(?:SERVICE_ACCOUNT_)?KEY|AZURE_(?:CLIENT_SECRET|ACCESS_KEY)|DATABASE_URL|REDIS_URL|SECRET(?:_KEY)?|API_(?:KEY|TOKEN|SECRET)|AUTH_(?:TOKEN|SECRET)|PRIVATE_KEY|ACCESS_(?:TOKEN|KEY)|BEARER_TOKEN|JWT_SECRET|ENCRYPTION_KEY|SIGNING_KEY|WEBHOOK_SECRET)(\s*=\s*)['"]?[^\s'"]{8,}['"]?/gi;
|
|
54
|
+
var SECRET_PATH_RE = /(?:(?:~|\/)[^\s'"]*\/)?(?:\.env(?:\.[A-Za-z0-9._-]+)?|id_rsa(?:_[A-Za-z0-9_-]*)?|[A-Za-z0-9_-]+\.(?:pem|key|p8|p12|pfx|jks|keystore))(?=[\s'"$]|$)/gi;
|
|
55
|
+
var SIMPLE_PATTERNS = [
|
|
56
|
+
ANTHROPIC_KEY_RE,
|
|
57
|
+
OPENAI_KEY_RE,
|
|
58
|
+
GENERIC_SK_RE,
|
|
59
|
+
SLACK_BOT_RE,
|
|
60
|
+
GITHUB_TOKEN_RE,
|
|
61
|
+
JWT_RE,
|
|
62
|
+
BEARER_RE,
|
|
63
|
+
HEX_SECRET_RE,
|
|
64
|
+
JSON_PASSWORD_RE
|
|
65
|
+
];
|
|
66
|
+
var ALL_PATTERNS = [...SIMPLE_PATTERNS, ENV_ASSIGNMENT_RE, SECRET_PATH_RE];
|
|
67
|
+
|
|
68
|
+
// packages/cleo/src/cli/commands/gc.ts
|
|
69
|
+
var runCommand = defineCommand({
|
|
70
|
+
meta: {
|
|
71
|
+
name: "run",
|
|
72
|
+
description: "Run GC immediately (blocking). Prunes old transcripts based on disk pressure."
|
|
73
|
+
},
|
|
74
|
+
args: {
|
|
75
|
+
"cleo-dir": {
|
|
76
|
+
type: "string",
|
|
77
|
+
description: "Override .cleo/ directory path"
|
|
78
|
+
},
|
|
79
|
+
"dry-run": {
|
|
80
|
+
type: "boolean",
|
|
81
|
+
description: "Report what would be pruned without deleting anything",
|
|
82
|
+
default: false
|
|
83
|
+
},
|
|
84
|
+
json: {
|
|
85
|
+
type: "boolean",
|
|
86
|
+
description: "Output result as JSON",
|
|
87
|
+
default: false
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
async run({ args }) {
|
|
91
|
+
const cleoDir = resolveLegacyCleoDir(args["cleo-dir"]);
|
|
92
|
+
const dryRun = args["dry-run"];
|
|
93
|
+
try {
|
|
94
|
+
const gcResult = await runGC({ cleoDir, dryRun });
|
|
95
|
+
const dryLabel = dryRun ? " (dry run)" : "";
|
|
96
|
+
const humanMsg = `GC run complete${dryLabel} \u2014 Disk: ${gcResult.diskUsedPct.toFixed(1)}% (${gcResult.threshold.toUpperCase()}), Pruned: ${gcResult.pruned.length} paths, ${formatBytes(gcResult.bytesFreed)} freed` + (gcResult.escalationSet && gcResult.escalationReason ? ` \u2014 WARNING: ${gcResult.escalationReason}` : "");
|
|
97
|
+
cliOutput(gcResult, {
|
|
98
|
+
command: "gc",
|
|
99
|
+
operation: "gc.run",
|
|
100
|
+
message: humanMsg
|
|
101
|
+
});
|
|
102
|
+
} catch (err) {
|
|
103
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
104
|
+
cliError(
|
|
105
|
+
`GC run failed: ${message}`,
|
|
106
|
+
"E_INTERNAL",
|
|
107
|
+
{ name: "E_INTERNAL" },
|
|
108
|
+
{
|
|
109
|
+
operation: "gc.run"
|
|
110
|
+
}
|
|
111
|
+
);
|
|
112
|
+
process.exit(1);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
var statusCommand = defineCommand({
|
|
117
|
+
meta: {
|
|
118
|
+
name: "status",
|
|
119
|
+
description: "Show last GC run stats, disk usage, and escalation state"
|
|
120
|
+
},
|
|
121
|
+
args: {
|
|
122
|
+
"cleo-dir": {
|
|
123
|
+
type: "string",
|
|
124
|
+
description: "Override .cleo/ directory path"
|
|
125
|
+
},
|
|
126
|
+
json: {
|
|
127
|
+
type: "boolean",
|
|
128
|
+
description: "Output result as JSON",
|
|
129
|
+
default: false
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
async run({ args }) {
|
|
133
|
+
const cleoDir = resolveLegacyCleoDir(args["cleo-dir"]);
|
|
134
|
+
const statePath = join(cleoDir, "gc-state.json");
|
|
135
|
+
try {
|
|
136
|
+
const state = await readGCState(statePath);
|
|
137
|
+
const diskStr = state.lastDiskUsedPct !== null ? `${state.lastDiskUsedPct.toFixed(1)}%` : "unknown";
|
|
138
|
+
cliOutput(state, {
|
|
139
|
+
command: "gc",
|
|
140
|
+
operation: "gc.status",
|
|
141
|
+
message: `Last run: ${state.lastRunAt ?? "never"}, Disk: ${diskStr}, Escalation: ${state.escalationNeeded ? "YES \u2014 run cleo gc run" : "no"}`
|
|
142
|
+
});
|
|
143
|
+
} catch (err) {
|
|
144
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
145
|
+
cliError(
|
|
146
|
+
`Error reading GC status: ${message}`,
|
|
147
|
+
"E_INTERNAL",
|
|
148
|
+
{ name: "E_INTERNAL" },
|
|
149
|
+
{
|
|
150
|
+
operation: "gc.status"
|
|
151
|
+
}
|
|
152
|
+
);
|
|
153
|
+
process.exit(1);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
var worktreesCommand = defineCommand({
|
|
158
|
+
meta: {
|
|
159
|
+
name: "worktrees",
|
|
160
|
+
description: "Prune orphaned agent worktree directories (task IDs no longer active)"
|
|
161
|
+
},
|
|
162
|
+
args: {
|
|
163
|
+
"worktrees-root": {
|
|
164
|
+
type: "string",
|
|
165
|
+
description: "Override the worktrees root directory"
|
|
166
|
+
},
|
|
167
|
+
"project-hash": {
|
|
168
|
+
type: "string",
|
|
169
|
+
description: "Scope pruning to a single project hash"
|
|
170
|
+
},
|
|
171
|
+
"preserve-tasks": {
|
|
172
|
+
type: "string",
|
|
173
|
+
description: "Comma-separated list of task IDs to preserve (default: none)"
|
|
174
|
+
},
|
|
175
|
+
"dry-run": {
|
|
176
|
+
type: "boolean",
|
|
177
|
+
description: "Report what would be pruned without deleting anything",
|
|
178
|
+
default: false
|
|
179
|
+
},
|
|
180
|
+
json: {
|
|
181
|
+
type: "boolean",
|
|
182
|
+
description: "Output result as JSON",
|
|
183
|
+
default: false
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
async run({ args }) {
|
|
187
|
+
const worktreesRoot = args["worktrees-root"] ?? getCleoWorktreesRoot();
|
|
188
|
+
const projectHash = args["project-hash"];
|
|
189
|
+
const dryRun = args["dry-run"];
|
|
190
|
+
const preserveRaw = args["preserve-tasks"];
|
|
191
|
+
const activeTaskIds = new Set(
|
|
192
|
+
preserveRaw ? preserveRaw.split(",").map((s) => s.trim()).filter(Boolean) : []
|
|
193
|
+
);
|
|
194
|
+
try {
|
|
195
|
+
const result = pruneOrphanWorktrees({
|
|
196
|
+
worktreesRoot,
|
|
197
|
+
projectHash,
|
|
198
|
+
activeTaskIds,
|
|
199
|
+
dryRun
|
|
200
|
+
});
|
|
201
|
+
const dryLabel = dryRun ? " (dry run)" : "";
|
|
202
|
+
const humanMsg = `GC worktrees${dryLabel} \u2014 ${dryRun ? "Would remove" : "Removed"}: ${result.removed} director${result.removed === 1 ? "y" : "ies"}` + (result.quarantined > 0 ? `, ${result.quarantined} quarantined (dirty/unpushed)` : "") + (result.errors.length > 0 ? `, ${result.errors.length} error(s)` : "");
|
|
203
|
+
cliOutput(result, {
|
|
204
|
+
command: "gc",
|
|
205
|
+
operation: "gc.worktrees",
|
|
206
|
+
message: humanMsg
|
|
207
|
+
});
|
|
208
|
+
} catch (err) {
|
|
209
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
210
|
+
cliError(
|
|
211
|
+
`GC worktrees failed: ${message}`,
|
|
212
|
+
"E_INTERNAL",
|
|
213
|
+
{ name: "E_INTERNAL" },
|
|
214
|
+
{ operation: "gc.worktrees" }
|
|
215
|
+
);
|
|
216
|
+
process.exit(1);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
var tempCommand = defineCommand({
|
|
221
|
+
meta: {
|
|
222
|
+
name: "temp",
|
|
223
|
+
description: "Prune orphaned CLEO-generated temp directories from os.tmpdir()"
|
|
224
|
+
},
|
|
225
|
+
args: {
|
|
226
|
+
"max-age-hours": {
|
|
227
|
+
type: "string",
|
|
228
|
+
description: "Maximum age (hours) before a temp dir is eligible for pruning (default: 2)"
|
|
229
|
+
},
|
|
230
|
+
"dry-run": {
|
|
231
|
+
type: "boolean",
|
|
232
|
+
description: "Report what would be pruned without deleting anything",
|
|
233
|
+
default: false
|
|
234
|
+
},
|
|
235
|
+
json: {
|
|
236
|
+
type: "boolean",
|
|
237
|
+
description: "Output result as JSON",
|
|
238
|
+
default: false
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
async run({ args }) {
|
|
242
|
+
const maxAgeHoursRaw = args["max-age-hours"];
|
|
243
|
+
const maxAgeHours = maxAgeHoursRaw !== void 0 ? Number(maxAgeHoursRaw) : 2;
|
|
244
|
+
const maxAgeMs = maxAgeHours * 60 * 60 * 1e3;
|
|
245
|
+
const dryRun = args["dry-run"];
|
|
246
|
+
try {
|
|
247
|
+
const result = pruneOrphanTempDirs({
|
|
248
|
+
maxAgeMs,
|
|
249
|
+
tempDir: tmpdir(),
|
|
250
|
+
dryRun
|
|
251
|
+
});
|
|
252
|
+
const dryLabel = dryRun ? " (dry run)" : "";
|
|
253
|
+
const humanMsg = `GC temp${dryLabel} \u2014 ${dryRun ? "Would remove" : "Removed"}: ${result.removed} director${result.removed === 1 ? "y" : "ies"}, skipped: ${result.skipped}` + (result.errors.length > 0 ? `, ${result.errors.length} error(s)` : "");
|
|
254
|
+
cliOutput(result, {
|
|
255
|
+
command: "gc",
|
|
256
|
+
operation: "gc.temp",
|
|
257
|
+
message: humanMsg
|
|
258
|
+
});
|
|
259
|
+
} catch (err) {
|
|
260
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
261
|
+
cliError(
|
|
262
|
+
`GC temp failed: ${message}`,
|
|
263
|
+
"E_INTERNAL",
|
|
264
|
+
{ name: "E_INTERNAL" },
|
|
265
|
+
{ operation: "gc.temp" }
|
|
266
|
+
);
|
|
267
|
+
process.exit(1);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
var gcCommand = defineCommand({
|
|
272
|
+
meta: {
|
|
273
|
+
name: "gc",
|
|
274
|
+
description: "Transcript garbage collection: manual trigger and status"
|
|
275
|
+
},
|
|
276
|
+
subCommands: {
|
|
277
|
+
run: runCommand,
|
|
278
|
+
status: statusCommand,
|
|
279
|
+
worktrees: worktreesCommand,
|
|
280
|
+
temp: tempCommand
|
|
281
|
+
},
|
|
282
|
+
async run({ cmd, rawArgs }) {
|
|
283
|
+
const firstArg = rawArgs?.find((a) => !a.startsWith("-"));
|
|
284
|
+
if (firstArg && cmd.subCommands && firstArg in cmd.subCommands) return;
|
|
285
|
+
await showUsage(cmd);
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
export {
|
|
289
|
+
gcCommand
|
|
290
|
+
};
|
|
291
|
+
//# sourceMappingURL=gc-5R2TUY5T.js.map
|
|
@@ -0,0 +1,206 @@
|
|
|
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 "./chunk-C3B7C43W.js";
|
|
17
|
+
import {
|
|
18
|
+
defineCommand
|
|
19
|
+
} from "./chunk-PKKZPOOP.js";
|
|
20
|
+
import {
|
|
21
|
+
cliOutput
|
|
22
|
+
} from "./chunk-3ZO3M37V.js";
|
|
23
|
+
import "./chunk-6JSJNYH2.js";
|
|
24
|
+
import {
|
|
25
|
+
executePlaybook,
|
|
26
|
+
parsePlaybook
|
|
27
|
+
} from "./chunk-QFFQSKRC.js";
|
|
28
|
+
|
|
29
|
+
// packages/cleo/src/cli/commands/go.ts
|
|
30
|
+
import { getProjectRoot, go } from "@cleocode/core";
|
|
31
|
+
|
|
32
|
+
// packages/cleo/src/cli/commands/go-ivtr-runner.ts
|
|
33
|
+
import { resolvePlaybook } from "@cleocode/core";
|
|
34
|
+
function buildGoIvtrRunner() {
|
|
35
|
+
return runIvtrPlaybookTurn;
|
|
36
|
+
}
|
|
37
|
+
var runIvtrPlaybookTurn = async (taskId, options) => {
|
|
38
|
+
const { projectRoot } = options;
|
|
39
|
+
const resolved = resolvePlaybook("ivtr", { projectRoot });
|
|
40
|
+
const parsed = parsePlaybook(resolved.source);
|
|
41
|
+
const { seedIvtrForPlaybook, finalizeIvtrFromPlaybook, getDb, getNativeDb } = await import("@cleocode/core/internal");
|
|
42
|
+
await seedIvtrForPlaybook(taskId, { cwd: projectRoot });
|
|
43
|
+
await getDb(projectRoot);
|
|
44
|
+
const db = getNativeDb(projectRoot);
|
|
45
|
+
if (!db) {
|
|
46
|
+
throw new Error("cleo go IVTR runner: tasks.db singleton was not initialized by getDb()");
|
|
47
|
+
}
|
|
48
|
+
const dispatcher = await buildGoDispatcher(projectRoot);
|
|
49
|
+
const opts = {
|
|
50
|
+
db,
|
|
51
|
+
playbook: parsed.definition,
|
|
52
|
+
playbookHash: parsed.sourceHash,
|
|
53
|
+
initialContext: { taskId },
|
|
54
|
+
dispatcher,
|
|
55
|
+
projectRoot
|
|
56
|
+
};
|
|
57
|
+
if (options.epicId !== void 0) opts.epicId = options.epicId;
|
|
58
|
+
if (options.sessionId !== void 0) opts.sessionId = options.sessionId;
|
|
59
|
+
const result = await executePlaybook(opts);
|
|
60
|
+
const finalizeOptions = {
|
|
61
|
+
cwd: projectRoot,
|
|
62
|
+
runId: result.runId,
|
|
63
|
+
finalContext: result.finalContext
|
|
64
|
+
};
|
|
65
|
+
if (result.errorContext !== void 0) finalizeOptions.error = result.errorContext;
|
|
66
|
+
await finalizeIvtrFromPlaybook(taskId, result.terminalStatus, finalizeOptions);
|
|
67
|
+
const runResult = {
|
|
68
|
+
taskId,
|
|
69
|
+
runId: result.runId,
|
|
70
|
+
terminalStatus: result.terminalStatus
|
|
71
|
+
};
|
|
72
|
+
return runResult;
|
|
73
|
+
};
|
|
74
|
+
var buildGoDispatcher = async (projectRoot) => {
|
|
75
|
+
const { orchestrateSpawnExecute } = await import("@cleocode/runtime/gateway");
|
|
76
|
+
const {
|
|
77
|
+
createToolGuard,
|
|
78
|
+
runSkillNodeOrSpawn,
|
|
79
|
+
maybeCreatePiRunner,
|
|
80
|
+
resolveCantbookNodeProfile,
|
|
81
|
+
hasCantbookProfilePin
|
|
82
|
+
} = await import("@cleocode/core/internal");
|
|
83
|
+
const tools = createToolGuard({ allowedRoots: [projectRoot] });
|
|
84
|
+
const runner = await maybeCreatePiRunner({ system: "task-executor", projectRoot });
|
|
85
|
+
const resolveStageProfile = async (input) => {
|
|
86
|
+
if (!hasCantbookProfilePin({
|
|
87
|
+
profile: input.profile,
|
|
88
|
+
model: input.model,
|
|
89
|
+
provider: input.provider
|
|
90
|
+
})) {
|
|
91
|
+
return void 0;
|
|
92
|
+
}
|
|
93
|
+
const resolved = await resolveCantbookNodeProfile({
|
|
94
|
+
playbookName: input.playbookName ?? "cantbook",
|
|
95
|
+
nodeId: input.nodeId,
|
|
96
|
+
pin: { profile: input.profile, model: input.model, provider: input.provider },
|
|
97
|
+
projectRoot
|
|
98
|
+
});
|
|
99
|
+
return {
|
|
100
|
+
[`${input.nodeId}_llm`]: {
|
|
101
|
+
provider: resolved.provider,
|
|
102
|
+
model: resolved.model,
|
|
103
|
+
source: resolved.source,
|
|
104
|
+
profile: input.profile ?? null
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
const spawn = async (input) => {
|
|
109
|
+
const result = await orchestrateSpawnExecute(
|
|
110
|
+
input.taskId,
|
|
111
|
+
/* adapterId */
|
|
112
|
+
void 0,
|
|
113
|
+
/* protocolType */
|
|
114
|
+
void 0,
|
|
115
|
+
projectRoot,
|
|
116
|
+
/* tier */
|
|
117
|
+
void 0
|
|
118
|
+
);
|
|
119
|
+
if (result.success) {
|
|
120
|
+
return {
|
|
121
|
+
status: "success",
|
|
122
|
+
output: {
|
|
123
|
+
[`${input.nodeId}_spawn`]: true,
|
|
124
|
+
nodeId: input.nodeId,
|
|
125
|
+
agentId: input.agentId,
|
|
126
|
+
dispatchData: result.data ?? null
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
return {
|
|
131
|
+
status: "failure",
|
|
132
|
+
output: {},
|
|
133
|
+
error: result.error?.message ?? `spawn failed for ${input.agentId}`
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
return {
|
|
137
|
+
async dispatch(input) {
|
|
138
|
+
try {
|
|
139
|
+
const llmHint = await resolveStageProfile(input);
|
|
140
|
+
const result = await runSkillNodeOrSpawn(
|
|
141
|
+
{ nodeId: input.nodeId, agentId: input.agentId, context: input.context },
|
|
142
|
+
{
|
|
143
|
+
tools,
|
|
144
|
+
cwd: projectRoot,
|
|
145
|
+
subprocessSpawn: () => spawn(input),
|
|
146
|
+
...runner !== void 0 ? { runner } : {}
|
|
147
|
+
}
|
|
148
|
+
);
|
|
149
|
+
if (llmHint !== void 0 && result.status === "success") {
|
|
150
|
+
return { ...result, output: { ...result.output, ...llmHint } };
|
|
151
|
+
}
|
|
152
|
+
return result;
|
|
153
|
+
} catch (err) {
|
|
154
|
+
return {
|
|
155
|
+
status: "failure",
|
|
156
|
+
output: {},
|
|
157
|
+
error: err instanceof Error ? err.message : String(err)
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
// packages/cleo/src/cli/commands/go.ts
|
|
165
|
+
var goCommand = defineCommand({
|
|
166
|
+
meta: {
|
|
167
|
+
name: "go",
|
|
168
|
+
description: "SG-AUTOPILOT: run one turn of briefing\u2192sagaNext\u2192ready\u2192stage-branch\u2192ivtr loop"
|
|
169
|
+
},
|
|
170
|
+
args: {
|
|
171
|
+
saga: {
|
|
172
|
+
type: "string",
|
|
173
|
+
description: "Optional saga task ID to scope the autopilot run (default: auto-select)",
|
|
174
|
+
required: false
|
|
175
|
+
},
|
|
176
|
+
headless: {
|
|
177
|
+
type: "boolean",
|
|
178
|
+
description: "Suppress interactive annotations; suitable for daemon / unattended use",
|
|
179
|
+
required: false
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
async run({ args }) {
|
|
183
|
+
const projectRoot = getProjectRoot();
|
|
184
|
+
const { getCurrentSessionId, resolveBoundSessionId } = await import("@cleocode/core/internal");
|
|
185
|
+
let sessionId = getCurrentSessionId(projectRoot) ?? void 0;
|
|
186
|
+
if (sessionId === void 0) {
|
|
187
|
+
try {
|
|
188
|
+
sessionId = await resolveBoundSessionId(projectRoot) ?? void 0;
|
|
189
|
+
} catch {
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
const params = {
|
|
193
|
+
headless: args.headless === true,
|
|
194
|
+
projectRoot,
|
|
195
|
+
ivtrRunner: buildGoIvtrRunner()
|
|
196
|
+
};
|
|
197
|
+
if (typeof args.saga === "string" && args.saga.length > 0) params.sagaId = args.saga;
|
|
198
|
+
if (sessionId !== void 0) params.sessionId = sessionId;
|
|
199
|
+
const result = await go.cleoGo(params);
|
|
200
|
+
cliOutput(result.success ? result.data : result, { command: "go", operation: "go.run" });
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
export {
|
|
204
|
+
goCommand
|
|
205
|
+
};
|
|
206
|
+
//# sourceMappingURL=go-PRQFK5YG.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 "./chunk-C3B7C43W.js";
|
|
17
|
+
import {
|
|
18
|
+
defineCommand,
|
|
19
|
+
showUsage
|
|
20
|
+
} from "./chunk-PKKZPOOP.js";
|
|
21
|
+
import {
|
|
22
|
+
cliError,
|
|
23
|
+
cliOutput
|
|
24
|
+
} from "./chunk-3ZO3M37V.js";
|
|
25
|
+
import "./chunk-6JSJNYH2.js";
|
|
26
|
+
|
|
27
|
+
// packages/cleo/src/cli/commands/goal.ts
|
|
28
|
+
import { ExitCode, isValidGoalTargetTaskId } from "@cleocode/contracts";
|
|
29
|
+
import { getProjectRoot, goal } from "@cleocode/core";
|
|
30
|
+
var DEFAULT_TURN_BUDGET = 10;
|
|
31
|
+
function resolveGoalKind(task) {
|
|
32
|
+
if (typeof task === "string" && task.length > 0) {
|
|
33
|
+
if (!isValidGoalTargetTaskId(task)) {
|
|
34
|
+
return { error: `--task must be a valid task id (T + 1-7 digits) \u2014 got '${task}'` };
|
|
35
|
+
}
|
|
36
|
+
return { kind: { kind: "task-completion", targetTaskId: task } };
|
|
37
|
+
}
|
|
38
|
+
return { kind: { kind: "fuzzy" } };
|
|
39
|
+
}
|
|
40
|
+
function resolveTurnBudget(turns) {
|
|
41
|
+
const n = typeof turns === "string" ? Number.parseInt(turns, 10) : Number(turns);
|
|
42
|
+
return Number.isInteger(n) && n > 0 ? n : DEFAULT_TURN_BUDGET;
|
|
43
|
+
}
|
|
44
|
+
var setCommand = defineCommand({
|
|
45
|
+
meta: {
|
|
46
|
+
name: "set",
|
|
47
|
+
description: "Set the current agent's goal (evidence-judged when --task given)."
|
|
48
|
+
},
|
|
49
|
+
args: {
|
|
50
|
+
intent: { type: "positional", description: "What the agent is trying to achieve" },
|
|
51
|
+
task: { type: "string", description: "Target task id (T###) \u2014 makes it evidence-judged" },
|
|
52
|
+
turns: { type: "string", description: "Turn budget (default 10)" }
|
|
53
|
+
},
|
|
54
|
+
async run({ args }) {
|
|
55
|
+
const intent = String(args.intent ?? "").trim();
|
|
56
|
+
if (intent.length === 0) {
|
|
57
|
+
cliError("goal set requires an <intent>", ExitCode.VALIDATION_ERROR, {
|
|
58
|
+
name: "E_VALIDATION"
|
|
59
|
+
});
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
const kindResult = resolveGoalKind(args.task);
|
|
63
|
+
if ("error" in kindResult) {
|
|
64
|
+
cliError(kindResult.error, ExitCode.VALIDATION_ERROR, { name: "E_VALIDATION" });
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const record = await goal.createGoal(
|
|
68
|
+
{ goalKind: kindResult.kind, intent, turnBudget: resolveTurnBudget(args.turns) },
|
|
69
|
+
getProjectRoot()
|
|
70
|
+
);
|
|
71
|
+
cliOutput(record, { command: "goal set", operation: "goal.set" });
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
var statusCommand = defineCommand({
|
|
75
|
+
meta: {
|
|
76
|
+
name: "status",
|
|
77
|
+
description: "Show the current agent's active goal (per-agent scoped)."
|
|
78
|
+
},
|
|
79
|
+
async run() {
|
|
80
|
+
const record = await goal.getActiveGoal(getProjectRoot());
|
|
81
|
+
cliOutput(record ?? { active: null }, { command: "goal status", operation: "goal.status" });
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
var subgoalCommand = defineCommand({
|
|
85
|
+
meta: {
|
|
86
|
+
name: "subgoal",
|
|
87
|
+
description: "Create a sub-goal linked to the active goal via parentGoalId."
|
|
88
|
+
},
|
|
89
|
+
args: {
|
|
90
|
+
intent: { type: "positional", description: "The sub-goal intent" },
|
|
91
|
+
task: { type: "string", description: "Target task id (T###) \u2014 makes it evidence-judged" },
|
|
92
|
+
turns: { type: "string", description: "Turn budget (default 10)" }
|
|
93
|
+
},
|
|
94
|
+
async run({ args }) {
|
|
95
|
+
const intent = String(args.intent ?? "").trim();
|
|
96
|
+
if (intent.length === 0) {
|
|
97
|
+
cliError("goal subgoal requires an <intent>", ExitCode.VALIDATION_ERROR, {
|
|
98
|
+
name: "E_VALIDATION"
|
|
99
|
+
});
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
const cwd = getProjectRoot();
|
|
103
|
+
const parent = await goal.getActiveGoal(cwd);
|
|
104
|
+
if (!parent) {
|
|
105
|
+
cliError(
|
|
106
|
+
"No active goal to attach a sub-goal to. Run `cleo goal set` first.",
|
|
107
|
+
ExitCode.NOT_FOUND,
|
|
108
|
+
{
|
|
109
|
+
name: "E_NOT_FOUND"
|
|
110
|
+
}
|
|
111
|
+
);
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
const kindResult = resolveGoalKind(args.task);
|
|
115
|
+
if ("error" in kindResult) {
|
|
116
|
+
cliError(kindResult.error, ExitCode.VALIDATION_ERROR, { name: "E_VALIDATION" });
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
const record = await goal.createGoal(
|
|
120
|
+
{
|
|
121
|
+
goalKind: kindResult.kind,
|
|
122
|
+
intent,
|
|
123
|
+
turnBudget: resolveTurnBudget(args.turns),
|
|
124
|
+
parentGoalId: parent.id
|
|
125
|
+
},
|
|
126
|
+
cwd
|
|
127
|
+
);
|
|
128
|
+
cliOutput(record, { command: "goal subgoal", operation: "goal.subgoal" });
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
var advanceCommand = defineCommand({
|
|
132
|
+
meta: {
|
|
133
|
+
name: "advance",
|
|
134
|
+
description: "Advance a goal one turn (load \u2192 judge \u2192 persist \u2192 continuation). Entry point for the Stop-hook loop."
|
|
135
|
+
},
|
|
136
|
+
args: {
|
|
137
|
+
goalId: {
|
|
138
|
+
type: "positional",
|
|
139
|
+
description: "The goal id (idempotency key) to advance"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
async run({ args }) {
|
|
143
|
+
const goalId = String(args.goalId ?? "").trim();
|
|
144
|
+
if (goalId.length === 0) {
|
|
145
|
+
cliError("goal advance requires a <goalId>", ExitCode.VALIDATION_ERROR, {
|
|
146
|
+
name: "E_VALIDATION"
|
|
147
|
+
});
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
const cwd = getProjectRoot();
|
|
151
|
+
const result = await goal.advanceGoalWithPersist(goalId, { cwd });
|
|
152
|
+
if (!result) {
|
|
153
|
+
cliError(`Goal '${goalId}' not found.`, ExitCode.NOT_FOUND, { name: "E_NOT_FOUND" });
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
cliOutput(result, { command: "goal advance", operation: "goal.advance" });
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
var appendCommand = defineCommand({
|
|
160
|
+
meta: {
|
|
161
|
+
name: "append",
|
|
162
|
+
description: "Append an acceptance criterion to the active goal."
|
|
163
|
+
},
|
|
164
|
+
args: {
|
|
165
|
+
criterion: { type: "positional", description: "The criterion text to append" }
|
|
166
|
+
},
|
|
167
|
+
async run({ args }) {
|
|
168
|
+
const criterion = String(args.criterion ?? "").trim();
|
|
169
|
+
if (criterion.length === 0) {
|
|
170
|
+
cliError("goal append requires a <criterion>", ExitCode.VALIDATION_ERROR, {
|
|
171
|
+
name: "E_VALIDATION"
|
|
172
|
+
});
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
const cwd = getProjectRoot();
|
|
176
|
+
const active = await goal.getActiveGoal(cwd);
|
|
177
|
+
if (!active) {
|
|
178
|
+
cliError(
|
|
179
|
+
"No active goal to append a criterion to. Run `cleo goal set` first.",
|
|
180
|
+
ExitCode.NOT_FOUND,
|
|
181
|
+
{
|
|
182
|
+
name: "E_NOT_FOUND"
|
|
183
|
+
}
|
|
184
|
+
);
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
const record = await goal.appendCriteria(active.id, criterion, cwd);
|
|
188
|
+
cliOutput(record ?? { active: null }, { command: "goal append", operation: "goal.append" });
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
var goalCommand = defineCommand({
|
|
192
|
+
meta: {
|
|
193
|
+
name: "goal",
|
|
194
|
+
description: "DB-persisted, per-agent, evidence-gate-aware goal loop (set/status/advance/subgoal/append)."
|
|
195
|
+
},
|
|
196
|
+
subCommands: {
|
|
197
|
+
set: setCommand,
|
|
198
|
+
status: statusCommand,
|
|
199
|
+
advance: advanceCommand,
|
|
200
|
+
subgoal: subgoalCommand,
|
|
201
|
+
append: appendCommand
|
|
202
|
+
},
|
|
203
|
+
async run({ cmd, rawArgs }) {
|
|
204
|
+
const firstArg = rawArgs?.find((a) => !a.startsWith("-"));
|
|
205
|
+
if (firstArg && cmd.subCommands && firstArg in cmd.subCommands) return;
|
|
206
|
+
await showUsage(cmd);
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
export {
|
|
210
|
+
goalCommand
|
|
211
|
+
};
|
|
212
|
+
//# sourceMappingURL=goal-7CZRMLHC.js.map
|