@jayjiang/open-cc 0.2.1
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 +8 -0
- package/README.md +107 -0
- package/dist/chunk-00dxqxqj.js +227 -0
- package/dist/chunk-01p8hhsp.js +154 -0
- package/dist/chunk-02wy0m47.js +152 -0
- package/dist/chunk-0465tnzh.js +110 -0
- package/dist/chunk-054mjk62.js +678 -0
- package/dist/chunk-06saje2v.js +39 -0
- package/dist/chunk-0731m51q.js +8 -0
- package/dist/chunk-09y0jvtm.js +165 -0
- package/dist/chunk-0fkqze0v.js +113 -0
- package/dist/chunk-0hn525br.js +1920 -0
- package/dist/chunk-0hneh9ha.js +123 -0
- package/dist/chunk-0paqc2yw.js +15 -0
- package/dist/chunk-0rkbrabt.js +32 -0
- package/dist/chunk-0scs4rpx.js +96 -0
- package/dist/chunk-0vkfrmqm.js +690 -0
- package/dist/chunk-0w2byc95.js +38 -0
- package/dist/chunk-0xjaqda8.js +1124 -0
- package/dist/chunk-0y3vcsv4.js +92 -0
- package/dist/chunk-0yb4dz9c.js +26840 -0
- package/dist/chunk-10fdxge0.js +121 -0
- package/dist/chunk-1141xmr4.js +8 -0
- package/dist/chunk-14vffdmg.js +38 -0
- package/dist/chunk-178ykx7k.js +1493 -0
- package/dist/chunk-1bhva2z9.js +128 -0
- package/dist/chunk-1c8z1b5v.js +16 -0
- package/dist/chunk-1cbn5kxf.js +7 -0
- package/dist/chunk-1che51a5.js +1585 -0
- package/dist/chunk-1h2famwb.js +49 -0
- package/dist/chunk-1jrkpnbn.js +71 -0
- package/dist/chunk-1k4j1xcf.js +154 -0
- package/dist/chunk-1mm9d8p4.js +70 -0
- package/dist/chunk-1n3gnn2t.js +41 -0
- package/dist/chunk-1nqaq1rs.js +654 -0
- package/dist/chunk-1p2j9g3w.js +998 -0
- package/dist/chunk-1p7jfcee.js +533 -0
- package/dist/chunk-1pg8s12r.js +338 -0
- package/dist/chunk-1qjb22fx.js +109 -0
- package/dist/chunk-1yzc16qa.js +39 -0
- package/dist/chunk-20gm89wf.js +208 -0
- package/dist/chunk-238g70xa.js +36 -0
- package/dist/chunk-26k0324b.js +751 -0
- package/dist/chunk-27xc1csx.js +104 -0
- package/dist/chunk-2a42s11t.js +412 -0
- package/dist/chunk-2bhq4emw.js +10476 -0
- package/dist/chunk-2eykm0j0.js +20 -0
- package/dist/chunk-2gzv8nrw.js +205 -0
- package/dist/chunk-2k995y2x.js +880 -0
- package/dist/chunk-2kpzaa7w.js +401 -0
- package/dist/chunk-2nayx6q1.js +63 -0
- package/dist/chunk-2qhs9n36.js +151 -0
- package/dist/chunk-2s5f2nnw.js +603 -0
- package/dist/chunk-2y54j9ew.js +174394 -0
- package/dist/chunk-2zcaw1jd.js +2343 -0
- package/dist/chunk-30chpfyc.js +15275 -0
- package/dist/chunk-30k39xd2.js +28 -0
- package/dist/chunk-30rst83v.js +168 -0
- package/dist/chunk-36z5enc4.js +160 -0
- package/dist/chunk-3c25bcsw.js +17 -0
- package/dist/chunk-3c4qja3e.js +63 -0
- package/dist/chunk-3ccx8k84.js +102 -0
- package/dist/chunk-3envnthj.js +157 -0
- package/dist/chunk-3h8a89gy.js +46 -0
- package/dist/chunk-3kadbep2.js +6956 -0
- package/dist/chunk-3kd79cnk.js +15 -0
- package/dist/chunk-3m45xtza.js +1188 -0
- package/dist/chunk-3q50xe1j.js +17 -0
- package/dist/chunk-3w6s9m5w.js +16 -0
- package/dist/chunk-3x0408tc.js +42 -0
- package/dist/chunk-3z7ae04g.js +372 -0
- package/dist/chunk-40tedt0y.js +275 -0
- package/dist/chunk-44q8kegv.js +811 -0
- package/dist/chunk-47gy6qkp.js +328 -0
- package/dist/chunk-495d85x1.js +8066 -0
- package/dist/chunk-4axcksrv.js +129 -0
- package/dist/chunk-4e1271a8.js +106 -0
- package/dist/chunk-4g3v8y12.js +23 -0
- package/dist/chunk-4g5mrzm0.js +220 -0
- package/dist/chunk-4jm600zv.js +13 -0
- package/dist/chunk-4n989n6h.js +153 -0
- package/dist/chunk-4qedx22a.js +44 -0
- package/dist/chunk-4rze71rx.js +116 -0
- package/dist/chunk-4wbhvcag.js +91 -0
- package/dist/chunk-4zfkzkt6.js +37 -0
- package/dist/chunk-55wgxwa9.js +13877 -0
- package/dist/chunk-56ta4h0b.js +154 -0
- package/dist/chunk-58a0x39g.js +89 -0
- package/dist/chunk-5dbk24zg.js +890 -0
- package/dist/chunk-5gzg4q1k.js +99 -0
- package/dist/chunk-5k2gdxnr.js +336 -0
- package/dist/chunk-5kp252z6.js +202 -0
- package/dist/chunk-5p2ssw3d.js +825 -0
- package/dist/chunk-5w33j8gy.js +1580 -0
- package/dist/chunk-5ywjzvm8.js +61 -0
- package/dist/chunk-5ztxx8gd.js +80 -0
- package/dist/chunk-62vwr0y5.js +117 -0
- package/dist/chunk-6b8ksqmf.js +1153 -0
- package/dist/chunk-6bd8brc4.js +48 -0
- package/dist/chunk-6cpqmd4r.js +132 -0
- package/dist/chunk-6dj5t602.js +341 -0
- package/dist/chunk-6g62sjpf.js +328 -0
- package/dist/chunk-6gr3c3w9.js +378 -0
- package/dist/chunk-6h9n8qbr.js +1170 -0
- package/dist/chunk-6kpbgc5w.js +23 -0
- package/dist/chunk-6n2qgm9v.js +8 -0
- package/dist/chunk-6n6jfmce.js +2833 -0
- package/dist/chunk-6q2x8zeg.js +802 -0
- package/dist/chunk-6tnekwtp.js +849 -0
- package/dist/chunk-6tq2v3rk.js +186 -0
- package/dist/chunk-6vphqqd1.js +27 -0
- package/dist/chunk-6wkdqk81.js +444 -0
- package/dist/chunk-7226mgjt.js +195 -0
- package/dist/chunk-72fey14y.js +565 -0
- package/dist/chunk-73fgm72g.js +698 -0
- package/dist/chunk-73fhat5j.js +212 -0
- package/dist/chunk-73rpbt04.js +1947 -0
- package/dist/chunk-743znc5c.js +56 -0
- package/dist/chunk-760252na.js +101 -0
- package/dist/chunk-76t2h5v2.js +495 -0
- package/dist/chunk-7739pg2c.js +4261 -0
- package/dist/chunk-789khc7a.js +96 -0
- package/dist/chunk-78mma1s7.js +88 -0
- package/dist/chunk-7aw745vx.js +40175 -0
- package/dist/chunk-7azp8c8y.js +584 -0
- package/dist/chunk-7m2nd8da.js +110 -0
- package/dist/chunk-7pemewz2.js +726 -0
- package/dist/chunk-7rjyn5d3.js +125 -0
- package/dist/chunk-7v0wq9nk.js +93 -0
- package/dist/chunk-7wm5s02e.js +216 -0
- package/dist/chunk-83hfzbx3.js +10 -0
- package/dist/chunk-84k64e4a.js +1646 -0
- package/dist/chunk-87jfpcm7.js +438 -0
- package/dist/chunk-8btm871b.js +42 -0
- package/dist/chunk-8hbbzet5.js +34 -0
- package/dist/chunk-8hq5kk3y.js +44 -0
- package/dist/chunk-8j6vs75t.js +256 -0
- package/dist/chunk-8ngxagxq.js +18 -0
- package/dist/chunk-8nsem424.js +110 -0
- package/dist/chunk-8pf73pc8.js +169 -0
- package/dist/chunk-8tnsngw2.js +31 -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-95dt8mpg.js +603 -0
- package/dist/chunk-95rj8m4e.js +130 -0
- package/dist/chunk-9ebygqen.js +89 -0
- package/dist/chunk-9gbamk79.js +93 -0
- package/dist/chunk-9tkq3g56.js +642 -0
- package/dist/chunk-a05hje2h.js +105 -0
- package/dist/chunk-a2krhf3c.js +90 -0
- package/dist/chunk-a6q9rehn.js +182 -0
- package/dist/chunk-a78b3pvt.js +71 -0
- package/dist/chunk-a8ejc632.js +3094 -0
- package/dist/chunk-a9vdeb6y.js +258 -0
- package/dist/chunk-a9zh40sj.js +48 -0
- package/dist/chunk-ab59azrr.js +480 -0
- package/dist/chunk-accxhkm6.js +88 -0
- package/dist/chunk-adzd8pzb.js +1095 -0
- package/dist/chunk-ae76ded0.js +30 -0
- package/dist/chunk-aftppv3p.js +691 -0
- package/dist/chunk-agmw1vmf.js +725 -0
- package/dist/chunk-an5cb1vx.js +16 -0
- package/dist/chunk-b1s11z4y.js +63 -0
- package/dist/chunk-b2rkh01x.js +443 -0
- package/dist/chunk-b4w4argn.js +1551 -0
- package/dist/chunk-b4wg70y1.js +54 -0
- package/dist/chunk-b5b7h81y.js +7189 -0
- package/dist/chunk-b9k5cs09.js +50 -0
- package/dist/chunk-bapy5rc8.js +40 -0
- package/dist/chunk-bda3gxxz.js +246 -0
- package/dist/chunk-bhdt6k7w.js +15 -0
- package/dist/chunk-bm1qb16p.js +17 -0
- package/dist/chunk-bp0dnrwg.js +281 -0
- package/dist/chunk-bqfnp99q.js +477 -0
- package/dist/chunk-bs6keys0.js +158 -0
- package/dist/chunk-bsbmmfyt.js +17 -0
- package/dist/chunk-btkettbr.js +166 -0
- package/dist/chunk-bwgde7nf.js +37 -0
- package/dist/chunk-c1zc58pw.js +280 -0
- package/dist/chunk-c2g96ga2.js +184 -0
- package/dist/chunk-c3z7ptb2.js +21933 -0
- package/dist/chunk-c8vn3ynx.js +349 -0
- package/dist/chunk-cdm0k2n0.js +115 -0
- package/dist/chunk-cdz5yb0r.js +57 -0
- package/dist/chunk-cfv996bs.js +22 -0
- package/dist/chunk-cg788ab0.js +100 -0
- package/dist/chunk-cgfdkzhb.js +12 -0
- package/dist/chunk-cp76dsdp.js +386 -0
- package/dist/chunk-cr6t6rth.js +306 -0
- package/dist/chunk-cvp5vayb.js +31 -0
- package/dist/chunk-cwehsmj5.js +114 -0
- package/dist/chunk-cy2hswr1.js +15 -0
- package/dist/chunk-d2rzy2p0.js +42 -0
- package/dist/chunk-d3v2fbay.js +106 -0
- package/dist/chunk-dc4eha8a.js +243 -0
- package/dist/chunk-dcz167d6.js +73 -0
- package/dist/chunk-de55jjre.js +106 -0
- package/dist/chunk-dfx733j3.js +650 -0
- package/dist/chunk-dgqrcy74.js +48 -0
- package/dist/chunk-dj6dk19k.js +55 -0
- package/dist/chunk-dn2xcmc4.js +173 -0
- package/dist/chunk-dndehvfr.js +57 -0
- package/dist/chunk-dnh7jtpb.js +37 -0
- package/dist/chunk-dnwzz9f7.js +88 -0
- package/dist/chunk-dv1wfr85.js +6373 -0
- package/dist/chunk-dwq5rs3q.js +62 -0
- package/dist/chunk-dz8exe78.js +91 -0
- package/dist/chunk-e4rzw1sd.js +606 -0
- package/dist/chunk-e6rrwzv0.js +463 -0
- package/dist/chunk-e6t9kpzq.js +145 -0
- package/dist/chunk-e7c8ypwc.js +287 -0
- package/dist/chunk-e9nkfs4e.js +738 -0
- package/dist/chunk-eaf7c8ck.js +537 -0
- package/dist/chunk-ebyr6p77.js +115 -0
- package/dist/chunk-edfv7pme.js +104 -0
- package/dist/chunk-eh474zhj.js +59 -0
- package/dist/chunk-er8ckwzt.js +140 -0
- package/dist/chunk-ev5p07yh.js +144 -0
- package/dist/chunk-ewadzrm8.js +103 -0
- package/dist/chunk-f2mhrmww.js +62 -0
- package/dist/chunk-f2zhqnb6.js +69 -0
- package/dist/chunk-f5ma3nh5.js +3436 -0
- package/dist/chunk-f63q7vx7.js +756 -0
- package/dist/chunk-fbv4apne.js +51 -0
- package/dist/chunk-fcna95wg.js +113 -0
- package/dist/chunk-fdvcpaz3.js +163 -0
- package/dist/chunk-fgc0q2b2.js +3354 -0
- package/dist/chunk-fm2jvsk7.js +87 -0
- package/dist/chunk-ft7fs35e.js +282 -0
- package/dist/chunk-fyc5fepv.js +10 -0
- package/dist/chunk-g0j0t6qk.js +26 -0
- package/dist/chunk-g0nbec9m.js +32 -0
- package/dist/chunk-g1fdv1kb.js +86 -0
- package/dist/chunk-g338npwr.js +1061 -0
- package/dist/chunk-g3t0act8.js +8 -0
- package/dist/chunk-g6qddbvf.js +1391 -0
- package/dist/chunk-ga5faygf.js +61 -0
- package/dist/chunk-gac6nzhc.js +90 -0
- package/dist/chunk-gck2cswd.js +862 -0
- package/dist/chunk-gntr3b25.js +40683 -0
- package/dist/chunk-gq5bbtme.js +456 -0
- package/dist/chunk-gyj242zr.js +20 -0
- package/dist/chunk-h0qngp9w.js +157 -0
- package/dist/chunk-h1xnvnye.js +524 -0
- package/dist/chunk-h3mhfamg.js +60 -0
- package/dist/chunk-h6s1tx0e.js +250 -0
- package/dist/chunk-h7qb4hyj.js +70 -0
- package/dist/chunk-h8qd1gw2.js +106 -0
- package/dist/chunk-hakdhagh.js +16606 -0
- package/dist/chunk-hcdt34n4.js +143 -0
- package/dist/chunk-hh7cmy4k.js +20 -0
- package/dist/chunk-hk9xz7gk.js +118 -0
- package/dist/chunk-hqmz36b3.js +552 -0
- package/dist/chunk-hs8ph4p8.js +8 -0
- package/dist/chunk-hsq4vtjy.js +92 -0
- package/dist/chunk-hzhd0p1y.js +104 -0
- package/dist/chunk-hzhe8ygc.js +547 -0
- package/dist/chunk-j0tqbsh7.js +176 -0
- package/dist/chunk-j1s1jvad.js +346 -0
- package/dist/chunk-j2k4p94p.js +55 -0
- package/dist/chunk-j3a4p81y.js +184 -0
- package/dist/chunk-j595yd4h.js +439 -0
- package/dist/chunk-j64ga6ta.js +8035 -0
- package/dist/chunk-j7qwxra8.js +2335 -0
- package/dist/chunk-j98f65zv.js +789 -0
- package/dist/chunk-jd32zbps.js +15 -0
- package/dist/chunk-jdgeec04.js +4249 -0
- package/dist/chunk-jdt5s5k7.js +62 -0
- package/dist/chunk-jeaek018.js +97 -0
- package/dist/chunk-jkhvm8yk.js +104 -0
- package/dist/chunk-jmxaze30.js +780 -0
- package/dist/chunk-jne71s1f.js +104 -0
- package/dist/chunk-jnhkref0.js +30 -0
- package/dist/chunk-jpgr7zfs.js +95 -0
- package/dist/chunk-jqp0q5nk.js +339 -0
- package/dist/chunk-jtqgnyaq.js +1317 -0
- package/dist/chunk-jx817w05.js +11 -0
- package/dist/chunk-jynzr5w9.js +71 -0
- package/dist/chunk-jzmz18nn.js +65 -0
- package/dist/chunk-k0p9w03v.js +4957 -0
- package/dist/chunk-k1jnpyj9.js +155 -0
- package/dist/chunk-k445en8h.js +102 -0
- package/dist/chunk-k62k13ya.js +81 -0
- package/dist/chunk-kf8kjmfv.js +821 -0
- package/dist/chunk-kgn1nfg9.js +468 -0
- package/dist/chunk-khmz14d4.js +38 -0
- package/dist/chunk-kjhmt6ba.js +100 -0
- package/dist/chunk-kkrz2zw2.js +122 -0
- package/dist/chunk-kv1ryvtm.js +176 -0
- package/dist/chunk-kwekc97v.js +18 -0
- package/dist/chunk-kyvwf342.js +65 -0
- package/dist/chunk-m0g3xv72.js +266 -0
- package/dist/chunk-m26twd8m.js +277 -0
- package/dist/chunk-m4bc15mz.js +229 -0
- package/dist/chunk-m9t8j37k.js +253 -0
- package/dist/chunk-mb2gpwwf.js +432 -0
- package/dist/chunk-mezwt1bt.js +306 -0
- package/dist/chunk-mfm83xn5.js +84 -0
- package/dist/chunk-mn7870fh.js +4389 -0
- package/dist/chunk-mr9df5v8.js +722 -0
- package/dist/chunk-mt25echc.js +6157 -0
- package/dist/chunk-mwrr6zbb.js +55 -0
- package/dist/chunk-mywpbwad.js +198 -0
- package/dist/chunk-mzdtkccs.js +125 -0
- package/dist/chunk-mzn0z9d3.js +691 -0
- package/dist/chunk-n0qaeaa5.js +256 -0
- package/dist/chunk-n128bzxs.js +2739 -0
- package/dist/chunk-n1erf6kh.js +22820 -0
- package/dist/chunk-n4nbgkvd.js +520 -0
- package/dist/chunk-n5gkdn9v.js +120 -0
- package/dist/chunk-n7ttdtk0.js +641 -0
- package/dist/chunk-n8b1njwb.js +208 -0
- package/dist/chunk-nek12gtk.js +94 -0
- package/dist/chunk-nerv0jvx.js +74 -0
- package/dist/chunk-nka1g8f4.js +773 -0
- package/dist/chunk-nm2cncrq.js +336 -0
- package/dist/chunk-nq0fxyxh.js +752 -0
- package/dist/chunk-nrnkshv2.js +192 -0
- package/dist/chunk-nsqma629.js +128 -0
- package/dist/chunk-nt837qt9.js +21 -0
- package/dist/chunk-nttf3k0r.js +2643 -0
- package/dist/chunk-nx638j6h.js +268 -0
- package/dist/chunk-nx7s0zn5.js +375 -0
- package/dist/chunk-p0hff8zy.js +8871 -0
- package/dist/chunk-p2816w9z.js +1486 -0
- package/dist/chunk-p2d5nh3g.js +342 -0
- package/dist/chunk-p57bz7nv.js +55 -0
- package/dist/chunk-p5z8t6r3.js +130 -0
- package/dist/chunk-pd6653na.js +5394 -0
- package/dist/chunk-pjnzf3cg.js +61 -0
- package/dist/chunk-ps49ymvj.js +43 -0
- package/dist/chunk-pthzapbx.js +348 -0
- package/dist/chunk-pwwa7s62.js +11 -0
- package/dist/chunk-pyx135a5.js +20 -0
- package/dist/chunk-q132dkwr.js +195 -0
- package/dist/chunk-q16y18s1.js +120 -0
- package/dist/chunk-q25bjaev.js +15 -0
- package/dist/chunk-q3jxs36m.js +716 -0
- package/dist/chunk-q5by3da6.js +8 -0
- package/dist/chunk-q663msp4.js +908 -0
- package/dist/chunk-qezgfppb.js +4521 -0
- package/dist/chunk-qgjgqmy5.js +5796 -0
- package/dist/chunk-qj7h3xc3.js +40 -0
- package/dist/chunk-qjcxkbv6.js +644 -0
- package/dist/chunk-qnfx3qtx.js +617 -0
- package/dist/chunk-qnmyzsam.js +84 -0
- package/dist/chunk-qp2qdcda.js +100 -0
- package/dist/chunk-qvrq1sby.js +6107 -0
- package/dist/chunk-qz2x630m.js +49145 -0
- package/dist/chunk-qz3fe4fj.js +469 -0
- package/dist/chunk-r0af6bw0.js +173 -0
- package/dist/chunk-r1v8d6da.js +1299 -0
- package/dist/chunk-r6b58y3x.js +17 -0
- package/dist/chunk-r6e45bzh.js +118 -0
- package/dist/chunk-r843jezp.js +28 -0
- package/dist/chunk-rbgjkg3v.js +90 -0
- package/dist/chunk-rc5bbzx4.js +655 -0
- package/dist/chunk-rca5xtnd.js +267 -0
- package/dist/chunk-rfdbzyjh.js +1865 -0
- package/dist/chunk-rh7q28df.js +93 -0
- package/dist/chunk-rn0v1hk8.js +34 -0
- package/dist/chunk-rvxs7x7j.js +542 -0
- package/dist/chunk-rw6fwk2s.js +98 -0
- package/dist/chunk-rwagvxh5.js +1711 -0
- package/dist/chunk-s10vyjz4.js +224 -0
- package/dist/chunk-s274nv8k.js +8 -0
- package/dist/chunk-s3pzvdss.js +50 -0
- package/dist/chunk-s4w01jsb.js +969 -0
- package/dist/chunk-s56j2d6g.js +500 -0
- package/dist/chunk-sbs1r0h4.js +317 -0
- package/dist/chunk-sd36yzx8.js +954 -0
- package/dist/chunk-sd6env07.js +19 -0
- package/dist/chunk-sdj9b9wh.js +782 -0
- package/dist/chunk-sfht9xvd.js +24 -0
- package/dist/chunk-sk3gpkdt.js +89 -0
- package/dist/chunk-sp5cjcjh.js +526 -0
- package/dist/chunk-sq847dr5.js +1528 -0
- package/dist/chunk-sskngwam.js +89 -0
- package/dist/chunk-svar8pp2.js +276 -0
- package/dist/chunk-szj5wvdy.js +28 -0
- package/dist/chunk-t175chdd.js +714 -0
- package/dist/chunk-t4k75hqs.js +4987 -0
- package/dist/chunk-t7z7vg91.js +225 -0
- package/dist/chunk-tanfpxm1.js +419 -0
- package/dist/chunk-tf9h0cyj.js +3037 -0
- package/dist/chunk-tm1wwvm1.js +99 -0
- package/dist/chunk-trtgjd28.js +9300 -0
- package/dist/chunk-ts2p6bv1.js +224 -0
- package/dist/chunk-ttk5dzz8.js +25 -0
- package/dist/chunk-tvg352rv.js +391 -0
- package/dist/chunk-tww14j0s.js +86 -0
- package/dist/chunk-tz03j2da.js +66 -0
- package/dist/chunk-v1kzp02e.js +785 -0
- package/dist/chunk-v2sm9w6h.js +220 -0
- package/dist/chunk-v3gm2day.js +8 -0
- package/dist/chunk-v4qn3g0d.js +286 -0
- package/dist/chunk-v66tbnn6.js +476 -0
- package/dist/chunk-v78fj8by.js +145 -0
- package/dist/chunk-v9smspw2.js +4301 -0
- package/dist/chunk-v9ybze94.js +713 -0
- package/dist/chunk-vest0y6x.js +3830 -0
- package/dist/chunk-vf5sd1nq.js +12 -0
- package/dist/chunk-vht4mzgb.js +298 -0
- package/dist/chunk-vjwgf4qh.js +41 -0
- package/dist/chunk-vkrhafhf.js +248 -0
- package/dist/chunk-vn56q87z.js +2058 -0
- package/dist/chunk-vscz82fv.js +27 -0
- package/dist/chunk-vvn4gkak.js +642 -0
- package/dist/chunk-vxj5rbg5.js +84 -0
- package/dist/chunk-vyjeh50y.js +2149 -0
- package/dist/chunk-w44nvpvt.js +22 -0
- package/dist/chunk-waambva2.js +2430 -0
- package/dist/chunk-wbhsqc2a.js +275 -0
- package/dist/chunk-wbsnpxzh.js +471 -0
- package/dist/chunk-wfz0qffj.js +3939 -0
- package/dist/chunk-wpqbrv0f.js +83 -0
- package/dist/chunk-wzpdet3m.js +843 -0
- package/dist/chunk-x6tb96y2.js +264 -0
- package/dist/chunk-x8b7vft8.js +132 -0
- package/dist/chunk-x8eg216f.js +99 -0
- package/dist/chunk-xc9khn0r.js +490 -0
- package/dist/chunk-xch406a3.js +673 -0
- package/dist/chunk-xdw5dv00.js +8 -0
- package/dist/chunk-xe0bpcbr.js +3444 -0
- package/dist/chunk-xm3ed3zn.js +300 -0
- package/dist/chunk-xpm4ebhz.js +87 -0
- package/dist/chunk-xr6yfttj.js +43 -0
- package/dist/chunk-xsq9ae7x.js +90 -0
- package/dist/chunk-xszk7n10.js +14358 -0
- package/dist/chunk-xzmkekfb.js +259 -0
- package/dist/chunk-y1784krc.js +19 -0
- package/dist/chunk-y3py9g5d.js +213 -0
- package/dist/chunk-y9nnmev5.js +687 -0
- package/dist/chunk-ya6jq0hf.js +29 -0
- package/dist/chunk-ycc3xnx0.js +374 -0
- package/dist/chunk-yfa54ssn.js +87 -0
- package/dist/chunk-ymy4xrr8.js +101 -0
- package/dist/chunk-yqfz2k9z.js +48 -0
- package/dist/chunk-ywxd4qw4.js +22 -0
- package/dist/chunk-yxmz5k16.js +122 -0
- package/dist/chunk-yxvy4jt4.js +1014 -0
- package/dist/chunk-z2dp53wn.js +17 -0
- package/dist/chunk-z2xxx2sz.js +294 -0
- package/dist/chunk-z31an09g.js +67 -0
- package/dist/chunk-z95xqvr0.js +75 -0
- package/dist/chunk-zbmxxxz8.js +161 -0
- package/dist/chunk-zk2wsm7d.js +15 -0
- package/dist/chunk-zmg1pcp3.js +71 -0
- package/dist/chunk-znrwmznk.js +272 -0
- package/dist/chunk-zq9r43cb.js +26 -0
- package/dist/chunk-zsfxha74.js +17655 -0
- package/dist/chunk-ztpr96av.js +229 -0
- package/dist/chunk-zv7qrz04.js +58 -0
- package/dist/chunk-zxa7st21.js +32 -0
- package/dist/chunk-zxhezavg.js +216 -0
- package/dist/chunk-zz0qcq2n.js +434 -0
- package/dist/cli.js +194 -0
- package/package.json +164 -0
|
@@ -0,0 +1,691 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
initSinks
|
|
4
|
+
} from "./chunk-j0tqbsh7.js";
|
|
5
|
+
import {
|
|
6
|
+
getRecentActivity,
|
|
7
|
+
init_logoV2Utils
|
|
8
|
+
} from "./chunk-m4bc15mz.js";
|
|
9
|
+
import {
|
|
10
|
+
checkForReleaseNotes,
|
|
11
|
+
init_releaseNotes
|
|
12
|
+
} from "./chunk-t7z7vg91.js";
|
|
13
|
+
import"./chunk-1jrkpnbn.js";
|
|
14
|
+
import {
|
|
15
|
+
DEFAULT_SESSION_MEMORY_CONFIG,
|
|
16
|
+
FILE_EDIT_TOOL_NAME,
|
|
17
|
+
FileReadTool,
|
|
18
|
+
asSessionId,
|
|
19
|
+
buildSessionMemoryUpdatePrompt,
|
|
20
|
+
captureHooksConfigSnapshot,
|
|
21
|
+
clearMemoryFileCaches,
|
|
22
|
+
createCacheSafeParams,
|
|
23
|
+
createSubagentContext,
|
|
24
|
+
createTmuxSessionForWorktree,
|
|
25
|
+
createUserMessage,
|
|
26
|
+
createWorktreeForSession,
|
|
27
|
+
generateTmuxSessionName,
|
|
28
|
+
getCommands,
|
|
29
|
+
getPlanSlug,
|
|
30
|
+
getSessionMemoryConfig,
|
|
31
|
+
getSessionMemoryDir,
|
|
32
|
+
getSessionMemoryPath,
|
|
33
|
+
getTokenUsage,
|
|
34
|
+
getToolCallsBetweenUpdates,
|
|
35
|
+
hasMetInitializationThreshold,
|
|
36
|
+
hasMetUpdateThreshold,
|
|
37
|
+
hasToolCallsInLastAssistantTurn,
|
|
38
|
+
hasWorktreeCreateHook,
|
|
39
|
+
init_FileReadTool,
|
|
40
|
+
init_Shell,
|
|
41
|
+
init_autoCompact,
|
|
42
|
+
init_claudemd,
|
|
43
|
+
init_commands1 as init_commands,
|
|
44
|
+
init_constants,
|
|
45
|
+
init_context,
|
|
46
|
+
init_fileChangedWatcher,
|
|
47
|
+
init_filesystem,
|
|
48
|
+
init_forkedAgent,
|
|
49
|
+
init_hooks1 as init_hooks,
|
|
50
|
+
init_hooksConfigSnapshot,
|
|
51
|
+
init_ids,
|
|
52
|
+
init_messages1 as init_messages,
|
|
53
|
+
init_nativeInstaller,
|
|
54
|
+
init_plans,
|
|
55
|
+
init_postSamplingHooks,
|
|
56
|
+
init_prompts,
|
|
57
|
+
init_prompts1 as init_prompts2,
|
|
58
|
+
init_sessionMemoryUtils,
|
|
59
|
+
init_sessionStorage,
|
|
60
|
+
init_systemPromptType,
|
|
61
|
+
init_tokens,
|
|
62
|
+
init_worktree,
|
|
63
|
+
initializeFileChangedWatcher,
|
|
64
|
+
isAutoCompactEnabled,
|
|
65
|
+
isSessionMemoryInitialized,
|
|
66
|
+
loadSessionMemoryTemplate,
|
|
67
|
+
lockCurrentVersion,
|
|
68
|
+
markExtractionCompleted,
|
|
69
|
+
markExtractionStarted,
|
|
70
|
+
markSessionMemoryInitialized,
|
|
71
|
+
recordExtractionTokenCount,
|
|
72
|
+
registerPostSamplingHook,
|
|
73
|
+
runForkedAgent,
|
|
74
|
+
saveWorktreeState,
|
|
75
|
+
setCwd,
|
|
76
|
+
setLastSummarizedMessageId,
|
|
77
|
+
setSessionMemoryConfig,
|
|
78
|
+
tokenCountWithEstimation,
|
|
79
|
+
updateHooksConfigSnapshot,
|
|
80
|
+
worktreeBranchName
|
|
81
|
+
} from "./chunk-2y54j9ew.js";
|
|
82
|
+
import"./chunk-1yzc16qa.js";
|
|
83
|
+
import"./chunk-s10vyjz4.js";
|
|
84
|
+
import"./chunk-1k4j1xcf.js";
|
|
85
|
+
import"./chunk-3c4qja3e.js";
|
|
86
|
+
import"./chunk-rc5bbzx4.js";
|
|
87
|
+
import"./chunk-e6rrwzv0.js";
|
|
88
|
+
import"./chunk-2gzv8nrw.js";
|
|
89
|
+
import"./chunk-743znc5c.js";
|
|
90
|
+
import"./chunk-5p2ssw3d.js";
|
|
91
|
+
import"./chunk-cgfdkzhb.js";
|
|
92
|
+
import"./chunk-bhdt6k7w.js";
|
|
93
|
+
import"./chunk-6wkdqk81.js";
|
|
94
|
+
import"./chunk-5dbk24zg.js";
|
|
95
|
+
import"./chunk-bda3gxxz.js";
|
|
96
|
+
import"./chunk-zxhezavg.js";
|
|
97
|
+
import"./chunk-x8eg216f.js";
|
|
98
|
+
import"./chunk-9gbamk79.js";
|
|
99
|
+
import {
|
|
100
|
+
checkAndRestoreTerminalBackup,
|
|
101
|
+
init_appleTerminalBackup
|
|
102
|
+
} from "./chunk-t175chdd.js";
|
|
103
|
+
import"./chunk-7rjyn5d3.js";
|
|
104
|
+
import"./chunk-6q2x8zeg.js";
|
|
105
|
+
import"./chunk-0yb4dz9c.js";
|
|
106
|
+
import"./chunk-7m2nd8da.js";
|
|
107
|
+
import"./chunk-ps49ymvj.js";
|
|
108
|
+
import"./chunk-g338npwr.js";
|
|
109
|
+
import"./chunk-zk2wsm7d.js";
|
|
110
|
+
import"./chunk-eh474zhj.js";
|
|
111
|
+
import"./chunk-ga5faygf.js";
|
|
112
|
+
import"./chunk-e7c8ypwc.js";
|
|
113
|
+
import"./chunk-g6qddbvf.js";
|
|
114
|
+
import"./chunk-b1s11z4y.js";
|
|
115
|
+
import"./chunk-4jm600zv.js";
|
|
116
|
+
import"./chunk-yxmz5k16.js";
|
|
117
|
+
import"./chunk-v9smspw2.js";
|
|
118
|
+
import"./chunk-qz2x630m.js";
|
|
119
|
+
import {
|
|
120
|
+
envDynamic,
|
|
121
|
+
getCurrentProjectConfig,
|
|
122
|
+
getDynamicConfig_CACHED_MAY_BE_STALE,
|
|
123
|
+
getFeatureValue_CACHED_MAY_BE_STALE,
|
|
124
|
+
getGlobalConfig,
|
|
125
|
+
init_agentSwarmsEnabled,
|
|
126
|
+
init_auth,
|
|
127
|
+
init_config1 as init_config,
|
|
128
|
+
init_envDynamic,
|
|
129
|
+
init_growthbook,
|
|
130
|
+
init_sequential,
|
|
131
|
+
init_source,
|
|
132
|
+
isAgentSwarmsEnabled,
|
|
133
|
+
prefetchApiKeyFromApiKeyHelperIfSafe,
|
|
134
|
+
saveGlobalConfig,
|
|
135
|
+
sequential,
|
|
136
|
+
source_default
|
|
137
|
+
} from "./chunk-30chpfyc.js";
|
|
138
|
+
import"./chunk-84k64e4a.js";
|
|
139
|
+
import"./chunk-y3py9g5d.js";
|
|
140
|
+
import"./chunk-7pemewz2.js";
|
|
141
|
+
import {
|
|
142
|
+
count,
|
|
143
|
+
init_array
|
|
144
|
+
} from "./chunk-s4w01jsb.js";
|
|
145
|
+
import"./chunk-c8vn3ynx.js";
|
|
146
|
+
import"./chunk-g0j0t6qk.js";
|
|
147
|
+
import"./chunk-6kpbgc5w.js";
|
|
148
|
+
import"./chunk-3c25bcsw.js";
|
|
149
|
+
import"./chunk-mzdtkccs.js";
|
|
150
|
+
import"./chunk-55wgxwa9.js";
|
|
151
|
+
import {
|
|
152
|
+
env,
|
|
153
|
+
init_env
|
|
154
|
+
} from "./chunk-5k2gdxnr.js";
|
|
155
|
+
import"./chunk-2qhs9n36.js";
|
|
156
|
+
import"./chunk-f5ma3nh5.js";
|
|
157
|
+
import"./chunk-v1kzp02e.js";
|
|
158
|
+
import"./chunk-p2816w9z.js";
|
|
159
|
+
import"./chunk-0vkfrmqm.js";
|
|
160
|
+
import"./chunk-0xjaqda8.js";
|
|
161
|
+
import {
|
|
162
|
+
init_startupProfiler,
|
|
163
|
+
profileCheckpoint
|
|
164
|
+
} from "./chunk-mr9df5v8.js";
|
|
165
|
+
import"./chunk-cdz5yb0r.js";
|
|
166
|
+
import {
|
|
167
|
+
init_analytics,
|
|
168
|
+
logEvent
|
|
169
|
+
} from "./chunk-f2mhrmww.js";
|
|
170
|
+
import"./chunk-10fdxge0.js";
|
|
171
|
+
import {
|
|
172
|
+
findCanonicalGitRoot,
|
|
173
|
+
findGitRoot,
|
|
174
|
+
getIsGit,
|
|
175
|
+
init_diagLogs,
|
|
176
|
+
init_git,
|
|
177
|
+
logForDiagnosticsNoPII
|
|
178
|
+
} from "./chunk-r1v8d6da.js";
|
|
179
|
+
import"./chunk-d3v2fbay.js";
|
|
180
|
+
import"./chunk-qnfx3qtx.js";
|
|
181
|
+
import"./chunk-f2zhqnb6.js";
|
|
182
|
+
import"./chunk-cvp5vayb.js";
|
|
183
|
+
import"./chunk-b5b7h81y.js";
|
|
184
|
+
import {
|
|
185
|
+
init_log,
|
|
186
|
+
logError
|
|
187
|
+
} from "./chunk-nm2cncrq.js";
|
|
188
|
+
import"./chunk-8tnsngw2.js";
|
|
189
|
+
import {
|
|
190
|
+
getCwd,
|
|
191
|
+
init_cwd
|
|
192
|
+
} from "./chunk-0rkbrabt.js";
|
|
193
|
+
import"./chunk-7wm5s02e.js";
|
|
194
|
+
import {
|
|
195
|
+
errorMessage,
|
|
196
|
+
getErrnoCode,
|
|
197
|
+
getFsImplementation,
|
|
198
|
+
init_errors,
|
|
199
|
+
init_fsOperations
|
|
200
|
+
} from "./chunk-rwagvxh5.js";
|
|
201
|
+
import"./chunk-fbv4apne.js";
|
|
202
|
+
import {
|
|
203
|
+
init_envUtils,
|
|
204
|
+
isBareMode,
|
|
205
|
+
isEnvTruthy
|
|
206
|
+
} from "./chunk-0fkqze0v.js";
|
|
207
|
+
import {
|
|
208
|
+
getIsNonInteractiveSession,
|
|
209
|
+
getIsRemoteMode,
|
|
210
|
+
getProjectRoot,
|
|
211
|
+
getSessionId,
|
|
212
|
+
init_state,
|
|
213
|
+
setOriginalCwd,
|
|
214
|
+
setProjectRoot,
|
|
215
|
+
switchSession
|
|
216
|
+
} from "./chunk-2zcaw1jd.js";
|
|
217
|
+
import {
|
|
218
|
+
init_memoize,
|
|
219
|
+
memoize_default
|
|
220
|
+
} from "./chunk-hqmz36b3.js";
|
|
221
|
+
import"./chunk-4g3v8y12.js";
|
|
222
|
+
import"./chunk-7739pg2c.js";
|
|
223
|
+
import"./chunk-xszk7n10.js";
|
|
224
|
+
import"./chunk-sdj9b9wh.js";
|
|
225
|
+
import {
|
|
226
|
+
__require
|
|
227
|
+
} from "./chunk-qp2qdcda.js";
|
|
228
|
+
|
|
229
|
+
// src/setup.ts
|
|
230
|
+
init_source();
|
|
231
|
+
init_analytics();
|
|
232
|
+
init_cwd();
|
|
233
|
+
init_releaseNotes();
|
|
234
|
+
init_Shell();
|
|
235
|
+
init_state();
|
|
236
|
+
init_commands();
|
|
237
|
+
|
|
238
|
+
// src/services/SessionMemory/sessionMemory.ts
|
|
239
|
+
init_memoize();
|
|
240
|
+
init_state();
|
|
241
|
+
init_prompts2();
|
|
242
|
+
init_context();
|
|
243
|
+
init_constants();
|
|
244
|
+
init_FileReadTool();
|
|
245
|
+
init_array();
|
|
246
|
+
init_forkedAgent();
|
|
247
|
+
init_fsOperations();
|
|
248
|
+
init_postSamplingHooks();
|
|
249
|
+
init_messages();
|
|
250
|
+
init_filesystem();
|
|
251
|
+
init_sequential();
|
|
252
|
+
init_systemPromptType();
|
|
253
|
+
init_tokens();
|
|
254
|
+
init_analytics();
|
|
255
|
+
init_autoCompact();
|
|
256
|
+
init_prompts();
|
|
257
|
+
init_sessionMemoryUtils();
|
|
258
|
+
init_errors();
|
|
259
|
+
init_growthbook();
|
|
260
|
+
import { writeFile } from "fs/promises";
|
|
261
|
+
function isSessionMemoryGateEnabled() {
|
|
262
|
+
return getFeatureValue_CACHED_MAY_BE_STALE("tengu_session_memory", false);
|
|
263
|
+
}
|
|
264
|
+
function getSessionMemoryRemoteConfig() {
|
|
265
|
+
return getDynamicConfig_CACHED_MAY_BE_STALE("tengu_sm_config", {});
|
|
266
|
+
}
|
|
267
|
+
var lastMemoryMessageUuid;
|
|
268
|
+
function countToolCallsSince(messages, sinceUuid) {
|
|
269
|
+
let toolCallCount = 0;
|
|
270
|
+
let foundStart = sinceUuid === null || sinceUuid === undefined;
|
|
271
|
+
for (const message of messages) {
|
|
272
|
+
if (!foundStart) {
|
|
273
|
+
if (message.uuid === sinceUuid) {
|
|
274
|
+
foundStart = true;
|
|
275
|
+
}
|
|
276
|
+
continue;
|
|
277
|
+
}
|
|
278
|
+
if (message.type === "assistant") {
|
|
279
|
+
const content = message.message.content;
|
|
280
|
+
if (Array.isArray(content)) {
|
|
281
|
+
toolCallCount += count(content, (block) => block.type === "tool_use");
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
return toolCallCount;
|
|
286
|
+
}
|
|
287
|
+
function shouldExtractMemory(messages) {
|
|
288
|
+
const currentTokenCount = tokenCountWithEstimation(messages);
|
|
289
|
+
if (!isSessionMemoryInitialized()) {
|
|
290
|
+
if (!hasMetInitializationThreshold(currentTokenCount)) {
|
|
291
|
+
return false;
|
|
292
|
+
}
|
|
293
|
+
markSessionMemoryInitialized();
|
|
294
|
+
}
|
|
295
|
+
const hasMetTokenThreshold = hasMetUpdateThreshold(currentTokenCount);
|
|
296
|
+
const toolCallsSinceLastUpdate = countToolCallsSince(messages, lastMemoryMessageUuid);
|
|
297
|
+
const hasMetToolCallThreshold = toolCallsSinceLastUpdate >= getToolCallsBetweenUpdates();
|
|
298
|
+
const hasToolCallsInLastTurn = hasToolCallsInLastAssistantTurn(messages);
|
|
299
|
+
const shouldExtract = hasMetTokenThreshold && hasMetToolCallThreshold || hasMetTokenThreshold && !hasToolCallsInLastTurn;
|
|
300
|
+
if (shouldExtract) {
|
|
301
|
+
const lastMessage = messages[messages.length - 1];
|
|
302
|
+
if (lastMessage?.uuid) {
|
|
303
|
+
lastMemoryMessageUuid = lastMessage.uuid;
|
|
304
|
+
}
|
|
305
|
+
return true;
|
|
306
|
+
}
|
|
307
|
+
return false;
|
|
308
|
+
}
|
|
309
|
+
async function setupSessionMemoryFile(toolUseContext) {
|
|
310
|
+
const fs = getFsImplementation();
|
|
311
|
+
const sessionMemoryDir = getSessionMemoryDir();
|
|
312
|
+
await fs.mkdir(sessionMemoryDir, { mode: 448 });
|
|
313
|
+
const memoryPath = getSessionMemoryPath();
|
|
314
|
+
try {
|
|
315
|
+
await writeFile(memoryPath, "", {
|
|
316
|
+
encoding: "utf-8",
|
|
317
|
+
mode: 384,
|
|
318
|
+
flag: "wx"
|
|
319
|
+
});
|
|
320
|
+
const template = await loadSessionMemoryTemplate();
|
|
321
|
+
await writeFile(memoryPath, template, {
|
|
322
|
+
encoding: "utf-8",
|
|
323
|
+
mode: 384
|
|
324
|
+
});
|
|
325
|
+
} catch (e) {
|
|
326
|
+
const code = getErrnoCode(e);
|
|
327
|
+
if (code !== "EEXIST") {
|
|
328
|
+
throw e;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
toolUseContext.readFileState.delete(memoryPath);
|
|
332
|
+
const result = await FileReadTool.call({ file_path: memoryPath }, toolUseContext);
|
|
333
|
+
let currentMemory = "";
|
|
334
|
+
const output = result.data;
|
|
335
|
+
if (output.type === "text") {
|
|
336
|
+
currentMemory = output.file.content;
|
|
337
|
+
}
|
|
338
|
+
logEvent("tengu_session_memory_file_read", {
|
|
339
|
+
content_length: currentMemory.length
|
|
340
|
+
});
|
|
341
|
+
return { memoryPath, currentMemory };
|
|
342
|
+
}
|
|
343
|
+
var initSessionMemoryConfigIfNeeded = memoize_default(() => {
|
|
344
|
+
const remoteConfig = getSessionMemoryRemoteConfig();
|
|
345
|
+
const config = {
|
|
346
|
+
minimumMessageTokensToInit: remoteConfig.minimumMessageTokensToInit && remoteConfig.minimumMessageTokensToInit > 0 ? remoteConfig.minimumMessageTokensToInit : DEFAULT_SESSION_MEMORY_CONFIG.minimumMessageTokensToInit,
|
|
347
|
+
minimumTokensBetweenUpdate: remoteConfig.minimumTokensBetweenUpdate && remoteConfig.minimumTokensBetweenUpdate > 0 ? remoteConfig.minimumTokensBetweenUpdate : DEFAULT_SESSION_MEMORY_CONFIG.minimumTokensBetweenUpdate,
|
|
348
|
+
toolCallsBetweenUpdates: remoteConfig.toolCallsBetweenUpdates && remoteConfig.toolCallsBetweenUpdates > 0 ? remoteConfig.toolCallsBetweenUpdates : DEFAULT_SESSION_MEMORY_CONFIG.toolCallsBetweenUpdates
|
|
349
|
+
};
|
|
350
|
+
setSessionMemoryConfig(config);
|
|
351
|
+
});
|
|
352
|
+
var hasLoggedGateFailure = false;
|
|
353
|
+
var extractSessionMemory = sequential(async function(context) {
|
|
354
|
+
const { messages, toolUseContext, querySource } = context;
|
|
355
|
+
if (querySource !== "repl_main_thread") {
|
|
356
|
+
return;
|
|
357
|
+
}
|
|
358
|
+
if (!isSessionMemoryGateEnabled()) {
|
|
359
|
+
if (process.env.USER_TYPE === "ant" && !hasLoggedGateFailure) {
|
|
360
|
+
hasLoggedGateFailure = true;
|
|
361
|
+
logEvent("tengu_session_memory_gate_disabled", {});
|
|
362
|
+
}
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
initSessionMemoryConfigIfNeeded();
|
|
366
|
+
if (!shouldExtractMemory(messages)) {
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
369
|
+
markExtractionStarted();
|
|
370
|
+
const setupContext = createSubagentContext(toolUseContext);
|
|
371
|
+
const { memoryPath, currentMemory } = await setupSessionMemoryFile(setupContext);
|
|
372
|
+
const userPrompt = await buildSessionMemoryUpdatePrompt(currentMemory, memoryPath);
|
|
373
|
+
await runForkedAgent({
|
|
374
|
+
promptMessages: [createUserMessage({ content: userPrompt })],
|
|
375
|
+
cacheSafeParams: createCacheSafeParams(context),
|
|
376
|
+
canUseTool: createMemoryFileCanUseTool(memoryPath),
|
|
377
|
+
querySource: "session_memory",
|
|
378
|
+
forkLabel: "session_memory",
|
|
379
|
+
overrides: { readFileState: setupContext.readFileState }
|
|
380
|
+
});
|
|
381
|
+
const lastMessage = messages[messages.length - 1];
|
|
382
|
+
const usage = lastMessage ? getTokenUsage(lastMessage) : undefined;
|
|
383
|
+
const config = getSessionMemoryConfig();
|
|
384
|
+
logEvent("tengu_session_memory_extraction", {
|
|
385
|
+
input_tokens: usage?.input_tokens,
|
|
386
|
+
output_tokens: usage?.output_tokens,
|
|
387
|
+
cache_read_input_tokens: usage?.cache_read_input_tokens ?? undefined,
|
|
388
|
+
cache_creation_input_tokens: usage?.cache_creation_input_tokens ?? undefined,
|
|
389
|
+
config_min_message_tokens_to_init: config.minimumMessageTokensToInit,
|
|
390
|
+
config_min_tokens_between_update: config.minimumTokensBetweenUpdate,
|
|
391
|
+
config_tool_calls_between_updates: config.toolCallsBetweenUpdates
|
|
392
|
+
});
|
|
393
|
+
recordExtractionTokenCount(tokenCountWithEstimation(messages));
|
|
394
|
+
updateLastSummarizedMessageIdIfSafe(messages);
|
|
395
|
+
markExtractionCompleted();
|
|
396
|
+
});
|
|
397
|
+
function initSessionMemory() {
|
|
398
|
+
if (getIsRemoteMode())
|
|
399
|
+
return;
|
|
400
|
+
const autoCompactEnabled = isAutoCompactEnabled();
|
|
401
|
+
if (process.env.USER_TYPE === "ant") {
|
|
402
|
+
logEvent("tengu_session_memory_init", {
|
|
403
|
+
auto_compact_enabled: autoCompactEnabled
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
if (!autoCompactEnabled) {
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
409
|
+
registerPostSamplingHook(extractSessionMemory);
|
|
410
|
+
}
|
|
411
|
+
function createMemoryFileCanUseTool(memoryPath) {
|
|
412
|
+
return async (tool, input) => {
|
|
413
|
+
if (tool.name === FILE_EDIT_TOOL_NAME && typeof input === "object" && input !== null && "file_path" in input) {
|
|
414
|
+
const filePath = input.file_path;
|
|
415
|
+
if (typeof filePath === "string" && filePath === memoryPath) {
|
|
416
|
+
return { behavior: "allow", updatedInput: input };
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
return {
|
|
420
|
+
behavior: "deny",
|
|
421
|
+
message: `only ${FILE_EDIT_TOOL_NAME} on ${memoryPath} is allowed`,
|
|
422
|
+
decisionReason: {
|
|
423
|
+
type: "other",
|
|
424
|
+
reason: `only ${FILE_EDIT_TOOL_NAME} on ${memoryPath} is allowed`
|
|
425
|
+
}
|
|
426
|
+
};
|
|
427
|
+
};
|
|
428
|
+
}
|
|
429
|
+
function updateLastSummarizedMessageIdIfSafe(messages) {
|
|
430
|
+
if (!hasToolCallsInLastAssistantTurn(messages)) {
|
|
431
|
+
const lastMessage = messages[messages.length - 1];
|
|
432
|
+
if (lastMessage?.uuid) {
|
|
433
|
+
setLastSummarizedMessageId(lastMessage.uuid);
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
// src/setup.ts
|
|
439
|
+
init_ids();
|
|
440
|
+
init_agentSwarmsEnabled();
|
|
441
|
+
init_appleTerminalBackup();
|
|
442
|
+
init_auth();
|
|
443
|
+
init_claudemd();
|
|
444
|
+
init_config();
|
|
445
|
+
init_diagLogs();
|
|
446
|
+
init_env();
|
|
447
|
+
init_envDynamic();
|
|
448
|
+
init_envUtils();
|
|
449
|
+
init_errors();
|
|
450
|
+
init_git();
|
|
451
|
+
init_fileChangedWatcher();
|
|
452
|
+
init_hooksConfigSnapshot();
|
|
453
|
+
init_hooks();
|
|
454
|
+
|
|
455
|
+
// src/utils/iTermBackup.ts
|
|
456
|
+
init_config();
|
|
457
|
+
init_log();
|
|
458
|
+
import { copyFile, stat } from "fs/promises";
|
|
459
|
+
import { homedir } from "os";
|
|
460
|
+
import { join } from "path";
|
|
461
|
+
function markITerm2SetupComplete() {
|
|
462
|
+
saveGlobalConfig((current) => ({
|
|
463
|
+
...current,
|
|
464
|
+
iterm2SetupInProgress: false
|
|
465
|
+
}));
|
|
466
|
+
}
|
|
467
|
+
function getIterm2RecoveryInfo() {
|
|
468
|
+
const config = getGlobalConfig();
|
|
469
|
+
return {
|
|
470
|
+
inProgress: config.iterm2SetupInProgress ?? false,
|
|
471
|
+
backupPath: config.iterm2BackupPath || null
|
|
472
|
+
};
|
|
473
|
+
}
|
|
474
|
+
function getITerm2PlistPath() {
|
|
475
|
+
return join(homedir(), "Library", "Preferences", "com.googlecode.iterm2.plist");
|
|
476
|
+
}
|
|
477
|
+
async function checkAndRestoreITerm2Backup() {
|
|
478
|
+
const { inProgress, backupPath } = getIterm2RecoveryInfo();
|
|
479
|
+
if (!inProgress) {
|
|
480
|
+
return { status: "no_backup" };
|
|
481
|
+
}
|
|
482
|
+
if (!backupPath) {
|
|
483
|
+
markITerm2SetupComplete();
|
|
484
|
+
return { status: "no_backup" };
|
|
485
|
+
}
|
|
486
|
+
try {
|
|
487
|
+
await stat(backupPath);
|
|
488
|
+
} catch {
|
|
489
|
+
markITerm2SetupComplete();
|
|
490
|
+
return { status: "no_backup" };
|
|
491
|
+
}
|
|
492
|
+
try {
|
|
493
|
+
await copyFile(backupPath, getITerm2PlistPath());
|
|
494
|
+
markITerm2SetupComplete();
|
|
495
|
+
return { status: "restored" };
|
|
496
|
+
} catch (restoreError) {
|
|
497
|
+
logError(new Error(`Failed to restore iTerm2 settings with: ${restoreError}`));
|
|
498
|
+
markITerm2SetupComplete();
|
|
499
|
+
return { status: "failed", backupPath };
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
// src/setup.ts
|
|
504
|
+
init_log();
|
|
505
|
+
init_logoV2Utils();
|
|
506
|
+
init_nativeInstaller();
|
|
507
|
+
init_plans();
|
|
508
|
+
init_sessionStorage();
|
|
509
|
+
init_startupProfiler();
|
|
510
|
+
init_worktree();
|
|
511
|
+
async function setup(cwd, permissionMode, allowDangerouslySkipPermissions, worktreeEnabled, worktreeName, tmuxEnabled, customSessionId, worktreePRNumber, messagingSocketPath) {
|
|
512
|
+
logForDiagnosticsNoPII("info", "setup_started");
|
|
513
|
+
const nodeVersion = process.version.match(/^v(\d+)\./)?.[1];
|
|
514
|
+
if (!nodeVersion || parseInt(nodeVersion, 10) < 18) {
|
|
515
|
+
console.error(source_default.bold.red("Error: Open CC requires Node.js version 18 or higher."));
|
|
516
|
+
process.exit(1);
|
|
517
|
+
}
|
|
518
|
+
if (customSessionId) {
|
|
519
|
+
switchSession(asSessionId(customSessionId));
|
|
520
|
+
}
|
|
521
|
+
if (!isBareMode() || messagingSocketPath !== undefined) {
|
|
522
|
+
if (false) {}
|
|
523
|
+
}
|
|
524
|
+
if (!isBareMode() && isAgentSwarmsEnabled()) {
|
|
525
|
+
const { captureTeammateModeSnapshot } = await import("./chunk-dndehvfr.js");
|
|
526
|
+
captureTeammateModeSnapshot();
|
|
527
|
+
}
|
|
528
|
+
if (!getIsNonInteractiveSession()) {
|
|
529
|
+
if (isAgentSwarmsEnabled()) {
|
|
530
|
+
const restoredIterm2Backup = await checkAndRestoreITerm2Backup();
|
|
531
|
+
if (restoredIterm2Backup.status === "restored") {
|
|
532
|
+
console.log(source_default.yellow("Detected an interrupted iTerm2 setup. Your original settings have been restored. You may need to restart iTerm2 for the changes to take effect."));
|
|
533
|
+
} else if (restoredIterm2Backup.status === "failed") {
|
|
534
|
+
console.error(source_default.red(`Failed to restore iTerm2 settings. Please manually restore your original settings with: defaults import com.googlecode.iterm2 ${restoredIterm2Backup.backupPath}.`));
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
try {
|
|
538
|
+
const restoredTerminalBackup = await checkAndRestoreTerminalBackup();
|
|
539
|
+
if (restoredTerminalBackup.status === "restored") {
|
|
540
|
+
console.log(source_default.yellow("Detected an interrupted Terminal.app setup. Your original settings have been restored. You may need to restart Terminal.app for the changes to take effect."));
|
|
541
|
+
} else if (restoredTerminalBackup.status === "failed") {
|
|
542
|
+
console.error(source_default.red(`Failed to restore Terminal.app settings. Please manually restore your original settings with: defaults import com.apple.Terminal ${restoredTerminalBackup.backupPath}.`));
|
|
543
|
+
}
|
|
544
|
+
} catch (error) {
|
|
545
|
+
logError(error);
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
setCwd(cwd);
|
|
549
|
+
const hooksStart = Date.now();
|
|
550
|
+
captureHooksConfigSnapshot();
|
|
551
|
+
logForDiagnosticsNoPII("info", "setup_hooks_captured", {
|
|
552
|
+
duration_ms: Date.now() - hooksStart
|
|
553
|
+
});
|
|
554
|
+
initializeFileChangedWatcher(cwd);
|
|
555
|
+
if (worktreeEnabled) {
|
|
556
|
+
const hasHook = hasWorktreeCreateHook();
|
|
557
|
+
const inGit = await getIsGit();
|
|
558
|
+
if (!hasHook && !inGit) {
|
|
559
|
+
process.stderr.write(source_default.red(`Error: Can only use --worktree in a git repository, but ${source_default.bold(cwd)} is not a git repository. Configure a WorktreeCreate hook in settings.json to use --worktree with other VCS systems.
|
|
560
|
+
`));
|
|
561
|
+
process.exit(1);
|
|
562
|
+
}
|
|
563
|
+
const slug = worktreePRNumber ? `pr-${worktreePRNumber}` : worktreeName ?? getPlanSlug();
|
|
564
|
+
let tmuxSessionName;
|
|
565
|
+
if (inGit) {
|
|
566
|
+
const mainRepoRoot = findCanonicalGitRoot(getCwd());
|
|
567
|
+
if (!mainRepoRoot) {
|
|
568
|
+
process.stderr.write(source_default.red(`Error: Could not determine the main git repository root.
|
|
569
|
+
`));
|
|
570
|
+
process.exit(1);
|
|
571
|
+
}
|
|
572
|
+
if (mainRepoRoot !== (findGitRoot(getCwd()) ?? getCwd())) {
|
|
573
|
+
logForDiagnosticsNoPII("info", "worktree_resolved_to_main_repo");
|
|
574
|
+
process.chdir(mainRepoRoot);
|
|
575
|
+
setCwd(mainRepoRoot);
|
|
576
|
+
}
|
|
577
|
+
tmuxSessionName = tmuxEnabled ? generateTmuxSessionName(mainRepoRoot, worktreeBranchName(slug)) : undefined;
|
|
578
|
+
} else {
|
|
579
|
+
tmuxSessionName = tmuxEnabled ? generateTmuxSessionName(getCwd(), worktreeBranchName(slug)) : undefined;
|
|
580
|
+
}
|
|
581
|
+
let worktreeSession;
|
|
582
|
+
try {
|
|
583
|
+
worktreeSession = await createWorktreeForSession(getSessionId(), slug, tmuxSessionName, worktreePRNumber ? { prNumber: worktreePRNumber } : undefined);
|
|
584
|
+
} catch (error) {
|
|
585
|
+
process.stderr.write(source_default.red(`Error creating worktree: ${errorMessage(error)}
|
|
586
|
+
`));
|
|
587
|
+
process.exit(1);
|
|
588
|
+
}
|
|
589
|
+
logEvent("tengu_worktree_created", { tmux_enabled: tmuxEnabled });
|
|
590
|
+
if (tmuxEnabled && tmuxSessionName) {
|
|
591
|
+
const tmuxResult = await createTmuxSessionForWorktree(tmuxSessionName, worktreeSession.worktreePath);
|
|
592
|
+
if (tmuxResult.created) {
|
|
593
|
+
console.log(source_default.green(`Created tmux session: ${source_default.bold(tmuxSessionName)}
|
|
594
|
+
To attach: ${source_default.bold(`tmux attach -t ${tmuxSessionName}`)}`));
|
|
595
|
+
} else {
|
|
596
|
+
console.error(source_default.yellow(`Warning: Failed to create tmux session: ${tmuxResult.error}`));
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
process.chdir(worktreeSession.worktreePath);
|
|
600
|
+
setCwd(worktreeSession.worktreePath);
|
|
601
|
+
setOriginalCwd(getCwd());
|
|
602
|
+
setProjectRoot(getCwd());
|
|
603
|
+
saveWorktreeState(worktreeSession);
|
|
604
|
+
clearMemoryFileCaches();
|
|
605
|
+
updateHooksConfigSnapshot();
|
|
606
|
+
}
|
|
607
|
+
logForDiagnosticsNoPII("info", "setup_background_jobs_starting");
|
|
608
|
+
if (!isBareMode()) {
|
|
609
|
+
initSessionMemory();
|
|
610
|
+
if (false) {}
|
|
611
|
+
}
|
|
612
|
+
lockCurrentVersion();
|
|
613
|
+
logForDiagnosticsNoPII("info", "setup_background_jobs_launched");
|
|
614
|
+
profileCheckpoint("setup_before_prefetch");
|
|
615
|
+
logForDiagnosticsNoPII("info", "setup_prefetch_starting");
|
|
616
|
+
const skipPluginPrefetch = getIsNonInteractiveSession() && isEnvTruthy(process.env.CLAUDE_CODE_SYNC_PLUGIN_INSTALL) || isBareMode();
|
|
617
|
+
if (!skipPluginPrefetch) {
|
|
618
|
+
getCommands(getProjectRoot());
|
|
619
|
+
}
|
|
620
|
+
import("./chunk-0scs4rpx.js").then((m) => {
|
|
621
|
+
if (!skipPluginPrefetch) {
|
|
622
|
+
m.loadPluginHooks();
|
|
623
|
+
m.setupPluginHookHotReload();
|
|
624
|
+
}
|
|
625
|
+
});
|
|
626
|
+
if (!isBareMode()) {
|
|
627
|
+
if (process.env.USER_TYPE === "ant") {
|
|
628
|
+
import("./chunk-5gzg4q1k.js").then(async (m) => {
|
|
629
|
+
if (await m.isInternalModelRepo()) {
|
|
630
|
+
const { clearSystemPromptSections } = await import("./chunk-sd6env07.js");
|
|
631
|
+
clearSystemPromptSections();
|
|
632
|
+
}
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
if (false) {}
|
|
636
|
+
import("./chunk-dnwzz9f7.js").then((m) => m.registerSessionFileAccessHooks());
|
|
637
|
+
if (false) {}
|
|
638
|
+
}
|
|
639
|
+
initSinks();
|
|
640
|
+
logEvent("tengu_started", {});
|
|
641
|
+
prefetchApiKeyFromApiKeyHelperIfSafe(getIsNonInteractiveSession());
|
|
642
|
+
profileCheckpoint("setup_after_prefetch");
|
|
643
|
+
if (!isBareMode()) {
|
|
644
|
+
const { hasReleaseNotes } = await checkForReleaseNotes(getGlobalConfig().lastReleaseNotesSeen);
|
|
645
|
+
if (hasReleaseNotes) {
|
|
646
|
+
await getRecentActivity();
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
if (permissionMode === "bypassPermissions" || allowDangerouslySkipPermissions) {
|
|
650
|
+
if (process.platform !== "win32" && typeof process.getuid === "function" && process.getuid() === 0 && process.env.IS_SANDBOX !== "1" && !isEnvTruthy(process.env.CLAUDE_CODE_BUBBLEWRAP)) {
|
|
651
|
+
console.error(`--dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons`);
|
|
652
|
+
process.exit(1);
|
|
653
|
+
}
|
|
654
|
+
if (process.env.USER_TYPE === "ant" && process.env.CLAUDE_CODE_ENTRYPOINT !== "local-agent" && process.env.CLAUDE_CODE_ENTRYPOINT !== "claude-desktop") {
|
|
655
|
+
const [isDocker, hasInternet] = await Promise.all([
|
|
656
|
+
envDynamic.getIsDocker(),
|
|
657
|
+
env.hasInternetAccess()
|
|
658
|
+
]);
|
|
659
|
+
const isBubblewrap = envDynamic.getIsBubblewrapSandbox();
|
|
660
|
+
const isSandbox = process.env.IS_SANDBOX === "1";
|
|
661
|
+
const isSandboxed = isDocker || isBubblewrap || isSandbox;
|
|
662
|
+
if (!isSandboxed || hasInternet) {
|
|
663
|
+
console.error(`--dangerously-skip-permissions can only be used in Docker/sandbox containers with no internet access but got Docker: ${isDocker}, Bubblewrap: ${isBubblewrap}, IS_SANDBOX: ${isSandbox}, hasInternet: ${hasInternet}`);
|
|
664
|
+
process.exit(1);
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
if (false) {}
|
|
669
|
+
const projectConfig = getCurrentProjectConfig();
|
|
670
|
+
if (projectConfig.lastCost !== undefined && projectConfig.lastDuration !== undefined) {
|
|
671
|
+
logEvent("tengu_exit", {
|
|
672
|
+
last_session_cost: projectConfig.lastCost,
|
|
673
|
+
last_session_api_duration: projectConfig.lastAPIDuration,
|
|
674
|
+
last_session_tool_duration: projectConfig.lastToolDuration,
|
|
675
|
+
last_session_duration: projectConfig.lastDuration,
|
|
676
|
+
last_session_lines_added: projectConfig.lastLinesAdded,
|
|
677
|
+
last_session_lines_removed: projectConfig.lastLinesRemoved,
|
|
678
|
+
last_session_total_input_tokens: projectConfig.lastTotalInputTokens,
|
|
679
|
+
last_session_total_output_tokens: projectConfig.lastTotalOutputTokens,
|
|
680
|
+
last_session_total_cache_creation_input_tokens: projectConfig.lastTotalCacheCreationInputTokens,
|
|
681
|
+
last_session_total_cache_read_input_tokens: projectConfig.lastTotalCacheReadInputTokens,
|
|
682
|
+
last_session_fps_average: projectConfig.lastFpsAverage,
|
|
683
|
+
last_session_fps_low_1_pct: projectConfig.lastFpsLow1Pct,
|
|
684
|
+
last_session_id: projectConfig.lastSessionId,
|
|
685
|
+
...projectConfig.lastSessionMetrics
|
|
686
|
+
});
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
export {
|
|
690
|
+
setup
|
|
691
|
+
};
|