@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,2641 @@
1
+ // @bun
2
+ import {
3
+ getAutoModeDenials,
4
+ init_autoModeDenials
5
+ } from "./chunk-0paqc2yw.js";
6
+ import {
7
+ SearchBox,
8
+ init_SearchBox,
9
+ init_useSearchInput,
10
+ useSearchInput
11
+ } from "./chunk-1fvkskfd.js";
12
+ import {
13
+ Tab,
14
+ Tabs,
15
+ init_Tabs,
16
+ useTabHeaderFocus,
17
+ useTabsWidth
18
+ } from "./chunk-z3hcj5gd.js";
19
+ import {
20
+ StatusIcon,
21
+ init_StatusIcon
22
+ } from "./chunk-xms0cc06.js";
23
+ import {
24
+ detectUnreachableRules,
25
+ init_shadowedRuleDetection
26
+ } from "./chunk-tm70zjhw.js";
27
+ import {
28
+ AddWorkspaceDirectory,
29
+ init_AddWorkspaceDirectory
30
+ } from "./chunk-sgy4bnyd.js";
31
+ import"./chunk-w7wgpqcp.js";
32
+ import"./chunk-ntfnwa7w.js";
33
+ import"./chunk-04he5cyw.js";
34
+ import {
35
+ BashTool,
36
+ SandboxManager,
37
+ Select,
38
+ TextInput,
39
+ WebFetchTool,
40
+ applyPermissionUpdate,
41
+ createPermissionRetryMessage,
42
+ deletePermissionRule,
43
+ getAllowRules,
44
+ getAskRules,
45
+ getDenyRules,
46
+ init_AppState,
47
+ init_BashTool,
48
+ init_PermissionUpdate,
49
+ init_TextInput,
50
+ init_WebFetchTool,
51
+ init_messages1 as init_messages,
52
+ init_permissions,
53
+ init_sandbox_adapter,
54
+ init_select,
55
+ permissionRuleSourceDisplayString,
56
+ persistPermissionUpdate,
57
+ useAppState,
58
+ useSetAppState
59
+ } from "./chunk-363p49h1.js";
60
+ import"./chunk-14cmss9n.js";
61
+ import"./chunk-t0rgmccj.js";
62
+ import"./chunk-2n877dxb.js";
63
+ import"./chunk-cc15x0zt.js";
64
+ import"./chunk-7ke2txc2.js";
65
+ import"./chunk-t0zcygwt.js";
66
+ import {
67
+ Dialog,
68
+ init_Dialog
69
+ } from "./chunk-dmqarh6q.js";
70
+ import"./chunk-ehtwnxpg.js";
71
+ import"./chunk-3be7ka25.js";
72
+ import"./chunk-nymbd7tw.js";
73
+ import"./chunk-2gzv8nrw.js";
74
+ import"./chunk-45kxdsp8.js";
75
+ import"./chunk-cgfdkzhb.js";
76
+ import"./chunk-5ctt9z6m.js";
77
+ import {
78
+ init_useExitOnCtrlCDWithKeybindings,
79
+ useExitOnCtrlCDWithKeybindings
80
+ } from "./chunk-z9w0ffmw.js";
81
+ import"./chunk-9gbamk79.js";
82
+ import"./chunk-4cptw4qa.js";
83
+ import"./chunk-hfzj1m07.js";
84
+ import {
85
+ Pane,
86
+ init_Pane,
87
+ init_useKeybinding,
88
+ init_useTerminalSize,
89
+ useKeybinding,
90
+ useTerminalSize
91
+ } from "./chunk-jxgm95zx.js";
92
+ import {
93
+ Newline,
94
+ ThemedBox_default,
95
+ ThemedText,
96
+ init_ink,
97
+ require_compiler_runtime,
98
+ useTerminalFocus,
99
+ use_input_default
100
+ } from "./chunk-nswqqqdd.js";
101
+ import"./chunk-7m2nd8da.js";
102
+ import"./chunk-ps49ymvj.js";
103
+ import {
104
+ require_jsx_dev_runtime,
105
+ require_react
106
+ } from "./chunk-g338npwr.js";
107
+ import"./chunk-pxjqgrdk.js";
108
+ import"./chunk-zk2wsm7d.js";
109
+ import"./chunk-7wj3b774.js";
110
+ import"./chunk-m06q12hg.js";
111
+ import"./chunk-w9k8zntt.js";
112
+ import {
113
+ SOURCES,
114
+ getRelativeSettingsFilePathForSource,
115
+ init_constants,
116
+ init_permissionRuleParser,
117
+ init_settings1 as init_settings,
118
+ init_source,
119
+ init_stringUtils,
120
+ permissionRuleValueFromString,
121
+ permissionRuleValueToString,
122
+ plural,
123
+ source_default
124
+ } from "./chunk-skctedsv.js";
125
+ import"./chunk-e3g8q4cn.js";
126
+ import"./chunk-ctw5jwcd.js";
127
+ import"./chunk-vratq94g.js";
128
+ import"./chunk-rvqtbt9h.js";
129
+ import"./chunk-0e1xsncc.js";
130
+ import"./chunk-g0j0t6qk.js";
131
+ import"./chunk-3c25bcsw.js";
132
+ import"./chunk-tjaqa99q.js";
133
+ import"./chunk-55wgxwa9.js";
134
+ import"./chunk-spqaamnc.js";
135
+ import"./chunk-4jm600zv.js";
136
+ import"./chunk-w2z5pqd3.js";
137
+ import"./chunk-7ymfj7m3.js";
138
+ import"./chunk-f5ma3nh5.js";
139
+ import"./chunk-qz2x630m.js";
140
+ import"./chunk-cvge4pvp.js";
141
+ import"./chunk-p2816w9z.js";
142
+ import"./chunk-v9smspw2.js";
143
+ import"./chunk-v1kzp02e.js";
144
+ import"./chunk-0vkfrmqm.js";
145
+ import"./chunk-0xjaqda8.js";
146
+ import"./chunk-x14dq3v1.js";
147
+ import"./chunk-cdz5yb0r.js";
148
+ import"./chunk-h0rbjg6x.js";
149
+ import"./chunk-7z8j9qfn.js";
150
+ import"./chunk-hrzerbfw.js";
151
+ import"./chunk-d18z9pna.js";
152
+ import"./chunk-qnfx3qtx.js";
153
+ import"./chunk-hjhc4cpt.js";
154
+ import"./chunk-vyc0rjyx.js";
155
+ import {
156
+ figures_default,
157
+ init_figures
158
+ } from "./chunk-hx2tr4ep.js";
159
+ import"./chunk-p7g7pf3f.js";
160
+ import"./chunk-8tnsngw2.js";
161
+ import"./chunk-8bedvdm1.js";
162
+ import"./chunk-7wm5s02e.js";
163
+ import {
164
+ init_slowOperations,
165
+ jsonStringify
166
+ } from "./chunk-nxsh6de2.js";
167
+ import"./chunk-fbv4apne.js";
168
+ import"./chunk-3r24h7t6.js";
169
+ import {
170
+ getOriginalCwd,
171
+ init_state
172
+ } from "./chunk-qqfa0dqg.js";
173
+ import"./chunk-hqmz36b3.js";
174
+ import"./chunk-4g3v8y12.js";
175
+ import"./chunk-7739pg2c.js";
176
+ import"./chunk-xszk7n10.js";
177
+ import"./chunk-sdj9b9wh.js";
178
+ import {
179
+ __esm,
180
+ __toESM
181
+ } from "./chunk-qp2qdcda.js";
182
+
183
+ // src/components/permissions/rules/PermissionRuleDescription.tsx
184
+ function PermissionRuleDescription(t0) {
185
+ const $ = import_compiler_runtime.c(9);
186
+ const {
187
+ ruleValue
188
+ } = t0;
189
+ switch (ruleValue.toolName) {
190
+ case BashTool.name: {
191
+ if (ruleValue.ruleContent) {
192
+ if (ruleValue.ruleContent.endsWith(":*")) {
193
+ let t1;
194
+ if ($[0] !== ruleValue.ruleContent) {
195
+ t1 = ruleValue.ruleContent.slice(0, -2);
196
+ $[0] = ruleValue.ruleContent;
197
+ $[1] = t1;
198
+ } else {
199
+ t1 = $[1];
200
+ }
201
+ let t2;
202
+ if ($[2] !== t1) {
203
+ t2 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
204
+ dimColor: true,
205
+ children: [
206
+ "Any Bash command starting with",
207
+ " ",
208
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
209
+ bold: true,
210
+ children: t1
211
+ }, undefined, false, undefined, this)
212
+ ]
213
+ }, undefined, true, undefined, this);
214
+ $[2] = t1;
215
+ $[3] = t2;
216
+ } else {
217
+ t2 = $[3];
218
+ }
219
+ return t2;
220
+ } else {
221
+ let t1;
222
+ if ($[4] !== ruleValue.ruleContent) {
223
+ t1 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
224
+ dimColor: true,
225
+ children: [
226
+ "The Bash command ",
227
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
228
+ bold: true,
229
+ children: ruleValue.ruleContent
230
+ }, undefined, false, undefined, this)
231
+ ]
232
+ }, undefined, true, undefined, this);
233
+ $[4] = ruleValue.ruleContent;
234
+ $[5] = t1;
235
+ } else {
236
+ t1 = $[5];
237
+ }
238
+ return t1;
239
+ }
240
+ } else {
241
+ let t1;
242
+ if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
243
+ t1 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
244
+ dimColor: true,
245
+ children: "Any Bash command"
246
+ }, undefined, false, undefined, this);
247
+ $[6] = t1;
248
+ } else {
249
+ t1 = $[6];
250
+ }
251
+ return t1;
252
+ }
253
+ }
254
+ default: {
255
+ if (!ruleValue.ruleContent) {
256
+ let t1;
257
+ if ($[7] !== ruleValue.toolName) {
258
+ t1 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
259
+ dimColor: true,
260
+ children: [
261
+ "Any use of the ",
262
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
263
+ bold: true,
264
+ children: ruleValue.toolName
265
+ }, undefined, false, undefined, this),
266
+ " tool"
267
+ ]
268
+ }, undefined, true, undefined, this);
269
+ $[7] = ruleValue.toolName;
270
+ $[8] = t1;
271
+ } else {
272
+ t1 = $[8];
273
+ }
274
+ return t1;
275
+ } else {
276
+ return null;
277
+ }
278
+ }
279
+ }
280
+ }
281
+ var import_compiler_runtime, jsx_dev_runtime;
282
+ var init_PermissionRuleDescription = __esm(() => {
283
+ init_ink();
284
+ init_BashTool();
285
+ import_compiler_runtime = __toESM(require_compiler_runtime(), 1);
286
+ jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
287
+ });
288
+
289
+ // src/components/permissions/rules/AddPermissionRules.tsx
290
+ function optionForPermissionSaveDestination(saveDestination) {
291
+ switch (saveDestination) {
292
+ case "localSettings":
293
+ return {
294
+ label: "Project settings (local)",
295
+ description: `Saved in ${getRelativeSettingsFilePathForSource("localSettings")}`,
296
+ value: saveDestination
297
+ };
298
+ case "projectSettings":
299
+ return {
300
+ label: "Project settings",
301
+ description: `Checked in at ${getRelativeSettingsFilePathForSource("projectSettings")}`,
302
+ value: saveDestination
303
+ };
304
+ case "userSettings":
305
+ return {
306
+ label: "User settings",
307
+ description: `Saved in at ~/.claude/settings.json`,
308
+ value: saveDestination
309
+ };
310
+ }
311
+ }
312
+ function AddPermissionRules(t0) {
313
+ const $ = import_compiler_runtime2.c(26);
314
+ const {
315
+ onAddRules,
316
+ onCancel,
317
+ ruleValues,
318
+ ruleBehavior,
319
+ initialContext,
320
+ setToolPermissionContext
321
+ } = t0;
322
+ let t1;
323
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
324
+ t1 = SOURCES.map(optionForPermissionSaveDestination);
325
+ $[0] = t1;
326
+ } else {
327
+ t1 = $[0];
328
+ }
329
+ const allOptions = t1;
330
+ let t2;
331
+ if ($[1] !== initialContext || $[2] !== onAddRules || $[3] !== onCancel || $[4] !== ruleBehavior || $[5] !== ruleValues || $[6] !== setToolPermissionContext) {
332
+ t2 = (selectedValue) => {
333
+ if (selectedValue === "cancel") {
334
+ onCancel();
335
+ return;
336
+ } else {
337
+ if (SOURCES.includes(selectedValue)) {
338
+ const destination = selectedValue;
339
+ const updatedContext = applyPermissionUpdate(initialContext, {
340
+ type: "addRules",
341
+ rules: ruleValues,
342
+ behavior: ruleBehavior,
343
+ destination
344
+ });
345
+ persistPermissionUpdate({
346
+ type: "addRules",
347
+ rules: ruleValues,
348
+ behavior: ruleBehavior,
349
+ destination
350
+ });
351
+ setToolPermissionContext(updatedContext);
352
+ const rules = ruleValues.map((ruleValue) => ({
353
+ ruleValue,
354
+ ruleBehavior,
355
+ source: destination
356
+ }));
357
+ const sandboxAutoAllowEnabled = SandboxManager.isSandboxingEnabled() && SandboxManager.isAutoAllowBashIfSandboxedEnabled();
358
+ const allUnreachable = detectUnreachableRules(updatedContext, {
359
+ sandboxAutoAllowEnabled
360
+ });
361
+ const newUnreachable = allUnreachable.filter((u) => ruleValues.some((rv) => rv.toolName === u.rule.ruleValue.toolName && rv.ruleContent === u.rule.ruleValue.ruleContent));
362
+ onAddRules(rules, newUnreachable.length > 0 ? newUnreachable : undefined);
363
+ }
364
+ }
365
+ };
366
+ $[1] = initialContext;
367
+ $[2] = onAddRules;
368
+ $[3] = onCancel;
369
+ $[4] = ruleBehavior;
370
+ $[5] = ruleValues;
371
+ $[6] = setToolPermissionContext;
372
+ $[7] = t2;
373
+ } else {
374
+ t2 = $[7];
375
+ }
376
+ const onSelect = t2;
377
+ let t3;
378
+ if ($[8] !== ruleValues.length) {
379
+ t3 = plural(ruleValues.length, "rule");
380
+ $[8] = ruleValues.length;
381
+ $[9] = t3;
382
+ } else {
383
+ t3 = $[9];
384
+ }
385
+ const title = `Add ${ruleBehavior} permission ${t3}`;
386
+ let t4;
387
+ if ($[10] !== ruleValues) {
388
+ t4 = ruleValues.map(_temp);
389
+ $[10] = ruleValues;
390
+ $[11] = t4;
391
+ } else {
392
+ t4 = $[11];
393
+ }
394
+ let t5;
395
+ if ($[12] !== t4) {
396
+ t5 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
397
+ flexDirection: "column",
398
+ paddingX: 2,
399
+ children: t4
400
+ }, undefined, false, undefined, this);
401
+ $[12] = t4;
402
+ $[13] = t5;
403
+ } else {
404
+ t5 = $[13];
405
+ }
406
+ const t6 = ruleValues.length === 1 ? "Where should this rule be saved?" : "Where should these rules be saved?";
407
+ let t7;
408
+ if ($[14] !== t6) {
409
+ t7 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
410
+ children: t6
411
+ }, undefined, false, undefined, this);
412
+ $[14] = t6;
413
+ $[15] = t7;
414
+ } else {
415
+ t7 = $[15];
416
+ }
417
+ let t8;
418
+ if ($[16] !== onSelect) {
419
+ t8 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Select, {
420
+ options: allOptions,
421
+ onChange: onSelect
422
+ }, undefined, false, undefined, this);
423
+ $[16] = onSelect;
424
+ $[17] = t8;
425
+ } else {
426
+ t8 = $[17];
427
+ }
428
+ let t9;
429
+ if ($[18] !== t7 || $[19] !== t8) {
430
+ t9 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
431
+ flexDirection: "column",
432
+ marginY: 1,
433
+ children: [
434
+ t7,
435
+ t8
436
+ ]
437
+ }, undefined, true, undefined, this);
438
+ $[18] = t7;
439
+ $[19] = t8;
440
+ $[20] = t9;
441
+ } else {
442
+ t9 = $[20];
443
+ }
444
+ let t10;
445
+ if ($[21] !== onCancel || $[22] !== t5 || $[23] !== t9 || $[24] !== title) {
446
+ t10 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Dialog, {
447
+ title,
448
+ onCancel,
449
+ color: "permission",
450
+ children: [
451
+ t5,
452
+ t9
453
+ ]
454
+ }, undefined, true, undefined, this);
455
+ $[21] = onCancel;
456
+ $[22] = t5;
457
+ $[23] = t9;
458
+ $[24] = title;
459
+ $[25] = t10;
460
+ } else {
461
+ t10 = $[25];
462
+ }
463
+ return t10;
464
+ }
465
+ function _temp(ruleValue_0) {
466
+ return /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
467
+ flexDirection: "column",
468
+ children: [
469
+ /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
470
+ bold: true,
471
+ children: permissionRuleValueToString(ruleValue_0)
472
+ }, undefined, false, undefined, this),
473
+ /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(PermissionRuleDescription, {
474
+ ruleValue: ruleValue_0
475
+ }, undefined, false, undefined, this)
476
+ ]
477
+ }, permissionRuleValueToString(ruleValue_0), true, undefined, this);
478
+ }
479
+ var import_compiler_runtime2, jsx_dev_runtime2;
480
+ var init_AddPermissionRules = __esm(() => {
481
+ init_select();
482
+ init_ink();
483
+ init_PermissionUpdate();
484
+ init_permissionRuleParser();
485
+ init_shadowedRuleDetection();
486
+ init_sandbox_adapter();
487
+ init_constants();
488
+ init_settings();
489
+ init_stringUtils();
490
+ init_Dialog();
491
+ init_PermissionRuleDescription();
492
+ import_compiler_runtime2 = __toESM(require_compiler_runtime(), 1);
493
+ jsx_dev_runtime2 = __toESM(require_jsx_dev_runtime(), 1);
494
+ });
495
+
496
+ // src/components/permissions/rules/PermissionRuleInput.tsx
497
+ function PermissionRuleInput(t0) {
498
+ const $ = import_compiler_runtime3.c(24);
499
+ const {
500
+ onCancel,
501
+ onSubmit,
502
+ ruleBehavior
503
+ } = t0;
504
+ const [inputValue, setInputValue] = import_react.useState("");
505
+ const [cursorOffset, setCursorOffset] = import_react.useState(0);
506
+ const exitState = useExitOnCtrlCDWithKeybindings();
507
+ let t1;
508
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
509
+ t1 = {
510
+ context: "Settings"
511
+ };
512
+ $[0] = t1;
513
+ } else {
514
+ t1 = $[0];
515
+ }
516
+ useKeybinding("confirm:no", onCancel, t1);
517
+ const {
518
+ columns
519
+ } = useTerminalSize();
520
+ const textInputColumns = columns - 6;
521
+ let t2;
522
+ if ($[1] !== onSubmit || $[2] !== ruleBehavior) {
523
+ t2 = (value) => {
524
+ const trimmedValue = value.trim();
525
+ if (trimmedValue.length === 0) {
526
+ return;
527
+ }
528
+ const ruleValue = permissionRuleValueFromString(trimmedValue);
529
+ onSubmit(ruleValue, ruleBehavior);
530
+ };
531
+ $[1] = onSubmit;
532
+ $[2] = ruleBehavior;
533
+ $[3] = t2;
534
+ } else {
535
+ t2 = $[3];
536
+ }
537
+ const handleSubmit = t2;
538
+ let t3;
539
+ if ($[4] !== ruleBehavior) {
540
+ t3 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
541
+ bold: true,
542
+ color: "permission",
543
+ children: [
544
+ "Add ",
545
+ ruleBehavior,
546
+ " permission rule"
547
+ ]
548
+ }, undefined, true, undefined, this);
549
+ $[4] = ruleBehavior;
550
+ $[5] = t3;
551
+ } else {
552
+ t3 = $[5];
553
+ }
554
+ let t4;
555
+ if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
556
+ t4 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Newline, {}, undefined, false, undefined, this);
557
+ $[6] = t4;
558
+ } else {
559
+ t4 = $[6];
560
+ }
561
+ let t5;
562
+ let t6;
563
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
564
+ t5 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
565
+ bold: true,
566
+ children: permissionRuleValueToString({
567
+ toolName: WebFetchTool.name
568
+ })
569
+ }, undefined, false, undefined, this);
570
+ t6 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
571
+ bold: false,
572
+ children: " or "
573
+ }, undefined, false, undefined, this);
574
+ $[7] = t5;
575
+ $[8] = t6;
576
+ } else {
577
+ t5 = $[7];
578
+ t6 = $[8];
579
+ }
580
+ let t7;
581
+ if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
582
+ t7 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
583
+ children: [
584
+ "Permission rules are a tool name, optionally followed by a specifier in parentheses.",
585
+ t4,
586
+ "e.g.,",
587
+ " ",
588
+ t5,
589
+ t6,
590
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
591
+ bold: true,
592
+ children: permissionRuleValueToString({
593
+ toolName: BashTool.name,
594
+ ruleContent: "ls:*"
595
+ })
596
+ }, undefined, false, undefined, this)
597
+ ]
598
+ }, undefined, true, undefined, this);
599
+ $[9] = t7;
600
+ } else {
601
+ t7 = $[9];
602
+ }
603
+ let t8;
604
+ if ($[10] !== cursorOffset || $[11] !== handleSubmit || $[12] !== inputValue || $[13] !== textInputColumns) {
605
+ t8 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
606
+ flexDirection: "column",
607
+ children: [
608
+ t7,
609
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
610
+ borderDimColor: true,
611
+ borderStyle: "round",
612
+ marginY: 1,
613
+ paddingLeft: 1,
614
+ children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(TextInput, {
615
+ showCursor: true,
616
+ value: inputValue,
617
+ onChange: setInputValue,
618
+ onSubmit: handleSubmit,
619
+ placeholder: `Enter permission rule${figures_default.ellipsis}`,
620
+ columns: textInputColumns,
621
+ cursorOffset,
622
+ onChangeCursorOffset: setCursorOffset
623
+ }, undefined, false, undefined, this)
624
+ }, undefined, false, undefined, this)
625
+ ]
626
+ }, undefined, true, undefined, this);
627
+ $[10] = cursorOffset;
628
+ $[11] = handleSubmit;
629
+ $[12] = inputValue;
630
+ $[13] = textInputColumns;
631
+ $[14] = t8;
632
+ } else {
633
+ t8 = $[14];
634
+ }
635
+ let t9;
636
+ if ($[15] !== t3 || $[16] !== t8) {
637
+ t9 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
638
+ flexDirection: "column",
639
+ gap: 1,
640
+ borderStyle: "round",
641
+ paddingLeft: 1,
642
+ paddingRight: 1,
643
+ borderColor: "permission",
644
+ children: [
645
+ t3,
646
+ t8
647
+ ]
648
+ }, undefined, true, undefined, this);
649
+ $[15] = t3;
650
+ $[16] = t8;
651
+ $[17] = t9;
652
+ } else {
653
+ t9 = $[17];
654
+ }
655
+ let t10;
656
+ if ($[18] !== exitState.keyName || $[19] !== exitState.pending) {
657
+ t10 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
658
+ marginLeft: 3,
659
+ children: exitState.pending ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
660
+ dimColor: true,
661
+ children: [
662
+ "Press ",
663
+ exitState.keyName,
664
+ " again to exit"
665
+ ]
666
+ }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
667
+ dimColor: true,
668
+ children: "Enter to submit \xB7 Esc to cancel"
669
+ }, undefined, false, undefined, this)
670
+ }, undefined, false, undefined, this);
671
+ $[18] = exitState.keyName;
672
+ $[19] = exitState.pending;
673
+ $[20] = t10;
674
+ } else {
675
+ t10 = $[20];
676
+ }
677
+ let t11;
678
+ if ($[21] !== t10 || $[22] !== t9) {
679
+ t11 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(jsx_dev_runtime3.Fragment, {
680
+ children: [
681
+ t9,
682
+ t10
683
+ ]
684
+ }, undefined, true, undefined, this);
685
+ $[21] = t10;
686
+ $[22] = t9;
687
+ $[23] = t11;
688
+ } else {
689
+ t11 = $[23];
690
+ }
691
+ return t11;
692
+ }
693
+ var import_compiler_runtime3, import_react, jsx_dev_runtime3;
694
+ var init_PermissionRuleInput = __esm(() => {
695
+ init_figures();
696
+ init_TextInput();
697
+ init_useExitOnCtrlCDWithKeybindings();
698
+ init_useTerminalSize();
699
+ init_ink();
700
+ init_useKeybinding();
701
+ init_BashTool();
702
+ init_WebFetchTool();
703
+ init_permissionRuleParser();
704
+ import_compiler_runtime3 = __toESM(require_compiler_runtime(), 1);
705
+ import_react = __toESM(require_react(), 1);
706
+ jsx_dev_runtime3 = __toESM(require_jsx_dev_runtime(), 1);
707
+ });
708
+
709
+ // src/components/permissions/rules/RecentDenialsTab.tsx
710
+ function RecentDenialsTab(t0) {
711
+ const $ = import_compiler_runtime4.c(30);
712
+ const {
713
+ onHeaderFocusChange,
714
+ onStateChange
715
+ } = t0;
716
+ const {
717
+ headerFocused,
718
+ focusHeader
719
+ } = useTabHeaderFocus();
720
+ let t1;
721
+ let t2;
722
+ if ($[0] !== headerFocused || $[1] !== onHeaderFocusChange) {
723
+ t1 = () => {
724
+ onHeaderFocusChange?.(headerFocused);
725
+ };
726
+ t2 = [headerFocused, onHeaderFocusChange];
727
+ $[0] = headerFocused;
728
+ $[1] = onHeaderFocusChange;
729
+ $[2] = t1;
730
+ $[3] = t2;
731
+ } else {
732
+ t1 = $[2];
733
+ t2 = $[3];
734
+ }
735
+ import_react2.useEffect(t1, t2);
736
+ const [denials] = import_react2.useState(_temp4);
737
+ const [approved, setApproved] = import_react2.useState(_temp2);
738
+ const [retry, setRetry] = import_react2.useState(_temp3);
739
+ const [focusedIdx, setFocusedIdx] = import_react2.useState(0);
740
+ let t3;
741
+ let t4;
742
+ if ($[4] !== approved || $[5] !== denials || $[6] !== onStateChange || $[7] !== retry) {
743
+ t3 = () => {
744
+ onStateChange({
745
+ approved,
746
+ retry,
747
+ denials
748
+ });
749
+ };
750
+ t4 = [approved, retry, denials, onStateChange];
751
+ $[4] = approved;
752
+ $[5] = denials;
753
+ $[6] = onStateChange;
754
+ $[7] = retry;
755
+ $[8] = t3;
756
+ $[9] = t4;
757
+ } else {
758
+ t3 = $[8];
759
+ t4 = $[9];
760
+ }
761
+ import_react2.useEffect(t3, t4);
762
+ let t5;
763
+ if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
764
+ t5 = (value) => {
765
+ const idx = Number(value);
766
+ setApproved((prev) => {
767
+ const next = new Set(prev);
768
+ if (next.has(idx)) {
769
+ next.delete(idx);
770
+ } else {
771
+ next.add(idx);
772
+ }
773
+ return next;
774
+ });
775
+ };
776
+ $[10] = t5;
777
+ } else {
778
+ t5 = $[10];
779
+ }
780
+ const handleSelect = t5;
781
+ let t6;
782
+ if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
783
+ t6 = (value_0) => {
784
+ setFocusedIdx(Number(value_0));
785
+ };
786
+ $[11] = t6;
787
+ } else {
788
+ t6 = $[11];
789
+ }
790
+ const handleFocus = t6;
791
+ let t7;
792
+ if ($[12] !== focusedIdx) {
793
+ t7 = (input, _key) => {
794
+ if (input === "r") {
795
+ setRetry((prev_0) => {
796
+ const next_0 = new Set(prev_0);
797
+ if (next_0.has(focusedIdx)) {
798
+ next_0.delete(focusedIdx);
799
+ } else {
800
+ next_0.add(focusedIdx);
801
+ }
802
+ return next_0;
803
+ });
804
+ setApproved((prev_1) => {
805
+ if (prev_1.has(focusedIdx)) {
806
+ return prev_1;
807
+ }
808
+ const next_1 = new Set(prev_1);
809
+ next_1.add(focusedIdx);
810
+ return next_1;
811
+ });
812
+ }
813
+ };
814
+ $[12] = focusedIdx;
815
+ $[13] = t7;
816
+ } else {
817
+ t7 = $[13];
818
+ }
819
+ const t8 = denials.length > 0;
820
+ let t9;
821
+ if ($[14] !== t8) {
822
+ t9 = {
823
+ isActive: t8
824
+ };
825
+ $[14] = t8;
826
+ $[15] = t9;
827
+ } else {
828
+ t9 = $[15];
829
+ }
830
+ use_input_default(t7, t9);
831
+ if (denials.length === 0) {
832
+ let t102;
833
+ if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
834
+ t102 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
835
+ dimColor: true,
836
+ children: "No recent denials. Commands denied by the auto mode classifier will appear here."
837
+ }, undefined, false, undefined, this);
838
+ $[16] = t102;
839
+ } else {
840
+ t102 = $[16];
841
+ }
842
+ return t102;
843
+ }
844
+ let t10;
845
+ if ($[17] !== approved || $[18] !== denials || $[19] !== retry) {
846
+ let t112;
847
+ if ($[21] !== approved || $[22] !== retry) {
848
+ t112 = (d, idx_0) => {
849
+ const isApproved = approved.has(idx_0);
850
+ const suffix = retry.has(idx_0) ? " (retry)" : "";
851
+ return {
852
+ label: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
853
+ children: [
854
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(StatusIcon, {
855
+ status: isApproved ? "success" : "error",
856
+ withSpace: true
857
+ }, undefined, false, undefined, this),
858
+ d.display,
859
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
860
+ dimColor: true,
861
+ children: suffix
862
+ }, undefined, false, undefined, this)
863
+ ]
864
+ }, undefined, true, undefined, this),
865
+ value: String(idx_0)
866
+ };
867
+ };
868
+ $[21] = approved;
869
+ $[22] = retry;
870
+ $[23] = t112;
871
+ } else {
872
+ t112 = $[23];
873
+ }
874
+ t10 = denials.map(t112);
875
+ $[17] = approved;
876
+ $[18] = denials;
877
+ $[19] = retry;
878
+ $[20] = t10;
879
+ } else {
880
+ t10 = $[20];
881
+ }
882
+ const options = t10;
883
+ let t11;
884
+ if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
885
+ t11 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
886
+ children: "Commands recently denied by the auto mode classifier."
887
+ }, undefined, false, undefined, this);
888
+ $[24] = t11;
889
+ } else {
890
+ t11 = $[24];
891
+ }
892
+ const t12 = Math.min(10, options.length);
893
+ let t13;
894
+ if ($[25] !== focusHeader || $[26] !== headerFocused || $[27] !== options || $[28] !== t12) {
895
+ t13 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
896
+ flexDirection: "column",
897
+ children: [
898
+ t11,
899
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
900
+ marginTop: 1,
901
+ children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Select, {
902
+ options,
903
+ onChange: handleSelect,
904
+ onFocus: handleFocus,
905
+ visibleOptionCount: t12,
906
+ isDisabled: headerFocused,
907
+ onUpFromFirstItem: focusHeader
908
+ }, undefined, false, undefined, this)
909
+ }, undefined, false, undefined, this)
910
+ ]
911
+ }, undefined, true, undefined, this);
912
+ $[25] = focusHeader;
913
+ $[26] = headerFocused;
914
+ $[27] = options;
915
+ $[28] = t12;
916
+ $[29] = t13;
917
+ } else {
918
+ t13 = $[29];
919
+ }
920
+ return t13;
921
+ }
922
+ function _temp3() {
923
+ return new Set;
924
+ }
925
+ function _temp2() {
926
+ return new Set;
927
+ }
928
+ function _temp4() {
929
+ return getAutoModeDenials();
930
+ }
931
+ var import_compiler_runtime4, import_react2, jsx_dev_runtime4;
932
+ var init_RecentDenialsTab = __esm(() => {
933
+ init_ink();
934
+ init_autoModeDenials();
935
+ init_select();
936
+ init_StatusIcon();
937
+ init_Tabs();
938
+ import_compiler_runtime4 = __toESM(require_compiler_runtime(), 1);
939
+ import_react2 = __toESM(require_react(), 1);
940
+ jsx_dev_runtime4 = __toESM(require_jsx_dev_runtime(), 1);
941
+ });
942
+
943
+ // src/components/permissions/rules/RemoveWorkspaceDirectory.tsx
944
+ function RemoveWorkspaceDirectory(t0) {
945
+ const $ = import_compiler_runtime5.c(19);
946
+ const {
947
+ directoryPath,
948
+ onRemove,
949
+ onCancel,
950
+ permissionContext,
951
+ setPermissionContext
952
+ } = t0;
953
+ let t1;
954
+ if ($[0] !== directoryPath || $[1] !== onRemove || $[2] !== permissionContext || $[3] !== setPermissionContext) {
955
+ t1 = () => {
956
+ const updatedContext = applyPermissionUpdate(permissionContext, {
957
+ type: "removeDirectories",
958
+ directories: [directoryPath],
959
+ destination: "session"
960
+ });
961
+ setPermissionContext(updatedContext);
962
+ onRemove();
963
+ };
964
+ $[0] = directoryPath;
965
+ $[1] = onRemove;
966
+ $[2] = permissionContext;
967
+ $[3] = setPermissionContext;
968
+ $[4] = t1;
969
+ } else {
970
+ t1 = $[4];
971
+ }
972
+ const handleRemove = t1;
973
+ let t2;
974
+ if ($[5] !== handleRemove || $[6] !== onCancel) {
975
+ t2 = (value) => {
976
+ if (value === "yes") {
977
+ handleRemove();
978
+ } else {
979
+ onCancel();
980
+ }
981
+ };
982
+ $[5] = handleRemove;
983
+ $[6] = onCancel;
984
+ $[7] = t2;
985
+ } else {
986
+ t2 = $[7];
987
+ }
988
+ const handleSelect = t2;
989
+ let t3;
990
+ if ($[8] !== directoryPath) {
991
+ t3 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
992
+ marginX: 2,
993
+ flexDirection: "column",
994
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
995
+ bold: true,
996
+ children: directoryPath
997
+ }, undefined, false, undefined, this)
998
+ }, undefined, false, undefined, this);
999
+ $[8] = directoryPath;
1000
+ $[9] = t3;
1001
+ } else {
1002
+ t3 = $[9];
1003
+ }
1004
+ let t4;
1005
+ if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
1006
+ t4 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
1007
+ children: "Claude Code will no longer have access to files in this directory."
1008
+ }, undefined, false, undefined, this);
1009
+ $[10] = t4;
1010
+ } else {
1011
+ t4 = $[10];
1012
+ }
1013
+ let t5;
1014
+ if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
1015
+ t5 = [{
1016
+ label: "Yes",
1017
+ value: "yes"
1018
+ }, {
1019
+ label: "No",
1020
+ value: "no"
1021
+ }];
1022
+ $[11] = t5;
1023
+ } else {
1024
+ t5 = $[11];
1025
+ }
1026
+ let t6;
1027
+ if ($[12] !== handleSelect || $[13] !== onCancel) {
1028
+ t6 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Select, {
1029
+ onChange: handleSelect,
1030
+ onCancel,
1031
+ options: t5
1032
+ }, undefined, false, undefined, this);
1033
+ $[12] = handleSelect;
1034
+ $[13] = onCancel;
1035
+ $[14] = t6;
1036
+ } else {
1037
+ t6 = $[14];
1038
+ }
1039
+ let t7;
1040
+ if ($[15] !== onCancel || $[16] !== t3 || $[17] !== t6) {
1041
+ t7 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Dialog, {
1042
+ title: "Remove directory from workspace?",
1043
+ onCancel,
1044
+ color: "error",
1045
+ children: [
1046
+ t3,
1047
+ t4,
1048
+ t6
1049
+ ]
1050
+ }, undefined, true, undefined, this);
1051
+ $[15] = onCancel;
1052
+ $[16] = t3;
1053
+ $[17] = t6;
1054
+ $[18] = t7;
1055
+ } else {
1056
+ t7 = $[18];
1057
+ }
1058
+ return t7;
1059
+ }
1060
+ var import_compiler_runtime5, jsx_dev_runtime5;
1061
+ var init_RemoveWorkspaceDirectory = __esm(() => {
1062
+ init_select();
1063
+ init_ink();
1064
+ init_PermissionUpdate();
1065
+ init_Dialog();
1066
+ import_compiler_runtime5 = __toESM(require_compiler_runtime(), 1);
1067
+ jsx_dev_runtime5 = __toESM(require_jsx_dev_runtime(), 1);
1068
+ });
1069
+
1070
+ // src/components/permissions/rules/WorkspaceTab.tsx
1071
+ function WorkspaceTab(t0) {
1072
+ const $ = import_compiler_runtime6.c(23);
1073
+ const {
1074
+ onExit,
1075
+ toolPermissionContext,
1076
+ onRequestAddDirectory,
1077
+ onRequestRemoveDirectory,
1078
+ onHeaderFocusChange
1079
+ } = t0;
1080
+ const {
1081
+ headerFocused,
1082
+ focusHeader
1083
+ } = useTabHeaderFocus();
1084
+ let t1;
1085
+ let t2;
1086
+ if ($[0] !== headerFocused || $[1] !== onHeaderFocusChange) {
1087
+ t1 = () => {
1088
+ onHeaderFocusChange?.(headerFocused);
1089
+ };
1090
+ t2 = [headerFocused, onHeaderFocusChange];
1091
+ $[0] = headerFocused;
1092
+ $[1] = onHeaderFocusChange;
1093
+ $[2] = t1;
1094
+ $[3] = t2;
1095
+ } else {
1096
+ t1 = $[2];
1097
+ t2 = $[3];
1098
+ }
1099
+ import_react3.useEffect(t1, t2);
1100
+ let t3;
1101
+ if ($[4] !== toolPermissionContext.additionalWorkingDirectories) {
1102
+ t3 = Array.from(toolPermissionContext.additionalWorkingDirectories.keys()).map(_temp6);
1103
+ $[4] = toolPermissionContext.additionalWorkingDirectories;
1104
+ $[5] = t3;
1105
+ } else {
1106
+ t3 = $[5];
1107
+ }
1108
+ const additionalDirectories = t3;
1109
+ let t4;
1110
+ if ($[6] !== additionalDirectories || $[7] !== onRequestAddDirectory || $[8] !== onRequestRemoveDirectory) {
1111
+ t4 = (selectedValue) => {
1112
+ if (selectedValue === "add-directory") {
1113
+ onRequestAddDirectory();
1114
+ return;
1115
+ }
1116
+ const directory = additionalDirectories.find((d) => d.path === selectedValue);
1117
+ if (directory && directory.isDeletable) {
1118
+ onRequestRemoveDirectory(directory.path);
1119
+ }
1120
+ };
1121
+ $[6] = additionalDirectories;
1122
+ $[7] = onRequestAddDirectory;
1123
+ $[8] = onRequestRemoveDirectory;
1124
+ $[9] = t4;
1125
+ } else {
1126
+ t4 = $[9];
1127
+ }
1128
+ const handleDirectorySelect = t4;
1129
+ let t5;
1130
+ if ($[10] !== onExit) {
1131
+ t5 = () => onExit("Workspace dialog dismissed", {
1132
+ display: "system"
1133
+ });
1134
+ $[10] = onExit;
1135
+ $[11] = t5;
1136
+ } else {
1137
+ t5 = $[11];
1138
+ }
1139
+ const handleCancel = t5;
1140
+ let opts;
1141
+ if ($[12] !== additionalDirectories) {
1142
+ opts = additionalDirectories.map(_temp22);
1143
+ let t62;
1144
+ if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
1145
+ t62 = {
1146
+ label: `Add directory${figures_default.ellipsis}`,
1147
+ value: "add-directory"
1148
+ };
1149
+ $[14] = t62;
1150
+ } else {
1151
+ t62 = $[14];
1152
+ }
1153
+ opts.push(t62);
1154
+ $[12] = additionalDirectories;
1155
+ $[13] = opts;
1156
+ } else {
1157
+ opts = $[13];
1158
+ }
1159
+ const options = opts;
1160
+ let t6;
1161
+ if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
1162
+ t6 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
1163
+ flexDirection: "row",
1164
+ marginTop: 1,
1165
+ marginLeft: 2,
1166
+ gap: 1,
1167
+ children: [
1168
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
1169
+ children: `- ${getOriginalCwd()}`
1170
+ }, undefined, false, undefined, this),
1171
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
1172
+ dimColor: true,
1173
+ children: "(Original working directory)"
1174
+ }, undefined, false, undefined, this)
1175
+ ]
1176
+ }, undefined, true, undefined, this);
1177
+ $[15] = t6;
1178
+ } else {
1179
+ t6 = $[15];
1180
+ }
1181
+ const t7 = Math.min(10, options.length);
1182
+ let t8;
1183
+ if ($[16] !== focusHeader || $[17] !== handleCancel || $[18] !== handleDirectorySelect || $[19] !== headerFocused || $[20] !== options || $[21] !== t7) {
1184
+ t8 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
1185
+ flexDirection: "column",
1186
+ marginBottom: 1,
1187
+ children: [
1188
+ t6,
1189
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Select, {
1190
+ options,
1191
+ onChange: handleDirectorySelect,
1192
+ onCancel: handleCancel,
1193
+ visibleOptionCount: t7,
1194
+ onUpFromFirstItem: focusHeader,
1195
+ isDisabled: headerFocused
1196
+ }, undefined, false, undefined, this)
1197
+ ]
1198
+ }, undefined, true, undefined, this);
1199
+ $[16] = focusHeader;
1200
+ $[17] = handleCancel;
1201
+ $[18] = handleDirectorySelect;
1202
+ $[19] = headerFocused;
1203
+ $[20] = options;
1204
+ $[21] = t7;
1205
+ $[22] = t8;
1206
+ } else {
1207
+ t8 = $[22];
1208
+ }
1209
+ return t8;
1210
+ }
1211
+ function _temp22(dir) {
1212
+ return {
1213
+ label: dir.path,
1214
+ value: dir.path
1215
+ };
1216
+ }
1217
+ function _temp6(path) {
1218
+ return {
1219
+ path,
1220
+ isCurrent: false,
1221
+ isDeletable: true
1222
+ };
1223
+ }
1224
+ var import_compiler_runtime6, import_react3, jsx_dev_runtime6;
1225
+ var init_WorkspaceTab = __esm(() => {
1226
+ init_figures();
1227
+ init_state();
1228
+ init_select();
1229
+ init_ink();
1230
+ init_Tabs();
1231
+ import_compiler_runtime6 = __toESM(require_compiler_runtime(), 1);
1232
+ import_react3 = __toESM(require_react(), 1);
1233
+ jsx_dev_runtime6 = __toESM(require_jsx_dev_runtime(), 1);
1234
+ });
1235
+
1236
+ // src/components/permissions/rules/PermissionRuleList.tsx
1237
+ function RuleSourceText(t0) {
1238
+ const $ = import_compiler_runtime7.c(4);
1239
+ const {
1240
+ rule
1241
+ } = t0;
1242
+ let t1;
1243
+ if ($[0] !== rule.source) {
1244
+ t1 = permissionRuleSourceDisplayString(rule.source);
1245
+ $[0] = rule.source;
1246
+ $[1] = t1;
1247
+ } else {
1248
+ t1 = $[1];
1249
+ }
1250
+ const t2 = `From ${t1}`;
1251
+ let t3;
1252
+ if ($[2] !== t2) {
1253
+ t3 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1254
+ dimColor: true,
1255
+ children: t2
1256
+ }, undefined, false, undefined, this);
1257
+ $[2] = t2;
1258
+ $[3] = t3;
1259
+ } else {
1260
+ t3 = $[3];
1261
+ }
1262
+ return t3;
1263
+ }
1264
+ function getRuleBehaviorLabel(ruleBehavior) {
1265
+ switch (ruleBehavior) {
1266
+ case "allow":
1267
+ return "allowed";
1268
+ case "deny":
1269
+ return "denied";
1270
+ case "ask":
1271
+ return "ask";
1272
+ }
1273
+ }
1274
+ function RuleDetails(t0) {
1275
+ const $ = import_compiler_runtime7.c(42);
1276
+ const {
1277
+ rule,
1278
+ onDelete,
1279
+ onCancel
1280
+ } = t0;
1281
+ const exitState = useExitOnCtrlCDWithKeybindings();
1282
+ let t1;
1283
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1284
+ t1 = {
1285
+ context: "Confirmation"
1286
+ };
1287
+ $[0] = t1;
1288
+ } else {
1289
+ t1 = $[0];
1290
+ }
1291
+ useKeybinding("confirm:no", onCancel, t1);
1292
+ let t2;
1293
+ if ($[1] !== rule.ruleValue) {
1294
+ t2 = permissionRuleValueToString(rule.ruleValue);
1295
+ $[1] = rule.ruleValue;
1296
+ $[2] = t2;
1297
+ } else {
1298
+ t2 = $[2];
1299
+ }
1300
+ let t3;
1301
+ if ($[3] !== t2) {
1302
+ t3 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1303
+ bold: true,
1304
+ children: t2
1305
+ }, undefined, false, undefined, this);
1306
+ $[3] = t2;
1307
+ $[4] = t3;
1308
+ } else {
1309
+ t3 = $[4];
1310
+ }
1311
+ let t4;
1312
+ if ($[5] !== rule.ruleValue) {
1313
+ t4 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(PermissionRuleDescription, {
1314
+ ruleValue: rule.ruleValue
1315
+ }, undefined, false, undefined, this);
1316
+ $[5] = rule.ruleValue;
1317
+ $[6] = t4;
1318
+ } else {
1319
+ t4 = $[6];
1320
+ }
1321
+ let t5;
1322
+ if ($[7] !== rule) {
1323
+ t5 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(RuleSourceText, {
1324
+ rule
1325
+ }, undefined, false, undefined, this);
1326
+ $[7] = rule;
1327
+ $[8] = t5;
1328
+ } else {
1329
+ t5 = $[8];
1330
+ }
1331
+ let t6;
1332
+ if ($[9] !== t3 || $[10] !== t4 || $[11] !== t5) {
1333
+ t6 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
1334
+ flexDirection: "column",
1335
+ marginX: 2,
1336
+ children: [
1337
+ t3,
1338
+ t4,
1339
+ t5
1340
+ ]
1341
+ }, undefined, true, undefined, this);
1342
+ $[9] = t3;
1343
+ $[10] = t4;
1344
+ $[11] = t5;
1345
+ $[12] = t6;
1346
+ } else {
1347
+ t6 = $[12];
1348
+ }
1349
+ const ruleDescription = t6;
1350
+ let t7;
1351
+ if ($[13] !== exitState.keyName || $[14] !== exitState.pending) {
1352
+ t7 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
1353
+ marginLeft: 3,
1354
+ children: exitState.pending ? /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1355
+ dimColor: true,
1356
+ children: [
1357
+ "Press ",
1358
+ exitState.keyName,
1359
+ " again to exit"
1360
+ ]
1361
+ }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1362
+ dimColor: true,
1363
+ children: "Esc to cancel"
1364
+ }, undefined, false, undefined, this)
1365
+ }, undefined, false, undefined, this);
1366
+ $[13] = exitState.keyName;
1367
+ $[14] = exitState.pending;
1368
+ $[15] = t7;
1369
+ } else {
1370
+ t7 = $[15];
1371
+ }
1372
+ const footer = t7;
1373
+ if (rule.source === "policySettings") {
1374
+ let t82;
1375
+ if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
1376
+ t82 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1377
+ bold: true,
1378
+ color: "permission",
1379
+ children: "Rule details"
1380
+ }, undefined, false, undefined, this);
1381
+ $[16] = t82;
1382
+ } else {
1383
+ t82 = $[16];
1384
+ }
1385
+ let t92;
1386
+ if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
1387
+ t92 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1388
+ italic: true,
1389
+ children: [
1390
+ "This rule is configured by managed settings and cannot be modified.",
1391
+ `
1392
+ `,
1393
+ "Contact your system administrator for more information."
1394
+ ]
1395
+ }, undefined, true, undefined, this);
1396
+ $[17] = t92;
1397
+ } else {
1398
+ t92 = $[17];
1399
+ }
1400
+ let t102;
1401
+ if ($[18] !== ruleDescription) {
1402
+ t102 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
1403
+ flexDirection: "column",
1404
+ gap: 1,
1405
+ borderStyle: "round",
1406
+ paddingLeft: 1,
1407
+ paddingRight: 1,
1408
+ borderColor: "permission",
1409
+ children: [
1410
+ t82,
1411
+ ruleDescription,
1412
+ t92
1413
+ ]
1414
+ }, undefined, true, undefined, this);
1415
+ $[18] = ruleDescription;
1416
+ $[19] = t102;
1417
+ } else {
1418
+ t102 = $[19];
1419
+ }
1420
+ let t112;
1421
+ if ($[20] !== footer || $[21] !== t102) {
1422
+ t112 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
1423
+ children: [
1424
+ t102,
1425
+ footer
1426
+ ]
1427
+ }, undefined, true, undefined, this);
1428
+ $[20] = footer;
1429
+ $[21] = t102;
1430
+ $[22] = t112;
1431
+ } else {
1432
+ t112 = $[22];
1433
+ }
1434
+ return t112;
1435
+ }
1436
+ let t8;
1437
+ if ($[23] !== rule.ruleBehavior) {
1438
+ t8 = getRuleBehaviorLabel(rule.ruleBehavior);
1439
+ $[23] = rule.ruleBehavior;
1440
+ $[24] = t8;
1441
+ } else {
1442
+ t8 = $[24];
1443
+ }
1444
+ let t9;
1445
+ if ($[25] !== t8) {
1446
+ t9 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1447
+ bold: true,
1448
+ color: "error",
1449
+ children: [
1450
+ "Delete ",
1451
+ t8,
1452
+ " tool?"
1453
+ ]
1454
+ }, undefined, true, undefined, this);
1455
+ $[25] = t8;
1456
+ $[26] = t9;
1457
+ } else {
1458
+ t9 = $[26];
1459
+ }
1460
+ let t10;
1461
+ if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
1462
+ t10 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1463
+ children: "Are you sure you want to delete this permission rule?"
1464
+ }, undefined, false, undefined, this);
1465
+ $[27] = t10;
1466
+ } else {
1467
+ t10 = $[27];
1468
+ }
1469
+ let t11;
1470
+ if ($[28] !== onCancel || $[29] !== onDelete) {
1471
+ t11 = (_) => _ === "yes" ? onDelete() : onCancel();
1472
+ $[28] = onCancel;
1473
+ $[29] = onDelete;
1474
+ $[30] = t11;
1475
+ } else {
1476
+ t11 = $[30];
1477
+ }
1478
+ let t12;
1479
+ if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
1480
+ t12 = [{
1481
+ label: "Yes",
1482
+ value: "yes"
1483
+ }, {
1484
+ label: "No",
1485
+ value: "no"
1486
+ }];
1487
+ $[31] = t12;
1488
+ } else {
1489
+ t12 = $[31];
1490
+ }
1491
+ let t13;
1492
+ if ($[32] !== onCancel || $[33] !== t11) {
1493
+ t13 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Select, {
1494
+ onChange: t11,
1495
+ onCancel,
1496
+ options: t12
1497
+ }, undefined, false, undefined, this);
1498
+ $[32] = onCancel;
1499
+ $[33] = t11;
1500
+ $[34] = t13;
1501
+ } else {
1502
+ t13 = $[34];
1503
+ }
1504
+ let t14;
1505
+ if ($[35] !== ruleDescription || $[36] !== t13 || $[37] !== t9) {
1506
+ t14 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
1507
+ flexDirection: "column",
1508
+ gap: 1,
1509
+ borderStyle: "round",
1510
+ paddingLeft: 1,
1511
+ paddingRight: 1,
1512
+ borderColor: "error",
1513
+ children: [
1514
+ t9,
1515
+ ruleDescription,
1516
+ t10,
1517
+ t13
1518
+ ]
1519
+ }, undefined, true, undefined, this);
1520
+ $[35] = ruleDescription;
1521
+ $[36] = t13;
1522
+ $[37] = t9;
1523
+ $[38] = t14;
1524
+ } else {
1525
+ t14 = $[38];
1526
+ }
1527
+ let t15;
1528
+ if ($[39] !== footer || $[40] !== t14) {
1529
+ t15 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
1530
+ children: [
1531
+ t14,
1532
+ footer
1533
+ ]
1534
+ }, undefined, true, undefined, this);
1535
+ $[39] = footer;
1536
+ $[40] = t14;
1537
+ $[41] = t15;
1538
+ } else {
1539
+ t15 = $[41];
1540
+ }
1541
+ return t15;
1542
+ }
1543
+ function RulesTabContent(props) {
1544
+ const $ = import_compiler_runtime7.c(26);
1545
+ const {
1546
+ options,
1547
+ searchQuery,
1548
+ isSearchMode,
1549
+ isFocused,
1550
+ onSelect,
1551
+ onCancel,
1552
+ lastFocusedRuleKey,
1553
+ cursorOffset,
1554
+ onHeaderFocusChange
1555
+ } = props;
1556
+ const tabWidth = useTabsWidth();
1557
+ const {
1558
+ headerFocused,
1559
+ focusHeader,
1560
+ blurHeader
1561
+ } = useTabHeaderFocus();
1562
+ let t0;
1563
+ let t1;
1564
+ if ($[0] !== blurHeader || $[1] !== headerFocused || $[2] !== isSearchMode) {
1565
+ t0 = () => {
1566
+ if (isSearchMode && headerFocused) {
1567
+ blurHeader();
1568
+ }
1569
+ };
1570
+ t1 = [isSearchMode, headerFocused, blurHeader];
1571
+ $[0] = blurHeader;
1572
+ $[1] = headerFocused;
1573
+ $[2] = isSearchMode;
1574
+ $[3] = t0;
1575
+ $[4] = t1;
1576
+ } else {
1577
+ t0 = $[3];
1578
+ t1 = $[4];
1579
+ }
1580
+ import_react4.useEffect(t0, t1);
1581
+ let t2;
1582
+ let t3;
1583
+ if ($[5] !== headerFocused || $[6] !== onHeaderFocusChange) {
1584
+ t2 = () => {
1585
+ onHeaderFocusChange?.(headerFocused);
1586
+ };
1587
+ t3 = [headerFocused, onHeaderFocusChange];
1588
+ $[5] = headerFocused;
1589
+ $[6] = onHeaderFocusChange;
1590
+ $[7] = t2;
1591
+ $[8] = t3;
1592
+ } else {
1593
+ t2 = $[7];
1594
+ t3 = $[8];
1595
+ }
1596
+ import_react4.useEffect(t2, t3);
1597
+ const t4 = isSearchMode && !headerFocused;
1598
+ let t5;
1599
+ if ($[9] !== cursorOffset || $[10] !== isFocused || $[11] !== searchQuery || $[12] !== t4 || $[13] !== tabWidth) {
1600
+ t5 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
1601
+ marginBottom: 1,
1602
+ flexDirection: "column",
1603
+ children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(SearchBox, {
1604
+ query: searchQuery,
1605
+ isFocused: t4,
1606
+ isTerminalFocused: isFocused,
1607
+ width: tabWidth,
1608
+ cursorOffset
1609
+ }, undefined, false, undefined, this)
1610
+ }, undefined, false, undefined, this);
1611
+ $[9] = cursorOffset;
1612
+ $[10] = isFocused;
1613
+ $[11] = searchQuery;
1614
+ $[12] = t4;
1615
+ $[13] = tabWidth;
1616
+ $[14] = t5;
1617
+ } else {
1618
+ t5 = $[14];
1619
+ }
1620
+ const t6 = Math.min(10, options.length);
1621
+ const t7 = isSearchMode || headerFocused;
1622
+ let t8;
1623
+ if ($[15] !== focusHeader || $[16] !== lastFocusedRuleKey || $[17] !== onCancel || $[18] !== onSelect || $[19] !== options || $[20] !== t6 || $[21] !== t7) {
1624
+ t8 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Select, {
1625
+ options,
1626
+ onChange: onSelect,
1627
+ onCancel,
1628
+ visibleOptionCount: t6,
1629
+ isDisabled: t7,
1630
+ defaultFocusValue: lastFocusedRuleKey,
1631
+ onUpFromFirstItem: focusHeader
1632
+ }, undefined, false, undefined, this);
1633
+ $[15] = focusHeader;
1634
+ $[16] = lastFocusedRuleKey;
1635
+ $[17] = onCancel;
1636
+ $[18] = onSelect;
1637
+ $[19] = options;
1638
+ $[20] = t6;
1639
+ $[21] = t7;
1640
+ $[22] = t8;
1641
+ } else {
1642
+ t8 = $[22];
1643
+ }
1644
+ let t9;
1645
+ if ($[23] !== t5 || $[24] !== t8) {
1646
+ t9 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
1647
+ flexDirection: "column",
1648
+ children: [
1649
+ t5,
1650
+ t8
1651
+ ]
1652
+ }, undefined, true, undefined, this);
1653
+ $[23] = t5;
1654
+ $[24] = t8;
1655
+ $[25] = t9;
1656
+ } else {
1657
+ t9 = $[25];
1658
+ }
1659
+ return t9;
1660
+ }
1661
+ function PermissionRulesTab(t0) {
1662
+ const $ = import_compiler_runtime7.c(27);
1663
+ let T0;
1664
+ let T1;
1665
+ let handleToolSelect;
1666
+ let rulesProps;
1667
+ let t1;
1668
+ let t2;
1669
+ let t3;
1670
+ let t4;
1671
+ let tab;
1672
+ if ($[0] !== t0) {
1673
+ const {
1674
+ tab: t52,
1675
+ getRulesOptions,
1676
+ handleToolSelect: t62,
1677
+ ...t72
1678
+ } = t0;
1679
+ tab = t52;
1680
+ handleToolSelect = t62;
1681
+ rulesProps = t72;
1682
+ T1 = ThemedBox_default;
1683
+ t2 = "column";
1684
+ t3 = tab === "allow" ? 0 : undefined;
1685
+ let t8;
1686
+ if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
1687
+ t8 = {
1688
+ allow: "Claude Code won't ask before using allowed tools.",
1689
+ ask: "Claude Code will always ask for confirmation before using these tools.",
1690
+ deny: "Claude Code will always reject requests to use denied tools."
1691
+ };
1692
+ $[10] = t8;
1693
+ } else {
1694
+ t8 = $[10];
1695
+ }
1696
+ const t9 = t8[tab];
1697
+ if ($[11] !== t9) {
1698
+ t4 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1699
+ children: t9
1700
+ }, undefined, false, undefined, this);
1701
+ $[11] = t9;
1702
+ $[12] = t4;
1703
+ } else {
1704
+ t4 = $[12];
1705
+ }
1706
+ T0 = RulesTabContent;
1707
+ t1 = getRulesOptions(tab, rulesProps.searchQuery);
1708
+ $[0] = t0;
1709
+ $[1] = T0;
1710
+ $[2] = T1;
1711
+ $[3] = handleToolSelect;
1712
+ $[4] = rulesProps;
1713
+ $[5] = t1;
1714
+ $[6] = t2;
1715
+ $[7] = t3;
1716
+ $[8] = t4;
1717
+ $[9] = tab;
1718
+ } else {
1719
+ T0 = $[1];
1720
+ T1 = $[2];
1721
+ handleToolSelect = $[3];
1722
+ rulesProps = $[4];
1723
+ t1 = $[5];
1724
+ t2 = $[6];
1725
+ t3 = $[7];
1726
+ t4 = $[8];
1727
+ tab = $[9];
1728
+ }
1729
+ let t5;
1730
+ if ($[13] !== handleToolSelect || $[14] !== tab) {
1731
+ t5 = (v) => handleToolSelect(v, tab);
1732
+ $[13] = handleToolSelect;
1733
+ $[14] = tab;
1734
+ $[15] = t5;
1735
+ } else {
1736
+ t5 = $[15];
1737
+ }
1738
+ let t6;
1739
+ if ($[16] !== T0 || $[17] !== rulesProps || $[18] !== t1.options || $[19] !== t5) {
1740
+ t6 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(T0, {
1741
+ options: t1.options,
1742
+ onSelect: t5,
1743
+ ...rulesProps
1744
+ }, undefined, false, undefined, this);
1745
+ $[16] = T0;
1746
+ $[17] = rulesProps;
1747
+ $[18] = t1.options;
1748
+ $[19] = t5;
1749
+ $[20] = t6;
1750
+ } else {
1751
+ t6 = $[20];
1752
+ }
1753
+ let t7;
1754
+ if ($[21] !== T1 || $[22] !== t2 || $[23] !== t3 || $[24] !== t4 || $[25] !== t6) {
1755
+ t7 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(T1, {
1756
+ flexDirection: t2,
1757
+ flexShrink: t3,
1758
+ children: [
1759
+ t4,
1760
+ t6
1761
+ ]
1762
+ }, undefined, true, undefined, this);
1763
+ $[21] = T1;
1764
+ $[22] = t2;
1765
+ $[23] = t3;
1766
+ $[24] = t4;
1767
+ $[25] = t6;
1768
+ $[26] = t7;
1769
+ } else {
1770
+ t7 = $[26];
1771
+ }
1772
+ return t7;
1773
+ }
1774
+ function PermissionRuleList(t0) {
1775
+ const $ = import_compiler_runtime7.c(113);
1776
+ const {
1777
+ onExit,
1778
+ initialTab,
1779
+ onRetryDenials
1780
+ } = t0;
1781
+ let t1;
1782
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1783
+ t1 = getAutoModeDenials();
1784
+ $[0] = t1;
1785
+ } else {
1786
+ t1 = $[0];
1787
+ }
1788
+ const hasDenials = t1.length > 0;
1789
+ const defaultTab = initialTab ?? (hasDenials ? "recent" : "allow");
1790
+ let t2;
1791
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
1792
+ t2 = [];
1793
+ $[1] = t2;
1794
+ } else {
1795
+ t2 = $[1];
1796
+ }
1797
+ const [changes, setChanges] = import_react4.useState(t2);
1798
+ const toolPermissionContext = useAppState(_temp7);
1799
+ const setAppState = useSetAppState();
1800
+ const isTerminalFocused = useTerminalFocus();
1801
+ let t3;
1802
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
1803
+ t3 = {
1804
+ approved: new Set,
1805
+ retry: new Set,
1806
+ denials: []
1807
+ };
1808
+ $[2] = t3;
1809
+ } else {
1810
+ t3 = $[2];
1811
+ }
1812
+ const denialStateRef = import_react4.useRef(t3);
1813
+ let t4;
1814
+ if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
1815
+ t4 = (s_0) => {
1816
+ denialStateRef.current = s_0;
1817
+ };
1818
+ $[3] = t4;
1819
+ } else {
1820
+ t4 = $[3];
1821
+ }
1822
+ const handleDenialStateChange = t4;
1823
+ const [selectedRule, setSelectedRule] = import_react4.useState();
1824
+ const [lastFocusedRuleKey, setLastFocusedRuleKey] = import_react4.useState();
1825
+ const [addingRuleToTab, setAddingRuleToTab] = import_react4.useState(null);
1826
+ const [validatedRule, setValidatedRule] = import_react4.useState(null);
1827
+ const [isAddingWorkspaceDirectory, setIsAddingWorkspaceDirectory] = import_react4.useState(false);
1828
+ const [removingDirectory, setRemovingDirectory] = import_react4.useState(null);
1829
+ const [isSearchMode, setIsSearchMode] = import_react4.useState(false);
1830
+ const [headerFocused, setHeaderFocused] = import_react4.useState(true);
1831
+ let t5;
1832
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
1833
+ t5 = (focused) => {
1834
+ setHeaderFocused(focused);
1835
+ };
1836
+ $[4] = t5;
1837
+ } else {
1838
+ t5 = $[4];
1839
+ }
1840
+ const handleHeaderFocusChange = t5;
1841
+ let map;
1842
+ if ($[5] !== toolPermissionContext) {
1843
+ map = new Map;
1844
+ getAllowRules(toolPermissionContext).forEach((rule) => {
1845
+ map.set(jsonStringify(rule), rule);
1846
+ });
1847
+ $[5] = toolPermissionContext;
1848
+ $[6] = map;
1849
+ } else {
1850
+ map = $[6];
1851
+ }
1852
+ const allowRulesByKey = map;
1853
+ let map_0;
1854
+ if ($[7] !== toolPermissionContext) {
1855
+ map_0 = new Map;
1856
+ getDenyRules(toolPermissionContext).forEach((rule_0) => {
1857
+ map_0.set(jsonStringify(rule_0), rule_0);
1858
+ });
1859
+ $[7] = toolPermissionContext;
1860
+ $[8] = map_0;
1861
+ } else {
1862
+ map_0 = $[8];
1863
+ }
1864
+ const denyRulesByKey = map_0;
1865
+ let map_1;
1866
+ if ($[9] !== toolPermissionContext) {
1867
+ map_1 = new Map;
1868
+ getAskRules(toolPermissionContext).forEach((rule_1) => {
1869
+ map_1.set(jsonStringify(rule_1), rule_1);
1870
+ });
1871
+ $[9] = toolPermissionContext;
1872
+ $[10] = map_1;
1873
+ } else {
1874
+ map_1 = $[10];
1875
+ }
1876
+ const askRulesByKey = map_1;
1877
+ let t6;
1878
+ if ($[11] !== allowRulesByKey || $[12] !== askRulesByKey || $[13] !== denyRulesByKey) {
1879
+ t6 = (tab, t72) => {
1880
+ const query = t72 === undefined ? "" : t72;
1881
+ const rulesByKey = (() => {
1882
+ switch (tab) {
1883
+ case "allow": {
1884
+ return allowRulesByKey;
1885
+ }
1886
+ case "deny": {
1887
+ return denyRulesByKey;
1888
+ }
1889
+ case "ask": {
1890
+ return askRulesByKey;
1891
+ }
1892
+ case "workspace":
1893
+ case "recent": {
1894
+ return new Map;
1895
+ }
1896
+ }
1897
+ })();
1898
+ const options = [];
1899
+ if (tab !== "workspace" && tab !== "recent" && !query) {
1900
+ options.push({
1901
+ label: `Add a new rule${figures_default.ellipsis}`,
1902
+ value: "add-new-rule"
1903
+ });
1904
+ }
1905
+ const sortedRuleKeys = Array.from(rulesByKey.keys()).sort((a, b) => {
1906
+ const ruleA = rulesByKey.get(a);
1907
+ const ruleB = rulesByKey.get(b);
1908
+ if (ruleA && ruleB) {
1909
+ const ruleAString = permissionRuleValueToString(ruleA.ruleValue).toLowerCase();
1910
+ const ruleBString = permissionRuleValueToString(ruleB.ruleValue).toLowerCase();
1911
+ return ruleAString.localeCompare(ruleBString);
1912
+ }
1913
+ return 0;
1914
+ });
1915
+ const lowerQuery = query.toLowerCase();
1916
+ for (const ruleKey of sortedRuleKeys) {
1917
+ const rule_2 = rulesByKey.get(ruleKey);
1918
+ if (rule_2) {
1919
+ const ruleString = permissionRuleValueToString(rule_2.ruleValue);
1920
+ if (query && !ruleString.toLowerCase().includes(lowerQuery)) {
1921
+ continue;
1922
+ }
1923
+ options.push({
1924
+ label: ruleString,
1925
+ value: ruleKey
1926
+ });
1927
+ }
1928
+ }
1929
+ return {
1930
+ options,
1931
+ rulesByKey
1932
+ };
1933
+ };
1934
+ $[11] = allowRulesByKey;
1935
+ $[12] = askRulesByKey;
1936
+ $[13] = denyRulesByKey;
1937
+ $[14] = t6;
1938
+ } else {
1939
+ t6 = $[14];
1940
+ }
1941
+ const getRulesOptions = t6;
1942
+ const exitState = useExitOnCtrlCDWithKeybindings();
1943
+ const isSearchModeActive = !selectedRule && !addingRuleToTab && !validatedRule && !isAddingWorkspaceDirectory && !removingDirectory;
1944
+ const t7 = isSearchModeActive && isSearchMode;
1945
+ let t8;
1946
+ if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
1947
+ t8 = () => {
1948
+ setIsSearchMode(false);
1949
+ };
1950
+ $[15] = t8;
1951
+ } else {
1952
+ t8 = $[15];
1953
+ }
1954
+ let t9;
1955
+ if ($[16] !== t7) {
1956
+ t9 = {
1957
+ isActive: t7,
1958
+ onExit: t8
1959
+ };
1960
+ $[16] = t7;
1961
+ $[17] = t9;
1962
+ } else {
1963
+ t9 = $[17];
1964
+ }
1965
+ const {
1966
+ query: searchQuery,
1967
+ setQuery: setSearchQuery,
1968
+ cursorOffset: searchCursorOffset
1969
+ } = useSearchInput(t9);
1970
+ let t10;
1971
+ if ($[18] !== isSearchMode || $[19] !== isSearchModeActive || $[20] !== setSearchQuery) {
1972
+ t10 = (e) => {
1973
+ if (!isSearchModeActive) {
1974
+ return;
1975
+ }
1976
+ if (isSearchMode) {
1977
+ return;
1978
+ }
1979
+ if (e.ctrl || e.meta) {
1980
+ return;
1981
+ }
1982
+ if (e.key === "/") {
1983
+ e.preventDefault();
1984
+ setIsSearchMode(true);
1985
+ setSearchQuery("");
1986
+ } else {
1987
+ if (e.key.length === 1 && e.key !== "j" && e.key !== "k" && e.key !== "m" && e.key !== "i" && e.key !== "r" && e.key !== " ") {
1988
+ e.preventDefault();
1989
+ setIsSearchMode(true);
1990
+ setSearchQuery(e.key);
1991
+ }
1992
+ }
1993
+ };
1994
+ $[18] = isSearchMode;
1995
+ $[19] = isSearchModeActive;
1996
+ $[20] = setSearchQuery;
1997
+ $[21] = t10;
1998
+ } else {
1999
+ t10 = $[21];
2000
+ }
2001
+ const handleKeyDown = t10;
2002
+ let t11;
2003
+ if ($[22] !== getRulesOptions) {
2004
+ t11 = (selectedValue, tab_0) => {
2005
+ const {
2006
+ rulesByKey: rulesByKey_0
2007
+ } = getRulesOptions(tab_0);
2008
+ if (selectedValue === "add-new-rule") {
2009
+ setAddingRuleToTab(tab_0);
2010
+ return;
2011
+ } else {
2012
+ setSelectedRule(rulesByKey_0.get(selectedValue));
2013
+ return;
2014
+ }
2015
+ };
2016
+ $[22] = getRulesOptions;
2017
+ $[23] = t11;
2018
+ } else {
2019
+ t11 = $[23];
2020
+ }
2021
+ const handleToolSelect = t11;
2022
+ let t12;
2023
+ if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
2024
+ t12 = () => {
2025
+ setAddingRuleToTab(null);
2026
+ };
2027
+ $[24] = t12;
2028
+ } else {
2029
+ t12 = $[24];
2030
+ }
2031
+ const handleRuleInputCancel = t12;
2032
+ let t13;
2033
+ if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
2034
+ t13 = (ruleValue, ruleBehavior) => {
2035
+ setValidatedRule({
2036
+ ruleValue,
2037
+ ruleBehavior
2038
+ });
2039
+ setAddingRuleToTab(null);
2040
+ };
2041
+ $[25] = t13;
2042
+ } else {
2043
+ t13 = $[25];
2044
+ }
2045
+ const handleRuleInputSubmit = t13;
2046
+ let t14;
2047
+ if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
2048
+ t14 = (rules, unreachable) => {
2049
+ setValidatedRule(null);
2050
+ for (const rule_3 of rules) {
2051
+ setChanges((prev) => [...prev, `Added ${rule_3.ruleBehavior} rule ${source_default.bold(permissionRuleValueToString(rule_3.ruleValue))}`]);
2052
+ }
2053
+ if (unreachable && unreachable.length > 0) {
2054
+ for (const u of unreachable) {
2055
+ const severity = u.shadowType === "deny" ? "blocked" : "shadowed";
2056
+ setChanges((prev_0) => [...prev_0, source_default.yellow(`${figures_default.warning} Warning: ${permissionRuleValueToString(u.rule.ruleValue)} is ${severity}`), source_default.dim(` ${u.reason}`), source_default.dim(` Fix: ${u.fix}`)]);
2057
+ }
2058
+ }
2059
+ };
2060
+ $[26] = t14;
2061
+ } else {
2062
+ t14 = $[26];
2063
+ }
2064
+ const handleAddRulesSuccess = t14;
2065
+ let t15;
2066
+ if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
2067
+ t15 = () => {
2068
+ setValidatedRule(null);
2069
+ };
2070
+ $[27] = t15;
2071
+ } else {
2072
+ t15 = $[27];
2073
+ }
2074
+ const handleAddRuleCancel = t15;
2075
+ let t16;
2076
+ if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
2077
+ t16 = () => setIsAddingWorkspaceDirectory(true);
2078
+ $[28] = t16;
2079
+ } else {
2080
+ t16 = $[28];
2081
+ }
2082
+ const handleRequestAddDirectory = t16;
2083
+ let t17;
2084
+ if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
2085
+ t17 = (path) => setRemovingDirectory(path);
2086
+ $[29] = t17;
2087
+ } else {
2088
+ t17 = $[29];
2089
+ }
2090
+ const handleRequestRemoveDirectory = t17;
2091
+ let t18;
2092
+ if ($[30] !== changes || $[31] !== onExit || $[32] !== onRetryDenials) {
2093
+ t18 = () => {
2094
+ const s_1 = denialStateRef.current;
2095
+ const denialsFor = (set) => Array.from(set).map((idx) => s_1.denials[idx]).filter(_temp23);
2096
+ const retryDenials = denialsFor(s_1.retry);
2097
+ if (retryDenials.length > 0) {
2098
+ const commands = retryDenials.map(_temp32);
2099
+ onRetryDenials?.(commands);
2100
+ onExit(undefined, {
2101
+ shouldQuery: true,
2102
+ metaMessages: [`Permission granted for: ${commands.join(", ")}. You may now retry ${commands.length === 1 ? "this command" : "these commands"} if you would like.`]
2103
+ });
2104
+ return;
2105
+ }
2106
+ const approvedDenials = denialsFor(s_1.approved);
2107
+ if (approvedDenials.length > 0 || changes.length > 0) {
2108
+ const approvedMsg = approvedDenials.length > 0 ? [`Approved ${approvedDenials.map(_temp42).join(", ")}`] : [];
2109
+ onExit([...approvedMsg, ...changes].join(`
2110
+ `));
2111
+ } else {
2112
+ onExit("Permissions dialog dismissed", {
2113
+ display: "system"
2114
+ });
2115
+ }
2116
+ };
2117
+ $[30] = changes;
2118
+ $[31] = onExit;
2119
+ $[32] = onRetryDenials;
2120
+ $[33] = t18;
2121
+ } else {
2122
+ t18 = $[33];
2123
+ }
2124
+ const handleRulesCancel = t18;
2125
+ const t19 = isSearchModeActive && !isSearchMode;
2126
+ let t20;
2127
+ if ($[34] !== t19) {
2128
+ t20 = {
2129
+ context: "Settings",
2130
+ isActive: t19
2131
+ };
2132
+ $[34] = t19;
2133
+ $[35] = t20;
2134
+ } else {
2135
+ t20 = $[35];
2136
+ }
2137
+ useKeybinding("confirm:no", handleRulesCancel, t20);
2138
+ let t21;
2139
+ if ($[36] !== getRulesOptions || $[37] !== selectedRule || $[38] !== setAppState || $[39] !== toolPermissionContext) {
2140
+ t21 = () => {
2141
+ if (!selectedRule) {
2142
+ return;
2143
+ }
2144
+ const {
2145
+ options: options_0
2146
+ } = getRulesOptions(selectedRule.ruleBehavior);
2147
+ const selectedKey = jsonStringify(selectedRule);
2148
+ const ruleKeys = options_0.filter(_temp5).map(_temp62);
2149
+ const currentIndex = ruleKeys.indexOf(selectedKey);
2150
+ let nextFocusKey;
2151
+ if (currentIndex !== -1) {
2152
+ if (currentIndex < ruleKeys.length - 1) {
2153
+ nextFocusKey = ruleKeys[currentIndex + 1];
2154
+ } else {
2155
+ if (currentIndex > 0) {
2156
+ nextFocusKey = ruleKeys[currentIndex - 1];
2157
+ }
2158
+ }
2159
+ }
2160
+ setLastFocusedRuleKey(nextFocusKey);
2161
+ deletePermissionRule({
2162
+ rule: selectedRule,
2163
+ initialContext: toolPermissionContext,
2164
+ setToolPermissionContext(toolPermissionContext_0) {
2165
+ setAppState((prev_1) => ({
2166
+ ...prev_1,
2167
+ toolPermissionContext: toolPermissionContext_0
2168
+ }));
2169
+ }
2170
+ });
2171
+ setChanges((prev_2) => [...prev_2, `Deleted ${selectedRule.ruleBehavior} rule ${source_default.bold(permissionRuleValueToString(selectedRule.ruleValue))}`]);
2172
+ setSelectedRule(undefined);
2173
+ };
2174
+ $[36] = getRulesOptions;
2175
+ $[37] = selectedRule;
2176
+ $[38] = setAppState;
2177
+ $[39] = toolPermissionContext;
2178
+ $[40] = t21;
2179
+ } else {
2180
+ t21 = $[40];
2181
+ }
2182
+ const handleDeleteRule = t21;
2183
+ if (selectedRule) {
2184
+ let t222;
2185
+ if ($[41] === Symbol.for("react.memo_cache_sentinel")) {
2186
+ t222 = () => setSelectedRule(undefined);
2187
+ $[41] = t222;
2188
+ } else {
2189
+ t222 = $[41];
2190
+ }
2191
+ let t232;
2192
+ if ($[42] !== handleDeleteRule || $[43] !== selectedRule) {
2193
+ t232 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(RuleDetails, {
2194
+ rule: selectedRule,
2195
+ onDelete: handleDeleteRule,
2196
+ onCancel: t222
2197
+ }, undefined, false, undefined, this);
2198
+ $[42] = handleDeleteRule;
2199
+ $[43] = selectedRule;
2200
+ $[44] = t232;
2201
+ } else {
2202
+ t232 = $[44];
2203
+ }
2204
+ return t232;
2205
+ }
2206
+ if (addingRuleToTab && addingRuleToTab !== "workspace" && addingRuleToTab !== "recent") {
2207
+ let t222;
2208
+ if ($[45] !== addingRuleToTab) {
2209
+ t222 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(PermissionRuleInput, {
2210
+ onCancel: handleRuleInputCancel,
2211
+ onSubmit: handleRuleInputSubmit,
2212
+ ruleBehavior: addingRuleToTab
2213
+ }, undefined, false, undefined, this);
2214
+ $[45] = addingRuleToTab;
2215
+ $[46] = t222;
2216
+ } else {
2217
+ t222 = $[46];
2218
+ }
2219
+ return t222;
2220
+ }
2221
+ if (validatedRule) {
2222
+ let t222;
2223
+ if ($[47] !== validatedRule.ruleValue) {
2224
+ t222 = [validatedRule.ruleValue];
2225
+ $[47] = validatedRule.ruleValue;
2226
+ $[48] = t222;
2227
+ } else {
2228
+ t222 = $[48];
2229
+ }
2230
+ let t232;
2231
+ if ($[49] !== setAppState) {
2232
+ t232 = (toolPermissionContext_1) => {
2233
+ setAppState((prev_3) => ({
2234
+ ...prev_3,
2235
+ toolPermissionContext: toolPermissionContext_1
2236
+ }));
2237
+ };
2238
+ $[49] = setAppState;
2239
+ $[50] = t232;
2240
+ } else {
2241
+ t232 = $[50];
2242
+ }
2243
+ let t242;
2244
+ if ($[51] !== t222 || $[52] !== t232 || $[53] !== toolPermissionContext || $[54] !== validatedRule.ruleBehavior) {
2245
+ t242 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(AddPermissionRules, {
2246
+ onAddRules: handleAddRulesSuccess,
2247
+ onCancel: handleAddRuleCancel,
2248
+ ruleValues: t222,
2249
+ ruleBehavior: validatedRule.ruleBehavior,
2250
+ initialContext: toolPermissionContext,
2251
+ setToolPermissionContext: t232
2252
+ }, undefined, false, undefined, this);
2253
+ $[51] = t222;
2254
+ $[52] = t232;
2255
+ $[53] = toolPermissionContext;
2256
+ $[54] = validatedRule.ruleBehavior;
2257
+ $[55] = t242;
2258
+ } else {
2259
+ t242 = $[55];
2260
+ }
2261
+ return t242;
2262
+ }
2263
+ if (isAddingWorkspaceDirectory) {
2264
+ let t222;
2265
+ if ($[56] !== setAppState || $[57] !== toolPermissionContext) {
2266
+ t222 = (path_0, remember) => {
2267
+ const destination = remember ? "localSettings" : "session";
2268
+ const permissionUpdate = {
2269
+ type: "addDirectories",
2270
+ directories: [path_0],
2271
+ destination
2272
+ };
2273
+ const updatedContext = applyPermissionUpdate(toolPermissionContext, permissionUpdate);
2274
+ setAppState((prev_4) => ({
2275
+ ...prev_4,
2276
+ toolPermissionContext: updatedContext
2277
+ }));
2278
+ if (remember) {
2279
+ persistPermissionUpdate(permissionUpdate);
2280
+ }
2281
+ setChanges((prev_5) => [...prev_5, `Added directory ${source_default.bold(path_0)} to workspace${remember ? " and saved to local settings" : " for this session"}`]);
2282
+ setIsAddingWorkspaceDirectory(false);
2283
+ };
2284
+ $[56] = setAppState;
2285
+ $[57] = toolPermissionContext;
2286
+ $[58] = t222;
2287
+ } else {
2288
+ t222 = $[58];
2289
+ }
2290
+ let t232;
2291
+ if ($[59] === Symbol.for("react.memo_cache_sentinel")) {
2292
+ t232 = () => setIsAddingWorkspaceDirectory(false);
2293
+ $[59] = t232;
2294
+ } else {
2295
+ t232 = $[59];
2296
+ }
2297
+ let t242;
2298
+ if ($[60] !== t222 || $[61] !== toolPermissionContext) {
2299
+ t242 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(AddWorkspaceDirectory, {
2300
+ onAddDirectory: t222,
2301
+ onCancel: t232,
2302
+ permissionContext: toolPermissionContext
2303
+ }, undefined, false, undefined, this);
2304
+ $[60] = t222;
2305
+ $[61] = toolPermissionContext;
2306
+ $[62] = t242;
2307
+ } else {
2308
+ t242 = $[62];
2309
+ }
2310
+ return t242;
2311
+ }
2312
+ if (removingDirectory) {
2313
+ let t222;
2314
+ if ($[63] !== removingDirectory) {
2315
+ t222 = () => {
2316
+ setChanges((prev_6) => [...prev_6, `Removed directory ${source_default.bold(removingDirectory)} from workspace`]);
2317
+ setRemovingDirectory(null);
2318
+ };
2319
+ $[63] = removingDirectory;
2320
+ $[64] = t222;
2321
+ } else {
2322
+ t222 = $[64];
2323
+ }
2324
+ let t232;
2325
+ if ($[65] === Symbol.for("react.memo_cache_sentinel")) {
2326
+ t232 = () => setRemovingDirectory(null);
2327
+ $[65] = t232;
2328
+ } else {
2329
+ t232 = $[65];
2330
+ }
2331
+ let t242;
2332
+ if ($[66] !== setAppState) {
2333
+ t242 = (toolPermissionContext_2) => {
2334
+ setAppState((prev_7) => ({
2335
+ ...prev_7,
2336
+ toolPermissionContext: toolPermissionContext_2
2337
+ }));
2338
+ };
2339
+ $[66] = setAppState;
2340
+ $[67] = t242;
2341
+ } else {
2342
+ t242 = $[67];
2343
+ }
2344
+ let t252;
2345
+ if ($[68] !== removingDirectory || $[69] !== t222 || $[70] !== t242 || $[71] !== toolPermissionContext) {
2346
+ t252 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(RemoveWorkspaceDirectory, {
2347
+ directoryPath: removingDirectory,
2348
+ onRemove: t222,
2349
+ onCancel: t232,
2350
+ permissionContext: toolPermissionContext,
2351
+ setPermissionContext: t242
2352
+ }, undefined, false, undefined, this);
2353
+ $[68] = removingDirectory;
2354
+ $[69] = t222;
2355
+ $[70] = t242;
2356
+ $[71] = toolPermissionContext;
2357
+ $[72] = t252;
2358
+ } else {
2359
+ t252 = $[72];
2360
+ }
2361
+ return t252;
2362
+ }
2363
+ let t22;
2364
+ if ($[73] !== getRulesOptions || $[74] !== handleRulesCancel || $[75] !== handleToolSelect || $[76] !== isSearchMode || $[77] !== isTerminalFocused || $[78] !== lastFocusedRuleKey || $[79] !== searchCursorOffset || $[80] !== searchQuery) {
2365
+ t22 = {
2366
+ searchQuery,
2367
+ isSearchMode,
2368
+ isFocused: isTerminalFocused,
2369
+ onCancel: handleRulesCancel,
2370
+ lastFocusedRuleKey,
2371
+ cursorOffset: searchCursorOffset,
2372
+ getRulesOptions,
2373
+ handleToolSelect,
2374
+ onHeaderFocusChange: handleHeaderFocusChange
2375
+ };
2376
+ $[73] = getRulesOptions;
2377
+ $[74] = handleRulesCancel;
2378
+ $[75] = handleToolSelect;
2379
+ $[76] = isSearchMode;
2380
+ $[77] = isTerminalFocused;
2381
+ $[78] = lastFocusedRuleKey;
2382
+ $[79] = searchCursorOffset;
2383
+ $[80] = searchQuery;
2384
+ $[81] = t22;
2385
+ } else {
2386
+ t22 = $[81];
2387
+ }
2388
+ const sharedRulesProps = t22;
2389
+ const isHidden = !!selectedRule || !!addingRuleToTab || !!validatedRule || isAddingWorkspaceDirectory || !!removingDirectory;
2390
+ const t23 = !isSearchMode;
2391
+ let t24;
2392
+ if ($[82] === Symbol.for("react.memo_cache_sentinel")) {
2393
+ t24 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
2394
+ id: "recent",
2395
+ title: "Recently denied",
2396
+ children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(RecentDenialsTab, {
2397
+ onHeaderFocusChange: handleHeaderFocusChange,
2398
+ onStateChange: handleDenialStateChange
2399
+ }, undefined, false, undefined, this)
2400
+ }, undefined, false, undefined, this);
2401
+ $[82] = t24;
2402
+ } else {
2403
+ t24 = $[82];
2404
+ }
2405
+ let t25;
2406
+ if ($[83] !== sharedRulesProps) {
2407
+ t25 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
2408
+ id: "allow",
2409
+ title: "Allow",
2410
+ children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(PermissionRulesTab, {
2411
+ tab: "allow",
2412
+ ...sharedRulesProps
2413
+ }, undefined, false, undefined, this)
2414
+ }, undefined, false, undefined, this);
2415
+ $[83] = sharedRulesProps;
2416
+ $[84] = t25;
2417
+ } else {
2418
+ t25 = $[84];
2419
+ }
2420
+ let t26;
2421
+ if ($[85] !== sharedRulesProps) {
2422
+ t26 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
2423
+ id: "ask",
2424
+ title: "Ask",
2425
+ children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(PermissionRulesTab, {
2426
+ tab: "ask",
2427
+ ...sharedRulesProps
2428
+ }, undefined, false, undefined, this)
2429
+ }, undefined, false, undefined, this);
2430
+ $[85] = sharedRulesProps;
2431
+ $[86] = t26;
2432
+ } else {
2433
+ t26 = $[86];
2434
+ }
2435
+ let t27;
2436
+ if ($[87] !== sharedRulesProps) {
2437
+ t27 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
2438
+ id: "deny",
2439
+ title: "Deny",
2440
+ children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(PermissionRulesTab, {
2441
+ tab: "deny",
2442
+ ...sharedRulesProps
2443
+ }, undefined, false, undefined, this)
2444
+ }, undefined, false, undefined, this);
2445
+ $[87] = sharedRulesProps;
2446
+ $[88] = t27;
2447
+ } else {
2448
+ t27 = $[88];
2449
+ }
2450
+ let t28;
2451
+ if ($[89] === Symbol.for("react.memo_cache_sentinel")) {
2452
+ t28 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
2453
+ children: "Claude Code can read files in the workspace, and make edits when auto-accept edits is on."
2454
+ }, undefined, false, undefined, this);
2455
+ $[89] = t28;
2456
+ } else {
2457
+ t28 = $[89];
2458
+ }
2459
+ let t29;
2460
+ if ($[90] !== onExit || $[91] !== toolPermissionContext) {
2461
+ t29 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
2462
+ id: "workspace",
2463
+ title: "Workspace",
2464
+ children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
2465
+ flexDirection: "column",
2466
+ children: [
2467
+ t28,
2468
+ /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(WorkspaceTab, {
2469
+ onExit,
2470
+ toolPermissionContext,
2471
+ onRequestAddDirectory: handleRequestAddDirectory,
2472
+ onRequestRemoveDirectory: handleRequestRemoveDirectory,
2473
+ onHeaderFocusChange: handleHeaderFocusChange
2474
+ }, undefined, false, undefined, this)
2475
+ ]
2476
+ }, undefined, true, undefined, this)
2477
+ }, undefined, false, undefined, this);
2478
+ $[90] = onExit;
2479
+ $[91] = toolPermissionContext;
2480
+ $[92] = t29;
2481
+ } else {
2482
+ t29 = $[92];
2483
+ }
2484
+ let t30;
2485
+ if ($[93] !== defaultTab || $[94] !== isHidden || $[95] !== t23 || $[96] !== t25 || $[97] !== t26 || $[98] !== t27 || $[99] !== t29) {
2486
+ t30 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tabs, {
2487
+ title: "Permissions:",
2488
+ color: "permission",
2489
+ defaultTab,
2490
+ hidden: isHidden,
2491
+ initialHeaderFocused: !hasDenials,
2492
+ navFromContent: t23,
2493
+ children: [
2494
+ t24,
2495
+ t25,
2496
+ t26,
2497
+ t27,
2498
+ t29
2499
+ ]
2500
+ }, undefined, true, undefined, this);
2501
+ $[93] = defaultTab;
2502
+ $[94] = isHidden;
2503
+ $[95] = t23;
2504
+ $[96] = t25;
2505
+ $[97] = t26;
2506
+ $[98] = t27;
2507
+ $[99] = t29;
2508
+ $[100] = t30;
2509
+ } else {
2510
+ t30 = $[100];
2511
+ }
2512
+ let t31;
2513
+ if ($[101] !== defaultTab || $[102] !== exitState.keyName || $[103] !== exitState.pending || $[104] !== headerFocused || $[105] !== isSearchMode) {
2514
+ t31 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
2515
+ marginTop: 1,
2516
+ paddingLeft: 1,
2517
+ children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
2518
+ dimColor: true,
2519
+ children: exitState.pending ? /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
2520
+ children: [
2521
+ "Press ",
2522
+ exitState.keyName,
2523
+ " again to exit"
2524
+ ]
2525
+ }, undefined, true, undefined, this) : headerFocused ? /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
2526
+ children: "\u2190/\u2192 tab switch \xB7 \u2193 return \xB7 Esc cancel"
2527
+ }, undefined, false, undefined, this) : isSearchMode ? /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
2528
+ children: "Type to filter \xB7 Enter/\u2193 select \xB7 \u2191 tabs \xB7 Esc clear"
2529
+ }, undefined, false, undefined, this) : hasDenials && defaultTab === "recent" ? /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
2530
+ children: "Enter approve \xB7 r retry \xB7 \u2191\u2193 navigate \xB7 \u2190/\u2192 switch \xB7 Esc cancel"
2531
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
2532
+ children: "\u2191\u2193 navigate \xB7 Enter select \xB7 Type to search \xB7 \u2190/\u2192 switch \xB7 Esc cancel"
2533
+ }, undefined, false, undefined, this)
2534
+ }, undefined, false, undefined, this)
2535
+ }, undefined, false, undefined, this);
2536
+ $[101] = defaultTab;
2537
+ $[102] = exitState.keyName;
2538
+ $[103] = exitState.pending;
2539
+ $[104] = headerFocused;
2540
+ $[105] = isSearchMode;
2541
+ $[106] = t31;
2542
+ } else {
2543
+ t31 = $[106];
2544
+ }
2545
+ let t32;
2546
+ if ($[107] !== t30 || $[108] !== t31) {
2547
+ t32 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Pane, {
2548
+ color: "permission",
2549
+ children: [
2550
+ t30,
2551
+ t31
2552
+ ]
2553
+ }, undefined, true, undefined, this);
2554
+ $[107] = t30;
2555
+ $[108] = t31;
2556
+ $[109] = t32;
2557
+ } else {
2558
+ t32 = $[109];
2559
+ }
2560
+ let t33;
2561
+ if ($[110] !== handleKeyDown || $[111] !== t32) {
2562
+ t33 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
2563
+ flexDirection: "column",
2564
+ onKeyDown: handleKeyDown,
2565
+ children: t32
2566
+ }, undefined, false, undefined, this);
2567
+ $[110] = handleKeyDown;
2568
+ $[111] = t32;
2569
+ $[112] = t33;
2570
+ } else {
2571
+ t33 = $[112];
2572
+ }
2573
+ return t33;
2574
+ }
2575
+ function _temp62(opt_0) {
2576
+ return opt_0.value;
2577
+ }
2578
+ function _temp5(opt) {
2579
+ return opt.value !== "add-new-rule";
2580
+ }
2581
+ function _temp42(d_1) {
2582
+ return source_default.bold(d_1.display);
2583
+ }
2584
+ function _temp32(d_0) {
2585
+ return d_0.display;
2586
+ }
2587
+ function _temp23(d) {
2588
+ return d !== undefined;
2589
+ }
2590
+ function _temp7(s) {
2591
+ return s.toolPermissionContext;
2592
+ }
2593
+ var import_compiler_runtime7, import_react4, jsx_dev_runtime7;
2594
+ var init_PermissionRuleList = __esm(() => {
2595
+ init_source();
2596
+ init_figures();
2597
+ init_AppState();
2598
+ init_PermissionUpdate();
2599
+ init_select();
2600
+ init_useExitOnCtrlCDWithKeybindings();
2601
+ init_useSearchInput();
2602
+ init_ink();
2603
+ init_useKeybinding();
2604
+ init_autoModeDenials();
2605
+ init_permissionRuleParser();
2606
+ init_permissions();
2607
+ init_slowOperations();
2608
+ init_Pane();
2609
+ init_Tabs();
2610
+ init_SearchBox();
2611
+ init_AddPermissionRules();
2612
+ init_AddWorkspaceDirectory();
2613
+ init_PermissionRuleDescription();
2614
+ init_PermissionRuleInput();
2615
+ init_RecentDenialsTab();
2616
+ init_RemoveWorkspaceDirectory();
2617
+ init_WorkspaceTab();
2618
+ import_compiler_runtime7 = __toESM(require_compiler_runtime(), 1);
2619
+ import_react4 = __toESM(require_react(), 1);
2620
+ jsx_dev_runtime7 = __toESM(require_jsx_dev_runtime(), 1);
2621
+ });
2622
+
2623
+ // src/commands/permissions/permissions.tsx
2624
+ var jsx_dev_runtime8, call = async (onDone, context) => {
2625
+ return /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(PermissionRuleList, {
2626
+ onExit: onDone,
2627
+ onRetryDenials: (commands) => {
2628
+ context.setMessages((prev) => [...prev, createPermissionRetryMessage(commands)]);
2629
+ }
2630
+ }, undefined, false, undefined, this);
2631
+ };
2632
+ var init_permissions2 = __esm(() => {
2633
+ init_PermissionRuleList();
2634
+ init_messages();
2635
+ jsx_dev_runtime8 = __toESM(require_jsx_dev_runtime(), 1);
2636
+ });
2637
+ init_permissions2();
2638
+
2639
+ export {
2640
+ call
2641
+ };