@redscope-ai/redscope 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +224 -0
- package/dist/chunk-090920rk.js +288 -0
- package/dist/chunk-0afb2r78.js +141 -0
- package/dist/chunk-0d4ekx1g.js +73 -0
- package/dist/chunk-0g6nwbhq.js +15 -0
- package/dist/chunk-0qj905nt.js +18 -0
- package/dist/chunk-0s5btnn1.js +186 -0
- package/dist/chunk-0s8fars0.js +91 -0
- package/dist/chunk-10ev3dvh.js +312 -0
- package/dist/chunk-10k5jfc5.js +1295 -0
- package/dist/chunk-12tspwqa.js +240 -0
- package/dist/chunk-13qesvnw.js +17 -0
- package/dist/chunk-143eh1e0.js +121 -0
- package/dist/chunk-14p6wvsq.js +39 -0
- package/dist/chunk-19f3zb1m.js +342 -0
- package/dist/chunk-1a5cep8h.js +145 -0
- package/dist/chunk-1abw9kkn.js +34 -0
- package/dist/chunk-1aer7c78.js +118 -0
- package/dist/chunk-1dazz4g6.js +154 -0
- package/dist/chunk-1fcf4ty1.js +142 -0
- package/dist/chunk-1gnxhyf8.js +62 -0
- package/dist/chunk-1he3944e.js +8124 -0
- package/dist/chunk-1jpayz7y.js +952 -0
- package/dist/chunk-1qd6f6vk.js +269 -0
- package/dist/chunk-1v0kpe62.js +2547 -0
- package/dist/chunk-1w20m7gw.js +445 -0
- package/dist/chunk-1y7kp51j.js +72 -0
- package/dist/chunk-1ycb5sxt.js +247 -0
- package/dist/chunk-1zbwhcbt.js +1124 -0
- package/dist/chunk-20psem54.js +116 -0
- package/dist/chunk-23h69r5b.js +30 -0
- package/dist/chunk-23x86ptv.js +473 -0
- package/dist/chunk-24fyv3jz.js +378 -0
- package/dist/chunk-24kv69g3.js +97 -0
- package/dist/chunk-2azx8zsc.js +125 -0
- package/dist/chunk-2d1gwzz9.js +524 -0
- package/dist/chunk-2g0ytd9d.js +29058 -0
- package/dist/chunk-2hfp9kat.js +21 -0
- package/dist/chunk-2j875eq6.js +37 -0
- package/dist/chunk-2kcgxnvp.js +39 -0
- package/dist/chunk-2kz09j2s.js +23 -0
- package/dist/chunk-2mwnwp0n.js +17 -0
- package/dist/chunk-2p1cqhcn.js +921 -0
- package/dist/chunk-2p369q9z.js +61 -0
- package/dist/chunk-2rf6asgf.js +151 -0
- package/dist/chunk-2vr7mqx1.js +384 -0
- package/dist/chunk-2xcg933e.js +205 -0
- package/dist/chunk-2ypwckbz.js +40310 -0
- package/dist/chunk-30wnahyg.js +626 -0
- package/dist/chunk-326zehp8.js +204 -0
- package/dist/chunk-32s6jzgw.js +183 -0
- package/dist/chunk-35yzt1a7.js +202 -0
- package/dist/chunk-38frkej6.js +62 -0
- package/dist/chunk-3abaq08g.js +34 -0
- package/dist/chunk-3h59ttr5.js +32 -0
- package/dist/chunk-3nk9q8dr.js +154 -0
- package/dist/chunk-3prrxevm.js +224 -0
- package/dist/chunk-3tv8p9xw.js +127 -0
- package/dist/chunk-3txyekes.js +19 -0
- package/dist/chunk-3vfxjn7g.js +19 -0
- package/dist/chunk-3w9sye8h.js +81 -0
- package/dist/chunk-3y69j7y8.js +24 -0
- package/dist/chunk-3zwjpkjh.js +1603 -0
- package/dist/chunk-40t1d75v.js +3442 -0
- package/dist/chunk-470kmby4.js +318 -0
- package/dist/chunk-47jc141z.js +335 -0
- package/dist/chunk-48rz50ct.js +868 -0
- package/dist/chunk-49wv03ts.js +232 -0
- package/dist/chunk-4a189mn2.js +103 -0
- package/dist/chunk-4c4fmh7a.js +15 -0
- package/dist/chunk-4ct8dsj5.js +49 -0
- package/dist/chunk-4kqt1pm1.js +100 -0
- package/dist/chunk-4ng0xy0e.js +802 -0
- package/dist/chunk-4spgkgr3.js +43 -0
- package/dist/chunk-4tjdwtyy.js +19 -0
- package/dist/chunk-4tr60273.js +370 -0
- package/dist/chunk-4vnaeng5.js +29 -0
- package/dist/chunk-4wbqpeaw.js +871 -0
- package/dist/chunk-4wgkv3fv.js +1140 -0
- package/dist/chunk-4yjskjb6.js +40 -0
- package/dist/chunk-50m3a23z.js +35 -0
- package/dist/chunk-511f79az.js +182 -0
- package/dist/chunk-51sgztvv.js +161 -0
- package/dist/chunk-563fcpv1.js +290 -0
- package/dist/chunk-564cnq6v.js +735 -0
- package/dist/chunk-569r8cxc.js +31 -0
- package/dist/chunk-570x55d4.js +12 -0
- package/dist/chunk-571556cm.js +80 -0
- package/dist/chunk-59t4c56e.js +63 -0
- package/dist/chunk-5axjhkma.js +36 -0
- package/dist/chunk-5b188q5e.js +157 -0
- package/dist/chunk-5dmn1865.js +439 -0
- package/dist/chunk-5ks4829r.js +267 -0
- package/dist/chunk-5mmhfbxb.js +1078 -0
- package/dist/chunk-5rdt14hy.js +742 -0
- package/dist/chunk-5ssryexj.js +121 -0
- package/dist/chunk-5v95pnq4.js +15 -0
- package/dist/chunk-5xvjt2t9.js +68 -0
- package/dist/chunk-5zyq6t1q.js +118 -0
- package/dist/chunk-60fkafk2.js +15 -0
- package/dist/chunk-62fjkf5q.js +46 -0
- package/dist/chunk-64gazrrb.js +8067 -0
- package/dist/chunk-65tq2yjx.js +126 -0
- package/dist/chunk-65zbgg1n.js +14 -0
- package/dist/chunk-66v8mty3.js +264 -0
- package/dist/chunk-6acx5heq.js +292 -0
- package/dist/chunk-6hr7742d.js +61 -0
- package/dist/chunk-6hygvrhn.js +143 -0
- package/dist/chunk-6kjh280m.js +128 -0
- package/dist/chunk-6s0q1s5r.js +66 -0
- package/dist/chunk-6x35ffpx.js +690 -0
- package/dist/chunk-71jfy1hh.js +570 -0
- package/dist/chunk-71sdcaq6.js +15 -0
- package/dist/chunk-754qdxs5.js +92 -0
- package/dist/chunk-79v5bkj4.js +1176 -0
- package/dist/chunk-7br0w7j5.js +151 -0
- package/dist/chunk-7cjgrzz1.js +298 -0
- package/dist/chunk-7d41ks0y.js +133 -0
- package/dist/chunk-7f40pmtr.js +71 -0
- package/dist/chunk-7g15x8hm.js +131 -0
- package/dist/chunk-7gtnzdet.js +120 -0
- package/dist/chunk-7h0z4aqx.js +702 -0
- package/dist/chunk-7h7e5a7d.js +25 -0
- package/dist/chunk-7m2cznwr.js +40 -0
- package/dist/chunk-7nvday0n.js +252 -0
- package/dist/chunk-7qey87th.js +145 -0
- package/dist/chunk-7qx3xhv3.js +9076 -0
- package/dist/chunk-7tfdhkpy.js +61 -0
- package/dist/chunk-80m511j6.js +121 -0
- package/dist/chunk-80ysxfe9.js +784 -0
- package/dist/chunk-8375zk8t.js +17200 -0
- package/dist/chunk-85bpkyy9.js +412 -0
- package/dist/chunk-85tcn547.js +876 -0
- package/dist/chunk-85vqgbc8.js +13 -0
- package/dist/chunk-86626jb4.js +49 -0
- package/dist/chunk-87ms17f6.js +444 -0
- package/dist/chunk-87mz239c.js +118 -0
- package/dist/chunk-89vdzt4e.js +254 -0
- package/dist/chunk-89z3e99z.js +159 -0
- package/dist/chunk-8cwrz1dd.js +1806 -0
- package/dist/chunk-8gv2pjby.js +21 -0
- package/dist/chunk-8hdevr3s.js +140 -0
- package/dist/chunk-8hdsk6qc.js +710 -0
- package/dist/chunk-8kct9arg.js +724 -0
- package/dist/chunk-8kf8h7xf.js +23 -0
- package/dist/chunk-8qed8ymj.js +605 -0
- package/dist/chunk-8sdgr592.js +101 -0
- package/dist/chunk-8we9w8pw.js +111 -0
- package/dist/chunk-8xnm5637.js +72 -0
- package/dist/chunk-8y3q0eqy.js +67 -0
- package/dist/chunk-8yvsnrkr.js +3449 -0
- package/dist/chunk-8zz4z1q3.js +42 -0
- package/dist/chunk-90eyff3k.js +119 -0
- package/dist/chunk-92bjkrf2.js +121 -0
- package/dist/chunk-92zrc7c6.js +327 -0
- package/dist/chunk-935nrvdb.js +13 -0
- package/dist/chunk-94pfyv6a.js +48 -0
- package/dist/chunk-9568p8se.js +115 -0
- package/dist/chunk-96km1ywr.js +37 -0
- package/dist/chunk-980bg4w4.js +163 -0
- package/dist/chunk-9a9g5hbj.js +205 -0
- package/dist/chunk-9cm4725d.js +4395 -0
- package/dist/chunk-9ds3vzq8.js +847 -0
- package/dist/chunk-9ffc9n60.js +618 -0
- package/dist/chunk-9fstrwv2.js +184 -0
- package/dist/chunk-9gt0g0qe.js +153 -0
- package/dist/chunk-9h9k5vz3.js +2761 -0
- package/dist/chunk-9he8bmhy.js +17 -0
- package/dist/chunk-9hn8e6h1.js +12 -0
- package/dist/chunk-9j0n3g8e.js +179 -0
- package/dist/chunk-9j6pa3ft.js +251 -0
- package/dist/chunk-9jpg9dn7.js +122 -0
- package/dist/chunk-9mycnwj5.js +46 -0
- package/dist/chunk-9npy2c17.js +517 -0
- package/dist/chunk-9p6sec8n.js +34 -0
- package/dist/chunk-9pnym83h.js +4584 -0
- package/dist/chunk-9skwrnd2.js +25 -0
- package/dist/chunk-9tsfaqr8.js +459 -0
- package/dist/chunk-9tsw3cqv.js +5924 -0
- package/dist/chunk-9w6ckyk4.js +49 -0
- package/dist/chunk-a15bwzv6.js +147 -0
- package/dist/chunk-a9t6cp69.js +28 -0
- package/dist/chunk-ad2yk19p.js +102 -0
- package/dist/chunk-ad4cw4nw.js +336 -0
- package/dist/chunk-ad69fbsk.js +347 -0
- package/dist/chunk-ae76ded0.js +30 -0
- package/dist/chunk-aeysytks.js +216 -0
- package/dist/chunk-ag81m9bq.js +61 -0
- package/dist/chunk-ahx7gp6r.js +4448 -0
- package/dist/chunk-aj4tk4tk.js +23 -0
- package/dist/chunk-an82t9jc.js +104 -0
- package/dist/chunk-apg95qd7.js +1393 -0
- package/dist/chunk-aq5n2adz.js +27 -0
- package/dist/chunk-aw4s3a99.js +208 -0
- package/dist/chunk-awgdfggg.js +14 -0
- package/dist/chunk-ayymxgn1.js +164 -0
- package/dist/chunk-azbab59e.js +637 -0
- package/dist/chunk-azdxq2a3.js +293 -0
- package/dist/chunk-b0tjx3k1.js +523 -0
- package/dist/chunk-b5pp4g2g.js +371 -0
- package/dist/chunk-b5zm8dt6.js +26 -0
- package/dist/chunk-bcnye5a0.js +109 -0
- package/dist/chunk-beqz3k49.js +190 -0
- package/dist/chunk-bf906wpw.js +147 -0
- package/dist/chunk-bgan4cpf.js +13 -0
- package/dist/chunk-bhzp13h7.js +1178 -0
- package/dist/chunk-bk403kpw.js +142 -0
- package/dist/chunk-bmq4c135.js +489 -0
- package/dist/chunk-bprbeda7.js +35 -0
- package/dist/chunk-bst7czdd.js +888 -0
- package/dist/chunk-bths4xgn.js +111 -0
- package/dist/chunk-btjn3qby.js +13 -0
- package/dist/chunk-bwb1vxnt.js +120 -0
- package/dist/chunk-bxa6tw4m.js +643 -0
- package/dist/chunk-bxfjr8qb.js +27 -0
- package/dist/chunk-bxpzhrej.js +73 -0
- package/dist/chunk-bzyzrq0k.js +51 -0
- package/dist/chunk-c0k7b0jw.js +4265 -0
- package/dist/chunk-c17f0h2s.js +16 -0
- package/dist/chunk-c1yc761e.js +6748 -0
- package/dist/chunk-c5g9shkw.js +298 -0
- package/dist/chunk-c696122m.js +69 -0
- package/dist/chunk-c92b3yxx.js +109 -0
- package/dist/chunk-c9aqz56y.js +143 -0
- package/dist/chunk-cba7c5w3.js +345 -0
- package/dist/chunk-cbcxbbe6.js +6543 -0
- package/dist/chunk-cdfjb87h.js +11 -0
- package/dist/chunk-ce8zjt1y.js +136 -0
- package/dist/chunk-cep7e37k.js +22740 -0
- package/dist/chunk-chs5qm8d.js +258 -0
- package/dist/chunk-ckydq33g.js +144 -0
- package/dist/chunk-cnge6wpj.js +514 -0
- package/dist/chunk-cpnsvqf1.js +13 -0
- package/dist/chunk-cqqebkv4.js +32 -0
- package/dist/chunk-cvqpp7dk.js +627 -0
- package/dist/chunk-cwc33j40.js +65 -0
- package/dist/chunk-cypvrq2a.js +155 -0
- package/dist/chunk-d1ha0swn.js +475 -0
- package/dist/chunk-d2an0138.js +35 -0
- package/dist/chunk-d2tt72ck.js +343 -0
- package/dist/chunk-d6wvcqrw.js +9507 -0
- package/dist/chunk-d7ys2kka.js +991 -0
- package/dist/chunk-dbts5q5p.js +122 -0
- package/dist/chunk-dct29ggs.js +295 -0
- package/dist/chunk-de0qnnf7.js +1059 -0
- package/dist/chunk-dep72ce4.js +513 -0
- package/dist/chunk-dgpvgy8x.js +47 -0
- package/dist/chunk-dhhd7dtc.js +20 -0
- package/dist/chunk-dhzpmxv6.js +594 -0
- package/dist/chunk-djes4da7.js +413 -0
- package/dist/chunk-dnhv3vx7.js +166 -0
- package/dist/chunk-dqtvafan.js +2365 -0
- package/dist/chunk-dr4a3tcp.js +60 -0
- package/dist/chunk-dz2xk9kb.js +100 -0
- package/dist/chunk-dz7nc6rf.js +15 -0
- package/dist/chunk-e3abfxpy.js +1486 -0
- package/dist/chunk-e3cq9z89.js +85 -0
- package/dist/chunk-e3j7m7k2.js +642 -0
- package/dist/chunk-e4dsy4g1.js +9951 -0
- package/dist/chunk-e5592pnn.js +197 -0
- package/dist/chunk-e55hdegh.js +129 -0
- package/dist/chunk-e5r5r04e.js +1030 -0
- package/dist/chunk-e60zztbt.js +442 -0
- package/dist/chunk-e7qq6vn0.js +372 -0
- package/dist/chunk-e9aat7xw.js +80 -0
- package/dist/chunk-e9d5v3zs.js +143 -0
- package/dist/chunk-eax32zk4.js +87 -0
- package/dist/chunk-ebfwmbx1.js +117 -0
- package/dist/chunk-ec71pb8t.js +971 -0
- package/dist/chunk-eemjb825.js +17252 -0
- package/dist/chunk-ees8xdhd.js +256 -0
- package/dist/chunk-eewg66y1.js +112 -0
- package/dist/chunk-eg22v12d.js +266 -0
- package/dist/chunk-enzzk67f.js +313 -0
- package/dist/chunk-eskhp70f.js +117 -0
- package/dist/chunk-ewx6z4g8.js +55 -0
- package/dist/chunk-eyvx461k.js +76 -0
- package/dist/chunk-eztq2b5f.js +94 -0
- package/dist/chunk-f0ffwzdd.js +321 -0
- package/dist/chunk-f80n68mf.js +119 -0
- package/dist/chunk-fae2hjxp.js +99 -0
- package/dist/chunk-fbtfp370.js +60 -0
- package/dist/chunk-fc6ndtgf.js +94 -0
- package/dist/chunk-fdwabr8p.js +13870 -0
- package/dist/chunk-fejeqe61.js +785 -0
- package/dist/chunk-fh0d6mvk.js +168 -0
- package/dist/chunk-fh19zcaf.js +304 -0
- package/dist/chunk-fh8bd39r.js +186 -0
- package/dist/chunk-fj2ebbpn.js +33 -0
- package/dist/chunk-fjn632v7.js +194 -0
- package/dist/chunk-fncpkzs5.js +1389 -0
- package/dist/chunk-fpd1gpt8.js +332 -0
- package/dist/chunk-fq9snrnh.js +295 -0
- package/dist/chunk-fqcfzg3j.js +207 -0
- package/dist/chunk-ftt3vqj2.js +1919 -0
- package/dist/chunk-g06pm4n9.js +395 -0
- package/dist/chunk-g4m5pf4g.js +8 -0
- package/dist/chunk-g72h52y6.js +36 -0
- package/dist/chunk-g79ej71s.js +1627 -0
- package/dist/chunk-g7fwk59d.js +19 -0
- package/dist/chunk-g9jnkrtm.js +663 -0
- package/dist/chunk-g9vg5d7t.js +38 -0
- package/dist/chunk-ga1jkyqy.js +1636 -0
- package/dist/chunk-gaaap2nk.js +676 -0
- package/dist/chunk-gc6erq5q.js +483 -0
- package/dist/chunk-gjrcmf0a.js +752 -0
- package/dist/chunk-gmdy2w3z.js +238999 -0
- package/dist/chunk-gsz4yrrk.js +81 -0
- package/dist/chunk-gy47rjy8.js +3830 -0
- package/dist/chunk-h12a4f4x.js +11 -0
- package/dist/chunk-h1yratmg.js +725 -0
- package/dist/chunk-h9y0jnsy.js +155 -0
- package/dist/chunk-hbhs3mwy.js +133 -0
- package/dist/chunk-hbs8cmb4.js +8 -0
- package/dist/chunk-hdk0t1ht.js +940 -0
- package/dist/chunk-hef8dx4s.js +178 -0
- package/dist/chunk-hgsca8mt.js +381 -0
- package/dist/chunk-hhsxm2yr.js +67 -0
- package/dist/chunk-hj5tzzpd.js +39 -0
- package/dist/chunk-hjxqmtg5.js +94 -0
- package/dist/chunk-hn4w9pkj.js +68 -0
- package/dist/chunk-hnprkjgp.js +25 -0
- package/dist/chunk-hq3n5ex7.js +183 -0
- package/dist/chunk-hqjspfma.js +158 -0
- package/dist/chunk-hqxp6b72.js +1198 -0
- package/dist/chunk-hs6nrmq6.js +94 -0
- package/dist/chunk-hwba5xdc.js +267 -0
- package/dist/chunk-hy566ev3.js +430 -0
- package/dist/chunk-hzmzwte2.js +153 -0
- package/dist/chunk-hzxzvzw8.js +274 -0
- package/dist/chunk-j139fzgs.js +114 -0
- package/dist/chunk-j1mep9ck.js +62 -0
- package/dist/chunk-j3xveeg4.js +273 -0
- package/dist/chunk-j5y1s11j.js +100 -0
- package/dist/chunk-j9475b46.js +26 -0
- package/dist/chunk-j9rgqs8m.js +1192 -0
- package/dist/chunk-jccjaddz.js +74 -0
- package/dist/chunk-jdkwfy9e.js +35 -0
- package/dist/chunk-jdqp0r4h.js +6157 -0
- package/dist/chunk-jdzk4zwn.js +587 -0
- package/dist/chunk-jfafmkte.js +49 -0
- package/dist/chunk-jg3r989b.js +16 -0
- package/dist/chunk-jhtccjc9.js +54 -0
- package/dist/chunk-jj2ff1pr.js +688 -0
- package/dist/chunk-jmv7k0jn.js +37 -0
- package/dist/chunk-jmxzmwpw.js +65 -0
- package/dist/chunk-jnjxdqyr.js +353 -0
- package/dist/chunk-jsbbez9j.js +138 -0
- package/dist/chunk-jvpt2dc0.js +424 -0
- package/dist/chunk-jwd7cka0.js +34 -0
- package/dist/chunk-jy5er3st.js +15 -0
- package/dist/chunk-jyby79z5.js +121 -0
- package/dist/chunk-jzyr6j5n.js +332 -0
- package/dist/chunk-k49xc781.js +63 -0
- package/dist/chunk-k7dt2g4a.js +41 -0
- package/dist/chunk-k7hexw3v.js +969 -0
- package/dist/chunk-k7wwkraa.js +117 -0
- package/dist/chunk-kb3758f7.js +51 -0
- package/dist/chunk-kc67kt75.js +3119 -0
- package/dist/chunk-kdhmfxmh.js +3149 -0
- package/dist/chunk-kejdd6zc.js +51 -0
- package/dist/chunk-kekrjeem.js +402 -0
- package/dist/chunk-kez5r0zz.js +280 -0
- package/dist/chunk-kfsvcs5t.js +75 -0
- package/dist/chunk-khtvffc4.js +285 -0
- package/dist/chunk-kkz4w1tv.js +64 -0
- package/dist/chunk-kmywng0j.js +272 -0
- package/dist/chunk-kq6vcpdr.js +224 -0
- package/dist/chunk-kqzdszcc.js +37 -0
- package/dist/chunk-ktxpp02w.js +435 -0
- package/dist/chunk-kwcvhbtz.js +26 -0
- package/dist/chunk-kx0cm9qr.js +128 -0
- package/dist/chunk-kxcmqz10.js +120 -0
- package/dist/chunk-kxwava1g.js +14 -0
- package/dist/chunk-kywtr3jg.js +825 -0
- package/dist/chunk-kzwg923p.js +8 -0
- package/dist/chunk-m1eq3sgv.js +255 -0
- package/dist/chunk-m21h5zb4.js +119 -0
- package/dist/chunk-m2c3bjv1.js +111 -0
- package/dist/chunk-m41e19ms.js +42 -0
- package/dist/chunk-m7ka36ex.js +97 -0
- package/dist/chunk-m81w8tbm.js +259 -0
- package/dist/chunk-m95ggkax.js +281 -0
- package/dist/chunk-manx26xa.js +145 -0
- package/dist/chunk-mdxh3pk2.js +298 -0
- package/dist/chunk-mhbfkcja.js +311 -0
- package/dist/chunk-mjnr5erm.js +173 -0
- package/dist/chunk-mngvnmwp.js +135 -0
- package/dist/chunk-mvfqanv5.js +63 -0
- package/dist/chunk-mw1nesq1.js +140 -0
- package/dist/chunk-mx168925.js +661 -0
- package/dist/chunk-mxwvj18g.js +795 -0
- package/dist/chunk-my7r5mba.js +257 -0
- package/dist/chunk-myaa1kkf.js +17 -0
- package/dist/chunk-myypc3tn.js +46 -0
- package/dist/chunk-mzcnmnpq.js +3379 -0
- package/dist/chunk-mznav6d1.js +194 -0
- package/dist/chunk-n0qxskpr.js +24 -0
- package/dist/chunk-n6a6hgtp.js +394 -0
- package/dist/chunk-n6d5fgx0.js +254 -0
- package/dist/chunk-n6ym3n03.js +120 -0
- package/dist/chunk-n9g24mwe.js +104 -0
- package/dist/chunk-naamqdf9.js +185 -0
- package/dist/chunk-nb2jk7zj.js +15 -0
- package/dist/chunk-nbkbq9en.js +67 -0
- package/dist/chunk-ndttd6es.js +38 -0
- package/dist/chunk-nfygaaxg.js +133 -0
- package/dist/chunk-ngdzpszd.js +454 -0
- package/dist/chunk-nmfwksa4.js +1297 -0
- package/dist/chunk-nt837qt9.js +21 -0
- package/dist/chunk-nwc3v0vp.js +691 -0
- package/dist/chunk-nz8ha95p.js +3610 -0
- package/dist/chunk-nzxfj0gq.js +2007 -0
- package/dist/chunk-p0r8887g.js +6932 -0
- package/dist/chunk-p1seyqdm.js +120 -0
- package/dist/chunk-p425zbgw.js +726 -0
- package/dist/chunk-p7hamd2c.js +146 -0
- package/dist/chunk-pdvg91cg.js +32 -0
- package/dist/chunk-pecy49yr.js +14649 -0
- package/dist/chunk-pfxrg89f.js +547 -0
- package/dist/chunk-pfyw3155.js +2750 -0
- package/dist/chunk-pr8m11pm.js +1192 -0
- package/dist/chunk-ptxteaeh.js +1591 -0
- package/dist/chunk-pv164mac.js +394 -0
- package/dist/chunk-pxxhtxf5.js +10154 -0
- package/dist/chunk-q0e485mg.js +61 -0
- package/dist/chunk-q1vrhh0q.js +458 -0
- package/dist/chunk-q2h79ncs.js +370 -0
- package/dist/chunk-q3b4n194.js +56 -0
- package/dist/chunk-q44zc68f.js +4301 -0
- package/dist/chunk-q8gknbdx.js +352 -0
- package/dist/chunk-q8xk3kdj.js +11 -0
- package/dist/chunk-qak46xtp.js +119 -0
- package/dist/chunk-qfq7absv.js +95 -0
- package/dist/chunk-qfsn720k.js +151 -0
- package/dist/chunk-qg4811f6.js +228 -0
- package/dist/chunk-qgzn3qps.js +90 -0
- package/dist/chunk-qhaggqkt.js +113 -0
- package/dist/chunk-qjjp27z8.js +195 -0
- package/dist/chunk-qxp0nye6.js +34 -0
- package/dist/chunk-qy3nagaq.js +4957 -0
- package/dist/chunk-qz2meav1.js +1452 -0
- package/dist/chunk-r50hne7m.js +63 -0
- package/dist/chunk-r6m0vgnv.js +80 -0
- package/dist/chunk-r7yw38vf.js +22864 -0
- package/dist/chunk-r8xc618w.js +42 -0
- package/dist/chunk-r961r5kj.js +87 -0
- package/dist/chunk-r9b5xrh0.js +66 -0
- package/dist/chunk-rcn2pd6q.js +477 -0
- package/dist/chunk-rdeh8p3y.js +148 -0
- package/dist/chunk-rg9x1742.js +542 -0
- package/dist/chunk-rgyzsbs3.js +39 -0
- package/dist/chunk-rk2fsxtz.js +16 -0
- package/dist/chunk-rkchkwv9.js +40 -0
- package/dist/chunk-rp8whpb3.js +478 -0
- package/dist/chunk-rpkxdtgr.js +68 -0
- package/dist/chunk-rpmntgyh.js +394 -0
- package/dist/chunk-rpshz4dy.js +614 -0
- package/dist/chunk-rqd60ay5.js +133 -0
- package/dist/chunk-rrsjf2ea.js +229 -0
- package/dist/chunk-rtjk8c8e.js +173 -0
- package/dist/chunk-rw0y2wdf.js +1017 -0
- package/dist/chunk-rx5w7ess.js +663 -0
- package/dist/chunk-rx8t9d35.js +1947 -0
- package/dist/chunk-rxcazxgf.js +195 -0
- package/dist/chunk-rxg6q3bp.js +1413 -0
- package/dist/chunk-rxrb7xnd.js +71 -0
- package/dist/chunk-rxrzxff3.js +118 -0
- package/dist/chunk-ryqjc943.js +71 -0
- package/dist/chunk-rzk9k2rf.js +81 -0
- package/dist/chunk-s2qv0nht.js +119 -0
- package/dist/chunk-s3hafnk3.js +2285 -0
- package/dist/chunk-s4a496tt.js +226 -0
- package/dist/chunk-s4d1h3ka.js +35 -0
- package/dist/chunk-sm3k3ze4.js +16525 -0
- package/dist/chunk-sn0bja82.js +385 -0
- package/dist/chunk-sngjggw1.js +4227 -0
- package/dist/chunk-sq047n34.js +364 -0
- package/dist/chunk-sttwe2tw.js +8584 -0
- package/dist/chunk-sw8qx1r0.js +86 -0
- package/dist/chunk-swstah6a.js +240 -0
- package/dist/chunk-syrkr0mf.js +63 -0
- package/dist/chunk-sz206bd9.js +26 -0
- package/dist/chunk-t09669cj.js +333 -0
- package/dist/chunk-t5f8e30k.js +602 -0
- package/dist/chunk-t5m78mc8.js +432 -0
- package/dist/chunk-t5x1dqwn.js +143 -0
- package/dist/chunk-t877ea0w.js +168 -0
- package/dist/chunk-t91hb71c.js +17 -0
- package/dist/chunk-tb636bcf.js +942 -0
- package/dist/chunk-tb8sykbr.js +426 -0
- package/dist/chunk-tbdkekz3.js +125 -0
- package/dist/chunk-td2gsz7s.js +225 -0
- package/dist/chunk-tenvxbyh.js +20 -0
- package/dist/chunk-texg4qqt.js +317 -0
- package/dist/chunk-teymzz80.js +266 -0
- package/dist/chunk-tj26qpf7.js +153 -0
- package/dist/chunk-tk85ec4p.js +395 -0
- package/dist/chunk-tq205h01.js +164 -0
- package/dist/chunk-tqzddjzg.js +61 -0
- package/dist/chunk-trqrj23e.js +134 -0
- package/dist/chunk-tw1hfsxv.js +2477 -0
- package/dist/chunk-txxdfq83.js +122 -0
- package/dist/chunk-v0yhe582.js +31 -0
- package/dist/chunk-v14184xm.js +15 -0
- package/dist/chunk-v1h9z4hw.js +138 -0
- package/dist/chunk-v3ey5j7f.js +329 -0
- package/dist/chunk-v3nh1sfn.js +208 -0
- package/dist/chunk-v3x8tcc0.js +45 -0
- package/dist/chunk-v4nqnvqq.js +3984 -0
- package/dist/chunk-v4ypszbb.js +15 -0
- package/dist/chunk-v7wbqcx9.js +63 -0
- package/dist/chunk-v8r5fev3.js +341 -0
- package/dist/chunk-v9zg5kzx.js +2810 -0
- package/dist/chunk-va1wh5ss.js +24 -0
- package/dist/chunk-vbfswhht.js +42 -0
- package/dist/chunk-ve7x2tfq.js +124 -0
- package/dist/chunk-vfz8k89y.js +485 -0
- package/dist/chunk-vgm5k14x.js +35678 -0
- package/dist/chunk-vh9pej3c.js +247 -0
- package/dist/chunk-vjxqyt6f.js +3820 -0
- package/dist/chunk-vpb1xstn.js +178 -0
- package/dist/chunk-vqt79tj8.js +110 -0
- package/dist/chunk-vr0n9pv9.js +152 -0
- package/dist/chunk-vrejmja5.js +90 -0
- package/dist/chunk-vrxasmdw.js +449 -0
- package/dist/chunk-vrxb946v.js +125 -0
- package/dist/chunk-vv4kj0q8.js +98 -0
- package/dist/chunk-vvpfng7w.js +8 -0
- package/dist/chunk-vw6ybyew.js +2007 -0
- package/dist/chunk-vwenx8ke.js +17 -0
- package/dist/chunk-vwfa0s5a.js +155 -0
- package/dist/chunk-vx71j8xe.js +63 -0
- package/dist/chunk-vxbjzggp.js +43 -0
- package/dist/chunk-vxjxtz8w.js +440 -0
- package/dist/chunk-vy0c1bwp.js +9 -0
- package/dist/chunk-w3zczyse.js +14 -0
- package/dist/chunk-w4p5t920.js +655 -0
- package/dist/chunk-w68wc625.js +287 -0
- package/dist/chunk-w9ddp3yf.js +96 -0
- package/dist/chunk-wcggm5ja.js +125 -0
- package/dist/chunk-wgnyph3q.js +1306 -0
- package/dist/chunk-wjm5pc1e.js +134 -0
- package/dist/chunk-wnve0drm.js +131 -0
- package/dist/chunk-wp27ev2k.js +135 -0
- package/dist/chunk-wyvy8a4x.js +131 -0
- package/dist/chunk-x671y4dk.js +129 -0
- package/dist/chunk-xbj5keyy.js +22 -0
- package/dist/chunk-xf4fzms8.js +39 -0
- package/dist/chunk-xf59k3zg.js +65 -0
- package/dist/chunk-xgzc4w49.js +204 -0
- package/dist/chunk-xhj7g13b.js +2149 -0
- package/dist/chunk-xjp0cd00.js +56 -0
- package/dist/chunk-xkhnmhqs.js +74 -0
- package/dist/chunk-xkrkqx61.js +55 -0
- package/dist/chunk-xmpgmeb8.js +114 -0
- package/dist/chunk-xrw80zgd.js +4249 -0
- package/dist/chunk-xrzc96g0.js +202 -0
- package/dist/chunk-xt76sm44.js +318 -0
- package/dist/chunk-xwet3awb.js +20 -0
- package/dist/chunk-xyg1sk2w.js +78 -0
- package/dist/chunk-y0jpkqb0.js +180 -0
- package/dist/chunk-y1q7rt9n.js +102 -0
- package/dist/chunk-y67ntyek.js +258 -0
- package/dist/chunk-ybk37qp9.js +37 -0
- package/dist/chunk-yc1stfve.js +5386 -0
- package/dist/chunk-ychjpjef.js +62 -0
- package/dist/chunk-yez8fa9g.js +276 -0
- package/dist/chunk-ygm7xszr.js +90 -0
- package/dist/chunk-ym11azkj.js +37 -0
- package/dist/chunk-ympz2h15.js +578 -0
- package/dist/chunk-yqx3az3n.js +129 -0
- package/dist/chunk-yt3nfhcc.js +152 -0
- package/dist/chunk-yy8q0n8s.js +120 -0
- package/dist/chunk-yzb92zxv.js +8 -0
- package/dist/chunk-yzet6xyr.js +119 -0
- package/dist/chunk-yzm97qp1.js +226 -0
- package/dist/chunk-z0jgeax8.js +35 -0
- package/dist/chunk-z1r3z6w6.js +29 -0
- package/dist/chunk-z2dp53wn.js +17 -0
- package/dist/chunk-z79355gz.js +308 -0
- package/dist/chunk-z7e94hxz.js +251 -0
- package/dist/chunk-z8cqdcec.js +173 -0
- package/dist/chunk-z99tbg45.js +148 -0
- package/dist/chunk-z9nsjcht.js +37 -0
- package/dist/chunk-za3k6h2h.js +470 -0
- package/dist/chunk-zacynq5p.js +265 -0
- package/dist/chunk-zb0x40az.js +1785 -0
- package/dist/chunk-zbxtzycc.js +274 -0
- package/dist/chunk-zga50181.js +342 -0
- package/dist/chunk-zhb2pns1.js +44 -0
- package/dist/chunk-zkch6trx.js +231 -0
- package/dist/chunk-znf3z4qt.js +954 -0
- package/dist/chunk-zp8zwdgq.js +72 -0
- package/dist/chunk-ztjd8pyf.js +120 -0
- package/dist/chunk-ztmb7geg.js +173 -0
- package/dist/chunk-zvr4snzv.js +887 -0
- package/dist/chunk-zw62m6n3.js +34858 -0
- package/dist/chunk-zwwdebd0.js +65 -0
- package/dist/chunk-zxc6x9w8.js +340 -0
- package/dist/chunk-zy2e7sz0.js +8 -0
- package/dist/chunk-zzf074w3.js +196 -0
- package/dist/chunk-zzz0nwb5.js +310 -0
- package/dist/cli-bun.js +2 -0
- package/dist/cli-node.js +2 -0
- package/dist/cli.js +218 -0
- package/dist/vendor/audio-capture/arm64-darwin/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/arm64-linux/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/arm64-win32/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/x64-darwin/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/x64-linux/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/x64-win32/audio-capture.node +0 -0
- package/dist/vendor/ripgrep/x64-win32/rg.exe +0 -0
- package/package.json +243 -0
- package/scripts/chrome-mcp-bridge-resolver.mjs +43 -0
- package/scripts/chrome-mcp-env.mjs +19 -0
- package/scripts/postinstall.cjs +339 -0
- package/scripts/run-parallel.mjs +10 -0
- package/scripts/setup-chrome-mcp.mjs +69 -0
|
@@ -0,0 +1,1413 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
getAutoModeDenials,
|
|
4
|
+
init_autoModeDenials
|
|
5
|
+
} from "./chunk-xwet3awb.js";
|
|
6
|
+
import {
|
|
7
|
+
detectUnreachableRules,
|
|
8
|
+
init_shadowedRuleDetection
|
|
9
|
+
} from "./chunk-qfq7absv.js";
|
|
10
|
+
import {
|
|
11
|
+
init_SearchBox
|
|
12
|
+
} from "./chunk-awgdfggg.js";
|
|
13
|
+
import {
|
|
14
|
+
init_useSearchInput,
|
|
15
|
+
useSearchInput
|
|
16
|
+
} from "./chunk-z79355gz.js";
|
|
17
|
+
import {
|
|
18
|
+
AddWorkspaceDirectory,
|
|
19
|
+
init_AddWorkspaceDirectory
|
|
20
|
+
} from "./chunk-dct29ggs.js";
|
|
21
|
+
import"./chunk-h9y0jnsy.js";
|
|
22
|
+
import"./chunk-2rf6asgf.js";
|
|
23
|
+
import {
|
|
24
|
+
BashTool,
|
|
25
|
+
SandboxManager,
|
|
26
|
+
Select,
|
|
27
|
+
TextInput,
|
|
28
|
+
WebFetchTool,
|
|
29
|
+
applyPermissionUpdate,
|
|
30
|
+
createPermissionRetryMessage,
|
|
31
|
+
deletePermissionRule,
|
|
32
|
+
getAllowRules,
|
|
33
|
+
getAskRules,
|
|
34
|
+
getDenyRules,
|
|
35
|
+
init_AppState,
|
|
36
|
+
init_BashTool,
|
|
37
|
+
init_PermissionUpdate,
|
|
38
|
+
init_TextInput,
|
|
39
|
+
init_WebFetchTool,
|
|
40
|
+
init_messages1 as init_messages,
|
|
41
|
+
init_permissions,
|
|
42
|
+
init_sandbox_adapter,
|
|
43
|
+
init_select,
|
|
44
|
+
init_useTerminalSize,
|
|
45
|
+
permissionRuleSourceDisplayString,
|
|
46
|
+
persistPermissionUpdate,
|
|
47
|
+
useAppState,
|
|
48
|
+
useSetAppState
|
|
49
|
+
} from "./chunk-gmdy2w3z.js";
|
|
50
|
+
import"./chunk-q0e485mg.js";
|
|
51
|
+
import"./chunk-2kcgxnvp.js";
|
|
52
|
+
import"./chunk-14p6wvsq.js";
|
|
53
|
+
import"./chunk-6s0q1s5r.js";
|
|
54
|
+
import"./chunk-3w9sye8h.js";
|
|
55
|
+
import"./chunk-nzxfj0gq.js";
|
|
56
|
+
import"./chunk-vr0n9pv9.js";
|
|
57
|
+
import"./chunk-9a9g5hbj.js";
|
|
58
|
+
import"./chunk-ptxteaeh.js";
|
|
59
|
+
import"./chunk-w4p5t920.js";
|
|
60
|
+
import"./chunk-rgyzsbs3.js";
|
|
61
|
+
import"./chunk-q3b4n194.js";
|
|
62
|
+
import"./chunk-kywtr3jg.js";
|
|
63
|
+
import"./chunk-eewg66y1.js";
|
|
64
|
+
import"./chunk-71sdcaq6.js";
|
|
65
|
+
import"./chunk-9hn8e6h1.js";
|
|
66
|
+
import"./chunk-7qey87th.js";
|
|
67
|
+
import"./chunk-zw62m6n3.js";
|
|
68
|
+
import"./chunk-1w20m7gw.js";
|
|
69
|
+
import"./chunk-zzf074w3.js";
|
|
70
|
+
import"./chunk-rpmntgyh.js";
|
|
71
|
+
import"./chunk-24kv69g3.js";
|
|
72
|
+
import {
|
|
73
|
+
init_useExitOnCtrlCDWithKeybindings,
|
|
74
|
+
useExitOnCtrlCDWithKeybindings
|
|
75
|
+
} from "./chunk-hzxzvzw8.js";
|
|
76
|
+
import"./chunk-30wnahyg.js";
|
|
77
|
+
import"./chunk-ztmb7geg.js";
|
|
78
|
+
import"./chunk-tbdkekz3.js";
|
|
79
|
+
import {
|
|
80
|
+
init_useKeybinding
|
|
81
|
+
} from "./chunk-65zbgg1n.js";
|
|
82
|
+
import"./chunk-4spgkgr3.js";
|
|
83
|
+
import"./chunk-60fkafk2.js";
|
|
84
|
+
import"./chunk-50m3a23z.js";
|
|
85
|
+
import"./chunk-6hygvrhn.js";
|
|
86
|
+
import"./chunk-7tfdhkpy.js";
|
|
87
|
+
import"./chunk-8gv2pjby.js";
|
|
88
|
+
import"./chunk-g06pm4n9.js";
|
|
89
|
+
import"./chunk-2p369q9z.js";
|
|
90
|
+
import"./chunk-z0jgeax8.js";
|
|
91
|
+
import"./chunk-w68wc625.js";
|
|
92
|
+
import"./chunk-6hr7742d.js";
|
|
93
|
+
import"./chunk-xyg1sk2w.js";
|
|
94
|
+
import"./chunk-935nrvdb.js";
|
|
95
|
+
import"./chunk-8zz4z1q3.js";
|
|
96
|
+
import"./chunk-fncpkzs5.js";
|
|
97
|
+
import"./chunk-hqxp6b72.js";
|
|
98
|
+
import"./chunk-m2c3bjv1.js";
|
|
99
|
+
import"./chunk-jhtccjc9.js";
|
|
100
|
+
import"./chunk-7nvday0n.js";
|
|
101
|
+
import"./chunk-vxbjzggp.js";
|
|
102
|
+
import"./chunk-yc1stfve.js";
|
|
103
|
+
import"./chunk-8yvsnrkr.js";
|
|
104
|
+
import"./chunk-5mmhfbxb.js";
|
|
105
|
+
import {
|
|
106
|
+
SOURCES,
|
|
107
|
+
getRelativeSettingsFilePathForSource,
|
|
108
|
+
init_constants,
|
|
109
|
+
init_permissionRuleParser,
|
|
110
|
+
init_settings1 as init_settings,
|
|
111
|
+
init_stringUtils,
|
|
112
|
+
permissionRuleValueFromString,
|
|
113
|
+
permissionRuleValueToString,
|
|
114
|
+
plural
|
|
115
|
+
} from "./chunk-eemjb825.js";
|
|
116
|
+
import"./chunk-ga1jkyqy.js";
|
|
117
|
+
import"./chunk-y1q7rt9n.js";
|
|
118
|
+
import"./chunk-8kct9arg.js";
|
|
119
|
+
import"./chunk-k7hexw3v.js";
|
|
120
|
+
import"./chunk-trqrj23e.js";
|
|
121
|
+
import"./chunk-za3k6h2h.js";
|
|
122
|
+
import"./chunk-8kf8h7xf.js";
|
|
123
|
+
import"./chunk-bgan4cpf.js";
|
|
124
|
+
import"./chunk-jmv7k0jn.js";
|
|
125
|
+
import"./chunk-hjxqmtg5.js";
|
|
126
|
+
import"./chunk-bzyzrq0k.js";
|
|
127
|
+
import"./chunk-vwenx8ke.js";
|
|
128
|
+
import"./chunk-q2h79ncs.js";
|
|
129
|
+
import"./chunk-v4ypszbb.js";
|
|
130
|
+
import"./chunk-qfsn720k.js";
|
|
131
|
+
import"./chunk-7qx3xhv3.js";
|
|
132
|
+
import"./chunk-j9475b46.js";
|
|
133
|
+
import"./chunk-fdwabr8p.js";
|
|
134
|
+
import"./chunk-e4dsy4g1.js";
|
|
135
|
+
import"./chunk-326zehp8.js";
|
|
136
|
+
import"./chunk-kc67kt75.js";
|
|
137
|
+
import"./chunk-40t1d75v.js";
|
|
138
|
+
import"./chunk-dbts5q5p.js";
|
|
139
|
+
import"./chunk-e3abfxpy.js";
|
|
140
|
+
import"./chunk-q44zc68f.js";
|
|
141
|
+
import"./chunk-fejeqe61.js";
|
|
142
|
+
import"./chunk-q1vrhh0q.js";
|
|
143
|
+
import"./chunk-hn4w9pkj.js";
|
|
144
|
+
import {
|
|
145
|
+
Dialog,
|
|
146
|
+
Newline,
|
|
147
|
+
Pane,
|
|
148
|
+
SearchBox,
|
|
149
|
+
StatusIcon,
|
|
150
|
+
Tab,
|
|
151
|
+
Tabs,
|
|
152
|
+
ThemedBox_default,
|
|
153
|
+
ThemedText,
|
|
154
|
+
init_source,
|
|
155
|
+
init_src,
|
|
156
|
+
source_default,
|
|
157
|
+
useKeybinding,
|
|
158
|
+
useTabHeaderFocus,
|
|
159
|
+
useTabsWidth,
|
|
160
|
+
useTerminalFocus,
|
|
161
|
+
useTerminalSize,
|
|
162
|
+
use_input_default
|
|
163
|
+
} from "./chunk-2g0ytd9d.js";
|
|
164
|
+
import {
|
|
165
|
+
require_jsx_dev_runtime,
|
|
166
|
+
require_react
|
|
167
|
+
} from "./chunk-de0qnnf7.js";
|
|
168
|
+
import"./chunk-j1mep9ck.js";
|
|
169
|
+
import"./chunk-6x35ffpx.js";
|
|
170
|
+
import"./chunk-1zbwhcbt.js";
|
|
171
|
+
import"./chunk-92bjkrf2.js";
|
|
172
|
+
import"./chunk-10k5jfc5.js";
|
|
173
|
+
import"./chunk-n9g24mwe.js";
|
|
174
|
+
import"./chunk-e3j7m7k2.js";
|
|
175
|
+
import"./chunk-hzmzwte2.js";
|
|
176
|
+
import"./chunk-pdvg91cg.js";
|
|
177
|
+
import"./chunk-c696122m.js";
|
|
178
|
+
import"./chunk-xbj5keyy.js";
|
|
179
|
+
import"./chunk-c1yc761e.js";
|
|
180
|
+
import {
|
|
181
|
+
figures_default,
|
|
182
|
+
init_figures
|
|
183
|
+
} from "./chunk-c5g9shkw.js";
|
|
184
|
+
import"./chunk-aeysytks.js";
|
|
185
|
+
import {
|
|
186
|
+
init_slowOperations,
|
|
187
|
+
jsonStringify
|
|
188
|
+
} from "./chunk-s3hafnk3.js";
|
|
189
|
+
import"./chunk-kb3758f7.js";
|
|
190
|
+
import {
|
|
191
|
+
getOriginalCwd,
|
|
192
|
+
init_state
|
|
193
|
+
} from "./chunk-9h9k5vz3.js";
|
|
194
|
+
import"./chunk-xmpgmeb8.js";
|
|
195
|
+
import"./chunk-2kz09j2s.js";
|
|
196
|
+
import"./chunk-c0k7b0jw.js";
|
|
197
|
+
import"./chunk-pecy49yr.js";
|
|
198
|
+
import"./chunk-azbab59e.js";
|
|
199
|
+
import"./chunk-3nk9q8dr.js";
|
|
200
|
+
import {
|
|
201
|
+
__esm,
|
|
202
|
+
__toESM
|
|
203
|
+
} from "./chunk-hhsxm2yr.js";
|
|
204
|
+
|
|
205
|
+
// src/components/permissions/rules/PermissionRuleDescription.tsx
|
|
206
|
+
function PermissionRuleDescription({
|
|
207
|
+
ruleValue
|
|
208
|
+
}) {
|
|
209
|
+
switch (ruleValue.toolName) {
|
|
210
|
+
case BashTool.name: {
|
|
211
|
+
if (ruleValue.ruleContent) {
|
|
212
|
+
if (ruleValue.ruleContent.endsWith(":*")) {
|
|
213
|
+
return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
214
|
+
dimColor: true,
|
|
215
|
+
children: [
|
|
216
|
+
"Any Bash command starting with",
|
|
217
|
+
" ",
|
|
218
|
+
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
219
|
+
bold: true,
|
|
220
|
+
children: ruleValue.ruleContent.slice(0, -2)
|
|
221
|
+
}, undefined, false, undefined, this)
|
|
222
|
+
]
|
|
223
|
+
}, undefined, true, undefined, this);
|
|
224
|
+
} else {
|
|
225
|
+
return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
226
|
+
dimColor: true,
|
|
227
|
+
children: [
|
|
228
|
+
"The Bash command ",
|
|
229
|
+
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
230
|
+
bold: true,
|
|
231
|
+
children: ruleValue.ruleContent
|
|
232
|
+
}, undefined, false, undefined, this)
|
|
233
|
+
]
|
|
234
|
+
}, undefined, true, undefined, this);
|
|
235
|
+
}
|
|
236
|
+
} else {
|
|
237
|
+
return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
238
|
+
dimColor: true,
|
|
239
|
+
children: "Any Bash command"
|
|
240
|
+
}, undefined, false, undefined, this);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
default: {
|
|
244
|
+
if (!ruleValue.ruleContent) {
|
|
245
|
+
return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
246
|
+
dimColor: true,
|
|
247
|
+
children: [
|
|
248
|
+
"Any use of the ",
|
|
249
|
+
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
250
|
+
bold: true,
|
|
251
|
+
children: ruleValue.toolName
|
|
252
|
+
}, undefined, false, undefined, this),
|
|
253
|
+
" tool"
|
|
254
|
+
]
|
|
255
|
+
}, undefined, true, undefined, this);
|
|
256
|
+
} else {
|
|
257
|
+
return null;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
var jsx_dev_runtime;
|
|
263
|
+
var init_PermissionRuleDescription = __esm(() => {
|
|
264
|
+
init_src();
|
|
265
|
+
init_BashTool();
|
|
266
|
+
jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
// src/components/permissions/rules/AddPermissionRules.tsx
|
|
270
|
+
function optionForPermissionSaveDestination(saveDestination) {
|
|
271
|
+
switch (saveDestination) {
|
|
272
|
+
case "localSettings":
|
|
273
|
+
return {
|
|
274
|
+
label: "Project settings (local)",
|
|
275
|
+
description: `Saved in ${getRelativeSettingsFilePathForSource("localSettings")}`,
|
|
276
|
+
value: saveDestination
|
|
277
|
+
};
|
|
278
|
+
case "projectSettings":
|
|
279
|
+
return {
|
|
280
|
+
label: "Project settings",
|
|
281
|
+
description: `Checked in at ${getRelativeSettingsFilePathForSource("projectSettings")}`,
|
|
282
|
+
value: saveDestination
|
|
283
|
+
};
|
|
284
|
+
case "userSettings":
|
|
285
|
+
return {
|
|
286
|
+
label: "User settings",
|
|
287
|
+
description: `Saved at ~/.redscope/settings.json`,
|
|
288
|
+
value: saveDestination
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
function AddPermissionRules({
|
|
293
|
+
onAddRules,
|
|
294
|
+
onCancel,
|
|
295
|
+
ruleValues,
|
|
296
|
+
ruleBehavior,
|
|
297
|
+
initialContext,
|
|
298
|
+
setToolPermissionContext
|
|
299
|
+
}) {
|
|
300
|
+
const allOptions = SOURCES.map(optionForPermissionSaveDestination);
|
|
301
|
+
const onSelect = import_react.useCallback((selectedValue) => {
|
|
302
|
+
if (selectedValue === "cancel") {
|
|
303
|
+
onCancel();
|
|
304
|
+
return;
|
|
305
|
+
} else if (SOURCES.includes(selectedValue)) {
|
|
306
|
+
const destination = selectedValue;
|
|
307
|
+
const updatedContext = applyPermissionUpdate(initialContext, {
|
|
308
|
+
type: "addRules",
|
|
309
|
+
rules: ruleValues,
|
|
310
|
+
behavior: ruleBehavior,
|
|
311
|
+
destination
|
|
312
|
+
});
|
|
313
|
+
persistPermissionUpdate({
|
|
314
|
+
type: "addRules",
|
|
315
|
+
rules: ruleValues,
|
|
316
|
+
behavior: ruleBehavior,
|
|
317
|
+
destination
|
|
318
|
+
});
|
|
319
|
+
setToolPermissionContext(updatedContext);
|
|
320
|
+
const rules = ruleValues.map((ruleValue) => ({
|
|
321
|
+
ruleValue,
|
|
322
|
+
ruleBehavior,
|
|
323
|
+
source: destination
|
|
324
|
+
}));
|
|
325
|
+
const sandboxAutoAllowEnabled = SandboxManager.isSandboxingEnabled() && SandboxManager.isAutoAllowBashIfSandboxedEnabled();
|
|
326
|
+
const allUnreachable = detectUnreachableRules(updatedContext, {
|
|
327
|
+
sandboxAutoAllowEnabled
|
|
328
|
+
});
|
|
329
|
+
const newUnreachable = allUnreachable.filter((u) => ruleValues.some((rv) => rv.toolName === u.rule.ruleValue.toolName && rv.ruleContent === u.rule.ruleValue.ruleContent));
|
|
330
|
+
onAddRules(rules, newUnreachable.length > 0 ? newUnreachable : undefined);
|
|
331
|
+
}
|
|
332
|
+
}, [
|
|
333
|
+
onAddRules,
|
|
334
|
+
onCancel,
|
|
335
|
+
ruleValues,
|
|
336
|
+
ruleBehavior,
|
|
337
|
+
initialContext,
|
|
338
|
+
setToolPermissionContext
|
|
339
|
+
]);
|
|
340
|
+
const title = `Add ${ruleBehavior} permission ${plural(ruleValues.length, "rule")}`;
|
|
341
|
+
return /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Dialog, {
|
|
342
|
+
title,
|
|
343
|
+
onCancel,
|
|
344
|
+
color: "permission",
|
|
345
|
+
children: [
|
|
346
|
+
/* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
|
|
347
|
+
flexDirection: "column",
|
|
348
|
+
paddingX: 2,
|
|
349
|
+
children: ruleValues.map((ruleValue) => /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
|
|
350
|
+
flexDirection: "column",
|
|
351
|
+
children: [
|
|
352
|
+
/* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
353
|
+
bold: true,
|
|
354
|
+
children: permissionRuleValueToString(ruleValue)
|
|
355
|
+
}, undefined, false, undefined, this),
|
|
356
|
+
/* @__PURE__ */ jsx_dev_runtime2.jsxDEV(PermissionRuleDescription, {
|
|
357
|
+
ruleValue
|
|
358
|
+
}, undefined, false, undefined, this)
|
|
359
|
+
]
|
|
360
|
+
}, permissionRuleValueToString(ruleValue), true, undefined, this))
|
|
361
|
+
}, undefined, false, undefined, this),
|
|
362
|
+
/* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
|
|
363
|
+
flexDirection: "column",
|
|
364
|
+
marginY: 1,
|
|
365
|
+
children: [
|
|
366
|
+
/* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
367
|
+
children: ruleValues.length === 1 ? "Where should this rule be saved?" : "Where should these rules be saved?"
|
|
368
|
+
}, undefined, false, undefined, this),
|
|
369
|
+
/* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Select, {
|
|
370
|
+
options: allOptions,
|
|
371
|
+
onChange: onSelect
|
|
372
|
+
}, undefined, false, undefined, this)
|
|
373
|
+
]
|
|
374
|
+
}, undefined, true, undefined, this)
|
|
375
|
+
]
|
|
376
|
+
}, undefined, true, undefined, this);
|
|
377
|
+
}
|
|
378
|
+
var import_react, jsx_dev_runtime2;
|
|
379
|
+
var init_AddPermissionRules = __esm(() => {
|
|
380
|
+
init_select();
|
|
381
|
+
init_src();
|
|
382
|
+
init_PermissionUpdate();
|
|
383
|
+
init_permissionRuleParser();
|
|
384
|
+
init_shadowedRuleDetection();
|
|
385
|
+
init_sandbox_adapter();
|
|
386
|
+
init_constants();
|
|
387
|
+
init_settings();
|
|
388
|
+
init_stringUtils();
|
|
389
|
+
init_PermissionRuleDescription();
|
|
390
|
+
import_react = __toESM(require_react(), 1);
|
|
391
|
+
jsx_dev_runtime2 = __toESM(require_jsx_dev_runtime(), 1);
|
|
392
|
+
});
|
|
393
|
+
|
|
394
|
+
// src/components/permissions/rules/PermissionRuleInput.tsx
|
|
395
|
+
function PermissionRuleInput({
|
|
396
|
+
onCancel,
|
|
397
|
+
onSubmit,
|
|
398
|
+
ruleBehavior
|
|
399
|
+
}) {
|
|
400
|
+
const [inputValue, setInputValue] = import_react2.useState("");
|
|
401
|
+
const [cursorOffset, setCursorOffset] = import_react2.useState(0);
|
|
402
|
+
const exitState = useExitOnCtrlCDWithKeybindings();
|
|
403
|
+
useKeybinding("confirm:no", onCancel, { context: "Settings" });
|
|
404
|
+
const { columns } = useTerminalSize();
|
|
405
|
+
const textInputColumns = columns - 6;
|
|
406
|
+
const handleSubmit = (value) => {
|
|
407
|
+
const trimmedValue = value.trim();
|
|
408
|
+
if (trimmedValue.length === 0) {
|
|
409
|
+
return;
|
|
410
|
+
}
|
|
411
|
+
const ruleValue = permissionRuleValueFromString(trimmedValue);
|
|
412
|
+
onSubmit(ruleValue, ruleBehavior);
|
|
413
|
+
};
|
|
414
|
+
return /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(jsx_dev_runtime3.Fragment, {
|
|
415
|
+
children: [
|
|
416
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
417
|
+
flexDirection: "column",
|
|
418
|
+
gap: 1,
|
|
419
|
+
borderStyle: "round",
|
|
420
|
+
paddingLeft: 1,
|
|
421
|
+
paddingRight: 1,
|
|
422
|
+
borderColor: "permission",
|
|
423
|
+
children: [
|
|
424
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
425
|
+
bold: true,
|
|
426
|
+
color: "permission",
|
|
427
|
+
children: [
|
|
428
|
+
"Add ",
|
|
429
|
+
ruleBehavior,
|
|
430
|
+
" permission rule"
|
|
431
|
+
]
|
|
432
|
+
}, undefined, true, undefined, this),
|
|
433
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
434
|
+
flexDirection: "column",
|
|
435
|
+
children: [
|
|
436
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
437
|
+
children: [
|
|
438
|
+
"Permission rules are a tool name, optionally followed by a specifier in parentheses.",
|
|
439
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Newline, {}, undefined, false, undefined, this),
|
|
440
|
+
"e.g.,",
|
|
441
|
+
" ",
|
|
442
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
443
|
+
bold: true,
|
|
444
|
+
children: permissionRuleValueToString({ toolName: WebFetchTool.name })
|
|
445
|
+
}, undefined, false, undefined, this),
|
|
446
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
447
|
+
bold: false,
|
|
448
|
+
children: " or "
|
|
449
|
+
}, undefined, false, undefined, this),
|
|
450
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
451
|
+
bold: true,
|
|
452
|
+
children: permissionRuleValueToString({
|
|
453
|
+
toolName: BashTool.name,
|
|
454
|
+
ruleContent: "ls:*"
|
|
455
|
+
})
|
|
456
|
+
}, undefined, false, undefined, this)
|
|
457
|
+
]
|
|
458
|
+
}, undefined, true, undefined, this),
|
|
459
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
460
|
+
borderDimColor: true,
|
|
461
|
+
borderStyle: "round",
|
|
462
|
+
marginY: 1,
|
|
463
|
+
paddingLeft: 1,
|
|
464
|
+
children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(TextInput, {
|
|
465
|
+
showCursor: true,
|
|
466
|
+
value: inputValue,
|
|
467
|
+
onChange: setInputValue,
|
|
468
|
+
onSubmit: handleSubmit,
|
|
469
|
+
placeholder: `Enter permission rule${figures_default.ellipsis}`,
|
|
470
|
+
columns: textInputColumns,
|
|
471
|
+
cursorOffset,
|
|
472
|
+
onChangeCursorOffset: setCursorOffset
|
|
473
|
+
}, undefined, false, undefined, this)
|
|
474
|
+
}, undefined, false, undefined, this)
|
|
475
|
+
]
|
|
476
|
+
}, undefined, true, undefined, this)
|
|
477
|
+
]
|
|
478
|
+
}, undefined, true, undefined, this),
|
|
479
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
480
|
+
marginLeft: 3,
|
|
481
|
+
children: exitState.pending ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
482
|
+
dimColor: true,
|
|
483
|
+
children: [
|
|
484
|
+
"Press ",
|
|
485
|
+
exitState.keyName,
|
|
486
|
+
" again to exit"
|
|
487
|
+
]
|
|
488
|
+
}, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
489
|
+
dimColor: true,
|
|
490
|
+
children: "Enter to submit \xB7 Esc to cancel"
|
|
491
|
+
}, undefined, false, undefined, this)
|
|
492
|
+
}, undefined, false, undefined, this)
|
|
493
|
+
]
|
|
494
|
+
}, undefined, true, undefined, this);
|
|
495
|
+
}
|
|
496
|
+
var import_react2, jsx_dev_runtime3;
|
|
497
|
+
var init_PermissionRuleInput = __esm(() => {
|
|
498
|
+
init_figures();
|
|
499
|
+
init_TextInput();
|
|
500
|
+
init_useExitOnCtrlCDWithKeybindings();
|
|
501
|
+
init_useTerminalSize();
|
|
502
|
+
init_src();
|
|
503
|
+
init_useKeybinding();
|
|
504
|
+
init_BashTool();
|
|
505
|
+
init_WebFetchTool();
|
|
506
|
+
init_permissionRuleParser();
|
|
507
|
+
import_react2 = __toESM(require_react(), 1);
|
|
508
|
+
jsx_dev_runtime3 = __toESM(require_jsx_dev_runtime(), 1);
|
|
509
|
+
});
|
|
510
|
+
|
|
511
|
+
// src/components/permissions/rules/RecentDenialsTab.tsx
|
|
512
|
+
function RecentDenialsTab({
|
|
513
|
+
onHeaderFocusChange,
|
|
514
|
+
onStateChange
|
|
515
|
+
}) {
|
|
516
|
+
const { headerFocused, focusHeader } = useTabHeaderFocus();
|
|
517
|
+
import_react3.useEffect(() => {
|
|
518
|
+
onHeaderFocusChange?.(headerFocused);
|
|
519
|
+
}, [headerFocused, onHeaderFocusChange]);
|
|
520
|
+
const [denials] = import_react3.useState(() => getAutoModeDenials());
|
|
521
|
+
const [approved, setApproved] = import_react3.useState(() => new Set);
|
|
522
|
+
const [retry, setRetry] = import_react3.useState(() => new Set);
|
|
523
|
+
const [focusedIdx, setFocusedIdx] = import_react3.useState(0);
|
|
524
|
+
import_react3.useEffect(() => {
|
|
525
|
+
onStateChange({ approved, retry, denials });
|
|
526
|
+
}, [approved, retry, denials, onStateChange]);
|
|
527
|
+
const handleSelect = import_react3.useCallback((value) => {
|
|
528
|
+
const idx = Number(value);
|
|
529
|
+
setApproved((prev) => {
|
|
530
|
+
const next = new Set(prev);
|
|
531
|
+
if (next.has(idx))
|
|
532
|
+
next.delete(idx);
|
|
533
|
+
else
|
|
534
|
+
next.add(idx);
|
|
535
|
+
return next;
|
|
536
|
+
});
|
|
537
|
+
}, []);
|
|
538
|
+
const handleFocus = import_react3.useCallback((value) => {
|
|
539
|
+
setFocusedIdx(Number(value));
|
|
540
|
+
}, []);
|
|
541
|
+
use_input_default((input, _key) => {
|
|
542
|
+
if (input === "r") {
|
|
543
|
+
setRetry((prev) => {
|
|
544
|
+
const next = new Set(prev);
|
|
545
|
+
if (next.has(focusedIdx))
|
|
546
|
+
next.delete(focusedIdx);
|
|
547
|
+
else
|
|
548
|
+
next.add(focusedIdx);
|
|
549
|
+
return next;
|
|
550
|
+
});
|
|
551
|
+
setApproved((prev) => {
|
|
552
|
+
if (prev.has(focusedIdx))
|
|
553
|
+
return prev;
|
|
554
|
+
const next = new Set(prev);
|
|
555
|
+
next.add(focusedIdx);
|
|
556
|
+
return next;
|
|
557
|
+
});
|
|
558
|
+
}
|
|
559
|
+
}, { isActive: denials.length > 0 });
|
|
560
|
+
if (denials.length === 0) {
|
|
561
|
+
return /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
562
|
+
dimColor: true,
|
|
563
|
+
children: "No recent denials. Commands denied by the auto mode classifier will appear here."
|
|
564
|
+
}, undefined, false, undefined, this);
|
|
565
|
+
}
|
|
566
|
+
const options = denials.map((d, idx) => {
|
|
567
|
+
const isApproved = approved.has(idx);
|
|
568
|
+
const suffix = retry.has(idx) ? " (retry)" : "";
|
|
569
|
+
return {
|
|
570
|
+
label: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
571
|
+
children: [
|
|
572
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(StatusIcon, {
|
|
573
|
+
status: isApproved ? "success" : "error",
|
|
574
|
+
withSpace: true
|
|
575
|
+
}, undefined, false, undefined, this),
|
|
576
|
+
d.display,
|
|
577
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
578
|
+
dimColor: true,
|
|
579
|
+
children: suffix
|
|
580
|
+
}, undefined, false, undefined, this)
|
|
581
|
+
]
|
|
582
|
+
}, undefined, true, undefined, this),
|
|
583
|
+
value: String(idx)
|
|
584
|
+
};
|
|
585
|
+
});
|
|
586
|
+
return /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
|
|
587
|
+
flexDirection: "column",
|
|
588
|
+
children: [
|
|
589
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
590
|
+
children: "Commands recently denied by the auto mode classifier."
|
|
591
|
+
}, undefined, false, undefined, this),
|
|
592
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
|
|
593
|
+
marginTop: 1,
|
|
594
|
+
children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Select, {
|
|
595
|
+
options,
|
|
596
|
+
onChange: handleSelect,
|
|
597
|
+
onFocus: handleFocus,
|
|
598
|
+
visibleOptionCount: Math.min(10, options.length),
|
|
599
|
+
isDisabled: headerFocused,
|
|
600
|
+
onUpFromFirstItem: focusHeader
|
|
601
|
+
}, undefined, false, undefined, this)
|
|
602
|
+
}, undefined, false, undefined, this)
|
|
603
|
+
]
|
|
604
|
+
}, undefined, true, undefined, this);
|
|
605
|
+
}
|
|
606
|
+
var import_react3, jsx_dev_runtime4;
|
|
607
|
+
var init_RecentDenialsTab = __esm(() => {
|
|
608
|
+
init_src();
|
|
609
|
+
init_autoModeDenials();
|
|
610
|
+
init_select();
|
|
611
|
+
init_src();
|
|
612
|
+
import_react3 = __toESM(require_react(), 1);
|
|
613
|
+
jsx_dev_runtime4 = __toESM(require_jsx_dev_runtime(), 1);
|
|
614
|
+
});
|
|
615
|
+
|
|
616
|
+
// src/components/permissions/rules/RemoveWorkspaceDirectory.tsx
|
|
617
|
+
function RemoveWorkspaceDirectory({
|
|
618
|
+
directoryPath,
|
|
619
|
+
onRemove,
|
|
620
|
+
onCancel,
|
|
621
|
+
permissionContext,
|
|
622
|
+
setPermissionContext
|
|
623
|
+
}) {
|
|
624
|
+
const handleRemove = import_react4.useCallback(() => {
|
|
625
|
+
const updatedContext = applyPermissionUpdate(permissionContext, {
|
|
626
|
+
type: "removeDirectories",
|
|
627
|
+
directories: [directoryPath],
|
|
628
|
+
destination: "session"
|
|
629
|
+
});
|
|
630
|
+
setPermissionContext(updatedContext);
|
|
631
|
+
onRemove();
|
|
632
|
+
}, [directoryPath, permissionContext, setPermissionContext, onRemove]);
|
|
633
|
+
const handleSelect = import_react4.useCallback((value) => {
|
|
634
|
+
if (value === "yes") {
|
|
635
|
+
handleRemove();
|
|
636
|
+
} else {
|
|
637
|
+
onCancel();
|
|
638
|
+
}
|
|
639
|
+
}, [handleRemove, onCancel]);
|
|
640
|
+
return /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Dialog, {
|
|
641
|
+
title: "Remove directory from workspace?",
|
|
642
|
+
onCancel,
|
|
643
|
+
color: "error",
|
|
644
|
+
children: [
|
|
645
|
+
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
|
|
646
|
+
marginX: 2,
|
|
647
|
+
flexDirection: "column",
|
|
648
|
+
children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
|
|
649
|
+
bold: true,
|
|
650
|
+
children: directoryPath
|
|
651
|
+
}, undefined, false, undefined, this)
|
|
652
|
+
}, undefined, false, undefined, this),
|
|
653
|
+
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
|
|
654
|
+
children: "RedScope AI will no longer have access to files in this directory."
|
|
655
|
+
}, undefined, false, undefined, this),
|
|
656
|
+
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Select, {
|
|
657
|
+
onChange: handleSelect,
|
|
658
|
+
onCancel,
|
|
659
|
+
options: [
|
|
660
|
+
{ label: "Yes", value: "yes" },
|
|
661
|
+
{ label: "No", value: "no" }
|
|
662
|
+
]
|
|
663
|
+
}, undefined, false, undefined, this)
|
|
664
|
+
]
|
|
665
|
+
}, undefined, true, undefined, this);
|
|
666
|
+
}
|
|
667
|
+
var import_react4, jsx_dev_runtime5;
|
|
668
|
+
var init_RemoveWorkspaceDirectory = __esm(() => {
|
|
669
|
+
init_select();
|
|
670
|
+
init_src();
|
|
671
|
+
init_PermissionUpdate();
|
|
672
|
+
init_src();
|
|
673
|
+
import_react4 = __toESM(require_react(), 1);
|
|
674
|
+
jsx_dev_runtime5 = __toESM(require_jsx_dev_runtime(), 1);
|
|
675
|
+
});
|
|
676
|
+
|
|
677
|
+
// src/components/permissions/rules/WorkspaceTab.tsx
|
|
678
|
+
function WorkspaceTab({
|
|
679
|
+
onExit,
|
|
680
|
+
toolPermissionContext,
|
|
681
|
+
onRequestAddDirectory,
|
|
682
|
+
onRequestRemoveDirectory,
|
|
683
|
+
onHeaderFocusChange
|
|
684
|
+
}) {
|
|
685
|
+
const { headerFocused, focusHeader } = useTabHeaderFocus();
|
|
686
|
+
import_react5.useEffect(() => {
|
|
687
|
+
onHeaderFocusChange?.(headerFocused);
|
|
688
|
+
}, [headerFocused, onHeaderFocusChange]);
|
|
689
|
+
const additionalDirectories = React.useMemo(() => {
|
|
690
|
+
return Array.from(toolPermissionContext.additionalWorkingDirectories.keys()).map((path) => ({
|
|
691
|
+
path,
|
|
692
|
+
isCurrent: false,
|
|
693
|
+
isDeletable: true
|
|
694
|
+
}));
|
|
695
|
+
}, [toolPermissionContext.additionalWorkingDirectories]);
|
|
696
|
+
const handleDirectorySelect = import_react5.useCallback((selectedValue) => {
|
|
697
|
+
if (selectedValue === "add-directory") {
|
|
698
|
+
onRequestAddDirectory();
|
|
699
|
+
return;
|
|
700
|
+
}
|
|
701
|
+
const directory = additionalDirectories.find((d) => d.path === selectedValue);
|
|
702
|
+
if (directory && directory.isDeletable) {
|
|
703
|
+
onRequestRemoveDirectory(directory.path);
|
|
704
|
+
}
|
|
705
|
+
}, [additionalDirectories, onRequestAddDirectory, onRequestRemoveDirectory]);
|
|
706
|
+
const handleCancel = import_react5.useCallback(() => onExit("Workspace dialog dismissed", { display: "system" }), [onExit]);
|
|
707
|
+
const options = React.useMemo(() => {
|
|
708
|
+
const opts = additionalDirectories.map((dir) => ({
|
|
709
|
+
label: dir.path,
|
|
710
|
+
value: dir.path
|
|
711
|
+
}));
|
|
712
|
+
opts.push({
|
|
713
|
+
label: `Add directory${figures_default.ellipsis}`,
|
|
714
|
+
value: "add-directory"
|
|
715
|
+
});
|
|
716
|
+
return opts;
|
|
717
|
+
}, [additionalDirectories]);
|
|
718
|
+
return /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
|
|
719
|
+
flexDirection: "column",
|
|
720
|
+
marginBottom: 1,
|
|
721
|
+
children: [
|
|
722
|
+
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
|
|
723
|
+
flexDirection: "row",
|
|
724
|
+
marginTop: 1,
|
|
725
|
+
marginLeft: 2,
|
|
726
|
+
gap: 1,
|
|
727
|
+
children: [
|
|
728
|
+
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
|
|
729
|
+
children: `- ${getOriginalCwd()}`
|
|
730
|
+
}, undefined, false, undefined, this),
|
|
731
|
+
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
|
|
732
|
+
dimColor: true,
|
|
733
|
+
children: "(Original working directory)"
|
|
734
|
+
}, undefined, false, undefined, this)
|
|
735
|
+
]
|
|
736
|
+
}, undefined, true, undefined, this),
|
|
737
|
+
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Select, {
|
|
738
|
+
options,
|
|
739
|
+
onChange: handleDirectorySelect,
|
|
740
|
+
onCancel: handleCancel,
|
|
741
|
+
visibleOptionCount: Math.min(10, options.length),
|
|
742
|
+
onUpFromFirstItem: focusHeader,
|
|
743
|
+
isDisabled: headerFocused
|
|
744
|
+
}, undefined, false, undefined, this)
|
|
745
|
+
]
|
|
746
|
+
}, undefined, true, undefined, this);
|
|
747
|
+
}
|
|
748
|
+
var React, import_react5, jsx_dev_runtime6;
|
|
749
|
+
var init_WorkspaceTab = __esm(() => {
|
|
750
|
+
init_figures();
|
|
751
|
+
init_state();
|
|
752
|
+
init_select();
|
|
753
|
+
init_src();
|
|
754
|
+
React = __toESM(require_react(), 1);
|
|
755
|
+
import_react5 = __toESM(require_react(), 1);
|
|
756
|
+
jsx_dev_runtime6 = __toESM(require_jsx_dev_runtime(), 1);
|
|
757
|
+
});
|
|
758
|
+
|
|
759
|
+
// src/components/permissions/rules/PermissionRuleList.tsx
|
|
760
|
+
function RuleSourceText({ rule }) {
|
|
761
|
+
return /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
|
|
762
|
+
dimColor: true,
|
|
763
|
+
children: `From ${permissionRuleSourceDisplayString(rule.source)}`
|
|
764
|
+
}, undefined, false, undefined, this);
|
|
765
|
+
}
|
|
766
|
+
function getRuleBehaviorLabel(ruleBehavior) {
|
|
767
|
+
switch (ruleBehavior) {
|
|
768
|
+
case "allow":
|
|
769
|
+
return "allowed";
|
|
770
|
+
case "deny":
|
|
771
|
+
return "denied";
|
|
772
|
+
case "ask":
|
|
773
|
+
return "ask";
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
function RuleDetails({
|
|
777
|
+
rule,
|
|
778
|
+
onDelete,
|
|
779
|
+
onCancel
|
|
780
|
+
}) {
|
|
781
|
+
const exitState = useExitOnCtrlCDWithKeybindings();
|
|
782
|
+
useKeybinding("confirm:no", onCancel, { context: "Confirmation" });
|
|
783
|
+
const ruleDescription = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
|
|
784
|
+
flexDirection: "column",
|
|
785
|
+
marginX: 2,
|
|
786
|
+
children: [
|
|
787
|
+
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
|
|
788
|
+
bold: true,
|
|
789
|
+
children: permissionRuleValueToString(rule.ruleValue)
|
|
790
|
+
}, undefined, false, undefined, this),
|
|
791
|
+
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(PermissionRuleDescription, {
|
|
792
|
+
ruleValue: rule.ruleValue
|
|
793
|
+
}, undefined, false, undefined, this),
|
|
794
|
+
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(RuleSourceText, {
|
|
795
|
+
rule
|
|
796
|
+
}, undefined, false, undefined, this)
|
|
797
|
+
]
|
|
798
|
+
}, undefined, true, undefined, this);
|
|
799
|
+
const footer = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
|
|
800
|
+
marginLeft: 3,
|
|
801
|
+
children: exitState.pending ? /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
|
|
802
|
+
dimColor: true,
|
|
803
|
+
children: [
|
|
804
|
+
"Press ",
|
|
805
|
+
exitState.keyName,
|
|
806
|
+
" again to exit"
|
|
807
|
+
]
|
|
808
|
+
}, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
|
|
809
|
+
dimColor: true,
|
|
810
|
+
children: "Esc to cancel"
|
|
811
|
+
}, undefined, false, undefined, this)
|
|
812
|
+
}, undefined, false, undefined, this);
|
|
813
|
+
if (rule.source === "policySettings") {
|
|
814
|
+
return /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
|
|
815
|
+
children: [
|
|
816
|
+
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
|
|
817
|
+
flexDirection: "column",
|
|
818
|
+
gap: 1,
|
|
819
|
+
borderStyle: "round",
|
|
820
|
+
paddingLeft: 1,
|
|
821
|
+
paddingRight: 1,
|
|
822
|
+
borderColor: "permission",
|
|
823
|
+
children: [
|
|
824
|
+
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
|
|
825
|
+
bold: true,
|
|
826
|
+
color: "permission",
|
|
827
|
+
children: "Rule details"
|
|
828
|
+
}, undefined, false, undefined, this),
|
|
829
|
+
ruleDescription,
|
|
830
|
+
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
|
|
831
|
+
italic: true,
|
|
832
|
+
children: [
|
|
833
|
+
"This rule is configured by managed settings and cannot be modified.",
|
|
834
|
+
`
|
|
835
|
+
`,
|
|
836
|
+
"Contact your system administrator for more information."
|
|
837
|
+
]
|
|
838
|
+
}, undefined, true, undefined, this)
|
|
839
|
+
]
|
|
840
|
+
}, undefined, true, undefined, this),
|
|
841
|
+
footer
|
|
842
|
+
]
|
|
843
|
+
}, undefined, true, undefined, this);
|
|
844
|
+
}
|
|
845
|
+
return /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
|
|
846
|
+
children: [
|
|
847
|
+
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
|
|
848
|
+
flexDirection: "column",
|
|
849
|
+
gap: 1,
|
|
850
|
+
borderStyle: "round",
|
|
851
|
+
paddingLeft: 1,
|
|
852
|
+
paddingRight: 1,
|
|
853
|
+
borderColor: "error",
|
|
854
|
+
children: [
|
|
855
|
+
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
|
|
856
|
+
bold: true,
|
|
857
|
+
color: "error",
|
|
858
|
+
children: [
|
|
859
|
+
"Delete ",
|
|
860
|
+
getRuleBehaviorLabel(rule.ruleBehavior),
|
|
861
|
+
" tool?"
|
|
862
|
+
]
|
|
863
|
+
}, undefined, true, undefined, this),
|
|
864
|
+
ruleDescription,
|
|
865
|
+
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
|
|
866
|
+
children: "Are you sure you want to delete this permission rule?"
|
|
867
|
+
}, undefined, false, undefined, this),
|
|
868
|
+
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Select, {
|
|
869
|
+
onChange: (_) => _ === "yes" ? onDelete() : onCancel(),
|
|
870
|
+
onCancel,
|
|
871
|
+
options: [
|
|
872
|
+
{ label: "Yes", value: "yes" },
|
|
873
|
+
{ label: "No", value: "no" }
|
|
874
|
+
]
|
|
875
|
+
}, undefined, false, undefined, this)
|
|
876
|
+
]
|
|
877
|
+
}, undefined, true, undefined, this),
|
|
878
|
+
footer
|
|
879
|
+
]
|
|
880
|
+
}, undefined, true, undefined, this);
|
|
881
|
+
}
|
|
882
|
+
function RulesTabContent(props) {
|
|
883
|
+
const {
|
|
884
|
+
options,
|
|
885
|
+
searchQuery,
|
|
886
|
+
isSearchMode,
|
|
887
|
+
isFocused,
|
|
888
|
+
onSelect,
|
|
889
|
+
onCancel,
|
|
890
|
+
lastFocusedRuleKey,
|
|
891
|
+
cursorOffset,
|
|
892
|
+
onHeaderFocusChange
|
|
893
|
+
} = props;
|
|
894
|
+
const tabWidth = useTabsWidth();
|
|
895
|
+
const { headerFocused, focusHeader, blurHeader } = useTabHeaderFocus();
|
|
896
|
+
import_react6.useEffect(() => {
|
|
897
|
+
if (isSearchMode && headerFocused)
|
|
898
|
+
blurHeader();
|
|
899
|
+
}, [isSearchMode, headerFocused, blurHeader]);
|
|
900
|
+
import_react6.useEffect(() => {
|
|
901
|
+
onHeaderFocusChange?.(headerFocused);
|
|
902
|
+
}, [headerFocused, onHeaderFocusChange]);
|
|
903
|
+
return /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
|
|
904
|
+
flexDirection: "column",
|
|
905
|
+
children: [
|
|
906
|
+
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
|
|
907
|
+
marginBottom: 1,
|
|
908
|
+
flexDirection: "column",
|
|
909
|
+
children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(SearchBox, {
|
|
910
|
+
query: searchQuery,
|
|
911
|
+
isFocused: isSearchMode && !headerFocused,
|
|
912
|
+
isTerminalFocused: isFocused,
|
|
913
|
+
width: tabWidth,
|
|
914
|
+
cursorOffset
|
|
915
|
+
}, undefined, false, undefined, this)
|
|
916
|
+
}, undefined, false, undefined, this),
|
|
917
|
+
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Select, {
|
|
918
|
+
options,
|
|
919
|
+
onChange: onSelect,
|
|
920
|
+
onCancel,
|
|
921
|
+
visibleOptionCount: Math.min(10, options.length),
|
|
922
|
+
isDisabled: isSearchMode || headerFocused,
|
|
923
|
+
defaultFocusValue: lastFocusedRuleKey,
|
|
924
|
+
onUpFromFirstItem: focusHeader
|
|
925
|
+
}, undefined, false, undefined, this)
|
|
926
|
+
]
|
|
927
|
+
}, undefined, true, undefined, this);
|
|
928
|
+
}
|
|
929
|
+
function PermissionRulesTab({
|
|
930
|
+
tab,
|
|
931
|
+
getRulesOptions,
|
|
932
|
+
handleToolSelect,
|
|
933
|
+
...rulesProps
|
|
934
|
+
}) {
|
|
935
|
+
return /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
|
|
936
|
+
flexDirection: "column",
|
|
937
|
+
flexShrink: tab === "allow" ? 0 : undefined,
|
|
938
|
+
children: [
|
|
939
|
+
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
|
|
940
|
+
children: {
|
|
941
|
+
allow: "RedScope AI won't ask before using allowed tools.",
|
|
942
|
+
ask: "RedScope AI will always ask for confirmation before using these tools.",
|
|
943
|
+
deny: "RedScope AI will always reject requests to use denied tools."
|
|
944
|
+
}[tab]
|
|
945
|
+
}, undefined, false, undefined, this),
|
|
946
|
+
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(RulesTabContent, {
|
|
947
|
+
options: getRulesOptions(tab, rulesProps.searchQuery).options,
|
|
948
|
+
onSelect: (v) => handleToolSelect(v, tab),
|
|
949
|
+
...rulesProps
|
|
950
|
+
}, undefined, false, undefined, this)
|
|
951
|
+
]
|
|
952
|
+
}, undefined, true, undefined, this);
|
|
953
|
+
}
|
|
954
|
+
function PermissionRuleList({
|
|
955
|
+
onExit,
|
|
956
|
+
initialTab,
|
|
957
|
+
onRetryDenials
|
|
958
|
+
}) {
|
|
959
|
+
const hasDenials = getAutoModeDenials().length > 0;
|
|
960
|
+
const defaultTab = initialTab ?? (hasDenials ? "recent" : "allow");
|
|
961
|
+
const [changes, setChanges] = import_react6.useState([]);
|
|
962
|
+
const toolPermissionContext = useAppState((s) => s.toolPermissionContext);
|
|
963
|
+
const setAppState = useSetAppState();
|
|
964
|
+
const isTerminalFocused = useTerminalFocus();
|
|
965
|
+
const denialStateRef = import_react6.useRef({ approved: new Set, retry: new Set, denials: [] });
|
|
966
|
+
const handleDenialStateChange = import_react6.useCallback((s) => {
|
|
967
|
+
denialStateRef.current = s;
|
|
968
|
+
}, []);
|
|
969
|
+
const [selectedRule, setSelectedRule] = import_react6.useState();
|
|
970
|
+
const [lastFocusedRuleKey, setLastFocusedRuleKey] = import_react6.useState();
|
|
971
|
+
const [addingRuleToTab, setAddingRuleToTab] = import_react6.useState(null);
|
|
972
|
+
const [validatedRule, setValidatedRule] = import_react6.useState(null);
|
|
973
|
+
const [isAddingWorkspaceDirectory, setIsAddingWorkspaceDirectory] = import_react6.useState(false);
|
|
974
|
+
const [removingDirectory, setRemovingDirectory] = import_react6.useState(null);
|
|
975
|
+
const [isSearchMode, setIsSearchMode] = import_react6.useState(false);
|
|
976
|
+
const [headerFocused, setHeaderFocused] = import_react6.useState(true);
|
|
977
|
+
const handleHeaderFocusChange = import_react6.useCallback((focused) => {
|
|
978
|
+
setHeaderFocused(focused);
|
|
979
|
+
}, []);
|
|
980
|
+
const allowRulesByKey = import_react6.useMemo(() => {
|
|
981
|
+
const map = new Map;
|
|
982
|
+
getAllowRules(toolPermissionContext).forEach((rule) => {
|
|
983
|
+
map.set(jsonStringify(rule), rule);
|
|
984
|
+
});
|
|
985
|
+
return map;
|
|
986
|
+
}, [toolPermissionContext]);
|
|
987
|
+
const denyRulesByKey = import_react6.useMemo(() => {
|
|
988
|
+
const map = new Map;
|
|
989
|
+
getDenyRules(toolPermissionContext).forEach((rule) => {
|
|
990
|
+
map.set(jsonStringify(rule), rule);
|
|
991
|
+
});
|
|
992
|
+
return map;
|
|
993
|
+
}, [toolPermissionContext]);
|
|
994
|
+
const askRulesByKey = import_react6.useMemo(() => {
|
|
995
|
+
const map = new Map;
|
|
996
|
+
getAskRules(toolPermissionContext).forEach((rule) => {
|
|
997
|
+
map.set(jsonStringify(rule), rule);
|
|
998
|
+
});
|
|
999
|
+
return map;
|
|
1000
|
+
}, [toolPermissionContext]);
|
|
1001
|
+
const getRulesOptions = import_react6.useCallback((tab, query = "") => {
|
|
1002
|
+
const rulesByKey = (() => {
|
|
1003
|
+
switch (tab) {
|
|
1004
|
+
case "allow":
|
|
1005
|
+
return allowRulesByKey;
|
|
1006
|
+
case "deny":
|
|
1007
|
+
return denyRulesByKey;
|
|
1008
|
+
case "ask":
|
|
1009
|
+
return askRulesByKey;
|
|
1010
|
+
case "workspace":
|
|
1011
|
+
case "recent":
|
|
1012
|
+
return new Map;
|
|
1013
|
+
}
|
|
1014
|
+
})();
|
|
1015
|
+
const options = [];
|
|
1016
|
+
if (tab !== "workspace" && tab !== "recent" && !query) {
|
|
1017
|
+
options.push({
|
|
1018
|
+
label: `Add a new rule${figures_default.ellipsis}`,
|
|
1019
|
+
value: "add-new-rule"
|
|
1020
|
+
});
|
|
1021
|
+
}
|
|
1022
|
+
const sortedRuleKeys = Array.from(rulesByKey.keys()).sort((a, b) => {
|
|
1023
|
+
const ruleA = rulesByKey.get(a);
|
|
1024
|
+
const ruleB = rulesByKey.get(b);
|
|
1025
|
+
if (ruleA && ruleB) {
|
|
1026
|
+
const ruleAString = permissionRuleValueToString(ruleA.ruleValue).toLowerCase();
|
|
1027
|
+
const ruleBString = permissionRuleValueToString(ruleB.ruleValue).toLowerCase();
|
|
1028
|
+
return ruleAString.localeCompare(ruleBString);
|
|
1029
|
+
}
|
|
1030
|
+
return 0;
|
|
1031
|
+
});
|
|
1032
|
+
const lowerQuery = query.toLowerCase();
|
|
1033
|
+
for (const ruleKey of sortedRuleKeys) {
|
|
1034
|
+
const rule = rulesByKey.get(ruleKey);
|
|
1035
|
+
if (rule) {
|
|
1036
|
+
const ruleString = permissionRuleValueToString(rule.ruleValue);
|
|
1037
|
+
if (query && !ruleString.toLowerCase().includes(lowerQuery)) {
|
|
1038
|
+
continue;
|
|
1039
|
+
}
|
|
1040
|
+
options.push({
|
|
1041
|
+
label: ruleString,
|
|
1042
|
+
value: ruleKey
|
|
1043
|
+
});
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
return { options, rulesByKey };
|
|
1047
|
+
}, [allowRulesByKey, denyRulesByKey, askRulesByKey]);
|
|
1048
|
+
const exitState = useExitOnCtrlCDWithKeybindings();
|
|
1049
|
+
const isSearchModeActive = !selectedRule && !addingRuleToTab && !validatedRule && !isAddingWorkspaceDirectory && !removingDirectory;
|
|
1050
|
+
const {
|
|
1051
|
+
query: searchQuery,
|
|
1052
|
+
setQuery: setSearchQuery,
|
|
1053
|
+
cursorOffset: searchCursorOffset
|
|
1054
|
+
} = useSearchInput({
|
|
1055
|
+
isActive: isSearchModeActive && isSearchMode,
|
|
1056
|
+
onExit: () => {
|
|
1057
|
+
setIsSearchMode(false);
|
|
1058
|
+
}
|
|
1059
|
+
});
|
|
1060
|
+
const handleKeyDown = import_react6.useCallback((e) => {
|
|
1061
|
+
if (!isSearchModeActive)
|
|
1062
|
+
return;
|
|
1063
|
+
if (isSearchMode)
|
|
1064
|
+
return;
|
|
1065
|
+
if (e.ctrl || e.meta)
|
|
1066
|
+
return;
|
|
1067
|
+
if (e.key === "/") {
|
|
1068
|
+
e.preventDefault();
|
|
1069
|
+
setIsSearchMode(true);
|
|
1070
|
+
setSearchQuery("");
|
|
1071
|
+
} else if (e.key.length === 1 && e.key !== "j" && e.key !== "k" && e.key !== "m" && e.key !== "i" && e.key !== "r" && e.key !== " ") {
|
|
1072
|
+
e.preventDefault();
|
|
1073
|
+
setIsSearchMode(true);
|
|
1074
|
+
setSearchQuery(e.key);
|
|
1075
|
+
}
|
|
1076
|
+
}, [isSearchModeActive, isSearchMode, setSearchQuery]);
|
|
1077
|
+
const handleToolSelect = import_react6.useCallback((selectedValue, tab) => {
|
|
1078
|
+
const { rulesByKey } = getRulesOptions(tab);
|
|
1079
|
+
if (selectedValue === "add-new-rule") {
|
|
1080
|
+
setAddingRuleToTab(tab);
|
|
1081
|
+
return;
|
|
1082
|
+
} else {
|
|
1083
|
+
setSelectedRule(rulesByKey.get(selectedValue));
|
|
1084
|
+
return;
|
|
1085
|
+
}
|
|
1086
|
+
}, [getRulesOptions]);
|
|
1087
|
+
const handleRuleInputCancel = import_react6.useCallback(() => {
|
|
1088
|
+
setAddingRuleToTab(null);
|
|
1089
|
+
}, []);
|
|
1090
|
+
const handleRuleInputSubmit = import_react6.useCallback((ruleValue, ruleBehavior) => {
|
|
1091
|
+
setValidatedRule({ ruleValue, ruleBehavior });
|
|
1092
|
+
setAddingRuleToTab(null);
|
|
1093
|
+
}, []);
|
|
1094
|
+
const handleAddRulesSuccess = import_react6.useCallback((rules, unreachable) => {
|
|
1095
|
+
setValidatedRule(null);
|
|
1096
|
+
for (const rule of rules) {
|
|
1097
|
+
setChanges((prev) => [
|
|
1098
|
+
...prev,
|
|
1099
|
+
`Added ${rule.ruleBehavior} rule ${source_default.bold(permissionRuleValueToString(rule.ruleValue))}`
|
|
1100
|
+
]);
|
|
1101
|
+
}
|
|
1102
|
+
if (unreachable && unreachable.length > 0) {
|
|
1103
|
+
for (const u of unreachable) {
|
|
1104
|
+
const severity = u.shadowType === "deny" ? "blocked" : "shadowed";
|
|
1105
|
+
setChanges((prev) => [
|
|
1106
|
+
...prev,
|
|
1107
|
+
source_default.yellow(`${figures_default.warning} Warning: ${permissionRuleValueToString(u.rule.ruleValue)} is ${severity}`),
|
|
1108
|
+
source_default.dim(` ${u.reason}`),
|
|
1109
|
+
source_default.dim(` Fix: ${u.fix}`)
|
|
1110
|
+
]);
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
}, []);
|
|
1114
|
+
const handleAddRuleCancel = import_react6.useCallback(() => {
|
|
1115
|
+
setValidatedRule(null);
|
|
1116
|
+
}, []);
|
|
1117
|
+
const handleRequestAddDirectory = import_react6.useCallback(() => setIsAddingWorkspaceDirectory(true), []);
|
|
1118
|
+
const handleRequestRemoveDirectory = import_react6.useCallback((path) => setRemovingDirectory(path), []);
|
|
1119
|
+
const handleRulesCancel = import_react6.useCallback(() => {
|
|
1120
|
+
const s = denialStateRef.current;
|
|
1121
|
+
const denialsFor = (set) => Array.from(set).map((idx) => s.denials[idx]).filter((d) => d !== undefined);
|
|
1122
|
+
const retryDenials = denialsFor(s.retry);
|
|
1123
|
+
if (retryDenials.length > 0) {
|
|
1124
|
+
const commands = retryDenials.map((d) => d.display);
|
|
1125
|
+
onRetryDenials?.(commands);
|
|
1126
|
+
onExit(undefined, {
|
|
1127
|
+
shouldQuery: true,
|
|
1128
|
+
metaMessages: [
|
|
1129
|
+
`Permission granted for: ${commands.join(", ")}. You may now retry ${commands.length === 1 ? "this command" : "these commands"} if you would like.`
|
|
1130
|
+
]
|
|
1131
|
+
});
|
|
1132
|
+
return;
|
|
1133
|
+
}
|
|
1134
|
+
const approvedDenials = denialsFor(s.approved);
|
|
1135
|
+
if (approvedDenials.length > 0 || changes.length > 0) {
|
|
1136
|
+
const approvedMsg = approvedDenials.length > 0 ? [
|
|
1137
|
+
`Approved ${approvedDenials.map((d) => source_default.bold(d.display)).join(", ")}`
|
|
1138
|
+
] : [];
|
|
1139
|
+
onExit([...approvedMsg, ...changes].join(`
|
|
1140
|
+
`));
|
|
1141
|
+
} else {
|
|
1142
|
+
onExit("Permissions dialog dismissed", {
|
|
1143
|
+
display: "system"
|
|
1144
|
+
});
|
|
1145
|
+
}
|
|
1146
|
+
}, [changes, onExit, onRetryDenials]);
|
|
1147
|
+
useKeybinding("confirm:no", handleRulesCancel, {
|
|
1148
|
+
context: "Settings",
|
|
1149
|
+
isActive: isSearchModeActive && !isSearchMode
|
|
1150
|
+
});
|
|
1151
|
+
const handleDeleteRule = () => {
|
|
1152
|
+
if (!selectedRule)
|
|
1153
|
+
return;
|
|
1154
|
+
const { options } = getRulesOptions(selectedRule.ruleBehavior);
|
|
1155
|
+
const selectedKey = jsonStringify(selectedRule);
|
|
1156
|
+
const ruleKeys = options.filter((opt) => opt.value !== "add-new-rule").map((opt) => opt.value);
|
|
1157
|
+
const currentIndex = ruleKeys.indexOf(selectedKey);
|
|
1158
|
+
let nextFocusKey;
|
|
1159
|
+
if (currentIndex !== -1) {
|
|
1160
|
+
if (currentIndex < ruleKeys.length - 1) {
|
|
1161
|
+
nextFocusKey = ruleKeys[currentIndex + 1];
|
|
1162
|
+
} else if (currentIndex > 0) {
|
|
1163
|
+
nextFocusKey = ruleKeys[currentIndex - 1];
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
setLastFocusedRuleKey(nextFocusKey);
|
|
1167
|
+
deletePermissionRule({
|
|
1168
|
+
rule: selectedRule,
|
|
1169
|
+
initialContext: toolPermissionContext,
|
|
1170
|
+
setToolPermissionContext(toolPermissionContext2) {
|
|
1171
|
+
setAppState((prev) => ({
|
|
1172
|
+
...prev,
|
|
1173
|
+
toolPermissionContext: toolPermissionContext2
|
|
1174
|
+
}));
|
|
1175
|
+
}
|
|
1176
|
+
});
|
|
1177
|
+
setChanges((prev) => [
|
|
1178
|
+
...prev,
|
|
1179
|
+
`Deleted ${selectedRule.ruleBehavior} rule ${source_default.bold(permissionRuleValueToString(selectedRule.ruleValue))}`
|
|
1180
|
+
]);
|
|
1181
|
+
setSelectedRule(undefined);
|
|
1182
|
+
};
|
|
1183
|
+
if (selectedRule) {
|
|
1184
|
+
return /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(RuleDetails, {
|
|
1185
|
+
rule: selectedRule,
|
|
1186
|
+
onDelete: handleDeleteRule,
|
|
1187
|
+
onCancel: () => setSelectedRule(undefined)
|
|
1188
|
+
}, undefined, false, undefined, this);
|
|
1189
|
+
}
|
|
1190
|
+
if (addingRuleToTab && addingRuleToTab !== "workspace" && addingRuleToTab !== "recent") {
|
|
1191
|
+
return /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(PermissionRuleInput, {
|
|
1192
|
+
onCancel: handleRuleInputCancel,
|
|
1193
|
+
onSubmit: handleRuleInputSubmit,
|
|
1194
|
+
ruleBehavior: addingRuleToTab
|
|
1195
|
+
}, undefined, false, undefined, this);
|
|
1196
|
+
}
|
|
1197
|
+
if (validatedRule) {
|
|
1198
|
+
return /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(AddPermissionRules, {
|
|
1199
|
+
onAddRules: handleAddRulesSuccess,
|
|
1200
|
+
onCancel: handleAddRuleCancel,
|
|
1201
|
+
ruleValues: [validatedRule.ruleValue],
|
|
1202
|
+
ruleBehavior: validatedRule.ruleBehavior,
|
|
1203
|
+
initialContext: toolPermissionContext,
|
|
1204
|
+
setToolPermissionContext: (toolPermissionContext2) => {
|
|
1205
|
+
setAppState((prev) => ({
|
|
1206
|
+
...prev,
|
|
1207
|
+
toolPermissionContext: toolPermissionContext2
|
|
1208
|
+
}));
|
|
1209
|
+
}
|
|
1210
|
+
}, undefined, false, undefined, this);
|
|
1211
|
+
}
|
|
1212
|
+
if (isAddingWorkspaceDirectory) {
|
|
1213
|
+
return /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(AddWorkspaceDirectory, {
|
|
1214
|
+
onAddDirectory: (path, remember) => {
|
|
1215
|
+
const destination = remember ? "localSettings" : "session";
|
|
1216
|
+
const permissionUpdate = {
|
|
1217
|
+
type: "addDirectories",
|
|
1218
|
+
directories: [path],
|
|
1219
|
+
destination
|
|
1220
|
+
};
|
|
1221
|
+
const updatedContext = applyPermissionUpdate(toolPermissionContext, permissionUpdate);
|
|
1222
|
+
setAppState((prev) => ({
|
|
1223
|
+
...prev,
|
|
1224
|
+
toolPermissionContext: updatedContext
|
|
1225
|
+
}));
|
|
1226
|
+
if (remember) {
|
|
1227
|
+
persistPermissionUpdate(permissionUpdate);
|
|
1228
|
+
}
|
|
1229
|
+
setChanges((prev) => [
|
|
1230
|
+
...prev,
|
|
1231
|
+
`Added directory ${source_default.bold(path)} to workspace${remember ? " and saved to local settings" : " for this session"}`
|
|
1232
|
+
]);
|
|
1233
|
+
setIsAddingWorkspaceDirectory(false);
|
|
1234
|
+
},
|
|
1235
|
+
onCancel: () => setIsAddingWorkspaceDirectory(false),
|
|
1236
|
+
permissionContext: toolPermissionContext
|
|
1237
|
+
}, undefined, false, undefined, this);
|
|
1238
|
+
}
|
|
1239
|
+
if (removingDirectory) {
|
|
1240
|
+
return /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(RemoveWorkspaceDirectory, {
|
|
1241
|
+
directoryPath: removingDirectory,
|
|
1242
|
+
onRemove: () => {
|
|
1243
|
+
setChanges((prev) => [
|
|
1244
|
+
...prev,
|
|
1245
|
+
`Removed directory ${source_default.bold(removingDirectory)} from workspace`
|
|
1246
|
+
]);
|
|
1247
|
+
setRemovingDirectory(null);
|
|
1248
|
+
},
|
|
1249
|
+
onCancel: () => setRemovingDirectory(null),
|
|
1250
|
+
permissionContext: toolPermissionContext,
|
|
1251
|
+
setPermissionContext: (toolPermissionContext2) => {
|
|
1252
|
+
setAppState((prev) => ({
|
|
1253
|
+
...prev,
|
|
1254
|
+
toolPermissionContext: toolPermissionContext2
|
|
1255
|
+
}));
|
|
1256
|
+
}
|
|
1257
|
+
}, undefined, false, undefined, this);
|
|
1258
|
+
}
|
|
1259
|
+
const sharedRulesProps = {
|
|
1260
|
+
searchQuery,
|
|
1261
|
+
isSearchMode,
|
|
1262
|
+
isFocused: isTerminalFocused,
|
|
1263
|
+
onCancel: handleRulesCancel,
|
|
1264
|
+
lastFocusedRuleKey,
|
|
1265
|
+
cursorOffset: searchCursorOffset,
|
|
1266
|
+
getRulesOptions,
|
|
1267
|
+
handleToolSelect,
|
|
1268
|
+
onHeaderFocusChange: handleHeaderFocusChange
|
|
1269
|
+
};
|
|
1270
|
+
const isHidden = !!selectedRule || !!addingRuleToTab || !!validatedRule || isAddingWorkspaceDirectory || !!removingDirectory;
|
|
1271
|
+
return /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
|
|
1272
|
+
flexDirection: "column",
|
|
1273
|
+
onKeyDown: handleKeyDown,
|
|
1274
|
+
children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Pane, {
|
|
1275
|
+
color: "permission",
|
|
1276
|
+
children: [
|
|
1277
|
+
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tabs, {
|
|
1278
|
+
title: "Permissions:",
|
|
1279
|
+
color: "permission",
|
|
1280
|
+
defaultTab,
|
|
1281
|
+
hidden: isHidden,
|
|
1282
|
+
initialHeaderFocused: !hasDenials,
|
|
1283
|
+
navFromContent: !isSearchMode,
|
|
1284
|
+
children: [
|
|
1285
|
+
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
|
|
1286
|
+
id: "recent",
|
|
1287
|
+
title: "Recently denied",
|
|
1288
|
+
children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(RecentDenialsTab, {
|
|
1289
|
+
onHeaderFocusChange: handleHeaderFocusChange,
|
|
1290
|
+
onStateChange: handleDenialStateChange
|
|
1291
|
+
}, undefined, false, undefined, this)
|
|
1292
|
+
}, undefined, false, undefined, this),
|
|
1293
|
+
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
|
|
1294
|
+
id: "allow",
|
|
1295
|
+
title: "Allow",
|
|
1296
|
+
children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(PermissionRulesTab, {
|
|
1297
|
+
tab: "allow",
|
|
1298
|
+
...sharedRulesProps
|
|
1299
|
+
}, undefined, false, undefined, this)
|
|
1300
|
+
}, undefined, false, undefined, this),
|
|
1301
|
+
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
|
|
1302
|
+
id: "ask",
|
|
1303
|
+
title: "Ask",
|
|
1304
|
+
children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(PermissionRulesTab, {
|
|
1305
|
+
tab: "ask",
|
|
1306
|
+
...sharedRulesProps
|
|
1307
|
+
}, undefined, false, undefined, this)
|
|
1308
|
+
}, undefined, false, undefined, this),
|
|
1309
|
+
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
|
|
1310
|
+
id: "deny",
|
|
1311
|
+
title: "Deny",
|
|
1312
|
+
children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(PermissionRulesTab, {
|
|
1313
|
+
tab: "deny",
|
|
1314
|
+
...sharedRulesProps
|
|
1315
|
+
}, undefined, false, undefined, this)
|
|
1316
|
+
}, undefined, false, undefined, this),
|
|
1317
|
+
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
|
|
1318
|
+
id: "workspace",
|
|
1319
|
+
title: "Workspace",
|
|
1320
|
+
children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
|
|
1321
|
+
flexDirection: "column",
|
|
1322
|
+
children: [
|
|
1323
|
+
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
|
|
1324
|
+
children: "RedScope AI can read files in the workspace, and make edits when auto-accept edits is on."
|
|
1325
|
+
}, undefined, false, undefined, this),
|
|
1326
|
+
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(WorkspaceTab, {
|
|
1327
|
+
onExit,
|
|
1328
|
+
toolPermissionContext,
|
|
1329
|
+
onRequestAddDirectory: handleRequestAddDirectory,
|
|
1330
|
+
onRequestRemoveDirectory: handleRequestRemoveDirectory,
|
|
1331
|
+
onHeaderFocusChange: handleHeaderFocusChange
|
|
1332
|
+
}, undefined, false, undefined, this)
|
|
1333
|
+
]
|
|
1334
|
+
}, undefined, true, undefined, this)
|
|
1335
|
+
}, undefined, false, undefined, this)
|
|
1336
|
+
]
|
|
1337
|
+
}, undefined, true, undefined, this),
|
|
1338
|
+
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
|
|
1339
|
+
marginTop: 1,
|
|
1340
|
+
paddingLeft: 1,
|
|
1341
|
+
children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
|
|
1342
|
+
dimColor: true,
|
|
1343
|
+
children: exitState.pending ? /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
|
|
1344
|
+
children: [
|
|
1345
|
+
"Press ",
|
|
1346
|
+
exitState.keyName,
|
|
1347
|
+
" again to exit"
|
|
1348
|
+
]
|
|
1349
|
+
}, undefined, true, undefined, this) : headerFocused ? /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
|
|
1350
|
+
children: "\u2190/\u2192 tab switch \xB7 \u2193 return \xB7 Esc cancel"
|
|
1351
|
+
}, undefined, false, undefined, this) : isSearchMode ? /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
|
|
1352
|
+
children: "Type to filter \xB7 Enter/\u2193 select \xB7 \u2191 tabs \xB7 Esc clear"
|
|
1353
|
+
}, undefined, false, undefined, this) : hasDenials && defaultTab === "recent" ? /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
|
|
1354
|
+
children: "Enter approve \xB7 r retry \xB7 \u2191\u2193 navigate \xB7 \u2190/\u2192 switch \xB7 Esc cancel"
|
|
1355
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
|
|
1356
|
+
children: "\u2191\u2193 navigate \xB7 Enter select \xB7 Type to search \xB7 \u2190/\u2192 switch \xB7 Esc cancel"
|
|
1357
|
+
}, undefined, false, undefined, this)
|
|
1358
|
+
}, undefined, false, undefined, this)
|
|
1359
|
+
}, undefined, false, undefined, this)
|
|
1360
|
+
]
|
|
1361
|
+
}, undefined, true, undefined, this)
|
|
1362
|
+
}, undefined, false, undefined, this);
|
|
1363
|
+
}
|
|
1364
|
+
var import_react6, jsx_dev_runtime7;
|
|
1365
|
+
var init_PermissionRuleList = __esm(() => {
|
|
1366
|
+
init_source();
|
|
1367
|
+
init_figures();
|
|
1368
|
+
init_AppState();
|
|
1369
|
+
init_PermissionUpdate();
|
|
1370
|
+
init_select();
|
|
1371
|
+
init_useExitOnCtrlCDWithKeybindings();
|
|
1372
|
+
init_useSearchInput();
|
|
1373
|
+
init_src();
|
|
1374
|
+
init_useKeybinding();
|
|
1375
|
+
init_autoModeDenials();
|
|
1376
|
+
init_permissionRuleParser();
|
|
1377
|
+
init_permissions();
|
|
1378
|
+
init_slowOperations();
|
|
1379
|
+
init_src();
|
|
1380
|
+
init_SearchBox();
|
|
1381
|
+
init_AddPermissionRules();
|
|
1382
|
+
init_AddWorkspaceDirectory();
|
|
1383
|
+
init_PermissionRuleDescription();
|
|
1384
|
+
init_PermissionRuleInput();
|
|
1385
|
+
init_RecentDenialsTab();
|
|
1386
|
+
init_RemoveWorkspaceDirectory();
|
|
1387
|
+
init_WorkspaceTab();
|
|
1388
|
+
import_react6 = __toESM(require_react(), 1);
|
|
1389
|
+
jsx_dev_runtime7 = __toESM(require_jsx_dev_runtime(), 1);
|
|
1390
|
+
});
|
|
1391
|
+
|
|
1392
|
+
// src/commands/permissions/permissions.tsx
|
|
1393
|
+
var jsx_dev_runtime8, call = async (onDone, context) => {
|
|
1394
|
+
return /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(PermissionRuleList, {
|
|
1395
|
+
onExit: onDone,
|
|
1396
|
+
onRetryDenials: (commands) => {
|
|
1397
|
+
context.setMessages((prev) => [
|
|
1398
|
+
...prev,
|
|
1399
|
+
createPermissionRetryMessage(commands)
|
|
1400
|
+
]);
|
|
1401
|
+
}
|
|
1402
|
+
}, undefined, false, undefined, this);
|
|
1403
|
+
};
|
|
1404
|
+
var init_permissions2 = __esm(() => {
|
|
1405
|
+
init_PermissionRuleList();
|
|
1406
|
+
init_messages();
|
|
1407
|
+
jsx_dev_runtime8 = __toESM(require_jsx_dev_runtime(), 1);
|
|
1408
|
+
});
|
|
1409
|
+
init_permissions2();
|
|
1410
|
+
|
|
1411
|
+
export {
|
|
1412
|
+
call
|
|
1413
|
+
};
|