@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,94 @@
|
|
|
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
|
+
dispatchFromCli
|
|
18
|
+
} from "./chunk-L7ONYSV6.js";
|
|
19
|
+
import "./chunk-6N6WGLXE.js";
|
|
20
|
+
import "./chunk-4VASFLUW.js";
|
|
21
|
+
import {
|
|
22
|
+
defineCommand,
|
|
23
|
+
showUsage
|
|
24
|
+
} from "./chunk-PKKZPOOP.js";
|
|
25
|
+
import "./chunk-QKMBWYAS.js";
|
|
26
|
+
import {
|
|
27
|
+
cliOutput
|
|
28
|
+
} from "./chunk-4RGSNUUP.js";
|
|
29
|
+
import "./chunk-6JSJNYH2.js";
|
|
30
|
+
import "./chunk-D7BAQNV2.js";
|
|
31
|
+
import "./chunk-TYC7G5LF.js";
|
|
32
|
+
|
|
33
|
+
// packages/cleo/src/cli/commands/sequence.ts
|
|
34
|
+
import { getProjectRoot } from "@cleocode/core/internal";
|
|
35
|
+
var showCommand = defineCommand({
|
|
36
|
+
meta: { name: "show", description: "Display current sequence state" },
|
|
37
|
+
async run() {
|
|
38
|
+
await dispatchFromCli(
|
|
39
|
+
"query",
|
|
40
|
+
"admin",
|
|
41
|
+
"sequence",
|
|
42
|
+
{ action: "show" },
|
|
43
|
+
{ command: "sequence" }
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
var checkCommand = defineCommand({
|
|
48
|
+
meta: { name: "check", description: "Verify counter >= max(todo + archive)" },
|
|
49
|
+
async run() {
|
|
50
|
+
await dispatchFromCli(
|
|
51
|
+
"query",
|
|
52
|
+
"admin",
|
|
53
|
+
"sequence",
|
|
54
|
+
{ action: "check" },
|
|
55
|
+
{ command: "sequence" }
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
var repairCommand = defineCommand({
|
|
60
|
+
meta: { name: "repair", description: "Reset counter to max + 1 if behind" },
|
|
61
|
+
async run() {
|
|
62
|
+
const { repairSequence } = await import("@cleocode/core/internal");
|
|
63
|
+
const projectRoot = getProjectRoot();
|
|
64
|
+
const repair = await repairSequence(projectRoot);
|
|
65
|
+
const result = {
|
|
66
|
+
repaired: repair.repaired,
|
|
67
|
+
message: repair.message,
|
|
68
|
+
counter: repair.counter,
|
|
69
|
+
oldCounter: repair.oldCounter,
|
|
70
|
+
newCounter: repair.newCounter
|
|
71
|
+
};
|
|
72
|
+
cliOutput(result, { command: "sequence", operation: "admin.sequence.repair" });
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
var sequenceCommand = defineCommand({
|
|
76
|
+
meta: {
|
|
77
|
+
name: "sequence",
|
|
78
|
+
description: "Inspect and manage task ID sequence (show/check/repair)"
|
|
79
|
+
},
|
|
80
|
+
subCommands: {
|
|
81
|
+
show: showCommand,
|
|
82
|
+
check: checkCommand,
|
|
83
|
+
repair: repairCommand
|
|
84
|
+
},
|
|
85
|
+
async run({ cmd, rawArgs }) {
|
|
86
|
+
const firstArg = rawArgs?.find((a) => !a.startsWith("-"));
|
|
87
|
+
if (firstArg && cmd.subCommands && firstArg in cmd.subCommands) return;
|
|
88
|
+
await showUsage(cmd);
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
export {
|
|
92
|
+
sequenceCommand
|
|
93
|
+
};
|
|
94
|
+
//# sourceMappingURL=sequence-H7DSAJPF.js.map
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
(() => {
|
|
2
|
+
const _installed = Symbol.for('cleocode.cli.sqliteWarningFilter');
|
|
3
|
+
if (globalThis[_installed]) return;
|
|
4
|
+
globalThis[_installed] = true;
|
|
5
|
+
const _origEmitWarning = process.emitWarning;
|
|
6
|
+
process.emitWarning = function(warning, type, code, ctor) {
|
|
7
|
+
if (typeof warning === 'object' && warning.name === 'ExperimentalWarning' && typeof warning.message === 'string' && /SQLite is an experimental feature/i.test(warning.message)) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
if (typeof warning === 'string' && /SQLite is an experimental feature/i.test(warning)) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
return _origEmitWarning.call(process, warning, type, code, ctor);
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
import "./chunk-C3B7C43W.js";
|
|
17
|
+
import {
|
|
18
|
+
dispatchFromCli
|
|
19
|
+
} from "./chunk-L7ONYSV6.js";
|
|
20
|
+
import "./chunk-6N6WGLXE.js";
|
|
21
|
+
import "./chunk-4VASFLUW.js";
|
|
22
|
+
import {
|
|
23
|
+
defineCommand,
|
|
24
|
+
showUsage
|
|
25
|
+
} from "./chunk-PKKZPOOP.js";
|
|
26
|
+
import "./chunk-QKMBWYAS.js";
|
|
27
|
+
import "./chunk-4RGSNUUP.js";
|
|
28
|
+
import "./chunk-6JSJNYH2.js";
|
|
29
|
+
import "./chunk-D7BAQNV2.js";
|
|
30
|
+
import "./chunk-TYC7G5LF.js";
|
|
31
|
+
|
|
32
|
+
// packages/cleo/src/cli/commands/service.ts
|
|
33
|
+
function makeServiceSubcommand(opts) {
|
|
34
|
+
const mergedArgs = {
|
|
35
|
+
...opts.args,
|
|
36
|
+
json: { type: "boolean", description: "Output as JSON" }
|
|
37
|
+
};
|
|
38
|
+
return defineCommand({
|
|
39
|
+
meta: { name: opts.name, description: opts.description },
|
|
40
|
+
args: mergedArgs,
|
|
41
|
+
async run({ args }) {
|
|
42
|
+
const params = opts.paramBuilder(args);
|
|
43
|
+
await dispatchFromCli(opts.gateway, "service", opts.operation, params, {
|
|
44
|
+
command: `service-${opts.name}`,
|
|
45
|
+
operation: `service.${opts.operation}`
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
function str(v) {
|
|
51
|
+
return typeof v === "string" && v !== "" ? v : void 0;
|
|
52
|
+
}
|
|
53
|
+
var connectCommand = makeServiceSubcommand({
|
|
54
|
+
name: "connect",
|
|
55
|
+
description: "Connect a service credential. Token-direct: `--token <t>` (browser-free). OAuth paste-code: `--paste-code <code> --code-verifier <v> --redirect-uri <u>`. The secret is encrypted at rest and NEVER printed.",
|
|
56
|
+
args: {
|
|
57
|
+
provider: {
|
|
58
|
+
type: "positional",
|
|
59
|
+
description: "Service provider key (e.g. github)",
|
|
60
|
+
required: true
|
|
61
|
+
},
|
|
62
|
+
label: {
|
|
63
|
+
type: "string",
|
|
64
|
+
description: "Connection label, unique within provider (default 'default')"
|
|
65
|
+
},
|
|
66
|
+
token: {
|
|
67
|
+
type: "string",
|
|
68
|
+
description: "Direct access token to store (token-direct mode). SECRET."
|
|
69
|
+
},
|
|
70
|
+
"refresh-token": {
|
|
71
|
+
type: "string",
|
|
72
|
+
description: "Optional refresh token paired with --token. SECRET."
|
|
73
|
+
},
|
|
74
|
+
"expires-at": {
|
|
75
|
+
type: "string",
|
|
76
|
+
description: "ISO-8601 access-token expiry (token-direct mode)."
|
|
77
|
+
},
|
|
78
|
+
"paste-code": {
|
|
79
|
+
type: "string",
|
|
80
|
+
description: "OAuth authorization code from the redirect callback."
|
|
81
|
+
},
|
|
82
|
+
"code-verifier": {
|
|
83
|
+
type: "string",
|
|
84
|
+
description: "PKCE code verifier from `cleo service auth-url`."
|
|
85
|
+
},
|
|
86
|
+
"redirect-uri": { type: "string", description: "Redirect URI used in auth-url; must match." }
|
|
87
|
+
},
|
|
88
|
+
gateway: "mutate",
|
|
89
|
+
operation: "connect",
|
|
90
|
+
paramBuilder: (a) => ({
|
|
91
|
+
provider: a["provider"],
|
|
92
|
+
...str(a["label"]) !== void 0 ? { label: str(a["label"]) } : {},
|
|
93
|
+
...str(a["token"]) !== void 0 ? { token: str(a["token"]) } : {},
|
|
94
|
+
...str(a["refresh-token"]) !== void 0 ? { refreshToken: str(a["refresh-token"]) } : {},
|
|
95
|
+
...str(a["expires-at"]) !== void 0 ? { expiresAt: str(a["expires-at"]) } : {},
|
|
96
|
+
...str(a["paste-code"]) !== void 0 ? { code: str(a["paste-code"]) } : {},
|
|
97
|
+
...str(a["code-verifier"]) !== void 0 ? { codeVerifier: str(a["code-verifier"]) } : {},
|
|
98
|
+
...str(a["redirect-uri"]) !== void 0 ? { redirectUri: str(a["redirect-uri"]) } : {}
|
|
99
|
+
})
|
|
100
|
+
});
|
|
101
|
+
var listCommand = makeServiceSubcommand({
|
|
102
|
+
name: "list",
|
|
103
|
+
description: "List service connections as NON-SECRET views (provider/label/status/scopes/expires/hasCredentials). The decrypted token is never shown.",
|
|
104
|
+
args: {
|
|
105
|
+
provider: { type: "positional", description: "Optional provider filter", required: false }
|
|
106
|
+
},
|
|
107
|
+
gateway: "query",
|
|
108
|
+
operation: "list",
|
|
109
|
+
paramBuilder: (a) => ({
|
|
110
|
+
...str(a["provider"]) !== void 0 ? { provider: str(a["provider"]) } : {}
|
|
111
|
+
})
|
|
112
|
+
});
|
|
113
|
+
var revokeCommand = makeServiceSubcommand({
|
|
114
|
+
name: "revoke",
|
|
115
|
+
description: "Delete a service connection and cascade its agent_service_grants.",
|
|
116
|
+
args: {
|
|
117
|
+
provider: { type: "positional", description: "Service provider key", required: true },
|
|
118
|
+
label: { type: "positional", description: "Connection label to revoke", required: true }
|
|
119
|
+
},
|
|
120
|
+
gateway: "mutate",
|
|
121
|
+
operation: "revoke",
|
|
122
|
+
paramBuilder: (a) => ({ provider: a["provider"], label: a["label"] })
|
|
123
|
+
});
|
|
124
|
+
var statusCommand = makeServiceSubcommand({
|
|
125
|
+
name: "status",
|
|
126
|
+
description: "Report connection health \u2014 each connection adds `expired` + `needsRefresh` booleans from expires_at. NON-SECRET.",
|
|
127
|
+
args: {
|
|
128
|
+
provider: { type: "positional", description: "Optional provider filter", required: false }
|
|
129
|
+
},
|
|
130
|
+
gateway: "query",
|
|
131
|
+
operation: "status",
|
|
132
|
+
paramBuilder: (a) => ({
|
|
133
|
+
...str(a["provider"]) !== void 0 ? { provider: str(a["provider"]) } : {}
|
|
134
|
+
})
|
|
135
|
+
});
|
|
136
|
+
var serviceCommand = defineCommand({
|
|
137
|
+
meta: {
|
|
138
|
+
name: "service",
|
|
139
|
+
description: "Connect, list, revoke, and inspect service-vault credentials (github, google, \u2026)"
|
|
140
|
+
},
|
|
141
|
+
subCommands: {
|
|
142
|
+
connect: connectCommand,
|
|
143
|
+
list: listCommand,
|
|
144
|
+
revoke: revokeCommand,
|
|
145
|
+
status: statusCommand
|
|
146
|
+
},
|
|
147
|
+
async run({ cmd, rawArgs }) {
|
|
148
|
+
const firstArg = rawArgs?.find((a) => !a.startsWith("-"));
|
|
149
|
+
if (firstArg && cmd.subCommands && firstArg in cmd.subCommands) return;
|
|
150
|
+
await showUsage(cmd);
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
export {
|
|
154
|
+
serviceCommand
|
|
155
|
+
};
|
|
156
|
+
//# sourceMappingURL=service-EK5MGB2D.js.map
|
|
@@ -0,0 +1,437 @@
|
|
|
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
|
+
errorResult,
|
|
18
|
+
unsupportedOp,
|
|
19
|
+
wrapResult
|
|
20
|
+
} from "./chunk-XHRZ7OYZ.js";
|
|
21
|
+
|
|
22
|
+
// packages/cleo/src/dispatch/domains/service.ts
|
|
23
|
+
import {
|
|
24
|
+
connectService,
|
|
25
|
+
deleteConnectionCascade,
|
|
26
|
+
listConnections
|
|
27
|
+
} from "@cleocode/core";
|
|
28
|
+
import {
|
|
29
|
+
buildAuthUrl,
|
|
30
|
+
exchangeCode,
|
|
31
|
+
selfHealConnection
|
|
32
|
+
} from "@cleocode/core/internal";
|
|
33
|
+
var ServiceHandler = class {
|
|
34
|
+
/**
|
|
35
|
+
* Handle service queries.
|
|
36
|
+
*
|
|
37
|
+
* Supported: `auth-url` — build a PKCE OAuth authorization URL. The result
|
|
38
|
+
* carries the `codeVerifier` + `state` the caller round-trips into `exchange`;
|
|
39
|
+
* these are NOT persisted secrets (they are short-lived flow material the user
|
|
40
|
+
* already controls), so returning them is the contract of the verb.
|
|
41
|
+
*/
|
|
42
|
+
async query(operation, params) {
|
|
43
|
+
const startTime = Date.now();
|
|
44
|
+
switch (operation) {
|
|
45
|
+
case "auth-url": {
|
|
46
|
+
const provider = typeof params?.provider === "string" ? params.provider : void 0;
|
|
47
|
+
if (!provider) {
|
|
48
|
+
return errorResult(
|
|
49
|
+
"query",
|
|
50
|
+
"service",
|
|
51
|
+
operation,
|
|
52
|
+
"E_INVALID_INPUT",
|
|
53
|
+
"provider is required",
|
|
54
|
+
startTime
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
const opts = {
|
|
58
|
+
...typeof params?.state === "string" ? { state: params.state } : {},
|
|
59
|
+
...typeof params?.scope === "string" ? { scope: params.scope } : {},
|
|
60
|
+
...typeof params?.redirectUri === "string" ? { redirectUri: params.redirectUri } : {}
|
|
61
|
+
};
|
|
62
|
+
try {
|
|
63
|
+
const result = await buildAuthUrl(provider, opts);
|
|
64
|
+
return wrapResult(
|
|
65
|
+
{ success: true, data: result },
|
|
66
|
+
"query",
|
|
67
|
+
"service",
|
|
68
|
+
operation,
|
|
69
|
+
startTime
|
|
70
|
+
);
|
|
71
|
+
} catch (err) {
|
|
72
|
+
return errorResult(
|
|
73
|
+
"query",
|
|
74
|
+
"service",
|
|
75
|
+
operation,
|
|
76
|
+
"E_INTERNAL",
|
|
77
|
+
messageOf(err),
|
|
78
|
+
startTime
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
case "list":
|
|
83
|
+
return this.list(params, startTime);
|
|
84
|
+
case "status":
|
|
85
|
+
return this.status(params, startTime);
|
|
86
|
+
default:
|
|
87
|
+
return unsupportedOp("query", "service", operation, startTime);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
/** Delegate `service.list` to CORE `listConnections` — redacted views only. */
|
|
91
|
+
async list(params, startTime) {
|
|
92
|
+
const provider = typeof params?.provider === "string" ? params.provider : void 0;
|
|
93
|
+
try {
|
|
94
|
+
const connections = await listConnections(provider);
|
|
95
|
+
return wrapResult(
|
|
96
|
+
{ success: true, data: { connections } },
|
|
97
|
+
"query",
|
|
98
|
+
"service",
|
|
99
|
+
"list",
|
|
100
|
+
startTime
|
|
101
|
+
);
|
|
102
|
+
} catch (err) {
|
|
103
|
+
return errorResult("query", "service", "list", "E_INTERNAL", messageOf(err), startTime);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/** Delegate `service.status` to CORE `listConnections` + map to health views. */
|
|
107
|
+
async status(params, startTime) {
|
|
108
|
+
const provider = typeof params?.provider === "string" ? params.provider : void 0;
|
|
109
|
+
try {
|
|
110
|
+
const views = await listConnections(provider);
|
|
111
|
+
const connections = views.map((v) => toHealthView(v));
|
|
112
|
+
return wrapResult(
|
|
113
|
+
{ success: true, data: { connections } },
|
|
114
|
+
"query",
|
|
115
|
+
"service",
|
|
116
|
+
"status",
|
|
117
|
+
startTime
|
|
118
|
+
);
|
|
119
|
+
} catch (err) {
|
|
120
|
+
return errorResult("query", "service", "status", "E_INTERNAL", messageOf(err), startTime);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Handle service mutations.
|
|
125
|
+
*
|
|
126
|
+
* Supported: `exchange` (persist tokens), `refresh` (renew tokens),
|
|
127
|
+
* `self-heal` (resolve + transparent refresh). All delegate to CORE and return
|
|
128
|
+
* the NON-SECRET result — the plaintext token NEVER crosses this boundary.
|
|
129
|
+
*/
|
|
130
|
+
async mutate(operation, params) {
|
|
131
|
+
const startTime = Date.now();
|
|
132
|
+
switch (operation) {
|
|
133
|
+
case "connect":
|
|
134
|
+
return this.connect(params, startTime);
|
|
135
|
+
case "exchange":
|
|
136
|
+
return this.exchange(params, startTime);
|
|
137
|
+
case "refresh":
|
|
138
|
+
return this.refresh(params, startTime);
|
|
139
|
+
case "revoke":
|
|
140
|
+
return this.revoke(params, startTime);
|
|
141
|
+
case "self-heal":
|
|
142
|
+
return this.selfHeal(params, startTime);
|
|
143
|
+
default:
|
|
144
|
+
return unsupportedOp("mutate", "service", operation, startTime);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Delegate `service.connect` — store a credential. Two modes:
|
|
149
|
+
* - token-direct: `token` (+ optional refreshToken/expiresAt/scopes) →
|
|
150
|
+
* CORE `connectService` encrypts + persists the blob.
|
|
151
|
+
* - paste-code: `code` + `codeVerifier` + `redirectUri` → CORE `exchangeCode`
|
|
152
|
+
* runs the OAuth dance. The plaintext token NEVER crosses this boundary.
|
|
153
|
+
*/
|
|
154
|
+
async connect(params, startTime) {
|
|
155
|
+
const provider = typeof params?.provider === "string" ? params.provider : void 0;
|
|
156
|
+
if (!provider) {
|
|
157
|
+
return errorResult(
|
|
158
|
+
"mutate",
|
|
159
|
+
"service",
|
|
160
|
+
"connect",
|
|
161
|
+
"E_INVALID_INPUT",
|
|
162
|
+
"provider is required",
|
|
163
|
+
startTime
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
const label = typeof params?.label === "string" ? params.label : "default";
|
|
167
|
+
const token = typeof params?.token === "string" ? params.token : void 0;
|
|
168
|
+
const code = typeof params?.code === "string" ? params.code : void 0;
|
|
169
|
+
try {
|
|
170
|
+
if (token !== void 0) {
|
|
171
|
+
const connectionId = await connectService(
|
|
172
|
+
buildConnectParams(provider, label, params, token)
|
|
173
|
+
);
|
|
174
|
+
return wrapResult(
|
|
175
|
+
{
|
|
176
|
+
success: true,
|
|
177
|
+
data: {
|
|
178
|
+
count: 1,
|
|
179
|
+
created: [String(connectionId)],
|
|
180
|
+
connection: { connectionId, provider, label, expiresAt: expiryOf(params) }
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"mutate",
|
|
184
|
+
"service",
|
|
185
|
+
"connect",
|
|
186
|
+
startTime
|
|
187
|
+
);
|
|
188
|
+
}
|
|
189
|
+
if (code !== void 0) {
|
|
190
|
+
const opts = buildExchangeOpts(params, code, label);
|
|
191
|
+
if (opts === null) {
|
|
192
|
+
return errorResult(
|
|
193
|
+
"mutate",
|
|
194
|
+
"service",
|
|
195
|
+
"connect",
|
|
196
|
+
"E_INVALID_INPUT",
|
|
197
|
+
"paste-code mode requires --code, --code-verifier, and --redirect-uri",
|
|
198
|
+
startTime
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
const result = await exchangeCode(provider, opts);
|
|
202
|
+
return wrapResult(
|
|
203
|
+
{
|
|
204
|
+
success: true,
|
|
205
|
+
data: { count: 1, created: [String(result.connectionId)], connection: result }
|
|
206
|
+
},
|
|
207
|
+
"mutate",
|
|
208
|
+
"service",
|
|
209
|
+
"connect",
|
|
210
|
+
startTime
|
|
211
|
+
);
|
|
212
|
+
}
|
|
213
|
+
return errorResult(
|
|
214
|
+
"mutate",
|
|
215
|
+
"service",
|
|
216
|
+
"connect",
|
|
217
|
+
"E_INVALID_INPUT",
|
|
218
|
+
"connect requires either --token (token-direct) or --code + --code-verifier + --redirect-uri (paste-code)",
|
|
219
|
+
startTime
|
|
220
|
+
);
|
|
221
|
+
} catch (err) {
|
|
222
|
+
return errorResult("mutate", "service", "connect", "E_INTERNAL", messageOf(err), startTime);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
/** Delegate `service.revoke` to CORE `deleteConnectionCascade` (hard delete + cascade). */
|
|
226
|
+
async revoke(params, startTime) {
|
|
227
|
+
const provider = typeof params?.provider === "string" ? params.provider : void 0;
|
|
228
|
+
const label = typeof params?.label === "string" ? params.label : void 0;
|
|
229
|
+
if (!provider || !label) {
|
|
230
|
+
return errorResult(
|
|
231
|
+
"mutate",
|
|
232
|
+
"service",
|
|
233
|
+
"revoke",
|
|
234
|
+
"E_INVALID_INPUT",
|
|
235
|
+
"provider and label are required",
|
|
236
|
+
startTime
|
|
237
|
+
);
|
|
238
|
+
}
|
|
239
|
+
try {
|
|
240
|
+
const result = await deleteConnectionCascade(provider, label);
|
|
241
|
+
return wrapResult(
|
|
242
|
+
{
|
|
243
|
+
success: true,
|
|
244
|
+
data: {
|
|
245
|
+
count: result.deleted ? 1 : 0,
|
|
246
|
+
deleted: result.deleted ? [`${provider}:${label}`] : [],
|
|
247
|
+
grantsRemoved: result.grantsRemoved
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
"mutate",
|
|
251
|
+
"service",
|
|
252
|
+
"revoke",
|
|
253
|
+
startTime
|
|
254
|
+
);
|
|
255
|
+
} catch (err) {
|
|
256
|
+
return errorResult("mutate", "service", "revoke", "E_INTERNAL", messageOf(err), startTime);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
/** Delegate `service.exchange` to CORE `exchangeCode`. */
|
|
260
|
+
async exchange(params, startTime) {
|
|
261
|
+
const provider = typeof params?.provider === "string" ? params.provider : void 0;
|
|
262
|
+
const code = typeof params?.code === "string" ? params.code : void 0;
|
|
263
|
+
const codeVerifier = typeof params?.codeVerifier === "string" ? params.codeVerifier : void 0;
|
|
264
|
+
const redirectUri = typeof params?.redirectUri === "string" ? params.redirectUri : void 0;
|
|
265
|
+
if (!provider || !code || !codeVerifier || !redirectUri) {
|
|
266
|
+
return errorResult(
|
|
267
|
+
"mutate",
|
|
268
|
+
"service",
|
|
269
|
+
"exchange",
|
|
270
|
+
"E_INVALID_INPUT",
|
|
271
|
+
"provider, code, codeVerifier, redirectUri are required",
|
|
272
|
+
startTime
|
|
273
|
+
);
|
|
274
|
+
}
|
|
275
|
+
const opts = {
|
|
276
|
+
code,
|
|
277
|
+
codeVerifier,
|
|
278
|
+
redirectUri,
|
|
279
|
+
...typeof params?.label === "string" ? { label: params.label } : {}
|
|
280
|
+
};
|
|
281
|
+
try {
|
|
282
|
+
const result = await exchangeCode(provider, opts);
|
|
283
|
+
return wrapResult(
|
|
284
|
+
{
|
|
285
|
+
success: true,
|
|
286
|
+
data: { count: 1, created: [String(result.connectionId)], connection: result }
|
|
287
|
+
},
|
|
288
|
+
"mutate",
|
|
289
|
+
"service",
|
|
290
|
+
"exchange",
|
|
291
|
+
startTime
|
|
292
|
+
);
|
|
293
|
+
} catch (err) {
|
|
294
|
+
return errorResult("mutate", "service", "exchange", "E_INTERNAL", messageOf(err), startTime);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
/** Delegate `service.refresh` to CORE `refreshAccessToken` via the self-heal persist path. */
|
|
298
|
+
async refresh(params, startTime) {
|
|
299
|
+
const agentId = typeof params?.agentId === "string" ? params.agentId : void 0;
|
|
300
|
+
const provider = typeof params?.provider === "string" ? params.provider : void 0;
|
|
301
|
+
const label = typeof params?.label === "string" ? params.label : void 0;
|
|
302
|
+
if (!agentId || !provider || !label) {
|
|
303
|
+
return errorResult(
|
|
304
|
+
"mutate",
|
|
305
|
+
"service",
|
|
306
|
+
"refresh",
|
|
307
|
+
"E_INVALID_INPUT",
|
|
308
|
+
"agentId, provider, label are required",
|
|
309
|
+
startTime
|
|
310
|
+
);
|
|
311
|
+
}
|
|
312
|
+
try {
|
|
313
|
+
const result = await selfHealConnection({
|
|
314
|
+
agentId,
|
|
315
|
+
provider,
|
|
316
|
+
label,
|
|
317
|
+
skewSeconds: Number.MAX_SAFE_INTEGER / 1e3,
|
|
318
|
+
...params?.approved === true ? { approved: true } : {}
|
|
319
|
+
});
|
|
320
|
+
if (result.sealed === null) {
|
|
321
|
+
return errorResult(
|
|
322
|
+
"mutate",
|
|
323
|
+
"service",
|
|
324
|
+
"refresh",
|
|
325
|
+
"E_NOT_FOUND",
|
|
326
|
+
"connection not found, not active, or access denied",
|
|
327
|
+
startTime
|
|
328
|
+
);
|
|
329
|
+
}
|
|
330
|
+
return wrapResult(
|
|
331
|
+
{
|
|
332
|
+
success: true,
|
|
333
|
+
data: {
|
|
334
|
+
count: 1,
|
|
335
|
+
updated: [`${provider}:${label}`],
|
|
336
|
+
refreshed: result.refreshed,
|
|
337
|
+
expiresAt: result.expiresAt
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
"mutate",
|
|
341
|
+
"service",
|
|
342
|
+
"refresh",
|
|
343
|
+
startTime
|
|
344
|
+
);
|
|
345
|
+
} catch (err) {
|
|
346
|
+
return errorResult("mutate", "service", "refresh", "E_INTERNAL", messageOf(err), startTime);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
/** Delegate `service.self-heal` to CORE `selfHealConnection`. */
|
|
350
|
+
async selfHeal(params, startTime) {
|
|
351
|
+
const agentId = typeof params?.agentId === "string" ? params.agentId : void 0;
|
|
352
|
+
const provider = typeof params?.provider === "string" ? params.provider : void 0;
|
|
353
|
+
const label = typeof params?.label === "string" ? params.label : void 0;
|
|
354
|
+
if (!agentId || !provider || !label) {
|
|
355
|
+
return errorResult(
|
|
356
|
+
"mutate",
|
|
357
|
+
"service",
|
|
358
|
+
"self-heal",
|
|
359
|
+
"E_INVALID_INPUT",
|
|
360
|
+
"agentId, provider, label are required",
|
|
361
|
+
startTime
|
|
362
|
+
);
|
|
363
|
+
}
|
|
364
|
+
try {
|
|
365
|
+
const result = await selfHealConnection({
|
|
366
|
+
agentId,
|
|
367
|
+
provider,
|
|
368
|
+
label,
|
|
369
|
+
...params?.approved === true ? { approved: true } : {}
|
|
370
|
+
});
|
|
371
|
+
return wrapResult(
|
|
372
|
+
{
|
|
373
|
+
success: true,
|
|
374
|
+
data: {
|
|
375
|
+
count: result.refreshed ? 1 : 0,
|
|
376
|
+
updated: result.refreshed ? [`${provider}:${label}`] : [],
|
|
377
|
+
resolved: result.sealed !== null,
|
|
378
|
+
refreshed: result.refreshed,
|
|
379
|
+
expiresAt: result.expiresAt
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
"mutate",
|
|
383
|
+
"service",
|
|
384
|
+
"self-heal",
|
|
385
|
+
startTime
|
|
386
|
+
);
|
|
387
|
+
} catch (err) {
|
|
388
|
+
return errorResult("mutate", "service", "self-heal", "E_INTERNAL", messageOf(err), startTime);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
/** Return declared operations for introspection and registry validation. */
|
|
392
|
+
getSupportedOperations() {
|
|
393
|
+
return {
|
|
394
|
+
query: ["auth-url", "list", "status"],
|
|
395
|
+
mutate: ["connect", "exchange", "refresh", "revoke", "self-heal"]
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
};
|
|
399
|
+
function messageOf(err) {
|
|
400
|
+
return err instanceof Error ? err.message : String(err);
|
|
401
|
+
}
|
|
402
|
+
function expiryOf(params) {
|
|
403
|
+
return typeof params?.expiresAt === "string" ? params.expiresAt : null;
|
|
404
|
+
}
|
|
405
|
+
function buildConnectParams(provider, label, params, token) {
|
|
406
|
+
const refreshToken = typeof params?.refreshToken === "string" ? params.refreshToken : void 0;
|
|
407
|
+
const scopes = Array.isArray(params?.scopes) ? params.scopes.filter((s) => typeof s === "string") : void 0;
|
|
408
|
+
return {
|
|
409
|
+
provider,
|
|
410
|
+
label,
|
|
411
|
+
tokens: { accessToken: token, ...refreshToken !== void 0 ? { refreshToken } : {} },
|
|
412
|
+
...scopes !== void 0 ? { scopes } : {},
|
|
413
|
+
...typeof params?.expiresAt === "string" ? { expiresAt: params.expiresAt } : {}
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
function buildExchangeOpts(params, code, label) {
|
|
417
|
+
const codeVerifier = typeof params?.codeVerifier === "string" ? params.codeVerifier : void 0;
|
|
418
|
+
const redirectUri = typeof params?.redirectUri === "string" ? params.redirectUri : void 0;
|
|
419
|
+
if (codeVerifier === void 0 || redirectUri === void 0) return null;
|
|
420
|
+
return { code, codeVerifier, redirectUri, label };
|
|
421
|
+
}
|
|
422
|
+
function toHealthView(v) {
|
|
423
|
+
const expired = v.status === "expired" || v.expiresAt !== null && Number.isFinite(Date.parse(v.expiresAt)) && Date.parse(v.expiresAt) <= Date.now();
|
|
424
|
+
return {
|
|
425
|
+
provider: v.provider,
|
|
426
|
+
label: v.label,
|
|
427
|
+
status: v.status,
|
|
428
|
+
expiresAt: v.expiresAt,
|
|
429
|
+
expired,
|
|
430
|
+
needsRefresh: expired && v.hasCredentials,
|
|
431
|
+
hasCredentials: v.hasCredentials
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
export {
|
|
435
|
+
ServiceHandler
|
|
436
|
+
};
|
|
437
|
+
//# sourceMappingURL=service-GLOMZWPQ.js.map
|