@zyycn/claudex 1.0.3-fork.2a74621
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/LICENSE.md +5 -0
- package/README.md +489 -0
- package/bin/claudex.js +40 -0
- package/dist/chunk-00xcm9ma.js +21933 -0
- package/dist/chunk-0503mmvy.js +153 -0
- package/dist/chunk-06saje2v.js +39 -0
- package/dist/chunk-0731m51q.js +8 -0
- package/dist/chunk-0htr6ryz.js +208 -0
- package/dist/chunk-0hw5q246.js +59 -0
- package/dist/chunk-0na45fm9.js +93 -0
- package/dist/chunk-0paqc2yw.js +15 -0
- package/dist/chunk-0q2xkmse.js +58 -0
- package/dist/chunk-0rvxx6st.js +195 -0
- package/dist/chunk-0vkfrmqm.js +690 -0
- package/dist/chunk-0xjaqda8.js +1124 -0
- package/dist/chunk-0xpb84zw.js +105 -0
- package/dist/chunk-1141xmr4.js +8 -0
- package/dist/chunk-14jv3jm7.js +17 -0
- package/dist/chunk-19vtvtzg.js +496 -0
- package/dist/chunk-1cbn5kxf.js +7 -0
- package/dist/chunk-1gj0rhkf.js +92 -0
- package/dist/chunk-1h2famwb.js +49 -0
- package/dist/chunk-1m68rrvt.js +173649 -0
- package/dist/chunk-1ss7dnmq.js +104 -0
- package/dist/chunk-1v6e40p8.js +160 -0
- package/dist/chunk-1vh98qr0.js +4521 -0
- package/dist/chunk-1xkekb9y.js +19 -0
- package/dist/chunk-1ydzf04y.js +713 -0
- package/dist/chunk-238g70xa.js +36 -0
- package/dist/chunk-27xc1csx.js +104 -0
- package/dist/chunk-297y1tw3.js +789 -0
- package/dist/chunk-2a42s11t.js +412 -0
- package/dist/chunk-2bpfbf16.js +998 -0
- package/dist/chunk-2eykm0j0.js +20 -0
- package/dist/chunk-2fwze72g.js +24 -0
- package/dist/chunk-2ge9kmgv.js +28 -0
- package/dist/chunk-2gzv8nrw.js +205 -0
- package/dist/chunk-2k995y2x.js +880 -0
- package/dist/chunk-2nayx6q1.js +63 -0
- package/dist/chunk-2qk1898r.js +74 -0
- package/dist/chunk-2qp0vrvd.js +83 -0
- package/dist/chunk-2sndq2nq.js +644 -0
- package/dist/chunk-2t1frg13.js +716 -0
- package/dist/chunk-2t3vw4tx.js +22820 -0
- package/dist/chunk-2ybjg7pc.js +432 -0
- package/dist/chunk-302gxdf9.js +161 -0
- package/dist/chunk-30rst83v.js +168 -0
- package/dist/chunk-33mdt86j.js +42 -0
- package/dist/chunk-33pgf56v.js +32 -0
- package/dist/chunk-36k7h1v1.js +372 -0
- package/dist/chunk-36zyyac9.js +41654 -0
- package/dist/chunk-37dbhqqr.js +1920 -0
- package/dist/chunk-37dydh7h.js +642 -0
- package/dist/chunk-38700exh.js +42 -0
- package/dist/chunk-3c25bcsw.js +17 -0
- package/dist/chunk-3h8a89gy.js +46 -0
- package/dist/chunk-3nk79af8.js +8 -0
- package/dist/chunk-3peatsdv.js +41 -0
- package/dist/chunk-3rd46sc5.js +221 -0
- package/dist/chunk-3s498jy8.js +1014 -0
- package/dist/chunk-3vs3nm7w.js +31 -0
- package/dist/chunk-3w6s9m5w.js +16 -0
- package/dist/chunk-3yccyqwm.js +692 -0
- package/dist/chunk-3zjjk0am.js +56 -0
- package/dist/chunk-3zzszjst.js +16415 -0
- package/dist/chunk-41m5za5y.js +154 -0
- package/dist/chunk-44fpr6jq.js +434 -0
- package/dist/chunk-48gwzq50.js +154 -0
- package/dist/chunk-495d85x1.js +8066 -0
- package/dist/chunk-4cse1nz6.js +98 -0
- package/dist/chunk-4f1wn74p.js +106 -0
- package/dist/chunk-4f9taz3j.js +86 -0
- package/dist/chunk-4g3v8y12.js +23 -0
- package/dist/chunk-4hh97qpv.js +765 -0
- package/dist/chunk-4jm600zv.js +13 -0
- package/dist/chunk-4jzv26gg.js +62 -0
- package/dist/chunk-4qgbmcm7.js +9193 -0
- package/dist/chunk-4qz9vbs1.js +349 -0
- package/dist/chunk-4tyttyn2.js +373 -0
- package/dist/chunk-4v0qvahs.js +89 -0
- package/dist/chunk-4zfkzkt6.js +37 -0
- package/dist/chunk-51xw8dbm.js +339 -0
- package/dist/chunk-525vnqc3.js +247 -0
- package/dist/chunk-557wwsxe.js +533 -0
- package/dist/chunk-55hj5hhv.js +84 -0
- package/dist/chunk-55wgxwa9.js +13877 -0
- package/dist/chunk-56jgazae.js +28 -0
- package/dist/chunk-58xxf3tz.js +521 -0
- package/dist/chunk-5c2m9q8v.js +109 -0
- package/dist/chunk-5fpcmgh8.js +348 -0
- package/dist/chunk-5gmd05y0.js +1153 -0
- package/dist/chunk-5gvng4zv.js +122 -0
- package/dist/chunk-5k5a32tj.js +537 -0
- package/dist/chunk-5md3w36r.js +275 -0
- package/dist/chunk-5z1vph5s.js +127 -0
- package/dist/chunk-5z78246t.js +54 -0
- package/dist/chunk-65s8h28p.js +123 -0
- package/dist/chunk-66qbb491.js +90 -0
- package/dist/chunk-693w4qr8.js +300 -0
- package/dist/chunk-6azerawy.js +2335 -0
- package/dist/chunk-6bd8brc4.js +48 -0
- package/dist/chunk-6d8k2crm.js +101 -0
- package/dist/chunk-6dj5t602.js +341 -0
- package/dist/chunk-6em0h8b4.js +88 -0
- package/dist/chunk-6gr3c3w9.js +378 -0
- package/dist/chunk-6gzakvec.js +87 -0
- package/dist/chunk-6hy71770.js +96 -0
- package/dist/chunk-6mtk8975.js +117 -0
- package/dist/chunk-6n2qgm9v.js +8 -0
- package/dist/chunk-6n7gewz2.js +253 -0
- package/dist/chunk-6r1112vx.js +469 -0
- package/dist/chunk-6r9v2rce.js +229 -0
- package/dist/chunk-6tq2v3rk.js +186 -0
- package/dist/chunk-70spdapk.js +79 -0
- package/dist/chunk-73rpbt04.js +1947 -0
- package/dist/chunk-760252na.js +101 -0
- package/dist/chunk-761tmgwx.js +6108 -0
- package/dist/chunk-76dy674m.js +648 -0
- package/dist/chunk-7739pg2c.js +4261 -0
- package/dist/chunk-78cznbzh.js +756 -0
- package/dist/chunk-78vqjj7t.js +1317 -0
- package/dist/chunk-79tame2q.js +280 -0
- package/dist/chunk-7aw745vx.js +40175 -0
- package/dist/chunk-7e6ahfxz.js +61 -0
- package/dist/chunk-7gd593wb.js +438 -0
- package/dist/chunk-7m2nd8da.js +110 -0
- package/dist/chunk-7pqesh1s.js +184 -0
- package/dist/chunk-7q237ftq.js +1585 -0
- package/dist/chunk-7vbxp63m.js +100 -0
- package/dist/chunk-7wm5s02e.js +216 -0
- package/dist/chunk-7xyswgjh.js +8 -0
- package/dist/chunk-7zaxrfnt.js +42 -0
- package/dist/chunk-83hfzbx3.js +10 -0
- package/dist/chunk-8bedvdm1.js +32 -0
- package/dist/chunk-8hq5kk3y.js +44 -0
- package/dist/chunk-8k0y8sk2.js +165 -0
- package/dist/chunk-8pb038eb.js +44 -0
- package/dist/chunk-8smr33wf.js +287 -0
- package/dist/chunk-8tnsngw2.js +31 -0
- package/dist/chunk-8vcz9eks.js +443 -0
- package/dist/chunk-8y12jxg8.js +10 -0
- package/dist/chunk-8ymf4e6z.js +48 -0
- package/dist/chunk-90wp6wez.js +10510 -0
- package/dist/chunk-9f9p2b84.js +848 -0
- package/dist/chunk-9gbamk79.js +93 -0
- package/dist/chunk-9k27xdmg.js +542 -0
- package/dist/chunk-9k2drwej.js +106 -0
- package/dist/chunk-9x5zgy22.js +12 -0
- package/dist/chunk-a5wwqn08.js +725 -0
- package/dist/chunk-a8ejc632.js +3094 -0
- package/dist/chunk-a9nr12c7.js +272 -0
- package/dist/chunk-a9vdeb6y.js +258 -0
- package/dist/chunk-a9zh40sj.js +48 -0
- package/dist/chunk-aberf6bd.js +282 -0
- package/dist/chunk-ada32h8c.js +40 -0
- package/dist/chunk-adg4351g.js +26840 -0
- package/dist/chunk-ae7s1rks.js +93 -0
- package/dist/chunk-agnasrp3.js +128 -0
- package/dist/chunk-akp4x1ve.js +93 -0
- package/dist/chunk-akyzxxs1.js +109 -0
- package/dist/chunk-ar08wx1s.js +468 -0
- package/dist/chunk-ar1vk71q.js +220 -0
- package/dist/chunk-arnhbg3z.js +87 -0
- package/dist/chunk-azk47w50.js +306 -0
- package/dist/chunk-b11e166f.js +173 -0
- package/dist/chunk-b292a9es.js +91 -0
- package/dist/chunk-b4v0varz.js +89 -0
- package/dist/chunk-b4wg70y1.js +54 -0
- package/dist/chunk-b75fzr8e.js +969 -0
- package/dist/chunk-b7cywkg9.js +908 -0
- package/dist/chunk-b80rg7hy.js +565 -0
- package/dist/chunk-b8x1gk3y.js +1299 -0
- package/dist/chunk-b9kme9pv.js +38 -0
- package/dist/chunk-bah68pmm.js +47 -0
- package/dist/chunk-bbxjktbd.js +69 -0
- package/dist/chunk-bc035ncb.js +153 -0
- package/dist/chunk-bedw0ft1.js +198 -0
- package/dist/chunk-bjqw6798.js +328 -0
- package/dist/chunk-bm1qb16p.js +17 -0
- package/dist/chunk-bqfnp99q.js +477 -0
- package/dist/chunk-bvp4dgm4.js +182 -0
- package/dist/chunk-c1k5g6t4.js +115 -0
- package/dist/chunk-c3r27fmp.js +73 -0
- package/dist/chunk-c9xk7hme.js +106 -0
- package/dist/chunk-cd155fv3.js +87 -0
- package/dist/chunk-cdz5yb0r.js +57 -0
- package/dist/chunk-cfv996bs.js +22 -0
- package/dist/chunk-cg606wr4.js +110 -0
- package/dist/chunk-cgfdkzhb.js +12 -0
- package/dist/chunk-chy5zbax.js +701 -0
- package/dist/chunk-ctkn4y2r.js +317 -0
- package/dist/chunk-czensfac.js +476 -0
- package/dist/chunk-d28x64s9.js +38 -0
- package/dist/chunk-d9kz373t.js +122 -0
- package/dist/chunk-dgqrcy74.js +48 -0
- package/dist/chunk-dnh7jtpb.js +37 -0
- package/dist/chunk-dnqqes3z.js +216 -0
- package/dist/chunk-dphmfzrv.js +250 -0
- package/dist/chunk-drzegvt5.js +86 -0
- package/dist/chunk-ds5nkfg0.js +1095 -0
- package/dist/chunk-dsf70j2y.js +1550 -0
- package/dist/chunk-dstxhxsx.js +121 -0
- package/dist/chunk-dv1wfr85.js +6373 -0
- package/dist/chunk-dxfhv5da.js +500 -0
- package/dist/chunk-e5pntxye.js +37 -0
- package/dist/chunk-e6q1y5gb.js +419 -0
- package/dist/chunk-e8bd8nfv.js +697 -0
- package/dist/chunk-e8d2zjs1.js +338 -0
- package/dist/chunk-e9aevcts.js +87 -0
- package/dist/chunk-eebcvtbb.js +1646 -0
- package/dist/chunk-egmp9ajp.js +144 -0
- package/dist/chunk-ehtwnxpg.js +1591 -0
- package/dist/chunk-eqp1rfft.js +17 -0
- package/dist/chunk-ewadzrm8.js +103 -0
- package/dist/chunk-eynjr6k5.js +169 -0
- package/dist/chunk-ezf1ppbj.js +208 -0
- package/dist/chunk-f4407gzr.js +129 -0
- package/dist/chunk-f5ma3nh5.js +3436 -0
- package/dist/chunk-fbpftpf0.js +69 -0
- package/dist/chunk-fbv4apne.js +51 -0
- package/dist/chunk-ffk6brrm.js +386 -0
- package/dist/chunk-fgebtwax.js +1872 -0
- package/dist/chunk-fkcn5zhs.js +40 -0
- package/dist/chunk-fm8gm3cm.js +120 -0
- package/dist/chunk-fw5ev6dp.js +458 -0
- package/dist/chunk-fyc5fepv.js +10 -0
- package/dist/chunk-fzj4am93.js +1493 -0
- package/dist/chunk-g0j0t6qk.js +26 -0
- package/dist/chunk-g338npwr.js +1061 -0
- package/dist/chunk-g3t0act8.js +8 -0
- package/dist/chunk-geyx5ybh.js +375 -0
- package/dist/chunk-gg3j3nv0.js +212 -0
- package/dist/chunk-gmaybtrd.js +726 -0
- package/dist/chunk-gqmkgbfr.js +256 -0
- package/dist/chunk-gv0tqhg0.js +118 -0
- package/dist/chunk-gyj242zr.js +20 -0
- package/dist/chunk-gz457zg6.js +463 -0
- package/dist/chunk-gzaaa3ex.js +166 -0
- package/dist/chunk-gzct9dkr.js +2057 -0
- package/dist/chunk-gzzfhtdv.js +7189 -0
- package/dist/chunk-h0qngp9w.js +157 -0
- package/dist/chunk-h0rbjg6x.js +55 -0
- package/dist/chunk-h4qh9a0e.js +3444 -0
- package/dist/chunk-hakdhagh.js +16606 -0
- package/dist/chunk-hazazgk5.js +3205 -0
- package/dist/chunk-hb7k1x8f.js +745 -0
- package/dist/chunk-hh7cmy4k.js +20 -0
- package/dist/chunk-hj4vr9dm.js +102 -0
- package/dist/chunk-hk90mbpv.js +3418 -0
- package/dist/chunk-hk9xz7gk.js +118 -0
- package/dist/chunk-hmtttwpt.js +132 -0
- package/dist/chunk-hqmz36b3.js +552 -0
- package/dist/chunk-hvm6gcy9.js +584 -0
- package/dist/chunk-hzhe8ygc.js +547 -0
- package/dist/chunk-j2k4p94p.js +55 -0
- package/dist/chunk-j2rbx1ej.js +96 -0
- package/dist/chunk-j3a4p81y.js +184 -0
- package/dist/chunk-j5hc27hv.js +444 -0
- package/dist/chunk-j64ga6ta.js +8035 -0
- package/dist/chunk-j84fcssx.js +54 -0
- package/dist/chunk-jce5r25x.js +18 -0
- package/dist/chunk-jd32zbps.js +15 -0
- package/dist/chunk-jdgeec04.js +4249 -0
- package/dist/chunk-jj0m6fr0.js +247 -0
- package/dist/chunk-jnhkref0.js +30 -0
- package/dist/chunk-jpp9dqv4.js +6956 -0
- package/dist/chunk-jr58a333.js +113 -0
- package/dist/chunk-jx817w05.js +11 -0
- package/dist/chunk-jxnvvps7.js +328 -0
- package/dist/chunk-jzmz18nn.js +65 -0
- package/dist/chunk-k0p9w03v.js +4957 -0
- package/dist/chunk-k2aj61ee.js +27 -0
- package/dist/chunk-kcv00nmk.js +849 -0
- package/dist/chunk-kecf7c6t.js +10476 -0
- package/dist/chunk-kffz0vxg.js +92 -0
- package/dist/chunk-kge53wbt.js +674 -0
- package/dist/chunk-khscb4ge.js +99 -0
- package/dist/chunk-kk4h10r3.js +3058 -0
- package/dist/chunk-kq0n3myz.js +71 -0
- package/dist/chunk-kwekc97v.js +18 -0
- package/dist/chunk-m44gmqd1.js +258 -0
- package/dist/chunk-m4kphr9e.js +71 -0
- package/dist/chunk-mbrkqdrq.js +155 -0
- package/dist/chunk-mt25echc.js +6157 -0
- package/dist/chunk-mvrpg273.js +89 -0
- package/dist/chunk-mzfgg9ne.js +275 -0
- package/dist/chunk-n0qaeaa5.js +256 -0
- package/dist/chunk-n0x2db3y.js +84 -0
- package/dist/chunk-n18sq04t.js +603 -0
- package/dist/chunk-n6qhan3n.js +243 -0
- package/dist/chunk-n7ttdtk0.js +641 -0
- package/dist/chunk-ncxetb9w.js +130 -0
- package/dist/chunk-ne67h2hc.js +277 -0
- package/dist/chunk-nfv508k1.js +306 -0
- package/dist/chunk-nj17bhkh.js +125 -0
- package/dist/chunk-nka1g8f4.js +773 -0
- package/dist/chunk-nma79c3w.js +281 -0
- package/dist/chunk-nq0fxyxh.js +752 -0
- package/dist/chunk-nt837qt9.js +21 -0
- package/dist/chunk-nwsmn6zm.js +15 -0
- package/dist/chunk-nypgx8vs.js +63 -0
- package/dist/chunk-p2816w9z.js +1486 -0
- package/dist/chunk-p2d5nh3g.js +342 -0
- package/dist/chunk-p331ghzg.js +391 -0
- package/dist/chunk-p3g43fdn.js +61 -0
- package/dist/chunk-p87jnvhk.js +97 -0
- package/dist/chunk-pb04jxp7.js +158 -0
- package/dist/chunk-pd6ph5ep.js +176 -0
- package/dist/chunk-pe0s50gj.js +32 -0
- package/dist/chunk-pe6w0anj.js +780 -0
- package/dist/chunk-ph936yc1.js +99 -0
- package/dist/chunk-pmsp9ed2.js +34 -0
- package/dist/chunk-ppwjyveh.js +8 -0
- package/dist/chunk-ps49ymvj.js +43 -0
- package/dist/chunk-pwwa7s62.js +11 -0
- package/dist/chunk-pxv7ggmm.js +1580 -0
- package/dist/chunk-py5y9jh1.js +38 -0
- package/dist/chunk-q0sq5qtt.js +606 -0
- package/dist/chunk-q1mq6fj3.js +118 -0
- package/dist/chunk-q25bjaev.js +15 -0
- package/dist/chunk-q55nn3jr.js +5018 -0
- package/dist/chunk-q6na5mcw.js +268 -0
- package/dist/chunk-q6wc9j6e.js +1556 -0
- package/dist/chunk-q7bxdsfd.js +22 -0
- package/dist/chunk-q82jz4qn.js +2838 -0
- package/dist/chunk-qbt1tq74.js +145 -0
- package/dist/chunk-qfzfjrk3.js +439 -0
- package/dist/chunk-qjg7a3vk.js +246 -0
- package/dist/chunk-qnfx3qtx.js +617 -0
- package/dist/chunk-qp2qdcda.js +100 -0
- package/dist/chunk-qpa4edje.js +95 -0
- package/dist/chunk-qqfa0dqg.js +2343 -0
- package/dist/chunk-qqfvrtr3.js +99 -0
- package/dist/chunk-qrqenkjd.js +140 -0
- package/dist/chunk-qrv8taxy.js +229 -0
- package/dist/chunk-qypqtrgp.js +176 -0
- package/dist/chunk-qywdhw43.js +89 -0
- package/dist/chunk-qz2x630m.js +49145 -0
- package/dist/chunk-r0v9bxma.js +83 -0
- package/dist/chunk-r6b58y3x.js +17 -0
- package/dist/chunk-r9madq2h.js +71 -0
- package/dist/chunk-raqgs410.js +116 -0
- package/dist/chunk-rc28tav4.js +202 -0
- package/dist/chunk-re1t10ba.js +5954 -0
- package/dist/chunk-res15ktd.js +18 -0
- package/dist/chunk-rkb7mqj8.js +603 -0
- package/dist/chunk-rn0v1hk8.js +34 -0
- package/dist/chunk-rrb8682q.js +120 -0
- package/dist/chunk-rs9gw711.js +115 -0
- package/dist/chunk-rtgznsee.js +43 -0
- package/dist/chunk-s2341895.js +24 -0
- package/dist/chunk-s2gr7ese.js +106 -0
- package/dist/chunk-s2t8vg8q.js +26 -0
- package/dist/chunk-s3pzvdss.js +50 -0
- package/dist/chunk-s56m7vrp.js +66 -0
- package/dist/chunk-s5dg9njs.js +826 -0
- package/dist/chunk-s7mpvz9v.js +811 -0
- package/dist/chunk-sbbj6ta3.js +1711 -0
- package/dist/chunk-sd36yzx8.js +954 -0
- package/dist/chunk-sdj9b9wh.js +782 -0
- package/dist/chunk-sdxgmmma.js +224 -0
- package/dist/chunk-sgrc7rmx.js +471 -0
- package/dist/chunk-shb6nvk6.js +27 -0
- package/dist/chunk-smtr0ngp.js +98 -0
- package/dist/chunk-sn55zm52.js +267 -0
- package/dist/chunk-ss4r21gw.js +61 -0
- package/dist/chunk-sv3cz176.js +400 -0
- package/dist/chunk-sy4rdq5h.js +116 -0
- package/dist/chunk-szj5wvdy.js +28 -0
- package/dist/chunk-t0rgmccj.js +39 -0
- package/dist/chunk-t133w5tm.js +298 -0
- package/dist/chunk-t3360k46.js +75 -0
- package/dist/chunk-tdbpneze.js +346 -0
- package/dist/chunk-tjk56vh8.js +81 -0
- package/dist/chunk-tm5bn7aw.js +266 -0
- package/dist/chunk-ts2p6bv1.js +224 -0
- package/dist/chunk-ttk5dzz8.js +25 -0
- package/dist/chunk-v1kzp02e.js +785 -0
- package/dist/chunk-v2fqnqgx.js +163 -0
- package/dist/chunk-v2xpxnmd.js +673 -0
- package/dist/chunk-v78fj8by.js +145 -0
- package/dist/chunk-v90xv5n9.js +157 -0
- package/dist/chunk-v9smspw2.js +4301 -0
- package/dist/chunk-vd3bb2zh.js +173 -0
- package/dist/chunk-vest0y6x.js +3830 -0
- package/dist/chunk-vf5sd1nq.js +12 -0
- package/dist/chunk-vhjx5fag.js +56 -0
- package/dist/chunk-vjf2rt5s.js +751 -0
- package/dist/chunk-vn1e1j7w.js +655 -0
- package/dist/chunk-vqk1n5qr.js +63 -0
- package/dist/chunk-vqvd3qz0.js +151 -0
- package/dist/chunk-vrmgtjyy.js +195 -0
- package/dist/chunk-vyjeh50y.js +2149 -0
- package/dist/chunk-w100pzs6.js +41 -0
- package/dist/chunk-w962tnq8.js +1322 -0
- package/dist/chunk-wae2sy8c.js +225 -0
- package/dist/chunk-wfprv7va.js +192 -0
- package/dist/chunk-wfz0qffj.js +3939 -0
- package/dist/chunk-wgcssf6v.js +722 -0
- package/dist/chunk-wh43g70w.js +40 -0
- package/dist/chunk-whb2mrcf.js +2643 -0
- package/dist/chunk-wn2268qd.js +335 -0
- package/dist/chunk-wq8v0d1k.js +1391 -0
- package/dist/chunk-wrhhmkf7.js +16 -0
- package/dist/chunk-wt69n71b.js +779 -0
- package/dist/chunk-wz2ekprb.js +130 -0
- package/dist/chunk-wzpdet3m.js +843 -0
- package/dist/chunk-x21zmsfa.js +104 -0
- package/dist/chunk-x2h31hmh.js +642 -0
- package/dist/chunk-x2qg3sdd.js +114 -0
- package/dist/chunk-x6r4v44b.js +8 -0
- package/dist/chunk-x7vg43fv.js +79 -0
- package/dist/chunk-x8b7vft8.js +132 -0
- package/dist/chunk-xbtacp2f.js +4389 -0
- package/dist/chunk-xq4cfvpn.js +213 -0
- package/dist/chunk-xqde96jm.js +60 -0
- package/dist/chunk-xsq9ae7x.js +90 -0
- package/dist/chunk-xsx5x369.js +526 -0
- package/dist/chunk-xszk7n10.js +14358 -0
- package/dist/chunk-xtv4fh71.js +53 -0
- package/dist/chunk-xv3era3s.js +8 -0
- package/dist/chunk-xxr0mzqt.js +90 -0
- package/dist/chunk-xzcz58pv.js +90 -0
- package/dist/chunk-y1784krc.js +19 -0
- package/dist/chunk-y9pt2qdf.js +69 -0
- package/dist/chunk-ya53e6g3.js +333 -0
- package/dist/chunk-ydde1jqg.js +490 -0
- package/dist/chunk-yh7amsbv.js +143 -0
- package/dist/chunk-yn80rxav.js +458 -0
- package/dist/chunk-ysvwcdav.js +9300 -0
- package/dist/chunk-ytvzxnx2.js +862 -0
- package/dist/chunk-yv9c6hfk.js +286 -0
- package/dist/chunk-yvdj4t96.js +88 -0
- package/dist/chunk-ywxd4qw4.js +22 -0
- package/dist/chunk-yysj6sxt.js +336 -0
- package/dist/chunk-z2dp53wn.js +17 -0
- package/dist/chunk-z2gj7190.js +5398 -0
- package/dist/chunk-z7ns4g0p.js +802 -0
- package/dist/chunk-z9b8pnt1.js +654 -0
- package/dist/chunk-zc6g0qqe.js +29 -0
- package/dist/chunk-zk2wsm7d.js +15 -0
- package/dist/chunk-zq4j9zys.js +264 -0
- package/dist/chunk-zsfxha74.js +17655 -0
- package/dist/chunk-ztmjzgq7.js +524 -0
- package/dist/chunk-zv2r5chy.js +91 -0
- package/dist/chunk-zx7pgp71.js +20 -0
- package/dist/chunk-zxvm58cn.js +102 -0
- package/dist/chunk-zydy88cv.js +70 -0
- package/dist/cli.js +92 -0
- package/package.json +36 -0
|
@@ -0,0 +1,476 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
getWebSocketProxyAgent,
|
|
4
|
+
getWebSocketProxyUrl,
|
|
5
|
+
getWebSocketTLSOptions,
|
|
6
|
+
init_mtls,
|
|
7
|
+
init_proxy
|
|
8
|
+
} from "./chunk-gmaybtrd.js";
|
|
9
|
+
import {
|
|
10
|
+
init_cleanupRegistry,
|
|
11
|
+
init_debug,
|
|
12
|
+
init_errors,
|
|
13
|
+
isENOENT,
|
|
14
|
+
logForDebugging,
|
|
15
|
+
registerCleanup
|
|
16
|
+
} from "./chunk-sbbj6ta3.js";
|
|
17
|
+
import"./chunk-fbv4apne.js";
|
|
18
|
+
import {
|
|
19
|
+
init_envUtils,
|
|
20
|
+
isEnvTruthy
|
|
21
|
+
} from "./chunk-raqgs410.js";
|
|
22
|
+
import"./chunk-qqfa0dqg.js";
|
|
23
|
+
import"./chunk-hqmz36b3.js";
|
|
24
|
+
import"./chunk-4g3v8y12.js";
|
|
25
|
+
import"./chunk-7739pg2c.js";
|
|
26
|
+
import"./chunk-xszk7n10.js";
|
|
27
|
+
import"./chunk-sdj9b9wh.js";
|
|
28
|
+
import {
|
|
29
|
+
__require
|
|
30
|
+
} from "./chunk-qp2qdcda.js";
|
|
31
|
+
|
|
32
|
+
// src/upstreamproxy/upstreamproxy.ts
|
|
33
|
+
init_cleanupRegistry();
|
|
34
|
+
init_debug();
|
|
35
|
+
init_envUtils();
|
|
36
|
+
init_errors();
|
|
37
|
+
import { mkdir, readFile, unlink, writeFile } from "fs/promises";
|
|
38
|
+
import { homedir } from "os";
|
|
39
|
+
import { join } from "path";
|
|
40
|
+
|
|
41
|
+
// src/upstreamproxy/relay.ts
|
|
42
|
+
init_debug();
|
|
43
|
+
init_mtls();
|
|
44
|
+
init_proxy();
|
|
45
|
+
import { createServer } from "net";
|
|
46
|
+
var nodeWSCtor;
|
|
47
|
+
var MAX_CHUNK_BYTES = 512 * 1024;
|
|
48
|
+
var PING_INTERVAL_MS = 30000;
|
|
49
|
+
function encodeChunk(data) {
|
|
50
|
+
const len = data.length;
|
|
51
|
+
const varint = [];
|
|
52
|
+
let n = len;
|
|
53
|
+
while (n > 127) {
|
|
54
|
+
varint.push(n & 127 | 128);
|
|
55
|
+
n >>>= 7;
|
|
56
|
+
}
|
|
57
|
+
varint.push(n);
|
|
58
|
+
const out = new Uint8Array(1 + varint.length + len);
|
|
59
|
+
out[0] = 10;
|
|
60
|
+
out.set(varint, 1);
|
|
61
|
+
out.set(data, 1 + varint.length);
|
|
62
|
+
return out;
|
|
63
|
+
}
|
|
64
|
+
function decodeChunk(buf) {
|
|
65
|
+
if (buf.length === 0)
|
|
66
|
+
return new Uint8Array(0);
|
|
67
|
+
if (buf[0] !== 10)
|
|
68
|
+
return null;
|
|
69
|
+
let len = 0;
|
|
70
|
+
let shift = 0;
|
|
71
|
+
let i = 1;
|
|
72
|
+
while (i < buf.length) {
|
|
73
|
+
const b = buf[i];
|
|
74
|
+
len |= (b & 127) << shift;
|
|
75
|
+
i++;
|
|
76
|
+
if ((b & 128) === 0)
|
|
77
|
+
break;
|
|
78
|
+
shift += 7;
|
|
79
|
+
if (shift > 28)
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
if (i + len > buf.length)
|
|
83
|
+
return null;
|
|
84
|
+
return buf.subarray(i, i + len);
|
|
85
|
+
}
|
|
86
|
+
function newConnState() {
|
|
87
|
+
return {
|
|
88
|
+
connectBuf: Buffer.alloc(0),
|
|
89
|
+
pending: [],
|
|
90
|
+
wsOpen: false,
|
|
91
|
+
established: false,
|
|
92
|
+
closed: false
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
async function startUpstreamProxyRelay(opts) {
|
|
96
|
+
const authHeader = "Basic " + Buffer.from(`${opts.sessionId}:${opts.token}`).toString("base64");
|
|
97
|
+
const wsAuthHeader = `Bearer ${opts.token}`;
|
|
98
|
+
const relay = typeof Bun !== "undefined" ? startBunRelay(opts.wsUrl, authHeader, wsAuthHeader) : await startNodeRelay(opts.wsUrl, authHeader, wsAuthHeader);
|
|
99
|
+
logForDebugging(`[upstreamproxy] relay listening on 127.0.0.1:${relay.port}`);
|
|
100
|
+
return relay;
|
|
101
|
+
}
|
|
102
|
+
function startBunRelay(wsUrl, authHeader, wsAuthHeader) {
|
|
103
|
+
const server = Bun.listen({
|
|
104
|
+
hostname: "127.0.0.1",
|
|
105
|
+
port: 0,
|
|
106
|
+
socket: {
|
|
107
|
+
open(sock) {
|
|
108
|
+
sock.data = { ...newConnState(), writeBuf: [] };
|
|
109
|
+
},
|
|
110
|
+
data(sock, data) {
|
|
111
|
+
const st = sock.data;
|
|
112
|
+
const adapter = {
|
|
113
|
+
write: (payload) => {
|
|
114
|
+
const bytes = typeof payload === "string" ? Buffer.from(payload, "utf8") : payload;
|
|
115
|
+
if (st.writeBuf.length > 0) {
|
|
116
|
+
st.writeBuf.push(bytes);
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
const n = sock.write(bytes);
|
|
120
|
+
if (n < bytes.length)
|
|
121
|
+
st.writeBuf.push(bytes.subarray(n));
|
|
122
|
+
},
|
|
123
|
+
end: () => sock.end()
|
|
124
|
+
};
|
|
125
|
+
handleData(adapter, st, data, wsUrl, authHeader, wsAuthHeader);
|
|
126
|
+
},
|
|
127
|
+
drain(sock) {
|
|
128
|
+
const st = sock.data;
|
|
129
|
+
while (st.writeBuf.length > 0) {
|
|
130
|
+
const chunk = st.writeBuf[0];
|
|
131
|
+
const n = sock.write(chunk);
|
|
132
|
+
if (n < chunk.length) {
|
|
133
|
+
st.writeBuf[0] = chunk.subarray(n);
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
st.writeBuf.shift();
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
close(sock) {
|
|
140
|
+
cleanupConn(sock.data);
|
|
141
|
+
},
|
|
142
|
+
error(sock, err) {
|
|
143
|
+
logForDebugging(`[upstreamproxy] client socket error: ${err.message}`);
|
|
144
|
+
cleanupConn(sock.data);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
return {
|
|
149
|
+
port: server.port,
|
|
150
|
+
stop: () => server.stop(true)
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
async function startNodeRelay(wsUrl, authHeader, wsAuthHeader) {
|
|
154
|
+
nodeWSCtor = (await import("ws")).default;
|
|
155
|
+
const states = new WeakMap;
|
|
156
|
+
const server = createServer((sock) => {
|
|
157
|
+
const st = newConnState();
|
|
158
|
+
states.set(sock, st);
|
|
159
|
+
const adapter = {
|
|
160
|
+
write: (payload) => {
|
|
161
|
+
sock.write(typeof payload === "string" ? payload : Buffer.from(payload));
|
|
162
|
+
},
|
|
163
|
+
end: () => sock.end()
|
|
164
|
+
};
|
|
165
|
+
sock.on("data", (data) => handleData(adapter, st, data, wsUrl, authHeader, wsAuthHeader));
|
|
166
|
+
sock.on("close", () => cleanupConn(states.get(sock)));
|
|
167
|
+
sock.on("error", (err) => {
|
|
168
|
+
logForDebugging(`[upstreamproxy] client socket error: ${err.message}`);
|
|
169
|
+
cleanupConn(states.get(sock));
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
return new Promise((resolve, reject) => {
|
|
173
|
+
server.once("error", reject);
|
|
174
|
+
server.listen(0, "127.0.0.1", () => {
|
|
175
|
+
const addr = server.address();
|
|
176
|
+
if (addr === null || typeof addr === "string") {
|
|
177
|
+
reject(new Error("upstreamproxy: server has no TCP address"));
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
resolve({
|
|
181
|
+
port: addr.port,
|
|
182
|
+
stop: () => server.close()
|
|
183
|
+
});
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
function handleData(sock, st, data, wsUrl, authHeader, wsAuthHeader) {
|
|
188
|
+
if (!st.ws) {
|
|
189
|
+
st.connectBuf = Buffer.concat([st.connectBuf, data]);
|
|
190
|
+
const headerEnd = st.connectBuf.indexOf(`\r
|
|
191
|
+
\r
|
|
192
|
+
`);
|
|
193
|
+
if (headerEnd === -1) {
|
|
194
|
+
if (st.connectBuf.length > 8192) {
|
|
195
|
+
sock.write(`HTTP/1.1 400 Bad Request\r
|
|
196
|
+
\r
|
|
197
|
+
`);
|
|
198
|
+
sock.end();
|
|
199
|
+
}
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
const reqHead = st.connectBuf.subarray(0, headerEnd).toString("utf8");
|
|
203
|
+
const firstLine = reqHead.split(`\r
|
|
204
|
+
`)[0] ?? "";
|
|
205
|
+
const m = firstLine.match(/^CONNECT\s+(\S+)\s+HTTP\/1\.[01]$/i);
|
|
206
|
+
if (!m) {
|
|
207
|
+
sock.write(`HTTP/1.1 405 Method Not Allowed\r
|
|
208
|
+
\r
|
|
209
|
+
`);
|
|
210
|
+
sock.end();
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
const trailing = st.connectBuf.subarray(headerEnd + 4);
|
|
214
|
+
if (trailing.length > 0) {
|
|
215
|
+
st.pending.push(Buffer.from(trailing));
|
|
216
|
+
}
|
|
217
|
+
st.connectBuf = Buffer.alloc(0);
|
|
218
|
+
openTunnel(sock, st, firstLine, wsUrl, authHeader, wsAuthHeader);
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
if (!st.wsOpen) {
|
|
222
|
+
st.pending.push(Buffer.from(data));
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
forwardToWs(st.ws, data);
|
|
226
|
+
}
|
|
227
|
+
function openTunnel(sock, st, connectLine, wsUrl, authHeader, wsAuthHeader) {
|
|
228
|
+
const headers = {
|
|
229
|
+
"Content-Type": "application/proto",
|
|
230
|
+
Authorization: wsAuthHeader
|
|
231
|
+
};
|
|
232
|
+
let ws;
|
|
233
|
+
if (nodeWSCtor) {
|
|
234
|
+
ws = new nodeWSCtor(wsUrl, {
|
|
235
|
+
headers,
|
|
236
|
+
agent: getWebSocketProxyAgent(wsUrl),
|
|
237
|
+
...getWebSocketTLSOptions()
|
|
238
|
+
});
|
|
239
|
+
} else {
|
|
240
|
+
ws = new globalThis.WebSocket(wsUrl, {
|
|
241
|
+
headers,
|
|
242
|
+
proxy: getWebSocketProxyUrl(wsUrl),
|
|
243
|
+
tls: getWebSocketTLSOptions() || undefined
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
ws.binaryType = "arraybuffer";
|
|
247
|
+
st.ws = ws;
|
|
248
|
+
ws.onopen = () => {
|
|
249
|
+
const head = `${connectLine}\r
|
|
250
|
+
Proxy-Authorization: ${authHeader}\r
|
|
251
|
+
\r
|
|
252
|
+
`;
|
|
253
|
+
ws.send(encodeChunk(new Uint8Array(Buffer.from(head, "utf8"))));
|
|
254
|
+
st.wsOpen = true;
|
|
255
|
+
for (const buf of st.pending) {
|
|
256
|
+
forwardToWs(ws, buf);
|
|
257
|
+
}
|
|
258
|
+
st.pending = [];
|
|
259
|
+
st.pinger = setInterval(sendKeepalive, PING_INTERVAL_MS, ws);
|
|
260
|
+
};
|
|
261
|
+
ws.onmessage = (ev) => {
|
|
262
|
+
const raw = ev.data instanceof ArrayBuffer ? new Uint8Array(ev.data) : new Uint8Array(Buffer.from(ev.data));
|
|
263
|
+
const payload = decodeChunk(raw);
|
|
264
|
+
if (payload && payload.length > 0) {
|
|
265
|
+
st.established = true;
|
|
266
|
+
sock.write(payload);
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
ws.onerror = (ev) => {
|
|
270
|
+
const msg = "message" in ev ? String(ev.message) : "websocket error";
|
|
271
|
+
logForDebugging(`[upstreamproxy] ws error: ${msg}`);
|
|
272
|
+
if (st.closed)
|
|
273
|
+
return;
|
|
274
|
+
st.closed = true;
|
|
275
|
+
if (!st.established) {
|
|
276
|
+
sock.write(`HTTP/1.1 502 Bad Gateway\r
|
|
277
|
+
\r
|
|
278
|
+
`);
|
|
279
|
+
}
|
|
280
|
+
sock.end();
|
|
281
|
+
cleanupConn(st);
|
|
282
|
+
};
|
|
283
|
+
ws.onclose = () => {
|
|
284
|
+
if (st.closed)
|
|
285
|
+
return;
|
|
286
|
+
st.closed = true;
|
|
287
|
+
sock.end();
|
|
288
|
+
cleanupConn(st);
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
function sendKeepalive(ws) {
|
|
292
|
+
if (ws.readyState === WebSocket.OPEN) {
|
|
293
|
+
ws.send(encodeChunk(new Uint8Array(0)));
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
function forwardToWs(ws, data) {
|
|
297
|
+
if (ws.readyState !== WebSocket.OPEN)
|
|
298
|
+
return;
|
|
299
|
+
for (let off = 0;off < data.length; off += MAX_CHUNK_BYTES) {
|
|
300
|
+
const slice = new Uint8Array(data.subarray(off, off + MAX_CHUNK_BYTES));
|
|
301
|
+
ws.send(encodeChunk(slice));
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
function cleanupConn(st) {
|
|
305
|
+
if (!st)
|
|
306
|
+
return;
|
|
307
|
+
if (st.pinger)
|
|
308
|
+
clearInterval(st.pinger);
|
|
309
|
+
if (st.ws && st.ws.readyState <= WebSocket.OPEN) {
|
|
310
|
+
try {
|
|
311
|
+
st.ws.close();
|
|
312
|
+
} catch {}
|
|
313
|
+
}
|
|
314
|
+
st.ws = undefined;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
// src/upstreamproxy/upstreamproxy.ts
|
|
318
|
+
var SESSION_TOKEN_PATH = "/run/ccr/session_token";
|
|
319
|
+
var SYSTEM_CA_BUNDLE = "/etc/ssl/certs/ca-certificates.crt";
|
|
320
|
+
var NO_PROXY_LIST = [
|
|
321
|
+
"localhost",
|
|
322
|
+
"127.0.0.1",
|
|
323
|
+
"::1",
|
|
324
|
+
"169.254.0.0/16",
|
|
325
|
+
"10.0.0.0/8",
|
|
326
|
+
"172.16.0.0/12",
|
|
327
|
+
"192.168.0.0/16",
|
|
328
|
+
"anthropic.com",
|
|
329
|
+
".anthropic.com",
|
|
330
|
+
"*.anthropic.com",
|
|
331
|
+
"github.com",
|
|
332
|
+
"api.github.com",
|
|
333
|
+
"*.github.com",
|
|
334
|
+
"*.githubusercontent.com",
|
|
335
|
+
"registry.npmjs.org",
|
|
336
|
+
"pypi.org",
|
|
337
|
+
"files.pythonhosted.org",
|
|
338
|
+
"index.crates.io",
|
|
339
|
+
"proxy.golang.org"
|
|
340
|
+
].join(",");
|
|
341
|
+
var state = { enabled: false };
|
|
342
|
+
async function initUpstreamProxy(opts) {
|
|
343
|
+
if (!isEnvTruthy(process.env.CLAUDE_CODE_REMOTE)) {
|
|
344
|
+
return state;
|
|
345
|
+
}
|
|
346
|
+
if (!isEnvTruthy(process.env.CCR_UPSTREAM_PROXY_ENABLED)) {
|
|
347
|
+
return state;
|
|
348
|
+
}
|
|
349
|
+
const sessionId = process.env.CLAUDE_CODE_REMOTE_SESSION_ID;
|
|
350
|
+
if (!sessionId) {
|
|
351
|
+
logForDebugging("[upstreamproxy] CLAUDE_CODE_REMOTE_SESSION_ID unset; proxy disabled", { level: "warn" });
|
|
352
|
+
return state;
|
|
353
|
+
}
|
|
354
|
+
const tokenPath = opts?.tokenPath ?? SESSION_TOKEN_PATH;
|
|
355
|
+
const token = await readToken(tokenPath);
|
|
356
|
+
if (!token) {
|
|
357
|
+
logForDebugging("[upstreamproxy] no session token file; proxy disabled");
|
|
358
|
+
return state;
|
|
359
|
+
}
|
|
360
|
+
setNonDumpable();
|
|
361
|
+
const baseUrl = opts?.ccrBaseUrl ?? process.env.ANTHROPIC_BASE_URL ?? "https://api.anthropic.com";
|
|
362
|
+
const caBundlePath = opts?.caBundlePath ?? join(homedir(), ".ccr", "ca-bundle.crt");
|
|
363
|
+
const caOk = await downloadCaBundle(baseUrl, opts?.systemCaPath ?? SYSTEM_CA_BUNDLE, caBundlePath);
|
|
364
|
+
if (!caOk)
|
|
365
|
+
return state;
|
|
366
|
+
try {
|
|
367
|
+
const wsUrl = baseUrl.replace(/^http/, "ws") + "/v1/code/upstreamproxy/ws";
|
|
368
|
+
const relay = await startUpstreamProxyRelay({ wsUrl, sessionId, token });
|
|
369
|
+
registerCleanup(async () => relay.stop());
|
|
370
|
+
state = { enabled: true, port: relay.port, caBundlePath };
|
|
371
|
+
logForDebugging(`[upstreamproxy] enabled on 127.0.0.1:${relay.port}`);
|
|
372
|
+
await unlink(tokenPath).catch(() => {
|
|
373
|
+
logForDebugging("[upstreamproxy] token file unlink failed", {
|
|
374
|
+
level: "warn"
|
|
375
|
+
});
|
|
376
|
+
});
|
|
377
|
+
} catch (err) {
|
|
378
|
+
logForDebugging(`[upstreamproxy] relay start failed: ${err instanceof Error ? err.message : String(err)}; proxy disabled`, { level: "warn" });
|
|
379
|
+
}
|
|
380
|
+
return state;
|
|
381
|
+
}
|
|
382
|
+
function getUpstreamProxyEnv() {
|
|
383
|
+
if (!state.enabled || !state.port || !state.caBundlePath) {
|
|
384
|
+
if (process.env.HTTPS_PROXY && process.env.SSL_CERT_FILE) {
|
|
385
|
+
const inherited = {};
|
|
386
|
+
for (const key of [
|
|
387
|
+
"HTTPS_PROXY",
|
|
388
|
+
"https_proxy",
|
|
389
|
+
"NO_PROXY",
|
|
390
|
+
"no_proxy",
|
|
391
|
+
"SSL_CERT_FILE",
|
|
392
|
+
"NODE_EXTRA_CA_CERTS",
|
|
393
|
+
"REQUESTS_CA_BUNDLE",
|
|
394
|
+
"CURL_CA_BUNDLE"
|
|
395
|
+
]) {
|
|
396
|
+
if (process.env[key])
|
|
397
|
+
inherited[key] = process.env[key];
|
|
398
|
+
}
|
|
399
|
+
return inherited;
|
|
400
|
+
}
|
|
401
|
+
return {};
|
|
402
|
+
}
|
|
403
|
+
const proxyUrl = `http://127.0.0.1:${state.port}`;
|
|
404
|
+
return {
|
|
405
|
+
HTTPS_PROXY: proxyUrl,
|
|
406
|
+
https_proxy: proxyUrl,
|
|
407
|
+
NO_PROXY: NO_PROXY_LIST,
|
|
408
|
+
no_proxy: NO_PROXY_LIST,
|
|
409
|
+
SSL_CERT_FILE: state.caBundlePath,
|
|
410
|
+
NODE_EXTRA_CA_CERTS: state.caBundlePath,
|
|
411
|
+
REQUESTS_CA_BUNDLE: state.caBundlePath,
|
|
412
|
+
CURL_CA_BUNDLE: state.caBundlePath
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
function resetUpstreamProxyForTests() {
|
|
416
|
+
state = { enabled: false };
|
|
417
|
+
}
|
|
418
|
+
async function readToken(path) {
|
|
419
|
+
try {
|
|
420
|
+
const raw = await readFile(path, "utf8");
|
|
421
|
+
return raw.trim() || null;
|
|
422
|
+
} catch (err) {
|
|
423
|
+
if (isENOENT(err))
|
|
424
|
+
return null;
|
|
425
|
+
logForDebugging(`[upstreamproxy] token read failed: ${err instanceof Error ? err.message : String(err)}`, { level: "warn" });
|
|
426
|
+
return null;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
function setNonDumpable() {
|
|
430
|
+
if (process.platform !== "linux" || typeof Bun === "undefined")
|
|
431
|
+
return;
|
|
432
|
+
try {
|
|
433
|
+
const ffi = __require("bun:ffi");
|
|
434
|
+
const lib = ffi.dlopen("libc.so.6", {
|
|
435
|
+
prctl: {
|
|
436
|
+
args: ["int", "u64", "u64", "u64", "u64"],
|
|
437
|
+
returns: "int"
|
|
438
|
+
}
|
|
439
|
+
});
|
|
440
|
+
const PR_SET_DUMPABLE = 4;
|
|
441
|
+
const rc = lib.symbols.prctl(PR_SET_DUMPABLE, 0n, 0n, 0n, 0n);
|
|
442
|
+
if (rc !== 0) {
|
|
443
|
+
logForDebugging("[upstreamproxy] prctl(PR_SET_DUMPABLE,0) returned nonzero", {
|
|
444
|
+
level: "warn"
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
} catch (err) {
|
|
448
|
+
logForDebugging(`[upstreamproxy] prctl unavailable: ${err instanceof Error ? err.message : String(err)}`, { level: "warn" });
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
async function downloadCaBundle(baseUrl, systemCaPath, outPath) {
|
|
452
|
+
try {
|
|
453
|
+
const resp = await fetch(`${baseUrl}/v1/code/upstreamproxy/ca-cert`, {
|
|
454
|
+
signal: AbortSignal.timeout(5000)
|
|
455
|
+
});
|
|
456
|
+
if (!resp.ok) {
|
|
457
|
+
logForDebugging(`[upstreamproxy] ca-cert fetch ${resp.status}; proxy disabled`, { level: "warn" });
|
|
458
|
+
return false;
|
|
459
|
+
}
|
|
460
|
+
const ccrCa = await resp.text();
|
|
461
|
+
const systemCa = await readFile(systemCaPath, "utf8").catch(() => "");
|
|
462
|
+
await mkdir(join(outPath, ".."), { recursive: true });
|
|
463
|
+
await writeFile(outPath, systemCa + `
|
|
464
|
+
` + ccrCa, "utf8");
|
|
465
|
+
return true;
|
|
466
|
+
} catch (err) {
|
|
467
|
+
logForDebugging(`[upstreamproxy] ca-cert download failed: ${err instanceof Error ? err.message : String(err)}; proxy disabled`, { level: "warn" });
|
|
468
|
+
return false;
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
export {
|
|
472
|
+
resetUpstreamProxyForTests,
|
|
473
|
+
initUpstreamProxy,
|
|
474
|
+
getUpstreamProxyEnv,
|
|
475
|
+
SESSION_TOKEN_PATH
|
|
476
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
init_AppState,
|
|
4
|
+
useAppState
|
|
5
|
+
} from "./chunk-1m68rrvt.js";
|
|
6
|
+
import {
|
|
7
|
+
require_react
|
|
8
|
+
} from "./chunk-g338npwr.js";
|
|
9
|
+
import {
|
|
10
|
+
getDefaultMainLoopModelSetting,
|
|
11
|
+
init_growthbook,
|
|
12
|
+
init_model,
|
|
13
|
+
onGrowthBookRefresh,
|
|
14
|
+
parseUserSpecifiedModel
|
|
15
|
+
} from "./chunk-3zzszjst.js";
|
|
16
|
+
import {
|
|
17
|
+
__esm,
|
|
18
|
+
__toESM
|
|
19
|
+
} from "./chunk-qp2qdcda.js";
|
|
20
|
+
|
|
21
|
+
// src/hooks/useMainLoopModel.ts
|
|
22
|
+
function useMainLoopModel() {
|
|
23
|
+
const mainLoopModel = useAppState((s) => s.mainLoopModel);
|
|
24
|
+
const mainLoopModelForSession = useAppState((s) => s.mainLoopModelForSession);
|
|
25
|
+
const [, forceRerender] = import_react.useReducer((x) => x + 1, 0);
|
|
26
|
+
import_react.useEffect(() => onGrowthBookRefresh(forceRerender), []);
|
|
27
|
+
const model = parseUserSpecifiedModel(mainLoopModelForSession ?? mainLoopModel ?? getDefaultMainLoopModelSetting());
|
|
28
|
+
return model;
|
|
29
|
+
}
|
|
30
|
+
var import_react;
|
|
31
|
+
var init_useMainLoopModel = __esm(() => {
|
|
32
|
+
init_growthbook();
|
|
33
|
+
init_AppState();
|
|
34
|
+
init_model();
|
|
35
|
+
import_react = __toESM(require_react(), 1);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export { useMainLoopModel, init_useMainLoopModel };
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
init_analytics
|
|
4
|
+
} from "./chunk-h0rbjg6x.js";
|
|
5
|
+
import {
|
|
6
|
+
init_debug
|
|
7
|
+
} from "./chunk-sbbj6ta3.js";
|
|
8
|
+
import {
|
|
9
|
+
__esm
|
|
10
|
+
} from "./chunk-qp2qdcda.js";
|
|
11
|
+
|
|
12
|
+
// src/utils/bash/bashParser.ts
|
|
13
|
+
var READY, SPECIAL_VARS, DECL_KEYWORDS, SHELL_KEYWORDS, ARITH_RIGHT_ASSOC;
|
|
14
|
+
var init_bashParser = __esm(() => {
|
|
15
|
+
READY = Promise.resolve();
|
|
16
|
+
SPECIAL_VARS = new Set(["?", "$", "@", "*", "#", "-", "!", "_"]);
|
|
17
|
+
DECL_KEYWORDS = new Set([
|
|
18
|
+
"export",
|
|
19
|
+
"declare",
|
|
20
|
+
"typeset",
|
|
21
|
+
"readonly",
|
|
22
|
+
"local"
|
|
23
|
+
]);
|
|
24
|
+
SHELL_KEYWORDS = new Set([
|
|
25
|
+
"if",
|
|
26
|
+
"then",
|
|
27
|
+
"elif",
|
|
28
|
+
"else",
|
|
29
|
+
"fi",
|
|
30
|
+
"while",
|
|
31
|
+
"until",
|
|
32
|
+
"for",
|
|
33
|
+
"in",
|
|
34
|
+
"do",
|
|
35
|
+
"done",
|
|
36
|
+
"case",
|
|
37
|
+
"esac",
|
|
38
|
+
"function",
|
|
39
|
+
"select"
|
|
40
|
+
]);
|
|
41
|
+
ARITH_RIGHT_ASSOC = new Set([
|
|
42
|
+
"=",
|
|
43
|
+
"+=",
|
|
44
|
+
"-=",
|
|
45
|
+
"*=",
|
|
46
|
+
"/=",
|
|
47
|
+
"%=",
|
|
48
|
+
"<<=",
|
|
49
|
+
">>=",
|
|
50
|
+
"&=",
|
|
51
|
+
"^=",
|
|
52
|
+
"|=",
|
|
53
|
+
"**"
|
|
54
|
+
]);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
// src/utils/bash/parser.ts
|
|
58
|
+
async function ensureInitialized() {
|
|
59
|
+
if (false) {}
|
|
60
|
+
}
|
|
61
|
+
async function parseCommand(command) {
|
|
62
|
+
if (!command || command.length > MAX_COMMAND_LENGTH)
|
|
63
|
+
return null;
|
|
64
|
+
if (false) {}
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
async function parseCommandRaw(command) {
|
|
68
|
+
if (!command || command.length > MAX_COMMAND_LENGTH)
|
|
69
|
+
return null;
|
|
70
|
+
if (false) {}
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
function extractCommandArguments(commandNode) {
|
|
74
|
+
if (commandNode.type === "declaration_command") {
|
|
75
|
+
const firstChild = commandNode.children[0];
|
|
76
|
+
return firstChild && DECLARATION_COMMANDS.has(firstChild.text) ? [firstChild.text] : [];
|
|
77
|
+
}
|
|
78
|
+
const args = [];
|
|
79
|
+
let foundCommandName = false;
|
|
80
|
+
for (const child of commandNode.children) {
|
|
81
|
+
if (child.type === "variable_assignment")
|
|
82
|
+
continue;
|
|
83
|
+
if (child.type === "command_name" || !foundCommandName && child.type === "word") {
|
|
84
|
+
foundCommandName = true;
|
|
85
|
+
args.push(child.text);
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
if (ARGUMENT_TYPES.has(child.type)) {
|
|
89
|
+
args.push(stripQuotes(child.text));
|
|
90
|
+
} else if (SUBSTITUTION_TYPES.has(child.type)) {
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return args;
|
|
95
|
+
}
|
|
96
|
+
function stripQuotes(text) {
|
|
97
|
+
return text.length >= 2 && (text[0] === '"' && text.at(-1) === '"' || text[0] === "'" && text.at(-1) === "'") ? text.slice(1, -1) : text;
|
|
98
|
+
}
|
|
99
|
+
var MAX_COMMAND_LENGTH = 1e4, DECLARATION_COMMANDS, ARGUMENT_TYPES, SUBSTITUTION_TYPES, COMMAND_TYPES, PARSE_ABORTED;
|
|
100
|
+
var init_parser = __esm(() => {
|
|
101
|
+
init_analytics();
|
|
102
|
+
init_debug();
|
|
103
|
+
init_bashParser();
|
|
104
|
+
DECLARATION_COMMANDS = new Set([
|
|
105
|
+
"export",
|
|
106
|
+
"declare",
|
|
107
|
+
"typeset",
|
|
108
|
+
"readonly",
|
|
109
|
+
"local",
|
|
110
|
+
"unset",
|
|
111
|
+
"unsetenv"
|
|
112
|
+
]);
|
|
113
|
+
ARGUMENT_TYPES = new Set(["word", "string", "raw_string", "number"]);
|
|
114
|
+
SUBSTITUTION_TYPES = new Set([
|
|
115
|
+
"command_substitution",
|
|
116
|
+
"process_substitution"
|
|
117
|
+
]);
|
|
118
|
+
COMMAND_TYPES = new Set(["command", "declaration_command"]);
|
|
119
|
+
PARSE_ABORTED = Symbol("parse-aborted");
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
export { SHELL_KEYWORDS, init_bashParser, ensureInitialized, parseCommand, PARSE_ABORTED, parseCommandRaw, extractCommandArguments, init_parser };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
require_index_node_http,
|
|
4
|
+
require_src,
|
|
5
|
+
require_src1 as require_src2
|
|
6
|
+
} from "./chunk-90wp6wez.js";
|
|
7
|
+
import"./chunk-a8ejc632.js";
|
|
8
|
+
import"./chunk-f5ma3nh5.js";
|
|
9
|
+
import"./chunk-p2816w9z.js";
|
|
10
|
+
import {
|
|
11
|
+
__esm,
|
|
12
|
+
__toESM
|
|
13
|
+
} from "./chunk-qp2qdcda.js";
|
|
14
|
+
|
|
15
|
+
// node_modules/.bun/@opentelemetry+exporter-trace-otlp-http@0.214.0+e40b0dfdd726a224/node_modules/@opentelemetry/exporter-trace-otlp-http/build/esm/platform/node/OTLPTraceExporter.js
|
|
16
|
+
var import_otlp_exporter_base, import_otlp_transformer, import_node_http, OTLPTraceExporter;
|
|
17
|
+
var init_OTLPTraceExporter = __esm(() => {
|
|
18
|
+
import_otlp_exporter_base = __toESM(require_src(), 1);
|
|
19
|
+
import_otlp_transformer = __toESM(require_src2(), 1);
|
|
20
|
+
import_node_http = __toESM(require_index_node_http(), 1);
|
|
21
|
+
OTLPTraceExporter = class OTLPTraceExporter extends import_otlp_exporter_base.OTLPExporterBase {
|
|
22
|
+
constructor(config = {}) {
|
|
23
|
+
super(import_node_http.createOtlpHttpExportDelegate(import_node_http.convertLegacyHttpOptions(config, "TRACES", "v1/traces", {
|
|
24
|
+
"Content-Type": "application/json"
|
|
25
|
+
}), import_otlp_transformer.JsonTraceSerializer));
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// node_modules/.bun/@opentelemetry+exporter-trace-otlp-http@0.214.0+e40b0dfdd726a224/node_modules/@opentelemetry/exporter-trace-otlp-http/build/esm/platform/node/index.js
|
|
31
|
+
var init_node = __esm(() => {
|
|
32
|
+
init_OTLPTraceExporter();
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
// node_modules/.bun/@opentelemetry+exporter-trace-otlp-http@0.214.0+e40b0dfdd726a224/node_modules/@opentelemetry/exporter-trace-otlp-http/build/esm/platform/index.js
|
|
36
|
+
var init_platform = __esm(() => {
|
|
37
|
+
init_node();
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
// node_modules/.bun/@opentelemetry+exporter-trace-otlp-http@0.214.0+e40b0dfdd726a224/node_modules/@opentelemetry/exporter-trace-otlp-http/build/esm/index.js
|
|
41
|
+
var init_esm = __esm(() => {
|
|
42
|
+
init_platform();
|
|
43
|
+
});
|
|
44
|
+
init_esm();
|
|
45
|
+
|
|
46
|
+
export {
|
|
47
|
+
OTLPTraceExporter
|
|
48
|
+
};
|