@qitqode/qitqode-android-arm64 0.2.6 → 0.2.7

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 (410) hide show
  1. package/bundle/{chunk-ztyy3ga3.js → chunk-01e3v1xz.js} +2 -2
  2. package/bundle/{chunk-p54bzjtv.js → chunk-060wbpz4.js} +1 -1
  3. package/bundle/{chunk-ypdt9mmr.js → chunk-0am156m5.js} +2 -2
  4. package/bundle/{chunk-gjd3wf8b.js → chunk-0bgssfvq.js} +1 -1
  5. package/bundle/{chunk-dnnkq5y4.js → chunk-0crgymtr.js} +2 -2
  6. package/bundle/chunk-0dzpjk7x.js +2 -0
  7. package/bundle/{chunk-bwbqkfv0.js → chunk-0ffmwhw7.js} +1 -1
  8. package/bundle/{chunk-h62chdmw.js → chunk-0g0jpw0z.js} +1 -1
  9. package/bundle/{chunk-mn9end71.js → chunk-0ggvqmnm.js} +1 -1
  10. package/bundle/{chunk-y7hgevfv.js → chunk-0gsw04hw.js} +2 -2
  11. package/bundle/{chunk-tkrwcjkr.js → chunk-0qpqd7nz.js} +2 -2
  12. package/bundle/{chunk-nty5z2cj.js → chunk-0tqmm8b8.js} +1 -1
  13. package/bundle/chunk-12fwmmcp.js +2 -0
  14. package/bundle/{chunk-8yvx3pgy.js → chunk-14d301ze.js} +1 -1
  15. package/bundle/{chunk-ngfxxfem.js → chunk-16srrzjr.js} +1 -1
  16. package/bundle/{chunk-45a4n21f.js → chunk-19pspc1p.js} +1 -1
  17. package/bundle/chunk-1a95ysv3.js +2 -0
  18. package/bundle/chunk-1akh8pk2.js +2 -0
  19. package/bundle/{chunk-5tky3csh.js → chunk-1ay97v74.js} +1 -1
  20. package/bundle/{chunk-6ar91jvd.js → chunk-1c0yp2gv.js} +1 -1
  21. package/bundle/{chunk-2md6sx8d.js → chunk-1rgt2vmt.js} +1 -1
  22. package/bundle/{chunk-3kpse7zy.js → chunk-1vpx7szf.js} +1 -1
  23. package/bundle/chunk-22qetqnp.js +2 -0
  24. package/bundle/{chunk-tm34qp8j.js → chunk-2bjfz4fb.js} +1 -1
  25. package/bundle/{chunk-a7rp46yt.js → chunk-2c26kxp4.js} +5 -5
  26. package/bundle/{chunk-xe69cnsk.js → chunk-2c41dncf.js} +1 -1
  27. package/bundle/{chunk-fyhqp4pb.js → chunk-2cjfezfr.js} +1 -1
  28. package/bundle/chunk-2d2a92kj.js +2 -0
  29. package/bundle/{chunk-m5dm7a1t.js → chunk-2pex3ak9.js} +1 -1
  30. package/bundle/chunk-2qrvkef8.js +2 -0
  31. package/bundle/chunk-2tppw8j9.js +2 -0
  32. package/bundle/chunk-2y87m7pe.js +2 -0
  33. package/bundle/{chunk-sfw5qddj.js → chunk-33jcxsbe.js} +1 -1
  34. package/bundle/{chunk-d0x5pbkm.js → chunk-3623jvcm.js} +1 -1
  35. package/bundle/{chunk-953pqp3w.js → chunk-368jx5dp.js} +1 -1
  36. package/bundle/chunk-3ft1dn9j.js +2 -0
  37. package/bundle/{chunk-rn83r0js.js → chunk-3k7016c2.js} +1 -1
  38. package/bundle/chunk-3rgct4bd.js +11 -0
  39. package/bundle/{chunk-68v3b6ns.js → chunk-3xdmxm5t.js} +2 -2
  40. package/bundle/{chunk-xwdxgg16.js → chunk-42q8vj0w.js} +1 -1
  41. package/bundle/{chunk-yhj01dz9.js → chunk-438faz6b.js} +2 -2
  42. package/bundle/chunk-4656qm05.js +2 -0
  43. package/bundle/chunk-46knch5z.js +2 -0
  44. package/bundle/{chunk-n23d0q00.js → chunk-4bewbvvr.js} +1 -1
  45. package/bundle/{chunk-pmg53fdd.js → chunk-4byvnx78.js} +1 -1
  46. package/bundle/chunk-4ftjx7ss.js +2 -0
  47. package/bundle/{chunk-jqk3v8d6.js → chunk-4fvbexr8.js} +1 -1
  48. package/bundle/{chunk-k1nh5sd2.js → chunk-4fy08jcj.js} +1 -1
  49. package/bundle/{chunk-0smnwqk6.js → chunk-4j76bf4j.js} +2 -2
  50. package/bundle/{chunk-5nrc5rhh.js → chunk-4jpab7ag.js} +1 -1
  51. package/bundle/{chunk-43ttzy29.js → chunk-4ngmjk8j.js} +2 -2
  52. package/bundle/{chunk-vnrjk2be.js → chunk-4rpgwgx9.js} +1 -1
  53. package/bundle/chunk-4sgy87h5.js +2 -0
  54. package/bundle/{chunk-65bmsp2t.js → chunk-4vzjdmts.js} +1 -1
  55. package/bundle/{chunk-zc0cdvcv.js → chunk-4zhrg3rv.js} +2 -2
  56. package/bundle/{chunk-5pzs51sp.js → chunk-52rdms56.js} +1 -1
  57. package/bundle/chunk-54hktc8h.js +2 -0
  58. package/bundle/{chunk-smznrv7k.js → chunk-55way0em.js} +1 -1
  59. package/bundle/{chunk-k4gsktts.js → chunk-59kk0mce.js} +1 -1
  60. package/bundle/chunk-59m55866.js +2 -0
  61. package/bundle/{chunk-q3h42a94.js → chunk-5b3v1x2c.js} +2 -2
  62. package/bundle/chunk-5js5nw7r.js +2 -0
  63. package/bundle/{chunk-f3zmdfqa.js → chunk-5nhwqg7c.js} +1 -1
  64. package/bundle/{chunk-tzb26ntq.js → chunk-5r05d901.js} +3 -3
  65. package/bundle/{chunk-avefgbjg.js → chunk-5zh91zk2.js} +2 -2
  66. package/bundle/chunk-61jn7908.js +2 -0
  67. package/bundle/chunk-61txdqz1.js +2 -0
  68. package/bundle/chunk-668g9wkg.js +2 -0
  69. package/bundle/chunk-6frhjpmt.js +2 -0
  70. package/bundle/{chunk-920z7g7j.js → chunk-6gqs1k7m.js} +1 -1
  71. package/bundle/chunk-6k14c8x1.js +5 -0
  72. package/bundle/{chunk-g42krp0z.js → chunk-6nxebcf8.js} +1 -1
  73. package/bundle/chunk-6r1jpj0h.js +2 -0
  74. package/bundle/{chunk-7bcm7gg1.js → chunk-6r48fje7.js} +1 -1
  75. package/bundle/{chunk-bqn6bqws.js → chunk-6ychs4wx.js} +1 -1
  76. package/bundle/{chunk-21rq4592.js → chunk-705xnxbc.js} +2 -2
  77. package/bundle/chunk-73fn4dqd.js +2 -0
  78. package/bundle/{chunk-q3nvzhyh.js → chunk-73xryfgn.js} +2 -2
  79. package/bundle/{chunk-q9tgdghx.js → chunk-76h0f86f.js} +1 -1
  80. package/bundle/{chunk-d51908mv.js → chunk-77h8tytk.js} +1 -1
  81. package/bundle/chunk-78j2c2je.js +2 -0
  82. package/bundle/chunk-78jt24ht.js +2 -0
  83. package/bundle/chunk-7j2vpavd.js +2 -0
  84. package/bundle/chunk-7nkxgm72.js +2 -0
  85. package/bundle/{chunk-f31yvp20.js → chunk-7p6mxch0.js} +1 -1
  86. package/bundle/{chunk-mhhtf0v3.js → chunk-7sq5dyv1.js} +1 -1
  87. package/bundle/{chunk-804vmbcd.js → chunk-7x2q1w0f.js} +1 -1
  88. package/bundle/{chunk-ac7482n2.js → chunk-7z96r2px.js} +2 -2
  89. package/bundle/chunk-84pjdenq.js +2 -0
  90. package/bundle/chunk-859pkecc.js +2 -0
  91. package/bundle/{chunk-y0527cg0.js → chunk-8hmt3avx.js} +1 -1
  92. package/bundle/{chunk-cng61dby.js → chunk-8jvfqh3b.js} +1 -1
  93. package/bundle/{chunk-8wwdrwf2.js → chunk-8p0t8qah.js} +1 -1
  94. package/bundle/chunk-8p249svd.js +2 -0
  95. package/bundle/{chunk-z1932c3f.js → chunk-8rfqv5he.js} +1 -1
  96. package/bundle/chunk-8rqbx4jw.js +2 -0
  97. package/bundle/chunk-8s3krfsm.js +2 -0
  98. package/bundle/{chunk-pb30kkbs.js → chunk-93pmbdz7.js} +6 -6
  99. package/bundle/{chunk-vcygx6hs.js → chunk-95am490c.js} +2 -2
  100. package/bundle/{chunk-k3dacdp5.js → chunk-9a6p1gdn.js} +8 -8
  101. package/bundle/chunk-9aafddkw.js +3 -0
  102. package/bundle/{chunk-0xrb12s8.js → chunk-9g9katgy.js} +2 -2
  103. package/bundle/{chunk-24rkf2gk.js → chunk-9qzwmt76.js} +1 -1
  104. package/bundle/chunk-9sv53kb4.js +2 -0
  105. package/bundle/chunk-9wbe0dkx.js +2 -0
  106. package/bundle/{chunk-bne5w117.js → chunk-9xxnwb33.js} +4 -4
  107. package/bundle/{chunk-fjbv3jht.js → chunk-a610qd3x.js} +1 -1
  108. package/bundle/{chunk-5c2438af.js → chunk-a76w2jwm.js} +1 -1
  109. package/bundle/{chunk-at22twxx.js → chunk-aa2n02qk.js} +2 -2
  110. package/bundle/{chunk-4pshnq6g.js → chunk-abv0fskc.js} +1 -1
  111. package/bundle/{chunk-7g66qc1v.js → chunk-acd72413.js} +2 -2
  112. package/bundle/{chunk-wkg3c643.js → chunk-ae7b11np.js} +2 -2
  113. package/bundle/{chunk-gy21fw82.js → chunk-agqss9ga.js} +2 -2
  114. package/bundle/chunk-aj5z8qd5.js +2 -0
  115. package/bundle/{chunk-8e4s6nc2.js → chunk-ajp53ksp.js} +1 -1
  116. package/bundle/{chunk-j164q40b.js → chunk-amp6mvbp.js} +2 -2
  117. package/bundle/{chunk-97q2t1yz.js → chunk-aqcpk2vg.js} +1 -1
  118. package/bundle/chunk-b0c2mvc0.js +2 -0
  119. package/bundle/{chunk-kth84vdn.js → chunk-b6eypnbj.js} +1 -1
  120. package/bundle/chunk-b79z8f94.js +2 -0
  121. package/bundle/chunk-bbwcsdy9.js +2 -0
  122. package/bundle/chunk-bbzjdbb9.js +2 -0
  123. package/bundle/{chunk-6evh2ke8.js → chunk-bd505nsd.js} +1 -1
  124. package/bundle/{chunk-p4027t94.js → chunk-bd84t3fb.js} +1 -1
  125. package/bundle/chunk-bh4s1yct.js +2 -0
  126. package/bundle/{chunk-rrv0n73b.js → chunk-bk7f59fn.js} +1 -1
  127. package/bundle/{chunk-venprxdp.js → chunk-bn71wqqf.js} +1 -1
  128. package/bundle/{chunk-j9h1sp4g.js → chunk-c3szabpf.js} +2 -2
  129. package/bundle/{chunk-z6sbjvtv.js → chunk-c6cajbyj.js} +1 -1
  130. package/bundle/{chunk-p6crzjtf.js → chunk-c8prg3jx.js} +2 -2
  131. package/bundle/chunk-crqcppwq.js +2 -0
  132. package/bundle/{chunk-t239rvej.js → chunk-cth373se.js} +2 -2
  133. package/bundle/chunk-d09zpgj1.js +2 -0
  134. package/bundle/{chunk-t5r3w9e1.js → chunk-d1tb1jd0.js} +1 -1
  135. package/bundle/{chunk-mmjgf680.js → chunk-dbpkq7ba.js} +2 -2
  136. package/bundle/{chunk-pe2xdkez.js → chunk-dd4qnh8s.js} +2 -2
  137. package/bundle/{chunk-p169ee92.js → chunk-defj5zs6.js} +1 -1
  138. package/bundle/chunk-dexcptaz.js +3 -0
  139. package/bundle/chunk-dgqkak21.js +2 -0
  140. package/bundle/{chunk-jww55nk9.js → chunk-dgva3y5v.js} +1 -1
  141. package/bundle/chunk-dhgvh7c3.js +2 -0
  142. package/bundle/{chunk-mhtxp66q.js → chunk-djqxbnwc.js} +2 -2
  143. package/bundle/chunk-dmd101ja.js +2 -0
  144. package/bundle/{chunk-vygkwwjd.js → chunk-drnj1a14.js} +2 -2
  145. package/bundle/{chunk-g3wvtyw3.js → chunk-dt1wwt7m.js} +1 -1
  146. package/bundle/{chunk-cz5vta94.js → chunk-dw70wds9.js} +1 -1
  147. package/bundle/{chunk-xdd3553a.js → chunk-dw7yrk1g.js} +1 -1
  148. package/bundle/chunk-dwb39jdf.js +2 -0
  149. package/bundle/chunk-dx4zxex7.js +2 -0
  150. package/bundle/{chunk-ph8hn1wt.js → chunk-dy2k5rdx.js} +2 -2
  151. package/bundle/{chunk-wwdpw27v.js → chunk-dz3bec8g.js} +1 -1
  152. package/bundle/{chunk-t0761rhq.js → chunk-e0zb6sw6.js} +2 -2
  153. package/bundle/chunk-e2pqvscp.js +2 -0
  154. package/bundle/{chunk-vsz4s6zt.js → chunk-e4g4mvak.js} +1 -1
  155. package/bundle/{chunk-fhqfqd5v.js → chunk-eeq0krp7.js} +2 -2
  156. package/bundle/chunk-efe6kj3d.js +2 -0
  157. package/bundle/{chunk-qp1n7kwe.js → chunk-egkhynj5.js} +1 -1
  158. package/bundle/chunk-emac0dss.js +2 -0
  159. package/bundle/chunk-encfnt6w.js +2 -0
  160. package/bundle/{chunk-y29ejqg2.js → chunk-etv6c77a.js} +1 -1
  161. package/bundle/{chunk-32j0q58h.js → chunk-eyr5ymt8.js} +1 -1
  162. package/bundle/{chunk-r9w0thdk.js → chunk-f2pv705d.js} +1 -1
  163. package/bundle/{chunk-5w76kdjr.js → chunk-f4mnp6xd.js} +1 -1
  164. package/bundle/{chunk-xdteq9bd.js → chunk-f84hw65n.js} +1 -1
  165. package/bundle/chunk-fg2nyz2x.js +2 -0
  166. package/bundle/chunk-ga6wc979.js +2 -0
  167. package/bundle/{chunk-hqbbs9dm.js → chunk-gbxf6e5d.js} +3 -3
  168. package/bundle/chunk-gdew7bwm.js +2 -0
  169. package/bundle/{chunk-w9gzfsy7.js → chunk-gdj7mqrd.js} +2 -2
  170. package/bundle/chunk-ge19ff9d.js +2 -0
  171. package/bundle/{chunk-bzebyyfr.js → chunk-ghap1n1m.js} +4 -4
  172. package/bundle/chunk-gt0q07xq.js +2 -0
  173. package/bundle/{chunk-7mppvhv9.js → chunk-gwrnxcdn.js} +2 -2
  174. package/bundle/{chunk-e8p92vz4.js → chunk-gww0skmn.js} +2 -2
  175. package/bundle/chunk-h4dnjfr2.js +2 -0
  176. package/bundle/{chunk-has2rz35.js → chunk-h7658zxy.js} +1 -1
  177. package/bundle/chunk-h8fx619t.js +2 -0
  178. package/bundle/{chunk-313zqzc1.js → chunk-hfefq104.js} +1 -1
  179. package/bundle/{chunk-ff548b0j.js → chunk-hhk2sp5n.js} +2 -2
  180. package/bundle/{chunk-47k5jy1p.js → chunk-hqjc4wgg.js} +2 -2
  181. package/bundle/{chunk-48r70n4s.js → chunk-hrtze4c5.js} +1 -1
  182. package/bundle/{chunk-r5zy4za0.js → chunk-hwsqqkrv.js} +2 -2
  183. package/bundle/{chunk-ehb4hd9c.js → chunk-j6xmgn63.js} +1 -1
  184. package/bundle/chunk-jnvb3s7f.js +2 -0
  185. package/bundle/chunk-jrq2xw6e.js +2 -0
  186. package/bundle/chunk-jwckmhjm.js +2 -0
  187. package/bundle/{chunk-99s035f0.js → chunk-jxkrhrp0.js} +2 -2
  188. package/bundle/chunk-jz27ypm5.js +2 -0
  189. package/bundle/chunk-jzrs878d.js +2 -0
  190. package/bundle/chunk-jzx700tb.js +2 -0
  191. package/bundle/chunk-k1x8469r.js +3 -0
  192. package/bundle/{chunk-bkct64rs.js → chunk-k3g28tbw.js} +1 -1
  193. package/bundle/{chunk-wy3a4cab.js → chunk-k6zwfstj.js} +1 -1
  194. package/bundle/{chunk-0qd3567w.js → chunk-kfj37631.js} +1 -1
  195. package/bundle/{chunk-khzzmyk2.js → chunk-kmzpeq8k.js} +1 -1
  196. package/bundle/{chunk-bd21p9zz.js → chunk-kre93a89.js} +2 -2
  197. package/bundle/{chunk-j8fcfhr2.js → chunk-kry4vcrf.js} +2 -2
  198. package/bundle/chunk-ktp2b4t4.js +2 -0
  199. package/bundle/chunk-m483jvn8.js +2 -0
  200. package/bundle/chunk-makecdh6.js +8 -0
  201. package/bundle/{chunk-tr6rdr6h.js → chunk-mbbxedsq.js} +2 -2
  202. package/bundle/chunk-menbcmkq.js +2 -0
  203. package/bundle/{chunk-hwrrrbqd.js → chunk-mghnkwp8.js} +1 -1
  204. package/bundle/{chunk-pr7z5dj8.js → chunk-mhxyv9c8.js} +1 -1
  205. package/bundle/{chunk-k5q9px67.js → chunk-mjrqhbp2.js} +1 -1
  206. package/bundle/{chunk-9zm6r55d.js → chunk-msh249db.js} +2 -2
  207. package/bundle/{chunk-nmzrrqgb.js → chunk-n0g4983e.js} +1 -1
  208. package/bundle/{chunk-dnsh1v42.js → chunk-n4qxj391.js} +2 -2
  209. package/bundle/{chunk-ptqk1j2r.js → chunk-n5p7cn4w.js} +1 -1
  210. package/bundle/{chunk-5zkj5xv9.js → chunk-n9twhc5d.js} +2 -2
  211. package/bundle/{chunk-p5be5ddp.js → chunk-na1wr2qf.js} +1 -1
  212. package/bundle/{chunk-4agaj51z.js → chunk-nbckdba0.js} +1 -1
  213. package/bundle/{chunk-ezrqhqkp.js → chunk-nftbj8g9.js} +1 -1
  214. package/bundle/{chunk-d7nsd979.js → chunk-nfzpegqx.js} +1 -1
  215. package/bundle/chunk-np8h66t0.js +2 -0
  216. package/bundle/{chunk-v6v9xn81.js → chunk-npzx3yd5.js} +1 -1
  217. package/bundle/chunk-nr2j8ytn.js +3 -0
  218. package/bundle/{chunk-w46g7kdq.js → chunk-nrk29616.js} +2 -2
  219. package/bundle/{chunk-fsqses4g.js → chunk-ns8xnkjb.js} +2 -2
  220. package/bundle/{chunk-7vmx8bg9.js → chunk-ntpn0w9m.js} +2 -2
  221. package/bundle/chunk-nwwmns3w.js +2 -0
  222. package/bundle/{chunk-ksme3gj1.js → chunk-p40z6510.js} +1 -1
  223. package/bundle/{chunk-3ktzxj69.js → chunk-p847g35y.js} +1 -1
  224. package/bundle/{chunk-vf492zs6.js → chunk-p8ak162p.js} +1 -1
  225. package/bundle/chunk-pe5dpzec.js +2 -0
  226. package/bundle/{chunk-bbng1cea.js → chunk-pf3nqf00.js} +1 -1
  227. package/bundle/{chunk-9hz56z6a.js → chunk-ppy0jy6j.js} +1 -1
  228. package/bundle/{chunk-et3804wr.js → chunk-prbxhnza.js} +1 -1
  229. package/bundle/{chunk-nrat6ncm.js → chunk-ptwex14s.js} +1 -1
  230. package/bundle/{chunk-qey1efpx.js → chunk-q3pt4p9f.js} +1 -1
  231. package/bundle/{chunk-pt0xphq9.js → chunk-q6mcnq9p.js} +1 -1
  232. package/bundle/{chunk-kengqzja.js → chunk-q6p92zyn.js} +2 -2
  233. package/bundle/{chunk-ycvwpmd9.js → chunk-q87fw8dk.js} +2 -2
  234. package/bundle/chunk-q8f6a074.js +2 -0
  235. package/bundle/{chunk-cj7r8w1e.js → chunk-qbrj9wzd.js} +1 -1
  236. package/bundle/{chunk-j0bwa5dk.js → chunk-qdvnscxm.js} +2 -2
  237. package/bundle/{chunk-d6jhs818.js → chunk-qp3hxqg5.js} +2 -2
  238. package/bundle/{chunk-jg1ccs3j.js → chunk-qph2c2v7.js} +1 -1
  239. package/bundle/{chunk-3vvd7j14.js → chunk-qprbef09.js} +1 -1
  240. package/bundle/chunk-qqaevt32.js +2 -0
  241. package/bundle/chunk-qzpvz708.js +2 -0
  242. package/bundle/{chunk-cbnkx933.js → chunk-r4kg0z96.js} +2 -2
  243. package/bundle/{chunk-faee8zgc.js → chunk-r73e8gsp.js} +1 -1
  244. package/bundle/chunk-reyjr2e0.js +2 -0
  245. package/bundle/{chunk-dxdggn90.js → chunk-rfzra502.js} +1 -1
  246. package/bundle/{chunk-tg226j37.js → chunk-rhrcgvb8.js} +1 -1
  247. package/bundle/{chunk-wyj8cpx5.js → chunk-rk0fnvp5.js} +1 -1
  248. package/bundle/{chunk-t8c4cs6z.js → chunk-rqedtjz9.js} +1 -1
  249. package/bundle/{chunk-eg3syjtv.js → chunk-s06t769q.js} +2 -2
  250. package/bundle/{chunk-m80v76m9.js → chunk-skxg3s8z.js} +1 -1
  251. package/bundle/{chunk-7x6yrtzn.js → chunk-spzd8rev.js} +1 -1
  252. package/bundle/chunk-t178njgb.js +2 -0
  253. package/bundle/{chunk-3jf3jhrs.js → chunk-t4b2fm7z.js} +1 -1
  254. package/bundle/{chunk-55fcmswd.js → chunk-t8sy5sgx.js} +2 -2
  255. package/bundle/{chunk-s4vx9x1v.js → chunk-t9qyzzsz.js} +1 -1
  256. package/bundle/{chunk-6scf311w.js → chunk-tc9xbn1t.js} +1 -1
  257. package/bundle/{chunk-qnvsqnz5.js → chunk-tezrgfc6.js} +2 -2
  258. package/bundle/chunk-tjpev5t6.js +2 -0
  259. package/bundle/{chunk-vkaa7k3e.js → chunk-tkzctbxq.js} +2 -2
  260. package/bundle/{chunk-xy0gnpen.js → chunk-ts2k13g0.js} +1 -1
  261. package/bundle/{chunk-gszvgz76.js → chunk-twd6r7nf.js} +2 -2
  262. package/bundle/{chunk-qxcyz5hc.js → chunk-twfvrafb.js} +2 -2
  263. package/bundle/{chunk-70q8qcb2.js → chunk-twvmjsxf.js} +1 -1
  264. package/bundle/{chunk-ggxzf22k.js → chunk-tz3s8dvy.js} +1 -1
  265. package/bundle/chunk-tzq7wjgv.js +3 -0
  266. package/bundle/{chunk-n78f8hfk.js → chunk-v0c3k797.js} +1 -1
  267. package/bundle/chunk-v1s16wwd.js +2 -0
  268. package/bundle/{chunk-fr34mnyg.js → chunk-v3nmnm57.js} +2 -2
  269. package/bundle/chunk-v6b29nx4.js +2 -0
  270. package/bundle/chunk-v6rgd1j5.js +2 -0
  271. package/bundle/chunk-v9dnetq8.js +2 -0
  272. package/bundle/{chunk-450fef7h.js → chunk-v9w88wpy.js} +2 -2
  273. package/bundle/{chunk-7hvf9dgx.js → chunk-va2qfh0x.js} +1 -1
  274. package/bundle/chunk-vd5mpvcc.js +2 -0
  275. package/bundle/{chunk-w4synhfg.js → chunk-vfb72vdy.js} +1 -1
  276. package/bundle/{chunk-3cr2p4mp.js → chunk-vhzx5bxd.js} +1 -1
  277. package/bundle/{chunk-cmb62jkt.js → chunk-vjn54xj5.js} +2 -2
  278. package/bundle/{chunk-ybane1en.js → chunk-vp3yf46q.js} +1 -1
  279. package/bundle/{chunk-p4b0s5td.js → chunk-vzrc2fmt.js} +1 -1
  280. package/bundle/{chunk-ejqzcdcx.js → chunk-w3zhy5vq.js} +1 -1
  281. package/bundle/{chunk-hjt94wce.js → chunk-w43kmnm9.js} +641 -635
  282. package/bundle/{chunk-w4brava0.js → chunk-wb1d3mqw.js} +1 -1
  283. package/bundle/{chunk-6m9jb0s9.js → chunk-wd8hbven.js} +2 -2
  284. package/bundle/{chunk-vshycswk.js → chunk-wgt1tqw9.js} +1 -1
  285. package/bundle/{chunk-0428v6mw.js → chunk-whw18cn9.js} +1 -1
  286. package/bundle/{chunk-pxm4qvqk.js → chunk-wjz42325.js} +2 -2
  287. package/bundle/{chunk-y67kaj0b.js → chunk-wvb17w0z.js} +1 -1
  288. package/bundle/chunk-wwct4z7j.js +2 -0
  289. package/bundle/{chunk-55ykn8nz.js → chunk-x55h5qdc.js} +4 -4
  290. package/bundle/{chunk-05ck7acg.js → chunk-x80d0zh7.js} +1 -1
  291. package/bundle/{chunk-mjjaezwq.js → chunk-x9fyt3vx.js} +2 -2
  292. package/bundle/{chunk-g22e4gw7.js → chunk-xb3sxa6f.js} +1 -1
  293. package/bundle/{chunk-yz25607t.js → chunk-xcxqt8ag.js} +1 -1
  294. package/bundle/{chunk-c36p881g.js → chunk-xhh70g8j.js} +3 -3
  295. package/bundle/chunk-xr9wz961.js +2 -0
  296. package/bundle/{chunk-0cnwsf8p.js → chunk-y0h3jfkj.js} +1 -1
  297. package/bundle/{chunk-m7ganre7.js → chunk-y2t5pmqw.js} +1 -1
  298. package/bundle/{chunk-qkvqvgcx.js → chunk-y5q9v80n.js} +1 -1
  299. package/bundle/{chunk-5asx1706.js → chunk-yd94wz5v.js} +2 -2
  300. package/bundle/{chunk-5df5aja0.js → chunk-yjqww6ag.js} +2 -2
  301. package/bundle/{chunk-2drzgtv3.js → chunk-yxttz5z5.js} +2 -2
  302. package/bundle/{chunk-da6kggv7.js → chunk-yy7r3t3w.js} +2 -2
  303. package/bundle/{chunk-5pwv2p3s.js → chunk-yzpc5kj2.js} +1 -1
  304. package/bundle/{chunk-73r8bjjz.js → chunk-z6kcnpsj.js} +2 -2
  305. package/bundle/{chunk-nj1ntakd.js → chunk-z744mz4w.js} +2 -2
  306. package/bundle/{chunk-39z96pc6.js → chunk-z7kswv9r.js} +3 -3
  307. package/bundle/chunk-zfegnt1e.js +2 -0
  308. package/bundle/chunk-zg7kesbp.js +2 -0
  309. package/bundle/{chunk-jnrnncqc.js → chunk-znmbfx70.js} +1 -1
  310. package/bundle/{chunk-24ygjbpf.js → chunk-zp5sr5nx.js} +2 -2
  311. package/bundle/{chunk-ha1w0xzh.js → chunk-zrhw1szj.js} +1 -1
  312. package/bundle/chunk-zy06fe4r.js +2 -0
  313. package/bundle/index.js +3 -3
  314. package/bundle/parser.worker.js +2 -2
  315. package/bundle/worker.js +1 -1
  316. package/package.json +1 -1
  317. package/bundle/chunk-0ppnq3a4.js +0 -2
  318. package/bundle/chunk-0te0vcdn.js +0 -2
  319. package/bundle/chunk-11h06z17.js +0 -2
  320. package/bundle/chunk-28yv4fqe.js +0 -2
  321. package/bundle/chunk-34a52hyr.js +0 -2
  322. package/bundle/chunk-3d73kfea.js +0 -2
  323. package/bundle/chunk-3n3gb3vd.js +0 -2
  324. package/bundle/chunk-3sq60y9f.js +0 -2
  325. package/bundle/chunk-49mbnqvc.js +0 -2
  326. package/bundle/chunk-4fr6kae9.js +0 -2
  327. package/bundle/chunk-516w1nc4.js +0 -2
  328. package/bundle/chunk-535nm66j.js +0 -2
  329. package/bundle/chunk-5kpxpm8e.js +0 -2
  330. package/bundle/chunk-5nm5s0h2.js +0 -2
  331. package/bundle/chunk-5ysbwr4x.js +0 -3
  332. package/bundle/chunk-6dvmyeg7.js +0 -2
  333. package/bundle/chunk-6ex981t8.js +0 -2
  334. package/bundle/chunk-6gpf2bjs.js +0 -2
  335. package/bundle/chunk-6jeg2r5j.js +0 -2
  336. package/bundle/chunk-6nry7tah.js +0 -2
  337. package/bundle/chunk-7bgzcpdw.js +0 -2
  338. package/bundle/chunk-7kjvcbwa.js +0 -2
  339. package/bundle/chunk-7x30x94y.js +0 -2
  340. package/bundle/chunk-86hsh44c.js +0 -3
  341. package/bundle/chunk-8jma2btf.js +0 -2
  342. package/bundle/chunk-8sbb95a4.js +0 -2
  343. package/bundle/chunk-93e0w75z.js +0 -2
  344. package/bundle/chunk-97gp818s.js +0 -2
  345. package/bundle/chunk-9epf2zbh.js +0 -2
  346. package/bundle/chunk-agv04nt7.js +0 -2
  347. package/bundle/chunk-be7smmar.js +0 -2
  348. package/bundle/chunk-bg1t0kke.js +0 -2
  349. package/bundle/chunk-bryx5cx9.js +0 -2
  350. package/bundle/chunk-c13rrw41.js +0 -2
  351. package/bundle/chunk-c2kkv619.js +0 -2
  352. package/bundle/chunk-c3zge8cg.js +0 -3
  353. package/bundle/chunk-c5xj1y5v.js +0 -2
  354. package/bundle/chunk-cfhfc86j.js +0 -8
  355. package/bundle/chunk-ckpm4dvv.js +0 -2
  356. package/bundle/chunk-cqkaamvn.js +0 -2
  357. package/bundle/chunk-ct8twng1.js +0 -2
  358. package/bundle/chunk-d38y7bvh.js +0 -2
  359. package/bundle/chunk-d6hxsfm6.js +0 -2
  360. package/bundle/chunk-descb9jz.js +0 -2
  361. package/bundle/chunk-dvr2b9r1.js +0 -2
  362. package/bundle/chunk-ea5fktnn.js +0 -2
  363. package/bundle/chunk-f0t7rryn.js +0 -3
  364. package/bundle/chunk-f4mf6tpp.js +0 -2
  365. package/bundle/chunk-f97k17t8.js +0 -2
  366. package/bundle/chunk-g4ehhdzp.js +0 -2
  367. package/bundle/chunk-gd6qpdjw.js +0 -2
  368. package/bundle/chunk-gdn91t9j.js +0 -2
  369. package/bundle/chunk-gehn9fd9.js +0 -2
  370. package/bundle/chunk-h9wh48d0.js +0 -5
  371. package/bundle/chunk-hhax4mxw.js +0 -2
  372. package/bundle/chunk-hjb1etf8.js +0 -2
  373. package/bundle/chunk-jvkzdap1.js +0 -2
  374. package/bundle/chunk-kg8fcv91.js +0 -2
  375. package/bundle/chunk-kgptyf7n.js +0 -3
  376. package/bundle/chunk-kjjjrjnb.js +0 -2
  377. package/bundle/chunk-ky88ba80.js +0 -2
  378. package/bundle/chunk-m5cfmhwh.js +0 -2
  379. package/bundle/chunk-m7qxxbns.js +0 -2
  380. package/bundle/chunk-mh19kwzw.js +0 -10
  381. package/bundle/chunk-n8wg5h5p.js +0 -2
  382. package/bundle/chunk-nvs0d8jg.js +0 -2
  383. package/bundle/chunk-p6hcj3kv.js +0 -2
  384. package/bundle/chunk-pexmns0j.js +0 -2
  385. package/bundle/chunk-pt603np4.js +0 -2
  386. package/bundle/chunk-pz1avwyt.js +0 -2
  387. package/bundle/chunk-qk5bfcv8.js +0 -2
  388. package/bundle/chunk-qr06byhp.js +0 -2
  389. package/bundle/chunk-r7sq3maz.js +0 -2
  390. package/bundle/chunk-rcrjbhaz.js +0 -2
  391. package/bundle/chunk-rmgs9nmj.js +0 -2
  392. package/bundle/chunk-rytavefg.js +0 -2
  393. package/bundle/chunk-sh9vjnsh.js +0 -2
  394. package/bundle/chunk-st0c5wwc.js +0 -2
  395. package/bundle/chunk-teb3k2sf.js +0 -2
  396. package/bundle/chunk-ts798jvf.js +0 -2
  397. package/bundle/chunk-tx5aj02v.js +0 -2
  398. package/bundle/chunk-v1t51rrq.js +0 -2
  399. package/bundle/chunk-vdrz2t9c.js +0 -2
  400. package/bundle/chunk-vh9ptqn0.js +0 -2
  401. package/bundle/chunk-vj4x8hvz.js +0 -2
  402. package/bundle/chunk-w72rctxz.js +0 -2
  403. package/bundle/chunk-wbw9zv3h.js +0 -2
  404. package/bundle/chunk-x6mw98c2.js +0 -2
  405. package/bundle/chunk-y6p57wgh.js +0 -2
  406. package/bundle/chunk-y6xs8v17.js +0 -2
  407. package/bundle/chunk-z3xsfpc6.js +0 -2
  408. package/bundle/chunk-zkm3yyyf.js +0 -2
  409. package/bundle/chunk-zn5pw733.js +0 -2
  410. package/bundle/chunk-zxwvnmea.js +0 -2
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{hs as c,ls as s}from"./chunk-fr34mnyg.js";var r=["openai","anthropic"],p=["deepseek","zai","zhipuai","moonshotai","moonshotai-cn","kimi-for-coding","stepfun"],d=["opencode","openrouter"],l=["alibaba","alibaba-cn","bytedance","alibaba-coding-plan","alibaba-coding-plan-cn","zai-coding-plan","zhipuai-coding-plan","tencent-coding-plan","minimax-coding-plan","minimax-cn-coding-plan","kuae-cloud-coding-plan"],R=["opencode-go","github-copilot","google","vercel"],P=[r,p,d,l,R],g=Object.fromEntries(P.flatMap((i,a,e)=>{let n=e.slice(0,a).reduce((o,t)=>o+t.length,0);return i.map((o,t)=>[o,n+t])}));function m(i){return i in g}function O(i,a,e){return c(i,s((n)=>a[n.id]??99,(n)=>n.name??n.id),(n)=>n.map((o)=>({label:o.name,value:o.id,hint:e(o)})))}
2
+ import{Ht as c,Lt as s}from"./chunk-v3nmnm57.js";var r=["openai","anthropic"],p=["deepseek","zai","zhipuai","moonshotai","moonshotai-cn","kimi-for-coding","stepfun"],d=["opencode","openrouter"],l=["alibaba","alibaba-cn","bytedance","alibaba-coding-plan","alibaba-coding-plan-cn","zai-coding-plan","zhipuai-coding-plan","tencent-coding-plan","minimax-coding-plan","minimax-cn-coding-plan","kuae-cloud-coding-plan"],R=["opencode-go","github-copilot","google","vercel"],P=[r,p,d,l,R],g=Object.fromEntries(P.flatMap((i,a,e)=>{let n=e.slice(0,a).reduce((o,t)=>o+t.length,0);return i.map((o,t)=>[o,n+t])}));function m(i){return i in g}function O(i,a,e){return c(i,s((n)=>a[n.id]??99,(n)=>n.name??n.id),(n)=>n.map((o)=>({label:o.name,value:o.id,hint:e(o)})))}
3
3
  export{g as U,m as V,O as W};
@@ -1,6 +1,6 @@
1
1
  // @bun
2
- import{Je as M}from"./chunk-68v3b6ns.js";import{Me as D}from"./chunk-bne5w117.js";import{Ne as B}from"./chunk-j0bwa5dk.js";import{Hf as d,Jf as w}from"./chunk-2drzgtv3.js";import{sO as n}from"./chunk-r9w0thdk.js";var R=n(D(),1),i=n(d(),1),A=n(M(),1);import N from"fs/promises";var S=n(d(),1);var _="169.254.170.2",p="169.254.170.23",u="[fd00:ec2::23]",g=(e,c)=>{if(e.protocol==="https:")return;if(e.hostname===_||e.hostname===p||e.hostname===u)return;if(e.hostname.includes("[")){if(e.hostname==="[::1]"||e.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(e.hostname==="localhost")return;let a=e.hostname.split("."),r=(t)=>{let s=parseInt(t,10);return 0<=s&&s<=255};if(a[0]==="127"&&r(a[1])&&r(a[2])&&r(a[3])&&a.length===4)return}throw new S.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
2
+ import{Ke as M}from"./chunk-3xdmxm5t.js";import{Ne as D}from"./chunk-9xxnwb33.js";import{Oe as B}from"./chunk-qdvnscxm.js";import{If as d,Kf as w}from"./chunk-yxttz5z5.js";import{SP as n}from"./chunk-f2pv705d.js";var R=n(D(),1),i=n(d(),1),A=n(M(),1);import N from"fs/promises";var S=n(d(),1);var _="169.254.170.2",p="169.254.170.23",u="[fd00:ec2::23]",g=(e,c)=>{if(e.protocol==="https:")return;if(e.hostname===_||e.hostname===p||e.hostname===u)return;if(e.hostname.includes("[")){if(e.hostname==="[::1]"||e.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(e.hostname==="localhost")return;let a=e.hostname.split("."),r=(t)=>{let s=parseInt(t,10);return 0<=s&&s<=255};if(a[0]==="127"&&r(a[1])&&r(a[2])&&r(a[3])&&a.length===4)return}throw new S.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
3
3
  - loopback CIDR 127.0.0.0/8 or [::1/128]
4
4
  - ECS container host 169.254.170.2
5
5
  - EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:c})};var f=n(d(),1),I=n(B(),1),P=n(w(),1),K=n(w(),1);function x(e){return new I.HttpRequest({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((c,[a,r])=>{return c[a]=r,c},{}),fragment:e.hash})}async function E(e,c){let r=await K.sdkStreamMixin(e.body).transformToString();if(e.statusCode===200){let t=JSON.parse(r);if(typeof t.AccessKeyId!=="string"||typeof t.SecretAccessKey!=="string"||typeof t.Token!=="string"||typeof t.Expiration!=="string")throw new f.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:c});return{accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,sessionToken:t.Token,expiration:P.parseRfc3339DateTime(t.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let t={};try{t=JSON.parse(r)}catch(s){}throw Object.assign(new f.CredentialsProviderError(`Server responded with status: ${e.statusCode}`,{logger:c}),{Code:t.Code,Message:t.Message})}throw new f.CredentialsProviderError(`Server responded with status: ${e.statusCode}`,{logger:c})}var T=(e,c,a)=>{return async()=>{for(let r=0;r<c;++r)try{return await e()}catch(t){await new Promise((s)=>setTimeout(s,a))}return await e()}};var j="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",J="http://169.254.170.2",$="AWS_CONTAINER_CREDENTIALS_FULL_URI",G="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",H="AWS_CONTAINER_AUTHORIZATION_TOKEN",k=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let c,a=e.awsContainerCredentialsRelativeUri??process.env[j],r=e.awsContainerCredentialsFullUri??process.env[$],t=e.awsContainerAuthorizationToken??process.env[H],s=e.awsContainerAuthorizationTokenFile??process.env[G],m=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?.warn?console.warn:e.logger.warn.bind(e.logger);if(a&&r)m("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),m("awsContainerCredentialsFullUri will take precedence.");if(t&&s)m("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),m("awsContainerAuthorizationToken will take precedence.");if(r)c=r;else if(a)c=`${J}${a}`;else throw new i.CredentialsProviderError(`No HTTP credential provider host provided.
6
- Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:e.logger});let y=new URL(c);g(y,e.logger);let C=A.NodeHttpHandler.create({connectionTimeout:e.timeout??1000}),O=e.timeout??1000,b=T(async()=>{let o=x(y);if(t)o.headers.Authorization=t;else if(s)o.headers.Authorization=(await N.readFile(s)).toString();try{let h=await C.handle(o,{requestTimeout:O});return E(h.response).then((v)=>R.setCredentialFeature(v,"CREDENTIALS_HTTP","z"))}catch(h){throw new i.CredentialsProviderError(String(h),{logger:e.logger})}},e.maxRetries??3,e.timeout??1000);return async()=>{try{return await b()}finally{C.destroy?.()}}};export{k as ke};
6
+ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:e.logger});let y=new URL(c);g(y,e.logger);let C=A.NodeHttpHandler.create({connectionTimeout:e.timeout??1000}),O=e.timeout??1000,b=T(async()=>{let o=x(y);if(t)o.headers.Authorization=t;else if(s)o.headers.Authorization=(await N.readFile(s)).toString();try{let h=await C.handle(o,{requestTimeout:O});return E(h.response).then((v)=>R.setCredentialFeature(v,"CREDENTIALS_HTTP","z"))}catch(h){throw new i.CredentialsProviderError(String(h),{logger:e.logger})}},e.maxRetries??3,e.timeout??1000);return async()=>{try{return await b()}finally{C.destroy?.()}}};export{k as le};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{tq as S,uq as Vq}from"./chunk-fhqfqd5v.js";import{$A as HB,BF as MB,CE as DB,DD as jB,ED as PB,HC as NB,IC as wB,KC as FB,LF as ZB,Wz as Xq,Xz as d,YN as $B,ZN as WB,_N as zB,aB as VB,bO as t,cB as CB,eG as AB,fB as EB,mB as N,mC as XB,oF as f,sB as T,tE as YB,wA as KB,wE as h,zD as LB}from"./chunk-qnvsqnz5.js";import{rO as y}from"./chunk-j8fcfhr2.js";import{sO as K,tO as Z,wO as G}from"./chunk-r9w0thdk.js";var l=Z(($q)=>{Object.defineProperty($q,"__esModule",{value:!0});$q._clearDefaultServiceNameCache=$q.defaultServiceName=void 0;var D;function hB(){if(D===void 0)try{let q=globalThis.process.argv0;D=q?`unknown_service:${q}`:"unknown_service"}catch{D="unknown_service"}return D}$q.defaultServiceName=hB;function IB(){D=void 0}$q._clearDefaultServiceNameCache=IB});var Kq=Z((zq)=>{Object.defineProperty(zq,"__esModule",{value:!0});zq.isPromiseLike=void 0;var SB=(q)=>{return q!==null&&typeof q==="object"&&typeof q.then==="function"};zq.isPromiseLike=SB});var i=Z((Cq)=>{Object.defineProperty(Cq,"__esModule",{value:!0});Cq.defaultResource=Cq.emptyResource=Cq.resourceFromDetectedResource=Cq.resourceFromAttributes=void 0;var A=y(),c=Vq(),C=S(),kB=l(),M=Kq();class U{_rawAttributes;_asyncAttributesPending=!1;_schemaUrl;_memoizedAttributes;static FromAttributeList(q,B){let J=new U({},B);return J._rawAttributes=Hq(q),J._asyncAttributesPending=q.filter(([Q,Y])=>(0,M.isPromiseLike)(Y)).length>0,J}constructor(q,B){let J=q.attributes??{};this._rawAttributes=Object.entries(J).map(([Q,Y])=>{if((0,M.isPromiseLike)(Y))this._asyncAttributesPending=!0;return[Q,Y]}),this._rawAttributes=Hq(this._rawAttributes),this._schemaUrl=_B(B?.schemaUrl)}get asyncAttributesPending(){return this._asyncAttributesPending}async waitForAsyncAttributes(){if(!this.asyncAttributesPending)return;for(let q=0;q<this._rawAttributes.length;q++){let[B,J]=this._rawAttributes[q];this._rawAttributes[q]=[B,(0,M.isPromiseLike)(J)?await J:J]}this._asyncAttributesPending=!1}get attributes(){if(this.asyncAttributesPending)A.diag.error("Accessing resource attributes before async attributes settled");if(this._memoizedAttributes)return this._memoizedAttributes;let q={};for(let[B,J]of this._rawAttributes){if((0,M.isPromiseLike)(J)){A.diag.debug(`Unsettled resource attribute ${B} skipped`);continue}if(J!=null)q[B]??=J}if(!this._asyncAttributesPending)this._memoizedAttributes=q;return q}getRawAttributes(){return this._rawAttributes}get schemaUrl(){return this._schemaUrl}merge(q){if(q==null)return this;let B=vB(this,q),J=B?{schemaUrl:B}:void 0;return U.FromAttributeList([...q.getRawAttributes(),...this.getRawAttributes()],J)}}function p(q,B){return U.FromAttributeList(Object.entries(q),B)}Cq.resourceFromAttributes=p;function bB(q,B){return new U(q,B)}Cq.resourceFromDetectedResource=bB;function fB(){return p({})}Cq.emptyResource=fB;function gB(){return p({[C.ATTR_SERVICE_NAME]:(0,kB.defaultServiceName)(),[C.ATTR_TELEMETRY_SDK_LANGUAGE]:c.SDK_INFO[C.ATTR_TELEMETRY_SDK_LANGUAGE],[C.ATTR_TELEMETRY_SDK_NAME]:c.SDK_INFO[C.ATTR_TELEMETRY_SDK_NAME],[C.ATTR_TELEMETRY_SDK_VERSION]:c.SDK_INFO[C.ATTR_TELEMETRY_SDK_VERSION]})}Cq.defaultResource=gB;function Hq(q){return q.map(([B,J])=>{if((0,M.isPromiseLike)(J))return[B,J.catch((Q)=>{A.diag.debug("promise rejection for resource attribute: %s - %s",B,Q);return})];return[B,J]})}function _B(q){if(typeof q==="string"||q===void 0)return q;A.diag.warn("Schema URL must be string or undefined, got %s. Schema URL will be ignored.",q);return}function vB(q,B){let J=q?.schemaUrl,Q=B?.schemaUrl,Y=J===void 0||J==="",z=Q===void 0||Q==="";if(Y)return Q;if(z)return J;if(J===Q)return J;A.diag.warn('Schema URL merge conflict: old resource has "%s", updating resource has "%s". Resulting resource will have undefined Schema URL.',J,Q);return}});var Lq=Z((wq)=>{Object.defineProperty(wq,"__esModule",{value:!0});wq.detectResources=void 0;var Nq=y(),n=i(),uB=(q={})=>{return(q.detectors||[]).map((J)=>{try{let Q=(0,n.resourceFromDetectedResource)(J.detect(q));return Nq.diag.debug(`${J.constructor.name} found resource.`,Q),Q}catch(Q){return Nq.diag.debug(`${J.constructor.name} failed: ${Q.message}`),(0,n.emptyResource)()}}).reduce((J,Q)=>J.merge(Q),(0,n.emptyResource)())};wq.detectResources=uB});var Aq=Z((Dq)=>{Object.defineProperty(Dq,"__esModule",{value:!0});Dq.envDetector=void 0;var lB=y(),cB=S(),jq=Vq();class Pq{_MAX_LENGTH=255;_COMMA_SEPARATOR=",";_LABEL_KEY_VALUE_SPLITTER="=";detect(q){let B={},J=(0,jq.getStringFromEnv)("OTEL_RESOURCE_ATTRIBUTES"),Q=(0,jq.getStringFromEnv)("OTEL_SERVICE_NAME");if(J)try{let Y=this._parseResourceAttributes(J);Object.assign(B,Y)}catch(Y){lB.diag.debug(`EnvDetector failed: ${Y instanceof Error?Y.message:Y}`)}if(Q)B[cB.ATTR_SERVICE_NAME]=Q;return{attributes:B}}_parseResourceAttributes(q){if(!q)return{};let B={},J=q.split(this._COMMA_SEPARATOR);for(let Q of J){let Y=Q.split(this._LABEL_KEY_VALUE_SPLITTER);if(Y.length!==2)throw Error(`Invalid format for OTEL_RESOURCE_ATTRIBUTES: "${Q}". Expected format: key=value. The ',' and '=' characters must be percent-encoded in keys and values.`);let[z,w]=Y,F=z.trim(),RB=w.trim();if(F.length===0)throw Error(`Invalid OTEL_RESOURCE_ATTRIBUTES: empty attribute key in "${Q}".`);let P,m;try{P=decodeURIComponent(F),m=decodeURIComponent(RB)}catch(u){throw Error(`Failed to percent-decode OTEL_RESOURCE_ATTRIBUTES entry "${Q}": ${u instanceof Error?u.message:u}`)}if(P.length>this._MAX_LENGTH)throw Error(`Attribute key exceeds the maximum length of ${this._MAX_LENGTH} characters: "${P}".`);if(m.length>this._MAX_LENGTH)throw Error(`Attribute value exceeds the maximum length of ${this._MAX_LENGTH} characters for key "${P}".`);B[P]=m}return B}}Dq.envDetector=new Pq});var O=Z((Uq)=>{Object.defineProperty(Uq,"__esModule",{value:!0});Uq.ATTR_WEBENGINE_VERSION=Uq.ATTR_WEBENGINE_NAME=Uq.ATTR_WEBENGINE_DESCRIPTION=Uq.ATTR_SERVICE_NAMESPACE=Uq.ATTR_SERVICE_INSTANCE_ID=Uq.ATTR_PROCESS_RUNTIME_VERSION=Uq.ATTR_PROCESS_RUNTIME_NAME=Uq.ATTR_PROCESS_RUNTIME_DESCRIPTION=Uq.ATTR_PROCESS_PID=Uq.ATTR_PROCESS_OWNER=Uq.ATTR_PROCESS_EXECUTABLE_PATH=Uq.ATTR_PROCESS_EXECUTABLE_NAME=Uq.ATTR_PROCESS_COMMAND_ARGS=Uq.ATTR_PROCESS_COMMAND=Uq.ATTR_OS_VERSION=Uq.ATTR_OS_TYPE=Uq.ATTR_K8S_POD_NAME=Uq.ATTR_K8S_NAMESPACE_NAME=Uq.ATTR_K8S_DEPLOYMENT_NAME=Uq.ATTR_K8S_CLUSTER_NAME=Uq.ATTR_HOST_TYPE=Uq.ATTR_HOST_NAME=Uq.ATTR_HOST_IMAGE_VERSION=Uq.ATTR_HOST_IMAGE_NAME=Uq.ATTR_HOST_IMAGE_ID=Uq.ATTR_HOST_ID=Uq.ATTR_HOST_ARCH=Uq.ATTR_CONTAINER_NAME=Uq.ATTR_CONTAINER_IMAGE_TAGS=Uq.ATTR_CONTAINER_IMAGE_NAME=Uq.ATTR_CONTAINER_ID=Uq.ATTR_CLOUD_REGION=Uq.ATTR_CLOUD_PROVIDER=Uq.ATTR_CLOUD_AVAILABILITY_ZONE=Uq.ATTR_CLOUD_ACCOUNT_ID=void 0;Uq.ATTR_CLOUD_ACCOUNT_ID="cloud.account.id";Uq.ATTR_CLOUD_AVAILABILITY_ZONE="cloud.availability_zone";Uq.ATTR_CLOUD_PROVIDER="cloud.provider";Uq.ATTR_CLOUD_REGION="cloud.region";Uq.ATTR_CONTAINER_ID="container.id";Uq.ATTR_CONTAINER_IMAGE_NAME="container.image.name";Uq.ATTR_CONTAINER_IMAGE_TAGS="container.image.tags";Uq.ATTR_CONTAINER_NAME="container.name";Uq.ATTR_HOST_ARCH="host.arch";Uq.ATTR_HOST_ID="host.id";Uq.ATTR_HOST_IMAGE_ID="host.image.id";Uq.ATTR_HOST_IMAGE_NAME="host.image.name";Uq.ATTR_HOST_IMAGE_VERSION="host.image.version";Uq.ATTR_HOST_NAME="host.name";Uq.ATTR_HOST_TYPE="host.type";Uq.ATTR_K8S_CLUSTER_NAME="k8s.cluster.name";Uq.ATTR_K8S_DEPLOYMENT_NAME="k8s.deployment.name";Uq.ATTR_K8S_NAMESPACE_NAME="k8s.namespace.name";Uq.ATTR_K8S_POD_NAME="k8s.pod.name";Uq.ATTR_OS_TYPE="os.type";Uq.ATTR_OS_VERSION="os.version";Uq.ATTR_PROCESS_COMMAND="process.command";Uq.ATTR_PROCESS_COMMAND_ARGS="process.command_args";Uq.ATTR_PROCESS_EXECUTABLE_NAME="process.executable.name";Uq.ATTR_PROCESS_EXECUTABLE_PATH="process.executable.path";Uq.ATTR_PROCESS_OWNER="process.owner";Uq.ATTR_PROCESS_PID="process.pid";Uq.ATTR_PROCESS_RUNTIME_DESCRIPTION="process.runtime.description";Uq.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name";Uq.ATTR_PROCESS_RUNTIME_VERSION="process.runtime.version";Uq.ATTR_SERVICE_INSTANCE_ID="service.instance.id";Uq.ATTR_SERVICE_NAMESPACE="service.namespace";Uq.ATTR_WEBENGINE_DESCRIPTION="webengine.description";Uq.ATTR_WEBENGINE_NAME="webengine.name";Uq.ATTR_WEBENGINE_VERSION="webengine.version"});var hq=Z((Oq)=>{Object.defineProperty(Oq,"__esModule",{value:!0});Oq.getMachineId=void 0;var UJ=G("process"),E;async function yJ(){if(!E)switch(UJ.platform){case"darwin":E=(await import("./chunk-qp1n7kwe.js").then((m)=>K(m.default))).getMachineId;break;case"linux":E=(await import("./chunk-jww55nk9.js").then((m)=>K(m.default))).getMachineId;break;case"freebsd":E=(await import("./chunk-tg226j37.js").then((m)=>K(m.default))).getMachineId;break;case"win32":E=(await import("./chunk-m5dm7a1t.js").then((m)=>K(m.default))).getMachineId;break;default:E=(await import("./chunk-6ar91jvd.js").then((m)=>K(m.default))).getMachineId;break}return E()}Oq.getMachineId=yJ});var a=Z((Iq)=>{Object.defineProperty(Iq,"__esModule",{value:!0});Iq.normalizeType=Iq.normalizeArch=void 0;var OJ=(q)=>{switch(q){case"arm":return"arm32";case"ppc":return"ppc32";case"x64":return"amd64";default:return q}};Iq.normalizeArch=OJ;var RJ=(q)=>{switch(q){case"sunos":return"solaris";case"win32":return"windows";default:return q}};Iq.normalizeType=RJ});var gq=Z((bq)=>{Object.defineProperty(bq,"__esModule",{value:!0});bq.hostDetector=void 0;var r=O(),Sq=G("os"),IJ=hq(),TJ=a();class kq{detect(q){return{attributes:{[r.ATTR_HOST_NAME]:(0,Sq.hostname)(),[r.ATTR_HOST_ARCH]:(0,TJ.normalizeArch)((0,Sq.arch)()),[r.ATTR_HOST_ID]:(0,IJ.getMachineId)()}}}}bq.hostDetector=new kq});var uq=Z((xq)=>{Object.defineProperty(xq,"__esModule",{value:!0});xq.osDetector=void 0;var _q=O(),vq=G("os"),SJ=a();class dq{detect(q){return{attributes:{[_q.ATTR_OS_TYPE]:(0,SJ.normalizeType)((0,vq.platform)()),[_q.ATTR_OS_VERSION]:(0,vq.release)()}}}}xq.osDetector=new dq});var iq=Z((cq)=>{Object.defineProperty(cq,"__esModule",{value:!0});cq.processDetector=void 0;var kJ=y(),H=O(),bJ=G("os");class lq{detect(q){let B={[H.ATTR_PROCESS_PID]:process.pid,[H.ATTR_PROCESS_EXECUTABLE_NAME]:process.title,[H.ATTR_PROCESS_EXECUTABLE_PATH]:process.execPath,[H.ATTR_PROCESS_COMMAND_ARGS]:[process.argv[0],...process.execArgv,...process.argv.slice(1)],[H.ATTR_PROCESS_RUNTIME_VERSION]:process.versions.node,[H.ATTR_PROCESS_RUNTIME_NAME]:"nodejs",[H.ATTR_PROCESS_RUNTIME_DESCRIPTION]:"Node.js"};if(process.argv.length>1)B[H.ATTR_PROCESS_COMMAND]=process.argv[1];try{let J=bJ.userInfo();B[H.ATTR_PROCESS_OWNER]=J.username}catch(J){kJ.diag.debug(`error obtaining process owner: ${J}`)}return{attributes:B}}}cq.processDetector=new lq});var sq=Z((aq)=>{Object.defineProperty(aq,"__esModule",{value:!0});aq.serviceInstanceIdDetector=void 0;var fJ=O(),gJ=G("crypto");class nq{detect(q){return{attributes:{[fJ.ATTR_SERVICE_INSTANCE_ID]:(0,gJ.randomUUID)()}}}}aq.serviceInstanceIdDetector=new nq});var oq=Z((L)=>{Object.defineProperty(L,"__esModule",{value:!0});L.serviceInstanceIdDetector=L.processDetector=L.osDetector=L.hostDetector=void 0;var _J=gq();Object.defineProperty(L,"hostDetector",{enumerable:!0,get:function(){return _J.hostDetector}});var vJ=uq();Object.defineProperty(L,"osDetector",{enumerable:!0,get:function(){return vJ.osDetector}});var dJ=iq();Object.defineProperty(L,"processDetector",{enumerable:!0,get:function(){return dJ.processDetector}});var xJ=sq();Object.defineProperty(L,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return xJ.serviceInstanceIdDetector}})});var tq=Z((j)=>{Object.defineProperty(j,"__esModule",{value:!0});j.serviceInstanceIdDetector=j.processDetector=j.osDetector=j.hostDetector=void 0;var k=oq();Object.defineProperty(j,"hostDetector",{enumerable:!0,get:function(){return k.hostDetector}});Object.defineProperty(j,"osDetector",{enumerable:!0,get:function(){return k.osDetector}});Object.defineProperty(j,"processDetector",{enumerable:!0,get:function(){return k.processDetector}});Object.defineProperty(j,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return k.serviceInstanceIdDetector}})});var BB=Z((eq)=>{Object.defineProperty(eq,"__esModule",{value:!0});eq.noopDetector=eq.NoopDetector=void 0;class s{detect(){return{attributes:{}}}}eq.NoopDetector=s;eq.noopDetector=new s});var JB=Z((V)=>{Object.defineProperty(V,"__esModule",{value:!0});V.noopDetector=V.serviceInstanceIdDetector=V.processDetector=V.osDetector=V.hostDetector=V.envDetector=void 0;var cJ=Aq();Object.defineProperty(V,"envDetector",{enumerable:!0,get:function(){return cJ.envDetector}});var b=tq();Object.defineProperty(V,"hostDetector",{enumerable:!0,get:function(){return b.hostDetector}});Object.defineProperty(V,"osDetector",{enumerable:!0,get:function(){return b.osDetector}});Object.defineProperty(V,"processDetector",{enumerable:!0,get:function(){return b.processDetector}});Object.defineProperty(V,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return b.serviceInstanceIdDetector}});var pJ=BB();Object.defineProperty(V,"noopDetector",{enumerable:!0,get:function(){return pJ.noopDetector}})});var QB=Z((W)=>{Object.defineProperty(W,"__esModule",{value:!0});W.defaultServiceName=W.emptyResource=W.defaultResource=W.resourceFromAttributes=W.serviceInstanceIdDetector=W.processDetector=W.osDetector=W.hostDetector=W.envDetector=W.detectResources=void 0;var nJ=Lq();Object.defineProperty(W,"detectResources",{enumerable:!0,get:function(){return nJ.detectResources}});var R=JB();Object.defineProperty(W,"envDetector",{enumerable:!0,get:function(){return R.envDetector}});Object.defineProperty(W,"hostDetector",{enumerable:!0,get:function(){return R.hostDetector}});Object.defineProperty(W,"osDetector",{enumerable:!0,get:function(){return R.osDetector}});Object.defineProperty(W,"processDetector",{enumerable:!0,get:function(){return R.processDetector}});Object.defineProperty(W,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return R.serviceInstanceIdDetector}});var o=i();Object.defineProperty(W,"resourceFromAttributes",{enumerable:!0,get:function(){return o.resourceFromAttributes}});Object.defineProperty(W,"defaultResource",{enumerable:!0,get:function(){return o.defaultResource}});Object.defineProperty(W,"emptyResource",{enumerable:!0,get:function(){return o.emptyResource}});var aJ=l();Object.defineProperty(W,"defaultServiceName",{enumerable:!0,get:function(){return aJ.defaultServiceName}})});var g=K(QB(),1),$=K(S(),1);class I extends N()("@effect/opentelemetry/Resource"){}var iQ=(q)=>{let B={...q.attributes??void 0,[$.ATTR_SERVICE_NAME]:q.serviceName,[$.ATTR_TELEMETRY_SDK_NAME]:"@effect/opentelemetry",[$.ATTR_TELEMETRY_SDK_LANGUAGE]:typeof globalThis.document>"u"?$.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:$.TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS};if(q.serviceVersion)B[$.ATTR_SERVICE_VERSION]=q.serviceVersion;return B},nQ=(q)=>h(I,f(function*(){let B=yield*zB(t("OTEL_SERVICE_NAME")),J=yield*t("OTEL_RESOURCE_ATTRIBUTES").pipe(WB(""),$B((Q)=>{let Y=Q.split(",");return XB(Y,{},(z,w)=>{let F=w.split("=");if(F.length!==2)return z;return z[F[0].trim()]=F[1].trim(),z})}));if(B._tag==="Some")J[$.ATTR_SERVICE_NAME]=B.value;if(q)Object.assign(J,q);return g.resourceFromAttributes(J)}).pipe(ZB)),aQ=YB(I,g.emptyResource());var X=K(y(),1),x=K(S(),1);var GB=BigInt(1e9),_=(q)=>{return[Number(q/GB),Number(q%GB)]},v=(q)=>{let B={};for(let[J,Q]of Object.entries(q))B[J]=e(Q);return B},e=(q)=>{if(typeof q==="string"||typeof q==="number"||typeof q==="boolean")return q;else if(typeof q==="bigint")return q.toString();return KB(q)};class Yq extends N()("@effect/opentelemetry/Tracer"){}class UB extends N()("@effect/opentelemetry/Tracer/OtelTracerProvider"){}class Bq extends N()("@effect/opentelemetry/Tracer/OtelTraceFlags"){}class Jq extends N()("@effect/opentelemetry/Tracer/OtelTraceState"){}var eJ=MB(AB(Yq),(q)=>NB({span(B){return new Zq(X.context,X.trace,q,B)},context(B,J){let Q=J.currentSpan;if(Q===void 0)return B["~effect/Effect/evaluate"](J);return X.context.with(OB(X.context.active(),Q),()=>B["~effect/Effect/evaluate"](J))}}));var qQ=h(Yq,f(function*(){let q=yield*I;return(yield*UB).getTracer(q.attributes[x.ATTR_SERVICE_NAME],q.attributes[x.ATTR_SERVICE_VERSION])}));var BQ=h(FB,eJ),VX=BQ.pipe(DB(qQ));var qq="~@effect/opentelemetry/Tracer/OtelSpan",JQ={internal:X.SpanKind.INTERNAL,client:X.SpanKind.CLIENT,server:X.SpanKind.SERVER,producer:X.SpanKind.PRODUCER,consumer:X.SpanKind.CONSUMER};class Zq{[qq];_tag="Span";name;kind;annotations;links;span;spanId;traceId;attributes=new Map;sampled;parent;status;constructor(q,B,J,Q){this[qq]=qq,this.name=Q.name,this.annotations=Q.annotations,this.links=Q.links,this.kind=Q.kind;let Y=q.active();this.parent=Q.root!==!0?EB(Q.parent,()=>XQ(B,Y,Q.annotations)):Q.parent,this.span=J.startSpan(Q.name,{startTime:_(Q.startTime),links:Q.links.length>0?Q.links.map((w)=>({context:Qq(w.span),attributes:v(w.attributes)})):void 0,kind:JQ[this.kind]},CB(this.parent)?OB(Y,this.parent.value,Q.annotations):X.trace.deleteSpan(Y));let z=this.span.spanContext();this.spanId=z.spanId,this.traceId=z.traceId,this.status={_tag:"Started",startTime:Q.startTime},this.sampled=QQ(z.traceFlags)}attribute(q,B){this.span.setAttribute(q,e(B)),this.attributes.set(q,B)}addLinks(q){this.links.push(...q),this.span.addLinks(q.map((B)=>({context:Qq(B.span),attributes:v(B.attributes)})))}end(q,B){let J=_(q);if(this.status={_tag:"Ended",endTime:q,exit:B,startTime:this.status.startTime},B._tag==="Success")this.span.setStatus({code:X.SpanStatusCode.OK});else if(LB(B.cause))this.span.setStatus({code:X.SpanStatusCode.OK,message:PB(B.cause)}),this.span.setAttribute("span.label","\u26A0\uFE0E Interrupted"),this.span.setAttribute("status.interrupted",!0);else{let Q=jB(B.cause);if(Q.length>0){for(let Y of Q)this.span.recordException(Y,J);this.span.setStatus({code:X.SpanStatusCode.ERROR,message:Q[0].message})}else this.span.setStatus({code:X.SpanStatusCode.OK})}this.span.end(J)}event(q,B,J){this.span.addEvent(q,J?v(J):void 0,_(B))}}var QQ=(q)=>(q&X.TraceFlags.SAMPLED)===X.TraceFlags.SAMPLED,XQ=(q,B,J)=>{let Q=q.getSpan(B)?.spanContext();if(!Q)return HB();return VB(wB({spanId:Q.spanId,traceId:Q.traceId,sampled:(Q.traceFlags&1)===1,annotations:J}))},Qq=(q,B)=>{let J=YQ(q,B),Q=ZQ(q,B);return{spanId:q.spanId,traceId:q.traceId,isRemote:q._tag==="ExternalSpan",traceFlags:J,traceState:Q}},YQ=(q,B)=>{let J;if(d(B)){if(J=yB(q,B,Bq),Xq(J))J=T(q.annotations,Bq)}return J??X.TraceFlags.SAMPLED},ZQ=(q,B)=>{let J;if(d(B)){if(J=yB(q,B,Jq),Xq(J))J=T(q.annotations,Jq)}return J},yB=(q,B,J)=>{let Q=T(B,J);if(d(Q))return Q;return T(q.annotations,J)},OB=(q,B,J)=>B instanceof Zq?X.trace.setSpan(q,B.span):X.trace.setSpanContext(q,Qq(B,J));
3
- export{QB as jq,_ as kq,e as lq,I as mq,iQ as nq,nQ as oq,aQ as pq,Yq as qq,UB as rq,VX as sq};
2
+ import{Tr as S,Ur as Vq}from"./chunk-eeq0krp7.js";import{$G as MB,AC as VB,BP as t,CC as CB,EH as AB,FC as EB,MC as N,MD as XB,OG as f,SC as T,TF as YB,WB as KB,WF as h,ZE as LB,aG as DB,bF as jB,cF as PB,fE as NB,gE as wB,iE as FB,jH as ZB,uB as Xq,vB as d,wP as $B,xP as WB,yP as zB,zC as HB}from"./chunk-tezrgfc6.js";import{RP as y}from"./chunk-kry4vcrf.js";import{SP as K,TP as Z,WP as G}from"./chunk-f2pv705d.js";var l=Z(($q)=>{Object.defineProperty($q,"__esModule",{value:!0});$q._clearDefaultServiceNameCache=$q.defaultServiceName=void 0;var D;function hB(){if(D===void 0)try{let q=globalThis.process.argv0;D=q?`unknown_service:${q}`:"unknown_service"}catch{D="unknown_service"}return D}$q.defaultServiceName=hB;function IB(){D=void 0}$q._clearDefaultServiceNameCache=IB});var Kq=Z((zq)=>{Object.defineProperty(zq,"__esModule",{value:!0});zq.isPromiseLike=void 0;var SB=(q)=>{return q!==null&&typeof q==="object"&&typeof q.then==="function"};zq.isPromiseLike=SB});var i=Z((Cq)=>{Object.defineProperty(Cq,"__esModule",{value:!0});Cq.defaultResource=Cq.emptyResource=Cq.resourceFromDetectedResource=Cq.resourceFromAttributes=void 0;var A=y(),c=Vq(),C=S(),kB=l(),M=Kq();class U{_rawAttributes;_asyncAttributesPending=!1;_schemaUrl;_memoizedAttributes;static FromAttributeList(q,B){let J=new U({},B);return J._rawAttributes=Hq(q),J._asyncAttributesPending=q.filter(([Q,Y])=>(0,M.isPromiseLike)(Y)).length>0,J}constructor(q,B){let J=q.attributes??{};this._rawAttributes=Object.entries(J).map(([Q,Y])=>{if((0,M.isPromiseLike)(Y))this._asyncAttributesPending=!0;return[Q,Y]}),this._rawAttributes=Hq(this._rawAttributes),this._schemaUrl=_B(B?.schemaUrl)}get asyncAttributesPending(){return this._asyncAttributesPending}async waitForAsyncAttributes(){if(!this.asyncAttributesPending)return;for(let q=0;q<this._rawAttributes.length;q++){let[B,J]=this._rawAttributes[q];this._rawAttributes[q]=[B,(0,M.isPromiseLike)(J)?await J:J]}this._asyncAttributesPending=!1}get attributes(){if(this.asyncAttributesPending)A.diag.error("Accessing resource attributes before async attributes settled");if(this._memoizedAttributes)return this._memoizedAttributes;let q={};for(let[B,J]of this._rawAttributes){if((0,M.isPromiseLike)(J)){A.diag.debug(`Unsettled resource attribute ${B} skipped`);continue}if(J!=null)q[B]??=J}if(!this._asyncAttributesPending)this._memoizedAttributes=q;return q}getRawAttributes(){return this._rawAttributes}get schemaUrl(){return this._schemaUrl}merge(q){if(q==null)return this;let B=vB(this,q),J=B?{schemaUrl:B}:void 0;return U.FromAttributeList([...q.getRawAttributes(),...this.getRawAttributes()],J)}}function p(q,B){return U.FromAttributeList(Object.entries(q),B)}Cq.resourceFromAttributes=p;function bB(q,B){return new U(q,B)}Cq.resourceFromDetectedResource=bB;function fB(){return p({})}Cq.emptyResource=fB;function gB(){return p({[C.ATTR_SERVICE_NAME]:(0,kB.defaultServiceName)(),[C.ATTR_TELEMETRY_SDK_LANGUAGE]:c.SDK_INFO[C.ATTR_TELEMETRY_SDK_LANGUAGE],[C.ATTR_TELEMETRY_SDK_NAME]:c.SDK_INFO[C.ATTR_TELEMETRY_SDK_NAME],[C.ATTR_TELEMETRY_SDK_VERSION]:c.SDK_INFO[C.ATTR_TELEMETRY_SDK_VERSION]})}Cq.defaultResource=gB;function Hq(q){return q.map(([B,J])=>{if((0,M.isPromiseLike)(J))return[B,J.catch((Q)=>{A.diag.debug("promise rejection for resource attribute: %s - %s",B,Q);return})];return[B,J]})}function _B(q){if(typeof q==="string"||q===void 0)return q;A.diag.warn("Schema URL must be string or undefined, got %s. Schema URL will be ignored.",q);return}function vB(q,B){let J=q?.schemaUrl,Q=B?.schemaUrl,Y=J===void 0||J==="",z=Q===void 0||Q==="";if(Y)return Q;if(z)return J;if(J===Q)return J;A.diag.warn('Schema URL merge conflict: old resource has "%s", updating resource has "%s". Resulting resource will have undefined Schema URL.',J,Q);return}});var Lq=Z((wq)=>{Object.defineProperty(wq,"__esModule",{value:!0});wq.detectResources=void 0;var Nq=y(),n=i(),uB=(q={})=>{return(q.detectors||[]).map((J)=>{try{let Q=(0,n.resourceFromDetectedResource)(J.detect(q));return Nq.diag.debug(`${J.constructor.name} found resource.`,Q),Q}catch(Q){return Nq.diag.debug(`${J.constructor.name} failed: ${Q.message}`),(0,n.emptyResource)()}}).reduce((J,Q)=>J.merge(Q),(0,n.emptyResource)())};wq.detectResources=uB});var Aq=Z((Dq)=>{Object.defineProperty(Dq,"__esModule",{value:!0});Dq.envDetector=void 0;var lB=y(),cB=S(),jq=Vq();class Pq{_MAX_LENGTH=255;_COMMA_SEPARATOR=",";_LABEL_KEY_VALUE_SPLITTER="=";detect(q){let B={},J=(0,jq.getStringFromEnv)("OTEL_RESOURCE_ATTRIBUTES"),Q=(0,jq.getStringFromEnv)("OTEL_SERVICE_NAME");if(J)try{let Y=this._parseResourceAttributes(J);Object.assign(B,Y)}catch(Y){lB.diag.debug(`EnvDetector failed: ${Y instanceof Error?Y.message:Y}`)}if(Q)B[cB.ATTR_SERVICE_NAME]=Q;return{attributes:B}}_parseResourceAttributes(q){if(!q)return{};let B={},J=q.split(this._COMMA_SEPARATOR);for(let Q of J){let Y=Q.split(this._LABEL_KEY_VALUE_SPLITTER);if(Y.length!==2)throw Error(`Invalid format for OTEL_RESOURCE_ATTRIBUTES: "${Q}". Expected format: key=value. The ',' and '=' characters must be percent-encoded in keys and values.`);let[z,w]=Y,F=z.trim(),RB=w.trim();if(F.length===0)throw Error(`Invalid OTEL_RESOURCE_ATTRIBUTES: empty attribute key in "${Q}".`);let P,m;try{P=decodeURIComponent(F),m=decodeURIComponent(RB)}catch(u){throw Error(`Failed to percent-decode OTEL_RESOURCE_ATTRIBUTES entry "${Q}": ${u instanceof Error?u.message:u}`)}if(P.length>this._MAX_LENGTH)throw Error(`Attribute key exceeds the maximum length of ${this._MAX_LENGTH} characters: "${P}".`);if(m.length>this._MAX_LENGTH)throw Error(`Attribute value exceeds the maximum length of ${this._MAX_LENGTH} characters for key "${P}".`);B[P]=m}return B}}Dq.envDetector=new Pq});var O=Z((Uq)=>{Object.defineProperty(Uq,"__esModule",{value:!0});Uq.ATTR_WEBENGINE_VERSION=Uq.ATTR_WEBENGINE_NAME=Uq.ATTR_WEBENGINE_DESCRIPTION=Uq.ATTR_SERVICE_NAMESPACE=Uq.ATTR_SERVICE_INSTANCE_ID=Uq.ATTR_PROCESS_RUNTIME_VERSION=Uq.ATTR_PROCESS_RUNTIME_NAME=Uq.ATTR_PROCESS_RUNTIME_DESCRIPTION=Uq.ATTR_PROCESS_PID=Uq.ATTR_PROCESS_OWNER=Uq.ATTR_PROCESS_EXECUTABLE_PATH=Uq.ATTR_PROCESS_EXECUTABLE_NAME=Uq.ATTR_PROCESS_COMMAND_ARGS=Uq.ATTR_PROCESS_COMMAND=Uq.ATTR_OS_VERSION=Uq.ATTR_OS_TYPE=Uq.ATTR_K8S_POD_NAME=Uq.ATTR_K8S_NAMESPACE_NAME=Uq.ATTR_K8S_DEPLOYMENT_NAME=Uq.ATTR_K8S_CLUSTER_NAME=Uq.ATTR_HOST_TYPE=Uq.ATTR_HOST_NAME=Uq.ATTR_HOST_IMAGE_VERSION=Uq.ATTR_HOST_IMAGE_NAME=Uq.ATTR_HOST_IMAGE_ID=Uq.ATTR_HOST_ID=Uq.ATTR_HOST_ARCH=Uq.ATTR_CONTAINER_NAME=Uq.ATTR_CONTAINER_IMAGE_TAGS=Uq.ATTR_CONTAINER_IMAGE_NAME=Uq.ATTR_CONTAINER_ID=Uq.ATTR_CLOUD_REGION=Uq.ATTR_CLOUD_PROVIDER=Uq.ATTR_CLOUD_AVAILABILITY_ZONE=Uq.ATTR_CLOUD_ACCOUNT_ID=void 0;Uq.ATTR_CLOUD_ACCOUNT_ID="cloud.account.id";Uq.ATTR_CLOUD_AVAILABILITY_ZONE="cloud.availability_zone";Uq.ATTR_CLOUD_PROVIDER="cloud.provider";Uq.ATTR_CLOUD_REGION="cloud.region";Uq.ATTR_CONTAINER_ID="container.id";Uq.ATTR_CONTAINER_IMAGE_NAME="container.image.name";Uq.ATTR_CONTAINER_IMAGE_TAGS="container.image.tags";Uq.ATTR_CONTAINER_NAME="container.name";Uq.ATTR_HOST_ARCH="host.arch";Uq.ATTR_HOST_ID="host.id";Uq.ATTR_HOST_IMAGE_ID="host.image.id";Uq.ATTR_HOST_IMAGE_NAME="host.image.name";Uq.ATTR_HOST_IMAGE_VERSION="host.image.version";Uq.ATTR_HOST_NAME="host.name";Uq.ATTR_HOST_TYPE="host.type";Uq.ATTR_K8S_CLUSTER_NAME="k8s.cluster.name";Uq.ATTR_K8S_DEPLOYMENT_NAME="k8s.deployment.name";Uq.ATTR_K8S_NAMESPACE_NAME="k8s.namespace.name";Uq.ATTR_K8S_POD_NAME="k8s.pod.name";Uq.ATTR_OS_TYPE="os.type";Uq.ATTR_OS_VERSION="os.version";Uq.ATTR_PROCESS_COMMAND="process.command";Uq.ATTR_PROCESS_COMMAND_ARGS="process.command_args";Uq.ATTR_PROCESS_EXECUTABLE_NAME="process.executable.name";Uq.ATTR_PROCESS_EXECUTABLE_PATH="process.executable.path";Uq.ATTR_PROCESS_OWNER="process.owner";Uq.ATTR_PROCESS_PID="process.pid";Uq.ATTR_PROCESS_RUNTIME_DESCRIPTION="process.runtime.description";Uq.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name";Uq.ATTR_PROCESS_RUNTIME_VERSION="process.runtime.version";Uq.ATTR_SERVICE_INSTANCE_ID="service.instance.id";Uq.ATTR_SERVICE_NAMESPACE="service.namespace";Uq.ATTR_WEBENGINE_DESCRIPTION="webengine.description";Uq.ATTR_WEBENGINE_NAME="webengine.name";Uq.ATTR_WEBENGINE_VERSION="webengine.version"});var hq=Z((Oq)=>{Object.defineProperty(Oq,"__esModule",{value:!0});Oq.getMachineId=void 0;var UJ=G("process"),E;async function yJ(){if(!E)switch(UJ.platform){case"darwin":E=(await import("./chunk-egkhynj5.js").then((m)=>K(m.default))).getMachineId;break;case"linux":E=(await import("./chunk-dgva3y5v.js").then((m)=>K(m.default))).getMachineId;break;case"freebsd":E=(await import("./chunk-rhrcgvb8.js").then((m)=>K(m.default))).getMachineId;break;case"win32":E=(await import("./chunk-2pex3ak9.js").then((m)=>K(m.default))).getMachineId;break;default:E=(await import("./chunk-1c0yp2gv.js").then((m)=>K(m.default))).getMachineId;break}return E()}Oq.getMachineId=yJ});var a=Z((Iq)=>{Object.defineProperty(Iq,"__esModule",{value:!0});Iq.normalizeType=Iq.normalizeArch=void 0;var OJ=(q)=>{switch(q){case"arm":return"arm32";case"ppc":return"ppc32";case"x64":return"amd64";default:return q}};Iq.normalizeArch=OJ;var RJ=(q)=>{switch(q){case"sunos":return"solaris";case"win32":return"windows";default:return q}};Iq.normalizeType=RJ});var gq=Z((bq)=>{Object.defineProperty(bq,"__esModule",{value:!0});bq.hostDetector=void 0;var r=O(),Sq=G("os"),IJ=hq(),TJ=a();class kq{detect(q){return{attributes:{[r.ATTR_HOST_NAME]:(0,Sq.hostname)(),[r.ATTR_HOST_ARCH]:(0,TJ.normalizeArch)((0,Sq.arch)()),[r.ATTR_HOST_ID]:(0,IJ.getMachineId)()}}}}bq.hostDetector=new kq});var uq=Z((xq)=>{Object.defineProperty(xq,"__esModule",{value:!0});xq.osDetector=void 0;var _q=O(),vq=G("os"),SJ=a();class dq{detect(q){return{attributes:{[_q.ATTR_OS_TYPE]:(0,SJ.normalizeType)((0,vq.platform)()),[_q.ATTR_OS_VERSION]:(0,vq.release)()}}}}xq.osDetector=new dq});var iq=Z((cq)=>{Object.defineProperty(cq,"__esModule",{value:!0});cq.processDetector=void 0;var kJ=y(),H=O(),bJ=G("os");class lq{detect(q){let B={[H.ATTR_PROCESS_PID]:process.pid,[H.ATTR_PROCESS_EXECUTABLE_NAME]:process.title,[H.ATTR_PROCESS_EXECUTABLE_PATH]:process.execPath,[H.ATTR_PROCESS_COMMAND_ARGS]:[process.argv[0],...process.execArgv,...process.argv.slice(1)],[H.ATTR_PROCESS_RUNTIME_VERSION]:process.versions.node,[H.ATTR_PROCESS_RUNTIME_NAME]:"nodejs",[H.ATTR_PROCESS_RUNTIME_DESCRIPTION]:"Node.js"};if(process.argv.length>1)B[H.ATTR_PROCESS_COMMAND]=process.argv[1];try{let J=bJ.userInfo();B[H.ATTR_PROCESS_OWNER]=J.username}catch(J){kJ.diag.debug(`error obtaining process owner: ${J}`)}return{attributes:B}}}cq.processDetector=new lq});var sq=Z((aq)=>{Object.defineProperty(aq,"__esModule",{value:!0});aq.serviceInstanceIdDetector=void 0;var fJ=O(),gJ=G("crypto");class nq{detect(q){return{attributes:{[fJ.ATTR_SERVICE_INSTANCE_ID]:(0,gJ.randomUUID)()}}}}aq.serviceInstanceIdDetector=new nq});var oq=Z((L)=>{Object.defineProperty(L,"__esModule",{value:!0});L.serviceInstanceIdDetector=L.processDetector=L.osDetector=L.hostDetector=void 0;var _J=gq();Object.defineProperty(L,"hostDetector",{enumerable:!0,get:function(){return _J.hostDetector}});var vJ=uq();Object.defineProperty(L,"osDetector",{enumerable:!0,get:function(){return vJ.osDetector}});var dJ=iq();Object.defineProperty(L,"processDetector",{enumerable:!0,get:function(){return dJ.processDetector}});var xJ=sq();Object.defineProperty(L,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return xJ.serviceInstanceIdDetector}})});var tq=Z((j)=>{Object.defineProperty(j,"__esModule",{value:!0});j.serviceInstanceIdDetector=j.processDetector=j.osDetector=j.hostDetector=void 0;var k=oq();Object.defineProperty(j,"hostDetector",{enumerable:!0,get:function(){return k.hostDetector}});Object.defineProperty(j,"osDetector",{enumerable:!0,get:function(){return k.osDetector}});Object.defineProperty(j,"processDetector",{enumerable:!0,get:function(){return k.processDetector}});Object.defineProperty(j,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return k.serviceInstanceIdDetector}})});var BB=Z((eq)=>{Object.defineProperty(eq,"__esModule",{value:!0});eq.noopDetector=eq.NoopDetector=void 0;class s{detect(){return{attributes:{}}}}eq.NoopDetector=s;eq.noopDetector=new s});var JB=Z((V)=>{Object.defineProperty(V,"__esModule",{value:!0});V.noopDetector=V.serviceInstanceIdDetector=V.processDetector=V.osDetector=V.hostDetector=V.envDetector=void 0;var cJ=Aq();Object.defineProperty(V,"envDetector",{enumerable:!0,get:function(){return cJ.envDetector}});var b=tq();Object.defineProperty(V,"hostDetector",{enumerable:!0,get:function(){return b.hostDetector}});Object.defineProperty(V,"osDetector",{enumerable:!0,get:function(){return b.osDetector}});Object.defineProperty(V,"processDetector",{enumerable:!0,get:function(){return b.processDetector}});Object.defineProperty(V,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return b.serviceInstanceIdDetector}});var pJ=BB();Object.defineProperty(V,"noopDetector",{enumerable:!0,get:function(){return pJ.noopDetector}})});var QB=Z((W)=>{Object.defineProperty(W,"__esModule",{value:!0});W.defaultServiceName=W.emptyResource=W.defaultResource=W.resourceFromAttributes=W.serviceInstanceIdDetector=W.processDetector=W.osDetector=W.hostDetector=W.envDetector=W.detectResources=void 0;var nJ=Lq();Object.defineProperty(W,"detectResources",{enumerable:!0,get:function(){return nJ.detectResources}});var R=JB();Object.defineProperty(W,"envDetector",{enumerable:!0,get:function(){return R.envDetector}});Object.defineProperty(W,"hostDetector",{enumerable:!0,get:function(){return R.hostDetector}});Object.defineProperty(W,"osDetector",{enumerable:!0,get:function(){return R.osDetector}});Object.defineProperty(W,"processDetector",{enumerable:!0,get:function(){return R.processDetector}});Object.defineProperty(W,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return R.serviceInstanceIdDetector}});var o=i();Object.defineProperty(W,"resourceFromAttributes",{enumerable:!0,get:function(){return o.resourceFromAttributes}});Object.defineProperty(W,"defaultResource",{enumerable:!0,get:function(){return o.defaultResource}});Object.defineProperty(W,"emptyResource",{enumerable:!0,get:function(){return o.emptyResource}});var aJ=l();Object.defineProperty(W,"defaultServiceName",{enumerable:!0,get:function(){return aJ.defaultServiceName}})});var g=K(QB(),1),$=K(S(),1);class I extends N()("@effect/opentelemetry/Resource"){}var iQ=(q)=>{let B={...q.attributes??void 0,[$.ATTR_SERVICE_NAME]:q.serviceName,[$.ATTR_TELEMETRY_SDK_NAME]:"@effect/opentelemetry",[$.ATTR_TELEMETRY_SDK_LANGUAGE]:typeof globalThis.document>"u"?$.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:$.TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS};if(q.serviceVersion)B[$.ATTR_SERVICE_VERSION]=q.serviceVersion;return B},nQ=(q)=>h(I,f(function*(){let B=yield*zB(t("OTEL_SERVICE_NAME")),J=yield*t("OTEL_RESOURCE_ATTRIBUTES").pipe(WB(""),$B((Q)=>{let Y=Q.split(",");return XB(Y,{},(z,w)=>{let F=w.split("=");if(F.length!==2)return z;return z[F[0].trim()]=F[1].trim(),z})}));if(B._tag==="Some")J[$.ATTR_SERVICE_NAME]=B.value;if(q)Object.assign(J,q);return g.resourceFromAttributes(J)}).pipe(ZB)),aQ=YB(I,g.emptyResource());var X=K(y(),1),x=K(S(),1);var GB=BigInt(1e9),_=(q)=>{return[Number(q/GB),Number(q%GB)]},v=(q)=>{let B={};for(let[J,Q]of Object.entries(q))B[J]=e(Q);return B},e=(q)=>{if(typeof q==="string"||typeof q==="number"||typeof q==="boolean")return q;else if(typeof q==="bigint")return q.toString();return KB(q)};class Yq extends N()("@effect/opentelemetry/Tracer"){}class UB extends N()("@effect/opentelemetry/Tracer/OtelTracerProvider"){}class Bq extends N()("@effect/opentelemetry/Tracer/OtelTraceFlags"){}class Jq extends N()("@effect/opentelemetry/Tracer/OtelTraceState"){}var eJ=MB(AB(Yq),(q)=>NB({span(B){return new Zq(X.context,X.trace,q,B)},context(B,J){let Q=J.currentSpan;if(Q===void 0)return B["~effect/Effect/evaluate"](J);return X.context.with(OB(X.context.active(),Q),()=>B["~effect/Effect/evaluate"](J))}}));var qQ=h(Yq,f(function*(){let q=yield*I;return(yield*UB).getTracer(q.attributes[x.ATTR_SERVICE_NAME],q.attributes[x.ATTR_SERVICE_VERSION])}));var BQ=h(FB,eJ),VX=BQ.pipe(DB(qQ));var qq="~@effect/opentelemetry/Tracer/OtelSpan",JQ={internal:X.SpanKind.INTERNAL,client:X.SpanKind.CLIENT,server:X.SpanKind.SERVER,producer:X.SpanKind.PRODUCER,consumer:X.SpanKind.CONSUMER};class Zq{[qq];_tag="Span";name;kind;annotations;links;span;spanId;traceId;attributes=new Map;sampled;parent;status;constructor(q,B,J,Q){this[qq]=qq,this.name=Q.name,this.annotations=Q.annotations,this.links=Q.links,this.kind=Q.kind;let Y=q.active();this.parent=Q.root!==!0?EB(Q.parent,()=>XQ(B,Y,Q.annotations)):Q.parent,this.span=J.startSpan(Q.name,{startTime:_(Q.startTime),links:Q.links.length>0?Q.links.map((w)=>({context:Qq(w.span),attributes:v(w.attributes)})):void 0,kind:JQ[this.kind]},CB(this.parent)?OB(Y,this.parent.value,Q.annotations):X.trace.deleteSpan(Y));let z=this.span.spanContext();this.spanId=z.spanId,this.traceId=z.traceId,this.status={_tag:"Started",startTime:Q.startTime},this.sampled=QQ(z.traceFlags)}attribute(q,B){this.span.setAttribute(q,e(B)),this.attributes.set(q,B)}addLinks(q){this.links.push(...q),this.span.addLinks(q.map((B)=>({context:Qq(B.span),attributes:v(B.attributes)})))}end(q,B){let J=_(q);if(this.status={_tag:"Ended",endTime:q,exit:B,startTime:this.status.startTime},B._tag==="Success")this.span.setStatus({code:X.SpanStatusCode.OK});else if(LB(B.cause))this.span.setStatus({code:X.SpanStatusCode.OK,message:PB(B.cause)}),this.span.setAttribute("span.label","\u26A0\uFE0E Interrupted"),this.span.setAttribute("status.interrupted",!0);else{let Q=jB(B.cause);if(Q.length>0){for(let Y of Q)this.span.recordException(Y,J);this.span.setStatus({code:X.SpanStatusCode.ERROR,message:Q[0].message})}else this.span.setStatus({code:X.SpanStatusCode.OK})}this.span.end(J)}event(q,B,J){this.span.addEvent(q,J?v(J):void 0,_(B))}}var QQ=(q)=>(q&X.TraceFlags.SAMPLED)===X.TraceFlags.SAMPLED,XQ=(q,B,J)=>{let Q=q.getSpan(B)?.spanContext();if(!Q)return HB();return VB(wB({spanId:Q.spanId,traceId:Q.traceId,sampled:(Q.traceFlags&1)===1,annotations:J}))},Qq=(q,B)=>{let J=YQ(q,B),Q=ZQ(q,B);return{spanId:q.spanId,traceId:q.traceId,isRemote:q._tag==="ExternalSpan",traceFlags:J,traceState:Q}},YQ=(q,B)=>{let J;if(d(B)){if(J=yB(q,B,Bq),Xq(J))J=T(q.annotations,Bq)}return J??X.TraceFlags.SAMPLED},ZQ=(q,B)=>{let J;if(d(B)){if(J=yB(q,B,Jq),Xq(J))J=T(q.annotations,Jq)}return J},yB=(q,B,J)=>{let Q=T(B,J);if(d(Q))return Q;return T(q.annotations,J)},OB=(q,B,J)=>B instanceof Zq?X.trace.setSpan(q,B.span):X.trace.setSpanContext(q,Qq(B,J));
3
+ export{QB as Jr,_ as Kr,e as Lr,I as Mr,iQ as Nr,nQ as Or,aQ as Pr,Yq as Qr,UB as Rr,VX as Sr};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{tO as q,wO as b}from"./chunk-r9w0thdk.js";var z=q((f)=>{Object.defineProperty(f,"__esModule",{value:!0});f.execAsync=void 0;var v=b("child_process"),w=b("util");f.execAsync=w.promisify(v.exec)});
3
- export{z as qO};
2
+ import{TP as q,WP as b}from"./chunk-f2pv705d.js";var z=q((f)=>{Object.defineProperty(f,"__esModule",{value:!0});f.execAsync=void 0;var v=b("child_process"),w=b("util");f.execAsync=w.promisify(v.exec)});
3
+ export{z as QP};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{op as a}from"./chunk-0gsw04hw.js";import"./chunk-vjn54xj5.js";import"./chunk-aa2n02qk.js";import"./chunk-t8sy5sgx.js";import"./chunk-tezrgfc6.js";import"./chunk-f2pv705d.js";export{a as which};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{Nd as W$}from"./chunk-fsqses4g.js";import{Pd as j$}from"./chunk-da6kggv7.js";import{ae as A$}from"./chunk-5w76kdjr.js";import{Yf as J$}from"./chunk-cbnkx933.js";import{kg as Z$}from"./chunk-kengqzja.js";import"./chunk-5asx1706.js";import"./chunk-43ttzy29.js";import"./chunk-pe2xdkez.js";import"./chunk-f0t7rryn.js";import"./chunk-nfg7nt13.js";import"./chunk-450fef7h.js";import"./chunk-ycvwpmd9.js";import{Bh as MD,qh as hD}from"./chunk-hjt94wce.js";import"./chunk-w46g7kdq.js";import"./chunk-bd21p9zz.js";import"./chunk-p54bzjtv.js";import"./chunk-ha1w0xzh.js";import"./chunk-6m9jb0s9.js";import"./chunk-vygkwwjd.js";import{$j as P,Sk as _$,Tk as U,Uj as sD,Vk as G$,_j as k}from"./chunk-k3dacdp5.js";import"./chunk-99s035f0.js";import"./chunk-h9wh48d0.js";import"./chunk-tzb26ntq.js";import"./chunk-mh19kwzw.js";import"./chunk-q3h42a94.js";import"./chunk-hqbbs9dm.js";import"./chunk-9zm6r55d.js";import"./chunk-vcygx6hs.js";import"./chunk-khzzmyk2.js";import"./chunk-y7hgevfv.js";import"./chunk-47k5jy1p.js";import{ao as X$,go as Y$}from"./chunk-cfhfc86j.js";import"./chunk-ph8hn1wt.js";import{Qp as f$}from"./chunk-ptqk1j2r.js";import"./chunk-cqtkxwd8.js";import"./chunk-pr7z5dj8.js";import"./chunk-dnnkq5y4.js";import"./chunk-t239rvej.js";import"./chunk-yz25607t.js";import"./chunk-7hvf9dgx.js";import"./chunk-wkg3c643.js";import"./chunk-fhqfqd5v.js";import"./chunk-q3nvzhyh.js";import"./chunk-5df5aja0.js";import"./chunk-73r8bjjz.js";import"./chunk-xy0gnpen.js";import"./chunk-ztyy3ga3.js";import"./chunk-mmjgf680.js";import"./chunk-nj1ntakd.js";import"./chunk-cmb62jkt.js";import"./chunk-tkrwcjkr.js";import"./chunk-vdrz2t9c.js";import{ds as Q$}from"./chunk-fr34mnyg.js";import"./chunk-r5zy4za0.js";import{Ws as H}from"./chunk-tr6rdr6h.js";import{ft as kD,gt as w$}from"./chunk-at22twxx.js";import"./chunk-kgptyf7n.js";import{Jt as D}from"./chunk-j9h1sp4g.js";import"./chunk-p6crzjtf.js";import"./chunk-55fcmswd.js";import"./chunk-qnvsqnz5.js";import"./chunk-pxm4qvqk.js";import"./chunk-j8fcfhr2.js";import{uO as ow}from"./chunk-r9w0thdk.js";var O={authenticate:"authenticate",initialize:"initialize",session_cancel:"session/cancel",session_close:"session/close",session_fork:"session/fork",session_list:"session/list",session_load:"session/load",session_new:"session/new",session_prompt:"session/prompt",session_resume:"session/resume",session_set_config_option:"session/set_config_option",session_set_mode:"session/set_mode",session_set_model:"session/set_model"},F={fs_read_text_file:"fs/read_text_file",fs_write_text_file:"fs/write_text_file",session_request_permission:"session/request_permission",session_update:"session/update",terminal_create:"terminal/create",terminal_kill:"terminal/kill",terminal_output:"terminal/output",terminal_release:"terminal/release",terminal_wait_for_exit:"terminal/wait_for_exit"};var K$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),terminal:D.boolean().optional().default(!1)}),B$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),label:D.string().nullish(),name:D.string(),optional:D.boolean().optional().default(!1),secret:D.boolean().optional().default(!0)}),O$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),description:D.string().nullish(),id:D.string(),name:D.string()}),N$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),description:D.string().nullish(),id:D.string(),link:D.string().nullish(),name:D.string(),vars:D.array(B$)}),F$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),args:D.array(D.string()).optional(),description:D.string().nullish(),env:D.record(D.string(),D.string()).optional(),id:D.string(),name:D.string()}),L$=D.union([N$.and(D.object({type:D.literal("env_var")})),F$.and(D.object({type:D.literal("terminal")})),O$]),n=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),methodId:D.string()}),x$=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),V$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),blob:D.string(),mimeType:D.string().nullish(),uri:D.string()}),H$=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),P$=D.object({amount:D.number(),currency:D.string()}),k$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),terminalId:D.string()}),T$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),newText:D.string(),oldText:D.string().nullish(),path:D.string()}),vD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),name:D.string(),value:D.string()}),U$=D.union([D.literal(-32700),D.literal(-32600),D.literal(-32601),D.literal(-32602),D.literal(-32603),D.literal(-32800),D.literal(-32000),D.literal(-32002),D.number().int().min(-2147483648,{message:"Invalid value: Expected int32 to be >= -2147483648"}).max(2147483647,{message:"Invalid value: Expected int32 to be <= 2147483647"})]),ID=D.object({code:U$,data:D.unknown().optional(),message:D.string()}),qD=D.unknown(),SD=D.unknown(),RD=D.unknown(),b$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),readTextFile:D.boolean().optional().default(!1),writeTextFile:D.boolean().optional().default(!1)}),h$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),auth:K$.optional().default({terminal:!1}),fs:b$.optional().default({readTextFile:!1,writeTextFile:!1}),terminal:D.boolean().optional().default(!1)}),cD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),name:D.string(),value:D.string()}),uD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),name:D.string(),title:D.string().nullish(),version:D.string()}),M$=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),t=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),cursor:D.string().nullish(),cwd:D.string().nullish()}),C$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),http:D.boolean().optional().default(!1),sse:D.boolean().optional().default(!1)}),E$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),headers:D.array(cD),name:D.string(),url:D.string()}),v$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),headers:D.array(cD),name:D.string(),url:D.string()}),I$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),args:D.array(D.string()),command:D.string(),env:D.array(vD),name:D.string()}),I=D.union([E$.and(D.object({type:D.literal("http")})),v$.and(D.object({type:D.literal("sse")})),I$]),o=D.string(),q$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),description:D.string().nullish(),modelId:o,name:D.string()}),r=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),cwd:D.string(),mcpServers:D.array(I)}),gD=D.string(),S$=D.union([D.literal("allow_once"),D.literal("allow_always"),D.literal("reject_once"),D.literal("reject_always")]),R$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),kind:S$,name:D.string(),optionId:gD}),c$=D.union([D.literal("high"),D.literal("medium"),D.literal("low")]),u$=D.union([D.literal("pending"),D.literal("in_progress"),D.literal("completed")]),g$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),content:D.string(),priority:c$,status:u$}),l$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),entries:D.array(g$)}),d$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),audio:D.boolean().optional().default(!1),embeddedContext:D.boolean().optional().default(!1),image:D.boolean().optional().default(!1)}),lD=D.number().int().gte(0).lte(65535),z=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),clientCapabilities:h$.optional().default({auth:{terminal:!1},fs:{readTextFile:!1,writeTextFile:!1},terminal:!1}),clientInfo:uD.nullish(),protocolVersion:lD}),i$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),content:D.string()}),m$=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),T=D.union([D.number(),D.string()]).nullable(),sw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),requestId:T}),p$=D.enum(["assistant","user"]),E=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),audience:D.array(p$).nullish(),lastModified:D.string().nullish(),priority:D.number().nullish()}),n$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),annotations:E.nullish(),data:D.string(),mimeType:D.string()}),t$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),annotations:E.nullish(),data:D.string(),mimeType:D.string(),uri:D.string().nullish()}),o$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),annotations:E.nullish(),description:D.string().nullish(),mimeType:D.string().nullish(),name:D.string(),size:D.number().nullish(),title:D.string().nullish(),uri:D.string()}),r$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),optionId:gD}),z$=D.union([D.object({outcome:D.literal("cancelled")}),r$.and(D.object({outcome:D.literal("selected")}))]),a$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),outcome:z$}),s$=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),e$=D.object({currentValue:D.boolean()}),Dw=D.string(),dD=D.string(),$w=D.union([D.literal("mode"),D.literal("model"),D.literal("thought_level"),D.string()]),a=D.string(),iD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),description:D.string().nullish(),name:D.string(),value:a}),ww=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),group:Dw,name:D.string(),options:D.array(iD)}),Qw=D.union([D.array(iD),D.array(ww)]),fw=D.object({currentValue:a,options:Qw}),M=D.intersection(D.union([fw.and(D.object({type:D.literal("select")})),e$.and(D.object({type:D.literal("boolean")}))]),D.object({_meta:D.record(D.string(),D.unknown()).nullish(),category:$w.nullish(),description:D.string().nullish(),id:dD,name:D.string()})),_w=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),configOptions:D.array(M)}),Gw=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),N=D.string(),s=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),sessionId:N}),ew=D.object({method:D.string(),params:D.union([s,qD]).nullish()}),e=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),sessionId:N}),DD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),args:D.array(D.string()).optional(),command:D.string(),cwd:D.string().nullish(),env:D.array(vD).optional(),outputByteLimit:D.number().nullish(),sessionId:N}),$D=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),cwd:D.string(),mcpServers:D.array(I).optional(),sessionId:N}),wD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),sessionId:N,terminalId:D.string()}),QD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),cwd:D.string(),mcpServers:D.array(I),sessionId:N}),fD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),limit:D.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),line:D.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),path:D.string(),sessionId:N}),_D=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),sessionId:N,terminalId:D.string()}),GD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),cwd:D.string(),mcpServers:D.array(I).optional(),sessionId:N}),Jw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),cwd:D.string(),sessionId:N,title:D.string().nullish(),updatedAt:D.string().nullish()}),Xw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),nextCursor:D.string().nullish(),sessions:D.array(Jw)}),Yw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),title:D.string().nullish(),updatedAt:D.string().nullish()}),Zw=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),q=D.string(),jw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),currentModeId:q}),Aw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),description:D.string().nullish(),id:q,name:D.string()}),S=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),availableModes:D.array(Aw),currentModeId:q}),R=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),availableModels:D.array(q$),currentModelId:o}),Ww=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),configOptions:D.array(M).nullish(),models:R.nullish(),modes:S.nullish(),sessionId:N}),yw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),configOptions:D.array(M).nullish(),models:R.nullish(),modes:S.nullish()}),Kw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),configOptions:D.array(M).nullish(),models:R.nullish(),modes:S.nullish(),sessionId:N}),Bw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),configOptions:D.array(M).nullish(),models:R.nullish(),modes:S.nullish()}),Ow=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),Nw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),close:s$.nullish(),fork:Gw.nullish(),list:Zw.nullish(),resume:Ow.nullish()}),Fw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),loadSession:D.boolean().optional().default(!1),mcpCapabilities:C$.optional().default({http:!1,sse:!1}),promptCapabilities:d$.optional().default({audio:!1,embeddedContext:!1,image:!1}),sessionCapabilities:Nw.optional().default({})}),Lw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),agentCapabilities:Fw.optional().default({loadSession:!1,mcpCapabilities:{http:!1,sse:!1},promptCapabilities:{audio:!1,embeddedContext:!1,image:!1},sessionCapabilities:{}}),agentInfo:uD.nullish(),authMethods:D.array(L$).optional().default([]),protocolVersion:lD}),JD=D.intersection(D.union([D.object({type:D.literal("boolean"),value:D.boolean()}),D.object({value:a})]),D.object({_meta:D.record(D.string(),D.unknown()).nullish(),configId:dD,sessionId:N})),xw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),configOptions:D.array(M)}),XD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),modeId:q,sessionId:N}),Vw=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),YD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),modelId:o,sessionId:N}),Hw=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),Pw=D.union([D.literal("end_turn"),D.literal("max_tokens"),D.literal("max_turn_requests"),D.literal("refusal"),D.literal("cancelled")]),kw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),terminalId:D.string()}),Tw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),exitCode:D.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),signal:D.string().nullish()}),ZD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),sessionId:N,terminalId:D.string()}),Uw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),exitStatus:Tw.nullish(),output:D.string(),truncated:D.boolean()}),bw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),annotations:E.nullish(),text:D.string()}),hw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),mimeType:D.string().nullish(),text:D.string(),uri:D.string()}),Mw=D.union([hw,V$]),Cw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),annotations:E.nullish(),resource:Mw}),jD=D.union([bw.and(D.object({type:D.literal("text")})),t$.and(D.object({type:D.literal("image")})),n$.and(D.object({type:D.literal("audio")})),o$.and(D.object({type:D.literal("resource_link")})),Cw.and(D.object({type:D.literal("resource")}))]),Ew=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),content:jD}),p=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),content:jD,messageId:D.string().nullish()}),AD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),messageId:D.string().nullish(),prompt:D.array(jD),sessionId:N}),DQ=D.object({id:T,method:D.string(),params:D.union([z,n,r,QD,t,$D,GD,e,XD,JD,AD,YD,SD]).nullish()}),mD=D.union([Ew.and(D.object({type:D.literal("content")})),T$.and(D.object({type:D.literal("diff")})),kw.and(D.object({type:D.literal("terminal")}))]),pD=D.string(),nD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),line:D.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),path:D.string()}),tD=D.union([D.literal("pending"),D.literal("in_progress"),D.literal("completed"),D.literal("failed")]),oD=D.union([D.literal("read"),D.literal("edit"),D.literal("delete"),D.literal("move"),D.literal("search"),D.literal("execute"),D.literal("think"),D.literal("fetch"),D.literal("switch_mode"),D.literal("other")]),vw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),content:D.array(mD).optional(),kind:oD.optional(),locations:D.array(nD).optional(),rawInput:D.unknown().optional(),rawOutput:D.unknown().optional(),status:tD.optional(),title:D.string(),toolCallId:pD}),rD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),content:D.array(mD).nullish(),kind:oD.nullish(),locations:D.array(nD).nullish(),rawInput:D.unknown().optional(),rawOutput:D.unknown().optional(),status:tD.nullish(),title:D.string().nullish(),toolCallId:pD}),WD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),options:D.array(R$),sessionId:N,toolCall:rD}),Iw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),hint:D.string()}),qw=Iw,Sw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),description:D.string(),input:qw.nullish(),name:D.string()}),Rw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),availableCommands:D.array(Sw)}),cw=D.object({cachedReadTokens:D.number().nullish(),cachedWriteTokens:D.number().nullish(),inputTokens:D.number(),outputTokens:D.number(),thoughtTokens:D.number().nullish(),totalTokens:D.number()}),uw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),stopReason:Pw,usage:cw.nullish(),userMessageId:D.string().nullish()}),$Q=D.union([D.object({id:T,result:D.union([Lw,x$,Kw,yw,Xw,Ww,Bw,H$,Vw,xw,uw,Hw,RD])}),D.object({error:ID,id:T})]),gw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),cost:P$.nullish(),size:D.number(),used:D.number()}),lw=D.union([p.and(D.object({sessionUpdate:D.literal("user_message_chunk")})),p.and(D.object({sessionUpdate:D.literal("agent_message_chunk")})),p.and(D.object({sessionUpdate:D.literal("agent_thought_chunk")})),vw.and(D.object({sessionUpdate:D.literal("tool_call")})),rD.and(D.object({sessionUpdate:D.literal("tool_call_update")})),l$.and(D.object({sessionUpdate:D.literal("plan")})),Rw.and(D.object({sessionUpdate:D.literal("available_commands_update")})),jw.and(D.object({sessionUpdate:D.literal("current_mode_update")})),_w.and(D.object({sessionUpdate:D.literal("config_option_update")})),Yw.and(D.object({sessionUpdate:D.literal("session_info_update")})),gw.and(D.object({sessionUpdate:D.literal("usage_update")}))]),yD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),sessionId:N,update:lw}),wQ=D.object({method:D.string(),params:D.union([yD,qD]).nullish()}),KD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),sessionId:N,terminalId:D.string()}),dw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),exitCode:D.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),signal:D.string().nullish()}),BD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),content:D.string(),path:D.string(),sessionId:N}),QQ=D.object({id:T,method:D.string(),params:D.union([BD,fD,WD,DD,ZD,_D,KD,wD,SD]).nullish()}),iw=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),fQ=D.union([D.object({id:T,result:D.union([iw,i$,a$,k$,Uw,m$,dw,M$,RD])}),D.object({error:ID,id:T})]);function zD($,Q){let w=new TextEncoder,f=new TextDecoder,X=new ReadableStream({async start(_){let J="",j=Q.getReader();try{while(!0){let{value:B,done:Y}=await j.read();if(Y)break;if(!B)continue;J+=f.decode(B,{stream:!0});let Z=J.split(`
2
+ import{Od as W$}from"./chunk-ns8xnkjb.js";import{Qd as j$}from"./chunk-yy7r3t3w.js";import{be as A$}from"./chunk-f4mnp6xd.js";import{Zf as J$}from"./chunk-r4kg0z96.js";import{lg as Z$}from"./chunk-q6p92zyn.js";import"./chunk-yd94wz5v.js";import"./chunk-4ngmjk8j.js";import"./chunk-dd4qnh8s.js";import"./chunk-tzq7wjgv.js";import"./chunk-nfg7nt13.js";import"./chunk-v9w88wpy.js";import"./chunk-q87fw8dk.js";import{Ch as MD,rh as hD}from"./chunk-w43kmnm9.js";import"./chunk-nrk29616.js";import"./chunk-kre93a89.js";import"./chunk-060wbpz4.js";import"./chunk-zrhw1szj.js";import"./chunk-wd8hbven.js";import"./chunk-drnj1a14.js";import{$j as k,Tk as _$,Uk as U,Vj as sD,Wk as G$,ak as P}from"./chunk-9a6p1gdn.js";import"./chunk-jxkrhrp0.js";import"./chunk-6k14c8x1.js";import"./chunk-5r05d901.js";import"./chunk-3rgct4bd.js";import"./chunk-5b3v1x2c.js";import"./chunk-gbxf6e5d.js";import"./chunk-msh249db.js";import"./chunk-95am490c.js";import"./chunk-kmzpeq8k.js";import"./chunk-0gsw04hw.js";import"./chunk-hqjc4wgg.js";import{Ap as X$,Gp as Y$}from"./chunk-makecdh6.js";import"./chunk-dy2k5rdx.js";import{or as f$}from"./chunk-n5p7cn4w.js";import"./chunk-cqtkxwd8.js";import"./chunk-mhxyv9c8.js";import"./chunk-0crgymtr.js";import"./chunk-cth373se.js";import"./chunk-xcxqt8ag.js";import"./chunk-va2qfh0x.js";import"./chunk-ae7b11np.js";import"./chunk-eeq0krp7.js";import"./chunk-73xryfgn.js";import"./chunk-yjqww6ag.js";import"./chunk-z6kcnpsj.js";import"./chunk-ts2k13g0.js";import"./chunk-01e3v1xz.js";import"./chunk-dbpkq7ba.js";import"./chunk-z744mz4w.js";import"./chunk-vjn54xj5.js";import"./chunk-0qpqd7nz.js";import"./chunk-gdew7bwm.js";import{Dt as Q$}from"./chunk-v3nmnm57.js";import"./chunk-hwsqqkrv.js";import{uu as H}from"./chunk-mbbxedsq.js";import{Fu as kD,Gu as w$}from"./chunk-aa2n02qk.js";import"./chunk-k1x8469r.js";import{hv as D}from"./chunk-c3szabpf.js";import"./chunk-c8prg3jx.js";import"./chunk-t8sy5sgx.js";import"./chunk-tezrgfc6.js";import"./chunk-wjz42325.js";import"./chunk-kry4vcrf.js";import{UP as ow}from"./chunk-f2pv705d.js";var O={authenticate:"authenticate",initialize:"initialize",session_cancel:"session/cancel",session_close:"session/close",session_fork:"session/fork",session_list:"session/list",session_load:"session/load",session_new:"session/new",session_prompt:"session/prompt",session_resume:"session/resume",session_set_config_option:"session/set_config_option",session_set_mode:"session/set_mode",session_set_model:"session/set_model"},F={fs_read_text_file:"fs/read_text_file",fs_write_text_file:"fs/write_text_file",session_request_permission:"session/request_permission",session_update:"session/update",terminal_create:"terminal/create",terminal_kill:"terminal/kill",terminal_output:"terminal/output",terminal_release:"terminal/release",terminal_wait_for_exit:"terminal/wait_for_exit"};var K$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),terminal:D.boolean().optional().default(!1)}),B$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),label:D.string().nullish(),name:D.string(),optional:D.boolean().optional().default(!1),secret:D.boolean().optional().default(!0)}),O$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),description:D.string().nullish(),id:D.string(),name:D.string()}),N$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),description:D.string().nullish(),id:D.string(),link:D.string().nullish(),name:D.string(),vars:D.array(B$)}),F$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),args:D.array(D.string()).optional(),description:D.string().nullish(),env:D.record(D.string(),D.string()).optional(),id:D.string(),name:D.string()}),L$=D.union([N$.and(D.object({type:D.literal("env_var")})),F$.and(D.object({type:D.literal("terminal")})),O$]),n=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),methodId:D.string()}),x$=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),V$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),blob:D.string(),mimeType:D.string().nullish(),uri:D.string()}),H$=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),P$=D.object({amount:D.number(),currency:D.string()}),k$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),terminalId:D.string()}),T$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),newText:D.string(),oldText:D.string().nullish(),path:D.string()}),vD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),name:D.string(),value:D.string()}),U$=D.union([D.literal(-32700),D.literal(-32600),D.literal(-32601),D.literal(-32602),D.literal(-32603),D.literal(-32800),D.literal(-32000),D.literal(-32002),D.number().int().min(-2147483648,{message:"Invalid value: Expected int32 to be >= -2147483648"}).max(2147483647,{message:"Invalid value: Expected int32 to be <= 2147483647"})]),ID=D.object({code:U$,data:D.unknown().optional(),message:D.string()}),qD=D.unknown(),SD=D.unknown(),RD=D.unknown(),b$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),readTextFile:D.boolean().optional().default(!1),writeTextFile:D.boolean().optional().default(!1)}),h$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),auth:K$.optional().default({terminal:!1}),fs:b$.optional().default({readTextFile:!1,writeTextFile:!1}),terminal:D.boolean().optional().default(!1)}),cD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),name:D.string(),value:D.string()}),uD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),name:D.string(),title:D.string().nullish(),version:D.string()}),M$=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),t=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),cursor:D.string().nullish(),cwd:D.string().nullish()}),C$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),http:D.boolean().optional().default(!1),sse:D.boolean().optional().default(!1)}),E$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),headers:D.array(cD),name:D.string(),url:D.string()}),v$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),headers:D.array(cD),name:D.string(),url:D.string()}),I$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),args:D.array(D.string()),command:D.string(),env:D.array(vD),name:D.string()}),I=D.union([E$.and(D.object({type:D.literal("http")})),v$.and(D.object({type:D.literal("sse")})),I$]),o=D.string(),q$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),description:D.string().nullish(),modelId:o,name:D.string()}),r=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),cwd:D.string(),mcpServers:D.array(I)}),gD=D.string(),S$=D.union([D.literal("allow_once"),D.literal("allow_always"),D.literal("reject_once"),D.literal("reject_always")]),R$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),kind:S$,name:D.string(),optionId:gD}),c$=D.union([D.literal("high"),D.literal("medium"),D.literal("low")]),u$=D.union([D.literal("pending"),D.literal("in_progress"),D.literal("completed")]),g$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),content:D.string(),priority:c$,status:u$}),l$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),entries:D.array(g$)}),d$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),audio:D.boolean().optional().default(!1),embeddedContext:D.boolean().optional().default(!1),image:D.boolean().optional().default(!1)}),lD=D.number().int().gte(0).lte(65535),z=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),clientCapabilities:h$.optional().default({auth:{terminal:!1},fs:{readTextFile:!1,writeTextFile:!1},terminal:!1}),clientInfo:uD.nullish(),protocolVersion:lD}),i$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),content:D.string()}),m$=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),T=D.union([D.number(),D.string()]).nullable(),sw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),requestId:T}),p$=D.enum(["assistant","user"]),E=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),audience:D.array(p$).nullish(),lastModified:D.string().nullish(),priority:D.number().nullish()}),n$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),annotations:E.nullish(),data:D.string(),mimeType:D.string()}),t$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),annotations:E.nullish(),data:D.string(),mimeType:D.string(),uri:D.string().nullish()}),o$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),annotations:E.nullish(),description:D.string().nullish(),mimeType:D.string().nullish(),name:D.string(),size:D.number().nullish(),title:D.string().nullish(),uri:D.string()}),r$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),optionId:gD}),z$=D.union([D.object({outcome:D.literal("cancelled")}),r$.and(D.object({outcome:D.literal("selected")}))]),a$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),outcome:z$}),s$=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),e$=D.object({currentValue:D.boolean()}),Dw=D.string(),dD=D.string(),$w=D.union([D.literal("mode"),D.literal("model"),D.literal("thought_level"),D.string()]),a=D.string(),iD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),description:D.string().nullish(),name:D.string(),value:a}),ww=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),group:Dw,name:D.string(),options:D.array(iD)}),Qw=D.union([D.array(iD),D.array(ww)]),fw=D.object({currentValue:a,options:Qw}),M=D.intersection(D.union([fw.and(D.object({type:D.literal("select")})),e$.and(D.object({type:D.literal("boolean")}))]),D.object({_meta:D.record(D.string(),D.unknown()).nullish(),category:$w.nullish(),description:D.string().nullish(),id:dD,name:D.string()})),_w=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),configOptions:D.array(M)}),Gw=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),N=D.string(),s=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),sessionId:N}),ew=D.object({method:D.string(),params:D.union([s,qD]).nullish()}),e=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),sessionId:N}),DD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),args:D.array(D.string()).optional(),command:D.string(),cwd:D.string().nullish(),env:D.array(vD).optional(),outputByteLimit:D.number().nullish(),sessionId:N}),$D=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),cwd:D.string(),mcpServers:D.array(I).optional(),sessionId:N}),wD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),sessionId:N,terminalId:D.string()}),QD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),cwd:D.string(),mcpServers:D.array(I),sessionId:N}),fD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),limit:D.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),line:D.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),path:D.string(),sessionId:N}),_D=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),sessionId:N,terminalId:D.string()}),GD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),cwd:D.string(),mcpServers:D.array(I).optional(),sessionId:N}),Jw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),cwd:D.string(),sessionId:N,title:D.string().nullish(),updatedAt:D.string().nullish()}),Xw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),nextCursor:D.string().nullish(),sessions:D.array(Jw)}),Yw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),title:D.string().nullish(),updatedAt:D.string().nullish()}),Zw=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),q=D.string(),jw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),currentModeId:q}),Aw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),description:D.string().nullish(),id:q,name:D.string()}),S=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),availableModes:D.array(Aw),currentModeId:q}),R=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),availableModels:D.array(q$),currentModelId:o}),Ww=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),configOptions:D.array(M).nullish(),models:R.nullish(),modes:S.nullish(),sessionId:N}),yw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),configOptions:D.array(M).nullish(),models:R.nullish(),modes:S.nullish()}),Kw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),configOptions:D.array(M).nullish(),models:R.nullish(),modes:S.nullish(),sessionId:N}),Bw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),configOptions:D.array(M).nullish(),models:R.nullish(),modes:S.nullish()}),Ow=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),Nw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),close:s$.nullish(),fork:Gw.nullish(),list:Zw.nullish(),resume:Ow.nullish()}),Fw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),loadSession:D.boolean().optional().default(!1),mcpCapabilities:C$.optional().default({http:!1,sse:!1}),promptCapabilities:d$.optional().default({audio:!1,embeddedContext:!1,image:!1}),sessionCapabilities:Nw.optional().default({})}),Lw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),agentCapabilities:Fw.optional().default({loadSession:!1,mcpCapabilities:{http:!1,sse:!1},promptCapabilities:{audio:!1,embeddedContext:!1,image:!1},sessionCapabilities:{}}),agentInfo:uD.nullish(),authMethods:D.array(L$).optional().default([]),protocolVersion:lD}),JD=D.intersection(D.union([D.object({type:D.literal("boolean"),value:D.boolean()}),D.object({value:a})]),D.object({_meta:D.record(D.string(),D.unknown()).nullish(),configId:dD,sessionId:N})),xw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),configOptions:D.array(M)}),XD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),modeId:q,sessionId:N}),Vw=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),YD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),modelId:o,sessionId:N}),Hw=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),Pw=D.union([D.literal("end_turn"),D.literal("max_tokens"),D.literal("max_turn_requests"),D.literal("refusal"),D.literal("cancelled")]),kw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),terminalId:D.string()}),Tw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),exitCode:D.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),signal:D.string().nullish()}),ZD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),sessionId:N,terminalId:D.string()}),Uw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),exitStatus:Tw.nullish(),output:D.string(),truncated:D.boolean()}),bw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),annotations:E.nullish(),text:D.string()}),hw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),mimeType:D.string().nullish(),text:D.string(),uri:D.string()}),Mw=D.union([hw,V$]),Cw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),annotations:E.nullish(),resource:Mw}),jD=D.union([bw.and(D.object({type:D.literal("text")})),t$.and(D.object({type:D.literal("image")})),n$.and(D.object({type:D.literal("audio")})),o$.and(D.object({type:D.literal("resource_link")})),Cw.and(D.object({type:D.literal("resource")}))]),Ew=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),content:jD}),p=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),content:jD,messageId:D.string().nullish()}),AD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),messageId:D.string().nullish(),prompt:D.array(jD),sessionId:N}),DQ=D.object({id:T,method:D.string(),params:D.union([z,n,r,QD,t,$D,GD,e,XD,JD,AD,YD,SD]).nullish()}),mD=D.union([Ew.and(D.object({type:D.literal("content")})),T$.and(D.object({type:D.literal("diff")})),kw.and(D.object({type:D.literal("terminal")}))]),pD=D.string(),nD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),line:D.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),path:D.string()}),tD=D.union([D.literal("pending"),D.literal("in_progress"),D.literal("completed"),D.literal("failed")]),oD=D.union([D.literal("read"),D.literal("edit"),D.literal("delete"),D.literal("move"),D.literal("search"),D.literal("execute"),D.literal("think"),D.literal("fetch"),D.literal("switch_mode"),D.literal("other")]),vw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),content:D.array(mD).optional(),kind:oD.optional(),locations:D.array(nD).optional(),rawInput:D.unknown().optional(),rawOutput:D.unknown().optional(),status:tD.optional(),title:D.string(),toolCallId:pD}),rD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),content:D.array(mD).nullish(),kind:oD.nullish(),locations:D.array(nD).nullish(),rawInput:D.unknown().optional(),rawOutput:D.unknown().optional(),status:tD.nullish(),title:D.string().nullish(),toolCallId:pD}),WD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),options:D.array(R$),sessionId:N,toolCall:rD}),Iw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),hint:D.string()}),qw=Iw,Sw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),description:D.string(),input:qw.nullish(),name:D.string()}),Rw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),availableCommands:D.array(Sw)}),cw=D.object({cachedReadTokens:D.number().nullish(),cachedWriteTokens:D.number().nullish(),inputTokens:D.number(),outputTokens:D.number(),thoughtTokens:D.number().nullish(),totalTokens:D.number()}),uw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),stopReason:Pw,usage:cw.nullish(),userMessageId:D.string().nullish()}),$Q=D.union([D.object({id:T,result:D.union([Lw,x$,Kw,yw,Xw,Ww,Bw,H$,Vw,xw,uw,Hw,RD])}),D.object({error:ID,id:T})]),gw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),cost:P$.nullish(),size:D.number(),used:D.number()}),lw=D.union([p.and(D.object({sessionUpdate:D.literal("user_message_chunk")})),p.and(D.object({sessionUpdate:D.literal("agent_message_chunk")})),p.and(D.object({sessionUpdate:D.literal("agent_thought_chunk")})),vw.and(D.object({sessionUpdate:D.literal("tool_call")})),rD.and(D.object({sessionUpdate:D.literal("tool_call_update")})),l$.and(D.object({sessionUpdate:D.literal("plan")})),Rw.and(D.object({sessionUpdate:D.literal("available_commands_update")})),jw.and(D.object({sessionUpdate:D.literal("current_mode_update")})),_w.and(D.object({sessionUpdate:D.literal("config_option_update")})),Yw.and(D.object({sessionUpdate:D.literal("session_info_update")})),gw.and(D.object({sessionUpdate:D.literal("usage_update")}))]),yD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),sessionId:N,update:lw}),wQ=D.object({method:D.string(),params:D.union([yD,qD]).nullish()}),KD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),sessionId:N,terminalId:D.string()}),dw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),exitCode:D.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),signal:D.string().nullish()}),BD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),content:D.string(),path:D.string(),sessionId:N}),QQ=D.object({id:T,method:D.string(),params:D.union([BD,fD,WD,DD,ZD,_D,KD,wD,SD]).nullish()}),iw=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),fQ=D.union([D.object({id:T,result:D.union([iw,i$,a$,k$,Uw,m$,dw,M$,RD])}),D.object({error:ID,id:T})]);function zD($,Q){let w=new TextEncoder,f=new TextDecoder,X=new ReadableStream({async start(_){let J="",j=Q.getReader();try{while(!0){let{value:B,done:Y}=await j.read();if(Y)break;if(!B)continue;J+=f.decode(B,{stream:!0});let Z=J.split(`
3
3
  `);J=Z.pop()||"";for(let A of Z){let y=A.trim();if(y)try{let W=JSON.parse(y);_.enqueue(W)}catch(W){console.error("Failed to parse JSON message:",y,W)}}}}finally{j.releaseLock(),_.close()}}}),G=new WritableStream({async write(_){let J=JSON.stringify(_)+`
4
4
  `,j=$.getWriter();try{await j.write(w.encode(J))}finally{j.releaseLock()}}});return{readable:X,writable:G}}class OD{#D;constructor($,Q){let w=$(this),f=async(G,_)=>{switch(G){case O.initialize:{let J=z.parse(_);return w.initialize(J)}case O.session_new:{let J=r.parse(_);return w.newSession(J)}case O.session_load:{if(!w.loadSession)throw K.methodNotFound(G);let J=QD.parse(_);return w.loadSession(J)}case O.session_list:{if(!w.listSessions)throw K.methodNotFound(G);let J=t.parse(_);return w.listSessions(J)}case O.session_fork:{if(!w.unstable_forkSession)throw K.methodNotFound(G);let J=$D.parse(_);return w.unstable_forkSession(J)}case O.session_resume:{if(!w.unstable_resumeSession)throw K.methodNotFound(G);let J=GD.parse(_);return w.unstable_resumeSession(J)}case O.session_close:{if(!w.unstable_closeSession)throw K.methodNotFound(G);let J=e.parse(_);return w.unstable_closeSession(J)}case O.session_set_mode:{if(!w.setSessionMode)throw K.methodNotFound(G);let J=XD.parse(_);return await w.setSessionMode(J)??{}}case O.authenticate:{let J=n.parse(_);return await w.authenticate(J)??{}}case O.session_prompt:{let J=AD.parse(_);return w.prompt(J)}case O.session_set_model:{if(!w.unstable_setSessionModel)throw K.methodNotFound(G);let J=YD.parse(_);return await w.unstable_setSessionModel(J)??{}}case O.session_set_config_option:{if(!w.setSessionConfigOption)throw K.methodNotFound(G);let J=JD.parse(_);return w.setSessionConfigOption(J)}default:if(w.extMethod)return w.extMethod(G,_);throw K.methodNotFound(G)}},X=async(G,_)=>{switch(G){case O.session_cancel:{let J=s.parse(_);return w.cancel(J)}default:if(w.extNotification)return w.extNotification(G,_);throw K.methodNotFound(G)}};this.#D=new ND(f,X,Q)}async sessionUpdate($){return await this.#D.sendNotification(F.session_update,$)}async requestPermission($){return await this.#D.sendRequest(F.session_request_permission,$)}async readTextFile($){return await this.#D.sendRequest(F.fs_read_text_file,$)}async writeTextFile($){return await this.#D.sendRequest(F.fs_write_text_file,$)??{}}async createTerminal($){let Q=await this.#D.sendRequest(F.terminal_create,$);return new aD(Q.terminalId,$.sessionId,this.#D)}async extMethod($,Q){return await this.#D.sendRequest($,Q)}async extNotification($,Q){return await this.#D.sendNotification($,Q)}get signal(){return this.#D.signal}get closed(){return this.#D.closed}}class aD{id;#D;#$;constructor($,Q,w){this.id=$,this.#D=Q,this.#$=w}async currentOutput(){return await this.#$.sendRequest(F.terminal_output,{sessionId:this.#D,terminalId:this.id})}async waitForExit(){return await this.#$.sendRequest(F.terminal_wait_for_exit,{sessionId:this.#D,terminalId:this.id})}async kill(){return await this.#$.sendRequest(F.terminal_kill,{sessionId:this.#D,terminalId:this.id})??{}}async release(){return await this.#$.sendRequest(F.terminal_release,{sessionId:this.#D,terminalId:this.id})??{}}async[Symbol.asyncDispose](){await this.release()}}class pw{#D;constructor($,Q){let w=$(this),f=async(G,_)=>{switch(G){case F.fs_write_text_file:{let J=BD.parse(_);return w.writeTextFile?.(J)}case F.fs_read_text_file:{let J=fD.parse(_);return w.readTextFile?.(J)}case F.session_request_permission:{let J=WD.parse(_);return w.requestPermission(J)}case F.terminal_create:{let J=DD.parse(_);return w.createTerminal?.(J)}case F.terminal_output:{let J=ZD.parse(_);return w.terminalOutput?.(J)}case F.terminal_release:{let J=_D.parse(_);return await w.releaseTerminal?.(J)??{}}case F.terminal_wait_for_exit:{let J=KD.parse(_);return w.waitForTerminalExit?.(J)}case F.terminal_kill:{let J=wD.parse(_);return await w.killTerminal?.(J)??{}}default:if(w.extMethod)return w.extMethod(G,_);throw K.methodNotFound(G)}},X=async(G,_)=>{switch(G){case F.session_update:{let J=yD.parse(_);return w.sessionUpdate(J)}default:if(w.extNotification)return w.extNotification(G,_);throw K.methodNotFound(G)}};this.#D=new ND(f,X,Q)}async initialize($){return await this.#D.sendRequest(O.initialize,$)}async newSession($){return await this.#D.sendRequest(O.session_new,$)}async loadSession($){return await this.#D.sendRequest(O.session_load,$)??{}}async unstable_forkSession($){return await this.#D.sendRequest(O.session_fork,$)}async listSessions($){return await this.#D.sendRequest(O.session_list,$)}async unstable_resumeSession($){return await this.#D.sendRequest(O.session_resume,$)}async unstable_closeSession($){return await this.#D.sendRequest(O.session_close,$)}async setSessionMode($){return await this.#D.sendRequest(O.session_set_mode,$)??{}}async unstable_setSessionModel($){return await this.#D.sendRequest(O.session_set_model,$)??{}}async setSessionConfigOption($){return await this.#D.sendRequest(O.session_set_config_option,$)}async authenticate($){return await this.#D.sendRequest(O.authenticate,$)??{}}async prompt($){return await this.#D.sendRequest(O.session_prompt,$)}async cancel($){return await this.#D.sendNotification(O.session_cancel,$)}async extMethod($,Q){return await this.#D.sendRequest($,Q)}async extNotification($,Q){return await this.#D.sendNotification($,Q)}get signal(){return this.#D.signal}get closed(){return this.#D.closed}}class ND{#D=new Map;#$=0;#G;#J;#Q;#f=Promise.resolve();#_=new AbortController;#X;constructor($,Q,w){this.#G=$,this.#J=Q,this.#Q=w,this.#X=new Promise((f)=>{this.#_.signal.addEventListener("abort",()=>f())}),this.#Y()}get signal(){return this.#_.signal}get closed(){return this.#X}async#Y(){let $=this.#Q.readable.getReader();try{while(!0){let{value:Q,done:w}=await $.read();if(w)break;if(!Q)continue;try{this.#Z(Q)}catch(f){if(console.error("Unexpected error during message processing:",Q,f),"id"in Q&&Q.id!==void 0)this.#w({jsonrpc:"2.0",id:Q.id,error:{code:-32700,message:"Parse error"}})}}}finally{$.releaseLock(),this.#_.abort()}}async#Z($){if("method"in $&&"id"in $){let Q=await this.#j($.method,$.params);if("error"in Q)console.error("Error handling request",$,Q.error);await this.#w({jsonrpc:"2.0",id:$.id,...Q})}else if("method"in $){let Q=await this.#A($.method,$.params);if("error"in Q)console.error("Error handling notification",$,Q.error)}else if("id"in $)this.#W($);else console.error("Invalid message",{message:$})}async#j($,Q){try{return{result:await this.#G($,Q)??null}}catch(w){if(w instanceof K)return w.toResult();if(w instanceof D.ZodError)return K.invalidParams(w.format()).toResult();let f;if(w instanceof Error)f=w.message;else if(typeof w==="object"&&w!=null&&"message"in w&&typeof w.message==="string")f=w.message;try{return K.internalError(f?JSON.parse(f):{}).toResult()}catch{return K.internalError({details:f}).toResult()}}}async#A($,Q){try{return await this.#J($,Q),{result:null}}catch(w){if(w instanceof K)return w.toResult();if(w instanceof D.ZodError)return K.invalidParams(w.format()).toResult();let f;if(w instanceof Error)f=w.message;else if(typeof w==="object"&&w!=null&&"message"in w&&typeof w.message==="string")f=w.message;try{return K.internalError(f?JSON.parse(f):{}).toResult()}catch{return K.internalError({details:f}).toResult()}}}#W($){let Q=this.#D.get($.id);if(Q){if("result"in $)Q.resolve($.result);else if("error"in $)Q.reject($.error);this.#D.delete($.id)}else console.error("Got response to unknown request",$.id)}async sendRequest($,Q){let w=this.#$++,f=new Promise((X,G)=>{this.#D.set(w,{resolve:X,reject:G})});return await this.#w({jsonrpc:"2.0",id:w,method:$,params:Q}),f}async sendNotification($,Q){await this.#w({jsonrpc:"2.0",method:$,params:Q})}async#w($){return this.#f=this.#f.then(async()=>{let Q=this.#Q.writable.getWriter();try{await Q.write($)}finally{Q.releaseLock()}}).catch((Q)=>{console.error("ACP write error:",Q)}),this.#f}}class K extends Error{code;data;constructor($,Q,w){super(Q);this.code=$,this.name="RequestError",this.data=w}static parseError($,Q){return new K(-32700,`Parse error${Q?`: ${Q}`:""}`,$)}static invalidRequest($,Q){return new K(-32600,`Invalid request${Q?`: ${Q}`:""}`,$)}static methodNotFound($){return new K(-32601,`"Method not found": ${$}`,{method:$})}static invalidParams($,Q){return new K(-32602,`Invalid params${Q?`: ${Q}`:""}`,$)}static internalError($,Q){return new K(-32603,`Internal error${Q?`: ${Q}`:""}`,$)}static authRequired($,Q){return new K(-32000,`Authentication required${Q?`: ${Q}`:""}`,$)}static resourceNotFound($){return new K(-32002,`Resource not found${$?`: ${$}`:""}`,$&&{uri:$})}toResult(){return{error:{code:this.code,message:this.message,data:this.data}}}toErrorResponse(){return{code:this.code,message:this.message,data:this.data}}}var v={};ow(v,{init:()=>zw,Agent:()=>CD,ACP:()=>v});var FD=H.create({service:"acp-session-manager"});class LD{sessions=new Map;sdk;constructor($){this.sdk=$}tryGet($){return this.sessions.get($)}async create($,Q,w){let X=(await this.sdk.session.create({directory:$},{throwOnError:!0}).then((J)=>J.data)).id,_={id:X,cwd:$,mcpServers:Q,createdAt:new Date,model:w};return FD.info("creating_session",{state:_}),this.sessions.set(X,_),_}async load($,Q,w,f){let X=await this.sdk.session.get({sessionID:$,directory:Q},{throwOnError:!0}).then((J)=>J.data),G=f,_={id:$,cwd:Q,mcpServers:w,createdAt:new Date(X.time.created),model:G};return FD.info("loading_session",{state:_}),this.sessions.set($,_),_}get($){let Q=this.sessions.get($);if(!Q)throw FD.error("session not found",{sessionId:$}),K.invalidParams(JSON.stringify({error:`Session not found: ${$}`}));return Q}getModel($){return this.get($).model}setModel($,Q){let w=this.get($);return w.model=Q,this.sessions.set($,w),w}getVariant($){return this.get($).variant}setVariant($,Q){let w=this.get($);return w.variant=Q,this.sessions.set($,w),w}setMode($,Q){let w=this.get($);return w.modeId=Q,this.sessions.set($,w),w}}import{pathToFileURL as c}from"url";var nw=H.create({service:"acp-message-translator"}),tw="default";function b($){switch($.toLocaleLowerCase()){case"bash":return"execute";case"webfetch":return"fetch";case"edit":case"patch":case"write":return"edit";case"grep":case"glob":case"context7_resolve_library_id":case"context7_get_library_docs":return"search";case"read":return"read";default:return"other"}}function u($,Q){switch($.toLocaleLowerCase()){case"read":case"edit":case"write":return Q.filePath?[{path:Q.filePath}]:[];case"glob":case"grep":return Q.path?[{path:Q.path}]:[];case"bash":return[];default:return[]}}function g($){try{if($.startsWith("file://")){let Q=$.slice(7),w=Q.split("/").pop()||Q;return{type:"file",url:$,filename:w,mime:"text/plain"}}if($.startsWith("zed://")){let w=new URL($).searchParams.get("path");if(w){let f=w.split("/").pop()||w;return{type:"file",url:c(w).href,filename:f,mime:"text/plain"}}}return{type:"text",text:$}}catch{return{type:"text",text:$}}}function eD($,Q){let w=sD($,Q);if(w===!1){nw.error("Failed to apply unified diff (context mismatch)");return}return w}function xD($){if($.tool!=="bash")return;if(!("metadata"in $.state)||!$.state.metadata||typeof $.state.metadata!=="object")return;let Q=$.state.metadata.output;if(typeof Q!=="string")return;return Q}function l($){return[...$].sort((Q,w)=>{let f=Q.name.toLowerCase(),X=w.name.toLowerCase();if(f<X)return-1;if(f>X)return 1;return 0})}function VD($,Q){let w=$.find((X)=>X.id===Q.providerID);if(!w)return[];let f=w.models[Q.modelID];if(!f?.variants)return[];return Object.keys(f.variants)}function D$($,Q={}){let w=Q.includeVariants??!1;return $.flatMap((f)=>{let X=Object.values(f.models);return U.sort(X).flatMap((_)=>{let J={modelId:`${f.id}/${_.id}`,name:`${f.name}/${_.name}`};if(!w||!_.variants)return[J];let B=Object.keys(_.variants).filter((Y)=>Y!==tw).map((Y)=>({modelId:`${f.id}/${_.id}/${Y}`,name:`${f.name}/${_.name} (${Y})`}));return[J,...B]})})}function d($,Q,w,f){let X=`${$.providerID}/${$.modelID}`;if(!f||!Q||!w.includes(Q))return X;return`${X}/${Q}`}function HD($){return{opencode:{modelId:`${$.model.providerID}/${$.model.modelID}`,variant:$.variant??null,availableVariants:$.availableVariants}}}function PD($,Q){let w=U.parseModel($),f=Q.find((G)=>G.id===w.providerID);if(!f)return{model:w,variant:void 0};if(f.models[w.modelID])return{model:w,variant:void 0};let X=w.modelID.split("/");if(X.length>1){let G=X[X.length-1],_=X.slice(0,-1).join("/"),J=f.models[_];if(J?.variants&&G in J.variants)return{model:{providerID:w.providerID,modelID:P.make(_)},variant:G}}return{model:w,variant:void 0}}function i($){let Q=[{id:"model",name:"Model",category:"model",type:"select",currentValue:$.currentModelId,options:$.availableModels.map((w)=>({value:w.modelId,name:w.name}))}];if($.modes)Q.push({id:"mode",name:"Session Mode",category:"mode",type:"select",currentValue:$.modes.currentModeId,options:$.modes.availableModes.map((w)=>({value:w.id,name:w.name,...w.description?{description:w.description}:{}}))});return Q}var $$=H.create({service:"acp-permissions"});class TD{connection;sdk;sessionManager;permissionQueues=new Map;permissionOptions=[{optionId:"once",kind:"allow_once",name:"Allow once"},{optionId:"always",kind:"allow_always",name:"Always allow"},{optionId:"reject",kind:"reject_once",name:"Reject"}];constructor($,Q,w){this.connection=$;this.sdk=Q;this.sessionManager=w}handle($){let Q=this.sessionManager.tryGet($.sessionID);if(!Q)return;let f=(this.permissionQueues.get($.sessionID)??Promise.resolve()).then(async()=>{let X=Q.cwd,G=await this.connection.requestPermission({sessionId:$.sessionID,toolCall:{toolCallId:$.tool?.callID??$.id,status:"pending",title:$.permission,rawInput:$.metadata,kind:b($.permission),locations:u($.permission,$.metadata??{})},options:this.permissionOptions}).catch(async(_)=>{$$.error("failed to request permission from ACP",{error:_,permissionID:$.id,sessionID:$.sessionID}),await this.sdk.permission.reply({requestID:$.id,reply:"reject",directory:X});return});if(!G)return;if(G.outcome.outcome!=="selected"){await this.sdk.permission.reply({requestID:$.id,reply:"reject",directory:X});return}if(G.outcome.optionId!=="reject"&&$.permission=="edit"){let _=$.metadata||{},J=typeof _.filepath==="string"?_.filepath:"",j=typeof _.diff==="string"?_.diff:"",B=await kD.exists(J)?await kD.readText(J):"",Y=eD(B,j);if(Y)this.connection.writeTextFile({sessionId:Q.id,path:J,content:Y})}await this.sdk.permission.reply({requestID:$.id,reply:G.outcome.optionId,directory:X})}).catch((X)=>{$$.error("failed to handle permission",{error:X,permissionID:$.id})}).finally(()=>{if(this.permissionQueues.get($.sessionID)===f)this.permissionQueues.delete($.sessionID)});this.permissionQueues.set($.sessionID,f)}}var L=H.create({service:"acp-event-bridge"});class UD{connection;sdk;sessionManager;eventAbort=new AbortController;eventStarted=!1;bashSnapshots=new Map;toolStarts=new Set;permissionHandler;constructor($,Q,w){this.connection=$;this.sdk=Q;this.sessionManager=w;this.permissionHandler=new TD($,Q,w)}start(){if(this.eventStarted)return;this.eventStarted=!0,this.runEventSubscription().catch(($)=>{if(this.eventAbort.signal.aborted)return;L.error("event subscription failed",{error:$})})}stop(){this.eventAbort.abort()}async runEventSubscription(){while(!0){if(this.eventAbort.signal.aborted)return;let $=await this.sdk.global.event({signal:this.eventAbort.signal,sseMaxRetryAttempts:0});for await(let Q of $.stream){if(this.eventAbort.signal.aborted)return;let w=Q?.payload;if(!w)continue;await this.handleEvent(w).catch((f)=>{L.error("failed to handle event",{error:f,type:w.type})})}if(this.eventAbort.signal.aborted)return;await new Promise((Q)=>{let w=()=>{clearTimeout(f),this.eventAbort.signal.removeEventListener("abort",w),Q()},f=setTimeout(w,1000);if(this.eventAbort.signal.addEventListener("abort",w,{once:!0}),this.eventAbort.signal.aborted)w()})}}async handleEvent($){switch($.type){case"permission.asked":{this.permissionHandler.handle($.properties);return}case"message.part.updated":{L.info("message part updated",{event:$.properties});let w=$.properties.part,f=this.sessionManager.tryGet(w.sessionID);if(!f)return;let X=f.id;if(w.type==="tool")switch(await this.toolStart(X,w),w.state.status){case"pending":this.bashSnapshots.delete(w.callID);return;case"running":{let G=xD(w),_=[];if(G){let J=w$.fast(G);if(w.tool==="bash"){if(this.bashSnapshots.get(w.callID)===J){await this.sendToolInProgress(X,w,w.state,[]);return}this.bashSnapshots.set(w.callID,J)}_.push({type:"content",content:{type:"text",text:G}})}await this.sendToolInProgress(X,w,w.state,_);return}case"completed":await this.sendToolCompleted(X,w,w.state);return;case"error":await this.sendToolError(X,w,w.state);return}if(w.type!=="text"&&w.type!=="file")return;return}case"message.part.delta":{let Q=$.properties,w=this.sessionManager.tryGet(Q.sessionID);if(!w)return;let f=w.id,X=await this.sdk.session.message({sessionID:Q.sessionID,messageID:Q.messageID,directory:w.cwd},{throwOnError:!0}).then((_)=>_.data).catch((_)=>{L.error("unexpected error when fetching message",{error:_});return});if(!X||X.info.role!=="assistant")return;let G=X.parts.find((_)=>_.id===Q.partID);if(!G)return;if(G.type==="text"&&Q.field==="text"&&G.ignored!==!0){await this.connection.sessionUpdate({sessionId:f,update:{sessionUpdate:"agent_message_chunk",messageId:Q.messageID,content:{type:"text",text:Q.delta}}}).catch((_)=>{L.error("failed to send text delta to ACP",{error:_})});return}if(G.type==="reasoning"&&Q.field==="text")await this.connection.sessionUpdate({sessionId:f,update:{sessionUpdate:"agent_thought_chunk",messageId:Q.messageID,content:{type:"text",text:Q.delta}}}).catch((_)=>{L.error("failed to send reasoning delta to ACP",{error:_})});return}}}async sendToolInProgress($,Q,w,f){await this.connection.sessionUpdate({sessionId:$,update:{sessionUpdate:"tool_call_update",toolCallId:Q.callID,status:"in_progress",kind:b(Q.tool),title:Q.tool,locations:u(Q.tool,w.input),rawInput:w.input,...f.length>0&&{content:f}}}).catch((X)=>{L.error("failed to send tool in_progress to ACP",{error:X})})}async sendToolCompleted($,Q,w){this.toolStarts.delete(Q.callID),this.bashSnapshots.delete(Q.callID);let f=b(Q.tool),X=[{type:"content",content:{type:"text",text:w.output}}];if(f==="edit"){let G=w.input,_=typeof G.filePath==="string"?G.filePath:"",J=typeof G.oldString==="string"?G.oldString:"",j=typeof G.newString==="string"?G.newString:typeof G.content==="string"?G.content:"";X.push({type:"diff",path:_,oldText:J,newText:j})}await this.connection.sessionUpdate({sessionId:$,update:{sessionUpdate:"tool_call_update",toolCallId:Q.callID,status:"completed",kind:f,content:X,title:w.title,rawInput:w.input,rawOutput:{output:w.output,metadata:w.metadata}}}).catch((G)=>{L.error("failed to send tool completed to ACP",{error:G})})}async sendToolError($,Q,w){this.toolStarts.delete(Q.callID),this.bashSnapshots.delete(Q.callID),await this.connection.sessionUpdate({sessionId:$,update:{sessionUpdate:"tool_call_update",toolCallId:Q.callID,status:"failed",kind:b(Q.tool),title:Q.tool,rawInput:w.input,content:[{type:"content",content:{type:"text",text:w.error}}],rawOutput:{error:w.error,metadata:w.metadata}}}).catch((f)=>{L.error("failed to send tool error to ACP",{error:f})})}async toolStart($,Q){if(this.toolStarts.has(Q.callID))return;this.toolStarts.add(Q.callID),await this.connection.sessionUpdate({sessionId:$,update:{sessionUpdate:"tool_call",toolCallId:Q.callID,title:Q.tool,kind:b(Q.tool),status:"pending",locations:[],rawInput:{}}}).catch((w)=>{L.error("failed to send tool pending to ACP",{error:w})})}async processMessage($){if(L.debug("process message",$),$.info.role!=="assistant"&&$.info.role!=="user")return;let Q=$.info.sessionID;for(let w of $.parts)if(w.type==="tool")switch(await this.toolStart(Q,w),w.state.status){case"pending":this.bashSnapshots.delete(w.callID);break;case"running":{let f=xD(w),X=[];if(f)X.push({type:"content",content:{type:"text",text:f}});await this.sendToolInProgress(Q,w,w.state,X);break}case"completed":await this.sendToolCompleted(Q,w,w.state);break;case"error":await this.sendToolError(Q,w,w.state);break}else if(w.type==="text"){if(w.text){let f=w.synthetic?["assistant"]:w.ignored?["user"]:void 0;await this.connection.sessionUpdate({sessionId:Q,update:{sessionUpdate:$.info.role==="user"?"user_message_chunk":"agent_message_chunk",messageId:$.info.id,content:{type:"text",text:w.text,...f&&{annotations:{audience:f}}}}}).catch((X)=>{L.error("failed to send text to ACP",{error:X})})}}else if(w.type==="file"){let f=w.url,X=w.filename??"file",G=w.mime||"application/octet-stream",_=$.info.role==="user"?"user_message_chunk":"agent_message_chunk";if(f.startsWith("file://"))await this.connection.sessionUpdate({sessionId:Q,update:{sessionUpdate:_,messageId:$.info.id,content:{type:"resource_link",uri:f,name:X,mimeType:G}}}).catch((J)=>{L.error("failed to send resource_link to ACP",{error:J})});else if(f.startsWith("data:")){let J=f.match(/^data:([^;]+);base64,(.*)$/),j=J?.[1],B=J?.[2]??"",Y=j||G;if(Y.startsWith("image/"))await this.connection.sessionUpdate({sessionId:Q,update:{sessionUpdate:_,messageId:$.info.id,content:{type:"image",mimeType:Y,data:B,uri:c(X).href}}}).catch((Z)=>{L.error("failed to send image to ACP",{error:Z})});else{let Z=Y.startsWith("text/")||Y==="application/json",A=c(X).href,y=Z?{uri:A,mimeType:Y,text:Buffer.from(B,"base64").toString("utf-8")}:{uri:A,mimeType:Y,blob:B};await this.connection.sessionUpdate({sessionId:Q,update:{sessionUpdate:_,messageId:$.info.id,content:{type:"resource",resource:y}}}).catch((W)=>{L.error("failed to send resource to ACP",{error:W})})}}}else if(w.type==="reasoning"){if(w.text)await this.connection.sessionUpdate({sessionId:Q,update:{sessionUpdate:"agent_thought_chunk",messageId:$.info.id,content:{type:"text",text:w.text}}}).catch((f)=>{L.error("failed to send reasoning to ACP",{error:f})})}}}var V=H.create({service:"acp-agent"});async function rw($,Q,w,f){return(await $.config.providers({directory:f}).then((J)=>J.data?.providers??[]).catch((J)=>{return V.error("failed to get providers for context limit",{error:J}),[]})).find((J)=>J.id===Q)?.models[w]?.limit.context??null}async function bD($,Q,w,f){let X=await Q.session.messages({sessionID:w,directory:f,agent_id:"main"},{throwOnError:!0}).then((Z)=>Z.data).catch((Z)=>{V.error("failed to fetch messages for usage update",{error:Z});return});if(!X)return;let G=X.filter((Z)=>Z.info.role==="assistant"),_=G[G.length-1];if(!_)return;let J=_.info;if(!J.providerID||!J.modelID)return;let j=await rw(Q,k.make(J.providerID),P.make(J.modelID),f);if(!j)return;let B=J.tokens.input+(J.tokens.cache?.read??0),Y=G.reduce((Z,A)=>Z+A.info.cost,0);await $.sessionUpdate({sessionId:w,update:{sessionUpdate:"usage_update",used:B,size:j,cost:{amount:Y,currency:"USD"}}}).catch((Z)=>{V.error("failed to send usage update",{error:Z})})}async function zw({sdk:$}){return{create:(Q,w)=>{return new CD(Q,w)}}}class CD{connection;config;sdk;sessionManager;eventBridge;constructor($,Q){this.connection=$,this.config=Q,this.sdk=Q.sdk,this.sessionManager=new LD(this.sdk),this.eventBridge=new UD($,this.sdk,this.sessionManager),this.eventBridge.start()}async initialize($){V.info("initialize",{protocolVersion:$.protocolVersion});let Q={description:"Run `qitqode auth login` in the terminal",name:"Login with qitqode",id:"qitqode-login"};if($.clientCapabilities?._meta?.["terminal-auth"]===!0)Q._meta={"terminal-auth":{command:"qitqode",args:["auth","login"],label:"QitQode Login"}};return{protocolVersion:1,agentCapabilities:{loadSession:!0,mcpCapabilities:{http:!0,sse:!0},promptCapabilities:{embeddedContext:!0,image:!0},sessionCapabilities:{fork:{},list:{},resume:{}}},authMethods:[Q],agentInfo:{name:"QitQode",version:Q$}}}async authenticate($){throw Error("Authentication not implemented")}rethrowSessionError($){let Q=G$.fromError($,{providerID:k.make(this.config.defaultModel?.providerID??"unknown")});if(f$.isInstance(Q))throw K.authRequired();throw $}fetchSessionMessages($,Q){return this.sdk.session.messages({sessionID:$,directory:Q,agent_id:"main"},{throwOnError:!0}).then((w)=>w.data).catch((w)=>{V.error("unexpected error when fetching message",{error:w});return})}loadSessionProviders($){return this.sdk.config.providers({directory:$},{throwOnError:!0}).then((Q)=>Q.data.providers)}async newSession($){let Q=$.cwd;try{let w=await h(this.config,Q),X=(await this.sessionManager.create($.cwd,$.mcpServers,w)).id;V.info("creating_session",{sessionId:X,mcpServers:$.mcpServers.length});let G=await this.loadSessionMode({cwd:Q,mcpServers:$.mcpServers,sessionId:X});return{sessionId:X,configOptions:G.configOptions,models:G.models,modes:G.modes,_meta:G._meta}}catch(w){this.rethrowSessionError(w)}}async loadSession($){let{cwd:Q,sessionId:w}=$;try{let f=await h(this.config,Q);await this.sessionManager.load(w,$.cwd,$.mcpServers,f),V.info("load_session",{sessionId:w,mcpServers:$.mcpServers.length});let X=await this.loadSessionMode({cwd:Q,mcpServers:$.mcpServers,sessionId:w}),G=await this.fetchSessionMessages(w,Q),_=G?.findLast((J)=>J.info.role==="user")?.info;if(_?.role==="user"){if(X.models.currentModelId=`${_.model.providerID}/${_.model.modelID}`,this.sessionManager.setModel(w,{providerID:k.make(_.model.providerID),modelID:P.make(_.model.modelID)}),X.modes?.availableModes.some((J)=>J.id===_.agent))X.modes.currentModeId=_.agent,this.sessionManager.setMode(w,_.agent);X.configOptions=i({currentModelId:X.models.currentModelId,availableModels:X.models.availableModels,modes:X.modes})}return await this.replayMessagesAndSendUsage(G,w,Q),X}catch(f){this.rethrowSessionError(f)}}async listSessions($){try{let w=await this.sdk.session.list({directory:$.cwd??void 0,roots:!0},{throwOnError:!0}).then((Z)=>Z.data??[]),f=$.cursor?Number($.cursor):void 0,X=w.toSorted((Z,A)=>A.time.updated-Z.time.updated),G=f?X.filter((Z)=>Z.time.updated<f):X,_=G.slice(0,100),J=_.map((Z)=>({sessionId:Z.id,cwd:Z.directory,title:Z.title,updatedAt:new Date(Z.time.updated).toISOString()})),j=_[_.length-1],B=G.length>100&&j?String(j.time.updated):void 0,Y={sessions:J};if(B)Y.nextCursor=B;return Y}catch(Q){this.rethrowSessionError(Q)}}async unstable_forkSession($){let Q=$.cwd,w=$.mcpServers??[];try{let f=await h(this.config,Q),X=await this.sdk.session.fork({sessionID:$.sessionId,directory:Q},{throwOnError:!0}).then((j)=>j.data);if(!X)throw Error("Fork session returned no data");let G=X.id;await this.sessionManager.load(G,Q,w,f),V.info("fork_session",{sessionId:G,mcpServers:w.length});let _=await this.loadSessionMode({cwd:Q,mcpServers:w,sessionId:G}),J=await this.fetchSessionMessages(G,Q);return await this.replayMessagesAndSendUsage(J,G,Q),_}catch(f){this.rethrowSessionError(f)}}async unstable_resumeSession($){let{cwd:Q,sessionId:w}=$,f=$.mcpServers??[];try{let X=await h(this.config,Q);await this.sessionManager.load(w,Q,f,X),V.info("resume_session",{sessionId:w,mcpServers:f.length});let G=await this.loadSessionMode({cwd:Q,mcpServers:f,sessionId:w});return await bD(this.connection,this.sdk,w,Q),G}catch(X){this.rethrowSessionError(X)}}async loadAvailableModes($){return(await this.config.sdk.app.agents({directory:$},{throwOnError:!0}).then((w)=>w.data)).filter((w)=>w.mode!=="subagent"&&!w.hidden).map((w)=>({id:w.name,name:w.name,description:w.description}))}async resolveModeState($,Q){let w=await this.loadAvailableModes($),f=this.sessionManager.get(Q).modeId||await(async()=>{if(!w.length)return;let X=await MD.runPromise(hD.Service.use((_)=>_.defaultAgent())),G=w.find((_)=>_.name===X)?.id??w[0].id;return this.sessionManager.setMode(Q,G),G})();return{availableModes:w,currentModeId:f}}async replayMessagesAndSendUsage($,Q,w){for(let f of $??[])V.debug("replay message",f),await this.eventBridge.processMessage(f);await bD(this.connection,this.sdk,Q,w)}async resolveModelsAndModes($){let Q=VD($.entries,$.model);$.onVariants?.(Q);let w=D$($.entries,{includeVariants:!0}),f=await this.resolveModeState($.directory,$.sessionId),X=f.currentModeId?{availableModes:f.availableModes,currentModeId:f.currentModeId}:void 0;return{availableVariants:Q,availableModels:w,modes:X}}async loadSessionMode($){let Q=$.cwd,w=await h(this.config,Q),f=$.sessionId,X=await this.sdk.config.providers({directory:Q}).then((W)=>W.data.providers),G=l(X),_=this.sessionManager.getVariant(f),{availableVariants:J,availableModels:j,modes:B}=await this.resolveModelsAndModes({entries:G,model:w,directory:Q,sessionId:f,onVariants:(W)=>{if(_&&!W.includes(_))this.sessionManager.setVariant(f,void 0)}}),Z=(await this.config.sdk.command.list({directory:Q},{throwOnError:!0}).then((W)=>W.data)).map((W)=>({name:W.name,description:W.description??""}));if(!new Set(Z.map((W)=>W.name)).has("compact"))Z.push({name:"compact",description:"summarize the session to reduce context"});let y={};for(let W of $.mcpServers)if("type"in W)y[W.name]={url:W.url,headers:W.headers.reduce((x,{name:C,value:m})=>{return x[C]=m,x},{}),type:"remote"};else y[W.name]={type:"local",command:[W.command,...W.args],environment:W.env.reduce((x,{name:C,value:m})=>{return x[C]=m,x},{})};return await Promise.all(Object.entries(y).map(async([W,x])=>{await this.sdk.mcp.add({directory:Q,name:W,config:x},{throwOnError:!0}).catch((C)=>{V.error("failed to add mcp server",{name:W,error:C})})})),setTimeout(()=>{this.connection.sessionUpdate({sessionId:f,update:{sessionUpdate:"available_commands_update",availableCommands:Z}})},0),{sessionId:f,models:{currentModelId:d(w,_,J,!0),availableModels:j},modes:B,configOptions:i({currentModelId:d(w,_,J,!0),availableModels:j,modes:B}),_meta:HD({model:w,variant:this.sessionManager.getVariant(f),availableVariants:J})}}async unstable_setSessionModel($){let Q=this.sessionManager.get($.sessionId),w=await this.loadSessionProviders(Q.cwd),f=PD($.modelId,w);this.sessionManager.setModel(Q.id,f.model),this.sessionManager.setVariant(Q.id,f.variant);let X=l(w),G=VD(X,f.model);return{_meta:HD({model:f.model,variant:f.variant,availableVariants:G})}}async setSessionMode($){let Q=this.sessionManager.get($.sessionId);if(!(await this.loadAvailableModes(Q.cwd)).some((f)=>f.id===$.modeId))throw Error(`Agent not found: ${$.modeId}`);this.sessionManager.setMode($.sessionId,$.modeId)}async setSessionConfigOption($){let Q=this.sessionManager.get($.sessionId),w=await this.loadSessionProviders(Q.cwd),f=l(w);if($.configId==="model"){if(typeof $.value!=="string")throw K.invalidParams("model value must be a string");let Y=PD($.value,w);this.sessionManager.setModel(Q.id,Y.model),this.sessionManager.setVariant(Q.id,Y.variant)}else if($.configId==="mode"){if(typeof $.value!=="string")throw K.invalidParams("mode value must be a string");if(!(await this.loadAvailableModes(Q.cwd)).some((Z)=>Z.id===$.value))throw K.invalidParams(JSON.stringify({error:`Mode not found: ${$.value}`}));this.sessionManager.setMode(Q.id,$.value)}else throw K.invalidParams(JSON.stringify({error:`Unknown config option: ${$.configId}`}));let X=this.sessionManager.get(Q.id),G=X.model??await h(this.config,Q.cwd),{availableVariants:_,availableModels:J,modes:j}=await this.resolveModelsAndModes({entries:f,model:G,directory:Q.cwd,sessionId:Q.id}),B=d(G,X.variant,_,!0);return{configOptions:i({currentModelId:B,availableModels:J,modes:j})}}async prompt($){let Q=$.sessionId,w=this.sessionManager.get(Q),f=w.cwd,X=w.model,G=X??await h(this.config,f);if(!X)this.sessionManager.setModel(w.id,G);let _=w.modeId??await MD.runPromise(hD.Service.use((A)=>A.defaultAgent())),J=[];for(let A of $.prompt)switch(A.type){case"text":{let y=A.annotations?.audience,W=y?.length===1&&y[0]==="assistant",x=y?.length===1&&y[0]==="user";J.push({type:"text",text:A.text,...W&&{synthetic:!0},...x&&{ignored:!0}});break}case"image":{let y=g(A.uri??""),W=y.type==="file"?y.filename:"image";if(A.data)J.push({type:"file",url:`data:${A.mimeType};base64,${A.data}`,filename:W,mime:A.mimeType});else if(A.uri&&A.uri.startsWith("http:"))J.push({type:"file",url:A.uri,filename:W,mime:A.mimeType});break}case"resource_link":{let y=g(A.uri);if(A.name&&y.type==="file")y.filename=A.name;J.push(y);break}case"resource":{let y=A.resource;if("text"in y&&y.text)J.push({type:"text",text:y.text});else if("blob"in y&&y.blob&&y.mimeType){let W=g(y.uri??""),x=W.type==="file"?W.filename:"file";J.push({type:"file",url:`data:${y.mimeType};base64,${y.blob}`,filename:x,mime:y.mimeType})}break}default:break}V.info("parts",{parts:J});let j=(()=>{let A=J.filter((x)=>x.type==="text").map((x)=>x.text).join("").trim();if(!A.startsWith("/"))return;let[y,...W]=A.slice(1).split(/\s+/);return{name:y,args:W.join(" ").trim()}})(),B=(A)=>({totalTokens:A.tokens.input+A.tokens.output+A.tokens.reasoning+(A.tokens.cache?.read??0)+(A.tokens.cache?.write??0),inputTokens:A.tokens.input,outputTokens:A.tokens.output,thoughtTokens:A.tokens.reasoning||void 0,cachedReadTokens:A.tokens.cache?.read||void 0,cachedWriteTokens:A.tokens.cache?.write||void 0}),Y,Z=!1;if(!j)Z=!0,Y=(await this.sdk.session.prompt({sessionID:Q,model:{providerID:G.providerID,modelID:G.modelID},variant:this.sessionManager.getVariant(Q),parts:J,agent:_,directory:f})).data?.info;else{let A=await this.config.sdk.command.list({directory:f},{throwOnError:!0}).then((y)=>y.data.find((W)=>W.name===j.name));if(A)Z=!0,Y=(await this.sdk.session.command({sessionID:Q,command:A.name,arguments:j.args,model:G.providerID+"/"+G.modelID,agent:_,directory:f})).data?.info;else switch(j.name){case"compact":await this.config.sdk.session.summarize({sessionID:Q,directory:f,providerID:G.providerID,modelID:G.modelID},{throwOnError:!0});break}}return await bD(this.connection,this.sdk,Q,f),{stopReason:"end_turn",...Z?{usage:Y?B(Y):void 0}:{},_meta:{}}}async cancel($){let Q=this.sessionManager.get($.sessionId);await this.config.sdk.session.abort({sessionID:$.sessionId,directory:Q.cwd},{throwOnError:!0})}}async function h($,Q){let{sdk:w,defaultModel:f}=$;if(f)return f;let X=Q??process.cwd(),G=await w.config.get({directory:X},{throwOnError:!0}).then((Y)=>{let Z=Y.data;if(!Z||!Z.model)return;return U.parseModel(Z.model)}).catch((Y)=>{V.error("failed to load user config for default model",{error:Y});return}),_=await w.config.providers({directory:X},{throwOnError:!0}).then((Y)=>Y.data?.providers??[]).catch((Y)=>{return V.error("failed to list providers for default model",{error:Y}),[]});if(G&&_.length){let Y=_.find((Z)=>Z.id===G.providerID);if(Y&&Y.models[G.modelID])return G}if(G&&!_.length)return G;let J=_.find((Y)=>Y.id==="opencode");if(J){if(J.models["big-pickle"])return{providerID:k.opencode,modelID:P.make("big-pickle")};let[Y]=U.sort(Object.values(J.models));if(Y)return{providerID:k.make(Y.providerID),modelID:P.make(Y.id)}}for(let Y of["default","fast","economical","power"]){let Z=_$[Y];if(!Z)continue;if(_.find((y)=>y.id===Z.providerID)?.models[Z.modelID])return{providerID:k.make(Z.providerID),modelID:P.make(Z.modelID)}}let j=_.flatMap((Y)=>Object.values(Y.models)),[B]=U.sort(j);if(B)return{providerID:k.make(B.providerID),modelID:P.make(B.id)};if(G)return G;return{providerID:k.opencode,modelID:P.make("big-pickle")}}var ED=H.create({service:"acp-command"}),sQ=A$({command:"acp",describe:"start ACP (Agent Client Protocol) server",builder:($)=>{return J$($).option("cwd",{describe:"working directory",type:"string",default:process.cwd()})},handler:async($)=>{if(process.env.QITQODE_CLIENT="acp",process.env.QITQODE_KEY)ED.info("Using QITQODE_KEY for authentication.");else if(!await Y$())ED.warn("No QitQode credential found. AI features will not work until you sign in (`qitqode auth login`) or set QITQODE_KEY.");await j$(process.cwd(),async()=>{let Q=await W$($),w=await Z$.listen(Q),f=X$({baseUrl:`http://${w.hostname}:${w.port}`}),X=new WritableStream({write(j){return new Promise((B,Y)=>{process.stdout.write(j,(Z)=>{if(Z)Y(Z);else B()})})}}),G=new ReadableStream({start(j){process.stdin.on("data",(B)=>{j.enqueue(new Uint8Array(B))}),process.stdin.on("end",()=>j.close()),process.stdin.on("error",(B)=>j.error(B))}}),_=zD(X,G),J=await v.init({sdk:f});new OD((j)=>{return J.create(j,{sdk:f})},_),ED.info("setup connection"),process.stdin.resume(),await new Promise((j,B)=>{process.stdin.on("end",j),process.stdin.on("error",B)})})}});export{sQ as AcpCommand};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Sf as i}from"./chunk-d6jhs818.js";import{tO as P,wO as C}from"./chunk-r9w0thdk.js";var h=P((V)=>{var s=V&&V.__createBinding||(Object.create?function(w,z,G,J){if(J===void 0)J=G;var K=Object.getOwnPropertyDescriptor(z,G);if(!K||("get"in K?!z.__esModule:K.writable||K.configurable))K={enumerable:!0,get:function(){return z[G]}};Object.defineProperty(w,J,K)}:function(w,z,G,J){if(J===void 0)J=G;w[J]=z[G]}),t=V&&V.__setModuleDefault||(Object.create?function(w,z){Object.defineProperty(w,"default",{enumerable:!0,value:z})}:function(w,z){w.default=z}),g=V&&V.__importStar||function(w){if(w&&w.__esModule)return w;var z={};if(w!=null){for(var G in w)if(G!=="default"&&Object.prototype.hasOwnProperty.call(w,G))s(z,w,G)}return t(z,w),z};Object.defineProperty(V,"__esModule",{value:!0});V.req=V.json=V.toBuffer=void 0;var o=g(C("http")),e=g(C("https"));async function b(w){let z=0,G=[];for await(let J of w)z+=J.length,G.push(J);return Buffer.concat(G,z)}V.toBuffer=b;async function ww(w){let G=(await b(w)).toString("utf8");try{return JSON.parse(G)}catch(J){let K=J;throw K.message+=` (input: ${G})`,K}}V.json=ww;function zw(w,z={}){let J=((typeof w==="string"?w:w.href).startsWith("https:")?e:o).request(w,z),K=new Promise((X,Q)=>{J.once("response",X).once("error",Q).end()});return J.then=K.then.bind(K),J}V.req=zw});var u=P((W)=>{var _=W&&W.__createBinding||(Object.create?function(w,z,G,J){if(J===void 0)J=G;var K=Object.getOwnPropertyDescriptor(z,G);if(!K||("get"in K?!z.__esModule:K.writable||K.configurable))K={enumerable:!0,get:function(){return z[G]}};Object.defineProperty(w,J,K)}:function(w,z,G,J){if(J===void 0)J=G;w[J]=z[G]}),Gw=W&&W.__setModuleDefault||(Object.create?function(w,z){Object.defineProperty(w,"default",{enumerable:!0,value:z})}:function(w,z){w.default=z}),l=W&&W.__importStar||function(w){if(w&&w.__esModule)return w;var z={};if(w!=null){for(var G in w)if(G!=="default"&&Object.prototype.hasOwnProperty.call(w,G))_(z,w,G)}return Gw(z,w),z},Jw=W&&W.__exportStar||function(w,z){for(var G in w)if(G!=="default"&&!Object.prototype.hasOwnProperty.call(z,G))_(z,w,G)};Object.defineProperty(W,"__esModule",{value:!0});W.Agent=void 0;var Kw=l(C("net")),f=l(C("http")),Qw=C("https");Jw(h(),W);var F=Symbol("AgentBaseInternalState");class x extends f.Agent{constructor(w){super(w);this[F]={}}isSecureEndpoint(w){if(w){if(typeof w.secureEndpoint==="boolean")return w.secureEndpoint;if(typeof w.protocol==="string")return w.protocol==="https:"}let{stack:z}=Error();if(typeof z!=="string")return!1;return z.split(`
2
+ import{Tf as i}from"./chunk-qp3hxqg5.js";import{TP as P,WP as C}from"./chunk-f2pv705d.js";var h=P((V)=>{var s=V&&V.__createBinding||(Object.create?function(w,z,G,J){if(J===void 0)J=G;var K=Object.getOwnPropertyDescriptor(z,G);if(!K||("get"in K?!z.__esModule:K.writable||K.configurable))K={enumerable:!0,get:function(){return z[G]}};Object.defineProperty(w,J,K)}:function(w,z,G,J){if(J===void 0)J=G;w[J]=z[G]}),t=V&&V.__setModuleDefault||(Object.create?function(w,z){Object.defineProperty(w,"default",{enumerable:!0,value:z})}:function(w,z){w.default=z}),g=V&&V.__importStar||function(w){if(w&&w.__esModule)return w;var z={};if(w!=null){for(var G in w)if(G!=="default"&&Object.prototype.hasOwnProperty.call(w,G))s(z,w,G)}return t(z,w),z};Object.defineProperty(V,"__esModule",{value:!0});V.req=V.json=V.toBuffer=void 0;var o=g(C("http")),e=g(C("https"));async function b(w){let z=0,G=[];for await(let J of w)z+=J.length,G.push(J);return Buffer.concat(G,z)}V.toBuffer=b;async function ww(w){let G=(await b(w)).toString("utf8");try{return JSON.parse(G)}catch(J){let K=J;throw K.message+=` (input: ${G})`,K}}V.json=ww;function zw(w,z={}){let J=((typeof w==="string"?w:w.href).startsWith("https:")?e:o).request(w,z),K=new Promise((X,Q)=>{J.once("response",X).once("error",Q).end()});return J.then=K.then.bind(K),J}V.req=zw});var u=P((W)=>{var _=W&&W.__createBinding||(Object.create?function(w,z,G,J){if(J===void 0)J=G;var K=Object.getOwnPropertyDescriptor(z,G);if(!K||("get"in K?!z.__esModule:K.writable||K.configurable))K={enumerable:!0,get:function(){return z[G]}};Object.defineProperty(w,J,K)}:function(w,z,G,J){if(J===void 0)J=G;w[J]=z[G]}),Gw=W&&W.__setModuleDefault||(Object.create?function(w,z){Object.defineProperty(w,"default",{enumerable:!0,value:z})}:function(w,z){w.default=z}),l=W&&W.__importStar||function(w){if(w&&w.__esModule)return w;var z={};if(w!=null){for(var G in w)if(G!=="default"&&Object.prototype.hasOwnProperty.call(w,G))_(z,w,G)}return Gw(z,w),z},Jw=W&&W.__exportStar||function(w,z){for(var G in w)if(G!=="default"&&!Object.prototype.hasOwnProperty.call(z,G))_(z,w,G)};Object.defineProperty(W,"__esModule",{value:!0});W.Agent=void 0;var Kw=l(C("net")),f=l(C("http")),Qw=C("https");Jw(h(),W);var F=Symbol("AgentBaseInternalState");class x extends f.Agent{constructor(w){super(w);this[F]={}}isSecureEndpoint(w){if(w){if(typeof w.secureEndpoint==="boolean")return w.secureEndpoint;if(typeof w.protocol==="string")return w.protocol==="https:"}let{stack:z}=Error();if(typeof z!=="string")return!1;return z.split(`
3
3
  `).some((G)=>G.indexOf("(https.js:")!==-1||G.indexOf("node:https:")!==-1)}incrementSockets(w){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;if(!this.sockets[w])this.sockets[w]=[];let z=new Kw.Socket({writable:!1});return this.sockets[w].push(z),this.totalSocketCount++,z}decrementSockets(w,z){if(!this.sockets[w]||z===null)return;let G=this.sockets[w],J=G.indexOf(z);if(J!==-1){if(G.splice(J,1),this.totalSocketCount--,G.length===0)delete this.sockets[w]}}getName(w){if(this.isSecureEndpoint(w))return Qw.Agent.prototype.getName.call(this,w);return super.getName(w)}createSocket(w,z,G){let J={...z,secureEndpoint:this.isSecureEndpoint(z)},K=this.getName(J),X=this.incrementSockets(K);Promise.resolve().then(()=>this.connect(w,J)).then((Q)=>{if(this.decrementSockets(K,X),Q instanceof f.Agent)try{return Q.addRequest(w,J)}catch(U){return G(U)}this[F].currentSocket=Q,super.createSocket(w,z,G)},(Q)=>{this.decrementSockets(K,X),G(Q)})}createConnection(){let w=this[F].currentSocket;if(this[F].currentSocket=void 0,!w)throw Error("No socket was returned in the `connect()` function");return w}get defaultPort(){return this[F].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(w){if(this[F])this[F].defaultPort=w}get protocol(){return this[F].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(w){if(this[F])this[F].protocol=w}}W.Agent=x});var a=P((B)=>{var Vw=B&&B.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(B,"__esModule",{value:!0});B.parseProxyResponse=void 0;var Ww=Vw(i()),T=(0,Ww.default)("https-proxy-agent:parse-proxy-response");function Xw(w){return new Promise((z,G)=>{let J=0,K=[];function X(){let $=w.read();if($)S($);else w.once("readable",X)}function Q(){w.removeListener("end",U),w.removeListener("error",O),w.removeListener("readable",X)}function U(){Q(),T("onend"),G(Error("Proxy connection ended before receiving CONNECT response"))}function O($){Q(),T("onerror %o",$),G($)}function S($){K.push($),J+=$.length;let Y=Buffer.concat(K,J),N=Y.indexOf(`\r
4
4
  \r
5
5
  `);if(N===-1){T("have not received end of HTTP headers yet..."),X();return}let v=Y.slice(0,N).toString("ascii").split(`\r
@@ -7,4 +7,4 @@ import{Sf as i}from"./chunk-d6jhs818.js";import{tO as P,wO as C}from"./chunk-r9w
7
7
  `;if(G.username||G.password){let Y=`${decodeURIComponent(G.username)}:${decodeURIComponent(G.password)}`;K["Proxy-Authorization"]=`Basic ${Buffer.from(Y).toString("base64")}`}if(K.Host=`${X}:${z.port}`,!K["Proxy-Connection"])K["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close";for(let Y of Object.keys(K))Q+=`${Y}: ${K[Y]}\r
8
8
  `;let U=(0,Ow.parseProxyResponse)(J);J.write(`${Q}\r
9
9
  `);let{connect:O,buffered:S}=await U;if(w.emit("proxyConnect",O),this.emit("proxyConnect",O,w),O.statusCode===200){if(w.once("socket",Bw),z.secureEndpoint)return H("Upgrading socket connection to TLS"),c.connect({...n(m(z),"host","path","port"),socket:J});return J}J.destroy();let $=new I.Socket({writable:!1});return $.readable=!0,w.once("socket",(Y)=>{H("Replaying proxy buffer for failed request"),(0,$w.default)(Y.listenerCount("data")>0),Y.push(S),Y.push(null)}),$}}L.protocols=["http","https"];Z.HttpsProxyAgent=L;function Bw(w){w.resume()}function n(w,...z){let G={},J;for(J in w)if(!z.includes(J))G[J]=w[J];return G}});
10
- export{u as Qf,Dw as Rf};
10
+ export{u as Rf,Dw as Sf};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{i as P,j as g,k as b,l as h,m as O}from"./chunk-ehb4hd9c.js";import"./chunk-ff548b0j.js";import"./chunk-zc0cdvcv.js";import{ae as u}from"./chunk-5w76kdjr.js";import{dg as s}from"./chunk-eg3syjtv.js";import{Bh as f}from"./chunk-hjt94wce.js";import{Ch as E}from"./chunk-w46g7kdq.js";import"./chunk-bd21p9zz.js";import"./chunk-p54bzjtv.js";import"./chunk-ha1w0xzh.js";import"./chunk-6m9jb0s9.js";import"./chunk-vygkwwjd.js";import{Aj as S,Bj as p}from"./chunk-k3dacdp5.js";import"./chunk-99s035f0.js";import"./chunk-h9wh48d0.js";import"./chunk-tzb26ntq.js";import"./chunk-mh19kwzw.js";import"./chunk-q3h42a94.js";import"./chunk-hqbbs9dm.js";import"./chunk-9zm6r55d.js";import"./chunk-vcygx6hs.js";import"./chunk-khzzmyk2.js";import"./chunk-y7hgevfv.js";import"./chunk-47k5jy1p.js";import"./chunk-cfhfc86j.js";import"./chunk-ph8hn1wt.js";import"./chunk-ptqk1j2r.js";import"./chunk-cqtkxwd8.js";import"./chunk-pr7z5dj8.js";import"./chunk-dnnkq5y4.js";import"./chunk-t239rvej.js";import"./chunk-yz25607t.js";import"./chunk-7hvf9dgx.js";import"./chunk-wkg3c643.js";import"./chunk-fhqfqd5v.js";import"./chunk-q3nvzhyh.js";import"./chunk-5df5aja0.js";import"./chunk-73r8bjjz.js";import"./chunk-xy0gnpen.js";import"./chunk-ztyy3ga3.js";import"./chunk-mmjgf680.js";import"./chunk-nj1ntakd.js";import"./chunk-cmb62jkt.js";import"./chunk-tkrwcjkr.js";import"./chunk-vdrz2t9c.js";import"./chunk-fr34mnyg.js";import"./chunk-r5zy4za0.js";import"./chunk-tr6rdr6h.js";import"./chunk-at22twxx.js";import"./chunk-kgptyf7n.js";import"./chunk-j9h1sp4g.js";import"./chunk-p6crzjtf.js";import{Qy as I}from"./chunk-55fcmswd.js";import{AC as D,eH as l,lB as d}from"./chunk-qnvsqnz5.js";import"./chunk-pxm4qvqk.js";import"./chunk-j8fcfhr2.js";import"./chunk-r9w0thdk.js";var A=(o)=>l.promise(()=>E(o)),m=(o)=>l.sync(()=>s.println(o)),v=(o)=>s.Style.TEXT_DIM+o+s.Style.TEXT_NORMAL,L=(o)=>o?v(" (active)"):"",w=(o,e)=>`${o.email} ${v(o.url)}${L(e)}`,x=(o,e,t)=>`${e.name} (${o.email})${L(t)}`,C=(o,e,t)=>{let n=t?s.Style.TEXT_SUCCESS+"\u25CF"+s.Style.TEXT_NORMAL:" ",c=t?s.Style.TEXT_HIGHLIGHT_BOLD+e.name+s.Style.TEXT_NORMAL:e.name;return` ${n} ${c} ${v(o.email)} ${v(o.url)} ${v(e.id)}`},T=(o,e)=>d.isSome(o)&&o.value.id===e.accountID&&o.value.active_org_id===e.orgID,_=l.fn("login")(function*(o){let e=yield*p.Service;yield*P("Log in");let t=yield*e.login(o);yield*b.info("Go to: "+t.url),yield*b.info("Enter code: "+t.user),yield*A(t.url);let n=O();yield*n.start("Waiting for authorization...");let c=(r)=>l.gen(function*(){yield*l.sleep(r);let i=yield*e.poll(t);if(i._tag==="PollPending")return yield*c(r);if(i._tag==="PollSlow")return yield*c(D.sum(r,D.seconds(5)));return i}),a=yield*c(t.interval).pipe(l.timeout(t.expiry),l.catchTag("TimeoutError",()=>l.succeed(new S)));yield*I.valueTags(a,{PollSuccess:(r)=>l.gen(function*(){yield*n.stop("Logged in as "+r.email),yield*g("Done")}),PollExpired:()=>n.stop("Device code expired",1),PollDenied:()=>n.stop("Authorization denied",1),PollError:(r)=>n.stop("Error: "+String(r.cause),1),PollPending:()=>n.stop("Unexpected state",1),PollSlow:()=>n.stop("Unexpected state",1)})}),N=l.fn("logout")(function*(o){let e=yield*p.Service,t=yield*e.list();if(t.length===0)return yield*m("Not logged in");if(o){let i=t.find((y)=>y.email===o);if(!i)return yield*m("Account not found: "+o);yield*e.remove(i.id),yield*g("Logged out from "+o);return}let n=yield*e.active(),c=d.map(n,(i)=>i.id);yield*P("Log out");let a=t.map((i)=>{let y=d.isSome(c)&&c.value===i.id;return{value:i,label:w(i,y)}}),r=yield*h({message:"Select account to log out",options:a});if(d.isNone(r))return;yield*e.remove(r.value.id),yield*g("Logged out from "+r.value.email)}),$=l.fn("switch")(function*(){let o=yield*p.Service,e=yield*o.orgsByAccount();if(e.length===0)return yield*m("Not logged in");let t=yield*o.active(),n=e.flatMap((r)=>r.orgs.map((i)=>{let y=T(t,{accountID:r.account.id,orgID:i.id});return{value:{orgID:i.id,accountID:r.account.id,label:i.name},label:x(r.account,i,y)}}));if(n.length===0)return yield*m("No orgs found");yield*P("Switch org");let c=yield*h({message:"Select org",options:n});if(d.isNone(c))return;let a=c.value;yield*o.use(a.accountID,d.some(a.orgID)),yield*g("Switched to "+a.label)}),R=l.fn("orgs")(function*(){let o=yield*p.Service,e=yield*o.orgsByAccount();if(e.length===0)return yield*m("No accounts found");if(!e.some((n)=>n.orgs.length>0))return yield*m("No orgs found");let t=yield*o.active();for(let n of e)for(let c of n.orgs){let a=T(t,{accountID:n.account.id,orgID:c.id});yield*m(C(n.account,c,a))}}),M=l.fn("open")(function*(){let e=yield*(yield*p.Service).active();if(d.isNone(e))return yield*m("No active account");let t=e.value.url;yield*A(t),yield*g("Opened "+t)}),X=u({command:"login <url>",describe:!1,builder:(o)=>o.positional("url",{describe:"server URL",type:"string",demandOption:!0}),async handler(o){s.empty(),await f.runPromise(_(o.url))}}),B=u({command:"logout [email]",describe:!1,builder:(o)=>o.positional("email",{describe:"account email to log out from",type:"string"}),async handler(o){s.empty(),await f.runPromise(N(o.email))}}),U=u({command:"switch",describe:!1,async handler(){s.empty(),await f.runPromise($())}}),G=u({command:"orgs",describe:!1,async handler(){s.empty(),await f.runPromise(R())}}),H=u({command:"open",describe:!1,async handler(){s.empty(),await f.runPromise(M())}}),Y=u({command:"console",describe:!1,builder:(o)=>o.command({...X,describe:"log in to console"}).command({...B,describe:"log out from console"}).command({...U,describe:"switch active org"}).command({...G,describe:"list orgs"}).command({...H,describe:"open active console account"}).demandCommand(),async handler(){}});export{C as formatOrgLine,w as formatAccountLabel,U as SwitchCommand,G as OrgsCommand,H as OpenCommand,B as LogoutCommand,X as LoginCommand,Y as ConsoleCommand};
2
+ import{i as P,j as g,k as b,l as h,m as O}from"./chunk-j6xmgn63.js";import"./chunk-hhk2sp5n.js";import"./chunk-4zhrg3rv.js";import{be as u}from"./chunk-f4mnp6xd.js";import{eg as s}from"./chunk-s06t769q.js";import{Ch as f}from"./chunk-w43kmnm9.js";import{Dh as E}from"./chunk-nrk29616.js";import"./chunk-kre93a89.js";import"./chunk-060wbpz4.js";import"./chunk-zrhw1szj.js";import"./chunk-wd8hbven.js";import"./chunk-drnj1a14.js";import{Bj as S,Cj as p}from"./chunk-9a6p1gdn.js";import"./chunk-jxkrhrp0.js";import"./chunk-6k14c8x1.js";import"./chunk-5r05d901.js";import"./chunk-3rgct4bd.js";import"./chunk-5b3v1x2c.js";import"./chunk-gbxf6e5d.js";import"./chunk-msh249db.js";import"./chunk-95am490c.js";import"./chunk-kmzpeq8k.js";import"./chunk-0gsw04hw.js";import"./chunk-hqjc4wgg.js";import"./chunk-makecdh6.js";import"./chunk-dy2k5rdx.js";import"./chunk-n5p7cn4w.js";import"./chunk-cqtkxwd8.js";import"./chunk-mhxyv9c8.js";import"./chunk-0crgymtr.js";import"./chunk-cth373se.js";import"./chunk-xcxqt8ag.js";import"./chunk-va2qfh0x.js";import"./chunk-ae7b11np.js";import"./chunk-eeq0krp7.js";import"./chunk-73xryfgn.js";import"./chunk-yjqww6ag.js";import"./chunk-z6kcnpsj.js";import"./chunk-ts2k13g0.js";import"./chunk-01e3v1xz.js";import"./chunk-dbpkq7ba.js";import"./chunk-z744mz4w.js";import"./chunk-vjn54xj5.js";import"./chunk-0qpqd7nz.js";import"./chunk-gdew7bwm.js";import"./chunk-v3nmnm57.js";import"./chunk-hwsqqkrv.js";import"./chunk-mbbxedsq.js";import"./chunk-aa2n02qk.js";import"./chunk-k1x8469r.js";import"./chunk-c3szabpf.js";import"./chunk-c8prg3jx.js";import{oA as I}from"./chunk-t8sy5sgx.js";import{EI as l,LC as d,_D as D}from"./chunk-tezrgfc6.js";import"./chunk-wjz42325.js";import"./chunk-kry4vcrf.js";import"./chunk-f2pv705d.js";var A=(o)=>l.promise(()=>E(o)),m=(o)=>l.sync(()=>s.println(o)),v=(o)=>s.Style.TEXT_DIM+o+s.Style.TEXT_NORMAL,L=(o)=>o?v(" (active)"):"",w=(o,e)=>`${o.email} ${v(o.url)}${L(e)}`,x=(o,e,t)=>`${e.name} (${o.email})${L(t)}`,C=(o,e,t)=>{let n=t?s.Style.TEXT_SUCCESS+"\u25CF"+s.Style.TEXT_NORMAL:" ",c=t?s.Style.TEXT_HIGHLIGHT_BOLD+e.name+s.Style.TEXT_NORMAL:e.name;return` ${n} ${c} ${v(o.email)} ${v(o.url)} ${v(e.id)}`},T=(o,e)=>d.isSome(o)&&o.value.id===e.accountID&&o.value.active_org_id===e.orgID,_=l.fn("login")(function*(o){let e=yield*p.Service;yield*P("Log in");let t=yield*e.login(o);yield*b.info("Go to: "+t.url),yield*b.info("Enter code: "+t.user),yield*A(t.url);let n=O();yield*n.start("Waiting for authorization...");let c=(r)=>l.gen(function*(){yield*l.sleep(r);let i=yield*e.poll(t);if(i._tag==="PollPending")return yield*c(r);if(i._tag==="PollSlow")return yield*c(D.sum(r,D.seconds(5)));return i}),a=yield*c(t.interval).pipe(l.timeout(t.expiry),l.catchTag("TimeoutError",()=>l.succeed(new S)));yield*I.valueTags(a,{PollSuccess:(r)=>l.gen(function*(){yield*n.stop("Logged in as "+r.email),yield*g("Done")}),PollExpired:()=>n.stop("Device code expired",1),PollDenied:()=>n.stop("Authorization denied",1),PollError:(r)=>n.stop("Error: "+String(r.cause),1),PollPending:()=>n.stop("Unexpected state",1),PollSlow:()=>n.stop("Unexpected state",1)})}),N=l.fn("logout")(function*(o){let e=yield*p.Service,t=yield*e.list();if(t.length===0)return yield*m("Not logged in");if(o){let i=t.find((y)=>y.email===o);if(!i)return yield*m("Account not found: "+o);yield*e.remove(i.id),yield*g("Logged out from "+o);return}let n=yield*e.active(),c=d.map(n,(i)=>i.id);yield*P("Log out");let a=t.map((i)=>{let y=d.isSome(c)&&c.value===i.id;return{value:i,label:w(i,y)}}),r=yield*h({message:"Select account to log out",options:a});if(d.isNone(r))return;yield*e.remove(r.value.id),yield*g("Logged out from "+r.value.email)}),$=l.fn("switch")(function*(){let o=yield*p.Service,e=yield*o.orgsByAccount();if(e.length===0)return yield*m("Not logged in");let t=yield*o.active(),n=e.flatMap((r)=>r.orgs.map((i)=>{let y=T(t,{accountID:r.account.id,orgID:i.id});return{value:{orgID:i.id,accountID:r.account.id,label:i.name},label:x(r.account,i,y)}}));if(n.length===0)return yield*m("No orgs found");yield*P("Switch org");let c=yield*h({message:"Select org",options:n});if(d.isNone(c))return;let a=c.value;yield*o.use(a.accountID,d.some(a.orgID)),yield*g("Switched to "+a.label)}),R=l.fn("orgs")(function*(){let o=yield*p.Service,e=yield*o.orgsByAccount();if(e.length===0)return yield*m("No accounts found");if(!e.some((n)=>n.orgs.length>0))return yield*m("No orgs found");let t=yield*o.active();for(let n of e)for(let c of n.orgs){let a=T(t,{accountID:n.account.id,orgID:c.id});yield*m(C(n.account,c,a))}}),M=l.fn("open")(function*(){let e=yield*(yield*p.Service).active();if(d.isNone(e))return yield*m("No active account");let t=e.value.url;yield*A(t),yield*g("Opened "+t)}),X=u({command:"login <url>",describe:!1,builder:(o)=>o.positional("url",{describe:"server URL",type:"string",demandOption:!0}),async handler(o){s.empty(),await f.runPromise(_(o.url))}}),B=u({command:"logout [email]",describe:!1,builder:(o)=>o.positional("email",{describe:"account email to log out from",type:"string"}),async handler(o){s.empty(),await f.runPromise(N(o.email))}}),U=u({command:"switch",describe:!1,async handler(){s.empty(),await f.runPromise($())}}),G=u({command:"orgs",describe:!1,async handler(){s.empty(),await f.runPromise(R())}}),H=u({command:"open",describe:!1,async handler(){s.empty(),await f.runPromise(M())}}),Y=u({command:"console",describe:!1,builder:(o)=>o.command({...X,describe:"log in to console"}).command({...B,describe:"log out from console"}).command({...U,describe:"switch active org"}).command({...G,describe:"list orgs"}).command({...H,describe:"open active console account"}).demandCommand(),async handler(){}});export{C as formatOrgLine,w as formatAccountLabel,U as SwitchCommand,G as OrgsCommand,H as OpenCommand,B as LogoutCommand,X as LoginCommand,Y as ConsoleCommand};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-f2pv705d.js";function n(){return(e)=>JSON.parse(JSON.stringify(e.Type()))}export{n as default};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{W as R9}from"./chunk-4pshnq6g.js";import{Pd as E9}from"./chunk-da6kggv7.js";import{Qd as P6,Td as p$,Ud as S9,Vd as U9,Yd as H9,Zd as q6}from"./chunk-ff548b0j.js";import"./chunk-zc0cdvcv.js";import{ae as T0}from"./chunk-5w76kdjr.js";import{dg as O}from"./chunk-eg3syjtv.js";import{$g as j9,Bh as E$,xh as I9}from"./chunk-hjt94wce.js";import"./chunk-w46g7kdq.js";import"./chunk-bd21p9zz.js";import"./chunk-p54bzjtv.js";import"./chunk-ha1w0xzh.js";import"./chunk-6m9jb0s9.js";import"./chunk-vygkwwjd.js";import{Nj as O6,Oj as M0,Tk as w9,Vk as D9,cl as b9,wj as T9}from"./chunk-k3dacdp5.js";import{pl as N9}from"./chunk-99s035f0.js";import{El as A0,Nl as T$}from"./chunk-h9wh48d0.js";import"./chunk-tzb26ntq.js";import"./chunk-mh19kwzw.js";import"./chunk-q3h42a94.js";import"./chunk-hqbbs9dm.js";import"./chunk-9zm6r55d.js";import"./chunk-vcygx6hs.js";import"./chunk-khzzmyk2.js";import"./chunk-y7hgevfv.js";import"./chunk-47k5jy1p.js";import"./chunk-cfhfc86j.js";import"./chunk-ph8hn1wt.js";import"./chunk-ptqk1j2r.js";import"./chunk-cqtkxwd8.js";import"./chunk-pr7z5dj8.js";import"./chunk-dnnkq5y4.js";import"./chunk-t239rvej.js";import"./chunk-yz25607t.js";import"./chunk-7hvf9dgx.js";import"./chunk-wkg3c643.js";import"./chunk-fhqfqd5v.js";import"./chunk-q3nvzhyh.js";import"./chunk-5df5aja0.js";import"./chunk-73r8bjjz.js";import"./chunk-xy0gnpen.js";import{Nr as C6}from"./chunk-ztyy3ga3.js";import"./chunk-mmjgf680.js";import"./chunk-nj1ntakd.js";import"./chunk-cmb62jkt.js";import"./chunk-tkrwcjkr.js";import"./chunk-vdrz2t9c.js";import{hs as F9,ks as R6,ls as M9,qs as A9}from"./chunk-fr34mnyg.js";import"./chunk-r5zy4za0.js";import"./chunk-tr6rdr6h.js";import{ft as L9}from"./chunk-at22twxx.js";import"./chunk-kgptyf7n.js";import"./chunk-j9h1sp4g.js";import"./chunk-p6crzjtf.js";import"./chunk-55fcmswd.js";import{eH as V9}from"./chunk-qnvsqnz5.js";import"./chunk-pxm4qvqk.js";import"./chunk-j8fcfhr2.js";import{sO as q0,tO as D,wO as E}from"./chunk-r9w0thdk.js";var JZ=D((zZ)=>{/*!
2
+ import{W as R9}from"./chunk-abv0fskc.js";import{Qd as E9}from"./chunk-yy7r3t3w.js";import{Rd as P6,Ud as p$,Vd as S9,Wd as U9,Zd as H9,_d as q6}from"./chunk-hhk2sp5n.js";import"./chunk-4zhrg3rv.js";import{be as T0}from"./chunk-f4mnp6xd.js";import{eg as O}from"./chunk-s06t769q.js";import{Ch as E$,ah as j9,yh as I9}from"./chunk-w43kmnm9.js";import"./chunk-nrk29616.js";import"./chunk-kre93a89.js";import"./chunk-060wbpz4.js";import"./chunk-zrhw1szj.js";import"./chunk-wd8hbven.js";import"./chunk-drnj1a14.js";import{Oj as O6,Pj as M0,Uk as w9,Wk as D9,dl as b9,xj as T9}from"./chunk-9a6p1gdn.js";import{ql as N9}from"./chunk-jxkrhrp0.js";import{Fl as A0,Ol as T$}from"./chunk-6k14c8x1.js";import"./chunk-5r05d901.js";import"./chunk-3rgct4bd.js";import"./chunk-5b3v1x2c.js";import"./chunk-gbxf6e5d.js";import"./chunk-msh249db.js";import"./chunk-95am490c.js";import"./chunk-kmzpeq8k.js";import"./chunk-0gsw04hw.js";import"./chunk-hqjc4wgg.js";import"./chunk-makecdh6.js";import"./chunk-dy2k5rdx.js";import"./chunk-n5p7cn4w.js";import"./chunk-cqtkxwd8.js";import"./chunk-mhxyv9c8.js";import"./chunk-0crgymtr.js";import"./chunk-cth373se.js";import"./chunk-xcxqt8ag.js";import"./chunk-va2qfh0x.js";import"./chunk-ae7b11np.js";import"./chunk-eeq0krp7.js";import"./chunk-73xryfgn.js";import"./chunk-yjqww6ag.js";import"./chunk-z6kcnpsj.js";import"./chunk-ts2k13g0.js";import{lt as C6}from"./chunk-01e3v1xz.js";import"./chunk-dbpkq7ba.js";import"./chunk-z744mz4w.js";import"./chunk-vjn54xj5.js";import"./chunk-0qpqd7nz.js";import"./chunk-gdew7bwm.js";import{Ht as F9,Kt as R6,Lt as M9,Qt as A9}from"./chunk-v3nmnm57.js";import"./chunk-hwsqqkrv.js";import"./chunk-mbbxedsq.js";import{Fu as L9}from"./chunk-aa2n02qk.js";import"./chunk-k1x8469r.js";import"./chunk-c3szabpf.js";import"./chunk-c8prg3jx.js";import"./chunk-t8sy5sgx.js";import{EI as V9}from"./chunk-tezrgfc6.js";import"./chunk-wjz42325.js";import"./chunk-kry4vcrf.js";import{SP as q0,TP as D,WP as E}from"./chunk-f2pv705d.js";var JZ=D((zZ)=>{/*!
3
3
  * content-type
4
4
  * Copyright(c) 2015 Douglas Christopher Wilson
5
5
  * MIT Licensed
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Jd as a}from"./chunk-eyr5ymt8.js";import"./chunk-rk0fnvp5.js";import"./chunk-f2pv705d.js";export{a as dict};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ee as a}from"./chunk-7sq5dyv1.js";import"./chunk-9xxnwb33.js";import"./chunk-qdvnscxm.js";import"./chunk-yxttz5z5.js";import"./chunk-f2pv705d.js";export{a as fromProcess};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ae as d,Be as e,Ce as f,De as g,xe as a,ye as b,ze as c}from"./chunk-tz3s8dvy.js";import"./chunk-9xxnwb33.js";import"./chunk-qdvnscxm.js";import"./chunk-yxttz5z5.js";import"./chunk-f2pv705d.js";export{g as fromEnv,c as ENV_SESSION,b as ENV_SECRET,a as ENV_KEY,d as ENV_EXPIRATION,e as ENV_CREDENTIAL_SCOPE,f as ENV_ACCOUNT_ID};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{$p as U,bq as V}from"./chunk-dnnkq5y4.js";import{tO as R}from"./chunk-r9w0thdk.js";var E=R((M,Q)=>{var{defineProperty:H,getOwnPropertyDescriptor:W,getOwnPropertyNames:X}=Object,Y=Object.prototype.hasOwnProperty,Z=(z,q)=>{for(var B in q)H(z,B,{get:q[B],enumerable:!0})},$=(z,q,B,F)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let v of X(q))if(!Y.call(z,v)&&v!==B)H(z,v,{get:()=>q[v],enumerable:!(F=W(q,v))||F.enumerable})}return z},A=(z)=>$(H({},"__esModule",{value:!0}),z),L={};Z(L,{refreshToken:()=>D});Q.exports=A(L);var K=U(),G=V();async function D(z){let q=z?.project,B=z?.team;if(!q&&!B){let v=(0,G.findProjectInfo)();q=v.projectId,B=v.teamId}else if(!q||!B){let v=(0,G.findProjectInfo)();q=q??v.projectId,B=B??v.teamId}if(!q)throw new K.VercelOidcTokenError("Failed to refresh OIDC token: No project specified. Try re-linking your project with `vc link`");let F=(0,G.loadToken)(q);if(!F||(0,G.isExpired)((0,G.getTokenPayload)(F.token),z?.expirationBufferMs)){let v=await(0,G.getVercelToken)({expirationBufferMs:z?.expirationBufferMs});if(F=await(0,G.getVercelOidcToken)(v,q,B),!F)throw new K.VercelOidcTokenError("Failed to refresh OIDC token");(0,G.saveToken)(F,q)}process.env.VERCEL_OIDC_TOKEN=F.token;return}});export default E();
2
+ import{Br as V,zr as U}from"./chunk-0crgymtr.js";import{TP as R}from"./chunk-f2pv705d.js";var E=R((M,Q)=>{var{defineProperty:H,getOwnPropertyDescriptor:W,getOwnPropertyNames:X}=Object,Y=Object.prototype.hasOwnProperty,Z=(z,q)=>{for(var B in q)H(z,B,{get:q[B],enumerable:!0})},$=(z,q,B,F)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let v of X(q))if(!Y.call(z,v)&&v!==B)H(z,v,{get:()=>q[v],enumerable:!(F=W(q,v))||F.enumerable})}return z},A=(z)=>$(H({},"__esModule",{value:!0}),z),L={};Z(L,{refreshToken:()=>D});Q.exports=A(L);var K=U(),G=V();async function D(z){let q=z?.project,B=z?.team;if(!q&&!B){let v=(0,G.findProjectInfo)();q=v.projectId,B=v.teamId}else if(!q||!B){let v=(0,G.findProjectInfo)();q=q??v.projectId,B=B??v.teamId}if(!q)throw new K.VercelOidcTokenError("Failed to refresh OIDC token: No project specified. Try re-linking your project with `vc link`");let F=(0,G.loadToken)(q);if(!F||(0,G.isExpired)((0,G.getTokenPayload)(F.token),z?.expirationBufferMs)){let v=await(0,G.getVercelToken)({expirationBufferMs:z?.expirationBufferMs});if(F=await(0,G.getVercelOidcToken)(v,q,B),!F)throw new K.VercelOidcTokenError("Failed to refresh OIDC token");(0,G.saveToken)(F,q)}process.env.VERCEL_OIDC_TOKEN=F.token;return}});export default E();
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import"./chunk-r9w0thdk.js";var e={"ui.sessionReview.title":"\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0441\u0435\u0441\u0441\u0438\u0438","ui.sessionReview.title.lastTurn":"\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0433\u043E \u0445\u043E\u0434\u0430","ui.sessionReview.diffStyle.unified":"\u041E\u0431\u044A\u0435\u0434\u0438\u043D\u0451\u043D\u043D\u044B\u0439","ui.sessionReview.diffStyle.split":"\u0420\u0430\u0437\u0434\u0435\u043B\u0451\u043D\u043D\u044B\u0439","ui.sessionReview.openFile":"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0444\u0430\u0439\u043B","ui.sessionReview.selection.line":"\u0441\u0442\u0440\u043E\u043A\u0430 {{line}}","ui.sessionReview.selection.lines":"\u0441\u0442\u0440\u043E\u043A\u0438 {{start}}-{{end}}","ui.sessionReview.expandAll":"\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0432\u0441\u0451","ui.sessionReview.collapseAll":"\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0432\u0441\u0451","ui.sessionReview.change.added":"\u0414\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u043E","ui.sessionReview.change.removed":"\u0423\u0434\u0430\u043B\u0435\u043D\u043E","ui.sessionReview.change.modified":"\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u043E","ui.sessionReview.image.loading":"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430...","ui.sessionReview.image.placeholder":"\u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435","ui.sessionReview.largeDiff.title":"Diff \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0439 \u0434\u043B\u044F \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F","ui.sessionReview.largeDiff.meta":"\u041B\u0438\u043C\u0438\u0442: {{limit}} \u0438\u0437\u043C\u0435\u043D\u0451\u043D\u043D\u044B\u0445 \u0441\u0442\u0440\u043E\u043A. \u0422\u0435\u043A\u0443\u0449\u0438\u0439: {{current}} \u0438\u0437\u043C\u0435\u043D\u0451\u043D\u043D\u044B\u0445 \u0441\u0442\u0440\u043E\u043A.","ui.sessionReview.largeDiff.renderAnyway":"\u041E\u0442\u043E\u0431\u0440\u0430\u0437\u0438\u0442\u044C \u0432\u0441\u0451 \u0440\u0430\u0432\u043D\u043E","ui.fileMedia.kind.image":"\u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435","ui.fileMedia.kind.audio":"\u0430\u0443\u0434\u0438\u043E","ui.fileMedia.state.removed":"{{kind}} \u0443\u0434\u0430\u043B\u0435\u043D\u043E","ui.fileMedia.state.loading":"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044F {{kind}}...","ui.fileMedia.state.error":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C {{kind}}","ui.fileMedia.state.unavailable":"{{kind}} \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E","ui.fileMedia.binary.title":"\u0411\u0438\u043D\u0430\u0440\u043D\u044B\u0439 \u0444\u0430\u0439\u043B","ui.fileMedia.binary.description.path":"\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u043E\u0442\u043E\u0431\u0440\u0430\u0437\u0438\u0442\u044C {{path}}, \u0442\u0430\u043A \u043A\u0430\u043A \u044D\u0442\u043E \u0431\u0438\u043D\u0430\u0440\u043D\u044B\u0439 \u0444\u0430\u0439\u043B.","ui.fileMedia.binary.description.default":"\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u043E\u0442\u043E\u0431\u0440\u0430\u0437\u0438\u0442\u044C \u044D\u0442\u043E\u0442 \u0444\u0430\u0439\u043B, \u0442\u0430\u043A \u043A\u0430\u043A \u043E\u043D \u0431\u0438\u043D\u0430\u0440\u043D\u044B\u0439.","ui.lineComment.label.prefix":"\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439 \u043A ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435: ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439","ui.lineComment.submit":"\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C","ui.sessionTurn.steps.show":"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0448\u0430\u0433\u0438","ui.sessionTurn.steps.hide":"\u0421\u043A\u0440\u044B\u0442\u044C \u0448\u0430\u0433\u0438","ui.sessionTurn.summary.response":"\u041E\u0442\u0432\u0435\u0442","ui.sessionTurn.diff.showMore":"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0435\u0449\u0451 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 ({{count}})","ui.sessionTurn.retry.retrying":"\u043F\u043E\u0432\u0442\u043E\u0440","ui.sessionTurn.retry.inSeconds":"\u0447\u0435\u0440\u0435\u0437 {{seconds}}\u0441","ui.sessionTurn.retry.attempt":"\u043F\u043E\u043F\u044B\u0442\u043A\u0430 \u2116{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - \u043F\u043E\u043F\u044B\u0442\u043A\u0430 \u2116{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini \u0441\u0435\u0439\u0447\u0430\u0441 \u043F\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043D","ui.sessionTurn.error.freeUsageExceeded":"\u041B\u0438\u043C\u0438\u0442 \u0431\u0435\u0441\u043F\u043B\u0430\u0442\u043D\u043E\u0433\u043E \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u043F\u0440\u0435\u0432\u044B\u0448\u0435\u043D","ui.sessionTurn.error.addQredits":"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u0440\u0435\u0434\u0438\u0442\u044B","ui.sessionTurn.status.delegating":"\u0414\u0435\u043B\u0435\u0433\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 \u0440\u0430\u0431\u043E\u0442\u044B","ui.sessionTurn.status.planning":"\u041F\u043B\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0445 \u0448\u0430\u0433\u043E\u0432","ui.sessionTurn.status.gatheringContext":"\u0418\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u0438\u0435","ui.sessionTurn.status.gatheredContext":"\u0418\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u043E","ui.sessionTurn.status.searchingCodebase":"\u041F\u043E\u0438\u0441\u043A \u0432 \u043A\u043E\u0434\u043E\u0432\u043E\u0439 \u0431\u0430\u0437\u0435","ui.sessionTurn.status.searchingWeb":"\u041F\u043E\u0438\u0441\u043A \u0432 \u0438\u043D\u0442\u0435\u0440\u043D\u0435\u0442\u0435","ui.sessionTurn.status.makingEdits":"\u0412\u043D\u0435\u0441\u0435\u043D\u0438\u0435 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439","ui.sessionTurn.status.runningCommands":"\u0412\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u043A\u043E\u043C\u0430\u043D\u0434","ui.sessionTurn.status.thinking":"\u0420\u0430\u0437\u043C\u044B\u0448\u043B\u0435\u043D\u0438\u0435","ui.sessionTurn.status.thinkingWithTopic":"\u0420\u0430\u0437\u043C\u044B\u0448\u043B\u0435\u043D\u0438\u0435 - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"\u0421\u0431\u043E\u0440 \u043C\u044B\u0441\u043B\u0435\u0439","ui.sessionTurn.status.consideringNextSteps":"\u0420\u0430\u0441\u0441\u043C\u043E\u0442\u0440\u0435\u043D\u0438\u0435 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0445 \u0448\u0430\u0433\u043E\u0432","ui.messagePart.questions.dismissed":"\u0412\u043E\u043F\u0440\u043E\u0441\u044B \u043E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u044B","ui.messagePart.compaction":"\u0421\u0435\u0441\u0441\u0438\u044F \u0441\u0436\u0430\u0442\u0430","ui.messagePart.context.read.one":"{{count}} \u0447\u0442\u0435\u043D\u0438\u0435","ui.messagePart.context.read.other":"{{count}} \u0447\u0442\u0435\u043D\u0438\u0439","ui.messagePart.context.search.one":"{{count}} \u043F\u043E\u0438\u0441\u043A","ui.messagePart.context.search.other":"{{count}} \u043F\u043E\u0438\u0441\u043A\u043E\u0432","ui.messagePart.context.list.one":"{{count}} \u0441\u043F\u0438\u0441\u043E\u043A","ui.messagePart.context.list.other":"{{count}} \u0441\u043F\u0438\u0441\u043A\u043E\u0432","ui.messagePart.diagnostic.error":"\u041E\u0448\u0438\u0431\u043A\u0430","ui.messagePart.title.edit":"\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C","ui.messagePart.title.write":"\u041D\u0430\u043F\u0438\u0441\u0430\u0442\u044C","ui.messagePart.option.typeOwnAnswer":"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u0432\u043E\u0439 \u043E\u0442\u0432\u0435\u0442","ui.messagePart.review.title":"\u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0432\u0430\u0448\u0438 \u043E\u0442\u0432\u0435\u0442\u044B","ui.list.loading":"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430","ui.list.empty":"\u041D\u0435\u0442 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432","ui.list.clearFilter":"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0444\u0438\u043B\u044C\u0442\u0440","ui.list.emptyWithFilter.prefix":"\u041D\u0435\u0442 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432 \u0434\u043B\u044F","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"\u041D\u043E\u0432\u043E\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435","ui.textField.copyToClipboard":"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432 \u0431\u0443\u0444\u0435\u0440 \u043E\u0431\u043C\u0435\u043D\u0430","ui.textField.copyLink":"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0441\u044B\u043B\u043A\u0443","ui.textField.copied":"\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E","ui.imagePreview.alt":"\u041F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F","ui.scrollView.ariaLabel":"\u043F\u0440\u043E\u043A\u0440\u0443\u0447\u0438\u0432\u0430\u0435\u043C\u044B\u0439 \u043A\u043E\u043D\u0442\u0435\u043D\u0442","ui.tool.read":"\u0427\u0442\u0435\u043D\u0438\u0435","ui.tool.loaded":"\u0417\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043E","ui.tool.list":"\u0421\u043F\u0438\u0441\u043E\u043A","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Webfetch","ui.tool.websearch":"\u0412\u0435\u0431-\u043F\u043E\u0438\u0441\u043A","ui.tool.codesearch":"\u041F\u043E\u0438\u0441\u043A \u043A\u043E\u0434\u0430","ui.tool.shell":"\u041E\u0431\u043E\u043B\u043E\u0447\u043A\u0430","ui.tool.patch":"\u041F\u0430\u0442\u0447","ui.tool.todos":"\u0417\u0430\u0434\u0430\u0447\u0438","ui.tool.todos.read":"\u0427\u0438\u0442\u0430\u0442\u044C \u0437\u0430\u0434\u0430\u0447\u0438","ui.tool.questions":"\u0412\u043E\u043F\u0440\u043E\u0441\u044B","ui.tool.agent":"\u0410\u0433\u0435\u043D\u0442 {{type}}","ui.tool.agent.default":"\u0410\u0433\u0435\u043D\u0442","ui.common.file.one":"\u0444\u0430\u0439\u043B","ui.common.file.other":"\u0444\u0430\u0439\u043B\u043E\u0432","ui.common.question.one":"\u0432\u043E\u043F\u0440\u043E\u0441","ui.common.question.other":"\u0432\u043E\u043F\u0440\u043E\u0441\u043E\u0432","ui.common.add":"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C","ui.common.back":"\u041D\u0430\u0437\u0430\u0434","ui.common.cancel":"\u041E\u0442\u043C\u0435\u043D\u0430","ui.common.confirm":"\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C","ui.common.dismiss":"\u0417\u0430\u043A\u0440\u044B\u0442\u044C","ui.common.close":"\u0417\u0430\u043A\u0440\u044B\u0442\u044C","ui.common.next":"\u0414\u0430\u043B\u0435\u0435","ui.common.submit":"\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C","ui.permission.deny":"\u0417\u0430\u043F\u0440\u0435\u0442\u0438\u0442\u044C","ui.permission.allowAlways":"\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044C \u0432\u0441\u0435\u0433\u0434\u0430","ui.permission.allowOnce":"\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044C \u043E\u0434\u0438\u043D \u0440\u0430\u0437","ui.message.expand":"\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435","ui.message.collapse":"\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435","ui.message.copy":"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C","ui.message.copyMessage":"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435","ui.message.forkMessage":"\u041E\u0442\u0432\u0435\u0442\u0432\u0438\u0442\u044C \u0432 \u043D\u043E\u0432\u0443\u044E \u0441\u0435\u0441\u0441\u0438\u044E","ui.message.revertMessage":"\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u0434\u043E \u044D\u0442\u043E\u0433\u043E \u043C\u043E\u043C\u0435\u043D\u0442\u0430","ui.message.copyResponse":"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043E\u0442\u0432\u0435\u0442","ui.message.copied":"\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E!","ui.message.interrupted":"\u041F\u0440\u0435\u0440\u0432\u0430\u043D\u043E","ui.message.queued":"\u0412 \u043E\u0447\u0435\u0440\u0435\u0434\u0438","ui.message.attachment.alt":"\u0432\u043B\u043E\u0436\u0435\u043D\u0438\u0435","ui.patch.action.deleted":"\u0423\u0434\u0430\u043B\u0435\u043D\u043E","ui.patch.action.created":"\u0421\u043E\u0437\u0434\u0430\u043D\u043E","ui.patch.action.moved":"\u041F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u043E","ui.patch.action.patched":"\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u043E","ui.question.subtitle.answered":"{{count}} \u043E\u0442\u0432\u0435\u0447\u0435\u043D\u043E","ui.question.answer.none":"(\u043D\u0435\u0442 \u043E\u0442\u0432\u0435\u0442\u0430)","ui.question.review.notAnswered":"(\u043D\u0435 \u043E\u0442\u0432\u0435\u0447\u0435\u043D\u043E)","ui.question.multiHint":"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u0441\u0435 \u043F\u043E\u0434\u0445\u043E\u0434\u044F\u0449\u0438\u0435","ui.question.singleHint":"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043E\u0434\u0438\u043D \u043E\u0442\u0432\u0435\u0442","ui.question.custom.placeholder":"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0432\u0430\u0448 \u043E\u0442\u0432\u0435\u0442...","ui.fileSearch.placeholder":"\u041D\u0430\u0439\u0442\u0438","ui.fileSearch.previousMatch":"\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u0435","ui.fileSearch.nextMatch":"\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0435","ui.fileSearch.close":"\u0417\u0430\u043A\u0440\u044B\u0442\u044C \u043F\u043E\u0438\u0441\u043A","ui.tool.task":"\u0417\u0430\u0434\u0430\u0447\u0430","ui.tool.skill":"\u041D\u0430\u0432\u044B\u043A","ui.basicTool.called":"\u0412\u044B\u0437\u0432\u0430\u043D `{{tool}}`","ui.toolErrorCard.failed":"\u041E\u0448\u0438\u0431\u043A\u0430","ui.toolErrorCard.copyError":"\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043E\u0448\u0438\u0431\u043A\u0443","ui.message.duration.seconds":"{{count}}\u0441","ui.message.duration.minutesSeconds":"{{minutes}}\u043C {{seconds}}\u0441"};export{e as dict};
2
+ import"./chunk-f2pv705d.js";var e={"ui.sessionReview.title":"\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0441\u0435\u0441\u0441\u0438\u0438","ui.sessionReview.title.lastTurn":"\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0433\u043E \u0445\u043E\u0434\u0430","ui.sessionReview.diffStyle.unified":"\u041E\u0431\u044A\u0435\u0434\u0438\u043D\u0451\u043D\u043D\u044B\u0439","ui.sessionReview.diffStyle.split":"\u0420\u0430\u0437\u0434\u0435\u043B\u0451\u043D\u043D\u044B\u0439","ui.sessionReview.openFile":"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0444\u0430\u0439\u043B","ui.sessionReview.selection.line":"\u0441\u0442\u0440\u043E\u043A\u0430 {{line}}","ui.sessionReview.selection.lines":"\u0441\u0442\u0440\u043E\u043A\u0438 {{start}}-{{end}}","ui.sessionReview.expandAll":"\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0432\u0441\u0451","ui.sessionReview.collapseAll":"\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0432\u0441\u0451","ui.sessionReview.change.added":"\u0414\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u043E","ui.sessionReview.change.removed":"\u0423\u0434\u0430\u043B\u0435\u043D\u043E","ui.sessionReview.change.modified":"\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u043E","ui.sessionReview.image.loading":"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430...","ui.sessionReview.image.placeholder":"\u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435","ui.sessionReview.largeDiff.title":"Diff \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0439 \u0434\u043B\u044F \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F","ui.sessionReview.largeDiff.meta":"\u041B\u0438\u043C\u0438\u0442: {{limit}} \u0438\u0437\u043C\u0435\u043D\u0451\u043D\u043D\u044B\u0445 \u0441\u0442\u0440\u043E\u043A. \u0422\u0435\u043A\u0443\u0449\u0438\u0439: {{current}} \u0438\u0437\u043C\u0435\u043D\u0451\u043D\u043D\u044B\u0445 \u0441\u0442\u0440\u043E\u043A.","ui.sessionReview.largeDiff.renderAnyway":"\u041E\u0442\u043E\u0431\u0440\u0430\u0437\u0438\u0442\u044C \u0432\u0441\u0451 \u0440\u0430\u0432\u043D\u043E","ui.fileMedia.kind.image":"\u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435","ui.fileMedia.kind.audio":"\u0430\u0443\u0434\u0438\u043E","ui.fileMedia.state.removed":"{{kind}} \u0443\u0434\u0430\u043B\u0435\u043D\u043E","ui.fileMedia.state.loading":"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044F {{kind}}...","ui.fileMedia.state.error":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C {{kind}}","ui.fileMedia.state.unavailable":"{{kind}} \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E","ui.fileMedia.binary.title":"\u0411\u0438\u043D\u0430\u0440\u043D\u044B\u0439 \u0444\u0430\u0439\u043B","ui.fileMedia.binary.description.path":"\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u043E\u0442\u043E\u0431\u0440\u0430\u0437\u0438\u0442\u044C {{path}}, \u0442\u0430\u043A \u043A\u0430\u043A \u044D\u0442\u043E \u0431\u0438\u043D\u0430\u0440\u043D\u044B\u0439 \u0444\u0430\u0439\u043B.","ui.fileMedia.binary.description.default":"\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u043E\u0442\u043E\u0431\u0440\u0430\u0437\u0438\u0442\u044C \u044D\u0442\u043E\u0442 \u0444\u0430\u0439\u043B, \u0442\u0430\u043A \u043A\u0430\u043A \u043E\u043D \u0431\u0438\u043D\u0430\u0440\u043D\u044B\u0439.","ui.lineComment.label.prefix":"\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439 \u043A ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435: ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439","ui.lineComment.submit":"\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C","ui.sessionTurn.steps.show":"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0448\u0430\u0433\u0438","ui.sessionTurn.steps.hide":"\u0421\u043A\u0440\u044B\u0442\u044C \u0448\u0430\u0433\u0438","ui.sessionTurn.summary.response":"\u041E\u0442\u0432\u0435\u0442","ui.sessionTurn.diff.showMore":"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0435\u0449\u0451 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 ({{count}})","ui.sessionTurn.retry.retrying":"\u043F\u043E\u0432\u0442\u043E\u0440","ui.sessionTurn.retry.inSeconds":"\u0447\u0435\u0440\u0435\u0437 {{seconds}}\u0441","ui.sessionTurn.retry.attempt":"\u043F\u043E\u043F\u044B\u0442\u043A\u0430 \u2116{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - \u043F\u043E\u043F\u044B\u0442\u043A\u0430 \u2116{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini \u0441\u0435\u0439\u0447\u0430\u0441 \u043F\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043D","ui.sessionTurn.error.freeUsageExceeded":"\u041B\u0438\u043C\u0438\u0442 \u0431\u0435\u0441\u043F\u043B\u0430\u0442\u043D\u043E\u0433\u043E \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u043F\u0440\u0435\u0432\u044B\u0448\u0435\u043D","ui.sessionTurn.error.addQredits":"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u0440\u0435\u0434\u0438\u0442\u044B","ui.sessionTurn.status.delegating":"\u0414\u0435\u043B\u0435\u0433\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 \u0440\u0430\u0431\u043E\u0442\u044B","ui.sessionTurn.status.planning":"\u041F\u043B\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0445 \u0448\u0430\u0433\u043E\u0432","ui.sessionTurn.status.gatheringContext":"\u0418\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u0438\u0435","ui.sessionTurn.status.gatheredContext":"\u0418\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u043E","ui.sessionTurn.status.searchingCodebase":"\u041F\u043E\u0438\u0441\u043A \u0432 \u043A\u043E\u0434\u043E\u0432\u043E\u0439 \u0431\u0430\u0437\u0435","ui.sessionTurn.status.searchingWeb":"\u041F\u043E\u0438\u0441\u043A \u0432 \u0438\u043D\u0442\u0435\u0440\u043D\u0435\u0442\u0435","ui.sessionTurn.status.makingEdits":"\u0412\u043D\u0435\u0441\u0435\u043D\u0438\u0435 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439","ui.sessionTurn.status.runningCommands":"\u0412\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u043A\u043E\u043C\u0430\u043D\u0434","ui.sessionTurn.status.thinking":"\u0420\u0430\u0437\u043C\u044B\u0448\u043B\u0435\u043D\u0438\u0435","ui.sessionTurn.status.thinkingWithTopic":"\u0420\u0430\u0437\u043C\u044B\u0448\u043B\u0435\u043D\u0438\u0435 - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"\u0421\u0431\u043E\u0440 \u043C\u044B\u0441\u043B\u0435\u0439","ui.sessionTurn.status.consideringNextSteps":"\u0420\u0430\u0441\u0441\u043C\u043E\u0442\u0440\u0435\u043D\u0438\u0435 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0445 \u0448\u0430\u0433\u043E\u0432","ui.messagePart.questions.dismissed":"\u0412\u043E\u043F\u0440\u043E\u0441\u044B \u043E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u044B","ui.messagePart.compaction":"\u0421\u0435\u0441\u0441\u0438\u044F \u0441\u0436\u0430\u0442\u0430","ui.messagePart.context.read.one":"{{count}} \u0447\u0442\u0435\u043D\u0438\u0435","ui.messagePart.context.read.other":"{{count}} \u0447\u0442\u0435\u043D\u0438\u0439","ui.messagePart.context.search.one":"{{count}} \u043F\u043E\u0438\u0441\u043A","ui.messagePart.context.search.other":"{{count}} \u043F\u043E\u0438\u0441\u043A\u043E\u0432","ui.messagePart.context.list.one":"{{count}} \u0441\u043F\u0438\u0441\u043E\u043A","ui.messagePart.context.list.other":"{{count}} \u0441\u043F\u0438\u0441\u043A\u043E\u0432","ui.messagePart.diagnostic.error":"\u041E\u0448\u0438\u0431\u043A\u0430","ui.messagePart.title.edit":"\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C","ui.messagePart.title.write":"\u041D\u0430\u043F\u0438\u0441\u0430\u0442\u044C","ui.messagePart.option.typeOwnAnswer":"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u0432\u043E\u0439 \u043E\u0442\u0432\u0435\u0442","ui.messagePart.review.title":"\u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0432\u0430\u0448\u0438 \u043E\u0442\u0432\u0435\u0442\u044B","ui.list.loading":"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430","ui.list.empty":"\u041D\u0435\u0442 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432","ui.list.clearFilter":"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0444\u0438\u043B\u044C\u0442\u0440","ui.list.emptyWithFilter.prefix":"\u041D\u0435\u0442 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432 \u0434\u043B\u044F","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"\u041D\u043E\u0432\u043E\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435","ui.textField.copyToClipboard":"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432 \u0431\u0443\u0444\u0435\u0440 \u043E\u0431\u043C\u0435\u043D\u0430","ui.textField.copyLink":"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0441\u044B\u043B\u043A\u0443","ui.textField.copied":"\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E","ui.imagePreview.alt":"\u041F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F","ui.scrollView.ariaLabel":"\u043F\u0440\u043E\u043A\u0440\u0443\u0447\u0438\u0432\u0430\u0435\u043C\u044B\u0439 \u043A\u043E\u043D\u0442\u0435\u043D\u0442","ui.tool.read":"\u0427\u0442\u0435\u043D\u0438\u0435","ui.tool.loaded":"\u0417\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043E","ui.tool.list":"\u0421\u043F\u0438\u0441\u043E\u043A","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Webfetch","ui.tool.websearch":"\u0412\u0435\u0431-\u043F\u043E\u0438\u0441\u043A","ui.tool.codesearch":"\u041F\u043E\u0438\u0441\u043A \u043A\u043E\u0434\u0430","ui.tool.shell":"\u041E\u0431\u043E\u043B\u043E\u0447\u043A\u0430","ui.tool.patch":"\u041F\u0430\u0442\u0447","ui.tool.todos":"\u0417\u0430\u0434\u0430\u0447\u0438","ui.tool.todos.read":"\u0427\u0438\u0442\u0430\u0442\u044C \u0437\u0430\u0434\u0430\u0447\u0438","ui.tool.questions":"\u0412\u043E\u043F\u0440\u043E\u0441\u044B","ui.tool.agent":"\u0410\u0433\u0435\u043D\u0442 {{type}}","ui.tool.agent.default":"\u0410\u0433\u0435\u043D\u0442","ui.common.file.one":"\u0444\u0430\u0439\u043B","ui.common.file.other":"\u0444\u0430\u0439\u043B\u043E\u0432","ui.common.question.one":"\u0432\u043E\u043F\u0440\u043E\u0441","ui.common.question.other":"\u0432\u043E\u043F\u0440\u043E\u0441\u043E\u0432","ui.common.add":"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C","ui.common.back":"\u041D\u0430\u0437\u0430\u0434","ui.common.cancel":"\u041E\u0442\u043C\u0435\u043D\u0430","ui.common.confirm":"\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C","ui.common.dismiss":"\u0417\u0430\u043A\u0440\u044B\u0442\u044C","ui.common.close":"\u0417\u0430\u043A\u0440\u044B\u0442\u044C","ui.common.next":"\u0414\u0430\u043B\u0435\u0435","ui.common.submit":"\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C","ui.permission.deny":"\u0417\u0430\u043F\u0440\u0435\u0442\u0438\u0442\u044C","ui.permission.allowAlways":"\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044C \u0432\u0441\u0435\u0433\u0434\u0430","ui.permission.allowOnce":"\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044C \u043E\u0434\u0438\u043D \u0440\u0430\u0437","ui.message.expand":"\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435","ui.message.collapse":"\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435","ui.message.copy":"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C","ui.message.copyMessage":"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435","ui.message.forkMessage":"\u041E\u0442\u0432\u0435\u0442\u0432\u0438\u0442\u044C \u0432 \u043D\u043E\u0432\u0443\u044E \u0441\u0435\u0441\u0441\u0438\u044E","ui.message.revertMessage":"\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u0434\u043E \u044D\u0442\u043E\u0433\u043E \u043C\u043E\u043C\u0435\u043D\u0442\u0430","ui.message.copyResponse":"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043E\u0442\u0432\u0435\u0442","ui.message.copied":"\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E!","ui.message.interrupted":"\u041F\u0440\u0435\u0440\u0432\u0430\u043D\u043E","ui.message.queued":"\u0412 \u043E\u0447\u0435\u0440\u0435\u0434\u0438","ui.message.attachment.alt":"\u0432\u043B\u043E\u0436\u0435\u043D\u0438\u0435","ui.patch.action.deleted":"\u0423\u0434\u0430\u043B\u0435\u043D\u043E","ui.patch.action.created":"\u0421\u043E\u0437\u0434\u0430\u043D\u043E","ui.patch.action.moved":"\u041F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u043E","ui.patch.action.patched":"\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u043E","ui.question.subtitle.answered":"{{count}} \u043E\u0442\u0432\u0435\u0447\u0435\u043D\u043E","ui.question.answer.none":"(\u043D\u0435\u0442 \u043E\u0442\u0432\u0435\u0442\u0430)","ui.question.review.notAnswered":"(\u043D\u0435 \u043E\u0442\u0432\u0435\u0447\u0435\u043D\u043E)","ui.question.multiHint":"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u0441\u0435 \u043F\u043E\u0434\u0445\u043E\u0434\u044F\u0449\u0438\u0435","ui.question.singleHint":"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043E\u0434\u0438\u043D \u043E\u0442\u0432\u0435\u0442","ui.question.custom.placeholder":"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0432\u0430\u0448 \u043E\u0442\u0432\u0435\u0442...","ui.fileSearch.placeholder":"\u041D\u0430\u0439\u0442\u0438","ui.fileSearch.previousMatch":"\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u0435","ui.fileSearch.nextMatch":"\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0435","ui.fileSearch.close":"\u0417\u0430\u043A\u0440\u044B\u0442\u044C \u043F\u043E\u0438\u0441\u043A","ui.tool.task":"\u0417\u0430\u0434\u0430\u0447\u0430","ui.tool.skill":"\u041D\u0430\u0432\u044B\u043A","ui.basicTool.called":"\u0412\u044B\u0437\u0432\u0430\u043D `{{tool}}`","ui.toolErrorCard.failed":"\u041E\u0448\u0438\u0431\u043A\u0430","ui.toolErrorCard.copyError":"\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043E\u0448\u0438\u0431\u043A\u0443","ui.message.duration.seconds":"{{count}}\u0441","ui.message.duration.minutesSeconds":"{{minutes}}\u043C {{seconds}}\u0441"};export{e as dict};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{pp as a,qp as b,rp as c,sp as d,tp as e,up as f,vp as g,wp as h,xp as i}from"./chunk-hqjc4wgg.js";import"./chunk-dy2k5rdx.js";import"./chunk-n5p7cn4w.js";import"./chunk-cqtkxwd8.js";import"./chunk-mhxyv9c8.js";import"./chunk-0crgymtr.js";import"./chunk-k1x8469r.js";import"./chunk-c3szabpf.js";import"./chunk-c8prg3jx.js";import"./chunk-f2pv705d.js";export{i as gateway,h as createGatewayProvider,h as createGateway,g as GatewayResponseError,d as GatewayRateLimitError,e as GatewayModelNotFoundError,c as GatewayInvalidRequestError,f as GatewayInternalServerError,a as GatewayError,b as GatewayAuthenticationError};