@namzu/cli 60.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.
Files changed (564) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/bin.js +1 -1
  3. package/dist/chunks/{acp-QLIZHXKX.js → acp-6R4I2A3Q.js} +2060 -245
  4. package/dist/chunks/acp-6R4I2A3Q.js.map +6 -0
  5. package/dist/chunks/{activity-command-IVAID3QG.js → activity-command-JU4HLIQJ.js} +14 -14
  6. package/dist/chunks/{add-W4VXIXR3.js → add-S6JYKDI4.js} +24 -24
  7. package/dist/chunks/{agent-3VVUFK46.js → agent-E343AQV7.js} +53 -50
  8. package/dist/chunks/agent-session-D6JIOCON.js +95 -0
  9. package/dist/chunks/{apply-at-exit-UW5DQZED.js → apply-at-exit-MEOJMGNT.js} +7 -7
  10. package/dist/chunks/{archive-VGG3TNKD.js → archive-ZPWC7GZU.js} +13 -13
  11. package/dist/chunks/{auth-XUAD35SY.js → auth-6NX4TMIG.js} +12 -12
  12. package/dist/chunks/{bin-main-3A5QPUJN.js → bin-main-P3KAQDKC.js} +8 -8
  13. package/dist/chunks/{binding-743KPSRO.js → binding-6QZVGFQ5.js} +3 -3
  14. package/dist/chunks/{browser-Y6PS3RBO.js → browser-KK2U5524.js} +7 -7
  15. package/dist/chunks/{chat-P3OKHK34.js → chat-VEXJRSZN.js} +17 -17
  16. package/dist/chunks/{chunk-AXCSETAX.js → chunk-2DCOB33W.js} +6 -6
  17. package/dist/chunks/{chunk-24PN4KZ7.js → chunk-2KVQVPJ7.js} +5 -5
  18. package/dist/chunks/chunk-32OIBGYI.js +188 -0
  19. package/dist/chunks/chunk-32OIBGYI.js.map +6 -0
  20. package/dist/chunks/{chunk-ITFIXESL.js → chunk-42JIZXVL.js} +4 -4
  21. package/dist/chunks/{chunk-44V3FNMT.js → chunk-4473VICE.js} +3 -3
  22. package/dist/chunks/{chunk-D5ORLKON.js → chunk-44YG6EI4.js} +4 -4
  23. package/dist/chunks/{chunk-OTNW5ZO6.js → chunk-452SL2Y4.js} +2 -2
  24. package/dist/chunks/{chunk-SR4DQPOI.js → chunk-4BNCVR3U.js} +2 -2
  25. package/dist/chunks/{chunk-IGZGAC75.js → chunk-4CJ3HPOT.js} +2 -2
  26. package/dist/chunks/{chunk-WWMSEDXA.js → chunk-4DSUVT37.js} +13 -10
  27. package/dist/chunks/chunk-4DSUVT37.js.map +6 -0
  28. package/dist/chunks/{chunk-TSHMH45O.js → chunk-4ENL4VUO.js} +4 -4
  29. package/dist/chunks/{chunk-ONVEH4H7.js → chunk-4KVYTHY7.js} +3 -3
  30. package/dist/chunks/{chunk-KBIVQ5RH.js → chunk-4Y242BU4.js} +5 -5
  31. package/dist/chunks/{chunk-2P427DDU.js → chunk-5F4DSPZC.js} +10 -10
  32. package/dist/chunks/{chunk-QI6XNUH6.js → chunk-5IGEQN7L.js} +4 -4
  33. package/dist/chunks/{chunk-5Y455HIT.js → chunk-5ZLKTFU2.js} +3 -3
  34. package/dist/chunks/{chunk-SNKDM7FT.js → chunk-66QIFMEO.js} +2 -2
  35. package/dist/chunks/{chunk-ATL46ZCR.js → chunk-6HYK4DDB.js} +3 -3
  36. package/dist/chunks/{chunk-D3OHAYMX.js → chunk-6TUHWKXP.js} +15 -6
  37. package/dist/chunks/chunk-6TUHWKXP.js.map +6 -0
  38. package/dist/chunks/{chunk-FISBMAF4.js → chunk-6W3UGXGG.js} +4 -4
  39. package/dist/chunks/{chunk-P2PWTXHD.js → chunk-75YLZNZW.js} +3 -3
  40. package/dist/chunks/{chunk-37S6BVTN.js → chunk-AC5P6W3G.js} +2 -2
  41. package/dist/chunks/chunk-AMYP2WPW.js +1055 -0
  42. package/dist/chunks/chunk-AMYP2WPW.js.map +6 -0
  43. package/dist/chunks/{chunk-XNALFKQ2.js → chunk-AYMB4AOZ.js} +4 -4
  44. package/dist/chunks/{chunk-ZFEDNTIB.js → chunk-B4AOCHH6.js} +3 -3
  45. package/dist/chunks/{chunk-7PD3LHIR.js → chunk-BA7KUG6V.js} +2 -2
  46. package/dist/chunks/{chunk-3JCHJOU3.js → chunk-BHQHTM3Z.js} +5 -5
  47. package/dist/chunks/chunk-BJT37HR4.js +3644 -0
  48. package/dist/chunks/chunk-BJT37HR4.js.map +6 -0
  49. package/dist/chunks/{chunk-52T26DYZ.js → chunk-BNLIRJ3M.js} +4 -4
  50. package/dist/chunks/{chunk-ZHRBJT5B.js → chunk-BURGRQWO.js} +2 -2
  51. package/dist/chunks/{chunk-3P5TQ3VZ.js → chunk-BWD2TUI4.js} +5 -5
  52. package/dist/chunks/{chunk-LQFUO2RZ.js → chunk-BZR5PIFF.js} +300 -292
  53. package/dist/chunks/chunk-BZR5PIFF.js.map +6 -0
  54. package/dist/chunks/{chunk-OK3QKISP.js → chunk-C7E7YCRD.js} +5 -5
  55. package/dist/chunks/{chunk-YMVJOKBZ.js → chunk-CXW7I2S3.js} +2 -2
  56. package/dist/chunks/{chunk-4KRQ6EWL.js → chunk-D2R47LDH.js} +121 -8
  57. package/dist/chunks/chunk-D2R47LDH.js.map +6 -0
  58. package/dist/chunks/chunk-D4TXOX34.js +342 -0
  59. package/dist/chunks/chunk-D4TXOX34.js.map +6 -0
  60. package/dist/chunks/{chunk-BJWJPQ66.js → chunk-D6PB3Z7Q.js} +2 -2
  61. package/dist/chunks/{chunk-FOS5YJED.js → chunk-DEAG4G5J.js} +2 -2
  62. package/dist/chunks/{chunk-DHQJRU7E.js → chunk-DRSQTKDN.js} +3 -3
  63. package/dist/chunks/chunk-EBBT2I5S.js +153 -0
  64. package/dist/chunks/chunk-EBBT2I5S.js.map +6 -0
  65. package/dist/chunks/{chunk-JAPP6DFJ.js → chunk-EWPGU4HH.js} +10 -364
  66. package/dist/chunks/chunk-EWPGU4HH.js.map +6 -0
  67. package/dist/chunks/{chunk-HNSJJXIO.js → chunk-EXJJLYZK.js} +3 -3
  68. package/dist/chunks/{chunk-L7DZ2QPD.js → chunk-F5W4TNCR.js} +2 -2
  69. package/dist/chunks/{chunk-XIBT7TAZ.js → chunk-F7KOBJVW.js} +4 -4
  70. package/dist/chunks/{chunk-XLWFT4QC.js → chunk-FK4MAZV2.js} +5 -5
  71. package/dist/chunks/{chunk-NIHIVQJS.js → chunk-FMD4REZQ.js} +41 -41
  72. package/dist/chunks/{chunk-NIHIVQJS.js.map → chunk-FMD4REZQ.js.map} +1 -1
  73. package/dist/chunks/{chunk-J2AH4QK4.js → chunk-FPC3K4TT.js} +3 -3
  74. package/dist/chunks/{chunk-RE5EUO3F.js → chunk-FVIKYFYD.js} +2 -2
  75. package/dist/chunks/{chunk-TN7MDKW2.js → chunk-GPTYDM26.js} +8 -8
  76. package/dist/chunks/{chunk-3APHAS77.js → chunk-GT22EDUB.js} +6 -6
  77. package/dist/chunks/{chunk-PGD2EYI7.js → chunk-GTUTBTOV.js} +3 -3
  78. package/dist/chunks/{chunk-ZY7N242I.js → chunk-H6NTNPWD.js} +4 -4
  79. package/dist/chunks/{chunk-2X53RSPY.js → chunk-HCQGZPVT.js} +2 -2
  80. package/dist/chunks/{chunk-BBBVDHRH.js → chunk-HG2PPCAE.js} +3 -3
  81. package/dist/chunks/{chunk-JR66BLKY.js → chunk-HKRUNZVI.js} +3 -3
  82. package/dist/chunks/{chunk-BBBFPJV3.js → chunk-HM7L5PM2.js} +3 -3
  83. package/dist/chunks/{chunk-2CP6CJXJ.js → chunk-I4RC6KQQ.js} +19 -19
  84. package/dist/chunks/{chunk-GRCEOMSP.js → chunk-IL4Y3JGT.js} +13 -13
  85. package/dist/chunks/{chunk-RYV4P5CO.js → chunk-IMMUS7IW.js} +278 -7
  86. package/dist/chunks/chunk-IMMUS7IW.js.map +6 -0
  87. package/dist/chunks/{chunk-HT6A5LCI.js → chunk-IQ44C7Y3.js} +33 -9
  88. package/dist/chunks/chunk-IQ44C7Y3.js.map +6 -0
  89. package/dist/chunks/{chunk-VUKFKBOO.js → chunk-J4PL65DJ.js} +6 -6
  90. package/dist/chunks/chunk-JANK2R3L.js +402 -0
  91. package/dist/chunks/chunk-JANK2R3L.js.map +6 -0
  92. package/dist/chunks/{chunk-TYD5K7MT.js → chunk-JECLB23L.js} +6 -6
  93. package/dist/chunks/{chunk-XVML5P53.js → chunk-JJ72TLOA.js} +15 -15
  94. package/dist/chunks/{chunk-FQ3DUX7L.js → chunk-JRBFL6WT.js} +2 -2
  95. package/dist/chunks/{chunk-UCDXXMAD.js → chunk-K2EKXCLZ.js} +3 -3
  96. package/dist/chunks/{chunk-MN3CC4AF.js → chunk-K7YZJV2X.js} +248 -24
  97. package/dist/chunks/chunk-K7YZJV2X.js.map +6 -0
  98. package/dist/chunks/chunk-KF6IKSF2.js +472 -0
  99. package/dist/chunks/chunk-KF6IKSF2.js.map +6 -0
  100. package/dist/chunks/{chunk-XS6GGF4E.js → chunk-KSRN5Y2O.js} +64 -45
  101. package/dist/chunks/chunk-KSRN5Y2O.js.map +6 -0
  102. package/dist/chunks/{chunk-JCK6FM7F.js → chunk-ME4LETA3.js} +2 -2
  103. package/dist/chunks/{chunk-2FP2UHZO.js → chunk-MF3SFDBW.js} +3 -3
  104. package/dist/chunks/{chunk-HA46XY4I.js → chunk-MK42KB72.js} +4 -4
  105. package/dist/chunks/{chunk-EYF7VILP.js → chunk-MUSGZEFY.js} +2 -2
  106. package/dist/chunks/{chunk-XAMOWP2G.js → chunk-N5CCXOYK.js} +7 -7
  107. package/dist/chunks/{chunk-DFOULHWV.js → chunk-NBJ5PRAY.js} +3 -3
  108. package/dist/chunks/{chunk-ZPWWUTSR.js → chunk-NKHEBASJ.js} +2 -2
  109. package/dist/chunks/{chunk-R6WB34IP.js → chunk-NVWD5XDT.js} +2 -2
  110. package/dist/chunks/{chunk-CQNVNHRL.js → chunk-O45DCUNX.js} +2 -2
  111. package/dist/chunks/{chunk-7MC2ACNB.js → chunk-O4EILTV6.js} +111 -20
  112. package/dist/chunks/chunk-O4EILTV6.js.map +6 -0
  113. package/dist/chunks/{chunk-OVJOSPJ5.js → chunk-PAUMCJPX.js} +3 -3
  114. package/dist/chunks/{chunk-E5GQTEDW.js → chunk-PE4MWWUW.js} +3 -3
  115. package/dist/chunks/{chunk-3533PAJJ.js → chunk-PLCWCIL4.js} +2 -2
  116. package/dist/chunks/{chunk-G4XSQIFF.js → chunk-PRJO4XM3.js} +2 -2
  117. package/dist/chunks/{chunk-6V6MRHZZ.js → chunk-PRRX5LNR.js} +2 -2
  118. package/dist/chunks/{chunk-LONNSCMP.js → chunk-PS5SVAUJ.js} +2 -2
  119. package/dist/chunks/chunk-PZLPACNY.js +407 -0
  120. package/dist/chunks/chunk-PZLPACNY.js.map +6 -0
  121. package/dist/chunks/{chunk-EN2E63G6.js → chunk-PZWSRAE7.js} +6 -6
  122. package/dist/chunks/{chunk-S6LFXBVK.js → chunk-QBLHOG2F.js} +3 -3
  123. package/dist/chunks/{chunk-4FMBST2N.js → chunk-QCV3HH4P.js} +2 -2
  124. package/dist/chunks/{chunk-R2TBZK62.js → chunk-QGBR42TV.js} +7 -7
  125. package/dist/chunks/{chunk-TFOFFJNY.js → chunk-QNJXULU7.js} +2 -2
  126. package/dist/chunks/{chunk-IOTYZLY5.js → chunk-QQ4S6MNH.js} +13548 -4076
  127. package/dist/chunks/chunk-QQ4S6MNH.js.map +6 -0
  128. package/dist/chunks/{chunk-PIUHVCR3.js → chunk-R2KAESOM.js} +2 -2
  129. package/dist/chunks/{chunk-G52WH6JI.js → chunk-R6M6EIAH.js} +4 -4
  130. package/dist/chunks/{chunk-2PEIKBGP.js → chunk-RKKU2RE4.js} +2 -2
  131. package/dist/chunks/{chunk-YHFKTEU6.js → chunk-RMOTHWPV.js} +2 -2
  132. package/dist/chunks/{chunk-ZX5C2ELY.js → chunk-RQAY7REG.js} +3 -3
  133. package/dist/chunks/{chunk-MXLAVYBS.js → chunk-SLTJNYOU.js} +2 -2
  134. package/dist/chunks/{chunk-JARQ4I4Q.js → chunk-SXONHO4H.js} +9 -9
  135. package/dist/chunks/{chunk-YWBOZNDX.js → chunk-T7ILM666.js} +11 -11
  136. package/dist/chunks/{chunk-OOIVZ5PA.js → chunk-TBGKPWCL.js} +9 -9
  137. package/dist/chunks/{chunk-M4LHZRTX.js → chunk-TBJ6XU3T.js} +3 -3
  138. package/dist/chunks/{chunk-UI3ELYQU.js → chunk-TMPP2DEY.js} +4 -4
  139. package/dist/chunks/{chunk-DLMDCCO7.js → chunk-TSOZBRM6.js} +2 -2
  140. package/dist/chunks/{chunk-7XLZPKOT.js → chunk-TTFPWGIU.js} +2 -2
  141. package/dist/chunks/{chunk-NCPOOJD4.js → chunk-TTKMQW6B.js} +3 -3
  142. package/dist/chunks/{chunk-S5GKG5GV.js → chunk-UCML5ZXB.js} +3 -3
  143. package/dist/chunks/{chunk-HAIG4TLP.js → chunk-VG7245VJ.js} +6 -6
  144. package/dist/chunks/{chunk-IXJ6A2XE.js → chunk-VQZPXK4X.js} +3 -3
  145. package/dist/chunks/{chunk-2MEBOBOM.js → chunk-VWUTJ4EU.js} +3 -3
  146. package/dist/chunks/{chunk-VJFBRQZ4.js → chunk-WDKAL7EW.js} +2 -2
  147. package/dist/chunks/{chunk-2ED34AXP.js → chunk-WJ6QRVL6.js} +2 -2
  148. package/dist/chunks/{chunk-CKMF72VE.js → chunk-WOTA5FO5.js} +3 -3
  149. package/dist/chunks/{chunk-QUUDXDDL.js → chunk-WPGVZMSU.js} +2 -2
  150. package/dist/chunks/{chunk-ULJAPIOG.js → chunk-WYA4QWWE.js} +181 -7
  151. package/dist/chunks/chunk-WYA4QWWE.js.map +6 -0
  152. package/dist/chunks/{chunk-EVJKQAZM.js → chunk-XDUA6PBP.js} +2 -2
  153. package/dist/chunks/{chunk-GVHUHRGI.js → chunk-XE6XT6R6.js} +4 -4
  154. package/dist/chunks/{chunk-QFJ5IWYL.js → chunk-XNQY26AE.js} +31 -131
  155. package/dist/chunks/chunk-XNQY26AE.js.map +6 -0
  156. package/dist/chunks/{chunk-LGUIDOA7.js → chunk-YR3TWNIV.js} +9 -9
  157. package/dist/chunks/{chunk-K4APHATW.js → chunk-YWRRS7SO.js} +2 -2
  158. package/dist/chunks/{chunk-F6YNTG3K.js → chunk-Z5OG4HXI.js} +26 -22
  159. package/dist/chunks/chunk-Z5OG4HXI.js.map +6 -0
  160. package/dist/chunks/{chunk-ESLOAQRL.js → chunk-ZHEEG3NS.js} +2 -2
  161. package/dist/chunks/{cli-runtime-SL6YG4EX.js → cli-runtime-ZJKKIW4H.js} +22 -22
  162. package/dist/chunks/{commands-XRQOUFRE.js → commands-TQH5DD22.js} +6 -6
  163. package/dist/chunks/{computer-6P3GAOV2.js → computer-WOU5WIIR.js} +2 -2
  164. package/dist/chunks/{config-W3ABQG5K.js → config-APYUJ5UW.js} +13 -13
  165. package/dist/chunks/{cost-ZKKW4JSZ.js → cost-5YV27U7F.js} +5 -5
  166. package/dist/chunks/{crash-report-Q2WAKIU5.js → crash-report-QVXU2YVL.js} +6 -6
  167. package/dist/chunks/{dist-JY4FIVBZ.js → dist-2FSOLP72.js} +2 -2
  168. package/dist/chunks/{dist-O2QP5QCU.js → dist-AOT4CEP5.js} +2 -2
  169. package/dist/chunks/{dist-OXSKWJNB.js → dist-H7CAJ3ZW.js} +44 -2
  170. package/dist/chunks/{dist-IPR6EVQM.js → dist-IZGKRIWL.js} +2 -2
  171. package/dist/chunks/{dist-WI7EX7ZF.js → dist-J4UXFVYR.js} +2 -2
  172. package/dist/chunks/{dist-YE6ADUZP.js → dist-JHKRSGW6.js} +2 -2
  173. package/dist/chunks/{dist-R4PUUPXV.js → dist-PZYMYR7N.js} +3 -3
  174. package/dist/chunks/{dist-VT4VSQTO.js → dist-Z2HW2SJR.js} +2 -2
  175. package/dist/chunks/{doctor-EUH7WGN6.js → doctor-CM6UPXG5.js} +40 -38
  176. package/dist/chunks/{drain-3DDY42KQ.js → drain-X6RURKKC.js} +17 -17
  177. package/dist/chunks/{entry-FNHGVOQM.js → entry-QQDPY6ZL.js} +6 -6
  178. package/dist/chunks/{eval-CFKAWR3B.js → eval-GZA22B4I.js} +9 -9
  179. package/dist/chunks/{exec-BR6L3C3T.js → exec-3NE75Z6E.js} +46 -45
  180. package/dist/chunks/exec-3NE75Z6E.js.map +6 -0
  181. package/dist/chunks/{extension-4VR722KH.js → extension-N5IQNKVZ.js} +6 -5
  182. package/dist/chunks/{github-IF3JVVJF.js → github-AUOENJUY.js} +2 -2
  183. package/dist/chunks/{home-JCDINY64.js → home-I4FIB6FV.js} +3 -3
  184. package/dist/chunks/{homes-53P37RPB.js → homes-WTMMXQ6G.js} +5 -5
  185. package/dist/chunks/{hooks-6EV4IEHU.js → hooks-R42OTZDT.js} +22 -21
  186. package/dist/chunks/hooks-R42OTZDT.js.map +6 -0
  187. package/dist/chunks/{hooks-report-OK5PIOSF.js → hooks-report-K6VOPVBR.js} +18 -17
  188. package/dist/chunks/{host-KF63UW3T.js → host-65UFBZJV.js} +10 -10
  189. package/dist/chunks/host-queries-L4PYE2BW.js +37 -0
  190. package/dist/chunks/{installed-list-QLVA6XBV.js → installed-list-7QIWVKLQ.js} +4 -4
  191. package/dist/chunks/{learn-XNVRCNGV.js → learn-NZXLKYV4.js} +17 -17
  192. package/dist/chunks/{learn-builtin-XABWBGRU.js → learn-builtin-RC4XXVBS.js} +20 -20
  193. package/dist/chunks/{lifecycle-K7REDQBN.js → lifecycle-NLCZ6OPA.js} +30 -30
  194. package/dist/chunks/{list-US5UDLON.js → list-2U67CAWS.js} +18 -18
  195. package/dist/chunks/{live-DNA4UB2B.js → live-CWJ2NWUQ.js} +39 -37
  196. package/dist/chunks/{load-2WCYASMC.js → load-H52QQBVE.js} +13 -9
  197. package/dist/chunks/{logs-ZF7YJNOC.js → logs-ZIW3QFU4.js} +4 -4
  198. package/dist/chunks/{mcp-FBJXQJ6I.js → mcp-FNSMEMCM.js} +145 -35
  199. package/dist/chunks/mcp-FNSMEMCM.js.map +6 -0
  200. package/dist/chunks/{mcp-serve-TTZ33VMY.js → mcp-serve-ZC2OKIPP.js} +17 -17
  201. package/dist/chunks/{message-command-FMT4APFA.js → message-command-IHZWL5GI.js} +59 -56
  202. package/dist/chunks/message-command-IHZWL5GI.js.map +6 -0
  203. package/dist/chunks/{open-I4YKGQSW.js → open-AHDQMVXI.js} +7 -7
  204. package/dist/chunks/{operator-tools-FC5JFH42.js → operator-tools-P5R4TF6N.js} +15 -15
  205. package/dist/chunks/{output-schema-KMYL2UB6.js → output-schema-Q5RWHNKE.js} +3 -3
  206. package/dist/chunks/{pal-UZFR42OY.js → pal-T42HU4AK.js} +15 -15
  207. package/dist/chunks/{peers-NM5HJGSR.js → peers-5RYEA7IA.js} +7 -7
  208. package/dist/chunks/{peers-V7XCJUFZ.js → peers-7ZG3DEBO.js} +19 -19
  209. package/dist/chunks/plugin-DGEINYG5.js +2958 -0
  210. package/dist/chunks/plugin-DGEINYG5.js.map +6 -0
  211. package/dist/chunks/{providers-BQ25F6LA.js → providers-BXXIM7EW.js} +18 -18
  212. package/dist/chunks/{providers-VS37WA3E.js → providers-I24HYZXG.js} +10 -10
  213. package/dist/chunks/{pty-NWEV3DSP.js → pty-WVKM6ATI.js} +3 -3
  214. package/dist/chunks/resume-F7JEDBHI.js +25 -0
  215. package/dist/chunks/{resume-command-KEXAVL6P.js → resume-command-4I47WN7T.js} +4 -4
  216. package/dist/chunks/{running-JLMG6IL4.js → running-VID6BVT2.js} +4 -4
  217. package/dist/chunks/{schedule-6ERJJOA3.js → schedule-75IZH76Z.js} +12 -12
  218. package/dist/chunks/{send-UXJ7GXKN.js → send-QRYY2NCG.js} +19 -19
  219. package/dist/chunks/send-person-VADQNJBN.js +32 -0
  220. package/dist/chunks/{service-NYJZCLH2.js → service-B6BNESZB.js} +30 -30
  221. package/dist/chunks/{setting-cli-ILFKSR4D.js → setting-cli-O4YWOIU5.js} +12 -12
  222. package/dist/chunks/skills-PEMVX5C3.js +604 -0
  223. package/dist/chunks/skills-PEMVX5C3.js.map +6 -0
  224. package/dist/chunks/{start-check-7GBRCGVJ.js → start-check-EKRXJ5VE.js} +2 -2
  225. package/dist/chunks/{startup-failure-UA32GGJB.js → startup-failure-2UJKPNMR.js} +2 -2
  226. package/dist/chunks/{state-SSRHEX5K.js → state-X3MKUFYM.js} +20 -20
  227. package/dist/chunks/{store-2GFZ5XXW.js → store-4OXWHFS5.js} +12 -12
  228. package/dist/chunks/{store-ROR7VTZ2.js → store-MK5IYBE5.js} +8 -8
  229. package/dist/chunks/{store-WRRTTRBT.js → store-QFNY4BV4.js} +4 -4
  230. package/dist/chunks/{store-MP5EB266.js → store-VRKKFOYW.js} +3 -3
  231. package/dist/chunks/{tui-2JTNW2G7.js → tui-MI72TUST.js} +96 -92
  232. package/dist/chunks/tui-MI72TUST.js.map +6 -0
  233. package/dist/chunks/{update-32IRH5TG.js → update-ELZEXYIX.js} +8 -8
  234. package/dist/chunks/{watch-PXPP5QXP.js → watch-HPINGMZZ.js} +100 -96
  235. package/dist/chunks/watch-HPINGMZZ.js.map +6 -0
  236. package/dist/chunks/{workspaces-4YXZSENL.js → workspaces-3LB4SPPS.js} +15 -15
  237. package/dist/chunks/{worktree-DJHBLFHZ.js → worktree-5CWUUWNO.js} +26 -22
  238. package/dist/chunks/worktree-5CWUUWNO.js.map +6 -0
  239. package/dist/commands/acp.d.ts +4 -2
  240. package/dist/commands/acp.d.ts.map +1 -1
  241. package/dist/commands/actions/mcp.d.ts.map +1 -1
  242. package/dist/commands/actions/small.d.ts.map +1 -1
  243. package/dist/commands/desktop-host-plugins.d.ts +321 -0
  244. package/dist/commands/desktop-host-plugins.d.ts.map +1 -0
  245. package/dist/commands/desktop-host-skills.d.ts +103 -0
  246. package/dist/commands/desktop-host-skills.d.ts.map +1 -0
  247. package/dist/commands/desktop-host.d.ts +230 -18
  248. package/dist/commands/desktop-host.d.ts.map +1 -1
  249. package/dist/commands/manifest.d.ts.map +1 -1
  250. package/dist/commands/mcp.d.ts.map +1 -1
  251. package/dist/commands/plugin-install.d.ts +28 -0
  252. package/dist/commands/plugin-install.d.ts.map +1 -0
  253. package/dist/commands/plugin-records.d.ts +48 -0
  254. package/dist/commands/plugin-records.d.ts.map +1 -0
  255. package/dist/commands/plugin.d.ts.map +1 -1
  256. package/dist/commands/skills-manage.d.ts +32 -0
  257. package/dist/commands/skills-manage.d.ts.map +1 -0
  258. package/dist/commands/skills.d.ts.map +1 -1
  259. package/dist/config/load.d.ts +9 -0
  260. package/dist/config/load.d.ts.map +1 -1
  261. package/dist/config/schema.d.ts +7 -0
  262. package/dist/config/schema.d.ts.map +1 -1
  263. package/dist/config/settings-descriptors.d.ts.map +1 -1
  264. package/dist/index.js +40 -38
  265. package/dist/integrations/archive/zip.d.ts +36 -0
  266. package/dist/integrations/archive/zip.d.ts.map +1 -0
  267. package/dist/integrations/extensions/package.d.ts +7 -16
  268. package/dist/integrations/extensions/package.d.ts.map +1 -1
  269. package/dist/integrations/mcp/all-servers.d.ts +30 -0
  270. package/dist/integrations/mcp/all-servers.d.ts.map +1 -0
  271. package/dist/integrations/mcp/plugin-remote.d.ts +141 -0
  272. package/dist/integrations/mcp/plugin-remote.d.ts.map +1 -0
  273. package/dist/integrations/mcp/project-approval.d.ts +29 -1
  274. package/dist/integrations/mcp/project-approval.d.ts.map +1 -1
  275. package/dist/integrations/mcp/server-listing.d.ts +7 -3
  276. package/dist/integrations/mcp/server-listing.d.ts.map +1 -1
  277. package/dist/integrations/mcp/servers.d.ts +6 -0
  278. package/dist/integrations/mcp/servers.d.ts.map +1 -1
  279. package/dist/integrations/mcp/user-config.d.ts +10 -0
  280. package/dist/integrations/mcp/user-config.d.ts.map +1 -1
  281. package/dist/integrations/plugins/enabled-records.d.ts +78 -0
  282. package/dist/integrations/plugins/enabled-records.d.ts.map +1 -0
  283. package/dist/integrations/plugins/fetch/archive.d.ts +15 -0
  284. package/dist/integrations/plugins/fetch/archive.d.ts.map +1 -0
  285. package/dist/integrations/plugins/fetch/git.d.ts +145 -0
  286. package/dist/integrations/plugins/fetch/git.d.ts.map +1 -0
  287. package/dist/integrations/plugins/fetch/index.d.ts +33 -0
  288. package/dist/integrations/plugins/fetch/index.d.ts.map +1 -0
  289. package/dist/integrations/plugins/fetch/source.d.ts +107 -0
  290. package/dist/integrations/plugins/fetch/source.d.ts.map +1 -0
  291. package/dist/integrations/plugins/fetch/url.d.ts +34 -0
  292. package/dist/integrations/plugins/fetch/url.d.ts.map +1 -0
  293. package/dist/integrations/plugins/files.d.ts +15 -3
  294. package/dist/integrations/plugins/files.d.ts.map +1 -1
  295. package/dist/integrations/plugins/hook-entries.d.ts +2 -0
  296. package/dist/integrations/plugins/hook-entries.d.ts.map +1 -1
  297. package/dist/integrations/plugins/install-manifest.d.ts +70 -0
  298. package/dist/integrations/plugins/install-manifest.d.ts.map +1 -0
  299. package/dist/integrations/plugins/install-plan.d.ts +119 -0
  300. package/dist/integrations/plugins/install-plan.d.ts.map +1 -0
  301. package/dist/integrations/plugins/install-preview.d.ts +24 -0
  302. package/dist/integrations/plugins/install-preview.d.ts.map +1 -0
  303. package/dist/integrations/plugins/install.d.ts +118 -0
  304. package/dist/integrations/plugins/install.d.ts.map +1 -0
  305. package/dist/integrations/plugins/installed-source.d.ts +80 -0
  306. package/dist/integrations/plugins/installed-source.d.ts.map +1 -0
  307. package/dist/integrations/plugins/inventory.d.ts +2 -1
  308. package/dist/integrations/plugins/inventory.d.ts.map +1 -1
  309. package/dist/integrations/plugins/json-state.d.ts +52 -0
  310. package/dist/integrations/plugins/json-state.d.ts.map +1 -0
  311. package/dist/integrations/plugins/manifest-details.d.ts +23 -0
  312. package/dist/integrations/plugins/manifest-details.d.ts.map +1 -0
  313. package/dist/integrations/plugins/marketplace.d.ts +111 -0
  314. package/dist/integrations/plugins/marketplace.d.ts.map +1 -0
  315. package/dist/integrations/plugins/records.d.ts +127 -0
  316. package/dist/integrations/plugins/records.d.ts.map +1 -0
  317. package/dist/integrations/plugins/remote-marketplace.d.ts +100 -0
  318. package/dist/integrations/plugins/remote-marketplace.d.ts.map +1 -0
  319. package/dist/integrations/plugins/runtime.d.ts +28 -0
  320. package/dist/integrations/plugins/runtime.d.ts.map +1 -1
  321. package/dist/integrations/plugins/surface.d.ts +126 -0
  322. package/dist/integrations/plugins/surface.d.ts.map +1 -0
  323. package/dist/integrations/plugins/update-compare.d.ts +18 -0
  324. package/dist/integrations/plugins/update-compare.d.ts.map +1 -0
  325. package/dist/integrations/plugins/validate.d.ts +50 -1
  326. package/dist/integrations/plugins/validate.d.ts.map +1 -1
  327. package/dist/integrations/subagents/definitions.d.ts +4 -0
  328. package/dist/integrations/subagents/definitions.d.ts.map +1 -1
  329. package/dist/integrations/trust/folder-grants.d.ts +21 -1
  330. package/dist/integrations/trust/folder-grants.d.ts.map +1 -1
  331. package/dist/rounds/types.d.ts +5 -0
  332. package/dist/rounds/types.d.ts.map +1 -1
  333. package/dist/skills/add.d.ts +104 -0
  334. package/dist/skills/add.d.ts.map +1 -0
  335. package/dist/skills/audit.d.ts +7 -1
  336. package/dist/skills/audit.d.ts.map +1 -1
  337. package/dist/skills/create.d.ts +19 -0
  338. package/dist/skills/create.d.ts.map +1 -0
  339. package/dist/skills/desktop-catalog.d.ts +64 -0
  340. package/dist/skills/desktop-catalog.d.ts.map +1 -0
  341. package/dist/skills/install.d.ts +73 -0
  342. package/dist/skills/install.d.ts.map +1 -0
  343. package/dist/skills/remove.d.ts +38 -0
  344. package/dist/skills/remove.d.ts.map +1 -0
  345. package/dist/skills/save.d.ts +2 -27
  346. package/dist/skills/save.d.ts.map +1 -1
  347. package/dist/skills/validate.d.ts +57 -0
  348. package/dist/skills/validate.d.ts.map +1 -0
  349. package/dist/tui/App.d.ts.map +1 -1
  350. package/dist/tui/Composer.d.ts +6 -10
  351. package/dist/tui/Composer.d.ts.map +1 -1
  352. package/dist/tui/PendingInputPanel.d.ts +4 -4
  353. package/dist/tui/PendingInputPanel.d.ts.map +1 -1
  354. package/dist/tui/TrustPrompt.d.ts.map +1 -1
  355. package/dist/tui/agent.d.ts +11 -0
  356. package/dist/tui/agent.d.ts.map +1 -1
  357. package/dist/tui/slashCommands.d.ts.map +1 -1
  358. package/dist/user-commands/store.d.ts +12 -0
  359. package/dist/user-commands/store.d.ts.map +1 -1
  360. package/package.json +3 -3
  361. package/dist/chunks/acp-QLIZHXKX.js.map +0 -6
  362. package/dist/chunks/agent-session-TXDHPZJX.js +0 -92
  363. package/dist/chunks/chunk-4KRQ6EWL.js.map +0 -6
  364. package/dist/chunks/chunk-4YUR4SIL.js +0 -116
  365. package/dist/chunks/chunk-4YUR4SIL.js.map +0 -6
  366. package/dist/chunks/chunk-7MC2ACNB.js.map +0 -6
  367. package/dist/chunks/chunk-D3OHAYMX.js.map +0 -6
  368. package/dist/chunks/chunk-F6YNTG3K.js.map +0 -6
  369. package/dist/chunks/chunk-HT6A5LCI.js.map +0 -6
  370. package/dist/chunks/chunk-IOTYZLY5.js.map +0 -6
  371. package/dist/chunks/chunk-JAPP6DFJ.js.map +0 -6
  372. package/dist/chunks/chunk-LQFUO2RZ.js.map +0 -6
  373. package/dist/chunks/chunk-MN3CC4AF.js.map +0 -6
  374. package/dist/chunks/chunk-QFJ5IWYL.js.map +0 -6
  375. package/dist/chunks/chunk-RHJOIAFS.js +0 -201
  376. package/dist/chunks/chunk-RHJOIAFS.js.map +0 -6
  377. package/dist/chunks/chunk-RYV4P5CO.js.map +0 -6
  378. package/dist/chunks/chunk-ULJAPIOG.js.map +0 -6
  379. package/dist/chunks/chunk-WWMSEDXA.js.map +0 -6
  380. package/dist/chunks/chunk-XS6GGF4E.js.map +0 -6
  381. package/dist/chunks/exec-BR6L3C3T.js.map +0 -6
  382. package/dist/chunks/hooks-6EV4IEHU.js.map +0 -6
  383. package/dist/chunks/host-queries-5ZWYD4VD.js +0 -37
  384. package/dist/chunks/mcp-FBJXQJ6I.js.map +0 -6
  385. package/dist/chunks/message-command-FMT4APFA.js.map +0 -6
  386. package/dist/chunks/plugin-UEPWXCB4.js +0 -1132
  387. package/dist/chunks/plugin-UEPWXCB4.js.map +0 -6
  388. package/dist/chunks/resume-Y7P3TAVG.js +0 -25
  389. package/dist/chunks/send-person-DLJU45IU.js +0 -32
  390. package/dist/chunks/skills-4HM2LPS4.js +0 -350
  391. package/dist/chunks/skills-4HM2LPS4.js.map +0 -6
  392. package/dist/chunks/tui-2JTNW2G7.js.map +0 -6
  393. package/dist/chunks/watch-PXPP5QXP.js.map +0 -6
  394. package/dist/chunks/worktree-DJHBLFHZ.js.map +0 -6
  395. /package/dist/chunks/{activity-command-IVAID3QG.js.map → activity-command-JU4HLIQJ.js.map} +0 -0
  396. /package/dist/chunks/{add-W4VXIXR3.js.map → add-S6JYKDI4.js.map} +0 -0
  397. /package/dist/chunks/{agent-3VVUFK46.js.map → agent-E343AQV7.js.map} +0 -0
  398. /package/dist/chunks/{agent-session-TXDHPZJX.js.map → agent-session-D6JIOCON.js.map} +0 -0
  399. /package/dist/chunks/{apply-at-exit-UW5DQZED.js.map → apply-at-exit-MEOJMGNT.js.map} +0 -0
  400. /package/dist/chunks/{archive-VGG3TNKD.js.map → archive-ZPWC7GZU.js.map} +0 -0
  401. /package/dist/chunks/{auth-XUAD35SY.js.map → auth-6NX4TMIG.js.map} +0 -0
  402. /package/dist/chunks/{bin-main-3A5QPUJN.js.map → bin-main-P3KAQDKC.js.map} +0 -0
  403. /package/dist/chunks/{binding-743KPSRO.js.map → binding-6QZVGFQ5.js.map} +0 -0
  404. /package/dist/chunks/{browser-Y6PS3RBO.js.map → browser-KK2U5524.js.map} +0 -0
  405. /package/dist/chunks/{chat-P3OKHK34.js.map → chat-VEXJRSZN.js.map} +0 -0
  406. /package/dist/chunks/{chunk-AXCSETAX.js.map → chunk-2DCOB33W.js.map} +0 -0
  407. /package/dist/chunks/{chunk-24PN4KZ7.js.map → chunk-2KVQVPJ7.js.map} +0 -0
  408. /package/dist/chunks/{chunk-ITFIXESL.js.map → chunk-42JIZXVL.js.map} +0 -0
  409. /package/dist/chunks/{chunk-44V3FNMT.js.map → chunk-4473VICE.js.map} +0 -0
  410. /package/dist/chunks/{chunk-D5ORLKON.js.map → chunk-44YG6EI4.js.map} +0 -0
  411. /package/dist/chunks/{chunk-OTNW5ZO6.js.map → chunk-452SL2Y4.js.map} +0 -0
  412. /package/dist/chunks/{chunk-SR4DQPOI.js.map → chunk-4BNCVR3U.js.map} +0 -0
  413. /package/dist/chunks/{chunk-IGZGAC75.js.map → chunk-4CJ3HPOT.js.map} +0 -0
  414. /package/dist/chunks/{chunk-TSHMH45O.js.map → chunk-4ENL4VUO.js.map} +0 -0
  415. /package/dist/chunks/{chunk-ONVEH4H7.js.map → chunk-4KVYTHY7.js.map} +0 -0
  416. /package/dist/chunks/{chunk-KBIVQ5RH.js.map → chunk-4Y242BU4.js.map} +0 -0
  417. /package/dist/chunks/{chunk-2P427DDU.js.map → chunk-5F4DSPZC.js.map} +0 -0
  418. /package/dist/chunks/{chunk-QI6XNUH6.js.map → chunk-5IGEQN7L.js.map} +0 -0
  419. /package/dist/chunks/{chunk-5Y455HIT.js.map → chunk-5ZLKTFU2.js.map} +0 -0
  420. /package/dist/chunks/{chunk-SNKDM7FT.js.map → chunk-66QIFMEO.js.map} +0 -0
  421. /package/dist/chunks/{chunk-ATL46ZCR.js.map → chunk-6HYK4DDB.js.map} +0 -0
  422. /package/dist/chunks/{chunk-FISBMAF4.js.map → chunk-6W3UGXGG.js.map} +0 -0
  423. /package/dist/chunks/{chunk-P2PWTXHD.js.map → chunk-75YLZNZW.js.map} +0 -0
  424. /package/dist/chunks/{chunk-37S6BVTN.js.map → chunk-AC5P6W3G.js.map} +0 -0
  425. /package/dist/chunks/{chunk-XNALFKQ2.js.map → chunk-AYMB4AOZ.js.map} +0 -0
  426. /package/dist/chunks/{chunk-ZFEDNTIB.js.map → chunk-B4AOCHH6.js.map} +0 -0
  427. /package/dist/chunks/{chunk-7PD3LHIR.js.map → chunk-BA7KUG6V.js.map} +0 -0
  428. /package/dist/chunks/{chunk-3JCHJOU3.js.map → chunk-BHQHTM3Z.js.map} +0 -0
  429. /package/dist/chunks/{chunk-52T26DYZ.js.map → chunk-BNLIRJ3M.js.map} +0 -0
  430. /package/dist/chunks/{chunk-ZHRBJT5B.js.map → chunk-BURGRQWO.js.map} +0 -0
  431. /package/dist/chunks/{chunk-3P5TQ3VZ.js.map → chunk-BWD2TUI4.js.map} +0 -0
  432. /package/dist/chunks/{chunk-OK3QKISP.js.map → chunk-C7E7YCRD.js.map} +0 -0
  433. /package/dist/chunks/{chunk-YMVJOKBZ.js.map → chunk-CXW7I2S3.js.map} +0 -0
  434. /package/dist/chunks/{chunk-BJWJPQ66.js.map → chunk-D6PB3Z7Q.js.map} +0 -0
  435. /package/dist/chunks/{chunk-FOS5YJED.js.map → chunk-DEAG4G5J.js.map} +0 -0
  436. /package/dist/chunks/{chunk-DHQJRU7E.js.map → chunk-DRSQTKDN.js.map} +0 -0
  437. /package/dist/chunks/{chunk-HNSJJXIO.js.map → chunk-EXJJLYZK.js.map} +0 -0
  438. /package/dist/chunks/{chunk-L7DZ2QPD.js.map → chunk-F5W4TNCR.js.map} +0 -0
  439. /package/dist/chunks/{chunk-XIBT7TAZ.js.map → chunk-F7KOBJVW.js.map} +0 -0
  440. /package/dist/chunks/{chunk-XLWFT4QC.js.map → chunk-FK4MAZV2.js.map} +0 -0
  441. /package/dist/chunks/{chunk-J2AH4QK4.js.map → chunk-FPC3K4TT.js.map} +0 -0
  442. /package/dist/chunks/{chunk-RE5EUO3F.js.map → chunk-FVIKYFYD.js.map} +0 -0
  443. /package/dist/chunks/{chunk-TN7MDKW2.js.map → chunk-GPTYDM26.js.map} +0 -0
  444. /package/dist/chunks/{chunk-3APHAS77.js.map → chunk-GT22EDUB.js.map} +0 -0
  445. /package/dist/chunks/{chunk-PGD2EYI7.js.map → chunk-GTUTBTOV.js.map} +0 -0
  446. /package/dist/chunks/{chunk-ZY7N242I.js.map → chunk-H6NTNPWD.js.map} +0 -0
  447. /package/dist/chunks/{chunk-2X53RSPY.js.map → chunk-HCQGZPVT.js.map} +0 -0
  448. /package/dist/chunks/{chunk-BBBVDHRH.js.map → chunk-HG2PPCAE.js.map} +0 -0
  449. /package/dist/chunks/{chunk-JR66BLKY.js.map → chunk-HKRUNZVI.js.map} +0 -0
  450. /package/dist/chunks/{chunk-BBBFPJV3.js.map → chunk-HM7L5PM2.js.map} +0 -0
  451. /package/dist/chunks/{chunk-2CP6CJXJ.js.map → chunk-I4RC6KQQ.js.map} +0 -0
  452. /package/dist/chunks/{chunk-GRCEOMSP.js.map → chunk-IL4Y3JGT.js.map} +0 -0
  453. /package/dist/chunks/{chunk-VUKFKBOO.js.map → chunk-J4PL65DJ.js.map} +0 -0
  454. /package/dist/chunks/{chunk-TYD5K7MT.js.map → chunk-JECLB23L.js.map} +0 -0
  455. /package/dist/chunks/{chunk-XVML5P53.js.map → chunk-JJ72TLOA.js.map} +0 -0
  456. /package/dist/chunks/{chunk-FQ3DUX7L.js.map → chunk-JRBFL6WT.js.map} +0 -0
  457. /package/dist/chunks/{chunk-UCDXXMAD.js.map → chunk-K2EKXCLZ.js.map} +0 -0
  458. /package/dist/chunks/{chunk-JCK6FM7F.js.map → chunk-ME4LETA3.js.map} +0 -0
  459. /package/dist/chunks/{chunk-2FP2UHZO.js.map → chunk-MF3SFDBW.js.map} +0 -0
  460. /package/dist/chunks/{chunk-HA46XY4I.js.map → chunk-MK42KB72.js.map} +0 -0
  461. /package/dist/chunks/{chunk-EYF7VILP.js.map → chunk-MUSGZEFY.js.map} +0 -0
  462. /package/dist/chunks/{chunk-XAMOWP2G.js.map → chunk-N5CCXOYK.js.map} +0 -0
  463. /package/dist/chunks/{chunk-DFOULHWV.js.map → chunk-NBJ5PRAY.js.map} +0 -0
  464. /package/dist/chunks/{chunk-ZPWWUTSR.js.map → chunk-NKHEBASJ.js.map} +0 -0
  465. /package/dist/chunks/{chunk-R6WB34IP.js.map → chunk-NVWD5XDT.js.map} +0 -0
  466. /package/dist/chunks/{chunk-CQNVNHRL.js.map → chunk-O45DCUNX.js.map} +0 -0
  467. /package/dist/chunks/{chunk-OVJOSPJ5.js.map → chunk-PAUMCJPX.js.map} +0 -0
  468. /package/dist/chunks/{chunk-E5GQTEDW.js.map → chunk-PE4MWWUW.js.map} +0 -0
  469. /package/dist/chunks/{chunk-3533PAJJ.js.map → chunk-PLCWCIL4.js.map} +0 -0
  470. /package/dist/chunks/{chunk-G4XSQIFF.js.map → chunk-PRJO4XM3.js.map} +0 -0
  471. /package/dist/chunks/{chunk-6V6MRHZZ.js.map → chunk-PRRX5LNR.js.map} +0 -0
  472. /package/dist/chunks/{chunk-LONNSCMP.js.map → chunk-PS5SVAUJ.js.map} +0 -0
  473. /package/dist/chunks/{chunk-EN2E63G6.js.map → chunk-PZWSRAE7.js.map} +0 -0
  474. /package/dist/chunks/{chunk-S6LFXBVK.js.map → chunk-QBLHOG2F.js.map} +0 -0
  475. /package/dist/chunks/{chunk-4FMBST2N.js.map → chunk-QCV3HH4P.js.map} +0 -0
  476. /package/dist/chunks/{chunk-R2TBZK62.js.map → chunk-QGBR42TV.js.map} +0 -0
  477. /package/dist/chunks/{chunk-TFOFFJNY.js.map → chunk-QNJXULU7.js.map} +0 -0
  478. /package/dist/chunks/{chunk-PIUHVCR3.js.map → chunk-R2KAESOM.js.map} +0 -0
  479. /package/dist/chunks/{chunk-G52WH6JI.js.map → chunk-R6M6EIAH.js.map} +0 -0
  480. /package/dist/chunks/{chunk-2PEIKBGP.js.map → chunk-RKKU2RE4.js.map} +0 -0
  481. /package/dist/chunks/{chunk-YHFKTEU6.js.map → chunk-RMOTHWPV.js.map} +0 -0
  482. /package/dist/chunks/{chunk-ZX5C2ELY.js.map → chunk-RQAY7REG.js.map} +0 -0
  483. /package/dist/chunks/{chunk-MXLAVYBS.js.map → chunk-SLTJNYOU.js.map} +0 -0
  484. /package/dist/chunks/{chunk-JARQ4I4Q.js.map → chunk-SXONHO4H.js.map} +0 -0
  485. /package/dist/chunks/{chunk-YWBOZNDX.js.map → chunk-T7ILM666.js.map} +0 -0
  486. /package/dist/chunks/{chunk-OOIVZ5PA.js.map → chunk-TBGKPWCL.js.map} +0 -0
  487. /package/dist/chunks/{chunk-M4LHZRTX.js.map → chunk-TBJ6XU3T.js.map} +0 -0
  488. /package/dist/chunks/{chunk-UI3ELYQU.js.map → chunk-TMPP2DEY.js.map} +0 -0
  489. /package/dist/chunks/{chunk-DLMDCCO7.js.map → chunk-TSOZBRM6.js.map} +0 -0
  490. /package/dist/chunks/{chunk-7XLZPKOT.js.map → chunk-TTFPWGIU.js.map} +0 -0
  491. /package/dist/chunks/{chunk-NCPOOJD4.js.map → chunk-TTKMQW6B.js.map} +0 -0
  492. /package/dist/chunks/{chunk-S5GKG5GV.js.map → chunk-UCML5ZXB.js.map} +0 -0
  493. /package/dist/chunks/{chunk-HAIG4TLP.js.map → chunk-VG7245VJ.js.map} +0 -0
  494. /package/dist/chunks/{chunk-IXJ6A2XE.js.map → chunk-VQZPXK4X.js.map} +0 -0
  495. /package/dist/chunks/{chunk-2MEBOBOM.js.map → chunk-VWUTJ4EU.js.map} +0 -0
  496. /package/dist/chunks/{chunk-VJFBRQZ4.js.map → chunk-WDKAL7EW.js.map} +0 -0
  497. /package/dist/chunks/{chunk-2ED34AXP.js.map → chunk-WJ6QRVL6.js.map} +0 -0
  498. /package/dist/chunks/{chunk-CKMF72VE.js.map → chunk-WOTA5FO5.js.map} +0 -0
  499. /package/dist/chunks/{chunk-QUUDXDDL.js.map → chunk-WPGVZMSU.js.map} +0 -0
  500. /package/dist/chunks/{chunk-EVJKQAZM.js.map → chunk-XDUA6PBP.js.map} +0 -0
  501. /package/dist/chunks/{chunk-GVHUHRGI.js.map → chunk-XE6XT6R6.js.map} +0 -0
  502. /package/dist/chunks/{chunk-LGUIDOA7.js.map → chunk-YR3TWNIV.js.map} +0 -0
  503. /package/dist/chunks/{chunk-K4APHATW.js.map → chunk-YWRRS7SO.js.map} +0 -0
  504. /package/dist/chunks/{chunk-ESLOAQRL.js.map → chunk-ZHEEG3NS.js.map} +0 -0
  505. /package/dist/chunks/{cli-runtime-SL6YG4EX.js.map → cli-runtime-ZJKKIW4H.js.map} +0 -0
  506. /package/dist/chunks/{commands-XRQOUFRE.js.map → commands-TQH5DD22.js.map} +0 -0
  507. /package/dist/chunks/{computer-6P3GAOV2.js.map → computer-WOU5WIIR.js.map} +0 -0
  508. /package/dist/chunks/{config-W3ABQG5K.js.map → config-APYUJ5UW.js.map} +0 -0
  509. /package/dist/chunks/{cost-ZKKW4JSZ.js.map → cost-5YV27U7F.js.map} +0 -0
  510. /package/dist/chunks/{crash-report-Q2WAKIU5.js.map → crash-report-QVXU2YVL.js.map} +0 -0
  511. /package/dist/chunks/{dist-JY4FIVBZ.js.map → dist-2FSOLP72.js.map} +0 -0
  512. /package/dist/chunks/{dist-O2QP5QCU.js.map → dist-AOT4CEP5.js.map} +0 -0
  513. /package/dist/chunks/{dist-OXSKWJNB.js.map → dist-H7CAJ3ZW.js.map} +0 -0
  514. /package/dist/chunks/{dist-IPR6EVQM.js.map → dist-IZGKRIWL.js.map} +0 -0
  515. /package/dist/chunks/{dist-WI7EX7ZF.js.map → dist-J4UXFVYR.js.map} +0 -0
  516. /package/dist/chunks/{dist-YE6ADUZP.js.map → dist-JHKRSGW6.js.map} +0 -0
  517. /package/dist/chunks/{dist-R4PUUPXV.js.map → dist-PZYMYR7N.js.map} +0 -0
  518. /package/dist/chunks/{dist-VT4VSQTO.js.map → dist-Z2HW2SJR.js.map} +0 -0
  519. /package/dist/chunks/{doctor-EUH7WGN6.js.map → doctor-CM6UPXG5.js.map} +0 -0
  520. /package/dist/chunks/{drain-3DDY42KQ.js.map → drain-X6RURKKC.js.map} +0 -0
  521. /package/dist/chunks/{entry-FNHGVOQM.js.map → entry-QQDPY6ZL.js.map} +0 -0
  522. /package/dist/chunks/{eval-CFKAWR3B.js.map → eval-GZA22B4I.js.map} +0 -0
  523. /package/dist/chunks/{extension-4VR722KH.js.map → extension-N5IQNKVZ.js.map} +0 -0
  524. /package/dist/chunks/{github-IF3JVVJF.js.map → github-AUOENJUY.js.map} +0 -0
  525. /package/dist/chunks/{home-JCDINY64.js.map → home-I4FIB6FV.js.map} +0 -0
  526. /package/dist/chunks/{homes-53P37RPB.js.map → homes-WTMMXQ6G.js.map} +0 -0
  527. /package/dist/chunks/{hooks-report-OK5PIOSF.js.map → hooks-report-K6VOPVBR.js.map} +0 -0
  528. /package/dist/chunks/{host-KF63UW3T.js.map → host-65UFBZJV.js.map} +0 -0
  529. /package/dist/chunks/{host-queries-5ZWYD4VD.js.map → host-queries-L4PYE2BW.js.map} +0 -0
  530. /package/dist/chunks/{installed-list-QLVA6XBV.js.map → installed-list-7QIWVKLQ.js.map} +0 -0
  531. /package/dist/chunks/{learn-XNVRCNGV.js.map → learn-NZXLKYV4.js.map} +0 -0
  532. /package/dist/chunks/{learn-builtin-XABWBGRU.js.map → learn-builtin-RC4XXVBS.js.map} +0 -0
  533. /package/dist/chunks/{lifecycle-K7REDQBN.js.map → lifecycle-NLCZ6OPA.js.map} +0 -0
  534. /package/dist/chunks/{list-US5UDLON.js.map → list-2U67CAWS.js.map} +0 -0
  535. /package/dist/chunks/{live-DNA4UB2B.js.map → live-CWJ2NWUQ.js.map} +0 -0
  536. /package/dist/chunks/{load-2WCYASMC.js.map → load-H52QQBVE.js.map} +0 -0
  537. /package/dist/chunks/{logs-ZF7YJNOC.js.map → logs-ZIW3QFU4.js.map} +0 -0
  538. /package/dist/chunks/{mcp-serve-TTZ33VMY.js.map → mcp-serve-ZC2OKIPP.js.map} +0 -0
  539. /package/dist/chunks/{open-I4YKGQSW.js.map → open-AHDQMVXI.js.map} +0 -0
  540. /package/dist/chunks/{operator-tools-FC5JFH42.js.map → operator-tools-P5R4TF6N.js.map} +0 -0
  541. /package/dist/chunks/{output-schema-KMYL2UB6.js.map → output-schema-Q5RWHNKE.js.map} +0 -0
  542. /package/dist/chunks/{pal-UZFR42OY.js.map → pal-T42HU4AK.js.map} +0 -0
  543. /package/dist/chunks/{peers-NM5HJGSR.js.map → peers-5RYEA7IA.js.map} +0 -0
  544. /package/dist/chunks/{peers-V7XCJUFZ.js.map → peers-7ZG3DEBO.js.map} +0 -0
  545. /package/dist/chunks/{providers-BQ25F6LA.js.map → providers-BXXIM7EW.js.map} +0 -0
  546. /package/dist/chunks/{providers-VS37WA3E.js.map → providers-I24HYZXG.js.map} +0 -0
  547. /package/dist/chunks/{pty-NWEV3DSP.js.map → pty-WVKM6ATI.js.map} +0 -0
  548. /package/dist/chunks/{resume-Y7P3TAVG.js.map → resume-F7JEDBHI.js.map} +0 -0
  549. /package/dist/chunks/{resume-command-KEXAVL6P.js.map → resume-command-4I47WN7T.js.map} +0 -0
  550. /package/dist/chunks/{running-JLMG6IL4.js.map → running-VID6BVT2.js.map} +0 -0
  551. /package/dist/chunks/{schedule-6ERJJOA3.js.map → schedule-75IZH76Z.js.map} +0 -0
  552. /package/dist/chunks/{send-UXJ7GXKN.js.map → send-QRYY2NCG.js.map} +0 -0
  553. /package/dist/chunks/{send-person-DLJU45IU.js.map → send-person-VADQNJBN.js.map} +0 -0
  554. /package/dist/chunks/{service-NYJZCLH2.js.map → service-B6BNESZB.js.map} +0 -0
  555. /package/dist/chunks/{setting-cli-ILFKSR4D.js.map → setting-cli-O4YWOIU5.js.map} +0 -0
  556. /package/dist/chunks/{start-check-7GBRCGVJ.js.map → start-check-EKRXJ5VE.js.map} +0 -0
  557. /package/dist/chunks/{startup-failure-UA32GGJB.js.map → startup-failure-2UJKPNMR.js.map} +0 -0
  558. /package/dist/chunks/{state-SSRHEX5K.js.map → state-X3MKUFYM.js.map} +0 -0
  559. /package/dist/chunks/{store-2GFZ5XXW.js.map → store-4OXWHFS5.js.map} +0 -0
  560. /package/dist/chunks/{store-MP5EB266.js.map → store-MK5IYBE5.js.map} +0 -0
  561. /package/dist/chunks/{store-ROR7VTZ2.js.map → store-QFNY4BV4.js.map} +0 -0
  562. /package/dist/chunks/{store-WRRTTRBT.js.map → store-VRKKFOYW.js.map} +0 -0
  563. /package/dist/chunks/{update-32IRH5TG.js.map → update-ELZEXYIX.js.map} +0 -0
  564. /package/dist/chunks/{workspaces-4YXZSENL.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