@foxclicom/foxcli 2.1.89

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 (453) hide show
  1. package/README.md +398 -0
  2. package/bun.lock +2090 -0
  3. package/dist/chunk-003e621m.js +247 -0
  4. package/dist/chunk-04he5cyw.js +169 -0
  5. package/dist/chunk-05gpckd1.js +56 -0
  6. package/dist/chunk-06saje2v.js +39 -0
  7. package/dist/chunk-0731m51q.js +8 -0
  8. package/dist/chunk-098tvb6a.js +490 -0
  9. package/dist/chunk-0akzpfxc.js +117 -0
  10. package/dist/chunk-0dvq0q4g.js +780 -0
  11. package/dist/chunk-0e1xsncc.js +969 -0
  12. package/dist/chunk-0jp9x1pk.js +227 -0
  13. package/dist/chunk-0kep06pv.js +94 -0
  14. package/dist/chunk-0paqc2yw.js +15 -0
  15. package/dist/chunk-0vkfrmqm.js +690 -0
  16. package/dist/chunk-0xjaqda8.js +1124 -0
  17. package/dist/chunk-0yhfpays.js +116 -0
  18. package/dist/chunk-1141xmr4.js +8 -0
  19. package/dist/chunk-14cmss9n.js +655 -0
  20. package/dist/chunk-14nvhjrk.js +280 -0
  21. package/dist/chunk-15ah5bdg.js +17 -0
  22. package/dist/chunk-15tdhhv6.js +97 -0
  23. package/dist/chunk-1c5jv610.js +174 -0
  24. package/dist/chunk-1cbn5kxf.js +7 -0
  25. package/dist/chunk-1fvkskfd.js +432 -0
  26. package/dist/chunk-1fz2kv26.js +85 -0
  27. package/dist/chunk-1h2famwb.js +49 -0
  28. package/dist/chunk-1vwfagpe.js +83 -0
  29. package/dist/chunk-1xkekb9y.js +19 -0
  30. package/dist/chunk-1xy3xzsc.js +9300 -0
  31. package/dist/chunk-238g70xa.js +36 -0
  32. package/dist/chunk-24w0h1qk.js +339 -0
  33. package/dist/chunk-24z6z01r.js +40 -0
  34. package/dist/chunk-27xc1csx.js +104 -0
  35. package/dist/chunk-2a42s11t.js +412 -0
  36. package/dist/chunk-2eavn925.js +5011 -0
  37. package/dist/chunk-2eykm0j0.js +20 -0
  38. package/dist/chunk-2gzv8nrw.js +205 -0
  39. package/dist/chunk-2j3ydfmm.js +208 -0
  40. package/dist/chunk-2k995y2x.js +880 -0
  41. package/dist/chunk-2kg4d2c7.js +601 -0
  42. package/dist/chunk-2n877dxb.js +224 -0
  43. package/dist/chunk-2nayx6q1.js +63 -0
  44. package/dist/chunk-2t3vw4tx.js +22820 -0
  45. package/dist/chunk-2tw2ve8h.js +145 -0
  46. package/dist/chunk-2zsew1hs.js +73 -0
  47. package/dist/chunk-30rst83v.js +168 -0
  48. package/dist/chunk-341888tq.js +102 -0
  49. package/dist/chunk-348de018.js +26 -0
  50. package/dist/chunk-363p49h1.js +172719 -0
  51. package/dist/chunk-387ggdb2.js +195 -0
  52. package/dist/chunk-3be7ka25.js +56 -0
  53. package/dist/chunk-3c25bcsw.js +17 -0
  54. package/dist/chunk-3cyyhp8p.js +1151 -0
  55. package/dist/chunk-3gqdqmzb.js +75 -0
  56. package/dist/chunk-3h8a89gy.js +46 -0
  57. package/dist/chunk-3hk8rrwh.js +908 -0
  58. package/dist/chunk-3j33p45s.js +458 -0
  59. package/dist/chunk-3kc4kyk9.js +819 -0
  60. package/dist/chunk-3qv2jg1k.js +250 -0
  61. package/dist/chunk-3r24h7t6.js +113 -0
  62. package/dist/chunk-3sz3q1g8.js +104 -0
  63. package/dist/chunk-3w6s9m5w.js +16 -0
  64. package/dist/chunk-43251qh9.js +176 -0
  65. package/dist/chunk-44fpr6jq.js +434 -0
  66. package/dist/chunk-45kxdsp8.js +444 -0
  67. package/dist/chunk-466d7sxa.js +2057 -0
  68. package/dist/chunk-495d85x1.js +8066 -0
  69. package/dist/chunk-4cptw4qa.js +714 -0
  70. package/dist/chunk-4g3v8y12.js +23 -0
  71. package/dist/chunk-4jm600zv.js +13 -0
  72. package/dist/chunk-4t0ehd2z.js +89 -0
  73. package/dist/chunk-4x38ez67.js +128 -0
  74. package/dist/chunk-4zfkzkt6.js +37 -0
  75. package/dist/chunk-5157ex2s.js +104 -0
  76. package/dist/chunk-55wgxwa9.js +13877 -0
  77. package/dist/chunk-581q6r6y.js +229 -0
  78. package/dist/chunk-5bbsd66z.js +87 -0
  79. package/dist/chunk-5ctt9z6m.js +216 -0
  80. package/dist/chunk-5hfgayhz.js +153 -0
  81. package/dist/chunk-5kmnvh8h.js +112 -0
  82. package/dist/chunk-5tz6v8a5.js +5393 -0
  83. package/dist/chunk-5w5m8kq9.js +87 -0
  84. package/dist/chunk-5ztq67an.js +2333 -0
  85. package/dist/chunk-62gm8b8n.js +1322 -0
  86. package/dist/chunk-685fmb09.js +535 -0
  87. package/dist/chunk-6bd8brc4.js +48 -0
  88. package/dist/chunk-6dj5t602.js +341 -0
  89. package/dist/chunk-6f4sd6xc.js +127 -0
  90. package/dist/chunk-6gr3c3w9.js +378 -0
  91. package/dist/chunk-6n2qgm9v.js +8 -0
  92. package/dist/chunk-6ns6g3t9.js +1012 -0
  93. package/dist/chunk-6swe4a45.js +87 -0
  94. package/dist/chunk-6tq2v3rk.js +186 -0
  95. package/dist/chunk-6yf4a3pf.js +41 -0
  96. package/dist/chunk-7271bnfv.js +220 -0
  97. package/dist/chunk-72awppzy.js +16 -0
  98. package/dist/chunk-73gyam06.js +40 -0
  99. package/dist/chunk-73rpbt04.js +1947 -0
  100. package/dist/chunk-760252na.js +101 -0
  101. package/dist/chunk-7739pg2c.js +4261 -0
  102. package/dist/chunk-77g09znh.js +391 -0
  103. package/dist/chunk-781t965f.js +202 -0
  104. package/dist/chunk-7aw745vx.js +40175 -0
  105. package/dist/chunk-7br3j88y.js +141 -0
  106. package/dist/chunk-7fxy60g9.js +296 -0
  107. package/dist/chunk-7j3f4h1v.js +689 -0
  108. package/dist/chunk-7ke2txc2.js +309 -0
  109. package/dist/chunk-7m2nd8da.js +110 -0
  110. package/dist/chunk-7rpdgyyb.js +161 -0
  111. package/dist/chunk-7wj3b774.js +287 -0
  112. package/dist/chunk-7wm5s02e.js +216 -0
  113. package/dist/chunk-7yd6jttg.js +862 -0
  114. package/dist/chunk-7yfshpbj.js +1548 -0
  115. package/dist/chunk-7ymfj7m3.js +151 -0
  116. package/dist/chunk-7z8j9qfn.js +121 -0
  117. package/dist/chunk-7zccp7mt.js +91 -0
  118. package/dist/chunk-820bdvg4.js +184 -0
  119. package/dist/chunk-83hfzbx3.js +10 -0
  120. package/dist/chunk-88s6sc85.js +87 -0
  121. package/dist/chunk-8bedvdm1.js +32 -0
  122. package/dist/chunk-8gvdbsaq.js +22 -0
  123. package/dist/chunk-8hq5kk3y.js +44 -0
  124. package/dist/chunk-8nca9sgc.js +208 -0
  125. package/dist/chunk-8qeha1fz.js +103 -0
  126. package/dist/chunk-8qjtqhrr.js +165 -0
  127. package/dist/chunk-8tmegdjp.js +113 -0
  128. package/dist/chunk-8tnsngw2.js +31 -0
  129. package/dist/chunk-8twg4emd.js +71 -0
  130. package/dist/chunk-8vcyvvad.js +348 -0
  131. package/dist/chunk-8w3etwh3.js +601 -0
  132. package/dist/chunk-8y12jxg8.js +10 -0
  133. package/dist/chunk-8ymf4e6z.js +48 -0
  134. package/dist/chunk-90wp6wez.js +10510 -0
  135. package/dist/chunk-91awdvpf.js +61 -0
  136. package/dist/chunk-977kqw0c.js +466 -0
  137. package/dist/chunk-9gbamk79.js +93 -0
  138. package/dist/chunk-9s8v3j7m.js +38 -0
  139. package/dist/chunk-9xezt4wd.js +54 -0
  140. package/dist/chunk-9xzebfy5.js +671 -0
  141. package/dist/chunk-a8ejc632.js +3094 -0
  142. package/dist/chunk-a9ra6h3p.js +219 -0
  143. package/dist/chunk-a9vdeb6y.js +258 -0
  144. package/dist/chunk-a9zh40sj.js +48 -0
  145. package/dist/chunk-aaef8dpx.js +100 -0
  146. package/dist/chunk-aapmv7dy.js +44 -0
  147. package/dist/chunk-adgm4w5w.js +212 -0
  148. package/dist/chunk-ag0gc3th.js +88 -0
  149. package/dist/chunk-ah0w9kp8.js +173 -0
  150. package/dist/chunk-b4wg70y1.js +54 -0
  151. package/dist/chunk-b90bgrf7.js +24 -0
  152. package/dist/chunk-be5g3kd0.js +164 -0
  153. package/dist/chunk-bh8acr81.js +500 -0
  154. package/dist/chunk-bjqw6798.js +328 -0
  155. package/dist/chunk-bm1qb16p.js +17 -0
  156. package/dist/chunk-bqfnp99q.js +477 -0
  157. package/dist/chunk-bvx2gazj.js +304 -0
  158. package/dist/chunk-bwq5zxwv.js +306 -0
  159. package/dist/chunk-byf2zkne.js +524 -0
  160. package/dist/chunk-c0edra3v.js +437 -0
  161. package/dist/chunk-c0tfwbd2.js +723 -0
  162. package/dist/chunk-cbd6nwrj.js +111 -0
  163. package/dist/chunk-cc15x0zt.js +154 -0
  164. package/dist/chunk-cd1aese9.js +20 -0
  165. package/dist/chunk-cdz5yb0r.js +57 -0
  166. package/dist/chunk-cf5bj9j5.js +93 -0
  167. package/dist/chunk-cfv996bs.js +22 -0
  168. package/dist/chunk-cgfdkzhb.js +12 -0
  169. package/dist/chunk-cnkgrwpf.js +87 -0
  170. package/dist/chunk-cr6q93s5.js +42 -0
  171. package/dist/chunk-cspg0r9n.js +584 -0
  172. package/dist/chunk-ctw5jwcd.js +213 -0
  173. package/dist/chunk-cvge4pvp.js +122 -0
  174. package/dist/chunk-d18z9pna.js +106 -0
  175. package/dist/chunk-d1cfb0sj.js +98 -0
  176. package/dist/chunk-d1tp6sk7.js +90 -0
  177. package/dist/chunk-d3e1v3sq.js +344 -0
  178. package/dist/chunk-d7j0zted.js +114 -0
  179. package/dist/chunk-d7zmg667.js +192 -0
  180. package/dist/chunk-ddvhht3h.js +695 -0
  181. package/dist/chunk-dfeh5kmx.js +74 -0
  182. package/dist/chunk-dgjkb800.js +120 -0
  183. package/dist/chunk-dgqrcy74.js +48 -0
  184. package/dist/chunk-dmqarh6q.js +463 -0
  185. package/dist/chunk-dnh7jtpb.js +37 -0
  186. package/dist/chunk-dpeq9h27.js +128 -0
  187. package/dist/chunk-drgy3hh3.js +88 -0
  188. package/dist/chunk-dv1wfr85.js +6373 -0
  189. package/dist/chunk-dv2w9vpb.js +66 -0
  190. package/dist/chunk-dwfxgheg.js +270 -0
  191. package/dist/chunk-e3g8q4cn.js +1646 -0
  192. package/dist/chunk-e5pntxye.js +37 -0
  193. package/dist/chunk-e6v9mqg8.js +281 -0
  194. package/dist/chunk-e7393td6.js +42 -0
  195. package/dist/chunk-ef8r68ej.js +120 -0
  196. package/dist/chunk-ehtwnxpg.js +1591 -0
  197. package/dist/chunk-emhask7n.js +373 -0
  198. package/dist/chunk-eq75ekjx.js +97 -0
  199. package/dist/chunk-eqp1rfft.js +17 -0
  200. package/dist/chunk-ewadzrm8.js +103 -0
  201. package/dist/chunk-f2mt6b5j.js +198 -0
  202. package/dist/chunk-f3d9gb71.js +333 -0
  203. package/dist/chunk-f5ma3nh5.js +3436 -0
  204. package/dist/chunk-f8bgh5qc.js +86 -0
  205. package/dist/chunk-fbgxj8g3.js +1585 -0
  206. package/dist/chunk-fbv4apne.js +51 -0
  207. package/dist/chunk-fdj47yp8.js +108 -0
  208. package/dist/chunk-fer10z2s.js +89 -0
  209. package/dist/chunk-ffewbr1v.js +642 -0
  210. package/dist/chunk-fpzax6rw.js +225 -0
  211. package/dist/chunk-fyc5fepv.js +10 -0
  212. package/dist/chunk-g0j0t6qk.js +26 -0
  213. package/dist/chunk-g1kkd3xm.js +130 -0
  214. package/dist/chunk-g2dr9kyp.js +90 -0
  215. package/dist/chunk-g338npwr.js +1061 -0
  216. package/dist/chunk-g3fcqsc1.js +998 -0
  217. package/dist/chunk-g3t0act8.js +8 -0
  218. package/dist/chunk-g4bng3yk.js +140 -0
  219. package/dist/chunk-gax0fcbx.js +182 -0
  220. package/dist/chunk-gegyrhqa.js +277 -0
  221. package/dist/chunk-gejs9q9d.js +542 -0
  222. package/dist/chunk-gqazdwgf.js +40764 -0
  223. package/dist/chunk-gtayyc80.js +28 -0
  224. package/dist/chunk-gyj242zr.js +20 -0
  225. package/dist/chunk-h0qngp9w.js +157 -0
  226. package/dist/chunk-h0rbjg6x.js +55 -0
  227. package/dist/chunk-h4qybe96.js +531 -0
  228. package/dist/chunk-h8vttfbt.js +82 -0
  229. package/dist/chunk-hakdhagh.js +16606 -0
  230. package/dist/chunk-hb22hd9m.js +373 -0
  231. package/dist/chunk-hbjbyb2r.js +120 -0
  232. package/dist/chunk-henh8e8f.js +69 -0
  233. package/dist/chunk-heqbt4wp.js +43 -0
  234. package/dist/chunk-hf5v5wd0.js +2833 -0
  235. package/dist/chunk-hfzj1m07.js +118 -0
  236. package/dist/chunk-hh7cmy4k.js +20 -0
  237. package/dist/chunk-hhwpdnst.js +173 -0
  238. package/dist/chunk-hjhc4cpt.js +69 -0
  239. package/dist/chunk-hk9xz7gk.js +118 -0
  240. package/dist/chunk-hqmz36b3.js +552 -0
  241. package/dist/chunk-hrzerbfw.js +1299 -0
  242. package/dist/chunk-hvha3949.js +229 -0
  243. package/dist/chunk-hw9yapav.js +644 -0
  244. package/dist/chunk-hx2tr4ep.js +7189 -0
  245. package/dist/chunk-hz2e6s2n.js +384 -0
  246. package/dist/chunk-hzhe8ygc.js +547 -0
  247. package/dist/chunk-j2k4p94p.js +55 -0
  248. package/dist/chunk-j3a4p81y.js +184 -0
  249. package/dist/chunk-j5vj6wem.js +241 -0
  250. package/dist/chunk-j64ga6ta.js +8035 -0
  251. package/dist/chunk-j98bzjtw.js +21933 -0
  252. package/dist/chunk-jafes477.js +29 -0
  253. package/dist/chunk-jce5r25x.js +18 -0
  254. package/dist/chunk-jchz3ws1.js +756 -0
  255. package/dist/chunk-jd32zbps.js +15 -0
  256. package/dist/chunk-jdgeec04.js +4249 -0
  257. package/dist/chunk-jhzdk454.js +278 -0
  258. package/dist/chunk-jjxb16v1.js +691 -0
  259. package/dist/chunk-jmc0vfad.js +275 -0
  260. package/dist/chunk-jnhkref0.js +30 -0
  261. package/dist/chunk-jp85zv57.js +3198 -0
  262. package/dist/chunk-jx817w05.js +11 -0
  263. package/dist/chunk-jxgm95zx.js +802 -0
  264. package/dist/chunk-jzmz18nn.js +65 -0
  265. package/dist/chunk-k0p9w03v.js +4957 -0
  266. package/dist/chunk-kjv7vnsy.js +81 -0
  267. package/dist/chunk-kkt7vkyc.js +273 -0
  268. package/dist/chunk-ks57hmrt.js +98 -0
  269. package/dist/chunk-ksq785ca.js +109 -0
  270. package/dist/chunk-kwekc97v.js +18 -0
  271. package/dist/chunk-m06q12hg.js +61 -0
  272. package/dist/chunk-m1g8ywfk.js +84 -0
  273. package/dist/chunk-m42g016x.js +70 -0
  274. package/dist/chunk-m6m4jdbj.js +1918 -0
  275. package/dist/chunk-ma0h0h17.js +471 -0
  276. package/dist/chunk-mak6ckds.js +102 -0
  277. package/dist/chunk-mceesnzr.js +438 -0
  278. package/dist/chunk-mhs6c4fp.js +765 -0
  279. package/dist/chunk-mm7rd0jd.js +1578 -0
  280. package/dist/chunk-mt25echc.js +6157 -0
  281. package/dist/chunk-mv8hngk2.js +86 -0
  282. package/dist/chunk-mxn9djv2.js +152 -0
  283. package/dist/chunk-n0qaeaa5.js +256 -0
  284. package/dist/chunk-n7ttdtk0.js +641 -0
  285. package/dist/chunk-n83rnk8h.js +62 -0
  286. package/dist/chunk-n89dwhkm.js +69 -0
  287. package/dist/chunk-nj29pqp3.js +155 -0
  288. package/dist/chunk-njchshm5.js +99 -0
  289. package/dist/chunk-nka1g8f4.js +773 -0
  290. package/dist/chunk-npj6g78n.js +8956 -0
  291. package/dist/chunk-nq0fxyxh.js +752 -0
  292. package/dist/chunk-nrdckp85.js +809 -0
  293. package/dist/chunk-nswqqqdd.js +26840 -0
  294. package/dist/chunk-nt837qt9.js +21 -0
  295. package/dist/chunk-ntfnwa7w.js +328 -0
  296. package/dist/chunk-nxsh6de2.js +1711 -0
  297. package/dist/chunk-ny641a2t.js +96 -0
  298. package/dist/chunk-nymbd7tw.js +825 -0
  299. package/dist/chunk-nz9wqm63.js +262 -0
  300. package/dist/chunk-p2816w9z.js +1486 -0
  301. package/dist/chunk-p2d5nh3g.js +342 -0
  302. package/dist/chunk-p3c8dz92.js +3442 -0
  303. package/dist/chunk-p3m2gn04.js +1551 -0
  304. package/dist/chunk-p7g7pf3f.js +336 -0
  305. package/dist/chunk-p82dmx79.js +519 -0
  306. package/dist/chunk-p8t1v3qw.js +713 -0
  307. package/dist/chunk-pg6ke51s.js +60 -0
  308. package/dist/chunk-phc72ftz.js +61 -0
  309. package/dist/chunk-pm51hqt3.js +1863 -0
  310. package/dist/chunk-pngv409n.js +253 -0
  311. package/dist/chunk-pp83rz76.js +27 -0
  312. package/dist/chunk-pqcemkwx.js +640 -0
  313. package/dist/chunk-pqqf5gss.js +4521 -0
  314. package/dist/chunk-pqw1y4f8.js +524 -0
  315. package/dist/chunk-ps49ymvj.js +43 -0
  316. package/dist/chunk-pwwa7s62.js +11 -0
  317. package/dist/chunk-pxjqgrdk.js +59 -0
  318. package/dist/chunk-q1jvyh4z.js +41 -0
  319. package/dist/chunk-q25bjaev.js +15 -0
  320. package/dist/chunk-q6av622g.js +38 -0
  321. package/dist/chunk-qmvk0wr6.js +787 -0
  322. package/dist/chunk-qnfx3qtx.js +617 -0
  323. package/dist/chunk-qp2qdcda.js +100 -0
  324. package/dist/chunk-qpg0bm1g.js +441 -0
  325. package/dist/chunk-qqfa0dqg.js +2343 -0
  326. package/dist/chunk-qtvek1gy.js +466 -0
  327. package/dist/chunk-qz2x630m.js +49145 -0
  328. package/dist/chunk-r4vk0x64.js +674 -0
  329. package/dist/chunk-r4z1107v.js +88 -0
  330. package/dist/chunk-r66hz8j6.js +34 -0
  331. package/dist/chunk-r6b58y3x.js +17 -0
  332. package/dist/chunk-rhftek9r.js +156 -0
  333. package/dist/chunk-rn0v1hk8.js +34 -0
  334. package/dist/chunk-rq2ry4xa.js +648 -0
  335. package/dist/chunk-rqwnwe7k.js +87 -0
  336. package/dist/chunk-rs45skes.js +123 -0
  337. package/dist/chunk-rvqtbt9h.js +726 -0
  338. package/dist/chunk-rzq6ct1h.js +1095 -0
  339. package/dist/chunk-s3pzvdss.js +50 -0
  340. package/dist/chunk-s5cexe2j.js +10476 -0
  341. package/dist/chunk-s79s6rms.js +40 -0
  342. package/dist/chunk-sd36yzx8.js +954 -0
  343. package/dist/chunk-sdj9b9wh.js +782 -0
  344. package/dist/chunk-seaswa9a.js +745 -0
  345. package/dist/chunk-sgy4bnyd.js +496 -0
  346. package/dist/chunk-sjqtqj35.js +28 -0
  347. package/dist/chunk-sk5gyvdj.js +127 -0
  348. package/dist/chunk-skctedsv.js +15679 -0
  349. package/dist/chunk-spqaamnc.js +63 -0
  350. package/dist/chunk-szj5wvdy.js +28 -0
  351. package/dist/chunk-t0rgmccj.js +39 -0
  352. package/dist/chunk-t0zcygwt.js +63 -0
  353. package/dist/chunk-t1pqzjdb.js +400 -0
  354. package/dist/chunk-t20kqvm0.js +1493 -0
  355. package/dist/chunk-t60mq3jn.js +421 -0
  356. package/dist/chunk-t9ak7d0c.js +86 -0
  357. package/dist/chunk-tantc5sm.js +97 -0
  358. package/dist/chunk-tgvzn3q1.js +98 -0
  359. package/dist/chunk-tjaqa99q.js +125 -0
  360. package/dist/chunk-tka1kh41.js +32 -0
  361. package/dist/chunk-tm70zjhw.js +95 -0
  362. package/dist/chunk-ts2p6bv1.js +224 -0
  363. package/dist/chunk-ttk5dzz8.js +25 -0
  364. package/dist/chunk-ty0xmdf9.js +142 -0
  365. package/dist/chunk-v0j5s5w9.js +113 -0
  366. package/dist/chunk-v1kzp02e.js +785 -0
  367. package/dist/chunk-v1mgv1et.js +15 -0
  368. package/dist/chunk-v1vqpm16.js +151 -0
  369. package/dist/chunk-v2drem4p.js +3035 -0
  370. package/dist/chunk-v399mzxk.js +58 -0
  371. package/dist/chunk-v78fj8by.js +145 -0
  372. package/dist/chunk-v7yayd0e.js +102 -0
  373. package/dist/chunk-v9smspw2.js +4301 -0
  374. package/dist/chunk-vdxvgw28.js +5802 -0
  375. package/dist/chunk-vech0vdw.js +258 -0
  376. package/dist/chunk-vest0y6x.js +3830 -0
  377. package/dist/chunk-vf5sd1nq.js +12 -0
  378. package/dist/chunk-vfwbg2m3.js +3351 -0
  379. package/dist/chunk-vhpesgs8.js +193 -0
  380. package/dist/chunk-vjbr8wqg.js +849 -0
  381. package/dist/chunk-vratq94g.js +349 -0
  382. package/dist/chunk-vtchbjt5.js +284 -0
  383. package/dist/chunk-vw60ew4s.js +338 -0
  384. package/dist/chunk-vyc0rjyx.js +31 -0
  385. package/dist/chunk-vyjeh50y.js +2149 -0
  386. package/dist/chunk-w2z5pqd3.js +336 -0
  387. package/dist/chunk-w34c4pn6.js +417 -0
  388. package/dist/chunk-w7wgpqcp.js +157 -0
  389. package/dist/chunk-w9k8zntt.js +1391 -0
  390. package/dist/chunk-wb4p3ft4.js +130 -0
  391. package/dist/chunk-wejsw2n0.js +104 -0
  392. package/dist/chunk-wfz0qffj.js +3939 -0
  393. package/dist/chunk-wj4wyfpy.js +716 -0
  394. package/dist/chunk-ws1jdhta.js +315 -0
  395. package/dist/chunk-wsgyhhg2.js +91 -0
  396. package/dist/chunk-wspkwgra.js +1315 -0
  397. package/dist/chunk-wty0nm0a.js +749 -0
  398. package/dist/chunk-wzfbxdwn.js +71 -0
  399. package/dist/chunk-wzpdet3m.js +843 -0
  400. package/dist/chunk-x14dq3v1.js +722 -0
  401. package/dist/chunk-x7ynqhrv.js +266 -0
  402. package/dist/chunk-x8b7vft8.js +132 -0
  403. package/dist/chunk-xfft987g.js +47 -0
  404. package/dist/chunk-xjz3de9f.js +654 -0
  405. package/dist/chunk-xms0cc06.js +84 -0
  406. package/dist/chunk-xn20ta17.js +107 -0
  407. package/dist/chunk-xsq9ae7x.js +90 -0
  408. package/dist/chunk-xszk7n10.js +14358 -0
  409. package/dist/chunk-xvqpc205.js +159 -0
  410. package/dist/chunk-xx3qkvyg.js +606 -0
  411. package/dist/chunk-y1784krc.js +19 -0
  412. package/dist/chunk-y47cg3kz.js +42 -0
  413. package/dist/chunk-y5mfcqyc.js +254 -0
  414. package/dist/chunk-yhnzwtby.js +4389 -0
  415. package/dist/chunk-yj6dn49f.js +476 -0
  416. package/dist/chunk-yjkfkzxy.js +266 -0
  417. package/dist/chunk-yq0a6dk8.js +265 -0
  418. package/dist/chunk-yqs6zhes.js +6105 -0
  419. package/dist/chunk-ytx08xk9.js +87 -0
  420. package/dist/chunk-ywxd4qw4.js +22 -0
  421. package/dist/chunk-yxnffetf.js +6956 -0
  422. package/dist/chunk-z2dp53wn.js +17 -0
  423. package/dist/chunk-z3hcj5gd.js +372 -0
  424. package/dist/chunk-z3j9hdd8.js +32 -0
  425. package/dist/chunk-z57a5q6t.js +2641 -0
  426. package/dist/chunk-z5bg3c3b.js +54 -0
  427. package/dist/chunk-z74kky8g.js +160 -0
  428. package/dist/chunk-z9w0ffmw.js +99 -0
  429. package/dist/chunk-zhk3aav8.js +79 -0
  430. package/dist/chunk-zk2wsm7d.js +15 -0
  431. package/dist/chunk-zp0509kx.js +563 -0
  432. package/dist/chunk-zsfxha74.js +17655 -0
  433. package/dist/chunk-zw77xgjd.js +38 -0
  434. package/dist/chunk-zwps6dt3.js +83 -0
  435. package/dist/chunk-zx4s70cq.js +298 -0
  436. package/dist/chunk-zxse7h5w.js +71 -0
  437. package/dist/chunk-zz21rvr7.js +27 -0
  438. package/dist/cli.js +81 -0
  439. package/package.json +182 -0
  440. package/sdk-tools.d.ts +2719 -0
  441. package/vendor/audio-capture/arm64-darwin/audio-capture.node +0 -0
  442. package/vendor/audio-capture/arm64-linux/audio-capture.node +0 -0
  443. package/vendor/audio-capture/arm64-win32/audio-capture.node +0 -0
  444. package/vendor/audio-capture/x64-darwin/audio-capture.node +0 -0
  445. package/vendor/audio-capture/x64-linux/audio-capture.node +0 -0
  446. package/vendor/audio-capture/x64-win32/audio-capture.node +0 -0
  447. package/vendor/ripgrep/COPYING +3 -0
  448. package/vendor/ripgrep/arm64-darwin/rg +0 -0
  449. package/vendor/ripgrep/arm64-linux/rg +0 -0
  450. package/vendor/ripgrep/arm64-win32/rg.exe +0 -0
  451. package/vendor/ripgrep/x64-darwin/rg +0 -0
  452. package/vendor/ripgrep/x64-linux/rg +0 -0
  453. package/vendor/ripgrep/x64-win32/rg.exe +0 -0
@@ -0,0 +1,1918 @@
1
+ // @bun
2
+ import {
3
+ Select,
4
+ getAllHooks,
5
+ getHookDisplayText,
6
+ getTools,
7
+ hookSourceDescriptionDisplayString,
8
+ hookSourceHeaderDisplayString,
9
+ hookSourceInlineDisplayString,
10
+ init_AppState,
11
+ init_hooksSettings,
12
+ init_select,
13
+ init_tools1 as init_tools,
14
+ init_useSettingsChange,
15
+ sortMatchersByPriority,
16
+ useAppState,
17
+ useAppStateStore,
18
+ useSettingsChange
19
+ } from "./chunk-363p49h1.js";
20
+ import"./chunk-14cmss9n.js";
21
+ import"./chunk-t0rgmccj.js";
22
+ import"./chunk-2n877dxb.js";
23
+ import"./chunk-cc15x0zt.js";
24
+ import"./chunk-7ke2txc2.js";
25
+ import"./chunk-t0zcygwt.js";
26
+ import {
27
+ Dialog,
28
+ init_Dialog
29
+ } from "./chunk-dmqarh6q.js";
30
+ import"./chunk-ehtwnxpg.js";
31
+ import"./chunk-3be7ka25.js";
32
+ import"./chunk-nymbd7tw.js";
33
+ import"./chunk-2gzv8nrw.js";
34
+ import"./chunk-45kxdsp8.js";
35
+ import"./chunk-cgfdkzhb.js";
36
+ import"./chunk-5ctt9z6m.js";
37
+ import"./chunk-z9w0ffmw.js";
38
+ import"./chunk-9gbamk79.js";
39
+ import"./chunk-4cptw4qa.js";
40
+ import"./chunk-hfzj1m07.js";
41
+ import {
42
+ init_useKeybinding,
43
+ useKeybinding
44
+ } from "./chunk-jxgm95zx.js";
45
+ import {
46
+ Link,
47
+ ThemedBox_default,
48
+ ThemedText,
49
+ init_ink,
50
+ require_compiler_runtime
51
+ } from "./chunk-nswqqqdd.js";
52
+ import"./chunk-7m2nd8da.js";
53
+ import"./chunk-ps49ymvj.js";
54
+ import {
55
+ require_jsx_dev_runtime,
56
+ require_react
57
+ } from "./chunk-g338npwr.js";
58
+ import"./chunk-pxjqgrdk.js";
59
+ import"./chunk-zk2wsm7d.js";
60
+ import"./chunk-7wj3b774.js";
61
+ import"./chunk-m06q12hg.js";
62
+ import"./chunk-w9k8zntt.js";
63
+ import {
64
+ getSettingsForSource,
65
+ getSettings_DEPRECATED,
66
+ init_settings1 as init_settings,
67
+ init_stringUtils,
68
+ plural
69
+ } from "./chunk-skctedsv.js";
70
+ import"./chunk-e3g8q4cn.js";
71
+ import"./chunk-ctw5jwcd.js";
72
+ import"./chunk-vratq94g.js";
73
+ import"./chunk-rvqtbt9h.js";
74
+ import"./chunk-0e1xsncc.js";
75
+ import"./chunk-g0j0t6qk.js";
76
+ import"./chunk-3c25bcsw.js";
77
+ import"./chunk-tjaqa99q.js";
78
+ import"./chunk-55wgxwa9.js";
79
+ import"./chunk-spqaamnc.js";
80
+ import"./chunk-4jm600zv.js";
81
+ import"./chunk-w2z5pqd3.js";
82
+ import"./chunk-7ymfj7m3.js";
83
+ import"./chunk-f5ma3nh5.js";
84
+ import"./chunk-qz2x630m.js";
85
+ import"./chunk-cvge4pvp.js";
86
+ import"./chunk-p2816w9z.js";
87
+ import"./chunk-v9smspw2.js";
88
+ import"./chunk-v1kzp02e.js";
89
+ import"./chunk-0vkfrmqm.js";
90
+ import"./chunk-0xjaqda8.js";
91
+ import"./chunk-x14dq3v1.js";
92
+ import"./chunk-cdz5yb0r.js";
93
+ import {
94
+ init_analytics,
95
+ logEvent
96
+ } from "./chunk-h0rbjg6x.js";
97
+ import"./chunk-7z8j9qfn.js";
98
+ import"./chunk-hrzerbfw.js";
99
+ import"./chunk-d18z9pna.js";
100
+ import"./chunk-qnfx3qtx.js";
101
+ import"./chunk-hjhc4cpt.js";
102
+ import"./chunk-vyc0rjyx.js";
103
+ import {
104
+ figures_default,
105
+ init_figures
106
+ } from "./chunk-hx2tr4ep.js";
107
+ import"./chunk-p7g7pf3f.js";
108
+ import"./chunk-8tnsngw2.js";
109
+ import"./chunk-8bedvdm1.js";
110
+ import"./chunk-7wm5s02e.js";
111
+ import"./chunk-nxsh6de2.js";
112
+ import"./chunk-fbv4apne.js";
113
+ import"./chunk-3r24h7t6.js";
114
+ import {
115
+ getRegisteredHooks,
116
+ init_state
117
+ } from "./chunk-qqfa0dqg.js";
118
+ import {
119
+ init_memoize,
120
+ memoize_default
121
+ } from "./chunk-hqmz36b3.js";
122
+ import"./chunk-4g3v8y12.js";
123
+ import"./chunk-7739pg2c.js";
124
+ import"./chunk-xszk7n10.js";
125
+ import"./chunk-sdj9b9wh.js";
126
+ import {
127
+ __esm,
128
+ __toESM
129
+ } from "./chunk-qp2qdcda.js";
130
+
131
+ // src/utils/hooks/hooksConfigManager.ts
132
+ function groupHooksByEventAndMatcher(appState, toolNames) {
133
+ const grouped = {
134
+ PreToolUse: {},
135
+ PostToolUse: {},
136
+ PostToolUseFailure: {},
137
+ PermissionDenied: {},
138
+ Notification: {},
139
+ UserPromptSubmit: {},
140
+ SessionStart: {},
141
+ SessionEnd: {},
142
+ Stop: {},
143
+ StopFailure: {},
144
+ SubagentStart: {},
145
+ SubagentStop: {},
146
+ PreCompact: {},
147
+ PostCompact: {},
148
+ PermissionRequest: {},
149
+ Setup: {},
150
+ TeammateIdle: {},
151
+ TaskCreated: {},
152
+ TaskCompleted: {},
153
+ Elicitation: {},
154
+ ElicitationResult: {},
155
+ ConfigChange: {},
156
+ WorktreeCreate: {},
157
+ WorktreeRemove: {},
158
+ InstructionsLoaded: {},
159
+ CwdChanged: {},
160
+ FileChanged: {}
161
+ };
162
+ const metadata = getHookEventMetadata(toolNames);
163
+ getAllHooks(appState).forEach((hook) => {
164
+ const eventGroup = grouped[hook.event];
165
+ if (eventGroup) {
166
+ const matcherKey = metadata[hook.event].matcherMetadata !== undefined ? hook.matcher || "" : "";
167
+ if (!eventGroup[matcherKey]) {
168
+ eventGroup[matcherKey] = [];
169
+ }
170
+ eventGroup[matcherKey].push(hook);
171
+ }
172
+ });
173
+ const registeredHooks = getRegisteredHooks();
174
+ if (registeredHooks) {
175
+ for (const [event, matchers] of Object.entries(registeredHooks)) {
176
+ const hookEvent = event;
177
+ const eventGroup = grouped[hookEvent];
178
+ if (!eventGroup)
179
+ continue;
180
+ for (const matcher of matchers) {
181
+ const matcherKey = matcher.matcher || "";
182
+ if ("pluginRoot" in matcher) {
183
+ eventGroup[matcherKey] ??= [];
184
+ for (const hook of matcher.hooks) {
185
+ eventGroup[matcherKey].push({
186
+ event: hookEvent,
187
+ config: hook,
188
+ matcher: matcher.matcher,
189
+ source: "pluginHook",
190
+ pluginName: matcher.pluginId
191
+ });
192
+ }
193
+ } else if (process.env.USER_TYPE === "ant") {
194
+ eventGroup[matcherKey] ??= [];
195
+ for (const _hook of matcher.hooks) {
196
+ eventGroup[matcherKey].push({
197
+ event: hookEvent,
198
+ config: {
199
+ type: "command",
200
+ command: "[ANT-ONLY] Built-in Hook"
201
+ },
202
+ matcher: matcher.matcher,
203
+ source: "builtinHook"
204
+ });
205
+ }
206
+ }
207
+ }
208
+ }
209
+ }
210
+ return grouped;
211
+ }
212
+ function getSortedMatchersForEvent(hooksByEventAndMatcher, event) {
213
+ const matchers = Object.keys(hooksByEventAndMatcher[event] || {});
214
+ return sortMatchersByPriority(matchers, hooksByEventAndMatcher, event);
215
+ }
216
+ function getHooksForMatcher(hooksByEventAndMatcher, event, matcher) {
217
+ const matcherKey = matcher ?? "";
218
+ return hooksByEventAndMatcher[event]?.[matcherKey] ?? [];
219
+ }
220
+ function getMatcherMetadata(event, toolNames) {
221
+ return getHookEventMetadata(toolNames)[event].matcherMetadata;
222
+ }
223
+ var getHookEventMetadata;
224
+ var init_hooksConfigManager = __esm(() => {
225
+ init_memoize();
226
+ init_state();
227
+ init_hooksSettings();
228
+ getHookEventMetadata = memoize_default(function(toolNames) {
229
+ return {
230
+ PreToolUse: {
231
+ summary: "Before tool execution",
232
+ description: `Input to command is JSON of tool call arguments.
233
+ Exit code 0 - stdout/stderr not shown
234
+ Exit code 2 - show stderr to model and block tool call
235
+ Other exit codes - show stderr to user only but continue with tool call`,
236
+ matcherMetadata: {
237
+ fieldToMatch: "tool_name",
238
+ values: toolNames
239
+ }
240
+ },
241
+ PostToolUse: {
242
+ summary: "After tool execution",
243
+ description: `Input to command is JSON with fields "inputs" (tool call arguments) and "response" (tool call response).
244
+ Exit code 0 - stdout shown in transcript mode (ctrl+o)
245
+ Exit code 2 - show stderr to model immediately
246
+ Other exit codes - show stderr to user only`,
247
+ matcherMetadata: {
248
+ fieldToMatch: "tool_name",
249
+ values: toolNames
250
+ }
251
+ },
252
+ PostToolUseFailure: {
253
+ summary: "After tool execution fails",
254
+ description: `Input to command is JSON with tool_name, tool_input, tool_use_id, error, error_type, is_interrupt, and is_timeout.
255
+ Exit code 0 - stdout shown in transcript mode (ctrl+o)
256
+ Exit code 2 - show stderr to model immediately
257
+ Other exit codes - show stderr to user only`,
258
+ matcherMetadata: {
259
+ fieldToMatch: "tool_name",
260
+ values: toolNames
261
+ }
262
+ },
263
+ PermissionDenied: {
264
+ summary: "After auto mode classifier denies a tool call",
265
+ description: `Input to command is JSON with tool_name, tool_input, tool_use_id, and reason.
266
+ Return {"hookSpecificOutput":{"hookEventName":"PermissionDenied","retry":true}} to tell the model it may retry.
267
+ Exit code 0 - stdout shown in transcript mode (ctrl+o)
268
+ Other exit codes - show stderr to user only`,
269
+ matcherMetadata: {
270
+ fieldToMatch: "tool_name",
271
+ values: toolNames
272
+ }
273
+ },
274
+ Notification: {
275
+ summary: "When notifications are sent",
276
+ description: `Input to command is JSON with notification message and type.
277
+ Exit code 0 - stdout/stderr not shown
278
+ Other exit codes - show stderr to user only`,
279
+ matcherMetadata: {
280
+ fieldToMatch: "notification_type",
281
+ values: [
282
+ "permission_prompt",
283
+ "idle_prompt",
284
+ "auth_success",
285
+ "elicitation_dialog",
286
+ "elicitation_complete",
287
+ "elicitation_response"
288
+ ]
289
+ }
290
+ },
291
+ UserPromptSubmit: {
292
+ summary: "When the user submits a prompt",
293
+ description: `Input to command is JSON with original user prompt text.
294
+ Exit code 0 - stdout shown to Claude
295
+ Exit code 2 - block processing, erase original prompt, and show stderr to user only
296
+ Other exit codes - show stderr to user only`
297
+ },
298
+ SessionStart: {
299
+ summary: "When a new session is started",
300
+ description: `Input to command is JSON with session start source.
301
+ Exit code 0 - stdout shown to Claude
302
+ Blocking errors are ignored
303
+ Other exit codes - show stderr to user only`,
304
+ matcherMetadata: {
305
+ fieldToMatch: "source",
306
+ values: ["startup", "resume", "clear", "compact"]
307
+ }
308
+ },
309
+ Stop: {
310
+ summary: "Right before Claude concludes its response",
311
+ description: `Exit code 0 - stdout/stderr not shown
312
+ Exit code 2 - show stderr to model and continue conversation
313
+ Other exit codes - show stderr to user only`
314
+ },
315
+ StopFailure: {
316
+ summary: "When the turn ends due to an API error",
317
+ description: "Fires instead of Stop when an API error (rate limit, auth failure, etc.) ended the turn. Fire-and-forget \u2014 hook output and exit codes are ignored.",
318
+ matcherMetadata: {
319
+ fieldToMatch: "error",
320
+ values: [
321
+ "rate_limit",
322
+ "authentication_failed",
323
+ "billing_error",
324
+ "invalid_request",
325
+ "server_error",
326
+ "max_output_tokens",
327
+ "unknown"
328
+ ]
329
+ }
330
+ },
331
+ SubagentStart: {
332
+ summary: "When a subagent (Agent tool call) is started",
333
+ description: `Input to command is JSON with agent_id and agent_type.
334
+ Exit code 0 - stdout shown to subagent
335
+ Blocking errors are ignored
336
+ Other exit codes - show stderr to user only`,
337
+ matcherMetadata: {
338
+ fieldToMatch: "agent_type",
339
+ values: []
340
+ }
341
+ },
342
+ SubagentStop: {
343
+ summary: "Right before a subagent (Agent tool call) concludes its response",
344
+ description: `Input to command is JSON with agent_id, agent_type, and agent_transcript_path.
345
+ Exit code 0 - stdout/stderr not shown
346
+ Exit code 2 - show stderr to subagent and continue having it run
347
+ Other exit codes - show stderr to user only`,
348
+ matcherMetadata: {
349
+ fieldToMatch: "agent_type",
350
+ values: []
351
+ }
352
+ },
353
+ PreCompact: {
354
+ summary: "Before conversation compaction",
355
+ description: `Input to command is JSON with compaction details.
356
+ Exit code 0 - stdout appended as custom compact instructions
357
+ Exit code 2 - block compaction
358
+ Other exit codes - show stderr to user only but continue with compaction`,
359
+ matcherMetadata: {
360
+ fieldToMatch: "trigger",
361
+ values: ["manual", "auto"]
362
+ }
363
+ },
364
+ PostCompact: {
365
+ summary: "After conversation compaction",
366
+ description: `Input to command is JSON with compaction details and the summary.
367
+ Exit code 0 - stdout shown to user
368
+ Other exit codes - show stderr to user only`,
369
+ matcherMetadata: {
370
+ fieldToMatch: "trigger",
371
+ values: ["manual", "auto"]
372
+ }
373
+ },
374
+ SessionEnd: {
375
+ summary: "When a session is ending",
376
+ description: `Input to command is JSON with session end reason.
377
+ Exit code 0 - command completes successfully
378
+ Other exit codes - show stderr to user only`,
379
+ matcherMetadata: {
380
+ fieldToMatch: "reason",
381
+ values: ["clear", "logout", "prompt_input_exit", "other"]
382
+ }
383
+ },
384
+ PermissionRequest: {
385
+ summary: "When a permission dialog is displayed",
386
+ description: `Input to command is JSON with tool_name, tool_input, and tool_use_id.
387
+ Output JSON with hookSpecificOutput containing decision to allow or deny.
388
+ Exit code 0 - use hook decision if provided
389
+ Other exit codes - show stderr to user only`,
390
+ matcherMetadata: {
391
+ fieldToMatch: "tool_name",
392
+ values: toolNames
393
+ }
394
+ },
395
+ Setup: {
396
+ summary: "Repo setup hooks for init and maintenance",
397
+ description: `Input to command is JSON with trigger (init or maintenance).
398
+ Exit code 0 - stdout shown to Claude
399
+ Blocking errors are ignored
400
+ Other exit codes - show stderr to user only`,
401
+ matcherMetadata: {
402
+ fieldToMatch: "trigger",
403
+ values: ["init", "maintenance"]
404
+ }
405
+ },
406
+ TeammateIdle: {
407
+ summary: "When a teammate is about to go idle",
408
+ description: `Input to command is JSON with teammate_name and team_name.
409
+ Exit code 0 - stdout/stderr not shown
410
+ Exit code 2 - show stderr to teammate and prevent idle (teammate continues working)
411
+ Other exit codes - show stderr to user only`
412
+ },
413
+ TaskCreated: {
414
+ summary: "When a task is being created",
415
+ description: `Input to command is JSON with task_id, task_subject, task_description, teammate_name, and team_name.
416
+ Exit code 0 - stdout/stderr not shown
417
+ Exit code 2 - show stderr to model and prevent task creation
418
+ Other exit codes - show stderr to user only`
419
+ },
420
+ TaskCompleted: {
421
+ summary: "When a task is being marked as completed",
422
+ description: `Input to command is JSON with task_id, task_subject, task_description, teammate_name, and team_name.
423
+ Exit code 0 - stdout/stderr not shown
424
+ Exit code 2 - show stderr to model and prevent task completion
425
+ Other exit codes - show stderr to user only`
426
+ },
427
+ Elicitation: {
428
+ summary: "When an MCP server requests user input (elicitation)",
429
+ description: `Input to command is JSON with mcp_server_name, message, and requested_schema.
430
+ Output JSON with hookSpecificOutput containing action (accept/decline/cancel) and optional content.
431
+ Exit code 0 - use hook response if provided
432
+ Exit code 2 - deny the elicitation
433
+ Other exit codes - show stderr to user only`,
434
+ matcherMetadata: {
435
+ fieldToMatch: "mcp_server_name",
436
+ values: []
437
+ }
438
+ },
439
+ ElicitationResult: {
440
+ summary: "After a user responds to an MCP elicitation",
441
+ description: `Input to command is JSON with mcp_server_name, action, content, mode, and elicitation_id.
442
+ Output JSON with hookSpecificOutput containing optional action and content to override the response.
443
+ Exit code 0 - use hook response if provided
444
+ Exit code 2 - block the response (action becomes decline)
445
+ Other exit codes - show stderr to user only`,
446
+ matcherMetadata: {
447
+ fieldToMatch: "mcp_server_name",
448
+ values: []
449
+ }
450
+ },
451
+ ConfigChange: {
452
+ summary: "When configuration files change during a session",
453
+ description: `Input to command is JSON with source (user_settings, project_settings, local_settings, policy_settings, skills) and file_path.
454
+ Exit code 0 - allow the change
455
+ Exit code 2 - block the change from being applied to the session
456
+ Other exit codes - show stderr to user only`,
457
+ matcherMetadata: {
458
+ fieldToMatch: "source",
459
+ values: [
460
+ "user_settings",
461
+ "project_settings",
462
+ "local_settings",
463
+ "policy_settings",
464
+ "skills"
465
+ ]
466
+ }
467
+ },
468
+ InstructionsLoaded: {
469
+ summary: "When an instruction file (CLAUDE.md or rule) is loaded",
470
+ description: `Input to command is JSON with file_path, memory_type (User, Project, Local, Managed), load_reason (session_start, nested_traversal, path_glob_match, include, compact), globs (optional \u2014 the paths: frontmatter patterns that matched), trigger_file_path (optional \u2014 the file Claude touched that caused the load), and parent_file_path (optional \u2014 the file that @-included this one).
471
+ Exit code 0 - command completes successfully
472
+ Other exit codes - show stderr to user only
473
+ This hook is observability-only and does not support blocking.`,
474
+ matcherMetadata: {
475
+ fieldToMatch: "load_reason",
476
+ values: [
477
+ "session_start",
478
+ "nested_traversal",
479
+ "path_glob_match",
480
+ "include",
481
+ "compact"
482
+ ]
483
+ }
484
+ },
485
+ WorktreeCreate: {
486
+ summary: "Create an isolated worktree for VCS-agnostic isolation",
487
+ description: `Input to command is JSON with name (suggested worktree slug).
488
+ Stdout should contain the absolute path to the created worktree directory.
489
+ Exit code 0 - worktree created successfully
490
+ Other exit codes - worktree creation failed`
491
+ },
492
+ WorktreeRemove: {
493
+ summary: "Remove a previously created worktree",
494
+ description: `Input to command is JSON with worktree_path (absolute path to worktree).
495
+ Exit code 0 - worktree removed successfully
496
+ Other exit codes - show stderr to user only`
497
+ },
498
+ CwdChanged: {
499
+ summary: "After the working directory changes",
500
+ description: `Input to command is JSON with old_cwd and new_cwd.
501
+ CLAUDE_ENV_FILE is set \u2014 write bash exports there to apply env to subsequent BashTool commands.
502
+ Hook output can include hookSpecificOutput.watchPaths (array of absolute paths) to register with the FileChanged watcher.
503
+ Exit code 0 - command completes successfully
504
+ Other exit codes - show stderr to user only`
505
+ },
506
+ FileChanged: {
507
+ summary: "When a watched file changes",
508
+ description: `Input to command is JSON with file_path and event (change, add, unlink).
509
+ CLAUDE_ENV_FILE is set \u2014 write bash exports there to apply env to subsequent BashTool commands.
510
+ The matcher field specifies filenames to watch in the current directory (e.g. ".envrc|.env").
511
+ Hook output can include hookSpecificOutput.watchPaths (array of absolute paths) to dynamically update the watch list.
512
+ Exit code 0 - command completes successfully
513
+ Other exit codes - show stderr to user only`
514
+ }
515
+ };
516
+ }, (toolNames) => toolNames.slice().sort().join(","));
517
+ });
518
+
519
+ // src/components/hooks/SelectEventMode.tsx
520
+ function SelectEventMode(t0) {
521
+ const $ = import_compiler_runtime.c(23);
522
+ const {
523
+ hookEventMetadata,
524
+ hooksByEvent,
525
+ totalHooksCount,
526
+ restrictedByPolicy,
527
+ onSelectEvent,
528
+ onCancel
529
+ } = t0;
530
+ let t1;
531
+ if ($[0] !== totalHooksCount) {
532
+ t1 = plural(totalHooksCount, "hook");
533
+ $[0] = totalHooksCount;
534
+ $[1] = t1;
535
+ } else {
536
+ t1 = $[1];
537
+ }
538
+ const subtitle = `${totalHooksCount} ${t1} configured`;
539
+ let t2;
540
+ if ($[2] !== restrictedByPolicy) {
541
+ t2 = restrictedByPolicy && /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
542
+ flexDirection: "column",
543
+ children: [
544
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
545
+ color: "suggestion",
546
+ children: [
547
+ figures_default.info,
548
+ " Hooks Restricted by Policy"
549
+ ]
550
+ }, undefined, true, undefined, this),
551
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
552
+ dimColor: true,
553
+ children: "Only hooks from managed settings can run. User-defined hooks from ~/.claude/settings.json, .claude/settings.json, and .claude/settings.local.json are blocked."
554
+ }, undefined, false, undefined, this)
555
+ ]
556
+ }, undefined, true, undefined, this);
557
+ $[2] = restrictedByPolicy;
558
+ $[3] = t2;
559
+ } else {
560
+ t2 = $[3];
561
+ }
562
+ let t3;
563
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
564
+ t3 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
565
+ flexDirection: "column",
566
+ children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
567
+ dimColor: true,
568
+ children: [
569
+ figures_default.info,
570
+ " This menu is read-only. To add or modify hooks, edit settings.json directly or ask Claude.",
571
+ " ",
572
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Link, {
573
+ url: "https://code.claude.com/docs/en/hooks",
574
+ children: "Learn more"
575
+ }, undefined, false, undefined, this)
576
+ ]
577
+ }, undefined, true, undefined, this)
578
+ }, undefined, false, undefined, this);
579
+ $[4] = t3;
580
+ } else {
581
+ t3 = $[4];
582
+ }
583
+ let t4;
584
+ if ($[5] !== onSelectEvent) {
585
+ t4 = (value) => {
586
+ onSelectEvent(value);
587
+ };
588
+ $[5] = onSelectEvent;
589
+ $[6] = t4;
590
+ } else {
591
+ t4 = $[6];
592
+ }
593
+ let t5;
594
+ if ($[7] !== hookEventMetadata) {
595
+ t5 = Object.entries(hookEventMetadata);
596
+ $[7] = hookEventMetadata;
597
+ $[8] = t5;
598
+ } else {
599
+ t5 = $[8];
600
+ }
601
+ let t6;
602
+ if ($[9] !== hooksByEvent || $[10] !== t5) {
603
+ t6 = t5.map((t72) => {
604
+ const [name, metadata] = t72;
605
+ const count = hooksByEvent[name] || 0;
606
+ return {
607
+ label: count > 0 ? /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
608
+ children: [
609
+ name,
610
+ " ",
611
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
612
+ color: "suggestion",
613
+ children: [
614
+ "(",
615
+ count,
616
+ ")"
617
+ ]
618
+ }, undefined, true, undefined, this)
619
+ ]
620
+ }, undefined, true, undefined, this) : name,
621
+ value: name,
622
+ description: metadata.summary
623
+ };
624
+ });
625
+ $[9] = hooksByEvent;
626
+ $[10] = t5;
627
+ $[11] = t6;
628
+ } else {
629
+ t6 = $[11];
630
+ }
631
+ let t7;
632
+ if ($[12] !== onCancel || $[13] !== t4 || $[14] !== t6) {
633
+ t7 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
634
+ flexDirection: "column",
635
+ children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Select, {
636
+ onChange: t4,
637
+ onCancel,
638
+ options: t6
639
+ }, undefined, false, undefined, this)
640
+ }, undefined, false, undefined, this);
641
+ $[12] = onCancel;
642
+ $[13] = t4;
643
+ $[14] = t6;
644
+ $[15] = t7;
645
+ } else {
646
+ t7 = $[15];
647
+ }
648
+ let t8;
649
+ if ($[16] !== t2 || $[17] !== t7) {
650
+ t8 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
651
+ flexDirection: "column",
652
+ gap: 1,
653
+ children: [
654
+ t2,
655
+ t3,
656
+ t7
657
+ ]
658
+ }, undefined, true, undefined, this);
659
+ $[16] = t2;
660
+ $[17] = t7;
661
+ $[18] = t8;
662
+ } else {
663
+ t8 = $[18];
664
+ }
665
+ let t9;
666
+ if ($[19] !== onCancel || $[20] !== subtitle || $[21] !== t8) {
667
+ t9 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Dialog, {
668
+ title: "Hooks",
669
+ subtitle,
670
+ onCancel,
671
+ children: t8
672
+ }, undefined, false, undefined, this);
673
+ $[19] = onCancel;
674
+ $[20] = subtitle;
675
+ $[21] = t8;
676
+ $[22] = t9;
677
+ } else {
678
+ t9 = $[22];
679
+ }
680
+ return t9;
681
+ }
682
+ var import_compiler_runtime, jsx_dev_runtime;
683
+ var init_SelectEventMode = __esm(() => {
684
+ init_figures();
685
+ init_ink();
686
+ init_stringUtils();
687
+ init_select();
688
+ init_Dialog();
689
+ import_compiler_runtime = __toESM(require_compiler_runtime(), 1);
690
+ jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
691
+ });
692
+
693
+ // src/components/hooks/SelectHookMode.tsx
694
+ function SelectHookMode(t0) {
695
+ const $ = import_compiler_runtime2.c(19);
696
+ const {
697
+ selectedEvent,
698
+ selectedMatcher,
699
+ hooksForSelectedMatcher,
700
+ hookEventMetadata,
701
+ onSelect,
702
+ onCancel
703
+ } = t0;
704
+ const title = hookEventMetadata.matcherMetadata !== undefined ? `${selectedEvent} - Matcher: ${selectedMatcher || "(all)"}` : selectedEvent;
705
+ if (hooksForSelectedMatcher.length === 0) {
706
+ let t12;
707
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
708
+ t12 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
709
+ flexDirection: "column",
710
+ gap: 1,
711
+ children: [
712
+ /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
713
+ dimColor: true,
714
+ children: "No hooks configured for this event."
715
+ }, undefined, false, undefined, this),
716
+ /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
717
+ dimColor: true,
718
+ children: "To add hooks, edit settings.json directly or ask Claude."
719
+ }, undefined, false, undefined, this)
720
+ ]
721
+ }, undefined, true, undefined, this);
722
+ $[0] = t12;
723
+ } else {
724
+ t12 = $[0];
725
+ }
726
+ let t22;
727
+ if ($[1] !== hookEventMetadata.description || $[2] !== onCancel || $[3] !== title) {
728
+ t22 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Dialog, {
729
+ title,
730
+ subtitle: hookEventMetadata.description,
731
+ onCancel,
732
+ inputGuide: _temp,
733
+ children: t12
734
+ }, undefined, false, undefined, this);
735
+ $[1] = hookEventMetadata.description;
736
+ $[2] = onCancel;
737
+ $[3] = title;
738
+ $[4] = t22;
739
+ } else {
740
+ t22 = $[4];
741
+ }
742
+ return t22;
743
+ }
744
+ const t1 = hookEventMetadata.description;
745
+ let t2;
746
+ if ($[5] !== hooksForSelectedMatcher) {
747
+ t2 = hooksForSelectedMatcher.map(_temp2);
748
+ $[5] = hooksForSelectedMatcher;
749
+ $[6] = t2;
750
+ } else {
751
+ t2 = $[6];
752
+ }
753
+ let t3;
754
+ if ($[7] !== hooksForSelectedMatcher || $[8] !== onSelect) {
755
+ t3 = (value) => {
756
+ const index_0 = parseInt(value, 10);
757
+ const hook_0 = hooksForSelectedMatcher[index_0];
758
+ if (hook_0) {
759
+ onSelect(hook_0);
760
+ }
761
+ };
762
+ $[7] = hooksForSelectedMatcher;
763
+ $[8] = onSelect;
764
+ $[9] = t3;
765
+ } else {
766
+ t3 = $[9];
767
+ }
768
+ let t4;
769
+ if ($[10] !== onCancel || $[11] !== t2 || $[12] !== t3) {
770
+ t4 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
771
+ flexDirection: "column",
772
+ children: /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Select, {
773
+ options: t2,
774
+ onChange: t3,
775
+ onCancel
776
+ }, undefined, false, undefined, this)
777
+ }, undefined, false, undefined, this);
778
+ $[10] = onCancel;
779
+ $[11] = t2;
780
+ $[12] = t3;
781
+ $[13] = t4;
782
+ } else {
783
+ t4 = $[13];
784
+ }
785
+ let t5;
786
+ if ($[14] !== hookEventMetadata.description || $[15] !== onCancel || $[16] !== t4 || $[17] !== title) {
787
+ t5 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Dialog, {
788
+ title,
789
+ subtitle: t1,
790
+ onCancel,
791
+ children: t4
792
+ }, undefined, false, undefined, this);
793
+ $[14] = hookEventMetadata.description;
794
+ $[15] = onCancel;
795
+ $[16] = t4;
796
+ $[17] = title;
797
+ $[18] = t5;
798
+ } else {
799
+ t5 = $[18];
800
+ }
801
+ return t5;
802
+ }
803
+ function _temp2(hook, index) {
804
+ return {
805
+ label: `[${hook.config.type}] ${getHookDisplayText(hook.config)}`,
806
+ value: index.toString(),
807
+ description: hook.source === "pluginHook" && hook.pluginName ? `${hookSourceHeaderDisplayString(hook.source)} (${hook.pluginName})` : hookSourceHeaderDisplayString(hook.source)
808
+ };
809
+ }
810
+ function _temp() {
811
+ return /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
812
+ children: "Esc to go back"
813
+ }, undefined, false, undefined, this);
814
+ }
815
+ var import_compiler_runtime2, jsx_dev_runtime2;
816
+ var init_SelectHookMode = __esm(() => {
817
+ init_ink();
818
+ init_hooksSettings();
819
+ init_select();
820
+ init_Dialog();
821
+ import_compiler_runtime2 = __toESM(require_compiler_runtime(), 1);
822
+ jsx_dev_runtime2 = __toESM(require_jsx_dev_runtime(), 1);
823
+ });
824
+
825
+ // src/components/hooks/SelectMatcherMode.tsx
826
+ function SelectMatcherMode(t0) {
827
+ const $ = import_compiler_runtime3.c(25);
828
+ const {
829
+ selectedEvent,
830
+ matchersForSelectedEvent,
831
+ hooksByEventAndMatcher,
832
+ eventDescription,
833
+ onSelect,
834
+ onCancel
835
+ } = t0;
836
+ let t1;
837
+ if ($[0] !== hooksByEventAndMatcher || $[1] !== matchersForSelectedEvent || $[2] !== selectedEvent) {
838
+ let t22;
839
+ if ($[4] !== hooksByEventAndMatcher || $[5] !== selectedEvent) {
840
+ t22 = (matcher) => {
841
+ const hooks = hooksByEventAndMatcher[selectedEvent]?.[matcher] || [];
842
+ const sources = Array.from(new Set(hooks.map(_temp4)));
843
+ return {
844
+ matcher,
845
+ sources,
846
+ hookCount: hooks.length
847
+ };
848
+ };
849
+ $[4] = hooksByEventAndMatcher;
850
+ $[5] = selectedEvent;
851
+ $[6] = t22;
852
+ } else {
853
+ t22 = $[6];
854
+ }
855
+ t1 = matchersForSelectedEvent.map(t22);
856
+ $[0] = hooksByEventAndMatcher;
857
+ $[1] = matchersForSelectedEvent;
858
+ $[2] = selectedEvent;
859
+ $[3] = t1;
860
+ } else {
861
+ t1 = $[3];
862
+ }
863
+ const matchersWithSources = t1;
864
+ if (matchersForSelectedEvent.length === 0) {
865
+ const t22 = `${selectedEvent} - Matchers`;
866
+ let t32;
867
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
868
+ t32 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
869
+ flexDirection: "column",
870
+ gap: 1,
871
+ children: [
872
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
873
+ dimColor: true,
874
+ children: "No hooks configured for this event."
875
+ }, undefined, false, undefined, this),
876
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
877
+ dimColor: true,
878
+ children: "To add hooks, edit settings.json directly or ask Claude."
879
+ }, undefined, false, undefined, this)
880
+ ]
881
+ }, undefined, true, undefined, this);
882
+ $[7] = t32;
883
+ } else {
884
+ t32 = $[7];
885
+ }
886
+ let t42;
887
+ if ($[8] !== eventDescription || $[9] !== onCancel || $[10] !== t22) {
888
+ t42 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Dialog, {
889
+ title: t22,
890
+ subtitle: eventDescription,
891
+ onCancel,
892
+ inputGuide: _temp22,
893
+ children: t32
894
+ }, undefined, false, undefined, this);
895
+ $[8] = eventDescription;
896
+ $[9] = onCancel;
897
+ $[10] = t22;
898
+ $[11] = t42;
899
+ } else {
900
+ t42 = $[11];
901
+ }
902
+ return t42;
903
+ }
904
+ const t2 = `${selectedEvent} - Matchers`;
905
+ let t3;
906
+ if ($[12] !== matchersWithSources) {
907
+ t3 = matchersWithSources.map(_temp3);
908
+ $[12] = matchersWithSources;
909
+ $[13] = t3;
910
+ } else {
911
+ t3 = $[13];
912
+ }
913
+ let t4;
914
+ if ($[14] !== onSelect) {
915
+ t4 = (value) => {
916
+ onSelect(value);
917
+ };
918
+ $[14] = onSelect;
919
+ $[15] = t4;
920
+ } else {
921
+ t4 = $[15];
922
+ }
923
+ let t5;
924
+ if ($[16] !== onCancel || $[17] !== t3 || $[18] !== t4) {
925
+ t5 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
926
+ flexDirection: "column",
927
+ children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Select, {
928
+ options: t3,
929
+ onChange: t4,
930
+ onCancel
931
+ }, undefined, false, undefined, this)
932
+ }, undefined, false, undefined, this);
933
+ $[16] = onCancel;
934
+ $[17] = t3;
935
+ $[18] = t4;
936
+ $[19] = t5;
937
+ } else {
938
+ t5 = $[19];
939
+ }
940
+ let t6;
941
+ if ($[20] !== eventDescription || $[21] !== onCancel || $[22] !== t2 || $[23] !== t5) {
942
+ t6 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Dialog, {
943
+ title: t2,
944
+ subtitle: eventDescription,
945
+ onCancel,
946
+ children: t5
947
+ }, undefined, false, undefined, this);
948
+ $[20] = eventDescription;
949
+ $[21] = onCancel;
950
+ $[22] = t2;
951
+ $[23] = t5;
952
+ $[24] = t6;
953
+ } else {
954
+ t6 = $[24];
955
+ }
956
+ return t6;
957
+ }
958
+ function _temp3(item) {
959
+ const sourceText = item.sources.map(hookSourceInlineDisplayString).join(", ");
960
+ const matcherLabel = item.matcher || "(all)";
961
+ return {
962
+ label: `[${sourceText}] ${matcherLabel}`,
963
+ value: item.matcher,
964
+ description: `${item.hookCount} ${plural(item.hookCount, "hook")}`
965
+ };
966
+ }
967
+ function _temp22() {
968
+ return /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
969
+ children: "Esc to go back"
970
+ }, undefined, false, undefined, this);
971
+ }
972
+ function _temp4(h) {
973
+ return h.source;
974
+ }
975
+ var import_compiler_runtime3, jsx_dev_runtime3;
976
+ var init_SelectMatcherMode = __esm(() => {
977
+ init_ink();
978
+ init_hooksSettings();
979
+ init_stringUtils();
980
+ init_select();
981
+ init_Dialog();
982
+ import_compiler_runtime3 = __toESM(require_compiler_runtime(), 1);
983
+ jsx_dev_runtime3 = __toESM(require_jsx_dev_runtime(), 1);
984
+ });
985
+
986
+ // src/components/hooks/ViewHookMode.tsx
987
+ function ViewHookMode(t0) {
988
+ const $ = import_compiler_runtime4.c(40);
989
+ const {
990
+ selectedHook,
991
+ eventSupportsMatcher,
992
+ onCancel
993
+ } = t0;
994
+ let t1;
995
+ if ($[0] !== selectedHook.event) {
996
+ t1 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
997
+ children: [
998
+ "Event: ",
999
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
1000
+ bold: true,
1001
+ children: selectedHook.event
1002
+ }, undefined, false, undefined, this)
1003
+ ]
1004
+ }, undefined, true, undefined, this);
1005
+ $[0] = selectedHook.event;
1006
+ $[1] = t1;
1007
+ } else {
1008
+ t1 = $[1];
1009
+ }
1010
+ let t2;
1011
+ if ($[2] !== eventSupportsMatcher || $[3] !== selectedHook.matcher) {
1012
+ t2 = eventSupportsMatcher && /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
1013
+ children: [
1014
+ "Matcher: ",
1015
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
1016
+ bold: true,
1017
+ children: selectedHook.matcher || "(all)"
1018
+ }, undefined, false, undefined, this)
1019
+ ]
1020
+ }, undefined, true, undefined, this);
1021
+ $[2] = eventSupportsMatcher;
1022
+ $[3] = selectedHook.matcher;
1023
+ $[4] = t2;
1024
+ } else {
1025
+ t2 = $[4];
1026
+ }
1027
+ let t3;
1028
+ if ($[5] !== selectedHook.config.type) {
1029
+ t3 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
1030
+ children: [
1031
+ "Type: ",
1032
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
1033
+ bold: true,
1034
+ children: selectedHook.config.type
1035
+ }, undefined, false, undefined, this)
1036
+ ]
1037
+ }, undefined, true, undefined, this);
1038
+ $[5] = selectedHook.config.type;
1039
+ $[6] = t3;
1040
+ } else {
1041
+ t3 = $[6];
1042
+ }
1043
+ let t4;
1044
+ if ($[7] !== selectedHook.source) {
1045
+ t4 = hookSourceDescriptionDisplayString(selectedHook.source);
1046
+ $[7] = selectedHook.source;
1047
+ $[8] = t4;
1048
+ } else {
1049
+ t4 = $[8];
1050
+ }
1051
+ let t5;
1052
+ if ($[9] !== t4) {
1053
+ t5 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
1054
+ children: [
1055
+ "Source:",
1056
+ " ",
1057
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
1058
+ dimColor: true,
1059
+ children: t4
1060
+ }, undefined, false, undefined, this)
1061
+ ]
1062
+ }, undefined, true, undefined, this);
1063
+ $[9] = t4;
1064
+ $[10] = t5;
1065
+ } else {
1066
+ t5 = $[10];
1067
+ }
1068
+ let t6;
1069
+ if ($[11] !== selectedHook.pluginName) {
1070
+ t6 = selectedHook.pluginName && /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
1071
+ children: [
1072
+ "Plugin: ",
1073
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
1074
+ dimColor: true,
1075
+ children: selectedHook.pluginName
1076
+ }, undefined, false, undefined, this)
1077
+ ]
1078
+ }, undefined, true, undefined, this);
1079
+ $[11] = selectedHook.pluginName;
1080
+ $[12] = t6;
1081
+ } else {
1082
+ t6 = $[12];
1083
+ }
1084
+ let t7;
1085
+ if ($[13] !== t1 || $[14] !== t2 || $[15] !== t3 || $[16] !== t5 || $[17] !== t6) {
1086
+ t7 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
1087
+ flexDirection: "column",
1088
+ children: [
1089
+ t1,
1090
+ t2,
1091
+ t3,
1092
+ t5,
1093
+ t6
1094
+ ]
1095
+ }, undefined, true, undefined, this);
1096
+ $[13] = t1;
1097
+ $[14] = t2;
1098
+ $[15] = t3;
1099
+ $[16] = t5;
1100
+ $[17] = t6;
1101
+ $[18] = t7;
1102
+ } else {
1103
+ t7 = $[18];
1104
+ }
1105
+ let t8;
1106
+ if ($[19] !== selectedHook.config) {
1107
+ t8 = getContentFieldLabel(selectedHook.config);
1108
+ $[19] = selectedHook.config;
1109
+ $[20] = t8;
1110
+ } else {
1111
+ t8 = $[20];
1112
+ }
1113
+ let t9;
1114
+ if ($[21] !== t8) {
1115
+ t9 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
1116
+ dimColor: true,
1117
+ children: [
1118
+ t8,
1119
+ ":"
1120
+ ]
1121
+ }, undefined, true, undefined, this);
1122
+ $[21] = t8;
1123
+ $[22] = t9;
1124
+ } else {
1125
+ t9 = $[22];
1126
+ }
1127
+ let t10;
1128
+ if ($[23] !== selectedHook.config) {
1129
+ t10 = getContentFieldValue(selectedHook.config);
1130
+ $[23] = selectedHook.config;
1131
+ $[24] = t10;
1132
+ } else {
1133
+ t10 = $[24];
1134
+ }
1135
+ let t11;
1136
+ if ($[25] !== t10) {
1137
+ t11 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
1138
+ borderStyle: "round",
1139
+ borderDimColor: true,
1140
+ paddingLeft: 1,
1141
+ paddingRight: 1,
1142
+ children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
1143
+ children: t10
1144
+ }, undefined, false, undefined, this)
1145
+ }, undefined, false, undefined, this);
1146
+ $[25] = t10;
1147
+ $[26] = t11;
1148
+ } else {
1149
+ t11 = $[26];
1150
+ }
1151
+ let t12;
1152
+ if ($[27] !== t11 || $[28] !== t9) {
1153
+ t12 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
1154
+ flexDirection: "column",
1155
+ children: [
1156
+ t9,
1157
+ t11
1158
+ ]
1159
+ }, undefined, true, undefined, this);
1160
+ $[27] = t11;
1161
+ $[28] = t9;
1162
+ $[29] = t12;
1163
+ } else {
1164
+ t12 = $[29];
1165
+ }
1166
+ let t13;
1167
+ if ($[30] !== selectedHook.config) {
1168
+ t13 = "statusMessage" in selectedHook.config && selectedHook.config.statusMessage && /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
1169
+ children: [
1170
+ "Status message:",
1171
+ " ",
1172
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
1173
+ dimColor: true,
1174
+ children: selectedHook.config.statusMessage
1175
+ }, undefined, false, undefined, this)
1176
+ ]
1177
+ }, undefined, true, undefined, this);
1178
+ $[30] = selectedHook.config;
1179
+ $[31] = t13;
1180
+ } else {
1181
+ t13 = $[31];
1182
+ }
1183
+ let t14;
1184
+ if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
1185
+ t14 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
1186
+ dimColor: true,
1187
+ children: "To modify or remove this hook, edit settings.json directly or ask Claude to help."
1188
+ }, undefined, false, undefined, this);
1189
+ $[32] = t14;
1190
+ } else {
1191
+ t14 = $[32];
1192
+ }
1193
+ let t15;
1194
+ if ($[33] !== t12 || $[34] !== t13 || $[35] !== t7) {
1195
+ t15 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
1196
+ flexDirection: "column",
1197
+ gap: 1,
1198
+ children: [
1199
+ t7,
1200
+ t12,
1201
+ t13,
1202
+ t14
1203
+ ]
1204
+ }, undefined, true, undefined, this);
1205
+ $[33] = t12;
1206
+ $[34] = t13;
1207
+ $[35] = t7;
1208
+ $[36] = t15;
1209
+ } else {
1210
+ t15 = $[36];
1211
+ }
1212
+ let t16;
1213
+ if ($[37] !== onCancel || $[38] !== t15) {
1214
+ t16 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Dialog, {
1215
+ title: "Hook details",
1216
+ onCancel,
1217
+ inputGuide: _temp6,
1218
+ children: t15
1219
+ }, undefined, false, undefined, this);
1220
+ $[37] = onCancel;
1221
+ $[38] = t15;
1222
+ $[39] = t16;
1223
+ } else {
1224
+ t16 = $[39];
1225
+ }
1226
+ return t16;
1227
+ }
1228
+ function _temp6() {
1229
+ return /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
1230
+ children: "Esc to go back"
1231
+ }, undefined, false, undefined, this);
1232
+ }
1233
+ function getContentFieldLabel(config) {
1234
+ switch (config.type) {
1235
+ case "command":
1236
+ return "Command";
1237
+ case "prompt":
1238
+ return "Prompt";
1239
+ case "agent":
1240
+ return "Prompt";
1241
+ case "http":
1242
+ return "URL";
1243
+ }
1244
+ }
1245
+ function getContentFieldValue(config) {
1246
+ switch (config.type) {
1247
+ case "command":
1248
+ return config.command;
1249
+ case "prompt":
1250
+ return config.prompt;
1251
+ case "agent":
1252
+ return config.prompt;
1253
+ case "http":
1254
+ return config.url;
1255
+ }
1256
+ }
1257
+ var import_compiler_runtime4, jsx_dev_runtime4;
1258
+ var init_ViewHookMode = __esm(() => {
1259
+ init_ink();
1260
+ init_hooksSettings();
1261
+ init_Dialog();
1262
+ import_compiler_runtime4 = __toESM(require_compiler_runtime(), 1);
1263
+ jsx_dev_runtime4 = __toESM(require_jsx_dev_runtime(), 1);
1264
+ });
1265
+
1266
+ // src/components/hooks/HooksConfigMenu.tsx
1267
+ function HooksConfigMenu(t0) {
1268
+ const $ = import_compiler_runtime5.c(100);
1269
+ const {
1270
+ toolNames,
1271
+ onExit
1272
+ } = t0;
1273
+ let t1;
1274
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1275
+ t1 = {
1276
+ mode: "select-event"
1277
+ };
1278
+ $[0] = t1;
1279
+ } else {
1280
+ t1 = $[0];
1281
+ }
1282
+ const [modeState, setModeState] = import_react.useState(t1);
1283
+ const [disabledByPolicy, setDisabledByPolicy] = import_react.useState(_temp7);
1284
+ const [restrictedByPolicy, setRestrictedByPolicy] = import_react.useState(_temp23);
1285
+ let t2;
1286
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
1287
+ t2 = (source) => {
1288
+ if (source === "policySettings") {
1289
+ const settings_0 = getSettings_DEPRECATED();
1290
+ const hooksDisabled_0 = settings_0?.disableAllHooks === true;
1291
+ setDisabledByPolicy(hooksDisabled_0 && getSettingsForSource("policySettings")?.disableAllHooks === true);
1292
+ setRestrictedByPolicy(getSettingsForSource("policySettings")?.allowManagedHooksOnly === true);
1293
+ }
1294
+ };
1295
+ $[1] = t2;
1296
+ } else {
1297
+ t2 = $[1];
1298
+ }
1299
+ useSettingsChange(t2);
1300
+ const mode = modeState.mode;
1301
+ const selectedEvent = "event" in modeState ? modeState.event : "PreToolUse";
1302
+ const selectedMatcher = "matcher" in modeState ? modeState.matcher : null;
1303
+ const mcp = useAppState(_temp32);
1304
+ const appStateStore = useAppStateStore();
1305
+ let t3;
1306
+ if ($[2] !== mcp.tools || $[3] !== toolNames) {
1307
+ t3 = [...toolNames, ...mcp.tools.map(_temp42)];
1308
+ $[2] = mcp.tools;
1309
+ $[3] = toolNames;
1310
+ $[4] = t3;
1311
+ } else {
1312
+ t3 = $[4];
1313
+ }
1314
+ const combinedToolNames = t3;
1315
+ let t4;
1316
+ if ($[5] !== appStateStore || $[6] !== combinedToolNames) {
1317
+ t4 = groupHooksByEventAndMatcher(appStateStore.getState(), combinedToolNames);
1318
+ $[5] = appStateStore;
1319
+ $[6] = combinedToolNames;
1320
+ $[7] = t4;
1321
+ } else {
1322
+ t4 = $[7];
1323
+ }
1324
+ const hooksByEventAndMatcher = t4;
1325
+ let t5;
1326
+ if ($[8] !== hooksByEventAndMatcher || $[9] !== selectedEvent) {
1327
+ t5 = getSortedMatchersForEvent(hooksByEventAndMatcher, selectedEvent);
1328
+ $[8] = hooksByEventAndMatcher;
1329
+ $[9] = selectedEvent;
1330
+ $[10] = t5;
1331
+ } else {
1332
+ t5 = $[10];
1333
+ }
1334
+ const sortedMatchersForSelectedEvent = t5;
1335
+ let t6;
1336
+ if ($[11] !== hooksByEventAndMatcher || $[12] !== selectedEvent || $[13] !== selectedMatcher) {
1337
+ t6 = getHooksForMatcher(hooksByEventAndMatcher, selectedEvent, selectedMatcher);
1338
+ $[11] = hooksByEventAndMatcher;
1339
+ $[12] = selectedEvent;
1340
+ $[13] = selectedMatcher;
1341
+ $[14] = t6;
1342
+ } else {
1343
+ t6 = $[14];
1344
+ }
1345
+ const hooksForSelectedMatcher = t6;
1346
+ let t7;
1347
+ if ($[15] !== onExit) {
1348
+ t7 = () => {
1349
+ onExit("Hooks dialog dismissed", {
1350
+ display: "system"
1351
+ });
1352
+ };
1353
+ $[15] = onExit;
1354
+ $[16] = t7;
1355
+ } else {
1356
+ t7 = $[16];
1357
+ }
1358
+ const handleExit = t7;
1359
+ const t8 = mode === "select-event";
1360
+ let t9;
1361
+ if ($[17] !== t8) {
1362
+ t9 = {
1363
+ context: "Confirmation",
1364
+ isActive: t8
1365
+ };
1366
+ $[17] = t8;
1367
+ $[18] = t9;
1368
+ } else {
1369
+ t9 = $[18];
1370
+ }
1371
+ useKeybinding("confirm:no", handleExit, t9);
1372
+ let t10;
1373
+ if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
1374
+ t10 = () => {
1375
+ setModeState({
1376
+ mode: "select-event"
1377
+ });
1378
+ };
1379
+ $[19] = t10;
1380
+ } else {
1381
+ t10 = $[19];
1382
+ }
1383
+ const t11 = mode === "select-matcher";
1384
+ let t12;
1385
+ if ($[20] !== t11) {
1386
+ t12 = {
1387
+ context: "Confirmation",
1388
+ isActive: t11
1389
+ };
1390
+ $[20] = t11;
1391
+ $[21] = t12;
1392
+ } else {
1393
+ t12 = $[21];
1394
+ }
1395
+ useKeybinding("confirm:no", t10, t12);
1396
+ let t13;
1397
+ if ($[22] !== combinedToolNames || $[23] !== modeState) {
1398
+ t13 = () => {
1399
+ if ("event" in modeState) {
1400
+ if (getMatcherMetadata(modeState.event, combinedToolNames) !== undefined) {
1401
+ setModeState({
1402
+ mode: "select-matcher",
1403
+ event: modeState.event
1404
+ });
1405
+ } else {
1406
+ setModeState({
1407
+ mode: "select-event"
1408
+ });
1409
+ }
1410
+ }
1411
+ };
1412
+ $[22] = combinedToolNames;
1413
+ $[23] = modeState;
1414
+ $[24] = t13;
1415
+ } else {
1416
+ t13 = $[24];
1417
+ }
1418
+ const t14 = mode === "select-hook";
1419
+ let t15;
1420
+ if ($[25] !== t14) {
1421
+ t15 = {
1422
+ context: "Confirmation",
1423
+ isActive: t14
1424
+ };
1425
+ $[25] = t14;
1426
+ $[26] = t15;
1427
+ } else {
1428
+ t15 = $[26];
1429
+ }
1430
+ useKeybinding("confirm:no", t13, t15);
1431
+ let t16;
1432
+ if ($[27] !== modeState) {
1433
+ t16 = () => {
1434
+ if (modeState.mode === "view-hook") {
1435
+ const {
1436
+ event,
1437
+ hook
1438
+ } = modeState;
1439
+ setModeState({
1440
+ mode: "select-hook",
1441
+ event,
1442
+ matcher: hook.matcher || ""
1443
+ });
1444
+ }
1445
+ };
1446
+ $[27] = modeState;
1447
+ $[28] = t16;
1448
+ } else {
1449
+ t16 = $[28];
1450
+ }
1451
+ const t17 = mode === "view-hook";
1452
+ let t18;
1453
+ if ($[29] !== t17) {
1454
+ t18 = {
1455
+ context: "Confirmation",
1456
+ isActive: t17
1457
+ };
1458
+ $[29] = t17;
1459
+ $[30] = t18;
1460
+ } else {
1461
+ t18 = $[30];
1462
+ }
1463
+ useKeybinding("confirm:no", t16, t18);
1464
+ let t19;
1465
+ if ($[31] !== combinedToolNames) {
1466
+ t19 = getHookEventMetadata(combinedToolNames);
1467
+ $[31] = combinedToolNames;
1468
+ $[32] = t19;
1469
+ } else {
1470
+ t19 = $[32];
1471
+ }
1472
+ const hookEventMetadata = t19;
1473
+ const settings_1 = getSettings_DEPRECATED();
1474
+ const hooksDisabled_1 = settings_1?.disableAllHooks === true;
1475
+ let t20;
1476
+ if ($[33] !== hooksByEventAndMatcher) {
1477
+ const byEvent = {};
1478
+ let total = 0;
1479
+ for (const [event_0, matchers] of Object.entries(hooksByEventAndMatcher)) {
1480
+ const eventCount = Object.values(matchers).reduce(_temp5, 0);
1481
+ byEvent[event_0] = eventCount;
1482
+ total = total + eventCount;
1483
+ }
1484
+ t20 = {
1485
+ hooksByEvent: byEvent,
1486
+ totalHooksCount: total
1487
+ };
1488
+ $[33] = hooksByEventAndMatcher;
1489
+ $[34] = t20;
1490
+ } else {
1491
+ t20 = $[34];
1492
+ }
1493
+ const {
1494
+ hooksByEvent,
1495
+ totalHooksCount
1496
+ } = t20;
1497
+ if (hooksDisabled_1) {
1498
+ let t21;
1499
+ if ($[35] === Symbol.for("react.memo_cache_sentinel")) {
1500
+ t21 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
1501
+ bold: true,
1502
+ children: "disabled"
1503
+ }, undefined, false, undefined, this);
1504
+ $[35] = t21;
1505
+ } else {
1506
+ t21 = $[35];
1507
+ }
1508
+ const t22 = disabledByPolicy && " by a managed settings file";
1509
+ let t23;
1510
+ if ($[36] !== totalHooksCount) {
1511
+ t23 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
1512
+ bold: true,
1513
+ children: totalHooksCount
1514
+ }, undefined, false, undefined, this);
1515
+ $[36] = totalHooksCount;
1516
+ $[37] = t23;
1517
+ } else {
1518
+ t23 = $[37];
1519
+ }
1520
+ let t24;
1521
+ if ($[38] !== totalHooksCount) {
1522
+ t24 = plural(totalHooksCount, "hook");
1523
+ $[38] = totalHooksCount;
1524
+ $[39] = t24;
1525
+ } else {
1526
+ t24 = $[39];
1527
+ }
1528
+ let t25;
1529
+ if ($[40] !== totalHooksCount) {
1530
+ t25 = plural(totalHooksCount, "is", "are");
1531
+ $[40] = totalHooksCount;
1532
+ $[41] = t25;
1533
+ } else {
1534
+ t25 = $[41];
1535
+ }
1536
+ let t26;
1537
+ if ($[42] !== t22 || $[43] !== t23 || $[44] !== t24 || $[45] !== t25) {
1538
+ t26 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
1539
+ children: [
1540
+ "All hooks are currently ",
1541
+ t21,
1542
+ t22,
1543
+ ". You have",
1544
+ " ",
1545
+ t23,
1546
+ " configured",
1547
+ " ",
1548
+ t24,
1549
+ " that",
1550
+ " ",
1551
+ t25,
1552
+ " not running."
1553
+ ]
1554
+ }, undefined, true, undefined, this);
1555
+ $[42] = t22;
1556
+ $[43] = t23;
1557
+ $[44] = t24;
1558
+ $[45] = t25;
1559
+ $[46] = t26;
1560
+ } else {
1561
+ t26 = $[46];
1562
+ }
1563
+ let t27;
1564
+ let t28;
1565
+ let t29;
1566
+ let t30;
1567
+ if ($[47] === Symbol.for("react.memo_cache_sentinel")) {
1568
+ t27 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
1569
+ marginTop: 1,
1570
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
1571
+ dimColor: true,
1572
+ children: "When hooks are disabled:"
1573
+ }, undefined, false, undefined, this)
1574
+ }, undefined, false, undefined, this);
1575
+ t28 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
1576
+ dimColor: true,
1577
+ children: "\xB7 No hook commands will execute"
1578
+ }, undefined, false, undefined, this);
1579
+ t29 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
1580
+ dimColor: true,
1581
+ children: "\xB7 StatusLine will not be displayed"
1582
+ }, undefined, false, undefined, this);
1583
+ t30 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
1584
+ dimColor: true,
1585
+ children: "\xB7 Tool operations will proceed without hook validation"
1586
+ }, undefined, false, undefined, this);
1587
+ $[47] = t27;
1588
+ $[48] = t28;
1589
+ $[49] = t29;
1590
+ $[50] = t30;
1591
+ } else {
1592
+ t27 = $[47];
1593
+ t28 = $[48];
1594
+ t29 = $[49];
1595
+ t30 = $[50];
1596
+ }
1597
+ let t31;
1598
+ if ($[51] !== t26) {
1599
+ t31 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
1600
+ flexDirection: "column",
1601
+ children: [
1602
+ t26,
1603
+ t27,
1604
+ t28,
1605
+ t29,
1606
+ t30
1607
+ ]
1608
+ }, undefined, true, undefined, this);
1609
+ $[51] = t26;
1610
+ $[52] = t31;
1611
+ } else {
1612
+ t31 = $[52];
1613
+ }
1614
+ let t32;
1615
+ if ($[53] !== disabledByPolicy) {
1616
+ t32 = !disabledByPolicy && /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
1617
+ dimColor: true,
1618
+ children: 'To re-enable hooks, remove "disableAllHooks" from settings.json or ask Claude.'
1619
+ }, undefined, false, undefined, this);
1620
+ $[53] = disabledByPolicy;
1621
+ $[54] = t32;
1622
+ } else {
1623
+ t32 = $[54];
1624
+ }
1625
+ let t33;
1626
+ if ($[55] !== t31 || $[56] !== t32) {
1627
+ t33 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
1628
+ flexDirection: "column",
1629
+ gap: 1,
1630
+ children: [
1631
+ t31,
1632
+ t32
1633
+ ]
1634
+ }, undefined, true, undefined, this);
1635
+ $[55] = t31;
1636
+ $[56] = t32;
1637
+ $[57] = t33;
1638
+ } else {
1639
+ t33 = $[57];
1640
+ }
1641
+ let t34;
1642
+ if ($[58] !== handleExit || $[59] !== t33) {
1643
+ t34 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Dialog, {
1644
+ title: "Hook Configuration - Disabled",
1645
+ onCancel: handleExit,
1646
+ inputGuide: _temp62,
1647
+ children: t33
1648
+ }, undefined, false, undefined, this);
1649
+ $[58] = handleExit;
1650
+ $[59] = t33;
1651
+ $[60] = t34;
1652
+ } else {
1653
+ t34 = $[60];
1654
+ }
1655
+ return t34;
1656
+ }
1657
+ switch (modeState.mode) {
1658
+ case "select-event": {
1659
+ let t21;
1660
+ if ($[61] !== combinedToolNames) {
1661
+ t21 = (event_2) => {
1662
+ if (getMatcherMetadata(event_2, combinedToolNames) !== undefined) {
1663
+ setModeState({
1664
+ mode: "select-matcher",
1665
+ event: event_2
1666
+ });
1667
+ } else {
1668
+ setModeState({
1669
+ mode: "select-hook",
1670
+ event: event_2,
1671
+ matcher: ""
1672
+ });
1673
+ }
1674
+ };
1675
+ $[61] = combinedToolNames;
1676
+ $[62] = t21;
1677
+ } else {
1678
+ t21 = $[62];
1679
+ }
1680
+ let t22;
1681
+ if ($[63] !== handleExit || $[64] !== hookEventMetadata || $[65] !== hooksByEvent || $[66] !== restrictedByPolicy || $[67] !== t21 || $[68] !== totalHooksCount) {
1682
+ t22 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(SelectEventMode, {
1683
+ hookEventMetadata,
1684
+ hooksByEvent,
1685
+ totalHooksCount,
1686
+ restrictedByPolicy,
1687
+ onSelectEvent: t21,
1688
+ onCancel: handleExit
1689
+ }, undefined, false, undefined, this);
1690
+ $[63] = handleExit;
1691
+ $[64] = hookEventMetadata;
1692
+ $[65] = hooksByEvent;
1693
+ $[66] = restrictedByPolicy;
1694
+ $[67] = t21;
1695
+ $[68] = totalHooksCount;
1696
+ $[69] = t22;
1697
+ } else {
1698
+ t22 = $[69];
1699
+ }
1700
+ return t22;
1701
+ }
1702
+ case "select-matcher": {
1703
+ const t21 = hookEventMetadata[modeState.event];
1704
+ let t22;
1705
+ if ($[70] !== modeState.event) {
1706
+ t22 = (matcher) => {
1707
+ setModeState({
1708
+ mode: "select-hook",
1709
+ event: modeState.event,
1710
+ matcher
1711
+ });
1712
+ };
1713
+ $[70] = modeState.event;
1714
+ $[71] = t22;
1715
+ } else {
1716
+ t22 = $[71];
1717
+ }
1718
+ let t23;
1719
+ if ($[72] === Symbol.for("react.memo_cache_sentinel")) {
1720
+ t23 = () => {
1721
+ setModeState({
1722
+ mode: "select-event"
1723
+ });
1724
+ };
1725
+ $[72] = t23;
1726
+ } else {
1727
+ t23 = $[72];
1728
+ }
1729
+ let t24;
1730
+ if ($[73] !== hooksByEventAndMatcher || $[74] !== modeState.event || $[75] !== sortedMatchersForSelectedEvent || $[76] !== t21.description || $[77] !== t22) {
1731
+ t24 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(SelectMatcherMode, {
1732
+ selectedEvent: modeState.event,
1733
+ matchersForSelectedEvent: sortedMatchersForSelectedEvent,
1734
+ hooksByEventAndMatcher,
1735
+ eventDescription: t21.description,
1736
+ onSelect: t22,
1737
+ onCancel: t23
1738
+ }, undefined, false, undefined, this);
1739
+ $[73] = hooksByEventAndMatcher;
1740
+ $[74] = modeState.event;
1741
+ $[75] = sortedMatchersForSelectedEvent;
1742
+ $[76] = t21.description;
1743
+ $[77] = t22;
1744
+ $[78] = t24;
1745
+ } else {
1746
+ t24 = $[78];
1747
+ }
1748
+ return t24;
1749
+ }
1750
+ case "select-hook": {
1751
+ const t21 = hookEventMetadata[modeState.event];
1752
+ let t22;
1753
+ if ($[79] !== modeState.event) {
1754
+ t22 = (hook_1) => {
1755
+ setModeState({
1756
+ mode: "view-hook",
1757
+ event: modeState.event,
1758
+ hook: hook_1
1759
+ });
1760
+ };
1761
+ $[79] = modeState.event;
1762
+ $[80] = t22;
1763
+ } else {
1764
+ t22 = $[80];
1765
+ }
1766
+ let t23;
1767
+ if ($[81] !== combinedToolNames || $[82] !== modeState.event) {
1768
+ t23 = () => {
1769
+ if (getMatcherMetadata(modeState.event, combinedToolNames) !== undefined) {
1770
+ setModeState({
1771
+ mode: "select-matcher",
1772
+ event: modeState.event
1773
+ });
1774
+ } else {
1775
+ setModeState({
1776
+ mode: "select-event"
1777
+ });
1778
+ }
1779
+ };
1780
+ $[81] = combinedToolNames;
1781
+ $[82] = modeState.event;
1782
+ $[83] = t23;
1783
+ } else {
1784
+ t23 = $[83];
1785
+ }
1786
+ let t24;
1787
+ if ($[84] !== hooksForSelectedMatcher || $[85] !== modeState.event || $[86] !== modeState.matcher || $[87] !== t21 || $[88] !== t22 || $[89] !== t23) {
1788
+ t24 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(SelectHookMode, {
1789
+ selectedEvent: modeState.event,
1790
+ selectedMatcher: modeState.matcher,
1791
+ hooksForSelectedMatcher,
1792
+ hookEventMetadata: t21,
1793
+ onSelect: t22,
1794
+ onCancel: t23
1795
+ }, undefined, false, undefined, this);
1796
+ $[84] = hooksForSelectedMatcher;
1797
+ $[85] = modeState.event;
1798
+ $[86] = modeState.matcher;
1799
+ $[87] = t21;
1800
+ $[88] = t22;
1801
+ $[89] = t23;
1802
+ $[90] = t24;
1803
+ } else {
1804
+ t24 = $[90];
1805
+ }
1806
+ return t24;
1807
+ }
1808
+ case "view-hook": {
1809
+ const t21 = modeState.hook;
1810
+ let t22;
1811
+ if ($[91] !== combinedToolNames || $[92] !== modeState.event) {
1812
+ t22 = getMatcherMetadata(modeState.event, combinedToolNames);
1813
+ $[91] = combinedToolNames;
1814
+ $[92] = modeState.event;
1815
+ $[93] = t22;
1816
+ } else {
1817
+ t22 = $[93];
1818
+ }
1819
+ const t23 = t22 !== undefined;
1820
+ let t24;
1821
+ if ($[94] !== modeState) {
1822
+ t24 = () => {
1823
+ const {
1824
+ event: event_1,
1825
+ hook: hook_0
1826
+ } = modeState;
1827
+ setModeState({
1828
+ mode: "select-hook",
1829
+ event: event_1,
1830
+ matcher: hook_0.matcher || ""
1831
+ });
1832
+ };
1833
+ $[94] = modeState;
1834
+ $[95] = t24;
1835
+ } else {
1836
+ t24 = $[95];
1837
+ }
1838
+ let t25;
1839
+ if ($[96] !== modeState.hook || $[97] !== t23 || $[98] !== t24) {
1840
+ t25 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ViewHookMode, {
1841
+ selectedHook: t21,
1842
+ eventSupportsMatcher: t23,
1843
+ onCancel: t24
1844
+ }, undefined, false, undefined, this);
1845
+ $[96] = modeState.hook;
1846
+ $[97] = t23;
1847
+ $[98] = t24;
1848
+ $[99] = t25;
1849
+ } else {
1850
+ t25 = $[99];
1851
+ }
1852
+ return t25;
1853
+ }
1854
+ }
1855
+ }
1856
+ function _temp62() {
1857
+ return /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
1858
+ children: "Esc to close"
1859
+ }, undefined, false, undefined, this);
1860
+ }
1861
+ function _temp5(sum, hooks) {
1862
+ return sum + hooks.length;
1863
+ }
1864
+ function _temp42(tool) {
1865
+ return tool.name;
1866
+ }
1867
+ function _temp32(s) {
1868
+ return s.mcp;
1869
+ }
1870
+ function _temp23() {
1871
+ return getSettingsForSource("policySettings")?.allowManagedHooksOnly === true;
1872
+ }
1873
+ function _temp7() {
1874
+ const settings = getSettings_DEPRECATED();
1875
+ const hooksDisabled = settings?.disableAllHooks === true;
1876
+ return hooksDisabled && getSettingsForSource("policySettings")?.disableAllHooks === true;
1877
+ }
1878
+ var import_compiler_runtime5, import_react, jsx_dev_runtime5;
1879
+ var init_HooksConfigMenu = __esm(() => {
1880
+ init_AppState();
1881
+ init_useSettingsChange();
1882
+ init_ink();
1883
+ init_useKeybinding();
1884
+ init_hooksConfigManager();
1885
+ init_settings();
1886
+ init_stringUtils();
1887
+ init_Dialog();
1888
+ init_SelectEventMode();
1889
+ init_SelectHookMode();
1890
+ init_SelectMatcherMode();
1891
+ init_ViewHookMode();
1892
+ import_compiler_runtime5 = __toESM(require_compiler_runtime(), 1);
1893
+ import_react = __toESM(require_react(), 1);
1894
+ jsx_dev_runtime5 = __toESM(require_jsx_dev_runtime(), 1);
1895
+ });
1896
+
1897
+ // src/commands/hooks/hooks.tsx
1898
+ var jsx_dev_runtime6, call = async (onDone, context) => {
1899
+ logEvent("tengu_hooks_command", {});
1900
+ const appState = context.getAppState();
1901
+ const permissionContext = appState.toolPermissionContext;
1902
+ const toolNames = getTools(permissionContext).map((tool) => tool.name);
1903
+ return /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(HooksConfigMenu, {
1904
+ toolNames,
1905
+ onExit: onDone
1906
+ }, undefined, false, undefined, this);
1907
+ };
1908
+ var init_hooks = __esm(() => {
1909
+ init_HooksConfigMenu();
1910
+ init_analytics();
1911
+ init_tools();
1912
+ jsx_dev_runtime6 = __toESM(require_jsx_dev_runtime(), 1);
1913
+ });
1914
+ init_hooks();
1915
+
1916
+ export {
1917
+ call
1918
+ };