@qitqode/qitqode-android-arm64 0.2.8 → 0.2.10

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 (426) hide show
  1. package/bundle/chunk-062chtrq.js +2 -0
  2. package/bundle/chunk-062vs7bp.js +2 -0
  3. package/bundle/chunk-08g14hmz.js +2 -0
  4. package/bundle/{chunk-wgkcyqn1.js → chunk-0bhzhh7s.js} +2 -2
  5. package/bundle/{chunk-cfwz1hgr.js → chunk-0mwzxqt5.js} +3 -3
  6. package/bundle/{chunk-mr17tppa.js → chunk-0sfc21qe.js} +2 -2
  7. package/bundle/{chunk-7adsab4h.js → chunk-0tkznq75.js} +1 -1
  8. package/bundle/chunk-0w2v8dfy.js +2 -0
  9. package/bundle/chunk-10fr7a2y.js +2 -0
  10. package/bundle/chunk-141p12c4.js +4 -0
  11. package/bundle/chunk-15bjhfav.js +3 -0
  12. package/bundle/{chunk-92r1gw2j.js → chunk-1h96bk6p.js} +2 -2
  13. package/bundle/chunk-1hv61m11.js +2 -0
  14. package/bundle/{chunk-0z1keh2w.js → chunk-1m78yy4k.js} +1 -1
  15. package/bundle/chunk-1q10jyka.js +29 -0
  16. package/bundle/{chunk-g4tyaj0m.js → chunk-1r81q7m3.js} +1 -1
  17. package/bundle/{chunk-82xrfk5x.js → chunk-2cvwrabw.js} +2 -2
  18. package/bundle/{chunk-8p0t8qah.js → chunk-2dmcpqak.js} +1 -1
  19. package/bundle/{chunk-35fj1sfm.js → chunk-2fbkw84y.js} +2 -2
  20. package/bundle/chunk-2mkvx8b2.js +2 -0
  21. package/bundle/chunk-2rykfc3a.js +2 -0
  22. package/bundle/chunk-2w5hx4fs.js +2 -0
  23. package/bundle/{chunk-t3w43rft.js → chunk-2y5bthrp.js} +1 -1
  24. package/bundle/chunk-2yy63sxz.js +2 -0
  25. package/bundle/chunk-2z3fe4qw.js +2 -0
  26. package/bundle/{chunk-g7v6sp3c.js → chunk-2zjet9tx.js} +2 -2
  27. package/bundle/{chunk-qgkb6n8k.js → chunk-32xd626h.js} +2 -2
  28. package/bundle/chunk-361cmmrp.js +2 -0
  29. package/bundle/{chunk-eg1m81ax.js → chunk-3mtjxmw1.js} +1 -1
  30. package/bundle/chunk-3r6dq1h3.js +2 -0
  31. package/bundle/{chunk-wtt5wms9.js → chunk-3sj0jv91.js} +1 -1
  32. package/bundle/{chunk-hz02vrqs.js → chunk-3vae1s42.js} +1 -1
  33. package/bundle/{chunk-t18ka1e7.js → chunk-3yfjgks3.js} +1 -1
  34. package/bundle/{chunk-phf37x1c.js → chunk-3zzrdpsx.js} +1 -1
  35. package/bundle/chunk-4a12wv2m.js +2 -0
  36. package/bundle/{chunk-1rgt2vmt.js → chunk-4a9jqe5s.js} +1 -1
  37. package/bundle/{chunk-wqk1v8t0.js → chunk-4sa9t0vx.js} +2 -2
  38. package/bundle/{chunk-qbnt4ynd.js → chunk-532fnfmw.js} +2 -2
  39. package/bundle/chunk-547a55ba.js +2 -0
  40. package/bundle/{chunk-vr8nwzp0.js → chunk-56yp5v0w.js} +1 -1
  41. package/bundle/{chunk-ag8wxwwz.js → chunk-5fcyb122.js} +1 -1
  42. package/bundle/{chunk-4pmvxnkj.js → chunk-5nm5egq0.js} +2 -2
  43. package/bundle/{chunk-1v0khv7p.js → chunk-5p2r8bxx.js} +1 -1
  44. package/bundle/{chunk-5bv63rqj.js → chunk-5rqjze1g.js} +1 -1
  45. package/bundle/{chunk-sy9w1t2y.js → chunk-5w7ebtcd.js} +1 -1
  46. package/bundle/chunk-5ztmc770.js +2 -0
  47. package/bundle/{chunk-a1z8rnq7.js → chunk-61t4g8bh.js} +4 -4
  48. package/bundle/chunk-62x3r2q8.js +2 -0
  49. package/bundle/chunk-62y6zk9x.js +2 -0
  50. package/bundle/{chunk-c76cjhn0.js → chunk-6axm2qtj.js} +1 -1
  51. package/bundle/{chunk-zfrftgcy.js → chunk-6gbdvz6p.js} +1 -1
  52. package/bundle/{chunk-fa8pwdwv.js → chunk-6mnk5sg3.js} +1 -1
  53. package/bundle/chunk-6th7vpwm.js +2 -0
  54. package/bundle/{chunk-8yzghzjq.js → chunk-6wjdhvdf.js} +1 -1
  55. package/bundle/{chunk-a8bjcvda.js → chunk-6y58jzak.js} +1 -1
  56. package/bundle/chunk-6ybh5smv.js +2 -0
  57. package/bundle/chunk-73kprndw.js +2 -0
  58. package/bundle/chunk-79fr19xf.js +2 -0
  59. package/bundle/{chunk-3va85mbe.js → chunk-7a3txs9f.js} +2 -2
  60. package/bundle/chunk-7ezr478e.js +2 -0
  61. package/bundle/chunk-7gj1vqyj.js +2 -0
  62. package/bundle/{chunk-eacpc64g.js → chunk-7hdb1fhq.js} +2 -2
  63. package/bundle/{chunk-t8fjgkp8.js → chunk-7rbg6mg9.js} +2 -2
  64. package/bundle/{chunk-59csnjc3.js → chunk-7s0nq2aa.js} +2 -2
  65. package/bundle/chunk-7ywfkwb4.js +2 -0
  66. package/bundle/chunk-819qr675.js +2 -0
  67. package/bundle/{chunk-g6y2c5az.js → chunk-81dvy370.js} +1 -1
  68. package/bundle/chunk-85fnnwm2.js +2 -0
  69. package/bundle/chunk-89fwh84w.js +2 -0
  70. package/bundle/chunk-8e724g3k.js +2 -0
  71. package/bundle/{chunk-6qwk6z87.js → chunk-8gpjmj42.js} +3 -3
  72. package/bundle/{chunk-wtxh5m6j.js → chunk-8nnajdwf.js} +3 -3
  73. package/bundle/chunk-8peby2d1.js +2 -0
  74. package/bundle/{chunk-3zwma68w.js → chunk-8rkszwxq.js} +6 -6
  75. package/bundle/{chunk-w0nc0gcx.js → chunk-8v60bqm0.js} +1 -1
  76. package/bundle/chunk-9894a2yn.js +2 -0
  77. package/bundle/chunk-98ye2nwt.js +2 -0
  78. package/bundle/{chunk-48gap82w.js → chunk-9bbwxp5d.js} +1 -1
  79. package/bundle/{chunk-z0kbyr00.js → chunk-9d0exvey.js} +2 -2
  80. package/bundle/{chunk-8ysp6vf8.js → chunk-9fjcgdea.js} +1 -1
  81. package/bundle/{chunk-jpn9zfj5.js → chunk-9nf5650d.js} +1 -1
  82. package/bundle/{chunk-n6tqtk6h.js → chunk-9pj10pgd.js} +2 -2
  83. package/bundle/chunk-9s4excg8.js +2 -0
  84. package/bundle/{chunk-t6zz47zk.js → chunk-9s5h0f1y.js} +2 -2
  85. package/bundle/{chunk-p8ak162p.js → chunk-9tz18e54.js} +1 -1
  86. package/bundle/{chunk-fs1vb39f.js → chunk-9zy5tsry.js} +3 -3
  87. package/bundle/{chunk-bc2krtaf.js → chunk-a70m6kyn.js} +1 -1
  88. package/bundle/{chunk-cr5tknvb.js → chunk-acsqvgdw.js} +1 -1
  89. package/bundle/chunk-aetgcegz.js +2 -0
  90. package/bundle/chunk-agas0nay.js +2 -0
  91. package/bundle/{chunk-vs3s49jw.js → chunk-ajnzv5jt.js} +2 -2
  92. package/bundle/{chunk-9cf2ktyh.js → chunk-asxmkyz2.js} +1 -1
  93. package/bundle/{chunk-0ffmwhw7.js → chunk-at4dge22.js} +1 -1
  94. package/bundle/{chunk-sa0rrreh.js → chunk-atacnspd.js} +2 -2
  95. package/bundle/chunk-ayknzc4m.js +2 -0
  96. package/bundle/chunk-azss4acq.js +3 -0
  97. package/bundle/chunk-b2ybst88.js +2 -0
  98. package/bundle/{chunk-cghz0855.js → chunk-b8rzn48q.js} +1 -1
  99. package/bundle/{chunk-dhvx9p54.js → chunk-b9f78x5g.js} +1 -1
  100. package/bundle/chunk-bd5vtjd7.js +2 -0
  101. package/bundle/chunk-bjqqk6jt.js +2 -0
  102. package/bundle/{chunk-mv7q6ach.js → chunk-brk1jca3.js} +1 -1
  103. package/bundle/{chunk-5r7c6vvx.js → chunk-by1kwg4r.js} +2 -2
  104. package/bundle/{chunk-he9kpk9r.js → chunk-c1c8ch3g.js} +327 -313
  105. package/bundle/{chunk-2nheahmq.js → chunk-c2ns2csn.js} +1 -1
  106. package/bundle/{chunk-qk5vy2pr.js → chunk-c3ey896z.js} +1 -1
  107. package/bundle/{chunk-b7sr9rn3.js → chunk-c8080519.js} +1 -1
  108. package/bundle/{chunk-33ebjca6.js → chunk-c8yc8qcd.js} +1 -1
  109. package/bundle/{chunk-f81kk8ra.js → chunk-c9cngded.js} +1 -1
  110. package/bundle/{chunk-ejhhrece.js → chunk-ccdjzn2m.js} +3 -3
  111. package/bundle/{chunk-rk0fnvp5.js → chunk-cdenq7jb.js} +1 -1
  112. package/bundle/chunk-cpkcdykz.js +2 -0
  113. package/bundle/{chunk-56wq8cqj.js → chunk-cs825mxr.js} +1 -1
  114. package/bundle/{chunk-1bxfzd6r.js → chunk-cxtwavyf.js} +4 -4
  115. package/bundle/chunk-cyafm8d6.js +2 -0
  116. package/bundle/{chunk-eewe7tx1.js → chunk-d0dsgxk4.js} +2 -2
  117. package/bundle/{chunk-g3n465ee.js → chunk-d1fv2c7s.js} +2 -2
  118. package/bundle/{chunk-1p9s5jj1.js → chunk-d1xfv4d3.js} +1 -1
  119. package/bundle/chunk-d4316r53.js +2 -0
  120. package/bundle/chunk-d8ym7mcg.js +2 -0
  121. package/bundle/{chunk-epmc4aht.js → chunk-d9w2bn2e.js} +1 -1
  122. package/bundle/{chunk-g26redah.js → chunk-dd461rg3.js} +1 -1
  123. package/bundle/{chunk-e0vrxetq.js → chunk-djfrkbd5.js} +1 -1
  124. package/bundle/{chunk-ayb3bdb7.js → chunk-dm447tgc.js} +2 -2
  125. package/bundle/{chunk-qxdpgdfk.js → chunk-dnjyepb2.js} +2 -2
  126. package/bundle/chunk-dnpjxjkp.js +2 -0
  127. package/bundle/{chunk-0a4pmkc9.js → chunk-dp6ms01y.js} +2 -2
  128. package/bundle/{chunk-58f4y4b7.js → chunk-dx7rexx3.js} +3 -3
  129. package/bundle/{chunk-kre93a89.js → chunk-dz3kcsb6.js} +2 -2
  130. package/bundle/{chunk-4aajzxm9.js → chunk-dzma8zvf.js} +2 -2
  131. package/bundle/{chunk-e2wfj86b.js → chunk-e10c0crf.js} +1 -1
  132. package/bundle/{chunk-wn63q3xp.js → chunk-e1x1mp9m.js} +1 -1
  133. package/bundle/{chunk-w9qh2479.js → chunk-e3mrw0k7.js} +1 -1
  134. package/bundle/chunk-e5gjqtby.js +2 -0
  135. package/bundle/{chunk-3z2zn8rj.js → chunk-e72jwbfc.js} +1 -1
  136. package/bundle/{chunk-85wh85pk.js → chunk-eabbrt1p.js} +1 -1
  137. package/bundle/{chunk-jr80q31w.js → chunk-ecz4h0a2.js} +1 -1
  138. package/bundle/chunk-ee3mqzms.js +2 -0
  139. package/bundle/chunk-eme9xmh3.js +2 -0
  140. package/bundle/{chunk-cf9m9m9q.js → chunk-eqpep2m2.js} +1 -1
  141. package/bundle/chunk-er5f61s5.js +2 -0
  142. package/bundle/chunk-er716522.js +2 -0
  143. package/bundle/{chunk-qgek59e6.js → chunk-ev6jwt7q.js} +1 -1
  144. package/bundle/chunk-ez3gacqe.js +2 -0
  145. package/bundle/{chunk-ax64ngf2.js → chunk-f0ab2f28.js} +1 -1
  146. package/bundle/{chunk-ggncq8w8.js → chunk-f17se3hh.js} +1 -1
  147. package/bundle/chunk-f3y5kr76.js +14 -0
  148. package/bundle/{chunk-vsqvnxbz.js → chunk-f6btedtt.js} +1 -1
  149. package/bundle/{chunk-h4hs2rhf.js → chunk-f6vy70p6.js} +2 -2
  150. package/bundle/{chunk-5f0nhthe.js → chunk-ff8q10gk.js} +2 -2
  151. package/bundle/chunk-fkc7wf1p.js +2 -0
  152. package/bundle/chunk-fm6z8nqb.js +2 -0
  153. package/bundle/{chunk-fw1f47de.js → chunk-fsndgr9a.js} +1 -1
  154. package/bundle/{chunk-pqg1wjb5.js → chunk-fvv1cret.js} +1 -1
  155. package/bundle/{chunk-j10a984e.js → chunk-g08qj9z3.js} +2 -2
  156. package/bundle/chunk-g0qwm23d.js +2 -0
  157. package/bundle/chunk-g4yn8cj8.js +2 -0
  158. package/bundle/{chunk-vkjqy92f.js → chunk-g52wmt1v.js} +1 -1
  159. package/bundle/{chunk-trstb8ee.js → chunk-gb51fn3r.js} +1 -1
  160. package/bundle/{chunk-kgv68cpb.js → chunk-gbnf7zf9.js} +1 -1
  161. package/bundle/{chunk-0w19vmd7.js → chunk-ge7csm6m.js} +2 -2
  162. package/bundle/{chunk-gc5rhnht.js → chunk-gksbv613.js} +2 -2
  163. package/bundle/{chunk-afr8m0q1.js → chunk-gmq1kwn0.js} +1 -1
  164. package/bundle/{chunk-9009v4d0.js → chunk-gq3zb4wv.js} +2 -2
  165. package/bundle/{chunk-tbx741en.js → chunk-gqgjybjc.js} +1 -1
  166. package/bundle/{chunk-2qm46qvn.js → chunk-gx4v8z64.js} +2 -2
  167. package/bundle/{chunk-sm1g81cv.js → chunk-h0pvxre5.js} +1 -1
  168. package/bundle/chunk-h1spsy3y.js +2 -0
  169. package/bundle/{chunk-sbjymf20.js → chunk-h2p984qb.js} +2 -2
  170. package/bundle/{chunk-gznt3dv8.js → chunk-h6z86aay.js} +1 -1
  171. package/bundle/chunk-h8gkv40j.js +2 -0
  172. package/bundle/{chunk-zsg29gba.js → chunk-h91zmzs5.js} +1 -1
  173. package/bundle/{chunk-zrhw1szj.js → chunk-hgm8yfcb.js} +1 -1
  174. package/bundle/chunk-j59kmb49.js +2 -0
  175. package/bundle/chunk-j5z95b6f.js +3 -0
  176. package/bundle/{chunk-52xvhxek.js → chunk-j7637cwg.js} +2 -2
  177. package/bundle/{chunk-rwnwjm82.js → chunk-jbcqhw3x.js} +2 -2
  178. package/bundle/{chunk-qgfbsmsx.js → chunk-je8fcsa9.js} +1 -1
  179. package/bundle/{chunk-y0h3jfkj.js → chunk-jt6bvxtr.js} +1 -1
  180. package/bundle/chunk-jv37ghev.js +2 -0
  181. package/bundle/chunk-k10rtgsk.js +5 -0
  182. package/bundle/chunk-k3hcb6qf.js +2 -0
  183. package/bundle/chunk-k5d822n2.js +3 -0
  184. package/bundle/{chunk-2vaphpz0.js → chunk-kc8n5cgb.js} +1 -1
  185. package/bundle/chunk-kcqeh1e5.js +2 -0
  186. package/bundle/{chunk-5xkp27b1.js → chunk-kds2g7r2.js} +1 -1
  187. package/bundle/{chunk-scnbt714.js → chunk-kec1xw1n.js} +1 -1
  188. package/bundle/{chunk-s8z7v1me.js → chunk-kk850sdw.js} +2 -2
  189. package/bundle/{chunk-3bb4aqh9.js → chunk-m01h6kk1.js} +1 -1
  190. package/bundle/{chunk-2t5yh25f.js → chunk-m4j6t713.js} +1 -1
  191. package/bundle/chunk-m8ytbq04.js +2 -0
  192. package/bundle/chunk-mf9nc4xz.js +2 -0
  193. package/bundle/{chunk-7thhd7ds.js → chunk-mmqyter3.js} +1 -1
  194. package/bundle/{chunk-9cn8cmt0.js → chunk-mn0pshpv.js} +1 -1
  195. package/bundle/{chunk-s2tc3qs0.js → chunk-mn5cacf6.js} +2 -2
  196. package/bundle/{chunk-0egrckx0.js → chunk-mp1x10t5.js} +2 -2
  197. package/bundle/chunk-mxby91bj.js +2 -0
  198. package/bundle/chunk-mzv1gh6f.js +2 -0
  199. package/bundle/chunk-n0hsvvw8.js +2 -0
  200. package/bundle/{chunk-az3nss5m.js → chunk-ngyv4fhn.js} +2 -2
  201. package/bundle/{chunk-g9nwqwqp.js → chunk-nh4zk07t.js} +1 -1
  202. package/bundle/{chunk-8jmb5bd4.js → chunk-nk5vrenn.js} +2 -2
  203. package/bundle/chunk-nm1v9z14.js +2 -0
  204. package/bundle/chunk-nnkfdhh9.js +2 -0
  205. package/bundle/{chunk-jqj1ay7x.js → chunk-npdgfqaw.js} +1 -1
  206. package/bundle/{chunk-p2fte9vz.js → chunk-nq4x6792.js} +2 -2
  207. package/bundle/{chunk-wr6rnxr5.js → chunk-nqk8d62j.js} +1 -1
  208. package/bundle/{chunk-7jy53zqy.js → chunk-p506eydh.js} +1 -1
  209. package/bundle/{chunk-phpxxd48.js → chunk-p6jf1fyt.js} +1 -1
  210. package/bundle/chunk-p7nstcxa.js +2 -0
  211. package/bundle/{chunk-6ps30qax.js → chunk-pbanj1gk.js} +2 -2
  212. package/bundle/{chunk-vph4w4yy.js → chunk-pchv413c.js} +2 -2
  213. package/bundle/{chunk-5nmm1kvx.js → chunk-pf2vq6t1.js} +2 -2
  214. package/bundle/chunk-pfwkvv7g.js +2 -0
  215. package/bundle/{chunk-ntr0ezf2.js → chunk-pky8h8rh.js} +1 -1
  216. package/bundle/chunk-pn1jz8qj.js +2 -0
  217. package/bundle/chunk-pqvmtfk7.js +2 -0
  218. package/bundle/chunk-prgw26g3.js +2 -0
  219. package/bundle/{chunk-kckr30tf.js → chunk-psqtptrs.js} +1 -1
  220. package/bundle/chunk-pv9ty6v7.js +2 -0
  221. package/bundle/{chunk-060wbpz4.js → chunk-pwsajn96.js} +1 -1
  222. package/bundle/{chunk-c3yjbent.js → chunk-pxm0x3e0.js} +1 -1
  223. package/bundle/chunk-pyf649pz.js +2 -0
  224. package/bundle/{chunk-wd8f9r4k.js → chunk-q0xgxygw.js} +1 -1
  225. package/bundle/{chunk-rye1yjnr.js → chunk-q26s0wb5.js} +1 -1
  226. package/bundle/{chunk-a48mx917.js → chunk-q4mtwv1w.js} +2 -2
  227. package/bundle/chunk-q4rstre7.js +2 -0
  228. package/bundle/chunk-q6jk2v6g.js +2 -0
  229. package/bundle/{chunk-5wx962mw.js → chunk-q7s6z0nz.js} +1 -1
  230. package/bundle/{chunk-jmmtcr2r.js → chunk-q8fjktv4.js} +1 -1
  231. package/bundle/{chunk-m7tmgvh6.js → chunk-qbewhcsz.js} +1 -1
  232. package/bundle/chunk-qd43npx3.js +2 -0
  233. package/bundle/{chunk-ydgst3h8.js → chunk-qdafm7qg.js} +2 -2
  234. package/bundle/chunk-qdb21y83.js +2 -0
  235. package/bundle/{chunk-72crs18f.js → chunk-qdbx1qkr.js} +1 -1
  236. package/bundle/{chunk-nga216dm.js → chunk-qdh2dm62.js} +1 -1
  237. package/bundle/chunk-qeksaefy.js +2 -0
  238. package/bundle/{chunk-qk1jkc0n.js → chunk-qjw2zcq5.js} +1 -1
  239. package/bundle/{chunk-dt3bsmfe.js → chunk-qm9fm5ja.js} +2 -2
  240. package/bundle/{chunk-h8mfbbjh.js → chunk-qq9yc2tp.js} +2 -2
  241. package/bundle/{chunk-0tcggtwv.js → chunk-qtyapmy7.js} +1 -1
  242. package/bundle/{chunk-4064rbtp.js → chunk-qyan69nb.js} +1 -1
  243. package/bundle/chunk-r7t9yb9d.js +2 -0
  244. package/bundle/{chunk-6tqbnxar.js → chunk-r81w6skn.js} +1 -1
  245. package/bundle/{chunk-f4mnp6xd.js → chunk-rk21wv4k.js} +1 -1
  246. package/bundle/{chunk-ccf4pgkr.js → chunk-rpdgn9z3.js} +2 -2
  247. package/bundle/chunk-rxnd79h7.js +7 -0
  248. package/bundle/chunk-s05hqtx1.js +3 -0
  249. package/bundle/chunk-s27cz24e.js +808 -0
  250. package/bundle/chunk-sdv3a4w3.js +2 -0
  251. package/bundle/{chunk-zwhmg9dj.js → chunk-se8d5xg9.js} +1 -1
  252. package/bundle/chunk-sk89becn.js +2 -0
  253. package/bundle/{chunk-sz0favtz.js → chunk-snf6ahg7.js} +1 -1
  254. package/bundle/{chunk-dgcannw0.js → chunk-t2r51r6v.js} +1 -1
  255. package/bundle/{chunk-rva2ekrt.js → chunk-t5wdstzv.js} +1 -1
  256. package/bundle/{chunk-ytyzrqev.js → chunk-t9pq363q.js} +2 -2
  257. package/bundle/chunk-tc0996xz.js +2 -0
  258. package/bundle/chunk-td9hm9be.js +2 -0
  259. package/bundle/{chunk-xy8arehp.js → chunk-tdevq564.js} +1 -1
  260. package/bundle/chunk-te91d271.js +2 -0
  261. package/bundle/chunk-tfs50mgj.js +2 -0
  262. package/bundle/{chunk-5cw8235e.js → chunk-tg1f56s3.js} +1 -1
  263. package/bundle/chunk-thecq33z.js +3 -0
  264. package/bundle/{chunk-f2v4g7t1.js → chunk-tjfer79w.js} +1 -1
  265. package/bundle/chunk-tjvtp9d9.js +2 -0
  266. package/bundle/chunk-tkm9m3n0.js +2 -0
  267. package/bundle/{chunk-ynf17943.js → chunk-tm79yrf3.js} +2 -2
  268. package/bundle/{chunk-tsmj98yf.js → chunk-v03xq38e.js} +2 -2
  269. package/bundle/chunk-v0hnn7nb.js +2 -0
  270. package/bundle/{chunk-ftvvm4r5.js → chunk-v16n1fep.js} +2 -2
  271. package/bundle/chunk-v1s1rcqx.js +2 -0
  272. package/bundle/chunk-v4dt4062.js +2 -0
  273. package/bundle/{chunk-makegrxs.js → chunk-v8bxj01h.js} +1 -1
  274. package/bundle/{chunk-ryrxgn6d.js → chunk-v8rqgt7h.js} +1 -1
  275. package/bundle/{chunk-m4r8sepw.js → chunk-vbb1jg02.js} +1 -1
  276. package/bundle/{chunk-2kh0tg92.js → chunk-vbfc0wgv.js} +2 -2
  277. package/bundle/{chunk-d839fr0w.js → chunk-vjt6mh10.js} +2 -2
  278. package/bundle/{chunk-gsg6zn7e.js → chunk-vk35g121.js} +2 -2
  279. package/bundle/{chunk-dwkrqtbc.js → chunk-vsfj16v9.js} +2 -2
  280. package/bundle/{chunk-zqdjk4rf.js → chunk-vy93mn7d.js} +2 -2
  281. package/bundle/{chunk-1har4t9a.js → chunk-waa781eh.js} +1 -1
  282. package/bundle/{chunk-wb47k8ah.js → chunk-wbt31xap.js} +2 -2
  283. package/bundle/{chunk-0tm6589k.js → chunk-wd2xmkdp.js} +2 -2
  284. package/bundle/{chunk-fej5x648.js → chunk-wecs14rz.js} +1 -1
  285. package/bundle/chunk-wgrq86kd.js +2 -0
  286. package/bundle/chunk-wh2qqhep.js +8 -0
  287. package/bundle/{chunk-g878zd6e.js → chunk-x0hhw46n.js} +1 -1
  288. package/bundle/{chunk-w7a33cwa.js → chunk-x308f9j4.js} +2 -2
  289. package/bundle/{chunk-y3gy62q5.js → chunk-x50adh71.js} +1 -1
  290. package/bundle/chunk-x8ks2bn7.js +2 -0
  291. package/bundle/{chunk-f8cae1ap.js → chunk-xcmbxny8.js} +1 -1
  292. package/bundle/{chunk-rmsqb6r4.js → chunk-xgf4k9q7.js} +1 -1
  293. package/bundle/{chunk-2caaqmec.js → chunk-xj0zc9za.js} +1 -1
  294. package/bundle/{chunk-27saej0r.js → chunk-xnxw5zz9.js} +2 -2
  295. package/bundle/{chunk-fjftb2sz.js → chunk-xqwk2zsx.js} +2 -2
  296. package/bundle/{chunk-d30k7dpf.js → chunk-xstxdw7v.js} +1 -1
  297. package/bundle/{chunk-x00hwy3x.js → chunk-xv03hbgj.js} +1 -1
  298. package/bundle/{chunk-bwadggys.js → chunk-xvvt886p.js} +2 -2
  299. package/bundle/{chunk-khpfseej.js → chunk-xy2ty5h5.js} +2 -2
  300. package/bundle/{chunk-wm9nh9nb.js → chunk-yce8ph5b.js} +2 -2
  301. package/bundle/{chunk-fh3d0wce.js → chunk-yexzxx6f.js} +1 -1
  302. package/bundle/{chunk-eyr5ymt8.js → chunk-yh1t6jrj.js} +1 -1
  303. package/bundle/chunk-yspstxkq.js +2 -0
  304. package/bundle/{chunk-ykpj10nz.js → chunk-yydqavgh.js} +2 -2
  305. package/bundle/{chunk-bnaj2hh3.js → chunk-yzd6cyep.js} +1 -1
  306. package/bundle/chunk-z023h7t8.js +2 -0
  307. package/bundle/chunk-z0383stv.js +2 -0
  308. package/bundle/{chunk-vbfej8ds.js → chunk-z0m1qm7j.js} +2 -2
  309. package/bundle/{chunk-bpfq8fz4.js → chunk-z69tt390.js} +1 -1
  310. package/bundle/chunk-zewrmk8x.js +2 -0
  311. package/bundle/{chunk-29gwtcey.js → chunk-zfqgh9h7.js} +1 -1
  312. package/bundle/{chunk-h1bvqstw.js → chunk-zskdxbbh.js} +1 -1
  313. package/bundle/{chunk-kveztc6k.js → chunk-ztvkzex1.js} +1 -1
  314. package/bundle/index.js +3 -3
  315. package/bundle/parser.worker.js +2 -2
  316. package/bundle/worker.js +1 -1
  317. package/package.json +1 -1
  318. package/bundle/chunk-03zpnwk2.js +0 -2
  319. package/bundle/chunk-0aqdzyar.js +0 -2
  320. package/bundle/chunk-26cr51wa.js +0 -28
  321. package/bundle/chunk-2a5gjgvp.js +0 -2
  322. package/bundle/chunk-2pkfphgb.js +0 -2
  323. package/bundle/chunk-37cbrnke.js +0 -8
  324. package/bundle/chunk-3cx4p07h.js +0 -2
  325. package/bundle/chunk-3f2cjzb4.js +0 -2
  326. package/bundle/chunk-3qvap1kv.js +0 -2
  327. package/bundle/chunk-42hvspe7.js +0 -2
  328. package/bundle/chunk-452tk6v3.js +0 -2
  329. package/bundle/chunk-4gqb1hps.js +0 -2
  330. package/bundle/chunk-50qgz5ka.js +0 -2
  331. package/bundle/chunk-5b0xyq5z.js +0 -2
  332. package/bundle/chunk-5j4nxpdy.js +0 -2
  333. package/bundle/chunk-5nxgk6hw.js +0 -2
  334. package/bundle/chunk-5qkvhr6y.js +0 -2
  335. package/bundle/chunk-66qmmmdp.js +0 -2
  336. package/bundle/chunk-66wv82vf.js +0 -2
  337. package/bundle/chunk-6dpdkzrk.js +0 -2
  338. package/bundle/chunk-6p6m5956.js +0 -3
  339. package/bundle/chunk-6yhn9syz.js +0 -2
  340. package/bundle/chunk-7b60whxm.js +0 -2
  341. package/bundle/chunk-7g59hc61.js +0 -2
  342. package/bundle/chunk-7p88j56s.js +0 -2
  343. package/bundle/chunk-7trngc9g.js +0 -2
  344. package/bundle/chunk-8cebbmtf.js +0 -2
  345. package/bundle/chunk-8csas2jc.js +0 -2
  346. package/bundle/chunk-8g4jdqq1.js +0 -2
  347. package/bundle/chunk-8j1xcdmd.js +0 -2
  348. package/bundle/chunk-90r2z49k.js +0 -2
  349. package/bundle/chunk-94mjwy22.js +0 -2
  350. package/bundle/chunk-aenrd7dk.js +0 -2
  351. package/bundle/chunk-ahmy80vb.js +0 -2
  352. package/bundle/chunk-avn12jkt.js +0 -2
  353. package/bundle/chunk-b7ncyat6.js +0 -2
  354. package/bundle/chunk-bjv1h2dq.js +0 -2
  355. package/bundle/chunk-brk6bge4.js +0 -3
  356. package/bundle/chunk-c2a74stf.js +0 -2
  357. package/bundle/chunk-ce5e7j62.js +0 -2
  358. package/bundle/chunk-cw1gwjx9.js +0 -2
  359. package/bundle/chunk-czw30fjs.js +0 -2
  360. package/bundle/chunk-ddx2pcr4.js +0 -2
  361. package/bundle/chunk-dmkgjf1v.js +0 -3
  362. package/bundle/chunk-dwhsvpag.js +0 -2
  363. package/bundle/chunk-e01jgnnm.js +0 -2
  364. package/bundle/chunk-e0hfpdje.js +0 -2
  365. package/bundle/chunk-e5jk67xh.js +0 -2
  366. package/bundle/chunk-eg4pq4hv.js +0 -2
  367. package/bundle/chunk-ew3yz97p.js +0 -2
  368. package/bundle/chunk-ezgfhy4e.js +0 -2
  369. package/bundle/chunk-f2yfyhh8.js +0 -2
  370. package/bundle/chunk-f30em1wx.js +0 -2
  371. package/bundle/chunk-fge37dke.js +0 -2
  372. package/bundle/chunk-gbvm6dpv.js +0 -2
  373. package/bundle/chunk-gefx3n08.js +0 -14
  374. package/bundle/chunk-h5w91zr4.js +0 -2
  375. package/bundle/chunk-hmpb3c21.js +0 -2
  376. package/bundle/chunk-j32rr7rt.js +0 -2
  377. package/bundle/chunk-j871xzr7.js +0 -2
  378. package/bundle/chunk-k3hgwszx.js +0 -2
  379. package/bundle/chunk-kwfe4em6.js +0 -7
  380. package/bundle/chunk-kx88qekb.js +0 -2
  381. package/bundle/chunk-n61e0znt.js +0 -2
  382. package/bundle/chunk-n6v36np0.js +0 -2
  383. package/bundle/chunk-ndd4cn3z.js +0 -2
  384. package/bundle/chunk-nfafk3ts.js +0 -5
  385. package/bundle/chunk-njsmma3a.js +0 -2
  386. package/bundle/chunk-nr2j8ytn.js +0 -3
  387. package/bundle/chunk-nwj6mcxz.js +0 -2
  388. package/bundle/chunk-p5b5ekhh.js +0 -2
  389. package/bundle/chunk-pf23nw4z.js +0 -2
  390. package/bundle/chunk-pw3cv89g.js +0 -2
  391. package/bundle/chunk-q3c8mfbq.js +0 -2
  392. package/bundle/chunk-qc89yj61.js +0 -2
  393. package/bundle/chunk-qn8tz704.js +0 -2
  394. package/bundle/chunk-qq9m8fxv.js +0 -808
  395. package/bundle/chunk-qxre2gqn.js +0 -2
  396. package/bundle/chunk-rdk62809.js +0 -2
  397. package/bundle/chunk-rew6r516.js +0 -2
  398. package/bundle/chunk-rjhvdfn5.js +0 -2
  399. package/bundle/chunk-skgr9ypq.js +0 -2
  400. package/bundle/chunk-sv40pwe2.js +0 -2
  401. package/bundle/chunk-tfhpjmny.js +0 -2
  402. package/bundle/chunk-tnete6ye.js +0 -2
  403. package/bundle/chunk-tpyq7ycb.js +0 -2
  404. package/bundle/chunk-txkdt4ep.js +0 -2
  405. package/bundle/chunk-v5h5wxw5.js +0 -2
  406. package/bundle/chunk-v6141yq1.js +0 -2
  407. package/bundle/chunk-vfd3azkp.js +0 -3
  408. package/bundle/chunk-vjs69r6x.js +0 -2
  409. package/bundle/chunk-vmhar83s.js +0 -2
  410. package/bundle/chunk-vqvnw12p.js +0 -2
  411. package/bundle/chunk-w0sng8a9.js +0 -2
  412. package/bundle/chunk-w0sztk4y.js +0 -2
  413. package/bundle/chunk-w6bb320d.js +0 -2
  414. package/bundle/chunk-waa1ggtj.js +0 -2
  415. package/bundle/chunk-wb05bp10.js +0 -3
  416. package/bundle/chunk-wf41m019.js +0 -2
  417. package/bundle/chunk-wqw6yjrg.js +0 -2
  418. package/bundle/chunk-ws08rxge.js +0 -2
  419. package/bundle/chunk-wz3dvc3g.js +0 -2
  420. package/bundle/chunk-x2pmqvdc.js +0 -2
  421. package/bundle/chunk-x4wfq39v.js +0 -2
  422. package/bundle/chunk-xs6v0r9m.js +0 -3
  423. package/bundle/chunk-yb6m08zj.js +0 -2
  424. package/bundle/chunk-ybcqkgs7.js +0 -2
  425. package/bundle/chunk-zj1jc1xt.js +0 -2
  426. package/bundle/chunk-zm0m0504.js +0 -2
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Ul as an,Vl as _i,Wl as bn,Xl as Ni,Zl as Yr,_l as zr}from"./chunk-58f4y4b7.js";import{$l as uo,$m as Fo,Am as Qr,Bm as Z,Cm as go,Dm as Kn,Em as lo,Fm as so,Gm as _o,Hm as No,Im as po,Jm as Ao,Km as To,Lm as Ir,Mm as Oo,Nm as $o,Om as Do,Pm as Lr,Qm as vo,Rm as dr,Sm as Bo,Tm as Gr,Um as Jr,Vm as Mr,Wm as Sr,Xm as Cr,Ym as Hr,Zm as Qo,_m as Io,am as yo,cm as er,dm as mr,em as ur,en as ui,fm as yr,gm as fr,hm as gr,im as lr,jm as sr,km as _r,lm as Nr,mm as pr,nm as Ar,om as V,pm as Tr,qm as Or,rm as $r,sm as Dr,tm as vr,um as Br,vm as j,wm as v,xm as yn,ym as un,zm as Xo}from"./chunk-rmsqb6r4.js";import{Ln as Fn,Pn as jn}from"./chunk-ydgst3h8.js";import{Qn as gi}from"./chunk-6tqbnxar.js";import{Rn as Mo}from"./chunk-0w19vmd7.js";import{Aq as ti,Cq as ni,wq as Wn,xq as hn,yq as Nn,zq as hr}from"./chunk-9009v4d0.js";import{Dq as ri}from"./chunk-82xrfk5x.js";import{Er as gn}from"./chunk-vkjqy92f.js";import{bs as ro}from"./chunk-0tm6589k.js";import{fs as Ro}from"./chunk-wb05bp10.js";import{Os as nn,Xs as c}from"./chunk-59csnjc3.js";import{_s as Xr,bt as qo,ct as k,gt as mo,lt as $n}from"./chunk-1bxfzd6r.js";import{mt as a}from"./chunk-6p6m5956.js";import{bz as pn,jz as Jn,xz as Cn}from"./chunk-w7a33cwa.js";import{AB as vn,EE as h,MD as Ko,TD as Xn,UN as N,_D as ln,fH as r,iK as Zr,jJ as Uo,mB as cn,nI as Ln,oE as Ur}from"./chunk-g7v6sp3c.js";import{vO as On}from"./chunk-e0vrxetq.js";var Vo={};On(Vo,{run:()=>$i});var mn={time_created:j().notNull().$default(()=>Date.now()),time_updated:j().notNull().$onUpdate(()=>Date.now())};var J=un("project",{id:v().$type().primaryKey(),worktree:v().notNull(),vcs:v(),name:v(),icon_url:v(),icon_color:v(),...mn,time_initialized:j(),sandboxes:v({mode:"json"}).notNull().$type(),commands:v({mode:"json"}).$type()});var fn=un("session",{id:v().$type().primaryKey(),project_id:v().$type().notNull().references(()=>J.id,{onDelete:"cascade"}),workspace_id:v().$type(),parent_id:v().$type(),context_from:v().$type(),context_watermark:v().$type(),slug:v().notNull(),directory:v().notNull(),title:v().notNull(),version:v().notNull(),share_url:v(),summary_additions:j(),summary_deletions:j(),summary_files:j(),summary_diffs:v({mode:"json"}).$type(),revert:v({mode:"json"}).$type(),permission:v({mode:"json"}).$type(),...mn,time_compacting:j(),time_archived:j(),last_checkpoint_message_id:v().$type()},(n)=>[yn("session_project_idx").on(n.project_id),yn("session_workspace_idx").on(n.workspace_id),yn("session_parent_idx").on(n.parent_id),yn("session_context_from_idx").on(n.context_from)]),eo=un("message",{id:v().$type().primaryKey(),session_id:v().$type().notNull().references(()=>fn.id,{onDelete:"cascade"}),agent_id:v().notNull().default("main"),...mn,data:v({mode:"json"}).notNull().$type()},(n)=>[yn("message_session_time_created_id_idx").on(n.session_id,n.time_created,n.id),yn("message_session_agent_idx").on(n.session_id,n.agent_id,n.id)]),Yo=un("part",{id:v().$type().primaryKey(),message_id:v().$type().notNull().references(()=>eo.id,{onDelete:"cascade"}),session_id:v().$type().notNull(),...mn,data:v({mode:"json"}).notNull().$type()},(n)=>[yn("part_message_id_id_idx").on(n.message_id,n.id),yn("part_session_idx").on(n.session_id)]),zo=un("todo",{session_id:v().$type().notNull().references(()=>fn.id,{onDelete:"cascade"}),content:v().notNull(),status:v().notNull(),position:j().notNull(),...mn},(n)=>[Xo({columns:[n.session_id,n.position]}),yn("todo_session_idx").on(n.session_id)]),co=un("permission",{project_id:v().primaryKey().references(()=>J.id,{onDelete:"cascade"}),...mn,data:v({mode:"json"}).notNull().$type()});var ko=un("session_share",{session_id:v().primaryKey().references(()=>fn.id,{onDelete:"cascade"}),id:v().notNull(),secret:v().notNull(),url:v().notNull(),...mn});import z from"path";var U=c.create({service:"json-migration"});async function $i(n,o){let i=z.join($n.Path.data,"storage");if(!await mo.exists(i))return U.info("storage directory does not exist, skipping migration"),{projects:0,sessions:0,messages:0,parts:0,todos:0,permissions:0,shares:0,errors:[]};U.info("starting json to sqlite migration",{storageDir:i});let l=performance.now();n.run("PRAGMA journal_mode = WAL"),n.run("PRAGMA synchronous = OFF"),n.run("PRAGMA cache_size = 10000"),n.run("PRAGMA temp_store = MEMORY");let e={projects:0,sessions:0,messages:0,parts:0,todos:0,permissions:0,shares:0,errors:[]},A={sessions:0,todos:0,permissions:0,shares:0},_=e.errors,T=1000,M=Date.now();async function x(f){return qo.scan(f,{cwd:i,absolute:!0})}async function C(f,d,S){let B=S-d,p=Array(B);for(let E=0;E<B;E++)p[E]=mo.readJson(f[d+E]);let G=await Promise.allSettled(p),W=Array(B);for(let E=0;E<G.length;E++){let q=G[E];if(q.status==="fulfilled"){W[E]=q.value;continue}_.push(`failed to read ${f[d+E]}: ${q.reason}`)}return W}function H(f,d,S){if(f.length===0)return 0;try{return n.insert(d).values(f).onConflictDoNothing().run(),f.length}catch(B){return _.push(`failed to migrate ${S} batch: ${B}`),0}}U.info("scanning files...");let[K,$,Q,L,g,s,m]=await Promise.all([x("project/*.json"),x("session/*/*.json"),x("message/*/*.json"),x("part/*/*.json"),x("todo/*.json"),x("permission/*.json"),x("session_share/*.json")]);U.info("file scan complete",{projects:K.length,sessions:$.length,messages:Q.length,parts:L.length,todos:g.length,permissions:s.length,shares:m.length});let y=Math.max(1,K.length+$.length+Q.length+L.length+g.length+s.length+m.length),t=o?.progress,u=0,D=(f,d)=>{u=Math.min(y,u+d),t?.({current:u,total:y,label:f})};t?.({current:u,total:y,label:"starting"}),n.run("BEGIN TRANSACTION");let I=new Set,O=[];for(let f=0;f<K.length;f+=T){let d=Math.min(f+T,K.length),S=await C(K,f,d);O.length=0;for(let B=0;B<S.length;B++){let p=S[B];if(!p)continue;let G=z.basename(K[f+B],".json");I.add(G),O.push({id:G,worktree:p.worktree??"/",vcs:p.vcs,name:p.name??void 0,icon_url:p.icon?.url,icon_color:p.icon?.color,time_created:p.time?.created??M,time_updated:p.time?.updated??M,time_initialized:p.time?.initialized,sandboxes:p.sandboxes??[],commands:p.commands})}e.projects+=H(O,J,"project"),D("projects",d-f)}U.info("migrated projects",{count:e.projects,duration:Math.round(performance.now()-l)});let P=$.map((f)=>z.basename(z.dirname(f))),Y=new Set,en=[];for(let f=0;f<$.length;f+=T){let d=Math.min(f+T,$.length),S=await C($,f,d);en.length=0;for(let B=0;B<S.length;B++){let p=S[B];if(!p)continue;let G=z.basename($[f+B],".json"),W=P[f+B];if(!I.has(W)){A.sessions++;continue}Y.add(G),en.push({id:G,project_id:W,parent_id:p.parentID??null,slug:p.slug??"",directory:p.directory??"",title:p.title??"",version:p.version??"",share_url:p.share?.url??null,summary_additions:p.summary?.additions??null,summary_deletions:p.summary?.deletions??null,summary_files:p.summary?.files??null,summary_diffs:p.summary?.diffs??null,revert:p.revert??null,permission:p.permission??null,time_created:p.time?.created??M,time_updated:p.time?.updated??M,time_compacting:p.time?.compacting??null,time_archived:p.time?.archived??null})}e.sessions+=H(en,fn,"session"),D("sessions",d-f)}if(U.info("migrated sessions",{count:e.sessions}),A.sessions>0)U.warn("skipped orphaned sessions",{count:A.sessions});let sn=[],R=[],kn=new Map;for(let f of Q){let d=z.basename(z.dirname(f));if(!Y.has(d))continue;sn.push(f),R.push(d)}for(let f=0;f<sn.length;f+=T){let d=Math.min(f+T,sn.length),S=await C(sn,f,d),B=Array(S.length),p=0;for(let G=0;G<S.length;G++){let W=S[G];if(!W)continue;let E=sn[f+G],q=z.basename(E,".json"),xn=R[f+G];kn.set(q,xn);let Bn=W;delete Bn.id,delete Bn.sessionID,B[p++]={id:q,session_id:xn,time_created:W.time?.created??M,time_updated:W.time?.updated??M,data:Bn}}B.length=p,e.messages+=H(B,eo,"message"),D("messages",d-f)}U.info("migrated messages",{count:e.messages});for(let f=0;f<L.length;f+=T){let d=Math.min(f+T,L.length),S=await C(L,f,d),B=Array(S.length),p=0;for(let G=0;G<S.length;G++){let W=S[G];if(!W)continue;let E=L[f+G],q=z.basename(E,".json"),xn=z.basename(z.dirname(E)),Bn=kn.get(xn);if(!Bn){_.push(`part missing message session: ${E}`);continue}if(!Y.has(Bn))continue;let wn=W;delete wn.id,delete wn.messageID,delete wn.sessionID,B[p++]={id:q,message_id:xn,session_id:Bn,time_created:W.time?.created??M,time_updated:W.time?.updated??M,data:wn}}B.length=p,e.parts+=H(B,Yo,"part"),D("parts",d-f)}U.info("migrated parts",{count:e.parts});let Tn=g.map((f)=>z.basename(f,".json"));for(let f=0;f<g.length;f+=T){let d=Math.min(f+T,g.length),S=await C(g,f,d),B=[];for(let p=0;p<S.length;p++){let G=S[p];if(!G)continue;let W=Tn[f+p];if(!Y.has(W)){A.todos++;continue}if(!Array.isArray(G)){_.push(`todo not an array: ${g[f+p]}`);continue}for(let E=0;E<G.length;E++){let q=G[E];if(!q?.content||!q?.status)continue;B.push({session_id:W,content:q.content,status:q.status,position:E,time_created:M,time_updated:M})}}e.todos+=H(B,zo,"todo"),D("todos",d-f)}if(U.info("migrated todos",{count:e.todos}),A.todos>0)U.warn("skipped orphaned todos",{count:A.todos});let qn=s.map((f)=>z.basename(f,".json")),Hn=[];for(let f=0;f<s.length;f+=T){let d=Math.min(f+T,s.length),S=await C(s,f,d);Hn.length=0;for(let B=0;B<S.length;B++){let p=S[B];if(!p)continue;let G=qn[f+B];if(!I.has(G)){A.permissions++;continue}Hn.push({project_id:G,data:p})}e.permissions+=H(Hn,co,"permission"),D("permissions",d-f)}if(U.info("migrated permissions",{count:e.permissions}),A.permissions>0)U.warn("skipped orphaned permissions",{count:A.permissions});let Vn=m.map((f)=>z.basename(f,".json")),dn=[];for(let f=0;f<m.length;f+=T){let d=Math.min(f+T,m.length),S=await C(m,f,d);dn.length=0;for(let B=0;B<S.length;B++){let p=S[B];if(!p)continue;let G=Vn[f+B];if(!Y.has(G)){A.shares++;continue}if(!p?.id||!p?.secret||!p?.url){_.push(`session_share missing id/secret/url: ${m[f+B]}`);continue}dn.push({session_id:G,id:p.id,secret:p.secret,url:p.url})}e.shares+=H(dn,ko,"session_share"),D("shares",d-f)}if(U.info("migrated session shares",{count:e.shares}),A.shares>0)U.warn("skipped orphaned session shares",{count:A.shares});if(n.run("COMMIT"),U.info("json migration complete",{projects:e.projects,sessions:e.sessions,messages:e.messages,parts:e.parts,todos:e.todos,permissions:e.permissions,shares:e.shares,errorCount:e.errors.length,duration:Math.round(performance.now()-l)}),e.errors.length>0)U.warn("migration errors",{errors:e.errors.slice(0,20)});return t?.({current:y,total:y,label:"complete"}),e}var In={};On(In,{use:()=>Ce,transaction:()=>xe,textDecoder:()=>re,sumDistinct:()=>rr,sum:()=>or,sql:()=>V,relationsOrderToSQL:()=>Rt,relationsFilterToSQL:()=>Kt,relationToSQL:()=>xt,relationExtrasToSQL:()=>Ht,processRelations:()=>Ct,placeholder:()=>Or,param:()=>Ar,orderSelectedFields:()=>oe,orderByOperators:()=>St,or:()=>lo,operators:()=>Mt,notLike:()=>Gr,notInArray:()=>Ir,notIlike:()=>Mr,notExists:()=>Lr,notBetween:()=>dr,not:()=>so,noopMapper:()=>Nr,noopEncoder:()=>_r,noopDecoder:()=>sr,ne:()=>go,name:()=>gr,min:()=>tr,max:()=>ir,mapUpdateSet:()=>ne,mapResultRow:()=>ht,mapRelationalRow:()=>Jt,mapColumnsInSQLToAlias:()=>it,mapColumnsInAliasedSQLToAlias:()=>rt,lte:()=>Ao,lt:()=>po,like:()=>Bo,l2Distance:()=>Xt,l1Distance:()=>Zt,jaccardDistance:()=>Ut,isWithEnum:()=>bt,isView:()=>vr,isTable:()=>Yi,isSQLWrapper:()=>mr,isNull:()=>Oo,isNotNull:()=>$o,isDriverValueEncoder:()=>lr,isConfig:()=>at,is:()=>Mi,innerProduct:()=>Wt,inArray:()=>To,ilike:()=>Jr,haveSameKeys:()=>jt,hasOwnEntityKind:()=>Ji,hammingDistance:()=>Pt,gte:()=>No,gt:()=>_o,getViewSelectedFields:()=>Ft,getViewName:()=>Br,getTableUniqueName:()=>Xi,getTableName:()=>Zi,getTableLikeName:()=>wt,getTableColumns:()=>Vt,getTableAsAliasSQL:()=>Gt,getOriginalColumnFromAlias:()=>ot,getOrderByOperators:()=>dt,getColumns:()=>qt,getColumnTable:()=>Ci,getColumnNameAndConfig:()=>kt,getChannelPath:()=>li,fillPlaceholders:()=>$r,fieldSelectionToSQL:()=>Lt,extractTablesFromSchema:()=>It,extractExtendedColumnType:()=>mt,exists:()=>Do,eq:()=>Z,entityKind:()=>Gi,effect:()=>He,desc:()=>Io,defineRelationsPart:()=>Qt,defineRelations:()=>Bt,createRelationsHelper:()=>vt,countDistinct:()=>bo,count:()=>fo,cosineDistance:()=>Et,close:()=>Se,buildRelationsParts:()=>Dt,buildRelations:()=>$t,bindIfParam:()=>Qr,between:()=>vo,avgDistinct:()=>nr,avg:()=>ho,assertUnreachable:()=>ct,asc:()=>Qo,arrayOverlaps:()=>Hr,arrayContains:()=>Sr,arrayContained:()=>Cr,applyMixins:()=>zt,and:()=>Kn,aliasedTableColumn:()=>nt,aliasedTable:()=>hi,aliasedRelation:()=>bi,aliasedColumn:()=>ai,WithSubquery:()=>ci,ViewSelectionAliasProxyHandler:()=>ji,ViewBaseConfig:()=>ki,View:()=>Dr,TransactionRollbackError:()=>ft,TableSchema:()=>Ui,TableColumns:()=>Wi,TableAliasProxyHandler:()=>Fi,Table:()=>Pi,Subquery:()=>zi,StringChunk:()=>ur,SQL:()=>yr,RelationsHelperStatic:()=>Ot,RelationsBuilderTable:()=>Tt,RelationsBuilderJunctionColumn:()=>At,RelationsBuilderColumn:()=>pt,RelationTableAliasProxyHandler:()=>wi,Relation:()=>Nt,QueryPromise:()=>tt,Placeholder:()=>Tr,Path:()=>Eo,Param:()=>pr,OriginalName:()=>Ei,One:()=>_t,NotFoundError:()=>Me,NoopLogger:()=>di,Name:()=>fr,Many:()=>st,IsAlias:()=>Ri,FakePrimitiveParam:()=>er,ExtraConfigColumns:()=>Ki,ExtraConfigBuilder:()=>xi,DrizzleQueryError:()=>yt,DrizzleError:()=>ut,DefaultLogger:()=>Li,Count:()=>lt,ConsoleLogWriter:()=>Ii,ColumnTableAliasProxyHandler:()=>Vi,ColumnBuilder:()=>et,ColumnAliasProxyHandler:()=>qi,Column:()=>Si,Client:()=>Mn,CONSTANTS:()=>Yt,BaseName:()=>Hi,AggregatedField:()=>gt});import Di from"crypto";import wo,{existsSync as vi,readdirSync as Bi}from"fs";import{join as Qi}from"path";function jo(n){if(wo.existsSync(`${n.migrationsFolder}/meta/_journal.json`))throw Error('We detected that you have old drizzle-kit migration folders. You must upgrade drizzle-kit and run "drizzle-kit up"');let o=n.migrationsFolder,i=[],l=Bi(o).map((e)=>({path:Qi(o,e,"migration.sql"),name:e})).filter((e)=>vi(e.path));l.sort((e,A)=>e.name.localeCompare(A.name));for(let e of l){let A=e.path,_=e.name.slice(0,14),T=wo.readFileSync(A).toString(),M=T.split("--> statement-breakpoint").map((C)=>{return C}),x=Fo(_);i.push({sql:M,bps:!0,folderMillis:x,hash:Di.createHash("sha256").update(T).digest("hex"),name:e.name})}return i}function ao(n,o){if(Array.isArray(o)||"migrationsJournal"in o){let l=Array.isArray(o)?o:o.migrationsJournal,e=Array.isArray(o)?void 0:o.migrationsTable,A=l.map((_)=>({sql:_.sql.split("--> statement-breakpoint"),folderMillis:_.timestamp,hash:"",bps:!0,name:_.name}));return n.dialect.migrate(A,n.session,{migrationsTable:e})}let i=jo(o);return n.dialect.migrate(i,n.session,o)}function fo(n){return V`count(${n||V.raw("*")})`.mapWith(Number)}function bo(n){return V`count(distinct ${n})`.mapWith(Number)}function ho(n){return V`avg(${n})`.mapWith(String)}function nr(n){return V`avg(distinct ${n})`.mapWith(String)}function or(n){return V`sum(${n})`.mapWith(String)}function rr(n){return V`sum(distinct ${n})`.mapWith(String)}function ir(n){return V`max(${n})`.mapWith(uo(n,yo)?n:String)}function tr(n){return V`min(${n})`.mapWith(uo(n,yo)?n:String)}import oo from"path";var Un={};On(Un,{workspaceID:()=>De,useEffect:()=>Qe,use:()=>Be,make:()=>ve,invalidate:()=>Le,has:()=>Ie,get:()=>xo,directory:()=>no,context:()=>Ho,bind:()=>$e});import{EventEmitter as ie}from"events";var Rn=new ie;var Lo=new Set;function xr(n){return Lo.add(n),()=>{Lo.delete(n)}}async function Go(n){await Promise.allSettled([...Lo].map((o)=>o(n)))}function En(n){return n()}var jr={};On(jr,{setInitialized:()=>se,list:()=>ge,layer:()=>Fr,get:()=>le,fromRow:()=>_n,defaultLayer:()=>Co,UpdateInput:()=>fe,Service:()=>Gn,Info:()=>Vr,Event:()=>wr});import*as F from"fs/promises";import*as cr from"os";import*as Dn from"path";var te=N.String.pipe(N.brand("ProjectID")),w=te.pipe(Fn((n)=>({global:n.make("global"),zod:a.string().pipe(a.custom())})));import*as Qn from"fs/promises";import*as b from"path";import*as Er from"crypto";async function Jo(n){let o=b.resolve(n);while(!0){let i=b.join(o,".git"),l=await Qn.stat(i).catch(()=>null);if(l){if(l.isDirectory())return i;let _=(await Qn.readFile(i,"utf-8")).trim().match(/^gitdir:\s*(.+)$/);if(!_)return null;let T=b.isAbsolute(_[1])?_[1]:b.resolve(o,_[1]);return b.resolve(T,"../..")}let e=b.dirname(o);if(e===o)return null;o=e}}async function Kr(n){let o=await Qn.readFile(n,"utf-8").catch(()=>null);if(o===null)return null;return o.trim()||null}async function Rr(n){let o=await Kr(n);if(o)return o;let i=Er.randomUUID();try{return await Qn.writeFile(n,i,{flag:"wx"}),i}catch(l){if(l.code!=="EEXIST")throw l;let e=await Kr(n);if(e)return e;throw Error(`Project ID file was concurrently created but is empty: ${n}`)}}async function Pr(n){let o=await Jo(n);if(o){let l=b.join(o,"qitqode-project-id");return w.make(await Rr(l))}let i=b.join(n,".qitqode-project-id");return w.make(await Rr(i))}async function me(n){let o=await Jo(n);if(!o)return;let i=Dn.join(n,".qitqode-project-id"),l=Dn.join(o,"qitqode-project-id"),e=(T)=>F.access(T).then(()=>!0).catch(()=>!1);if(await e(i)){if(!await e(l)){let T=await F.readFile(i,"utf-8");await F.writeFile(l,T)}await F.unlink(i).catch(()=>{})}let A=Dn.join(o,"info","exclude");if(await F.mkdir(Dn.dirname(A),{recursive:!0}),!(await F.readFile(A,"utf-8").catch(()=>"")).includes(".qitqode-project-id"))await F.appendFile(A,`
2
+ import{Pl as an,Ql as _i,Rl as bn,Sl as Ni,Ul as Yr,Vl as zr}from"./chunk-dx7rexx3.js";import{$l as ur,$m as ui,Am as so,Bm as _o,Cm as No,Dm as po,Em as Ao,Fm as To,Gm as Ir,Hm as Oo,Im as $o,Jm as Do,Km as Lr,Lm as vo,Mm as dr,Nm as Bo,Om as Gr,Pm as Jr,Qm as Mr,Rm as Sr,Sm as Cr,Tm as Hr,Um as Qo,Vm as Io,Wl as uo,Wm as Fo,Xl as yo,Zl as er,_l as mr,am as yr,bm as fr,cm as gr,dm as lr,em as sr,fm as _r,gm as Nr,hm as pr,im as Ar,jm as V,km as Tr,lm as Or,mm as $r,nm as Dr,om as vr,pm as Br,qm as j,rm as v,sm as yn,tm as un,um as Xo,vm as Qr,wm as Z,xm as go,ym as Kn,zm as lo}from"./chunk-xgf4k9q7.js";import{Gn as Fn,Kn as jn}from"./chunk-qdafm7qg.js";import{Ln as gi}from"./chunk-r81w6skn.js";import{Mn as Mo}from"./chunk-ge7csm6m.js";import{tr as Wn,ur as hn,vr as Nn,wr as hr,xr as ti,zr as ni}from"./chunk-gq3zb4wv.js";import{Ar as ri}from"./chunk-2cvwrabw.js";import{Bs as gn}from"./chunk-g52wmt1v.js";import{_s as ro}from"./chunk-wd2xmkdp.js";import{ct as Ro}from"./chunk-azss4acq.js";import{Lt as nn,Ut as c}from"./chunk-7s0nq2aa.js";import{$t as k,Xt as Xr,_t as qo,du as mo,iu as $n}from"./chunk-cxtwavyf.js";import{ju as a}from"./chunk-15bjhfav.js";import{_z as pn,gA as Jn,uA as Cn}from"./chunk-x308f9j4.js";import{BF as h,JE as Ko,QE as Xn,RO as N,XE as ln,cI as r,fL as Zr,gK as Uo,jC as cn,kJ as Ln,lF as Ur,xC as vn}from"./chunk-2zjet9tx.js";import{sP as On}from"./chunk-djfrkbd5.js";var Vo={};On(Vo,{run:()=>$i});var mn={time_created:j().notNull().$default(()=>Date.now()),time_updated:j().notNull().$onUpdate(()=>Date.now())};var J=un("project",{id:v().$type().primaryKey(),worktree:v().notNull(),vcs:v(),name:v(),icon_url:v(),icon_color:v(),...mn,time_initialized:j(),sandboxes:v({mode:"json"}).notNull().$type(),commands:v({mode:"json"}).$type()});var fn=un("session",{id:v().$type().primaryKey(),project_id:v().$type().notNull().references(()=>J.id,{onDelete:"cascade"}),workspace_id:v().$type(),parent_id:v().$type(),context_from:v().$type(),context_watermark:v().$type(),slug:v().notNull(),directory:v().notNull(),title:v().notNull(),version:v().notNull(),share_url:v(),summary_additions:j(),summary_deletions:j(),summary_files:j(),summary_diffs:v({mode:"json"}).$type(),revert:v({mode:"json"}).$type(),permission:v({mode:"json"}).$type(),...mn,time_compacting:j(),time_archived:j(),last_checkpoint_message_id:v().$type()},(n)=>[yn("session_project_idx").on(n.project_id),yn("session_workspace_idx").on(n.workspace_id),yn("session_parent_idx").on(n.parent_id),yn("session_context_from_idx").on(n.context_from)]),eo=un("message",{id:v().$type().primaryKey(),session_id:v().$type().notNull().references(()=>fn.id,{onDelete:"cascade"}),agent_id:v().notNull().default("main"),...mn,data:v({mode:"json"}).notNull().$type()},(n)=>[yn("message_session_time_created_id_idx").on(n.session_id,n.time_created,n.id),yn("message_session_agent_idx").on(n.session_id,n.agent_id,n.id)]),Yo=un("part",{id:v().$type().primaryKey(),message_id:v().$type().notNull().references(()=>eo.id,{onDelete:"cascade"}),session_id:v().$type().notNull(),...mn,data:v({mode:"json"}).notNull().$type()},(n)=>[yn("part_message_id_id_idx").on(n.message_id,n.id),yn("part_session_idx").on(n.session_id)]),zo=un("todo",{session_id:v().$type().notNull().references(()=>fn.id,{onDelete:"cascade"}),content:v().notNull(),status:v().notNull(),position:j().notNull(),...mn},(n)=>[Xo({columns:[n.session_id,n.position]}),yn("todo_session_idx").on(n.session_id)]),co=un("permission",{project_id:v().primaryKey().references(()=>J.id,{onDelete:"cascade"}),...mn,data:v({mode:"json"}).notNull().$type()});var ko=un("session_share",{session_id:v().primaryKey().references(()=>fn.id,{onDelete:"cascade"}),id:v().notNull(),secret:v().notNull(),url:v().notNull(),...mn});import z from"path";var U=c.create({service:"json-migration"});async function $i(n,o){let i=z.join($n.Path.data,"storage");if(!await mo.exists(i))return U.info("storage directory does not exist, skipping migration"),{projects:0,sessions:0,messages:0,parts:0,todos:0,permissions:0,shares:0,errors:[]};U.info("starting json to sqlite migration",{storageDir:i});let l=performance.now();n.run("PRAGMA journal_mode = WAL"),n.run("PRAGMA synchronous = OFF"),n.run("PRAGMA cache_size = 10000"),n.run("PRAGMA temp_store = MEMORY");let e={projects:0,sessions:0,messages:0,parts:0,todos:0,permissions:0,shares:0,errors:[]},A={sessions:0,todos:0,permissions:0,shares:0},_=e.errors,T=1000,M=Date.now();async function x(f){return qo.scan(f,{cwd:i,absolute:!0})}async function C(f,d,S){let B=S-d,p=Array(B);for(let E=0;E<B;E++)p[E]=mo.readJson(f[d+E]);let G=await Promise.allSettled(p),W=Array(B);for(let E=0;E<G.length;E++){let q=G[E];if(q.status==="fulfilled"){W[E]=q.value;continue}_.push(`failed to read ${f[d+E]}: ${q.reason}`)}return W}function H(f,d,S){if(f.length===0)return 0;try{return n.insert(d).values(f).onConflictDoNothing().run(),f.length}catch(B){return _.push(`failed to migrate ${S} batch: ${B}`),0}}U.info("scanning files...");let[K,$,Q,L,g,s,m]=await Promise.all([x("project/*.json"),x("session/*/*.json"),x("message/*/*.json"),x("part/*/*.json"),x("todo/*.json"),x("permission/*.json"),x("session_share/*.json")]);U.info("file scan complete",{projects:K.length,sessions:$.length,messages:Q.length,parts:L.length,todos:g.length,permissions:s.length,shares:m.length});let y=Math.max(1,K.length+$.length+Q.length+L.length+g.length+s.length+m.length),t=o?.progress,u=0,D=(f,d)=>{u=Math.min(y,u+d),t?.({current:u,total:y,label:f})};t?.({current:u,total:y,label:"starting"}),n.run("BEGIN TRANSACTION");let I=new Set,O=[];for(let f=0;f<K.length;f+=T){let d=Math.min(f+T,K.length),S=await C(K,f,d);O.length=0;for(let B=0;B<S.length;B++){let p=S[B];if(!p)continue;let G=z.basename(K[f+B],".json");I.add(G),O.push({id:G,worktree:p.worktree??"/",vcs:p.vcs,name:p.name??void 0,icon_url:p.icon?.url,icon_color:p.icon?.color,time_created:p.time?.created??M,time_updated:p.time?.updated??M,time_initialized:p.time?.initialized,sandboxes:p.sandboxes??[],commands:p.commands})}e.projects+=H(O,J,"project"),D("projects",d-f)}U.info("migrated projects",{count:e.projects,duration:Math.round(performance.now()-l)});let P=$.map((f)=>z.basename(z.dirname(f))),Y=new Set,en=[];for(let f=0;f<$.length;f+=T){let d=Math.min(f+T,$.length),S=await C($,f,d);en.length=0;for(let B=0;B<S.length;B++){let p=S[B];if(!p)continue;let G=z.basename($[f+B],".json"),W=P[f+B];if(!I.has(W)){A.sessions++;continue}Y.add(G),en.push({id:G,project_id:W,parent_id:p.parentID??null,slug:p.slug??"",directory:p.directory??"",title:p.title??"",version:p.version??"",share_url:p.share?.url??null,summary_additions:p.summary?.additions??null,summary_deletions:p.summary?.deletions??null,summary_files:p.summary?.files??null,summary_diffs:p.summary?.diffs??null,revert:p.revert??null,permission:p.permission??null,time_created:p.time?.created??M,time_updated:p.time?.updated??M,time_compacting:p.time?.compacting??null,time_archived:p.time?.archived??null})}e.sessions+=H(en,fn,"session"),D("sessions",d-f)}if(U.info("migrated sessions",{count:e.sessions}),A.sessions>0)U.warn("skipped orphaned sessions",{count:A.sessions});let sn=[],R=[],kn=new Map;for(let f of Q){let d=z.basename(z.dirname(f));if(!Y.has(d))continue;sn.push(f),R.push(d)}for(let f=0;f<sn.length;f+=T){let d=Math.min(f+T,sn.length),S=await C(sn,f,d),B=Array(S.length),p=0;for(let G=0;G<S.length;G++){let W=S[G];if(!W)continue;let E=sn[f+G],q=z.basename(E,".json"),xn=R[f+G];kn.set(q,xn);let Bn=W;delete Bn.id,delete Bn.sessionID,B[p++]={id:q,session_id:xn,time_created:W.time?.created??M,time_updated:W.time?.updated??M,data:Bn}}B.length=p,e.messages+=H(B,eo,"message"),D("messages",d-f)}U.info("migrated messages",{count:e.messages});for(let f=0;f<L.length;f+=T){let d=Math.min(f+T,L.length),S=await C(L,f,d),B=Array(S.length),p=0;for(let G=0;G<S.length;G++){let W=S[G];if(!W)continue;let E=L[f+G],q=z.basename(E,".json"),xn=z.basename(z.dirname(E)),Bn=kn.get(xn);if(!Bn){_.push(`part missing message session: ${E}`);continue}if(!Y.has(Bn))continue;let wn=W;delete wn.id,delete wn.messageID,delete wn.sessionID,B[p++]={id:q,message_id:xn,session_id:Bn,time_created:W.time?.created??M,time_updated:W.time?.updated??M,data:wn}}B.length=p,e.parts+=H(B,Yo,"part"),D("parts",d-f)}U.info("migrated parts",{count:e.parts});let Tn=g.map((f)=>z.basename(f,".json"));for(let f=0;f<g.length;f+=T){let d=Math.min(f+T,g.length),S=await C(g,f,d),B=[];for(let p=0;p<S.length;p++){let G=S[p];if(!G)continue;let W=Tn[f+p];if(!Y.has(W)){A.todos++;continue}if(!Array.isArray(G)){_.push(`todo not an array: ${g[f+p]}`);continue}for(let E=0;E<G.length;E++){let q=G[E];if(!q?.content||!q?.status)continue;B.push({session_id:W,content:q.content,status:q.status,position:E,time_created:M,time_updated:M})}}e.todos+=H(B,zo,"todo"),D("todos",d-f)}if(U.info("migrated todos",{count:e.todos}),A.todos>0)U.warn("skipped orphaned todos",{count:A.todos});let qn=s.map((f)=>z.basename(f,".json")),Hn=[];for(let f=0;f<s.length;f+=T){let d=Math.min(f+T,s.length),S=await C(s,f,d);Hn.length=0;for(let B=0;B<S.length;B++){let p=S[B];if(!p)continue;let G=qn[f+B];if(!I.has(G)){A.permissions++;continue}Hn.push({project_id:G,data:p})}e.permissions+=H(Hn,co,"permission"),D("permissions",d-f)}if(U.info("migrated permissions",{count:e.permissions}),A.permissions>0)U.warn("skipped orphaned permissions",{count:A.permissions});let Vn=m.map((f)=>z.basename(f,".json")),dn=[];for(let f=0;f<m.length;f+=T){let d=Math.min(f+T,m.length),S=await C(m,f,d);dn.length=0;for(let B=0;B<S.length;B++){let p=S[B];if(!p)continue;let G=Vn[f+B];if(!Y.has(G)){A.shares++;continue}if(!p?.id||!p?.secret||!p?.url){_.push(`session_share missing id/secret/url: ${m[f+B]}`);continue}dn.push({session_id:G,id:p.id,secret:p.secret,url:p.url})}e.shares+=H(dn,ko,"session_share"),D("shares",d-f)}if(U.info("migrated session shares",{count:e.shares}),A.shares>0)U.warn("skipped orphaned session shares",{count:A.shares});if(n.run("COMMIT"),U.info("json migration complete",{projects:e.projects,sessions:e.sessions,messages:e.messages,parts:e.parts,todos:e.todos,permissions:e.permissions,shares:e.shares,errorCount:e.errors.length,duration:Math.round(performance.now()-l)}),e.errors.length>0)U.warn("migration errors",{errors:e.errors.slice(0,20)});return t?.({current:y,total:y,label:"complete"}),e}var In={};On(In,{use:()=>Ce,transaction:()=>xe,textDecoder:()=>re,sumDistinct:()=>rr,sum:()=>or,sql:()=>V,relationsOrderToSQL:()=>Rt,relationsFilterToSQL:()=>Kt,relationToSQL:()=>xt,relationExtrasToSQL:()=>Ht,processRelations:()=>Ct,placeholder:()=>Or,param:()=>Ar,orderSelectedFields:()=>oe,orderByOperators:()=>St,or:()=>lo,operators:()=>Mt,notLike:()=>Gr,notInArray:()=>Ir,notIlike:()=>Mr,notExists:()=>Lr,notBetween:()=>dr,not:()=>so,noopMapper:()=>Nr,noopEncoder:()=>_r,noopDecoder:()=>sr,ne:()=>go,name:()=>gr,min:()=>tr,max:()=>ir,mapUpdateSet:()=>ne,mapResultRow:()=>ht,mapRelationalRow:()=>Jt,mapColumnsInSQLToAlias:()=>it,mapColumnsInAliasedSQLToAlias:()=>rt,lte:()=>Ao,lt:()=>po,like:()=>Bo,l2Distance:()=>Xt,l1Distance:()=>Zt,jaccardDistance:()=>Ut,isWithEnum:()=>bt,isView:()=>vr,isTable:()=>Yi,isSQLWrapper:()=>mr,isNull:()=>Oo,isNotNull:()=>$o,isDriverValueEncoder:()=>lr,isConfig:()=>at,is:()=>Mi,innerProduct:()=>Wt,inArray:()=>To,ilike:()=>Jr,haveSameKeys:()=>jt,hasOwnEntityKind:()=>Ji,hammingDistance:()=>Pt,gte:()=>No,gt:()=>_o,getViewSelectedFields:()=>Ft,getViewName:()=>Br,getTableUniqueName:()=>Xi,getTableName:()=>Zi,getTableLikeName:()=>wt,getTableColumns:()=>Vt,getTableAsAliasSQL:()=>Gt,getOriginalColumnFromAlias:()=>ot,getOrderByOperators:()=>dt,getColumns:()=>qt,getColumnTable:()=>Ci,getColumnNameAndConfig:()=>kt,getChannelPath:()=>li,fillPlaceholders:()=>$r,fieldSelectionToSQL:()=>Lt,extractTablesFromSchema:()=>It,extractExtendedColumnType:()=>mt,exists:()=>Do,eq:()=>Z,entityKind:()=>Gi,effect:()=>He,desc:()=>Io,defineRelationsPart:()=>Qt,defineRelations:()=>Bt,createRelationsHelper:()=>vt,countDistinct:()=>bo,count:()=>fo,cosineDistance:()=>Et,close:()=>Se,buildRelationsParts:()=>Dt,buildRelations:()=>$t,bindIfParam:()=>Qr,between:()=>vo,avgDistinct:()=>nr,avg:()=>ho,assertUnreachable:()=>ct,asc:()=>Qo,arrayOverlaps:()=>Hr,arrayContains:()=>Sr,arrayContained:()=>Cr,applyMixins:()=>zt,and:()=>Kn,aliasedTableColumn:()=>nt,aliasedTable:()=>hi,aliasedRelation:()=>bi,aliasedColumn:()=>ai,WithSubquery:()=>ci,ViewSelectionAliasProxyHandler:()=>ji,ViewBaseConfig:()=>ki,View:()=>Dr,TransactionRollbackError:()=>ft,TableSchema:()=>Ui,TableColumns:()=>Wi,TableAliasProxyHandler:()=>Fi,Table:()=>Pi,Subquery:()=>zi,StringChunk:()=>ur,SQL:()=>yr,RelationsHelperStatic:()=>Ot,RelationsBuilderTable:()=>Tt,RelationsBuilderJunctionColumn:()=>At,RelationsBuilderColumn:()=>pt,RelationTableAliasProxyHandler:()=>wi,Relation:()=>Nt,QueryPromise:()=>tt,Placeholder:()=>Tr,Path:()=>Eo,Param:()=>pr,OriginalName:()=>Ei,One:()=>_t,NotFoundError:()=>Me,NoopLogger:()=>di,Name:()=>fr,Many:()=>st,IsAlias:()=>Ri,FakePrimitiveParam:()=>er,ExtraConfigColumns:()=>Ki,ExtraConfigBuilder:()=>xi,DrizzleQueryError:()=>yt,DrizzleError:()=>ut,DefaultLogger:()=>Li,Count:()=>lt,ConsoleLogWriter:()=>Ii,ColumnTableAliasProxyHandler:()=>Vi,ColumnBuilder:()=>et,ColumnAliasProxyHandler:()=>qi,Column:()=>Si,Client:()=>Mn,CONSTANTS:()=>Yt,BaseName:()=>Hi,AggregatedField:()=>gt});import Di from"crypto";import wo,{existsSync as vi,readdirSync as Bi}from"fs";import{join as Qi}from"path";function jo(n){if(wo.existsSync(`${n.migrationsFolder}/meta/_journal.json`))throw Error('We detected that you have old drizzle-kit migration folders. You must upgrade drizzle-kit and run "drizzle-kit up"');let o=n.migrationsFolder,i=[],l=Bi(o).map((e)=>({path:Qi(o,e,"migration.sql"),name:e})).filter((e)=>vi(e.path));l.sort((e,A)=>e.name.localeCompare(A.name));for(let e of l){let A=e.path,_=e.name.slice(0,14),T=wo.readFileSync(A).toString(),M=T.split("--> statement-breakpoint").map((C)=>{return C}),x=Fo(_);i.push({sql:M,bps:!0,folderMillis:x,hash:Di.createHash("sha256").update(T).digest("hex"),name:e.name})}return i}function ao(n,o){if(Array.isArray(o)||"migrationsJournal"in o){let l=Array.isArray(o)?o:o.migrationsJournal,e=Array.isArray(o)?void 0:o.migrationsTable,A=l.map((_)=>({sql:_.sql.split("--> statement-breakpoint"),folderMillis:_.timestamp,hash:"",bps:!0,name:_.name}));return n.dialect.migrate(A,n.session,{migrationsTable:e})}let i=jo(o);return n.dialect.migrate(i,n.session,o)}function fo(n){return V`count(${n||V.raw("*")})`.mapWith(Number)}function bo(n){return V`count(distinct ${n})`.mapWith(Number)}function ho(n){return V`avg(${n})`.mapWith(String)}function nr(n){return V`avg(distinct ${n})`.mapWith(String)}function or(n){return V`sum(${n})`.mapWith(String)}function rr(n){return V`sum(distinct ${n})`.mapWith(String)}function ir(n){return V`max(${n})`.mapWith(uo(n,yo)?n:String)}function tr(n){return V`min(${n})`.mapWith(uo(n,yo)?n:String)}import oo from"path";var Un={};On(Un,{workspaceID:()=>De,useEffect:()=>Qe,use:()=>Be,make:()=>ve,invalidate:()=>Le,has:()=>Ie,get:()=>xo,directory:()=>no,context:()=>Ho,bind:()=>$e});import{EventEmitter as ie}from"events";var Rn=new ie;var Lo=new Set;function xr(n){return Lo.add(n),()=>{Lo.delete(n)}}async function Go(n){await Promise.allSettled([...Lo].map((o)=>o(n)))}function En(n){return n()}var jr={};On(jr,{setInitialized:()=>se,list:()=>ge,layer:()=>Fr,get:()=>le,fromRow:()=>_n,defaultLayer:()=>Co,UpdateInput:()=>fe,Service:()=>Gn,Info:()=>Vr,Event:()=>wr});import*as F from"fs/promises";import*as cr from"os";import*as Dn from"path";var te=N.String.pipe(N.brand("ProjectID")),w=te.pipe(Fn((n)=>({global:n.make("global"),zod:a.string().pipe(a.custom())})));import*as Qn from"fs/promises";import*as b from"path";import*as Er from"crypto";async function Jo(n){let o=b.resolve(n);while(!0){let i=b.join(o,".git"),l=await Qn.stat(i).catch(()=>null);if(l){if(l.isDirectory())return i;let _=(await Qn.readFile(i,"utf-8")).trim().match(/^gitdir:\s*(.+)$/);if(!_)return null;let T=b.isAbsolute(_[1])?_[1]:b.resolve(o,_[1]);return b.resolve(T,"../..")}let e=b.dirname(o);if(e===o)return null;o=e}}async function Kr(n){let o=await Qn.readFile(n,"utf-8").catch(()=>null);if(o===null)return null;return o.trim()||null}async function Rr(n){let o=await Kr(n);if(o)return o;let i=Er.randomUUID();try{return await Qn.writeFile(n,i,{flag:"wx"}),i}catch(l){if(l.code!=="EEXIST")throw l;let e=await Kr(n);if(e)return e;throw Error(`Project ID file was concurrently created but is empty: ${n}`)}}async function Pr(n){let o=await Jo(n);if(o){let l=b.join(o,"qitqode-project-id");return w.make(await Rr(l))}let i=b.join(n,".qitqode-project-id");return w.make(await Rr(i))}async function me(n){let o=await Jo(n);if(!o)return;let i=Dn.join(n,".qitqode-project-id"),l=Dn.join(o,"qitqode-project-id"),e=(T)=>F.access(T).then(()=>!0).catch(()=>!1);if(await e(i)){if(!await e(l)){let T=await F.readFile(i,"utf-8");await F.writeFile(l,T)}await F.unlink(i).catch(()=>{})}let A=Dn.join(o,"info","exclude");if(await F.mkdir(Dn.dirname(A),{recursive:!0}),!(await F.readFile(A,"utf-8").catch(()=>"")).includes(".qitqode-project-id"))await F.appendFile(A,`
3
3
  .qitqode-project-id
4
4
  `)}var Wr=c.create({service:"project"}),ue=262144,So=N.Literal("git"),kr=N.Struct({url:N.optional(N.String),override:N.optional(N.String),color:N.optional(N.String)}),qr=N.Struct({start:N.optional(N.String.annotate({description:"Startup script to run when creating a new workspace (worktree)"}))}),ye=N.Struct({created:N.Number,updated:N.Number,initialized:N.optional(N.Number)}),Vr=N.Struct({id:w,worktree:N.String,vcs:N.optional(So),name:N.optional(N.String),icon:N.optional(kr),commands:N.optional(qr),time:ye,sandboxes:N.Array(N.String)}).annotate({identifier:"Project"}).pipe(Fn((n)=>({zod:jn(n)}))),wr={Updated:zr.define("project.updated",Vr.zod)};function _n(n){let o=n.icon_url||n.icon_color?{url:n.icon_url??void 0,color:n.icon_color??void 0}:void 0;return{id:n.id,worktree:n.worktree,vcs:n.vcs?N.decodeUnknownSync(So)(n.vcs):void 0,name:n.name??void 0,icon:o,time:{created:n.time_created,updated:n.time_updated,initialized:n.time_initialized??void 0},sandboxes:n.sandboxes,commands:n.commands??void 0}}var fe=a.object({projectID:w.zod,name:a.string().optional(),icon:jn(kr).optional(),commands:jn(qr).optional()});class Gn extends vn.Service()("@qitqode/Project"){}var Fr=h.effect(Gn,r.gen(function*(){let n=yield*k.Service,o=yield*Zr.Path,i=yield*an.ChildProcessSpawner,l=r.fnUntraced(function*(t,u){return yield*Yr(i,t,u)},r.catch(()=>r.succeed({code:1,text:"",stderr:""}))),e=(t)=>r.sync(()=>In.use(t)),A=(t)=>r.sync(()=>Rn.emit("event",{directory:"global",project:t.id,payload:{type:wr.Updated.type,properties:t}})),_=N.decodeUnknownSync(N.optional(So))(nn.QITQODE_FAKE_VCS),T=(t,u)=>{if(!u)return t;if(u=u.replace(/[\r\n]+$/,""),!u)return t;if(u=k.windowsPath(u),o.isAbsolute(u))return o.normalize(u);return o.resolve(t,u)},M=yield*Ur.Scope,x=r.fn("Project.fromDirectory")(function*(t){Wr.info("fromDirectory",{directory:t});let u=yield*r.gen(function*(){if(nn.QITQODE_DISABLE_GIT)return{id:w.global,worktree:t,sandbox:t,vcs:_};let Y=(yield*n.up({targets:[".git"],start:t}).pipe(r.orDie))[0];if(!Y)return{id:w.global,worktree:"/",sandbox:"/",vcs:_};let en=o.dirname(Y),sn=process.env.HOME??process.env.USERPROFILE??cr.homedir();if(en===sn||Dn.parse(en).root===en)return Wr.warn("ignoring .git at home or filesystem root, snapshots disabled",{dotgit:Y}),{id:w.global,worktree:t,sandbox:t,vcs:_};let R=en,kn=yield*r.sync(()=>Mo("git")),Tn;if(!kn)return{id:Tn??w.global,worktree:R,sandbox:R,vcs:_};let qn=yield*l(["rev-parse","--git-common-dir"],{cwd:R});if(qn.code!==0)return{id:Tn??w.global,worktree:R,sandbox:R,vcs:_};let Hn=(()=>{let dn=T(R,qn.text.trim());return dn===R?R:o.dirname(dn)})();if(Tn==null)yield*r.promise(()=>me(R)),Tn=yield*r.promise(()=>Pr(R));let Vn=yield*l(["rev-parse","--show-toplevel"],{cwd:R});if(Vn.code!==0)return{id:Tn,worktree:R,sandbox:R,vcs:_};return R=T(R,Vn.text.trim()),{id:Tn,sandbox:R,worktree:Hn,vcs:"git"}}),D=yield*e((P)=>P.select().from(J).where(Z(J.id,u.id)).get()),I=D?_n(D):{id:u.id,worktree:u.worktree,vcs:u.vcs,sandboxes:[],time:{created:Date.now(),updated:Date.now()}};if(nn.QITQODE_EXPERIMENTAL_ICON_DISCOVERY)yield*C(I).pipe(r.ignore,r.forkIn(M));let O={...I,worktree:u.worktree,vcs:u.vcs,time:{...I.time,updated:Date.now()}};if(u.sandbox!==O.worktree&&!O.sandboxes.includes(u.sandbox))O.sandboxes.push(u.sandbox);if(O.sandboxes=yield*r.forEach(O.sandboxes,(P)=>n.exists(P).pipe(r.orDie,r.map((Y)=>Y?P:void 0)),{concurrency:16}).pipe(r.map((P)=>P.filter((Y)=>Y!==void 0))),yield*e((P)=>P.insert(J).values({id:O.id,worktree:O.worktree,vcs:O.vcs??null,name:O.name,icon_url:O.icon?.url,icon_color:O.icon?.color,time_created:O.time.created,time_updated:O.time.updated,time_initialized:O.time.initialized,sandboxes:O.sandboxes,commands:O.commands}).onConflictDoUpdate({target:J.id,set:{worktree:O.worktree,vcs:O.vcs??null,name:O.name,icon_url:O.icon?.url,icon_color:O.icon?.color,time_updated:O.time.updated,time_initialized:O.time.initialized,sandboxes:O.sandboxes,commands:O.commands}}).run()),u.id!==w.global)yield*e((P)=>P.update(fn).set({project_id:u.id}).where(Kn(Z(fn.project_id,w.global),Z(fn.directory,u.worktree))).run());return yield*A(O),{project:O,sandbox:u.sandbox}}),C=r.fn("Project.discover")(function*(t){if(t.vcs!=="git")return;if(t.icon?.override)return;if(t.icon?.url)return;let D=(yield*n.glob("**/favicon.{ico,png,svg,jpg,jpeg,webp}",{cwd:t.worktree,absolute:!0,include:"file"}).pipe(r.orDie)).sort((sn,R)=>sn.length-R.length)[0];if(!D)return;let I=yield*n.stat(D).pipe(r.orDie);if(Number(I.size)>ue)return;let O=yield*n.readFile(D).pipe(r.orDie),P=Buffer.from(O).toString("base64"),en=`data:${k.mimeType(D)};base64,${P}`;yield*$({projectID:t.id,icon:{url:en}})}),H=r.fn("Project.list")(function*(){return yield*e((t)=>t.select().from(J).all().map(_n))}),K=r.fn("Project.get")(function*(t){let u=yield*e((D)=>D.select().from(J).where(Z(J.id,t)).get());return u?_n(u):void 0}),$=r.fn("Project.update")(function*(t){let u=yield*e((I)=>I.update(J).set({name:t.name,icon_url:t.icon?.url,icon_color:t.icon?.color,commands:t.commands,time_updated:Date.now()}).where(Z(J.id,t.projectID)).returning().get());if(!u)throw Error(`Project not found: ${t.projectID}`);let D=_n(u);return yield*A(D),D}),Q=r.fn("Project.initGit")(function*(t){if(t.project.vcs==="git")return t.project;if(!(yield*r.sync(()=>Mo("git"))))throw Error("Git is not installed");let u=yield*l(["init","--quiet"],{cwd:t.directory});if(u.code!==0)throw Error(u.stderr.trim()||u.text.trim()||"Failed to initialize git repository");let{project:D}=yield*x(t.directory);return D}),L=r.fn("Project.setInitialized")(function*(t){yield*e((u)=>u.update(J).set({time_initialized:Date.now()}).where(Z(J.id,t)).run())}),g=r.fn("Project.sandboxes")(function*(t){let u=yield*e((I)=>I.select().from(J).where(Z(J.id,t)).get());if(!u)return[];let D=_n(u);return yield*r.forEach(D.sandboxes,(I)=>n.isDir(I).pipe(r.orDie,r.map((O)=>O?I:void 0)),{concurrency:16}).pipe(r.map((I)=>I.filter((O)=>O!==void 0)))}),s=r.fnUntraced(function*(t,u){let D=yield*e((I)=>I.update(J).set({sandboxes:u,time_updated:Date.now()}).where(Z(J.id,t)).returning().get());if(!D)throw Error(`Project not found: ${t}`);yield*A(_n(D))}),m=r.fn("Project.addSandbox")(function*(t,u){let D=yield*e((O)=>O.select().from(J).where(Z(J.id,t)).get());if(!D)throw Error(`Project not found: ${t}`);let I=[...D.sandboxes];if(!I.includes(u))I.push(u);yield*s(t,I)}),y=r.fn("Project.removeSandbox")(function*(t,u){let D=yield*e((O)=>O.select().from(J).where(Z(J.id,t)).get());if(!D)throw Error(`Project not found: ${t}`);let I=D.sandboxes.filter((O)=>O!==u);yield*s(t,I)});return Gn.of({fromDirectory:x,discover:C,list:H,get:K,update:$,initGit:Q,setInitialized:L,sandboxes:g,addSandbox:m,removeSandbox:y})})),Co=Fr.pipe(h.provide(bn),h.provide(k.defaultLayer),h.provide(Xr.layer));function ge(){return In.use((n)=>n.select().from(J).all().map((o)=>_n(o)))}function le(n){let o=In.use((i)=>i.select().from(J).where(Z(J.id,n)).get());if(!o)return;return _n(o)}function se(n){In.use((o)=>o.update(J).set({time_initialized:Date.now()}).where(Z(J.id,n)).run())}import{parse as _e}from"path";var rn=gn.create("instance");hr(()=>rn.use());var tn=new Map,Ne=ni(Gn,Co),pe=new Set(["/etc","/proc","/sys","/dev","/boot","/root","/var","/private/etc","/private/var"]);function Ae(n){if(n===_e(n).root)return"filesystem root is not a valid project directory";for(let o of pe)if(n===o||k.contains(o,n))return"target is a protected system directory";return null}function Te(n){let o=Ae(n);if(o)throw Error("Access denied: "+o)}var Pn={all:void 0};function ar(n){return En(async()=>{let o=n.project&&n.worktree?{directory:n.directory,worktree:n.worktree,project:n.project}:await Ne.runPromise((i)=>i.fromDirectory(n.directory)).then(({project:i,sandbox:l})=>({directory:n.directory,worktree:l,project:i}));return await rn.provide(o,async()=>{await n.init?.()}),o})}function br(n,o){let i=o.catch((l)=>{if(tn.get(n)===i)tn.delete(n);throw l});return tn.set(n,i),i}var on={async provide(n){let o=k.resolve(n.directory);Te(o);let i=tn.get(o);if(!i)c.Default.info("creating instance",{directory:o}),i=br(o,ar({directory:o,init:n.init}));let l=await i;return rn.provide(l,async()=>{return n.fn()})},get current(){return rn.use()},get directory(){return rn.use().directory},get worktree(){return rn.use().worktree},get project(){return rn.use().project},containsPath(n,o){let i=o??on;if(k.contains(i.directory,n))return!0;if(i.worktree==="/")return!1;return k.contains(i.worktree,n)},bind(n){let o=rn.use();return(...i)=>rn.provide(o,()=>n(...i))},restore(n,o){return rn.provide(n,o)},async reload(n){let o=k.resolve(n.directory);c.Default.info("reloading instance",{directory:o}),await Go(o),tn.delete(o);let i=br(o,ar({...n,directory:o}));return Rn.emit("event",{directory:o,project:n.project?.id,workspace:Nn.workspaceID,payload:{type:"server.instance.disposed",properties:{directory:o}}}),await i},async dispose(){let{directory:n,project:o}=on;c.Default.info("disposing instance",{directory:n}),await Go(n),tn.delete(n),Rn.emit("event",{directory:n,project:o.id,workspace:Nn.workspaceID,payload:{type:"server.instance.disposed",properties:{directory:n}}})},async disposeAll(){if(Pn.all)return Pn.all;return Pn.all=En(async()=>{c.Default.info("disposing all instances");let n=[...tn.entries()];for(let[o,i]of n){if(tn.get(o)!==i)continue;let l=await i.catch((e)=>{c.Default.warn("instance dispose failed",{key:o,error:e});return});if(!l){if(tn.get(o)===i)tn.delete(o);continue}if(tn.get(o)!==i)continue;await rn.provide(l,async()=>{await on.dispose()})}}).finally(()=>{Pn.all=void 0}),Pn.all}};var oi="~qitqode/InstanceState",$e=(n)=>{try{return on.bind(n)}catch(l){if(!(l instanceof gn.NotFound))throw l}let o=Ln.getCurrent(),i=o?vn.getReferenceUnsafe(o.context,Wn):void 0;if(!i)return n;return(...l)=>on.restore(i,()=>n(...l))},Ho=r.gen(function*(){return(yield*Wn)??on.current}),De=r.gen(function*(){return(yield*hn)??Nn.workspaceID}),no=r.map(Ho,(n)=>n.directory),ve=(n)=>r.gen(function*(){let o=yield*Jn.make({capacity:Number.POSITIVE_INFINITY,lookup:()=>r.gen(function*(){return yield*n(yield*Ho)})}),i=xr((l)=>r.runPromise(Jn.invalidate(o,l).pipe(r.provide(ri))));return yield*r.addFinalizer(()=>r.sync(i)),{[oi]:oi,cache:o}}),xo=(n)=>r.gen(function*(){return yield*Jn.get(n.cache,yield*no)}),Be=(n,o)=>r.map(xo(n),o),Qe=(n,o)=>r.flatMap(xo(n),o),Ie=(n)=>r.gen(function*(){return yield*Jn.has(n.cache,yield*no)}),Le=(n)=>r.gen(function*(){return yield*Jn.invalidate(n.cache,yield*no)});var ei={};On(ei,{make:()=>de});function ii(n,o,i){if(n&&o!==void 0)return Nn.restore(o,()=>on.restore(n,i));if(n)return on.restore(n,i);if(o!==void 0)return Nn.restore(o,i);return i()}function de(){return r.gen(function*(){let n=yield*r.context(),i=(yield*Wn)??(()=>{try{return on.current}catch(_){if(!(_ instanceof gn.NotFound))throw _}})(),l=(yield*hn)??Nn.workspaceID,e=(_)=>ti(_,{instance:i,workspace:l}),A=(_)=>e(_).pipe(r.provide(n));return{promise:(_)=>ii(i,l,()=>r.runPromise(A(_))),fork:(_)=>ii(i,l,()=>r.runFork(A(_)))}})}var mi={};On(mi,{make:()=>Ge,Cancelled:()=>Zn});class Zn extends N.TaggedErrorClass()("RunnerCancelled",{}){}var Ge=(n,o)=>{let i=pn.makeUnsafe({_tag:"Idle"}),l=o?.onIdle??r.void,e=o?.onBusy??r.void,A=o?.onInterrupt,_=0,T=()=>pn.getUnsafe(i),M=()=>{return _+=1,_},x=(m,y)=>Xn.isFailure(y)&&Ko.hasInterruptsOnly(y.cause)?ln.fail(m,new Zn).pipe(r.asVoid):ln.done(m,y).pipe(r.asVoid),C=()=>pn.modify(i,(m)=>[m._tag==="Idle"?l:r.void,m]).pipe(r.flatten),H=(m,y,t)=>pn.modify(i,(u)=>[r.gen(function*(){if(u._tag==="Running"&&u.run.id===m)yield*l;yield*x(y,t)}),u._tag==="Running"&&u.run.id===m?{_tag:"Idle"}:u]).pipe(r.flatten),K=(m,y)=>r.gen(function*(){let t=M(),u=yield*m.pipe(r.onExit((D)=>H(t,y,D)),r.forkIn(n));return{id:t,done:y,fiber:u}}),$=(m)=>pn.modifyEffect(i,r.fnUntraced(function*(y){if(y._tag==="Shell"&&y.shell.id===m)return[l,{_tag:"Idle"}];if(y._tag==="ShellThenRun"&&y.shell.id===m){let t=yield*K(y.run.work,y.run.done);return[r.void,{_tag:"Running",run:t}]}return[r.void,y]})).pipe(r.flatten),Q=(m)=>Ln.interrupt(m.fiber),L=(m)=>pn.modifyEffect(i,r.fnUntraced(function*(y){switch(y._tag){case"Running":case"ShellThenRun":if(o?.onReentryWarn)yield*o.onReentryWarn({label:o.label??"(unlabeled)",existingRunId:y.run.id});return[ln.await(y.run.done),y];case"Shell":{let t={id:M(),done:yield*ln.make(),work:m};return[ln.await(t.done),{_tag:"ShellThenRun",shell:y.shell,run:t}]}case"Idle":{let t=yield*ln.make(),u=yield*K(m,t);return[ln.await(t),{_tag:"Running",run:u}]}}})).pipe(r.flatten,r.catch((y)=>y instanceof Zn?A??r.die(y):r.fail(y))),g=(m)=>pn.modifyEffect(i,r.fnUntraced(function*(y){if(y._tag!=="Idle")return[r.sync(()=>{if(o?.busy)o.busy();throw Error("Runner is busy")}),y];yield*e;let t=M(),u=yield*m.pipe(r.ensuring($(t)),r.forkChild),D={id:t,fiber:u};return[r.gen(function*(){let I=yield*Ln.await(u);if(Xn.isSuccess(I))return I.value;if(Ko.hasInterruptsOnly(I.cause)&&A)return yield*A;return yield*r.failCause(I.cause)}),{_tag:"Shell",shell:D}]})).pipe(r.flatten),s=pn.modify(i,(m)=>{switch(m._tag){case"Idle":return[r.void,m];case"Running":return[r.gen(function*(){yield*Ln.interrupt(m.run.fiber);let y=yield*Ln.await(m.run.fiber);yield*x(m.run.done,y),yield*ln.await(m.run.done).pipe(r.exit,r.asVoid),yield*C()}),{_tag:"Idle"}];case"Shell":return[r.gen(function*(){yield*Q(m.shell),yield*C()}),{_tag:"Idle"}];case"ShellThenRun":return[r.gen(function*(){yield*ln.fail(m.run.done,new Zn).pipe(r.asVoid),yield*Q(m.shell),yield*C()}),{_tag:"Idle"}]}}).pipe(r.flatten);return{get state(){return T()},get busy(){return T()._tag!=="Idle"},ensureRunning:L,startShell:g,cancel:s}};import{Database as Je}from"bun:sqlite";function yi(n){let o=new Je(n,{create:!0});return ui({client:o})}var Me=ro.create("NotFoundError",a.object({message:a.string()})),fi=c.create({service:"db"});function li(){if(["latest","beta","prod"].includes(Ro)||nn.QITQODE_DISABLE_CHANNEL_DB)return oo.join($n.Path.data,"qitqode.db");let n=Ro.replace(/[^a-zA-Z0-9._-]/g,"-");return oo.join($n.Path.data,`qitqode-${n}.db`)}var Eo=En(()=>{if(nn.QITQODE_DB){if(nn.QITQODE_DB===":memory:"||oo.isAbsolute(nn.QITQODE_DB))return nn.QITQODE_DB;return oo.join($n.Path.data,nn.QITQODE_DB)}return li()}),Mn=gi(()=>{fi.info("opening database",{path:Eo});let n=yi(Eo);n.run("PRAGMA journal_mode = WAL"),n.run("PRAGMA synchronous = NORMAL"),n.run("PRAGMA busy_timeout = 5000"),n.run("PRAGMA cache_size = -64000"),n.run("PRAGMA foreign_keys = ON"),n.run("PRAGMA wal_checkpoint(PASSIVE)");let o=[{sql:"CREATE TABLE `project` (\n\t`id` text PRIMARY KEY,\n\t`worktree` text NOT NULL,\n\t`vcs` text,\n\t`name` text,\n\t`icon_url` text,\n\t`icon_color` text,\n\t`time_created` integer NOT NULL,\n\t`time_updated` integer NOT NULL,\n\t`time_initialized` integer,\n\t`sandboxes` text NOT NULL\n);\n--> statement-breakpoint\nCREATE TABLE `message` (\n\t`id` text PRIMARY KEY,\n\t`session_id` text NOT NULL,\n\t`time_created` integer NOT NULL,\n\t`time_updated` integer NOT NULL,\n\t`data` text NOT NULL,\n\tCONSTRAINT `fk_message_session_id_session_id_fk` FOREIGN KEY (`session_id`) REFERENCES `session`(`id`) ON DELETE CASCADE\n);\n--> statement-breakpoint\nCREATE TABLE `part` (\n\t`id` text PRIMARY KEY,\n\t`message_id` text NOT NULL,\n\t`session_id` text NOT NULL,\n\t`time_created` integer NOT NULL,\n\t`time_updated` integer NOT NULL,\n\t`data` text NOT NULL,\n\tCONSTRAINT `fk_part_message_id_message_id_fk` FOREIGN KEY (`message_id`) REFERENCES `message`(`id`) ON DELETE CASCADE\n);\n--> statement-breakpoint\nCREATE TABLE `permission` (\n\t`project_id` text PRIMARY KEY,\n\t`time_created` integer NOT NULL,\n\t`time_updated` integer NOT NULL,\n\t`data` text NOT NULL,\n\tCONSTRAINT `fk_permission_project_id_project_id_fk` FOREIGN KEY (`project_id`) REFERENCES `project`(`id`) ON DELETE CASCADE\n);\n--> statement-breakpoint\nCREATE TABLE `session` (\n\t`id` text PRIMARY KEY,\n\t`project_id` text NOT NULL,\n\t`parent_id` text,\n\t`slug` text NOT NULL,\n\t`directory` text NOT NULL,\n\t`title` text NOT NULL,\n\t`version` text NOT NULL,\n\t`share_url` text,\n\t`summary_additions` integer,\n\t`summary_deletions` integer,\n\t`summary_files` integer,\n\t`summary_diffs` text,\n\t`revert` text,\n\t`permission` text,\n\t`time_created` integer NOT NULL,\n\t`time_updated` integer NOT NULL,\n\t`time_compacting` integer,\n\t`time_archived` integer,\n\tCONSTRAINT `fk_session_project_id_project_id_fk` FOREIGN KEY (`project_id`) REFERENCES `project`(`id`) ON DELETE CASCADE\n);\n--> statement-breakpoint\nCREATE TABLE `todo` (\n\t`session_id` text NOT NULL,\n\t`content` text NOT NULL,\n\t`status` text NOT NULL,\n\t`priority` text NOT NULL,\n\t`position` integer NOT NULL,\n\t`time_created` integer NOT NULL,\n\t`time_updated` integer NOT NULL,\n\tCONSTRAINT `todo_pk` PRIMARY KEY(`session_id`, `position`),\n\tCONSTRAINT `fk_todo_session_id_session_id_fk` FOREIGN KEY (`session_id`) REFERENCES `session`(`id`) ON DELETE CASCADE\n);\n--> statement-breakpoint\nCREATE TABLE `session_share` (\n\t`session_id` text PRIMARY KEY,\n\t`id` text NOT NULL,\n\t`secret` text NOT NULL,\n\t`url` text NOT NULL,\n\t`time_created` integer NOT NULL,\n\t`time_updated` integer NOT NULL,\n\tCONSTRAINT `fk_session_share_session_id_session_id_fk` FOREIGN KEY (`session_id`) REFERENCES `session`(`id`) ON DELETE CASCADE\n);\n--> statement-breakpoint\nCREATE INDEX `message_session_idx` ON `message` (`session_id`);--> statement-breakpoint\nCREATE INDEX `part_message_idx` ON `part` (`message_id`);--> statement-breakpoint\nCREATE INDEX `part_session_idx` ON `part` (`session_id`);--> statement-breakpoint\nCREATE INDEX `session_project_idx` ON `session` (`project_id`);--> statement-breakpoint\nCREATE INDEX `session_parent_idx` ON `session` (`parent_id`);--> statement-breakpoint\nCREATE INDEX `todo_session_idx` ON `todo` (`session_id`);",timestamp:1769552633000,name:"20260127222353_familiar_lady_ursula"},{sql:"ALTER TABLE `project` ADD `commands` text;",timestamp:1770830228000,name:"20260211171708_add_project_commands"},{sql:"CREATE TABLE `control_account` (\n\t`email` text NOT NULL,\n\t`url` text NOT NULL,\n\t`access_token` text NOT NULL,\n\t`refresh_token` text NOT NULL,\n\t`token_expiry` integer,\n\t`active` integer NOT NULL,\n\t`time_created` integer NOT NULL,\n\t`time_updated` integer NOT NULL,\n\tCONSTRAINT `control_account_pk` PRIMARY KEY(`email`, `url`)\n);\n",timestamp:1770993676000,name:"20260213144116_wakeful_the_professor"},{sql:"CREATE TABLE `workspace` (\n\t`id` text PRIMARY KEY,\n\t`branch` text,\n\t`project_id` text NOT NULL,\n\t`config` text NOT NULL,\n\tCONSTRAINT `fk_workspace_project_id_project_id_fk` FOREIGN KEY (`project_id`) REFERENCES `project`(`id`) ON DELETE CASCADE\n);\n",timestamp:1772056728000,name:"20260225215848_workspace"},{sql:"ALTER TABLE `session` ADD `workspace_id` text;--> statement-breakpoint\nCREATE INDEX `session_workspace_idx` ON `session` (`workspace_id`);",timestamp:1772228279000,name:"20260227213759_add_session_workspace_id"},{sql:"CREATE TABLE `account` (\n\t`id` text PRIMARY KEY,\n\t`email` text NOT NULL,\n\t`url` text NOT NULL,\n\t`access_token` text NOT NULL,\n\t`refresh_token` text NOT NULL,\n\t`token_expiry` integer,\n\t`selected_org_id` text,\n\t`time_created` integer NOT NULL,\n\t`time_updated` integer NOT NULL\n);\n--> statement-breakpoint\nCREATE TABLE `account_state` (\n\t`id` integer PRIMARY KEY NOT NULL,\n\t`active_account_id` text,\n\tFOREIGN KEY (`active_account_id`) REFERENCES `account`(`id`) ON UPDATE no action ON DELETE set null\n);\n",timestamp:1772310750000,name:"20260228203230_blue_harpoon"},{sql:"ALTER TABLE `workspace` ADD `type` text NOT NULL;--> statement-breakpoint\nALTER TABLE `workspace` ADD `name` text;--> statement-breakpoint\nALTER TABLE `workspace` ADD `directory` text;--> statement-breakpoint\nALTER TABLE `workspace` ADD `extra` text;--> statement-breakpoint\nALTER TABLE `workspace` DROP COLUMN `config`;",timestamp:1772579546000,name:"20260303231226_add_workspace_fields"},{sql:"ALTER TABLE `account_state` ADD `active_org_id` text;--> statement-breakpoint\nUPDATE `account_state` SET `active_org_id` = (SELECT `selected_org_id` FROM `account` WHERE `account`.`id` = `account_state`.`active_account_id`);--> statement-breakpoint\nALTER TABLE `account` DROP COLUMN `selected_org_id`;\n",timestamp:1773097200000,name:"20260309230000_move_org_to_state"},{sql:"DROP INDEX IF EXISTS `message_session_idx`;--> statement-breakpoint\nDROP INDEX IF EXISTS `part_message_idx`;--> statement-breakpoint\nCREATE INDEX `message_session_time_created_id_idx` ON `message` (`session_id`,`time_created`,`id`);--> statement-breakpoint\nCREATE INDEX `part_message_id_id_idx` ON `part` (`message_id`,`id`);",timestamp:1773290071000,name:"20260312043431_session_message_cursor"},{sql:"CREATE TABLE `event_sequence` (\n\t`aggregate_id` text PRIMARY KEY,\n\t`seq` integer NOT NULL\n);\n--> statement-breakpoint\nCREATE TABLE `event` (\n\t`id` text PRIMARY KEY,\n\t`aggregate_id` text NOT NULL,\n\t`seq` integer NOT NULL,\n\t`type` text NOT NULL,\n\t`data` text NOT NULL,\n\tCONSTRAINT `fk_event_aggregate_id_event_sequence_aggregate_id_fk` FOREIGN KEY (`aggregate_id`) REFERENCES `event_sequence`(`aggregate_id`) ON DELETE CASCADE\n);\n",timestamp:1774309702000,name:"20260323234822_events"},{sql:"PRAGMA foreign_keys=OFF;--> statement-breakpoint\nCREATE TABLE `__new_workspace` (\n\t`id` text PRIMARY KEY,\n\t`type` text NOT NULL,\n\t`name` text DEFAULT '' NOT NULL,\n\t`branch` text,\n\t`directory` text,\n\t`extra` text,\n\t`project_id` text NOT NULL,\n\tCONSTRAINT `fk_workspace_project_id_project_id_fk` FOREIGN KEY (`project_id`) REFERENCES `project`(`id`) ON DELETE CASCADE\n);\n--> statement-breakpoint\nINSERT INTO `__new_workspace`(`id`, `type`, `branch`, `name`, `directory`, `extra`, `project_id`) SELECT `id`, `type`, `branch`, `name`, `directory`, `extra`, `project_id` FROM `workspace`;--> statement-breakpoint\nDROP TABLE `workspace`;--> statement-breakpoint\nALTER TABLE `__new_workspace` RENAME TO `workspace`;--> statement-breakpoint\nPRAGMA foreign_keys=ON;",timestamp:1775843113000,name:"20260410174513_workspace-name"},{sql:"CREATE TABLE `session_entry` (\n\t`id` text PRIMARY KEY,\n\t`session_id` text NOT NULL,\n\t`type` text NOT NULL,\n\t`time_created` integer NOT NULL,\n\t`time_updated` integer NOT NULL,\n\t`data` text NOT NULL,\n\tCONSTRAINT `fk_session_entry_session_id_session_id_fk` FOREIGN KEY (`session_id`) REFERENCES `session`(`id`) ON DELETE CASCADE\n);\n--> statement-breakpoint\nCREATE INDEX `session_entry_session_idx` ON `session_entry` (`session_id`);--> statement-breakpoint\nCREATE INDEX `session_entry_session_type_idx` ON `session_entry` (`session_id`,`type`);--> statement-breakpoint\nCREATE INDEX `session_entry_time_created_idx` ON `session_entry` (`time_created`);",timestamp:1776103196000,name:"20260413175956_chief_energizer"},{sql:"ALTER TABLE `session` ADD `context_from` text;--> statement-breakpoint\nALTER TABLE `session` ADD `context_watermark` text;--> statement-breakpoint\nCREATE INDEX `session_context_from_idx` ON `session` (`context_from`);\n",timestamp:1776873600000,name:"20260422160000_context_inheritance"},{sql:"CREATE TABLE `task_registry` (\n `id` text PRIMARY KEY,\n `parent_session_id` text NOT NULL REFERENCES `session`(`id`) ON DELETE CASCADE,\n `status` text NOT NULL,\n `agent` text NOT NULL,\n `description` text NOT NULL,\n `context_mode` text NOT NULL,\n `background` integer NOT NULL,\n `last_turn_time` integer NOT NULL,\n `turn_count` integer NOT NULL DEFAULT 0,\n `error` text,\n `time_completed` integer,\n `time_created` integer NOT NULL,\n `time_updated` integer NOT NULL\n);--> statement-breakpoint\nCREATE INDEX `task_registry_parent_idx` ON `task_registry` (`parent_session_id`);--> statement-breakpoint\nCREATE INDEX `task_registry_status_idx` ON `task_registry` (`status`);--> statement-breakpoint\nCREATE INDEX `task_registry_status_last_turn_idx` ON `task_registry` (`status`, `last_turn_time`);\n",timestamp:1776877200000,name:"20260422170000_task_registry"},{sql:"DROP INDEX IF EXISTS `session_entry_session_idx`;--> statement-breakpoint\nDROP INDEX IF EXISTS `session_entry_session_type_idx`;--> statement-breakpoint\nDROP INDEX IF EXISTS `session_entry_time_created_idx`;--> statement-breakpoint\nDROP TABLE IF EXISTS `session_entry`;\n",timestamp:1776956061000,name:"20260423145421_remove_session_entry"},{sql:"DROP INDEX IF EXISTS `task_registry_parent_idx`;--> statement-breakpoint\nDROP INDEX IF EXISTS `task_registry_status_idx`;--> statement-breakpoint\nDROP INDEX IF EXISTS `task_registry_status_last_turn_idx`;--> statement-breakpoint\nALTER TABLE `task_registry` RENAME TO `actor_registry`;--> statement-breakpoint\nCREATE INDEX `actor_registry_parent_idx` ON `actor_registry` (`parent_session_id`);--> statement-breakpoint\nCREATE INDEX `actor_registry_status_idx` ON `actor_registry` (`status`);--> statement-breakpoint\nCREATE INDEX `actor_registry_status_last_turn_idx` ON `actor_registry` (`status`, `last_turn_time`);\n",timestamp:1778803200000,name:"20260515000000_actor_rename"},{sql:"CREATE TABLE `memory_fts` (\n `path` text PRIMARY KEY NOT NULL,\n `scope` text NOT NULL,\n `scope_id` text DEFAULT '' NOT NULL,\n `type` text NOT NULL,\n `body` text NOT NULL,\n `fingerprint` text NOT NULL,\n `last_indexed_at` integer NOT NULL\n);\n--> statement-breakpoint\nCREATE INDEX `memory_fts_scope_idx` ON `memory_fts` (`scope`, `scope_id`);\n--> statement-breakpoint\nCREATE INDEX `memory_fts_type_idx` ON `memory_fts` (`type`);\n--> statement-breakpoint\nCREATE VIRTUAL TABLE `memory_fts_idx` USING fts5(\n body,\n content='memory_fts',\n content_rowid='rowid',\n tokenize='unicode61 remove_diacritics 1'\n);\n--> statement-breakpoint\nCREATE TRIGGER `memory_fts_ai` AFTER INSERT ON `memory_fts` BEGIN\n INSERT INTO `memory_fts_idx`(rowid, body) VALUES (NEW.rowid, NEW.body);\nEND;\n--> statement-breakpoint\nCREATE TRIGGER `memory_fts_ad` AFTER DELETE ON `memory_fts` BEGIN\n DELETE FROM `memory_fts_idx` WHERE rowid = OLD.rowid;\nEND;\n--> statement-breakpoint\nCREATE TRIGGER `memory_fts_au` AFTER UPDATE ON `memory_fts` BEGIN\n DELETE FROM `memory_fts_idx` WHERE rowid = OLD.rowid;\n INSERT INTO `memory_fts_idx`(rowid, body) VALUES (NEW.rowid, NEW.body);\nEND;\n",timestamp:1778806800000,name:"20260515010000_memory_fts"},{sql:"CREATE TABLE `task` (\n `id` text NOT NULL,\n `session_id` text NOT NULL REFERENCES `session`(`id`) ON DELETE CASCADE,\n `parent_task_id` text,\n `kind` text NOT NULL DEFAULT 'user',\n `status` text NOT NULL,\n `focus` integer NOT NULL DEFAULT 0,\n `summary` text NOT NULL,\n `created_at` integer NOT NULL,\n `last_event_at` integer NOT NULL,\n `ended_at` integer,\n `cleanup_after` integer,\n PRIMARY KEY (`session_id`, `id`)\n);--> statement-breakpoint\nCREATE INDEX `task_session_idx` ON `task` (`session_id`);--> statement-breakpoint\nCREATE INDEX `task_parent_idx` ON `task` (`session_id`, `parent_task_id`);--> statement-breakpoint\nCREATE INDEX `task_status_idx` ON `task` (`status`);--> statement-breakpoint\nCREATE INDEX `task_kind_idx` ON `task` (`kind`);--> statement-breakpoint\nCREATE UNIQUE INDEX `task_focus_per_session_idx` ON `task` (`session_id`) WHERE focus = 1;--> statement-breakpoint\nCREATE TABLE `task_event` (\n `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,\n `session_id` text NOT NULL REFERENCES `session`(`id`) ON DELETE CASCADE,\n `task_id` text NOT NULL,\n `at` integer NOT NULL,\n `kind` text NOT NULL,\n `summary` text,\n FOREIGN KEY (`session_id`, `task_id`) REFERENCES `task`(`session_id`, `id`) ON DELETE CASCADE\n);--> statement-breakpoint\nCREATE INDEX `task_event_task_idx` ON `task_event` (`session_id`, `task_id`, `at`);\n",timestamp:1778810400000,name:"20260515020000_user_task"},{sql:"ALTER TABLE `session` ADD `last_checkpoint_message_id` text;\n",timestamp:1779148800000,name:"20260519000000_last_checkpoint_message_id"},{sql:"ALTER TABLE `message` ADD `agent_id` text;--> statement-breakpoint\nCREATE INDEX `message_session_agent_idx` ON `message` (`session_id`,`agent_id`,`id`);\n",timestamp:1779321600000,name:"20260521000000_message_agent_id"},{sql:"DROP TABLE `actor_registry`;--> statement-breakpoint\nCREATE TABLE `actor_registry` (\n `session_id` text NOT NULL REFERENCES `session`(`id`) ON DELETE CASCADE,\n `actor_id` text NOT NULL,\n `mode` text NOT NULL,\n `parent_actor_id` text,\n `status` text NOT NULL,\n `agent` text NOT NULL,\n `description` text NOT NULL,\n `context_mode` text NOT NULL,\n `context_watermark` text,\n `background` integer NOT NULL,\n `tools` text,\n `last_turn_time` integer NOT NULL,\n `turn_count` integer NOT NULL DEFAULT 0,\n `error` text,\n `time_completed` integer,\n `time_created` integer NOT NULL,\n `time_updated` integer NOT NULL,\n PRIMARY KEY (`session_id`, `actor_id`)\n);--> statement-breakpoint\nCREATE INDEX `actor_registry_session_agent_idx` ON `actor_registry` (`session_id`, `agent`);--> statement-breakpoint\nCREATE INDEX `actor_registry_session_parent_idx` ON `actor_registry` (`session_id`, `parent_actor_id`);--> statement-breakpoint\nCREATE INDEX `actor_registry_status_idx` ON `actor_registry` (`status`);--> statement-breakpoint\nCREATE INDEX `actor_registry_status_last_turn_idx` ON `actor_registry` (`status`, `last_turn_time`);\n",timestamp:1779321660000,name:"20260521000100_actor_registry_v6"},{sql:"DROP TRIGGER IF EXISTS `memory_fts_ai`;--> statement-breakpoint\nDROP TRIGGER IF EXISTS `memory_fts_ad`;--> statement-breakpoint\nDROP TRIGGER IF EXISTS `memory_fts_au`;--> statement-breakpoint\nDROP TABLE IF EXISTS `memory_fts_idx`;--> statement-breakpoint\nDROP TABLE IF EXISTS `memory_fts`;--> statement-breakpoint\nCREATE TABLE `memory_fts` (\n `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,\n `path` text NOT NULL UNIQUE,\n `scope` text NOT NULL,\n `scope_id` text DEFAULT '' NOT NULL,\n `type` text NOT NULL,\n `body` text NOT NULL,\n `fingerprint` text NOT NULL,\n `last_indexed_at` integer NOT NULL\n);--> statement-breakpoint\nCREATE INDEX `memory_fts_scope_idx` ON `memory_fts` (`scope`, `scope_id`);--> statement-breakpoint\nCREATE INDEX `memory_fts_type_idx` ON `memory_fts` (`type`);--> statement-breakpoint\nCREATE VIRTUAL TABLE `memory_fts_idx` USING fts5(\n body,\n content='memory_fts',\n content_rowid='id',\n tokenize='unicode61 remove_diacritics 1'\n);--> statement-breakpoint\nCREATE TRIGGER `memory_fts_ai` AFTER INSERT ON `memory_fts` BEGIN\n INSERT INTO `memory_fts_idx`(rowid, body) VALUES (NEW.id, NEW.body);\nEND;--> statement-breakpoint\nCREATE TRIGGER `memory_fts_ad` AFTER DELETE ON `memory_fts` BEGIN\n DELETE FROM `memory_fts_idx` WHERE rowid = OLD.id;\nEND;--> statement-breakpoint\nCREATE TRIGGER `memory_fts_au` AFTER UPDATE ON `memory_fts` BEGIN\n DELETE FROM `memory_fts_idx` WHERE rowid = OLD.id;\n INSERT INTO `memory_fts_idx`(rowid, body) VALUES (NEW.id, NEW.body);\nEND;\n",timestamp:1779325200000,name:"20260521010000_memory_fts_v6"},{sql:"-- Fix v6.1 trigger pattern: external content FTS5 vtab requires the 'delete'\n-- magic command to remove OLD body's tokens, NOT a plain DELETE FROM the vtab.\n-- The previous DELETE FROM pattern was contentless-mode syntax misapplied to\n-- external-content mode, leaving stale tokens accumulating until vtab corrupts.\nDROP TRIGGER IF EXISTS `memory_fts_ai`;--> statement-breakpoint\nDROP TRIGGER IF EXISTS `memory_fts_ad`;--> statement-breakpoint\nDROP TRIGGER IF EXISTS `memory_fts_au`;--> statement-breakpoint\nCREATE TRIGGER `memory_fts_ai` AFTER INSERT ON `memory_fts` BEGIN\n INSERT INTO `memory_fts_idx`(rowid, body) VALUES (NEW.id, NEW.body);\nEND;--> statement-breakpoint\nCREATE TRIGGER `memory_fts_ad` AFTER DELETE ON `memory_fts` BEGIN\n INSERT INTO `memory_fts_idx`(`memory_fts_idx`, rowid, body) VALUES('delete', OLD.id, OLD.body);\nEND;--> statement-breakpoint\nCREATE TRIGGER `memory_fts_au` AFTER UPDATE ON `memory_fts` BEGIN\n INSERT INTO `memory_fts_idx`(`memory_fts_idx`, rowid, body) VALUES('delete', OLD.id, OLD.body);\n INSERT INTO `memory_fts_idx`(rowid, body) VALUES (NEW.id, NEW.body);\nEND;\n",timestamp:1779328800000,name:"20260521020000_memory_fts_triggers"},{sql:"UPDATE `message` SET `agent_id` = 'main' WHERE `agent_id` IS NULL;--> statement-breakpoint\nCREATE TABLE `message_new` (\n `id` text PRIMARY KEY NOT NULL,\n `session_id` text NOT NULL REFERENCES `session`(`id`) ON DELETE CASCADE,\n `agent_id` text NOT NULL DEFAULT 'main',\n `time_created` integer NOT NULL,\n `time_updated` integer NOT NULL,\n `data` text NOT NULL\n);--> statement-breakpoint\nINSERT INTO `message_new` SELECT `id`, `session_id`, COALESCE(`agent_id`, 'main'), `time_created`, `time_updated`, `data` FROM `message`;--> statement-breakpoint\nDROP TABLE `message`;--> statement-breakpoint\nALTER TABLE `message_new` RENAME TO `message`;--> statement-breakpoint\nCREATE INDEX `message_session_time_created_id_idx` ON `message` (`session_id`,`time_created`,`id`);--> statement-breakpoint\nCREATE INDEX `message_session_agent_idx` ON `message` (`session_id`,`agent_id`,`id`);\n",timestamp:1779753600000,name:"20260526000000_agent_id_main"},{sql:"ALTER TABLE `actor_registry` ADD COLUMN `last_outcome` text;--> statement-breakpoint\nALTER TABLE `actor_registry` ADD COLUMN `lifecycle` text NOT NULL DEFAULT 'ephemeral';--> statement-breakpoint\nALTER TABLE `actor_registry` RENAME COLUMN `error` TO `last_error`;--> statement-breakpoint\nUPDATE `actor_registry` SET `last_outcome` = 'success' WHERE `status` = 'completed';--> statement-breakpoint\nUPDATE `actor_registry` SET `last_outcome` = 'failure' WHERE `status` = 'failed';--> statement-breakpoint\nUPDATE `actor_registry` SET `last_outcome` = 'cancelled' WHERE `status` = 'cancelled';--> statement-breakpoint\nUPDATE `actor_registry` SET `status` = 'idle' WHERE `status` IN ('completed','failed','cancelled');--> statement-breakpoint\nUPDATE `actor_registry` SET `lifecycle` = CASE `mode` WHEN 'peer' THEN 'persistent' WHEN 'main' THEN 'persistent' ELSE 'ephemeral' END;\n",timestamp:1779840000000,name:"20260527000000_actor_lifecycle"},{sql:"CREATE TABLE `inbox` (\n `id` text PRIMARY KEY NOT NULL,\n `receiver_session_id` text NOT NULL REFERENCES `session`(`id`) ON DELETE CASCADE,\n `receiver_actor_id` text NOT NULL,\n `sender_session_id` text,\n `sender_actor_id` text,\n `type` text NOT NULL DEFAULT 'text',\n `content` text NOT NULL,\n `created_at` integer NOT NULL\n);--> statement-breakpoint\nCREATE INDEX `inbox_receiver_idx` ON `inbox` (`receiver_session_id`,`receiver_actor_id`,`id`);--> statement-breakpoint\nCREATE INDEX `inbox_created_idx` ON `inbox` (`created_at`);\n",timestamp:1779840060000,name:"20260527000100_inbox"},{sql:"-- todo: drop priority column\nALTER TABLE `todo` DROP COLUMN `priority`;\n--> statement-breakpoint\n\n-- task: drop focus-dependent index before dropping its column\nDROP INDEX `task_focus_per_session_idx`;\n--> statement-breakpoint\nDROP INDEX `task_kind_idx`;\n--> statement-breakpoint\nALTER TABLE `task` DROP COLUMN `focus`;\n--> statement-breakpoint\nALTER TABLE `task` DROP COLUMN `kind`;\n--> statement-breakpoint\n\n-- migrate status values: proposed/active -> open\nUPDATE `task` SET `status` = 'open' WHERE `status` IN ('proposed', 'active');\n",timestamp:1780012800000,name:"20260529000000_task_todo_redesign"},{sql:"ALTER TABLE `task` ADD COLUMN `owner` text;\n",timestamp:1780444800000,name:"20260603000000_task_in_progress_owner"},{sql:"CREATE TABLE `workflow_run` (\n `id` text PRIMARY KEY NOT NULL,\n `session_id` text NOT NULL REFERENCES `session`(`id`) ON DELETE CASCADE,\n `name` text NOT NULL,\n `status` text NOT NULL,\n `running` integer NOT NULL DEFAULT 0,\n `succeeded` integer NOT NULL DEFAULT 0,\n `failed` integer NOT NULL DEFAULT 0,\n `current_phase` text,\n `parent_actor_id` text,\n `args` text,\n `error` text,\n `time_created` integer NOT NULL,\n `time_updated` integer NOT NULL\n);--> statement-breakpoint\nCREATE INDEX `workflow_run_session_idx` ON `workflow_run` (`session_id`);--> statement-breakpoint\nCREATE INDEX `workflow_run_status_idx` ON `workflow_run` (`status`);\n",timestamp:1780444800000,name:"20260603000000_workflow_run"},{sql:"ALTER TABLE `workflow_run` ADD COLUMN `script_sha` text;\n",timestamp:1780531200000,name:"20260604000000_workflow_script_sha"},{sql:"CREATE TABLE `claude_import` (\n `source_uuid` text PRIMARY KEY NOT NULL,\n `session_id` text NOT NULL,\n `source_path` text NOT NULL,\n `source_mtime` integer NOT NULL,\n `time_imported` integer NOT NULL\n);\n",timestamp:1780876800000,name:"20260608000000_claude_import"},{sql:"ALTER TABLE `claude_import` ADD `message_ids` text;\n",timestamp:1780880400000,name:"20260608010000_claude_import_message_ids"},{sql:"CREATE TABLE `history_fts` (\n `part_id` text PRIMARY KEY NOT NULL,\n `session_id` text NOT NULL,\n `message_id` text NOT NULL,\n `project_id` text NOT NULL,\n `kind` text NOT NULL,\n `tool_name` text,\n `body` text NOT NULL,\n `time_created` integer NOT NULL\n);--> statement-breakpoint\nCREATE INDEX `history_fts_session_idx` ON `history_fts` (`session_id`, `time_created`);--> statement-breakpoint\nCREATE INDEX `history_fts_project_idx` ON `history_fts` (`project_id`, `time_created`);--> statement-breakpoint\nCREATE INDEX `history_fts_message_idx` ON `history_fts` (`message_id`);--> statement-breakpoint\nCREATE VIRTUAL TABLE `history_fts_idx` USING fts5(\n body,\n content='history_fts',\n content_rowid='rowid',\n tokenize='unicode61 remove_diacritics 1'\n);--> statement-breakpoint\nCREATE TRIGGER `history_fts_ai` AFTER INSERT ON `history_fts` BEGIN\n INSERT INTO `history_fts_idx`(rowid, body) VALUES (NEW.rowid, NEW.body);\nEND;--> statement-breakpoint\nCREATE TRIGGER `history_fts_ad` AFTER DELETE ON `history_fts` BEGIN\n INSERT INTO `history_fts_idx`(`history_fts_idx`, rowid, body) VALUES('delete', OLD.rowid, OLD.body);\nEND;--> statement-breakpoint\nCREATE TRIGGER `history_fts_au` AFTER UPDATE ON `history_fts` BEGIN\n INSERT INTO `history_fts_idx`(`history_fts_idx`, rowid, body) VALUES('delete', OLD.rowid, OLD.body);\n INSERT INTO `history_fts_idx`(rowid, body) VALUES (NEW.rowid, NEW.body);\nEND;\n",timestamp:1780963200000,name:"20260609000000_history_fts"},{sql:"ALTER TABLE `workflow_run` ADD COLUMN `agent_timeout_ms` integer;\n",timestamp:1781046000000,name:"20260609230000_workflow_agent_timeout"},{sql:"CREATE TABLE `external_import` (\n `source` text NOT NULL,\n `source_key` text NOT NULL,\n `session_id` text NOT NULL,\n `source_path` text NOT NULL,\n `source_mtime` integer NOT NULL,\n `time_imported` integer NOT NULL,\n `message_ids` text,\n PRIMARY KEY (`source`, `source_key`)\n);\n\nINSERT INTO `external_import` (`source`, `source_key`, `session_id`, `source_path`, `source_mtime`, `time_imported`, `message_ids`)\nSELECT 'cc', `source_uuid`, `session_id`, `source_path`, `source_mtime`, `time_imported`, `message_ids`\nFROM `claude_import`;\n\nDROP TABLE `claude_import`;\n",timestamp:1781222400000,name:"20260612000000_external_import"}];if(o.length>0){if(fi.info("applying migrations",{count:o.length,mode:"bundled"}),nn.QITQODE_SKIP_MIGRATIONS)for(let i of o)i.sql="select 1;";ao(n,o)}return n});function Se(){Mn().$client.close(),Mn.reset()}var Yn=gn.create("database");function Ce(n){try{return n(Yn.use().tx)}catch(o){if(o instanceof gn.NotFound){let i=[],l=Yn.provide({effects:i,tx:Mn()},()=>n(Mn()));for(let e of i)e();return l}throw o}}function He(n){let o=Un.bind(n);try{Yn.use().effects.push(o)}catch{o()}}function xe(n,o){try{return n(Yn.use().tx)}catch(i){if(i instanceof gn.NotFound){let l=[],e=Un.bind((_)=>Yn.provide({tx:_,effects:l},()=>n(_))),A=Mn().transaction(e,{behavior:o?.behavior});for(let _ of l)_();return A}throw i}}var Oi={};On(Oi,{layer:()=>Ti,defaultLayer:()=>we,Service:()=>to,NotFoundError:()=>Zo});import X from"path";var Sn={};On(Sn,{layer:()=>pi,defaultLayer:()=>Ee,Service:()=>io,Git:()=>Sn});var Ke=["--no-optional-locks","-c","core.autocrlf=false","-c","core.fsmonitor=false","-c","core.longpaths=true","-c","core.symlinks=true","-c","core.quotepath=false"],zn=(n)=>n.text().trim(),Po=(n)=>n.split("\x00").filter(Boolean),Re=(n)=>({exitCode:1,text:()=>"",stdout:Buffer.alloc(0),stderr:Buffer.from(n instanceof Error?n.message:String(n))}),si=(n)=>{if(n==="??")return"added";if(n.includes("U"))return"modified";if(n.includes("A")&&!n.includes("D"))return"added";if(n.includes("D")&&!n.includes("A"))return"deleted";return"modified"};class io extends vn.Service()("@qitqode/Git"){}var pi=h.effect(io,r.gen(function*(){let n=yield*an.ChildProcessSpawner,o=r.fn("Git.run")(function*(g,s){let m=_i.make("git",[...Ke,...g],{cwd:s.cwd,env:s.env,extendEnv:!0,stdin:"ignore",stdout:"pipe",stderr:"pipe"}),y=yield*Ni(n,m);return{exitCode:y.code,text:()=>y.text,stdout:Buffer.from(y.text),stderr:Buffer.from(y.stderr)}},r.scoped,r.catch((g)=>r.succeed(Re(g)))),i=r.fn("Git.text")(function*(g,s){return(yield*o(g,s)).text()}),l=r.fn("Git.lines")(function*(g,s){return(yield*i(g,s)).split(/\r?\n/).map((m)=>m.trim()).filter(Boolean)}),e=r.fnUntraced(function*(g){return yield*l(["for-each-ref","--format=%(refname:short)","refs/heads"],{cwd:g})}),A=r.fnUntraced(function*(g,s){let m=yield*o(["config","init.defaultBranch"],{cwd:g}),y=zn(m);if(!y||!s.includes(y))return;return{name:y,ref:y}}),_=r.fnUntraced(function*(g){let s=yield*l(["remote"],{cwd:g});if(s.includes("origin"))return"origin";if(s.length===1)return s[0];if(s.includes("upstream"))return"upstream";return s[0]}),T=r.fn("Git.branch")(function*(g){let s=yield*o(["symbolic-ref","--quiet","--short","HEAD"],{cwd:g});if(s.exitCode!==0)return;return zn(s)||void 0}),M=r.fn("Git.prefix")(function*(g){let s=yield*o(["rev-parse","--show-prefix"],{cwd:g});if(s.exitCode!==0)return"";return zn(s)}),x=r.fn("Git.defaultBranch")(function*(g){let s=yield*_(g);if(s){let t=yield*o(["symbolic-ref",`refs/remotes/${s}/HEAD`],{cwd:g});if(t.exitCode===0){let u=zn(t).replace(/^refs\/remotes\//,""),D=u.startsWith(`${s}/`)?u.slice(`${s}/`.length):"";if(D)return{name:D,ref:u}}}let m=yield*e(g),y=yield*A(g,m);if(y)return y;if(m.includes("main"))return{name:"main",ref:"main"};if(m.includes("master"))return{name:"master",ref:"master"}}),C=r.fn("Git.hasHead")(function*(g){return(yield*o(["rev-parse","--verify","HEAD"],{cwd:g})).exitCode===0}),H=r.fn("Git.mergeBase")(function*(g,s,m="HEAD"){let y=yield*o(["merge-base",s,m],{cwd:g});if(y.exitCode!==0)return;return zn(y)||void 0}),K=r.fn("Git.show")(function*(g,s,m,y=""){let t=y?`${y}${m}`:m,u=yield*o(["show",`${s}:${t}`],{cwd:g});if(u.exitCode!==0)return"";if(u.stdout.includes(0))return"";return u.text()}),$=r.fn("Git.status")(function*(g){return Po(yield*i(["status","--porcelain=v1","--untracked-files=all","--no-renames","-z","--","."],{cwd:g})).flatMap((s)=>{let m=s.slice(3);if(!m)return[];let y=s.slice(0,2);return[{file:m,code:y,status:si(y)}]})}),Q=r.fn("Git.diff")(function*(g,s){let m=Po(yield*i(["diff","--no-ext-diff","--no-renames","--name-status","-z",s,"--","."],{cwd:g}));return m.flatMap((y,t)=>{if(t%2!==0)return[];let u=m[t+1];if(!y||!u)return[];return[{file:u,code:y,status:si(y)}]})}),L=r.fn("Git.stats")(function*(g,s){return Po(yield*i(["diff","--no-ext-diff","--no-renames","--numstat","-z",s,"--","."],{cwd:g})).flatMap((m)=>{let y=m.indexOf("\t"),t=m.indexOf("\t",y+1);if(y===-1||t===-1)return[];let u=m.slice(t+1);if(!u)return[];let D=m.slice(0,y),I=m.slice(y+1,t),O=D==="-"?0:Number.parseInt(D||"0",10),P=I==="-"?0:Number.parseInt(I||"0",10);return[{file:u,additions:Number.isFinite(O)?O:0,deletions:Number.isFinite(P)?P:0}]})});return io.of({run:o,branch:T,prefix:M,defaultBranch:x,hasHead:C,mergeBase:H,show:K,status:$,diff:Q,stats:L})})),Ee=pi.pipe(h.provide(bn));var An=c.create({service:"storage"}),Zo=ro.create("NotFoundError",a.object({message:a.string()})),Pe=N.Struct({path:N.optional(N.Struct({root:N.optional(N.String)}))}),We=N.Struct({id:N.String}),Ue=N.Struct({id:N.String}),Ze=N.Struct({additions:N.Number,deletions:N.Number}),Xe=N.Struct({id:N.String,projectID:N.String,summary:N.Struct({diffs:N.Array(Ze)})}),Ye=N.decodeUnknownOption(Pe),ze=N.decodeUnknownOption(We),ce=N.decodeUnknownOption(Ue),ke=N.decodeUnknownOption(Xe);class to extends vn.Service()("@qitqode/Storage"){}function qe(n,o){return X.join(n,...o)+".json"}function Wo(n){if(!n||typeof n!=="object")return!1;if("code"in n&&n.code==="ENOENT")return!0;if("reason"in n&&n.reason&&typeof n.reason==="object"&&"_tag"in n.reason)return n.reason._tag==="NotFound";return!1}function Ve(n){let o=Number.parseInt(n,10);return Number.isNaN(o)?0:o}var Ai=[r.fn("Storage.migration.1")(function*(n,o,i){let l=X.resolve(n,"../project");if(!(yield*o.isDir(l)))return;let e=yield*o.glob("*",{cwd:l,include:"all"});for(let A of e){let _=X.join(l,A);if(!(yield*o.isDir(_)))continue;An.info(`migrating project ${A}`);let T=A,M="/";if(T!=="global"){for(let H of yield*o.glob("storage/session/message/*/*.json",{cwd:_,absolute:!0})){let K=Ye(yield*o.readJson(H),{onExcessProperty:"preserve"}),$=cn.isSome(K)?K.value.path?.root:void 0;if(!$)continue;M=$;break}if(!M)continue;if(!(yield*o.isDir(M)))continue;let x=yield*i.run(["rev-list","--max-parents=0","--all"],{cwd:M}),[C]=x.text().split(`
5
- `).filter(Boolean).map((H)=>H.trim()).toSorted();if(!C)continue;T=C,yield*o.writeWithDirs(X.join(n,"project",T+".json"),JSON.stringify({id:C,vcs:"git",worktree:M,time:{created:Date.now(),initialized:Date.now()}},null,2)),An.info(`migrating sessions for project ${T}`);for(let H of yield*o.glob("storage/session/info/*.json",{cwd:_,absolute:!0})){let K=X.join(n,"session",T,X.basename(H));An.info("copying",{sessionFile:H,dest:K});let $=yield*o.readJson(H),Q=ze($,{onExcessProperty:"preserve"});if(yield*o.writeWithDirs(K,JSON.stringify($,null,2)),cn.isNone(Q))continue;An.info(`migrating messages for session ${Q.value.id}`);for(let L of yield*o.glob(`storage/session/message/${Q.value.id}/*.json`,{cwd:_,absolute:!0})){let g=X.join(n,"message",Q.value.id,X.basename(L));An.info("copying",{msgFile:L,dest:g});let s=yield*o.readJson(L),m=ce(s,{onExcessProperty:"preserve"});if(yield*o.writeWithDirs(g,JSON.stringify(s,null,2)),cn.isNone(m))continue;An.info(`migrating parts for message ${m.value.id}`);for(let y of yield*o.glob(`storage/session/part/${Q.value.id}/${m.value.id}/*.json`,{cwd:_,absolute:!0})){let t=X.join(n,"part",m.value.id,X.basename(y)),u=yield*o.readJson(y);An.info("copying",{partFile:y,dest:t}),yield*o.writeWithDirs(t,JSON.stringify(u,null,2))}}}}}}),r.fn("Storage.migration.2")(function*(n,o){for(let i of yield*o.glob("session/*/*.json",{cwd:n,absolute:!0})){let l=yield*o.readJson(i),e=ke(l,{onExcessProperty:"preserve"});if(cn.isNone(e))continue;let A=e.value.summary.diffs;yield*o.writeWithDirs(X.join(n,"session_diff",e.value.id+".json"),JSON.stringify(A,null,2)),yield*o.writeWithDirs(X.join(n,"session",e.value.projectID,e.value.id+".json"),JSON.stringify({...l,summary:{additions:A.reduce((_,T)=>_+T.additions,0),deletions:A.reduce((_,T)=>_+T.deletions,0)}},null,2))}})],Ti=h.effect(to,r.gen(function*(){let n=yield*k.Service,o=yield*Sn.Service,i=yield*Uo.make({lookup:()=>Cn.make(),idleTimeToLive:0}),l=yield*r.cached(r.gen(function*(){let $=X.join($n.Path.data,"storage"),Q=X.join($,"migration"),L=yield*n.readFileString(Q).pipe(r.map(Ve),r.catchIf(Wo,()=>r.succeed(0)),r.orElseSucceed(()=>0));for(let g=L;g<Ai.length;g++){An.info("running migration",{index:g});let s=Ai[g],m=yield*r.exit(s($,n,o));if(Xn.isFailure(m)){An.error("failed to run migration",{index:g,cause:m.cause});break}yield*n.writeWithDirs(Q,String(g+1))}return{dir:$}})),e=($)=>r.fail(new Zo({message:`Resource not found: ${$}`})),A=($,Q)=>Q.pipe(r.catchIf(Wo,()=>e($))),_=r.fnUntraced(function*($,Q){yield*n.writeWithDirs($,JSON.stringify(Q,null,2))}),T=($,Q)=>r.scoped(r.gen(function*(){let L=qe((yield*l).dir,$);return yield*Q(L,yield*Uo.get(i,L))})),M=r.fn("Storage.remove")(function*($){yield*T($,(Q,L)=>Cn.withWriteLock(L,n.remove(Q).pipe(r.catchIf(Wo,()=>r.void))))}),x=($)=>r.gen(function*(){return yield*T($,(L,g)=>Cn.withReadLock(g,A(L,n.readJson(L))))}),C=($,Q)=>r.gen(function*(){return yield*T($,(g,s)=>Cn.withWriteLock(s,r.gen(function*(){let m=yield*A(g,n.readJson(g));return Q(m),yield*_(g,m),m})))}),H=($,Q)=>r.gen(function*(){yield*T($,(L,g)=>Cn.withWriteLock(g,_(L,Q)))}),K=r.fn("Storage.list")(function*($){let Q=(yield*l).dir,L=X.join(Q,...$);return(yield*n.glob("**/*",{cwd:L,include:"file"}).pipe(r.catch(()=>r.succeed([])))).map((s)=>[...$,...s.slice(0,-5).split(X.sep)]).toSorted((s,m)=>s.join("/").localeCompare(m.join("/")))});return to.of({remove:M,read:x,update:C,write:H,list:K})})),we=Ti.pipe(h.provide(k.defaultLayer),h.provide(Sn.defaultLayer));export{Rn as rl,xr as sl,En as tl,mn as ul,J as vl,fn as wl,eo as xl,Yo as yl,zo as zl,co as Al,ko as Bl,Vo as Cl,fo as Dl,In as El,Sn as Fl,Zo as Gl,Oi as Hl,w as Il,Jo as Jl,Pr as Kl,se as Ll,jr as Ml,Ae as Nl,on as Ol,Un as Pl,de as Ql,ei as Rl,mi as Sl};
5
+ `).filter(Boolean).map((H)=>H.trim()).toSorted();if(!C)continue;T=C,yield*o.writeWithDirs(X.join(n,"project",T+".json"),JSON.stringify({id:C,vcs:"git",worktree:M,time:{created:Date.now(),initialized:Date.now()}},null,2)),An.info(`migrating sessions for project ${T}`);for(let H of yield*o.glob("storage/session/info/*.json",{cwd:_,absolute:!0})){let K=X.join(n,"session",T,X.basename(H));An.info("copying",{sessionFile:H,dest:K});let $=yield*o.readJson(H),Q=ze($,{onExcessProperty:"preserve"});if(yield*o.writeWithDirs(K,JSON.stringify($,null,2)),cn.isNone(Q))continue;An.info(`migrating messages for session ${Q.value.id}`);for(let L of yield*o.glob(`storage/session/message/${Q.value.id}/*.json`,{cwd:_,absolute:!0})){let g=X.join(n,"message",Q.value.id,X.basename(L));An.info("copying",{msgFile:L,dest:g});let s=yield*o.readJson(L),m=ce(s,{onExcessProperty:"preserve"});if(yield*o.writeWithDirs(g,JSON.stringify(s,null,2)),cn.isNone(m))continue;An.info(`migrating parts for message ${m.value.id}`);for(let y of yield*o.glob(`storage/session/part/${Q.value.id}/${m.value.id}/*.json`,{cwd:_,absolute:!0})){let t=X.join(n,"part",m.value.id,X.basename(y)),u=yield*o.readJson(y);An.info("copying",{partFile:y,dest:t}),yield*o.writeWithDirs(t,JSON.stringify(u,null,2))}}}}}}),r.fn("Storage.migration.2")(function*(n,o){for(let i of yield*o.glob("session/*/*.json",{cwd:n,absolute:!0})){let l=yield*o.readJson(i),e=ke(l,{onExcessProperty:"preserve"});if(cn.isNone(e))continue;let A=e.value.summary.diffs;yield*o.writeWithDirs(X.join(n,"session_diff",e.value.id+".json"),JSON.stringify(A,null,2)),yield*o.writeWithDirs(X.join(n,"session",e.value.projectID,e.value.id+".json"),JSON.stringify({...l,summary:{additions:A.reduce((_,T)=>_+T.additions,0),deletions:A.reduce((_,T)=>_+T.deletions,0)}},null,2))}})],Ti=h.effect(to,r.gen(function*(){let n=yield*k.Service,o=yield*Sn.Service,i=yield*Uo.make({lookup:()=>Cn.make(),idleTimeToLive:0}),l=yield*r.cached(r.gen(function*(){let $=X.join($n.Path.data,"storage"),Q=X.join($,"migration"),L=yield*n.readFileString(Q).pipe(r.map(Ve),r.catchIf(Wo,()=>r.succeed(0)),r.orElseSucceed(()=>0));for(let g=L;g<Ai.length;g++){An.info("running migration",{index:g});let s=Ai[g],m=yield*r.exit(s($,n,o));if(Xn.isFailure(m)){An.error("failed to run migration",{index:g,cause:m.cause});break}yield*n.writeWithDirs(Q,String(g+1))}return{dir:$}})),e=($)=>r.fail(new Zo({message:`Resource not found: ${$}`})),A=($,Q)=>Q.pipe(r.catchIf(Wo,()=>e($))),_=r.fnUntraced(function*($,Q){yield*n.writeWithDirs($,JSON.stringify(Q,null,2))}),T=($,Q)=>r.scoped(r.gen(function*(){let L=qe((yield*l).dir,$);return yield*Q(L,yield*Uo.get(i,L))})),M=r.fn("Storage.remove")(function*($){yield*T($,(Q,L)=>Cn.withWriteLock(L,n.remove(Q).pipe(r.catchIf(Wo,()=>r.void))))}),x=($)=>r.gen(function*(){return yield*T($,(L,g)=>Cn.withReadLock(g,A(L,n.readJson(L))))}),C=($,Q)=>r.gen(function*(){return yield*T($,(g,s)=>Cn.withWriteLock(s,r.gen(function*(){let m=yield*A(g,n.readJson(g));return Q(m),yield*_(g,m),m})))}),H=($,Q)=>r.gen(function*(){yield*T($,(L,g)=>Cn.withWriteLock(g,_(L,Q)))}),K=r.fn("Storage.list")(function*($){let Q=(yield*l).dir,L=X.join(Q,...$);return(yield*n.glob("**/*",{cwd:L,include:"file"}).pipe(r.catch(()=>r.succeed([])))).map((s)=>[...$,...s.slice(0,-5).split(X.sep)]).toSorted((s,m)=>s.join("/").localeCompare(m.join("/")))});return to.of({remove:M,read:x,update:C,write:H,list:K})})),we=Ti.pipe(h.provide(k.defaultLayer),h.provide(Sn.defaultLayer));export{Rn as ml,xr as nl,En as ol,mn as pl,J as ql,fn as rl,eo as sl,Yo as tl,zo as ul,co as vl,ko as wl,Vo as xl,fo as yl,In as zl,Sn as Al,Zo as Bl,Oi as Cl,w as Dl,Jo as El,Pr as Fl,se as Gl,jr as Hl,Ae as Il,on as Jl,Un as Kl,de as Ll,ei as Ml,mi as Nl};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Rd as j}from"./chunk-t9pq363q.js";import{ce as Q}from"./chunk-rk21wv4k.js";import{$f as M}from"./chunk-xvvt886p.js";import{ug as N}from"./chunk-ff8q10gk.js";import{xh as $}from"./chunk-c1c8ch3g.js";import"./chunk-ajnzv5jt.js";import"./chunk-dz3kcsb6.js";import"./chunk-pwsajn96.js";import"./chunk-hgm8yfcb.js";import"./chunk-7rbg6mg9.js";import"./chunk-mp1x10t5.js";import{Ij as J,_k as X}from"./chunk-s27cz24e.js";import"./chunk-gx4v8z64.js";import"./chunk-v03xq38e.js";import"./chunk-dx7rexx3.js";import"./chunk-xgf4k9q7.js";import"./chunk-dnjyepb2.js";import"./chunk-8gpjmj42.js";import"./chunk-atacnspd.js";import"./chunk-qdafm7qg.js";import"./chunk-r81w6skn.js";import{Mn as _}from"./chunk-ge7csm6m.js";import"./chunk-d0dsgxk4.js";import"./chunk-1q10jyka.js";import"./chunk-wh2qqhep.js";import"./chunk-vy93mn7d.js";import"./chunk-yce8ph5b.js";import"./chunk-kec1xw1n.js";import"./chunk-cqtkxwd8.js";import"./chunk-x50adh71.js";import"./chunk-ngyv4fhn.js";import"./chunk-nq4x6792.js";import"./chunk-f17se3hh.js";import"./chunk-2y5bthrp.js";import"./chunk-7hdb1fhq.js";import"./chunk-xnxw5zz9.js";import"./chunk-gq3zb4wv.js";import"./chunk-2cvwrabw.js";import"./chunk-4sa9t0vx.js";import{Cs as Z}from"./chunk-g52wmt1v.js";import{Ls as E}from"./chunk-9d0exvey.js";import"./chunk-h2p984qb.js";import"./chunk-qm9fm5ja.js";import"./chunk-z0m1qm7j.js";import"./chunk-wd2xmkdp.js";import"./chunk-8peby2d1.js";import"./chunk-azss4acq.js";import"./chunk-0bhzhh7s.js";import{Lt as Y}from"./chunk-7s0nq2aa.js";import{du as V}from"./chunk-cxtwavyf.js";import"./chunk-15bjhfav.js";import"./chunk-q4mtwv1w.js";import"./chunk-7a3txs9f.js";import"./chunk-x308f9j4.js";import"./chunk-2zjet9tx.js";import"./chunk-mn5cacf6.js";import"./chunk-9pj10pgd.js";import"./chunk-djfrkbd5.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};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{ee as X}from"./chunk-ykpj10nz.js";import{fe as oe,ge as re}from"./chunk-dhvx9p54.js";import{he as k,ie as $}from"./chunk-ax64ngf2.js";import{je as we,ke as ie}from"./chunk-vph4w4yy.js";import{le as ge}from"./chunk-g3n465ee.js";import{te as H,we as K}from"./chunk-qbnt4ynd.js";import{De as T,xe as M,ye as Y}from"./chunk-rye1yjnr.js";import{Ee as U}from"./chunk-5xkp27b1.js";import"./chunk-j10a984e.js";import{Me as me,Ne as ue}from"./chunk-ejhhrece.js";import"./chunk-0a4pmkc9.js";import{If as y}from"./chunk-35fj1sfm.js";import{tO as i,xO as g}from"./chunk-e0vrxetq.js";var d=i(y(),1);var be=(...e)=>{let o=-1,t=Object.assign(async(n)=>{let c=await te(...e)(n);if(!c.expiration&&o!==-1)c.expiration=new Date(Date.now()+o);return c},{expireAfter(n){if(n<300000)throw Error("@aws-sdk/credential-providers - createCredentialChain(...).expireAfter(ms) may not be called with a duration lower than five minutes.");return o=n,t}});return t},te=(...e)=>async(o)=>{if(e.length===0)throw new d.ProviderError("No providers in chain",{tryNextLink:!1});let r;for(let t of e)try{return await t(o)}catch(n){if(r=n,n?.tryNextLink)continue;throw n}throw r};var v=i(y(),1);function O(e){return Promise.all(Object.keys(e).reduce((o,r)=>{let t=e[r];if(typeof t==="string")o.push([r,t]);else o.push(t().then((n)=>[r,n]));return o},[])).then((o)=>o.reduce((r,[t,n])=>{return r[t]=n,r},{}))}function N(e){return async(o)=>{e.logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");let{GetCredentialsForIdentityCommand:r,CognitoIdentityClient:t}=await import("./chunk-g878zd6e.js"),n=(u)=>e.clientConfig?.[u]??e.parentClientConfig?.[u]??o?.callerClientConfig?.[u],{Credentials:{AccessKeyId:c=ne(e.logger),Expiration:l,SecretKey:s=le(e.logger),SessionToken:a}=ce(e.logger)}=await(e.client??new t(Object.assign({},e.clientConfig??{},{region:n("region"),profile:n("profile"),userAgentAppId:n("userAgentAppId")}))).send(new r({CustomRoleArn:e.customRoleArn,IdentityId:e.identityId,Logins:e.logins?await O(e.logins):void 0}));return{identityId:e.identityId,accessKeyId:c,secretAccessKey:s,sessionToken:a,expiration:l}}}function ne(e){throw new v.CredentialsProviderError("Response from Amazon Cognito contained no access key ID",{logger:e})}function ce(e){throw new v.CredentialsProviderError("Response from Amazon Cognito contained no credentials",{logger:e})}function le(e){throw new v.CredentialsProviderError("Response from Amazon Cognito contained no secret key",{logger:e})}var I=i(y(),1);class R{dbName;constructor(e="aws:cognito-identity-ids"){this.dbName=e}getItem(e){return this.withObjectStore("readonly",(o)=>{let r=o.get(e);return new Promise((t)=>{r.onerror=()=>t(null),r.onsuccess=()=>t(r.result?r.result.value:null)})}).catch(()=>null)}removeItem(e){return this.withObjectStore("readwrite",(o)=>{let r=o.delete(e);return new Promise((t,n)=>{r.onerror=()=>n(r.error),r.onsuccess=()=>t()})})}setItem(e,o){return this.withObjectStore("readwrite",(r)=>{let t=r.put({id:e,value:o});return new Promise((n,c)=>{t.onerror=()=>c(t.error),t.onsuccess=()=>n()})})}getDb(){let e=self.indexedDB.open(this.dbName,1);return new Promise((o,r)=>{e.onsuccess=()=>{o(e.result)},e.onerror=()=>{r(e.error)},e.onblocked=()=>{r(Error("Unable to access DB"))},e.onupgradeneeded=()=>{let t=e.result;t.onerror=()=>{r(Error("Failed to create object store"))},t.createObjectStore("IdentityIds",{keyPath:"id"})}})}withObjectStore(e,o){return this.getDb().then((r)=>{let t=r.transaction("IdentityIds",e);return t.oncomplete=()=>r.close(),new Promise((n,c)=>{t.onerror=()=>c(t.error),n(o(t.objectStore("IdentityIds")))}).catch((n)=>{throw r.close(),n})})}}class j{store;constructor(e={}){this.store=e}getItem(e){if(e in this.store)return this.store[e];return null}removeItem(e){delete this.store[e]}setItem(e,o){this.store[e]=o}}var ae=new j;function P(){if(typeof self==="object"&&self.indexedDB)return new R;if(typeof window==="object"&&window.localStorage)return window.localStorage;return ae}function D({accountId:e,cache:o=P(),client:r,clientConfig:t,customRoleArn:n,identityPoolId:c,logins:l,userIdentifier:s=!l||Object.keys(l).length===0?"ANONYMOUS":void 0,logger:a,parentClientConfig:u}){a?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");let S=s?`aws:cognito-identity-credentials:${c}:${s}`:void 0,f=async(C)=>{let{GetIdCommand:m,CognitoIdentityClient:b}=await import("./chunk-g878zd6e.js"),h=(w)=>t?.[w]??u?.[w]??C?.callerClientConfig?.[w],p=r??new b(Object.assign({},t??{},{region:h("region"),profile:h("profile"),userAgentAppId:h("userAgentAppId")})),x=S&&await o.getItem(S);if(!x){let{IdentityId:w=se(a)}=await p.send(new m({AccountId:e,IdentityPoolId:c,Logins:l?await O(l):void 0}));if(x=w,S)Promise.resolve(o.setItem(S,x)).catch(()=>{})}return f=N({client:p,customRoleArn:n,logins:l,identityId:x}),f(C)};return(C)=>f(C).catch(async(m)=>{if(S)Promise.resolve(o.removeItem(S)).catch(()=>{});throw m})}function se(e){throw new I.CredentialsProviderError("Response from Amazon Cognito contained no identity ID",{logger:e})}var De=(e)=>N({...e});var Ke=(e)=>D({...e});var ze=(e)=>{return e?.logger?.debug("@smithy/credential-provider-imds","fromContainerMetadata"),H(e)};var Fe=(e)=>T(e);var Je=(e={})=>$({...e});var L=i(ue(),1);var Xe=(e)=>{return e?.logger?.debug("@smithy/credential-provider-imds","fromInstanceMetadata"),async()=>K(e)().then((o)=>L.setCredentialFeature(o,"CREDENTIALS_IMDS","0"))};var Ve=(e)=>k({...e});var A=i(y(),1);var E=i(y(),1),z="AWS_EC2_METADATA_DISABLED",G=async(e)=>{let{ENV_CMDS_FULL_URI:o,ENV_CMDS_RELATIVE_URI:r,fromContainerMetadata:t,fromInstanceMetadata:n}=await import("./chunk-tpyq7ycb.js");if(process.env[r]||process.env[o]){e.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");let{fromHttp:c}=await import("./chunk-90r2z49k.js");return E.chain(c(e),t(e))}if(process.env[z]&&process.env[z]!=="false")return async()=>{throw new E.CredentialsProviderError("EC2 Instance Metadata Service access disabled",{logger:e.logger})};return e.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),n(e)};function B(e,o){let r=fe(e),t,n,c,l,s=async(a)=>{if(a?.forceRefresh){if(!l)l=r(a).then((u)=>{c=u}).finally(()=>{l=void 0});return await l,c}if(c?.expiration){if(c?.expiration?.getTime()<Date.now())c=void 0}if(t)await t;else if(!c||o?.(c))if(c){if(!n)n=r(a).then((u)=>{c=u}).finally(()=>{n=void 0})}else return t=r(a).then((u)=>{c=u}).finally(()=>{t=void 0}),s(a);return c};return s}var fe=(e)=>async(o)=>{let r;for(let t of e)try{return await t(o)}catch(n){if(r=n,n?.tryNextLink)continue;throw n}throw r};var F=!1,J=(e={})=>B([async()=>{if(e.profile??process.env[A.ENV_PROFILE]){if(process.env[M]&&process.env[Y]){if(!F)(e.logger?.warn&&e.logger?.constructor?.name!=="NoOpLogger"?e.logger.warn.bind(e.logger):console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
2
+ import{fe as X}from"./chunk-yydqavgh.js";import{ge as oe,he as re}from"./chunk-b9f78x5g.js";import{ie as k,je as $}from"./chunk-f0ab2f28.js";import{ke as we,le as ie}from"./chunk-pchv413c.js";import{me as ge}from"./chunk-d1fv2c7s.js";import{ue as H,xe as K}from"./chunk-532fnfmw.js";import{Ee as T,ye as M,ze as Y}from"./chunk-q26s0wb5.js";import{Fe as U}from"./chunk-kds2g7r2.js";import"./chunk-g08qj9z3.js";import{Ne as me,Oe as ue}from"./chunk-ccdjzn2m.js";import"./chunk-dp6ms01y.js";import{Df as y}from"./chunk-2fbkw84y.js";import{qP as i,uP as g}from"./chunk-djfrkbd5.js";var d=i(y(),1);var be=(...e)=>{let o=-1,t=Object.assign(async(n)=>{let c=await te(...e)(n);if(!c.expiration&&o!==-1)c.expiration=new Date(Date.now()+o);return c},{expireAfter(n){if(n<300000)throw Error("@aws-sdk/credential-providers - createCredentialChain(...).expireAfter(ms) may not be called with a duration lower than five minutes.");return o=n,t}});return t},te=(...e)=>async(o)=>{if(e.length===0)throw new d.ProviderError("No providers in chain",{tryNextLink:!1});let r;for(let t of e)try{return await t(o)}catch(n){if(r=n,n?.tryNextLink)continue;throw n}throw r};var v=i(y(),1);function O(e){return Promise.all(Object.keys(e).reduce((o,r)=>{let t=e[r];if(typeof t==="string")o.push([r,t]);else o.push(t().then((n)=>[r,n]));return o},[])).then((o)=>o.reduce((r,[t,n])=>{return r[t]=n,r},{}))}function N(e){return async(o)=>{e.logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");let{GetCredentialsForIdentityCommand:r,CognitoIdentityClient:t}=await import("./chunk-x0hhw46n.js"),n=(u)=>e.clientConfig?.[u]??e.parentClientConfig?.[u]??o?.callerClientConfig?.[u],{Credentials:{AccessKeyId:c=ne(e.logger),Expiration:l,SecretKey:s=le(e.logger),SessionToken:a}=ce(e.logger)}=await(e.client??new t(Object.assign({},e.clientConfig??{},{region:n("region"),profile:n("profile"),userAgentAppId:n("userAgentAppId")}))).send(new r({CustomRoleArn:e.customRoleArn,IdentityId:e.identityId,Logins:e.logins?await O(e.logins):void 0}));return{identityId:e.identityId,accessKeyId:c,secretAccessKey:s,sessionToken:a,expiration:l}}}function ne(e){throw new v.CredentialsProviderError("Response from Amazon Cognito contained no access key ID",{logger:e})}function ce(e){throw new v.CredentialsProviderError("Response from Amazon Cognito contained no credentials",{logger:e})}function le(e){throw new v.CredentialsProviderError("Response from Amazon Cognito contained no secret key",{logger:e})}var I=i(y(),1);class R{dbName;constructor(e="aws:cognito-identity-ids"){this.dbName=e}getItem(e){return this.withObjectStore("readonly",(o)=>{let r=o.get(e);return new Promise((t)=>{r.onerror=()=>t(null),r.onsuccess=()=>t(r.result?r.result.value:null)})}).catch(()=>null)}removeItem(e){return this.withObjectStore("readwrite",(o)=>{let r=o.delete(e);return new Promise((t,n)=>{r.onerror=()=>n(r.error),r.onsuccess=()=>t()})})}setItem(e,o){return this.withObjectStore("readwrite",(r)=>{let t=r.put({id:e,value:o});return new Promise((n,c)=>{t.onerror=()=>c(t.error),t.onsuccess=()=>n()})})}getDb(){let e=self.indexedDB.open(this.dbName,1);return new Promise((o,r)=>{e.onsuccess=()=>{o(e.result)},e.onerror=()=>{r(e.error)},e.onblocked=()=>{r(Error("Unable to access DB"))},e.onupgradeneeded=()=>{let t=e.result;t.onerror=()=>{r(Error("Failed to create object store"))},t.createObjectStore("IdentityIds",{keyPath:"id"})}})}withObjectStore(e,o){return this.getDb().then((r)=>{let t=r.transaction("IdentityIds",e);return t.oncomplete=()=>r.close(),new Promise((n,c)=>{t.onerror=()=>c(t.error),n(o(t.objectStore("IdentityIds")))}).catch((n)=>{throw r.close(),n})})}}class j{store;constructor(e={}){this.store=e}getItem(e){if(e in this.store)return this.store[e];return null}removeItem(e){delete this.store[e]}setItem(e,o){this.store[e]=o}}var ae=new j;function P(){if(typeof self==="object"&&self.indexedDB)return new R;if(typeof window==="object"&&window.localStorage)return window.localStorage;return ae}function D({accountId:e,cache:o=P(),client:r,clientConfig:t,customRoleArn:n,identityPoolId:c,logins:l,userIdentifier:s=!l||Object.keys(l).length===0?"ANONYMOUS":void 0,logger:a,parentClientConfig:u}){a?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");let S=s?`aws:cognito-identity-credentials:${c}:${s}`:void 0,f=async(C)=>{let{GetIdCommand:m,CognitoIdentityClient:b}=await import("./chunk-x0hhw46n.js"),h=(w)=>t?.[w]??u?.[w]??C?.callerClientConfig?.[w],p=r??new b(Object.assign({},t??{},{region:h("region"),profile:h("profile"),userAgentAppId:h("userAgentAppId")})),x=S&&await o.getItem(S);if(!x){let{IdentityId:w=se(a)}=await p.send(new m({AccountId:e,IdentityPoolId:c,Logins:l?await O(l):void 0}));if(x=w,S)Promise.resolve(o.setItem(S,x)).catch(()=>{})}return f=N({client:p,customRoleArn:n,logins:l,identityId:x}),f(C)};return(C)=>f(C).catch(async(m)=>{if(S)Promise.resolve(o.removeItem(S)).catch(()=>{});throw m})}function se(e){throw new I.CredentialsProviderError("Response from Amazon Cognito contained no identity ID",{logger:e})}var De=(e)=>N({...e});var Ke=(e)=>D({...e});var ze=(e)=>{return e?.logger?.debug("@smithy/credential-provider-imds","fromContainerMetadata"),H(e)};var Fe=(e)=>T(e);var Je=(e={})=>$({...e});var L=i(ue(),1);var Xe=(e)=>{return e?.logger?.debug("@smithy/credential-provider-imds","fromInstanceMetadata"),async()=>K(e)().then((o)=>L.setCredentialFeature(o,"CREDENTIALS_IMDS","0"))};var Ve=(e)=>k({...e});var A=i(y(),1);var E=i(y(),1),z="AWS_EC2_METADATA_DISABLED",G=async(e)=>{let{ENV_CMDS_FULL_URI:o,ENV_CMDS_RELATIVE_URI:r,fromContainerMetadata:t,fromInstanceMetadata:n}=await import("./chunk-062vs7bp.js");if(process.env[r]||process.env[o]){e.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");let{fromHttp:c}=await import("./chunk-8e724g3k.js");return E.chain(c(e),t(e))}if(process.env[z]&&process.env[z]!=="false")return async()=>{throw new E.CredentialsProviderError("EC2 Instance Metadata Service access disabled",{logger:e.logger})};return e.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),n(e)};function B(e,o){let r=fe(e),t,n,c,l,s=async(a)=>{if(a?.forceRefresh){if(!l)l=r(a).then((u)=>{c=u}).finally(()=>{l=void 0});return await l,c}if(c?.expiration){if(c?.expiration?.getTime()<Date.now())c=void 0}if(t)await t;else if(!c||o?.(c))if(c){if(!n)n=r(a).then((u)=>{c=u}).finally(()=>{n=void 0})}else return t=r(a).then((u)=>{c=u}).finally(()=>{t=void 0}),s(a);return c};return s}var fe=(e)=>async(o)=>{let r;for(let t of e)try{return await t(o)}catch(n){if(r=n,n?.tryNextLink)continue;throw n}throw r};var F=!1,J=(e={})=>B([async()=>{if(e.profile??process.env[A.ENV_PROFILE]){if(process.env[M]&&process.env[Y]){if(!F)(e.logger?.warn&&e.logger?.constructor?.name!=="NoOpLogger"?e.logger.warn.bind(e.logger):console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
3
3
  Multiple credential sources detected:
4
4
  Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
5
5
  This SDK will proceed with the AWS_PROFILE value.
@@ -7,4 +7,4 @@ import{ee as X}from"./chunk-ykpj10nz.js";import{fe as oe,ge as re}from"./chunk-d
7
7
  However, a future version may change this behavior to prefer the ENV static credentials.
8
8
  Please ensure that your environment only sets either the AWS_PROFILE or the
9
9
  AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
10
- `),F=!0}throw new A.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.",{logger:e.logger,tryNextLink:!0})}return e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),T(e)()},async(o)=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");let{ssoStartUrl:r,ssoAccountId:t,ssoRegion:n,ssoRoleName:c,ssoSession:l}=e;if(!r&&!t&&!n&&!c&&!l)throw new A.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:e.logger});let{fromSSO:s}=await import("./chunk-wqw6yjrg.js");return s(e)(o)},async(o)=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");let{fromIni:r}=await import("./chunk-x2pmqvdc.js");return r(e)(o)},async(o)=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");let{fromProcess:r}=await import("./chunk-ce5e7j62.js");return r(e)(o)},async(o)=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");let{fromTokenFile:r}=await import("./chunk-v6141yq1.js");return r(e)(o)},async()=>{return e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await G(e))()},async()=>{throw new A.CredentialsProviderError("Could not load credentials from any providers",{tryNextLink:!1,logger:e.logger})}],de);var de=(e)=>e?.expiration!==void 0&&e.expiration.getTime()-Date.now()<300000;var Q=(e={})=>J({...e});var ur=(e)=>U(e);var mr=(e={})=>{return X({...e})};var _=i(we(),1),ee=i(ie(),1);var W=i(me(),1);var he="us-east-1",V=(e,o,r)=>{let t;return async(n={})=>{let{callerClientConfig:c}=n,l=e.clientConfig?.profile??c?.profile,s=e.logger??c?.logger;s?.debug("@aws-sdk/credential-providers - fromTemporaryCredentials (STS)");let a={...e.params,RoleSessionName:e.params.RoleSessionName??"aws-sdk-js-"+Date.now()};if(a?.SerialNumber){if(!e.mfaCodeProvider)throw new d.CredentialsProviderError("Temporary credential requires multi-factor authentication, but no MFA code callback was provided.",{tryNextLink:!1,logger:s});a.TokenCode=await e.mfaCodeProvider(a?.SerialNumber)}let{AssumeRoleCommand:u,STSClient:S}=await import("./chunk-eg1m81ax.js");if(!t){let C=typeof o==="function"?o():void 0,m=[e.masterCredentials,e.clientConfig?.credentials,void c?.credentials,c?.credentialDefaultProvider?.(),C],b="STS client default credentials";if(m[0])b="options.masterCredentials";else if(m[1])b="options.clientConfig.credentials";else if(m[2])throw b="caller client's credentials",Error("fromTemporaryCredentials recursion in callerClientConfig.credentials");else if(m[3])b="caller client's credentialDefaultProvider";else if(m[4])b="AWS SDK default credentials";let h=[e.clientConfig?.region,c?.region,await r?.({profile:l}),he],p="default partition's default region";if(h[0])p="options.clientConfig.region";else if(h[1])p="caller client's region";else if(h[2])p="file or env region";let x=[Z(e.clientConfig?.requestHandler),Z(c?.requestHandler)],w="STS default requestHandler";if(x[0])w="options.clientConfig.requestHandler";else if(x[1])w="caller client's requestHandler";s?.debug?.(`@aws-sdk/credential-providers - fromTemporaryCredentials STS client init with ${p}=${await W.normalizeProvider(q(h))()}, ${b}, ${w}.`),t=new S({userAgentAppId:c?.userAgentAppId,...e.clientConfig,credentials:q(m),logger:s,profile:l,region:q(h),requestHandler:q(x)})}if(e.clientPlugins)for(let C of e.clientPlugins)t.middlewareStack.use(C);let{Credentials:f}=await t.send(new u(a));if(!f||!f.AccessKeyId||!f.SecretAccessKey)throw new d.CredentialsProviderError(`Invalid response from STS.assumeRole call with role ${a.RoleArn}`,{logger:s});return{accessKeyId:f.AccessKeyId,secretAccessKey:f.SecretAccessKey,sessionToken:f.SessionToken,expiration:f.Expiration,credentialScope:f.CredentialScope}}},Z=(e)=>{return e?.metadata?.handlerProtocol==="h2"?void 0:e},q=(e)=>{for(let o of e)if(o!==void 0)return o};var Cr=(e)=>{return V(e,Q,async({profile:o=process.env.AWS_PROFILE})=>ee.loadConfig({environmentVariableSelector:(r)=>r.AWS_REGION,configFileSelector:(r)=>{return r.region},default:()=>{return}},{..._.NODE_REGION_CONFIG_FILE_OPTIONS,profile:o})())};var pr=(e={})=>re({...e});var Or=(e)=>oe({...e});export{te as propertyProviderChain,Or as fromWebToken,pr as fromTokenFile,Cr as fromTemporaryCredentials,mr as fromSSO,ur as fromProcess,Q as fromNodeProviderChain,Ve as fromLoginCredentials,Xe as fromInstanceMetadata,Je as fromIni,ge as fromHttp,Fe as fromEnv,ze as fromContainerMetadata,Ke as fromCognitoIdentityPool,De as fromCognitoIdentity,be as createCredentialChain};
10
+ `),F=!0}throw new A.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.",{logger:e.logger,tryNextLink:!0})}return e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),T(e)()},async(o)=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");let{ssoStartUrl:r,ssoAccountId:t,ssoRegion:n,ssoRoleName:c,ssoSession:l}=e;if(!r&&!t&&!n&&!c&&!l)throw new A.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:e.logger});let{fromSSO:s}=await import("./chunk-e5gjqtby.js");return s(e)(o)},async(o)=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");let{fromIni:r}=await import("./chunk-85fnnwm2.js");return r(e)(o)},async(o)=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");let{fromProcess:r}=await import("./chunk-h1spsy3y.js");return r(e)(o)},async(o)=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");let{fromTokenFile:r}=await import("./chunk-p7nstcxa.js");return r(e)(o)},async()=>{return e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await G(e))()},async()=>{throw new A.CredentialsProviderError("Could not load credentials from any providers",{tryNextLink:!1,logger:e.logger})}],de);var de=(e)=>e?.expiration!==void 0&&e.expiration.getTime()-Date.now()<300000;var Q=(e={})=>J({...e});var ur=(e)=>U(e);var mr=(e={})=>{return X({...e})};var _=i(we(),1),ee=i(ie(),1);var W=i(me(),1);var he="us-east-1",V=(e,o,r)=>{let t;return async(n={})=>{let{callerClientConfig:c}=n,l=e.clientConfig?.profile??c?.profile,s=e.logger??c?.logger;s?.debug("@aws-sdk/credential-providers - fromTemporaryCredentials (STS)");let a={...e.params,RoleSessionName:e.params.RoleSessionName??"aws-sdk-js-"+Date.now()};if(a?.SerialNumber){if(!e.mfaCodeProvider)throw new d.CredentialsProviderError("Temporary credential requires multi-factor authentication, but no MFA code callback was provided.",{tryNextLink:!1,logger:s});a.TokenCode=await e.mfaCodeProvider(a?.SerialNumber)}let{AssumeRoleCommand:u,STSClient:S}=await import("./chunk-3mtjxmw1.js");if(!t){let C=typeof o==="function"?o():void 0,m=[e.masterCredentials,e.clientConfig?.credentials,void c?.credentials,c?.credentialDefaultProvider?.(),C],b="STS client default credentials";if(m[0])b="options.masterCredentials";else if(m[1])b="options.clientConfig.credentials";else if(m[2])throw b="caller client's credentials",Error("fromTemporaryCredentials recursion in callerClientConfig.credentials");else if(m[3])b="caller client's credentialDefaultProvider";else if(m[4])b="AWS SDK default credentials";let h=[e.clientConfig?.region,c?.region,await r?.({profile:l}),he],p="default partition's default region";if(h[0])p="options.clientConfig.region";else if(h[1])p="caller client's region";else if(h[2])p="file or env region";let x=[Z(e.clientConfig?.requestHandler),Z(c?.requestHandler)],w="STS default requestHandler";if(x[0])w="options.clientConfig.requestHandler";else if(x[1])w="caller client's requestHandler";s?.debug?.(`@aws-sdk/credential-providers - fromTemporaryCredentials STS client init with ${p}=${await W.normalizeProvider(q(h))()}, ${b}, ${w}.`),t=new S({userAgentAppId:c?.userAgentAppId,...e.clientConfig,credentials:q(m),logger:s,profile:l,region:q(h),requestHandler:q(x)})}if(e.clientPlugins)for(let C of e.clientPlugins)t.middlewareStack.use(C);let{Credentials:f}=await t.send(new u(a));if(!f||!f.AccessKeyId||!f.SecretAccessKey)throw new d.CredentialsProviderError(`Invalid response from STS.assumeRole call with role ${a.RoleArn}`,{logger:s});return{accessKeyId:f.AccessKeyId,secretAccessKey:f.SecretAccessKey,sessionToken:f.SessionToken,expiration:f.Expiration,credentialScope:f.CredentialScope}}},Z=(e)=>{return e?.metadata?.handlerProtocol==="h2"?void 0:e},q=(e)=>{for(let o of e)if(o!==void 0)return o};var Cr=(e)=>{return V(e,Q,async({profile:o=process.env.AWS_PROFILE})=>ee.loadConfig({environmentVariableSelector:(r)=>r.AWS_REGION,configFileSelector:(r)=>{return r.region},default:()=>{return}},{..._.NODE_REGION_CONFIG_FILE_OPTIONS,profile:o})())};var pr=(e={})=>re({...e});var Or=(e)=>oe({...e});export{te as propertyProviderChain,Or as fromWebToken,pr as fromTokenFile,Cr as fromTemporaryCredentials,mr as fromSSO,ur as fromProcess,Q as fromNodeProviderChain,Ve as fromLoginCredentials,Xe as fromInstanceMetadata,Je as fromIni,ge as fromHttp,Fe as fromEnv,ze as fromContainerMetadata,Ke as fromCognitoIdentityPool,De as fromCognitoIdentity,be as createCredentialChain};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{$d as N,Vd as q,Wd as K,Xd as D,_d as L}from"./chunk-vbfc0wgv.js";import"./chunk-j7637cwg.js";import{$f as B}from"./chunk-xvvt886p.js";import{xh as G}from"./chunk-c1c8ch3g.js";import"./chunk-ajnzv5jt.js";import"./chunk-dz3kcsb6.js";import"./chunk-pwsajn96.js";import"./chunk-hgm8yfcb.js";import"./chunk-7rbg6mg9.js";import"./chunk-mp1x10t5.js";import"./chunk-s27cz24e.js";import{bl as C}from"./chunk-gx4v8z64.js";import"./chunk-v03xq38e.js";import"./chunk-dx7rexx3.js";import"./chunk-xgf4k9q7.js";import"./chunk-dnjyepb2.js";import"./chunk-8gpjmj42.js";import"./chunk-atacnspd.js";import"./chunk-qdafm7qg.js";import"./chunk-r81w6skn.js";import"./chunk-ge7csm6m.js";import"./chunk-d0dsgxk4.js";import"./chunk-1q10jyka.js";import"./chunk-wh2qqhep.js";import"./chunk-vy93mn7d.js";import"./chunk-yce8ph5b.js";import"./chunk-kec1xw1n.js";import"./chunk-cqtkxwd8.js";import"./chunk-x50adh71.js";import"./chunk-ngyv4fhn.js";import"./chunk-nq4x6792.js";import"./chunk-f17se3hh.js";import"./chunk-2y5bthrp.js";import"./chunk-7hdb1fhq.js";import"./chunk-xnxw5zz9.js";import"./chunk-gq3zb4wv.js";import"./chunk-2cvwrabw.js";import"./chunk-4sa9t0vx.js";import"./chunk-g52wmt1v.js";import"./chunk-9d0exvey.js";import"./chunk-h2p984qb.js";import"./chunk-qm9fm5ja.js";import"./chunk-z0m1qm7j.js";import"./chunk-wd2xmkdp.js";import"./chunk-8peby2d1.js";import{bt as J}from"./chunk-azss4acq.js";import"./chunk-0bhzhh7s.js";import"./chunk-7s0nq2aa.js";import"./chunk-cxtwavyf.js";import"./chunk-15bjhfav.js";import"./chunk-q4mtwv1w.js";import"./chunk-7a3txs9f.js";import"./chunk-x308f9j4.js";import"./chunk-2zjet9tx.js";import"./chunk-mn5cacf6.js";import"./chunk-9pj10pgd.js";import"./chunk-djfrkbd5.js";var X={command:"upgrade [target]",describe:"upgrade qitqode to the latest or a specific version",builder:(z)=>{return z.positional("target",{describe:"version to upgrade to, for ex '0.1.48' or 'v0.1.48'",type:"string"}).option("method",{alias:"m",describe:"installation method to use",type:"string",choices:["curl","npm","pnpm","bun","brew","choco","scoop"]})},handler:async(z)=>{B.empty(),B.println(B.logo(" ")),B.empty(),K("Upgrade");let O=await G.runPromise(C.Service.use((j)=>j.method())),E=z.method??O;if(E==="unknown"){if(q.error(`qitqode is installed to ${process.execPath} and may be managed by a package manager`),!await N({message:"Install anyways?",options:[{label:"Yes",value:!0},{label:"No",value:!1}],initialValue:!1})){D("Done");return}}q.info("Using method: "+E);let F=z.target?z.target.replace(/^v/,""):await G.runPromise(C.Service.use((j)=>j.latest()));if(J===F){q.warn(`qitqode upgrade skipped: ${F} is already installed`),D("Done");return}q.info(`From ${J} \u2192 ${F}`);let H=L();H.start("Upgrading...");let x=await G.runPromise(C.Service.use((j)=>j.upgrade(E,F))).catch((j)=>j);if(x){if(H.stop("Upgrade failed",1),x instanceof C.UpgradeFailedError)if(E==="choco"&&x.stderr.includes("not running from an elevated command shell"))q.error("Please run the terminal as Administrator and try again");else q.error(x.stderr);else if(x instanceof Error)q.error(x.message);D("Done");return}H.stop("Upgrade complete"),D("Done")}};export{X as UpgradeCommand};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-djfrkbd5.js";var L="./opentui-c5en9p2g.dll";export{L as default};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{rO as D}from"./chunk-wb47k8ah.js";import{sO as C}from"./chunk-n6tqtk6h.js";import{uO as B}from"./chunk-e0vrxetq.js";var H=B((q)=>{Object.defineProperty(q,"__esModule",{value:!0});q.getMachineId=void 0;var E=D(),F=C();async function G(){try{let f=(await(0,E.execAsync)('ioreg -rd1 -c "IOPlatformExpertDevice"')).stdout.split(`
2
+ import{oP as D}from"./chunk-wbt31xap.js";import{pP as C}from"./chunk-9pj10pgd.js";import{rP as B}from"./chunk-djfrkbd5.js";var H=B((q)=>{Object.defineProperty(q,"__esModule",{value:!0});q.getMachineId=void 0;var E=D(),F=C();async function G(){try{let f=(await(0,E.execAsync)('ioreg -rd1 -c "IOPlatformExpertDevice"')).stdout.split(`
3
3
  `).find((z)=>z.includes("IOPlatformUUID"));if(!f)return;let k=f.split('" = "');if(k.length===2)return k[1].slice(0,-1)}catch(b){F.diag.debug(`error reading machine id: ${b}`)}return}q.getMachineId=G});export default H();
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Fe as Ij}from"./chunk-6ps30qax.js";import{Je as hj}from"./chunk-fjftb2sz.js";import{Ke as Oj}from"./chunk-j10a984e.js";import{Le as _j,Me as vj,Ne as $j}from"./chunk-ejhhrece.js";import{Oe as mj}from"./chunk-0a4pmkc9.js";import{Gf as Rj,Hf as Pj,If as Tj,Jf as Aj,Kf as Dj}from"./chunk-35fj1sfm.js";import"./chunk-e0vrxetq.js";var Z=$j(),T=vj(),X=Pj(),Y=Tj(),w=Aj(),A=mj(),G=_j(),a=Rj(),S=Ij(),U=Dj(),r=Oj(),uj=hj(),lj=async(j,B,K)=>{return{operation:X.getSmithyContext(B).operation,region:await X.normalizeProvider(j.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function dj(j){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:j.region},propertiesExtractor:(B,K)=>({signingProperties:{config:B,context:K}})}}function Cj(j){return{schemeId:"smithy.api#noAuth"}}var Ej=(j)=>{let B=[];switch(j.operation){case"CreateToken":{B.push(Cj());break}default:B.push(dj(j))}return B},xj=(j)=>{let B=S.resolveAwsSdkSigV4Config(j);return Object.assign(B,{authSchemePreference:X.normalizeProvider(j.authSchemePreference??[])})},aj=(j)=>{return Object.assign(j,{useDualstackEndpoint:j.useDualstackEndpoint??!1,useFipsEndpoint:j.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"})},Sj={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},fj="3.997.14",gj={version:fj},k="ref",q=-1,R=!0,p="isSet",o="PartitionResult",P="booleanEquals",E="getAttr",c={[k]:"Endpoint"},x={[k]:o},z={},t=[{[k]:"Region"}],i={conditions:[[p,[c]],[p,t],["aws.partition",t,o],[P,[{[k]:"UseFIPS"},R]],[P,[{[k]:"UseDualStack"},R]],[P,[{fn:E,argv:[x,"supportsDualStack"]},R]],[P,[{fn:E,argv:[x,"supportsFIPS"]},R]],["stringEquals",[{fn:E,argv:[x,"name"]},"aws-us-gov"]]],results:[[q],[q,"Invalid Configuration: FIPS and custom endpoint are not supported"],[q,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[c,z],["https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",z],[q,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://oidc.{Region}.amazonaws.com",z],["https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",z],[q,"FIPS is enabled but this partition does not support FIPS"],["https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",z],[q,"DualStack is enabled but this partition does not support DualStack"],["https://oidc.{Region}.{PartitionResult#dnsSuffix}",z],[q,"Invalid Configuration: Missing Region"]]},sj=2,W=1e8,rj=new Int32Array([-1,1,-1,0,13,3,1,4,W+12,2,5,W+12,3,8,6,4,7,W+11,5,W+9,W+10,4,11,9,6,10,W+8,7,W+6,W+7,5,12,W+5,6,W+4,W+5,3,W+1,14,4,W+2,W+3]),pj=w.BinaryDecisionDiagram.from(rj,sj,i.conditions,i.results),cj=new w.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),tj=(j,B={})=>{return cj.get(j,()=>w.decideEndpoint(pj,{endpointParams:j,logger:B.logger}))};w.customEndpointFunctions.aws=Z.awsEndpointFunctions;class Q extends X.ServiceException{constructor(j){super(j);Object.setPrototypeOf(this,Q.prototype)}}class D extends Q{name="AccessDeniedException";$fault="client";error;reason;error_description;constructor(j){super({name:"AccessDeniedException",$fault:"client",...j});Object.setPrototypeOf(this,D.prototype),this.error=j.error,this.reason=j.reason,this.error_description=j.error_description}}class m extends Q{name="AuthorizationPendingException";$fault="client";error;error_description;constructor(j){super({name:"AuthorizationPendingException",$fault:"client",...j});Object.setPrototypeOf(this,m.prototype),this.error=j.error,this.error_description=j.error_description}}class _ extends Q{name="ExpiredTokenException";$fault="client";error;error_description;constructor(j){super({name:"ExpiredTokenException",$fault:"client",...j});Object.setPrototypeOf(this,_.prototype),this.error=j.error,this.error_description=j.error_description}}class v extends Q{name="InternalServerException";$fault="server";error;error_description;constructor(j){super({name:"InternalServerException",$fault:"server",...j});Object.setPrototypeOf(this,v.prototype),this.error=j.error,this.error_description=j.error_description}}class $ extends Q{name="InvalidClientException";$fault="client";error;error_description;constructor(j){super({name:"InvalidClientException",$fault:"client",...j});Object.setPrototypeOf(this,$.prototype),this.error=j.error,this.error_description=j.error_description}}class I extends Q{name="InvalidGrantException";$fault="client";error;error_description;constructor(j){super({name:"InvalidGrantException",$fault:"client",...j});Object.setPrototypeOf(this,I.prototype),this.error=j.error,this.error_description=j.error_description}}class O extends Q{name="InvalidRequestException";$fault="client";error;reason;error_description;constructor(j){super({name:"InvalidRequestException",$fault:"client",...j});Object.setPrototypeOf(this,O.prototype),this.error=j.error,this.reason=j.reason,this.error_description=j.error_description}}class h extends Q{name="InvalidScopeException";$fault="client";error;error_description;constructor(j){super({name:"InvalidScopeException",$fault:"client",...j});Object.setPrototypeOf(this,h.prototype),this.error=j.error,this.error_description=j.error_description}}class u extends Q{name="SlowDownException";$fault="client";error;error_description;constructor(j){super({name:"SlowDownException",$fault:"client",...j});Object.setPrototypeOf(this,u.prototype),this.error=j.error,this.error_description=j.error_description}}class l extends Q{name="UnauthorizedClientException";$fault="client";error;error_description;constructor(j){super({name:"UnauthorizedClientException",$fault:"client",...j});Object.setPrototypeOf(this,l.prototype),this.error=j.error,this.error_description=j.error_description}}class d extends Q{name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(j){super({name:"UnsupportedGrantTypeException",$fault:"client",...j});Object.setPrototypeOf(this,d.prototype),this.error=j.error,this.error_description=j.error_description}}var ij="AccessDeniedException",oj="AuthorizationPendingException",ej="AccessToken",nj="ClientSecret",jB="CreateToken",BB="CreateTokenRequest",FB="CreateTokenResponse",JB="CodeVerifier",KB="ExpiredTokenException",LB="InvalidClientException",QB="InvalidGrantException",WB="InvalidRequestException",XB="InternalServerException",YB="InvalidScopeException",ZB="IdToken",NB="RefreshToken",MB="SlowDownException",bB="UnauthorizedClientException",VB="UnsupportedGrantTypeException",HB="accessToken",H="client",qB="clientId",zB="clientSecret",UB="codeVerifier",wB="code",GB="deviceCode",F="error",kB="expiresIn",b="error_description",yB="grantType",RB="http",V="httpError",PB="idToken",e="reason",n="refreshToken",TB="redirectUri",jj="smithy.ts.sdk.synthetic.com.amazonaws.ssooidc",AB="scope",DB="server",mB="tokenType",J="com.amazonaws.ssooidc",Bj=a.TypeRegistry.for(jj),Fj=[-3,jj,"SSOOIDCServiceException",0,[],[]];Bj.registerError(Fj,Q);var N=a.TypeRegistry.for(J),Jj=[-3,J,ij,{[F]:H,[V]:400},[F,e,b],[0,0,0]];N.registerError(Jj,D);var Kj=[-3,J,oj,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Kj,m);var Lj=[-3,J,KB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Lj,_);var Qj=[-3,J,XB,{[F]:DB,[V]:500},[F,b],[0,0]];N.registerError(Qj,v);var Wj=[-3,J,LB,{[F]:H,[V]:401},[F,b],[0,0]];N.registerError(Wj,$);var Xj=[-3,J,QB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Xj,I);var Yj=[-3,J,WB,{[F]:H,[V]:400},[F,e,b],[0,0,0]];N.registerError(Yj,O);var Zj=[-3,J,YB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Zj,h);var Nj=[-3,J,MB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Nj,u);var Mj=[-3,J,bB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Mj,l);var bj=[-3,J,VB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(bj,d);var Vj=[Bj,N],_B=[0,J,ej,8,0],vB=[0,J,nj,8,0],$B=[0,J,JB,8,0],IB=[0,J,ZB,8,0],Hj=[0,J,NB,8,0],qj=[3,J,BB,0,[qB,zB,yB,GB,wB,n,AB,TB,UB],[0,[()=>vB,0],0,0,0,[()=>Hj,0],64,0,[()=>$B,0]],3],zj=[3,J,FB,0,[HB,mB,kB,n,PB],[[()=>_B,0],0,1,[()=>Hj,0],[()=>IB,0]]],Uj=[9,J,jB,{[RB]:["POST","/token",200]},()=>qj,()=>zj],OB=(j)=>{return{apiVersion:"2019-06-10",base64Decoder:j?.base64Decoder??U.fromBase64,base64Encoder:j?.base64Encoder??U.toBase64,disableHostPrefix:j?.disableHostPrefix??!1,endpointProvider:j?.endpointProvider??tj,extensions:j?.extensions??[],httpAuthSchemeProvider:j?.httpAuthSchemeProvider??Ej,httpAuthSchemes:j?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(B)=>B.getIdentityProvider("aws.auth#sigv4"),signer:new S.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(B)=>B.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new T.NoAuthSigner}],logger:j?.logger??new X.NoOpLogger,protocol:j?.protocol??uj.AwsRestJsonProtocol,protocolSettings:j?.protocolSettings??{defaultNamespace:"com.amazonaws.ssooidc",errorTypeRegistries:Vj,version:"2019-06-10",serviceTarget:"AWSSSOOIDCService"},serviceId:j?.serviceId??"SSO OIDC",urlParser:j?.urlParser??A.parseUrl,utf8Decoder:j?.utf8Decoder??U.fromUtf8,utf8Encoder:j?.utf8Encoder??U.toUtf8}},hB=(j)=>{X.emitWarningIfUnsupportedVersion(process.version);let B=Y.resolveDefaultsModeConfig(j),K=()=>B().then(X.loadConfigsForDefaultMode),M=OB(j);Z.emitWarningIfUnsupportedVersion(process.version);let L={profile:j?.profile,logger:M.logger};return{...M,...j,runtime:"node",defaultsMode:B,authSchemePreference:j?.authSchemePreference??Y.loadConfig(S.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,L),bodyLengthChecker:j?.bodyLengthChecker??U.calculateBodyLength,defaultUserAgentProvider:j?.defaultUserAgentProvider??Z.createDefaultUserAgentProvider({serviceId:M.serviceId,clientVersion:gj.version}),maxAttempts:j?.maxAttempts??Y.loadConfig(G.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,j),region:j?.region??Y.loadConfig(Y.NODE_REGION_CONFIG_OPTIONS,{...Y.NODE_REGION_CONFIG_FILE_OPTIONS,...L}),requestHandler:r.NodeHttpHandler.create(j?.requestHandler??K),retryMode:j?.retryMode??Y.loadConfig({...G.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await K()).retryMode||G.DEFAULT_RETRY_MODE},j),sha256:j?.sha256??U.Hash.bind(null,"sha256"),streamCollector:j?.streamCollector??r.streamCollector,useDualstackEndpoint:j?.useDualstackEndpoint??Y.loadConfig(Y.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,L),useFipsEndpoint:j?.useFipsEndpoint??Y.loadConfig(Y.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,L),userAgentAppId:j?.userAgentAppId??Y.loadConfig(Z.NODE_APP_ID_CONFIG_OPTIONS,L)}},uB=(j)=>{let{httpAuthSchemes:B,httpAuthSchemeProvider:K,credentials:M}=j;return{setHttpAuthScheme(L){let y=B.findIndex((C)=>C.schemeId===L.schemeId);if(y===-1)B.push(L);else B.splice(y,1,L)},httpAuthSchemes(){return B},setHttpAuthSchemeProvider(L){K=L},httpAuthSchemeProvider(){return K},setCredentials(L){M=L},credentials(){return M}}},lB=(j)=>{return{httpAuthSchemes:j.httpAuthSchemes(),httpAuthSchemeProvider:j.httpAuthSchemeProvider(),credentials:j.credentials()}},dB=(j,B)=>{let K=Object.assign(Z.getAwsRegionExtensionConfiguration(j),X.getDefaultExtensionConfiguration(j),A.getHttpHandlerExtensionConfiguration(j),uB(j));return B.forEach((M)=>M.configure(K)),Object.assign(j,Z.resolveAwsRegionExtensionConfiguration(K),X.resolveDefaultRuntimeConfig(K),A.resolveHttpHandlerRuntimeConfig(K),lB(K))};class f extends X.Client{config;constructor(...[j]){let B=hB(j||{});super(B);this.initConfig=B;let K=aj(B),M=Z.resolveUserAgentConfig(K),L=G.resolveRetryConfig(M),y=Y.resolveRegionConfig(L),C=Z.resolveHostHeaderConfig(y),wj=w.resolveEndpointConfig(C),Gj=xj(wj),kj=dB(Gj,j?.extensions||[]);this.config=kj,this.middlewareStack.use(a.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(Z.getUserAgentPlugin(this.config)),this.middlewareStack.use(G.getRetryPlugin(this.config)),this.middlewareStack.use(A.getContentLengthPlugin(this.config)),this.middlewareStack.use(Z.getHostHeaderPlugin(this.config)),this.middlewareStack.use(Z.getLoggerPlugin(this.config)),this.middlewareStack.use(Z.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(T.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:lj,identityProviderConfigProvider:async(yj)=>new T.DefaultIdentityProviderConfig({"aws.auth#sigv4":yj.credentials})})),this.middlewareStack.use(T.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class g extends X.Command.classBuilder().ep(Sj).m(function(j,B,K,M){return[w.getEndpointPlugin(K,j.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").sc(Uj).build(){}var CB={CreateTokenCommand:g};class s extends f{}X.createAggregatedClient(CB,s);var EB={KMS_ACCESS_DENIED:"KMS_AccessDeniedException"},xB={KMS_DISABLED_KEY:"KMS_DisabledException",KMS_INVALID_KEY_USAGE:"KMS_InvalidKeyUsageException",KMS_INVALID_STATE:"KMS_InvalidStateException",KMS_KEY_NOT_FOUND:"KMS_NotFoundException"};var{Command:aB,Client:SB}=X,fB=D,gB=Jj,sB=EB,rB=m,pB=Kj,cB=Uj,tB=g,iB=qj,oB=zj,eB=_,nB=Lj,jF=v,BF=Qj,FF=$,JF=Wj,KF=I,LF=Xj,QF=O,WF=Yj,XF=xB,YF=h,ZF=Zj,NF=s,MF=f,bF=Q,VF=Fj,HF=u,qF=Nj,zF=l,UF=Mj,wF=d,GF=bj,kF=Vj;export{kF as errorTypeRegistries,SB as __Client,GF as UnsupportedGrantTypeException$,wF as UnsupportedGrantTypeException,UF as UnauthorizedClientException$,zF as UnauthorizedClientException,qF as SlowDownException$,HF as SlowDownException,VF as SSOOIDCServiceException$,bF as SSOOIDCServiceException,MF as SSOOIDCClient,NF as SSOOIDC,ZF as InvalidScopeException$,YF as InvalidScopeException,XF as InvalidRequestExceptionReason,WF as InvalidRequestException$,QF as InvalidRequestException,LF as InvalidGrantException$,KF as InvalidGrantException,JF as InvalidClientException$,FF as InvalidClientException,BF as InternalServerException$,jF as InternalServerException,nB as ExpiredTokenException$,eB as ExpiredTokenException,oB as CreateTokenResponse$,iB as CreateTokenRequest$,tB as CreateTokenCommand,cB as CreateToken$,pB as AuthorizationPendingException$,rB as AuthorizationPendingException,sB as AccessDeniedExceptionReason,gB as AccessDeniedException$,fB as AccessDeniedException,aB as $Command};export default {get errorTypeRegistries(){return kF},get __Client(){return SB},get UnsupportedGrantTypeException$(){return GF},get UnsupportedGrantTypeException(){return wF},get UnauthorizedClientException$(){return UF},get UnauthorizedClientException(){return zF},get SlowDownException$(){return qF},get SlowDownException(){return HF},get SSOOIDCServiceException$(){return VF},get SSOOIDCServiceException(){return bF},get SSOOIDCClient(){return MF},get SSOOIDC(){return NF},get InvalidScopeException$(){return ZF},get InvalidScopeException(){return YF},get InvalidRequestExceptionReason(){return XF},get InvalidRequestException$(){return WF},get InvalidRequestException(){return QF},get InvalidGrantException$(){return LF},get InvalidGrantException(){return KF},get InvalidClientException$(){return JF},get InvalidClientException(){return FF},get InternalServerException$(){return BF},get InternalServerException(){return jF},get ExpiredTokenException$(){return nB},get ExpiredTokenException(){return eB},get CreateTokenResponse$(){return oB},get CreateTokenRequest$(){return iB},get CreateTokenCommand(){return tB},get CreateToken$(){return cB},get AuthorizationPendingException$(){return pB},get AuthorizationPendingException(){return rB},get AccessDeniedExceptionReason(){return sB},get AccessDeniedException$(){return gB},get AccessDeniedException(){return fB},get $Command(){return aB}};
2
+ import{Ge as Ij}from"./chunk-pbanj1gk.js";import{Ke as hj}from"./chunk-xqwk2zsx.js";import{Le as Oj}from"./chunk-g08qj9z3.js";import{Me as _j,Ne as vj,Oe as $j}from"./chunk-ccdjzn2m.js";import{Pe as mj}from"./chunk-dp6ms01y.js";import{Bf as Rj,Cf as Pj,Df as Tj,Ef as Aj,Ff as Dj}from"./chunk-2fbkw84y.js";import"./chunk-djfrkbd5.js";var Z=$j(),T=vj(),X=Pj(),Y=Tj(),w=Aj(),A=mj(),G=_j(),a=Rj(),S=Ij(),U=Dj(),r=Oj(),uj=hj(),lj=async(j,B,K)=>{return{operation:X.getSmithyContext(B).operation,region:await X.normalizeProvider(j.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function dj(j){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:j.region},propertiesExtractor:(B,K)=>({signingProperties:{config:B,context:K}})}}function Cj(j){return{schemeId:"smithy.api#noAuth"}}var Ej=(j)=>{let B=[];switch(j.operation){case"CreateToken":{B.push(Cj());break}default:B.push(dj(j))}return B},xj=(j)=>{let B=S.resolveAwsSdkSigV4Config(j);return Object.assign(B,{authSchemePreference:X.normalizeProvider(j.authSchemePreference??[])})},aj=(j)=>{return Object.assign(j,{useDualstackEndpoint:j.useDualstackEndpoint??!1,useFipsEndpoint:j.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"})},Sj={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},fj="3.997.14",gj={version:fj},k="ref",q=-1,R=!0,p="isSet",o="PartitionResult",P="booleanEquals",E="getAttr",c={[k]:"Endpoint"},x={[k]:o},z={},t=[{[k]:"Region"}],i={conditions:[[p,[c]],[p,t],["aws.partition",t,o],[P,[{[k]:"UseFIPS"},R]],[P,[{[k]:"UseDualStack"},R]],[P,[{fn:E,argv:[x,"supportsDualStack"]},R]],[P,[{fn:E,argv:[x,"supportsFIPS"]},R]],["stringEquals",[{fn:E,argv:[x,"name"]},"aws-us-gov"]]],results:[[q],[q,"Invalid Configuration: FIPS and custom endpoint are not supported"],[q,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[c,z],["https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",z],[q,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://oidc.{Region}.amazonaws.com",z],["https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",z],[q,"FIPS is enabled but this partition does not support FIPS"],["https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",z],[q,"DualStack is enabled but this partition does not support DualStack"],["https://oidc.{Region}.{PartitionResult#dnsSuffix}",z],[q,"Invalid Configuration: Missing Region"]]},sj=2,W=1e8,rj=new Int32Array([-1,1,-1,0,13,3,1,4,W+12,2,5,W+12,3,8,6,4,7,W+11,5,W+9,W+10,4,11,9,6,10,W+8,7,W+6,W+7,5,12,W+5,6,W+4,W+5,3,W+1,14,4,W+2,W+3]),pj=w.BinaryDecisionDiagram.from(rj,sj,i.conditions,i.results),cj=new w.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),tj=(j,B={})=>{return cj.get(j,()=>w.decideEndpoint(pj,{endpointParams:j,logger:B.logger}))};w.customEndpointFunctions.aws=Z.awsEndpointFunctions;class Q extends X.ServiceException{constructor(j){super(j);Object.setPrototypeOf(this,Q.prototype)}}class D extends Q{name="AccessDeniedException";$fault="client";error;reason;error_description;constructor(j){super({name:"AccessDeniedException",$fault:"client",...j});Object.setPrototypeOf(this,D.prototype),this.error=j.error,this.reason=j.reason,this.error_description=j.error_description}}class m extends Q{name="AuthorizationPendingException";$fault="client";error;error_description;constructor(j){super({name:"AuthorizationPendingException",$fault:"client",...j});Object.setPrototypeOf(this,m.prototype),this.error=j.error,this.error_description=j.error_description}}class _ extends Q{name="ExpiredTokenException";$fault="client";error;error_description;constructor(j){super({name:"ExpiredTokenException",$fault:"client",...j});Object.setPrototypeOf(this,_.prototype),this.error=j.error,this.error_description=j.error_description}}class v extends Q{name="InternalServerException";$fault="server";error;error_description;constructor(j){super({name:"InternalServerException",$fault:"server",...j});Object.setPrototypeOf(this,v.prototype),this.error=j.error,this.error_description=j.error_description}}class $ extends Q{name="InvalidClientException";$fault="client";error;error_description;constructor(j){super({name:"InvalidClientException",$fault:"client",...j});Object.setPrototypeOf(this,$.prototype),this.error=j.error,this.error_description=j.error_description}}class I extends Q{name="InvalidGrantException";$fault="client";error;error_description;constructor(j){super({name:"InvalidGrantException",$fault:"client",...j});Object.setPrototypeOf(this,I.prototype),this.error=j.error,this.error_description=j.error_description}}class O extends Q{name="InvalidRequestException";$fault="client";error;reason;error_description;constructor(j){super({name:"InvalidRequestException",$fault:"client",...j});Object.setPrototypeOf(this,O.prototype),this.error=j.error,this.reason=j.reason,this.error_description=j.error_description}}class h extends Q{name="InvalidScopeException";$fault="client";error;error_description;constructor(j){super({name:"InvalidScopeException",$fault:"client",...j});Object.setPrototypeOf(this,h.prototype),this.error=j.error,this.error_description=j.error_description}}class u extends Q{name="SlowDownException";$fault="client";error;error_description;constructor(j){super({name:"SlowDownException",$fault:"client",...j});Object.setPrototypeOf(this,u.prototype),this.error=j.error,this.error_description=j.error_description}}class l extends Q{name="UnauthorizedClientException";$fault="client";error;error_description;constructor(j){super({name:"UnauthorizedClientException",$fault:"client",...j});Object.setPrototypeOf(this,l.prototype),this.error=j.error,this.error_description=j.error_description}}class d extends Q{name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(j){super({name:"UnsupportedGrantTypeException",$fault:"client",...j});Object.setPrototypeOf(this,d.prototype),this.error=j.error,this.error_description=j.error_description}}var ij="AccessDeniedException",oj="AuthorizationPendingException",ej="AccessToken",nj="ClientSecret",jB="CreateToken",BB="CreateTokenRequest",FB="CreateTokenResponse",JB="CodeVerifier",KB="ExpiredTokenException",LB="InvalidClientException",QB="InvalidGrantException",WB="InvalidRequestException",XB="InternalServerException",YB="InvalidScopeException",ZB="IdToken",NB="RefreshToken",MB="SlowDownException",bB="UnauthorizedClientException",VB="UnsupportedGrantTypeException",HB="accessToken",H="client",qB="clientId",zB="clientSecret",UB="codeVerifier",wB="code",GB="deviceCode",F="error",kB="expiresIn",b="error_description",yB="grantType",RB="http",V="httpError",PB="idToken",e="reason",n="refreshToken",TB="redirectUri",jj="smithy.ts.sdk.synthetic.com.amazonaws.ssooidc",AB="scope",DB="server",mB="tokenType",J="com.amazonaws.ssooidc",Bj=a.TypeRegistry.for(jj),Fj=[-3,jj,"SSOOIDCServiceException",0,[],[]];Bj.registerError(Fj,Q);var N=a.TypeRegistry.for(J),Jj=[-3,J,ij,{[F]:H,[V]:400},[F,e,b],[0,0,0]];N.registerError(Jj,D);var Kj=[-3,J,oj,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Kj,m);var Lj=[-3,J,KB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Lj,_);var Qj=[-3,J,XB,{[F]:DB,[V]:500},[F,b],[0,0]];N.registerError(Qj,v);var Wj=[-3,J,LB,{[F]:H,[V]:401},[F,b],[0,0]];N.registerError(Wj,$);var Xj=[-3,J,QB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Xj,I);var Yj=[-3,J,WB,{[F]:H,[V]:400},[F,e,b],[0,0,0]];N.registerError(Yj,O);var Zj=[-3,J,YB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Zj,h);var Nj=[-3,J,MB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Nj,u);var Mj=[-3,J,bB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Mj,l);var bj=[-3,J,VB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(bj,d);var Vj=[Bj,N],_B=[0,J,ej,8,0],vB=[0,J,nj,8,0],$B=[0,J,JB,8,0],IB=[0,J,ZB,8,0],Hj=[0,J,NB,8,0],qj=[3,J,BB,0,[qB,zB,yB,GB,wB,n,AB,TB,UB],[0,[()=>vB,0],0,0,0,[()=>Hj,0],64,0,[()=>$B,0]],3],zj=[3,J,FB,0,[HB,mB,kB,n,PB],[[()=>_B,0],0,1,[()=>Hj,0],[()=>IB,0]]],Uj=[9,J,jB,{[RB]:["POST","/token",200]},()=>qj,()=>zj],OB=(j)=>{return{apiVersion:"2019-06-10",base64Decoder:j?.base64Decoder??U.fromBase64,base64Encoder:j?.base64Encoder??U.toBase64,disableHostPrefix:j?.disableHostPrefix??!1,endpointProvider:j?.endpointProvider??tj,extensions:j?.extensions??[],httpAuthSchemeProvider:j?.httpAuthSchemeProvider??Ej,httpAuthSchemes:j?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(B)=>B.getIdentityProvider("aws.auth#sigv4"),signer:new S.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(B)=>B.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new T.NoAuthSigner}],logger:j?.logger??new X.NoOpLogger,protocol:j?.protocol??uj.AwsRestJsonProtocol,protocolSettings:j?.protocolSettings??{defaultNamespace:"com.amazonaws.ssooidc",errorTypeRegistries:Vj,version:"2019-06-10",serviceTarget:"AWSSSOOIDCService"},serviceId:j?.serviceId??"SSO OIDC",urlParser:j?.urlParser??A.parseUrl,utf8Decoder:j?.utf8Decoder??U.fromUtf8,utf8Encoder:j?.utf8Encoder??U.toUtf8}},hB=(j)=>{X.emitWarningIfUnsupportedVersion(process.version);let B=Y.resolveDefaultsModeConfig(j),K=()=>B().then(X.loadConfigsForDefaultMode),M=OB(j);Z.emitWarningIfUnsupportedVersion(process.version);let L={profile:j?.profile,logger:M.logger};return{...M,...j,runtime:"node",defaultsMode:B,authSchemePreference:j?.authSchemePreference??Y.loadConfig(S.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,L),bodyLengthChecker:j?.bodyLengthChecker??U.calculateBodyLength,defaultUserAgentProvider:j?.defaultUserAgentProvider??Z.createDefaultUserAgentProvider({serviceId:M.serviceId,clientVersion:gj.version}),maxAttempts:j?.maxAttempts??Y.loadConfig(G.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,j),region:j?.region??Y.loadConfig(Y.NODE_REGION_CONFIG_OPTIONS,{...Y.NODE_REGION_CONFIG_FILE_OPTIONS,...L}),requestHandler:r.NodeHttpHandler.create(j?.requestHandler??K),retryMode:j?.retryMode??Y.loadConfig({...G.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await K()).retryMode||G.DEFAULT_RETRY_MODE},j),sha256:j?.sha256??U.Hash.bind(null,"sha256"),streamCollector:j?.streamCollector??r.streamCollector,useDualstackEndpoint:j?.useDualstackEndpoint??Y.loadConfig(Y.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,L),useFipsEndpoint:j?.useFipsEndpoint??Y.loadConfig(Y.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,L),userAgentAppId:j?.userAgentAppId??Y.loadConfig(Z.NODE_APP_ID_CONFIG_OPTIONS,L)}},uB=(j)=>{let{httpAuthSchemes:B,httpAuthSchemeProvider:K,credentials:M}=j;return{setHttpAuthScheme(L){let y=B.findIndex((C)=>C.schemeId===L.schemeId);if(y===-1)B.push(L);else B.splice(y,1,L)},httpAuthSchemes(){return B},setHttpAuthSchemeProvider(L){K=L},httpAuthSchemeProvider(){return K},setCredentials(L){M=L},credentials(){return M}}},lB=(j)=>{return{httpAuthSchemes:j.httpAuthSchemes(),httpAuthSchemeProvider:j.httpAuthSchemeProvider(),credentials:j.credentials()}},dB=(j,B)=>{let K=Object.assign(Z.getAwsRegionExtensionConfiguration(j),X.getDefaultExtensionConfiguration(j),A.getHttpHandlerExtensionConfiguration(j),uB(j));return B.forEach((M)=>M.configure(K)),Object.assign(j,Z.resolveAwsRegionExtensionConfiguration(K),X.resolveDefaultRuntimeConfig(K),A.resolveHttpHandlerRuntimeConfig(K),lB(K))};class f extends X.Client{config;constructor(...[j]){let B=hB(j||{});super(B);this.initConfig=B;let K=aj(B),M=Z.resolveUserAgentConfig(K),L=G.resolveRetryConfig(M),y=Y.resolveRegionConfig(L),C=Z.resolveHostHeaderConfig(y),wj=w.resolveEndpointConfig(C),Gj=xj(wj),kj=dB(Gj,j?.extensions||[]);this.config=kj,this.middlewareStack.use(a.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(Z.getUserAgentPlugin(this.config)),this.middlewareStack.use(G.getRetryPlugin(this.config)),this.middlewareStack.use(A.getContentLengthPlugin(this.config)),this.middlewareStack.use(Z.getHostHeaderPlugin(this.config)),this.middlewareStack.use(Z.getLoggerPlugin(this.config)),this.middlewareStack.use(Z.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(T.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:lj,identityProviderConfigProvider:async(yj)=>new T.DefaultIdentityProviderConfig({"aws.auth#sigv4":yj.credentials})})),this.middlewareStack.use(T.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class g extends X.Command.classBuilder().ep(Sj).m(function(j,B,K,M){return[w.getEndpointPlugin(K,j.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").sc(Uj).build(){}var CB={CreateTokenCommand:g};class s extends f{}X.createAggregatedClient(CB,s);var EB={KMS_ACCESS_DENIED:"KMS_AccessDeniedException"},xB={KMS_DISABLED_KEY:"KMS_DisabledException",KMS_INVALID_KEY_USAGE:"KMS_InvalidKeyUsageException",KMS_INVALID_STATE:"KMS_InvalidStateException",KMS_KEY_NOT_FOUND:"KMS_NotFoundException"};var{Command:aB,Client:SB}=X,fB=D,gB=Jj,sB=EB,rB=m,pB=Kj,cB=Uj,tB=g,iB=qj,oB=zj,eB=_,nB=Lj,jF=v,BF=Qj,FF=$,JF=Wj,KF=I,LF=Xj,QF=O,WF=Yj,XF=xB,YF=h,ZF=Zj,NF=s,MF=f,bF=Q,VF=Fj,HF=u,qF=Nj,zF=l,UF=Mj,wF=d,GF=bj,kF=Vj;export{kF as errorTypeRegistries,SB as __Client,GF as UnsupportedGrantTypeException$,wF as UnsupportedGrantTypeException,UF as UnauthorizedClientException$,zF as UnauthorizedClientException,qF as SlowDownException$,HF as SlowDownException,VF as SSOOIDCServiceException$,bF as SSOOIDCServiceException,MF as SSOOIDCClient,NF as SSOOIDC,ZF as InvalidScopeException$,YF as InvalidScopeException,XF as InvalidRequestExceptionReason,WF as InvalidRequestException$,QF as InvalidRequestException,LF as InvalidGrantException$,KF as InvalidGrantException,JF as InvalidClientException$,FF as InvalidClientException,BF as InternalServerException$,jF as InternalServerException,nB as ExpiredTokenException$,eB as ExpiredTokenException,oB as CreateTokenResponse$,iB as CreateTokenRequest$,tB as CreateTokenCommand,cB as CreateToken$,pB as AuthorizationPendingException$,rB as AuthorizationPendingException,sB as AccessDeniedExceptionReason,gB as AccessDeniedException$,fB as AccessDeniedException,aB as $Command};export default {get errorTypeRegistries(){return kF},get __Client(){return SB},get UnsupportedGrantTypeException$(){return GF},get UnsupportedGrantTypeException(){return wF},get UnauthorizedClientException$(){return UF},get UnauthorizedClientException(){return zF},get SlowDownException$(){return qF},get SlowDownException(){return HF},get SSOOIDCServiceException$(){return VF},get SSOOIDCServiceException(){return bF},get SSOOIDCClient(){return MF},get SSOOIDC(){return NF},get InvalidScopeException$(){return ZF},get InvalidScopeException(){return YF},get InvalidRequestExceptionReason(){return XF},get InvalidRequestException$(){return WF},get InvalidRequestException(){return QF},get InvalidGrantException$(){return LF},get InvalidGrantException(){return KF},get InvalidClientException$(){return JF},get InvalidClientException(){return FF},get InternalServerException$(){return BF},get InternalServerException(){return jF},get ExpiredTokenException$(){return nB},get ExpiredTokenException(){return eB},get CreateTokenResponse$(){return oB},get CreateTokenRequest$(){return iB},get CreateTokenCommand(){return tB},get CreateToken$(){return cB},get AuthorizationPendingException$(){return pB},get AuthorizationPendingException(){return rB},get AccessDeniedExceptionReason(){return sB},get AccessDeniedException$(){return gB},get AccessDeniedException(){return fB},get $Command(){return aB}};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import"./chunk-e0vrxetq.js";var e={"ui.sessionReview.title":"Altera\xE7\xF5es da sess\xE3o","ui.sessionReview.title.lastTurn":"Altera\xE7\xF5es do \xFAltimo turno","ui.sessionReview.diffStyle.unified":"Unificado","ui.sessionReview.diffStyle.split":"Dividido","ui.sessionReview.openFile":"Abrir arquivo","ui.sessionReview.selection.line":"linha {{line}}","ui.sessionReview.selection.lines":"linhas {{start}}-{{end}}","ui.sessionReview.expandAll":"Expandir tudo","ui.sessionReview.collapseAll":"Recolher tudo","ui.sessionReview.change.added":"Adicionado","ui.sessionReview.change.removed":"Removido","ui.sessionReview.change.modified":"Modificado","ui.sessionReview.image.loading":"Carregando...","ui.sessionReview.image.placeholder":"Imagem","ui.sessionReview.largeDiff.title":"Diff grande demais para renderizar","ui.sessionReview.largeDiff.meta":"Limite: {{limit}} linhas alteradas. Atual: {{current}} linhas alteradas.","ui.sessionReview.largeDiff.renderAnyway":"Renderizar mesmo assim","ui.fileMedia.kind.image":"imagem","ui.fileMedia.kind.audio":"\xE1udio","ui.fileMedia.state.removed":"Removido: {{kind}}","ui.fileMedia.state.loading":"Carregando {{kind}}...","ui.fileMedia.state.error":"Erro ao carregar {{kind}}","ui.fileMedia.state.unavailable":"{{kind}} indispon\xEDvel","ui.fileMedia.binary.title":"Arquivo bin\xE1rio","ui.fileMedia.binary.description.path":"N\xE3o \xE9 poss\xEDvel exibir {{path}} porque \xE9 um arquivo bin\xE1rio.","ui.fileMedia.binary.description.default":"N\xE3o \xE9 poss\xEDvel exibir o arquivo porque ele \xE9 bin\xE1rio.","ui.lineComment.label.prefix":"Comentar em ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"Comentando em ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"Adicionar coment\xE1rio","ui.lineComment.submit":"Comentar","ui.sessionTurn.steps.show":"Mostrar passos","ui.sessionTurn.steps.hide":"Ocultar passos","ui.sessionTurn.summary.response":"Resposta","ui.sessionTurn.diff.showMore":"Mostrar mais altera\xE7\xF5es ({{count}})","ui.sessionTurn.retry.retrying":"tentando novamente","ui.sessionTurn.retry.inSeconds":"em {{seconds}}s","ui.sessionTurn.retry.attempt":"tentativa #{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - tentativa #{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini est\xE1 muito sobrecarregado agora","ui.sessionTurn.error.freeUsageExceeded":"Limite de uso gratuito excedido","ui.sessionTurn.error.addQredits":"Adicionar cr\xE9ditos","ui.sessionTurn.status.delegating":"Delegando trabalho","ui.sessionTurn.status.planning":"Planejando pr\xF3ximos passos","ui.sessionTurn.status.gatheringContext":"Explorando","ui.sessionTurn.status.gatheredContext":"Explorado","ui.sessionTurn.status.searchingCodebase":"Pesquisando no c\xF3digo","ui.sessionTurn.status.searchingWeb":"Pesquisando na web","ui.sessionTurn.status.makingEdits":"Fazendo edi\xE7\xF5es","ui.sessionTurn.status.runningCommands":"Executando comandos","ui.sessionTurn.status.thinking":"Pensando","ui.sessionTurn.status.thinkingWithTopic":"Pensando - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"Organizando pensamentos","ui.sessionTurn.status.consideringNextSteps":"Considerando pr\xF3ximos passos","ui.messagePart.questions.dismissed":"Perguntas descartadas","ui.messagePart.compaction":"Sess\xE3o compactada","ui.messagePart.context.read.one":"{{count}} leitura","ui.messagePart.context.read.other":"{{count}} leituras","ui.messagePart.context.search.one":"{{count}} pesquisa","ui.messagePart.context.search.other":"{{count}} pesquisas","ui.messagePart.context.list.one":"{{count}} lista","ui.messagePart.context.list.other":"{{count}} listas","ui.messagePart.diagnostic.error":"Erro","ui.messagePart.title.edit":"Editar","ui.messagePart.title.write":"Escrever","ui.messagePart.option.typeOwnAnswer":"Digite sua pr\xF3pria resposta","ui.messagePart.review.title":"Revise suas respostas","ui.list.loading":"Carregando","ui.list.empty":"Nenhum resultado","ui.list.clearFilter":"Limpar filtro","ui.list.emptyWithFilter.prefix":"Nenhum resultado para","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"Nova mensagem","ui.textField.copyToClipboard":"Copiar para \xE1rea de transfer\xEAncia","ui.textField.copyLink":"Copiar link","ui.textField.copied":"Copiado","ui.imagePreview.alt":"Visualiza\xE7\xE3o de imagem","ui.scrollView.ariaLabel":"conte\xFAdo rol\xE1vel","ui.tool.read":"Ler","ui.tool.loaded":"Carregado","ui.tool.list":"Listar","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Buscar Web","ui.tool.websearch":"Pesquisa na Web","ui.tool.codesearch":"Pesquisa de C\xF3digo","ui.tool.shell":"Shell","ui.tool.patch":"Patch","ui.tool.todos":"Tarefas","ui.tool.todos.read":"Ler tarefas","ui.tool.questions":"Perguntas","ui.tool.agent":"Agente {{type}}","ui.tool.agent.default":"Agente","ui.common.file.one":"arquivo","ui.common.file.other":"arquivos","ui.common.question.one":"pergunta","ui.common.question.other":"perguntas","ui.common.add":"Adicionar","ui.common.back":"Voltar","ui.common.cancel":"Cancelar","ui.common.confirm":"Confirmar","ui.common.dismiss":"Descartar","ui.common.close":"Fechar","ui.common.next":"Pr\xF3ximo","ui.common.submit":"Enviar","ui.permission.deny":"Negar","ui.permission.allowAlways":"Permitir sempre","ui.permission.allowOnce":"Permitir uma vez","ui.message.expand":"Expandir mensagem","ui.message.collapse":"Recolher mensagem","ui.message.copy":"Copiar","ui.message.copyMessage":"Copiar mensagem","ui.message.forkMessage":"Bifurcar para nova sess\xE3o","ui.message.revertMessage":"Redefinir para este ponto","ui.message.copyResponse":"Copiar resposta","ui.message.copied":"Copiado!","ui.message.interrupted":"Interrompido","ui.message.queued":"Na fila","ui.message.attachment.alt":"anexo","ui.patch.action.deleted":"Exclu\xEDdo","ui.patch.action.created":"Criado","ui.patch.action.moved":"Movido","ui.patch.action.patched":"Patch aplicado","ui.question.subtitle.answered":"{{count}} respondidas","ui.question.answer.none":"(sem resposta)","ui.question.review.notAnswered":"(n\xE3o respondida)","ui.question.multiHint":"Selecione todas que se aplicam","ui.question.singleHint":"Selecione uma resposta","ui.question.custom.placeholder":"Digite sua resposta...","ui.fileSearch.placeholder":"Localizar","ui.fileSearch.previousMatch":"Ocorr\xEAncia anterior","ui.fileSearch.nextMatch":"Pr\xF3xima ocorr\xEAncia","ui.fileSearch.close":"Fechar busca","ui.tool.task":"Tarefa","ui.tool.skill":"Habilidade","ui.basicTool.called":"Chamou `{{tool}}`","ui.toolErrorCard.failed":"Falhou","ui.toolErrorCard.copyError":"Copiar erro","ui.message.duration.seconds":"{{count}}s","ui.message.duration.minutesSeconds":"{{minutes}}m {{seconds}}s"};export{e as dict};
2
+ import"./chunk-djfrkbd5.js";var e={"ui.sessionReview.title":"Altera\xE7\xF5es da sess\xE3o","ui.sessionReview.title.lastTurn":"Altera\xE7\xF5es do \xFAltimo turno","ui.sessionReview.diffStyle.unified":"Unificado","ui.sessionReview.diffStyle.split":"Dividido","ui.sessionReview.openFile":"Abrir arquivo","ui.sessionReview.selection.line":"linha {{line}}","ui.sessionReview.selection.lines":"linhas {{start}}-{{end}}","ui.sessionReview.expandAll":"Expandir tudo","ui.sessionReview.collapseAll":"Recolher tudo","ui.sessionReview.change.added":"Adicionado","ui.sessionReview.change.removed":"Removido","ui.sessionReview.change.modified":"Modificado","ui.sessionReview.image.loading":"Carregando...","ui.sessionReview.image.placeholder":"Imagem","ui.sessionReview.largeDiff.title":"Diff grande demais para renderizar","ui.sessionReview.largeDiff.meta":"Limite: {{limit}} linhas alteradas. Atual: {{current}} linhas alteradas.","ui.sessionReview.largeDiff.renderAnyway":"Renderizar mesmo assim","ui.fileMedia.kind.image":"imagem","ui.fileMedia.kind.audio":"\xE1udio","ui.fileMedia.state.removed":"Removido: {{kind}}","ui.fileMedia.state.loading":"Carregando {{kind}}...","ui.fileMedia.state.error":"Erro ao carregar {{kind}}","ui.fileMedia.state.unavailable":"{{kind}} indispon\xEDvel","ui.fileMedia.binary.title":"Arquivo bin\xE1rio","ui.fileMedia.binary.description.path":"N\xE3o \xE9 poss\xEDvel exibir {{path}} porque \xE9 um arquivo bin\xE1rio.","ui.fileMedia.binary.description.default":"N\xE3o \xE9 poss\xEDvel exibir o arquivo porque ele \xE9 bin\xE1rio.","ui.lineComment.label.prefix":"Comentar em ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"Comentando em ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"Adicionar coment\xE1rio","ui.lineComment.submit":"Comentar","ui.sessionTurn.steps.show":"Mostrar passos","ui.sessionTurn.steps.hide":"Ocultar passos","ui.sessionTurn.summary.response":"Resposta","ui.sessionTurn.diff.showMore":"Mostrar mais altera\xE7\xF5es ({{count}})","ui.sessionTurn.retry.retrying":"tentando novamente","ui.sessionTurn.retry.inSeconds":"em {{seconds}}s","ui.sessionTurn.retry.attempt":"tentativa #{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - tentativa #{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini est\xE1 muito sobrecarregado agora","ui.sessionTurn.error.freeUsageExceeded":"Limite de uso gratuito excedido","ui.sessionTurn.error.addQredits":"Adicionar cr\xE9ditos","ui.sessionTurn.status.delegating":"Delegando trabalho","ui.sessionTurn.status.planning":"Planejando pr\xF3ximos passos","ui.sessionTurn.status.gatheringContext":"Explorando","ui.sessionTurn.status.gatheredContext":"Explorado","ui.sessionTurn.status.searchingCodebase":"Pesquisando no c\xF3digo","ui.sessionTurn.status.searchingWeb":"Pesquisando na web","ui.sessionTurn.status.makingEdits":"Fazendo edi\xE7\xF5es","ui.sessionTurn.status.runningCommands":"Executando comandos","ui.sessionTurn.status.thinking":"Pensando","ui.sessionTurn.status.thinkingWithTopic":"Pensando - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"Organizando pensamentos","ui.sessionTurn.status.consideringNextSteps":"Considerando pr\xF3ximos passos","ui.messagePart.questions.dismissed":"Perguntas descartadas","ui.messagePart.compaction":"Sess\xE3o compactada","ui.messagePart.context.read.one":"{{count}} leitura","ui.messagePart.context.read.other":"{{count}} leituras","ui.messagePart.context.search.one":"{{count}} pesquisa","ui.messagePart.context.search.other":"{{count}} pesquisas","ui.messagePart.context.list.one":"{{count}} lista","ui.messagePart.context.list.other":"{{count}} listas","ui.messagePart.diagnostic.error":"Erro","ui.messagePart.title.edit":"Editar","ui.messagePart.title.write":"Escrever","ui.messagePart.option.typeOwnAnswer":"Digite sua pr\xF3pria resposta","ui.messagePart.review.title":"Revise suas respostas","ui.list.loading":"Carregando","ui.list.empty":"Nenhum resultado","ui.list.clearFilter":"Limpar filtro","ui.list.emptyWithFilter.prefix":"Nenhum resultado para","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"Nova mensagem","ui.textField.copyToClipboard":"Copiar para \xE1rea de transfer\xEAncia","ui.textField.copyLink":"Copiar link","ui.textField.copied":"Copiado","ui.imagePreview.alt":"Visualiza\xE7\xE3o de imagem","ui.scrollView.ariaLabel":"conte\xFAdo rol\xE1vel","ui.tool.read":"Ler","ui.tool.loaded":"Carregado","ui.tool.list":"Listar","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Buscar Web","ui.tool.websearch":"Pesquisa na Web","ui.tool.codesearch":"Pesquisa de C\xF3digo","ui.tool.shell":"Shell","ui.tool.patch":"Patch","ui.tool.todos":"Tarefas","ui.tool.todos.read":"Ler tarefas","ui.tool.questions":"Perguntas","ui.tool.agent":"Agente {{type}}","ui.tool.agent.default":"Agente","ui.common.file.one":"arquivo","ui.common.file.other":"arquivos","ui.common.question.one":"pergunta","ui.common.question.other":"perguntas","ui.common.add":"Adicionar","ui.common.back":"Voltar","ui.common.cancel":"Cancelar","ui.common.confirm":"Confirmar","ui.common.dismiss":"Descartar","ui.common.close":"Fechar","ui.common.next":"Pr\xF3ximo","ui.common.submit":"Enviar","ui.permission.deny":"Negar","ui.permission.allowAlways":"Permitir sempre","ui.permission.allowOnce":"Permitir uma vez","ui.message.expand":"Expandir mensagem","ui.message.collapse":"Recolher mensagem","ui.message.copy":"Copiar","ui.message.copyMessage":"Copiar mensagem","ui.message.forkMessage":"Bifurcar para nova sess\xE3o","ui.message.revertMessage":"Redefinir para este ponto","ui.message.copyResponse":"Copiar resposta","ui.message.copied":"Copiado!","ui.message.interrupted":"Interrompido","ui.message.queued":"Na fila","ui.message.attachment.alt":"anexo","ui.patch.action.deleted":"Exclu\xEDdo","ui.patch.action.created":"Criado","ui.patch.action.moved":"Movido","ui.patch.action.patched":"Patch aplicado","ui.question.subtitle.answered":"{{count}} respondidas","ui.question.answer.none":"(sem resposta)","ui.question.review.notAnswered":"(n\xE3o respondida)","ui.question.multiHint":"Selecione todas que se aplicam","ui.question.singleHint":"Selecione uma resposta","ui.question.custom.placeholder":"Digite sua resposta...","ui.fileSearch.placeholder":"Localizar","ui.fileSearch.previousMatch":"Ocorr\xEAncia anterior","ui.fileSearch.nextMatch":"Pr\xF3xima ocorr\xEAncia","ui.fileSearch.close":"Fechar busca","ui.tool.task":"Tarefa","ui.tool.skill":"Habilidade","ui.basicTool.called":"Chamou `{{tool}}`","ui.toolErrorCard.failed":"Falhou","ui.toolErrorCard.copyError":"Copiar erro","ui.message.duration.seconds":"{{count}}s","ui.message.duration.minutesSeconds":"{{minutes}}m {{seconds}}s"};export{e as dict};