@qitqode/qitqode-android-arm64 0.1.25 → 0.1.26
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/bundle/{chunk-sx5m81em.js → chunk-01gwb793.js} +1 -1
- package/bundle/{chunk-42t25nkb.js → chunk-05amr7y9.js} +1 -1
- package/bundle/{chunk-4kb2efq3.js → chunk-06x1p3t4.js} +1 -1
- package/bundle/{chunk-t07a5431.js → chunk-07net7s8.js} +1 -1
- package/bundle/{chunk-v7ah9gg0.js → chunk-08y06vgt.js} +2 -2
- package/bundle/chunk-09ecxdmd.js +2 -0
- package/bundle/{chunk-2armxd20.js → chunk-0cehm5fn.js} +1 -1
- package/bundle/chunk-0jaj2g7x.js +2 -0
- package/bundle/{chunk-9f6pqped.js → chunk-0m2tj2h9.js} +1 -1
- package/bundle/{chunk-pk0tytcm.js → chunk-0mekr486.js} +1 -1
- package/bundle/{chunk-qe0sfafy.js → chunk-0ndvy0nh.js} +1 -1
- package/bundle/chunk-0nr2925m.js +2 -0
- package/bundle/{chunk-gvtw9c44.js → chunk-0w5npkgr.js} +1 -1
- package/bundle/chunk-0wbq1y92.js +2 -0
- package/bundle/chunk-12pxszgn.js +2 -0
- package/bundle/chunk-1337582e.js +2 -0
- package/bundle/{chunk-ybn8tb09.js → chunk-14ag9ea0.js} +1 -1
- package/bundle/chunk-182jf8fz.js +2 -0
- package/bundle/chunk-1ht3zcsh.js +2 -0
- package/bundle/{chunk-zny2qaqa.js → chunk-1n4w8dya.js} +2 -2
- package/bundle/{chunk-meaybtcc.js → chunk-1qbm1k9y.js} +2 -2
- package/bundle/{chunk-dk3z4k46.js → chunk-1xkwm21b.js} +3 -3
- package/bundle/{chunk-dee1a3yk.js → chunk-1xpx1t40.js} +1 -1
- package/bundle/{chunk-j5b5h08g.js → chunk-1yx4jesj.js} +1 -1
- package/bundle/{chunk-qfz0a58d.js → chunk-25zkavr0.js} +1 -1
- package/bundle/{chunk-b2xya6pq.js → chunk-28vnspd4.js} +1 -1
- package/bundle/{chunk-26qt44f1.js → chunk-2cm91ktc.js} +1 -1
- package/bundle/chunk-2jfd82jk.js +2 -0
- package/bundle/{chunk-3h08jdq8.js → chunk-2jn2hd12.js} +1 -1
- package/bundle/chunk-2k7bbzj2.js +2 -0
- package/bundle/{chunk-0xmx2zfg.js → chunk-2kdn66xt.js} +1 -1
- package/bundle/{chunk-mbh1pdv9.js → chunk-2q76qax6.js} +2 -2
- package/bundle/{chunk-6ddp36ar.js → chunk-2yb59jwr.js} +1 -1
- package/bundle/chunk-30081kwd.js +2 -0
- package/bundle/{chunk-ykfq8bem.js → chunk-32zrch7h.js} +1 -1
- package/bundle/{chunk-2rxt1s22.js → chunk-3bb7y9pq.js} +1 -1
- package/bundle/{chunk-7q5srx7q.js → chunk-3kdhvq0p.js} +1 -1
- package/bundle/chunk-3rgct4bd.js +11 -0
- package/bundle/{chunk-8za87zkr.js → chunk-3s0d17xe.js} +1 -1
- package/bundle/chunk-3vag59se.js +2 -0
- package/bundle/{chunk-wb69d52j.js → chunk-3w64fpwn.js} +1 -1
- package/bundle/chunk-3x5v6sjw.js +2 -0
- package/bundle/{chunk-08ba67f4.js → chunk-3zn71txs.js} +1 -1
- package/bundle/{chunk-qdnxv55k.js → chunk-41ftye7w.js} +1 -1
- package/bundle/chunk-43ep9d7a.js +2 -0
- package/bundle/chunk-48j09m6e.js +3 -0
- package/bundle/{chunk-bnc4626b.js → chunk-4920vf6a.js} +1 -1
- package/bundle/{chunk-78h5dd4t.js → chunk-49tqzsy0.js} +1 -1
- package/bundle/{chunk-9jvnc14g.js → chunk-49ypxzfx.js} +1 -1
- package/bundle/{chunk-0hsb4knd.js → chunk-4k70wrhf.js} +1 -1
- package/bundle/{chunk-dd11kryy.js → chunk-4nck07pc.js} +2 -2
- package/bundle/chunk-4qqja22v.js +2 -0
- package/bundle/{chunk-av290sja.js → chunk-56pwz1kk.js} +1 -1
- package/bundle/{chunk-vq6bh2z9.js → chunk-56qm8xpt.js} +1 -1
- package/bundle/{chunk-9dpn4792.js → chunk-58gp7wbg.js} +2 -2
- package/bundle/{chunk-2z35ewwc.js → chunk-5dm3p5r6.js} +1 -1
- package/bundle/chunk-5gazgxt5.js +2 -0
- package/bundle/{chunk-kb14wxcs.js → chunk-5jtd006j.js} +1 -1
- package/bundle/{chunk-7v4fzkbb.js → chunk-5mec6cde.js} +1 -1
- package/bundle/{chunk-hwbxehhf.js → chunk-5yaahmjb.js} +1 -1
- package/bundle/{chunk-4wyjapes.js → chunk-5ymj2q6j.js} +1 -1
- package/bundle/{chunk-psveqqv2.js → chunk-613kegcn.js} +1 -1
- package/bundle/chunk-63znhwx0.js +2 -0
- package/bundle/{chunk-6gbaw2pk.js → chunk-6fpfr8tk.js} +1 -1
- package/bundle/{chunk-gaen9ya4.js → chunk-6h2faxs9.js} +2 -2
- package/bundle/chunk-6hmyy7n6.js +2 -0
- package/bundle/{chunk-bsqcfqya.js → chunk-6nk3wx6f.js} +1 -1
- package/bundle/{chunk-c27rpvdz.js → chunk-6nkcfncg.js} +1 -1
- package/bundle/{chunk-jqzejny3.js → chunk-6vb26adv.js} +1 -1
- package/bundle/{chunk-rgecc41f.js → chunk-6wdwwpsc.js} +1 -1
- package/bundle/{chunk-7rjf9b8n.js → chunk-77e1wh0j.js} +1 -1
- package/bundle/chunk-7dyddrpk.js +2 -0
- package/bundle/{chunk-7d6jhzng.js → chunk-7e1aw8rw.js} +1 -1
- package/bundle/{chunk-gefh32jb.js → chunk-7ez3ye6e.js} +1 -1
- package/bundle/{chunk-pvee151a.js → chunk-7fmy4cvn.js} +1 -1
- package/bundle/{chunk-xy4t5qf8.js → chunk-7n2kpqh5.js} +1 -1
- package/bundle/chunk-7penjsgq.js +2 -0
- package/bundle/{chunk-amx3x4kd.js → chunk-7qxn24qa.js} +2 -2
- package/bundle/{chunk-grkkzrg1.js → chunk-7rxsj310.js} +1 -1
- package/bundle/{chunk-9va5eh9s.js → chunk-7ryv0f5h.js} +1 -1
- package/bundle/chunk-7t5gzkj6.js +2 -0
- package/bundle/{chunk-nqefvn28.js → chunk-7tbvr236.js} +1 -1
- package/bundle/{chunk-14qvaxtp.js → chunk-81engf0t.js} +1 -1
- package/bundle/{chunk-1n1dh6zj.js → chunk-880msfsd.js} +1 -1
- package/bundle/chunk-89vgt8vq.js +2 -0
- package/bundle/{chunk-evmfntm3.js → chunk-8bzwgcjb.js} +1 -1
- package/bundle/chunk-8e8n82f9.js +2 -0
- package/bundle/{chunk-5mp82az0.js → chunk-91khd3fq.js} +1 -1
- package/bundle/chunk-97exhw9j.js +2 -0
- package/bundle/chunk-9cvkaht5.js +2 -0
- package/bundle/{chunk-d0m7nbbx.js → chunk-9p83me3p.js} +2 -2
- package/bundle/{chunk-5mdsrv0a.js → chunk-9qtf8khv.js} +1 -1
- package/bundle/{chunk-vfj5nwab.js → chunk-9wm41z2f.js} +2 -2
- package/bundle/{chunk-gw0j8hr9.js → chunk-9zrwbxx0.js} +1 -1
- package/bundle/{chunk-dgggvses.js → chunk-admgf65a.js} +1 -1
- package/bundle/{chunk-tdmaxc6n.js → chunk-afhg3w2j.js} +1 -1
- package/bundle/chunk-akdvstd9.js +2 -0
- package/bundle/{chunk-3j7skhxg.js → chunk-atbm0pnt.js} +2 -2
- package/bundle/chunk-ave2e4sa.js +2 -0
- package/bundle/chunk-axnwehc7.js +2 -0
- package/bundle/{chunk-ydsen7w0.js → chunk-b79k456s.js} +1 -1
- package/bundle/chunk-bmzyxspj.js +2 -0
- package/bundle/{chunk-v4xgceeq.js → chunk-bse8p94q.js} +1 -1
- package/bundle/chunk-bvaqpfv8.js +2 -0
- package/bundle/{chunk-n8dcmjph.js → chunk-c0k8j498.js} +1 -1
- package/bundle/{chunk-4stgw33j.js → chunk-cbmw8fy2.js} +1 -1
- package/bundle/{chunk-h19ty95q.js → chunk-cn10hn58.js} +1 -1
- package/bundle/{chunk-tf1me2r4.js → chunk-cqhpbfcn.js} +2 -2
- package/bundle/{chunk-4wgb80jm.js → chunk-cr06m77n.js} +1 -1
- package/bundle/{chunk-s76hdgw6.js → chunk-cxb05cdg.js} +1 -1
- package/bundle/chunk-cxe92z5c.js +2 -0
- package/bundle/{chunk-vqq5vmh1.js → chunk-cyjzqa5p.js} +4 -4
- package/bundle/{chunk-msm3r7ny.js → chunk-d2n09yvh.js} +2 -2
- package/bundle/{chunk-bpnpxdyv.js → chunk-d31yrcrn.js} +1 -1
- package/bundle/chunk-d5wp85kw.js +2 -0
- package/bundle/{chunk-cjxp72dv.js → chunk-dazye86e.js} +1 -1
- package/bundle/chunk-dm5xnb4t.js +2 -0
- package/bundle/chunk-dpeqsvan.js +2 -0
- package/bundle/chunk-drxtmg5c.js +2 -0
- package/bundle/{chunk-1ce5jpdc.js → chunk-dv5zf5gz.js} +1 -1
- package/bundle/{chunk-99p5m2f1.js → chunk-e57d1he9.js} +1 -1
- package/bundle/{chunk-z015twaq.js → chunk-e58pdw5k.js} +1 -1
- package/bundle/chunk-e9pfdjcy.js +2 -0
- package/bundle/chunk-ejn5hfzd.js +2 -0
- package/bundle/{chunk-9w5rx0fb.js → chunk-ek1fawsj.js} +1 -1
- package/bundle/{chunk-3xna2rk5.js → chunk-eq33vmze.js} +1 -1
- package/bundle/{chunk-fgw420gb.js → chunk-eqaym8gm.js} +1 -1
- package/bundle/chunk-ernd18jb.js +2 -0
- package/bundle/{chunk-zh808d4t.js → chunk-ewvgbg68.js} +1 -1
- package/bundle/{chunk-e075v4e9.js → chunk-f3c9667r.js} +2 -2
- package/bundle/{chunk-h2fh1g8g.js → chunk-f3rrd2p6.js} +1 -1
- package/bundle/{chunk-bqs6a1ts.js → chunk-f416n3mp.js} +1 -1
- package/bundle/{chunk-mybpgrjj.js → chunk-f6y7a5w3.js} +1 -1
- package/bundle/{chunk-2zj3h3xj.js → chunk-fd9zrmhr.js} +1 -1
- package/bundle/chunk-ff9b4cg8.js +2 -0
- package/bundle/{chunk-0jaxgrq0.js → chunk-fffj9447.js} +1 -1
- package/bundle/{chunk-k8bp3jjv.js → chunk-fk3praj7.js} +1 -1
- package/bundle/{chunk-c1ypbbka.js → chunk-fk8cctjy.js} +1 -1
- package/bundle/{chunk-eg7drzzt.js → chunk-fkat2pw6.js} +1 -1
- package/bundle/chunk-fpff6a4q.js +2 -0
- package/bundle/{chunk-syhay5ye.js → chunk-fvy5w4dh.js} +1 -1
- package/bundle/{chunk-ey4ktbyb.js → chunk-fx7w497c.js} +1 -1
- package/bundle/{chunk-qnqqrvvs.js → chunk-fxb6vjcb.js} +1 -1
- package/bundle/{chunk-d1bsxz2t.js → chunk-g6dgc5af.js} +1 -1
- package/bundle/{chunk-rq4hqwjy.js → chunk-g7vahvkz.js} +1 -1
- package/bundle/{chunk-58680z2j.js → chunk-g8wvr7a1.js} +1 -1
- package/bundle/{chunk-2je5tp0x.js → chunk-gaxbbxk6.js} +1 -1
- package/bundle/chunk-gq361kdt.js +2 -0
- package/bundle/{chunk-gfmfrkxc.js → chunk-gxa2r4zc.js} +1 -1
- package/bundle/{chunk-jq81hb32.js → chunk-hb4d06q0.js} +1 -1
- package/bundle/chunk-hbagpppv.js +2 -0
- package/bundle/chunk-hf473xav.js +2 -0
- package/bundle/{chunk-gsz1wqy6.js → chunk-hjratj6g.js} +1 -1
- package/bundle/{chunk-zsnbxsdx.js → chunk-hk8j5ht8.js} +1 -1
- package/bundle/{chunk-p80dc6kt.js → chunk-hkmb3zer.js} +2 -2
- package/bundle/chunk-hr88054m.js +2 -0
- package/bundle/{chunk-jhq5bvhs.js → chunk-hybq019j.js} +2 -2
- package/bundle/{chunk-e1pwnf0b.js → chunk-hyckncza.js} +1 -1
- package/bundle/{chunk-jgs6ngte.js → chunk-hz1hd1bd.js} +1 -1
- package/bundle/{chunk-hznsed5n.js → chunk-j0ftbmex.js} +1 -1
- package/bundle/{chunk-4wa0gf8y.js → chunk-j3czd7v2.js} +1 -1
- package/bundle/{chunk-xyn3xxfs.js → chunk-j7zs1yg2.js} +1 -1
- package/bundle/{chunk-1e8mja6v.js → chunk-j87bvp1b.js} +1 -1
- package/bundle/chunk-j9m2d6t5.js +2 -0
- package/bundle/chunk-jd9edy2s.js +2 -0
- package/bundle/{chunk-yzchwmb4.js → chunk-jdkxeqw5.js} +1 -1
- package/bundle/chunk-jwtdbx31.js +2 -0
- package/bundle/{chunk-rjcptzem.js → chunk-jzcz92pq.js} +2 -2
- package/bundle/{chunk-6rrmjrm2.js → chunk-k7h6tfzj.js} +1 -1
- package/bundle/{chunk-eaatrmcg.js → chunk-kbg3k1az.js} +1 -1
- package/bundle/{chunk-87x607rz.js → chunk-kbjwdv1x.js} +6 -6
- package/bundle/{chunk-jtrcnpm7.js → chunk-kbyk7hyn.js} +2 -2
- package/bundle/{chunk-3nhth7c2.js → chunk-kfk1zqc1.js} +1 -1
- package/bundle/{chunk-754varfr.js → chunk-kkdgzeva.js} +1 -1
- package/bundle/{chunk-mkdyknbz.js → chunk-kn318ev4.js} +1 -1
- package/bundle/{chunk-zss93r48.js → chunk-kp84yba1.js} +1 -1
- package/bundle/{chunk-m2ang7yb.js → chunk-kpnfndkg.js} +1 -1
- package/bundle/chunk-krkxrej2.js +2 -0
- package/bundle/{chunk-z3zx6g09.js → chunk-kvz0vzsn.js} +1 -1
- package/bundle/chunk-m26mcy8p.js +2 -0
- package/bundle/{chunk-pd33qvr0.js → chunk-m62wgqp1.js} +1 -1
- package/bundle/{chunk-y0xt5a6g.js → chunk-m7txgh5w.js} +1 -1
- package/bundle/chunk-m84cn9c6.js +2 -0
- package/bundle/{chunk-vb4e7y4d.js → chunk-md7vpe1e.js} +1 -1
- package/bundle/{chunk-61ks7c71.js → chunk-mg239rc3.js} +3 -3
- package/bundle/chunk-mvc7pvtq.js +2 -0
- package/bundle/{chunk-8cty50g7.js → chunk-n07rsssz.js} +1 -1
- package/bundle/{chunk-7ws3gdjq.js → chunk-n10atvac.js} +1 -1
- package/bundle/chunk-nfp9xtca.js +3 -0
- package/bundle/{chunk-p8enedkf.js → chunk-ngz5xw45.js} +1 -1
- package/bundle/{chunk-3f054f69.js → chunk-njzpswgt.js} +6 -6
- package/bundle/{chunk-nmnsf3fc.js → chunk-nszqy06d.js} +1 -1
- package/bundle/{chunk-3e8p4a3y.js → chunk-nxjbbq5h.js} +1 -1
- package/bundle/{chunk-hmfefq0d.js → chunk-p0k4sv89.js} +3 -3
- package/bundle/{chunk-mkyrg7gt.js → chunk-p31yg62z.js} +2 -2
- package/bundle/chunk-p5t9mq8r.js +2 -0
- package/bundle/chunk-pfbykat1.js +2 -0
- package/bundle/{chunk-kgsq240v.js → chunk-pjbbdm96.js} +1 -1
- package/bundle/{chunk-4w5t515p.js → chunk-pnj8s20t.js} +1 -1
- package/bundle/{chunk-nf8gkxbk.js → chunk-ppvmy940.js} +2 -2
- package/bundle/{chunk-veev25yg.js → chunk-ptf09vmp.js} +1 -1
- package/bundle/{chunk-ggeena9t.js → chunk-q2exgz82.js} +1 -1
- package/bundle/{chunk-2s28fdbp.js → chunk-qan3kwbv.js} +1 -1
- package/bundle/{chunk-5zw7knvd.js → chunk-qb5qemtp.js} +1 -1
- package/bundle/chunk-qd0nvn4z.js +2 -0
- package/bundle/chunk-qh99kv2j.js +2 -0
- package/bundle/{chunk-7fx6x8x9.js → chunk-qkwhgfjt.js} +2 -2
- package/bundle/{chunk-9r6bvkp4.js → chunk-qmhcbdkg.js} +2 -2
- package/bundle/{chunk-3fy57jcy.js → chunk-qngs31yf.js} +1 -1
- package/bundle/{chunk-jv98gw88.js → chunk-qpv4438m.js} +2 -2
- package/bundle/{chunk-yhqk8bzk.js → chunk-qq71akpw.js} +2 -2
- package/bundle/chunk-qyrafh4m.js +2 -0
- package/bundle/{chunk-xjrt0dta.js → chunk-r1yqmd4y.js} +1 -1
- package/bundle/chunk-rc37cw86.js +2 -0
- package/bundle/{chunk-a27yjp71.js → chunk-rf625fxx.js} +1 -1
- package/bundle/chunk-rmpty636.js +2 -0
- package/bundle/{chunk-qnv2v02g.js → chunk-rs0nx844.js} +2 -2
- package/bundle/{chunk-8atry88r.js → chunk-rvrjw0fy.js} +1 -1
- package/bundle/{chunk-kwm87f18.js → chunk-rz54qjew.js} +1 -1
- package/bundle/{chunk-wrgg270f.js → chunk-s1h0k1yj.js} +1 -1
- package/bundle/{chunk-0rmmg3g4.js → chunk-s2za1y84.js} +1 -1
- package/bundle/chunk-s3wjwxme.js +2 -0
- package/bundle/chunk-s4ncnbgd.js +2 -0
- package/bundle/{chunk-3jhx8g5d.js → chunk-s54c8fpf.js} +1 -1
- package/bundle/{chunk-mr7agwgn.js → chunk-s5krbdvd.js} +1 -1
- package/bundle/{chunk-4pssh5d3.js → chunk-s86fj82v.js} +2 -2
- package/bundle/{chunk-8gy99gfb.js → chunk-sdsggxm4.js} +1 -1
- package/bundle/{chunk-ym4ydwrz.js → chunk-se195e52.js} +2 -2
- package/bundle/chunk-snz3w30x.js +2 -0
- package/bundle/chunk-srw748gr.js +2 -0
- package/bundle/{chunk-692vn48b.js → chunk-st74db4c.js} +1 -1
- package/bundle/{chunk-2k2axg73.js → chunk-t1vtdgd6.js} +1 -1
- package/bundle/{chunk-nhx2xp2x.js → chunk-t6xm49ea.js} +1 -1
- package/bundle/{chunk-xqa6qkx2.js → chunk-t7tstr83.js} +1 -1
- package/bundle/{chunk-p409grvp.js → chunk-tedrfa7d.js} +2 -2
- package/bundle/{chunk-vbf73c7z.js → chunk-tn167yyz.js} +1 -1
- package/bundle/{chunk-pepn5jp4.js → chunk-txty44v2.js} +1 -1
- package/bundle/{chunk-d5b0bqbr.js → chunk-tyy4gx61.js} +1 -1
- package/bundle/chunk-v1xwe58d.js +2 -0
- package/bundle/{chunk-7qvkyjjg.js → chunk-vh05n2x3.js} +1 -1
- package/bundle/{chunk-zbdbsagd.js → chunk-vpqd0t8a.js} +1 -1
- package/bundle/chunk-vrfegg5f.js +2 -0
- package/bundle/{chunk-3dvyfmgc.js → chunk-vthm5q05.js} +1 -1
- package/bundle/{chunk-vmgknvxs.js → chunk-vw673y0t.js} +2 -2
- package/bundle/{chunk-b50t4jc5.js → chunk-vx837ete.js} +1 -1
- package/bundle/{chunk-x6b99nt3.js → chunk-vy9xre57.js} +1 -1
- package/bundle/{chunk-g3s2z5xa.js → chunk-vyjsng14.js} +1 -1
- package/bundle/{chunk-rs1mm5ef.js → chunk-vztxv9dj.js} +1 -1
- package/bundle/{chunk-kyny0t2g.js → chunk-w01gjnty.js} +2 -2
- package/bundle/{chunk-k6zvb8xm.js → chunk-w12tky28.js} +1 -1
- package/bundle/{chunk-kdct3e8s.js → chunk-w2gpgapp.js} +1 -1
- package/bundle/{chunk-hvpe07pt.js → chunk-w3pzv615.js} +1 -1
- package/bundle/{chunk-pf7cj4jd.js → chunk-w4hbw37v.js} +1 -1
- package/bundle/chunk-w9ct698t.js +2 -0
- package/bundle/{chunk-3tnek022.js → chunk-wefjbwv6.js} +1 -1
- package/bundle/{chunk-0x7dbj5e.js → chunk-wg42cxrw.js} +1 -1
- package/bundle/{chunk-j9s62g01.js → chunk-wg5dv21f.js} +1 -1
- package/bundle/{chunk-qvcfst7n.js → chunk-wms4skr9.js} +1 -1
- package/bundle/{chunk-w98r39gd.js → chunk-wr5hdsst.js} +1 -1
- package/bundle/chunk-wxnqgh8t.js +2 -0
- package/bundle/chunk-wzmte7sy.js +3 -0
- package/bundle/chunk-x0h1jdxt.js +2 -0
- package/bundle/{chunk-ww8ear80.js → chunk-x3931we7.js} +2 -2
- package/bundle/{chunk-23f6rc7a.js → chunk-x3z8q0ep.js} +1 -1
- package/bundle/chunk-x6hsmnhz.js +2 -0
- package/bundle/{chunk-se79ke63.js → chunk-xak2r993.js} +1 -1
- package/bundle/{chunk-t0amhhsk.js → chunk-xc3fadkh.js} +1 -1
- package/bundle/{chunk-rjf21v5c.js → chunk-xcs2jbz9.js} +1 -1
- package/bundle/{chunk-ddxjc803.js → chunk-xdv9xt0y.js} +1 -1
- package/bundle/{chunk-aw0q4y3s.js → chunk-xdwej3ae.js} +1 -1
- package/bundle/chunk-xg9e0enb.js +2 -0
- package/bundle/{chunk-t2tsyazc.js → chunk-xqxpjbqk.js} +1 -1
- package/bundle/chunk-xtxxb25n.js +2 -0
- package/bundle/{chunk-9jncnqbj.js → chunk-y2ch07yv.js} +1 -1
- package/bundle/chunk-y3s7sh1e.js +2 -0
- package/bundle/{chunk-6a1g6jzn.js → chunk-ydvheqw9.js} +1 -1
- package/bundle/chunk-ygwe0vf1.js +5 -0
- package/bundle/{chunk-8jcx4tep.js → chunk-ykxde207.js} +1 -1
- package/bundle/{chunk-ag9thqkv.js → chunk-ynfbz3sz.js} +2 -2
- package/bundle/{chunk-p883sz67.js → chunk-yqtfvgrp.js} +1 -1
- package/bundle/{chunk-kdcspxvq.js → chunk-yt1yk4j1.js} +1 -1
- package/bundle/{chunk-xdde80rf.js → chunk-yvj021eg.js} +1 -1
- package/bundle/chunk-yxnq0d7k.js +2 -0
- package/bundle/{chunk-jvaffe5d.js → chunk-z2m09m4w.js} +1 -1
- package/bundle/{chunk-xw283h2r.js → chunk-z2q3mg73.js} +2 -2
- package/bundle/chunk-z2raegj9.js +2 -0
- package/bundle/{chunk-mczw8e3s.js → chunk-z3hj5bfd.js} +1 -1
- package/bundle/chunk-z3pyhmg6.js +2 -0
- package/bundle/{chunk-g73drh98.js → chunk-z4ae6jmb.js} +2 -2
- package/bundle/{chunk-qpm5afdz.js → chunk-z559gc3n.js} +1 -1
- package/bundle/{chunk-4aqd2bty.js → chunk-z7pg6sw1.js} +1 -1
- package/bundle/chunk-z84376c6.js +2 -0
- package/bundle/{chunk-aqm597px.js → chunk-ze00x1xb.js} +1 -1
- package/bundle/{chunk-1txkz6dt.js → chunk-zjvzc0my.js} +1 -1
- package/bundle/chunk-zn8th65r.js +2 -0
- package/bundle/{chunk-f55txcsa.js → chunk-zna6neq5.js} +1 -1
- package/bundle/chunk-ztv1brgn.js +2 -0
- package/bundle/{chunk-f84cd0a1.js → chunk-zvsafnkp.js} +1 -1
- package/bundle/{chunk-ydmrvx7q.js → chunk-zyxvd9fj.js} +1 -1
- package/bundle/index.js +3 -3
- package/bundle/parser.worker.js +2 -2
- package/bundle/worker.js +1 -1
- package/package.json +1 -1
- package/bundle/chunk-0eneddjj.js +0 -2
- package/bundle/chunk-0ke6x10y.js +0 -5
- package/bundle/chunk-0yb4pxjv.js +0 -2
- package/bundle/chunk-129kq1w7.js +0 -2
- package/bundle/chunk-1a5hq7d5.js +0 -2
- package/bundle/chunk-1w3y1dkk.js +0 -2
- package/bundle/chunk-2pkake0h.js +0 -2
- package/bundle/chunk-32188rww.js +0 -2
- package/bundle/chunk-334tc1rh.js +0 -2
- package/bundle/chunk-3ff94m8r.js +0 -2
- package/bundle/chunk-4xg5ptk9.js +0 -2
- package/bundle/chunk-5nm36wxa.js +0 -2
- package/bundle/chunk-64jet8nc.js +0 -2
- package/bundle/chunk-6584d9m8.js +0 -2
- package/bundle/chunk-66hv9bbw.js +0 -2
- package/bundle/chunk-6be8p915.js +0 -2
- package/bundle/chunk-6f03158n.js +0 -2
- package/bundle/chunk-7jnjttqx.js +0 -2
- package/bundle/chunk-7q8pa6s8.js +0 -2
- package/bundle/chunk-7w84hfxs.js +0 -3
- package/bundle/chunk-8casywce.js +0 -2
- package/bundle/chunk-8hxwxt5p.js +0 -2
- package/bundle/chunk-8y8140dm.js +0 -2
- package/bundle/chunk-9dqcyt6x.js +0 -2
- package/bundle/chunk-9he248a8.js +0 -2
- package/bundle/chunk-9qmmse2n.js +0 -2
- package/bundle/chunk-aabrsxrq.js +0 -2
- package/bundle/chunk-atd0q4v8.js +0 -3
- package/bundle/chunk-avaba4sr.js +0 -2
- package/bundle/chunk-bdy1etja.js +0 -2
- package/bundle/chunk-bqdvqmjc.js +0 -2
- package/bundle/chunk-cdws8ggq.js +0 -2
- package/bundle/chunk-cqs9a2cs.js +0 -2
- package/bundle/chunk-d0rjst58.js +0 -2
- package/bundle/chunk-d833a2fj.js +0 -2
- package/bundle/chunk-dday4nm2.js +0 -2
- package/bundle/chunk-e2sj30hk.js +0 -2
- package/bundle/chunk-enc0fykg.js +0 -2
- package/bundle/chunk-evan93av.js +0 -2
- package/bundle/chunk-f600dzsr.js +0 -2
- package/bundle/chunk-f6jzwydk.js +0 -2
- package/bundle/chunk-fv67ng8z.js +0 -2
- package/bundle/chunk-gevazsx3.js +0 -2
- package/bundle/chunk-gh18pzkx.js +0 -2
- package/bundle/chunk-gnvvgr4y.js +0 -2
- package/bundle/chunk-gsbjs2ws.js +0 -2
- package/bundle/chunk-j7pdz979.js +0 -2
- package/bundle/chunk-jfe2qbv8.js +0 -2
- package/bundle/chunk-kcht9kvx.js +0 -2
- package/bundle/chunk-knvsa1d4.js +0 -2
- package/bundle/chunk-kp6d68hd.js +0 -2
- package/bundle/chunk-me78p9x4.js +0 -2
- package/bundle/chunk-mv1d7wyt.js +0 -2
- package/bundle/chunk-n8xmmxh5.js +0 -2
- package/bundle/chunk-n90219q9.js +0 -2
- package/bundle/chunk-nckg3ydx.js +0 -2
- package/bundle/chunk-nhaenjw3.js +0 -2
- package/bundle/chunk-nhtrt5ec.js +0 -2
- package/bundle/chunk-p72n0tfq.js +0 -2
- package/bundle/chunk-pq3622ae.js +0 -2
- package/bundle/chunk-qatj4h6b.js +0 -2
- package/bundle/chunk-qjwfj51e.js +0 -2
- package/bundle/chunk-qkg73rs9.js +0 -2
- package/bundle/chunk-rmsqb6r4.js +0 -10
- package/bundle/chunk-rqrpbcm6.js +0 -2
- package/bundle/chunk-s7vhjg9e.js +0 -2
- package/bundle/chunk-sec3a60m.js +0 -2
- package/bundle/chunk-sjnt5e6w.js +0 -2
- package/bundle/chunk-sntb757q.js +0 -2
- package/bundle/chunk-svscftd7.js +0 -2
- package/bundle/chunk-sx0cabcs.js +0 -2
- package/bundle/chunk-tmdm6vm6.js +0 -2
- package/bundle/chunk-v6g0ksks.js +0 -2
- package/bundle/chunk-vbf9jpas.js +0 -2
- package/bundle/chunk-vrcf5q4s.js +0 -2
- package/bundle/chunk-vxrsp6n7.js +0 -2
- package/bundle/chunk-w8ax3pvh.js +0 -2
- package/bundle/chunk-xk2cmh49.js +0 -2
- package/bundle/chunk-xzhkfctf.js +0 -2
- package/bundle/chunk-z2rtcgad.js +0 -3
- package/bundle/chunk-z9b3t2jm.js +0 -2
- package/bundle/chunk-zzr8smtm.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ah as C_,Bh as uX,Ch as w_,Dh as v_,vh as iM,wh as xR,xh as __,yh as P_,zh as M_}from"./chunk-
|
|
2
|
+
import{Ah as C_,Bh as uX,Ch as w_,Dh as v_,vh as iM,wh as xR,xh as __,yh as P_,zh as M_}from"./chunk-ek1fawsj.js";import{Eh as QM}from"./chunk-3w64fpwn.js";import{wi as iW}from"./chunk-fk8cctjy.js";import{$j as j8,$k as rX,Ak as RX,Bk as z_,Cj as tJ,Ck as u8,Dk as FU,Ej as JB,Ek as qU,Fj as eE,Fk as DU,Gj as Gz,Hj as M9,Hk as SA,Ij as TB,Lj as M2,Lk as pO,Mj as n7,Mk as zU,Nj as g0,Nk as LM,Oj as B$,Ok as aX,Pj as d0,Pk as G$,Qk as QY,Rj as _V,Rk as s0,Sj as L$,Sk as Q2,Tj as oZ,Uk as n0,Vk as By,Wj as xY,Wk as O0,Xj as bY,Xk as BC,Yj as q6,Zj as $j,Zk as y$,_j as G1,_k as OB,ak as x1,al as hW,bk as F_,bl as h$,ck as LX,cl as q1,dk as SX,dl as b0,ek as q_,el as B0,fk as UQ,gk as FQ,hk as mO,ik as Lf,jk as Sf,kk as wQ,lk as o1,mk as rZ,nk as oK,ok as C7,pk as yQ,qk as ZU,rk as KU,sk as GU,tk as WU,uk as BU,vk as Sj,wk as Zj,xk as D_,yj as e,yk as P0,zk as oz}from"./chunk-njzpswgt.js";import{fl as OQ,gl as Wy}from"./chunk-2cm91ktc.js";import{Bl as u9,El as C0,Fl as O1,Gl as NJ,Hl as N6,Il as A8,Ll as Bw,Ml as K6,Ol as F0,Pl as u,Ql as lw,Rl as R$,Sl as rz,rl as U3,sl as cj,ul as xw,vl as RB,wl as K$,xl as g$,yl as p1,zl as C9}from"./chunk-ygwe0vf1.js";import{Tl as IY,Ul as m8,Vl as m2,Wl as u1,Zl as Ow,_l as S0}from"./chunk-1qbm1k9y.js";import{Fn as G8,Gn as N8,Hm as d8,bn as j2,cn as i0,dn as w2,en as K8,fn as nO,gm as iO,hn as _0,jn as n$,kn as _7,mn as WQ,pn as NM,qn as IM,sn as sZ}from"./chunk-3rgct4bd.js";import{Po as lZ}from"./chunk-s86fj82v.js";import{hp as Y7,ip as Yj}from"./chunk-w4hbw37v.js";import{kp as T1,zp as X0}from"./chunk-qmhcbdkg.js";import{Ap as Q7,Cp as X8}from"./chunk-7qxn24qa.js";import{Dp as J9}from"./chunk-vx837ete.js";import{Ep as j$}from"./chunk-ppvmy940.js";import{Gq as L9,Hq as yP,uq as T8,vq as bM}from"./chunk-p31yg62z.js";import{hr as BM,ir as eP}from"./chunk-5mec6cde.js";import{Cr as u7}from"./chunk-kbyk7hyn.js";import{Gr as C1,Lr as Gy,Mr as G7}from"./chunk-4nck07pc.js";import{Or as N1,Pr as j3,Sr as O3}from"./chunk-d2n09yvh.js";import{cs as P2,ds as HX,js as c1,ks as w8}from"./chunk-f3c9667r.js";import{Ts as F$}from"./chunk-z2q3mg73.js";import{Vs as cZ}from"./chunk-n07rsssz.js";import{$t as J0,At as B4,Dt as sY,Et as fX,Jt as $y,Mt as Z2,Qt as PJ,Rt as t0,St as m0,Ws as L1,Zs as FX,_s as NX,bt as uz,ct as lz,et as F6,pt as B_}from"./chunk-08y06vgt.js";import{au as lY,cu as e8,eu as W7,iu as B7,lu as X7,ou as g8,pu as V0,tu as z$}from"./chunk-9p83me3p.js";import{uu as Of}from"./chunk-9wm41z2f.js";import{vu as q}from"./chunk-48j09m6e.js";import{Au as q$,Bu as A$,Cu as aW,Du as hP,Eu as X2,Fu as W0,Gu as H0,Hu as F2,Iu as k$,Ju as tW,Ku as eW,Lu as m$,Mu as b1,Nu as A0,Ou as V2,Pu as t_,Qu as $5,Ru as vP,Su as fP,Tu as H$,wu as a_,yu as m,zu as gP}from"./chunk-se195e52.js";import{Uu as EP,ov as R5}from"./chunk-vw673y0t.js";import{Zz as H3,iA as oW}from"./chunk-tedrfa7d.js";import{$J as ZQ,AD as Q0,AG as Gw,FJ as C8,JO as e9,KO as WB,MD as h8,MO as h_,NH as LB,NO as K3,PF as b,RG as Ww,RH as SB,RO as f0,SN as L0,WC as H_,XE as l0,ZJ as k8,bP as BX,cF as H2,iG as yJ,jF as p0,oG as Vw,pO as j_,qI as V,qO as O_,rO as U_,sC as IX,sO as d7,tO as qO,uO as E_,vC as S$,vG as Kw,wO as c7,yO as YQ,zF as w$,zO as g_}from"./chunk-ynfbz3sz.js";import{wP as SK}from"./chunk-rs0nx844.js";import{CP as t6,DP as D0,EP as R0,GP as u$,HP as a9,IP as t9}from"./chunk-s2za1y84.js";var N4=D0((pc,RY)=>{function D4($){return Array.isArray($)?$:[$]}var QA=void 0,p3="",F4=" ",l3="\\",XA=/^\s+$/,VA=/(?:[^\\]|^)\\$/,KA=/^\\!/,GA=/^\\#/,WA=/\r?\n/g,BA=/^\.{0,2}\/|^\.{1,2}$/,HA=/\/$/,s9="/",z4="node-ignore";if(typeof Symbol<"u")z4=Symbol.for("node-ignore");var _4=z4,r9=($,Z,J)=>{return Object.defineProperty($,Z,{value:J}),J},jA=/([0-z])-([0-z])/g,P4=()=>!1,OA=($)=>$.replace(jA,(Z,J,Y)=>J.charCodeAt(0)<=Y.charCodeAt(0)?Z:p3),UA=($)=>{let{length:Z}=$;return $.slice(0,Z-Z%2)},FA=[[/^\uFEFF/,()=>p3],[/((?:\\\\)*?)(\\?\s+)$/,($,Z,J)=>Z+(J.indexOf("\\")===0?F4:p3)],[/(\\+?)\s/g,($,Z)=>{let{length:J}=Z;return Z.slice(0,J-J%2)+F4}],[/[\\$.|*+(){^]/g,($)=>`\\${$}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return!/\/(?!$)/.test(this)?"(?:^|\\/)":"^"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,($,Z,J)=>Z+6<J.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,($,Z,J)=>{let Y=J.replace(/\\\*/g,"[^\\/]*");return Z+Y}],[/\\\\\\(?=[$.|*+(){^])/g,()=>l3],[/\\\\/g,()=>l3],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,($,Z,J,Y,Q)=>Z===l3?`\\[${J}${UA(Y)}${Q}`:Q==="]"?Y.length%2===0?`[${OA(J)}${Y}]`:"[]":"[]"],[/(?:[^*])$/,($)=>/\/$/.test($)?`${$}$`:`${$}(?=$|\\/$)`]],qA=/(^|\\\/)?\\\*$/,TZ="regex",LY="checkRegex",q4="_",DA={[TZ]($,Z){return`${Z?`${Z}[^/]+`:"[^/]*"}(?=$|\\/$)`},[LY]($,Z){return`${Z?`${Z}[^/]*`:"[^/]*"}(?=$|\\/$)`}},zA=($)=>FA.reduce((Z,[J,Y])=>Z.replace(J,Y.bind($)),$),SY=($)=>typeof $==="string",_A=($)=>$&&SY($)&&!XA.test($)&&!VA.test($)&&$.indexOf("#")!==0,PA=($)=>$.split(WA).filter(Boolean);class M4{constructor($,Z,J,Y,Q,X){this.pattern=$,this.mark=Z,this.negative=Q,r9(this,"body",J),r9(this,"ignoreCase",Y),r9(this,"regexPrefix",X)}get regex(){let $=q4+TZ;if(this[$])return this[$];return this._make(TZ,$)}get checkRegex(){let $=q4+LY;if(this[$])return this[$];return this._make(LY,$)}_make($,Z){let J=this.regexPrefix.replace(qA,DA[$]),Y=this.ignoreCase?new RegExp(J,"i"):new RegExp(J);return r9(this,Z,Y)}}var MA=({pattern:$,mark:Z},J)=>{let Y=!1,Q=$;if(Q.indexOf("!")===0)Y=!0,Q=Q.substr(1);Q=Q.replace(KA,"!").replace(GA,"#");let X=zA(Q);return new M4($,Z,Q,J,Y,X)};class C4{constructor($){this._ignoreCase=$,this._rules=[]}_add($){if($&&$[_4]){this._rules=this._rules.concat($._rules._rules),this._added=!0;return}if(SY($))$={pattern:$};if(_A($.pattern)){let Z=MA($,this._ignoreCase);this._added=!0,this._rules.push(Z)}}add($){return this._added=!1,D4(SY($)?PA($):$).forEach(this._add,this),this._added}test($,Z,J){let Y=!1,Q=!1,X;this._rules.forEach((G)=>{let{negative:B}=G;if(Q===B&&Y!==Q||B&&!Y&&!Q&&!Z)return;if(!G[J].test($))return;Y=!B,Q=B,X=B?QA:G});let K={ignored:Y,unignored:Q};if(X)K.rule=X;return K}}var CA=($,Z)=>{throw new Z($)},E8=($,Z,J)=>{if(!SY($))return J(`path must be a string, but got \`${Z}\``,TypeError);if(!$)return J("path must not be empty",TypeError);if(E8.isNotRelative($))return J(`path should be a \`path.relative()\`d string, but got "${Z}"`,RangeError);return!0},w4=($)=>BA.test($);E8.isNotRelative=w4;E8.convert=($)=>$;class y4{constructor({ignorecase:$=!0,ignoreCase:Z=$,allowRelativePaths:J=!1}={}){r9(this,_4,!0),this._rules=new C4(Z),this._strictPathCheck=!J,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}add($){if(this._rules.add($))this._initCache();return this}addPattern($){return this.add($)}_test($,Z,J,Y){let Q=$&&E8.convert($);return E8(Q,$,this._strictPathCheck?CA:P4),this._t(Q,Z,J,Y)}checkIgnore($){if(!HA.test($))return this.test($);let Z=$.split(s9).filter(Boolean);if(Z.pop(),Z.length){let J=this._t(Z.join(s9)+s9,this._testCache,!0,Z);if(J.ignored)return J}return this._rules.test($,!1,LY)}_t($,Z,J,Y){if($ in Z)return Z[$];if(!Y)Y=$.split(s9).filter(Boolean);if(Y.pop(),!Y.length)return Z[$]=this._rules.test($,J,TZ);let Q=this._t(Y.join(s9)+s9,Z,J,Y);return Z[$]=Q.ignored?Q:this._rules.test($,J,TZ)}ignores($){return this._test($,this._ignoreCache,!1).ignored}createFilter(){return($)=>!this.ignores($)}filter($){return D4($).filter(this.createFilter())}test($){return this._test($,this._testCache,!0)}}var o3=($)=>new y4($),wA=($)=>E8($&&E8.convert($),$,P4),A4=()=>{let $=(J)=>/^\\\\\?\\/.test(J)||/["<>|\u0000-\u001F]+/u.test(J)?J:J.replace(/\\/g,"/");E8.convert=$;let Z=/^[a-z]:\//i;E8.isNotRelative=(J)=>Z.test(J)||w4(J)};if(typeof process<"u"&&process.platform==="win32")A4();RY.exports=o3;o3.default=o3;RY.exports.isPathValid=wA;r9(RY.exports,Symbol.for("setupWindows"),A4)});var kY=D0((nA)=>{nA.isInteger=($)=>{if(typeof $==="number")return Number.isInteger($);if(typeof $==="string"&&$.trim()!=="")return Number.isInteger(Number($));return!1};nA.find=($,Z)=>$.nodes.find((J)=>J.type===Z);nA.exceedsLimit=($,Z,J=1,Y)=>{if(Y===!1)return!1;if(!nA.isInteger($)||!nA.isInteger(Z))return!1;return(Number(Z)-Number($))/Number(J)>=Y};nA.escapeNode=($,Z=0,J)=>{let Y=$.nodes[Z];if(!Y)return;if(J&&Y.type===J||Y.type==="open"||Y.type==="close"){if(Y.escaped!==!0)Y.value="\\"+Y.value,Y.escaped=!0}};nA.encloseBrace=($)=>{if($.type!=="brace")return!1;if($.commas>>0+$.ranges>>0===0)return $.invalid=!0,!0;return!1};nA.isInvalidBrace=($)=>{if($.type!=="brace")return!1;if($.invalid===!0||$.dollar)return!0;if($.commas>>0+$.ranges>>0===0)return $.invalid=!0,!0;if($.open!==!0||$.close!==!0)return $.invalid=!0,!0;return!1};nA.isOpenOrClose=($)=>{if($.type==="open"||$.type==="close")return!0;return $.open===!0||$.close===!0};nA.reduce=($)=>$.reduce((Z,J)=>{if(J.type==="text")Z.push(J.value);if(J.type==="range")J.type="text";return Z},[]);nA.flatten=(...$)=>{let Z=[],J=(Y)=>{for(let Q=0;Q<Y.length;Q++){let X=Y[Q];if(Array.isArray(X)){J(X);continue}if(X!==void 0)Z.push(X)}return Z};return J($),Z}});var EY=D0((Wu,g4)=>{var E4=kY();g4.exports=($,Z={})=>{let J=(Y,Q={})=>{let X=Z.escapeInvalid&&E4.isInvalidBrace(Q),K=Y.invalid===!0&&Z.escapeInvalid===!0,G="";if(Y.value){if((X||K)&&E4.isOpenOrClose(Y))return"\\"+Y.value;return Y.value}if(Y.value)return Y.value;if(Y.nodes)for(let B of Y.nodes)G+=J(B);return G};return J($)}});var v4=D0((Bu,h4)=>{/*!
|
|
3
3
|
* is-number <https://github.com/jonschlinkert/is-number>
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
@@ -85,7 +85,7 @@ Please rewrite the input so it satisfies the expected schema.`}function BL($,Z,J
|
|
|
85
85
|
- If there is no real choice to make \u2014 you simply need more information, context or goals \u2014 ask for it as prose in your reply. Do NOT call this tool for that.
|
|
86
86
|
- The user may dismiss the prompt. You then get a "declined" result: proceed with your best judgement or stop and wait for direction. Do not re-ask the same question.`,hj=($)=>({title:`Dismissed ${$} question${$===1?"":"s"}`,output:"The user declined to answer and dismissed the question. This is final for this turn \u2014 do NOT ask again. "+"Either proceed with your best judgement using what you already know, or stop and wait for the user to give direction.",metadata:{answers:[],declined:!0}});function _L($){for(let Z=$.length-1;Z>=0;Z--){let J=$[Z]?.info;if(J?.role==="user")return J.time.created}return 0}var vj=h0("question",V.gen(function*(){let $=((yield*X0.toolDescriptionEffect("question"))??"")+zL,Z=yield*Z1.Service;return{description:$,parameters:DL,execute:(J,Y)=>V.gen(function*(){if(yield*Z.neverAsk())return{title:`Auto-resolved ${J.questions.length} question${J.questions.length>1?"s":""}`,output:"[Never-Ask] No user is available to answer (never-ask mode is on). "+"Re-evaluate the options you just proposed for unattended/headless execution \u2014 "+"prefer text-only, non-interactive, minimal-scope paths and avoid anything that needs a GUI or the user to be present. Pick the best option yourself and continue. "+"IMPORTANT: You MUST explicitly state which option you chose and why in your response text (not just in thinking) \u2014 "+"the user will review the conversation history later and needs to see what you decided without expanding thinking blocks. This applies only to this question; never-ask may be turned off later, so keep using the question tool at future decision points (the user may have returned).",metadata:{answers:J.questions.map(()=>["[Never-Ask] The model will decide autonomously"])}};let Q=yield*Z.declinedAt(Y.sessionID);if(Q!==void 0&&Q>=_L(Y.messages))return hj(J.questions.length);let X=yield*Z.ask({sessionID:Y.sessionID,questions:J.questions,tool:Y.callID?{messageID:Y.messageID,callID:Y.callID}:void 0}).pipe(V.catch(()=>V.succeed(void 0)));if(X===void 0)return hj(J.questions.length);let K=J.questions.map((G,B)=>`"${G.question}"="${X[B]?.length?X[B].join(", "):"Unanswered"}"`).join(", ");return{title:`Asked ${J.questions.length} question${J.questions.length>1?"s":""}`,output:`User has answered your questions: ${K}. You can now continue with the user's answers in mind.`,metadata:{answers:X}}}).pipe(V.orDie)}}));import RK from"os";import{createWriteStream as dL}from"fs";import{open as cL,stat as uL}from"fs/promises";import X9 from"path";import{fileURLToPath as oj}from"url";var U1={};R0(U1,{preferred:()=>RL,posix:()=>SL,name:()=>dZ,login:()=>LL,killTree:()=>yL,gitbash:()=>yK,acceptable:()=>TL,Shell:()=>U1});import aY from"path";import{spawn as PL}from"child_process";import{setTimeout as fj}from"timers/promises";var mj=200,ML=new Set(["fish","nu"]),CL=new Set(["bash","dash","fish","ksh","sh","zsh"]),wL=new Set(["bash","dash","ksh","sh","zsh"]);async function yL($,Z){let J=$.pid;if(!J||Z?.exited?.())return;if(process.platform==="win32"){await new Promise((Y)=>{let Q=PL("taskkill",["/pid",String(J),"/f","/t"],{stdio:"ignore",windowsHide:!0});Q.once("exit",()=>Y()),Q.once("error",()=>Y())});return}try{if(process.kill(-J,"SIGTERM"),await fj(mj),!Z?.exited?.())process.kill(-J,"SIGKILL")}catch(Y){if($.kill("SIGTERM"),await fj(mj),!Z?.exited?.())$.kill("SIGKILL")}}function AL($){if(process.platform!=="win32")return $;let Z=z$.windowsPath($);if(aY.win32.dirname(Z)!=="."){if(Z.startsWith("/")&&dZ(Z)==="bash")return yK()||Z;return Z}return j$(Z)||Z}function NL(){let $=j$("pwsh.exe");if($)return $;let Z=j$("powershell.exe");if(Z)return Z}function dj($,Z){if($&&(!Z?.acceptable||!ML.has(dZ($))))return AL($);if(process.platform==="win32"){let J=NL();if(J)return J}return IL()}function yK(){if(process.platform!=="win32")return;if(m0.QITQODE_GIT_BASH_PATH)return m0.QITQODE_GIT_BASH_PATH;let $=j$("git");if(!$)return;let Z=aY.join($,"..","..","bin","bash.exe");if(z$.stat(Z)?.size)return Z}function IL(){if(process.platform==="win32"){let Z=yK();if(Z)return Z;return process.env.COMSPEC||"cmd.exe"}if(process.platform==="darwin")return"/bin/zsh";let $=j$("bash");if($)return $;return"/bin/sh"}function dZ($){if(process.platform==="win32")return aY.win32.parse(z$.windowsPath($)).name.toLowerCase();return aY.basename($).toLowerCase()}function LL($){return CL.has(dZ($))}function SL($){return wL.has(dZ($))}var RL=J9(()=>dj(process.env.SHELL)),TL=J9(()=>dj(process.env.SHELL,{acceptable:!0}));var b$={};R0(b$,{set:()=>EL,get:()=>kL,clear:()=>gL,SessionCwd:()=>b$,Event:()=>bL});var xL=1000,U6=new Map;cj(async()=>{U6.clear()});var bL={Changed:S0.define("session.cwd",q.object({sessionID:g0.zod,cwd:q.string()}))};function kL($){return U6.get($)??F0.directory}function EL($,Z){if(U6.delete($),U6.set($,Z),U6.size>xL){let J=U6.keys().next().value;if(J!==void 0)U6.delete(J)}}function gL($){U6.delete($)}var uZ={};R0(uZ,{prefixWith:()=>hL,BashArity:()=>uZ});function hL($,Z){return cZ.bashPrefixWith($,Z)}import vL from"crypto";var AK=J0.create({service:"bash-interactive"}),uj={Asked:S0.define("bash.interactive.asked",q.object({id:q.string(),command:q.string(),cwd:q.string(),env:q.record(q.string(),q.string()).optional(),description:q.string()})),Replied:S0.define("bash.interactive.replied",q.object({id:q.string(),output:q.string(),exitCode:q.number()}))};class lj extends Error{constructor($){super($);this.name="BashInteractiveError"}}class tY extends Q0.Service()("@qitqode/BashInteractive"){}var fL=b.effect(tY,V.gen(function*(){let $=yield*e.Service,Z=yield*u.make(V.fn("BashInteractive.state")(function*(){let X={pending:new Map};return yield*V.addFinalizer(()=>V.gen(function*(){for(let K of X.pending.values())yield*p0.fail(K.deferred,new lj("Instance disposed"));X.pending.clear()})),X})),J=V.fn("BashInteractive.request")(function*(X){let K=(yield*u.get(Z)).pending,G=vL.randomUUID();AK.info("requesting interactive",{id:G,command:X.command});let B=yield*p0.make(),H={id:G,command:X.command,cwd:X.cwd,env:X.env,description:X.description};return K.set(G,{request:H,deferred:B}),yield*$.publish(uj.Asked,H),yield*sY.awaitDeferred(B,()=>{K.delete(G)})}),Y=V.fn("BashInteractive.reply")(function*(X){let K=(yield*u.get(Z)).pending,G=K.get(X.id);if(!G){AK.warn("reply for unknown request",{id:X.id});return}K.delete(X.id),AK.info("replied",{id:X.id,exitCode:X.exitCode}),yield*$.publish(uj.Replied,{id:G.request.id,output:X.output,exitCode:X.exitCode}),yield*p0.succeed(G.deferred,{output:X.output,exitCode:X.exitCode})}),Q=V.fn("BashInteractive.list")(function*(){let X=(yield*u.get(Z)).pending;return Array.from(X.values(),(K)=>K.request)});return tY.of({request:J,reply:Y,list:Q})})),NK=fL.pipe(b.provide(e.layer)),{runPromise:mL}=G7(tY,NK);function pj($){return mL((Z)=>Z.request($))}var ij=30000,lL=m0.QITQODE_EXPERIMENTAL_BASH_DEFAULT_TIMEOUT_MS||120000,tj=new Set(["powershell","pwsh"]),ej=new Set(["cd","push-location","set-location"]),pL=new Set([...ej,"rm","cp","mv","mkdir","touch","chmod","chown","cat","get-content","set-content","add-content","copy-item","move-item","remove-item","new-item","rename-item"]),oL=new Set(["-destination","-literalpath","-path"]),iL=new Set(["-confirm","-debug","-force","-nonewline","-recurse","-verbose","-whatif"]),TK=J0.create({service:"bash-tool"}),LK=($)=>{if($.startsWith("file://"))return oj($);if($.startsWith("/")||/^[a-z]:/i.test($))return $;let Z=new URL($,import.meta.url);return oj(Z)};function nL($){let Z=[];for(let J=0;J<$.childCount;J++){let Y=$.child(J);if(!Y)continue;if(Y.type==="command_elements"){for(let Q=0;Q<Y.childCount;Q++){let X=Y.child(Q);if(!X||X.type==="command_argument_sep"||X.type==="redirection")continue;Z.push({type:X.type,text:X.text})}continue}if(Y.type!=="command_name"&&Y.type!=="command_name_expr"&&Y.type!=="word"&&Y.type!=="string"&&Y.type!=="raw_string"&&Y.type!=="concatenation")continue;Z.push({type:Y.type,text:Y.text})}return Z}function sL($){return($.parent?.type==="redirected_statement"?$.parent.text:$.text).trim()}function rL($){return $.descendantsOfType("command").filter((Z)=>Boolean(Z))}function $O($){if($.length<2)return $;let Z=$[0],J=$[$.length-1];if((Z==='"'||Z==="'")&&Z===J)return $.slice(1,-1);return $}function ZO($){if($==="~")return RK.homedir();if($.startsWith("~/")||$.startsWith("~\\"))return X9.join(RK.homedir(),$.slice(2));return $}function nj($){if(process.platform!=="win32")return process.env[$];let Z=Object.keys(process.env).find((J)=>J.toLowerCase()===$.toLowerCase());return Z?process.env[Z]:void 0}function aL($,Z,J){let Y=$.toUpperCase();if(Y==="HOME")return RK.homedir();if(Y==="PWD")return Z;if(Y==="PSHOME")return X9.dirname(J)}function tL($,Z,J){let Y=$O($).replace(/\$\{env:([^}]+)\}/gi,(Q,X)=>nj(X)||"").replace(/\$env:([A-Za-z_][A-Za-z0-9_]*)/gi,(Q,X)=>nj(X)||"").replace(/\$(HOME|PWD|PSHOME)(?=$|[\\/])/gi,(Q,X)=>aL(X,Z,J)||"");return ZO(Y)}function eL($){let Z=$.match(/^([A-Za-z]+)::(.*)$/);if(Z){if(Z[1].toLowerCase()!=="filesystem")return;return Z[2]}let J=$.match(/^([A-Za-z]+):(.*)$/);if(!J)return $;if(J[1].length===1)return $;return}function $S($,Z){if($.startsWith("(")||$.startsWith("@("))return!0;if($.includes("$(")||$.includes("${")||$.includes("`"))return!0;if(Z)return/\$(?!env:)/i.test($);return $.includes("$")}function ZS($){let Z=/[?*[]/.exec($);if(!Z)return $;if(Z.index===0)return;return $.slice(0,Z.index)}function JS($,Z){if(!Z)return $.slice(1).filter((Q)=>!Q.text.startsWith("-")&&!($[0]?.text==="chmod"&&Q.text.startsWith("+"))).map((Q)=>Q.text);let J=[],Y=!1;for(let Q of $.slice(1)){if(Y){J.push(Q.text),Y=!1;continue}if(Q.type==="command_parameter"){let X=Q.text.toLowerCase();if(iL.has(X))continue;Y=oL.has(X);continue}J.push(Q.text)}return J}function sj($){if($.length<=ij)return $;return`...
|
|
87
87
|
|
|
88
|
-
`+$.slice(-ij)}var YS=/error|exception|failed|fatal|traceback|panic|exit code/i,rj=Math.floor(v8*0.7),aj=Math.floor(V7*0.7),QS=V.fn("BashTool.parse")(function*($,Z){let J=yield*V.promise(()=>KS().then((Y)=>(Z?Y.ps:Y.bash).parse($)).catch((Y)=>{return TK.warn("tree-sitter parse of command failed",{error:String(Y)}),null}));if(!J)throw Error("Failed to parse command");return J.rootNode}),XS=V.fn("BashTool.ask")(function*($,Z){if(Z.dirs.size>0){let J=Array.from(Z.dirs).map((Y)=>{if(process.platform==="win32")return V0.normalizePathPattern(X9.join(Y,"*"));return X9.join(Y,"*")});yield*$.ask({permission:"external_directory",patterns:J,always:J,metadata:{}})}if(Z.patterns.size===0)return;yield*$.ask({permission:"bash",patterns:Array.from(Z.patterns),always:Array.from(Z.always),metadata:{}})});function VS($,Z,J,Y,Q){if(process.platform==="win32"&&tj.has(Z))return m2.make($,["-NoLogo","-NoProfile","-NonInteractive","-Command",J],{cwd:Y,env:Q,stdin:"ignore",detached:!1});return m2.make(J,[],{shell:$,cwd:Y,env:Q,stdin:"ignore",detached:process.platform!=="win32"})}var KS=J9(async()=>{let{Parser:$}=await import("./chunk-
|
|
88
|
+
`+$.slice(-ij)}var YS=/error|exception|failed|fatal|traceback|panic|exit code/i,rj=Math.floor(v8*0.7),aj=Math.floor(V7*0.7),QS=V.fn("BashTool.parse")(function*($,Z){let J=yield*V.promise(()=>KS().then((Y)=>(Z?Y.ps:Y.bash).parse($)).catch((Y)=>{return TK.warn("tree-sitter parse of command failed",{error:String(Y)}),null}));if(!J)throw Error("Failed to parse command");return J.rootNode}),XS=V.fn("BashTool.ask")(function*($,Z){if(Z.dirs.size>0){let J=Array.from(Z.dirs).map((Y)=>{if(process.platform==="win32")return V0.normalizePathPattern(X9.join(Y,"*"));return X9.join(Y,"*")});yield*$.ask({permission:"external_directory",patterns:J,always:J,metadata:{}})}if(Z.patterns.size===0)return;yield*$.ask({permission:"bash",patterns:Array.from(Z.patterns),always:Array.from(Z.always),metadata:{}})});function VS($,Z,J,Y,Q){if(process.platform==="win32"&&tj.has(Z))return m2.make($,["-NoLogo","-NoProfile","-NonInteractive","-Command",J],{cwd:Y,env:Q,stdin:"ignore",detached:!1});return m2.make(J,[],{shell:$,cwd:Y,env:Q,stdin:"ignore",detached:process.platform!=="win32"})}var KS=J9(async()=>{let{Parser:$}=await import("./chunk-2k7bbzj2.js"),{default:Z}=await import("./chunk-j9m2d6t5.js",{with:{type:"wasm"}}),J=LK(Z);await $.init({locateFile(){return J}});let{default:Y}=await import("./chunk-e9pfdjcy.js",{with:{type:"wasm"}}),{default:Q}=await import("./chunk-d5wp85kw.js",{with:{type:"wasm"}}),X=LK(Y),K=LK(Q),[G,B]=await Promise.all([SK.load(X),SK.load(K)]),H=new $;H.setLanguage(G);let W=new $;return W.setLanguage(B),{bash:H,ps:W}}),JO=h0("bash",V.gen(function*(){let $=(yield*X0.toolDescriptionEffect("bash"))??"",Z=yield*IY,J=yield*V0.Service,Y=yield*l1,Q=yield*s0.Service,X=V.fn("BashTool.cygpath")(function*(j,O){let F=(yield*Z.lines(m2.make(j,["-lc",'cygpath -w -- "$1"',"_",O])).pipe(V.catch(()=>V.succeed([]))))[0]?.trim();if(!F)return;return V0.normalizePath(F)}),K=V.fn("BashTool.resolvePath")(function*(j,O,U){if(process.platform==="win32"){if(U1.posix(U)&&j.startsWith("/")&&V0.windowsPath(j)===j){let F=yield*X(U,j);if(F)return F}return V0.normalizePath(X9.resolve(O,V0.windowsPath(j)))}return X9.resolve(O,j)}),G=V.fn("BashTool.argPath")(function*(j,O,U,F){let D=U?tL(j,O,F):ZO($O(j)),w=D&&ZS(D);if(!w||$S(w,U))return;let _=U?eL(w):w;if(!_)return;return yield*K(_,O,F)}),B=V.fn("BashTool.collect")(function*(j,O,U,F){let D={dirs:new Set,patterns:new Set,always:new Set},w=yield*V.promise(()=>X0.resolveBashArity());for(let _ of rL(j)){let z=nL(_),C=z.map((I)=>I.text),P=U?C[0]?.toLowerCase():C[0];if(P&&pL.has(P))for(let I of JS(z,U)){let L=yield*G(I,O,U,F);if(TK.info("resolved path",{arg:I,resolved:L}),!L||F0.containsPath(L))continue;let x=(yield*J.isDir(L))?L:X9.dirname(L);D.dirs.add(x)}if(C.length&&(!P||!ej.has(P)))D.patterns.add(sL(_)),D.always.add(uZ.prefixWith(w,C).join(" ")+" *")}return D}),H=V.fn("BashTool.shellEnv")(function*(j,O){let U=yield*Q.trigger("shell.env",{cwd:O,sessionID:j.sessionID,callID:j.callID},{env:{}});return{...W7(),...U.env}}),W=V.fn("BashTool.run")(function*(j,O){let U=v8,F=V7,D=U*2,w="",_="",z=[],C=0,P="",I,L=!1,x=!1,h=!1;yield*O.metadata({metadata:{output:"",description:j.description}});let R=yield*V.scoped(V.gen(function*(){let y=yield*Z.spawn(VS(j.shell,j.name,j.command,j.cwd,j.env));yield*V.forkScoped(f0.runForEach(f0.decodeText(y.all),(l)=>{let d=Buffer.byteLength(l,"utf-8");z.push({text:l,size:d}),C+=d;while(C>D&&z.length>1){let c=z.shift();if(!c)break;C-=c.size,L=!0}if(_=sj(_+l),P)I?.write(l);else if(w+=l,Buffer.byteLength(w,"utf-8")>U)return Y.write(w).pipe(V.andThen((c)=>V.sync(()=>{P=c,L=!0,I=dL(c,{flags:"a"}),w=""})),V.andThen(O.metadata({metadata:{output:_,description:j.description}})));return O.metadata({metadata:{output:_,description:j.description}})}));let S=V.callback((l)=>{if(O.abort.aborted)return l(V.void);let d=()=>l(V.void);if(O.abort.addEventListener("abort",d,{once:!0}),O.abort.aborted)d();return V.sync(()=>O.abort.removeEventListener("abort",d))}),k=V.sleep(`${j.timeout+100} millis`),r=yield*V.raceAll([y.exitCode.pipe(V.map((l)=>({kind:"exit",code:l}))),S.pipe(V.map(()=>({kind:"abort",code:null}))),k.pipe(V.map(()=>({kind:"timeout",code:null})))]);if(r.kind==="abort")h=!0,yield*y.kill({forceKillAfter:"3 seconds"}).pipe(V.orDie);if(r.kind==="timeout")x=!0,yield*y.kill({forceKillAfter:"3 seconds"}).pipe(V.orDie);return r.kind==="exit"?r.code:null})).pipe(V.orDie),f=[];if(x)f.push(`bash tool terminated command after exceeding timeout ${j.timeout} ms. If this command is expected to take longer and is not waiting for interactive input, retry with a larger timeout value in milliseconds.`);if(h)f.push("User aborted the command");let N=z.map((y)=>y.text).join(""),T=qK(N,F,U);if(T.cut)L=!0;if(!P&&T.cut)P=yield*Y.write(N);let E=T.text;if(!E)E="(no output)";if(L&&P){let y=T.text.length>2048?T.text.slice(-2048):T.text;if(YS.test(y)){let k=yield*V.promise(async()=>{try{let r=await uL(P),l=rj*2,d=await cL(P,"r");try{let c=Math.min(Number(r.size),l),i=Buffer.alloc(c);await d.read(i,0,c,0);let K0=i.toString("utf-8"),a=1;for(let $0=0;$0<K0.length;$0++)if(K0.charCodeAt($0)===10)a++;let v=a<=aj+F;return{text:K0,overlaps:v}}finally{await d.close()}}catch{return}});if(k){let r=k.text;if(!k.overlaps){let l=FK(r,aj,rj);E=`...output truncated (head+tail shown due to errors)...
|
|
89
89
|
|
|
90
90
|
Full output saved to: ${P}
|
|
91
91
|
|
|
@@ -7538,7 +7538,7 @@ For full type signatures, all available fields, and more examples:
|
|
|
7538
7538
|
- Cannot modify the permission system
|
|
7539
7539
|
- Tool output truncated at 50KB / 2000 lines
|
|
7540
7540
|
- Prefer small, composable extensions over monolithic ones
|
|
7541
|
-
`}}}catch($){if($ instanceof ReferenceError)return jz();throw $}}var Vg=Xg(),Kg=J0.create({service:"skill.builtin"}),Uz=V.fn("Skill.extractBuiltinBundle")(function*($){let Z=Oz.join(PJ.data,"builtin_skills",L1),J=Oz.join(Z,".extracted");return yield*OX({fsys:$,bundle:Vg,root:Z,marker:J,markerContent:L1,skipIfPresent:!FX,onExtracted:(Y)=>Kg.info("extracted builtin skills",{root:Y})})});var MJ=J0.create({service:"skill"}),Bg=[".claude",".agents",".codex",".opencode"],Fz="skills/**/SKILL.md",Hg="{skill,skills}/**/SKILL.md",qX="**/SKILL.md",qz=q.object({name:q.string(),description:q.string(),location:q.string(),content:q.string(),hidden:q.boolean().optional()}),jg=F$.create("SkillInvalidError",q.object({path:q.string(),message:q.string().optional(),issues:q.custom().optional()})),Og=F$.create("SkillNameMismatchError",q.object({path:q.string(),expected:q.string(),actual:q.string()})),Ug=V.fnUntraced(function*($,Z,J){let Y=yield*V.tryPromise({try:()=>M9.parse(Z),catch:(X)=>X}).pipe(V.catch(V.fnUntraced(function*(X){let K=M9.FrontmatterError.isInstance(X)?X.data.message:`Failed to parse skill ${Z}`,{Session:G}=yield*V.promise(()=>import("./chunk-
|
|
7541
|
+
`}}}catch($){if($ instanceof ReferenceError)return jz();throw $}}var Vg=Xg(),Kg=J0.create({service:"skill.builtin"}),Uz=V.fn("Skill.extractBuiltinBundle")(function*($){let Z=Oz.join(PJ.data,"builtin_skills",L1),J=Oz.join(Z,".extracted");return yield*OX({fsys:$,bundle:Vg,root:Z,marker:J,markerContent:L1,skipIfPresent:!FX,onExtracted:(Y)=>Kg.info("extracted builtin skills",{root:Y})})});var MJ=J0.create({service:"skill"}),Bg=[".claude",".agents",".codex",".opencode"],Fz="skills/**/SKILL.md",Hg="{skill,skills}/**/SKILL.md",qX="**/SKILL.md",qz=q.object({name:q.string(),description:q.string(),location:q.string(),content:q.string(),hidden:q.boolean().optional()}),jg=F$.create("SkillInvalidError",q.object({path:q.string(),message:q.string().optional(),issues:q.custom().optional()})),Og=F$.create("SkillNameMismatchError",q.object({path:q.string(),expected:q.string(),actual:q.string()})),Ug=V.fnUntraced(function*($,Z,J){let Y=yield*V.tryPromise({try:()=>M9.parse(Z),catch:(X)=>X}).pipe(V.catch(V.fnUntraced(function*(X){let K=M9.FrontmatterError.isInstance(X)?X.data.message:`Failed to parse skill ${Z}`,{Session:G}=yield*V.promise(()=>import("./chunk-qh99kv2j.js"));yield*J.publish(G.Event.Error,{error:new F$.Unknown({message:K}).toObject()}),MJ.error("failed to load skill",{skill:Z,err:X});return})));if(!Y)return;let Q=qz.pick({name:!0,description:!0,hidden:!0}).safeParse(Y.data);if(!Q.success)return;if($.skills[Q.data.name])MJ.warn("duplicate skill name",{name:Q.data.name,existing:$.skills[Q.data.name].location,duplicate:Z});$.dirs.add(m7.dirname(Z)),$.skills[Q.data.name]={name:Q.data.name,description:Q.data.description,location:Z,content:Y.content,hidden:Q.data.hidden}}),P9=V.fnUntraced(function*($,Z,J,Y){let Q=yield*V.tryPromise({try:()=>g8.scan(J,{cwd:Z,absolute:!0,include:"file",symlink:!0,dot:Y?.dot}),catch:(X)=>X}).pipe(V.catch((X)=>{if(!Y?.scope)return V.die(X);return MJ.error(`failed to scan ${Y.scope} skills`,{dir:Z,error:X}),V.succeed([])}));for(let X of Q)$.matches.add(X),$.dirs.add(m7.dirname(X))}),Fg=V.fnUntraced(function*($,Z,J,Y,Q){let X={matches:new Set,dirs:new Set};if(!m0.QITQODE_DISABLE_BUILTIN_SKILLS){let B=yield*Uz(J).pipe(V.catch(()=>V.succeed(void 0)));if(B&&(yield*J.isDir(B)))yield*P9(X,B,qX,{scope:"builtin"})}if(!m0.QITQODE_DISABLE_COMPOSE_SKILLS){let B=yield*Bz(J).pipe(V.catch(()=>V.succeed(void 0)));if(B&&(yield*J.isDir(B)))yield*P9(X,B,qX,{scope:"compose"})}if(!m0.QITQODE_DISABLE_EXTERNAL_SKILLS){let B=Bg.filter((W)=>{if(W===".claude"&&m0.QITQODE_DISABLE_CLAUDE_CODE_SKILLS)return!1;if(W===".codex"&&m0.QITQODE_DISABLE_CODEX_SKILLS)return!1;if(W===".opencode"&&m0.QITQODE_DISABLE_OPENCODE_SKILLS)return!1;return!0});for(let W of B){let j=m7.join(t0.Path.home,W);if(!(yield*J.isDir(j)))continue;yield*P9(X,j,Fz,{dot:!0,scope:"global"})}let H=yield*J.up({targets:B,start:Y,stop:Q}).pipe(V.catch(()=>V.succeed([])));for(let W of H)yield*P9(X,W,Fz,{dot:!0,scope:"project"})}let K=yield*$.directories();for(let B of K)yield*P9(X,B,Hg);let G=yield*$.get();for(let B of G.skills?.paths??[]){let H=B.startsWith("~/")?m7.join(Gg.homedir(),B.slice(2)):B,W=m7.isAbsolute(H)?H:m7.join(Y,H);if(!(yield*J.isDir(W))){MJ.warn("skill path not found",{path:W});continue}yield*P9(X,W,qX)}for(let B of G.skills?.urls??[]){let H=yield*Z.pull(B);for(let W of H)yield*P9(X,W,qX)}return{matches:Array.from(X.matches),dirs:Array.from(X.dirs)}}),qg=V.fnUntraced(function*($,Z,J){yield*V.forEach(Z.matches,(Y)=>Ug($,Y,J),{concurrency:16,discard:!0}),MJ.info("init",{count:Object.keys($.skills).length})});class DX extends Q0.Service()("@qitqode/Skill"){}var Dz=b.effect(DX,V.gen(function*(){let $=yield*w6.Service,Z=yield*B0.Service,J=yield*e.Service,Y=yield*V0.Service,Q=yield*u.make(V.fn("Skill.discovery")(function*(j){return yield*Fg(Z,$,Y,j.directory,j.worktree)})),X=yield*u.make(V.fn("Skill.state")(function*(j){let O={skills:{},dirs:new Set};return yield*qg(O,yield*u.get(Q),J),O})),K=V.fn("Skill.get")(function*(j){return(yield*u.get(X)).skills[j]}),G=V.fn("Skill.all")(function*(){let j=yield*u.get(X);return Object.values(j.skills)}),B=V.fn("Skill.dirs")(function*(){return(yield*u.get(Q)).dirs}),H=V.fn("Skill.available")(function*(j){let O=yield*u.get(X),U=Object.values(O.skills).filter((F)=>!F.hidden);if(U=U.toSorted((F,D)=>F.name.localeCompare(D.name)),!j)return U;return U.filter((F)=>P0.evaluate("skill",F.name,j.permission).action!=="deny")}),W=V.fn("Skill.reload")(function*(){yield*u.invalidate(Q),yield*u.invalidate(X)});return DX.of({get:K,all:G,dirs:B,available:H,reload:W})})),Dg=Dz.pipe(b.provide(w6.defaultLayer),b.provide(B0.defaultLayer),b.provide(e.layer),b.provide(V0.defaultLayer));function zg($,Z){if($.length===0)return"No skills are currently available.";if(Z.verbose)return["<available_skills>",...$.sort((J,Y)=>J.name.localeCompare(Y.name)).flatMap((J)=>[" <skill>",` <name>${J.name}</name>`,` <description>${J.description}</description>`,` <location>${Wg(J.location).href}</location>`," </skill>"]),"</available_skills>"].join(`
|
|
7542
7542
|
`);return["## Available Skills",...$.toSorted((J,Y)=>J.name.localeCompare(Y.name)).map((J)=>`- **${J.name}**: ${J.description}`)].join(`
|
|
7543
7543
|
`)}var yW=h0("skill",V.gen(function*(){let $=(yield*X0.toolDescriptionEffect("skill"))??"",Z=yield*Y2.Service,J=yield*d2.Service;return{description:$,parameters:qj,execute:(Y,Q)=>V.gen(function*(){let X=yield*Z.get(Y.name);if(!X){let j=(yield*Z.all()).map((O)=>O.name).join(", ");throw Error(`Skill "${Y.name}" not found. Available skills: ${j||"none"}`)}yield*Q.ask({permission:"skill",patterns:[Y.name],always:[Y.name],metadata:{}});let K=zz.dirname(X.location),G=_g(K).href,B=10,H=yield*J.files({cwd:K,follow:!1,hidden:!0,signal:Q.abort}).pipe(c7((W)=>!W.includes("SKILL.md")),d7((W)=>zz.resolve(K,W)),YQ(B),e9,V.map((W)=>[...W].map((j)=>`<file>${j}</file>`).join(`
|
|
7544
7544
|
`)));return{title:`Loaded skill: ${X.name}`,output:[`<skill_content name="${X.name}">`,`# Skill: ${X.name}`,"",X.content.trim(),"",`Base directory for this skill: ${G}`,"Relative paths in this skill (e.g., scripts/, reference/) are relative to this base directory.","Note: file list is sampled.","","<skill_files>",H,"</skill_files>","</skill_content>"].join(`
|
|
@@ -8115,7 +8115,7 @@ If you repeat the same output again, the session will be terminated.
|
|
|
8115
8115
|
`)})});function AC($){if(!$.lastFinished)return;let Z=[];for(let Q=$.msgs.length-1;Q>=0&&Z.length<qB;Q--){let X=$.msgs[Q];if(X.info.role!=="assistant"||!X.info.finish)continue;let K=rJ(X.parts);if(K===void 0)break;Z.push(K)}if(!(Z.length===qB&&Z.every((Q)=>Q===Z[0])))return;let Y=$.msgs.findLast((Q)=>Q.info.role==="user");if(!Y||Y.parts.some((Q)=>Q.type==="text"&&Q.text?.includes("repeating the same action")))return;Y.parts.push({id:d0.ascending(),messageID:Y.info.id,sessionID:$.sessionID,type:"text",synthetic:!0,text:["<system-reminder>",`Your last ${qB} steps have been identical \u2014 you appear to be`,"repeating the same action without making progress. Stop and reconsider:","the current approach is not working. Try a different strategy, use a","different tool, or if you are blocked, explain the blocker to the user","instead of repeating the same step again.","</system-reminder>"].join(`
|
|
8116
8116
|
`)})}var DB=J0.create({service:"auto-dream"}),zB=86400000,rm=7,am=30,LC=1e4,_B="Auto Dream",PB="Auto Distill",NC=0,IC=0,SC=["Run one automatic dream memory consolidation pass for the current project.","","Use the memory files as the working index and the raw qitqode trajectory database as the source of truth.","Use bash for read-only SQLite and filesystem inspection. Do not modify the database.","Consolidate only durable, verified information into project memory."].join(`
|
|
8117
8117
|
`),RC=["Run one automatic distill pass for the current project.","","Review the past month of sessions and identify repeated manual workflows worth packaging.","Use the raw qitqode trajectory database as the source of truth and memory files to spot cross-session patterns.","Inventory existing skills, agents, and commands first so you reuse or extend instead of duplicating.","Use bash for read-only SQLite and filesystem inspection. Do not modify the database.","Produce a compact shortlist, then create only the high-confidence missing assets."].join(`
|
|
8118
|
-
`);function TC($){return V.gen(function*(){if(!$.enabled)return!1;let Z=$.intervalDays*zB,J=yield*V.sync(()=>C0.use((X)=>X.select({time_created:K$.time_created}).from(K$).where(_0(K$.title,$.title)).orderBy(N8(K$.time_created)).limit(1).get())),Y=Date.now(),Q=J?Y-J.time_created:1/0;if(!J){let X=yield*V.sync(()=>C0.use((K)=>K.select({time_created:K$.time_created}).from(K$).where(sZ(K$.parent_id)).orderBy(G8(K$.time_created)).limit(1).get()));if(!X||Y-X.time_created<Z)return DB.info(`auto-${$.label} skipped \u2014 project too young`,{projectAge:X?Math.round((Y-X.time_created)/zB)+"d":"empty",interval:$.intervalDays+"d"}),!1}if(Q<Z)return DB.info(`auto-${$.label} skipped \u2014 last run too recent`,{lastRunAgo:Math.round(Q/zB)+"d",interval:$.intervalDays+"d"}),!1;return DB.info(`auto-${$.label} triggering`,{lastRun:J?new Date(J.time_created).toISOString():"never",interval:$.intervalDays+"d"}),!0})}function xC($){let Z=$.dream?.auto!==!1;if(!Z)return V.succeed(!1);let J=Date.now();if(J-NC<LC)return V.succeed(!1);NC=J;let Y=$.dream?.interval_days??rm;return TC({enabled:Z,intervalDays:Y,title:_B,label:"dream"})}function bC($){let Z=$.distill?.auto!==!1;if(!Z)return V.succeed(!1);let J=Date.now();if(J-IC<LC)return V.succeed(!1);IC=J;let Y=$.distill?.interval_days??am;return TC({enabled:Z,intervalDays:Y,title:PB,label:"distill"})}var kC=V.fnUntraced(function*($){let Z=yield*$.config.get(),J=yield*xC(Z).pipe(V.catch(()=>V.succeed(!1))),Y=yield*bC(Z).pipe(V.catch(()=>V.succeed(!1))),Q={providerID:$.lastUser.model.providerID,modelID:$.lastUser.model.modelID};if(!J&&!Y)return;let{AppRuntime:X}=yield*V.promise(()=>import("./chunk-zzr8smtm.js"));if(J)X.runPromise(h$.use((K)=>V.gen(function*(){let G=yield*K.create({title:_B});yield*(yield*$.promptServiceTag).prompt({sessionID:G.id,agent:"dream",model:Q,parts:[{type:"text",text:SC}]})}))).catch((K)=>$.log.error("auto-dream prompt failed",{error:String(K)}));if(Y)X.runPromise(h$.use((K)=>V.gen(function*(){let G=yield*K.create({title:PB});yield*(yield*$.promptServiceTag).prompt({sessionID:G.id,agent:"distill",model:Q,parts:[{type:"text",text:RC}]})}))).catch((K)=>$.log.error("auto-distill prompt failed",{error:String(K)}))});var em=($)=>$.pipe(V.catchDefect((Z)=>Z instanceof X0.BackendAuthRejectedError?V.succeed(void 0):V.die(Z))),MB=($)=>em(V.promise(()=>X0.resolvePrompt($))).pipe(V.map((Z)=>Z??"")),EC=V.gen(function*(){let $=yield*MB("session/build-switch"),Z=yield*MB("session/max-steps"),J=yield*MB("session/compose");return{buildSwitch:$,maxSteps:Z,promptCompose:J}});var gC=N1.create({service:"session.prompt"}),$d=J0.create({service:"session.prompt"});function hC($,Z,J,Y){return V.gen(function*(){let{bus:Q,status:X,sessions:K,agents:G,provider:B,processor:H,prune:W,checkpoint:j,compaction:O,config:U,plugin:F,permission:D,fsys:w,registry:_,scope:z,instruction:C,state:P,goal:I,taskGateState:L,taskRegistry:x,revert:h,summary:R,sys:f,llm:N,actorRegistry:T,inbox:E}=yield*eV,y=yield*EC,S=y.buildSwitch,k=y.maxSteps,r=y.promptCompose,l=(G0,Z0,n)=>YC(B,Q,G0,Z0,n),d=(G0,Z0)=>XC(K,G0,Z0),c=FB(K),i=1024,K0=new class extends Set{add(G0){if(super.add(G0),this.size>1024){let Z0=this.values().next().value;if(Z0!==void 0)this.delete(Z0)}return this}},a=(G0)=>BB({getOps:$,...G0}),v=GC({agents:G,provider:B,llm:N,sessions:K,elog:gC}),$0=WC({sessions:K,fsys:w,buildSwitch:S,promptCompose:r});return{runLoop:V.fn("SessionPrompt.run")(function*(G0,Z0,n){let z0=yield*u.context,o=gC.with({sessionID:G0}),t,j0=0,w0=yield*K.get(G0),y0,r0,$$=Z0??"main",K2=$C({sessionID:G0,agentID:$$,task_id:n,plugin:F,bus:Q,prune:W,scope:z}),{cancellation:L2,agentMetrics:S2,publishAgentRequest:p$,schedulePrune:o$}=K2,Z$=eM({sessionID:G0,agentID:$$,task_id:n,session:w0,cancellation:L2,plugin:F});return yield*V.gen(function*(){yield*K2.before;let w1=(M0,u0)=>J3(fM(M0,u0,O0.parts(u0.id))),G2=!1,h1=CC({sessionID:G0,bus:Q,appendSyntheticUserTurn:c,slog:o}),D2=MC({sessionID:G0,sessions:K,bus:Q,appendSyntheticUserTurn:c,slog:o}),{autoContinueOutputLength:$8,autoContinueInvalidOutput:BY,autoRetryStructuredOutput:Z8,handleTextRepeat:A3,writeContentFilterError:HY,writeModelError:W$}=D2,o0=VC({sessionID:G0,agentID:Z0,agents:G,taskGateState:L,taskRegistry:x,appendSyntheticUserTurn:c,slog:o}),E$=KC({sessionID:G0,agentID:Z0,session:w0,goal:I,bus:Q,appendSyntheticUserTurn:c,slog:o});while(!0){if(!Z0||Z0==="main")yield*X.set(G0,{type:"busy"});yield*E.drain(G0,Z0??"main").pipe(V.ignore),yield*o.info("loop",{step:j0});let M0=yield*O0.filterCompactedEffect(G0,{contextFrom:w0.contextFrom,contextWatermark:w0.contextWatermark,agentID:Z0??"main"}),u0,p9,j1,W6,W2,l6=[];for(let e0=M0.length-1;e0>=0;e0--){let _2=M0[e0];if(!u0&&_2.info.role==="user")u0=_2.info,p9=_2;if(!j1&&_2.info.role==="assistant")j1=_2.info,W6=_2;if(!W2&&_2.info.role==="assistant"&&_2.info.finish)W2=_2.info;if(u0&&W2)break;if(!W2){let o9=_2.parts.filter((_8)=>_8.type==="subtask");l6.push(...o9)}}if(!u0)throw Error("No user message found in stream. This should never happen.");yield*wC({sessionID:G0,msgs:M0,checkpoint:j,config:U});let N3=W6?.parts.some((e0)=>e0.type==="tool"&&!e0.metadata?.providerExecuted)??!1;if(j1?.finish==="length"&&!N3&&u0.id<j1.id&&(yield*$8({lastUser:u0,assistant:j1})))continue;if(j1){let e0=VB({phase:"existing-assistant",lastUser:u0,assistant:j1,parts:W6?.parts??[]});if(e0.type==="filtered"){yield*HY({assistant:j1}),yield*o.info("exiting loop",{classification:e0.type});break}if(e0.type==="failed"){yield*W$({assistant:j1,reason:e0.reason}),yield*o.info("exiting loop",{classification:e0.type,reason:e0.reason});break}if(e0.type==="think-only"||e0.type==="invalid"){let _2=e0.type==="invalid"?e0.reason:"think-only";if(yield*BY({lastUser:u0,assistant:j1,reason:_2}))continue;yield*o.info("exiting loop",{classification:e0.type});break}if(e0.type==="final"&&e0.degraded)yield*o.warn("degraded final on abnormal finish",{finish:j1.finish});if(e0.type!=="continue"){if(yield*o0(u0))continue;if(yield*E$(u0))continue;yield*o.info("exiting loop",{classification:e0.type});break}}if(j0++,j0===1)yield*v({session:w0,modelID:u0.model.modelID,providerID:u0.model.providerID,history:M0}).pipe(V.ignore,V.forkIn(z));if(j0===1&&!w0.parentID)yield*kC({config:U,lastUser:u0,promptServiceTag:Y,log:$d});let a2=yield*l(u0.model.providerID,u0.model.modelID,G0);r0=a2,y0=W2;let z2=l6.pop();if(z2?.type==="subtask"){yield*a({task:z2,model:a2,lastUser:u0,sessionID:G0,session:w0,msgs:M0});continue}let p6=p9;if(p6?.parts.some((e0)=>e0.type==="compaction")){let e0=p6.parts.find((_8)=>_8.type==="compaction"),_2=yield*K.messages({sessionID:G0,agentID:u0.agentID??"main"});if((yield*O.process({parentID:u0.id,messages:_2,sessionID:G0,auto:e0?.auto??!1,overflow:e0?.overflow,agentID:u0.agentID}))==="stop")break;continue}yield*yC({sessionID:G0,msgs:M0,lastFinished:W2,model:a2,config:U}),AC({sessionID:G0,msgs:M0,lastFinished:W2});let z8=yield*G.get(u0.agent),yZ=z8?.native===!0&&z8?.hidden===!0;if(!G2&&!yZ&&W2&&W2.tokens){let e0=yield*$();yield*W.fireCheckpoints({sessionID:G0,model:a2,tokens:W2.tokens,promptOps:e0,agentID:u0.agentID}).pipe(V.ignore)}if(!G2&&W2&&W2.tokens){if(yield*aM({config:U,checkpoint:j,compaction:O,prune:W},{sessionID:G0,lastFinished:W2,lastUser:u0,model:a2,msgs:M0,isBoundedComputation:yZ})){G2=!0;continue}}if(G2=!1,!z8)throw yield*KB(G,Q,u0.agent,G0);let x8=z8.steps??1/0,N0=j0>=x8;M0=yield*$0({messages:M0,agent:z8,session:w0});let a0=X3({sessionID:G0,parentID:u0.id,agentID:u0.agentID,agent:z8.name,variant:u0.model.variant,cwd:z0.directory,root:z0.worktree,modelID:a2.id,providerID:a2.providerID});yield*K.updateMessage(a0);let C$=yield*H.create({assistantMessage:a0,sessionID:G0,model:a2,agentMetrics:S2}),o6=yield*V.gen(function*(){let e0={value:t},_2=yield*mM({sessionID:G0,resolvedAgentID:$$,step:j0,task_id:n,lastUser:u0,lastFinished:W2,msgs:M0,agent:z8,session:w0,model:a2,handle:C$,structured:e0,resolveTools:Z,createStructuredOutputTool:J,summary:R,scope:z,plugin:F}),{tools:o9,format:_8,query:I3}=_2,{cancelledByPlugin:L3,withUserQueryPost:S3}=dM({sessionID:G0,agentID:$$,step:j0,lastUser:u0,msgs:M0,query:I3,handle:C$,plugin:F,sessions:K,cancellation:L2,trajectoryForStep:w1}),R3=V.fnUntraced(function*(i9){if(i9==="continue"&&(yield*$8({lastUser:u0,assistant:C$.message})))return"continue";if(i9==="text-repeat"){if(yield*A3({lastUser:u0}))return"continue";return"break"}if(e0.value!==void 0)return t=e0.value,C$.message.structured=e0.value,C$.message.finish=C$.message.finish??"stop",yield*K.updateMessage(C$.message),"break";let f1=VB({phase:"after-process",lastUser:u0,assistant:C$.message,parts:O0.parts(C$.message.id),processResult:i9});if(f1.type==="filtered")return yield*HY({assistant:C$.message}),"break";if(f1.type==="failed")return yield*W$({assistant:C$.message,reason:f1.reason}),"break";if(f1.type!=="continue"&&!C$.message.error&&_8.type==="json_schema"){if(yield*Z8({lastUser:u0,assistant:C$.message}))return"continue";return"break"}if((f1.type==="think-only"||f1.type==="invalid")&&_8.type!=="json_schema"){let T3=f1.type==="invalid"?f1.reason:"think-only";if(yield*BY({lastUser:u0,assistant:C$.message,reason:T3}))return"continue";return"break"}if(f1.type==="final"&&f1.degraded)yield*o.warn("degraded final on abnormal finish",{finish:C$.message.finish});if(i9==="stop")return"break";return}),AZ=yield*nM({sessionID:G0,lastUser:u0,agent:z8,session:w0,model:a2,msgs:M0,tools:o9,format:_8,handle:C$,isLastStep:N0,task_id:n,instructionsNotified:K0,maxStepsText:k,actorRegistry:T,bus:Q,config:U,instruction:C,llm:N,registry:_,status:X,sys:f,cancelledByPlugin:L3,withUserQueryPost:S3,slog:o});if(AZ.kind==="break")return"break";let jY=yield*R3(AZ.result);if(jY)return jY;if(AZ.result==="overflow")yield*tM({config:U,checkpoint:j,compaction:O,prune:W},{sessionID:G0,lastUser:u0,model:a2,msgs:M0,isBoundedComputation:yZ});return"continue"}).pipe(V.ensuring(C.clear(C$.message.id))),Y8=yield*h1.check({lastUser:u0,completedParts:O0.parts(C$.message.id)});if(Y8==="terminate")break;if(Y8==="recovered")continue;if(o6==="break"){if(yield*o0(u0))continue;if(yield*E$(u0))continue;break}continue}let v1=yield*$();if(r0&&y0)yield*o$({model:r0,lastFinished:y0,promptOps:v1});let r2=yield*d(G0,Z0),u6=r2.info.role==="assistant"&&!!r2.info.error,J8=yield*K.findMessage(G0,(M0)=>M0.info.role==="user",{agentID:"*"});return yield*p$(u6?"error":"completed",S$.isSome(J8)?J8.value.info.agent:r2.info.agent),r2}).pipe((w1)=>GB(G0,Q,w1),V.onExit(Z$),V.orDie)}),lastAssistant:d}})}import vC from"path";var Zd=new TextEncoder,CB=new TextDecoder,Jd=($)=>`
|
|
8118
|
+
`);function TC($){return V.gen(function*(){if(!$.enabled)return!1;let Z=$.intervalDays*zB,J=yield*V.sync(()=>C0.use((X)=>X.select({time_created:K$.time_created}).from(K$).where(_0(K$.title,$.title)).orderBy(N8(K$.time_created)).limit(1).get())),Y=Date.now(),Q=J?Y-J.time_created:1/0;if(!J){let X=yield*V.sync(()=>C0.use((K)=>K.select({time_created:K$.time_created}).from(K$).where(sZ(K$.parent_id)).orderBy(G8(K$.time_created)).limit(1).get()));if(!X||Y-X.time_created<Z)return DB.info(`auto-${$.label} skipped \u2014 project too young`,{projectAge:X?Math.round((Y-X.time_created)/zB)+"d":"empty",interval:$.intervalDays+"d"}),!1}if(Q<Z)return DB.info(`auto-${$.label} skipped \u2014 last run too recent`,{lastRunAgo:Math.round(Q/zB)+"d",interval:$.intervalDays+"d"}),!1;return DB.info(`auto-${$.label} triggering`,{lastRun:J?new Date(J.time_created).toISOString():"never",interval:$.intervalDays+"d"}),!0})}function xC($){let Z=$.dream?.auto!==!1;if(!Z)return V.succeed(!1);let J=Date.now();if(J-NC<LC)return V.succeed(!1);NC=J;let Y=$.dream?.interval_days??rm;return TC({enabled:Z,intervalDays:Y,title:_B,label:"dream"})}function bC($){let Z=$.distill?.auto!==!1;if(!Z)return V.succeed(!1);let J=Date.now();if(J-IC<LC)return V.succeed(!1);IC=J;let Y=$.distill?.interval_days??am;return TC({enabled:Z,intervalDays:Y,title:PB,label:"distill"})}var kC=V.fnUntraced(function*($){let Z=yield*$.config.get(),J=yield*xC(Z).pipe(V.catch(()=>V.succeed(!1))),Y=yield*bC(Z).pipe(V.catch(()=>V.succeed(!1))),Q={providerID:$.lastUser.model.providerID,modelID:$.lastUser.model.modelID};if(!J&&!Y)return;let{AppRuntime:X}=yield*V.promise(()=>import("./chunk-x6hsmnhz.js"));if(J)X.runPromise(h$.use((K)=>V.gen(function*(){let G=yield*K.create({title:_B});yield*(yield*$.promptServiceTag).prompt({sessionID:G.id,agent:"dream",model:Q,parts:[{type:"text",text:SC}]})}))).catch((K)=>$.log.error("auto-dream prompt failed",{error:String(K)}));if(Y)X.runPromise(h$.use((K)=>V.gen(function*(){let G=yield*K.create({title:PB});yield*(yield*$.promptServiceTag).prompt({sessionID:G.id,agent:"distill",model:Q,parts:[{type:"text",text:RC}]})}))).catch((K)=>$.log.error("auto-distill prompt failed",{error:String(K)}))});var em=($)=>$.pipe(V.catchDefect((Z)=>Z instanceof X0.BackendAuthRejectedError?V.succeed(void 0):V.die(Z))),MB=($)=>em(V.promise(()=>X0.resolvePrompt($))).pipe(V.map((Z)=>Z??"")),EC=V.gen(function*(){let $=yield*MB("session/build-switch"),Z=yield*MB("session/max-steps"),J=yield*MB("session/compose");return{buildSwitch:$,maxSteps:Z,promptCompose:J}});var gC=N1.create({service:"session.prompt"}),$d=J0.create({service:"session.prompt"});function hC($,Z,J,Y){return V.gen(function*(){let{bus:Q,status:X,sessions:K,agents:G,provider:B,processor:H,prune:W,checkpoint:j,compaction:O,config:U,plugin:F,permission:D,fsys:w,registry:_,scope:z,instruction:C,state:P,goal:I,taskGateState:L,taskRegistry:x,revert:h,summary:R,sys:f,llm:N,actorRegistry:T,inbox:E}=yield*eV,y=yield*EC,S=y.buildSwitch,k=y.maxSteps,r=y.promptCompose,l=(G0,Z0,n)=>YC(B,Q,G0,Z0,n),d=(G0,Z0)=>XC(K,G0,Z0),c=FB(K),i=1024,K0=new class extends Set{add(G0){if(super.add(G0),this.size>1024){let Z0=this.values().next().value;if(Z0!==void 0)this.delete(Z0)}return this}},a=(G0)=>BB({getOps:$,...G0}),v=GC({agents:G,provider:B,llm:N,sessions:K,elog:gC}),$0=WC({sessions:K,fsys:w,buildSwitch:S,promptCompose:r});return{runLoop:V.fn("SessionPrompt.run")(function*(G0,Z0,n){let z0=yield*u.context,o=gC.with({sessionID:G0}),t,j0=0,w0=yield*K.get(G0),y0,r0,$$=Z0??"main",K2=$C({sessionID:G0,agentID:$$,task_id:n,plugin:F,bus:Q,prune:W,scope:z}),{cancellation:L2,agentMetrics:S2,publishAgentRequest:p$,schedulePrune:o$}=K2,Z$=eM({sessionID:G0,agentID:$$,task_id:n,session:w0,cancellation:L2,plugin:F});return yield*V.gen(function*(){yield*K2.before;let w1=(M0,u0)=>J3(fM(M0,u0,O0.parts(u0.id))),G2=!1,h1=CC({sessionID:G0,bus:Q,appendSyntheticUserTurn:c,slog:o}),D2=MC({sessionID:G0,sessions:K,bus:Q,appendSyntheticUserTurn:c,slog:o}),{autoContinueOutputLength:$8,autoContinueInvalidOutput:BY,autoRetryStructuredOutput:Z8,handleTextRepeat:A3,writeContentFilterError:HY,writeModelError:W$}=D2,o0=VC({sessionID:G0,agentID:Z0,agents:G,taskGateState:L,taskRegistry:x,appendSyntheticUserTurn:c,slog:o}),E$=KC({sessionID:G0,agentID:Z0,session:w0,goal:I,bus:Q,appendSyntheticUserTurn:c,slog:o});while(!0){if(!Z0||Z0==="main")yield*X.set(G0,{type:"busy"});yield*E.drain(G0,Z0??"main").pipe(V.ignore),yield*o.info("loop",{step:j0});let M0=yield*O0.filterCompactedEffect(G0,{contextFrom:w0.contextFrom,contextWatermark:w0.contextWatermark,agentID:Z0??"main"}),u0,p9,j1,W6,W2,l6=[];for(let e0=M0.length-1;e0>=0;e0--){let _2=M0[e0];if(!u0&&_2.info.role==="user")u0=_2.info,p9=_2;if(!j1&&_2.info.role==="assistant")j1=_2.info,W6=_2;if(!W2&&_2.info.role==="assistant"&&_2.info.finish)W2=_2.info;if(u0&&W2)break;if(!W2){let o9=_2.parts.filter((_8)=>_8.type==="subtask");l6.push(...o9)}}if(!u0)throw Error("No user message found in stream. This should never happen.");yield*wC({sessionID:G0,msgs:M0,checkpoint:j,config:U});let N3=W6?.parts.some((e0)=>e0.type==="tool"&&!e0.metadata?.providerExecuted)??!1;if(j1?.finish==="length"&&!N3&&u0.id<j1.id&&(yield*$8({lastUser:u0,assistant:j1})))continue;if(j1){let e0=VB({phase:"existing-assistant",lastUser:u0,assistant:j1,parts:W6?.parts??[]});if(e0.type==="filtered"){yield*HY({assistant:j1}),yield*o.info("exiting loop",{classification:e0.type});break}if(e0.type==="failed"){yield*W$({assistant:j1,reason:e0.reason}),yield*o.info("exiting loop",{classification:e0.type,reason:e0.reason});break}if(e0.type==="think-only"||e0.type==="invalid"){let _2=e0.type==="invalid"?e0.reason:"think-only";if(yield*BY({lastUser:u0,assistant:j1,reason:_2}))continue;yield*o.info("exiting loop",{classification:e0.type});break}if(e0.type==="final"&&e0.degraded)yield*o.warn("degraded final on abnormal finish",{finish:j1.finish});if(e0.type!=="continue"){if(yield*o0(u0))continue;if(yield*E$(u0))continue;yield*o.info("exiting loop",{classification:e0.type});break}}if(j0++,j0===1)yield*v({session:w0,modelID:u0.model.modelID,providerID:u0.model.providerID,history:M0}).pipe(V.ignore,V.forkIn(z));if(j0===1&&!w0.parentID)yield*kC({config:U,lastUser:u0,promptServiceTag:Y,log:$d});let a2=yield*l(u0.model.providerID,u0.model.modelID,G0);r0=a2,y0=W2;let z2=l6.pop();if(z2?.type==="subtask"){yield*a({task:z2,model:a2,lastUser:u0,sessionID:G0,session:w0,msgs:M0});continue}let p6=p9;if(p6?.parts.some((e0)=>e0.type==="compaction")){let e0=p6.parts.find((_8)=>_8.type==="compaction"),_2=yield*K.messages({sessionID:G0,agentID:u0.agentID??"main"});if((yield*O.process({parentID:u0.id,messages:_2,sessionID:G0,auto:e0?.auto??!1,overflow:e0?.overflow,agentID:u0.agentID}))==="stop")break;continue}yield*yC({sessionID:G0,msgs:M0,lastFinished:W2,model:a2,config:U}),AC({sessionID:G0,msgs:M0,lastFinished:W2});let z8=yield*G.get(u0.agent),yZ=z8?.native===!0&&z8?.hidden===!0;if(!G2&&!yZ&&W2&&W2.tokens){let e0=yield*$();yield*W.fireCheckpoints({sessionID:G0,model:a2,tokens:W2.tokens,promptOps:e0,agentID:u0.agentID}).pipe(V.ignore)}if(!G2&&W2&&W2.tokens){if(yield*aM({config:U,checkpoint:j,compaction:O,prune:W},{sessionID:G0,lastFinished:W2,lastUser:u0,model:a2,msgs:M0,isBoundedComputation:yZ})){G2=!0;continue}}if(G2=!1,!z8)throw yield*KB(G,Q,u0.agent,G0);let x8=z8.steps??1/0,N0=j0>=x8;M0=yield*$0({messages:M0,agent:z8,session:w0});let a0=X3({sessionID:G0,parentID:u0.id,agentID:u0.agentID,agent:z8.name,variant:u0.model.variant,cwd:z0.directory,root:z0.worktree,modelID:a2.id,providerID:a2.providerID});yield*K.updateMessage(a0);let C$=yield*H.create({assistantMessage:a0,sessionID:G0,model:a2,agentMetrics:S2}),o6=yield*V.gen(function*(){let e0={value:t},_2=yield*mM({sessionID:G0,resolvedAgentID:$$,step:j0,task_id:n,lastUser:u0,lastFinished:W2,msgs:M0,agent:z8,session:w0,model:a2,handle:C$,structured:e0,resolveTools:Z,createStructuredOutputTool:J,summary:R,scope:z,plugin:F}),{tools:o9,format:_8,query:I3}=_2,{cancelledByPlugin:L3,withUserQueryPost:S3}=dM({sessionID:G0,agentID:$$,step:j0,lastUser:u0,msgs:M0,query:I3,handle:C$,plugin:F,sessions:K,cancellation:L2,trajectoryForStep:w1}),R3=V.fnUntraced(function*(i9){if(i9==="continue"&&(yield*$8({lastUser:u0,assistant:C$.message})))return"continue";if(i9==="text-repeat"){if(yield*A3({lastUser:u0}))return"continue";return"break"}if(e0.value!==void 0)return t=e0.value,C$.message.structured=e0.value,C$.message.finish=C$.message.finish??"stop",yield*K.updateMessage(C$.message),"break";let f1=VB({phase:"after-process",lastUser:u0,assistant:C$.message,parts:O0.parts(C$.message.id),processResult:i9});if(f1.type==="filtered")return yield*HY({assistant:C$.message}),"break";if(f1.type==="failed")return yield*W$({assistant:C$.message,reason:f1.reason}),"break";if(f1.type!=="continue"&&!C$.message.error&&_8.type==="json_schema"){if(yield*Z8({lastUser:u0,assistant:C$.message}))return"continue";return"break"}if((f1.type==="think-only"||f1.type==="invalid")&&_8.type!=="json_schema"){let T3=f1.type==="invalid"?f1.reason:"think-only";if(yield*BY({lastUser:u0,assistant:C$.message,reason:T3}))return"continue";return"break"}if(f1.type==="final"&&f1.degraded)yield*o.warn("degraded final on abnormal finish",{finish:C$.message.finish});if(i9==="stop")return"break";return}),AZ=yield*nM({sessionID:G0,lastUser:u0,agent:z8,session:w0,model:a2,msgs:M0,tools:o9,format:_8,handle:C$,isLastStep:N0,task_id:n,instructionsNotified:K0,maxStepsText:k,actorRegistry:T,bus:Q,config:U,instruction:C,llm:N,registry:_,status:X,sys:f,cancelledByPlugin:L3,withUserQueryPost:S3,slog:o});if(AZ.kind==="break")return"break";let jY=yield*R3(AZ.result);if(jY)return jY;if(AZ.result==="overflow")yield*tM({config:U,checkpoint:j,compaction:O,prune:W},{sessionID:G0,lastUser:u0,model:a2,msgs:M0,isBoundedComputation:yZ});return"continue"}).pipe(V.ensuring(C.clear(C$.message.id))),Y8=yield*h1.check({lastUser:u0,completedParts:O0.parts(C$.message.id)});if(Y8==="terminate")break;if(Y8==="recovered")continue;if(o6==="break"){if(yield*o0(u0))continue;if(yield*E$(u0))continue;break}continue}let v1=yield*$();if(r0&&y0)yield*o$({model:r0,lastFinished:y0,promptOps:v1});let r2=yield*d(G0,Z0),u6=r2.info.role==="assistant"&&!!r2.info.error,J8=yield*K.findMessage(G0,(M0)=>M0.info.role==="user",{agentID:"*"});return yield*p$(u6?"error":"completed",S$.isSome(J8)?J8.value.info.agent:r2.info.agent),r2}).pipe((w1)=>GB(G0,Q,w1),V.onExit(Z$),V.orDie)}),lastAssistant:d}})}import vC from"path";var Zd=new TextEncoder,CB=new TextDecoder,Jd=($)=>`
|
|
8119
8119
|
|
|
8120
8120
|
[... QitQode truncated ${$} bytes of shell output ...]
|
|
8121
8121
|
|
|
@@ -8146,7 +8146,7 @@ ${F}
|
|
|
8146
8146
|
`).length},Dd=V.fnUntraced(function*($,Z,J){let Y=qd.join(Z,J);if(!(yield*$.exists(Y).pipe(V.orDie)))return"";let Q=yield*$.readFile(Y).pipe(V.catch(()=>V.succeed(new Uint8Array)));if(Buffer.from(Q).includes(0))return"";return Buffer.from(Q).toString("utf8")}),eC=($)=>new Map($.map((Z)=>[Z.file,{additions:Z.additions,deletions:Z.deletions}])),zd=(...$)=>{let Z=new Map;return $.flat().forEach((J)=>{if(!Z.has(J.file))Z.set(J.file,J)}),[...Z.values()]},AB=V.fnUntraced(function*($,Z,J,Y,Q,X){let K=Y?yield*Z.prefix(J):"",G=(H,W,j)=>bY(xY(H,H,W,j,"","",{context:Number.MAX_SAFE_INTEGER}));return(yield*V.forEach(Q,(H)=>V.gen(function*(){let W=H.status==="added"||!Y?"":yield*Z.show(J,Y,H.file,K),j=H.status==="deleted"?"":yield*Dd($,J,H.file),O=X.get(H.file);return{file:H.file,patch:G(H.file,W,j),additions:O?.additions??(H.status==="added"?tC(j):0),deletions:O?.deletions??(H.status==="deleted"?tC(W):0),status:H.status}}),{concurrency:8})).toSorted((H,W)=>H.file.localeCompare(W.file))}),_d=V.fnUntraced(function*($,Z,J,Y){if(!Y)return yield*AB($,Z,J,Y,yield*Z.status(J),new Map);let[Q,X]=yield*V.all([Z.status(J),Z.stats(J,Y)],{concurrency:2});return yield*AB($,Z,J,Y,Q,eC(X))}),Pd=V.fnUntraced(function*($,Z,J,Y){let[Q,X,K]=yield*V.all([Z.diff(J,Y),Z.stats(J,Y),Z.status(J)],{concurrency:3});return yield*AB($,Z,J,Y,zd(Q,K.filter((G)=>G.code==="??")),eC(X))}),Md=q.enum(["git","branch"]),$w={BranchUpdated:S0.define("vcs.branch.updated",q.object({branch:q.string().optional()}))},Cd=q.object({branch:q.string().optional(),default_branch:q.string().optional()}).meta({ref:"VcsInfo"}),wd=q.object({file:q.string(),patch:q.string(),additions:q.number(),deletions:q.number(),status:q.enum(["added","deleted","modified"]).optional()}).meta({ref:"VcsFileDiff"});class PZ extends Q0.Service()("@qitqode/Vcs"){}var Zw=b.effect(PZ,V.gen(function*(){let $=yield*V0.Service,Z=yield*O1.Service,J=yield*e.Service,Y=yield*w$.Scope,Q=yield*u.make(V.fn("Vcs.state")(function*(X){if(X.project.vcs!=="git")return{current:void 0,root:void 0};let K=V.fnUntraced(function*(){return yield*Z.branch(X.directory)}),[G,B]=yield*V.all([Z.branch(X.directory),Z.defaultBranch(X.directory)],{concurrency:2}),H={current:G,root:B};return aC.info("initialized",{branch:H.current,default_branch:H.root?.name}),yield*J.subscribe(e2.Event.Updated).pipe(f0.filter((W)=>W.properties.file.endsWith("HEAD")),f0.runForEach((W)=>V.gen(function*(){let j=yield*K();if(j!==H.current)aC.info("branch changed",{from:H.current,to:j}),H.current=j,yield*J.publish($w.BranchUpdated,{branch:j})})),V.forkScoped),H}));return PZ.of({init:V.fn("Vcs.init")(function*(){yield*u.get(Q).pipe(V.forkIn(Y))}),branch:V.fn("Vcs.branch")(function*(){return yield*u.use(Q,(X)=>X.current)}),defaultBranch:V.fn("Vcs.defaultBranch")(function*(){return yield*u.use(Q,(X)=>X.root?.name)}),diff:V.fn("Vcs.diff")(function*(X){let K=yield*u.get(Q),G=yield*u.context;if(G.project.vcs!=="git")return[];if(X==="git")return yield*_d($,Z,G.directory,(yield*Z.hasHead(G.directory))?"HEAD":void 0);if(!K.root)return[];if(K.current&&K.current===K.root.name)return[];let B=yield*Z.mergeBase(G.directory,K.root.ref);if(!B)return[];return yield*Pd($,Z,G.directory,B)})})})),yd=Zw.pipe(b.provide(O1.defaultLayer),b.provide(V0.defaultLayer),b.provide(e.layer));var v6={};R0(v6,{layer:()=>Dw,defaultLayer:()=>hd,Worktree:()=>v6,StartCommandFailedError:()=>kd,Service:()=>D3,ResetInput:()=>bd,ResetFailedError:()=>g1,RemoveInput:()=>xd,RemoveFailedError:()=>l9,NotGitError:()=>q3,NameGenerationFailedError:()=>Fw,Info:()=>Uw,Event:()=>F3,CreateInput:()=>Td,CreateFailedError:()=>qw});var G6={};R0(G6,{layer:()=>Qw,defaultLayer:()=>IB,Service:()=>CZ});var c9=J0.create({service:"share-next"}),MZ=process.env.QITQODE_DISABLE_SHARE==="true"||process.env.QITQODE_DISABLE_SHARE==="1",Ad=L0.Struct({id:L0.String,url:L0.String,secret:L0.String});class CZ extends Q0.Service()("@qitqode/ShareNext"){}var NB=($)=>V.sync(()=>C0.use($));function Yw($){return{create:`/api/${$}`,sync:(Z)=>`/api/${$}/${Z}/sync`,remove:(Z)=>`/api/${$}/${Z}`,data:(Z)=>`/api/${$}/${Z}/data`}}var Nd=Yw("share"),Id=Yw("shares");function Jw($){switch($.type){case"session":return"session";case"message":return`message/${$.data.id}`;case"part":return`part/${$.data.messageID}/${$.data.id}`;case"session_diff":return"session_diff";case"model":return"model"}}var Qw=b.effect(CZ,V.gen(function*(){let $=yield*tJ.Service,Z=yield*e.Service,J=yield*B0.Service,Y=yield*c1.HttpClient,Q=c1.filterStatusOk(Y),X=yield*n0.Service,K=yield*b0.Service;function G(z,C){return V.gen(function*(){if(MZ)return;if(!(yield*j(z)))return;let I=yield*u.get(B),L=I.queue.get(z);if(L){for(let h of C)L.set(Jw(h),h);return}let x=new Map(C.map((h)=>[Jw(h),h]));I.queue.set(z,x),yield*O(z).pipe(V.delay(1000),V.catchCause((h)=>V.sync(()=>{c9.error("share flush failed",{sessionID:z,cause:h})})),V.forkIn(I.scope))})}let B=yield*u.make(V.fn("ShareNext.state")(function*(z){let C={queue:new Map,scope:yield*w$.make(),shared:new Map};if(yield*V.addFinalizer(()=>w$.close(C.scope,H2.void).pipe(V.andThen(V.sync(()=>{C.queue.clear(),C.shared.clear()})))),MZ)return C;let P=(I,L)=>Z.subscribe(I).pipe(f0.runForEach((x)=>L(x).pipe(V.catchCause((h)=>V.sync(()=>{c9.error("share subscriber failed",{type:I.type,cause:h})})))),V.forkScoped);return yield*P(b0.Event.Updated,(I)=>V.gen(function*(){let L=yield*K.get(I.properties.sessionID);yield*G(L.id,[{type:"session",data:L}])})),yield*P(O0.Event.Updated,(I)=>V.gen(function*(){let L=I.properties.info;if(yield*G(L.sessionID,[{type:"message",data:L}]),L.role!=="user")return;let x=yield*X.getModel(L.model.providerID,L.model.modelID);yield*G(L.sessionID,[{type:"model",data:[x]}])})),yield*P(O0.Event.PartUpdated,(I)=>I.properties.part.type==="compaction"?V.void:G(I.properties.part.sessionID,[{type:"part",data:I.properties.part}])),yield*P(b0.Event.Diff,(I)=>G(I.properties.sessionID,[{type:"session_diff",data:I.properties.diff}])),yield*P(b0.Event.Deleted,(I)=>_(I.properties.sessionID)),C})),H=V.fn("ShareNext.request")(function*(){let z={},C=yield*$.active();if(S$.isNone(C)||!C.value.active_org_id){let I=(yield*J.get()).enterprise?.url??"https://opncd.ai";return{headers:z,api:Nd,baseUrl:I}}let P=yield*$.token(C.value.id);if(S$.isNone(P))throw Error("No active account token available for sharing");return z.authorization=`Bearer ${P.value}`,z["x-org-id"]=C.value.active_org_id,{headers:z,api:Id,baseUrl:C.value.url}}),W=V.fnUntraced(function*(z){let C=yield*NB((P)=>P.select().from(u9).where(_0(u9.session_id,z)).get());if(!C)return;return{id:C.id,secret:C.secret,url:C.url}}),j=V.fnUntraced(function*(z){let C=yield*u.get(B);if(C.shared.has(z)){let I=C.shared.get(z);return I===null?void 0:I}let P=yield*W(z);return C.shared.set(z,P??null),P}),O=V.fn("ShareNext.flush")(function*(z){if(MZ)return;let C=yield*u.get(B),P=C.queue.get(z);if(!P)return;let I=yield*j(z);if(!I){C.queue.delete(z);return}let L=yield*H(),x=yield*P2.post(`${L.baseUrl}${L.api.sync(I.id)}`).pipe(P2.setHeaders(L.headers),P2.bodyJson({secret:I.secret,data:Array.from(P.values())}),V.flatMap((h)=>Y.execute(h)));if(x.status>=400){c9.warn("failed to sync share",{sessionID:z,shareID:I.id,status:x.status});return}C.queue.delete(z)}),U=V.fn("ShareNext.full")(function*(z){c9.info("full sync",{sessionID:z});let C=yield*K.get(z),P=yield*K.diff(z),I=yield*V.sync(()=>Array.from(O0.stream(z,{agentID:"*"}))),L=yield*V.forEach(Array.from(new Map(I.filter((x)=>x.info.role==="user").map((x)=>x.info.model).map((x)=>[`${x.providerID}/${x.modelID}`,x])).values()),(x)=>X.getModel(j8.make(x.providerID),x1.make(x.modelID)),{concurrency:8});yield*G(z,[{type:"session",data:C},...I.map((x)=>({type:"message",data:x.info})),...I.flatMap((x)=>x.parts.filter((h)=>h.type!=="compaction").map((h)=>({type:"part",data:h}))),{type:"session_diff",data:P},{type:"model",data:L}])}),F=V.fn("ShareNext.init")(function*(){if(MZ)return;yield*u.get(B)}),D=V.fn("ShareNext.url")(function*(){return(yield*H()).baseUrl}),w=V.fn("ShareNext.create")(function*(z){if(MZ)return{id:"",url:"",secret:""};c9.info("creating share",{sessionID:z});let C=yield*H(),P=yield*P2.post(`${C.baseUrl}${C.api.create}`).pipe(P2.setHeaders(C.headers),P2.bodyJson({sessionID:z}),V.flatMap((L)=>Q.execute(L)),V.flatMap(HX.schemaBodyJson(Ad)));yield*NB((L)=>L.insert(u9).values({session_id:z,id:P.id,secret:P.secret,url:P.url}).onConflictDoUpdate({target:u9.session_id,set:{id:P.id,secret:P.secret,url:P.url}}).run());let I=yield*u.get(B);return I.shared.set(z,P),yield*U(z).pipe(V.catchCause((L)=>V.sync(()=>{c9.error("share full sync failed",{sessionID:z,cause:L})})),V.forkIn(I.scope)),P}),_=V.fn("ShareNext.remove")(function*(z){if(MZ)return;c9.info("removing share",{sessionID:z});let C=yield*u.get(B),P=yield*j(z);if(!P){C.shared.delete(z),C.queue.delete(z);return}let I=yield*H();yield*P2.delete(`${I.baseUrl}${I.api.remove(P.id)}`).pipe(P2.setHeaders(I.headers),P2.bodyJson({secret:P.secret}),V.flatMap((L)=>Q.execute(L))),yield*NB((L)=>L.delete(u9).where(_0(u9.session_id,z)).run()),C.shared.delete(z),C.queue.delete(z)});return CZ.of({init:F,url:D,request:H,create:w,remove:_})})),IB=Qw.pipe(b.provide(e.layer),b.provide(tJ.defaultLayer),b.provide(B0.defaultLayer),b.provide(w8.layer),b.provide(n0.defaultLayer),b.provide(b0.defaultLayer));var B3={};R0(B3,{layer:()=>Xw,defaultLayer:()=>Ld,Service:()=>W3});class W3 extends Q0.Service()("@qitqode/SessionShare"){}var Xw=b.effect(W3,V.gen(function*(){let $=yield*B0.Service,Z=yield*b0.Service,J=yield*CZ,Y=yield*w$.Scope,Q=V.fn("SessionShare.share")(function*(G){if((yield*$.get()).share==="disabled")throw Error("Sharing is disabled in configuration");let H=yield*J.create(G);return yield*V.sync(()=>n7.run(b0.Event.Updated,{sessionID:G,info:{share:{url:H.url}}})),H}),X=V.fn("SessionShare.unshare")(function*(G){yield*J.remove(G),yield*V.sync(()=>n7.run(b0.Event.Updated,{sessionID:G,info:{share:{url:null}}}))}),K=V.fn("SessionShare.create")(function*(G){let B=yield*Z.create(G);if(B.parentID)return B;let H=yield*$.get();if(!(m0.QITQODE_AUTO_SHARE||H.share==="auto"))return B;return yield*Q(B.id).pipe(V.ignore,V.forkIn(Y)),B});return W3.of({create:K,share:Q,unshare:X})})),Ld=Xw.pipe(b.provide(IB),b.provide(b0.defaultLayer),b.provide(B0.defaultLayer));var Hw=Gw(function*(){J0.Default.info("bootstrapping",{directory:F0.directory}),yield*B0.Service.use(($)=>$.get()),yield*s0.Service.use(($)=>$.init()),yield*Vw([L$.Service,G6.Service,T2.Service,y1.Service,e2.Service,PZ,G1.Service,U7,F7].map(($)=>SB($.use((Z)=>Z.init())))).pipe(LB("InstanceBootstrap.init")),yield*y2.Service.use(($)=>$.reconcile()).pipe(Ww(($)=>Kw(()=>J0.Default.warn("memory reconcile failed",{error:String($)}))),SB),yield*e.Service.use(($)=>$.subscribeCallback(H1.Event.Executed,async(Z)=>{if(Z.properties.name===H1.Default.INIT)Bw(F0.project.id)})),yield*f$.subscribe()}).pipe(LB("InstanceBootstrap"));var Rd=b.mergeAll(B0.defaultLayer,s0.defaultLayer,G6.defaultLayer,T2.defaultLayer,L$.defaultLayer,y1.defaultLayer,e2.defaultLayer,d9.defaultLayer,G1.defaultLayer,e.defaultLayer,y2.defaultLayer,I8.defaultLayer).pipe(b.provide(j3)),jw=H3.make(Rd,{memoMap:O3});var eJ=J0.create({service:"worktree"}),F3={Ready:S0.define("worktree.ready",q.object({name:q.string(),branch:q.string()})),Failed:S0.define("worktree.failed",q.object({message:q.string()}))},Uw=q.object({name:q.string(),branch:q.string(),directory:q.string()}).meta({ref:"Worktree"}),Td=q.object({name:q.string().optional(),startCommand:q.string().optional().describe("Additional startup script to run after the project's start command")}).meta({ref:"WorktreeCreateInput"}),xd=q.object({directory:q.string()}).meta({ref:"WorktreeRemoveInput"}),bd=q.object({directory:q.string()}).meta({ref:"WorktreeResetInput"}),q3=F$.create("WorktreeNotGitError",q.object({message:q.string()})),Fw=F$.create("WorktreeNameGenerationFailedError",q.object({message:q.string()})),qw=F$.create("WorktreeCreateFailedError",q.object({message:q.string()})),kd=F$.create("WorktreeStartCommandFailedError",q.object({message:q.string()})),l9=F$.create("WorktreeRemoveFailedError",q.object({message:q.string()})),g1=F$.create("WorktreeResetFailedError",q.object({message:q.string()}));function Ed($){return $.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+/,"").replace(/-+$/,"")}function gd(...$){return $.filter(Boolean).flatMap((Z)=>Z.split(`
|
|
8147
8147
|
`).map((J)=>J.trim()).flatMap((J)=>{let Y=J.match(/^warning:\s+failed to remove\s+(.+):\s+/i);if(!Y)return[];let Q=Y[1]?.trim().replace(/^['"]|['"]$/g,"");if(!Q)return[];return[Q]}))}class D3 extends Q0.Service()("@qitqode/Worktree"){}var Dw=b.effect(D3,V.gen(function*(){let $=yield*w$.Scope,Z=yield*V0.Service,J=yield*BX.Path,Y=yield*m8.ChildProcessSpawner,Q=yield*O1.Service,X=yield*K6.Service,K=V.fnUntraced(function*(E,y){return yield*Ow(Y,E,y)},V.catch((E)=>V.succeed({code:1,text:"",stderr:E instanceof Error?E.message:String(E)}))),G=26,B=V.fn("Worktree.candidate")(function*(E,y){let S=yield*u.context;for(let k of Array.from({length:26},(r,l)=>l)){let r=y?k===0?y:`${y}-${TB.create()}`:TB.create(),l=`qitqode/${r}`,d=J.join(E,r);if(yield*Z.exists(d).pipe(V.orDie))continue;let c=`refs/heads/${l}`;if((yield*K(["show-ref","--verify","--quiet",c],{cwd:S.worktree})).code===0)continue;return Uw.parse({name:r,branch:l,directory:d})}throw new Fw({message:"Failed to generate a unique worktree name"})}),H=V.fn("Worktree.makeWorktreeInfo")(function*(E){let y=yield*u.context;if(y.project.vcs!=="git")throw new q3({message:"Worktrees are only supported for git projects"});let S=J.join(t0.Path.data,"worktree",y.project.id);yield*Z.makeDirectory(S,{recursive:!0}).pipe(V.orDie);let k=E?Ed(E):"";return yield*B(S,k||void 0)}),W=V.fnUntraced(function*(E){let y=yield*u.context,S=yield*K(["worktree","add","--no-checkout","-b",E.branch,E.directory],{cwd:y.worktree});if(S.code!==0)throw new qw({message:S.stderr||S.text||"Failed to create git worktree"});yield*X.addSandbox(y.project.id,E.directory).pipe(V.catch(()=>V.void))}),j=V.fnUntraced(function*(E,y){let S=yield*u.context,k=yield*u.workspaceID,r=S.project.id,l=y?.trim(),d=yield*K(["reset","--hard"],{cwd:E.directory});if(d.code!==0){let i=d.stderr||d.text||"Failed to populate worktree";eJ.error("worktree checkout failed",{directory:E.directory,message:i}),U3.emit("event",{directory:E.directory,project:S.project.id,workspace:k,payload:{type:F3.Failed.type,properties:{message:i}}});return}if(!(yield*V.promise(()=>F0.provide({directory:E.directory,init:()=>jw.runPromise(Hw),fn:()=>{return}}).then(()=>!0).catch((i)=>{let K0=e8(i);return eJ.error("worktree bootstrap failed",{directory:E.directory,message:K0}),U3.emit("event",{directory:E.directory,project:S.project.id,workspace:k,payload:{type:F3.Failed.type,properties:{message:K0}}}),!1}))))return;U3.emit("event",{directory:E.directory,project:S.project.id,workspace:k,payload:{type:F3.Ready.type,properties:{name:E.name,branch:E.branch}}}),yield*x(E.directory,{projectID:r,extra:l})}),O=V.fn("Worktree.createFromInfo")(function*(E,y){yield*W(E),yield*j(E,y)}),U=V.fn("Worktree.create")(function*(E){let y=yield*H(E?.name);return yield*W(y),yield*j(y,E?.startCommand).pipe(V.catchCause((S)=>V.sync(()=>eJ.error("worktree bootstrap failed",{cause:S}))),V.forkIn($)),y}),F=V.fnUntraced(function*(E){let y=J.resolve(E),S=yield*Z.realPath(y).pipe(V.catch(()=>V.succeed(y))),k=J.normalize(S);return process.platform==="win32"?k.toLowerCase():k});function D(E){return E.split(`
|
|
8148
8148
|
`).map((y)=>y.trim()).reduce((y,S)=>{if(!S)return y;if(S.startsWith("worktree "))return y.push({path:S.slice(9).trim()}),y;let k=y[y.length-1];if(!k)return y;if(S.startsWith("branch "))k.branch=S.slice(7).trim();return y},[])}let w=V.fnUntraced(function*(E,y){for(let S of E){if(!S.path)continue;if((yield*F(S.path))===y)return S}return});function _(E){return Z.exists(E).pipe(V.orDie,V.flatMap((y)=>y?K(["fsmonitor--daemon","stop"],{cwd:E}):V.void))}function z(E){return V.promise(()=>import("fs/promises").then((y)=>y.rm(E,{recursive:!0,force:!0,maxRetries:5,retryDelay:100})).catch((y)=>{let S=e8(y);throw new l9({message:S||"Failed to remove git worktree directory"})}))}let C=V.fn("Worktree.remove")(function*(E){let y=yield*u.context;if(y.project.vcs!=="git")throw new q3({message:"Worktrees are only supported for git projects"});let S=yield*F(E.directory),k=yield*K(["worktree","list","--porcelain"],{cwd:y.worktree});if(k.code!==0)throw new l9({message:k.stderr||k.text||"Failed to read git worktrees"});let r=D(k.text),l=yield*w(r,S);if(!l?.path){if(!(yield*Z.exists(S).pipe(V.orDie)))return!0;let K0=yield*F(J.join(t0.Path.data,"worktree",y.project.id));if(S!==K0&&!S.startsWith(`${K0}${J.sep}`))throw new l9({message:"Directory is not a registered or managed worktree"});return yield*_(S),yield*z(S),!0}yield*_(l.path);let d=yield*K(["worktree","remove","--force",l.path],{cwd:y.worktree});if(d.code!==0){let i=yield*K(["worktree","list","--porcelain"],{cwd:y.worktree});if(i.code!==0)throw new l9({message:d.stderr||d.text||i.stderr||i.text||"Failed to remove git worktree"});if((yield*w(D(i.text),S))?.path)throw new l9({message:d.stderr||d.text||"Failed to remove git worktree"})}yield*z(l.path);let c=l.branch?.replace(/^refs\/heads\//,"");if(c){let i=yield*K(["branch","-D",c],{cwd:y.worktree});if(i.code!==0)throw new l9({message:i.stderr||i.text||"Failed to delete worktree branch"})}return!0}),P=V.fnUntraced(function*(E,y,S){let k=yield*K(E,y);if(k.code!==0)throw S(k);return k}),I=V.fnUntraced(function*(E,y){let[S,k]=process.platform==="win32"?["cmd",["/c",y]]:["bash",["-lc",y]],r=yield*Y.spawn(m2.make(S,k,{cwd:E,extendEnv:!0,stdin:"ignore"})),[,l]=yield*V.all([f0.runDrain(r.stdout),f0.mkString(f0.decodeText(r.stderr))],{concurrency:2}).pipe(V.orDie);return{code:yield*r.exitCode,stderr:l}},V.scoped,V.catch(()=>V.succeed({code:1,stderr:""}))),L=V.fnUntraced(function*(E,y,S){let k=y.trim();if(!k)return!0;let r=yield*I(E,k);if(r.code===0)return!0;return eJ.error("worktree start command failed",{kind:S,directory:E,message:r.stderr}),!1}),x=V.fnUntraced(function*(E,y){let S=yield*V.sync(()=>C0.use((d)=>d.select().from(RB).where(_0(RB.id,y.projectID)).get())),r=(S?K6.fromRow(S):void 0)?.commands?.start?.trim()??"";if(!(yield*L(E,r,"project")))return!1;return yield*L(E,y.extra??"","worktree"),!0}),h=V.fnUntraced(function*(E,y){let S=yield*F(E);yield*V.forEach(y,(k)=>V.gen(function*(){let r=yield*F(J.resolve(E,k));if(r===S)return;if(!r.startsWith(`${S}${J.sep}`))return;yield*Z.remove(r,{recursive:!0}).pipe(V.ignore)}),{concurrency:8})}),R=V.fnUntraced(function*(E){let y=yield*K(["clean","-ffdx"],{cwd:E});if(y.code===0)return y;let S=gd(y.stderr,y.text);if(!S.length)return y;return yield*h(E,S),yield*K(["clean","-ffdx"],{cwd:E})}),f=V.fn("Worktree.reset")(function*(E){let y=yield*u.context;if(y.project.vcs!=="git")throw new q3({message:"Worktrees are only supported for git projects"});let S=yield*F(E.directory),k=yield*F(y.worktree);if(S===k)throw new g1({message:"Cannot reset the primary workspace"});let r=yield*K(["worktree","list","--porcelain"],{cwd:y.worktree});if(r.code!==0)throw new g1({message:r.stderr||r.text||"Failed to read git worktrees"});let l=yield*w(D(r.text),S);if(!l?.path)throw new g1({message:"Worktree not found"});let d=l.path,c=yield*Q.defaultBranch(y.worktree);if(!c)throw new g1({message:"Default branch not found"});let i=c.ref.indexOf("/");if(c.ref!==c.name&&i>0){let v=c.ref.slice(0,i),$0=c.ref.slice(i+1);yield*P(["fetch",v,$0],{cwd:y.worktree},(Y0)=>new g1({message:Y0.stderr||Y0.text||`Failed to fetch ${c.ref}`}))}yield*P(["reset","--hard",c.ref],{cwd:d},(v)=>new g1({message:v.stderr||v.text||"Failed to reset worktree to target"}));let K0=yield*R(d);if(K0.code!==0)throw new g1({message:K0.stderr||K0.text||"Failed to clean worktree"});yield*P(["submodule","update","--init","--recursive","--force"],{cwd:d},(v)=>new g1({message:v.stderr||v.text||"Failed to update submodules"})),yield*P(["submodule","foreach","--recursive","git","reset","--hard"],{cwd:d},(v)=>new g1({message:v.stderr||v.text||"Failed to reset submodules"})),yield*P(["submodule","foreach","--recursive","git","clean","-fdx"],{cwd:d},(v)=>new g1({message:v.stderr||v.text||"Failed to clean submodules"}));let a=yield*K(["-c","core.fsmonitor=false","status","--porcelain=v1"],{cwd:d});if(a.code!==0)throw new g1({message:a.stderr||a.text||"Failed to read git status"});if(a.text.trim())throw new g1({message:`Worktree reset left local changes:
|
|
8149
|
-
${a.text.trim()}`});return yield*x(d,{projectID:y.project.id}).pipe(V.catchCause((v)=>V.sync(()=>eJ.error("worktree start task failed",{cause:v}))),V.forkIn($)),!0}),N=V.fn("Worktree.head")(function*(E){return(yield*K(["rev-parse","HEAD"],{cwd:E})).text.trim()}),T=V.fn("Worktree.isPristine")(function*(E,y){let S=yield*K(["status","--porcelain"],{cwd:E});if(S.code!==0)return!1;if(S.text.trim()!=="")return!1;let k=yield*K(["rev-parse","HEAD"],{cwd:E});return k.code===0&&k.text.trim()===y});return D3.of({makeWorktreeInfo:H,createFromInfo:O,create:U,remove:C,reset:f,head:N,isPristine:T})})),hd=Dw.pipe(b.provide(O1.defaultLayer),b.provide(u1),b.provide(K6.defaultLayer),b.provide(V0.defaultLayer),b.provide(X7.layer));var YY={};R0(YY,{layer:()=>Mw,defaultLayer:()=>ld,UpdateInput:()=>ud,Service:()=>z3,Pty:()=>YY,Info:()=>bB,Event:()=>JY,CreateInput:()=>cd});function zw($){let Z,J=!1;return()=>{if(J)return Z;return J=!0,Z=$(),Z}}var vd=L0.String.annotate({[Q7]:M2.schema("pty")}).pipe(L0.brand("PtyID")),$Y=vd.pipe(Y7(($)=>({ascending:(Z)=>$.make(M2.ascending("pty",Z)),zod:M2.schema("pty").pipe(q.custom())})));var ZY=J0.create({service:"pty"}),_w=2097152,Pw=65536,fd=new TextEncoder,xB=($)=>$.data&&typeof $.data==="object"?$.data:$,md=($)=>{let Z=JSON.stringify({cursor:$}),J=fd.encode(Z),Y=new Uint8Array(J.length+1);return Y[0]=0,Y.set(J,1),Y},dd=zw(()=>import("./chunk-
|
|
8149
|
+
${a.text.trim()}`});return yield*x(d,{projectID:y.project.id}).pipe(V.catchCause((v)=>V.sync(()=>eJ.error("worktree start task failed",{cause:v}))),V.forkIn($)),!0}),N=V.fn("Worktree.head")(function*(E){return(yield*K(["rev-parse","HEAD"],{cwd:E})).text.trim()}),T=V.fn("Worktree.isPristine")(function*(E,y){let S=yield*K(["status","--porcelain"],{cwd:E});if(S.code!==0)return!1;if(S.text.trim()!=="")return!1;let k=yield*K(["rev-parse","HEAD"],{cwd:E});return k.code===0&&k.text.trim()===y});return D3.of({makeWorktreeInfo:H,createFromInfo:O,create:U,remove:C,reset:f,head:N,isPristine:T})})),hd=Dw.pipe(b.provide(O1.defaultLayer),b.provide(u1),b.provide(K6.defaultLayer),b.provide(V0.defaultLayer),b.provide(X7.layer));var YY={};R0(YY,{layer:()=>Mw,defaultLayer:()=>ld,UpdateInput:()=>ud,Service:()=>z3,Pty:()=>YY,Info:()=>bB,Event:()=>JY,CreateInput:()=>cd});function zw($){let Z,J=!1;return()=>{if(J)return Z;return J=!0,Z=$(),Z}}var vd=L0.String.annotate({[Q7]:M2.schema("pty")}).pipe(L0.brand("PtyID")),$Y=vd.pipe(Y7(($)=>({ascending:(Z)=>$.make(M2.ascending("pty",Z)),zod:M2.schema("pty").pipe(q.custom())})));var ZY=J0.create({service:"pty"}),_w=2097152,Pw=65536,fd=new TextEncoder,xB=($)=>$.data&&typeof $.data==="object"?$.data:$,md=($)=>{let Z=JSON.stringify({cursor:$}),J=fd.encode(Z),Y=new Uint8Array(J.length+1);return Y[0]=0,Y.set(J,1),Y},dd=zw(()=>import("./chunk-5yaahmjb.js")),bB=q.object({id:$Y.zod,title:q.string(),command:q.string(),args:q.array(q.string()),cwd:q.string(),status:q.enum(["running","exited"]),pid:q.number()}).meta({ref:"Pty"}),cd=q.object({command:q.string().optional(),args:q.array(q.string()).optional(),cwd:q.string().optional(),title:q.string().optional(),env:q.record(q.string(),q.string()).optional()}),ud=q.object({title:q.string().optional(),size:q.object({rows:q.number(),cols:q.number()}).optional()}),JY={Created:S0.define("pty.created",q.object({info:bB})),Updated:S0.define("pty.updated",q.object({info:bB})),Exited:S0.define("pty.exited",q.object({id:$Y.zod,exitCode:q.number()})),Deleted:S0.define("pty.deleted",q.object({id:$Y.zod}))};class z3 extends Q0.Service()("@qitqode/Pty"){}var Mw=b.effect(z3,V.gen(function*(){let $=yield*e.Service,Z=yield*s0.Service;function J(O){try{O.process.kill()}catch{}for(let[U,F]of O.subscribers.entries())try{if(xB(F)===U)F.close()}catch{}O.subscribers.clear()}let Y=yield*u.make(V.fn("Pty.state")(function*(O){let U={dir:O.directory,sessions:new Map};return yield*V.addFinalizer(()=>V.sync(()=>{for(let F of U.sessions.values())J(F);U.sessions.clear()})),U})),Q=V.fn("Pty.remove")(function*(O){let U=yield*u.get(Y),F=U.sessions.get(O);if(!F)return;U.sessions.delete(O),ZY.info("removing session",{id:O}),J(F),yield*$.publish(JY.Deleted,{id:F.info.id})}),X=V.fn("Pty.list")(function*(){let O=yield*u.get(Y);return Array.from(O.sessions.values()).map((U)=>U.info)}),K=V.fn("Pty.get")(function*(O){return(yield*u.get(Y)).sessions.get(O)?.info}),G=V.fn("Pty.create")(function*(O){let U=yield*u.get(Y),F=yield*R$.make(),D=$Y.ascending(),w=O.command||U1.preferred(),_=O.args||[];if(U1.login(w))_.push("-l");let z=O.cwd||U.dir,C=yield*Z.trigger("shell.env",{cwd:z},{env:{}}),P={...W7(),...O.env,...C.env,TERM:"xterm-256color",QITQODE_TERMINAL:"1"};if(process.platform==="win32")P.LC_ALL="C.UTF-8",P.LC_CTYPE="C.UTF-8",P.LANG="C.UTF-8";ZY.info("creating session",{id:D,cmd:w,args:_,cwd:z});let{spawn:I}=yield*V.promise(()=>dd()),L=yield*V.sync(()=>I(w,_,{name:"xterm-256color",cwd:z,env:P})),x={id:D,title:O.title||`Terminal ${D.slice(-4)}`,command:w,args:_,cwd:z,status:"running",pid:L.pid},h={info:x,process:L,buffer:"",bufferCursor:0,cursor:0,subscribers:new Map};return U.sessions.set(D,h),L.onData(F0.bind((R)=>{h.cursor+=R.length;for(let[N,T]of h.subscribers.entries()){if(T.readyState!==1){h.subscribers.delete(N);continue}if(xB(T)!==N){h.subscribers.delete(N);continue}try{T.send(R)}catch{h.subscribers.delete(N)}}if(h.buffer+=R,h.buffer.length<=_w)return;let f=h.buffer.length-_w;h.buffer=h.buffer.slice(f),h.bufferCursor+=f})),L.onExit(F0.bind(({exitCode:R})=>{if(h.info.status==="exited")return;ZY.info("session exited",{id:D,exitCode:R}),h.info.status="exited",F.fork($.publish(JY.Exited,{id:D,exitCode:R})),F.fork(Q(D))})),yield*$.publish(JY.Created,{info:x}),x}),B=V.fn("Pty.update")(function*(O,U){let D=(yield*u.get(Y)).sessions.get(O);if(!D)return;if(U.title)D.info.title=U.title;if(U.size)D.process.resize(U.size.cols,U.size.rows);return yield*$.publish(JY.Updated,{info:D.info}),D.info}),H=V.fn("Pty.resize")(function*(O,U,F){let w=(yield*u.get(Y)).sessions.get(O);if(w&&w.info.status==="running")w.process.resize(U,F)}),W=V.fn("Pty.write")(function*(O,U){let D=(yield*u.get(Y)).sessions.get(O);if(D&&D.info.status==="running")D.process.write(U)}),j=V.fn("Pty.connect")(function*(O,U,F){let w=(yield*u.get(Y)).sessions.get(O);if(!w){U.close();return}ZY.info("client connected to session",{id:O});let _=xB(U);w.subscribers.delete(_),w.subscribers.set(_,U);let z=()=>{w.subscribers.delete(_)},C=w.bufferCursor,P=w.cursor,I=F===-1?P:typeof F==="number"&&Number.isSafeInteger(F)?Math.max(0,F):0,L=(()=>{if(!w.buffer)return"";if(I>=P)return"";let x=Math.max(0,I-C);if(x>=w.buffer.length)return"";return w.buffer.slice(x)})();if(L)try{for(let x=0;x<L.length;x+=Pw)U.send(L.slice(x,x+Pw))}catch{z(),U.close();return}try{U.send(md(P))}catch{z(),U.close();return}return{onMessage:(x)=>{w.process.write(typeof x==="string"?x:new TextDecoder().decode(x))},onClose:()=>{ZY.info("client disconnected from session",{id:O}),z()}}});return z3.of({list:X,get:K,create:G,update:B,remove:Q,resize:H,write:W,connect:j})})),ld=Mw.pipe(b.provide(e.layer),b.provide(s0.defaultLayer));var XY={};R0(XY,{layer:()=>yw,defaultLayer:()=>nd,Service:()=>M3,MAX_PRE_REACT:()=>Cw,MAX_POST_REACT:()=>ww,Actor:()=>XY});var _3=($,Z,J)=>V.uninterruptible(V.gen(function*(){let Y=yield*G$.Service;yield*Y.updateStatus($,Z,{status:"running"}).pipe(V.ignore);let Q=yield*J.pipe(V.interruptible,V.exit);if(H2.isSuccess(Q))return yield*Y.updateStatus($,Z,{status:"idle",lastOutcome:"success",lastError:void 0}).pipe(V.ignore),Q.value;let X=Q.cause,K=l0.hasInterruptsOnly(X);return yield*Y.updateStatus($,Z,{status:"idle",lastOutcome:K?"cancelled":"failure",lastError:K?void 0:pd(X)}).pipe(V.ignore),yield*V.failCause(X)}));function pd($){return l0.pretty($)}var P3=J0.create({service:"actor.spawn"}),Cw=3,ww=3,id=`
|
|
8150
8150
|
|
|
8151
8151
|
---
|
|
8152
8152
|
|
|
@@ -8176,7 +8176,7 @@ This format lets the spawning agent and the checkpoint writer extract your progr
|
|
|
8176
8176
|
`).join(""))});return f6.set($,Y),Y.finally(()=>{if(f6.get($)===Y)f6.delete($)})}var Yc=/^wf_[0-9A-Za-z]+$/,Ew=($)=>{if(!Yc.test($))throw Error(`invalid workflow runID: ${JSON.stringify($)}`);return $},gw=($)=>vB.join(VY(),`${Ew($)}.js`),fB=($)=>vB.join(VY(),`${Ew($)}.jsonl`);function hw($){return{runID:$.id,sessionID:$.session_id,name:$.name,status:$.status,running:$.running,succeeded:$.succeeded,failed:$.failed,...$.current_phase?{currentPhase:$.current_phase}:{},...$.parent_actor_id?{parentActorID:$.parent_actor_id}:{},...$.args!==null&&$.args!==void 0?{args:$.args}:{},...$.script_sha?{scriptSha:$.script_sha}:{},...$.agent_timeout_ms!==null&&$.agent_timeout_ms!==void 0?{agentTimeoutMs:$.agent_timeout_ms}:{},...$.error?{error:$.error}:{},createdAt:$.time_created,updatedAt:$.time_updated}}var Qc=($)=>V.sync(()=>C0.use((Z)=>Z.insert(s2).values({id:$.runID,session_id:$.sessionID,name:$.name,status:"running",running:0,succeeded:0,failed:0,parent_actor_id:$.parentActorID??null,args:$.args??null,script_sha:$.scriptSha??null,agent_timeout_ms:$.agentTimeoutMs??null}).onConflictDoUpdate({target:s2.id,set:{status:"running",running:0,succeeded:0,failed:0,script_sha:$.scriptSha??null,...$.agentTimeoutMs!==void 0?{agent_timeout_ms:$.agentTimeoutMs}:{}}}).run())),Xc=($)=>V.sync(()=>C0.use((Z)=>Z.update(s2).set({current_phase:$.phase}).where(_0(s2.id,$.runID)).run())),Vc=($)=>V.sync(()=>C0.use((Z)=>Z.update(s2).set({running:$.running,succeeded:$.succeeded,failed:$.failed}).where(_0(s2.id,$.runID)).run())),Kc=($)=>V.sync(()=>C0.use((Z)=>Z.update(s2).set({status:$.status,...$.error?{error:$.error}:{}}).where(_0(s2.id,$.runID)).run())),Gc=($)=>V.sync(()=>C0.use((Z)=>{return(($?.sessionID)?Z.select().from(s2).where(_0(s2.session_id,$.sessionID)).orderBy(N8(s2.time_created)).all():Z.select().from(s2).orderBy(N8(s2.time_created)).all()).map(hw)})),Wc=($)=>V.sync(()=>C0.use((Z)=>{let J=Z.select().from(s2).where(_0(s2.id,$)).get();return J?hw(J):void 0})),Bc=($,Z)=>V.promise(async()=>{await(await import("fs/promises")).mkdir(VY(),{recursive:!0}),await Bun.write(gw($),Z)}),Hc=($)=>V.promise(()=>Bun.file(gw($)).text()),jc=($,Z)=>V.promise(()=>kw($,[Z])),Oc=($,Z)=>V.promise(()=>kw($,Z)),Uc=($)=>V.promise(async()=>{let Z=Bun.file(fB($));if(!await Z.exists())return{results:new Map,pass:1};let J=await Z.text(),Y=new Map,Q=0;for(let X of J.split(`
|
|
8177
8177
|
`)){if(!X)continue;let K;try{K=JSON.parse(X)}catch{continue}if(typeof K.pass==="number"&&K.pass>Q)Q=K.pass;if(K.t==="agent")Y.set(K.key,K.result)}return{results:Y,pass:Q+1}}),Fc=($)=>V.promise(async()=>{let J=(f6.get($)??Promise.resolve()).catch(()=>{}).then(async()=>{await(await import("fs/promises")).mkdir(VY(),{recursive:!0}),await Bun.write(fB($),"")});f6.set($,J);try{await J}finally{if(f6.get($)===J)f6.delete($)}}),e$={recordStart:Qc,recordPhase:Xc,flushCounters:Vc,recordTerminal:Kc,list:Gc,load:Wc,writeScript:Bc,readScript:Hc,appendJournal:jc,appendJournalSync:Oc,loadJournal:Uc,clearJournal:Fc};class mB{#$=new Map;get($){return this.#$.get($)}set($){return this.#$.set($.runID,$),$}values(){return this.#$.values()}clear(){this.#$.clear()}}function vw($){let Z=(X)=>V.gen(function*(){if(X.status!=="running")return;if(yield*J(X),yield*$.flushNow(X),yield*e$.recordTerminal({runID:X.runID,status:"cancelled"}).pipe(V.ignore),X.fiber)yield*C8.interrupt(X.fiber);X.status="cancelled",yield*$.bus.publish(C3,{sessionID:X.sessionID,runID:X.runID,status:"cancelled"}),yield*p0.succeed(X.deferred,{status:"cancelled"})}).pipe(V.provideService(C1,X.instance)),J=(X)=>V.gen(function*(){let K=Q1.current;if(K)yield*V.forEach([...X.childActorIDs],(G)=>K.cancel(X.sessionID,G,"graceful").pipe(V.ignore),{concurrency:"unbounded",discard:!0});yield*V.forEach([...X.worktrees],(G)=>$.worktree.remove({directory:G}).pipe(V.ignore),{concurrency:"unbounded",discard:!0}),X.worktrees.clear(),yield*V.forEach([...X.childRunIDs],(G)=>V.gen(function*(){let B=$.runs.get(G);if(B&&B.status==="running")yield*Z(B)}).pipe(V.ignore),{concurrency:"unbounded",discard:!0})}).pipe(V.provideService(C1,X.instance));return{reclaim:J,cancelEntry:Z,complete:(X)=>V.gen(function*(){if(X.entry.status="completed",yield*$.flushNow(X.entry),yield*e$.recordTerminal({runID:X.entry.runID,status:"completed"}).pipe(V.ignore),yield*$.bus.publish(C3,{sessionID:X.sessionID,runID:X.entry.runID,status:"completed"}),X.notifyOnTerminal!==!1)yield*$.inbox.send({receiverSessionID:X.sessionID,receiverActorID:X.parentActorID,senderSessionID:X.sessionID,senderActorID:"workflow",type:"actor_notification",content:`Workflow completed. run_id: ${X.entry.runID}
|
|
8178
8178
|
`+JSON.stringify(X.result??null).slice(0,4000)}).pipe(V.ignore);yield*p0.succeed(X.entry.deferred,{status:"completed",result:X.result})}).pipe(V.provideService(C1,X.entry.instance)),fail:(X)=>V.gen(function*(){if(yield*J(X.entry),X.entry.status="failed",yield*$.flushNow(X.entry),yield*e$.recordTerminal({runID:X.entry.runID,status:"failed",error:X.error}).pipe(V.ignore),yield*$.bus.publish(C3,{sessionID:X.sessionID,runID:X.entry.runID,status:"failed",error:X.error}),X.notifyOnTerminal!==!1)yield*$.inbox.send({receiverSessionID:X.sessionID,receiverActorID:X.parentActorID,senderSessionID:X.sessionID,senderActorID:"workflow",type:"actor_notification",content:`Workflow failed. run_id: ${X.entry.runID}
|
|
8179
|
-
error: ${X.error}`}).pipe(V.ignore);yield*p0.succeed(X.entry.deferred,{status:"failed",error:X.error})}).pipe(V.provideService(C1,X.entry.instance))}}import qc from"os";function dB($){let Z=0,J=[],Y=()=>{Z--;let Q=J.shift();if(Q)Q()};return{run(Q){return new Promise((X,K)=>{let G=()=>{Z++,Q().then((B)=>{Y(),X(B)},(B)=>{Y(),K(B)})};if(Z<$)G();else J.push(G)})}}}function fw(){let $=qc.cpus().length;return Math.min(16,2*Math.max(1,$>0?$:4))}function mw($,Z){return V.gen(function*(){if(Z)yield*e$.clearJournal($).pipe(V.ignore);let J=yield*e$.loadJournal($);return{results:J.results,pass:J.pass,occurrences:new Map}})}function dw($,Z){let J=$.occurrences.get(Z)??0;return $.occurrences.set(Z,J+1),Z+":"+J}function cw($,Z,J,Y){return e$.appendJournalSync($,[{t:"agent",key:J,result:Y,pass:Z.pass}]).pipe(V.ignore)}var uw=Symbol("straggler-timeout");function pw($){let Z=(B,H,W,j)=>{let O=H.timeoutMs??$.runAgentTimeoutMs;if(!O||O<=0)return W;return V.raceFirst(W,V.sleep(`${O} millis`).pipe(V.as(uw))).pipe(V.flatMap((U)=>U===uw?V.gen(function*(){let F=$.getActor();if(F)yield*F.cancel($.sessionID,B,"graceful").pipe(V.ignore);return yield*V.sync(()=>{try{j?.()}catch{}}),null}):V.succeed(U)))},J=(B,H,W={})=>{try{$.bridge.fork($.bus.publish(Rw,{sessionID:$.sessionID,runID:$.runID,actorID:W.actorID,agentType:B.agentType??"general",label:B.label,phase:B.phase??$.entry.currentPhase,reason:H,errorMessage:W.errorMessage}).pipe(V.ignore))}catch{}},Y=(B)=>B.label?B.phase?`[${B.phase}] ${B.label}`:B.label:B.phase?`[${B.phase}]`:void 0,Q=(B,H,W)=>({mode:"subagent",sessionID:$.sessionID,agentType:B.agentType??"general",description:Y(B),task:H,context:"none",tools:B.tools?[...B.tools]:"INHERIT",background:!0,parentActorID:$.parentActorID,model:W,onActorID:(j)=>$.entry.childActorIDs.add(j),...B.schema?{format:{type:"json_schema",schema:B.schema,retryCount:2}}:{}}),X=async(B,H,W,j)=>{$.entry.running++,$.scheduleFlush($.entry);let O="actor-error",U,F,D=await $.bridge.promise(V.gen(function*(){let w=yield*B.spawn(Q(W,H,j));U=w.actorID;let _=yield*Z(w.actorID,W,p0.await(w.outcome).pipe(V.map((z)=>{if(z.status!=="success")return O="actor-error",F=z.error,null;let C=W.schema?z.structured??null:z.structured??z.finalText??null;if(C===null)O="no-deliverable";return C})),()=>{O="timeout"});return $.entry.childActorIDs.delete(w.actorID),_})).catch((w)=>{return O="spawn-reject",F=w instanceof Error?w.message:String(w),null});if($.entry.running--,D!==null)$.entry.succeeded++;else $.entry.failed++,J(W,O,{actorID:U,errorMessage:F});return $.scheduleFlush($.entry),D},K=async(B,H,W,j)=>{let O="actor-error",U,F,D=await $.bridge.promise(V.gen(function*(){let R=yield*$.worktree.makeWorktreeInfo();return yield*$.worktree.createFromInfo(R),R})).catch((R)=>{return F=R instanceof Error?R.message:String(R),null});if(!D)return J(W,"spawn-reject",{errorMessage:F}),null;$.entry.worktrees.add(D.directory);let w=await $.bridge.promise($.worktree.head(D.directory)).catch(()=>""),_=await F0.provide({directory:D.directory,fn:()=>Promise.resolve(F0.current)}),z=await $.bridge.promise(lw().pipe(V.provideService(C1,_)));$.entry.running++,$.scheduleFlush($.entry);let C=await F0.provide({directory:D.directory,fn:()=>z.promise(V.gen(function*(){let R=yield*B.spawn(Q(W,H,j));U=R.actorID;let f=yield*Z(R.actorID,W,p0.await(R.outcome),()=>{O="timeout"});if($.entry.childActorIDs.delete(R.actorID),f===null)return null;if(f.status!=="success")O="actor-error",F=f.error;return{actorID:R.actorID,outcome:f}})).catch((R)=>{return O="spawn-reject",F=R instanceof Error?R.message:String(R),null})}).catch((R)=>{return O="spawn-reject",F=R instanceof Error?R.message:String(R),null}),P=!!C&&C.outcome.status==="success";if($.entry.running--,P)$.entry.succeeded++;else $.entry.failed++,J(W,O,{actorID:U,errorMessage:F});$.scheduleFlush($.entry);let I=C&&C.outcome.status==="success"?W.schema?C.outcome.structured??null:C.outcome.structured??C.outcome.finalText??null:null,L=w!==""&&await $.bridge.promise($.worktree.isPristine(D.directory,w)).catch(()=>!1);if(!(P&&!L))return await $.bridge.promise($.worktree.remove({directory:D.directory})).catch(()=>{return}),$.entry.worktrees.delete(D.directory),P?I:null;let h={branch:D.branch,directory:D.directory,changed:!0};if(I&&typeof I==="object"&&!Array.isArray(I))return{...I,_worktree:h};return{_worktree:h,result:I}},G=async(B,H,W)=>{if($.entry.agentCount>=$.lifecycleCap)return $.warnCapOnce(),J(B,"over-cap"),null;$.entry.agentCount++;let j=$.getActor();if(!j)throw Error("Actor service unavailable");let O=await $.bridge.promise($.resolveAgentModel(B.model,$.defaultModel,$.entry.warnedModelRefs));return W(j,H,B,O)};return(B,H)=>{let W=H??{},j=String(B);if(W.isolation!=="worktree"){let O=bw(j,{agentType:W.agentType,model:W.model,schema:W.schema,phase:W.phase}),U=dw($.journal,O);if($.journal.results.has(U))return $.entry.succeeded++,$.scheduleFlush($.entry),Promise.resolve($.journal.results.get(U));return(async()=>{let F=await $.semaphore.run(async()=>$.globalSemaphore.run(async()=>G(W,j,X)));if(F!==null)await V.runPromise(cw($.runID,$.journal,U,F));return F})()}return $.semaphore.run(async()=>$.globalSemaphore.run(async()=>G(W,j,K)))}}async function ow($){let Z=cB(await $),[J,Y,{QuickJSWASMModule:Q}]=await Promise.all([Z.importModuleLoader().then(cB),Z.importFFI(),import("./chunk-
|
|
8179
|
+
error: ${X.error}`}).pipe(V.ignore);yield*p0.succeed(X.entry.deferred,{status:"failed",error:X.error})}).pipe(V.provideService(C1,X.entry.instance))}}import qc from"os";function dB($){let Z=0,J=[],Y=()=>{Z--;let Q=J.shift();if(Q)Q()};return{run(Q){return new Promise((X,K)=>{let G=()=>{Z++,Q().then((B)=>{Y(),X(B)},(B)=>{Y(),K(B)})};if(Z<$)G();else J.push(G)})}}}function fw(){let $=qc.cpus().length;return Math.min(16,2*Math.max(1,$>0?$:4))}function mw($,Z){return V.gen(function*(){if(Z)yield*e$.clearJournal($).pipe(V.ignore);let J=yield*e$.loadJournal($);return{results:J.results,pass:J.pass,occurrences:new Map}})}function dw($,Z){let J=$.occurrences.get(Z)??0;return $.occurrences.set(Z,J+1),Z+":"+J}function cw($,Z,J,Y){return e$.appendJournalSync($,[{t:"agent",key:J,result:Y,pass:Z.pass}]).pipe(V.ignore)}var uw=Symbol("straggler-timeout");function pw($){let Z=(B,H,W,j)=>{let O=H.timeoutMs??$.runAgentTimeoutMs;if(!O||O<=0)return W;return V.raceFirst(W,V.sleep(`${O} millis`).pipe(V.as(uw))).pipe(V.flatMap((U)=>U===uw?V.gen(function*(){let F=$.getActor();if(F)yield*F.cancel($.sessionID,B,"graceful").pipe(V.ignore);return yield*V.sync(()=>{try{j?.()}catch{}}),null}):V.succeed(U)))},J=(B,H,W={})=>{try{$.bridge.fork($.bus.publish(Rw,{sessionID:$.sessionID,runID:$.runID,actorID:W.actorID,agentType:B.agentType??"general",label:B.label,phase:B.phase??$.entry.currentPhase,reason:H,errorMessage:W.errorMessage}).pipe(V.ignore))}catch{}},Y=(B)=>B.label?B.phase?`[${B.phase}] ${B.label}`:B.label:B.phase?`[${B.phase}]`:void 0,Q=(B,H,W)=>({mode:"subagent",sessionID:$.sessionID,agentType:B.agentType??"general",description:Y(B),task:H,context:"none",tools:B.tools?[...B.tools]:"INHERIT",background:!0,parentActorID:$.parentActorID,model:W,onActorID:(j)=>$.entry.childActorIDs.add(j),...B.schema?{format:{type:"json_schema",schema:B.schema,retryCount:2}}:{}}),X=async(B,H,W,j)=>{$.entry.running++,$.scheduleFlush($.entry);let O="actor-error",U,F,D=await $.bridge.promise(V.gen(function*(){let w=yield*B.spawn(Q(W,H,j));U=w.actorID;let _=yield*Z(w.actorID,W,p0.await(w.outcome).pipe(V.map((z)=>{if(z.status!=="success")return O="actor-error",F=z.error,null;let C=W.schema?z.structured??null:z.structured??z.finalText??null;if(C===null)O="no-deliverable";return C})),()=>{O="timeout"});return $.entry.childActorIDs.delete(w.actorID),_})).catch((w)=>{return O="spawn-reject",F=w instanceof Error?w.message:String(w),null});if($.entry.running--,D!==null)$.entry.succeeded++;else $.entry.failed++,J(W,O,{actorID:U,errorMessage:F});return $.scheduleFlush($.entry),D},K=async(B,H,W,j)=>{let O="actor-error",U,F,D=await $.bridge.promise(V.gen(function*(){let R=yield*$.worktree.makeWorktreeInfo();return yield*$.worktree.createFromInfo(R),R})).catch((R)=>{return F=R instanceof Error?R.message:String(R),null});if(!D)return J(W,"spawn-reject",{errorMessage:F}),null;$.entry.worktrees.add(D.directory);let w=await $.bridge.promise($.worktree.head(D.directory)).catch(()=>""),_=await F0.provide({directory:D.directory,fn:()=>Promise.resolve(F0.current)}),z=await $.bridge.promise(lw().pipe(V.provideService(C1,_)));$.entry.running++,$.scheduleFlush($.entry);let C=await F0.provide({directory:D.directory,fn:()=>z.promise(V.gen(function*(){let R=yield*B.spawn(Q(W,H,j));U=R.actorID;let f=yield*Z(R.actorID,W,p0.await(R.outcome),()=>{O="timeout"});if($.entry.childActorIDs.delete(R.actorID),f===null)return null;if(f.status!=="success")O="actor-error",F=f.error;return{actorID:R.actorID,outcome:f}})).catch((R)=>{return O="spawn-reject",F=R instanceof Error?R.message:String(R),null})}).catch((R)=>{return O="spawn-reject",F=R instanceof Error?R.message:String(R),null}),P=!!C&&C.outcome.status==="success";if($.entry.running--,P)$.entry.succeeded++;else $.entry.failed++,J(W,O,{actorID:U,errorMessage:F});$.scheduleFlush($.entry);let I=C&&C.outcome.status==="success"?W.schema?C.outcome.structured??null:C.outcome.structured??C.outcome.finalText??null:null,L=w!==""&&await $.bridge.promise($.worktree.isPristine(D.directory,w)).catch(()=>!1);if(!(P&&!L))return await $.bridge.promise($.worktree.remove({directory:D.directory})).catch(()=>{return}),$.entry.worktrees.delete(D.directory),P?I:null;let h={branch:D.branch,directory:D.directory,changed:!0};if(I&&typeof I==="object"&&!Array.isArray(I))return{...I,_worktree:h};return{_worktree:h,result:I}},G=async(B,H,W)=>{if($.entry.agentCount>=$.lifecycleCap)return $.warnCapOnce(),J(B,"over-cap"),null;$.entry.agentCount++;let j=$.getActor();if(!j)throw Error("Actor service unavailable");let O=await $.bridge.promise($.resolveAgentModel(B.model,$.defaultModel,$.entry.warnedModelRefs));return W(j,H,B,O)};return(B,H)=>{let W=H??{},j=String(B);if(W.isolation!=="worktree"){let O=bw(j,{agentType:W.agentType,model:W.model,schema:W.schema,phase:W.phase}),U=dw($.journal,O);if($.journal.results.has(U))return $.entry.succeeded++,$.scheduleFlush($.entry),Promise.resolve($.journal.results.get(U));return(async()=>{let F=await $.semaphore.run(async()=>$.globalSemaphore.run(async()=>G(W,j,X)));if(F!==null)await V.runPromise(cw($.runID,$.journal,U,F));return F})()}return $.semaphore.run(async()=>$.globalSemaphore.run(async()=>G(W,j,K)))}}async function ow($){let Z=cB(await $),[J,Y,{QuickJSWASMModule:Q}]=await Promise.all([Z.importModuleLoader().then(cB),Z.importFFI(),import("./chunk-zyxvd9fj.js").then(cB)]),X=await J();X.type="sync";let K=new Y(X);return new Q(X,K)}function cB($){return $&&"default"in $&&$.default?$.default&&"default"in $.default&&$.default.default?$.default.default:$.default:$}function iw($){let Z=typeof $=="number"?$:$.getTime();return function(){return Date.now()>Z}}var Dc={type:"sync",importFFI:()=>import("./chunk-56pwz1kk.js").then(($)=>$.QuickJSFFI),importModuleLoader:()=>import("./chunk-q2exgz82.js").then(($)=>$.default)},nw=Dc;var zc=ow(nw),sw=43200000,_c=67108864,Pc=2654435769,Mc=`
|
|
8180
8180
|
globalThis.parallel = (thunks) =>
|
|
8181
8181
|
Promise.all(thunks.map((t) => Promise.resolve().then(t)));
|
|
8182
8182
|
globalThis.pipeline = (items, ...stages) =>
|