@caspian2026/agent-sdk 0.0.20 → 0.0.21
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/dist/{chunk-q8t0ym9s.js → chunk-06xmvpv7.js} +83 -83
- package/dist/{chunk-5gr6ekgm.js → chunk-07069jq1.js} +4 -4
- package/dist/{chunk-ckrs789w.js → chunk-0731m51q.js} +1 -1
- package/dist/chunk-079tw1d6.js +155 -0
- package/dist/{chunk-w2bff8pq.js → chunk-08prz7zp.js} +12 -12
- package/dist/chunk-0hqv6vq3.js +127 -0
- package/dist/{chunk-qqc3b97c.js → chunk-0paqc2yw.js} +1 -1
- package/dist/{chunk-t83amzhd.js → chunk-0r5bb9j4.js} +12 -12
- package/dist/chunk-0rbxzwnb.js +146 -0
- package/dist/chunk-0t81d427.js +41 -0
- package/dist/{chunk-2mfzqkzn.js → chunk-0vkfrmqm.js} +29 -69
- package/dist/{chunk-bs9rn85s.js → chunk-0vp3wfab.js} +1 -1
- package/dist/{chunk-6rcf54zd.js → chunk-0xjaqda8.js} +27 -48
- package/dist/chunk-102ee39t.js +97 -0
- package/dist/chunk-1058brys.js +54 -0
- package/dist/{chunk-ekewg3tj.js → chunk-14qkwgmf.js} +4 -4
- package/dist/{chunk-2b00k9ep.js → chunk-1871fy77.js} +78 -78
- package/dist/{chunk-y83gxqvc.js → chunk-1ae3nt9j.js} +3 -3
- package/dist/{chunk-t3yc7m07.js → chunk-1gx78081.js} +1 -1
- package/dist/{chunk-d99k9r9g.js → chunk-1h2famwb.js} +1 -1
- package/dist/{chunk-vv84k232.js → chunk-1ksywqf6.js} +5 -5
- package/dist/{chunk-6hs3wed5.js → chunk-1q2taz28.js} +7 -7
- package/dist/{chunk-cgzq4zww.js → chunk-21jaw3mt.js} +4 -4
- package/dist/{chunk-ra9hbfyz.js → chunk-24q2kxjm.js} +3 -3
- package/dist/{chunk-ja23mty8.js → chunk-25s7wwvz.js} +83 -83
- package/dist/{chunk-xm9zf0tv.js → chunk-26b7qsct.js} +78 -78
- package/dist/{chunk-e7j6g62d.js → chunk-26sypsqa.js} +10 -11
- package/dist/{chunk-xkra2684.js → chunk-26vzce3s.js} +86 -85
- package/dist/{chunk-ynx3fetd.js → chunk-26wtxbdc.js} +463 -1222
- package/dist/chunk-27dhfb9v.js +77 -0
- package/dist/{chunk-k6cq3j7z.js → chunk-2fwze72g.js} +1 -1
- package/dist/{chunk-rrtpbztr.js → chunk-2gzv8nrw.js} +3 -4
- package/dist/chunk-2mdzhnxj.js +88 -0
- package/dist/{chunk-9b71sn2g.js → chunk-2qghgd3d.js} +41 -41
- package/dist/{chunk-k8by1vfd.js → chunk-2qkcx6gx.js} +19 -19
- package/dist/chunk-2xes6j9k.js +121 -0
- package/dist/{chunk-zp5nvg44.js → chunk-33e7y2ye.js} +2 -2
- package/dist/{chunk-1t3cyn1k.js → chunk-3c25bcsw.js} +1 -1
- package/dist/{chunk-nwdpjkrw.js → chunk-3csagva2.js} +78 -78
- package/dist/{chunk-60a647ty.js → chunk-3jwpbxxx.js} +81 -81
- package/dist/chunk-3mgywd32.js +8 -0
- package/dist/{chunk-52pp0dbk.js → chunk-3mqgy4d8.js} +4 -4
- package/dist/{chunk-568q88qz.js → chunk-3nk79af8.js} +1 -1
- package/dist/chunk-3pm48qgm.js +97 -0
- package/dist/{chunk-rzk001ay.js → chunk-3tx97a7z.js} +85 -85
- package/dist/{chunk-8ady2sm4.js → chunk-3vy1jt9p.js} +8 -8
- package/dist/{chunk-sthmb4xf.js → chunk-3w6dvw7z.js} +78 -78
- package/dist/{chunk-s201s689.js → chunk-40p1xyv4.js} +18 -18
- package/dist/{chunk-j77g2v22.js → chunk-4621eys4.js} +5 -5
- package/dist/{chunk-7deqmrby.js → chunk-46y1vrxs.js} +6 -6
- package/dist/{chunk-khwhppzs.js → chunk-49ce42vr.js} +2 -2
- package/dist/{chunk-6qb753r5.js → chunk-4bjfp2cp.js} +79 -79
- package/dist/{chunk-m6vs965c.js → chunk-4jm600zv.js} +1 -1
- package/dist/{chunk-v2szqm5g.js → chunk-4k9d7gxv.js} +5 -5
- package/dist/{chunk-pqf2bjy1.js → chunk-4nyewkpd.js} +4 -4
- package/dist/{chunk-f79jyxwd.js → chunk-4pbx3g7s.js} +4 -4
- package/dist/{chunk-qrgxbrs9.js → chunk-4sk0ekmh.js} +9810 -2820
- package/dist/{chunk-n3vmrzcy.js → chunk-4th9sgzv.js} +5 -5
- package/dist/{chunk-9drwsb3g.js → chunk-50cqjkgy.js} +80 -80
- package/dist/{chunk-xyzbgjpv.js → chunk-530bp1wc.js} +2 -2
- package/dist/{chunk-tnpk0ne1.js → chunk-55raexh7.js} +935 -2391
- package/dist/{chunk-bbhg7m1a.js → chunk-59564wn5.js} +79 -79
- package/dist/{chunk-z9v4bxrj.js → chunk-5ccdsxgy.js} +3 -3
- package/dist/{chunk-3k8ecscj.js → chunk-5e4jj4hd.js} +78 -78
- package/dist/{chunk-zqajmq38.js → chunk-5ekyhb1w.js} +6 -6
- package/dist/chunk-5h4berfm.js +30 -0
- package/dist/{chunk-t8chhacb.js → chunk-5h5kx2jd.js} +2 -2
- package/dist/chunk-5jkawn33.js +71 -0
- package/dist/{chunk-5v6wr1z4.js → chunk-5n1jc02d.js} +2 -2
- package/dist/{chunk-x09aacvx.js → chunk-5wnkq46y.js} +5 -5
- package/dist/{chunk-r585pc0g.js → chunk-5z28bqne.js} +3 -4
- package/dist/{chunk-gbvmks09.js → chunk-64c1avct.js} +1 -1
- package/dist/{chunk-y8b45mt2.js → chunk-64r16v22.js} +4 -4
- package/dist/{chunk-ej882sb5.js → chunk-65w2019d.js} +26 -26
- package/dist/{chunk-m82ketm1.js → chunk-66wbs5de.js} +78 -78
- package/dist/{chunk-f517h74h.js → chunk-66zry909.js} +1 -1
- package/dist/{chunk-kjx9a9p4.js → chunk-68ffk5qa.js} +2 -2
- package/dist/{chunk-bstyysxw.js → chunk-68ypktng.js} +3 -3
- package/dist/{chunk-xygy5v97.js → chunk-69bms9eh.js} +30 -30
- package/dist/{chunk-5vavvf6y.js → chunk-69n11zng.js} +5 -5
- package/dist/{chunk-7wegz81g.js → chunk-6dj5t602.js} +1 -1
- package/dist/{chunk-vnrevqdf.js → chunk-6dngjwkh.js} +4 -4
- package/dist/{chunk-7kp42hzq.js → chunk-6nsd9606.js} +2 -2
- package/dist/chunk-7641fj0b.js +107 -0
- package/dist/{chunk-fdwtd6s9.js → chunk-7aw745vx.js} +3 -3
- package/dist/{chunk-dv38yqdn.js → chunk-7gy9xrjc.js} +3 -3
- package/dist/{chunk-93hxjnkb.js → chunk-7k74bhsg.js} +78 -78
- package/dist/{chunk-1s9jxpjm.js → chunk-7pz9rdg8.js} +7 -7
- package/dist/{chunk-vd5dh925.js → chunk-7ry9qp54.js} +78 -78
- package/dist/{chunk-8q5fzyem.js → chunk-7sgtxrsc.js} +8 -10
- package/dist/{chunk-vx28ztc7.js → chunk-7v902gw4.js} +20 -20
- package/dist/chunk-7vhfhyq0.js +123 -0
- package/dist/{chunk-dmp3nd67.js → chunk-7w4n7zr8.js} +90 -90
- package/dist/{chunk-7yexhdjs.js → chunk-7wm5s02e.js} +1 -1
- package/dist/{chunk-wfh12nzh.js → chunk-7xyswgjh.js} +1 -1
- package/dist/{chunk-bdhdmkya.js → chunk-83hfzbx3.js} +1 -1
- package/dist/chunk-86fwp0mg.js +148 -0
- package/dist/{chunk-tevzn1xp.js → chunk-8g5pe1gr.js} +1 -1
- package/dist/{chunk-6twsw69m.js → chunk-8knpmkt5.js} +7 -7
- package/dist/chunk-8mpv3j7b.js +105 -0
- package/dist/chunk-8scyf6tf.js +90 -0
- package/dist/{chunk-xj8tk3d7.js → chunk-8yhf030a.js} +3 -3
- package/dist/chunk-92cczfwx.js +903 -0
- package/dist/{chunk-mbfzfg56.js → chunk-9r16nw6z.js} +85 -85
- package/dist/{chunk-s7tq4e5g.js → chunk-9rm2hczd.js} +78 -78
- package/dist/{chunk-s13y3w7e.js → chunk-9shyda79.js} +37 -37
- package/dist/{chunk-c6gpdd2c.js → chunk-9t8650e0.js} +78 -78
- package/dist/{chunk-7e9xcw77.js → chunk-9x5zgy22.js} +1 -1
- package/dist/{chunk-1ytng03p.js → chunk-9znd08ha.js} +12 -12
- package/dist/{chunk-r27tskss.js → chunk-a0qftggg.js} +9 -11
- package/dist/{chunk-0w2ntzwz.js → chunk-ab78zrxc.js} +92 -92
- package/dist/{chunk-638qz5y7.js → chunk-acj1j3dw.js} +5 -5
- package/dist/{chunk-z8n8cjhz.js → chunk-aj7nt1ae.js} +2 -2
- package/dist/{chunk-jwqveqpr.js → chunk-akd5hjav.js} +9 -9
- package/dist/{chunk-et3jfht8.js → chunk-ang6j1ma.js} +16 -16
- package/dist/{chunk-s9jxtj04.js → chunk-arrvgw6z.js} +95 -94
- package/dist/{chunk-cajjdb7j.js → chunk-as3pvrmw.js} +8 -8
- package/dist/{chunk-5f57qtf9.js → chunk-ase86y73.js} +1 -1
- package/dist/{chunk-m12e2wq3.js → chunk-b08zb0sw.js} +80 -80
- package/dist/{chunk-6d05fvxz.js → chunk-b0kf00ff.js} +2 -2
- package/dist/{chunk-r055z03k.js → chunk-b1kcd3ss.js} +1 -1
- package/dist/{chunk-k0dprbnn.js → chunk-ba473zak.js} +78 -78
- package/dist/{chunk-0tja7d1y.js → chunk-bg4x9ex0.js} +6 -6
- package/dist/{chunk-eb4t4ehh.js → chunk-bgzwt111.js} +6 -6
- package/dist/chunk-bh5zqvyc.js +36 -0
- package/dist/{chunk-eynfddhq.js → chunk-bpes1x7d.js} +144 -143
- package/dist/chunk-brbrrj03.js +114 -0
- package/dist/{chunk-zhnnzkzm.js → chunk-brjd9zmk.js} +14 -14
- package/dist/chunk-bs975312.js +133 -0
- package/dist/chunk-bww6hm2e.js +58 -0
- package/dist/{chunk-p0n9ew4x.js → chunk-byfawrfx.js} +4 -4
- package/dist/chunk-c67ypsa8.js +20 -0
- package/dist/chunk-c6sjhj89.js +1284 -0
- package/dist/{chunk-pyn4ry36.js → chunk-c7jwbe76.js} +57 -103
- package/dist/chunk-cdef9v7b.js +27 -0
- package/dist/{chunk-9029sbq1.js → chunk-cdz5yb0r.js} +1 -1
- package/dist/{chunk-4bcx2a3p.js → chunk-cgfdkzhb.js} +1 -1
- package/dist/chunk-cgy9g4wp.js +100 -0
- package/dist/{chunk-fefs2xby.js → chunk-cmtvwbwf.js} +25 -25
- package/dist/{chunk-p8hn07q2.js → chunk-cnsj3vq2.js} +1 -1
- package/dist/{chunk-ngde5k9k.js → chunk-cpywwph7.js} +79 -79
- package/dist/chunk-crcrnd8y.js +55 -0
- package/dist/{chunk-j15xyew5.js → chunk-crfk7ed8.js} +4 -4
- package/dist/{chunk-0a8jb5c8.js → chunk-crvwmrey.js} +9 -9
- package/dist/{chunk-44bqv91d.js → chunk-cxrktb5g.js} +3 -3
- package/dist/{chunk-apjnwens.js → chunk-d4mdda98.js} +8 -8
- package/dist/{chunk-d2cypdsx.js → chunk-d6kvya9n.js} +23 -23
- package/dist/chunk-daqd8kee.js +122 -0
- package/dist/{chunk-cx21etb2.js → chunk-db2awvr6.js} +2 -2
- package/dist/{chunk-b1hygym1.js → chunk-ddsjkqs4.js} +8 -8
- package/dist/{chunk-rx9ypbjy.js → chunk-dfzkwynj.js} +8 -8
- package/dist/{chunk-yteprw63.js → chunk-dhk2dt7n.js} +29 -29
- package/dist/{chunk-rzn9w8p2.js → chunk-dq94esjd.js} +3 -3
- package/dist/{chunk-z8b8f2n3.js → chunk-dw1x0kzg.js} +79 -79
- package/dist/{chunk-k3gvjjm9.js → chunk-e0abab5b.js} +5 -5
- package/dist/{chunk-wyyd1qfn.js → chunk-e28pnfmr.js} +81 -81
- package/dist/{chunk-pg8asjpk.js → chunk-e9w9zc0g.js} +20 -20
- package/dist/chunk-effhh1pw.js +81 -0
- package/dist/{chunk-rfj6gjwh.js → chunk-efrjt26j.js} +14 -14
- package/dist/{chunk-p4e5ymdw.js → chunk-ehtwnxpg.js} +1 -1
- package/dist/chunk-em7h8kqy.js +89 -0
- package/dist/{chunk-yh46f77t.js → chunk-enkgx9p5.js} +78 -78
- package/dist/{chunk-ysfam81t.js → chunk-eqp1rfft.js} +2 -2
- package/dist/{chunk-r4pq77kb.js → chunk-etdt1xz3.js} +3 -3
- package/dist/{chunk-dh01e4bp.js → chunk-ewadzrm8.js} +2 -2
- package/dist/{chunk-7dc9d8fy.js → chunk-f98yad99.js} +7 -7
- package/dist/{chunk-4v1mr2x2.js → chunk-f99jr604.js} +41 -41
- package/dist/{chunk-37j24srh.js → chunk-f9mnmjf4.js} +6 -6
- package/dist/{chunk-qbbf7rr5.js → chunk-fajg8x36.js} +727 -1818
- package/dist/{chunk-snd4pbkp.js → chunk-fbv4apne.js} +1 -1
- package/dist/{chunk-8m1gfrme.js → chunk-fc8mescd.js} +26 -15
- package/dist/{chunk-8a1jee0e.js → chunk-fcynwjpm.js} +2 -2
- package/dist/{chunk-gt43z5zd.js → chunk-fddfa07d.js} +81 -81
- package/dist/{chunk-bq0wp28e.js → chunk-feyzykye.js} +1 -1
- package/dist/chunk-ffcwak1t.js +91 -0
- package/dist/{chunk-25jhz0br.js → chunk-fgmmtj9k.js} +16 -16
- package/dist/{chunk-4kfhh3aw.js → chunk-fj3a38w3.js} +4 -4
- package/dist/chunk-fk60d1qf.js +87 -0
- package/dist/chunk-fnxysrtm.js +52 -0
- package/dist/chunk-fq24vgdm.js +113 -0
- package/dist/{chunk-dy8278wt.js → chunk-fqak69ft.js} +7 -7
- package/dist/{chunk-657k4mef.js → chunk-fs7jna05.js} +79 -79
- package/dist/{chunk-0zscb6c7.js → chunk-fyc5fepv.js} +1 -1
- package/dist/{chunk-vwt2fv6j.js → chunk-g0wv2y40.js} +3 -3
- package/dist/chunk-g3gr434c.js +101 -0
- package/dist/{chunk-v9sy0cj3.js → chunk-g3zgsm5x.js} +10 -10
- package/dist/{chunk-vxsad4bw.js → chunk-g9f19ttm.js} +2 -2
- package/dist/{chunk-bw8y1msy.js → chunk-g9q2patf.js} +5 -5
- package/dist/chunk-gdwdqewd.js +19 -0
- package/dist/{chunk-h8n0a991.js → chunk-ge8zt73c.js} +79 -79
- package/dist/{chunk-3w4xq6cv.js → chunk-gg55fns0.js} +92 -92
- package/dist/chunk-gk8dvdsw.js +140 -0
- package/dist/{chunk-9p62r6he.js → chunk-gw6kn54v.js} +6 -6
- package/dist/chunk-gz1e8y1w.js +33 -0
- package/dist/{chunk-ycpdfeya.js → chunk-gzt1cd1y.js} +79 -79
- package/dist/{chunk-m13ptmf2.js → chunk-h9n54swm.js} +2 -2
- package/dist/{chunk-7njkaxjp.js → chunk-hakdhagh.js} +120 -39
- package/dist/{chunk-dzcb2ekz.js → chunk-hcwcwa84.js} +4 -4
- package/dist/{chunk-1ehn6qdp.js → chunk-hf96emr1.js} +13 -13
- package/dist/{chunk-vq4k182g.js → chunk-hgteysah.js} +5 -5
- package/dist/{chunk-6fx36a3s.js → chunk-hszppxh0.js} +5 -5
- package/dist/chunk-hvbnh0ht.js +131 -0
- package/dist/{chunk-f9ybfyyp.js → chunk-hwfknpxv.js} +2 -2
- package/dist/{chunk-gm8ht8g9.js → chunk-hwyp85fa.js} +6 -6
- package/dist/{chunk-kt25n52f.js → chunk-j5bth84e.js} +4 -4
- package/dist/{chunk-tkbwrjte.js → chunk-j64ga6ta.js} +284 -325
- package/dist/{chunk-1ycd7t0f.js → chunk-jagq2tcw.js} +88 -88
- package/dist/{chunk-trm02xde.js → chunk-jd32zbps.js} +2 -2
- package/dist/{chunk-0f84wjjc.js → chunk-jgwfkvdk.js} +79 -79
- package/dist/{chunk-6fe0an4e.js → chunk-jhrshs1y.js} +79 -79
- package/dist/{chunk-3xamk0n1.js → chunk-jjnmcaeb.js} +25 -25
- package/dist/{chunk-x4x3691j.js → chunk-jtjqrrtq.js} +12 -12
- package/dist/{chunk-pp5zbnpr.js → chunk-jtx7ka0g.js} +80 -80
- package/dist/chunk-jvdhwjth.js +107 -0
- package/dist/{chunk-fpq87r80.js → chunk-jzthz1bx.js} +1 -1
- package/dist/{chunk-taqr0qw1.js → chunk-k0p9w03v.js} +3 -3
- package/dist/{chunk-9re786wa.js → chunk-k4xyha98.js} +40 -40
- package/dist/{chunk-pqxyft7d.js → chunk-k6tvcn37.js} +8 -8
- package/dist/{chunk-a3qtafgw.js → chunk-k8vp0atq.js} +79 -79
- package/dist/chunk-kbqx20y8.js +89 -0
- package/dist/{chunk-h4tnp6dw.js → chunk-khnqc2x8.js} +7 -7
- package/dist/{chunk-s9906sac.js → chunk-kqc0x8w6.js} +83 -83
- package/dist/{chunk-nsxw4b3j.js → chunk-ksq6zjys.js} +8 -8
- package/dist/{chunk-0pbwcm8b.js → chunk-kwekc97v.js} +1 -1
- package/dist/{chunk-qs4stpt5.js → chunk-ky1z78ve.js} +14 -14
- package/dist/{chunk-e22at2jn.js → chunk-m1ergjg5.js} +4 -4
- package/dist/chunk-m4k4mve9.js +130 -0
- package/dist/{chunk-q9y73cmh.js → chunk-mcws22k3.js} +1 -1
- package/dist/chunk-mfdqvcr5.js +50 -0
- package/dist/{chunk-88k0rgdp.js → chunk-mgv4r1af.js} +12 -12
- package/dist/{chunk-62jrhytw.js → chunk-mh52m71p.js} +10 -10
- package/dist/{chunk-pt6vj628.js → chunk-mjcxt56a.js} +9 -9
- package/dist/chunk-mpc6f96q.js +111 -0
- package/dist/{chunk-s5arr49c.js → chunk-mra3tr23.js} +200 -11
- package/dist/{chunk-4e1j46k0.js → chunk-mswx2nma.js} +3 -3
- package/dist/{chunk-zat7q2e0.js → chunk-mxt0a1ab.js} +79 -79
- package/dist/chunk-mympkkbw.js +103 -0
- package/dist/chunk-mzrxzmpm.js +121 -0
- package/dist/{chunk-0b85d7q0.js → chunk-n0zd06za.js} +7 -7
- package/dist/{chunk-jrqjxhxj.js → chunk-n22k5xdw.js} +2 -2
- package/dist/{chunk-7gbe6ftc.js → chunk-n9ftnh2y.js} +10 -10
- package/dist/{chunk-ykvf93ft.js → chunk-nd39ny9k.js} +79 -79
- package/dist/{chunk-mtstpt1e.js → chunk-nd7zx01p.js} +43 -43
- package/dist/{chunk-pnc7q9rt.js → chunk-netzwgv1.js} +1 -1
- package/dist/chunk-nmgj86tt.js +24 -0
- package/dist/{chunk-r1q9s5hs.js → chunk-ns7x6xam.js} +10 -13
- package/dist/{chunk-vbe1ersf.js → chunk-p7vkh4wx.js} +1 -1
- package/dist/{chunk-q74fcthe.js → chunk-p8na2wwp.js} +2 -2
- package/dist/{chunk-tmye4d2k.js → chunk-pajqjgkr.js} +15 -15
- package/dist/{chunk-pg4fbhbm.js → chunk-pe3rkfp2.js} +11 -11
- package/dist/chunk-pe824pp5.js +71 -0
- package/dist/{chunk-sbe9zd56.js → chunk-pgtnj1mt.js} +6 -6
- package/dist/{chunk-41wn5eqw.js → chunk-phr23vzw.js} +10 -10
- package/dist/{chunk-5nqrdqz5.js → chunk-ppwjyveh.js} +1 -1
- package/dist/chunk-pqe0s3es.js +85 -0
- package/dist/{chunk-ja1nqz5q.js → chunk-ps49ymvj.js} +2 -2
- package/dist/{chunk-2vc3fyp9.js → chunk-pwwa7s62.js} +2 -2
- package/dist/chunk-px0z9762.js +91 -0
- package/dist/{chunk-v8k67zfz.js → chunk-q4wj3v8n.js} +392 -1127
- package/dist/{chunk-wwrswxg1.js → chunk-qajrkk97.js} +1 -1
- package/dist/{chunk-b610qrvk.js → chunk-qatfdxvd.js} +3 -3
- package/dist/{chunk-qka6pqrq.js → chunk-qb6k2afy.js} +11 -11
- package/dist/{chunk-rgaedd84.js → chunk-qkczt8cr.js} +5 -5
- package/dist/chunk-qnfx3qtx.js +617 -0
- package/dist/{chunk-eta5aekm.js → chunk-qp2qdcda.js} +30 -9
- package/dist/{chunk-cfpnb7x4.js → chunk-qr516hqj.js} +78 -78
- package/dist/{chunk-a1mewckj.js → chunk-qswz887n.js} +78 -78
- package/dist/{chunk-tnv92c5m.js → chunk-r1w3jrs8.js} +81 -81
- package/dist/chunk-r5q49139.js +93 -0
- package/dist/{chunk-a00gfn8e.js → chunk-rmbbmd3s.js} +2 -2
- package/dist/{chunk-xdxdztxa.js → chunk-rn0v1hk8.js} +1 -1
- package/dist/{chunk-cqb31tfg.js → chunk-rnxctq9p.js} +6 -6
- package/dist/{chunk-z7yj7dfh.js → chunk-rs4yvre8.js} +10 -10
- package/dist/chunk-s07p92v4.js +107 -0
- package/dist/{chunk-fqr6n9z6.js → chunk-s8gy4ky9.js} +3 -3
- package/dist/chunk-s8hykxf5.js +145 -0
- package/dist/{chunk-fr5s5ceq.js → chunk-s8kj6ajy.js} +2 -2
- package/dist/{chunk-39r7sh1h.js → chunk-scz7dzwq.js} +90 -90
- package/dist/{chunk-nztayqyx.js → chunk-sd36yzx8.js} +1 -1
- package/dist/chunk-sgpmpn90.js +35 -0
- package/dist/chunk-sh02d2qn.js +38 -0
- package/dist/{chunk-6c22q39e.js → chunk-sncz1ag3.js} +78 -78
- package/dist/{chunk-0dwdg9bz.js → chunk-ssec5007.js} +9 -9
- package/dist/{chunk-2qpy8kne.js → chunk-szj5wvdy.js} +1 -1
- package/dist/{chunk-4nqm22j3.js → chunk-t29a6zb5.js} +4 -6
- package/dist/{chunk-w60c0dkw.js → chunk-t32ddjb3.js} +5 -5
- package/dist/{chunk-3hcfwedh.js → chunk-t4khqff1.js} +5 -5
- package/dist/{chunk-q53kkzhr.js → chunk-t7j96x8z.js} +80 -80
- package/dist/{chunk-qrdbqeve.js → chunk-t9p85zff.js} +2 -2
- package/dist/{chunk-ma6x4ws8.js → chunk-tgafrp5a.js} +46 -46
- package/dist/{chunk-ewsvbzhz.js → chunk-tgnbeeyx.js} +3 -3
- package/dist/{chunk-yp64t9je.js → chunk-tndhag9g.js} +8 -8
- package/dist/chunk-tr9zera9.js +55 -0
- package/dist/{chunk-5sd5fz78.js → chunk-tz3td6hy.js} +78 -78
- package/dist/{chunk-6vp8zen2.js → chunk-v17y7qay.js} +79 -79
- package/dist/{chunk-zx9r7a23.js → chunk-v1kzp02e.js} +1 -1
- package/dist/{chunk-15f7ee0j.js → chunk-v4t6dyyh.js} +158 -245
- package/dist/{chunk-93kvs6fh.js → chunk-v5brqghz.js} +6 -6
- package/dist/{chunk-he9zw1gh.js → chunk-v78fj8by.js} +2 -2
- package/dist/{chunk-pt1jzmkv.js → chunk-v8kjswxt.js} +2 -2
- package/dist/{chunk-n9ne98cj.js → chunk-v9smspw2.js} +4 -5
- package/dist/{chunk-2bh7f2wa.js → chunk-vbmdqx87.js} +13 -13
- package/dist/{chunk-4yq5zz3m.js → chunk-vcwzs8xk.js} +9 -9
- package/dist/{chunk-wt799fvk.js → chunk-vf612n57.js} +34 -34
- package/dist/chunk-vf9320w1.js +105 -0
- package/dist/{chunk-myac8yfs.js → chunk-vkhrrvfq.js} +5 -5
- package/dist/{chunk-hbz8xggv.js → chunk-vneepj82.js} +11 -11
- package/dist/{chunk-ytt8da3v.js → chunk-vr96pznr.js} +81 -81
- package/dist/chunk-vszex7fm.js +90 -0
- package/dist/{chunk-jw9zwgea.js → chunk-vv7kzavx.js} +4 -4
- package/dist/chunk-vwxpwg2r.js +121 -0
- package/dist/{chunk-bktmgb4n.js → chunk-vyjeh50y.js} +39 -68
- package/dist/{chunk-9rhy5vt7.js → chunk-vzzsjg7m.js} +9 -9
- package/dist/{chunk-yvm9t98e.js → chunk-w0dz2sa5.js} +18 -7
- package/dist/{chunk-xggbj4j9.js → chunk-w1fb9aqj.js} +3 -3
- package/dist/{chunk-hgb8024k.js → chunk-w43b6749.js} +10 -10
- package/dist/{chunk-3hxr3x9d.js → chunk-w6m6trzq.js} +2 -2
- package/dist/chunk-w9a226y4.js +105 -0
- package/dist/{chunk-kcp41jcn.js → chunk-wa8yn2p0.js} +2 -2
- package/dist/{chunk-4fwzreqj.js → chunk-wf16jx1f.js} +6 -6
- package/dist/{chunk-7tdk9ypw.js → chunk-wgk9sxk7.js} +10 -10
- package/dist/{chunk-2bk4jvse.js → chunk-wkny3k77.js} +7 -7
- package/dist/chunk-wsfq03qa.js +101 -0
- package/dist/{chunk-e01rphq3.js → chunk-x12h3n65.js} +727 -128
- package/dist/{chunk-26kp0k1t.js → chunk-x1dw8vry.js} +80 -80
- package/dist/{chunk-jsvsnqkn.js → chunk-x47h283a.js} +2 -2
- package/dist/{chunk-ccdh8eh2.js → chunk-x5wgbcme.js} +38 -38
- package/dist/{chunk-rpta0rqz.js → chunk-x6r4v44b.js} +1 -1
- package/dist/{chunk-tyc5c0q4.js → chunk-x70f036b.js} +8 -8
- package/dist/{chunk-k6wmp81y.js → chunk-x7fdwq3d.js} +1 -1
- package/dist/{chunk-13pmg16e.js → chunk-x8d2ehd7.js} +1 -1
- package/dist/{chunk-dg2k597k.js → chunk-xca0q5ap.js} +9 -9
- package/dist/{chunk-pnrdvxhy.js → chunk-xeb6075z.js} +2 -2
- package/dist/{chunk-n9xhrzxs.js → chunk-xg08qv1e.js} +78 -78
- package/dist/{chunk-7gte8zc4.js → chunk-xhfmdq1y.js} +1 -1
- package/dist/{chunk-gxsrvxjn.js → chunk-xv3era3s.js} +1 -1
- package/dist/chunk-xv78ch6z.js +92 -0
- package/dist/chunk-xy94q6qg.js +114 -0
- package/dist/{chunk-92wwx9vf.js → chunk-y1784krc.js} +2 -2
- package/dist/{chunk-ggk84sc5.js → chunk-y4ca9kqz.js} +4 -4
- package/dist/{chunk-h1tv19q0.js → chunk-y4d1sgf4.js} +80 -80
- package/dist/{chunk-m8qvkabg.js → chunk-y9bhjjdz.js} +4 -4
- package/dist/{chunk-vwkb146r.js → chunk-y9ffgh1g.js} +90 -90
- package/dist/chunk-ycs5r2ef.js +60 -0
- package/dist/{chunk-c2k1n6yb.js → chunk-yde1e32y.js} +16 -16
- package/dist/chunk-yfztvfhh.js +94 -0
- package/dist/{chunk-hhvf84fa.js → chunk-yjk0f08a.js} +188 -186
- package/dist/{chunk-bta8w8ge.js → chunk-yyex5gsf.js} +10 -10
- package/dist/chunk-zcq3r82m.js +93 -0
- package/dist/{chunk-3jbxhytz.js → chunk-zecx4x3b.js} +8 -8
- package/dist/{chunk-7ba45tqg.js → chunk-zpdzhck8.js} +5 -5
- package/dist/{chunk-j0bfbce5.js → chunk-zpw4ny96.js} +36 -36
- package/dist/{chunk-tdf3ha9b.js → chunk-zv1frw5e.js} +79 -79
- package/dist/{chunk-61x3akfa.js → chunk-zxh62ved.js} +2 -2
- package/dist/{chunk-8r1napm7.js → chunk-zzm33q8x.js} +1 -1
- package/dist/cli.js +12 -12
- package/dist/gateway/worker.js +170082 -171912
- package/dist/sdk/query.cjs +18 -8
- package/dist/sdk/query.js +1 -1
- package/package.json +128 -128
- package/dist/chunk-09nzqj0f.js +0 -9605
- package/dist/chunk-0fw1mz8s.js +0 -27
- package/dist/chunk-0pqv68xt.js +0 -133
- package/dist/chunk-0pv13fxq.js +0 -1684
- package/dist/chunk-0tgn1431.js +0 -38
- package/dist/chunk-0yshjsxt.js +0 -122
- package/dist/chunk-0z9s957c.js +0 -94
- package/dist/chunk-1gt45dyg.js +0 -101
- package/dist/chunk-3kx7brrn.js +0 -55
- package/dist/chunk-4kfs8ymb.js +0 -92
- package/dist/chunk-5rhmrt2j.js +0 -121
- package/dist/chunk-626watky.js +0 -50
- package/dist/chunk-6aqa0ec5.js +0 -145
- package/dist/chunk-6zfb4n08.js +0 -91
- package/dist/chunk-73bgy356.js +0 -90
- package/dist/chunk-7nphjzve.js +0 -105
- package/dist/chunk-7sp9dk6d.js +0 -20
- package/dist/chunk-8jmkpx1h.js +0 -123
- package/dist/chunk-9xq7ef8y.js +0 -100
- package/dist/chunk-9ydxqdhe.js +0 -121
- package/dist/chunk-ab6apbd2.js +0 -140
- package/dist/chunk-bdrsheny.js +0 -35
- package/dist/chunk-bvfqg3cg.js +0 -131
- package/dist/chunk-cj0j4n23.js +0 -71
- package/dist/chunk-cynnhyy3.js +0 -103
- package/dist/chunk-d0zx5hba.js +0 -85
- package/dist/chunk-e6s584g7.js +0 -77
- package/dist/chunk-e90dyenj.js +0 -127
- package/dist/chunk-em5s71j6.js +0 -89
- package/dist/chunk-eqcgr89w.js +0 -646
- package/dist/chunk-f9zvs66e.js +0 -105
- package/dist/chunk-gaf31961.js +0 -81
- package/dist/chunk-gkz2djp0.js +0 -121
- package/dist/chunk-gwktnbeg.js +0 -90
- package/dist/chunk-h0bgwz9v.js +0 -55
- package/dist/chunk-h3v46eky.js +0 -105
- package/dist/chunk-hycm92ss.js +0 -52
- package/dist/chunk-j3c5r08n.js +0 -87
- package/dist/chunk-j3q2sbhc.js +0 -107
- package/dist/chunk-k9h7kjf6.js +0 -8
- package/dist/chunk-karea2z2.js +0 -89
- package/dist/chunk-kra9y8qb.js +0 -97
- package/dist/chunk-mwzwm2z2.js +0 -60
- package/dist/chunk-n535j168.js +0 -131
- package/dist/chunk-p9nkqgej.js +0 -19
- package/dist/chunk-pgptefy1.js +0 -114
- package/dist/chunk-pjn0s3j1.js +0 -111
- package/dist/chunk-pkwv0q5q.js +0 -91
- package/dist/chunk-q6m9qgaa.js +0 -88
- package/dist/chunk-r82c7gfc.js +0 -58
- package/dist/chunk-rgshryeb.js +0 -93
- package/dist/chunk-rk2kb2ec.js +0 -101
- package/dist/chunk-s0p653k2.js +0 -93
- package/dist/chunk-skypjdyc.js +0 -147
- package/dist/chunk-tgayhxvz.js +0 -41
- package/dist/chunk-vr5vyt2h.js +0 -107
- package/dist/chunk-vvjhax8n.js +0 -114
- package/dist/chunk-vvsts2t9.js +0 -30
- package/dist/chunk-w287mz4p.js +0 -146
- package/dist/chunk-wa852b5b.js +0 -113
- package/dist/chunk-xbpt4dv8.js +0 -155
- package/dist/chunk-xj72jfpd.js +0 -33
- package/dist/chunk-xwbh3j1x.js +0 -107
- package/dist/chunk-xwrar1c5.js +0 -97
- package/dist/chunk-yt9mady7.js +0 -36
- package/dist/chunk-zfxp82tk.js +0 -24
- package/dist/chunk-zgkngrp4.js +0 -54
|
@@ -13,19 +13,19 @@ import {
|
|
|
13
13
|
permissionPromptToolResultToPermissionDecision,
|
|
14
14
|
processUserInput,
|
|
15
15
|
reconcileMarketplaces
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-jjnmcaeb.js";
|
|
17
17
|
import {
|
|
18
18
|
detectAndUninstallDelistedPlugins
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-14qkwgmf.js";
|
|
20
20
|
import {
|
|
21
21
|
restoreAgentFromSession,
|
|
22
22
|
restoreSessionStateFromLog,
|
|
23
23
|
skillChangeDetector
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import"./chunk-
|
|
24
|
+
} from "./chunk-9znd08ha.js";
|
|
25
|
+
import"./chunk-21jaw3mt.js";
|
|
26
26
|
import {
|
|
27
27
|
externalMetadataToAppState
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-acj1j3dw.js";
|
|
29
29
|
import {
|
|
30
30
|
getSessionState,
|
|
31
31
|
notifySessionMetadataChanged,
|
|
@@ -33,57 +33,60 @@ import {
|
|
|
33
33
|
setPermissionModeChangedListener,
|
|
34
34
|
setSessionMetadataChangedListener,
|
|
35
35
|
setSessionStateChangedListener
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-n22k5xdw.js";
|
|
37
37
|
import {
|
|
38
38
|
init_toolPool,
|
|
39
39
|
mergeAndFilterTools
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-k6tvcn37.js";
|
|
41
|
+
import"./chunk-pe824pp5.js";
|
|
41
42
|
import {
|
|
42
43
|
init_settingsSync
|
|
43
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-vbmdqx87.js";
|
|
44
45
|
import {
|
|
45
46
|
init_refresh,
|
|
46
47
|
refreshActivePlugins
|
|
47
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-fj3a38w3.js";
|
|
48
49
|
import {
|
|
49
50
|
generateSessionTitle,
|
|
50
51
|
init_sessionTitle
|
|
51
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-ssec5007.js";
|
|
52
53
|
import {
|
|
53
54
|
init_systemTheme,
|
|
54
55
|
resolveThemeSetting
|
|
55
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-cnsj3vq2.js";
|
|
56
57
|
import {
|
|
57
58
|
init_mappers,
|
|
58
59
|
localCommandOutputToSDKAssistantMessage,
|
|
59
60
|
toInternalMessages,
|
|
60
61
|
toSDKCompactMetadata,
|
|
61
62
|
toSDKRateLimitInfo
|
|
62
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-hszppxh0.js";
|
|
63
64
|
import {
|
|
64
65
|
checkGroveForNonInteractive,
|
|
65
66
|
init_grove,
|
|
66
67
|
isQualifiedForGrove
|
|
67
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-akd5hjav.js";
|
|
68
69
|
import {
|
|
69
70
|
ChannelMessageNotificationSchema,
|
|
70
71
|
findChannelEntry,
|
|
71
72
|
gateChannelServer,
|
|
72
73
|
init_channelAllowlist,
|
|
73
74
|
init_channelNotification,
|
|
75
|
+
init_omit,
|
|
76
|
+
omit_default,
|
|
74
77
|
wrapChannelMessage
|
|
75
|
-
} from "./chunk-
|
|
76
|
-
import"./chunk-
|
|
77
|
-
import"./chunk-
|
|
78
|
+
} from "./chunk-mra3tr23.js";
|
|
79
|
+
import"./chunk-hwyp85fa.js";
|
|
80
|
+
import"./chunk-t32ddjb3.js";
|
|
78
81
|
import {
|
|
79
82
|
collectContextData,
|
|
80
83
|
init_context_noninteractive
|
|
81
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-m1ergjg5.js";
|
|
82
85
|
import {
|
|
83
86
|
init_sideQuestion,
|
|
84
87
|
runSideQuestion
|
|
85
|
-
} from "./chunk-
|
|
86
|
-
import"./chunk-
|
|
88
|
+
} from "./chunk-530bp1wc.js";
|
|
89
|
+
import"./chunk-rn0v1hk8.js";
|
|
87
90
|
import {
|
|
88
91
|
CircularBuffer,
|
|
89
92
|
DEFAULT_OUTPUT_STYLE_NAME,
|
|
@@ -204,6 +207,7 @@ import {
|
|
|
204
207
|
init_hookHelpers,
|
|
205
208
|
init_hooks1 as init_hooks,
|
|
206
209
|
init_ids,
|
|
210
|
+
init_last,
|
|
207
211
|
init_loadAgentsDir,
|
|
208
212
|
init_logging,
|
|
209
213
|
init_marketplaceManager,
|
|
@@ -231,6 +235,7 @@ import {
|
|
|
231
235
|
init_query,
|
|
232
236
|
init_queryHelpers,
|
|
233
237
|
init_queryProfiler,
|
|
238
|
+
init_reject,
|
|
234
239
|
init_sandbox_adapter,
|
|
235
240
|
init_sdkEventQueue,
|
|
236
241
|
init_sessionActivity,
|
|
@@ -238,12 +243,14 @@ import {
|
|
|
238
243
|
init_sessionStart,
|
|
239
244
|
init_sessionStorage,
|
|
240
245
|
init_shellToolUtils,
|
|
246
|
+
init_sideQuery,
|
|
241
247
|
init_stopTask,
|
|
242
248
|
init_systemPromptType,
|
|
243
249
|
init_teammateMailbox,
|
|
244
250
|
init_thinking,
|
|
245
251
|
init_tools1 as init_tools,
|
|
246
252
|
init_types1 as init_types2,
|
|
253
|
+
init_uniqBy,
|
|
247
254
|
init_utils,
|
|
248
255
|
init_uuid,
|
|
249
256
|
init_vscodeSdkMcp,
|
|
@@ -259,6 +266,7 @@ import {
|
|
|
259
266
|
isScratchpadEnabled,
|
|
260
267
|
isShutdownApproved,
|
|
261
268
|
isShuttingDown,
|
|
269
|
+
last_default,
|
|
262
270
|
loadAllPluginsCacheOnly,
|
|
263
271
|
loadConversationForResume,
|
|
264
272
|
loadKnownMarketplacesConfigSafe,
|
|
@@ -287,6 +295,7 @@ import {
|
|
|
287
295
|
registerSeedMarketplaces,
|
|
288
296
|
registerSessionActivityCallback,
|
|
289
297
|
registerStructuredOutputEnforcement,
|
|
298
|
+
reject_default,
|
|
290
299
|
resetSessionFilePointer,
|
|
291
300
|
resolveAppliedEffort,
|
|
292
301
|
restoreSessionMetadata,
|
|
@@ -304,6 +313,7 @@ import {
|
|
|
304
313
|
setupSdkMcpClients,
|
|
305
314
|
setupVscodeSdkMcp,
|
|
306
315
|
shouldEnableThinkingByDefault,
|
|
316
|
+
sideQuery,
|
|
307
317
|
startQueryProfile,
|
|
308
318
|
statusListeners,
|
|
309
319
|
stopTask,
|
|
@@ -312,21 +322,22 @@ import {
|
|
|
312
322
|
toolMatchesName,
|
|
313
323
|
transitionPermissionMode,
|
|
314
324
|
tryGenerateSuggestion,
|
|
325
|
+
uniqBy_default,
|
|
315
326
|
unregisterSessionActivityCallback,
|
|
316
327
|
updateUsage,
|
|
317
328
|
validateUuid
|
|
318
|
-
} from "./chunk-
|
|
319
|
-
import"./chunk-
|
|
320
|
-
import"./chunk-
|
|
321
|
-
import"./chunk-
|
|
322
|
-
import"./chunk-
|
|
323
|
-
import"./chunk-
|
|
324
|
-
import"./chunk-
|
|
325
|
-
import"./chunk-
|
|
329
|
+
} from "./chunk-4sk0ekmh.js";
|
|
330
|
+
import"./chunk-mcws22k3.js";
|
|
331
|
+
import"./chunk-jzthz1bx.js";
|
|
332
|
+
import"./chunk-24q2kxjm.js";
|
|
333
|
+
import"./chunk-hwfknpxv.js";
|
|
334
|
+
import"./chunk-1gx78081.js";
|
|
335
|
+
import"./chunk-ehtwnxpg.js";
|
|
336
|
+
import"./chunk-3mqgy4d8.js";
|
|
326
337
|
import {
|
|
327
338
|
init_commitAttribution
|
|
328
|
-
} from "./chunk-
|
|
329
|
-
import"./chunk-
|
|
339
|
+
} from "./chunk-khnqc2x8.js";
|
|
340
|
+
import"./chunk-x47h283a.js";
|
|
330
341
|
import {
|
|
331
342
|
hasActiveInProcessTeammates,
|
|
332
343
|
hasWorkingInProcessTeammates,
|
|
@@ -337,27 +348,29 @@ import {
|
|
|
337
348
|
removeTeammateFromTeamFile,
|
|
338
349
|
unassignTeammateTasks,
|
|
339
350
|
waitForTeammatesToBecomeIdle
|
|
340
|
-
} from "./chunk-
|
|
341
|
-
import"./chunk-
|
|
342
|
-
import"./chunk-
|
|
343
|
-
import"./chunk-
|
|
344
|
-
import"./chunk-
|
|
351
|
+
} from "./chunk-hf96emr1.js";
|
|
352
|
+
import"./chunk-2gzv8nrw.js";
|
|
353
|
+
import"./chunk-e0abab5b.js";
|
|
354
|
+
import"./chunk-cgfdkzhb.js";
|
|
355
|
+
import"./chunk-4k9d7gxv.js";
|
|
345
356
|
import {
|
|
346
357
|
READ_FILE_STATE_CACHE_SIZE,
|
|
347
358
|
cloneFileStateCache,
|
|
348
359
|
createFileStateCacheWithSizeLimit,
|
|
349
360
|
init_fileStateCache,
|
|
350
361
|
mergeFileStateCaches
|
|
351
|
-
} from "./chunk-
|
|
352
|
-
import"./chunk-
|
|
353
|
-
import"./chunk-
|
|
354
|
-
import"./chunk-
|
|
362
|
+
} from "./chunk-j5bth84e.js";
|
|
363
|
+
import"./chunk-xca0q5ap.js";
|
|
364
|
+
import"./chunk-68ffk5qa.js";
|
|
365
|
+
import"./chunk-ps49ymvj.js";
|
|
355
366
|
import {
|
|
356
367
|
init_betas,
|
|
357
368
|
init_cost_tracker,
|
|
358
369
|
modelSupportsAutoMode
|
|
359
|
-
} from "./chunk-
|
|
370
|
+
} from "./chunk-26sypsqa.js";
|
|
360
371
|
import {
|
|
372
|
+
calculateCostFromTokens,
|
|
373
|
+
calculateUSDCost,
|
|
361
374
|
ensureModelStringsInitialized,
|
|
362
375
|
getAPIProvider,
|
|
363
376
|
getDefaultMainLoopModel,
|
|
@@ -365,6 +378,7 @@ import {
|
|
|
365
378
|
getMainLoopModel,
|
|
366
379
|
init_fastMode,
|
|
367
380
|
init_model,
|
|
381
|
+
init_modelCost,
|
|
368
382
|
init_modelStrings,
|
|
369
383
|
init_providers,
|
|
370
384
|
isFastModeAvailable,
|
|
@@ -372,7 +386,7 @@ import {
|
|
|
372
386
|
isFastModeSupportedByModel,
|
|
373
387
|
modelDisplayString,
|
|
374
388
|
parseUserSpecifiedModel
|
|
375
|
-
} from "./chunk-
|
|
389
|
+
} from "./chunk-fc8mescd.js";
|
|
376
390
|
import {
|
|
377
391
|
createAxiosInstance,
|
|
378
392
|
getWebSocketProxyAgent,
|
|
@@ -380,22 +394,22 @@ import {
|
|
|
380
394
|
getWebSocketTLSOptions,
|
|
381
395
|
init_mtls,
|
|
382
396
|
init_proxy
|
|
383
|
-
} from "./chunk-
|
|
384
|
-
import"./chunk-
|
|
385
|
-
import"./chunk-
|
|
386
|
-
import"./chunk-
|
|
387
|
-
import"./chunk-
|
|
388
|
-
import"./chunk-
|
|
389
|
-
import"./chunk-
|
|
390
|
-
import"./chunk-
|
|
391
|
-
import"./chunk-
|
|
397
|
+
} from "./chunk-pgtnj1mt.js";
|
|
398
|
+
import"./chunk-68ypktng.js";
|
|
399
|
+
import"./chunk-p7vkh4wx.js";
|
|
400
|
+
import"./chunk-y9bhjjdz.js";
|
|
401
|
+
import"./chunk-7pz9rdg8.js";
|
|
402
|
+
import"./chunk-7gy9xrjc.js";
|
|
403
|
+
import"./chunk-dfzkwynj.js";
|
|
404
|
+
import"./chunk-xeb6075z.js";
|
|
405
|
+
import"./chunk-fcynwjpm.js";
|
|
392
406
|
import {
|
|
393
407
|
ElicitRequestSchema,
|
|
394
408
|
ElicitationCompleteNotificationSchema,
|
|
395
409
|
init_types
|
|
396
|
-
} from "./chunk-
|
|
397
|
-
import"./chunk-
|
|
398
|
-
import"./chunk-
|
|
410
|
+
} from "./chunk-v4t6dyyh.js";
|
|
411
|
+
import"./chunk-phr23vzw.js";
|
|
412
|
+
import"./chunk-v8kjswxt.js";
|
|
399
413
|
import {
|
|
400
414
|
AGENT_TOOL_NAME,
|
|
401
415
|
KnownMarketplacesFileSchema,
|
|
@@ -415,81 +429,73 @@ import {
|
|
|
415
429
|
init_config,
|
|
416
430
|
init_constants1 as init_constants,
|
|
417
431
|
init_growthbook,
|
|
418
|
-
init_last,
|
|
419
432
|
init_mcpStringUtils,
|
|
420
|
-
init_omit,
|
|
421
433
|
init_paths,
|
|
422
434
|
init_prompt,
|
|
423
|
-
init_reject,
|
|
424
435
|
init_schemas,
|
|
425
436
|
init_settings1 as init_settings,
|
|
426
437
|
init_stringUtils,
|
|
427
|
-
init_uniqBy,
|
|
428
438
|
init_userAgent,
|
|
429
439
|
init_workloadContext,
|
|
430
440
|
initializeGrowthBook,
|
|
431
441
|
isExtractModeActive,
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
reject_default,
|
|
435
|
-
runWithWorkload,
|
|
436
|
-
uniqBy_default
|
|
437
|
-
} from "./chunk-v8k67zfz.js";
|
|
442
|
+
runWithWorkload
|
|
443
|
+
} from "./chunk-q4wj3v8n.js";
|
|
438
444
|
import {
|
|
439
445
|
init_json,
|
|
440
446
|
safeParseJSON
|
|
441
|
-
} from "./chunk-
|
|
447
|
+
} from "./chunk-rnxctq9p.js";
|
|
442
448
|
import {
|
|
443
449
|
expandPath,
|
|
444
450
|
init_path
|
|
445
|
-
} from "./chunk-
|
|
451
|
+
} from "./chunk-f98yad99.js";
|
|
446
452
|
import {
|
|
447
453
|
init_array,
|
|
448
454
|
uniq
|
|
449
|
-
} from "./chunk-
|
|
450
|
-
import"./chunk-
|
|
455
|
+
} from "./chunk-6nsd9606.js";
|
|
456
|
+
import"./chunk-64c1avct.js";
|
|
451
457
|
import {
|
|
452
458
|
init_sleep,
|
|
453
459
|
sleep
|
|
454
|
-
} from "./chunk-
|
|
455
|
-
import"./chunk-
|
|
456
|
-
import"./chunk-
|
|
457
|
-
import"./chunk-
|
|
458
|
-
import"./chunk-
|
|
459
|
-
import"./chunk-
|
|
460
|
-
import"./chunk-
|
|
461
|
-
import"./chunk-
|
|
462
|
-
import"./chunk-
|
|
463
|
-
import"./chunk-
|
|
464
|
-
import"./chunk-
|
|
460
|
+
} from "./chunk-8g5pe1gr.js";
|
|
461
|
+
import"./chunk-4pbx3g7s.js";
|
|
462
|
+
import"./chunk-26wtxbdc.js";
|
|
463
|
+
import"./chunk-6dngjwkh.js";
|
|
464
|
+
import"./chunk-4jm600zv.js";
|
|
465
|
+
import"./chunk-s8gy4ky9.js";
|
|
466
|
+
import"./chunk-cxrktb5g.js";
|
|
467
|
+
import"./chunk-3c25bcsw.js";
|
|
468
|
+
import"./chunk-5ekyhb1w.js";
|
|
469
|
+
import"./chunk-fqak69ft.js";
|
|
470
|
+
import"./chunk-cdz5yb0r.js";
|
|
465
471
|
import {
|
|
466
472
|
init_strip_ansi,
|
|
467
473
|
stripAnsi
|
|
468
|
-
} from "./chunk-
|
|
469
|
-
import"./chunk-
|
|
470
|
-
import"./chunk-
|
|
471
|
-
import"./chunk-
|
|
474
|
+
} from "./chunk-c7jwbe76.js";
|
|
475
|
+
import"./chunk-0vkfrmqm.js";
|
|
476
|
+
import"./chunk-7sgtxrsc.js";
|
|
477
|
+
import"./chunk-0xjaqda8.js";
|
|
472
478
|
import {
|
|
473
479
|
init_analytics,
|
|
474
480
|
logEvent
|
|
475
|
-
} from "./chunk-
|
|
476
|
-
import"./chunk-
|
|
481
|
+
} from "./chunk-x8d2ehd7.js";
|
|
482
|
+
import"./chunk-byfawrfx.js";
|
|
477
483
|
import {
|
|
478
484
|
init_diagLogs,
|
|
479
485
|
logForDiagnosticsNoPII,
|
|
480
486
|
withDiagnosticsTiming
|
|
481
|
-
} from "./chunk-
|
|
482
|
-
import"./chunk-
|
|
483
|
-
import"./chunk-
|
|
484
|
-
import"./chunk-
|
|
487
|
+
} from "./chunk-3vy1jt9p.js";
|
|
488
|
+
import"./chunk-vkhrrvfq.js";
|
|
489
|
+
import"./chunk-qnfx3qtx.js";
|
|
490
|
+
import"./chunk-64r16v22.js";
|
|
485
491
|
import {
|
|
486
492
|
getCwd,
|
|
487
493
|
init_cwd
|
|
488
|
-
} from "./chunk-
|
|
489
|
-
import"./chunk-
|
|
490
|
-
import"./chunk-
|
|
491
|
-
import"./chunk-
|
|
492
|
-
import"./chunk-
|
|
494
|
+
} from "./chunk-s8kj6ajy.js";
|
|
495
|
+
import"./chunk-8yhf030a.js";
|
|
496
|
+
import"./chunk-zxh62ved.js";
|
|
497
|
+
import"./chunk-5z28bqne.js";
|
|
498
|
+
import"./chunk-qajrkk97.js";
|
|
493
499
|
import {
|
|
494
500
|
LOCAL_COMMAND_STDERR_TAG,
|
|
495
501
|
LOCAL_COMMAND_STDOUT_TAG,
|
|
@@ -513,18 +519,18 @@ import {
|
|
|
513
519
|
logMCPDebug,
|
|
514
520
|
registerCleanup,
|
|
515
521
|
toError
|
|
516
|
-
} from "./chunk-
|
|
522
|
+
} from "./chunk-gg55fns0.js";
|
|
517
523
|
import {
|
|
518
524
|
init_envUtils,
|
|
519
525
|
isBareMode,
|
|
520
526
|
isEnvDefinedFalsy,
|
|
521
527
|
isEnvTruthy
|
|
522
|
-
} from "./chunk-
|
|
528
|
+
} from "./chunk-5n1jc02d.js";
|
|
523
529
|
import {
|
|
524
530
|
init_process,
|
|
525
531
|
registerProcessOutputErrorHandlers,
|
|
526
532
|
writeToStdout
|
|
527
|
-
} from "./chunk-
|
|
533
|
+
} from "./chunk-fbv4apne.js";
|
|
528
534
|
import {
|
|
529
535
|
getAllowedChannels,
|
|
530
536
|
getFlagSettingsInline,
|
|
@@ -545,23 +551,23 @@ import {
|
|
|
545
551
|
setMainThreadAgentType,
|
|
546
552
|
setSdkAgentProgressSummariesEnabled,
|
|
547
553
|
switchSession
|
|
548
|
-
} from "./chunk-
|
|
549
|
-
import"./chunk-
|
|
550
|
-
import"./chunk-
|
|
551
|
-
import"./chunk-
|
|
554
|
+
} from "./chunk-k8vp0atq.js";
|
|
555
|
+
import"./chunk-vf612n57.js";
|
|
556
|
+
import"./chunk-07069jq1.js";
|
|
557
|
+
import"./chunk-d4mdda98.js";
|
|
552
558
|
import {
|
|
553
559
|
axios_default,
|
|
554
560
|
init_axios
|
|
555
|
-
} from "./chunk-
|
|
556
|
-
import"./chunk-
|
|
557
|
-
import"./chunk-
|
|
558
|
-
import"./chunk-
|
|
559
|
-
import"./chunk-
|
|
560
|
-
import"./chunk-
|
|
561
|
+
} from "./chunk-55raexh7.js";
|
|
562
|
+
import"./chunk-v9smspw2.js";
|
|
563
|
+
import"./chunk-v1kzp02e.js";
|
|
564
|
+
import"./chunk-7wm5s02e.js";
|
|
565
|
+
import"./chunk-b0kf00ff.js";
|
|
566
|
+
import"./chunk-netzwgv1.js";
|
|
561
567
|
import {
|
|
562
568
|
__require,
|
|
563
569
|
__toCommonJS
|
|
564
|
-
} from "./chunk-
|
|
570
|
+
} from "./chunk-qp2qdcda.js";
|
|
565
571
|
|
|
566
572
|
// src/cli/print.ts
|
|
567
573
|
init_settingsSync();
|
|
@@ -2664,6 +2670,516 @@ init_cost_tracker();
|
|
|
2664
2670
|
init_memdir();
|
|
2665
2671
|
init_paths();
|
|
2666
2672
|
init_query();
|
|
2673
|
+
import { randomUUID as randomUUID3 } from "crypto";
|
|
2674
|
+
|
|
2675
|
+
// src/utils/autoMode/runtime.ts
|
|
2676
|
+
init_modelCost();
|
|
2677
|
+
|
|
2678
|
+
// src/utils/taskCompletion/controlMessage.ts
|
|
2679
|
+
function createCompletionControlMessage(content, origin) {
|
|
2680
|
+
return {
|
|
2681
|
+
type: "user",
|
|
2682
|
+
message: { role: "user", content },
|
|
2683
|
+
isMeta: true,
|
|
2684
|
+
origin,
|
|
2685
|
+
uuid: crypto.randomUUID(),
|
|
2686
|
+
timestamp: new Date().toISOString()
|
|
2687
|
+
};
|
|
2688
|
+
}
|
|
2689
|
+
|
|
2690
|
+
// src/utils/autoMode/controlMessage.ts
|
|
2691
|
+
function createAutoModeControlMessage(content) {
|
|
2692
|
+
return createCompletionControlMessage(content, "auto_mode_control");
|
|
2693
|
+
}
|
|
2694
|
+
|
|
2695
|
+
// src/utils/taskCompletion/judge.ts
|
|
2696
|
+
init_modelCost();
|
|
2697
|
+
init_sideQuery();
|
|
2698
|
+
var VERDICT_TOOL_NAME = "auto_mode_verdict";
|
|
2699
|
+
var MAX_EVIDENCE_CHARS = 1e5;
|
|
2700
|
+
var MAX_BLOCK_CHARS = 8000;
|
|
2701
|
+
var VERDICT_TOOL = {
|
|
2702
|
+
name: VERDICT_TOOL_NAME,
|
|
2703
|
+
description: "Report whether the original task is complete or impossible based only on transcript evidence.",
|
|
2704
|
+
input_schema: {
|
|
2705
|
+
type: "object",
|
|
2706
|
+
properties: {
|
|
2707
|
+
done: { type: "boolean" },
|
|
2708
|
+
impossible: { type: "boolean" },
|
|
2709
|
+
reason: { type: "string" },
|
|
2710
|
+
nextStep: { type: "string" }
|
|
2711
|
+
},
|
|
2712
|
+
required: ["done", "impossible", "reason", "nextStep"],
|
|
2713
|
+
additionalProperties: false
|
|
2714
|
+
}
|
|
2715
|
+
};
|
|
2716
|
+
var JUDGE_SYSTEM_PROMPT = `You are an independent completion judge for an automated coding task.
|
|
2717
|
+
Use only concrete transcript evidence. The assistant's claim that work is complete is not evidence.
|
|
2718
|
+
Set done=true only when the original request is fully satisfied and verification evidence is present when appropriate.
|
|
2719
|
+
Set impossible=true only when the transcript proves that continued autonomous work cannot make progress.
|
|
2720
|
+
Otherwise set both flags false and provide one concise next step. Always call the provided verdict tool.`;
|
|
2721
|
+
function logJudgeVerdict(label, detail) {
|
|
2722
|
+
console.warn(`[${label}] ${detail}`);
|
|
2723
|
+
}
|
|
2724
|
+
function truncate(value) {
|
|
2725
|
+
return value.length <= MAX_BLOCK_CHARS ? value : `${value.slice(0, MAX_BLOCK_CHARS)}...[truncated]`;
|
|
2726
|
+
}
|
|
2727
|
+
function serializeContent(content) {
|
|
2728
|
+
if (typeof content === "string")
|
|
2729
|
+
return truncate(content);
|
|
2730
|
+
if (!Array.isArray(content))
|
|
2731
|
+
return content;
|
|
2732
|
+
return content.map((block) => {
|
|
2733
|
+
if (!block || typeof block !== "object")
|
|
2734
|
+
return block;
|
|
2735
|
+
if ("type" in block && block.type === "image")
|
|
2736
|
+
return { type: "image", omitted: true };
|
|
2737
|
+
if ("content" in block && typeof block.content === "string") {
|
|
2738
|
+
return { ...block, content: truncate(block.content) };
|
|
2739
|
+
}
|
|
2740
|
+
if ("text" in block && typeof block.text === "string") {
|
|
2741
|
+
return { ...block, text: truncate(block.text) };
|
|
2742
|
+
}
|
|
2743
|
+
return block;
|
|
2744
|
+
});
|
|
2745
|
+
}
|
|
2746
|
+
function serializeJudgeEvidence(originalRequest, messages) {
|
|
2747
|
+
const entries = [
|
|
2748
|
+
{ type: "original_request", content: serializeContent(originalRequest) }
|
|
2749
|
+
];
|
|
2750
|
+
for (const message of messages) {
|
|
2751
|
+
if (message.type !== "user" && message.type !== "assistant")
|
|
2752
|
+
continue;
|
|
2753
|
+
entries.push({
|
|
2754
|
+
type: message.type === "user" && message.isMeta ? message.origin ?? "completion_control" : message.type,
|
|
2755
|
+
content: serializeContent(message.message?.content)
|
|
2756
|
+
});
|
|
2757
|
+
}
|
|
2758
|
+
const originalEntry = entries[0];
|
|
2759
|
+
const boundedEntries = [originalEntry];
|
|
2760
|
+
let serializedLength = JSON.stringify([originalEntry]).length;
|
|
2761
|
+
const tailEntries = [];
|
|
2762
|
+
let truncated = false;
|
|
2763
|
+
for (let index = entries.length - 1;index >= 1; index--) {
|
|
2764
|
+
const entry = entries[index];
|
|
2765
|
+
const serializedEntry = JSON.stringify(entry);
|
|
2766
|
+
if (serializedLength + serializedEntry.length + 1 > MAX_EVIDENCE_CHARS) {
|
|
2767
|
+
truncated = true;
|
|
2768
|
+
break;
|
|
2769
|
+
}
|
|
2770
|
+
tailEntries.unshift(entry);
|
|
2771
|
+
serializedLength += serializedEntry.length + 1;
|
|
2772
|
+
}
|
|
2773
|
+
if (truncated)
|
|
2774
|
+
boundedEntries.push({ type: "evidence_truncated" });
|
|
2775
|
+
boundedEntries.push(...tailEntries);
|
|
2776
|
+
return JSON.stringify(boundedEntries);
|
|
2777
|
+
}
|
|
2778
|
+
function parseVerdict(message) {
|
|
2779
|
+
const block = message.content.find((candidate) => candidate.type === "tool_use" && candidate.name === VERDICT_TOOL_NAME);
|
|
2780
|
+
if (!block || block.type !== "tool_use" || !block.input || typeof block.input !== "object") {
|
|
2781
|
+
throw new Error("Judge did not return the required verdict tool call");
|
|
2782
|
+
}
|
|
2783
|
+
const input = block.input;
|
|
2784
|
+
if (typeof input.done !== "boolean" || typeof input.impossible !== "boolean" || typeof input.reason !== "string" || typeof input.nextStep !== "string" || input.done && input.impossible) {
|
|
2785
|
+
throw new Error("Judge returned a malformed verdict");
|
|
2786
|
+
}
|
|
2787
|
+
return {
|
|
2788
|
+
done: input.done,
|
|
2789
|
+
impossible: input.impossible,
|
|
2790
|
+
reason: truncate(input.reason),
|
|
2791
|
+
nextStep: truncate(input.nextStep)
|
|
2792
|
+
};
|
|
2793
|
+
}
|
|
2794
|
+
function usageDelta(usage, usd) {
|
|
2795
|
+
return {
|
|
2796
|
+
inputTokens: usage.input_tokens,
|
|
2797
|
+
outputTokens: usage.output_tokens,
|
|
2798
|
+
cacheReadInputTokens: usage.cache_read_input_tokens ?? 0,
|
|
2799
|
+
cacheCreationInputTokens: usage.cache_creation_input_tokens ?? 0,
|
|
2800
|
+
usd
|
|
2801
|
+
};
|
|
2802
|
+
}
|
|
2803
|
+
|
|
2804
|
+
class TaskCompletionJudge {
|
|
2805
|
+
controller;
|
|
2806
|
+
dependencies;
|
|
2807
|
+
runSideQuery;
|
|
2808
|
+
calculateCost;
|
|
2809
|
+
diagnosticLabel;
|
|
2810
|
+
modeLabel;
|
|
2811
|
+
constructor(controller, dependencies) {
|
|
2812
|
+
this.controller = controller;
|
|
2813
|
+
this.dependencies = dependencies;
|
|
2814
|
+
this.runSideQuery = dependencies.sideQuery ?? sideQuery;
|
|
2815
|
+
this.calculateCost = dependencies.calculateCost ?? calculateUSDCost;
|
|
2816
|
+
this.diagnosticLabel = dependencies.diagnosticLabel ?? "task_completion_judge";
|
|
2817
|
+
this.modeLabel = dependencies.modeLabel ?? "Task completion";
|
|
2818
|
+
}
|
|
2819
|
+
async beforeTerminal(messages) {
|
|
2820
|
+
if (this.dependencies.signal?.aborted) {
|
|
2821
|
+
this.controller.cancel(`${this.modeLabel} judge aborted`);
|
|
2822
|
+
return { action: "terminal" };
|
|
2823
|
+
}
|
|
2824
|
+
if (!this.controller.hasBudgetFor()) {
|
|
2825
|
+
this.controller.markBudgetExhausted();
|
|
2826
|
+
return { action: "terminal" };
|
|
2827
|
+
}
|
|
2828
|
+
if (!this.controller.beginJudgeAttempt())
|
|
2829
|
+
return { action: "terminal" };
|
|
2830
|
+
try {
|
|
2831
|
+
const run = this.controller.getRun();
|
|
2832
|
+
if (!run)
|
|
2833
|
+
throw new Error("No completion judge run is active");
|
|
2834
|
+
const response = await this.runSideQuery({
|
|
2835
|
+
querySource: "auto_mode_judge",
|
|
2836
|
+
model: this.dependencies.model,
|
|
2837
|
+
system: JUDGE_SYSTEM_PROMPT,
|
|
2838
|
+
messages: [
|
|
2839
|
+
{
|
|
2840
|
+
role: "user",
|
|
2841
|
+
content: serializeJudgeEvidence(run.originalRequest, messages)
|
|
2842
|
+
}
|
|
2843
|
+
],
|
|
2844
|
+
tools: [VERDICT_TOOL],
|
|
2845
|
+
tool_choice: { type: "tool", name: VERDICT_TOOL_NAME },
|
|
2846
|
+
temperature: 0,
|
|
2847
|
+
thinking: false,
|
|
2848
|
+
max_tokens: 512,
|
|
2849
|
+
signal: this.dependencies.signal,
|
|
2850
|
+
skipSystemPromptPrefix: true
|
|
2851
|
+
});
|
|
2852
|
+
const cost = this.calculateCost(this.dependencies.model, response.usage);
|
|
2853
|
+
this.controller.recordJudgeUsage(usageDelta(response.usage, cost));
|
|
2854
|
+
if (!this.controller.hasBudgetFor()) {
|
|
2855
|
+
this.controller.markBudgetExhausted();
|
|
2856
|
+
return { action: "terminal" };
|
|
2857
|
+
}
|
|
2858
|
+
const verdict = parseVerdict(response);
|
|
2859
|
+
if (verdict.done) {
|
|
2860
|
+
logJudgeVerdict(this.diagnosticLabel, `verdict=done reason=${verdict.reason.slice(0, 200)}`);
|
|
2861
|
+
this.controller.complete(verdict.reason);
|
|
2862
|
+
return { action: "terminal" };
|
|
2863
|
+
}
|
|
2864
|
+
if (verdict.impossible) {
|
|
2865
|
+
logJudgeVerdict(this.diagnosticLabel, `verdict=impossible reason=${verdict.reason.slice(0, 200)}`);
|
|
2866
|
+
this.controller.needsReview(verdict.reason || "Judge determined the task is impossible");
|
|
2867
|
+
return { action: "terminal" };
|
|
2868
|
+
}
|
|
2869
|
+
if (!verdict.nextStep.trim()) {
|
|
2870
|
+
throw new Error("Judge requested continuation without a next step");
|
|
2871
|
+
}
|
|
2872
|
+
logJudgeVerdict(this.diagnosticLabel, `verdict=continue nextStep=${verdict.nextStep.slice(0, 200)}`);
|
|
2873
|
+
return {
|
|
2874
|
+
action: "continue",
|
|
2875
|
+
reason: verdict.reason,
|
|
2876
|
+
nextStep: verdict.nextStep
|
|
2877
|
+
};
|
|
2878
|
+
} catch (error) {
|
|
2879
|
+
const detail = error instanceof Error ? error.message : String(error);
|
|
2880
|
+
if (this.dependencies.signal?.aborted) {
|
|
2881
|
+
logJudgeVerdict(this.diagnosticLabel, `aborted: ${detail.slice(0, 200)}`);
|
|
2882
|
+
this.controller.cancel(`${this.modeLabel} judge aborted`);
|
|
2883
|
+
} else {
|
|
2884
|
+
logJudgeVerdict(this.diagnosticLabel, `failed: ${detail.slice(0, 200)}`);
|
|
2885
|
+
this.controller.needsReview(`${this.modeLabel} judge failed: ${detail}`);
|
|
2886
|
+
}
|
|
2887
|
+
return { action: "terminal" };
|
|
2888
|
+
}
|
|
2889
|
+
}
|
|
2890
|
+
}
|
|
2891
|
+
|
|
2892
|
+
// src/utils/autoMode/judge.ts
|
|
2893
|
+
class AutoModeJudge {
|
|
2894
|
+
judge;
|
|
2895
|
+
constructor(controller, dependencies) {
|
|
2896
|
+
this.judge = new TaskCompletionJudge(controller, {
|
|
2897
|
+
...dependencies,
|
|
2898
|
+
diagnosticLabel: "auto_mode_judge",
|
|
2899
|
+
modeLabel: "Auto mode"
|
|
2900
|
+
});
|
|
2901
|
+
}
|
|
2902
|
+
async beforeTerminal(messages) {
|
|
2903
|
+
const decision = await this.judge.beforeTerminal(messages);
|
|
2904
|
+
if (decision.action === "terminal")
|
|
2905
|
+
return decision;
|
|
2906
|
+
return {
|
|
2907
|
+
action: "continue",
|
|
2908
|
+
message: createAutoModeControlMessage(`Auto mode review found remaining work. Reason: ${decision.reason}
|
|
2909
|
+
Next step: ${decision.nextStep}`)
|
|
2910
|
+
};
|
|
2911
|
+
}
|
|
2912
|
+
}
|
|
2913
|
+
|
|
2914
|
+
// src/utils/autoMode/loopDetector.ts
|
|
2915
|
+
import { createHash } from "crypto";
|
|
2916
|
+
var REPEAT_THRESHOLD = 3;
|
|
2917
|
+
var TOOL_WINDOW_SIZE = 12;
|
|
2918
|
+
var TEXT_WINDOW_SIZE = 12;
|
|
2919
|
+
var TEXT_NGRAM_SIZE = 5;
|
|
2920
|
+
var MAX_TEXT_WORDS = 200;
|
|
2921
|
+
function canonicalize(value) {
|
|
2922
|
+
if (Array.isArray(value))
|
|
2923
|
+
return value.map(canonicalize);
|
|
2924
|
+
if (value && typeof value === "object") {
|
|
2925
|
+
return Object.fromEntries(Object.entries(value).sort(([left], [right]) => left.localeCompare(right)).map(([key, entry]) => [key, canonicalize(entry)]));
|
|
2926
|
+
}
|
|
2927
|
+
return value;
|
|
2928
|
+
}
|
|
2929
|
+
function stableFingerprint(value) {
|
|
2930
|
+
return createHash("sha256").update(JSON.stringify(canonicalize(value))).digest("hex");
|
|
2931
|
+
}
|
|
2932
|
+
function getContent(message) {
|
|
2933
|
+
const content = message.message?.content;
|
|
2934
|
+
return Array.isArray(content) ? content : [];
|
|
2935
|
+
}
|
|
2936
|
+
function resultCategory(toolUseId, toolResults) {
|
|
2937
|
+
for (const result of toolResults) {
|
|
2938
|
+
for (const block of getContent(result)) {
|
|
2939
|
+
if (block && typeof block === "object" && "type" in block && block.type === "tool_result" && "tool_use_id" in block && block.tool_use_id === toolUseId) {
|
|
2940
|
+
return "is_error" in block && block.is_error ? "error" : "success";
|
|
2941
|
+
}
|
|
2942
|
+
}
|
|
2943
|
+
}
|
|
2944
|
+
return "missing";
|
|
2945
|
+
}
|
|
2946
|
+
function visibleText(messages) {
|
|
2947
|
+
const texts = [];
|
|
2948
|
+
for (const message of messages) {
|
|
2949
|
+
for (const block of getContent(message)) {
|
|
2950
|
+
if (block && typeof block === "object" && "type" in block && block.type === "text" && "text" in block && typeof block.text === "string") {
|
|
2951
|
+
texts.push(block.text);
|
|
2952
|
+
}
|
|
2953
|
+
}
|
|
2954
|
+
}
|
|
2955
|
+
return texts.join(" ");
|
|
2956
|
+
}
|
|
2957
|
+
function textNgrams(text) {
|
|
2958
|
+
const normalized = text.toLowerCase().replace(/[^\p{L}\p{N}_]+/gu, " ").trim();
|
|
2959
|
+
const words = (normalized.match(/\p{Script=Han}|[\p{L}\p{N}_]+/gu) ?? []).slice(0, MAX_TEXT_WORDS);
|
|
2960
|
+
if (words.length < TEXT_NGRAM_SIZE)
|
|
2961
|
+
return [];
|
|
2962
|
+
const hashes = [];
|
|
2963
|
+
for (let index = 0;index <= words.length - TEXT_NGRAM_SIZE; index++) {
|
|
2964
|
+
hashes.push(stableFingerprint(words.slice(index, index + TEXT_NGRAM_SIZE)));
|
|
2965
|
+
}
|
|
2966
|
+
return [...new Set(hashes)];
|
|
2967
|
+
}
|
|
2968
|
+
|
|
2969
|
+
class StepLoopDetector {
|
|
2970
|
+
toolFingerprints = [];
|
|
2971
|
+
textNgramCounts = new Map;
|
|
2972
|
+
textNgramsByStep = [];
|
|
2973
|
+
emptyStepCount = 0;
|
|
2974
|
+
observeStep({
|
|
2975
|
+
assistantMessages,
|
|
2976
|
+
toolResults
|
|
2977
|
+
}) {
|
|
2978
|
+
try {
|
|
2979
|
+
let observedContent = false;
|
|
2980
|
+
for (const message of assistantMessages) {
|
|
2981
|
+
for (const block of getContent(message)) {
|
|
2982
|
+
if (!block || typeof block !== "object" || !("type" in block) || block.type !== "tool_use" || !("name" in block) || typeof block.name !== "string") {
|
|
2983
|
+
continue;
|
|
2984
|
+
}
|
|
2985
|
+
observedContent = true;
|
|
2986
|
+
const toolUseId = "id" in block && typeof block.id === "string" ? block.id : "";
|
|
2987
|
+
const input = "input" in block ? block.input : undefined;
|
|
2988
|
+
const fingerprint = `${block.name}:${stableFingerprint(input)}:${resultCategory(toolUseId, toolResults)}`;
|
|
2989
|
+
this.toolFingerprints.push(fingerprint);
|
|
2990
|
+
if (this.toolFingerprints.length > TOOL_WINDOW_SIZE)
|
|
2991
|
+
this.toolFingerprints.shift();
|
|
2992
|
+
const occurrences = this.toolFingerprints.filter((value) => value === fingerprint).length;
|
|
2993
|
+
if (occurrences >= REPEAT_THRESHOLD) {
|
|
2994
|
+
this.emptyStepCount = 0;
|
|
2995
|
+
return {
|
|
2996
|
+
kind: "tool_repeat",
|
|
2997
|
+
summary: `Repeated tool fingerprint ${stableFingerprint(fingerprint).slice(0, 12)}`
|
|
2998
|
+
};
|
|
2999
|
+
}
|
|
3000
|
+
}
|
|
3001
|
+
}
|
|
3002
|
+
const text = visibleText(assistantMessages);
|
|
3003
|
+
if (text.trim()) {
|
|
3004
|
+
observedContent = true;
|
|
3005
|
+
const stepNgrams = textNgrams(text);
|
|
3006
|
+
this.textNgramsByStep.push(stepNgrams);
|
|
3007
|
+
if (this.textNgramsByStep.length > TEXT_WINDOW_SIZE) {
|
|
3008
|
+
const expired = this.textNgramsByStep.shift() ?? [];
|
|
3009
|
+
for (const ngram of expired) {
|
|
3010
|
+
const nextCount = (this.textNgramCounts.get(ngram) ?? 1) - 1;
|
|
3011
|
+
if (nextCount <= 0)
|
|
3012
|
+
this.textNgramCounts.delete(ngram);
|
|
3013
|
+
else
|
|
3014
|
+
this.textNgramCounts.set(ngram, nextCount);
|
|
3015
|
+
}
|
|
3016
|
+
}
|
|
3017
|
+
for (const ngram of stepNgrams) {
|
|
3018
|
+
const count = (this.textNgramCounts.get(ngram) ?? 0) + 1;
|
|
3019
|
+
this.textNgramCounts.set(ngram, count);
|
|
3020
|
+
if (count >= REPEAT_THRESHOLD) {
|
|
3021
|
+
this.emptyStepCount = 0;
|
|
3022
|
+
return {
|
|
3023
|
+
kind: "text_repeat",
|
|
3024
|
+
summary: `Repeated assistant text ngram ${ngram.slice(0, 12)}`
|
|
3025
|
+
};
|
|
3026
|
+
}
|
|
3027
|
+
}
|
|
3028
|
+
}
|
|
3029
|
+
if (observedContent || toolResults.length > 0) {
|
|
3030
|
+
this.emptyStepCount = 0;
|
|
3031
|
+
return;
|
|
3032
|
+
}
|
|
3033
|
+
this.emptyStepCount++;
|
|
3034
|
+
if (this.emptyStepCount >= REPEAT_THRESHOLD) {
|
|
3035
|
+
return {
|
|
3036
|
+
kind: "empty_step",
|
|
3037
|
+
summary: "Repeated empty assistant step"
|
|
3038
|
+
};
|
|
3039
|
+
}
|
|
3040
|
+
return;
|
|
3041
|
+
} catch {
|
|
3042
|
+
return {
|
|
3043
|
+
kind: "detector_error",
|
|
3044
|
+
summary: "Auto mode loop detector failed"
|
|
3045
|
+
};
|
|
3046
|
+
}
|
|
3047
|
+
}
|
|
3048
|
+
}
|
|
3049
|
+
|
|
3050
|
+
// src/utils/autoMode/runtime.ts
|
|
3051
|
+
class AutoModeRuntime {
|
|
3052
|
+
controller;
|
|
3053
|
+
options;
|
|
3054
|
+
detector;
|
|
3055
|
+
judge;
|
|
3056
|
+
constructor(controller, options) {
|
|
3057
|
+
this.controller = controller;
|
|
3058
|
+
this.options = options;
|
|
3059
|
+
this.detector = options.detector ?? new StepLoopDetector;
|
|
3060
|
+
this.judge = options.judge ?? new AutoModeJudge(controller, {
|
|
3061
|
+
model: options.model,
|
|
3062
|
+
signal: options.signal
|
|
3063
|
+
});
|
|
3064
|
+
}
|
|
3065
|
+
beforeTerminal(messages) {
|
|
3066
|
+
if (this.controller.getResult()) {
|
|
3067
|
+
return Promise.resolve({ action: "terminal" });
|
|
3068
|
+
}
|
|
3069
|
+
return this.judge.beforeTerminal(messages);
|
|
3070
|
+
}
|
|
3071
|
+
async observeStep({
|
|
3072
|
+
assistantMessages,
|
|
3073
|
+
toolResults,
|
|
3074
|
+
messages
|
|
3075
|
+
}) {
|
|
3076
|
+
if (this.controller.getResult())
|
|
3077
|
+
return { action: "terminal" };
|
|
3078
|
+
const signal = this.detector.observeStep({ assistantMessages, toolResults });
|
|
3079
|
+
if (!signal)
|
|
3080
|
+
return { action: "proceed" };
|
|
3081
|
+
if (signal.kind === "detector_error") {
|
|
3082
|
+
this.controller.needsReview(signal.summary);
|
|
3083
|
+
return { action: "terminal" };
|
|
3084
|
+
}
|
|
3085
|
+
const recoveryLevel = this.controller.beginLoopRecovery();
|
|
3086
|
+
if (recoveryLevel === undefined)
|
|
3087
|
+
return { action: "terminal" };
|
|
3088
|
+
const loopMessage = createAutoModeControlMessage(`Auto mode detected a repeated execution pattern (${signal.kind}). Signal: ${signal.summary}. Reassess progress without repeating the same action.`);
|
|
3089
|
+
if (recoveryLevel === 1) {
|
|
3090
|
+
return { action: "continue", message: loopMessage };
|
|
3091
|
+
}
|
|
3092
|
+
return this.judge.beforeTerminal([...messages, loopMessage]);
|
|
3093
|
+
}
|
|
3094
|
+
recordMainUsage(usage) {
|
|
3095
|
+
const tokens = {
|
|
3096
|
+
inputTokens: usage.input_tokens ?? 0,
|
|
3097
|
+
outputTokens: usage.output_tokens ?? 0,
|
|
3098
|
+
cacheReadInputTokens: usage.cache_read_input_tokens ?? 0,
|
|
3099
|
+
cacheCreationInputTokens: usage.cache_creation_input_tokens ?? 0
|
|
3100
|
+
};
|
|
3101
|
+
this.controller.recordUsage({
|
|
3102
|
+
...tokens,
|
|
3103
|
+
usd: (this.options.calculateCost ?? calculateCostFromTokens)(this.options.model, tokens)
|
|
3104
|
+
});
|
|
3105
|
+
}
|
|
3106
|
+
recordControlUsage(usage) {
|
|
3107
|
+
const { model, ...tokens } = usage;
|
|
3108
|
+
this.controller.recordUsage({
|
|
3109
|
+
...tokens,
|
|
3110
|
+
usd: (this.options.calculateCost ?? calculateCostFromTokens)(model, tokens)
|
|
3111
|
+
});
|
|
3112
|
+
}
|
|
3113
|
+
markNeedsReview(reason) {
|
|
3114
|
+
if (this.controller.getRun()?.status === "running") {
|
|
3115
|
+
this.controller.needsReview(reason);
|
|
3116
|
+
}
|
|
3117
|
+
}
|
|
3118
|
+
markBudgetExhausted() {
|
|
3119
|
+
if (this.controller.getRun()?.status === "running") {
|
|
3120
|
+
this.controller.markBudgetExhausted();
|
|
3121
|
+
}
|
|
3122
|
+
}
|
|
3123
|
+
cancel(reason) {
|
|
3124
|
+
this.controller.cancel(reason);
|
|
3125
|
+
}
|
|
3126
|
+
getResult() {
|
|
3127
|
+
return this.controller.getResult();
|
|
3128
|
+
}
|
|
3129
|
+
getUsage() {
|
|
3130
|
+
return this.controller.getUsage();
|
|
3131
|
+
}
|
|
3132
|
+
hasBudget() {
|
|
3133
|
+
return this.controller.hasBudgetFor();
|
|
3134
|
+
}
|
|
3135
|
+
}
|
|
3136
|
+
|
|
3137
|
+
// src/utils/taskCompletion/runtime.ts
|
|
3138
|
+
class TaskCompletionRuntime {
|
|
3139
|
+
controller;
|
|
3140
|
+
judge;
|
|
3141
|
+
constructor(controller, options) {
|
|
3142
|
+
this.controller = controller;
|
|
3143
|
+
if (options.getBaseCostUsd) {
|
|
3144
|
+
controller.setBaseCostUsdSource(options.getBaseCostUsd);
|
|
3145
|
+
}
|
|
3146
|
+
this.judge = options.judge ?? new TaskCompletionJudge(controller, options);
|
|
3147
|
+
}
|
|
3148
|
+
async beforeTerminal(messages) {
|
|
3149
|
+
if (this.controller.getResult())
|
|
3150
|
+
return { action: "terminal" };
|
|
3151
|
+
const decision = await this.judge.beforeTerminal(messages);
|
|
3152
|
+
if (decision.action === "terminal")
|
|
3153
|
+
return decision;
|
|
3154
|
+
return {
|
|
3155
|
+
action: "continue",
|
|
3156
|
+
message: createCompletionControlMessage(`Task completion review found remaining work. Reason: ${decision.reason}
|
|
3157
|
+
Next step: ${decision.nextStep}`, "task_completion_control")
|
|
3158
|
+
};
|
|
3159
|
+
}
|
|
3160
|
+
markNeedsReview(reason) {
|
|
3161
|
+
if (this.controller.getRun()?.status === "running") {
|
|
3162
|
+
this.controller.needsReview(reason);
|
|
3163
|
+
}
|
|
3164
|
+
}
|
|
3165
|
+
cancel(reason) {
|
|
3166
|
+
this.controller.cancel(reason);
|
|
3167
|
+
}
|
|
3168
|
+
getResult() {
|
|
3169
|
+
return this.controller.getResult();
|
|
3170
|
+
}
|
|
3171
|
+
getJudgeUsage() {
|
|
3172
|
+
return this.controller.getJudgeUsage();
|
|
3173
|
+
}
|
|
3174
|
+
hasBudget() {
|
|
3175
|
+
return this.controller.hasBudgetFor();
|
|
3176
|
+
}
|
|
3177
|
+
markBudgetExhausted() {
|
|
3178
|
+
this.controller.markBudgetExhausted();
|
|
3179
|
+
}
|
|
3180
|
+
}
|
|
3181
|
+
|
|
3182
|
+
// src/QueryEngine.ts
|
|
2667
3183
|
init_errors2();
|
|
2668
3184
|
init_Tool();
|
|
2669
3185
|
init_SyntheticOutputTool();
|
|
@@ -2680,7 +3196,6 @@ init_log();
|
|
|
2680
3196
|
init_messages();
|
|
2681
3197
|
init_model();
|
|
2682
3198
|
init_pluginLoader();
|
|
2683
|
-
import { randomUUID as randomUUID3 } from "crypto";
|
|
2684
3199
|
|
|
2685
3200
|
// src/utils/queryContext.ts
|
|
2686
3201
|
init_prompts();
|
|
@@ -2803,7 +3318,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
2803
3318
|
slash_commands: inputs.commands.filter((c) => c.userInvocable !== false).map((c) => c.name),
|
|
2804
3319
|
apiKeySource: getAnthropicApiKeyWithSource().source,
|
|
2805
3320
|
betas: getSdkBetas(),
|
|
2806
|
-
claude_code_version: "
|
|
3321
|
+
claude_code_version: "0.0.21",
|
|
2807
3322
|
output_style: outputStyle,
|
|
2808
3323
|
agents: inputs.agents.map((agent) => agent.agentType),
|
|
2809
3324
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
|
|
@@ -2867,7 +3382,9 @@ class QueryEngine {
|
|
|
2867
3382
|
includePartialMessages = false,
|
|
2868
3383
|
agents = [],
|
|
2869
3384
|
setSDKStatus,
|
|
2870
|
-
orphanedPermission
|
|
3385
|
+
orphanedPermission,
|
|
3386
|
+
autoModeController,
|
|
3387
|
+
taskCompletionController
|
|
2871
3388
|
} = this.config;
|
|
2872
3389
|
this.discoveredSkillNames.clear();
|
|
2873
3390
|
setCwd(cwd);
|
|
@@ -3017,6 +3534,16 @@ class QueryEngine {
|
|
|
3017
3534
|
}
|
|
3018
3535
|
}));
|
|
3019
3536
|
const mainLoopModel = modelFromUserInput ?? initialMainLoopModel;
|
|
3537
|
+
const autoModeRuntime = autoModeController?.isActive() && autoModeController.getRun()?.status === "running" ? new AutoModeRuntime(autoModeController, {
|
|
3538
|
+
model: mainLoopModel,
|
|
3539
|
+
signal: this.abortController.signal
|
|
3540
|
+
}) : undefined;
|
|
3541
|
+
const taskCompletionRuntime = taskCompletionController?.isActive() && taskCompletionController.getRun()?.status === "running" ? new TaskCompletionRuntime(taskCompletionController, {
|
|
3542
|
+
model: mainLoopModel,
|
|
3543
|
+
signal: this.abortController.signal,
|
|
3544
|
+
getBaseCostUsd: getTotalCostUSD
|
|
3545
|
+
}) : undefined;
|
|
3546
|
+
const completionJudgeRuntime = taskCompletionRuntime ?? autoModeRuntime;
|
|
3020
3547
|
processUserInputContext = {
|
|
3021
3548
|
messages,
|
|
3022
3549
|
setMessages: () => {},
|
|
@@ -3042,6 +3569,8 @@ class QueryEngine {
|
|
|
3042
3569
|
getAppState,
|
|
3043
3570
|
setAppState,
|
|
3044
3571
|
abortController: this.abortController,
|
|
3572
|
+
onAutoModeUsage: (usage) => autoModeRuntime?.recordControlUsage(usage),
|
|
3573
|
+
onAutoModeHandoff: (reason) => autoModeRuntime?.markNeedsReview(reason),
|
|
3045
3574
|
readFileState: this.readFileState,
|
|
3046
3575
|
nestedMemoryAttachmentTriggers: new Set,
|
|
3047
3576
|
loadedNestedMemoryPaths: this.loadedNestedMemoryPaths,
|
|
@@ -3137,6 +3666,43 @@ class QueryEngine {
|
|
|
3137
3666
|
}, message.uuid);
|
|
3138
3667
|
});
|
|
3139
3668
|
}
|
|
3669
|
+
const getResultCost = () => autoModeRuntime?.getUsage()?.usd ?? getTotalCostUSD() + (taskCompletionRuntime?.getJudgeUsage()?.usd ?? 0);
|
|
3670
|
+
const getResultUsage = () => {
|
|
3671
|
+
const usage = autoModeRuntime?.getUsage();
|
|
3672
|
+
if (usage) {
|
|
3673
|
+
return {
|
|
3674
|
+
...EMPTY_USAGE,
|
|
3675
|
+
input_tokens: usage.inputTokens,
|
|
3676
|
+
output_tokens: usage.outputTokens,
|
|
3677
|
+
cache_read_input_tokens: usage.cacheReadInputTokens,
|
|
3678
|
+
cache_creation_input_tokens: usage.cacheCreationInputTokens
|
|
3679
|
+
};
|
|
3680
|
+
}
|
|
3681
|
+
const judgeUsage = taskCompletionRuntime?.getJudgeUsage();
|
|
3682
|
+
if (!judgeUsage)
|
|
3683
|
+
return this.totalUsage;
|
|
3684
|
+
return {
|
|
3685
|
+
...this.totalUsage,
|
|
3686
|
+
input_tokens: this.totalUsage.input_tokens + judgeUsage.inputTokens,
|
|
3687
|
+
output_tokens: this.totalUsage.output_tokens + judgeUsage.outputTokens,
|
|
3688
|
+
cache_read_input_tokens: this.totalUsage.cache_read_input_tokens + judgeUsage.cacheReadInputTokens,
|
|
3689
|
+
cache_creation_input_tokens: this.totalUsage.cache_creation_input_tokens + judgeUsage.cacheCreationInputTokens
|
|
3690
|
+
};
|
|
3691
|
+
};
|
|
3692
|
+
const getCompletionResultMetadata = () => {
|
|
3693
|
+
const autoModeResult = autoModeRuntime?.getResult();
|
|
3694
|
+
if (autoModeResult)
|
|
3695
|
+
return { auto_mode: autoModeResult };
|
|
3696
|
+
const taskCompletionResult = taskCompletionRuntime?.getResult();
|
|
3697
|
+
if (!taskCompletionResult)
|
|
3698
|
+
return {};
|
|
3699
|
+
return {
|
|
3700
|
+
task_completion: {
|
|
3701
|
+
...taskCompletionResult,
|
|
3702
|
+
status: taskCompletionResult.status === "budget_exhausted" ? "needs_review" : taskCompletionResult.status
|
|
3703
|
+
}
|
|
3704
|
+
};
|
|
3705
|
+
};
|
|
3140
3706
|
let currentMessageUsage = EMPTY_USAGE;
|
|
3141
3707
|
let turnCount = 1;
|
|
3142
3708
|
let hasAcknowledgedInitialMessages = false;
|
|
@@ -3154,7 +3720,9 @@ class QueryEngine {
|
|
|
3154
3720
|
fallbackModel,
|
|
3155
3721
|
querySource: "sdk",
|
|
3156
3722
|
maxTurns,
|
|
3157
|
-
taskBudget
|
|
3723
|
+
taskBudget,
|
|
3724
|
+
autoMode: autoModeRuntime,
|
|
3725
|
+
completionJudge: completionJudgeRuntime
|
|
3158
3726
|
})) {
|
|
3159
3727
|
if (this.destroyed)
|
|
3160
3728
|
return;
|
|
@@ -3242,6 +3810,7 @@ class QueryEngine {
|
|
|
3242
3810
|
}
|
|
3243
3811
|
if (event.type === "message_stop") {
|
|
3244
3812
|
this.totalUsage = accumulateUsage(this.totalUsage, currentMessageUsage);
|
|
3813
|
+
autoModeRuntime?.recordMainUsage(currentMessageUsage);
|
|
3245
3814
|
}
|
|
3246
3815
|
if (includePartialMessages) {
|
|
3247
3816
|
yield {
|
|
@@ -3279,15 +3848,16 @@ class QueryEngine {
|
|
|
3279
3848
|
num_turns: attachment.turnCount,
|
|
3280
3849
|
stop_reason: lastStopReason,
|
|
3281
3850
|
session_id: getSessionId(),
|
|
3282
|
-
total_cost_usd:
|
|
3283
|
-
usage:
|
|
3851
|
+
total_cost_usd: getResultCost(),
|
|
3852
|
+
usage: getResultUsage(),
|
|
3284
3853
|
modelUsage: getModelUsage(),
|
|
3285
3854
|
permission_denials: this.permissionDenials,
|
|
3286
3855
|
fast_mode_state: getFastModeState(mainLoopModel, initialAppState.fastMode),
|
|
3287
3856
|
uuid: randomUUID3(),
|
|
3288
3857
|
errors: [
|
|
3289
3858
|
`Reached maximum number of turns (${attachment.maxTurns})`
|
|
3290
|
-
]
|
|
3859
|
+
],
|
|
3860
|
+
...getCompletionResultMetadata()
|
|
3291
3861
|
};
|
|
3292
3862
|
return;
|
|
3293
3863
|
} else if (replayUserMessages && attachment.type === "queued_command") {
|
|
@@ -3365,7 +3935,9 @@ class QueryEngine {
|
|
|
3365
3935
|
break;
|
|
3366
3936
|
}
|
|
3367
3937
|
}
|
|
3368
|
-
if (maxBudgetUsd !== undefined && getTotalCostUSD() >= maxBudgetUsd) {
|
|
3938
|
+
if (maxBudgetUsd !== undefined && (autoModeRuntime ? !autoModeRuntime.hasBudget() : taskCompletionRuntime ? !taskCompletionRuntime.hasBudget() : getTotalCostUSD() >= maxBudgetUsd)) {
|
|
3939
|
+
autoModeRuntime?.markBudgetExhausted();
|
|
3940
|
+
taskCompletionRuntime?.markBudgetExhausted();
|
|
3369
3941
|
if (persistSession) {
|
|
3370
3942
|
if (isEnvTruthy(process.env.CLAUDE_CODE_EAGER_FLUSH) || isEnvTruthy(process.env.CLAUDE_CODE_IS_COWORK)) {
|
|
3371
3943
|
await flushSessionStorage();
|
|
@@ -3380,13 +3952,14 @@ class QueryEngine {
|
|
|
3380
3952
|
num_turns: turnCount,
|
|
3381
3953
|
stop_reason: lastStopReason,
|
|
3382
3954
|
session_id: getSessionId(),
|
|
3383
|
-
total_cost_usd:
|
|
3384
|
-
usage:
|
|
3955
|
+
total_cost_usd: getResultCost(),
|
|
3956
|
+
usage: getResultUsage(),
|
|
3385
3957
|
modelUsage: getModelUsage(),
|
|
3386
3958
|
permission_denials: this.permissionDenials,
|
|
3387
3959
|
fast_mode_state: getFastModeState(mainLoopModel, initialAppState.fastMode),
|
|
3388
3960
|
uuid: randomUUID3(),
|
|
3389
|
-
errors: [`Reached maximum budget ($${maxBudgetUsd})`]
|
|
3961
|
+
errors: [`Reached maximum budget ($${maxBudgetUsd})`],
|
|
3962
|
+
...getCompletionResultMetadata()
|
|
3390
3963
|
};
|
|
3391
3964
|
return;
|
|
3392
3965
|
}
|
|
@@ -3395,6 +3968,8 @@ class QueryEngine {
|
|
|
3395
3968
|
const callsThisQuery = currentCalls - initialStructuredOutputCalls;
|
|
3396
3969
|
const maxRetries = parseInt(process.env.MAX_STRUCTURED_OUTPUT_RETRIES || "5", 10);
|
|
3397
3970
|
if (callsThisQuery >= maxRetries) {
|
|
3971
|
+
autoModeRuntime?.markNeedsReview("Structured output retry limit reached during auto mode execution");
|
|
3972
|
+
taskCompletionRuntime?.markNeedsReview("Structured output retry limit reached before task completion could be judged");
|
|
3398
3973
|
if (persistSession) {
|
|
3399
3974
|
if (isEnvTruthy(process.env.CLAUDE_CODE_EAGER_FLUSH) || isEnvTruthy(process.env.CLAUDE_CODE_IS_COWORK)) {
|
|
3400
3975
|
await flushSessionStorage();
|
|
@@ -3409,15 +3984,16 @@ class QueryEngine {
|
|
|
3409
3984
|
num_turns: turnCount,
|
|
3410
3985
|
stop_reason: lastStopReason,
|
|
3411
3986
|
session_id: getSessionId(),
|
|
3412
|
-
total_cost_usd:
|
|
3413
|
-
usage:
|
|
3987
|
+
total_cost_usd: getResultCost(),
|
|
3988
|
+
usage: getResultUsage(),
|
|
3414
3989
|
modelUsage: getModelUsage(),
|
|
3415
3990
|
permission_denials: this.permissionDenials,
|
|
3416
3991
|
fast_mode_state: getFastModeState(mainLoopModel, initialAppState.fastMode),
|
|
3417
3992
|
uuid: randomUUID3(),
|
|
3418
3993
|
errors: [
|
|
3419
3994
|
`Failed to provide valid structured output after ${maxRetries} attempts`
|
|
3420
|
-
]
|
|
3995
|
+
],
|
|
3996
|
+
...getCompletionResultMetadata()
|
|
3421
3997
|
};
|
|
3422
3998
|
return;
|
|
3423
3999
|
}
|
|
@@ -3426,12 +4002,26 @@ class QueryEngine {
|
|
|
3426
4002
|
const result = messages.findLast((m) => m.type === "assistant" || m.type === "user");
|
|
3427
4003
|
const edeResultType = result?.type ?? "undefined";
|
|
3428
4004
|
const edeLastContentType = result?.type === "assistant" ? last_default(result.message.content)?.type ?? "none" : "n/a";
|
|
4005
|
+
const edeIsApiError = result?.type === "assistant" && result.isApiErrorMessage === true;
|
|
4006
|
+
const edeApiErrorDetail = (() => {
|
|
4007
|
+
if (result?.type !== "assistant")
|
|
4008
|
+
return "";
|
|
4009
|
+
const block = last_default(result.message.content);
|
|
4010
|
+
return block?.type === "text" ? String(block.text ?? "").slice(0, 200) : "";
|
|
4011
|
+
})();
|
|
3429
4012
|
if (persistSession) {
|
|
3430
4013
|
if (isEnvTruthy(process.env.CLAUDE_CODE_EAGER_FLUSH) || isEnvTruthy(process.env.CLAUDE_CODE_IS_COWORK)) {
|
|
3431
4014
|
await flushSessionStorage();
|
|
3432
4015
|
}
|
|
3433
4016
|
}
|
|
3434
4017
|
if (!isResultSuccessful(result, lastStopReason)) {
|
|
4018
|
+
if (edeIsApiError) {
|
|
4019
|
+
autoModeRuntime?.cancel(`Auto mode aborted: API error (${edeApiErrorDetail || lastStopReason || "unknown"})`);
|
|
4020
|
+
taskCompletionRuntime?.cancel(`Task completion judging aborted: API error (${edeApiErrorDetail || lastStopReason || "unknown"})`);
|
|
4021
|
+
} else {
|
|
4022
|
+
autoModeRuntime?.markNeedsReview("Auto mode execution ended without a successful terminal result");
|
|
4023
|
+
taskCompletionRuntime?.markNeedsReview("Execution ended without a successful terminal result");
|
|
4024
|
+
}
|
|
3435
4025
|
yield {
|
|
3436
4026
|
type: "result",
|
|
3437
4027
|
subtype: "error_during_execution",
|
|
@@ -3441,8 +4031,8 @@ class QueryEngine {
|
|
|
3441
4031
|
num_turns: turnCount,
|
|
3442
4032
|
stop_reason: lastStopReason,
|
|
3443
4033
|
session_id: getSessionId(),
|
|
3444
|
-
total_cost_usd:
|
|
3445
|
-
usage:
|
|
4034
|
+
total_cost_usd: getResultCost(),
|
|
4035
|
+
usage: getResultUsage(),
|
|
3446
4036
|
modelUsage: getModelUsage(),
|
|
3447
4037
|
permission_denials: this.permissionDenials,
|
|
3448
4038
|
fast_mode_state: getFastModeState(mainLoopModel, initialAppState.fastMode),
|
|
@@ -3454,7 +4044,8 @@ class QueryEngine {
|
|
|
3454
4044
|
`[ede_diagnostic] result_type=${edeResultType} last_content_type=${edeLastContentType} stop_reason=${lastStopReason}`,
|
|
3455
4045
|
...all.slice(start).map((_) => _.error)
|
|
3456
4046
|
];
|
|
3457
|
-
})()
|
|
4047
|
+
})(),
|
|
4048
|
+
...getCompletionResultMetadata()
|
|
3458
4049
|
};
|
|
3459
4050
|
return;
|
|
3460
4051
|
}
|
|
@@ -3467,6 +4058,13 @@ class QueryEngine {
|
|
|
3467
4058
|
}
|
|
3468
4059
|
isApiError = Boolean(result.isApiErrorMessage);
|
|
3469
4060
|
}
|
|
4061
|
+
if (isApiError) {
|
|
4062
|
+
autoModeRuntime?.cancel(`Auto mode aborted: API error (${textResult || "no error detail"})`);
|
|
4063
|
+
taskCompletionRuntime?.cancel(`Task completion judging aborted: API error (${textResult || "no error detail"})`);
|
|
4064
|
+
} else {
|
|
4065
|
+
autoModeRuntime?.markNeedsReview("Auto mode execution ended without a completion verdict");
|
|
4066
|
+
taskCompletionRuntime?.markNeedsReview("Execution ended without a task completion verdict");
|
|
4067
|
+
}
|
|
3470
4068
|
yield {
|
|
3471
4069
|
type: "result",
|
|
3472
4070
|
subtype: "success",
|
|
@@ -3477,13 +4075,14 @@ class QueryEngine {
|
|
|
3477
4075
|
result: textResult,
|
|
3478
4076
|
stop_reason: lastStopReason,
|
|
3479
4077
|
session_id: getSessionId(),
|
|
3480
|
-
total_cost_usd:
|
|
3481
|
-
usage:
|
|
4078
|
+
total_cost_usd: getResultCost(),
|
|
4079
|
+
usage: getResultUsage(),
|
|
3482
4080
|
modelUsage: getModelUsage(),
|
|
3483
4081
|
permission_denials: this.permissionDenials,
|
|
3484
4082
|
structured_output: structuredOutputFromTool,
|
|
3485
4083
|
fast_mode_state: getFastModeState(mainLoopModel, initialAppState.fastMode),
|
|
3486
|
-
uuid: randomUUID3()
|
|
4084
|
+
uuid: randomUUID3(),
|
|
4085
|
+
...getCompletionResultMetadata()
|
|
3487
4086
|
};
|
|
3488
4087
|
}
|
|
3489
4088
|
interrupt() {
|
|
@@ -4698,7 +5297,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
|
|
|
4698
5297
|
}
|
|
4699
5298
|
pluginInstallPromise = null;
|
|
4700
5299
|
await refreshPluginState();
|
|
4701
|
-
const { setupPluginHookHotReload } = await import("./chunk-
|
|
5300
|
+
const { setupPluginHookHotReload } = await import("./chunk-102ee39t.js");
|
|
4702
5301
|
setupPluginHookHotReload();
|
|
4703
5302
|
}
|
|
4704
5303
|
const isMainThread = (cmd) => cmd.agentId === undefined;
|
|
@@ -6373,7 +6972,7 @@ async function loadInitialMessages(setAppState, options) {
|
|
|
6373
6972
|
processMessagesForTeleportResume,
|
|
6374
6973
|
teleportResumeCodeSession,
|
|
6375
6974
|
validateGitState
|
|
6376
|
-
} = await import("./chunk-
|
|
6975
|
+
} = await import("./chunk-8mpv3j7b.js");
|
|
6377
6976
|
await validateGitState();
|
|
6378
6977
|
const teleportResult = await teleportResumeCodeSession(options.teleport);
|
|
6379
6978
|
const { branchError } = await checkOutTeleportedSessionBranch(teleportResult.branch);
|