@namzu/cli 60.2.0 → 61.0.0
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/CHANGELOG.md +69 -0
- package/dist/bin.js +1 -1
- package/dist/chunks/{acp-JK2QIS46.js → acp-Q3IA5XHU.js} +294 -133
- package/dist/chunks/acp-Q3IA5XHU.js.map +6 -0
- package/dist/chunks/{activity-command-GVJPMWET.js → activity-command-PXOMQCVV.js} +14 -14
- package/dist/chunks/{add-CGO3YK5H.js → add-HIIKDZDN.js} +21 -21
- package/dist/chunks/{agent-SAQFBDBT.js → agent-5OM6GGWO.js} +55 -53
- package/dist/chunks/agent-session-MNEGO6RD.js +95 -0
- package/dist/chunks/{apply-at-exit-A5NGU6JC.js → apply-at-exit-2TUEV3TN.js} +7 -7
- package/dist/chunks/{archive-PCWIBYNU.js → archive-ESYECN4Y.js} +12 -12
- package/dist/chunks/{auth-G2JID2R3.js → auth-WA6ZXNXM.js} +12 -12
- package/dist/chunks/{bin-main-AKFYLWY5.js → bin-main-Y5FDOG2X.js} +8 -8
- package/dist/chunks/{binding-MQADHVXY.js → binding-7ZF533IJ.js} +3 -3
- package/dist/chunks/{browser-DGWRWK5R.js → browser-HFAVORW3.js} +7 -7
- package/dist/chunks/{chat-SAQKZTEU.js → chat-BVA2BLKE.js} +17 -17
- package/dist/chunks/{chunk-ZYEO2QIZ.js → chunk-2SXME4FG.js} +2 -2
- package/dist/chunks/{chunk-GIHUEVUN.js → chunk-2ZA7XJ63.js} +3 -3
- package/dist/chunks/{chunk-LCVOU7TV.js → chunk-3CEL5P45.js} +2 -2
- package/dist/chunks/{chunk-BMLBUAIK.js → chunk-3DCQNM64.js} +7 -7
- package/dist/chunks/{chunk-JWBXEQJV.js → chunk-3KCGBW3F.js} +3 -3
- package/dist/chunks/{chunk-ERH6Q62K.js → chunk-3RDKZZQE.js} +2 -2
- package/dist/chunks/{chunk-F74JCZW3.js → chunk-5KRUNLE7.js} +2 -2
- package/dist/chunks/{chunk-FXXJJILJ.js → chunk-5M44QX4G.js} +3 -3
- package/dist/chunks/{chunk-NQVJ7ZSD.js → chunk-5VKCUXB2.js} +8 -6
- package/dist/chunks/chunk-5VKCUXB2.js.map +6 -0
- package/dist/chunks/{chunk-MTKPKUW2.js → chunk-65ROGOIM.js} +9 -9
- package/dist/chunks/{chunk-VPAQNK6O.js → chunk-65ZRPJA5.js} +3 -3
- package/dist/chunks/{chunk-LDGA7WT2.js → chunk-6FGEPFFB.js} +2 -2
- package/dist/chunks/{chunk-KFXJRJLP.js → chunk-6PEEUJSR.js} +10 -8
- package/dist/chunks/chunk-6PEEUJSR.js.map +6 -0
- package/dist/chunks/{chunk-QLY2PN2E.js → chunk-6UWOG6FY.js} +4 -4
- package/dist/chunks/{chunk-GQ5QUCUD.js → chunk-6ZZQSHLH.js} +6 -6
- package/dist/chunks/{chunk-GQ5QUCUD.js.map → chunk-6ZZQSHLH.js.map} +1 -1
- package/dist/chunks/{chunk-A36POSIG.js → chunk-752F23K2.js} +8 -8
- package/dist/chunks/{chunk-SRDNEVL6.js → chunk-7BRCXPI3.js} +3 -3
- package/dist/chunks/{chunk-JHMJUX7I.js → chunk-7TPWEPUT.js} +3 -3
- package/dist/chunks/{chunk-QCT22NQ6.js → chunk-A42WH5C5.js} +2 -2
- package/dist/chunks/{chunk-C42E6LPS.js → chunk-AAGA2PWL.js} +17 -6
- package/dist/chunks/chunk-AAGA2PWL.js.map +6 -0
- package/dist/chunks/{chunk-G47HP3R2.js → chunk-AHV6BJED.js} +2 -2
- package/dist/chunks/{chunk-C66BWJKK.js → chunk-AYD4H6VV.js} +2 -2
- package/dist/chunks/{chunk-X2255VMX.js → chunk-B7DL5QPS.js} +6 -6
- package/dist/chunks/{chunk-3RJHEGKI.js → chunk-BXUNIVZB.js} +13 -6
- package/dist/chunks/chunk-BXUNIVZB.js.map +6 -0
- package/dist/chunks/{chunk-SCYEHF4C.js → chunk-C3KDKOUV.js} +6 -6
- package/dist/chunks/{chunk-KB6FL2IM.js → chunk-CJBRIESJ.js} +3 -3
- package/dist/chunks/{chunk-UXKYAXRF.js → chunk-COOEFXWT.js} +2 -2
- package/dist/chunks/{chunk-XE4R3UOX.js → chunk-CQ2EGIRN.js} +301 -713
- package/dist/chunks/chunk-CQ2EGIRN.js.map +6 -0
- package/dist/chunks/{chunk-CDNFVELA.js → chunk-DAZEYCY5.js} +2 -2
- package/dist/chunks/{chunk-54Q6LC6C.js → chunk-DL5KZGQK.js} +5 -5
- package/dist/chunks/{chunk-TDIEPLAK.js → chunk-DRYK66N3.js} +57 -21
- package/dist/chunks/chunk-DRYK66N3.js.map +6 -0
- package/dist/chunks/{chunk-46BSYJIZ.js → chunk-EDAEDZ37.js} +3 -3
- package/dist/chunks/{chunk-RQRL3UNA.js → chunk-EDLBZSB2.js} +854 -103
- package/dist/chunks/chunk-EDLBZSB2.js.map +6 -0
- package/dist/chunks/{chunk-BB7YPIH2.js → chunk-EEBDKNNP.js} +4 -4
- package/dist/chunks/{chunk-IPDVQ5I4.js → chunk-EOLSGOXC.js} +6 -6
- package/dist/chunks/{chunk-XF3ROBXQ.js → chunk-EYFAHVYO.js} +2 -2
- package/dist/chunks/{chunk-XKUHSUVJ.js → chunk-EZYMBETQ.js} +2 -2
- package/dist/chunks/{chunk-KZBSSQ3E.js → chunk-F5AHQ4RX.js} +2 -2
- package/dist/chunks/{chunk-LMVGH3ZY.js → chunk-F5SG7JPB.js} +2 -2
- package/dist/chunks/{chunk-EBPWTODI.js → chunk-FHKPEPTE.js} +4 -4
- package/dist/chunks/{chunk-XT6WXQSV.js → chunk-FHP4D55L.js} +2 -2
- package/dist/chunks/{chunk-5M6OCPY3.js → chunk-FIEADS4A.js} +2 -2
- package/dist/chunks/{chunk-GYATIZCJ.js → chunk-G5NS6ASX.js} +3 -3
- package/dist/chunks/{chunk-UCFJ6RKM.js → chunk-GS7ST2VG.js} +19 -19
- package/dist/chunks/{chunk-BUK2ZGHB.js → chunk-GSNTXEOD.js} +4 -4
- package/dist/chunks/{chunk-NALMGTSI.js → chunk-HGBVFYQT.js} +4 -4
- package/dist/chunks/{chunk-WMNTACZG.js → chunk-HIJXZ6FI.js} +12 -12
- package/dist/chunks/{chunk-HN4K4ZKQ.js → chunk-HLYITQWD.js} +10 -10
- package/dist/chunks/{chunk-SXPP2XK7.js → chunk-HN2NZD4E.js} +3 -88
- package/dist/chunks/chunk-HN2NZD4E.js.map +6 -0
- package/dist/chunks/{chunk-RXW4B7VV.js → chunk-HX3ENA3I.js} +2 -2
- package/dist/chunks/{chunk-TXU7ILNZ.js → chunk-IWVJDG4L.js} +3 -3
- package/dist/chunks/{chunk-4XIVE2HG.js → chunk-J2ITWYQQ.js} +6 -6
- package/dist/chunks/{chunk-I4ECQ33I.js → chunk-JR3LFDKN.js} +2 -2
- package/dist/chunks/{chunk-IJUWE5CT.js → chunk-JRZSUEK4.js} +102 -79
- package/dist/chunks/chunk-JRZSUEK4.js.map +6 -0
- package/dist/chunks/{chunk-YO22LLF5.js → chunk-K4PFUUP7.js} +47 -40
- package/dist/chunks/chunk-K4PFUUP7.js.map +6 -0
- package/dist/chunks/{chunk-3WHACNCY.js → chunk-KDOBJGF2.js} +3 -3
- package/dist/chunks/{chunk-EBBT2I5S.js → chunk-KDPGC66S.js} +30 -6
- package/dist/chunks/chunk-KDPGC66S.js.map +6 -0
- package/dist/chunks/{chunk-ODFGH22V.js → chunk-KKHZG7B2.js} +2 -2
- package/dist/chunks/{chunk-UH2G4WTL.js → chunk-KTSPKGEC.js} +4 -4
- package/dist/chunks/{chunk-BG5HMTM3.js → chunk-KXBZ7P2A.js} +2 -2
- package/dist/chunks/{chunk-6FVLFGX5.js → chunk-KZ5XYWKO.js} +3 -3
- package/dist/chunks/{chunk-TJD6WTO4.js → chunk-LKWENSPO.js} +7 -60
- package/dist/chunks/chunk-LKWENSPO.js.map +6 -0
- package/dist/chunks/{chunk-KWXG6YJL.js → chunk-LLVZON4J.js} +4 -4
- package/dist/chunks/{chunk-T4UJA6WY.js → chunk-LNMFADLE.js} +3 -3
- package/dist/chunks/{chunk-CXNXWLCM.js → chunk-ME7MQ4P2.js} +2 -2
- package/dist/chunks/{chunk-K7576YJQ.js → chunk-MESE2QPT.js} +27 -30
- package/dist/chunks/chunk-MESE2QPT.js.map +6 -0
- package/dist/chunks/{chunk-VYAUOPZQ.js → chunk-MHESN2FM.js} +3 -3
- package/dist/chunks/{chunk-GL3QWKJ4.js → chunk-MKCZB324.js} +2 -2
- package/dist/chunks/{chunk-W65KKIU3.js → chunk-NE55T7GN.js} +4 -4
- package/dist/chunks/{chunk-3AX344VL.js → chunk-NI2YKSPW.js} +6 -6
- package/dist/chunks/{chunk-GJNN3LTG.js → chunk-NQVSTOUH.js} +4 -4
- package/dist/chunks/chunk-NSU3TAZZ.js +74 -0
- package/dist/chunks/chunk-NSU3TAZZ.js.map +6 -0
- package/dist/chunks/{chunk-EBG7PTNK.js → chunk-NVRUHQKC.js} +7 -7
- package/dist/chunks/{chunk-SS2CAVVR.js → chunk-O3AEUU3Q.js} +3 -3
- package/dist/chunks/{chunk-TA6OUZAJ.js → chunk-OG7MBIKO.js} +5 -5
- package/dist/chunks/{chunk-3FWYKOMZ.js → chunk-OGMRGX5M.js} +3 -3
- package/dist/chunks/{chunk-OU7LZVZF.js → chunk-PFQQ6YFF.js} +2 -2
- package/dist/chunks/{chunk-ZB3BRA2D.js → chunk-PHEL63BK.js} +2 -2
- package/dist/chunks/{chunk-4LXNFBRV.js → chunk-PJORD4FZ.js} +9 -9
- package/dist/chunks/{chunk-23A7QA2Y.js → chunk-PSUJIMQV.js} +3 -3
- package/dist/chunks/{chunk-6V5ZMKMY.js → chunk-PWSMXR6B.js} +9 -9
- package/dist/chunks/{chunk-U43ZRILP.js → chunk-PYFAJB35.js} +2 -2
- package/dist/chunks/{chunk-B2V73MAH.js → chunk-PYFGTXFQ.js} +5 -5
- package/dist/chunks/{chunk-OTPZK6XR.js → chunk-Q5H7EHCH.js} +8 -8
- package/dist/chunks/{chunk-WWFL25RW.js → chunk-QH4DQR57.js} +5 -5
- package/dist/chunks/{chunk-ANVIW3V7.js → chunk-QR5VVGWU.js} +3 -3
- package/dist/chunks/{chunk-JRJABLPG.js → chunk-QR7GTBV3.js} +3 -3
- package/dist/chunks/{chunk-Q5YCOVL3.js → chunk-R5BEMFDZ.js} +11 -11
- package/dist/chunks/{chunk-FJVYPXGA.js → chunk-RQOE2MRO.js} +2 -2
- package/dist/chunks/chunk-RYOZ4HYY.js +1221 -0
- package/dist/chunks/chunk-RYOZ4HYY.js.map +6 -0
- package/dist/chunks/{chunk-23SFPA2E.js → chunk-RZBIRLZ6.js} +6 -6
- package/dist/chunks/{chunk-GGBVZ22F.js → chunk-SLLKDPGZ.js} +3 -3
- package/dist/chunks/{chunk-IJEHCF3G.js → chunk-SXI6NW2H.js} +3 -3
- package/dist/chunks/{chunk-56PNP5QD.js → chunk-SYJRI5A4.js} +2 -2
- package/dist/chunks/{chunk-RDHX3I7Y.js → chunk-T26HDLQS.js} +2 -2
- package/dist/chunks/{chunk-NE2HCOZN.js → chunk-TBQQRYS2.js} +5 -5
- package/dist/chunks/{chunk-S7CLXBGN.js → chunk-TFREQNR5.js} +20 -12
- package/dist/chunks/chunk-TFREQNR5.js.map +6 -0
- package/dist/chunks/{chunk-CFDEOI4Y.js → chunk-TQZSXYON.js} +8 -8
- package/dist/chunks/{chunk-CJKBFBGI.js → chunk-TSN7J4ZH.js} +2 -2
- package/dist/chunks/{chunk-KDUUHCOJ.js → chunk-TT3GLF32.js} +14 -14
- package/dist/chunks/{chunk-ZSDIY5RN.js → chunk-TWTZKA46.js} +3 -3
- package/dist/chunks/{chunk-SE6W3XFJ.js → chunk-U3OY3T54.js} +34 -16
- package/dist/chunks/chunk-U3OY3T54.js.map +6 -0
- package/dist/chunks/{chunk-2QGE3SXX.js → chunk-U6DACADN.js} +3 -3
- package/dist/chunks/chunk-UBDKPN27.js +150 -0
- package/dist/chunks/chunk-UBDKPN27.js.map +6 -0
- package/dist/chunks/{chunk-CIN34YEV.js → chunk-UDSY3L6M.js} +3 -3
- package/dist/chunks/{chunk-GW3EISER.js → chunk-UOU7PGPZ.js} +2 -2
- package/dist/chunks/{chunk-RWSQ6LZO.js → chunk-UY5KPN7B.js} +2 -2
- package/dist/chunks/{chunk-6NWMHYW7.js → chunk-V3DMBRE3.js} +2 -2
- package/dist/chunks/{chunk-4FIIZXH6.js → chunk-V5K2AOLI.js} +3 -3
- package/dist/chunks/{chunk-45N7FGEP.js → chunk-VAJPCN3B.js} +2 -2
- package/dist/chunks/{chunk-ALWXYYUB.js → chunk-VIURZHCB.js} +6 -6
- package/dist/chunks/{chunk-QWYMJ7QV.js → chunk-VOR32IWQ.js} +4 -4
- package/dist/chunks/{chunk-MQAWESBI.js → chunk-W3BDNKTN.js} +4 -4
- package/dist/chunks/{chunk-FNRI6CNN.js → chunk-W5GDQFZS.js} +2 -2
- package/dist/chunks/{chunk-5IWDLKJL.js → chunk-XWGWQBF7.js} +2 -2
- package/dist/chunks/{chunk-YTG2R4XP.js → chunk-Y2HHHKBF.js} +117 -59
- package/dist/chunks/chunk-Y2HHHKBF.js.map +6 -0
- package/dist/chunks/{chunk-LO5ZQDJW.js → chunk-Y5NGMUDN.js} +2 -2
- package/dist/chunks/{chunk-KPSTAZOR.js → chunk-YCODODZO.js} +4 -4
- package/dist/chunks/{chunk-BD3FWBRC.js → chunk-YENBRA7T.js} +3 -3
- package/dist/chunks/{chunk-CMKZPD4A.js → chunk-YHUAVEOM.js} +2 -2
- package/dist/chunks/{chunk-YSXRCN6G.js → chunk-YPNF7YFU.js} +4 -4
- package/dist/chunks/{chunk-NSFURVG2.js → chunk-ZCDOMHZU.js} +13 -13
- package/dist/chunks/{chunk-FVHWIEVN.js → chunk-ZPOMLH5G.js} +4 -4
- package/dist/chunks/{cli-runtime-7CFYKDUH.js → cli-runtime-5IXM6W6M.js} +22 -22
- package/dist/chunks/{commands-TSJJ5SKS.js → commands-LOMIOXZ3.js} +6 -6
- package/dist/chunks/{config-YMXKEBKC.js → config-UBOJ3N77.js} +12 -12
- package/dist/chunks/{cost-Q5I6EXEZ.js → cost-LM34ZHBI.js} +5 -5
- package/dist/chunks/{crash-report-OIZCGQMC.js → crash-report-PTHJP6ZC.js} +6 -6
- package/dist/chunks/{dist-6NIUYHIK.js → dist-3P6YD6AW.js} +2 -2
- package/dist/chunks/{dist-L7OVELHG.js → dist-3W2E4ZVU.js} +16 -2
- package/dist/chunks/{dist-UMWBCGJD.js → dist-C7M5OJAH.js} +2 -2
- package/dist/chunks/{dist-T5SHTF3J.js → dist-HJYAXRBL.js} +2 -2
- package/dist/chunks/{dist-YKLFD4WW.js → dist-LZAIP6RQ.js} +2 -2
- package/dist/chunks/{dist-X3YPJ7CH.js → dist-TEFBDQUK.js} +2 -2
- package/dist/chunks/{dist-7QSB4QEK.js → dist-Y4YXKFL6.js} +3 -3
- package/dist/chunks/{dist-KDSJMMMS.js → dist-ZVUIWK64.js} +2 -2
- package/dist/chunks/{doctor-Q6HR67LY.js → doctor-LL6FW4DE.js} +40 -40
- package/dist/chunks/{drain-UIWWUYXW.js → drain-AX2SKGAZ.js} +31 -31
- package/dist/chunks/drain-AX2SKGAZ.js.map +6 -0
- package/dist/chunks/{entry-5U3HTLJ2.js → entry-QT6CMKBN.js} +6 -6
- package/dist/chunks/{eval-C4BPRFQT.js → eval-HKAAPPGO.js} +9 -9
- package/dist/chunks/{exec-L6FBAXSL.js → exec-DY3B5KGJ.js} +98 -52
- package/dist/chunks/exec-DY3B5KGJ.js.map +6 -0
- package/dist/chunks/{extension-Z2MHFW3Q.js → extension-55PWXBQY.js} +6 -6
- package/dist/chunks/{home-2YQOPOQK.js → home-7KXFLNBX.js} +3 -3
- package/dist/chunks/{homes-IOIYROYY.js → homes-WYHCCBK6.js} +5 -5
- package/dist/chunks/{hooks-YHLYWVNC.js → hooks-UZ46HYL4.js} +22 -22
- package/dist/chunks/{hooks-report-MAUKS7OA.js → hooks-report-RD53ZGON.js} +18 -18
- package/dist/chunks/{host-ZW6GWNIA.js → host-NUIEARM2.js} +11 -10
- package/dist/chunks/host-queries-OB7OWZI6.js +37 -0
- package/dist/chunks/{installed-list-Q5TS47GB.js → installed-list-T3G757YK.js} +4 -4
- package/dist/chunks/{learn-RTSHWOHI.js → learn-MTQXTX6E.js} +17 -17
- package/dist/chunks/{learn-builtin-FST7GS5S.js → learn-builtin-3SXUVV7J.js} +20 -20
- package/dist/chunks/{lifecycle-LKVKPUZM.js → lifecycle-MFXCFSJP.js} +33 -30
- package/dist/chunks/{list-73OJ67EN.js → list-M6Y24N5J.js} +18 -18
- package/dist/chunks/{live-FWCJIRMD.js → live-UNUQSBVZ.js} +39 -39
- package/dist/chunks/{load-KZ6SYV45.js → load-GA4OIEG4.js} +9 -9
- package/dist/chunks/{logs-MZVKGL3W.js → logs-LUPWFBWF.js} +4 -4
- package/dist/chunks/{mcp-HAY7K2KN.js → mcp-4GD5Y5W7.js} +98 -36
- package/dist/chunks/mcp-4GD5Y5W7.js.map +6 -0
- package/dist/chunks/{mcp-serve-ZCIH7YJF.js → mcp-serve-RQKZQNPI.js} +17 -17
- package/dist/chunks/{message-command-NN54YNRE.js → message-command-L5HAX56P.js} +59 -59
- package/dist/chunks/{open-HAIE5EE5.js → open-D6QESFR2.js} +7 -7
- package/dist/chunks/{operator-tools-5AV7EL4N.js → operator-tools-CFYHXAZS.js} +15 -15
- package/dist/chunks/{output-schema-JAY7Y55N.js → output-schema-WV5RUG66.js} +3 -3
- package/dist/chunks/{pal-YBUSIJZN.js → pal-JVR6ZLEI.js} +15 -15
- package/dist/chunks/{peers-22YMO74N.js → peers-EK24T2HF.js} +8 -7
- package/dist/chunks/{peers-YJLUS5TS.js → peers-NCDTNFJV.js} +20 -19
- package/dist/chunks/peers-NCDTNFJV.js.map +6 -0
- package/dist/chunks/{plugin-R7LE2MMO.js → plugin-RR4O7D6C.js} +108 -52
- package/dist/chunks/plugin-RR4O7D6C.js.map +6 -0
- package/dist/chunks/{providers-ENQAHWCZ.js → providers-2CLIPXQ2.js} +10 -10
- package/dist/chunks/{providers-VHIHS2BM.js → providers-RTRULUUS.js} +17 -17
- package/dist/chunks/{pty-TBASOLRE.js → pty-OHLKFJFA.js} +3 -3
- package/dist/chunks/resume-5OWRUFUL.js +25 -0
- package/dist/chunks/{resume-command-TBENHCC7.js → resume-command-HIIEMJAT.js} +4 -4
- package/dist/chunks/{running-3BBUV4WS.js → running-3BAWMUK4.js} +4 -4
- package/dist/chunks/{schedule-CJFF2HQB.js → schedule-OW54ANKO.js} +12 -12
- package/dist/chunks/{send-DP64UPWK.js → send-5NIU4WFY.js} +20 -19
- package/dist/chunks/send-person-RYBIVAML.js +33 -0
- package/dist/chunks/{service-M7WIHDX2.js → service-MGZ4LEVY.js} +33 -30
- package/dist/chunks/service-MGZ4LEVY.js.map +6 -0
- package/dist/chunks/{setting-cli-3UJ5BDX5.js → setting-cli-CHPHJSAM.js} +12 -12
- package/dist/chunks/{skills-LB4UCHH4.js → skills-6DNVYWKR.js} +26 -26
- package/dist/chunks/{start-check-TSHXEFFO.js → start-check-MHUGGAYJ.js} +2 -2
- package/dist/chunks/{startup-failure-HVFTACQS.js → startup-failure-R2AIVZYU.js} +2 -2
- package/dist/chunks/{state-KARPDITG.js → state-2WEGEDJ5.js} +19 -19
- package/dist/chunks/{store-AX2M43UO.js → store-MCRRV4BB.js} +3 -3
- package/dist/chunks/{store-JGMG724W.js → store-RITSVC5A.js} +4 -4
- package/dist/chunks/{store-4WF32HQH.js → store-UFRLA47W.js} +8 -8
- package/dist/chunks/{store-HSOMNN6C.js → store-WH3C3EPV.js} +12 -12
- package/dist/chunks/{tui-56AJ2YCR.js → tui-5QS4AAMU.js} +98 -96
- package/dist/chunks/tui-5QS4AAMU.js.map +6 -0
- package/dist/chunks/{update-53YPVRE2.js → update-3VXQAKVL.js} +8 -8
- package/dist/chunks/{watch-FBDWIRVJ.js → watch-PMFTONTW.js} +102 -100
- package/dist/chunks/watch-PMFTONTW.js.map +6 -0
- package/dist/chunks/{workspaces-GSWBAVOT.js → workspaces-N7A3JNL4.js} +16 -15
- package/dist/chunks/workspaces-N7A3JNL4.js.map +6 -0
- package/dist/chunks/{worktree-PGG3362T.js → worktree-6L5FLMVI.js} +24 -24
- package/dist/cli.d.ts.map +1 -1
- package/dist/commands/acp.d.ts +8 -1
- package/dist/commands/acp.d.ts.map +1 -1
- package/dist/commands/desktop-host-plugins.d.ts +28 -1
- package/dist/commands/desktop-host-plugins.d.ts.map +1 -1
- package/dist/commands/desktop-host.d.ts +20 -1
- package/dist/commands/desktop-host.d.ts.map +1 -1
- package/dist/commands/drain.d.ts.map +1 -1
- package/dist/commands/exec-browser.d.ts +19 -0
- package/dist/commands/exec-browser.d.ts.map +1 -0
- package/dist/commands/exec-flags.d.ts +11 -2
- package/dist/commands/exec-flags.d.ts.map +1 -1
- package/dist/commands/exec-json.d.ts.map +1 -1
- package/dist/commands/exec.d.ts.map +1 -1
- package/dist/commands/mcp.d.ts +16 -1
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/plugin-install.d.ts +6 -0
- package/dist/commands/plugin-install.d.ts.map +1 -1
- package/dist/commands/plugin-records.d.ts +3 -0
- package/dist/commands/plugin-records.d.ts.map +1 -1
- package/dist/commands/plugin.d.ts.map +1 -1
- package/dist/config/load.d.ts.map +1 -1
- package/dist/config/schema.d.ts +23 -3
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/session-options.d.ts +116 -0
- package/dist/config/session-options.d.ts.map +1 -1
- package/dist/config/settings-descriptors.d.ts.map +1 -1
- package/dist/index.js +40 -40
- package/dist/integrations/archive/zip.d.ts +8 -1
- package/dist/integrations/archive/zip.d.ts.map +1 -1
- package/dist/integrations/mcp/plugin-remote.d.ts +4 -0
- package/dist/integrations/mcp/plugin-remote.d.ts.map +1 -1
- package/dist/integrations/peers/process-ancestry.d.ts +10 -0
- package/dist/integrations/peers/process-ancestry.d.ts.map +1 -1
- package/dist/integrations/plugins/fetch/archive.d.ts.map +1 -1
- package/dist/integrations/plugins/fetch/git.d.ts +13 -3
- package/dist/integrations/plugins/fetch/git.d.ts.map +1 -1
- package/dist/integrations/plugins/fetch/policy.d.ts +40 -0
- package/dist/integrations/plugins/fetch/policy.d.ts.map +1 -0
- package/dist/integrations/plugins/fetch/source.d.ts +8 -10
- package/dist/integrations/plugins/fetch/source.d.ts.map +1 -1
- package/dist/integrations/plugins/fetch/url.d.ts +16 -4
- package/dist/integrations/plugins/fetch/url.d.ts.map +1 -1
- package/dist/integrations/plugins/files.d.ts.map +1 -1
- package/dist/integrations/plugins/install-manifest.d.ts +11 -0
- package/dist/integrations/plugins/install-manifest.d.ts.map +1 -1
- package/dist/integrations/plugins/install-plan.d.ts.map +1 -1
- package/dist/integrations/plugins/install-preview.d.ts +1 -2
- package/dist/integrations/plugins/install-preview.d.ts.map +1 -1
- package/dist/integrations/plugins/install.d.ts.map +1 -1
- package/dist/integrations/plugins/installed-source.d.ts +25 -0
- package/dist/integrations/plugins/installed-source.d.ts.map +1 -1
- package/dist/integrations/plugins/inventory.d.ts.map +1 -1
- package/dist/integrations/plugins/remote-marketplace.d.ts +16 -2
- package/dist/integrations/plugins/remote-marketplace.d.ts.map +1 -1
- package/dist/integrations/plugins/runtime.d.ts.map +1 -1
- package/dist/integrations/plugins/surface.d.ts +3 -1
- package/dist/integrations/plugins/surface.d.ts.map +1 -1
- package/dist/integrations/plugins/update-compare.d.ts +3 -3
- package/dist/integrations/plugins/update-compare.d.ts.map +1 -1
- package/dist/integrations/plugins/validate.d.ts.map +1 -1
- package/dist/permissions/send-floor.d.ts +7 -0
- package/dist/permissions/send-floor.d.ts.map +1 -1
- package/dist/schedule/fire/fire.d.ts.map +1 -1
- package/dist/schedule/policy.d.ts.map +1 -1
- package/dist/skills/skill-shell.d.ts +9 -5
- package/dist/skills/skill-shell.d.ts.map +1 -1
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/tui/agent.d.ts +25 -4
- package/dist/tui/agent.d.ts.map +1 -1
- package/dist/tui/computer-use-screen-approval.d.ts +11 -1
- package/dist/tui/computer-use-screen-approval.d.ts.map +1 -1
- package/package.json +6 -6
- package/dist/chunks/acp-JK2QIS46.js.map +0 -6
- package/dist/chunks/agent-session-U7N25MKG.js +0 -95
- package/dist/chunks/chunk-3RJHEGKI.js.map +0 -6
- package/dist/chunks/chunk-C42E6LPS.js.map +0 -6
- package/dist/chunks/chunk-EBBT2I5S.js.map +0 -6
- package/dist/chunks/chunk-IJUWE5CT.js.map +0 -6
- package/dist/chunks/chunk-K7576YJQ.js.map +0 -6
- package/dist/chunks/chunk-KFXJRJLP.js.map +0 -6
- package/dist/chunks/chunk-NQVJ7ZSD.js.map +0 -6
- package/dist/chunks/chunk-QFJMWRMW.js +0 -472
- package/dist/chunks/chunk-QFJMWRMW.js.map +0 -6
- package/dist/chunks/chunk-RQRL3UNA.js.map +0 -6
- package/dist/chunks/chunk-S7CLXBGN.js.map +0 -6
- package/dist/chunks/chunk-SE6W3XFJ.js.map +0 -6
- package/dist/chunks/chunk-SXPP2XK7.js.map +0 -6
- package/dist/chunks/chunk-TDIEPLAK.js.map +0 -6
- package/dist/chunks/chunk-TJD6WTO4.js.map +0 -6
- package/dist/chunks/chunk-XE4R3UOX.js.map +0 -6
- package/dist/chunks/chunk-YO22LLF5.js.map +0 -6
- package/dist/chunks/chunk-YTG2R4XP.js.map +0 -6
- package/dist/chunks/drain-UIWWUYXW.js.map +0 -6
- package/dist/chunks/exec-L6FBAXSL.js.map +0 -6
- package/dist/chunks/host-queries-YRK46ZNS.js +0 -37
- package/dist/chunks/mcp-HAY7K2KN.js.map +0 -6
- package/dist/chunks/peers-YJLUS5TS.js.map +0 -6
- package/dist/chunks/plugin-R7LE2MMO.js.map +0 -6
- package/dist/chunks/resume-OM6RDPW5.js +0 -25
- package/dist/chunks/send-person-C676B4SJ.js +0 -32
- package/dist/chunks/service-M7WIHDX2.js.map +0 -6
- package/dist/chunks/tui-56AJ2YCR.js.map +0 -6
- package/dist/chunks/watch-FBDWIRVJ.js.map +0 -6
- package/dist/chunks/workspaces-GSWBAVOT.js.map +0 -6
- /package/dist/chunks/{activity-command-GVJPMWET.js.map → activity-command-PXOMQCVV.js.map} +0 -0
- /package/dist/chunks/{add-CGO3YK5H.js.map → add-HIIKDZDN.js.map} +0 -0
- /package/dist/chunks/{agent-SAQFBDBT.js.map → agent-5OM6GGWO.js.map} +0 -0
- /package/dist/chunks/{agent-session-U7N25MKG.js.map → agent-session-MNEGO6RD.js.map} +0 -0
- /package/dist/chunks/{apply-at-exit-A5NGU6JC.js.map → apply-at-exit-2TUEV3TN.js.map} +0 -0
- /package/dist/chunks/{archive-PCWIBYNU.js.map → archive-ESYECN4Y.js.map} +0 -0
- /package/dist/chunks/{auth-G2JID2R3.js.map → auth-WA6ZXNXM.js.map} +0 -0
- /package/dist/chunks/{bin-main-AKFYLWY5.js.map → bin-main-Y5FDOG2X.js.map} +0 -0
- /package/dist/chunks/{binding-MQADHVXY.js.map → binding-7ZF533IJ.js.map} +0 -0
- /package/dist/chunks/{browser-DGWRWK5R.js.map → browser-HFAVORW3.js.map} +0 -0
- /package/dist/chunks/{chat-SAQKZTEU.js.map → chat-BVA2BLKE.js.map} +0 -0
- /package/dist/chunks/{chunk-ZYEO2QIZ.js.map → chunk-2SXME4FG.js.map} +0 -0
- /package/dist/chunks/{chunk-GIHUEVUN.js.map → chunk-2ZA7XJ63.js.map} +0 -0
- /package/dist/chunks/{chunk-LCVOU7TV.js.map → chunk-3CEL5P45.js.map} +0 -0
- /package/dist/chunks/{chunk-BMLBUAIK.js.map → chunk-3DCQNM64.js.map} +0 -0
- /package/dist/chunks/{chunk-JWBXEQJV.js.map → chunk-3KCGBW3F.js.map} +0 -0
- /package/dist/chunks/{chunk-ERH6Q62K.js.map → chunk-3RDKZZQE.js.map} +0 -0
- /package/dist/chunks/{chunk-F74JCZW3.js.map → chunk-5KRUNLE7.js.map} +0 -0
- /package/dist/chunks/{chunk-FXXJJILJ.js.map → chunk-5M44QX4G.js.map} +0 -0
- /package/dist/chunks/{chunk-MTKPKUW2.js.map → chunk-65ROGOIM.js.map} +0 -0
- /package/dist/chunks/{chunk-VPAQNK6O.js.map → chunk-65ZRPJA5.js.map} +0 -0
- /package/dist/chunks/{chunk-LDGA7WT2.js.map → chunk-6FGEPFFB.js.map} +0 -0
- /package/dist/chunks/{chunk-QLY2PN2E.js.map → chunk-6UWOG6FY.js.map} +0 -0
- /package/dist/chunks/{chunk-A36POSIG.js.map → chunk-752F23K2.js.map} +0 -0
- /package/dist/chunks/{chunk-SRDNEVL6.js.map → chunk-7BRCXPI3.js.map} +0 -0
- /package/dist/chunks/{chunk-JHMJUX7I.js.map → chunk-7TPWEPUT.js.map} +0 -0
- /package/dist/chunks/{chunk-QCT22NQ6.js.map → chunk-A42WH5C5.js.map} +0 -0
- /package/dist/chunks/{chunk-G47HP3R2.js.map → chunk-AHV6BJED.js.map} +0 -0
- /package/dist/chunks/{chunk-C66BWJKK.js.map → chunk-AYD4H6VV.js.map} +0 -0
- /package/dist/chunks/{chunk-X2255VMX.js.map → chunk-B7DL5QPS.js.map} +0 -0
- /package/dist/chunks/{chunk-SCYEHF4C.js.map → chunk-C3KDKOUV.js.map} +0 -0
- /package/dist/chunks/{chunk-KB6FL2IM.js.map → chunk-CJBRIESJ.js.map} +0 -0
- /package/dist/chunks/{chunk-UXKYAXRF.js.map → chunk-COOEFXWT.js.map} +0 -0
- /package/dist/chunks/{chunk-CDNFVELA.js.map → chunk-DAZEYCY5.js.map} +0 -0
- /package/dist/chunks/{chunk-54Q6LC6C.js.map → chunk-DL5KZGQK.js.map} +0 -0
- /package/dist/chunks/{chunk-46BSYJIZ.js.map → chunk-EDAEDZ37.js.map} +0 -0
- /package/dist/chunks/{chunk-BB7YPIH2.js.map → chunk-EEBDKNNP.js.map} +0 -0
- /package/dist/chunks/{chunk-IPDVQ5I4.js.map → chunk-EOLSGOXC.js.map} +0 -0
- /package/dist/chunks/{chunk-XF3ROBXQ.js.map → chunk-EYFAHVYO.js.map} +0 -0
- /package/dist/chunks/{chunk-XKUHSUVJ.js.map → chunk-EZYMBETQ.js.map} +0 -0
- /package/dist/chunks/{chunk-KZBSSQ3E.js.map → chunk-F5AHQ4RX.js.map} +0 -0
- /package/dist/chunks/{chunk-LMVGH3ZY.js.map → chunk-F5SG7JPB.js.map} +0 -0
- /package/dist/chunks/{chunk-EBPWTODI.js.map → chunk-FHKPEPTE.js.map} +0 -0
- /package/dist/chunks/{chunk-XT6WXQSV.js.map → chunk-FHP4D55L.js.map} +0 -0
- /package/dist/chunks/{chunk-5M6OCPY3.js.map → chunk-FIEADS4A.js.map} +0 -0
- /package/dist/chunks/{chunk-GYATIZCJ.js.map → chunk-G5NS6ASX.js.map} +0 -0
- /package/dist/chunks/{chunk-UCFJ6RKM.js.map → chunk-GS7ST2VG.js.map} +0 -0
- /package/dist/chunks/{chunk-BUK2ZGHB.js.map → chunk-GSNTXEOD.js.map} +0 -0
- /package/dist/chunks/{chunk-NALMGTSI.js.map → chunk-HGBVFYQT.js.map} +0 -0
- /package/dist/chunks/{chunk-WMNTACZG.js.map → chunk-HIJXZ6FI.js.map} +0 -0
- /package/dist/chunks/{chunk-HN4K4ZKQ.js.map → chunk-HLYITQWD.js.map} +0 -0
- /package/dist/chunks/{chunk-RXW4B7VV.js.map → chunk-HX3ENA3I.js.map} +0 -0
- /package/dist/chunks/{chunk-TXU7ILNZ.js.map → chunk-IWVJDG4L.js.map} +0 -0
- /package/dist/chunks/{chunk-4XIVE2HG.js.map → chunk-J2ITWYQQ.js.map} +0 -0
- /package/dist/chunks/{chunk-I4ECQ33I.js.map → chunk-JR3LFDKN.js.map} +0 -0
- /package/dist/chunks/{chunk-3WHACNCY.js.map → chunk-KDOBJGF2.js.map} +0 -0
- /package/dist/chunks/{chunk-ODFGH22V.js.map → chunk-KKHZG7B2.js.map} +0 -0
- /package/dist/chunks/{chunk-UH2G4WTL.js.map → chunk-KTSPKGEC.js.map} +0 -0
- /package/dist/chunks/{chunk-BG5HMTM3.js.map → chunk-KXBZ7P2A.js.map} +0 -0
- /package/dist/chunks/{chunk-6FVLFGX5.js.map → chunk-KZ5XYWKO.js.map} +0 -0
- /package/dist/chunks/{chunk-KWXG6YJL.js.map → chunk-LLVZON4J.js.map} +0 -0
- /package/dist/chunks/{chunk-T4UJA6WY.js.map → chunk-LNMFADLE.js.map} +0 -0
- /package/dist/chunks/{chunk-CXNXWLCM.js.map → chunk-ME7MQ4P2.js.map} +0 -0
- /package/dist/chunks/{chunk-VYAUOPZQ.js.map → chunk-MHESN2FM.js.map} +0 -0
- /package/dist/chunks/{chunk-GL3QWKJ4.js.map → chunk-MKCZB324.js.map} +0 -0
- /package/dist/chunks/{chunk-W65KKIU3.js.map → chunk-NE55T7GN.js.map} +0 -0
- /package/dist/chunks/{chunk-3AX344VL.js.map → chunk-NI2YKSPW.js.map} +0 -0
- /package/dist/chunks/{chunk-GJNN3LTG.js.map → chunk-NQVSTOUH.js.map} +0 -0
- /package/dist/chunks/{chunk-EBG7PTNK.js.map → chunk-NVRUHQKC.js.map} +0 -0
- /package/dist/chunks/{chunk-SS2CAVVR.js.map → chunk-O3AEUU3Q.js.map} +0 -0
- /package/dist/chunks/{chunk-TA6OUZAJ.js.map → chunk-OG7MBIKO.js.map} +0 -0
- /package/dist/chunks/{chunk-3FWYKOMZ.js.map → chunk-OGMRGX5M.js.map} +0 -0
- /package/dist/chunks/{chunk-OU7LZVZF.js.map → chunk-PFQQ6YFF.js.map} +0 -0
- /package/dist/chunks/{chunk-ZB3BRA2D.js.map → chunk-PHEL63BK.js.map} +0 -0
- /package/dist/chunks/{chunk-4LXNFBRV.js.map → chunk-PJORD4FZ.js.map} +0 -0
- /package/dist/chunks/{chunk-23A7QA2Y.js.map → chunk-PSUJIMQV.js.map} +0 -0
- /package/dist/chunks/{chunk-6V5ZMKMY.js.map → chunk-PWSMXR6B.js.map} +0 -0
- /package/dist/chunks/{chunk-U43ZRILP.js.map → chunk-PYFAJB35.js.map} +0 -0
- /package/dist/chunks/{chunk-B2V73MAH.js.map → chunk-PYFGTXFQ.js.map} +0 -0
- /package/dist/chunks/{chunk-OTPZK6XR.js.map → chunk-Q5H7EHCH.js.map} +0 -0
- /package/dist/chunks/{chunk-WWFL25RW.js.map → chunk-QH4DQR57.js.map} +0 -0
- /package/dist/chunks/{chunk-ANVIW3V7.js.map → chunk-QR5VVGWU.js.map} +0 -0
- /package/dist/chunks/{chunk-JRJABLPG.js.map → chunk-QR7GTBV3.js.map} +0 -0
- /package/dist/chunks/{chunk-Q5YCOVL3.js.map → chunk-R5BEMFDZ.js.map} +0 -0
- /package/dist/chunks/{chunk-FJVYPXGA.js.map → chunk-RQOE2MRO.js.map} +0 -0
- /package/dist/chunks/{chunk-23SFPA2E.js.map → chunk-RZBIRLZ6.js.map} +0 -0
- /package/dist/chunks/{chunk-GGBVZ22F.js.map → chunk-SLLKDPGZ.js.map} +0 -0
- /package/dist/chunks/{chunk-IJEHCF3G.js.map → chunk-SXI6NW2H.js.map} +0 -0
- /package/dist/chunks/{chunk-56PNP5QD.js.map → chunk-SYJRI5A4.js.map} +0 -0
- /package/dist/chunks/{chunk-RDHX3I7Y.js.map → chunk-T26HDLQS.js.map} +0 -0
- /package/dist/chunks/{chunk-NE2HCOZN.js.map → chunk-TBQQRYS2.js.map} +0 -0
- /package/dist/chunks/{chunk-CFDEOI4Y.js.map → chunk-TQZSXYON.js.map} +0 -0
- /package/dist/chunks/{chunk-CJKBFBGI.js.map → chunk-TSN7J4ZH.js.map} +0 -0
- /package/dist/chunks/{chunk-KDUUHCOJ.js.map → chunk-TT3GLF32.js.map} +0 -0
- /package/dist/chunks/{chunk-ZSDIY5RN.js.map → chunk-TWTZKA46.js.map} +0 -0
- /package/dist/chunks/{chunk-2QGE3SXX.js.map → chunk-U6DACADN.js.map} +0 -0
- /package/dist/chunks/{chunk-CIN34YEV.js.map → chunk-UDSY3L6M.js.map} +0 -0
- /package/dist/chunks/{chunk-GW3EISER.js.map → chunk-UOU7PGPZ.js.map} +0 -0
- /package/dist/chunks/{chunk-RWSQ6LZO.js.map → chunk-UY5KPN7B.js.map} +0 -0
- /package/dist/chunks/{chunk-6NWMHYW7.js.map → chunk-V3DMBRE3.js.map} +0 -0
- /package/dist/chunks/{chunk-4FIIZXH6.js.map → chunk-V5K2AOLI.js.map} +0 -0
- /package/dist/chunks/{chunk-45N7FGEP.js.map → chunk-VAJPCN3B.js.map} +0 -0
- /package/dist/chunks/{chunk-ALWXYYUB.js.map → chunk-VIURZHCB.js.map} +0 -0
- /package/dist/chunks/{chunk-QWYMJ7QV.js.map → chunk-VOR32IWQ.js.map} +0 -0
- /package/dist/chunks/{chunk-MQAWESBI.js.map → chunk-W3BDNKTN.js.map} +0 -0
- /package/dist/chunks/{chunk-FNRI6CNN.js.map → chunk-W5GDQFZS.js.map} +0 -0
- /package/dist/chunks/{chunk-5IWDLKJL.js.map → chunk-XWGWQBF7.js.map} +0 -0
- /package/dist/chunks/{chunk-LO5ZQDJW.js.map → chunk-Y5NGMUDN.js.map} +0 -0
- /package/dist/chunks/{chunk-KPSTAZOR.js.map → chunk-YCODODZO.js.map} +0 -0
- /package/dist/chunks/{chunk-BD3FWBRC.js.map → chunk-YENBRA7T.js.map} +0 -0
- /package/dist/chunks/{chunk-CMKZPD4A.js.map → chunk-YHUAVEOM.js.map} +0 -0
- /package/dist/chunks/{chunk-YSXRCN6G.js.map → chunk-YPNF7YFU.js.map} +0 -0
- /package/dist/chunks/{chunk-NSFURVG2.js.map → chunk-ZCDOMHZU.js.map} +0 -0
- /package/dist/chunks/{chunk-FVHWIEVN.js.map → chunk-ZPOMLH5G.js.map} +0 -0
- /package/dist/chunks/{cli-runtime-7CFYKDUH.js.map → cli-runtime-5IXM6W6M.js.map} +0 -0
- /package/dist/chunks/{commands-TSJJ5SKS.js.map → commands-LOMIOXZ3.js.map} +0 -0
- /package/dist/chunks/{config-YMXKEBKC.js.map → config-UBOJ3N77.js.map} +0 -0
- /package/dist/chunks/{cost-Q5I6EXEZ.js.map → cost-LM34ZHBI.js.map} +0 -0
- /package/dist/chunks/{crash-report-OIZCGQMC.js.map → crash-report-PTHJP6ZC.js.map} +0 -0
- /package/dist/chunks/{dist-6NIUYHIK.js.map → dist-3P6YD6AW.js.map} +0 -0
- /package/dist/chunks/{dist-7QSB4QEK.js.map → dist-3W2E4ZVU.js.map} +0 -0
- /package/dist/chunks/{dist-UMWBCGJD.js.map → dist-C7M5OJAH.js.map} +0 -0
- /package/dist/chunks/{dist-T5SHTF3J.js.map → dist-HJYAXRBL.js.map} +0 -0
- /package/dist/chunks/{dist-YKLFD4WW.js.map → dist-LZAIP6RQ.js.map} +0 -0
- /package/dist/chunks/{dist-X3YPJ7CH.js.map → dist-TEFBDQUK.js.map} +0 -0
- /package/dist/chunks/{dist-L7OVELHG.js.map → dist-Y4YXKFL6.js.map} +0 -0
- /package/dist/chunks/{dist-KDSJMMMS.js.map → dist-ZVUIWK64.js.map} +0 -0
- /package/dist/chunks/{doctor-Q6HR67LY.js.map → doctor-LL6FW4DE.js.map} +0 -0
- /package/dist/chunks/{entry-5U3HTLJ2.js.map → entry-QT6CMKBN.js.map} +0 -0
- /package/dist/chunks/{eval-C4BPRFQT.js.map → eval-HKAAPPGO.js.map} +0 -0
- /package/dist/chunks/{extension-Z2MHFW3Q.js.map → extension-55PWXBQY.js.map} +0 -0
- /package/dist/chunks/{home-2YQOPOQK.js.map → home-7KXFLNBX.js.map} +0 -0
- /package/dist/chunks/{homes-IOIYROYY.js.map → homes-WYHCCBK6.js.map} +0 -0
- /package/dist/chunks/{hooks-YHLYWVNC.js.map → hooks-UZ46HYL4.js.map} +0 -0
- /package/dist/chunks/{hooks-report-MAUKS7OA.js.map → hooks-report-RD53ZGON.js.map} +0 -0
- /package/dist/chunks/{host-ZW6GWNIA.js.map → host-NUIEARM2.js.map} +0 -0
- /package/dist/chunks/{host-queries-YRK46ZNS.js.map → host-queries-OB7OWZI6.js.map} +0 -0
- /package/dist/chunks/{installed-list-Q5TS47GB.js.map → installed-list-T3G757YK.js.map} +0 -0
- /package/dist/chunks/{learn-RTSHWOHI.js.map → learn-MTQXTX6E.js.map} +0 -0
- /package/dist/chunks/{learn-builtin-FST7GS5S.js.map → learn-builtin-3SXUVV7J.js.map} +0 -0
- /package/dist/chunks/{lifecycle-LKVKPUZM.js.map → lifecycle-MFXCFSJP.js.map} +0 -0
- /package/dist/chunks/{list-73OJ67EN.js.map → list-M6Y24N5J.js.map} +0 -0
- /package/dist/chunks/{live-FWCJIRMD.js.map → live-UNUQSBVZ.js.map} +0 -0
- /package/dist/chunks/{load-KZ6SYV45.js.map → load-GA4OIEG4.js.map} +0 -0
- /package/dist/chunks/{logs-MZVKGL3W.js.map → logs-LUPWFBWF.js.map} +0 -0
- /package/dist/chunks/{mcp-serve-ZCIH7YJF.js.map → mcp-serve-RQKZQNPI.js.map} +0 -0
- /package/dist/chunks/{message-command-NN54YNRE.js.map → message-command-L5HAX56P.js.map} +0 -0
- /package/dist/chunks/{open-HAIE5EE5.js.map → open-D6QESFR2.js.map} +0 -0
- /package/dist/chunks/{operator-tools-5AV7EL4N.js.map → operator-tools-CFYHXAZS.js.map} +0 -0
- /package/dist/chunks/{output-schema-JAY7Y55N.js.map → output-schema-WV5RUG66.js.map} +0 -0
- /package/dist/chunks/{pal-YBUSIJZN.js.map → pal-JVR6ZLEI.js.map} +0 -0
- /package/dist/chunks/{peers-22YMO74N.js.map → peers-EK24T2HF.js.map} +0 -0
- /package/dist/chunks/{providers-ENQAHWCZ.js.map → providers-2CLIPXQ2.js.map} +0 -0
- /package/dist/chunks/{providers-VHIHS2BM.js.map → providers-RTRULUUS.js.map} +0 -0
- /package/dist/chunks/{pty-TBASOLRE.js.map → pty-OHLKFJFA.js.map} +0 -0
- /package/dist/chunks/{resume-OM6RDPW5.js.map → resume-5OWRUFUL.js.map} +0 -0
- /package/dist/chunks/{resume-command-TBENHCC7.js.map → resume-command-HIIEMJAT.js.map} +0 -0
- /package/dist/chunks/{running-3BBUV4WS.js.map → running-3BAWMUK4.js.map} +0 -0
- /package/dist/chunks/{schedule-CJFF2HQB.js.map → schedule-OW54ANKO.js.map} +0 -0
- /package/dist/chunks/{send-DP64UPWK.js.map → send-5NIU4WFY.js.map} +0 -0
- /package/dist/chunks/{send-person-C676B4SJ.js.map → send-person-RYBIVAML.js.map} +0 -0
- /package/dist/chunks/{setting-cli-3UJ5BDX5.js.map → setting-cli-CHPHJSAM.js.map} +0 -0
- /package/dist/chunks/{skills-LB4UCHH4.js.map → skills-6DNVYWKR.js.map} +0 -0
- /package/dist/chunks/{start-check-TSHXEFFO.js.map → start-check-MHUGGAYJ.js.map} +0 -0
- /package/dist/chunks/{startup-failure-HVFTACQS.js.map → startup-failure-R2AIVZYU.js.map} +0 -0
- /package/dist/chunks/{state-KARPDITG.js.map → state-2WEGEDJ5.js.map} +0 -0
- /package/dist/chunks/{store-4WF32HQH.js.map → store-MCRRV4BB.js.map} +0 -0
- /package/dist/chunks/{store-AX2M43UO.js.map → store-RITSVC5A.js.map} +0 -0
- /package/dist/chunks/{store-HSOMNN6C.js.map → store-UFRLA47W.js.map} +0 -0
- /package/dist/chunks/{store-JGMG724W.js.map → store-WH3C3EPV.js.map} +0 -0
- /package/dist/chunks/{update-53YPVRE2.js.map → update-3VXQAKVL.js.map} +0 -0
- /package/dist/chunks/{worktree-PGG3362T.js.map → worktree-6L5FLMVI.js.map} +0 -0
|
@@ -0,0 +1,1221 @@
|
|
|
1
|
+
import { createRequire as __namzuCreateRequire } from 'node:module';
|
|
2
|
+
const require = __namzuCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
MARKETPLACE_NAME_PATTERN,
|
|
5
|
+
installManifestsFolder,
|
|
6
|
+
installedPluginDataFolder,
|
|
7
|
+
installedPluginsPath,
|
|
8
|
+
isPluginId,
|
|
9
|
+
isRecord,
|
|
10
|
+
parseMarketplaceSource,
|
|
11
|
+
pluginCacheFolder,
|
|
12
|
+
readInstalledPlugins,
|
|
13
|
+
readJsonObject,
|
|
14
|
+
readKnownMarketplaces,
|
|
15
|
+
realPathOrResolved,
|
|
16
|
+
samePath,
|
|
17
|
+
splitPluginId,
|
|
18
|
+
updateJsonObject
|
|
19
|
+
} from "./chunk-RQOE2MRO.js";
|
|
20
|
+
import {
|
|
21
|
+
LOCAL_SETTINGS_FILE,
|
|
22
|
+
PROJECT_SETTINGS_FILE
|
|
23
|
+
} from "./chunk-DRYK66N3.js";
|
|
24
|
+
import {
|
|
25
|
+
COMMON_MANIFEST_DIR,
|
|
26
|
+
COMMON_MARKETPLACE_FILE,
|
|
27
|
+
isOfficialLookingMarketplaceName,
|
|
28
|
+
isPrivateAddress,
|
|
29
|
+
loadPluginManifestWithFindings,
|
|
30
|
+
readCommonLayout,
|
|
31
|
+
resolveWithinReal
|
|
32
|
+
} from "./chunk-EDLBZSB2.js";
|
|
33
|
+
import {
|
|
34
|
+
__name
|
|
35
|
+
} from "./chunk-76FLAFCG.js";
|
|
36
|
+
|
|
37
|
+
// src/integrations/plugins/enabled-records.ts
|
|
38
|
+
import { join, resolve } from "node:path";
|
|
39
|
+
var RECORD_KEY_CAP = 500;
|
|
40
|
+
var RECORD_LAYERS_BY_PRECEDENCE = ["local", "project", "user"];
|
|
41
|
+
function recordLayerPath(layer, where) {
|
|
42
|
+
if (layer === "user") return join(where.home, "settings.json");
|
|
43
|
+
return resolve(
|
|
44
|
+
where.cwd,
|
|
45
|
+
...(layer === "project" ? PROJECT_SETTINGS_FILE : LOCAL_SETTINGS_FILE).split("/")
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
__name(recordLayerPath, "recordLayerPath");
|
|
49
|
+
function recordShape(raw) {
|
|
50
|
+
for (const key of ["enabledPlugins", "extraKnownMarketplaces"]) {
|
|
51
|
+
const value = raw[key];
|
|
52
|
+
if (value === void 0) continue;
|
|
53
|
+
if (!isRecord(value)) return `its "${key}" entry is not a mapping`;
|
|
54
|
+
if (Object.keys(value).length > RECORD_KEY_CAP)
|
|
55
|
+
return `its "${key}" entry has more than ${RECORD_KEY_CAP} keys`;
|
|
56
|
+
}
|
|
57
|
+
return void 0;
|
|
58
|
+
}
|
|
59
|
+
__name(recordShape, "recordShape");
|
|
60
|
+
function readRecordLayer(path) {
|
|
61
|
+
const read = readJsonObject(path, recordShape);
|
|
62
|
+
if (read.state === "unreadable") return read;
|
|
63
|
+
const enabledPlugins = /* @__PURE__ */ new Map();
|
|
64
|
+
const marketplaces = /* @__PURE__ */ new Map();
|
|
65
|
+
const ignored = [];
|
|
66
|
+
if (read.state === "ok") {
|
|
67
|
+
const enabled = read.raw.enabledPlugins;
|
|
68
|
+
if (isRecord(enabled)) {
|
|
69
|
+
for (const [id, value] of Object.entries(enabled)) {
|
|
70
|
+
if (isPluginId(id) && typeof value === "boolean") enabledPlugins.set(id, value);
|
|
71
|
+
else ignored.push(`enabledPlugins.${id}`);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
const declared = read.raw.extraKnownMarketplaces;
|
|
75
|
+
if (isRecord(declared)) {
|
|
76
|
+
for (const [name, entry] of Object.entries(declared)) {
|
|
77
|
+
const source = isRecord(entry) ? parseMarketplaceSource(entry.source) : "not a mapping";
|
|
78
|
+
if (MARKETPLACE_NAME_PATTERN.test(name) && typeof source !== "string")
|
|
79
|
+
marketplaces.set(name, { name, source });
|
|
80
|
+
else ignored.push(`extraKnownMarketplaces.${name}`);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return { state: read.state, enabledPlugins, marketplaces, ignored };
|
|
85
|
+
}
|
|
86
|
+
__name(readRecordLayer, "readRecordLayer");
|
|
87
|
+
function setEnabledPlugin(path, home, id, value) {
|
|
88
|
+
if (!isPluginId(id)) throw new Error(`"${id}" is not a plugin id (name@marketplace).`);
|
|
89
|
+
updateJsonObject(
|
|
90
|
+
path,
|
|
91
|
+
{
|
|
92
|
+
home,
|
|
93
|
+
check: recordShape,
|
|
94
|
+
remedy: "Fix or remove the file, then try again. Nothing was changed."
|
|
95
|
+
},
|
|
96
|
+
(raw) => {
|
|
97
|
+
const current = isRecord(raw.enabledPlugins) ? { ...raw.enabledPlugins } : {};
|
|
98
|
+
if (value === void 0) {
|
|
99
|
+
if (!(id in current)) return false;
|
|
100
|
+
delete current[id];
|
|
101
|
+
} else {
|
|
102
|
+
if (!(id in current) && Object.keys(current).length >= RECORD_KEY_CAP)
|
|
103
|
+
throw new Error(
|
|
104
|
+
`${path} already lists ${RECORD_KEY_CAP} plugins, which is the most a settings file keeps, so ${id} was not added.`
|
|
105
|
+
);
|
|
106
|
+
current[id] = value;
|
|
107
|
+
}
|
|
108
|
+
raw.enabledPlugins = current;
|
|
109
|
+
return true;
|
|
110
|
+
}
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
__name(setEnabledPlugin, "setEnabledPlugin");
|
|
114
|
+
function setExtraKnownMarketplace(path, home, name, source) {
|
|
115
|
+
if (!MARKETPLACE_NAME_PATTERN.test(name)) throw new Error(`"${name}" is not a marketplace name.`);
|
|
116
|
+
const checked = parseMarketplaceSource(source);
|
|
117
|
+
if (typeof checked === "string") throw new Error(`Not a valid marketplace: ${checked}.`);
|
|
118
|
+
updateJsonObject(path, { home, check: recordShape }, (raw) => {
|
|
119
|
+
const current = isRecord(raw.extraKnownMarketplaces) ? { ...raw.extraKnownMarketplaces } : {};
|
|
120
|
+
if (!(name in current) && Object.keys(current).length >= RECORD_KEY_CAP)
|
|
121
|
+
throw new Error(
|
|
122
|
+
`${path} already declares ${RECORD_KEY_CAP} marketplaces, which is the most a settings file keeps, so ${name} was not added.`
|
|
123
|
+
);
|
|
124
|
+
current[name] = { source };
|
|
125
|
+
raw.extraKnownMarketplaces = current;
|
|
126
|
+
return true;
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
__name(setExtraKnownMarketplace, "setExtraKnownMarketplace");
|
|
130
|
+
function removeExtraKnownMarketplace(path, home, name) {
|
|
131
|
+
return updateJsonObject(path, { home, check: recordShape }, (raw) => {
|
|
132
|
+
if (!isRecord(raw.extraKnownMarketplaces) || !(name in raw.extraKnownMarketplaces)) return false;
|
|
133
|
+
const current = { ...raw.extraKnownMarketplaces };
|
|
134
|
+
delete current[name];
|
|
135
|
+
raw.extraKnownMarketplaces = current;
|
|
136
|
+
return true;
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
__name(removeExtraKnownMarketplace, "removeExtraKnownMarketplace");
|
|
140
|
+
function installedHere(records, cwd) {
|
|
141
|
+
return records.some(
|
|
142
|
+
(record) => record.scope === "user" || record.projectPath !== void 0 && samePath(record.projectPath, cwd)
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
__name(installedHere, "installedHere");
|
|
146
|
+
function resolveEnabled(id, layers, installed) {
|
|
147
|
+
for (const layer of RECORD_LAYERS_BY_PRECEDENCE) {
|
|
148
|
+
const read = layers[layer];
|
|
149
|
+
if (read === void 0 || read.state === "unreadable") continue;
|
|
150
|
+
const value = read.enabledPlugins.get(id);
|
|
151
|
+
if (value === void 0) continue;
|
|
152
|
+
if (layer === "project" && value && !installed) continue;
|
|
153
|
+
return { on: value, by: layer };
|
|
154
|
+
}
|
|
155
|
+
return { on: false };
|
|
156
|
+
}
|
|
157
|
+
__name(resolveEnabled, "resolveEnabled");
|
|
158
|
+
|
|
159
|
+
// src/integrations/plugins/fetch/source.ts
|
|
160
|
+
import { domainToASCII } from "node:url";
|
|
161
|
+
var NOT_AN_ADDRESS = "Not a marketplace address. Use owner/repo, an https:// address, or a folder path.";
|
|
162
|
+
var KNOWN_GIT_HOSTS = ["github.com", "gitlab.com", "bitbucket.org"];
|
|
163
|
+
var GITHUB_CONTENT_HOSTS = {
|
|
164
|
+
"codeload.github.com": "content",
|
|
165
|
+
"raw.githubusercontent.com": "content",
|
|
166
|
+
"raw.github.com": "content",
|
|
167
|
+
"ssh.github.com": "content",
|
|
168
|
+
"api.github.com": "api"
|
|
169
|
+
};
|
|
170
|
+
var SCP_FORM = /^([A-Za-z0-9_][\w.-]*)@([A-Za-z0-9][\w.-]*):([^\s\\]+)$/;
|
|
171
|
+
var SHORTHAND = /^([\w][\w.-]*)\/([\w][\w.-]*?)(?:\.git)?(?:[#@](.+))?$/;
|
|
172
|
+
var COMMIT_ID = /^(?:[0-9a-f]{40}|[0-9a-f]{64})$/;
|
|
173
|
+
function isCommitId(value) {
|
|
174
|
+
return COMMIT_ID.test(value);
|
|
175
|
+
}
|
|
176
|
+
__name(isCommitId, "isCommitId");
|
|
177
|
+
function refProblem(ref) {
|
|
178
|
+
if (!/^[A-Za-z0-9_][A-Za-z0-9._/+-]{0,199}$/.test(ref) || ref.includes("..") || ref.includes("//") || ref.endsWith("/") || ref.endsWith(".") || ref.endsWith(".lock"))
|
|
179
|
+
return `"${ref}" is not a branch, tag or commit name Namzu will pass to Git.`;
|
|
180
|
+
return void 0;
|
|
181
|
+
}
|
|
182
|
+
__name(refProblem, "refProblem");
|
|
183
|
+
function repoPathProblem(path) {
|
|
184
|
+
if (path === "" || path.length > 300 || path.startsWith("/") || path.startsWith("-") || path.startsWith("~") || /^[A-Za-z]:/.test(path) || path.includes("\\") || // biome-ignore lint/suspicious/noControlCharactersInRegex: control characters are what is refused
|
|
185
|
+
/[\u0000-\u001f\u007f]/.test(path) || path.split("/").some((part) => part === ".." || part === "." || part === ""))
|
|
186
|
+
return `"${path}" is not a folder inside the repository (no .., no absolute path).`;
|
|
187
|
+
return void 0;
|
|
188
|
+
}
|
|
189
|
+
__name(repoPathProblem, "repoPathProblem");
|
|
190
|
+
function splitRef(value) {
|
|
191
|
+
const at = value.indexOf("#");
|
|
192
|
+
if (at < 0) return { base: value };
|
|
193
|
+
return { base: value.slice(0, at), ref: value.slice(at + 1) };
|
|
194
|
+
}
|
|
195
|
+
__name(splitRef, "splitRef");
|
|
196
|
+
function parseRemoteAddress(input) {
|
|
197
|
+
const value = input.trim();
|
|
198
|
+
if (value === "" || value.startsWith("-") || /\s/.test(value))
|
|
199
|
+
return { ok: false, message: NOT_AN_ADDRESS };
|
|
200
|
+
const scp = SCP_FORM.exec(splitRef(value).base);
|
|
201
|
+
if (scp !== null) {
|
|
202
|
+
const { base, ref } = splitRef(value);
|
|
203
|
+
if (ref !== void 0) {
|
|
204
|
+
const problem = refProblem(ref);
|
|
205
|
+
if (problem !== void 0) return { ok: false, message: problem };
|
|
206
|
+
}
|
|
207
|
+
return {
|
|
208
|
+
ok: true,
|
|
209
|
+
form: "git",
|
|
210
|
+
source: { source: "git", url: base, ...ref !== void 0 ? { ref } : {} }
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
if (/^https:\/\//i.test(value)) return parseHttps(value);
|
|
214
|
+
const short = SHORTHAND.exec(value);
|
|
215
|
+
if (short !== null && !value.includes(":")) {
|
|
216
|
+
const [, owner, repo, ref] = short;
|
|
217
|
+
if (owner === "." || owner === ".." || repo === "." || repo === "..")
|
|
218
|
+
return { ok: false, message: NOT_AN_ADDRESS };
|
|
219
|
+
if (ref !== void 0) {
|
|
220
|
+
const problem = refProblem(ref);
|
|
221
|
+
if (problem !== void 0) return { ok: false, message: problem };
|
|
222
|
+
}
|
|
223
|
+
return {
|
|
224
|
+
ok: true,
|
|
225
|
+
form: "github",
|
|
226
|
+
source: { source: "github", repo: `${owner}/${repo}`, ...ref !== void 0 ? { ref } : {} }
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
if (value.includes("/") && !value.includes(":"))
|
|
230
|
+
return {
|
|
231
|
+
ok: false,
|
|
232
|
+
message: `'${value.slice(0, 80)}' is not a valid GitHub owner/repo shorthand. For a Git repository use its full https:// address. For a hosted marketplace.json use its https:// address. For a folder on this computer start with ./ or use an absolute path.`
|
|
233
|
+
};
|
|
234
|
+
return { ok: false, message: NOT_AN_ADDRESS };
|
|
235
|
+
}
|
|
236
|
+
__name(parseRemoteAddress, "parseRemoteAddress");
|
|
237
|
+
function parseHttps(value) {
|
|
238
|
+
if (/[\\\u0000-\u001f\u007f]/.test(value)) return { ok: false, message: NOT_AN_ADDRESS };
|
|
239
|
+
const { base, ref } = splitRef(value);
|
|
240
|
+
let url;
|
|
241
|
+
try {
|
|
242
|
+
url = new URL(base);
|
|
243
|
+
} catch {
|
|
244
|
+
return { ok: false, message: NOT_AN_ADDRESS };
|
|
245
|
+
}
|
|
246
|
+
if (url.username !== "" || url.password !== "" || url.search !== "")
|
|
247
|
+
return {
|
|
248
|
+
ok: false,
|
|
249
|
+
message: "Remove the sign-in details from the address; Namzu uses your own Git setup."
|
|
250
|
+
};
|
|
251
|
+
if (ref !== void 0) {
|
|
252
|
+
const problem = refProblem(ref);
|
|
253
|
+
if (problem !== void 0) return { ok: false, message: problem };
|
|
254
|
+
}
|
|
255
|
+
const host = url.hostname.toLowerCase();
|
|
256
|
+
const path = url.pathname.replace(/\/+$/, "");
|
|
257
|
+
if (host === "github.com" && /\/(tree|blob)\//.test(path))
|
|
258
|
+
return {
|
|
259
|
+
ok: false,
|
|
260
|
+
message: "Use the repository address (owner/repo), not a page inside it."
|
|
261
|
+
};
|
|
262
|
+
const isGit = path.endsWith(".git") || path.includes("/_git/");
|
|
263
|
+
const hosted = KNOWN_GIT_HOSTS.includes(host) ? /^\/([\w.-]+)\/([\w.-]+?)(?:\.git)?$/.exec(path) : null;
|
|
264
|
+
if (hosted !== null && host === "github.com")
|
|
265
|
+
return {
|
|
266
|
+
ok: true,
|
|
267
|
+
form: "https",
|
|
268
|
+
source: {
|
|
269
|
+
source: "github",
|
|
270
|
+
repo: `${hosted[1]}/${hosted[2]}`,
|
|
271
|
+
...ref !== void 0 ? { ref } : {}
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
if (isGit || hosted !== null) {
|
|
275
|
+
const clean = hosted !== null ? `https://${host}/${hosted[1]}/${hosted[2]}.git` : `https://${host}${url.port ? `:${url.port}` : ""}${path}`;
|
|
276
|
+
return {
|
|
277
|
+
ok: true,
|
|
278
|
+
form: "https",
|
|
279
|
+
source: { source: "git", url: clean, ...ref !== void 0 ? { ref } : {} }
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
if (ref !== void 0)
|
|
283
|
+
return {
|
|
284
|
+
ok: false,
|
|
285
|
+
message: "A hosted marketplace.json address takes no #ref: it is one file, not a repository."
|
|
286
|
+
};
|
|
287
|
+
return {
|
|
288
|
+
ok: true,
|
|
289
|
+
form: "https",
|
|
290
|
+
source: { source: "url", url: `https://${host}${url.port ? `:${url.port}` : ""}${path}` }
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
__name(parseHttps, "parseHttps");
|
|
294
|
+
function gitUrlOf(source) {
|
|
295
|
+
return source.source === "github" ? `https://github.com/${source.repo}.git` : source.url;
|
|
296
|
+
}
|
|
297
|
+
__name(gitUrlOf, "gitUrlOf");
|
|
298
|
+
function describeSource(source) {
|
|
299
|
+
switch (source.source) {
|
|
300
|
+
case "github":
|
|
301
|
+
return `github.com/${String(source.repo)}`;
|
|
302
|
+
case "git":
|
|
303
|
+
case "url":
|
|
304
|
+
return String(source.url);
|
|
305
|
+
default:
|
|
306
|
+
return String(source.path ?? source.source);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
__name(describeSource, "describeSource");
|
|
310
|
+
function normalizeAddress(text2) {
|
|
311
|
+
let value = text2.trim();
|
|
312
|
+
const scp = /^[^@/\s]+@([^:/\s]+):\/?(.+)$/.exec(value);
|
|
313
|
+
let host;
|
|
314
|
+
let path;
|
|
315
|
+
if (scp !== null && !/^[a-z][a-z0-9+.-]*:\/\//i.test(value)) {
|
|
316
|
+
host = scp[1];
|
|
317
|
+
path = scp[2];
|
|
318
|
+
} else if (/^[a-z][a-z0-9+.-]*:\/\//i.test(value)) {
|
|
319
|
+
try {
|
|
320
|
+
const url = new URL(value);
|
|
321
|
+
host = gitStyleHost(value) ?? url.hostname;
|
|
322
|
+
path = url.pathname;
|
|
323
|
+
} catch {
|
|
324
|
+
value = value.replace(/^[a-z][a-z0-9+.-]*:\/\//i, "");
|
|
325
|
+
const at = value.indexOf("/");
|
|
326
|
+
host = at < 0 ? value : value.slice(0, at);
|
|
327
|
+
path = at < 0 ? "" : value.slice(at);
|
|
328
|
+
}
|
|
329
|
+
} else {
|
|
330
|
+
const at = value.indexOf("/");
|
|
331
|
+
host = at < 0 ? value : value.slice(0, at);
|
|
332
|
+
path = at < 0 ? "" : value.slice(at);
|
|
333
|
+
}
|
|
334
|
+
host = host.replace(/^[^@]*@/, "").replace(/:\d*$/, "").toLowerCase().replace(/\.+$/, "");
|
|
335
|
+
if (/[^\u0020-\u007e]/.test(host)) host = domainToASCII(host) || host;
|
|
336
|
+
if (host.startsWith("www.") && KNOWN_GIT_HOSTS.includes(host.slice(4))) host = host.slice(4);
|
|
337
|
+
const alias = Object.hasOwn(GITHUB_CONTENT_HOSTS, host) ? GITHUB_CONTENT_HOSTS[host] : void 0;
|
|
338
|
+
if (alias !== void 0) {
|
|
339
|
+
host = "github.com";
|
|
340
|
+
if (alias === "api") path = path.replace(/^\/repos(?=\/)/i, "");
|
|
341
|
+
}
|
|
342
|
+
try {
|
|
343
|
+
path = decodeURIComponent(path);
|
|
344
|
+
} catch {
|
|
345
|
+
}
|
|
346
|
+
path = path.toLowerCase().replace(/\/{2,}/g, "/").replace(/\/+$/, "").replace(/\.git$/, "").replace(/\/+$/, "");
|
|
347
|
+
if (host === "github.com") {
|
|
348
|
+
const segments = path.split("/").filter((part) => part !== "");
|
|
349
|
+
if (segments.length > 2) path = `/${segments.slice(0, 2).join("/")}`.replace(/\.git$/, "");
|
|
350
|
+
}
|
|
351
|
+
return `${host}${path.startsWith("/") || path === "" ? "" : "/"}${path}`;
|
|
352
|
+
}
|
|
353
|
+
__name(normalizeAddress, "normalizeAddress");
|
|
354
|
+
var SHA256 = /^[0-9a-f]{64}$/i;
|
|
355
|
+
var INSIDE_HOST = "it names a host inside this computer's own network";
|
|
356
|
+
function isInsideHost(host) {
|
|
357
|
+
const bare = host.toLowerCase().replace(/^\[|\]$/g, "").replace(/\.+$/, "");
|
|
358
|
+
if (bare === "localhost" || bare.endsWith(".localhost")) return true;
|
|
359
|
+
let canonical = bare;
|
|
360
|
+
if (/^[0-9a-fx.]+$/i.test(bare) || bare.includes(":")) {
|
|
361
|
+
try {
|
|
362
|
+
canonical = new URL(`http://${bare.includes(":") ? `[${bare}]` : bare}/`).hostname.replace(
|
|
363
|
+
/^\[|\]$/g,
|
|
364
|
+
""
|
|
365
|
+
);
|
|
366
|
+
} catch {
|
|
367
|
+
return false;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
return isPrivateAddress(canonical);
|
|
371
|
+
}
|
|
372
|
+
__name(isInsideHost, "isInsideHost");
|
|
373
|
+
function gitStyleHost(url) {
|
|
374
|
+
const match = /^[a-z][a-z0-9+.-]*:\/\/([^/?#]*)/i.exec(url);
|
|
375
|
+
if (match === null) return void 0;
|
|
376
|
+
let host = match[1].slice(match[1].lastIndexOf("@") + 1);
|
|
377
|
+
if (host.startsWith("[")) {
|
|
378
|
+
const close = host.indexOf("]");
|
|
379
|
+
host = close < 0 ? host : host.slice(0, close + 1);
|
|
380
|
+
} else {
|
|
381
|
+
host = host.replace(/:[^:]*$/, "");
|
|
382
|
+
}
|
|
383
|
+
host = host.toLowerCase().replace(/\.+$/, "");
|
|
384
|
+
if (/[^\u0020-\u007e]/.test(host)) host = domainToASCII(host) || host;
|
|
385
|
+
return host;
|
|
386
|
+
}
|
|
387
|
+
__name(gitStyleHost, "gitStyleHost");
|
|
388
|
+
function hostsDiffer(url, parsedHostname) {
|
|
389
|
+
const git = gitStyleHost(url);
|
|
390
|
+
if (git === void 0) return true;
|
|
391
|
+
let parsed = parsedHostname.toLowerCase().replace(/\.+$/, "");
|
|
392
|
+
if (/[^\u0020-\u007e]/.test(parsed)) parsed = domainToASCII(parsed) || parsed;
|
|
393
|
+
return git !== parsed;
|
|
394
|
+
}
|
|
395
|
+
__name(hostsDiffer, "hostsDiffer");
|
|
396
|
+
function gitUrlProblem(url, allowFile) {
|
|
397
|
+
if (url.startsWith("-") || /\s/.test(url)) return "it is not a Git address";
|
|
398
|
+
if (/[\\\u0000-\u001f\u007f]/.test(url)) return "it is not a Git address";
|
|
399
|
+
const scpHost = SCP_FORM.exec(url);
|
|
400
|
+
if (scpHost !== null) {
|
|
401
|
+
if (!allowFile && isInsideHost(scpHost[2])) return INSIDE_HOST;
|
|
402
|
+
return void 0;
|
|
403
|
+
}
|
|
404
|
+
if (/^https:\/\//i.test(url) || /^ssh:\/\//i.test(url)) {
|
|
405
|
+
let parsed;
|
|
406
|
+
try {
|
|
407
|
+
parsed = new URL(url);
|
|
408
|
+
} catch {
|
|
409
|
+
return "it is not a Git address";
|
|
410
|
+
}
|
|
411
|
+
if (parsed.password !== "" || parsed.protocol === "https:" && parsed.username !== "")
|
|
412
|
+
return "it has sign-in details in it";
|
|
413
|
+
if (parsed.hostname === "" || parsed.hostname.startsWith("-")) return "it names no host";
|
|
414
|
+
if (!allowFile && isInsideHost(parsed.hostname)) return INSIDE_HOST;
|
|
415
|
+
if (hostsDiffer(url, parsed.hostname)) return "it is not a Git address";
|
|
416
|
+
if (parsed.protocol === "ssh:") {
|
|
417
|
+
let user = parsed.username;
|
|
418
|
+
try {
|
|
419
|
+
user = decodeURIComponent(user);
|
|
420
|
+
} catch {
|
|
421
|
+
return "it has sign-in details Namzu cannot read";
|
|
422
|
+
}
|
|
423
|
+
if (user.startsWith("-") || /[\u0000-\u001f\u007f\s]/.test(user))
|
|
424
|
+
return "its user name is not one Namzu will pass to Git";
|
|
425
|
+
}
|
|
426
|
+
return void 0;
|
|
427
|
+
}
|
|
428
|
+
if (allowFile && (url.startsWith("/") || /^file:\/\//i.test(url))) return void 0;
|
|
429
|
+
return "only https and ssh addresses are accepted";
|
|
430
|
+
}
|
|
431
|
+
__name(gitUrlProblem, "gitUrlProblem");
|
|
432
|
+
function parseEntrySource(name, source, entry, allowFile = false) {
|
|
433
|
+
const kind = typeof source.source === "string" ? source.source : "";
|
|
434
|
+
const invalid = /* @__PURE__ */ __name((reason) => ({ ok: false, unsupported: false, reason }), "invalid");
|
|
435
|
+
const text2 = /* @__PURE__ */ __name((value) => typeof value === "string" && value !== "" ? value : void 0, "text");
|
|
436
|
+
if (kind === "npm" || kind === "command" || kind === "")
|
|
437
|
+
return {
|
|
438
|
+
ok: false,
|
|
439
|
+
unsupported: true,
|
|
440
|
+
reason: `${name} is obtained by ${kind === "" ? "an unknown means" : kind}, which Namzu does not install: it would run a package manager or another program to get the code.`
|
|
441
|
+
};
|
|
442
|
+
if (kind !== "github" && kind !== "url" && kind !== "git" && kind !== "git-subdir" && kind !== "archive")
|
|
443
|
+
return {
|
|
444
|
+
ok: false,
|
|
445
|
+
unsupported: true,
|
|
446
|
+
reason: `${name} is obtained by ${kind}, which Namzu does not install.`
|
|
447
|
+
};
|
|
448
|
+
if ("headers" in entry || "headersHelper" in entry || "headers" in source || "headersHelper" in source)
|
|
449
|
+
return {
|
|
450
|
+
ok: false,
|
|
451
|
+
unsupported: true,
|
|
452
|
+
reason: `${name} needs request headers or a helper program to download, which Namzu does not run.`
|
|
453
|
+
};
|
|
454
|
+
const ref = text2(source.ref);
|
|
455
|
+
const sha = text2(source.sha);
|
|
456
|
+
if (ref !== void 0) {
|
|
457
|
+
const problem2 = refProblem(ref);
|
|
458
|
+
if (problem2 !== void 0) return invalid(`${name}: ${problem2}`);
|
|
459
|
+
}
|
|
460
|
+
if (sha !== void 0 && !isCommitId(sha.toLowerCase()))
|
|
461
|
+
return invalid(`${name}: the sha pin must be a full 40 or 64 character commit id.`);
|
|
462
|
+
const pins = {
|
|
463
|
+
...ref !== void 0 ? { ref } : {},
|
|
464
|
+
...sha !== void 0 ? { sha: sha.toLowerCase() } : {}
|
|
465
|
+
};
|
|
466
|
+
if (kind === "github") {
|
|
467
|
+
const repo = text2(source.repo);
|
|
468
|
+
if (repo === void 0 || !/^[\w][\w.-]*\/[\w][\w.-]*$/.test(repo))
|
|
469
|
+
return invalid(`${name}: the GitHub source needs repo as owner/repo.`);
|
|
470
|
+
return { ok: true, source: { kind: "github", repo, ...pins } };
|
|
471
|
+
}
|
|
472
|
+
if (kind === "archive") {
|
|
473
|
+
const url2 = text2(source.url);
|
|
474
|
+
if (url2 === void 0 || !/^https:\/\//i.test(url2))
|
|
475
|
+
return invalid(`${name}: an archive must be downloaded over https.`);
|
|
476
|
+
let parsed;
|
|
477
|
+
try {
|
|
478
|
+
parsed = new URL(url2);
|
|
479
|
+
} catch {
|
|
480
|
+
return invalid(`${name}: the archive address is not an address.`);
|
|
481
|
+
}
|
|
482
|
+
if (parsed.username !== "" || parsed.password !== "")
|
|
483
|
+
return invalid(`${name}: remove the sign-in details from the archive address.`);
|
|
484
|
+
const sha256 = text2(source.sha256);
|
|
485
|
+
if (sha256 !== void 0 && !SHA256.test(sha256))
|
|
486
|
+
return invalid(`${name}: sha256 must be 64 hexadecimal characters.`);
|
|
487
|
+
return {
|
|
488
|
+
ok: true,
|
|
489
|
+
source: {
|
|
490
|
+
kind: "archive",
|
|
491
|
+
url: url2,
|
|
492
|
+
...sha256 !== void 0 ? { sha256: sha256.toLowerCase() } : {}
|
|
493
|
+
}
|
|
494
|
+
};
|
|
495
|
+
}
|
|
496
|
+
const url = text2(source.url);
|
|
497
|
+
if (url === void 0) return invalid(`${name}: the source has no url.`);
|
|
498
|
+
const problem = gitUrlProblem(url, allowFile);
|
|
499
|
+
if (problem !== void 0) return invalid(`${name}: ${problem}.`);
|
|
500
|
+
if (kind === "url") return { ok: true, source: { kind: "git", url, ...pins } };
|
|
501
|
+
const path = text2(source.path);
|
|
502
|
+
if (path === void 0) return invalid(`${name}: a git-subdir source needs a path.`);
|
|
503
|
+
const pathProblem = repoPathProblem(path);
|
|
504
|
+
if (pathProblem !== void 0) return invalid(`${name}: ${pathProblem}`);
|
|
505
|
+
return { ok: true, source: { kind: "git-subdir", url, path, ...pins } };
|
|
506
|
+
}
|
|
507
|
+
__name(parseEntrySource, "parseEntrySource");
|
|
508
|
+
|
|
509
|
+
// src/integrations/plugins/fetch/policy.ts
|
|
510
|
+
import { realpathSync } from "node:fs";
|
|
511
|
+
import { isAbsolute, resolve as resolve2 } from "node:path";
|
|
512
|
+
import { domainToASCII as domainToASCII2 } from "node:url";
|
|
513
|
+
function comparablePath(path) {
|
|
514
|
+
let real = resolve2(path);
|
|
515
|
+
try {
|
|
516
|
+
real = realpathSync(real);
|
|
517
|
+
} catch {
|
|
518
|
+
}
|
|
519
|
+
let text2 = real.replace(/\\/g, "/").replace(/\/+$/, "");
|
|
520
|
+
if (process.platform === "win32" || process.platform === "darwin") text2 = text2.toLowerCase();
|
|
521
|
+
return text2 === "" ? "/" : text2;
|
|
522
|
+
}
|
|
523
|
+
__name(comparablePath, "comparablePath");
|
|
524
|
+
function targetOf(source) {
|
|
525
|
+
if (source.source === "github")
|
|
526
|
+
return { key: normalizeAddress(`github.com/${String(source.repo)}`) };
|
|
527
|
+
if (source.source === "git" || source.source === "url")
|
|
528
|
+
return { key: normalizeAddress(String(source.url)) };
|
|
529
|
+
if (typeof source.path === "string" && source.path !== "")
|
|
530
|
+
return { path: comparablePath(source.path) };
|
|
531
|
+
return {};
|
|
532
|
+
}
|
|
533
|
+
__name(targetOf, "targetOf");
|
|
534
|
+
function isPathEntry(entry) {
|
|
535
|
+
return /^file:/i.test(entry) || isAbsolute(entry) || /^[a-z]:[\\/]/i.test(entry);
|
|
536
|
+
}
|
|
537
|
+
__name(isPathEntry, "isPathEntry");
|
|
538
|
+
function hostOf(key) {
|
|
539
|
+
return key.split("/")[0];
|
|
540
|
+
}
|
|
541
|
+
__name(hostOf, "hostOf");
|
|
542
|
+
function entryMatches(raw, target) {
|
|
543
|
+
const written = raw.trim();
|
|
544
|
+
if (written === "") return false;
|
|
545
|
+
if (written === "*") return true;
|
|
546
|
+
if (isPathEntry(written)) {
|
|
547
|
+
if (target.path === void 0) return false;
|
|
548
|
+
const wanted = comparablePath(written.replace(/^file:(\/\/)?/i, ""));
|
|
549
|
+
return wanted === "/" || target.path === wanted || target.path.startsWith(`${wanted}/`);
|
|
550
|
+
}
|
|
551
|
+
const entry = written.toLowerCase();
|
|
552
|
+
const key = target.key;
|
|
553
|
+
if (key === void 0) return false;
|
|
554
|
+
if (entry.startsWith("*.")) {
|
|
555
|
+
const written2 = entry.slice(2).replace(/\.+$/, "");
|
|
556
|
+
const host = /[^\u0020-\u007e]/.test(written2) ? domainToASCII2(written2) || written2 : written2;
|
|
557
|
+
return host !== "" && !host.includes("/") && hostOf(key).endsWith(`.${host}`);
|
|
558
|
+
}
|
|
559
|
+
let body = entry;
|
|
560
|
+
const wildcard = body.endsWith("/*");
|
|
561
|
+
if (wildcard) body = body.slice(0, -2);
|
|
562
|
+
const hasScheme = /^[a-z][a-z0-9+.-]*:\/\//.test(body);
|
|
563
|
+
if (!hasScheme && !body.split("/")[0]?.includes(".") && !body.includes("@"))
|
|
564
|
+
body = `github.com/${body}`;
|
|
565
|
+
body = normalizeAddress(body);
|
|
566
|
+
if (body === "") return false;
|
|
567
|
+
if (wildcard) return key.startsWith(`${body}/`);
|
|
568
|
+
if (!body.includes("/")) return hostOf(key) === body || hostOf(key).endsWith(`.${body}`);
|
|
569
|
+
return key === body;
|
|
570
|
+
}
|
|
571
|
+
__name(entryMatches, "entryMatches");
|
|
572
|
+
function matchesPolicyList(source, entries) {
|
|
573
|
+
if (entries === void 0 || entries.length === 0) return false;
|
|
574
|
+
const target = targetOf(source);
|
|
575
|
+
return entries.some((entry) => entryMatches(entry, target));
|
|
576
|
+
}
|
|
577
|
+
__name(matchesPolicyList, "matchesPolicyList");
|
|
578
|
+
function isBlockedSource(source, blocked) {
|
|
579
|
+
return matchesPolicyList(source, blocked);
|
|
580
|
+
}
|
|
581
|
+
__name(isBlockedSource, "isBlockedSource");
|
|
582
|
+
function sourceRefusal(source, policy) {
|
|
583
|
+
if (matchesPolicyList(source, policy.blocked)) return "blocked";
|
|
584
|
+
if (policy.allowed !== void 0 && !matchesPolicyList(source, policy.allowed))
|
|
585
|
+
return "not-allowed";
|
|
586
|
+
return void 0;
|
|
587
|
+
}
|
|
588
|
+
__name(sourceRefusal, "sourceRefusal");
|
|
589
|
+
|
|
590
|
+
// src/integrations/plugins/install-manifest.ts
|
|
591
|
+
import { createHash } from "node:crypto";
|
|
592
|
+
import { lstatSync, readFileSync, readdirSync, realpathSync as realpathSync2 } from "node:fs";
|
|
593
|
+
import { isAbsolute as isAbsolute2, join as join2, relative, resolve as resolve3, sep } from "node:path";
|
|
594
|
+
var INSTALL_MANIFEST_VERSION = 1;
|
|
595
|
+
function installManifestPath(home, id) {
|
|
596
|
+
return join2(installManifestsFolder(home), `${id}.json`);
|
|
597
|
+
}
|
|
598
|
+
__name(installManifestPath, "installManifestPath");
|
|
599
|
+
function canonicalJson(value) {
|
|
600
|
+
if (Array.isArray(value)) return `[${value.map(canonicalJson).join(",")}]`;
|
|
601
|
+
if (isRecord(value)) {
|
|
602
|
+
return `{${Object.keys(value).sort().map((key) => `${JSON.stringify(key)}:${canonicalJson(value[key])}`).join(",")}}`;
|
|
603
|
+
}
|
|
604
|
+
return JSON.stringify(value) ?? "null";
|
|
605
|
+
}
|
|
606
|
+
__name(canonicalJson, "canonicalJson");
|
|
607
|
+
var MANIFEST_METADATA = ["version", "description", "author"];
|
|
608
|
+
function manifestDigest(manifest) {
|
|
609
|
+
const rest = { ...manifest };
|
|
610
|
+
for (const key of MANIFEST_METADATA) delete rest[key];
|
|
611
|
+
return sha256Hex(canonicalJson(rest));
|
|
612
|
+
}
|
|
613
|
+
__name(manifestDigest, "manifestDigest");
|
|
614
|
+
function sha256Hex(data) {
|
|
615
|
+
return createHash("sha256").update(data).digest("hex");
|
|
616
|
+
}
|
|
617
|
+
__name(sha256Hex, "sha256Hex");
|
|
618
|
+
function surfaceDigest(surface, files, executable) {
|
|
619
|
+
const hashes = [...executable].sort().map((path) => `${path} ${files[path] ?? ""}`);
|
|
620
|
+
return sha256Hex(`${canonicalJson(surface)}
|
|
621
|
+
${hashes.join("\n")}`);
|
|
622
|
+
}
|
|
623
|
+
__name(surfaceDigest, "surfaceDigest");
|
|
624
|
+
function readInstallManifest(home, id) {
|
|
625
|
+
const read = readJsonObject(installManifestPath(home, id));
|
|
626
|
+
if (read.state === "missing") return { state: "missing" };
|
|
627
|
+
if (read.state === "unreadable") return read;
|
|
628
|
+
const raw = read.raw;
|
|
629
|
+
if (raw.version !== INSTALL_MANIFEST_VERSION)
|
|
630
|
+
return {
|
|
631
|
+
state: "unreadable",
|
|
632
|
+
reason: `version ${String(raw.version)} is not one this Namzu reads`
|
|
633
|
+
};
|
|
634
|
+
if (raw.id !== id) return { state: "unreadable", reason: "it names another plugin" };
|
|
635
|
+
if (!Array.isArray(raw.executable) || !raw.executable.every((p) => typeof p === "string"))
|
|
636
|
+
return { state: "unreadable", reason: "its list of executable files is not a list of paths" };
|
|
637
|
+
if (!isRecord(raw.files) || !Object.values(raw.files).every(
|
|
638
|
+
(hash) => typeof hash === "string" && /^[0-9a-f]{64}$/.test(hash)
|
|
639
|
+
))
|
|
640
|
+
return { state: "unreadable", reason: "its file hashes are not sha256 values" };
|
|
641
|
+
if (!isRecord(raw.surface)) return { state: "unreadable", reason: "its surface is not a mapping" };
|
|
642
|
+
if (typeof raw.surfaceSha256 !== "string")
|
|
643
|
+
return { state: "unreadable", reason: "it has no surface digest" };
|
|
644
|
+
return {
|
|
645
|
+
state: "ok",
|
|
646
|
+
manifest: {
|
|
647
|
+
id,
|
|
648
|
+
executable: raw.executable,
|
|
649
|
+
files: raw.files,
|
|
650
|
+
surface: raw.surface,
|
|
651
|
+
surfaceSha256: raw.surfaceSha256,
|
|
652
|
+
...typeof raw.manifestSha256 === "string" ? { manifestSha256: raw.manifestSha256 } : {},
|
|
653
|
+
...isRecord(raw.installedFrom) ? { installedFrom: raw.installedFrom } : {},
|
|
654
|
+
...isRecord(raw.consent) ? { consent: raw.consent } : {}
|
|
655
|
+
}
|
|
656
|
+
};
|
|
657
|
+
}
|
|
658
|
+
__name(readInstallManifest, "readInstallManifest");
|
|
659
|
+
function within(outer, inner) {
|
|
660
|
+
const rel = relative(outer, inner);
|
|
661
|
+
return rel === "" || !rel.startsWith("..") && !isAbsolute2(rel);
|
|
662
|
+
}
|
|
663
|
+
__name(within, "within");
|
|
664
|
+
function isInsidePluginCache(home, path) {
|
|
665
|
+
const cache = realOrNothing(pluginCacheFolder(home));
|
|
666
|
+
const real = realOrNothing(path);
|
|
667
|
+
return cache !== void 0 && real !== void 0 && real !== cache && within(cache, real);
|
|
668
|
+
}
|
|
669
|
+
__name(isInsidePluginCache, "isInsidePluginCache");
|
|
670
|
+
function realOrNothing(path) {
|
|
671
|
+
try {
|
|
672
|
+
return realpathSync2.native(path);
|
|
673
|
+
} catch {
|
|
674
|
+
return void 0;
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
__name(realOrNothing, "realOrNothing");
|
|
678
|
+
var CONFIG_FOLDERS = /* @__PURE__ */ new Set(["agents", "commands", "skills"]);
|
|
679
|
+
function isConfigFile(path) {
|
|
680
|
+
const parts = path.split("/");
|
|
681
|
+
const name = parts[parts.length - 1] ?? "";
|
|
682
|
+
const lower = name.toLowerCase();
|
|
683
|
+
if (lower.endsWith(".json")) return true;
|
|
684
|
+
if (!lower.endsWith(".md")) return false;
|
|
685
|
+
return lower === "skill.md" || parts.slice(0, -1).some((part) => CONFIG_FOLDERS.has(part));
|
|
686
|
+
}
|
|
687
|
+
__name(isConfigFile, "isConfigFile");
|
|
688
|
+
var PROGRAM_EXTENSIONS = /* @__PURE__ */ new Set([
|
|
689
|
+
".js",
|
|
690
|
+
".mjs",
|
|
691
|
+
".cjs",
|
|
692
|
+
".sh",
|
|
693
|
+
".ps1",
|
|
694
|
+
".bat",
|
|
695
|
+
".cmd",
|
|
696
|
+
".py",
|
|
697
|
+
".rb",
|
|
698
|
+
".pl",
|
|
699
|
+
".ts",
|
|
700
|
+
".mts",
|
|
701
|
+
".cts",
|
|
702
|
+
".tsx",
|
|
703
|
+
".jsx",
|
|
704
|
+
".php",
|
|
705
|
+
".lua",
|
|
706
|
+
".vbs",
|
|
707
|
+
".exe",
|
|
708
|
+
".jar",
|
|
709
|
+
".wasm"
|
|
710
|
+
]);
|
|
711
|
+
function isExecutablePath(path, mode) {
|
|
712
|
+
if (isConfigFile(path)) return true;
|
|
713
|
+
if (path.startsWith("hooks/") || path.startsWith("bin/")) return true;
|
|
714
|
+
if ((mode & 73) !== 0) return true;
|
|
715
|
+
const dot = path.lastIndexOf(".");
|
|
716
|
+
return dot >= 0 && PROGRAM_EXTENSIONS.has(path.slice(dot).toLowerCase());
|
|
717
|
+
}
|
|
718
|
+
__name(isExecutablePath, "isExecutablePath");
|
|
719
|
+
function unlistedConfigFile(root, listed) {
|
|
720
|
+
const walk = /* @__PURE__ */ __name((dir, prefix) => {
|
|
721
|
+
let entries;
|
|
722
|
+
try {
|
|
723
|
+
entries = readdirSync(dir, { withFileTypes: true });
|
|
724
|
+
} catch {
|
|
725
|
+
return prefix === "" ? void 0 : prefix;
|
|
726
|
+
}
|
|
727
|
+
for (const entry of entries) {
|
|
728
|
+
const rel = prefix === "" ? entry.name : `${prefix}/${entry.name}`;
|
|
729
|
+
if (entry.isDirectory()) {
|
|
730
|
+
const found = walk(join2(dir, entry.name), rel);
|
|
731
|
+
if (found !== void 0) return found;
|
|
732
|
+
} else if (!listed.has(rel)) {
|
|
733
|
+
let mode = 0;
|
|
734
|
+
try {
|
|
735
|
+
mode = lstatSync(join2(dir, entry.name)).mode;
|
|
736
|
+
} catch {
|
|
737
|
+
return rel;
|
|
738
|
+
}
|
|
739
|
+
if (isExecutablePath(rel, mode)) return rel;
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
return void 0;
|
|
743
|
+
}, "walk");
|
|
744
|
+
return walk(root, "");
|
|
745
|
+
}
|
|
746
|
+
__name(unlistedConfigFile, "unlistedConfigFile");
|
|
747
|
+
function verifyInstalledCopy(home, id, installPath, recordedDigest) {
|
|
748
|
+
const { name } = splitPluginId(id);
|
|
749
|
+
const again = "Reinstall it to review it again.";
|
|
750
|
+
const cache = realOrNothing(pluginCacheFolder(home));
|
|
751
|
+
const root = realOrNothing(installPath);
|
|
752
|
+
if (cache === void 0 || root === void 0 || root === cache || !within(cache, root))
|
|
753
|
+
return {
|
|
754
|
+
ok: false,
|
|
755
|
+
code: "outside-cache",
|
|
756
|
+
message: `${name} is not in the plugin cache, so it did not load. ${again}`
|
|
757
|
+
};
|
|
758
|
+
const read = readInstallManifest(home, id);
|
|
759
|
+
if (read.state !== "ok")
|
|
760
|
+
return {
|
|
761
|
+
ok: false,
|
|
762
|
+
code: "no-manifest",
|
|
763
|
+
message: `${name} has no readable install manifest${read.state === "unreadable" ? ` (${read.reason})` : ""}, so it did not load. ${again}`
|
|
764
|
+
};
|
|
765
|
+
const manifest = read.manifest;
|
|
766
|
+
const changed = {
|
|
767
|
+
ok: false,
|
|
768
|
+
code: "changed",
|
|
769
|
+
message: `${name} changed on disk after you accepted it, so it did not load. ${again}`
|
|
770
|
+
};
|
|
771
|
+
if (surfaceDigest(manifest.surface, manifest.files, manifest.executable) !== manifest.surfaceSha256 || recordedDigest !== void 0 && recordedDigest !== manifest.surfaceSha256)
|
|
772
|
+
return changed;
|
|
773
|
+
for (const path of manifest.executable) {
|
|
774
|
+
const expected = manifest.files[path];
|
|
775
|
+
if (expected === void 0 || path.length === 0 || isAbsolute2(path)) return changed;
|
|
776
|
+
const target = resolve3(root, ...path.split("/"));
|
|
777
|
+
if (!target.startsWith(root + sep)) return changed;
|
|
778
|
+
try {
|
|
779
|
+
const entry = lstatSync(target);
|
|
780
|
+
if (!entry.isFile()) return changed;
|
|
781
|
+
const real = realOrNothing(target);
|
|
782
|
+
if (real === void 0 || !real.startsWith(root + sep)) return changed;
|
|
783
|
+
if (sha256Hex(readFileSync(target)) !== expected) return changed;
|
|
784
|
+
} catch {
|
|
785
|
+
return changed;
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
if (unlistedConfigFile(root, new Set(manifest.executable)) !== void 0) return changed;
|
|
789
|
+
return { ok: true };
|
|
790
|
+
}
|
|
791
|
+
__name(verifyInstalledCopy, "verifyInstalledCopy");
|
|
792
|
+
|
|
793
|
+
// src/integrations/plugins/marketplace.ts
|
|
794
|
+
import { lstatSync as lstatSync2, readFileSync as readFileSync2, realpathSync as realpathSync3 } from "node:fs";
|
|
795
|
+
import { basename, dirname, isAbsolute as isAbsolute3, join as join3, resolve as resolve4 } from "node:path";
|
|
796
|
+
var LOCAL_UPLOADS_MARKETPLACE = "local-uploads";
|
|
797
|
+
var RESERVED_MARKETPLACE_NAMES = [
|
|
798
|
+
LOCAL_UPLOADS_MARKETPLACE,
|
|
799
|
+
"inline",
|
|
800
|
+
"builtin",
|
|
801
|
+
"synced"
|
|
802
|
+
];
|
|
803
|
+
var MAX_CATALOG_PLUGINS = 500;
|
|
804
|
+
var MAX_CATALOG_BYTES = 10 * 1024 * 1024;
|
|
805
|
+
var NAME_RULE = /^[a-z0-9][a-z0-9._-]{0,63}$/;
|
|
806
|
+
function marketplaceNameProblem(name) {
|
|
807
|
+
if (!NAME_RULE.test(name) || name.includes(".."))
|
|
808
|
+
return `"${name}" is not a marketplace name. Use lowercase letters, digits, dots, dashes and underscores, starting with a letter or digit, at most 64 characters.`;
|
|
809
|
+
const lower = name.toLowerCase();
|
|
810
|
+
if (RESERVED_MARKETPLACE_NAMES.includes(lower) || lower === "namzu" || lower.startsWith("namzu-"))
|
|
811
|
+
return `The marketplace name "${name}" is reserved.`;
|
|
812
|
+
if (isOfficialLookingMarketplaceName(name))
|
|
813
|
+
return `The marketplace name "${name}" looks like an official catalog's name, which another marketplace may not use.`;
|
|
814
|
+
return void 0;
|
|
815
|
+
}
|
|
816
|
+
__name(marketplaceNameProblem, "marketplaceNameProblem");
|
|
817
|
+
var ENTRY_COMPONENT_FIELDS = [
|
|
818
|
+
"skills",
|
|
819
|
+
"commands",
|
|
820
|
+
"agents",
|
|
821
|
+
"hooks",
|
|
822
|
+
"mcpServers"
|
|
823
|
+
];
|
|
824
|
+
var ENTRY_SIDECAR_KEEPS = [
|
|
825
|
+
"name",
|
|
826
|
+
"description",
|
|
827
|
+
"version",
|
|
828
|
+
"author",
|
|
829
|
+
"strict",
|
|
830
|
+
"platforms",
|
|
831
|
+
"engines",
|
|
832
|
+
...ENTRY_COMPONENT_FIELDS
|
|
833
|
+
];
|
|
834
|
+
function catalogLocation(location, kind) {
|
|
835
|
+
if (kind === "file") {
|
|
836
|
+
const dir = dirname(location);
|
|
837
|
+
return { file: location, root: basename(dir) === COMMON_MANIFEST_DIR ? dirname(dir) : dir };
|
|
838
|
+
}
|
|
839
|
+
const inside = join3(location, COMMON_MANIFEST_DIR, COMMON_MARKETPLACE_FILE);
|
|
840
|
+
let file = inside;
|
|
841
|
+
try {
|
|
842
|
+
lstatSync2(inside);
|
|
843
|
+
} catch {
|
|
844
|
+
const plain = join3(location, COMMON_MARKETPLACE_FILE);
|
|
845
|
+
try {
|
|
846
|
+
lstatSync2(plain);
|
|
847
|
+
file = plain;
|
|
848
|
+
} catch {
|
|
849
|
+
file = inside;
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
return { file, root: location };
|
|
853
|
+
}
|
|
854
|
+
__name(catalogLocation, "catalogLocation");
|
|
855
|
+
function text(value, max = 1024) {
|
|
856
|
+
return typeof value === "string" && value.trim() !== "" ? value.trim().slice(0, max) : void 0;
|
|
857
|
+
}
|
|
858
|
+
__name(text, "text");
|
|
859
|
+
function readCatalog(location, kind) {
|
|
860
|
+
const { file, root } = catalogLocation(location, kind);
|
|
861
|
+
let stat;
|
|
862
|
+
try {
|
|
863
|
+
stat = lstatSync2(file);
|
|
864
|
+
} catch {
|
|
865
|
+
return {
|
|
866
|
+
ok: false,
|
|
867
|
+
missing: true,
|
|
868
|
+
reason: `There is no catalog at ${file}. A marketplace folder holds ${COMMON_MANIFEST_DIR}/${COMMON_MARKETPLACE_FILE}.`
|
|
869
|
+
};
|
|
870
|
+
}
|
|
871
|
+
if (!stat.isFile())
|
|
872
|
+
return { ok: false, reason: `${file} is a link or not a regular file, so it is not read.` };
|
|
873
|
+
if (stat.size > MAX_CATALOG_BYTES)
|
|
874
|
+
return { ok: false, reason: `${file} is larger than ${MAX_CATALOG_BYTES / (1024 * 1024)} MiB.` };
|
|
875
|
+
let parsed;
|
|
876
|
+
try {
|
|
877
|
+
parsed = JSON.parse(readFileSync2(file, "utf8"));
|
|
878
|
+
} catch (error) {
|
|
879
|
+
return {
|
|
880
|
+
ok: false,
|
|
881
|
+
reason: `${file} is not valid JSON (${error instanceof Error ? error.message : String(error)}).`
|
|
882
|
+
};
|
|
883
|
+
}
|
|
884
|
+
if (!isRecord(parsed))
|
|
885
|
+
return { ok: false, reason: `${file} is not a catalog: it is not a mapping.` };
|
|
886
|
+
const name = text(parsed.name, 200);
|
|
887
|
+
if (name === void 0) return { ok: false, reason: `${file} has no "name".` };
|
|
888
|
+
if (!Array.isArray(parsed.plugins)) return { ok: false, reason: `${file} has no "plugins" list.` };
|
|
889
|
+
if (parsed.plugins.length > MAX_CATALOG_PLUGINS)
|
|
890
|
+
return {
|
|
891
|
+
ok: false,
|
|
892
|
+
reason: `${file} lists ${parsed.plugins.length} plugins; at most ${MAX_CATALOG_PLUGINS} are read.`
|
|
893
|
+
};
|
|
894
|
+
const warnings = [];
|
|
895
|
+
const owner = isRecord(parsed.owner) ? text(parsed.owner.name, 200) : void 0;
|
|
896
|
+
if (owner === void 0) warnings.push("The catalog names no owner.");
|
|
897
|
+
const metadata = isRecord(parsed.metadata) ? parsed.metadata : {};
|
|
898
|
+
const pluginRoot = text(metadata.pluginRoot, 512);
|
|
899
|
+
const seen = /* @__PURE__ */ new Set();
|
|
900
|
+
const entries = [];
|
|
901
|
+
for (const [index, item] of parsed.plugins.entries()) {
|
|
902
|
+
if (!isRecord(item)) {
|
|
903
|
+
warnings.push(`Entry ${index + 1} is not a mapping and was left out.`);
|
|
904
|
+
continue;
|
|
905
|
+
}
|
|
906
|
+
const entryName = text(item.name, 64);
|
|
907
|
+
if (entryName === void 0 || !/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(entryName)) {
|
|
908
|
+
warnings.push(`Entry ${index + 1} has no usable name and was left out.`);
|
|
909
|
+
continue;
|
|
910
|
+
}
|
|
911
|
+
if (item.source === void 0 || typeof item.source !== "string" && !isRecord(item.source) || item.source === "") {
|
|
912
|
+
warnings.push(`${entryName} has no source and was left out.`);
|
|
913
|
+
continue;
|
|
914
|
+
}
|
|
915
|
+
if (seen.has(entryName)) {
|
|
916
|
+
warnings.push(`${entryName} is listed twice; the first entry is used.`);
|
|
917
|
+
continue;
|
|
918
|
+
}
|
|
919
|
+
seen.add(entryName);
|
|
920
|
+
const description = text(item.description);
|
|
921
|
+
const version = text(item.version, 64);
|
|
922
|
+
const author = typeof item.author === "string" ? text(item.author, 200) : void 0;
|
|
923
|
+
entries.push({
|
|
924
|
+
name: entryName,
|
|
925
|
+
source: item.source,
|
|
926
|
+
...description !== void 0 ? { description } : {},
|
|
927
|
+
...version !== void 0 ? { version } : {},
|
|
928
|
+
...author !== void 0 ? { author } : {},
|
|
929
|
+
strict: item.strict !== false,
|
|
930
|
+
raw: item
|
|
931
|
+
});
|
|
932
|
+
if (item.strict !== false && ENTRY_COMPONENT_FIELDS.some((field) => field in item))
|
|
933
|
+
warnings.push(
|
|
934
|
+
`${entryName} sets components inline without "strict": false, so they are ignored.`
|
|
935
|
+
);
|
|
936
|
+
}
|
|
937
|
+
return {
|
|
938
|
+
ok: true,
|
|
939
|
+
catalog: {
|
|
940
|
+
name,
|
|
941
|
+
...owner !== void 0 ? { owner } : {},
|
|
942
|
+
...pluginRoot !== void 0 ? { pluginRoot } : {},
|
|
943
|
+
entries,
|
|
944
|
+
warnings,
|
|
945
|
+
file,
|
|
946
|
+
root
|
|
947
|
+
}
|
|
948
|
+
};
|
|
949
|
+
}
|
|
950
|
+
__name(readCatalog, "readCatalog");
|
|
951
|
+
async function resolveEntrySource(entry, catalog, options = {}) {
|
|
952
|
+
const source = entry.source;
|
|
953
|
+
if (typeof source === "string") {
|
|
954
|
+
if (options.hosted === true)
|
|
955
|
+
return {
|
|
956
|
+
kind: "unsupported",
|
|
957
|
+
reason: `${entry.name} is a folder inside the marketplace, and a hosted catalog file has no folders behind it. Add the marketplace as a repository instead.`
|
|
958
|
+
};
|
|
959
|
+
let relative2;
|
|
960
|
+
if (source.startsWith("./") || source.startsWith("../") || source === ".") relative2 = source;
|
|
961
|
+
else if (catalog.pluginRoot !== void 0 && !isAbsolute3(source) && !/^[A-Za-z]:/.test(source))
|
|
962
|
+
relative2 = join3(catalog.pluginRoot, source);
|
|
963
|
+
else
|
|
964
|
+
return {
|
|
965
|
+
kind: "invalid",
|
|
966
|
+
reason: `The source "${source}" is not a folder path starting with ./, and the catalog sets no metadata.pluginRoot for a bare name.`
|
|
967
|
+
};
|
|
968
|
+
if (isAbsolute3(relative2) || /^[A-Za-z]:/.test(relative2))
|
|
969
|
+
return { kind: "invalid", reason: `The source "${source}" is an absolute path.` };
|
|
970
|
+
try {
|
|
971
|
+
const dir = await resolveWithinReal(catalog.root, relative2);
|
|
972
|
+
if (!lstatSync2(dir).isDirectory())
|
|
973
|
+
return { kind: "invalid", reason: `The source "${source}" is not a folder.` };
|
|
974
|
+
return { kind: "local", dir };
|
|
975
|
+
} catch (error) {
|
|
976
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
977
|
+
const leaves = /^Path escapes the working directory/.test(message);
|
|
978
|
+
return {
|
|
979
|
+
kind: "invalid",
|
|
980
|
+
reason: leaves ? `The source "${source}" leaves the marketplace folder, which is not allowed.` : `The source "${source}" cannot be used: ${message}`
|
|
981
|
+
};
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
if (isRecord(source)) {
|
|
985
|
+
const read = parseEntrySource(
|
|
986
|
+
entry.name,
|
|
987
|
+
source,
|
|
988
|
+
entry.raw,
|
|
989
|
+
options.allowFileProtocol === true
|
|
990
|
+
);
|
|
991
|
+
if (read.ok) return { kind: "remote", remote: read.source };
|
|
992
|
+
return read.unsupported ? { kind: "unsupported", reason: read.reason } : { kind: "invalid", reason: read.reason };
|
|
993
|
+
}
|
|
994
|
+
return { kind: "invalid", reason: "The entry has no usable source." };
|
|
995
|
+
}
|
|
996
|
+
__name(resolveEntrySource, "resolveEntrySource");
|
|
997
|
+
var NOT_AN_ADDRESS2 = "Not a marketplace address. Use owner/repo, an https:// address, or a folder path.";
|
|
998
|
+
function parseMarketplaceAddress(input, cwd) {
|
|
999
|
+
const value = input.trim();
|
|
1000
|
+
if (value === "") return { kind: "refused", message: NOT_AN_ADDRESS2 };
|
|
1001
|
+
if (/^http:\/\//i.test(value))
|
|
1002
|
+
return { kind: "refused", message: "Only https:// addresses are accepted, not http://." };
|
|
1003
|
+
if (/^file:\/\//i.test(value))
|
|
1004
|
+
return { kind: "refused", message: "Use a folder path, not a file:// address." };
|
|
1005
|
+
if (/^\\\\/.test(value) || /^\/\/[^/]/.test(value))
|
|
1006
|
+
return {
|
|
1007
|
+
kind: "refused",
|
|
1008
|
+
message: "A network share is not accepted. Copy the marketplace to this computer first."
|
|
1009
|
+
};
|
|
1010
|
+
if (/^(\.{1,2}([\\/]|$)|\/|~|[A-Za-z]:[\\/])/.test(value)) {
|
|
1011
|
+
const home = process.env.HOME ?? process.env.USERPROFILE ?? "";
|
|
1012
|
+
const expanded = value === "~" || /^~[\\/]/.test(value) ? join3(home, value.slice(1)) : value;
|
|
1013
|
+
return { kind: "path", path: resolve4(cwd, expanded) };
|
|
1014
|
+
}
|
|
1015
|
+
const remote = parseRemoteAddress(value);
|
|
1016
|
+
if (!remote.ok) return { kind: "refused", message: remote.message };
|
|
1017
|
+
return { kind: "remote", form: remote.form, text: value, source: remote.source };
|
|
1018
|
+
}
|
|
1019
|
+
__name(parseMarketplaceAddress, "parseMarketplaceAddress");
|
|
1020
|
+
function realPathOf(path) {
|
|
1021
|
+
try {
|
|
1022
|
+
return realpathSync3.native(path);
|
|
1023
|
+
} catch {
|
|
1024
|
+
return void 0;
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
__name(realPathOf, "realPathOf");
|
|
1028
|
+
|
|
1029
|
+
// src/integrations/plugins/installed-source.ts
|
|
1030
|
+
function sourcePolicyOf(config) {
|
|
1031
|
+
return { blocked: config?.blockedMarketplaces, allowed: config?.allowedMarketplaces };
|
|
1032
|
+
}
|
|
1033
|
+
__name(sourcePolicyOf, "sourcePolicyOf");
|
|
1034
|
+
function installedRefusalText(id, refusal) {
|
|
1035
|
+
if (refusal === "unverifiable")
|
|
1036
|
+
return `${id} was not loaded: the source of marketplace ${splitPluginId(id).marketplace} cannot be checked against your settings, because it is not recorded on this computer or its record cannot be read. Add the marketplace again to record it.`;
|
|
1037
|
+
return refusal === "blocked" ? `${id} was not loaded: its marketplace is turned off in your settings.` : `${id} was not loaded: its marketplace is not among the sources your settings allow.`;
|
|
1038
|
+
}
|
|
1039
|
+
__name(installedRefusalText, "installedRefusalText");
|
|
1040
|
+
function installedPluginRefusal(home, id, policy) {
|
|
1041
|
+
if ((policy.blocked?.length ?? 0) === 0 && policy.allowed === void 0) return void 0;
|
|
1042
|
+
const known = readKnownMarketplaces(home);
|
|
1043
|
+
if (known.state === "unreadable") return unverifiableUnlessLocal(home, id, void 0, policy);
|
|
1044
|
+
return judgeInstalled(home, known.marketplaces, id, void 0, policy);
|
|
1045
|
+
}
|
|
1046
|
+
__name(installedPluginRefusal, "installedPluginRefusal");
|
|
1047
|
+
function judgeInstalled(home, marketplaces, id, installPath, policy) {
|
|
1048
|
+
const name = splitPluginId(id).marketplace;
|
|
1049
|
+
if (name === LOCAL_UPLOADS_MARKETPLACE) return judgeLocalUpload(home, id, installPath, policy);
|
|
1050
|
+
const market = marketplaces.get(name);
|
|
1051
|
+
return market === void 0 ? "unverifiable" : sourceRefusal(market.source, policy);
|
|
1052
|
+
}
|
|
1053
|
+
__name(judgeInstalled, "judgeInstalled");
|
|
1054
|
+
function judgeLocalUpload(home, id, installPath, policy) {
|
|
1055
|
+
const recorded = readInstallManifest(home, id);
|
|
1056
|
+
const from = recorded.state === "ok" ? recorded.manifest.installedFrom?.source : void 0;
|
|
1057
|
+
const path = typeof from === "string" && from !== "" ? from : installPath;
|
|
1058
|
+
return sourceRefusal({ source: "directory", path: path ?? "/" }, policy);
|
|
1059
|
+
}
|
|
1060
|
+
__name(judgeLocalUpload, "judgeLocalUpload");
|
|
1061
|
+
function unverifiableUnlessLocal(home, id, installPath, policy) {
|
|
1062
|
+
return splitPluginId(id).marketplace === LOCAL_UPLOADS_MARKETPLACE ? judgeLocalUpload(home, id, installPath, policy) : "unverifiable";
|
|
1063
|
+
}
|
|
1064
|
+
__name(unverifiableUnlessLocal, "unverifiableUnlessLocal");
|
|
1065
|
+
function admissionScope(scope) {
|
|
1066
|
+
return scope === "user" ? "user" : "project";
|
|
1067
|
+
}
|
|
1068
|
+
__name(admissionScope, "admissionScope");
|
|
1069
|
+
var SPECIFICITY = { local: 3, project: 2, user: 1 };
|
|
1070
|
+
function readLayers(home, cwd, projectTrusted) {
|
|
1071
|
+
const layers = {
|
|
1072
|
+
user: readRecordLayer(recordLayerPath("user", { home, cwd }))
|
|
1073
|
+
};
|
|
1074
|
+
if (projectTrusted) {
|
|
1075
|
+
layers.project = readRecordLayer(recordLayerPath("project", { home, cwd }));
|
|
1076
|
+
layers.local = readRecordLayer(recordLayerPath("local", { home, cwd }));
|
|
1077
|
+
}
|
|
1078
|
+
return layers;
|
|
1079
|
+
}
|
|
1080
|
+
__name(readLayers, "readLayers");
|
|
1081
|
+
function unreadableLayerProblems(layers, home, cwd) {
|
|
1082
|
+
const out = [];
|
|
1083
|
+
for (const [layer, read] of Object.entries(layers)) {
|
|
1084
|
+
if (read?.state === "unreadable")
|
|
1085
|
+
out.push({
|
|
1086
|
+
id: void 0,
|
|
1087
|
+
message: `The plugin records in ${recordLayerPath(layer, { home, cwd })} could not be read (${read.reason}), so what it says was not used.`
|
|
1088
|
+
});
|
|
1089
|
+
}
|
|
1090
|
+
return out;
|
|
1091
|
+
}
|
|
1092
|
+
__name(unreadableLayerProblems, "unreadableLayerProblems");
|
|
1093
|
+
function planInstalledPlugins(options) {
|
|
1094
|
+
const { home, cwd, projectTrusted } = options;
|
|
1095
|
+
const layers = readLayers(home, cwd, projectTrusted);
|
|
1096
|
+
const problems = unreadableLayerProblems(layers, home, cwd);
|
|
1097
|
+
const read = readInstalledPlugins(home);
|
|
1098
|
+
if (read.state === "unreadable") {
|
|
1099
|
+
problems.push({
|
|
1100
|
+
id: void 0,
|
|
1101
|
+
message: `The install record could not be read, so no installed plugin was loaded: ${installedPluginsPath(home)} (${read.reason}). Nothing was changed.`
|
|
1102
|
+
});
|
|
1103
|
+
return { candidates: [], problems, layers, projectRead: projectTrusted };
|
|
1104
|
+
}
|
|
1105
|
+
for (const bad of read.invalid)
|
|
1106
|
+
problems.push({ id: bad.id, message: `A record of ${bad.id} was skipped: ${bad.reason}.` });
|
|
1107
|
+
const policy = options.policy;
|
|
1108
|
+
const policyActive = policy !== void 0 && ((policy.blocked?.length ?? 0) > 0 || policy.allowed !== void 0);
|
|
1109
|
+
const known = policyActive ? readKnownMarketplaces(home) : void 0;
|
|
1110
|
+
const candidates = [];
|
|
1111
|
+
for (const [id, records] of [...read.plugins.entries()].sort(([a], [b]) => a.localeCompare(b))) {
|
|
1112
|
+
const applicable = records.filter((record) => {
|
|
1113
|
+
if (!options.allowedScopes.includes(admissionScope(record.scope))) return false;
|
|
1114
|
+
if (record.scope === "user") return true;
|
|
1115
|
+
return projectTrusted && record.projectPath !== void 0 && samePath(record.projectPath, cwd);
|
|
1116
|
+
});
|
|
1117
|
+
if (applicable.length === 0) continue;
|
|
1118
|
+
const chosen = [...applicable].sort((a, b) => SPECIFICITY[b.scope] - SPECIFICITY[a.scope])[0];
|
|
1119
|
+
if (chosen === void 0) continue;
|
|
1120
|
+
if (policy !== void 0 && known !== void 0) {
|
|
1121
|
+
const refusal = known.state === "unreadable" ? unverifiableUnlessLocal(home, id, chosen.installPath, policy) : judgeInstalled(home, known.marketplaces, id, chosen.installPath, policy);
|
|
1122
|
+
if (refusal !== void 0) {
|
|
1123
|
+
problems.push({
|
|
1124
|
+
id,
|
|
1125
|
+
message: installedRefusalText(id, refusal)
|
|
1126
|
+
});
|
|
1127
|
+
continue;
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
const verdict = verifyInstalledCopy(home, id, chosen.installPath, chosen.surfaceSha256);
|
|
1131
|
+
if (!verdict.ok) {
|
|
1132
|
+
problems.push({ id, message: `${id}: ${verdict.message}` });
|
|
1133
|
+
continue;
|
|
1134
|
+
}
|
|
1135
|
+
candidates.push({
|
|
1136
|
+
id,
|
|
1137
|
+
name: splitPluginId(id).name,
|
|
1138
|
+
record: chosen,
|
|
1139
|
+
scope: admissionScope(chosen.scope),
|
|
1140
|
+
installPath: realPathOrResolved(chosen.installPath),
|
|
1141
|
+
answer: resolveEnabled(id, layers, installedHere(records, cwd))
|
|
1142
|
+
});
|
|
1143
|
+
}
|
|
1144
|
+
candidates.sort(
|
|
1145
|
+
(a, b) => (a.record.installedAt ?? "").localeCompare(b.record.installedAt ?? "") || a.id.localeCompare(b.id)
|
|
1146
|
+
);
|
|
1147
|
+
return { candidates, problems, layers, projectRead: projectTrusted };
|
|
1148
|
+
}
|
|
1149
|
+
__name(planInstalledPlugins, "planInstalledPlugins");
|
|
1150
|
+
function currentEnabledAnswer(options, id) {
|
|
1151
|
+
const layers = readLayers(options.home, options.cwd, options.projectTrusted);
|
|
1152
|
+
const read = readInstalledPlugins(options.home);
|
|
1153
|
+
const records = read.state === "unreadable" ? [] : read.plugins.get(id) ?? [];
|
|
1154
|
+
return resolveEnabled(id, layers, installedHere(records, options.cwd));
|
|
1155
|
+
}
|
|
1156
|
+
__name(currentEnabledAnswer, "currentEnabledAnswer");
|
|
1157
|
+
async function readInstalledManifest(candidate, where) {
|
|
1158
|
+
if (candidate.record.layout !== "common") return { findings: [] };
|
|
1159
|
+
const read = await readCommonLayout(candidate.installPath, {
|
|
1160
|
+
entrySidecar: true,
|
|
1161
|
+
installedIds: where.installedNames,
|
|
1162
|
+
paths: /* @__PURE__ */ __name(() => ({
|
|
1163
|
+
project: where.cwd,
|
|
1164
|
+
data: installedPluginDataFolder(where.home, candidate.id)
|
|
1165
|
+
}), "paths"),
|
|
1166
|
+
...candidate.record.version !== void 0 ? { version: candidate.record.version } : {}
|
|
1167
|
+
});
|
|
1168
|
+
if (read.refusal !== void 0) throw new Error(read.refusal.message);
|
|
1169
|
+
return read.manifest !== void 0 ? { manifest: read.manifest, findings: read.findings } : { findings: [] };
|
|
1170
|
+
}
|
|
1171
|
+
__name(readInstalledManifest, "readInstalledManifest");
|
|
1172
|
+
async function loadInstalledManifest(candidate, where) {
|
|
1173
|
+
const read = await readInstalledManifest(candidate, where);
|
|
1174
|
+
if (read.manifest !== void 0) return read.manifest;
|
|
1175
|
+
return (await loadPluginManifestWithFindings(candidate.installPath, { skillsSupported: true })).manifest;
|
|
1176
|
+
}
|
|
1177
|
+
__name(loadInstalledManifest, "loadInstalledManifest");
|
|
1178
|
+
|
|
1179
|
+
export {
|
|
1180
|
+
recordLayerPath,
|
|
1181
|
+
readRecordLayer,
|
|
1182
|
+
setEnabledPlugin,
|
|
1183
|
+
setExtraKnownMarketplace,
|
|
1184
|
+
removeExtraKnownMarketplace,
|
|
1185
|
+
isCommitId,
|
|
1186
|
+
refProblem,
|
|
1187
|
+
repoPathProblem,
|
|
1188
|
+
gitUrlOf,
|
|
1189
|
+
describeSource,
|
|
1190
|
+
gitUrlProblem,
|
|
1191
|
+
isBlockedSource,
|
|
1192
|
+
sourceRefusal,
|
|
1193
|
+
INSTALL_MANIFEST_VERSION,
|
|
1194
|
+
installManifestPath,
|
|
1195
|
+
manifestDigest,
|
|
1196
|
+
sha256Hex,
|
|
1197
|
+
surfaceDigest,
|
|
1198
|
+
readInstallManifest,
|
|
1199
|
+
isInsidePluginCache,
|
|
1200
|
+
isConfigFile,
|
|
1201
|
+
isExecutablePath,
|
|
1202
|
+
verifyInstalledCopy,
|
|
1203
|
+
LOCAL_UPLOADS_MARKETPLACE,
|
|
1204
|
+
MAX_CATALOG_PLUGINS,
|
|
1205
|
+
marketplaceNameProblem,
|
|
1206
|
+
ENTRY_SIDECAR_KEEPS,
|
|
1207
|
+
readCatalog,
|
|
1208
|
+
resolveEntrySource,
|
|
1209
|
+
parseMarketplaceAddress,
|
|
1210
|
+
realPathOf,
|
|
1211
|
+
sourcePolicyOf,
|
|
1212
|
+
installedRefusalText,
|
|
1213
|
+
installedPluginRefusal,
|
|
1214
|
+
admissionScope,
|
|
1215
|
+
readLayers,
|
|
1216
|
+
planInstalledPlugins,
|
|
1217
|
+
currentEnabledAnswer,
|
|
1218
|
+
readInstalledManifest,
|
|
1219
|
+
loadInstalledManifest
|
|
1220
|
+
};
|
|
1221
|
+
//# sourceMappingURL=chunk-RYOZ4HYY.js.map
|