autohand-cli 0.7.8 → 0.7.10
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 +19 -0
- package/dist/{AutomodeManager-YVCJXOMQ.js → AutomodeManager-NGRAO2MH.js} +35 -8
- package/dist/{AutomodeManager-HV6M7EAX.cjs → AutomodeManager-ZKQMBM4T.cjs} +35 -8
- package/dist/{CommunitySkillsCache-Q22FUAR5.js → CommunitySkillsCache-ILWHWE5P.js} +2 -2
- package/dist/CommunitySkillsCache-KHC6RUJW.cjs +7 -0
- package/dist/MemoryManager-6ZT7IDO5.cjs +7 -0
- package/dist/MemoryManager-AJGS5AKB.js +7 -0
- package/dist/PermissionManager-HG6W2DGU.cjs +10 -0
- package/dist/{PermissionManager-HATZKTRC.js → PermissionManager-U5OMGR3L.js} +3 -3
- package/dist/SessionManager-BJ2G6VV4.cjs +9 -0
- package/dist/{SessionManager-S5R6O3NU.js → SessionManager-ENPGYK5J.js} +2 -2
- package/dist/SkillsRegistry-6ZFOCT25.cjs +8 -0
- package/dist/{SkillsRegistry-R5WDM6T3.js → SkillsRegistry-C2SHOZ5D.js} +2 -2
- package/dist/{SyncApiClient-FAOMIZAP.js → SyncApiClient-AYXYSOJM.js} +1 -1
- package/dist/SyncApiClient-ID3KXEMA.cjs +10 -0
- package/dist/about-RGUM5QQ4.cjs +11 -0
- package/dist/about-VDR3SIHS.js +11 -0
- package/dist/add-dir-3BMVJ5H3.cjs +9 -0
- package/dist/{add-dir-PNU7AGKO.js → add-dir-RP2BL3JW.js} +2 -1
- package/dist/agents-JQ2PHCQB.js +10 -0
- package/dist/agents-RGSZ2BM3.cjs +10 -0
- package/dist/agents-new-LSJN2L2T.cjs +13 -0
- package/dist/agents-new-MZUEVKSK.js +13 -0
- package/dist/automode-DP3BMYJB.cjs +9 -0
- package/dist/{automode-QCRJSBRT.js → automode-XOF3U3OB.js} +2 -1
- package/dist/cc-2W6M7J45.cjs +8 -0
- package/dist/cc-UTTLESTY.js +8 -0
- package/dist/{chunk-B4ZPNXZE.cjs → chunk-34OGUMRO.cjs} +9 -5
- package/dist/chunk-3652ROFD.js +589 -0
- package/dist/{chunk-KNLBEUAV.cjs → chunk-3DQSBW4B.cjs} +10 -6
- package/dist/{chunk-XFPITUFJ.cjs → chunk-3S4DEIJP.cjs} +50 -8
- package/dist/{chunk-5MDDOGTD.cjs → chunk-3UNX56GC.cjs} +30 -37
- package/dist/chunk-46WX5IO2.cjs +499 -0
- package/dist/{chunk-OC5YDNFC.js → chunk-4ULBAYME.js} +42 -57
- package/dist/{chunk-VEDIYPWY.cjs → chunk-5BQ57AZC.cjs} +9 -9
- package/dist/{chunk-B5N5UAMO.cjs → chunk-5FZM7KLB.cjs} +13 -10
- package/dist/{chunk-JBKP2CLA.cjs → chunk-5NZA4UB4.cjs} +47 -47
- package/dist/{chunk-VPAN5H7Q.js → chunk-5Q3W4DEU.js} +43 -36
- package/dist/{chunk-VMMGT42E.cjs → chunk-65GTO4QM.cjs} +7 -3
- package/dist/{chunk-CXZEPTRI.js → chunk-6P3K4YUW.js} +6 -2
- package/dist/{chunk-MDWULS57.js → chunk-6UJMCWRY.js} +56 -33
- package/dist/chunk-73XIKTZL.js +124 -0
- package/dist/{chunk-23JQSCTO.js → chunk-7QNW24ZT.js} +8 -4
- package/dist/{chunk-XT4OSHSB.cjs → chunk-AEYOIPHD.cjs} +6 -2
- package/dist/chunk-ANUQFV43.cjs +589 -0
- package/dist/chunk-ATR3RORT.js +499 -0
- package/dist/{chunk-A6QBABQ7.js → chunk-B72CC4O6.js} +2 -2
- package/dist/{chunk-TAZJSKFD.js → chunk-BBIKQW66.js} +9 -5
- package/dist/{chunk-FFA4LDAO.cjs → chunk-BDIZGBDA.cjs} +8 -3
- package/dist/{chunk-3YEDXG6S.js → chunk-BG4OQUKP.js} +1 -1
- package/dist/{chunk-WIUGUR5T.js → chunk-BODVOW7B.js} +67 -16
- package/dist/{chunk-A552JHUJ.cjs → chunk-BZ73ZQTE.cjs} +34 -25
- package/dist/{chunk-YDOR2OCA.cjs → chunk-C22G4UE4.cjs} +27 -19
- package/dist/{chunk-GFJ6AETU.cjs → chunk-C2E3GJEE.cjs} +12 -9
- package/dist/{chunk-UL7YPRCU.js → chunk-C5SVIQG3.js} +10 -5
- package/dist/{chunk-6KMAJTU3.js → chunk-CUBYCLNL.js} +3 -2
- package/dist/{chunk-52MLYK5P.js → chunk-D2XFTCRP.js} +1 -1
- package/dist/{chunk-OBV3UUIL.js → chunk-DEAEO7RI.js} +1 -1
- package/dist/chunk-DMPVI3YK.cjs +400 -0
- package/dist/{chunk-C26EN22G.cjs → chunk-DUDDZRCS.cjs} +9 -5
- package/dist/{chunk-4RWTUT2Z.js → chunk-E7YL3AHT.js} +32 -23
- package/dist/{chunk-54GVL2SE.cjs → chunk-EAOEAQGF.cjs} +3 -2
- package/dist/{chunk-PU534KPO.cjs → chunk-EV53SLSB.cjs} +4 -4
- package/dist/{chunk-EDGV5BNH.js → chunk-F3EIOVSQ.js} +26 -33
- package/dist/{chunk-SFGJQPGC.cjs → chunk-FPHU2ES6.cjs} +56 -33
- package/dist/{chunk-G77ZY4QG.js → chunk-GD4AFYJ3.js} +1 -1
- package/dist/{chunk-PMMSDR44.cjs → chunk-GIZL57FE.cjs} +5 -1
- package/dist/{chunk-I4HVBWYF.js → chunk-GLAE5K5W.js} +7 -2
- package/dist/{chunk-4AMTDSQ3.cjs → chunk-HDSEJMWI.cjs} +6 -3
- package/dist/chunk-HLFZPN65.js +94 -0
- package/dist/{chunk-ZWS3KSMK.js → chunk-HQQ4NKER.js} +5 -2
- package/dist/{chunk-WBDPILKI.cjs → chunk-HVOBMOZ2.cjs} +6 -2
- package/dist/{chunk-MJFBVQHB.js → chunk-IPI3JXKP.js} +10 -7
- package/dist/chunk-IXFOH4OC.cjs +222 -0
- package/dist/chunk-JS7IPR7P.js +249 -0
- package/dist/{chunk-7TOHYAUF.cjs → chunk-KC5FPUOF.cjs} +2 -2
- package/dist/{chunk-7VW3A7DO.cjs → chunk-L42HTMMR.cjs} +2 -2
- package/dist/chunk-LGGZQTLM.cjs +209 -0
- package/dist/chunk-LOXOD4IS.cjs +8630 -0
- package/dist/chunk-MNCWB5F7.cjs +63 -0
- package/dist/{chunk-AVL4DKQO.js → chunk-MYNHJHDZ.js} +1 -1
- package/dist/{chunk-GDTZQSJ6.cjs → chunk-N4ZSG6JJ.cjs} +2 -2
- package/dist/chunk-NCC6ETZS.js +362 -0
- package/dist/chunk-NF7RIHJK.js +45 -0
- package/dist/{chunk-SYJLMBLP.cjs → chunk-NGBN2NGH.cjs} +77 -26
- package/dist/{chunk-SLISYSP4.cjs → chunk-NRORJRD4.cjs} +4 -4
- package/dist/{chunk-OTS4YFSZ.cjs → chunk-OKABWSWA.cjs} +7 -3
- package/dist/{chunk-KH7BCZJN.js → chunk-OLG7LZBD.js} +1 -1
- package/dist/{chunk-KZ7VMQTC.js → chunk-OMEH2EVE.js} +5 -1
- package/dist/{chunk-U5WIP4HS.js → chunk-P5VDZ6PV.js} +47 -5
- package/dist/{chunk-V5MTBGM4.cjs → chunk-PA2H2263.cjs} +6 -2
- package/dist/chunk-PGRH5Q77.cjs +249 -0
- package/dist/{chunk-DPJ3IIBB.js → chunk-PM62ZYXA.js} +18 -10
- package/dist/chunk-PNSRJT46.js +380 -0
- package/dist/{chunk-C3IFF3EH.cjs → chunk-PSED4Z4X.cjs} +43 -58
- package/dist/{chunk-EKY5PKQI.js → chunk-PWLLLJHU.js} +5 -1
- package/dist/{chunk-DOTAX65F.js → chunk-PYLR4J2D.js} +8 -4
- package/dist/{chunk-YWKZF2SA.js → chunk-QC6IUDDJ.js} +46 -46
- package/dist/{chunk-4M2GX7RH.cjs → chunk-QM7HZCQW.cjs} +11 -6
- package/dist/chunk-QRQ5EX7I.cjs +380 -0
- package/dist/{chunk-YDH2BMEN.js → chunk-QU64XI5X.js} +9 -6
- package/dist/{chunk-3L76MLO5.cjs → chunk-R7SDL3DJ.cjs} +27 -31
- package/dist/{chunk-WQSWU2QA.cjs → chunk-RJP3SZ7Q.cjs} +46 -255
- package/dist/{chunk-BAFJQUWR.js → chunk-RJXNNIFW.js} +18 -22
- package/dist/{chunk-YAGD43KA.cjs → chunk-S5G7OEN2.cjs} +47 -40
- package/dist/{chunk-2JPUEN44.cjs → chunk-SA4JOV4F.cjs} +61 -86
- package/dist/chunk-SAG6IY5Z.cjs +94 -0
- package/dist/chunk-TSV4LVHK.js +35 -0
- package/dist/{chunk-JHFH3N4U.cjs → chunk-TSY7JHIV.cjs} +2 -2
- package/dist/chunk-U23U52ZN.cjs +124 -0
- package/dist/chunk-UET7BDX2.js +8630 -0
- package/dist/chunk-ULQ6MDSJ.cjs +362 -0
- package/dist/{chunk-WH3D42BQ.js → chunk-UM4QEO36.js} +59 -84
- package/dist/chunk-VXCMGBXY.cjs +35 -0
- package/dist/chunk-WD5ZF6HE.js +63 -0
- package/dist/chunk-WH5RW7DV.cjs +85 -0
- package/dist/{chunk-GSOEIEOU.js → chunk-WJ276BIP.js} +5 -1
- package/dist/{chunk-P2Z6GDEN.js → chunk-WLTVF77A.js} +1 -1
- package/dist/{chunk-53BR4MUW.cjs → chunk-WOGJXDBU.cjs} +3 -3
- package/dist/{chunk-QJ53OSGF.js → chunk-WRJLBHWB.js} +6 -2
- package/dist/chunk-WYLFLZ42.js +222 -0
- package/dist/{chunk-B7EUETGY.cjs → chunk-XL77XYI2.cjs} +4 -4
- package/dist/{chunk-NI3BQXKU.js → chunk-XLI7SHCH.js} +2 -2
- package/dist/chunk-Y27LG4BQ.cjs +45 -0
- package/dist/chunk-Y6OWFIUF.js +209 -0
- package/dist/chunk-YKSSNFDZ.js +400 -0
- package/dist/{chunk-VRI7EXV6.js → chunk-YMDLUTF2.js} +5 -1
- package/dist/chunk-YVY27BJT.js +85 -0
- package/dist/{chunk-GWIAMKKF.js → chunk-ZBIBLOZL.js} +40 -249
- package/dist/completion-HVSWU5GR.cjs +13 -0
- package/dist/completion-WJ2MVNDH.js +13 -0
- package/dist/constants-RBQTR32A.cjs +20 -0
- package/dist/{constants-ZLG6M5SI.js → constants-V6J54N3X.js} +1 -1
- package/dist/export-NN7F5ANA.js +11 -0
- package/dist/export-UPS3AK2P.cjs +11 -0
- package/dist/feedback-ARI7CLVQ.js +14 -0
- package/dist/feedback-OZTPYHKJ.cjs +14 -0
- package/dist/help-4674IV4D.cjs +58 -0
- package/dist/help-ENG5KV2M.js +58 -0
- package/dist/history-2KUM6GN4.cjs +13 -0
- package/dist/history-RZFT34Q7.js +13 -0
- package/dist/hooks-7QSUBHBM.cjs +12 -0
- package/dist/hooks-S4MD4QSR.js +12 -0
- package/dist/i18n-6NKENUIV.js +32 -0
- package/dist/i18n-MXQXQOVE.cjs +32 -0
- package/dist/ide-5STDV43A.cjs +11 -0
- package/dist/ide-W2NYXOWQ.js +11 -0
- package/dist/index.cjs +18002 -13864
- package/dist/index.js +18252 -14114
- package/dist/init-FG5KEJCZ.cjs +9 -0
- package/dist/init-TV4MJDYK.js +9 -0
- package/dist/language-52Q7CSAY.cjs +16 -0
- package/dist/language-FXFDGOBF.js +16 -0
- package/dist/localProjectPermissions-2EATUDZM.cjs +17 -0
- package/dist/{localProjectPermissions-YFFAKLUZ.js → localProjectPermissions-WQYMGI42.js} +2 -2
- package/dist/login-AN42IOBK.js +18 -0
- package/dist/login-I65V4TGU.cjs +18 -0
- package/dist/logout-KK5UWGNG.js +16 -0
- package/dist/logout-VYYNWBHZ.cjs +16 -0
- package/dist/mcp-4SKTDECJ.js +15 -0
- package/dist/mcp-AGWPTMAX.cjs +15 -0
- package/dist/mcp-install-3NN2HAYR.cjs +473 -0
- package/dist/mcp-install-KTV52DQK.js +473 -0
- package/dist/memory-LG4K6XV6.cjs +9 -0
- package/dist/{memory-4GSP7NKV.js → memory-LRDK2SYC.js} +2 -1
- package/dist/model-P5D7ATE7.cjs +9 -0
- package/dist/{model-HKEFSH5E.js → model-WBFJIGUN.js} +2 -1
- package/dist/{new-EEZC4XXV.js → new-5A7RQEKI.js} +2 -1
- package/dist/new-EAATWI2G.cjs +9 -0
- package/dist/permissions-5URK6C44.js +12 -0
- package/dist/permissions-CJUDVG63.cjs +12 -0
- package/dist/plan-B3CW5DXJ.cjs +10 -0
- package/dist/plan-JFGNRL2S.js +10 -0
- package/dist/quit-A33JHDG7.cjs +9 -0
- package/dist/quit-IYBLN3DB.js +9 -0
- package/dist/resume-OPSJTCH7.cjs +12 -0
- package/dist/resume-TOWEEN5D.js +12 -0
- package/dist/search-GOLIE5BA.js +14 -0
- package/dist/search-H42HGUK5.cjs +14 -0
- package/dist/{sessions-4KXIT76T.js → sessions-B5NENDKY.js} +2 -1
- package/dist/sessions-YHAVEMWY.cjs +9 -0
- package/dist/share-2JD2AKKX.cjs +13 -0
- package/dist/share-MYGDOTQE.js +13 -0
- package/dist/{skills-3YEEODHK.js → skills-ICEQ2TNC.js} +2 -1
- package/dist/skills-LFVNZOMF.cjs +13 -0
- package/dist/{skills-install-KAXAQSN6.js → skills-install-6RN7FVCP.js} +9 -7
- package/dist/{skills-install-FTGOHOZ4.cjs → skills-install-LU6GA2WF.cjs} +14 -12
- package/dist/skills-new-5BM5PDFX.cjs +14 -0
- package/dist/skills-new-KWBWOX74.js +14 -0
- package/dist/status-M3XHJELG.cjs +10 -0
- package/dist/status-ZQDUYMKQ.js +10 -0
- package/dist/sync-6M3WRKMH.cjs +39 -0
- package/dist/sync-73D2MP65.cjs +16 -0
- package/dist/{sync-H4UHHLKU.js → sync-EXYX7HXW.js} +3 -3
- package/dist/sync-LL6M67CN.js +16 -0
- package/dist/theme-IFEI2IBJ.cjs +16 -0
- package/dist/theme-U3SKEULY.js +16 -0
- package/dist/ui/questionModal.cjs +28 -0
- package/dist/ui/questionModal.d.cts +11 -0
- package/dist/ui/questionModal.d.ts +11 -0
- package/dist/ui/questionModal.js +28 -0
- package/dist/undo-4DS67OAW.cjs +9 -0
- package/dist/undo-YMALVAPN.js +9 -0
- package/package.json +3 -2
- package/dist/CommunitySkillsCache-2BITCEAA.cjs +0 -7
- package/dist/MemoryManager-2ATHG7BH.js +0 -7
- package/dist/MemoryManager-AENCGCEW.cjs +0 -7
- package/dist/PermissionManager-6HZGTK2N.cjs +0 -10
- package/dist/SessionManager-AG4WT3DP.cjs +0 -9
- package/dist/SkillsRegistry-ZXU6YDRP.cjs +0 -8
- package/dist/SyncApiClient-UOA4VLLD.cjs +0 -10
- package/dist/add-dir-OMK3Y4DM.cjs +0 -8
- package/dist/agents-ICAC3KD3.js +0 -9
- package/dist/agents-YONWPKFS.cjs +0 -9
- package/dist/agents-new-NV557UVG.cjs +0 -10
- package/dist/agents-new-QHM3CO4B.js +0 -10
- package/dist/automode-BRHUHGXU.cjs +0 -8
- package/dist/chunk-3HPUOQJN.cjs +0 -23
- package/dist/chunk-5DN5KNXU.js +0 -81
- package/dist/chunk-7BYSXAKS.js +0 -23
- package/dist/chunk-ARVFUZOB.js +0 -736
- package/dist/chunk-BEIG7V7Q.cjs +0 -51
- package/dist/chunk-GWXXFQ3F.cjs +0 -81
- package/dist/chunk-XFQS2VGT.cjs +0 -736
- package/dist/chunk-Z3Q2AFDS.js +0 -51
- package/dist/completion-WVFWX7XQ.cjs +0 -10
- package/dist/completion-Y42FKDT3.js +0 -10
- package/dist/constants-G2PLP5HH.cjs +0 -20
- package/dist/export-BKBJ7PB2.cjs +0 -8
- package/dist/export-WJ5P6E5Z.js +0 -8
- package/dist/feedback-HZBCTSFG.js +0 -10
- package/dist/feedback-JBQ3UPGZ.cjs +0 -10
- package/dist/help-PKC6QCNG.js +0 -10
- package/dist/help-UEELQRHP.cjs +0 -10
- package/dist/hooks-G4VLYMLX.cjs +0 -9
- package/dist/hooks-LN4A6NQL.js +0 -9
- package/dist/init-DML7AOII.js +0 -8
- package/dist/init-SLLSDDJN.cjs +0 -8
- package/dist/language-KODBDE5R.js +0 -12
- package/dist/language-SJT475NW.cjs +0 -12
- package/dist/localProjectPermissions-AYQYGTOE.cjs +0 -17
- package/dist/login-TC2KROQI.js +0 -14
- package/dist/login-TYMR2ZD3.cjs +0 -14
- package/dist/logout-2ECV365P.js +0 -12
- package/dist/logout-CO3CPYZJ.cjs +0 -12
- package/dist/memory-CFNC7RJH.cjs +0 -8
- package/dist/model-TKVEJ5BC.cjs +0 -8
- package/dist/new-EB2MBQXA.cjs +0 -8
- package/dist/permissions-5MTH22EF.js +0 -9
- package/dist/permissions-IP5SITPI.cjs +0 -9
- package/dist/quit-2RYFGIJP.cjs +0 -8
- package/dist/quit-RSYIERO5.js +0 -8
- package/dist/resume-EPOEF3WV.cjs +0 -9
- package/dist/resume-LOYD5MMP.js +0 -9
- package/dist/sessions-7RTCPVNE.cjs +0 -8
- package/dist/share-APR5S2CS.cjs +0 -10
- package/dist/share-VLJFDZKR.js +0 -10
- package/dist/skills-CRM55MKM.cjs +0 -12
- package/dist/skills-new-JF4FKNUT.cjs +0 -11
- package/dist/skills-new-JYX2GBKM.js +0 -11
- package/dist/status-DAEFE7ZC.cjs +0 -9
- package/dist/status-PBFFUC4Q.js +0 -9
- package/dist/sync-3B7SNBYC.js +0 -14
- package/dist/sync-4RARBQIH.cjs +0 -39
- package/dist/sync-YZ6YZ42H.cjs +0 -14
- package/dist/theme-3XV5BWUB.js +0 -12
- package/dist/theme-Z2WS5XWZ.cjs +0 -12
- package/dist/undo-2WR2ZIEC.cjs +0 -8
- package/dist/undo-7QJBXARS.js +0 -8
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkPA2H2263cjs = require('./chunk-PA2H2263.cjs');
|
|
5
|
+
require('./chunk-LOXOD4IS.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
exports.init = _chunkPA2H2263cjs.init; exports.metadata = _chunkPA2H2263cjs.metadata;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _chunkWH5RW7DVcjs = require('./chunk-WH5RW7DV.cjs');
|
|
6
|
+
require('./chunk-RJP3SZ7Q.cjs');
|
|
7
|
+
require('./chunk-PGRH5Q77.cjs');
|
|
8
|
+
require('./chunk-QRQ5EX7I.cjs');
|
|
9
|
+
require('./chunk-Y27LG4BQ.cjs');
|
|
10
|
+
require('./chunk-GIZL57FE.cjs');
|
|
11
|
+
require('./chunk-LOXOD4IS.cjs');
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
exports.language = _chunkWH5RW7DVcjs.language; exports.languageInfo = _chunkWH5RW7DVcjs.languageInfo; exports.metadata = _chunkWH5RW7DVcjs.metadata;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
language,
|
|
3
|
+
languageInfo,
|
|
4
|
+
metadata
|
|
5
|
+
} from "./chunk-YVY27BJT.js";
|
|
6
|
+
import "./chunk-ZBIBLOZL.js";
|
|
7
|
+
import "./chunk-JS7IPR7P.js";
|
|
8
|
+
import "./chunk-PNSRJT46.js";
|
|
9
|
+
import "./chunk-NF7RIHJK.js";
|
|
10
|
+
import "./chunk-PWLLLJHU.js";
|
|
11
|
+
import "./chunk-UET7BDX2.js";
|
|
12
|
+
export {
|
|
13
|
+
language,
|
|
14
|
+
languageInfo,
|
|
15
|
+
metadata
|
|
16
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
var _chunkKC5FPUOFcjs = require('./chunk-KC5FPUOF.cjs');
|
|
9
|
+
require('./chunk-GIZL57FE.cjs');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
exports.addToLocalBlacklist = _chunkKC5FPUOFcjs.addToLocalBlacklist; exports.addToLocalWhitelist = _chunkKC5FPUOFcjs.addToLocalWhitelist; exports.getLocalSettingsPath = _chunkKC5FPUOFcjs.getLocalSettingsPath; exports.loadLocalProjectSettings = _chunkKC5FPUOFcjs.loadLocalProjectSettings; exports.mergePermissions = _chunkKC5FPUOFcjs.mergePermissions; exports.saveLocalProjectSettings = _chunkKC5FPUOFcjs.saveLocalProjectSettings;
|
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
loadLocalProjectSettings,
|
|
6
6
|
mergePermissions,
|
|
7
7
|
saveLocalProjectSettings
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-WLTVF77A.js";
|
|
9
|
+
import "./chunk-PWLLLJHU.js";
|
|
10
10
|
export {
|
|
11
11
|
addToLocalBlacklist,
|
|
12
12
|
addToLocalWhitelist,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
login,
|
|
3
|
+
metadata
|
|
4
|
+
} from "./chunk-BODVOW7B.js";
|
|
5
|
+
import "./chunk-P5VDZ6PV.js";
|
|
6
|
+
import "./chunk-6UJMCWRY.js";
|
|
7
|
+
import "./chunk-D2XFTCRP.js";
|
|
8
|
+
import "./chunk-WD5ZF6HE.js";
|
|
9
|
+
import "./chunk-ZBIBLOZL.js";
|
|
10
|
+
import "./chunk-JS7IPR7P.js";
|
|
11
|
+
import "./chunk-PNSRJT46.js";
|
|
12
|
+
import "./chunk-NF7RIHJK.js";
|
|
13
|
+
import "./chunk-PWLLLJHU.js";
|
|
14
|
+
import "./chunk-UET7BDX2.js";
|
|
15
|
+
export {
|
|
16
|
+
login,
|
|
17
|
+
metadata
|
|
18
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkNGBN2NGHcjs = require('./chunk-NGBN2NGH.cjs');
|
|
5
|
+
require('./chunk-3S4DEIJP.cjs');
|
|
6
|
+
require('./chunk-FPHU2ES6.cjs');
|
|
7
|
+
require('./chunk-TSY7JHIV.cjs');
|
|
8
|
+
require('./chunk-MNCWB5F7.cjs');
|
|
9
|
+
require('./chunk-RJP3SZ7Q.cjs');
|
|
10
|
+
require('./chunk-PGRH5Q77.cjs');
|
|
11
|
+
require('./chunk-QRQ5EX7I.cjs');
|
|
12
|
+
require('./chunk-Y27LG4BQ.cjs');
|
|
13
|
+
require('./chunk-GIZL57FE.cjs');
|
|
14
|
+
require('./chunk-LOXOD4IS.cjs');
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
exports.login = _chunkNGBN2NGHcjs.login; exports.metadata = _chunkNGBN2NGHcjs.metadata;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
logout,
|
|
3
|
+
metadata
|
|
4
|
+
} from "./chunk-IPI3JXKP.js";
|
|
5
|
+
import "./chunk-D2XFTCRP.js";
|
|
6
|
+
import "./chunk-WD5ZF6HE.js";
|
|
7
|
+
import "./chunk-ZBIBLOZL.js";
|
|
8
|
+
import "./chunk-JS7IPR7P.js";
|
|
9
|
+
import "./chunk-PNSRJT46.js";
|
|
10
|
+
import "./chunk-NF7RIHJK.js";
|
|
11
|
+
import "./chunk-PWLLLJHU.js";
|
|
12
|
+
import "./chunk-UET7BDX2.js";
|
|
13
|
+
export {
|
|
14
|
+
logout,
|
|
15
|
+
metadata
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkC2E3GJEEcjs = require('./chunk-C2E3GJEE.cjs');
|
|
5
|
+
require('./chunk-TSY7JHIV.cjs');
|
|
6
|
+
require('./chunk-MNCWB5F7.cjs');
|
|
7
|
+
require('./chunk-RJP3SZ7Q.cjs');
|
|
8
|
+
require('./chunk-PGRH5Q77.cjs');
|
|
9
|
+
require('./chunk-QRQ5EX7I.cjs');
|
|
10
|
+
require('./chunk-Y27LG4BQ.cjs');
|
|
11
|
+
require('./chunk-GIZL57FE.cjs');
|
|
12
|
+
require('./chunk-LOXOD4IS.cjs');
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
exports.logout = _chunkC2E3GJEEcjs.logout; exports.metadata = _chunkC2E3GJEEcjs.metadata;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
installMetadata,
|
|
3
|
+
mcp,
|
|
4
|
+
metadata
|
|
5
|
+
} from "./chunk-YKSSNFDZ.js";
|
|
6
|
+
import "./chunk-ZBIBLOZL.js";
|
|
7
|
+
import "./chunk-JS7IPR7P.js";
|
|
8
|
+
import "./chunk-NF7RIHJK.js";
|
|
9
|
+
import "./chunk-PWLLLJHU.js";
|
|
10
|
+
import "./chunk-UET7BDX2.js";
|
|
11
|
+
export {
|
|
12
|
+
installMetadata,
|
|
13
|
+
mcp,
|
|
14
|
+
metadata
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _chunkDMPVI3YKcjs = require('./chunk-DMPVI3YK.cjs');
|
|
6
|
+
require('./chunk-RJP3SZ7Q.cjs');
|
|
7
|
+
require('./chunk-PGRH5Q77.cjs');
|
|
8
|
+
require('./chunk-Y27LG4BQ.cjs');
|
|
9
|
+
require('./chunk-GIZL57FE.cjs');
|
|
10
|
+
require('./chunk-LOXOD4IS.cjs');
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
exports.installMetadata = _chunkDMPVI3YKcjs.installMetadata; exports.mcp = _chunkDMPVI3YKcjs.mcp; exports.metadata = _chunkDMPVI3YKcjs.metadata;
|
|
@@ -0,0 +1,473 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
+
|
|
3
|
+
var _chunkMNCWB5F7cjs = require('./chunk-MNCWB5F7.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkRJP3SZ7Qcjs = require('./chunk-RJP3SZ7Q.cjs');
|
|
7
|
+
require('./chunk-PGRH5Q77.cjs');
|
|
8
|
+
require('./chunk-QRQ5EX7I.cjs');
|
|
9
|
+
require('./chunk-Y27LG4BQ.cjs');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
var _chunkGIZL57FEcjs = require('./chunk-GIZL57FE.cjs');
|
|
13
|
+
require('./chunk-LOXOD4IS.cjs');
|
|
14
|
+
|
|
15
|
+
// src/commands/mcp-install.ts
|
|
16
|
+
var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk);
|
|
17
|
+
|
|
18
|
+
// src/mcp/McpRegistryFetcher.ts
|
|
19
|
+
var DEFAULT_REPO = "autohandai/community-mcp";
|
|
20
|
+
var DEFAULT_BRANCH = "main";
|
|
21
|
+
var McpRegistryFetcher = class {
|
|
22
|
+
constructor(config = {}) {
|
|
23
|
+
const repo = config.repo || DEFAULT_REPO;
|
|
24
|
+
const branch = config.branch || DEFAULT_BRANCH;
|
|
25
|
+
this.baseUrl = `https://raw.githubusercontent.com/${repo}/${branch}`;
|
|
26
|
+
this.timeout = config.timeout || 15e3;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Fetch the registry.json index file
|
|
30
|
+
*/
|
|
31
|
+
async fetchRegistry() {
|
|
32
|
+
const url = `${this.baseUrl}/registry.json`;
|
|
33
|
+
const controller = new AbortController();
|
|
34
|
+
const timeoutId = setTimeout(() => controller.abort(), this.timeout);
|
|
35
|
+
try {
|
|
36
|
+
const response = await fetch(url, {
|
|
37
|
+
headers: {
|
|
38
|
+
Accept: "application/json",
|
|
39
|
+
"User-Agent": "autohand-cli"
|
|
40
|
+
},
|
|
41
|
+
signal: controller.signal
|
|
42
|
+
});
|
|
43
|
+
if (!response.ok) {
|
|
44
|
+
throw new Error(`Failed to fetch MCP registry: HTTP ${response.status}`);
|
|
45
|
+
}
|
|
46
|
+
const data = await response.json();
|
|
47
|
+
return this.validateRegistry(data);
|
|
48
|
+
} finally {
|
|
49
|
+
clearTimeout(timeoutId);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Fetch a README file for a specific MCP server
|
|
54
|
+
*/
|
|
55
|
+
async fetchServerReadme(serverDirectory) {
|
|
56
|
+
const url = `${this.baseUrl}/${serverDirectory}/README.md`;
|
|
57
|
+
const controller = new AbortController();
|
|
58
|
+
const timeoutId = setTimeout(() => controller.abort(), this.timeout);
|
|
59
|
+
try {
|
|
60
|
+
const response = await fetch(url, {
|
|
61
|
+
headers: {
|
|
62
|
+
"User-Agent": "autohand-cli"
|
|
63
|
+
},
|
|
64
|
+
signal: controller.signal
|
|
65
|
+
});
|
|
66
|
+
if (!response.ok) {
|
|
67
|
+
throw new Error(`Failed to fetch README: HTTP ${response.status}`);
|
|
68
|
+
}
|
|
69
|
+
return response.text();
|
|
70
|
+
} finally {
|
|
71
|
+
clearTimeout(timeoutId);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Validate and normalize the registry data
|
|
76
|
+
*/
|
|
77
|
+
validateRegistry(data) {
|
|
78
|
+
if (!data || typeof data !== "object") {
|
|
79
|
+
throw new Error("Invalid MCP registry: expected object");
|
|
80
|
+
}
|
|
81
|
+
const registry = data;
|
|
82
|
+
if (!Array.isArray(registry.servers)) {
|
|
83
|
+
throw new Error("Invalid MCP registry: missing servers array");
|
|
84
|
+
}
|
|
85
|
+
if (!Array.isArray(registry.categories)) {
|
|
86
|
+
throw new Error("Invalid MCP registry: missing categories array");
|
|
87
|
+
}
|
|
88
|
+
const validatedServers = [];
|
|
89
|
+
for (const server of registry.servers) {
|
|
90
|
+
if (this.isValidServer(server)) {
|
|
91
|
+
validatedServers.push(server);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return {
|
|
95
|
+
version: String(registry.version || "1.0.0"),
|
|
96
|
+
updatedAt: String(registry.updatedAt || (/* @__PURE__ */ new Date()).toISOString()),
|
|
97
|
+
servers: validatedServers,
|
|
98
|
+
categories: registry.categories
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Type guard for valid MCP server objects
|
|
103
|
+
*/
|
|
104
|
+
isValidServer(server) {
|
|
105
|
+
if (!server || typeof server !== "object") return false;
|
|
106
|
+
const s = server;
|
|
107
|
+
return typeof s.id === "string" && typeof s.name === "string" && typeof s.description === "string" && typeof s.directory === "string" && (s.transport === "stdio" || s.transport === "sse");
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Search servers by query (client-side filtering)
|
|
111
|
+
*/
|
|
112
|
+
filterServers(servers, query) {
|
|
113
|
+
if (!query.trim()) return servers;
|
|
114
|
+
const lowerQuery = query.toLowerCase();
|
|
115
|
+
return servers.filter((server) => {
|
|
116
|
+
const searchText = [
|
|
117
|
+
server.name,
|
|
118
|
+
server.description,
|
|
119
|
+
server.category,
|
|
120
|
+
...server.tags || []
|
|
121
|
+
].join(" ").toLowerCase();
|
|
122
|
+
return searchText.includes(lowerQuery);
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Get servers by category
|
|
127
|
+
*/
|
|
128
|
+
getServersByCategory(servers, categoryId) {
|
|
129
|
+
return servers.filter((server) => server.category === categoryId);
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Get featured servers
|
|
133
|
+
*/
|
|
134
|
+
getFeaturedServers(servers) {
|
|
135
|
+
return servers.filter((server) => server.isFeatured);
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Find a server by name or ID
|
|
139
|
+
*/
|
|
140
|
+
findServer(servers, nameOrId) {
|
|
141
|
+
const lower = nameOrId.toLowerCase();
|
|
142
|
+
return servers.find(
|
|
143
|
+
(s) => s.id.toLowerCase() === lower || s.name.toLowerCase() === lower
|
|
144
|
+
) || null;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Find similar servers based on simple string matching
|
|
148
|
+
*/
|
|
149
|
+
findSimilarServers(servers, query, limit = 5) {
|
|
150
|
+
const lower = query.toLowerCase();
|
|
151
|
+
const scored = servers.map((server) => {
|
|
152
|
+
let score = 0;
|
|
153
|
+
if (server.name.toLowerCase().includes(lower)) score += 10;
|
|
154
|
+
if (server.description.toLowerCase().includes(lower)) score += 5;
|
|
155
|
+
if (_optionalChain([server, 'access', _ => _.tags, 'optionalAccess', _2 => _2.some, 'call', _3 => _3((t) => t.toLowerCase().includes(lower))])) score += 3;
|
|
156
|
+
return { server, score };
|
|
157
|
+
});
|
|
158
|
+
return scored.filter((s) => s.score > 0).sort((a, b) => b.score - a.score).slice(0, limit).map((s) => s.server);
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
// src/mcp/McpRegistryCache.ts
|
|
163
|
+
var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
|
|
164
|
+
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
165
|
+
var DEFAULT_TTL_MS = 24 * 60 * 60 * 1e3;
|
|
166
|
+
var McpRegistryCache = class {
|
|
167
|
+
constructor(config = {}) {
|
|
168
|
+
this.cacheDir = config.cacheDir || _chunkGIZL57FEcjs.AUTOHAND_PATHS.mcpCache;
|
|
169
|
+
this.ttlMs = _nullishCoalesce(config.ttlMs, () => ( DEFAULT_TTL_MS));
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Get cached registry if it exists and is not expired
|
|
173
|
+
*/
|
|
174
|
+
async getRegistry() {
|
|
175
|
+
const cached = await this.readCachedRegistry();
|
|
176
|
+
if (!cached) return null;
|
|
177
|
+
if (Date.now() - cached.fetchedAt >= this.ttlMs) {
|
|
178
|
+
return null;
|
|
179
|
+
}
|
|
180
|
+
return cached.registry;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Get cached registry ignoring TTL (for offline fallback)
|
|
184
|
+
*/
|
|
185
|
+
async getRegistryIgnoreTTL() {
|
|
186
|
+
const cached = await this.readCachedRegistry();
|
|
187
|
+
return _optionalChain([cached, 'optionalAccess', _4 => _4.registry]) || null;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Save registry to cache
|
|
191
|
+
*/
|
|
192
|
+
async setRegistry(registry, etag) {
|
|
193
|
+
const cached = {
|
|
194
|
+
registry,
|
|
195
|
+
fetchedAt: Date.now(),
|
|
196
|
+
etag
|
|
197
|
+
};
|
|
198
|
+
await _fsextra2.default.ensureDir(this.cacheDir);
|
|
199
|
+
await _fsextra2.default.writeJson(this.registryPath, cached, { spaces: 2 });
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Clear all cached data
|
|
203
|
+
*/
|
|
204
|
+
async clear() {
|
|
205
|
+
await _fsextra2.default.remove(this.cacheDir);
|
|
206
|
+
}
|
|
207
|
+
// ========== Private Methods ==========
|
|
208
|
+
get registryPath() {
|
|
209
|
+
return _path2.default.join(this.cacheDir, "registry.json");
|
|
210
|
+
}
|
|
211
|
+
async readCachedRegistry() {
|
|
212
|
+
if (!await _fsextra2.default.pathExists(this.registryPath)) {
|
|
213
|
+
return null;
|
|
214
|
+
}
|
|
215
|
+
try {
|
|
216
|
+
const data = await _fsextra2.default.readJson(this.registryPath);
|
|
217
|
+
if (typeof data === "object" && data !== null && typeof data.fetchedAt === "number" && data.registry && Array.isArray(data.registry.servers)) {
|
|
218
|
+
return data;
|
|
219
|
+
}
|
|
220
|
+
return null;
|
|
221
|
+
} catch (e) {
|
|
222
|
+
return null;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
// src/commands/mcp-install.ts
|
|
228
|
+
async function mcpInstall(ctx, serverName) {
|
|
229
|
+
const { mcpManager, config } = ctx;
|
|
230
|
+
if (!mcpManager || !config) {
|
|
231
|
+
console.log(_chalk2.default.red("MCP manager or config not available."));
|
|
232
|
+
return null;
|
|
233
|
+
}
|
|
234
|
+
const cache = new McpRegistryCache();
|
|
235
|
+
const fetcher = new McpRegistryFetcher();
|
|
236
|
+
let registry;
|
|
237
|
+
try {
|
|
238
|
+
const cached = await cache.getRegistry();
|
|
239
|
+
if (cached) {
|
|
240
|
+
registry = cached;
|
|
241
|
+
} else {
|
|
242
|
+
console.log(_chalk2.default.cyan("Fetching community MCP registry..."));
|
|
243
|
+
registry = await fetcher.fetchRegistry();
|
|
244
|
+
await cache.setRegistry(registry);
|
|
245
|
+
}
|
|
246
|
+
} catch (error) {
|
|
247
|
+
const stale = await cache.getRegistryIgnoreTTL();
|
|
248
|
+
if (stale) {
|
|
249
|
+
console.log(_chalk2.default.yellow("Using cached registry (offline mode)"));
|
|
250
|
+
registry = stale;
|
|
251
|
+
} else {
|
|
252
|
+
console.log(_chalk2.default.red("Failed to fetch MCP registry. Please check your internet connection."));
|
|
253
|
+
console.log(_chalk2.default.gray(error instanceof Error ? error.message : "Unknown error"));
|
|
254
|
+
return null;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
if (serverName) {
|
|
258
|
+
return directInstall(ctx, registry, fetcher, serverName);
|
|
259
|
+
}
|
|
260
|
+
return interactiveBrowser(ctx, registry, fetcher);
|
|
261
|
+
}
|
|
262
|
+
async function directInstall(ctx, registry, fetcher, serverName) {
|
|
263
|
+
const server = fetcher.findServer(registry.servers, serverName);
|
|
264
|
+
if (!server) {
|
|
265
|
+
console.log(_chalk2.default.red(`MCP server not found: ${serverName}`));
|
|
266
|
+
const similar = fetcher.findSimilarServers(registry.servers, serverName, 3);
|
|
267
|
+
if (similar.length > 0) {
|
|
268
|
+
console.log(_chalk2.default.gray("Did you mean:"));
|
|
269
|
+
for (const s of similar) {
|
|
270
|
+
console.log(_chalk2.default.gray(` - ${s.name}: ${s.description}`));
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
return null;
|
|
274
|
+
}
|
|
275
|
+
return installServer(ctx, server);
|
|
276
|
+
}
|
|
277
|
+
async function interactiveBrowser(ctx, registry, fetcher) {
|
|
278
|
+
console.log();
|
|
279
|
+
console.log(_chalk2.default.bold.cyan("Community MCP Servers"));
|
|
280
|
+
console.log(_chalk2.default.gray("\u2500".repeat(50)));
|
|
281
|
+
console.log(_chalk2.default.gray(`${registry.servers.length} servers available`));
|
|
282
|
+
console.log();
|
|
283
|
+
console.log(_chalk2.default.bold("Categories:"));
|
|
284
|
+
for (const cat of registry.categories) {
|
|
285
|
+
const count = registry.servers.filter((s) => s.category === cat.id).length;
|
|
286
|
+
console.log(_chalk2.default.gray(` ${cat.name} (${count})`));
|
|
287
|
+
}
|
|
288
|
+
console.log();
|
|
289
|
+
const featured = fetcher.getFeaturedServers(registry.servers);
|
|
290
|
+
if (featured.length > 0) {
|
|
291
|
+
console.log(_chalk2.default.bold.yellow("Featured Servers:"));
|
|
292
|
+
for (const server of featured) {
|
|
293
|
+
const rating = server.rating ? `\u2605 ${server.rating.toFixed(1)}` : "";
|
|
294
|
+
console.log(` ${_chalk2.default.green("\u25CF")} ${_chalk2.default.bold(server.name)} ${_chalk2.default.gray(rating)}`);
|
|
295
|
+
console.log(_chalk2.default.gray(` ${server.description}`));
|
|
296
|
+
}
|
|
297
|
+
console.log();
|
|
298
|
+
}
|
|
299
|
+
const choices = registry.servers.map((server) => ({
|
|
300
|
+
name: server.id,
|
|
301
|
+
message: formatServerChoice(server),
|
|
302
|
+
value: server.id
|
|
303
|
+
}));
|
|
304
|
+
const answer = await _chunkMNCWB5F7cjs.safePrompt.call(void 0, [
|
|
305
|
+
{
|
|
306
|
+
type: "autocomplete",
|
|
307
|
+
name: "server",
|
|
308
|
+
message: "Select a server to install (type to search)",
|
|
309
|
+
choices
|
|
310
|
+
}
|
|
311
|
+
]);
|
|
312
|
+
if (!_optionalChain([answer, 'optionalAccess', _5 => _5.server])) {
|
|
313
|
+
console.log(_chalk2.default.gray("No server selected."));
|
|
314
|
+
return null;
|
|
315
|
+
}
|
|
316
|
+
const selectedServer = registry.servers.find((s) => s.id === answer.server);
|
|
317
|
+
if (!selectedServer) {
|
|
318
|
+
console.log(_chalk2.default.red("Server not found."));
|
|
319
|
+
return null;
|
|
320
|
+
}
|
|
321
|
+
console.log();
|
|
322
|
+
console.log(_chalk2.default.bold.cyan(`Server: ${selectedServer.name}`));
|
|
323
|
+
console.log(_chalk2.default.gray("\u2500".repeat(50)));
|
|
324
|
+
console.log(_chalk2.default.white("Description: ") + selectedServer.description);
|
|
325
|
+
console.log(_chalk2.default.white("Category: ") + selectedServer.category);
|
|
326
|
+
console.log(_chalk2.default.white("Transport: ") + selectedServer.transport);
|
|
327
|
+
if (selectedServer.npmPackage) {
|
|
328
|
+
console.log(_chalk2.default.white("Package: ") + selectedServer.npmPackage);
|
|
329
|
+
}
|
|
330
|
+
if (_optionalChain([selectedServer, 'access', _6 => _6.tags, 'optionalAccess', _7 => _7.length])) {
|
|
331
|
+
console.log(_chalk2.default.white("Tags: ") + selectedServer.tags.join(", "));
|
|
332
|
+
}
|
|
333
|
+
if (_optionalChain([selectedServer, 'access', _8 => _8.envVars, 'optionalAccess', _9 => _9.length])) {
|
|
334
|
+
console.log(_chalk2.default.white("Required Env Vars: ") + selectedServer.envVars.join(", "));
|
|
335
|
+
}
|
|
336
|
+
if (_optionalChain([selectedServer, 'access', _10 => _10.requiredArgs, 'optionalAccess', _11 => _11.length])) {
|
|
337
|
+
console.log(_chalk2.default.white("Required Args: ") + selectedServer.requiredArgs.join(" "));
|
|
338
|
+
}
|
|
339
|
+
console.log();
|
|
340
|
+
return installServer(ctx, selectedServer);
|
|
341
|
+
}
|
|
342
|
+
async function installServer(ctx, server) {
|
|
343
|
+
const { mcpManager, config } = ctx;
|
|
344
|
+
if (!mcpManager || !config) {
|
|
345
|
+
return "MCP manager or config not available.";
|
|
346
|
+
}
|
|
347
|
+
if (_optionalChain([config, 'access', _12 => _12.mcp, 'optionalAccess', _13 => _13.servers, 'optionalAccess', _14 => _14.some, 'call', _15 => _15((s) => s.name === server.id)])) {
|
|
348
|
+
const confirm = await _chunkMNCWB5F7cjs.safePrompt.call(void 0, [
|
|
349
|
+
{
|
|
350
|
+
type: "confirm",
|
|
351
|
+
name: "overwrite",
|
|
352
|
+
message: `Server "${server.name}" already installed. Overwrite?`,
|
|
353
|
+
initial: false
|
|
354
|
+
}
|
|
355
|
+
]);
|
|
356
|
+
if (!_optionalChain([confirm, 'optionalAccess', _16 => _16.overwrite])) {
|
|
357
|
+
console.log(_chalk2.default.gray("Installation cancelled."));
|
|
358
|
+
return null;
|
|
359
|
+
}
|
|
360
|
+
const idx = config.mcp.servers.findIndex((s) => s.name === server.id);
|
|
361
|
+
if (idx >= 0) {
|
|
362
|
+
try {
|
|
363
|
+
await mcpManager.disconnect(server.id);
|
|
364
|
+
} catch (e2) {
|
|
365
|
+
}
|
|
366
|
+
config.mcp.servers.splice(idx, 1);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
if (server.envVars && server.envVars.length > 0) {
|
|
370
|
+
const missingVars = server.envVars.filter((v) => !process.env[v]);
|
|
371
|
+
if (missingVars.length > 0) {
|
|
372
|
+
console.log(_chalk2.default.yellow(`Required environment variables not set: ${missingVars.join(", ")}`));
|
|
373
|
+
console.log(_chalk2.default.gray("Set them in your shell profile or pass via env config."));
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
const serverArgs = server.args ? [...server.args] : [];
|
|
377
|
+
if (server.requiredArgs && server.requiredArgs.length > 0) {
|
|
378
|
+
console.log(_chalk2.default.yellow(`This server requires additional arguments: ${server.requiredArgs.join(" ")}`));
|
|
379
|
+
for (const reqArg of server.requiredArgs) {
|
|
380
|
+
const answer = await _chunkMNCWB5F7cjs.safePrompt.call(void 0, [
|
|
381
|
+
{
|
|
382
|
+
type: "input",
|
|
383
|
+
name: "value",
|
|
384
|
+
message: `Enter value for ${reqArg}:`
|
|
385
|
+
}
|
|
386
|
+
]);
|
|
387
|
+
if (_optionalChain([answer, 'optionalAccess', _17 => _17.value])) {
|
|
388
|
+
serverArgs.push(answer.value);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
const env = {};
|
|
393
|
+
if (server.envVars) {
|
|
394
|
+
for (const v of server.envVars) {
|
|
395
|
+
if (process.env[v]) {
|
|
396
|
+
env[v] = process.env[v];
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
const newServer = {
|
|
401
|
+
name: server.id,
|
|
402
|
+
transport: server.transport,
|
|
403
|
+
command: server.command,
|
|
404
|
+
args: serverArgs.length > 0 ? serverArgs : void 0,
|
|
405
|
+
env: Object.keys(env).length > 0 ? env : void 0,
|
|
406
|
+
autoConnect: true
|
|
407
|
+
};
|
|
408
|
+
if (!config.mcp) {
|
|
409
|
+
config.mcp = {};
|
|
410
|
+
}
|
|
411
|
+
if (!config.mcp.servers) {
|
|
412
|
+
config.mcp.servers = [];
|
|
413
|
+
}
|
|
414
|
+
config.mcp.servers.push(newServer);
|
|
415
|
+
try {
|
|
416
|
+
await _chunkRJP3SZ7Qcjs.saveConfig.call(void 0, config);
|
|
417
|
+
console.log(_chalk2.default.green(`\u2713 Installed ${server.name} to config`));
|
|
418
|
+
try {
|
|
419
|
+
console.log(_chalk2.default.cyan(`Connecting to ${server.name}...`));
|
|
420
|
+
await mcpManager.connect(newServer);
|
|
421
|
+
const tools = mcpManager.getToolsForServer(server.id);
|
|
422
|
+
console.log(_chalk2.default.green(`\u2713 Connected (${tools.length} tools available)`));
|
|
423
|
+
return `MCP server "${server.name}" installed and connected successfully.`;
|
|
424
|
+
} catch (connectError) {
|
|
425
|
+
console.log(_chalk2.default.yellow(`Installed but could not connect: ${connectError instanceof Error ? connectError.message : "Unknown error"}`));
|
|
426
|
+
return `MCP server "${server.name}" installed. Connect manually with /mcp connect ${server.id}`;
|
|
427
|
+
}
|
|
428
|
+
} catch (error) {
|
|
429
|
+
console.log(_chalk2.default.red("Failed to save config."));
|
|
430
|
+
console.log(_chalk2.default.gray(error instanceof Error ? error.message : "Unknown error"));
|
|
431
|
+
return null;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
function formatServerChoice(server) {
|
|
435
|
+
const parts = [];
|
|
436
|
+
if (server.isFeatured) {
|
|
437
|
+
parts.push(_chalk2.default.yellow("\u2605"));
|
|
438
|
+
} else if (server.isCurated) {
|
|
439
|
+
parts.push(_chalk2.default.green("\u2713"));
|
|
440
|
+
} else {
|
|
441
|
+
parts.push(" ");
|
|
442
|
+
}
|
|
443
|
+
parts.push(_chalk2.default.bold(server.name.padEnd(25)));
|
|
444
|
+
if (server.rating) {
|
|
445
|
+
parts.push(_chalk2.default.gray(`${server.rating.toFixed(1)}`));
|
|
446
|
+
}
|
|
447
|
+
parts.push(_chalk2.default.gray(server.description.slice(0, 40)));
|
|
448
|
+
return parts.join(" ");
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
exports.mcpInstall = mcpInstall;
|
|
453
|
+
/**
|
|
454
|
+
* @license
|
|
455
|
+
* Copyright 2025 Autohand AI LLC
|
|
456
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
457
|
+
*
|
|
458
|
+
* McpRegistryFetcher - Fetches community MCP server registry from GitHub
|
|
459
|
+
*/
|
|
460
|
+
/**
|
|
461
|
+
* @license
|
|
462
|
+
* Copyright 2025 Autohand AI LLC
|
|
463
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
464
|
+
*
|
|
465
|
+
* McpRegistryCache - TTL-based caching for community MCP registry
|
|
466
|
+
*/
|
|
467
|
+
/**
|
|
468
|
+
* @license
|
|
469
|
+
* Copyright 2025 Autohand AI LLC
|
|
470
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
471
|
+
*
|
|
472
|
+
* MCP install command - Browse and install community MCP servers from GitHub
|
|
473
|
+
*/
|