@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,565 @@
|
|
|
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
|
+
NEXUS_API_URL_ARG,
|
|
18
|
+
emitNexusResult,
|
|
19
|
+
failNexus,
|
|
20
|
+
nexusApiUrlArg
|
|
21
|
+
} from "./chunk-ULN4OKQQ.js";
|
|
22
|
+
import "./chunk-47JYZAMS.js";
|
|
23
|
+
import "./chunk-C3B7C43W.js";
|
|
24
|
+
import {
|
|
25
|
+
defineCommand
|
|
26
|
+
} from "./chunk-PKKZPOOP.js";
|
|
27
|
+
import "./chunk-3ZO3M37V.js";
|
|
28
|
+
import "./chunk-6JSJNYH2.js";
|
|
29
|
+
|
|
30
|
+
// packages/cleo/src/cli/commands/cloud.ts
|
|
31
|
+
import { NEXUS_DEVICE_LIST_STATES as NEXUS_DEVICE_LIST_STATES2 } from "@cleocode/contracts";
|
|
32
|
+
|
|
33
|
+
// packages/cleo/src/cli/lib/nexus-cloud-cli.ts
|
|
34
|
+
import { NEXUS_DEVICE_LIST_STATES } from "@cleocode/contracts";
|
|
35
|
+
function stringArg(args, name) {
|
|
36
|
+
const raw = args[name];
|
|
37
|
+
return typeof raw === "string" && raw !== "" ? raw : void 0;
|
|
38
|
+
}
|
|
39
|
+
function writeWarnings(warnings) {
|
|
40
|
+
for (const w of warnings) process.stderr.write(`warning: ${w.message} (${w.code})
|
|
41
|
+
`);
|
|
42
|
+
}
|
|
43
|
+
function deviceStateArg(args) {
|
|
44
|
+
const raw = stringArg(args, "state");
|
|
45
|
+
if (raw === void 0) return void 0;
|
|
46
|
+
const known = NEXUS_DEVICE_LIST_STATES.find((s) => s === raw);
|
|
47
|
+
if (known !== void 0) return known;
|
|
48
|
+
throw Object.assign(new Error(`unknown --state '${raw}'`), {
|
|
49
|
+
code: "E_VALIDATION",
|
|
50
|
+
fix: `use one of: ${NEXUS_DEVICE_LIST_STATES.join(", ")}`
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function cloudStatusSummary(r) {
|
|
54
|
+
if (r.verdict === "not-signed-in") {
|
|
55
|
+
return `Cloud status: not signed in to ${r.local.apiUrl}. Run \`cleo login nexus\`.`;
|
|
56
|
+
}
|
|
57
|
+
const s = r.summary;
|
|
58
|
+
const parts = [`device ${r.local.nexusDeviceId ?? "unknown"} (${s.profile ?? "no profile"})`];
|
|
59
|
+
if (r.local.projectId !== null) {
|
|
60
|
+
parts.push(`project ${r.local.projectId} ${s.linked ? "linked" : "NOT linked"}`);
|
|
61
|
+
parts.push(s.replicaAttached ? "replica attached" : "replica NOT attached");
|
|
62
|
+
parts.push(`${s.devices} device(s)`);
|
|
63
|
+
if (s.headSeq !== null) parts.push(`head ${s.headSeq}`);
|
|
64
|
+
if (s.openConflicts !== null) parts.push(`${s.openConflicts} open conflict(s)`);
|
|
65
|
+
}
|
|
66
|
+
return `Cloud status: ${r.verdict}. ${parts.join("; ")}.`;
|
|
67
|
+
}
|
|
68
|
+
async function runCloudRead(operation, call, summary) {
|
|
69
|
+
let result;
|
|
70
|
+
try {
|
|
71
|
+
result = await call();
|
|
72
|
+
} catch (err) {
|
|
73
|
+
const { NexusCloudOfflineError } = await import(
|
|
74
|
+
/* webpackIgnore: true */
|
|
75
|
+
"@cleocode/core/cloud/nexus-cloud-status.js"
|
|
76
|
+
);
|
|
77
|
+
if (err instanceof NexusCloudOfflineError) writeWarnings(err.publicDetails.warnings);
|
|
78
|
+
failNexus(err, operation);
|
|
79
|
+
}
|
|
80
|
+
writeWarnings(result.warnings);
|
|
81
|
+
emitNexusResult(result, summary(result), "cloud", operation);
|
|
82
|
+
}
|
|
83
|
+
async function runCloudStatus(args) {
|
|
84
|
+
await runCloudRead(
|
|
85
|
+
"cloud.status",
|
|
86
|
+
async () => {
|
|
87
|
+
const { getNexusCloudStatus } = await import(
|
|
88
|
+
/* webpackIgnore: true */
|
|
89
|
+
"@cleocode/core/cloud/nexus-cloud-status.js"
|
|
90
|
+
);
|
|
91
|
+
const projectId = stringArg(args, "project");
|
|
92
|
+
return getNexusCloudStatus({
|
|
93
|
+
apiUrl: nexusApiUrlArg(args),
|
|
94
|
+
...projectId !== void 0 ? { projectId } : {}
|
|
95
|
+
});
|
|
96
|
+
},
|
|
97
|
+
cloudStatusSummary
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
async function runCloudWhoami(args) {
|
|
101
|
+
await runCloudRead(
|
|
102
|
+
"cloud.whoami",
|
|
103
|
+
async () => {
|
|
104
|
+
const { nexusCloudWhoami } = await import(
|
|
105
|
+
/* webpackIgnore: true */
|
|
106
|
+
"@cleocode/core/cloud/nexus-cloud.js"
|
|
107
|
+
);
|
|
108
|
+
return nexusCloudWhoami({ apiUrl: nexusApiUrlArg(args) });
|
|
109
|
+
},
|
|
110
|
+
(r) => `Signed in to ${r.apiUrl} as ${r.user.email} with a ${r.credential.kind} credential${r.device ? ` (device ${r.device.deviceId}, profile ${r.credential.profile ?? "none"})` : ""}.`
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
async function runCloudDevices(args) {
|
|
114
|
+
await runCloudRead(
|
|
115
|
+
"cloud.devices.list",
|
|
116
|
+
async () => {
|
|
117
|
+
const state = deviceStateArg(args);
|
|
118
|
+
const { listNexusCloudDevices } = await import(
|
|
119
|
+
/* webpackIgnore: true */
|
|
120
|
+
"@cleocode/core/cloud/nexus-cloud.js"
|
|
121
|
+
);
|
|
122
|
+
return listNexusCloudDevices({
|
|
123
|
+
apiUrl: nexusApiUrlArg(args),
|
|
124
|
+
...state !== void 0 ? { state } : {}
|
|
125
|
+
});
|
|
126
|
+
},
|
|
127
|
+
(r) => `${r.count} device(s) on ${r.apiUrl}${r.state ? ` (state ${r.state})` : ""}: ${r.devices.map((d) => `${d.name} ${d.deviceId} ${d.state}${d.current ? " (this machine)" : ""}`).join("; ")}`
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
async function runCloudProjects(args) {
|
|
131
|
+
const action = stringArg(args, "action");
|
|
132
|
+
if (action === "show") {
|
|
133
|
+
await runCloudRead(
|
|
134
|
+
"cloud.projects.show",
|
|
135
|
+
async () => {
|
|
136
|
+
const projectId = stringArg(args, "id");
|
|
137
|
+
const { showNexusCloudProject } = await import(
|
|
138
|
+
/* webpackIgnore: true */
|
|
139
|
+
"@cleocode/core/cloud/nexus-cloud.js"
|
|
140
|
+
);
|
|
141
|
+
return showNexusCloudProject({
|
|
142
|
+
apiUrl: nexusApiUrlArg(args),
|
|
143
|
+
...projectId !== void 0 ? { projectId } : {}
|
|
144
|
+
});
|
|
145
|
+
},
|
|
146
|
+
(r) => `Project ${r.projectId} "${r.project.label ?? ""}" (${r.role}): ${r.devices.active} active device(s), ${r.replicas.length} replica(s), head ${r.stream?.headSeq ?? "none"}, ${r.openConflicts} open conflict(s).`
|
|
147
|
+
);
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
if (action !== void 0 && action !== "list") {
|
|
151
|
+
failNexus(
|
|
152
|
+
Object.assign(new Error(`unknown action '${action}'`), {
|
|
153
|
+
code: "E_VALIDATION",
|
|
154
|
+
fix: "use `cleo cloud projects` or `cleo cloud projects show [<id>]`"
|
|
155
|
+
}),
|
|
156
|
+
"cloud.projects.list"
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
await runCloudRead(
|
|
160
|
+
"cloud.projects.list",
|
|
161
|
+
async () => {
|
|
162
|
+
const organizationId = stringArg(args, "org");
|
|
163
|
+
const { listNexusCloudProjects } = await import(
|
|
164
|
+
/* webpackIgnore: true */
|
|
165
|
+
"@cleocode/core/cloud/nexus-cloud.js"
|
|
166
|
+
);
|
|
167
|
+
return listNexusCloudProjects({
|
|
168
|
+
apiUrl: nexusApiUrlArg(args),
|
|
169
|
+
...organizationId !== void 0 ? { organizationId } : {}
|
|
170
|
+
});
|
|
171
|
+
},
|
|
172
|
+
(r) => `${r.count} project(s) on ${r.apiUrl}: ${r.projects.map((p) => `${p.label ?? p.projectId} (${p.role})`).join("; ")}`
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// packages/cleo/src/cli/lib/nexus-vault-cli.ts
|
|
177
|
+
function scopeArg(args, operation) {
|
|
178
|
+
const raw = stringArg(args, "scope") ?? "project";
|
|
179
|
+
if (raw === "project" || raw === "global") return raw;
|
|
180
|
+
failNexus(
|
|
181
|
+
Object.assign(new Error(`unknown scope '${raw}'`), {
|
|
182
|
+
code: "E_VALIDATION",
|
|
183
|
+
fix: "use --scope project (default) or --scope global"
|
|
184
|
+
}),
|
|
185
|
+
operation
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
var vaultModule = () => import(
|
|
189
|
+
/* webpackIgnore: true */
|
|
190
|
+
"@cleocode/core/cloud/nexus-vault.js"
|
|
191
|
+
);
|
|
192
|
+
function common(args, operation) {
|
|
193
|
+
return { apiUrl: nexusApiUrlArg(args), scope: scopeArg(args, operation) };
|
|
194
|
+
}
|
|
195
|
+
var who = (name, id) => name ?? id;
|
|
196
|
+
function activityLimitArg(args) {
|
|
197
|
+
const raw = stringArg(args, "limit");
|
|
198
|
+
if (raw === void 0) return void 0;
|
|
199
|
+
const limit = Number(raw);
|
|
200
|
+
if (/^\d+$/.test(raw) && Number.isSafeInteger(limit) && limit >= 1 && limit <= 200) return limit;
|
|
201
|
+
throw Object.assign(new Error(`--limit must be a whole number from 1 to 200, got '${raw}'`), {
|
|
202
|
+
code: "E_VALIDATION",
|
|
203
|
+
fix: "pass --limit 1..200 (default 50)"
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
async function runCloudPush(args) {
|
|
207
|
+
await runCloudRead(
|
|
208
|
+
"cloud.push",
|
|
209
|
+
async () => (await vaultModule()).pushNexusVault({
|
|
210
|
+
...common(args, "cloud.push"),
|
|
211
|
+
force: args["force"] === true,
|
|
212
|
+
hold: args["hold"] === true
|
|
213
|
+
}),
|
|
214
|
+
(r) => r.status === "up-to-date" ? `Up to date: ${r.streamId} already holds this ${r.scope} store (snapshot ${r.snapshot?.checkpointId ?? "none"}).` : `Pushed ${r.scope} snapshot ${r.snapshot?.checkpointId} to ${r.streamId} (${r.snapshot?.rows ?? 0} rows${r.parentCheckpointId ? `, parent ${r.parentCheckpointId}` : ", first snapshot"}${r.forked ? ", FORK: lease taken by force" : ""}).`
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
async function runCloudPull(args) {
|
|
218
|
+
await runCloudRestoreLike(args, "cloud.pull", "pull");
|
|
219
|
+
}
|
|
220
|
+
async function runCloudRestore(args) {
|
|
221
|
+
await runCloudRestoreLike(args, "cloud.restore", "restore");
|
|
222
|
+
}
|
|
223
|
+
async function restoreProjectId(args) {
|
|
224
|
+
const positional = stringArg(args, "name");
|
|
225
|
+
const flag = stringArg(args, "project");
|
|
226
|
+
if (positional !== void 0 && flag !== void 0 && positional !== flag) {
|
|
227
|
+
throw Object.assign(new Error("give the project once: as <name> or as --project"), {
|
|
228
|
+
code: "E_VALIDATION",
|
|
229
|
+
fix: "use `cleo cloud restore <name>` (or `--project <name>`), not both"
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
const ref = positional ?? flag;
|
|
233
|
+
if (ref === void 0) return void 0;
|
|
234
|
+
if (stringArg(args, "scope") === "global") {
|
|
235
|
+
throw Object.assign(new Error("a project name restores a project, not the global store"), {
|
|
236
|
+
code: "E_VALIDATION",
|
|
237
|
+
fix: "drop --scope global to restore the project, or drop the project to restore the global store"
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
const { assertNexusRestoreTarget, resolveNexusProjectRef } = await import(
|
|
241
|
+
/* webpackIgnore: true */
|
|
242
|
+
"@cleocode/core/cloud/nexus-project-names.js"
|
|
243
|
+
);
|
|
244
|
+
if (stringArg(args, "into") === void 0) assertNexusRestoreTarget();
|
|
245
|
+
const resolved = await resolveNexusProjectRef(ref, { apiUrl: nexusApiUrlArg(args) });
|
|
246
|
+
if (resolved.matchedBy === "name") {
|
|
247
|
+
process.stderr.write(`Restoring "${resolved.name}" (project ${resolved.projectId})...
|
|
248
|
+
`);
|
|
249
|
+
}
|
|
250
|
+
return resolved.projectId;
|
|
251
|
+
}
|
|
252
|
+
async function runCloudRestoreLike(args, operation, mode) {
|
|
253
|
+
await runCloudRead(
|
|
254
|
+
operation,
|
|
255
|
+
async () => {
|
|
256
|
+
const checkpointId = stringArg(args, "checkpoint");
|
|
257
|
+
const projectId = mode === "restore" ? await restoreProjectId(args) : void 0;
|
|
258
|
+
const into = stringArg(args, "into");
|
|
259
|
+
return (await vaultModule()).restoreNexusVault({
|
|
260
|
+
...common(args, operation),
|
|
261
|
+
mode,
|
|
262
|
+
force: args["force"] === true,
|
|
263
|
+
...mode === "restore" && checkpointId !== void 0 ? { checkpointId } : {},
|
|
264
|
+
...mode === "restore" && projectId !== void 0 ? { projectId } : {},
|
|
265
|
+
...mode === "restore" && into !== void 0 ? { into } : {},
|
|
266
|
+
relink: async (projectRoot) => {
|
|
267
|
+
const { linkProjectToNexus } = await import(
|
|
268
|
+
/* webpackIgnore: true */
|
|
269
|
+
"@cleocode/core/cloud/nexus-link.js"
|
|
270
|
+
);
|
|
271
|
+
try {
|
|
272
|
+
const linked = await linkProjectToNexus({ apiUrl: nexusApiUrlArg(args), projectRoot });
|
|
273
|
+
return linked.warnings;
|
|
274
|
+
} catch (err) {
|
|
275
|
+
return [
|
|
276
|
+
`restored, but attaching this copy failed (${err instanceof Error ? err.message : String(err)}); run \`cleo project link\``
|
|
277
|
+
];
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
},
|
|
282
|
+
(r) => r.status === "up-to-date" ? `Up to date: this ${r.scope} store already holds snapshot ${r.snapshot?.checkpointId ?? "none"}.` : `Restored ${r.scope} snapshot ${r.snapshot?.checkpointId} into ${r.target}: ${r.tables} table(s) verified by count and hash${r.safetyBackup ? `; previous state saved to ${r.safetyBackup}` : ""}.`
|
|
283
|
+
);
|
|
284
|
+
}
|
|
285
|
+
async function runCloudVerify(args) {
|
|
286
|
+
await runCloudRead(
|
|
287
|
+
"cloud.verify",
|
|
288
|
+
async () => (await vaultModule()).verifyNexusVault(common(args, "cloud.verify")),
|
|
289
|
+
(r) => {
|
|
290
|
+
const bad = r.tables.filter((t) => !t.match).map((t) => t.table);
|
|
291
|
+
const devices = r.devices.map(
|
|
292
|
+
(d) => `${who(d.deviceName, d.deviceId)} ${d.matchesHead ? "matches" : "differs from"} head`
|
|
293
|
+
).join("; ");
|
|
294
|
+
return `Verify ${r.scope}: ${r.verdict}${bad.length ? ` (${bad.length} table(s) differ: ${bad.slice(0, 8).join(", ")}${bad.length > 8 ? ", \u2026" : ""})` : ""}; local integrity ${r.localIntegrity ? "ok" : "FAILED"}${devices ? `; ${devices}` : ""}.`;
|
|
295
|
+
}
|
|
296
|
+
);
|
|
297
|
+
}
|
|
298
|
+
async function runCloudVault(args) {
|
|
299
|
+
await runCloudRead(
|
|
300
|
+
"cloud.vault",
|
|
301
|
+
async () => (await vaultModule()).nexusVaultStatus(common(args, "cloud.vault")),
|
|
302
|
+
(r) => `Vault ${r.scope} ${r.streamId}: ${r.lineage.length} snapshot(s), head ${r.head?.checkpointId ?? "none"}${r.head ? ` by ${who(r.head.deviceName, r.head.deviceId)}` : ""}; this store last synced ${r.lastSynced ?? "never"}; ${r.pendingChanges.length} table(s) changed since; leases: ${r.leases.map((l) => `${l.role} ${who(l.deviceName, l.deviceId ?? l.replicaId)} until ${l.expiresAt}${l.mine ? " (this machine)" : ""}${l.forkedFromReplicaId ? " (forked)" : ""}`).join("; ") || "none"}.`
|
|
303
|
+
);
|
|
304
|
+
}
|
|
305
|
+
async function runCloudLease(args) {
|
|
306
|
+
const action = stringArg(args, "action") ?? "release";
|
|
307
|
+
if (action !== "release") {
|
|
308
|
+
failNexus(
|
|
309
|
+
Object.assign(new Error(`unknown action '${action}'`), {
|
|
310
|
+
code: "E_VALIDATION",
|
|
311
|
+
fix: "use `cleo cloud lease release` (see `cleo cloud vault` for holders)"
|
|
312
|
+
}),
|
|
313
|
+
"cloud.lease.release"
|
|
314
|
+
);
|
|
315
|
+
}
|
|
316
|
+
await runCloudRead(
|
|
317
|
+
"cloud.lease.release",
|
|
318
|
+
async () => (await vaultModule()).releaseNexusVaultLease(common(args, "cloud.lease.release")),
|
|
319
|
+
(r) => r.released ? `Released the write lease on ${r.streamId}: another device may push now.` : `This machine held no write lease on ${r.streamId}.`
|
|
320
|
+
);
|
|
321
|
+
}
|
|
322
|
+
async function runCloudActivity(args) {
|
|
323
|
+
await runCloudRead(
|
|
324
|
+
"cloud.activity",
|
|
325
|
+
async () => {
|
|
326
|
+
const { nexusCloudActivity } = await import(
|
|
327
|
+
/* webpackIgnore: true */
|
|
328
|
+
"@cleocode/core/cloud/nexus-cloud-activity.js"
|
|
329
|
+
);
|
|
330
|
+
const limit = activityLimitArg(args);
|
|
331
|
+
const before = stringArg(args, "before");
|
|
332
|
+
const projectId = stringArg(args, "project");
|
|
333
|
+
const deviceId = stringArg(args, "device");
|
|
334
|
+
return nexusCloudActivity({
|
|
335
|
+
...deviceId !== void 0 ? { deviceId } : {},
|
|
336
|
+
apiUrl: nexusApiUrlArg(args),
|
|
337
|
+
...limit !== void 0 ? { limit } : {},
|
|
338
|
+
...before !== void 0 ? { before } : {},
|
|
339
|
+
...projectId !== void 0 ? { projectId } : {}
|
|
340
|
+
});
|
|
341
|
+
},
|
|
342
|
+
(r) => `${r.items.length} event(s)${r.projectId ? ` for project ${r.projectId}` : ""}: ${r.items.slice(0, 10).map(
|
|
343
|
+
(i) => `${i.at} ${who(i.deviceName, i.deviceId ?? "account")}${i.thisDevice ? " (this machine)" : ""} ${i.action}${i.target ? ` ${i.target}` : ""}`
|
|
344
|
+
).join("; ")}${r.items.length > 10 ? "; \u2026" : ""}`
|
|
345
|
+
);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
// packages/cleo/src/cli/commands/cloud.ts
|
|
349
|
+
var JSON_ARG = { type: "boolean", description: "Output as JSON envelope" };
|
|
350
|
+
var SCOPE_ARG = {
|
|
351
|
+
type: "string",
|
|
352
|
+
description: "Which store: 'project' (the current project, default) or 'global' (this account's global store: the main brain)."
|
|
353
|
+
};
|
|
354
|
+
var statusSubCommand = defineCommand({
|
|
355
|
+
meta: {
|
|
356
|
+
name: "status",
|
|
357
|
+
description: "Verify this machine against Cleo Nexus in one call: device, credential, project link, replica and stream. Returns { verdict, summary, local, remote, warnings }; verdict is ok, attention, not-linked, not-registered or not-signed-in. Reads only (GET; never binds a replica), except that getting the credential may upgrade a 9.24 session (E1) and retry unsettled logouts (E9/E10)."
|
|
358
|
+
},
|
|
359
|
+
args: {
|
|
360
|
+
project: {
|
|
361
|
+
type: "string",
|
|
362
|
+
description: "Project id to check (default: the current project)."
|
|
363
|
+
},
|
|
364
|
+
"api-url": NEXUS_API_URL_ARG,
|
|
365
|
+
json: JSON_ARG
|
|
366
|
+
},
|
|
367
|
+
async run({ args }) {
|
|
368
|
+
await runCloudStatus(args);
|
|
369
|
+
}
|
|
370
|
+
});
|
|
371
|
+
var whoamiSubCommand = defineCommand({
|
|
372
|
+
meta: {
|
|
373
|
+
name: "whoami",
|
|
374
|
+
description: "Show the Cleo Nexus user, organizations, credential and device for this machine."
|
|
375
|
+
},
|
|
376
|
+
args: { "api-url": NEXUS_API_URL_ARG, json: JSON_ARG },
|
|
377
|
+
async run({ args }) {
|
|
378
|
+
await runCloudWhoami(args);
|
|
379
|
+
}
|
|
380
|
+
});
|
|
381
|
+
var devicesSubCommand = defineCommand({
|
|
382
|
+
meta: {
|
|
383
|
+
name: "devices",
|
|
384
|
+
description: "List the account's devices (newest first), following every page; reports truncation."
|
|
385
|
+
},
|
|
386
|
+
args: {
|
|
387
|
+
state: {
|
|
388
|
+
type: "string",
|
|
389
|
+
description: `Filter: ${NEXUS_DEVICE_LIST_STATES2.join(", ")} (default: active).`
|
|
390
|
+
},
|
|
391
|
+
"api-url": NEXUS_API_URL_ARG,
|
|
392
|
+
json: JSON_ARG
|
|
393
|
+
},
|
|
394
|
+
async run({ args }) {
|
|
395
|
+
await runCloudDevices(args);
|
|
396
|
+
}
|
|
397
|
+
});
|
|
398
|
+
var projectsSubCommand = defineCommand({
|
|
399
|
+
meta: {
|
|
400
|
+
name: "projects",
|
|
401
|
+
description: "List visible Cleo Nexus projects, following every page (cleo cloud projects [--org <id>]), or show one with its replicas and device counts (cleo cloud projects show [<id>], default: the current project)."
|
|
402
|
+
},
|
|
403
|
+
args: {
|
|
404
|
+
action: {
|
|
405
|
+
type: "positional",
|
|
406
|
+
description: "'list' (default) or 'show'.",
|
|
407
|
+
required: false
|
|
408
|
+
},
|
|
409
|
+
id: {
|
|
410
|
+
type: "positional",
|
|
411
|
+
description: "Project id for show (default: the current project).",
|
|
412
|
+
required: false
|
|
413
|
+
},
|
|
414
|
+
org: { type: "string", description: "Only this organization id (list)." },
|
|
415
|
+
"api-url": NEXUS_API_URL_ARG,
|
|
416
|
+
json: JSON_ARG
|
|
417
|
+
},
|
|
418
|
+
async run({ args }) {
|
|
419
|
+
await runCloudProjects(args);
|
|
420
|
+
}
|
|
421
|
+
});
|
|
422
|
+
var pushSubCommand = defineCommand({
|
|
423
|
+
meta: {
|
|
424
|
+
name: "push",
|
|
425
|
+
description: "Back up this store to Cleo Nexus as an encrypted snapshot; the key is escrowed on Cleo Nexus (released only to your approved devices), so this is encrypted at rest, not zero-knowledge. The server also stores per-table row counts and keyed hashes in plaintext. Refused when another device holds the write lease or pushed since this machine last synced (pull first); --force takes the lease and pushes anyway as a labelled fork. The lease is released when the push ends unless --hold."
|
|
426
|
+
},
|
|
427
|
+
args: {
|
|
428
|
+
scope: SCOPE_ARG,
|
|
429
|
+
force: {
|
|
430
|
+
type: "boolean",
|
|
431
|
+
description: "Take the lease from another device / push over a newer snapshot (a labelled fork)."
|
|
432
|
+
},
|
|
433
|
+
hold: {
|
|
434
|
+
type: "boolean",
|
|
435
|
+
description: "Keep the write lease after the push (another device cannot push until it expires or `cleo cloud lease release`)."
|
|
436
|
+
},
|
|
437
|
+
"api-url": NEXUS_API_URL_ARG,
|
|
438
|
+
json: JSON_ARG
|
|
439
|
+
},
|
|
440
|
+
async run({ args }) {
|
|
441
|
+
await runCloudPush(args);
|
|
442
|
+
}
|
|
443
|
+
});
|
|
444
|
+
var pullSubCommand = defineCommand({
|
|
445
|
+
meta: {
|
|
446
|
+
name: "pull",
|
|
447
|
+
description: "Bring this store to the cloud's newest snapshot, verified by per-table count and hash before anything is replaced; this machine's local-only state is kept. Refuses to overwrite local changes made since the last sync unless --force (a safety backup is taken first)."
|
|
448
|
+
},
|
|
449
|
+
args: {
|
|
450
|
+
scope: SCOPE_ARG,
|
|
451
|
+
force: { type: "boolean", description: "Overwrite local changes (after a safety backup)." },
|
|
452
|
+
"api-url": NEXUS_API_URL_ARG,
|
|
453
|
+
json: JSON_ARG
|
|
454
|
+
},
|
|
455
|
+
async run({ args }) {
|
|
456
|
+
await runCloudPull(args);
|
|
457
|
+
}
|
|
458
|
+
});
|
|
459
|
+
var restoreSubCommand = defineCommand({
|
|
460
|
+
meta: {
|
|
461
|
+
name: "restore",
|
|
462
|
+
description: "Restore a snapshot: the newest, or --checkpoint <id> (point in time); or a project this machine does not have yet by name, label or id: cleo cloud restore <name> [--into <dir>] (then it is linked to this device). A name several projects share lists them. Verified by count and hash before activation; a safety backup of existing data is taken first."
|
|
463
|
+
},
|
|
464
|
+
args: {
|
|
465
|
+
name: {
|
|
466
|
+
type: "positional",
|
|
467
|
+
description: "Project to restore onto this machine: its name, label or id (see `cleo cloud projects`; the same as --project).",
|
|
468
|
+
required: false
|
|
469
|
+
},
|
|
470
|
+
scope: SCOPE_ARG,
|
|
471
|
+
checkpoint: { type: "string", description: "Snapshot id to restore (see `cleo cloud vault`)." },
|
|
472
|
+
project: {
|
|
473
|
+
type: "string",
|
|
474
|
+
description: "Project to restore onto this machine: its name, label or server id (see `cleo cloud projects`)."
|
|
475
|
+
},
|
|
476
|
+
into: {
|
|
477
|
+
type: "string",
|
|
478
|
+
description: "Directory for --project (default: the current directory)."
|
|
479
|
+
},
|
|
480
|
+
force: { type: "boolean", description: "Overwrite local changes (after a safety backup)." },
|
|
481
|
+
"api-url": NEXUS_API_URL_ARG,
|
|
482
|
+
json: JSON_ARG
|
|
483
|
+
},
|
|
484
|
+
async run({ args }) {
|
|
485
|
+
await runCloudRestore(args);
|
|
486
|
+
}
|
|
487
|
+
});
|
|
488
|
+
var verifyVaultSubCommand = defineCommand({
|
|
489
|
+
meta: {
|
|
490
|
+
name: "verify",
|
|
491
|
+
description: "Integrity check across machines: SQLite integrity of this store, its per-table counts and keyed hashes against the cloud's newest snapshot, and every device's newest snapshot against it. Verdict: match, ahead, behind, diverged, empty, or untrusted (the newest snapshot's signature does not verify)."
|
|
492
|
+
},
|
|
493
|
+
args: { scope: SCOPE_ARG, "api-url": NEXUS_API_URL_ARG, json: JSON_ARG },
|
|
494
|
+
async run({ args }) {
|
|
495
|
+
await runCloudVerify(args);
|
|
496
|
+
}
|
|
497
|
+
});
|
|
498
|
+
var vaultSubCommand = defineCommand({
|
|
499
|
+
meta: {
|
|
500
|
+
name: "vault",
|
|
501
|
+
description: "The store's cloud vault: snapshot lineage (newest first), the last push of each device, tables changed since this machine's last sync, and who holds the write lease until when."
|
|
502
|
+
},
|
|
503
|
+
args: { scope: SCOPE_ARG, "api-url": NEXUS_API_URL_ARG, json: JSON_ARG },
|
|
504
|
+
async run({ args }) {
|
|
505
|
+
await runCloudVault(args);
|
|
506
|
+
}
|
|
507
|
+
});
|
|
508
|
+
var leaseSubCommand = defineCommand({
|
|
509
|
+
meta: {
|
|
510
|
+
name: "lease",
|
|
511
|
+
description: "Hand the write lease back so another device can push: cleo cloud lease release."
|
|
512
|
+
},
|
|
513
|
+
args: {
|
|
514
|
+
action: { type: "positional", description: "'release'.", required: false },
|
|
515
|
+
scope: SCOPE_ARG,
|
|
516
|
+
"api-url": NEXUS_API_URL_ARG,
|
|
517
|
+
json: JSON_ARG
|
|
518
|
+
},
|
|
519
|
+
async run({ args }) {
|
|
520
|
+
await runCloudLease(args);
|
|
521
|
+
}
|
|
522
|
+
});
|
|
523
|
+
var activitySubCommand = defineCommand({
|
|
524
|
+
meta: {
|
|
525
|
+
name: "activity",
|
|
526
|
+
description: "What this account's devices did on Cleo Nexus and when (snapshots pushed or refused, leases taken, forced or released, projects linked, devices enrolled), newest first."
|
|
527
|
+
},
|
|
528
|
+
args: {
|
|
529
|
+
limit: { type: "string", description: "Events to show (1-200, default 50)." },
|
|
530
|
+
before: { type: "string", description: "Older page: the nextBefore of a previous call." },
|
|
531
|
+
project: { type: "string", description: "Only events about this server project id." },
|
|
532
|
+
device: {
|
|
533
|
+
type: "string",
|
|
534
|
+
description: "Only events by this device id (see `cleo cloud devices`)."
|
|
535
|
+
},
|
|
536
|
+
"api-url": NEXUS_API_URL_ARG,
|
|
537
|
+
json: JSON_ARG
|
|
538
|
+
},
|
|
539
|
+
async run({ args }) {
|
|
540
|
+
await runCloudActivity(args);
|
|
541
|
+
}
|
|
542
|
+
});
|
|
543
|
+
var cloudCommand = defineCommand({
|
|
544
|
+
meta: {
|
|
545
|
+
name: "cloud",
|
|
546
|
+
description: "Cleo Nexus with the device credential: status (one-call verification), whoami, devices, projects [show], activity; the encrypted vault: push, pull, restore, verify, vault, lease release."
|
|
547
|
+
},
|
|
548
|
+
subCommands: {
|
|
549
|
+
status: statusSubCommand,
|
|
550
|
+
whoami: whoamiSubCommand,
|
|
551
|
+
devices: devicesSubCommand,
|
|
552
|
+
projects: projectsSubCommand,
|
|
553
|
+
activity: activitySubCommand,
|
|
554
|
+
push: pushSubCommand,
|
|
555
|
+
pull: pullSubCommand,
|
|
556
|
+
restore: restoreSubCommand,
|
|
557
|
+
verify: verifyVaultSubCommand,
|
|
558
|
+
vault: vaultSubCommand,
|
|
559
|
+
lease: leaseSubCommand
|
|
560
|
+
}
|
|
561
|
+
});
|
|
562
|
+
export {
|
|
563
|
+
cloudCommand
|
|
564
|
+
};
|
|
565
|
+
//# sourceMappingURL=cloud-PPQ4O5TX.js.map
|