@caspian2026/agent-sdk 0.0.8 → 0.0.9

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.
Files changed (312) hide show
  1. package/dist/chunk-04h360ha.js +57 -0
  2. package/dist/{chunk-jmkn11my.js → chunk-04pw5akr.js} +20 -20
  3. package/dist/{chunk-veap97he.js → chunk-0gpem3pk.js} +46 -45
  4. package/dist/{chunk-0mej3p7q.js → chunk-0txtpamh.js} +14 -14
  5. package/dist/{chunk-4m9df5ef.js → chunk-0v89r445.js} +17 -21
  6. package/dist/chunk-0vp3wfab.js +12 -0
  7. package/dist/{chunk-268jd0rc.js → chunk-1486qzk5.js} +6 -4
  8. package/dist/chunk-1efrnkxx.js +468 -0
  9. package/dist/chunk-1gaw18rz.js +93 -0
  10. package/dist/{chunk-69r3hm9b.js → chunk-1hqb50ne.js} +13 -19
  11. package/dist/chunk-1hqvvvrt.js +96 -0
  12. package/dist/{chunk-qjyg1dv7.js → chunk-1hx5g6qy.js} +6 -10
  13. package/dist/{chunk-3g1vqhyx.js → chunk-1kmwf4vn.js} +17 -21
  14. package/dist/{chunk-naybw0p0.js → chunk-1nhnn2rg.js} +8 -8
  15. package/dist/{chunk-jjh7m5sg.js → chunk-1nvcmzj1.js} +66 -77
  16. package/dist/{chunk-2f21meep.js → chunk-1v01c96r.js} +1 -1
  17. package/dist/{chunk-7n51wk9k.js → chunk-1vp22nex.js} +2 -2
  18. package/dist/{chunk-jcwkgtbp.js → chunk-1yfc1d48.js} +52 -90
  19. package/dist/{chunk-83e71kz6.js → chunk-2072dpbx.js} +2 -2
  20. package/dist/{chunk-7rnqsng2.js → chunk-22mfb6bp.js} +19 -19
  21. package/dist/{chunk-d7886r6a.js → chunk-26wtxbdc.js} +7774 -7774
  22. package/dist/{chunk-x94btg29.js → chunk-2m32xn94.js} +17 -21
  23. package/dist/{chunk-mw1kpeg9.js → chunk-2nrarbza.js} +1909 -1377
  24. package/dist/chunk-2vbash3m.js +331 -0
  25. package/dist/{chunk-c11swzas.js → chunk-2vteceqh.js} +5 -5
  26. package/dist/{chunk-3zxswxtg.js → chunk-2y8x7xt7.js} +2 -2
  27. package/dist/{chunk-s7q42kp2.js → chunk-2yxqz99n.js} +9 -9
  28. package/dist/{chunk-qyqpb15f.js → chunk-35nft36d.js} +205 -261
  29. package/dist/{chunk-88xc4d7f.js → chunk-35z2vxep.js} +49 -48
  30. package/dist/{chunk-15m49c67.js → chunk-3e28fvn0.js} +2 -2
  31. package/dist/{chunk-2xvc97x4.js → chunk-3e4r5pmc.js} +3 -3
  32. package/dist/{chunk-a3ws4gae.js → chunk-3fn3ysvs.js} +47 -46
  33. package/dist/{chunk-4hv90qcz.js → chunk-3mgywd32.js} +1 -1
  34. package/dist/{chunk-pwqm47kn.js → chunk-3npsy4c4.js} +46 -45
  35. package/dist/{chunk-xz655xxa.js → chunk-3pzwd6qq.js} +2 -2
  36. package/dist/{chunk-70eey1nh.js → chunk-40s88wdg.js} +2 -2
  37. package/dist/{chunk-w0gmf6bv.js → chunk-42a0nyrq.js} +47 -46
  38. package/dist/{chunk-jvmybb06.js → chunk-44t1xk05.js} +46 -45
  39. package/dist/{chunk-0awwmrwr.js → chunk-4ayjwyqj.js} +2 -2
  40. package/dist/{chunk-a4npwxvb.js → chunk-4myad919.js} +46 -45
  41. package/dist/{chunk-8g747a8x.js → chunk-4pbx3g7s.js} +1 -1
  42. package/dist/chunk-4vtvwg7e.js +99 -0
  43. package/dist/{chunk-qcnhb4cd.js → chunk-54wn2jdr.js} +3 -3
  44. package/dist/{chunk-1nk93fqz.js → chunk-5cxjxxx8.js} +2 -7
  45. package/dist/chunk-5m3m7hr5.js +108 -0
  46. package/dist/{chunk-a3wczqrp.js → chunk-5mrc0ps5.js} +37 -41
  47. package/dist/{chunk-zmra45az.js → chunk-5tw3gj5z.js} +47 -46
  48. package/dist/{chunk-87e209aj.js → chunk-5zcygjb2.js} +46 -45
  49. package/dist/{chunk-mk1y74w7.js → chunk-65q3hqkw.js} +17 -21
  50. package/dist/{chunk-vajwapkf.js → chunk-67wms97m.js} +17 -23
  51. package/dist/chunk-6cfcqjty.js +441 -0
  52. package/dist/{chunk-rc9x0raa.js → chunk-6hs0cptm.js} +56 -55
  53. package/dist/{chunk-bmbq6nt1.js → chunk-6wzg2hpc.js} +2 -2
  54. package/dist/chunk-72qa16xm.js +91 -0
  55. package/dist/chunk-7cdy4aj6.js +150 -0
  56. package/dist/chunk-7cje7scj.js +1534 -0
  57. package/dist/{chunk-e7h4qxgw.js → chunk-7etkb4pr.js} +4 -4
  58. package/dist/{chunk-1ax1znzj.js → chunk-7hrmxpha.js} +6 -6
  59. package/dist/{chunk-wha6v7za.js → chunk-7krg0dkt.js} +2 -2
  60. package/dist/{chunk-vvsbvz2b.js → chunk-7skyagc2.js} +2 -2
  61. package/dist/{chunk-hzknr99c.js → chunk-83b2frat.js} +4 -4
  62. package/dist/{chunk-qvd3hbqs.js → chunk-84cdy41j.js} +5 -5
  63. package/dist/{chunk-bxcfz5gy.js → chunk-87xg6yb4.js} +1 -1
  64. package/dist/{chunk-nrtksr2p.js → chunk-8b2y3x7a.js} +1 -1
  65. package/dist/{chunk-c9dmpdss.js → chunk-8ckwc9k8.js} +46 -45
  66. package/dist/{chunk-67a4147x.js → chunk-8jy18nx9.js} +1 -1
  67. package/dist/{chunk-f2hbn5rk.js → chunk-93vwm44t.js} +100420 -57118
  68. package/dist/{chunk-cfgha78n.js → chunk-9957ffjc.js} +2 -2
  69. package/dist/{chunk-cdj51xbj.js → chunk-9byfzaeq.js} +46 -45
  70. package/dist/chunk-9ewnsd7f.js +31 -0
  71. package/dist/{chunk-xwg327ys.js → chunk-9w114071.js} +6 -6
  72. package/dist/chunk-9wf3fc4t.js +29 -0
  73. package/dist/chunk-9z9teq7p.js +87 -0
  74. package/dist/{chunk-6p4cyhb3.js → chunk-a6d2q415.js} +2 -2
  75. package/dist/{chunk-jgzxmtpf.js → chunk-ay5fvc2r.js} +52 -52
  76. package/dist/{chunk-1ybvj5df.js → chunk-ayx9aq2k.js} +47 -46
  77. package/dist/{chunk-23fkapww.js → chunk-azv68vk1.js} +2 -2
  78. package/dist/chunk-b547q41s.js +92 -0
  79. package/dist/{chunk-jgjqa49s.js → chunk-b56smerd.js} +3 -3
  80. package/dist/{chunk-enkdxqas.js → chunk-b5asw4tj.js} +6 -6
  81. package/dist/{chunk-nk82j7r2.js → chunk-b6prbsae.js} +7 -7
  82. package/dist/{chunk-ya40p6vj.js → chunk-b89ese8r.js} +46 -45
  83. package/dist/{chunk-byb2mn1c.js → chunk-be77bcs8.js} +118 -450
  84. package/dist/{chunk-m46xyqr6.js → chunk-bf03a1w7.js} +48 -47
  85. package/dist/{chunk-dmqeqxfz.js → chunk-bjdknxqn.js} +46 -45
  86. package/dist/{chunk-m87bhhqv.js → chunk-bzatg35k.js} +1 -1
  87. package/dist/{chunk-8ybw2s0h.js → chunk-c4d52460.js} +4 -4
  88. package/dist/{chunk-6g5qbbxk.js → chunk-c5zkrd7r.js} +47 -46
  89. package/dist/{chunk-4140c8xy.js → chunk-c6hsz5ey.js} +20 -24
  90. package/dist/{chunk-wqvr37xp.js → chunk-cay13mxk.js} +15 -31
  91. package/dist/{chunk-s3hsqf80.js → chunk-cexw1jmv.js} +30 -81
  92. package/dist/{chunk-cvm2tmwg.js → chunk-ckh4f9ry.js} +20 -24
  93. package/dist/{chunk-qn8z4r79.js → chunk-cr1dv2js.js} +50 -48
  94. package/dist/{chunk-88cekjja.js → chunk-d8z7pyrb.js} +47 -46
  95. package/dist/chunk-dexkgxt4.js +211 -0
  96. package/dist/{chunk-xxw9a0bq.js → chunk-dhwr4fz4.js} +2 -2
  97. package/dist/{chunk-0ym2z0c7.js → chunk-dj7d67ya.js} +1 -1
  98. package/dist/chunk-djfq8ws0.js +124 -0
  99. package/dist/{chunk-x2pvw7xw.js → chunk-dmyedkpw.js} +8 -8
  100. package/dist/{chunk-v0bykh19.js → chunk-dngfdsm9.js} +108 -102
  101. package/dist/{chunk-8nfn89nz.js → chunk-dt3epnwj.js} +9 -9
  102. package/dist/{chunk-4r50c14n.js → chunk-dz6zxh89.js} +46 -45
  103. package/dist/{chunk-jh965sa0.js → chunk-e7ag583m.js} +47 -46
  104. package/dist/{chunk-th4y838y.js → chunk-ec6ga5ey.js} +51 -50
  105. package/dist/{chunk-4g0nj78p.js → chunk-ecbh4n6q.js} +46 -45
  106. package/dist/{chunk-ydcsbj4t.js → chunk-ecv9kbtk.js} +11 -9
  107. package/dist/{chunk-nvwwtq1w.js → chunk-ecvy1ng2.js} +49 -48
  108. package/dist/{chunk-s4zb3f1b.js → chunk-ef2m4xyz.js} +46 -45
  109. package/dist/{chunk-psnsve7m.js → chunk-etbb3dss.js} +49 -48
  110. package/dist/{chunk-jgpmpgx6.js → chunk-etdt1xz3.js} +1 -1
  111. package/dist/{chunk-jxfp3g9b.js → chunk-ev7h351p.js} +4 -4
  112. package/dist/{chunk-njxgct8f.js → chunk-ey0n4emm.js} +46 -45
  113. package/dist/{chunk-af868wet.js → chunk-f4tdn7yr.js} +46 -45
  114. package/dist/{chunk-bd5sqj86.js → chunk-f4v7t54y.js} +11 -11
  115. package/dist/{chunk-8ywngxqt.js → chunk-fesvrjhd.js} +10 -10
  116. package/dist/{chunk-j4m8fd76.js → chunk-frm7mphm.js} +7 -11
  117. package/dist/{chunk-kek5v6ef.js → chunk-frwznxnf.js} +3 -3
  118. package/dist/{chunk-030rqd3a.js → chunk-ftsdm7y7.js} +54 -53
  119. package/dist/{chunk-vdcm8hz6.js → chunk-g597bz1j.js} +47 -46
  120. package/dist/chunk-g5pe8dew.js +25 -0
  121. package/dist/{chunk-tvzr9c8a.js → chunk-g78fetxa.js} +46 -45
  122. package/dist/{chunk-ga86yjm1.js → chunk-gdwdqewd.js} +3 -3
  123. package/dist/{chunk-dvcwahst.js → chunk-ghwvqhx9.js} +51 -50
  124. package/dist/chunk-gkn3jgqn.js +123 -0
  125. package/dist/{chunk-23q4jpn2.js → chunk-grqhgr2b.js} +3 -3
  126. package/dist/chunk-grqkx44z.js +90 -0
  127. package/dist/{chunk-21jsjcfa.js → chunk-gzj94jgg.js} +46 -45
  128. package/dist/{chunk-g5pgham9.js → chunk-h3vyya5n.js} +20 -14
  129. package/dist/{chunk-15edybe0.js → chunk-h4xfadhf.js} +1 -1
  130. package/dist/chunk-h61d4awv.js +95 -0
  131. package/dist/{chunk-w05jpkkr.js → chunk-hae34yd0.js} +5 -9
  132. package/dist/{chunk-rtmh0v4c.js → chunk-hb1gr101.js} +6 -6
  133. package/dist/{chunk-5a5w0ygx.js → chunk-hg45r671.js} +2 -2
  134. package/dist/{chunk-d9yghsfg.js → chunk-hg6fwhj1.js} +1 -1
  135. package/dist/{chunk-1cq2vrzq.js → chunk-hgmhngje.js} +4 -4
  136. package/dist/{chunk-vvjgdzhn.js → chunk-hparkfvt.js} +55 -51
  137. package/dist/{chunk-ahrhwpm9.js → chunk-hqjdgc6c.js} +2 -2
  138. package/dist/{chunk-37p5p94r.js → chunk-hrhp26d7.js} +55 -54
  139. package/dist/{chunk-xrpstt41.js → chunk-hzbr9543.js} +4 -4
  140. package/dist/{chunk-1dwvgrfc.js → chunk-j0gke393.js} +46 -45
  141. package/dist/{chunk-yyf72f78.js → chunk-j35mw64g.js} +4 -2
  142. package/dist/{chunk-425w66ka.js → chunk-j99ms5ep.js} +4 -4
  143. package/dist/{chunk-dtgh4te6.js → chunk-jgvmjwnx.js} +46 -45
  144. package/dist/{chunk-87scz097.js → chunk-jj4zs4gr.js} +46 -45
  145. package/dist/{chunk-am3qcgzp.js → chunk-jjz3hs34.js} +56 -55
  146. package/dist/{chunk-1a6ez1mg.js → chunk-jksf0ax9.js} +51 -49
  147. package/dist/{chunk-gdhz1652.js → chunk-jqfrz5g9.js} +27 -30
  148. package/dist/{chunk-q7jnesv8.js → chunk-jsj3fx0g.js} +5 -5
  149. package/dist/{chunk-vawgyev5.js → chunk-jtgyzqbq.js} +3 -3
  150. package/dist/{chunk-xfkfh5sd.js → chunk-jwpp2bq2.js} +1808 -1643
  151. package/dist/{chunk-zq6ezxh2.js → chunk-jwwpfq76.js} +49 -45
  152. package/dist/{chunk-qq5d2s0d.js → chunk-jxp2j9t5.js} +46 -45
  153. package/dist/{chunk-zctfbr1v.js → chunk-k7cw1a8a.js} +1 -1
  154. package/dist/chunk-k8jpbz31.js +62 -0
  155. package/dist/{chunk-tdbz9gbm.js → chunk-kjqyhxz7.js} +6 -6
  156. package/dist/{chunk-yc23zxmj.js → chunk-kxrrtr3p.js} +1 -1
  157. package/dist/chunk-m70n19dz.js +93 -0
  158. package/dist/{chunk-4nspekjp.js → chunk-mcws22k3.js} +1 -28
  159. package/dist/{chunk-a1bf2kh4.js → chunk-mewywsar.js} +46 -45
  160. package/dist/{chunk-k7g9gcr9.js → chunk-mmhkcj7c.js} +64 -58
  161. package/dist/{chunk-rm2vtv77.js → chunk-msxggy37.js} +22 -25
  162. package/dist/{chunk-s1tg295x.js → chunk-njw0haha.js} +10 -8
  163. package/dist/{chunk-5rv9c8yd.js → chunk-nrjtxhyr.js} +1 -1
  164. package/dist/{chunk-nqn45znr.js → chunk-ns7x6xam.js} +9 -9
  165. package/dist/{chunk-jaaxk89e.js → chunk-nsc89h0n.js} +2 -22
  166. package/dist/{chunk-z19sd3bt.js → chunk-p4196wzm.js} +5 -5
  167. package/dist/{chunk-1dgdjrm1.js → chunk-p791ydbm.js} +4 -4
  168. package/dist/{chunk-1zhy5cbc.js → chunk-p9ny0p2a.js} +13 -13
  169. package/dist/{chunk-phd1qfpc.js → chunk-pd2vy8hx.js} +5 -5
  170. package/dist/{chunk-gnj7tyj6.js → chunk-pddf0719.js} +49 -48
  171. package/dist/{chunk-6t5zvnrg.js → chunk-pfarypfq.js} +48 -46
  172. package/dist/{chunk-w4yn8cq7.js → chunk-psm26hv7.js} +8 -8
  173. package/dist/{chunk-hwn8vetn.js → chunk-pwpk3gm6.js} +10 -10
  174. package/dist/{chunk-va8drjmv.js → chunk-q14wrksq.js} +48 -47
  175. package/dist/{chunk-twqzmqsn.js → chunk-q4f1g9y6.js} +31 -27
  176. package/dist/{chunk-23jzrwsw.js → chunk-q6tdxy8v.js} +5 -5
  177. package/dist/chunk-q8hxwh48.js +445 -0
  178. package/dist/{chunk-eenq3avg.js → chunk-qcrpqjya.js} +1 -1
  179. package/dist/{chunk-e7efcp3k.js → chunk-qctsv1d7.js} +257 -2857
  180. package/dist/{chunk-ck0ap688.js → chunk-qkczt8cr.js} +4 -4
  181. package/dist/{chunk-2fxpd35d.js → chunk-qkp4ygnk.js} +2 -2
  182. package/dist/{chunk-c3d2cnz5.js → chunk-qqs58ywv.js} +7 -7
  183. package/dist/{chunk-qdnxk7d7.js → chunk-qxjhw1dt.js} +29 -30
  184. package/dist/{chunk-rkg741k3.js → chunk-qz0xdht6.js} +14 -14
  185. package/dist/chunk-r3ehjkj5.js +123 -0
  186. package/dist/{chunk-wbbykfdd.js → chunk-r5nd93kc.js} +1 -1
  187. package/dist/{chunk-yzcjz0gg.js → chunk-r6nnp8mj.js} +46 -45
  188. package/dist/{chunk-bm5rc541.js → chunk-r7684mmh.js} +5 -5
  189. package/dist/chunk-ratnrv9v.js +517 -0
  190. package/dist/{chunk-nx7c354z.js → chunk-rfbbcx5s.js} +46 -45
  191. package/dist/{chunk-z9n0183s.js → chunk-rfq9kmsy.js} +9 -9
  192. package/dist/{chunk-qsc98gbe.js → chunk-rhvn1rqs.js} +2 -2
  193. package/dist/{chunk-gvrjgq1n.js → chunk-rjq5nf1c.js} +16 -20
  194. package/dist/{chunk-xp61y5ba.js → chunk-rkv8bdtr.js} +2 -2
  195. package/dist/{chunk-tff58196.js → chunk-rmpaj37q.js} +48 -47
  196. package/dist/{chunk-k1crm94z.js → chunk-rn1s097c.js} +46 -45
  197. package/dist/{chunk-c42pqnxx.js → chunk-rnxpvm3m.js} +1 -1
  198. package/dist/{chunk-k0v0cz71.js → chunk-rpsqtvkx.js} +46 -45
  199. package/dist/{chunk-t5vbqd9d.js → chunk-rx4mcfg1.js} +55 -54
  200. package/dist/{chunk-30smv00b.js → chunk-rygxwjtc.js} +47 -46
  201. package/dist/{chunk-jpc9zwsk.js → chunk-rz94yg8c.js} +3 -3
  202. package/dist/{chunk-0m9w9esf.js → chunk-s19b0bc7.js} +46 -45
  203. package/dist/{chunk-wayfjcwt.js → chunk-sdfvr9ps.js} +4 -4
  204. package/dist/{chunk-fkhs3myp.js → chunk-sh2v9ywv.js} +5 -3
  205. package/dist/{chunk-1avzakfd.js → chunk-sjpqw47t.js} +3 -3
  206. package/dist/{chunk-7mqab3z7.js → chunk-skp5w8bq.js} +1 -1
  207. package/dist/{chunk-76j2e9vy.js → chunk-snxp8mxj.js} +2 -2
  208. package/dist/{chunk-vsqwd13w.js → chunk-ssb4wba6.js} +17 -19
  209. package/dist/{chunk-kva79cra.js → chunk-szzff973.js} +7 -5
  210. package/dist/{chunk-st73prx0.js → chunk-t1pygy19.js} +47 -46
  211. package/dist/{chunk-q1ah9nbq.js → chunk-t1s91wrk.js} +1 -1
  212. package/dist/{chunk-3skj4gfg.js → chunk-t3gmfcy7.js} +47 -46
  213. package/dist/{chunk-xw8pjerk.js → chunk-t9eeyrkn.js} +48 -47
  214. package/dist/{chunk-0jtbeesf.js → chunk-tf859h88.js} +16 -20
  215. package/dist/{chunk-denyma1s.js → chunk-thenr6b3.js} +14 -12
  216. package/dist/{chunk-234668cb.js → chunk-thmtkfgj.js} +5 -5
  217. package/dist/chunk-tj7v47cp.js +20 -0
  218. package/dist/{chunk-12k745vf.js → chunk-tpk67mjc.js} +3 -3
  219. package/dist/chunk-trvc6jh7.js +92 -0
  220. package/dist/{chunk-9v13f3gm.js → chunk-ttyfhx12.js} +524 -195
  221. package/dist/{chunk-q87kegxh.js → chunk-txgbs4hp.js} +49 -48
  222. package/dist/{chunk-25bwa70y.js → chunk-ty1cyqr7.js} +49 -48
  223. package/dist/{chunk-r6kaak61.js → chunk-v0tgjdx0.js} +16 -20
  224. package/dist/chunk-v3s93bzd.js +34 -0
  225. package/dist/{chunk-4cp6193g.js → chunk-v4t6dyyh.js} +2 -2
  226. package/dist/{chunk-fape0yfp.js → chunk-v4wba09w.js} +46 -45
  227. package/dist/{chunk-h02gcdx5.js → chunk-v5g8nf5h.js} +8 -8
  228. package/dist/{chunk-jtztm8f5.js → chunk-v6hbqcmr.js} +44 -43
  229. package/dist/{chunk-21gmrwhs.js → chunk-vajsk9ya.js} +17 -21
  230. package/dist/{chunk-8hpq2659.js → chunk-vbtm9g57.js} +1 -1
  231. package/dist/{chunk-q7e0106d.js → chunk-vk3nb2xe.js} +51 -56
  232. package/dist/{chunk-ad3v6mzw.js → chunk-vmbht6ec.js} +12 -12
  233. package/dist/{chunk-as5rvw4n.js → chunk-vmp5rk8q.js} +17 -21
  234. package/dist/{chunk-1x0y4426.js → chunk-vtmxgm1m.js} +4 -4
  235. package/dist/{chunk-pb92bj1h.js → chunk-vw5jzpcm.js} +6 -6
  236. package/dist/{chunk-5cem2v7n.js → chunk-vyz3v0qx.js} +5 -5
  237. package/dist/{chunk-hxzt3r84.js → chunk-w3782jck.js} +51 -50
  238. package/dist/{chunk-1vnd9s2j.js → chunk-w3gnkyfc.js} +57 -66
  239. package/dist/chunk-w6mcmmt5.js +1457 -0
  240. package/dist/chunk-wa0xgm6m.js +988 -0
  241. package/dist/{chunk-vrjbc8ap.js → chunk-wa8yn2p0.js} +1 -1
  242. package/dist/{chunk-hya4c599.js → chunk-wg47eg7y.js} +46 -45
  243. package/dist/{chunk-y7we499r.js → chunk-wgd4n1q7.js} +8 -8
  244. package/dist/{chunk-0g5cy3wj.js → chunk-wgk9sxk7.js} +4 -4
  245. package/dist/{chunk-wr3pd88n.js → chunk-wkt2q02c.js} +40 -9
  246. package/dist/{chunk-gbte7d7h.js → chunk-wm1zm5xj.js} +4 -2
  247. package/dist/{chunk-3hwa20vg.js → chunk-wtpgjmjd.js} +49 -46
  248. package/dist/{chunk-dbwmzvfj.js → chunk-wxkrq9eb.js} +46 -45
  249. package/dist/{chunk-d00mfc1e.js → chunk-x2bnzvd6.js} +46 -45
  250. package/dist/{chunk-2xbyb015.js → chunk-x3jthbjq.js} +47 -46
  251. package/dist/chunk-x7fdwq3d.js +33 -0
  252. package/dist/{chunk-zhk465tg.js → chunk-xcrzgyce.js} +46 -45
  253. package/dist/{chunk-chsyvavm.js → chunk-xeb6075z.js} +1 -1
  254. package/dist/{chunk-6ksdp40n.js → chunk-xffb3dsw.js} +1 -1
  255. package/dist/{chunk-2j3v2dgk.js → chunk-xgbd6ec5.js} +47 -46
  256. package/dist/{chunk-n7pnyq43.js → chunk-xhfmdq1y.js} +16 -0
  257. package/dist/{chunk-2v4x8kaq.js → chunk-xhn4ptjn.js} +51 -50
  258. package/dist/{chunk-w1sv7j01.js → chunk-xs7zsmzk.js} +46 -45
  259. package/dist/chunk-xswyz2es.js +118 -0
  260. package/dist/{chunk-ky39hkg1.js → chunk-xtdm6ejq.js} +9 -7
  261. package/dist/{chunk-hh3k5s1s.js → chunk-xvk90wpt.js} +3 -3
  262. package/dist/{chunk-5awgsvrw.js → chunk-xw99fqv1.js} +14 -6
  263. package/dist/{chunk-xnv6kb39.js → chunk-y32em34x.js} +22 -23
  264. package/dist/chunk-y5wfy524.js +94 -0
  265. package/dist/{chunk-fk8crdnk.js → chunk-ya9dxex0.js} +48 -46
  266. package/dist/{chunk-97wgdsab.js → chunk-z16txqz0.js} +3 -3
  267. package/dist/{chunk-yvtzznds.js → chunk-z6wm96eh.js} +2 -2
  268. package/dist/{chunk-nqrc7pc4.js → chunk-zcgprbyy.js} +29 -27
  269. package/dist/chunk-zqbnw3n2.js +197 -0
  270. package/dist/{chunk-d6rypdxt.js → chunk-zxywawr7.js} +1 -1
  271. package/dist/{chunk-jj5wj46b.js → chunk-zyjkg76f.js} +7 -7
  272. package/dist/cli.js +8 -8
  273. package/dist/gateway/index.js +326 -0
  274. package/dist/gateway/worker.js +482241 -0
  275. package/package.json +1 -1
  276. package/dist/chunk-11cz07kz.js +0 -93
  277. package/dist/chunk-1pbtp2z2.js +0 -92
  278. package/dist/chunk-25y2dtzf.js +0 -91
  279. package/dist/chunk-3hyj0zpy.js +0 -95
  280. package/dist/chunk-4kqjjakw.js +0 -73
  281. package/dist/chunk-4zwqbg7s.js +0 -87
  282. package/dist/chunk-5be33wja.js +0 -120
  283. package/dist/chunk-70mgxhkz.js +0 -369
  284. package/dist/chunk-7gmk09cq.js +0 -116
  285. package/dist/chunk-8dprcdra.js +0 -92
  286. package/dist/chunk-8xwx1xtg.js +0 -120
  287. package/dist/chunk-a579wjd2.js +0 -436
  288. package/dist/chunk-axqk3mxk.js +0 -116
  289. package/dist/chunk-c0ckmxr1.js +0 -86
  290. package/dist/chunk-c6t24y8q.js +0 -94
  291. package/dist/chunk-cfv996bs.js +0 -22
  292. package/dist/chunk-e5t5eefc.js +0 -62
  293. package/dist/chunk-eyph0250.js +0 -88
  294. package/dist/chunk-f825x57v.js +0 -91
  295. package/dist/chunk-h9xx5bj6.js +0 -91
  296. package/dist/chunk-j1dg659r.js +0 -89
  297. package/dist/chunk-jk8seqkk.js +0 -90
  298. package/dist/chunk-jzg4nddc.js +0 -92
  299. package/dist/chunk-k5vy0s3c.js +0 -93
  300. package/dist/chunk-ke820fjw.js +0 -91
  301. package/dist/chunk-kyzd4p8z.js +0 -111
  302. package/dist/chunk-njrt3tac.js +0 -640
  303. package/dist/chunk-pavb6a7w.js +0 -516
  304. package/dist/chunk-q268gpa0.js +0 -145
  305. package/dist/chunk-qvh1w3t7.js +0 -157
  306. package/dist/chunk-qy1es4jj.js +0 -95
  307. package/dist/chunk-qz2x630m.js +0 -49145
  308. package/dist/chunk-tw48evtr.js +0 -40
  309. package/dist/chunk-w0gfctyc.js +0 -117
  310. package/dist/chunk-y0fhjxef.js +0 -276
  311. package/dist/chunk-y275vgmw.js +0 -654
  312. package/dist/chunk-zq7pmdas.js +0 -1003
@@ -13,19 +13,19 @@ import {
13
13
  permissionPromptToolResultToPermissionDecision,
14
14
  processUserInput,
15
15
  reconcileMarketplaces
16
- } from "./chunk-0mej3p7q.js";
16
+ } from "./chunk-0txtpamh.js";
17
17
  import {
18
18
  detectAndUninstallDelistedPlugins
19
- } from "./chunk-xrpstt41.js";
19
+ } from "./chunk-hzbr9543.js";
20
20
  import {
21
21
  restoreAgentFromSession,
22
22
  restoreSessionStateFromLog,
23
23
  skillChangeDetector
24
- } from "./chunk-denyma1s.js";
25
- import"./chunk-hh3k5s1s.js";
24
+ } from "./chunk-thenr6b3.js";
25
+ import"./chunk-xvk90wpt.js";
26
26
  import {
27
27
  externalMetadataToAppState
28
- } from "./chunk-w05jpkkr.js";
28
+ } from "./chunk-hae34yd0.js";
29
29
  import {
30
30
  getSessionState,
31
31
  notifySessionMetadataChanged,
@@ -33,30 +33,39 @@ import {
33
33
  setPermissionModeChangedListener,
34
34
  setSessionMetadataChangedListener,
35
35
  setSessionStateChangedListener
36
- } from "./chunk-7n51wk9k.js";
36
+ } from "./chunk-1vp22nex.js";
37
37
  import {
38
- SSETransport,
39
- init_SSETransport
40
- } from "./chunk-a579wjd2.js";
38
+ init_settingsSync
39
+ } from "./chunk-vmbht6ec.js";
40
+ import {
41
+ init_refresh,
42
+ refreshActivePlugins
43
+ } from "./chunk-3e4r5pmc.js";
41
44
  import {
42
45
  init_toolPool,
43
46
  mergeAndFilterTools
44
- } from "./chunk-vvsbvz2b.js";
45
- import"./chunk-q1ah9nbq.js";
47
+ } from "./chunk-7skyagc2.js";
48
+ import"./chunk-t1s91wrk.js";
46
49
  import {
47
- init_settingsSync
48
- } from "./chunk-ad3v6mzw.js";
50
+ generateSessionTitle,
51
+ init_sessionTitle
52
+ } from "./chunk-r7684mmh.js";
49
53
  import {
50
- init_refresh,
51
- refreshActivePlugins
52
- } from "./chunk-2xvc97x4.js";
54
+ init_systemTheme,
55
+ resolveThemeSetting
56
+ } from "./chunk-cnsj3vq2.js";
53
57
  import {
54
58
  init_mappers,
55
59
  localCommandOutputToSDKAssistantMessage,
56
60
  toInternalMessages,
57
61
  toSDKCompactMetadata,
58
62
  toSDKRateLimitInfo
59
- } from "./chunk-23fkapww.js";
63
+ } from "./chunk-azv68vk1.js";
64
+ import {
65
+ checkGroveForNonInteractive,
66
+ init_grove,
67
+ isQualifiedForGrove
68
+ } from "./chunk-dexkgxt4.js";
60
69
  import {
61
70
  ChannelMessageNotificationSchema,
62
71
  findChannelEntry,
@@ -66,32 +75,23 @@ import {
66
75
  init_omit,
67
76
  omit_default,
68
77
  wrapChannelMessage
69
- } from "./chunk-69r3hm9b.js";
70
- import"./chunk-234668cb.js";
71
- import"./chunk-1x0y4426.js";
72
- import {
73
- generateSessionTitle,
74
- init_sessionTitle
75
- } from "./chunk-bm5rc541.js";
76
- import {
77
- init_systemTheme,
78
- resolveThemeSetting
79
- } from "./chunk-cnsj3vq2.js";
78
+ } from "./chunk-1hqb50ne.js";
79
+ import"./chunk-thmtkfgj.js";
80
+ import"./chunk-vtmxgm1m.js";
80
81
  import {
81
82
  collectContextData,
82
83
  init_context_noninteractive
83
- } from "./chunk-12k745vf.js";
84
+ } from "./chunk-tpk67mjc.js";
84
85
  import {
85
86
  init_sideQuestion,
86
87
  runSideQuestion
87
- } from "./chunk-6ksdp40n.js";
88
+ } from "./chunk-xffb3dsw.js";
88
89
  import"./chunk-rn0v1hk8.js";
89
90
  import {
90
91
  CircularBuffer,
91
92
  DEFAULT_OUTPUT_STYLE_NAME,
92
93
  EFFORT_LEVELS,
93
94
  EMPTY_USAGE,
94
- OAuthService,
95
95
  SHELL_TOOL_NAMES,
96
96
  SYNTHETIC_MESSAGES,
97
97
  SYNTHETIC_OUTPUT_TOOL_NAME,
@@ -104,7 +104,6 @@ import {
104
104
  assembleToolPool,
105
105
  atomicWriteToZipCache,
106
106
  categorizeRetryableAPIError,
107
- checkGroveForNonInteractive,
108
107
  cleanupSessionPluginCache,
109
108
  clearCommandsCache,
110
109
  clearMarketplacesCache,
@@ -180,7 +179,6 @@ import {
180
179
  init_abortController,
181
180
  init_applySettingsChange,
182
181
  init_auth as init_auth2,
183
- init_auth1 as init_auth3,
184
182
  init_changeDetector,
185
183
  init_claude,
186
184
  init_claudeAiLimits,
@@ -193,7 +191,6 @@ import {
193
191
  init_constants1 as init_constants3,
194
192
  init_context,
195
193
  init_conversationRecovery,
196
- init_cost_tracker,
197
194
  init_effort,
198
195
  init_elicitationHandler,
199
196
  init_errors as init_errors2,
@@ -205,7 +202,6 @@ import {
205
202
  init_framework,
206
203
  init_generators,
207
204
  init_gracefulShutdown,
208
- init_grove,
209
205
  init_headlessProfiler,
210
206
  init_hookEvents,
211
207
  init_hookHelpers,
@@ -219,7 +215,6 @@ import {
219
215
  init_messageQueueManager,
220
216
  init_messages1 as init_messages,
221
217
  init_modelOptions,
222
- init_oauth,
223
218
  init_outputStyles,
224
219
  init_outputsScanner,
225
220
  init_permissionSetup,
@@ -254,13 +249,12 @@ import {
254
249
  init_teammateMailbox,
255
250
  init_thinking,
256
251
  init_tools1 as init_tools,
257
- init_types2,
252
+ init_types1 as init_types2,
258
253
  init_uniqBy,
259
254
  init_utils,
260
255
  init_uuid,
261
256
  init_vscodeSdkMcp,
262
257
  init_zipCache,
263
- installOAuthTokens,
264
258
  isBackgroundTask,
265
259
  isBuiltInAgent,
266
260
  isBypassPermissionsModeDisabled,
@@ -268,7 +262,6 @@ import {
268
262
  isMcpServerDisabled,
269
263
  isPluginZipCacheEnabled,
270
264
  isPolicyAllowed,
271
- isQualifiedForGrove,
272
265
  isResultSuccessful,
273
266
  isScratchpadEnabled,
274
267
  isShutdownApproved,
@@ -332,13 +325,18 @@ import {
332
325
  unregisterSessionActivityCallback,
333
326
  updateUsage,
334
327
  validateUuid
335
- } from "./chunk-f2hbn5rk.js";
336
- import"./chunk-jpc9zwsk.js";
337
- import"./chunk-hwfknpxv.js";
338
- import"./chunk-4nspekjp.js";
328
+ } from "./chunk-93vwm44t.js";
329
+ import"./chunk-mcws22k3.js";
339
330
  import"./chunk-jzthz1bx.js";
331
+ import"./chunk-rz94yg8c.js";
332
+ import"./chunk-hwfknpxv.js";
340
333
  import"./chunk-1gx78081.js";
341
- import"./chunk-qcnhb4cd.js";
334
+ import"./chunk-ehtwnxpg.js";
335
+ import"./chunk-54wn2jdr.js";
336
+ import {
337
+ init_commitAttribution
338
+ } from "./chunk-wkt2q02c.js";
339
+ import"./chunk-87xg6yb4.js";
342
340
  import {
343
341
  hasActiveInProcessTeammates,
344
342
  hasWorkingInProcessTeammates,
@@ -349,16 +347,11 @@ import {
349
347
  removeTeammateFromTeamFile,
350
348
  unassignTeammateTasks,
351
349
  waitForTeammatesToBecomeIdle
352
- } from "./chunk-s7q42kp2.js";
350
+ } from "./chunk-2yxqz99n.js";
353
351
  import"./chunk-2gzv8nrw.js";
354
- import"./chunk-ehtwnxpg.js";
355
- import {
356
- init_commitAttribution
357
- } from "./chunk-wr3pd88n.js";
358
- import"./chunk-wayfjcwt.js";
352
+ import"./chunk-sdfvr9ps.js";
359
353
  import"./chunk-cgfdkzhb.js";
360
- import"./chunk-bxcfz5gy.js";
361
- import"./chunk-y0fhjxef.js";
354
+ import"./chunk-xswyz2es.js";
362
355
  import {
363
356
  READ_FILE_STATE_CACHE_SIZE,
364
357
  cloneFileStateCache,
@@ -366,51 +359,75 @@ import {
366
359
  init_fileStateCache,
367
360
  mergeFileStateCaches
368
361
  } from "./chunk-j5bth84e.js";
369
- import"./chunk-nk82j7r2.js";
370
- import"./chunk-68ffk5qa.js";
362
+ import"./chunk-b6prbsae.js";
371
363
  import"./chunk-ps49ymvj.js";
364
+ import"./chunk-68ffk5qa.js";
365
+ import {
366
+ init_betas,
367
+ init_cost_tracker,
368
+ modelSupportsAutoMode
369
+ } from "./chunk-ratnrv9v.js";
370
+ import {
371
+ ensureModelStringsInitialized,
372
+ getAPIProvider,
373
+ getDefaultMainLoopModel,
374
+ getFastModeState,
375
+ getMainLoopModel,
376
+ init_fastMode,
377
+ init_model,
378
+ init_modelStrings,
379
+ init_providers,
380
+ isFastModeAvailable,
381
+ isFastModeEnabled,
382
+ isFastModeSupportedByModel,
383
+ modelDisplayString,
384
+ parseUserSpecifiedModel
385
+ } from "./chunk-7cje7scj.js";
386
+ import {
387
+ createAxiosInstance,
388
+ getWebSocketProxyAgent,
389
+ getWebSocketProxyUrl,
390
+ getWebSocketTLSOptions,
391
+ init_mtls,
392
+ init_proxy
393
+ } from "./chunk-7krg0dkt.js";
394
+ import"./chunk-kxrrtr3p.js";
372
395
  import"./chunk-p7vkh4wx.js";
373
- import"./chunk-bmbq6nt1.js";
374
- import"./chunk-yc23zxmj.js";
375
- import"./chunk-njrt3tac.js";
376
- import"./chunk-m87bhhqv.js";
377
- import"./chunk-xwg327ys.js";
378
- import"./chunk-xz655xxa.js";
379
- import"./chunk-c11swzas.js";
380
- import"./chunk-chsyvavm.js";
381
- import"./chunk-5rv9c8yd.js";
396
+ import"./chunk-6wzg2hpc.js";
397
+ import"./chunk-9w114071.js";
398
+ import"./chunk-3pzwd6qq.js";
399
+ import"./chunk-2vteceqh.js";
400
+ import"./chunk-xeb6075z.js";
401
+ import"./chunk-nrjtxhyr.js";
402
+ import {
403
+ ElicitRequestSchema,
404
+ ElicitationCompleteNotificationSchema,
405
+ init_types
406
+ } from "./chunk-v4t6dyyh.js";
407
+ import"./chunk-2vbash3m.js";
408
+ import"./chunk-bzatg35k.js";
382
409
  import {
383
410
  AGENT_TOOL_NAME,
384
411
  KnownMarketplacesFileSchema,
385
412
  LEGACY_AGENT_TOOL_NAME,
386
413
  TASK_STOP_TOOL_NAME,
387
414
  WORKLOAD_CRON,
388
- ensureModelStringsInitialized,
389
- getAPIProvider,
390
415
  getAccountInformation,
391
416
  getAnthropicApiKeyWithSource,
392
417
  getClaudeCodeUserAgent,
393
- getDefaultMainLoopModel,
394
- getFastModeState,
395
418
  getFeatureValue_CACHED_MAY_BE_STALE,
396
419
  getGlobalConfig,
397
- getMainLoopModel,
398
420
  getMcpPrefix,
399
421
  getSettingsWithSources,
400
422
  getSettings_DEPRECATED,
401
423
  hasAutoMemPathOverride,
402
424
  init_auth,
403
- init_betas1 as init_betas,
404
425
  init_config,
405
426
  init_constants1 as init_constants,
406
- init_fastMode,
407
427
  init_growthbook,
408
428
  init_mcpStringUtils,
409
- init_model,
410
- init_modelStrings,
411
429
  init_paths,
412
430
  init_prompt,
413
- init_providers,
414
431
  init_schemas,
415
432
  init_settings1 as init_settings,
416
433
  init_stringUtils,
@@ -418,55 +435,35 @@ import {
418
435
  init_workloadContext,
419
436
  initializeGrowthBook,
420
437
  isExtractModeActive,
421
- isFastModeAvailable,
422
- isFastModeEnabled,
423
- isFastModeSupportedByModel,
424
- modelDisplayString,
425
- modelSupportsAutoMode,
426
- parseUserSpecifiedModel,
427
438
  runWithWorkload
428
- } from "./chunk-e7efcp3k.js";
439
+ } from "./chunk-qctsv1d7.js";
429
440
  import {
430
441
  init_json,
431
442
  safeParseJSON
432
- } from "./chunk-z19sd3bt.js";
443
+ } from "./chunk-p4196wzm.js";
433
444
  import {
434
445
  expandPath,
435
446
  init_path
436
- } from "./chunk-1ax1znzj.js";
447
+ } from "./chunk-7hrmxpha.js";
437
448
  import {
438
449
  init_array,
439
450
  uniq
440
451
  } from "./chunk-6nsd9606.js";
441
- import"./chunk-xp61y5ba.js";
452
+ import"./chunk-rkv8bdtr.js";
442
453
  import"./chunk-64c1avct.js";
443
- import {
444
- createAxiosInstance,
445
- getWebSocketProxyAgent,
446
- getWebSocketProxyUrl,
447
- getWebSocketTLSOptions,
448
- init_mtls,
449
- init_proxy
450
- } from "./chunk-wha6v7za.js";
451
454
  import {
452
455
  init_sleep,
453
456
  sleep
454
457
  } from "./chunk-8g5pe1gr.js";
455
- import {
456
- ElicitRequestSchema,
457
- ElicitationCompleteNotificationSchema,
458
- init_types
459
- } from "./chunk-4cp6193g.js";
460
- import"./chunk-8g747a8x.js";
461
- import"./chunk-d7886r6a.js";
462
- import"./chunk-yvtzznds.js";
458
+ import"./chunk-4pbx3g7s.js";
459
+ import"./chunk-26wtxbdc.js";
460
+ import"./chunk-z6wm96eh.js";
463
461
  import"./chunk-4jm600zv.js";
464
- import"./chunk-qz2x630m.js";
465
- import"./chunk-2f21meep.js";
466
- import"./chunk-nrtksr2p.js";
462
+ import"./chunk-1v01c96r.js";
463
+ import"./chunk-8b2y3x7a.js";
467
464
  import"./chunk-3c25bcsw.js";
468
- import"./chunk-s3hsqf80.js";
469
- import"./chunk-yyf72f78.js";
465
+ import"./chunk-cexw1jmv.js";
466
+ import"./chunk-j35mw64g.js";
470
467
  import"./chunk-cdz5yb0r.js";
471
468
  import {
472
469
  init_strip_ansi,
@@ -479,15 +476,15 @@ import {
479
476
  init_analytics,
480
477
  logEvent
481
478
  } from "./chunk-x8d2ehd7.js";
482
- import"./chunk-15m49c67.js";
479
+ import"./chunk-3e28fvn0.js";
483
480
  import {
484
481
  init_diagLogs,
485
482
  logForDiagnosticsNoPII,
486
483
  withDiagnosticsTiming
487
- } from "./chunk-tdbz9gbm.js";
488
- import"./chunk-0awwmrwr.js";
484
+ } from "./chunk-kjqyhxz7.js";
485
+ import"./chunk-4ayjwyqj.js";
489
486
  import"./chunk-qnfx3qtx.js";
490
- import"./chunk-70eey1nh.js";
487
+ import"./chunk-40s88wdg.js";
491
488
  import {
492
489
  LOCAL_COMMAND_STDERR_TAG,
493
490
  LOCAL_COMMAND_STDOUT_TAG,
@@ -497,13 +494,13 @@ import {
497
494
  init_xml,
498
495
  logError,
499
496
  logMCPDebug
500
- } from "./chunk-1nk93fqz.js";
497
+ } from "./chunk-5cxjxxx8.js";
501
498
  import {
502
499
  getCwd,
503
500
  init_cwd
504
501
  } from "./chunk-s8kj6ajy.js";
505
- import"./chunk-eenq3avg.js";
506
- import"./chunk-7mqab3z7.js";
502
+ import"./chunk-qcrpqjya.js";
503
+ import"./chunk-skp5w8bq.js";
507
504
  import"./chunk-5z28bqne.js";
508
505
  import"./chunk-qajrkk97.js";
509
506
  import {
@@ -521,18 +518,18 @@ import {
521
518
  logForDebugging,
522
519
  registerCleanup,
523
520
  toError
524
- } from "./chunk-phd1qfpc.js";
525
- import {
526
- init_process,
527
- registerProcessOutputErrorHandlers,
528
- writeToStdout
529
- } from "./chunk-fbv4apne.js";
521
+ } from "./chunk-pd2vy8hx.js";
530
522
  import {
531
523
  init_envUtils,
532
524
  isBareMode,
533
525
  isEnvDefinedFalsy,
534
526
  isEnvTruthy
535
- } from "./chunk-jaaxk89e.js";
527
+ } from "./chunk-nsc89h0n.js";
528
+ import {
529
+ init_process,
530
+ registerProcessOutputErrorHandlers,
531
+ writeToStdout
532
+ } from "./chunk-fbv4apne.js";
536
533
  import {
537
534
  getAllowedChannels,
538
535
  getFlagSettingsInline,
@@ -1344,8 +1341,412 @@ class CCRClient {
1344
1341
  }
1345
1342
  }
1346
1343
 
1347
- // src/cli/remoteIO.ts
1348
- init_SSETransport();
1344
+ // src/cli/transports/SSETransport.ts
1345
+ init_axios();
1346
+ init_debug();
1347
+ init_diagLogs();
1348
+ init_errors();
1349
+ init_sessionIngressAuth();
1350
+ init_sleep();
1351
+ init_slowOperations();
1352
+ init_userAgent();
1353
+ var RECONNECT_BASE_DELAY_MS = 1000;
1354
+ var RECONNECT_MAX_DELAY_MS = 30000;
1355
+ var RECONNECT_GIVE_UP_MS = 600000;
1356
+ var LIVENESS_TIMEOUT_MS = 45000;
1357
+ var PERMANENT_HTTP_CODES = new Set([401, 403, 404]);
1358
+ var POST_MAX_RETRIES = 10;
1359
+ var POST_BASE_DELAY_MS = 500;
1360
+ var POST_MAX_DELAY_MS = 8000;
1361
+ var STREAM_DECODE_OPTS = { stream: true };
1362
+ function alwaysValidStatus2() {
1363
+ return true;
1364
+ }
1365
+ function parseSSEFrames(buffer) {
1366
+ const frames = [];
1367
+ let pos = 0;
1368
+ const frameDelimiter = /\r?\n\r?\n/g;
1369
+ frameDelimiter.lastIndex = pos;
1370
+ let delimiterMatch;
1371
+ while ((delimiterMatch = frameDelimiter.exec(buffer)) !== null) {
1372
+ const frameEnd = delimiterMatch.index;
1373
+ const rawFrame = buffer.slice(pos, frameEnd);
1374
+ pos = frameEnd + delimiterMatch[0].length;
1375
+ if (!rawFrame.trim())
1376
+ continue;
1377
+ const frame = {};
1378
+ let isComment = false;
1379
+ for (const rawLine of rawFrame.split(`
1380
+ `)) {
1381
+ const line = rawLine[rawLine.length - 1] === "\r" ? rawLine.slice(0, -1) : rawLine;
1382
+ if (line.startsWith(":")) {
1383
+ isComment = true;
1384
+ continue;
1385
+ }
1386
+ const colonIdx = line.indexOf(":");
1387
+ if (colonIdx === -1)
1388
+ continue;
1389
+ const field = line.slice(0, colonIdx);
1390
+ const value = line[colonIdx + 1] === " " ? line.slice(colonIdx + 2) : line.slice(colonIdx + 1);
1391
+ switch (field) {
1392
+ case "event":
1393
+ frame.event = value;
1394
+ break;
1395
+ case "id":
1396
+ frame.id = value;
1397
+ break;
1398
+ case "data":
1399
+ frame.data = frame.data ? frame.data + `
1400
+ ` + value : value;
1401
+ break;
1402
+ }
1403
+ }
1404
+ if (frame.data || isComment) {
1405
+ frames.push(frame);
1406
+ }
1407
+ }
1408
+ return { frames, remaining: buffer.slice(pos) };
1409
+ }
1410
+
1411
+ class SSETransport {
1412
+ url;
1413
+ state = "idle";
1414
+ onData;
1415
+ onCloseCallback;
1416
+ onEventCallback;
1417
+ headers;
1418
+ sessionId;
1419
+ refreshHeaders;
1420
+ getAuthHeaders;
1421
+ abortController = null;
1422
+ lastSequenceNum = 0;
1423
+ seenSequenceNums = new Set;
1424
+ reconnectAttempts = 0;
1425
+ reconnectStartTime = null;
1426
+ reconnectTimer = null;
1427
+ livenessTimer = null;
1428
+ postUrl;
1429
+ constructor(url, headers = {}, sessionId, refreshHeaders, initialSequenceNum, getAuthHeaders) {
1430
+ this.url = url;
1431
+ this.headers = headers;
1432
+ this.sessionId = sessionId;
1433
+ this.refreshHeaders = refreshHeaders;
1434
+ this.getAuthHeaders = getAuthHeaders ?? getSessionIngressAuthHeaders;
1435
+ this.postUrl = convertSSEUrlToPostUrl(url);
1436
+ if (initialSequenceNum !== undefined && initialSequenceNum > 0) {
1437
+ this.lastSequenceNum = initialSequenceNum;
1438
+ }
1439
+ logForDebugging(`SSETransport: SSE URL = ${url.href}`);
1440
+ logForDebugging(`SSETransport: POST URL = ${this.postUrl}`);
1441
+ logForDiagnosticsNoPII("info", "cli_sse_transport_initialized");
1442
+ }
1443
+ getLastSequenceNum() {
1444
+ return this.lastSequenceNum;
1445
+ }
1446
+ async connect() {
1447
+ if (this.state !== "idle" && this.state !== "reconnecting") {
1448
+ logForDebugging(`SSETransport: Cannot connect, current state is ${this.state}`, { level: "error" });
1449
+ logForDiagnosticsNoPII("error", "cli_sse_connect_failed");
1450
+ return;
1451
+ }
1452
+ this.state = "reconnecting";
1453
+ const connectStartTime = Date.now();
1454
+ const sseUrl = new URL(this.url.href);
1455
+ if (this.lastSequenceNum > 0) {
1456
+ sseUrl.searchParams.set("from_sequence_num", String(this.lastSequenceNum));
1457
+ }
1458
+ const authHeaders = this.getAuthHeaders();
1459
+ const headers = {
1460
+ ...this.headers,
1461
+ ...authHeaders,
1462
+ Accept: "text/event-stream",
1463
+ "anthropic-version": "2023-06-01",
1464
+ "User-Agent": getClaudeCodeUserAgent()
1465
+ };
1466
+ if (authHeaders["Cookie"]) {
1467
+ delete headers["Authorization"];
1468
+ }
1469
+ if (this.lastSequenceNum > 0) {
1470
+ headers["Last-Event-ID"] = String(this.lastSequenceNum);
1471
+ }
1472
+ logForDebugging(`SSETransport: Opening ${sseUrl.href}`);
1473
+ logForDiagnosticsNoPII("info", "cli_sse_connect_opening");
1474
+ this.abortController = new AbortController;
1475
+ try {
1476
+ const response = await fetch(sseUrl.href, {
1477
+ headers,
1478
+ signal: this.abortController.signal
1479
+ });
1480
+ if (!response.ok) {
1481
+ const isPermanent = PERMANENT_HTTP_CODES.has(response.status);
1482
+ logForDebugging(`SSETransport: HTTP ${response.status}${isPermanent ? " (permanent)" : ""}`, { level: "error" });
1483
+ logForDiagnosticsNoPII("error", "cli_sse_connect_http_error", {
1484
+ status: response.status
1485
+ });
1486
+ if (isPermanent) {
1487
+ this.state = "closed";
1488
+ this.onCloseCallback?.(response.status);
1489
+ return;
1490
+ }
1491
+ this.handleConnectionError();
1492
+ return;
1493
+ }
1494
+ if (!response.body) {
1495
+ logForDebugging("SSETransport: No response body");
1496
+ this.handleConnectionError();
1497
+ return;
1498
+ }
1499
+ const connectDuration = Date.now() - connectStartTime;
1500
+ logForDebugging("SSETransport: Connected");
1501
+ logForDiagnosticsNoPII("info", "cli_sse_connect_connected", {
1502
+ duration_ms: connectDuration
1503
+ });
1504
+ this.state = "connected";
1505
+ this.reconnectAttempts = 0;
1506
+ this.reconnectStartTime = null;
1507
+ this.resetLivenessTimer();
1508
+ await this.readStream(response.body);
1509
+ } catch (error) {
1510
+ if (this.abortController?.signal.aborted) {
1511
+ return;
1512
+ }
1513
+ logForDebugging(`SSETransport: Connection error: ${errorMessage(error)}`, { level: "error" });
1514
+ logForDiagnosticsNoPII("error", "cli_sse_connect_error");
1515
+ this.handleConnectionError();
1516
+ }
1517
+ }
1518
+ async readStream(body) {
1519
+ const reader = body.getReader();
1520
+ const decoder = new TextDecoder;
1521
+ let buffer = "";
1522
+ try {
1523
+ while (true) {
1524
+ const { done, value } = await reader.read();
1525
+ if (done)
1526
+ break;
1527
+ buffer += decoder.decode(value, STREAM_DECODE_OPTS);
1528
+ const { frames, remaining } = parseSSEFrames(buffer);
1529
+ buffer = remaining;
1530
+ for (const frame of frames) {
1531
+ this.resetLivenessTimer();
1532
+ if (frame.id) {
1533
+ const seqNum = parseInt(frame.id, 10);
1534
+ if (!isNaN(seqNum)) {
1535
+ if (this.seenSequenceNums.has(seqNum)) {
1536
+ logForDebugging(`SSETransport: DUPLICATE frame seq=${seqNum} (lastSequenceNum=${this.lastSequenceNum}, seenCount=${this.seenSequenceNums.size})`, { level: "warn" });
1537
+ logForDiagnosticsNoPII("warn", "cli_sse_duplicate_sequence");
1538
+ } else {
1539
+ this.seenSequenceNums.add(seqNum);
1540
+ if (this.seenSequenceNums.size > 1000) {
1541
+ const threshold = this.lastSequenceNum - 200;
1542
+ for (const s of this.seenSequenceNums) {
1543
+ if (s < threshold) {
1544
+ this.seenSequenceNums.delete(s);
1545
+ }
1546
+ }
1547
+ }
1548
+ }
1549
+ if (seqNum > this.lastSequenceNum) {
1550
+ this.lastSequenceNum = seqNum;
1551
+ }
1552
+ }
1553
+ }
1554
+ if (frame.event && frame.data) {
1555
+ this.handleSSEFrame(frame.event, frame.data);
1556
+ } else if (frame.data) {
1557
+ logForDebugging("SSETransport: Frame has data: but no event: field \u2014 dropped", { level: "warn" });
1558
+ logForDiagnosticsNoPII("warn", "cli_sse_frame_missing_event_field");
1559
+ }
1560
+ }
1561
+ }
1562
+ } catch (error) {
1563
+ if (this.abortController?.signal.aborted)
1564
+ return;
1565
+ logForDebugging(`SSETransport: Stream read error: ${errorMessage(error)}`, { level: "error" });
1566
+ logForDiagnosticsNoPII("error", "cli_sse_stream_read_error");
1567
+ } finally {
1568
+ reader.releaseLock();
1569
+ }
1570
+ if (this.state !== "closing" && this.state !== "closed") {
1571
+ logForDebugging("SSETransport: Stream ended, reconnecting");
1572
+ this.handleConnectionError();
1573
+ }
1574
+ }
1575
+ handleSSEFrame(eventType, data) {
1576
+ if (eventType !== "client_event") {
1577
+ logForDebugging(`SSETransport: Unexpected SSE event type '${eventType}' on worker stream`, { level: "warn" });
1578
+ logForDiagnosticsNoPII("warn", "cli_sse_unexpected_event_type", {
1579
+ event_type: eventType
1580
+ });
1581
+ return;
1582
+ }
1583
+ let ev;
1584
+ try {
1585
+ ev = jsonParse(data);
1586
+ } catch (error) {
1587
+ logForDebugging(`SSETransport: Failed to parse client_event data: ${errorMessage(error)}`, { level: "error" });
1588
+ return;
1589
+ }
1590
+ const payload = ev.payload;
1591
+ if (payload && typeof payload === "object" && "type" in payload) {
1592
+ const sessionLabel = this.sessionId ? ` session=${this.sessionId}` : "";
1593
+ logForDebugging(`SSETransport: Event seq=${ev.sequence_num} event_id=${ev.event_id} event_type=${ev.event_type} payload_type=${String(payload.type)}${sessionLabel}`);
1594
+ logForDiagnosticsNoPII("info", "cli_sse_message_received");
1595
+ this.onData?.(jsonStringify(payload) + `
1596
+ `);
1597
+ } else {
1598
+ logForDebugging(`SSETransport: Ignoring client_event with no type in payload: event_id=${ev.event_id}`);
1599
+ }
1600
+ this.onEventCallback?.(ev);
1601
+ }
1602
+ handleConnectionError() {
1603
+ this.clearLivenessTimer();
1604
+ if (this.state === "closing" || this.state === "closed")
1605
+ return;
1606
+ this.abortController?.abort();
1607
+ this.abortController = null;
1608
+ const now = Date.now();
1609
+ if (!this.reconnectStartTime) {
1610
+ this.reconnectStartTime = now;
1611
+ }
1612
+ const elapsed = now - this.reconnectStartTime;
1613
+ if (elapsed < RECONNECT_GIVE_UP_MS) {
1614
+ if (this.reconnectTimer) {
1615
+ clearTimeout(this.reconnectTimer);
1616
+ this.reconnectTimer = null;
1617
+ }
1618
+ if (this.refreshHeaders) {
1619
+ const freshHeaders = this.refreshHeaders();
1620
+ Object.assign(this.headers, freshHeaders);
1621
+ logForDebugging("SSETransport: Refreshed headers for reconnect");
1622
+ }
1623
+ this.state = "reconnecting";
1624
+ this.reconnectAttempts++;
1625
+ const baseDelay = Math.min(RECONNECT_BASE_DELAY_MS * Math.pow(2, this.reconnectAttempts - 1), RECONNECT_MAX_DELAY_MS);
1626
+ const delay = Math.max(0, baseDelay + baseDelay * 0.25 * (2 * Math.random() - 1));
1627
+ logForDebugging(`SSETransport: Reconnecting in ${Math.round(delay)}ms (attempt ${this.reconnectAttempts}, ${Math.round(elapsed / 1000)}s elapsed)`);
1628
+ logForDiagnosticsNoPII("error", "cli_sse_reconnect_attempt", {
1629
+ reconnectAttempts: this.reconnectAttempts
1630
+ });
1631
+ this.reconnectTimer = setTimeout(() => {
1632
+ this.reconnectTimer = null;
1633
+ this.connect();
1634
+ }, delay);
1635
+ } else {
1636
+ logForDebugging(`SSETransport: Reconnection time budget exhausted after ${Math.round(elapsed / 1000)}s`, { level: "error" });
1637
+ logForDiagnosticsNoPII("error", "cli_sse_reconnect_exhausted", {
1638
+ reconnectAttempts: this.reconnectAttempts,
1639
+ elapsedMs: elapsed
1640
+ });
1641
+ this.state = "closed";
1642
+ this.onCloseCallback?.();
1643
+ }
1644
+ }
1645
+ onLivenessTimeout = () => {
1646
+ this.livenessTimer = null;
1647
+ logForDebugging("SSETransport: Liveness timeout, reconnecting", {
1648
+ level: "error"
1649
+ });
1650
+ logForDiagnosticsNoPII("error", "cli_sse_liveness_timeout");
1651
+ this.abortController?.abort();
1652
+ this.handleConnectionError();
1653
+ };
1654
+ resetLivenessTimer() {
1655
+ this.clearLivenessTimer();
1656
+ this.livenessTimer = setTimeout(this.onLivenessTimeout, LIVENESS_TIMEOUT_MS);
1657
+ }
1658
+ clearLivenessTimer() {
1659
+ if (this.livenessTimer) {
1660
+ clearTimeout(this.livenessTimer);
1661
+ this.livenessTimer = null;
1662
+ }
1663
+ }
1664
+ async write(message) {
1665
+ const authHeaders = this.getAuthHeaders();
1666
+ if (Object.keys(authHeaders).length === 0) {
1667
+ logForDebugging("SSETransport: No session token available for POST");
1668
+ logForDiagnosticsNoPII("warn", "cli_sse_post_no_token");
1669
+ return;
1670
+ }
1671
+ const headers = {
1672
+ ...authHeaders,
1673
+ "Content-Type": "application/json",
1674
+ "anthropic-version": "2023-06-01",
1675
+ "User-Agent": getClaudeCodeUserAgent()
1676
+ };
1677
+ logForDebugging(`SSETransport: POST body keys=${Object.keys(message).join(",")}`);
1678
+ for (let attempt = 1;attempt <= POST_MAX_RETRIES; attempt++) {
1679
+ try {
1680
+ const response = await axios_default.post(this.postUrl, message, {
1681
+ headers,
1682
+ validateStatus: alwaysValidStatus2
1683
+ });
1684
+ if (response.status === 200 || response.status === 201) {
1685
+ logForDebugging(`SSETransport: POST success type=${message.type}`);
1686
+ return;
1687
+ }
1688
+ logForDebugging(`SSETransport: POST ${response.status} body=${jsonStringify(response.data).slice(0, 200)}`);
1689
+ if (response.status >= 400 && response.status < 500 && response.status !== 429) {
1690
+ logForDebugging(`SSETransport: POST returned ${response.status} (client error), not retrying`);
1691
+ logForDiagnosticsNoPII("warn", "cli_sse_post_client_error", {
1692
+ status: response.status
1693
+ });
1694
+ return;
1695
+ }
1696
+ logForDebugging(`SSETransport: POST returned ${response.status}, attempt ${attempt}/${POST_MAX_RETRIES}`);
1697
+ logForDiagnosticsNoPII("warn", "cli_sse_post_retryable_error", {
1698
+ status: response.status,
1699
+ attempt
1700
+ });
1701
+ } catch (error) {
1702
+ const axiosError = error;
1703
+ logForDebugging(`SSETransport: POST error: ${axiosError.message}, attempt ${attempt}/${POST_MAX_RETRIES}`);
1704
+ logForDiagnosticsNoPII("warn", "cli_sse_post_network_error", {
1705
+ attempt
1706
+ });
1707
+ }
1708
+ if (attempt === POST_MAX_RETRIES) {
1709
+ logForDebugging(`SSETransport: POST failed after ${POST_MAX_RETRIES} attempts, continuing`);
1710
+ logForDiagnosticsNoPII("warn", "cli_sse_post_retries_exhausted");
1711
+ return;
1712
+ }
1713
+ const delayMs = Math.min(POST_BASE_DELAY_MS * Math.pow(2, attempt - 1), POST_MAX_DELAY_MS);
1714
+ await sleep(delayMs);
1715
+ }
1716
+ }
1717
+ isConnectedStatus() {
1718
+ return this.state === "connected";
1719
+ }
1720
+ isClosedStatus() {
1721
+ return this.state === "closed";
1722
+ }
1723
+ setOnData(callback) {
1724
+ this.onData = callback;
1725
+ }
1726
+ setOnClose(callback) {
1727
+ this.onCloseCallback = callback;
1728
+ }
1729
+ setOnEvent(callback) {
1730
+ this.onEventCallback = callback;
1731
+ }
1732
+ close() {
1733
+ if (this.reconnectTimer) {
1734
+ clearTimeout(this.reconnectTimer);
1735
+ this.reconnectTimer = null;
1736
+ }
1737
+ this.clearLivenessTimer();
1738
+ this.state = "closing";
1739
+ this.abortController?.abort();
1740
+ this.abortController = null;
1741
+ }
1742
+ }
1743
+ function convertSSEUrlToPostUrl(sseUrl) {
1744
+ let pathname = sseUrl.pathname;
1745
+ if (pathname.endsWith("/stream")) {
1746
+ pathname = pathname.slice(0, -"/stream".length);
1747
+ }
1748
+ return `${sseUrl.protocol}//${sseUrl.host}${pathname}`;
1749
+ }
1349
1750
 
1350
1751
  // src/cli/transports/transportUtils.ts
1351
1752
  init_envUtils();
@@ -1990,7 +2391,6 @@ function convertWsUrlToPostUrl(wsUrl) {
1990
2391
  }
1991
2392
 
1992
2393
  // src/cli/transports/transportUtils.ts
1993
- init_SSETransport();
1994
2394
  function getTransportForUrl(url, headers = {}, sessionId, refreshHeaders) {
1995
2395
  if (isEnvTruthy(process.env.CLAUDE_CODE_USE_CCR_V2)) {
1996
2396
  const sseUrl = new URL2(url.href);
@@ -2449,6 +2849,7 @@ class QueryEngine {
2449
2849
  this.totalUsage = EMPTY_USAGE;
2450
2850
  }
2451
2851
  async* submitMessage(prompt, options) {
2852
+ this.abortController = createAbortController();
2452
2853
  const {
2453
2854
  cwd,
2454
2855
  commands,
@@ -3254,8 +3655,6 @@ init_permissionSetup();
3254
3655
  init_promptSuggestion();
3255
3656
  init_forkedAgent();
3256
3657
  init_auth();
3257
- init_oauth();
3258
- init_auth3();
3259
3658
  init_providers();
3260
3659
  init_state();
3261
3660
  init_SyntheticOutputTool();
@@ -4272,7 +4671,7 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
4272
4671
  }
4273
4672
  pluginInstallPromise = null;
4274
4673
  await refreshPluginState();
4275
- const { setupPluginHookHotReload } = await import("./chunk-ya40p6vj.js");
4674
+ const { setupPluginHookHotReload } = await import("./chunk-b89ese8r.js");
4276
4675
  setupPluginHookHotReload();
4277
4676
  }
4278
4677
  const isMainThread = (cmd) => cmd.agentId === undefined;
@@ -5191,76 +5590,6 @@ ${m.text}
5191
5590
  } else {
5192
5591
  sendControlResponseError(message, `No active OAuth flow for server: ${serverName}`);
5193
5592
  }
5194
- } else if (message.request.subtype === "claude_authenticate") {
5195
- const { loginWithClaudeAi } = message.request;
5196
- claudeOAuth?.service.cleanup();
5197
- logEvent("tengu_oauth_flow_start", {
5198
- loginWithClaudeAi: loginWithClaudeAi ?? true
5199
- });
5200
- const service = new OAuthService;
5201
- let urlResolver;
5202
- const urlPromise = new Promise((resolve) => {
5203
- urlResolver = resolve;
5204
- });
5205
- const flow = service.startOAuthFlow(async (manualUrl, automaticUrl) => {
5206
- urlResolver({ manualUrl, automaticUrl });
5207
- }, {
5208
- loginWithClaudeAi: loginWithClaudeAi ?? true,
5209
- skipBrowserOpen: true
5210
- }).then(async (tokens) => {
5211
- await installOAuthTokens(tokens);
5212
- logEvent("tengu_oauth_success", {
5213
- loginWithClaudeAi: loginWithClaudeAi ?? true
5214
- });
5215
- }).finally(() => {
5216
- service.cleanup();
5217
- if (claudeOAuth?.service === service) {
5218
- claudeOAuth = null;
5219
- }
5220
- });
5221
- claudeOAuth = { service, flow };
5222
- flow.catch((err) => logForDebugging(`claude_authenticate flow ended: ${err}`, {
5223
- level: "info"
5224
- }));
5225
- try {
5226
- const { manualUrl, automaticUrl } = await Promise.race([
5227
- urlPromise,
5228
- flow.then(() => {
5229
- throw new Error("OAuth flow completed without producing auth URLs");
5230
- })
5231
- ]);
5232
- sendControlResponseSuccess(message, {
5233
- manualUrl,
5234
- automaticUrl
5235
- });
5236
- } catch (error) {
5237
- sendControlResponseError(message, errorMessage(error));
5238
- }
5239
- } else if (message.request.subtype === "claude_oauth_callback" || message.request.subtype === "claude_oauth_wait_for_completion") {
5240
- if (!claudeOAuth) {
5241
- sendControlResponseError(message, "No active claude_authenticate flow");
5242
- } else {
5243
- if (message.request.subtype === "claude_oauth_callback") {
5244
- claudeOAuth.service.handleManualAuthCodeInput({
5245
- authorizationCode: message.request.authorizationCode,
5246
- state: message.request.state
5247
- });
5248
- }
5249
- const { flow } = claudeOAuth;
5250
- flow.then(() => {
5251
- const accountInfo = getAccountInformation();
5252
- sendControlResponseSuccess(message, {
5253
- account: {
5254
- email: accountInfo?.email,
5255
- organization: accountInfo?.organization,
5256
- subscriptionType: accountInfo?.subscription,
5257
- tokenSource: accountInfo?.tokenSource,
5258
- apiKeySource: accountInfo?.apiKeySource,
5259
- apiProvider: getAPIProvider()
5260
- }
5261
- });
5262
- }, (error) => sendControlResponseError(message, errorMessage(error)));
5263
- }
5264
5593
  } else if (message.request.subtype === "mcp_clear_auth") {
5265
5594
  const { serverName } = message.request;
5266
5595
  const currentAppState = getAppState();
@@ -6017,7 +6346,7 @@ async function loadInitialMessages(setAppState, options) {
6017
6346
  processMessagesForTeleportResume,
6018
6347
  teleportResumeCodeSession,
6019
6348
  validateGitState
6020
- } = await import("./chunk-cdj51xbj.js");
6349
+ } = await import("./chunk-9byfzaeq.js");
6021
6350
  await validateGitState();
6022
6351
  const teleportResult = await teleportResumeCodeSession(options.teleport);
6023
6352
  const { branchError } = await checkOutTeleportedSessionBranch(teleportResult.branch);