@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,2285 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
init_process,
|
|
4
|
+
writeToStderr
|
|
5
|
+
} from "./chunk-kb3758f7.js";
|
|
6
|
+
import {
|
|
7
|
+
_Stack_default,
|
|
8
|
+
_Uint8Array_default,
|
|
9
|
+
_arrayLikeKeys_default,
|
|
10
|
+
_arrayPush_default,
|
|
11
|
+
_baseGetAllKeys_default,
|
|
12
|
+
_baseUnary_default,
|
|
13
|
+
_getAllKeys_default,
|
|
14
|
+
_getNative_default,
|
|
15
|
+
_getSymbols_default,
|
|
16
|
+
_getTag_default,
|
|
17
|
+
_isPrototype_default,
|
|
18
|
+
_nodeUtil_default,
|
|
19
|
+
_overArg_default,
|
|
20
|
+
eq_default,
|
|
21
|
+
getSessionId,
|
|
22
|
+
init__Stack,
|
|
23
|
+
init__Uint8Array,
|
|
24
|
+
init__arrayLikeKeys,
|
|
25
|
+
init__arrayPush,
|
|
26
|
+
init__baseGetAllKeys,
|
|
27
|
+
init__baseUnary,
|
|
28
|
+
init__getAllKeys,
|
|
29
|
+
init__getNative,
|
|
30
|
+
init__getSymbols,
|
|
31
|
+
init__getTag,
|
|
32
|
+
init__isPrototype,
|
|
33
|
+
init__nodeUtil,
|
|
34
|
+
init__overArg,
|
|
35
|
+
init_eq,
|
|
36
|
+
init_isArray,
|
|
37
|
+
init_isArrayLike,
|
|
38
|
+
init_isBuffer,
|
|
39
|
+
init_keys,
|
|
40
|
+
init_memoize,
|
|
41
|
+
init_state,
|
|
42
|
+
init_stubArray,
|
|
43
|
+
isArrayLike_default,
|
|
44
|
+
isArray_default,
|
|
45
|
+
isBuffer_default,
|
|
46
|
+
keys_default,
|
|
47
|
+
memoize_default,
|
|
48
|
+
setLastAPIRequest,
|
|
49
|
+
setLastAPIRequestMessages,
|
|
50
|
+
stubArray_default
|
|
51
|
+
} from "./chunk-9h9k5vz3.js";
|
|
52
|
+
import {
|
|
53
|
+
_Symbol_default,
|
|
54
|
+
_root_default,
|
|
55
|
+
init__Symbol,
|
|
56
|
+
init__root,
|
|
57
|
+
init_isObject,
|
|
58
|
+
init_isObjectLike,
|
|
59
|
+
isObjectLike_default,
|
|
60
|
+
isObject_default
|
|
61
|
+
} from "./chunk-xmpgmeb8.js";
|
|
62
|
+
import {
|
|
63
|
+
init_sdk
|
|
64
|
+
} from "./chunk-2kz09j2s.js";
|
|
65
|
+
import {
|
|
66
|
+
APIUserAbortError
|
|
67
|
+
} from "./chunk-c0k7b0jw.js";
|
|
68
|
+
import {
|
|
69
|
+
__esm,
|
|
70
|
+
__export,
|
|
71
|
+
__require,
|
|
72
|
+
__toCommonJS
|
|
73
|
+
} from "./chunk-hhsxm2yr.js";
|
|
74
|
+
|
|
75
|
+
// src/utils/bufferedWriter.ts
|
|
76
|
+
function createBufferedWriter({
|
|
77
|
+
writeFn,
|
|
78
|
+
flushIntervalMs = 1000,
|
|
79
|
+
maxBufferSize = 100,
|
|
80
|
+
maxBufferBytes = Infinity,
|
|
81
|
+
immediateMode = false
|
|
82
|
+
}) {
|
|
83
|
+
let buffer = [];
|
|
84
|
+
let bufferBytes = 0;
|
|
85
|
+
let flushTimer = null;
|
|
86
|
+
let pendingOverflow = null;
|
|
87
|
+
function clearTimer() {
|
|
88
|
+
if (flushTimer) {
|
|
89
|
+
clearTimeout(flushTimer);
|
|
90
|
+
flushTimer = null;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function flush() {
|
|
94
|
+
if (pendingOverflow) {
|
|
95
|
+
writeFn(pendingOverflow.join(""));
|
|
96
|
+
pendingOverflow = null;
|
|
97
|
+
}
|
|
98
|
+
if (buffer.length === 0)
|
|
99
|
+
return;
|
|
100
|
+
writeFn(buffer.join(""));
|
|
101
|
+
buffer = [];
|
|
102
|
+
bufferBytes = 0;
|
|
103
|
+
clearTimer();
|
|
104
|
+
}
|
|
105
|
+
function scheduleFlush() {
|
|
106
|
+
if (!flushTimer) {
|
|
107
|
+
flushTimer = setTimeout(flush, flushIntervalMs);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
function flushDeferred() {
|
|
111
|
+
if (pendingOverflow) {
|
|
112
|
+
pendingOverflow.push(...buffer);
|
|
113
|
+
buffer = [];
|
|
114
|
+
bufferBytes = 0;
|
|
115
|
+
clearTimer();
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
const detached = buffer;
|
|
119
|
+
buffer = [];
|
|
120
|
+
bufferBytes = 0;
|
|
121
|
+
clearTimer();
|
|
122
|
+
pendingOverflow = detached;
|
|
123
|
+
setImmediate(() => {
|
|
124
|
+
const toWrite = pendingOverflow;
|
|
125
|
+
pendingOverflow = null;
|
|
126
|
+
if (toWrite)
|
|
127
|
+
writeFn(toWrite.join(""));
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
return {
|
|
131
|
+
write(content) {
|
|
132
|
+
if (immediateMode) {
|
|
133
|
+
writeFn(content);
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
buffer.push(content);
|
|
137
|
+
bufferBytes += content.length;
|
|
138
|
+
scheduleFlush();
|
|
139
|
+
if (buffer.length >= maxBufferSize || bufferBytes >= maxBufferBytes) {
|
|
140
|
+
flushDeferred();
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
flush,
|
|
144
|
+
dispose() {
|
|
145
|
+
flush();
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
var init_bufferedWriter = () => {};
|
|
150
|
+
|
|
151
|
+
// src/utils/cleanupRegistry.ts
|
|
152
|
+
function registerCleanup(cleanupFn) {
|
|
153
|
+
cleanupFunctions.add(cleanupFn);
|
|
154
|
+
return () => cleanupFunctions.delete(cleanupFn);
|
|
155
|
+
}
|
|
156
|
+
async function runCleanupFunctions() {
|
|
157
|
+
await Promise.all(Array.from(cleanupFunctions).map((fn) => fn()));
|
|
158
|
+
}
|
|
159
|
+
var cleanupFunctions;
|
|
160
|
+
var init_cleanupRegistry = __esm(() => {
|
|
161
|
+
cleanupFunctions = new Set;
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
// src/utils/debugFilter.ts
|
|
165
|
+
function extractDebugCategories(message) {
|
|
166
|
+
const categories = [];
|
|
167
|
+
const mcpMatch = message.match(/^MCP server ["']([^"']+)["']/);
|
|
168
|
+
if (mcpMatch && mcpMatch[1]) {
|
|
169
|
+
categories.push("mcp");
|
|
170
|
+
categories.push(mcpMatch[1].toLowerCase());
|
|
171
|
+
} else {
|
|
172
|
+
const prefixMatch = message.match(/^([^:[]+):/);
|
|
173
|
+
if (prefixMatch && prefixMatch[1]) {
|
|
174
|
+
categories.push(prefixMatch[1].trim().toLowerCase());
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
const bracketMatch = message.match(/^\[([^\]]+)]/);
|
|
178
|
+
if (bracketMatch && bracketMatch[1]) {
|
|
179
|
+
categories.push(bracketMatch[1].trim().toLowerCase());
|
|
180
|
+
}
|
|
181
|
+
if (message.toLowerCase().includes("1p event:")) {
|
|
182
|
+
categories.push("1p");
|
|
183
|
+
}
|
|
184
|
+
const secondaryMatch = message.match(/:\s*([^:]+?)(?:\s+(?:type|mode|status|event))?:/);
|
|
185
|
+
if (secondaryMatch && secondaryMatch[1]) {
|
|
186
|
+
const secondary = secondaryMatch[1].trim().toLowerCase();
|
|
187
|
+
if (secondary.length < 30 && !secondary.includes(" ")) {
|
|
188
|
+
categories.push(secondary);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
return Array.from(new Set(categories));
|
|
192
|
+
}
|
|
193
|
+
function shouldShowDebugCategories(categories, filter) {
|
|
194
|
+
if (!filter) {
|
|
195
|
+
return true;
|
|
196
|
+
}
|
|
197
|
+
if (categories.length === 0) {
|
|
198
|
+
return false;
|
|
199
|
+
}
|
|
200
|
+
if (filter.isExclusive) {
|
|
201
|
+
return !categories.some((cat) => filter.exclude.includes(cat));
|
|
202
|
+
} else {
|
|
203
|
+
return categories.some((cat) => filter.include.includes(cat));
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
function shouldShowDebugMessage(message, filter) {
|
|
207
|
+
if (!filter) {
|
|
208
|
+
return true;
|
|
209
|
+
}
|
|
210
|
+
const categories = extractDebugCategories(message);
|
|
211
|
+
return shouldShowDebugCategories(categories, filter);
|
|
212
|
+
}
|
|
213
|
+
var parseDebugFilter;
|
|
214
|
+
var init_debugFilter = __esm(() => {
|
|
215
|
+
init_memoize();
|
|
216
|
+
parseDebugFilter = memoize_default((filterString) => {
|
|
217
|
+
if (!filterString || filterString.trim() === "") {
|
|
218
|
+
return null;
|
|
219
|
+
}
|
|
220
|
+
const filters = filterString.split(",").map((f) => f.trim()).filter(Boolean);
|
|
221
|
+
if (filters.length === 0) {
|
|
222
|
+
return null;
|
|
223
|
+
}
|
|
224
|
+
const hasExclusive = filters.some((f) => f.startsWith("!"));
|
|
225
|
+
const hasInclusive = filters.some((f) => !f.startsWith("!"));
|
|
226
|
+
if (hasExclusive && hasInclusive) {
|
|
227
|
+
return null;
|
|
228
|
+
}
|
|
229
|
+
const cleanFilters = filters.map((f) => f.replace(/^!/, "").toLowerCase());
|
|
230
|
+
return {
|
|
231
|
+
include: hasExclusive ? [] : cleanFilters,
|
|
232
|
+
exclude: hasExclusive ? cleanFilters : [],
|
|
233
|
+
isExclusive: hasExclusive
|
|
234
|
+
};
|
|
235
|
+
});
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
// src/utils/errors.ts
|
|
239
|
+
function isAbortError(e) {
|
|
240
|
+
return e instanceof AbortError || e instanceof APIUserAbortError || e instanceof Error && e.name === "AbortError";
|
|
241
|
+
}
|
|
242
|
+
function hasExactErrorMessage(error, message) {
|
|
243
|
+
return error instanceof Error && error.message === message;
|
|
244
|
+
}
|
|
245
|
+
function toError(e) {
|
|
246
|
+
return e instanceof Error ? e : new Error(String(e));
|
|
247
|
+
}
|
|
248
|
+
function errorMessage(e) {
|
|
249
|
+
return e instanceof Error ? e.message : String(e);
|
|
250
|
+
}
|
|
251
|
+
function getErrnoCode(e) {
|
|
252
|
+
if (e && typeof e === "object" && "code" in e && typeof e.code === "string") {
|
|
253
|
+
return e.code;
|
|
254
|
+
}
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
function isENOENT(e) {
|
|
258
|
+
return getErrnoCode(e) === "ENOENT";
|
|
259
|
+
}
|
|
260
|
+
function getErrnoPath(e) {
|
|
261
|
+
if (e && typeof e === "object" && "path" in e && typeof e.path === "string") {
|
|
262
|
+
return e.path;
|
|
263
|
+
}
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
function isFsInaccessible(e) {
|
|
267
|
+
const code = getErrnoCode(e);
|
|
268
|
+
return code === "ENOENT" || code === "EACCES" || code === "EPERM" || code === "ENOTDIR" || code === "ELOOP";
|
|
269
|
+
}
|
|
270
|
+
function classifyAxiosError(e) {
|
|
271
|
+
const message = errorMessage(e);
|
|
272
|
+
if (!e || typeof e !== "object" || !("isAxiosError" in e) || !e.isAxiosError) {
|
|
273
|
+
return { kind: "other", message };
|
|
274
|
+
}
|
|
275
|
+
const err = e;
|
|
276
|
+
const status = err.response?.status;
|
|
277
|
+
if (status === 401 || status === 403)
|
|
278
|
+
return { kind: "auth", status, message };
|
|
279
|
+
if (err.code === "ECONNABORTED")
|
|
280
|
+
return { kind: "timeout", status, message };
|
|
281
|
+
if (err.code === "ECONNREFUSED" || err.code === "ENOTFOUND") {
|
|
282
|
+
return { kind: "network", status, message };
|
|
283
|
+
}
|
|
284
|
+
return { kind: "http", status, message };
|
|
285
|
+
}
|
|
286
|
+
var ClaudeError, MalformedCommandError, AbortError, ConfigParseError, ShellError, TeleportOperationError, TelemetrySafeError_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS;
|
|
287
|
+
var init_errors = __esm(() => {
|
|
288
|
+
init_sdk();
|
|
289
|
+
ClaudeError = class ClaudeError extends Error {
|
|
290
|
+
constructor(message) {
|
|
291
|
+
super(message);
|
|
292
|
+
this.name = this.constructor.name;
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
MalformedCommandError = class MalformedCommandError extends Error {
|
|
296
|
+
};
|
|
297
|
+
AbortError = class AbortError extends Error {
|
|
298
|
+
constructor(message) {
|
|
299
|
+
super(message);
|
|
300
|
+
this.name = "AbortError";
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
ConfigParseError = class ConfigParseError extends Error {
|
|
304
|
+
filePath;
|
|
305
|
+
defaultConfig;
|
|
306
|
+
constructor(message, filePath, defaultConfig) {
|
|
307
|
+
super(message);
|
|
308
|
+
this.name = "ConfigParseError";
|
|
309
|
+
this.filePath = filePath;
|
|
310
|
+
this.defaultConfig = defaultConfig;
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
ShellError = class ShellError extends Error {
|
|
314
|
+
stdout;
|
|
315
|
+
stderr;
|
|
316
|
+
code;
|
|
317
|
+
interrupted;
|
|
318
|
+
constructor(stdout, stderr, code, interrupted) {
|
|
319
|
+
super("Shell command failed");
|
|
320
|
+
this.stdout = stdout;
|
|
321
|
+
this.stderr = stderr;
|
|
322
|
+
this.code = code;
|
|
323
|
+
this.interrupted = interrupted;
|
|
324
|
+
this.name = "ShellError";
|
|
325
|
+
}
|
|
326
|
+
};
|
|
327
|
+
TeleportOperationError = class TeleportOperationError extends Error {
|
|
328
|
+
formattedMessage;
|
|
329
|
+
constructor(message, formattedMessage) {
|
|
330
|
+
super(message);
|
|
331
|
+
this.formattedMessage = formattedMessage;
|
|
332
|
+
this.name = "TeleportOperationError";
|
|
333
|
+
}
|
|
334
|
+
};
|
|
335
|
+
TelemetrySafeError_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS = class TelemetrySafeError_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS extends Error {
|
|
336
|
+
telemetryMessage;
|
|
337
|
+
constructor(message, telemetryMessage) {
|
|
338
|
+
super(message);
|
|
339
|
+
this.name = "TelemetrySafeError";
|
|
340
|
+
this.telemetryMessage = telemetryMessage ?? message;
|
|
341
|
+
}
|
|
342
|
+
};
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
// node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js
|
|
346
|
+
function arrayEach(array, iteratee) {
|
|
347
|
+
var index = -1, length = array == null ? 0 : array.length;
|
|
348
|
+
while (++index < length) {
|
|
349
|
+
if (iteratee(array[index], index, array) === false) {
|
|
350
|
+
break;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
return array;
|
|
354
|
+
}
|
|
355
|
+
var _arrayEach_default;
|
|
356
|
+
var init__arrayEach = __esm(() => {
|
|
357
|
+
_arrayEach_default = arrayEach;
|
|
358
|
+
});
|
|
359
|
+
|
|
360
|
+
// node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js
|
|
361
|
+
var defineProperty, _defineProperty_default;
|
|
362
|
+
var init__defineProperty = __esm(() => {
|
|
363
|
+
init__getNative();
|
|
364
|
+
defineProperty = function() {
|
|
365
|
+
try {
|
|
366
|
+
var func = _getNative_default(Object, "defineProperty");
|
|
367
|
+
func({}, "", {});
|
|
368
|
+
return func;
|
|
369
|
+
} catch (e) {}
|
|
370
|
+
}();
|
|
371
|
+
_defineProperty_default = defineProperty;
|
|
372
|
+
});
|
|
373
|
+
|
|
374
|
+
// node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js
|
|
375
|
+
function baseAssignValue(object, key, value) {
|
|
376
|
+
if (key == "__proto__" && _defineProperty_default) {
|
|
377
|
+
_defineProperty_default(object, key, {
|
|
378
|
+
configurable: true,
|
|
379
|
+
enumerable: true,
|
|
380
|
+
value,
|
|
381
|
+
writable: true
|
|
382
|
+
});
|
|
383
|
+
} else {
|
|
384
|
+
object[key] = value;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
var _baseAssignValue_default;
|
|
388
|
+
var init__baseAssignValue = __esm(() => {
|
|
389
|
+
init__defineProperty();
|
|
390
|
+
_baseAssignValue_default = baseAssignValue;
|
|
391
|
+
});
|
|
392
|
+
|
|
393
|
+
// node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js
|
|
394
|
+
function assignValue(object, key, value) {
|
|
395
|
+
var objValue = object[key];
|
|
396
|
+
if (!(hasOwnProperty.call(object, key) && eq_default(objValue, value)) || value === undefined && !(key in object)) {
|
|
397
|
+
_baseAssignValue_default(object, key, value);
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
var objectProto, hasOwnProperty, _assignValue_default;
|
|
401
|
+
var init__assignValue = __esm(() => {
|
|
402
|
+
init__baseAssignValue();
|
|
403
|
+
init_eq();
|
|
404
|
+
objectProto = Object.prototype;
|
|
405
|
+
hasOwnProperty = objectProto.hasOwnProperty;
|
|
406
|
+
_assignValue_default = assignValue;
|
|
407
|
+
});
|
|
408
|
+
|
|
409
|
+
// node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js
|
|
410
|
+
function copyObject(source, props, object, customizer) {
|
|
411
|
+
var isNew = !object;
|
|
412
|
+
object || (object = {});
|
|
413
|
+
var index = -1, length = props.length;
|
|
414
|
+
while (++index < length) {
|
|
415
|
+
var key = props[index];
|
|
416
|
+
var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined;
|
|
417
|
+
if (newValue === undefined) {
|
|
418
|
+
newValue = source[key];
|
|
419
|
+
}
|
|
420
|
+
if (isNew) {
|
|
421
|
+
_baseAssignValue_default(object, key, newValue);
|
|
422
|
+
} else {
|
|
423
|
+
_assignValue_default(object, key, newValue);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
return object;
|
|
427
|
+
}
|
|
428
|
+
var _copyObject_default;
|
|
429
|
+
var init__copyObject = __esm(() => {
|
|
430
|
+
init__assignValue();
|
|
431
|
+
init__baseAssignValue();
|
|
432
|
+
_copyObject_default = copyObject;
|
|
433
|
+
});
|
|
434
|
+
|
|
435
|
+
// node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js
|
|
436
|
+
function baseAssign(object, source) {
|
|
437
|
+
return object && _copyObject_default(source, keys_default(source), object);
|
|
438
|
+
}
|
|
439
|
+
var _baseAssign_default;
|
|
440
|
+
var init__baseAssign = __esm(() => {
|
|
441
|
+
init__copyObject();
|
|
442
|
+
init_keys();
|
|
443
|
+
_baseAssign_default = baseAssign;
|
|
444
|
+
});
|
|
445
|
+
|
|
446
|
+
// node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js
|
|
447
|
+
function nativeKeysIn(object) {
|
|
448
|
+
var result = [];
|
|
449
|
+
if (object != null) {
|
|
450
|
+
for (var key in Object(object)) {
|
|
451
|
+
result.push(key);
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
return result;
|
|
455
|
+
}
|
|
456
|
+
var _nativeKeysIn_default;
|
|
457
|
+
var init__nativeKeysIn = __esm(() => {
|
|
458
|
+
_nativeKeysIn_default = nativeKeysIn;
|
|
459
|
+
});
|
|
460
|
+
|
|
461
|
+
// node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js
|
|
462
|
+
function baseKeysIn(object) {
|
|
463
|
+
if (!isObject_default(object)) {
|
|
464
|
+
return _nativeKeysIn_default(object);
|
|
465
|
+
}
|
|
466
|
+
var isProto = _isPrototype_default(object), result = [];
|
|
467
|
+
for (var key in object) {
|
|
468
|
+
if (!(key == "constructor" && (isProto || !hasOwnProperty2.call(object, key)))) {
|
|
469
|
+
result.push(key);
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
return result;
|
|
473
|
+
}
|
|
474
|
+
var objectProto2, hasOwnProperty2, _baseKeysIn_default;
|
|
475
|
+
var init__baseKeysIn = __esm(() => {
|
|
476
|
+
init_isObject();
|
|
477
|
+
init__isPrototype();
|
|
478
|
+
init__nativeKeysIn();
|
|
479
|
+
objectProto2 = Object.prototype;
|
|
480
|
+
hasOwnProperty2 = objectProto2.hasOwnProperty;
|
|
481
|
+
_baseKeysIn_default = baseKeysIn;
|
|
482
|
+
});
|
|
483
|
+
|
|
484
|
+
// node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js
|
|
485
|
+
function keysIn(object) {
|
|
486
|
+
return isArrayLike_default(object) ? _arrayLikeKeys_default(object, true) : _baseKeysIn_default(object);
|
|
487
|
+
}
|
|
488
|
+
var keysIn_default;
|
|
489
|
+
var init_keysIn = __esm(() => {
|
|
490
|
+
init__arrayLikeKeys();
|
|
491
|
+
init__baseKeysIn();
|
|
492
|
+
init_isArrayLike();
|
|
493
|
+
keysIn_default = keysIn;
|
|
494
|
+
});
|
|
495
|
+
|
|
496
|
+
// node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js
|
|
497
|
+
function baseAssignIn(object, source) {
|
|
498
|
+
return object && _copyObject_default(source, keysIn_default(source), object);
|
|
499
|
+
}
|
|
500
|
+
var _baseAssignIn_default;
|
|
501
|
+
var init__baseAssignIn = __esm(() => {
|
|
502
|
+
init__copyObject();
|
|
503
|
+
init_keysIn();
|
|
504
|
+
_baseAssignIn_default = baseAssignIn;
|
|
505
|
+
});
|
|
506
|
+
|
|
507
|
+
// node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js
|
|
508
|
+
var exports__cloneBuffer = {};
|
|
509
|
+
__export(exports__cloneBuffer, {
|
|
510
|
+
default: () => _cloneBuffer_default
|
|
511
|
+
});
|
|
512
|
+
function cloneBuffer(buffer, isDeep) {
|
|
513
|
+
if (isDeep) {
|
|
514
|
+
return buffer.slice();
|
|
515
|
+
}
|
|
516
|
+
var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
|
517
|
+
buffer.copy(result);
|
|
518
|
+
return result;
|
|
519
|
+
}
|
|
520
|
+
var freeExports, freeModule, moduleExports, Buffer2, allocUnsafe, _cloneBuffer_default;
|
|
521
|
+
var init__cloneBuffer = __esm(() => {
|
|
522
|
+
init__root();
|
|
523
|
+
freeExports = typeof exports__cloneBuffer == "object" && exports__cloneBuffer && !exports__cloneBuffer.nodeType && exports__cloneBuffer;
|
|
524
|
+
freeModule = freeExports && typeof module__cloneBuffer == "object" && module__cloneBuffer && !module__cloneBuffer.nodeType && module__cloneBuffer;
|
|
525
|
+
moduleExports = freeModule && freeModule.exports === freeExports;
|
|
526
|
+
Buffer2 = moduleExports ? _root_default.Buffer : undefined;
|
|
527
|
+
allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : undefined;
|
|
528
|
+
_cloneBuffer_default = cloneBuffer;
|
|
529
|
+
});
|
|
530
|
+
|
|
531
|
+
// node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js
|
|
532
|
+
function copyArray(source, array) {
|
|
533
|
+
var index = -1, length = source.length;
|
|
534
|
+
array || (array = Array(length));
|
|
535
|
+
while (++index < length) {
|
|
536
|
+
array[index] = source[index];
|
|
537
|
+
}
|
|
538
|
+
return array;
|
|
539
|
+
}
|
|
540
|
+
var _copyArray_default;
|
|
541
|
+
var init__copyArray = __esm(() => {
|
|
542
|
+
_copyArray_default = copyArray;
|
|
543
|
+
});
|
|
544
|
+
|
|
545
|
+
// node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js
|
|
546
|
+
function copySymbols(source, object) {
|
|
547
|
+
return _copyObject_default(source, _getSymbols_default(source), object);
|
|
548
|
+
}
|
|
549
|
+
var _copySymbols_default;
|
|
550
|
+
var init__copySymbols = __esm(() => {
|
|
551
|
+
init__copyObject();
|
|
552
|
+
init__getSymbols();
|
|
553
|
+
_copySymbols_default = copySymbols;
|
|
554
|
+
});
|
|
555
|
+
|
|
556
|
+
// node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js
|
|
557
|
+
var getPrototype, _getPrototype_default;
|
|
558
|
+
var init__getPrototype = __esm(() => {
|
|
559
|
+
init__overArg();
|
|
560
|
+
getPrototype = _overArg_default(Object.getPrototypeOf, Object);
|
|
561
|
+
_getPrototype_default = getPrototype;
|
|
562
|
+
});
|
|
563
|
+
|
|
564
|
+
// node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js
|
|
565
|
+
var nativeGetSymbols, getSymbolsIn, _getSymbolsIn_default;
|
|
566
|
+
var init__getSymbolsIn = __esm(() => {
|
|
567
|
+
init__arrayPush();
|
|
568
|
+
init__getPrototype();
|
|
569
|
+
init__getSymbols();
|
|
570
|
+
init_stubArray();
|
|
571
|
+
nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
572
|
+
getSymbolsIn = !nativeGetSymbols ? stubArray_default : function(object) {
|
|
573
|
+
var result = [];
|
|
574
|
+
while (object) {
|
|
575
|
+
_arrayPush_default(result, _getSymbols_default(object));
|
|
576
|
+
object = _getPrototype_default(object);
|
|
577
|
+
}
|
|
578
|
+
return result;
|
|
579
|
+
};
|
|
580
|
+
_getSymbolsIn_default = getSymbolsIn;
|
|
581
|
+
});
|
|
582
|
+
|
|
583
|
+
// node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js
|
|
584
|
+
function copySymbolsIn(source, object) {
|
|
585
|
+
return _copyObject_default(source, _getSymbolsIn_default(source), object);
|
|
586
|
+
}
|
|
587
|
+
var _copySymbolsIn_default;
|
|
588
|
+
var init__copySymbolsIn = __esm(() => {
|
|
589
|
+
init__copyObject();
|
|
590
|
+
init__getSymbolsIn();
|
|
591
|
+
_copySymbolsIn_default = copySymbolsIn;
|
|
592
|
+
});
|
|
593
|
+
|
|
594
|
+
// node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js
|
|
595
|
+
function getAllKeysIn(object) {
|
|
596
|
+
return _baseGetAllKeys_default(object, keysIn_default, _getSymbolsIn_default);
|
|
597
|
+
}
|
|
598
|
+
var _getAllKeysIn_default;
|
|
599
|
+
var init__getAllKeysIn = __esm(() => {
|
|
600
|
+
init__baseGetAllKeys();
|
|
601
|
+
init__getSymbolsIn();
|
|
602
|
+
init_keysIn();
|
|
603
|
+
_getAllKeysIn_default = getAllKeysIn;
|
|
604
|
+
});
|
|
605
|
+
|
|
606
|
+
// node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js
|
|
607
|
+
function initCloneArray(array) {
|
|
608
|
+
var length = array.length, result = new array.constructor(length);
|
|
609
|
+
if (length && typeof array[0] == "string" && hasOwnProperty3.call(array, "index")) {
|
|
610
|
+
result.index = array.index;
|
|
611
|
+
result.input = array.input;
|
|
612
|
+
}
|
|
613
|
+
return result;
|
|
614
|
+
}
|
|
615
|
+
var objectProto3, hasOwnProperty3, _initCloneArray_default;
|
|
616
|
+
var init__initCloneArray = __esm(() => {
|
|
617
|
+
objectProto3 = Object.prototype;
|
|
618
|
+
hasOwnProperty3 = objectProto3.hasOwnProperty;
|
|
619
|
+
_initCloneArray_default = initCloneArray;
|
|
620
|
+
});
|
|
621
|
+
|
|
622
|
+
// node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js
|
|
623
|
+
function cloneArrayBuffer(arrayBuffer) {
|
|
624
|
+
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
625
|
+
new _Uint8Array_default(result).set(new _Uint8Array_default(arrayBuffer));
|
|
626
|
+
return result;
|
|
627
|
+
}
|
|
628
|
+
var _cloneArrayBuffer_default;
|
|
629
|
+
var init__cloneArrayBuffer = __esm(() => {
|
|
630
|
+
init__Uint8Array();
|
|
631
|
+
_cloneArrayBuffer_default = cloneArrayBuffer;
|
|
632
|
+
});
|
|
633
|
+
|
|
634
|
+
// node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js
|
|
635
|
+
function cloneDataView(dataView, isDeep) {
|
|
636
|
+
var buffer = isDeep ? _cloneArrayBuffer_default(dataView.buffer) : dataView.buffer;
|
|
637
|
+
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
|
638
|
+
}
|
|
639
|
+
var _cloneDataView_default;
|
|
640
|
+
var init__cloneDataView = __esm(() => {
|
|
641
|
+
init__cloneArrayBuffer();
|
|
642
|
+
_cloneDataView_default = cloneDataView;
|
|
643
|
+
});
|
|
644
|
+
|
|
645
|
+
// node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js
|
|
646
|
+
function cloneRegExp(regexp) {
|
|
647
|
+
var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
|
|
648
|
+
result.lastIndex = regexp.lastIndex;
|
|
649
|
+
return result;
|
|
650
|
+
}
|
|
651
|
+
var reFlags, _cloneRegExp_default;
|
|
652
|
+
var init__cloneRegExp = __esm(() => {
|
|
653
|
+
reFlags = /\w*$/;
|
|
654
|
+
_cloneRegExp_default = cloneRegExp;
|
|
655
|
+
});
|
|
656
|
+
|
|
657
|
+
// node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js
|
|
658
|
+
function cloneSymbol(symbol) {
|
|
659
|
+
return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
|
|
660
|
+
}
|
|
661
|
+
var symbolProto, symbolValueOf, _cloneSymbol_default;
|
|
662
|
+
var init__cloneSymbol = __esm(() => {
|
|
663
|
+
init__Symbol();
|
|
664
|
+
symbolProto = _Symbol_default ? _Symbol_default.prototype : undefined;
|
|
665
|
+
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
|
|
666
|
+
_cloneSymbol_default = cloneSymbol;
|
|
667
|
+
});
|
|
668
|
+
|
|
669
|
+
// node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js
|
|
670
|
+
function cloneTypedArray(typedArray, isDeep) {
|
|
671
|
+
var buffer = isDeep ? _cloneArrayBuffer_default(typedArray.buffer) : typedArray.buffer;
|
|
672
|
+
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|
673
|
+
}
|
|
674
|
+
var _cloneTypedArray_default;
|
|
675
|
+
var init__cloneTypedArray = __esm(() => {
|
|
676
|
+
init__cloneArrayBuffer();
|
|
677
|
+
_cloneTypedArray_default = cloneTypedArray;
|
|
678
|
+
});
|
|
679
|
+
|
|
680
|
+
// node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js
|
|
681
|
+
function initCloneByTag(object, tag, isDeep) {
|
|
682
|
+
var Ctor = object.constructor;
|
|
683
|
+
switch (tag) {
|
|
684
|
+
case arrayBufferTag:
|
|
685
|
+
return _cloneArrayBuffer_default(object);
|
|
686
|
+
case boolTag:
|
|
687
|
+
case dateTag:
|
|
688
|
+
return new Ctor(+object);
|
|
689
|
+
case dataViewTag:
|
|
690
|
+
return _cloneDataView_default(object, isDeep);
|
|
691
|
+
case float32Tag:
|
|
692
|
+
case float64Tag:
|
|
693
|
+
case int8Tag:
|
|
694
|
+
case int16Tag:
|
|
695
|
+
case int32Tag:
|
|
696
|
+
case uint8Tag:
|
|
697
|
+
case uint8ClampedTag:
|
|
698
|
+
case uint16Tag:
|
|
699
|
+
case uint32Tag:
|
|
700
|
+
return _cloneTypedArray_default(object, isDeep);
|
|
701
|
+
case mapTag:
|
|
702
|
+
return new Ctor;
|
|
703
|
+
case numberTag:
|
|
704
|
+
case stringTag:
|
|
705
|
+
return new Ctor(object);
|
|
706
|
+
case regexpTag:
|
|
707
|
+
return _cloneRegExp_default(object);
|
|
708
|
+
case setTag:
|
|
709
|
+
return new Ctor;
|
|
710
|
+
case symbolTag:
|
|
711
|
+
return _cloneSymbol_default(object);
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
var boolTag = "[object Boolean]", dateTag = "[object Date]", mapTag = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]", _initCloneByTag_default;
|
|
715
|
+
var init__initCloneByTag = __esm(() => {
|
|
716
|
+
init__cloneArrayBuffer();
|
|
717
|
+
init__cloneDataView();
|
|
718
|
+
init__cloneRegExp();
|
|
719
|
+
init__cloneSymbol();
|
|
720
|
+
init__cloneTypedArray();
|
|
721
|
+
_initCloneByTag_default = initCloneByTag;
|
|
722
|
+
});
|
|
723
|
+
|
|
724
|
+
// node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js
|
|
725
|
+
var objectCreate, baseCreate, _baseCreate_default;
|
|
726
|
+
var init__baseCreate = __esm(() => {
|
|
727
|
+
init_isObject();
|
|
728
|
+
objectCreate = Object.create;
|
|
729
|
+
baseCreate = function() {
|
|
730
|
+
function object() {}
|
|
731
|
+
return function(proto) {
|
|
732
|
+
if (!isObject_default(proto)) {
|
|
733
|
+
return {};
|
|
734
|
+
}
|
|
735
|
+
if (objectCreate) {
|
|
736
|
+
return objectCreate(proto);
|
|
737
|
+
}
|
|
738
|
+
object.prototype = proto;
|
|
739
|
+
var result = new object;
|
|
740
|
+
object.prototype = undefined;
|
|
741
|
+
return result;
|
|
742
|
+
};
|
|
743
|
+
}();
|
|
744
|
+
_baseCreate_default = baseCreate;
|
|
745
|
+
});
|
|
746
|
+
|
|
747
|
+
// node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js
|
|
748
|
+
function initCloneObject(object) {
|
|
749
|
+
return typeof object.constructor == "function" && !_isPrototype_default(object) ? _baseCreate_default(_getPrototype_default(object)) : {};
|
|
750
|
+
}
|
|
751
|
+
var _initCloneObject_default;
|
|
752
|
+
var init__initCloneObject = __esm(() => {
|
|
753
|
+
init__baseCreate();
|
|
754
|
+
init__getPrototype();
|
|
755
|
+
init__isPrototype();
|
|
756
|
+
_initCloneObject_default = initCloneObject;
|
|
757
|
+
});
|
|
758
|
+
|
|
759
|
+
// node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js
|
|
760
|
+
function baseIsMap(value) {
|
|
761
|
+
return isObjectLike_default(value) && _getTag_default(value) == mapTag2;
|
|
762
|
+
}
|
|
763
|
+
var mapTag2 = "[object Map]", _baseIsMap_default;
|
|
764
|
+
var init__baseIsMap = __esm(() => {
|
|
765
|
+
init__getTag();
|
|
766
|
+
init_isObjectLike();
|
|
767
|
+
_baseIsMap_default = baseIsMap;
|
|
768
|
+
});
|
|
769
|
+
|
|
770
|
+
// node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js
|
|
771
|
+
var nodeIsMap, isMap, isMap_default;
|
|
772
|
+
var init_isMap = __esm(() => {
|
|
773
|
+
init__baseIsMap();
|
|
774
|
+
init__baseUnary();
|
|
775
|
+
init__nodeUtil();
|
|
776
|
+
nodeIsMap = _nodeUtil_default && _nodeUtil_default.isMap;
|
|
777
|
+
isMap = nodeIsMap ? _baseUnary_default(nodeIsMap) : _baseIsMap_default;
|
|
778
|
+
isMap_default = isMap;
|
|
779
|
+
});
|
|
780
|
+
|
|
781
|
+
// node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js
|
|
782
|
+
function baseIsSet(value) {
|
|
783
|
+
return isObjectLike_default(value) && _getTag_default(value) == setTag2;
|
|
784
|
+
}
|
|
785
|
+
var setTag2 = "[object Set]", _baseIsSet_default;
|
|
786
|
+
var init__baseIsSet = __esm(() => {
|
|
787
|
+
init__getTag();
|
|
788
|
+
init_isObjectLike();
|
|
789
|
+
_baseIsSet_default = baseIsSet;
|
|
790
|
+
});
|
|
791
|
+
|
|
792
|
+
// node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js
|
|
793
|
+
var nodeIsSet, isSet, isSet_default;
|
|
794
|
+
var init_isSet = __esm(() => {
|
|
795
|
+
init__baseIsSet();
|
|
796
|
+
init__baseUnary();
|
|
797
|
+
init__nodeUtil();
|
|
798
|
+
nodeIsSet = _nodeUtil_default && _nodeUtil_default.isSet;
|
|
799
|
+
isSet = nodeIsSet ? _baseUnary_default(nodeIsSet) : _baseIsSet_default;
|
|
800
|
+
isSet_default = isSet;
|
|
801
|
+
});
|
|
802
|
+
|
|
803
|
+
// node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js
|
|
804
|
+
function baseClone(value, bitmask, customizer, key, object, stack) {
|
|
805
|
+
var result, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG;
|
|
806
|
+
if (customizer) {
|
|
807
|
+
result = object ? customizer(value, key, object, stack) : customizer(value);
|
|
808
|
+
}
|
|
809
|
+
if (result !== undefined) {
|
|
810
|
+
return result;
|
|
811
|
+
}
|
|
812
|
+
if (!isObject_default(value)) {
|
|
813
|
+
return value;
|
|
814
|
+
}
|
|
815
|
+
var isArr = isArray_default(value);
|
|
816
|
+
if (isArr) {
|
|
817
|
+
result = _initCloneArray_default(value);
|
|
818
|
+
if (!isDeep) {
|
|
819
|
+
return _copyArray_default(value, result);
|
|
820
|
+
}
|
|
821
|
+
} else {
|
|
822
|
+
var tag = _getTag_default(value), isFunc = tag == funcTag || tag == genTag;
|
|
823
|
+
if (isBuffer_default(value)) {
|
|
824
|
+
return _cloneBuffer_default(value, isDeep);
|
|
825
|
+
}
|
|
826
|
+
if (tag == objectTag || tag == argsTag || isFunc && !object) {
|
|
827
|
+
result = isFlat || isFunc ? {} : _initCloneObject_default(value);
|
|
828
|
+
if (!isDeep) {
|
|
829
|
+
return isFlat ? _copySymbolsIn_default(value, _baseAssignIn_default(result, value)) : _copySymbols_default(value, _baseAssign_default(result, value));
|
|
830
|
+
}
|
|
831
|
+
} else {
|
|
832
|
+
if (!cloneableTags[tag]) {
|
|
833
|
+
return object ? value : {};
|
|
834
|
+
}
|
|
835
|
+
result = _initCloneByTag_default(value, tag, isDeep);
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
stack || (stack = new _Stack_default);
|
|
839
|
+
var stacked = stack.get(value);
|
|
840
|
+
if (stacked) {
|
|
841
|
+
return stacked;
|
|
842
|
+
}
|
|
843
|
+
stack.set(value, result);
|
|
844
|
+
if (isSet_default(value)) {
|
|
845
|
+
value.forEach(function(subValue) {
|
|
846
|
+
result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
|
|
847
|
+
});
|
|
848
|
+
} else if (isMap_default(value)) {
|
|
849
|
+
value.forEach(function(subValue, key2) {
|
|
850
|
+
result.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
|
|
851
|
+
});
|
|
852
|
+
}
|
|
853
|
+
var keysFunc = isFull ? isFlat ? _getAllKeysIn_default : _getAllKeys_default : isFlat ? keysIn_default : keys_default;
|
|
854
|
+
var props = isArr ? undefined : keysFunc(value);
|
|
855
|
+
_arrayEach_default(props || value, function(subValue, key2) {
|
|
856
|
+
if (props) {
|
|
857
|
+
key2 = subValue;
|
|
858
|
+
subValue = value[key2];
|
|
859
|
+
}
|
|
860
|
+
_assignValue_default(result, key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
|
|
861
|
+
});
|
|
862
|
+
return result;
|
|
863
|
+
}
|
|
864
|
+
var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4, argsTag = "[object Arguments]", arrayTag = "[object Array]", boolTag2 = "[object Boolean]", dateTag2 = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag3 = "[object Map]", numberTag2 = "[object Number]", objectTag = "[object Object]", regexpTag2 = "[object RegExp]", setTag3 = "[object Set]", stringTag2 = "[object String]", symbolTag2 = "[object Symbol]", weakMapTag = "[object WeakMap]", arrayBufferTag2 = "[object ArrayBuffer]", dataViewTag2 = "[object DataView]", float32Tag2 = "[object Float32Array]", float64Tag2 = "[object Float64Array]", int8Tag2 = "[object Int8Array]", int16Tag2 = "[object Int16Array]", int32Tag2 = "[object Int32Array]", uint8Tag2 = "[object Uint8Array]", uint8ClampedTag2 = "[object Uint8ClampedArray]", uint16Tag2 = "[object Uint16Array]", uint32Tag2 = "[object Uint32Array]", cloneableTags, _baseClone_default;
|
|
865
|
+
var init__baseClone = __esm(() => {
|
|
866
|
+
init__Stack();
|
|
867
|
+
init__arrayEach();
|
|
868
|
+
init__assignValue();
|
|
869
|
+
init__baseAssign();
|
|
870
|
+
init__baseAssignIn();
|
|
871
|
+
init__cloneBuffer();
|
|
872
|
+
init__copyArray();
|
|
873
|
+
init__copySymbols();
|
|
874
|
+
init__copySymbolsIn();
|
|
875
|
+
init__getAllKeys();
|
|
876
|
+
init__getAllKeysIn();
|
|
877
|
+
init__getTag();
|
|
878
|
+
init__initCloneArray();
|
|
879
|
+
init__initCloneByTag();
|
|
880
|
+
init__initCloneObject();
|
|
881
|
+
init_isArray();
|
|
882
|
+
init_isBuffer();
|
|
883
|
+
init_isMap();
|
|
884
|
+
init_isObject();
|
|
885
|
+
init_isSet();
|
|
886
|
+
init_keys();
|
|
887
|
+
init_keysIn();
|
|
888
|
+
cloneableTags = {};
|
|
889
|
+
cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag2] = cloneableTags[dataViewTag2] = cloneableTags[boolTag2] = cloneableTags[dateTag2] = cloneableTags[float32Tag2] = cloneableTags[float64Tag2] = cloneableTags[int8Tag2] = cloneableTags[int16Tag2] = cloneableTags[int32Tag2] = cloneableTags[mapTag3] = cloneableTags[numberTag2] = cloneableTags[objectTag] = cloneableTags[regexpTag2] = cloneableTags[setTag3] = cloneableTags[stringTag2] = cloneableTags[symbolTag2] = cloneableTags[uint8Tag2] = cloneableTags[uint8ClampedTag2] = cloneableTags[uint16Tag2] = cloneableTags[uint32Tag2] = true;
|
|
890
|
+
cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
|
|
891
|
+
_baseClone_default = baseClone;
|
|
892
|
+
});
|
|
893
|
+
|
|
894
|
+
// node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js
|
|
895
|
+
function cloneDeep(value) {
|
|
896
|
+
return _baseClone_default(value, CLONE_DEEP_FLAG2 | CLONE_SYMBOLS_FLAG2);
|
|
897
|
+
}
|
|
898
|
+
var CLONE_DEEP_FLAG2 = 1, CLONE_SYMBOLS_FLAG2 = 4, cloneDeep_default;
|
|
899
|
+
var init_cloneDeep = __esm(() => {
|
|
900
|
+
init__baseClone();
|
|
901
|
+
cloneDeep_default = cloneDeep;
|
|
902
|
+
});
|
|
903
|
+
|
|
904
|
+
// src/utils/slowOperations.ts
|
|
905
|
+
import {
|
|
906
|
+
closeSync,
|
|
907
|
+
writeFileSync as fsWriteFileSync,
|
|
908
|
+
fsyncSync,
|
|
909
|
+
openSync
|
|
910
|
+
} from "fs";
|
|
911
|
+
function slowLoggingExternal() {
|
|
912
|
+
return NOOP_LOGGER;
|
|
913
|
+
}
|
|
914
|
+
function jsonStringify(value, replacer, space) {
|
|
915
|
+
using _ = slowLogging`JSON.stringify(${value})`;
|
|
916
|
+
return JSON.stringify(value, replacer, space);
|
|
917
|
+
}
|
|
918
|
+
function clone(value, options) {
|
|
919
|
+
using _ = slowLogging`structuredClone(${value})`;
|
|
920
|
+
return structuredClone(value, options);
|
|
921
|
+
}
|
|
922
|
+
function writeFileSync_DEPRECATED(filePath, data, options) {
|
|
923
|
+
using _ = slowLogging`fs.writeFileSync(${filePath}, ${data})`;
|
|
924
|
+
const needsFlush = options !== null && typeof options === "object" && "flush" in options && options.flush === true;
|
|
925
|
+
if (needsFlush) {
|
|
926
|
+
const encoding = typeof options === "object" && "encoding" in options ? options.encoding : undefined;
|
|
927
|
+
const mode = typeof options === "object" && "mode" in options ? options.mode : undefined;
|
|
928
|
+
let fd;
|
|
929
|
+
try {
|
|
930
|
+
fd = openSync(filePath, "w", mode);
|
|
931
|
+
fsWriteFileSync(fd, data, { encoding: encoding ?? undefined });
|
|
932
|
+
fsyncSync(fd);
|
|
933
|
+
} finally {
|
|
934
|
+
if (fd !== undefined) {
|
|
935
|
+
closeSync(fd);
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
} else {
|
|
939
|
+
fsWriteFileSync(filePath, data, options);
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
var SLOW_OPERATION_THRESHOLD_MS, NOOP_LOGGER, slowLogging, jsonParse = (text, reviver) => {
|
|
943
|
+
using _ = slowLogging`JSON.parse(${text})`;
|
|
944
|
+
return typeof reviver === "undefined" ? JSON.parse(text) : JSON.parse(text, reviver);
|
|
945
|
+
};
|
|
946
|
+
var init_slowOperations = __esm(() => {
|
|
947
|
+
init_state();
|
|
948
|
+
init_debug();
|
|
949
|
+
SLOW_OPERATION_THRESHOLD_MS = (() => {
|
|
950
|
+
const envValue = process.env.CLAUDE_CODE_SLOW_OPERATION_THRESHOLD_MS;
|
|
951
|
+
if (envValue !== undefined) {
|
|
952
|
+
const parsed = Number(envValue);
|
|
953
|
+
if (!Number.isNaN(parsed) && parsed >= 0) {
|
|
954
|
+
return parsed;
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
if (true) {
|
|
958
|
+
return 20;
|
|
959
|
+
}
|
|
960
|
+
if (process.env.USER_TYPE === "ant") {
|
|
961
|
+
return 300;
|
|
962
|
+
}
|
|
963
|
+
return Infinity;
|
|
964
|
+
})();
|
|
965
|
+
NOOP_LOGGER = { [Symbol.dispose]() {} };
|
|
966
|
+
slowLogging = slowLoggingExternal;
|
|
967
|
+
});
|
|
968
|
+
|
|
969
|
+
// src/utils/fsOperations.ts
|
|
970
|
+
import * as fs from "fs";
|
|
971
|
+
import {
|
|
972
|
+
mkdir as mkdirPromise,
|
|
973
|
+
open,
|
|
974
|
+
readdir as readdirPromise,
|
|
975
|
+
readFile as readFilePromise,
|
|
976
|
+
rename as renamePromise,
|
|
977
|
+
rmdir as rmdirPromise,
|
|
978
|
+
rm as rmPromise,
|
|
979
|
+
stat as statPromise,
|
|
980
|
+
unlink as unlinkPromise
|
|
981
|
+
} from "fs/promises";
|
|
982
|
+
import { homedir } from "os";
|
|
983
|
+
import * as nodePath from "path";
|
|
984
|
+
function safeResolvePath(fs2, filePath) {
|
|
985
|
+
if (filePath.startsWith("//") || filePath.startsWith("\\\\")) {
|
|
986
|
+
return { resolvedPath: filePath, isSymlink: false, isCanonical: false };
|
|
987
|
+
}
|
|
988
|
+
try {
|
|
989
|
+
const stats = fs2.lstatSync(filePath);
|
|
990
|
+
if (stats.isFIFO() || stats.isSocket() || stats.isCharacterDevice() || stats.isBlockDevice()) {
|
|
991
|
+
return { resolvedPath: filePath, isSymlink: false, isCanonical: false };
|
|
992
|
+
}
|
|
993
|
+
const resolvedPath = fs2.realpathSync(filePath);
|
|
994
|
+
return {
|
|
995
|
+
resolvedPath,
|
|
996
|
+
isSymlink: resolvedPath !== filePath,
|
|
997
|
+
isCanonical: true
|
|
998
|
+
};
|
|
999
|
+
} catch (_error) {
|
|
1000
|
+
return { resolvedPath: filePath, isSymlink: false, isCanonical: false };
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
function isDuplicatePath(fs2, filePath, loadedPaths) {
|
|
1004
|
+
const { resolvedPath } = safeResolvePath(fs2, filePath);
|
|
1005
|
+
if (loadedPaths.has(resolvedPath)) {
|
|
1006
|
+
return true;
|
|
1007
|
+
}
|
|
1008
|
+
loadedPaths.add(resolvedPath);
|
|
1009
|
+
return false;
|
|
1010
|
+
}
|
|
1011
|
+
function resolveDeepestExistingAncestorSync(fs2, absolutePath) {
|
|
1012
|
+
let dir = absolutePath;
|
|
1013
|
+
const segments = [];
|
|
1014
|
+
while (dir !== nodePath.dirname(dir)) {
|
|
1015
|
+
let st;
|
|
1016
|
+
try {
|
|
1017
|
+
st = fs2.lstatSync(dir);
|
|
1018
|
+
} catch {
|
|
1019
|
+
segments.unshift(nodePath.basename(dir));
|
|
1020
|
+
dir = nodePath.dirname(dir);
|
|
1021
|
+
continue;
|
|
1022
|
+
}
|
|
1023
|
+
if (st.isSymbolicLink()) {
|
|
1024
|
+
try {
|
|
1025
|
+
const resolved = fs2.realpathSync(dir);
|
|
1026
|
+
return segments.length === 0 ? resolved : nodePath.join(resolved, ...segments);
|
|
1027
|
+
} catch {
|
|
1028
|
+
const target = fs2.readlinkSync(dir);
|
|
1029
|
+
const absTarget = nodePath.isAbsolute(target) ? target : nodePath.resolve(nodePath.dirname(dir), target);
|
|
1030
|
+
return segments.length === 0 ? absTarget : nodePath.join(absTarget, ...segments);
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
try {
|
|
1034
|
+
const resolved = fs2.realpathSync(dir);
|
|
1035
|
+
if (resolved !== dir) {
|
|
1036
|
+
return segments.length === 0 ? resolved : nodePath.join(resolved, ...segments);
|
|
1037
|
+
}
|
|
1038
|
+
} catch {}
|
|
1039
|
+
return;
|
|
1040
|
+
}
|
|
1041
|
+
return;
|
|
1042
|
+
}
|
|
1043
|
+
function getPathsForPermissionCheck(inputPath) {
|
|
1044
|
+
let path = inputPath;
|
|
1045
|
+
if (path === "~") {
|
|
1046
|
+
path = homedir().normalize("NFC");
|
|
1047
|
+
} else if (path.startsWith("~/")) {
|
|
1048
|
+
path = nodePath.join(homedir().normalize("NFC"), path.slice(2));
|
|
1049
|
+
}
|
|
1050
|
+
const pathSet = new Set;
|
|
1051
|
+
const fsImpl = getFsImplementation();
|
|
1052
|
+
pathSet.add(path);
|
|
1053
|
+
if (path.startsWith("//") || path.startsWith("\\\\")) {
|
|
1054
|
+
return Array.from(pathSet);
|
|
1055
|
+
}
|
|
1056
|
+
try {
|
|
1057
|
+
let currentPath = path;
|
|
1058
|
+
const visited = new Set;
|
|
1059
|
+
const maxDepth = 40;
|
|
1060
|
+
for (let depth = 0;depth < maxDepth; depth++) {
|
|
1061
|
+
if (visited.has(currentPath)) {
|
|
1062
|
+
break;
|
|
1063
|
+
}
|
|
1064
|
+
visited.add(currentPath);
|
|
1065
|
+
if (!fsImpl.existsSync(currentPath)) {
|
|
1066
|
+
if (currentPath === path) {
|
|
1067
|
+
const resolved = resolveDeepestExistingAncestorSync(fsImpl, path);
|
|
1068
|
+
if (resolved !== undefined) {
|
|
1069
|
+
pathSet.add(resolved);
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
break;
|
|
1073
|
+
}
|
|
1074
|
+
const stats = fsImpl.lstatSync(currentPath);
|
|
1075
|
+
if (stats.isFIFO() || stats.isSocket() || stats.isCharacterDevice() || stats.isBlockDevice()) {
|
|
1076
|
+
break;
|
|
1077
|
+
}
|
|
1078
|
+
if (!stats.isSymbolicLink()) {
|
|
1079
|
+
break;
|
|
1080
|
+
}
|
|
1081
|
+
const target = fsImpl.readlinkSync(currentPath);
|
|
1082
|
+
const absoluteTarget = nodePath.isAbsolute(target) ? target : nodePath.resolve(nodePath.dirname(currentPath), target);
|
|
1083
|
+
pathSet.add(absoluteTarget);
|
|
1084
|
+
currentPath = absoluteTarget;
|
|
1085
|
+
}
|
|
1086
|
+
} catch {}
|
|
1087
|
+
const { resolvedPath, isSymlink } = safeResolvePath(fsImpl, path);
|
|
1088
|
+
if (isSymlink && resolvedPath !== path) {
|
|
1089
|
+
pathSet.add(resolvedPath);
|
|
1090
|
+
}
|
|
1091
|
+
return Array.from(pathSet);
|
|
1092
|
+
}
|
|
1093
|
+
function getFsImplementation() {
|
|
1094
|
+
return activeFs;
|
|
1095
|
+
}
|
|
1096
|
+
async function readFileRange(path, offset, maxBytes) {
|
|
1097
|
+
await using fh = await open(path, "r");
|
|
1098
|
+
const size = (await fh.stat()).size;
|
|
1099
|
+
if (size <= offset) {
|
|
1100
|
+
return null;
|
|
1101
|
+
}
|
|
1102
|
+
const bytesToRead = Math.min(size - offset, maxBytes);
|
|
1103
|
+
const buffer = Buffer.allocUnsafe(bytesToRead);
|
|
1104
|
+
let totalRead = 0;
|
|
1105
|
+
while (totalRead < bytesToRead) {
|
|
1106
|
+
const { bytesRead } = await fh.read(buffer, totalRead, bytesToRead - totalRead, offset + totalRead);
|
|
1107
|
+
if (bytesRead === 0) {
|
|
1108
|
+
break;
|
|
1109
|
+
}
|
|
1110
|
+
totalRead += bytesRead;
|
|
1111
|
+
}
|
|
1112
|
+
return {
|
|
1113
|
+
content: buffer.toString("utf8", 0, totalRead),
|
|
1114
|
+
bytesRead: totalRead,
|
|
1115
|
+
bytesTotal: size
|
|
1116
|
+
};
|
|
1117
|
+
}
|
|
1118
|
+
async function tailFile(path, maxBytes) {
|
|
1119
|
+
await using fh = await open(path, "r");
|
|
1120
|
+
const size = (await fh.stat()).size;
|
|
1121
|
+
if (size === 0) {
|
|
1122
|
+
return { content: "", bytesRead: 0, bytesTotal: 0 };
|
|
1123
|
+
}
|
|
1124
|
+
const offset = Math.max(0, size - maxBytes);
|
|
1125
|
+
const bytesToRead = size - offset;
|
|
1126
|
+
const buffer = Buffer.allocUnsafe(bytesToRead);
|
|
1127
|
+
let totalRead = 0;
|
|
1128
|
+
while (totalRead < bytesToRead) {
|
|
1129
|
+
const { bytesRead } = await fh.read(buffer, totalRead, bytesToRead - totalRead, offset + totalRead);
|
|
1130
|
+
if (bytesRead === 0) {
|
|
1131
|
+
break;
|
|
1132
|
+
}
|
|
1133
|
+
totalRead += bytesRead;
|
|
1134
|
+
}
|
|
1135
|
+
return {
|
|
1136
|
+
content: buffer.toString("utf8", 0, totalRead),
|
|
1137
|
+
bytesRead: totalRead,
|
|
1138
|
+
bytesTotal: size
|
|
1139
|
+
};
|
|
1140
|
+
}
|
|
1141
|
+
async function* readLinesReverse(path) {
|
|
1142
|
+
const CHUNK_SIZE = 1024 * 4;
|
|
1143
|
+
const fileHandle = await open(path, "r");
|
|
1144
|
+
try {
|
|
1145
|
+
const stats = await fileHandle.stat();
|
|
1146
|
+
let position = stats.size;
|
|
1147
|
+
let remainder = Buffer.alloc(0);
|
|
1148
|
+
const buffer = Buffer.alloc(CHUNK_SIZE);
|
|
1149
|
+
while (position > 0) {
|
|
1150
|
+
const currentChunkSize = Math.min(CHUNK_SIZE, position);
|
|
1151
|
+
position -= currentChunkSize;
|
|
1152
|
+
await fileHandle.read(buffer, 0, currentChunkSize, position);
|
|
1153
|
+
const combined = Buffer.concat([
|
|
1154
|
+
buffer.subarray(0, currentChunkSize),
|
|
1155
|
+
remainder
|
|
1156
|
+
]);
|
|
1157
|
+
const firstNewline = combined.indexOf(10);
|
|
1158
|
+
if (firstNewline === -1) {
|
|
1159
|
+
remainder = combined;
|
|
1160
|
+
continue;
|
|
1161
|
+
}
|
|
1162
|
+
remainder = Buffer.from(combined.subarray(0, firstNewline));
|
|
1163
|
+
const lines = combined.toString("utf8", firstNewline + 1).split(`
|
|
1164
|
+
`);
|
|
1165
|
+
for (let i = lines.length - 1;i >= 0; i--) {
|
|
1166
|
+
const line = lines[i];
|
|
1167
|
+
if (line) {
|
|
1168
|
+
yield line;
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1172
|
+
if (remainder.length > 0) {
|
|
1173
|
+
yield remainder.toString("utf8");
|
|
1174
|
+
}
|
|
1175
|
+
} finally {
|
|
1176
|
+
await fileHandle.close();
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
var NodeFsOperations, activeFs;
|
|
1180
|
+
var init_fsOperations = __esm(() => {
|
|
1181
|
+
init_errors();
|
|
1182
|
+
init_slowOperations();
|
|
1183
|
+
NodeFsOperations = {
|
|
1184
|
+
cwd() {
|
|
1185
|
+
return process.cwd();
|
|
1186
|
+
},
|
|
1187
|
+
existsSync(fsPath) {
|
|
1188
|
+
using _ = slowLogging`fs.existsSync(${fsPath})`;
|
|
1189
|
+
return fs.existsSync(fsPath);
|
|
1190
|
+
},
|
|
1191
|
+
async stat(fsPath) {
|
|
1192
|
+
return statPromise(fsPath);
|
|
1193
|
+
},
|
|
1194
|
+
async readdir(fsPath) {
|
|
1195
|
+
return readdirPromise(fsPath, { withFileTypes: true });
|
|
1196
|
+
},
|
|
1197
|
+
async unlink(fsPath) {
|
|
1198
|
+
return unlinkPromise(fsPath);
|
|
1199
|
+
},
|
|
1200
|
+
async rmdir(fsPath) {
|
|
1201
|
+
return rmdirPromise(fsPath);
|
|
1202
|
+
},
|
|
1203
|
+
async rm(fsPath, options) {
|
|
1204
|
+
return rmPromise(fsPath, options);
|
|
1205
|
+
},
|
|
1206
|
+
async mkdir(dirPath, options) {
|
|
1207
|
+
try {
|
|
1208
|
+
await mkdirPromise(dirPath, { recursive: true, ...options });
|
|
1209
|
+
} catch (e) {
|
|
1210
|
+
if (getErrnoCode(e) !== "EEXIST")
|
|
1211
|
+
throw e;
|
|
1212
|
+
}
|
|
1213
|
+
},
|
|
1214
|
+
async readFile(fsPath, options) {
|
|
1215
|
+
return readFilePromise(fsPath, { encoding: options.encoding });
|
|
1216
|
+
},
|
|
1217
|
+
async rename(oldPath, newPath) {
|
|
1218
|
+
return renamePromise(oldPath, newPath);
|
|
1219
|
+
},
|
|
1220
|
+
statSync(fsPath) {
|
|
1221
|
+
using _ = slowLogging`fs.statSync(${fsPath})`;
|
|
1222
|
+
return fs.statSync(fsPath);
|
|
1223
|
+
},
|
|
1224
|
+
lstatSync(fsPath) {
|
|
1225
|
+
using _ = slowLogging`fs.lstatSync(${fsPath})`;
|
|
1226
|
+
return fs.lstatSync(fsPath);
|
|
1227
|
+
},
|
|
1228
|
+
readFileSync(fsPath, options) {
|
|
1229
|
+
using _ = slowLogging`fs.readFileSync(${fsPath})`;
|
|
1230
|
+
return fs.readFileSync(fsPath, { encoding: options.encoding });
|
|
1231
|
+
},
|
|
1232
|
+
readFileBytesSync(fsPath) {
|
|
1233
|
+
using _ = slowLogging`fs.readFileBytesSync(${fsPath})`;
|
|
1234
|
+
return fs.readFileSync(fsPath);
|
|
1235
|
+
},
|
|
1236
|
+
readSync(fsPath, options) {
|
|
1237
|
+
using _ = slowLogging`fs.readSync(${fsPath}, ${options.length} bytes)`;
|
|
1238
|
+
let fd;
|
|
1239
|
+
try {
|
|
1240
|
+
fd = fs.openSync(fsPath, "r");
|
|
1241
|
+
const buffer = Buffer.alloc(options.length);
|
|
1242
|
+
const bytesRead = fs.readSync(fd, buffer, 0, options.length, 0);
|
|
1243
|
+
return { buffer, bytesRead };
|
|
1244
|
+
} finally {
|
|
1245
|
+
if (fd)
|
|
1246
|
+
fs.closeSync(fd);
|
|
1247
|
+
}
|
|
1248
|
+
},
|
|
1249
|
+
appendFileSync(path, data, options) {
|
|
1250
|
+
using _ = slowLogging`fs.appendFileSync(${path}, ${data.length} chars)`;
|
|
1251
|
+
if (options?.mode !== undefined) {
|
|
1252
|
+
try {
|
|
1253
|
+
const fd = fs.openSync(path, "ax", options.mode);
|
|
1254
|
+
try {
|
|
1255
|
+
fs.appendFileSync(fd, data);
|
|
1256
|
+
} finally {
|
|
1257
|
+
fs.closeSync(fd);
|
|
1258
|
+
}
|
|
1259
|
+
return;
|
|
1260
|
+
} catch (e) {
|
|
1261
|
+
if (getErrnoCode(e) !== "EEXIST")
|
|
1262
|
+
throw e;
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
fs.appendFileSync(path, data);
|
|
1266
|
+
},
|
|
1267
|
+
copyFileSync(src, dest) {
|
|
1268
|
+
using _ = slowLogging`fs.copyFileSync(${src} \u2192 ${dest})`;
|
|
1269
|
+
fs.copyFileSync(src, dest);
|
|
1270
|
+
},
|
|
1271
|
+
unlinkSync(path) {
|
|
1272
|
+
using _ = slowLogging`fs.unlinkSync(${path})`;
|
|
1273
|
+
fs.unlinkSync(path);
|
|
1274
|
+
},
|
|
1275
|
+
renameSync(oldPath, newPath) {
|
|
1276
|
+
using _ = slowLogging`fs.renameSync(${oldPath} \u2192 ${newPath})`;
|
|
1277
|
+
fs.renameSync(oldPath, newPath);
|
|
1278
|
+
},
|
|
1279
|
+
linkSync(target, path) {
|
|
1280
|
+
using _ = slowLogging`fs.linkSync(${target} \u2192 ${path})`;
|
|
1281
|
+
fs.linkSync(target, path);
|
|
1282
|
+
},
|
|
1283
|
+
symlinkSync(target, path, type) {
|
|
1284
|
+
using _ = slowLogging`fs.symlinkSync(${target} \u2192 ${path})`;
|
|
1285
|
+
fs.symlinkSync(target, path, type);
|
|
1286
|
+
},
|
|
1287
|
+
readlinkSync(path) {
|
|
1288
|
+
using _ = slowLogging`fs.readlinkSync(${path})`;
|
|
1289
|
+
return fs.readlinkSync(path);
|
|
1290
|
+
},
|
|
1291
|
+
realpathSync(path) {
|
|
1292
|
+
using _ = slowLogging`fs.realpathSync(${path})`;
|
|
1293
|
+
return fs.realpathSync(path).normalize("NFC");
|
|
1294
|
+
},
|
|
1295
|
+
mkdirSync(dirPath, options) {
|
|
1296
|
+
using _ = slowLogging`fs.mkdirSync(${dirPath})`;
|
|
1297
|
+
const mkdirOptions = {
|
|
1298
|
+
recursive: true
|
|
1299
|
+
};
|
|
1300
|
+
if (options?.mode !== undefined) {
|
|
1301
|
+
mkdirOptions.mode = options.mode;
|
|
1302
|
+
}
|
|
1303
|
+
try {
|
|
1304
|
+
fs.mkdirSync(dirPath, mkdirOptions);
|
|
1305
|
+
} catch (e) {
|
|
1306
|
+
if (getErrnoCode(e) !== "EEXIST")
|
|
1307
|
+
throw e;
|
|
1308
|
+
}
|
|
1309
|
+
},
|
|
1310
|
+
readdirSync(dirPath) {
|
|
1311
|
+
using _ = slowLogging`fs.readdirSync(${dirPath})`;
|
|
1312
|
+
return fs.readdirSync(dirPath, { withFileTypes: true });
|
|
1313
|
+
},
|
|
1314
|
+
readdirStringSync(dirPath) {
|
|
1315
|
+
using _ = slowLogging`fs.readdirStringSync(${dirPath})`;
|
|
1316
|
+
return fs.readdirSync(dirPath);
|
|
1317
|
+
},
|
|
1318
|
+
isDirEmptySync(dirPath) {
|
|
1319
|
+
using _ = slowLogging`fs.isDirEmptySync(${dirPath})`;
|
|
1320
|
+
const files = this.readdirSync(dirPath);
|
|
1321
|
+
return files.length === 0;
|
|
1322
|
+
},
|
|
1323
|
+
rmdirSync(dirPath) {
|
|
1324
|
+
using _ = slowLogging`fs.rmdirSync(${dirPath})`;
|
|
1325
|
+
fs.rmdirSync(dirPath);
|
|
1326
|
+
},
|
|
1327
|
+
rmSync(path, options) {
|
|
1328
|
+
using _ = slowLogging`fs.rmSync(${path})`;
|
|
1329
|
+
fs.rmSync(path, options);
|
|
1330
|
+
},
|
|
1331
|
+
createWriteStream(path) {
|
|
1332
|
+
return fs.createWriteStream(path);
|
|
1333
|
+
},
|
|
1334
|
+
async readFileBytes(fsPath, maxBytes) {
|
|
1335
|
+
if (maxBytes === undefined) {
|
|
1336
|
+
return readFilePromise(fsPath);
|
|
1337
|
+
}
|
|
1338
|
+
const handle = await open(fsPath, "r");
|
|
1339
|
+
try {
|
|
1340
|
+
const { size } = await handle.stat();
|
|
1341
|
+
const readSize = Math.min(size, maxBytes);
|
|
1342
|
+
const buffer = Buffer.allocUnsafe(readSize);
|
|
1343
|
+
let offset = 0;
|
|
1344
|
+
while (offset < readSize) {
|
|
1345
|
+
const { bytesRead } = await handle.read(buffer, offset, readSize - offset, offset);
|
|
1346
|
+
if (bytesRead === 0)
|
|
1347
|
+
break;
|
|
1348
|
+
offset += bytesRead;
|
|
1349
|
+
}
|
|
1350
|
+
return offset < readSize ? buffer.subarray(0, offset) : buffer;
|
|
1351
|
+
} finally {
|
|
1352
|
+
await handle.close();
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
};
|
|
1356
|
+
activeFs = NodeFsOperations;
|
|
1357
|
+
});
|
|
1358
|
+
|
|
1359
|
+
// src/constants/xml.ts
|
|
1360
|
+
var COMMAND_NAME_TAG = "command-name", COMMAND_MESSAGE_TAG = "command-message", COMMAND_ARGS_TAG = "command-args", BASH_INPUT_TAG = "bash-input", BASH_STDOUT_TAG = "bash-stdout", BASH_STDERR_TAG = "bash-stderr", LOCAL_COMMAND_STDOUT_TAG = "local-command-stdout", LOCAL_COMMAND_STDERR_TAG = "local-command-stderr", LOCAL_COMMAND_CAVEAT_TAG = "local-command-caveat", TERMINAL_OUTPUT_TAGS, TICK_TAG = "tick", TASK_NOTIFICATION_TAG = "task-notification", TASK_ID_TAG = "task-id", TOOL_USE_ID_TAG = "tool-use-id", TASK_TYPE_TAG = "task-type", OUTPUT_FILE_TAG = "output-file", STATUS_TAG = "status", SUMMARY_TAG = "summary", WORKTREE_TAG = "worktree", WORKTREE_PATH_TAG = "worktreePath", WORKTREE_BRANCH_TAG = "worktreeBranch", ULTRAPLAN_TAG = "ultraplan", REMOTE_REVIEW_TAG = "remote-review", REMOTE_REVIEW_PROGRESS_TAG = "remote-review-progress", TEAMMATE_MESSAGE_TAG = "teammate-message", CHANNEL_MESSAGE_TAG = "channel-message", CHANNEL_TAG = "channel", CROSS_SESSION_MESSAGE_TAG = "cross-session-message", FORK_BOILERPLATE_TAG = "fork-boilerplate", FORK_DIRECTIVE_PREFIX = "Your directive: ", COMMON_HELP_ARGS, COMMON_INFO_ARGS;
|
|
1361
|
+
var init_xml = __esm(() => {
|
|
1362
|
+
TERMINAL_OUTPUT_TAGS = [
|
|
1363
|
+
BASH_INPUT_TAG,
|
|
1364
|
+
BASH_STDOUT_TAG,
|
|
1365
|
+
BASH_STDERR_TAG,
|
|
1366
|
+
LOCAL_COMMAND_STDOUT_TAG,
|
|
1367
|
+
LOCAL_COMMAND_STDERR_TAG,
|
|
1368
|
+
LOCAL_COMMAND_CAVEAT_TAG
|
|
1369
|
+
];
|
|
1370
|
+
COMMON_HELP_ARGS = ["help", "-h", "--help"];
|
|
1371
|
+
COMMON_INFO_ARGS = [
|
|
1372
|
+
"list",
|
|
1373
|
+
"show",
|
|
1374
|
+
"display",
|
|
1375
|
+
"current",
|
|
1376
|
+
"view",
|
|
1377
|
+
"get",
|
|
1378
|
+
"check",
|
|
1379
|
+
"describe",
|
|
1380
|
+
"print",
|
|
1381
|
+
"version",
|
|
1382
|
+
"about",
|
|
1383
|
+
"status",
|
|
1384
|
+
"?"
|
|
1385
|
+
];
|
|
1386
|
+
});
|
|
1387
|
+
|
|
1388
|
+
// src/types/logs.ts
|
|
1389
|
+
function sortLogs(logs) {
|
|
1390
|
+
return logs.sort((a, b) => {
|
|
1391
|
+
const modifiedDiff = b.modified.getTime() - a.modified.getTime();
|
|
1392
|
+
if (modifiedDiff !== 0) {
|
|
1393
|
+
return modifiedDiff;
|
|
1394
|
+
}
|
|
1395
|
+
return b.created.getTime() - a.created.getTime();
|
|
1396
|
+
});
|
|
1397
|
+
}
|
|
1398
|
+
var init_logs = () => {};
|
|
1399
|
+
|
|
1400
|
+
// node_modules/.bun/is-safe-filename@0.1.1/node_modules/is-safe-filename/index.js
|
|
1401
|
+
function isSafeFilename(filename) {
|
|
1402
|
+
if (typeof filename !== "string") {
|
|
1403
|
+
return false;
|
|
1404
|
+
}
|
|
1405
|
+
const trimmed = filename.trim();
|
|
1406
|
+
return trimmed !== "" && trimmed !== "." && trimmed !== ".." && !filename.includes("/") && !filename.includes("\\") && !filename.includes("\x00");
|
|
1407
|
+
}
|
|
1408
|
+
function assertSafeFilename(filename) {
|
|
1409
|
+
if (typeof filename !== "string") {
|
|
1410
|
+
throw new TypeError("Expected a string");
|
|
1411
|
+
}
|
|
1412
|
+
if (!isSafeFilename(filename)) {
|
|
1413
|
+
throw new Error(`Unsafe filename: ${JSON.stringify(filename)}`);
|
|
1414
|
+
}
|
|
1415
|
+
}
|
|
1416
|
+
var unsafeFilenameFixtures;
|
|
1417
|
+
var init_is_safe_filename = __esm(() => {
|
|
1418
|
+
unsafeFilenameFixtures = Object.freeze([
|
|
1419
|
+
"",
|
|
1420
|
+
" ",
|
|
1421
|
+
".",
|
|
1422
|
+
"..",
|
|
1423
|
+
" .",
|
|
1424
|
+
". ",
|
|
1425
|
+
" ..",
|
|
1426
|
+
".. ",
|
|
1427
|
+
"../",
|
|
1428
|
+
"../foo",
|
|
1429
|
+
"foo/../bar",
|
|
1430
|
+
"foo/bar",
|
|
1431
|
+
"foo\\bar",
|
|
1432
|
+
"foo\x00bar"
|
|
1433
|
+
]);
|
|
1434
|
+
});
|
|
1435
|
+
|
|
1436
|
+
// node_modules/.bun/env-paths@4.0.0/node_modules/env-paths/index.js
|
|
1437
|
+
import path from "path";
|
|
1438
|
+
import os from "os";
|
|
1439
|
+
import process2 from "process";
|
|
1440
|
+
function envPaths(name, { suffix = "nodejs" } = {}) {
|
|
1441
|
+
assertSafeFilename(name);
|
|
1442
|
+
if (suffix) {
|
|
1443
|
+
name += `-${suffix}`;
|
|
1444
|
+
}
|
|
1445
|
+
assertSafeFilename(name);
|
|
1446
|
+
if (process2.platform === "darwin") {
|
|
1447
|
+
return macos(name);
|
|
1448
|
+
}
|
|
1449
|
+
if (process2.platform === "win32") {
|
|
1450
|
+
return windows(name);
|
|
1451
|
+
}
|
|
1452
|
+
return linux(name);
|
|
1453
|
+
}
|
|
1454
|
+
var homedir2, tmpdir, env, macos = (name) => {
|
|
1455
|
+
const library = path.join(homedir2, "Library");
|
|
1456
|
+
return {
|
|
1457
|
+
data: path.join(library, "Application Support", name),
|
|
1458
|
+
config: path.join(library, "Preferences", name),
|
|
1459
|
+
cache: path.join(library, "Caches", name),
|
|
1460
|
+
log: path.join(library, "Logs", name),
|
|
1461
|
+
temp: path.join(tmpdir, name)
|
|
1462
|
+
};
|
|
1463
|
+
}, windows = (name) => {
|
|
1464
|
+
const appData = env.APPDATA || path.join(homedir2, "AppData", "Roaming");
|
|
1465
|
+
const localAppData = env.LOCALAPPDATA || path.join(homedir2, "AppData", "Local");
|
|
1466
|
+
return {
|
|
1467
|
+
data: path.join(localAppData, name, "Data"),
|
|
1468
|
+
config: path.join(appData, name, "Config"),
|
|
1469
|
+
cache: path.join(localAppData, name, "Cache"),
|
|
1470
|
+
log: path.join(localAppData, name, "Log"),
|
|
1471
|
+
temp: path.join(tmpdir, name)
|
|
1472
|
+
};
|
|
1473
|
+
}, linux = (name) => {
|
|
1474
|
+
const username = path.basename(homedir2);
|
|
1475
|
+
return {
|
|
1476
|
+
data: path.join(env.XDG_DATA_HOME || path.join(homedir2, ".local", "share"), name),
|
|
1477
|
+
config: path.join(env.XDG_CONFIG_HOME || path.join(homedir2, ".config"), name),
|
|
1478
|
+
cache: path.join(env.XDG_CACHE_HOME || path.join(homedir2, ".cache"), name),
|
|
1479
|
+
log: path.join(env.XDG_STATE_HOME || path.join(homedir2, ".local", "state"), name),
|
|
1480
|
+
temp: path.join(tmpdir, username, name)
|
|
1481
|
+
};
|
|
1482
|
+
};
|
|
1483
|
+
var init_env_paths = __esm(() => {
|
|
1484
|
+
init_is_safe_filename();
|
|
1485
|
+
homedir2 = os.homedir();
|
|
1486
|
+
tmpdir = os.tmpdir();
|
|
1487
|
+
({ env } = process2);
|
|
1488
|
+
});
|
|
1489
|
+
|
|
1490
|
+
// src/utils/hash.ts
|
|
1491
|
+
function djb2Hash(str) {
|
|
1492
|
+
let hash = 0;
|
|
1493
|
+
for (let i = 0;i < str.length; i++) {
|
|
1494
|
+
hash = (hash << 5) - hash + str.charCodeAt(i) | 0;
|
|
1495
|
+
}
|
|
1496
|
+
return hash;
|
|
1497
|
+
}
|
|
1498
|
+
function hashContent(content) {
|
|
1499
|
+
if (typeof Bun !== "undefined") {
|
|
1500
|
+
return Bun.hash(content).toString();
|
|
1501
|
+
}
|
|
1502
|
+
const crypto = __require("crypto");
|
|
1503
|
+
return crypto.createHash("sha256").update(content).digest("hex");
|
|
1504
|
+
}
|
|
1505
|
+
function hashPair(a, b) {
|
|
1506
|
+
if (typeof Bun !== "undefined") {
|
|
1507
|
+
return Bun.hash(b, Bun.hash(a)).toString();
|
|
1508
|
+
}
|
|
1509
|
+
const crypto = __require("crypto");
|
|
1510
|
+
return crypto.createHash("sha256").update(a).update("\x00").update(b).digest("hex");
|
|
1511
|
+
}
|
|
1512
|
+
var init_hash = () => {};
|
|
1513
|
+
|
|
1514
|
+
// src/utils/cachePaths.ts
|
|
1515
|
+
import { join as join2 } from "path";
|
|
1516
|
+
function sanitizePath(name) {
|
|
1517
|
+
const sanitized = name.replace(/[^a-zA-Z0-9]/g, "-");
|
|
1518
|
+
if (sanitized.length <= MAX_SANITIZED_LENGTH) {
|
|
1519
|
+
return sanitized;
|
|
1520
|
+
}
|
|
1521
|
+
return `${sanitized.slice(0, MAX_SANITIZED_LENGTH)}-${Math.abs(djb2Hash(name)).toString(36)}`;
|
|
1522
|
+
}
|
|
1523
|
+
function getProjectDir(cwd) {
|
|
1524
|
+
return sanitizePath(cwd);
|
|
1525
|
+
}
|
|
1526
|
+
function getBaseLogPath(paths) {
|
|
1527
|
+
return join2(paths.cache, getProjectDir(getFsImplementation().cwd()));
|
|
1528
|
+
}
|
|
1529
|
+
function getMcpLogPath(paths, serverName) {
|
|
1530
|
+
return join2(paths.cache, getProjectDir(getFsImplementation().cwd()), `mcp-logs-${sanitizePath(serverName)}`);
|
|
1531
|
+
}
|
|
1532
|
+
var redscopePaths, legacyPaths, MAX_SANITIZED_LENGTH = 200, CACHE_PATHS;
|
|
1533
|
+
var init_cachePaths = __esm(() => {
|
|
1534
|
+
init_env_paths();
|
|
1535
|
+
init_fsOperations();
|
|
1536
|
+
init_hash();
|
|
1537
|
+
init_redscopeCompat();
|
|
1538
|
+
redscopePaths = envPaths("redscope-ai");
|
|
1539
|
+
legacyPaths = envPaths("claude-cli");
|
|
1540
|
+
CACHE_PATHS = {
|
|
1541
|
+
baseLogs: () => getBaseLogPath(redscopePaths),
|
|
1542
|
+
baseLogCandidates: () => uniquePaths([getBaseLogPath(redscopePaths), getBaseLogPath(legacyPaths)]),
|
|
1543
|
+
errors: () => join2(getBaseLogPath(redscopePaths), "errors"),
|
|
1544
|
+
errorCandidates: () => uniquePaths([
|
|
1545
|
+
join2(getBaseLogPath(redscopePaths), "errors"),
|
|
1546
|
+
join2(getBaseLogPath(legacyPaths), "errors")
|
|
1547
|
+
]),
|
|
1548
|
+
messages: () => join2(getBaseLogPath(redscopePaths), "messages"),
|
|
1549
|
+
messageCandidates: () => uniquePaths([
|
|
1550
|
+
join2(getBaseLogPath(redscopePaths), "messages"),
|
|
1551
|
+
join2(getBaseLogPath(legacyPaths), "messages")
|
|
1552
|
+
]),
|
|
1553
|
+
mcpLogs: (serverName) => getMcpLogPath(redscopePaths, serverName),
|
|
1554
|
+
mcpLogCandidates: (serverName) => uniquePaths([
|
|
1555
|
+
getMcpLogPath(redscopePaths, serverName),
|
|
1556
|
+
getMcpLogPath(legacyPaths, serverName)
|
|
1557
|
+
])
|
|
1558
|
+
};
|
|
1559
|
+
});
|
|
1560
|
+
|
|
1561
|
+
// src/utils/displayTags.ts
|
|
1562
|
+
function stripDisplayTags(text) {
|
|
1563
|
+
const result = text.replace(XML_TAG_BLOCK_PATTERN, "").trim();
|
|
1564
|
+
return result || text;
|
|
1565
|
+
}
|
|
1566
|
+
function stripDisplayTagsAllowEmpty(text) {
|
|
1567
|
+
return text.replace(XML_TAG_BLOCK_PATTERN, "").trim();
|
|
1568
|
+
}
|
|
1569
|
+
function stripIdeContextTags(text) {
|
|
1570
|
+
return text.replace(IDE_CONTEXT_TAGS_PATTERN, "").trim();
|
|
1571
|
+
}
|
|
1572
|
+
var XML_TAG_BLOCK_PATTERN, IDE_CONTEXT_TAGS_PATTERN;
|
|
1573
|
+
var init_displayTags = __esm(() => {
|
|
1574
|
+
XML_TAG_BLOCK_PATTERN = /<([a-z][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g;
|
|
1575
|
+
IDE_CONTEXT_TAGS_PATTERN = /<(ide_opened_file|ide_selection)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g;
|
|
1576
|
+
});
|
|
1577
|
+
|
|
1578
|
+
// src/utils/privacyLevel.ts
|
|
1579
|
+
function getPrivacyLevel() {
|
|
1580
|
+
if (process.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC) {
|
|
1581
|
+
return "essential-traffic";
|
|
1582
|
+
}
|
|
1583
|
+
if (process.env.DISABLE_TELEMETRY) {
|
|
1584
|
+
return "no-telemetry";
|
|
1585
|
+
}
|
|
1586
|
+
return "default";
|
|
1587
|
+
}
|
|
1588
|
+
function isEssentialTrafficOnly() {
|
|
1589
|
+
return getPrivacyLevel() === "essential-traffic";
|
|
1590
|
+
}
|
|
1591
|
+
function isTelemetryDisabled() {
|
|
1592
|
+
return getPrivacyLevel() !== "default";
|
|
1593
|
+
}
|
|
1594
|
+
function getEssentialTrafficOnlyReason() {
|
|
1595
|
+
if (process.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC) {
|
|
1596
|
+
return "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC";
|
|
1597
|
+
}
|
|
1598
|
+
return null;
|
|
1599
|
+
}
|
|
1600
|
+
var init_privacyLevel = () => {};
|
|
1601
|
+
|
|
1602
|
+
// src/utils/log.ts
|
|
1603
|
+
function getLogDisplayTitle(log, defaultTitle) {
|
|
1604
|
+
const isAutonomousPrompt = log.firstPrompt?.startsWith(`<${TICK_TAG}>`);
|
|
1605
|
+
const strippedFirstPrompt = log.firstPrompt ? stripDisplayTagsAllowEmpty(log.firstPrompt) : "";
|
|
1606
|
+
const useFirstPrompt = strippedFirstPrompt && !isAutonomousPrompt;
|
|
1607
|
+
const title = log.agentName || log.customTitle || log.summary || (useFirstPrompt ? strippedFirstPrompt : undefined) || defaultTitle || (isAutonomousPrompt ? "Autonomous session" : undefined) || (log.sessionId ? log.sessionId.slice(0, 8) : "") || "";
|
|
1608
|
+
return stripDisplayTags(title).trim();
|
|
1609
|
+
}
|
|
1610
|
+
function dateToFilename(date) {
|
|
1611
|
+
return date.toISOString().replace(/[:.]/g, "-");
|
|
1612
|
+
}
|
|
1613
|
+
function addToInMemoryErrorLog(errorInfo) {
|
|
1614
|
+
if (inMemoryErrorLog.length >= MAX_IN_MEMORY_ERRORS) {
|
|
1615
|
+
inMemoryErrorLog.shift();
|
|
1616
|
+
}
|
|
1617
|
+
inMemoryErrorLog.push(errorInfo);
|
|
1618
|
+
}
|
|
1619
|
+
function attachErrorLogSink(newSink) {
|
|
1620
|
+
if (errorLogSink !== null) {
|
|
1621
|
+
return;
|
|
1622
|
+
}
|
|
1623
|
+
errorLogSink = newSink;
|
|
1624
|
+
if (errorQueue.length > 0) {
|
|
1625
|
+
const queuedEvents = [...errorQueue];
|
|
1626
|
+
errorQueue.length = 0;
|
|
1627
|
+
for (const event of queuedEvents) {
|
|
1628
|
+
switch (event.type) {
|
|
1629
|
+
case "error":
|
|
1630
|
+
errorLogSink.logError(event.error);
|
|
1631
|
+
break;
|
|
1632
|
+
case "mcpError":
|
|
1633
|
+
errorLogSink.logMCPError(event.serverName, event.error);
|
|
1634
|
+
break;
|
|
1635
|
+
case "mcpDebug":
|
|
1636
|
+
errorLogSink.logMCPDebug(event.serverName, event.message);
|
|
1637
|
+
break;
|
|
1638
|
+
}
|
|
1639
|
+
}
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
function logError(error) {
|
|
1643
|
+
const err = toError(error);
|
|
1644
|
+
if (false) {}
|
|
1645
|
+
try {
|
|
1646
|
+
if (isEnvTruthy(process.env.CLAUDE_CODE_USE_BEDROCK) || isEnvTruthy(process.env.CLAUDE_CODE_USE_VERTEX) || isEnvTruthy(process.env.CLAUDE_CODE_USE_FOUNDRY) || process.env.DISABLE_ERROR_REPORTING || isEssentialTrafficOnly()) {
|
|
1647
|
+
return;
|
|
1648
|
+
}
|
|
1649
|
+
const errorStr = err.stack || err.message;
|
|
1650
|
+
const errorInfo = {
|
|
1651
|
+
error: errorStr,
|
|
1652
|
+
timestamp: new Date().toISOString()
|
|
1653
|
+
};
|
|
1654
|
+
addToInMemoryErrorLog(errorInfo);
|
|
1655
|
+
if (errorLogSink === null) {
|
|
1656
|
+
errorQueue.push({ type: "error", error: err });
|
|
1657
|
+
return;
|
|
1658
|
+
}
|
|
1659
|
+
errorLogSink.logError(err);
|
|
1660
|
+
} catch {}
|
|
1661
|
+
}
|
|
1662
|
+
function getInMemoryErrors() {
|
|
1663
|
+
return [...inMemoryErrorLog];
|
|
1664
|
+
}
|
|
1665
|
+
function logMCPError(serverName, error) {
|
|
1666
|
+
try {
|
|
1667
|
+
if (errorLogSink === null) {
|
|
1668
|
+
errorQueue.push({ type: "mcpError", serverName, error });
|
|
1669
|
+
return;
|
|
1670
|
+
}
|
|
1671
|
+
errorLogSink.logMCPError(serverName, error);
|
|
1672
|
+
} catch {}
|
|
1673
|
+
}
|
|
1674
|
+
function logMCPDebug(serverName, message) {
|
|
1675
|
+
try {
|
|
1676
|
+
if (errorLogSink === null) {
|
|
1677
|
+
errorQueue.push({ type: "mcpDebug", serverName, message });
|
|
1678
|
+
return;
|
|
1679
|
+
}
|
|
1680
|
+
errorLogSink.logMCPDebug(serverName, message);
|
|
1681
|
+
} catch {}
|
|
1682
|
+
}
|
|
1683
|
+
function captureAPIRequest(params, querySource) {
|
|
1684
|
+
if (!querySource || !querySource.startsWith("repl_main_thread")) {
|
|
1685
|
+
return;
|
|
1686
|
+
}
|
|
1687
|
+
const { messages, ...paramsWithoutMessages } = params;
|
|
1688
|
+
setLastAPIRequest(paramsWithoutMessages);
|
|
1689
|
+
setLastAPIRequestMessages(process.env.USER_TYPE === "ant" ? messages : null);
|
|
1690
|
+
}
|
|
1691
|
+
var MAX_IN_MEMORY_ERRORS = 100, inMemoryErrorLog, errorQueue, errorLogSink = null, isHardFailMode;
|
|
1692
|
+
var init_log = __esm(() => {
|
|
1693
|
+
init_memoize();
|
|
1694
|
+
init_state();
|
|
1695
|
+
init_xml();
|
|
1696
|
+
init_logs();
|
|
1697
|
+
init_cachePaths();
|
|
1698
|
+
init_displayTags();
|
|
1699
|
+
init_envUtils();
|
|
1700
|
+
init_errors();
|
|
1701
|
+
init_privacyLevel();
|
|
1702
|
+
init_slowOperations();
|
|
1703
|
+
inMemoryErrorLog = [];
|
|
1704
|
+
errorQueue = [];
|
|
1705
|
+
isHardFailMode = memoize_default(() => {
|
|
1706
|
+
return process.argv.includes("--hard-fail");
|
|
1707
|
+
});
|
|
1708
|
+
});
|
|
1709
|
+
|
|
1710
|
+
// src/utils/platform.ts
|
|
1711
|
+
import { readdir, readFile } from "fs/promises";
|
|
1712
|
+
import { release as osRelease } from "os";
|
|
1713
|
+
async function detectVcs(dir) {
|
|
1714
|
+
const detected = new Set;
|
|
1715
|
+
if (process.env.P4PORT) {
|
|
1716
|
+
detected.add("perforce");
|
|
1717
|
+
}
|
|
1718
|
+
try {
|
|
1719
|
+
const targetDir = dir ?? getFsImplementation().cwd();
|
|
1720
|
+
const entries = new Set(await readdir(targetDir));
|
|
1721
|
+
for (const [marker, vcs] of VCS_MARKERS) {
|
|
1722
|
+
if (entries.has(marker)) {
|
|
1723
|
+
detected.add(vcs);
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1726
|
+
} catch {}
|
|
1727
|
+
return [...detected];
|
|
1728
|
+
}
|
|
1729
|
+
var SUPPORTED_PLATFORMS, getPlatform, getWslVersion, getLinuxDistroInfo, VCS_MARKERS;
|
|
1730
|
+
var init_platform = __esm(() => {
|
|
1731
|
+
init_memoize();
|
|
1732
|
+
init_fsOperations();
|
|
1733
|
+
init_log();
|
|
1734
|
+
SUPPORTED_PLATFORMS = ["macos", "wsl"];
|
|
1735
|
+
getPlatform = memoize_default(() => {
|
|
1736
|
+
try {
|
|
1737
|
+
if (process.platform === "darwin") {
|
|
1738
|
+
return "macos";
|
|
1739
|
+
}
|
|
1740
|
+
if (process.platform === "win32") {
|
|
1741
|
+
return "windows";
|
|
1742
|
+
}
|
|
1743
|
+
if (process.platform === "linux") {
|
|
1744
|
+
try {
|
|
1745
|
+
const procVersion = getFsImplementation().readFileSync("/proc/version", { encoding: "utf8" });
|
|
1746
|
+
if (procVersion.toLowerCase().includes("microsoft") || procVersion.toLowerCase().includes("wsl")) {
|
|
1747
|
+
return "wsl";
|
|
1748
|
+
}
|
|
1749
|
+
} catch (error) {
|
|
1750
|
+
logError(error);
|
|
1751
|
+
}
|
|
1752
|
+
return "linux";
|
|
1753
|
+
}
|
|
1754
|
+
return "unknown";
|
|
1755
|
+
} catch (error) {
|
|
1756
|
+
logError(error);
|
|
1757
|
+
return "unknown";
|
|
1758
|
+
}
|
|
1759
|
+
});
|
|
1760
|
+
getWslVersion = memoize_default(() => {
|
|
1761
|
+
if (process.platform !== "linux") {
|
|
1762
|
+
return;
|
|
1763
|
+
}
|
|
1764
|
+
try {
|
|
1765
|
+
const procVersion = getFsImplementation().readFileSync("/proc/version", {
|
|
1766
|
+
encoding: "utf8"
|
|
1767
|
+
});
|
|
1768
|
+
const wslVersionMatch = procVersion.match(/WSL(\d+)/i);
|
|
1769
|
+
if (wslVersionMatch && wslVersionMatch[1]) {
|
|
1770
|
+
return wslVersionMatch[1];
|
|
1771
|
+
}
|
|
1772
|
+
if (procVersion.toLowerCase().includes("microsoft")) {
|
|
1773
|
+
return "1";
|
|
1774
|
+
}
|
|
1775
|
+
return;
|
|
1776
|
+
} catch (error) {
|
|
1777
|
+
logError(error);
|
|
1778
|
+
return;
|
|
1779
|
+
}
|
|
1780
|
+
});
|
|
1781
|
+
getLinuxDistroInfo = memoize_default(async () => {
|
|
1782
|
+
if (process.platform !== "linux") {
|
|
1783
|
+
return;
|
|
1784
|
+
}
|
|
1785
|
+
const result = {
|
|
1786
|
+
linuxKernel: osRelease()
|
|
1787
|
+
};
|
|
1788
|
+
try {
|
|
1789
|
+
const content = await readFile("/etc/os-release", "utf8");
|
|
1790
|
+
for (const line of content.split(`
|
|
1791
|
+
`)) {
|
|
1792
|
+
const match = line.match(/^(ID|VERSION_ID)=(.*)$/);
|
|
1793
|
+
if (match && match[1] && match[2]) {
|
|
1794
|
+
const value = match[2].replace(/^"|"$/g, "");
|
|
1795
|
+
if (match[1] === "ID") {
|
|
1796
|
+
result.linuxDistroId = value;
|
|
1797
|
+
} else {
|
|
1798
|
+
result.linuxDistroVersion = value;
|
|
1799
|
+
}
|
|
1800
|
+
}
|
|
1801
|
+
}
|
|
1802
|
+
} catch {}
|
|
1803
|
+
return result;
|
|
1804
|
+
});
|
|
1805
|
+
VCS_MARKERS = [
|
|
1806
|
+
[".git", "git"],
|
|
1807
|
+
[".hg", "mercurial"],
|
|
1808
|
+
[".svn", "svn"],
|
|
1809
|
+
[".p4config", "perforce"],
|
|
1810
|
+
["$tf", "tfs"],
|
|
1811
|
+
[".tfvc", "tfs"],
|
|
1812
|
+
[".jj", "jujutsu"],
|
|
1813
|
+
[".sl", "sapling"]
|
|
1814
|
+
];
|
|
1815
|
+
});
|
|
1816
|
+
|
|
1817
|
+
// src/utils/settings/managedPath.ts
|
|
1818
|
+
import { join as join3 } from "path";
|
|
1819
|
+
var getManagedFilePath, getManagedSettingsDropInDir;
|
|
1820
|
+
var init_managedPath = __esm(() => {
|
|
1821
|
+
init_memoize();
|
|
1822
|
+
init_platform();
|
|
1823
|
+
getManagedFilePath = memoize_default(function() {
|
|
1824
|
+
if (process.env.USER_TYPE === "ant" && process.env.CLAUDE_CODE_MANAGED_SETTINGS_PATH) {
|
|
1825
|
+
return process.env.CLAUDE_CODE_MANAGED_SETTINGS_PATH;
|
|
1826
|
+
}
|
|
1827
|
+
switch (getPlatform()) {
|
|
1828
|
+
case "macos":
|
|
1829
|
+
return "/Library/Application Support/ClaudeCode";
|
|
1830
|
+
case "windows":
|
|
1831
|
+
return "C:\\Program Files\\ClaudeCode";
|
|
1832
|
+
default:
|
|
1833
|
+
return "/etc/claude-code";
|
|
1834
|
+
}
|
|
1835
|
+
});
|
|
1836
|
+
getManagedSettingsDropInDir = memoize_default(function() {
|
|
1837
|
+
return join3(getManagedFilePath(), "managed-settings.d");
|
|
1838
|
+
});
|
|
1839
|
+
});
|
|
1840
|
+
|
|
1841
|
+
// src/utils/redscopeCompat.ts
|
|
1842
|
+
import { existsSync as existsSync2 } from "fs";
|
|
1843
|
+
import { homedir as homedir3 } from "os";
|
|
1844
|
+
import { join as join4 } from "path";
|
|
1845
|
+
function uniquePaths(paths) {
|
|
1846
|
+
const seen = new Set;
|
|
1847
|
+
const result = [];
|
|
1848
|
+
for (const path2 of paths) {
|
|
1849
|
+
const normalized = path2.normalize("NFC");
|
|
1850
|
+
const key = process.platform === "win32" ? normalized.toLowerCase() : normalized;
|
|
1851
|
+
if (seen.has(key))
|
|
1852
|
+
continue;
|
|
1853
|
+
seen.add(key);
|
|
1854
|
+
result.push(normalized);
|
|
1855
|
+
}
|
|
1856
|
+
return result;
|
|
1857
|
+
}
|
|
1858
|
+
function getUserConfigHomeDirs() {
|
|
1859
|
+
if (process.env.REDSCOPE_CONFIG_DIR) {
|
|
1860
|
+
return uniquePaths([
|
|
1861
|
+
getRedScopeConfigHomeDir(),
|
|
1862
|
+
getLegacyClaudeConfigHomeDir()
|
|
1863
|
+
]);
|
|
1864
|
+
}
|
|
1865
|
+
if (process.env.CLAUDE_CONFIG_DIR) {
|
|
1866
|
+
return uniquePaths([getLegacyClaudeConfigHomeDir()]);
|
|
1867
|
+
}
|
|
1868
|
+
return uniquePaths([
|
|
1869
|
+
getRedScopeConfigHomeDir(),
|
|
1870
|
+
getLegacyClaudeConfigHomeDir()
|
|
1871
|
+
]);
|
|
1872
|
+
}
|
|
1873
|
+
function getPreferredUserConfigHomeDir() {
|
|
1874
|
+
if (process.env.REDSCOPE_CONFIG_DIR) {
|
|
1875
|
+
return getRedScopeConfigHomeDir();
|
|
1876
|
+
}
|
|
1877
|
+
if (process.env.CLAUDE_CONFIG_DIR) {
|
|
1878
|
+
return getLegacyClaudeConfigHomeDir();
|
|
1879
|
+
}
|
|
1880
|
+
return getRedScopeConfigHomeDir();
|
|
1881
|
+
}
|
|
1882
|
+
function getUserConfigSubdirs(subdir) {
|
|
1883
|
+
return uniquePaths(getUserConfigHomeDirs().map((dir) => join4(dir, subdir)));
|
|
1884
|
+
}
|
|
1885
|
+
function getPreferredUserConfigSubdir(subdir) {
|
|
1886
|
+
return join4(getPreferredUserConfigHomeDir(), subdir);
|
|
1887
|
+
}
|
|
1888
|
+
function getPreferredUserConfigChildPath(subdir, ...segments) {
|
|
1889
|
+
return join4(getPreferredUserConfigSubdir(subdir), ...segments);
|
|
1890
|
+
}
|
|
1891
|
+
function getUserConfigChildPaths(subdir, ...segments) {
|
|
1892
|
+
return uniquePaths(getUserConfigSubdirs(subdir).map((dir) => join4(dir, ...segments)));
|
|
1893
|
+
}
|
|
1894
|
+
function getCompatibleUserConfigSubdir(subdir) {
|
|
1895
|
+
for (const dir of getUserConfigSubdirs(subdir)) {
|
|
1896
|
+
if (existsSync2(dir))
|
|
1897
|
+
return dir;
|
|
1898
|
+
}
|
|
1899
|
+
return getPreferredUserConfigSubdir(subdir);
|
|
1900
|
+
}
|
|
1901
|
+
function getCompatibleUserConfigChildPath(subdir, ...segments) {
|
|
1902
|
+
for (const dir of getUserConfigSubdirs(subdir)) {
|
|
1903
|
+
const candidate = join4(dir, ...segments);
|
|
1904
|
+
if (existsSync2(candidate))
|
|
1905
|
+
return candidate;
|
|
1906
|
+
}
|
|
1907
|
+
return join4(getPreferredUserConfigSubdir(subdir), ...segments);
|
|
1908
|
+
}
|
|
1909
|
+
function getUserConfigFiles(filename) {
|
|
1910
|
+
return uniquePaths(getUserConfigHomeDirs().map((dir) => join4(dir, filename)));
|
|
1911
|
+
}
|
|
1912
|
+
function getPreferredUserConfigFile(filename) {
|
|
1913
|
+
return join4(getPreferredUserConfigHomeDir(), filename);
|
|
1914
|
+
}
|
|
1915
|
+
function getCompatibleUserConfigFile(filename) {
|
|
1916
|
+
for (const file of getUserConfigFiles(filename)) {
|
|
1917
|
+
if (existsSync2(file))
|
|
1918
|
+
return file;
|
|
1919
|
+
}
|
|
1920
|
+
return getPreferredUserConfigFile(filename);
|
|
1921
|
+
}
|
|
1922
|
+
function getManagedConfigSubdirs(subdir) {
|
|
1923
|
+
const root = getManagedFilePath();
|
|
1924
|
+
return uniquePaths([
|
|
1925
|
+
join4(root, REDSCOPE_CONFIG_DIR, subdir),
|
|
1926
|
+
join4(root, CLAUDE_CONFIG_DIR, subdir)
|
|
1927
|
+
]);
|
|
1928
|
+
}
|
|
1929
|
+
function getProjectConfigSubdirs(root, subdir) {
|
|
1930
|
+
return uniquePaths([
|
|
1931
|
+
join4(root, REDSCOPE_CONFIG_DIR, subdir),
|
|
1932
|
+
join4(root, CLAUDE_CONFIG_DIR, subdir)
|
|
1933
|
+
]);
|
|
1934
|
+
}
|
|
1935
|
+
function getProjectConfigFiles(root, filename) {
|
|
1936
|
+
return uniquePaths([
|
|
1937
|
+
join4(root, REDSCOPE_CONFIG_DIR, filename),
|
|
1938
|
+
join4(root, CLAUDE_CONFIG_DIR, filename)
|
|
1939
|
+
]);
|
|
1940
|
+
}
|
|
1941
|
+
function getPreferredProjectConfigDir(root) {
|
|
1942
|
+
return join4(root, REDSCOPE_CONFIG_DIR);
|
|
1943
|
+
}
|
|
1944
|
+
function getProjectConfigChildPaths(root, subdir, ...segments) {
|
|
1945
|
+
return uniquePaths(getProjectConfigSubdirs(root, subdir).map((dir) => join4(dir, ...segments)));
|
|
1946
|
+
}
|
|
1947
|
+
function getPreferredProjectConfigChildPath(root, subdir, ...segments) {
|
|
1948
|
+
return join4(getPreferredProjectConfigDir(root), subdir, ...segments);
|
|
1949
|
+
}
|
|
1950
|
+
function getCompatibleProjectConfigChildPath(root, subdir, ...segments) {
|
|
1951
|
+
for (const dir of getProjectConfigSubdirs(root, subdir)) {
|
|
1952
|
+
const candidate = join4(dir, ...segments);
|
|
1953
|
+
if (existsSync2(candidate))
|
|
1954
|
+
return candidate;
|
|
1955
|
+
}
|
|
1956
|
+
return join4(getPreferredProjectConfigDir(root), subdir, ...segments);
|
|
1957
|
+
}
|
|
1958
|
+
function getProjectMemoryFiles(root) {
|
|
1959
|
+
return [
|
|
1960
|
+
join4(root, CLAUDE_MEMORY_FILE),
|
|
1961
|
+
join4(root, CLAUDE_CONFIG_DIR, CLAUDE_MEMORY_FILE),
|
|
1962
|
+
join4(root, REDSCOPE_MEMORY_FILE),
|
|
1963
|
+
join4(root, REDSCOPE_CONFIG_DIR, REDSCOPE_MEMORY_FILE)
|
|
1964
|
+
];
|
|
1965
|
+
}
|
|
1966
|
+
function getLocalMemoryFiles(root) {
|
|
1967
|
+
return [
|
|
1968
|
+
join4(root, CLAUDE_LOCAL_MEMORY_FILE),
|
|
1969
|
+
join4(root, REDSCOPE_LOCAL_MEMORY_FILE)
|
|
1970
|
+
];
|
|
1971
|
+
}
|
|
1972
|
+
function getProjectRulesDirs(root) {
|
|
1973
|
+
return [
|
|
1974
|
+
join4(root, CLAUDE_CONFIG_DIR, "rules"),
|
|
1975
|
+
join4(root, REDSCOPE_CONFIG_DIR, "rules")
|
|
1976
|
+
];
|
|
1977
|
+
}
|
|
1978
|
+
function getUserMemoryFiles() {
|
|
1979
|
+
return uniquePaths([
|
|
1980
|
+
join4(getLegacyClaudeConfigHomeDir(), CLAUDE_MEMORY_FILE),
|
|
1981
|
+
join4(getRedScopeConfigHomeDir(), REDSCOPE_MEMORY_FILE)
|
|
1982
|
+
]);
|
|
1983
|
+
}
|
|
1984
|
+
function getUserRulesDirs() {
|
|
1985
|
+
return uniquePaths([
|
|
1986
|
+
join4(getLegacyClaudeConfigHomeDir(), "rules"),
|
|
1987
|
+
join4(getRedScopeConfigHomeDir(), "rules")
|
|
1988
|
+
]);
|
|
1989
|
+
}
|
|
1990
|
+
function getManagedMemoryFiles() {
|
|
1991
|
+
const root = getManagedFilePath();
|
|
1992
|
+
return [join4(root, CLAUDE_MEMORY_FILE), join4(root, REDSCOPE_MEMORY_FILE)];
|
|
1993
|
+
}
|
|
1994
|
+
function getManagedRulesDirs() {
|
|
1995
|
+
const root = getManagedFilePath();
|
|
1996
|
+
return [
|
|
1997
|
+
join4(root, CLAUDE_CONFIG_DIR, "rules"),
|
|
1998
|
+
join4(root, REDSCOPE_CONFIG_DIR, "rules")
|
|
1999
|
+
];
|
|
2000
|
+
}
|
|
2001
|
+
var REDSCOPE_CONFIG_DIR = ".redscope", CLAUDE_CONFIG_DIR = ".claude", REDSCOPE_MEMORY_FILE = "REDSCOPE.md", CLAUDE_MEMORY_FILE = "CLAUDE.md", REDSCOPE_LOCAL_MEMORY_FILE = "REDSCOPE.local.md", CLAUDE_LOCAL_MEMORY_FILE = "CLAUDE.local.md", getRedScopeConfigHomeDir, getLegacyClaudeConfigHomeDir;
|
|
2002
|
+
var init_redscopeCompat = __esm(() => {
|
|
2003
|
+
init_memoize();
|
|
2004
|
+
init_managedPath();
|
|
2005
|
+
getRedScopeConfigHomeDir = memoize_default(() => {
|
|
2006
|
+
return (process.env.REDSCOPE_CONFIG_DIR ?? join4(homedir3(), REDSCOPE_CONFIG_DIR)).normalize("NFC");
|
|
2007
|
+
}, () => process.env.REDSCOPE_CONFIG_DIR);
|
|
2008
|
+
getLegacyClaudeConfigHomeDir = memoize_default(() => {
|
|
2009
|
+
return (process.env.CLAUDE_CONFIG_DIR ?? join4(homedir3(), CLAUDE_CONFIG_DIR)).normalize("NFC");
|
|
2010
|
+
}, () => process.env.CLAUDE_CONFIG_DIR);
|
|
2011
|
+
});
|
|
2012
|
+
|
|
2013
|
+
// src/utils/protectedNamespace.ts
|
|
2014
|
+
var exports_protectedNamespace = {};
|
|
2015
|
+
__export(exports_protectedNamespace, {
|
|
2016
|
+
checkProtectedNamespace: () => checkProtectedNamespace
|
|
2017
|
+
});
|
|
2018
|
+
var checkProtectedNamespace = () => false;
|
|
2019
|
+
var init_protectedNamespace = () => {};
|
|
2020
|
+
|
|
2021
|
+
// src/utils/envUtils.ts
|
|
2022
|
+
import { homedir as homedir4 } from "os";
|
|
2023
|
+
import { join as join5 } from "path";
|
|
2024
|
+
function hasNodeOption(flag) {
|
|
2025
|
+
const nodeOptions = process.env.NODE_OPTIONS;
|
|
2026
|
+
if (!nodeOptions) {
|
|
2027
|
+
return false;
|
|
2028
|
+
}
|
|
2029
|
+
return nodeOptions.split(/\s+/).includes(flag);
|
|
2030
|
+
}
|
|
2031
|
+
function isEnvTruthy(envVar) {
|
|
2032
|
+
if (!envVar)
|
|
2033
|
+
return false;
|
|
2034
|
+
if (typeof envVar === "boolean")
|
|
2035
|
+
return envVar;
|
|
2036
|
+
const normalizedValue = envVar.toLowerCase().trim();
|
|
2037
|
+
return ["1", "true", "yes", "on"].includes(normalizedValue);
|
|
2038
|
+
}
|
|
2039
|
+
function isEnvTruthyWithAlias(primary, alias) {
|
|
2040
|
+
return isEnvTruthy(primary) || isEnvTruthy(alias);
|
|
2041
|
+
}
|
|
2042
|
+
function isEnvDefinedFalsy(envVar) {
|
|
2043
|
+
if (envVar === undefined)
|
|
2044
|
+
return false;
|
|
2045
|
+
if (typeof envVar === "boolean")
|
|
2046
|
+
return !envVar;
|
|
2047
|
+
if (!envVar)
|
|
2048
|
+
return false;
|
|
2049
|
+
const normalizedValue = envVar.toLowerCase().trim();
|
|
2050
|
+
return ["0", "false", "no", "off"].includes(normalizedValue);
|
|
2051
|
+
}
|
|
2052
|
+
function isBareMode() {
|
|
2053
|
+
return isEnvTruthy(process.env.CLAUDE_CODE_SIMPLE) || process.argv.includes("--bare");
|
|
2054
|
+
}
|
|
2055
|
+
function parseEnvVars(rawEnvArgs) {
|
|
2056
|
+
const parsedEnv = {};
|
|
2057
|
+
if (rawEnvArgs) {
|
|
2058
|
+
for (const envStr of rawEnvArgs) {
|
|
2059
|
+
const [key, ...valueParts] = envStr.split("=");
|
|
2060
|
+
if (!key || valueParts.length === 0) {
|
|
2061
|
+
throw new Error(`Invalid environment variable format: ${envStr}, environment variables should be added as: -e KEY1=value1 -e KEY2=value2`);
|
|
2062
|
+
}
|
|
2063
|
+
parsedEnv[key] = valueParts.join("=");
|
|
2064
|
+
}
|
|
2065
|
+
}
|
|
2066
|
+
return parsedEnv;
|
|
2067
|
+
}
|
|
2068
|
+
function getAWSRegion() {
|
|
2069
|
+
return process.env.AWS_REGION || process.env.AWS_DEFAULT_REGION || "us-east-1";
|
|
2070
|
+
}
|
|
2071
|
+
function getDefaultVertexRegion() {
|
|
2072
|
+
return process.env.CLOUD_ML_REGION || "us-east5";
|
|
2073
|
+
}
|
|
2074
|
+
function shouldMaintainProjectWorkingDir() {
|
|
2075
|
+
return isEnvTruthy(process.env.CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR);
|
|
2076
|
+
}
|
|
2077
|
+
function isRunningOnHomespace() {
|
|
2078
|
+
return process.env.USER_TYPE === "ant" && isEnvTruthy(process.env.COO_RUNNING_ON_HOMESPACE);
|
|
2079
|
+
}
|
|
2080
|
+
function isInProtectedNamespace() {
|
|
2081
|
+
if (process.env.USER_TYPE === "ant") {
|
|
2082
|
+
return (init_protectedNamespace(), __toCommonJS(exports_protectedNamespace)).checkProtectedNamespace();
|
|
2083
|
+
}
|
|
2084
|
+
return false;
|
|
2085
|
+
}
|
|
2086
|
+
function getVertexRegionForModel(model) {
|
|
2087
|
+
if (model) {
|
|
2088
|
+
const match = VERTEX_REGION_OVERRIDES.find(([prefix]) => model.startsWith(prefix));
|
|
2089
|
+
if (match) {
|
|
2090
|
+
return process.env[match[1]] || getDefaultVertexRegion();
|
|
2091
|
+
}
|
|
2092
|
+
}
|
|
2093
|
+
return getDefaultVertexRegion();
|
|
2094
|
+
}
|
|
2095
|
+
var getClaudeConfigHomeDir, VERTEX_REGION_OVERRIDES;
|
|
2096
|
+
var init_envUtils = __esm(() => {
|
|
2097
|
+
init_memoize();
|
|
2098
|
+
init_redscopeCompat();
|
|
2099
|
+
getClaudeConfigHomeDir = memoize_default(() => {
|
|
2100
|
+
return (process.env.CLAUDE_CONFIG_DIR ?? process.env.REDSCOPE_CONFIG_DIR ?? join5(homedir4(), ".claude")).normalize("NFC");
|
|
2101
|
+
}, () => `${process.env.CLAUDE_CONFIG_DIR ?? ""}\x00${process.env.REDSCOPE_CONFIG_DIR ?? ""}`);
|
|
2102
|
+
VERTEX_REGION_OVERRIDES = [
|
|
2103
|
+
["claude-haiku-4-5", "VERTEX_REGION_CLAUDE_HAIKU_4_5"],
|
|
2104
|
+
["claude-3-5-haiku", "VERTEX_REGION_CLAUDE_3_5_HAIKU"],
|
|
2105
|
+
["claude-3-5-sonnet", "VERTEX_REGION_CLAUDE_3_5_SONNET"],
|
|
2106
|
+
["claude-3-7-sonnet", "VERTEX_REGION_CLAUDE_3_7_SONNET"],
|
|
2107
|
+
["claude-opus-4-1", "VERTEX_REGION_CLAUDE_4_1_OPUS"],
|
|
2108
|
+
["claude-opus-4", "VERTEX_REGION_CLAUDE_4_0_OPUS"],
|
|
2109
|
+
["claude-sonnet-4-6", "VERTEX_REGION_CLAUDE_4_6_SONNET"],
|
|
2110
|
+
["claude-sonnet-4-5", "VERTEX_REGION_CLAUDE_4_5_SONNET"],
|
|
2111
|
+
["claude-sonnet-4", "VERTEX_REGION_CLAUDE_4_0_SONNET"]
|
|
2112
|
+
];
|
|
2113
|
+
});
|
|
2114
|
+
|
|
2115
|
+
// src/utils/debug.ts
|
|
2116
|
+
import { appendFile, mkdir, symlink, unlink } from "fs/promises";
|
|
2117
|
+
import { dirname as dirname2, join as join6 } from "path";
|
|
2118
|
+
function enableDebugLogging() {
|
|
2119
|
+
const wasActive = isDebugMode() || process.env.USER_TYPE === "ant";
|
|
2120
|
+
runtimeDebugEnabled = true;
|
|
2121
|
+
isDebugMode.cache.clear?.();
|
|
2122
|
+
return wasActive;
|
|
2123
|
+
}
|
|
2124
|
+
function shouldLogDebugMessage(message) {
|
|
2125
|
+
if (false) {}
|
|
2126
|
+
if (process.env.USER_TYPE !== "ant" && !isDebugMode()) {
|
|
2127
|
+
return false;
|
|
2128
|
+
}
|
|
2129
|
+
if (typeof process === "undefined" || typeof process.versions === "undefined" || typeof process.versions.node === "undefined") {
|
|
2130
|
+
return false;
|
|
2131
|
+
}
|
|
2132
|
+
const filter = getDebugFilter();
|
|
2133
|
+
return shouldShowDebugMessage(message, filter);
|
|
2134
|
+
}
|
|
2135
|
+
function setHasFormattedOutput(value) {
|
|
2136
|
+
hasFormattedOutput = value;
|
|
2137
|
+
}
|
|
2138
|
+
function getHasFormattedOutput() {
|
|
2139
|
+
return hasFormattedOutput;
|
|
2140
|
+
}
|
|
2141
|
+
async function appendAsync(needMkdir, dir, path2, content) {
|
|
2142
|
+
if (needMkdir) {
|
|
2143
|
+
await mkdir(dir, { recursive: true }).catch(() => {});
|
|
2144
|
+
}
|
|
2145
|
+
await appendFile(path2, content);
|
|
2146
|
+
updateLatestDebugLogSymlink();
|
|
2147
|
+
}
|
|
2148
|
+
function noop() {}
|
|
2149
|
+
function getDebugWriter() {
|
|
2150
|
+
if (!debugWriter) {
|
|
2151
|
+
let ensuredDir = null;
|
|
2152
|
+
debugWriter = createBufferedWriter({
|
|
2153
|
+
writeFn: (content) => {
|
|
2154
|
+
const path2 = getDebugLogPath();
|
|
2155
|
+
const dir = dirname2(path2);
|
|
2156
|
+
const needMkdir = ensuredDir !== dir;
|
|
2157
|
+
ensuredDir = dir;
|
|
2158
|
+
if (isDebugMode()) {
|
|
2159
|
+
if (needMkdir) {
|
|
2160
|
+
try {
|
|
2161
|
+
getFsImplementation().mkdirSync(dir);
|
|
2162
|
+
} catch {}
|
|
2163
|
+
}
|
|
2164
|
+
getFsImplementation().appendFileSync(path2, content);
|
|
2165
|
+
updateLatestDebugLogSymlink();
|
|
2166
|
+
return;
|
|
2167
|
+
}
|
|
2168
|
+
pendingWrite = pendingWrite.then(appendAsync.bind(null, needMkdir, dir, path2, content)).catch(noop);
|
|
2169
|
+
},
|
|
2170
|
+
flushIntervalMs: 1000,
|
|
2171
|
+
maxBufferSize: 100,
|
|
2172
|
+
immediateMode: isDebugMode()
|
|
2173
|
+
});
|
|
2174
|
+
registerCleanup(async () => {
|
|
2175
|
+
debugWriter?.dispose();
|
|
2176
|
+
await pendingWrite;
|
|
2177
|
+
});
|
|
2178
|
+
}
|
|
2179
|
+
return debugWriter;
|
|
2180
|
+
}
|
|
2181
|
+
async function flushDebugLogs() {
|
|
2182
|
+
debugWriter?.flush();
|
|
2183
|
+
await pendingWrite;
|
|
2184
|
+
}
|
|
2185
|
+
function logForDebugging(message, { level } = {
|
|
2186
|
+
level: "debug"
|
|
2187
|
+
}) {
|
|
2188
|
+
if (LEVEL_ORDER[level] < LEVEL_ORDER[getMinDebugLogLevel()]) {
|
|
2189
|
+
return;
|
|
2190
|
+
}
|
|
2191
|
+
if (!shouldLogDebugMessage(message)) {
|
|
2192
|
+
return;
|
|
2193
|
+
}
|
|
2194
|
+
if (hasFormattedOutput && message.includes(`
|
|
2195
|
+
`)) {
|
|
2196
|
+
message = jsonStringify(message);
|
|
2197
|
+
}
|
|
2198
|
+
const timestamp = new Date().toISOString();
|
|
2199
|
+
const output = `${timestamp} [${level.toUpperCase()}] ${message.trim()}
|
|
2200
|
+
`;
|
|
2201
|
+
if (isDebugToStdErr()) {
|
|
2202
|
+
writeToStderr(output);
|
|
2203
|
+
return;
|
|
2204
|
+
}
|
|
2205
|
+
getDebugWriter().write(output);
|
|
2206
|
+
}
|
|
2207
|
+
function getDebugLogPath() {
|
|
2208
|
+
return getDebugFilePath() ?? process.env.REDSCOPE_DEBUG_LOGS_DIR ?? process.env.CLAUDE_CODE_DEBUG_LOGS_DIR ?? getPreferredUserConfigChildPath("debug", `${getSessionId()}.txt`);
|
|
2209
|
+
}
|
|
2210
|
+
function logAntError(context, error) {
|
|
2211
|
+
if (process.env.USER_TYPE !== "ant") {
|
|
2212
|
+
return;
|
|
2213
|
+
}
|
|
2214
|
+
if (error instanceof Error && error.stack) {
|
|
2215
|
+
logForDebugging(`[ANT-ONLY] ${context} stack trace:
|
|
2216
|
+
${error.stack}`, {
|
|
2217
|
+
level: "error"
|
|
2218
|
+
});
|
|
2219
|
+
}
|
|
2220
|
+
}
|
|
2221
|
+
var LEVEL_ORDER, getMinDebugLogLevel, runtimeDebugEnabled = false, isDebugMode, getDebugFilter, isDebugToStdErr, getDebugFilePath, hasFormattedOutput = false, debugWriter = null, pendingWrite, updateLatestDebugLogSymlink;
|
|
2222
|
+
var init_debug = __esm(() => {
|
|
2223
|
+
init_memoize();
|
|
2224
|
+
init_state();
|
|
2225
|
+
init_bufferedWriter();
|
|
2226
|
+
init_cleanupRegistry();
|
|
2227
|
+
init_debugFilter();
|
|
2228
|
+
init_envUtils();
|
|
2229
|
+
init_fsOperations();
|
|
2230
|
+
init_process();
|
|
2231
|
+
init_redscopeCompat();
|
|
2232
|
+
init_slowOperations();
|
|
2233
|
+
LEVEL_ORDER = {
|
|
2234
|
+
verbose: 0,
|
|
2235
|
+
debug: 1,
|
|
2236
|
+
info: 2,
|
|
2237
|
+
warn: 3,
|
|
2238
|
+
error: 4
|
|
2239
|
+
};
|
|
2240
|
+
getMinDebugLogLevel = memoize_default(() => {
|
|
2241
|
+
const raw = process.env.CLAUDE_CODE_DEBUG_LOG_LEVEL?.toLowerCase().trim();
|
|
2242
|
+
if (raw && Object.hasOwn(LEVEL_ORDER, raw)) {
|
|
2243
|
+
return raw;
|
|
2244
|
+
}
|
|
2245
|
+
return "debug";
|
|
2246
|
+
});
|
|
2247
|
+
isDebugMode = memoize_default(() => {
|
|
2248
|
+
return runtimeDebugEnabled || isEnvTruthy(process.env.DEBUG) || isEnvTruthy(process.env.DEBUG_SDK) || process.argv.includes("--debug") || process.argv.includes("-d") || isDebugToStdErr() || process.argv.some((arg) => arg.startsWith("--debug=")) || getDebugFilePath() !== null;
|
|
2249
|
+
});
|
|
2250
|
+
getDebugFilter = memoize_default(() => {
|
|
2251
|
+
const debugArg = process.argv.find((arg) => arg.startsWith("--debug="));
|
|
2252
|
+
if (!debugArg) {
|
|
2253
|
+
return null;
|
|
2254
|
+
}
|
|
2255
|
+
const filterPattern = debugArg.substring("--debug=".length);
|
|
2256
|
+
return parseDebugFilter(filterPattern);
|
|
2257
|
+
});
|
|
2258
|
+
isDebugToStdErr = memoize_default(() => {
|
|
2259
|
+
return process.argv.includes("--debug-to-stderr");
|
|
2260
|
+
});
|
|
2261
|
+
getDebugFilePath = memoize_default(() => {
|
|
2262
|
+
for (let i = 0;i < process.argv.length; i++) {
|
|
2263
|
+
const arg = process.argv[i];
|
|
2264
|
+
if (arg.startsWith("--debug-file=")) {
|
|
2265
|
+
return arg.substring("--debug-file=".length);
|
|
2266
|
+
}
|
|
2267
|
+
if (arg === "--debug-file" && i + 1 < process.argv.length) {
|
|
2268
|
+
return process.argv[i + 1];
|
|
2269
|
+
}
|
|
2270
|
+
}
|
|
2271
|
+
return null;
|
|
2272
|
+
});
|
|
2273
|
+
pendingWrite = Promise.resolve();
|
|
2274
|
+
updateLatestDebugLogSymlink = memoize_default(async () => {
|
|
2275
|
+
try {
|
|
2276
|
+
const debugLogPath = getDebugLogPath();
|
|
2277
|
+
const debugLogsDir = dirname2(debugLogPath);
|
|
2278
|
+
const latestSymlinkPath = join6(debugLogsDir, "latest");
|
|
2279
|
+
await unlink(latestSymlinkPath).catch(() => {});
|
|
2280
|
+
await symlink(debugLogPath, latestSymlinkPath);
|
|
2281
|
+
} catch {}
|
|
2282
|
+
});
|
|
2283
|
+
});
|
|
2284
|
+
|
|
2285
|
+
export { ClaudeError, MalformedCommandError, AbortError, isAbortError, ConfigParseError, ShellError, TeleportOperationError, TelemetrySafeError_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS, hasExactErrorMessage, toError, errorMessage, getErrnoCode, isENOENT, getErrnoPath, isFsInaccessible, classifyAxiosError, init_errors, _defineProperty_default, init__defineProperty, _baseAssignValue_default, init__baseAssignValue, _assignValue_default, init__assignValue, _copyObject_default, init__copyObject, keysIn_default, init_keysIn, _cloneBuffer_default, init__cloneBuffer, _copyArray_default, init__copyArray, _getPrototype_default, init__getPrototype, _getAllKeysIn_default, init__getAllKeysIn, _cloneTypedArray_default, init__cloneTypedArray, _initCloneObject_default, init__initCloneObject, _baseClone_default, init__baseClone, cloneDeep_default, init_cloneDeep, createBufferedWriter, init_bufferedWriter, registerCleanup, runCleanupFunctions, init_cleanupRegistry, getMinDebugLogLevel, isDebugMode, enableDebugLogging, getDebugFilter, isDebugToStdErr, getDebugFilePath, setHasFormattedOutput, getHasFormattedOutput, flushDebugLogs, logForDebugging, getDebugLogPath, logAntError, init_debug, slowLogging, jsonStringify, jsonParse, clone, writeFileSync_DEPRECATED, init_slowOperations, safeResolvePath, isDuplicatePath, getPathsForPermissionCheck, getFsImplementation, readFileRange, tailFile, readLinesReverse, init_fsOperations, COMMAND_NAME_TAG, COMMAND_MESSAGE_TAG, COMMAND_ARGS_TAG, BASH_INPUT_TAG, BASH_STDOUT_TAG, BASH_STDERR_TAG, LOCAL_COMMAND_STDOUT_TAG, LOCAL_COMMAND_STDERR_TAG, LOCAL_COMMAND_CAVEAT_TAG, TERMINAL_OUTPUT_TAGS, TICK_TAG, TASK_NOTIFICATION_TAG, TASK_ID_TAG, TOOL_USE_ID_TAG, TASK_TYPE_TAG, OUTPUT_FILE_TAG, STATUS_TAG, SUMMARY_TAG, WORKTREE_TAG, WORKTREE_PATH_TAG, WORKTREE_BRANCH_TAG, ULTRAPLAN_TAG, REMOTE_REVIEW_TAG, REMOTE_REVIEW_PROGRESS_TAG, TEAMMATE_MESSAGE_TAG, CHANNEL_MESSAGE_TAG, CHANNEL_TAG, CROSS_SESSION_MESSAGE_TAG, FORK_BOILERPLATE_TAG, FORK_DIRECTIVE_PREFIX, COMMON_HELP_ARGS, COMMON_INFO_ARGS, init_xml, sortLogs, init_logs, djb2Hash, hashContent, hashPair, init_hash, CACHE_PATHS, init_cachePaths, stripDisplayTags, stripDisplayTagsAllowEmpty, stripIdeContextTags, init_displayTags, isEssentialTrafficOnly, isTelemetryDisabled, getEssentialTrafficOnlyReason, init_privacyLevel, getLogDisplayTitle, dateToFilename, attachErrorLogSink, logError, getInMemoryErrors, logMCPError, logMCPDebug, captureAPIRequest, init_log, SUPPORTED_PLATFORMS, getPlatform, getWslVersion, getLinuxDistroInfo, detectVcs, init_platform, getManagedFilePath, getManagedSettingsDropInDir, init_managedPath, REDSCOPE_CONFIG_DIR, CLAUDE_CONFIG_DIR, REDSCOPE_MEMORY_FILE, CLAUDE_MEMORY_FILE, getRedScopeConfigHomeDir, getLegacyClaudeConfigHomeDir, uniquePaths, getUserConfigHomeDirs, getUserConfigSubdirs, getPreferredUserConfigSubdir, getPreferredUserConfigChildPath, getUserConfigChildPaths, getCompatibleUserConfigSubdir, getCompatibleUserConfigChildPath, getUserConfigFiles, getPreferredUserConfigFile, getCompatibleUserConfigFile, getManagedConfigSubdirs, getProjectConfigSubdirs, getProjectConfigFiles, getPreferredProjectConfigDir, getProjectConfigChildPaths, getPreferredProjectConfigChildPath, getCompatibleProjectConfigChildPath, getProjectMemoryFiles, getLocalMemoryFiles, getProjectRulesDirs, getUserMemoryFiles, getUserRulesDirs, getManagedMemoryFiles, getManagedRulesDirs, init_redscopeCompat, getClaudeConfigHomeDir, hasNodeOption, isEnvTruthy, isEnvTruthyWithAlias, isEnvDefinedFalsy, isBareMode, parseEnvVars, getAWSRegion, getDefaultVertexRegion, shouldMaintainProjectWorkingDir, isRunningOnHomespace, isInProtectedNamespace, getVertexRegionForModel, init_envUtils };
|