@namzu/cli 59.0.0 → 60.1.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 +51 -0
- package/README.md +1 -1
- package/dist/bin.js +1 -1
- package/dist/chunks/{acp-AQUZCZSO.js → acp-6R4I2A3Q.js} +2063 -248
- package/dist/chunks/acp-6R4I2A3Q.js.map +6 -0
- package/dist/chunks/{activity-command-Y3A6GIFW.js → activity-command-JU4HLIQJ.js} +14 -14
- package/dist/chunks/{add-DWFKSOYI.js → add-S6JYKDI4.js} +24 -24
- package/dist/chunks/{agent-Z6PJYBAO.js → agent-E343AQV7.js} +53 -50
- package/dist/chunks/agent-session-D6JIOCON.js +95 -0
- package/dist/chunks/{apply-at-exit-SHGR2BAB.js → apply-at-exit-MEOJMGNT.js} +7 -7
- package/dist/chunks/{archive-KYXU4AZZ.js → archive-ZPWC7GZU.js} +13 -13
- package/dist/chunks/{auth-R3RCZZ7U.js → auth-6NX4TMIG.js} +12 -12
- package/dist/chunks/{bin-main-DUZFYUCJ.js → bin-main-P3KAQDKC.js} +8 -8
- package/dist/chunks/{binding-5UJYMFMU.js → binding-6QZVGFQ5.js} +3 -3
- package/dist/chunks/{browser-7CFZ6BZS.js → browser-KK2U5524.js} +7 -7
- package/dist/chunks/{chat-BELD32ZP.js → chat-VEXJRSZN.js} +17 -17
- package/dist/chunks/{chunk-OSC47PCX.js → chunk-2DCOB33W.js} +13 -7
- package/dist/chunks/{chunk-OSC47PCX.js.map → chunk-2DCOB33W.js.map} +1 -1
- package/dist/chunks/{chunk-MDBUSIPW.js → chunk-2KVQVPJ7.js} +5 -5
- package/dist/chunks/chunk-32OIBGYI.js +188 -0
- package/dist/chunks/chunk-32OIBGYI.js.map +6 -0
- package/dist/chunks/{chunk-MRZHTIE7.js → chunk-42JIZXVL.js} +4 -4
- package/dist/chunks/{chunk-ESIICAI3.js → chunk-4473VICE.js} +3 -3
- package/dist/chunks/{chunk-DGYMR4WJ.js → chunk-44YG6EI4.js} +4 -4
- package/dist/chunks/{chunk-ZQGCZYAE.js → chunk-452SL2Y4.js} +2 -2
- package/dist/chunks/{chunk-VE4XIWDW.js → chunk-4BNCVR3U.js} +2 -2
- package/dist/chunks/{chunk-2EVP6BX4.js → chunk-4CJ3HPOT.js} +2 -2
- package/dist/chunks/{chunk-4BAXYUZQ.js → chunk-4DSUVT37.js} +13 -10
- package/dist/chunks/chunk-4DSUVT37.js.map +6 -0
- package/dist/chunks/{chunk-TORIEDBN.js → chunk-4ENL4VUO.js} +4 -4
- package/dist/chunks/{chunk-IJ6Z6FNY.js → chunk-4KVYTHY7.js} +3 -3
- package/dist/chunks/{chunk-YNWPC3HO.js → chunk-4Y242BU4.js} +5 -5
- package/dist/chunks/{chunk-OA7QKUCM.js → chunk-5F4DSPZC.js} +10 -10
- package/dist/chunks/{chunk-DRWJTADQ.js → chunk-5IGEQN7L.js} +4 -4
- package/dist/chunks/{chunk-W752G3FM.js → chunk-5ZLKTFU2.js} +3 -3
- package/dist/chunks/{chunk-KETRBV2E.js → chunk-66QIFMEO.js} +2 -2
- package/dist/chunks/{chunk-4TIUY3Q6.js → chunk-6HYK4DDB.js} +36 -14
- package/dist/chunks/{chunk-4TIUY3Q6.js.map → chunk-6HYK4DDB.js.map} +1 -1
- package/dist/chunks/{chunk-AEXGGJUW.js → chunk-6TUHWKXP.js} +15 -6
- package/dist/chunks/chunk-6TUHWKXP.js.map +6 -0
- package/dist/chunks/{chunk-CEZW3NVM.js → chunk-6W3UGXGG.js} +4 -4
- package/dist/chunks/{chunk-S7FE35WQ.js → chunk-75YLZNZW.js} +3 -3
- package/dist/chunks/{chunk-P4TCLMD6.js → chunk-AC5P6W3G.js} +2 -2
- package/dist/chunks/chunk-AMYP2WPW.js +1055 -0
- package/dist/chunks/chunk-AMYP2WPW.js.map +6 -0
- package/dist/chunks/{chunk-GUK47JTV.js → chunk-AYMB4AOZ.js} +4 -4
- package/dist/chunks/{chunk-23D5IXMW.js → chunk-B4AOCHH6.js} +3 -3
- package/dist/chunks/{chunk-FEOS7UZ2.js → chunk-BA7KUG6V.js} +2 -2
- package/dist/chunks/{chunk-D35UCVTK.js → chunk-BHQHTM3Z.js} +5 -5
- package/dist/chunks/chunk-BJT37HR4.js +3644 -0
- package/dist/chunks/chunk-BJT37HR4.js.map +6 -0
- package/dist/chunks/{chunk-KPOOM7QT.js → chunk-BNLIRJ3M.js} +4 -4
- package/dist/chunks/{chunk-MDVYEFTI.js → chunk-BURGRQWO.js} +2 -2
- package/dist/chunks/{chunk-DKSFQRUM.js → chunk-BWD2TUI4.js} +5 -5
- package/dist/chunks/{chunk-HGTOAMV6.js → chunk-BZR5PIFF.js} +2098 -812
- package/dist/chunks/chunk-BZR5PIFF.js.map +6 -0
- package/dist/chunks/{chunk-7Y4RR47U.js → chunk-C7E7YCRD.js} +5 -5
- package/dist/chunks/{chunk-44MFZJ24.js → chunk-CXW7I2S3.js} +2 -2
- package/dist/chunks/{chunk-3ETXWTV4.js → chunk-D2R47LDH.js} +121 -8
- package/dist/chunks/chunk-D2R47LDH.js.map +6 -0
- package/dist/chunks/chunk-D4TXOX34.js +342 -0
- package/dist/chunks/chunk-D4TXOX34.js.map +6 -0
- package/dist/chunks/{chunk-73HWWJYC.js → chunk-D6PB3Z7Q.js} +2 -2
- package/dist/chunks/{chunk-QTHG6UPU.js → chunk-DEAG4G5J.js} +2 -2
- package/dist/chunks/{chunk-WGC5DJEW.js → chunk-DRSQTKDN.js} +3 -3
- package/dist/chunks/chunk-EBBT2I5S.js +153 -0
- package/dist/chunks/chunk-EBBT2I5S.js.map +6 -0
- package/dist/chunks/{chunk-FK5C7SHM.js → chunk-EWPGU4HH.js} +10 -441
- package/dist/chunks/chunk-EWPGU4HH.js.map +6 -0
- package/dist/chunks/{chunk-WXYRLTRY.js → chunk-EXJJLYZK.js} +3 -3
- package/dist/chunks/{chunk-PFVYYH6O.js → chunk-F5W4TNCR.js} +2 -2
- package/dist/chunks/{chunk-Q6PZODSV.js → chunk-F7KOBJVW.js} +4 -4
- package/dist/chunks/{chunk-VSNV3U2B.js → chunk-FK4MAZV2.js} +5 -5
- package/dist/chunks/{chunk-ATCVFWXD.js → chunk-FMD4REZQ.js} +41 -41
- package/dist/chunks/{chunk-ATCVFWXD.js.map → chunk-FMD4REZQ.js.map} +1 -1
- package/dist/chunks/{chunk-G5LPTLLY.js → chunk-FPC3K4TT.js} +3 -3
- package/dist/chunks/{chunk-XLXPPVUT.js → chunk-FVIKYFYD.js} +2 -2
- package/dist/chunks/{chunk-PQT7624W.js → chunk-GPTYDM26.js} +8 -8
- package/dist/chunks/{chunk-TP7DRQXE.js → chunk-GT22EDUB.js} +6 -6
- package/dist/chunks/{chunk-GEVWZWLM.js → chunk-GTUTBTOV.js} +3 -3
- package/dist/chunks/{chunk-GQ6WXY3M.js → chunk-H6NTNPWD.js} +4 -4
- package/dist/chunks/{chunk-TYNAB5GR.js → chunk-HCQGZPVT.js} +2 -2
- package/dist/chunks/{chunk-LB4HC5U7.js → chunk-HG2PPCAE.js} +3 -3
- package/dist/chunks/{chunk-ABKURT35.js → chunk-HKRUNZVI.js} +3 -3
- package/dist/chunks/{chunk-JPM3JXZB.js → chunk-HM7L5PM2.js} +3 -3
- package/dist/chunks/{chunk-UFGLSUGU.js → chunk-I4RC6KQQ.js} +19 -19
- package/dist/chunks/{chunk-HW2QBNAA.js → chunk-IL4Y3JGT.js} +13 -13
- package/dist/chunks/{chunk-D3SCA6NT.js → chunk-IMMUS7IW.js} +278 -7
- package/dist/chunks/chunk-IMMUS7IW.js.map +6 -0
- package/dist/chunks/{chunk-D6XZ4ZAV.js → chunk-IQ44C7Y3.js} +33 -9
- package/dist/chunks/chunk-IQ44C7Y3.js.map +6 -0
- package/dist/chunks/{chunk-24EZWZDZ.js → chunk-J4PL65DJ.js} +6 -6
- package/dist/chunks/chunk-JANK2R3L.js +402 -0
- package/dist/chunks/chunk-JANK2R3L.js.map +6 -0
- package/dist/chunks/{chunk-E65IWYTT.js → chunk-JECLB23L.js} +6 -6
- package/dist/chunks/{chunk-3RLKUXXG.js → chunk-JJ72TLOA.js} +15 -15
- package/dist/chunks/{chunk-CG5CGXNF.js → chunk-JRBFL6WT.js} +2 -2
- package/dist/chunks/{chunk-KBLYZ7L7.js → chunk-K2EKXCLZ.js} +3 -3
- package/dist/chunks/{chunk-567CSU37.js → chunk-K7YZJV2X.js} +248 -24
- package/dist/chunks/chunk-K7YZJV2X.js.map +6 -0
- package/dist/chunks/chunk-KF6IKSF2.js +472 -0
- package/dist/chunks/chunk-KF6IKSF2.js.map +6 -0
- package/dist/chunks/{chunk-OQWLQUO7.js → chunk-KSRN5Y2O.js} +196 -59
- package/dist/chunks/chunk-KSRN5Y2O.js.map +6 -0
- package/dist/chunks/{chunk-WW3AU2YN.js → chunk-ME4LETA3.js} +2 -2
- package/dist/chunks/{chunk-J5E4DV6R.js → chunk-MF3SFDBW.js} +3 -3
- package/dist/chunks/{chunk-WSDZIJNK.js → chunk-MK42KB72.js} +4 -4
- package/dist/chunks/{chunk-RZKIZTPA.js → chunk-MUSGZEFY.js} +2 -2
- package/dist/chunks/{chunk-MF5KTVGJ.js → chunk-N5CCXOYK.js} +7 -7
- package/dist/chunks/{chunk-KVNL7XA6.js → chunk-NBJ5PRAY.js} +3 -3
- package/dist/chunks/{chunk-E4RVHFV6.js → chunk-NKHEBASJ.js} +2 -2
- package/dist/chunks/{chunk-SS6IJAPA.js → chunk-NVWD5XDT.js} +2 -2
- package/dist/chunks/{chunk-7LDUPEXP.js → chunk-O45DCUNX.js} +2 -2
- package/dist/chunks/{chunk-KHGY6QJR.js → chunk-O4EILTV6.js} +145 -20
- package/dist/chunks/chunk-O4EILTV6.js.map +6 -0
- package/dist/chunks/{chunk-G76POTWW.js → chunk-PAUMCJPX.js} +3 -3
- package/dist/chunks/{chunk-MF57EX7H.js → chunk-PE4MWWUW.js} +3 -3
- package/dist/chunks/{chunk-4RW7GDJ4.js → chunk-PLCWCIL4.js} +2 -2
- package/dist/chunks/{chunk-XVOPQCPD.js → chunk-PRJO4XM3.js} +2 -2
- package/dist/chunks/{chunk-CQFWLYTK.js → chunk-PRRX5LNR.js} +2 -2
- package/dist/chunks/{chunk-3PH6F6Z3.js → chunk-PS5SVAUJ.js} +2 -2
- package/dist/chunks/chunk-PZLPACNY.js +407 -0
- package/dist/chunks/chunk-PZLPACNY.js.map +6 -0
- package/dist/chunks/{chunk-P725GKKG.js → chunk-PZWSRAE7.js} +6 -6
- package/dist/chunks/{chunk-6IOZY2AB.js → chunk-QBLHOG2F.js} +36 -14
- package/dist/chunks/chunk-QBLHOG2F.js.map +6 -0
- package/dist/chunks/{chunk-CNSKJ3DZ.js → chunk-QCV3HH4P.js} +2 -2
- package/dist/chunks/{chunk-7J23SPSX.js → chunk-QGBR42TV.js} +8 -7
- package/dist/chunks/{chunk-6CSJRIUZ.js → chunk-QNJXULU7.js} +2 -2
- package/dist/chunks/{chunk-5JVKE4LB.js → chunk-QQ4S6MNH.js} +13638 -4103
- package/dist/chunks/chunk-QQ4S6MNH.js.map +6 -0
- package/dist/chunks/{chunk-DJKWBSVM.js → chunk-R2KAESOM.js} +2 -2
- package/dist/chunks/{chunk-AIQKSTVJ.js → chunk-R6M6EIAH.js} +4 -4
- package/dist/chunks/{chunk-VJHENTNB.js → chunk-RKKU2RE4.js} +2 -2
- package/dist/chunks/{chunk-JZTTOZRG.js → chunk-RMOTHWPV.js} +2 -2
- package/dist/chunks/{chunk-EA6YICQ7.js → chunk-RQAY7REG.js} +3 -3
- package/dist/chunks/{chunk-LWJJDERP.js → chunk-SLTJNYOU.js} +2 -2
- package/dist/chunks/{chunk-UL6MZ5OM.js → chunk-SXONHO4H.js} +9 -9
- package/dist/chunks/{chunk-W4S4ZBXX.js → chunk-T7ILM666.js} +11 -11
- package/dist/chunks/{chunk-E6FMAE5Q.js → chunk-TBGKPWCL.js} +9 -9
- package/dist/chunks/{chunk-ACO3LTRT.js → chunk-TBJ6XU3T.js} +3 -3
- package/dist/chunks/{chunk-5HMJ3DYR.js → chunk-TMPP2DEY.js} +4 -4
- package/dist/chunks/{chunk-6YXHH5JW.js → chunk-TSOZBRM6.js} +2 -2
- package/dist/chunks/{chunk-SSPHAILP.js → chunk-TTFPWGIU.js} +2 -2
- package/dist/chunks/{chunk-TRRKG642.js → chunk-TTKMQW6B.js} +3 -3
- package/dist/chunks/{chunk-2VP2Q657.js → chunk-UCML5ZXB.js} +3 -3
- package/dist/chunks/{chunk-OH7EYW3T.js → chunk-VG7245VJ.js} +6 -6
- package/dist/chunks/{chunk-QZTTIL3A.js → chunk-VQZPXK4X.js} +3 -3
- package/dist/chunks/{chunk-O2PZDA5H.js → chunk-VWUTJ4EU.js} +3 -3
- package/dist/chunks/{chunk-VL6Z2OMG.js → chunk-WDKAL7EW.js} +2 -2
- package/dist/chunks/{chunk-2KC52MDS.js → chunk-WJ6QRVL6.js} +2 -2
- package/dist/chunks/{chunk-XJALHM5Z.js → chunk-WOTA5FO5.js} +3 -3
- package/dist/chunks/{chunk-4TJ7AGQO.js → chunk-WPGVZMSU.js} +2 -2
- package/dist/chunks/{chunk-IRAG3YXW.js → chunk-WYA4QWWE.js} +181 -7
- package/dist/chunks/chunk-WYA4QWWE.js.map +6 -0
- package/dist/chunks/{chunk-DJTCZSSY.js → chunk-XDUA6PBP.js} +2 -2
- package/dist/chunks/{chunk-PKFXIWVX.js → chunk-XE6XT6R6.js} +4 -4
- package/dist/chunks/{chunk-JUDJGDYX.js → chunk-XNQY26AE.js} +31 -131
- package/dist/chunks/chunk-XNQY26AE.js.map +6 -0
- package/dist/chunks/{chunk-FRGOWO6N.js → chunk-YR3TWNIV.js} +13 -12
- package/dist/chunks/chunk-YR3TWNIV.js.map +6 -0
- package/dist/chunks/{chunk-LXJW3ZYI.js → chunk-YWRRS7SO.js} +2 -2
- package/dist/chunks/{chunk-OOJP5BEK.js → chunk-Z5OG4HXI.js} +51 -25
- package/dist/chunks/chunk-Z5OG4HXI.js.map +6 -0
- package/dist/chunks/{chunk-JRWUIW4J.js → chunk-ZHEEG3NS.js} +2 -2
- package/dist/chunks/{cli-runtime-P6LCHPBA.js → cli-runtime-ZJKKIW4H.js} +22 -22
- package/dist/chunks/{commands-BNHIQVYO.js → commands-TQH5DD22.js} +6 -6
- package/dist/chunks/{computer-6P3GAOV2.js → computer-WOU5WIIR.js} +2 -2
- package/dist/chunks/{config-ZMXMX2WY.js → config-APYUJ5UW.js} +13 -13
- package/dist/chunks/{cost-BJKADKEZ.js → cost-5YV27U7F.js} +5 -5
- package/dist/chunks/{crash-report-OJHGVRD7.js → crash-report-QVXU2YVL.js} +6 -6
- package/dist/chunks/{dist-PMSBTFU5.js → dist-2FSOLP72.js} +2 -2
- package/dist/chunks/{dist-43XWK3LF.js → dist-AOT4CEP5.js} +2 -2
- package/dist/chunks/{dist-4ZPDHZOX.js → dist-H7CAJ3ZW.js} +48 -2
- package/dist/chunks/{dist-NCBDELMI.js → dist-IZGKRIWL.js} +2 -2
- package/dist/chunks/{dist-BGJEX527.js → dist-J4UXFVYR.js} +2 -2
- package/dist/chunks/{dist-FMFNU4M3.js → dist-JHKRSGW6.js} +2 -2
- package/dist/chunks/{dist-4LEGETQA.js → dist-PZYMYR7N.js} +3 -3
- package/dist/chunks/{dist-ADQAO5C3.js → dist-Z2HW2SJR.js} +2 -2
- package/dist/chunks/{doctor-AIYB27QY.js → doctor-CM6UPXG5.js} +40 -38
- package/dist/chunks/{drain-PYKX4QNR.js → drain-X6RURKKC.js} +17 -17
- package/dist/chunks/{entry-HM5E7KCD.js → entry-QQDPY6ZL.js} +6 -6
- package/dist/chunks/{eval-H4NKZYVV.js → eval-GZA22B4I.js} +9 -9
- package/dist/chunks/{exec-2PRVZNUX.js → exec-3NE75Z6E.js} +46 -45
- package/dist/chunks/exec-3NE75Z6E.js.map +6 -0
- package/dist/chunks/{extension-4233XOZW.js → extension-N5IQNKVZ.js} +6 -5
- package/dist/chunks/{github-IF3JVVJF.js → github-AUOENJUY.js} +2 -2
- package/dist/chunks/{home-AZY7APF6.js → home-I4FIB6FV.js} +3 -3
- package/dist/chunks/{homes-WL6LAAY5.js → homes-WTMMXQ6G.js} +5 -5
- package/dist/chunks/{hooks-AK5S4YUS.js → hooks-R42OTZDT.js} +22 -21
- package/dist/chunks/hooks-R42OTZDT.js.map +6 -0
- package/dist/chunks/{hooks-report-NJLGBWN3.js → hooks-report-K6VOPVBR.js} +18 -17
- package/dist/chunks/{host-SX3QC5FN.js → host-65UFBZJV.js} +10 -10
- package/dist/chunks/host-queries-L4PYE2BW.js +37 -0
- package/dist/chunks/{installed-list-44QXUJFE.js → installed-list-7QIWVKLQ.js} +4 -4
- package/dist/chunks/{learn-LW4DLSGZ.js → learn-NZXLKYV4.js} +17 -17
- package/dist/chunks/{learn-builtin-4RV2XDH4.js → learn-builtin-RC4XXVBS.js} +20 -20
- package/dist/chunks/{lifecycle-AJCHTSAF.js → lifecycle-NLCZ6OPA.js} +30 -30
- package/dist/chunks/{list-DT7AJVPX.js → list-2U67CAWS.js} +18 -18
- package/dist/chunks/{live-Z6HZFXPW.js → live-CWJ2NWUQ.js} +39 -37
- package/dist/chunks/{load-454TJBPW.js → load-H52QQBVE.js} +13 -9
- package/dist/chunks/{logs-GRUSUSL7.js → logs-ZIW3QFU4.js} +4 -4
- package/dist/chunks/{mcp-AFLRDYNN.js → mcp-FNSMEMCM.js} +145 -35
- package/dist/chunks/mcp-FNSMEMCM.js.map +6 -0
- package/dist/chunks/{mcp-serve-NNWP4IES.js → mcp-serve-ZC2OKIPP.js} +17 -17
- package/dist/chunks/{message-command-ZR2JQBBU.js → message-command-IHZWL5GI.js} +59 -56
- package/dist/chunks/message-command-IHZWL5GI.js.map +6 -0
- package/dist/chunks/{open-Z3BELFL7.js → open-AHDQMVXI.js} +7 -7
- package/dist/chunks/{operator-tools-PN3SPQ3C.js → operator-tools-P5R4TF6N.js} +15 -15
- package/dist/chunks/{output-schema-DSR56W6A.js → output-schema-Q5RWHNKE.js} +3 -3
- package/dist/chunks/{pal-ZOH5ILEV.js → pal-T42HU4AK.js} +15 -15
- package/dist/chunks/{peers-LXNB4QSL.js → peers-5RYEA7IA.js} +7 -7
- package/dist/chunks/{peers-WINODTEB.js → peers-7ZG3DEBO.js} +19 -19
- package/dist/chunks/plugin-DGEINYG5.js +2958 -0
- package/dist/chunks/plugin-DGEINYG5.js.map +6 -0
- package/dist/chunks/{providers-UOTUEQOJ.js → providers-BXXIM7EW.js} +18 -18
- package/dist/chunks/{providers-AVECY67I.js → providers-I24HYZXG.js} +10 -10
- package/dist/chunks/{pty-GW2YC23H.js → pty-WVKM6ATI.js} +3 -3
- package/dist/chunks/resume-F7JEDBHI.js +25 -0
- package/dist/chunks/{resume-command-FXT3KGLC.js → resume-command-4I47WN7T.js} +4 -4
- package/dist/chunks/{running-3NLAODZ7.js → running-VID6BVT2.js} +4 -4
- package/dist/chunks/{schedule-TTQUT45H.js → schedule-75IZH76Z.js} +12 -12
- package/dist/chunks/{send-FRNTRW2M.js → send-QRYY2NCG.js} +19 -19
- package/dist/chunks/send-person-VADQNJBN.js +32 -0
- package/dist/chunks/{service-TCKPUGL5.js → service-B6BNESZB.js} +30 -30
- package/dist/chunks/{setting-cli-HGYOIGC6.js → setting-cli-O4YWOIU5.js} +12 -12
- package/dist/chunks/skills-PEMVX5C3.js +604 -0
- package/dist/chunks/skills-PEMVX5C3.js.map +6 -0
- package/dist/chunks/{start-check-C5VJXVPY.js → start-check-EKRXJ5VE.js} +2 -2
- package/dist/chunks/{startup-failure-YQSEQRNQ.js → startup-failure-2UJKPNMR.js} +2 -2
- package/dist/chunks/{state-2DBTSDEP.js → state-X3MKUFYM.js} +20 -20
- package/dist/chunks/{store-CZGKLVTT.js → store-4OXWHFS5.js} +12 -12
- package/dist/chunks/{store-RJZCW2MI.js → store-MK5IYBE5.js} +8 -8
- package/dist/chunks/{store-JJKCDY7Y.js → store-QFNY4BV4.js} +10 -4
- package/dist/chunks/{store-S4BT3ESJ.js → store-VRKKFOYW.js} +3 -3
- package/dist/chunks/{tui-Q7ED7VFI.js → tui-MI72TUST.js} +96 -92
- package/dist/chunks/tui-MI72TUST.js.map +6 -0
- package/dist/chunks/{update-G7D3YCH5.js → update-ELZEXYIX.js} +8 -8
- package/dist/chunks/{watch-EON3IWRY.js → watch-HPINGMZZ.js} +100 -96
- package/dist/chunks/watch-HPINGMZZ.js.map +6 -0
- package/dist/chunks/{workspaces-O6S2OTDL.js → workspaces-3LB4SPPS.js} +15 -15
- package/dist/chunks/{worktree-A2DNXLOT.js → worktree-5CWUUWNO.js} +26 -22
- package/dist/chunks/worktree-5CWUUWNO.js.map +6 -0
- package/dist/commands/acp.d.ts +4 -2
- package/dist/commands/acp.d.ts.map +1 -1
- package/dist/commands/actions/mcp.d.ts.map +1 -1
- package/dist/commands/actions/small.d.ts.map +1 -1
- package/dist/commands/desktop-host-plugins.d.ts +321 -0
- package/dist/commands/desktop-host-plugins.d.ts.map +1 -0
- package/dist/commands/desktop-host-skills.d.ts +103 -0
- package/dist/commands/desktop-host-skills.d.ts.map +1 -0
- package/dist/commands/desktop-host.d.ts +230 -18
- package/dist/commands/desktop-host.d.ts.map +1 -1
- package/dist/commands/manifest.d.ts.map +1 -1
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/plugin-install.d.ts +28 -0
- package/dist/commands/plugin-install.d.ts.map +1 -0
- package/dist/commands/plugin-records.d.ts +48 -0
- package/dist/commands/plugin-records.d.ts.map +1 -0
- package/dist/commands/plugin.d.ts.map +1 -1
- package/dist/commands/skills-manage.d.ts +32 -0
- package/dist/commands/skills-manage.d.ts.map +1 -0
- package/dist/commands/skills.d.ts.map +1 -1
- package/dist/config/hooks-report.d.ts.map +1 -1
- package/dist/config/load.d.ts +9 -0
- package/dist/config/load.d.ts.map +1 -1
- package/dist/config/schema.d.ts +19 -0
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/settings-descriptors.d.ts.map +1 -1
- package/dist/index.js +40 -38
- package/dist/integrations/archive/zip.d.ts +36 -0
- package/dist/integrations/archive/zip.d.ts.map +1 -0
- package/dist/integrations/extensions/package.d.ts +7 -16
- package/dist/integrations/extensions/package.d.ts.map +1 -1
- package/dist/integrations/mcp/all-servers.d.ts +30 -0
- package/dist/integrations/mcp/all-servers.d.ts.map +1 -0
- package/dist/integrations/mcp/plugin-remote.d.ts +141 -0
- package/dist/integrations/mcp/plugin-remote.d.ts.map +1 -0
- package/dist/integrations/mcp/project-approval.d.ts +29 -1
- package/dist/integrations/mcp/project-approval.d.ts.map +1 -1
- package/dist/integrations/mcp/server-listing.d.ts +7 -3
- package/dist/integrations/mcp/server-listing.d.ts.map +1 -1
- package/dist/integrations/mcp/servers.d.ts +6 -0
- package/dist/integrations/mcp/servers.d.ts.map +1 -1
- package/dist/integrations/mcp/user-config.d.ts +10 -0
- package/dist/integrations/mcp/user-config.d.ts.map +1 -1
- package/dist/integrations/plugins/enabled-records.d.ts +78 -0
- package/dist/integrations/plugins/enabled-records.d.ts.map +1 -0
- package/dist/integrations/plugins/fetch/archive.d.ts +15 -0
- package/dist/integrations/plugins/fetch/archive.d.ts.map +1 -0
- package/dist/integrations/plugins/fetch/git.d.ts +145 -0
- package/dist/integrations/plugins/fetch/git.d.ts.map +1 -0
- package/dist/integrations/plugins/fetch/index.d.ts +33 -0
- package/dist/integrations/plugins/fetch/index.d.ts.map +1 -0
- package/dist/integrations/plugins/fetch/source.d.ts +107 -0
- package/dist/integrations/plugins/fetch/source.d.ts.map +1 -0
- package/dist/integrations/plugins/fetch/url.d.ts +34 -0
- package/dist/integrations/plugins/fetch/url.d.ts.map +1 -0
- package/dist/integrations/plugins/files.d.ts +15 -3
- package/dist/integrations/plugins/files.d.ts.map +1 -1
- package/dist/integrations/plugins/hook-entries.d.ts +2 -0
- package/dist/integrations/plugins/hook-entries.d.ts.map +1 -1
- package/dist/integrations/plugins/install-manifest.d.ts +70 -0
- package/dist/integrations/plugins/install-manifest.d.ts.map +1 -0
- package/dist/integrations/plugins/install-plan.d.ts +119 -0
- package/dist/integrations/plugins/install-plan.d.ts.map +1 -0
- package/dist/integrations/plugins/install-preview.d.ts +24 -0
- package/dist/integrations/plugins/install-preview.d.ts.map +1 -0
- package/dist/integrations/plugins/install.d.ts +118 -0
- package/dist/integrations/plugins/install.d.ts.map +1 -0
- package/dist/integrations/plugins/installed-source.d.ts +80 -0
- package/dist/integrations/plugins/installed-source.d.ts.map +1 -0
- package/dist/integrations/plugins/inventory.d.ts +2 -1
- package/dist/integrations/plugins/inventory.d.ts.map +1 -1
- package/dist/integrations/plugins/json-state.d.ts +52 -0
- package/dist/integrations/plugins/json-state.d.ts.map +1 -0
- package/dist/integrations/plugins/manifest-details.d.ts +23 -0
- package/dist/integrations/plugins/manifest-details.d.ts.map +1 -0
- package/dist/integrations/plugins/marketplace.d.ts +111 -0
- package/dist/integrations/plugins/marketplace.d.ts.map +1 -0
- package/dist/integrations/plugins/records.d.ts +127 -0
- package/dist/integrations/plugins/records.d.ts.map +1 -0
- package/dist/integrations/plugins/remote-marketplace.d.ts +100 -0
- package/dist/integrations/plugins/remote-marketplace.d.ts.map +1 -0
- package/dist/integrations/plugins/runtime.d.ts +28 -0
- package/dist/integrations/plugins/runtime.d.ts.map +1 -1
- package/dist/integrations/plugins/surface.d.ts +126 -0
- package/dist/integrations/plugins/surface.d.ts.map +1 -0
- package/dist/integrations/plugins/update-compare.d.ts +18 -0
- package/dist/integrations/plugins/update-compare.d.ts.map +1 -0
- package/dist/integrations/plugins/validate.d.ts +50 -1
- package/dist/integrations/plugins/validate.d.ts.map +1 -1
- package/dist/integrations/subagents/definitions.d.ts +4 -0
- package/dist/integrations/subagents/definitions.d.ts.map +1 -1
- package/dist/integrations/trust/folder-grants.d.ts +21 -1
- package/dist/integrations/trust/folder-grants.d.ts.map +1 -1
- package/dist/reminders/skills.d.ts.map +1 -1
- package/dist/rounds/types.d.ts +5 -0
- package/dist/rounds/types.d.ts.map +1 -1
- package/dist/skills/add.d.ts +104 -0
- package/dist/skills/add.d.ts.map +1 -0
- package/dist/skills/audit.d.ts +7 -1
- package/dist/skills/audit.d.ts.map +1 -1
- package/dist/skills/catalog.d.ts +14 -1
- package/dist/skills/catalog.d.ts.map +1 -1
- package/dist/skills/create.d.ts +19 -0
- package/dist/skills/create.d.ts.map +1 -0
- package/dist/skills/desktop-catalog.d.ts +64 -0
- package/dist/skills/desktop-catalog.d.ts.map +1 -0
- package/dist/skills/install.d.ts +73 -0
- package/dist/skills/install.d.ts.map +1 -0
- package/dist/skills/installed-list.d.ts +1 -1
- package/dist/skills/installed-list.d.ts.map +1 -1
- package/dist/skills/overrides.d.ts +56 -0
- package/dist/skills/overrides.d.ts.map +1 -0
- package/dist/skills/remove.d.ts +38 -0
- package/dist/skills/remove.d.ts.map +1 -0
- package/dist/skills/save.d.ts +4 -48
- package/dist/skills/save.d.ts.map +1 -1
- package/dist/skills/store.d.ts +20 -3
- package/dist/skills/store.d.ts.map +1 -1
- package/dist/skills/usage.d.ts +54 -0
- package/dist/skills/usage.d.ts.map +1 -0
- package/dist/skills/validate.d.ts +57 -0
- package/dist/skills/validate.d.ts.map +1 -0
- package/dist/tui/App.d.ts +10 -15
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/tui/Composer.d.ts +6 -10
- package/dist/tui/Composer.d.ts.map +1 -1
- package/dist/tui/PendingInputPanel.d.ts +4 -4
- package/dist/tui/PendingInputPanel.d.ts.map +1 -1
- package/dist/tui/PluginScreen.d.ts +17 -0
- package/dist/tui/PluginScreen.d.ts.map +1 -0
- package/dist/tui/SaveSkillOverlay.d.ts +8 -0
- package/dist/tui/SaveSkillOverlay.d.ts.map +1 -1
- package/dist/tui/SkillsManager.d.ts +9 -0
- package/dist/tui/SkillsManager.d.ts.map +1 -0
- package/dist/tui/TrustPrompt.d.ts.map +1 -1
- package/dist/tui/agent.d.ts +17 -0
- package/dist/tui/agent.d.ts.map +1 -1
- package/dist/tui/plugin-screen.d.ts +243 -0
- package/dist/tui/plugin-screen.d.ts.map +1 -0
- package/dist/tui/plugin-view.d.ts +4 -0
- package/dist/tui/plugin-view.d.ts.map +1 -1
- package/dist/tui/skills/suggest-setting.d.ts +3 -3
- package/dist/tui/skills-manager.d.ts +145 -0
- package/dist/tui/skills-manager.d.ts.map +1 -0
- package/dist/tui/slashCommands.d.ts +1 -1
- package/dist/tui/slashCommands.d.ts.map +1 -1
- package/dist/user-commands/store.d.ts +12 -0
- package/dist/user-commands/store.d.ts.map +1 -1
- package/package.json +3 -3
- package/skills/skill-creator/SKILL.md +2 -2
- package/dist/chunks/acp-AQUZCZSO.js.map +0 -6
- package/dist/chunks/agent-session-WXWW7E5M.js +0 -92
- package/dist/chunks/chunk-3ETXWTV4.js.map +0 -6
- package/dist/chunks/chunk-4BAXYUZQ.js.map +0 -6
- package/dist/chunks/chunk-567CSU37.js.map +0 -6
- package/dist/chunks/chunk-5JVKE4LB.js.map +0 -6
- package/dist/chunks/chunk-6IOZY2AB.js.map +0 -6
- package/dist/chunks/chunk-AEXGGJUW.js.map +0 -6
- package/dist/chunks/chunk-D3SCA6NT.js.map +0 -6
- package/dist/chunks/chunk-D6XZ4ZAV.js.map +0 -6
- package/dist/chunks/chunk-FK5C7SHM.js.map +0 -6
- package/dist/chunks/chunk-FMQCPAKR.js +0 -116
- package/dist/chunks/chunk-FMQCPAKR.js.map +0 -6
- package/dist/chunks/chunk-FRGOWO6N.js.map +0 -6
- package/dist/chunks/chunk-HGTOAMV6.js.map +0 -6
- package/dist/chunks/chunk-IRAG3YXW.js.map +0 -6
- package/dist/chunks/chunk-JUDJGDYX.js.map +0 -6
- package/dist/chunks/chunk-KHGY6QJR.js.map +0 -6
- package/dist/chunks/chunk-OOJP5BEK.js.map +0 -6
- package/dist/chunks/chunk-OQWLQUO7.js.map +0 -6
- package/dist/chunks/chunk-RHJOIAFS.js +0 -201
- package/dist/chunks/chunk-RHJOIAFS.js.map +0 -6
- package/dist/chunks/exec-2PRVZNUX.js.map +0 -6
- package/dist/chunks/hooks-AK5S4YUS.js.map +0 -6
- package/dist/chunks/host-queries-HBW7AW44.js +0 -37
- package/dist/chunks/mcp-AFLRDYNN.js.map +0 -6
- package/dist/chunks/message-command-ZR2JQBBU.js.map +0 -6
- package/dist/chunks/plugin-MLHZ42NZ.js +0 -1132
- package/dist/chunks/plugin-MLHZ42NZ.js.map +0 -6
- package/dist/chunks/resume-AYWSKWEX.js +0 -25
- package/dist/chunks/send-person-57F5RJA7.js +0 -32
- package/dist/chunks/skills-ICVGYWBH.js +0 -350
- package/dist/chunks/skills-ICVGYWBH.js.map +0 -6
- package/dist/chunks/tui-Q7ED7VFI.js.map +0 -6
- package/dist/chunks/watch-EON3IWRY.js.map +0 -6
- package/dist/chunks/worktree-A2DNXLOT.js.map +0 -6
- /package/dist/chunks/{activity-command-Y3A6GIFW.js.map → activity-command-JU4HLIQJ.js.map} +0 -0
- /package/dist/chunks/{add-DWFKSOYI.js.map → add-S6JYKDI4.js.map} +0 -0
- /package/dist/chunks/{agent-Z6PJYBAO.js.map → agent-E343AQV7.js.map} +0 -0
- /package/dist/chunks/{agent-session-WXWW7E5M.js.map → agent-session-D6JIOCON.js.map} +0 -0
- /package/dist/chunks/{apply-at-exit-SHGR2BAB.js.map → apply-at-exit-MEOJMGNT.js.map} +0 -0
- /package/dist/chunks/{archive-KYXU4AZZ.js.map → archive-ZPWC7GZU.js.map} +0 -0
- /package/dist/chunks/{auth-R3RCZZ7U.js.map → auth-6NX4TMIG.js.map} +0 -0
- /package/dist/chunks/{bin-main-DUZFYUCJ.js.map → bin-main-P3KAQDKC.js.map} +0 -0
- /package/dist/chunks/{binding-5UJYMFMU.js.map → binding-6QZVGFQ5.js.map} +0 -0
- /package/dist/chunks/{browser-7CFZ6BZS.js.map → browser-KK2U5524.js.map} +0 -0
- /package/dist/chunks/{chat-BELD32ZP.js.map → chat-VEXJRSZN.js.map} +0 -0
- /package/dist/chunks/{chunk-MDBUSIPW.js.map → chunk-2KVQVPJ7.js.map} +0 -0
- /package/dist/chunks/{chunk-MRZHTIE7.js.map → chunk-42JIZXVL.js.map} +0 -0
- /package/dist/chunks/{chunk-ESIICAI3.js.map → chunk-4473VICE.js.map} +0 -0
- /package/dist/chunks/{chunk-DGYMR4WJ.js.map → chunk-44YG6EI4.js.map} +0 -0
- /package/dist/chunks/{chunk-ZQGCZYAE.js.map → chunk-452SL2Y4.js.map} +0 -0
- /package/dist/chunks/{chunk-VE4XIWDW.js.map → chunk-4BNCVR3U.js.map} +0 -0
- /package/dist/chunks/{chunk-2EVP6BX4.js.map → chunk-4CJ3HPOT.js.map} +0 -0
- /package/dist/chunks/{chunk-TORIEDBN.js.map → chunk-4ENL4VUO.js.map} +0 -0
- /package/dist/chunks/{chunk-IJ6Z6FNY.js.map → chunk-4KVYTHY7.js.map} +0 -0
- /package/dist/chunks/{chunk-YNWPC3HO.js.map → chunk-4Y242BU4.js.map} +0 -0
- /package/dist/chunks/{chunk-OA7QKUCM.js.map → chunk-5F4DSPZC.js.map} +0 -0
- /package/dist/chunks/{chunk-DRWJTADQ.js.map → chunk-5IGEQN7L.js.map} +0 -0
- /package/dist/chunks/{chunk-W752G3FM.js.map → chunk-5ZLKTFU2.js.map} +0 -0
- /package/dist/chunks/{chunk-KETRBV2E.js.map → chunk-66QIFMEO.js.map} +0 -0
- /package/dist/chunks/{chunk-CEZW3NVM.js.map → chunk-6W3UGXGG.js.map} +0 -0
- /package/dist/chunks/{chunk-S7FE35WQ.js.map → chunk-75YLZNZW.js.map} +0 -0
- /package/dist/chunks/{chunk-P4TCLMD6.js.map → chunk-AC5P6W3G.js.map} +0 -0
- /package/dist/chunks/{chunk-GUK47JTV.js.map → chunk-AYMB4AOZ.js.map} +0 -0
- /package/dist/chunks/{chunk-23D5IXMW.js.map → chunk-B4AOCHH6.js.map} +0 -0
- /package/dist/chunks/{chunk-FEOS7UZ2.js.map → chunk-BA7KUG6V.js.map} +0 -0
- /package/dist/chunks/{chunk-D35UCVTK.js.map → chunk-BHQHTM3Z.js.map} +0 -0
- /package/dist/chunks/{chunk-KPOOM7QT.js.map → chunk-BNLIRJ3M.js.map} +0 -0
- /package/dist/chunks/{chunk-MDVYEFTI.js.map → chunk-BURGRQWO.js.map} +0 -0
- /package/dist/chunks/{chunk-DKSFQRUM.js.map → chunk-BWD2TUI4.js.map} +0 -0
- /package/dist/chunks/{chunk-7Y4RR47U.js.map → chunk-C7E7YCRD.js.map} +0 -0
- /package/dist/chunks/{chunk-44MFZJ24.js.map → chunk-CXW7I2S3.js.map} +0 -0
- /package/dist/chunks/{chunk-73HWWJYC.js.map → chunk-D6PB3Z7Q.js.map} +0 -0
- /package/dist/chunks/{chunk-QTHG6UPU.js.map → chunk-DEAG4G5J.js.map} +0 -0
- /package/dist/chunks/{chunk-WGC5DJEW.js.map → chunk-DRSQTKDN.js.map} +0 -0
- /package/dist/chunks/{chunk-WXYRLTRY.js.map → chunk-EXJJLYZK.js.map} +0 -0
- /package/dist/chunks/{chunk-PFVYYH6O.js.map → chunk-F5W4TNCR.js.map} +0 -0
- /package/dist/chunks/{chunk-Q6PZODSV.js.map → chunk-F7KOBJVW.js.map} +0 -0
- /package/dist/chunks/{chunk-VSNV3U2B.js.map → chunk-FK4MAZV2.js.map} +0 -0
- /package/dist/chunks/{chunk-G5LPTLLY.js.map → chunk-FPC3K4TT.js.map} +0 -0
- /package/dist/chunks/{chunk-XLXPPVUT.js.map → chunk-FVIKYFYD.js.map} +0 -0
- /package/dist/chunks/{chunk-PQT7624W.js.map → chunk-GPTYDM26.js.map} +0 -0
- /package/dist/chunks/{chunk-TP7DRQXE.js.map → chunk-GT22EDUB.js.map} +0 -0
- /package/dist/chunks/{chunk-GEVWZWLM.js.map → chunk-GTUTBTOV.js.map} +0 -0
- /package/dist/chunks/{chunk-GQ6WXY3M.js.map → chunk-H6NTNPWD.js.map} +0 -0
- /package/dist/chunks/{chunk-TYNAB5GR.js.map → chunk-HCQGZPVT.js.map} +0 -0
- /package/dist/chunks/{chunk-LB4HC5U7.js.map → chunk-HG2PPCAE.js.map} +0 -0
- /package/dist/chunks/{chunk-ABKURT35.js.map → chunk-HKRUNZVI.js.map} +0 -0
- /package/dist/chunks/{chunk-JPM3JXZB.js.map → chunk-HM7L5PM2.js.map} +0 -0
- /package/dist/chunks/{chunk-UFGLSUGU.js.map → chunk-I4RC6KQQ.js.map} +0 -0
- /package/dist/chunks/{chunk-HW2QBNAA.js.map → chunk-IL4Y3JGT.js.map} +0 -0
- /package/dist/chunks/{chunk-24EZWZDZ.js.map → chunk-J4PL65DJ.js.map} +0 -0
- /package/dist/chunks/{chunk-E65IWYTT.js.map → chunk-JECLB23L.js.map} +0 -0
- /package/dist/chunks/{chunk-3RLKUXXG.js.map → chunk-JJ72TLOA.js.map} +0 -0
- /package/dist/chunks/{chunk-CG5CGXNF.js.map → chunk-JRBFL6WT.js.map} +0 -0
- /package/dist/chunks/{chunk-KBLYZ7L7.js.map → chunk-K2EKXCLZ.js.map} +0 -0
- /package/dist/chunks/{chunk-WW3AU2YN.js.map → chunk-ME4LETA3.js.map} +0 -0
- /package/dist/chunks/{chunk-J5E4DV6R.js.map → chunk-MF3SFDBW.js.map} +0 -0
- /package/dist/chunks/{chunk-WSDZIJNK.js.map → chunk-MK42KB72.js.map} +0 -0
- /package/dist/chunks/{chunk-RZKIZTPA.js.map → chunk-MUSGZEFY.js.map} +0 -0
- /package/dist/chunks/{chunk-MF5KTVGJ.js.map → chunk-N5CCXOYK.js.map} +0 -0
- /package/dist/chunks/{chunk-KVNL7XA6.js.map → chunk-NBJ5PRAY.js.map} +0 -0
- /package/dist/chunks/{chunk-E4RVHFV6.js.map → chunk-NKHEBASJ.js.map} +0 -0
- /package/dist/chunks/{chunk-SS6IJAPA.js.map → chunk-NVWD5XDT.js.map} +0 -0
- /package/dist/chunks/{chunk-7LDUPEXP.js.map → chunk-O45DCUNX.js.map} +0 -0
- /package/dist/chunks/{chunk-G76POTWW.js.map → chunk-PAUMCJPX.js.map} +0 -0
- /package/dist/chunks/{chunk-MF57EX7H.js.map → chunk-PE4MWWUW.js.map} +0 -0
- /package/dist/chunks/{chunk-4RW7GDJ4.js.map → chunk-PLCWCIL4.js.map} +0 -0
- /package/dist/chunks/{chunk-XVOPQCPD.js.map → chunk-PRJO4XM3.js.map} +0 -0
- /package/dist/chunks/{chunk-CQFWLYTK.js.map → chunk-PRRX5LNR.js.map} +0 -0
- /package/dist/chunks/{chunk-3PH6F6Z3.js.map → chunk-PS5SVAUJ.js.map} +0 -0
- /package/dist/chunks/{chunk-P725GKKG.js.map → chunk-PZWSRAE7.js.map} +0 -0
- /package/dist/chunks/{chunk-CNSKJ3DZ.js.map → chunk-QCV3HH4P.js.map} +0 -0
- /package/dist/chunks/{chunk-7J23SPSX.js.map → chunk-QGBR42TV.js.map} +0 -0
- /package/dist/chunks/{chunk-6CSJRIUZ.js.map → chunk-QNJXULU7.js.map} +0 -0
- /package/dist/chunks/{chunk-DJKWBSVM.js.map → chunk-R2KAESOM.js.map} +0 -0
- /package/dist/chunks/{chunk-AIQKSTVJ.js.map → chunk-R6M6EIAH.js.map} +0 -0
- /package/dist/chunks/{chunk-VJHENTNB.js.map → chunk-RKKU2RE4.js.map} +0 -0
- /package/dist/chunks/{chunk-JZTTOZRG.js.map → chunk-RMOTHWPV.js.map} +0 -0
- /package/dist/chunks/{chunk-EA6YICQ7.js.map → chunk-RQAY7REG.js.map} +0 -0
- /package/dist/chunks/{chunk-LWJJDERP.js.map → chunk-SLTJNYOU.js.map} +0 -0
- /package/dist/chunks/{chunk-UL6MZ5OM.js.map → chunk-SXONHO4H.js.map} +0 -0
- /package/dist/chunks/{chunk-W4S4ZBXX.js.map → chunk-T7ILM666.js.map} +0 -0
- /package/dist/chunks/{chunk-E6FMAE5Q.js.map → chunk-TBGKPWCL.js.map} +0 -0
- /package/dist/chunks/{chunk-ACO3LTRT.js.map → chunk-TBJ6XU3T.js.map} +0 -0
- /package/dist/chunks/{chunk-5HMJ3DYR.js.map → chunk-TMPP2DEY.js.map} +0 -0
- /package/dist/chunks/{chunk-6YXHH5JW.js.map → chunk-TSOZBRM6.js.map} +0 -0
- /package/dist/chunks/{chunk-SSPHAILP.js.map → chunk-TTFPWGIU.js.map} +0 -0
- /package/dist/chunks/{chunk-TRRKG642.js.map → chunk-TTKMQW6B.js.map} +0 -0
- /package/dist/chunks/{chunk-2VP2Q657.js.map → chunk-UCML5ZXB.js.map} +0 -0
- /package/dist/chunks/{chunk-OH7EYW3T.js.map → chunk-VG7245VJ.js.map} +0 -0
- /package/dist/chunks/{chunk-QZTTIL3A.js.map → chunk-VQZPXK4X.js.map} +0 -0
- /package/dist/chunks/{chunk-O2PZDA5H.js.map → chunk-VWUTJ4EU.js.map} +0 -0
- /package/dist/chunks/{chunk-VL6Z2OMG.js.map → chunk-WDKAL7EW.js.map} +0 -0
- /package/dist/chunks/{chunk-2KC52MDS.js.map → chunk-WJ6QRVL6.js.map} +0 -0
- /package/dist/chunks/{chunk-XJALHM5Z.js.map → chunk-WOTA5FO5.js.map} +0 -0
- /package/dist/chunks/{chunk-4TJ7AGQO.js.map → chunk-WPGVZMSU.js.map} +0 -0
- /package/dist/chunks/{chunk-DJTCZSSY.js.map → chunk-XDUA6PBP.js.map} +0 -0
- /package/dist/chunks/{chunk-PKFXIWVX.js.map → chunk-XE6XT6R6.js.map} +0 -0
- /package/dist/chunks/{chunk-LXJW3ZYI.js.map → chunk-YWRRS7SO.js.map} +0 -0
- /package/dist/chunks/{chunk-JRWUIW4J.js.map → chunk-ZHEEG3NS.js.map} +0 -0
- /package/dist/chunks/{cli-runtime-P6LCHPBA.js.map → cli-runtime-ZJKKIW4H.js.map} +0 -0
- /package/dist/chunks/{commands-BNHIQVYO.js.map → commands-TQH5DD22.js.map} +0 -0
- /package/dist/chunks/{computer-6P3GAOV2.js.map → computer-WOU5WIIR.js.map} +0 -0
- /package/dist/chunks/{config-ZMXMX2WY.js.map → config-APYUJ5UW.js.map} +0 -0
- /package/dist/chunks/{cost-BJKADKEZ.js.map → cost-5YV27U7F.js.map} +0 -0
- /package/dist/chunks/{crash-report-OJHGVRD7.js.map → crash-report-QVXU2YVL.js.map} +0 -0
- /package/dist/chunks/{dist-PMSBTFU5.js.map → dist-2FSOLP72.js.map} +0 -0
- /package/dist/chunks/{dist-43XWK3LF.js.map → dist-AOT4CEP5.js.map} +0 -0
- /package/dist/chunks/{dist-4LEGETQA.js.map → dist-H7CAJ3ZW.js.map} +0 -0
- /package/dist/chunks/{dist-NCBDELMI.js.map → dist-IZGKRIWL.js.map} +0 -0
- /package/dist/chunks/{dist-BGJEX527.js.map → dist-J4UXFVYR.js.map} +0 -0
- /package/dist/chunks/{dist-FMFNU4M3.js.map → dist-JHKRSGW6.js.map} +0 -0
- /package/dist/chunks/{dist-4ZPDHZOX.js.map → dist-PZYMYR7N.js.map} +0 -0
- /package/dist/chunks/{dist-ADQAO5C3.js.map → dist-Z2HW2SJR.js.map} +0 -0
- /package/dist/chunks/{doctor-AIYB27QY.js.map → doctor-CM6UPXG5.js.map} +0 -0
- /package/dist/chunks/{drain-PYKX4QNR.js.map → drain-X6RURKKC.js.map} +0 -0
- /package/dist/chunks/{entry-HM5E7KCD.js.map → entry-QQDPY6ZL.js.map} +0 -0
- /package/dist/chunks/{eval-H4NKZYVV.js.map → eval-GZA22B4I.js.map} +0 -0
- /package/dist/chunks/{extension-4233XOZW.js.map → extension-N5IQNKVZ.js.map} +0 -0
- /package/dist/chunks/{github-IF3JVVJF.js.map → github-AUOENJUY.js.map} +0 -0
- /package/dist/chunks/{home-AZY7APF6.js.map → home-I4FIB6FV.js.map} +0 -0
- /package/dist/chunks/{homes-WL6LAAY5.js.map → homes-WTMMXQ6G.js.map} +0 -0
- /package/dist/chunks/{hooks-report-NJLGBWN3.js.map → hooks-report-K6VOPVBR.js.map} +0 -0
- /package/dist/chunks/{host-SX3QC5FN.js.map → host-65UFBZJV.js.map} +0 -0
- /package/dist/chunks/{host-queries-HBW7AW44.js.map → host-queries-L4PYE2BW.js.map} +0 -0
- /package/dist/chunks/{installed-list-44QXUJFE.js.map → installed-list-7QIWVKLQ.js.map} +0 -0
- /package/dist/chunks/{learn-LW4DLSGZ.js.map → learn-NZXLKYV4.js.map} +0 -0
- /package/dist/chunks/{learn-builtin-4RV2XDH4.js.map → learn-builtin-RC4XXVBS.js.map} +0 -0
- /package/dist/chunks/{lifecycle-AJCHTSAF.js.map → lifecycle-NLCZ6OPA.js.map} +0 -0
- /package/dist/chunks/{list-DT7AJVPX.js.map → list-2U67CAWS.js.map} +0 -0
- /package/dist/chunks/{live-Z6HZFXPW.js.map → live-CWJ2NWUQ.js.map} +0 -0
- /package/dist/chunks/{load-454TJBPW.js.map → load-H52QQBVE.js.map} +0 -0
- /package/dist/chunks/{logs-GRUSUSL7.js.map → logs-ZIW3QFU4.js.map} +0 -0
- /package/dist/chunks/{mcp-serve-NNWP4IES.js.map → mcp-serve-ZC2OKIPP.js.map} +0 -0
- /package/dist/chunks/{open-Z3BELFL7.js.map → open-AHDQMVXI.js.map} +0 -0
- /package/dist/chunks/{operator-tools-PN3SPQ3C.js.map → operator-tools-P5R4TF6N.js.map} +0 -0
- /package/dist/chunks/{output-schema-DSR56W6A.js.map → output-schema-Q5RWHNKE.js.map} +0 -0
- /package/dist/chunks/{pal-ZOH5ILEV.js.map → pal-T42HU4AK.js.map} +0 -0
- /package/dist/chunks/{peers-LXNB4QSL.js.map → peers-5RYEA7IA.js.map} +0 -0
- /package/dist/chunks/{peers-WINODTEB.js.map → peers-7ZG3DEBO.js.map} +0 -0
- /package/dist/chunks/{providers-UOTUEQOJ.js.map → providers-BXXIM7EW.js.map} +0 -0
- /package/dist/chunks/{providers-AVECY67I.js.map → providers-I24HYZXG.js.map} +0 -0
- /package/dist/chunks/{pty-GW2YC23H.js.map → pty-WVKM6ATI.js.map} +0 -0
- /package/dist/chunks/{resume-AYWSKWEX.js.map → resume-F7JEDBHI.js.map} +0 -0
- /package/dist/chunks/{resume-command-FXT3KGLC.js.map → resume-command-4I47WN7T.js.map} +0 -0
- /package/dist/chunks/{running-3NLAODZ7.js.map → running-VID6BVT2.js.map} +0 -0
- /package/dist/chunks/{schedule-TTQUT45H.js.map → schedule-75IZH76Z.js.map} +0 -0
- /package/dist/chunks/{send-FRNTRW2M.js.map → send-QRYY2NCG.js.map} +0 -0
- /package/dist/chunks/{send-person-57F5RJA7.js.map → send-person-VADQNJBN.js.map} +0 -0
- /package/dist/chunks/{service-TCKPUGL5.js.map → service-B6BNESZB.js.map} +0 -0
- /package/dist/chunks/{setting-cli-HGYOIGC6.js.map → setting-cli-O4YWOIU5.js.map} +0 -0
- /package/dist/chunks/{start-check-C5VJXVPY.js.map → start-check-EKRXJ5VE.js.map} +0 -0
- /package/dist/chunks/{startup-failure-YQSEQRNQ.js.map → startup-failure-2UJKPNMR.js.map} +0 -0
- /package/dist/chunks/{state-2DBTSDEP.js.map → state-X3MKUFYM.js.map} +0 -0
- /package/dist/chunks/{store-CZGKLVTT.js.map → store-4OXWHFS5.js.map} +0 -0
- /package/dist/chunks/{store-JJKCDY7Y.js.map → store-MK5IYBE5.js.map} +0 -0
- /package/dist/chunks/{store-RJZCW2MI.js.map → store-QFNY4BV4.js.map} +0 -0
- /package/dist/chunks/{store-S4BT3ESJ.js.map → store-VRKKFOYW.js.map} +0 -0
- /package/dist/chunks/{update-G7D3YCH5.js.map → update-ELZEXYIX.js.map} +0 -0
- /package/dist/chunks/{workspaces-O6S2OTDL.js.map → workspaces-3LB4SPPS.js.map} +0 -0
|
@@ -0,0 +1,1055 @@
|
|
|
1
|
+
import { createRequire as __namzuCreateRequire } from 'node:module';
|
|
2
|
+
const require = __namzuCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
manifestEntryChars,
|
|
5
|
+
skillManifestBudget
|
|
6
|
+
} from "./chunk-QBLHOG2F.js";
|
|
7
|
+
import {
|
|
8
|
+
ArchiveError,
|
|
9
|
+
openArchive
|
|
10
|
+
} from "./chunk-EBBT2I5S.js";
|
|
11
|
+
import {
|
|
12
|
+
SKILL_BODY_MAX_BYTES,
|
|
13
|
+
SkillDraftError,
|
|
14
|
+
composeSkillMarkdown,
|
|
15
|
+
describeCollision,
|
|
16
|
+
displayPath,
|
|
17
|
+
planSkillTargets,
|
|
18
|
+
suggestSkillName,
|
|
19
|
+
validateSkillDescription,
|
|
20
|
+
validateSkillDraft,
|
|
21
|
+
validateSkillName
|
|
22
|
+
} from "./chunk-PZLPACNY.js";
|
|
23
|
+
import {
|
|
24
|
+
readSkillHooks
|
|
25
|
+
} from "./chunk-TBJ6XU3T.js";
|
|
26
|
+
import {
|
|
27
|
+
SKILL_TIERS,
|
|
28
|
+
discoverSkillRoster,
|
|
29
|
+
parseSkillMarkdown,
|
|
30
|
+
projectSkillsDir,
|
|
31
|
+
skillTierLabel,
|
|
32
|
+
userSkillsDir
|
|
33
|
+
} from "./chunk-6HYK4DDB.js";
|
|
34
|
+
import {
|
|
35
|
+
namzuHomePath
|
|
36
|
+
} from "./chunk-JRBFL6WT.js";
|
|
37
|
+
import {
|
|
38
|
+
SKILL_FRONTMATTER_HOOK_EVENT_KEYS,
|
|
39
|
+
SKILL_FRONTMATTER_KEYS,
|
|
40
|
+
findInlineShell,
|
|
41
|
+
loadSkill
|
|
42
|
+
} from "./chunk-QQ4S6MNH.js";
|
|
43
|
+
import {
|
|
44
|
+
__name
|
|
45
|
+
} from "./chunk-76FLAFCG.js";
|
|
46
|
+
|
|
47
|
+
// src/skills/audit.ts
|
|
48
|
+
import { dirname } from "node:path";
|
|
49
|
+
async function auditSkillInfo(skill) {
|
|
50
|
+
if (skill.disabled) return { name: skill.name, path: skill.path, status: "disabled" };
|
|
51
|
+
if (skill.problem) {
|
|
52
|
+
return { name: skill.name, path: skill.path, status: "invalid", reason: skill.problem };
|
|
53
|
+
}
|
|
54
|
+
try {
|
|
55
|
+
const { skill: loaded } = await loadSkill(dirname(skill.path), "metadata");
|
|
56
|
+
if (loaded.metadata.invocation === "operator") {
|
|
57
|
+
return { name: skill.name, path: skill.path, status: "operator-only" };
|
|
58
|
+
}
|
|
59
|
+
const chars = manifestEntryChars(loaded);
|
|
60
|
+
const hookProblems = skill.hooksSource === void 0 ? void 0 : readSkillHooks(skill.hooksSource, `skill ${skill.name}`).problems.map((problem) => ({
|
|
61
|
+
severity: problem.severity,
|
|
62
|
+
text: `${problem.event} ${problem.message}`
|
|
63
|
+
}));
|
|
64
|
+
return {
|
|
65
|
+
name: skill.name,
|
|
66
|
+
path: skill.path,
|
|
67
|
+
status: "ready",
|
|
68
|
+
manifestChars: chars,
|
|
69
|
+
...skill.hooksSource !== void 0 ? { carriesHooks: true } : {},
|
|
70
|
+
...hookProblems && hookProblems.length > 0 ? { hookProblems } : {}
|
|
71
|
+
};
|
|
72
|
+
} catch (error) {
|
|
73
|
+
return {
|
|
74
|
+
name: skill.name,
|
|
75
|
+
path: skill.path,
|
|
76
|
+
status: "invalid",
|
|
77
|
+
reason: error instanceof Error ? error.message : String(error)
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
__name(auditSkillInfo, "auditSkillInfo");
|
|
82
|
+
async function auditFileSkills(options = {}) {
|
|
83
|
+
const roster = discoverSkillRoster(options).skills;
|
|
84
|
+
const ordered = [...roster].sort(
|
|
85
|
+
(a, b) => SKILL_TIERS.indexOf(b.tier) - SKILL_TIERS.indexOf(a.tier) || a.name.localeCompare(b.name)
|
|
86
|
+
);
|
|
87
|
+
const findings = [];
|
|
88
|
+
const overflow = [];
|
|
89
|
+
const budget = options.contextWindowTokens === void 0 ? void 0 : skillManifestBudget(options.contextWindowTokens);
|
|
90
|
+
let manifestChars = 0;
|
|
91
|
+
let admittedChars = 0;
|
|
92
|
+
for (const skill of ordered) {
|
|
93
|
+
const finding = await auditSkillInfo(skill);
|
|
94
|
+
findings.push(finding);
|
|
95
|
+
if (finding.status !== "ready") continue;
|
|
96
|
+
const chars = finding.manifestChars ?? 0;
|
|
97
|
+
manifestChars += chars;
|
|
98
|
+
if (budget !== void 0 && (overflow.length > 0 || admittedChars + chars > budget))
|
|
99
|
+
overflow.push(skill.name);
|
|
100
|
+
else admittedChars += chars;
|
|
101
|
+
}
|
|
102
|
+
return {
|
|
103
|
+
findings,
|
|
104
|
+
invalid: findings.filter((finding) => finding.status === "invalid").length,
|
|
105
|
+
ready: findings.filter((finding) => finding.status === "ready").length,
|
|
106
|
+
operatorOnly: findings.filter((finding) => finding.status === "operator-only").length,
|
|
107
|
+
disabled: findings.filter((finding) => finding.status === "disabled").length,
|
|
108
|
+
manifestChars,
|
|
109
|
+
...budget === void 0 ? {} : { manifestBudgetChars: budget },
|
|
110
|
+
overflow
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
__name(auditFileSkills, "auditFileSkills");
|
|
114
|
+
|
|
115
|
+
// src/skills/add.ts
|
|
116
|
+
import { createHash as createHash2 } from "node:crypto";
|
|
117
|
+
import { lstatSync as lstatSync2, readFileSync, readdirSync as readdirSync2, statSync } from "node:fs";
|
|
118
|
+
import { basename, extname, join as join2 } from "node:path";
|
|
119
|
+
|
|
120
|
+
// src/skills/install.ts
|
|
121
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
122
|
+
import {
|
|
123
|
+
chmodSync,
|
|
124
|
+
cpSync,
|
|
125
|
+
lstatSync,
|
|
126
|
+
mkdirSync,
|
|
127
|
+
readdirSync,
|
|
128
|
+
renameSync,
|
|
129
|
+
rmSync,
|
|
130
|
+
writeFileSync
|
|
131
|
+
} from "node:fs";
|
|
132
|
+
import { dirname as dirname2, join, relative, sep } from "node:path";
|
|
133
|
+
var SKILL_INSTALL_RECORD = ".namzu-install.json";
|
|
134
|
+
var REAL_FS_OPS = { rename: renameSync };
|
|
135
|
+
var InstallError = class extends Error {
|
|
136
|
+
constructor(message, orphanBackup) {
|
|
137
|
+
super(message);
|
|
138
|
+
this.orphanBackup = orphanBackup;
|
|
139
|
+
}
|
|
140
|
+
orphanBackup;
|
|
141
|
+
static {
|
|
142
|
+
__name(this, "InstallError");
|
|
143
|
+
}
|
|
144
|
+
name = "InstallError";
|
|
145
|
+
};
|
|
146
|
+
function lstatOrUndefined(path) {
|
|
147
|
+
try {
|
|
148
|
+
return lstatSync(path);
|
|
149
|
+
} catch (error) {
|
|
150
|
+
if (error.code === "ENOENT") return void 0;
|
|
151
|
+
throw error;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
__name(lstatOrUndefined, "lstatOrUndefined");
|
|
155
|
+
function assertNoLinkBelow(anchor, path) {
|
|
156
|
+
const rel = relative(anchor, path);
|
|
157
|
+
if (rel === "" || rel.startsWith("..")) return;
|
|
158
|
+
let current = anchor;
|
|
159
|
+
for (const part of rel.split(sep)) {
|
|
160
|
+
current = join(current, part);
|
|
161
|
+
const stat = lstatOrUndefined(current);
|
|
162
|
+
if (stat === void 0) return;
|
|
163
|
+
if (stat.isSymbolicLink()) {
|
|
164
|
+
throw new InstallError(
|
|
165
|
+
`${current} is a link; nothing was written. Replace it with a real folder first.`
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
__name(assertNoLinkBelow, "assertNoLinkBelow");
|
|
171
|
+
function assertBackupsSafe(backupsDir) {
|
|
172
|
+
assertNoLinkBelow(dirname2(dirname2(backupsDir)), backupsDir);
|
|
173
|
+
}
|
|
174
|
+
__name(assertBackupsSafe, "assertBackupsSafe");
|
|
175
|
+
function moveDir(from, to, ops) {
|
|
176
|
+
try {
|
|
177
|
+
ops.rename(from, to);
|
|
178
|
+
return;
|
|
179
|
+
} catch (error) {
|
|
180
|
+
if (error.code !== "EXDEV") throw error;
|
|
181
|
+
}
|
|
182
|
+
const partial = `${to}.partial-${randomUUID().slice(0, 8)}`;
|
|
183
|
+
try {
|
|
184
|
+
cpSync(from, partial, { recursive: true, errorOnExist: true, verbatimSymlinks: true });
|
|
185
|
+
ops.rename(partial, to);
|
|
186
|
+
} catch (error) {
|
|
187
|
+
rmSync(partial, { recursive: true, force: true });
|
|
188
|
+
throw error;
|
|
189
|
+
}
|
|
190
|
+
rmSync(from, { recursive: true, force: true });
|
|
191
|
+
}
|
|
192
|
+
__name(moveDir, "moveDir");
|
|
193
|
+
function stageSkill(plan, ops = REAL_FS_OPS) {
|
|
194
|
+
const target = join(plan.skillsDir, plan.name);
|
|
195
|
+
assertNoLinkBelow(plan.anchor, target);
|
|
196
|
+
const stagingRoot = join(plan.skillsDir, ".staging");
|
|
197
|
+
assertNoLinkBelow(plan.anchor, stagingRoot);
|
|
198
|
+
const existing = lstatOrUndefined(target);
|
|
199
|
+
if (existing?.isSymbolicLink()) {
|
|
200
|
+
throw new InstallError(
|
|
201
|
+
`${target} is a link; nothing was written. Replace it with a real folder first.`
|
|
202
|
+
);
|
|
203
|
+
}
|
|
204
|
+
if (existing !== void 0 && !existing.isDirectory()) {
|
|
205
|
+
throw new InstallError(`${target} exists and is not a folder; nothing was written.`);
|
|
206
|
+
}
|
|
207
|
+
const id = randomUUID();
|
|
208
|
+
const slot = join(stagingRoot, id);
|
|
209
|
+
const dir = join(slot, plan.name);
|
|
210
|
+
mkdirSync(dir, { recursive: true, mode: 448 });
|
|
211
|
+
const discard = /* @__PURE__ */ __name(() => {
|
|
212
|
+
rmSync(slot, { recursive: true, force: true });
|
|
213
|
+
try {
|
|
214
|
+
if (readdirSync(stagingRoot).length === 0)
|
|
215
|
+
rmSync(stagingRoot, { recursive: true, force: true });
|
|
216
|
+
} catch {
|
|
217
|
+
}
|
|
218
|
+
}, "discard");
|
|
219
|
+
try {
|
|
220
|
+
for (const [rel, file] of plan.files) {
|
|
221
|
+
if (rel === SKILL_INSTALL_RECORD) continue;
|
|
222
|
+
const path = join(dir, ...rel.split("/"));
|
|
223
|
+
mkdirSync(dirname2(path), { recursive: true, mode: 493 });
|
|
224
|
+
writeFileSync(path, file.bytes, { flag: "wx", mode: file.executable ? 493 : 420 });
|
|
225
|
+
chmodSync(path, file.executable ? 493 : 420);
|
|
226
|
+
}
|
|
227
|
+
writeFileSync(join(dir, SKILL_INSTALL_RECORD), `${JSON.stringify(plan.record, null, 2)}
|
|
228
|
+
`, {
|
|
229
|
+
flag: "wx",
|
|
230
|
+
mode: 420
|
|
231
|
+
});
|
|
232
|
+
} catch (error) {
|
|
233
|
+
discard();
|
|
234
|
+
throw new InstallError(
|
|
235
|
+
`could not write the skill: ${error instanceof Error ? error.message : String(error)}`
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
return {
|
|
239
|
+
dir,
|
|
240
|
+
target,
|
|
241
|
+
exists: existing !== void 0,
|
|
242
|
+
discard,
|
|
243
|
+
commit(replace) {
|
|
244
|
+
const now = lstatOrUndefined(target);
|
|
245
|
+
if (now !== void 0 && !replace) {
|
|
246
|
+
throw new InstallError(`${target} already exists; nothing was changed.`);
|
|
247
|
+
}
|
|
248
|
+
let backup;
|
|
249
|
+
if (now !== void 0) {
|
|
250
|
+
if (now.isSymbolicLink())
|
|
251
|
+
throw new InstallError(`${target} is a link; nothing was changed.`);
|
|
252
|
+
assertBackupsSafe(plan.backupsDir);
|
|
253
|
+
mkdirSync(plan.backupsDir, { recursive: true, mode: 448 });
|
|
254
|
+
let ms = plan.now();
|
|
255
|
+
let candidate = join(plan.backupsDir, `${plan.name}.${ms}`);
|
|
256
|
+
while (lstatOrUndefined(candidate) !== void 0) {
|
|
257
|
+
ms += 1;
|
|
258
|
+
candidate = join(plan.backupsDir, `${plan.name}.${ms}`);
|
|
259
|
+
}
|
|
260
|
+
try {
|
|
261
|
+
moveDir(target, candidate, ops);
|
|
262
|
+
} catch (error) {
|
|
263
|
+
throw new InstallError(
|
|
264
|
+
`could not move the old copy aside: ${error instanceof Error ? error.message : String(error)}. Nothing was changed.`
|
|
265
|
+
);
|
|
266
|
+
}
|
|
267
|
+
backup = candidate;
|
|
268
|
+
}
|
|
269
|
+
try {
|
|
270
|
+
mkdirSync(plan.skillsDir, { recursive: true });
|
|
271
|
+
ops.rename(dir, target);
|
|
272
|
+
} catch (error) {
|
|
273
|
+
const why = error instanceof Error ? error.message : String(error);
|
|
274
|
+
if (backup === void 0) throw new InstallError(`could not put the skill in place: ${why}`);
|
|
275
|
+
try {
|
|
276
|
+
moveDir(backup, target, ops);
|
|
277
|
+
} catch {
|
|
278
|
+
throw new InstallError(
|
|
279
|
+
`could not put the skill in place: ${why}. The old copy is kept in ${backup}.`,
|
|
280
|
+
backup
|
|
281
|
+
);
|
|
282
|
+
}
|
|
283
|
+
throw new InstallError(
|
|
284
|
+
`could not put the skill in place: ${why}. The old copy was put back.`
|
|
285
|
+
);
|
|
286
|
+
}
|
|
287
|
+
return backup === void 0 ? {} : { backup };
|
|
288
|
+
}
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
__name(stageSkill, "stageSkill");
|
|
292
|
+
function digestFiles(files) {
|
|
293
|
+
const hash = createHash("sha256");
|
|
294
|
+
for (const rel of [...files.keys()].sort()) {
|
|
295
|
+
const file = files.get(rel);
|
|
296
|
+
hash.update(`${rel}\0${createHash("sha256").update(file.bytes).digest("hex")}
|
|
297
|
+
`);
|
|
298
|
+
}
|
|
299
|
+
return hash.digest("hex");
|
|
300
|
+
}
|
|
301
|
+
__name(digestFiles, "digestFiles");
|
|
302
|
+
|
|
303
|
+
// src/skills/add.ts
|
|
304
|
+
var SKILL_FILE_MAX_BYTES = 30 * 1024 * 1024;
|
|
305
|
+
var SKILL_ADD_MAX_INPUTS = 20;
|
|
306
|
+
var SKILL_ARCHIVE_LIMITS = {
|
|
307
|
+
maxEntries: 500,
|
|
308
|
+
maxUnpackedBytes: 64 * 1024 * 1024,
|
|
309
|
+
maxRatio: 100,
|
|
310
|
+
allowExecutable: true,
|
|
311
|
+
subject: "skill"
|
|
312
|
+
};
|
|
313
|
+
var TOO_LARGE_MESSAGE = "Skill file is too large. Maximum size is 30 MB.";
|
|
314
|
+
var WRONG_EXTENSION_MESSAGE = "Skill files must have a .skill, .zip, or .md file extension.";
|
|
315
|
+
var MD_YAML_MESSAGE = "A .md file must contain the skill name and description formatted in YAML.";
|
|
316
|
+
var SkillInputError = class extends Error {
|
|
317
|
+
constructor(kind, message) {
|
|
318
|
+
super(message);
|
|
319
|
+
this.kind = kind;
|
|
320
|
+
}
|
|
321
|
+
kind;
|
|
322
|
+
static {
|
|
323
|
+
__name(this, "SkillInputError");
|
|
324
|
+
}
|
|
325
|
+
name = "SkillInputError";
|
|
326
|
+
};
|
|
327
|
+
var failed = /* @__PURE__ */ __name((message) => new SkillInputError("failed", message), "failed");
|
|
328
|
+
var refused = /* @__PURE__ */ __name((message) => new SkillInputError("refused", message), "refused");
|
|
329
|
+
var READ_KEYS = /* @__PURE__ */ new Set([
|
|
330
|
+
...SKILL_FRONTMATTER_KEYS,
|
|
331
|
+
...SKILL_FRONTMATTER_HOOK_EVENT_KEYS,
|
|
332
|
+
"argument-hint",
|
|
333
|
+
"user-invocable"
|
|
334
|
+
]);
|
|
335
|
+
var SHELL_TOOLS = /* @__PURE__ */ new Set(["bash", "shell", "sh", "powershell", "pwsh", "cmd", "exec"]);
|
|
336
|
+
var oneLine = /* @__PURE__ */ __name((text, max = 120) => {
|
|
337
|
+
const flat = text.replace(/\s+/g, " ").trim();
|
|
338
|
+
return flat.length > max ? `${flat.slice(0, max - 1)}\u2026` : flat;
|
|
339
|
+
}, "oneLine");
|
|
340
|
+
function inlineShellConsent(body) {
|
|
341
|
+
const inline = findInlineShell(body).map((m) => oneLine(m.command, 80));
|
|
342
|
+
if (inline.length === 0) return [];
|
|
343
|
+
return [
|
|
344
|
+
`Runs commands: ${inline.slice(0, 5).join("; ")}${inline.length > 5 ? `; and ${inline.length - 5} more` : ""}`
|
|
345
|
+
];
|
|
346
|
+
}
|
|
347
|
+
__name(inlineShellConsent, "inlineShellConsent");
|
|
348
|
+
function setFrontmatterName(markdown, name) {
|
|
349
|
+
const open = /^(?\s*---[ \t]*\r?\n)/.exec(markdown);
|
|
350
|
+
if (!open) return markdown;
|
|
351
|
+
const start = open[0].length;
|
|
352
|
+
const rest = markdown.slice(start);
|
|
353
|
+
const close = /^---[ \t]*\r?$/m.exec(rest);
|
|
354
|
+
const block = close ? rest.slice(0, close.index) : rest;
|
|
355
|
+
const eol = open[0].endsWith("\r\n") ? "\r\n" : "\n";
|
|
356
|
+
const line = /^name[ \t]*:.*$/m;
|
|
357
|
+
const patched = line.test(block) ? block.replace(line, () => `name: ${name}`) : `name: ${name}${eol}${block}`;
|
|
358
|
+
return markdown.slice(0, start) + patched + rest.slice(block.length);
|
|
359
|
+
}
|
|
360
|
+
__name(setFrontmatterName, "setFrontmatterName");
|
|
361
|
+
function frontmatterKeys(markdown) {
|
|
362
|
+
const open = /^(?\s*---[ \t]*\r?\n)/.exec(markdown);
|
|
363
|
+
if (!open) return [];
|
|
364
|
+
const rest = markdown.slice(open[0].length);
|
|
365
|
+
const close = /^---[ \t]*\r?$/m.exec(rest);
|
|
366
|
+
const block = close ? rest.slice(0, close.index) : rest;
|
|
367
|
+
return [...block.matchAll(/^([A-Za-z0-9_][A-Za-z0-9_.-]*)[ \t]*:/gm)].map((m) => m[1]);
|
|
368
|
+
}
|
|
369
|
+
__name(frontmatterKeys, "frontmatterKeys");
|
|
370
|
+
function hookCommands(hooks) {
|
|
371
|
+
const out = [];
|
|
372
|
+
const walk = /* @__PURE__ */ __name((value, depth) => {
|
|
373
|
+
if (depth > 8 || value === null || typeof value !== "object") return;
|
|
374
|
+
if (Array.isArray(value)) {
|
|
375
|
+
for (const item of value) walk(item, depth + 1);
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
378
|
+
for (const [key, item] of Object.entries(value)) {
|
|
379
|
+
if (key === "command" && typeof item === "string") out.push(item);
|
|
380
|
+
else walk(item, depth + 1);
|
|
381
|
+
}
|
|
382
|
+
}, "walk");
|
|
383
|
+
walk(hooks, 0);
|
|
384
|
+
return out;
|
|
385
|
+
}
|
|
386
|
+
__name(hookCommands, "hookCommands");
|
|
387
|
+
function decodeUtf8(bytes, what) {
|
|
388
|
+
try {
|
|
389
|
+
return new TextDecoder("utf-8", { fatal: true }).decode(bytes).replace(/^/, "");
|
|
390
|
+
} catch {
|
|
391
|
+
throw failed(`${what} is not valid UTF-8 text.`);
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
__name(decodeUtf8, "decodeUtf8");
|
|
395
|
+
var isSkillFile = /* @__PURE__ */ __name((path) => basename(path).toLowerCase() === "skill.md", "isSkillFile");
|
|
396
|
+
function buildPrepared(raw, ctx) {
|
|
397
|
+
const findings = [];
|
|
398
|
+
const candidates = [...raw.keys()].filter(isSkillFile);
|
|
399
|
+
const what = ctx.kind === "folder" ? "The folder" : "The file";
|
|
400
|
+
if (candidates.length === 0) {
|
|
401
|
+
throw failed(
|
|
402
|
+
ctx.kind === "folder" ? "The folder must include a SKILL.md file." : "A .zip or .skill file must include a SKILL.md file."
|
|
403
|
+
);
|
|
404
|
+
}
|
|
405
|
+
if (candidates.length > 1) {
|
|
406
|
+
throw failed(
|
|
407
|
+
`This file holds ${candidates.length} skills. Add them one at a time, or install it as a plugin.`
|
|
408
|
+
);
|
|
409
|
+
}
|
|
410
|
+
const skillPath = candidates[0];
|
|
411
|
+
const segments = skillPath.split("/");
|
|
412
|
+
if (segments.length > 2 || ctx.kind === "folder" && segments.length > 1) {
|
|
413
|
+
throw failed(
|
|
414
|
+
`${what} must hold SKILL.md at its top, or inside one folder. Found it at ${skillPath}.`
|
|
415
|
+
);
|
|
416
|
+
}
|
|
417
|
+
const wrapper = segments.length === 2 ? segments[0] : void 0;
|
|
418
|
+
const prefix = wrapper === void 0 ? "" : `${wrapper}/`;
|
|
419
|
+
const files = /* @__PURE__ */ new Map();
|
|
420
|
+
let leftOut = 0;
|
|
421
|
+
for (const [path, file] of raw) {
|
|
422
|
+
if (!path.startsWith(prefix)) {
|
|
423
|
+
leftOut++;
|
|
424
|
+
continue;
|
|
425
|
+
}
|
|
426
|
+
const rel = path.slice(prefix.length);
|
|
427
|
+
if (rel === SKILL_INSTALL_RECORD) {
|
|
428
|
+
findings.push(`${rel} in the file was ignored; Namzu writes its own.`);
|
|
429
|
+
continue;
|
|
430
|
+
}
|
|
431
|
+
if (path === skillPath) {
|
|
432
|
+
files.set("SKILL.md", { bytes: file.bytes, executable: false });
|
|
433
|
+
continue;
|
|
434
|
+
}
|
|
435
|
+
const keep = file.executable && rel.startsWith("scripts/");
|
|
436
|
+
if (file.executable && !keep) {
|
|
437
|
+
findings.push(
|
|
438
|
+
`${rel} had an execute bit; it was removed because only files under scripts/ keep it.`
|
|
439
|
+
);
|
|
440
|
+
}
|
|
441
|
+
files.set(rel, { bytes: file.bytes, executable: keep });
|
|
442
|
+
}
|
|
443
|
+
if (leftOut > 0) {
|
|
444
|
+
findings.push(
|
|
445
|
+
`${leftOut} ${leftOut === 1 ? "file" : "files"} outside the folder that holds SKILL.md ${leftOut === 1 ? "was" : "were"} left out.`
|
|
446
|
+
);
|
|
447
|
+
}
|
|
448
|
+
const original = decodeUtf8(files.get("SKILL.md").bytes, "SKILL.md");
|
|
449
|
+
let parsed;
|
|
450
|
+
try {
|
|
451
|
+
parsed = parseSkillMarkdown(original, "SKILL.md");
|
|
452
|
+
} catch (error) {
|
|
453
|
+
throw failed(
|
|
454
|
+
`SKILL.md could not be read: ${error instanceof Error ? error.message : String(error)}`
|
|
455
|
+
);
|
|
456
|
+
}
|
|
457
|
+
if (ctx.kind === "markdown" && (!/^\s*---/.test(original) || !parsed.description?.trim())) {
|
|
458
|
+
throw failed(MD_YAML_MESSAGE);
|
|
459
|
+
}
|
|
460
|
+
if (parsed.description === void 0 || parsed.description.trim() === "") {
|
|
461
|
+
throw failed("SKILL.md needs a description in its frontmatter.");
|
|
462
|
+
}
|
|
463
|
+
const candidate = ctx.nameOverride ?? parsed.name ?? wrapper ?? ctx.fallbackName;
|
|
464
|
+
let name;
|
|
465
|
+
try {
|
|
466
|
+
name = validateSkillName(candidate);
|
|
467
|
+
} catch (error) {
|
|
468
|
+
const suggestion = suggestSkillName(candidate);
|
|
469
|
+
const base = `The skill name "${candidate.trim()}" cannot be used: ${error instanceof SkillDraftError ? error.message.replace(/^name "[^"]*" /, "") : String(error)}`;
|
|
470
|
+
throw failed(
|
|
471
|
+
suggestion.length > 0 && suggestion !== candidate ? `${base} Try "${suggestion}" (add --name ${suggestion}).` : base
|
|
472
|
+
);
|
|
473
|
+
}
|
|
474
|
+
let description;
|
|
475
|
+
try {
|
|
476
|
+
description = validateSkillDescription(parsed.description, { rejectMarkup: true });
|
|
477
|
+
} catch (error) {
|
|
478
|
+
throw failed(capitalise(error instanceof Error ? error.message : String(error)));
|
|
479
|
+
}
|
|
480
|
+
const bodyBytes = Buffer.byteLength(parsed.body, "utf8");
|
|
481
|
+
if (parsed.body.trim().length === 0)
|
|
482
|
+
throw failed("SKILL.md has no instructions after its frontmatter.");
|
|
483
|
+
if (bodyBytes > SKILL_BODY_MAX_BYTES) {
|
|
484
|
+
throw failed(`The instructions are ${bodyBytes} bytes; at most ${SKILL_BODY_MAX_BYTES}.`);
|
|
485
|
+
}
|
|
486
|
+
const markdown = parsed.name === name ? original : setFrontmatterName(original, name);
|
|
487
|
+
if (parsed.name !== name) {
|
|
488
|
+
findings.push(
|
|
489
|
+
parsed.name === void 0 ? `The skill is named "${name}" from ${ctx.nameOverride !== void 0 ? "--name" : "the file name"}.` : `The skill is named "${name}" (--name); the file said "${parsed.name}".`
|
|
490
|
+
);
|
|
491
|
+
}
|
|
492
|
+
files.set("SKILL.md", { bytes: Buffer.from(markdown, "utf8"), executable: false });
|
|
493
|
+
const unknown = frontmatterKeys(original).filter((key) => !READ_KEYS.has(key));
|
|
494
|
+
if (unknown.length > 0) {
|
|
495
|
+
findings.push(
|
|
496
|
+
`Frontmatter keys Namzu does not read were kept: ${[...new Set(unknown)].join(", ")}.`
|
|
497
|
+
);
|
|
498
|
+
}
|
|
499
|
+
const consent = [];
|
|
500
|
+
consent.push(...inlineShellConsent(parsed.body));
|
|
501
|
+
if (parsed.hooksSource !== void 0) {
|
|
502
|
+
const commands = hookCommands(readSkillHooks(parsed.hooksSource, "SKILL.md").hooks).map(
|
|
503
|
+
(c) => oneLine(c, 80)
|
|
504
|
+
);
|
|
505
|
+
consent.push(
|
|
506
|
+
commands.length > 0 ? `Runs commands from its hooks while it is in use: ${commands.slice(0, 5).join("; ")}${commands.length > 5 ? `; and ${commands.length - 5} more` : ""}` : "Carries hooks that attach while it is in use."
|
|
507
|
+
);
|
|
508
|
+
}
|
|
509
|
+
const shell = [...(parsed.allowedTools ?? "").matchAll(/([A-Za-z_][\w-]*)(\([^)]*\))?/g)].filter((m) => SHELL_TOOLS.has(m[1].toLowerCase())).map((m) => m[0]);
|
|
510
|
+
if (shell.length > 0) consent.push(`Pre-approves while this skill runs: ${shell.join(", ")}`);
|
|
511
|
+
const scripts = [...files.entries()].filter(([rel, file]) => rel.startsWith("scripts/") || file.executable).map(([rel]) => rel).sort();
|
|
512
|
+
if (scripts.length > 0) {
|
|
513
|
+
consent.push(
|
|
514
|
+
`Ships scripts: ${scripts.slice(0, 5).join(", ")}${scripts.length > 5 ? `, and ${scripts.length - 5} more` : ""}`
|
|
515
|
+
);
|
|
516
|
+
}
|
|
517
|
+
return {
|
|
518
|
+
name,
|
|
519
|
+
description,
|
|
520
|
+
markdown,
|
|
521
|
+
files,
|
|
522
|
+
source: ctx.kind === "folder" ? "folder" : "file",
|
|
523
|
+
fileName: ctx.fileName,
|
|
524
|
+
sha256: ctx.sha256,
|
|
525
|
+
findings,
|
|
526
|
+
consent
|
|
527
|
+
};
|
|
528
|
+
}
|
|
529
|
+
__name(buildPrepared, "buildPrepared");
|
|
530
|
+
var capitalise = /* @__PURE__ */ __name((text) => text.charAt(0).toUpperCase() + text.slice(1), "capitalise");
|
|
531
|
+
function readFolder(dir) {
|
|
532
|
+
const files = /* @__PURE__ */ new Map();
|
|
533
|
+
let total = 0;
|
|
534
|
+
const walk = /* @__PURE__ */ __name((abs, rel) => {
|
|
535
|
+
for (const entry of readdirSync2(abs, { withFileTypes: true }).sort(
|
|
536
|
+
(a, b) => a.name.localeCompare(b.name)
|
|
537
|
+
)) {
|
|
538
|
+
if (entry.name === ".git" || entry.name === ".DS_Store" || entry.name === "__MACOSX") continue;
|
|
539
|
+
if (entry.name === "node_modules") continue;
|
|
540
|
+
const path = join2(abs, entry.name);
|
|
541
|
+
const relPath = rel === "" ? entry.name : `${rel}/${entry.name}`;
|
|
542
|
+
const stat = lstatSync2(path);
|
|
543
|
+
if (stat.isSymbolicLink()) {
|
|
544
|
+
throw refused(`${relPath} is a link. Skills are added as plain files and folders only.`);
|
|
545
|
+
}
|
|
546
|
+
if (stat.isDirectory()) {
|
|
547
|
+
walk(path, relPath);
|
|
548
|
+
continue;
|
|
549
|
+
}
|
|
550
|
+
if (!stat.isFile()) throw refused(`${relPath} is not a regular file.`);
|
|
551
|
+
if (stat.size > SKILL_FILE_MAX_BYTES) throw failed(TOO_LARGE_MESSAGE);
|
|
552
|
+
total += stat.size;
|
|
553
|
+
if (files.size >= SKILL_ARCHIVE_LIMITS.maxEntries) {
|
|
554
|
+
throw refused(`The folder has more than ${SKILL_ARCHIVE_LIMITS.maxEntries} files.`);
|
|
555
|
+
}
|
|
556
|
+
if (total > SKILL_ARCHIVE_LIMITS.maxUnpackedBytes) {
|
|
557
|
+
throw refused("The folder holds more than 64 MiB.");
|
|
558
|
+
}
|
|
559
|
+
files.set(relPath, { bytes: readFileSync(path), executable: (stat.mode & 73) !== 0 });
|
|
560
|
+
}
|
|
561
|
+
}, "walk");
|
|
562
|
+
walk(dir, "");
|
|
563
|
+
return files;
|
|
564
|
+
}
|
|
565
|
+
__name(readFolder, "readFolder");
|
|
566
|
+
function readSkillInput(input, options = {}) {
|
|
567
|
+
let stat;
|
|
568
|
+
try {
|
|
569
|
+
stat = statSync(input);
|
|
570
|
+
} catch (error) {
|
|
571
|
+
const code = error.code;
|
|
572
|
+
throw failed(
|
|
573
|
+
code === "ENOENT" ? `${input} does not exist.` : `${input} could not be read (${code ?? "error"}).`
|
|
574
|
+
);
|
|
575
|
+
}
|
|
576
|
+
const nameOverride = options.name === void 0 ? {} : { nameOverride: options.name };
|
|
577
|
+
if (stat.isDirectory()) {
|
|
578
|
+
let files2;
|
|
579
|
+
try {
|
|
580
|
+
files2 = readFolder(input);
|
|
581
|
+
} catch (error) {
|
|
582
|
+
if (error instanceof SkillInputError) throw error;
|
|
583
|
+
throw failed(
|
|
584
|
+
`${input} could not be read: ${error instanceof Error ? error.message : String(error)}`
|
|
585
|
+
);
|
|
586
|
+
}
|
|
587
|
+
return buildPrepared(files2, {
|
|
588
|
+
kind: "folder",
|
|
589
|
+
fileName: basename(input),
|
|
590
|
+
fallbackName: basename(input),
|
|
591
|
+
sha256: digestFiles(files2),
|
|
592
|
+
...nameOverride
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
if (!stat.isFile()) throw failed(`${input} is not a file or a folder.`);
|
|
596
|
+
const extension = extname(input).toLowerCase();
|
|
597
|
+
if (extension !== ".zip" && extension !== ".skill" && extension !== ".md") {
|
|
598
|
+
throw failed(WRONG_EXTENSION_MESSAGE);
|
|
599
|
+
}
|
|
600
|
+
if (stat.size > SKILL_FILE_MAX_BYTES) throw failed(TOO_LARGE_MESSAGE);
|
|
601
|
+
let bytes;
|
|
602
|
+
try {
|
|
603
|
+
bytes = readFileSync(input);
|
|
604
|
+
} catch (error) {
|
|
605
|
+
throw failed(
|
|
606
|
+
`${input} could not be read: ${error instanceof Error ? error.message : String(error)}`
|
|
607
|
+
);
|
|
608
|
+
}
|
|
609
|
+
const sha256 = createHash2("sha256").update(bytes).digest("hex");
|
|
610
|
+
const fileName = basename(input);
|
|
611
|
+
const stem = basename(input, extname(input));
|
|
612
|
+
if (extension === ".md") {
|
|
613
|
+
return buildPrepared(/* @__PURE__ */ new Map([["SKILL.md", { bytes, executable: false }]]), {
|
|
614
|
+
kind: "markdown",
|
|
615
|
+
fileName,
|
|
616
|
+
fallbackName: stem,
|
|
617
|
+
sha256,
|
|
618
|
+
...nameOverride
|
|
619
|
+
});
|
|
620
|
+
}
|
|
621
|
+
let opened;
|
|
622
|
+
try {
|
|
623
|
+
opened = openArchive(bytes, SKILL_ARCHIVE_LIMITS);
|
|
624
|
+
} catch (error) {
|
|
625
|
+
if (error instanceof ArchiveError) {
|
|
626
|
+
throw error.check === "zip" ? failed(error.message) : refused(error.message);
|
|
627
|
+
}
|
|
628
|
+
throw failed(error instanceof Error ? error.message : String(error));
|
|
629
|
+
}
|
|
630
|
+
const files = /* @__PURE__ */ new Map();
|
|
631
|
+
for (const [path, file] of opened) {
|
|
632
|
+
if (path.startsWith("__MACOSX/") || basename(path) === ".DS_Store") continue;
|
|
633
|
+
files.set(path, { bytes: file.bytes, executable: file.executable });
|
|
634
|
+
}
|
|
635
|
+
return buildPrepared(files, {
|
|
636
|
+
kind: "archive",
|
|
637
|
+
fileName,
|
|
638
|
+
fallbackName: stem,
|
|
639
|
+
sha256,
|
|
640
|
+
...nameOverride
|
|
641
|
+
});
|
|
642
|
+
}
|
|
643
|
+
__name(readSkillInput, "readSkillInput");
|
|
644
|
+
function skillBackupsDir(home) {
|
|
645
|
+
return join2(namzuHomePath(home), "backups", "skills");
|
|
646
|
+
}
|
|
647
|
+
__name(skillBackupsDir, "skillBackupsDir");
|
|
648
|
+
function skillsFolderFor(scope, ctx) {
|
|
649
|
+
return scope === "user" ? { dir: userSkillsDir(ctx.home), anchor: userSkillsDir(ctx.home) } : { dir: projectSkillsDir(ctx.cwd), anchor: ctx.cwd };
|
|
650
|
+
}
|
|
651
|
+
__name(skillsFolderFor, "skillsFolderFor");
|
|
652
|
+
var place = /* @__PURE__ */ __name((scope) => scope === "user" ? "your skills" : "this project's skills", "place");
|
|
653
|
+
var filesWord = /* @__PURE__ */ __name((n) => `${n} ${n === 1 ? "file" : "files"}`, "filesWord");
|
|
654
|
+
async function installPrepared(prepared, input, ctx) {
|
|
655
|
+
const { name } = prepared;
|
|
656
|
+
const { scope } = ctx;
|
|
657
|
+
const base = { input, name, scope, findings: [...prepared.findings], notes: [] };
|
|
658
|
+
const roster = discoverSkillRoster({
|
|
659
|
+
cwd: ctx.cwd,
|
|
660
|
+
...ctx.home !== void 0 ? { home: ctx.home } : {},
|
|
661
|
+
config: { ...ctx.config ?? {}, builtin: true, disabled: [] }
|
|
662
|
+
});
|
|
663
|
+
if ([...roster.skills, ...roster.shadowed].some((s) => s.name === name && s.tier === "system")) {
|
|
664
|
+
return {
|
|
665
|
+
...base,
|
|
666
|
+
status: "failed",
|
|
667
|
+
message: `"${name}" is the name of a built-in skill, so it cannot be used.`
|
|
668
|
+
};
|
|
669
|
+
}
|
|
670
|
+
const targets = planSkillTargets(name, {
|
|
671
|
+
cwd: ctx.cwd,
|
|
672
|
+
...ctx.home !== void 0 ? { home: ctx.home } : {},
|
|
673
|
+
...ctx.config ? { config: ctx.config } : {}
|
|
674
|
+
});
|
|
675
|
+
const target = targets[scope];
|
|
676
|
+
const notes = target.collisions.filter((c) => !c.overwrite).map((c) => describeCollision(c, ctx.displayCwd ?? ctx.cwd));
|
|
677
|
+
const folder = skillsFolderFor(scope, ctx);
|
|
678
|
+
const now = ctx.now ?? (() => /* @__PURE__ */ new Date());
|
|
679
|
+
const record = {
|
|
680
|
+
version: 1,
|
|
681
|
+
source: prepared.source,
|
|
682
|
+
fileName: prepared.fileName,
|
|
683
|
+
sha256: prepared.sha256,
|
|
684
|
+
installedAt: now().toISOString(),
|
|
685
|
+
findings: prepared.findings,
|
|
686
|
+
files: [...prepared.files.keys()].sort()
|
|
687
|
+
};
|
|
688
|
+
let staged;
|
|
689
|
+
try {
|
|
690
|
+
staged = stageSkill(
|
|
691
|
+
{
|
|
692
|
+
skillsDir: folder.dir,
|
|
693
|
+
anchor: folder.anchor,
|
|
694
|
+
name,
|
|
695
|
+
files: prepared.files,
|
|
696
|
+
record,
|
|
697
|
+
backupsDir: skillBackupsDir(ctx.home),
|
|
698
|
+
now: /* @__PURE__ */ __name(() => now().getTime(), "now")
|
|
699
|
+
},
|
|
700
|
+
ctx.ops ?? REAL_FS_OPS
|
|
701
|
+
);
|
|
702
|
+
} catch (error) {
|
|
703
|
+
return { ...base, notes, status: "refused", message: capitalise(errorText(error)) };
|
|
704
|
+
}
|
|
705
|
+
try {
|
|
706
|
+
const parsed = parseSkillMarkdown(prepared.markdown, "SKILL.md");
|
|
707
|
+
const finding = await auditSkillInfo({
|
|
708
|
+
name,
|
|
709
|
+
description: prepared.description,
|
|
710
|
+
path: join2(staged.dir, "SKILL.md"),
|
|
711
|
+
source: scope,
|
|
712
|
+
tier: scope,
|
|
713
|
+
...parsed.hooksSource !== void 0 ? { hooksSource: parsed.hooksSource } : {}
|
|
714
|
+
});
|
|
715
|
+
if (finding.status === "invalid") {
|
|
716
|
+
return {
|
|
717
|
+
...base,
|
|
718
|
+
notes,
|
|
719
|
+
status: "failed",
|
|
720
|
+
message: `The skill would not load: ${finding.reason ?? "unknown reason"}`
|
|
721
|
+
};
|
|
722
|
+
}
|
|
723
|
+
const hookNotes = (finding.hookProblems ?? []).map(
|
|
724
|
+
(p) => `Hooks ${p.severity === "problem" ? "not loaded" : "note"}: ${p.text}`
|
|
725
|
+
);
|
|
726
|
+
const findings = [...base.findings, ...hookNotes];
|
|
727
|
+
const preview = [...prepared.consent, ...hookNotes];
|
|
728
|
+
const needsReplace = staged.exists && !ctx.replace && !ctx.yes;
|
|
729
|
+
const needsRun = prepared.consent.length > 0 && !ctx.yes;
|
|
730
|
+
if (needsReplace || needsRun) {
|
|
731
|
+
const question = [
|
|
732
|
+
needsRun ? `Add skill "${name}" to ${place(scope)}?` : "",
|
|
733
|
+
needsReplace ? `This replaces the skill "${name}" already in ${place(scope)}; a copy is kept.` : ""
|
|
734
|
+
].filter(Boolean).join(" ");
|
|
735
|
+
const shown = needsReplace ? [
|
|
736
|
+
...preview,
|
|
737
|
+
`Replaces ${displayPath(staged.target, ctx.displayCwd ?? ctx.cwd, ctx.home)}`
|
|
738
|
+
] : preview;
|
|
739
|
+
if (ctx.ask === void 0) {
|
|
740
|
+
return {
|
|
741
|
+
...base,
|
|
742
|
+
notes,
|
|
743
|
+
findings,
|
|
744
|
+
status: "needs-consent",
|
|
745
|
+
preview: shown,
|
|
746
|
+
message: `${question} Nobody can be asked here: run it again with ${needsRun ? "--yes" : "--replace"} to go ahead.`
|
|
747
|
+
};
|
|
748
|
+
}
|
|
749
|
+
if (!await ctx.ask(question, shown)) {
|
|
750
|
+
return {
|
|
751
|
+
...base,
|
|
752
|
+
notes,
|
|
753
|
+
findings,
|
|
754
|
+
status: "declined",
|
|
755
|
+
preview: shown,
|
|
756
|
+
message: "Nothing was added."
|
|
757
|
+
};
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
let result;
|
|
761
|
+
try {
|
|
762
|
+
result = staged.commit(staged.exists);
|
|
763
|
+
} catch (error) {
|
|
764
|
+
return {
|
|
765
|
+
...base,
|
|
766
|
+
notes,
|
|
767
|
+
findings,
|
|
768
|
+
status: "failed",
|
|
769
|
+
message: capitalise(errorText(error)),
|
|
770
|
+
...error instanceof InstallError && error.orphanBackup ? { backup: error.orphanBackup } : {}
|
|
771
|
+
};
|
|
772
|
+
}
|
|
773
|
+
const count = prepared.files.size;
|
|
774
|
+
const path = join2(staged.target, "SKILL.md");
|
|
775
|
+
const backup = result.backup;
|
|
776
|
+
return {
|
|
777
|
+
...base,
|
|
778
|
+
notes,
|
|
779
|
+
findings,
|
|
780
|
+
status: backup === void 0 ? "added" : "replaced",
|
|
781
|
+
path,
|
|
782
|
+
files: count,
|
|
783
|
+
...backup !== void 0 ? { backup } : {},
|
|
784
|
+
message: backup === void 0 ? `Added skill "${name}" to ${place(scope)} (${filesWord(count)}). It is available from your next message.` : `Replaced skill "${name}" in ${place(scope)} (${filesWord(count)}). The old copy is in ${displayPath(backup, ctx.displayCwd ?? ctx.cwd, ctx.home)}. It is available from your next message.`
|
|
785
|
+
};
|
|
786
|
+
} finally {
|
|
787
|
+
staged.discard();
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
__name(installPrepared, "installPrepared");
|
|
791
|
+
function errorText(error) {
|
|
792
|
+
return error instanceof Error ? error.message : String(error);
|
|
793
|
+
}
|
|
794
|
+
__name(errorText, "errorText");
|
|
795
|
+
async function addSkillInput(input, options, ctx) {
|
|
796
|
+
let prepared;
|
|
797
|
+
try {
|
|
798
|
+
prepared = readSkillInput(input, options);
|
|
799
|
+
} catch (error) {
|
|
800
|
+
if (error instanceof SkillInputError) {
|
|
801
|
+
return { input, status: error.kind, message: error.message, findings: [], notes: [] };
|
|
802
|
+
}
|
|
803
|
+
return { input, status: "failed", message: errorText(error), findings: [], notes: [] };
|
|
804
|
+
}
|
|
805
|
+
return installPrepared(prepared, input, ctx);
|
|
806
|
+
}
|
|
807
|
+
__name(addSkillInput, "addSkillInput");
|
|
808
|
+
|
|
809
|
+
// src/skills/create.ts
|
|
810
|
+
var LEADING_FRONTMATTER_MESSAGE = "Your instructions start with a --- block. Remove it: the name and description become the frontmatter.";
|
|
811
|
+
function startsWithFrontmatter(instructions) {
|
|
812
|
+
return /^?\s*---[ \t]*(\r?\n|$)/.test(instructions);
|
|
813
|
+
}
|
|
814
|
+
__name(startsWithFrontmatter, "startsWithFrontmatter");
|
|
815
|
+
function prepareCreatedSkill(input, now) {
|
|
816
|
+
if (startsWithFrontmatter(input.instructions))
|
|
817
|
+
throw new SkillDraftError(LEADING_FRONTMATTER_MESSAGE);
|
|
818
|
+
const draft = validateSkillDraft({
|
|
819
|
+
name: input.name,
|
|
820
|
+
description: input.description,
|
|
821
|
+
body: input.instructions,
|
|
822
|
+
origin: "created",
|
|
823
|
+
rejectMarkup: true
|
|
824
|
+
});
|
|
825
|
+
const markdown = composeSkillMarkdown(draft, { createdAt: now });
|
|
826
|
+
const bytes = Buffer.from(markdown, "utf8");
|
|
827
|
+
const files = /* @__PURE__ */ new Map([["SKILL.md", { bytes, executable: false }]]);
|
|
828
|
+
return {
|
|
829
|
+
name: draft.name,
|
|
830
|
+
description: draft.description,
|
|
831
|
+
markdown,
|
|
832
|
+
files,
|
|
833
|
+
source: "create",
|
|
834
|
+
fileName: "namzu skills create",
|
|
835
|
+
sha256: digestFiles(files),
|
|
836
|
+
findings: [],
|
|
837
|
+
consent: inlineShellConsent(draft.body)
|
|
838
|
+
};
|
|
839
|
+
}
|
|
840
|
+
__name(prepareCreatedSkill, "prepareCreatedSkill");
|
|
841
|
+
async function createSkill(input, ctx) {
|
|
842
|
+
let prepared;
|
|
843
|
+
try {
|
|
844
|
+
prepared = prepareCreatedSkill(input, (ctx.now ?? (() => /* @__PURE__ */ new Date()))());
|
|
845
|
+
} catch (error) {
|
|
846
|
+
const text = error instanceof Error ? error.message : String(error);
|
|
847
|
+
return {
|
|
848
|
+
input: input.name,
|
|
849
|
+
status: "failed",
|
|
850
|
+
message: text.charAt(0).toUpperCase() + text.slice(1),
|
|
851
|
+
findings: [],
|
|
852
|
+
notes: []
|
|
853
|
+
};
|
|
854
|
+
}
|
|
855
|
+
return installPrepared(prepared, input.name, ctx);
|
|
856
|
+
}
|
|
857
|
+
__name(createSkill, "createSkill");
|
|
858
|
+
|
|
859
|
+
// src/skills/remove.ts
|
|
860
|
+
import { lstatSync as lstatSync3, mkdirSync as mkdirSync2, readFileSync as readFileSync2, readdirSync as readdirSync3 } from "node:fs";
|
|
861
|
+
import { dirname as dirname3, join as join3 } from "node:path";
|
|
862
|
+
function describeSkillFolder(dir) {
|
|
863
|
+
const details = [];
|
|
864
|
+
let recorded;
|
|
865
|
+
try {
|
|
866
|
+
const record = JSON.parse(readFileSync2(join3(dir, SKILL_INSTALL_RECORD), "utf8"));
|
|
867
|
+
recorded = Array.isArray(record.files) ? new Set(record.files.filter((f) => typeof f === "string")) : void 0;
|
|
868
|
+
details.push(
|
|
869
|
+
record.source === "create" ? "Made with namzu skills create." : typeof record.fileName === "string" ? `Added from ${record.source === "folder" ? "a folder" : "a file"} (${record.fileName}).` : "Added with namzu skills add."
|
|
870
|
+
);
|
|
871
|
+
} catch {
|
|
872
|
+
}
|
|
873
|
+
if (recorded !== void 0) {
|
|
874
|
+
let later = 0;
|
|
875
|
+
const walk = /* @__PURE__ */ __name((abs, rel) => {
|
|
876
|
+
for (const entry of readdirSync3(abs, { withFileTypes: true })) {
|
|
877
|
+
const relPath = rel === "" ? entry.name : `${rel}/${entry.name}`;
|
|
878
|
+
if (entry.isDirectory()) walk(join3(abs, entry.name), relPath);
|
|
879
|
+
else if (relPath !== SKILL_INSTALL_RECORD && !recorded?.has(relPath)) later++;
|
|
880
|
+
}
|
|
881
|
+
}, "walk");
|
|
882
|
+
try {
|
|
883
|
+
walk(dir, "");
|
|
884
|
+
} catch {
|
|
885
|
+
}
|
|
886
|
+
if (later > 0) {
|
|
887
|
+
details.push(
|
|
888
|
+
`${later} ${later === 1 ? "file was" : "files were"} added to it after it was installed.`
|
|
889
|
+
);
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
return details;
|
|
893
|
+
}
|
|
894
|
+
__name(describeSkillFolder, "describeSkillFolder");
|
|
895
|
+
async function removeSkill(name, ctx) {
|
|
896
|
+
const none = { name, details: [] };
|
|
897
|
+
if (name.includes("__")) {
|
|
898
|
+
const plugin = name.slice(0, name.indexOf("__"));
|
|
899
|
+
return {
|
|
900
|
+
...none,
|
|
901
|
+
status: "refused",
|
|
902
|
+
message: `This skill comes with plugin "${plugin}". Turn the plugin off or uninstall it.`
|
|
903
|
+
};
|
|
904
|
+
}
|
|
905
|
+
for (const tier of ["user", "project"]) {
|
|
906
|
+
if (ctx.scope !== void 0 && ctx.scope !== tier) continue;
|
|
907
|
+
const linked = join3(skillsFolderFor(tier, ctx).dir, name);
|
|
908
|
+
try {
|
|
909
|
+
if (lstatSync3(linked).isSymbolicLink()) {
|
|
910
|
+
return {
|
|
911
|
+
...none,
|
|
912
|
+
status: "unsafe",
|
|
913
|
+
scope: tier,
|
|
914
|
+
path: linked,
|
|
915
|
+
message: `"${name}" is a link to another folder (${displayPath(linked, ctx.displayCwd ?? ctx.cwd, ctx.home)}), so it was not removed. Remove the link yourself.`
|
|
916
|
+
};
|
|
917
|
+
}
|
|
918
|
+
} catch {
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
const roster = discoverSkillRoster({
|
|
922
|
+
cwd: ctx.cwd,
|
|
923
|
+
...ctx.home !== void 0 ? { home: ctx.home } : {},
|
|
924
|
+
config: { ...ctx.config ?? {}, builtin: true, disabled: [] }
|
|
925
|
+
});
|
|
926
|
+
const found = [...roster.skills, ...roster.shadowed].filter((s) => s.name === name);
|
|
927
|
+
if (found.length === 0) {
|
|
928
|
+
return { ...none, status: "not-found", message: `No skill named "${name}" was found.` };
|
|
929
|
+
}
|
|
930
|
+
const removable = found.filter((s) => s.tier === "user" || s.tier === "project");
|
|
931
|
+
const wanted = ctx.scope === void 0 ? removable : removable.filter((s) => s.tier === ctx.scope);
|
|
932
|
+
if (wanted.length === 0) {
|
|
933
|
+
const other = found[0];
|
|
934
|
+
if (found.every((s) => s.tier === "system")) {
|
|
935
|
+
return {
|
|
936
|
+
...none,
|
|
937
|
+
status: "refused",
|
|
938
|
+
message: `"${name}" is a built-in skill and cannot be removed.`
|
|
939
|
+
};
|
|
940
|
+
}
|
|
941
|
+
if (ctx.scope !== void 0 && removable.length > 0) {
|
|
942
|
+
return {
|
|
943
|
+
...none,
|
|
944
|
+
status: "not-found",
|
|
945
|
+
message: `No skill named "${name}" in ${ctx.scope === "user" ? "your skills" : "this project's skills"}. It is in ${removable.map((s) => s.tier).join(" and ")}: use --scope ${removable[0]?.tier}.`
|
|
946
|
+
};
|
|
947
|
+
}
|
|
948
|
+
return {
|
|
949
|
+
...none,
|
|
950
|
+
status: "refused",
|
|
951
|
+
message: `"${name}" is in a ${skillTierLabel(other.tier)} skills folder (${displayPath(dirname3(other.path), ctx.displayCwd ?? ctx.cwd, ctx.home)}). Namzu removes only skills in your own or the project's .namzu folder; remove that folder yourself.`
|
|
952
|
+
};
|
|
953
|
+
}
|
|
954
|
+
if (wanted.length > 1) {
|
|
955
|
+
return {
|
|
956
|
+
...none,
|
|
957
|
+
status: "usage",
|
|
958
|
+
message: `"${name}" is in both your skills and this project's skills. Say which one: --scope user or --scope project.`
|
|
959
|
+
};
|
|
960
|
+
}
|
|
961
|
+
const skill = wanted[0];
|
|
962
|
+
const scope = skill.tier;
|
|
963
|
+
const dir = dirname3(skill.path);
|
|
964
|
+
let stat;
|
|
965
|
+
try {
|
|
966
|
+
stat = lstatSync3(dir);
|
|
967
|
+
} catch {
|
|
968
|
+
return { ...none, status: "not-found", scope, message: `No skill named "${name}" was found.` };
|
|
969
|
+
}
|
|
970
|
+
if (stat.isSymbolicLink()) {
|
|
971
|
+
return {
|
|
972
|
+
...none,
|
|
973
|
+
status: "unsafe",
|
|
974
|
+
scope,
|
|
975
|
+
path: dir,
|
|
976
|
+
message: `"${name}" is a link to another folder (${displayPath(dir, ctx.displayCwd ?? ctx.cwd, ctx.home)}), so it was not removed. Remove the link yourself.`
|
|
977
|
+
};
|
|
978
|
+
}
|
|
979
|
+
const details = describeSkillFolder(dir);
|
|
980
|
+
const place2 = scope === "user" ? "your skills" : "this project's skills";
|
|
981
|
+
if (!ctx.yes) {
|
|
982
|
+
const question = `Remove skill "${name}" from ${place2}? A copy is kept in ${displayPath(skillBackupsDir(ctx.home), ctx.displayCwd ?? ctx.cwd, ctx.home)}.`;
|
|
983
|
+
if (ctx.ask === void 0) {
|
|
984
|
+
return {
|
|
985
|
+
name,
|
|
986
|
+
details,
|
|
987
|
+
status: "needs-consent",
|
|
988
|
+
scope,
|
|
989
|
+
path: dir,
|
|
990
|
+
message: `${question} Nobody can be asked here: run it again with --yes to go ahead.`
|
|
991
|
+
};
|
|
992
|
+
}
|
|
993
|
+
if (!await ctx.ask(question, details)) {
|
|
994
|
+
return {
|
|
995
|
+
name,
|
|
996
|
+
details,
|
|
997
|
+
status: "declined",
|
|
998
|
+
scope,
|
|
999
|
+
path: dir,
|
|
1000
|
+
message: "Nothing was removed."
|
|
1001
|
+
};
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
const backups = skillBackupsDir(ctx.home);
|
|
1005
|
+
let ms = (ctx.now ?? (() => /* @__PURE__ */ new Date()))().getTime();
|
|
1006
|
+
let backup = join3(backups, `${name}.${ms}`);
|
|
1007
|
+
try {
|
|
1008
|
+
assertBackupsSafe(backups);
|
|
1009
|
+
mkdirSync2(backups, { recursive: true, mode: 448 });
|
|
1010
|
+
for (; ; ) {
|
|
1011
|
+
try {
|
|
1012
|
+
lstatSync3(backup);
|
|
1013
|
+
} catch {
|
|
1014
|
+
break;
|
|
1015
|
+
}
|
|
1016
|
+
ms += 1;
|
|
1017
|
+
backup = join3(backups, `${name}.${ms}`);
|
|
1018
|
+
}
|
|
1019
|
+
moveDir(dir, backup, ctx.ops ?? REAL_FS_OPS);
|
|
1020
|
+
} catch (error) {
|
|
1021
|
+
return {
|
|
1022
|
+
name,
|
|
1023
|
+
details,
|
|
1024
|
+
status: "failed",
|
|
1025
|
+
scope,
|
|
1026
|
+
path: dir,
|
|
1027
|
+
message: `Could not remove "${name}": ${error instanceof Error ? error.message : String(error)}. Nothing was changed.`
|
|
1028
|
+
};
|
|
1029
|
+
}
|
|
1030
|
+
return {
|
|
1031
|
+
name,
|
|
1032
|
+
details,
|
|
1033
|
+
status: "removed",
|
|
1034
|
+
scope,
|
|
1035
|
+
path: dir,
|
|
1036
|
+
backup,
|
|
1037
|
+
message: `Removed. A copy is in ${displayPath(backup, ctx.displayCwd ?? ctx.cwd, ctx.home)} if you want it back.`
|
|
1038
|
+
};
|
|
1039
|
+
}
|
|
1040
|
+
__name(removeSkill, "removeSkill");
|
|
1041
|
+
|
|
1042
|
+
export {
|
|
1043
|
+
auditFileSkills,
|
|
1044
|
+
digestFiles,
|
|
1045
|
+
SKILL_FILE_MAX_BYTES,
|
|
1046
|
+
SKILL_ADD_MAX_INPUTS,
|
|
1047
|
+
SkillInputError,
|
|
1048
|
+
readSkillInput,
|
|
1049
|
+
skillsFolderFor,
|
|
1050
|
+
installPrepared,
|
|
1051
|
+
addSkillInput,
|
|
1052
|
+
createSkill,
|
|
1053
|
+
removeSkill
|
|
1054
|
+
};
|
|
1055
|
+
//# sourceMappingURL=chunk-AMYP2WPW.js.map
|