@qitqode/qitqode-android-arm64 0.1.24 → 0.1.26

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 (420) hide show
  1. package/bundle/{chunk-gn9p1d50.js → chunk-01gwb793.js} +1 -1
  2. package/bundle/{chunk-4kse3awh.js → chunk-0304b7xg.js} +1 -1
  3. package/bundle/{chunk-k9d927xe.js → chunk-05amr7y9.js} +1 -1
  4. package/bundle/{chunk-am73j1bt.js → chunk-06x1p3t4.js} +1 -1
  5. package/bundle/{chunk-9798jffg.js → chunk-07net7s8.js} +1 -1
  6. package/bundle/chunk-08y06vgt.js +3 -0
  7. package/bundle/chunk-09ecxdmd.js +2 -0
  8. package/bundle/{chunk-6mscvf6y.js → chunk-0cehm5fn.js} +1 -1
  9. package/bundle/chunk-0jaj2g7x.js +2 -0
  10. package/bundle/{chunk-7gczzccz.js → chunk-0m2tj2h9.js} +1 -1
  11. package/bundle/{chunk-srf73nm4.js → chunk-0mekr486.js} +1 -1
  12. package/bundle/{chunk-gen6f3dn.js → chunk-0ndvy0nh.js} +2 -2
  13. package/bundle/chunk-0nr2925m.js +2 -0
  14. package/bundle/chunk-0vqrakhw.js +3 -0
  15. package/bundle/{chunk-vf1r5ckp.js → chunk-0w5npkgr.js} +1 -1
  16. package/bundle/chunk-0wbq1y92.js +2 -0
  17. package/bundle/chunk-12pxszgn.js +2 -0
  18. package/bundle/chunk-1337582e.js +2 -0
  19. package/bundle/{chunk-hxgb0y1w.js → chunk-14ag9ea0.js} +1 -1
  20. package/bundle/chunk-182jf8fz.js +2 -0
  21. package/bundle/chunk-1ht3zcsh.js +2 -0
  22. package/bundle/{chunk-fhng5her.js → chunk-1n4w8dya.js} +2 -2
  23. package/bundle/{chunk-g7vkkmsk.js → chunk-1qbm1k9y.js} +3 -3
  24. package/bundle/{chunk-apq38bt4.js → chunk-1xkwm21b.js} +3 -3
  25. package/bundle/{chunk-3tkp27x7.js → chunk-1xpx1t40.js} +2 -2
  26. package/bundle/{chunk-w1atxyz0.js → chunk-1yx4jesj.js} +1 -1
  27. package/bundle/chunk-25zkavr0.js +2 -0
  28. package/bundle/{chunk-4k149ews.js → chunk-28vnspd4.js} +1 -1
  29. package/bundle/chunk-2cm91ktc.js +3 -0
  30. package/bundle/chunk-2jfd82jk.js +2 -0
  31. package/bundle/{chunk-ve5gb789.js → chunk-2jn2hd12.js} +2 -2
  32. package/bundle/chunk-2k7bbzj2.js +2 -0
  33. package/bundle/{chunk-7yf15a3a.js → chunk-2kdn66xt.js} +1 -1
  34. package/bundle/{chunk-99n6czag.js → chunk-2q76qax6.js} +2 -2
  35. package/bundle/{chunk-8pe047p0.js → chunk-2sy1wx99.js} +1 -1
  36. package/bundle/{chunk-8651hq0k.js → chunk-2yb59jwr.js} +1 -1
  37. package/bundle/chunk-30081kwd.js +2 -0
  38. package/bundle/{chunk-g0v9g37f.js → chunk-32zrch7h.js} +1 -1
  39. package/bundle/{chunk-7y3y3j51.js → chunk-3bb7y9pq.js} +2 -2
  40. package/bundle/{chunk-jz3aav8a.js → chunk-3kdhvq0p.js} +2 -2
  41. package/bundle/{chunk-m8djypsy.js → chunk-3rgct4bd.js} +1 -1
  42. package/bundle/{chunk-frdc3ysq.js → chunk-3s0d17xe.js} +1 -1
  43. package/bundle/chunk-3vag59se.js +2 -0
  44. package/bundle/{chunk-j1a64ade.js → chunk-3w64fpwn.js} +2 -2
  45. package/bundle/chunk-3x5v6sjw.js +2 -0
  46. package/bundle/{chunk-hqg5qbxk.js → chunk-3zn71txs.js} +1 -1
  47. package/bundle/{chunk-3vbtra1j.js → chunk-41ftye7w.js} +1 -1
  48. package/bundle/chunk-43ep9d7a.js +2 -0
  49. package/bundle/chunk-48j09m6e.js +3 -0
  50. package/bundle/{chunk-6szvs3k9.js → chunk-4920vf6a.js} +1 -1
  51. package/bundle/{chunk-wa2ce2sg.js → chunk-49tqzsy0.js} +2 -2
  52. package/bundle/{chunk-cvchztkc.js → chunk-49ypxzfx.js} +1 -1
  53. package/bundle/{chunk-6nhje520.js → chunk-4k70wrhf.js} +1 -1
  54. package/bundle/{chunk-tk3bve0x.js → chunk-4nck07pc.js} +2 -2
  55. package/bundle/chunk-4qqja22v.js +2 -0
  56. package/bundle/{chunk-23geekk5.js → chunk-54pk7nna.js} +1 -1
  57. package/bundle/{chunk-ewyk4py6.js → chunk-56pwz1kk.js} +1 -1
  58. package/bundle/{chunk-2y8qz8te.js → chunk-56qm8xpt.js} +1 -1
  59. package/bundle/{chunk-y3n31nnx.js → chunk-58gp7wbg.js} +2 -2
  60. package/bundle/{chunk-9easaxy7.js → chunk-5dm3p5r6.js} +1 -1
  61. package/bundle/chunk-5gazgxt5.js +2 -0
  62. package/bundle/{chunk-0ae5q6ck.js → chunk-5jtd006j.js} +2 -2
  63. package/bundle/{chunk-t488d66k.js → chunk-5mec6cde.js} +1 -1
  64. package/bundle/{chunk-gvzfffr4.js → chunk-5yaahmjb.js} +1 -1
  65. package/bundle/{chunk-jbd9k041.js → chunk-5ymj2q6j.js} +2 -2
  66. package/bundle/{chunk-ebjhggdw.js → chunk-613kegcn.js} +1 -1
  67. package/bundle/chunk-63znhwx0.js +2 -0
  68. package/bundle/{chunk-zavtsfxz.js → chunk-6fpfr8tk.js} +1 -1
  69. package/bundle/{chunk-0pvbk8ks.js → chunk-6h2faxs9.js} +2 -2
  70. package/bundle/chunk-6hmyy7n6.js +2 -0
  71. package/bundle/{chunk-78bajmqm.js → chunk-6nk3wx6f.js} +1 -1
  72. package/bundle/{chunk-1jsywey3.js → chunk-6nkcfncg.js} +1 -1
  73. package/bundle/{chunk-ps543k72.js → chunk-6s2f5sv4.js} +1 -1
  74. package/bundle/{chunk-dcx8hjbs.js → chunk-6vb26adv.js} +1 -1
  75. package/bundle/{chunk-r48g0kaq.js → chunk-6wdwwpsc.js} +2 -2
  76. package/bundle/{chunk-8r79zf3y.js → chunk-77e1wh0j.js} +2 -2
  77. package/bundle/chunk-7dyddrpk.js +2 -0
  78. package/bundle/{chunk-4d1a547n.js → chunk-7e1aw8rw.js} +1 -1
  79. package/bundle/{chunk-ac202abt.js → chunk-7ez3ye6e.js} +1 -1
  80. package/bundle/{chunk-wfnk2vsd.js → chunk-7fmy4cvn.js} +1 -1
  81. package/bundle/{chunk-82gs5cmn.js → chunk-7n2kpqh5.js} +1 -1
  82. package/bundle/chunk-7penjsgq.js +2 -0
  83. package/bundle/chunk-7qxn24qa.js +3 -0
  84. package/bundle/{chunk-4q9w2yve.js → chunk-7rxsj310.js} +2 -2
  85. package/bundle/{chunk-dkv2mg97.js → chunk-7ryv0f5h.js} +1 -1
  86. package/bundle/chunk-7t5gzkj6.js +2 -0
  87. package/bundle/{chunk-84gnbzky.js → chunk-7tbvr236.js} +1 -1
  88. package/bundle/{chunk-8cr7ks31.js → chunk-81engf0t.js} +1 -1
  89. package/bundle/{chunk-cy2586rv.js → chunk-880msfsd.js} +1 -1
  90. package/bundle/chunk-89vgt8vq.js +2 -0
  91. package/bundle/{chunk-vftqwdpg.js → chunk-8ahpk8td.js} +1 -1
  92. package/bundle/{chunk-9f7y0dj0.js → chunk-8bzwgcjb.js} +1 -1
  93. package/bundle/chunk-8e8n82f9.js +2 -0
  94. package/bundle/{chunk-xj73j10a.js → chunk-91khd3fq.js} +1 -1
  95. package/bundle/chunk-97exhw9j.js +2 -0
  96. package/bundle/chunk-9cvkaht5.js +2 -0
  97. package/bundle/{chunk-1jh5p5qw.js → chunk-9p83me3p.js} +2 -2
  98. package/bundle/{chunk-ygj1cy0n.js → chunk-9qtf8khv.js} +1 -1
  99. package/bundle/{chunk-kaeyhw2n.js → chunk-9wm41z2f.js} +2 -2
  100. package/bundle/chunk-9zrwbxx0.js +3 -0
  101. package/bundle/{chunk-q6fbyvpq.js → chunk-admgf65a.js} +1 -1
  102. package/bundle/{chunk-spm1yy6w.js → chunk-afhg3w2j.js} +1 -1
  103. package/bundle/chunk-akdvstd9.js +2 -0
  104. package/bundle/{chunk-w7p2x973.js → chunk-atbm0pnt.js} +2 -2
  105. package/bundle/chunk-ave2e4sa.js +2 -0
  106. package/bundle/chunk-axnwehc7.js +2 -0
  107. package/bundle/{chunk-ns0pswww.js → chunk-b79k456s.js} +1 -1
  108. package/bundle/chunk-bmzyxspj.js +2 -0
  109. package/bundle/{chunk-9sy9ws1w.js → chunk-bse8p94q.js} +1 -1
  110. package/bundle/chunk-bvaqpfv8.js +2 -0
  111. package/bundle/{chunk-gf4ek7rv.js → chunk-c0k8j498.js} +1 -1
  112. package/bundle/{chunk-pyq01301.js → chunk-cbmw8fy2.js} +1 -1
  113. package/bundle/{chunk-cesrhm09.js → chunk-cn10hn58.js} +1 -1
  114. package/bundle/{chunk-gc9q0x8z.js → chunk-cqhpbfcn.js} +3 -3
  115. package/bundle/{chunk-jegn6jc3.js → chunk-cr06m77n.js} +2 -2
  116. package/bundle/{chunk-3wzqs241.js → chunk-crap29f6.js} +1 -1
  117. package/bundle/chunk-cxb05cdg.js +2 -0
  118. package/bundle/chunk-cxe92z5c.js +2 -0
  119. package/bundle/{chunk-b643cra9.js → chunk-cyjzqa5p.js} +195 -195
  120. package/bundle/{chunk-0w4v0fbs.js → chunk-d2n09yvh.js} +2 -2
  121. package/bundle/{chunk-fm4xa6yx.js → chunk-d31yrcrn.js} +2 -2
  122. package/bundle/chunk-d5wp85kw.js +2 -0
  123. package/bundle/{chunk-6j0365q3.js → chunk-dazye86e.js} +2 -2
  124. package/bundle/chunk-dm5xnb4t.js +2 -0
  125. package/bundle/chunk-dpeqsvan.js +2 -0
  126. package/bundle/chunk-drxtmg5c.js +2 -0
  127. package/bundle/{chunk-k16hzy2q.js → chunk-dv5zf5gz.js} +1 -1
  128. package/bundle/{chunk-2qcndbxv.js → chunk-e57d1he9.js} +1 -1
  129. package/bundle/{chunk-1d64dywx.js → chunk-e58pdw5k.js} +2 -2
  130. package/bundle/chunk-e9pfdjcy.js +2 -0
  131. package/bundle/chunk-ejn5hfzd.js +2 -0
  132. package/bundle/{chunk-hg563h5r.js → chunk-ek1fawsj.js} +2 -2
  133. package/bundle/{chunk-rvvfs9ps.js → chunk-eq33vmze.js} +1 -1
  134. package/bundle/{chunk-6sdh1q7g.js → chunk-eqaym8gm.js} +1 -1
  135. package/bundle/chunk-ernd18jb.js +2 -0
  136. package/bundle/{chunk-evqxvhdb.js → chunk-ewvgbg68.js} +1 -1
  137. package/bundle/{chunk-wf09j72q.js → chunk-f3c9667r.js} +2 -2
  138. package/bundle/{chunk-9nx8hm57.js → chunk-f3rrd2p6.js} +1 -1
  139. package/bundle/chunk-f416n3mp.js +14 -0
  140. package/bundle/{chunk-hh3w51wp.js → chunk-f6y7a5w3.js} +2 -2
  141. package/bundle/{chunk-zeh481tm.js → chunk-fd9zrmhr.js} +2 -2
  142. package/bundle/chunk-ff9b4cg8.js +2 -0
  143. package/bundle/{chunk-bas6x25m.js → chunk-fffj9447.js} +2 -2
  144. package/bundle/{chunk-5y8efy5b.js → chunk-fk3praj7.js} +1 -1
  145. package/bundle/{chunk-ecwz9nhs.js → chunk-fk8cctjy.js} +2 -2
  146. package/bundle/{chunk-1y9t7nxn.js → chunk-fkat2pw6.js} +1 -1
  147. package/bundle/chunk-fpff6a4q.js +2 -0
  148. package/bundle/chunk-fvy5w4dh.js +7 -0
  149. package/bundle/{chunk-2gxjjqfx.js → chunk-fx7w497c.js} +1 -1
  150. package/bundle/{chunk-5rkmhzq0.js → chunk-fxb6vjcb.js} +2 -2
  151. package/bundle/{chunk-9xvctnjr.js → chunk-g4qwkcdv.js} +1 -1
  152. package/bundle/{chunk-2eardzxs.js → chunk-g6dgc5af.js} +1 -1
  153. package/bundle/{chunk-2mmspnr3.js → chunk-g7vahvkz.js} +1 -1
  154. package/bundle/chunk-g8wvr7a1.js +3 -0
  155. package/bundle/{chunk-21ejqv4v.js → chunk-gaxbbxk6.js} +1 -1
  156. package/bundle/chunk-gq361kdt.js +2 -0
  157. package/bundle/{chunk-n1chdwrs.js → chunk-gxa2r4zc.js} +1 -1
  158. package/bundle/{chunk-p54bzjtv.js → chunk-h56jxxvj.js} +1 -1
  159. package/bundle/{chunk-2z6fzwyc.js → chunk-hb4d06q0.js} +2 -2
  160. package/bundle/chunk-hbagpppv.js +2 -0
  161. package/bundle/chunk-hf473xav.js +2 -0
  162. package/bundle/{chunk-gff87y4n.js → chunk-hjratj6g.js} +1 -1
  163. package/bundle/{chunk-y2jmtfdh.js → chunk-hk8j5ht8.js} +2 -2
  164. package/bundle/{chunk-jr8qcf99.js → chunk-hkmb3zer.js} +2 -2
  165. package/bundle/chunk-hr88054m.js +2 -0
  166. package/bundle/{chunk-ep8zn49w.js → chunk-hybq019j.js} +2 -2
  167. package/bundle/{chunk-1xyn0sp2.js → chunk-hyckncza.js} +2 -2
  168. package/bundle/{chunk-wj6aq50n.js → chunk-hz1hd1bd.js} +1 -1
  169. package/bundle/{chunk-zp2ffbc2.js → chunk-j0ftbmex.js} +2 -2
  170. package/bundle/chunk-j3czd7v2.js +28 -0
  171. package/bundle/{chunk-0w0jfzb4.js → chunk-j7zs1yg2.js} +1 -1
  172. package/bundle/{chunk-xv8gnkh5.js → chunk-j87bvp1b.js} +1 -1
  173. package/bundle/chunk-j9m2d6t5.js +2 -0
  174. package/bundle/chunk-jd9edy2s.js +2 -0
  175. package/bundle/{chunk-4tn69nqs.js → chunk-jdkxeqw5.js} +1 -1
  176. package/bundle/chunk-jwtdbx31.js +2 -0
  177. package/bundle/chunk-jzcz92pq.js +8 -0
  178. package/bundle/{chunk-5h2hcp46.js → chunk-k7h6tfzj.js} +1 -1
  179. package/bundle/{chunk-dann9gfq.js → chunk-kbg3k1az.js} +1 -1
  180. package/bundle/{chunk-va4davgy.js → chunk-kbjwdv1x.js} +259 -253
  181. package/bundle/{chunk-j1veq3zr.js → chunk-kbyk7hyn.js} +2 -2
  182. package/bundle/{chunk-jr9xnvjq.js → chunk-kfk1zqc1.js} +1 -1
  183. package/bundle/{chunk-9jf67xb0.js → chunk-kkdgzeva.js} +2 -2
  184. package/bundle/{chunk-9rqrm9y8.js → chunk-kn318ev4.js} +1 -1
  185. package/bundle/{chunk-pv8jcpnf.js → chunk-kp84yba1.js} +1 -1
  186. package/bundle/{chunk-b8ag61vj.js → chunk-kpnfndkg.js} +1 -1
  187. package/bundle/chunk-krkxrej2.js +2 -0
  188. package/bundle/{chunk-ms1fd6h4.js → chunk-kvz0vzsn.js} +1 -1
  189. package/bundle/chunk-m26mcy8p.js +2 -0
  190. package/bundle/chunk-m62wgqp1.js +2 -0
  191. package/bundle/chunk-m7txgh5w.js +2 -0
  192. package/bundle/chunk-m84cn9c6.js +2 -0
  193. package/bundle/{chunk-kr0fsqas.js → chunk-md7vpe1e.js} +1 -1
  194. package/bundle/{chunk-yz7rqzby.js → chunk-mg239rc3.js} +3 -3
  195. package/bundle/chunk-mvc7pvtq.js +2 -0
  196. package/bundle/{chunk-tsn1jkr7.js → chunk-n07rsssz.js} +1 -1
  197. package/bundle/{chunk-8717htya.js → chunk-n10atvac.js} +1 -1
  198. package/bundle/chunk-nfp9xtca.js +3 -0
  199. package/bundle/{chunk-fdezde1z.js → chunk-ngz5xw45.js} +1 -1
  200. package/bundle/{chunk-7mhffm9f.js → chunk-njzpswgt.js} +183 -183
  201. package/bundle/{chunk-najzfhb2.js → chunk-nszqy06d.js} +1 -1
  202. package/bundle/{chunk-q3x4x2tq.js → chunk-nxjbbq5h.js} +1 -1
  203. package/bundle/{chunk-jmjg8d8a.js → chunk-p0k4sv89.js} +4 -4
  204. package/bundle/{chunk-bf146hz2.js → chunk-p31yg62z.js} +2 -2
  205. package/bundle/chunk-p5t9mq8r.js +2 -0
  206. package/bundle/chunk-pfbykat1.js +2 -0
  207. package/bundle/{chunk-bd21p9zz.js → chunk-pfn1db1m.js} +2 -2
  208. package/bundle/{chunk-1fnmkm0z.js → chunk-pjbbdm96.js} +2 -2
  209. package/bundle/{chunk-k9g77a02.js → chunk-pnj8s20t.js} +1 -1
  210. package/bundle/{chunk-a5zjrwqy.js → chunk-ppvmy940.js} +2 -2
  211. package/bundle/{chunk-r3yqe7x0.js → chunk-ptf09vmp.js} +1 -1
  212. package/bundle/{chunk-sjrmhd3e.js → chunk-q2exgz82.js} +1 -1
  213. package/bundle/{chunk-te1zfpzv.js → chunk-qan3kwbv.js} +1 -1
  214. package/bundle/{chunk-7tgm8wp5.js → chunk-qb5qemtp.js} +1 -1
  215. package/bundle/chunk-qd0nvn4z.js +2 -0
  216. package/bundle/chunk-qh99kv2j.js +2 -0
  217. package/bundle/{chunk-kc3hpmr2.js → chunk-qkwhgfjt.js} +2 -2
  218. package/bundle/{chunk-5kmfnkzv.js → chunk-qm9ezq93.js} +1 -1
  219. package/bundle/chunk-qmhcbdkg.js +8 -0
  220. package/bundle/{chunk-7a6p7dfx.js → chunk-qngs31yf.js} +1 -1
  221. package/bundle/{chunk-hbnr0j7h.js → chunk-qpv4438m.js} +2 -2
  222. package/bundle/{chunk-hv4nhx6q.js → chunk-qq71akpw.js} +2 -2
  223. package/bundle/chunk-qyrafh4m.js +2 -0
  224. package/bundle/{chunk-17ggas8k.js → chunk-r1yqmd4y.js} +1 -1
  225. package/bundle/chunk-rc37cw86.js +2 -0
  226. package/bundle/{chunk-xccs5c50.js → chunk-rf625fxx.js} +1 -1
  227. package/bundle/chunk-rmpty636.js +2 -0
  228. package/bundle/{chunk-9pe4agdz.js → chunk-rs0nx844.js} +2 -2
  229. package/bundle/{chunk-9vcw33dv.js → chunk-rvrjw0fy.js} +1 -1
  230. package/bundle/{chunk-jpygkh1c.js → chunk-rz54qjew.js} +1 -1
  231. package/bundle/{chunk-a9y27zd2.js → chunk-rze20q68.js} +1 -1
  232. package/bundle/{chunk-hg9nk090.js → chunk-s1h0k1yj.js} +1 -1
  233. package/bundle/{chunk-hh4c02fh.js → chunk-s2za1y84.js} +1 -1
  234. package/bundle/chunk-s3wjwxme.js +2 -0
  235. package/bundle/chunk-s4ncnbgd.js +2 -0
  236. package/bundle/{chunk-p4hpr8d7.js → chunk-s54c8fpf.js} +1 -1
  237. package/bundle/{chunk-0pbt75ev.js → chunk-s5krbdvd.js} +1 -1
  238. package/bundle/{chunk-wmw2gne9.js → chunk-s86fj82v.js} +2 -2
  239. package/bundle/{chunk-qywwj58s.js → chunk-sdsggxm4.js} +2 -2
  240. package/bundle/{chunk-r7xp0xcn.js → chunk-se195e52.js} +2 -2
  241. package/bundle/chunk-snz3w30x.js +2 -0
  242. package/bundle/chunk-srw748gr.js +2 -0
  243. package/bundle/{chunk-mj24ntn9.js → chunk-st74db4c.js} +1 -1
  244. package/bundle/{chunk-0rtshz2r.js → chunk-t1vtdgd6.js} +1 -1
  245. package/bundle/{chunk-6dxaty1v.js → chunk-t6xm49ea.js} +1 -1
  246. package/bundle/{chunk-f819a7ec.js → chunk-t7tstr83.js} +1 -1
  247. package/bundle/{chunk-v2kyarwz.js → chunk-tedrfa7d.js} +2 -2
  248. package/bundle/{chunk-zfnbk5gy.js → chunk-tfggzzqw.js} +1 -1
  249. package/bundle/chunk-tn167yyz.js +2 -0
  250. package/bundle/{chunk-d56zc21w.js → chunk-txty44v2.js} +1 -1
  251. package/bundle/{chunk-b6m4yyww.js → chunk-tyy4gx61.js} +1 -1
  252. package/bundle/chunk-v1xwe58d.js +2 -0
  253. package/bundle/{chunk-vvypb02q.js → chunk-vh05n2x3.js} +1 -1
  254. package/bundle/{chunk-agdfqncf.js → chunk-vpqd0t8a.js} +2 -2
  255. package/bundle/chunk-vrfegg5f.js +2 -0
  256. package/bundle/{chunk-tzc4jkzg.js → chunk-vthm5q05.js} +1 -1
  257. package/bundle/{chunk-6g3m7yxf.js → chunk-vw673y0t.js} +2 -2
  258. package/bundle/{chunk-3tdqsm5c.js → chunk-vx837ete.js} +1 -1
  259. package/bundle/{chunk-hjbks7r9.js → chunk-vy9xre57.js} +1 -1
  260. package/bundle/{chunk-x6z2b63w.js → chunk-vyjsng14.js} +1 -1
  261. package/bundle/{chunk-ftk58wxe.js → chunk-vztxv9dj.js} +1 -1
  262. package/bundle/{chunk-1p34bx7c.js → chunk-w01gjnty.js} +2 -2
  263. package/bundle/chunk-w12tky28.js +2 -0
  264. package/bundle/{chunk-t6w96xq2.js → chunk-w2gpgapp.js} +1 -1
  265. package/bundle/{chunk-gn7xgd4c.js → chunk-w3pzv615.js} +1 -1
  266. package/bundle/chunk-w4hbw37v.js +3 -0
  267. package/bundle/chunk-w9ct698t.js +2 -0
  268. package/bundle/{chunk-8ace31r2.js → chunk-wefjbwv6.js} +1 -1
  269. package/bundle/{chunk-sgtgvzv6.js → chunk-wg42cxrw.js} +1 -1
  270. package/bundle/{chunk-02txthqv.js → chunk-wg5dv21f.js} +2 -2
  271. package/bundle/chunk-wms4skr9.js +11 -0
  272. package/bundle/chunk-wr5hdsst.js +9 -0
  273. package/bundle/chunk-wxnqgh8t.js +2 -0
  274. package/bundle/chunk-wzmte7sy.js +3 -0
  275. package/bundle/chunk-x0h1jdxt.js +2 -0
  276. package/bundle/{chunk-ha1w0xzh.js → chunk-x36jhtex.js} +1 -1
  277. package/bundle/{chunk-yzdty5t9.js → chunk-x3931we7.js} +2 -2
  278. package/bundle/{chunk-v7r9np94.js → chunk-x3z8q0ep.js} +1 -1
  279. package/bundle/chunk-x6hsmnhz.js +2 -0
  280. package/bundle/{chunk-fkvccmgk.js → chunk-xak2r993.js} +2 -2
  281. package/bundle/{chunk-c31k8yh0.js → chunk-xc3fadkh.js} +1 -1
  282. package/bundle/{chunk-hh9a709t.js → chunk-xcs2jbz9.js} +1 -1
  283. package/bundle/{chunk-qw2hgs5b.js → chunk-xdv9xt0y.js} +2 -2
  284. package/bundle/{chunk-dgzyn27r.js → chunk-xdwej3ae.js} +1 -1
  285. package/bundle/chunk-xg9e0enb.js +2 -0
  286. package/bundle/{chunk-pfhp78cr.js → chunk-xqxpjbqk.js} +1 -1
  287. package/bundle/chunk-xtxxb25n.js +2 -0
  288. package/bundle/{chunk-8h9r6c8g.js → chunk-y2ch07yv.js} +2 -2
  289. package/bundle/chunk-y3s7sh1e.js +2 -0
  290. package/bundle/chunk-ydvheqw9.js +2 -0
  291. package/bundle/{chunk-0z3z0gk1.js → chunk-ygwe0vf1.js} +2 -2
  292. package/bundle/{chunk-58enbars.js → chunk-ykxde207.js} +2 -2
  293. package/bundle/{chunk-dkm7x8rj.js → chunk-ynfbz3sz.js} +2 -2
  294. package/bundle/{chunk-2wp1w8cy.js → chunk-yqtfvgrp.js} +1 -1
  295. package/bundle/{chunk-edvcz2gd.js → chunk-yt1yk4j1.js} +1 -1
  296. package/bundle/{chunk-yh174jhg.js → chunk-yvj021eg.js} +2 -2
  297. package/bundle/chunk-yxnq0d7k.js +2 -0
  298. package/bundle/{chunk-e346x00p.js → chunk-z2m09m4w.js} +1 -1
  299. package/bundle/{chunk-f3kjp838.js → chunk-z2q3mg73.js} +2 -2
  300. package/bundle/chunk-z2raegj9.js +2 -0
  301. package/bundle/{chunk-y1srca0c.js → chunk-z3hj5bfd.js} +2 -2
  302. package/bundle/chunk-z3pyhmg6.js +2 -0
  303. package/bundle/{chunk-3nhqd8wg.js → chunk-z4ae6jmb.js} +3 -3
  304. package/bundle/{chunk-7dckfame.js → chunk-z559gc3n.js} +1 -1
  305. package/bundle/chunk-z7pg6sw1.js +2 -0
  306. package/bundle/chunk-z84376c6.js +2 -0
  307. package/bundle/{chunk-ktmazmas.js → chunk-ze00x1xb.js} +2 -2
  308. package/bundle/{chunk-pb7rnkke.js → chunk-zjvzc0my.js} +1 -1
  309. package/bundle/chunk-zn8th65r.js +2 -0
  310. package/bundle/{chunk-sswbfqcq.js → chunk-zna6neq5.js} +1 -1
  311. package/bundle/chunk-ztv1brgn.js +2 -0
  312. package/bundle/{chunk-s9amvacw.js → chunk-zvsafnkp.js} +2 -2
  313. package/bundle/chunk-zyxvd9fj.js +2 -0
  314. package/bundle/index.js +16 -16
  315. package/bundle/parser.worker.js +2 -2
  316. package/bundle/worker.js +1 -1
  317. package/package.json +1 -1
  318. package/bundle/chunk-0bvde0cx.js +0 -2
  319. package/bundle/chunk-0kbxnazj.js +0 -2
  320. package/bundle/chunk-19z5q33z.js +0 -2
  321. package/bundle/chunk-1a0wnwna.js +0 -2
  322. package/bundle/chunk-1ddm2wxv.js +0 -2
  323. package/bundle/chunk-1fk4vsmc.js +0 -2
  324. package/bundle/chunk-1j2f9nd5.js +0 -2
  325. package/bundle/chunk-27s736an.js +0 -2
  326. package/bundle/chunk-2j17xrzj.js +0 -2
  327. package/bundle/chunk-2zca3nak.js +0 -2
  328. package/bundle/chunk-2zcvcfq4.js +0 -2
  329. package/bundle/chunk-38hwkfj5.js +0 -2
  330. package/bundle/chunk-3afqxvsn.js +0 -2
  331. package/bundle/chunk-3avc1ppg.js +0 -7
  332. package/bundle/chunk-3v4vtah1.js +0 -2
  333. package/bundle/chunk-3ypk0j2f.js +0 -2
  334. package/bundle/chunk-3z1y040p.js +0 -3
  335. package/bundle/chunk-4aykrj51.js +0 -9
  336. package/bundle/chunk-4dtbmqmq.js +0 -2
  337. package/bundle/chunk-4zjb6rps.js +0 -2
  338. package/bundle/chunk-5hkcjgwh.js +0 -2
  339. package/bundle/chunk-5snrz263.js +0 -2
  340. package/bundle/chunk-653c0mxr.js +0 -11
  341. package/bundle/chunk-6av7hrrk.js +0 -7
  342. package/bundle/chunk-6bswn7w5.js +0 -2
  343. package/bundle/chunk-6epghftw.js +0 -2
  344. package/bundle/chunk-6jjhxh8p.js +0 -2
  345. package/bundle/chunk-6ws7xyc5.js +0 -2
  346. package/bundle/chunk-7g28zhar.js +0 -2
  347. package/bundle/chunk-7v02b2ms.js +0 -2
  348. package/bundle/chunk-7vmp2034.js +0 -2
  349. package/bundle/chunk-7wxrypkr.js +0 -2
  350. package/bundle/chunk-8kk9gvdy.js +0 -2
  351. package/bundle/chunk-8ygpp4y3.js +0 -2
  352. package/bundle/chunk-95q60g1p.js +0 -2
  353. package/bundle/chunk-9mjbenja.js +0 -2
  354. package/bundle/chunk-9vn1gy8h.js +0 -2
  355. package/bundle/chunk-ajp3f08k.js +0 -2
  356. package/bundle/chunk-aptkpdkc.js +0 -2
  357. package/bundle/chunk-bky5a42k.js +0 -3
  358. package/bundle/chunk-bry94ar5.js +0 -2
  359. package/bundle/chunk-btzyvqkf.js +0 -2
  360. package/bundle/chunk-c94pjdfh.js +0 -2
  361. package/bundle/chunk-cct9ds5c.js +0 -2
  362. package/bundle/chunk-czn535v0.js +0 -2
  363. package/bundle/chunk-d7wd5hz1.js +0 -2
  364. package/bundle/chunk-d86cmjrp.js +0 -2
  365. package/bundle/chunk-dnq65xvn.js +0 -2
  366. package/bundle/chunk-dpqv8rtn.js +0 -2
  367. package/bundle/chunk-e9mh7s3z.js +0 -2
  368. package/bundle/chunk-ek2y5f6g.js +0 -2
  369. package/bundle/chunk-epdsay73.js +0 -2
  370. package/bundle/chunk-f89gntcy.js +0 -3
  371. package/bundle/chunk-ffnsn7tv.js +0 -2
  372. package/bundle/chunk-fkezc7ew.js +0 -2
  373. package/bundle/chunk-fsxddgj0.js +0 -2
  374. package/bundle/chunk-gbcsfg6v.js +0 -2
  375. package/bundle/chunk-gfmz85hp.js +0 -2
  376. package/bundle/chunk-gk63k4t6.js +0 -2
  377. package/bundle/chunk-j0vf8s12.js +0 -2
  378. package/bundle/chunk-j1bxt69x.js +0 -2
  379. package/bundle/chunk-jcem8s30.js +0 -2
  380. package/bundle/chunk-jjwjb9w0.js +0 -3
  381. package/bundle/chunk-jpham2a3.js +0 -2
  382. package/bundle/chunk-jzkymnr5.js +0 -2
  383. package/bundle/chunk-k0qtwnhb.js +0 -2
  384. package/bundle/chunk-k2rsky7z.js +0 -2
  385. package/bundle/chunk-kcetcysa.js +0 -2
  386. package/bundle/chunk-kjfc5v3s.js +0 -2
  387. package/bundle/chunk-kkvb2c2z.js +0 -8
  388. package/bundle/chunk-km2ayfyf.js +0 -2
  389. package/bundle/chunk-knrh89eb.js +0 -2
  390. package/bundle/chunk-ksqfjawv.js +0 -2
  391. package/bundle/chunk-mjhb1q0n.js +0 -3
  392. package/bundle/chunk-mxcger73.js +0 -2
  393. package/bundle/chunk-nazkrkeb.js +0 -2
  394. package/bundle/chunk-nk01s49e.js +0 -2
  395. package/bundle/chunk-ns8b7rx1.js +0 -2
  396. package/bundle/chunk-ny6vpkx2.js +0 -2
  397. package/bundle/chunk-q0dd3ak6.js +0 -3
  398. package/bundle/chunk-q2s057bm.js +0 -2
  399. package/bundle/chunk-q5cqg2c0.js +0 -28
  400. package/bundle/chunk-qk2wnp2x.js +0 -2
  401. package/bundle/chunk-r012q335.js +0 -3
  402. package/bundle/chunk-rbdjbgkb.js +0 -2
  403. package/bundle/chunk-rxjprhgh.js +0 -2
  404. package/bundle/chunk-s3w9bmze.js +0 -2
  405. package/bundle/chunk-s3zste1a.js +0 -2
  406. package/bundle/chunk-sbt7qmwm.js +0 -3
  407. package/bundle/chunk-sf6h44pb.js +0 -2
  408. package/bundle/chunk-sgvzxs7m.js +0 -2
  409. package/bundle/chunk-sp9bndyh.js +0 -2
  410. package/bundle/chunk-vavrczqm.js +0 -3
  411. package/bundle/chunk-vg4styg5.js +0 -2
  412. package/bundle/chunk-vh09hhcs.js +0 -2
  413. package/bundle/chunk-vhktpm0n.js +0 -2
  414. package/bundle/chunk-vzjcmwry.js +0 -14
  415. package/bundle/chunk-wtp0yvqw.js +0 -2
  416. package/bundle/chunk-xmzs7q66.js +0 -2
  417. package/bundle/chunk-xv80476w.js +0 -2
  418. package/bundle/chunk-yjvr0et1.js +0 -2
  419. package/bundle/chunk-zk8n8hnh.js +0 -3
  420. package/bundle/chunk-zx3kcfkj.js +0 -2
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{$f as e,Xf as a,Yf as b,Zf as c,_f as d}from"./chunk-f416n3mp.js";import"./chunk-dazye86e.js";import"./chunk-3bb7y9pq.js";import"./chunk-wr5hdsst.js";import"./chunk-nfp9xtca.js";import"./chunk-nfg7nt13.js";import"./chunk-ze00x1xb.js";import"./chunk-sdsggxm4.js";import"./chunk-kbjwdv1x.js";import"./chunk-ek1fawsj.js";import"./chunk-3w64fpwn.js";import"./chunk-pfn1db1m.js";import"./chunk-h56jxxvj.js";import"./chunk-x36jhtex.js";import"./chunk-fk8cctjy.js";import"./chunk-fxb6vjcb.js";import"./chunk-njzpswgt.js";import"./chunk-2cm91ktc.js";import"./chunk-ygwe0vf1.js";import"./chunk-1qbm1k9y.js";import"./chunk-3rgct4bd.js";import"./chunk-atbm0pnt.js";import"./chunk-s86fj82v.js";import"./chunk-58gp7wbg.js";import"./chunk-w4hbw37v.js";import"./chunk-qmhcbdkg.js";import"./chunk-7qxn24qa.js";import"./chunk-vx837ete.js";import"./chunk-ppvmy940.js";import"./chunk-1n4w8dya.js";import"./chunk-7ryv0f5h.js";import"./chunk-p31yg62z.js";import"./chunk-5mec6cde.js";import"./chunk-cqtkxwd8.js";import"./chunk-0mekr486.js";import"./chunk-x3931we7.js";import"./chunk-w01gjnty.js";import"./chunk-nxjbbq5h.js";import"./chunk-z559gc3n.js";import"./chunk-kbyk7hyn.js";import"./chunk-6h2faxs9.js";import"./chunk-4nck07pc.js";import"./chunk-d2n09yvh.js";import"./chunk-f3c9667r.js";import"./chunk-qpv4438m.js";import"./chunk-hybq019j.js";import"./chunk-z2q3mg73.js";import"./chunk-n07rsssz.js";import"./chunk-08y06vgt.js";import"./chunk-9p83me3p.js";import"./chunk-9wm41z2f.js";import"./chunk-48j09m6e.js";import"./chunk-se195e52.js";import"./chunk-vw673y0t.js";import"./chunk-tedrfa7d.js";import"./chunk-ynfbz3sz.js";import"./chunk-rs0nx844.js";import"./chunk-qkwhgfjt.js";import"./chunk-s2za1y84.js";export{c as url,b as openapi,d as listen,e as Server,a as Default};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{ku as q,mu as c,nu as f,ou as P,pu as Y,qu as y,ru as F}from"./chunk-bky5a42k.js";import{AP as X}from"./chunk-hh4c02fh.js";var W={free:{providerID:"qlex",modelID:"free"},default:{providerID:"qlex",modelID:"default"},fast:{providerID:"qlex",modelID:"fast"},economical:{providerID:"qlex",modelID:"economical"},power:{providerID:"qlex",modelID:"power"},orchestrated:{providerID:"qlex",modelID:"orchestrated"}},Z={free:"Free (no cost)",default:"Default",fast:"Fast",economical:"Economy",power:"Power",orchestrated:"Orchestrated"},$={free:{intelligence:6,speed:7,cost:0},fast:{intelligence:4,speed:10,cost:1},economical:{intelligence:8,speed:2,cost:1},default:{intelligence:9,speed:1,cost:5},power:{intelligence:10,speed:4,cost:10},orchestrated:{intelligence:7,speed:6,cost:1}};function z(x){return typeof x==="number"&&Number.isFinite(x)&&x>=0&&x<=10}function D(x){if(!x||typeof x!=="object"||Array.isArray(x))return;for(let[j,H]of Object.entries(x)){if(!H||typeof H!=="object"||Array.isArray(H))continue;let K=H;if(!z(K.intelligence)||!z(K.speed)||!z(K.cost))continue;$[j]={intelligence:K.intelligence,speed:K.speed,cost:K.cost}}}function V(x){if(!Array.isArray(x)||x.length===0)return;let j={},H={};for(let K of x){let J=W[K.id];j[K.id]={providerID:K.providerID??J?.providerID??"qlex",modelID:K.modelID??J?.modelID??K.id},H[K.id]=K.label??Z[K.id]??K.id}for(let K of Object.keys(W))delete W[K];Object.assign(W,j);for(let K of Object.keys(Z))delete Z[K];Object.assign(Z,H)}var Q={};X(Q,{tiers:()=>p,tierRatings:()=>m,streamUrl:()=>w,streamBaseUrl:()=>G,sanitizeUpstreamError:()=>U,qlexProviderMeta:()=>N,omniqueryBaseUrl:()=>O,mergeLiveTiers:()=>b,mergeLiveTierRatings:()=>h,evaluatePermission:()=>M,copy:()=>d,bashPrefixWith:()=>B,TIER_RATINGS:()=>$,AGENT_PROMPT_NAMES:()=>k});function b(x){V(x)}function h(x){D(x)}function p(){return Object.entries(W).map(([x,j])=>({id:x,label:Z[x]??x,providerID:j.providerID,modelID:j.modelID}))}function m(){return $}function M(x,j,...H){return H.flat().findLast((C)=>q(x,C.permission)&&q(j,C.pattern))??{action:"ask",permission:x,pattern:"*"}}function B(x,j){for(let H=j.length;H>0;H--){let K=j.slice(0,H).join(" "),J=x[K];if(J!==void 0)return j.slice(0,J)}if(j.length===0)return[];return j.slice(0,1)}function w(){return c}function G(){return f}function O(){return P}function N(){return Y}function U(x){return y(x)}function d(){return F}var k=["generate","explore","dream","distill","summary","compaction","title"];export{W as Rs,Q as Ss};
2
+ import{ot as q,qt as c,rt as f,st as P,tt as Y,ut as y,vt as F}from"./chunk-08y06vgt.js";import{EP as X}from"./chunk-s2za1y84.js";var W={free:{providerID:"qlex",modelID:"free"},default:{providerID:"qlex",modelID:"default"},fast:{providerID:"qlex",modelID:"fast"},economical:{providerID:"qlex",modelID:"economical"},power:{providerID:"qlex",modelID:"power"},orchestrated:{providerID:"qlex",modelID:"orchestrated"}},Z={free:"Free (no cost)",default:"Default",fast:"Fast",economical:"Economy",power:"Power",orchestrated:"Orchestrated"},$={free:{intelligence:6,speed:7,cost:0},fast:{intelligence:4,speed:10,cost:1},economical:{intelligence:8,speed:2,cost:1},default:{intelligence:9,speed:1,cost:5},power:{intelligence:10,speed:4,cost:10},orchestrated:{intelligence:7,speed:6,cost:1}};function z(x){return typeof x==="number"&&Number.isFinite(x)&&x>=0&&x<=10}function D(x){if(!x||typeof x!=="object"||Array.isArray(x))return;for(let[j,H]of Object.entries(x)){if(!H||typeof H!=="object"||Array.isArray(H))continue;let K=H;if(!z(K.intelligence)||!z(K.speed)||!z(K.cost))continue;$[j]={intelligence:K.intelligence,speed:K.speed,cost:K.cost}}}function V(x){if(!Array.isArray(x)||x.length===0)return;let j={},H={};for(let K of x){let J=W[K.id];j[K.id]={providerID:K.providerID??J?.providerID??"qlex",modelID:K.modelID??J?.modelID??K.id},H[K.id]=K.label??Z[K.id]??K.id}for(let K of Object.keys(W))delete W[K];Object.assign(W,j);for(let K of Object.keys(Z))delete Z[K];Object.assign(Z,H)}var Q={};X(Q,{tiers:()=>p,tierRatings:()=>m,streamUrl:()=>w,streamBaseUrl:()=>G,sanitizeUpstreamError:()=>U,qlexProviderMeta:()=>N,omniqueryBaseUrl:()=>O,mergeLiveTiers:()=>b,mergeLiveTierRatings:()=>h,evaluatePermission:()=>M,copy:()=>d,bashPrefixWith:()=>B,TIER_RATINGS:()=>$,AGENT_PROMPT_NAMES:()=>k});function b(x){V(x)}function h(x){D(x)}function p(){return Object.entries(W).map(([x,j])=>({id:x,label:Z[x]??x,providerID:j.providerID,modelID:j.modelID}))}function m(){return $}function M(x,j,...H){return H.flat().findLast((C)=>q(x,C.permission)&&q(j,C.pattern))??{action:"ask",permission:x,pattern:"*"}}function B(x,j){for(let H=j.length;H>0;H--){let K=j.slice(0,H).join(" "),J=x[K];if(J!==void 0)return j.slice(0,J)}if(j.length===0)return[];return j.slice(0,1)}function w(){return c}function G(){return f}function O(){return P}function N(){return Y}function U(x){return y(x)}function d(){return F}var k=["generate","explore","dream","distill","summary","compaction","title"];export{W as Us,Q as Vs};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Aq as VQ,Bq as WQ,Cq as xQ,Fq as EV,Gq as a,Iq as UV,Jq as BQ,Kq as $Q,Lq as AV,Oq as xV,Pp as l,Qp as zV,Up as UQ,Wp as JQ,Yp as GV,bq as wQ,dq as QQ,iq as JV,kq as FQ,mq as KV,nq as SV,pq as PV,qq as D,tq as F,uq as t,wq as BV,yq as qQ}from"./chunk-bf146hz2.js";import{$q as jV,Rq as ZV,Vq as $V,Wq as AQ,br as YQ}from"./chunk-t488d66k.js";import"./chunk-cqtkxwd8.js";import"./chunk-srf73nm4.js";import{Pu as Q}from"./chunk-r7xp0xcn.js";import"./chunk-6g3m7yxf.js";import"./chunk-hh4c02fh.js";var HQ=Q.object({error:Q.object({message:Q.string(),type:Q.string().nullish(),param:Q.any().nullish(),code:Q.union([Q.string(),Q.number()]).nullish()})}),zQ=UV({errorSchema:HQ,errorToMessage:(V)=>V.error.message});function LV(V){let Y=V.startsWith("o3")||V.startsWith("o4-mini")||V.startsWith("gpt-5")&&!V.startsWith("gpt-5-chat"),J=V.startsWith("gpt-4")||V.startsWith("gpt-5")&&!V.startsWith("gpt-5-nano")&&!V.startsWith("gpt-5-chat")&&!V.startsWith("gpt-5.4-nano")||V.startsWith("o3")||V.startsWith("o4-mini"),G=V.startsWith("o1")||V.startsWith("o3")||V.startsWith("o4-mini")||V.startsWith("gpt-5")&&!V.startsWith("gpt-5-chat"),j=V.startsWith("gpt-5.1")||V.startsWith("gpt-5.2")||V.startsWith("gpt-5.3")||V.startsWith("gpt-5.4");return{supportsFlexProcessing:Y,supportsPriorityProcessing:J,isReasoningModel:G,systemMessageMode:G?"developer":"system",supportsNonReasoningParameters:j}}function cQ(V){var Y,J,G,j,E,P;if(V==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let $=(Y=V.prompt_tokens)!=null?Y:0,A=(J=V.completion_tokens)!=null?J:0,O=(j=(G=V.prompt_tokens_details)==null?void 0:G.cached_tokens)!=null?j:0,K=(P=(E=V.completion_tokens_details)==null?void 0:E.reasoning_tokens)!=null?P:0;return{inputTokens:{total:$,noCache:$-O,cacheRead:O,cacheWrite:void 0},outputTokens:{total:A,text:A-K,reasoning:K},raw:V}}function HV(V){return JSON.stringify(V===void 0?{}:V)}function MV({prompt:V,systemMessageMode:Y="system"}){var J;let G=[],j=[];for(let{role:E,content:P}of V)switch(E){case"system":{switch(Y){case"system":{G.push({role:"system",content:P});break}case"developer":{G.push({role:"developer",content:P});break}case"remove":{j.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${Y}`)}break}case"user":{if(P.length===1&&P[0].type==="text"){G.push({role:"user",content:P[0].text});break}G.push({role:"user",content:P.map(($,A)=>{var O,K,Z;switch($.type){case"text":return{type:"text",text:$.text};case"file":if($.mediaType.startsWith("image/")){let q=$.mediaType==="image/*"?"image/jpeg":$.mediaType;return{type:"image_url",image_url:{url:$.data instanceof URL?$.data.toString():`data:${q};base64,${JQ($.data)}`,detail:(K=(O=$.providerOptions)==null?void 0:O.openai)==null?void 0:K.imageDetail}}}else if($.mediaType.startsWith("audio/")){if($.data instanceof URL)throw new YQ({functionality:"audio file parts with URLs"});switch($.mediaType){case"audio/wav":return{type:"input_audio",input_audio:{data:JQ($.data),format:"wav"}};case"audio/mp3":case"audio/mpeg":return{type:"input_audio",input_audio:{data:JQ($.data),format:"mp3"}};default:throw new YQ({functionality:`audio content parts with media type ${$.mediaType}`})}}else if($.mediaType==="application/pdf"){if($.data instanceof URL)throw new YQ({functionality:"PDF file parts with URLs"});return{type:"file",file:typeof $.data==="string"&&$.data.startsWith("file-")?{file_id:$.data}:{filename:(Z=$.filename)!=null?Z:`part-${A}.pdf`,file_data:`data:application/pdf;base64,${JQ($.data)}`}}}else throw new YQ({functionality:`file part media type ${$.mediaType}`})}})});break}case"assistant":{let $="",A=[];for(let O of P)switch(O.type){case"text":{$+=O.text;break}case"tool-call":{A.push({id:O.toolCallId,type:"function",function:{name:O.toolName,arguments:HV(O.input)}});break}}G.push({role:"assistant",content:$,tool_calls:A.length>0?A:void 0});break}case"tool":{for(let $ of P){if($.type==="tool-approval-response")continue;let A=$.output,O;switch(A.type){case"text":case"error-text":O=A.value;break;case"execution-denied":O=(J=A.reason)!=null?J:"Tool execution denied.";break;case"content":case"json":case"error-json":O=JSON.stringify(A.value);break}G.push({role:"tool",tool_call_id:$.toolCallId,content:O})}break}default:throw Error(`Unsupported role: ${E}`)}return{messages:G,warnings:j}}function LQ({id:V,model:Y,created:J}){return{id:V!=null?V:void 0,modelId:Y!=null?Y:void 0,timestamp:J?new Date(J*1000):void 0}}function vQ(V){switch(V){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var bV=D(()=>F(Q.object({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({message:Q.object({role:Q.literal("assistant").nullish(),content:Q.string().nullish(),tool_calls:Q.array(Q.object({id:Q.string().nullish(),type:Q.literal("function"),function:Q.object({name:Q.string(),arguments:Q.string()})})).nullish(),annotations:Q.array(Q.object({type:Q.literal("url_citation"),url_citation:Q.object({start_index:Q.number(),end_index:Q.number(),url:Q.string(),title:Q.string()})})).nullish()}),index:Q.number(),logprobs:Q.object({content:Q.array(Q.object({token:Q.string(),logprob:Q.number(),top_logprobs:Q.array(Q.object({token:Q.string(),logprob:Q.number()}))})).nullish()}).nullish(),finish_reason:Q.string().nullish()})),usage:Q.object({prompt_tokens:Q.number().nullish(),completion_tokens:Q.number().nullish(),total_tokens:Q.number().nullish(),prompt_tokens_details:Q.object({cached_tokens:Q.number().nullish()}).nullish(),completion_tokens_details:Q.object({reasoning_tokens:Q.number().nullish(),accepted_prediction_tokens:Q.number().nullish(),rejected_prediction_tokens:Q.number().nullish()}).nullish()}).nullish()}))),yV=D(()=>F(Q.union([Q.object({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({delta:Q.object({role:Q.enum(["assistant"]).nullish(),content:Q.string().nullish(),tool_calls:Q.array(Q.object({index:Q.number(),id:Q.string().nullish(),type:Q.literal("function").nullish(),function:Q.object({name:Q.string().nullish(),arguments:Q.string().nullish()})})).nullish(),annotations:Q.array(Q.object({type:Q.literal("url_citation"),url_citation:Q.object({start_index:Q.number(),end_index:Q.number(),url:Q.string(),title:Q.string()})})).nullish()}).nullish(),logprobs:Q.object({content:Q.array(Q.object({token:Q.string(),logprob:Q.number(),top_logprobs:Q.array(Q.object({token:Q.string(),logprob:Q.number()}))})).nullish()}).nullish(),finish_reason:Q.string().nullish(),index:Q.number()})),usage:Q.object({prompt_tokens:Q.number().nullish(),completion_tokens:Q.number().nullish(),total_tokens:Q.number().nullish(),prompt_tokens_details:Q.object({cached_tokens:Q.number().nullish()}).nullish(),completion_tokens_details:Q.object({reasoning_tokens:Q.number().nullish(),accepted_prediction_tokens:Q.number().nullish(),rejected_prediction_tokens:Q.number().nullish()}).nullish()}).nullish()}),HQ]))),RV=D(()=>F(Q.object({logitBias:Q.record(Q.coerce.number(),Q.number()).optional(),logprobs:Q.union([Q.boolean(),Q.number()]).optional(),parallelToolCalls:Q.boolean().optional(),user:Q.string().optional(),reasoningEffort:Q.enum(["none","minimal","low","medium","high","xhigh"]).optional(),maxCompletionTokens:Q.number().optional(),store:Q.boolean().optional(),metadata:Q.record(Q.string().max(64),Q.string().max(512)).optional(),prediction:Q.record(Q.string(),Q.any()).optional(),serviceTier:Q.enum(["auto","flex","priority","default"]).optional(),strictJsonSchema:Q.boolean().optional(),textVerbosity:Q.enum(["low","medium","high"]).optional(),promptCacheKey:Q.string().optional(),promptCacheRetention:Q.enum(["in_memory","24h"]).optional(),safetyIdentifier:Q.string().optional(),systemMessageMode:Q.enum(["system","developer","remove"]).optional(),forceReasoning:Q.boolean().optional()})));function kV({tools:V,toolChoice:Y}){V=(V==null?void 0:V.length)?V:void 0;let J=[];if(V==null)return{tools:void 0,toolChoice:void 0,toolWarnings:J};let G=[];for(let E of V)switch(E.type){case"function":G.push({type:"function",function:{name:E.name,description:E.description,parameters:E.inputSchema,...E.strict!=null?{strict:E.strict}:{}}});break;default:J.push({type:"unsupported",feature:`tool type: ${E.type}`});break}if(Y==null)return{tools:G,toolChoice:void 0,toolWarnings:J};let j=Y.type;switch(j){case"auto":case"none":case"required":return{tools:G,toolChoice:j,toolWarnings:J};case"tool":return{tools:G,toolChoice:{type:"function",function:{name:Y.toolName}},toolWarnings:J};default:throw new YQ({functionality:`tool choice type: ${j}`})}}var gV=class{constructor(V,Y){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=V,this.config=Y}get provider(){return this.config.provider}async getArgs({prompt:V,maxOutputTokens:Y,temperature:J,topP:G,topK:j,frequencyPenalty:E,presencePenalty:P,stopSequences:$,responseFormat:A,seed:O,tools:K,toolChoice:Z,providerOptions:q}){var x,f,y,w,M;let g=[],b=(x=await VQ({provider:"openai",providerOptions:q,schema:RV}))!=null?x:{},n=LV(this.modelId),i=(f=b.forceReasoning)!=null?f:n.isReasoningModel;if(j!=null)g.push({type:"unsupported",feature:"topK"});let{messages:p,warnings:m}=MV({prompt:V,systemMessageMode:(y=b.systemMessageMode)!=null?y:i?"developer":n.systemMessageMode});g.push(...m);let s=(w=b.strictJsonSchema)!=null?w:!0,X={model:this.modelId,logit_bias:b.logitBias,logprobs:b.logprobs===!0||typeof b.logprobs==="number"?!0:void 0,top_logprobs:typeof b.logprobs==="number"?b.logprobs:typeof b.logprobs==="boolean"?b.logprobs?0:void 0:void 0,user:b.user,parallel_tool_calls:b.parallelToolCalls,max_tokens:Y,temperature:J,top_p:G,frequency_penalty:E,presence_penalty:P,response_format:(A==null?void 0:A.type)==="json"?A.schema!=null?{type:"json_schema",json_schema:{schema:A.schema,strict:s,name:(M=A.name)!=null?M:"response",description:A.description}}:{type:"json_object"}:void 0,stop:$,seed:O,verbosity:b.textVerbosity,max_completion_tokens:b.maxCompletionTokens,store:b.store,metadata:b.metadata,prediction:b.prediction,reasoning_effort:b.reasoningEffort,service_tier:b.serviceTier,prompt_cache_key:b.promptCacheKey,prompt_cache_retention:b.promptCacheRetention,safety_identifier:b.safetyIdentifier,messages:p};if(i){if(b.reasoningEffort!=="none"||!n.supportsNonReasoningParameters){if(X.temperature!=null)X.temperature=void 0,g.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"});if(X.top_p!=null)X.top_p=void 0,g.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"});if(X.logprobs!=null)X.logprobs=void 0,g.push({type:"other",message:"logprobs is not supported for reasoning models"})}if(X.frequency_penalty!=null)X.frequency_penalty=void 0,g.push({type:"unsupported",feature:"frequencyPenalty",details:"frequencyPenalty is not supported for reasoning models"});if(X.presence_penalty!=null)X.presence_penalty=void 0,g.push({type:"unsupported",feature:"presencePenalty",details:"presencePenalty is not supported for reasoning models"});if(X.logit_bias!=null)X.logit_bias=void 0,g.push({type:"other",message:"logitBias is not supported for reasoning models"});if(X.top_logprobs!=null)X.top_logprobs=void 0,g.push({type:"other",message:"topLogprobs is not supported for reasoning models"});if(X.max_tokens!=null){if(X.max_completion_tokens==null)X.max_completion_tokens=X.max_tokens;X.max_tokens=void 0}}else if(this.modelId.startsWith("gpt-4o-search-preview")||this.modelId.startsWith("gpt-4o-mini-search-preview")){if(X.temperature!=null)X.temperature=void 0,g.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for the search preview models and has been removed."})}if(b.serviceTier==="flex"&&!n.supportsFlexProcessing)g.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),X.service_tier=void 0;if(b.serviceTier==="priority"&&!n.supportsPriorityProcessing)g.push({type:"unsupported",feature:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),X.service_tier=void 0;let{tools:u,toolChoice:I,toolWarnings:H}=kV({tools:K,toolChoice:Z});return{args:{...X,tools:u,tool_choice:I},warnings:[...g,...H]}}async doGenerate(V){var Y,J,G,j,E,P,$;let{args:A,warnings:O}=await this.getArgs(V),{responseHeaders:K,value:Z,rawValue:q}=await WQ({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:l(this.config.headers(),V.headers),body:A,failedResponseHandler:zQ,successfulResponseHandler:$Q(bV),abortSignal:V.abortSignal,fetch:this.config.fetch}),x=Z.choices[0],f=[],y=x.message.content;if(y!=null&&y.length>0)f.push({type:"text",text:y});for(let b of(Y=x.message.tool_calls)!=null?Y:[])f.push({type:"tool-call",toolCallId:(J=b.id)!=null?J:QQ(),toolName:b.function.name,input:b.function.arguments});for(let b of(G=x.message.annotations)!=null?G:[])f.push({type:"source",sourceType:"url",id:QQ(),url:b.url_citation.url,title:b.url_citation.title});let w=(j=Z.usage)==null?void 0:j.completion_tokens_details,M=(E=Z.usage)==null?void 0:E.prompt_tokens_details,g={openai:{}};if((w==null?void 0:w.accepted_prediction_tokens)!=null)g.openai.acceptedPredictionTokens=w==null?void 0:w.accepted_prediction_tokens;if((w==null?void 0:w.rejected_prediction_tokens)!=null)g.openai.rejectedPredictionTokens=w==null?void 0:w.rejected_prediction_tokens;if(((P=x.logprobs)==null?void 0:P.content)!=null)g.openai.logprobs=x.logprobs.content;return{content:f,finishReason:{unified:vQ(x.finish_reason),raw:($=x.finish_reason)!=null?$:void 0},usage:cQ(Z.usage),request:{body:A},response:{...LQ(Z),headers:K,body:q},warnings:O,providerMetadata:g}}async doStream(V){let{args:Y,warnings:J}=await this.getArgs(V),G={...Y,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:j,value:E}=await WQ({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:l(this.config.headers(),V.headers),body:G,failedResponseHandler:zQ,successfulResponseHandler:BQ(yV),abortSignal:V.abortSignal,fetch:this.config.fetch}),P=[],$={unified:"other",raw:void 0},A=void 0,O=!1,K=!1,Z={openai:{}};return{stream:E.pipeThrough(new TransformStream({start(q){q.enqueue({type:"stream-start",warnings:J})},transform(q,x){var f,y,w,M,g,b,n,i,p,m,s,X,u,I,H,d,e;if(V.includeRawChunks)x.enqueue({type:"raw",rawValue:q.rawValue});if(!q.success){$={unified:"error",raw:void 0},x.enqueue({type:"error",error:q.error});return}let C=q.value;if("error"in C){$={unified:"error",raw:void 0},x.enqueue({type:"error",error:C.error});return}if(!O){let z=LQ(C);if(Object.values(z).some(Boolean))O=!0,x.enqueue({type:"response-metadata",...LQ(C)})}if(C.usage!=null){if(A=C.usage,((f=C.usage.completion_tokens_details)==null?void 0:f.accepted_prediction_tokens)!=null)Z.openai.acceptedPredictionTokens=(y=C.usage.completion_tokens_details)==null?void 0:y.accepted_prediction_tokens;if(((w=C.usage.completion_tokens_details)==null?void 0:w.rejected_prediction_tokens)!=null)Z.openai.rejectedPredictionTokens=(M=C.usage.completion_tokens_details)==null?void 0:M.rejected_prediction_tokens}let k=C.choices[0];if((k==null?void 0:k.finish_reason)!=null)$={unified:vQ(k.finish_reason),raw:k.finish_reason};if(((g=k==null?void 0:k.logprobs)==null?void 0:g.content)!=null)Z.openai.logprobs=k.logprobs.content;if((k==null?void 0:k.delta)==null)return;let L=k.delta;if(L.content!=null){if(!K)x.enqueue({type:"text-start",id:"0"}),K=!0;x.enqueue({type:"text-delta",id:"0",delta:L.content})}if(L.tool_calls!=null)for(let z of L.tool_calls){let T=z.index;if(P[T]==null){if(z.type!=null&&z.type!=="function")throw new AQ({data:z,message:"Expected 'function' type."});if(z.id==null)throw new AQ({data:z,message:"Expected 'id' to be a string."});if(((b=z.function)==null?void 0:b.name)==null)throw new AQ({data:z,message:"Expected 'function.name' to be a string."});x.enqueue({type:"tool-input-start",id:z.id,toolName:z.function.name}),P[T]={id:z.id,type:"function",function:{name:z.function.name,arguments:(n=z.function.arguments)!=null?n:""},hasFinished:!1};let B=P[T];if(((i=B.function)==null?void 0:i.name)!=null&&((p=B.function)==null?void 0:p.arguments)!=null){if(B.function.arguments.length>0)x.enqueue({type:"tool-input-delta",id:B.id,delta:B.function.arguments});if(qQ(B.function.arguments))x.enqueue({type:"tool-input-end",id:B.id}),x.enqueue({type:"tool-call",toolCallId:(m=B.id)!=null?m:QQ(),toolName:B.function.name,input:B.function.arguments}),B.hasFinished=!0}continue}let N=P[T];if(N.hasFinished)continue;if(((s=z.function)==null?void 0:s.arguments)!=null)N.function.arguments+=(u=(X=z.function)==null?void 0:X.arguments)!=null?u:"";if(x.enqueue({type:"tool-input-delta",id:N.id,delta:(I=z.function.arguments)!=null?I:""}),((H=N.function)==null?void 0:H.name)!=null&&((d=N.function)==null?void 0:d.arguments)!=null&&qQ(N.function.arguments))x.enqueue({type:"tool-input-end",id:N.id}),x.enqueue({type:"tool-call",toolCallId:(e=N.id)!=null?e:QQ(),toolName:N.function.name,input:N.function.arguments}),N.hasFinished=!0}if(L.annotations!=null)for(let z of L.annotations)x.enqueue({type:"source",sourceType:"url",id:QQ(),url:z.url_citation.url,title:z.url_citation.title})},flush(q){if(K)q.enqueue({type:"text-end",id:"0"});q.enqueue({type:"finish",finishReason:$,usage:cQ(A),...Z!=null?{providerMetadata:Z}:{}})}})),request:{body:G},response:{headers:j}}}};function nQ(V){var Y,J,G,j;if(V==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let E=(Y=V.prompt_tokens)!=null?Y:0,P=(J=V.completion_tokens)!=null?J:0;return{inputTokens:{total:(G=V.prompt_tokens)!=null?G:void 0,noCache:E,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:(j=V.completion_tokens)!=null?j:void 0,text:P,reasoning:void 0},raw:V}}function CV({prompt:V,user:Y="user",assistant:J="assistant"}){let G="";if(V[0].role==="system")G+=`${V[0].content}
2
+ import{$p as GV,Bq as qQ,Dq as VQ,Eq as WQ,Fq as xQ,Iq as EV,Jq as a,Lq as UV,Mq as BQ,Nq as $Q,Oq as AV,Rq as xV,Sp as l,Tp as zV,Xp as UQ,Zp as JQ,eq as wQ,gq as QQ,lq as JV,nq as FQ,pq as KV,qq as SV,sq as PV,tq as D,wq as F,xq as t,zq as BV}from"./chunk-p31yg62z.js";import{Uq as ZV,Yq as $V,Zq as AQ,cr as jV,er as YQ}from"./chunk-5mec6cde.js";import"./chunk-cqtkxwd8.js";import"./chunk-0mekr486.js";import{Tu as Q}from"./chunk-se195e52.js";import"./chunk-vw673y0t.js";import"./chunk-s2za1y84.js";var HQ=Q.object({error:Q.object({message:Q.string(),type:Q.string().nullish(),param:Q.any().nullish(),code:Q.union([Q.string(),Q.number()]).nullish()})}),zQ=UV({errorSchema:HQ,errorToMessage:(V)=>V.error.message});function LV(V){let Y=V.startsWith("o3")||V.startsWith("o4-mini")||V.startsWith("gpt-5")&&!V.startsWith("gpt-5-chat"),J=V.startsWith("gpt-4")||V.startsWith("gpt-5")&&!V.startsWith("gpt-5-nano")&&!V.startsWith("gpt-5-chat")&&!V.startsWith("gpt-5.4-nano")||V.startsWith("o3")||V.startsWith("o4-mini"),G=V.startsWith("o1")||V.startsWith("o3")||V.startsWith("o4-mini")||V.startsWith("gpt-5")&&!V.startsWith("gpt-5-chat"),j=V.startsWith("gpt-5.1")||V.startsWith("gpt-5.2")||V.startsWith("gpt-5.3")||V.startsWith("gpt-5.4");return{supportsFlexProcessing:Y,supportsPriorityProcessing:J,isReasoningModel:G,systemMessageMode:G?"developer":"system",supportsNonReasoningParameters:j}}function cQ(V){var Y,J,G,j,E,P;if(V==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let $=(Y=V.prompt_tokens)!=null?Y:0,A=(J=V.completion_tokens)!=null?J:0,O=(j=(G=V.prompt_tokens_details)==null?void 0:G.cached_tokens)!=null?j:0,K=(P=(E=V.completion_tokens_details)==null?void 0:E.reasoning_tokens)!=null?P:0;return{inputTokens:{total:$,noCache:$-O,cacheRead:O,cacheWrite:void 0},outputTokens:{total:A,text:A-K,reasoning:K},raw:V}}function HV(V){return JSON.stringify(V===void 0?{}:V)}function MV({prompt:V,systemMessageMode:Y="system"}){var J;let G=[],j=[];for(let{role:E,content:P}of V)switch(E){case"system":{switch(Y){case"system":{G.push({role:"system",content:P});break}case"developer":{G.push({role:"developer",content:P});break}case"remove":{j.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${Y}`)}break}case"user":{if(P.length===1&&P[0].type==="text"){G.push({role:"user",content:P[0].text});break}G.push({role:"user",content:P.map(($,A)=>{var O,K,Z;switch($.type){case"text":return{type:"text",text:$.text};case"file":if($.mediaType.startsWith("image/")){let q=$.mediaType==="image/*"?"image/jpeg":$.mediaType;return{type:"image_url",image_url:{url:$.data instanceof URL?$.data.toString():`data:${q};base64,${JQ($.data)}`,detail:(K=(O=$.providerOptions)==null?void 0:O.openai)==null?void 0:K.imageDetail}}}else if($.mediaType.startsWith("audio/")){if($.data instanceof URL)throw new YQ({functionality:"audio file parts with URLs"});switch($.mediaType){case"audio/wav":return{type:"input_audio",input_audio:{data:JQ($.data),format:"wav"}};case"audio/mp3":case"audio/mpeg":return{type:"input_audio",input_audio:{data:JQ($.data),format:"mp3"}};default:throw new YQ({functionality:`audio content parts with media type ${$.mediaType}`})}}else if($.mediaType==="application/pdf"){if($.data instanceof URL)throw new YQ({functionality:"PDF file parts with URLs"});return{type:"file",file:typeof $.data==="string"&&$.data.startsWith("file-")?{file_id:$.data}:{filename:(Z=$.filename)!=null?Z:`part-${A}.pdf`,file_data:`data:application/pdf;base64,${JQ($.data)}`}}}else throw new YQ({functionality:`file part media type ${$.mediaType}`})}})});break}case"assistant":{let $="",A=[];for(let O of P)switch(O.type){case"text":{$+=O.text;break}case"tool-call":{A.push({id:O.toolCallId,type:"function",function:{name:O.toolName,arguments:HV(O.input)}});break}}G.push({role:"assistant",content:$,tool_calls:A.length>0?A:void 0});break}case"tool":{for(let $ of P){if($.type==="tool-approval-response")continue;let A=$.output,O;switch(A.type){case"text":case"error-text":O=A.value;break;case"execution-denied":O=(J=A.reason)!=null?J:"Tool execution denied.";break;case"content":case"json":case"error-json":O=JSON.stringify(A.value);break}G.push({role:"tool",tool_call_id:$.toolCallId,content:O})}break}default:throw Error(`Unsupported role: ${E}`)}return{messages:G,warnings:j}}function LQ({id:V,model:Y,created:J}){return{id:V!=null?V:void 0,modelId:Y!=null?Y:void 0,timestamp:J?new Date(J*1000):void 0}}function vQ(V){switch(V){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var bV=D(()=>F(Q.object({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({message:Q.object({role:Q.literal("assistant").nullish(),content:Q.string().nullish(),tool_calls:Q.array(Q.object({id:Q.string().nullish(),type:Q.literal("function"),function:Q.object({name:Q.string(),arguments:Q.string()})})).nullish(),annotations:Q.array(Q.object({type:Q.literal("url_citation"),url_citation:Q.object({start_index:Q.number(),end_index:Q.number(),url:Q.string(),title:Q.string()})})).nullish()}),index:Q.number(),logprobs:Q.object({content:Q.array(Q.object({token:Q.string(),logprob:Q.number(),top_logprobs:Q.array(Q.object({token:Q.string(),logprob:Q.number()}))})).nullish()}).nullish(),finish_reason:Q.string().nullish()})),usage:Q.object({prompt_tokens:Q.number().nullish(),completion_tokens:Q.number().nullish(),total_tokens:Q.number().nullish(),prompt_tokens_details:Q.object({cached_tokens:Q.number().nullish()}).nullish(),completion_tokens_details:Q.object({reasoning_tokens:Q.number().nullish(),accepted_prediction_tokens:Q.number().nullish(),rejected_prediction_tokens:Q.number().nullish()}).nullish()}).nullish()}))),yV=D(()=>F(Q.union([Q.object({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({delta:Q.object({role:Q.enum(["assistant"]).nullish(),content:Q.string().nullish(),tool_calls:Q.array(Q.object({index:Q.number(),id:Q.string().nullish(),type:Q.literal("function").nullish(),function:Q.object({name:Q.string().nullish(),arguments:Q.string().nullish()})})).nullish(),annotations:Q.array(Q.object({type:Q.literal("url_citation"),url_citation:Q.object({start_index:Q.number(),end_index:Q.number(),url:Q.string(),title:Q.string()})})).nullish()}).nullish(),logprobs:Q.object({content:Q.array(Q.object({token:Q.string(),logprob:Q.number(),top_logprobs:Q.array(Q.object({token:Q.string(),logprob:Q.number()}))})).nullish()}).nullish(),finish_reason:Q.string().nullish(),index:Q.number()})),usage:Q.object({prompt_tokens:Q.number().nullish(),completion_tokens:Q.number().nullish(),total_tokens:Q.number().nullish(),prompt_tokens_details:Q.object({cached_tokens:Q.number().nullish()}).nullish(),completion_tokens_details:Q.object({reasoning_tokens:Q.number().nullish(),accepted_prediction_tokens:Q.number().nullish(),rejected_prediction_tokens:Q.number().nullish()}).nullish()}).nullish()}),HQ]))),RV=D(()=>F(Q.object({logitBias:Q.record(Q.coerce.number(),Q.number()).optional(),logprobs:Q.union([Q.boolean(),Q.number()]).optional(),parallelToolCalls:Q.boolean().optional(),user:Q.string().optional(),reasoningEffort:Q.enum(["none","minimal","low","medium","high","xhigh"]).optional(),maxCompletionTokens:Q.number().optional(),store:Q.boolean().optional(),metadata:Q.record(Q.string().max(64),Q.string().max(512)).optional(),prediction:Q.record(Q.string(),Q.any()).optional(),serviceTier:Q.enum(["auto","flex","priority","default"]).optional(),strictJsonSchema:Q.boolean().optional(),textVerbosity:Q.enum(["low","medium","high"]).optional(),promptCacheKey:Q.string().optional(),promptCacheRetention:Q.enum(["in_memory","24h"]).optional(),safetyIdentifier:Q.string().optional(),systemMessageMode:Q.enum(["system","developer","remove"]).optional(),forceReasoning:Q.boolean().optional()})));function kV({tools:V,toolChoice:Y}){V=(V==null?void 0:V.length)?V:void 0;let J=[];if(V==null)return{tools:void 0,toolChoice:void 0,toolWarnings:J};let G=[];for(let E of V)switch(E.type){case"function":G.push({type:"function",function:{name:E.name,description:E.description,parameters:E.inputSchema,...E.strict!=null?{strict:E.strict}:{}}});break;default:J.push({type:"unsupported",feature:`tool type: ${E.type}`});break}if(Y==null)return{tools:G,toolChoice:void 0,toolWarnings:J};let j=Y.type;switch(j){case"auto":case"none":case"required":return{tools:G,toolChoice:j,toolWarnings:J};case"tool":return{tools:G,toolChoice:{type:"function",function:{name:Y.toolName}},toolWarnings:J};default:throw new YQ({functionality:`tool choice type: ${j}`})}}var gV=class{constructor(V,Y){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=V,this.config=Y}get provider(){return this.config.provider}async getArgs({prompt:V,maxOutputTokens:Y,temperature:J,topP:G,topK:j,frequencyPenalty:E,presencePenalty:P,stopSequences:$,responseFormat:A,seed:O,tools:K,toolChoice:Z,providerOptions:q}){var x,f,y,w,M;let g=[],b=(x=await VQ({provider:"openai",providerOptions:q,schema:RV}))!=null?x:{},n=LV(this.modelId),i=(f=b.forceReasoning)!=null?f:n.isReasoningModel;if(j!=null)g.push({type:"unsupported",feature:"topK"});let{messages:p,warnings:m}=MV({prompt:V,systemMessageMode:(y=b.systemMessageMode)!=null?y:i?"developer":n.systemMessageMode});g.push(...m);let s=(w=b.strictJsonSchema)!=null?w:!0,X={model:this.modelId,logit_bias:b.logitBias,logprobs:b.logprobs===!0||typeof b.logprobs==="number"?!0:void 0,top_logprobs:typeof b.logprobs==="number"?b.logprobs:typeof b.logprobs==="boolean"?b.logprobs?0:void 0:void 0,user:b.user,parallel_tool_calls:b.parallelToolCalls,max_tokens:Y,temperature:J,top_p:G,frequency_penalty:E,presence_penalty:P,response_format:(A==null?void 0:A.type)==="json"?A.schema!=null?{type:"json_schema",json_schema:{schema:A.schema,strict:s,name:(M=A.name)!=null?M:"response",description:A.description}}:{type:"json_object"}:void 0,stop:$,seed:O,verbosity:b.textVerbosity,max_completion_tokens:b.maxCompletionTokens,store:b.store,metadata:b.metadata,prediction:b.prediction,reasoning_effort:b.reasoningEffort,service_tier:b.serviceTier,prompt_cache_key:b.promptCacheKey,prompt_cache_retention:b.promptCacheRetention,safety_identifier:b.safetyIdentifier,messages:p};if(i){if(b.reasoningEffort!=="none"||!n.supportsNonReasoningParameters){if(X.temperature!=null)X.temperature=void 0,g.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"});if(X.top_p!=null)X.top_p=void 0,g.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"});if(X.logprobs!=null)X.logprobs=void 0,g.push({type:"other",message:"logprobs is not supported for reasoning models"})}if(X.frequency_penalty!=null)X.frequency_penalty=void 0,g.push({type:"unsupported",feature:"frequencyPenalty",details:"frequencyPenalty is not supported for reasoning models"});if(X.presence_penalty!=null)X.presence_penalty=void 0,g.push({type:"unsupported",feature:"presencePenalty",details:"presencePenalty is not supported for reasoning models"});if(X.logit_bias!=null)X.logit_bias=void 0,g.push({type:"other",message:"logitBias is not supported for reasoning models"});if(X.top_logprobs!=null)X.top_logprobs=void 0,g.push({type:"other",message:"topLogprobs is not supported for reasoning models"});if(X.max_tokens!=null){if(X.max_completion_tokens==null)X.max_completion_tokens=X.max_tokens;X.max_tokens=void 0}}else if(this.modelId.startsWith("gpt-4o-search-preview")||this.modelId.startsWith("gpt-4o-mini-search-preview")){if(X.temperature!=null)X.temperature=void 0,g.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for the search preview models and has been removed."})}if(b.serviceTier==="flex"&&!n.supportsFlexProcessing)g.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),X.service_tier=void 0;if(b.serviceTier==="priority"&&!n.supportsPriorityProcessing)g.push({type:"unsupported",feature:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),X.service_tier=void 0;let{tools:u,toolChoice:I,toolWarnings:H}=kV({tools:K,toolChoice:Z});return{args:{...X,tools:u,tool_choice:I},warnings:[...g,...H]}}async doGenerate(V){var Y,J,G,j,E,P,$;let{args:A,warnings:O}=await this.getArgs(V),{responseHeaders:K,value:Z,rawValue:q}=await WQ({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:l(this.config.headers(),V.headers),body:A,failedResponseHandler:zQ,successfulResponseHandler:$Q(bV),abortSignal:V.abortSignal,fetch:this.config.fetch}),x=Z.choices[0],f=[],y=x.message.content;if(y!=null&&y.length>0)f.push({type:"text",text:y});for(let b of(Y=x.message.tool_calls)!=null?Y:[])f.push({type:"tool-call",toolCallId:(J=b.id)!=null?J:QQ(),toolName:b.function.name,input:b.function.arguments});for(let b of(G=x.message.annotations)!=null?G:[])f.push({type:"source",sourceType:"url",id:QQ(),url:b.url_citation.url,title:b.url_citation.title});let w=(j=Z.usage)==null?void 0:j.completion_tokens_details,M=(E=Z.usage)==null?void 0:E.prompt_tokens_details,g={openai:{}};if((w==null?void 0:w.accepted_prediction_tokens)!=null)g.openai.acceptedPredictionTokens=w==null?void 0:w.accepted_prediction_tokens;if((w==null?void 0:w.rejected_prediction_tokens)!=null)g.openai.rejectedPredictionTokens=w==null?void 0:w.rejected_prediction_tokens;if(((P=x.logprobs)==null?void 0:P.content)!=null)g.openai.logprobs=x.logprobs.content;return{content:f,finishReason:{unified:vQ(x.finish_reason),raw:($=x.finish_reason)!=null?$:void 0},usage:cQ(Z.usage),request:{body:A},response:{...LQ(Z),headers:K,body:q},warnings:O,providerMetadata:g}}async doStream(V){let{args:Y,warnings:J}=await this.getArgs(V),G={...Y,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:j,value:E}=await WQ({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:l(this.config.headers(),V.headers),body:G,failedResponseHandler:zQ,successfulResponseHandler:BQ(yV),abortSignal:V.abortSignal,fetch:this.config.fetch}),P=[],$={unified:"other",raw:void 0},A=void 0,O=!1,K=!1,Z={openai:{}};return{stream:E.pipeThrough(new TransformStream({start(q){q.enqueue({type:"stream-start",warnings:J})},transform(q,x){var f,y,w,M,g,b,n,i,p,m,s,X,u,I,H,d,e;if(V.includeRawChunks)x.enqueue({type:"raw",rawValue:q.rawValue});if(!q.success){$={unified:"error",raw:void 0},x.enqueue({type:"error",error:q.error});return}let C=q.value;if("error"in C){$={unified:"error",raw:void 0},x.enqueue({type:"error",error:C.error});return}if(!O){let z=LQ(C);if(Object.values(z).some(Boolean))O=!0,x.enqueue({type:"response-metadata",...LQ(C)})}if(C.usage!=null){if(A=C.usage,((f=C.usage.completion_tokens_details)==null?void 0:f.accepted_prediction_tokens)!=null)Z.openai.acceptedPredictionTokens=(y=C.usage.completion_tokens_details)==null?void 0:y.accepted_prediction_tokens;if(((w=C.usage.completion_tokens_details)==null?void 0:w.rejected_prediction_tokens)!=null)Z.openai.rejectedPredictionTokens=(M=C.usage.completion_tokens_details)==null?void 0:M.rejected_prediction_tokens}let k=C.choices[0];if((k==null?void 0:k.finish_reason)!=null)$={unified:vQ(k.finish_reason),raw:k.finish_reason};if(((g=k==null?void 0:k.logprobs)==null?void 0:g.content)!=null)Z.openai.logprobs=k.logprobs.content;if((k==null?void 0:k.delta)==null)return;let L=k.delta;if(L.content!=null){if(!K)x.enqueue({type:"text-start",id:"0"}),K=!0;x.enqueue({type:"text-delta",id:"0",delta:L.content})}if(L.tool_calls!=null)for(let z of L.tool_calls){let T=z.index;if(P[T]==null){if(z.type!=null&&z.type!=="function")throw new AQ({data:z,message:"Expected 'function' type."});if(z.id==null)throw new AQ({data:z,message:"Expected 'id' to be a string."});if(((b=z.function)==null?void 0:b.name)==null)throw new AQ({data:z,message:"Expected 'function.name' to be a string."});x.enqueue({type:"tool-input-start",id:z.id,toolName:z.function.name}),P[T]={id:z.id,type:"function",function:{name:z.function.name,arguments:(n=z.function.arguments)!=null?n:""},hasFinished:!1};let B=P[T];if(((i=B.function)==null?void 0:i.name)!=null&&((p=B.function)==null?void 0:p.arguments)!=null){if(B.function.arguments.length>0)x.enqueue({type:"tool-input-delta",id:B.id,delta:B.function.arguments});if(qQ(B.function.arguments))x.enqueue({type:"tool-input-end",id:B.id}),x.enqueue({type:"tool-call",toolCallId:(m=B.id)!=null?m:QQ(),toolName:B.function.name,input:B.function.arguments}),B.hasFinished=!0}continue}let N=P[T];if(N.hasFinished)continue;if(((s=z.function)==null?void 0:s.arguments)!=null)N.function.arguments+=(u=(X=z.function)==null?void 0:X.arguments)!=null?u:"";if(x.enqueue({type:"tool-input-delta",id:N.id,delta:(I=z.function.arguments)!=null?I:""}),((H=N.function)==null?void 0:H.name)!=null&&((d=N.function)==null?void 0:d.arguments)!=null&&qQ(N.function.arguments))x.enqueue({type:"tool-input-end",id:N.id}),x.enqueue({type:"tool-call",toolCallId:(e=N.id)!=null?e:QQ(),toolName:N.function.name,input:N.function.arguments}),N.hasFinished=!0}if(L.annotations!=null)for(let z of L.annotations)x.enqueue({type:"source",sourceType:"url",id:QQ(),url:z.url_citation.url,title:z.url_citation.title})},flush(q){if(K)q.enqueue({type:"text-end",id:"0"});q.enqueue({type:"finish",finishReason:$,usage:cQ(A),...Z!=null?{providerMetadata:Z}:{}})}})),request:{body:G},response:{headers:j}}}};function nQ(V){var Y,J,G,j;if(V==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let E=(Y=V.prompt_tokens)!=null?Y:0,P=(J=V.completion_tokens)!=null?J:0;return{inputTokens:{total:(G=V.prompt_tokens)!=null?G:void 0,noCache:E,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:(j=V.completion_tokens)!=null?j:void 0,text:P,reasoning:void 0},raw:V}}function CV({prompt:V,user:Y="user",assistant:J="assistant"}){let G="";if(V[0].role==="system")G+=`${V[0].content}
3
3
 
4
4
  `,V=V.slice(1);for(let{role:j,content:E}of V)switch(j){case"system":throw new $V({message:"Unexpected system message in prompt: ${content}",prompt:V});case"user":{let P=E.map(($)=>{switch($.type){case"text":return $.text}}).filter(Boolean).join("");G+=`${Y}:
5
5
  ${P}
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{GP as o}from"./chunk-s2za1y84.js";var i=(t)=>`standard-openapi: ${t}`,s=new Map,r=async(t)=>{let e=s.get(t);if(e)return e;let a;switch(t){case"valibot":a=(await import("./chunk-kvz0vzsn.js")).default();break;case"zod":a=(await import("./chunk-1337582e.js")).default();break;default:a=(await import("./chunk-pfbykat1.js")).default()}return s.set(t,a),a},d=async(t,e={})=>{let a=await r(t["~standard"].vendor),{components:n={},options:c}=e;return{schema:await a(t,{components:n,options:c}),components:Object.keys(n).length>0?n:void 0}};
3
+ export{i as Gg,d as Hg};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{M as o}from"./chunk-vftqwdpg.js";import{N as i}from"./chunk-agdfqncf.js";import{Cd as p}from"./chunk-jz3aav8a.js";import{Pd as n}from"./chunk-9xvctnjr.js";import{Tf as B}from"./chunk-gen6f3dn.js";import{_f as l}from"./chunk-vzjcmwry.js";import"./chunk-6j0365q3.js";import"./chunk-7y3y3j51.js";import"./chunk-4aykrj51.js";import"./chunk-sbt7qmwm.js";import"./chunk-nfg7nt13.js";import"./chunk-ktmazmas.js";import"./chunk-qywwj58s.js";import{ih as d,sh as g}from"./chunk-va4davgy.js";import"./chunk-hg563h5r.js";import"./chunk-j1a64ade.js";import"./chunk-bd21p9zz.js";import"./chunk-p54bzjtv.js";import"./chunk-ha1w0xzh.js";import"./chunk-ecwz9nhs.js";import"./chunk-5rkmhzq0.js";import{Tk as f}from"./chunk-7mhffm9f.js";import"./chunk-r012q335.js";import"./chunk-0z3z0gk1.js";import"./chunk-g7vkkmsk.js";import"./chunk-m8djypsy.js";import"./chunk-w7p2x973.js";import"./chunk-wmw2gne9.js";import"./chunk-y3n31nnx.js";import"./chunk-3z1y040p.js";import{mp as D}from"./chunk-kkvb2c2z.js";import"./chunk-3tdqsm5c.js";import"./chunk-a5zjrwqy.js";import"./chunk-fhng5her.js";import"./chunk-dkv2mg97.js";import"./chunk-bf146hz2.js";import"./chunk-t488d66k.js";import"./chunk-cqtkxwd8.js";import"./chunk-srf73nm4.js";import"./chunk-yzdty5t9.js";import"./chunk-1p34bx7c.js";import"./chunk-q3x4x2tq.js";import"./chunk-7dckfame.js";import"./chunk-j1veq3zr.js";import"./chunk-0pvbk8ks.js";import"./chunk-tk3bve0x.js";import"./chunk-0w4v0fbs.js";import"./chunk-wf09j72q.js";import"./chunk-hbnr0j7h.js";import"./chunk-ep8zn49w.js";import"./chunk-f3kjp838.js";import"./chunk-tsn1jkr7.js";import{gt as u,qt as I,zt as x}from"./chunk-zk8n8hnh.js";import{Tt as y}from"./chunk-1jh5p5qw.js";import"./chunk-kaeyhw2n.js";import"./chunk-f89gntcy.js";import"./chunk-bky5a42k.js";import"./chunk-r7xp0xcn.js";import"./chunk-6g3m7yxf.js";import"./chunk-v2kyarwz.js";import"./chunk-dkm7x8rj.js";import"./chunk-9pe4agdz.js";import"./chunk-kc3hpmr2.js";import"./chunk-hh4c02fh.js";import Q from"path";import{pathToFileURL as a}from"url";import{EOL as O}from"os";function $(j){let K=j.state;return{input:K.input,metadata:"metadata"in K?K.metadata:{},part:j}}function C(j){let K=j.description?B.Style.TEXT_DIM+` ${j.description}`+B.Style.TEXT_NORMAL:"";B.println(B.Style.TEXT_NORMAL+j.icon,B.Style.TEXT_NORMAL+j.title+K)}function b(j,K){if(B.empty(),C(j),!K?.trim())return;B.println(K),B.empty()}function c(j){let K=j.state,V="input"in K?K.input:void 0,Y=("title"in K&&K.title?K.title:void 0)||(V&&typeof V==="object"&&Object.keys(V).length>0?JSON.stringify(V):"Unknown");C({icon:"\u2699",title:`${j.tool} ${Y}`})}function t(j){let K=j.path??"",V=`${j.kind} "${j.pattern}"`,Y=K?`in ${T(K)}`:"",H=j.count===void 0?Y:`${Y}${Y?" \xB7 ":""}${j.count} ${j.count===1?"match":"matches"}`;C({icon:"\u2731",title:V,...H&&{description:H}})}function r(j){t({kind:"Glob",pattern:j.input.pattern,path:j.input.path,count:j.metadata.count})}function jj(j){t({kind:"Grep",pattern:j.input.pattern,path:j.input.path,count:j.metadata.matches})}function Bj(j){let K=T(j.input.filePath),V=Object.entries(j.input).filter(([H,S])=>{if(H==="filePath")return!1;return typeof S==="string"||typeof S==="number"||typeof S==="boolean"}),Y=V.length?`[${V.map(([H,S])=>`${H}=${S}`).join(", ")}]`:void 0;C({icon:"\u2192",title:`Read ${K}`,...Y&&{description:Y}})}function Gj(j){b({icon:"\u2190",title:`Write ${T(j.input.filePath)}`},j.part.state.status==="completed"?j.part.state.output:void 0)}function Jj(j){C({icon:"%",title:`WebFetch ${j.input.url}`})}function Kj(j){let K=T(j.input.filePath),V=j.metadata.diff;b({icon:"\u2190",title:`Edit ${K}`},V)}function Mj(j){C({icon:"\u25C7",title:`Exa Code Search "${j.input.query}"`})}function Nj(j){C({icon:"\u25C8",title:`Web Search "${j.input.query}"`})}function k(j){let K=j.part.state.input?.operation??j.part.state.input,V=j.part.state.status,Y=typeof K?.subagent_type==="string"&&K.subagent_type.trim().length>0?K.subagent_type:"unknown",H=u.titlecase(Y),S=typeof K?.description==="string"&&K.description.trim().length>0?K.description:void 0,w=V==="error"?"\u2717":V==="running"?"\u2022":"\u2713",L=S??`${H} Task`;C({icon:w,title:L,description:S?`${H} Agent`:void 0})}function Vj(j){C({icon:"\u2192",title:`Skill "${j.input.name}"`})}function Xj(j){let K=j.part.state.status==="completed"?j.part.state.output?.trim():void 0;b({icon:"$",title:`${j.input.command}`},K)}function T(j){if(!j)return"";if(Q.isAbsolute(j))return Q.relative(process.cwd(),j)||".";return j}var Tj=n({command:"run [message..]",describe:"run qitqode with a message",builder:(j)=>{return j.positional("message",{describe:"message to send",type:"string",array:!0,default:[]}).option("command",{describe:"the command to run, use message for args",type:"string"}).option("continue",{alias:["c"],describe:"continue the last session",type:"boolean"}).option("session",{alias:["s"],describe:"session id to continue",type:"string"}).option("fork",{describe:"fork the session before continuing (requires --continue or --session)",type:"boolean"}).option("share",{type:"boolean",describe:"share the session"}).option("model",{type:"string",alias:["m"],describe:"model to use in the format of provider/model"}).option("agent",{type:"string",describe:"agent to use"}).option("format",{type:"string",choices:["default","json"],default:"default",describe:"format: default (formatted) or json (raw JSON events)"}).option("file",{alias:["f"],type:"string",array:!0,describe:"file(s) to attach to message"}).option("title",{type:"string",describe:"title for the session (uses truncated prompt if no value provided)"}).option("attach",{type:"string",describe:"attach to a running qitqode server (e.g., http://localhost:4096)"}).option("password",{alias:["p"],type:"string",describe:"basic auth password (defaults to QITQODE_SERVER_PASSWORD)"}).option("dir",{type:"string",describe:"directory to run in, path on remote server if attaching"}).option("port",{type:"number",describe:"port for the local server (defaults to random port if no value provided)"}).option("variant",{type:"string",describe:"model variant (provider-specific reasoning effort, e.g., high, max, minimal)"}).option("thinking",{type:"boolean",describe:"show thinking blocks",default:!1}).option("dangerously-skip-permissions",{type:"boolean",describe:"auto-approve permissions that are not explicitly denied (dangerous!)",default:!1})},handler:async(j)=>{let K=[...j.message,...j["--"]||[]].join(" "),V=(()=>{if(!j.dir)return;if(j.attach)return j.dir;try{return process.chdir(j.dir),process.cwd()}catch{B.error("Failed to change directory to "+j.dir),process.exit(1)}})(),Y=[];if(j.file){let M=Array.isArray(j.file)?j.file:[j.file];for(let X of M){let N=Q.resolve(process.cwd(),X);if(!await y.exists(N))B.error(`File not found: ${X}`),process.exit(1);let W=await y.isDir(N)?"application/x-directory":"text/plain";Y.push({type:"file",url:a(N).href,filename:Q.basename(N),mime:W})}}if(!process.stdin.isTTY)K+=`
2
+ import{N as o}from"./chunk-8ahpk8td.js";import{O as i}from"./chunk-vpqd0t8a.js";import{Dd as p}from"./chunk-3kdhvq0p.js";import{Qd as n}from"./chunk-g4qwkcdv.js";import{Uf as B}from"./chunk-0ndvy0nh.js";import{$f as l}from"./chunk-f416n3mp.js";import"./chunk-dazye86e.js";import"./chunk-3bb7y9pq.js";import"./chunk-wr5hdsst.js";import"./chunk-nfp9xtca.js";import"./chunk-nfg7nt13.js";import"./chunk-ze00x1xb.js";import"./chunk-sdsggxm4.js";import{kh as d,uh as g}from"./chunk-kbjwdv1x.js";import"./chunk-ek1fawsj.js";import"./chunk-3w64fpwn.js";import"./chunk-pfn1db1m.js";import"./chunk-h56jxxvj.js";import"./chunk-x36jhtex.js";import"./chunk-fk8cctjy.js";import"./chunk-fxb6vjcb.js";import{Uk as f}from"./chunk-njzpswgt.js";import"./chunk-2cm91ktc.js";import"./chunk-ygwe0vf1.js";import"./chunk-1qbm1k9y.js";import"./chunk-3rgct4bd.js";import"./chunk-atbm0pnt.js";import"./chunk-s86fj82v.js";import"./chunk-58gp7wbg.js";import"./chunk-w4hbw37v.js";import{mp as D}from"./chunk-qmhcbdkg.js";import"./chunk-7qxn24qa.js";import"./chunk-vx837ete.js";import"./chunk-ppvmy940.js";import"./chunk-1n4w8dya.js";import"./chunk-7ryv0f5h.js";import"./chunk-p31yg62z.js";import"./chunk-5mec6cde.js";import"./chunk-cqtkxwd8.js";import"./chunk-0mekr486.js";import"./chunk-x3931we7.js";import"./chunk-w01gjnty.js";import"./chunk-nxjbbq5h.js";import"./chunk-z559gc3n.js";import"./chunk-kbyk7hyn.js";import"./chunk-6h2faxs9.js";import"./chunk-4nck07pc.js";import"./chunk-d2n09yvh.js";import"./chunk-f3c9667r.js";import"./chunk-qpv4438m.js";import"./chunk-hybq019j.js";import"./chunk-z2q3mg73.js";import"./chunk-n07rsssz.js";import{$t as x,It as u,St as I}from"./chunk-08y06vgt.js";import{tu as y}from"./chunk-9p83me3p.js";import"./chunk-9wm41z2f.js";import"./chunk-48j09m6e.js";import"./chunk-se195e52.js";import"./chunk-vw673y0t.js";import"./chunk-tedrfa7d.js";import"./chunk-ynfbz3sz.js";import"./chunk-rs0nx844.js";import"./chunk-qkwhgfjt.js";import"./chunk-s2za1y84.js";import Q from"path";import{pathToFileURL as a}from"url";import{EOL as O}from"os";function $(j){let K=j.state;return{input:K.input,metadata:"metadata"in K?K.metadata:{},part:j}}function C(j){let K=j.description?B.Style.TEXT_DIM+` ${j.description}`+B.Style.TEXT_NORMAL:"";B.println(B.Style.TEXT_NORMAL+j.icon,B.Style.TEXT_NORMAL+j.title+K)}function b(j,K){if(B.empty(),C(j),!K?.trim())return;B.println(K),B.empty()}function c(j){let K=j.state,V="input"in K?K.input:void 0,Y=("title"in K&&K.title?K.title:void 0)||(V&&typeof V==="object"&&Object.keys(V).length>0?JSON.stringify(V):"Unknown");C({icon:"\u2699",title:`${j.tool} ${Y}`})}function t(j){let K=j.path??"",V=`${j.kind} "${j.pattern}"`,Y=K?`in ${T(K)}`:"",H=j.count===void 0?Y:`${Y}${Y?" \xB7 ":""}${j.count} ${j.count===1?"match":"matches"}`;C({icon:"\u2731",title:V,...H&&{description:H}})}function r(j){t({kind:"Glob",pattern:j.input.pattern,path:j.input.path,count:j.metadata.count})}function jj(j){t({kind:"Grep",pattern:j.input.pattern,path:j.input.path,count:j.metadata.matches})}function Bj(j){let K=T(j.input.filePath),V=Object.entries(j.input).filter(([H,S])=>{if(H==="filePath")return!1;return typeof S==="string"||typeof S==="number"||typeof S==="boolean"}),Y=V.length?`[${V.map(([H,S])=>`${H}=${S}`).join(", ")}]`:void 0;C({icon:"\u2192",title:`Read ${K}`,...Y&&{description:Y}})}function Gj(j){b({icon:"\u2190",title:`Write ${T(j.input.filePath)}`},j.part.state.status==="completed"?j.part.state.output:void 0)}function Jj(j){C({icon:"%",title:`WebFetch ${j.input.url}`})}function Kj(j){let K=T(j.input.filePath),V=j.metadata.diff;b({icon:"\u2190",title:`Edit ${K}`},V)}function Mj(j){C({icon:"\u25C7",title:`Exa Code Search "${j.input.query}"`})}function Nj(j){C({icon:"\u25C8",title:`Web Search "${j.input.query}"`})}function k(j){let K=j.part.state.input?.operation??j.part.state.input,V=j.part.state.status,Y=typeof K?.subagent_type==="string"&&K.subagent_type.trim().length>0?K.subagent_type:"unknown",H=u.titlecase(Y),S=typeof K?.description==="string"&&K.description.trim().length>0?K.description:void 0,w=V==="error"?"\u2717":V==="running"?"\u2022":"\u2713",L=S??`${H} Task`;C({icon:w,title:L,description:S?`${H} Agent`:void 0})}function Vj(j){C({icon:"\u2192",title:`Skill "${j.input.name}"`})}function Xj(j){let K=j.part.state.status==="completed"?j.part.state.output?.trim():void 0;b({icon:"$",title:`${j.input.command}`},K)}function T(j){if(!j)return"";if(Q.isAbsolute(j))return Q.relative(process.cwd(),j)||".";return j}var Tj=n({command:"run [message..]",describe:"run qitqode with a message",builder:(j)=>{return j.positional("message",{describe:"message to send",type:"string",array:!0,default:[]}).option("command",{describe:"the command to run, use message for args",type:"string"}).option("continue",{alias:["c"],describe:"continue the last session",type:"boolean"}).option("session",{alias:["s"],describe:"session id to continue",type:"string"}).option("fork",{describe:"fork the session before continuing (requires --continue or --session)",type:"boolean"}).option("share",{type:"boolean",describe:"share the session"}).option("model",{type:"string",alias:["m"],describe:"model to use in the format of provider/model"}).option("agent",{type:"string",describe:"agent to use"}).option("format",{type:"string",choices:["default","json"],default:"default",describe:"format: default (formatted) or json (raw JSON events)"}).option("file",{alias:["f"],type:"string",array:!0,describe:"file(s) to attach to message"}).option("title",{type:"string",describe:"title for the session (uses truncated prompt if no value provided)"}).option("attach",{type:"string",describe:"attach to a running qitqode server (e.g., http://localhost:4096)"}).option("password",{alias:["p"],type:"string",describe:"basic auth password (defaults to QITQODE_SERVER_PASSWORD)"}).option("dir",{type:"string",describe:"directory to run in, path on remote server if attaching"}).option("port",{type:"number",describe:"port for the local server (defaults to random port if no value provided)"}).option("variant",{type:"string",describe:"model variant (provider-specific reasoning effort, e.g., high, max, minimal)"}).option("thinking",{type:"boolean",describe:"show thinking blocks",default:!1}).option("dangerously-skip-permissions",{type:"boolean",describe:"auto-approve permissions that are not explicitly denied (dangerous!)",default:!1})},handler:async(j)=>{let K=[...j.message,...j["--"]||[]].join(" "),V=(()=>{if(!j.dir)return;if(j.attach)return j.dir;try{return process.chdir(j.dir),process.cwd()}catch{B.error("Failed to change directory to "+j.dir),process.exit(1)}})(),Y=[];if(j.file){let M=Array.isArray(j.file)?j.file:[j.file];for(let X of M){let N=Q.resolve(process.cwd(),X);if(!await y.exists(N))B.error(`File not found: ${X}`),process.exit(1);let W=await y.isDir(N)?"application/x-directory":"text/plain";Y.push({type:"file",url:a(N).href,filename:Q.basename(N),mime:W})}}if(!process.stdin.isTTY)K+=`
3
3
  `+await Bun.stdin.text();if(K.trim().length===0&&!j.command)B.error("You must provide a message or a command"),process.exit(1);if(j.fork&&!j.continue&&!j.session)B.error("--fork requires --continue or --session"),process.exit(1);let H=[{permission:"question",action:"deny",pattern:"*"},{permission:"plan_enter",action:"deny",pattern:"*"},{permission:"plan_exit",action:"deny",pattern:"*"}];function S(){if(j.title===void 0)return;if(j.title!=="")return j.title;return K.slice(0,50)+(K.length>50?"...":"")}async function w(M){let X=j.continue?(await M.session.list()).data?.find((Z)=>!Z.parentID)?.id:j.session;if(X&&j.fork)return(await M.session.fork({sessionID:X})).data?.id;if(X)return X;let N=S();return(await M.session.create({title:N,permission:H})).data?.id}async function L(M,X){let N=await M.config.get();if(!N.data)return;if(N.data.share!=="auto"&&!I.QITQODE_AUTO_SHARE&&!j.share)return;let W=await M.session.share({sessionID:X}).catch((Z)=>{if(Z instanceof Error&&Z.message.includes("disabled"))B.println(B.Style.TEXT_DANGER_BOLD+"! "+Z.message);return{error:Z}});if(!W.error&&"data"in W&&W.data?.share?.url)B.println(B.Style.TEXT_INFO_BOLD+"~ "+W.data.share.url)}async function h(M){function X(G){try{if(G.tool==="bash")return Xj($(G));if(G.tool==="glob")return r($(G));if(G.tool==="grep")return jj($(G));if(G.tool==="read")return Bj($(G));if(G.tool==="write")return Gj($(G));if(G.tool==="webfetch")return Jj($(G));if(G.tool==="edit")return Kj($(G));if(G.tool==="codesearch")return Mj($(G));if(G.tool==="websearch")return Nj($(G));if(G.tool==="actor")return k($(G));if(G.tool==="skill")return Vj($(G));return c(G)}catch{return c(G)}}function N(G,q){if(j.format==="json")return process.stdout.write(JSON.stringify({type:G,timestamp:Date.now(),sessionID:A,...q})+O),!0;return!1}let W=await M.event.subscribe(),Z;async function e(G){let q=new Map,z=x.create({service:"cli.run"}),E=W.stream[Symbol.asyncIterator](),F=G.completion.then(()=>"DONE");try{while(!0){let P=await Promise.race([E.next(),F]);if(P==="DONE")break;if(P.done)break;let _=P.value;if(G.onEvent(_),z.debug("event received",{type:_.type}),_.type==="message.updated"&&_.properties.info.role==="assistant"&&j.format!=="json"&&q.get("start")!==!0)B.empty(),B.println(`> ${_.properties.info.agent} \xB7 ${_.properties.info.modelID}`),B.empty(),q.set("start",!0);if(_.type==="message.part.updated"){let J=_.properties.part;if(J.sessionID!==A)continue;if(J.type==="tool"&&(J.state.status==="completed"||J.state.status==="error")){if(N("tool_use",{part:J}))continue;if(J.state.status==="completed"){X(J);continue}C({icon:"\u2717",title:`${J.tool} failed`}),B.error(J.state.error)}if(J.type==="tool"&&J.tool==="actor"&&J.state.status==="running"&&j.format!=="json"){if(q.get(J.id)===!0)continue;k($(J)),q.set(J.id,!0)}if(J.type==="step-start"){if(N("step_start",{part:J}))continue}if(J.type==="step-finish"){if(N("step_finish",{part:J}))continue}if(J.type==="text"&&J.time?.end){if(N("text",{part:J}))continue;let R=J.text.trim();if(!R)continue;if(!process.stdout.isTTY){process.stdout.write(R+O);continue}B.empty(),B.println(R),B.empty()}if(J.type==="reasoning"&&J.time?.end&&j.thinking){if(N("reasoning",{part:J}))continue;let R=J.text.trim();if(!R)continue;let U=`Thinking: ${R}`;if(process.stdout.isTTY){B.empty(),B.println(`${B.Style.TEXT_DIM}\x1B[3m${U}\x1B[0m${B.Style.TEXT_NORMAL}`),B.empty();continue}process.stdout.write(U+O)}}if(_.type==="session.error"){let J=_.properties;if(J.sessionID!==A||!J.error)continue;let R=String(J.error.name);if("data"in J.error&&J.error.data&&"message"in J.error.data)R=String(J.error.data.message);if(Z=Z?Z+O+R:R,N("error",{error:J.error}))continue;B.error(R)}if(_.type==="permission.asked"){let J=_.properties;if(J.sessionID!==A)continue;if(j["dangerously-skip-permissions"])await M.permission.reply({requestID:J.id,reply:"once"});else B.println(B.Style.TEXT_WARNING_BOLD+"!",B.Style.TEXT_NORMAL+`permission requested: ${J.permission} (${J.patterns.join(", ")}); auto-rejecting`),await M.permission.reply({requestID:J.id,reply:"reject"})}}}finally{G.stop(),await E.return?.(void 0).catch(()=>{})}}let v=await(async()=>{if(!j.agent)return;let G=j.agent;if(j.attach){let z=await M.app.agents(void 0,{throwOnError:!0}).then((F)=>F.data??[]).catch(()=>{return});if(!z){B.println(B.Style.TEXT_WARNING_BOLD+"!",B.Style.TEXT_NORMAL,`failed to list agents from ${j.attach}. Falling back to default agent`);return}let E=z.find((F)=>F.name===G);if(!E){B.println(B.Style.TEXT_WARNING_BOLD+"!",B.Style.TEXT_NORMAL,`agent "${G}" not found. Falling back to default agent`);return}if(E.mode==="subagent"){B.println(B.Style.TEXT_WARNING_BOLD+"!",B.Style.TEXT_NORMAL,`agent "${G}" is a subagent, not a primary agent. Falling back to default agent`);return}return G}let q=await g.runPromise(d.Service.use((z)=>z.get(G)));if(!q){B.println(B.Style.TEXT_WARNING_BOLD+"!",B.Style.TEXT_NORMAL,`agent "${G}" not found. Falling back to default agent`);return}if(q.mode==="subagent"){B.println(B.Style.TEXT_WARNING_BOLD+"!",B.Style.TEXT_NORMAL,`agent "${G}" is a subagent, not a primary agent. Falling back to default agent`);return}return G})(),A=await w(M);if(!A)B.error("Session not found"),process.exit(1);await L(M,A);let s=x.create({service:"cli.run.poll"}),m=o({sessionID:A,query:async()=>{try{return(await M.session.status()).data?.[A]}catch(G){throw s.debug("session.status query failed",{error:G}),G}}});if(e(m).catch((G)=>{console.error(G),process.exit(1)}),j.command)await M.session.command({sessionID:A,agent:v,model:j.model,command:j.command,arguments:K,variant:j.variant});else{let G=j.model?f.parseModel(j.model):void 0;await M.session.prompt({sessionID:A,agent:v,model:G,variant:j.variant,parts:[...Y,{type:"text",text:K}]})}m.markStarted()}if(j.attach){let M=i({password:j.password}),X=D({baseUrl:j.attach,directory:V,headers:M});return await h(X)}await p(process.cwd(),async()=>{let X=D({baseUrl:"http://qitqode.internal",fetch:async(N,W)=>{let Z=new Request(N,W);return l.Default().app.fetch(Z)}});await h(X)})}});export{Tj as RunCommand};