@qitqode/qitqode-android-arm64 0.1.36 → 0.2.1

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 (419) hide show
  1. package/bundle/{chunk-cx7p4ezk.js → chunk-03mbn7nj.js} +2 -2
  2. package/bundle/{chunk-1yv5h8k4.js → chunk-073ydjmk.js} +1 -1
  3. package/bundle/{chunk-rrd0jf5m.js → chunk-07s30fpb.js} +1 -1
  4. package/bundle/{chunk-yacccwf6.js → chunk-087tnr8a.js} +1 -1
  5. package/bundle/{chunk-kx2dp8ch.js → chunk-0f3ft9dh.js} +1 -1
  6. package/bundle/{chunk-rgxy4ngt.js → chunk-0gab4v98.js} +1 -1
  7. package/bundle/chunk-0xrr0k94.js +2 -0
  8. package/bundle/chunk-0yagj4ss.js +2 -0
  9. package/bundle/chunk-0ych0f5w.js +2 -0
  10. package/bundle/{chunk-xyjehgzm.js → chunk-0z1cxvk1.js} +2 -2
  11. package/bundle/{chunk-rph9zj24.js → chunk-0zxwjsvz.js} +1 -1
  12. package/bundle/{chunk-pqnbdygz.js → chunk-1p6jjrea.js} +2 -2
  13. package/bundle/{chunk-9cw4cnz0.js → chunk-1q1cddy4.js} +1 -1
  14. package/bundle/{chunk-w9pdvcf9.js → chunk-1sfcxdbw.js} +2 -2
  15. package/bundle/chunk-22hr3ndh.js +2 -0
  16. package/bundle/chunk-23tyxyyj.js +2 -0
  17. package/bundle/chunk-28g1ndpx.js +2 -0
  18. package/bundle/chunk-29v1v357.js +2 -0
  19. package/bundle/{chunk-txqc7543.js → chunk-29zm623f.js} +2 -2
  20. package/bundle/{chunk-wm77svwm.js → chunk-2a9rzgk6.js} +1 -1
  21. package/bundle/chunk-2avxtbv3.js +2 -0
  22. package/bundle/{chunk-eaqfnwdj.js → chunk-2bgqy6z7.js} +1 -1
  23. package/bundle/{chunk-9zre5e54.js → chunk-2hv2c8d5.js} +1 -1
  24. package/bundle/{chunk-swcgsrbj.js → chunk-2jpmxt4v.js} +1 -1
  25. package/bundle/chunk-2qk0k2eb.js +2 -0
  26. package/bundle/{chunk-nsjp44fp.js → chunk-2qwmrp16.js} +1 -1
  27. package/bundle/{chunk-dykqn0nj.js → chunk-2xqqkf86.js} +2 -2
  28. package/bundle/{chunk-mvsrzvc4.js → chunk-3aq70t26.js} +1 -1
  29. package/bundle/{chunk-zfcfyagt.js → chunk-3h49k2ck.js} +1 -1
  30. package/bundle/chunk-3kn57y8d.js +619 -0
  31. package/bundle/chunk-3ktj87g4.js +2 -0
  32. package/bundle/{chunk-52b1v7mn.js → chunk-3qfpw8f6.js} +1 -1
  33. package/bundle/{chunk-v3x5nrc4.js → chunk-3tmq81kq.js} +2 -2
  34. package/bundle/chunk-3wxvpvg4.js +3 -0
  35. package/bundle/{chunk-neqy8j4n.js → chunk-42r7z6sq.js} +1 -1
  36. package/bundle/chunk-42wdfks8.js +2 -0
  37. package/bundle/chunk-4f19vqxf.js +2 -0
  38. package/bundle/{chunk-d93z6hrn.js → chunk-4fk46ngj.js} +1 -1
  39. package/bundle/{chunk-njkserae.js → chunk-4hd3v58j.js} +1 -1
  40. package/bundle/chunk-4jq25vbc.js +2 -0
  41. package/bundle/chunk-4m3k1atq.js +2 -0
  42. package/bundle/{chunk-1wpjmwnh.js → chunk-4mvg7jt1.js} +1 -1
  43. package/bundle/chunk-4n2ytddp.js +2 -0
  44. package/bundle/{chunk-zesbm9k1.js → chunk-4sxg9cgr.js} +1 -1
  45. package/bundle/{chunk-8fgamz4y.js → chunk-4v61ysex.js} +1 -1
  46. package/bundle/chunk-4yg42p6y.js +2 -0
  47. package/bundle/chunk-4zx3ze68.js +2 -0
  48. package/bundle/chunk-57xbwzdn.js +3 -0
  49. package/bundle/{chunk-rexdr63q.js → chunk-5az84brc.js} +2 -2
  50. package/bundle/{chunk-y0ydzdfc.js → chunk-5t0w9ecw.js} +1 -1
  51. package/bundle/{chunk-nq495be3.js → chunk-5wwd40t3.js} +1 -1
  52. package/bundle/chunk-637sjdzq.js +2 -0
  53. package/bundle/{chunk-snt1kefv.js → chunk-64c8q9zg.js} +3 -3
  54. package/bundle/{chunk-g794ey6w.js → chunk-6avjq7my.js} +1 -1
  55. package/bundle/chunk-6bghztra.js +2 -0
  56. package/bundle/{chunk-n0trgp1c.js → chunk-6dfjtzqb.js} +2 -2
  57. package/bundle/chunk-6h8f89tt.js +2 -0
  58. package/bundle/{chunk-b0jh0rby.js → chunk-6j339s7a.js} +2 -2
  59. package/bundle/{chunk-8q6z6emx.js → chunk-6kf4vw2g.js} +1 -1
  60. package/bundle/{chunk-hgsykghj.js → chunk-6pcmv8vs.js} +2 -2
  61. package/bundle/chunk-6sjj203r.js +2 -0
  62. package/bundle/{chunk-pmv8yr8c.js → chunk-6y4mwmn4.js} +1 -1
  63. package/bundle/{chunk-kt0ej3nq.js → chunk-6ypafpg8.js} +1 -1
  64. package/bundle/{chunk-p8kpqyxb.js → chunk-732yr6qq.js} +2 -2
  65. package/bundle/{chunk-3sz6gw10.js → chunk-73fz0cf4.js} +2 -2
  66. package/bundle/chunk-79aka9xe.js +2 -0
  67. package/bundle/{chunk-8tp4whyw.js → chunk-7my2231h.js} +1 -1
  68. package/bundle/{chunk-e03tgfpb.js → chunk-7myg8076.js} +6 -6
  69. package/bundle/{chunk-hbh2034m.js → chunk-7njz51r4.js} +1 -1
  70. package/bundle/chunk-7nqdhe7x.js +2 -0
  71. package/bundle/{chunk-zaan8jk6.js → chunk-7ntw4rrn.js} +1 -1
  72. package/bundle/chunk-7rhry8nv.js +2 -0
  73. package/bundle/chunk-7x88b2n2.js +2 -0
  74. package/bundle/{chunk-983rqajz.js → chunk-7zvawpe1.js} +2 -2
  75. package/bundle/{chunk-jgz1a29w.js → chunk-86jsqc7d.js} +3 -3
  76. package/bundle/{chunk-zbqzm65q.js → chunk-86yk21g4.js} +1 -1
  77. package/bundle/{chunk-w3bmf3zz.js → chunk-8e6gx3gg.js} +1 -1
  78. package/bundle/chunk-8mthftwc.js +2 -0
  79. package/bundle/{chunk-73ckx171.js → chunk-8q5ns61h.js} +1 -1
  80. package/bundle/{chunk-549ptbaj.js → chunk-8rh0femq.js} +1 -1
  81. package/bundle/chunk-8wdara3b.js +2 -0
  82. package/bundle/chunk-8xhzpnph.js +2 -0
  83. package/bundle/{chunk-kqhh2pm9.js → chunk-94qhpkfx.js} +1 -1
  84. package/bundle/{chunk-gxmxx8jb.js → chunk-99148b1k.js} +1 -1
  85. package/bundle/chunk-9akz8w0d.js +2 -0
  86. package/bundle/{chunk-7gbytqkn.js → chunk-9b4aqcde.js} +2 -2
  87. package/bundle/{chunk-tdmn21z0.js → chunk-9ea1n338.js} +2 -2
  88. package/bundle/chunk-9eg2ytjd.js +17 -0
  89. package/bundle/chunk-9etpppyv.js +3 -0
  90. package/bundle/{chunk-vgaxv70x.js → chunk-9jrxrjzt.js} +2 -2
  91. package/bundle/{chunk-3bkdbqjj.js → chunk-9jsgs71h.js} +1 -1
  92. package/bundle/{chunk-xqwvx3qq.js → chunk-9nn4jpb7.js} +1 -1
  93. package/bundle/{chunk-pxx2hz0g.js → chunk-9rxyq6f9.js} +2 -2
  94. package/bundle/chunk-9tk4wsn4.js +2 -0
  95. package/bundle/{chunk-9fkmhmh6.js → chunk-9y15zjxa.js} +1 -1
  96. package/bundle/chunk-a0rjp24v.js +2 -0
  97. package/bundle/{chunk-mdzzcrf9.js → chunk-a2dz9nqh.js} +2 -2
  98. package/bundle/chunk-a7p0x4sw.js +2 -0
  99. package/bundle/{chunk-ev3a2sxv.js → chunk-a92hh67a.js} +2 -2
  100. package/bundle/chunk-ae0a496j.js +2 -0
  101. package/bundle/{chunk-3bnqw3xp.js → chunk-ahyqfbmq.js} +2 -2
  102. package/bundle/chunk-aq1j9y18.js +2 -0
  103. package/bundle/chunk-aq8nz9hp.js +2 -0
  104. package/bundle/{chunk-zxddasg8.js → chunk-as845ya4.js} +1 -1
  105. package/bundle/chunk-b4zy78be.js +2 -0
  106. package/bundle/{chunk-45mjcxqk.js → chunk-b50t4jc5.js} +1 -1
  107. package/bundle/chunk-basjzwqp.js +2 -0
  108. package/bundle/{chunk-d1rn44wz.js → chunk-bbbh69ys.js} +1 -1
  109. package/bundle/{chunk-mw2hr4pd.js → chunk-bcx2vkv4.js} +1 -1
  110. package/bundle/{chunk-72zxassf.js → chunk-bggybm9k.js} +1 -1
  111. package/bundle/{chunk-4gs87ghj.js → chunk-bgng3rdj.js} +2 -2
  112. package/bundle/chunk-bhetpmgq.js +3 -0
  113. package/bundle/{chunk-bnz0mxak.js → chunk-bk3z400e.js} +1 -1
  114. package/bundle/chunk-bm7xpjh6.js +2 -0
  115. package/bundle/{chunk-jw16f6t0.js → chunk-bzs2ep7s.js} +1 -1
  116. package/bundle/{chunk-7fawtcnn.js → chunk-c1g8n10t.js} +1 -1
  117. package/bundle/chunk-c2k556rk.js +2 -0
  118. package/bundle/{chunk-w03fdrxe.js → chunk-cbf1y12x.js} +1 -1
  119. package/bundle/{chunk-vc4e6xc4.js → chunk-cbmwhvxw.js} +2 -2
  120. package/bundle/{chunk-5bate758.js → chunk-cp39f96a.js} +1 -1
  121. package/bundle/{chunk-9nk0ts0s.js → chunk-d307vb2d.js} +1 -1
  122. package/bundle/chunk-d41mg7at.js +2 -0
  123. package/bundle/chunk-d50kpss6.js +2 -0
  124. package/bundle/chunk-day0rb5p.js +2 -0
  125. package/bundle/{chunk-3gw6r3hf.js → chunk-dj3525nn.js} +215 -215
  126. package/bundle/{chunk-b4ysd5b4.js → chunk-dknemkw2.js} +2 -2
  127. package/bundle/chunk-dp7cww4v.js +2 -0
  128. package/bundle/{chunk-yeq7b87a.js → chunk-drwqag0f.js} +1 -1
  129. package/bundle/{chunk-qdcf1ay5.js → chunk-e586sjb0.js} +2 -2
  130. package/bundle/{chunk-qs4wef8c.js → chunk-e6wp96vm.js} +1 -1
  131. package/bundle/{chunk-d0xs3j5h.js → chunk-e89zjjmj.js} +1 -1
  132. package/bundle/chunk-egae7vvg.js +2 -0
  133. package/bundle/chunk-erdjd9w3.js +2 -0
  134. package/bundle/chunk-ex93y6dw.js +2 -0
  135. package/bundle/chunk-eyr0vf92.js +2 -0
  136. package/bundle/{chunk-02xcb52z.js → chunk-ezfzb8qc.js} +2 -2
  137. package/bundle/{chunk-qpd0gab8.js → chunk-f1bcz9yz.js} +1 -1
  138. package/bundle/chunk-f4zfk5ye.js +2 -0
  139. package/bundle/{chunk-rd4x4tsv.js → chunk-f7rj6fck.js} +1 -1
  140. package/bundle/{chunk-4sazy0nq.js → chunk-f83wv08n.js} +1 -1
  141. package/bundle/{chunk-n7xgfm5x.js → chunk-faa0zxey.js} +2 -2
  142. package/bundle/{chunk-3dr4469n.js → chunk-fbm6qczy.js} +1 -1
  143. package/bundle/{chunk-0g25z230.js → chunk-fd7fmvyw.js} +1 -1
  144. package/bundle/chunk-fghqr4x8.js +8 -0
  145. package/bundle/{chunk-bjcb9kt0.js → chunk-fgn83bs7.js} +1 -1
  146. package/bundle/{chunk-dshnn54c.js → chunk-fpm2vgz6.js} +1 -1
  147. package/bundle/chunk-fvkwcx35.js +2 -0
  148. package/bundle/{chunk-w5940jxm.js → chunk-fvy24yhq.js} +1 -1
  149. package/bundle/{chunk-fjm9kstr.js → chunk-fymt1rym.js} +1 -1
  150. package/bundle/{chunk-dt899wbf.js → chunk-g3kd4957.js} +2 -2
  151. package/bundle/{chunk-f36ctnbp.js → chunk-g5cgpvef.js} +2 -2
  152. package/bundle/{chunk-fmxm4kaj.js → chunk-g9end129.js} +1 -1
  153. package/bundle/chunk-gbmmbhy4.js +2 -0
  154. package/bundle/chunk-gp877cq5.js +2 -0
  155. package/bundle/{chunk-tgd5ctnt.js → chunk-gr4bctqj.js} +2 -2
  156. package/bundle/{chunk-dvxk6mr6.js → chunk-grw4gg9j.js} +2 -2
  157. package/bundle/{chunk-mvnxwwe7.js → chunk-gtjn3yc4.js} +2 -2
  158. package/bundle/chunk-hk8vvc10.js +2 -0
  159. package/bundle/{chunk-7dep7g7c.js → chunk-hmznf0ax.js} +1 -1
  160. package/bundle/{chunk-yjp0btmq.js → chunk-hpa7e9va.js} +3 -3
  161. package/bundle/{chunk-hcy77w6t.js → chunk-hq9bgnqb.js} +1 -1
  162. package/bundle/{chunk-gkj4a27z.js → chunk-hrw5rmj1.js} +1 -1
  163. package/bundle/{chunk-n2ygpy76.js → chunk-hs3vfhar.js} +1 -1
  164. package/bundle/chunk-hwavzxdm.js +2 -0
  165. package/bundle/chunk-hwnc2sa5.js +2 -0
  166. package/bundle/chunk-j2gvpa15.js +2 -0
  167. package/bundle/{chunk-te5tfq79.js → chunk-j3jqk62r.js} +1 -1
  168. package/bundle/{chunk-jqn27885.js → chunk-j5ymkhry.js} +1 -1
  169. package/bundle/chunk-j7n8khk7.js +2 -0
  170. package/bundle/{chunk-mqtqcc10.js → chunk-jgtcfw96.js} +2 -2
  171. package/bundle/{chunk-364ccew0.js → chunk-jjjs8p0t.js} +2 -2
  172. package/bundle/chunk-jkh98wby.js +2 -0
  173. package/bundle/{chunk-h7w35n7w.js → chunk-jv4th87b.js} +1 -1
  174. package/bundle/{chunk-j63fkt6n.js → chunk-jvjq554f.js} +1 -1
  175. package/bundle/{chunk-00sr2gwz.js → chunk-jw114bbt.js} +2 -2
  176. package/bundle/{chunk-ax1y4699.js → chunk-jwph7tpc.js} +1 -1
  177. package/bundle/{chunk-xdacgfba.js → chunk-k1gddnkm.js} +1 -1
  178. package/bundle/chunk-k5a652s4.js +2 -0
  179. package/bundle/{chunk-1mcsf4yb.js → chunk-k6cbfrzc.js} +2 -2
  180. package/bundle/chunk-k6w32q2p.js +2 -0
  181. package/bundle/{chunk-sy3n0qhc.js → chunk-kc1xmcc9.js} +141 -135
  182. package/bundle/{chunk-5kmfnkzv.js → chunk-kdcnder5.js} +1 -1
  183. package/bundle/chunk-ke5rqv5b.js +2 -0
  184. package/bundle/chunk-kghwk0yh.js +2 -0
  185. package/bundle/{chunk-r6ndvzd0.js → chunk-km1n4ttr.js} +1 -1
  186. package/bundle/{chunk-htkwc2se.js → chunk-knh01n2r.js} +2 -2
  187. package/bundle/{chunk-ydc6ypjt.js → chunk-ks1cs80p.js} +2 -2
  188. package/bundle/{chunk-08q55ya0.js → chunk-kxjrrdj0.js} +1 -1
  189. package/bundle/{chunk-jts0dma5.js → chunk-kzvvvj79.js} +2 -2
  190. package/bundle/chunk-mgadsp7r.js +2 -0
  191. package/bundle/chunk-mk2s9py8.js +2 -0
  192. package/bundle/{chunk-hb9mc5f9.js → chunk-mpe8zxc0.js} +1 -1
  193. package/bundle/{chunk-yykjvt7f.js → chunk-mswx4k75.js} +2 -2
  194. package/bundle/{chunk-rqmvj7f4.js → chunk-mx3jd1p9.js} +1 -1
  195. package/bundle/{chunk-v8dd6tyn.js → chunk-mxf9p0p9.js} +1 -1
  196. package/bundle/{chunk-std2bgv7.js → chunk-mxhb5adq.js} +2 -2
  197. package/bundle/{chunk-gwfx7tx7.js → chunk-my3cswnp.js} +2 -2
  198. package/bundle/chunk-n0k0pp4k.js +2 -0
  199. package/bundle/chunk-n393nnh5.js +2 -0
  200. package/bundle/chunk-n5vyed7w.js +2 -0
  201. package/bundle/{chunk-jf6ry79j.js → chunk-n7kqdqkh.js} +4 -4
  202. package/bundle/{chunk-tdxbm1nd.js → chunk-n90eh3e7.js} +1 -1
  203. package/bundle/{chunk-ebkztnpf.js → chunk-nb86kh94.js} +217 -217
  204. package/bundle/{chunk-s8mghr5a.js → chunk-ngvp6zc2.js} +2 -2
  205. package/bundle/{chunk-e07dbha4.js → chunk-nh044sjn.js} +1 -1
  206. package/bundle/{chunk-a42q5mx4.js → chunk-nm6wnne9.js} +1 -1
  207. package/bundle/{chunk-mcc5ynma.js → chunk-p4ewy9xh.js} +3 -3
  208. package/bundle/{chunk-cx0j6mpq.js → chunk-p5mes2sh.js} +1 -1
  209. package/bundle/{chunk-vgnddhdj.js → chunk-p635phfw.js} +1 -1
  210. package/bundle/{chunk-dgx4rq86.js → chunk-p887g1xj.js} +1 -1
  211. package/bundle/{chunk-7jhrxzjx.js → chunk-p9mj4zyk.js} +2 -2
  212. package/bundle/chunk-pasm65wq.js +2 -0
  213. package/bundle/chunk-pfh34atn.js +2 -0
  214. package/bundle/{chunk-xdjwapwy.js → chunk-pfkm3j8g.js} +2 -2
  215. package/bundle/chunk-phpmxjf8.js +2 -0
  216. package/bundle/{chunk-9dh9bc9d.js → chunk-pp9neaaz.js} +1 -1
  217. package/bundle/{chunk-c72jajx9.js → chunk-pzefsndd.js} +1 -1
  218. package/bundle/{chunk-dh1h513y.js → chunk-q128vfc6.js} +1 -1
  219. package/bundle/{chunk-5pkg052s.js → chunk-q148vndn.js} +2 -2
  220. package/bundle/{chunk-4fa390yr.js → chunk-q4fn41ex.js} +2 -2
  221. package/bundle/{chunk-zrmx397j.js → chunk-q5abwn50.js} +1 -1
  222. package/bundle/{chunk-cjxcnhmq.js → chunk-q9ft590w.js} +2 -2
  223. package/bundle/{chunk-7vftsy04.js → chunk-qaz100ht.js} +1 -1
  224. package/bundle/{chunk-g5prcvq2.js → chunk-qeg0jnxq.js} +2 -2
  225. package/bundle/{chunk-tabcpx7t.js → chunk-qf1dqzra.js} +2 -2
  226. package/bundle/{chunk-vcrakhgy.js → chunk-qg9bt0kx.js} +2 -2
  227. package/bundle/{chunk-pnq1h5az.js → chunk-qhnpq5gb.js} +2 -2
  228. package/bundle/{chunk-brh35yt5.js → chunk-qkh8697x.js} +2 -2
  229. package/bundle/chunk-qvzvxsjw.js +2 -0
  230. package/bundle/chunk-qzszrd0s.js +2 -0
  231. package/bundle/{chunk-yzwgvjzd.js → chunk-r0s28gnb.js} +1 -1
  232. package/bundle/chunk-r2qns6yc.js +3 -0
  233. package/bundle/{chunk-yj6rbe9p.js → chunk-rcyzqa3g.js} +2 -2
  234. package/bundle/{chunk-70pb4kcm.js → chunk-rdwma0de.js} +2 -2
  235. package/bundle/{chunk-25bp7pcm.js → chunk-rk2bk4s7.js} +2 -2
  236. package/bundle/{chunk-x6rr6ss1.js → chunk-rm5ntsvn.js} +1 -1
  237. package/bundle/chunk-rnq5ezrt.js +2 -0
  238. package/bundle/{chunk-xhbb8b5g.js → chunk-rp8asmq7.js} +1 -1
  239. package/bundle/{chunk-z1rshv6g.js → chunk-rpfhgncs.js} +1 -1
  240. package/bundle/{chunk-cagk1sjd.js → chunk-s0ptrw0z.js} +1 -1
  241. package/bundle/{chunk-yw9pfqxt.js → chunk-s0ty36qg.js} +1 -1
  242. package/bundle/{chunk-5yfzzmv0.js → chunk-s7yza695.js} +1 -1
  243. package/bundle/chunk-s99cvvc9.js +2 -0
  244. package/bundle/chunk-sh76e256.js +3 -0
  245. package/bundle/chunk-skpkjnyy.js +2 -0
  246. package/bundle/{chunk-8r3410c2.js → chunk-skv9ww0s.js} +1 -1
  247. package/bundle/chunk-snt4kwab.js +2 -0
  248. package/bundle/chunk-sq47t8f1.js +2 -0
  249. package/bundle/chunk-sqhgnvvs.js +2 -0
  250. package/bundle/chunk-t114r59h.js +2 -0
  251. package/bundle/chunk-t1f56k0j.js +2 -0
  252. package/bundle/{chunk-9s4whpg1.js → chunk-t1jgx17a.js} +2 -2
  253. package/bundle/chunk-t69jx6fz.js +2 -0
  254. package/bundle/{chunk-srxx88nb.js → chunk-t9zbp2qw.js} +1 -1
  255. package/bundle/{chunk-jcjaw7tk.js → chunk-ta7mfkms.js} +2 -2
  256. package/bundle/{chunk-w1ypf53m.js → chunk-tce12v85.js} +1 -1
  257. package/bundle/{chunk-6sfhbckv.js → chunk-tczbhj0e.js} +2 -2
  258. package/bundle/{chunk-h1kg35mn.js → chunk-tge53d52.js} +1 -1
  259. package/bundle/chunk-tq1dqhes.js +2 -0
  260. package/bundle/chunk-tsb3jsx4.js +2 -0
  261. package/bundle/chunk-ttpbpzbh.js +2 -0
  262. package/bundle/{chunk-2dkrfc1s.js → chunk-v5z6sx6j.js} +1 -1
  263. package/bundle/chunk-v667egp5.js +2 -0
  264. package/bundle/{chunk-37dvnent.js → chunk-v7mg632n.js} +2 -2
  265. package/bundle/{chunk-60qyqqxx.js → chunk-v9rg0a8g.js} +1 -1
  266. package/bundle/{chunk-jngchw38.js → chunk-ve3np791.js} +1 -1
  267. package/bundle/{chunk-wev34grp.js → chunk-vhe92p7a.js} +2 -2
  268. package/bundle/{chunk-132tcp2j.js → chunk-vjx0064q.js} +2 -2
  269. package/bundle/{chunk-atpzz901.js → chunk-vm1ek7yf.js} +1 -1
  270. package/bundle/{chunk-3mepk08v.js → chunk-vqpfpmha.js} +2 -2
  271. package/bundle/{chunk-cdh26622.js → chunk-vqss3e48.js} +2 -2
  272. package/bundle/{chunk-ewpzqnj4.js → chunk-w79jzf8w.js} +1 -1
  273. package/bundle/{chunk-yha554nm.js → chunk-w7em72p8.js} +2 -2
  274. package/bundle/chunk-wcqfr8vr.js +3 -0
  275. package/bundle/{chunk-r58gzg6m.js → chunk-wdaf713t.js} +1 -1
  276. package/bundle/{chunk-ymtcm4xd.js → chunk-wf4x5cjc.js} +1 -1
  277. package/bundle/{chunk-vsys768k.js → chunk-wfggztm4.js} +1 -1
  278. package/bundle/{chunk-p8k48st6.js → chunk-wp3dpt6d.js} +2 -2
  279. package/bundle/{chunk-acyj91wq.js → chunk-x2cavpa9.js} +1 -1
  280. package/bundle/chunk-x3afqfww.js +4 -0
  281. package/bundle/{chunk-qb35hqm4.js → chunk-x4pdpka8.js} +1 -1
  282. package/bundle/{chunk-vm58fkrv.js → chunk-xd3xc1vv.js} +1 -1
  283. package/bundle/{chunk-f77nxt23.js → chunk-xjpvv3vp.js} +2 -2
  284. package/bundle/chunk-xnhvt98g.js +5 -0
  285. package/bundle/{chunk-64s7vfj7.js → chunk-xny5ecn0.js} +2 -2
  286. package/bundle/chunk-xwgc2pw7.js +28 -0
  287. package/bundle/chunk-xxrtr6sd.js +2 -0
  288. package/bundle/chunk-y287zwkr.js +10 -0
  289. package/bundle/{chunk-ezrskm25.js → chunk-y3dfk6n5.js} +1 -1
  290. package/bundle/{chunk-t01bhw5h.js → chunk-y4e7e42x.js} +3 -3
  291. package/bundle/chunk-y8eggnrr.js +2 -0
  292. package/bundle/{chunk-9xvctnjr.js → chunk-yajd975f.js} +1 -1
  293. package/bundle/chunk-yck5h49c.js +2 -0
  294. package/bundle/{chunk-8yr682pv.js → chunk-yd2emszh.js} +2 -2
  295. package/bundle/{chunk-p9zrk16q.js → chunk-yd8bzhv6.js} +1 -1
  296. package/bundle/{chunk-24rw1br0.js → chunk-yerfyz4w.js} +1 -1
  297. package/bundle/{chunk-jxg15t11.js → chunk-yg0pfngv.js} +1 -1
  298. package/bundle/{chunk-y1b2h15z.js → chunk-ypcc3cnb.js} +1 -1
  299. package/bundle/{chunk-w24660y4.js → chunk-yqb6cfed.js} +2 -2
  300. package/bundle/{chunk-shwjjrj8.js → chunk-yr35q7q1.js} +1 -1
  301. package/bundle/{chunk-rcyhqkv5.js → chunk-yrfq22a5.js} +1 -1
  302. package/bundle/{chunk-gg7bg3ek.js → chunk-yvjke593.js} +1 -1
  303. package/bundle/{chunk-zfnbk5gy.js → chunk-ywkvq7zb.js} +1 -1
  304. package/bundle/{chunk-p3rp99na.js → chunk-yx1h0b5v.js} +1 -1
  305. package/bundle/chunk-yxeja9kg.js +2 -0
  306. package/bundle/{chunk-mzbr0m2v.js → chunk-yz0pwv2m.js} +1 -1
  307. package/bundle/{chunk-q81m4m9z.js → chunk-z2h1gxyx.js} +1 -1
  308. package/bundle/{chunk-qqne79vp.js → chunk-zdzxsyxs.js} +2 -2
  309. package/bundle/{chunk-yzh4rmrt.js → chunk-zek5c15t.js} +1 -1
  310. package/bundle/{chunk-8dxdeksr.js → chunk-zfd70p01.js} +1 -1
  311. package/bundle/{chunk-41x11r2s.js → chunk-zqkv8796.js} +1 -1
  312. package/bundle/chunk-ztn2jv26.js +11 -0
  313. package/bundle/index.js +3 -3
  314. package/bundle/parser.worker.js +2 -2
  315. package/bundle/worker.js +1 -1
  316. package/package.json +1 -1
  317. package/bundle/chunk-092bx2yw.js +0 -2
  318. package/bundle/chunk-0j6dhrew.js +0 -2
  319. package/bundle/chunk-0jrgk6vk.js +0 -2
  320. package/bundle/chunk-0qn52zsd.js +0 -2
  321. package/bundle/chunk-10accb7b.js +0 -2
  322. package/bundle/chunk-13kpdfr7.js +0 -2
  323. package/bundle/chunk-15s8zwgf.js +0 -2
  324. package/bundle/chunk-1bx2sjn6.js +0 -11
  325. package/bundle/chunk-1kgyfja6.js +0 -2
  326. package/bundle/chunk-4kqdzdv5.js +0 -3
  327. package/bundle/chunk-4tbqsrsn.js +0 -2
  328. package/bundle/chunk-53kns5wy.js +0 -2
  329. package/bundle/chunk-559ek1ym.js +0 -2
  330. package/bundle/chunk-7cbj28fp.js +0 -2
  331. package/bundle/chunk-8yn64y27.js +0 -2
  332. package/bundle/chunk-8ywa7az5.js +0 -2
  333. package/bundle/chunk-8ywdddts.js +0 -2
  334. package/bundle/chunk-8zmreqxx.js +0 -2
  335. package/bundle/chunk-92zjark4.js +0 -2
  336. package/bundle/chunk-9yakc5yv.js +0 -28
  337. package/bundle/chunk-aq28ejhv.js +0 -2
  338. package/bundle/chunk-b0x888w9.js +0 -2
  339. package/bundle/chunk-b10px5g4.js +0 -2
  340. package/bundle/chunk-b1qhpxee.js +0 -2
  341. package/bundle/chunk-bcs2gvmp.js +0 -2
  342. package/bundle/chunk-bs020a3x.js +0 -2
  343. package/bundle/chunk-d72rty3t.js +0 -2
  344. package/bundle/chunk-dj951pms.js +0 -2
  345. package/bundle/chunk-dp6zktka.js +0 -2
  346. package/bundle/chunk-dvqdtdza.js +0 -2
  347. package/bundle/chunk-dx7h5r8j.js +0 -2
  348. package/bundle/chunk-e88wd9ex.js +0 -2
  349. package/bundle/chunk-ebabnv33.js +0 -3
  350. package/bundle/chunk-ebdpg3cn.js +0 -2
  351. package/bundle/chunk-ec7pznsp.js +0 -2
  352. package/bundle/chunk-et7kz7kx.js +0 -2
  353. package/bundle/chunk-eyc6tb5h.js +0 -2
  354. package/bundle/chunk-eywryd3k.js +0 -2
  355. package/bundle/chunk-eze57bty.js +0 -2
  356. package/bundle/chunk-fa47vzfc.js +0 -2
  357. package/bundle/chunk-fe397ph0.js +0 -2
  358. package/bundle/chunk-fr75ytdr.js +0 -2
  359. package/bundle/chunk-fw2tnbt6.js +0 -2
  360. package/bundle/chunk-fwr2qgqb.js +0 -2
  361. package/bundle/chunk-g204pt98.js +0 -2
  362. package/bundle/chunk-gcgmwqhh.js +0 -2
  363. package/bundle/chunk-gvtjxg0d.js +0 -2
  364. package/bundle/chunk-gw36mrg4.js +0 -2
  365. package/bundle/chunk-h36qec67.js +0 -2
  366. package/bundle/chunk-h9gtymfm.js +0 -2
  367. package/bundle/chunk-h9qn35pn.js +0 -2
  368. package/bundle/chunk-hhjkezfz.js +0 -2
  369. package/bundle/chunk-hnz570f9.js +0 -3
  370. package/bundle/chunk-j21dnncc.js +0 -4
  371. package/bundle/chunk-ja18tvc7.js +0 -2
  372. package/bundle/chunk-jr2q5295.js +0 -3
  373. package/bundle/chunk-kwzawx7r.js +0 -2
  374. package/bundle/chunk-m0mek3es.js +0 -2
  375. package/bundle/chunk-m31d2n6h.js +0 -2
  376. package/bundle/chunk-n14qktbg.js +0 -2
  377. package/bundle/chunk-nr4q9fv7.js +0 -2
  378. package/bundle/chunk-nzzsj54n.js +0 -2
  379. package/bundle/chunk-p19qfw59.js +0 -2
  380. package/bundle/chunk-p2yxj9s4.js +0 -2
  381. package/bundle/chunk-p8czsxp0.js +0 -3
  382. package/bundle/chunk-pq3qwxa8.js +0 -2
  383. package/bundle/chunk-ps9p14y6.js +0 -2
  384. package/bundle/chunk-q7rt76qw.js +0 -10
  385. package/bundle/chunk-qagc6v17.js +0 -2
  386. package/bundle/chunk-qc0zhbhm.js +0 -2
  387. package/bundle/chunk-qp9y0g73.js +0 -3
  388. package/bundle/chunk-r0ewmh6f.js +0 -2
  389. package/bundle/chunk-r3df289z.js +0 -2
  390. package/bundle/chunk-r78kfhvz.js +0 -2
  391. package/bundle/chunk-rebsz3bj.js +0 -2
  392. package/bundle/chunk-rph5xswc.js +0 -2
  393. package/bundle/chunk-schtpyjs.js +0 -2
  394. package/bundle/chunk-t0jjes17.js +0 -2
  395. package/bundle/chunk-t5tfppwv.js +0 -17
  396. package/bundle/chunk-t8rke5fr.js +0 -8
  397. package/bundle/chunk-tf4xwqz7.js +0 -2
  398. package/bundle/chunk-tqazneg6.js +0 -2
  399. package/bundle/chunk-tzg4z74d.js +0 -2
  400. package/bundle/chunk-v8ksjgc3.js +0 -2
  401. package/bundle/chunk-v8vcwx23.js +0 -2
  402. package/bundle/chunk-vdpd4akk.js +0 -5
  403. package/bundle/chunk-vftqwdpg.js +0 -3
  404. package/bundle/chunk-vg41rtdy.js +0 -2
  405. package/bundle/chunk-w57j3pgz.js +0 -616
  406. package/bundle/chunk-w6rf2knb.js +0 -2
  407. package/bundle/chunk-wh7r96t3.js +0 -2
  408. package/bundle/chunk-wnjqaxze.js +0 -2
  409. package/bundle/chunk-xfz698bh.js +0 -2
  410. package/bundle/chunk-xxj3sgd5.js +0 -2
  411. package/bundle/chunk-yfp9y71y.js +0 -2
  412. package/bundle/chunk-yg9c1v8v.js +0 -2
  413. package/bundle/chunk-yjjh339w.js +0 -2
  414. package/bundle/chunk-yt6vd7a5.js +0 -2
  415. package/bundle/chunk-yzq3c3dq.js +0 -2
  416. package/bundle/chunk-z1j25911.js +0 -2
  417. package/bundle/chunk-z29ahthm.js +0 -2
  418. package/bundle/chunk-zgre4gc2.js +0 -2
  419. package/bundle/chunk-zthkjx33.js +0 -2
@@ -1,9 +1,9 @@
1
1
  // @bun
2
- import{Rh as H}from"./chunk-pxx2hz0g.js";import{Yp as k,Zp as X,aq as O,bq as b,cq as F,fq as h,gq as C,rq as T}from"./chunk-e03tgfpb.js";import w from"http";var B="/callback",U=[51737,51738],K=new Set;function _(f){return f.replace(/[&<>\"']/g,(y)=>{switch(y){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";default:return"&#39;"}})}function z(f){return`http://127.0.0.1:${f}${B}`}async function S(f){return new Promise((y,N)=>{let J=w.createServer();J.listen(f,"127.0.0.1",()=>{J.close(()=>y(f))}),J.on("error",N)})}async function E(){for(let f of U){if(K.has(f))continue;K.add(f);try{return await S(f)}catch{K.delete(f)}}throw new X(`Could not bind to any loopback port (tried ${U.join(", ")}). Free one of those ports and retry.`)}function R(f,y,N,J){return new Promise((Q,x)=>{let V=()=>K.delete(f),m=w.createServer(($,Y)=>{try{let Z=new URL($.url??"/",`http://localhost:${f}`);if(Z.pathname!==B){Y.writeHead(404),Y.end();return}let W=Z.searchParams.get("code"),D=Z.searchParams.get("state"),M=Z.searchParams.get("error"),q=Z.searchParams.get("error_description");if(M){let L=`${_(M)}${q?": "+_(q):""}`;Y.writeHead(200,{"Content-Type":"text/html"}),Y.end(`<html><body style="font-family:sans-serif;padding:2rem"><h2>Authorization failed</h2><p>${L}</p><p>You can close this tab.</p></body></html>`),m.close(),x(new X(`Authorization error: ${M}${q?" \u2014 "+q:""}`));return}if(!W||D!==y){Y.writeHead(400),Y.end("Invalid request");return}Y.writeHead(200,{"Content-Type":"text/html"}),Y.end('<html><body style="font-family:sans-serif;padding:2rem"><h2>Signed in! You can close this tab.</h2><p>Return to your terminal to continue.</p></body></html>'),m.close(),Q({code:W})}catch(Z){m.close(),x(Z)}});if(N?.aborted){V(),x(new X("Login cancelled"));return}let G=()=>{V(),m.close(()=>x(new X("Login cancelled")))};if(N?.addEventListener("abort",G,{once:!0}),N?.aborted){G();return}m.listen(f,"127.0.0.1",()=>{V(),J?.()}),m.on("error",($)=>{V(),x($)})})}function I(f,y){return new Promise((N,J)=>{if(y?.aborted){J(new X("Login cancelled"));return}let Q,x=()=>{clearTimeout(Q),y?.removeEventListener("abort",x),J(new X("Login cancelled"))};if(Q=setTimeout(()=>{y?.removeEventListener("abort",x),N()},f),y?.addEventListener("abort",x,{once:!0}),y?.aborted)x()})}function j(f,y=300000){if(!f)return!1;return Date.now()>=f-y}async function A(f){if(f.method==="api-key")return T({});let{issuer:y}=await k();return T({issuer:y,accessToken:f.key})}var d=300000;async function P(){let{issuer:f,clientId:y}=await k(),{verifier:N,challenge:J,state:Q}=O(),x=await E(),V=z(x),m=b({issuer:f,clientId:y,redirectUri:V,challenge:J,state:Q});return{issuer:f,clientId:y,verifier:N,port:x,redirectUri:V,authorizeStr:m,state:Q}}async function p(f){let{issuer:y,clientId:N}=await k(),{deviceCode:J,info:Q,intervalMs:x}=await h({issuer:y,clientId:N,signal:f.signal});if(f.onCode(Q),f.tryOpen){let m=Q.verificationUriComplete??Q.verificationUri;H(m)}let V=x;while(Date.now()<Q.expiresAt){await I(V,f.signal);let m=await C({issuer:y,clientId:N,deviceCode:J,currentIntervalMs:V,signal:f.signal});if(m.kind==="success")return m.profile;V=m.intervalMs}throw new X("The sign-in code expired before it was approved. Try again.")}async function g(){let{issuer:f,clientId:y,verifier:N,port:J,redirectUri:Q,authorizeStr:x,state:V}=await P();process.stdout.write(`
2
+ import{Th as H}from"./chunk-9rxyq6f9.js";import{Bo as k,Co as X,Fo as O,Go as b,Ho as F,Ko as h,Lo as C,Wo as T}from"./chunk-7myg8076.js";import w from"http";var B="/callback",U=[51737,51738],K=new Set;function _(f){return f.replace(/[&<>\"']/g,(y)=>{switch(y){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";default:return"&#39;"}})}function z(f){return`http://127.0.0.1:${f}${B}`}async function S(f){return new Promise((y,N)=>{let J=w.createServer();J.listen(f,"127.0.0.1",()=>{J.close(()=>y(f))}),J.on("error",N)})}async function E(){for(let f of U){if(K.has(f))continue;K.add(f);try{return await S(f)}catch{K.delete(f)}}throw new X(`Could not bind to any loopback port (tried ${U.join(", ")}). Free one of those ports and retry.`)}function R(f,y,N,J){return new Promise((Q,x)=>{let V=()=>K.delete(f),m=w.createServer(($,Y)=>{try{let Z=new URL($.url??"/",`http://localhost:${f}`);if(Z.pathname!==B){Y.writeHead(404),Y.end();return}let W=Z.searchParams.get("code"),D=Z.searchParams.get("state"),M=Z.searchParams.get("error"),q=Z.searchParams.get("error_description");if(M){let L=`${_(M)}${q?": "+_(q):""}`;Y.writeHead(200,{"Content-Type":"text/html"}),Y.end(`<html><body style="font-family:sans-serif;padding:2rem"><h2>Authorization failed</h2><p>${L}</p><p>You can close this tab.</p></body></html>`),m.close(),x(new X(`Authorization error: ${M}${q?" \u2014 "+q:""}`));return}if(!W||D!==y){Y.writeHead(400),Y.end("Invalid request");return}Y.writeHead(200,{"Content-Type":"text/html"}),Y.end('<html><body style="font-family:sans-serif;padding:2rem"><h2>Signed in! You can close this tab.</h2><p>Return to your terminal to continue.</p></body></html>'),m.close(),Q({code:W})}catch(Z){m.close(),x(Z)}});if(N?.aborted){V(),x(new X("Login cancelled"));return}let G=()=>{V(),m.close(()=>x(new X("Login cancelled")))};if(N?.addEventListener("abort",G,{once:!0}),N?.aborted){G();return}m.listen(f,"127.0.0.1",()=>{V(),J?.()}),m.on("error",($)=>{V(),x($)})})}function I(f,y){return new Promise((N,J)=>{if(y?.aborted){J(new X("Login cancelled"));return}let Q,x=()=>{clearTimeout(Q),y?.removeEventListener("abort",x),J(new X("Login cancelled"))};if(Q=setTimeout(()=>{y?.removeEventListener("abort",x),N()},f),y?.addEventListener("abort",x,{once:!0}),y?.aborted)x()})}function j(f,y=300000){if(!f)return!1;return Date.now()>=f-y}async function A(f){if(f.method==="api-key")return T({});let{issuer:y}=await k();return T({issuer:y,accessToken:f.key})}var d=300000;async function P(){let{issuer:f,clientId:y}=await k(),{verifier:N,challenge:J,state:Q}=O(),x=await E(),V=z(x),m=b({issuer:f,clientId:y,redirectUri:V,challenge:J,state:Q});return{issuer:f,clientId:y,verifier:N,port:x,redirectUri:V,authorizeStr:m,state:Q}}async function p(f){let{issuer:y,clientId:N}=await k(),{deviceCode:J,info:Q,intervalMs:x}=await h({issuer:y,clientId:N,signal:f.signal});if(f.onCode(Q),f.tryOpen){let m=Q.verificationUriComplete??Q.verificationUri;H(m)}let V=x;while(Date.now()<Q.expiresAt){await I(V,f.signal);let m=await C({issuer:y,clientId:N,deviceCode:J,currentIntervalMs:V,signal:f.signal});if(m.kind==="success")return m.profile;V=m.intervalMs}throw new X("The sign-in code expired before it was approved. Try again.")}async function g(){let{issuer:f,clientId:y,verifier:N,port:J,redirectUri:Q,authorizeStr:x,state:V}=await P();process.stdout.write(`
3
3
  `),process.stdout.write(` Opening Forgewise sign-in in your browser...
4
4
  `),process.stdout.write(" Sign-in URL: "+x+`
5
5
  `),process.stdout.write(`
6
6
  `),process.stdout.write(` Waiting for the browser to complete sign-in... (ctrl+c to cancel)
7
7
  `);let{code:m}=await R(J,V,void 0,()=>{H(x)});return process.stdout.write(`
8
8
  Exchanging authorization code...
9
- `),F({issuer:f,clientId:y,code:m,redirectUri:Q,verifier:N})}async function v(f={}){if(f.signal?.aborted)throw new X("Login cancelled");let{issuer:y,clientId:N,verifier:J,port:Q,redirectUri:x,authorizeStr:V,state:m}=await P(),G=()=>{if(f.onUrl?.(V),f.tryOpen!==!1)H(V)},$=new AbortController,Y=()=>$.abort();f.signal?.addEventListener("abort",Y,{once:!0});let Z=!1,W=setTimeout(()=>{Z=!0,$.abort()},d);try{let{code:D}=await R(Q,m,$.signal,G);return await F({issuer:y,clientId:N,code:D,redirectUri:x,verifier:J,signal:$.signal})}catch(D){if(Z)throw new X("Sign-in timed out. Run login again to retry.");throw D}finally{clearTimeout(W),f.signal?.removeEventListener("abort",Y)}}export{z as pg,j as qg,A as rg,p as sg,g as tg,v as ug};
9
+ `),F({issuer:f,clientId:y,code:m,redirectUri:Q,verifier:N})}async function v(f={}){if(f.signal?.aborted)throw new X("Login cancelled");let{issuer:y,clientId:N,verifier:J,port:Q,redirectUri:x,authorizeStr:V,state:m}=await P(),G=()=>{if(f.onUrl?.(V),f.tryOpen!==!1)H(V)},$=new AbortController,Y=()=>$.abort();f.signal?.addEventListener("abort",Y,{once:!0});let Z=!1,W=setTimeout(()=>{Z=!0,$.abort()},d);try{let{code:D}=await R(Q,m,$.signal,G);return await F({issuer:y,clientId:N,code:D,redirectUri:x,verifier:J,signal:$.signal})}catch(D){if(Z)throw new X("Sign-in timed out. Run login again to retry.");throw D}finally{clearTimeout(W),f.signal?.removeEventListener("abort",Y)}}export{z as rg,j as sg,A as tg,p as ug,g as vg,v as wg};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{PO as t}from"./chunk-f83wv08n.js";var e=await import("./chunk-9akz8w0d.js",{with:{type:"file"}}),a=e.default;export{a as default};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import"./chunk-4sazy0nq.js";var e={"ui.sessionReview.title":"Cambios de la sesi\xF3n","ui.sessionReview.title.lastTurn":"Cambios del \xFAltimo turno","ui.sessionReview.diffStyle.unified":"Unificado","ui.sessionReview.diffStyle.split":"Dividido","ui.sessionReview.openFile":"Abrir archivo","ui.sessionReview.selection.line":"l\xEDnea {{line}}","ui.sessionReview.selection.lines":"l\xEDneas {{start}}-{{end}}","ui.sessionReview.expandAll":"Expandir todo","ui.sessionReview.collapseAll":"Colapsar todo","ui.sessionReview.change.added":"A\xF1adido","ui.sessionReview.change.removed":"Eliminado","ui.sessionReview.change.modified":"Modificado","ui.sessionReview.image.loading":"Cargando...","ui.sessionReview.image.placeholder":"Imagen","ui.sessionReview.largeDiff.title":"Diff demasiado grande para renderizar","ui.sessionReview.largeDiff.meta":"L\xEDmite: {{limit}} l\xEDneas modificadas. Actual: {{current}} l\xEDneas modificadas.","ui.sessionReview.largeDiff.renderAnyway":"Renderizar de todos modos","ui.fileMedia.kind.image":"imagen","ui.fileMedia.kind.audio":"audio","ui.fileMedia.state.removed":"Archivo de {{kind}} eliminado","ui.fileMedia.state.loading":"Cargando archivo de {{kind}}","ui.fileMedia.state.error":"Error en el archivo de {{kind}}","ui.fileMedia.state.unavailable":"Archivo de {{kind}} no disponible","ui.fileMedia.binary.title":"Archivo binario","ui.fileMedia.binary.description.path":"No se puede mostrar {{path}} porque es un archivo binario.","ui.fileMedia.binary.description.default":"No se puede mostrar este archivo porque es un archivo binario.","ui.lineComment.label.prefix":"Comentar en ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"Comentando en ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"A\xF1adir comentario","ui.lineComment.submit":"Comentar","ui.sessionTurn.steps.show":"Mostrar pasos","ui.sessionTurn.steps.hide":"Ocultar pasos","ui.sessionTurn.summary.response":"Respuesta","ui.sessionTurn.diff.showMore":"Mostrar m\xE1s cambios ({{count}})","ui.sessionTurn.retry.retrying":"reintentando","ui.sessionTurn.retry.inSeconds":"en {{seconds}}s","ui.sessionTurn.retry.attempt":"intento #{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - intento #{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini est\xE1 demasiado saturado","ui.sessionTurn.error.freeUsageExceeded":"L\xEDmite de uso gratuito excedido","ui.sessionTurn.error.addQredits":"A\xF1adir cr\xE9ditos","ui.sessionTurn.status.delegating":"Delegando trabajo","ui.sessionTurn.status.planning":"Planificando siguientes pasos","ui.sessionTurn.status.gatheringContext":"Explorando","ui.sessionTurn.status.gatheredContext":"Explorado","ui.sessionTurn.status.searchingCodebase":"Buscando en la base de c\xF3digo","ui.sessionTurn.status.searchingWeb":"Buscando en la web","ui.sessionTurn.status.makingEdits":"Realizando ediciones","ui.sessionTurn.status.runningCommands":"Ejecutando comandos","ui.sessionTurn.status.thinking":"Pensando","ui.sessionTurn.status.thinkingWithTopic":"Pensando - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"Recopilando pensamientos","ui.sessionTurn.status.consideringNextSteps":"Considerando siguientes pasos","ui.messagePart.questions.dismissed":"Preguntas descartadas","ui.messagePart.compaction":"Sesi\xF3n compactada","ui.messagePart.context.read.one":"{{count}} lectura","ui.messagePart.context.read.other":"{{count}} lecturas","ui.messagePart.context.search.one":"{{count}} b\xFAsqueda","ui.messagePart.context.search.other":"{{count}} b\xFAsquedas","ui.messagePart.context.list.one":"{{count}} lista","ui.messagePart.context.list.other":"{{count}} listas","ui.messagePart.diagnostic.error":"Error","ui.messagePart.title.edit":"Editar","ui.messagePart.title.write":"Escribir","ui.messagePart.option.typeOwnAnswer":"Escribe tu propia respuesta","ui.messagePart.review.title":"Revisa tus respuestas","ui.list.loading":"Cargando","ui.list.empty":"Sin resultados","ui.list.clearFilter":"Borrar filtro","ui.list.emptyWithFilter.prefix":"Sin resultados para","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"Nuevo mensaje","ui.textField.copyToClipboard":"Copiar al portapapeles","ui.textField.copyLink":"Copiar enlace","ui.textField.copied":"Copiado","ui.imagePreview.alt":"Vista previa de imagen","ui.scrollView.ariaLabel":"contenido desplazable","ui.tool.read":"Leer","ui.tool.loaded":"Cargado","ui.tool.list":"Listar","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Webfetch","ui.tool.websearch":"B\xFAsqueda web","ui.tool.codesearch":"B\xFAsqueda de c\xF3digo","ui.tool.shell":"Shell","ui.tool.patch":"Parche","ui.tool.todos":"Tareas","ui.tool.todos.read":"Leer tareas","ui.tool.questions":"Preguntas","ui.tool.agent":"Agente {{type}}","ui.tool.agent.default":"Agente","ui.common.file.one":"archivo","ui.common.file.other":"archivos","ui.common.question.one":"pregunta","ui.common.question.other":"preguntas","ui.common.add":"A\xF1adir","ui.common.back":"Atr\xE1s","ui.common.cancel":"Cancelar","ui.common.confirm":"Confirmar","ui.common.dismiss":"Descartar","ui.common.close":"Cerrar","ui.common.next":"Siguiente","ui.common.submit":"Enviar","ui.permission.deny":"Denegar","ui.permission.allowAlways":"Permitir siempre","ui.permission.allowOnce":"Permitir una vez","ui.message.expand":"Expandir mensaje","ui.message.collapse":"Colapsar mensaje","ui.message.copy":"Copiar","ui.message.copyMessage":"Copiar mensaje","ui.message.forkMessage":"Bifurcar a nueva sesi\xF3n","ui.message.revertMessage":"Restablecer a este punto","ui.message.copyResponse":"Copiar respuesta","ui.message.copied":"\xA1Copiado!","ui.message.interrupted":"Interrumpido","ui.message.queued":"En cola","ui.message.attachment.alt":"adjunto","ui.patch.action.deleted":"Eliminado","ui.patch.action.created":"Creado","ui.patch.action.moved":"Movido","ui.patch.action.patched":"Parcheado","ui.question.subtitle.answered":"{{count}} respondidas","ui.question.answer.none":"(sin respuesta)","ui.question.review.notAnswered":"(no respondida)","ui.question.multiHint":"Selecciona todas las que correspondan","ui.question.singleHint":"Selecciona una respuesta","ui.question.custom.placeholder":"Escribe tu respuesta...","ui.fileSearch.placeholder":"Buscar","ui.fileSearch.previousMatch":"Anterior","ui.fileSearch.nextMatch":"Siguiente","ui.fileSearch.close":"Cerrar b\xFAsqueda","ui.tool.task":"Tarea","ui.tool.skill":"Habilidad","ui.basicTool.called":"Llamado `{{tool}}`","ui.toolErrorCard.failed":"Fall\xF3","ui.toolErrorCard.copyError":"Copiar error","ui.message.duration.seconds":"{{count}}s","ui.message.duration.minutesSeconds":"{{minutes}}m {{seconds}}s"};export{e as dict};
2
+ import"./chunk-f83wv08n.js";var e={"ui.sessionReview.title":"Cambios de la sesi\xF3n","ui.sessionReview.title.lastTurn":"Cambios del \xFAltimo turno","ui.sessionReview.diffStyle.unified":"Unificado","ui.sessionReview.diffStyle.split":"Dividido","ui.sessionReview.openFile":"Abrir archivo","ui.sessionReview.selection.line":"l\xEDnea {{line}}","ui.sessionReview.selection.lines":"l\xEDneas {{start}}-{{end}}","ui.sessionReview.expandAll":"Expandir todo","ui.sessionReview.collapseAll":"Colapsar todo","ui.sessionReview.change.added":"A\xF1adido","ui.sessionReview.change.removed":"Eliminado","ui.sessionReview.change.modified":"Modificado","ui.sessionReview.image.loading":"Cargando...","ui.sessionReview.image.placeholder":"Imagen","ui.sessionReview.largeDiff.title":"Diff demasiado grande para renderizar","ui.sessionReview.largeDiff.meta":"L\xEDmite: {{limit}} l\xEDneas modificadas. Actual: {{current}} l\xEDneas modificadas.","ui.sessionReview.largeDiff.renderAnyway":"Renderizar de todos modos","ui.fileMedia.kind.image":"imagen","ui.fileMedia.kind.audio":"audio","ui.fileMedia.state.removed":"Archivo de {{kind}} eliminado","ui.fileMedia.state.loading":"Cargando archivo de {{kind}}","ui.fileMedia.state.error":"Error en el archivo de {{kind}}","ui.fileMedia.state.unavailable":"Archivo de {{kind}} no disponible","ui.fileMedia.binary.title":"Archivo binario","ui.fileMedia.binary.description.path":"No se puede mostrar {{path}} porque es un archivo binario.","ui.fileMedia.binary.description.default":"No se puede mostrar este archivo porque es un archivo binario.","ui.lineComment.label.prefix":"Comentar en ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"Comentando en ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"A\xF1adir comentario","ui.lineComment.submit":"Comentar","ui.sessionTurn.steps.show":"Mostrar pasos","ui.sessionTurn.steps.hide":"Ocultar pasos","ui.sessionTurn.summary.response":"Respuesta","ui.sessionTurn.diff.showMore":"Mostrar m\xE1s cambios ({{count}})","ui.sessionTurn.retry.retrying":"reintentando","ui.sessionTurn.retry.inSeconds":"en {{seconds}}s","ui.sessionTurn.retry.attempt":"intento #{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - intento #{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini est\xE1 demasiado saturado","ui.sessionTurn.error.freeUsageExceeded":"L\xEDmite de uso gratuito excedido","ui.sessionTurn.error.addQredits":"A\xF1adir cr\xE9ditos","ui.sessionTurn.status.delegating":"Delegando trabajo","ui.sessionTurn.status.planning":"Planificando siguientes pasos","ui.sessionTurn.status.gatheringContext":"Explorando","ui.sessionTurn.status.gatheredContext":"Explorado","ui.sessionTurn.status.searchingCodebase":"Buscando en la base de c\xF3digo","ui.sessionTurn.status.searchingWeb":"Buscando en la web","ui.sessionTurn.status.makingEdits":"Realizando ediciones","ui.sessionTurn.status.runningCommands":"Ejecutando comandos","ui.sessionTurn.status.thinking":"Pensando","ui.sessionTurn.status.thinkingWithTopic":"Pensando - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"Recopilando pensamientos","ui.sessionTurn.status.consideringNextSteps":"Considerando siguientes pasos","ui.messagePart.questions.dismissed":"Preguntas descartadas","ui.messagePart.compaction":"Sesi\xF3n compactada","ui.messagePart.context.read.one":"{{count}} lectura","ui.messagePart.context.read.other":"{{count}} lecturas","ui.messagePart.context.search.one":"{{count}} b\xFAsqueda","ui.messagePart.context.search.other":"{{count}} b\xFAsquedas","ui.messagePart.context.list.one":"{{count}} lista","ui.messagePart.context.list.other":"{{count}} listas","ui.messagePart.diagnostic.error":"Error","ui.messagePart.title.edit":"Editar","ui.messagePart.title.write":"Escribir","ui.messagePart.option.typeOwnAnswer":"Escribe tu propia respuesta","ui.messagePart.review.title":"Revisa tus respuestas","ui.list.loading":"Cargando","ui.list.empty":"Sin resultados","ui.list.clearFilter":"Borrar filtro","ui.list.emptyWithFilter.prefix":"Sin resultados para","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"Nuevo mensaje","ui.textField.copyToClipboard":"Copiar al portapapeles","ui.textField.copyLink":"Copiar enlace","ui.textField.copied":"Copiado","ui.imagePreview.alt":"Vista previa de imagen","ui.scrollView.ariaLabel":"contenido desplazable","ui.tool.read":"Leer","ui.tool.loaded":"Cargado","ui.tool.list":"Listar","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Webfetch","ui.tool.websearch":"B\xFAsqueda web","ui.tool.codesearch":"B\xFAsqueda de c\xF3digo","ui.tool.shell":"Shell","ui.tool.patch":"Parche","ui.tool.todos":"Tareas","ui.tool.todos.read":"Leer tareas","ui.tool.questions":"Preguntas","ui.tool.agent":"Agente {{type}}","ui.tool.agent.default":"Agente","ui.common.file.one":"archivo","ui.common.file.other":"archivos","ui.common.question.one":"pregunta","ui.common.question.other":"preguntas","ui.common.add":"A\xF1adir","ui.common.back":"Atr\xE1s","ui.common.cancel":"Cancelar","ui.common.confirm":"Confirmar","ui.common.dismiss":"Descartar","ui.common.close":"Cerrar","ui.common.next":"Siguiente","ui.common.submit":"Enviar","ui.permission.deny":"Denegar","ui.permission.allowAlways":"Permitir siempre","ui.permission.allowOnce":"Permitir una vez","ui.message.expand":"Expandir mensaje","ui.message.collapse":"Colapsar mensaje","ui.message.copy":"Copiar","ui.message.copyMessage":"Copiar mensaje","ui.message.forkMessage":"Bifurcar a nueva sesi\xF3n","ui.message.revertMessage":"Restablecer a este punto","ui.message.copyResponse":"Copiar respuesta","ui.message.copied":"\xA1Copiado!","ui.message.interrupted":"Interrumpido","ui.message.queued":"En cola","ui.message.attachment.alt":"adjunto","ui.patch.action.deleted":"Eliminado","ui.patch.action.created":"Creado","ui.patch.action.moved":"Movido","ui.patch.action.patched":"Parcheado","ui.question.subtitle.answered":"{{count}} respondidas","ui.question.answer.none":"(sin respuesta)","ui.question.review.notAnswered":"(no respondida)","ui.question.multiHint":"Selecciona todas las que correspondan","ui.question.singleHint":"Selecciona una respuesta","ui.question.custom.placeholder":"Escribe tu respuesta...","ui.fileSearch.placeholder":"Buscar","ui.fileSearch.previousMatch":"Anterior","ui.fileSearch.nextMatch":"Siguiente","ui.fileSearch.close":"Cerrar b\xFAsqueda","ui.tool.task":"Tarea","ui.tool.skill":"Habilidad","ui.basicTool.called":"Llamado `{{tool}}`","ui.toolErrorCard.failed":"Fall\xF3","ui.toolErrorCard.copyError":"Copiar error","ui.message.duration.seconds":"{{count}}s","ui.message.duration.minutesSeconds":"{{minutes}}m {{seconds}}s"};export{e as dict};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{$u as L}from"./chunk-hnz570f9.js";import{$C as C,UI as M,yJ as F}from"./chunk-ydc6ypjt.js";var g=(q)=>(H)=>Object.assign(H,q(H));function k(){return(q,H)=>{class G{static make(J){return J}}return Object.setPrototypeOf(G,H),G}}var y=Symbol.for("effect-zod/override"),A=Symbol.for("effect-zod/preprocess"),B=new WeakMap,N={};function n(q){return V(q.ast)}function V(q){let H=B.get(q);if(H)return H;let G=D(q);return B.set(q,G),G}function D(q){let H=q.annotations?.[y];if(H)return H;let X=q.encoding?.length&&q._tag!=="Declaration"&&!(F.isOptional(q)&&_(q)!==void 0)?I(q):x(q),R=q.checks?.length?E(X,q.checks,q):X,Y=q.annotations?.[A],W=Y?L.preprocess(Y,R):R,U=F.resolveDescription(q),j=F.resolveIdentifier(q),Z=U?W.describe(U):W;return j?Z.meta({ref:j}):Z}function I(q){let H=q.encoding;return H.reduce((G,J)=>G.transform((X)=>P(J.transformation,X)),V(H[0].to))}function P(q,H){let G=M.runSyncExit(q.decode.run(C.some(H),N));if(G._tag==="Failure")throw Error(`effect-zod: transform failed: ${String(G.cause)}`);return C.getOrElse(G.value,()=>H)}function E(q,H,G){let J=[],X=(W)=>{if(W._tag==="FilterGroup")W.checks.forEach(X);else J.push(W)};H.forEach(X);let R=[],Y=J.reduce((W,U)=>{let j=O(W,U);if(j)return j;return R.push(U),W},q);if(R.length===0)return Y;return Y.superRefine((W,U)=>{for(let j of R){let Z=j.run(W,G,N);if(!Z)continue;let Q=b(Z)??j.annotations?.message??"Validation failed";U.addIssue({code:"custom",message:Q})}})}function O(q,H){let G=H.annotations?.meta;if(!G||typeof G._tag!=="string")return;switch(G._tag){case"isInt":return K(q,"int");case"isFinite":return K(q,"finite");case"isGreaterThan":return K(q,"gt",G.exclusiveMinimum);case"isGreaterThanOrEqualTo":return K(q,"gte",G.minimum);case"isLessThan":return K(q,"lt",G.exclusiveMaximum);case"isLessThanOrEqualTo":return K(q,"lte",G.maximum);case"isBetween":{let J=G.exclusiveMinimum?K(q,"gt",G.minimum):K(q,"gte",G.minimum);if(!J)return;return G.exclusiveMaximum?K(J,"lt",G.maximum):K(J,"lte",G.maximum)}case"isMultipleOf":return K(q,"multipleOf",G.divisor);case"isMinLength":return K(q,"min",G.minLength);case"isMaxLength":return K(q,"max",G.maxLength);case"isLengthBetween":{let J=K(q,"min",G.minimum);if(!J)return;return K(J,"max",G.maximum)}case"isPattern":return K(q,"regex",G.regExp);case"isStartsWith":return K(q,"startsWith",G.startsWith);case"isEndsWith":return K(q,"endsWith",G.endsWith);case"isIncludes":return K(q,"includes",G.includes);case"isUUID":return K(q,"uuid");case"isULID":return K(q,"ulid");case"isBase64":return K(q,"base64");case"isBase64Url":return K(q,"base64url")}return}function K(q,H,...G){let J=q[H];return typeof J==="function"?J.apply(q,G):void 0}function b(q){if(typeof q?.annotations?.message==="string")return q.annotations.message;if(typeof q?.message==="string")return q.message;return}function x(q){if(F.isOptional(q))return T(q);switch(q._tag){case"String":return L.string();case"Number":return L.number();case"Boolean":return L.boolean();case"Null":return L.null();case"Undefined":return L.undefined();case"Any":case"Unknown":return L.unknown();case"Never":return L.never();case"Literal":return L.literal(q.literal);case"Union":return v(q);case"Objects":return w(q);case"Arrays":return S(q);case"Declaration":return z(q);default:return $(q)}}function T(q){if(q._tag!=="Union")return $(q);let H=q.types.filter((X)=>X._tag!=="Undefined"),G=H.length===1?V(H[0]):H.length>1?L.union(H.map(V)):L.undefined(),J=_(q);if(J!==void 0)return G.default(J.value);return G.optional()}function _(q){let H=q.encoding;if(!H?.length)return;for(let G of H){let J=M.runSyncExit(G.transformation.decode.run(C.none(),{}));if(J._tag!=="Success")continue;if(C.isSome(J.value))return{value:J.value.value}}return}function v(q){if(q.types.length>=2&&q.types.every((J)=>J._tag==="Literal"&&typeof J.literal==="string"))return L.enum(q.types.map((J)=>J.literal));let H=q.types.map(V);if(H.length===1)return H[0];if(H.length<2)return $(q);let G=q.annotations?.discriminator;if(typeof G==="string")return L.discriminatedUnion(G,H);return L.union(H)}function w(q){if(q.propertySignatures.length===0&&q.indexSignatures.length===1){let G=q.indexSignatures[0];if(G.parameter._tag!=="String")return $(q);return L.record(L.string(),V(G.type))}if(q.indexSignatures.length===0)return L.object(Object.fromEntries(q.propertySignatures.map((G)=>[String(G.name),V(G.type)])));if(q.indexSignatures.length!==1)return $(q);let H=q.indexSignatures[0];if(H.parameter._tag!=="String")return $(q);return L.object(Object.fromEntries(q.propertySignatures.map((G)=>[String(G.name),V(G.type)]))).catchall(V(H.type))}function S(q){if(q.elements.length===0){if(q.rest.length!==1)return $(q);return L.array(V(q.rest[0]))}if(q.rest.length>0)return $(q);let H=q.elements.map(V);return L.tuple(H)}function z(q){if(q.typeParameters.length!==1)return $(q);return V(q.typeParameters[0])}function $(q){let H=F.resolveIdentifier(q);throw Error(`unsupported effect schema: ${H??q._tag}`)}
3
- export{g as wp,k as xp,y as yp,A as zp,n as Ap};
2
+ import{Et as L}from"./chunk-9etpppyv.js";import{EB as C,bI as F,xH as M}from"./chunk-ks1cs80p.js";var g=(q)=>(H)=>Object.assign(H,q(H));function k(){return(q,H)=>{class G{static make(J){return J}}return Object.setPrototypeOf(G,H),G}}var y=Symbol.for("effect-zod/override"),A=Symbol.for("effect-zod/preprocess"),B=new WeakMap,N={};function n(q){return V(q.ast)}function V(q){let H=B.get(q);if(H)return H;let G=D(q);return B.set(q,G),G}function D(q){let H=q.annotations?.[y];if(H)return H;let X=q.encoding?.length&&q._tag!=="Declaration"&&!(F.isOptional(q)&&_(q)!==void 0)?I(q):x(q),R=q.checks?.length?E(X,q.checks,q):X,Y=q.annotations?.[A],W=Y?L.preprocess(Y,R):R,U=F.resolveDescription(q),j=F.resolveIdentifier(q),Z=U?W.describe(U):W;return j?Z.meta({ref:j}):Z}function I(q){let H=q.encoding;return H.reduce((G,J)=>G.transform((X)=>P(J.transformation,X)),V(H[0].to))}function P(q,H){let G=M.runSyncExit(q.decode.run(C.some(H),N));if(G._tag==="Failure")throw Error(`effect-zod: transform failed: ${String(G.cause)}`);return C.getOrElse(G.value,()=>H)}function E(q,H,G){let J=[],X=(W)=>{if(W._tag==="FilterGroup")W.checks.forEach(X);else J.push(W)};H.forEach(X);let R=[],Y=J.reduce((W,U)=>{let j=O(W,U);if(j)return j;return R.push(U),W},q);if(R.length===0)return Y;return Y.superRefine((W,U)=>{for(let j of R){let Z=j.run(W,G,N);if(!Z)continue;let Q=b(Z)??j.annotations?.message??"Validation failed";U.addIssue({code:"custom",message:Q})}})}function O(q,H){let G=H.annotations?.meta;if(!G||typeof G._tag!=="string")return;switch(G._tag){case"isInt":return K(q,"int");case"isFinite":return K(q,"finite");case"isGreaterThan":return K(q,"gt",G.exclusiveMinimum);case"isGreaterThanOrEqualTo":return K(q,"gte",G.minimum);case"isLessThan":return K(q,"lt",G.exclusiveMaximum);case"isLessThanOrEqualTo":return K(q,"lte",G.maximum);case"isBetween":{let J=G.exclusiveMinimum?K(q,"gt",G.minimum):K(q,"gte",G.minimum);if(!J)return;return G.exclusiveMaximum?K(J,"lt",G.maximum):K(J,"lte",G.maximum)}case"isMultipleOf":return K(q,"multipleOf",G.divisor);case"isMinLength":return K(q,"min",G.minLength);case"isMaxLength":return K(q,"max",G.maxLength);case"isLengthBetween":{let J=K(q,"min",G.minimum);if(!J)return;return K(J,"max",G.maximum)}case"isPattern":return K(q,"regex",G.regExp);case"isStartsWith":return K(q,"startsWith",G.startsWith);case"isEndsWith":return K(q,"endsWith",G.endsWith);case"isIncludes":return K(q,"includes",G.includes);case"isUUID":return K(q,"uuid");case"isULID":return K(q,"ulid");case"isBase64":return K(q,"base64");case"isBase64Url":return K(q,"base64url")}return}function K(q,H,...G){let J=q[H];return typeof J==="function"?J.apply(q,G):void 0}function b(q){if(typeof q?.annotations?.message==="string")return q.annotations.message;if(typeof q?.message==="string")return q.message;return}function x(q){if(F.isOptional(q))return T(q);switch(q._tag){case"String":return L.string();case"Number":return L.number();case"Boolean":return L.boolean();case"Null":return L.null();case"Undefined":return L.undefined();case"Any":case"Unknown":return L.unknown();case"Never":return L.never();case"Literal":return L.literal(q.literal);case"Union":return v(q);case"Objects":return w(q);case"Arrays":return S(q);case"Declaration":return z(q);default:return $(q)}}function T(q){if(q._tag!=="Union")return $(q);let H=q.types.filter((X)=>X._tag!=="Undefined"),G=H.length===1?V(H[0]):H.length>1?L.union(H.map(V)):L.undefined(),J=_(q);if(J!==void 0)return G.default(J.value);return G.optional()}function _(q){let H=q.encoding;if(!H?.length)return;for(let G of H){let J=M.runSyncExit(G.transformation.decode.run(C.none(),{}));if(J._tag!=="Success")continue;if(C.isSome(J.value))return{value:J.value.value}}return}function v(q){if(q.types.length>=2&&q.types.every((J)=>J._tag==="Literal"&&typeof J.literal==="string"))return L.enum(q.types.map((J)=>J.literal));let H=q.types.map(V);if(H.length===1)return H[0];if(H.length<2)return $(q);let G=q.annotations?.discriminator;if(typeof G==="string")return L.discriminatedUnion(G,H);return L.union(H)}function w(q){if(q.propertySignatures.length===0&&q.indexSignatures.length===1){let G=q.indexSignatures[0];if(G.parameter._tag!=="String")return $(q);return L.record(L.string(),V(G.type))}if(q.indexSignatures.length===0)return L.object(Object.fromEntries(q.propertySignatures.map((G)=>[String(G.name),V(G.type)])));if(q.indexSignatures.length!==1)return $(q);let H=q.indexSignatures[0];if(H.parameter._tag!=="String")return $(q);return L.object(Object.fromEntries(q.propertySignatures.map((G)=>[String(G.name),V(G.type)]))).catchall(V(H.type))}function S(q){if(q.elements.length===0){if(q.rest.length!==1)return $(q);return L.array(V(q.rest[0]))}if(q.rest.length>0)return $(q);let H=q.elements.map(V);return L.tuple(H)}function z(q){if(q.typeParameters.length!==1)return $(q);return V(q.typeParameters[0])}function $(q){let H=F.resolveIdentifier(q);throw Error(`unsupported effect schema: ${H??q._tag}`)}
3
+ export{g as $n,k as ao,y as bo,A as co,n as do};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import"./chunk-4sazy0nq.js";var e={"ui.sessionReview.title":"Modifications de la session","ui.sessionReview.title.lastTurn":"Modifications du dernier tour","ui.sessionReview.diffStyle.unified":"Unifi\xE9","ui.sessionReview.diffStyle.split":"Divis\xE9","ui.sessionReview.openFile":"Ouvrir le fichier","ui.sessionReview.selection.line":"ligne {{line}}","ui.sessionReview.selection.lines":"lignes {{start}}-{{end}}","ui.sessionReview.expandAll":"Tout d\xE9velopper","ui.sessionReview.collapseAll":"Tout r\xE9duire","ui.sessionReview.change.added":"Ajout\xE9","ui.sessionReview.change.removed":"Supprim\xE9","ui.sessionReview.change.modified":"Modifi\xE9","ui.sessionReview.image.loading":"Chargement...","ui.sessionReview.image.placeholder":"Image","ui.sessionReview.largeDiff.title":"Diff trop volumineux pour \xEAtre affich\xE9","ui.sessionReview.largeDiff.meta":"Limite : {{limit}} lignes modifi\xE9es. Actuel : {{current}} lignes modifi\xE9es.","ui.sessionReview.largeDiff.renderAnyway":"Afficher quand m\xEAme","ui.fileMedia.kind.image":"image","ui.fileMedia.kind.audio":"audio","ui.fileMedia.state.removed":"Fichier {{kind}} supprim\xE9","ui.fileMedia.state.loading":"Chargement du fichier {{kind}}","ui.fileMedia.state.error":"Erreur avec le fichier {{kind}}","ui.fileMedia.state.unavailable":"Fichier {{kind}} indisponible","ui.fileMedia.binary.title":"Fichier binaire","ui.fileMedia.binary.description.path":"Impossible d'afficher {{path}} car il s'agit d'un fichier binaire.","ui.fileMedia.binary.description.default":"Impossible d'afficher ce fichier car il s'agit d'un fichier binaire.","ui.lineComment.label.prefix":"Commenter sur ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"Commentaire sur ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"Ajouter un commentaire","ui.lineComment.submit":"Commenter","ui.sessionTurn.steps.show":"Afficher les \xE9tapes","ui.sessionTurn.steps.hide":"Masquer les \xE9tapes","ui.sessionTurn.summary.response":"R\xE9ponse","ui.sessionTurn.diff.showMore":"Afficher plus de modifications ({{count}})","ui.sessionTurn.retry.retrying":"nouvelle tentative","ui.sessionTurn.retry.inSeconds":"dans {{seconds}}s","ui.sessionTurn.retry.attempt":"tentative n\xB0{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - tentative n\xB0{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini est en surchauffe","ui.sessionTurn.error.freeUsageExceeded":"Limite d'utilisation gratuite d\xE9pass\xE9e","ui.sessionTurn.error.addQredits":"Ajouter des cr\xE9dits","ui.sessionTurn.status.delegating":"D\xE9l\xE9gation du travail","ui.sessionTurn.status.planning":"Planification des prochaines \xE9tapes","ui.sessionTurn.status.gatheringContext":"Exploration","ui.sessionTurn.status.gatheredContext":"Explor\xE9","ui.sessionTurn.status.searchingCodebase":"Recherche dans la base de code","ui.sessionTurn.status.searchingWeb":"Recherche sur le web","ui.sessionTurn.status.makingEdits":"Application des modifications","ui.sessionTurn.status.runningCommands":"Ex\xE9cution des commandes","ui.sessionTurn.status.thinking":"R\xE9flexion","ui.sessionTurn.status.thinkingWithTopic":"R\xE9flexion - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"Rassemblement des id\xE9es","ui.sessionTurn.status.consideringNextSteps":"Examen des prochaines \xE9tapes","ui.messagePart.questions.dismissed":"Questions ignor\xE9es","ui.messagePart.compaction":"Session compact\xE9e","ui.messagePart.context.read.one":"{{count}} lecture","ui.messagePart.context.read.other":"{{count}} lectures","ui.messagePart.context.search.one":"{{count}} recherche","ui.messagePart.context.search.other":"{{count}} recherches","ui.messagePart.context.list.one":"{{count}} liste","ui.messagePart.context.list.other":"{{count}} listes","ui.messagePart.diagnostic.error":"Erreur","ui.messagePart.title.edit":"Modifier","ui.messagePart.title.write":"\xC9crire","ui.messagePart.option.typeOwnAnswer":"Tapez votre propre r\xE9ponse","ui.messagePart.review.title":"Passez en revue vos r\xE9ponses","ui.list.loading":"Chargement","ui.list.empty":"Aucun r\xE9sultat","ui.list.clearFilter":"Effacer le filtre","ui.list.emptyWithFilter.prefix":"Aucun r\xE9sultat pour","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"Nouveau message","ui.textField.copyToClipboard":"Copier dans le presse-papiers","ui.textField.copyLink":"Copier le lien","ui.textField.copied":"Copi\xE9","ui.imagePreview.alt":"Aper\xE7u de l'image","ui.scrollView.ariaLabel":"contenu d\xE9filable","ui.tool.read":"Lire","ui.tool.loaded":"Charg\xE9","ui.tool.list":"Lister","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Webfetch","ui.tool.websearch":"Recherche Web","ui.tool.codesearch":"Recherche de code","ui.tool.shell":"Shell","ui.tool.patch":"Patch","ui.tool.todos":"T\xE2ches","ui.tool.todos.read":"Lire les t\xE2ches","ui.tool.questions":"Questions","ui.tool.agent":"Agent {{type}}","ui.tool.agent.default":"Agent","ui.common.file.one":"fichier","ui.common.file.other":"fichiers","ui.common.question.one":"question","ui.common.question.other":"questions","ui.common.add":"Ajouter","ui.common.back":"Retour","ui.common.cancel":"Annuler","ui.common.confirm":"Confirmer","ui.common.dismiss":"Ignorer","ui.common.close":"Fermer","ui.common.next":"Suivant","ui.common.submit":"Soumettre","ui.permission.deny":"Refuser","ui.permission.allowAlways":"Toujours autoriser","ui.permission.allowOnce":"Autoriser une fois","ui.message.expand":"D\xE9velopper le message","ui.message.collapse":"R\xE9duire le message","ui.message.copy":"Copier","ui.message.copyMessage":"Copier le message","ui.message.forkMessage":"Bifurquer vers une nouvelle session","ui.message.revertMessage":"R\xE9initialiser \xE0 ce point","ui.message.copyResponse":"Copier la r\xE9ponse","ui.message.copied":"Copi\xE9 !","ui.message.interrupted":"Interrompu","ui.message.queued":"En file","ui.message.attachment.alt":"pi\xE8ce jointe","ui.patch.action.deleted":"Supprim\xE9","ui.patch.action.created":"Cr\xE9\xE9","ui.patch.action.moved":"D\xE9plac\xE9","ui.patch.action.patched":"Corrig\xE9","ui.question.subtitle.answered":"{{count}} r\xE9pondu(s)","ui.question.answer.none":"(pas de r\xE9ponse)","ui.question.review.notAnswered":"(non r\xE9pondu)","ui.question.multiHint":"S\xE9lectionnez tout ce qui s'applique","ui.question.singleHint":"S\xE9lectionnez une r\xE9ponse","ui.question.custom.placeholder":"Tapez votre r\xE9ponse...","ui.fileSearch.placeholder":"Rechercher","ui.fileSearch.previousMatch":"Pr\xE9c\xE9dent","ui.fileSearch.nextMatch":"Suivant","ui.fileSearch.close":"Fermer la recherche","ui.tool.task":"T\xE2che","ui.tool.skill":"Comp\xE9tence","ui.basicTool.called":"Appel\xE9 `{{tool}}`","ui.toolErrorCard.failed":"\xC9chou\xE9","ui.toolErrorCard.copyError":"Copier l'erreur","ui.message.duration.seconds":"{{count}}s","ui.message.duration.minutesSeconds":"{{minutes}}m {{seconds}}s"};export{e as dict};
2
+ import"./chunk-f83wv08n.js";var e={"ui.sessionReview.title":"Modifications de la session","ui.sessionReview.title.lastTurn":"Modifications du dernier tour","ui.sessionReview.diffStyle.unified":"Unifi\xE9","ui.sessionReview.diffStyle.split":"Divis\xE9","ui.sessionReview.openFile":"Ouvrir le fichier","ui.sessionReview.selection.line":"ligne {{line}}","ui.sessionReview.selection.lines":"lignes {{start}}-{{end}}","ui.sessionReview.expandAll":"Tout d\xE9velopper","ui.sessionReview.collapseAll":"Tout r\xE9duire","ui.sessionReview.change.added":"Ajout\xE9","ui.sessionReview.change.removed":"Supprim\xE9","ui.sessionReview.change.modified":"Modifi\xE9","ui.sessionReview.image.loading":"Chargement...","ui.sessionReview.image.placeholder":"Image","ui.sessionReview.largeDiff.title":"Diff trop volumineux pour \xEAtre affich\xE9","ui.sessionReview.largeDiff.meta":"Limite : {{limit}} lignes modifi\xE9es. Actuel : {{current}} lignes modifi\xE9es.","ui.sessionReview.largeDiff.renderAnyway":"Afficher quand m\xEAme","ui.fileMedia.kind.image":"image","ui.fileMedia.kind.audio":"audio","ui.fileMedia.state.removed":"Fichier {{kind}} supprim\xE9","ui.fileMedia.state.loading":"Chargement du fichier {{kind}}","ui.fileMedia.state.error":"Erreur avec le fichier {{kind}}","ui.fileMedia.state.unavailable":"Fichier {{kind}} indisponible","ui.fileMedia.binary.title":"Fichier binaire","ui.fileMedia.binary.description.path":"Impossible d'afficher {{path}} car il s'agit d'un fichier binaire.","ui.fileMedia.binary.description.default":"Impossible d'afficher ce fichier car il s'agit d'un fichier binaire.","ui.lineComment.label.prefix":"Commenter sur ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"Commentaire sur ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"Ajouter un commentaire","ui.lineComment.submit":"Commenter","ui.sessionTurn.steps.show":"Afficher les \xE9tapes","ui.sessionTurn.steps.hide":"Masquer les \xE9tapes","ui.sessionTurn.summary.response":"R\xE9ponse","ui.sessionTurn.diff.showMore":"Afficher plus de modifications ({{count}})","ui.sessionTurn.retry.retrying":"nouvelle tentative","ui.sessionTurn.retry.inSeconds":"dans {{seconds}}s","ui.sessionTurn.retry.attempt":"tentative n\xB0{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - tentative n\xB0{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini est en surchauffe","ui.sessionTurn.error.freeUsageExceeded":"Limite d'utilisation gratuite d\xE9pass\xE9e","ui.sessionTurn.error.addQredits":"Ajouter des cr\xE9dits","ui.sessionTurn.status.delegating":"D\xE9l\xE9gation du travail","ui.sessionTurn.status.planning":"Planification des prochaines \xE9tapes","ui.sessionTurn.status.gatheringContext":"Exploration","ui.sessionTurn.status.gatheredContext":"Explor\xE9","ui.sessionTurn.status.searchingCodebase":"Recherche dans la base de code","ui.sessionTurn.status.searchingWeb":"Recherche sur le web","ui.sessionTurn.status.makingEdits":"Application des modifications","ui.sessionTurn.status.runningCommands":"Ex\xE9cution des commandes","ui.sessionTurn.status.thinking":"R\xE9flexion","ui.sessionTurn.status.thinkingWithTopic":"R\xE9flexion - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"Rassemblement des id\xE9es","ui.sessionTurn.status.consideringNextSteps":"Examen des prochaines \xE9tapes","ui.messagePart.questions.dismissed":"Questions ignor\xE9es","ui.messagePart.compaction":"Session compact\xE9e","ui.messagePart.context.read.one":"{{count}} lecture","ui.messagePart.context.read.other":"{{count}} lectures","ui.messagePart.context.search.one":"{{count}} recherche","ui.messagePart.context.search.other":"{{count}} recherches","ui.messagePart.context.list.one":"{{count}} liste","ui.messagePart.context.list.other":"{{count}} listes","ui.messagePart.diagnostic.error":"Erreur","ui.messagePart.title.edit":"Modifier","ui.messagePart.title.write":"\xC9crire","ui.messagePart.option.typeOwnAnswer":"Tapez votre propre r\xE9ponse","ui.messagePart.review.title":"Passez en revue vos r\xE9ponses","ui.list.loading":"Chargement","ui.list.empty":"Aucun r\xE9sultat","ui.list.clearFilter":"Effacer le filtre","ui.list.emptyWithFilter.prefix":"Aucun r\xE9sultat pour","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"Nouveau message","ui.textField.copyToClipboard":"Copier dans le presse-papiers","ui.textField.copyLink":"Copier le lien","ui.textField.copied":"Copi\xE9","ui.imagePreview.alt":"Aper\xE7u de l'image","ui.scrollView.ariaLabel":"contenu d\xE9filable","ui.tool.read":"Lire","ui.tool.loaded":"Charg\xE9","ui.tool.list":"Lister","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Webfetch","ui.tool.websearch":"Recherche Web","ui.tool.codesearch":"Recherche de code","ui.tool.shell":"Shell","ui.tool.patch":"Patch","ui.tool.todos":"T\xE2ches","ui.tool.todos.read":"Lire les t\xE2ches","ui.tool.questions":"Questions","ui.tool.agent":"Agent {{type}}","ui.tool.agent.default":"Agent","ui.common.file.one":"fichier","ui.common.file.other":"fichiers","ui.common.question.one":"question","ui.common.question.other":"questions","ui.common.add":"Ajouter","ui.common.back":"Retour","ui.common.cancel":"Annuler","ui.common.confirm":"Confirmer","ui.common.dismiss":"Ignorer","ui.common.close":"Fermer","ui.common.next":"Suivant","ui.common.submit":"Soumettre","ui.permission.deny":"Refuser","ui.permission.allowAlways":"Toujours autoriser","ui.permission.allowOnce":"Autoriser une fois","ui.message.expand":"D\xE9velopper le message","ui.message.collapse":"R\xE9duire le message","ui.message.copy":"Copier","ui.message.copyMessage":"Copier le message","ui.message.forkMessage":"Bifurquer vers une nouvelle session","ui.message.revertMessage":"R\xE9initialiser \xE0 ce point","ui.message.copyResponse":"Copier la r\xE9ponse","ui.message.copied":"Copi\xE9 !","ui.message.interrupted":"Interrompu","ui.message.queued":"En file","ui.message.attachment.alt":"pi\xE8ce jointe","ui.patch.action.deleted":"Supprim\xE9","ui.patch.action.created":"Cr\xE9\xE9","ui.patch.action.moved":"D\xE9plac\xE9","ui.patch.action.patched":"Corrig\xE9","ui.question.subtitle.answered":"{{count}} r\xE9pondu(s)","ui.question.answer.none":"(pas de r\xE9ponse)","ui.question.review.notAnswered":"(non r\xE9pondu)","ui.question.multiHint":"S\xE9lectionnez tout ce qui s'applique","ui.question.singleHint":"S\xE9lectionnez une r\xE9ponse","ui.question.custom.placeholder":"Tapez votre r\xE9ponse...","ui.fileSearch.placeholder":"Rechercher","ui.fileSearch.previousMatch":"Pr\xE9c\xE9dent","ui.fileSearch.nextMatch":"Suivant","ui.fileSearch.close":"Fermer la recherche","ui.tool.task":"T\xE2che","ui.tool.skill":"Comp\xE9tence","ui.basicTool.called":"Appel\xE9 `{{tool}}`","ui.toolErrorCard.failed":"\xC9chou\xE9","ui.toolErrorCard.copyError":"Copier l'erreur","ui.message.duration.seconds":"{{count}}s","ui.message.duration.minutesSeconds":"{{minutes}}m {{seconds}}s"};export{e as dict};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Cd as j}from"./chunk-37dvnent.js";import{Pd as Q}from"./chunk-9xvctnjr.js";import{Sf as M}from"./chunk-9s4whpg1.js";import{lg as N}from"./chunk-htkwc2se.js";import{Xg as $}from"./chunk-w57j3pgz.js";import"./chunk-ebkztnpf.js";import"./chunk-pxx2hz0g.js";import"./chunk-rexdr63q.js";import"./chunk-kqhh2pm9.js";import"./chunk-7fawtcnn.js";import"./chunk-mdzzcrf9.js";import"./chunk-wev34grp.js";import{$j as J,rl as X}from"./chunk-sy3n0qhc.js";import"./chunk-364ccew0.js";import"./chunk-vdpd4akk.js";import"./chunk-yjp0btmq.js";import"./chunk-1bx2sjn6.js";import"./chunk-g5prcvq2.js";import"./chunk-t5tfppwv.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import{Cp as _}from"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import"./chunk-e03tgfpb.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-w9pdvcf9.js";import"./chunk-4gs87ghj.js";import"./chunk-brh35yt5.js";import"./chunk-vcrakhgy.js";import"./chunk-xdjwapwy.js";import{qt as Z}from"./chunk-7dep7g7c.js";import{zt as E}from"./chunk-tabcpx7t.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-3sz6gw10.js";import"./chunk-xqwvx3qq.js";import"./chunk-qp9y0g73.js";import"./chunk-xyjehgzm.js";import{Bu as Y}from"./chunk-j21dnncc.js";import{Vu as V}from"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-ev3a2sxv.js";import"./chunk-pnq1h5az.js";import"./chunk-4sazy0nq.js";import{EOL as L}from"os";import k from"path";function P(){let q=["-R","-S"];if(process.platform!=="win32")return["less",...q];let z=_("less");if(z){if(V.stat(z)?.size)return[z,...q]}if(Y.QITQODE_GIT_BASH_PATH){let G=k.join(Y.QITQODE_GIT_BASH_PATH,"..","..","usr","bin","less.exe");if(V.stat(G)?.size)return[G,...q]}let B=_("git");if(B){let G=k.join(B,"..","..","usr","bin","less.exe");if(V.stat(G)?.size)return[G,...q]}return["cmd","/c","more"]}var g=Q({command:"session",describe:"manage sessions",builder:(q)=>q.command(T).command(D).command(v).demandCommand(),async handler(){}}),v=Q({command:"import-claude",describe:"import Claude Code sessions (~/.claude/projects) into qitqode",builder:(q)=>q.option("force",{describe:"re-sync every session, ignoring the mtime cache",type:"boolean",default:!1}),handler:async(q)=>{let z=await N.run({force:q.force});M.println(`Claude import: scanned ${z.scanned}, imported ${z.imported}, resynced ${z.resynced}, skipped ${z.skipped}`+(z.errors.length?`, errors ${z.errors.length}`:""));for(let B of z.errors)M.error(B)}}),D=Q({command:"delete <sessionID>",describe:"delete a session",builder:(q)=>{return q.positional("sessionID",{describe:"session ID to delete",type:"string",demandOption:!0})},handler:async(q)=>{await j(process.cwd(),async()=>{let z=J.make(q.sessionID);try{await $.runPromise(X.Service.use((B)=>B.get(z)))}catch{M.error(`Session not found: ${q.sessionID}`),process.exit(1)}await $.runPromise(X.Service.use((B)=>B.remove(z))),M.println(M.Style.TEXT_SUCCESS_BOLD+`Session ${q.sessionID} deleted`+M.Style.TEXT_NORMAL)})}}),T=Q({command:"list",describe:"list sessions",builder:(q)=>{return q.option("max-count",{alias:"n",describe:"limit to N most recent sessions",type:"number"}).option("format",{describe:"output format",type:"string",choices:["table","json"],default:"table"})},handler:async(q)=>{await j(process.cwd(),async()=>{let z=[...X.list({roots:!0,limit:q.maxCount})];if(z.length===0)return;let B;if(q.format==="json")B=f(z);else B=b(z);if(process.stdout.isTTY&&!q.maxCount&&q.format==="table"){let H=E.spawn(P(),{stdin:"pipe",stdout:"inherit",stderr:"inherit"});if(!H.stdin){console.log(B);return}H.stdin.write(B),H.stdin.end(),await H.exited}else console.log(B)})}});function b(q){let z=[],B=Math.max(20,...q.map((K)=>K.id.length)),G=Math.max(25,...q.map((K)=>K.title.length)),H=`Session ID${" ".repeat(B-10)} Title${" ".repeat(G-5)} Updated`;z.push(H),z.push("\u2500".repeat(H.length));for(let K of q){let A=Z.truncate(K.title,G),R=Z.todayTimeOrDateTime(K.time.updated),w=`${K.id.padEnd(B)} ${A.padEnd(G)} ${R}`;z.push(w)}return z.join(L)}function f(q){let z=q.map((B)=>({id:B.id,title:B.title,updated:B.time.updated,created:B.time.created,projectId:B.projectID,directory:B.directory}));return JSON.stringify(z,null,2)}export{T as SessionListCommand,v as SessionImportClaudeCommand,D as SessionDeleteCommand,g as SessionCommand};
2
+ import{Ed as j}from"./chunk-v7mg632n.js";import{Rd as Q}from"./chunk-yajd975f.js";import{Uf as M}from"./chunk-t1jgx17a.js";import{ng as N}from"./chunk-knh01n2r.js";import{Zg as $}from"./chunk-3kn57y8d.js";import"./chunk-nb86kh94.js";import"./chunk-9rxyq6f9.js";import"./chunk-5az84brc.js";import"./chunk-94qhpkfx.js";import"./chunk-c1g8n10t.js";import"./chunk-a2dz9nqh.js";import"./chunk-vhe92p7a.js";import{bk as J,tl as X}from"./chunk-kc1xmcc9.js";import"./chunk-jjjs8p0t.js";import"./chunk-xnhvt98g.js";import"./chunk-hpa7e9va.js";import"./chunk-y287zwkr.js";import"./chunk-qeg0jnxq.js";import"./chunk-9eg2ytjd.js";import"./chunk-rk2bk4s7.js";import"./chunk-e586sjb0.js";import"./chunk-b50t4jc5.js";import{fo as _}from"./chunk-zdzxsyxs.js";import"./chunk-xny5ecn0.js";import"./chunk-7myg8076.js";import"./chunk-my3cswnp.js";import"./chunk-4mvg7jt1.js";import"./chunk-cqtkxwd8.js";import"./chunk-wf4x5cjc.js";import"./chunk-mswx4k75.js";import"./chunk-vqpfpmha.js";import"./chunk-vm1ek7yf.js";import"./chunk-fd7fmvyw.js";import"./chunk-1sfcxdbw.js";import"./chunk-bgng3rdj.js";import"./chunk-qkh8697x.js";import"./chunk-qg9bt0kx.js";import"./chunk-pfkm3j8g.js";import{Vr as Z}from"./chunk-hmznf0ax.js";import{cs as E}from"./chunk-qf1dqzra.js";import"./chunk-03mbn7nj.js";import"./chunk-gr4bctqj.js";import"./chunk-732yr6qq.js";import"./chunk-73fz0cf4.js";import"./chunk-9nn4jpb7.js";import"./chunk-sh76e256.js";import"./chunk-0z1cxvk1.js";import{et as Y}from"./chunk-x3afqfww.js";import{yt as V}from"./chunk-cbmwhvxw.js";import"./chunk-9etpppyv.js";import"./chunk-9ea1n338.js";import"./chunk-ngvp6zc2.js";import"./chunk-1p6jjrea.js";import"./chunk-ks1cs80p.js";import"./chunk-a92hh67a.js";import"./chunk-qhnpq5gb.js";import"./chunk-f83wv08n.js";import{EOL as L}from"os";import k from"path";function P(){let q=["-R","-S"];if(process.platform!=="win32")return["less",...q];let z=_("less");if(z){if(V.stat(z)?.size)return[z,...q]}if(Y.QITQODE_GIT_BASH_PATH){let G=k.join(Y.QITQODE_GIT_BASH_PATH,"..","..","usr","bin","less.exe");if(V.stat(G)?.size)return[G,...q]}let B=_("git");if(B){let G=k.join(B,"..","..","usr","bin","less.exe");if(V.stat(G)?.size)return[G,...q]}return["cmd","/c","more"]}var g=Q({command:"session",describe:"manage sessions",builder:(q)=>q.command(T).command(D).command(v).demandCommand(),async handler(){}}),v=Q({command:"import-claude",describe:"import Claude Code sessions (~/.claude/projects) into qitqode",builder:(q)=>q.option("force",{describe:"re-sync every session, ignoring the mtime cache",type:"boolean",default:!1}),handler:async(q)=>{let z=await N.run({force:q.force});M.println(`Claude import: scanned ${z.scanned}, imported ${z.imported}, resynced ${z.resynced}, skipped ${z.skipped}`+(z.errors.length?`, errors ${z.errors.length}`:""));for(let B of z.errors)M.error(B)}}),D=Q({command:"delete <sessionID>",describe:"delete a session",builder:(q)=>{return q.positional("sessionID",{describe:"session ID to delete",type:"string",demandOption:!0})},handler:async(q)=>{await j(process.cwd(),async()=>{let z=J.make(q.sessionID);try{await $.runPromise(X.Service.use((B)=>B.get(z)))}catch{M.error(`Session not found: ${q.sessionID}`),process.exit(1)}await $.runPromise(X.Service.use((B)=>B.remove(z))),M.println(M.Style.TEXT_SUCCESS_BOLD+`Session ${q.sessionID} deleted`+M.Style.TEXT_NORMAL)})}}),T=Q({command:"list",describe:"list sessions",builder:(q)=>{return q.option("max-count",{alias:"n",describe:"limit to N most recent sessions",type:"number"}).option("format",{describe:"output format",type:"string",choices:["table","json"],default:"table"})},handler:async(q)=>{await j(process.cwd(),async()=>{let z=[...X.list({roots:!0,limit:q.maxCount})];if(z.length===0)return;let B;if(q.format==="json")B=f(z);else B=b(z);if(process.stdout.isTTY&&!q.maxCount&&q.format==="table"){let H=E.spawn(P(),{stdin:"pipe",stdout:"inherit",stderr:"inherit"});if(!H.stdin){console.log(B);return}H.stdin.write(B),H.stdin.end(),await H.exited}else console.log(B)})}});function b(q){let z=[],B=Math.max(20,...q.map((K)=>K.id.length)),G=Math.max(25,...q.map((K)=>K.title.length)),H=`Session ID${" ".repeat(B-10)} Title${" ".repeat(G-5)} Updated`;z.push(H),z.push("\u2500".repeat(H.length));for(let K of q){let A=Z.truncate(K.title,G),R=Z.todayTimeOrDateTime(K.time.updated),w=`${K.id.padEnd(B)} ${A.padEnd(G)} ${R}`;z.push(w)}return z.join(L)}function f(q){let z=q.map((B)=>({id:B.id,title:B.title,updated:B.time.updated,created:B.time.created,projectId:B.projectID,directory:B.directory}));return JSON.stringify(z,null,2)}export{T as SessionListCommand,v as SessionImportClaudeCommand,D as SessionDeleteCommand,g as SessionCommand};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{tl as a}from"./chunk-kc1xmcc9.js";import"./chunk-jjjs8p0t.js";import"./chunk-xnhvt98g.js";import"./chunk-hpa7e9va.js";import"./chunk-y287zwkr.js";import"./chunk-qeg0jnxq.js";import"./chunk-9eg2ytjd.js";import"./chunk-rk2bk4s7.js";import"./chunk-e586sjb0.js";import"./chunk-b50t4jc5.js";import"./chunk-zdzxsyxs.js";import"./chunk-xny5ecn0.js";import"./chunk-7myg8076.js";import"./chunk-my3cswnp.js";import"./chunk-4mvg7jt1.js";import"./chunk-cqtkxwd8.js";import"./chunk-wf4x5cjc.js";import"./chunk-mswx4k75.js";import"./chunk-vqpfpmha.js";import"./chunk-vm1ek7yf.js";import"./chunk-fd7fmvyw.js";import"./chunk-qkh8697x.js";import"./chunk-qg9bt0kx.js";import"./chunk-pfkm3j8g.js";import"./chunk-hmznf0ax.js";import"./chunk-qf1dqzra.js";import"./chunk-03mbn7nj.js";import"./chunk-gr4bctqj.js";import"./chunk-732yr6qq.js";import"./chunk-73fz0cf4.js";import"./chunk-9nn4jpb7.js";import"./chunk-sh76e256.js";import"./chunk-0z1cxvk1.js";import"./chunk-x3afqfww.js";import"./chunk-cbmwhvxw.js";import"./chunk-9etpppyv.js";import"./chunk-9ea1n338.js";import"./chunk-ngvp6zc2.js";import"./chunk-1p6jjrea.js";import"./chunk-ks1cs80p.js";import"./chunk-qhnpq5gb.js";import"./chunk-f83wv08n.js";export{a as Session};
@@ -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-q9ft590w.js";import"./chunk-knh01n2r.js";import"./chunk-jgtcfw96.js";import"./chunk-dknemkw2.js";import"./chunk-bhetpmgq.js";import"./chunk-nfg7nt13.js";import"./chunk-rcyzqa3g.js";import"./chunk-xjpvv3vp.js";import"./chunk-3kn57y8d.js";import"./chunk-nb86kh94.js";import"./chunk-9rxyq6f9.js";import"./chunk-5az84brc.js";import"./chunk-94qhpkfx.js";import"./chunk-c1g8n10t.js";import"./chunk-a2dz9nqh.js";import"./chunk-vhe92p7a.js";import"./chunk-kc1xmcc9.js";import"./chunk-jjjs8p0t.js";import"./chunk-xnhvt98g.js";import"./chunk-hpa7e9va.js";import"./chunk-y287zwkr.js";import"./chunk-qeg0jnxq.js";import"./chunk-9eg2ytjd.js";import"./chunk-rk2bk4s7.js";import"./chunk-e586sjb0.js";import"./chunk-b50t4jc5.js";import"./chunk-zdzxsyxs.js";import"./chunk-xny5ecn0.js";import"./chunk-7myg8076.js";import"./chunk-my3cswnp.js";import"./chunk-4mvg7jt1.js";import"./chunk-cqtkxwd8.js";import"./chunk-wf4x5cjc.js";import"./chunk-mswx4k75.js";import"./chunk-vqpfpmha.js";import"./chunk-vm1ek7yf.js";import"./chunk-fd7fmvyw.js";import"./chunk-1sfcxdbw.js";import"./chunk-bgng3rdj.js";import"./chunk-qkh8697x.js";import"./chunk-qg9bt0kx.js";import"./chunk-pfkm3j8g.js";import"./chunk-hmznf0ax.js";import"./chunk-qf1dqzra.js";import"./chunk-03mbn7nj.js";import"./chunk-gr4bctqj.js";import"./chunk-732yr6qq.js";import"./chunk-73fz0cf4.js";import"./chunk-9nn4jpb7.js";import"./chunk-sh76e256.js";import"./chunk-0z1cxvk1.js";import"./chunk-x3afqfww.js";import"./chunk-cbmwhvxw.js";import"./chunk-9etpppyv.js";import"./chunk-9ea1n338.js";import"./chunk-ngvp6zc2.js";import"./chunk-1p6jjrea.js";import"./chunk-ks1cs80p.js";import"./chunk-a92hh67a.js";import"./chunk-qhnpq5gb.js";import"./chunk-f83wv08n.js";export{c as url,b as openapi,d as listen,e as Server,a as Default};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ft as a,gt as b,ht as c,it as d,jt as e,kt as f,lt as g,mt as h}from"./chunk-x3afqfww.js";import"./chunk-cbmwhvxw.js";import"./chunk-9etpppyv.js";import"./chunk-9ea1n338.js";import"./chunk-ngvp6zc2.js";import"./chunk-1p6jjrea.js";import"./chunk-ks1cs80p.js";import"./chunk-f83wv08n.js";export{g as redactValue,e as init,f as flush,d as file,b as enabled,h as create,a as Level,c as Default};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{AO as b,BO as c,CO as d,DO as e,EO as f,FO as g,GO as h,HO as i,IO as j,zO as a}from"./chunk-a92hh67a.js";import"./chunk-f83wv08n.js";export{c as TreeCursor,b as Tree,f as Query,j as Parser,d as Node,i as MIN_COMPATIBLE_VERSION,a as LookaheadIterator,g as Language,h as LANGUAGE_VERSION,e as CaptureQuantifier};
@@ -1,6 +1,6 @@
1
1
  // @bun
2
- import{we as M}from"./chunk-vgaxv70x.js";import{ze as D}from"./chunk-t01bhw5h.js";import{Ae as B}from"./chunk-8yr682pv.js";import{uf as d,wf as w}from"./chunk-v3x5nrc4.js";import{gQ as n}from"./chunk-4sazy0nq.js";var R=n(D(),1),i=n(d(),1),A=n(M(),1);import N from"fs/promises";var S=n(d(),1);var _="169.254.170.2",p="169.254.170.23",u="[fd00:ec2::23]",g=(e,c)=>{if(e.protocol==="https:")return;if(e.hostname===_||e.hostname===p||e.hostname===u)return;if(e.hostname.includes("[")){if(e.hostname==="[::1]"||e.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(e.hostname==="localhost")return;let a=e.hostname.split("."),r=(t)=>{let s=parseInt(t,10);return 0<=s&&s<=255};if(a[0]==="127"&&r(a[1])&&r(a[2])&&r(a[3])&&a.length===4)return}throw new S.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
2
+ import{ye as M}from"./chunk-9jrxrjzt.js";import{Be as D}from"./chunk-y4e7e42x.js";import{Ce as B}from"./chunk-yd2emszh.js";import{wf as d,yf as w}from"./chunk-3tmq81kq.js";import{LO as n}from"./chunk-f83wv08n.js";var R=n(D(),1),i=n(d(),1),A=n(M(),1);import N from"fs/promises";var S=n(d(),1);var _="169.254.170.2",p="169.254.170.23",u="[fd00:ec2::23]",g=(e,c)=>{if(e.protocol==="https:")return;if(e.hostname===_||e.hostname===p||e.hostname===u)return;if(e.hostname.includes("[")){if(e.hostname==="[::1]"||e.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(e.hostname==="localhost")return;let a=e.hostname.split("."),r=(t)=>{let s=parseInt(t,10);return 0<=s&&s<=255};if(a[0]==="127"&&r(a[1])&&r(a[2])&&r(a[3])&&a.length===4)return}throw new S.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
3
3
  - loopback CIDR 127.0.0.0/8 or [::1/128]
4
4
  - ECS container host 169.254.170.2
5
5
  - EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:c})};var f=n(d(),1),I=n(B(),1),P=n(w(),1),K=n(w(),1);function x(e){return new I.HttpRequest({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((c,[a,r])=>{return c[a]=r,c},{}),fragment:e.hash})}async function E(e,c){let r=await K.sdkStreamMixin(e.body).transformToString();if(e.statusCode===200){let t=JSON.parse(r);if(typeof t.AccessKeyId!=="string"||typeof t.SecretAccessKey!=="string"||typeof t.Token!=="string"||typeof t.Expiration!=="string")throw new f.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:c});return{accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,sessionToken:t.Token,expiration:P.parseRfc3339DateTime(t.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let t={};try{t=JSON.parse(r)}catch(s){}throw Object.assign(new f.CredentialsProviderError(`Server responded with status: ${e.statusCode}`,{logger:c}),{Code:t.Code,Message:t.Message})}throw new f.CredentialsProviderError(`Server responded with status: ${e.statusCode}`,{logger:c})}var T=(e,c,a)=>{return async()=>{for(let r=0;r<c;++r)try{return await e()}catch(t){await new Promise((s)=>setTimeout(s,a))}return await e()}};var j="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",J="http://169.254.170.2",$="AWS_CONTAINER_CREDENTIALS_FULL_URI",G="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",H="AWS_CONTAINER_AUTHORIZATION_TOKEN",k=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let c,a=e.awsContainerCredentialsRelativeUri??process.env[j],r=e.awsContainerCredentialsFullUri??process.env[$],t=e.awsContainerAuthorizationToken??process.env[H],s=e.awsContainerAuthorizationTokenFile??process.env[G],m=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?.warn?console.warn:e.logger.warn.bind(e.logger);if(a&&r)m("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),m("awsContainerCredentialsFullUri will take precedence.");if(t&&s)m("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),m("awsContainerAuthorizationToken will take precedence.");if(r)c=r;else if(a)c=`${J}${a}`;else throw new i.CredentialsProviderError(`No HTTP credential provider host provided.
6
- Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:e.logger});let y=new URL(c);g(y,e.logger);let C=A.NodeHttpHandler.create({connectionTimeout:e.timeout??1000}),O=e.timeout??1000,b=T(async()=>{let o=x(y);if(t)o.headers.Authorization=t;else if(s)o.headers.Authorization=(await N.readFile(s)).toString();try{let h=await C.handle(o,{requestTimeout:O});return E(h.response).then((v)=>R.setCredentialFeature(v,"CREDENTIALS_HTTP","z"))}catch(h){throw new i.CredentialsProviderError(String(h),{logger:e.logger})}},e.maxRetries??3,e.timeout??1000);return async()=>{try{return await b()}finally{C.destroy?.()}}};export{k as Zd};
6
+ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:e.logger});let y=new URL(c);g(y,e.logger);let C=A.NodeHttpHandler.create({connectionTimeout:e.timeout??1000}),O=e.timeout??1000,b=T(async()=>{let o=x(y);if(t)o.headers.Authorization=t;else if(s)o.headers.Authorization=(await N.readFile(s)).toString();try{let h=await C.handle(o,{requestTimeout:O});return E(h.response).then((v)=>R.setCredentialFeature(v,"CREDENTIALS_HTTP","z"))}catch(h){throw new i.CredentialsProviderError(String(h),{logger:e.logger})}},e.maxRetries??3,e.timeout??1000);return async()=>{try{return await b()}finally{C.destroy?.()}}};export{k as $d};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Cd as d}from"./chunk-37dvnent.js";import{Pd as f}from"./chunk-9xvctnjr.js";import{Sf as e}from"./chunk-9s4whpg1.js";import{Xg as l}from"./chunk-w57j3pgz.js";import"./chunk-ebkztnpf.js";import"./chunk-pxx2hz0g.js";import"./chunk-rexdr63q.js";import"./chunk-kqhh2pm9.js";import"./chunk-7fawtcnn.js";import"./chunk-mdzzcrf9.js";import"./chunk-wev34grp.js";import{$j as m,rl as u}from"./chunk-sy3n0qhc.js";import"./chunk-364ccew0.js";import"./chunk-vdpd4akk.js";import"./chunk-yjp0btmq.js";import"./chunk-1bx2sjn6.js";import"./chunk-g5prcvq2.js";import"./chunk-t5tfppwv.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import"./chunk-e03tgfpb.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-w9pdvcf9.js";import"./chunk-4gs87ghj.js";import"./chunk-brh35yt5.js";import"./chunk-vcrakhgy.js";import"./chunk-xdjwapwy.js";import"./chunk-7dep7g7c.js";import"./chunk-tabcpx7t.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-3sz6gw10.js";import"./chunk-xqwvx3qq.js";import"./chunk-qp9y0g73.js";import"./chunk-xyjehgzm.js";import"./chunk-j21dnncc.js";import"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-ev3a2sxv.js";import"./chunk-pnq1h5az.js";import"./chunk-4sazy0nq.js";var v=f({command:"usage [sessionID]",describe:"show per-turn token/cost breakdown for a session (debug/verification tool)",builder:(o)=>{return o.positional("sessionID",{describe:"session ID to inspect (default: most recently updated session)",type:"string"}).option("format",{describe:"output format",type:"string",choices:["table","json"],default:"table"}).option("limit",{describe:"number of most recent turns to show (default: all)",type:"number"})},handler:async(o)=>{await d(process.cwd(),async()=>{let a=o.sessionID?m.make(o.sessionID):[...u.list({roots:!1,limit:1})][0]?.id;if(!a)e.error("No sessions found"),process.exit(1);let p=(await l.runPromise(u.Service.use((s)=>s.messages({sessionID:a,agentID:"*"})))).filter((s)=>s.info.role==="assistant").map((s)=>{let t=s.info,c=s.parts.filter((n)=>n.type==="step-finish");return{messageID:t.id,provider:t.providerID,model:t.modelID,finish:t.finish,cost:t.cost??0,tokens:t.tokens??{input:0,output:0,reasoning:0,cache:{read:0,write:0}},steps:c.map((n)=>({cost:n.cost,tokens:n.tokens}))}}),r=o.limit?p.slice(-o.limit):p;if(r.length===0){e.println("No assistant turns found for this session");return}if(o.format==="json"){console.log(JSON.stringify({sessionID:a,turns:r},null,2));return}e.println(`Session ${a} \u2014 ${r.length} turn(s)`),e.println("");for(let s of r){let t=s.tokens,c=t.input+t.cache.read+t.cache.write,n=t.output+t.reasoning;if(e.println(`${s.messageID} ${s.provider}/${s.model} finish=${s.finish??"-"}`),e.println(` tokens input=${t.input} cache.read=${t.cache.read} cache.write=${t.cache.write} output=${t.output} reasoning=${t.reasoning} (in=${c} out=${n})`),e.println(` cost $${s.cost.toFixed(6)}`),s.steps.length>1)e.println(` steps ${s.steps.length}`),s.steps.forEach((i,g)=>{e.println(` [${g}] input=${i.tokens.input} output=${i.tokens.output} cache.read=${i.tokens.cache.read} cache.write=${i.tokens.cache.write} reasoning=${i.tokens.reasoning} cost=$${i.cost.toFixed(6)}`)});e.println("")}let h=r.reduce((s,t)=>s+t.cost,0);e.println(`Total cost for shown turns: $${h.toFixed(6)}`),e.println("(source: Session.getUsage(), same numbers persisted to the message record \u2014 see session.usage log tag)")})}});export{v as UsageCommand};
2
+ import{Ed as d}from"./chunk-v7mg632n.js";import{Rd as f}from"./chunk-yajd975f.js";import{Uf as e}from"./chunk-t1jgx17a.js";import{Zg as l}from"./chunk-3kn57y8d.js";import"./chunk-nb86kh94.js";import"./chunk-9rxyq6f9.js";import"./chunk-5az84brc.js";import"./chunk-94qhpkfx.js";import"./chunk-c1g8n10t.js";import"./chunk-a2dz9nqh.js";import"./chunk-vhe92p7a.js";import{bk as m,tl as u}from"./chunk-kc1xmcc9.js";import"./chunk-jjjs8p0t.js";import"./chunk-xnhvt98g.js";import"./chunk-hpa7e9va.js";import"./chunk-y287zwkr.js";import"./chunk-qeg0jnxq.js";import"./chunk-9eg2ytjd.js";import"./chunk-rk2bk4s7.js";import"./chunk-e586sjb0.js";import"./chunk-b50t4jc5.js";import"./chunk-zdzxsyxs.js";import"./chunk-xny5ecn0.js";import"./chunk-7myg8076.js";import"./chunk-my3cswnp.js";import"./chunk-4mvg7jt1.js";import"./chunk-cqtkxwd8.js";import"./chunk-wf4x5cjc.js";import"./chunk-mswx4k75.js";import"./chunk-vqpfpmha.js";import"./chunk-vm1ek7yf.js";import"./chunk-fd7fmvyw.js";import"./chunk-1sfcxdbw.js";import"./chunk-bgng3rdj.js";import"./chunk-qkh8697x.js";import"./chunk-qg9bt0kx.js";import"./chunk-pfkm3j8g.js";import"./chunk-hmznf0ax.js";import"./chunk-qf1dqzra.js";import"./chunk-03mbn7nj.js";import"./chunk-gr4bctqj.js";import"./chunk-732yr6qq.js";import"./chunk-73fz0cf4.js";import"./chunk-9nn4jpb7.js";import"./chunk-sh76e256.js";import"./chunk-0z1cxvk1.js";import"./chunk-x3afqfww.js";import"./chunk-cbmwhvxw.js";import"./chunk-9etpppyv.js";import"./chunk-9ea1n338.js";import"./chunk-ngvp6zc2.js";import"./chunk-1p6jjrea.js";import"./chunk-ks1cs80p.js";import"./chunk-a92hh67a.js";import"./chunk-qhnpq5gb.js";import"./chunk-f83wv08n.js";var v=f({command:"usage [sessionID]",describe:"show per-turn token/cost breakdown for a session (debug/verification tool)",builder:(o)=>{return o.positional("sessionID",{describe:"session ID to inspect (default: most recently updated session)",type:"string"}).option("format",{describe:"output format",type:"string",choices:["table","json"],default:"table"}).option("limit",{describe:"number of most recent turns to show (default: all)",type:"number"})},handler:async(o)=>{await d(process.cwd(),async()=>{let a=o.sessionID?m.make(o.sessionID):[...u.list({roots:!1,limit:1})][0]?.id;if(!a)e.error("No sessions found"),process.exit(1);let p=(await l.runPromise(u.Service.use((s)=>s.messages({sessionID:a,agentID:"*"})))).filter((s)=>s.info.role==="assistant").map((s)=>{let t=s.info,c=s.parts.filter((n)=>n.type==="step-finish");return{messageID:t.id,provider:t.providerID,model:t.modelID,finish:t.finish,cost:t.cost??0,tokens:t.tokens??{input:0,output:0,reasoning:0,cache:{read:0,write:0}},steps:c.map((n)=>({cost:n.cost,tokens:n.tokens}))}}),r=o.limit?p.slice(-o.limit):p;if(r.length===0){e.println("No assistant turns found for this session");return}if(o.format==="json"){console.log(JSON.stringify({sessionID:a,turns:r},null,2));return}e.println(`Session ${a} \u2014 ${r.length} turn(s)`),e.println("");for(let s of r){let t=s.tokens,c=t.input+t.cache.read+t.cache.write,n=t.output+t.reasoning;if(e.println(`${s.messageID} ${s.provider}/${s.model} finish=${s.finish??"-"}`),e.println(` tokens input=${t.input} cache.read=${t.cache.read} cache.write=${t.cache.write} output=${t.output} reasoning=${t.reasoning} (in=${c} out=${n})`),e.println(` cost $${s.cost.toFixed(6)}`),s.steps.length>1)e.println(` steps ${s.steps.length}`),s.steps.forEach((i,g)=>{e.println(` [${g}] input=${i.tokens.input} output=${i.tokens.output} cache.read=${i.tokens.cache.read} cache.write=${i.tokens.cache.write} reasoning=${i.tokens.reasoning} cost=$${i.cost.toFixed(6)}`)});e.println("")}let h=r.reduce((s,t)=>s+t.cost,0);e.println(`Total cost for shown turns: $${h.toFixed(6)}`),e.println("(source: Session.getUsage(), same numbers persisted to the message record \u2014 see session.usage log tag)")})}});export{v as UsageCommand};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{p as y,q as T,r as M,s as D,t as U}from"./chunk-bzs2ep7s.js";import{Id as X,Jd as _,Kd as $,Nd as v}from"./chunk-p9mj4zyk.js";import"./chunk-ta7mfkms.js";import{Rd as j}from"./chunk-yajd975f.js";import{Uf as V}from"./chunk-t1jgx17a.js";import{cm as J}from"./chunk-xnhvt98g.js";import"./chunk-hpa7e9va.js";import"./chunk-y287zwkr.js";import{An as F,On as G}from"./chunk-9eg2ytjd.js";import"./chunk-rk2bk4s7.js";import"./chunk-e586sjb0.js";import"./chunk-b50t4jc5.js";import"./chunk-zdzxsyxs.js";import"./chunk-qkh8697x.js";import"./chunk-qg9bt0kx.js";import"./chunk-pfkm3j8g.js";import"./chunk-hmznf0ax.js";import"./chunk-qf1dqzra.js";import"./chunk-03mbn7nj.js";import"./chunk-gr4bctqj.js";import"./chunk-732yr6qq.js";import"./chunk-73fz0cf4.js";import"./chunk-sh76e256.js";import{Ys as Z}from"./chunk-0z1cxvk1.js";import"./chunk-x3afqfww.js";import{Dt as E}from"./chunk-cbmwhvxw.js";import"./chunk-9etpppyv.js";import"./chunk-9ea1n338.js";import"./chunk-ngvp6zc2.js";import"./chunk-1p6jjrea.js";import"./chunk-ks1cs80p.js";import"./chunk-f83wv08n.js";import h from"path";var b={spinner:()=>v(),log:{error:(w)=>X.error(w),info:(w)=>X.info(w),success:(w)=>X.success(w)},resolve:(w)=>G(w),...T,global:E.Path.config};function P(w){if(!w||typeof w!=="object")return;if(!("cause"in w))return;return w.cause}function I(w,q=b){let H=w.mod,K=Boolean(w.force),W=Boolean(w.global);return async(O)=>{let R=q.spinner();R.start("Installing plugin package...");let S=await M(H,q);if(!S.ok){R.stop("Install failed",1),q.log.error(`Could not install "${H}"`);let B=y(S.error);if(B.detail)q.log.error(B.detail);if(B.missing)q.log.info("This package depends on a version that is not available in your npm registry."),q.log.info("Check npm registry/auth settings and try again.");return!1}R.stop("Plugin package ready");let L=q.spinner();L.start("Reading plugin manifest...");let z=await D(S.target);if(!z.ok){if(z.code==="manifest_read_failed")return L.stop("Manifest read failed",1),q.log.error(`Installed "${H}" but failed to read ${z.file}`),q.log.error(Z(P(z.error)??z.error)),!1;if(z.code==="manifest_no_targets")return L.stop("No plugin targets found",1),q.log.error(`"${H}" does not expose plugin entrypoints in package.json`),q.log.info('Expected one of: exports["./tui"], exports["./server"], package.json main for server, or package.json["oc-themes"] for tui themes.'),!1;return L.stop("Manifest read failed",1),!1}L.stop(`Detected ${z.targets.map((B)=>B.kind).join(" + ")} target${z.targets.length===1?"":"s"}`);let N=q.spinner();N.start("Updating plugin config...");let A=await U({spec:H,targets:z.targets,force:K,global:W,vcs:O.vcs,worktree:O.worktree,directory:O.directory,config:q.global},q);if(!A.ok){if(A.code==="invalid_json")return N.stop(`Failed updating ${A.kind} config`,1),q.log.error(`Invalid JSON in ${A.file} (${A.parse} at line ${A.line}, column ${A.col})`),q.log.info("Fix the config file and run the command again."),!1;return N.stop("Failed updating plugin config",1),q.log.error(Z(A.error)),!1}N.stop("Plugin config updated");for(let B of A.items){if(B.mode==="noop"){q.log.info(`Already configured in ${B.file}`);continue}if(B.mode==="replace"){q.log.info(`Replaced in ${B.file}`);continue}q.log.info(`Added to ${B.file}`)}return q.log.success(`Installed ${H}`),q.log.info(W?`Scope: global (${A.dir})`:`Scope: local (${A.dir})`),!0}}async function x(w,q=b,H=(K)=>V.println(K)){let K=w.vcs==="git"&&w.worktree!=="/",W=[{scope:"local",dir:h.join(K?w.worktree:w.directory,".qitqode")},{scope:"global",dir:q.global}],O=0;for(let{scope:R,dir:S}of W)for(let L of["qitqode","tui"])for(let z of q.files(S,L)){if(!await q.exists(z))continue;let N=await q.readText(z).catch(()=>{return});if(N===void 0)continue;let A=[],B=F(N,A,{allowTrailingComma:!0});if(A.length){q.log.error(`Invalid JSON in ${z} \u2014 skipped`);continue}let Y=B?.plugin;if(!Array.isArray(Y)||Y.length===0)continue;q.log.info(`${R} \xB7 ${z}`);for(let Q of Y){let C=typeof Q==="string"?Q:Array.isArray(Q)?String(Q[0]):void 0;if(!C)continue;let k=Array.isArray(Q)&&Q[1]?" (with options)":"";H(" "+C+k),O++}}if(O===0)q.log.info("No plugins configured.")}var i=j({command:"plugin <module>",aliases:["plug"],describe:"install plugin and update config",builder:(w)=>{return w.positional("module",{type:"string",describe:"npm module name"}).option("global",{alias:["g"],type:"boolean",default:!1,describe:"install in global config"}).option("force",{alias:["f"],type:"boolean",default:!1,describe:"replace existing plugin version"})},handler:async(w)=>{let q=String(w.module??"").trim();if(!q){V.error("module is required"),process.exitCode=1;return}if(q==="list"){V.empty(),_("Configured plugins"),await J.provide({directory:process.cwd(),fn:async()=>{await x({vcs:J.project.vcs,worktree:J.worktree,directory:J.directory})}}),$("Done");return}V.empty(),_(`Install plugin ${q}`);let H=I({mod:q,global:Boolean(w.global),force:Boolean(w.force)}),K=!0;if(await J.provide({directory:process.cwd(),fn:async()=>{K=await H({vcs:J.project.vcs,worktree:J.worktree,directory:J.directory})}}),$("Done"),!K)process.exitCode=1}});export{x as listPlugins,I as createPlugTask,i as PluginCommand};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{Ad as W$}from"./chunk-n7xgfm5x.js";import{Cd as j$}from"./chunk-37dvnent.js";import{Pd as A$}from"./chunk-9xvctnjr.js";import{Lf as J$}from"./chunk-5pkg052s.js";import{Zf as Z$}from"./chunk-cjxcnhmq.js";import"./chunk-htkwc2se.js";import"./chunk-mqtqcc10.js";import"./chunk-b4ysd5b4.js";import"./chunk-ebabnv33.js";import"./chunk-nfg7nt13.js";import"./chunk-yj6rbe9p.js";import"./chunk-f77nxt23.js";import{Xg as MD}from"./chunk-w57j3pgz.js";import{Jh as hD}from"./chunk-ebkztnpf.js";import"./chunk-pxx2hz0g.js";import"./chunk-rexdr63q.js";import"./chunk-kqhh2pm9.js";import"./chunk-7fawtcnn.js";import"./chunk-mdzzcrf9.js";import"./chunk-wev34grp.js";import{fl as _$,gl as U,hk as sD,il as G$,nk as k,ok as P}from"./chunk-sy3n0qhc.js";import"./chunk-364ccew0.js";import"./chunk-vdpd4akk.js";import"./chunk-yjp0btmq.js";import"./chunk-1bx2sjn6.js";import"./chunk-g5prcvq2.js";import"./chunk-t5tfppwv.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import{Op as X$,Up as Y$}from"./chunk-e03tgfpb.js";import"./chunk-gwfx7tx7.js";import{Cr as f$}from"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-w9pdvcf9.js";import"./chunk-4gs87ghj.js";import"./chunk-brh35yt5.js";import"./chunk-vcrakhgy.js";import"./chunk-xdjwapwy.js";import"./chunk-7dep7g7c.js";import"./chunk-tabcpx7t.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-3sz6gw10.js";import"./chunk-xqwvx3qq.js";import{Rt as Q$}from"./chunk-qp9y0g73.js";import"./chunk-xyjehgzm.js";import{Ku as H}from"./chunk-j21dnncc.js";import{Vu as kD,Wu as w$}from"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import{xv as D}from"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-ev3a2sxv.js";import"./chunk-pnq1h5az.js";import{iQ as ow}from"./chunk-4sazy0nq.js";var O={authenticate:"authenticate",initialize:"initialize",session_cancel:"session/cancel",session_close:"session/close",session_fork:"session/fork",session_list:"session/list",session_load:"session/load",session_new:"session/new",session_prompt:"session/prompt",session_resume:"session/resume",session_set_config_option:"session/set_config_option",session_set_mode:"session/set_mode",session_set_model:"session/set_model"},F={fs_read_text_file:"fs/read_text_file",fs_write_text_file:"fs/write_text_file",session_request_permission:"session/request_permission",session_update:"session/update",terminal_create:"terminal/create",terminal_kill:"terminal/kill",terminal_output:"terminal/output",terminal_release:"terminal/release",terminal_wait_for_exit:"terminal/wait_for_exit"};var K$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),terminal:D.boolean().optional().default(!1)}),B$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),label:D.string().nullish(),name:D.string(),optional:D.boolean().optional().default(!1),secret:D.boolean().optional().default(!0)}),O$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),description:D.string().nullish(),id:D.string(),name:D.string()}),N$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),description:D.string().nullish(),id:D.string(),link:D.string().nullish(),name:D.string(),vars:D.array(B$)}),F$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),args:D.array(D.string()).optional(),description:D.string().nullish(),env:D.record(D.string(),D.string()).optional(),id:D.string(),name:D.string()}),L$=D.union([N$.and(D.object({type:D.literal("env_var")})),F$.and(D.object({type:D.literal("terminal")})),O$]),n=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),methodId:D.string()}),x$=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),V$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),blob:D.string(),mimeType:D.string().nullish(),uri:D.string()}),H$=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),P$=D.object({amount:D.number(),currency:D.string()}),k$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),terminalId:D.string()}),T$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),newText:D.string(),oldText:D.string().nullish(),path:D.string()}),vD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),name:D.string(),value:D.string()}),U$=D.union([D.literal(-32700),D.literal(-32600),D.literal(-32601),D.literal(-32602),D.literal(-32603),D.literal(-32800),D.literal(-32000),D.literal(-32002),D.number().int().min(-2147483648,{message:"Invalid value: Expected int32 to be >= -2147483648"}).max(2147483647,{message:"Invalid value: Expected int32 to be <= 2147483647"})]),ID=D.object({code:U$,data:D.unknown().optional(),message:D.string()}),qD=D.unknown(),SD=D.unknown(),RD=D.unknown(),b$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),readTextFile:D.boolean().optional().default(!1),writeTextFile:D.boolean().optional().default(!1)}),h$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),auth:K$.optional().default({terminal:!1}),fs:b$.optional().default({readTextFile:!1,writeTextFile:!1}),terminal:D.boolean().optional().default(!1)}),cD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),name:D.string(),value:D.string()}),uD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),name:D.string(),title:D.string().nullish(),version:D.string()}),M$=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),t=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),cursor:D.string().nullish(),cwd:D.string().nullish()}),C$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),http:D.boolean().optional().default(!1),sse:D.boolean().optional().default(!1)}),E$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),headers:D.array(cD),name:D.string(),url:D.string()}),v$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),headers:D.array(cD),name:D.string(),url:D.string()}),I$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),args:D.array(D.string()),command:D.string(),env:D.array(vD),name:D.string()}),I=D.union([E$.and(D.object({type:D.literal("http")})),v$.and(D.object({type:D.literal("sse")})),I$]),o=D.string(),q$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),description:D.string().nullish(),modelId:o,name:D.string()}),r=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),cwd:D.string(),mcpServers:D.array(I)}),gD=D.string(),S$=D.union([D.literal("allow_once"),D.literal("allow_always"),D.literal("reject_once"),D.literal("reject_always")]),R$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),kind:S$,name:D.string(),optionId:gD}),c$=D.union([D.literal("high"),D.literal("medium"),D.literal("low")]),u$=D.union([D.literal("pending"),D.literal("in_progress"),D.literal("completed")]),g$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),content:D.string(),priority:c$,status:u$}),l$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),entries:D.array(g$)}),d$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),audio:D.boolean().optional().default(!1),embeddedContext:D.boolean().optional().default(!1),image:D.boolean().optional().default(!1)}),lD=D.number().int().gte(0).lte(65535),z=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),clientCapabilities:h$.optional().default({auth:{terminal:!1},fs:{readTextFile:!1,writeTextFile:!1},terminal:!1}),clientInfo:uD.nullish(),protocolVersion:lD}),i$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),content:D.string()}),m$=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),T=D.union([D.number(),D.string()]).nullable(),sw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),requestId:T}),p$=D.enum(["assistant","user"]),E=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),audience:D.array(p$).nullish(),lastModified:D.string().nullish(),priority:D.number().nullish()}),n$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),annotations:E.nullish(),data:D.string(),mimeType:D.string()}),t$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),annotations:E.nullish(),data:D.string(),mimeType:D.string(),uri:D.string().nullish()}),o$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),annotations:E.nullish(),description:D.string().nullish(),mimeType:D.string().nullish(),name:D.string(),size:D.number().nullish(),title:D.string().nullish(),uri:D.string()}),r$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),optionId:gD}),z$=D.union([D.object({outcome:D.literal("cancelled")}),r$.and(D.object({outcome:D.literal("selected")}))]),a$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),outcome:z$}),s$=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),e$=D.object({currentValue:D.boolean()}),Dw=D.string(),dD=D.string(),$w=D.union([D.literal("mode"),D.literal("model"),D.literal("thought_level"),D.string()]),a=D.string(),iD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),description:D.string().nullish(),name:D.string(),value:a}),ww=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),group:Dw,name:D.string(),options:D.array(iD)}),Qw=D.union([D.array(iD),D.array(ww)]),fw=D.object({currentValue:a,options:Qw}),M=D.intersection(D.union([fw.and(D.object({type:D.literal("select")})),e$.and(D.object({type:D.literal("boolean")}))]),D.object({_meta:D.record(D.string(),D.unknown()).nullish(),category:$w.nullish(),description:D.string().nullish(),id:dD,name:D.string()})),_w=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),configOptions:D.array(M)}),Gw=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),N=D.string(),s=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),sessionId:N}),ew=D.object({method:D.string(),params:D.union([s,qD]).nullish()}),e=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),sessionId:N}),DD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),args:D.array(D.string()).optional(),command:D.string(),cwd:D.string().nullish(),env:D.array(vD).optional(),outputByteLimit:D.number().nullish(),sessionId:N}),$D=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),cwd:D.string(),mcpServers:D.array(I).optional(),sessionId:N}),wD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),sessionId:N,terminalId:D.string()}),QD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),cwd:D.string(),mcpServers:D.array(I),sessionId:N}),fD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),limit:D.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),line:D.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),path:D.string(),sessionId:N}),_D=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),sessionId:N,terminalId:D.string()}),GD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),cwd:D.string(),mcpServers:D.array(I).optional(),sessionId:N}),Jw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),cwd:D.string(),sessionId:N,title:D.string().nullish(),updatedAt:D.string().nullish()}),Xw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),nextCursor:D.string().nullish(),sessions:D.array(Jw)}),Yw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),title:D.string().nullish(),updatedAt:D.string().nullish()}),Zw=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),q=D.string(),jw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),currentModeId:q}),Aw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),description:D.string().nullish(),id:q,name:D.string()}),S=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),availableModes:D.array(Aw),currentModeId:q}),R=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),availableModels:D.array(q$),currentModelId:o}),Ww=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),configOptions:D.array(M).nullish(),models:R.nullish(),modes:S.nullish(),sessionId:N}),yw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),configOptions:D.array(M).nullish(),models:R.nullish(),modes:S.nullish()}),Kw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),configOptions:D.array(M).nullish(),models:R.nullish(),modes:S.nullish(),sessionId:N}),Bw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),configOptions:D.array(M).nullish(),models:R.nullish(),modes:S.nullish()}),Ow=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),Nw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),close:s$.nullish(),fork:Gw.nullish(),list:Zw.nullish(),resume:Ow.nullish()}),Fw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),loadSession:D.boolean().optional().default(!1),mcpCapabilities:C$.optional().default({http:!1,sse:!1}),promptCapabilities:d$.optional().default({audio:!1,embeddedContext:!1,image:!1}),sessionCapabilities:Nw.optional().default({})}),Lw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),agentCapabilities:Fw.optional().default({loadSession:!1,mcpCapabilities:{http:!1,sse:!1},promptCapabilities:{audio:!1,embeddedContext:!1,image:!1},sessionCapabilities:{}}),agentInfo:uD.nullish(),authMethods:D.array(L$).optional().default([]),protocolVersion:lD}),JD=D.intersection(D.union([D.object({type:D.literal("boolean"),value:D.boolean()}),D.object({value:a})]),D.object({_meta:D.record(D.string(),D.unknown()).nullish(),configId:dD,sessionId:N})),xw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),configOptions:D.array(M)}),XD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),modeId:q,sessionId:N}),Vw=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),YD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),modelId:o,sessionId:N}),Hw=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),Pw=D.union([D.literal("end_turn"),D.literal("max_tokens"),D.literal("max_turn_requests"),D.literal("refusal"),D.literal("cancelled")]),kw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),terminalId:D.string()}),Tw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),exitCode:D.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),signal:D.string().nullish()}),ZD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),sessionId:N,terminalId:D.string()}),Uw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),exitStatus:Tw.nullish(),output:D.string(),truncated:D.boolean()}),bw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),annotations:E.nullish(),text:D.string()}),hw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),mimeType:D.string().nullish(),text:D.string(),uri:D.string()}),Mw=D.union([hw,V$]),Cw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),annotations:E.nullish(),resource:Mw}),jD=D.union([bw.and(D.object({type:D.literal("text")})),t$.and(D.object({type:D.literal("image")})),n$.and(D.object({type:D.literal("audio")})),o$.and(D.object({type:D.literal("resource_link")})),Cw.and(D.object({type:D.literal("resource")}))]),Ew=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),content:jD}),p=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),content:jD,messageId:D.string().nullish()}),AD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),messageId:D.string().nullish(),prompt:D.array(jD),sessionId:N}),DQ=D.object({id:T,method:D.string(),params:D.union([z,n,r,QD,t,$D,GD,e,XD,JD,AD,YD,SD]).nullish()}),mD=D.union([Ew.and(D.object({type:D.literal("content")})),T$.and(D.object({type:D.literal("diff")})),kw.and(D.object({type:D.literal("terminal")}))]),pD=D.string(),nD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),line:D.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),path:D.string()}),tD=D.union([D.literal("pending"),D.literal("in_progress"),D.literal("completed"),D.literal("failed")]),oD=D.union([D.literal("read"),D.literal("edit"),D.literal("delete"),D.literal("move"),D.literal("search"),D.literal("execute"),D.literal("think"),D.literal("fetch"),D.literal("switch_mode"),D.literal("other")]),vw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),content:D.array(mD).optional(),kind:oD.optional(),locations:D.array(nD).optional(),rawInput:D.unknown().optional(),rawOutput:D.unknown().optional(),status:tD.optional(),title:D.string(),toolCallId:pD}),rD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),content:D.array(mD).nullish(),kind:oD.nullish(),locations:D.array(nD).nullish(),rawInput:D.unknown().optional(),rawOutput:D.unknown().optional(),status:tD.nullish(),title:D.string().nullish(),toolCallId:pD}),WD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),options:D.array(R$),sessionId:N,toolCall:rD}),Iw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),hint:D.string()}),qw=Iw,Sw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),description:D.string(),input:qw.nullish(),name:D.string()}),Rw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),availableCommands:D.array(Sw)}),cw=D.object({cachedReadTokens:D.number().nullish(),cachedWriteTokens:D.number().nullish(),inputTokens:D.number(),outputTokens:D.number(),thoughtTokens:D.number().nullish(),totalTokens:D.number()}),uw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),stopReason:Pw,usage:cw.nullish(),userMessageId:D.string().nullish()}),$Q=D.union([D.object({id:T,result:D.union([Lw,x$,Kw,yw,Xw,Ww,Bw,H$,Vw,xw,uw,Hw,RD])}),D.object({error:ID,id:T})]),gw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),cost:P$.nullish(),size:D.number(),used:D.number()}),lw=D.union([p.and(D.object({sessionUpdate:D.literal("user_message_chunk")})),p.and(D.object({sessionUpdate:D.literal("agent_message_chunk")})),p.and(D.object({sessionUpdate:D.literal("agent_thought_chunk")})),vw.and(D.object({sessionUpdate:D.literal("tool_call")})),rD.and(D.object({sessionUpdate:D.literal("tool_call_update")})),l$.and(D.object({sessionUpdate:D.literal("plan")})),Rw.and(D.object({sessionUpdate:D.literal("available_commands_update")})),jw.and(D.object({sessionUpdate:D.literal("current_mode_update")})),_w.and(D.object({sessionUpdate:D.literal("config_option_update")})),Yw.and(D.object({sessionUpdate:D.literal("session_info_update")})),gw.and(D.object({sessionUpdate:D.literal("usage_update")}))]),yD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),sessionId:N,update:lw}),wQ=D.object({method:D.string(),params:D.union([yD,qD]).nullish()}),KD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),sessionId:N,terminalId:D.string()}),dw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),exitCode:D.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),signal:D.string().nullish()}),BD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),content:D.string(),path:D.string(),sessionId:N}),QQ=D.object({id:T,method:D.string(),params:D.union([BD,fD,WD,DD,ZD,_D,KD,wD,SD]).nullish()}),iw=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),fQ=D.union([D.object({id:T,result:D.union([iw,i$,a$,k$,Uw,m$,dw,M$,RD])}),D.object({error:ID,id:T})]);function zD($,Q){let w=new TextEncoder,f=new TextDecoder,X=new ReadableStream({async start(_){let J="",j=Q.getReader();try{while(!0){let{value:B,done:Y}=await j.read();if(Y)break;if(!B)continue;J+=f.decode(B,{stream:!0});let Z=J.split(`
2
+ import{Cd as W$}from"./chunk-faa0zxey.js";import{Ed as j$}from"./chunk-v7mg632n.js";import{Rd as A$}from"./chunk-yajd975f.js";import{Nf as J$}from"./chunk-q148vndn.js";import{$f as Z$}from"./chunk-q9ft590w.js";import"./chunk-knh01n2r.js";import"./chunk-jgtcfw96.js";import"./chunk-dknemkw2.js";import"./chunk-bhetpmgq.js";import"./chunk-nfg7nt13.js";import"./chunk-rcyzqa3g.js";import"./chunk-xjpvv3vp.js";import{Zg as MD}from"./chunk-3kn57y8d.js";import{Lh as hD}from"./chunk-nb86kh94.js";import"./chunk-9rxyq6f9.js";import"./chunk-5az84brc.js";import"./chunk-94qhpkfx.js";import"./chunk-c1g8n10t.js";import"./chunk-a2dz9nqh.js";import"./chunk-vhe92p7a.js";import{hl as _$,il as U,jk as sD,kl as G$,pk as k,qk as P}from"./chunk-kc1xmcc9.js";import"./chunk-jjjs8p0t.js";import"./chunk-xnhvt98g.js";import"./chunk-hpa7e9va.js";import"./chunk-y287zwkr.js";import"./chunk-qeg0jnxq.js";import"./chunk-9eg2ytjd.js";import"./chunk-rk2bk4s7.js";import"./chunk-e586sjb0.js";import"./chunk-b50t4jc5.js";import"./chunk-zdzxsyxs.js";import"./chunk-xny5ecn0.js";import{ro as X$,xo as Y$}from"./chunk-7myg8076.js";import"./chunk-my3cswnp.js";import{fq as f$}from"./chunk-4mvg7jt1.js";import"./chunk-cqtkxwd8.js";import"./chunk-wf4x5cjc.js";import"./chunk-mswx4k75.js";import"./chunk-vqpfpmha.js";import"./chunk-vm1ek7yf.js";import"./chunk-fd7fmvyw.js";import"./chunk-1sfcxdbw.js";import"./chunk-bgng3rdj.js";import"./chunk-qkh8697x.js";import"./chunk-qg9bt0kx.js";import"./chunk-pfkm3j8g.js";import"./chunk-hmznf0ax.js";import"./chunk-qf1dqzra.js";import"./chunk-03mbn7nj.js";import"./chunk-gr4bctqj.js";import"./chunk-732yr6qq.js";import"./chunk-73fz0cf4.js";import"./chunk-9nn4jpb7.js";import{us as Q$}from"./chunk-sh76e256.js";import"./chunk-0z1cxvk1.js";import{nt as H}from"./chunk-x3afqfww.js";import{yt as kD,zt as w$}from"./chunk-cbmwhvxw.js";import"./chunk-9etpppyv.js";import{au as D}from"./chunk-9ea1n338.js";import"./chunk-ngvp6zc2.js";import"./chunk-1p6jjrea.js";import"./chunk-ks1cs80p.js";import"./chunk-a92hh67a.js";import"./chunk-qhnpq5gb.js";import{NO as ow}from"./chunk-f83wv08n.js";var O={authenticate:"authenticate",initialize:"initialize",session_cancel:"session/cancel",session_close:"session/close",session_fork:"session/fork",session_list:"session/list",session_load:"session/load",session_new:"session/new",session_prompt:"session/prompt",session_resume:"session/resume",session_set_config_option:"session/set_config_option",session_set_mode:"session/set_mode",session_set_model:"session/set_model"},F={fs_read_text_file:"fs/read_text_file",fs_write_text_file:"fs/write_text_file",session_request_permission:"session/request_permission",session_update:"session/update",terminal_create:"terminal/create",terminal_kill:"terminal/kill",terminal_output:"terminal/output",terminal_release:"terminal/release",terminal_wait_for_exit:"terminal/wait_for_exit"};var K$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),terminal:D.boolean().optional().default(!1)}),B$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),label:D.string().nullish(),name:D.string(),optional:D.boolean().optional().default(!1),secret:D.boolean().optional().default(!0)}),O$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),description:D.string().nullish(),id:D.string(),name:D.string()}),N$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),description:D.string().nullish(),id:D.string(),link:D.string().nullish(),name:D.string(),vars:D.array(B$)}),F$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),args:D.array(D.string()).optional(),description:D.string().nullish(),env:D.record(D.string(),D.string()).optional(),id:D.string(),name:D.string()}),L$=D.union([N$.and(D.object({type:D.literal("env_var")})),F$.and(D.object({type:D.literal("terminal")})),O$]),n=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),methodId:D.string()}),x$=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),V$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),blob:D.string(),mimeType:D.string().nullish(),uri:D.string()}),H$=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),P$=D.object({amount:D.number(),currency:D.string()}),k$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),terminalId:D.string()}),T$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),newText:D.string(),oldText:D.string().nullish(),path:D.string()}),vD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),name:D.string(),value:D.string()}),U$=D.union([D.literal(-32700),D.literal(-32600),D.literal(-32601),D.literal(-32602),D.literal(-32603),D.literal(-32800),D.literal(-32000),D.literal(-32002),D.number().int().min(-2147483648,{message:"Invalid value: Expected int32 to be >= -2147483648"}).max(2147483647,{message:"Invalid value: Expected int32 to be <= 2147483647"})]),ID=D.object({code:U$,data:D.unknown().optional(),message:D.string()}),qD=D.unknown(),SD=D.unknown(),RD=D.unknown(),b$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),readTextFile:D.boolean().optional().default(!1),writeTextFile:D.boolean().optional().default(!1)}),h$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),auth:K$.optional().default({terminal:!1}),fs:b$.optional().default({readTextFile:!1,writeTextFile:!1}),terminal:D.boolean().optional().default(!1)}),cD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),name:D.string(),value:D.string()}),uD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),name:D.string(),title:D.string().nullish(),version:D.string()}),M$=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),t=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),cursor:D.string().nullish(),cwd:D.string().nullish()}),C$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),http:D.boolean().optional().default(!1),sse:D.boolean().optional().default(!1)}),E$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),headers:D.array(cD),name:D.string(),url:D.string()}),v$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),headers:D.array(cD),name:D.string(),url:D.string()}),I$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),args:D.array(D.string()),command:D.string(),env:D.array(vD),name:D.string()}),I=D.union([E$.and(D.object({type:D.literal("http")})),v$.and(D.object({type:D.literal("sse")})),I$]),o=D.string(),q$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),description:D.string().nullish(),modelId:o,name:D.string()}),r=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),cwd:D.string(),mcpServers:D.array(I)}),gD=D.string(),S$=D.union([D.literal("allow_once"),D.literal("allow_always"),D.literal("reject_once"),D.literal("reject_always")]),R$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),kind:S$,name:D.string(),optionId:gD}),c$=D.union([D.literal("high"),D.literal("medium"),D.literal("low")]),u$=D.union([D.literal("pending"),D.literal("in_progress"),D.literal("completed")]),g$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),content:D.string(),priority:c$,status:u$}),l$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),entries:D.array(g$)}),d$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),audio:D.boolean().optional().default(!1),embeddedContext:D.boolean().optional().default(!1),image:D.boolean().optional().default(!1)}),lD=D.number().int().gte(0).lte(65535),z=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),clientCapabilities:h$.optional().default({auth:{terminal:!1},fs:{readTextFile:!1,writeTextFile:!1},terminal:!1}),clientInfo:uD.nullish(),protocolVersion:lD}),i$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),content:D.string()}),m$=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),T=D.union([D.number(),D.string()]).nullable(),sw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),requestId:T}),p$=D.enum(["assistant","user"]),E=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),audience:D.array(p$).nullish(),lastModified:D.string().nullish(),priority:D.number().nullish()}),n$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),annotations:E.nullish(),data:D.string(),mimeType:D.string()}),t$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),annotations:E.nullish(),data:D.string(),mimeType:D.string(),uri:D.string().nullish()}),o$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),annotations:E.nullish(),description:D.string().nullish(),mimeType:D.string().nullish(),name:D.string(),size:D.number().nullish(),title:D.string().nullish(),uri:D.string()}),r$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),optionId:gD}),z$=D.union([D.object({outcome:D.literal("cancelled")}),r$.and(D.object({outcome:D.literal("selected")}))]),a$=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),outcome:z$}),s$=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),e$=D.object({currentValue:D.boolean()}),Dw=D.string(),dD=D.string(),$w=D.union([D.literal("mode"),D.literal("model"),D.literal("thought_level"),D.string()]),a=D.string(),iD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),description:D.string().nullish(),name:D.string(),value:a}),ww=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),group:Dw,name:D.string(),options:D.array(iD)}),Qw=D.union([D.array(iD),D.array(ww)]),fw=D.object({currentValue:a,options:Qw}),M=D.intersection(D.union([fw.and(D.object({type:D.literal("select")})),e$.and(D.object({type:D.literal("boolean")}))]),D.object({_meta:D.record(D.string(),D.unknown()).nullish(),category:$w.nullish(),description:D.string().nullish(),id:dD,name:D.string()})),_w=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),configOptions:D.array(M)}),Gw=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),N=D.string(),s=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),sessionId:N}),ew=D.object({method:D.string(),params:D.union([s,qD]).nullish()}),e=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),sessionId:N}),DD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),args:D.array(D.string()).optional(),command:D.string(),cwd:D.string().nullish(),env:D.array(vD).optional(),outputByteLimit:D.number().nullish(),sessionId:N}),$D=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),cwd:D.string(),mcpServers:D.array(I).optional(),sessionId:N}),wD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),sessionId:N,terminalId:D.string()}),QD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),cwd:D.string(),mcpServers:D.array(I),sessionId:N}),fD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),limit:D.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),line:D.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),path:D.string(),sessionId:N}),_D=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),sessionId:N,terminalId:D.string()}),GD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),cwd:D.string(),mcpServers:D.array(I).optional(),sessionId:N}),Jw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),cwd:D.string(),sessionId:N,title:D.string().nullish(),updatedAt:D.string().nullish()}),Xw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),nextCursor:D.string().nullish(),sessions:D.array(Jw)}),Yw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),title:D.string().nullish(),updatedAt:D.string().nullish()}),Zw=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),q=D.string(),jw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),currentModeId:q}),Aw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),description:D.string().nullish(),id:q,name:D.string()}),S=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),availableModes:D.array(Aw),currentModeId:q}),R=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),availableModels:D.array(q$),currentModelId:o}),Ww=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),configOptions:D.array(M).nullish(),models:R.nullish(),modes:S.nullish(),sessionId:N}),yw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),configOptions:D.array(M).nullish(),models:R.nullish(),modes:S.nullish()}),Kw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),configOptions:D.array(M).nullish(),models:R.nullish(),modes:S.nullish(),sessionId:N}),Bw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),configOptions:D.array(M).nullish(),models:R.nullish(),modes:S.nullish()}),Ow=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),Nw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),close:s$.nullish(),fork:Gw.nullish(),list:Zw.nullish(),resume:Ow.nullish()}),Fw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),loadSession:D.boolean().optional().default(!1),mcpCapabilities:C$.optional().default({http:!1,sse:!1}),promptCapabilities:d$.optional().default({audio:!1,embeddedContext:!1,image:!1}),sessionCapabilities:Nw.optional().default({})}),Lw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),agentCapabilities:Fw.optional().default({loadSession:!1,mcpCapabilities:{http:!1,sse:!1},promptCapabilities:{audio:!1,embeddedContext:!1,image:!1},sessionCapabilities:{}}),agentInfo:uD.nullish(),authMethods:D.array(L$).optional().default([]),protocolVersion:lD}),JD=D.intersection(D.union([D.object({type:D.literal("boolean"),value:D.boolean()}),D.object({value:a})]),D.object({_meta:D.record(D.string(),D.unknown()).nullish(),configId:dD,sessionId:N})),xw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),configOptions:D.array(M)}),XD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),modeId:q,sessionId:N}),Vw=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),YD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),modelId:o,sessionId:N}),Hw=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),Pw=D.union([D.literal("end_turn"),D.literal("max_tokens"),D.literal("max_turn_requests"),D.literal("refusal"),D.literal("cancelled")]),kw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),terminalId:D.string()}),Tw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),exitCode:D.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),signal:D.string().nullish()}),ZD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),sessionId:N,terminalId:D.string()}),Uw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),exitStatus:Tw.nullish(),output:D.string(),truncated:D.boolean()}),bw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),annotations:E.nullish(),text:D.string()}),hw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),mimeType:D.string().nullish(),text:D.string(),uri:D.string()}),Mw=D.union([hw,V$]),Cw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),annotations:E.nullish(),resource:Mw}),jD=D.union([bw.and(D.object({type:D.literal("text")})),t$.and(D.object({type:D.literal("image")})),n$.and(D.object({type:D.literal("audio")})),o$.and(D.object({type:D.literal("resource_link")})),Cw.and(D.object({type:D.literal("resource")}))]),Ew=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),content:jD}),p=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),content:jD,messageId:D.string().nullish()}),AD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),messageId:D.string().nullish(),prompt:D.array(jD),sessionId:N}),DQ=D.object({id:T,method:D.string(),params:D.union([z,n,r,QD,t,$D,GD,e,XD,JD,AD,YD,SD]).nullish()}),mD=D.union([Ew.and(D.object({type:D.literal("content")})),T$.and(D.object({type:D.literal("diff")})),kw.and(D.object({type:D.literal("terminal")}))]),pD=D.string(),nD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),line:D.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),path:D.string()}),tD=D.union([D.literal("pending"),D.literal("in_progress"),D.literal("completed"),D.literal("failed")]),oD=D.union([D.literal("read"),D.literal("edit"),D.literal("delete"),D.literal("move"),D.literal("search"),D.literal("execute"),D.literal("think"),D.literal("fetch"),D.literal("switch_mode"),D.literal("other")]),vw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),content:D.array(mD).optional(),kind:oD.optional(),locations:D.array(nD).optional(),rawInput:D.unknown().optional(),rawOutput:D.unknown().optional(),status:tD.optional(),title:D.string(),toolCallId:pD}),rD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),content:D.array(mD).nullish(),kind:oD.nullish(),locations:D.array(nD).nullish(),rawInput:D.unknown().optional(),rawOutput:D.unknown().optional(),status:tD.nullish(),title:D.string().nullish(),toolCallId:pD}),WD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),options:D.array(R$),sessionId:N,toolCall:rD}),Iw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),hint:D.string()}),qw=Iw,Sw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),description:D.string(),input:qw.nullish(),name:D.string()}),Rw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),availableCommands:D.array(Sw)}),cw=D.object({cachedReadTokens:D.number().nullish(),cachedWriteTokens:D.number().nullish(),inputTokens:D.number(),outputTokens:D.number(),thoughtTokens:D.number().nullish(),totalTokens:D.number()}),uw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),stopReason:Pw,usage:cw.nullish(),userMessageId:D.string().nullish()}),$Q=D.union([D.object({id:T,result:D.union([Lw,x$,Kw,yw,Xw,Ww,Bw,H$,Vw,xw,uw,Hw,RD])}),D.object({error:ID,id:T})]),gw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),cost:P$.nullish(),size:D.number(),used:D.number()}),lw=D.union([p.and(D.object({sessionUpdate:D.literal("user_message_chunk")})),p.and(D.object({sessionUpdate:D.literal("agent_message_chunk")})),p.and(D.object({sessionUpdate:D.literal("agent_thought_chunk")})),vw.and(D.object({sessionUpdate:D.literal("tool_call")})),rD.and(D.object({sessionUpdate:D.literal("tool_call_update")})),l$.and(D.object({sessionUpdate:D.literal("plan")})),Rw.and(D.object({sessionUpdate:D.literal("available_commands_update")})),jw.and(D.object({sessionUpdate:D.literal("current_mode_update")})),_w.and(D.object({sessionUpdate:D.literal("config_option_update")})),Yw.and(D.object({sessionUpdate:D.literal("session_info_update")})),gw.and(D.object({sessionUpdate:D.literal("usage_update")}))]),yD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),sessionId:N,update:lw}),wQ=D.object({method:D.string(),params:D.union([yD,qD]).nullish()}),KD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),sessionId:N,terminalId:D.string()}),dw=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),exitCode:D.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),signal:D.string().nullish()}),BD=D.object({_meta:D.record(D.string(),D.unknown()).nullish(),content:D.string(),path:D.string(),sessionId:N}),QQ=D.object({id:T,method:D.string(),params:D.union([BD,fD,WD,DD,ZD,_D,KD,wD,SD]).nullish()}),iw=D.object({_meta:D.record(D.string(),D.unknown()).nullish()}),fQ=D.union([D.object({id:T,result:D.union([iw,i$,a$,k$,Uw,m$,dw,M$,RD])}),D.object({error:ID,id:T})]);function zD($,Q){let w=new TextEncoder,f=new TextDecoder,X=new ReadableStream({async start(_){let J="",j=Q.getReader();try{while(!0){let{value:B,done:Y}=await j.read();if(Y)break;if(!B)continue;J+=f.decode(B,{stream:!0});let Z=J.split(`
3
3
  `);J=Z.pop()||"";for(let A of Z){let y=A.trim();if(y)try{let W=JSON.parse(y);_.enqueue(W)}catch(W){console.error("Failed to parse JSON message:",y,W)}}}}finally{j.releaseLock(),_.close()}}}),G=new WritableStream({async write(_){let J=JSON.stringify(_)+`
4
4
  `,j=$.getWriter();try{await j.write(w.encode(J))}finally{j.releaseLock()}}});return{readable:X,writable:G}}class OD{#D;constructor($,Q){let w=$(this),f=async(G,_)=>{switch(G){case O.initialize:{let J=z.parse(_);return w.initialize(J)}case O.session_new:{let J=r.parse(_);return w.newSession(J)}case O.session_load:{if(!w.loadSession)throw K.methodNotFound(G);let J=QD.parse(_);return w.loadSession(J)}case O.session_list:{if(!w.listSessions)throw K.methodNotFound(G);let J=t.parse(_);return w.listSessions(J)}case O.session_fork:{if(!w.unstable_forkSession)throw K.methodNotFound(G);let J=$D.parse(_);return w.unstable_forkSession(J)}case O.session_resume:{if(!w.unstable_resumeSession)throw K.methodNotFound(G);let J=GD.parse(_);return w.unstable_resumeSession(J)}case O.session_close:{if(!w.unstable_closeSession)throw K.methodNotFound(G);let J=e.parse(_);return w.unstable_closeSession(J)}case O.session_set_mode:{if(!w.setSessionMode)throw K.methodNotFound(G);let J=XD.parse(_);return await w.setSessionMode(J)??{}}case O.authenticate:{let J=n.parse(_);return await w.authenticate(J)??{}}case O.session_prompt:{let J=AD.parse(_);return w.prompt(J)}case O.session_set_model:{if(!w.unstable_setSessionModel)throw K.methodNotFound(G);let J=YD.parse(_);return await w.unstable_setSessionModel(J)??{}}case O.session_set_config_option:{if(!w.setSessionConfigOption)throw K.methodNotFound(G);let J=JD.parse(_);return w.setSessionConfigOption(J)}default:if(w.extMethod)return w.extMethod(G,_);throw K.methodNotFound(G)}},X=async(G,_)=>{switch(G){case O.session_cancel:{let J=s.parse(_);return w.cancel(J)}default:if(w.extNotification)return w.extNotification(G,_);throw K.methodNotFound(G)}};this.#D=new ND(f,X,Q)}async sessionUpdate($){return await this.#D.sendNotification(F.session_update,$)}async requestPermission($){return await this.#D.sendRequest(F.session_request_permission,$)}async readTextFile($){return await this.#D.sendRequest(F.fs_read_text_file,$)}async writeTextFile($){return await this.#D.sendRequest(F.fs_write_text_file,$)??{}}async createTerminal($){let Q=await this.#D.sendRequest(F.terminal_create,$);return new aD(Q.terminalId,$.sessionId,this.#D)}async extMethod($,Q){return await this.#D.sendRequest($,Q)}async extNotification($,Q){return await this.#D.sendNotification($,Q)}get signal(){return this.#D.signal}get closed(){return this.#D.closed}}class aD{id;#D;#$;constructor($,Q,w){this.id=$,this.#D=Q,this.#$=w}async currentOutput(){return await this.#$.sendRequest(F.terminal_output,{sessionId:this.#D,terminalId:this.id})}async waitForExit(){return await this.#$.sendRequest(F.terminal_wait_for_exit,{sessionId:this.#D,terminalId:this.id})}async kill(){return await this.#$.sendRequest(F.terminal_kill,{sessionId:this.#D,terminalId:this.id})??{}}async release(){return await this.#$.sendRequest(F.terminal_release,{sessionId:this.#D,terminalId:this.id})??{}}async[Symbol.asyncDispose](){await this.release()}}class pw{#D;constructor($,Q){let w=$(this),f=async(G,_)=>{switch(G){case F.fs_write_text_file:{let J=BD.parse(_);return w.writeTextFile?.(J)}case F.fs_read_text_file:{let J=fD.parse(_);return w.readTextFile?.(J)}case F.session_request_permission:{let J=WD.parse(_);return w.requestPermission(J)}case F.terminal_create:{let J=DD.parse(_);return w.createTerminal?.(J)}case F.terminal_output:{let J=ZD.parse(_);return w.terminalOutput?.(J)}case F.terminal_release:{let J=_D.parse(_);return await w.releaseTerminal?.(J)??{}}case F.terminal_wait_for_exit:{let J=KD.parse(_);return w.waitForTerminalExit?.(J)}case F.terminal_kill:{let J=wD.parse(_);return await w.killTerminal?.(J)??{}}default:if(w.extMethod)return w.extMethod(G,_);throw K.methodNotFound(G)}},X=async(G,_)=>{switch(G){case F.session_update:{let J=yD.parse(_);return w.sessionUpdate(J)}default:if(w.extNotification)return w.extNotification(G,_);throw K.methodNotFound(G)}};this.#D=new ND(f,X,Q)}async initialize($){return await this.#D.sendRequest(O.initialize,$)}async newSession($){return await this.#D.sendRequest(O.session_new,$)}async loadSession($){return await this.#D.sendRequest(O.session_load,$)??{}}async unstable_forkSession($){return await this.#D.sendRequest(O.session_fork,$)}async listSessions($){return await this.#D.sendRequest(O.session_list,$)}async unstable_resumeSession($){return await this.#D.sendRequest(O.session_resume,$)}async unstable_closeSession($){return await this.#D.sendRequest(O.session_close,$)}async setSessionMode($){return await this.#D.sendRequest(O.session_set_mode,$)??{}}async unstable_setSessionModel($){return await this.#D.sendRequest(O.session_set_model,$)??{}}async setSessionConfigOption($){return await this.#D.sendRequest(O.session_set_config_option,$)}async authenticate($){return await this.#D.sendRequest(O.authenticate,$)??{}}async prompt($){return await this.#D.sendRequest(O.session_prompt,$)}async cancel($){return await this.#D.sendNotification(O.session_cancel,$)}async extMethod($,Q){return await this.#D.sendRequest($,Q)}async extNotification($,Q){return await this.#D.sendNotification($,Q)}get signal(){return this.#D.signal}get closed(){return this.#D.closed}}class ND{#D=new Map;#$=0;#G;#J;#Q;#f=Promise.resolve();#_=new AbortController;#X;constructor($,Q,w){this.#G=$,this.#J=Q,this.#Q=w,this.#X=new Promise((f)=>{this.#_.signal.addEventListener("abort",()=>f())}),this.#Y()}get signal(){return this.#_.signal}get closed(){return this.#X}async#Y(){let $=this.#Q.readable.getReader();try{while(!0){let{value:Q,done:w}=await $.read();if(w)break;if(!Q)continue;try{this.#Z(Q)}catch(f){if(console.error("Unexpected error during message processing:",Q,f),"id"in Q&&Q.id!==void 0)this.#w({jsonrpc:"2.0",id:Q.id,error:{code:-32700,message:"Parse error"}})}}}finally{$.releaseLock(),this.#_.abort()}}async#Z($){if("method"in $&&"id"in $){let Q=await this.#j($.method,$.params);if("error"in Q)console.error("Error handling request",$,Q.error);await this.#w({jsonrpc:"2.0",id:$.id,...Q})}else if("method"in $){let Q=await this.#A($.method,$.params);if("error"in Q)console.error("Error handling notification",$,Q.error)}else if("id"in $)this.#W($);else console.error("Invalid message",{message:$})}async#j($,Q){try{return{result:await this.#G($,Q)??null}}catch(w){if(w instanceof K)return w.toResult();if(w instanceof D.ZodError)return K.invalidParams(w.format()).toResult();let f;if(w instanceof Error)f=w.message;else if(typeof w==="object"&&w!=null&&"message"in w&&typeof w.message==="string")f=w.message;try{return K.internalError(f?JSON.parse(f):{}).toResult()}catch{return K.internalError({details:f}).toResult()}}}async#A($,Q){try{return await this.#J($,Q),{result:null}}catch(w){if(w instanceof K)return w.toResult();if(w instanceof D.ZodError)return K.invalidParams(w.format()).toResult();let f;if(w instanceof Error)f=w.message;else if(typeof w==="object"&&w!=null&&"message"in w&&typeof w.message==="string")f=w.message;try{return K.internalError(f?JSON.parse(f):{}).toResult()}catch{return K.internalError({details:f}).toResult()}}}#W($){let Q=this.#D.get($.id);if(Q){if("result"in $)Q.resolve($.result);else if("error"in $)Q.reject($.error);this.#D.delete($.id)}else console.error("Got response to unknown request",$.id)}async sendRequest($,Q){let w=this.#$++,f=new Promise((X,G)=>{this.#D.set(w,{resolve:X,reject:G})});return await this.#w({jsonrpc:"2.0",id:w,method:$,params:Q}),f}async sendNotification($,Q){await this.#w({jsonrpc:"2.0",method:$,params:Q})}async#w($){return this.#f=this.#f.then(async()=>{let Q=this.#Q.writable.getWriter();try{await Q.write($)}finally{Q.releaseLock()}}).catch((Q)=>{console.error("ACP write error:",Q)}),this.#f}}class K extends Error{code;data;constructor($,Q,w){super(Q);this.code=$,this.name="RequestError",this.data=w}static parseError($,Q){return new K(-32700,`Parse error${Q?`: ${Q}`:""}`,$)}static invalidRequest($,Q){return new K(-32600,`Invalid request${Q?`: ${Q}`:""}`,$)}static methodNotFound($){return new K(-32601,`"Method not found": ${$}`,{method:$})}static invalidParams($,Q){return new K(-32602,`Invalid params${Q?`: ${Q}`:""}`,$)}static internalError($,Q){return new K(-32603,`Internal error${Q?`: ${Q}`:""}`,$)}static authRequired($,Q){return new K(-32000,`Authentication required${Q?`: ${Q}`:""}`,$)}static resourceNotFound($){return new K(-32002,`Resource not found${$?`: ${$}`:""}`,$&&{uri:$})}toResult(){return{error:{code:this.code,message:this.message,data:this.data}}}toErrorResponse(){return{code:this.code,message:this.message,data:this.data}}}var v={};ow(v,{init:()=>zw,Agent:()=>CD,ACP:()=>v});var FD=H.create({service:"acp-session-manager"});class LD{sessions=new Map;sdk;constructor($){this.sdk=$}tryGet($){return this.sessions.get($)}async create($,Q,w){let X=(await this.sdk.session.create({directory:$},{throwOnError:!0}).then((J)=>J.data)).id,_={id:X,cwd:$,mcpServers:Q,createdAt:new Date,model:w};return FD.info("creating_session",{state:_}),this.sessions.set(X,_),_}async load($,Q,w,f){let X=await this.sdk.session.get({sessionID:$,directory:Q},{throwOnError:!0}).then((J)=>J.data),G=f,_={id:$,cwd:Q,mcpServers:w,createdAt:new Date(X.time.created),model:G};return FD.info("loading_session",{state:_}),this.sessions.set($,_),_}get($){let Q=this.sessions.get($);if(!Q)throw FD.error("session not found",{sessionId:$}),K.invalidParams(JSON.stringify({error:`Session not found: ${$}`}));return Q}getModel($){return this.get($).model}setModel($,Q){let w=this.get($);return w.model=Q,this.sessions.set($,w),w}getVariant($){return this.get($).variant}setVariant($,Q){let w=this.get($);return w.variant=Q,this.sessions.set($,w),w}setMode($,Q){let w=this.get($);return w.modeId=Q,this.sessions.set($,w),w}}import{pathToFileURL as c}from"url";var nw=H.create({service:"acp-message-translator"}),tw="default";function b($){switch($.toLocaleLowerCase()){case"bash":return"execute";case"webfetch":return"fetch";case"edit":case"patch":case"write":return"edit";case"grep":case"glob":case"context7_resolve_library_id":case"context7_get_library_docs":return"search";case"read":return"read";default:return"other"}}function u($,Q){switch($.toLocaleLowerCase()){case"read":case"edit":case"write":return Q.filePath?[{path:Q.filePath}]:[];case"glob":case"grep":return Q.path?[{path:Q.path}]:[];case"bash":return[];default:return[]}}function g($){try{if($.startsWith("file://")){let Q=$.slice(7),w=Q.split("/").pop()||Q;return{type:"file",url:$,filename:w,mime:"text/plain"}}if($.startsWith("zed://")){let w=new URL($).searchParams.get("path");if(w){let f=w.split("/").pop()||w;return{type:"file",url:c(w).href,filename:f,mime:"text/plain"}}}return{type:"text",text:$}}catch{return{type:"text",text:$}}}function eD($,Q){let w=sD($,Q);if(w===!1){nw.error("Failed to apply unified diff (context mismatch)");return}return w}function xD($){if($.tool!=="bash")return;if(!("metadata"in $.state)||!$.state.metadata||typeof $.state.metadata!=="object")return;let Q=$.state.metadata.output;if(typeof Q!=="string")return;return Q}function l($){return[...$].sort((Q,w)=>{let f=Q.name.toLowerCase(),X=w.name.toLowerCase();if(f<X)return-1;if(f>X)return 1;return 0})}function VD($,Q){let w=$.find((X)=>X.id===Q.providerID);if(!w)return[];let f=w.models[Q.modelID];if(!f?.variants)return[];return Object.keys(f.variants)}function D$($,Q={}){let w=Q.includeVariants??!1;return $.flatMap((f)=>{let X=Object.values(f.models);return U.sort(X).flatMap((_)=>{let J={modelId:`${f.id}/${_.id}`,name:`${f.name}/${_.name}`};if(!w||!_.variants)return[J];let B=Object.keys(_.variants).filter((Y)=>Y!==tw).map((Y)=>({modelId:`${f.id}/${_.id}/${Y}`,name:`${f.name}/${_.name} (${Y})`}));return[J,...B]})})}function d($,Q,w,f){let X=`${$.providerID}/${$.modelID}`;if(!f||!Q||!w.includes(Q))return X;return`${X}/${Q}`}function HD($){return{opencode:{modelId:`${$.model.providerID}/${$.model.modelID}`,variant:$.variant??null,availableVariants:$.availableVariants}}}function PD($,Q){let w=U.parseModel($),f=Q.find((G)=>G.id===w.providerID);if(!f)return{model:w,variant:void 0};if(f.models[w.modelID])return{model:w,variant:void 0};let X=w.modelID.split("/");if(X.length>1){let G=X[X.length-1],_=X.slice(0,-1).join("/"),J=f.models[_];if(J?.variants&&G in J.variants)return{model:{providerID:w.providerID,modelID:P.make(_)},variant:G}}return{model:w,variant:void 0}}function i($){let Q=[{id:"model",name:"Model",category:"model",type:"select",currentValue:$.currentModelId,options:$.availableModels.map((w)=>({value:w.modelId,name:w.name}))}];if($.modes)Q.push({id:"mode",name:"Session Mode",category:"mode",type:"select",currentValue:$.modes.currentModeId,options:$.modes.availableModes.map((w)=>({value:w.id,name:w.name,...w.description?{description:w.description}:{}}))});return Q}var $$=H.create({service:"acp-permissions"});class TD{connection;sdk;sessionManager;permissionQueues=new Map;permissionOptions=[{optionId:"once",kind:"allow_once",name:"Allow once"},{optionId:"always",kind:"allow_always",name:"Always allow"},{optionId:"reject",kind:"reject_once",name:"Reject"}];constructor($,Q,w){this.connection=$;this.sdk=Q;this.sessionManager=w}handle($){let Q=this.sessionManager.tryGet($.sessionID);if(!Q)return;let f=(this.permissionQueues.get($.sessionID)??Promise.resolve()).then(async()=>{let X=Q.cwd,G=await this.connection.requestPermission({sessionId:$.sessionID,toolCall:{toolCallId:$.tool?.callID??$.id,status:"pending",title:$.permission,rawInput:$.metadata,kind:b($.permission),locations:u($.permission,$.metadata??{})},options:this.permissionOptions}).catch(async(_)=>{$$.error("failed to request permission from ACP",{error:_,permissionID:$.id,sessionID:$.sessionID}),await this.sdk.permission.reply({requestID:$.id,reply:"reject",directory:X});return});if(!G)return;if(G.outcome.outcome!=="selected"){await this.sdk.permission.reply({requestID:$.id,reply:"reject",directory:X});return}if(G.outcome.optionId!=="reject"&&$.permission=="edit"){let _=$.metadata||{},J=typeof _.filepath==="string"?_.filepath:"",j=typeof _.diff==="string"?_.diff:"",B=await kD.exists(J)?await kD.readText(J):"",Y=eD(B,j);if(Y)this.connection.writeTextFile({sessionId:Q.id,path:J,content:Y})}await this.sdk.permission.reply({requestID:$.id,reply:G.outcome.optionId,directory:X})}).catch((X)=>{$$.error("failed to handle permission",{error:X,permissionID:$.id})}).finally(()=>{if(this.permissionQueues.get($.sessionID)===f)this.permissionQueues.delete($.sessionID)});this.permissionQueues.set($.sessionID,f)}}var L=H.create({service:"acp-event-bridge"});class UD{connection;sdk;sessionManager;eventAbort=new AbortController;eventStarted=!1;bashSnapshots=new Map;toolStarts=new Set;permissionHandler;constructor($,Q,w){this.connection=$;this.sdk=Q;this.sessionManager=w;this.permissionHandler=new TD($,Q,w)}start(){if(this.eventStarted)return;this.eventStarted=!0,this.runEventSubscription().catch(($)=>{if(this.eventAbort.signal.aborted)return;L.error("event subscription failed",{error:$})})}stop(){this.eventAbort.abort()}async runEventSubscription(){while(!0){if(this.eventAbort.signal.aborted)return;let $=await this.sdk.global.event({signal:this.eventAbort.signal,sseMaxRetryAttempts:0});for await(let Q of $.stream){if(this.eventAbort.signal.aborted)return;let w=Q?.payload;if(!w)continue;await this.handleEvent(w).catch((f)=>{L.error("failed to handle event",{error:f,type:w.type})})}if(this.eventAbort.signal.aborted)return;await new Promise((Q)=>{let w=()=>{clearTimeout(f),this.eventAbort.signal.removeEventListener("abort",w),Q()},f=setTimeout(w,1000);if(this.eventAbort.signal.addEventListener("abort",w,{once:!0}),this.eventAbort.signal.aborted)w()})}}async handleEvent($){switch($.type){case"permission.asked":{this.permissionHandler.handle($.properties);return}case"message.part.updated":{L.info("message part updated",{event:$.properties});let w=$.properties.part,f=this.sessionManager.tryGet(w.sessionID);if(!f)return;let X=f.id;if(w.type==="tool")switch(await this.toolStart(X,w),w.state.status){case"pending":this.bashSnapshots.delete(w.callID);return;case"running":{let G=xD(w),_=[];if(G){let J=w$.fast(G);if(w.tool==="bash"){if(this.bashSnapshots.get(w.callID)===J){await this.sendToolInProgress(X,w,w.state,[]);return}this.bashSnapshots.set(w.callID,J)}_.push({type:"content",content:{type:"text",text:G}})}await this.sendToolInProgress(X,w,w.state,_);return}case"completed":await this.sendToolCompleted(X,w,w.state);return;case"error":await this.sendToolError(X,w,w.state);return}if(w.type!=="text"&&w.type!=="file")return;return}case"message.part.delta":{let Q=$.properties,w=this.sessionManager.tryGet(Q.sessionID);if(!w)return;let f=w.id,X=await this.sdk.session.message({sessionID:Q.sessionID,messageID:Q.messageID,directory:w.cwd},{throwOnError:!0}).then((_)=>_.data).catch((_)=>{L.error("unexpected error when fetching message",{error:_});return});if(!X||X.info.role!=="assistant")return;let G=X.parts.find((_)=>_.id===Q.partID);if(!G)return;if(G.type==="text"&&Q.field==="text"&&G.ignored!==!0){await this.connection.sessionUpdate({sessionId:f,update:{sessionUpdate:"agent_message_chunk",messageId:Q.messageID,content:{type:"text",text:Q.delta}}}).catch((_)=>{L.error("failed to send text delta to ACP",{error:_})});return}if(G.type==="reasoning"&&Q.field==="text")await this.connection.sessionUpdate({sessionId:f,update:{sessionUpdate:"agent_thought_chunk",messageId:Q.messageID,content:{type:"text",text:Q.delta}}}).catch((_)=>{L.error("failed to send reasoning delta to ACP",{error:_})});return}}}async sendToolInProgress($,Q,w,f){await this.connection.sessionUpdate({sessionId:$,update:{sessionUpdate:"tool_call_update",toolCallId:Q.callID,status:"in_progress",kind:b(Q.tool),title:Q.tool,locations:u(Q.tool,w.input),rawInput:w.input,...f.length>0&&{content:f}}}).catch((X)=>{L.error("failed to send tool in_progress to ACP",{error:X})})}async sendToolCompleted($,Q,w){this.toolStarts.delete(Q.callID),this.bashSnapshots.delete(Q.callID);let f=b(Q.tool),X=[{type:"content",content:{type:"text",text:w.output}}];if(f==="edit"){let G=w.input,_=typeof G.filePath==="string"?G.filePath:"",J=typeof G.oldString==="string"?G.oldString:"",j=typeof G.newString==="string"?G.newString:typeof G.content==="string"?G.content:"";X.push({type:"diff",path:_,oldText:J,newText:j})}await this.connection.sessionUpdate({sessionId:$,update:{sessionUpdate:"tool_call_update",toolCallId:Q.callID,status:"completed",kind:f,content:X,title:w.title,rawInput:w.input,rawOutput:{output:w.output,metadata:w.metadata}}}).catch((G)=>{L.error("failed to send tool completed to ACP",{error:G})})}async sendToolError($,Q,w){this.toolStarts.delete(Q.callID),this.bashSnapshots.delete(Q.callID),await this.connection.sessionUpdate({sessionId:$,update:{sessionUpdate:"tool_call_update",toolCallId:Q.callID,status:"failed",kind:b(Q.tool),title:Q.tool,rawInput:w.input,content:[{type:"content",content:{type:"text",text:w.error}}],rawOutput:{error:w.error,metadata:w.metadata}}}).catch((f)=>{L.error("failed to send tool error to ACP",{error:f})})}async toolStart($,Q){if(this.toolStarts.has(Q.callID))return;this.toolStarts.add(Q.callID),await this.connection.sessionUpdate({sessionId:$,update:{sessionUpdate:"tool_call",toolCallId:Q.callID,title:Q.tool,kind:b(Q.tool),status:"pending",locations:[],rawInput:{}}}).catch((w)=>{L.error("failed to send tool pending to ACP",{error:w})})}async processMessage($){if(L.debug("process message",$),$.info.role!=="assistant"&&$.info.role!=="user")return;let Q=$.info.sessionID;for(let w of $.parts)if(w.type==="tool")switch(await this.toolStart(Q,w),w.state.status){case"pending":this.bashSnapshots.delete(w.callID);break;case"running":{let f=xD(w),X=[];if(f)X.push({type:"content",content:{type:"text",text:f}});await this.sendToolInProgress(Q,w,w.state,X);break}case"completed":await this.sendToolCompleted(Q,w,w.state);break;case"error":await this.sendToolError(Q,w,w.state);break}else if(w.type==="text"){if(w.text){let f=w.synthetic?["assistant"]:w.ignored?["user"]:void 0;await this.connection.sessionUpdate({sessionId:Q,update:{sessionUpdate:$.info.role==="user"?"user_message_chunk":"agent_message_chunk",messageId:$.info.id,content:{type:"text",text:w.text,...f&&{annotations:{audience:f}}}}}).catch((X)=>{L.error("failed to send text to ACP",{error:X})})}}else if(w.type==="file"){let f=w.url,X=w.filename??"file",G=w.mime||"application/octet-stream",_=$.info.role==="user"?"user_message_chunk":"agent_message_chunk";if(f.startsWith("file://"))await this.connection.sessionUpdate({sessionId:Q,update:{sessionUpdate:_,messageId:$.info.id,content:{type:"resource_link",uri:f,name:X,mimeType:G}}}).catch((J)=>{L.error("failed to send resource_link to ACP",{error:J})});else if(f.startsWith("data:")){let J=f.match(/^data:([^;]+);base64,(.*)$/),j=J?.[1],B=J?.[2]??"",Y=j||G;if(Y.startsWith("image/"))await this.connection.sessionUpdate({sessionId:Q,update:{sessionUpdate:_,messageId:$.info.id,content:{type:"image",mimeType:Y,data:B,uri:c(X).href}}}).catch((Z)=>{L.error("failed to send image to ACP",{error:Z})});else{let Z=Y.startsWith("text/")||Y==="application/json",A=c(X).href,y=Z?{uri:A,mimeType:Y,text:Buffer.from(B,"base64").toString("utf-8")}:{uri:A,mimeType:Y,blob:B};await this.connection.sessionUpdate({sessionId:Q,update:{sessionUpdate:_,messageId:$.info.id,content:{type:"resource",resource:y}}}).catch((W)=>{L.error("failed to send resource to ACP",{error:W})})}}}else if(w.type==="reasoning"){if(w.text)await this.connection.sessionUpdate({sessionId:Q,update:{sessionUpdate:"agent_thought_chunk",messageId:$.info.id,content:{type:"text",text:w.text}}}).catch((f)=>{L.error("failed to send reasoning to ACP",{error:f})})}}}var V=H.create({service:"acp-agent"});async function rw($,Q,w,f){return(await $.config.providers({directory:f}).then((J)=>J.data?.providers??[]).catch((J)=>{return V.error("failed to get providers for context limit",{error:J}),[]})).find((J)=>J.id===Q)?.models[w]?.limit.context??null}async function bD($,Q,w,f){let X=await Q.session.messages({sessionID:w,directory:f,agent_id:"main"},{throwOnError:!0}).then((Z)=>Z.data).catch((Z)=>{V.error("failed to fetch messages for usage update",{error:Z});return});if(!X)return;let G=X.filter((Z)=>Z.info.role==="assistant"),_=G[G.length-1];if(!_)return;let J=_.info;if(!J.providerID||!J.modelID)return;let j=await rw(Q,k.make(J.providerID),P.make(J.modelID),f);if(!j)return;let B=J.tokens.input+(J.tokens.cache?.read??0),Y=G.reduce((Z,A)=>Z+A.info.cost,0);await $.sessionUpdate({sessionId:w,update:{sessionUpdate:"usage_update",used:B,size:j,cost:{amount:Y,currency:"USD"}}}).catch((Z)=>{V.error("failed to send usage update",{error:Z})})}async function zw({sdk:$}){return{create:(Q,w)=>{return new CD(Q,w)}}}class CD{connection;config;sdk;sessionManager;eventBridge;constructor($,Q){this.connection=$,this.config=Q,this.sdk=Q.sdk,this.sessionManager=new LD(this.sdk),this.eventBridge=new UD($,this.sdk,this.sessionManager),this.eventBridge.start()}async initialize($){V.info("initialize",{protocolVersion:$.protocolVersion});let Q={description:"Run `qitqode auth login` in the terminal",name:"Login with qitqode",id:"qitqode-login"};if($.clientCapabilities?._meta?.["terminal-auth"]===!0)Q._meta={"terminal-auth":{command:"qitqode",args:["auth","login"],label:"QitQode Login"}};return{protocolVersion:1,agentCapabilities:{loadSession:!0,mcpCapabilities:{http:!0,sse:!0},promptCapabilities:{embeddedContext:!0,image:!0},sessionCapabilities:{fork:{},list:{},resume:{}}},authMethods:[Q],agentInfo:{name:"QitQode",version:Q$}}}async authenticate($){throw Error("Authentication not implemented")}rethrowSessionError($){let Q=G$.fromError($,{providerID:k.make(this.config.defaultModel?.providerID??"unknown")});if(f$.isInstance(Q))throw K.authRequired();throw $}fetchSessionMessages($,Q){return this.sdk.session.messages({sessionID:$,directory:Q,agent_id:"main"},{throwOnError:!0}).then((w)=>w.data).catch((w)=>{V.error("unexpected error when fetching message",{error:w});return})}loadSessionProviders($){return this.sdk.config.providers({directory:$},{throwOnError:!0}).then((Q)=>Q.data.providers)}async newSession($){let Q=$.cwd;try{let w=await h(this.config,Q),X=(await this.sessionManager.create($.cwd,$.mcpServers,w)).id;V.info("creating_session",{sessionId:X,mcpServers:$.mcpServers.length});let G=await this.loadSessionMode({cwd:Q,mcpServers:$.mcpServers,sessionId:X});return{sessionId:X,configOptions:G.configOptions,models:G.models,modes:G.modes,_meta:G._meta}}catch(w){this.rethrowSessionError(w)}}async loadSession($){let{cwd:Q,sessionId:w}=$;try{let f=await h(this.config,Q);await this.sessionManager.load(w,$.cwd,$.mcpServers,f),V.info("load_session",{sessionId:w,mcpServers:$.mcpServers.length});let X=await this.loadSessionMode({cwd:Q,mcpServers:$.mcpServers,sessionId:w}),G=await this.fetchSessionMessages(w,Q),_=G?.findLast((J)=>J.info.role==="user")?.info;if(_?.role==="user"){if(X.models.currentModelId=`${_.model.providerID}/${_.model.modelID}`,this.sessionManager.setModel(w,{providerID:k.make(_.model.providerID),modelID:P.make(_.model.modelID)}),X.modes?.availableModes.some((J)=>J.id===_.agent))X.modes.currentModeId=_.agent,this.sessionManager.setMode(w,_.agent);X.configOptions=i({currentModelId:X.models.currentModelId,availableModels:X.models.availableModels,modes:X.modes})}return await this.replayMessagesAndSendUsage(G,w,Q),X}catch(f){this.rethrowSessionError(f)}}async listSessions($){try{let w=await this.sdk.session.list({directory:$.cwd??void 0,roots:!0},{throwOnError:!0}).then((Z)=>Z.data??[]),f=$.cursor?Number($.cursor):void 0,X=w.toSorted((Z,A)=>A.time.updated-Z.time.updated),G=f?X.filter((Z)=>Z.time.updated<f):X,_=G.slice(0,100),J=_.map((Z)=>({sessionId:Z.id,cwd:Z.directory,title:Z.title,updatedAt:new Date(Z.time.updated).toISOString()})),j=_[_.length-1],B=G.length>100&&j?String(j.time.updated):void 0,Y={sessions:J};if(B)Y.nextCursor=B;return Y}catch(Q){this.rethrowSessionError(Q)}}async unstable_forkSession($){let Q=$.cwd,w=$.mcpServers??[];try{let f=await h(this.config,Q),X=await this.sdk.session.fork({sessionID:$.sessionId,directory:Q},{throwOnError:!0}).then((j)=>j.data);if(!X)throw Error("Fork session returned no data");let G=X.id;await this.sessionManager.load(G,Q,w,f),V.info("fork_session",{sessionId:G,mcpServers:w.length});let _=await this.loadSessionMode({cwd:Q,mcpServers:w,sessionId:G}),J=await this.fetchSessionMessages(G,Q);return await this.replayMessagesAndSendUsage(J,G,Q),_}catch(f){this.rethrowSessionError(f)}}async unstable_resumeSession($){let{cwd:Q,sessionId:w}=$,f=$.mcpServers??[];try{let X=await h(this.config,Q);await this.sessionManager.load(w,Q,f,X),V.info("resume_session",{sessionId:w,mcpServers:f.length});let G=await this.loadSessionMode({cwd:Q,mcpServers:f,sessionId:w});return await bD(this.connection,this.sdk,w,Q),G}catch(X){this.rethrowSessionError(X)}}async loadAvailableModes($){return(await this.config.sdk.app.agents({directory:$},{throwOnError:!0}).then((w)=>w.data)).filter((w)=>w.mode!=="subagent"&&!w.hidden).map((w)=>({id:w.name,name:w.name,description:w.description}))}async resolveModeState($,Q){let w=await this.loadAvailableModes($),f=this.sessionManager.get(Q).modeId||await(async()=>{if(!w.length)return;let X=await MD.runPromise(hD.Service.use((_)=>_.defaultAgent())),G=w.find((_)=>_.name===X)?.id??w[0].id;return this.sessionManager.setMode(Q,G),G})();return{availableModes:w,currentModeId:f}}async replayMessagesAndSendUsage($,Q,w){for(let f of $??[])V.debug("replay message",f),await this.eventBridge.processMessage(f);await bD(this.connection,this.sdk,Q,w)}async resolveModelsAndModes($){let Q=VD($.entries,$.model);$.onVariants?.(Q);let w=D$($.entries,{includeVariants:!0}),f=await this.resolveModeState($.directory,$.sessionId),X=f.currentModeId?{availableModes:f.availableModes,currentModeId:f.currentModeId}:void 0;return{availableVariants:Q,availableModels:w,modes:X}}async loadSessionMode($){let Q=$.cwd,w=await h(this.config,Q),f=$.sessionId,X=await this.sdk.config.providers({directory:Q}).then((W)=>W.data.providers),G=l(X),_=this.sessionManager.getVariant(f),{availableVariants:J,availableModels:j,modes:B}=await this.resolveModelsAndModes({entries:G,model:w,directory:Q,sessionId:f,onVariants:(W)=>{if(_&&!W.includes(_))this.sessionManager.setVariant(f,void 0)}}),Z=(await this.config.sdk.command.list({directory:Q},{throwOnError:!0}).then((W)=>W.data)).map((W)=>({name:W.name,description:W.description??""}));if(!new Set(Z.map((W)=>W.name)).has("compact"))Z.push({name:"compact",description:"summarize the session to reduce context"});let y={};for(let W of $.mcpServers)if("type"in W)y[W.name]={url:W.url,headers:W.headers.reduce((x,{name:C,value:m})=>{return x[C]=m,x},{}),type:"remote"};else y[W.name]={type:"local",command:[W.command,...W.args],environment:W.env.reduce((x,{name:C,value:m})=>{return x[C]=m,x},{})};return await Promise.all(Object.entries(y).map(async([W,x])=>{await this.sdk.mcp.add({directory:Q,name:W,config:x},{throwOnError:!0}).catch((C)=>{V.error("failed to add mcp server",{name:W,error:C})})})),setTimeout(()=>{this.connection.sessionUpdate({sessionId:f,update:{sessionUpdate:"available_commands_update",availableCommands:Z}})},0),{sessionId:f,models:{currentModelId:d(w,_,J,!0),availableModels:j},modes:B,configOptions:i({currentModelId:d(w,_,J,!0),availableModels:j,modes:B}),_meta:HD({model:w,variant:this.sessionManager.getVariant(f),availableVariants:J})}}async unstable_setSessionModel($){let Q=this.sessionManager.get($.sessionId),w=await this.loadSessionProviders(Q.cwd),f=PD($.modelId,w);this.sessionManager.setModel(Q.id,f.model),this.sessionManager.setVariant(Q.id,f.variant);let X=l(w),G=VD(X,f.model);return{_meta:HD({model:f.model,variant:f.variant,availableVariants:G})}}async setSessionMode($){let Q=this.sessionManager.get($.sessionId);if(!(await this.loadAvailableModes(Q.cwd)).some((f)=>f.id===$.modeId))throw Error(`Agent not found: ${$.modeId}`);this.sessionManager.setMode($.sessionId,$.modeId)}async setSessionConfigOption($){let Q=this.sessionManager.get($.sessionId),w=await this.loadSessionProviders(Q.cwd),f=l(w);if($.configId==="model"){if(typeof $.value!=="string")throw K.invalidParams("model value must be a string");let Y=PD($.value,w);this.sessionManager.setModel(Q.id,Y.model),this.sessionManager.setVariant(Q.id,Y.variant)}else if($.configId==="mode"){if(typeof $.value!=="string")throw K.invalidParams("mode value must be a string");if(!(await this.loadAvailableModes(Q.cwd)).some((Z)=>Z.id===$.value))throw K.invalidParams(JSON.stringify({error:`Mode not found: ${$.value}`}));this.sessionManager.setMode(Q.id,$.value)}else throw K.invalidParams(JSON.stringify({error:`Unknown config option: ${$.configId}`}));let X=this.sessionManager.get(Q.id),G=X.model??await h(this.config,Q.cwd),{availableVariants:_,availableModels:J,modes:j}=await this.resolveModelsAndModes({entries:f,model:G,directory:Q.cwd,sessionId:Q.id}),B=d(G,X.variant,_,!0);return{configOptions:i({currentModelId:B,availableModels:J,modes:j})}}async prompt($){let Q=$.sessionId,w=this.sessionManager.get(Q),f=w.cwd,X=w.model,G=X??await h(this.config,f);if(!X)this.sessionManager.setModel(w.id,G);let _=w.modeId??await MD.runPromise(hD.Service.use((A)=>A.defaultAgent())),J=[];for(let A of $.prompt)switch(A.type){case"text":{let y=A.annotations?.audience,W=y?.length===1&&y[0]==="assistant",x=y?.length===1&&y[0]==="user";J.push({type:"text",text:A.text,...W&&{synthetic:!0},...x&&{ignored:!0}});break}case"image":{let y=g(A.uri??""),W=y.type==="file"?y.filename:"image";if(A.data)J.push({type:"file",url:`data:${A.mimeType};base64,${A.data}`,filename:W,mime:A.mimeType});else if(A.uri&&A.uri.startsWith("http:"))J.push({type:"file",url:A.uri,filename:W,mime:A.mimeType});break}case"resource_link":{let y=g(A.uri);if(A.name&&y.type==="file")y.filename=A.name;J.push(y);break}case"resource":{let y=A.resource;if("text"in y&&y.text)J.push({type:"text",text:y.text});else if("blob"in y&&y.blob&&y.mimeType){let W=g(y.uri??""),x=W.type==="file"?W.filename:"file";J.push({type:"file",url:`data:${y.mimeType};base64,${y.blob}`,filename:x,mime:y.mimeType})}break}default:break}V.info("parts",{parts:J});let j=(()=>{let A=J.filter((x)=>x.type==="text").map((x)=>x.text).join("").trim();if(!A.startsWith("/"))return;let[y,...W]=A.slice(1).split(/\s+/);return{name:y,args:W.join(" ").trim()}})(),B=(A)=>({totalTokens:A.tokens.input+A.tokens.output+A.tokens.reasoning+(A.tokens.cache?.read??0)+(A.tokens.cache?.write??0),inputTokens:A.tokens.input,outputTokens:A.tokens.output,thoughtTokens:A.tokens.reasoning||void 0,cachedReadTokens:A.tokens.cache?.read||void 0,cachedWriteTokens:A.tokens.cache?.write||void 0}),Y,Z=!1;if(!j)Z=!0,Y=(await this.sdk.session.prompt({sessionID:Q,model:{providerID:G.providerID,modelID:G.modelID},variant:this.sessionManager.getVariant(Q),parts:J,agent:_,directory:f})).data?.info;else{let A=await this.config.sdk.command.list({directory:f},{throwOnError:!0}).then((y)=>y.data.find((W)=>W.name===j.name));if(A)Z=!0,Y=(await this.sdk.session.command({sessionID:Q,command:A.name,arguments:j.args,model:G.providerID+"/"+G.modelID,agent:_,directory:f})).data?.info;else switch(j.name){case"compact":await this.config.sdk.session.summarize({sessionID:Q,directory:f,providerID:G.providerID,modelID:G.modelID},{throwOnError:!0});break}}return await bD(this.connection,this.sdk,Q,f),{stopReason:"end_turn",...Z?{usage:Y?B(Y):void 0}:{},_meta:{}}}async cancel($){let Q=this.sessionManager.get($.sessionId);await this.config.sdk.session.abort({sessionID:$.sessionId,directory:Q.cwd},{throwOnError:!0})}}async function h($,Q){let{sdk:w,defaultModel:f}=$;if(f)return f;let X=Q??process.cwd(),G=await w.config.get({directory:X},{throwOnError:!0}).then((Y)=>{let Z=Y.data;if(!Z||!Z.model)return;return U.parseModel(Z.model)}).catch((Y)=>{V.error("failed to load user config for default model",{error:Y});return}),_=await w.config.providers({directory:X},{throwOnError:!0}).then((Y)=>Y.data?.providers??[]).catch((Y)=>{return V.error("failed to list providers for default model",{error:Y}),[]});if(G&&_.length){let Y=_.find((Z)=>Z.id===G.providerID);if(Y&&Y.models[G.modelID])return G}if(G&&!_.length)return G;let J=_.find((Y)=>Y.id==="opencode");if(J){if(J.models["big-pickle"])return{providerID:k.opencode,modelID:P.make("big-pickle")};let[Y]=U.sort(Object.values(J.models));if(Y)return{providerID:k.make(Y.providerID),modelID:P.make(Y.id)}}for(let Y of["default","fast","economical","power"]){let Z=_$[Y];if(!Z)continue;if(_.find((y)=>y.id===Z.providerID)?.models[Z.modelID])return{providerID:k.make(Z.providerID),modelID:P.make(Z.modelID)}}let j=_.flatMap((Y)=>Object.values(Y.models)),[B]=U.sort(j);if(B)return{providerID:k.make(B.providerID),modelID:P.make(B.id)};if(G)return G;return{providerID:k.opencode,modelID:P.make("big-pickle")}}var ED=H.create({service:"acp-command"}),sQ=A$({command:"acp",describe:"start ACP (Agent Client Protocol) server",builder:($)=>{return J$($).option("cwd",{describe:"working directory",type:"string",default:process.cwd()})},handler:async($)=>{if(process.env.QITQODE_CLIENT="acp",process.env.QITQODE_KEY)ED.info("Using QITQODE_KEY for authentication.");else if(!await Y$())ED.warn("No QitQode credential found. AI features will not work until you sign in (`qitqode auth login`) or set QITQODE_KEY.");await j$(process.cwd(),async()=>{let Q=await W$($),w=await Z$.listen(Q),f=X$({baseUrl:`http://${w.hostname}:${w.port}`}),X=new WritableStream({write(j){return new Promise((B,Y)=>{process.stdout.write(j,(Z)=>{if(Z)Y(Z);else B()})})}}),G=new ReadableStream({start(j){process.stdin.on("data",(B)=>{j.enqueue(new Uint8Array(B))}),process.stdin.on("end",()=>j.close()),process.stdin.on("error",(B)=>j.error(B))}}),_=zD(X,G),J=await v.init({sdk:f});new OD((j)=>{return J.create(j,{sdk:f})},_),ED.info("setup connection"),process.stdin.resume(),await new Promise((j,B)=>{process.stdin.on("end",j),process.stdin.on("error",B)})})}});export{sQ as AcpCommand};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  var j=Object.create;var{getPrototypeOf:k,defineProperty:i,getOwnPropertyNames:l}=Object;var m=Object.prototype.hasOwnProperty;function n(a){return this[a]}var o,p,s=(a,b,c)=>{var d=a!=null&&typeof a==="object";if(d){var g=b?o??=new WeakMap:p??=new WeakMap,e=g.get(a);if(e)return e}c=a!=null?j(k(a)):{};let h=b||!a||!a.__esModule?i(c,"default",{value:a,enumerable:!0}):c;for(let f of l(a))if(!m.call(h,f))i(h,f,{get:n.bind(a,f),enumerable:!0});if(d)g.set(a,h);return h};var t=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var q=(a)=>a;function r(a,b){this[a]=q.bind(null,b)}var u=(a,b)=>{for(var c in b)i(a,c,{get:b[c],enumerable:!0,configurable:!0,set:r.bind(b,c)})};var v=(a,b)=>()=>(a&&(b=a(a=0)),b);var w=import.meta.require,x=(a,b,c)=>{if(b!=null){if(typeof b!=="object"&&typeof b!=="function")throw TypeError('Object expected to be assigned to "using" declaration');let d;if(c)d=b[Symbol.asyncDispose];if(d===void 0)d=b[Symbol.dispose];if(typeof d!=="function")throw TypeError("Object not disposable");a.push([c,d,b])}else if(c)a.push([c]);return b},y=(a,b,c)=>{let d=(e)=>b=c?new SuppressedError(e,b,"An error was suppressed during disposal"):(c=!0,e),g=(e)=>{while(e=a.pop())try{var h=e[1]&&e[1].call(e[2]);if(e[0])return Promise.resolve(h).then(g,(f)=>(d(f),g()))}catch(f){d(f)}if(c)throw b};return g()};
3
- export{s as gQ,t as hQ,u as iQ,v as jQ,w as kQ,x as lQ,y as mQ};
3
+ export{s as LO,t as MO,u as NO,v as OO,w as PO,x as QO,y as RO};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Nf as r}from"./chunk-5pkg052s.js";import{Xg as n}from"./chunk-w57j3pgz.js";import{sl as e}from"./chunk-sy3n0qhc.js";async function a(o){let t=await n.runPromise(e.Service.use((i)=>i.getGlobal()));return r(o,t)}function s(o){return o==="127.0.0.1"||o==="localhost"||o==="::1"}function c(o,t){return!s(o.hostname)&&!t&&!o.noAuth}
3
- export{a as Ad,c as Bd};
2
+ import{Pf as r}from"./chunk-q148vndn.js";import{Zg as n}from"./chunk-3kn57y8d.js";import{ul as e}from"./chunk-kc1xmcc9.js";async function a(o){let t=await n.runPromise(e.Service.use((i)=>i.getGlobal()));return r(o,t)}function s(o){return o==="127.0.0.1"||o==="localhost"||o==="::1"}function c(o,t){return!s(o.hostname)&&!t&&!o.noAuth}
3
+ export{a as Cd,c as Dd};