@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,2 +1,2 @@
1
1
  // @bun
2
- import"./chunk-k769v1ds.js";import"./chunk-sh03ka27.js";var f={"language.en":"English","language.zh":"\u7B80\u4F53\u4E2D\u6587","language.zht":"\u7E41\u9AD4\u4E2D\u6587","language.ko":"\uD55C\uAD6D\uC5B4","language.de":"Deutsch","language.es":"Espa\xF1ol","language.fr":"Fran\xE7ais","language.da":"Dansk","language.ja":"\u65E5\u672C\u8A9E","language.pl":"Polski","language.ru":"\u0420\u0443\u0441\u0441\u043A\u0438\u0439","language.ar":"\u0627\u0644\u0639\u0631\u0628\u064A\u0629","language.no":"Norsk","language.br":"Portugu\xEAs (Brasil)","language.pt":"Portugu\xEAs","language.bs":"Bosanski","language.th":"\u0E44\u0E17\u0E22","language.tr":"T\xFCrk\xE7e","tui.prompt.placeholder.normal":'Pregunta lo que quieras... "{{example}}"',"tui.prompt.placeholder.shell":'Ejecuta un comando... "{{example}}"',"tui.prompt.ghost":"{{prediction}} (Tab para aceptar)","tui.home.placeholder.example.todo":"Corregir un TODO en el c\xF3digo","tui.home.placeholder.example.stack":"\xBFCu\xE1l es el stack t\xE9cnico del proyecto?","tui.home.placeholder.example.tests":"Arreglar las pruebas fallidas","tui.home.agreement.prefix":"Al usar QitQode, aceptas nuestros ","tui.home.agreement.terms":"T\xE9rminos de servicio","tui.home.agreement.separator":" y la ","tui.home.agreement.privacy":"Pol\xEDtica de privacidad","tui.home.agreement.suffix":"","tui.prompt.hint.attach_file":"adjuntar archivo","tui.prompt.hint.subagent":"subagente","tui.prompt.hint.commands":"comandos","tui.prompt.hint.switch_mode":"cambiar modo","tui.prompt.hint.settings":"ajustes","tui.tips.label":"Sugerencia","tui.tips.plain_terminal":"Recomendamos usar iTerm o la terminal de VS Code","tui.tips.attach_file":"Escribe {highlight}@{/highlight} seguido del nombre de archivo para buscar de forma difusa y adjuntar archivos","tui.tips.shell_prefix":"Empieza un mensaje con {highlight}!{/highlight} para ejecutar comandos del shell directamente (p. ej., {highlight}!ls -la{/highlight})","tui.tips.tab_agent":"Pulsa {highlight}Tab{/highlight} o {highlight}Shift+Tab{/highlight} para alternar entre los agentes Build, Plan y Compose","tui.tips.theme_mode":"Ejecuta {highlight}/dark{/highlight} para el modo oscuro o {highlight}/light{/highlight} para el modo claro","tui.tips.doc":"Ejecuta {highlight}/doc{/highlight} para abrir la documentaci\xF3n de usuario","tui.tips.undo":"Usa {highlight}/undo{/highlight} para revertir el \xFAltimo mensaje y los cambios en archivos","tui.tips.redo":"Usa {highlight}/redo{/highlight} para restaurar mensajes y cambios deshechos previamente","tui.tips.drag_drop":"Arrastra y suelta im\xE1genes o PDF en el terminal para a\xF1adirlos como contexto","tui.tips.paste_image":"Pulsa {highlight}Ctrl+V{/highlight} para pegar im\xE1genes desde el portapapeles en la entrada","tui.tips.editor":"Pulsa {highlight}Ctrl+X E{/highlight} o {highlight}/editor{/highlight} para componer mensajes en tu editor externo","tui.tips.init":"Ejecuta {highlight}/init{/highlight} para autogenerar reglas del proyecto a partir de tu c\xF3digo","tui.tips.models":"Ejecuta {highlight}/models{/highlight} o {highlight}Ctrl+X M{/highlight} para cambiar entre los modelos disponibles","tui.tips.theme":'Bloquea el modo de tema frente al fondo de tu terminal \u2014 abre la paleta de comandos ({highlight}Ctrl+P{/highlight}) y busca "lock"',"tui.tips.new_session":"Pulsa {highlight}Ctrl+X N{/highlight} o {highlight}/new{/highlight} para iniciar una nueva sesi\xF3n","tui.tips.sessions":"Usa {highlight}/sessions{/highlight} o {highlight}Ctrl+X L{/highlight} para listar y continuar conversaciones anteriores","tui.tips.compact":"Ejecuta {highlight}/compact{/highlight} para resumir sesiones largas cerca del l\xEDmite de contexto","tui.tips.export":"Pulsa {highlight}Ctrl+X X{/highlight} o {highlight}/export{/highlight} para guardar la conversaci\xF3n como Markdown","tui.tips.copy_last":"Pulsa {highlight}Ctrl+X Y{/highlight} para copiar el \xFAltimo mensaje del asistente al portapapeles","tui.tips.command_palette":"Pulsa {highlight}Ctrl+P{/highlight} para ver todas las acciones y comandos disponibles","tui.tips.leader":"La tecla l\xEDder es {highlight}Ctrl+X{/highlight}; comb\xEDnala con otras teclas para acciones r\xE1pidas","tui.tips.f2":"Pulsa {highlight}F2{/highlight} para alternar r\xE1pidamente entre los modelos usados recientemente","tui.tips.sidebar":"Pulsa {highlight}Ctrl+X B{/highlight} para mostrar/ocultar la barra lateral","tui.tips.history":"Usa {highlight}PageUp{/highlight}/{highlight}PageDown{/highlight} para navegar por el historial de la conversaci\xF3n","tui.tips.jump_first":"Pulsa {highlight}Ctrl+G{/highlight} o {highlight}Home{/highlight} para ir al inicio de la conversaci\xF3n","tui.tips.jump_last":"Pulsa {highlight}Ctrl+Alt+G{/highlight} o {highlight}End{/highlight} para ir al mensaje m\xE1s reciente","tui.tips.newline":"Pulsa {highlight}Shift+Enter{/highlight} o {highlight}Ctrl+J{/highlight} para a\xF1adir saltos de l\xEDnea en la entrada","tui.tips.clear_input":"Pulsa {highlight}Ctrl+C{/highlight} mientras escribes para vaciar el campo de entrada","tui.tips.escape":"Pulsa {highlight}Escape{/highlight} para detener la respuesta de la IA en curso","tui.tips.plan_agent":"Cambia al agente {highlight}Plan{/highlight} para obtener sugerencias sin aplicar cambios reales","tui.tips.subagent":"Usa {highlight}@agent-name{/highlight} en las indicaciones para invocar subagentes especializados","tui.tips.cycle_sessions":"Pulsa {highlight}Ctrl+X Right/Left{/highlight} para alternar entre sesiones padre e hija","tui.tips.config_files":"Crea {highlight}qitqode.json{/highlight} para la configuraci\xF3n del servidor y {highlight}tui.json{/highlight} para la TUI","tui.tips.global_config":"Coloca la configuraci\xF3n de TUI en {highlight}~/.config/qitqode/tui.json{/highlight} como configuraci\xF3n global","tui.tips.schema":"A\xF1ade {highlight}$schema{/highlight} a tu configuraci\xF3n para autocompletado en el editor","tui.tips.default_model":"Configura {highlight}model{/highlight} en la config para definir tu modelo por defecto","tui.tips.keybinds":"Sobrescribe cualquier atajo en {highlight}tui.json{/highlight} mediante la secci\xF3n {highlight}keybinds{/highlight}","tui.tips.disable_keybind":"Establece un atajo en {highlight}none{/highlight} para deshabilitarlo por completo","tui.tips.mcp_config":"Configura servidores MCP locales o remotos en la secci\xF3n {highlight}mcp{/highlight}","tui.tips.mcp_oauth":"QitQode gestiona autom\xE1ticamente OAuth para servidores MCP remotos que requieran autenticaci\xF3n","tui.tips.custom_command":"A\xF1ade archivos {highlight}.md{/highlight} en {highlight}.qitqode/command/{/highlight} para definir indicaciones personalizadas reutilizables","tui.tips.command_args":"Usa {highlight}$ARGUMENTS{/highlight}, {highlight}$1{/highlight}, {highlight}$2{/highlight} en comandos personalizados para entradas din\xE1micas","tui.tips.command_backticks":"Usa comillas invertidas en los comandos para inyectar la salida del shell (p. ej. {highlight}`git status`{/highlight})","tui.tips.custom_agent":"A\xF1ade archivos {highlight}.md{/highlight} en {highlight}.qitqode/agent/{/highlight} para personajes de IA especializados","tui.tips.agent_perms":"Configura por agente los permisos de las herramientas {highlight}edit{/highlight}, {highlight}bash{/highlight} y {highlight}webfetch{/highlight}","tui.tips.bash_allow":'Usa patrones como {highlight}"git *": "allow"{/highlight} para permisos de bash m\xE1s finos',"tui.tips.bash_deny":'Define {highlight}"rm -rf *": "deny"{/highlight} para bloquear comandos destructivos',"tui.tips.bash_ask":'Configura {highlight}"git push": "ask"{/highlight} para exigir confirmaci\xF3n antes de hacer push',"tui.tips.formatter":"QitQode formatea archivos autom\xE1ticamente con prettier, gofmt, ruff y m\xE1s","tui.tips.disable_formatter":'Define {highlight}"formatter": false{/highlight} en la config para desactivar el formato autom\xE1tico',"tui.tips.custom_formatter":"Define comandos de formateo personalizados por extensi\xF3n de archivo en la configuraci\xF3n","tui.tips.lsp":"QitQode usa servidores LSP para an\xE1lisis inteligente de c\xF3digo","tui.tips.custom_tool":"Crea archivos {highlight}.ts{/highlight} en {highlight}.qitqode/tools/{/highlight} para definir nuevas herramientas LLM","tui.tips.tool_scripts":"Las definiciones de herramientas pueden invocar scripts en Python, Go, etc.","tui.tips.plugins":"A\xF1ade archivos {highlight}.ts{/highlight} en {highlight}.qitqode/plugin/{/highlight} para enganchar eventos","tui.tips.plugin_notify":"Usa plugins para enviar notificaciones del sistema cuando termine una sesi\xF3n","tui.tips.plugin_protect":"Crea un plugin que impida a QitQode leer archivos sensibles","tui.tips.run":"Usa {highlight}qitqode run{/highlight} para scripting no interactivo","tui.tips.continue":"Usa {highlight}qitqode --continue{/highlight} para retomar la \xFAltima sesi\xF3n","tui.tips.attach_cli":"Usa {highlight}qitqode run -f file.ts{/highlight} para adjuntar archivos v\xEDa CLI","tui.tips.format_json":"Usa {highlight}--format json{/highlight} para obtener salida legible por m\xE1quina en scripts","tui.tips.auth_list":"Ejecuta {highlight}qitqode auth status{/highlight} para ver tu estado de inicio de sesi\xF3n actual","tui.tips.agent_create":"Ejecuta {highlight}qitqode agent create{/highlight} para crear un agente con asistente guiado","tui.tips.theme_system":'Usa {highlight}"theme": "system"{/highlight} para seguir los colores de tu terminal',"tui.tips.theme_files":"Crea archivos JSON de tema en el directorio {highlight}.qitqode/themes/{/highlight}","tui.tips.theme_variants":"Los temas admiten variantes claras/oscuras para ambos modos","tui.tips.theme_ansi":"Referencia colores ANSI 0-255 en temas personalizados","tui.tips.env_var":"Usa la sintaxis {highlight}{env:VAR_NAME}{/highlight} para referenciar variables de entorno en la config","tui.tips.file_var":"Usa {highlight}{file:path}{/highlight} para incluir el contenido de un archivo en valores de la config","tui.tips.instructions":"Usa {highlight}instructions{/highlight} en la config para cargar archivos de reglas adicionales","tui.tips.temperature":"Ajusta la {highlight}temperature{/highlight} del agente desde 0.0 (enfocado) hasta 1.0 (creativo)","tui.tips.steps":"Configura {highlight}steps{/highlight} para limitar las iteraciones ag\xE9nticas por petici\xF3n","tui.tips.disable_tool":'Define {highlight}"tools": {"bash": false}{/highlight} para deshabilitar herramientas concretas',"tui.tips.disable_mcp_tools":'Define {highlight}"mcp_*": false{/highlight} para deshabilitar todas las herramientas de un servidor MCP',"tui.tips.tool_override":"Sobrescribe la configuraci\xF3n global de herramientas en cada agente","tui.tips.doom_loop":"El permiso {highlight}doom_loop{/highlight} previene bucles infinitos de llamadas a herramientas","tui.tips.external_dir":"El permiso {highlight}external_directory{/highlight} protege archivos fuera del proyecto","tui.tips.debug_config":"Ejecuta {highlight}qitqode debug config{/highlight} para diagnosticar problemas de configuraci\xF3n","tui.tips.print_logs":"Usa la opci\xF3n {highlight}--print-logs{/highlight} para ver logs detallados en stderr","tui.tips.timeline":"Pulsa {highlight}Ctrl+X G{/highlight} o {highlight}/timeline{/highlight} para saltar a un mensaje concreto","tui.tips.toggle_code":"Pulsa {highlight}Ctrl+X H{/highlight} para alternar la visibilidad de los bloques de c\xF3digo","tui.tips.status":"Pulsa {highlight}Ctrl+X S{/highlight} o {highlight}/status{/highlight} para ver el estado del sistema","tui.tips.scroll_accel":"Activa {highlight}scroll_acceleration{/highlight} en {highlight}tui.json{/highlight} para un desplazamiento suave","tui.tips.agents_md":"Sube el {highlight}AGENTS.md{/highlight} de tu proyecto a Git para compartirlo con el equipo","tui.tips.review":"Usa {highlight}/review{/highlight} para revisar cambios sin commit, ramas o PR","tui.tips.help":"Ejecuta {highlight}/help{/highlight} o {highlight}Ctrl+X H{/highlight} para abrir el di\xE1logo de ayuda","tui.tips.rename":"Usa {highlight}/rename{/highlight} para renombrar la sesi\xF3n actual","tui.tips.suspend.unix":"Pulsa {highlight}Ctrl+Z{/highlight} para suspender el terminal y volver al shell","tui.tips.suspend.win":"Pulsa {highlight}Ctrl+Z{/highlight} para deshacer cambios en la entrada","tui.command.palette.title":"Comandos","tui.command.palette.suggested":"Sugeridos","tui.command.category.session":"Sesi\xF3n","tui.command.category.agent":"Agente","tui.command.category.provider":"Proveedor","tui.command.category.system":"Sistema","tui.command.category.prompt":"Entrada","tui.command.category.internal":"Interno","tui.command.category.external":"Externo","tui.slash.init.description":"configuraci\xF3n guiada de AGENTS.md","tui.slash.review.description":"revisar cambios [commit|branch|pr], por defecto sin confirmar","tui.slash.dream.description":"consolidar manualmente la memoria del proyecto desde archivos memory y la trayectoria en bruto","tui.slash.distill.description":"encontrar flujos repetidos en el trabajo reciente y empaquetarlos en skills, subagentes o comandos","tui.slash.goal.description":"definir un objetivo con condici\xF3n de parada; se ejecuta hasta que un juez confirme. /goal clear para abortar","tui.slash.deep-research.description":"informe de investigaci\xF3n profunda multi-fuente y verificado (ejecuta el workflow deep-research)","tui.command.language.switch.title":"Cambiar idioma","tui.command.language.switch.description":"Cambiar el idioma de la interfaz","tui.command.language.dialog.title":"Cambiar idioma","tui.language.auto":"Auto (sistema)","tui.language.current":"Actual","tui.command.session.list.title":"Cambiar sesi\xF3n","tui.command.session.new.title":"Nueva sesi\xF3n","tui.command.workflow.list.title":"Flujos de trabajo","tui.command.model.list.title":"Cambiar modelo","tui.command.model.cycle_recent.title":"Ciclo de modelos","tui.command.model.cycle_recent_reverse.title":"Ciclo de modelos (inverso)","tui.command.model.cycle_favorite.title":"Ciclo de favoritos","tui.command.model.cycle_favorite_reverse.title":"Ciclo de favoritos (inverso)","tui.command.agent.list.title":"Cambiar agente","tui.command.mcp.list.title":"Alternar MCP","tui.command.never_ask.title_on":"Sin preguntas: ACTIVADO (auto-decidir, permisos excluidos) \u2014 clic para desactivar","tui.command.never_ask.title_off":"Sin preguntas: DESACTIVADO \u2014 clic para activar (auto-decidir, permisos excluidos)","tui.command.never_ask.toast_on":"Sin preguntas ACTIVADO \u2014 no te preguntar\xE9; elegir\xE9 la mejor opci\xF3n yo mismo hasta que lo desactives (/never-ask). Las solicitudes de permiso siguen requiriendo tu aprobaci\xF3n.","tui.command.never_ask.toast_off":"Sin preguntas DESACTIVADO \u2014 volver\xE9 a preguntarte en los puntos de decisi\xF3n.","tui.command.never_ask.title_on_fullauto":"Sin preguntas: ACTIVADO (auto-decidir; el modo full-auto tambi\xE9n aprueba los permisos) \u2014 clic para desactivar","tui.command.never_ask.title_off_fullauto":"Sin preguntas: DESACTIVADO \u2014 clic para activar (auto-decidir; el modo full-auto sigue aprobando los permisos)","tui.command.never_ask.toast_on_fullauto":"Sin preguntas ACTIVADO \u2014 no te preguntar\xE9; elegir\xE9 la mejor opci\xF3n yo mismo hasta que lo desactives (/never-ask). El modo full-auto est\xE1 activo, as\xED que tambi\xE9n se aprueban autom\xE1ticamente los permisos de herramientas.","tui.command.agent.cycle.title":"Ciclo de agentes","tui.command.variant.cycle.title":"Ciclo de variantes","tui.command.variant.list.title":"Cambiar variante de modelo","tui.command.agent.cycle.reverse.title":"Ciclo de agentes (inverso)","tui.command.provider.login.title":"Iniciar sesi\xF3n","tui.command.provider.logout.title":"Cerrar sesi\xF3n","tui.command.console.org.switch.title":"Cambiar de organizaci\xF3n","tui.command.qitqode.status.title":"Ver estado","tui.command.theme.switch.title":"Cambiar tema","tui.command.theme.switch_mode.to_light":"Cambiar a modo claro","tui.command.theme.switch_mode.to_dark":"Cambiar a modo oscuro","tui.command.theme.mode.unlock":"Desbloquear modo del tema","tui.command.theme.mode.lock":"Bloquear modo del tema","tui.command.help.show.title":"Ayuda","tui.dialog.help.close_hint":"esc/enter/space","tui.dialog.help.accessibility":"Accesibilidad: activa o desactiva animaciones y sonido desde la lista de comandos. Variables de entorno: NO_COLOR, QITQODE_TUI_ACCESSIBLE, QITQODE_REDUCE_MOTION, QITQODE_TUI_SOUND.","tui.dialog.help.announcements":"Anuncios: en modo accesible, elige el nivel de detalle de los anuncios para lectores de pantalla (silencioso, normal, detallado) desde la lista de comandos o con QITQODE_TUI_ANNOUNCEMENTS. Los errores siempre se anuncian.","tui.dialog.help.dialog_keys":"Di\xE1logos: todos los di\xE1logos funcionan solo con el teclado \u2014 Esc cierra, Tab o las flechas mueven el foco, Enter o Espacio activan el control enfocado.","tui.command.app.announcements.cycle":"Anuncios: {{level}} (selecciona para cambiar)","tui.announcements.level.quiet":"silencioso","tui.announcements.level.normal":"normal","tui.announcements.level.verbose":"detallado","tui.app.terminal_too_small":"Terminal demasiado peque\xF1a ({{width}}x{{height}}). Ampl\xEDala al menos a 40x8.","tui.dialog.help.command_list":"Pulsa {{keybind}} para ver todas las acciones y comandos disponibles en cualquier contexto.","tui.dialog.help.ok":"Aceptar","tui.dialog.close_hint":"esc","tui.dialog.document.scroll_hint":"\u2191/\u2193 desplazar \xB7 ReP\xE1g/AvP\xE1g p\xE1gina \xB7 esc cerrar","tui.dialog.ok":"Aceptar","tui.dialog.confirm.cancel":"Cancelar","tui.dialog.confirm.confirm":"Confirmar","tui.dialog.agreement.title":"T\xE9rminos y privacidad","tui.dialog.agreement.message":"Rev\xEDsalos y acepta para continuar.","tui.dialog.agreement.confirm":"Aceptar y continuar","tui.command.docs.terms.title":"Ver los t\xE9rminos de servicio","tui.command.docs.privacy.title":"Ver la pol\xEDtica de privacidad","tui.command.consent.revoke.title":"Revocar el acuerdo de modelo gratuito","tui.consent.revoked":"Acuerdo de modelo gratuito revocado: se te pedir\xE1 aceptarlo de nuevo","tui.dialog.select.placeholder":"Buscar","tui.dialog.select.no_results":"No se encontraron resultados","tui.dialog.prompt.placeholder":"Introduce texto","tui.dialog.prompt.busy":"Trabajando...","tui.dialog.prompt.processing":"procesando...","tui.dialog.prompt.submit_key":"enter","tui.dialog.prompt.submit_action":"enviar","tui.dialog.export.title":"Opciones de exportaci\xF3n","tui.dialog.export.filename":"Nombre de archivo:","tui.dialog.export.filename_placeholder":"Introduce el nombre de archivo","tui.dialog.export.include_thinking":"Incluir razonamiento","tui.dialog.export.include_tool_details":"Incluir detalles de herramientas","tui.dialog.export.include_assistant_metadata":"Incluir metadatos del asistente","tui.dialog.export.open_without_saving":"Abrir sin guardar","tui.dialog.export.hint.toggle_prefix":"Pulsa","tui.dialog.export.hint.toggle_action":"para alternar","tui.dialog.export.hint.confirm_action":"para confirmar","tui.dialog.export.hint.options_action":"para opciones","tui.toast.copied_to_clipboard":"Copiado al portapapeles","tui.toast.instructions_loaded":"Cargado {{files}}","tui.toast.update_available.title":"Actualizaci\xF3n disponible","tui.toast.update_available.confirm":"La nueva versi\xF3n v{{version}} est\xE1 disponible. \xBFDesea actualizar ahora?","tui.toast.update_available.updating":"Actualizando a v{{version}}...","tui.toast.update_available.failed":"La actualizaci\xF3n fall\xF3","tui.toast.update_available.success":"Se actualiz\xF3 a QitQode v{{version}}. Por favor reinicie la aplicaci\xF3n.","tui.toast.updated.title":"Actualizado autom\xE1ticamente","tui.toast.updated.message":"Parche aplicado autom\xE1ticamente: v{{version}}. Reinicie para usar la nueva versi\xF3n. Desactive con autoupdate: false en la configuraci\xF3n.","tui.sidebar.instructions":"Instrucciones","tui.sidebar.cwd":"Directorio de trabajo","tui.toast.unknown_error":"Ha ocurrido un error desconocido","tui.command.docs.open.title":"Abrir documentaci\xF3n","tui.command.app.exit.title":"Salir de la aplicaci\xF3n","tui.command.app.debug.title":"Alternar panel de depuraci\xF3n","tui.command.app.console.title":"Alternar consola","tui.command.app.heap_snapshot.title":"Exportar snapshot del heap","tui.command.terminal.suspend.title":"Suspender terminal","tui.command.terminal.title.disable":"Deshabilitar t\xEDtulo del terminal","tui.command.terminal.title.enable":"Habilitar t\xEDtulo del terminal","tui.command.app.toggle.animations.disable":"Deshabilitar animaciones","tui.command.app.toggle.animations.enable":"Habilitar animaciones","tui.command.app.toggle.diffwrap.disable":"Deshabilitar ajuste de diff","tui.command.app.toggle.diffwrap.enable":"Habilitar ajuste de diff","tui.command.app.toggle.sound.disable":"Desactivar sonido","tui.command.app.toggle.sound.enable":"Activar sonido","tui.command.logout.toast":"Sesi\xF3n cerrada","tui.command.session.share.title":"Compartir sesi\xF3n","tui.command.session.share.copy_link":"Copiar enlace para compartir","tui.command.session.rename.title":"Renombrar sesi\xF3n","tui.command.session.timeline.title":"Saltar a un mensaje","tui.command.session.fork.title":"Bifurcar sesi\xF3n","tui.command.session.compact.title":"Compactar sesi\xF3n","tui.command.session.unshare.title":"Dejar de compartir","tui.command.session.undo.title":"Deshacer mensaje anterior","tui.command.session.redo.title":"Rehacer","tui.command.session.sidebar.show":"Mostrar barra lateral","tui.command.session.sidebar.hide":"Ocultar barra lateral","tui.command.session.conceal.disable":"Deshabilitar ocultaci\xF3n de c\xF3digo","tui.command.session.conceal.enable":"Habilitar ocultaci\xF3n de c\xF3digo","tui.command.session.timestamps.show":"Mostrar marcas de tiempo","tui.command.session.timestamps.hide":"Ocultar marcas de tiempo","tui.command.session.thinking.expand":"Expandir razonamiento","tui.command.session.thinking.collapse":"Colapsar razonamiento","tui.command.session.tool_details.show":"Mostrar detalles de herramientas","tui.command.session.tool_details.hide":"Ocultar detalles de herramientas","tui.command.session.scrollbar.toggle":"Alternar barra de desplazamiento","tui.command.session.generic_tool_output.show":"Mostrar salida de herramienta gen\xE9rica","tui.command.session.generic_tool_output.hide":"Ocultar salida de herramienta gen\xE9rica","tui.command.session.page_up.title":"P\xE1gina anterior","tui.command.session.page_down.title":"P\xE1gina siguiente","tui.command.session.line_up.title":"L\xEDnea arriba","tui.command.session.line_down.title":"L\xEDnea abajo","tui.command.session.half_page_up.title":"Media p\xE1gina arriba","tui.command.session.half_page_down.title":"Media p\xE1gina abajo","tui.command.session.first.title":"Primer mensaje","tui.command.session.last.title":"\xDAltimo mensaje","tui.command.session.last_user.title":"Ir al \xFAltimo mensaje del usuario","tui.command.session.message_next.title":"Mensaje siguiente","tui.command.session.message_previous.title":"Mensaje anterior","tui.command.messages.copy.title":"Copiar \xFAltimo mensaje del asistente","tui.command.session.copy.title":"Copiar transcripci\xF3n de la sesi\xF3n","tui.command.session.export.title":"Exportar transcripci\xF3n","tui.command.session.child_first.title":"Ir a la sesi\xF3n hija","tui.command.session.parent.title":"Ir a la sesi\xF3n padre","tui.command.session.child_next.title":"Sesi\xF3n hija siguiente","tui.command.session.child_previous.title":"Sesi\xF3n hija anterior","tui.command.prompt.clear.title":"Vaciar entrada","tui.command.prompt.submit.title":"Enviar prompt","tui.command.prompt.paste.title":"Pegar","tui.command.session.interrupt.title":"Interrumpir sesi\xF3n","tui.command.prompt.editor.title":"Abrir editor","tui.command.prompt.skills.title":"Habilidades","tui.command.voice.toggle.title":"Alternar entrada de voz","tui.command.voice.toggle.title_on":"Entrada de voz: activada \u2014 clic para desactivar","tui.command.voice.toggle.title_off":"Entrada de voz: desactivada \u2014 clic para activar","tui.voice.enabled":"Entrada de voz activada (chino/ingl\xE9s) \u2014 clic en [Voice] para grabar","tui.voice.disabled":"Entrada de voz deshabilitada","tui.voice.send.enabled":'Env\xEDo por voz habilitado \u2014 di\u300C\u53D1\u9001\u300Do "send it" para enviar',"tui.voice.send.disabled":"Env\xEDo por voz deshabilitado","tui.command.voice.send.title":"Alternar env\xEDo por voz","tui.command.voice.send.title_on":"Env\xEDo por voz: activado \u2014 clic para desactivar","tui.command.voice.send.title_off":"Env\xEDo por voz: desactivado \u2014 clic para activar","tui.voice.control.enabled":"Control de voz habilitado \u2014 usa modelo multimodal para edici\xF3n inteligente (m\xE1s lento)","tui.voice.control.disabled":"Control de voz deshabilitado \u2014 usa transcripci\xF3n ASR r\xE1pida","tui.command.voice.control.title":"Alternar control de voz (multimodal)","tui.command.voice.control.title_on":"Control de voz: activado (multimodal) \u2014 clic para desactivar","tui.command.voice.control.title_off":"Control de voz: desactivado (ASR r\xE1pido) \u2014 clic para activar","tui.voice.error.no_auth":"Usa /connect para conectar tu cuenta QitQode, o configura voice.asr_model para otro proveedor","tui.voice.error.no_auth_provider":'El proveedor de voz "{{provider}}" no est\xE1 autenticado, revisa su apiKey',"tui.voice.error.provider_not_found":'Proveedor "{{provider}}" no disponible \u2014 /connect para autenticarte, o declara models en la config para endpoints personalizados',"tui.voice.error.no_url":'El proveedor "{{provider}}" no tiene baseURL configurada \u2014 configura options.baseURL',"tui.voice.error.no_device":"No se encontr\xF3 micr\xF3fono/dispositivo de audio \u2014 verifica la configuraci\xF3n de audio del sistema","tui.voice.error.recorder_failed":"Error de grabaci\xF3n","tui.voice.error.no_recorder":"No se encontr\xF3 herramienta de grabaci\xF3n, instala sox","tui.voice.error.too_short":"Grabaci\xF3n demasiado corta","tui.voice.error.network":"La transcripci\xF3n fall\xF3, verifica tu red","tui.voice.error.empty_send":"No hay contenido para enviar","tui.voice.error.unknown_agent":'Agente "{{name}}" no encontrado',"tui.command.prompt.stash.title":"Guardar prompt","tui.command.prompt.stash.pop.title":"Recuperar prompt","tui.command.prompt.stash.list.title":"Lista de prompts guardados","tui.command.tips.toggle.show":"Mostrar sugerencias","tui.command.tips.toggle.hide":"Ocultar sugerencias","tui.command.plugins.list.title":"Plugins","tui.command.plugins.install.title":"Instalar plugin","tui.question.plan_enter.question":"\xBFDesea cambiar al modo plan para una planificaci\xF3n estructurada?","tui.question.plan_enter.header":"Entrar al plan","tui.question.plan_enter.option.0.label":"S\xED","tui.question.plan_enter.option.0.description":"Cambiar al agente plan para planificaci\xF3n de solo lectura","tui.question.plan_enter.option.1.label":"No","tui.question.plan_enter.option.1.description":"Permanecer en el modo actual","tui.question.plan_exit.question":"El plan en {{plan}} est\xE1 completo. \xBFDesea cambiar al agente build para comenzar la implementaci\xF3n?","tui.question.plan_exit.header":"Salir del plan","tui.question.plan_exit.option.0.label":"S\xED","tui.question.plan_exit.option.0.description":"Cambiar al agente build y comenzar la implementaci\xF3n del plan","tui.question.plan_exit.option.1.label":"No","tui.question.plan_exit.option.1.description":"Permanecer con el agente plan para seguir refinando","tui.session.badge.auto":"Auto","trust.title":"Accediendo al espacio de trabajo:","trust.safety_check":"Verificaci\xF3n r\xE1pida: \xBFEs este un proyecto que creaste o en el que conf\xEDas? (Tu propio c\xF3digo, un proyecto open source conocido o trabajo de tu equipo). Si no, t\xF3mate un momento para revisar el contenido de esta carpeta.","trust.capabilities":"QitQode podr\xE1 leer, editar y ejecutar archivos aqu\xED.","trust.plugin_warn":"Si existen plugins maliciosos en este directorio, pueden ejecutar c\xF3digo arbitrario, leer, modificar o exfiltrar tus archivos.","trust.option.yes":"S\xED, conf\xEDo en esta carpeta","trust.option.no":"No, salir","trust.dangerous.title_home":"ADVERTENCIA: Est\xE1s a punto de abrir tu DIRECTORIO PERSONAL.","trust.dangerous.title_root":"ADVERTENCIA: Est\xE1s a punto de abrir la RA\xCDZ DEL SISTEMA DE ARCHIVOS.","trust.dangerous.body_home":"El modelo tendr\xE1 acceso a TODOS tus archivos personales \u2014 claves SSH, credenciales, perfiles del navegador y todo lo dem\xE1s en tu carpeta personal.","trust.dangerous.body_root":"El modelo tendr\xE1 acceso a TODO el sistema de archivos \u2014 archivos del sistema, datos de todos los usuarios, credenciales y todo en esta m\xE1quina.","trust.dangerous.advice_home":"A menos que tengas una raz\xF3n muy espec\xEDfica, NO conf\xEDes en todo tu directorio personal.","trust.dangerous.advice_root":"A menos que tengas una raz\xF3n muy espec\xEDfica, NO conf\xEDes en la ra\xEDz del sistema de archivos.","trust.dangerous.option.yes":"Entiendo los riesgos, confiar solo esta sesi\xF3n","trust.dangerous.option.no":"Salir (recomendado)"};export{f as dict};
2
+ import"./chunk-3z7r4c0p.js";import"./chunk-pfx8ts02.js";var f={"language.en":"English","language.zh":"\u7B80\u4F53\u4E2D\u6587","language.zht":"\u7E41\u9AD4\u4E2D\u6587","language.ko":"\uD55C\uAD6D\uC5B4","language.de":"Deutsch","language.es":"Espa\xF1ol","language.fr":"Fran\xE7ais","language.da":"Dansk","language.ja":"\u65E5\u672C\u8A9E","language.pl":"Polski","language.ru":"\u0420\u0443\u0441\u0441\u043A\u0438\u0439","language.ar":"\u0627\u0644\u0639\u0631\u0628\u064A\u0629","language.no":"Norsk","language.br":"Portugu\xEAs (Brasil)","language.pt":"Portugu\xEAs","language.bs":"Bosanski","language.th":"\u0E44\u0E17\u0E22","language.tr":"T\xFCrk\xE7e","tui.prompt.placeholder.normal":'Pregunta lo que quieras... "{{example}}"',"tui.prompt.placeholder.shell":'Ejecuta un comando... "{{example}}"',"tui.prompt.ghost":"{{prediction}} (Tab para aceptar)","tui.home.placeholder.example.todo":"Corregir un TODO en el c\xF3digo","tui.home.placeholder.example.stack":"\xBFCu\xE1l es el stack t\xE9cnico del proyecto?","tui.home.placeholder.example.tests":"Arreglar las pruebas fallidas","tui.home.agreement.prefix":"Al usar QitQode, aceptas nuestros ","tui.home.agreement.terms":"T\xE9rminos de servicio","tui.home.agreement.separator":" y la ","tui.home.agreement.privacy":"Pol\xEDtica de privacidad","tui.home.agreement.suffix":"","tui.prompt.hint.attach_file":"adjuntar archivo","tui.prompt.hint.subagent":"subagente","tui.prompt.hint.commands":"comandos","tui.prompt.hint.switch_mode":"cambiar modo","tui.prompt.hint.settings":"ajustes","tui.tips.label":"Sugerencia","tui.tips.plain_terminal":"Recomendamos usar iTerm o la terminal de VS Code","tui.tips.attach_file":"Escribe {highlight}@{/highlight} seguido del nombre de archivo para buscar de forma difusa y adjuntar archivos","tui.tips.shell_prefix":"Empieza un mensaje con {highlight}!{/highlight} para ejecutar comandos del shell directamente (p. ej., {highlight}!ls -la{/highlight})","tui.tips.tab_agent":"Pulsa {highlight}Tab{/highlight} o {highlight}Shift+Tab{/highlight} para alternar entre los agentes Build, Plan y Compose","tui.tips.theme_mode":"Ejecuta {highlight}/dark{/highlight} para el modo oscuro o {highlight}/light{/highlight} para el modo claro","tui.tips.doc":"Ejecuta {highlight}/doc{/highlight} para abrir la documentaci\xF3n de usuario","tui.tips.undo":"Usa {highlight}/undo{/highlight} para revertir el \xFAltimo mensaje y los cambios en archivos","tui.tips.redo":"Usa {highlight}/redo{/highlight} para restaurar mensajes y cambios deshechos previamente","tui.tips.drag_drop":"Arrastra y suelta im\xE1genes o PDF en el terminal para a\xF1adirlos como contexto","tui.tips.paste_image":"Pulsa {highlight}Ctrl+V{/highlight} para pegar im\xE1genes desde el portapapeles en la entrada","tui.tips.editor":"Pulsa {highlight}Ctrl+X E{/highlight} o {highlight}/editor{/highlight} para componer mensajes en tu editor externo","tui.tips.init":"Ejecuta {highlight}/init{/highlight} para autogenerar reglas del proyecto a partir de tu c\xF3digo","tui.tips.models":"Ejecuta {highlight}/models{/highlight} o {highlight}Ctrl+X M{/highlight} para cambiar entre los modelos disponibles","tui.tips.theme":'Bloquea el modo de tema frente al fondo de tu terminal \u2014 abre la paleta de comandos ({highlight}Ctrl+P{/highlight}) y busca "lock"',"tui.tips.new_session":"Pulsa {highlight}Ctrl+X N{/highlight} o {highlight}/new{/highlight} para iniciar una nueva sesi\xF3n","tui.tips.sessions":"Usa {highlight}/sessions{/highlight} o {highlight}Ctrl+X L{/highlight} para listar y continuar conversaciones anteriores","tui.tips.compact":"Ejecuta {highlight}/compact{/highlight} para resumir sesiones largas cerca del l\xEDmite de contexto","tui.tips.export":"Pulsa {highlight}Ctrl+X X{/highlight} o {highlight}/export{/highlight} para guardar la conversaci\xF3n como Markdown","tui.tips.copy_last":"Pulsa {highlight}Ctrl+X Y{/highlight} para copiar el \xFAltimo mensaje del asistente al portapapeles","tui.tips.command_palette":"Pulsa {highlight}Ctrl+P{/highlight} para ver todas las acciones y comandos disponibles","tui.tips.leader":"La tecla l\xEDder es {highlight}Ctrl+X{/highlight}; comb\xEDnala con otras teclas para acciones r\xE1pidas","tui.tips.f2":"Pulsa {highlight}F2{/highlight} para alternar r\xE1pidamente entre los modelos usados recientemente","tui.tips.sidebar":"Pulsa {highlight}Ctrl+X B{/highlight} para mostrar/ocultar la barra lateral","tui.tips.history":"Usa {highlight}PageUp{/highlight}/{highlight}PageDown{/highlight} para navegar por el historial de la conversaci\xF3n","tui.tips.jump_first":"Pulsa {highlight}Ctrl+G{/highlight} o {highlight}Home{/highlight} para ir al inicio de la conversaci\xF3n","tui.tips.jump_last":"Pulsa {highlight}Ctrl+Alt+G{/highlight} o {highlight}End{/highlight} para ir al mensaje m\xE1s reciente","tui.tips.newline":"Pulsa {highlight}Shift+Enter{/highlight} o {highlight}Ctrl+J{/highlight} para a\xF1adir saltos de l\xEDnea en la entrada","tui.tips.clear_input":"Pulsa {highlight}Ctrl+C{/highlight} mientras escribes para vaciar el campo de entrada","tui.tips.escape":"Pulsa {highlight}Escape{/highlight} para detener la respuesta de la IA en curso","tui.tips.plan_agent":"Cambia al agente {highlight}Plan{/highlight} para obtener sugerencias sin aplicar cambios reales","tui.tips.subagent":"Usa {highlight}@agent-name{/highlight} en las indicaciones para invocar subagentes especializados","tui.tips.cycle_sessions":"Pulsa {highlight}Ctrl+X Right/Left{/highlight} para alternar entre sesiones padre e hija","tui.tips.config_files":"Crea {highlight}qitqode.json{/highlight} para la configuraci\xF3n del servidor y {highlight}tui.json{/highlight} para la TUI","tui.tips.global_config":"Coloca la configuraci\xF3n de TUI en {highlight}~/.config/qitqode/tui.json{/highlight} como configuraci\xF3n global","tui.tips.schema":"A\xF1ade {highlight}$schema{/highlight} a tu configuraci\xF3n para autocompletado en el editor","tui.tips.default_model":"Configura {highlight}model{/highlight} en la config para definir tu modelo por defecto","tui.tips.keybinds":"Sobrescribe cualquier atajo en {highlight}tui.json{/highlight} mediante la secci\xF3n {highlight}keybinds{/highlight}","tui.tips.disable_keybind":"Establece un atajo en {highlight}none{/highlight} para deshabilitarlo por completo","tui.tips.mcp_config":"Configura servidores MCP locales o remotos en la secci\xF3n {highlight}mcp{/highlight}","tui.tips.mcp_oauth":"QitQode gestiona autom\xE1ticamente OAuth para servidores MCP remotos que requieran autenticaci\xF3n","tui.tips.custom_command":"A\xF1ade archivos {highlight}.md{/highlight} en {highlight}.qitqode/command/{/highlight} para definir indicaciones personalizadas reutilizables","tui.tips.command_args":"Usa {highlight}$ARGUMENTS{/highlight}, {highlight}$1{/highlight}, {highlight}$2{/highlight} en comandos personalizados para entradas din\xE1micas","tui.tips.command_backticks":"Usa comillas invertidas en los comandos para inyectar la salida del shell (p. ej. {highlight}`git status`{/highlight})","tui.tips.custom_agent":"A\xF1ade archivos {highlight}.md{/highlight} en {highlight}.qitqode/agent/{/highlight} para personajes de IA especializados","tui.tips.agent_perms":"Configura por agente los permisos de las herramientas {highlight}edit{/highlight}, {highlight}bash{/highlight} y {highlight}webfetch{/highlight}","tui.tips.bash_allow":'Usa patrones como {highlight}"git *": "allow"{/highlight} para permisos de bash m\xE1s finos',"tui.tips.bash_deny":'Define {highlight}"rm -rf *": "deny"{/highlight} para bloquear comandos destructivos',"tui.tips.bash_ask":'Configura {highlight}"git push": "ask"{/highlight} para exigir confirmaci\xF3n antes de hacer push',"tui.tips.formatter":"QitQode formatea archivos autom\xE1ticamente con prettier, gofmt, ruff y m\xE1s","tui.tips.disable_formatter":'Define {highlight}"formatter": false{/highlight} en la config para desactivar el formato autom\xE1tico',"tui.tips.custom_formatter":"Define comandos de formateo personalizados por extensi\xF3n de archivo en la configuraci\xF3n","tui.tips.lsp":"QitQode usa servidores LSP para an\xE1lisis inteligente de c\xF3digo","tui.tips.custom_tool":"Crea archivos {highlight}.ts{/highlight} en {highlight}.qitqode/tools/{/highlight} para definir nuevas herramientas LLM","tui.tips.tool_scripts":"Las definiciones de herramientas pueden invocar scripts en Python, Go, etc.","tui.tips.plugins":"A\xF1ade archivos {highlight}.ts{/highlight} en {highlight}.qitqode/plugin/{/highlight} para enganchar eventos","tui.tips.plugin_notify":"Usa plugins para enviar notificaciones del sistema cuando termine una sesi\xF3n","tui.tips.plugin_protect":"Crea un plugin que impida a QitQode leer archivos sensibles","tui.tips.run":"Usa {highlight}qitqode run{/highlight} para scripting no interactivo","tui.tips.continue":"Usa {highlight}qitqode --continue{/highlight} para retomar la \xFAltima sesi\xF3n","tui.tips.attach_cli":"Usa {highlight}qitqode run -f file.ts{/highlight} para adjuntar archivos v\xEDa CLI","tui.tips.format_json":"Usa {highlight}--format json{/highlight} para obtener salida legible por m\xE1quina en scripts","tui.tips.auth_list":"Ejecuta {highlight}qitqode auth status{/highlight} para ver tu estado de inicio de sesi\xF3n actual","tui.tips.agent_create":"Ejecuta {highlight}qitqode agent create{/highlight} para crear un agente con asistente guiado","tui.tips.theme_system":'Usa {highlight}"theme": "system"{/highlight} para seguir los colores de tu terminal',"tui.tips.theme_files":"Crea archivos JSON de tema en el directorio {highlight}.qitqode/themes/{/highlight}","tui.tips.theme_variants":"Los temas admiten variantes claras/oscuras para ambos modos","tui.tips.theme_ansi":"Referencia colores ANSI 0-255 en temas personalizados","tui.tips.env_var":"Usa la sintaxis {highlight}{env:VAR_NAME}{/highlight} para referenciar variables de entorno en la config","tui.tips.file_var":"Usa {highlight}{file:path}{/highlight} para incluir el contenido de un archivo en valores de la config","tui.tips.instructions":"Usa {highlight}instructions{/highlight} en la config para cargar archivos de reglas adicionales","tui.tips.temperature":"Ajusta la {highlight}temperature{/highlight} del agente desde 0.0 (enfocado) hasta 1.0 (creativo)","tui.tips.steps":"Configura {highlight}steps{/highlight} para limitar las iteraciones ag\xE9nticas por petici\xF3n","tui.tips.disable_tool":'Define {highlight}"tools": {"bash": false}{/highlight} para deshabilitar herramientas concretas',"tui.tips.disable_mcp_tools":'Define {highlight}"mcp_*": false{/highlight} para deshabilitar todas las herramientas de un servidor MCP',"tui.tips.tool_override":"Sobrescribe la configuraci\xF3n global de herramientas en cada agente","tui.tips.doom_loop":"El permiso {highlight}doom_loop{/highlight} previene bucles infinitos de llamadas a herramientas","tui.tips.external_dir":"El permiso {highlight}external_directory{/highlight} protege archivos fuera del proyecto","tui.tips.debug_config":"Ejecuta {highlight}qitqode debug config{/highlight} para diagnosticar problemas de configuraci\xF3n","tui.tips.print_logs":"Usa la opci\xF3n {highlight}--print-logs{/highlight} para ver logs detallados en stderr","tui.tips.timeline":"Pulsa {highlight}Ctrl+X G{/highlight} o {highlight}/timeline{/highlight} para saltar a un mensaje concreto","tui.tips.toggle_code":"Pulsa {highlight}Ctrl+X H{/highlight} para alternar la visibilidad de los bloques de c\xF3digo","tui.tips.status":"Pulsa {highlight}Ctrl+X S{/highlight} o {highlight}/status{/highlight} para ver el estado del sistema","tui.tips.scroll_accel":"Activa {highlight}scroll_acceleration{/highlight} en {highlight}tui.json{/highlight} para un desplazamiento suave","tui.tips.agents_md":"Sube el {highlight}AGENTS.md{/highlight} de tu proyecto a Git para compartirlo con el equipo","tui.tips.review":"Usa {highlight}/review{/highlight} para revisar cambios sin commit, ramas o PR","tui.tips.help":"Ejecuta {highlight}/help{/highlight} o {highlight}Ctrl+X H{/highlight} para abrir el di\xE1logo de ayuda","tui.tips.rename":"Usa {highlight}/rename{/highlight} para renombrar la sesi\xF3n actual","tui.tips.suspend.unix":"Pulsa {highlight}Ctrl+Z{/highlight} para suspender el terminal y volver al shell","tui.tips.suspend.win":"Pulsa {highlight}Ctrl+Z{/highlight} para deshacer cambios en la entrada","tui.command.palette.title":"Comandos","tui.command.palette.suggested":"Sugeridos","tui.command.category.session":"Sesi\xF3n","tui.command.category.agent":"Agente","tui.command.category.provider":"Proveedor","tui.command.category.system":"Sistema","tui.command.category.prompt":"Entrada","tui.command.category.internal":"Interno","tui.command.category.external":"Externo","tui.slash.init.description":"configuraci\xF3n guiada de AGENTS.md","tui.slash.review.description":"revisar cambios [commit|branch|pr], por defecto sin confirmar","tui.slash.dream.description":"consolidar manualmente la memoria del proyecto desde archivos memory y la trayectoria en bruto","tui.slash.distill.description":"encontrar flujos repetidos en el trabajo reciente y empaquetarlos en skills, subagentes o comandos","tui.slash.goal.description":"definir un objetivo con condici\xF3n de parada; se ejecuta hasta que un juez confirme. /goal clear para abortar","tui.slash.deep-research.description":"informe de investigaci\xF3n profunda multi-fuente y verificado (ejecuta el workflow deep-research)","tui.command.language.switch.title":"Cambiar idioma","tui.command.language.switch.description":"Cambiar el idioma de la interfaz","tui.command.language.dialog.title":"Cambiar idioma","tui.language.auto":"Auto (sistema)","tui.language.current":"Actual","tui.command.session.list.title":"Cambiar sesi\xF3n","tui.command.session.new.title":"Nueva sesi\xF3n","tui.command.workflow.list.title":"Flujos de trabajo","tui.command.model.list.title":"Cambiar modelo","tui.command.model.cycle_recent.title":"Ciclo de modelos","tui.command.model.cycle_recent_reverse.title":"Ciclo de modelos (inverso)","tui.command.model.cycle_favorite.title":"Ciclo de favoritos","tui.command.model.cycle_favorite_reverse.title":"Ciclo de favoritos (inverso)","tui.command.agent.list.title":"Cambiar agente","tui.command.mcp.list.title":"Alternar MCP","tui.command.never_ask.title_on":"Sin preguntas: ACTIVADO (auto-decidir, permisos excluidos) \u2014 clic para desactivar","tui.command.never_ask.title_off":"Sin preguntas: DESACTIVADO \u2014 clic para activar (auto-decidir, permisos excluidos)","tui.command.never_ask.toast_on":"Sin preguntas ACTIVADO \u2014 no te preguntar\xE9; elegir\xE9 la mejor opci\xF3n yo mismo hasta que lo desactives (/never-ask). Las solicitudes de permiso siguen requiriendo tu aprobaci\xF3n.","tui.command.never_ask.toast_off":"Sin preguntas DESACTIVADO \u2014 volver\xE9 a preguntarte en los puntos de decisi\xF3n.","tui.command.never_ask.title_on_fullauto":"Sin preguntas: ACTIVADO (auto-decidir; el modo full-auto tambi\xE9n aprueba los permisos) \u2014 clic para desactivar","tui.command.never_ask.title_off_fullauto":"Sin preguntas: DESACTIVADO \u2014 clic para activar (auto-decidir; el modo full-auto sigue aprobando los permisos)","tui.command.never_ask.toast_on_fullauto":"Sin preguntas ACTIVADO \u2014 no te preguntar\xE9; elegir\xE9 la mejor opci\xF3n yo mismo hasta que lo desactives (/never-ask). El modo full-auto est\xE1 activo, as\xED que tambi\xE9n se aprueban autom\xE1ticamente los permisos de herramientas.","tui.command.agent.cycle.title":"Ciclo de agentes","tui.command.variant.cycle.title":"Ciclo de variantes","tui.command.variant.list.title":"Cambiar variante de modelo","tui.command.agent.cycle.reverse.title":"Ciclo de agentes (inverso)","tui.command.provider.login.title":"Iniciar sesi\xF3n","tui.command.provider.logout.title":"Cerrar sesi\xF3n","tui.command.console.org.switch.title":"Cambiar de organizaci\xF3n","tui.command.qitqode.status.title":"Ver estado","tui.command.theme.switch.title":"Cambiar tema","tui.command.theme.switch_mode.to_light":"Cambiar a modo claro","tui.command.theme.switch_mode.to_dark":"Cambiar a modo oscuro","tui.command.theme.mode.unlock":"Desbloquear modo del tema","tui.command.theme.mode.lock":"Bloquear modo del tema","tui.command.help.show.title":"Ayuda","tui.dialog.help.close_hint":"esc/enter/space","tui.dialog.help.accessibility":"Accesibilidad: activa o desactiva animaciones y sonido desde la lista de comandos. Variables de entorno: NO_COLOR, QITQODE_TUI_ACCESSIBLE, QITQODE_REDUCE_MOTION, QITQODE_TUI_SOUND.","tui.dialog.help.announcements":"Anuncios: en modo accesible, elige el nivel de detalle de los anuncios para lectores de pantalla (silencioso, normal, detallado) desde la lista de comandos o con QITQODE_TUI_ANNOUNCEMENTS. Los errores siempre se anuncian.","tui.dialog.help.dialog_keys":"Di\xE1logos: todos los di\xE1logos funcionan solo con el teclado \u2014 Esc cierra, Tab o las flechas mueven el foco, Enter o Espacio activan el control enfocado.","tui.command.app.announcements.cycle":"Anuncios: {{level}} (selecciona para cambiar)","tui.announcements.level.quiet":"silencioso","tui.announcements.level.normal":"normal","tui.announcements.level.verbose":"detallado","tui.app.terminal_too_small":"Terminal demasiado peque\xF1a ({{width}}x{{height}}). Ampl\xEDala al menos a 40x8.","tui.dialog.help.command_list":"Pulsa {{keybind}} para ver todas las acciones y comandos disponibles en cualquier contexto.","tui.dialog.help.ok":"Aceptar","tui.dialog.close_hint":"esc","tui.dialog.document.scroll_hint":"\u2191/\u2193 desplazar \xB7 ReP\xE1g/AvP\xE1g p\xE1gina \xB7 esc cerrar","tui.dialog.ok":"Aceptar","tui.dialog.confirm.cancel":"Cancelar","tui.dialog.confirm.confirm":"Confirmar","tui.dialog.agreement.title":"T\xE9rminos y privacidad","tui.dialog.agreement.message":"Rev\xEDsalos y acepta para continuar.","tui.dialog.agreement.confirm":"Aceptar y continuar","tui.command.docs.terms.title":"Ver los t\xE9rminos de servicio","tui.command.docs.privacy.title":"Ver la pol\xEDtica de privacidad","tui.command.consent.revoke.title":"Revocar el acuerdo de modelo gratuito","tui.consent.revoked":"Acuerdo de modelo gratuito revocado: se te pedir\xE1 aceptarlo de nuevo","tui.dialog.select.placeholder":"Buscar","tui.dialog.select.no_results":"No se encontraron resultados","tui.dialog.prompt.placeholder":"Introduce texto","tui.dialog.prompt.busy":"Trabajando...","tui.dialog.prompt.processing":"procesando...","tui.dialog.prompt.submit_key":"enter","tui.dialog.prompt.submit_action":"enviar","tui.dialog.export.title":"Opciones de exportaci\xF3n","tui.dialog.export.filename":"Nombre de archivo:","tui.dialog.export.filename_placeholder":"Introduce el nombre de archivo","tui.dialog.export.include_thinking":"Incluir razonamiento","tui.dialog.export.include_tool_details":"Incluir detalles de herramientas","tui.dialog.export.include_assistant_metadata":"Incluir metadatos del asistente","tui.dialog.export.open_without_saving":"Abrir sin guardar","tui.dialog.export.hint.toggle_prefix":"Pulsa","tui.dialog.export.hint.toggle_action":"para alternar","tui.dialog.export.hint.confirm_action":"para confirmar","tui.dialog.export.hint.options_action":"para opciones","tui.toast.copied_to_clipboard":"Copiado al portapapeles","tui.toast.instructions_loaded":"Cargado {{files}}","tui.toast.update_available.title":"Actualizaci\xF3n disponible","tui.toast.update_available.confirm":"La nueva versi\xF3n v{{version}} est\xE1 disponible. \xBFDesea actualizar ahora?","tui.toast.update_available.updating":"Actualizando a v{{version}}...","tui.toast.update_available.failed":"La actualizaci\xF3n fall\xF3","tui.toast.update_available.success":"Se actualiz\xF3 a QitQode v{{version}}. Por favor reinicie la aplicaci\xF3n.","tui.toast.updated.title":"Actualizado autom\xE1ticamente","tui.toast.updated.message":"Parche aplicado autom\xE1ticamente: v{{version}}. Reinicie para usar la nueva versi\xF3n. Desactive con autoupdate: false en la configuraci\xF3n.","tui.sidebar.instructions":"Instrucciones","tui.sidebar.cwd":"Directorio de trabajo","tui.toast.unknown_error":"Ha ocurrido un error desconocido","tui.command.docs.open.title":"Abrir documentaci\xF3n","tui.command.app.exit.title":"Salir de la aplicaci\xF3n","tui.command.app.debug.title":"Alternar panel de depuraci\xF3n","tui.command.app.console.title":"Alternar consola","tui.command.app.heap_snapshot.title":"Exportar snapshot del heap","tui.command.terminal.suspend.title":"Suspender terminal","tui.command.terminal.title.disable":"Deshabilitar t\xEDtulo del terminal","tui.command.terminal.title.enable":"Habilitar t\xEDtulo del terminal","tui.command.app.toggle.animations.disable":"Deshabilitar animaciones","tui.command.app.toggle.animations.enable":"Habilitar animaciones","tui.command.app.toggle.diffwrap.disable":"Deshabilitar ajuste de diff","tui.command.app.toggle.diffwrap.enable":"Habilitar ajuste de diff","tui.command.app.toggle.sound.disable":"Desactivar sonido","tui.command.app.toggle.sound.enable":"Activar sonido","tui.command.logout.toast":"Sesi\xF3n cerrada","tui.command.session.share.title":"Compartir sesi\xF3n","tui.command.session.share.copy_link":"Copiar enlace para compartir","tui.command.session.rename.title":"Renombrar sesi\xF3n","tui.command.session.timeline.title":"Saltar a un mensaje","tui.command.session.fork.title":"Bifurcar sesi\xF3n","tui.command.session.compact.title":"Compactar sesi\xF3n","tui.command.session.unshare.title":"Dejar de compartir","tui.command.session.undo.title":"Deshacer mensaje anterior","tui.command.session.redo.title":"Rehacer","tui.command.session.sidebar.show":"Mostrar barra lateral","tui.command.session.sidebar.hide":"Ocultar barra lateral","tui.command.session.conceal.disable":"Deshabilitar ocultaci\xF3n de c\xF3digo","tui.command.session.conceal.enable":"Habilitar ocultaci\xF3n de c\xF3digo","tui.command.session.timestamps.show":"Mostrar marcas de tiempo","tui.command.session.timestamps.hide":"Ocultar marcas de tiempo","tui.command.session.thinking.expand":"Expandir razonamiento","tui.command.session.thinking.collapse":"Colapsar razonamiento","tui.command.session.tool_details.show":"Mostrar detalles de herramientas","tui.command.session.tool_details.hide":"Ocultar detalles de herramientas","tui.command.session.scrollbar.toggle":"Alternar barra de desplazamiento","tui.command.session.generic_tool_output.show":"Mostrar salida de herramienta gen\xE9rica","tui.command.session.generic_tool_output.hide":"Ocultar salida de herramienta gen\xE9rica","tui.command.session.page_up.title":"P\xE1gina anterior","tui.command.session.page_down.title":"P\xE1gina siguiente","tui.command.session.line_up.title":"L\xEDnea arriba","tui.command.session.line_down.title":"L\xEDnea abajo","tui.command.session.half_page_up.title":"Media p\xE1gina arriba","tui.command.session.half_page_down.title":"Media p\xE1gina abajo","tui.command.session.first.title":"Primer mensaje","tui.command.session.last.title":"\xDAltimo mensaje","tui.command.session.last_user.title":"Ir al \xFAltimo mensaje del usuario","tui.command.session.message_next.title":"Mensaje siguiente","tui.command.session.message_previous.title":"Mensaje anterior","tui.command.messages.copy.title":"Copiar \xFAltimo mensaje del asistente","tui.command.session.copy.title":"Copiar transcripci\xF3n de la sesi\xF3n","tui.command.session.export.title":"Exportar transcripci\xF3n","tui.command.session.child_first.title":"Ir a la sesi\xF3n hija","tui.command.session.parent.title":"Ir a la sesi\xF3n padre","tui.command.session.child_next.title":"Sesi\xF3n hija siguiente","tui.command.session.child_previous.title":"Sesi\xF3n hija anterior","tui.command.prompt.clear.title":"Vaciar entrada","tui.command.prompt.submit.title":"Enviar prompt","tui.command.prompt.paste.title":"Pegar","tui.command.session.interrupt.title":"Interrumpir sesi\xF3n","tui.command.prompt.editor.title":"Abrir editor","tui.command.prompt.skills.title":"Habilidades","tui.command.voice.toggle.title":"Alternar entrada de voz","tui.command.voice.toggle.title_on":"Entrada de voz: activada \u2014 clic para desactivar","tui.command.voice.toggle.title_off":"Entrada de voz: desactivada \u2014 clic para activar","tui.voice.enabled":"Entrada de voz activada (chino/ingl\xE9s) \u2014 clic en [Voice] para grabar","tui.voice.disabled":"Entrada de voz deshabilitada","tui.voice.send.enabled":'Env\xEDo por voz habilitado \u2014 di\u300C\u53D1\u9001\u300Do "send it" para enviar',"tui.voice.send.disabled":"Env\xEDo por voz deshabilitado","tui.command.voice.send.title":"Alternar env\xEDo por voz","tui.command.voice.send.title_on":"Env\xEDo por voz: activado \u2014 clic para desactivar","tui.command.voice.send.title_off":"Env\xEDo por voz: desactivado \u2014 clic para activar","tui.voice.control.enabled":"Control de voz habilitado \u2014 usa modelo multimodal para edici\xF3n inteligente (m\xE1s lento)","tui.voice.control.disabled":"Control de voz deshabilitado \u2014 usa transcripci\xF3n ASR r\xE1pida","tui.command.voice.control.title":"Alternar control de voz (multimodal)","tui.command.voice.control.title_on":"Control de voz: activado (multimodal) \u2014 clic para desactivar","tui.command.voice.control.title_off":"Control de voz: desactivado (ASR r\xE1pido) \u2014 clic para activar","tui.voice.error.no_auth":"Usa /connect para conectar tu cuenta QitQode, o configura voice.asr_model para otro proveedor","tui.voice.error.no_auth_provider":'El proveedor de voz "{{provider}}" no est\xE1 autenticado, revisa su apiKey',"tui.voice.error.provider_not_found":'Proveedor "{{provider}}" no disponible \u2014 /connect para autenticarte, o declara models en la config para endpoints personalizados',"tui.voice.error.no_url":'El proveedor "{{provider}}" no tiene baseURL configurada \u2014 configura options.baseURL',"tui.voice.error.no_device":"No se encontr\xF3 micr\xF3fono/dispositivo de audio \u2014 verifica la configuraci\xF3n de audio del sistema","tui.voice.error.recorder_failed":"Error de grabaci\xF3n","tui.voice.error.no_recorder":"No se encontr\xF3 herramienta de grabaci\xF3n, instala sox","tui.voice.error.too_short":"Grabaci\xF3n demasiado corta","tui.voice.error.network":"La transcripci\xF3n fall\xF3, verifica tu red","tui.voice.error.empty_send":"No hay contenido para enviar","tui.voice.error.unknown_agent":'Agente "{{name}}" no encontrado',"tui.command.prompt.stash.title":"Guardar prompt","tui.command.prompt.stash.pop.title":"Recuperar prompt","tui.command.prompt.stash.list.title":"Lista de prompts guardados","tui.command.tips.toggle.show":"Mostrar sugerencias","tui.command.tips.toggle.hide":"Ocultar sugerencias","tui.command.plugins.list.title":"Plugins","tui.command.plugins.install.title":"Instalar plugin","tui.question.plan_enter.question":"\xBFDesea cambiar al modo plan para una planificaci\xF3n estructurada?","tui.question.plan_enter.header":"Entrar al plan","tui.question.plan_enter.option.0.label":"S\xED","tui.question.plan_enter.option.0.description":"Cambiar al agente plan para planificaci\xF3n de solo lectura","tui.question.plan_enter.option.1.label":"No","tui.question.plan_enter.option.1.description":"Permanecer en el modo actual","tui.question.plan_exit.question":"El plan en {{plan}} est\xE1 completo. \xBFDesea cambiar al agente build para comenzar la implementaci\xF3n?","tui.question.plan_exit.header":"Salir del plan","tui.question.plan_exit.option.0.label":"S\xED","tui.question.plan_exit.option.0.description":"Cambiar al agente build y comenzar la implementaci\xF3n del plan","tui.question.plan_exit.option.1.label":"No","tui.question.plan_exit.option.1.description":"Permanecer con el agente plan para seguir refinando","tui.session.badge.auto":"Auto","trust.title":"Accediendo al espacio de trabajo:","trust.safety_check":"Verificaci\xF3n r\xE1pida: \xBFEs este un proyecto que creaste o en el que conf\xEDas? (Tu propio c\xF3digo, un proyecto open source conocido o trabajo de tu equipo). Si no, t\xF3mate un momento para revisar el contenido de esta carpeta.","trust.capabilities":"QitQode podr\xE1 leer, editar y ejecutar archivos aqu\xED.","trust.plugin_warn":"Si existen plugins maliciosos en este directorio, pueden ejecutar c\xF3digo arbitrario, leer, modificar o exfiltrar tus archivos.","trust.option.yes":"S\xED, conf\xEDo en esta carpeta","trust.option.no":"No, salir","trust.dangerous.title_home":"ADVERTENCIA: Est\xE1s a punto de abrir tu DIRECTORIO PERSONAL.","trust.dangerous.title_root":"ADVERTENCIA: Est\xE1s a punto de abrir la RA\xCDZ DEL SISTEMA DE ARCHIVOS.","trust.dangerous.body_home":"El modelo tendr\xE1 acceso a TODOS tus archivos personales \u2014 claves SSH, credenciales, perfiles del navegador y todo lo dem\xE1s en tu carpeta personal.","trust.dangerous.body_root":"El modelo tendr\xE1 acceso a TODO el sistema de archivos \u2014 archivos del sistema, datos de todos los usuarios, credenciales y todo en esta m\xE1quina.","trust.dangerous.advice_home":"A menos que tengas una raz\xF3n muy espec\xEDfica, NO conf\xEDes en todo tu directorio personal.","trust.dangerous.advice_root":"A menos que tengas una raz\xF3n muy espec\xEDfica, NO conf\xEDes en la ra\xEDz del sistema de archivos.","trust.dangerous.option.yes":"Entiendo los riesgos, confiar solo esta sesi\xF3n","trust.dangerous.option.no":"Salir (recomendado)"};export{f as dict};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Pt as n}from"./chunk-5dvy83ms.js";function s(e){let r=e?.password??n.QITQODE_SERVER_PASSWORD;if(!r)return;let t=e?.username??n.QITQODE_SERVER_USERNAME??"qitqode";return`Basic ${Buffer.from(`${t}:${r}`).toString("base64")}`}function o(e){let r=s(e);if(!r)return;return{Authorization:r}}
3
- export{o as da};
2
+ import{tv as n}from"./chunk-62mb6wxm.js";function s(e){let r=e?.password??n.QITQODE_SERVER_PASSWORD;if(!r)return;let t=e?.username??n.QITQODE_SERVER_USERNAME??"qitqode";return`Basic ${Buffer.from(`${t}:${r}`).toString("base64")}`}function o(e){let r=s(e);if(!r)return;return{Authorization:r}}
3
+ export{o as ea};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{cR as t}from"./chunk-pfx8ts02.js";var e=await import("./chunk-pv71d7f3.js",{with:{type:"file"}}),a=e.default;export{a as default};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Kg as o}from"./chunk-s2ma1nz3.js";import{cR as n}from"./chunk-pfx8ts02.js";async function a(){try{let{toJsonSchema:t}=await import("./chunk-2rvs18fx.js");return t}catch{throw new o("@valibot/to-json-schema")}}export{a as default};
@@ -0,0 +1,30 @@
1
+ // @bun
2
+ import{Bq as xJ,Fq as DJ,Xq as IJ,Yq as bJ,wq as TJ,xq as hJ,yq as _J,zq as BJ}from"./chunk-40pe0tde.js";import{mr as vJ}from"./chunk-d4y5hyjg.js";import{Ku as L}from"./chunk-9exxjnxc.js";import{mv as AJ}from"./chunk-s5taq9jy.js";import{Bv as wJ,tv as YJ}from"./chunk-62mb6wxm.js";import{Pv as kJ,Sv as CJ}from"./chunk-zg72kz2k.js";var ZK=0.9,$K=256,OJ="[Earlier tool result removed to fit the request size limit]",m;function f(J){return Buffer.byteLength(JSON.stringify(J),"utf8")}function FJ(){return YJ.QITQODE_QLEX_MAX_REQUEST_BYTES??m}function zJ(J){let K=YJ.QITQODE_QLEX_MAX_REQUEST_BYTES;if(K!==void 0)return K;let X=Math.max(1,Math.min(Math.floor(J*ZK),Math.floor(J)-1));return m=m===void 0?X:Math.min(m,X),m}function l(J,K){return!!J&&typeof J==="object"&&J.role===K}function GK(J){if(!J||typeof J!=="object")return!1;let K=J.content;return Array.isArray(K)&&K.some((X)=>!!X&&typeof X==="object"&&["image_url","image"].includes(String(X.type)))}function MJ(J){let K=[],X=0;while(X<J.length){let Z=X,$=J[X];if(X++,l($,"assistant")&&Array.isArray($?.tool_calls)&&$.tool_calls.length>0)while(X<J.length&&l(J[X],"tool"))X++;K.push({start:Z,end:X})}return K}function SJ(J,K){if(K.length===0)return[];let X=-1;for(let Z=K.length-1;Z>=0;Z--){let $=K[Z],G=!1;for(let Y=$.start;Y<$.end;Y++)if(l(J[Y],"user"))G=!0;if(G){X=Z;break}}return K.filter((Z,$)=>{if($===K.length-1)return!1;if($===X)return!1;if(Z.start===0&&l(J[0],"system"))return!1;for(let G=Z.start;G<Z.end;G++)if(GK(J[G]))return!1;return!0})}function NJ(J,K){let X=f(J),Z={toolResultsElided:0,unitsDropped:0},$=()=>({body:J,bytes:X,originalBytes:X,reduced:!1,actions:Z});if(!J||typeof J!=="object")return $();let G=J.messages;if(!Array.isArray(G))return $();let Y=G.map((_)=>_&&typeof _==="object"?{..._}:_),z=()=>({...J,messages:Y}),N=()=>f(z())<=K;{let _=Y;for(let P of SJ(_,MJ(_))){let O=!1;for(let E=P.start;E<P.end;E++){let C=_[E];if(!l(C,"tool"))continue;let M=C?.content;if(typeof M!=="string"||M.length<$K)continue;if(M===OJ)continue;_[E]={...C,content:OJ},Z.toolResultsElided++,O=!0}if(O&&N())break}}if(!N())for(;;){let _=Y,O=SJ(_,MJ(_))[0];if(!O)break;if(Y=[..._.slice(0,O.start),..._.slice(O.end)],Z.unitsDropped++,N())break}let Q=z(),j=f(Q);return{body:Q,bytes:j,originalBytes:X,reduced:j<X&&j<=K,actions:Z}}import p from"fs/promises";import fJ from"path";import{randomUUID as yJ}from"crypto";var R=wJ({service:"provider.qlex"}),UJ=L.streamUrl(),zK=L.omniqueryBaseUrl()+"/runOrchestrated",NK=new Set(["rate_limited","transient","stream_truncated","stream_failed"]);function i(J,K){return K!==!1&&NK.has(J)}function e(J){return typeof J==="string"&&/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/.test(J)?J:void 0}function T(J,K){let X=J;if(K.status!==void 0)X.status=K.status;if(K.upstreamCode!==void 0)X.upstreamCode=K.upstreamCode;let Z=e(K.requestId);if(Z!==void 0)X.requestId=Z;if(X.category=K.category,X.retryable=i(K.category,K.retryable),K.outputBudgetRecoveryAvailable!==void 0)X.outputBudgetRecoveryAvailable=K.outputBudgetRecoveryAvailable;if(K.outputBudgetRecoveryTokens!==void 0)X.outputBudgetRecoveryTokens=K.outputBudgetRecoveryTokens}function h(J,K){return{...J,...K}}class gJ extends Error{name="QlexNotLoggedInError";constructor(J){super(L.copy().notLoggedIn);T(this,h({category:"invalid_credentials",retryable:!1},J))}}class uJ extends Error{name="QlexInsufficientBalanceError";constructor(J,K){super(L.copy().insufficientBalance(J));T(this,h({status:402,category:"billing",retryable:!1},K))}}class pJ extends Error{name="QlexRateLimitError";constructor(J){super(L.copy().rateLimit);T(this,h({status:429,category:"rate_limited",retryable:!0},J))}}class cJ extends Error{name="QlexInvalidCredentialsError";constructor(J,K){super(L.copy().invalidCredentials(J));T(this,h({status:401,category:"invalid_credentials",retryable:!1},K))}}class mJ extends Error{name="QlexRequestRejectedError";constructor(J,K,X){super(L.copy().requestRejected(J,K));T(this,h({status:400,category:"request_rejected",retryable:!1},X))}}class JJ extends Error{name="QlexRequestTooLargeError";stage;constructor(J="irreducible",K,X){super(J==="after-reduction"?L.copy().requestTooLargeAfterReduction(K):L.copy().requestTooLargeIrreducible(K));this.stage=J,T(this,h({status:413,category:"request_too_large",retryable:!1},X))}}class lJ extends Error{name="QlexRequestNotSentError";constructor(J,K){super(L.copy().requestNotSent(J));T(this,h({category:"request_rejected",retryable:!1},K))}}class g extends Error{name="QlexGatewayError";constructor(J,K){super(L.copy().gatewayUnavailable(J));T(this,h({category:"gateway_routing",retryable:!1},K))}}var WK=60000,DK=320000;function jX(J){return L.sanitizeUpstreamError(J)}class x extends Error{name="QlexStreamError";constructor(J,K,X){let Z=h({category:"unknown",retryable:!1},K);super(Z.category==="output_budget_exhausted"?L.copy().outputBudgetExhausted():Z.category==="empty_output"?L.copy().emptyOutput():Z.category==="stream_truncated"?L.copy().streamCutOff(X):Z.category==="stream_failed"?L.copy().streamFailedAfterRetries(X):Z.category==="request_rejected"?L.copy().requestRejected():L.copy().streamFailed(J));T(this,Z),AJ(this)}}var HK=[{match:/\b(unauthori[sz]ed|forbidden|invalid[ _-]?(api[ _-]?key|token|credential)|expired[ _-]?token|authentication[ _-]?(failed|error)|401|403)\b/i,category:"invalid_credentials",retryable:!1},{match:/(output (?:token )?budget|maximum output tokens|max_tokens|finish[_ -]?reason.{0,20}(length|budget)|reasoning.{0,20}(budget|tokens))/i,category:"output_budget_exhausted",retryable:!1},{match:/\b(no visible output|empty output|produced no (?:visible )?(?:text|output)|nothing to display)\b/i,category:"empty_output",retryable:!1},{match:/\b(insufficient[ _-]?(credits?|qredits?|balance|funds)|payment[ _-]?required|quota[ _-]?exceeded|out[ _-]?of[ _-]?(credits?|qredits?)|402)\b/i,category:"billing",retryable:!1},{match:/\b(rate[ _-]?limit(ed|s)?|too[ _-]?many[ _-]?requests|429)\b/i,category:"rate_limited",retryable:!0},{match:/(unexpected end of (json|input|stream|data)|premature (close|end)|socket hang ?up|socket connection was closed unexpectedly|incomplete (response|output|json|message)|truncated|stream (ended|closed|terminated) (early|unexpectedly|prematurely)|\bECONNRESET\b|\bEPIPE\b)/i,category:"stream_truncated",retryable:!0},{match:/\b(overloaded|at capacity|service[ _-]?unavailable|temporarily[ _-]?unavailable|bad[ _-]?gateway|gateway[ _-]?time(d[ _-]?out|out)|timed[ _-]?out|502|503|504)\b/i,category:"transient",retryable:!0}],PK={ERR_EMPTY_RESULT:{category:"empty_output",retryable:!1},ERR_TRUNCATED_OUTPUT:{category:"stream_truncated",retryable:!0},ERR_STREAM:{category:"stream_failed",retryable:!0},ERR_VALIDATION:{category:"request_rejected",retryable:!1}},_K=/^\s*(ERR_[A-Z0-9_]+)\b(?:\s*(?:[\u2014\u2013:-]\s*)?)?/i,QK=/\b(req_[A-Za-z0-9][A-Za-z0-9_-]*)\b/;function EJ(J){let K=J??"",X=_K.exec(K),Z=X?K.slice(X[0].length):K,$=dJ(Z),G=X?.[1]?.toUpperCase()??$.upstreamCode,Y=$.requestId??e(QK.exec(K)?.[1]),z=$.retryable;if(G!==void 0){let N=PK[G];if(N!==void 0)return{...N,upstreamCode:G,retryable:i(N.category,z??N.retryable),...Y?{requestId:Y}:{}}}for(let N of HK)if(N.match.test(Z))return{category:N.category,retryable:i(N.category,z??N.retryable),...G?{upstreamCode:G}:{},...Y?{requestId:Y}:{}};return{category:"unknown",retryable:i("unknown",z),...G?{upstreamCode:G}:{},...Y?{requestId:Y}:{}}}function VK(J){return xJ(J)}function dJ(J){try{let K=JSON.parse(J);if(!K||typeof K!=="object"||Array.isArray(K))return{};let X=K,Z=X.error&&typeof X.error==="object"&&!Array.isArray(X.error)?X.error:void 0,$=X.details&&typeof X.details==="object"&&!Array.isArray(X.details)?X.details:void 0,G=[X.requestId,Z?.requestId,$?.requestId].map(e).find((N)=>N!==void 0),Y=X.retryable===!1||Z?.retryable===!1?!1:X.retryable===!0||Z?.retryable===!0?!0:void 0,z=Z?.code??X.code;return{...G!==void 0?{requestId:G}:{},...Y!==void 0?{retryable:Y}:{},...typeof z==="string"&&/^[A-Z][A-Z0-9_]{0,63}$/i.test(z)?{upstreamCode:z.toUpperCase()}:{}}}catch{return{}}}function iJ(J,K){let X,Z,$,G=!1;try{let P=JSON.parse(K);if(P&&typeof P==="object"){let O=P.error&&typeof P.error==="object"?P.error:void 0;if(typeof O?.code==="string")X=O.code;else if(typeof P.code==="string")X=P.code;if(typeof O?.message==="string")Z=O.message;else if(typeof P.message==="string")Z=P.message;if(typeof P.details?.field==="string")$=P.details.field}}catch(P){G=/^\s*[\[{]/.test(K)&&(jK(K)||/unexpected end|end of json|unterminated string/i.test(String(P)))}let Y=X?.toUpperCase()??"",{requestId:z,retryable:N}=dJ(K),Q=(()=>{if(G)return"stream_truncated";if(J===402)return"billing";if(J===413)return"request_too_large";if(J===429)return"rate_limited";if(J===401||J===403)return Y==="ERR_GATEWAY_REQUIRED"||VK(K)?"gateway_routing":"invalid_credentials";if(Y.includes("CONFIG"))return"configuration";if(J>=500)return"transient";if(J>=400)return"request_rejected";return"unknown"})(),j=i(Q,N),_={status:J,category:Q,retryable:j};if(X!==void 0)_.upstreamCode=X;if(Z!==void 0)_.upstreamMessage=Z;if($!==void 0)_.field=$;if(z!==void 0)_.requestId=z;return _}function jK(J){let K=0,X=!1,Z=!1;for(let $ of J){if(X){if(Z)Z=!1;else if($==="\\")Z=!0;else if($==='"')X=!1;continue}if($==='"')X=!0;else if($==="{"||$==="[")K++;else if($==="}"||$==="]")K--;if(K<0)return!1}return X||K>0}function LK(J){let K=L.tierBudgetFacts(J.tier),X=J.advisory,Z=X?.tierOutputLimit??K?.output;if(J.requestedTotal!==void 0)return{total:Z===void 0?J.requestedTotal:Math.min(J.requestedTotal,Z)};if(!X&&!K)return{};let $=X?.reasoningReserveTokens??K?.reasoningReserve??0,G=X?.visibleOutputFloorTokens??K?.visibleOutputFloor??0,Y=X?.recommendedTotalTokens??X?.tierRecommendedStepTokens??K?.recommendedTotal??K?.recommendedStep??Z,z=X?.viableTotalFloorTokens??K?.viableTotalFloor??$+G,N=Y===void 0?z:Math.max(Y,z),Q=X?.reasoningReported??K?.reasoning;return{total:Z===void 0?N:Math.min(N,Z),reasoningBudget:Q&&$>0?Math.min($,N):void 0}}var OK=new Set(["coding","agent","research","review","chat"]);function MK(J){if(J===void 0)return;if(typeof J==="string"&&OK.has(J))return J;throw Error(`invalid Qortex posture: ${String(J)}`)}function SK(J){if(J===void 0)return;let K=Array.isArray(J)?J:[J];if(K.every((X)=>typeof X==="string"&&/^[^/\s]+\/[^/\s]+$/.test(X)))return Array.isArray(J)?K:J;throw Error(`invalid Qortex directive registry key: ${String(J)}`)}function s(J){if(typeof J==="string")return J;if(Array.isArray(J))return J.map((K)=>{if(typeof K==="string")return K;if(K&&typeof K==="object"){let X=K;if(typeof X.text==="string")return X.text;if(typeof X.content==="string")return X.content}return""}).join("");if(J===void 0||J===null)return"";return String(J)}function nJ(J){if(typeof J==="string")return J.trim().length>0;if(!Array.isArray(J))return!1;return J.some((K)=>{if(!K||typeof K!=="object")return typeof K==="string"&&K.trim().length>0;let X=K;return X.type==="image_url"||X.type==="image"||X.type==="text"&&typeof X.text==="string"&&X.text.trim().length>0})}function rJ(J){if(!Array.isArray(J))return!1;return J.some((K)=>{if(!K||typeof K!=="object")return!1;let X=K.content;return Array.isArray(X)&&X.some((Z)=>!!Z&&typeof Z==="object"&&["image_url","image"].includes(String(Z.type)))})}class tJ extends Error{constructor(J){super(J);this.name="QlexImageCapabilityUnavailableError"}}class oJ extends Error{constructor(J){super(J);this.name="QlexImageTierUnsupportedError"}}class I extends Error{constructor(J){super(J);this.name="QlexImageInputInvalidError"}}function FK(J){let K=Array.isArray(J.messages)?J.messages:[],X=[];for(let G of K){if(!G||typeof G!=="object")continue;let Y=G,z=Y.content;if(!Array.isArray(z))continue;for(let N of z){if(!N||typeof N!=="object")continue;let Q=N.type;if(Q==="image")throw new I("Tier chat requires OpenAI image_url content parts.");if(Q!=="image_url")continue;if(Y.role!=="user")throw new I("Image input is only supported in user messages.");let j=N.image_url,_=typeof j==="string"?j:j&&typeof j==="object"&&!Array.isArray(j)?j.url:void 0;if(typeof _!=="string")throw new I("The attached image is missing its data URL.");let P=/^data:image\/(?:png|jpeg|gif|webp);base64,([A-Za-z0-9+/]+={0,2})$/i.exec(_);if(!P||P[1].length%4!==0||/=/.test(P[1].slice(0,-2)))throw new I("Only embedded PNG, JPEG, GIF, or WebP image data can be sent.");X.push(_)}}if(X.length===0)return;let Z=L.tierImageInputCapability(J.tier);if(Z.state!=="live")throw new tJ("Image support could not be verified. No request was sent.");if(!Z.supported||!Z.limits)throw new oJ("The selected tier does not support image input.");if(X.length>Z.limits.max_images)throw new I(`This tier accepts at most ${Z.limits.max_images} images per request.`);if(X.some((G)=>G.length>Z.limits.max_total_encoded_bytes+128))throw new I("The attached image data exceeds this tier's combined size limit.");if(X.reduce((G,Y)=>G+new TextEncoder().encode(Y).byteLength,0)>Z.limits.max_total_encoded_bytes)throw new I("The attached image data exceeds this tier's combined size limit.")}var UK="[Tool call]",EK="[Tool returned no output]";function aJ(J){if(!Array.isArray(J))return{messages:J,dropped:[]};let K=[];return{messages:J.flatMap((Z,$)=>{if(!Z||typeof Z!=="object")return K.push({index:$,role:typeof Z,reason:"not-an-object"}),[];let G=Z,Y=G.content;if(nJ(Y)){let z=Array.isArray(Y)&&!rJ([G])?s(Y):Y;return[{...G,content:z}]}if(G.role==="assistant"&&Array.isArray(G.tool_calls)&&G.tool_calls.length>0)return[{...G,content:UK}];if(G.role==="tool"&&typeof G.tool_call_id==="string"&&G.tool_call_id.trim().length>0)return[{...G,content:EK}];return K.push({index:$,role:typeof G.role==="string"?G.role:"unknown",reason:"empty-content"}),[]}),dropped:K}}function qK(J){return aJ(J).messages}function RK(J){if(!Array.isArray(J))return!1;return J.some((K)=>!!K&&typeof K==="object"&&K.role==="user")}function kK(J){if(!Array.isArray(J))return!1;return J.some((K)=>{if(!K||typeof K!=="object")return!1;let X=K;if(X.role!=="user")return!1;return nJ(X.content)})}function CK(J){if(!Array.isArray(J))return J;let K=(G)=>!!G&&typeof G==="object"&&G.role==="system",X=0;while(X<J.length&&K(J[X]))X++;if(X<=1)return J;let Z=J.slice(0,X),$=Z.map((G)=>typeof G.content==="string"?G.content:Array.isArray(G.content)?s(G.content):"").filter((G)=>G.length>0).join(`
3
+
4
+ `);return[{...Z[0],role:"system",content:$},...J.slice(X)]}var d="<tool_call>",o="</tool_call>";function wK(J){if(!Array.isArray(J)||J.length===0)return;let K=J.map((X)=>{try{return JSON.stringify(X)}catch{return}}).filter((X)=>X!==void 0);if(K.length===0)return;return["# Tools","","You may call one or more functions to assist with the user query.","","You are provided with function signatures within <tools></tools> XML tags:","<tools>",...K,"</tools>","","For each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:","<tool_call>",'{"name": <function-name>, "arguments": <args-json-object>}',"</tool_call>","","Function results will be provided within <tool_response></tool_response> XML tags. Do not write <tool_response> blocks yourself.","Only use the functions declared above. Never invent function names, and never write out a function-call-like block in any other format."].join(`
5
+ `)}var AK=3;function QJ(J){let K=J;for(let X=0;X<AK;X++){if(K!==null&&typeof K==="object")return K;if(typeof K!=="string")return;try{K=JSON.parse(K)}catch{return}}return}function TK(J){let K=J?.tool_calls;if(!Array.isArray(K))return;for(let X of K){let Z=X?.function;if(!Z)continue;R.debug("tool call ingress",{tool:typeof Z.name==="string"?Z.name:"?",source:"native",args:VJ(Z.arguments)})}}function VJ(J,K=300){let X;try{X=typeof J==="string"?J:JSON.stringify(J)??String(J)}catch{X="<unrenderable>"}return X.length<=K?X:`${X.slice(0,K)}\u2026 (${X.length} chars total)`}function hK(J){let K=J.function??{},X=typeof K.name==="string"?K.name:"",Z=K.arguments===void 0?{}:QJ(K.arguments);if(Z===void 0)R.warn("dropping unrecoverable tool-call arguments while re-encoding history",{tool:X,raw:VJ(K.arguments)});return`${d}
6
+ ${JSON.stringify({name:X,arguments:Z??{}})}
7
+ ${o}`}function sJ(J,K){if(!Array.isArray(J))return J;let X=J.map(($)=>{if(!$||typeof $!=="object")return $;let G=$;if(G.role==="assistant"&&Array.isArray(G.tool_calls)){let Y=G.tool_calls.map(hK).join(`
8
+ `),z=s(G.content),{tool_calls:N,...Q}=G;return{...Q,content:z.length>0?`${z}
9
+ ${Y}`:Y}}if(G.role==="tool"){let{tool_call_id:Y,name:z,...N}=G;return{...N,role:"user",content:`<tool_response>
10
+ ${s(G.content)}
11
+ </tool_response>`}}return $}),Z=wK(K);if(Z){let $=0;while($<X.length&&!!X[$]&&typeof X[$]==="object"&&X[$].role==="system")$++;X.splice($,0,{role:"system",content:Z})}return X}function BK(){return process.env.QITQODE_TOOL_PROTOCOL==="text"?"text":"native"}function xK(J){if(Array.isArray(J.tools)&&J.tools.length>0)return!0;let K=J.messages;if(!Array.isArray(K))return!1;return K.some((X)=>{if(!X||typeof X!=="object")return!1;let Z=X;return Z.role==="tool"||Z.role==="assistant"&&Array.isArray(Z.tool_calls)})}function qJ(J,K){let X=K?.toolMode??"native",Z=J.model??"adaptive",$={stream:J.stream??!0};if(J.temperature!==void 0)$.temperature=J.temperature;if(J.max_tokens!==void 0)$.max_tokens=J.max_tokens;let G=LK({tier:Z,advisory:K?.outputAdvisory,requestedTotal:$.max_tokens});if(G.total!==void 0)$.max_tokens=G.total;if(G.reasoningBudget!==void 0)$.thinking={budget_tokens:G.reasoningBudget};if(K?.outputBudgetRecoveryTokens!==void 0){let j=typeof $.max_tokens==="number"?$.max_tokens:0,_=K.outputAdvisory?.tierOutputLimit??L.tierBudgetFacts(Z)?.output,P=Math.min(K.outputBudgetRecoveryTokens,_??K.outputBudgetRecoveryTokens);if(P>j)$.max_tokens=P}if(J.tools!==void 0)$.tools=J.tools;if(J.tool_choice!==void 0)$.tool_choice=J.tool_choice;if(J.stream_options!==void 0)$.stream_options=J.stream_options;let Y=X==="text"?sJ(J.messages,J.tools):J.messages,z={},N=MK(J.posture);if(N!==void 0)z.posture=N;let Q=SK(J.directive);if(Q!==void 0)z.directive=Q;if(J.modelPersona!==void 0)z.modelPersona=J.modelPersona;return{tier:Z,messages:CK(qK(Y)),opts:$,...z}}var n=new Map,c=fJ.join(CJ.Path.data,"qlex-tier-advisories.json"),IK="qlex-tier-advisories",bK=2592000000,RJ=!1,vK;function eJ(J,K){if(!J||typeof J!=="object")return;let X=J;if(typeof X.capturedAt!=="number"||K-X.capturedAt>bK)return;if(!X.advisory)return;return{advisory:X.advisory,capturedAt:X.capturedAt}}async function fK(){if(RJ)return;try{let J=JSON.parse(await p.readFile(c,"utf8")),K=Date.now();for(let[X,Z]of Object.entries(J)){let $=eJ(Z,K);if($)JK(X,$.advisory,$.capturedAt)}}catch{}RJ=!0}function yK(){return vK??=fK()}function JK(J,K,X=Date.now()){n.set(J,{advisory:K,capturedAt:X})}async function gK(J){await kJ.withLock(IK,async()=>{let K={};try{let Z=JSON.parse(await p.readFile(c,"utf8")),$=Date.now();for(let[G,Y]of Object.entries(Z)){let z=eJ(Y,$);if(z)K[G]=z}}catch{}for(let[Z,$]of J){let G=K[Z];if(!G||G.capturedAt<=$.capturedAt)K[Z]=$}await p.mkdir(fJ.dirname(c),{recursive:!0});let X=`${c}.${process.pid}.${yJ()}.tmp`;try{await p.writeFile(X,JSON.stringify(K)),await p.rename(X,c)}catch(Z){throw await p.rm(X,{force:!0}).catch(()=>{}),Z}})}function uK(){if(t)return;t=!0,PJ=PJ.then(()=>{return t=!1,gK([...n].map(([J,K])=>[J,K]))}).catch((J)=>{t=!1,R.warn("failed to persist tier output advisories",{file:c,error:J instanceof Error?J.message:String(J)})})}function y(J){return typeof J==="number"&&Number.isFinite(J)&&J>0?J:void 0}function pK(J,K){let X={},Z=y(K.tierOutputLimit),$=y(K.tierRecommendedStepTokens),G=y(K.reasoningReserveTokens),Y=y(K.visibleOutputFloorTokens),z=y(K.recommendedTotalTokens),N=y(K.viableTotalFloorTokens),Q=y(K.budgetPolicyVersion);if(Z!==void 0)X.tierOutputLimit=Z;if($!==void 0)X.tierRecommendedStepTokens=$;if(G!==void 0)X.reasoningReserveTokens=G;if(Y!==void 0)X.visibleOutputFloorTokens=Y;if(z!==void 0)X.recommendedTotalTokens=z;if(N!==void 0)X.viableTotalFloorTokens=N;if(typeof K.reasoningReported==="boolean")X.reasoningReported=K.reasoningReported;if(Q!==void 0)X.budgetPolicyVersion=Q;if(Object.keys(X).length===0)return;JK(J,X),uK()}function cK(J){return n.get(J)?.advisory}function LX(){n.clear()}function OX(){return PJ}function mK(J){let K=(X)=>typeof X==="string"&&(X.startsWith("qlex")||X.startsWith("qortex"));return K(J.id)||K(J.object)}function lK(J){return J.id==="qortex-routing"&&J.object==="qortex.routing.status"&&J.status==="free-fallback"}function MX(J){if(!J||typeof J!=="object")return!1;let K=J,X=K.qortex_routing;return K.id==="qlex-stream"&&K.object==="chat.completion.chunk"&&Array.isArray(K.choices)&&!!X&&typeof X==="object"&&X.status==="free-fallback"}function SX(J){let K=new _J().push(`${J}
12
+
13
+ `)[0];return K?HJ(K.data):{kind:"skip"}}function HJ(J){if(J==="")return{kind:"skip"};if(J==="[DONE]")return{kind:"done"};if(J.startsWith("[ERROR]"))return{kind:"error",message:J.slice(7).trim()||"qlex stream error"};let K=J.charCodeAt(0),X=K===123||K===91||K===32||K===9||K===10||K===13;try{if(!X)return{kind:"token",content:J};let Z=JSON.parse(J);if(Z&&typeof Z==="object"){let $=Z.id;if($==="qlex-cost"||$==="qortex-cost")return{kind:"cost",cost:Z};if($==="qlex-stream"&&Z.usage&&typeof Z.usage==="object"){let z=Z.choices,N;if(Array.isArray(z)&&z[0]&&typeof z[0]==="object"){let Q=z[0].finish_reason;if(typeof Q==="string")N=Q}return{kind:"usage",usage:Z.usage,finishReason:N}}if(lK(Z))return{kind:"control",control:"free-tier-fallback",chunk:Z};if(Array.isArray(Z.choices))return{kind:"passthrough",chunk:Z};let G=Z,Y=typeof G.content==="string"?G.content:typeof G.text==="string"?G.text:typeof G.delta==="string"?G.delta:void 0;if(Y!==void 0)return{kind:"token",content:Y};if(mK(Z)){let z=Z.object;return{kind:"control",control:typeof z==="string"&&z.endsWith(".tier.outputLimits")?"tier-output-limits":"unknown",chunk:Z}}}}catch{}return{kind:"token",content:J}}function dK(J,K){let X=Math.min(J.length,K.length-1);for(let Z=X;Z>=1;Z--)if(K.startsWith(J.slice(J.length-Z)))return Z;return 0}function iK(J){if(typeof J==="string"){try{let X=JSON.parse(J);if(X!==null&&typeof X==="object")return J}catch{}let K=QJ(J);return JSON.stringify(K??J)}return JSON.stringify(J??{})}class KK{onText;onToolCall;pending="";inBlock=!1;constructor(J,K){this.onText=J;this.onToolCall=K}feed(J){this.pending+=J,this.drain(!1)}flush(){if(this.drain(!0),this.inBlock)this.emitBlock(this.pending,!0),this.inBlock=!1;else if(this.pending.length>0)this.onText(this.pending);this.pending=""}drain(J){while(!0)if(!this.inBlock){let K=this.pending.indexOf(d);if(K===-1){let X=J?0:dK(this.pending,d),Z=this.pending.length-X;if(Z>0)this.onText(this.pending.slice(0,Z)),this.pending=X>0?this.pending.slice(Z):"";return}if(K>0)this.onText(this.pending.slice(0,K));this.pending=this.pending.slice(K+d.length),this.inBlock=!0}else{let K=this.pending.indexOf(o);if(K===-1)return;if(this.emitBlock(this.pending.slice(0,K),!1),this.pending=this.pending.slice(K+o.length),this.pending.startsWith(`\r
14
+ `))this.pending=this.pending.slice(2);else if(this.pending.startsWith(`
15
+ `))this.pending=this.pending.slice(1);this.inBlock=!1}}emitBlock(J,K){try{let X=JSON.parse(J.trim());if(X&&typeof X==="object"&&typeof X.name==="string"){this.onToolCall({name:X.name,arguments:iK(X.arguments)});return}}catch{}this.onText(`${d}${J}${K?"":o}`)}}function WJ(J,K,X){let Z={id:"qlex-stream",object:"chat.completion.chunk",created:Math.floor(Date.now()/1000),model:"qlex",choices:[{index:0,delta:J,finish_reason:K}]};if(X)Z.usage=X;return`data: ${JSON.stringify(Z)}
16
+
17
+ `}function nK(J,K){let X=K?.toolProtocolEnabled===!0,Z=K?.tier,$=K?.requestedOutputBudget,G=K?.idleTimeoutMs??DK,Y=J.getReader(),z=new _J,N=new TextEncoder,Q=!1,j=!1,_=!1,P,O,E,C,M=!1,q=!1,u=0,B=0;return new ReadableStream({async start(k){let r=(H)=>{if(H.length>0)M=!0;B+=H.length;let W=Q?{content:H}:{role:"assistant",content:H};Q=!0,k.enqueue(N.encode(WJ(W,null)))},b=0,A=X?new KK(r,(H)=>{R.debug("tool call ingress",{tool:H.name,source:"text-shim",args:VJ(H.arguments),objectShaped:QJ(H.arguments)!==void 0});let W={...Q?{}:{role:"assistant"},tool_calls:[{index:b,id:`qlexcall_${Date.now().toString(36)}_${b}`,type:"function",function:{name:H.name,arguments:H.arguments}}]};Q=!0,q=!0,b++,k.enqueue(N.encode(WJ(W,null)))}):void 0,jJ=(H)=>A?A.feed(H):r(H),v=()=>{A?.flush();let W=P||O!==void 0||E!==void 0?{prompt_tokens:P?.tokens.prompt??E?.prompt??0,completion_tokens:P?.tokens.completion??E?.completion??0,total_tokens:P?.tokens.total??(P?.tokens.prompt??E?.prompt??0)+(P?.tokens.completion??E?.completion??0),cost_usd:P?.cost_usd,cost_credits:P?.cost_credits??P?.cost_qredits,context_window:O}:void 0;if(W&&(W.cost_usd??0)>0&&W.prompt_tokens===0)R.warn("qlex billed turn reported zero prompt tokens",{tier:Z,completionTokens:W.completion_tokens,costUsd:W.cost_usd,source:P?"cost.summary":"usage frame"});let D=b>0?"tool_calls":C??"stop";if(D==="length"||D==="max_tokens"){let V=a(Z??"adaptive",$),S=V!==void 0;R.debug("qlex output budget exhausted",{tier:Z,contentStreamed:M,outputBudgetRecoveryAvailable:S}),k.error(new x("output budget exhausted",{category:"output_budget_exhausted",retryable:!1,outputBudgetRecoveryAvailable:S,outputBudgetRecoveryTokens:V})),j=!0;return}if(!M&&!q&&C!=="tool_calls"){let V=a(Z??"adaptive",$),S=V!==void 0;R.debug("qlex completed without visible output",{tier:Z,outputBudgetRecoveryAvailable:S}),k.error(new x("empty output",{category:"empty_output",retryable:!1,outputBudgetRecoveryAvailable:S,outputBudgetRecoveryTokens:V})),j=!0;return}if(k.enqueue(N.encode(WJ({},D,W))),k.enqueue(N.encode(`data: [DONE]
18
+
19
+ `)),!P&&Z!==void 0)R.info("qlex cost frame absent on stream finish",{tier:Z});k.close(),j=!0},KJ=(H)=>{let W=HJ(H);switch(u++,W.kind){case"skip":return!1;case"token":return jJ(W.content),!1;case"passthrough":{let D=W.chunk.choices;if(Array.isArray(D)&&D[0]&&typeof D[0]==="object"){let V=D[0].finish_reason;if(typeof V==="string")C=V;let S=D[0].delta;if(typeof S?.content==="string"&&S.content.length>0)M=!0;if(Array.isArray(S?.tool_calls))q=!0;TK(D[0].delta)}Q=!0;{let V=W.chunk.choices?.[0]?.delta?.content;if(typeof V==="string")B+=V.length}return k.enqueue(N.encode(`data: ${JSON.stringify(W.chunk)}
20
+
21
+ `)),!1}case"cost":if(W.cost.final)P=W.cost;return!1;case"usage":if(W.usage.context_window!==void 0)O=W.usage.context_window;if(W.usage.prompt_tokens!==void 0&&W.usage.completion_tokens!==void 0)E={prompt:W.usage.prompt_tokens,completion:W.usage.completion_tokens};if(W.finishReason!==void 0)C=W.finishReason;return!1;case"control":{if(W.control==="tier-output-limits"){let D=W.chunk;if(Z!==void 0)pK(Z,D);R.debug("qlex tier output limits",{tierOutputLimit:D.tierOutputLimit,tierRecommendedStepTokens:D.tierRecommendedStepTokens,tierStepGuidance:D.tierStepGuidance,reasoningReserveTokens:D.reasoningReserveTokens,visibleOutputFloorTokens:D.visibleOutputFloorTokens,recommendedTotalTokens:D.recommendedTotalTokens,viableTotalFloorTokens:D.viableTotalFloorTokens,reasoningReported:D.reasoningReported,budgetPolicyVersion:D.budgetPolicyVersion})}else if(W.control==="free-tier-fallback")k.enqueue(N.encode(`data: ${JSON.stringify({id:"qlex-stream",object:"chat.completion.chunk",created:Math.floor(Date.now()/1000),model:"qlex",choices:[],qortex_routing:{status:"free-fallback"}})}
22
+
23
+ `));else R.debug("qlex control frame dropped",{id:W.chunk.id,object:W.chunk.object});return!1}case"done":return v(),!0;case"error":{let D=EJ(W.message);R.warn("qlex stream error frame",{tier:Z,raw:W.message,frameIndex:u,streamedContentChars:B,contentStreamed:Q,upstreamCode:D.upstreamCode,requestId:D.requestId,category:D.category,retryable:D.retryable});let V=D.category==="output_budget_exhausted"||D.category==="empty_output"?a(Z??"adaptive",$):void 0;if(D.retryable===!1&&V!==void 0)D.outputBudgetRecoveryAvailable=!0,D.outputBudgetRecoveryTokens=V;return k.error(new x(W.message,D,{textKept:M})),j=!0,!0}}},F=async()=>{if(!(G>0))return Y.read();let H;try{return await Promise.race([Y.read(),new Promise((W,D)=>{H=setTimeout(()=>{let V=Math.round(G/1000);R.warn("qlex stream idle timeout",{tier:Z,idleTimeoutMs:G,frameIndex:u,streamedContentChars:B,contentStreamed:Q}),D(new x(`the gateway sent nothing for ${V}s`,{category:"transient",retryable:!0})),Y.cancel(Error(`qlex stream idle for ${V}s`)).catch(()=>{})},G)})])}finally{if(H!==void 0)clearTimeout(H)}};try{while(!0){let{done:H,value:W}=await F();if(H){_=!0;break}for(let D of z.push(W))if(KJ(D.data))return}for(let H of z.push(`
24
+
25
+ `))if(HJ(H.data).kind!=="done"&&KJ(H.data))return;if(z.finish(),!j)throw new x("stream ended without a terminal frame",{category:"stream_truncated",retryable:!0},{textKept:M})}catch(H){if(j)return;if(H instanceof x){k.error(H);return}let W=H instanceof Error?H.message:String(H);k.error(new x(W,EJ(W),{textKept:M}))}finally{if(!_)await Y.cancel().catch(()=>{});Y.releaseLock()}},cancel(k){Y.cancel(k).catch(()=>{})}})}function XK(J){return{content:typeof J.content==="string"?J.content:J.choices?.[0]?.message?.content??"",finishReason:J.choices?.[0]?.finish_reason??"stop"}}function rK(J){let K=J??{},{content:X,finishReason:Z}=XK(K),$=K.usage??{},G=$.prompt_tokens??0,Y=$.completion_tokens??0,z="orch-"+Date.now().toString(36),N=Math.floor(Date.now()/1000),Q=(E,C,M)=>{let q={id:z,object:"chat.completion.chunk",created:N,model:"orchestrated",choices:[{index:0,delta:E,finish_reason:C}]};if(M)q.usage=M;return`data: ${JSON.stringify(q)}
26
+
27
+ `},j={prompt_tokens:G,completion_tokens:Y,total_tokens:$.total_tokens??G+Y};if(typeof $.cost_usd==="number")j.cost_usd=$.cost_usd;if(typeof $.cost_credits==="number")j.cost_credits=$.cost_credits;if(typeof $.context_window==="number")j.context_window=$.context_window;let _=[Q({role:"assistant",content:""},null),Q({content:X},null),Q({},Z,j),`data: [DONE]
28
+
29
+ `],P=new TextEncoder,O=new ReadableStream({start(E){for(let C of _)E.enqueue(P.encode(C));E.close()}});return new Response(O,{status:200,headers:{"content-type":"text/event-stream"}})}function FX(J){let K=J??{},{content:X,finishReason:Z}=XK(K),$=K.usage??{},G=$.prompt_tokens??0,Y=$.completion_tokens??0,z={id:"orch-"+Date.now(),object:"chat.completion",created:Math.floor(Date.now()/1000),model:"orchestrated",choices:[{index:0,message:{role:"assistant",content:X},finish_reason:Z}],usage:{prompt_tokens:G,completion_tokens:Y,total_tokens:$.total_tokens??G+Y,...typeof $.cost_usd==="number"?{cost_usd:$.cost_usd}:{},...typeof $.context_window==="number"?{context_window:$.context_window}:{}}};return new Response(JSON.stringify(z),{status:200,headers:{"content-type":"application/json"}})}async function tK(J,K,X){let Z=iJ(J,K);if(!Z.requestId)Z.requestId=e(X.requestId);let $=K?`HTTP ${J}: ${K}`:`HTTP ${J}`;switch(R.error("gateway rejected request",{tier:X.tier,status:J,category:Z.category,upstreamCode:Z.upstreamCode,field:Z.field,retryable:Z.retryable}),Z.category){case"billing":return new uJ(K||void 0,Z);case"rate_limited":return new pJ(Z);case"gateway_routing":return new g(`HTTP ${J}`,Z);case"invalid_credentials":return await X.onInvalidCredentials?.().catch(()=>{}),new cJ($,Z);case"request_too_large":return new JJ("irreducible",Z.upstreamMessage??K??void 0,Z);case"request_rejected":case"tool_protocol":return new mJ(Z.upstreamMessage??K??void 0,Z.field,Z);case"configuration":case"transient":case"unknown":default:return new g($,Z)}}function oK(J){let K=FJ();if(K===void 0)return J;let X=f(J);if(X<=K)return J;let Z=NJ(J,K);return R.warn("request over known size ceiling, reducing before send",{tier:J.tier,bytes:X,ceiling:K,reducedBytes:Z.bytes,fits:Z.reduced,...Z.actions}),Z.bytes<X?Z.body:J}function aK(J){let K=f(J),X=zJ(K),Z=NJ(J,X);if(!Z.reduced)throw R.error("request too large and cannot be reduced further",{tier:J.tier,rejectedBytes:K,ceiling:X,reducedBytes:Z.bytes,...Z.actions}),new JJ("irreducible");return R.warn("request too large, retrying once with reduced history",{tier:J.tier,rejectedBytes:K,ceiling:X,reducedBytes:Z.bytes,...Z.actions,notice:L.copy().requestTooLargeRecovering()}),Z.body}function sK(J){let K=f(J);throw zJ(K),R.error("reduced request still too large",{tier:J.tier,rejectedBytes:K}),new JJ("after-reduction")}function eK(J,K=globalThis.fetch,X,Z){let $=Z?.responseTimeoutMs??WK,G=hJ({baseUrl:UJ,fetch:(Y,z)=>K(Y instanceof URL?Y.href:Y,z)});return async(Y,z)=>{if(z?.method==="POST"&&typeof z?.body==="string"){let N;try{N=JSON.parse(z.body)}catch{return K(Y,z)}let j=(typeof N.model==="string"?N.model:void 0)?.split("/").at(-1);if(j&&L.isDecisionTier(j))L.assertChatTierSupported(j);let _=BK();await yK();let P=cK(N.model??"adaptive"),O=qJ(N,{toolMode:_,outputAdvisory:P}),E=rJ(N.messages);if(RK(N.messages)&&!kK(O.messages)){let{dropped:F}=aJ(_==="text"?sJ(N.messages,N.tools):N.messages);throw R.error("refusing to send: user message lost in normalization",{tier:O.tier,toolMode:_,inputRoles:Array.isArray(N.messages)?N.messages.map((H)=>H&&typeof H==="object"?String(H.role):"?"):"not-an-array",droppedCount:F.length,dropped:F}),new lJ("your message could not be turned into sendable content")}FK(O);let C=await J(),M=typeof C==="string"?{key:C,method:"sso"}:C;if(!M?.key)throw new gJ;let q=new Headers(z.headers),u=()=>{if(M.method==="api-key")q.delete("Authorization"),q.set("x-api-key",M.key);else q.delete("x-api-key"),q.set("Authorization",`Bearer ${M.key}`)};u(),q.set("Content-Type","application/json");let B=q.get("x-idempotency-key")??yJ();if(q.set("x-idempotency-key",B),!q.has("x-request-id"))q.set("x-request-id",B);let k=!1,r=async(F,H,W)=>{let D=iJ(F,H),V=async()=>({retry:!1,error:await tK(F,H,{onInvalidCredentials:X,tier:O.tier,requestId:W?.get("x-request-id")??W?.get("request-id")??W?.get("x-qlex-request-id")??void 0})});if(D.category!=="invalid_credentials"||k)return V();k=!0;let S=DJ(M),U=await IJ(M);if(U.kind==="recovered"&&DJ(U.credential)!==S)return M=U.credential,u(),{retry:!0};if(U.kind==="inconclusive")return{retry:!1,error:new g(`HTTP ${F}: ${U.reason}`,D)};return V()},b=(F,H)=>{let W=oK(O),D=!1,V=!1,S=Error("QitQode authorized a pre-execution repair");return BJ({operationId:B,signal:z.signal??void 0,maxAttempts:4,async execute(U){let{res:w,detach:XJ}=await F(W);if(w.ok)return U.markAccepted(),w;try{let ZJ=await w.text(),$J=ZJ;try{$J=JSON.parse(ZJ)}catch{}if(bJ($J))throw new g("Qortex reported execution; reconcile before another inference",{status:w.status,category:"unknown",retryable:!1});if(w.status===413){if(D)sK(W);throw W=aK(W),D=!0,U.markNotAccepted(),S}let LJ=TJ(w.status,$J,w.headers);if(H&&!E&&!V&&w.status===400&&_==="native"&&xK(N)&&["ERR_VALIDATION","VALIDATION_ERROR"].includes(LJ.code??"")&&/\b(tool_calls?|tools?|role)\b.{0,120}\b(unsupported|invalid|unrecognized|unexpected|not allowed)\b|\b(unsupported|invalid|unrecognized|unexpected)\b.{0,120}\b(tool_calls?|tools?|role)\b/i.test(LJ.message))throw W=qJ(N,{toolMode:"text",outputAdvisory:P}),V=!0,U.markNotAccepted(),S;let GJ=await r(w.status,ZJ,w.headers);if(!GJ.retry){if(w.status===429)Object.assign(GJ.error,{acceptance:"not-accepted"});throw GJ.error}throw U.markNotAccepted(),S}finally{XJ()}},shouldRetry:(U)=>U===S,authorizeReplay:({error:U,outcome:w})=>U===S&&w.acceptance==="not-accepted"})};if(O.tier==="orchestrated"){let F=z.signal,H=async(D)=>{let V=new AbortController,S=()=>V.abort(F?.reason);if(F)if(F.aborted)V.abort(F.reason);else F.addEventListener("abort",S,{once:!0});let U=!1,w=setTimeout(()=>{U=!0,V.abort()},$);try{return await G.request(zK,{method:"POST",headers:q,body:JSON.stringify(D),signal:V.signal})}catch(XJ){if(U)throw new g(`no response within ${Math.round($/1000)}s`);throw XJ}finally{clearTimeout(w),F?.removeEventListener("abort",S)}},W=await b(async(D)=>({res:await H(D),detach:()=>{}}),!1);return rK(await W.json())}let A=z.signal,v=await b(async(F)=>{let H=new AbortController,W=()=>H.abort(A?.reason);if(A)if(A.aborted)H.abort(A.reason);else A.addEventListener("abort",W,{once:!0});let D=()=>A?.removeEventListener("abort",W),V=!1,S=setTimeout(()=>{V=!0,H.abort()},$);try{return{res:await G.request(UJ,{method:"POST",headers:q,body:JSON.stringify(F),signal:H.signal}),detach:D}}catch(U){if(D(),V)throw new g(`no response within ${Math.round($/1000)}s`);throw U}finally{clearTimeout(S)}},!0);if(N.stream!==!1&&v.body){let F=Array.isArray(N.tools)&&N.tools.length>0;return new Response(nK(v.body,{toolProtocolEnabled:F,tier:O.tier,requestedOutputBudget:O.opts.max_tokens}),{status:v.status,statusText:v.statusText,headers:{"content-type":"text/event-stream"}})}return v}return K(Y,z)}}function UX(J){let K=J.getToken??(async()=>J.bearerToken),X=eK(K,globalThis.fetch,J.onInvalidCredentials);return vJ({name:J.name??"qlex",baseURL:L.streamBaseUrl(),fetch:X})}function EX(J,K){return a(J,K)!==void 0}var JX=2;function a(J,K){let X=n.get(J)?.advisory,Z=L.tierBudgetFacts(J),$=X?.tierOutputLimit??Z?.output;if(!$)return;let G=K??X?.recommendedTotalTokens??X?.tierRecommendedStepTokens??Z?.recommendedTotal??Z?.recommendedStep;if(!G||G>=$)return;let Y=X?.recommendedTotalTokens??X?.tierRecommendedStepTokens??Z?.recommendedTotal??Z?.recommendedStep??G,z=Math.min($,Math.max(G+1,G*JX,Y));return z>G?z:void 0}var t=!1,PJ=Promise.resolve();
30
+ export{UJ as xp,zK as yp,i as zp,e as Ap,gJ as Bp,uJ as Cp,pJ as Dp,cJ as Ep,mJ as Fp,JJ as Gp,lJ as Hp,g as Ip,WK as Jp,DK as Kp,jX as Lp,x as Mp,EJ as Np,VK as Op,dJ as Pp,iJ as Qp,LK as Rp,s as Sp,aJ as Tp,qK as Up,RK as Vp,kK as Wp,CK as Xp,d as Yp,o as Zp,wK as _p,QJ as $p,sJ as aq,BK as bq,xK as cq,qJ as dq,pK as eq,cK as fq,LX as gq,OX as hq,MX as iq,SX as jq,dK as kq,iK as lq,KK as mq,nK as nq,rK as oq,FX as pq,eK as qq,UX as rq,EX as sq,a as tq};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  function i(f,r){let e=JSON.parse(JSON.stringify(f));if("nullable"in e&&e.nullable===!0){if(e.type)if(Array.isArray(e.type)){if(!e.type.includes("null"))e.type.push("null")}else e.type=[e.type,"null"];else e.type=["null"];delete e.nullable}if(e.$schema)delete e.$schema;if(["properties","additionalProperties","items","additionalItems","allOf","anyOf","oneOf","not","if","then","else","definitions","$defs","patternProperties","propertyNames","contains"].forEach((s)=>{if(e[s]&&(typeof e[s]==="object"||Array.isArray(e[s])))if(s==="properties"||s==="definitions"||s==="$defs"||s==="patternProperties")for(let n in e[s])e[s][n]=i(e[s][n],r);else if(s==="allOf"||s==="anyOf"||s==="oneOf")e[s]=e[s].map((n)=>i(n,r));else if(s==="items")if(Array.isArray(e[s]))e[s]=e[s].map((n)=>i(n,r));else e[s]=i(e[s],r);else e[s]=i(e[s],r)}),e.ref||e.$id){let{ref:s,$id:n,...t}=e,a=s||n;return r.components.schemas={...r.components.schemas,[a]:t},{$ref:`#/components/schemas/${a}`}}else if(e.$ref){let{$ref:s,$defs:n,...t}=e;if(s.includes("://"))return Object.keys(t).length>0?t:{type:"string"};let a=s.split("/").pop();return r.components.schemas={...r.components.schemas,...n},{$ref:`#/components/schemas/${a}`}}return e}
3
- export{i as Nf};
3
+ export{i as Of};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{Qs as Q}from"./chunk-1e75j4m1.js";import{Jt as K}from"./chunk-6yshpz0z.js";import{uP as F,wP as N}from"./chunk-sh03ka27.js";var V={};N(V,{text:()=>P,stop:()=>S,spawn:()=>M,run:()=>Z,lines:()=>T,RunFailedError:()=>Y});var L=F(Q(),1);import{buffer as I}from"stream/consumers";var A=["QITQODE_AUTH_CONTENT","QITQODE_SERVER_PASSWORD","QITQODE_KEY"];function C(B){let z={...B};for(let G of A)delete z[G];return z}function D(){return C(process.env)}class Y extends Error{cmd;code;stdout;stderr;constructor(B,z,G,H){let J=H.toString().trim();super(J?`Command failed with code ${z}: ${B.join(" ")}
2
+ import{uu as Q}from"./chunk-e826jvr2.js";import{nv as K}from"./chunk-s5taq9jy.js";import{_Q as F,aR as N}from"./chunk-pfx8ts02.js";var V={};N(V,{text:()=>P,stop:()=>S,spawn:()=>M,run:()=>Z,lines:()=>T,RunFailedError:()=>Y});var L=F(Q(),1);import{buffer as I}from"stream/consumers";var A=["QITQODE_AUTH_CONTENT","QITQODE_SERVER_PASSWORD","QITQODE_KEY"];function C(B){let z={...B};for(let G of A)delete z[G];return z}function D(){return C(process.env)}class Y extends Error{cmd;code;stdout;stderr;constructor(B,z,G,H){let J=H.toString().trim();super(J?`Command failed with code ${z}: ${B.join(" ")}
3
3
  ${J}`:`Command failed with code ${z}: ${B.join(" ")}`);this.name="ProcessRunFailedError",this.cmd=[...B],this.code=z,this.stdout=G,this.stderr=H}}function M(B,z={}){if(B.length===0)throw Error("Command is required");z.abort?.throwIfAborted();let G=L.default(B[0],B.slice(1),{cwd:z.cwd,shell:z.shell,env:z.env===null?{}:{...D(),...z.env},stdio:[z.stdin??"ignore",z.stdout??"ignore",z.stderr??"ignore"],windowsHide:process.platform==="win32"}),H=!1,J,O=()=>{if(H)return;if(G.exitCode!==null||G.signalCode!==null)return;H=!0,G.kill(z.kill??"SIGTERM");let W=z.timeout??5000;if(W<=0)return;J=setTimeout(()=>G.kill("SIGKILL"),W)},U=new Promise((W,j)=>{let k=()=>{if(z.abort?.removeEventListener("abort",O),J)clearTimeout(J)};G.once("exit",(X,q)=>{k(),W(X??(q?1:0))}),G.once("error",(X)=>{k(),j(X)})});if(U.catch(()=>{return}),z.abort){if(z.abort.addEventListener("abort",O,{once:!0}),z.abort.aborted)O()}let $=G;return $.exited=U,$}async function Z(B,z={}){let G=M(B,{cwd:z.cwd,env:z.env,stdin:z.stdin,shell:z.shell,abort:z.abort,kill:z.kill,timeout:z.timeout,stdout:"pipe",stderr:"pipe"});if(!G.stdout||!G.stderr)throw Error("Process output not available");let H=await Promise.all([G.exited,I(G.stdout),I(G.stderr)]).then(([J,O,U])=>({code:J,stdout:O,stderr:U})).catch((J)=>{if(!z.nothrow)throw J;return{code:1,stdout:Buffer.alloc(0),stderr:Buffer.from(K(J))}});if(H.code===0||z.nothrow)return H;throw new Y(B,H.code,H.stdout,H.stderr)}async function S(B){if(B.exitCode!==null||B.signalCode!==null)return;if(process.platform!=="win32"||!B.pid){B.kill();return}if((await Z(["taskkill","/pid",String(B.pid),"/T","/F"],{nothrow:!0})).code===0)return;B.kill()}async function P(B,z={}){let G=await Z(B,z);return{...G,text:G.stdout.toString()}}async function T(B,z={}){return(await P(B,z)).text.split(/\r?\n/).filter(Boolean)}
4
- export{D as Ls,M as Ms,Z as Ns,P as Os,V as Ps};
4
+ export{D as pu,M as qu,Z as ru,P as su,V as tu};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Te as F}from"./chunk-meehnnv9.js";import{df as z,gf as B,xf as D}from"./chunk-4ycg2c6f.js";import{Uq as x}from"./chunk-pdcxmr6x.js";import"./chunk-cqtkxwd8.js";import"./chunk-a1mbach4.js";import{Lu as q}from"./chunk-sg9enzsp.js";import"./chunk-5q98z8ck.js";import"./chunk-sh03ka27.js";var N="2.0.41",P=q.object({message:q.string(),type:q.string(),param:q.string(),code:q.string()}),Q={errorSchema:P,errorToMessage:(k)=>k.message};function T(k={}){var y;let G=D((y=k.baseURL)!=null?y:"https://api.cerebras.ai/v1"),J=()=>z({Authorization:`Bearer ${B({apiKey:k.apiKey,environmentVariableName:"CEREBRAS_API_KEY",description:"Cerebras API key"})}`,...k.headers},`ai-sdk/cerebras/${N}`),w=(j)=>{return new F(j,{provider:"cerebras.chat",url:({path:K})=>`${G}${K}`,headers:J,fetch:k.fetch,errorStructure:Q,supportsStructuredOutputs:!0})},f=(j)=>w(j);return f.specificationVersion="v3",f.languageModel=w,f.chat=w,f.embeddingModel=(j)=>{throw new x({modelId:j,modelType:"embeddingModel"})},f.textEmbeddingModel=f.embeddingModel,f.imageModel=(j)=>{throw new x({modelId:j,modelType:"imageModel"})},f}var Z=T();export{T as createCerebras,Z as cerebras,N as VERSION};
2
+ import{Ue as F}from"./chunk-a0c6w901.js";import{ef as z,hf as B,yf as D}from"./chunk-fg5f3a8a.js";import{ys as x}from"./chunk-4dy64hgp.js";import"./chunk-cqtkxwd8.js";import"./chunk-gt10s0ks.js";import{pw as q}from"./chunk-9tfm1dk2.js";import"./chunk-x2mbre12.js";import"./chunk-pfx8ts02.js";var N="2.0.41",P=q.object({message:q.string(),type:q.string(),param:q.string(),code:q.string()}),Q={errorSchema:P,errorToMessage:(k)=>k.message};function T(k={}){var y;let G=D((y=k.baseURL)!=null?y:"https://api.cerebras.ai/v1"),J=()=>z({Authorization:`Bearer ${B({apiKey:k.apiKey,environmentVariableName:"CEREBRAS_API_KEY",description:"Cerebras API key"})}`,...k.headers},`ai-sdk/cerebras/${N}`),w=(j)=>{return new F(j,{provider:"cerebras.chat",url:({path:K})=>`${G}${K}`,headers:J,fetch:k.fetch,errorStructure:Q,supportsStructuredOutputs:!0})},f=(j)=>w(j);return f.specificationVersion="v3",f.languageModel=w,f.chat=w,f.embeddingModel=(j)=>{throw new x({modelId:j,modelType:"embeddingModel"})},f.textEmbeddingModel=f.embeddingModel,f.imageModel=(j)=>{throw new x({modelId:j,modelType:"imageModel"})},f}var Z=T();export{T as createCerebras,Z as cerebras,N as VERSION};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  import P from"fs";import B from"fs";var x;function K(){try{return B.statSync("/.dockerenv"),!0}catch{return!1}}function M(){try{return B.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function y(){if(x===void 0)x=K()||M();return x}var z,Q=()=>{try{return P.statSync("/run/.containerenv"),!0}catch{return!1}};function q(){if(z===void 0)z=Q()||y();return z}import J from"process";import V from"os";import A from"fs";var H=()=>{if(J.platform!=="linux")return!1;if(V.release().toLowerCase().includes("microsoft")){if(q())return!1;return!0}try{if(A.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft"))return!q()}catch{}if(A.existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")||A.existsSync("/run/WSL"))return!q();return!1},L=J.env.__IS_WSL_TEST__?H:H();
3
- export{q as hr,L as ir};
3
+ export{q as Ns,L as Os};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{wP as d3,yP as P5}from"./chunk-sh03ka27.js";function R($,X,Y,J,Q){if(J==="m")throw TypeError("Private method is not writable");if(J==="a"&&!Q)throw TypeError("Private accessor was defined without a setter");if(typeof X==="function"?$!==X||!Q:!X.has($))throw TypeError("Cannot write private member to an object whose class did not declare it");return J==="a"?Q.call($,Y):Q?Q.value=Y:X.set($,Y),Y}function M($,X,Y,J){if(Y==="a"&&!J)throw TypeError("Private accessor was defined without a getter");if(typeof X==="function"?$!==X||!J:!X.has($))throw TypeError("Cannot read private member from an object whose class did not declare it");return Y==="m"?J:Y==="a"?J.call($):J?J.value:X.get($)}var t4=function(){let{crypto:$}=globalThis;if($?.randomUUID)return t4=$.randomUUID.bind($),$.randomUUID();let X=new Uint8Array(1),Y=$?()=>$.getRandomValues(X)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,(J)=>(+J^Y()&15>>+J/4).toString(16))};function e$($){return typeof $==="object"&&$!==null&&(("name"in $)&&$.name==="AbortError"||("message"in $)&&String($.message).includes("FetchRequestCanceledException"))}var M8=($)=>{if($ instanceof Error)return $;if(typeof $==="object"&&$!==null){try{if(Object.prototype.toString.call($)==="[object Error]"){let X=Error($.message,$.cause?{cause:$.cause}:{});if($.stack)X.stack=$.stack;if($.cause&&!X.cause)X.cause=$.cause;if($.name)X.name=$.name;return X}}catch{}try{return Error(JSON.stringify($))}catch{}}return Error($)};class f extends Error{}class X$ extends f{constructor($,X,Y,J){super(`${X$.makeMessage($,X,Y)}`);this.status=$,this.headers=J,this.requestID=J?.get("request-id"),this.error=X}static makeMessage($,X,Y){let J=X?.message?typeof X.message==="string"?X.message:JSON.stringify(X.message):X?JSON.stringify(X):Y;if($&&J)return`${$} ${J}`;if($)return`${$} status code (no body)`;if(J)return J;return"(no status code or body)"}static generate($,X,Y,J){if(!$||!J)return new f0({message:Y,cause:M8(X)});let Q=X;if($===400)return new E8($,Q,Y,J);if($===401)return new L8($,Q,Y,J);if($===403)return new Z8($,Q,Y,J);if($===404)return new S8($,Q,Y,J);if($===409)return new A8($,Q,Y,J);if($===422)return new C8($,Q,Y,J);if($===429)return new D8($,Q,Y,J);if($>=500)return new R8($,Q,Y,J);return new X$($,Q,Y,J)}}class q$ extends X${constructor({message:$}={}){super(void 0,void 0,$||"Request was aborted.",void 0)}}class f0 extends X${constructor({message:$,cause:X}){super(void 0,void 0,$||"Connection error.",void 0);if(X)this.cause=X}}class O8 extends f0{constructor({message:$}={}){super({message:$??"Request timed out."})}}class E8 extends X${}class L8 extends X${}class Z8 extends X${}class S8 extends X${}class A8 extends X${}class C8 extends X${}class D8 extends X${}class R8 extends X${}var o5=/^[a-z][a-z0-9+.-]*:/i,E7=($)=>{return o5.test($)},o4=($)=>(o4=Array.isArray,o4($)),e4=o4;function c6($){if(typeof $!=="object")return{};return $??{}}function L7($){if(!$)return!0;for(let X in $)return!1;return!0}function Z7($,X){return Object.prototype.hasOwnProperty.call($,X)}var S7=($,X)=>{if(typeof X!=="number"||!Number.isInteger(X))throw new f(`${$} must be an integer`);if(X<0)throw new f(`${$} must be a positive integer`);return X};var l6=($)=>{try{return JSON.parse($)}catch(X){return}};var A7=($)=>new Promise((X)=>setTimeout(X,$));var w0="0.71.2";var T7=()=>{return typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u"};function e5(){if(typeof Deno<"u"&&Deno.build!=null)return"deno";if(typeof EdgeRuntime<"u")return"edge";if(Object.prototype.toString.call(typeof globalThis.process<"u"?globalThis.process:0)==="[object process]")return"node";return"unknown"}var $Y=()=>{let $=e5();if($==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":w0,"X-Stainless-OS":D7(Deno.build.os),"X-Stainless-Arch":C7(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version==="string"?Deno.version:Deno.version?.deno??"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":w0,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if($==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":w0,"X-Stainless-OS":D7(globalThis.process.platform??"unknown"),"X-Stainless-Arch":C7(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let X=XY();if(X)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":w0,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${X.browser}`,"X-Stainless-Runtime-Version":X.version};return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":w0,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}};function XY(){if(typeof navigator>"u"||!navigator)return null;let $=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(let{key:X,pattern:Y}of $){let J=Y.exec(navigator.userAgent);if(J){let Q=J[1]||0,W=J[2]||0,z=J[3]||0;return{browser:X,version:`${Q}.${W}.${z}`}}}return null}var C7=($)=>{if($==="x32")return"x32";if($==="x86_64"||$==="x64")return"x64";if($==="arm")return"arm";if($==="aarch64"||$==="arm64")return"arm64";if($)return`other:${$}`;return"unknown"},D7=($)=>{if($=$.toLowerCase(),$.includes("ios"))return"iOS";if($==="android")return"Android";if($==="darwin")return"MacOS";if($==="win32")return"Windows";if($==="freebsd")return"FreeBSD";if($==="openbsd")return"OpenBSD";if($==="linux")return"Linux";if($)return`Other:${$}`;return"Unknown"},R7,_7=()=>{return R7??(R7=$Y())};function P7(){if(typeof fetch<"u")return fetch;throw Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new Anthropic({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}function $X(...$){let X=globalThis.ReadableStream;if(typeof X>"u")throw Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new X(...$)}function p6($){let X=Symbol.asyncIterator in $?$[Symbol.asyncIterator]():$[Symbol.iterator]();return $X({start(){},async pull(Y){let{done:J,value:Q}=await X.next();if(J)Y.close();else Y.enqueue(Q)},async cancel(){await X.return?.()}})}function T8($){if($[Symbol.asyncIterator])return $;let X=$.getReader();return{async next(){try{let Y=await X.read();if(Y?.done)X.releaseLock();return Y}catch(Y){throw X.releaseLock(),Y}},async return(){let Y=X.cancel();return X.releaseLock(),await Y,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function j7($){if($===null||typeof $!=="object")return;if($[Symbol.asyncIterator]){await $[Symbol.asyncIterator]().return?.();return}let X=$.getReader(),Y=X.cancel();X.releaseLock(),await Y}var k7=({headers:$,body:X})=>{return{bodyHeaders:{"content-type":"application/json"},body:JSON.stringify(X)}};function b7($){let X=0;for(let Q of $)X+=Q.length;let Y=new Uint8Array(X),J=0;for(let Q of $)Y.set(Q,J),J+=Q.length;return Y}var x7;function _8($){let X;return(x7??(X=new globalThis.TextEncoder,x7=X.encode.bind(X)))($)}var f7;function XX($){let X;return(f7??(X=new globalThis.TextDecoder,f7=X.decode.bind(X)))($)}var Z$,S$;class N0{constructor(){Z$.set(this,void 0),S$.set(this,void 0),R(this,Z$,new Uint8Array,"f"),R(this,S$,null,"f")}decode($){if($==null)return[];let X=$ instanceof ArrayBuffer?new Uint8Array($):typeof $==="string"?_8($):$;R(this,Z$,b7([M(this,Z$,"f"),X]),"f");let Y=[],J;while((J=QY(M(this,Z$,"f"),M(this,S$,"f")))!=null){if(J.carriage&&M(this,S$,"f")==null){R(this,S$,J.index,"f");continue}if(M(this,S$,"f")!=null&&(J.index!==M(this,S$,"f")+1||J.carriage)){Y.push(XX(M(this,Z$,"f").subarray(0,M(this,S$,"f")-1))),R(this,Z$,M(this,Z$,"f").subarray(M(this,S$,"f")),"f"),R(this,S$,null,"f");continue}let Q=M(this,S$,"f")!==null?J.preceding-1:J.preceding,W=XX(M(this,Z$,"f").subarray(0,Q));Y.push(W),R(this,Z$,M(this,Z$,"f").subarray(J.index),"f"),R(this,S$,null,"f")}return Y}flush(){if(!M(this,Z$,"f").length)return[];return this.decode(`
2
+ import{aR as d3,cR as P5}from"./chunk-pfx8ts02.js";function R($,X,Y,J,Q){if(J==="m")throw TypeError("Private method is not writable");if(J==="a"&&!Q)throw TypeError("Private accessor was defined without a setter");if(typeof X==="function"?$!==X||!Q:!X.has($))throw TypeError("Cannot write private member to an object whose class did not declare it");return J==="a"?Q.call($,Y):Q?Q.value=Y:X.set($,Y),Y}function M($,X,Y,J){if(Y==="a"&&!J)throw TypeError("Private accessor was defined without a getter");if(typeof X==="function"?$!==X||!J:!X.has($))throw TypeError("Cannot read private member from an object whose class did not declare it");return Y==="m"?J:Y==="a"?J.call($):J?J.value:X.get($)}var t4=function(){let{crypto:$}=globalThis;if($?.randomUUID)return t4=$.randomUUID.bind($),$.randomUUID();let X=new Uint8Array(1),Y=$?()=>$.getRandomValues(X)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,(J)=>(+J^Y()&15>>+J/4).toString(16))};function e$($){return typeof $==="object"&&$!==null&&(("name"in $)&&$.name==="AbortError"||("message"in $)&&String($.message).includes("FetchRequestCanceledException"))}var M8=($)=>{if($ instanceof Error)return $;if(typeof $==="object"&&$!==null){try{if(Object.prototype.toString.call($)==="[object Error]"){let X=Error($.message,$.cause?{cause:$.cause}:{});if($.stack)X.stack=$.stack;if($.cause&&!X.cause)X.cause=$.cause;if($.name)X.name=$.name;return X}}catch{}try{return Error(JSON.stringify($))}catch{}}return Error($)};class f extends Error{}class X$ extends f{constructor($,X,Y,J){super(`${X$.makeMessage($,X,Y)}`);this.status=$,this.headers=J,this.requestID=J?.get("request-id"),this.error=X}static makeMessage($,X,Y){let J=X?.message?typeof X.message==="string"?X.message:JSON.stringify(X.message):X?JSON.stringify(X):Y;if($&&J)return`${$} ${J}`;if($)return`${$} status code (no body)`;if(J)return J;return"(no status code or body)"}static generate($,X,Y,J){if(!$||!J)return new f0({message:Y,cause:M8(X)});let Q=X;if($===400)return new E8($,Q,Y,J);if($===401)return new L8($,Q,Y,J);if($===403)return new Z8($,Q,Y,J);if($===404)return new S8($,Q,Y,J);if($===409)return new A8($,Q,Y,J);if($===422)return new C8($,Q,Y,J);if($===429)return new D8($,Q,Y,J);if($>=500)return new R8($,Q,Y,J);return new X$($,Q,Y,J)}}class q$ extends X${constructor({message:$}={}){super(void 0,void 0,$||"Request was aborted.",void 0)}}class f0 extends X${constructor({message:$,cause:X}){super(void 0,void 0,$||"Connection error.",void 0);if(X)this.cause=X}}class O8 extends f0{constructor({message:$}={}){super({message:$??"Request timed out."})}}class E8 extends X${}class L8 extends X${}class Z8 extends X${}class S8 extends X${}class A8 extends X${}class C8 extends X${}class D8 extends X${}class R8 extends X${}var o5=/^[a-z][a-z0-9+.-]*:/i,E7=($)=>{return o5.test($)},o4=($)=>(o4=Array.isArray,o4($)),e4=o4;function c6($){if(typeof $!=="object")return{};return $??{}}function L7($){if(!$)return!0;for(let X in $)return!1;return!0}function Z7($,X){return Object.prototype.hasOwnProperty.call($,X)}var S7=($,X)=>{if(typeof X!=="number"||!Number.isInteger(X))throw new f(`${$} must be an integer`);if(X<0)throw new f(`${$} must be a positive integer`);return X};var l6=($)=>{try{return JSON.parse($)}catch(X){return}};var A7=($)=>new Promise((X)=>setTimeout(X,$));var w0="0.71.2";var T7=()=>{return typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u"};function e5(){if(typeof Deno<"u"&&Deno.build!=null)return"deno";if(typeof EdgeRuntime<"u")return"edge";if(Object.prototype.toString.call(typeof globalThis.process<"u"?globalThis.process:0)==="[object process]")return"node";return"unknown"}var $Y=()=>{let $=e5();if($==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":w0,"X-Stainless-OS":D7(Deno.build.os),"X-Stainless-Arch":C7(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version==="string"?Deno.version:Deno.version?.deno??"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":w0,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if($==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":w0,"X-Stainless-OS":D7(globalThis.process.platform??"unknown"),"X-Stainless-Arch":C7(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let X=XY();if(X)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":w0,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${X.browser}`,"X-Stainless-Runtime-Version":X.version};return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":w0,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}};function XY(){if(typeof navigator>"u"||!navigator)return null;let $=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(let{key:X,pattern:Y}of $){let J=Y.exec(navigator.userAgent);if(J){let Q=J[1]||0,W=J[2]||0,z=J[3]||0;return{browser:X,version:`${Q}.${W}.${z}`}}}return null}var C7=($)=>{if($==="x32")return"x32";if($==="x86_64"||$==="x64")return"x64";if($==="arm")return"arm";if($==="aarch64"||$==="arm64")return"arm64";if($)return`other:${$}`;return"unknown"},D7=($)=>{if($=$.toLowerCase(),$.includes("ios"))return"iOS";if($==="android")return"Android";if($==="darwin")return"MacOS";if($==="win32")return"Windows";if($==="freebsd")return"FreeBSD";if($==="openbsd")return"OpenBSD";if($==="linux")return"Linux";if($)return`Other:${$}`;return"Unknown"},R7,_7=()=>{return R7??(R7=$Y())};function P7(){if(typeof fetch<"u")return fetch;throw Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new Anthropic({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}function $X(...$){let X=globalThis.ReadableStream;if(typeof X>"u")throw Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new X(...$)}function p6($){let X=Symbol.asyncIterator in $?$[Symbol.asyncIterator]():$[Symbol.iterator]();return $X({start(){},async pull(Y){let{done:J,value:Q}=await X.next();if(J)Y.close();else Y.enqueue(Q)},async cancel(){await X.return?.()}})}function T8($){if($[Symbol.asyncIterator])return $;let X=$.getReader();return{async next(){try{let Y=await X.read();if(Y?.done)X.releaseLock();return Y}catch(Y){throw X.releaseLock(),Y}},async return(){let Y=X.cancel();return X.releaseLock(),await Y,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function j7($){if($===null||typeof $!=="object")return;if($[Symbol.asyncIterator]){await $[Symbol.asyncIterator]().return?.();return}let X=$.getReader(),Y=X.cancel();X.releaseLock(),await Y}var k7=({headers:$,body:X})=>{return{bodyHeaders:{"content-type":"application/json"},body:JSON.stringify(X)}};function b7($){let X=0;for(let Q of $)X+=Q.length;let Y=new Uint8Array(X),J=0;for(let Q of $)Y.set(Q,J),J+=Q.length;return Y}var x7;function _8($){let X;return(x7??(X=new globalThis.TextEncoder,x7=X.encode.bind(X)))($)}var f7;function XX($){let X;return(f7??(X=new globalThis.TextDecoder,f7=X.decode.bind(X)))($)}var Z$,S$;class N0{constructor(){Z$.set(this,void 0),S$.set(this,void 0),R(this,Z$,new Uint8Array,"f"),R(this,S$,null,"f")}decode($){if($==null)return[];let X=$ instanceof ArrayBuffer?new Uint8Array($):typeof $==="string"?_8($):$;R(this,Z$,b7([M(this,Z$,"f"),X]),"f");let Y=[],J;while((J=QY(M(this,Z$,"f"),M(this,S$,"f")))!=null){if(J.carriage&&M(this,S$,"f")==null){R(this,S$,J.index,"f");continue}if(M(this,S$,"f")!=null&&(J.index!==M(this,S$,"f")+1||J.carriage)){Y.push(XX(M(this,Z$,"f").subarray(0,M(this,S$,"f")-1))),R(this,Z$,M(this,Z$,"f").subarray(M(this,S$,"f")),"f"),R(this,S$,null,"f");continue}let Q=M(this,S$,"f")!==null?J.preceding-1:J.preceding,W=XX(M(this,Z$,"f").subarray(0,Q));Y.push(W),R(this,Z$,M(this,Z$,"f").subarray(J.index),"f"),R(this,S$,null,"f")}return Y}flush(){if(!M(this,Z$,"f").length)return[];return this.decode(`
3
3
  `)}}Z$=new WeakMap,S$=new WeakMap;N0.NEWLINE_CHARS=new Set([`
4
4
  `,"\r"]);N0.NEWLINE_REGEXP=/\r\n|[\n\r]/g;function QY($,X){for(let Q=X??0;Q<$.length;Q++){if($[Q]===10)return{preceding:Q,index:Q+1,carriage:!1};if($[Q]===13)return{preceding:Q,index:Q+1,carriage:!0}}return null}function I7($){for(let J=0;J<$.length-1;J++){if($[J]===10&&$[J+1]===10)return J+2;if($[J]===13&&$[J+1]===13)return J+2;if($[J]===13&&$[J+1]===10&&J+3<$.length&&$[J+2]===13&&$[J+3]===10)return J+4}return-1}var n6={off:0,error:200,warn:300,info:400,debug:500},YX=($,X,Y)=>{if(!$)return;if(Z7(n6,$))return $;G$(Y).warn(`${X} was set to ${JSON.stringify($)}, expected one of ${JSON.stringify(Object.keys(n6))}`);return};function P8(){}function i6($,X,Y){if(!X||n6[$]>n6[Y])return P8;else return X[$].bind(X)}var WY={error:P8,warn:P8,info:P8,debug:P8},v7=new WeakMap;function G$($){let X=$.logger,Y=$.logLevel??"off";if(!X)return WY;let J=v7.get(X);if(J&&J[0]===Y)return J[1];let Q={error:i6("error",X,Y),warn:i6("warn",X,Y),info:i6("info",X,Y),debug:i6("debug",X,Y)};return v7.set(X,[Y,Q]),Q}var $0=($)=>{if($.options)$.options={...$.options},delete $.options.headers;if($.headers)$.headers=Object.fromEntries(($.headers instanceof Headers?[...$.headers]:Object.entries($.headers)).map(([X,Y])=>[X,X.toLowerCase()==="x-api-key"||X.toLowerCase()==="authorization"||X.toLowerCase()==="cookie"||X.toLowerCase()==="set-cookie"?"***":Y]));if("retryOfRequestLogID"in $){if($.retryOfRequestLogID)$.retryOf=$.retryOfRequestLogID;delete $.retryOfRequestLogID}return $};var j8;class A${constructor($,X,Y){this.iterator=$,j8.set(this,void 0),this.controller=X,R(this,j8,Y,"f")}static fromSSEResponse($,X,Y){let J=!1,Q=Y?G$(Y):console;async function*W(){if(J)throw new f("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");J=!0;let z=!1;try{for await(let G of zY($,X)){if(G.event==="completion")try{yield JSON.parse(G.data)}catch(V){throw Q.error("Could not parse message into JSON:",G.data),Q.error("From chunk:",G.raw),V}if(G.event==="message_start"||G.event==="message_delta"||G.event==="message_stop"||G.event==="content_block_start"||G.event==="content_block_delta"||G.event==="content_block_stop")try{yield JSON.parse(G.data)}catch(V){throw Q.error("Could not parse message into JSON:",G.data),Q.error("From chunk:",G.raw),V}if(G.event==="ping")continue;if(G.event==="error")throw new X$(void 0,l6(G.data)??G.data,void 0,$.headers)}z=!0}catch(G){if(e$(G))return;throw G}finally{if(!z)X.abort()}}return new A$(W,X,Y)}static fromReadableStream($,X,Y){let J=!1;async function*Q(){let z=new N0,G=T8($);for await(let V of G)for(let H of z.decode(V))yield H;for(let V of z.flush())yield V}async function*W(){if(J)throw new f("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");J=!0;let z=!1;try{for await(let G of Q()){if(z)continue;if(G)yield JSON.parse(G)}z=!0}catch(G){if(e$(G))return;throw G}finally{if(!z)X.abort()}}return new A$(W,X,Y)}[(j8=new WeakMap,Symbol.asyncIterator)](){return this.iterator()}tee(){let $=[],X=[],Y=this.iterator(),J=(Q)=>{return{next:()=>{if(Q.length===0){let W=Y.next();$.push(W),X.push(W)}return Q.shift()}}};return[new A$(()=>J($),this.controller,M(this,j8,"f")),new A$(()=>J(X),this.controller,M(this,j8,"f"))]}toReadableStream(){let $=this,X;return $X({async start(){X=$[Symbol.asyncIterator]()},async pull(Y){try{let{value:J,done:Q}=await X.next();if(Q)return Y.close();let W=_8(JSON.stringify(J)+`
5
5
  `);Y.enqueue(W)}catch(J){Y.error(J)}},async cancel(){await X.return?.()}})}}async function*zY($,X){if(!$.body){if(X.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative")throw new f("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api");throw new f("Attempted to iterate over a response with no body")}let Y=new y7,J=new N0,Q=T8($.body);for await(let W of GY(Q))for(let z of J.decode(W)){let G=Y.decode(z);if(G)yield G}for(let W of J.flush()){let z=Y.decode(W);if(z)yield z}}async function*GY($){let X=new Uint8Array;for await(let Y of $){if(Y==null)continue;let J=Y instanceof ArrayBuffer?new Uint8Array(Y):typeof Y==="string"?_8(Y):Y,Q=new Uint8Array(X.length+J.length);Q.set(X),Q.set(J,X.length),X=Q;let W;while((W=I7(X))!==-1)yield X.slice(0,W),X=X.slice(W)}if(X.length>0)yield X}class y7{constructor(){this.event=null,this.data=[],this.chunks=[]}decode($){if($.endsWith("\r"))$=$.substring(0,$.length-1);if(!$){if(!this.event&&!this.data.length)return null;let Q={event:this.event,data:this.data.join(`
@@ -99,4 +99,4 @@ ${Q.content}`:Q.content;continue}if(Q.role==="user"){let W=[];for(let z of Q.con
99
99
  `,wW=600000,d5=class{config;fetchFn;cache=new Map;constructor($){this.config=$,this.fetchFn=$.fetch??fetch}async discover($){let X=this.cache.get($);if(X&&X.expiresAt>Date.now())return X.data;let Y=`${this.config.instanceUrl}/api/graphql`;try{let J=await this.fetchFn(Y,{method:"POST",headers:{...this.config.getHeaders(),"Content-Type":"application/json"},body:JSON.stringify({query:qW,variables:{rootNamespaceId:$}})});if(!J.ok){let H=await J.text();throw new x({message:`Model discovery GraphQL request failed: ${J.status} ${J.statusText} - ${H}`,statusCode:J.status,responseBody:H})}let Q=await J.json();if(Q.errors&&Q.errors.length>0)throw new x({message:`Model discovery GraphQL errors: ${Q.errors.map((H)=>H.message).join(", ")}`});let W=Q.data?.aiChatAvailableModels,z=Q.data?.metadata,G=z?.featureFlags?.find((H)=>H.name==="ai_user_model_switching")?.enabled??!1,V={defaultModel:W?.defaultModel??null,selectableModels:W?.selectableModels??[],pinnedModel:W?.pinnedModel??null,modelSwitchingEnabled:G,instanceVersion:z?.version??null};return this.cache.set($,{data:V,expiresAt:Date.now()+wW}),V}catch(J){if(J instanceof x)throw J;throw new x({message:`Model discovery failed: ${J}`,cause:J})}}async getEffectiveModelRef($,X){let Y=await this.discover($);if(Y.pinnedModel)return Y.pinnedModel.ref;if(X&&Y.modelSwitchingEnabled){if(Y.selectableModels.some((Q)=>Q.ref===X))return X}return Y.defaultModel?.ref??null}invalidateCache(){this.cache.clear()}},NW=600000;function UW(){let $=process.env.XDG_CACHE_HOME||h6.join(c5.homedir(),".cache");return h6.join($,"opencode","gitlab-workflow-model-cache.json")}function FW($,X){let Y=(X||"https://gitlab.com").replace(/\/$/,"");return l5.createHash("sha256").update(`${$}\x00${Y}`).digest("hex").slice(0,12)}var p5=class{filePath;key;constructor($,X){this.filePath=UW(),this.key=FW($,X)}readAll(){try{if(!u$.existsSync(this.filePath))return{};let $=u$.readFileSync(this.filePath,"utf-8");return JSON.parse($)}catch{return{}}}writeAll($){try{let X=h6.dirname(this.filePath);u$.mkdirSync(X,{recursive:!0,mode:448}),u$.writeFileSync(this.filePath,JSON.stringify($,null,2),{mode:384})}catch{}}load(){return this.readAll()[this.key]??null}save($){let X=this.readAll();X[this.key]=$,this.writeAll(X)}isDiscoveryExpired(){let $=this.load();if(!$?.discovery||!$.updatedAt)return!0;return Date.now()-new Date($.updatedAt).getTime()>NW}saveDiscovery($,X){let Y=this.load();this.save({discovery:$,project:X!==void 0?X:Y?.project??null,selectedModelRef:Y?.selectedModelRef??null,selectedModelName:Y?.selectedModelName??null,updatedAt:new Date().toISOString()})}saveSelection($,X){let Y=this.load(),J=X;if(!J&&$&&Y?.discovery){let Q=Y.discovery;J=(Q.pinnedModel?.ref===$?Q.pinnedModel:Q.selectableModels.find((z)=>z.ref===$)??(Q.defaultModel?.ref===$?Q.defaultModel:null))?.name??null}this.save({discovery:Y?.discovery??null,project:Y?.project??null,selectedModelRef:$,selectedModelName:J,updatedAt:new Date().toISOString()})}clear(){let $=this.readAll();if(delete $[this.key],Object.keys($).length===0)try{if(u$.existsSync(this.filePath))u$.unlinkSync(this.filePath)}catch{}else this.writeAll($)}getSelectedModelRef(){return this.load()?.selectedModelRef??null}getSelectedModelName(){return this.load()?.selectedModelName??null}getDiscovery(){return this.load()?.discovery??null}};function B7($){if(!$||typeof $!=="object")return $;let X={};for(let[Y,J]of Object.entries($)){if(Y==="description"||Y==="examples"||Y==="default")continue;if(Y==="properties"&&typeof J==="object"&&J!==null){let Q={};for(let[W,z]of Object.entries(J))if(typeof z==="object"&&z!==null)Q[W]=B7(z);else Q[W]=z;X[Y]=Q}else if(Y==="items"&&typeof J==="object"&&J!==null)X[Y]=B7(J);else X[Y]=J}return X}function MW($){try{return JSON.stringify(B7(JSON.parse($)))}catch{return $}}function OW($){if(!$||typeof $!=="object")return $;let X={type:$.type||"object"};if($.required)X.required=$.required;if($.properties&&typeof $.properties==="object"){let Y={};for(let[J,Q]of Object.entries($.properties))if(typeof Q==="object"&&Q!==null){let W=Q;Y[J]={type:W.type||"string"}}else Y[J]={type:"string"};X.properties=Y}return X}function EW($){try{return JSON.stringify(OW(JSON.parse($)))}catch{return $}}var LW=class ${specificationVersion="v3";modelId;supportedUrls={};config;workflowOptions;tokenClient;projectDetector;modelDiscovery;modelCache;detectedProjectPath=null;sessionWorkflows=new Map;currentWorkflowId=null;currentWorkflowDefinition=null;persistedAgentEmitted=new Map;activeClients=new Set;_selectedModelRef;_selectedModelName;_rootNamespaceId;_discoveryPromise;get selectedModelRef(){return this._selectedModelRef??null}set selectedModelRef(X){this._selectedModelRef=X??void 0,this._selectedModelName=void 0,this.modelCache.saveSelection(X,null)}get selectedModelName(){return this._selectedModelName??null}set selectedModelName(X){this._selectedModelName=X??void 0,this.modelCache.saveSelection(this._selectedModelRef??null,X)}_toolExecutor=null;onUsageUpdate=null;sessionPreapprovedTools=[];sessionID="";set approvalHandler(X){this.workflowOptions.approvalHandler=X??void 0}get approvalHandler(){return this.workflowOptions.approvalHandler??null}onSelectModel=null;set systemPrompt(X){this.workflowOptions.systemPrompt=X??void 0}get systemPrompt(){return this.workflowOptions.systemPrompt??null}get toolExecutor(){return this._toolExecutor}set toolExecutor(X){if(X)try{let{AsyncResource:Y}=N7("async_hooks");this._toolExecutor=Y.bind(X)}catch{this._toolExecutor=X}else this._toolExecutor=null}constructor(X,Y,J={}){this.modelId=X,this.config=Y,this.workflowOptions=J;let Q=J.workingDirectory??process.cwd();this.modelCache=new p5(Q,Y.instanceUrl);let W=this.modelCache.load();if(W?.selectedModelRef)this._selectedModelRef=W.selectedModelRef;if(W?.selectedModelName)this._selectedModelName=W.selectedModelName;this.tokenClient=new HW({instanceUrl:Y.instanceUrl,getHeaders:Y.getHeaders,refreshApiKey:Y.refreshApiKey,fetch:Y.fetch,featureFlags:Y.featureFlags}),this.projectDetector=new u5({instanceUrl:Y.instanceUrl,getHeaders:Y.getHeaders,fetch:Y.fetch}),this.modelDiscovery=new d5({instanceUrl:Y.instanceUrl,getHeaders:Y.getHeaders,fetch:Y.fetch})}get provider(){return this.config.provider}async resolveProjectId(){if(this.workflowOptions.projectId)return this.workflowOptions.projectId;if(this.detectedProjectPath)return this.detectedProjectPath;let X=this.workflowOptions.workingDirectory??process.cwd(),Y=await this.projectDetector.detectProject(X);if(Y)return this.detectedProjectPath=Y.pathWithNamespace,Y.pathWithNamespace;return}async resolveRootNamespaceId(){if(this.workflowOptions.rootNamespaceId)return this.workflowOptions.rootNamespaceId;if(this._rootNamespaceId!==void 0)return this._rootNamespaceId;let X=this.workflowOptions.workingDirectory??process.cwd(),Y=await this.projectDetector.detectProject(X);if(Y?.namespaceId){let J=`gid://gitlab/Group/${Y.namespaceId}`;return this._rootNamespaceId=J,J}return this._rootNamespaceId=null,null}async resolveModelRef(){let X=sQ(this.modelId);if(this.modelId!=="duo-workflow")return X??"default";if(this._selectedModelRef)return this._selectedModelRef;if(!this._discoveryPromise)this._discoveryPromise=this.doResolveModelRef(),this._discoveryPromise.finally(()=>{this._discoveryPromise=void 0});return this._discoveryPromise}async doResolveModelRef(){let X=await this.resolveRootNamespaceId();if(!X)return this._selectedModelRef="default","default";try{let Y=await this.modelDiscovery.discover(X);if(this.modelCache.saveDiscovery(Y),Y.pinnedModel)return this._selectedModelRef=Y.pinnedModel.ref,this._selectedModelName=Y.pinnedModel.name,this.modelCache.saveSelection(Y.pinnedModel.ref,Y.pinnedModel.name),Y.pinnedModel.ref;let J=this.onSelectModel??this.workflowOptions.onSelectModel;if(Y.selectableModels.length>0&&J){let Q=await J(Y.selectableModels);if(Q){let W=Y.selectableModels.find((z)=>z.ref===Q);if(W)return this._selectedModelRef=W.ref,this._selectedModelName=W.name,this.modelCache.saveSelection(W.ref,W.name),W.ref}}if(Y.defaultModel)return this._selectedModelRef=Y.defaultModel.ref,this._selectedModelName=Y.defaultModel.name,this.modelCache.saveSelection(Y.defaultModel.ref,Y.defaultModel.name),Y.defaultModel.ref}catch{let Y=this.modelCache.load();if(Y?.selectedModelRef)return this._selectedModelRef=Y.selectedModelRef,this._selectedModelName=Y.selectedModelName??void 0,Y.selectedModelRef}return this._selectedModelRef="default","default"}async discoverModels(X){let Y=await this.modelDiscovery.discover(X);return this.modelCache.saveDiscovery(Y),Y}getModelCache(){return this.modelCache}stopWorkflow(){for(let X of this.activeClients)if(X.isConnected)X.stop()}resetWorkflow(X){if(X)this.sessionWorkflows.delete(X);else this.sessionWorkflows.clear(),this.currentWorkflowId=null,this.persistedAgentEmitted.clear()}get workflowId(){return this.currentWorkflowId}createUsage(X){return{inputTokens:{total:X?.inputTotal,noCache:X?.inputTotal,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:X?.outputTotal,text:X?.outputTotal,reasoning:void 0}}}createFinishReason(X,Y){return{unified:X,raw:Y}}async doGenerate(X){let{stream:Y}=await this.doStream(X),J=Y.getReader(),Q=[],W=[],z={unified:"other",raw:void 0},G=this.createUsage();try{while(!0){let{done:q,value:w}=await J.read();if(q)break;switch(w.type){case"text-delta":Q.push(w.delta);break;case"tool-call":W.push({type:"tool-call",toolCallId:w.toolCallId,toolName:w.toolName,input:w.input});break;case"finish":if(z=w.finishReason,w.usage)G=w.usage;break;case"error":throw w.error}}}finally{J.releaseLock()}let V=[],H=Q.join("");if(H)V.push({type:"text",text:H});return V.push(...W),{content:V,finishReason:z,usage:G,warnings:[]}}async doStream(X){let Y=this.extractGoalFromPrompt(X.prompt),J=await this.resolveModelRef(),Q=this.extractMcpTools(X),W=[...this.workflowOptions.preapprovedTools??Q.map((a)=>a.name),...this.sessionPreapprovedTools],z=this.buildAdditionalContext(X.prompt),G=this.toolExecutor??null,V=new Set(X.tools?.map((a)=>a.name)??[]),H=X.providerOptions?.gitlab,q=H?.workflowDefinition??this.workflowOptions.workflowDefinition,w=H?.flowConfig??void 0,B=H?.flowConfigSchemaVersion??void 0,U=H?.aiCatalogItemVersionId??void 0;await this.tokenClient.getToken(q??y6,this.workflowOptions.rootNamespaceId);let O=await this.resolveProjectId(),P=w??q??y6,j=this.sessionID,L=this.sessionWorkflows.get(j);if(L&&L.workflowDefinition!==P)this.sessionWorkflows.delete(j),L=void 0;let A=j==="";if(A&&this.currentWorkflowId&&this.currentWorkflowDefinition!==P)this.currentWorkflowId=null,this.currentWorkflowDefinition=null;let E;if(L)E=L.workflowId;else if(A&&this.currentWorkflowId)E=this.currentWorkflowId;else if(E=await this.tokenClient.createWorkflow(Y,{projectId:O,namespaceId:this.workflowOptions.namespaceId,workflowDefinition:q,agentPrivileges:this.workflowOptions.agentPrivileges,aiCatalogItemVersionId:U}),A)this.currentWorkflowId=E,this.currentWorkflowDefinition=P;else this.sessionWorkflows.set(j,{workflowId:E,workflowDefinition:P,agentEmitted:new Map,toolEntries:new Set}),L=this.sessionWorkflows.get(j);let _=new x5;this.activeClients.add(_);let c=0,n={streamClosed:!1,streamedInputChars:0,streamedOutputChars:0,pendingToolCount:0,approvalPending:!1,deferredClose:null,activeTextBlockId:null,agentMessageEmitted:new Map(L?.agentEmitted??this.persistedAgentEmitted),currentAgentMessageId:"",activeClient:_,processedRequestIDs:new Set,emittedToolEntries:new Set(L?.toolEntries),emittedToolKeys:new Set,sessionKey:j};for(let a of X.prompt)if(a.role==="system")n.streamedInputChars+=a.content.length;else if(a.role==="user"){for(let u of a.content)if(u.type==="text")n.streamedInputChars+=u.text.length}let p;return{stream:new ReadableStream({start:async(a)=>{try{await _.connect({instanceUrl:this.config.instanceUrl,modelRef:J,headers:this.config.getHeaders(),projectId:this.workflowOptions.projectId,namespaceId:this.workflowOptions.namespaceId,rootNamespaceId:this.workflowOptions.rootNamespaceId,aiCatalogItemVersionId:U,workflowDefinition:q??this.workflowOptions.workflowDefinition},(s4)=>{this.handleWorkflowEvent(n,s4,a,_,G,()=>`text-${c++}`,V,p,{aiCatalogItemVersionId:U,workflowDefinition:q??this.workflowOptions.workflowDefinition})});let u=q??y6,x$=this.workflowOptions.clientCapabilities??$W,u6=await this.buildWorkflowMetadata(),w2=JSON.stringify(u6),d6=JSON.stringify({workflowID:E,clientVersion:K7,workflowDefinition:u,goal:Y,workflowMetadata:w2,clientCapabilities:x$,preapproved_tools:W}).length+100,r4=this.trimPayload(Q,z,d6),r5=W.filter((s4)=>r4.mcpTools.some((s5)=>s5.name===s4));p={workflowID:E,clientVersion:K7,workflowDefinition:u,goal:Y,workflowMetadata:w2,additional_context:r4.additionalContext,clientCapabilities:x$,mcpTools:r4.mcpTools,preapproved_tools:r5};let M7=w??this.workflowOptions.flowConfig,O7=B??this.workflowOptions.flowConfigSchemaVersion;if(M7)p.flowConfig=M7;if(O7)p.flowConfigSchemaVersion=O7;else if(p.flowConfig)p.flowConfigSchemaVersion="v1";_.sendStartRequest(p),a.enqueue({type:"stream-start",warnings:[]}),a.enqueue({type:"response-metadata",id:E,modelId:J})}catch(u){if(!n.streamClosed)a.enqueue({type:"error",error:u instanceof x?u:new x({message:`Workflow connection failed: ${u}`,cause:u})}),n.streamClosed=!0,a.close()}},cancel:(a)=>{if(_.stop(),_.close(),this.activeClients.delete(_),n.activeClient=null,!n.streamClosed)if(n.sessionKey)this.sessionWorkflows.delete(n.sessionKey);else this.currentWorkflowId=null}}),request:{body:{workflowId:E,modelRef:J,goal:Y}}}}handleWorkflowEvent(X,Y,J,Q,W,z,G,V,H){if(X.streamClosed)return;switch(Y.type){case"checkpoint":{this.processCheckpoint(X,Y.data,J,z);break}case"tool-request":{let{requestID:q,data:w}=Y;if(X.processedRequestIDs.has(q))break;X.processedRequestIDs.add(q),X.emittedToolKeys.add(w.name);let B;try{JSON.parse(w.args),B=w.args}catch{B=w.args||"{}"}if(X.activeTextBlockId)J.enqueue({type:"text-end",id:X.activeTextBlockId}),X.activeTextBlockId=null;J.enqueue({type:"tool-input-start",id:q,toolName:w.name,providerExecuted:!0}),J.enqueue({type:"tool-input-delta",id:q,delta:B}),J.enqueue({type:"tool-input-end",id:q}),J.enqueue({type:"tool-call",toolCallId:q,toolName:w.name,input:B,providerExecuted:!0}),this.executeToolAndRespond(X,Q,J,q,w.name,B,W).catch(()=>{});break}case"builtin-tool-request":{if(X.processedRequestIDs.has(Y.requestID))break;X.processedRequestIDs.add(Y.requestID);let q=WW(Y.toolName,Y.data,G);X.emittedToolKeys.add(q.toolName);let w=JSON.stringify(q.args);if(X.activeTextBlockId)J.enqueue({type:"text-end",id:X.activeTextBlockId}),X.activeTextBlockId=null;J.enqueue({type:"tool-input-start",id:Y.requestID,toolName:q.toolName,providerExecuted:!0}),J.enqueue({type:"tool-input-delta",id:Y.requestID,delta:w}),J.enqueue({type:"tool-input-end",id:Y.requestID}),J.enqueue({type:"tool-call",toolCallId:Y.requestID,toolName:q.toolName,input:w,providerExecuted:!0}),this.executeToolAndRespond(X,Q,J,Y.requestID,q.toolName,w,W).catch(()=>{});break}case"approval-required":{X.approvalPending=!0,this.approveAndResume(X,Y.tools,V,J,W,z,G,H).catch((q)=>{if(X.approvalPending=!1,X.deferredClose){let w=X.deferredClose;X.deferredClose=null,w()}});break}case"completed":{if(X.activeTextBlockId)J.enqueue({type:"text-end",id:X.activeTextBlockId}),X.activeTextBlockId=null;let q=()=>{if(X.streamClosed)return;let w=Math.ceil(X.streamedInputChars/4),B=Math.ceil(X.streamedOutputChars/4);J.enqueue({type:"finish",finishReason:this.createFinishReason("stop","completed"),usage:this.createUsage({inputTotal:w,outputTotal:B})}),X.streamClosed=!0,J.close(),this.cleanupClient(X,!1)};if(X.pendingToolCount>0||X.approvalPending)X.deferredClose=q;else X.deferredClose=null,q();break}case"failed":{if(X.activeTextBlockId)J.enqueue({type:"text-end",id:X.activeTextBlockId}),X.activeTextBlockId=null;J.enqueue({type:"error",error:new x({message:`Workflow failed: ${g6(Y.error.message)}`,cause:Y.error})}),X.streamClosed=!0,J.close(),this.cleanupClient(X,!0);break}case"closed":{if(X.streamClosed)break;if(X.activeTextBlockId)J.enqueue({type:"text-end",id:X.activeTextBlockId}),X.activeTextBlockId=null;let q=()=>{if(X.streamClosed)return;if(Y.code!==1000)J.enqueue({type:"error",error:new x({message:`WebSocket closed unexpectedly: code=${Y.code} reason=${g6(Y.reason)}`,statusCode:Y.code})}),X.streamClosed=!0,J.close(),this.cleanupClient(X,!0);else{let w=Math.ceil(X.streamedInputChars/4),B=Math.ceil(X.streamedOutputChars/4);J.enqueue({type:"finish",finishReason:this.createFinishReason("stop","closed"),usage:this.createUsage({inputTotal:w,outputTotal:B})}),X.streamClosed=!0,J.close(),this.cleanupClient(X,!1)}};if(X.pendingToolCount>0||X.approvalPending)X.deferredClose=q;else X.deferredClose=null,q();break}}}processCheckpoint(X,Y,J,Q){if(!Y.checkpoint){if(Y.content){if(!X.activeTextBlockId)X.activeTextBlockId=Q(),J.enqueue({type:"text-start",id:X.activeTextBlockId});J.enqueue({type:"text-delta",id:X.activeTextBlockId,delta:Y.content}),X.streamedOutputChars+=Y.content.length}return}let W;try{W=JSON.parse(Y.checkpoint)}catch(G){return}let z=W.channel_values?.ui_chat_log;if(!z||!Array.isArray(z)||z.length===0)return;if(Y.status!=="RUNNING"&&Y.status!=="INPUT_REQUIRED"&&Y.status!=="FINISHED"&&Y.status!=="COMPLETED"&&Y.status!=="TOOL_CALL_APPROVAL_REQUIRED")return;for(let G=0;G<z.length;G++){let V=z[G];if(V.message_type==="tool"&&V.tool_info){let P=V.message_id||V.correlation_id||`tool-${G}`;if(X.emittedToolEntries.has(P))continue;let j=V.tool_info.name,L=JSON.stringify(V.tool_info.args??{});if(X.emittedToolKeys.has(j)){X.emittedToolEntries.add(P);let c=this.sessionWorkflows.get(X.sessionKey);if(c)c.toolEntries.add(P);continue}if(X.activeTextBlockId)J.enqueue({type:"text-end",id:X.activeTextBlockId}),X.activeTextBlockId=null;J.enqueue({type:"tool-input-start",id:P,toolName:j,providerExecuted:!0}),J.enqueue({type:"tool-input-delta",id:P,delta:L}),J.enqueue({type:"tool-input-end",id:P}),J.enqueue({type:"tool-call",toolCallId:P,toolName:j,input:L,providerExecuted:!0,dynamic:!0});let A=V.tool_info.tool_response,E=typeof A==="string"?A:A?A.content:V.content||"";J.enqueue({type:"tool-result",toolCallId:P,toolName:j,result:{output:E,title:j,metadata:{}},isError:!1}),X.emittedToolEntries.add(P);let _=this.sessionWorkflows.get(X.sessionKey);if(_)_.toolEntries.add(P);continue}if(V.message_type!=="agent")continue;let H=V.content||"",q=V.message_id||`idx-${G}`,w=X.agentMessageEmitted.get(q)??0;if(H.length<=w)continue;let B=H.slice(w);if(q!==X.currentAgentMessageId&&X.activeTextBlockId)J.enqueue({type:"text-end",id:X.activeTextBlockId}),X.activeTextBlockId=null;if(!X.activeTextBlockId)X.activeTextBlockId=Q(),J.enqueue({type:"text-start",id:X.activeTextBlockId});J.enqueue({type:"text-delta",id:X.activeTextBlockId,delta:B}),X.streamedOutputChars+=B.length,X.agentMessageEmitted.set(q,H.length),(this.sessionWorkflows.get(X.sessionKey)?.agentEmitted??this.persistedAgentEmitted).set(q,H.length),X.currentAgentMessageId=q}}async executeToolAndRespond(X,Y,J,Q,W,z,G){X.pendingToolCount++;let V=(H)=>{if(X.streamClosed)return;try{J.enqueue(H)}catch{}};try{if(G){let H=await G(W,z,Q);if(H.error&&/^Unknown tool:/.test(H.error)){let U=zW(W,z);if(U)H=U}Y.sendActionResponse(Q,H.result,H.error),X.streamedInputChars+=z.length,X.streamedOutputChars+=H.result.length;let q=H.result,w=H.title??`${W} result`,B=H.metadata??{output:H.result};if(H.error){let U;if(typeof H.error==="string")U=H.error;else if(H.error&&typeof H.error==="object")U=JSON.stringify(H.error);else U=String(H.error);V({type:"tool-result",toolCallId:Q,toolName:W,result:U,isError:!0})}else V({type:"tool-result",toolCallId:Q,toolName:W,result:{output:q,title:w,metadata:B},isError:!1})}else{let H=`Tool executor not configured for tool: ${W}`;Y.sendActionResponse(Q,"",H),V({type:"tool-result",toolCallId:Q,toolName:W,result:H,isError:!0})}}catch(H){let q=H instanceof Error?H.message:String(H),w=g6(q);Y.sendActionResponse(Q,"",w),V({type:"tool-result",toolCallId:Q,toolName:W,result:w,isError:!0})}finally{if(X.pendingToolCount--,this.onUsageUpdate)try{this.onUsageUpdate({inputTokens:Math.ceil(X.streamedInputChars/4),outputTokens:Math.ceil(X.streamedOutputChars/4)})}catch{}if(X.pendingToolCount<=0&&X.deferredClose){let H=X.deferredClose;X.deferredClose=null,H()}}}cleanupClient(X,Y=!1){if(X.activeClient)X.activeClient.close(),this.activeClients.delete(X.activeClient),X.activeClient=null;if(Y)if(X.sessionKey)this.sessionWorkflows.delete(X.sessionKey);else this.currentWorkflowId=null,this.persistedAgentEmitted.clear()}async approveAndResume(X,Y,J,Q,W,z,G,V){let H=this.workflowOptions.approvalHandler;if(!H||!J){if(X.approvalPending=!1,X.deferredClose){let P=X.deferredClose;X.deferredClose=null,P()}return}let q;try{q=await H(Y)}catch(P){if(X.approvalPending=!1,!X.streamClosed)Q.error(P);return}X.approvalPending=!1,X.deferredClose=null,this.cleanupClient(X,!1);let w=q.approved?{approval:{tool_name:Y[0]?.name,tool_args_json:Y[0]?.args}}:{rejection:{message:q.message??"User rejected"}},B={...J,approval:w,preapproved_tools:q.approved?[...J.preapproved_tools??[],...Y.map((P)=>P.name)]:J.preapproved_tools??[]},U=new x5;this.activeClients.add(U),X.activeClient=U;let O=await this.resolveModelRef();try{await U.connect({instanceUrl:this.config.instanceUrl,modelRef:O,headers:this.config.getHeaders(),projectId:this.workflowOptions.projectId,namespaceId:this.workflowOptions.namespaceId,rootNamespaceId:this.workflowOptions.rootNamespaceId,aiCatalogItemVersionId:V?.aiCatalogItemVersionId,workflowDefinition:V?.workflowDefinition},(P)=>this.handleWorkflowEvent(X,P,Q,U,W,z,G,B,V)),U.sendStartRequest(B)}catch(P){if(this.cleanupClient(X,!0),!X.streamClosed)Q.error(P)}}async buildWorkflowMetadata(){let X={extended_logging:!1,tool_approval_for_session_enabled:!0};try{let Y=this.workflowOptions.workingDirectory??process.cwd(),J=await this.getGitInfo(Y);if(J.url)X.git_url=J.url;if(J.sha)X.git_sha=J.sha;if(J.branch)X.git_branch=J.branch}catch{}return X}async getGitInfo(X){let{execFile:Y}=await import("child_process"),{promisify:J}=await import("util"),Q=J(Y),W={cwd:X,timeout:3000},z=async(q,w)=>{try{let{stdout:B}=await Q(q,w,W);return B.trim()||void 0}catch{return}},[G,V,H]=await Promise.all([z("git",["remote","get-url","origin"]),z("git",["rev-parse","HEAD"]),z("git",["rev-parse","--abbrev-ref","HEAD"])]);return{url:G,sha:V,branch:H}}static SYSTEM_REMINDER_RE=/<system-reminder>([\s\S]*?)<\/system-reminder>/g;extractGoalFromPrompt(X){for(let Y=X.length-1;Y>=0;Y--){let J=X[Y];if(J.role==="user"){let Q=J.content.filter((W)=>W.type==="text").map((W)=>W.text);if(Q.length>0){let W=Q.join(`
100
100
  `);return W.replace($.SYSTEM_REMINDER_RE,"").trim()||W}}}return""}extractMcpTools(X){if(this.workflowOptions.mcpTools&&this.workflowOptions.mcpTools.length>0)return this.workflowOptions.mcpTools;if(!X.tools||X.tools.length===0)return[];return X.tools.filter((Y)=>Y.type==="function").map((Y)=>({name:Y.name,description:Y.description||"",inputSchema:JSON.stringify(Y.inputSchema||{type:"object",properties:{}})}))}static MAX_START_REQUEST_BYTES=4194304;trimPayload(X,Y,J){let Q=$.MAX_START_REQUEST_BYTES-J,W=JSON.stringify(Y);if(JSON.stringify(X).length+W.length<=Q)return{mcpTools:X,additionalContext:Y};let V=X.map((U)=>({name:U.name,description:U.description,inputSchema:MW(U.inputSchema)}));if(JSON.stringify(V).length+W.length<=Q)return{mcpTools:V,additionalContext:Y};let q=V.map((U)=>({name:U.name,description:U.description,inputSchema:EW(U.inputSchema)}));if(JSON.stringify(q).length+W.length<=Q)return{mcpTools:q,additionalContext:Y};let B=[...q];while(B.length>0){if(JSON.stringify(B).length+W.length<=Q)break;B.pop()}return{mcpTools:B,additionalContext:Y}}buildAdditionalContext(X){let Y=[];if(this.workflowOptions.additionalContext)Y.push(...this.workflowOptions.additionalContext);for(let J of X)if(J.role==="system")Y.push({category:"system_prompt",content:J.content,metadata:JSON.stringify({role:"system"})});else if(J.role==="assistant"){let Q=J.content.filter((W)=>W.type==="text").map((W)=>W.text).join(`
101
101
  `);if(Q)Y.push({category:"conversation",content:Q,metadata:JSON.stringify({role:"assistant"})})}else if(J.role==="user"){for(let Q of J.content)if(Q.type==="text"){let z=Q.text.matchAll($.SYSTEM_REMINDER_RE);for(let G of z){let V=G[1].trim();if(V)Y.push({category:"agent_context",content:V,metadata:JSON.stringify({source:"system-reminder"})})}}}return Y}},ZW="1d89f9fdb23ee96d4e603201f6861dab6e143c5c3c00469a018a2d94bdc03d4e",vE="36f2a70cddeb5a0889d4fd8295c241b7e9848e89cf9e599d0eed2d8e5350fbf5",SW="https://gitlab.com",AW=300000,yE=["api"],CW=class{fetch;constructor($=fetch){this.fetch=$}isTokenExpired($){return Date.now()>=$}needsRefresh($){return Date.now()>=$-AW}async refreshIfNeeded($,X){if(!this.needsRefresh($.expiresAt))return $;if(this.isTokenExpired($.expiresAt))throw new x({message:"OAuth token has expired and cannot be used"});return this.exchangeRefreshToken({instanceUrl:$.instanceUrl,refreshToken:$.refreshToken,clientId:X})}async exchangeAuthorizationCode($){let{instanceUrl:X,code:Y,codeVerifier:J,clientId:Q,redirectUri:W}=$,z=await this.exchangeToken({instanceUrl:X,grantType:"authorization_code",code:Y,codeVerifier:J,clientId:Q||this.getClientId(X),redirectUri:W});return this.createTokensFromResponse(z,X)}async exchangeRefreshToken($){let{instanceUrl:X,refreshToken:Y,clientId:J}=$,Q=await this.exchangeToken({instanceUrl:X,grantType:"refresh_token",refreshToken:Y,clientId:J||this.getClientId(X)});return this.createTokensFromResponse(Q,X)}getClientId($){let X=process.env.GITLAB_OAUTH_CLIENT_ID;if(X)return X;if($===SW)return ZW;throw new x({message:`No OAuth client ID configured for instance ${$}. Please provide a clientId parameter or set GITLAB_OAUTH_CLIENT_ID environment variable.`})}async exchangeToken($){let{instanceUrl:X,grantType:Y,code:J,codeVerifier:Q,refreshToken:W,clientId:z,redirectUri:G}=$,V={client_id:z,grant_type:Y};if(Y==="authorization_code"){if(!J||!Q||!G)throw new x({message:"Authorization code, code verifier, and redirect URI are required for authorization_code grant"});V.code=J,V.code_verifier=Q,V.redirect_uri=G}else if(Y==="refresh_token"){if(!W)throw new x({message:"Refresh token is required for refresh_token grant"});V.refresh_token=W}let H=`${X}/oauth/token`;try{let q=await this.fetch(H,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(V).toString()});if(!q.ok){let B=await q.text();throw new x({message:`OAuth token exchange failed: ${q.status} ${q.statusText}`,cause:Error(B)})}return await q.json()}catch(q){if(q instanceof x)throw q;throw new x({message:`Failed to exchange OAuth token: ${q instanceof Error?q.message:String(q)}`,cause:q instanceof Error?q:void 0})}}createTokensFromResponse($,X){let Y=this.createExpiresTimestamp($);return{accessToken:$.access_token,refreshToken:$.refresh_token||"",expiresAt:Y,instanceUrl:X}}createExpiresTimestamp($){let X=$.created_at*1000,Y=$.expires_in*1000;return X+Y}};function n5(){let $=i5.homedir(),X=process.env.XDG_DATA_HOME;if(X)return a4.join(X,"opencode","auth.json");if(process.platform!=="win32")return a4.join($,".local","share","opencode","auth.json");return a4.join($,".opencode","auth.json")}async function DW($){try{let X=n5();if(!q2.existsSync(X))return;let Y=JSON.parse(q2.readFileSync(X,"utf-8"));if(Y.gitlab?.type==="oauth"){let W=Y.gitlab;if(W.enterpriseUrl===$||W.enterpriseUrl===$.replace(/\/$/,""))return W}let J=$.replace(/\/$/,"");return Y[J]||Y[`${J}/`]}catch(X){throw Error(`Failed to load auth.json: ${X instanceof Error?X.message:X}`)}}async function v5($,X,Y){if($.apiKey)return $.apiKey;let J=await DW(X);if(J?.type==="oauth"){let W=new CW;if(W.needsRefresh(J.expires))try{let z=await W.exchangeRefreshToken({instanceUrl:X,refreshToken:J.refresh,clientId:Y}),G=n5(),V=JSON.parse(q2.readFileSync(G,"utf-8"));return V.gitlab={type:"oauth",refresh:z.refreshToken,access:z.accessToken,expires:z.expiresAt,enterpriseUrl:X},q2.writeFileSync(G,JSON.stringify(V,null,2),{mode:384}),z.accessToken}catch(z){let G=z instanceof Error?z.message:String(z),V=process.env[$.environmentVariableName];if(V)return V;throw new x({message:`OAuth token refresh failed and no fallback ${$.environmentVariableName} environment variable is set. Refresh error: ${G}. Re-authenticate with 'opencode auth login gitlab' or set ${$.environmentVariableName}.`})}else return J.access}let Q=process.env[$.environmentVariableName];if(!Q)throw new x({message:`${$.description} API key is missing. Pass it as the 'apiKey' parameter, set the ${$.environmentVariableName} environment variable, or authenticate with 'opencode auth login gitlab'.`});return Q}function RW($,X){let Y=$["User-Agent"];return{...$,"User-Agent":Y?`${Y} ${X}`:X}}function TW($={}){let X=$.instanceUrl??process.env.GITLAB_INSTANCE_URL??"https://gitlab.com",Y=$.name??"gitlab",J,Q,W=async()=>{if(J)return J;if(Q)return Q;return Q=v5({apiKey:$.apiKey,environmentVariableName:"GITLAB_TOKEN",description:"GitLab"},X,$.clientId),J=await Q,Q=void 0,J},z=async()=>{J=void 0,Q=void 0,J=await v5({apiKey:void 0,environmentVariableName:"GITLAB_TOKEN",description:"GitLab"},X,$.clientId)},G=()=>{let B=J||$.apiKey||process.env.GITLAB_TOKEN||"";if(!B)throw new x({message:"GitLab API key is missing. Pass it as the 'apiKey' parameter, set the GITLAB_TOKEN environment variable, or authenticate with 'opencode auth login gitlab'."});return RW({Authorization:`Bearer ${B}`,"Content-Type":"application/json",...$.headers},`ai-sdk-gitlab/${H7}`)};W().catch(()=>{});let V=(B,U)=>{let O=j5(B);if(!O)throw new x({message:`Unknown model ID: ${B}. Model must be registered in MODEL_MAPPINGS.`});if(U?.providerModel){let E=iQ(O.provider);if(!E.includes(U.providerModel))throw new x({message:`Invalid providerModel '${U.providerModel}' for provider '${O.provider}'. Valid models: ${E.join(", ")}`})}let P={DuoAgentPlatformNext:!0,...$.featureFlags,...U?.featureFlags},L={...{"User-Agent":`gitlab-ai-provider/${H7}`},...$.aiGatewayHeaders,...U?.aiGatewayHeaders},A={provider:`${Y}.agentic`,instanceUrl:X,getHeaders:G,refreshApiKey:z,fetch:$.fetch,maxTokens:U?.maxTokens,featureFlags:P,aiGatewayUrl:$.aiGatewayUrl,aiGatewayHeaders:L};if(O.provider==="openai")return new tQ(B,{...A,openaiModel:U?.providerModel??O.model});return new pQ(B,{...A,anthropicModel:U?.providerModel??O.model})},H=(B,U)=>{let O=j5(B);if(!O||O.provider!=="workflow")throw new x({message:`Unknown workflow model ID: ${B}. Use 'duo-workflow' or a 'duo-workflow-*' model ID.`});return new LW(B,{provider:`${Y}.workflow`,instanceUrl:X,getHeaders:G,refreshApiKey:z,fetch:$.fetch,featureFlags:{...$.featureFlags,...U?.featureFlags},aiGatewayUrl:$.aiGatewayUrl},U)},q=(B)=>{if(rQ(B))return H(B);return V(B)},w=Object.assign((B)=>q(B),{specificationVersion:"v3",languageModel:q,chat:q,agenticChat:V,workflowChat:H});return w.embeddingModel=(B)=>{throw new x({message:`GitLab provider does not support text embedding models. Model ID: ${B}`})},w.imageModel=(B)=>{throw new x({message:`GitLab provider does not support image models. Model ID: ${B}`})},w}var gE=TW(),_W="https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist/-/raw/main/ai_gateway/model_selection/models.yml",PW=86400000,q7=200000,w7=64000;function U7(){let $=process.env.XDG_CACHE_HOME||m6.join(a5.homedir(),".cache");return m6.join($,"opencode","gitlab-model-configs.json")}function jW(){try{let $=U7();if(!d$.existsSync($))return null;let X=d$.readFileSync($,"utf-8");return JSON.parse(X)}catch{return null}}function kW($){try{let X=U7(),Y=m6.dirname(X);d$.mkdirSync(Y,{recursive:!0,mode:448});let J={configs:Object.fromEntries($),updatedAt:new Date().toISOString()};d$.writeFileSync(X,JSON.stringify(J,null,2),{mode:384})}catch{}}function y5($){let X=jW();if(!X)return null;let Y=new Date(X.updatedAt).getTime();if(Date.now()-Y>$)return null;return{configs:new Map(Object.entries(X.configs)),writtenAt:Y}}var xW=class{url;ttlMs;fetchFn;memCache=null;memExpiresAt=0;pending=null;constructor($){this.url=$?.url??_W,this.ttlMs=$?.ttlMs??PW,this.fetchFn=$?.fetch??fetch}async getConfigs(){if(this.memCache&&Date.now()<this.memExpiresAt)return this.memCache;let $=y5(this.ttlMs);if($)return this.memCache=$.configs,this.memExpiresAt=$.writtenAt+this.ttlMs,$.configs;if(this.pending)return this.pending;this.pending=this.fetchConfigs();try{return await this.pending}finally{this.pending=null}}async getConfig($){return(await this.getConfigs()).get($)??{context:q7,output:w7}}invalidateCache(){this.memCache=null,this.memExpiresAt=0;try{let $=U7();if(d$.existsSync($))d$.unlinkSync($)}catch{}}async fetchConfigs(){try{let $=await this.fetchFn(this.url);if(!$.ok)throw Error(`HTTP ${$.status}`);let X=await $.text(),Y=fW(X);return this.memCache=Y,this.memExpiresAt=Date.now()+this.ttlMs,kW(Y),Y}catch{return this.memCache??y5(1/0)?.configs??new Map}}};function fW($){let X=new Map,Y=null,J=0,Q=0,W=!1,z=-1;for(let G of $.split(`
102
- `)){let V=G.match(/^\s*gitlab_identifier:\s*"?([^"#\s]+)"?/);if(V){if(Y)X.set(Y,{context:J||q7,output:Q||w7});Y=V[1],J=0,Q=0,W=!1,z=-1}let H=G.match(/^\s*max_context_tokens:\s*([0-9_]+)/);if(H&&Y)J=parseInt(H[1].replace(/_/g,""),10);if(/^\s*params:\s*$/.test(G))W=!0,z=G.match(/^(\s*)/)?.[1].length??0;else if(W&&/^\s*\S+:/.test(G)){if((G.match(/^(\s*)/)?.[1].length??0)<=z)W=!1,z=-1}if(W){let q=G.match(/^\s*max_tokens:\s*([0-9_]+)/);if(q&&Y)Q=parseInt(q[1].replace(/_/g,""),10)}}if(Y)X.set(Y,{context:J||q7,output:Q||w7});return X}var bW=new xW;async function g5($,X){let Y=await bW.getConfigs(),J=new Map;for(let[G,V]of Object.entries(o$))if(V.provider==="workflow"&&G!=="duo-workflow"&&G!=="duo-workflow-default")J.set(V.model,G);let Q=$.pinnedModel?[$.pinnedModel]:[...$.selectableModels??[],...$.defaultModel?[$.defaultModel]:[]],W=new Set,z=[];for(let G of Q){if(!G.ref||W.has(G.ref))continue;W.add(G.ref);let V=J.get(G.ref)??`duo-workflow-${G.ref.replace(/[/_]/g,"-")}`,H=Y.get(G.ref);z.push({id:V,ref:G.ref,name:G.name,context:H?.context??200000,output:H?.output??64000,pinned:!!$.pinnedModel&&$.pinnedModel.ref===G.ref})}return{models:z,project:X}}async function hE($,X){let Y=new p5(X.workingDirectory,$.instanceUrl);if(!Y.isDiscoveryExpired()){let V=Y.load();return g5(V.discovery,V.project)}let J=new u5({instanceUrl:$.instanceUrl,getHeaders:$.getHeaders,fetch:$.fetch}),Q=null;try{Q=await J.detectProject(X.workingDirectory)}catch{return{models:[],project:null}}let W=Q?.namespaceId;if(!W)return{models:[],project:Q};let G=await new d5({instanceUrl:$.instanceUrl,getHeaders:$.getHeaders,fetch:$.fetch}).discover(`gid://gitlab/Group/${W}`);if(Y.saveDiscovery(G,Q),!Y.getSelectedModelRef()){let V=G.pinnedModel??G.defaultModel;if(V)Y.saveSelection(V.ref,V.name)}return g5(G,Q)}export{x as Ph,lQ as Qh,h5 as Rh,pQ as Sh,o$ as Th,j5 as Uh,jE as Vh,iQ as Wh,kE as Xh,xE as Yh,nQ as Zh,aQ as _h,rQ as $h,sQ as ai,fE as bi,tQ as ci,H7 as di,oQ as ei,eQ as fi,k5 as gi,y6 as hi,$W as ii,K7 as ji,U8 as ki,YW as li,JW as mi,x5 as ni,HW as oi,BW as pi,u5 as qi,d5 as ri,p5 as si,LW as ti,ZW as ui,vE as vi,SW as wi,AW as xi,yE as yi,CW as zi,TW as Ai,gE as Bi,xW as Ci,fW as Di,hE as Ei};
102
+ `)){let V=G.match(/^\s*gitlab_identifier:\s*"?([^"#\s]+)"?/);if(V){if(Y)X.set(Y,{context:J||q7,output:Q||w7});Y=V[1],J=0,Q=0,W=!1,z=-1}let H=G.match(/^\s*max_context_tokens:\s*([0-9_]+)/);if(H&&Y)J=parseInt(H[1].replace(/_/g,""),10);if(/^\s*params:\s*$/.test(G))W=!0,z=G.match(/^(\s*)/)?.[1].length??0;else if(W&&/^\s*\S+:/.test(G)){if((G.match(/^(\s*)/)?.[1].length??0)<=z)W=!1,z=-1}if(W){let q=G.match(/^\s*max_tokens:\s*([0-9_]+)/);if(q&&Y)Q=parseInt(q[1].replace(/_/g,""),10)}}if(Y)X.set(Y,{context:J||q7,output:Q||w7});return X}var bW=new xW;async function g5($,X){let Y=await bW.getConfigs(),J=new Map;for(let[G,V]of Object.entries(o$))if(V.provider==="workflow"&&G!=="duo-workflow"&&G!=="duo-workflow-default")J.set(V.model,G);let Q=$.pinnedModel?[$.pinnedModel]:[...$.selectableModels??[],...$.defaultModel?[$.defaultModel]:[]],W=new Set,z=[];for(let G of Q){if(!G.ref||W.has(G.ref))continue;W.add(G.ref);let V=J.get(G.ref)??`duo-workflow-${G.ref.replace(/[/_]/g,"-")}`,H=Y.get(G.ref);z.push({id:V,ref:G.ref,name:G.name,context:H?.context??200000,output:H?.output??64000,pinned:!!$.pinnedModel&&$.pinnedModel.ref===G.ref})}return{models:z,project:X}}async function hE($,X){let Y=new p5(X.workingDirectory,$.instanceUrl);if(!Y.isDiscoveryExpired()){let V=Y.load();return g5(V.discovery,V.project)}let J=new u5({instanceUrl:$.instanceUrl,getHeaders:$.getHeaders,fetch:$.fetch}),Q=null;try{Q=await J.detectProject(X.workingDirectory)}catch{return{models:[],project:null}}let W=Q?.namespaceId;if(!W)return{models:[],project:Q};let G=await new d5({instanceUrl:$.instanceUrl,getHeaders:$.getHeaders,fetch:$.fetch}).discover(`gid://gitlab/Group/${W}`);if(Y.saveDiscovery(G,Q),!Y.getSelectedModelRef()){let V=G.pinnedModel??G.defaultModel;if(V)Y.saveSelection(V.ref,V.name)}return g5(G,Q)}export{x as Qh,lQ as Rh,h5 as Sh,pQ as Th,o$ as Uh,j5 as Vh,jE as Wh,iQ as Xh,kE as Yh,xE as Zh,nQ as _h,aQ as $h,rQ as ai,sQ as bi,fE as ci,tQ as di,H7 as ei,oQ as fi,eQ as gi,k5 as hi,y6 as ii,$W as ji,K7 as ki,U8 as li,YW as mi,JW as ni,x5 as oi,HW as pi,BW as qi,u5 as ri,d5 as si,p5 as ti,LW as ui,ZW as vi,vE as wi,SW as xi,AW as yi,yE as zi,CW as Ai,TW as Bi,gE as Ci,xW as Di,fW as Ei,hE as Fi};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-pfx8ts02.js";function o(){return(e,n)=>e.toJsonSchema(n)}export{o as default};