@qitqode/qitqode-android-arm64 0.2.14 → 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 (414) hide show
  1. package/bun +2 -2
  2. package/bundle/{chunk-wrzn87w0.js → chunk-098mr0zz.js} +1 -1
  3. package/bundle/{chunk-j15wejz0.js → chunk-0catm9vq.js} +1 -1
  4. package/bundle/{chunk-kdqhwa65.js → chunk-0cqs1qkh.js} +1 -1
  5. package/bundle/{chunk-d10qre1b.js → chunk-0f3ncvfe.js} +1 -1
  6. package/bundle/{chunk-583d91xq.js → chunk-0gqwvt8w.js} +2 -2
  7. package/bundle/chunk-0mb55ytc.js +2 -0
  8. package/bundle/{chunk-9zsp3qkh.js → chunk-0n2ncnwz.js} +1 -1
  9. package/bundle/chunk-0y0hm0m5.js +2 -0
  10. package/bundle/chunk-120e8yr1.js +2 -0
  11. package/bundle/{chunk-spcdwmy4.js → chunk-1aneepm5.js} +1 -1
  12. package/bundle/chunk-1dxm8yev.js +2 -0
  13. package/bundle/{chunk-96sra8g8.js → chunk-1jg7cybp.js} +1 -1
  14. package/bundle/{chunk-ngygp66y.js → chunk-1k5nfw7g.js} +1 -1
  15. package/bundle/{chunk-fmcg649e.js → chunk-1kksj8cn.js} +1 -1
  16. package/bundle/chunk-1pgpv979.js +2 -0
  17. package/bundle/{chunk-szfqmkj6.js → chunk-1xsjkf4c.js} +1 -1
  18. package/bundle/{chunk-zx63mepv.js → chunk-1yetxft4.js} +1 -1
  19. package/bundle/chunk-23zh9s18.js +2 -0
  20. package/bundle/{chunk-8qpfphdz.js → chunk-24pf9s68.js} +1 -1
  21. package/bundle/chunk-2a0zf12g.js +2 -0
  22. package/bundle/chunk-2b8x31p3.js +2 -0
  23. package/bundle/chunk-2cvmdss3.js +2 -0
  24. package/bundle/{chunk-bm8azfnt.js → chunk-2kvghwar.js} +1 -1
  25. package/bundle/{chunk-ch7s512a.js → chunk-2nkjwqpm.js} +1 -1
  26. package/bundle/chunk-2qbsg6dp.js +2 -0
  27. package/bundle/{chunk-9ttebtcf.js → chunk-2rvs18fx.js} +1 -1
  28. package/bundle/{chunk-rxt6gktt.js → chunk-2thbax1j.js} +1 -1
  29. package/bundle/{chunk-6y0wgz2j.js → chunk-2zxygnx4.js} +1 -1
  30. package/bundle/{chunk-zgwasq3p.js → chunk-36kg3v3k.js} +1 -1
  31. package/bundle/{chunk-1gdt9q05.js → chunk-37hh7eee.js} +1 -1
  32. package/bundle/chunk-39mwv068.js +2 -0
  33. package/bundle/{chunk-set1f1wr.js → chunk-39z0qxkt.js} +1 -1
  34. package/bundle/{chunk-p0852vfn.js → chunk-3dfy9k0t.js} +2 -2
  35. package/bundle/{chunk-et3tgx7t.js → chunk-3e26pryk.js} +1 -1
  36. package/bundle/{chunk-vzkdzhn0.js → chunk-3eddms0g.js} +1 -1
  37. package/bundle/chunk-3re79hkf.js +2 -0
  38. package/bundle/{chunk-sy76e7nr.js → chunk-3vjs8aht.js} +1 -1
  39. package/bundle/{chunk-k769v1ds.js → chunk-3z7r4c0p.js} +1 -1
  40. package/bundle/chunk-40pe0tde.js +11 -0
  41. package/bundle/{chunk-0ejx0yqx.js → chunk-47nber5v.js} +1 -1
  42. package/bundle/{chunk-bga4kqd1.js → chunk-491f4ab9.js} +2 -2
  43. package/bundle/{chunk-3152y1q9.js → chunk-4bp91rza.js} +1 -1
  44. package/bundle/{chunk-pdcxmr6x.js → chunk-4dy64hgp.js} +1 -1
  45. package/bundle/{chunk-0mztgsxp.js → chunk-4fqwg54p.js} +1 -1
  46. package/bundle/{chunk-2w3n0q9m.js → chunk-4gv7nsdd.js} +2 -2
  47. package/bundle/{chunk-2ascwm7j.js → chunk-4nw19yab.js} +1 -1
  48. package/bundle/chunk-51fyaa6r.js +2 -0
  49. package/bundle/{chunk-9znfb8f2.js → chunk-52f62kr0.js} +2 -2
  50. package/bundle/chunk-52n4tdeh.js +5 -0
  51. package/bundle/{chunk-x4jnyj09.js → chunk-543jma8r.js} +1 -1
  52. package/bundle/chunk-58q03ah1.js +2 -0
  53. package/bundle/{chunk-hrcqbadm.js → chunk-5fhy0wb0.js} +1 -1
  54. package/bundle/{chunk-8zpsgfb6.js → chunk-5fym1zr2.js} +1 -1
  55. package/bundle/{chunk-a3g8de96.js → chunk-5k5jdayv.js} +1 -1
  56. package/bundle/chunk-5nmqgqj2.js +2 -0
  57. package/bundle/{chunk-psmwrvqs.js → chunk-5t69v8jg.js} +2 -2
  58. package/bundle/{chunk-7w571q26.js → chunk-5vtbg7pj.js} +1 -1
  59. package/bundle/{chunk-g738e799.js → chunk-5xmtzs15.js} +2 -2
  60. package/bundle/chunk-5ydg5ny1.js +2 -0
  61. package/bundle/{chunk-v5me0cj9.js → chunk-5z5rk3ng.js} +1 -1
  62. package/bundle/{chunk-5dvy83ms.js → chunk-62mb6wxm.js} +2 -2
  63. package/bundle/chunk-62mytrwv.js +2 -0
  64. package/bundle/{chunk-edvfqxfr.js → chunk-6396bg4p.js} +1 -1
  65. package/bundle/chunk-63bccmze.js +2 -0
  66. package/bundle/{chunk-1ypzf18e.js → chunk-64x1vtdq.js} +1 -1
  67. package/bundle/{chunk-9mabvb06.js → chunk-6kx4atkt.js} +1 -1
  68. package/bundle/{chunk-dmb0ez0m.js → chunk-6r7vm4xc.js} +3 -3
  69. package/bundle/{chunk-tcyzj3rz.js → chunk-6rggm6tm.js} +1 -1
  70. package/bundle/{chunk-fp2xgnjn.js → chunk-6vpc1y3w.js} +2 -2
  71. package/bundle/{chunk-71jmhvef.js → chunk-6vxddv5w.js} +2 -2
  72. package/bundle/chunk-6ynaebaw.js +2 -0
  73. package/bundle/{chunk-ep4drmt9.js → chunk-700jhn67.js} +1 -1
  74. package/bundle/{chunk-fdmz0502.js → chunk-76jbys6j.js} +2 -2
  75. package/bundle/chunk-782y3dm8.js +2 -0
  76. package/bundle/{chunk-d7h1dp0h.js → chunk-89g9wzc2.js} +1 -1
  77. package/bundle/chunk-8q50bha4.js +2 -0
  78. package/bundle/chunk-8v6qbhm1.js +2 -0
  79. package/bundle/chunk-955jtenj.js +2 -0
  80. package/bundle/chunk-95yzwxpf.js +2 -0
  81. package/bundle/{chunk-2w79k0mh.js → chunk-96281xfb.js} +2 -2
  82. package/bundle/{chunk-bdcd2mcb.js → chunk-96657nrr.js} +2 -2
  83. package/bundle/chunk-99ansgsj.js +2 -0
  84. package/bundle/{chunk-3c73rngn.js → chunk-9dd2krfn.js} +1 -1
  85. package/bundle/chunk-9exxjnxc.js +2 -0
  86. package/bundle/{chunk-eqsank84.js → chunk-9ge1mkfs.js} +1 -1
  87. package/bundle/{chunk-4r7fbkcm.js → chunk-9mmaja9n.js} +1 -1
  88. package/bundle/{chunk-mjkwd1sz.js → chunk-9rd7q5e9.js} +1 -1
  89. package/bundle/{chunk-6cztstry.js → chunk-9skj2w9e.js} +2 -2
  90. package/bundle/{chunk-nb4xtk1n.js → chunk-9tdbts1r.js} +1 -1
  91. package/bundle/{chunk-sg9enzsp.js → chunk-9tfm1dk2.js} +2 -2
  92. package/bundle/{chunk-z6qyx227.js → chunk-9xaea8h1.js} +1 -1
  93. package/bundle/{chunk-meehnnv9.js → chunk-a0c6w901.js} +2 -2
  94. package/bundle/chunk-a2tp2f6s.js +2 -0
  95. package/bundle/{chunk-69htq8kq.js → chunk-a3ynq3h7.js} +1 -1
  96. package/bundle/chunk-a4y0wjtq.js +3 -0
  97. package/bundle/{chunk-6dd2dx69.js → chunk-afagt413.js} +2 -2
  98. package/bundle/{chunk-px69995t.js → chunk-afzx47y2.js} +1 -1
  99. package/bundle/chunk-ag3s3t7x.js +2 -0
  100. package/bundle/{chunk-n7zd97hy.js → chunk-ajdn1n77.js} +2 -2
  101. package/bundle/chunk-arwm1qxm.js +2 -0
  102. package/bundle/{chunk-adws0hhk.js → chunk-awt3q88j.js} +2 -2
  103. package/bundle/{chunk-qn1fhqyw.js → chunk-az2pxgx6.js} +2 -2
  104. package/bundle/chunk-b0gq0s8a.js +2 -0
  105. package/bundle/{chunk-48rg4yhk.js → chunk-b2zfr7jz.js} +2 -2
  106. package/bundle/{chunk-mbmaeq0a.js → chunk-b63733cw.js} +1 -1
  107. package/bundle/chunk-b7430vg8.js +2 -0
  108. package/bundle/{chunk-07b4pkk6.js → chunk-b7dw5ged.js} +1 -1
  109. package/bundle/{chunk-prz2fkn9.js → chunk-b83qf145.js} +1 -1
  110. package/bundle/{chunk-veptx3fk.js → chunk-b8w33ck9.js} +1 -1
  111. package/bundle/{chunk-674pexjx.js → chunk-bd21p9zz.js} +2 -2
  112. package/bundle/chunk-be2z0tr4.js +2 -0
  113. package/bundle/{chunk-x0de4z05.js → chunk-bkqemdv8.js} +2 -2
  114. package/bundle/chunk-bq585t67.js +2 -0
  115. package/bundle/chunk-bts3gw8w.js +2 -0
  116. package/bundle/{chunk-qz20b42s.js → chunk-c0sr83np.js} +1 -1
  117. package/bundle/{chunk-zh7e6kqs.js → chunk-c4tdfar1.js} +1 -1
  118. package/bundle/chunk-c6ege2yp.js +2 -0
  119. package/bundle/{chunk-00ft63qn.js → chunk-chs4bkgh.js} +1 -1
  120. package/bundle/{chunk-8b9z8j3z.js → chunk-cm426ssg.js} +1 -1
  121. package/bundle/{chunk-crqycrs4.js → chunk-d4y5hyjg.js} +2 -2
  122. package/bundle/chunk-de0edzjs.js +2 -0
  123. package/bundle/{chunk-4hvenszg.js → chunk-der5kj1b.js} +1 -1
  124. package/bundle/{chunk-6d4xc6br.js → chunk-dhykktcp.js} +1 -1
  125. package/bundle/{chunk-8jkqyf9n.js → chunk-dm7hfb7f.js} +2 -2
  126. package/bundle/chunk-dntnvfdz.js +2 -0
  127. package/bundle/{chunk-q1dmxn63.js → chunk-dptvy1zn.js} +2 -2
  128. package/bundle/{chunk-2k2szpze.js → chunk-dqt8rrey.js} +1 -1
  129. package/bundle/{chunk-ky3fhz9z.js → chunk-dr003xka.js} +1 -1
  130. package/bundle/chunk-dtyzk0j7.js +2 -0
  131. package/bundle/{chunk-qrztx1b4.js → chunk-dwza14dk.js} +2 -2
  132. package/bundle/chunk-e3tmbywr.js +2 -0
  133. package/bundle/{chunk-ej0yzstw.js → chunk-e4nap6v9.js} +2 -2
  134. package/bundle/{chunk-5h1s0akp.js → chunk-e7x8v549.js} +1 -1
  135. package/bundle/{chunk-1e75j4m1.js → chunk-e826jvr2.js} +2 -2
  136. package/bundle/{chunk-9z7y4x7q.js → chunk-edm4c812.js} +1 -1
  137. package/bundle/{chunk-ws720v4j.js → chunk-eearwfay.js} +1 -1
  138. package/bundle/{chunk-gkf7x1yj.js → chunk-ekavngf7.js} +1 -1
  139. package/bundle/chunk-em637k9q.js +2 -0
  140. package/bundle/{chunk-8gkz5550.js → chunk-epncmz5t.js} +1 -1
  141. package/bundle/chunk-eytpz91c.js +8 -0
  142. package/bundle/chunk-f4qcwbx0.js +2 -0
  143. package/bundle/{chunk-a8askx4y.js → chunk-f6gd8809.js} +1 -1
  144. package/bundle/{chunk-e8s4mp5n.js → chunk-fcbmedh3.js} +2 -2
  145. package/bundle/{chunk-4ycg2c6f.js → chunk-fg5f3a8a.js} +2 -2
  146. package/bundle/chunk-fj7jcv7m.js +2 -0
  147. package/bundle/{chunk-47jkx37s.js → chunk-ft4msj4z.js} +3 -3
  148. package/bundle/chunk-fyntc5hj.js +2 -0
  149. package/bundle/chunk-fyt4yaq7.js +2 -0
  150. package/bundle/chunk-g4hcxhfs.js +2 -0
  151. package/bundle/{chunk-c5cyt23k.js → chunk-g7twcprm.js} +2 -2
  152. package/bundle/{chunk-9amnqaeq.js → chunk-g8844pb4.js} +1 -1
  153. package/bundle/{chunk-w136zswr.js → chunk-ganwjd6s.js} +3 -3
  154. package/bundle/chunk-gdew108b.js +2 -0
  155. package/bundle/chunk-gdy74wte.js +2 -0
  156. package/bundle/{chunk-7a4sb6q7.js → chunk-gse0cgqc.js} +1 -1
  157. package/bundle/{chunk-z0dj15g9.js → chunk-gsjgbm0d.js} +1 -1
  158. package/bundle/{chunk-a1mbach4.js → chunk-gt10s0ks.js} +1 -1
  159. package/bundle/{chunk-qpk7jp6t.js → chunk-gxpx2nd8.js} +1 -1
  160. package/bundle/{chunk-4p9fny77.js → chunk-gxq2fwnc.js} +1 -1
  161. package/bundle/chunk-gz90qgcn.js +2 -0
  162. package/bundle/chunk-gzz78dnm.js +2 -0
  163. package/bundle/{chunk-840mmmzz.js → chunk-h3yazfmh.js} +4 -4
  164. package/bundle/{chunk-d4faz5xa.js → chunk-h429rzqp.js} +1 -1
  165. package/bundle/{chunk-f0dp1tf9.js → chunk-h5y0pwwc.js} +1 -1
  166. package/bundle/{chunk-62gefpwn.js → chunk-h6b6acrv.js} +2 -2
  167. package/bundle/{chunk-19rs84t8.js → chunk-h8bq75er.js} +1 -1
  168. package/bundle/{chunk-99df6wvm.js → chunk-ha147mdc.js} +1 -1
  169. package/bundle/{chunk-xdcwx384.js → chunk-ha1w0xzh.js} +1 -1
  170. package/bundle/{chunk-5341jv20.js → chunk-ha294vpj.js} +1 -1
  171. package/bundle/chunk-hfrjkgyk.js +2 -0
  172. package/bundle/chunk-hjpt1n6g.js +2 -0
  173. package/bundle/{chunk-bzh71a92.js → chunk-hvdre0mb.js} +1 -1
  174. package/bundle/{chunk-86sfzgnf.js → chunk-hxf2a10r.js} +1 -1
  175. package/bundle/{chunk-4ppw719f.js → chunk-j09qf4zh.js} +1 -1
  176. package/bundle/chunk-j0jayfyn.js +35 -0
  177. package/bundle/{chunk-ffz334ab.js → chunk-j5b0yc0f.js} +1 -1
  178. package/bundle/{chunk-n6pn4f3r.js → chunk-j767byd1.js} +1 -1
  179. package/bundle/chunk-j794z99k.js +2 -0
  180. package/bundle/{chunk-y1v7mf1a.js → chunk-j95mkzwg.js} +123 -123
  181. package/bundle/{chunk-rn3je2hv.js → chunk-jcznttek.js} +1 -1
  182. package/bundle/{chunk-4v29ayke.js → chunk-jgw20mxx.js} +1 -1
  183. package/bundle/{chunk-175720ws.js → chunk-jhdpwndc.js} +2 -2
  184. package/bundle/{chunk-9gxyt2ay.js → chunk-jkqa49xc.js} +2 -2
  185. package/bundle/{chunk-sb3cgb4v.js → chunk-jmg64erz.js} +1 -1
  186. package/bundle/chunk-jpw7z507.js +2 -0
  187. package/bundle/{chunk-3cs1qf8x.js → chunk-jr622341.js} +1 -1
  188. package/bundle/{chunk-qpggztkq.js → chunk-jv69hdp0.js} +2 -2
  189. package/bundle/chunk-jx9c90ft.js +2 -0
  190. package/bundle/{chunk-fpzkyzny.js → chunk-kevhkmn2.js} +2 -2
  191. package/bundle/{chunk-bxnsrggq.js → chunk-khpjjjsb.js} +1 -1
  192. package/bundle/chunk-kkfrys0w.js +2 -0
  193. package/bundle/chunk-kkq2vwm6.js +2 -0
  194. package/bundle/{chunk-qqsj69m2.js → chunk-km1tyeyy.js} +1 -1
  195. package/bundle/chunk-kp0w1p79.js +2 -0
  196. package/bundle/chunk-kr7t73tg.js +3 -0
  197. package/bundle/chunk-kt7q9620.js +2 -0
  198. package/bundle/{chunk-8a9sj8gp.js → chunk-kzcb1pt4.js} +1 -1
  199. package/bundle/{chunk-jwv6fda1.js → chunk-m0f6cf9n.js} +2 -2
  200. package/bundle/chunk-m30bgt2t.js +2 -0
  201. package/bundle/chunk-m318f9es.js +2 -0
  202. package/bundle/{chunk-1mfdmm2t.js → chunk-m5r6zq6v.js} +1 -1
  203. package/bundle/chunk-m6g6za7b.js +2 -0
  204. package/bundle/chunk-m8djypsy.js +11 -0
  205. package/bundle/chunk-ma0vvbvy.js +2 -0
  206. package/bundle/chunk-mha4n5md.js +2 -0
  207. package/bundle/{chunk-s9epttpy.js → chunk-mhq2a5ms.js} +1 -1
  208. package/bundle/chunk-mp9qhnxg.js +2 -0
  209. package/bundle/{chunk-gd0j16gn.js → chunk-mqdvthkm.js} +1 -1
  210. package/bundle/{chunk-69k7cdtv.js → chunk-mqe1qa6t.js} +2 -2
  211. package/bundle/{chunk-j45p2v4a.js → chunk-mz6swd88.js} +3 -3
  212. package/bundle/{chunk-0m4gvjcv.js → chunk-n25t4j9w.js} +2 -2
  213. package/bundle/{chunk-hx13a8es.js → chunk-n7ewvphw.js} +3 -3
  214. package/bundle/chunk-n9wre9wx.js +2 -0
  215. package/bundle/chunk-ncbj74tk.js +3 -0
  216. package/bundle/{chunk-06tgmvh6.js → chunk-ne3z7yye.js} +2 -2
  217. package/bundle/chunk-nnyvn2pm.js +2 -0
  218. package/bundle/chunk-nyhx3822.js +2 -0
  219. package/bundle/{chunk-zjyaze0d.js → chunk-p54bzjtv.js} +1 -1
  220. package/bundle/{chunk-dvp0r93q.js → chunk-p5d5qyzq.js} +1 -1
  221. package/bundle/{chunk-m8kjtp60.js → chunk-p6mxxem5.js} +1 -1
  222. package/bundle/{chunk-fd04358e.js → chunk-p76c9s6g.js} +310 -309
  223. package/bundle/chunk-p8etcskm.js +2 -0
  224. package/bundle/{chunk-b350g18y.js → chunk-pf4gwr34.js} +2 -2
  225. package/bundle/{chunk-wf0n1cs9.js → chunk-pf61zhms.js} +1 -1
  226. package/bundle/{chunk-sh03ka27.js → chunk-pfx8ts02.js} +1 -1
  227. package/bundle/{chunk-e611m0p4.js → chunk-phvp9h7w.js} +1 -1
  228. package/bundle/chunk-pv71d7f3.js +2 -0
  229. package/bundle/{chunk-6wmtbebc.js → chunk-pwcmc8j7.js} +1 -1
  230. package/bundle/{chunk-g77kddrs.js → chunk-pyt4xpze.js} +2 -2
  231. package/bundle/{chunk-1bq15kf0.js → chunk-q0pd8bac.js} +2 -2
  232. package/bundle/{chunk-yg9n2a2d.js → chunk-q12dtxep.js} +1 -1
  233. package/bundle/{chunk-v1axkp21.js → chunk-q2j2dm96.js} +2 -2
  234. package/bundle/{chunk-rx9eh3db.js → chunk-qf1hh45g.js} +3 -3
  235. package/bundle/{chunk-p4xqfkbh.js → chunk-qqjspfqw.js} +1 -1
  236. package/bundle/{chunk-9kc2th5c.js → chunk-qvnsgyfk.js} +2 -2
  237. package/bundle/{chunk-rqap90xh.js → chunk-qz35c4xy.js} +2 -2
  238. package/bundle/{chunk-bemyyen3.js → chunk-r3z77rjn.js} +1 -1
  239. package/bundle/{chunk-chnr7pe5.js → chunk-r7mcn9ey.js} +1 -1
  240. package/bundle/{chunk-nzz7gzg2.js → chunk-rmpgmjtd.js} +1 -1
  241. package/bundle/{chunk-k0chq88p.js → chunk-rpt3rm31.js} +1 -1
  242. package/bundle/chunk-rteaec1s.js +2 -0
  243. package/bundle/chunk-rxwcah73.js +2 -0
  244. package/bundle/{chunk-s0gmxpxm.js → chunk-s1gy4hnw.js} +2 -2
  245. package/bundle/{chunk-4s1n38ds.js → chunk-s2ma1nz3.js} +2 -2
  246. package/bundle/chunk-s3gjc4m0.js +2 -0
  247. package/bundle/{chunk-6yshpz0z.js → chunk-s5taq9jy.js} +2 -2
  248. package/bundle/{chunk-5mf4qrye.js → chunk-s7017cak.js} +2 -2
  249. package/bundle/{chunk-6pt6nqwk.js → chunk-s9bn800b.js} +1 -1
  250. package/bundle/{chunk-73a7ts8r.js → chunk-sa3rjs2s.js} +1 -1
  251. package/bundle/{chunk-wfpnv00c.js → chunk-sprbs7aj.js} +2 -2
  252. package/bundle/{chunk-10q04xh5.js → chunk-sq2z7keb.js} +1 -1
  253. package/bundle/{chunk-w8nj5ph5.js → chunk-sqrx9csx.js} +1 -1
  254. package/bundle/{chunk-art8gejd.js → chunk-srf4jqcj.js} +1 -1
  255. package/bundle/{chunk-ffyj5nsg.js → chunk-ssp3nw24.js} +2 -2
  256. package/bundle/{chunk-6kch0q2d.js → chunk-svnhycdw.js} +2 -2
  257. package/bundle/chunk-swm990q6.js +2 -0
  258. package/bundle/chunk-sy42ayp2.js +2 -0
  259. package/bundle/{chunk-5rvvfgfy.js → chunk-t3kxce69.js} +2 -2
  260. package/bundle/chunk-t7mvej98.js +2 -0
  261. package/bundle/{chunk-6j53vtzd.js → chunk-t8pmy758.js} +1 -1
  262. package/bundle/{chunk-v7v0krrj.js → chunk-t9srpmte.js} +1 -1
  263. package/bundle/{chunk-358wdvj7.js → chunk-tatecas7.js} +2 -2
  264. package/bundle/chunk-teagh4hx.js +2 -0
  265. package/bundle/{chunk-avksqxan.js → chunk-tf40p520.js} +1 -1
  266. package/bundle/{chunk-y5ydtbpd.js → chunk-tpgksx59.js} +1 -1
  267. package/bundle/{chunk-02tmc2st.js → chunk-tr4cze2c.js} +1 -1
  268. package/bundle/chunk-tv4cp6f9.js +2 -0
  269. package/bundle/chunk-tw618904.js +2 -0
  270. package/bundle/{chunk-zpjtse0z.js → chunk-v1bqh3m6.js} +176 -176
  271. package/bundle/{chunk-j46bxb1b.js → chunk-v3bfzxxg.js} +1 -1
  272. package/bundle/{chunk-vr13f6b5.js → chunk-v5gf0wx6.js} +2 -2
  273. package/bundle/{chunk-d385e2qt.js → chunk-v6mnbwtz.js} +1 -1
  274. package/bundle/{chunk-bq6cvf16.js → chunk-v93gr6n9.js} +2 -2
  275. package/bundle/chunk-vdpffam0.js +2 -0
  276. package/bundle/chunk-ve5w7nkb.js +2 -0
  277. package/bundle/chunk-vey57h4x.js +30 -0
  278. package/bundle/{chunk-pwq2f75j.js → chunk-vf492zs6.js} +1 -1
  279. package/bundle/{chunk-fkq0v5qv.js → chunk-vg9ec44m.js} +2 -2
  280. package/bundle/{chunk-61b81z2h.js → chunk-vh3n53qq.js} +1 -1
  281. package/bundle/{chunk-bmdqb48f.js → chunk-vk8gxf4y.js} +1 -1
  282. package/bundle/{chunk-rd08wx37.js → chunk-vr222v2n.js} +2 -2
  283. package/bundle/chunk-vrpca62q.js +2 -0
  284. package/bundle/{chunk-x3dzzq0t.js → chunk-w5fx69cw.js} +1 -1
  285. package/bundle/{chunk-05bkxat0.js → chunk-w9w59zjv.js} +2 -2
  286. package/bundle/{chunk-xmf59618.js → chunk-wbz79hns.js} +1 -1
  287. package/bundle/{chunk-gfvq78gy.js → chunk-wdrfzx4m.js} +1 -1
  288. package/bundle/{chunk-j3agzs13.js → chunk-wf18y499.js} +2 -2
  289. package/bundle/chunk-wvvygzz2.js +2 -0
  290. package/bundle/{chunk-w4fr00s7.js → chunk-wyxc99aa.js} +2 -2
  291. package/bundle/{chunk-5q98z8ck.js → chunk-x2mbre12.js} +2 -2
  292. package/bundle/{chunk-2d61z24r.js → chunk-x8rr2f15.js} +1 -1
  293. package/bundle/{chunk-7s9msscb.js → chunk-xpmgqa5n.js} +1 -1
  294. package/bundle/{chunk-rws2tsdv.js → chunk-xrwsttb7.js} +1 -1
  295. package/bundle/{chunk-wmj3xndt.js → chunk-xz6psr05.js} +1 -1
  296. package/bundle/{chunk-4xqwt6dr.js → chunk-xzshjp04.js} +2 -2
  297. package/bundle/chunk-y27gwnx9.js +2 -0
  298. package/bundle/chunk-y2ms7q84.js +2 -0
  299. package/bundle/{chunk-1pft3sar.js → chunk-y8bjb32m.js} +1 -1
  300. package/bundle/{chunk-h036zy9e.js → chunk-ya7wrt5f.js} +2 -2
  301. package/bundle/{chunk-ahgb3r1c.js → chunk-ycjz7y1x.js} +2 -2
  302. package/bundle/{chunk-10kj86va.js → chunk-ykqx1z0b.js} +1 -1
  303. package/bundle/chunk-yq4vck53.js +2 -0
  304. package/bundle/{chunk-j2snkw45.js → chunk-yxsc90ba.js} +2 -2
  305. package/bundle/{chunk-5cwy8y78.js → chunk-yy5qqab3.js} +2 -2
  306. package/bundle/{chunk-86reb44c.js → chunk-z38am71w.js} +1 -1
  307. package/bundle/{chunk-pwrwb7mn.js → chunk-z6mqdbj1.js} +1 -1
  308. package/bundle/{chunk-nyxn7npc.js → chunk-z87ew6d3.js} +1 -1
  309. package/bundle/{chunk-m6967jtv.js → chunk-z9k4506p.js} +2 -2
  310. package/bundle/{chunk-hf39qx6t.js → chunk-zezz8xfw.js} +2 -2
  311. package/bundle/{chunk-ffx0cr44.js → chunk-zg72kz2k.js} +2 -2
  312. package/bundle/chunk-zkxc41ek.js +2 -0
  313. package/bundle/{chunk-tz1bzrnh.js → chunk-zssy3srh.js} +1 -1
  314. package/bundle/{chunk-ae1g5y4r.js → chunk-zyz4na64.js} +1 -1
  315. package/bundle/{chunk-e18hshcg.js → chunk-zzsetq5f.js} +1 -1
  316. package/bundle/index.js +3 -3
  317. package/bundle/parser.worker.js +2 -2
  318. package/bundle/worker.js +1 -1
  319. package/package.json +1 -1
  320. package/bundle/chunk-00r3he5x.js +0 -2
  321. package/bundle/chunk-0ks20gz1.js +0 -2
  322. package/bundle/chunk-1a08ffyd.js +0 -2
  323. package/bundle/chunk-1r7anzk5.js +0 -2
  324. package/bundle/chunk-26e51217.js +0 -2
  325. package/bundle/chunk-2g4kxtz0.js +0 -2
  326. package/bundle/chunk-2jzay8a9.js +0 -2
  327. package/bundle/chunk-2q78bdtj.js +0 -2
  328. package/bundle/chunk-30rghawe.js +0 -2
  329. package/bundle/chunk-31a47ptm.js +0 -10
  330. package/bundle/chunk-33mzqyyb.js +0 -3
  331. package/bundle/chunk-34yk99ep.js +0 -2
  332. package/bundle/chunk-3dajnr1w.js +0 -2
  333. package/bundle/chunk-3ege6krg.js +0 -2
  334. package/bundle/chunk-43vpxggb.js +0 -2
  335. package/bundle/chunk-49y7zg15.js +0 -2
  336. package/bundle/chunk-5qhsfjzq.js +0 -3
  337. package/bundle/chunk-5xxn06g0.js +0 -2
  338. package/bundle/chunk-7cp30q0t.js +0 -2
  339. package/bundle/chunk-7xc73qb1.js +0 -2
  340. package/bundle/chunk-8gz8fk6r.js +0 -2
  341. package/bundle/chunk-8ht7cq3h.js +0 -2
  342. package/bundle/chunk-8qv0119d.js +0 -2
  343. package/bundle/chunk-9m0eawt5.js +0 -2
  344. package/bundle/chunk-9thgxbze.js +0 -2
  345. package/bundle/chunk-a32y70fe.js +0 -2
  346. package/bundle/chunk-avzaqy6a.js +0 -2
  347. package/bundle/chunk-az12tp53.js +0 -2
  348. package/bundle/chunk-b5dpzcc7.js +0 -2
  349. package/bundle/chunk-bcgtqx3g.js +0 -2
  350. package/bundle/chunk-bde5d507.js +0 -2
  351. package/bundle/chunk-bzzggc3s.js +0 -2
  352. package/bundle/chunk-c8qx439t.js +0 -2
  353. package/bundle/chunk-ckw51fn6.js +0 -2
  354. package/bundle/chunk-denp0wrq.js +0 -2
  355. package/bundle/chunk-depxzjer.js +0 -2
  356. package/bundle/chunk-dhvqpcf3.js +0 -2
  357. package/bundle/chunk-dkqqswbv.js +0 -2
  358. package/bundle/chunk-dn0437c1.js +0 -5
  359. package/bundle/chunk-e5t7jsxa.js +0 -2
  360. package/bundle/chunk-eb811dt2.js +0 -2
  361. package/bundle/chunk-fbz2xv2w.js +0 -2
  362. package/bundle/chunk-gbvcb4k1.js +0 -2
  363. package/bundle/chunk-gdtnqzbp.js +0 -2
  364. package/bundle/chunk-gkfvhh28.js +0 -2
  365. package/bundle/chunk-gnh8c49b.js +0 -2
  366. package/bundle/chunk-gvf6ek9f.js +0 -2
  367. package/bundle/chunk-gvx5hmhk.js +0 -2
  368. package/bundle/chunk-hham7r33.js +0 -2
  369. package/bundle/chunk-hsjbe5zy.js +0 -2
  370. package/bundle/chunk-j1bv93m4.js +0 -31
  371. package/bundle/chunk-jvvctqjd.js +0 -8
  372. package/bundle/chunk-jvx7jtm4.js +0 -3
  373. package/bundle/chunk-k6gdmqff.js +0 -2
  374. package/bundle/chunk-kzkb4648.js +0 -2
  375. package/bundle/chunk-m2540waa.js +0 -2
  376. package/bundle/chunk-mscvm1rm.js +0 -2
  377. package/bundle/chunk-mw3hh526.js +0 -2
  378. package/bundle/chunk-n3nsrk5n.js +0 -2
  379. package/bundle/chunk-n9nmc4q4.js +0 -2
  380. package/bundle/chunk-nj4as8vy.js +0 -2
  381. package/bundle/chunk-nrzca9yd.js +0 -2
  382. package/bundle/chunk-nxm6gpyv.js +0 -2
  383. package/bundle/chunk-pp10epga.js +0 -8
  384. package/bundle/chunk-qbjqkezn.js +0 -2
  385. package/bundle/chunk-qhtp1xvx.js +0 -2
  386. package/bundle/chunk-qkztgpay.js +0 -2
  387. package/bundle/chunk-rnf3dy0y.js +0 -2
  388. package/bundle/chunk-rry4kq85.js +0 -2
  389. package/bundle/chunk-ryfj80q6.js +0 -2
  390. package/bundle/chunk-snx49w8h.js +0 -2
  391. package/bundle/chunk-t21mdqbb.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-vnstr4g1.js +0 -2
  399. package/bundle/chunk-vxr4rzt0.js +0 -2
  400. package/bundle/chunk-w0h9rczg.js +0 -2
  401. package/bundle/chunk-w214dwws.js +0 -2
  402. package/bundle/chunk-w8344et5.js +0 -2
  403. package/bundle/chunk-weyg78et.js +0 -2
  404. package/bundle/chunk-xchj8gna.js +0 -2
  405. package/bundle/chunk-y18ptwk2.js +0 -2
  406. package/bundle/chunk-y3dpyz2d.js +0 -2
  407. package/bundle/chunk-ykvgmje9.js +0 -35
  408. package/bundle/chunk-yvjecrjy.js +0 -2
  409. package/bundle/chunk-yw2x6by6.js +0 -2
  410. package/bundle/chunk-z0r4syk8.js +0 -2
  411. package/bundle/chunk-z7c00g63.js +0 -2
  412. package/bundle/chunk-znr0saas.js +0 -2
  413. package/bundle/chunk-zqqt7v17.js +0 -2
  414. package/bundle/chunk-zwrgh1hc.js +0 -2
@@ -1,8 +0,0 @@
1
- // @bun
2
- import{Qs as sZ}from"./chunk-1e75j4m1.js";import{et as J$}from"./chunk-1a08ffyd.js";import{Pt as R,Yt as C}from"./chunk-5dvy83ms.js";import{ju as v,mu as YZ}from"./chunk-ffx0cr44.js";import{gI as X$}from"./chunk-9kc2th5c.js";import{uP as rZ,wP as XZ,yP as GZ}from"./chunk-sh03ka27.js";function X1({onRequest:Z,onSseError:$,onSseEvent:X,responseTransformer:J,responseValidator:G,sseDefaultRetryDelay:V,sseMaxRetryAttempts:W,sseMaxRetryDelay:z,sseSleepFn:O,url:Q,...L}){let M,D=O??((U)=>new Promise((B)=>setTimeout(B,U)));return{stream:async function*(){let U=V??3000,B=0,I=L.signal??new AbortController().signal;while(!0){if(I.aborted)break;B++;let F=L.headers instanceof Headers?L.headers:new Headers(L.headers);if(M!==void 0)F.set("Last-Event-ID",M);try{let P={redirect:"follow",...L,body:L.serializedBody,headers:F,signal:I},b=new Request(Q,P);if(Z)b=await Z(Q,P);let S=await(L.fetch??globalThis.fetch)(b);if(!S.ok)throw Error(`SSE failed: ${S.status} ${S.statusText}`);if(!S.body)throw Error("No body in SSE response");let T=S.body.pipeThrough(new TextDecoderStream).getReader(),x="",a$=()=>{try{T.cancel()}catch{}};I.addEventListener("abort",a$);try{while(!0){let{done:TZ,value:wZ}=await T.read();if(TZ)break;x+=wZ,x=x.replace(/\r\n?/g,`
3
- `);let t$=x.split(`
4
-
5
- `);x=t$.pop()??"";for(let FZ of t$){let HZ=FZ.split(`
6
- `),W$=[],e$;for(let w of HZ)if(w.startsWith("data:"))W$.push(w.replace(/^data:\s*/,""));else if(w.startsWith("event:"))e$=w.replace(/^event:\s*/,"");else if(w.startsWith("id:"))M=w.replace(/^id:\s*/,"");else if(w.startsWith("retry:")){let Z1=Number.parseInt(w.replace(/^retry:\s*/,""),10);if(!Number.isNaN(Z1))U=Z1}let f,$1=!1;if(W$.length){let w=W$.join(`
7
- `);try{f=JSON.parse(w),$1=!0}catch{f=w}}if($1){if(G)await G(f);if(J)f=await J(f)}if(X?.({data:f,event:e$,id:M,retry:U}),W$.length)yield f}}}finally{I.removeEventListener("abort",a$),T.releaseLock()}break}catch(P){if($?.(P),W!==void 0&&B>=W)break;let b=Math.min(U*2**(B-1),z??30000);await D(b)}}}()}}var EZ=(Z)=>{switch(Z){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},AZ=(Z)=>{switch(Z){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},PZ=(Z)=>{switch(Z){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},V$=({allowReserved:Z,explode:$,name:X,style:J,value:G})=>{if(!$){let z=(Z?G:G.map((O)=>encodeURIComponent(O))).join(AZ(J));switch(J){case"label":return`.${z}`;case"matrix":return`;${X}=${z}`;case"simple":return z;default:return`${X}=${z}`}}let V=EZ(J),W=G.map((z)=>{if(J==="label"||J==="simple")return Z?z:encodeURIComponent(z);return u({allowReserved:Z,name:X,value:z})}).join(V);return J==="label"||J==="matrix"?V+W:W},u=({allowReserved:Z,name:$,value:X})=>{if(X===void 0||X===null)return"";if(typeof X==="object")throw Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${$}=${Z?X:encodeURIComponent(X)}`},z$=({allowReserved:Z,explode:$,name:X,style:J,value:G,valueOnly:V})=>{if(G instanceof Date)return V?G.toISOString():`${X}=${G.toISOString()}`;if(J!=="deepObject"&&!$){let O=[];Object.entries(G).forEach(([L,M])=>{O=[...O,L,Z?M:encodeURIComponent(M)]});let Q=O.join(",");switch(J){case"form":return`${X}=${Q}`;case"label":return`.${Q}`;case"matrix":return`;${X}=${Q}`;default:return Q}}let W=PZ(J),z=Object.entries(G).map(([O,Q])=>u({allowReserved:Z,name:J==="deepObject"?`${X}[${O}]`:O,value:Q})).join(W);return J==="label"||J==="matrix"?W+z:z};var kZ=/\{[^{}]+\}/g,gZ=({path:Z,url:$})=>{let X=$,J=$.match(kZ);if(J)for(let G of J){let V=!1,W=G.substring(1,G.length-1),z="simple";if(W.endsWith("*"))V=!0,W=W.substring(0,W.length-1);if(W.startsWith("."))W=W.substring(1),z="label";else if(W.startsWith(";"))W=W.substring(1),z="matrix";let O=Z[W];if(O===void 0||O===null)continue;if(Array.isArray(O)){X=X.replace(G,V$({explode:V,name:W,style:z,value:O}));continue}if(typeof O==="object"){X=X.replace(G,z$({explode:V,name:W,style:z,value:O,valueOnly:!0}));continue}if(z==="matrix"){X=X.replace(G,`;${u({name:W,value:O})}`);continue}let Q=encodeURIComponent(z==="label"?`.${O}`:O);X=X.replace(G,Q)}return X},J1=({baseUrl:Z,path:$,query:X,querySerializer:J,url:G})=>{let V=G.startsWith("/")?G:`/${G}`,W=(Z??"")+V;if($)W=gZ({path:$,url:W});let z=X?J(X):"";if(z.startsWith("?"))z=z.substring(1);if(z)W+=`?${z}`;return W};function _$(Z){let $=Z.body!==void 0;if($&&Z.bodySerializer){if("serializedBody"in Z)return Z.serializedBody!==void 0&&Z.serializedBody!==""?Z.serializedBody:null;return Z.body!==""?Z.body:null}if($)return Z.body;return}var G1=async(Z,$)=>{let X=typeof $==="function"?await $(Z):$;if(!X)return;if(Z.scheme==="bearer")return`Bearer ${X}`;if(Z.scheme==="basic")return`Basic ${btoa(X)}`;return X};var q$={bodySerializer:(Z)=>JSON.stringify(Z,($,X)=>typeof X==="bigint"?X.toString():X)};var Y1=({parameters:Z={},...$}={})=>{return(J)=>{let G=[];if(J&&typeof J==="object")for(let V in J){let W=J[V];if(W===void 0||W===null)continue;let z=Z[V]||$;if(Array.isArray(W)){let O=V$({allowReserved:z.allowReserved,explode:!0,name:V,style:"form",value:W,...z.array});if(O)G.push(O)}else if(typeof W==="object"){let O=z$({allowReserved:z.allowReserved,explode:!0,name:V,style:"deepObject",value:W,...z.object});if(O)G.push(O)}else{let O=u({allowReserved:z.allowReserved,name:V,value:W});if(O)G.push(O)}}return G.join("&")}},W1=(Z)=>{if(!Z)return"stream";let $=Z.split(";")[0]?.trim();if(!$)return;if($.startsWith("application/json")||$.endsWith("+json"))return"json";if($==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some((X)=>$.startsWith(X)))return"blob";if($.startsWith("text/"))return"text";return},CZ=(Z,$)=>{if(!$)return!1;if(Z.headers.has($)||Z.query?.[$]||Z.headers.get("Cookie")?.includes(`${$}=`))return!0;return!1};async function V1(Z){for(let $ of Z.security??[]){if(CZ(Z,$.name))continue;let X=await G1($,Z.auth);if(!X)continue;let J=$.name??"Authorization";switch($.in){case"query":if(!Z.query)Z.query={};Z.query[J]=X;break;case"cookie":Z.headers.append("Cookie",`${J}=${X}`);break;case"header":default:Z.headers.set(J,X);break}}}var T$=(Z)=>J1({baseUrl:Z.baseUrl,path:Z.path,query:Z.query,querySerializer:typeof Z.querySerializer==="function"?Z.querySerializer:Y1(Z.querySerializer),url:Z.url}),w$=(Z,$)=>{let X={...Z,...$};if(X.baseUrl?.endsWith("/"))X.baseUrl=X.baseUrl.substring(0,X.baseUrl.length-1);return X.headers=D$(Z.headers,$.headers),X},hZ=(Z)=>{let $=[];return Z.forEach((X,J)=>{$.push([J,X])}),$},D$=(...Z)=>{let $=new Headers;for(let X of Z){if(!X)continue;let J=X instanceof Headers?hZ(X):Object.entries(X);for(let[G,V]of J)if(V===null)$.delete(G);else if(Array.isArray(V))for(let W of V)$.append(G,W);else if(V!==void 0)$.set(G,typeof V==="object"?JSON.stringify(V):V)}return $};class O${fns=[];clear(){this.fns=[]}eject(Z){let $=this.getInterceptorIndex(Z);if(this.fns[$])this.fns[$]=null}exists(Z){let $=this.getInterceptorIndex(Z);return Boolean(this.fns[$])}getInterceptorIndex(Z){if(typeof Z==="number")return this.fns[Z]?Z:-1;return this.fns.indexOf(Z)}update(Z,$){let X=this.getInterceptorIndex(Z);if(this.fns[X])return this.fns[X]=$,Z;return!1}use(Z){return this.fns.push(Z),this.fns.length-1}}var z1=()=>({error:new O$,request:new O$,response:new O$}),bZ=Y1({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),fZ={"Content-Type":"application/json"},o=(Z={})=>({...q$,headers:fZ,parseAs:"auto",querySerializer:bZ,...Z});var a=(Z={})=>{let $=w$(o(),Z),X=()=>({...$}),J=(L)=>{return $=w$($,L),X()},G=z1(),V=async(L)=>{let M={...$,...L,fetch:L.fetch??$.fetch??globalThis.fetch,headers:D$($.headers,L.headers),serializedBody:void 0};if(M.security)await V1(M);if(M.requestValidator)await M.requestValidator(M);if(M.body!==void 0&&M.bodySerializer)M.serializedBody=M.bodySerializer(M.body);if(M.body===void 0||M.serializedBody==="")M.headers.delete("Content-Type");let D=M,K=T$(D);return{opts:D,url:K}},W=async(L)=>{let M=L.throwOnError??$.throwOnError,D=L.responseStyle??$.responseStyle,K,j;try{let{opts:U,url:B}=await V(L),I={redirect:"follow",...U,body:_$(U)};K=new Request(B,I);for(let S of G.request.fns)if(S)K=await S(K,U);let F=U.fetch;j=await F(K);for(let S of G.response.fns)if(S)j=await S(j,K,U);let P={request:K,response:j};if(j.ok){let S=(U.parseAs==="auto"?W1(j.headers.get("Content-Type")):U.parseAs)??"json";if(j.status===204||j.headers.get("Content-Length")==="0"){let x;switch(S){case"arrayBuffer":case"blob":case"text":x=await j[S]();break;case"formData":x=new FormData;break;case"stream":x=j.body;break;case"json":default:x={};break}return U.responseStyle==="data"?x:{data:x,...P}}let T;switch(S){case"arrayBuffer":case"blob":case"formData":case"text":T=await j[S]();break;case"json":{let x=await j.text();T=x?JSON.parse(x):{};break}case"stream":return U.responseStyle==="data"?j.body:{data:j.body,...P}}if(S==="json"){if(U.responseValidator)await U.responseValidator(T);if(U.responseTransformer)T=await U.responseTransformer(T)}return U.responseStyle==="data"?T:{data:T,...P}}let b=await j.text(),R$;try{R$=JSON.parse(b)}catch{}throw R$??b}catch(U){let B=U;for(let I of G.error.fns)if(I)B=await I(B,j,K,L);if(B=B||{},M)throw B;return D==="data"?void 0:{error:B,request:K,response:j}}},z=(L)=>(M)=>W({...M,method:L}),O=(L)=>async(M)=>{let{opts:D,url:K}=await V(M);return X1({...D,body:D.body,method:L,onRequest:async(j,U)=>{let B=new Request(j,U);for(let I of G.request.fns)if(I)B=await I(B,D);return B},serializedBody:_$(D),url:K})};return{buildUrl:(L)=>T$({...$,...L}),connect:z("CONNECT"),delete:z("DELETE"),get:z("GET"),getConfig:X,head:z("HEAD"),interceptors:G,options:z("OPTIONS"),patch:z("PATCH"),post:z("POST"),put:z("PUT"),request:W,setConfig:J,sse:{connect:O("CONNECT"),delete:O("DELETE"),get:O("GET"),head:O("HEAD"),options:O("OPTIONS"),patch:O("PATCH"),post:O("POST"),put:O("PUT"),trace:O("TRACE")},trace:z("TRACE")}};var vZ={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},yZ=Object.entries(vZ),O1=(Z,$)=>{if(!$)$=new Map;for(let X of Z)if("in"in X){if(X.key)$.set(X.key,{in:X.in,map:X.map})}else if("key"in X)$.set(X.key,{map:X.map});else if(X.args)O1(X.args,$);return $},cZ=(Z)=>{for(let[$,X]of Object.entries(Z))if(X&&typeof X==="object"&&!Array.isArray(X)&&!Object.keys(X).length)delete Z[$]},Y=(Z,$)=>{let X={body:Object.create(null),headers:Object.create(null),path:Object.create(null),query:Object.create(null)},J=O1($),G;for(let[V,W]of Z.entries()){if($[V])G=$[V];if(!G)continue;if("in"in G)if(G.key){let z=J.get(G.key),O=z.map||G.key;if(z.in)X[z.in][O]=W}else X.body=W;else for(let[z,O]of Object.entries(W??{})){let Q=J.get(z);if(Q)if(Q.in){let L=Q.map||z;X[Q.in][L]=O}else X[Q.map]=O;else{let L=yZ.find(([M])=>z.startsWith(M));if(L){let[M,D]=L;X[D][z.slice(M.length)]=O}else if("allowExtra"in G&&G.allowExtra){for(let[M,D]of Object.entries(G.allowExtra))if(D){X[M][z]=O;break}}}}}return cZ(X),X};var D1=a(o({baseUrl:"http://localhost:4096"}));class N{client;constructor(Z){this.client=Z?.client??D1}}class L1{defaultKey="default";instances=new Map;get(Z){let $=this.instances.get(Z??this.defaultKey);if(!$)throw Error('No SDK client found. Create one with "new QitQodeClient()" to fix this error.');return $}set(Z,$){this.instances.set($??this.defaultKey,Z)}}class Q1 extends N{get(Z){return(Z?.client??this.client).get({url:"/global/config",...Z})}update(Z,$){let X=Y([Z],[{args:[{key:"config",map:"body"}]}]);return($?.client??this.client).patch({url:"/global/config",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}}class M1 extends N{scan(Z){return(Z?.client??this.client).get({url:"/global/import/scan",...Z})}run(Z,$){let X=Y([Z],[{args:[{in:"body",key:"sources"},{in:"body",key:"force"}]}]);return($?.client??this.client).post({url:"/global/import/run",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}}class K1 extends N{health(Z){return(Z?.client??this.client).get({url:"/global/health",...Z})}event(Z){return(Z?.client??this.client).sse.get({url:"/global/event",...Z})}dispose(Z){return(Z?.client??this.client).post({url:"/global/dispose",...Z})}upgrade(Z,$){let X=Y([Z],[{args:[{in:"body",key:"target"}]}]);return($?.client??this.client).post({url:"/global/upgrade",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}_config;get config(){return this._config??=new Q1({client:this.client})}_import;get import(){return this._import??=new M1({client:this.client})}}class N1 extends N{remove(Z,$){let X=Y([Z],[{args:[{in:"path",key:"providerID"}]}]);return($?.client??this.client).delete({url:"/auth/{providerID}",...$,...X})}set(Z,$){let X=Y([Z],[{args:[{in:"path",key:"providerID"},{key:"auth",map:"body"}]}]);return($?.client??this.client).put({url:"/auth/{providerID}",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}}class j1 extends N{log(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"service"},{in:"body",key:"level"},{in:"body",key:"message"},{in:"body",key:"extra"}]}]);return($?.client??this.client).post({url:"/log",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}agents(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/agent",...$,...X})}skills(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/skill",...$,...X})}}class U1 extends N{list(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/experimental/workspace/adaptor",...$,...X})}}class B1 extends N{list(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/experimental/workspace",...$,...X})}create(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"id"},{in:"body",key:"type"},{in:"body",key:"branch"},{in:"body",key:"extra"}]}]);return($?.client??this.client).post({url:"/experimental/workspace",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}status(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/experimental/workspace/status",...$,...X})}remove(Z,$){let X=Y([Z],[{args:[{in:"path",key:"id"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).delete({url:"/experimental/workspace/{id}",...$,...X})}sessionRestore(Z,$){let X=Y([Z],[{args:[{in:"path",key:"id"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"sessionID"}]}]);return($?.client??this.client).post({url:"/experimental/workspace/{id}/session-restore",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}_adaptor;get adaptor(){return this._adaptor??=new U1({client:this.client})}}class I1 extends N{get(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/experimental/console",...$,...X})}listOrgs(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/experimental/console/orgs",...$,...X})}switchOrg(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"accountID"},{in:"body",key:"orgID"}]}]);return($?.client??this.client).post({url:"/experimental/console/switch",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}}class S1 extends N{list(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"roots"},{in:"query",key:"start"},{in:"query",key:"cursor"},{in:"query",key:"search"},{in:"query",key:"limit"},{in:"query",key:"archived"}]}]);return($?.client??this.client).get({url:"/experimental/session",...$,...X})}}class x1 extends N{list(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/experimental/resource",...$,...X})}}class R1 extends N{_workspace;get workspace(){return this._workspace??=new B1({client:this.client})}_console;get console(){return this._console??=new I1({client:this.client})}_session;get session(){return this._session??=new S1({client:this.client})}_resource;get resource(){return this._resource??=new x1({client:this.client})}}class _1 extends N{list(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/project",...$,...X})}current(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/project/current",...$,...X})}initGit(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/project/git/init",...$,...X})}update(Z,$){let X=Y([Z],[{args:[{in:"path",key:"projectID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"name"},{in:"body",key:"icon"},{in:"body",key:"commands"}]}]);return($?.client??this.client).patch({url:"/project/{projectID}",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}}class q1 extends N{list(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/pty",...$,...X})}create(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"command"},{in:"body",key:"args"},{in:"body",key:"cwd"},{in:"body",key:"title"},{in:"body",key:"env"}]}]);return($?.client??this.client).post({url:"/pty",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}remove(Z,$){let X=Y([Z],[{args:[{in:"path",key:"ptyID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).delete({url:"/pty/{ptyID}",...$,...X})}get(Z,$){let X=Y([Z],[{args:[{in:"path",key:"ptyID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/pty/{ptyID}",...$,...X})}update(Z,$){let X=Y([Z],[{args:[{in:"path",key:"ptyID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"title"},{in:"body",key:"size"}]}]);return($?.client??this.client).put({url:"/pty/{ptyID}",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}connectToken(Z,$){let X=Y([Z],[{args:[{in:"path",key:"ptyID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/pty/{ptyID}/connect-token",...$,...X})}connect(Z,$){let X=Y([Z],[{args:[{in:"path",key:"ptyID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/pty/{ptyID}/connect",...$,...X})}}class T1 extends N{get(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/config",...$,...X})}update(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"config",map:"body"}]}]);return($?.client??this.client).patch({url:"/config",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}providers(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/config/providers",...$,...X})}}class w1 extends N{ids(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/experimental/tool/ids",...$,...X})}list(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"provider"},{in:"query",key:"model"}]}]);return($?.client??this.client).get({url:"/experimental/tool",...$,...X})}}class F1 extends N{remove(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"worktreeRemoveInput",map:"body"}]}]);return($?.client??this.client).delete({url:"/experimental/worktree",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}list(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/experimental/worktree",...$,...X})}create(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"worktreeCreateInput",map:"body"}]}]);return($?.client??this.client).post({url:"/experimental/worktree",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}reset(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"worktreeResetInput",map:"body"}]}]);return($?.client??this.client).post({url:"/experimental/worktree/reset",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}}class H1 extends N{list(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"roots"},{in:"query",key:"start"},{in:"query",key:"search"},{in:"query",key:"limit"}]}]);return($?.client??this.client).get({url:"/session",...$,...X})}create(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"parentID"},{in:"body",key:"contextFrom"},{in:"body",key:"contextWatermark"},{in:"body",key:"title"},{in:"body",key:"permission"},{in:"body",key:"workspaceID"}]}]);return($?.client??this.client).post({url:"/session",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}status(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/session/status",...$,...X})}delete(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).delete({url:"/session/{sessionID}",...$,...X})}get(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/session/{sessionID}",...$,...X})}update(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"title"},{in:"body",key:"permission"},{in:"body",key:"time"}]}]);return($?.client??this.client).patch({url:"/session/{sessionID}",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}children(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/session/{sessionID}/children",...$,...X})}init(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"modelID"},{in:"body",key:"providerID"},{in:"body",key:"messageID"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/init",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}fork(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"messageID"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/fork",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}abort(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/abort",...$,...X})}actors(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/session/{sessionID}/actors",...$,...X})}todo(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/session/{sessionID}/todo",...$,...X})}task(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/session/{sessionID}/task",...$,...X})}unshare(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).delete({url:"/session/{sessionID}/share",...$,...X})}share(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/share",...$,...X})}diff(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"messageID"}]}]);return($?.client??this.client).get({url:"/session/{sessionID}/diff",...$,...X})}summarize(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"providerID"},{in:"body",key:"modelID"},{in:"body",key:"auto"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/summarize",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}revert(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"messageID"},{in:"body",key:"partID"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/revert",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}unrevert(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/unrevert",...$,...X})}messages(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"limit"},{in:"query",key:"before"},{in:"query",key:"agent_id"}]}]);return($?.client??this.client).get({url:"/session/{sessionID}/message",...$,...X})}prompt(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"messageID"},{in:"body",key:"model"},{in:"body",key:"modelRef"},{in:"body",key:"agent"},{in:"body",key:"agentID"},{in:"body",key:"task_id"},{in:"body",key:"source"},{in:"body",key:"provenance"},{in:"body",key:"noReply"},{in:"body",key:"tools"},{in:"body",key:"format"},{in:"body",key:"system"},{in:"body",key:"variant"},{in:"body",key:"parts"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/message",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}deleteMessage(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"path",key:"messageID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).delete({url:"/session/{sessionID}/message/{messageID}",...$,...X})}message(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"path",key:"messageID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/session/{sessionID}/message/{messageID}",...$,...X})}promptAsync(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"messageID"},{in:"body",key:"model"},{in:"body",key:"modelRef"},{in:"body",key:"agent"},{in:"body",key:"agentID"},{in:"body",key:"task_id"},{in:"body",key:"source"},{in:"body",key:"provenance"},{in:"body",key:"noReply"},{in:"body",key:"tools"},{in:"body",key:"format"},{in:"body",key:"system"},{in:"body",key:"variant"},{in:"body",key:"parts"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/prompt_async",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}command(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"messageID"},{in:"body",key:"agent"},{in:"body",key:"model"},{in:"body",key:"arguments"},{in:"body",key:"command"},{in:"body",key:"variant"},{in:"body",key:"parts"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/command",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}predict(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/predict",...$,...X})}shell(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"messageID"},{in:"body",key:"agent"},{in:"body",key:"model"},{in:"body",key:"modelRef"},{in:"body",key:"command"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/shell",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}}class E1 extends N{delete(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"path",key:"messageID"},{in:"path",key:"partID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).delete({url:"/session/{sessionID}/message/{messageID}/part/{partID}",...$,...X})}update(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"path",key:"messageID"},{in:"path",key:"partID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"part",map:"body"}]}]);return($?.client??this.client).patch({url:"/session/{sessionID}/message/{messageID}/part/{partID}",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}}class A1 extends N{respond(Z,$){let X=Y([Z],[{args:[{in:"path",key:"sessionID"},{in:"path",key:"permissionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"response"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/permissions/{permissionID}",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}reply(Z,$){let X=Y([Z],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"reply"},{in:"body",key:"message"}]}]);return($?.client??this.client).post({url:"/permission/{requestID}/reply",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}list(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/permission",...$,...X})}}class P1 extends N{balance(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/qredits/balance",...$,...X})}}class k1 extends N{list(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"sessionID"}]}]);return($?.client??this.client).get({url:"/workflows",...$,...X})}resume(Z,$){let X=Y([Z],[{args:[{in:"path",key:"runID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/workflows/{runID}/resume",...$,...X})}}class g1 extends N{list(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/question",...$,...X})}neverAsk(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/question/never-ask",...$,...X})}setNeverAsk(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"enabled"}]}]);return($?.client??this.client).post({url:"/question/never-ask",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}reply(Z,$){let X=Y([Z],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"answers"}]}]);return($?.client??this.client).post({url:"/question/{requestID}/reply",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}reject(Z,$){let X=Y([Z],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/question/{requestID}/reject",...$,...X})}}class C1 extends N{list(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/bash-interactive",...$,...X})}reply(Z,$){let X=Y([Z],[{args:[{in:"path",key:"id"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"output"},{in:"body",key:"exitCode"}]}]);return($?.client??this.client).post({url:"/bash-interactive/{id}/reply",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}}class h1 extends N{_interactive;get interactive(){return this._interactive??=new C1({client:this.client})}}class b1 extends N{authorize(Z,$){let X=Y([Z],[{args:[{in:"path",key:"providerID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"method"},{in:"body",key:"inputs"}]}]);return($?.client??this.client).post({url:"/provider/{providerID}/oauth/authorize",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}callback(Z,$){let X=Y([Z],[{args:[{in:"path",key:"providerID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"method"},{in:"body",key:"code"}]}]);return($?.client??this.client).post({url:"/provider/{providerID}/oauth/callback",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}}class f1 extends N{list(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/provider",...$,...X})}auth(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/provider/auth",...$,...X})}_oauth;get oauth(){return this._oauth??=new b1({client:this.client})}}class v1 extends N{list(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"body",map:"body"}]}]);return($?.client??this.client).post({url:"/sync/history",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}}class y1 extends N{start(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/sync/start",...$,...X})}replay(Z,$){let X=Y([Z],[{args:[{in:"query",key:"query_directory",map:"directory"},{in:"query",key:"workspace"},{in:"body",key:"body_directory",map:"directory"},{in:"body",key:"events"}]}]);return($?.client??this.client).post({url:"/sync/replay",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}_history;get history(){return this._history??=new v1({client:this.client})}}class c1 extends N{text(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"pattern"}]}]);return($?.client??this.client).get({url:"/find",...$,...X})}files(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"query"},{in:"query",key:"dirs"},{in:"query",key:"type"},{in:"query",key:"limit"}]}]);return($?.client??this.client).get({url:"/find/file",...$,...X})}symbols(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"query"}]}]);return($?.client??this.client).get({url:"/find/symbol",...$,...X})}}class u1 extends N{list(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"path"}]}]);return($?.client??this.client).get({url:"/file",...$,...X})}read(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"path"}]}]);return($?.client??this.client).get({url:"/file/content",...$,...X})}status(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/file/status",...$,...X})}}class d1 extends N{subscribe(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).sse.get({url:"/event",...$,...X})}}class m1 extends N{remove(Z,$){let X=Y([Z],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).delete({url:"/mcp/{name}/auth",...$,...X})}start(Z,$){let X=Y([Z],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/mcp/{name}/auth",...$,...X})}callback(Z,$){let X=Y([Z],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"code"}]}]);return($?.client??this.client).post({url:"/mcp/{name}/auth/callback",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}authenticate(Z,$){let X=Y([Z],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/mcp/{name}/auth/authenticate",...$,...X})}}class l1 extends N{status(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/mcp",...$,...X})}add(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"name"},{in:"body",key:"config"}]}]);return($?.client??this.client).post({url:"/mcp",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}connect(Z,$){let X=Y([Z],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/mcp/{name}/connect",...$,...X})}disconnect(Z,$){let X=Y([Z],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/mcp/{name}/disconnect",...$,...X})}_auth;get auth(){return this._auth??=new m1({client:this.client})}}class p1 extends N{next(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/tui/control/next",...$,...X})}response(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"body",map:"body"}]}]);return($?.client??this.client).post({url:"/tui/control/response",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}}class i1 extends N{appendPrompt(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"text"}]}]);return($?.client??this.client).post({url:"/tui/append-prompt",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}openHelp(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/tui/open-help",...$,...X})}openSessions(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/tui/open-sessions",...$,...X})}openThemes(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/tui/open-themes",...$,...X})}openModels(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/tui/open-models",...$,...X})}submitPrompt(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/tui/submit-prompt",...$,...X})}clearPrompt(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/tui/clear-prompt",...$,...X})}executeCommand(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"command"}]}]);return($?.client??this.client).post({url:"/tui/execute-command",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}showToast(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"title"},{in:"body",key:"message"},{in:"body",key:"variant"},{in:"body",key:"duration"}]}]);return($?.client??this.client).post({url:"/tui/show-toast",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}publish(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"body",map:"body"}]}]);return($?.client??this.client).post({url:"/tui/publish",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}selectSession(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"sessionID"}]}]);return($?.client??this.client).post({url:"/tui/select-session",...$,...X,headers:{"Content-Type":"application/json",...$?.headers,...X.headers}})}_control;get control(){return this._control??=new p1({client:this.client})}}class n1 extends N{dispose(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/instance/dispose",...$,...X})}}class r1 extends N{get(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/path",...$,...X})}}class s1 extends N{get(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/vcs",...$,...X})}diff(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"mode"}]}]);return($?.client??this.client).get({url:"/vcs/diff",...$,...X})}}class o1 extends N{list(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/command",...$,...X})}}class a1 extends N{status(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/lsp",...$,...X})}}class t1 extends N{status(Z,$){let X=Y([Z],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/formatter",...$,...X})}}class L$ extends N{static __registry=new L1;constructor(Z){super(Z);L$.__registry.set(this,Z?.key)}_global;get global(){return this._global??=new K1({client:this.client})}_auth;get auth(){return this._auth??=new N1({client:this.client})}_app;get app(){return this._app??=new j1({client:this.client})}_experimental;get experimental(){return this._experimental??=new R1({client:this.client})}_project;get project(){return this._project??=new _1({client:this.client})}_pty;get pty(){return this._pty??=new q1({client:this.client})}_config;get config(){return this._config??=new T1({client:this.client})}_tool;get tool(){return this._tool??=new w1({client:this.client})}_worktree;get worktree(){return this._worktree??=new F1({client:this.client})}_session;get session(){return this._session??=new H1({client:this.client})}_part;get part(){return this._part??=new E1({client:this.client})}_permission;get permission(){return this._permission??=new A1({client:this.client})}_qredits;get qredits(){return this._qredits??=new P1({client:this.client})}_workflow;get workflow(){return this._workflow??=new k1({client:this.client})}_question;get question(){return this._question??=new g1({client:this.client})}_bash;get bash(){return this._bash??=new h1({client:this.client})}_provider;get provider(){return this._provider??=new f1({client:this.client})}_sync;get sync(){return this._sync??=new y1({client:this.client})}_find;get find(){return this._find??=new c1({client:this.client})}_file;get file(){return this._file??=new u1({client:this.client})}_event;get event(){return this._event??=new d1({client:this.client})}_mcp;get mcp(){return this._mcp??=new l1({client:this.client})}_tui;get tui(){return this._tui??=new i1({client:this.client})}_instance;get instance(){return this._instance??=new n1({client:this.client})}_path;get path(){return this._path??=new r1({client:this.client})}_vcs;get vcs(){return this._vcs??=new s1({client:this.client})}_command;get command(){return this._command??=new o1({client:this.client})}_lsp;get lsp(){return this._lsp??=new a1({client:this.client})}_formatter;get formatter(){return this._formatter??=new t1({client:this.client})}}function e1(Z){if(!Z?.fetch)Z={...Z,fetch:(X)=>{return X.timeout=!1,fetch(X)}};if(Z?.directory)Z.headers={...Z.headers,"x-qitqode-directory":encodeURIComponent(Z.directory)};return Z}function uZ(Z,$,X){if(!Z)return;if(!$)return Z;if(Z===$)return $;if(X&&Z===X($))return $;return Z}function dZ(Z,$){if(Z.method!=="GET"&&Z.method!=="HEAD")return Z;let X=new URL(Z.url),J=!1;for(let[V,W]of[["x-qitqode-directory","directory"],["x-qitqode-workspace","workspace"]]){let z=uZ(Z.headers.get(V),W==="directory"?$.directory:$.workspace,W==="directory"?encodeURIComponent:void 0);if(!z)continue;if(!X.searchParams.has(W))X.searchParams.set(W,z);J=!0}if(!J)return Z;let G=new Request(X,Z);return G.headers.delete("x-qitqode-directory"),G.headers.delete("x-qitqode-workspace"),G}function mZ(Z){if(Z=e1(Z),Z?.experimental_workspaceID)Z.headers={...Z.headers,"x-qitqode-workspace":Z.experimental_workspaceID};let $=a(Z);return $.interceptors.request.use((X)=>dZ(X,{directory:Z?.directory,workspace:Z?.experimental_workspaceID})),$.interceptors.response.use((X)=>{if(X.headers.get("content-type")==="text/html")throw Error("Request is not supported by this version of QitQode Server (Server responded with text/html)");return X}),new L$({client:$})}class k extends Error{name="BackendCallError";status;fn;metadata;constructor(Z,$,X,J){let G=J?[J.requestId&&`requestId=${J.requestId}`,J.contentType&&`contentType=${J.contentType}`,J.contentEncoding&&`contentEncoding=${J.contentEncoding}`,J.contentLength!==void 0&&`contentLength=${J.contentLength}`,`bodyUsed=${J.bodyUsed}`,J.bodyBytes!==void 0&&`bodyBytes=${J.bodyBytes}`].filter(Boolean).join(" "):"";super(`backend function call failed (${Z}): ${$}${X?` ${X}`:""}${G?` [${G}]`:""}`);this.status=Z,this.fn=$,this.metadata=J}}class Q$ extends Error{name="BackendAuthError";status;constructor(Z,$){super(`backend authentication rejected (${Z})${$?`: ${$}`:""}`);this.status=Z}}function lZ(Z){if(!Z)return!1;try{let $=JSON.parse(Z);if($&&$.code==="ERR_GATEWAY_REQUIRED")return!0}catch{}return Z.includes("ERR_GATEWAY_REQUIRED")}function pZ(Z){let $=Z.headers.get("x-request-id"),X=Z.headers.get("content-type"),J=Z.headers.get("content-encoding"),G=Z.headers.get("content-length"),V=X&&X.length<=80?X.toLowerCase():void 0,W=J&&J.length<=16?J.toLowerCase():void 0;return{...$&&/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/.test($)?{requestId:$}:{},...V&&/^(application\/json|application\/problem\+json|text\/plain|text\/html|application\/octet-stream)(?:; ?charset=utf-8)?$/.test(V)?{contentType:V.split(";")[0]}:{},...W&&/^(identity|gzip|deflate|br|zstd)$/.test(W)?{contentEncoding:W}:{},...G&&G.length<=16&&/^(0|[1-9][0-9]*)$/.test(G)&&Number.isSafeInteger(Number(G))?{contentLength:Number(G)}:{},bodyUsed:Z.bodyUsed}}function $Z(Z){let $=Z.fetch??fetch,X=Z.baseUrl.replace(/\/+$/,"");async function J(G,V={}){let W=new Headers(Z.headers);if(W.set("content-type","application/json"),!W.has("accept-encoding"))W.set("accept-encoding","identity");let z=JSON.stringify(V),O=0;for(;;){let Q=await $(`${X}/${G}`,{method:"POST",headers:W,body:z});if(!Q.ok){let j=await Q.text().catch(()=>"");if((Q.status===401||Q.status===403)&&!lZ(j))throw new Q$(Q.status,j||void 0);throw new k(Q.status,G,j||void 0)}let L=pZ(Q),M;try{let j=await Q.arrayBuffer();L.bodyBytes=j.byteLength,M=new TextDecoder().decode(j)}catch{throw new k(Q.status,G,"could not read response body",L)}if(!M.trim()){if(O++<2)continue;throw new k(Q.status,G,"received an empty response body",L)}let D;try{D=JSON.parse(M)}catch{throw new k(Q.status,G,"received an invalid JSON response body",L)}if(!D||typeof D!=="object"||typeof D.success!=="boolean")throw new k(Q.status,G,"received an invalid response envelope",L);let K=D;if(!K.success)throw Error(`backend function call returned failure: ${G} \u2014 ${K.error??"unknown error"}`);return K.data}}return{promptNames:()=>J("promptNames"),prompt:(G)=>J("prompt",{name:G}),tiers:()=>J("tiers"),workflowSummaries:()=>J("workflowSummaries"),workflowSpec:(G)=>J("workflowSpec",{name:G}),workflowSpecs:()=>J("workflowSpecs"),bashArity:()=>J("bashArity"),toolManifest:()=>J("toolManifest"),toolDescription:(G)=>J("toolDescription",{id:G})}}var oZ=rZ(sZ(),1);import V0 from"path";import z0 from"crypto";var g={};XZ(g,{setKeySequenceForTest:()=>G0,setKeyForTest:()=>J0,resetForTest:()=>X0,isEnvelope:()=>eZ,encryptionKey:()=>Z0,encrypt:()=>Y0,decrypt:()=>W0,AuthKeyring:()=>g});import M$ from"crypto";import{execFile as tZ}from"child_process";var d="qitqode",t="auth-encryption-key",JZ="__qitqode_encrypted__";function eZ(Z){return typeof Z==="object"&&Z!==null&&Z[JZ]===1&&Z.alg==="aes-256-gcm"}function m(Z,$,X){return new Promise((J)=>{let G=tZ(Z,$,{timeout:5000},(V,W)=>{let z=V?V.code??1:0;J({code:typeof z==="number"?z:1,stdout:W??""})});if(X!==void 0)G.stdin?.write(X),G.stdin?.end()})}async function ZZ(Z,$){return(await m(Z,$)).code===0}async function $0(){if(process.env.QITQODE_DISABLE_KEYRING)return;if(process.platform==="darwin"){if(!await ZZ("security",["help"]))return;return{async get(){let Z=await m("security",["find-generic-password","-s",d,"-a",t,"-w"]);return Z.code===0?Z.stdout.trim():void 0},async set(Z){return(await m("security",["add-generic-password","-U","-s",d,"-a",t,"-w",Z])).code===0}}}if(process.platform==="linux"){if(!await ZZ("secret-tool",["search","service",d])){let Z=await m("secret-tool",["lookup","service",d,"account",t]);if(Z.code!==0&&Z.code!==1)return}return{async get(){let Z=await m("secret-tool",["lookup","service",d,"account",t]);return Z.code===0&&Z.stdout.trim()?Z.stdout.trim():void 0},async set(Z){return(await m("secret-tool",["store","--label","QitQode auth encryption key","service",d,"account",t],Z)).code===0}}}return}var K$,l;function Z0(){if(l!==void 0&&l.length>0)return Promise.resolve(l.shift());return K$??=(async()=>{let Z=await $0();if(!Z)return;let $=await Z.get();if($){let X=Buffer.from($,"base64");if(X.length===32)return X;return}return v.withLock("auth-keyring-init",async()=>{let X=await Z.get();if(X){let W=Buffer.from(X,"base64");return W.length===32?W:void 0}let J=M$.randomBytes(32);if(!await Z.set(J.toString("base64")))return;let G=await Z.get();if(!G)return;let V=Buffer.from(G,"base64");return V.length===32?V:void 0})})(),K$}function X0(){K$=void 0,l=void 0}function J0(Z){K$=Promise.resolve(Z),l=void 0}function G0(Z){l=[...Z]}function Y0(Z,$){let X=M$.randomBytes(12),J=M$.createCipheriv("aes-256-gcm",$,X),G=Buffer.concat([J.update(Z,"utf8"),J.final()]);return{[JZ]:1,alg:"aes-256-gcm",iv:X.toString("base64"),tag:J.getAuthTag().toString("base64"),data:G.toString("base64")}}function W0(Z,$){let X=M$.createDecipheriv("aes-256-gcm",$,Buffer.from(Z.iv,"base64"));return X.setAuthTag(Buffer.from(Z.tag,"base64")),Buffer.concat([X.update(Buffer.from(Z.data,"base64")),X.final()]).toString("utf8")}var O0="The server rejected QITQODE_KEY and there is no signed-in Forgewise session on this machine to repair it with. Replace QITQODE_KEY, or run `qitqode auth login`.",F$=`[qitqode] ${O0}`,p="forgewise";function N$(Z){if(Z?.type!=="api"||typeof Z.key!=="string")return;let X=Z.metadata?.method==="api-key"?"api-key":"sso";return{key:Z.key,method:X}}function A(Z){if(!Z)return"none";return z0.createHash("sha256").update(`${Z.method}:${Z.key}`).digest("hex").slice(0,16)}var j$;function WZ(Z){j$=Z}async function U$(){let{readFile:Z}=await import("fs/promises"),$=JSON.parse(await Z(VZ(),"utf8"));if(!g.isEnvelope($))return{data:$,key:void 0};let X=await g.encryptionKey();if(!X)throw Error("auth.json is encrypted but the OS keyring is unavailable");return{data:JSON.parse(g.decrypt($,X)),key:X}}async function H$(Z){let{writeFile:$,chmod:X,rename:J}=await import("fs/promises"),G=Z.key?g.encrypt(JSON.stringify(Z.data),Z.key):Z.data,V=VZ(),W=V+".tmp";await $(W,JSON.stringify(G,null,2),"utf8"),await X(W,384),await J(W,V)}function VZ(){return V0.join(YZ.Path.data,"auth.json")}async function i(){if(j$)return j$;if(process.env.QITQODE_KEY)return{key:process.env.QITQODE_KEY,method:"api-key"};try{let Z=await v.withLock("auth-file",async()=>{let{data:$}=await U$();return N$($?.[p])});if(Z)return Z}catch{}if(process.env.QITQODE_AUTH_CONTENT)try{let Z=JSON.parse(process.env.QITQODE_AUTH_CONTENT);return N$(Z?.forgewise)}catch{}return}async function B$(){if(j$=void 0,process.env.QITQODE_KEY)return;await v.withLock("auth-file",async()=>{let Z=await U$();if(!(p in Z.data))return;delete Z.data[p],await H$(Z)})}function e(Z){return Z.method==="api-key"?{"x-api-key":Z.key}:{authorization:`Bearer ${Z.key}`}}var I$=C.create({service:"auth.forgewise.checkout"}),D0="qitqode",L0=5000;async function E$(Z){let X=`${new URL(R.QITQODE_BACKEND_URL).origin}/auth/keys/checkout`;try{let J=await fetch(X,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${Z}`},body:JSON.stringify({app:D0}),signal:AbortSignal.timeout(L0)});if(!J.ok)return I$.warn("API key checkout returned non-200; falling back to Bearer credential",{status:J.status,url:X}),null;let G=await J.json();if(typeof G?.key!=="string"||!G.key)return I$.warn("API key checkout response missing key field; falling back to Bearer credential",{url:X}),null;return I$.info("API key checkout succeeded; credential upgraded to api-key method",{url:X}),G.key}catch(J){return I$.warn("API key checkout failed; falling back to Bearer credential",{url:X,error:J instanceof Error?J.message:String(J)}),null}}var o$={};XZ(o$,{toolDescriptionEffect:()=>T0,resolveWorkflowSummaries:()=>R0,resolveWorkflowSpec:()=>_0,resolveToolManifest:()=>SZ,resolveToolDescription:()=>xZ,resolveTierRatings:()=>k0,resolveSubmitBatch:()=>d0,resolveRetrieveBatch:()=>m0,resolvePrompt:()=>UZ,resolveListTiers:()=>P0,resolveGetHistory:()=>h0,resolveGenerateInlineComments:()=>y0,resolveGenerateDocumentation:()=>v0,resolveForgewiseConfig:()=>s$,resolveFetchQreditsBalance:()=>b0,resolveCompressTrajectorySafe:()=>g0,resolveChatCompletion:()=>u0,resolveChatBoolean:()=>c0,resolveBraveSearch:()=>C0,resolveBashArity:()=>q0,resolveAnalyzeCodeForIssues:()=>f0,resolveAgentPrompt:()=>S0,remoteStats:()=>H,parseSseChatCompletion:()=>RZ,normalizeChatCompletionPayload:()=>_Z,isBackendBillingError:()=>j0,clearRemoteCache:()=>I0,beginIdempotentAttempt:()=>jZ,BackendRemote:()=>o$,BackendRateLimitError:()=>Y$,BackendInsufficientBalanceError:()=>G$,BackendAuthRejectedError:()=>s,BackendAccountNotLinkedError:()=>l$});import{createHash as NZ,randomUUID as KZ}from"crypto";import A$ from"crypto";class q extends Error{cause;constructor(Z,$){super(Z);this.name="ForgewiseError",this.cause=$}}class n extends q{constructor(Z="Device flow is not supported by this issuer."){super(Z);this.name="DeviceFlowUnsupportedError"}}function zZ(Z,$,X){if(Z>=200&&Z<300)return{kind:"success"};let J=$?.error??"";if(J==="authorization_pending")return{kind:"wait",intervalMs:X};if(J==="slow_down")return{kind:"wait",intervalMs:X+5000};if(J==="access_denied")return{kind:"fatal",message:"Sign-in was denied in the browser."};if(J==="expired_token")return{kind:"fatal",message:"The sign-in code expired before it was approved. Try again."};return{kind:"fatal",message:`Device sign-in failed: ${$?.error_description||J||`HTTP ${Z}`}`}}var DZ="openid profile email",P$=(Z)=>Z.toString("base64url");function U9(){let Z=P$(A$.randomBytes(32)),$=P$(A$.createHash("sha256").update(Z).digest()),X=P$(A$.randomBytes(16));return{verifier:Z,challenge:$,state:X}}function B9(Z){let $=new URL(`${Z.issuer}/api/oauth/authorize`);return $.searchParams.set("response_type","code"),$.searchParams.set("client_id",Z.clientId),$.searchParams.set("redirect_uri",Z.redirectUri),$.searchParams.set("scope",DZ),$.searchParams.set("state",Z.state),$.searchParams.set("code_challenge",Z.challenge),$.searchParams.set("code_challenge_method","S256"),$.toString()}async function k$(Z,$){let X=await fetch(`${Z}/api/oauth/userinfo`,{headers:{Authorization:`Bearer ${$.access_token}`}});if(!X.ok)throw new q(`Failed to fetch user profile (${X.status})`);let J=await X.json();if(!J.sub)throw new q("Userinfo response is missing required 'sub' field \u2014 the server returned an invalid user profile.");return{sub:J.sub,name:J.name??"",email:J.email??"",access_token:$.access_token,expires_at:Date.now()+($.expires_in??3600)*1000,...$.refresh_token?{refresh_token:$.refresh_token}:{}}}async function I9(Z){let $=await fetch(`${Z.issuer}/api/oauth/token`,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"authorization_code",code:Z.code,redirect_uri:Z.redirectUri,client_id:Z.clientId,code_verifier:Z.verifier}).toString(),signal:Z.signal??null});if(!$.ok){let J=await $.text().catch(()=>"");throw new q(`Token exchange failed (${$.status}): ${J}`)}let X=await $.json();return k$(Z.issuer,X)}async function S9(Z,$,X=5000){let J=new AbortController,G=setTimeout(()=>J.abort(),X);try{let V=await fetch(`${Z}/api/oauth/userinfo`,{headers:{Authorization:`Bearer ${$}`},signal:J.signal});if(V.status===401||V.status===403)return!1;if(!V.ok)return null;return!0}catch{return null}finally{clearTimeout(G)}}async function g$(Z){let{issuer:$,clientId:X}=await OZ(),J;try{J=await fetch(`${$}/api/oauth/token`,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"refresh_token",client_id:X,refresh_token:Z}).toString()})}catch(V){throw new q(`Could not reach the sign-in server to refresh the session: ${V instanceof Error?V.message:String(V)}`,V)}if(!J.ok){let V=await J.json().catch(()=>{return});if(V?.error==="invalid_grant")return"invalid_grant";throw new q(`Token refresh failed (${J.status}): ${V?.error??""}`)}let G=await J.json();return{issuer:$,...G}}async function x9(Z){let $=await g$(Z);if($==="invalid_grant")return"invalid_grant";return k$($.issuer,$)}async function R9(Z){let $;try{$=await fetch(`${Z.issuer}/api/oauth/device_authorization`,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:Z.clientId,scope:DZ}).toString(),signal:Z.signal??null})}catch{if(Z.signal?.aborted)throw new q("Login cancelled");throw new n}if($.status===404||$.status===405||$.status===501)throw new n;if(!$.ok){let J=await $.text().catch(()=>"");throw new q(`Device authorization failed (${$.status}): ${J}`)}let X;try{X=await $.json()}catch{throw new n}if(!X.device_code||!X.user_code||!X.verification_uri)throw new n;return{deviceCode:X.device_code,info:{userCode:X.user_code,verificationUri:X.verification_uri,verificationUriComplete:X.verification_uri_complete,expiresAt:Date.now()+(X.expires_in??900)*1000},intervalMs:Math.max(1,X.interval??5)*1000}}async function _9(Z){let $;try{$=await fetch(`${Z.issuer}/api/oauth/token`,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:Z.deviceCode,client_id:Z.clientId}).toString(),signal:Z.signal??null})}catch{if(Z.signal?.aborted)throw new q("Login cancelled");return{kind:"wait",intervalMs:Z.currentIntervalMs}}let X;try{X=await $.json()}catch{X=void 0}let J=zZ($.status,X,Z.currentIntervalMs);if(J.kind==="success"){if(!X?.access_token)throw new q("Token endpoint returned success without an access_token.");return{kind:"success",profile:await k$(Z.issuer,{access_token:X.access_token,expires_in:X.expires_in})}}if(J.kind==="fatal")throw new q(J.message);return{kind:"wait",intervalMs:J.intervalMs}}function LZ(Z,$){let X={sub:Z.sub,name:Z.name,email:Z.email,expires_at:String(Z.expires_at),...$.rotateRefreshToken&&Z.refresh_token?{refresh_token:Z.refresh_token}:{}};return{type:"api",key:Z.access_token,metadata:X}}function C$(Z,$){return{type:"api",key:$,metadata:{method:"api-key",sub:Z.sub,name:Z.name,email:Z.email,access_token:Z.access_token,access_token_expires_at:String(Z.expires_at),...Z.refresh_token?{refresh_token:Z.refresh_token}:{}}}}var r=C.create({service:"auth.recovery"}),Q0=30000,M0=5,$$,Z$=0,b$=new Set;async function MZ(Z){if(b$.has(A(Z)))return{kind:"definitive",reason:"the stored sign-in has already been established as no longer valid"};if($$)return $$;if(Z$>=M0)return r.warn("recovery budget exhausted for this process; reporting inconclusive",{attempts:Z$}),{kind:"inconclusive",reason:`automatic sign-in repair was attempted ${Z$} times in this session without success`};return $$=K0(Z).finally(()=>{$$=void 0}),$$}function QZ(){Z$++}async function K0(Z){let $=A(Z),X=process.env.QITQODE_KEY,J=!!X&&Z?.key===X;r.info("attempting automatic credential recovery",{rejected:$,source:J?"env":"file",attempt:Z$});let G;try{G=await v.withLock("auth-file",()=>N0(Z,$,J))}catch(V){let W=V instanceof Error?V.message:String(V);return r.warn("credential recovery could not run",{error:W}),{kind:"inconclusive",reason:`automatic sign-in repair could not run (${W})`}}if(G.kind==="recovered"){if(J)WZ(G.credential);r.info("credential recovered",{from:$,to:A(G.credential),via:G.reason})}else if(G.kind==="definitive")await B$().catch(()=>{}),b$.add($),b$.add(A(void 0)),r.info("credential rejection is definitive; stored credential cleared",{reason:G.reason});return G}async function N0(Z,$,X){let J;try{J=await U$()}catch(D){if(D?.code==="ENOENT")return{kind:"definitive",reason:"no stored sign-in to repair"};let K=D instanceof Error?D.message:String(D);return r.warn("stored sign-in could not be read; treating the rejection as inconclusive",{error:K}),{kind:"inconclusive",reason:`the stored sign-in could not be read (${K})`}}let G=J.data[p],V=N$(G);if(!X&&V&&A(V)!==$)return{kind:"recovered",credential:V,reason:"adopted a credential rotated by another process"};let W=G?.metadata??{},z=(D)=>typeof D==="string"&&D?D:void 0,O=z(W.refresh_token),Q=z(W.access_token)??(V?.method==="sso"?V.key:void 0),L=Number(W.access_token_expires_at??W.expires_at??0),M={sub:z(W.sub)??"",name:z(W.name)??"",email:z(W.email)??""};if(Q&&Q!==Z?.key&&L>Date.now()+Q0){QZ();let D=await E$(Q);if(D){let K={...M,access_token:Q,expires_at:L,...O?{refresh_token:O}:{}};return await h$(J,C$(K,D)),{kind:"recovered",credential:{key:D,method:"api-key"},reason:"minted a key from the SSO session"}}}if(O){let D;try{QZ(),D=await g$(O)}catch(B){return{kind:"inconclusive",reason:`could not reach the sign-in server (${B instanceof Error?B.message:String(B)})`}}if(D==="invalid_grant")return{kind:"definitive",reason:"the stored sign-in was revoked or has expired"};let K={...M,access_token:D.access_token,expires_at:Date.now()+(D.expires_in??3600)*1000,...D.refresh_token?{refresh_token:D.refresh_token}:{}},j=LZ(K,{rotateRefreshToken:!0});await h$(J,j);let U=await E$(K.access_token);if(U)return await h$(J,C$(K,U)),{kind:"recovered",credential:{key:U,method:"api-key"},reason:"refreshed the sign-in and minted a new key"};return{kind:"recovered",credential:{key:K.access_token,method:"sso"},reason:"refreshed the sign-in"}}return{kind:"definitive",reason:"the stored sign-in has no session left to renew"}}async function h$(Z,$){Z.data[p]=$,await H$(Z)}var _=C.create({service:"backend.remote"}),S$=30000,m$=5000,h=new Map,H={failures:0,authRejections:0,missingPrompts:0,missingToolDescriptions:0},f$=new Set,v$=new Set;class s extends Error{name="BackendAuthRejectedError";constructor(Z){super(J$.copy().invalidCredentials(Z))}}class G$ extends Error{name="BackendInsufficientBalanceError";status=402;code;constructor(Z,$){super(J$.copy().insufficientBalance(Z));this.code=$}}class Y$ extends Error{name="BackendRateLimitError";status=429;retryAfterMs;constructor(Z,$){let X=Z!==void 0?` Retry in about ${Math.max(1,Math.round(Z/1000))}s.`:"";super(J$.copy().rateLimit+X+($?` (${$})`:""));this.retryAfterMs=Z}}class l$ extends Error{name="BackendAccountNotLinkedError";status=409;constructor(Z){super(J$.copy().accountNotLinked(Z))}}function j0(Z){return Z instanceof G$||Z instanceof Y$}var U0=600000,y=new Map;function B0(Z,$){try{return NZ("sha256").update(`${Z}\x00${JSON.stringify($)}`).digest("hex").slice(0,16)}catch{return"unscoped"}}function jZ(Z,$,X){let J=Date.now(),G;try{G=NZ("sha256").update(`${Z}\x00${$}\x00${JSON.stringify(X)??""}`).digest("hex")}catch{return{key:`${$}-${KZ()}`,settle:()=>{}}}let V=()=>y.delete(G),W=y.get(G);if(W&&W.expires>J)return{key:W.key,settle:V};if(y.size>256){for(let[O,Q]of y)if(Q.expires<=J)y.delete(O)}let z=`${$}-${G.slice(0,16)}-${KZ()}`;return y.set(G,{key:z,expires:J+U0}),{key:z,settle:V}}function I0(){h.clear(),u$.clear(),y$.clear(),f$.clear(),v$.clear(),y.clear()}async function p$(Z){H.authRejections++;let{credential:$,status:X,label:J,baseUrl:G}=Z;if(!Z.repairSpent){let V=A($),W=await MZ($);if(W.kind==="recovered"&&A(W.credential)!==V)return _.info("backend rejected the credential; repaired it automatically and retrying",{label:J,baseUrl:G,status:X,via:W.reason}),{retry:!0};if(W.kind==="inconclusive")return _.warn("backend rejected the credential but repair was inconclusive; leaving it in place",{label:J,baseUrl:G,status:X,reason:W.reason}),{retry:!1,error:Error(`Backend auth check could not complete: ${W.reason}`)}}if(await B$().catch(()=>{}),_.warn("backend rejected the credential and it could not be repaired; prompting re-auth",{label:J,baseUrl:G,status:X}),process.env.QITQODE_KEY)_.error(F$),console.error(F$);return{retry:!1,error:new s(`HTTP ${X}`)}}async function c(Z,$){let X=R.QITQODE_BACKEND_URL,J=Date.now(),G=`${X}::${Z}`,V=h.get(G);if(V&&V.expires>J)return V.value;let W=!1;for(;;)try{let z=await i(),O=z?e(z):void 0,L=await $($Z({baseUrl:X,headers:O,fetch:(M,D)=>fetch(M,{...D,signal:D?.signal??AbortSignal.timeout(m$)})}));return h.set(G,{value:L,expires:Date.now()+S$}),L}catch(z){if(z instanceof Q$){let O=await p$({credential:await i(),status:z.status,label:Z,baseUrl:X,repairSpent:W});if(W=!0,O.retry)continue;throw O.error}throw H.failures++,_.warn("backend request failed; surfacing error",{cacheKey:Z,baseUrl:X,error:z instanceof Error?z.message:String(z)}),z}}async function UZ(Z){if(Z.indexOf("/")<=0)return;return c(`prompt:${Z}`,($)=>$.prompt(Z).then((X)=>X??void 0))}async function S0(Z){let $=`agent/${Z}`,X=await UZ($);if(X===void 0||X===""){if(!f$.has(Z))f$.add(Z),H.missingPrompts++,_.warn("backend served no content for agent prompt; running with an empty prompt",{prompt:$,baseUrl:R.QITQODE_BACKEND_URL,missingPrompts:H.missingPrompts})}return X}var y$=new Map;function c$(Z){let $=y$.get(Z);if(!$)$={unsupported:!1},y$.set(Z,$);return $}async function x0(){let Z=c$(R.QITQODE_BACKEND_URL);if(Z.inFlight)return Z.inFlight;let $=c("workflow.catalog",(X)=>X.workflowSpecs().then((J)=>J??void 0)).then((X)=>{let J=new Map;for(let G of X??[])if(G&&typeof G.name==="string"&&typeof G.script==="string")J.set(G.name,G);return J});Z.inFlight=$;try{return await $}finally{if(Z.inFlight===$)Z.inFlight=void 0}}async function BZ(Z,$){let X=R.QITQODE_BACKEND_URL;if(!c$(X).unsupported)try{return Z(await x0())}catch(J){if(!IZ(J))throw J;c$(X).unsupported=!0,_.warn("backend has no workflowSpecs route; falling back to per-name workflow lookups",{baseUrl:X})}return $()}async function R0(){return BZ((Z)=>[...Z.values()].map(({script:$,...X})=>X),()=>c("workflow.list",(Z)=>Z.workflowSummaries()))}async function _0(Z){return BZ(($)=>$.get(Z),()=>c(`workflow.get:${Z}`,($)=>$.workflowSpec(Z).then((X)=>X??void 0)))}async function q0(){return c("permission.arity",(Z)=>Z.bashArity())}var u$=new Map;function d$(Z){let $=u$.get(Z);if(!$)$={unsupported:!1},u$.set(Z,$);return $}function IZ(Z){return Z instanceof k&&(Z.status===404||Z.status===501)}async function SZ(){let Z=d$(R.QITQODE_BACKEND_URL);if(Z.inFlight)return Z.inFlight;let $=c("tool.manifest",(X)=>X.toolManifest().then((J)=>J??void 0)).then((X)=>{let J=new Map;for(let G of X??[])if(G&&typeof G.id==="string"&&typeof G.description==="string")J.set(G.id,G.description);return J});Z.inFlight=$;try{return await $}finally{if(Z.inFlight===$)Z.inFlight=void 0}}async function xZ(Z){let $=R.QITQODE_BACKEND_URL,X;if(!d$($).unsupported)try{X=(await SZ()).get(Z)}catch(J){if(!IZ(J))throw J;d$($).unsupported=!0,_.warn("backend has no toolManifest route; falling back to one request per tool description",{baseUrl:$})}if(X===void 0||X==="")X=await c(`tool.description:${Z}`,(J)=>J.toolDescription(Z).then((G)=>G??void 0));if(X===void 0||X===""){if(!v$.has(Z))v$.add(Z),H.missingToolDescriptions++,_.warn("backend served no content for tool description; running with an empty description",{tool:Z,baseUrl:R.QITQODE_BACKEND_URL,missingToolDescriptions:H.missingToolDescriptions})}return X}function T0(Z){return X$.promise(()=>xZ(Z)).pipe(X$.catchDefect(($)=>$ instanceof s?X$.succeed(void 0):X$.die($)))}function w0(Z){if(!Z)return{};try{let $=JSON.parse(Z);if($&&typeof $==="object")return{code:typeof $.error==="string"?$.error:void 0,detail:typeof $.message==="string"?$.message:void 0}}catch{}return{detail:Z.slice(0,300)}}function F0(Z){let $=Z.headers?.get?.("retry-after-ms");if($){let J=Number.parseFloat($);if(!Number.isNaN(J))return J}let X=Z.headers?.get?.("retry-after");if(X){let J=Number.parseFloat(X);if(!Number.isNaN(J))return Math.ceil(J*1000);let G=Date.parse(X)-Date.now();if(!Number.isNaN(G)&&G>0)return Math.ceil(G)}return}async function i$(Z,$){let X=await Z.text().catch(()=>""),{code:J,detail:G}=w0(X);if(Z.status===402)return new G$(G,J);if(Z.status===409)return new l$(G);if(Z.status===429)return new Y$(F0(Z),G);let V=G?`: ${G}`:J?`: ${J}`:"";return Error(`${$} failed: ${Z.status}${V}`)}function H0(Z){if(Z===null||typeof Z!=="object")return Z;if(Z.data!==void 0)return Z.data;let $={};for(let[X,J]of Object.entries(Z)){if(X==="success"||X==="data"||X==="error"||X==="message")continue;$[X]=J}return Object.keys($).length>0?$:void 0}function n$(Z,$){let{error:X,message:J}=Z;if(X==="insufficient_balance")return new G$(J,X);if(X==="rate_limited"||X==="too_many_requests")return new Y$(void 0,J);return Error(`${$} returned failure: ${X??"unknown error"}${J?` \u2014 ${J}`:""}`)}function RZ(Z){let $="",X,J=!1;for(let G of Z.split(/\r?\n/)){if(!G.startsWith("data:"))continue;let V=G.slice(5).trim();if(!V)continue;if(V==="[DONE]"){J=!0;break}if(V.startsWith("[ERROR]"))throw Error(`chat completion stream error: ${V.slice(7).trim()||"unknown"}`);let W;try{W=JSON.parse(V)}catch{continue}if(W===null||typeof W!=="object")continue;let z=W,O=z.choices?.[0],Q=O?.delta?.content??O?.message?.content;if(typeof Q==="string")$+=Q;if(z.usage&&typeof z.usage==="object")X={promptTokens:z.usage.prompt_tokens,completionTokens:z.usage.completion_tokens,totalTokens:z.usage.total_tokens}}if(!J)throw Error("chat completion stream truncated: no [DONE] terminator");if(!$)throw Error("chat completion stream produced no content");return X?{content:$,usage:X}:{content:$}}function E0(Z,$){if(Z.headers?.get?.("content-type")?.includes("text/event-stream"))return!0;return $.trimStart().startsWith("data:")}async function E(Z,$,X,J={}){let G=R.QITQODE_BACKEND_URL,V=`${G}::post:${Z}`;if(!J.noCache){let O=Date.now(),Q=h.get(V);if(Q&&Q.expires>O)return Q.value}let W=!1,z=!1;do{z=!1;try{let O=await i(),Q=O?e(O):{},L=J.billable?jZ(B0(G,Q),$,X):void 0,M=L?{"x-idempotency-key":L.key}:{},D=await fetch(`${G}/${$}`,{method:"POST",headers:{"Content-Type":"application/json",...Q,...M},body:JSON.stringify(X),signal:J.signal});if(D.status===401||D.status===403){L?.settle();let I=await D.text().catch(()=>"");if(I.includes("ERR_GATEWAY_REQUIRED"))throw Error(`Backend routing error: ${I}`);let F=await p$({credential:O,status:D.status,label:$,baseUrl:G,repairSpent:W});if(W=!0,F.retry){z=!0;continue}throw F.error}if(!D.ok){let I=await i$(D,`Backend POST /${$}`);if(D.status<500)L?.settle();throw I}let K;if(J.sse){let I=await D.text();if(E0(D,I)){L?.settle();let F=RZ(I);if(!J.noCache)h.set(V,{value:F,expires:Date.now()+S$});return F}K=JSON.parse(I)}else K=await D.json();let j=K!==null&&typeof K==="object"&&typeof K.error==="string";if((!J.acceptTopLevel||typeof K?.success==="boolean"||j)&&!K.success)throw L?.settle(),n$(K,`Backend POST /${$}`);L?.settle();let B=J.acceptTopLevel?H0(K):K.data;if(!J.noCache)h.set(V,{value:B,expires:Date.now()+S$});return B}catch(O){if(O instanceof s)throw O;throw H.failures++,_.warn("backend POST request failed; surfacing error",{fnName:$,baseUrl:G,error:O instanceof Error?O.message:String(O)}),O}}while(z);throw Error(`Backend POST /${$} exhausted its auth retry without a verdict`)}async function r$(Z,$,X={}){let J=R.QITQODE_BACKEND_URL,G=!1,V=!1;do{V=!1;try{let W=await i(),z=W?e(W):{},O=new URLSearchParams(Object.entries($).map(([D,K])=>[D,String(K)])).toString(),Q=O?`${J}/${Z}?${O}`:`${J}/${Z}`,L=await fetch(Q,{method:"GET",headers:{...z},signal:X.signal});if(L.status===401||L.status===403){let D=await L.text().catch(()=>"");if(D.includes("ERR_GATEWAY_REQUIRED"))throw Error(`Backend routing error: ${D}`);let K=await p$({credential:W,status:L.status,label:Z,baseUrl:J,repairSpent:G});if(G=!0,K.retry){V=!0;continue}throw K.error}if(!L.ok)throw await i$(L,`Backend GET /${Z}`);let M=await L.json();if(!M.success)throw n$(M,`Backend GET /${Z}`);return M.data}catch(W){if(W instanceof s)throw W;throw H.failures++,_.warn("backend GET request failed; surfacing error",{fnName:Z,baseUrl:J,error:W instanceof Error?W.message:String(W)}),W}}while(V);throw Error(`Backend GET /${Z} exhausted its auth retry without a verdict`)}async function A0(Z,$,X){let J=R.QITQODE_BACKEND_URL,G=`${J}::public:${Z}`,V=Date.now(),W=h.get(G);if(W&&W.expires>V)return W.value;try{let z=await fetch(`${J}/${$}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(X),signal:AbortSignal.timeout(m$)});if(!z.ok)throw await i$(z,`Backend public POST /${$}`);let O=await z.json();if(!O.success)throw n$(O,`Backend public POST /${$}`);let Q=O.data;return h.set(G,{value:Q,expires:V+S$}),Q}catch(z){throw H.failures++,_.warn("backend public request failed; surfacing error",{fnName:$,baseUrl:J,error:z instanceof Error?z.message:String(z)}),z}}async function s$(){try{return await A0("forgewise.config","forgewiseConfig",{})}catch(Z){let $=await i().catch(()=>null);if(!$)throw Z;let X=R.QITQODE_BACKEND_URL,J=await fetch(`${X}/forgewiseConfig`,{method:"POST",headers:{"Content-Type":"application/json",...e($)},body:JSON.stringify({}),signal:AbortSignal.timeout(m$)}).catch(()=>null);if(!J?.ok)throw Z;let G=await J.json().catch(()=>null);if(!G?.success)throw Z;return G.data}}async function P0(){return r$("listTiers",{}).then((Z)=>{if(!Array.isArray(Z))return[];return Z.flatMap(($)=>{if(typeof $==="string")return[{id:$}];if(!$||typeof $!=="object"||Array.isArray($))return[];let X=$;return typeof X.id==="string"?[{id:X.id,...typeof X.label==="string"?{label:X.label}:{},...typeof X.providerID==="string"?{providerID:X.providerID}:{},...typeof X.modelID==="string"?{modelID:X.modelID}:{}}]:[]})}).catch((Z)=>{return _.warn("listTiers fetch failed; using hardcoded tier fallback",{error:Z instanceof Error?Z.message:String(Z)}),[]})}async function k0(){return r$("TIER_RATINGS",{}).catch((Z)=>{_.warn("TIER_RATINGS fetch failed; no tier ratings will be shown",{error:Z instanceof Error?Z.message:String(Z)});return})}async function g0(Z){return E("compaction.trajectory","compressTrajectorySafe",Z,{noCache:!0,billable:!0,signal:AbortSignal.timeout(120000)})}async function C0(Z,$){let X=$?.timeoutMs??30000,J={query:Z};if($?.numResults)J.options={count:$.numResults};return E("brave.search","braveSearch",J,{noCache:!0,signal:AbortSignal.timeout(X)})}async function h0(Z){return E("qredits.history","getHistory",Z,{noCache:!0})}async function b0(Z){return E("forgewise.qredits.balance","fetchQreditsBalance",Z,{noCache:!0,acceptTopLevel:!0})}async function f0(Z){return E(`code.analyze:${Z.filePath}`,"analyzeCodeForIssues",Z,{noCache:!0,billable:!0,signal:AbortSignal.timeout(60000)})}async function v0(Z){return E(`code.docs:${Z.filePath}:${Z.functionName??""}`,"generateDocumentation",Z,{noCache:!0,billable:!0,signal:AbortSignal.timeout(60000)})}async function y0(Z){return E(`code.comments:${Z.filePath}`,"generateInlineComments",Z,{noCache:!0,billable:!0,signal:AbortSignal.timeout(60000)})}async function c0(Z,$,X){return E("chat.boolean","chatBoolean",{sample:Z,test:$},{noCache:!0,billable:!0,signal:AbortSignal.timeout(X?.timeoutMs??30000)})}async function u0(Z,$){let X={message:Z},J={};if($?.provider!==void 0)J.provider=$.provider;if($?.temperature!==void 0)J.temperature=$.temperature;if($?.maxTokens!==void 0)J.maxTokens=$.maxTokens;if(Object.keys(J).length>0)X.options=J;let G=await E("chat.completion","chatCompletion",X,{noCache:!0,billable:!0,sse:!0,signal:AbortSignal.timeout($?.timeoutMs??30000)});return _Z(G)}function _Z(Z){if(typeof Z==="string")return{content:Z};if(Z!==null&&typeof Z==="object"){let $=Z,X=$.choices?.[0],J=typeof $.content==="string"?$.content:X?.message?.content??X?.delta?.content;if(typeof J==="string"){let G=$.usage,V=G?{promptTokens:G.promptTokens??G.prompt_tokens,completionTokens:G.completionTokens??G.completion_tokens,totalTokens:G.totalTokens??G.total_tokens}:void 0;return V?{content:J,usage:V}:{content:J}}}throw Error(`chatCompletion returned an unrecognized payload shape: ${JSON.stringify(Z)?.slice(0,300)}`)}async function d0(Z){return E("batch.submit","submitBatch",{tier:Z.tier,requests:Z.requests},{noCache:!0,billable:!0,signal:AbortSignal.timeout(60000)})}async function m0(Z){return r$("retrieveBatch",{batchId:Z.batchId,tier:Z.tier},{signal:AbortSignal.timeout(30000)})}var l0=C.create({service:"forgewise.config"}),p0="https://accounts.forgewise.tech",i0="forgewise-cli",qZ=!1,n0={defaultFallbacks:0};function x$(...Z){return Z.find(($)=>$!==void 0&&$.trim().length>0)}function m9(){return!!process.env.REPLIT_DEV_DOMAIN}async function OZ(){let Z=process.env.ACCOUNTS_ISSUER,$=process.env.FORGEWISE_CLIENT_ID;if(Z&&$)return{issuer:Z.replace(/\/+$/,""),clientId:$};let X,J;try{X=await s$()}catch(O){X=void 0,J=O}let G=x$(Z,X?.issuer,p0).replace(/\/+$/,""),V=x$($,X?.clientId,i0),W=x$(Z,X?.issuer)===void 0,z=x$($,X?.clientId)===void 0;if((W||z)&&!qZ)qZ=!0,n0.defaultFallbacks++,l0.warn("remote Forgewise coordinate lookup unavailable; falling back to baked-in defaults",{issuer:G,clientId:V,usedDefaultIssuer:W,usedDefaultClientId:z,remoteError:J instanceof Error?J.message:J?String(J):void 0});return{issuer:G,clientId:V}}
8
- export{g as Wo,e1 as Xo,mZ as Yo,lZ as Zo,$Z as _o,O0 as $o,F$ as ap,A as bp,i as cp,B$ as dp,E$ as ep,m9 as fp,OZ as gp,q as hp,n as ip,zZ as jp,U9 as kp,B9 as lp,I9 as mp,S9 as np,x9 as op,R9 as pp,_9 as qp,LZ as rp,C$ as sp,MZ as tp,s as up,G$ as vp,Y$ as wp,l$ as xp,P0 as yp,k0 as zp,h0 as Ap,b0 as Bp,o$ as Cp};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{yP as t}from"./chunk-sh03ka27.js";var e=await import("./chunk-3ege6krg.js",{with:{type:"file"}}),a=e.default;export{a as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{pe as a}from"./chunk-adws0hhk.js";import"./chunk-69k7cdtv.js";import"./chunk-w136zswr.js";import"./chunk-s0gmxpxm.js";import"./chunk-48rg4yhk.js";import"./chunk-sh03ka27.js";export{a as fromHttp};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./chunk-sh03ka27.js";var n="./highlights-hk7bwhj4.scm";export{n as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ge as a,he as b,ie as c}from"./chunk-62gefpwn.js";import"./chunk-w136zswr.js";import"./chunk-s0gmxpxm.js";import"./chunk-48rg4yhk.js";import"./chunk-sh03ka27.js";export{b as validateSsoProfile,a as isSsoProfile,c as fromSSO};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Jg as t}from"./chunk-4s1n38ds.js";import{yP as o}from"./chunk-sh03ka27.js";async function e(){try{let{toJSONSchema:r}=await import("./chunk-ky3fhz9z.js");return r}catch{throw new t("sury")}}export{e as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Be as a,Ce as b,De as c,Ee as d,Fe as e,Ge as f,He as g}from"./chunk-set1f1wr.js";import"./chunk-w136zswr.js";import"./chunk-s0gmxpxm.js";import"./chunk-48rg4yhk.js";import"./chunk-sh03ka27.js";export{g as fromEnv,c as ENV_SESSION,b as ENV_SECRET,a as ENV_KEY,d as ENV_EXPIRATION,e as ENV_CREDENTIAL_SCOPE,f as ENV_ACCOUNT_ID};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./chunk-sh03ka27.js";var R="./libopentui-c8ye7mqw.dylib";export{R as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Kd as a,Ld as b}from"./chunk-rqap90xh.js";import"./chunk-3152y1q9.js";import"./chunk-fkq0v5qv.js";import"./chunk-1e75j4m1.js";import"./chunk-6yshpz0z.js";import"./chunk-5dvy83ms.js";import"./chunk-ffx0cr44.js";import"./chunk-33mzqyyb.js";import"./chunk-sg9enzsp.js";import"./chunk-5q98z8ck.js";import"./chunk-wfpnv00c.js";import"./chunk-9kc2th5c.js";import"./chunk-sh03ka27.js";export{a as read,b as copy};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./chunk-sh03ka27.js";var h="./tree-sitter-typescript-zxjzwt75.wasm";export{h as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./chunk-sh03ka27.js";function o(){return(e,n)=>e.toJsonSchema(n)}export{o as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./chunk-sh03ka27.js";var E="./tree-sitter-markdown_inline-j5349f42.wasm";export{E as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{dr as a}from"./chunk-m6967jtv.js";import"./chunk-sh03ka27.js";export default a();
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./chunk-sh03ka27.js";var t="./injections-73j83es3.scm";export{t as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./chunk-sh03ka27.js";var a="./highlights-x6tmsnaa.scm";export{a as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{A as g,u as a,v as b,w as c,x as d,y as e,z as f}from"./chunk-qqsj69m2.js";import"./chunk-jwv6fda1.js";import"./chunk-hx13a8es.js";import"./chunk-h036zy9e.js";import"./chunk-j3agzs13.js";import"./chunk-6kch0q2d.js";import"./chunk-6cztstry.js";import"./chunk-1mfdmm2t.js";import"./chunk-fkq0v5qv.js";import"./chunk-1e75j4m1.js";import"./chunk-2w3n0q9m.js";import"./chunk-fdmz0502.js";import"./chunk-8jkqyf9n.js";import"./chunk-6yshpz0z.js";import"./chunk-5dvy83ms.js";import"./chunk-ffx0cr44.js";import"./chunk-33mzqyyb.js";import"./chunk-sg9enzsp.js";import"./chunk-5q98z8ck.js";import"./chunk-wfpnv00c.js";import"./chunk-9kc2th5c.js";import"./chunk-sh03ka27.js";export{e as waitForDependencies,c as layer,f as get,d as defaultLayer,g as TuiConfig,b as Service,a as Info};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Jg as o}from"./chunk-4s1n38ds.js";import{yP as n}from"./chunk-sh03ka27.js";async function a(){try{let{toJsonSchema:t}=await import("./chunk-9ttebtcf.js");return t}catch{throw new o("@valibot/to-json-schema")}}export{a as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./chunk-sh03ka27.js";var k="./opentui-drfwd3v7.dll";export{k as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{fe as b}from"./chunk-w8nj5ph5.js";import{cg as t}from"./chunk-psmwrvqs.js";import{Ah as u}from"./chunk-fd04358e.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{Sk as y,Zj as m}from"./chunk-y1v7mf1a.js";import{ol as v}from"./chunk-358wdvj7.js";import{Ml as a}from"./chunk-dn0437c1.js";import"./chunk-47jkx37s.js";import"./chunk-31a47ptm.js";import"./chunk-jwv6fda1.js";import"./chunk-hx13a8es.js";import"./chunk-h036zy9e.js";import"./chunk-j3agzs13.js";import"./chunk-3152y1q9.js";import"./chunk-71jmhvef.js";import"./chunk-qrztx1b4.js";import"./chunk-j1bv93m4.js";import"./chunk-pp10epga.js";import"./chunk-crqycrs4.js";import"./chunk-1bq15kf0.js";import"./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-9znfb8f2.js";import"./chunk-6kch0q2d.js";import"./chunk-6cztstry.js";import"./chunk-1mfdmm2t.js";import"./chunk-fkq0v5qv.js";import"./chunk-1e75j4m1.js";import"./chunk-2w3n0q9m.js";import"./chunk-6dd2dx69.js";import"./chunk-fdmz0502.js";import"./chunk-1a08ffyd.js";import"./chunk-8jkqyf9n.js";import"./chunk-6yshpz0z.js";import"./chunk-5dvy83ms.js";import"./chunk-ffx0cr44.js";import"./chunk-33mzqyyb.js";import"./chunk-sg9enzsp.js";import"./chunk-5q98z8ck.js";import"./chunk-wfpnv00c.js";import{gI as s}from"./chunk-9kc2th5c.js";import"./chunk-hf39qx6t.js";import"./chunk-x0de4z05.js";import"./chunk-sh03ka27.js";import{EOL as f}from"os";var M=b({command:"models [provider]",describe:"list all available models",builder:(r)=>{return r.positional("provider",{describe:"provider ID to filter models by",type:"string",array:!1}).option("verbose",{describe:"use more verbose model output (includes metadata like costs)",type:"boolean"}).option("refresh",{describe:"refresh the models cache from models.dev",type:"boolean"})},handler:async(r)=>{if(r.refresh)await v.refresh(!0),t.println(t.Style.TEXT_SUCCESS_BOLD+"Models cache refreshed"+t.Style.TEXT_NORMAL);await a.provide({directory:process.cwd(),async fn(){await u.runPromise(s.gen(function*(){let n=yield*(yield*y.Service).list(),l=(e,o)=>{let i=n[e],d=Object.entries(i.models).sort(([c],[p])=>c.localeCompare(p));for(let[c,p]of d)if(process.stdout.write(`${e}/${c}`),process.stdout.write(f),o)process.stdout.write(JSON.stringify(p,null,2)),process.stdout.write(f)};if(r.provider){let e=m.make(r.provider);if(!n[e]){yield*s.sync(()=>t.error(`Provider not found: ${r.provider}`));return}yield*s.sync(()=>l(e,r.verbose));return}let h=Object.keys(n).sort((e,o)=>{let i=e.startsWith("opencode"),d=o.startsWith("opencode");if(i&&!d)return-1;if(!i&&d)return 1;return e.localeCompare(o)});yield*s.sync(()=>{for(let e of h)l(m.make(e),r.verbose)})}))}})}});export{M as ModelsCommand};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{lu as a,mu as b}from"./chunk-ffx0cr44.js";import"./chunk-wfpnv00c.js";import"./chunk-9kc2th5c.js";import"./chunk-sh03ka27.js";export{a as Path,b as Global};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Pd as a}from"./chunk-86reb44c.js";import"./chunk-k769v1ds.js";import"./chunk-sh03ka27.js";export{a as dict};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Qt as a,Rt as b,St as c,Tt as d,Ut as e,Vt as f,Wt as g,Xt as h}from"./chunk-5dvy83ms.js";import"./chunk-ffx0cr44.js";import"./chunk-33mzqyyb.js";import"./chunk-sg9enzsp.js";import"./chunk-5q98z8ck.js";import"./chunk-wfpnv00c.js";import"./chunk-9kc2th5c.js";import"./chunk-sh03ka27.js";export{g as redactValue,e as init,f as flush,d as file,b as enabled,h as create,a as Level,c as Default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Yd as q,Zd as K,_d as D,be as L,ce as N}from"./chunk-p0852vfn.js";import"./chunk-ej0yzstw.js";import{cg as B}from"./chunk-psmwrvqs.js";import{Ah as G}from"./chunk-fd04358e.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"./chunk-y1v7mf1a.js";import{el as C}from"./chunk-358wdvj7.js";import"./chunk-dn0437c1.js";import"./chunk-47jkx37s.js";import"./chunk-31a47ptm.js";import"./chunk-jwv6fda1.js";import"./chunk-hx13a8es.js";import"./chunk-h036zy9e.js";import"./chunk-j3agzs13.js";import"./chunk-3152y1q9.js";import"./chunk-71jmhvef.js";import"./chunk-qrztx1b4.js";import"./chunk-j1bv93m4.js";import"./chunk-pp10epga.js";import"./chunk-crqycrs4.js";import"./chunk-1bq15kf0.js";import"./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-9znfb8f2.js";import"./chunk-6kch0q2d.js";import"./chunk-6cztstry.js";import"./chunk-1mfdmm2t.js";import"./chunk-fkq0v5qv.js";import"./chunk-1e75j4m1.js";import"./chunk-2w3n0q9m.js";import"./chunk-6dd2dx69.js";import"./chunk-fdmz0502.js";import"./chunk-1a08ffyd.js";import{ft as J}from"./chunk-8jkqyf9n.js";import"./chunk-6yshpz0z.js";import"./chunk-5dvy83ms.js";import"./chunk-ffx0cr44.js";import"./chunk-33mzqyyb.js";import"./chunk-sg9enzsp.js";import"./chunk-5q98z8ck.js";import"./chunk-wfpnv00c.js";import"./chunk-9kc2th5c.js";import"./chunk-hf39qx6t.js";import"./chunk-x0de4z05.js";import"./chunk-sh03ka27.js";var X={command:"upgrade [target]",describe:"upgrade qitqode to the latest or a specific version",builder:(z)=>{return z.positional("target",{describe:"version to upgrade to, for ex '0.1.48' or 'v0.1.48'",type:"string"}).option("method",{alias:"m",describe:"installation method to use",type:"string",choices:["curl","npm","pnpm","bun","brew","choco","scoop"]})},handler:async(z)=>{B.empty(),B.println(B.logo(" ")),B.empty(),K("Upgrade");let O=await G.runPromise(C.Service.use((j)=>j.method())),E=z.method??O;if(E==="unknown"){if(q.error(`qitqode is installed to ${process.execPath} and may be managed by a package manager`),!await N({message:"Install anyways?",options:[{label:"Yes",value:!0},{label:"No",value:!1}],initialValue:!1})){D("Done");return}}q.info("Using method: "+E);let F=z.target?z.target.replace(/^v/,""):await G.runPromise(C.Service.use((j)=>j.latest()));if(J===F){q.warn(`qitqode upgrade skipped: ${F} is already installed`),D("Done");return}q.info(`From ${J} \u2192 ${F}`);let H=L();H.start("Upgrading...");let x=await G.runPromise(C.Service.use((j)=>j.upgrade(E,F))).catch((j)=>j);if(x){if(H.stop("Upgrade failed",1),x instanceof C.UpgradeFailedError)if(E==="choco"&&x.stderr.includes("not running from an elevated command shell"))q.error("Please run the terminal as Administrator and try again");else q.error(x.stderr);else if(x instanceof Error)q.error(x.message);D("Done");return}H.stop("Upgrade complete"),D("Done")}};export{X as UpgradeCommand};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Al as s,Bl as t,Cl as u,El as v,Fl as w}from"./chunk-dn0437c1.js";import"./chunk-47jkx37s.js";import{Am as c,Bm as d,Cm as e,Dm as f,Em as g,Fm as h,Gm as i,Hm as j,Im as k,Km as l,Lm as m,Mm as n,Om as o,Qm as p,Xm as q,Ym as r,mm as a,zm as b}from"./chunk-31a47ptm.js";import"./chunk-j3agzs13.js";import"./chunk-3152y1q9.js";import"./chunk-71jmhvef.js";import"./chunk-9znfb8f2.js";import"./chunk-6kch0q2d.js";import"./chunk-6cztstry.js";import"./chunk-1mfdmm2t.js";import"./chunk-fkq0v5qv.js";import"./chunk-1e75j4m1.js";import"./chunk-6dd2dx69.js";import"./chunk-fdmz0502.js";import"./chunk-8jkqyf9n.js";import"./chunk-6yshpz0z.js";import"./chunk-5dvy83ms.js";import"./chunk-ffx0cr44.js";import"./chunk-33mzqyyb.js";import"./chunk-sg9enzsp.js";import"./chunk-5q98z8ck.js";import"./chunk-wfpnv00c.js";import"./chunk-9kc2th5c.js";import"./chunk-sh03ka27.js";export{a as sql,e as or,f as not,c as ne,j as lte,i as lt,p as like,l as isNull,m as isNotNull,k as inArray,h as gte,g as gt,n as exists,b as eq,r as desc,t as count,o as between,q as asc,d as and,w as Storage,v as NotFoundError,s as JsonMigration,u as Database};
@@ -1,35 +0,0 @@
1
- // @bun
2
- import{Ah as M}from"./chunk-fd04358e.js";import{bl as Y}from"./chunk-y1v7mf1a.js";import{Gs as F}from"./chunk-1mfdmm2t.js";import{et as W}from"./chunk-1a08ffyd.js";import{hu as y}from"./chunk-ffx0cr44.js";import{gI as K}from"./chunk-9kc2th5c.js";import{EOL as b}from"os";import B from"path";var z=W.tiers().map((q)=>({label:q.label,providerID:q.providerID,modelID:q.modelID})),$=Object.fromEntries(W.tiers().map((q)=>[`${q.providerID}/${q.modelID}`,q.label]));function H(q){return new Map((q??[]).map((w)=>[w.id,w]))}function T(q,w,C){return(q instanceof Map?q.get(w):Array.isArray(q)?q.find((Q)=>Q.id===w):void 0)?.models[C]}function N(q,w,C){let J=`${w}/${C}`;if($[J])return $[J];return T(q,w,C)?.name??C}function f(q,w){return q&&w===!0?`${q} (fallback)`:q}function I(q){if(!q.busy||!q.model)return!1;let w=[...q.messages].reverse().find((C)=>C.role==="assistant"&&C.time?.completed===void 0);return w?.providerID===q.model.providerID&&w.modelID===q.model.modelID&&w.freeTierFallback===!0}function D(q,w){let C=W.tiers().find((J)=>J.providerID===q&&J.modelID===w);return C?W.TIER_RATINGS[C.id]:void 0}async function n(q){return M.runPromise(Y.Service.use((w)=>K.gen(function*(){let C=yield*w.get(q),J=yield*w.messages({sessionID:C.id,agentID:"*"});return{info:C,messages:J}})))}function o(){let q=Y.list({limit:1}).next();return q.done?void 0:q.value}function d(q,w){return`session-${q.slice(0,8)}.${w==="markdown"?"md":"json"}`}function E(q,w){return B.resolve(q,w)}async function i(q,w,C){let J=E(q,w);return await y.write(J,C),J}function G(q,w,C){return C.trim()?`[redacted:${q}:${w}]`:C}function U(q,w,C){if(!C)return C;return Object.keys(C).length?{redacted:`${q}:${w}`}:C}function X(q,w){return{...w,value:G("file-text",q,w.value)}}function O(q,w){return w?.map((C,J)=>({...C,file:G(`${q}-file`,String(J),C.file),patch:G(`${q}-patch`,String(J),C.patch)}))}function L(q){if(!q.source)return q.source;if(q.source.type==="symbol")return{...q.source,path:G("file-path",q.id,q.source.path),name:G("file-symbol",q.id,q.source.name),text:X(q.id,q.source.text)};if(q.source.type==="resource")return{...q.source,clientName:G("file-client",q.id,q.source.clientName),uri:G("file-uri",q.id,q.source.uri),text:X(q.id,q.source.text)};return{...q.source,path:G("file-path",q.id,q.source.path),text:X(q.id,q.source.text)}}function x(q){return{...q,url:G("file-url",q.id,q.url),filename:q.filename===void 0?void 0:G("file-name",q.id,q.filename),source:L(q)}}function R(q){switch(q.type){case"text":return{...q,text:G("text",q.id,q.text),metadata:U("text-metadata",q.id,q.metadata)};case"reasoning":return{...q,text:G("reasoning",q.id,q.text),metadata:U("reasoning-metadata",q.id,q.metadata)};case"file":return x(q);case"subtask":return{...q,prompt:G("subtask-prompt",q.id,q.prompt),description:G("subtask-description",q.id,q.description),command:q.command===void 0?void 0:G("subtask-command",q.id,q.command)};case"tool":return{...q,metadata:U("tool-metadata",q.id,q.metadata),state:q.state.status==="pending"?{...q.state,input:U("tool-input",q.id,q.state.input)??q.state.input,raw:G("tool-raw",q.id,q.state.raw)}:q.state.status==="running"?{...q.state,input:U("tool-input",q.id,q.state.input)??q.state.input,title:q.state.title===void 0?void 0:G("tool-title",q.id,q.state.title),metadata:U("tool-state-metadata",q.id,q.state.metadata)}:q.state.status==="completed"?{...q.state,input:U("tool-input",q.id,q.state.input)??q.state.input,output:G("tool-output",q.id,q.state.output),title:G("tool-title",q.id,q.state.title),metadata:U("tool-state-metadata",q.id,q.state.metadata)??q.state.metadata,attachments:q.state.attachments?.map(x)}:{...q.state,input:U("tool-input",q.id,q.state.input)??q.state.input,error:G("tool-error",q.id,q.state.error),metadata:U("tool-state-metadata",q.id,q.state.metadata)}};case"patch":return{...q,hash:G("patch",q.id,q.hash),files:q.files.map((w,C)=>G("patch-file",`${q.id}-${C}`,w))};case"snapshot":return{...q,snapshot:G("snapshot",q.id,q.snapshot)};case"step-start":case"step-finish":return{...q,snapshot:q.snapshot===void 0?void 0:G("snapshot",q.id,q.snapshot)};case"agent":return{...q,source:!q.source?q.source:{...q.source,value:G("agent-source",q.id,q.source.value)}};default:return q}}function s(q){return{info:{...q.info,title:G("session-title",q.info.id,q.info.title),directory:G("session-directory",q.info.id,q.info.directory),summary:!q.info.summary?q.info.summary:{...q.info.summary,diffs:O("session-diff",q.info.summary.diffs)},revert:!q.info.revert?q.info.revert:{...q.info.revert,snapshot:q.info.revert.snapshot===void 0?void 0:G("revert-snapshot",q.info.id,q.info.revert.snapshot),diff:q.info.revert.diff===void 0?void 0:G("revert-diff",q.info.id,q.info.revert.diff)}},messages:q.messages.map((w)=>({info:w.info.role==="user"?{...w.info,system:w.info.system===void 0?void 0:G("system",w.info.id,w.info.system),summary:!w.info.summary?w.info.summary:{...w.info.summary,title:w.info.summary.title===void 0?void 0:G("summary-title",w.info.id,w.info.summary.title),body:w.info.summary.body===void 0?void 0:G("summary-body",w.info.id,w.info.summary.body),diffs:O("message-diff",w.info.summary.diffs)}}:{...w.info,path:{cwd:G("cwd",w.info.id,w.info.path.cwd),root:G("root",w.info.id,w.info.path.root)}},parts:w.parts.map(R)}))}}function e(q,w,C){let J=H(C.providers),Q=`# ${q.title}
3
-
4
- `;Q+=`**Session ID:** ${q.id}
5
- `,Q+=`**Created:** ${new Date(q.time.created).toLocaleString()}
6
- `,Q+=`**Updated:** ${new Date(q.time.updated).toLocaleString()}
7
-
8
- `,Q+=`---
9
-
10
- `;for(let V of w)Q+=S(V.info,V.parts,C,J),Q+=`---
11
-
12
- `;return Q}function S(q,w,C,J){let Q=q.role==="user"?`## User
13
-
14
- `:h(q,C.assistantMetadata,J??C.providers);for(let V of w)Q+=k(V,C);return Q}function h(q,w,C){if(!w)return`## Assistant
15
-
16
- `;let J=q.time.completed&&q.time.created?((q.time.completed-q.time.created)/1000).toFixed(1)+"s":"",Q=N(C,q.providerID,q.modelID);return`## Assistant (${F.titlecase(q.agent)} \xB7 ${Q}${J?` \xB7 ${J}`:""})
17
-
18
- `}function k(q,w){if(q.type==="text"&&!q.synthetic)return`${q.text}
19
-
20
- `;if(q.type==="reasoning")return w.thinking?`_Thinking:_
21
-
22
- ${q.text}
23
-
24
- `:"";if(q.type!=="tool")return"";let C=(Q,V="")=>{let _=Math.max(0,...Array.from(Q.matchAll(/`+/g),(j)=>j[0].length)),Z="`".repeat(Math.max(3,_+1));return`${Z}${V}
25
- ${Q}
26
- ${Z}
27
- `},J=`**Tool: ${q.tool}**
28
- `;if(w.toolDetails&&q.state.input)J+=`
29
- **Input:**
30
- ${C(JSON.stringify(q.state.input,null,2),"json")}`;if(w.toolDetails&&q.state.status==="completed"&&q.state.output)J+=`
31
- **Output:**
32
- ${C(q.state.output)}`;if(w.toolDetails&&q.state.status==="error"&&q.state.error)J+=`
33
- **Error:**
34
- ${C(q.state.error)}`;return J+b}
35
- export{z as J,$ as K,H as L,N as M,f as N,I as O,D as P,n as Q,o as R,d as S,i as T,s as U,e as V};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{er as a,fr as b,gr as c}from"./chunk-j2snkw45.js";import"./chunk-bmdqb48f.js";import"./chunk-sh03ka27.js";export{a as openApp,c as default,b as apps};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Pn as a}from"./chunk-71jmhvef.js";import"./chunk-6dd2dx69.js";import"./chunk-ffx0cr44.js";import"./chunk-wfpnv00c.js";import"./chunk-9kc2th5c.js";import"./chunk-sh03ka27.js";export{a as which};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./chunk-sh03ka27.js";var e="./libopentui-xtk56e94.so";export{e as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Dp as a,Ep as b,Fp as c,Gp as d,Hp as e,Ip as f}from"./chunk-crqycrs4.js";import"./chunk-1bq15kf0.js";import"./chunk-pdcxmr6x.js";import"./chunk-cqtkxwd8.js";import"./chunk-a1mbach4.js";import"./chunk-sg9enzsp.js";import"./chunk-5q98z8ck.js";import"./chunk-sh03ka27.js";export{f as createOpenAICompatible,e as VERSION,d as OpenAICompatibleImageModel,c as OpenAICompatibleEmbeddingModel,b as OpenAICompatibleCompletionLanguageModel,a as OpenAICompatibleChatLanguageModel};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Mf as l}from"./chunk-1r7anzk5.js";import"./chunk-pwq2f75j.js";import{Hg as q}from"./chunk-5qhsfjzq.js";import"./chunk-nfg7nt13.js";import"./chunk-4s1n38ds.js";import{yP as C}from"./chunk-sh03ka27.js";function J(){return async(f,b)=>{if("_zod"in f)return l()(f,{components:b.components,options:{io:"input",...b.options}});try{let{createSchema:w}=await import("./chunk-spcdwmy4.js"),{schema:B,components:k}=w(f,{schemaType:"input",...b.options});if(k)b.components.schemas={...b.components.schemas,...k};return B}catch{throw Error(q('Missing dependencies "zod-openapi v4".'))}}}export{J as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{$m as b,_m as a,an as c,bn as d,cn as e}from"./chunk-31a47ptm.js";import"./chunk-sh03ka27.js";export{e as drizzle,b as SQLiteBunTransaction,a as SQLiteBunSession,d as SQLiteBunDatabase,c as PreparedQuery};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./chunk-sh03ka27.js";var G="./tree-sitter-bash-hq5s6fxb.wasm";export{G as default};