@cleocode/cleo 2026.10.3 → 2026.10.5-rc.ci.672
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/README.md +7 -0
- package/bin/cleo.js +11 -1
- package/dist/cli/adapter-OUQRSFZL.js +159 -0
- package/dist/cli/add-4SRRJL4U.js +443 -0
- package/dist/cli/add-batch-TSWICA5J.js +164 -0
- package/dist/cli/admin-L3F6CDYH.js +1428 -0
- package/dist/cli/admin-YMU55YCU.js +341 -0
- package/dist/cli/adr-XESRMFMP.js +172 -0
- package/dist/cli/agent-TAFPIYUU.js +2404 -0
- package/dist/cli/agent-outputs-HVJJIPS4.js +84 -0
- package/dist/cli/analyze-YQ22QVGW.js +49 -0
- package/dist/cli/archive-W5XX6AH7.js +65 -0
- package/dist/cli/archive-stats-HP2KPAJU.js +101 -0
- package/dist/cli/attention-7JBDCRZX.js +124 -0
- package/dist/cli/attention-ZXZANHKC.js +168 -0
- package/dist/cli/audit-ICA2SEFN.js +122 -0
- package/dist/cli/auth-DXIG5OG7.js +491 -0
- package/dist/cli/backfill-LBSYBWLR.js +156 -0
- package/dist/cli/backup-NUGBZ7NA.js +588 -0
- package/dist/cli/backup-inspect-PDRXI45A.js +26 -0
- package/dist/cli/backup-recover-TVKAPERB.js +29 -0
- package/dist/cli/blockers-ZOPCGHDW.js +55 -0
- package/dist/cli/brain-EJOBKL4A.js +397 -0
- package/dist/cli/briefing-RDQJ6WHS.js +213 -0
- package/dist/cli/caamp-Z3XPKEHB.js +181 -0
- package/dist/cli/cancel-S7EHLCJN.js +85 -0
- package/dist/cli/canon-NPF5RODM.js +142 -0
- package/dist/cli/canon-docs-2GTOLF7Y.js +26 -0
- package/dist/cli/cant-CHNN6O57.js +239 -0
- package/dist/cli/changeset-RYPHPN2B.js +246 -0
- package/dist/cli/check-C67YAU7W.js +759 -0
- package/dist/cli/check-DHMURGHC.js +924 -0
- package/dist/cli/checkpoint-UWDFOGYQ.js +128 -0
- package/dist/cli/chunk-22YPFZYB.js +91 -0
- package/dist/cli/chunk-2MGFDMDF.js +272 -0
- package/dist/cli/chunk-47JYZAMS.js +30 -0
- package/dist/cli/chunk-4JYHPP4C.js +76 -0
- package/dist/cli/chunk-4PEODTHY.js +278 -0
- package/dist/cli/chunk-4RGSNUUP.js +950 -0
- package/dist/cli/chunk-4VASFLUW.js +35 -0
- package/dist/cli/chunk-5PNI276X.js +124 -0
- package/dist/cli/chunk-6JSJNYH2.js +114 -0
- package/dist/cli/chunk-6N6WGLXE.js +63 -0
- package/dist/cli/chunk-75UH3BLS.js +210 -0
- package/dist/cli/chunk-7ACK4EIN.js +92 -0
- package/dist/cli/chunk-7NMKLVMI.js +107 -0
- package/dist/cli/chunk-7SINJXB6.js +110 -0
- package/dist/cli/chunk-7UARFJYS.js +46 -0
- package/dist/cli/chunk-7ZYPQV4N.js +90 -0
- package/dist/cli/chunk-AQCYT3L4.js +72 -0
- package/dist/cli/chunk-BQK6XTOH.js +57 -0
- package/dist/cli/chunk-C3B7C43W.js +16 -0
- package/dist/cli/chunk-CAPAGD5E.js +98 -0
- package/dist/cli/chunk-CHGEDCKG.js +77 -0
- package/dist/cli/chunk-COXFJ3PT.js +74 -0
- package/dist/cli/chunk-D7BAQNV2.js +55 -0
- package/dist/cli/chunk-EIUXVHNF.js +258 -0
- package/dist/cli/chunk-EUGB6P5V.js +173 -0
- package/dist/cli/chunk-EW2CKNNZ.js +304 -0
- package/dist/cli/chunk-FSKN4DWC.js +108 -0
- package/dist/cli/chunk-FVKLULL7.js +48 -0
- package/dist/cli/chunk-GAGUBU4Z.js +280 -0
- package/dist/cli/chunk-GKRFH2YG.js +171 -0
- package/dist/cli/chunk-GRU74UE4.js +270 -0
- package/dist/cli/chunk-GZFVDR44.js +320 -0
- package/dist/cli/chunk-HFLLZE6A.js +83 -0
- package/dist/cli/chunk-HXRXT3XU.js +78 -0
- package/dist/cli/chunk-IIOGUY3B.js +258 -0
- package/dist/cli/chunk-ILWWL462.js +60 -0
- package/dist/cli/chunk-J5USPJKZ.js +48 -0
- package/dist/cli/chunk-KEQS36GD.js +88 -0
- package/dist/cli/chunk-L7ONYSV6.js +2497 -0
- package/dist/cli/chunk-LVGIFMCV.js +163 -0
- package/dist/cli/chunk-NEFMQYLE.js +656 -0
- package/dist/cli/chunk-NU6CQQVB.js +4501 -0
- package/dist/cli/chunk-OILHT47L.js +252 -0
- package/dist/cli/chunk-PKKZPOOP.js +352 -0
- package/dist/cli/chunk-PN4WW5VX.js +66 -0
- package/dist/cli/chunk-PSJ33WVO.js +56 -0
- package/dist/cli/chunk-QA6T2LQ5.js +71 -0
- package/dist/cli/chunk-QJJWWCIC.js +288 -0
- package/dist/cli/chunk-QKMBWYAS.js +93 -0
- package/dist/cli/chunk-QWNKLLLG.js +84 -0
- package/dist/cli/chunk-QWUFFDL3.js +85 -0
- package/dist/cli/chunk-QY76BRUZ.js +35 -0
- package/dist/cli/chunk-R45KVF5Y.js +117 -0
- package/dist/cli/chunk-RRKP7HLU.js +66 -0
- package/dist/cli/chunk-SXXOC6KZ.js +209 -0
- package/dist/cli/chunk-T6GZJYL3.js +108 -0
- package/dist/cli/chunk-TLQ37HRE.js +67 -0
- package/dist/cli/chunk-TPTNEJZJ.js +52 -0
- package/dist/cli/chunk-TYC7G5LF.js +100 -0
- package/dist/cli/chunk-UWCZY52R.js +766 -0
- package/dist/cli/chunk-VB3LDPL5.js +46 -0
- package/dist/cli/chunk-VLEYOOPH.js +31 -0
- package/dist/cli/chunk-W3JLYKKY.js +140 -0
- package/dist/cli/chunk-WWCYZYSN.js +56 -0
- package/dist/cli/chunk-XA5WISNV.js +52 -0
- package/dist/cli/chunk-XHRZ7OYZ.js +132 -0
- package/dist/cli/chunk-XLPMIGJJ.js +148 -0
- package/dist/cli/chunk-YY66LFZF.js +29 -0
- package/dist/cli/chunk-ZMGDZMSJ.js +210 -0
- package/dist/cli/claim-IGOG2QOC.js +97 -0
- package/dist/cli/classify-MG4N7GMQ.js +117 -0
- package/dist/cli/cli-A23Q335V.js +51 -0
- package/dist/cli/cloud-SILYJVKO.js +731 -0
- package/dist/cli/cockpit-RZKLGYPN.js +790 -0
- package/dist/cli/code-H2FQCVMW.js +178 -0
- package/dist/cli/complete-JLX7NBI4.js +35 -0
- package/dist/cli/complexity-OKV7PVZH.js +57 -0
- package/dist/cli/compliance-QMGZHJNQ.js +277 -0
- package/dist/cli/conduit-4H32UYEA.js +308 -0
- package/dist/cli/conduit-EY54WTZA.js +535 -0
- package/dist/cli/config-TDYOC7XO.js +519 -0
- package/dist/cli/consensus-4XCOFPPT.js +122 -0
- package/dist/cli/context-FN4YTGHD.js +142 -0
- package/dist/cli/contribution-7RWFBJLC.js +112 -0
- package/dist/cli/curator-HKZJCVRL.js +139 -0
- package/dist/cli/current-B2NU7V3G.js +43 -0
- package/dist/cli/daemon-GBD4TVCD.js +452 -0
- package/dist/cli/dash-IGDANIE5.js +71 -0
- package/dist/cli/decide-26SXC2V6.js +416 -0
- package/dist/cli/decompose-LQ76TEZG.js +78 -0
- package/dist/cli/decomposition-WFRWNUSJ.js +122 -0
- package/dist/cli/delete-T5DUQHOX.js +69 -0
- package/dist/cli/deps-UTPZJBXL.js +462 -0
- package/dist/cli/detect-FFZSMVDT.js +46 -0
- package/dist/cli/detect-drift-TVCJOFYJ.js +408 -0
- package/dist/cli/diagnostics-GN5CVD3N.js +93 -0
- package/dist/cli/diagnostics-ZNBKH6GX.js +133 -0
- package/dist/cli/docs-CLQKEEUK.js +1710 -0
- package/dist/cli/docs-DPPDFTWR.js +3098 -0
- package/dist/cli/doctor-GPENOP4N.js +1270 -0
- package/dist/cli/doctor-ac-bindings-S3IOEFP4.js +26 -0
- package/dist/cli/doctor-acceptance-drift-VNFKPBSQ.js +26 -0
- package/dist/cli/doctor-credentials-A5H4JMTF.js +26 -0
- package/dist/cli/doctor-db-substrate-FGCISE4Z.js +27 -0
- package/dist/cli/doctor-dep-cycles-BKKKHHYG.js +26 -0
- package/dist/cli/doctor-exodus-ND2DH2KP.js +26 -0
- package/dist/cli/doctor-exodus-residue-4EMRYMEQ.js +26 -0
- package/dist/cli/doctor-fk-check-VY3RIQV3.js +26 -0
- package/dist/cli/doctor-global-delivery-JN6IGHUL.js +26 -0
- package/dist/cli/doctor-heavy-command-hook-XSN44WXU.js +26 -0
- package/dist/cli/doctor-legacy-backups-QAG5NHYP.js +26 -0
- package/dist/cli/doctor-legacy-reaper-CIRGFE6R.js +26 -0
- package/dist/cli/doctor-malformed-ids-WL7HT4TB.js +26 -0
- package/dist/cli/doctor-manifest-rows-SMQCKJ2T.js +26 -0
- package/dist/cli/doctor-memory-guard-LJDOJG76.js +26 -0
- package/dist/cli/doctor-migrations-ETQPFNUP.js +26 -0
- package/dist/cli/doctor-nexus-residency-A4JMKBEJ.js +26 -0
- package/dist/cli/doctor-project-identity-FFQJ5LNX.js +26 -0
- package/dist/cli/doctor-projects-MFUTKRHP.js +30 -0
- package/dist/cli/doctor-projects-registry-76X6VTGM.js +26 -0
- package/dist/cli/doctor-release-readiness-QJCOPFTK.js +26 -0
- package/dist/cli/doctor-repair-AU76FIKY.js +26 -0
- package/dist/cli/doctor-row-identity-KW6JYZQE.js +26 -0
- package/dist/cli/doctor-skill-fixtures-G3T7JUHS.js +26 -0
- package/dist/cli/doctor-split-brain-FUW6L7FS.js +26 -0
- package/dist/cli/doctor-superseded-store-DUHGSBLC.js +26 -0
- package/dist/cli/doctor-sync-journal-SXMUIKF7.js +26 -0
- package/dist/cli/doctor-sync-triggers-6WNJZFRM.js +26 -0
- package/dist/cli/doctor-tool-locks-66LSLUBN.js +26 -0
- package/dist/cli/doctor-twin-collapse-AYBYBFC4.js +26 -0
- package/dist/cli/doctor-worktree-stores-C5XEH5OG.js +26 -0
- package/dist/cli/done-R64XRZ32.js +196 -0
- package/dist/cli/dynamic-RR4HB7BB.js +29 -0
- package/dist/cli/entities-3JIHDIOK.js +361 -0
- package/dist/cli/event-45KEWV5H.js +372 -0
- package/dist/cli/exists-BEDZS5RI.js +65 -0
- package/dist/cli/exodus-DUX62344.js +401 -0
- package/dist/cli/export-C5PQIQ5O.js +93 -0
- package/dist/cli/export-tasks-CUXDZPJB.js +97 -0
- package/dist/cli/federation-ESM35EGG.js +145 -0
- package/dist/cli/find-5EUZHHQJ.js +178 -0
- package/dist/cli/focus-6AH4KLRO.js +368 -0
- package/dist/cli/focus-ANKAIRO5.js +56 -0
- package/dist/cli/gateway-2GW2KTK3.js +77 -0
- package/dist/cli/gateway-auto-start-EDK7XI6E.js +36 -0
- package/dist/cli/gc-CTOQLUSA.js +291 -0
- package/dist/cli/go-YJPNHHYT.js +206 -0
- package/dist/cli/goal-4GW4G77D.js +213 -0
- package/dist/cli/grade-25WSZH4X.js +57 -0
- package/dist/cli/graph-JUO3TMF3.js +879 -0
- package/dist/cli/history-NACNUQTC.js +138 -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-7ESGL5SS.js +89 -0
- package/dist/cli/import-tasks-FLE2RPBR.js +109 -0
- package/dist/cli/index.js +601 -94637
- package/dist/cli/init-AN4DZ2XO.js +40 -0
- package/dist/cli/inject-HQWA5GWY.js +83 -0
- package/dist/cli/install-global-YQV4W5OG.js +95 -0
- package/dist/cli/intelligence-OFFNQGHE.js +238 -0
- package/dist/cli/intelligence-QIC4SN4X.js +182 -0
- package/dist/cli/issue-P5RNMRDG.js +159 -0
- package/dist/cli/janitor-ZNCFQ7E3.js +111 -0
- package/dist/cli/labels-ORBM3T57.js +88 -0
- package/dist/cli/lifecycle-MHR22TVI.js +273 -0
- package/dist/cli/list-LB6GCYYU.js +109 -0
- package/dist/cli/llm-H7LZWQKX.js +130 -0
- package/dist/cli/llm-OTJWPMGI.js +704 -0
- package/dist/cli/llm-cost-MLMXEAR4.js +25 -0
- package/dist/cli/llm-stream-AAEUNKRP.js +27 -0
- package/dist/cli/log-W2A5M2NA.js +76 -0
- package/dist/cli/login-SIXFFZSP.js +45 -0
- package/dist/cli/logout-G3KVLQQM.js +74 -0
- package/dist/cli/manifest-G4T6EBSI.js +354 -0
- package/dist/cli/map-VU5M72TK.js +53 -0
- package/dist/cli/memory-2E27G2G5.js +1952 -0
- package/dist/cli/memory-IAEYKXG6.js +1895 -0
- package/dist/cli/migrate-agents-v2-A52QIYNJ.js +33 -0
- package/dist/cli/migrate-claude-mem-TPDW3R4Z.js +206 -0
- package/dist/cli/next-SVH4LIDY.js +57 -0
- package/dist/cli/nexus-FPQV2EAF.js +1059 -0
- package/dist/cli/nexus-XSFXN5E6.js +2924 -0
- package/dist/cli/ops-K6LHY5J6.js +52 -0
- package/dist/cli/orchestrate-CZ2J6W3L.js +1650 -0
- package/dist/cli/orchestrate-HURUCQFT.js +950 -0
- package/dist/cli/otel-JCNPVJLZ.js +188 -0
- package/dist/cli/phase-VDFRASSO.js +221 -0
- package/dist/cli/pipeline-TCZPOEDR.js +697 -0
- package/dist/cli/pivot-V5MSQZ7L.js +88 -0
- package/dist/cli/plan-SQUGCKSM.js +49 -0
- package/dist/cli/playbook-L47GLDQD.js +230 -0
- package/dist/cli/playbook-NJVO4R6P.js +33 -0
- package/dist/cli/project-YZEC7GYF.js +331 -0
- package/dist/cli/promote-FINF4HVK.js +53 -0
- package/dist/cli/provenance-3TUWVBFR.js +141 -0
- package/dist/cli/provenance-YZG33JGM.js +129 -0
- package/dist/cli/provider-23JVLLG3.js +213 -0
- package/dist/cli/reason-FHN54O7O.js +138 -0
- package/dist/cli/reconcile-MOM5T4AX.js +128 -0
- package/dist/cli/refresh-memory-3OSTRAVK.js +45 -0
- package/dist/cli/relates-6FWUFUS2.js +260 -0
- package/dist/cli/release-G2DPSG5M.js +347 -0
- package/dist/cli/release-URX6JHZ2.js +525 -0
- package/dist/cli/remote-VIULU2T5.js +279 -0
- package/dist/cli/renderers-TGSW77J4.js +37 -0
- package/dist/cli/reorder-UIPN6TQY.js +87 -0
- package/dist/cli/reparent-ALOWWUIU.js +59 -0
- package/dist/cli/req-RH2Y3H7A.js +130 -0
- package/dist/cli/research-G2Y72HRC.js +366 -0
- package/dist/cli/restore-VBR5XNML.js +470 -0
- package/dist/cli/revert-32LDNSGP.js +240 -0
- package/dist/cli/roadmap-LFU3AG7D.js +62 -0
- package/dist/cli/run-HXRILSR7.js +245 -0
- package/dist/cli/safestop-Z5UC7NGQ.js +89 -0
- package/dist/cli/saga-Y6FZS6AM.js +286 -0
- package/dist/cli/schema-OOOKLWUE.js +195 -0
- package/dist/cli/self-update-26SOTJMH.js +504 -0
- package/dist/cli/selfimprove-4SMOCLUV.js +89 -0
- package/dist/cli/selfimprove-EB4RQLP4.js +139 -0
- package/dist/cli/sentient-QPETVE53.js +254 -0
- package/dist/cli/sentient-RGMWR4XJ.js +1088 -0
- package/dist/cli/sequence-H7DSAJPF.js +94 -0
- package/dist/cli/service-EK5MGB2D.js +156 -0
- package/dist/cli/service-GLOMZWPQ.js +437 -0
- package/dist/cli/session-HYUXAQGC.js +708 -0
- package/dist/cli/session-N5ISU56W.js +568 -0
- package/dist/cli/setup-L3YYV53D.js +323 -0
- package/dist/cli/show-364V3KY2.js +123 -0
- package/dist/cli/skill-F2KR6HW5.js +84 -0
- package/dist/cli/skills-FS3DCP6E.js +929 -0
- package/dist/cli/smoke-provider-SKUFMZXU.js +218 -0
- package/dist/cli/snapshot-EGXEQ5PR.js +120 -0
- package/dist/cli/src-LYLXHXHH.js +80 -0
- package/dist/cli/start-6DXOCCKL.js +68 -0
- package/dist/cli/stats-UVUQEGYC.js +96 -0
- package/dist/cli/status-XLKYLN42.js +157 -0
- package/dist/cli/sticky-VSTQ2I2O.js +264 -0
- package/dist/cli/sticky-XZXZDCFW.js +339 -0
- package/dist/cli/stop-VNOAFWNB.js +43 -0
- package/dist/cli/sync-YYPARW3A.js +155 -0
- package/dist/cli/tasks-C24KHTFF.js +1118 -0
- package/dist/cli/tasks-LBJC7CZV.js +175 -0
- package/dist/cli/telemetry-CU7W5WAY.js +120 -0
- package/dist/cli/templates-G42JBUY4.js +609 -0
- package/dist/cli/testing-HSRITHEY.js +147 -0
- package/dist/cli/token-J74E7TSU.js +221 -0
- package/dist/cli/tools-BI74W7VE.js +652 -0
- package/dist/cli/transcript-RGK7RSGQ.js +440 -0
- package/dist/cli/tui-BPUFHYKK.js +51 -0
- package/dist/cli/update-2KQWA27S.js +478 -0
- package/dist/cli/update-check-entry.js +124 -0
- package/dist/cli/update-notice-6SQ6WPQG.js +68 -0
- package/dist/cli/upgrade-E2MJAPC7.js +136 -0
- package/dist/cli/upgrade-XRSQ4RWH.js +243 -0
- package/dist/cli/verify-WASRGDBA.js +191 -0
- package/dist/cli/web-NJ3P67EU.js +275 -0
- package/dist/cli/workgraph-OHJ2VKJD.js +232 -0
- package/dist/cli/worktree-FVQLORFY.js +371 -0
- package/dist/cli/worktree-ZJ6JTQNG.js +287 -0
- package/package.json +13 -13
- package/studio-dist/client/_app/immutable/chunks/{DMj27Pxj.js → AH7dIemv.js} +1 -1
- package/studio-dist/client/_app/immutable/chunks/{Dc2owyvE.js → BDgH40i3.js} +1 -1
- package/studio-dist/client/_app/immutable/chunks/BXDCSJ7U.js +1 -0
- package/studio-dist/client/_app/immutable/chunks/{qq3pe1aT.js → Gg4iYl59.js} +1 -1
- package/studio-dist/client/_app/immutable/entry/{app.CHWXLeE9.js → app.DUDNK-37.js} +2 -2
- package/studio-dist/client/_app/immutable/entry/start.DNmZ0pA4.js +1 -0
- package/studio-dist/client/_app/immutable/nodes/{0.DmKQGvFh.js → 0.DWqP3ail.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{1.DqJk_REO.js → 1.CZGVUP5B.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{15.GUy6kdW1.js → 15.DGaflZRS.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{16.CcnKZ8f9.js → 16.uYlarGXl.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{17.DAlQF3lQ.js → 17.CZMR0E47.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{18.vQFr-vFj.js → 18.CBC-AKH_.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{20.GVOj5j_r.js → 20.BGi43MvQ.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{24.2-wC6DOh.js → 24.Dv8ftCyR.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/25.DQPVlTDQ.js +39 -0
- package/studio-dist/client/_app/immutable/nodes/{26.C3rNqzZF.js → 26.Cl800304.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{3.b-7pzc3M.js → 3.D_fQKj9f.js} +1 -1
- package/studio-dist/client/_app/version.json +1 -1
- package/studio-dist/server/chunks/{0-BaCce-O1.js → 0-BpOagOst.js} +3 -3
- package/studio-dist/server/chunks/1-D0oRGR-C.js +9 -0
- package/studio-dist/server/chunks/{15-DRMOSIC9.js → 15-BcjHz7Tv.js} +3 -3
- package/studio-dist/server/chunks/{16-BulXhoZZ.js → 16-CXm8TUk7.js} +3 -3
- package/studio-dist/server/chunks/{17-DUEOCM0H.js → 17-mSgUK-cp.js} +3 -3
- package/studio-dist/server/chunks/{18-DP7Q8zPs.js → 18-BtfnIw1d.js} +3 -3
- package/studio-dist/server/chunks/{20-9ta6MI7q.js → 20-By1e4QDS.js} +3 -3
- package/studio-dist/server/chunks/{24-DysdL1ab.js → 24-0i2YLVxG.js} +3 -3
- package/studio-dist/server/chunks/{dist-CdoCt9zT.js → 25-DPsrqbrh.js} +797 -10736
- package/studio-dist/server/chunks/{26-Df4YXgg0.js → 26-P0XkOibm.js} +3 -3
- package/studio-dist/server/chunks/{3-BEhOhYpL.js → 3-WudjUK7e.js} +3 -3
- package/studio-dist/server/chunks/{_layout.svelte-CnLcXYG-.js → _layout.svelte-D9m81Rle.js} +4 -4
- package/studio-dist/server/chunks/{_page.svelte-DGhXqeRc.js → _page.svelte-2PDLOF83.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-Dv8tmDEC.js → _page.svelte-BjE3jm2K.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-C0qgUvzA.js → _page.svelte-Clc0vmiZ.js} +4 -4
- package/studio-dist/server/chunks/{_page.svelte-ui7LnWkL.js → _page.svelte-DABdRT3h.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-HUqTICJR.js → _page.svelte-DG3PjiHj.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-DzcZljiy.js → _page.svelte-Edy9CaE8.js} +20 -7
- package/studio-dist/server/chunks/{_page.svelte-DOl0DGOO.js → _page.svelte-Hrf3-ZR8.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-Da4q5l93.js → _page.svelte-VB4O4Nl5.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-CbyEPj2j.js → _page.svelte-d3jEgjsI.js} +3 -3
- package/studio-dist/server/chunks/{_server.ts-P4wVVksg.js → _server.ts-BcRFsyo3.js} +4 -5
- package/studio-dist/server/chunks/{_server.ts-Cr57EKWf.js → _server.ts-CEWpIFrj.js} +6 -5
- package/studio-dist/server/chunks/{_server.ts-CnKVmf_s.js → _server.ts-CLVdVIF9.js} +2 -2
- package/studio-dist/server/chunks/{_server.ts-C0evMKCk.js → _server.ts-D_j7aSy5.js} +6 -5
- package/studio-dist/server/chunks/{_server.ts-2BazvYRP.js → _server.ts-QEZF8h2q.js} +4 -5
- package/studio-dist/server/chunks/{client-CPM4LrO2.js → client-Kp1dP1od.js} +2 -2
- package/studio-dist/server/chunks/{error.svelte-ShcZo43D.js → error.svelte-WOCioJVX.js} +3 -3
- package/studio-dist/server/chunks/{hooks.server-D2qbf3Zp.js → hooks.server-DH9zkIrJ.js} +3 -1
- package/studio-dist/server/chunks/{http-BiQjEmVU.js → http-DT5kxaWk.js} +5 -4
- package/studio-dist/server/chunks/{internal-Cgsrya1j.js → internal-z0vqd5_u.js} +3 -3
- package/studio-dist/server/chunks/operations-registry-DdzmYzqX.js +10584 -0
- package/studio-dist/server/chunks/{stores-BGrpEDMK.js → stores-s2kaL315.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/client/_app/immutable/nodes/25.D1vYaH8g.js +0 -39
- package/studio-dist/server/chunks/1-CVo7Nk6d.js +0 -9
- package/studio-dist/server/chunks/25-CYsps38R.js +0 -366
|
@@ -0,0 +1,195 @@
|
|
|
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
|
+
OPERATIONS
|
|
18
|
+
} from "./chunk-4VASFLUW.js";
|
|
19
|
+
import {
|
|
20
|
+
defineCommand,
|
|
21
|
+
showUsage
|
|
22
|
+
} from "./chunk-PKKZPOOP.js";
|
|
23
|
+
import {
|
|
24
|
+
cliError,
|
|
25
|
+
cliOutput
|
|
26
|
+
} from "./chunk-4RGSNUUP.js";
|
|
27
|
+
import {
|
|
28
|
+
setFormatContext
|
|
29
|
+
} from "./chunk-6JSJNYH2.js";
|
|
30
|
+
|
|
31
|
+
// packages/cleo/src/cli/commands/schema.ts
|
|
32
|
+
import { getInputContract } from "@cleocode/core";
|
|
33
|
+
import { describeOperation } from "@cleocode/lafs";
|
|
34
|
+
function resolveOperationDef(operationArg) {
|
|
35
|
+
const dotIdx = operationArg.indexOf(".");
|
|
36
|
+
if (dotIdx === -1) {
|
|
37
|
+
const matches = OPERATIONS.filter((op) => op.operation === operationArg);
|
|
38
|
+
if (matches.length === 1) {
|
|
39
|
+
return matches[0] ?? null;
|
|
40
|
+
}
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
const domain = operationArg.slice(0, dotIdx);
|
|
44
|
+
const operation = operationArg.slice(dotIdx + 1);
|
|
45
|
+
return OPERATIONS.find((op) => op.domain === domain && op.operation === operation) ?? null;
|
|
46
|
+
}
|
|
47
|
+
var schemaCommand = defineCommand({
|
|
48
|
+
meta: {
|
|
49
|
+
name: "schema",
|
|
50
|
+
description: "Introspect a CLEO operation: show params, types, enums, and declared gates"
|
|
51
|
+
},
|
|
52
|
+
args: {
|
|
53
|
+
operation: {
|
|
54
|
+
type: "positional",
|
|
55
|
+
description: "Operation key in domain.operation format (e.g. tasks.add)",
|
|
56
|
+
required: false
|
|
57
|
+
},
|
|
58
|
+
format: {
|
|
59
|
+
type: "string",
|
|
60
|
+
description: "Output format: json (default) or human (pretty table)",
|
|
61
|
+
default: "json"
|
|
62
|
+
},
|
|
63
|
+
"include-gates": {
|
|
64
|
+
type: "boolean",
|
|
65
|
+
description: "Include precondition gates in output (default: true)",
|
|
66
|
+
default: true
|
|
67
|
+
},
|
|
68
|
+
"include-examples": {
|
|
69
|
+
type: "boolean",
|
|
70
|
+
description: "Include usage examples in output (default: false)",
|
|
71
|
+
default: false
|
|
72
|
+
},
|
|
73
|
+
input: {
|
|
74
|
+
type: "boolean",
|
|
75
|
+
description: "Return the JSON Schema (draft-07) for the operation input payload, from OperationInputContract.schema (T9918)",
|
|
76
|
+
default: false
|
|
77
|
+
},
|
|
78
|
+
list: {
|
|
79
|
+
type: "boolean",
|
|
80
|
+
description: "List every operation key (domain.operation) so an operation can be discovered before it is introspected (T12308).",
|
|
81
|
+
default: false
|
|
82
|
+
},
|
|
83
|
+
examples: {
|
|
84
|
+
type: "boolean",
|
|
85
|
+
description: "Return canned example payloads from OperationInputContract.examples \u2014 pipeline: `cleo schema <op> --examples | jq '.examples[0].value' | cleo <verb> --params -` (T9918)",
|
|
86
|
+
default: false
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
async run({ args, cmd }) {
|
|
90
|
+
if (args.list === true) {
|
|
91
|
+
const operations = OPERATIONS.map((op) => ({
|
|
92
|
+
key: `${op.domain}.${op.operation}`,
|
|
93
|
+
gateway: op.gateway,
|
|
94
|
+
description: op.description
|
|
95
|
+
})).sort((a, b) => a.key.localeCompare(b.key));
|
|
96
|
+
if ((args.format ?? "json") === "human") {
|
|
97
|
+
setFormatContext({ format: "human", source: "flag", quiet: false });
|
|
98
|
+
}
|
|
99
|
+
cliOutput(
|
|
100
|
+
{ operations, count: operations.length },
|
|
101
|
+
{ command: "schema", operation: "schema.list" }
|
|
102
|
+
);
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
if (!args.operation) {
|
|
106
|
+
await showUsage(cmd);
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
const format = args.format ?? "json";
|
|
110
|
+
const includeGates = args["include-gates"] !== false;
|
|
111
|
+
const includeExamples = args["include-examples"] === true;
|
|
112
|
+
const wantInput = args.input === true;
|
|
113
|
+
const wantExamples = args.examples === true;
|
|
114
|
+
if (format === "human") {
|
|
115
|
+
setFormatContext({ format: "human", source: "flag", quiet: false });
|
|
116
|
+
}
|
|
117
|
+
const def = resolveOperationDef(args.operation);
|
|
118
|
+
if (def === null) {
|
|
119
|
+
cliError(
|
|
120
|
+
`Unknown operation: "${args.operation}". Run \`cleo schema --list\` to see all operations.`,
|
|
121
|
+
4,
|
|
122
|
+
{
|
|
123
|
+
name: "E_NOT_FOUND",
|
|
124
|
+
fix: "cleo schema --list"
|
|
125
|
+
}
|
|
126
|
+
);
|
|
127
|
+
process.exit(4);
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
if (wantInput || wantExamples) {
|
|
131
|
+
const contract = getInputContract(args.operation);
|
|
132
|
+
if (contract === null) {
|
|
133
|
+
cliOutput(
|
|
134
|
+
{
|
|
135
|
+
operation: args.operation,
|
|
136
|
+
schema: null,
|
|
137
|
+
examples: []
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
command: "schema",
|
|
141
|
+
operation: `schema.${args.operation}`,
|
|
142
|
+
message: `No OperationInputContract registered for ${args.operation}`,
|
|
143
|
+
extensions: {
|
|
144
|
+
hint: `No OperationInputContract registered for ${args.operation}. Use plain flag-based invocation.`
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
);
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
if (wantInput) {
|
|
151
|
+
cliOutput(
|
|
152
|
+
{
|
|
153
|
+
operation: contract.operation,
|
|
154
|
+
schema: contract.schema
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
command: "schema",
|
|
158
|
+
operation: `schema.${args.operation}`,
|
|
159
|
+
message: `Input schema for ${contract.operation}`
|
|
160
|
+
}
|
|
161
|
+
);
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
cliOutput(
|
|
165
|
+
{
|
|
166
|
+
operation: contract.operation,
|
|
167
|
+
examples: contract.examples.map((ex) => ({
|
|
168
|
+
name: ex.name,
|
|
169
|
+
value: ex.value,
|
|
170
|
+
...ex.description !== void 0 ? { description: ex.description } : {}
|
|
171
|
+
}))
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
command: "schema",
|
|
175
|
+
operation: `schema.${args.operation}`,
|
|
176
|
+
message: `Examples for ${contract.operation}`
|
|
177
|
+
}
|
|
178
|
+
);
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
const schema = describeOperation(def, {
|
|
182
|
+
includeGates,
|
|
183
|
+
includeExamples
|
|
184
|
+
});
|
|
185
|
+
cliOutput(schema, {
|
|
186
|
+
command: "schema",
|
|
187
|
+
operation: `schema.${args.operation}`,
|
|
188
|
+
message: `Schema for ${schema.operation}`
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
export {
|
|
193
|
+
schemaCommand
|
|
194
|
+
};
|
|
195
|
+
//# sourceMappingURL=schema-OOOKLWUE.js.map
|
|
@@ -0,0 +1,504 @@
|
|
|
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
|
+
createSelfUpdateProgress
|
|
18
|
+
} from "./chunk-W3JLYKKY.js";
|
|
19
|
+
import {
|
|
20
|
+
negatedFlag
|
|
21
|
+
} from "./chunk-47JYZAMS.js";
|
|
22
|
+
import {
|
|
23
|
+
defineCommand
|
|
24
|
+
} from "./chunk-PKKZPOOP.js";
|
|
25
|
+
import {
|
|
26
|
+
cliError,
|
|
27
|
+
cliOutput,
|
|
28
|
+
humanInfo,
|
|
29
|
+
humanWarn
|
|
30
|
+
} from "./chunk-4RGSNUUP.js";
|
|
31
|
+
import "./chunk-6JSJNYH2.js";
|
|
32
|
+
|
|
33
|
+
// packages/cleo/src/cli/commands/self-update.ts
|
|
34
|
+
import { execFile } from "node:child_process";
|
|
35
|
+
import { readFile } from "node:fs/promises";
|
|
36
|
+
import { join } from "node:path";
|
|
37
|
+
import * as readline from "node:readline";
|
|
38
|
+
import { promisify } from "node:util";
|
|
39
|
+
import { ExitCode } from "@cleocode/contracts/exit-codes.js";
|
|
40
|
+
import {
|
|
41
|
+
BUILD_CONFIG,
|
|
42
|
+
CleoError,
|
|
43
|
+
checkAllRegisteredProjects,
|
|
44
|
+
checkStorageMigration,
|
|
45
|
+
getCleoHome,
|
|
46
|
+
getRuntimeDiagnostics,
|
|
47
|
+
runUpgrade
|
|
48
|
+
} from "@cleocode/core/internal";
|
|
49
|
+
var execAsync = promisify(execFile);
|
|
50
|
+
var GITHUB_REPO = BUILD_CONFIG.repository.fullName;
|
|
51
|
+
async function getCurrentVersion() {
|
|
52
|
+
const cleoHome = getCleoHome();
|
|
53
|
+
try {
|
|
54
|
+
const content = await readFile(join(cleoHome, "VERSION"), "utf-8");
|
|
55
|
+
return (content.split("\n")[0] ?? "unknown").trim();
|
|
56
|
+
} catch {
|
|
57
|
+
return "unknown";
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
async function getNpmInstalledVersion() {
|
|
61
|
+
try {
|
|
62
|
+
const { stdout } = await execAsync("npm", [
|
|
63
|
+
"ls",
|
|
64
|
+
"-g",
|
|
65
|
+
"@cleocode/cleo",
|
|
66
|
+
"--depth=0",
|
|
67
|
+
"--json"
|
|
68
|
+
]);
|
|
69
|
+
const data = JSON.parse(stdout);
|
|
70
|
+
return data.dependencies?.["@cleocode/cleo"]?.version ?? null;
|
|
71
|
+
} catch {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
async function getDistTagVersion(tag) {
|
|
76
|
+
try {
|
|
77
|
+
const { stdout } = await execAsync("npm", ["view", `@cleocode/cleo@${tag}`, "version"]);
|
|
78
|
+
const v = stdout.trim();
|
|
79
|
+
return v || null;
|
|
80
|
+
} catch {
|
|
81
|
+
if (tag === "latest") {
|
|
82
|
+
try {
|
|
83
|
+
const { stdout } = await execAsync("curl", [
|
|
84
|
+
"-sL",
|
|
85
|
+
"--max-time",
|
|
86
|
+
"10",
|
|
87
|
+
`https://api.github.com/repos/${GITHUB_REPO}/releases/latest`
|
|
88
|
+
]);
|
|
89
|
+
const data = JSON.parse(stdout);
|
|
90
|
+
return data.tag_name?.replace(/^v/, "") ?? null;
|
|
91
|
+
} catch {
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
async function writeRuntimeVersionMetadata(mode, source, version) {
|
|
99
|
+
const cleoHome = getCleoHome();
|
|
100
|
+
const lines = [
|
|
101
|
+
version,
|
|
102
|
+
`mode=${mode}`,
|
|
103
|
+
`source=${source}`,
|
|
104
|
+
`installed=${(/* @__PURE__ */ new Date()).toISOString()}`
|
|
105
|
+
];
|
|
106
|
+
await import("node:fs/promises").then(
|
|
107
|
+
({ writeFile, mkdir }) => mkdir(cleoHome, { recursive: true }).then(
|
|
108
|
+
() => writeFile(join(cleoHome, "VERSION"), `${lines.join("\n")}
|
|
109
|
+
`, "utf-8")
|
|
110
|
+
)
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
var selfUpdateCommand = defineCommand({
|
|
114
|
+
meta: {
|
|
115
|
+
name: "self-update",
|
|
116
|
+
description: "Check for and install CLEO updates, then run post-update diagnostics"
|
|
117
|
+
},
|
|
118
|
+
args: {
|
|
119
|
+
check: {
|
|
120
|
+
type: "boolean",
|
|
121
|
+
description: "Only check if update is available"
|
|
122
|
+
},
|
|
123
|
+
status: {
|
|
124
|
+
type: "boolean",
|
|
125
|
+
description: "Show current vs latest version"
|
|
126
|
+
},
|
|
127
|
+
version: {
|
|
128
|
+
type: "string",
|
|
129
|
+
description: "Update to specific version"
|
|
130
|
+
},
|
|
131
|
+
channel: {
|
|
132
|
+
type: "string",
|
|
133
|
+
description: "Update channel: stable|beta"
|
|
134
|
+
},
|
|
135
|
+
beta: {
|
|
136
|
+
type: "boolean",
|
|
137
|
+
description: "Shortcut for --channel beta"
|
|
138
|
+
},
|
|
139
|
+
force: {
|
|
140
|
+
type: "boolean",
|
|
141
|
+
description: "Force update even if same version"
|
|
142
|
+
},
|
|
143
|
+
"post-update": {
|
|
144
|
+
type: "boolean",
|
|
145
|
+
description: "Run post-update diagnostics and migration only"
|
|
146
|
+
},
|
|
147
|
+
"no-auto-upgrade": {
|
|
148
|
+
type: "boolean",
|
|
149
|
+
description: "Skip automatic upgrade after update"
|
|
150
|
+
},
|
|
151
|
+
"auto-migrate": {
|
|
152
|
+
type: "boolean",
|
|
153
|
+
description: "Automatically migrate storage without prompting"
|
|
154
|
+
},
|
|
155
|
+
"check-projects": {
|
|
156
|
+
type: "boolean",
|
|
157
|
+
default: true,
|
|
158
|
+
description: "Run cross-project health probe after upgrade (disable with --no-check-projects)"
|
|
159
|
+
},
|
|
160
|
+
// Global output format flags — read directly from args (no optsWithGlobals in citty)
|
|
161
|
+
json: {
|
|
162
|
+
type: "boolean",
|
|
163
|
+
description: "Output as JSON"
|
|
164
|
+
},
|
|
165
|
+
human: {
|
|
166
|
+
type: "boolean",
|
|
167
|
+
description: "Force human-readable output"
|
|
168
|
+
},
|
|
169
|
+
quiet: {
|
|
170
|
+
type: "boolean",
|
|
171
|
+
description: "Suppress non-essential output"
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
async run({ args }) {
|
|
175
|
+
const isHuman = args.human === true || !!process.stdout.isTTY && args.json !== true;
|
|
176
|
+
const progress = createSelfUpdateProgress(isHuman);
|
|
177
|
+
try {
|
|
178
|
+
const noAutoUpgrade = negatedFlag(args, "auto-upgrade");
|
|
179
|
+
const checkProjects = args["check-projects"] !== false;
|
|
180
|
+
if (args["post-update"]) {
|
|
181
|
+
progress.start();
|
|
182
|
+
progress.step(4, "Running post-update diagnostics");
|
|
183
|
+
await runPostUpdateDiagnostics({
|
|
184
|
+
skipUpgrade: noAutoUpgrade,
|
|
185
|
+
autoMigrate: !!args["auto-migrate"] || !!args.force,
|
|
186
|
+
checkProjects
|
|
187
|
+
});
|
|
188
|
+
progress.complete("Post-update diagnostics complete");
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
progress.start();
|
|
192
|
+
progress.step(0, "Detecting installation type");
|
|
193
|
+
const runtime = await getRuntimeDiagnostics();
|
|
194
|
+
const script = runtime.invocation.script;
|
|
195
|
+
const fromNodeModules = script.includes("/node_modules/@cleocode/cleo/") || script.includes("\\node_modules\\@cleocode\\cleo\\");
|
|
196
|
+
const isDev = runtime.channel === "dev" && !fromNodeModules;
|
|
197
|
+
progress.step(1, "Checking current version");
|
|
198
|
+
const currentVersion = isDev ? await getCurrentVersion() : await getNpmInstalledVersion() ?? await getCurrentVersion();
|
|
199
|
+
const rawChannel = args.channel?.toLowerCase();
|
|
200
|
+
if (rawChannel && rawChannel !== "stable" && rawChannel !== "beta") {
|
|
201
|
+
throw new CleoError(
|
|
202
|
+
ExitCode.VALIDATION_ERROR,
|
|
203
|
+
`Invalid --channel '${rawChannel}'. Expected stable|beta`
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
const requestedChannel = args.beta ? "beta" : rawChannel ?? (runtime.channel === "beta" ? "beta" : "stable");
|
|
207
|
+
if (isDev && !args.force) {
|
|
208
|
+
progress.step(4, "Running post-update checks");
|
|
209
|
+
const preflight = checkStorageMigration();
|
|
210
|
+
cliOutput(
|
|
211
|
+
{
|
|
212
|
+
devMode: true,
|
|
213
|
+
channel: runtime.channel,
|
|
214
|
+
currentVersion,
|
|
215
|
+
message: "Dev install detected. Use git pull to update.",
|
|
216
|
+
storagePreflight: {
|
|
217
|
+
migrationNeeded: preflight.migrationNeeded,
|
|
218
|
+
summary: preflight.summary,
|
|
219
|
+
fix: preflight.fix
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
{ command: "self-update" }
|
|
223
|
+
);
|
|
224
|
+
if (preflight.migrationNeeded) {
|
|
225
|
+
progress.error(`Storage migration needed: ${preflight.summary}`);
|
|
226
|
+
humanWarn(
|
|
227
|
+
`
|
|
228
|
+
\u26A0 Storage migration needed: ${preflight.summary}
|
|
229
|
+
Fix: ${preflight.fix}
|
|
230
|
+
Or run: cleo upgrade
|
|
231
|
+
`
|
|
232
|
+
);
|
|
233
|
+
} else {
|
|
234
|
+
progress.complete("Dev environment check complete");
|
|
235
|
+
}
|
|
236
|
+
process.exit(ExitCode.NO_DATA);
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
if (args.status || args.check) {
|
|
240
|
+
progress.step(2, "Querying npm registry");
|
|
241
|
+
const latest2 = await getDistTagVersion(requestedChannel === "beta" ? "beta" : "latest");
|
|
242
|
+
if (!latest2) {
|
|
243
|
+
throw new CleoError(
|
|
244
|
+
ExitCode.DEPENDENCY_ERROR,
|
|
245
|
+
"Failed to check latest version from GitHub"
|
|
246
|
+
);
|
|
247
|
+
}
|
|
248
|
+
progress.step(3, "Comparing versions");
|
|
249
|
+
const updateAvailable = latest2 !== currentVersion;
|
|
250
|
+
const preflight = checkStorageMigration();
|
|
251
|
+
cliOutput(
|
|
252
|
+
{
|
|
253
|
+
currentVersion,
|
|
254
|
+
latestVersion: latest2,
|
|
255
|
+
channel: requestedChannel,
|
|
256
|
+
updateAvailable,
|
|
257
|
+
storagePreflight: {
|
|
258
|
+
migrationNeeded: preflight.migrationNeeded,
|
|
259
|
+
summary: preflight.summary,
|
|
260
|
+
fix: preflight.fix
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
{ command: "self-update" }
|
|
264
|
+
);
|
|
265
|
+
if (args.check && updateAvailable) {
|
|
266
|
+
process.exit(1);
|
|
267
|
+
}
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
progress.step(2, "Querying npm registry");
|
|
271
|
+
const latest = args.version ?? await getDistTagVersion(requestedChannel === "beta" ? "beta" : "latest");
|
|
272
|
+
if (!latest) {
|
|
273
|
+
throw new CleoError(
|
|
274
|
+
ExitCode.DEPENDENCY_ERROR,
|
|
275
|
+
"Failed to check latest version from GitHub"
|
|
276
|
+
);
|
|
277
|
+
}
|
|
278
|
+
progress.step(3, "Comparing versions");
|
|
279
|
+
if (latest === currentVersion && !args.force) {
|
|
280
|
+
progress.step(4, "Running post-update checks");
|
|
281
|
+
await runPostUpdateDiagnostics({
|
|
282
|
+
skipUpgrade: noAutoUpgrade,
|
|
283
|
+
autoMigrate: !!args["auto-migrate"] || !!args.force,
|
|
284
|
+
checkProjects
|
|
285
|
+
});
|
|
286
|
+
progress.complete("Already up to date");
|
|
287
|
+
cliOutput(
|
|
288
|
+
{
|
|
289
|
+
currentVersion,
|
|
290
|
+
upToDate: true
|
|
291
|
+
},
|
|
292
|
+
{ command: "self-update", message: "Already up to date" }
|
|
293
|
+
);
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
const spec = args.version ? `@cleocode/cleo@${latest}` : requestedChannel === "beta" ? "@cleocode/cleo@beta" : "@cleocode/cleo@latest";
|
|
297
|
+
progress.step(4, `Installing ${spec}`);
|
|
298
|
+
await execAsync("npm", ["install", "-g", spec], { maxBuffer: 10 * 1024 * 1024 });
|
|
299
|
+
await writeRuntimeVersionMetadata("prod-npm", "npm", latest);
|
|
300
|
+
progress.step(5, "Finalizing");
|
|
301
|
+
cliOutput(
|
|
302
|
+
{
|
|
303
|
+
currentVersion,
|
|
304
|
+
targetVersion: latest,
|
|
305
|
+
channel: requestedChannel,
|
|
306
|
+
updated: true,
|
|
307
|
+
command: `npm install -g ${spec}`
|
|
308
|
+
},
|
|
309
|
+
{ command: "self-update", message: `Updated to ${latest}` }
|
|
310
|
+
);
|
|
311
|
+
await runPostUpdateDiagnostics({
|
|
312
|
+
skipUpgrade: noAutoUpgrade,
|
|
313
|
+
autoMigrate: !!args["auto-migrate"] || !!args.force,
|
|
314
|
+
checkProjects
|
|
315
|
+
});
|
|
316
|
+
progress.complete(`Updated to ${latest}`);
|
|
317
|
+
} catch (err) {
|
|
318
|
+
if (err instanceof CleoError) {
|
|
319
|
+
progress.error(err.message);
|
|
320
|
+
cliError(
|
|
321
|
+
err.message,
|
|
322
|
+
err.code,
|
|
323
|
+
{ name: "CleoError", fix: err.fix },
|
|
324
|
+
{ operation: "self-update" }
|
|
325
|
+
);
|
|
326
|
+
process.exit(err.code);
|
|
327
|
+
}
|
|
328
|
+
progress.error("Unexpected error during update");
|
|
329
|
+
throw err;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
});
|
|
333
|
+
async function runPostUpdateDiagnostics(opts) {
|
|
334
|
+
const preflight = checkStorageMigration();
|
|
335
|
+
if (preflight.migrationNeeded) {
|
|
336
|
+
if (opts?.skipUpgrade) {
|
|
337
|
+
humanWarn(
|
|
338
|
+
`
|
|
339
|
+
\u26A0 Storage migration detected: ${preflight.summary}
|
|
340
|
+
Auto-upgrade skipped (--no-auto-upgrade).
|
|
341
|
+
Run manually: cleo upgrade
|
|
342
|
+
`
|
|
343
|
+
);
|
|
344
|
+
cliOutput(
|
|
345
|
+
{
|
|
346
|
+
postUpdate: true,
|
|
347
|
+
upgradeSkipped: true,
|
|
348
|
+
storagePreflight: {
|
|
349
|
+
migrationNeeded: true,
|
|
350
|
+
summary: preflight.summary,
|
|
351
|
+
fix: preflight.fix
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
{ command: "self-update", message: "Post-update upgrade skipped." }
|
|
355
|
+
);
|
|
356
|
+
return;
|
|
357
|
+
}
|
|
358
|
+
humanWarn(`
|
|
359
|
+
\u26A0 Storage migration detected: ${preflight.summary}`);
|
|
360
|
+
let shouldMigrate = !!opts?.autoMigrate;
|
|
361
|
+
if (!shouldMigrate) {
|
|
362
|
+
const rl = readline.createInterface({
|
|
363
|
+
input: process.stdin,
|
|
364
|
+
output: process.stdout
|
|
365
|
+
});
|
|
366
|
+
shouldMigrate = await new Promise((resolve) => {
|
|
367
|
+
rl.question(" Do you want to run the upgrade now? [Y/n] ", (answer) => {
|
|
368
|
+
rl.close();
|
|
369
|
+
const clean = answer.trim().toLowerCase();
|
|
370
|
+
resolve(clean === "" || clean === "y" || clean === "yes");
|
|
371
|
+
});
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
if (!shouldMigrate) {
|
|
375
|
+
humanWarn(`
|
|
376
|
+
Upgrade skipped. Run manually later: cleo upgrade
|
|
377
|
+
`);
|
|
378
|
+
return;
|
|
379
|
+
}
|
|
380
|
+
humanInfo(` Running upgrade...
|
|
381
|
+
`);
|
|
382
|
+
const result = await runUpgrade({ autoMigrate: true });
|
|
383
|
+
if (result.actions.length > 0) {
|
|
384
|
+
humanInfo("Upgrade actions:");
|
|
385
|
+
for (const action of result.actions) {
|
|
386
|
+
const icon = action.status === "applied" ? " \u2713" : action.status === "error" ? " \u2717" : " -";
|
|
387
|
+
humanInfo(`${icon} ${action.action}: ${action.details}`);
|
|
388
|
+
}
|
|
389
|
+
humanInfo("");
|
|
390
|
+
}
|
|
391
|
+
cliOutput(
|
|
392
|
+
{
|
|
393
|
+
postUpdate: true,
|
|
394
|
+
upgrade: {
|
|
395
|
+
success: result.success,
|
|
396
|
+
applied: result.applied,
|
|
397
|
+
actions: result.actions,
|
|
398
|
+
storageMigration: result.storageMigration,
|
|
399
|
+
errors: result.errors.length > 0 ? result.errors : void 0
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
command: "self-update",
|
|
404
|
+
message: result.success ? "Post-update upgrade complete." : "Post-update upgrade had errors."
|
|
405
|
+
}
|
|
406
|
+
);
|
|
407
|
+
if (!result.success) {
|
|
408
|
+
humanWarn(`
|
|
409
|
+
\u26A0 Some upgrade steps failed. Manual fix:
|
|
410
|
+
${preflight.fix}
|
|
411
|
+
`);
|
|
412
|
+
}
|
|
413
|
+
} else {
|
|
414
|
+
if (!opts?.skipUpgrade) {
|
|
415
|
+
const result = await runUpgrade({ autoMigrate: false });
|
|
416
|
+
if (result.applied > 0 || result.errors.length > 0) {
|
|
417
|
+
if (result.actions.length > 0) {
|
|
418
|
+
humanInfo("Post-update maintenance:");
|
|
419
|
+
for (const action of result.actions) {
|
|
420
|
+
if (action.status === "skipped") continue;
|
|
421
|
+
const icon = action.status === "applied" ? " \u2713" : action.status === "error" ? " \u2717" : " -";
|
|
422
|
+
humanInfo(`${icon} ${action.action}: ${action.details}`);
|
|
423
|
+
}
|
|
424
|
+
humanInfo("");
|
|
425
|
+
}
|
|
426
|
+
cliOutput(
|
|
427
|
+
{
|
|
428
|
+
postUpdate: true,
|
|
429
|
+
upgrade: {
|
|
430
|
+
success: result.success,
|
|
431
|
+
applied: result.applied,
|
|
432
|
+
actions: result.actions,
|
|
433
|
+
errors: result.errors.length > 0 ? result.errors : void 0
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
command: "self-update",
|
|
438
|
+
message: result.success ? `Post-update maintenance complete (${result.applied} action(s) applied).` : "Post-update maintenance had errors."
|
|
439
|
+
}
|
|
440
|
+
);
|
|
441
|
+
} else {
|
|
442
|
+
cliOutput(
|
|
443
|
+
{
|
|
444
|
+
postUpdate: true,
|
|
445
|
+
storagePreflight: {
|
|
446
|
+
migrationNeeded: false,
|
|
447
|
+
summary: preflight.summary
|
|
448
|
+
}
|
|
449
|
+
},
|
|
450
|
+
{ command: "self-update", message: "No post-update actions needed." }
|
|
451
|
+
);
|
|
452
|
+
}
|
|
453
|
+
} else {
|
|
454
|
+
cliOutput(
|
|
455
|
+
{
|
|
456
|
+
postUpdate: true,
|
|
457
|
+
storagePreflight: {
|
|
458
|
+
migrationNeeded: false,
|
|
459
|
+
summary: preflight.summary
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
{ command: "self-update", message: "No post-update actions needed." }
|
|
463
|
+
);
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
if (opts?.checkProjects !== false) {
|
|
467
|
+
try {
|
|
468
|
+
const report = await checkAllRegisteredProjects({
|
|
469
|
+
updateRegistry: true
|
|
470
|
+
});
|
|
471
|
+
cliOutput(
|
|
472
|
+
{
|
|
473
|
+
crossProjectHealth: {
|
|
474
|
+
summary: report.summary,
|
|
475
|
+
global: report.global.overall,
|
|
476
|
+
globalIssues: report.global.issues,
|
|
477
|
+
degraded: report.projects.filter((p) => p.overall === "degraded").map((p) => ({
|
|
478
|
+
hash: p.projectHash,
|
|
479
|
+
path: p.projectPath,
|
|
480
|
+
issues: p.issues
|
|
481
|
+
})),
|
|
482
|
+
unreachable: report.projects.filter((p) => p.overall === "unreachable").map((p) => ({
|
|
483
|
+
hash: p.projectHash,
|
|
484
|
+
path: p.projectPath
|
|
485
|
+
}))
|
|
486
|
+
}
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
command: "self-update",
|
|
490
|
+
message: report.summary.degraded > 0 || report.summary.unreachable > 0 ? `Cross-project health: ${report.summary.degraded} degraded, ${report.summary.unreachable} unreachable` : `Cross-project health: ${report.summary.totalProjects} project(s) healthy`
|
|
491
|
+
}
|
|
492
|
+
);
|
|
493
|
+
} catch (err) {
|
|
494
|
+
humanWarn(
|
|
495
|
+
`
|
|
496
|
+
\u26A0 Cross-project health probe failed: ${err instanceof Error ? err.message : String(err)}`
|
|
497
|
+
);
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
export {
|
|
502
|
+
selfUpdateCommand
|
|
503
|
+
};
|
|
504
|
+
//# sourceMappingURL=self-update-26SOTJMH.js.map
|