@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,707 @@
|
|
|
1
|
+
(() => {
|
|
2
|
+
const _installed = Symbol.for('cleocode.cli.sqliteWarningFilter');
|
|
3
|
+
if (globalThis[_installed]) return;
|
|
4
|
+
globalThis[_installed] = true;
|
|
5
|
+
const _origEmitWarning = process.emitWarning;
|
|
6
|
+
process.emitWarning = function(warning, type, code, ctor) {
|
|
7
|
+
if (typeof warning === 'object' && warning.name === 'ExperimentalWarning' && typeof warning.message === 'string' && /SQLite is an experimental feature/i.test(warning.message)) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
if (typeof warning === 'string' && /SQLite is an experimental feature/i.test(warning)) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
return _origEmitWarning.call(process, warning, type, code, ctor);
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
import {
|
|
17
|
+
defineCommand,
|
|
18
|
+
showUsage
|
|
19
|
+
} from "./chunk-PKKZPOOP.js";
|
|
20
|
+
import {
|
|
21
|
+
dispatchFromCli,
|
|
22
|
+
dispatchRaw,
|
|
23
|
+
handleRawError
|
|
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
|
+
humanWarn
|
|
32
|
+
} from "./chunk-3ZO3M37V.js";
|
|
33
|
+
import "./chunk-6JSJNYH2.js";
|
|
34
|
+
import "./chunk-QFFQSKRC.js";
|
|
35
|
+
|
|
36
|
+
// packages/cleo/src/cli/commands/session.ts
|
|
37
|
+
import { ExitCode } from "@cleocode/contracts";
|
|
38
|
+
var startCommand = defineCommand({
|
|
39
|
+
meta: { name: "start", description: "Start a new session" },
|
|
40
|
+
args: {
|
|
41
|
+
scope: {
|
|
42
|
+
type: "string",
|
|
43
|
+
description: "Session scope (epic:T### or global)",
|
|
44
|
+
required: true
|
|
45
|
+
},
|
|
46
|
+
name: {
|
|
47
|
+
type: "string",
|
|
48
|
+
description: "Session name",
|
|
49
|
+
required: true
|
|
50
|
+
},
|
|
51
|
+
"auto-start": {
|
|
52
|
+
type: "boolean",
|
|
53
|
+
description: "Auto-start on first available task"
|
|
54
|
+
},
|
|
55
|
+
"auto-focus": {
|
|
56
|
+
type: "boolean",
|
|
57
|
+
description: "Auto-focus on first available task (alias for --auto-start)"
|
|
58
|
+
},
|
|
59
|
+
focus: {
|
|
60
|
+
type: "string",
|
|
61
|
+
description: "Set initial task to work on (alias for --start-task)"
|
|
62
|
+
},
|
|
63
|
+
"start-task": {
|
|
64
|
+
type: "string",
|
|
65
|
+
description: "Set initial task to work on"
|
|
66
|
+
},
|
|
67
|
+
agent: {
|
|
68
|
+
type: "string",
|
|
69
|
+
description: "Agent identifier"
|
|
70
|
+
},
|
|
71
|
+
grade: {
|
|
72
|
+
type: "boolean",
|
|
73
|
+
description: "Enable full query+mutation audit logging for behavioral grading"
|
|
74
|
+
},
|
|
75
|
+
"owner-auth": {
|
|
76
|
+
type: "boolean",
|
|
77
|
+
description: "Prompt for a password and store a session HMAC token for owner-override authentication (T1118 L4a)"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
async run({ args }) {
|
|
81
|
+
let ownerAuthToken;
|
|
82
|
+
if (args["owner-auth"]) {
|
|
83
|
+
ownerAuthToken = await promptOwnerAuthPassword(args.name ?? "session");
|
|
84
|
+
if (!ownerAuthToken) {
|
|
85
|
+
cliError(
|
|
86
|
+
"--owner-auth: password prompt cancelled.",
|
|
87
|
+
ExitCode.GENERAL_ERROR,
|
|
88
|
+
{ name: "E_PROMPT_CANCELLED" },
|
|
89
|
+
{ operation: "session.start" }
|
|
90
|
+
);
|
|
91
|
+
process.exit(ExitCode.GENERAL_ERROR);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
await dispatchFromCli(
|
|
95
|
+
"mutate",
|
|
96
|
+
"session",
|
|
97
|
+
"start",
|
|
98
|
+
{
|
|
99
|
+
scope: args.scope,
|
|
100
|
+
name: args.name,
|
|
101
|
+
autoStart: args["auto-start"] || args["auto-focus"],
|
|
102
|
+
// CLI-level alias normalization: --focus and --start-task both map to startTask (ADR-057 D2)
|
|
103
|
+
startTask: args["start-task"] ?? args.focus,
|
|
104
|
+
grade: args.grade,
|
|
105
|
+
ownerAuthToken,
|
|
106
|
+
// T9975: per-agent handle for multi-agent isolation
|
|
107
|
+
agentHandle: args.agent
|
|
108
|
+
},
|
|
109
|
+
{ command: "session", operation: "session.start" }
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
async function promptOwnerAuthPassword(sessionName) {
|
|
114
|
+
if (!process.stdin.isTTY || !process.stderr.isTTY) {
|
|
115
|
+
cliError(
|
|
116
|
+
"--owner-auth requires an interactive TTY. stdin.isTTY or stderr.isTTY is false.",
|
|
117
|
+
ExitCode.GENERAL_ERROR,
|
|
118
|
+
{ name: "E_TTY_REQUIRED" },
|
|
119
|
+
{ operation: "session.start" }
|
|
120
|
+
);
|
|
121
|
+
return null;
|
|
122
|
+
}
|
|
123
|
+
const { createInterface } = await import("node:readline");
|
|
124
|
+
const { deriveOwnerAuthToken } = await import("@cleocode/core/internal");
|
|
125
|
+
const rl = createInterface({
|
|
126
|
+
input: process.stdin,
|
|
127
|
+
output: process.stderr,
|
|
128
|
+
terminal: true
|
|
129
|
+
});
|
|
130
|
+
process.stderr.write(`[cleo] Enter owner-auth password for session "${sessionName}": `);
|
|
131
|
+
const password = await new Promise((resolve) => {
|
|
132
|
+
if (process.stdin.setRawMode) {
|
|
133
|
+
process.stdin.setRawMode(
|
|
134
|
+
true
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
let pw = "";
|
|
138
|
+
process.stdin.on("data", function onData(char) {
|
|
139
|
+
const ch = char.toString("utf8");
|
|
140
|
+
if (ch === "\n" || ch === "\r") {
|
|
141
|
+
process.stdin.removeListener("data", onData);
|
|
142
|
+
process.stdin.pause();
|
|
143
|
+
if (process.stdin.setRawMode) {
|
|
144
|
+
process.stdin.setRawMode(
|
|
145
|
+
false
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
process.stderr.write("\n");
|
|
149
|
+
resolve(pw);
|
|
150
|
+
} else if (ch === "") {
|
|
151
|
+
process.stderr.write("\n[cleo] Cancelled.\n");
|
|
152
|
+
resolve("");
|
|
153
|
+
} else if (ch === "\x7F" || ch === "\b") {
|
|
154
|
+
pw = pw.slice(0, -1);
|
|
155
|
+
} else {
|
|
156
|
+
pw += ch;
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
process.stdin.resume();
|
|
160
|
+
});
|
|
161
|
+
rl.close();
|
|
162
|
+
if (!password) return null;
|
|
163
|
+
const token = deriveOwnerAuthToken(sessionName, password);
|
|
164
|
+
return token;
|
|
165
|
+
}
|
|
166
|
+
var endCommand = defineCommand({
|
|
167
|
+
meta: { name: "end", description: "End the current session" },
|
|
168
|
+
args: {
|
|
169
|
+
session: {
|
|
170
|
+
type: "string",
|
|
171
|
+
description: "Specific session ID to stop"
|
|
172
|
+
},
|
|
173
|
+
note: {
|
|
174
|
+
type: "string",
|
|
175
|
+
description: "Stop note"
|
|
176
|
+
},
|
|
177
|
+
"next-action": {
|
|
178
|
+
type: "string",
|
|
179
|
+
description: "Suggested next action"
|
|
180
|
+
},
|
|
181
|
+
"emit-markdown": {
|
|
182
|
+
type: "string",
|
|
183
|
+
description: "Optional path to write a derived markdown VIEW of the handoff (one-way; never read back by CLEO). Source of truth remains tasks.db + brain.db. Use `cleo briefing` to resume context. (T1593)"
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
async run({ args }) {
|
|
187
|
+
const emitMarkdownPath = args["emit-markdown"];
|
|
188
|
+
if (emitMarkdownPath) {
|
|
189
|
+
const response = await dispatchRaw("mutate", "session", "end", {
|
|
190
|
+
note: args.note,
|
|
191
|
+
nextAction: args["next-action"],
|
|
192
|
+
// T12500: an unbound terminal names its target explicitly.
|
|
193
|
+
...args.session ? { sessionId: args.session } : {}
|
|
194
|
+
});
|
|
195
|
+
if (!response.success) {
|
|
196
|
+
handleRawError(response, { command: "session end", operation: "session.end" });
|
|
197
|
+
}
|
|
198
|
+
try {
|
|
199
|
+
const handoffResp = await dispatchRaw("query", "session", "handoff.show", {});
|
|
200
|
+
const handoffData = handoffResp.success ? handoffResp.data : null;
|
|
201
|
+
if (handoffData?.handoff) {
|
|
202
|
+
const { emitHandoffMarkdown } = await import("@cleocode/core/internal");
|
|
203
|
+
await emitHandoffMarkdown(
|
|
204
|
+
emitMarkdownPath,
|
|
205
|
+
handoffData.handoff,
|
|
206
|
+
{ sessionId: handoffData.sessionId }
|
|
207
|
+
);
|
|
208
|
+
}
|
|
209
|
+
} catch (err) {
|
|
210
|
+
humanWarn(`[cleo] session end --emit-markdown failed: ${err.message}`);
|
|
211
|
+
}
|
|
212
|
+
cliOutput(response.data ?? {}, { command: "session", operation: "session.end" });
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
await dispatchFromCli(
|
|
216
|
+
"mutate",
|
|
217
|
+
"session",
|
|
218
|
+
"end",
|
|
219
|
+
{
|
|
220
|
+
note: args.note,
|
|
221
|
+
nextAction: args["next-action"],
|
|
222
|
+
// T12500: an unbound terminal names its target explicitly.
|
|
223
|
+
...args.session ? { sessionId: args.session } : {}
|
|
224
|
+
},
|
|
225
|
+
{ command: "session", operation: "session.end" }
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
var handoffCommand = defineCommand({
|
|
230
|
+
meta: { name: "handoff", description: "Show handoff data from the most recent ended session" },
|
|
231
|
+
args: {
|
|
232
|
+
scope: {
|
|
233
|
+
type: "string",
|
|
234
|
+
description: "Filter by scope (epic:T### or global)"
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
async run({ args }) {
|
|
238
|
+
const scope = args.scope;
|
|
239
|
+
const response = await dispatchRaw("query", "session", "handoff.show", {
|
|
240
|
+
scope
|
|
241
|
+
});
|
|
242
|
+
if (!response.success) {
|
|
243
|
+
handleRawError(response, { command: "session handoff", operation: "session.handoff.show" });
|
|
244
|
+
}
|
|
245
|
+
const data = response.data;
|
|
246
|
+
if (!data?.handoff) {
|
|
247
|
+
cliOutput(
|
|
248
|
+
{ handoff: null },
|
|
249
|
+
{
|
|
250
|
+
command: "session handoff",
|
|
251
|
+
message: "No handoff data available",
|
|
252
|
+
operation: "session.handoff.show"
|
|
253
|
+
}
|
|
254
|
+
);
|
|
255
|
+
process.exit(ExitCode.NO_DATA);
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
const { sessionId, handoff } = data;
|
|
259
|
+
const formattedHandoff = {
|
|
260
|
+
sessionId,
|
|
261
|
+
lastTask: handoff.lastTask ?? "None",
|
|
262
|
+
tasksCompleted: handoff.tasksCompleted ?? [],
|
|
263
|
+
tasksCreated: handoff.tasksCreated ?? [],
|
|
264
|
+
decisionsRecorded: handoff.decisionsRecorded ?? 0,
|
|
265
|
+
nextSuggested: handoff.nextSuggested ?? [],
|
|
266
|
+
openBlockers: handoff.openBlockers ?? [],
|
|
267
|
+
openBugs: handoff.openBugs ?? [],
|
|
268
|
+
// GH #1277 — mirrors computeHandoff: `null` is a recorded answer, an
|
|
269
|
+
// absent key is not. Kept in step with packages/core/src/sessions/handoff.ts.
|
|
270
|
+
note: handoff.note ?? null,
|
|
271
|
+
noteChars: handoff.noteChars ?? (typeof handoff.note === "string" ? handoff.note.length : 0),
|
|
272
|
+
nextAction: handoff.nextAction ?? null,
|
|
273
|
+
nextActionChars: handoff.nextActionChars ?? (typeof handoff.nextAction === "string" ? handoff.nextAction.length : 0)
|
|
274
|
+
};
|
|
275
|
+
cliOutput(
|
|
276
|
+
{ handoff: formattedHandoff },
|
|
277
|
+
{ command: "session handoff", operation: "session.handoff.show" }
|
|
278
|
+
);
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
var statusCommand = defineCommand({
|
|
282
|
+
meta: { name: "status", description: "Show current session status" },
|
|
283
|
+
async run() {
|
|
284
|
+
const response = await dispatchRaw("query", "session", "status");
|
|
285
|
+
if (!response.success) {
|
|
286
|
+
handleRawError(response, { command: "session", operation: "session.status" });
|
|
287
|
+
}
|
|
288
|
+
const data = response.data;
|
|
289
|
+
if (!data || data["session"] === null || data["session"] === void 0 && !data["id"]) {
|
|
290
|
+
cliOutput(
|
|
291
|
+
{ session: null },
|
|
292
|
+
{ command: "session", message: "No active session", operation: "session.status" }
|
|
293
|
+
);
|
|
294
|
+
process.exit(ExitCode.NO_DATA);
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
cliOutput({ session: data }, { command: "session", operation: "session.status" });
|
|
298
|
+
}
|
|
299
|
+
});
|
|
300
|
+
var resumeCommand = defineCommand({
|
|
301
|
+
meta: { name: "resume", description: "Resume an existing session" },
|
|
302
|
+
args: {
|
|
303
|
+
sessionId: {
|
|
304
|
+
type: "positional",
|
|
305
|
+
description: "Session ID to resume",
|
|
306
|
+
required: true
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
async run({ args }) {
|
|
310
|
+
await dispatchFromCli(
|
|
311
|
+
"mutate",
|
|
312
|
+
"session",
|
|
313
|
+
"resume",
|
|
314
|
+
{
|
|
315
|
+
sessionId: args.sessionId
|
|
316
|
+
},
|
|
317
|
+
{ command: "session", operation: "session.resume" }
|
|
318
|
+
);
|
|
319
|
+
}
|
|
320
|
+
});
|
|
321
|
+
var findCommand = defineCommand({
|
|
322
|
+
meta: {
|
|
323
|
+
name: "find",
|
|
324
|
+
description: "Find sessions (lightweight discovery \u2014 minimal fields, low context cost)"
|
|
325
|
+
},
|
|
326
|
+
args: {
|
|
327
|
+
status: {
|
|
328
|
+
type: "string",
|
|
329
|
+
description: "Filter by status (active|ended|orphaned)"
|
|
330
|
+
},
|
|
331
|
+
scope: {
|
|
332
|
+
type: "string",
|
|
333
|
+
description: 'Filter by scope (e.g. "epic:T001" or "global")'
|
|
334
|
+
},
|
|
335
|
+
query: {
|
|
336
|
+
type: "string",
|
|
337
|
+
description: "Fuzzy match on session name or ID"
|
|
338
|
+
},
|
|
339
|
+
limit: {
|
|
340
|
+
type: "string",
|
|
341
|
+
description: "Max results"
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
async run({ args }) {
|
|
345
|
+
await dispatchFromCli(
|
|
346
|
+
"query",
|
|
347
|
+
"session",
|
|
348
|
+
"find",
|
|
349
|
+
{
|
|
350
|
+
status: args.status,
|
|
351
|
+
scope: args.scope,
|
|
352
|
+
query: args.query,
|
|
353
|
+
limit: args.limit ? Number.parseInt(args.limit, 10) : void 0
|
|
354
|
+
},
|
|
355
|
+
{ command: "session", operation: "session.find" }
|
|
356
|
+
);
|
|
357
|
+
}
|
|
358
|
+
});
|
|
359
|
+
var listCommand = defineCommand({
|
|
360
|
+
meta: { name: "list", description: "List sessions" },
|
|
361
|
+
args: {
|
|
362
|
+
status: {
|
|
363
|
+
type: "string",
|
|
364
|
+
description: "Filter by status (active|ended|orphaned)"
|
|
365
|
+
},
|
|
366
|
+
limit: {
|
|
367
|
+
type: "string",
|
|
368
|
+
description: "Max results"
|
|
369
|
+
},
|
|
370
|
+
offset: {
|
|
371
|
+
type: "string",
|
|
372
|
+
description: "Skip first n results"
|
|
373
|
+
},
|
|
374
|
+
/**
|
|
375
|
+
* T9975: surface all per-agent columns (agent, scope, lastActivity).
|
|
376
|
+
* When set, the result includes agentHandle, scopeKind, scopeId, and
|
|
377
|
+
* lastActivity for each session — useful for multi-agent dashboards.
|
|
378
|
+
*/
|
|
379
|
+
all: {
|
|
380
|
+
type: "boolean",
|
|
381
|
+
description: "Show all columns including per-agent fields (agent, scope, lastActivity) \u2014 T9975"
|
|
382
|
+
}
|
|
383
|
+
},
|
|
384
|
+
async run({ args }) {
|
|
385
|
+
await dispatchFromCli(
|
|
386
|
+
"query",
|
|
387
|
+
"session",
|
|
388
|
+
"list",
|
|
389
|
+
{
|
|
390
|
+
status: args.status,
|
|
391
|
+
limit: args.limit ? Number.parseInt(args.limit, 10) : void 0,
|
|
392
|
+
offset: args.offset ? Number.parseInt(args.offset, 10) : void 0,
|
|
393
|
+
all: args.all
|
|
394
|
+
},
|
|
395
|
+
{ command: "session", operation: "session.list" }
|
|
396
|
+
);
|
|
397
|
+
}
|
|
398
|
+
});
|
|
399
|
+
var gcCommand = defineCommand({
|
|
400
|
+
meta: { name: "gc", description: "Garbage collect old sessions" },
|
|
401
|
+
args: {
|
|
402
|
+
"max-age": {
|
|
403
|
+
type: "string",
|
|
404
|
+
description: "Max age in days for active sessions"
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
async run({ args }) {
|
|
408
|
+
await dispatchFromCli(
|
|
409
|
+
"mutate",
|
|
410
|
+
"session",
|
|
411
|
+
"gc",
|
|
412
|
+
{
|
|
413
|
+
maxAgeDays: args["max-age"] ? Number.parseInt(args["max-age"], 10) : void 0
|
|
414
|
+
},
|
|
415
|
+
{ command: "session", operation: "session.gc" }
|
|
416
|
+
);
|
|
417
|
+
}
|
|
418
|
+
});
|
|
419
|
+
var showCommand = defineCommand({
|
|
420
|
+
meta: {
|
|
421
|
+
name: "show",
|
|
422
|
+
description: "Show full details for a session (absorbs debrief.show via --include debrief)"
|
|
423
|
+
},
|
|
424
|
+
args: {
|
|
425
|
+
sessionId: {
|
|
426
|
+
type: "positional",
|
|
427
|
+
description: "Session ID to show",
|
|
428
|
+
required: true
|
|
429
|
+
},
|
|
430
|
+
include: {
|
|
431
|
+
type: "string",
|
|
432
|
+
description: "Include extra data (debrief)"
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
async run({ args }) {
|
|
436
|
+
await dispatchFromCli(
|
|
437
|
+
"query",
|
|
438
|
+
"session",
|
|
439
|
+
"show",
|
|
440
|
+
{
|
|
441
|
+
sessionId: args.sessionId,
|
|
442
|
+
include: args.include
|
|
443
|
+
},
|
|
444
|
+
{ command: "session", operation: "session.show" }
|
|
445
|
+
);
|
|
446
|
+
}
|
|
447
|
+
});
|
|
448
|
+
var driftCommand = defineCommand({
|
|
449
|
+
meta: {
|
|
450
|
+
name: "drift",
|
|
451
|
+
description: "Detect file-scope drift for the active session (project-agnostic)"
|
|
452
|
+
},
|
|
453
|
+
args: {
|
|
454
|
+
"audit-scope": { type: "string", description: "Audit log scope (global|local)" }
|
|
455
|
+
},
|
|
456
|
+
async run({ args }) {
|
|
457
|
+
const { detectSessionDrift, getProjectRoot } = await import("@cleocode/core");
|
|
458
|
+
const projectRoot = await getProjectRoot();
|
|
459
|
+
const scope = args["audit-scope"] === "local" ? "local" : "global";
|
|
460
|
+
const report = await detectSessionDrift({ projectRoot, auditScope: scope });
|
|
461
|
+
cliOutput(report, { command: "session drift", operation: "session.drift" });
|
|
462
|
+
}
|
|
463
|
+
});
|
|
464
|
+
var contextDriftCommand = defineCommand({
|
|
465
|
+
meta: {
|
|
466
|
+
name: "context-drift",
|
|
467
|
+
description: "Detect context drift in the current or specified session"
|
|
468
|
+
},
|
|
469
|
+
args: {
|
|
470
|
+
"session-id": {
|
|
471
|
+
type: "string",
|
|
472
|
+
description: "Session ID to check (defaults to active session)"
|
|
473
|
+
}
|
|
474
|
+
},
|
|
475
|
+
async run({ args }) {
|
|
476
|
+
await dispatchFromCli(
|
|
477
|
+
"query",
|
|
478
|
+
"session",
|
|
479
|
+
"context.drift",
|
|
480
|
+
{
|
|
481
|
+
sessionId: args["session-id"]
|
|
482
|
+
},
|
|
483
|
+
{ command: "session", operation: "session.context.drift" }
|
|
484
|
+
);
|
|
485
|
+
}
|
|
486
|
+
});
|
|
487
|
+
var suspendCommand = defineCommand({
|
|
488
|
+
meta: { name: "suspend", description: "Suspend an active session (pause without ending)" },
|
|
489
|
+
args: {
|
|
490
|
+
sessionId: {
|
|
491
|
+
type: "positional",
|
|
492
|
+
description: "Session ID to suspend",
|
|
493
|
+
required: true
|
|
494
|
+
},
|
|
495
|
+
reason: {
|
|
496
|
+
type: "string",
|
|
497
|
+
description: "Reason for suspension"
|
|
498
|
+
}
|
|
499
|
+
},
|
|
500
|
+
async run({ args }) {
|
|
501
|
+
await dispatchFromCli(
|
|
502
|
+
"mutate",
|
|
503
|
+
"session",
|
|
504
|
+
"suspend",
|
|
505
|
+
{
|
|
506
|
+
sessionId: args.sessionId,
|
|
507
|
+
reason: args.reason
|
|
508
|
+
},
|
|
509
|
+
{ command: "session", operation: "session.suspend" }
|
|
510
|
+
);
|
|
511
|
+
}
|
|
512
|
+
});
|
|
513
|
+
var recordAssumptionCommand = defineCommand({
|
|
514
|
+
meta: {
|
|
515
|
+
name: "record-assumption",
|
|
516
|
+
description: "Record an assumption made during the current session"
|
|
517
|
+
},
|
|
518
|
+
args: {
|
|
519
|
+
assumption: {
|
|
520
|
+
type: "string",
|
|
521
|
+
description: "Assumption text",
|
|
522
|
+
required: true
|
|
523
|
+
},
|
|
524
|
+
confidence: {
|
|
525
|
+
type: "string",
|
|
526
|
+
description: "Confidence level (high|medium|low)",
|
|
527
|
+
required: true
|
|
528
|
+
},
|
|
529
|
+
"session-id": {
|
|
530
|
+
type: "string",
|
|
531
|
+
description: "Session ID (defaults to active session)"
|
|
532
|
+
},
|
|
533
|
+
"task-id": {
|
|
534
|
+
type: "string",
|
|
535
|
+
description: "Task ID the assumption relates to"
|
|
536
|
+
}
|
|
537
|
+
},
|
|
538
|
+
async run({ args }) {
|
|
539
|
+
await dispatchFromCli(
|
|
540
|
+
"mutate",
|
|
541
|
+
"session",
|
|
542
|
+
"record.assumption",
|
|
543
|
+
{
|
|
544
|
+
sessionId: args["session-id"],
|
|
545
|
+
taskId: args["task-id"],
|
|
546
|
+
assumption: args.assumption,
|
|
547
|
+
confidence: args.confidence
|
|
548
|
+
},
|
|
549
|
+
{ command: "session", operation: "session.record.assumption" }
|
|
550
|
+
);
|
|
551
|
+
}
|
|
552
|
+
});
|
|
553
|
+
var recordDecisionCommand = defineCommand({
|
|
554
|
+
meta: {
|
|
555
|
+
name: "record-decision",
|
|
556
|
+
description: "Record a decision made during the current session"
|
|
557
|
+
},
|
|
558
|
+
args: {
|
|
559
|
+
"session-id": {
|
|
560
|
+
type: "string",
|
|
561
|
+
description: "Session ID (defaults to active session)"
|
|
562
|
+
},
|
|
563
|
+
"task-id": {
|
|
564
|
+
type: "string",
|
|
565
|
+
description: "Task ID the decision relates to",
|
|
566
|
+
required: true
|
|
567
|
+
},
|
|
568
|
+
decision: {
|
|
569
|
+
type: "string",
|
|
570
|
+
description: "Decision text",
|
|
571
|
+
required: true
|
|
572
|
+
},
|
|
573
|
+
rationale: {
|
|
574
|
+
type: "string",
|
|
575
|
+
description: "Rationale for the decision",
|
|
576
|
+
required: true
|
|
577
|
+
},
|
|
578
|
+
alternatives: {
|
|
579
|
+
type: "string",
|
|
580
|
+
description: "Alternatives considered"
|
|
581
|
+
}
|
|
582
|
+
},
|
|
583
|
+
async run({ args }) {
|
|
584
|
+
await dispatchFromCli(
|
|
585
|
+
"mutate",
|
|
586
|
+
"session",
|
|
587
|
+
"record.decision",
|
|
588
|
+
{
|
|
589
|
+
sessionId: args["session-id"],
|
|
590
|
+
taskId: args["task-id"],
|
|
591
|
+
decision: args.decision,
|
|
592
|
+
rationale: args.rationale,
|
|
593
|
+
alternatives: args.alternatives
|
|
594
|
+
},
|
|
595
|
+
{ command: "session", operation: "session.record.decision" }
|
|
596
|
+
);
|
|
597
|
+
}
|
|
598
|
+
});
|
|
599
|
+
var decisionLogCommand = defineCommand({
|
|
600
|
+
meta: { name: "decision-log", description: "Show decisions recorded in a session" },
|
|
601
|
+
args: {
|
|
602
|
+
"session-id": {
|
|
603
|
+
type: "string",
|
|
604
|
+
description: "Session ID to filter by"
|
|
605
|
+
},
|
|
606
|
+
"task-id": {
|
|
607
|
+
type: "string",
|
|
608
|
+
description: "Task ID to filter by"
|
|
609
|
+
}
|
|
610
|
+
},
|
|
611
|
+
async run({ args }) {
|
|
612
|
+
await dispatchFromCli(
|
|
613
|
+
"query",
|
|
614
|
+
"session",
|
|
615
|
+
"decision.log",
|
|
616
|
+
{
|
|
617
|
+
sessionId: args["session-id"],
|
|
618
|
+
taskId: args["task-id"]
|
|
619
|
+
},
|
|
620
|
+
{ command: "session", operation: "session.decision.log" }
|
|
621
|
+
);
|
|
622
|
+
}
|
|
623
|
+
});
|
|
624
|
+
var adoptCommand = defineCommand({
|
|
625
|
+
meta: {
|
|
626
|
+
name: "adopt",
|
|
627
|
+
description: "Rebind env to a specific session \u2014 prints export command to eval (T9975)"
|
|
628
|
+
},
|
|
629
|
+
args: {
|
|
630
|
+
sessionId: {
|
|
631
|
+
type: "positional",
|
|
632
|
+
description: "Session ID to adopt",
|
|
633
|
+
required: true
|
|
634
|
+
}
|
|
635
|
+
},
|
|
636
|
+
async run({ args }) {
|
|
637
|
+
const response = await dispatchRaw("mutate", "session", "adopt", {
|
|
638
|
+
sessionId: args.sessionId
|
|
639
|
+
});
|
|
640
|
+
if (!response.success) {
|
|
641
|
+
handleRawError(response, { command: "session adopt", operation: "session.adopt" });
|
|
642
|
+
return;
|
|
643
|
+
}
|
|
644
|
+
const data = response.data;
|
|
645
|
+
if (data?.exportCommand) {
|
|
646
|
+
process.stdout.write(`${data.exportCommand}
|
|
647
|
+
`);
|
|
648
|
+
} else {
|
|
649
|
+
cliOutput(data ?? {}, { command: "session adopt", operation: "session.adopt" });
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
});
|
|
653
|
+
var lintCommand = defineCommand({
|
|
654
|
+
meta: {
|
|
655
|
+
name: "lint",
|
|
656
|
+
description: "Flag raw-md writes to canonical doc paths in a session transcript (T9797 \xB7 agent-accountability)"
|
|
657
|
+
},
|
|
658
|
+
args: {
|
|
659
|
+
transcript: {
|
|
660
|
+
type: "string",
|
|
661
|
+
description: "Absolute path to the *.jsonl transcript to scan",
|
|
662
|
+
required: true
|
|
663
|
+
}
|
|
664
|
+
},
|
|
665
|
+
async run({ args }) {
|
|
666
|
+
await dispatchFromCli(
|
|
667
|
+
"query",
|
|
668
|
+
"session",
|
|
669
|
+
"lint",
|
|
670
|
+
{ transcript: args.transcript },
|
|
671
|
+
{ command: "session", operation: "session.lint" }
|
|
672
|
+
);
|
|
673
|
+
}
|
|
674
|
+
});
|
|
675
|
+
var sessionCommand = defineCommand({
|
|
676
|
+
meta: { name: "session", description: "Manage work sessions" },
|
|
677
|
+
subCommands: {
|
|
678
|
+
start: startCommand,
|
|
679
|
+
end: endCommand,
|
|
680
|
+
stop: endCommand,
|
|
681
|
+
handoff: handoffCommand,
|
|
682
|
+
status: statusCommand,
|
|
683
|
+
resume: resumeCommand,
|
|
684
|
+
find: findCommand,
|
|
685
|
+
list: listCommand,
|
|
686
|
+
gc: gcCommand,
|
|
687
|
+
show: showCommand,
|
|
688
|
+
"context-drift": contextDriftCommand,
|
|
689
|
+
drift: driftCommand,
|
|
690
|
+
suspend: suspendCommand,
|
|
691
|
+
"record-assumption": recordAssumptionCommand,
|
|
692
|
+
"record-decision": recordDecisionCommand,
|
|
693
|
+
"decision-log": decisionLogCommand,
|
|
694
|
+
lint: lintCommand,
|
|
695
|
+
// T9975 — per-agent session isolation
|
|
696
|
+
adopt: adoptCommand
|
|
697
|
+
},
|
|
698
|
+
async run({ cmd, rawArgs }) {
|
|
699
|
+
const firstArg = rawArgs?.find((a) => !a.startsWith("-"));
|
|
700
|
+
if (firstArg && cmd.subCommands && firstArg in cmd.subCommands) return;
|
|
701
|
+
await showUsage(cmd);
|
|
702
|
+
}
|
|
703
|
+
});
|
|
704
|
+
export {
|
|
705
|
+
sessionCommand
|
|
706
|
+
};
|
|
707
|
+
//# sourceMappingURL=session-3C6AAC4Y.js.map
|