@qitqode/qitqode-android-arm64 0.2.15 → 0.2.16

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 (412) hide show
  1. package/bundle/{chunk-wrzn87w0.js → chunk-098mr0zz.js} +1 -1
  2. package/bundle/{chunk-j15wejz0.js → chunk-0catm9vq.js} +1 -1
  3. package/bundle/{chunk-q896qkhe.js → chunk-0cqs1qkh.js} +1 -1
  4. package/bundle/{chunk-d10qre1b.js → chunk-0f3ncvfe.js} +1 -1
  5. package/bundle/{chunk-yhpwceqg.js → chunk-0gqwvt8w.js} +2 -2
  6. package/bundle/chunk-0mb55ytc.js +2 -0
  7. package/bundle/{chunk-dpbm03yh.js → chunk-0n2ncnwz.js} +1 -1
  8. package/bundle/chunk-0y0hm0m5.js +2 -0
  9. package/bundle/chunk-120e8yr1.js +2 -0
  10. package/bundle/{chunk-spcdwmy4.js → chunk-1aneepm5.js} +1 -1
  11. package/bundle/chunk-1dxm8yev.js +2 -0
  12. package/bundle/{chunk-96sra8g8.js → chunk-1jg7cybp.js} +1 -1
  13. package/bundle/{chunk-qk6jh32z.js → chunk-1k5nfw7g.js} +1 -1
  14. package/bundle/{chunk-fmcg649e.js → chunk-1kksj8cn.js} +1 -1
  15. package/bundle/chunk-1pgpv979.js +2 -0
  16. package/bundle/{chunk-szfqmkj6.js → chunk-1xsjkf4c.js} +1 -1
  17. package/bundle/{chunk-zx63mepv.js → chunk-1yetxft4.js} +1 -1
  18. package/bundle/chunk-23zh9s18.js +2 -0
  19. package/bundle/{chunk-8qpfphdz.js → chunk-24pf9s68.js} +1 -1
  20. package/bundle/chunk-2a0zf12g.js +2 -0
  21. package/bundle/chunk-2b8x31p3.js +2 -0
  22. package/bundle/chunk-2cvmdss3.js +2 -0
  23. package/bundle/{chunk-zhhcfqhh.js → chunk-2kvghwar.js} +1 -1
  24. package/bundle/{chunk-ch7s512a.js → chunk-2nkjwqpm.js} +1 -1
  25. package/bundle/chunk-2qbsg6dp.js +2 -0
  26. package/bundle/{chunk-9ttebtcf.js → chunk-2rvs18fx.js} +1 -1
  27. package/bundle/{chunk-rxt6gktt.js → chunk-2thbax1j.js} +1 -1
  28. package/bundle/{chunk-zbt53cb5.js → chunk-2zxygnx4.js} +1 -1
  29. package/bundle/{chunk-zgwasq3p.js → chunk-36kg3v3k.js} +1 -1
  30. package/bundle/{chunk-b6m5tr80.js → chunk-37hh7eee.js} +1 -1
  31. package/bundle/chunk-39mwv068.js +2 -0
  32. package/bundle/{chunk-set1f1wr.js → chunk-39z0qxkt.js} +1 -1
  33. package/bundle/{chunk-p0852vfn.js → chunk-3dfy9k0t.js} +2 -2
  34. package/bundle/{chunk-et3tgx7t.js → chunk-3e26pryk.js} +1 -1
  35. package/bundle/{chunk-w0t1ajhg.js → chunk-3eddms0g.js} +1 -1
  36. package/bundle/chunk-3re79hkf.js +2 -0
  37. package/bundle/{chunk-sy76e7nr.js → chunk-3vjs8aht.js} +1 -1
  38. package/bundle/{chunk-k769v1ds.js → chunk-3z7r4c0p.js} +1 -1
  39. package/bundle/chunk-40pe0tde.js +11 -0
  40. package/bundle/{chunk-0ejx0yqx.js → chunk-47nber5v.js} +1 -1
  41. package/bundle/{chunk-estc7tzt.js → chunk-491f4ab9.js} +2 -2
  42. package/bundle/{chunk-3152y1q9.js → chunk-4bp91rza.js} +1 -1
  43. package/bundle/{chunk-pdcxmr6x.js → chunk-4dy64hgp.js} +1 -1
  44. package/bundle/{chunk-0mztgsxp.js → chunk-4fqwg54p.js} +1 -1
  45. package/bundle/{chunk-2w3n0q9m.js → chunk-4gv7nsdd.js} +2 -2
  46. package/bundle/{chunk-csy1v12x.js → chunk-4nw19yab.js} +1 -1
  47. package/bundle/chunk-51fyaa6r.js +2 -0
  48. package/bundle/{chunk-kegvr7wt.js → chunk-52f62kr0.js} +2 -2
  49. package/bundle/chunk-52n4tdeh.js +5 -0
  50. package/bundle/{chunk-x4jnyj09.js → chunk-543jma8r.js} +1 -1
  51. package/bundle/chunk-58q03ah1.js +2 -0
  52. package/bundle/{chunk-hrcqbadm.js → chunk-5fhy0wb0.js} +1 -1
  53. package/bundle/{chunk-8zpsgfb6.js → chunk-5fym1zr2.js} +1 -1
  54. package/bundle/{chunk-a3g8de96.js → chunk-5k5jdayv.js} +1 -1
  55. package/bundle/chunk-5nmqgqj2.js +2 -0
  56. package/bundle/{chunk-psmwrvqs.js → chunk-5t69v8jg.js} +2 -2
  57. package/bundle/{chunk-7w571q26.js → chunk-5vtbg7pj.js} +1 -1
  58. package/bundle/{chunk-y4cz5s3h.js → chunk-5xmtzs15.js} +2 -2
  59. package/bundle/chunk-5ydg5ny1.js +2 -0
  60. package/bundle/{chunk-v5me0cj9.js → chunk-5z5rk3ng.js} +1 -1
  61. package/bundle/{chunk-5dvy83ms.js → chunk-62mb6wxm.js} +2 -2
  62. package/bundle/chunk-62mytrwv.js +2 -0
  63. package/bundle/{chunk-edvfqxfr.js → chunk-6396bg4p.js} +1 -1
  64. package/bundle/chunk-63bccmze.js +2 -0
  65. package/bundle/{chunk-1ypzf18e.js → chunk-64x1vtdq.js} +1 -1
  66. package/bundle/{chunk-9mabvb06.js → chunk-6kx4atkt.js} +1 -1
  67. package/bundle/{chunk-dmb0ez0m.js → chunk-6r7vm4xc.js} +3 -3
  68. package/bundle/{chunk-tcyzj3rz.js → chunk-6rggm6tm.js} +1 -1
  69. package/bundle/{chunk-fp2xgnjn.js → chunk-6vpc1y3w.js} +2 -2
  70. package/bundle/{chunk-71jmhvef.js → chunk-6vxddv5w.js} +2 -2
  71. package/bundle/chunk-6ynaebaw.js +2 -0
  72. package/bundle/{chunk-ep4drmt9.js → chunk-700jhn67.js} +1 -1
  73. package/bundle/{chunk-fdmz0502.js → chunk-76jbys6j.js} +2 -2
  74. package/bundle/chunk-782y3dm8.js +2 -0
  75. package/bundle/{chunk-d7h1dp0h.js → chunk-89g9wzc2.js} +1 -1
  76. package/bundle/chunk-8q50bha4.js +2 -0
  77. package/bundle/chunk-8v6qbhm1.js +2 -0
  78. package/bundle/chunk-955jtenj.js +2 -0
  79. package/bundle/chunk-95yzwxpf.js +2 -0
  80. package/bundle/{chunk-76wm7tw8.js → chunk-96281xfb.js} +2 -2
  81. package/bundle/{chunk-bdcd2mcb.js → chunk-96657nrr.js} +2 -2
  82. package/bundle/chunk-99ansgsj.js +2 -0
  83. package/bundle/{chunk-3c73rngn.js → chunk-9dd2krfn.js} +1 -1
  84. package/bundle/chunk-9exxjnxc.js +2 -0
  85. package/bundle/{chunk-eqsank84.js → chunk-9ge1mkfs.js} +1 -1
  86. package/bundle/{chunk-4r7fbkcm.js → chunk-9mmaja9n.js} +1 -1
  87. package/bundle/{chunk-mjkwd1sz.js → chunk-9rd7q5e9.js} +1 -1
  88. package/bundle/{chunk-6cztstry.js → chunk-9skj2w9e.js} +2 -2
  89. package/bundle/{chunk-nb4xtk1n.js → chunk-9tdbts1r.js} +1 -1
  90. package/bundle/{chunk-sg9enzsp.js → chunk-9tfm1dk2.js} +2 -2
  91. package/bundle/{chunk-z6qyx227.js → chunk-9xaea8h1.js} +1 -1
  92. package/bundle/{chunk-meehnnv9.js → chunk-a0c6w901.js} +2 -2
  93. package/bundle/chunk-a2tp2f6s.js +2 -0
  94. package/bundle/{chunk-69htq8kq.js → chunk-a3ynq3h7.js} +1 -1
  95. package/bundle/chunk-a4y0wjtq.js +3 -0
  96. package/bundle/{chunk-6dd2dx69.js → chunk-afagt413.js} +2 -2
  97. package/bundle/{chunk-px69995t.js → chunk-afzx47y2.js} +1 -1
  98. package/bundle/chunk-ag3s3t7x.js +2 -0
  99. package/bundle/{chunk-n7zd97hy.js → chunk-ajdn1n77.js} +2 -2
  100. package/bundle/chunk-arwm1qxm.js +2 -0
  101. package/bundle/{chunk-adws0hhk.js → chunk-awt3q88j.js} +2 -2
  102. package/bundle/{chunk-qn1fhqyw.js → chunk-az2pxgx6.js} +2 -2
  103. package/bundle/chunk-b0gq0s8a.js +2 -0
  104. package/bundle/{chunk-48rg4yhk.js → chunk-b2zfr7jz.js} +2 -2
  105. package/bundle/{chunk-mbmaeq0a.js → chunk-b63733cw.js} +1 -1
  106. package/bundle/chunk-b7430vg8.js +2 -0
  107. package/bundle/{chunk-4b56k59w.js → chunk-b7dw5ged.js} +1 -1
  108. package/bundle/{chunk-prz2fkn9.js → chunk-b83qf145.js} +1 -1
  109. package/bundle/{chunk-veptx3fk.js → chunk-b8w33ck9.js} +1 -1
  110. package/bundle/{chunk-674pexjx.js → chunk-bd21p9zz.js} +2 -2
  111. package/bundle/chunk-be2z0tr4.js +2 -0
  112. package/bundle/{chunk-x0de4z05.js → chunk-bkqemdv8.js} +2 -2
  113. package/bundle/chunk-bq585t67.js +2 -0
  114. package/bundle/chunk-bts3gw8w.js +2 -0
  115. package/bundle/{chunk-yvtkx4x4.js → chunk-c0sr83np.js} +1 -1
  116. package/bundle/{chunk-zh7e6kqs.js → chunk-c4tdfar1.js} +1 -1
  117. package/bundle/chunk-c6ege2yp.js +2 -0
  118. package/bundle/{chunk-00ft63qn.js → chunk-chs4bkgh.js} +1 -1
  119. package/bundle/{chunk-hmmn62jg.js → chunk-cm426ssg.js} +1 -1
  120. package/bundle/{chunk-crqycrs4.js → chunk-d4y5hyjg.js} +2 -2
  121. package/bundle/chunk-de0edzjs.js +2 -0
  122. package/bundle/{chunk-4xcwnwd6.js → chunk-der5kj1b.js} +1 -1
  123. package/bundle/{chunk-rk4c0zat.js → chunk-dhykktcp.js} +1 -1
  124. package/bundle/{chunk-mnjz8nqs.js → chunk-dm7hfb7f.js} +2 -2
  125. package/bundle/chunk-dntnvfdz.js +2 -0
  126. package/bundle/{chunk-q1dmxn63.js → chunk-dptvy1zn.js} +2 -2
  127. package/bundle/{chunk-2k2szpze.js → chunk-dqt8rrey.js} +1 -1
  128. package/bundle/{chunk-ky3fhz9z.js → chunk-dr003xka.js} +1 -1
  129. package/bundle/chunk-dtyzk0j7.js +2 -0
  130. package/bundle/{chunk-qrztx1b4.js → chunk-dwza14dk.js} +2 -2
  131. package/bundle/chunk-e3tmbywr.js +2 -0
  132. package/bundle/{chunk-ej0yzstw.js → chunk-e4nap6v9.js} +2 -2
  133. package/bundle/{chunk-5h1s0akp.js → chunk-e7x8v549.js} +1 -1
  134. package/bundle/{chunk-1e75j4m1.js → chunk-e826jvr2.js} +2 -2
  135. package/bundle/{chunk-djdfpezf.js → chunk-edm4c812.js} +1 -1
  136. package/bundle/{chunk-ws720v4j.js → chunk-eearwfay.js} +1 -1
  137. package/bundle/{chunk-knqpyc7s.js → chunk-ekavngf7.js} +1 -1
  138. package/bundle/chunk-em637k9q.js +2 -0
  139. package/bundle/{chunk-8gkz5550.js → chunk-epncmz5t.js} +1 -1
  140. package/bundle/{chunk-mdxtt9wv.js → chunk-eytpz91c.js} +2 -2
  141. package/bundle/chunk-f4qcwbx0.js +2 -0
  142. package/bundle/{chunk-a8askx4y.js → chunk-f6gd8809.js} +1 -1
  143. package/bundle/{chunk-878sb0es.js → chunk-fcbmedh3.js} +2 -2
  144. package/bundle/{chunk-4ycg2c6f.js → chunk-fg5f3a8a.js} +2 -2
  145. package/bundle/chunk-fj7jcv7m.js +2 -0
  146. package/bundle/{chunk-4gzggzc0.js → chunk-ft4msj4z.js} +3 -3
  147. package/bundle/chunk-fyntc5hj.js +2 -0
  148. package/bundle/chunk-fyt4yaq7.js +2 -0
  149. package/bundle/chunk-g4hcxhfs.js +2 -0
  150. package/bundle/{chunk-c5cyt23k.js → chunk-g7twcprm.js} +2 -2
  151. package/bundle/{chunk-9amnqaeq.js → chunk-g8844pb4.js} +1 -1
  152. package/bundle/{chunk-w136zswr.js → chunk-ganwjd6s.js} +3 -3
  153. package/bundle/chunk-gdew108b.js +2 -0
  154. package/bundle/chunk-gdy74wte.js +2 -0
  155. package/bundle/{chunk-e37gd3p2.js → chunk-gse0cgqc.js} +1 -1
  156. package/bundle/{chunk-z0dj15g9.js → chunk-gsjgbm0d.js} +1 -1
  157. package/bundle/{chunk-a1mbach4.js → chunk-gt10s0ks.js} +1 -1
  158. package/bundle/{chunk-qpk7jp6t.js → chunk-gxpx2nd8.js} +1 -1
  159. package/bundle/{chunk-8mqcar7f.js → chunk-gxq2fwnc.js} +1 -1
  160. package/bundle/chunk-gz90qgcn.js +2 -0
  161. package/bundle/chunk-gzz78dnm.js +2 -0
  162. package/bundle/{chunk-840mmmzz.js → chunk-h3yazfmh.js} +4 -4
  163. package/bundle/{chunk-d4faz5xa.js → chunk-h429rzqp.js} +1 -1
  164. package/bundle/{chunk-f0dp1tf9.js → chunk-h5y0pwwc.js} +1 -1
  165. package/bundle/{chunk-62gefpwn.js → chunk-h6b6acrv.js} +2 -2
  166. package/bundle/{chunk-19rs84t8.js → chunk-h8bq75er.js} +1 -1
  167. package/bundle/{chunk-99df6wvm.js → chunk-ha147mdc.js} +1 -1
  168. package/bundle/{chunk-xdcwx384.js → chunk-ha1w0xzh.js} +1 -1
  169. package/bundle/{chunk-5341jv20.js → chunk-ha294vpj.js} +1 -1
  170. package/bundle/chunk-hfrjkgyk.js +2 -0
  171. package/bundle/chunk-hjpt1n6g.js +2 -0
  172. package/bundle/{chunk-bzh71a92.js → chunk-hvdre0mb.js} +1 -1
  173. package/bundle/{chunk-86sfzgnf.js → chunk-hxf2a10r.js} +1 -1
  174. package/bundle/{chunk-4ppw719f.js → chunk-j09qf4zh.js} +1 -1
  175. package/bundle/chunk-j0jayfyn.js +35 -0
  176. package/bundle/{chunk-c1wc4b5q.js → chunk-j5b0yc0f.js} +1 -1
  177. package/bundle/{chunk-k8dbc1p5.js → chunk-j767byd1.js} +1 -1
  178. package/bundle/chunk-j794z99k.js +2 -0
  179. package/bundle/{chunk-5asf8f41.js → chunk-j95mkzwg.js} +114 -114
  180. package/bundle/{chunk-rn3je2hv.js → chunk-jcznttek.js} +1 -1
  181. package/bundle/{chunk-4v29ayke.js → chunk-jgw20mxx.js} +1 -1
  182. package/bundle/{chunk-175720ws.js → chunk-jhdpwndc.js} +2 -2
  183. package/bundle/{chunk-f0x3q5dj.js → chunk-jkqa49xc.js} +2 -2
  184. package/bundle/{chunk-sb3cgb4v.js → chunk-jmg64erz.js} +1 -1
  185. package/bundle/chunk-jpw7z507.js +2 -0
  186. package/bundle/{chunk-3cs1qf8x.js → chunk-jr622341.js} +1 -1
  187. package/bundle/{chunk-fswt9qc0.js → chunk-jv69hdp0.js} +2 -2
  188. package/bundle/chunk-jx9c90ft.js +2 -0
  189. package/bundle/{chunk-4jfnhghx.js → chunk-kevhkmn2.js} +2 -2
  190. package/bundle/{chunk-bxnsrggq.js → chunk-khpjjjsb.js} +1 -1
  191. package/bundle/chunk-kkfrys0w.js +2 -0
  192. package/bundle/chunk-kkq2vwm6.js +2 -0
  193. package/bundle/{chunk-h6b5966p.js → chunk-km1tyeyy.js} +1 -1
  194. package/bundle/chunk-kp0w1p79.js +2 -0
  195. package/bundle/chunk-kr7t73tg.js +3 -0
  196. package/bundle/chunk-kt7q9620.js +2 -0
  197. package/bundle/{chunk-8a9sj8gp.js → chunk-kzcb1pt4.js} +1 -1
  198. package/bundle/{chunk-ywj77e0m.js → chunk-m0f6cf9n.js} +2 -2
  199. package/bundle/chunk-m30bgt2t.js +2 -0
  200. package/bundle/chunk-m318f9es.js +2 -0
  201. package/bundle/{chunk-4yd2vvh6.js → chunk-m5r6zq6v.js} +1 -1
  202. package/bundle/chunk-m6g6za7b.js +2 -0
  203. package/bundle/chunk-m8djypsy.js +11 -0
  204. package/bundle/chunk-ma0vvbvy.js +2 -0
  205. package/bundle/chunk-mha4n5md.js +2 -0
  206. package/bundle/{chunk-s9epttpy.js → chunk-mhq2a5ms.js} +1 -1
  207. package/bundle/chunk-mp9qhnxg.js +2 -0
  208. package/bundle/{chunk-gd0j16gn.js → chunk-mqdvthkm.js} +1 -1
  209. package/bundle/{chunk-69k7cdtv.js → chunk-mqe1qa6t.js} +2 -2
  210. package/bundle/{chunk-j45p2v4a.js → chunk-mz6swd88.js} +3 -3
  211. package/bundle/{chunk-0m4gvjcv.js → chunk-n25t4j9w.js} +2 -2
  212. package/bundle/{chunk-83n11xym.js → chunk-n7ewvphw.js} +3 -3
  213. package/bundle/chunk-n9wre9wx.js +2 -0
  214. package/bundle/chunk-ncbj74tk.js +3 -0
  215. package/bundle/{chunk-06tgmvh6.js → chunk-ne3z7yye.js} +2 -2
  216. package/bundle/chunk-nnyvn2pm.js +2 -0
  217. package/bundle/chunk-nyhx3822.js +2 -0
  218. package/bundle/{chunk-zjyaze0d.js → chunk-p54bzjtv.js} +1 -1
  219. package/bundle/{chunk-dvp0r93q.js → chunk-p5d5qyzq.js} +1 -1
  220. package/bundle/{chunk-m8kjtp60.js → chunk-p6mxxem5.js} +1 -1
  221. package/bundle/{chunk-6zdzbmzs.js → chunk-p76c9s6g.js} +264 -264
  222. package/bundle/chunk-p8etcskm.js +2 -0
  223. package/bundle/{chunk-b350g18y.js → chunk-pf4gwr34.js} +2 -2
  224. package/bundle/{chunk-wf0n1cs9.js → chunk-pf61zhms.js} +1 -1
  225. package/bundle/{chunk-sh03ka27.js → chunk-pfx8ts02.js} +1 -1
  226. package/bundle/{chunk-e611m0p4.js → chunk-phvp9h7w.js} +1 -1
  227. package/bundle/chunk-pv71d7f3.js +2 -0
  228. package/bundle/{chunk-2fged9vy.js → chunk-pwcmc8j7.js} +1 -1
  229. package/bundle/{chunk-g77kddrs.js → chunk-pyt4xpze.js} +2 -2
  230. package/bundle/{chunk-1bq15kf0.js → chunk-q0pd8bac.js} +2 -2
  231. package/bundle/{chunk-yg9n2a2d.js → chunk-q12dtxep.js} +1 -1
  232. package/bundle/{chunk-v1axkp21.js → chunk-q2j2dm96.js} +2 -2
  233. package/bundle/{chunk-rx9eh3db.js → chunk-qf1hh45g.js} +3 -3
  234. package/bundle/{chunk-p4xqfkbh.js → chunk-qqjspfqw.js} +1 -1
  235. package/bundle/{chunk-9kc2th5c.js → chunk-qvnsgyfk.js} +2 -2
  236. package/bundle/{chunk-rqap90xh.js → chunk-qz35c4xy.js} +2 -2
  237. package/bundle/{chunk-bemyyen3.js → chunk-r3z77rjn.js} +1 -1
  238. package/bundle/{chunk-vsv4p060.js → chunk-r7mcn9ey.js} +1 -1
  239. package/bundle/{chunk-nzz7gzg2.js → chunk-rmpgmjtd.js} +1 -1
  240. package/bundle/{chunk-k0chq88p.js → chunk-rpt3rm31.js} +1 -1
  241. package/bundle/chunk-rteaec1s.js +2 -0
  242. package/bundle/chunk-rxwcah73.js +2 -0
  243. package/bundle/{chunk-s0gmxpxm.js → chunk-s1gy4hnw.js} +2 -2
  244. package/bundle/{chunk-4s1n38ds.js → chunk-s2ma1nz3.js} +2 -2
  245. package/bundle/chunk-s3gjc4m0.js +2 -0
  246. package/bundle/{chunk-6yshpz0z.js → chunk-s5taq9jy.js} +2 -2
  247. package/bundle/{chunk-5mf4qrye.js → chunk-s7017cak.js} +2 -2
  248. package/bundle/{chunk-6pt6nqwk.js → chunk-s9bn800b.js} +1 -1
  249. package/bundle/{chunk-73a7ts8r.js → chunk-sa3rjs2s.js} +1 -1
  250. package/bundle/{chunk-wfpnv00c.js → chunk-sprbs7aj.js} +2 -2
  251. package/bundle/{chunk-10q04xh5.js → chunk-sq2z7keb.js} +1 -1
  252. package/bundle/{chunk-w8nj5ph5.js → chunk-sqrx9csx.js} +1 -1
  253. package/bundle/{chunk-art8gejd.js → chunk-srf4jqcj.js} +1 -1
  254. package/bundle/{chunk-ffyj5nsg.js → chunk-ssp3nw24.js} +2 -2
  255. package/bundle/{chunk-2tkgtasa.js → chunk-svnhycdw.js} +2 -2
  256. package/bundle/chunk-swm990q6.js +2 -0
  257. package/bundle/chunk-sy42ayp2.js +2 -0
  258. package/bundle/{chunk-5rvvfgfy.js → chunk-t3kxce69.js} +2 -2
  259. package/bundle/chunk-t7mvej98.js +2 -0
  260. package/bundle/{chunk-6j53vtzd.js → chunk-t8pmy758.js} +1 -1
  261. package/bundle/{chunk-v7v0krrj.js → chunk-t9srpmte.js} +1 -1
  262. package/bundle/{chunk-2pw56zpj.js → chunk-tatecas7.js} +2 -2
  263. package/bundle/chunk-teagh4hx.js +2 -0
  264. package/bundle/{chunk-avksqxan.js → chunk-tf40p520.js} +1 -1
  265. package/bundle/{chunk-yms3bsm7.js → chunk-tpgksx59.js} +1 -1
  266. package/bundle/{chunk-02tmc2st.js → chunk-tr4cze2c.js} +1 -1
  267. package/bundle/chunk-tv4cp6f9.js +2 -0
  268. package/bundle/chunk-tw618904.js +2 -0
  269. package/bundle/{chunk-mq3w4z8k.js → chunk-v1bqh3m6.js} +176 -176
  270. package/bundle/{chunk-j46bxb1b.js → chunk-v3bfzxxg.js} +1 -1
  271. package/bundle/{chunk-vr13f6b5.js → chunk-v5gf0wx6.js} +2 -2
  272. package/bundle/{chunk-d385e2qt.js → chunk-v6mnbwtz.js} +1 -1
  273. package/bundle/{chunk-bq6cvf16.js → chunk-v93gr6n9.js} +2 -2
  274. package/bundle/chunk-vdpffam0.js +2 -0
  275. package/bundle/chunk-ve5w7nkb.js +2 -0
  276. package/bundle/chunk-vey57h4x.js +30 -0
  277. package/bundle/{chunk-pwq2f75j.js → chunk-vf492zs6.js} +1 -1
  278. package/bundle/{chunk-fkq0v5qv.js → chunk-vg9ec44m.js} +2 -2
  279. package/bundle/{chunk-61b81z2h.js → chunk-vh3n53qq.js} +1 -1
  280. package/bundle/{chunk-bmdqb48f.js → chunk-vk8gxf4y.js} +1 -1
  281. package/bundle/{chunk-rd08wx37.js → chunk-vr222v2n.js} +2 -2
  282. package/bundle/chunk-vrpca62q.js +2 -0
  283. package/bundle/{chunk-x3dzzq0t.js → chunk-w5fx69cw.js} +1 -1
  284. package/bundle/{chunk-k4wfq9cn.js → chunk-w9w59zjv.js} +2 -2
  285. package/bundle/{chunk-xmf59618.js → chunk-wbz79hns.js} +1 -1
  286. package/bundle/{chunk-gfvq78gy.js → chunk-wdrfzx4m.js} +1 -1
  287. package/bundle/{chunk-j3agzs13.js → chunk-wf18y499.js} +2 -2
  288. package/bundle/chunk-wvvygzz2.js +2 -0
  289. package/bundle/{chunk-wne3v1fk.js → chunk-wyxc99aa.js} +2 -2
  290. package/bundle/{chunk-5q98z8ck.js → chunk-x2mbre12.js} +2 -2
  291. package/bundle/{chunk-2d61z24r.js → chunk-x8rr2f15.js} +1 -1
  292. package/bundle/{chunk-vgmgg994.js → chunk-xpmgqa5n.js} +1 -1
  293. package/bundle/{chunk-rws2tsdv.js → chunk-xrwsttb7.js} +1 -1
  294. package/bundle/{chunk-ytfq6rn9.js → chunk-xz6psr05.js} +1 -1
  295. package/bundle/{chunk-4xqwt6dr.js → chunk-xzshjp04.js} +2 -2
  296. package/bundle/chunk-y27gwnx9.js +2 -0
  297. package/bundle/chunk-y2ms7q84.js +2 -0
  298. package/bundle/{chunk-1pft3sar.js → chunk-y8bjb32m.js} +1 -1
  299. package/bundle/{chunk-h036zy9e.js → chunk-ya7wrt5f.js} +2 -2
  300. package/bundle/{chunk-ahgb3r1c.js → chunk-ycjz7y1x.js} +2 -2
  301. package/bundle/{chunk-10kj86va.js → chunk-ykqx1z0b.js} +1 -1
  302. package/bundle/chunk-yq4vck53.js +2 -0
  303. package/bundle/{chunk-j2snkw45.js → chunk-yxsc90ba.js} +2 -2
  304. package/bundle/{chunk-5cwy8y78.js → chunk-yy5qqab3.js} +2 -2
  305. package/bundle/{chunk-86reb44c.js → chunk-z38am71w.js} +1 -1
  306. package/bundle/{chunk-pwrwb7mn.js → chunk-z6mqdbj1.js} +1 -1
  307. package/bundle/{chunk-nyxn7npc.js → chunk-z87ew6d3.js} +1 -1
  308. package/bundle/{chunk-m6967jtv.js → chunk-z9k4506p.js} +2 -2
  309. package/bundle/{chunk-hf39qx6t.js → chunk-zezz8xfw.js} +2 -2
  310. package/bundle/{chunk-ffx0cr44.js → chunk-zg72kz2k.js} +2 -2
  311. package/bundle/chunk-zkxc41ek.js +2 -0
  312. package/bundle/{chunk-tz1bzrnh.js → chunk-zssy3srh.js} +1 -1
  313. package/bundle/{chunk-xxck1man.js → chunk-zyz4na64.js} +1 -1
  314. package/bundle/{chunk-e18hshcg.js → chunk-zzsetq5f.js} +1 -1
  315. package/bundle/index.js +3 -3
  316. package/bundle/parser.worker.js +2 -2
  317. package/bundle/worker.js +1 -1
  318. package/package.json +1 -1
  319. package/bundle/chunk-1r7anzk5.js +0 -2
  320. package/bundle/chunk-2jzay8a9.js +0 -2
  321. package/bundle/chunk-30rghawe.js +0 -2
  322. package/bundle/chunk-31a47ptm.js +0 -10
  323. package/bundle/chunk-33mzqyyb.js +0 -3
  324. package/bundle/chunk-3dajnr1w.js +0 -2
  325. package/bundle/chunk-3ege6krg.js +0 -2
  326. package/bundle/chunk-43vpxggb.js +0 -2
  327. package/bundle/chunk-49y7zg15.js +0 -2
  328. package/bundle/chunk-5qhsfjzq.js +0 -3
  329. package/bundle/chunk-5re7995e.js +0 -2
  330. package/bundle/chunk-5xxn06g0.js +0 -2
  331. package/bundle/chunk-6k0y2332.js +0 -2
  332. package/bundle/chunk-6qwnty59.js +0 -8
  333. package/bundle/chunk-7cp30q0t.js +0 -2
  334. package/bundle/chunk-7t63wz2f.js +0 -2
  335. package/bundle/chunk-8gz8fk6r.js +0 -2
  336. package/bundle/chunk-8ht7cq3h.js +0 -2
  337. package/bundle/chunk-8qv0119d.js +0 -2
  338. package/bundle/chunk-9m0eawt5.js +0 -2
  339. package/bundle/chunk-a32y70fe.js +0 -2
  340. package/bundle/chunk-ae1b15bd.js +0 -31
  341. package/bundle/chunk-apneazwv.js +0 -2
  342. package/bundle/chunk-aw5yv01t.js +0 -2
  343. package/bundle/chunk-az12tp53.js +0 -2
  344. package/bundle/chunk-b5dpzcc7.js +0 -2
  345. package/bundle/chunk-baq0wk3q.js +0 -2
  346. package/bundle/chunk-bcgtqx3g.js +0 -2
  347. package/bundle/chunk-bde5d507.js +0 -2
  348. package/bundle/chunk-bzzggc3s.js +0 -2
  349. package/bundle/chunk-c8qx439t.js +0 -2
  350. package/bundle/chunk-ckw51fn6.js +0 -2
  351. package/bundle/chunk-denp0wrq.js +0 -2
  352. package/bundle/chunk-depxzjer.js +0 -2
  353. package/bundle/chunk-dhvqpcf3.js +0 -2
  354. package/bundle/chunk-dkqqswbv.js +0 -2
  355. package/bundle/chunk-e5t7jsxa.js +0 -2
  356. package/bundle/chunk-eb811dt2.js +0 -2
  357. package/bundle/chunk-fbz2xv2w.js +0 -2
  358. package/bundle/chunk-ffynh19k.js +0 -2
  359. package/bundle/chunk-fgr9xshx.js +0 -2
  360. package/bundle/chunk-gbvcb4k1.js +0 -2
  361. package/bundle/chunk-gdtnqzbp.js +0 -2
  362. package/bundle/chunk-gkfvhh28.js +0 -2
  363. package/bundle/chunk-gvx5hmhk.js +0 -2
  364. package/bundle/chunk-gww6abk3.js +0 -2
  365. package/bundle/chunk-hham7r33.js +0 -2
  366. package/bundle/chunk-hmm0gj34.js +0 -3
  367. package/bundle/chunk-hsjbe5zy.js +0 -2
  368. package/bundle/chunk-j89sv999.js +0 -2
  369. package/bundle/chunk-k9b4005p.js +0 -2
  370. package/bundle/chunk-kht2kwam.js +0 -2
  371. package/bundle/chunk-kzkb4648.js +0 -2
  372. package/bundle/chunk-m2540waa.js +0 -2
  373. package/bundle/chunk-mreacz8r.js +0 -2
  374. package/bundle/chunk-mscvm1rm.js +0 -2
  375. package/bundle/chunk-mw3hh526.js +0 -2
  376. package/bundle/chunk-n3nsrk5n.js +0 -2
  377. package/bundle/chunk-n4qbnecw.js +0 -35
  378. package/bundle/chunk-n9nmc4q4.js +0 -2
  379. package/bundle/chunk-nj4as8vy.js +0 -2
  380. package/bundle/chunk-nxm6gpyv.js +0 -2
  381. package/bundle/chunk-pqzx9ha6.js +0 -2
  382. package/bundle/chunk-qbjqkezn.js +0 -2
  383. package/bundle/chunk-qhtp1xvx.js +0 -2
  384. package/bundle/chunk-qkztgpay.js +0 -2
  385. package/bundle/chunk-rnf3dy0y.js +0 -2
  386. package/bundle/chunk-rry4kq85.js +0 -2
  387. package/bundle/chunk-rt49c6js.js +0 -5
  388. package/bundle/chunk-ryfj80q6.js +0 -2
  389. package/bundle/chunk-snx49w8h.js +0 -2
  390. package/bundle/chunk-t21mdqbb.js +0 -2
  391. package/bundle/chunk-tkbjcznz.js +0 -2
  392. package/bundle/chunk-tn2yyqeb.js +0 -2
  393. package/bundle/chunk-ttebf3nt.js +0 -2
  394. package/bundle/chunk-twpfh0mx.js +0 -2
  395. package/bundle/chunk-tzf6d5qy.js +0 -2
  396. package/bundle/chunk-v2mq09wx.js +0 -2
  397. package/bundle/chunk-v59a02aj.js +0 -2
  398. package/bundle/chunk-vxr4rzt0.js +0 -2
  399. package/bundle/chunk-w0h9rczg.js +0 -2
  400. package/bundle/chunk-w8344et5.js +0 -2
  401. package/bundle/chunk-weyg78et.js +0 -2
  402. package/bundle/chunk-wyavgt96.js +0 -2
  403. package/bundle/chunk-xchj8gna.js +0 -2
  404. package/bundle/chunk-yvjecrjy.js +0 -2
  405. package/bundle/chunk-yw2x6by6.js +0 -2
  406. package/bundle/chunk-z0r4syk8.js +0 -2
  407. package/bundle/chunk-z7c00g63.js +0 -2
  408. package/bundle/chunk-z93n3cbm.js +0 -2
  409. package/bundle/chunk-znr0saas.js +0 -2
  410. package/bundle/chunk-zqqt7v17.js +0 -2
  411. package/bundle/chunk-zwrgh1hc.js +0 -2
  412. package/bundle/chunk-zwxp07yc.js +0 -2
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{Sd as W$}from"./chunk-k4wfq9cn.js";import{Ud as j$}from"./chunk-4jfnhghx.js";import{fe as A$}from"./chunk-w8nj5ph5.js";import{Xf as J$}from"./chunk-estc7tzt.js";import{jg as Z$}from"./chunk-y4cz5s3h.js";import"./chunk-yhpwceqg.js";import"./chunk-878sb0es.js";import"./chunk-f0x3q5dj.js";import"./chunk-5qhsfjzq.js";import"./chunk-nfg7nt13.js";import"./chunk-4s1n38ds.js";import"./chunk-76wm7tw8.js";import{Ah as MD,ph as hD}from"./chunk-6zdzbmzs.js";import"./chunk-qn1fhqyw.js";import"./chunk-674pexjx.js";import"./chunk-zjyaze0d.js";import"./chunk-xdcwx384.js";import"./chunk-rd08wx37.js";import"./chunk-fp2xgnjn.js";import{Rk as _$,Sk as U,Tj as sD,Uk as G$,Zj as k,_j as P}from"./chunk-5asf8f41.js";import"./chunk-2pw56zpj.js";import"./chunk-rt49c6js.js";import"./chunk-4gzggzc0.js";import"./chunk-31a47ptm.js";import"./chunk-ywj77e0m.js";import"./chunk-83n11xym.js";import"./chunk-h036zy9e.js";import"./chunk-j3agzs13.js";import"./chunk-3152y1q9.js";import"./chunk-71jmhvef.js";import"./chunk-qrztx1b4.js";import"./chunk-ae1b15bd.js";import{Yo as X$,cp as Y$}from"./chunk-6qwnty59.js";import"./chunk-crqycrs4.js";import"./chunk-1bq15kf0.js";import{Sq as f$}from"./chunk-pdcxmr6x.js";import"./chunk-cqtkxwd8.js";import"./chunk-a1mbach4.js";import"./chunk-m6967jtv.js";import"./chunk-j2snkw45.js";import"./chunk-bmdqb48f.js";import"./chunk-3cs1qf8x.js";import"./chunk-4xqwt6dr.js";import"./chunk-g77kddrs.js";import"./chunk-kegvr7wt.js";import"./chunk-2tkgtasa.js";import"./chunk-6cztstry.js";import"./chunk-4yd2vvh6.js";import"./chunk-fkq0v5qv.js";import"./chunk-1e75j4m1.js";import"./chunk-2w3n0q9m.js";import"./chunk-6dd2dx69.js";import"./chunk-fdmz0502.js";import"./chunk-5re7995e.js";import{ft as Q$}from"./chunk-mnjz8nqs.js";import"./chunk-6yshpz0z.js";import{Yt as H}from"./chunk-5dvy83ms.js";import{hu as kD,iu as w$}from"./chunk-ffx0cr44.js";import"./chunk-33mzqyyb.js";import{Lu as D}from"./chunk-sg9enzsp.js";import"./chunk-5q98z8ck.js";import"./chunk-wfpnv00c.js";import"./chunk-9kc2th5c.js";import"./chunk-hf39qx6t.js";import"./chunk-x0de4z05.js";import{wP as ow}from"./chunk-sh03ka27.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{Td as W$}from"./chunk-w9w59zjv.js";import{Vd as j$}from"./chunk-kevhkmn2.js";import{ge as A$}from"./chunk-sqrx9csx.js";import{Yf as J$}from"./chunk-491f4ab9.js";import{kg as Z$}from"./chunk-5xmtzs15.js";import"./chunk-0gqwvt8w.js";import"./chunk-fcbmedh3.js";import"./chunk-jkqa49xc.js";import"./chunk-a4y0wjtq.js";import"./chunk-nfg7nt13.js";import"./chunk-s2ma1nz3.js";import"./chunk-96281xfb.js";import{Bh as MD,qh as hD}from"./chunk-p76c9s6g.js";import"./chunk-az2pxgx6.js";import"./chunk-bd21p9zz.js";import"./chunk-p54bzjtv.js";import"./chunk-ha1w0xzh.js";import"./chunk-vr222v2n.js";import"./chunk-6vpc1y3w.js";import{$j as P,Sk as _$,Tk as U,Uj as sD,Vk as G$,_j as k}from"./chunk-j95mkzwg.js";import"./chunk-tatecas7.js";import"./chunk-52n4tdeh.js";import"./chunk-ft4msj4z.js";import"./chunk-m8djypsy.js";import"./chunk-m0f6cf9n.js";import"./chunk-n7ewvphw.js";import"./chunk-ya7wrt5f.js";import"./chunk-wf18y499.js";import"./chunk-4bp91rza.js";import"./chunk-6vxddv5w.js";import"./chunk-dwza14dk.js";import"./chunk-vey57h4x.js";import{Aq as X$,Gq as Y$}from"./chunk-40pe0tde.js";import"./chunk-d4y5hyjg.js";import"./chunk-q0pd8bac.js";import{ws as f$}from"./chunk-4dy64hgp.js";import"./chunk-cqtkxwd8.js";import"./chunk-gt10s0ks.js";import"./chunk-z9k4506p.js";import"./chunk-yxsc90ba.js";import"./chunk-vk8gxf4y.js";import"./chunk-jr622341.js";import"./chunk-xzshjp04.js";import"./chunk-pyt4xpze.js";import"./chunk-52f62kr0.js";import"./chunk-svnhycdw.js";import"./chunk-9skj2w9e.js";import"./chunk-m5r6zq6v.js";import"./chunk-vg9ec44m.js";import"./chunk-e826jvr2.js";import"./chunk-4gv7nsdd.js";import"./chunk-afagt413.js";import"./chunk-76jbys6j.js";import"./chunk-9exxjnxc.js";import{Lu as Q$}from"./chunk-dm7hfb7f.js";import"./chunk-s5taq9jy.js";import{Cv as H}from"./chunk-62mb6wxm.js";import{Nv as kD,Ov as w$}from"./chunk-zg72kz2k.js";import"./chunk-kr7t73tg.js";import{pw as D}from"./chunk-9tfm1dk2.js";import"./chunk-x2mbre12.js";import"./chunk-sprbs7aj.js";import"./chunk-qvnsgyfk.js";import"./chunk-zezz8xfw.js";import"./chunk-bkqemdv8.js";import{aR as ow}from"./chunk-pfx8ts02.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,2 +1,2 @@
1
1
  // @bun
2
- import{tP as q}from"./chunk-x0de4z05.js";import{vP as k}from"./chunk-sh03ka27.js";var z=k((b)=>{Object.defineProperty(b,"__esModule",{value:!0});b.getMachineId=void 0;var v=q();async function w(){v.diag.debug("could not read machine-id: unsupported platform");return}b.getMachineId=w});export default z();
2
+ import{ZQ as q}from"./chunk-bkqemdv8.js";import{$Q as k}from"./chunk-pfx8ts02.js";var z=k((b)=>{Object.defineProperty(b,"__esModule",{value:!0});b.getMachineId=void 0;var v=q();async function w(){v.diag.debug("could not read machine-id: unsupported platform");return}b.getMachineId=w});export default z();
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Cg as i,Dg as j,Eg as k,Fg as l,Gg as m,Hg as n}from"./chunk-jkqa49xc.js";import"./chunk-az2pxgx6.js";import{Iq as a,Jq as b,Kq as c,Lq as d,Mq as e,Nq as f,Rq as g,Sq as h}from"./chunk-40pe0tde.js";import"./chunk-yxsc90ba.js";import"./chunk-vk8gxf4y.js";import"./chunk-m5r6zq6v.js";import"./chunk-vg9ec44m.js";import"./chunk-e826jvr2.js";import"./chunk-9exxjnxc.js";import"./chunk-dm7hfb7f.js";import"./chunk-s5taq9jy.js";import"./chunk-62mb6wxm.js";import"./chunk-zg72kz2k.js";import"./chunk-kr7t73tg.js";import"./chunk-9tfm1dk2.js";import"./chunk-x2mbre12.js";import"./chunk-sprbs7aj.js";import"./chunk-qvnsgyfk.js";import"./chunk-pfx8ts02.js";export{f as resolveDevicePoll,h as refreshAccessToken,g as probeToken,l as loginDevice,n as loginBrowser,m as login,b as isReplitEnv,j as isNearExpiry,c as getConfig,i as getCallbackUri,k as fetchQreditsBalance,a as checkoutApiKey,d as ForgewiseError,e as DeviceFlowUnsupportedError};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Dh as b}from"./chunk-bd21p9zz.js";import"./chunk-p54bzjtv.js";import"./chunk-pfx8ts02.js";export{b as QuickJSAsyncWASMModule};