@qitqode/qitqode-android-arm64 0.1.32 → 0.1.34

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 (386) hide show
  1. package/bundle/{chunk-x4sp99g6.js → chunk-03xppy47.js} +1 -1
  2. package/bundle/{chunk-2vn41ecx.js → chunk-04hvaaje.js} +1 -1
  3. package/bundle/{chunk-6phh70sp.js → chunk-06k6egt2.js} +1 -1
  4. package/bundle/{chunk-8n20thvd.js → chunk-08f4khsw.js} +2 -2
  5. package/bundle/{chunk-mk1bfzg5.js → chunk-08m0hkdz.js} +1 -1
  6. package/bundle/{chunk-kfxv5rfg.js → chunk-09pkckr1.js} +1 -1
  7. package/bundle/{chunk-6kp07m7p.js → chunk-0c6ep9mc.js} +1 -1
  8. package/bundle/{chunk-8r6ht39z.js → chunk-0csy9x1n.js} +1 -1
  9. package/bundle/{chunk-0v0vqbn5.js → chunk-0h8wdch6.js} +1 -1
  10. package/bundle/{chunk-t56r99hp.js → chunk-0msqaywp.js} +1 -1
  11. package/bundle/chunk-0x5jn813.js +2 -0
  12. package/bundle/{chunk-vhe0tth1.js → chunk-11v7vz3y.js} +1 -1
  13. package/bundle/{chunk-1sgahe1s.js → chunk-1byd3wma.js} +1 -1
  14. package/bundle/{chunk-x3y2xzhn.js → chunk-1dtzxt2w.js} +1 -1
  15. package/bundle/{chunk-31qrzrwy.js → chunk-1gf116rg.js} +1 -1
  16. package/bundle/{chunk-hnvn2c25.js → chunk-1hmq2fpt.js} +2 -2
  17. package/bundle/{chunk-05mce0j3.js → chunk-1me21qdc.js} +1 -1
  18. package/bundle/{chunk-rvkrgkeq.js → chunk-1pg6pv0m.js} +1 -1
  19. package/bundle/{chunk-0bbs01f0.js → chunk-1yt5rsew.js} +1 -1
  20. package/bundle/{chunk-caj1b9y7.js → chunk-28cm7m3t.js} +4 -4
  21. package/bundle/chunk-28t9akfn.js +2 -0
  22. package/bundle/{chunk-6aqyhfag.js → chunk-2fkfbdcy.js} +4 -4
  23. package/bundle/{chunk-52bam8g7.js → chunk-2h1fcqvf.js} +1 -1
  24. package/bundle/chunk-2scyp9ns.js +2 -0
  25. package/bundle/{chunk-hbbsbyyq.js → chunk-2swch6mx.js} +1 -1
  26. package/bundle/chunk-2tw58kwb.js +2 -0
  27. package/bundle/chunk-2vxx0tax.js +2 -0
  28. package/bundle/chunk-2ybt3p5z.js +2 -0
  29. package/bundle/chunk-2zpkw3ge.js +2 -0
  30. package/bundle/{chunk-xthkjax9.js → chunk-34p46th6.js} +1 -1
  31. package/bundle/chunk-397be2x0.js +2 -0
  32. package/bundle/chunk-3c78nkgn.js +2 -0
  33. package/bundle/{chunk-7xm75w1e.js → chunk-3k2b05fv.js} +1 -1
  34. package/bundle/{chunk-tvdmnee6.js → chunk-3mzcr3fw.js} +1 -1
  35. package/bundle/{chunk-wqj0xasg.js → chunk-3vnnxq40.js} +1 -1
  36. package/bundle/{chunk-enpzvmtc.js → chunk-41v0x1jk.js} +1 -1
  37. package/bundle/chunk-425mq6k8.js +2 -0
  38. package/bundle/chunk-43yv7tz1.js +2 -0
  39. package/bundle/{chunk-78ymd20x.js → chunk-499gp5g5.js} +1 -1
  40. package/bundle/{chunk-m2q317gh.js → chunk-4ntbxet5.js} +1 -1
  41. package/bundle/chunk-4sw6frjt.js +2 -0
  42. package/bundle/{chunk-rzhdkkpz.js → chunk-4ttf9rjd.js} +1 -1
  43. package/bundle/{chunk-vywnd5sf.js → chunk-4wxxyrxn.js} +1 -1
  44. package/bundle/chunk-4xw14sed.js +2 -0
  45. package/bundle/chunk-536naqqv.js +2 -0
  46. package/bundle/chunk-57najm15.js +2 -0
  47. package/bundle/{chunk-60v5jvgt.js → chunk-5a7fs1hg.js} +1 -1
  48. package/bundle/chunk-5he3d7cy.js +2 -0
  49. package/bundle/{chunk-2phz0bn9.js → chunk-5vzrn6za.js} +1 -1
  50. package/bundle/{chunk-zaks8cae.js → chunk-5xq3h51b.js} +1 -1
  51. package/bundle/{chunk-gwp17r03.js → chunk-67d5d8mr.js} +1 -1
  52. package/bundle/{chunk-5pb551dx.js → chunk-696z96a6.js} +1 -1
  53. package/bundle/{chunk-yek0sk2q.js → chunk-6a7c7wnf.js} +1 -1
  54. package/bundle/{chunk-9gazyynx.js → chunk-6b196wjz.js} +2 -2
  55. package/bundle/{chunk-fgg9txzb.js → chunk-6gb65bv1.js} +1 -1
  56. package/bundle/chunk-6hybp2mt.js +2 -0
  57. package/bundle/{chunk-d6ry9418.js → chunk-6p94fpbn.js} +2 -2
  58. package/bundle/{chunk-xcmgkc57.js → chunk-6styp5dn.js} +1 -1
  59. package/bundle/{chunk-85wcc1tp.js → chunk-6v9nbb4c.js} +1 -1
  60. package/bundle/chunk-6y423jax.js +3 -0
  61. package/bundle/{chunk-ejrhvy38.js → chunk-6ynxf3q7.js} +1 -1
  62. package/bundle/{chunk-cfgvm15x.js → chunk-71zw0qhf.js} +1 -1
  63. package/bundle/chunk-72ghkgcn.js +2 -0
  64. package/bundle/{chunk-bh53dz71.js → chunk-7311jry1.js} +1 -1
  65. package/bundle/{chunk-d07p6fpk.js → chunk-73myw3bj.js} +2 -2
  66. package/bundle/chunk-741teh8k.js +2 -0
  67. package/bundle/{chunk-10bjs581.js → chunk-79agp7v3.js} +2 -2
  68. package/bundle/chunk-7b3wx6kn.js +2 -0
  69. package/bundle/{chunk-wmqsdt2c.js → chunk-7bwe0ayr.js} +1 -1
  70. package/bundle/{chunk-40efytmk.js → chunk-7eexey82.js} +1 -1
  71. package/bundle/chunk-7hh0654f.js +3 -0
  72. package/bundle/{chunk-33e9y2aw.js → chunk-7mxt5b0h.js} +1 -1
  73. package/bundle/{chunk-yjf3kyej.js → chunk-7vd91wsd.js} +1 -1
  74. package/bundle/{chunk-nv3eyyaj.js → chunk-81trveht.js} +1 -1
  75. package/bundle/{chunk-dnwefyhv.js → chunk-8762ty72.js} +1 -1
  76. package/bundle/{chunk-qc8rsn4v.js → chunk-891yevv2.js} +1 -1
  77. package/bundle/{chunk-15j5cn4t.js → chunk-8d5k45yj.js} +1 -1
  78. package/bundle/{chunk-we9cv8we.js → chunk-8eje5baf.js} +2 -2
  79. package/bundle/{chunk-8qswepp2.js → chunk-8ktgy41r.js} +1 -1
  80. package/bundle/{chunk-w18xs2h5.js → chunk-8q73cjyj.js} +1 -1
  81. package/bundle/chunk-8y623qdx.js +2 -0
  82. package/bundle/chunk-921vn745.js +2 -0
  83. package/bundle/{chunk-4jtxtkj7.js → chunk-94pcpztx.js} +2 -2
  84. package/bundle/{chunk-a7amey9s.js → chunk-9fxkh84w.js} +1 -1
  85. package/bundle/{chunk-pv67gwce.js → chunk-9msnx26q.js} +1 -1
  86. package/bundle/{chunk-8hytwgwf.js → chunk-9qdr9t8c.js} +1 -1
  87. package/bundle/{chunk-gt31468k.js → chunk-9x25d115.js} +1 -1
  88. package/bundle/{chunk-5jx0yadh.js → chunk-9y97bzht.js} +2 -2
  89. package/bundle/{chunk-zs8kqdsf.js → chunk-a0rp7gh4.js} +2 -2
  90. package/bundle/{chunk-tq0239xp.js → chunk-a3a1trap.js} +1 -1
  91. package/bundle/{chunk-n9xns8by.js → chunk-a48t0g95.js} +2 -2
  92. package/bundle/chunk-a8119c3a.js +2 -0
  93. package/bundle/chunk-akk84fnc.js +2 -0
  94. package/bundle/chunk-aw7j7brm.js +2 -0
  95. package/bundle/{chunk-js1n8tgv.js → chunk-azhw650z.js} +1 -1
  96. package/bundle/chunk-b34t8v7x.js +2 -0
  97. package/bundle/{chunk-t8m74g39.js → chunk-b4knxpqh.js} +1 -1
  98. package/bundle/chunk-b8hmj4jq.js +2 -0
  99. package/bundle/{chunk-jef04wyf.js → chunk-ba3h1pzs.js} +1 -1
  100. package/bundle/{chunk-71xz70r9.js → chunk-bbzztav6.js} +1 -1
  101. package/bundle/{chunk-dactgryw.js → chunk-bj00xk8k.js} +1 -1
  102. package/bundle/{chunk-59yqvk48.js → chunk-bja8q0ke.js} +1 -1
  103. package/bundle/{chunk-cxnfy6qk.js → chunk-bk4phk66.js} +1 -1
  104. package/bundle/{chunk-e01wnqvc.js → chunk-bnss5dkk.js} +1 -1
  105. package/bundle/{chunk-fvzwbjh8.js → chunk-bv29k2pf.js} +1 -1
  106. package/bundle/{chunk-v1xjc3s8.js → chunk-by855es0.js} +1 -1
  107. package/bundle/{chunk-zy9w1vkc.js → chunk-c5fa8cb1.js} +1 -1
  108. package/bundle/{chunk-x9rbv6p6.js → chunk-c5pb87yf.js} +1 -1
  109. package/bundle/{chunk-ck2gfaba.js → chunk-c6vfwjg4.js} +1 -1
  110. package/bundle/chunk-cfw9pyt7.js +2 -0
  111. package/bundle/chunk-ckbwdrm3.js +2 -0
  112. package/bundle/{chunk-3632wgg1.js → chunk-cs38g1bx.js} +1 -1
  113. package/bundle/{chunk-53bqcctj.js → chunk-cz3h5n1v.js} +1 -1
  114. package/bundle/{chunk-rg0mrprz.js → chunk-d00c1k9w.js} +1 -1
  115. package/bundle/{chunk-zqqx96jx.js → chunk-d80hk5x9.js} +1 -1
  116. package/bundle/{chunk-wezarrvy.js → chunk-d8dk05kd.js} +1 -1
  117. package/bundle/{chunk-p18axz0m.js → chunk-dcndy4sr.js} +1 -1
  118. package/bundle/{chunk-e7ny0b3x.js → chunk-dctj3c22.js} +1 -1
  119. package/bundle/{chunk-vvxmwyrw.js → chunk-df2aswz3.js} +1 -1
  120. package/bundle/{chunk-skqbaadf.js → chunk-dffhkd30.js} +1 -1
  121. package/bundle/{chunk-pe29yy6s.js → chunk-dhqaqeq6.js} +1 -1
  122. package/bundle/chunk-dwajajaq.js +2 -0
  123. package/bundle/{chunk-dryzt12j.js → chunk-dxcrggvq.js} +1 -1
  124. package/bundle/{chunk-fn9h4ync.js → chunk-dyv2hqvc.js} +1 -1
  125. package/bundle/{chunk-93p131d5.js → chunk-e6xnynaz.js} +1 -1
  126. package/bundle/chunk-e7ah0e61.js +2 -0
  127. package/bundle/{chunk-tqj69nh6.js → chunk-e7v9trve.js} +2 -2
  128. package/bundle/{chunk-chpr8ekb.js → chunk-ebcdxmdd.js} +1 -1
  129. package/bundle/{chunk-zw815d68.js → chunk-ee23d2nz.js} +2 -2
  130. package/bundle/chunk-efndtzby.js +2 -0
  131. package/bundle/{chunk-gb00fh4z.js → chunk-egn55fa2.js} +3 -3
  132. package/bundle/chunk-eq2pepce.js +2 -0
  133. package/bundle/{chunk-7tr9ejyk.js → chunk-esp6jv63.js} +1 -1
  134. package/bundle/chunk-f693s9vn.js +2 -0
  135. package/bundle/chunk-f9v5n0t6.js +2 -0
  136. package/bundle/{chunk-za7mwbye.js → chunk-fdadk5tw.js} +1 -1
  137. package/bundle/{chunk-0dt0bxz6.js → chunk-fg35hwa0.js} +2 -2
  138. package/bundle/{chunk-ktzq4ha1.js → chunk-fmq0m4k5.js} +1 -1
  139. package/bundle/chunk-ftepqwyq.js +2 -0
  140. package/bundle/{chunk-jh0bw59r.js → chunk-g4gjz7sq.js} +1 -1
  141. package/bundle/{chunk-w7vh8cxt.js → chunk-g4nq9swr.js} +1 -1
  142. package/bundle/{chunk-g5rabwre.js → chunk-g6cyhxwg.js} +2 -2
  143. package/bundle/{chunk-k7aenxan.js → chunk-gdb67zmn.js} +1 -1
  144. package/bundle/{chunk-a1wdeapb.js → chunk-ggydr1ze.js} +1 -1
  145. package/bundle/chunk-gk28ffhg.js +2 -0
  146. package/bundle/{chunk-c11d28qn.js → chunk-gmzrvxnv.js} +2 -2
  147. package/bundle/chunk-gpfc4z4v.js +2 -0
  148. package/bundle/chunk-gqvg02zp.js +2 -0
  149. package/bundle/{chunk-3c6p8tm3.js → chunk-gws1rn1v.js} +1 -1
  150. package/bundle/{chunk-hnzegjgv.js → chunk-gy0wm7e1.js} +1 -1
  151. package/bundle/{chunk-zcsgqk9f.js → chunk-h2m8fdqm.js} +1 -1
  152. package/bundle/{chunk-pp2eqkse.js → chunk-h3k1dk9m.js} +1 -1
  153. package/bundle/chunk-h8c3dcqt.js +2 -0
  154. package/bundle/chunk-hfq11w4h.js +2 -0
  155. package/bundle/{chunk-nkkch4h7.js → chunk-hg0etbkx.js} +1 -1
  156. package/bundle/{chunk-01my2y0c.js → chunk-hj3ddt53.js} +1 -1
  157. package/bundle/{chunk-ay8emwym.js → chunk-hw5qyht3.js} +1 -1
  158. package/bundle/chunk-hwf58w1k.js +2 -0
  159. package/bundle/{chunk-rza530gm.js → chunk-j0jdkqf5.js} +1 -1
  160. package/bundle/{chunk-ezfy0b6q.js → chunk-j8q252w3.js} +2 -2
  161. package/bundle/{chunk-kq6b222y.js → chunk-jgjnz82k.js} +1 -1
  162. package/bundle/{chunk-wfb608qf.js → chunk-jkh6eg7d.js} +3 -3
  163. package/bundle/{chunk-xrs18kzn.js → chunk-jm722vy1.js} +1 -1
  164. package/bundle/chunk-kdvs4871.js +2 -0
  165. package/bundle/{chunk-6hpgb8h4.js → chunk-ke7n9t5p.js} +3 -3
  166. package/bundle/{chunk-vcw00k0n.js → chunk-keveg5gx.js} +2 -2
  167. package/bundle/{chunk-dxpj0cxh.js → chunk-kfmz2p27.js} +2 -2
  168. package/bundle/{chunk-xm7wascx.js → chunk-kjyw00jp.js} +1 -1
  169. package/bundle/chunk-kk3ve911.js +2 -0
  170. package/bundle/{chunk-gsar6xda.js → chunk-kmcsz8yv.js} +1 -1
  171. package/bundle/{chunk-mqd1jsg2.js → chunk-knpyt206.js} +1 -1
  172. package/bundle/{chunk-4cnwn1rh.js → chunk-kv72hxkp.js} +2 -2
  173. package/bundle/{chunk-kj20f048.js → chunk-kwx9ewe0.js} +1 -1
  174. package/bundle/chunk-m4j7jyrd.js +3 -0
  175. package/bundle/{chunk-5hw6xa49.js → chunk-md8161zd.js} +1 -1
  176. package/bundle/{chunk-r7sqdfad.js → chunk-mdts0641.js} +1 -1
  177. package/bundle/{chunk-xzrb857v.js → chunk-mex0fe9s.js} +1 -1
  178. package/bundle/{chunk-ctaze2hn.js → chunk-mf3sm0pk.js} +1 -1
  179. package/bundle/chunk-mkng9ykt.js +2 -0
  180. package/bundle/{chunk-mzs2pjyc.js → chunk-mpygdb5a.js} +2 -2
  181. package/bundle/{chunk-81qwdg5s.js → chunk-mq6jn47r.js} +1 -1
  182. package/bundle/{chunk-yp8wyzzm.js → chunk-mr8j7rc6.js} +1 -1
  183. package/bundle/{chunk-h4j5xzc8.js → chunk-n6gtdx5h.js} +1 -1
  184. package/bundle/{chunk-h2afsbm1.js → chunk-n6msxne8.js} +1 -1
  185. package/bundle/{chunk-jbx3s7nw.js → chunk-n96tvjgj.js} +2 -2
  186. package/bundle/{chunk-9f1z9xce.js → chunk-ngccf7ga.js} +1 -1
  187. package/bundle/chunk-nj4d554m.js +11 -0
  188. package/bundle/{chunk-dynv30gm.js → chunk-nj61v4n7.js} +1 -1
  189. package/bundle/{chunk-12vef2pr.js → chunk-nkk4fyqf.js} +1 -1
  190. package/bundle/{chunk-gbpvs0fx.js → chunk-nmehsm3w.js} +1 -1
  191. package/bundle/chunk-npv80mcx.js +2 -0
  192. package/bundle/{chunk-rkyf0cp8.js → chunk-ny9hnvzy.js} +1 -1
  193. package/bundle/{chunk-ew9pdrp9.js → chunk-p15sv2dg.js} +1 -1
  194. package/bundle/{chunk-73e409hd.js → chunk-p3qkexpk.js} +1 -1
  195. package/bundle/{chunk-yhbcbjfk.js → chunk-p825vsjy.js} +1 -1
  196. package/bundle/{chunk-rbk8seme.js → chunk-p9cnzxb8.js} +1 -1
  197. package/bundle/chunk-pe98rznj.js +2 -0
  198. package/bundle/{chunk-15hw2z9t.js → chunk-pkc4ddw1.js} +1 -1
  199. package/bundle/{chunk-x25zkrz7.js → chunk-ppkqr9cn.js} +1 -1
  200. package/bundle/{chunk-1gx18dm5.js → chunk-prh3c44x.js} +1 -1
  201. package/bundle/{chunk-zscer8rc.js → chunk-pxmhe36r.js} +1 -1
  202. package/bundle/{chunk-2wajs9xv.js → chunk-q1czj6be.js} +1 -1
  203. package/bundle/{chunk-d3ermm6d.js → chunk-q5fygrnr.js} +1 -1
  204. package/bundle/chunk-q6wm9yt0.js +2 -0
  205. package/bundle/{chunk-g7ccdh7r.js → chunk-q8hd01j7.js} +1 -1
  206. package/bundle/{chunk-e10py6yr.js → chunk-qa2j0qmy.js} +1 -1
  207. package/bundle/chunk-qbx70v64.js +2 -0
  208. package/bundle/{chunk-ad72gb5f.js → chunk-qc3ce3vc.js} +2 -2
  209. package/bundle/{chunk-g10d6x57.js → chunk-qddt2gcs.js} +1 -1
  210. package/bundle/chunk-qek6a75r.js +2 -0
  211. package/bundle/{chunk-y3b4k38p.js → chunk-qg2vk5fw.js} +1 -1
  212. package/bundle/{chunk-7z5jh4ra.js → chunk-qkjdr337.js} +1 -1
  213. package/bundle/chunk-qkk1as5n.js +2 -0
  214. package/bundle/{chunk-5q4harvc.js → chunk-qrtc3etn.js} +2 -2
  215. package/bundle/chunk-qsm9xw87.js +2 -0
  216. package/bundle/chunk-qyzze0dv.js +2 -0
  217. package/bundle/{chunk-7avcnwv8.js → chunk-qzj6027k.js} +1 -1
  218. package/bundle/{chunk-70ck4v3t.js → chunk-r0k21apr.js} +1 -1
  219. package/bundle/chunk-r2w3gr8d.js +2 -0
  220. package/bundle/chunk-r5bqcpkz.js +2 -0
  221. package/bundle/chunk-r67c858b.js +2 -0
  222. package/bundle/chunk-r9fvfkee.js +2 -0
  223. package/bundle/{chunk-3wetyrjs.js → chunk-rjy5mqwz.js} +1 -1
  224. package/bundle/{chunk-69nzndk7.js → chunk-rkwrjphh.js} +1 -1
  225. package/bundle/{chunk-0mx2psfc.js → chunk-rmve21dh.js} +1 -1
  226. package/bundle/chunk-rq47pn3r.js +2 -0
  227. package/bundle/{chunk-b8gjz6bk.js → chunk-rq4w0by4.js} +1 -1
  228. package/bundle/{chunk-jrqb0jwy.js → chunk-rsszcqxd.js} +1 -1
  229. package/bundle/{chunk-xvwvd4kq.js → chunk-rv1stdvb.js} +1 -1
  230. package/bundle/chunk-rvt1tdy8.js +2 -0
  231. package/bundle/{chunk-3bxg5bta.js → chunk-ry7q8xn6.js} +1 -1
  232. package/bundle/{chunk-rjd8gbs5.js → chunk-ryfqwsft.js} +1 -1
  233. package/bundle/chunk-s27xvrft.js +2 -0
  234. package/bundle/chunk-s2vasbwj.js +2 -0
  235. package/bundle/{chunk-p9qfbr02.js → chunk-s4qtphwx.js} +1 -1
  236. package/bundle/{chunk-qrsveve6.js → chunk-s8hq6trz.js} +1 -1
  237. package/bundle/chunk-scy39p6q.js +2 -0
  238. package/bundle/{chunk-71sjjjr8.js → chunk-seghf5fc.js} +1 -1
  239. package/bundle/{chunk-2zq4k837.js → chunk-sfes6pp1.js} +1 -1
  240. package/bundle/chunk-shenqgrx.js +2 -0
  241. package/bundle/{chunk-htz93dsd.js → chunk-snr44en9.js} +2 -2
  242. package/bundle/{chunk-cphrgyp6.js → chunk-ssk8tkwd.js} +1 -1
  243. package/bundle/{chunk-jdynx7m6.js → chunk-sz0gkx88.js} +1 -1
  244. package/bundle/{chunk-yv0xrnn9.js → chunk-t5qamf96.js} +1 -1
  245. package/bundle/chunk-tt8jke90.js +2 -0
  246. package/bundle/chunk-ttevj0pj.js +2 -0
  247. package/bundle/chunk-v6tgn668.js +2 -0
  248. package/bundle/chunk-v7c54cyj.js +2 -0
  249. package/bundle/chunk-vgefaens.js +2 -0
  250. package/bundle/chunk-vkq0faj8.js +2 -0
  251. package/bundle/{chunk-764fksh3.js → chunk-vkqzmzpw.js} +1 -1
  252. package/bundle/{chunk-24jg9d61.js → chunk-vsr8mnj6.js} +1 -1
  253. package/bundle/{chunk-6d5rrre9.js → chunk-vszbqv24.js} +1 -1
  254. package/bundle/chunk-vv59b4re.js +2 -0
  255. package/bundle/chunk-vwqy7n3g.js +2 -0
  256. package/bundle/{chunk-y6123zvq.js → chunk-w5kg2yz0.js} +1 -1
  257. package/bundle/{chunk-ygs5pzk7.js → chunk-w9nzsd3w.js} +3 -3
  258. package/bundle/chunk-wbzs30fk.js +28 -0
  259. package/bundle/chunk-wet3bnwn.js +2 -0
  260. package/bundle/{chunk-gagtmjmp.js → chunk-wfd5h6ax.js} +2 -2
  261. package/bundle/{chunk-w8saweey.js → chunk-wfegee41.js} +1 -1
  262. package/bundle/{chunk-ht5w06x7.js → chunk-wgk7ynt3.js} +2 -2
  263. package/bundle/{chunk-257me4z3.js → chunk-wmaz57f6.js} +47 -47
  264. package/bundle/chunk-wn076jwj.js +2 -0
  265. package/bundle/{chunk-35xk4g91.js → chunk-wvf5q2hz.js} +1 -1
  266. package/bundle/{chunk-d9hbhkbq.js → chunk-wwgd4rzx.js} +2 -2
  267. package/bundle/chunk-x0m1qye9.js +2 -0
  268. package/bundle/{chunk-p62gb4wj.js → chunk-x66ycpfs.js} +1 -1
  269. package/bundle/chunk-x9s90xd1.js +3 -0
  270. package/bundle/{chunk-48ge2ryx.js → chunk-xgr6jnd6.js} +1 -1
  271. package/bundle/{chunk-q7vasbxn.js → chunk-xhkd9yf3.js} +1 -1
  272. package/bundle/{chunk-pje60pj2.js → chunk-xkv3yta0.js} +1 -1
  273. package/bundle/{chunk-2hc5z7b5.js → chunk-xqdrr7xg.js} +1 -1
  274. package/bundle/{chunk-0c2p3a6v.js → chunk-xy5cjach.js} +1 -1
  275. package/bundle/{chunk-3nx7112w.js → chunk-y370dqf3.js} +2 -2
  276. package/bundle/{chunk-ss2ms1r3.js → chunk-y437vyza.js} +1 -1
  277. package/bundle/chunk-y70aachh.js +2 -0
  278. package/bundle/{chunk-db405hjg.js → chunk-y9zstzed.js} +1 -1
  279. package/bundle/{chunk-gz8sz7z1.js → chunk-ya8g02hv.js} +1 -1
  280. package/bundle/{chunk-avf8v3hb.js → chunk-ygjtwjnk.js} +1 -1
  281. package/bundle/{chunk-pp6vhqrr.js → chunk-yjk6zv2z.js} +1 -1
  282. package/bundle/{chunk-326p5b10.js → chunk-yk97q51d.js} +1 -1
  283. package/bundle/{chunk-kf167jw7.js → chunk-ynwkr3yh.js} +1 -1
  284. package/bundle/{chunk-y9q0hb7b.js → chunk-yqk58hf6.js} +2 -2
  285. package/bundle/chunk-ysgxt83y.js +2 -0
  286. package/bundle/{chunk-tt30dybd.js → chunk-yz6898wy.js} +1 -1
  287. package/bundle/{chunk-x562b0xk.js → chunk-z1ay3qd0.js} +1 -1
  288. package/bundle/{chunk-9emq67vc.js → chunk-z7430qxg.js} +1 -1
  289. package/bundle/{chunk-2maqde7w.js → chunk-z8gdmvgg.js} +2 -2
  290. package/bundle/chunk-za63b5mc.js +5 -0
  291. package/bundle/{chunk-vxyy2dp3.js → chunk-zfcp509b.js} +1 -1
  292. package/bundle/{chunk-x7k5yeey.js → chunk-zfn0z4sh.js} +1 -1
  293. package/bundle/{chunk-ag8kz1e7.js → chunk-zh3fny3z.js} +2 -2
  294. package/bundle/{chunk-whe7h2mj.js → chunk-zm5dfk2b.js} +1 -1
  295. package/bundle/{chunk-02jtpxe0.js → chunk-zpf31kxb.js} +1 -1
  296. package/bundle/{chunk-56z7x7h4.js → chunk-zph1c2q1.js} +2 -2
  297. package/bundle/chunk-zwdnh860.js +2 -0
  298. package/bundle/{chunk-1vb79bw1.js → chunk-zwnhf4z1.js} +1 -1
  299. package/bundle/index.js +3 -3
  300. package/bundle/parser.worker.js +2 -2
  301. package/bundle/worker.js +1 -1
  302. package/package.json +1 -1
  303. package/bundle/chunk-096pd6c4.js +0 -2
  304. package/bundle/chunk-0c5rxty9.js +0 -2
  305. package/bundle/chunk-0e86gt9r.js +0 -2
  306. package/bundle/chunk-0p27fvfr.js +0 -2
  307. package/bundle/chunk-0qs1vx97.js +0 -2
  308. package/bundle/chunk-1r95p0tp.js +0 -2
  309. package/bundle/chunk-1rhhhm88.js +0 -2
  310. package/bundle/chunk-1wbjh23g.js +0 -2
  311. package/bundle/chunk-20702epe.js +0 -2
  312. package/bundle/chunk-42p59wm4.js +0 -2
  313. package/bundle/chunk-4512pvca.js +0 -2
  314. package/bundle/chunk-456bmaww.js +0 -2
  315. package/bundle/chunk-48pajrnt.js +0 -2
  316. package/bundle/chunk-4fy9c54h.js +0 -2
  317. package/bundle/chunk-4sc82a27.js +0 -2
  318. package/bundle/chunk-59y8q9m5.js +0 -2
  319. package/bundle/chunk-5tray1fw.js +0 -3
  320. package/bundle/chunk-634pnryq.js +0 -2
  321. package/bundle/chunk-64ezpbwt.js +0 -2
  322. package/bundle/chunk-7mke41x0.js +0 -2
  323. package/bundle/chunk-7ry9cvby.js +0 -2
  324. package/bundle/chunk-7wczs9mx.js +0 -2
  325. package/bundle/chunk-7z777y9k.js +0 -2
  326. package/bundle/chunk-89w3yhf8.js +0 -2
  327. package/bundle/chunk-8dwq41q1.js +0 -28
  328. package/bundle/chunk-8v96pmqn.js +0 -2
  329. package/bundle/chunk-8y2scz6z.js +0 -2
  330. package/bundle/chunk-8zx7vnx6.js +0 -2
  331. package/bundle/chunk-94a76f8w.js +0 -2
  332. package/bundle/chunk-9ng7jjp7.js +0 -2
  333. package/bundle/chunk-9tpgnjy8.js +0 -2
  334. package/bundle/chunk-a7ym9f0v.js +0 -2
  335. package/bundle/chunk-a8f2xvy3.js +0 -2
  336. package/bundle/chunk-a99cvwta.js +0 -2
  337. package/bundle/chunk-avys5mnz.js +0 -2
  338. package/bundle/chunk-axvjd10y.js +0 -2
  339. package/bundle/chunk-b4pphqab.js +0 -2
  340. package/bundle/chunk-b6087ak4.js +0 -2
  341. package/bundle/chunk-bn0h9dny.js +0 -10
  342. package/bundle/chunk-brkqxbjy.js +0 -2
  343. package/bundle/chunk-c26qxt5g.js +0 -2
  344. package/bundle/chunk-c6zscb38.js +0 -2
  345. package/bundle/chunk-cjww2jmv.js +0 -3
  346. package/bundle/chunk-d0damw6y.js +0 -2
  347. package/bundle/chunk-dafmkrhn.js +0 -2
  348. package/bundle/chunk-dgprdym0.js +0 -2
  349. package/bundle/chunk-dsamees2.js +0 -2
  350. package/bundle/chunk-dyqpxx3b.js +0 -2
  351. package/bundle/chunk-e5mv5wnt.js +0 -2
  352. package/bundle/chunk-gwzw92jt.js +0 -2
  353. package/bundle/chunk-h6f3kbz2.js +0 -2
  354. package/bundle/chunk-hp7tssgv.js +0 -2
  355. package/bundle/chunk-ht0hbdmx.js +0 -2
  356. package/bundle/chunk-k1txw65h.js +0 -2
  357. package/bundle/chunk-k5atbdbm.js +0 -2
  358. package/bundle/chunk-k75jqg60.js +0 -3
  359. package/bundle/chunk-mahgmbt9.js +0 -2
  360. package/bundle/chunk-ngm6pqyt.js +0 -2
  361. package/bundle/chunk-ngtavamt.js +0 -2
  362. package/bundle/chunk-nkhc32s3.js +0 -2
  363. package/bundle/chunk-npse2xrd.js +0 -2
  364. package/bundle/chunk-p6e4vqy7.js +0 -2
  365. package/bundle/chunk-pqkjhn8h.js +0 -2
  366. package/bundle/chunk-qadw6j20.js +0 -2
  367. package/bundle/chunk-qd8w2gkd.js +0 -2
  368. package/bundle/chunk-qggcszs2.js +0 -2
  369. package/bundle/chunk-r8m7rtfc.js +0 -2
  370. package/bundle/chunk-rf12t4n5.js +0 -2
  371. package/bundle/chunk-rpgne7xh.js +0 -2
  372. package/bundle/chunk-rvgj1vky.js +0 -2
  373. package/bundle/chunk-s3mnrhbx.js +0 -5
  374. package/bundle/chunk-s6ktx2sx.js +0 -2
  375. package/bundle/chunk-ss2jvqrg.js +0 -2
  376. package/bundle/chunk-tvwwq4b3.js +0 -2
  377. package/bundle/chunk-v2n26eg4.js +0 -2
  378. package/bundle/chunk-wr42tphe.js +0 -2
  379. package/bundle/chunk-x24y7qyd.js +0 -2
  380. package/bundle/chunk-xj765svc.js +0 -3
  381. package/bundle/chunk-y2d0w09y.js +0 -2
  382. package/bundle/chunk-y7sy3w6z.js +0 -2
  383. package/bundle/chunk-yb79f79m.js +0 -2
  384. package/bundle/chunk-yjnyzpmt.js +0 -2
  385. package/bundle/chunk-yqbcnsa1.js +0 -2
  386. package/bundle/chunk-z3mra3nm.js +0 -2
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{In as w,Jn as A,Mn as U,Nn as O,Rn as R,Tn as s,Un as F}from"./chunk-3nx7112w.js";import{ho as G,lo as L}from"./chunk-vcw00k0n.js";import{nt as M,st as k}from"./chunk-tqj69nh6.js";import{RM as y}from"./chunk-zs8kqdsf.js";import{DO as Y}from"./chunk-7xm75w1e.js";var _={};Y(_,{schema:()=>x,jsonc:()=>v,ConfigParse:()=>_});function v($,r){let E=[],J=w($,E,{allowTrailingComma:!0});if(E.length){let C=$.split(`
2
+ import{fp as w,gp as A,jp as U,kp as O,op as R,qp as s,rp as F}from"./chunk-y370dqf3.js";import{Gp as G,Kp as L}from"./chunk-keveg5gx.js";import{Mu as M,Ru as k}from"./chunk-e7v9trve.js";import{oO as y}from"./chunk-a0rp7gh4.js";import{aQ as Y}from"./chunk-3k2b05fv.js";var _={};Y(_,{schema:()=>x,jsonc:()=>v,ConfigParse:()=>_});function v($,r){let E=[],J=w($,E,{allowTrailingComma:!0});if(E.length){let C=$.split(`
3
3
  `),T=E.map((I)=>{let Z=$.substring(0,I.offset).split(`
4
4
  `),H=Z.length,j=Z[Z.length-1].length+1,B=C[H-1],Q=`${A(I.error)} at line ${H}, column ${j}`;if(!B)return Q;return`${Q}
5
5
  Line ${H}: ${B}
@@ -11,4 +11,4 @@ ${$}
11
11
  ${T}
12
12
  --- End ---`})}return J}function x($,r,E){let J=$.safeParse(r);if(J.success)return J.data;throw new O({path:E,issues:J.error.issues})}var m={};Y(m,{substitute:()=>c,ConfigVariable:()=>m});import W from"path";import f from"os";function S($){return $.type==="path"?$.path:$.source}function d($){return $.type==="path"?W.dirname($.path):$.dir}async function c($){let r=$.missing??"error",E=$.text.replace(/\{env:([^}]+)\}/g,(H,j)=>{return process.env[j]||""}),J=Array.from(E.matchAll(/\{file:[^}]+\}/g));if(!J.length)return E;let C=d($),T=S($),I="",Z=0;for(let H of J){let j=H[0],B=H.index;I+=E.slice(Z,B);let Q=E.lastIndexOf(`
13
13
  `,B-1)+1;if(E.slice(Q,B).trimStart().startsWith("//")){I+=j,Z=B+j.length;continue}let K=j.replace(/^\{file:/,"").replace(/\}$/,"");if(K.startsWith("~/"))K=W.join(f.homedir(),K.slice(2));let b=W.isAbsolute(K)?K:W.resolve(C,K),o=(await k.readText(b).catch((X)=>{if(r==="empty")return"";let q=`bad file reference: "${j}"`;if(X.code==="ENOENT")throw new O({path:T,message:q+` ${b} does not exist`},{cause:X});throw new O({path:T,message:q},{cause:X})})).trim();I+=JSON.stringify(o).slice(1,-1),Z=B+j.length}return I+=E.slice(Z),I}var V={};Y(V,{resolvePluginSpec:()=>h,pluginSpecifier:()=>N,pluginOptions:()=>g,load:()=>a,deduplicatePluginOrigins:()=>u,Spec:()=>n,Options:()=>P,ConfigPlugin:()=>V});import{pathToFileURL as D}from"url";import z from"path";var P=y.Record(y.String,y.Unknown).pipe(G(($)=>({zod:L($)}))),n=y.Union([y.String,y.mutable(y.Tuple([y.String,P]))]).pipe(G(($)=>({zod:L($)})));async function a($){let r=[];for(let E of await M.scan("{plugin,plugins}/*.{ts,js}",{cwd:$,absolute:!0,dot:!0,symlink:!0}))r.push(D(E).href);return r}function N($){return Array.isArray($)?$[0]:$}function g($){return Array.isArray($)?$[1]:void 0}async function h($,r){let E=N($);if(!s(E))return $;let J=z.dirname(r),C=(()=>{if(E.startsWith("file://"))return E;if(z.isAbsolute(E)||/^[A-Za-z]:[\\/]/.test(E))return D(E).href;return D(z.resolve(J,E)).href})(),T=await F(C).catch(()=>C);if(Array.isArray($))return[T,$[1]];return T}function u($){let r=new Set,E=[];for(let J of $.toReversed()){let C=N(J.spec),T=C.startsWith("file://")?C:R(C).pkg;if(r.has(T))continue;r.add(T),E.push(J)}return E.toReversed()}
14
- export{_ as En,m as Fn,V as Gn};
14
+ export{_ as bp,m as cp,V as dp};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{qf as P}from"./chunk-bh53dz71.js";import"./chunk-93p131d5.js";import{yf as Q}from"./chunk-tq0239xp.js";import{EO as W,FO as J}from"./chunk-7xm75w1e.js";class M{bytes;constructor(e){if(this.bytes=e,e.byteLength!==8)throw Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>9223372036854776000||e<-9223372036854776000)throw Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);let t=new Uint8Array(8);for(let r=7,n=Math.abs(Math.round(e));r>-1&&n>0;r--,n/=256)t[r]=n;if(e<0)A(t);return new M(t)}valueOf(){let e=this.bytes.slice(0),t=e[0]&128;if(t)A(e);return parseInt(b.toHex(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function A(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1;t--)if(e[t]++,e[t]!==0)break}class I{toUtf8;fromUtf8;constructor(e,t){this.toUtf8=e,this.fromUtf8=t}format(e){let t=[];for(let s of Object.keys(e)){let a=this.fromUtf8(s);t.push(Uint8Array.from([a.byteLength]),a,this.formatHeaderValue(e[s]))}let r=new Uint8Array(t.reduce((s,a)=>s+a.byteLength,0)),n=0;for(let s of t)r.set(s,n),n+=s.byteLength;return r}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":let t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":let r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,e.value,!1),new Uint8Array(r.buffer);case"long":let n=new Uint8Array(9);return n[0]=5,n.set(e.value.bytes,1),n;case"binary":let s=new DataView(new ArrayBuffer(3+e.value.byteLength));s.setUint8(0,6),s.setUint16(1,e.value.byteLength,!1);let a=new Uint8Array(s.buffer);return a.set(e.value,3),a;case"string":let l=this.fromUtf8(e.value),i=new DataView(new ArrayBuffer(3+l.byteLength));i.setUint8(0,7),i.setUint16(1,l.byteLength,!1);let f=new Uint8Array(i.buffer);return f.set(l,3),f;case"timestamp":let h=new Uint8Array(9);return h[0]=8,h.set(M.fromNumber(e.value.valueOf()).bytes,1),h;case"uuid":if(!te.test(e.value))throw Error(`Invalid UUID received: ${e.value}`);let u=new Uint8Array(17);return u[0]=9,u.set(b.fromHex(e.value.replace(/\-/g,"")),1),u}}parse(e){let t={},r=0;while(r<e.byteLength){let n=e.getUint8(r++),s=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+r,n));switch(r+=n,e.getUint8(r++)){case 0:t[s]={type:F,value:!0};break;case 1:t[s]={type:F,value:!1};break;case 2:t[s]={type:X,value:e.getInt8(r++)};break;case 3:t[s]={type:Z,value:e.getInt16(r,!1)},r+=2;break;case 4:t[s]={type:V,value:e.getInt32(r,!1)},r+=4;break;case 5:t[s]={type:D,value:new M(new Uint8Array(e.buffer,e.byteOffset+r,8))},r+=8;break;case 6:let a=e.getUint16(r,!1);r+=2,t[s]={type:E,value:new Uint8Array(e.buffer,e.byteOffset+r,a)},r+=a;break;case 7:let l=e.getUint16(r,!1);r+=2,t[s]={type:_,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+r,l))},r+=l;break;case 8:t[s]={type:Y,value:new Date(new M(new Uint8Array(e.buffer,e.byteOffset+r,8)).valueOf())},r+=8;break;case 9:let i=new Uint8Array(e.buffer,e.byteOffset+r,16);r+=16,t[s]={type:ee,value:`${b.toHex(i.subarray(0,4))}-${b.toHex(i.subarray(4,6))}-${b.toHex(i.subarray(6,8))}-${b.toHex(i.subarray(8,10))}-${b.toHex(i.subarray(10))}`};break;default:throw Error("Unrecognized header type tag")}}return t}}function se({byteLength:e,byteOffset:t,buffer:r}){if(e<re)throw Error("Provided message too short to accommodate event stream message overhead");let n=new DataView(r,t,e),s=n.getUint32(0,!1);if(e!==s)throw Error("Reported message length does not match received message length");let a=n.getUint32(q,!1),l=n.getUint32(p,!1),i=n.getUint32(e-S,!1),f=new j.Crc32().update(new Uint8Array(r,t,p));if(l!==f.digest())throw Error(`The prelude checksum specified in the message (${l}) does not match the calculated CRC32 checksum (${f.digest()})`);if(f.update(new Uint8Array(r,t+p,e-(p+S))),i!==f.digest())throw Error(`The message checksum (${f.digest()}) did not match the expected value of ${i}`);return{headers:new DataView(r,t+p+S,a),body:new Uint8Array(r,t+p+S+a,s-a-(p+S+S))}}class x{headerMarshaller;messageBuffer;isEndOfStream;constructor(e,t){this.headerMarshaller=new I(e,t),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){let e=this.messageBuffer.pop(),t=this.isEndOfStream;return{getMessage(){return e},isEndOfStream(){return t}}}getAvailableMessages(){let e=this.messageBuffer;this.messageBuffer=[];let t=this.isEndOfStream;return{getMessages(){return e},isEndOfStream(){return t}}}encode({headers:e,body:t}){let r=this.headerMarshaller.format(e),n=r.byteLength+t.byteLength+16,s=new Uint8Array(n),a=new DataView(s.buffer,s.byteOffset,s.byteLength),l=new j.Crc32;return a.setUint32(0,n,!1),a.setUint32(4,r.byteLength,!1),a.setUint32(8,l.update(s.subarray(0,8)).digest(),!1),s.set(r,12),s.set(t,r.byteLength+12),a.setUint32(n-4,l.update(s.subarray(8,n-4)).digest(),!1),s}decode(e){let{headers:t,body:r}=se(e);return{headers:this.headerMarshaller.parse(t),body:r}}formatHeaders(e){return this.headerMarshaller.format(e)}}function H(e){let t=0,r=0,n=null,s=null,a=(i)=>{if(typeof i!=="number")throw Error("Attempted to allocate an event message where size was not a number: "+i);t=i,r=4,n=new Uint8Array(i),new DataView(n.buffer).setUint32(0,i,!1)},l=async function*(){let i=e[Symbol.asyncIterator]();while(!0){let{value:f,done:h}=await i.next();if(h){if(!t)return;else if(t===r)yield n;else throw Error("Truncated event message received.");return}let u=f.length,o=0;while(o<u){if(!n){let m=u-o;if(!s)s=new Uint8Array(4);let y=Math.min(4-r,m);if(s.set(f.slice(o,o+y),r),r+=y,o+=y,r<4)break;a(new DataView(s.buffer).getUint32(0,!1)),s=null}let c=Math.min(t-r,u-o);if(n.set(f.slice(o,o+c),r),r+=c,o+=c,t&&t===r)yield n,n=null,t=0,r=0}}};return{[Symbol.asyncIterator]:l}}function ne(e,t){let r=C(t.deserializer,t.toUtf8);return{[Symbol.asyncIterator]:async function*(){for await(let n of e){let s=t.eventStreamCodec.decode(n),a=await r(s);if(a===void 0)continue;yield a}}}}function C(e,t){return async function(r){let{value:n}=r.headers[":message-type"];if(n==="error"){let s=Error(r.headers[":error-message"].value||"UnknownError");throw s.name=r.headers[":error-code"].value,s}else if(n==="exception"){let s=r.headers[":exception-type"].value,a={[s]:r},l=await e(a);if(l.$unknown){let i=Error(t(r.body));throw i.name=s,i}throw l[s]}else if(n==="event"){let s={[r.headers[":event-type"].value]:r},a=await e(s);if(a.$unknown)return;return a}else throw Error(`Unrecognizable event type: ${r.headers[":event-type"].value}`)}}class N{universalMarshaller;constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new O({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){let r=typeof e[Symbol.asyncIterator]==="function"?e:ie(e);return this.universalMarshaller.deserialize(r,t)}serialize(e,t){return R.Readable.from(this.universalMarshaller.serialize(e,t))}}async function*ie(e){let t=!1,r=!1,n=[];e.on("error",(s)=>{if(!t)t=!0;if(s)throw s}),e.on("data",(s)=>{n.push(s)}),e.on("end",()=>{t=!0});while(!r){let s=await new Promise((a)=>setTimeout(()=>a(n.shift()),0));if(s)yield s;r=t&&n.length===0}}class K{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:e,serializer:t,deserializer:r,serdeContext:n,defaultContentType:s}){this.marshaller=e,this.serializer=t,this.deserializer=r,this.serdeContext=n,this.defaultContentType=s}async serializeEventStream({eventStream:e,requestSchema:t,initialRequest:r}){let n=this.marshaller,s=t.getEventStreamMember(),a=t.getMemberSchema(s),l=this.serializer,i=this.defaultContentType,f=Symbol("initialRequestMarker"),h={async*[Symbol.asyncIterator](){if(r){let u={":event-type":{type:"string",value:"initial-request"},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:i}};l.write(t,r);let o=l.flush();yield{[f]:!0,headers:u,body:o}}for await(let u of e)yield u}};return n.serialize(h,(u)=>{if(u[f])return{headers:u.headers,body:u.body};let o="";for(let d in u)if(d!=="__type"){o=d;break}let{additionalHeaders:c,body:m,eventType:y,explicitPayloadContentType:g}=this.writeEventBody(o,a,u);return{headers:{":event-type":{type:"string",value:y},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:g??i},...c},body:m}})}async deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:r}){let n=this.marshaller,s=t.getEventStreamMember(),l=t.getMemberSchema(s).getMemberSchemas(),i=Symbol("initialResponseMarker"),f=n.deserialize(e.body,async(o)=>{let c="";for(let y in o)if(y!=="__type"){c=y;break}let m=o[c].body;if(c==="initial-response"){let y=await this.deserializer.read(t,m);return delete y[s],{[i]:!0,...y}}else if(c in l){let y=l[c];if(y.isStructSchema()){let g={},w=!1;for(let[d,U]of y.structIterator()){let{eventHeader:$,eventPayload:G}=U.getMergedTraits();if(w=w||Boolean($||G),G){if(U.isBlobSchema())g[d]=m;else if(U.isStringSchema())g[d]=(this.serdeContext?.utf8Encoder??b.toUtf8)(m);else if(U.isStructSchema())g[d]=await this.deserializer.read(U,m)}else if($){let v=o[c].headers[d]?.value;if(v!=null)if(U.isNumericSchema())if(v&&typeof v==="object"&&"bytes"in v)g[d]=BigInt(v.toString());else g[d]=Number(v);else g[d]=v}}if(w)return{[c]:g};if(m.byteLength===0)return{[c]:{}}}return{[c]:await this.deserializer.read(y,m)}}else return{$unknown:o}}),h=f[Symbol.asyncIterator](),u=await h.next();if(u.done)return f;if(u.value?.[i]){if(!t)throw Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");for(let o in u.value)r[o]=u.value[o]}return{async*[Symbol.asyncIterator](){if(!u?.value?.[i])yield u.value;while(!0){let{done:o,value:c}=await h.next();if(o)break;yield c}}}}writeEventBody(e,t,r){let n=this.serializer,s=e,a=null,l,i=(()=>{return t.getSchema()[4].includes(e)})(),f={};if(!i){let[o,c]=r[e];s=o,n.write(15,c)}else{let o=t.getMemberSchema(e);if(o.isStructSchema()){for(let[c,m]of o.structIterator()){let{eventHeader:y,eventPayload:g}=m.getMergedTraits();if(g)a=c;else if(y){let w=r[e][c],d="binary";if(m.isNumericSchema())if(-2147483648<=w&&w<=2147483647)d="integer";else d="long";else if(m.isTimestampSchema())d="timestamp";else if(m.isStringSchema())d="string";else if(m.isBooleanSchema())d="boolean";if(w!=null)f[c]={type:d,value:w},delete r[e][c]}}if(a!==null){let c=o.getMemberSchema(a);if(c.isBlobSchema())l="application/octet-stream";else if(c.isStringSchema())l="text/plain";n.write(c,r[e][a])}else n.write(o,r[e])}else if(o.isUnitSchema())n.write(o,{});else throw Error("@smithy/core/event-streams - non-struct member not supported in event stream union.")}let h=n.flush()??new Uint8Array;return{body:typeof h==="string"?(this.serdeContext?.utf8Decoder??b.fromUtf8)(h):h,eventType:s,explicitPayloadContentType:l,additionalHeaders:f}}}var j,b,R,L,F="boolean",X="byte",Z="short",V="integer",D="long",E="binary",_="string",Y="timestamp",ee="uuid",te,q=4,p,S=4,re,k,B,T,z,O=class{eventStreamCodec;utfEncoder;constructor({utf8Encoder:t,utf8Decoder:r}){this.eventStreamCodec=new x(t,r),this.utfEncoder=t}deserialize(t,r){let n=H(t);return new T({messageStream:new k({inputStream:n,decoder:this.eventStreamCodec}),deserializer:C(r,this.utfEncoder)})}serialize(t,r){return new B({messageStream:new z({inputStream:t,serializer:r}),encoder:this.eventStreamCodec,includeEndFrame:!0})}},ae=(e)=>new O(e),oe=(e)=>new N(e),ce=(e)=>({[Symbol.asyncIterator]:async function*(){let t=e.getReader();try{while(!0){let{done:r,value:n}=await t.read();if(r)return;yield n}}finally{t.releaseLock()}}}),le=(e)=>{let t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(r){let{done:n,value:s}=await t.next();if(n)return r.close();r.enqueue(s)}})},ue=(e)=>Object.assign(e,{eventStreamMarshaller:e.eventStreamSerdeProvider(e)}),fe,ye,de,me,he,ge,we,be,pe,ve,Se,Ue,Me,Ie,xe,ke,Be,Te;var ze=W(()=>{j=P(),b=Q(),R=J("stream");(function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"})(L||(L={}));te=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,p=q*2,re=p+S*2;k=class k{options;constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let e of this.options.inputStream)yield this.options.decoder.decode(e)}};B=class B{options;constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let e of this.options.messageStream)yield this.options.encoder.encode(e);if(this.options.includeEndFrame)yield new Uint8Array(0)}};T=class T{options;constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let e of this.options.messageStream){let t=await this.options.deserializer(e);if(t===void 0)continue;yield t}}};z=class z{options;constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let e of this.options.inputStream)yield this.options.serializer(e)}};fe=x,ye=N,de=K,me=I,he=M,ge=k,we=B,be=T,pe=z,ve=O,Se=oe,Ue=H,Me=C,Ie=ne,xe=le,ke=ce,Be=ue,Te=ae});ze();export{Te as universalEventStreamSerdeProvider,Be as resolveEventStreamSerdeConfig,ke as readableStreamToIterable,xe as iterableToReadableStream,Ie as getUnmarshalledStream,Me as getMessageUnmarshaller,Ue as getChunkedStream,Se as eventStreamSerdeProvider,ve as UniversalEventStreamMarshaller,pe as SmithyMessageEncoderStream,be as SmithyMessageDecoderStream,we as MessageEncoderStream,ge as MessageDecoderStream,he as Int64,me as HeaderMarshaller,de as EventStreamSerde,ye as EventStreamMarshaller,fe as EventStreamCodec};export default {get universalEventStreamSerdeProvider(){return Te},get resolveEventStreamSerdeConfig(){return Be},get readableStreamToIterable(){return ke},get iterableToReadableStream(){return xe},get getUnmarshalledStream(){return Ie},get getMessageUnmarshaller(){return Me},get getChunkedStream(){return Ue},get eventStreamSerdeProvider(){return Se},get UniversalEventStreamMarshaller(){return ve},get SmithyMessageEncoderStream(){return pe},get SmithyMessageDecoderStream(){return be},get MessageEncoderStream(){return we},get MessageDecoderStream(){return ge},get Int64(){return he},get HeaderMarshaller(){return me},get EventStreamSerde(){return de},get EventStreamMarshaller(){return ye},get EventStreamCodec(){return fe}};
2
+ import{qf as P}from"./chunk-7311jry1.js";import"./chunk-e6xnynaz.js";import{yf as Q}from"./chunk-a3a1trap.js";import{bQ as W,cQ as J}from"./chunk-3k2b05fv.js";class M{bytes;constructor(e){if(this.bytes=e,e.byteLength!==8)throw Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>9223372036854776000||e<-9223372036854776000)throw Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);let t=new Uint8Array(8);for(let r=7,n=Math.abs(Math.round(e));r>-1&&n>0;r--,n/=256)t[r]=n;if(e<0)A(t);return new M(t)}valueOf(){let e=this.bytes.slice(0),t=e[0]&128;if(t)A(e);return parseInt(b.toHex(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function A(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1;t--)if(e[t]++,e[t]!==0)break}class I{toUtf8;fromUtf8;constructor(e,t){this.toUtf8=e,this.fromUtf8=t}format(e){let t=[];for(let s of Object.keys(e)){let a=this.fromUtf8(s);t.push(Uint8Array.from([a.byteLength]),a,this.formatHeaderValue(e[s]))}let r=new Uint8Array(t.reduce((s,a)=>s+a.byteLength,0)),n=0;for(let s of t)r.set(s,n),n+=s.byteLength;return r}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":let t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":let r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,e.value,!1),new Uint8Array(r.buffer);case"long":let n=new Uint8Array(9);return n[0]=5,n.set(e.value.bytes,1),n;case"binary":let s=new DataView(new ArrayBuffer(3+e.value.byteLength));s.setUint8(0,6),s.setUint16(1,e.value.byteLength,!1);let a=new Uint8Array(s.buffer);return a.set(e.value,3),a;case"string":let l=this.fromUtf8(e.value),i=new DataView(new ArrayBuffer(3+l.byteLength));i.setUint8(0,7),i.setUint16(1,l.byteLength,!1);let f=new Uint8Array(i.buffer);return f.set(l,3),f;case"timestamp":let h=new Uint8Array(9);return h[0]=8,h.set(M.fromNumber(e.value.valueOf()).bytes,1),h;case"uuid":if(!te.test(e.value))throw Error(`Invalid UUID received: ${e.value}`);let u=new Uint8Array(17);return u[0]=9,u.set(b.fromHex(e.value.replace(/\-/g,"")),1),u}}parse(e){let t={},r=0;while(r<e.byteLength){let n=e.getUint8(r++),s=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+r,n));switch(r+=n,e.getUint8(r++)){case 0:t[s]={type:F,value:!0};break;case 1:t[s]={type:F,value:!1};break;case 2:t[s]={type:X,value:e.getInt8(r++)};break;case 3:t[s]={type:Z,value:e.getInt16(r,!1)},r+=2;break;case 4:t[s]={type:V,value:e.getInt32(r,!1)},r+=4;break;case 5:t[s]={type:D,value:new M(new Uint8Array(e.buffer,e.byteOffset+r,8))},r+=8;break;case 6:let a=e.getUint16(r,!1);r+=2,t[s]={type:E,value:new Uint8Array(e.buffer,e.byteOffset+r,a)},r+=a;break;case 7:let l=e.getUint16(r,!1);r+=2,t[s]={type:_,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+r,l))},r+=l;break;case 8:t[s]={type:Y,value:new Date(new M(new Uint8Array(e.buffer,e.byteOffset+r,8)).valueOf())},r+=8;break;case 9:let i=new Uint8Array(e.buffer,e.byteOffset+r,16);r+=16,t[s]={type:ee,value:`${b.toHex(i.subarray(0,4))}-${b.toHex(i.subarray(4,6))}-${b.toHex(i.subarray(6,8))}-${b.toHex(i.subarray(8,10))}-${b.toHex(i.subarray(10))}`};break;default:throw Error("Unrecognized header type tag")}}return t}}function se({byteLength:e,byteOffset:t,buffer:r}){if(e<re)throw Error("Provided message too short to accommodate event stream message overhead");let n=new DataView(r,t,e),s=n.getUint32(0,!1);if(e!==s)throw Error("Reported message length does not match received message length");let a=n.getUint32(q,!1),l=n.getUint32(p,!1),i=n.getUint32(e-S,!1),f=new j.Crc32().update(new Uint8Array(r,t,p));if(l!==f.digest())throw Error(`The prelude checksum specified in the message (${l}) does not match the calculated CRC32 checksum (${f.digest()})`);if(f.update(new Uint8Array(r,t+p,e-(p+S))),i!==f.digest())throw Error(`The message checksum (${f.digest()}) did not match the expected value of ${i}`);return{headers:new DataView(r,t+p+S,a),body:new Uint8Array(r,t+p+S+a,s-a-(p+S+S))}}class x{headerMarshaller;messageBuffer;isEndOfStream;constructor(e,t){this.headerMarshaller=new I(e,t),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){let e=this.messageBuffer.pop(),t=this.isEndOfStream;return{getMessage(){return e},isEndOfStream(){return t}}}getAvailableMessages(){let e=this.messageBuffer;this.messageBuffer=[];let t=this.isEndOfStream;return{getMessages(){return e},isEndOfStream(){return t}}}encode({headers:e,body:t}){let r=this.headerMarshaller.format(e),n=r.byteLength+t.byteLength+16,s=new Uint8Array(n),a=new DataView(s.buffer,s.byteOffset,s.byteLength),l=new j.Crc32;return a.setUint32(0,n,!1),a.setUint32(4,r.byteLength,!1),a.setUint32(8,l.update(s.subarray(0,8)).digest(),!1),s.set(r,12),s.set(t,r.byteLength+12),a.setUint32(n-4,l.update(s.subarray(8,n-4)).digest(),!1),s}decode(e){let{headers:t,body:r}=se(e);return{headers:this.headerMarshaller.parse(t),body:r}}formatHeaders(e){return this.headerMarshaller.format(e)}}function H(e){let t=0,r=0,n=null,s=null,a=(i)=>{if(typeof i!=="number")throw Error("Attempted to allocate an event message where size was not a number: "+i);t=i,r=4,n=new Uint8Array(i),new DataView(n.buffer).setUint32(0,i,!1)},l=async function*(){let i=e[Symbol.asyncIterator]();while(!0){let{value:f,done:h}=await i.next();if(h){if(!t)return;else if(t===r)yield n;else throw Error("Truncated event message received.");return}let u=f.length,o=0;while(o<u){if(!n){let m=u-o;if(!s)s=new Uint8Array(4);let y=Math.min(4-r,m);if(s.set(f.slice(o,o+y),r),r+=y,o+=y,r<4)break;a(new DataView(s.buffer).getUint32(0,!1)),s=null}let c=Math.min(t-r,u-o);if(n.set(f.slice(o,o+c),r),r+=c,o+=c,t&&t===r)yield n,n=null,t=0,r=0}}};return{[Symbol.asyncIterator]:l}}function ne(e,t){let r=C(t.deserializer,t.toUtf8);return{[Symbol.asyncIterator]:async function*(){for await(let n of e){let s=t.eventStreamCodec.decode(n),a=await r(s);if(a===void 0)continue;yield a}}}}function C(e,t){return async function(r){let{value:n}=r.headers[":message-type"];if(n==="error"){let s=Error(r.headers[":error-message"].value||"UnknownError");throw s.name=r.headers[":error-code"].value,s}else if(n==="exception"){let s=r.headers[":exception-type"].value,a={[s]:r},l=await e(a);if(l.$unknown){let i=Error(t(r.body));throw i.name=s,i}throw l[s]}else if(n==="event"){let s={[r.headers[":event-type"].value]:r},a=await e(s);if(a.$unknown)return;return a}else throw Error(`Unrecognizable event type: ${r.headers[":event-type"].value}`)}}class N{universalMarshaller;constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new O({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){let r=typeof e[Symbol.asyncIterator]==="function"?e:ie(e);return this.universalMarshaller.deserialize(r,t)}serialize(e,t){return R.Readable.from(this.universalMarshaller.serialize(e,t))}}async function*ie(e){let t=!1,r=!1,n=[];e.on("error",(s)=>{if(!t)t=!0;if(s)throw s}),e.on("data",(s)=>{n.push(s)}),e.on("end",()=>{t=!0});while(!r){let s=await new Promise((a)=>setTimeout(()=>a(n.shift()),0));if(s)yield s;r=t&&n.length===0}}class K{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:e,serializer:t,deserializer:r,serdeContext:n,defaultContentType:s}){this.marshaller=e,this.serializer=t,this.deserializer=r,this.serdeContext=n,this.defaultContentType=s}async serializeEventStream({eventStream:e,requestSchema:t,initialRequest:r}){let n=this.marshaller,s=t.getEventStreamMember(),a=t.getMemberSchema(s),l=this.serializer,i=this.defaultContentType,f=Symbol("initialRequestMarker"),h={async*[Symbol.asyncIterator](){if(r){let u={":event-type":{type:"string",value:"initial-request"},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:i}};l.write(t,r);let o=l.flush();yield{[f]:!0,headers:u,body:o}}for await(let u of e)yield u}};return n.serialize(h,(u)=>{if(u[f])return{headers:u.headers,body:u.body};let o="";for(let d in u)if(d!=="__type"){o=d;break}let{additionalHeaders:c,body:m,eventType:y,explicitPayloadContentType:g}=this.writeEventBody(o,a,u);return{headers:{":event-type":{type:"string",value:y},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:g??i},...c},body:m}})}async deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:r}){let n=this.marshaller,s=t.getEventStreamMember(),l=t.getMemberSchema(s).getMemberSchemas(),i=Symbol("initialResponseMarker"),f=n.deserialize(e.body,async(o)=>{let c="";for(let y in o)if(y!=="__type"){c=y;break}let m=o[c].body;if(c==="initial-response"){let y=await this.deserializer.read(t,m);return delete y[s],{[i]:!0,...y}}else if(c in l){let y=l[c];if(y.isStructSchema()){let g={},w=!1;for(let[d,U]of y.structIterator()){let{eventHeader:$,eventPayload:G}=U.getMergedTraits();if(w=w||Boolean($||G),G){if(U.isBlobSchema())g[d]=m;else if(U.isStringSchema())g[d]=(this.serdeContext?.utf8Encoder??b.toUtf8)(m);else if(U.isStructSchema())g[d]=await this.deserializer.read(U,m)}else if($){let v=o[c].headers[d]?.value;if(v!=null)if(U.isNumericSchema())if(v&&typeof v==="object"&&"bytes"in v)g[d]=BigInt(v.toString());else g[d]=Number(v);else g[d]=v}}if(w)return{[c]:g};if(m.byteLength===0)return{[c]:{}}}return{[c]:await this.deserializer.read(y,m)}}else return{$unknown:o}}),h=f[Symbol.asyncIterator](),u=await h.next();if(u.done)return f;if(u.value?.[i]){if(!t)throw Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");for(let o in u.value)r[o]=u.value[o]}return{async*[Symbol.asyncIterator](){if(!u?.value?.[i])yield u.value;while(!0){let{done:o,value:c}=await h.next();if(o)break;yield c}}}}writeEventBody(e,t,r){let n=this.serializer,s=e,a=null,l,i=(()=>{return t.getSchema()[4].includes(e)})(),f={};if(!i){let[o,c]=r[e];s=o,n.write(15,c)}else{let o=t.getMemberSchema(e);if(o.isStructSchema()){for(let[c,m]of o.structIterator()){let{eventHeader:y,eventPayload:g}=m.getMergedTraits();if(g)a=c;else if(y){let w=r[e][c],d="binary";if(m.isNumericSchema())if(-2147483648<=w&&w<=2147483647)d="integer";else d="long";else if(m.isTimestampSchema())d="timestamp";else if(m.isStringSchema())d="string";else if(m.isBooleanSchema())d="boolean";if(w!=null)f[c]={type:d,value:w},delete r[e][c]}}if(a!==null){let c=o.getMemberSchema(a);if(c.isBlobSchema())l="application/octet-stream";else if(c.isStringSchema())l="text/plain";n.write(c,r[e][a])}else n.write(o,r[e])}else if(o.isUnitSchema())n.write(o,{});else throw Error("@smithy/core/event-streams - non-struct member not supported in event stream union.")}let h=n.flush()??new Uint8Array;return{body:typeof h==="string"?(this.serdeContext?.utf8Decoder??b.fromUtf8)(h):h,eventType:s,explicitPayloadContentType:l,additionalHeaders:f}}}var j,b,R,L,F="boolean",X="byte",Z="short",V="integer",D="long",E="binary",_="string",Y="timestamp",ee="uuid",te,q=4,p,S=4,re,k,B,T,z,O=class{eventStreamCodec;utfEncoder;constructor({utf8Encoder:t,utf8Decoder:r}){this.eventStreamCodec=new x(t,r),this.utfEncoder=t}deserialize(t,r){let n=H(t);return new T({messageStream:new k({inputStream:n,decoder:this.eventStreamCodec}),deserializer:C(r,this.utfEncoder)})}serialize(t,r){return new B({messageStream:new z({inputStream:t,serializer:r}),encoder:this.eventStreamCodec,includeEndFrame:!0})}},ae=(e)=>new O(e),oe=(e)=>new N(e),ce=(e)=>({[Symbol.asyncIterator]:async function*(){let t=e.getReader();try{while(!0){let{done:r,value:n}=await t.read();if(r)return;yield n}}finally{t.releaseLock()}}}),le=(e)=>{let t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(r){let{done:n,value:s}=await t.next();if(n)return r.close();r.enqueue(s)}})},ue=(e)=>Object.assign(e,{eventStreamMarshaller:e.eventStreamSerdeProvider(e)}),fe,ye,de,me,he,ge,we,be,pe,ve,Se,Ue,Me,Ie,xe,ke,Be,Te;var ze=W(()=>{j=P(),b=Q(),R=J("stream");(function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"})(L||(L={}));te=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,p=q*2,re=p+S*2;k=class k{options;constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let e of this.options.inputStream)yield this.options.decoder.decode(e)}};B=class B{options;constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let e of this.options.messageStream)yield this.options.encoder.encode(e);if(this.options.includeEndFrame)yield new Uint8Array(0)}};T=class T{options;constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let e of this.options.messageStream){let t=await this.options.deserializer(e);if(t===void 0)continue;yield t}}};z=class z{options;constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let e of this.options.inputStream)yield this.options.serializer(e)}};fe=x,ye=N,de=K,me=I,he=M,ge=k,we=B,be=T,pe=z,ve=O,Se=oe,Ue=H,Me=C,Ie=ne,xe=le,ke=ce,Be=ue,Te=ae});ze();export{Te as universalEventStreamSerdeProvider,Be as resolveEventStreamSerdeConfig,ke as readableStreamToIterable,xe as iterableToReadableStream,Ie as getUnmarshalledStream,Me as getMessageUnmarshaller,Ue as getChunkedStream,Se as eventStreamSerdeProvider,ve as UniversalEventStreamMarshaller,pe as SmithyMessageEncoderStream,be as SmithyMessageDecoderStream,we as MessageEncoderStream,ge as MessageDecoderStream,he as Int64,me as HeaderMarshaller,de as EventStreamSerde,ye as EventStreamMarshaller,fe as EventStreamCodec};export default {get universalEventStreamSerdeProvider(){return Te},get resolveEventStreamSerdeConfig(){return Be},get readableStreamToIterable(){return ke},get iterableToReadableStream(){return xe},get getUnmarshalledStream(){return Ie},get getMessageUnmarshaller(){return Me},get getChunkedStream(){return Ue},get eventStreamSerdeProvider(){return Se},get UniversalEventStreamMarshaller(){return ve},get SmithyMessageEncoderStream(){return pe},get SmithyMessageDecoderStream(){return be},get MessageEncoderStream(){return we},get MessageDecoderStream(){return ge},get Int64(){return he},get HeaderMarshaller(){return me},get EventStreamSerde(){return de},get EventStreamMarshaller(){return ye},get EventStreamCodec(){return fe}};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Fd as n,Id as p,Jd as e,Kd as i,Nd as m,Od as c}from"./chunk-p62gb4wj.js";import{pH as o,uB as s}from"./chunk-zs8kqdsf.js";var u=(t)=>o.sync(()=>e(t)),g=(t)=>o.sync(()=>i(t)),y={info:(t)=>o.sync(()=>p.info(t))},x=(t)=>o.tryPromise(()=>c(t)).pipe(o.map((r)=>{if(n(r))return s.none();return s.some(r)})),V=()=>{let t=m();return{start:(r)=>o.sync(()=>t.start(r)),stop:(r,a)=>o.sync(()=>t.stop(r,a))}};
2
+ import{Fd as n,Id as p,Jd as e,Kd as i,Nd as m,Od as c}from"./chunk-x66ycpfs.js";import{OI as o,TC as s}from"./chunk-a0rp7gh4.js";var u=(t)=>o.sync(()=>e(t)),g=(t)=>o.sync(()=>i(t)),y={info:(t)=>o.sync(()=>p.info(t))},x=(t)=>o.tryPromise(()=>c(t)).pipe(o.map((r)=>{if(n(r))return s.none();return s.some(r)})),V=()=>{let t=m();return{start:(r)=>o.sync(()=>t.start(r)),stop:(r,a)=>o.sync(()=>t.stop(r,a))}};
3
3
  export{u as i,g as j,y as k,x as l,V as m};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{FO as U}from"./chunk-7xm75w1e.js";import{dlopen as S,FFIType as x,ptr as M}from"bun:ffi";import{Buffer as G}from"buffer";class O{listeners=[];event=(z)=>{return this.listeners.push(z),{dispose:()=>{let H=this.listeners.indexOf(z);if(H!==-1)this.listeners.splice(H,1)}}};fire(z){for(let H of this.listeners)H(z)}}import{join as Y,dirname as R,basename as L}from"path";import{existsSync as j}from"fs";var k=80,N=24,_="sh",B="xterm";function P(z){if(z.length===0)return"''";return`'${z.replace(/'/g,"'\\''")}'`}function v(){let z=process.env.BUN_PTY_LIB;if(z&&j(z))return z;try{let q=U(`../rust-pty/target/release/${process.platform==="win32"?"rust_pty.dll":process.platform==="darwin"?process.arch==="arm64"?"librust_pty_arm64.dylib":"librust_pty.dylib":process.arch==="arm64"?"librust_pty_arm64.so":"librust_pty.so"}`);if(q)return q}catch{}let{platform:H,arch:J}=process,X=H==="darwin"?J==="arm64"?["librust_pty_arm64.dylib","librust_pty.dylib"]:["librust_pty.dylib"]:H==="win32"?["rust_pty.dll"]:J==="arm64"?["librust_pty_arm64.so","librust_pty.so"]:["librust_pty.so"],V=Bun.fileURLToPath(import.meta.url),$=R(V),W=L($),K=W==="src"||W==="dist"?R($):$,w=[Y(K,"rust-pty","target","release"),Y(K,"..","bun-pty","rust-pty","target","release"),Y(process.cwd(),"node_modules","bun-pty","rust-pty","target","release")],C=[];for(let q of w)for(let A of X)C.push(Y(q,A));for(let q of C)if(j(q))return q;throw Error(`librust_pty shared library not found.
2
+ import{cQ as U}from"./chunk-3k2b05fv.js";import{dlopen as S,FFIType as x,ptr as M}from"bun:ffi";import{Buffer as G}from"buffer";class O{listeners=[];event=(z)=>{return this.listeners.push(z),{dispose:()=>{let H=this.listeners.indexOf(z);if(H!==-1)this.listeners.splice(H,1)}}};fire(z){for(let H of this.listeners)H(z)}}import{join as Y,dirname as R,basename as L}from"path";import{existsSync as j}from"fs";var k=80,N=24,_="sh",B="xterm";function P(z){if(z.length===0)return"''";return`'${z.replace(/'/g,"'\\''")}'`}function v(){let z=process.env.BUN_PTY_LIB;if(z&&j(z))return z;try{let q=U(`../rust-pty/target/release/${process.platform==="win32"?"rust_pty.dll":process.platform==="darwin"?process.arch==="arm64"?"librust_pty_arm64.dylib":"librust_pty.dylib":process.arch==="arm64"?"librust_pty_arm64.so":"librust_pty.so"}`);if(q)return q}catch{}let{platform:H,arch:J}=process,X=H==="darwin"?J==="arm64"?["librust_pty_arm64.dylib","librust_pty.dylib"]:["librust_pty.dylib"]:H==="win32"?["rust_pty.dll"]:J==="arm64"?["librust_pty_arm64.so","librust_pty.so"]:["librust_pty.so"],V=Bun.fileURLToPath(import.meta.url),$=R(V),W=L($),K=W==="src"||W==="dist"?R($):$,w=[Y(K,"rust-pty","target","release"),Y(K,"..","bun-pty","rust-pty","target","release"),Y(process.cwd(),"node_modules","bun-pty","rust-pty","target","release")],C=[];for(let q of w)for(let A of X)C.push(Y(q,A));for(let q of C)if(j(q))return q;throw Error(`librust_pty shared library not found.
3
3
  Checked:
4
4
  - BUN_PTY_LIB=${z??"<unset>"}
5
5
  - ${C.join(`
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{$h as m5,Ah as vV,Ch as G$,Eh as iJ,Fh as dV,Gh as Q$,Ih as _0,Jh as p4,Kh as q5,Lh as P$,Mh as G1,Nh as _4,Oh as v4,Ph as K7,Qh as mV,Rh as GJ,Sh as r9,Th as W0,Uh as h2,Vh as N5,Wh as x5,Xh as w5,Yh as b5,Zh as P6,_h as L5,hh as J8,ih as fV,jh as V8,kh as c$,lh as EV,mh as zQ,nh as j$,oh as y$,ph as RJ,qh as CJ,rh as t4,sh as YQ,th as j1,vh as C5,xh as w6,yh as y1}from"./chunk-ygs5pzk7.js";import{ai as GY}from"./chunk-vxyy2dp3.js";import{Ui as U7}from"./chunk-5hw6xa49.js";import{$j as d8,$k as i9,Ak as D5,Al as E2,Bk as uZ,Bl as v0,Ck as pZ,Cl as J2,Dk as y5,Dl as V2,Hk as S3,Ik as k3,Nk as O5,Wj as u,Wk as F5,Xj as I$,Xk as O2,Zk as P5,_k as z5,bk as h9,ek as u4,fk as yZ,ik as B8,jk as A1,kk as F2,kl as hY,lk as x2,ll as A6,mk as Q2,ml as M2,nl as p8,ok as s6,ol as K2,pk as J$,pl as p2,rl as P2,sl as cV,tk as yJ,tl as p,uk as OJ,ul as xQ,wl as U2,xk as z0,xl as n9,yk as $1,yl as U6,zk as t0,zl as O7}from"./chunk-257me4z3.js";import{Fl as lV}from"./chunk-nkkch4h7.js";import{Ql as e4,Tl as QV,Ul as DZ,Vl as k0,_l as z1,bm as a2,cm as l$,dm as D8,em as R$,fm as j5,im as IJ,jm as U$,lm as S2,mm as v,nm as FV,om as P0,pm as cZ}from"./chunk-s3mnrhbx.js";import{rm as i1,sm as n1,tm as s1,wm as hJ,xm as D2}from"./chunk-ezfy0b6q.js";import{Um as K1,Vm as X0,Wm as t1,Xm as M4,_m as G0,an as kY,gn as TY,hn as gY,jn as vQ,wn as dQ,xn as E8}from"./chunk-bn0h9dny.js";import{Pn as hV}from"./chunk-3nx7112w.js";import{ho as lJ,jo as cJ}from"./chunk-vcw00k0n.js";import{Bo as $0}from"./chunk-we9cv8we.js";import{Fp as t$,Gp as RX,tp as W$,up as cY}from"./chunk-2maqde7w.js";import{gq as FY,hq as JY}from"./chunk-kj20f048.js";import{Bq as B6}from"./chunk-n9xns8by.js";import{Fq as I0,Kq as gV,Lq as u5}from"./chunk-d9hbhkbq.js";import{Nq as E0,Oq as a4,Rq as r4}from"./chunk-ad72gb5f.js";import{br as H$,cr as NJ,ir as KZ,jr as xJ}from"./chunk-d6ry9418.js";import{Sr as w2}from"./chunk-4cnwn1rh.js";import{Ur as M7}from"./chunk-764fksh3.js";import{Ds as H6,Is as MV,Ls as _6,Qs as q$,Rs as L0,Vr as w1,Zr as J5,_s as s,ds as O6,os as V5}from"./chunk-xj765svc.js";import{$s as k5,bt as O$,dt as q4,ht as QJ,kt as gJ,nt as LV,ot as n2,st as V$}from"./chunk-tqj69nh6.js";import{tt as P3}from"./chunk-ag8kz1e7.js";import{ut as q}from"./chunk-5tray1fw.js";import{At as A2,Bt as R7,Ct as cX,Dt as m2,Et as c,Ft as o,Gt as i2,Ht as _2,It as C7,Jt as S7,Kt as T2,Lt as R0,Mt as i,Nt as l2,Ot as YX,Pt as k7,Qt as oX,Rt as uX,St as y2,vt as XX,xt as x,yt as lX,zt as z2}from"./chunk-c11d28qn.js";import{Tt as mX,nu as G9}from"./chunk-mzs2pjyc.js";import{Yy as s4,hz as L7}from"./chunk-gagtmjmp.js";import{EI as i8,JN as c9,LC as F6,LN as d5,MG as HZ,MN as c4,OE as _,QF as _J,QG as jZ,QN as c2,RM as c0,VB as W5,WD as G2,_I as AX,aO as TJ,bE as u2,hF as H8,iE as k2,nF as UJ,oN as K5,pH as Y,pN as G5,qN as H5,rB as B5,rN as m4,tN as E5,uB as Y0,uF as AJ,vN as l4,yE as d2,yN as v5,zC as Z2,zF as MJ}from"./chunk-zs8kqdsf.js";import{BO as J9,DO as L2,FO as K$,GO as mY,HO as lY}from"./chunk-7xm75w1e.js";var y0={};L2(y0,{layer:()=>lZ,defaultLayer:()=>YB,SessionStatus:()=>y0,Service:()=>X6,Info:()=>mZ,Event:()=>y7});var mZ=q.union([q.object({type:q.literal("idle")}),q.object({type:q.literal("retry"),attempt:q.number(),message:q.string(),next:q.number()}),q.object({type:q.literal("busy"),message:q.string().optional()})]).meta({ref:"SessionStatus"}),y7={Status:D2.define("session.status",q.object({sessionID:F2.zod,status:mZ})),Idle:D2.define("session.idle",q.object({sessionID:F2.zod}))};class X6 extends Z2.Service()("@qitqode/SessionStatus"){}var lZ=_.effect(X6,Y.gen(function*(){let $=yield*u.Service,Z=yield*v.make(Y.fn("SessionStatus.state")(()=>Y.succeed(new Map))),X=Y.fn("SessionStatus.get")(function*(V){return(yield*v.get(Z)).get(V)??{type:"idle"}}),Q=Y.fn("SessionStatus.list")(function*(){return new Map(yield*v.get(Z))}),J=Y.fn("SessionStatus.set")(function*(V,B){let D=yield*v.get(Z);if(yield*$.publish(y7.Status,{sessionID:V,status:B}),B.type==="idle"){yield*$.publish(y7.Idle,{sessionID:V}),D.delete(V);return}D.set(V,B)});return X6.of({get:X,list:Q,set:J})})),YB=lZ.pipe(_.provide(u.layer));var O0={};L2(O0,{layer:()=>oZ,defaultLayer:()=>QB,SessionRunState:()=>O0,Service:()=>Q6});class Q6 extends Z2.Service()("@qitqode/SessionRunState"){}var Y6=($,Z)=>`${$}:${Z}`,oZ=_.effect(Q6,Y.gen(function*(){let $=yield*y0.Service,Z=E0.create({service:"SessionRunState"}),X=yield*v.make(Y.fn("SessionRunState.state")(function*(){let W=yield*d2.Scope,K=new Map;return yield*Y.addFinalizer(Y.fnUntraced(function*(){yield*Y.forEach(K.values(),(j)=>j.cancel,{concurrency:8,discard:!0}),K.clear()})),{runners:K,scope:W}})),Q=Y.fn("SessionRunState.runner")(function*(W,K,j){let G=Y6(W,K),z=yield*v.get(X),O=z.runners.get(G);if(O)return O;let P=K==="main",w=cZ.make(z.scope,{label:G,onReentryWarn:(L)=>Z.warn("runner-reentry",L),onIdle:P?Y.gen(function*(){z.runners.delete(G),yield*$.set(W,{type:"idle"})}):Y.sync(()=>{z.runners.delete(G)}),onBusy:P?$.set(W,{type:"busy"}):Y.void,onInterrupt:j,busy:()=>{throw new O7(W)}});return z.runners.set(G,w),w}),J=Y.fn("SessionRunState.assertNotBusy")(function*(W){if((yield*v.get(X)).runners.get(Y6(W,"main"))?.busy)throw new O7(W)}),V=Y.fn("SessionRunState.cancel")(function*(W){let K=Y6(W,"main"),G=(yield*v.get(X)).runners.get(K);if(!G||!G.busy){yield*$.set(W,{type:"idle"});return}yield*G.cancel}),B=Y.fn("SessionRunState.cancelActor")(function*(W,K){let j=Y6(W,K),z=(yield*v.get(X)).runners.get(j);if(!z||!z.busy)return;yield*z.cancel}),D=Y.fn("SessionRunState.ensureRunning")(function*(W,K,j,G){return yield*(yield*Q(W,K,j)).ensureRunning(G)}),H=Y.fn("SessionRunState.startShell")(function*(W,K,j){return yield*(yield*Q(W,"main",K)).startShell(j)});return Q6.of({assertNotBusy:J,cancel:V,cancelActor:B,ensureRunning:D,startShell:H})})),QB=oZ.pipe(_.provide(y0.defaultLayer));var F0={};L2(F0,{parseVerdictFromCompletion:()=>BB,layer:()=>iZ,defaultLayer:()=>VB,Verdict:()=>r$,Service:()=>V6,Goal:()=>F0,Event:()=>P7});var r$=q.object({ok:q.boolean(),impossible:q.boolean().optional(),reason:q.string()}),P7={Updated:D2.define("session.goal",q.object({sessionID:F2.zod,goal:q.object({condition:q.string()}).optional(),lastVerdict:r$.extend({attempt:q.number(),messageID:q.string().optional(),error:q.boolean().optional()}).optional()}))},J6=`You are evaluating a stop-condition hook in QitQode. Read the conversation transcript carefully, then judge whether the user-provided condition is satisfied.
2
+ import{$h as m5,Ah as vV,Ch as G$,Eh as iJ,Fh as dV,Gh as Q$,Ih as _0,Jh as p4,Kh as q5,Lh as P$,Mh as G1,Nh as _4,Oh as v4,Ph as K7,Qh as mV,Rh as GJ,Sh as r9,Th as W0,Uh as h2,Vh as N5,Wh as x5,Xh as w5,Yh as b5,Zh as P6,_h as L5,hh as J8,ih as fV,jh as V8,kh as c$,lh as EV,mh as zQ,nh as j$,oh as y$,ph as RJ,qh as CJ,rh as t4,sh as YQ,th as j1,vh as C5,xh as w6,yh as y1}from"./chunk-w9nzsd3w.js";import{ai as GY}from"./chunk-zfcp509b.js";import{Ui as U7}from"./chunk-md8161zd.js";import{$j as d8,$k as i9,Ak as D5,Al as E2,Bk as uZ,Bl as v0,Ck as pZ,Cl as J2,Dk as y5,Dl as V2,Hk as S3,Ik as k3,Nk as O5,Wj as u,Wk as F5,Xj as I$,Xk as O2,Zk as P5,_k as z5,bk as h9,ek as u4,fk as yZ,ik as B8,jk as A1,kk as F2,kl as hY,lk as x2,ll as A6,mk as Q2,ml as M2,nl as p8,ok as s6,ol as K2,pk as J$,pl as p2,rl as P2,sl as cV,tk as yJ,tl as p,uk as OJ,ul as xQ,wl as U2,xk as z0,xl as n9,yk as $1,yl as U6,zk as t0,zl as O7}from"./chunk-wmaz57f6.js";import{Fl as lV}from"./chunk-hg0etbkx.js";import{Ql as e4,Tl as QV,Ul as DZ,Vl as k0,_l as z1,bm as a2,cm as l$,dm as D8,em as R$,fm as j5,im as IJ,jm as U$,lm as S2,mm as v,nm as FV,om as P0,pm as cZ}from"./chunk-za63b5mc.js";import{rm as i1,sm as n1,tm as s1,wm as hJ,xm as D2}from"./chunk-j8q252w3.js";import{An as K1,Bn as X0,Cn as t1,Dn as M4,Gn as G0,In as kY,On as TY,Pn as gY,Rn as vQ,co as dQ,do as E8}from"./chunk-nj4d554m.js";import{mp as hV}from"./chunk-y370dqf3.js";import{Gp as lJ,Ip as cJ}from"./chunk-keveg5gx.js";import{_p as $0}from"./chunk-8eje5baf.js";import{Sq as W$,Tq as cY,cr as t$,dr as RX}from"./chunk-z8gdmvgg.js";import{Fr as FY,Gr as JY}from"./chunk-kwx9ewe0.js";import{_r as B6}from"./chunk-a48t0g95.js";import{cs as I0,hs as gV,is as u5}from"./chunk-wwgd4rzx.js";import{ks as E0,ls as a4,os as r4}from"./chunk-qc3ce3vc.js";import{As as H$,Bs as NJ,Hs as KZ,Is as xJ}from"./chunk-6p94fpbn.js";import{pt as w2}from"./chunk-kv72hxkp.js";import{rt as M7}from"./chunk-vkqzmzpw.js";import{Ct as O6,Nt as V5,au as H6,fu as MV,iu as _6,nu as q$,ou as L0,st as w1,wt as J5,xu as s}from"./chunk-x9s90xd1.js";import{Au as O$,Cu as q4,Gu as QJ,Ju as gJ,Mu as LV,Nu as n2,Ru as V$,yu as k5}from"./chunk-e7v9trve.js";import{Su as P3}from"./chunk-zh3fny3z.js";import{Tu as q}from"./chunk-m4j7jyrd.js";import{$u as cX,Uu as XX,Wu as x,Xu as lX,Yu as z2,Zu as A2,_u as R7,av as m2,bv as c,cv as o,dv as i2,ev as _2,fv as C7,gv as S7,hv as T2,iv as R0,jv as i,kv as l2,lv as YX,mv as k7,nv as oX,ov as uX,pv as y2}from"./chunk-gmzrvxnv.js";import{Mv as G9,qv as mX}from"./chunk-mpygdb5a.js";import{GA as L7,vA as s4}from"./chunk-wfd5h6ax.js";import{AF as u2,GG as H8,HF as k2,MG as UJ,NO as K5,OI as Y,OO as G5,PO as H5,QC as B5,QO as m4,SO as E5,TC as Y0,TG as AJ,UO as l4,XF as d2,XO as v5,YD as Z2,YG as MJ,bK as i8,gP as c9,iE as F6,iP as d5,jI as HZ,jP as c4,lG as _,nH as _J,nI as jZ,nP as c2,oO as c0,sD as W5,tF as G2,xK as AX,zP as TJ}from"./chunk-a0rp7gh4.js";import{_P as J9,aQ as L2,cQ as K$,dQ as mY,eQ as lY}from"./chunk-3k2b05fv.js";var y0={};L2(y0,{layer:()=>lZ,defaultLayer:()=>YB,SessionStatus:()=>y0,Service:()=>X6,Info:()=>mZ,Event:()=>y7});var mZ=q.union([q.object({type:q.literal("idle")}),q.object({type:q.literal("retry"),attempt:q.number(),message:q.string(),next:q.number()}),q.object({type:q.literal("busy"),message:q.string().optional()})]).meta({ref:"SessionStatus"}),y7={Status:D2.define("session.status",q.object({sessionID:F2.zod,status:mZ})),Idle:D2.define("session.idle",q.object({sessionID:F2.zod}))};class X6 extends Z2.Service()("@qitqode/SessionStatus"){}var lZ=_.effect(X6,Y.gen(function*(){let $=yield*u.Service,Z=yield*v.make(Y.fn("SessionStatus.state")(()=>Y.succeed(new Map))),X=Y.fn("SessionStatus.get")(function*(V){return(yield*v.get(Z)).get(V)??{type:"idle"}}),Q=Y.fn("SessionStatus.list")(function*(){return new Map(yield*v.get(Z))}),J=Y.fn("SessionStatus.set")(function*(V,B){let D=yield*v.get(Z);if(yield*$.publish(y7.Status,{sessionID:V,status:B}),B.type==="idle"){yield*$.publish(y7.Idle,{sessionID:V}),D.delete(V);return}D.set(V,B)});return X6.of({get:X,list:Q,set:J})})),YB=lZ.pipe(_.provide(u.layer));var O0={};L2(O0,{layer:()=>oZ,defaultLayer:()=>QB,SessionRunState:()=>O0,Service:()=>Q6});class Q6 extends Z2.Service()("@qitqode/SessionRunState"){}var Y6=($,Z)=>`${$}:${Z}`,oZ=_.effect(Q6,Y.gen(function*(){let $=yield*y0.Service,Z=E0.create({service:"SessionRunState"}),X=yield*v.make(Y.fn("SessionRunState.state")(function*(){let W=yield*d2.Scope,K=new Map;return yield*Y.addFinalizer(Y.fnUntraced(function*(){yield*Y.forEach(K.values(),(j)=>j.cancel,{concurrency:8,discard:!0}),K.clear()})),{runners:K,scope:W}})),Q=Y.fn("SessionRunState.runner")(function*(W,K,j){let G=Y6(W,K),z=yield*v.get(X),O=z.runners.get(G);if(O)return O;let P=K==="main",w=cZ.make(z.scope,{label:G,onReentryWarn:(L)=>Z.warn("runner-reentry",L),onIdle:P?Y.gen(function*(){z.runners.delete(G),yield*$.set(W,{type:"idle"})}):Y.sync(()=>{z.runners.delete(G)}),onBusy:P?$.set(W,{type:"busy"}):Y.void,onInterrupt:j,busy:()=>{throw new O7(W)}});return z.runners.set(G,w),w}),J=Y.fn("SessionRunState.assertNotBusy")(function*(W){if((yield*v.get(X)).runners.get(Y6(W,"main"))?.busy)throw new O7(W)}),V=Y.fn("SessionRunState.cancel")(function*(W){let K=Y6(W,"main"),G=(yield*v.get(X)).runners.get(K);if(!G||!G.busy){yield*$.set(W,{type:"idle"});return}yield*G.cancel}),B=Y.fn("SessionRunState.cancelActor")(function*(W,K){let j=Y6(W,K),z=(yield*v.get(X)).runners.get(j);if(!z||!z.busy)return;yield*z.cancel}),D=Y.fn("SessionRunState.ensureRunning")(function*(W,K,j,G){return yield*(yield*Q(W,K,j)).ensureRunning(G)}),H=Y.fn("SessionRunState.startShell")(function*(W,K,j){return yield*(yield*Q(W,"main",K)).startShell(j)});return Q6.of({assertNotBusy:J,cancel:V,cancelActor:B,ensureRunning:D,startShell:H})})),QB=oZ.pipe(_.provide(y0.defaultLayer));var F0={};L2(F0,{parseVerdictFromCompletion:()=>BB,layer:()=>iZ,defaultLayer:()=>VB,Verdict:()=>r$,Service:()=>V6,Goal:()=>F0,Event:()=>P7});var r$=q.object({ok:q.boolean(),impossible:q.boolean().optional(),reason:q.string()}),P7={Updated:D2.define("session.goal",q.object({sessionID:F2.zod,goal:q.object({condition:q.string()}).optional(),lastVerdict:r$.extend({attempt:q.number(),messageID:q.string().optional(),error:q.boolean().optional()}).optional()}))},J6=`You are evaluating a stop-condition hook in QitQode. Read the conversation transcript carefully, then judge whether the user-provided condition is satisfied.
3
3
 
4
4
  Your response must be a JSON object with one of these shapes:
5
5
  - {"ok": true, "reason": "<quote evidence from the transcript that satisfies the condition>"}
@@ -508,7 +508,7 @@ If you repeat the same output again, the session will be terminated.
508
508
  `)})});function hQ($){if(!$.lastFinished)return;let Z=[];for(let J=$.msgs.length-1;J>=0&&Z.length<t9;J--){let V=$.msgs[J];if(V.info.role!=="assistant"||!V.info.finish)continue;let B=f8(V.parts);if(B===void 0)break;Z.push(B)}if(!(Z.length===t9&&Z.every((J)=>J===Z[0])))return;let Q=$.msgs.findLast((J)=>J.info.role==="user");if(!Q||Q.parts.some((J)=>J.type==="text"&&J.text?.includes("repeating the same action")))return;Q.parts.push({id:Q2.ascending(),messageID:Q.info.id,sessionID:$.sessionID,type:"text",synthetic:!0,text:["<system-reminder>",`Your last ${t9} steps have been identical \u2014 you appear to be`,"repeating the same action without making progress. Stop and reconsider:","the current approach is not working. Try a different strategy, use a","different tool, or if you are blocked, explain the blocker to the user","instead of repeating the same step again.","</system-reminder>"].join(`
509
509
  `)})}var e9=s.create({service:"auto-dream"}),$Z=86400000,eK=7,$G=30,mQ=1e4,ZZ="Auto Dream",XZ="Auto Distill",fQ=0,EQ=0,lQ=["Run one automatic dream memory consolidation pass for the current project.","","Use the memory files as the working index and the raw qitqode trajectory database as the source of truth.","Use bash for read-only SQLite and filesystem inspection. Do not modify the database.","Consolidate only durable, verified information into project memory."].join(`
510
510
  `),cQ=["Run one automatic distill pass for the current project.","","Review the past month of sessions and identify repeated manual workflows worth packaging.","Use the raw qitqode trajectory database as the source of truth and memory files to spot cross-session patterns.","Inventory existing skills, agents, and commands first so you reuse or extend instead of duplicating.","Use bash for read-only SQLite and filesystem inspection. Do not modify the database.","Produce a compact shortlist, then create only the high-confidence missing assets."].join(`
511
- `);function oQ($){return Y.gen(function*(){if(!$.enabled)return!1;let Z=$.intervalDays*$Z,X=yield*Y.sync(()=>a2.use((V)=>V.select({time_created:k0.time_created}).from(k0).where(G0(k0.title,$.title)).orderBy(E8(k0.time_created)).limit(1).get())),Q=Date.now(),J=X?Q-X.time_created:1/0;if(!X){let V=yield*Y.sync(()=>a2.use((B)=>B.select({time_created:k0.time_created}).from(k0).where(vQ(k0.parent_id)).orderBy(dQ(k0.time_created)).limit(1).get()));if(!V||Q-V.time_created<Z)return e9.info(`auto-${$.label} skipped \u2014 project too young`,{projectAge:V?Math.round((Q-V.time_created)/$Z)+"d":"empty",interval:$.intervalDays+"d"}),!1}if(J<Z)return e9.info(`auto-${$.label} skipped \u2014 last run too recent`,{lastRunAgo:Math.round(J/$Z)+"d",interval:$.intervalDays+"d"}),!1;return e9.info(`auto-${$.label} triggering`,{lastRun:X?new Date(X.time_created).toISOString():"never",interval:$.intervalDays+"d"}),!0})}function uQ($){let Z=$.dream?.auto!==!1;if(!Z)return Y.succeed(!1);let X=Date.now();if(X-fQ<mQ)return Y.succeed(!1);fQ=X;let Q=$.dream?.interval_days??eK;return oQ({enabled:Z,intervalDays:Q,title:ZZ,label:"dream"})}function pQ($){let Z=$.distill?.auto!==!1;if(!Z)return Y.succeed(!1);let X=Date.now();if(X-EQ<mQ)return Y.succeed(!1);EQ=X;let Q=$.distill?.interval_days??$G;return oQ({enabled:Z,intervalDays:Q,title:XZ,label:"distill"})}var iQ=Y.fnUntraced(function*($){let Z=yield*$.config.get(),X=yield*uQ(Z).pipe(Y.catch(()=>Y.succeed(!1))),Q=yield*pQ(Z).pipe(Y.catch(()=>Y.succeed(!1))),J={providerID:$.lastUser.model.providerID,modelID:$.lastUser.model.modelID};if(!X&&!Q)return;let{AppRuntime:V}=yield*Y.promise(()=>import("./chunk-k5atbdbm.js"));if(X)V.runPromise(E2.use((B)=>Y.gen(function*(){let D=yield*B.create({title:ZZ});yield*(yield*$.promptServiceTag).prompt({sessionID:D.id,agent:"dream",model:J,parts:[{type:"text",text:lQ}]})}))).catch((B)=>$.log.error("auto-dream prompt failed",{error:String(B)}));if(Q)V.runPromise(E2.use((B)=>Y.gen(function*(){let D=yield*B.create({title:XZ});yield*(yield*$.promptServiceTag).prompt({sessionID:D.id,agent:"distill",model:J,parts:[{type:"text",text:cQ}]})}))).catch((B)=>$.log.error("auto-distill prompt failed",{error:String(B)}))});var XG=($)=>$.pipe(Y.catchDefect((Z)=>Z instanceof $0.BackendAuthRejectedError?Y.succeed(void 0):Y.die(Z))),YZ=($)=>XG(Y.promise(()=>$0.resolvePrompt($))).pipe(Y.map((Z)=>Z??"")),nQ=Y.gen(function*(){let $=yield*YZ("session/build-switch"),Z=yield*YZ("session/max-steps"),X=yield*YZ("session/compose");return{buildSwitch:$,maxSteps:Z,promptCompose:X}});var sQ=E0.create({service:"session.prompt"}),YG=s.create({service:"session.prompt"});function aQ($,Z,X,Q){return Y.gen(function*(){let{bus:J,status:V,sessions:B,agents:D,provider:H,processor:W,prune:K,checkpoint:j,compaction:G,config:z,plugin:O,permission:P,fsys:w,registry:L,scope:F,instruction:U,state:y,goal:S,taskGateState:I,taskRegistry:M,revert:f,summary:b,sys:k,llm:h,actorRegistry:N,inbox:A}=yield*S4,R=yield*nQ,C=R.buildSwitch,T=R.maxSteps,l=R.promptCompose,d=(t,N2,j2)=>DQ(H,J,t,N2,j2),g=(t,N2)=>OQ(B,t,N2),E=a9(B),m=1024,e=new class extends Set{add(t){if(super.add(t),this.size>1024){let N2=this.values().next().value;if(N2!==void 0)this.delete(N2)}return this}},n=(t)=>o9({getOps:$,...t}),a=qQ({agents:D,provider:H,llm:h,sessions:B,elog:sQ}),H2=NQ({sessions:B,fsys:w,buildSwitch:C,promptCompose:l});return{runLoop:Y.fn("SessionPrompt.run")(function*(t,N2,j2){let g0=yield*v.context,R2=sQ.with({sessionID:t}),X2,q2=0,b2=yield*B.get(t),r2,w0,D0=N2??"main",p0=GQ({sessionID:t,agentID:D0,task_id:j2,plugin:O,bus:J,prune:K,scope:F}),{cancellation:h0,agentMetrics:M$,publishAgentRequest:i0,schedulePrune:n0}=p0,N1=KQ({sessionID:t,agentID:D0,task_id:j2,session:b2,cancellation:h0,plugin:O});return yield*Y.gen(function*(){yield*p0.before;let s0=(t2,Y2)=>g4(sY(t2,Y2,p.parts(Y2.id))),s$=!1,K8=kQ({sessionID:t,bus:J,appendSyntheticUserTurn:E,slog:R2}),f0=SQ({sessionID:t,sessions:B,bus:J,appendSyntheticUserTurn:E,slog:R2}),{autoContinueOutputLength:G8,autoContinueInvalidOutput:_Z,autoRetryStructuredOutput:oV,handleTextRepeat:uV,writeContentFilterError:IZ,writeModelError:RZ}=f0,CZ=FQ({sessionID:t,agentID:N2,agents:D,taskGateState:I,taskRegistry:M,appendSyntheticUserTurn:E,slog:R2}),SZ=PQ({sessionID:t,agentID:N2,session:b2,goal:S,bus:J,appendSyntheticUserTurn:E,slog:R2});while(!0){if(!N2||N2==="main")yield*V.set(t,{type:"busy"});yield*A.drain(t,N2??"main").pipe(Y.ignore),yield*R2.info("loop",{step:q2});let t2=yield*p.filterCompactedEffect(t,{contextFrom:b2.contextFrom,contextWatermark:b2.contextWatermark,agentID:N2??"main"}),Y2,TZ,a0,H7,b0,gZ=[];for(let W2=t2.length-1;W2>=0;W2--){let K0=t2[W2];if(!Y2&&K0.info.role==="user")Y2=K0.info,TZ=K0;if(!a0&&K0.info.role==="assistant")a0=K0.info,H7=K0;if(!b0&&K0.info.role==="assistant"&&K0.info.finish)b0=K0.info;if(Y2&&b0)break;if(!b0){let $6=K0.parts.filter((a$)=>a$.type==="subtask");gZ.push(...$6)}}if(!Y2)throw Error("No user message found in stream. This should never happen.");yield*TQ({sessionID:t,msgs:t2,checkpoint:j,config:z});let nV=H7?.parts.some((W2)=>W2.type==="tool"&&!W2.metadata?.providerExecuted)??!1;if(a0?.finish==="length"&&!nV&&Y2.id<a0.id&&(yield*G8({lastUser:Y2,assistant:a0})))continue;if(a0){let W2=d9({phase:"existing-assistant",lastUser:Y2,assistant:a0,parts:H7?.parts??[]});if(W2.type==="filtered"){yield*IZ({assistant:a0}),yield*R2.info("exiting loop",{classification:W2.type});break}if(W2.type==="failed"){yield*RZ({assistant:a0,reason:W2.reason}),yield*R2.info("exiting loop",{classification:W2.type,reason:W2.reason});break}if(W2.type==="think-only"||W2.type==="invalid"){let K0=W2.type==="invalid"?W2.reason:"think-only";if(yield*_Z({lastUser:Y2,assistant:a0,reason:K0}))continue;yield*R2.info("exiting loop",{classification:W2.type});break}if(W2.type==="final"&&W2.degraded)yield*R2.warn("degraded final on abnormal finish",{finish:a0.finish});if(W2.type!=="continue"){if(yield*CZ(Y2))continue;if(yield*SZ(Y2))continue;yield*R2.info("exiting loop",{classification:W2.type});break}}if(q2++,q2===1)yield*a({session:b2,modelID:Y2.model.modelID,providerID:Y2.model.providerID,history:t2}).pipe(Y.ignore,Y.forkIn(F));if(q2===1&&!b2.parentID)yield*iQ({config:z,lastUser:Y2,promptServiceTag:Q,log:YG});let r0=yield*d(Y2.model.providerID,Y2.model.modelID,t);w0=r0,r2=b0;let hZ=gZ.pop();if(hZ?.type==="subtask"){yield*n({task:hZ,model:r0,lastUser:Y2,sessionID:t,session:b2,msgs:t2});continue}let fZ=TZ;if(fZ?.parts.some((W2)=>W2.type==="compaction")){let W2=fZ.parts.find((a$)=>a$.type==="compaction"),K0=yield*B.messages({sessionID:t,agentID:Y2.agentID??"main"});if((yield*G.process({parentID:Y2.id,messages:K0,sessionID:t,auto:W2?.auto??!1,overflow:W2?.overflow,agentID:Y2.agentID}))==="stop")break;continue}yield*gQ({sessionID:t,msgs:t2,lastFinished:b0,model:r0,config:z}),hQ({sessionID:t,msgs:t2,lastFinished:b0});let _$=yield*D.get(Y2.agent),j7=_$?.native===!0&&_$?.hidden===!0;if(!s$&&!j7&&b0&&b0.tokens){let W2=yield*$();yield*K.fireCheckpoints({sessionID:t,model:r0,tokens:b0.tokens,promptOps:W2,agentID:Y2.agentID}).pipe(Y.ignore)}if(!s$&&b0&&b0.tokens){if(yield*BQ({config:z,checkpoint:j,compaction:G,prune:K},{sessionID:t,lastFinished:b0,lastUser:Y2,model:r0,msgs:t2,isBoundedComputation:j7})){s$=!0;continue}}if(s$=!1,!_$)throw yield*m9(D,J,Y2.agent,t);let sV=_$.steps??1/0,aV=q2>=sV;t2=yield*H2({messages:t2,agent:_$,session:b2});let EZ=E4({sessionID:t,parentID:Y2.id,agentID:Y2.agentID,agent:_$.name,variant:Y2.model.variant,cwd:g0.directory,root:g0.worktree,modelID:r0.id,providerID:r0.providerID});yield*B.updateMessage(EZ);let e2=yield*W.create({assistantMessage:EZ,sessionID:t,model:r0,agentMetrics:M$}),rV=yield*Y.gen(function*(){let W2={value:X2},K0=yield*aY({sessionID:t,resolvedAgentID:D0,step:q2,task_id:j2,lastUser:Y2,lastFinished:b0,msgs:t2,agent:_$,session:b2,model:r0,handle:e2,structured:W2,resolveTools:Z,createStructuredOutputTool:X,summary:b,scope:F,plugin:O}),{tools:$6,format:a$,query:tV}=K0,{cancelledByPlugin:eV,withUserQueryPost:$B}=rY({sessionID:t,agentID:D0,step:q2,lastUser:Y2,msgs:t2,query:tV,handle:e2,plugin:O,sessions:B,cancellation:h0,trajectoryForStep:s0}),ZB=Y.fnUntraced(function*(Z6){if(Z6==="continue"&&(yield*G8({lastUser:Y2,assistant:e2.message})))return"continue";if(Z6==="text-repeat"){if(yield*uV({lastUser:Y2}))return"continue";return"break"}if(W2.value!==void 0)return X2=W2.value,e2.message.structured=W2.value,e2.message.finish=e2.message.finish??"stop",yield*B.updateMessage(e2.message),"break";let B$=d9({phase:"after-process",lastUser:Y2,assistant:e2.message,parts:p.parts(e2.message.id),processResult:Z6});if(B$.type==="filtered")return yield*IZ({assistant:e2.message}),"break";if(B$.type==="failed")return yield*RZ({assistant:e2.message,reason:B$.reason}),"break";if(B$.type!=="continue"&&!e2.message.error&&a$.type==="json_schema"){if(yield*oV({lastUser:Y2,assistant:e2.message}))return"continue";return"break"}if((B$.type==="think-only"||B$.type==="invalid")&&a$.type!=="json_schema"){let XB=B$.type==="invalid"?B$.reason:"think-only";if(yield*_Z({lastUser:Y2,assistant:e2.message,reason:XB}))return"continue";return"break"}if(B$.type==="final"&&B$.degraded)yield*R2.warn("degraded final on abnormal finish",{finish:e2.message.finish});if(Z6==="stop")return"break";return}),D7=yield*QQ({sessionID:t,lastUser:Y2,agent:_$,session:b2,model:r0,msgs:t2,tools:$6,format:a$,handle:e2,isLastStep:aV,task_id:j2,instructionsNotified:e,maxStepsText:T,actorRegistry:N,bus:J,config:z,instruction:U,llm:h,registry:L,status:V,sys:k,cancelledByPlugin:eV,withUserQueryPost:$B,slog:R2});if(D7.kind==="break")return"break";let dZ=yield*ZB(D7.result);if(dZ)return dZ;if(D7.result==="overflow")yield*WQ({config:z,checkpoint:j,compaction:G,prune:K},{sessionID:t,lastUser:Y2,model:r0,msgs:t2,isBoundedComputation:j7});return"continue"}).pipe(Y.ensuring(U.clear(e2.message.id))),vZ=yield*K8.check({lastUser:Y2,completedParts:p.parts(e2.message.id)});if(vZ==="terminate")break;if(vZ==="recovered")continue;if(rV==="break"){if(yield*CZ(Y2))continue;if(yield*SZ(Y2))continue;break}continue}let pV=yield*$();if(w0&&r2)yield*n0({model:w0,lastFinished:r2,promptOps:pV});let e8=yield*g(t,N2),iV=e8.info.role==="assistant"&&!!e8.info.error,kZ=yield*B.findMessage(t,(t2)=>t2.info.role==="user",{agentID:"*"});return yield*i0(iV?"error":"completed",Y0.isSome(kZ)?kZ.value.info.agent:e8.info.agent),e8}).pipe((s0)=>l9(t,J,s0),Y.onExit(N1),Y.orDie)}),lastAssistant:g}})}import rQ from"path";var QG=new TextEncoder,QZ=new TextDecoder,JG=($)=>`
511
+ `);function oQ($){return Y.gen(function*(){if(!$.enabled)return!1;let Z=$.intervalDays*$Z,X=yield*Y.sync(()=>a2.use((V)=>V.select({time_created:k0.time_created}).from(k0).where(G0(k0.title,$.title)).orderBy(E8(k0.time_created)).limit(1).get())),Q=Date.now(),J=X?Q-X.time_created:1/0;if(!X){let V=yield*Y.sync(()=>a2.use((B)=>B.select({time_created:k0.time_created}).from(k0).where(vQ(k0.parent_id)).orderBy(dQ(k0.time_created)).limit(1).get()));if(!V||Q-V.time_created<Z)return e9.info(`auto-${$.label} skipped \u2014 project too young`,{projectAge:V?Math.round((Q-V.time_created)/$Z)+"d":"empty",interval:$.intervalDays+"d"}),!1}if(J<Z)return e9.info(`auto-${$.label} skipped \u2014 last run too recent`,{lastRunAgo:Math.round(J/$Z)+"d",interval:$.intervalDays+"d"}),!1;return e9.info(`auto-${$.label} triggering`,{lastRun:X?new Date(X.time_created).toISOString():"never",interval:$.intervalDays+"d"}),!0})}function uQ($){let Z=$.dream?.auto!==!1;if(!Z)return Y.succeed(!1);let X=Date.now();if(X-fQ<mQ)return Y.succeed(!1);fQ=X;let Q=$.dream?.interval_days??eK;return oQ({enabled:Z,intervalDays:Q,title:ZZ,label:"dream"})}function pQ($){let Z=$.distill?.auto!==!1;if(!Z)return Y.succeed(!1);let X=Date.now();if(X-EQ<mQ)return Y.succeed(!1);EQ=X;let Q=$.distill?.interval_days??$G;return oQ({enabled:Z,intervalDays:Q,title:XZ,label:"distill"})}var iQ=Y.fnUntraced(function*($){let Z=yield*$.config.get(),X=yield*uQ(Z).pipe(Y.catch(()=>Y.succeed(!1))),Q=yield*pQ(Z).pipe(Y.catch(()=>Y.succeed(!1))),J={providerID:$.lastUser.model.providerID,modelID:$.lastUser.model.modelID};if(!X&&!Q)return;let{AppRuntime:V}=yield*Y.promise(()=>import("./chunk-npv80mcx.js"));if(X)V.runPromise(E2.use((B)=>Y.gen(function*(){let D=yield*B.create({title:ZZ});yield*(yield*$.promptServiceTag).prompt({sessionID:D.id,agent:"dream",model:J,parts:[{type:"text",text:lQ}]})}))).catch((B)=>$.log.error("auto-dream prompt failed",{error:String(B)}));if(Q)V.runPromise(E2.use((B)=>Y.gen(function*(){let D=yield*B.create({title:XZ});yield*(yield*$.promptServiceTag).prompt({sessionID:D.id,agent:"distill",model:J,parts:[{type:"text",text:cQ}]})}))).catch((B)=>$.log.error("auto-distill prompt failed",{error:String(B)}))});var XG=($)=>$.pipe(Y.catchDefect((Z)=>Z instanceof $0.BackendAuthRejectedError?Y.succeed(void 0):Y.die(Z))),YZ=($)=>XG(Y.promise(()=>$0.resolvePrompt($))).pipe(Y.map((Z)=>Z??"")),nQ=Y.gen(function*(){let $=yield*YZ("session/build-switch"),Z=yield*YZ("session/max-steps"),X=yield*YZ("session/compose");return{buildSwitch:$,maxSteps:Z,promptCompose:X}});var sQ=E0.create({service:"session.prompt"}),YG=s.create({service:"session.prompt"});function aQ($,Z,X,Q){return Y.gen(function*(){let{bus:J,status:V,sessions:B,agents:D,provider:H,processor:W,prune:K,checkpoint:j,compaction:G,config:z,plugin:O,permission:P,fsys:w,registry:L,scope:F,instruction:U,state:y,goal:S,taskGateState:I,taskRegistry:M,revert:f,summary:b,sys:k,llm:h,actorRegistry:N,inbox:A}=yield*S4,R=yield*nQ,C=R.buildSwitch,T=R.maxSteps,l=R.promptCompose,d=(t,N2,j2)=>DQ(H,J,t,N2,j2),g=(t,N2)=>OQ(B,t,N2),E=a9(B),m=1024,e=new class extends Set{add(t){if(super.add(t),this.size>1024){let N2=this.values().next().value;if(N2!==void 0)this.delete(N2)}return this}},n=(t)=>o9({getOps:$,...t}),a=qQ({agents:D,provider:H,llm:h,sessions:B,elog:sQ}),H2=NQ({sessions:B,fsys:w,buildSwitch:C,promptCompose:l});return{runLoop:Y.fn("SessionPrompt.run")(function*(t,N2,j2){let g0=yield*v.context,R2=sQ.with({sessionID:t}),X2,q2=0,b2=yield*B.get(t),r2,w0,D0=N2??"main",p0=GQ({sessionID:t,agentID:D0,task_id:j2,plugin:O,bus:J,prune:K,scope:F}),{cancellation:h0,agentMetrics:M$,publishAgentRequest:i0,schedulePrune:n0}=p0,N1=KQ({sessionID:t,agentID:D0,task_id:j2,session:b2,cancellation:h0,plugin:O});return yield*Y.gen(function*(){yield*p0.before;let s0=(t2,Y2)=>g4(sY(t2,Y2,p.parts(Y2.id))),s$=!1,K8=kQ({sessionID:t,bus:J,appendSyntheticUserTurn:E,slog:R2}),f0=SQ({sessionID:t,sessions:B,bus:J,appendSyntheticUserTurn:E,slog:R2}),{autoContinueOutputLength:G8,autoContinueInvalidOutput:_Z,autoRetryStructuredOutput:oV,handleTextRepeat:uV,writeContentFilterError:IZ,writeModelError:RZ}=f0,CZ=FQ({sessionID:t,agentID:N2,agents:D,taskGateState:I,taskRegistry:M,appendSyntheticUserTurn:E,slog:R2}),SZ=PQ({sessionID:t,agentID:N2,session:b2,goal:S,bus:J,appendSyntheticUserTurn:E,slog:R2});while(!0){if(!N2||N2==="main")yield*V.set(t,{type:"busy"});yield*A.drain(t,N2??"main").pipe(Y.ignore),yield*R2.info("loop",{step:q2});let t2=yield*p.filterCompactedEffect(t,{contextFrom:b2.contextFrom,contextWatermark:b2.contextWatermark,agentID:N2??"main"}),Y2,TZ,a0,H7,b0,gZ=[];for(let W2=t2.length-1;W2>=0;W2--){let K0=t2[W2];if(!Y2&&K0.info.role==="user")Y2=K0.info,TZ=K0;if(!a0&&K0.info.role==="assistant")a0=K0.info,H7=K0;if(!b0&&K0.info.role==="assistant"&&K0.info.finish)b0=K0.info;if(Y2&&b0)break;if(!b0){let $6=K0.parts.filter((a$)=>a$.type==="subtask");gZ.push(...$6)}}if(!Y2)throw Error("No user message found in stream. This should never happen.");yield*TQ({sessionID:t,msgs:t2,checkpoint:j,config:z});let nV=H7?.parts.some((W2)=>W2.type==="tool"&&!W2.metadata?.providerExecuted)??!1;if(a0?.finish==="length"&&!nV&&Y2.id<a0.id&&(yield*G8({lastUser:Y2,assistant:a0})))continue;if(a0){let W2=d9({phase:"existing-assistant",lastUser:Y2,assistant:a0,parts:H7?.parts??[]});if(W2.type==="filtered"){yield*IZ({assistant:a0}),yield*R2.info("exiting loop",{classification:W2.type});break}if(W2.type==="failed"){yield*RZ({assistant:a0,reason:W2.reason}),yield*R2.info("exiting loop",{classification:W2.type,reason:W2.reason});break}if(W2.type==="think-only"||W2.type==="invalid"){let K0=W2.type==="invalid"?W2.reason:"think-only";if(yield*_Z({lastUser:Y2,assistant:a0,reason:K0}))continue;yield*R2.info("exiting loop",{classification:W2.type});break}if(W2.type==="final"&&W2.degraded)yield*R2.warn("degraded final on abnormal finish",{finish:a0.finish});if(W2.type!=="continue"){if(yield*CZ(Y2))continue;if(yield*SZ(Y2))continue;yield*R2.info("exiting loop",{classification:W2.type});break}}if(q2++,q2===1)yield*a({session:b2,modelID:Y2.model.modelID,providerID:Y2.model.providerID,history:t2}).pipe(Y.ignore,Y.forkIn(F));if(q2===1&&!b2.parentID)yield*iQ({config:z,lastUser:Y2,promptServiceTag:Q,log:YG});let r0=yield*d(Y2.model.providerID,Y2.model.modelID,t);w0=r0,r2=b0;let hZ=gZ.pop();if(hZ?.type==="subtask"){yield*n({task:hZ,model:r0,lastUser:Y2,sessionID:t,session:b2,msgs:t2});continue}let fZ=TZ;if(fZ?.parts.some((W2)=>W2.type==="compaction")){let W2=fZ.parts.find((a$)=>a$.type==="compaction"),K0=yield*B.messages({sessionID:t,agentID:Y2.agentID??"main"});if((yield*G.process({parentID:Y2.id,messages:K0,sessionID:t,auto:W2?.auto??!1,overflow:W2?.overflow,agentID:Y2.agentID}))==="stop")break;continue}yield*gQ({sessionID:t,msgs:t2,lastFinished:b0,model:r0,config:z}),hQ({sessionID:t,msgs:t2,lastFinished:b0});let _$=yield*D.get(Y2.agent),j7=_$?.native===!0&&_$?.hidden===!0;if(!s$&&!j7&&b0&&b0.tokens){let W2=yield*$();yield*K.fireCheckpoints({sessionID:t,model:r0,tokens:b0.tokens,promptOps:W2,agentID:Y2.agentID}).pipe(Y.ignore)}if(!s$&&b0&&b0.tokens){if(yield*BQ({config:z,checkpoint:j,compaction:G,prune:K},{sessionID:t,lastFinished:b0,lastUser:Y2,model:r0,msgs:t2,isBoundedComputation:j7})){s$=!0;continue}}if(s$=!1,!_$)throw yield*m9(D,J,Y2.agent,t);let sV=_$.steps??1/0,aV=q2>=sV;t2=yield*H2({messages:t2,agent:_$,session:b2});let EZ=E4({sessionID:t,parentID:Y2.id,agentID:Y2.agentID,agent:_$.name,variant:Y2.model.variant,cwd:g0.directory,root:g0.worktree,modelID:r0.id,providerID:r0.providerID});yield*B.updateMessage(EZ);let e2=yield*W.create({assistantMessage:EZ,sessionID:t,model:r0,agentMetrics:M$}),rV=yield*Y.gen(function*(){let W2={value:X2},K0=yield*aY({sessionID:t,resolvedAgentID:D0,step:q2,task_id:j2,lastUser:Y2,lastFinished:b0,msgs:t2,agent:_$,session:b2,model:r0,handle:e2,structured:W2,resolveTools:Z,createStructuredOutputTool:X,summary:b,scope:F,plugin:O}),{tools:$6,format:a$,query:tV}=K0,{cancelledByPlugin:eV,withUserQueryPost:$B}=rY({sessionID:t,agentID:D0,step:q2,lastUser:Y2,msgs:t2,query:tV,handle:e2,plugin:O,sessions:B,cancellation:h0,trajectoryForStep:s0}),ZB=Y.fnUntraced(function*(Z6){if(Z6==="continue"&&(yield*G8({lastUser:Y2,assistant:e2.message})))return"continue";if(Z6==="text-repeat"){if(yield*uV({lastUser:Y2}))return"continue";return"break"}if(W2.value!==void 0)return X2=W2.value,e2.message.structured=W2.value,e2.message.finish=e2.message.finish??"stop",yield*B.updateMessage(e2.message),"break";let B$=d9({phase:"after-process",lastUser:Y2,assistant:e2.message,parts:p.parts(e2.message.id),processResult:Z6});if(B$.type==="filtered")return yield*IZ({assistant:e2.message}),"break";if(B$.type==="failed")return yield*RZ({assistant:e2.message,reason:B$.reason}),"break";if(B$.type!=="continue"&&!e2.message.error&&a$.type==="json_schema"){if(yield*oV({lastUser:Y2,assistant:e2.message}))return"continue";return"break"}if((B$.type==="think-only"||B$.type==="invalid")&&a$.type!=="json_schema"){let XB=B$.type==="invalid"?B$.reason:"think-only";if(yield*_Z({lastUser:Y2,assistant:e2.message,reason:XB}))return"continue";return"break"}if(B$.type==="final"&&B$.degraded)yield*R2.warn("degraded final on abnormal finish",{finish:e2.message.finish});if(Z6==="stop")return"break";return}),D7=yield*QQ({sessionID:t,lastUser:Y2,agent:_$,session:b2,model:r0,msgs:t2,tools:$6,format:a$,handle:e2,isLastStep:aV,task_id:j2,instructionsNotified:e,maxStepsText:T,actorRegistry:N,bus:J,config:z,instruction:U,llm:h,registry:L,status:V,sys:k,cancelledByPlugin:eV,withUserQueryPost:$B,slog:R2});if(D7.kind==="break")return"break";let dZ=yield*ZB(D7.result);if(dZ)return dZ;if(D7.result==="overflow")yield*WQ({config:z,checkpoint:j,compaction:G,prune:K},{sessionID:t,lastUser:Y2,model:r0,msgs:t2,isBoundedComputation:j7});return"continue"}).pipe(Y.ensuring(U.clear(e2.message.id))),vZ=yield*K8.check({lastUser:Y2,completedParts:p.parts(e2.message.id)});if(vZ==="terminate")break;if(vZ==="recovered")continue;if(rV==="break"){if(yield*CZ(Y2))continue;if(yield*SZ(Y2))continue;break}continue}let pV=yield*$();if(w0&&r2)yield*n0({model:w0,lastFinished:r2,promptOps:pV});let e8=yield*g(t,N2),iV=e8.info.role==="assistant"&&!!e8.info.error,kZ=yield*B.findMessage(t,(t2)=>t2.info.role==="user",{agentID:"*"});return yield*i0(iV?"error":"completed",Y0.isSome(kZ)?kZ.value.info.agent:e8.info.agent),e8}).pipe((s0)=>l9(t,J,s0),Y.onExit(N1),Y.orDie)}),lastAssistant:g}})}import rQ from"path";var QG=new TextEncoder,QZ=new TextDecoder,JG=($)=>`
512
512
 
513
513
  [... QitQode truncated ${$} bytes of shell output ...]
514
514
 
@@ -539,7 +539,7 @@ ${O}
539
539
  `).length},NG=Y.fnUntraced(function*($,Z,X){let Q=qG.join(Z,X);if(!(yield*$.exists(Q).pipe(Y.orDie)))return"";let J=yield*$.readFile(Q).pipe(Y.catch(()=>Y.succeed(new Uint8Array)));if(Buffer.from(J).includes(0))return"";return Buffer.from(J).toString("utf8")}),FJ=($)=>new Map($.map((Z)=>[Z.file,{additions:Z.additions,deletions:Z.deletions}])),xG=(...$)=>{let Z=new Map;return $.flat().forEach((X)=>{if(!Z.has(X.file))Z.set(X.file,X)}),[...Z.values()]},BZ=Y.fnUntraced(function*($,Z,X,Q,J,V){let B=Q?yield*Z.prefix(X):"",D=(W,K,j)=>OJ(yJ(W,W,K,j,"","",{context:Number.MAX_SAFE_INTEGER}));return(yield*Y.forEach(J,(W)=>Y.gen(function*(){let K=W.status==="added"||!Q?"":yield*Z.show(X,Q,W.file,B),j=W.status==="deleted"?"":yield*NG($,X,W.file),G=V.get(W.file);return{file:W.file,patch:D(W.file,K,j),additions:G?.additions??(W.status==="added"?DJ(j):0),deletions:G?.deletions??(W.status==="deleted"?DJ(K):0),status:W.status}}),{concurrency:8})).toSorted((W,K)=>W.file.localeCompare(K.file))}),wG=Y.fnUntraced(function*($,Z,X,Q){if(!Q)return yield*BZ($,Z,X,Q,yield*Z.status(X),new Map);let[J,V]=yield*Y.all([Z.status(X),Z.stats(X,Q)],{concurrency:2});return yield*BZ($,Z,X,Q,J,FJ(V))}),bG=Y.fnUntraced(function*($,Z,X,Q){let[J,V,B]=yield*Y.all([Z.diff(X,Q),Z.stats(X,Q),Z.status(X)],{concurrency:3});return yield*BZ($,Z,X,Q,xG(J,B.filter((D)=>D.code==="??")),FJ(V))}),LG=q.enum(["git","branch"]),PJ={BranchUpdated:D2.define("vcs.branch.updated",q.object({branch:q.string().optional()}))},UG=q.object({branch:q.string().optional(),default_branch:q.string().optional()}).meta({ref:"VcsInfo"}),AG=q.object({file:q.string(),patch:q.string(),additions:q.number(),deletions:q.number(),status:q.enum(["added","deleted","modified"]).optional()}).meta({ref:"VcsFileDiff"});class X8 extends Z2.Service()("@qitqode/Vcs"){}var zJ=_.effect(X8,Y.gen(function*(){let $=yield*n2.Service,Z=yield*l$.Service,X=yield*u.Service,Q=yield*d2.Scope,J=yield*v.make(Y.fn("Vcs.state")(function*(V){if(V.project.vcs!=="git")return{current:void 0,root:void 0};let B=Y.fnUntraced(function*(){return yield*Z.branch(V.directory)}),[D,H]=yield*Y.all([Z.branch(V.directory),Z.defaultBranch(V.directory)],{concurrency:2}),W={current:D,root:H};return jJ.info("initialized",{branch:W.current,default_branch:W.root?.name}),yield*X.subscribe(c$.Event.Updated).pipe(c2.filter((K)=>K.properties.file.endsWith("HEAD")),c2.runForEach((K)=>Y.gen(function*(){let j=yield*B();if(j!==W.current)jJ.info("branch changed",{from:W.current,to:j}),W.current=j,yield*X.publish(PJ.BranchUpdated,{branch:j})})),Y.forkScoped),W}));return X8.of({init:Y.fn("Vcs.init")(function*(){yield*v.get(J).pipe(Y.forkIn(Q))}),branch:Y.fn("Vcs.branch")(function*(){return yield*v.use(J,(V)=>V.current)}),defaultBranch:Y.fn("Vcs.defaultBranch")(function*(){return yield*v.use(J,(V)=>V.root?.name)}),diff:Y.fn("Vcs.diff")(function*(V){let B=yield*v.get(J),D=yield*v.context;if(D.project.vcs!=="git")return[];if(V==="git")return yield*wG($,Z,D.directory,(yield*Z.hasHead(D.directory))?"HEAD":void 0);if(!B.root)return[];if(B.current&&B.current===B.root.name)return[];let H=yield*Z.mergeBase(D.directory,B.root.ref);if(!H)return[];return yield*bG($,Z,D.directory,H)})})})),MG=zJ.pipe(_.provide(l$.defaultLayer),_.provide(n2.defaultLayer),_.provide(u.layer));var o$={};L2(o$,{layer:()=>dJ,defaultLayer:()=>dG,Worktree:()=>o$,StartCommandFailedError:()=>fG,Service:()=>X7,ResetInput:()=>hG,ResetFailedError:()=>T0,RemoveInput:()=>gG,RemoveFailedError:()=>q1,NotGitError:()=>Z7,NameGenerationFailedError:()=>EJ,Info:()=>fJ,Event:()=>$7,CreateInput:()=>TG,CreateFailedError:()=>vJ});var A$={};L2(A$,{layer:()=>bJ,defaultLayer:()=>GZ,Service:()=>Q8});var P1=s.create({service:"share-next"}),Y8=process.env.QITQODE_DISABLE_SHARE==="true"||process.env.QITQODE_DISABLE_SHARE==="1",_G=c0.Struct({id:c0.String,url:c0.String,secret:c0.String});class Q8 extends Z2.Service()("@qitqode/ShareNext"){}var WZ=($)=>Y.sync(()=>a2.use($));function wJ($){return{create:`/api/${$}`,sync:(Z)=>`/api/${$}/${Z}/sync`,remove:(Z)=>`/api/${$}/${Z}`,data:(Z)=>`/api/${$}/${Z}/data`}}var IG=wJ("share"),RG=wJ("shares");function qJ($){switch($.type){case"session":return"session";case"message":return`message/${$.data.id}`;case"part":return`part/${$.data.messageID}/${$.data.id}`;case"session_diff":return"session_diff";case"model":return"model"}}var bJ=_.effect(Q8,Y.gen(function*(){let $=yield*d8.Service,Z=yield*u.Service,X=yield*V2.Service,Q=yield*KZ.HttpClient,J=KZ.filterStatusOk(Q),V=yield*P2.Service,B=yield*J2.Service;function D(F,U){return Y.gen(function*(){if(Y8)return;if(!(yield*j(F)))return;let S=yield*v.get(H),I=S.queue.get(F);if(I){for(let f of U)I.set(qJ(f),f);return}let M=new Map(U.map((f)=>[qJ(f),f]));S.queue.set(F,M),yield*G(F).pipe(Y.delay(1000),Y.catchCause((f)=>Y.sync(()=>{P1.error("share flush failed",{sessionID:F,cause:f})})),Y.forkIn(S.scope))})}let H=yield*v.make(Y.fn("ShareNext.state")(function*(F){let U={queue:new Map,scope:yield*d2.make(),shared:new Map};if(yield*Y.addFinalizer(()=>d2.close(U.scope,u2.void).pipe(Y.andThen(Y.sync(()=>{U.queue.clear(),U.shared.clear()})))),Y8)return U;let y=(S,I)=>Z.subscribe(S).pipe(c2.runForEach((M)=>I(M).pipe(Y.catchCause((f)=>Y.sync(()=>{P1.error("share subscriber failed",{type:S.type,cause:f})})))),Y.forkScoped);return yield*y(J2.Event.Updated,(S)=>Y.gen(function*(){let I=yield*B.get(S.properties.sessionID);yield*D(I.id,[{type:"session",data:I}])})),yield*y(p.Event.Updated,(S)=>Y.gen(function*(){let I=S.properties.info;if(yield*D(I.sessionID,[{type:"message",data:I}]),I.role!=="user")return;let M=yield*V.getModel(I.model.providerID,I.model.modelID);yield*D(I.sessionID,[{type:"model",data:[M]}])})),yield*y(p.Event.PartUpdated,(S)=>S.properties.part.type==="compaction"?Y.void:D(S.properties.part.sessionID,[{type:"part",data:S.properties.part}])),yield*y(J2.Event.Diff,(S)=>D(S.properties.sessionID,[{type:"session_diff",data:S.properties.diff}])),yield*y(J2.Event.Deleted,(S)=>L(S.properties.sessionID)),U})),W=Y.fn("ShareNext.request")(function*(){let F={},U=yield*$.active();if(Y0.isNone(U)||!U.value.active_org_id){let S=(yield*X.get()).enterprise?.url??"https://opncd.ai";return{headers:F,api:IG,baseUrl:S}}let y=yield*$.token(U.value.id);if(Y0.isNone(y))throw Error("No active account token available for sharing");return F.authorization=`Bearer ${y.value}`,F["x-org-id"]=U.value.active_org_id,{headers:F,api:RG,baseUrl:U.value.url}}),K=Y.fnUntraced(function*(F){let U=yield*WZ((y)=>y.select().from(z1).where(G0(z1.session_id,F)).get());if(!U)return;return{id:U.id,secret:U.secret,url:U.url}}),j=Y.fnUntraced(function*(F){let U=yield*v.get(H);if(U.shared.has(F)){let S=U.shared.get(F);return S===null?void 0:S}let y=yield*K(F);return U.shared.set(F,y??null),y}),G=Y.fn("ShareNext.flush")(function*(F){if(Y8)return;let U=yield*v.get(H),y=U.queue.get(F);if(!y)return;let S=yield*j(F);if(!S){U.queue.delete(F);return}let I=yield*W(),M=yield*H$.post(`${I.baseUrl}${I.api.sync(S.id)}`).pipe(H$.setHeaders(I.headers),H$.bodyJson({secret:S.secret,data:Array.from(y.values())}),Y.flatMap((f)=>Q.execute(f)));if(M.status>=400){P1.warn("failed to sync share",{sessionID:F,shareID:S.id,status:M.status});return}U.queue.delete(F)}),z=Y.fn("ShareNext.full")(function*(F){P1.info("full sync",{sessionID:F});let U=yield*B.get(F),y=yield*B.diff(F),S=yield*Y.sync(()=>Array.from(p.stream(F,{agentID:"*"}))),I=yield*Y.forEach(Array.from(new Map(S.filter((M)=>M.info.role==="user").map((M)=>M.info.model).map((M)=>[`${M.providerID}/${M.modelID}`,M])).values()),(M)=>V.getModel($1.make(M.providerID),t0.make(M.modelID)),{concurrency:8});yield*D(F,[{type:"session",data:U},...S.map((M)=>({type:"message",data:M.info})),...S.flatMap((M)=>M.parts.filter((f)=>f.type!=="compaction").map((f)=>({type:"part",data:f}))),{type:"session_diff",data:y},{type:"model",data:I}])}),O=Y.fn("ShareNext.init")(function*(){if(Y8)return;yield*v.get(H)}),P=Y.fn("ShareNext.url")(function*(){return(yield*W()).baseUrl}),w=Y.fn("ShareNext.create")(function*(F){if(Y8)return{id:"",url:"",secret:""};P1.info("creating share",{sessionID:F});let U=yield*W(),y=yield*H$.post(`${U.baseUrl}${U.api.create}`).pipe(H$.setHeaders(U.headers),H$.bodyJson({sessionID:F}),Y.flatMap((I)=>J.execute(I)),Y.flatMap(NJ.schemaBodyJson(_G)));yield*WZ((I)=>I.insert(z1).values({session_id:F,id:y.id,secret:y.secret,url:y.url}).onConflictDoUpdate({target:z1.session_id,set:{id:y.id,secret:y.secret,url:y.url}}).run());let S=yield*v.get(H);return S.shared.set(F,y),yield*z(F).pipe(Y.catchCause((I)=>Y.sync(()=>{P1.error("share full sync failed",{sessionID:F,cause:I})})),Y.forkIn(S.scope)),y}),L=Y.fn("ShareNext.remove")(function*(F){if(Y8)return;P1.info("removing share",{sessionID:F});let U=yield*v.get(H),y=yield*j(F);if(!y){U.shared.delete(F),U.queue.delete(F);return}let S=yield*W();yield*H$.delete(`${S.baseUrl}${S.api.remove(y.id)}`).pipe(H$.setHeaders(S.headers),H$.bodyJson({secret:y.secret}),Y.flatMap((I)=>J.execute(I))),yield*WZ((I)=>I.delete(z1).where(G0(z1.session_id,F)).run()),U.shared.delete(F),U.queue.delete(F)});return Q8.of({init:O,url:P,request:W,create:w,remove:L})})),GZ=bJ.pipe(_.provide(u.layer),_.provide(d8.defaultLayer),_.provide(V2.defaultLayer),_.provide(xJ.layer),_.provide(P2.defaultLayer),_.provide(J2.defaultLayer));var n4={};L2(n4,{layer:()=>LJ,defaultLayer:()=>CG,Service:()=>i4});class i4 extends Z2.Service()("@qitqode/SessionShare"){}var LJ=_.effect(i4,Y.gen(function*(){let $=yield*V2.Service,Z=yield*J2.Service,X=yield*Q8,Q=yield*d2.Scope,J=Y.fn("SessionShare.share")(function*(D){if((yield*$.get()).share==="disabled")throw Error("Sharing is disabled in configuration");let W=yield*X.create(D);return yield*Y.sync(()=>A1.run(J2.Event.Updated,{sessionID:D,info:{share:{url:W.url}}})),W}),V=Y.fn("SessionShare.unshare")(function*(D){yield*X.remove(D),yield*Y.sync(()=>A1.run(J2.Event.Updated,{sessionID:D,info:{share:{url:null}}}))}),B=Y.fn("SessionShare.create")(function*(D){let H=yield*Z.create(D);if(H.parentID)return H;let W=yield*$.get();if(!(L0.QITQODE_AUTO_SHARE||W.share==="auto"))return H;return yield*J(H.id).pipe(Y.ignore,Y.forkIn(Q)),H});return i4.of({create:B,share:J,unshare:V})})),CG=LJ.pipe(_.provide(GZ),_.provide(J2.defaultLayer),_.provide(V2.defaultLayer));var SJ=MJ(function*(){s.Default.info("bootstrapping",{directory:S2.directory}),yield*V2.Service.use(($)=>$.get()),yield*K2.Service.use(($)=>$.init()),yield*UJ([J$.Service,A$.Service,J8.Service,V8.Service,c$.Service,X8,z0.Service,RJ,CJ].map(($)=>jZ($.use((Z)=>Z.init())))).pipe(HZ("InstanceBootstrap.init")),yield*y$.Service.use(($)=>$.reconcile()).pipe(_J(($)=>AJ(()=>s.Default.warn("memory reconcile failed",{error:String($)}))),jZ),yield*u.Service.use(($)=>$.subscribeCallback(x0.Event.Executed,async(Z)=>{if(Z.properties.name===x0.Default.INIT)IJ(S2.project.id)})),yield*C2.subscribe()}).pipe(HZ("InstanceBootstrap"));var kG=_.mergeAll(V2.defaultLayer,K2.defaultLayer,A$.defaultLayer,J8.defaultLayer,J$.defaultLayer,V8.defaultLayer,c$.defaultLayer,F1.defaultLayer,z0.defaultLayer,u.defaultLayer,y$.defaultLayer,t4.defaultLayer).pipe(_.provide(a4)),kJ=s4.make(kG,{memoMap:r4});var m8=s.create({service:"worktree"}),$7={Ready:D2.define("worktree.ready",q.object({name:q.string(),branch:q.string()})),Failed:D2.define("worktree.failed",q.object({message:q.string()}))},fJ=q.object({name:q.string(),branch:q.string(),directory:q.string()}).meta({ref:"Worktree"}),TG=q.object({name:q.string().optional(),startCommand:q.string().optional().describe("Additional startup script to run after the project's start command")}).meta({ref:"WorktreeCreateInput"}),gG=q.object({directory:q.string()}).meta({ref:"WorktreeRemoveInput"}),hG=q.object({directory:q.string()}).meta({ref:"WorktreeResetInput"}),Z7=w2.create("WorktreeNotGitError",q.object({message:q.string()})),EJ=w2.create("WorktreeNameGenerationFailedError",q.object({message:q.string()})),vJ=w2.create("WorktreeCreateFailedError",q.object({message:q.string()})),fG=w2.create("WorktreeStartCommandFailedError",q.object({message:q.string()})),q1=w2.create("WorktreeRemoveFailedError",q.object({message:q.string()})),T0=w2.create("WorktreeResetFailedError",q.object({message:q.string()}));function EG($){return $.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+/,"").replace(/-+$/,"")}function vG(...$){return $.filter(Boolean).flatMap((Z)=>Z.split(`
540
540
  `).map((X)=>X.trim()).flatMap((X)=>{let Q=X.match(/^warning:\s+failed to remove\s+(.+):\s+/i);if(!Q)return[];let J=Q[1]?.trim().replace(/^['"]|['"]$/g,"");if(!J)return[];return[J]}))}class X7 extends Z2.Service()("@qitqode/Worktree"){}var dJ=_.effect(X7,Y.gen(function*(){let $=yield*d2.Scope,Z=yield*n2.Service,X=yield*TJ.Path,Q=yield*i1.ChildProcessSpawner,J=yield*l$.Service,V=yield*U$.Service,B=Y.fnUntraced(function*(A,R){return yield*hJ(Q,A,R)},Y.catch((A)=>Y.succeed({code:1,text:"",stderr:A instanceof Error?A.message:String(A)}))),D=26,H=Y.fn("Worktree.candidate")(function*(A,R){let C=yield*v.context;for(let T of Array.from({length:26},(l,d)=>d)){let l=R?T===0?R:`${R}-${yZ.create()}`:yZ.create(),d=`qitqode/${l}`,g=X.join(A,l);if(yield*Z.exists(g).pipe(Y.orDie))continue;let E=`refs/heads/${d}`;if((yield*B(["show-ref","--verify","--quiet",E],{cwd:C.worktree})).code===0)continue;return fJ.parse({name:l,branch:d,directory:g})}throw new EJ({message:"Failed to generate a unique worktree name"})}),W=Y.fn("Worktree.makeWorktreeInfo")(function*(A){let R=yield*v.context;if(R.project.vcs!=="git")throw new Z7({message:"Worktrees are only supported for git projects"});let C=X.join(q$.Path.data,"worktree",R.project.id);yield*Z.makeDirectory(C,{recursive:!0}).pipe(Y.orDie);let T=A?EG(A):"";return yield*H(C,T||void 0)}),K=Y.fnUntraced(function*(A){let R=yield*v.context,C=yield*B(["worktree","add","--no-checkout","-b",A.branch,A.directory],{cwd:R.worktree});if(C.code!==0)throw new vJ({message:C.stderr||C.text||"Failed to create git worktree"});yield*V.addSandbox(R.project.id,A.directory).pipe(Y.catch(()=>Y.void))}),j=Y.fnUntraced(function*(A,R){let C=yield*v.context,T=yield*v.workspaceID,l=C.project.id,d=R?.trim(),g=yield*B(["reset","--hard"],{cwd:A.directory});if(g.code!==0){let m=g.stderr||g.text||"Failed to populate worktree";m8.error("worktree checkout failed",{directory:A.directory,message:m}),e4.emit("event",{directory:A.directory,project:C.project.id,workspace:T,payload:{type:$7.Failed.type,properties:{message:m}}});return}if(!(yield*Y.promise(()=>S2.provide({directory:A.directory,init:()=>kJ.runPromise(SJ),fn:()=>{return}}).then(()=>!0).catch((m)=>{let e=O$(m);return m8.error("worktree bootstrap failed",{directory:A.directory,message:e}),e4.emit("event",{directory:A.directory,project:C.project.id,workspace:T,payload:{type:$7.Failed.type,properties:{message:e}}}),!1}))))return;e4.emit("event",{directory:A.directory,project:C.project.id,workspace:T,payload:{type:$7.Ready.type,properties:{name:A.name,branch:A.branch}}}),yield*M(A.directory,{projectID:l,extra:d})}),G=Y.fn("Worktree.createFromInfo")(function*(A,R){yield*K(A),yield*j(A,R)}),z=Y.fn("Worktree.create")(function*(A){let R=yield*W(A?.name);return yield*K(R),yield*j(R,A?.startCommand).pipe(Y.catchCause((C)=>Y.sync(()=>m8.error("worktree bootstrap failed",{cause:C}))),Y.forkIn($)),R}),O=Y.fnUntraced(function*(A){let R=X.resolve(A),C=yield*Z.realPath(R).pipe(Y.catch(()=>Y.succeed(R))),T=X.normalize(C);return process.platform==="win32"?T.toLowerCase():T});function P(A){return A.split(`
541
541
  `).map((R)=>R.trim()).reduce((R,C)=>{if(!C)return R;if(C.startsWith("worktree "))return R.push({path:C.slice(9).trim()}),R;let T=R[R.length-1];if(!T)return R;if(C.startsWith("branch "))T.branch=C.slice(7).trim();return R},[])}let w=Y.fnUntraced(function*(A,R){for(let C of A){if(!C.path)continue;if((yield*O(C.path))===R)return C}return});function L(A){return Z.exists(A).pipe(Y.orDie,Y.flatMap((R)=>R?B(["fsmonitor--daemon","stop"],{cwd:A}):Y.void))}function F(A){return Y.promise(()=>import("fs/promises").then((R)=>R.rm(A,{recursive:!0,force:!0,maxRetries:5,retryDelay:100})).catch((R)=>{let C=O$(R);throw new q1({message:C||"Failed to remove git worktree directory"})}))}let U=Y.fn("Worktree.remove")(function*(A){let R=yield*v.context;if(R.project.vcs!=="git")throw new Z7({message:"Worktrees are only supported for git projects"});let C=yield*O(A.directory),T=yield*B(["worktree","list","--porcelain"],{cwd:R.worktree});if(T.code!==0)throw new q1({message:T.stderr||T.text||"Failed to read git worktrees"});let l=P(T.text),d=yield*w(l,C);if(!d?.path){if(!(yield*Z.exists(C).pipe(Y.orDie)))return!0;let e=yield*O(X.join(q$.Path.data,"worktree",R.project.id));if(C!==e&&!C.startsWith(`${e}${X.sep}`))throw new q1({message:"Directory is not a registered or managed worktree"});return yield*L(C),yield*F(C),!0}yield*L(d.path);let g=yield*B(["worktree","remove","--force",d.path],{cwd:R.worktree});if(g.code!==0){let m=yield*B(["worktree","list","--porcelain"],{cwd:R.worktree});if(m.code!==0)throw new q1({message:g.stderr||g.text||m.stderr||m.text||"Failed to remove git worktree"});if((yield*w(P(m.text),C))?.path)throw new q1({message:g.stderr||g.text||"Failed to remove git worktree"})}yield*F(d.path);let E=d.branch?.replace(/^refs\/heads\//,"");if(E){let m=yield*B(["branch","-D",E],{cwd:R.worktree});if(m.code!==0)throw new q1({message:m.stderr||m.text||"Failed to delete worktree branch"})}return!0}),y=Y.fnUntraced(function*(A,R,C){let T=yield*B(A,R);if(T.code!==0)throw C(T);return T}),S=Y.fnUntraced(function*(A,R){let[C,T]=process.platform==="win32"?["cmd",["/c",R]]:["bash",["-lc",R]],l=yield*Q.spawn(n1.make(C,T,{cwd:A,extendEnv:!0,stdin:"ignore"})),[,d]=yield*Y.all([c2.runDrain(l.stdout),c2.mkString(c2.decodeText(l.stderr))],{concurrency:2}).pipe(Y.orDie);return{code:yield*l.exitCode,stderr:d}},Y.scoped,Y.catch(()=>Y.succeed({code:1,stderr:""}))),I=Y.fnUntraced(function*(A,R,C){let T=R.trim();if(!T)return!0;let l=yield*S(A,T);if(l.code===0)return!0;return m8.error("worktree start command failed",{kind:C,directory:A,message:l.stderr}),!1}),M=Y.fnUntraced(function*(A,R){let C=yield*Y.sync(()=>a2.use((g)=>g.select().from(DZ).where(G0(DZ.id,R.projectID)).get())),l=(C?U$.fromRow(C):void 0)?.commands?.start?.trim()??"";if(!(yield*I(A,l,"project")))return!1;return yield*I(A,R.extra??"","worktree"),!0}),f=Y.fnUntraced(function*(A,R){let C=yield*O(A);yield*Y.forEach(R,(T)=>Y.gen(function*(){let l=yield*O(X.resolve(A,T));if(l===C)return;if(!l.startsWith(`${C}${X.sep}`))return;yield*Z.remove(l,{recursive:!0}).pipe(Y.ignore)}),{concurrency:8})}),b=Y.fnUntraced(function*(A){let R=yield*B(["clean","-ffdx"],{cwd:A});if(R.code===0)return R;let C=vG(R.stderr,R.text);if(!C.length)return R;return yield*f(A,C),yield*B(["clean","-ffdx"],{cwd:A})}),k=Y.fn("Worktree.reset")(function*(A){let R=yield*v.context;if(R.project.vcs!=="git")throw new Z7({message:"Worktrees are only supported for git projects"});let C=yield*O(A.directory),T=yield*O(R.worktree);if(C===T)throw new T0({message:"Cannot reset the primary workspace"});let l=yield*B(["worktree","list","--porcelain"],{cwd:R.worktree});if(l.code!==0)throw new T0({message:l.stderr||l.text||"Failed to read git worktrees"});let d=yield*w(P(l.text),C);if(!d?.path)throw new T0({message:"Worktree not found"});let g=d.path,E=yield*J.defaultBranch(R.worktree);if(!E)throw new T0({message:"Default branch not found"});let m=E.ref.indexOf("/");if(E.ref!==E.name&&m>0){let a=E.ref.slice(0,m),H2=E.ref.slice(m+1);yield*y(["fetch",a,H2],{cwd:R.worktree},(I2)=>new T0({message:I2.stderr||I2.text||`Failed to fetch ${E.ref}`}))}yield*y(["reset","--hard",E.ref],{cwd:g},(a)=>new T0({message:a.stderr||a.text||"Failed to reset worktree to target"}));let e=yield*b(g);if(e.code!==0)throw new T0({message:e.stderr||e.text||"Failed to clean worktree"});yield*y(["submodule","update","--init","--recursive","--force"],{cwd:g},(a)=>new T0({message:a.stderr||a.text||"Failed to update submodules"})),yield*y(["submodule","foreach","--recursive","git","reset","--hard"],{cwd:g},(a)=>new T0({message:a.stderr||a.text||"Failed to reset submodules"})),yield*y(["submodule","foreach","--recursive","git","clean","-fdx"],{cwd:g},(a)=>new T0({message:a.stderr||a.text||"Failed to clean submodules"}));let n=yield*B(["-c","core.fsmonitor=false","status","--porcelain=v1"],{cwd:g});if(n.code!==0)throw new T0({message:n.stderr||n.text||"Failed to read git status"});if(n.text.trim())throw new T0({message:`Worktree reset left local changes:
542
- ${n.text.trim()}`});return yield*M(g,{projectID:R.project.id}).pipe(Y.catchCause((a)=>Y.sync(()=>m8.error("worktree start task failed",{cause:a}))),Y.forkIn($)),!0}),h=Y.fn("Worktree.head")(function*(A){return(yield*B(["rev-parse","HEAD"],{cwd:A})).text.trim()}),N=Y.fn("Worktree.isPristine")(function*(A,R){let C=yield*B(["status","--porcelain"],{cwd:A});if(C.code!==0)return!1;if(C.text.trim()!=="")return!1;let T=yield*B(["rev-parse","HEAD"],{cwd:A});return T.code===0&&T.text.trim()===R});return X7.of({makeWorktreeInfo:W,createFromInfo:G,create:z,remove:U,reset:k,head:h,isPristine:N})})),dG=dJ.pipe(_.provide(l$.defaultLayer),_.provide(s1),_.provide(U$.defaultLayer),_.provide(n2.defaultLayer),_.provide(gJ.layer));var u8={};L2(u8,{layer:()=>pJ,defaultLayer:()=>iG,UpdateInput:()=>pG,Service:()=>Y7,Pty:()=>u8,Info:()=>FZ,Event:()=>o8,CreateInput:()=>uG});function mJ($){let Z,X=!1;return()=>{if(X)return Z;return X=!0,Z=$(),Z}}var mG=c0.String.annotate({[cJ]:B8.schema("pty")}).pipe(c0.brand("PtyID")),l8=mG.pipe(lJ(($)=>({ascending:(Z)=>$.make(B8.ascending("pty",Z)),zod:B8.schema("pty").pipe(q.custom())})));var c8=s.create({service:"pty"}),oJ=2097152,uJ=65536,lG=new TextEncoder,OZ=($)=>$.data&&typeof $.data==="object"?$.data:$,cG=($)=>{let Z=JSON.stringify({cursor:$}),X=lG.encode(Z),Q=new Uint8Array(X.length+1);return Q[0]=0,Q.set(X,1),Q},oG=mJ(()=>import("./chunk-0bbs01f0.js")),FZ=q.object({id:l8.zod,title:q.string(),command:q.string(),args:q.array(q.string()),cwd:q.string(),status:q.enum(["running","exited"]),pid:q.number()}).meta({ref:"Pty"}),uG=q.object({command:q.string().optional(),args:q.array(q.string()).optional(),cwd:q.string().optional(),title:q.string().optional(),env:q.record(q.string(),q.string()).optional()}),pG=q.object({title:q.string().optional(),size:q.object({rows:q.number(),cols:q.number()}).optional()}),o8={Created:D2.define("pty.created",q.object({info:FZ})),Updated:D2.define("pty.updated",q.object({info:FZ})),Exited:D2.define("pty.exited",q.object({id:l8.zod,exitCode:q.number()})),Deleted:D2.define("pty.deleted",q.object({id:l8.zod}))};class Y7 extends Z2.Service()("@qitqode/Pty"){}var pJ=_.effect(Y7,Y.gen(function*(){let $=yield*u.Service,Z=yield*K2.Service;function X(G){try{G.process.kill()}catch{}for(let[z,O]of G.subscribers.entries())try{if(OZ(O)===z)O.close()}catch{}G.subscribers.clear()}let Q=yield*v.make(Y.fn("Pty.state")(function*(G){let z={dir:G.directory,sessions:new Map};return yield*Y.addFinalizer(()=>Y.sync(()=>{for(let O of z.sessions.values())X(O);z.sessions.clear()})),z})),J=Y.fn("Pty.remove")(function*(G){let z=yield*v.get(Q),O=z.sessions.get(G);if(!O)return;z.sessions.delete(G),c8.info("removing session",{id:G}),X(O),yield*$.publish(o8.Deleted,{id:O.info.id})}),V=Y.fn("Pty.list")(function*(){let G=yield*v.get(Q);return Array.from(G.sessions.values()).map((z)=>z.info)}),B=Y.fn("Pty.get")(function*(G){return(yield*v.get(Q)).sessions.get(G)?.info}),D=Y.fn("Pty.create")(function*(G){let z=yield*v.get(Q),O=yield*P0.make(),P=l8.ascending(),w=G.command||y1.preferred(),L=G.args||[];if(y1.login(w))L.push("-l");let F=G.cwd||z.dir,U=yield*Z.trigger("shell.env",{cwd:F},{env:{}}),y={...q4(),...G.env,...U.env,TERM:"xterm-256color",QITQODE_TERMINAL:"1"};if(process.platform==="win32")y.LC_ALL="C.UTF-8",y.LC_CTYPE="C.UTF-8",y.LANG="C.UTF-8";c8.info("creating session",{id:P,cmd:w,args:L,cwd:F});let{spawn:S}=yield*Y.promise(()=>oG()),I=yield*Y.sync(()=>S(w,L,{name:"xterm-256color",cwd:F,env:y})),M={id:P,title:G.title||`Terminal ${P.slice(-4)}`,command:w,args:L,cwd:F,status:"running",pid:I.pid},f={info:M,process:I,buffer:"",bufferCursor:0,cursor:0,subscribers:new Map};return z.sessions.set(P,f),I.onData(S2.bind((b)=>{f.cursor+=b.length;for(let[h,N]of f.subscribers.entries()){if(N.readyState!==1){f.subscribers.delete(h);continue}if(OZ(N)!==h){f.subscribers.delete(h);continue}try{N.send(b)}catch{f.subscribers.delete(h)}}if(f.buffer+=b,f.buffer.length<=oJ)return;let k=f.buffer.length-oJ;f.buffer=f.buffer.slice(k),f.bufferCursor+=k})),I.onExit(S2.bind(({exitCode:b})=>{if(f.info.status==="exited")return;c8.info("session exited",{id:P,exitCode:b}),f.info.status="exited",O.fork($.publish(o8.Exited,{id:P,exitCode:b})),O.fork(J(P))})),yield*$.publish(o8.Created,{info:M}),M}),H=Y.fn("Pty.update")(function*(G,z){let P=(yield*v.get(Q)).sessions.get(G);if(!P)return;if(z.title)P.info.title=z.title;if(z.size)P.process.resize(z.size.cols,z.size.rows);return yield*$.publish(o8.Updated,{info:P.info}),P.info}),W=Y.fn("Pty.resize")(function*(G,z,O){let w=(yield*v.get(Q)).sessions.get(G);if(w&&w.info.status==="running")w.process.resize(z,O)}),K=Y.fn("Pty.write")(function*(G,z){let P=(yield*v.get(Q)).sessions.get(G);if(P&&P.info.status==="running")P.process.write(z)}),j=Y.fn("Pty.connect")(function*(G,z,O){let w=(yield*v.get(Q)).sessions.get(G);if(!w){z.close();return}c8.info("client connected to session",{id:G});let L=OZ(z);w.subscribers.delete(L),w.subscribers.set(L,z);let F=()=>{w.subscribers.delete(L)},U=w.bufferCursor,y=w.cursor,S=O===-1?y:typeof O==="number"&&Number.isSafeInteger(O)?Math.max(0,O):0,I=(()=>{if(!w.buffer)return"";if(S>=y)return"";let M=Math.max(0,S-U);if(M>=w.buffer.length)return"";return w.buffer.slice(M)})();if(I)try{for(let M=0;M<I.length;M+=uJ)z.send(I.slice(M,M+uJ))}catch{F(),z.close();return}try{z.send(cG(y))}catch{F(),z.close();return}return{onMessage:(M)=>{w.process.write(typeof M==="string"?M:new TextDecoder().decode(M))},onClose:()=>{c8.info("client disconnected from session",{id:G}),F()}}});return Y7.of({list:V,get:B,create:D,update:H,remove:J,resize:W,write:K,connect:j})})),iG=pJ.pipe(_.provide(u.layer),_.provide(K2.defaultLayer));var n8={};L2(n8,{layer:()=>aJ,defaultLayer:()=>rG,Service:()=>V7,MAX_PRE_REACT:()=>nJ,MAX_POST_REACT:()=>sJ,Actor:()=>n8});var Q7=($,Z,X)=>Y.uninterruptible(Y.gen(function*(){let Q=yield*M2.Service;yield*Q.updateStatus($,Z,{status:"running"}).pipe(Y.ignore);let J=yield*X.pipe(Y.interruptible,Y.exit);if(u2.isSuccess(J))return yield*Q.updateStatus($,Z,{status:"idle",lastOutcome:"success",lastError:void 0}).pipe(Y.ignore),J.value;let V=J.cause,B=G2.hasInterruptsOnly(V);return yield*Q.updateStatus($,Z,{status:"idle",lastOutcome:B?"cancelled":"failure",lastError:B?void 0:nG(V)}).pipe(Y.ignore),yield*Y.failCause(V)}));function nG($){return G2.pretty($)}var J7=s.create({service:"actor.spawn"}),nJ=3,sJ=3,aG=`
542
+ ${n.text.trim()}`});return yield*M(g,{projectID:R.project.id}).pipe(Y.catchCause((a)=>Y.sync(()=>m8.error("worktree start task failed",{cause:a}))),Y.forkIn($)),!0}),h=Y.fn("Worktree.head")(function*(A){return(yield*B(["rev-parse","HEAD"],{cwd:A})).text.trim()}),N=Y.fn("Worktree.isPristine")(function*(A,R){let C=yield*B(["status","--porcelain"],{cwd:A});if(C.code!==0)return!1;if(C.text.trim()!=="")return!1;let T=yield*B(["rev-parse","HEAD"],{cwd:A});return T.code===0&&T.text.trim()===R});return X7.of({makeWorktreeInfo:W,createFromInfo:G,create:z,remove:U,reset:k,head:h,isPristine:N})})),dG=dJ.pipe(_.provide(l$.defaultLayer),_.provide(s1),_.provide(U$.defaultLayer),_.provide(n2.defaultLayer),_.provide(gJ.layer));var u8={};L2(u8,{layer:()=>pJ,defaultLayer:()=>iG,UpdateInput:()=>pG,Service:()=>Y7,Pty:()=>u8,Info:()=>FZ,Event:()=>o8,CreateInput:()=>uG});function mJ($){let Z,X=!1;return()=>{if(X)return Z;return X=!0,Z=$(),Z}}var mG=c0.String.annotate({[cJ]:B8.schema("pty")}).pipe(c0.brand("PtyID")),l8=mG.pipe(lJ(($)=>({ascending:(Z)=>$.make(B8.ascending("pty",Z)),zod:B8.schema("pty").pipe(q.custom())})));var c8=s.create({service:"pty"}),oJ=2097152,uJ=65536,lG=new TextEncoder,OZ=($)=>$.data&&typeof $.data==="object"?$.data:$,cG=($)=>{let Z=JSON.stringify({cursor:$}),X=lG.encode(Z),Q=new Uint8Array(X.length+1);return Q[0]=0,Q.set(X,1),Q},oG=mJ(()=>import("./chunk-1yt5rsew.js")),FZ=q.object({id:l8.zod,title:q.string(),command:q.string(),args:q.array(q.string()),cwd:q.string(),status:q.enum(["running","exited"]),pid:q.number()}).meta({ref:"Pty"}),uG=q.object({command:q.string().optional(),args:q.array(q.string()).optional(),cwd:q.string().optional(),title:q.string().optional(),env:q.record(q.string(),q.string()).optional()}),pG=q.object({title:q.string().optional(),size:q.object({rows:q.number(),cols:q.number()}).optional()}),o8={Created:D2.define("pty.created",q.object({info:FZ})),Updated:D2.define("pty.updated",q.object({info:FZ})),Exited:D2.define("pty.exited",q.object({id:l8.zod,exitCode:q.number()})),Deleted:D2.define("pty.deleted",q.object({id:l8.zod}))};class Y7 extends Z2.Service()("@qitqode/Pty"){}var pJ=_.effect(Y7,Y.gen(function*(){let $=yield*u.Service,Z=yield*K2.Service;function X(G){try{G.process.kill()}catch{}for(let[z,O]of G.subscribers.entries())try{if(OZ(O)===z)O.close()}catch{}G.subscribers.clear()}let Q=yield*v.make(Y.fn("Pty.state")(function*(G){let z={dir:G.directory,sessions:new Map};return yield*Y.addFinalizer(()=>Y.sync(()=>{for(let O of z.sessions.values())X(O);z.sessions.clear()})),z})),J=Y.fn("Pty.remove")(function*(G){let z=yield*v.get(Q),O=z.sessions.get(G);if(!O)return;z.sessions.delete(G),c8.info("removing session",{id:G}),X(O),yield*$.publish(o8.Deleted,{id:O.info.id})}),V=Y.fn("Pty.list")(function*(){let G=yield*v.get(Q);return Array.from(G.sessions.values()).map((z)=>z.info)}),B=Y.fn("Pty.get")(function*(G){return(yield*v.get(Q)).sessions.get(G)?.info}),D=Y.fn("Pty.create")(function*(G){let z=yield*v.get(Q),O=yield*P0.make(),P=l8.ascending(),w=G.command||y1.preferred(),L=G.args||[];if(y1.login(w))L.push("-l");let F=G.cwd||z.dir,U=yield*Z.trigger("shell.env",{cwd:F},{env:{}}),y={...q4(),...G.env,...U.env,TERM:"xterm-256color",QITQODE_TERMINAL:"1"};if(process.platform==="win32")y.LC_ALL="C.UTF-8",y.LC_CTYPE="C.UTF-8",y.LANG="C.UTF-8";c8.info("creating session",{id:P,cmd:w,args:L,cwd:F});let{spawn:S}=yield*Y.promise(()=>oG()),I=yield*Y.sync(()=>S(w,L,{name:"xterm-256color",cwd:F,env:y})),M={id:P,title:G.title||`Terminal ${P.slice(-4)}`,command:w,args:L,cwd:F,status:"running",pid:I.pid},f={info:M,process:I,buffer:"",bufferCursor:0,cursor:0,subscribers:new Map};return z.sessions.set(P,f),I.onData(S2.bind((b)=>{f.cursor+=b.length;for(let[h,N]of f.subscribers.entries()){if(N.readyState!==1){f.subscribers.delete(h);continue}if(OZ(N)!==h){f.subscribers.delete(h);continue}try{N.send(b)}catch{f.subscribers.delete(h)}}if(f.buffer+=b,f.buffer.length<=oJ)return;let k=f.buffer.length-oJ;f.buffer=f.buffer.slice(k),f.bufferCursor+=k})),I.onExit(S2.bind(({exitCode:b})=>{if(f.info.status==="exited")return;c8.info("session exited",{id:P,exitCode:b}),f.info.status="exited",O.fork($.publish(o8.Exited,{id:P,exitCode:b})),O.fork(J(P))})),yield*$.publish(o8.Created,{info:M}),M}),H=Y.fn("Pty.update")(function*(G,z){let P=(yield*v.get(Q)).sessions.get(G);if(!P)return;if(z.title)P.info.title=z.title;if(z.size)P.process.resize(z.size.cols,z.size.rows);return yield*$.publish(o8.Updated,{info:P.info}),P.info}),W=Y.fn("Pty.resize")(function*(G,z,O){let w=(yield*v.get(Q)).sessions.get(G);if(w&&w.info.status==="running")w.process.resize(z,O)}),K=Y.fn("Pty.write")(function*(G,z){let P=(yield*v.get(Q)).sessions.get(G);if(P&&P.info.status==="running")P.process.write(z)}),j=Y.fn("Pty.connect")(function*(G,z,O){let w=(yield*v.get(Q)).sessions.get(G);if(!w){z.close();return}c8.info("client connected to session",{id:G});let L=OZ(z);w.subscribers.delete(L),w.subscribers.set(L,z);let F=()=>{w.subscribers.delete(L)},U=w.bufferCursor,y=w.cursor,S=O===-1?y:typeof O==="number"&&Number.isSafeInteger(O)?Math.max(0,O):0,I=(()=>{if(!w.buffer)return"";if(S>=y)return"";let M=Math.max(0,S-U);if(M>=w.buffer.length)return"";return w.buffer.slice(M)})();if(I)try{for(let M=0;M<I.length;M+=uJ)z.send(I.slice(M,M+uJ))}catch{F(),z.close();return}try{z.send(cG(y))}catch{F(),z.close();return}return{onMessage:(M)=>{w.process.write(typeof M==="string"?M:new TextDecoder().decode(M))},onClose:()=>{c8.info("client disconnected from session",{id:G}),F()}}});return Y7.of({list:V,get:B,create:D,update:H,remove:J,resize:W,write:K,connect:j})})),iG=pJ.pipe(_.provide(u.layer),_.provide(K2.defaultLayer));var n8={};L2(n8,{layer:()=>aJ,defaultLayer:()=>rG,Service:()=>V7,MAX_PRE_REACT:()=>nJ,MAX_POST_REACT:()=>sJ,Actor:()=>n8});var Q7=($,Z,X)=>Y.uninterruptible(Y.gen(function*(){let Q=yield*M2.Service;yield*Q.updateStatus($,Z,{status:"running"}).pipe(Y.ignore);let J=yield*X.pipe(Y.interruptible,Y.exit);if(u2.isSuccess(J))return yield*Q.updateStatus($,Z,{status:"idle",lastOutcome:"success",lastError:void 0}).pipe(Y.ignore),J.value;let V=J.cause,B=G2.hasInterruptsOnly(V);return yield*Q.updateStatus($,Z,{status:"idle",lastOutcome:B?"cancelled":"failure",lastError:B?void 0:nG(V)}).pipe(Y.ignore),yield*Y.failCause(V)}));function nG($){return G2.pretty($)}var J7=s.create({service:"actor.spawn"}),nJ=3,sJ=3,aG=`
543
543
 
544
544
  ---
545
545
 
@@ -569,7 +569,7 @@ This format lets the spawning agent and the checkpoint writer extract your progr
569
569
  `).join(""))});return u$.set($,Q),Q.finally(()=>{if(u$.get($)===Q)u$.delete($)})}var VH=/^wf_[0-9A-Za-z]+$/,BV=($)=>{if(!VH.test($))throw Error(`invalid workflow runID: ${JSON.stringify($)}`);return $},WV=($)=>xZ.join(s8(),`${BV($)}.js`),wZ=($)=>xZ.join(s8(),`${BV($)}.jsonl`);function KV($){return{runID:$.id,sessionID:$.session_id,name:$.name,status:$.status,running:$.running,succeeded:$.succeeded,failed:$.failed,...$.current_phase?{currentPhase:$.current_phase}:{},...$.parent_actor_id?{parentActorID:$.parent_actor_id}:{},...$.args!==null&&$.args!==void 0?{args:$.args}:{},...$.script_sha?{scriptSha:$.script_sha}:{},...$.agent_timeout_ms!==null&&$.agent_timeout_ms!==void 0?{agentTimeoutMs:$.agent_timeout_ms}:{},...$.error?{error:$.error}:{},createdAt:$.time_created,updatedAt:$.time_updated}}var BH=($)=>Y.sync(()=>a2.use((Z)=>Z.insert(j0).values({id:$.runID,session_id:$.sessionID,name:$.name,status:"running",running:0,succeeded:0,failed:0,parent_actor_id:$.parentActorID??null,args:$.args??null,script_sha:$.scriptSha??null,agent_timeout_ms:$.agentTimeoutMs??null}).onConflictDoUpdate({target:j0.id,set:{status:"running",running:0,succeeded:0,failed:0,script_sha:$.scriptSha??null,...$.agentTimeoutMs!==void 0?{agent_timeout_ms:$.agentTimeoutMs}:{}}}).run())),WH=($)=>Y.sync(()=>a2.use((Z)=>Z.update(j0).set({current_phase:$.phase}).where(G0(j0.id,$.runID)).run())),KH=($)=>Y.sync(()=>a2.use((Z)=>Z.update(j0).set({running:$.running,succeeded:$.succeeded,failed:$.failed}).where(G0(j0.id,$.runID)).run())),GH=($)=>Y.sync(()=>a2.use((Z)=>Z.update(j0).set({status:$.status,...$.error?{error:$.error}:{}}).where(G0(j0.id,$.runID)).run())),HH=($)=>Y.sync(()=>a2.use((Z)=>{return(($?.sessionID)?Z.select().from(j0).where(G0(j0.session_id,$.sessionID)).orderBy(E8(j0.time_created)).all():Z.select().from(j0).orderBy(E8(j0.time_created)).all()).map(KV)})),jH=($)=>Y.sync(()=>a2.use((Z)=>{let X=Z.select().from(j0).where(G0(j0.id,$)).get();return X?KV(X):void 0})),DH=($,Z)=>Y.promise(async()=>{await(await import("fs/promises")).mkdir(s8(),{recursive:!0}),await Bun.write(WV($),Z)}),yH=($)=>Y.promise(()=>Bun.file(WV($)).text()),OH=($,Z)=>Y.promise(()=>VV($,[Z])),FH=($,Z)=>Y.promise(()=>VV($,Z)),PH=($)=>Y.promise(async()=>{let Z=Bun.file(wZ($));if(!await Z.exists())return{results:new Map,pass:1};let X=await Z.text(),Q=new Map,J=0;for(let V of X.split(`
570
570
  `)){if(!V)continue;let B;try{B=JSON.parse(V)}catch{continue}if(typeof B.pass==="number"&&B.pass>J)J=B.pass;if(B.t==="agent")Q.set(B.key,B.result)}return{results:Q,pass:J+1}}),zH=($)=>Y.promise(async()=>{let X=(u$.get($)??Promise.resolve()).catch(()=>{}).then(async()=>{await(await import("fs/promises")).mkdir(s8(),{recursive:!0}),await Bun.write(wZ($),"")});u$.set($,X);try{await X}finally{if(u$.get($)===X)u$.delete($)}}),v2={recordStart:BH,recordPhase:WH,flushCounters:KH,recordTerminal:GH,list:HH,load:jH,writeScript:DH,readScript:yH,appendJournal:OH,appendJournalSync:FH,loadJournal:PH,clearJournal:zH};class bZ{#$=new Map;get($){return this.#$.get($)}set($){return this.#$.set($.runID,$),$}values(){return this.#$.values()}clear(){this.#$.clear()}}function GV($){let Z=(V)=>Y.gen(function*(){if(V.status!=="running")return;if(yield*X(V),yield*$.flushNow(V),yield*v2.recordTerminal({runID:V.runID,status:"cancelled"}).pipe(Y.ignore),V.fiber)yield*i8.interrupt(V.fiber);V.status="cancelled",yield*$.bus.publish(B7,{sessionID:V.sessionID,runID:V.runID,status:"cancelled"}),yield*k2.succeed(V.deferred,{status:"cancelled"})}).pipe(Y.provideService(I0,V.instance)),X=(V)=>Y.gen(function*(){let B=Q$.current;if(B)yield*Y.forEach([...V.childActorIDs],(D)=>B.cancel(V.sessionID,D,"graceful").pipe(Y.ignore),{concurrency:"unbounded",discard:!0});yield*Y.forEach([...V.worktrees],(D)=>$.worktree.remove({directory:D}).pipe(Y.ignore),{concurrency:"unbounded",discard:!0}),V.worktrees.clear(),yield*Y.forEach([...V.childRunIDs],(D)=>Y.gen(function*(){let H=$.runs.get(D);if(H&&H.status==="running")yield*Z(H)}).pipe(Y.ignore),{concurrency:"unbounded",discard:!0})}).pipe(Y.provideService(I0,V.instance));return{reclaim:X,cancelEntry:Z,complete:(V)=>Y.gen(function*(){if(V.entry.status="completed",yield*$.flushNow(V.entry),yield*v2.recordTerminal({runID:V.entry.runID,status:"completed"}).pipe(Y.ignore),yield*$.bus.publish(B7,{sessionID:V.sessionID,runID:V.entry.runID,status:"completed"}),V.notifyOnTerminal!==!1)yield*$.inbox.send({receiverSessionID:V.sessionID,receiverActorID:V.parentActorID,senderSessionID:V.sessionID,senderActorID:"workflow",type:"actor_notification",content:`Workflow completed. run_id: ${V.entry.runID}
571
571
  `+JSON.stringify(V.result??null).slice(0,4000)}).pipe(Y.ignore);yield*k2.succeed(V.entry.deferred,{status:"completed",result:V.result})}).pipe(Y.provideService(I0,V.entry.instance)),fail:(V)=>Y.gen(function*(){if(yield*X(V.entry),V.entry.status="failed",yield*$.flushNow(V.entry),yield*v2.recordTerminal({runID:V.entry.runID,status:"failed",error:V.error}).pipe(Y.ignore),yield*$.bus.publish(B7,{sessionID:V.sessionID,runID:V.entry.runID,status:"failed",error:V.error}),V.notifyOnTerminal!==!1)yield*$.inbox.send({receiverSessionID:V.sessionID,receiverActorID:V.parentActorID,senderSessionID:V.sessionID,senderActorID:"workflow",type:"actor_notification",content:`Workflow failed. run_id: ${V.entry.runID}
572
- error: ${V.error}`}).pipe(Y.ignore);yield*k2.succeed(V.entry.deferred,{status:"failed",error:V.error})}).pipe(Y.provideService(I0,V.entry.instance))}}import qH from"os";function LZ($){let Z=0,X=[],Q=()=>{Z--;let J=X.shift();if(J)J()};return{run(J){return new Promise((V,B)=>{let D=()=>{Z++,J().then((H)=>{Q(),V(H)},(H)=>{Q(),B(H)})};if(Z<$)D();else X.push(D)})}}}function HV(){let $=qH.cpus().length;return Math.min(16,2*Math.max(1,$>0?$:4))}function jV($,Z){return Y.gen(function*(){if(Z)yield*v2.clearJournal($).pipe(Y.ignore);let X=yield*v2.loadJournal($);return{results:X.results,pass:X.pass,occurrences:new Map}})}function DV($,Z){let X=$.occurrences.get(Z)??0;return $.occurrences.set(Z,X+1),Z+":"+X}function yV($,Z,X,Q){return v2.appendJournalSync($,[{t:"agent",key:X,result:Q,pass:Z.pass}]).pipe(Y.ignore)}var OV=Symbol("straggler-timeout");function PV($){let Z=(H,W,K,j)=>{let G=W.timeoutMs??$.runAgentTimeoutMs;if(!G||G<=0)return K;return Y.raceFirst(K,Y.sleep(`${G} millis`).pipe(Y.as(OV))).pipe(Y.flatMap((z)=>z===OV?Y.gen(function*(){let O=$.getActor();if(O)yield*O.cancel($.sessionID,H,"graceful").pipe(Y.ignore);return yield*Y.sync(()=>{try{j?.()}catch{}}),null}):Y.succeed(z)))},X=(H,W,K={})=>{try{$.bridge.fork($.bus.publish(XV,{sessionID:$.sessionID,runID:$.runID,actorID:K.actorID,agentType:H.agentType??"general",label:H.label,phase:H.phase??$.entry.currentPhase,reason:W,errorMessage:K.errorMessage}).pipe(Y.ignore))}catch{}},Q=(H)=>H.label?H.phase?`[${H.phase}] ${H.label}`:H.label:H.phase?`[${H.phase}]`:void 0,J=(H,W,K)=>({mode:"subagent",sessionID:$.sessionID,agentType:H.agentType??"general",description:Q(H),task:W,context:"none",tools:H.tools?[...H.tools]:"INHERIT",background:!0,parentActorID:$.parentActorID,model:K,onActorID:(j)=>$.entry.childActorIDs.add(j),...H.schema?{format:{type:"json_schema",schema:H.schema,retryCount:2}}:{}}),V=async(H,W,K,j)=>{$.entry.running++,$.scheduleFlush($.entry);let G="actor-error",z,O,P=await $.bridge.promise(Y.gen(function*(){let w=yield*H.spawn(J(K,W,j));z=w.actorID;let L=yield*Z(w.actorID,K,k2.await(w.outcome).pipe(Y.map((F)=>{if(F.status!=="success")return G="actor-error",O=F.error,null;let U=K.schema?F.structured??null:F.structured??F.finalText??null;if(U===null)G="no-deliverable";return U})),()=>{G="timeout"});return $.entry.childActorIDs.delete(w.actorID),L})).catch((w)=>{return G="spawn-reject",O=w instanceof Error?w.message:String(w),null});if($.entry.running--,P!==null)$.entry.succeeded++;else $.entry.failed++,X(K,G,{actorID:z,errorMessage:O});return $.scheduleFlush($.entry),P},B=async(H,W,K,j)=>{let G="actor-error",z,O,P=await $.bridge.promise(Y.gen(function*(){let b=yield*$.worktree.makeWorktreeInfo();return yield*$.worktree.createFromInfo(b),b})).catch((b)=>{return O=b instanceof Error?b.message:String(b),null});if(!P)return X(K,"spawn-reject",{errorMessage:O}),null;$.entry.worktrees.add(P.directory);let w=await $.bridge.promise($.worktree.head(P.directory)).catch(()=>""),L=await S2.provide({directory:P.directory,fn:()=>Promise.resolve(S2.current)}),F=await $.bridge.promise(FV().pipe(Y.provideService(I0,L)));$.entry.running++,$.scheduleFlush($.entry);let U=await S2.provide({directory:P.directory,fn:()=>F.promise(Y.gen(function*(){let b=yield*H.spawn(J(K,W,j));z=b.actorID;let k=yield*Z(b.actorID,K,k2.await(b.outcome),()=>{G="timeout"});if($.entry.childActorIDs.delete(b.actorID),k===null)return null;if(k.status!=="success")G="actor-error",O=k.error;return{actorID:b.actorID,outcome:k}})).catch((b)=>{return G="spawn-reject",O=b instanceof Error?b.message:String(b),null})}).catch((b)=>{return G="spawn-reject",O=b instanceof Error?b.message:String(b),null}),y=!!U&&U.outcome.status==="success";if($.entry.running--,y)$.entry.succeeded++;else $.entry.failed++,X(K,G,{actorID:z,errorMessage:O});$.scheduleFlush($.entry);let S=U&&U.outcome.status==="success"?K.schema?U.outcome.structured??null:U.outcome.structured??U.outcome.finalText??null:null,I=w!==""&&await $.bridge.promise($.worktree.isPristine(P.directory,w)).catch(()=>!1);if(!(y&&!I))return await $.bridge.promise($.worktree.remove({directory:P.directory})).catch(()=>{return}),$.entry.worktrees.delete(P.directory),y?S:null;let f={branch:P.branch,directory:P.directory,changed:!0};if(S&&typeof S==="object"&&!Array.isArray(S))return{...S,_worktree:f};return{_worktree:f,result:S}},D=async(H,W,K)=>{if($.entry.agentCount>=$.lifecycleCap)return $.warnCapOnce(),X(H,"over-cap"),null;$.entry.agentCount++;let j=$.getActor();if(!j)throw Error("Actor service unavailable");let G=await $.bridge.promise($.resolveAgentModel(H.model,$.defaultModel,$.entry.warnedModelRefs));return K(j,W,H,G)};return(H,W)=>{let K=W??{},j=String(H);if(K.isolation!=="worktree"){let G=JV(j,{agentType:K.agentType,model:K.model,schema:K.schema,phase:K.phase}),z=DV($.journal,G);if($.journal.results.has(z))return $.entry.succeeded++,$.scheduleFlush($.entry),Promise.resolve($.journal.results.get(z));return(async()=>{let O=await $.semaphore.run(async()=>$.globalSemaphore.run(async()=>D(K,j,V)));if(O!==null)await Y.runPromise(yV($.runID,$.journal,z,O));return O})()}return $.semaphore.run(async()=>$.globalSemaphore.run(async()=>D(K,j,B)))}}async function zV($){let Z=UZ(await $),[X,Q,{QuickJSWASMModule:J}]=await Promise.all([Z.importModuleLoader().then(UZ),Z.importFFI(),import("./chunk-zy9w1vkc.js").then(UZ)]),V=await X();V.type="sync";let B=new Q(V);return new J(V,B)}function UZ($){return $&&"default"in $&&$.default?$.default&&"default"in $.default&&$.default.default?$.default.default:$.default:$}function qV($){let Z=typeof $=="number"?$:$.getTime();return function(){return Date.now()>Z}}var NH={type:"sync",importFFI:()=>import("./chunk-xthkjax9.js").then(($)=>$.QuickJSFFI),importModuleLoader:()=>import("./chunk-pp6vhqrr.js").then(($)=>$.default)},NV=NH;var xH=zV(NV),xV=43200000,wH=67108864,bH=2654435769,LH=`
572
+ error: ${V.error}`}).pipe(Y.ignore);yield*k2.succeed(V.entry.deferred,{status:"failed",error:V.error})}).pipe(Y.provideService(I0,V.entry.instance))}}import qH from"os";function LZ($){let Z=0,X=[],Q=()=>{Z--;let J=X.shift();if(J)J()};return{run(J){return new Promise((V,B)=>{let D=()=>{Z++,J().then((H)=>{Q(),V(H)},(H)=>{Q(),B(H)})};if(Z<$)D();else X.push(D)})}}}function HV(){let $=qH.cpus().length;return Math.min(16,2*Math.max(1,$>0?$:4))}function jV($,Z){return Y.gen(function*(){if(Z)yield*v2.clearJournal($).pipe(Y.ignore);let X=yield*v2.loadJournal($);return{results:X.results,pass:X.pass,occurrences:new Map}})}function DV($,Z){let X=$.occurrences.get(Z)??0;return $.occurrences.set(Z,X+1),Z+":"+X}function yV($,Z,X,Q){return v2.appendJournalSync($,[{t:"agent",key:X,result:Q,pass:Z.pass}]).pipe(Y.ignore)}var OV=Symbol("straggler-timeout");function PV($){let Z=(H,W,K,j)=>{let G=W.timeoutMs??$.runAgentTimeoutMs;if(!G||G<=0)return K;return Y.raceFirst(K,Y.sleep(`${G} millis`).pipe(Y.as(OV))).pipe(Y.flatMap((z)=>z===OV?Y.gen(function*(){let O=$.getActor();if(O)yield*O.cancel($.sessionID,H,"graceful").pipe(Y.ignore);return yield*Y.sync(()=>{try{j?.()}catch{}}),null}):Y.succeed(z)))},X=(H,W,K={})=>{try{$.bridge.fork($.bus.publish(XV,{sessionID:$.sessionID,runID:$.runID,actorID:K.actorID,agentType:H.agentType??"general",label:H.label,phase:H.phase??$.entry.currentPhase,reason:W,errorMessage:K.errorMessage}).pipe(Y.ignore))}catch{}},Q=(H)=>H.label?H.phase?`[${H.phase}] ${H.label}`:H.label:H.phase?`[${H.phase}]`:void 0,J=(H,W,K)=>({mode:"subagent",sessionID:$.sessionID,agentType:H.agentType??"general",description:Q(H),task:W,context:"none",tools:H.tools?[...H.tools]:"INHERIT",background:!0,parentActorID:$.parentActorID,model:K,onActorID:(j)=>$.entry.childActorIDs.add(j),...H.schema?{format:{type:"json_schema",schema:H.schema,retryCount:2}}:{}}),V=async(H,W,K,j)=>{$.entry.running++,$.scheduleFlush($.entry);let G="actor-error",z,O,P=await $.bridge.promise(Y.gen(function*(){let w=yield*H.spawn(J(K,W,j));z=w.actorID;let L=yield*Z(w.actorID,K,k2.await(w.outcome).pipe(Y.map((F)=>{if(F.status!=="success")return G="actor-error",O=F.error,null;let U=K.schema?F.structured??null:F.structured??F.finalText??null;if(U===null)G="no-deliverable";return U})),()=>{G="timeout"});return $.entry.childActorIDs.delete(w.actorID),L})).catch((w)=>{return G="spawn-reject",O=w instanceof Error?w.message:String(w),null});if($.entry.running--,P!==null)$.entry.succeeded++;else $.entry.failed++,X(K,G,{actorID:z,errorMessage:O});return $.scheduleFlush($.entry),P},B=async(H,W,K,j)=>{let G="actor-error",z,O,P=await $.bridge.promise(Y.gen(function*(){let b=yield*$.worktree.makeWorktreeInfo();return yield*$.worktree.createFromInfo(b),b})).catch((b)=>{return O=b instanceof Error?b.message:String(b),null});if(!P)return X(K,"spawn-reject",{errorMessage:O}),null;$.entry.worktrees.add(P.directory);let w=await $.bridge.promise($.worktree.head(P.directory)).catch(()=>""),L=await S2.provide({directory:P.directory,fn:()=>Promise.resolve(S2.current)}),F=await $.bridge.promise(FV().pipe(Y.provideService(I0,L)));$.entry.running++,$.scheduleFlush($.entry);let U=await S2.provide({directory:P.directory,fn:()=>F.promise(Y.gen(function*(){let b=yield*H.spawn(J(K,W,j));z=b.actorID;let k=yield*Z(b.actorID,K,k2.await(b.outcome),()=>{G="timeout"});if($.entry.childActorIDs.delete(b.actorID),k===null)return null;if(k.status!=="success")G="actor-error",O=k.error;return{actorID:b.actorID,outcome:k}})).catch((b)=>{return G="spawn-reject",O=b instanceof Error?b.message:String(b),null})}).catch((b)=>{return G="spawn-reject",O=b instanceof Error?b.message:String(b),null}),y=!!U&&U.outcome.status==="success";if($.entry.running--,y)$.entry.succeeded++;else $.entry.failed++,X(K,G,{actorID:z,errorMessage:O});$.scheduleFlush($.entry);let S=U&&U.outcome.status==="success"?K.schema?U.outcome.structured??null:U.outcome.structured??U.outcome.finalText??null:null,I=w!==""&&await $.bridge.promise($.worktree.isPristine(P.directory,w)).catch(()=>!1);if(!(y&&!I))return await $.bridge.promise($.worktree.remove({directory:P.directory})).catch(()=>{return}),$.entry.worktrees.delete(P.directory),y?S:null;let f={branch:P.branch,directory:P.directory,changed:!0};if(S&&typeof S==="object"&&!Array.isArray(S))return{...S,_worktree:f};return{_worktree:f,result:S}},D=async(H,W,K)=>{if($.entry.agentCount>=$.lifecycleCap)return $.warnCapOnce(),X(H,"over-cap"),null;$.entry.agentCount++;let j=$.getActor();if(!j)throw Error("Actor service unavailable");let G=await $.bridge.promise($.resolveAgentModel(H.model,$.defaultModel,$.entry.warnedModelRefs));return K(j,W,H,G)};return(H,W)=>{let K=W??{},j=String(H);if(K.isolation!=="worktree"){let G=JV(j,{agentType:K.agentType,model:K.model,schema:K.schema,phase:K.phase}),z=DV($.journal,G);if($.journal.results.has(z))return $.entry.succeeded++,$.scheduleFlush($.entry),Promise.resolve($.journal.results.get(z));return(async()=>{let O=await $.semaphore.run(async()=>$.globalSemaphore.run(async()=>D(K,j,V)));if(O!==null)await Y.runPromise(yV($.runID,$.journal,z,O));return O})()}return $.semaphore.run(async()=>$.globalSemaphore.run(async()=>D(K,j,B)))}}async function zV($){let Z=UZ(await $),[X,Q,{QuickJSWASMModule:J}]=await Promise.all([Z.importModuleLoader().then(UZ),Z.importFFI(),import("./chunk-c5fa8cb1.js").then(UZ)]),V=await X();V.type="sync";let B=new Q(V);return new J(V,B)}function UZ($){return $&&"default"in $&&$.default?$.default&&"default"in $.default&&$.default.default?$.default.default:$.default:$}function qV($){let Z=typeof $=="number"?$:$.getTime();return function(){return Date.now()>Z}}var NH={type:"sync",importFFI:()=>import("./chunk-34p46th6.js").then(($)=>$.QuickJSFFI),importModuleLoader:()=>import("./chunk-yjk6zv2z.js").then(($)=>$.default)},NV=NH;var xH=zV(NV),xV=43200000,wH=67108864,bH=2654435769,LH=`
573
573
  globalThis.parallel = (thunks) =>
574
574
  Promise.all(thunks.map((t) => Promise.resolve().then(t)));
575
575
  globalThis.pipeline = (items, ...stages) =>
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ZP as a}from"./chunk-ee23d2nz.js";import"./chunk-3k2b05fv.js";export default a();