@qitqode/qitqode-android-arm64 0.1.28 → 0.1.29

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 (398) hide show
  1. package/bundle/{chunk-1rp1cvmc.js → chunk-0626rvy2.js} +1 -1
  2. package/bundle/chunk-07c1mvy1.js +2 -0
  3. package/bundle/{chunk-0nj8axbw.js → chunk-09j71kp6.js} +3 -3
  4. package/bundle/chunk-0p7qcm51.js +2 -0
  5. package/bundle/chunk-0pmb7zzh.js +2 -0
  6. package/bundle/{chunk-wz0zcddf.js → chunk-0wdtbn59.js} +2 -2
  7. package/bundle/{chunk-nt4e3em9.js → chunk-0xm85ayc.js} +1 -1
  8. package/bundle/{chunk-f2tdfry8.js → chunk-0yqbyres.js} +1 -1
  9. package/bundle/{chunk-1etdhr36.js → chunk-11d987sj.js} +1 -1
  10. package/bundle/{chunk-dhjp0zx2.js → chunk-18vygvnc.js} +1 -1
  11. package/bundle/{chunk-v965rsr8.js → chunk-19sa03c1.js} +2 -2
  12. package/bundle/{chunk-zyhdxggp.js → chunk-1d9f53sk.js} +2 -2
  13. package/bundle/{chunk-k7gq9bra.js → chunk-1fz0383p.js} +1 -1
  14. package/bundle/{chunk-j6emx6jn.js → chunk-1rn0vmvv.js} +2 -2
  15. package/bundle/chunk-1s9ctg0d.js +2 -0
  16. package/bundle/{chunk-g7rjtehn.js → chunk-1xw68zak.js} +1 -1
  17. package/bundle/{chunk-whxjkz9a.js → chunk-20d0cd1j.js} +2 -2
  18. package/bundle/chunk-2f9fn9xr.js +2 -0
  19. package/bundle/chunk-2fhcvfyg.js +2 -0
  20. package/bundle/{chunk-2ahqhh4z.js → chunk-2hw0jzv4.js} +1 -1
  21. package/bundle/{chunk-2jmxt3fb.js → chunk-2mjc44ev.js} +1 -1
  22. package/bundle/{chunk-yhk7d1j0.js → chunk-2p2ch1k2.js} +1 -1
  23. package/bundle/{chunk-jje0srjq.js → chunk-2p9py4rw.js} +1 -1
  24. package/bundle/{chunk-z37aqajx.js → chunk-2w20mhch.js} +1 -1
  25. package/bundle/{chunk-cdhmc0t0.js → chunk-2xxefrps.js} +1 -1
  26. package/bundle/{chunk-cwqd48xt.js → chunk-2ztdqtnk.js} +1 -1
  27. package/bundle/{chunk-zb0me4kk.js → chunk-31wxbws4.js} +1 -1
  28. package/bundle/{chunk-ppfjf7qx.js → chunk-3h4y7n1a.js} +1 -1
  29. package/bundle/chunk-3mfj0x4p.js +2 -0
  30. package/bundle/{chunk-2tnarng3.js → chunk-3n49y4kh.js} +1 -1
  31. package/bundle/{chunk-g1dwbvkg.js → chunk-3q6650we.js} +1 -1
  32. package/bundle/{chunk-1dwcga8g.js → chunk-3rt2k5sc.js} +1 -1
  33. package/bundle/chunk-3shnje9k.js +2 -0
  34. package/bundle/chunk-3tz1qhpt.js +2 -0
  35. package/bundle/{chunk-4sk0rmw3.js → chunk-3vmh2ge6.js} +1 -1
  36. package/bundle/{chunk-t2tgz0rc.js → chunk-43ae3chd.js} +2 -2
  37. package/bundle/chunk-44jpsp97.js +2 -0
  38. package/bundle/{chunk-smt14yjb.js → chunk-45jqjyk9.js} +1 -1
  39. package/bundle/chunk-4dtbdycg.js +2 -0
  40. package/bundle/{chunk-kfsb2stm.js → chunk-4fk4se02.js} +1 -1
  41. package/bundle/{chunk-yp0a8q29.js → chunk-4fspp5fg.js} +3 -3
  42. package/bundle/{chunk-24xc0dvv.js → chunk-4kpvceap.js} +1 -1
  43. package/bundle/{chunk-qjjch1zt.js → chunk-4mrz9b6d.js} +2 -2
  44. package/bundle/chunk-4pz8av2y.js +2 -0
  45. package/bundle/chunk-4r4xh8a6.js +2 -0
  46. package/bundle/{chunk-t12xrrfr.js → chunk-4vemws1t.js} +2 -2
  47. package/bundle/{chunk-m612agnk.js → chunk-4vze3djr.js} +1 -1
  48. package/bundle/{chunk-w87a3mzm.js → chunk-50w28xj1.js} +1 -1
  49. package/bundle/chunk-5hpq59t1.js +2 -0
  50. package/bundle/{chunk-d6r4xwtg.js → chunk-5n4hpc4f.js} +3 -3
  51. package/bundle/chunk-5s90ehww.js +2 -0
  52. package/bundle/{chunk-288hw03f.js → chunk-5z7mjwwa.js} +1 -1
  53. package/bundle/{chunk-ydp0q1hk.js → chunk-61yatzp8.js} +1 -1
  54. package/bundle/chunk-63kcg127.js +2 -0
  55. package/bundle/{chunk-b9za12y1.js → chunk-6528bthc.js} +1 -1
  56. package/bundle/{chunk-mgk9sh16.js → chunk-6bsgrr5h.js} +1 -1
  57. package/bundle/chunk-6fejrpht.js +2 -0
  58. package/bundle/{chunk-4qqkqrn9.js → chunk-6hdjkvr1.js} +2 -2
  59. package/bundle/{chunk-1t9jne14.js → chunk-6hmj972a.js} +1 -1
  60. package/bundle/{chunk-x1rx6fm7.js → chunk-6jewfaqa.js} +2 -2
  61. package/bundle/{chunk-y062spw2.js → chunk-6saj1dhz.js} +1 -1
  62. package/bundle/{chunk-n8h6x2en.js → chunk-6scqd8fh.js} +1 -1
  63. package/bundle/chunk-6zzdw7q1.js +2 -0
  64. package/bundle/{chunk-61zpnwv6.js → chunk-71pmrpkc.js} +1 -1
  65. package/bundle/{chunk-26nfphsg.js → chunk-74zgcxeg.js} +1 -1
  66. package/bundle/chunk-78m8rayq.js +2 -0
  67. package/bundle/{chunk-2km50rd3.js → chunk-7926bzm7.js} +1 -1
  68. package/bundle/chunk-7j6p5j2g.js +2 -0
  69. package/bundle/{chunk-x7ers083.js → chunk-7m8fdp5p.js} +1 -1
  70. package/bundle/{chunk-k7g3h9tn.js → chunk-7mc8nxve.js} +1 -1
  71. package/bundle/chunk-7tjd6ba1.js +2 -0
  72. package/bundle/{chunk-cmbxrgyx.js → chunk-7wthn44y.js} +2 -2
  73. package/bundle/{chunk-kqn9h2gk.js → chunk-81h5f8ev.js} +1 -1
  74. package/bundle/{chunk-drs1gv2b.js → chunk-88dhcv37.js} +1 -1
  75. package/bundle/{chunk-h0rpmne5.js → chunk-89f8v2y8.js} +1 -1
  76. package/bundle/{chunk-fnbpap62.js → chunk-8d2ddmf0.js} +1 -1
  77. package/bundle/chunk-8d8efdry.js +2 -0
  78. package/bundle/{chunk-a1pw9r6f.js → chunk-8f0g7d7k.js} +1 -1
  79. package/bundle/{chunk-kb6w3wbd.js → chunk-8jzjvmaz.js} +1 -1
  80. package/bundle/{chunk-qhc90p4a.js → chunk-8k55xz7z.js} +1 -1
  81. package/bundle/{chunk-f45tp3e3.js → chunk-8kz3n8ye.js} +1 -1
  82. package/bundle/chunk-93jxndr8.js +2 -0
  83. package/bundle/{chunk-ebrt1me3.js → chunk-94qmhz2p.js} +2 -2
  84. package/bundle/{chunk-a2qz9m10.js → chunk-95qs7wnz.js} +1 -1
  85. package/bundle/{chunk-scsf8r98.js → chunk-97h0jx8y.js} +1 -1
  86. package/bundle/{chunk-vj62pc0h.js → chunk-98vfbn0h.js} +1 -1
  87. package/bundle/chunk-99ve54r6.js +2 -0
  88. package/bundle/{chunk-3bmzjznz.js → chunk-9atkgkaq.js} +1 -1
  89. package/bundle/{chunk-qrey2gwb.js → chunk-9epjgend.js} +2 -2
  90. package/bundle/{chunk-2dzk5txw.js → chunk-9kjj44cr.js} +1 -1
  91. package/bundle/chunk-9ksaqyb2.js +2 -0
  92. package/bundle/chunk-9p7t748e.js +2 -0
  93. package/bundle/{chunk-4yawrap2.js → chunk-a2g69pv6.js} +1 -1
  94. package/bundle/{chunk-1bhvt33f.js → chunk-a2qerqgd.js} +1 -1
  95. package/bundle/chunk-a69jgepp.js +2 -0
  96. package/bundle/{chunk-a1p2f16h.js → chunk-a8p9aggx.js} +2 -2
  97. package/bundle/{chunk-x9s04nze.js → chunk-a94s0jks.js} +1 -1
  98. package/bundle/{chunk-d5bxan80.js → chunk-abtn6nec.js} +1 -1
  99. package/bundle/chunk-ar310tc3.js +2 -0
  100. package/bundle/{chunk-zcm2jdr5.js → chunk-asmfntjm.js} +1 -1
  101. package/bundle/chunk-at03h9eq.js +2 -0
  102. package/bundle/{chunk-b8tw709r.js → chunk-awav98j0.js} +1 -1
  103. package/bundle/chunk-ay9p70xx.js +2 -0
  104. package/bundle/{chunk-ab6cabxh.js → chunk-az9hsk6z.js} +1 -1
  105. package/bundle/{chunk-9j1qqdr2.js → chunk-azx0zxnx.js} +1 -1
  106. package/bundle/{chunk-ct48575c.js → chunk-b1ntb3dh.js} +1 -1
  107. package/bundle/{chunk-qjn86fc0.js → chunk-b20xjnpw.js} +1 -1
  108. package/bundle/{chunk-b0syck9r.js → chunk-b4qd109w.js} +1 -1
  109. package/bundle/chunk-b6dsv601.js +3 -0
  110. package/bundle/{chunk-knpt9n8f.js → chunk-b73s2h43.js} +1 -1
  111. package/bundle/{chunk-04h4afhf.js → chunk-b9hstp7h.js} +1 -1
  112. package/bundle/{chunk-vg2fmyje.js → chunk-b9nwaaqs.js} +2 -2
  113. package/bundle/chunk-bajtytm5.js +2 -0
  114. package/bundle/chunk-bh8v3mfg.js +2 -0
  115. package/bundle/chunk-bn0h9dny.js +10 -0
  116. package/bundle/chunk-bp8sxnrm.js +2 -0
  117. package/bundle/{chunk-4tbwha3m.js → chunk-bsf6n350.js} +2 -2
  118. package/bundle/{chunk-xpc2zgj7.js → chunk-bv8pf0m1.js} +2 -2
  119. package/bundle/chunk-bw5e8thn.js +2 -0
  120. package/bundle/{chunk-c01z3cvg.js → chunk-bx6kyvg7.js} +1 -1
  121. package/bundle/{chunk-wsy0m70r.js → chunk-byc7ev8p.js} +1 -1
  122. package/bundle/{chunk-xrxyrr00.js → chunk-bzgj60w4.js} +1 -1
  123. package/bundle/{chunk-yq3m8190.js → chunk-bzrsnv2k.js} +2 -2
  124. package/bundle/{chunk-ecn8gbtz.js → chunk-c19t7e8s.js} +1 -1
  125. package/bundle/chunk-c8ajbhv3.js +2 -0
  126. package/bundle/{chunk-y88xh6w3.js → chunk-c8n72r2k.js} +3 -3
  127. package/bundle/chunk-ccddzk10.js +2 -0
  128. package/bundle/{chunk-j5kb0y1m.js → chunk-cd867geb.js} +1 -1
  129. package/bundle/chunk-ce5t444d.js +2 -0
  130. package/bundle/{chunk-3nyqh1d6.js → chunk-cev2qj7w.js} +1 -1
  131. package/bundle/{chunk-7jbz3dgt.js → chunk-cfxjwfn4.js} +1 -1
  132. package/bundle/chunk-ch8cx9jn.js +2 -0
  133. package/bundle/{chunk-7ppd2phw.js → chunk-cjfgs1x8.js} +1 -1
  134. package/bundle/chunk-cm4jtnkg.js +2 -0
  135. package/bundle/chunk-cq7j5tv5.js +2 -0
  136. package/bundle/{chunk-1sgby720.js → chunk-csdm3n24.js} +1 -1
  137. package/bundle/{chunk-wy46mbwt.js → chunk-csyw14fj.js} +1 -1
  138. package/bundle/chunk-cttqh20d.js +2 -0
  139. package/bundle/chunk-cvvfa1jf.js +2 -0
  140. package/bundle/{chunk-btz9jvec.js → chunk-d0qqgxs4.js} +1 -1
  141. package/bundle/{chunk-8tc8x27z.js → chunk-d7t0bcvk.js} +6 -6
  142. package/bundle/{chunk-tj78jsp9.js → chunk-d86ma6zk.js} +1 -1
  143. package/bundle/{chunk-emtebxvs.js → chunk-dd3m74rc.js} +1 -1
  144. package/bundle/chunk-dfja6dj6.js +5 -0
  145. package/bundle/chunk-e3qtndrt.js +2 -0
  146. package/bundle/chunk-e8cac405.js +2 -0
  147. package/bundle/{chunk-371r2111.js → chunk-ed723mw1.js} +1 -1
  148. package/bundle/{chunk-3nwve06r.js → chunk-ef2b07fm.js} +1 -1
  149. package/bundle/{chunk-j9pcnkkq.js → chunk-ekndhwnn.js} +2 -2
  150. package/bundle/{chunk-dafbntks.js → chunk-eqcd9k9p.js} +122 -122
  151. package/bundle/chunk-ez92ah9y.js +2 -0
  152. package/bundle/{chunk-3j9hedmx.js → chunk-f29n7826.js} +1 -1
  153. package/bundle/chunk-fazvedgy.js +2 -0
  154. package/bundle/{chunk-eb9mytjq.js → chunk-fhdpp77n.js} +1 -1
  155. package/bundle/{chunk-04tw0r4s.js → chunk-fj7kd4gc.js} +1 -1
  156. package/bundle/{chunk-be216spx.js → chunk-fsy279s5.js} +2 -2
  157. package/bundle/{chunk-37n34pzd.js → chunk-g06rv5fq.js} +1 -1
  158. package/bundle/{chunk-pekm54ce.js → chunk-g0mbbysk.js} +1 -1
  159. package/bundle/{chunk-vn7nkrqb.js → chunk-g3ch14a1.js} +1 -1
  160. package/bundle/{chunk-ggqst87g.js → chunk-gd45tjbd.js} +1 -1
  161. package/bundle/chunk-gd5stg49.js +2 -0
  162. package/bundle/{chunk-ds69qc8b.js → chunk-geccvf9d.js} +1 -1
  163. package/bundle/{chunk-k2tamnfv.js → chunk-gf5pwww1.js} +1 -1
  164. package/bundle/{chunk-x067eetw.js → chunk-gjvymdhp.js} +1 -1
  165. package/bundle/chunk-gtzcm5sb.js +2 -0
  166. package/bundle/{chunk-ngchsw2g.js → chunk-h8chkene.js} +1 -1
  167. package/bundle/{chunk-m67tcnk4.js → chunk-hbtd620x.js} +1 -1
  168. package/bundle/{chunk-qc1w4b12.js → chunk-hd2kb05a.js} +1 -1
  169. package/bundle/{chunk-b3dqcbsc.js → chunk-hevb7k95.js} +1 -1
  170. package/bundle/{chunk-v2zp22r3.js → chunk-hgbkg85g.js} +1 -1
  171. package/bundle/{chunk-5fgx6fa4.js → chunk-hhgjbag9.js} +1 -1
  172. package/bundle/{chunk-12bssxd4.js → chunk-hn1f6rne.js} +2 -2
  173. package/bundle/{chunk-hj5y7fvk.js → chunk-hpfqnjfz.js} +1 -1
  174. package/bundle/{chunk-my7mn79h.js → chunk-j0znryc6.js} +1 -1
  175. package/bundle/{chunk-09kba1hg.js → chunk-j2zay4da.js} +2 -2
  176. package/bundle/{chunk-48fvrggx.js → chunk-j5ymkhry.js} +1 -1
  177. package/bundle/{chunk-tr8sf0dk.js → chunk-jkm54mha.js} +1 -1
  178. package/bundle/{chunk-v4xcysh0.js → chunk-jntqzhxr.js} +1 -1
  179. package/bundle/{chunk-p68rwmhc.js → chunk-js9wdh67.js} +1 -1
  180. package/bundle/{chunk-m02zt1a3.js → chunk-jwtev7b7.js} +2 -2
  181. package/bundle/chunk-k095hd3c.js +2 -0
  182. package/bundle/{chunk-q1v2pytx.js → chunk-k16s2dnx.js} +1 -1
  183. package/bundle/{chunk-sermjas1.js → chunk-k20nrwbg.js} +1 -1
  184. package/bundle/{chunk-6qy1ghrx.js → chunk-k7dcfqjs.js} +1 -1
  185. package/bundle/chunk-kfgn4apg.js +2 -0
  186. package/bundle/{chunk-jm1ptn8n.js → chunk-kkae8ead.js} +1 -1
  187. package/bundle/{chunk-m1h5a4vg.js → chunk-ktqrbbkh.js} +1 -1
  188. package/bundle/{chunk-jx27xrk1.js → chunk-kw09hbrb.js} +1 -1
  189. package/bundle/chunk-kzrw6h8t.js +2 -0
  190. package/bundle/{chunk-612f97vv.js → chunk-m2ny1en7.js} +4 -4
  191. package/bundle/{chunk-wnqwb6fd.js → chunk-m6wceqay.js} +1 -1
  192. package/bundle/{chunk-d7qscj5p.js → chunk-ma0m6kpj.js} +1 -1
  193. package/bundle/{chunk-g3dhsmbt.js → chunk-mb4wvwfw.js} +3 -3
  194. package/bundle/chunk-mjrvj2cg.js +2 -0
  195. package/bundle/chunk-mpebdv59.js +2 -0
  196. package/bundle/chunk-n20v44zr.js +2 -0
  197. package/bundle/{chunk-5syxjhg3.js → chunk-n34y5gp6.js} +2 -2
  198. package/bundle/{chunk-27yxgy03.js → chunk-n3t52cz2.js} +1 -1
  199. package/bundle/{chunk-szr0f7k2.js → chunk-n4gjpgnk.js} +1 -1
  200. package/bundle/{chunk-5qam3c8r.js → chunk-n5sh2790.js} +1 -1
  201. package/bundle/{chunk-5fz8tph5.js → chunk-n86s4fw4.js} +1 -1
  202. package/bundle/{chunk-6hv59ere.js → chunk-ndmrg80b.js} +1 -1
  203. package/bundle/{chunk-13hz1kvh.js → chunk-nfzmvy30.js} +1 -1
  204. package/bundle/chunk-nksathh4.js +2 -0
  205. package/bundle/{chunk-yjtdgcq5.js → chunk-nv2r4cns.js} +1 -1
  206. package/bundle/{chunk-xs3xtz6x.js → chunk-nxn4arcf.js} +1 -1
  207. package/bundle/{chunk-xvfpzmrf.js → chunk-p5360c2q.js} +1 -1
  208. package/bundle/{chunk-1qshjfzm.js → chunk-p7h2qd7z.js} +1 -1
  209. package/bundle/{chunk-2rs39vj2.js → chunk-pg8dz1rq.js} +1 -1
  210. package/bundle/{chunk-3dvd1bb6.js → chunk-pq2prhb2.js} +1 -1
  211. package/bundle/{chunk-scnz207s.js → chunk-ps6jk326.js} +1 -1
  212. package/bundle/{chunk-gm85xefs.js → chunk-pycjksh4.js} +1 -1
  213. package/bundle/{chunk-gf0pdgjs.js → chunk-q0xzbad1.js} +1 -1
  214. package/bundle/chunk-q14890p6.js +2 -0
  215. package/bundle/chunk-q4n02cwv.js +2 -0
  216. package/bundle/{chunk-1t6bvbgy.js → chunk-q5363rr9.js} +2 -2
  217. package/bundle/chunk-q7s17j1b.js +2 -0
  218. package/bundle/{chunk-msegx0t7.js → chunk-qje3683x.js} +1 -1
  219. package/bundle/{chunk-y2v09y71.js → chunk-qk9vccja.js} +1 -1
  220. package/bundle/chunk-qm07wesh.js +2 -0
  221. package/bundle/{chunk-chmrvbbj.js → chunk-qredfmch.js} +1 -1
  222. package/bundle/chunk-qrrg9v3d.js +2 -0
  223. package/bundle/{chunk-fzna6jdj.js → chunk-qsszerj7.js} +2 -2
  224. package/bundle/chunk-qtsmgjk7.js +2 -0
  225. package/bundle/{chunk-dfnv7vkn.js → chunk-qzcfjz9g.js} +1 -1
  226. package/bundle/{chunk-bss414qz.js → chunk-qzjpea91.js} +1 -1
  227. package/bundle/{chunk-gj7y56y6.js → chunk-r4mnbhe1.js} +1 -1
  228. package/bundle/chunk-rdqgss38.js +2 -0
  229. package/bundle/{chunk-z6dnv8g5.js → chunk-rf524gez.js} +1 -1
  230. package/bundle/{chunk-2q96x1t5.js → chunk-rptvpa1v.js} +1 -1
  231. package/bundle/{chunk-z8g819cz.js → chunk-rqgcz2zr.js} +1 -1
  232. package/bundle/{chunk-1m2e2w1q.js → chunk-rs1698xs.js} +1 -1
  233. package/bundle/chunk-rzc528ym.js +2 -0
  234. package/bundle/{chunk-xc5044tm.js → chunk-s1sepxdp.js} +1 -1
  235. package/bundle/{chunk-hk698g9e.js → chunk-s2za1n7h.js} +2 -2
  236. package/bundle/{chunk-c5e6sk9c.js → chunk-s6me101a.js} +1 -1
  237. package/bundle/chunk-sbv96mj0.js +3 -0
  238. package/bundle/{chunk-pdzpfkt0.js → chunk-sbx9z70j.js} +1 -1
  239. package/bundle/{chunk-e0152ayv.js → chunk-scqxmv8k.js} +1 -1
  240. package/bundle/{chunk-dq9kpj4a.js → chunk-sv48x9h8.js} +1 -1
  241. package/bundle/{chunk-q6ztpfcs.js → chunk-svrxk3vf.js} +2 -2
  242. package/bundle/{chunk-snm5q21k.js → chunk-t299e2aw.js} +2 -2
  243. package/bundle/{chunk-nzehfpxp.js → chunk-t35n89t9.js} +1 -1
  244. package/bundle/{chunk-ebcv65e3.js → chunk-t3q7qakr.js} +1 -1
  245. package/bundle/{chunk-mk6cddvd.js → chunk-t3tkp1em.js} +1 -1
  246. package/bundle/chunk-tge53d52.js +3 -0
  247. package/bundle/chunk-th78zcds.js +2 -0
  248. package/bundle/{chunk-5a5t01ka.js → chunk-thk93j3e.js} +1 -1
  249. package/bundle/{chunk-xck0sq3k.js → chunk-tj00kzk4.js} +1 -1
  250. package/bundle/chunk-tqsx2m1j.js +2 -0
  251. package/bundle/{chunk-anjg3mwn.js → chunk-tsb9g1nz.js} +1 -1
  252. package/bundle/chunk-tv26mwx5.js +2 -0
  253. package/bundle/{chunk-fkgv2hqd.js → chunk-v00cptj6.js} +1 -1
  254. package/bundle/chunk-v69n6mef.js +2 -0
  255. package/bundle/{chunk-7yrhe3xq.js → chunk-v7deh7aj.js} +1 -1
  256. package/bundle/{chunk-pxtqqmkc.js → chunk-v9bmpndq.js} +1 -1
  257. package/bundle/{chunk-g16zb3y1.js → chunk-v9xnk9pz.js} +1 -1
  258. package/bundle/chunk-vegwb3t0.js +2 -0
  259. package/bundle/chunk-w9seyn69.js +2 -0
  260. package/bundle/chunk-wanf4se3.js +2 -0
  261. package/bundle/chunk-wdhzmk1b.js +2 -0
  262. package/bundle/{chunk-3fx5jda0.js → chunk-wnwesaap.js} +1 -1
  263. package/bundle/chunk-wxqtda70.js +2 -0
  264. package/bundle/chunk-wzb6s9rk.js +2 -0
  265. package/bundle/chunk-x0dg9rg6.js +2 -0
  266. package/bundle/{chunk-mskwkcgj.js → chunk-x6nbck7p.js} +1 -1
  267. package/bundle/chunk-xd3xc1vv.js +3 -0
  268. package/bundle/{chunk-89q1y7tc.js → chunk-xhncwg5v.js} +1 -1
  269. package/bundle/{chunk-5g8108nf.js → chunk-xk1nh1ay.js} +2 -2
  270. package/bundle/{chunk-qv2s39dv.js → chunk-xk7je9y8.js} +1 -1
  271. package/bundle/chunk-xmnzrzbs.js +2 -0
  272. package/bundle/{chunk-1fbeendk.js → chunk-xn5v8wgh.js} +1 -1
  273. package/bundle/{chunk-s07j8hfy.js → chunk-xn61fgrh.js} +1 -1
  274. package/bundle/chunk-xzf62kc6.js +2 -0
  275. package/bundle/{chunk-s3yna2wm.js → chunk-y212x7ws.js} +1 -1
  276. package/bundle/{chunk-6nbzdb0r.js → chunk-yaj9ywvz.js} +1 -1
  277. package/bundle/{chunk-n0mygdfp.js → chunk-yj73ehjd.js} +1 -1
  278. package/bundle/{chunk-aztre27e.js → chunk-yjj4cvqg.js} +1 -1
  279. package/bundle/{chunk-2abdrqrx.js → chunk-yk8kk25c.js} +1 -1
  280. package/bundle/{chunk-cafzcmrg.js → chunk-yn05n0az.js} +2 -2
  281. package/bundle/{chunk-89v6dgpp.js → chunk-yn576pje.js} +2 -2
  282. package/bundle/chunk-yned6vmd.js +3 -0
  283. package/bundle/{chunk-cvdxgsq1.js → chunk-yp3dj4wh.js} +1 -1
  284. package/bundle/{chunk-bvkq0a5q.js → chunk-ypthfv6d.js} +1 -1
  285. package/bundle/chunk-yra49yga.js +2 -0
  286. package/bundle/{chunk-srh4xvsj.js → chunk-yt2k9ga8.js} +1 -1
  287. package/bundle/chunk-ytye0p7f.js +2 -0
  288. package/bundle/chunk-yv2mxxbq.js +2 -0
  289. package/bundle/{chunk-phxrg7aw.js → chunk-yvqbewmc.js} +2 -2
  290. package/bundle/{chunk-h9pvnp5c.js → chunk-yyqrbv2f.js} +1 -1
  291. package/bundle/{chunk-2vepzgek.js → chunk-z160s5p5.js} +1 -1
  292. package/bundle/{chunk-df6a167w.js → chunk-z29fwg61.js} +1 -1
  293. package/bundle/chunk-z2fqqer0.js +2 -0
  294. package/bundle/chunk-z3qanc8m.js +2 -0
  295. package/bundle/{chunk-qvxvc2c2.js → chunk-z44m19vm.js} +1 -1
  296. package/bundle/{chunk-yfkvjphe.js → chunk-z4nay2ef.js} +1 -1
  297. package/bundle/{chunk-2bn4b42t.js → chunk-z5yrvg40.js} +1 -1
  298. package/bundle/{chunk-61c62e5s.js → chunk-zasd8cz8.js} +1 -1
  299. package/bundle/{chunk-ztc3gm8y.js → chunk-zbq60sw6.js} +1 -1
  300. package/bundle/chunk-zcagdtab.js +2 -0
  301. package/bundle/chunk-zervk6c5.js +2 -0
  302. package/bundle/{chunk-va316nee.js → chunk-zfd70p01.js} +1 -1
  303. package/bundle/{chunk-t22jbw8x.js → chunk-zqjp7jdd.js} +1 -1
  304. package/bundle/{chunk-6fp8a9ek.js → chunk-zqxmr01r.js} +1 -1
  305. package/bundle/index.js +3 -3
  306. package/bundle/parser.worker.js +2 -2
  307. package/bundle/worker.js +1 -1
  308. package/package.json +1 -1
  309. package/bundle/chunk-066eeq5q.js +0 -2
  310. package/bundle/chunk-07ws99b1.js +0 -2
  311. package/bundle/chunk-09c4ngag.js +0 -2
  312. package/bundle/chunk-0jgst767.js +0 -2
  313. package/bundle/chunk-0psrr9vp.js +0 -2
  314. package/bundle/chunk-1j73cnvz.js +0 -2
  315. package/bundle/chunk-1yddn03z.js +0 -2
  316. package/bundle/chunk-37s5hwtc.js +0 -2
  317. package/bundle/chunk-38g8yzw0.js +0 -2
  318. package/bundle/chunk-3bkd0ar3.js +0 -2
  319. package/bundle/chunk-457y2816.js +0 -2
  320. package/bundle/chunk-4amgp4yd.js +0 -3
  321. package/bundle/chunk-4sz3jbc5.js +0 -2
  322. package/bundle/chunk-6d9wsjxm.js +0 -2
  323. package/bundle/chunk-6q87abbr.js +0 -2
  324. package/bundle/chunk-730a2d1k.js +0 -2
  325. package/bundle/chunk-7bd0x9vf.js +0 -2
  326. package/bundle/chunk-7czkntef.js +0 -2
  327. package/bundle/chunk-7ex57nyh.js +0 -2
  328. package/bundle/chunk-7gpczxbh.js +0 -2
  329. package/bundle/chunk-7j0bgeh2.js +0 -2
  330. package/bundle/chunk-7py443fe.js +0 -2
  331. package/bundle/chunk-8815p61h.js +0 -2
  332. package/bundle/chunk-90q5sae0.js +0 -2
  333. package/bundle/chunk-92d9469t.js +0 -2
  334. package/bundle/chunk-9grvepmd.js +0 -2
  335. package/bundle/chunk-9hrh15p2.js +0 -2
  336. package/bundle/chunk-a7cxf56j.js +0 -2
  337. package/bundle/chunk-av6ezvxm.js +0 -2
  338. package/bundle/chunk-beksar7w.js +0 -2
  339. package/bundle/chunk-bg66rqrx.js +0 -2
  340. package/bundle/chunk-bkbngcvc.js +0 -2
  341. package/bundle/chunk-btneef3z.js +0 -2
  342. package/bundle/chunk-cy9s1ma5.js +0 -2
  343. package/bundle/chunk-cydewa1c.js +0 -2
  344. package/bundle/chunk-dpkynwgm.js +0 -3
  345. package/bundle/chunk-dvk2wwjj.js +0 -2
  346. package/bundle/chunk-e0jy9qxd.js +0 -2
  347. package/bundle/chunk-erg0ske8.js +0 -2
  348. package/bundle/chunk-f72pppr7.js +0 -2
  349. package/bundle/chunk-fff3151r.js +0 -2
  350. package/bundle/chunk-gk34kh8p.js +0 -2
  351. package/bundle/chunk-gn50xqbd.js +0 -2
  352. package/bundle/chunk-h602h2gx.js +0 -2
  353. package/bundle/chunk-h7s2w1e2.js +0 -2
  354. package/bundle/chunk-hmv2cdnz.js +0 -2
  355. package/bundle/chunk-hnb8v476.js +0 -2
  356. package/bundle/chunk-ht81ensf.js +0 -2
  357. package/bundle/chunk-hxgs0d4t.js +0 -2
  358. package/bundle/chunk-j59ktwny.js +0 -2
  359. package/bundle/chunk-jmz2mq3t.js +0 -2
  360. package/bundle/chunk-jr907144.js +0 -2
  361. package/bundle/chunk-k309zez0.js +0 -3
  362. package/bundle/chunk-k3epfxmq.js +0 -2
  363. package/bundle/chunk-k3fn3yed.js +0 -2
  364. package/bundle/chunk-k5q52wdq.js +0 -2
  365. package/bundle/chunk-kfsn9c7m.js +0 -2
  366. package/bundle/chunk-kpw6nghv.js +0 -2
  367. package/bundle/chunk-krhkrca9.js +0 -2
  368. package/bundle/chunk-m5ghbt5y.js +0 -2
  369. package/bundle/chunk-m8yv4sd2.js +0 -3
  370. package/bundle/chunk-mn41f9qv.js +0 -2
  371. package/bundle/chunk-mqjf9sbm.js +0 -2
  372. package/bundle/chunk-n5gwrrbb.js +0 -2
  373. package/bundle/chunk-nfjhem1c.js +0 -2
  374. package/bundle/chunk-nj4d554m.js +0 -11
  375. package/bundle/chunk-nxyyn2ra.js +0 -2
  376. package/bundle/chunk-p5tceb4k.js +0 -2
  377. package/bundle/chunk-qjgm3e2p.js +0 -2
  378. package/bundle/chunk-rmr38x2f.js +0 -5
  379. package/bundle/chunk-s1cnzvb2.js +0 -2
  380. package/bundle/chunk-sbyey0qb.js +0 -2
  381. package/bundle/chunk-sj5v361q.js +0 -2
  382. package/bundle/chunk-tpndnprb.js +0 -2
  383. package/bundle/chunk-vwxfgea7.js +0 -2
  384. package/bundle/chunk-w0kgcz1t.js +0 -2
  385. package/bundle/chunk-w9vh7rhg.js +0 -2
  386. package/bundle/chunk-wksczmes.js +0 -2
  387. package/bundle/chunk-wrfvqp2w.js +0 -2
  388. package/bundle/chunk-wsxta33r.js +0 -2
  389. package/bundle/chunk-xjyhtm8r.js +0 -2
  390. package/bundle/chunk-xxbqhg9n.js +0 -3
  391. package/bundle/chunk-yc1jk3rm.js +0 -2
  392. package/bundle/chunk-ygc5qegv.js +0 -2
  393. package/bundle/chunk-yjqmzm51.js +0 -2
  394. package/bundle/chunk-z4z8hk7e.js +0 -2
  395. package/bundle/chunk-z7y9pdj7.js +0 -2
  396. package/bundle/chunk-zqv7fx25.js +0 -2
  397. package/bundle/chunk-zt1nbwmm.js +0 -2
  398. package/bundle/chunk-zw0yh3dv.js +0 -2
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{Cp as K,fp as j,gp as R,hp as O,ip as A,op as y,tp as q,up as M,wp as C}from"./chunk-cmbxrgyx.js";import{lu as v,ou as D}from"./chunk-ebrt1me3.js";import{Bu as b,Hu as I,Su as d,zu as m}from"./chunk-whxjkz9a.js";import{eQ as T,fQ as _}from"./chunk-aztre27e.js";import P from"path";function pt(t){let e=t&&typeof t==="object"&&"cause"in t?t.cause??t:t;if(!(e instanceof I.RunFailedError))return{error:e,detail:b(e),missing:!1};let r=e.stderr.toString().split(/\r?\n/).map((o)=>o.trim()).filter(Boolean),n=r.filter((o)=>o.startsWith("error:")).map((o)=>o.replace(/^error:\s*/,""));return{error:e,detail:n[0]??r.at(-1),missing:r.some((o)=>o.includes("No version matching"))}}var $={resolve:(t)=>q(t)},z={readText:(t)=>d.readText(t),write:async(t,e)=>{await d.write(t,e)},exists:(t)=>d.exists(t),files:(t,e)=>K(t,e)},G=z;function V(t){if(typeof t==="string")return t;if(!Array.isArray(t))return;if(typeof t[0]!=="string")return;return t[0]}function H(t){if(!t||typeof t!=="object"||Array.isArray(t))return;let e=t;if(!Array.isArray(e.plugin))return;return e.plugin}function Q(t){if(typeof t==="string"){let e=t.trim();if(e)return e;return}if(!m(t))return;for(let e of["import","default"]){let r=t[e];if(typeof r!=="string")continue;let n=r.trim();if(!n)continue;return n}}function U(t){if(!m(t))return;let e=t.config;if(!m(e))return;return e}function E(t,e){let r=t.exports;if(!m(r))return;let n=r[`./${e}`];if(!Q(n))return;return{opts:U(n)}}function X(t){let e=t.main;if(typeof e!=="string")return!1;return Boolean(e.trim())}function Y(t){let e=typeof t.json.name==="string"&&t.json.name.trim().length>0?t.json.name.trim():P.basename(t.dir),r=[],n=E(t.json,"server");if(n)r.push({kind:"server",opts:n.opts});else if(X(t.json))r.push({kind:"server"});let o=E(t.json,"tui");if(o)r.push({kind:"tui",opts:o.opts});if(!r.some((c)=>c.kind==="tui")&&C(e,t).length)r.push({kind:"tui"});return r}function g(t,e,r,n=!1){return A(t,O(t,e,r,{formattingOptions:{tabSize:2,insertSpaces:!0},isArrayInsertion:n}))}function Z(t,e,r,n,o=!1){let c=y(r).pkg,u=(e??[]).map((i,p)=>({item:i,i:p,spec:V(i)})).filter((i)=>{if(!i.spec)return!1;if(i.spec===r)return!0;if(i.spec.startsWith("file://"))return!1;return y(i.spec).pkg===c});if(!u.length){if(!e)return{mode:"add",text:g(t,["plugin"],[n])};return{mode:"add",text:g(t,["plugin",e.length],n,!0)}}if(!o)return{mode:"noop",text:t};let s=u[0];if(!s)return{mode:"noop",text:t};if(u.length===1&&s.spec===r)return{mode:"noop",text:t};let a=t;if(typeof s.item==="string")a=g(a,["plugin",s.i],n);if(Array.isArray(s.item)&&typeof s.item[0]==="string")a=g(a,["plugin",s.i,0],r);let l=u.map((i)=>i.i).filter((i)=>i!==s.i).sort((i,p)=>p-i);for(let i of l)a=g(a,["plugin",i],void 0);return{mode:"replace",text:a}}async function gt(t,e=$){let r=await e.resolve(t).then((n)=>({ok:!0,item:n}),(n)=>({ok:!1,error:n}));if(!r.ok)return{ok:!1,code:"install_failed",error:r.error};return{ok:!0,target:r.item}}async function dt(t){let e=await M(t).then((n)=>({ok:!0,item:n}),(n)=>({ok:!1,error:n}));if(!e.ok)return{ok:!1,code:"manifest_read_failed",file:t,error:e.error};let r=await Promise.resolve().then(()=>Y(e.item)).then((n)=>({ok:!0,item:n}),(n)=>({ok:!1,error:n}));if(!r.ok)return{ok:!1,code:"manifest_read_failed",file:e.item.pkg,error:r.error};if(!r.item.length)return{ok:!1,code:"manifest_no_targets",file:e.item.pkg};return{ok:!0,targets:r.item}}function tt(t){if(t.global)return t.config??D.Path.config;let r=t.vcs==="git"&&t.worktree!=="/"?t.worktree:t.directory;return P.join(r,".qitqode")}function et(t){if(t==="server")return"qitqode";return"tui"}async function rt(t,e,r,n,o){let x=[];try{let c=et(e.kind);const S=T(x,await v.acquire(`plug-config:${d.resolve(P.join(t,c))}`),1);let u=o.files(t,c);let s=u[0];for(let f of u){if(!await o.exists(f))continue;s=f;break}let a=await o.readText(s).catch((f)=>{if(f.code==="ENOENT")return"{}";return f});if(a instanceof Error)return{ok:!1,code:"patch_failed",kind:e.kind,error:a};let l=a.trim()?a:"{}";let i=[];let p=j(l,i,{allowTrailingComma:!0});if(i.length){let f=i[0],h=l.substring(0,f.offset).split(`
2
+ import{In as j,Jn as R,Kn as O,Ln as A,Rn as y,Wn as q,Xn as M,Zn as C,do as K}from"./chunk-7wthn44y.js";import{Os as v,Rs as D}from"./chunk-94qmhz2p.js";import{at as m,ct as b,it as I,tt as d}from"./chunk-20d0cd1j.js";import{HO as T,IO as _}from"./chunk-yjj4cvqg.js";import P from"path";function pt(t){let e=t&&typeof t==="object"&&"cause"in t?t.cause??t:t;if(!(e instanceof I.RunFailedError))return{error:e,detail:b(e),missing:!1};let r=e.stderr.toString().split(/\r?\n/).map((o)=>o.trim()).filter(Boolean),n=r.filter((o)=>o.startsWith("error:")).map((o)=>o.replace(/^error:\s*/,""));return{error:e,detail:n[0]??r.at(-1),missing:r.some((o)=>o.includes("No version matching"))}}var $={resolve:(t)=>q(t)},z={readText:(t)=>d.readText(t),write:async(t,e)=>{await d.write(t,e)},exists:(t)=>d.exists(t),files:(t,e)=>K(t,e)},G=z;function V(t){if(typeof t==="string")return t;if(!Array.isArray(t))return;if(typeof t[0]!=="string")return;return t[0]}function H(t){if(!t||typeof t!=="object"||Array.isArray(t))return;let e=t;if(!Array.isArray(e.plugin))return;return e.plugin}function Q(t){if(typeof t==="string"){let e=t.trim();if(e)return e;return}if(!m(t))return;for(let e of["import","default"]){let r=t[e];if(typeof r!=="string")continue;let n=r.trim();if(!n)continue;return n}}function U(t){if(!m(t))return;let e=t.config;if(!m(e))return;return e}function E(t,e){let r=t.exports;if(!m(r))return;let n=r[`./${e}`];if(!Q(n))return;return{opts:U(n)}}function X(t){let e=t.main;if(typeof e!=="string")return!1;return Boolean(e.trim())}function Y(t){let e=typeof t.json.name==="string"&&t.json.name.trim().length>0?t.json.name.trim():P.basename(t.dir),r=[],n=E(t.json,"server");if(n)r.push({kind:"server",opts:n.opts});else if(X(t.json))r.push({kind:"server"});let o=E(t.json,"tui");if(o)r.push({kind:"tui",opts:o.opts});if(!r.some((c)=>c.kind==="tui")&&C(e,t).length)r.push({kind:"tui"});return r}function g(t,e,r,n=!1){return A(t,O(t,e,r,{formattingOptions:{tabSize:2,insertSpaces:!0},isArrayInsertion:n}))}function Z(t,e,r,n,o=!1){let c=y(r).pkg,u=(e??[]).map((i,p)=>({item:i,i:p,spec:V(i)})).filter((i)=>{if(!i.spec)return!1;if(i.spec===r)return!0;if(i.spec.startsWith("file://"))return!1;return y(i.spec).pkg===c});if(!u.length){if(!e)return{mode:"add",text:g(t,["plugin"],[n])};return{mode:"add",text:g(t,["plugin",e.length],n,!0)}}if(!o)return{mode:"noop",text:t};let s=u[0];if(!s)return{mode:"noop",text:t};if(u.length===1&&s.spec===r)return{mode:"noop",text:t};let a=t;if(typeof s.item==="string")a=g(a,["plugin",s.i],n);if(Array.isArray(s.item)&&typeof s.item[0]==="string")a=g(a,["plugin",s.i,0],r);let l=u.map((i)=>i.i).filter((i)=>i!==s.i).sort((i,p)=>p-i);for(let i of l)a=g(a,["plugin",i],void 0);return{mode:"replace",text:a}}async function gt(t,e=$){let r=await e.resolve(t).then((n)=>({ok:!0,item:n}),(n)=>({ok:!1,error:n}));if(!r.ok)return{ok:!1,code:"install_failed",error:r.error};return{ok:!0,target:r.item}}async function dt(t){let e=await M(t).then((n)=>({ok:!0,item:n}),(n)=>({ok:!1,error:n}));if(!e.ok)return{ok:!1,code:"manifest_read_failed",file:t,error:e.error};let r=await Promise.resolve().then(()=>Y(e.item)).then((n)=>({ok:!0,item:n}),(n)=>({ok:!1,error:n}));if(!r.ok)return{ok:!1,code:"manifest_read_failed",file:e.item.pkg,error:r.error};if(!r.item.length)return{ok:!1,code:"manifest_no_targets",file:e.item.pkg};return{ok:!0,targets:r.item}}function tt(t){if(t.global)return t.config??D.Path.config;let r=t.vcs==="git"&&t.worktree!=="/"?t.worktree:t.directory;return P.join(r,".qitqode")}function et(t){if(t==="server")return"qitqode";return"tui"}async function rt(t,e,r,n,o){let x=[];try{let c=et(e.kind);const S=T(x,await v.acquire(`plug-config:${d.resolve(P.join(t,c))}`),1);let u=o.files(t,c);let s=u[0];for(let f of u){if(!await o.exists(f))continue;s=f;break}let a=await o.readText(s).catch((f)=>{if(f.code==="ENOENT")return"{}";return f});if(a instanceof Error)return{ok:!1,code:"patch_failed",kind:e.kind,error:a};let l=a.trim()?a:"{}";let i=[];let p=j(l,i,{allowTrailingComma:!0});if(i.length){let f=i[0],h=l.substring(0,f.offset).split(`
3
3
  `);return{ok:!1,code:"invalid_json",kind:e.kind,file:s,line:h.length,col:h[h.length-1].length+1,parse:R(f.error)}}let N=H(p);let F=e.opts?[r,e.opts]:r;let k=Z(l,N,r,F,n);if(k.mode==="noop")return{ok:!0,item:{kind:e.kind,mode:k.mode,file:s}};let w=await o.write(s,k.text).catch((f)=>f);if(w instanceof Error)return{ok:!1,code:"patch_failed",kind:e.kind,error:w};return{ok:!0,item:{kind:e.kind,mode:k.mode,file:s}}}catch(J){var B=J,L=1}finally{var W=_(x,B,L);W&&await W}}async function mt(t,e=G){let r=tt(t),n=[];for(let o of t.targets){let c=await rt(r,o,t.spec,Boolean(t.force),e);if(!c.ok)return{...c,dir:r};n.push(c.item)}return{ok:!0,dir:r,items:n}}
4
4
  export{pt as p,z as q,gt as r,dt as s,mt as t};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Hf as a}from"./chunk-zasd8cz8.js";import"./chunk-z160s5p5.js";import"./chunk-yjj4cvqg.js";export default a();
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{$h as L5,Bh as vV,Dh as G$,Fh as iJ,Gh as dV,Hh as Q$,Jh as _0,Kh as p4,Lh as q5,Mh as P$,Nh as G1,Oh as _4,Ph as v4,Qh as K7,Rh as mV,Sh as GJ,Th as r9,Uh as W0,Vh as h2,Wh as N5,Xh as x5,Yh as w5,Zh as b5,_h as P6,ai as m5,ih as J8,jh as fV,kh as V8,lh as c$,mh as EV,nh as zQ,oh as j$,ph as y$,qh as RJ,rh as CJ,sh as t4,th as YQ,uh as j1,wh as C5,yh as w6,zh as y1}from"./chunk-0nj8axbw.js";import{bi as GY}from"./chunk-p68rwmhc.js";import{Vi as U7}from"./chunk-a1pw9r6f.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,Wk as F5,Xj as u,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-8tc8x27z.js";import{Fl as lV}from"./chunk-k7g3h9tn.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-rmr38x2f.js";import{rm as i1,sm as n1,tm as s1,wm as hJ,xm as D2}from"./chunk-5syxjhg3.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-cmbxrgyx.js";import{Gp as lJ}from"./chunk-nt4e3em9.js";import{Jp as I$,Yp as $0}from"./chunk-hk698g9e.js";import{Zp as cJ}from"./chunk-v965rsr8.js";import{Tq as W$,Uq as cY,dr as t$,er as RX}from"./chunk-yq3m8190.js";import{Gr as FY,Hr as JY}from"./chunk-btz9jvec.js";import{$r as B6}from"./chunk-m02zt1a3.js";import{ds as I0,is as gV,js as u5}from"./chunk-fzna6jdj.js";import{ls as E0,ms as a4,ps as r4}from"./chunk-x1rx6fm7.js";import{Bs as H$,Cs as NJ,Is as KZ,Js as xJ}from"./chunk-4qqkqrn9.js";import{qt as w2}from"./chunk-12bssxd4.js";import{st as M7}from"./chunk-24xc0dvv.js";import{Dt as O6,Ot as V5,bu as H6,gu as MV,ju as _6,ou as q$,pu as L0,tt as w1,xt as J5,yu as s}from"./chunk-ebrt1me3.js";import{Bu as O$,Du as q4,Hu as QJ,Ku as gJ,Nu as LV,Ou as n2,Su as V$,zu as k5}from"./chunk-whxjkz9a.js";import{Tu as P3}from"./chunk-89v6dgpp.js";import{Uu as q}from"./chunk-k309zez0.js";import{$u as R7,Vu as XX,Xu as x,Yu as lX,Zu as z2,_u as A2,av as cX,bv as m2,cv as c,dv as o,ev as i2,fv as _2,gv as C7,hv as S7,iv as T2,jv as R0,kv as i,lv as l2,mv as YX,nv as k7,ov as oX,pv as uX,qv as y2}from"./chunk-09kba1hg.js";import{Nv as G9,rv as mX}from"./chunk-t12xrrfr.js";import{HA as L7,wA as s4}from"./chunk-phxrg7aw.js";import{AP as TJ,BF as u2,HG as H8,IF as k2,NG as UJ,OO as K5,PI as Y,PO as G5,QO as H5,RC as B5,RO as m4,TO as E5,UC as Y0,UG as AJ,VO as l4,YF as d2,YO as v5,ZD as Z2,ZG as MJ,cK as i8,hP as c9,jE as F6,jP as d5,kI as HZ,kP as c4,mG as _,oH as _J,oI as jZ,oP as c2,pO as c0,tD as W5,uF as G2,yK as AX}from"./chunk-snm5q21k.js";import{$P as J9,bQ as L2,dQ as K$,eQ as mY,fQ as lY}from"./chunk-aztre27e.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 L5,Bh as vV,Dh as G$,Fh as iJ,Gh as dV,Hh as Q$,Jh as _0,Kh as p4,Lh as q5,Mh as P$,Nh as G1,Oh as _4,Ph as v4,Qh as K7,Rh as mV,Sh as GJ,Th as r9,Uh as W0,Vh as h2,Wh as N5,Xh as x5,Yh as w5,Zh as b5,_h as P6,ai as m5,ih as J8,jh as fV,kh as V8,lh as c$,mh as EV,nh as zQ,oh as j$,ph as y$,qh as RJ,rh as CJ,sh as t4,th as YQ,uh as j1,wh as C5,yh as w6,zh as y1}from"./chunk-09j71kp6.js";import{bi as GY}from"./chunk-js9wdh67.js";import{Vi as U7}from"./chunk-8f0g7d7k.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,Wk as F5,Xj as u,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-d7t0bcvk.js";import{Fl as lV}from"./chunk-7mc8nxve.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-dfja6dj6.js";import{rm as i1,sm as n1,tm as s1,wm as hJ,xm as D2}from"./chunk-n34y5gp6.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-7wthn44y.js";import{ho as lJ}from"./chunk-0xm85ayc.js";import{ko as I$,zo as $0}from"./chunk-s2za1n7h.js";import{Ao as cJ}from"./chunk-19sa03c1.js";import{Gp as t$,Hp as RX,up as W$,vp as cY}from"./chunk-bzrsnv2k.js";import{hq as FY,iq as JY}from"./chunk-d0qqgxs4.js";import{Cq as B6}from"./chunk-jwtev7b7.js";import{Gq as I0,Lq as gV,Mq as u5}from"./chunk-qsszerj7.js";import{Oq as E0,Pq as a4,Sq as r4}from"./chunk-6jewfaqa.js";import{cr as H$,dr as NJ,jr as KZ,kr as xJ}from"./chunk-6hdjkvr1.js";import{Tr as w2}from"./chunk-hn1f6rne.js";import{Vr as M7}from"./chunk-4kpvceap.js";import{$s as s,Es as H6,Js as MV,Ms as _6,Rs as q$,Ss as L0,Wr as w1,_r as J5,es as O6,ps as V5}from"./chunk-94qmhz2p.js";import{at as k5,ct as O$,et as q4,it as QJ,lt as gJ,ot as LV,pt as n2,tt as V$}from"./chunk-20d0cd1j.js";import{ut as P3}from"./chunk-yn576pje.js";import{vt as q}from"./chunk-b6dsv601.js";import{At as z2,Bt as A2,Ct as R7,Dt as cX,Et as m2,Ft as c,Gt as o,Ht as i2,It as _2,Jt as C7,Kt as S7,Lt as T2,Mt as R0,Nt as i,Ot as l2,Pt as YX,Qt as k7,Rt as oX,St as uX,Tt as y2,wt as XX,yt as x,zt as lX}from"./chunk-j2zay4da.js";import{Ut as mX,ou as G9}from"./chunk-4vemws1t.js";import{Zy as s4,iz as L7}from"./chunk-yvqbewmc.js";import{$I as AX,AC as Z2,AF as MJ,FI as i8,KN as c9,MC as F6,MN as d5,NG as HZ,NN as c4,PE as _,RF as _J,RG as jZ,RN as c2,SM as c0,WB as W5,XD as G2,bO as TJ,cE as u2,iF as H8,jE as k2,oF as UJ,pN as K5,qH as Y,qN as G5,rN as H5,sB as B5,sN as m4,uN as E5,vB as Y0,vF as AJ,wN as l4,zE as d2,zN as v5}from"./chunk-t299e2aw.js";import{CO as J9,EO as L2,GO as K$,HO as mY,IO as lY}from"./chunk-yjj4cvqg.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-457y2816.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-mpebdv59.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-g1dwbvkg.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-3q6650we.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-xck0sq3k.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-6nbzdb0r.js").then(($)=>$.QuickJSFFI),importModuleLoader:()=>import("./chunk-x067eetw.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-tj00kzk4.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-yaj9ywvz.js").then(($)=>$.QuickJSFFI),importModuleLoader:()=>import("./chunk-gjvymdhp.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) =>
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{ZP as E}from"./chunk-cafzcmrg.js";import{_P as D}from"./chunk-qjjch1zt.js";import{aQ as B,dQ as C}from"./chunk-aztre27e.js";var J=B((v)=>{Object.defineProperty(v,"__esModule",{value:!0});v.getMachineId=void 0;var q=C("process"),F=E(),G=D();async function H(){let b="%windir%\\System32\\REG.exe";if(q.arch==="ia32"&&"PROCESSOR_ARCHITEW6432"in q.env)b="%windir%\\sysnative\\cmd.exe /c "+b;try{let k=(await(0,F.execAsync)(`${b} QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid`)).stdout.split("REG_SZ");if(k.length===2)return k[1].trim()}catch(f){G.diag.debug(`error reading machine id: ${f}`)}return}v.getMachineId=H});export default J();
2
+ import{AO as E}from"./chunk-yn05n0az.js";import{BO as D}from"./chunk-4mrz9b6d.js";import{DO as B,GO as C}from"./chunk-yjj4cvqg.js";var J=B((v)=>{Object.defineProperty(v,"__esModule",{value:!0});v.getMachineId=void 0;var q=C("process"),F=E(),G=D();async function H(){let b="%windir%\\System32\\REG.exe";if(q.arch==="ia32"&&"PROCESSOR_ARCHITEW6432"in q.env)b="%windir%\\sysnative\\cmd.exe /c "+b;try{let k=(await(0,F.execAsync)(`${b} QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid`)).stdout.split("REG_SZ");if(k.length===2)return k[1].trim()}catch(f){G.diag.debug(`error reading machine id: ${f}`)}return}v.getMachineId=H});export default J();
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Ed as s}from"./chunk-pdzpfkt0.js";import{Rd as r}from"./chunk-yajd975f.js";import{hh as i}from"./chunk-612f97vv.js";import{Uh as z,Vh as B,jh as u,kh as g,oh as q}from"./chunk-0nj8axbw.js";import"./chunk-p68rwmhc.js";import"./chunk-0a0vat1h.js";import"./chunk-z8v2tsz2.js";import"./chunk-j8efst22.js";import"./chunk-a1pw9r6f.js";import"./chunk-d5bxan80.js";import{Cl as K,Dl as J,Xk as f,lk as G,mk as V,pk as S,rl as x,xk as $}from"./chunk-8tc8x27z.js";import"./chunk-k7g3h9tn.js";import{jm as R,lm as p}from"./chunk-rmr38x2f.js";import"./chunk-5syxjhg3.js";import"./chunk-nj4d554m.js";import"./chunk-1t6bvbgy.js";import"./chunk-cmbxrgyx.js";import"./chunk-a1p2f16h.js";import"./chunk-nt4e3em9.js";import"./chunk-hk698g9e.js";import"./chunk-v965rsr8.js";import"./chunk-1sgby720.js";import"./chunk-5g8108nf.js";import"./chunk-4tbwha3m.js";import"./chunk-m612agnk.js";import"./chunk-yq3m8190.js";import"./chunk-btz9jvec.js";import"./chunk-cqtkxwd8.js";import"./chunk-fkgv2hqd.js";import"./chunk-zyhdxggp.js";import"./chunk-q6ztpfcs.js";import"./chunk-jm1ptn8n.js";import"./chunk-c5e6sk9c.js";import"./chunk-m02zt1a3.js";import"./chunk-vg2fmyje.js";import"./chunk-fzna6jdj.js";import"./chunk-x1rx6fm7.js";import"./chunk-4qqkqrn9.js";import"./chunk-j6emx6jn.js";import"./chunk-be216spx.js";import"./chunk-12bssxd4.js";import"./chunk-24xc0dvv.js";import{ou as U,yu as w}from"./chunk-ebrt1me3.js";import"./chunk-whxjkz9a.js";import"./chunk-89v6dgpp.js";import"./chunk-k309zez0.js";import"./chunk-09kba1hg.js";import"./chunk-t12xrrfr.js";import"./chunk-phxrg7aw.js";import{PI as c,oP as A}from"./chunk-snm5q21k.js";import"./chunk-xpc2zgj7.js";import"./chunk-qjjch1zt.js";import{eQ as v,fQ as P}from"./chunk-aztre27e.js";import{EOL as X}from"os";var k=r({command:"config",describe:"show resolved configuration",builder:(e)=>e,async handler(){await s(process.cwd(),async()=>{let e=await i.runPromise(J.Service.use((o)=>o.get()));process.stdout.write(JSON.stringify(e,null,2)+X)})}});import{EOL as y}from"os";var Y=r({command:"search <query>",describe:"search files by query",builder:(e)=>e.positional("query",{type:"string",demandOption:!0,description:"Search query"}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(g.Service.use((t)=>t.search({query:e.query})));process.stdout.write(o.join(y)+y)})}}),Z=r({command:"read <path>",describe:"read file contents as JSON",builder:(e)=>e.positional("path",{type:"string",demandOption:!0,description:"File path to read"}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(g.Service.use((t)=>t.read(e.path)));process.stdout.write(JSON.stringify(o,null,2)+y)})}}),H=r({command:"status",describe:"show file status information",builder:(e)=>e,async handler(){await s(process.cwd(),async()=>{let e=await i.runPromise(g.Service.use((o)=>o.status()));process.stdout.write(JSON.stringify(e,null,2)+y)})}}),ee=r({command:"list <path>",describe:"list files in a directory",builder:(e)=>e.positional("path",{type:"string",demandOption:!0,description:"File path to list"}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(g.Service.use((t)=>t.list(e.path)));process.stdout.write(JSON.stringify(o,null,2)+y)})}}),oe=r({command:"tree [dir]",describe:"show directory tree",builder:(e)=>e.positional("dir",{type:"string",description:"Directory to tree",default:process.cwd()}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(u.Service.use((t)=>t.tree({cwd:e.dir,limit:200})));console.log(JSON.stringify(o,null,2))})}}),L=r({command:"file",describe:"file system debugging utilities",builder:(e)=>e.command(Z).command(H).command(ee).command(Y).command(oe).demandCommand(),async handler(){}});import{EOL as D}from"os";var E=r({command:"lsp",describe:"LSP debugging utilities",builder:(e)=>e.command(te).command(re).command(ie).demandCommand(),async handler(){}}),te=r({command:"diagnostics <file>",describe:"get diagnostics for a file",builder:(e)=>e.positional("file",{type:"string",demandOption:!0}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(S.Service.use((t)=>c.gen(function*(){return yield*t.touchFile(e.file,!0),yield*c.sleep(1000),yield*t.diagnostics()})));process.stdout.write(JSON.stringify(o,null,2)+D)})}}),re=r({command:"symbols <query>",describe:"search workspace symbols",builder:(e)=>e.positional("query",{type:"string",demandOption:!0}),async handler(e){await s(process.cwd(),async()=>{let n=[];try{const o=v(n,w.Default.time("symbols"),0);let t=await i.runPromise(S.Service.use((d)=>d.workspaceSymbol(e.query)));process.stdout.write(JSON.stringify(t,null,2)+D)}catch(a){var m=a,l=1}finally{P(n,m,l)}})}}),ie=r({command:"document-symbols <uri>",describe:"get symbols from a document",builder:(e)=>e.positional("uri",{type:"string",demandOption:!0}),async handler(e){await s(process.cwd(),async()=>{let n=[];try{const o=v(n,w.Default.time("document-symbols"),0);let t=await i.runPromise(S.Service.use((d)=>d.documentSymbol(e.uri)));process.stdout.write(JSON.stringify(t,null,2)+D)}catch(a){var m=a,l=1}finally{P(n,m,l)}})}});import{EOL as C}from"os";var F=r({command:"rg",describe:"ripgrep debugging utilities",builder:(e)=>e.command(se).command(ne).command(ae).demandCommand(),async handler(){}}),se=r({command:"tree",describe:"show file tree using ripgrep",builder:(e)=>e.option("limit",{type:"number"}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(u.Service.use((t)=>t.tree({cwd:p.directory,limit:e.limit})));process.stdout.write(o+C)})}}),ne=r({command:"files",describe:"list files using ripgrep",builder:(e)=>e.option("query",{type:"string",description:"Filter files by query"}).option("glob",{type:"string",description:"Glob pattern to match files"}).option("limit",{type:"number",description:"Limit number of results"}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(c.gen(function*(){return yield*(yield*u.Service).files({cwd:p.directory,glob:e.glob?[e.glob]:void 0}).pipe(A.take(e.limit??1/0),A.runCollect,c.map((n)=>[...n]))}));process.stdout.write(o.join(C)+C)})}}),ae=r({command:"search <pattern>",describe:"search file contents using ripgrep",builder:(e)=>e.positional("pattern",{type:"string",demandOption:!0,description:"Search pattern"}).option("glob",{type:"array",description:"File glob patterns"}).option("limit",{type:"number",description:"Limit number of results"}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(u.Service.use((t)=>t.search({cwd:p.directory,pattern:e.pattern,glob:e.glob,limit:e.limit})));process.stdout.write(JSON.stringify(o.items,null,2)+C)})}});import{EOL as me}from"os";var T=r({command:"scrap",describe:"list all known projects",builder:(e)=>e,async handler(){let e=w.Default.time("scrap"),o=await R.list();process.stdout.write(JSON.stringify(o,null,2)+me),e.stop()}});import{EOL as ce}from"os";var j=r({command:"skill",describe:"list all available skills",builder:(e)=>e,async handler(){await s(process.cwd(),async()=>{let e=await i.runPromise(c.gen(function*(){return yield*(yield*q.Service).all()}));process.stdout.write(JSON.stringify(e,null,2)+ce)})}});var M=r({command:"snapshot",describe:"snapshot debugging utilities",builder:(e)=>e.command(de).command(le).command(pe).demandCommand(),async handler(){}}),I=(e)=>s(process.cwd(),async()=>{console.log(await i.runPromise($.Service.use(e)))}),_=(e)=>e.positional("hash",{type:"string",description:"hash",demandOption:!0}),de=r({command:"track",describe:"track current snapshot state",async handler(){await I((e)=>e.track())}}),le=r({command:"patch <hash>",describe:"show patch for a snapshot hash",builder:_,async handler(e){await I((o)=>o.patch(e.hash))}}),pe=r({command:"diff <hash>",describe:"show diff for a snapshot hash",builder:_,async handler(e){await I((o)=>o.diff(e.hash))}});import{EOL as b}from"os";import{basename as ue}from"path";var Q=r({command:"agent <name>",describe:"show agent configuration details",builder:(e)=>e.positional("name",{type:"string",demandOption:!0,description:"Agent name"}).option("tool",{type:"string",description:"Tool id to execute"}).option("params",{type:"string",description:"Tool params as a JSON object"}),async handler(e){await s(process.cwd(),async()=>{let o=e.name,t=await i.runPromise(B.Service.use((d)=>d.get(o)));if(!t)process.stderr.write(`Agent ${o} not found, run '${ue(process.execPath)} agent list' to get an agent list`+b),process.exit(1);let n=await fe(t),a=await ye(t,n),m=e.tool;if(m){let d=n.find((W)=>W.id===m);if(!d)process.stderr.write(`Tool ${m} not found for agent ${o}`+b),process.exit(1);if(a[m]===!1)process.stderr.write(`Tool ${m} is disabled for agent ${o}`+b),process.exit(1);let h=ge(e.params),O=await we(t),N=await d.execute(h,O);process.stdout.write(JSON.stringify({tool:m,input:h,result:N},null,2)+b);return}let l={...t,tools:a};process.stdout.write(JSON.stringify(l,null,2)+b)})}});async function fe(e){return i.runPromise(c.gen(function*(){let o=yield*x.Service,t=yield*z.Service,n=e.model??(yield*o.defaultModel());return yield*t.tools({...n,agent:e})}))}async function ye(e,o){let t=f.disabled(o.map((a)=>a.id),e.permission),n={};for(let a of o)n[a.id]=!t.has(a.id);return n}function ge(e){if(!e)return{};let o=e.trim();if(o.length===0)return{};let t=(()=>{try{return JSON.parse(o)}catch{throw Error("Failed to parse --params. Provide a valid JSON object.")}})();if(!t||typeof t!=="object"||Array.isArray(t))throw Error("Tool params must be an object.");return t}async function we(e){let{session:o,messageID:t}=await i.runPromise(c.gen(function*(){let a=yield*K.Service,m=yield*a.create({title:`Debug tool run (${e.name})`}),l=G.ascending(),d=e.model?e.model:yield*c.gen(function*(){return yield*(yield*x.Service).defaultModel()}),h=Date.now(),O={id:l,sessionID:m.id,role:"assistant",time:{created:h},parentID:l,modelID:d.modelID,providerID:d.providerID,mode:"debug",agent:e.name,path:{cwd:p.directory,root:p.worktree},cost:0,tokens:{input:0,output:0,reasoning:0,cache:{read:0,write:0}}};return yield*a.updateMessage(O),{session:m,messageID:l}})),n=f.merge(e.permission,o.permission??[]);return{sessionID:o.id,messageID:t,callID:V.ascending(),agent:e.name,abort:new AbortController().signal,messages:[],metadata:()=>c.void,ask(a){return c.sync(()=>{for(let m of a.patterns)if(f.evaluate(a.permission,m,n).action==="deny")throw new f.DeniedError({ruleset:n})})}}}var jo=r({command:"debug",describe:"debugging and troubleshooting tools",builder:(e)=>e.command(k).command(E).command(F).command(L).command(T).command(j).command(M).command(Q).command(be).command({command:"wait",describe:"wait indefinitely (for debugging)",async handler(){await s(process.cwd(),async()=>{await new Promise((o)=>setTimeout(o,86400000))})}}).demandCommand(),async handler(){}}),be=r({command:"paths",describe:"show global paths (data, config, cache, state)",handler(){for(let[e,o]of Object.entries(U.Path))console.log(e.padEnd(10),o)}});export{jo as DebugCommand};
2
+ import{Ed as s}from"./chunk-sbx9z70j.js";import{Rd as r}from"./chunk-yajd975f.js";import{hh as i}from"./chunk-m2ny1en7.js";import{Uh as z,Vh as B,jh as u,kh as g,oh as q}from"./chunk-09j71kp6.js";import"./chunk-js9wdh67.js";import"./chunk-0a0vat1h.js";import"./chunk-z8v2tsz2.js";import"./chunk-j8efst22.js";import"./chunk-8f0g7d7k.js";import"./chunk-abtn6nec.js";import{Cl as K,Dl as J,Xk as f,lk as G,mk as V,pk as S,rl as x,xk as $}from"./chunk-d7t0bcvk.js";import"./chunk-7mc8nxve.js";import{jm as R,lm as p}from"./chunk-dfja6dj6.js";import"./chunk-n34y5gp6.js";import"./chunk-bn0h9dny.js";import"./chunk-q5363rr9.js";import"./chunk-7wthn44y.js";import"./chunk-a8p9aggx.js";import"./chunk-0xm85ayc.js";import"./chunk-s2za1n7h.js";import"./chunk-19sa03c1.js";import"./chunk-csdm3n24.js";import"./chunk-xk1nh1ay.js";import"./chunk-bsf6n350.js";import"./chunk-4vze3djr.js";import"./chunk-bzrsnv2k.js";import"./chunk-d0qqgxs4.js";import"./chunk-cqtkxwd8.js";import"./chunk-v00cptj6.js";import"./chunk-1d9f53sk.js";import"./chunk-svrxk3vf.js";import"./chunk-kkae8ead.js";import"./chunk-s6me101a.js";import"./chunk-jwtev7b7.js";import"./chunk-b9nwaaqs.js";import"./chunk-qsszerj7.js";import"./chunk-6jewfaqa.js";import"./chunk-6hdjkvr1.js";import"./chunk-1rn0vmvv.js";import"./chunk-fsy279s5.js";import"./chunk-hn1f6rne.js";import"./chunk-4kpvceap.js";import{$s as w,Rs as U}from"./chunk-94qmhz2p.js";import"./chunk-20d0cd1j.js";import"./chunk-yn576pje.js";import"./chunk-b6dsv601.js";import"./chunk-j2zay4da.js";import"./chunk-4vemws1t.js";import"./chunk-yvqbewmc.js";import{RN as A,qH as c}from"./chunk-t299e2aw.js";import"./chunk-bv8pf0m1.js";import"./chunk-4mrz9b6d.js";import{HO as v,IO as P}from"./chunk-yjj4cvqg.js";import{EOL as X}from"os";var k=r({command:"config",describe:"show resolved configuration",builder:(e)=>e,async handler(){await s(process.cwd(),async()=>{let e=await i.runPromise(J.Service.use((o)=>o.get()));process.stdout.write(JSON.stringify(e,null,2)+X)})}});import{EOL as y}from"os";var Y=r({command:"search <query>",describe:"search files by query",builder:(e)=>e.positional("query",{type:"string",demandOption:!0,description:"Search query"}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(g.Service.use((t)=>t.search({query:e.query})));process.stdout.write(o.join(y)+y)})}}),Z=r({command:"read <path>",describe:"read file contents as JSON",builder:(e)=>e.positional("path",{type:"string",demandOption:!0,description:"File path to read"}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(g.Service.use((t)=>t.read(e.path)));process.stdout.write(JSON.stringify(o,null,2)+y)})}}),H=r({command:"status",describe:"show file status information",builder:(e)=>e,async handler(){await s(process.cwd(),async()=>{let e=await i.runPromise(g.Service.use((o)=>o.status()));process.stdout.write(JSON.stringify(e,null,2)+y)})}}),ee=r({command:"list <path>",describe:"list files in a directory",builder:(e)=>e.positional("path",{type:"string",demandOption:!0,description:"File path to list"}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(g.Service.use((t)=>t.list(e.path)));process.stdout.write(JSON.stringify(o,null,2)+y)})}}),oe=r({command:"tree [dir]",describe:"show directory tree",builder:(e)=>e.positional("dir",{type:"string",description:"Directory to tree",default:process.cwd()}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(u.Service.use((t)=>t.tree({cwd:e.dir,limit:200})));console.log(JSON.stringify(o,null,2))})}}),L=r({command:"file",describe:"file system debugging utilities",builder:(e)=>e.command(Z).command(H).command(ee).command(Y).command(oe).demandCommand(),async handler(){}});import{EOL as D}from"os";var E=r({command:"lsp",describe:"LSP debugging utilities",builder:(e)=>e.command(te).command(re).command(ie).demandCommand(),async handler(){}}),te=r({command:"diagnostics <file>",describe:"get diagnostics for a file",builder:(e)=>e.positional("file",{type:"string",demandOption:!0}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(S.Service.use((t)=>c.gen(function*(){return yield*t.touchFile(e.file,!0),yield*c.sleep(1000),yield*t.diagnostics()})));process.stdout.write(JSON.stringify(o,null,2)+D)})}}),re=r({command:"symbols <query>",describe:"search workspace symbols",builder:(e)=>e.positional("query",{type:"string",demandOption:!0}),async handler(e){await s(process.cwd(),async()=>{let n=[];try{const o=v(n,w.Default.time("symbols"),0);let t=await i.runPromise(S.Service.use((d)=>d.workspaceSymbol(e.query)));process.stdout.write(JSON.stringify(t,null,2)+D)}catch(a){var m=a,l=1}finally{P(n,m,l)}})}}),ie=r({command:"document-symbols <uri>",describe:"get symbols from a document",builder:(e)=>e.positional("uri",{type:"string",demandOption:!0}),async handler(e){await s(process.cwd(),async()=>{let n=[];try{const o=v(n,w.Default.time("document-symbols"),0);let t=await i.runPromise(S.Service.use((d)=>d.documentSymbol(e.uri)));process.stdout.write(JSON.stringify(t,null,2)+D)}catch(a){var m=a,l=1}finally{P(n,m,l)}})}});import{EOL as C}from"os";var F=r({command:"rg",describe:"ripgrep debugging utilities",builder:(e)=>e.command(se).command(ne).command(ae).demandCommand(),async handler(){}}),se=r({command:"tree",describe:"show file tree using ripgrep",builder:(e)=>e.option("limit",{type:"number"}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(u.Service.use((t)=>t.tree({cwd:p.directory,limit:e.limit})));process.stdout.write(o+C)})}}),ne=r({command:"files",describe:"list files using ripgrep",builder:(e)=>e.option("query",{type:"string",description:"Filter files by query"}).option("glob",{type:"string",description:"Glob pattern to match files"}).option("limit",{type:"number",description:"Limit number of results"}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(c.gen(function*(){return yield*(yield*u.Service).files({cwd:p.directory,glob:e.glob?[e.glob]:void 0}).pipe(A.take(e.limit??1/0),A.runCollect,c.map((n)=>[...n]))}));process.stdout.write(o.join(C)+C)})}}),ae=r({command:"search <pattern>",describe:"search file contents using ripgrep",builder:(e)=>e.positional("pattern",{type:"string",demandOption:!0,description:"Search pattern"}).option("glob",{type:"array",description:"File glob patterns"}).option("limit",{type:"number",description:"Limit number of results"}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(u.Service.use((t)=>t.search({cwd:p.directory,pattern:e.pattern,glob:e.glob,limit:e.limit})));process.stdout.write(JSON.stringify(o.items,null,2)+C)})}});import{EOL as me}from"os";var T=r({command:"scrap",describe:"list all known projects",builder:(e)=>e,async handler(){let e=w.Default.time("scrap"),o=await R.list();process.stdout.write(JSON.stringify(o,null,2)+me),e.stop()}});import{EOL as ce}from"os";var j=r({command:"skill",describe:"list all available skills",builder:(e)=>e,async handler(){await s(process.cwd(),async()=>{let e=await i.runPromise(c.gen(function*(){return yield*(yield*q.Service).all()}));process.stdout.write(JSON.stringify(e,null,2)+ce)})}});var M=r({command:"snapshot",describe:"snapshot debugging utilities",builder:(e)=>e.command(de).command(le).command(pe).demandCommand(),async handler(){}}),I=(e)=>s(process.cwd(),async()=>{console.log(await i.runPromise($.Service.use(e)))}),_=(e)=>e.positional("hash",{type:"string",description:"hash",demandOption:!0}),de=r({command:"track",describe:"track current snapshot state",async handler(){await I((e)=>e.track())}}),le=r({command:"patch <hash>",describe:"show patch for a snapshot hash",builder:_,async handler(e){await I((o)=>o.patch(e.hash))}}),pe=r({command:"diff <hash>",describe:"show diff for a snapshot hash",builder:_,async handler(e){await I((o)=>o.diff(e.hash))}});import{EOL as b}from"os";import{basename as ue}from"path";var Q=r({command:"agent <name>",describe:"show agent configuration details",builder:(e)=>e.positional("name",{type:"string",demandOption:!0,description:"Agent name"}).option("tool",{type:"string",description:"Tool id to execute"}).option("params",{type:"string",description:"Tool params as a JSON object"}),async handler(e){await s(process.cwd(),async()=>{let o=e.name,t=await i.runPromise(B.Service.use((d)=>d.get(o)));if(!t)process.stderr.write(`Agent ${o} not found, run '${ue(process.execPath)} agent list' to get an agent list`+b),process.exit(1);let n=await fe(t),a=await ye(t,n),m=e.tool;if(m){let d=n.find((W)=>W.id===m);if(!d)process.stderr.write(`Tool ${m} not found for agent ${o}`+b),process.exit(1);if(a[m]===!1)process.stderr.write(`Tool ${m} is disabled for agent ${o}`+b),process.exit(1);let h=ge(e.params),O=await we(t),N=await d.execute(h,O);process.stdout.write(JSON.stringify({tool:m,input:h,result:N},null,2)+b);return}let l={...t,tools:a};process.stdout.write(JSON.stringify(l,null,2)+b)})}});async function fe(e){return i.runPromise(c.gen(function*(){let o=yield*x.Service,t=yield*z.Service,n=e.model??(yield*o.defaultModel());return yield*t.tools({...n,agent:e})}))}async function ye(e,o){let t=f.disabled(o.map((a)=>a.id),e.permission),n={};for(let a of o)n[a.id]=!t.has(a.id);return n}function ge(e){if(!e)return{};let o=e.trim();if(o.length===0)return{};let t=(()=>{try{return JSON.parse(o)}catch{throw Error("Failed to parse --params. Provide a valid JSON object.")}})();if(!t||typeof t!=="object"||Array.isArray(t))throw Error("Tool params must be an object.");return t}async function we(e){let{session:o,messageID:t}=await i.runPromise(c.gen(function*(){let a=yield*K.Service,m=yield*a.create({title:`Debug tool run (${e.name})`}),l=G.ascending(),d=e.model?e.model:yield*c.gen(function*(){return yield*(yield*x.Service).defaultModel()}),h=Date.now(),O={id:l,sessionID:m.id,role:"assistant",time:{created:h},parentID:l,modelID:d.modelID,providerID:d.providerID,mode:"debug",agent:e.name,path:{cwd:p.directory,root:p.worktree},cost:0,tokens:{input:0,output:0,reasoning:0,cache:{read:0,write:0}}};return yield*a.updateMessage(O),{session:m,messageID:l}})),n=f.merge(e.permission,o.permission??[]);return{sessionID:o.id,messageID:t,callID:V.ascending(),agent:e.name,abort:new AbortController().signal,messages:[],metadata:()=>c.void,ask(a){return c.sync(()=>{for(let m of a.patterns)if(f.evaluate(a.permission,m,n).action==="deny")throw new f.DeniedError({ruleset:n})})}}}var jo=r({command:"debug",describe:"debugging and troubleshooting tools",builder:(e)=>e.command(k).command(E).command(F).command(L).command(T).command(j).command(M).command(Q).command(be).command({command:"wait",describe:"wait indefinitely (for debugging)",async handler(){await s(process.cwd(),async()=>{await new Promise((o)=>setTimeout(o,86400000))})}}).demandCommand(),async handler(){}}),be=r({command:"paths",describe:"show global paths (data, config, cache, state)",handler(){for(let[e,o]of Object.entries(U.Path))console.log(e.padEnd(10),o)}});export{jo as DebugCommand};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{bQ as B7,dQ as RZ}from"./chunk-aztre27e.js";import{createRequire as M8}from"module";import{fileURLToPath as k8}from"url";import{dirname as b8}from"path";import B0 from"path";import*as y6 from"path";import*as q4 from"url";import K6 from"path";import*as U6 from"path";import*as $2 from"fs/promises";import*as w6 from"path";import OJ from"process";import*as z1 from"path";import _J from"process";import Q4 from"path";import{pathToFileURL as Jz}from"url";import uz from"fs/promises";import cz from"path";import{pathToFileURL as nz}from"url";import A6 from"assert";import{statSync as f6,realpathSync as dz}from"fs";import p0 from"process";import{URL as KZ,fileURLToPath as HZ,pathToFileURL as j4}from"url";import g6 from"path";import{builtinModules as y4}from"module";import{fileURLToPath as ez}from"url";import oz from"fs";import tz from"path";import{fileURLToPath as p2}from"url";import ZV from"v8";import E0 from"assert";import{format as $V,inspect as E2}from"util";import{createRequire as nV}from"module";import f5 from"assert";import{fileURLToPath as kQ}from"url";import _Q from"assert";import D5 from"path";import{pathToFileURL as l5}from"url";import TW from"path";import s1 from"path";import sW from"url";var U2={};B7(U2,{utils:()=>s4,printer:()=>i4,default:()=>w8,builders:()=>_4});var S7=Object.defineProperty,F7=(Z,$)=>{for(var J in $)S7(Z,J,{get:$[J],enumerable:!0})},P4={};F7(P4,{builders:()=>_4,printer:()=>i4,utils:()=>s4});var R0="string",xZ="array",Y0="cursor",H0="indent",X0="align",v0="trim",CZ="group",j0="fill",DZ="if-break",y0="indent-if-break",G0="line-suffix",K0="line-suffix-boundary",AZ="line",U0="label",aZ="break-parent",C4=new Set([Y0,H0,X0,v0,CZ,j0,DZ,y0,G0,K0,AZ,U0,aZ]),N7=(Z,$,J)=>{if(Z&&($===void 0||$===null))return;if(Array.isArray($)||typeof $==="string")return $[J<0?$.length+J:J];return $.at(J)},W0=N7;function h7(Z){let $=Z.length;while($>0&&(Z[$-1]==="\r"||Z[$-1]===`
2
+ import{EO as B7,GO as RZ}from"./chunk-yjj4cvqg.js";import{createRequire as M8}from"module";import{fileURLToPath as k8}from"url";import{dirname as b8}from"path";import B0 from"path";import*as y6 from"path";import*as q4 from"url";import K6 from"path";import*as U6 from"path";import*as $2 from"fs/promises";import*as w6 from"path";import OJ from"process";import*as z1 from"path";import _J from"process";import Q4 from"path";import{pathToFileURL as Jz}from"url";import uz from"fs/promises";import cz from"path";import{pathToFileURL as nz}from"url";import A6 from"assert";import{statSync as f6,realpathSync as dz}from"fs";import p0 from"process";import{URL as KZ,fileURLToPath as HZ,pathToFileURL as j4}from"url";import g6 from"path";import{builtinModules as y4}from"module";import{fileURLToPath as ez}from"url";import oz from"fs";import tz from"path";import{fileURLToPath as p2}from"url";import ZV from"v8";import E0 from"assert";import{format as $V,inspect as E2}from"util";import{createRequire as nV}from"module";import f5 from"assert";import{fileURLToPath as kQ}from"url";import _Q from"assert";import D5 from"path";import{pathToFileURL as l5}from"url";import TW from"path";import s1 from"path";import sW from"url";var U2={};B7(U2,{utils:()=>s4,printer:()=>i4,default:()=>w8,builders:()=>_4});var S7=Object.defineProperty,F7=(Z,$)=>{for(var J in $)S7(Z,J,{get:$[J],enumerable:!0})},P4={};F7(P4,{builders:()=>_4,printer:()=>i4,utils:()=>s4});var R0="string",xZ="array",Y0="cursor",H0="indent",X0="align",v0="trim",CZ="group",j0="fill",DZ="if-break",y0="indent-if-break",G0="line-suffix",K0="line-suffix-boundary",AZ="line",U0="label",aZ="break-parent",C4=new Set([Y0,H0,X0,v0,CZ,j0,DZ,y0,G0,K0,AZ,U0,aZ]),N7=(Z,$,J)=>{if(Z&&($===void 0||$===null))return;if(Array.isArray($)||typeof $==="string")return $[J<0?$.length+J:J];return $.at(J)},W0=N7;function h7(Z){let $=Z.length;while($>0&&(Z[$-1]==="\r"||Z[$-1]===`
3
3
  `))$--;return $<Z.length?Z.slice(0,$):Z}function L7(Z){if(typeof Z==="string")return R0;if(Array.isArray(Z))return xZ;if(!Z)return;let{type:$}=Z;if(C4.has($))return $}var I0=L7,A7=(Z)=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(Z);function f7(Z){let $=Z===null?"null":typeof Z;if($!=="string"&&$!=="object")return`Unexpected doc '${$}',
4
4
  Expected it to be 'string' or 'object'.`;if(I0(Z))throw Error("doc is valid.");let J=Object.prototype.toString.call(Z);if(J!=="[object Object]")return`Unexpected doc '${J}'.`;let z=A7([...C4].map((V)=>`'${V}'`));return`Unexpected doc.type '${Z.type}'.
5
5
  Expected it to be ${z}.`}var g7=class extends Error{name="InvalidDocError";constructor(Z){super(f7(Z));this.doc=Z}},r0=g7,R4={};function m7(Z,$,J,z){let V=[Z];while(V.length>0){let q=V.pop();if(q===R4){J(V.pop());continue}if(J)V.push(q,R4);let Q=I0(q);if(!Q)throw new r0(q);if(($==null?void 0:$(q))===!1)continue;switch(Q){case xZ:case j0:{let W=Q===xZ?q:q.parts;for(let H=W.length,v=H-1;v>=0;--v)V.push(W[v]);break}case DZ:V.push(q.flatContents,q.breakContents);break;case CZ:if(z&&q.expandedStates)for(let W=q.expandedStates.length,H=W-1;H>=0;--H)V.push(q.expandedStates[H]);else V.push(q.contents);break;case X0:case H0:case y0:case U0:case G0:V.push(q.contents);break;case R0:case Y0:case v0:case K0:case AZ:case aZ:break;default:throw new r0(q)}}}var v2=m7;function f1(Z,$){if(typeof Z==="string")return $(Z);let J=new Map;return z(Z);function z(q){if(J.has(q))return J.get(q);let Q=V(q);return J.set(q,Q),Q}function V(q){switch(I0(q)){case xZ:return $(q.map(z));case j0:return $({...q,parts:q.parts.map(z)});case DZ:return $({...q,breakContents:z(q.breakContents),flatContents:z(q.flatContents)});case CZ:{let{expandedStates:Q,contents:W}=q;if(Q)Q=Q.map(z),W=Q[0];else W=z(W);return $({...q,contents:W,expandedStates:Q})}case X0:case H0:case y0:case U0:case G0:return $({...q,contents:z(q.contents)});case R0:case Y0:case v0:case K0:case AZ:case aZ:return $(q);default:throw new r0(q)}}}function j2(Z,$,J){let z=J,V=!1;function q(Q){if(V)return!1;let W=$(Q);if(W!==void 0)V=!0,z=W}return v2(Z,q),z}function R7(Z){if(Z.type===CZ&&Z.break)return!0;if(Z.type===AZ&&Z.hard)return!0;if(Z.type===aZ)return!0}function Y7(Z){return j2(Z,R7,!1)}function Y4(Z){if(Z.length>0){let $=W0(!1,Z,-1);if(!$.expandedStates&&!$.break)$.break="propagated"}return null}function I7(Z){let $=new Set,J=[];function z(q){if(q.type===aZ)Y4(J);if(q.type===CZ){if(J.push(q),$.has(q))return!1;$.add(q)}}function V(q){if(q.type===CZ){if(J.pop().break)Y4(J)}}v2(Z,z,V,!0)}function P7(Z){if(Z.type===AZ&&!Z.hard)return Z.soft?"":" ";if(Z.type===DZ)return Z.flatContents;return Z}function C7(Z){return f1(Z,P7)}function I4(Z){Z=[...Z];while(Z.length>=2&&W0(!1,Z,-2).type===AZ&&W0(!1,Z,-1).type===aZ)Z.length-=2;if(Z.length>0){let $=q1(W0(!1,Z,-1));Z[Z.length-1]=$}return Z}function q1(Z){switch(I0(Z)){case H0:case y0:case CZ:case G0:case U0:{let $=q1(Z.contents);return{...Z,contents:$}}case DZ:return{...Z,breakContents:q1(Z.breakContents),flatContents:q1(Z.flatContents)};case j0:return{...Z,parts:I4(Z.parts)};case xZ:return I4(Z);case R0:return h7(Z);case X0:case Y0:case v0:case K0:case AZ:case aZ:break;default:throw new r0(Z)}return Z}function T7(Z){return q1(u7(Z))}function O7(Z){switch(I0(Z)){case j0:if(Z.parts.every(($)=>$===""))return"";break;case CZ:if(!Z.contents&&!Z.id&&!Z.break&&!Z.expandedStates)return"";if(Z.contents.type===CZ&&Z.contents.id===Z.id&&Z.contents.break===Z.break&&Z.contents.expandedStates===Z.expandedStates)return Z.contents;break;case X0:case H0:case y0:case G0:if(!Z.contents)return"";break;case DZ:if(!Z.flatContents&&!Z.breakContents)return"";break;case xZ:{let $=[];for(let J of Z){if(!J)continue;let[z,...V]=Array.isArray(J)?J:[J];if(typeof z==="string"&&typeof W0(!1,$,-1)==="string")$[$.length-1]+=z;else $.push(z);$.push(...V)}if($.length===0)return"";if($.length===1)return $[0];return $}case R0:case Y0:case v0:case K0:case AZ:case U0:case aZ:break;default:throw new r0(Z)}return Z}function u7(Z){return f1(Z,($)=>O7($))}function D7(Z,$=D4){return f1(Z,(J)=>typeof J==="string"?l4($,J.split(`
@@ -75,7 +75,7 @@ ${V}`,$);this.line=J,this.column=z,this.codeblock=V}};function n1(Z,$=0,J=Z.leng
75
75
  `)throw new $Z("newlines are not allowed in inline tables",{toml:Z,ptr:$-1});else if(q==="#")throw new $Z("inline tables cannot contain comments",{toml:Z,ptr:$-1});else if(q===",")throw new $Z("expected key-value, found comma",{toml:Z,ptr:$-1});else if(q!==" "&&q!=="\t"){let W,H=z,v=!1,[X,j]=l2(Z,$-1);for(let G=0;G<X.length;G++){if(G)H=v?H[W]:H[W]={};if(W=X[G],(v=Object.hasOwn(H,W))&&(typeof H[W]!=="object"||V.has(H[W])))throw new $Z("trying to redefine an already defined value",{toml:Z,ptr:$});if(!v&&W==="__proto__")Object.defineProperty(H,W,{enumerable:!0,configurable:!0,writable:!0})}if(v)throw new $Z("trying to redefine an already defined value",{toml:Z,ptr:$});let[y,K]=X4(Z,j,"}",J-1);V.add(y),H[W]=y,$=K,Q=Z[$-1]===","?$-1:0}if(Q)throw new $Z("trailing commas are not allowed in inline tables",{toml:Z,ptr:Q});if(!q)throw new $Z("unfinished table encountered",{toml:Z,ptr:$});return[z,$]}function Tz(Z,$,J=-1){let z=[],V;$++;while((V=Z[$++])!=="]"&&V)if(V===",")throw new $Z("expected value, found comma",{toml:Z,ptr:$-1});else if(V==="#")$=H4(Z,$);else if(V!==" "&&V!=="\t"&&V!==`
76
76
  `&&V!=="\r"){let q=X4(Z,$-1,"]",J-1);z.push(q[0]),$=q[1]}if(!V)throw new $Z("unfinished array encountered",{toml:Z,ptr:$});return[z,$]}function X5(Z,$,J,z){var V,q;let Q=$,W=J,H,v=!1,X;for(let j=0;j<Z.length;j++){if(j){if(Q=v?Q[H]:Q[H]={},W=(X=W[H]).c,z===0&&(X.t===1||X.t===2))return null;if(X.t===2){let y=Q.length-1;Q=Q[y],W=W[y].c}}if(H=Z[j],(v=Object.hasOwn(Q,H))&&((V=W[H])==null?void 0:V.t)===0&&((q=W[H])==null?void 0:q.d))return null;if(!v){if(H==="__proto__")Object.defineProperty(Q,H,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(W,H,{enumerable:!0,configurable:!0,writable:!0});W[H]={t:j<Z.length-1&&z===2?3:z,d:!1,i:0,c:{}}}}if(X=W[H],X.t!==z&&!(z===1&&X.t===3))return null;if(z===2){if(!X.d)X.d=!0,Q[H]=[];Q[H].push(Q={}),X.c[X.i++]=X={t:1,d:!1,i:0,c:{}}}if(X.d)return null;if(X.d=!0,z===1)Q=v?Q[H]:Q[H]={};else if(z===0&&v)return null;return[H,Q,X.c]}function Oz(Z,$){let J=($==null?void 0:$.maxDepth)??1000,z={},V={},q=z,Q=V;for(let W=Z0(Z,0);W<Z.length;){if(Z[W]==="["){let H=Z[++W]==="[",v=l2(Z,W+=+H,"]");if(H){if(Z[v[1]-1]!=="]")throw new $Z("expected end of table declaration",{toml:Z,ptr:v[1]-1});v[1]++}let X=X5(v[0],z,V,H?2:1);if(!X)throw new $Z("trying to redefine an already defined table or value",{toml:Z,ptr:W});Q=X[2],q=X[1],W=v[1]}else{let H=l2(Z,W),v=X5(H[0],q,Q,0);if(!v)throw new $Z("trying to redefine an already defined table or value",{toml:Z,ptr:W});let X=X4(Z,H[1],void 0,J);v[1][v[0]]=X[0],W=X[1]}if(W=Z0(Z,W,!0),Z[W]&&Z[W]!==`
77
77
  `&&Z[W]!=="\r")throw new $Z("each key-value declaration must be followed by an end-of-line",{toml:Z,ptr:W});W=Z0(Z,W)}return z}async function Dz(Z){if(G6(Z))Z=new URL(Z);try{return await uz.readFile(Z,"utf8")}catch($){if($.code==="ENOENT")return;throw Error(`Unable to read '${Z}': ${$.message}`)}}var b1=Dz;async function v4(Z){let $=await b1(Z);try{return Sz($)}catch(J){throw J.message=`JSON Error in ${Z}:
78
- ${J.message}`,J}}async function O0(Z){return(await import(Jz(Z).href)).default}async function lz(Z){try{return await v4(Z)}catch($){try{return await O0(Z)}catch{}throw $}}var h6=process.versions.bun?async function($){let{prettier:J}=await lz($);return J}:async function($){let{prettier:J}=await v4($);return J};async function L6(Z){let{prettier:$}=await D1(Z);return $}var b2;async function D1(Z){let $=await b1(Z);if(!b2)({__parsePrettierYamlConfig:b2}=await import("./chunk-5qam3c8r.js"));try{return b2($)}catch(J){throw J.message=`YAML Error in ${Z}:
78
+ ${J.message}`,J}}async function O0(Z){return(await import(Jz(Z).href)).default}async function lz(Z){try{return await v4(Z)}catch($){try{return await O0(Z)}catch{}throw $}}var h6=process.versions.bun?async function($){let{prettier:J}=await lz($);return J}:async function($){let{prettier:J}=await v4($);return J};async function L6(Z){let{prettier:$}=await D1(Z);return $}var b2;async function D1(Z){let $=await b1(Z);if(!b2)({__parsePrettierYamlConfig:b2}=await import("./chunk-n5sh2790.js"));try{return b2($)}catch(J){throw J.message=`YAML Error in ${Z}:
79
79
  ${J.message}`,J}}async function pz(Z){let $=await b1(Z);try{return Oz($)}catch(J){throw J.message=`TOML Error in ${Z}:
80
80
  ${J.message}`,J}}async function Ez(Z){let $=await b1(Z);try{return yz.parse($)}catch(J){throw J.message=`JSON5 Error in ${Z}:
81
81
  ${J.message}`,J}}var _z={".toml":pz,".json5":Ez,".json":v4,".js":O0,".mjs":O0,".cjs":O0,".ts":O0,".mts":O0,".cts":O0,".yaml":D1,".yml":D1,"":D1},iz=_z,sz=["package.json","package.yaml",".prettierrc",".prettierrc.json",".prettierrc.yaml",".prettierrc.yml",".prettierrc.json5",".prettierrc.js",".prettierrc.ts",".prettierrc.mjs",".prettierrc.mts",".prettierrc.cjs",".prettierrc.cts","prettier.config.js","prettier.config.ts","prettier.config.mjs","prettier.config.mts","prettier.config.cjs","prettier.config.cts",".prettierrc.toml"];async function az({name:Z,path:$}){if(Z==="package.json")try{return Boolean(await h6($))}catch{return!1}if(Z==="package.yaml")try{return Boolean(await L6($))}catch{return!1}return!0}function rz(Z){return new aJ(sz,{filter:az,stopDirectory:Z})}var xz=rz,JV={}.hasOwnProperty,zV=/^([A-Z][a-z\d]*)+$/,VV=new Set(["string","function","number","object","Function","Object","boolean","bigint","symbol"]),NZ={};function B2(Z,$="and"){return Z.length<3?Z.join(` ${$} `):`${Z.slice(0,-1).join(", ")}, ${$} ${Z[Z.length-1]}`}var m6=new Map,qV="__node_internal_",v5;NZ.ERR_INVALID_ARG_TYPE=uZ("ERR_INVALID_ARG_TYPE",(Z,$,J)=>{if(E0(typeof Z==="string","'name' must be a string"),!Array.isArray($))$=[$];let z="The ";if(Z.endsWith(" argument"))z+=`${Z} `;else{let W=Z.includes(".")?"property":"argument";z+=`"${Z}" ${W} `}z+="must be ";let V=[],q=[],Q=[];for(let W of $)if(E0(typeof W==="string","All expected entries have to be of type string"),VV.has(W))V.push(W.toLowerCase());else if(zV.exec(W)===null)E0(W!=="object",'The value "object" should be written as "Object"'),Q.push(W);else q.push(W);if(q.length>0){let W=V.indexOf("object");if(W!==-1)V.slice(W,1),q.push("Object")}if(V.length>0){if(z+=`${V.length>1?"one of type":"of type"} ${B2(V,"or")}`,q.length>0||Q.length>0)z+=" or "}if(q.length>0){if(z+=`an instance of ${B2(q,"or")}`,Q.length>0)z+=" or "}if(Q.length>0)if(Q.length>1)z+=`one of ${B2(Q,"or")}`;else{if(Q[0].toLowerCase()!==Q[0])z+="an ";z+=`${Q[0]}`}return z+=`. Received ${vV(J)}`,z},TypeError);NZ.ERR_INVALID_MODULE_SPECIFIER=uZ("ERR_INVALID_MODULE_SPECIFIER",(Z,$,J=void 0)=>{return`Invalid module "${Z}" ${$}${J?` imported from ${J}`:""}`},TypeError);NZ.ERR_INVALID_PACKAGE_CONFIG=uZ("ERR_INVALID_PACKAGE_CONFIG",(Z,$,J)=>{return`Invalid package config ${Z}${$?` while importing ${$}`:""}${J?`. ${J}`:""}`},Error);NZ.ERR_INVALID_PACKAGE_TARGET=uZ("ERR_INVALID_PACKAGE_TARGET",(Z,$,J,z=!1,V=void 0)=>{let q=typeof J==="string"&&!z&&J.length>0&&!J.startsWith("./");if($===".")return E0(z===!1),`Invalid "exports" main target ${JSON.stringify(J)} defined in the package config ${Z}package.json${V?` imported from ${V}`:""}${q?'; targets must start with "./"':""}`;return`Invalid "${z?"imports":"exports"}" target ${JSON.stringify(J)} defined for '${$}' in the package config ${Z}package.json${V?` imported from ${V}`:""}${q?'; targets must start with "./"':""}`},Error);NZ.ERR_MODULE_NOT_FOUND=uZ("ERR_MODULE_NOT_FOUND",(Z,$,J=!1)=>{return`Cannot find ${J?"module":"package"} '${Z}' imported from ${$}`},Error);NZ.ERR_NETWORK_IMPORT_DISALLOWED=uZ("ERR_NETWORK_IMPORT_DISALLOWED","import of '%s' by %s is not supported: %s",Error);NZ.ERR_PACKAGE_IMPORT_NOT_DEFINED=uZ("ERR_PACKAGE_IMPORT_NOT_DEFINED",(Z,$,J)=>{return`Package import specifier "${Z}" is not defined${$?` in package ${$}package.json`:""} imported from ${J}`},TypeError);NZ.ERR_PACKAGE_PATH_NOT_EXPORTED=uZ("ERR_PACKAGE_PATH_NOT_EXPORTED",(Z,$,J=void 0)=>{if($===".")return`No "exports" main defined in ${Z}package.json${J?` imported from ${J}`:""}`;return`Package subpath '${$}' is not defined by "exports" in ${Z}package.json${J?` imported from ${J}`:""}`},Error);NZ.ERR_UNSUPPORTED_DIR_IMPORT=uZ("ERR_UNSUPPORTED_DIR_IMPORT","Directory import '%s' is not supported resolving ES modules imported from %s",Error);NZ.ERR_UNSUPPORTED_RESOLVE_REQUEST=uZ("ERR_UNSUPPORTED_RESOLVE_REQUEST",'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.',TypeError);NZ.ERR_UNKNOWN_FILE_EXTENSION=uZ("ERR_UNKNOWN_FILE_EXTENSION",(Z,$)=>{return`Unknown file extension "${Z}" for ${$}`},TypeError);NZ.ERR_INVALID_ARG_VALUE=uZ("ERR_INVALID_ARG_VALUE",(Z,$,J="is invalid")=>{let z=E2($);if(z.length>128)z=`${z.slice(0,128)}...`;return`The ${Z.includes(".")?"property":"argument"} '${Z}' ${J}. Received ${z}`},TypeError);function uZ(Z,$,J){return m6.set(Z,$),QV(J,Z)}function QV(Z,$){return J;function J(...z){let V=Error.stackTraceLimit;if(_2())Error.stackTraceLimit=0;let q=new Z;if(_2())Error.stackTraceLimit=V;let Q=XV($,z,q);return Object.defineProperties(q,{message:{value:Q,enumerable:!1,writable:!0,configurable:!0},toString:{value(){return`${this.name} [${$}]: ${this.message}`},enumerable:!1,writable:!0,configurable:!0}}),HV(q),q.code=$,q}}function _2(){try{if(ZV.startupSnapshot.isBuildingSnapshot())return!1}catch{}let Z=Object.getOwnPropertyDescriptor(Error,"stackTraceLimit");if(Z===void 0)return Object.isExtensible(Error);return JV.call(Z,"writable")&&Z.writable!==void 0?Z.writable:Z.set!==void 0}function WV(Z){let $=qV+Z.name;return Object.defineProperty(Z,"name",{value:$}),Z}var HV=WV(function(Z){let $=_2();if($)v5=Error.stackTraceLimit,Error.stackTraceLimit=Number.POSITIVE_INFINITY;if(Error.captureStackTrace(Z),$)Error.stackTraceLimit=v5;return Z});function XV(Z,$,J){let z=m6.get(Z);if(E0(z!==void 0,"expected `message` to be found"),typeof z==="function")return E0(z.length<=$.length,`Code: ${Z}; The provided arguments length (${$.length}) does not match the required ones (${z.length}).`),Reflect.apply(z,J,$);let V=/%[dfijoOs]/g,q=0;while(V.exec(z)!==null)q++;if(E0(q===$.length,`Code: ${Z}; The provided arguments length (${$.length}) does not match the required ones (${q}).`),$.length===0)return z;return $.unshift(z),Reflect.apply($V,null,$)}function vV(Z){if(Z===null||Z===void 0)return String(Z);if(typeof Z==="function"&&Z.name)return`function ${Z.name}`;if(typeof Z==="object"){if(Z.constructor&&Z.constructor.name)return`an instance of ${Z.constructor.name}`;return`${E2(Z,{depth:-1})}`}let $=E2(Z,{colors:!1});if($.length>28)$=`${$.slice(0,25)}...`;return`type ${typeof Z} (${$})`}var Q1={}.hasOwnProperty,{ERR_INVALID_PACKAGE_CONFIG:jV}=NZ,j5=new Map;function R6(Z,{base:$,specifier:J}){let z=j5.get(Z);if(z)return z;let V;try{V=oz.readFileSync(tz.toNamespacedPath(Z),"utf8")}catch(Q){let W=Q;if(W.code!=="ENOENT")throw W}let q={exists:!1,pjsonPath:Z,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};if(V!==void 0){let Q;try{Q=JSON.parse(V)}catch(W){let H=W,v=new jV(Z,($?`"${J}" from `:"")+p2($||J),H.message);throw v.cause=H,v}if(q.exists=!0,Q1.call(Q,"name")&&typeof Q.name==="string")q.name=Q.name;if(Q1.call(Q,"main")&&typeof Q.main==="string")q.main=Q.main;if(Q1.call(Q,"exports"))q.exports=Q.exports;if(Q1.call(Q,"imports"))q.imports=Q.imports;if(Q1.call(Q,"type")&&(Q.type==="commonjs"||Q.type==="module"))q.type=Q.type}return j5.set(Z,q),q}function G4(Z){let $=new URL("package.json",Z);while(!0){if($.pathname.endsWith("node_modules/package.json"))break;let V=R6(p2($),{specifier:Z});if(V.exists)return V;let q=$;if($=new URL("../package.json",$),$.pathname===q.pathname)break}return{pjsonPath:p2($),exists:!1,type:"none"}}function y5(Z){return G4(Z).type}var{ERR_UNKNOWN_FILE_EXTENSION:yV}=NZ,GV={}.hasOwnProperty,KV={__proto__:null,".cjs":"commonjs",".js":"module",".json":"json",".mjs":"module"};function UV(Z){if(Z&&/\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(Z))return"module";if(Z==="application/json")return"json";return null}var G5={__proto__:null,"data:":wV,"file:":kV,"http:":K5,"https:":K5,"node:"(){return"builtin"}};function wV(Z){let{1:$}=/^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(Z.pathname)||[null,null,null];return UV($)}function MV(Z){let $=Z.pathname,J=$.length;while(J--){let z=$.codePointAt(J);if(z===47)return"";if(z===46)return $.codePointAt(J-1)===47?"":$.slice(J)}return""}function kV(Z,$,J){let z=MV(Z);if(z===".js"){let Q=y5(Z);if(Q!=="none")return Q;return"commonjs"}if(z===""){let Q=y5(Z);if(Q==="none"||Q==="commonjs")return"commonjs";return"module"}let V=KV[z];if(V)return V;if(J)return;let q=ez(Z);throw new yV(z,q)}function K5(){}function Y6(Z,$){let J=Z.protocol;if(!GV.call(G5,J))return null;return G5[J](Z,$,!0)||null}var{ERR_INVALID_ARG_VALUE:bV}=NZ,I6=Object.freeze(["node","import"]),BV=new Set(I6);function SV(){return I6}function FV(){return BV}function NV(Z){if(Z!==void 0&&Z!==SV()){if(!Array.isArray(Z))throw new bV("conditions",Z,"expected an array");return new Set(Z)}return FV()}var m1=RegExp.prototype[Symbol.replace],{ERR_NETWORK_IMPORT_DISALLOWED:S2,ERR_INVALID_MODULE_SPECIFIER:J2,ERR_INVALID_PACKAGE_CONFIG:P6,ERR_INVALID_PACKAGE_TARGET:hV,ERR_MODULE_NOT_FOUND:K4,ERR_PACKAGE_IMPORT_NOT_DEFINED:LV,ERR_PACKAGE_PATH_NOT_EXPORTED:AV,ERR_UNSUPPORTED_DIR_IMPORT:fV,ERR_UNSUPPORTED_RESOLVE_REQUEST:U5}=NZ,C6={}.hasOwnProperty,w5=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i,M5=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i,gV=/^\.|%|\\/,R1=/\*/g,mV=/%2f|%5c/i,k5=new Set,RV=/[/\\]{2}/;function b5(Z,$,J,z,V,q,Q){if(p0.noDeprecation)return;let W=HZ(z),H=RV.exec(Q?Z:$)!==null;p0.emitWarning(`Use of deprecated ${H?"double slash":"leading or trailing slash matching"} resolving "${Z}" for module request "${$}" ${$===J?"":`matched to "${J}" `}in the "${V?"imports":"exports"}" field module resolution of the package at ${W}${q?` imported from ${HZ(q)}`:""}.`,"DeprecationWarning","DEP0166")}function B5(Z,$,J,z){if(p0.noDeprecation)return;if(Y6(Z,{parentURL:J.href})!=="module")return;let q=HZ(Z.href),Q=HZ(new KZ(".",$)),W=HZ(J);if(!z)p0.emitWarning(`No "main" or "exports" field defined in the package.json for ${Q} resolving the main entry point "${q.slice(Q.length)}", imported from ${W}.
@@ -104,7 +104,7 @@ The range will extend backwards to the start of the first line containing the se
104
104
  `)y+=E6(K.slice(0,y),`
105
105
  `);K=B1(!1,K,`
106
106
  `,G)}return{formatted:K,cursorOffset:y,comments:X.comments}}function g2(Z,$,J){if(typeof $!=="number"||Number.isNaN($)||$<0||$>Z.length)return J;return $}function T5(Z,$){let{cursorOffset:J,rangeStart:z,rangeEnd:V}=$;return J=g2(Z,J,-1),z=g2(Z,z,0),V=g2(Z,V,Z.length),{...$,cursorOffset:J,rangeStart:z,rangeEnd:V}}function v7(Z,$){let{cursorOffset:J,rangeStart:z,rangeEnd:V,endOfLine:q}=T5(Z,$),Q=Z.charAt(0)===H7;if(Q)Z=Z.slice(1),J--,z--,V--;if(q==="auto")q=Gq(Z);if(Z.includes("\r")){let W=(H)=>E6(Z.slice(0,Math.max(H,0)),`\r
107
- `);J-=W(J),z-=W(z),V-=W(V),Z=Kq(Z)}return{hasBOM:Q,text:Z,options:T5(Z,{...$,cursorOffset:J,rangeStart:z,rangeEnd:V,endOfLine:q})}}async function O5(Z,$){let J=await L4($);return!J.hasPragma||J.hasPragma(Z)}async function dQ(Z,$){var J;let z=await L4($);return(J=z.hasIgnorePragma)==null?void 0:J.call(z,Z)}async function j7(Z,$){let{hasBOM:J,text:z,options:V}=v7(Z,await V1($));if(V.rangeStart>=V.rangeEnd&&z!==""||V.requirePragma&&!await O5(z,V)||V.checkIgnorePragma&&await dQ(z,V))return{formatted:Z,cursorOffset:$.cursorOffset,comments:[]};let q;if(V.rangeStart>0||V.rangeEnd<z.length)q=await nQ(z,V);else{if(!V.requirePragma&&V.insertPragma&&V.printer.insertPragma&&!await O5(z,V))z=V.printer.insertPragma(z);q=await X7(z,V)}if(J){if(q.formatted=H7+q.formatted,q.cursorOffset>=0)q.cursorOffset++}return q}async function eQ(Z,$,J){let{text:z,options:V}=v7(Z,await V1($)),q=await N1(z,V);if(J){if(J.preprocessForPrint)q.ast=await q7(q.ast,V);if(J.massage)q.ast=lQ(q.ast,V)}return q}async function oQ(Z,$){$=await V1($);let J=await q2(Z,$);return k4(J,$)}async function tQ(Z,$){let J=Yq(Z),{formatted:z}=await j7(J,{...$,parser:"__js_expression"});return z}async function ZW(Z,$){$=await V1($);let{ast:J}=await N1(Z,$);if($.cursorOffset>=0)$={...$,...Q7(J,$)};return q2(J,$)}async function $W(Z,$){return k4(Z,await V1($))}var y7={};M1(y7,{CATEGORY_CONFIG:()=>JW,CATEGORY_EDITOR:()=>zW,CATEGORY_FORMAT:()=>VW,CATEGORY_GLOBAL:()=>WW,CATEGORY_OTHER:()=>qW,CATEGORY_OUTPUT:()=>QW,CATEGORY_SPECIAL:()=>HW});var JW="Config",zW="Editor",VW="Format",qW="Other",QW="Output",WW="Global",HW="Special",G7={};M1(G7,{languages:()=>YW,options:()=>RW,parsers:()=>IW,printers:()=>PW});var XW=[{name:"CSS",type:"markup",extensions:[".css",".wxss"],tmScope:"source.css",aceMode:"css",codemirrorMode:"css",codemirrorMimeType:"text/css",parsers:["css"],vscodeLanguageIds:["css"],linguistLanguageId:50},{name:"PostCSS",type:"markup",extensions:[".pcss",".postcss"],tmScope:"source.postcss",aceMode:"text",group:"CSS",parsers:["css"],vscodeLanguageIds:["postcss"],linguistLanguageId:262764437},{name:"Less",type:"markup",extensions:[".less"],tmScope:"source.css.less",aceMode:"less",aliases:["less-css"],codemirrorMode:"css",codemirrorMimeType:"text/css",parsers:["less"],vscodeLanguageIds:["less"],linguistLanguageId:198},{name:"SCSS",type:"markup",extensions:[".scss"],tmScope:"source.css.scss",aceMode:"scss",codemirrorMode:"css",codemirrorMimeType:"text/x-scss",parsers:["scss"],vscodeLanguageIds:["scss"],linguistLanguageId:329}],PZ={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},vW={singleQuote:PZ.singleQuote},jW=vW,yW=[{name:"GraphQL",type:"data",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",aceMode:"text",parsers:["graphql"],vscodeLanguageIds:["graphql"],linguistLanguageId:139}],GW={bracketSpacing:PZ.bracketSpacing},KW=GW,UW=[{name:"Handlebars",type:"markup",extensions:[".handlebars",".hbs"],tmScope:"text.html.handlebars",aceMode:"handlebars",aliases:["hbs","htmlbars"],parsers:["glimmer"],vscodeLanguageIds:["handlebars"],linguistLanguageId:155}],wW=[{name:"Angular",type:"markup",extensions:[".component.html"],tmScope:"text.html.basic",aceMode:"html",aliases:["xhtml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["angular"],vscodeLanguageIds:["html"],filenames:[],linguistLanguageId:146},{name:"HTML",type:"markup",extensions:[".html",".hta",".htm",".html.hl",".inc",".xht",".xhtml"],tmScope:"text.html.basic",aceMode:"html",aliases:["xhtml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["html"],vscodeLanguageIds:["html"],linguistLanguageId:146},{name:"Lightning Web Components",type:"markup",extensions:[],tmScope:"text.html.basic",aceMode:"html",aliases:["xhtml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["lwc"],vscodeLanguageIds:["html"],filenames:[],linguistLanguageId:146},{name:"MJML",type:"markup",extensions:[".mjml"],tmScope:"text.mjml.basic",aceMode:"html",aliases:["MJML","mjml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["mjml"],filenames:[],vscodeLanguageIds:["mjml"],linguistLanguageId:146},{name:"Vue",type:"markup",extensions:[".vue"],tmScope:"source.vue",aceMode:"html",parsers:["vue"],vscodeLanguageIds:["vue"],linguistLanguageId:391}],u5="HTML",MW={bracketSameLine:PZ.bracketSameLine,htmlWhitespaceSensitivity:{category:u5,type:"choice",default:"css",description:"How to handle whitespaces in HTML.",choices:[{value:"css",description:"Respect the default value of CSS display property."},{value:"strict",description:"Whitespaces are considered sensitive."},{value:"ignore",description:"Whitespaces are considered insensitive."}]},singleAttributePerLine:PZ.singleAttributePerLine,vueIndentScriptAndStyle:{category:u5,type:"boolean",default:!1,description:"Indent script and style tags in Vue files."}},kW=MW,bW=[{name:"JavaScript",type:"programming",extensions:[".js","._js",".bones",".cjs",".es",".es6",".gs",".jake",".javascript",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".start.frag",".end.frag",".wxs"],tmScope:"source.js",aceMode:"javascript",aliases:["js","node"],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell","zx"],filenames:["Jakefile","start.frag","end.frag"],parsers:["babel","acorn","espree","meriyah","babel-flow","babel-ts","flow","typescript"],vscodeLanguageIds:["javascript","mongo"],linguistLanguageId:183},{name:"Flow",type:"programming",extensions:[".js.flow"],tmScope:"source.js",aceMode:"javascript",aliases:[],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],filenames:[],parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"],linguistLanguageId:183},{name:"JSX",type:"programming",extensions:[".jsx"],tmScope:"source.js.jsx",aceMode:"javascript",aliases:void 0,codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",interpreters:void 0,filenames:void 0,parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],group:"JavaScript",linguistLanguageId:183},{name:"TypeScript",type:"programming",extensions:[".ts",".cts",".mts"],tmScope:"source.ts",aceMode:"typescript",aliases:["ts"],codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",interpreters:["bun","deno","ts-node","tsx"],parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"],linguistLanguageId:378},{name:"TSX",type:"programming",extensions:[".tsx"],tmScope:"source.tsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",group:"TypeScript",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"],linguistLanguageId:94901924}],w0="JavaScript",BW={arrowParens:{category:w0,type:"choice",default:"always",description:"Include parentheses around a sole arrow function parameter.",choices:[{value:"always",description:"Always include parens. Example: `(x) => x`"},{value:"avoid",description:"Omit parens when possible. Example: `x => x`"}]},bracketSameLine:PZ.bracketSameLine,objectWrap:PZ.objectWrap,bracketSpacing:PZ.bracketSpacing,jsxBracketSameLine:{category:w0,type:"boolean",description:"Put > on the last line instead of at a new line.",deprecated:"2.4.0"},semi:{category:w0,type:"boolean",default:!0,description:"Print semicolons.",oppositeDescription:"Do not print semicolons, except at the beginning of lines which may need them."},experimentalOperatorPosition:{category:w0,type:"choice",default:"end",description:"Where to print operators when binary expressions wrap lines.",choices:[{value:"start",description:"Print operators at the start of new lines."},{value:"end",description:"Print operators at the end of previous lines."}]},experimentalTernaries:{category:w0,type:"boolean",default:!1,description:"Use curious ternaries, with the question mark after the condition.",oppositeDescription:"Default behavior of ternaries; keep question marks on the same line as the consequent."},singleQuote:PZ.singleQuote,jsxSingleQuote:{category:w0,type:"boolean",default:!1,description:"Use single quotes in JSX."},quoteProps:{category:w0,type:"choice",default:"as-needed",description:"Change when properties in objects are quoted.",choices:[{value:"as-needed",description:"Only add quotes around object properties where required."},{value:"consistent",description:"If at least one property in an object requires quotes, quote all properties."},{value:"preserve",description:"Respect the input use of quotes in object properties."}]},trailingComma:{category:w0,type:"choice",default:"all",description:"Print trailing commas wherever possible when multi-line.",choices:[{value:"all",description:"Trailing commas wherever possible (including function arguments)."},{value:"es5",description:"Trailing commas where valid in ES5 (objects, arrays, etc.)"},{value:"none",description:"No trailing commas."}]},singleAttributePerLine:PZ.singleAttributePerLine},SW=BW,FW=[{name:"JSON.stringify",type:"data",extensions:[".importmap"],tmScope:"source.json",aceMode:"json",aliases:["geojson","jsonl","sarif","topojson"],codemirrorMode:"javascript",codemirrorMimeType:"application/json",filenames:["package.json","package-lock.json","composer.json"],parsers:["json-stringify"],vscodeLanguageIds:["json"],linguistLanguageId:174},{name:"JSON",type:"data",extensions:[".json",".4DForm",".4DProject",".avsc",".geojson",".gltf",".har",".ice",".JSON-tmLanguage",".json.example",".mcmeta",".sarif",".tact",".tfstate",".tfstate.backup",".topojson",".webapp",".webmanifest",".yy",".yyp"],tmScope:"source.json",aceMode:"json",aliases:["geojson","jsonl","sarif","topojson"],codemirrorMode:"javascript",codemirrorMimeType:"application/json",filenames:[".all-contributorsrc",".arcconfig",".auto-changelog",".c8rc",".htmlhintrc",".imgbotconfig",".nycrc",".tern-config",".tern-project",".watchmanconfig",".babelrc",".jscsrc",".jshintrc",".jslintrc",".swcrc"],parsers:["json"],vscodeLanguageIds:["json"],linguistLanguageId:174},{name:"JSON with Comments",type:"data",extensions:[".jsonc",".code-snippets",".code-workspace",".sublime-build",".sublime-color-scheme",".sublime-commands",".sublime-completions",".sublime-keymap",".sublime-macro",".sublime-menu",".sublime-mousemap",".sublime-project",".sublime-settings",".sublime-theme",".sublime-workspace",".sublime_metrics",".sublime_session"],tmScope:"source.json.comments",aceMode:"javascript",aliases:["jsonc"],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",group:"JSON",filenames:[],parsers:["jsonc"],vscodeLanguageIds:["jsonc"],linguistLanguageId:423},{name:"JSON5",type:"data",extensions:[".json5"],tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json5"],vscodeLanguageIds:["json5"],linguistLanguageId:175}],NW=[{name:"Markdown",type:"prose",extensions:[".md",".livemd",".markdown",".mdown",".mdwn",".mkd",".mkdn",".mkdown",".ronn",".scd",".workbook"],tmScope:"text.md",aceMode:"markdown",aliases:["md","pandoc"],codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",filenames:["contents.lr","README"],wrap:!0,parsers:["markdown"],vscodeLanguageIds:["markdown"],linguistLanguageId:222},{name:"MDX",type:"prose",extensions:[".mdx"],tmScope:"text.md",aceMode:"markdown",aliases:["md","pandoc"],codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",filenames:[],wrap:!0,parsers:["mdx"],vscodeLanguageIds:["mdx"],linguistLanguageId:222}],hW={proseWrap:PZ.proseWrap,singleQuote:PZ.singleQuote},LW=hW,AW=[{name:"YAML",type:"data",extensions:[".yml",".mir",".reek",".rviz",".sublime-syntax",".syntax",".yaml",".yaml-tmlanguage",".yaml.sed",".yml.mysql"],tmScope:"source.yaml",aceMode:"yaml",aliases:["yml"],codemirrorMode:"yaml",codemirrorMimeType:"text/x-yaml",filenames:[".clang-format",".clang-tidy",".clangd",".gemrc","CITATION.cff","glide.lock","pixi.lock",".prettierrc",".stylelintrc",".lintstagedrc"],parsers:["yaml"],vscodeLanguageIds:["yaml","ansible","dockercompose","github-actions-workflow","home-assistant"],linguistLanguageId:407}],fW={bracketSpacing:PZ.bracketSpacing,singleQuote:PZ.singleQuote,proseWrap:PZ.proseWrap},gW=fW;function mW(Z){let $=Object.create(null),J=Object.create(null);for(let{importPlugin:z,parsers:V=[],printers:q=[]}of Z){let Q=async()=>{let W=await z();return Object.assign($,W.parsers),Object.assign(J,W.printers),W};for(let W of V)$[W]=async()=>(await Q()).parsers[W];for(let W of q)J[W]=async()=>(await Q()).printers[W]}return{parsers:$,printers:J}}var RW={...jW,...KW,...kW,...SW,...LW,...gW},YW=[...XW,...yW,...UW,...wW,...bW,...FW,...NW,...AW],{parsers:IW,printers:PW}=mW([{importPlugin:()=>import("./chunk-mgk9sh16.js"),parsers:["acorn","espree"]},{importPlugin:()=>import("./chunk-9j1qqdr2.js"),parsers:["__ng_action","__ng_binding","__ng_interpolation","__ng_directive"]},{importPlugin:()=>import("./chunk-f45tp3e3.js"),parsers:["babel","babel-flow","babel-ts","__js_expression","__ts_expression","__vue_expression","__vue_ts_expression","__vue_event_binding","__vue_ts_event_binding","__babel_estree","json","json5","jsonc","json-stringify"]},{importPlugin:()=>import("./chunk-371r2111.js"),printers:["estree","estree-json"]},{importPlugin:()=>import("./chunk-5fz8tph5.js"),parsers:["flow"]},{importPlugin:()=>import("./chunk-h9pvnp5c.js"),parsers:["glimmer"],printers:["glimmer"]},{importPlugin:()=>import("./chunk-2q96x1t5.js"),parsers:["graphql"],printers:["graphql"]},{importPlugin:()=>import("./chunk-ppfjf7qx.js"),parsers:["html","angular","vue","lwc","mjml"],printers:["html"]},{importPlugin:()=>import("./chunk-qjn86fc0.js"),parsers:["markdown","mdx","remark"],printers:["mdast"]},{importPlugin:()=>import("./chunk-w87a3mzm.js"),parsers:["meriyah"]},{importPlugin:()=>import("./chunk-b8tw709r.js"),parsers:["css","less","scss"],printers:["postcss"]},{importPlugin:()=>import("./chunk-mk6cddvd.js"),parsers:["typescript"]},{importPlugin:()=>import("./chunk-5qam3c8r.js"),parsers:["yaml"],printers:["yaml"]}]);function CW(){return[G7]}var K7=CW;function OW(Z,$){return D6(Z,TW.join($,"noop.js"))}var uW=OW;async function DW(Z,$){if(t1(Z))return import(Z);if(D5.isAbsolute(Z))return import(l5(Z).href);try{return await import(l5(D5.resolve(Z)).href)}catch{return uW(Z,$)}}async function lW(Z,$){let J=await DW(Z,$);return{name:Z,...J.default??J}}var i1=new Map;function pW(Z){if(typeof Z!=="string"&&!(Z instanceof URL))return Z;let $=process.cwd(),J=JSON.stringify({name:Z,cwd:$});if(!i1.has(J))i1.set(J,lW(Z,$));return i1.get(J)}function EW(){i1.clear()}function _W(Z=[]){return Promise.all(Z.map(($)=>pW($)))}var U7=_W,iW=_Z(x$(),1),aW=s1.sep==="\\"?(Z)=>B1(!1,Z,"\\","/"):(Z)=>Z;function rW(Z,$){let J=Z2($),z=t1(Z)?sW.fileURLToPath(Z):s1.resolve(Z);return s1.relative(J?s1.dirname(J):process.cwd(),z)}async function xW(Z,$){let J="";if(Z)J+=await b1(Z)??"";if(!$)J+=`
107
+ `);J-=W(J),z-=W(z),V-=W(V),Z=Kq(Z)}return{hasBOM:Q,text:Z,options:T5(Z,{...$,cursorOffset:J,rangeStart:z,rangeEnd:V,endOfLine:q})}}async function O5(Z,$){let J=await L4($);return!J.hasPragma||J.hasPragma(Z)}async function dQ(Z,$){var J;let z=await L4($);return(J=z.hasIgnorePragma)==null?void 0:J.call(z,Z)}async function j7(Z,$){let{hasBOM:J,text:z,options:V}=v7(Z,await V1($));if(V.rangeStart>=V.rangeEnd&&z!==""||V.requirePragma&&!await O5(z,V)||V.checkIgnorePragma&&await dQ(z,V))return{formatted:Z,cursorOffset:$.cursorOffset,comments:[]};let q;if(V.rangeStart>0||V.rangeEnd<z.length)q=await nQ(z,V);else{if(!V.requirePragma&&V.insertPragma&&V.printer.insertPragma&&!await O5(z,V))z=V.printer.insertPragma(z);q=await X7(z,V)}if(J){if(q.formatted=H7+q.formatted,q.cursorOffset>=0)q.cursorOffset++}return q}async function eQ(Z,$,J){let{text:z,options:V}=v7(Z,await V1($)),q=await N1(z,V);if(J){if(J.preprocessForPrint)q.ast=await q7(q.ast,V);if(J.massage)q.ast=lQ(q.ast,V)}return q}async function oQ(Z,$){$=await V1($);let J=await q2(Z,$);return k4(J,$)}async function tQ(Z,$){let J=Yq(Z),{formatted:z}=await j7(J,{...$,parser:"__js_expression"});return z}async function ZW(Z,$){$=await V1($);let{ast:J}=await N1(Z,$);if($.cursorOffset>=0)$={...$,...Q7(J,$)};return q2(J,$)}async function $W(Z,$){return k4(Z,await V1($))}var y7={};M1(y7,{CATEGORY_CONFIG:()=>JW,CATEGORY_EDITOR:()=>zW,CATEGORY_FORMAT:()=>VW,CATEGORY_GLOBAL:()=>WW,CATEGORY_OTHER:()=>qW,CATEGORY_OUTPUT:()=>QW,CATEGORY_SPECIAL:()=>HW});var JW="Config",zW="Editor",VW="Format",qW="Other",QW="Output",WW="Global",HW="Special",G7={};M1(G7,{languages:()=>YW,options:()=>RW,parsers:()=>IW,printers:()=>PW});var XW=[{name:"CSS",type:"markup",extensions:[".css",".wxss"],tmScope:"source.css",aceMode:"css",codemirrorMode:"css",codemirrorMimeType:"text/css",parsers:["css"],vscodeLanguageIds:["css"],linguistLanguageId:50},{name:"PostCSS",type:"markup",extensions:[".pcss",".postcss"],tmScope:"source.postcss",aceMode:"text",group:"CSS",parsers:["css"],vscodeLanguageIds:["postcss"],linguistLanguageId:262764437},{name:"Less",type:"markup",extensions:[".less"],tmScope:"source.css.less",aceMode:"less",aliases:["less-css"],codemirrorMode:"css",codemirrorMimeType:"text/css",parsers:["less"],vscodeLanguageIds:["less"],linguistLanguageId:198},{name:"SCSS",type:"markup",extensions:[".scss"],tmScope:"source.css.scss",aceMode:"scss",codemirrorMode:"css",codemirrorMimeType:"text/x-scss",parsers:["scss"],vscodeLanguageIds:["scss"],linguistLanguageId:329}],PZ={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},vW={singleQuote:PZ.singleQuote},jW=vW,yW=[{name:"GraphQL",type:"data",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",aceMode:"text",parsers:["graphql"],vscodeLanguageIds:["graphql"],linguistLanguageId:139}],GW={bracketSpacing:PZ.bracketSpacing},KW=GW,UW=[{name:"Handlebars",type:"markup",extensions:[".handlebars",".hbs"],tmScope:"text.html.handlebars",aceMode:"handlebars",aliases:["hbs","htmlbars"],parsers:["glimmer"],vscodeLanguageIds:["handlebars"],linguistLanguageId:155}],wW=[{name:"Angular",type:"markup",extensions:[".component.html"],tmScope:"text.html.basic",aceMode:"html",aliases:["xhtml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["angular"],vscodeLanguageIds:["html"],filenames:[],linguistLanguageId:146},{name:"HTML",type:"markup",extensions:[".html",".hta",".htm",".html.hl",".inc",".xht",".xhtml"],tmScope:"text.html.basic",aceMode:"html",aliases:["xhtml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["html"],vscodeLanguageIds:["html"],linguistLanguageId:146},{name:"Lightning Web Components",type:"markup",extensions:[],tmScope:"text.html.basic",aceMode:"html",aliases:["xhtml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["lwc"],vscodeLanguageIds:["html"],filenames:[],linguistLanguageId:146},{name:"MJML",type:"markup",extensions:[".mjml"],tmScope:"text.mjml.basic",aceMode:"html",aliases:["MJML","mjml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["mjml"],filenames:[],vscodeLanguageIds:["mjml"],linguistLanguageId:146},{name:"Vue",type:"markup",extensions:[".vue"],tmScope:"source.vue",aceMode:"html",parsers:["vue"],vscodeLanguageIds:["vue"],linguistLanguageId:391}],u5="HTML",MW={bracketSameLine:PZ.bracketSameLine,htmlWhitespaceSensitivity:{category:u5,type:"choice",default:"css",description:"How to handle whitespaces in HTML.",choices:[{value:"css",description:"Respect the default value of CSS display property."},{value:"strict",description:"Whitespaces are considered sensitive."},{value:"ignore",description:"Whitespaces are considered insensitive."}]},singleAttributePerLine:PZ.singleAttributePerLine,vueIndentScriptAndStyle:{category:u5,type:"boolean",default:!1,description:"Indent script and style tags in Vue files."}},kW=MW,bW=[{name:"JavaScript",type:"programming",extensions:[".js","._js",".bones",".cjs",".es",".es6",".gs",".jake",".javascript",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".start.frag",".end.frag",".wxs"],tmScope:"source.js",aceMode:"javascript",aliases:["js","node"],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell","zx"],filenames:["Jakefile","start.frag","end.frag"],parsers:["babel","acorn","espree","meriyah","babel-flow","babel-ts","flow","typescript"],vscodeLanguageIds:["javascript","mongo"],linguistLanguageId:183},{name:"Flow",type:"programming",extensions:[".js.flow"],tmScope:"source.js",aceMode:"javascript",aliases:[],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],filenames:[],parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"],linguistLanguageId:183},{name:"JSX",type:"programming",extensions:[".jsx"],tmScope:"source.js.jsx",aceMode:"javascript",aliases:void 0,codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",interpreters:void 0,filenames:void 0,parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],group:"JavaScript",linguistLanguageId:183},{name:"TypeScript",type:"programming",extensions:[".ts",".cts",".mts"],tmScope:"source.ts",aceMode:"typescript",aliases:["ts"],codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",interpreters:["bun","deno","ts-node","tsx"],parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"],linguistLanguageId:378},{name:"TSX",type:"programming",extensions:[".tsx"],tmScope:"source.tsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",group:"TypeScript",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"],linguistLanguageId:94901924}],w0="JavaScript",BW={arrowParens:{category:w0,type:"choice",default:"always",description:"Include parentheses around a sole arrow function parameter.",choices:[{value:"always",description:"Always include parens. Example: `(x) => x`"},{value:"avoid",description:"Omit parens when possible. Example: `x => x`"}]},bracketSameLine:PZ.bracketSameLine,objectWrap:PZ.objectWrap,bracketSpacing:PZ.bracketSpacing,jsxBracketSameLine:{category:w0,type:"boolean",description:"Put > on the last line instead of at a new line.",deprecated:"2.4.0"},semi:{category:w0,type:"boolean",default:!0,description:"Print semicolons.",oppositeDescription:"Do not print semicolons, except at the beginning of lines which may need them."},experimentalOperatorPosition:{category:w0,type:"choice",default:"end",description:"Where to print operators when binary expressions wrap lines.",choices:[{value:"start",description:"Print operators at the start of new lines."},{value:"end",description:"Print operators at the end of previous lines."}]},experimentalTernaries:{category:w0,type:"boolean",default:!1,description:"Use curious ternaries, with the question mark after the condition.",oppositeDescription:"Default behavior of ternaries; keep question marks on the same line as the consequent."},singleQuote:PZ.singleQuote,jsxSingleQuote:{category:w0,type:"boolean",default:!1,description:"Use single quotes in JSX."},quoteProps:{category:w0,type:"choice",default:"as-needed",description:"Change when properties in objects are quoted.",choices:[{value:"as-needed",description:"Only add quotes around object properties where required."},{value:"consistent",description:"If at least one property in an object requires quotes, quote all properties."},{value:"preserve",description:"Respect the input use of quotes in object properties."}]},trailingComma:{category:w0,type:"choice",default:"all",description:"Print trailing commas wherever possible when multi-line.",choices:[{value:"all",description:"Trailing commas wherever possible (including function arguments)."},{value:"es5",description:"Trailing commas where valid in ES5 (objects, arrays, etc.)"},{value:"none",description:"No trailing commas."}]},singleAttributePerLine:PZ.singleAttributePerLine},SW=BW,FW=[{name:"JSON.stringify",type:"data",extensions:[".importmap"],tmScope:"source.json",aceMode:"json",aliases:["geojson","jsonl","sarif","topojson"],codemirrorMode:"javascript",codemirrorMimeType:"application/json",filenames:["package.json","package-lock.json","composer.json"],parsers:["json-stringify"],vscodeLanguageIds:["json"],linguistLanguageId:174},{name:"JSON",type:"data",extensions:[".json",".4DForm",".4DProject",".avsc",".geojson",".gltf",".har",".ice",".JSON-tmLanguage",".json.example",".mcmeta",".sarif",".tact",".tfstate",".tfstate.backup",".topojson",".webapp",".webmanifest",".yy",".yyp"],tmScope:"source.json",aceMode:"json",aliases:["geojson","jsonl","sarif","topojson"],codemirrorMode:"javascript",codemirrorMimeType:"application/json",filenames:[".all-contributorsrc",".arcconfig",".auto-changelog",".c8rc",".htmlhintrc",".imgbotconfig",".nycrc",".tern-config",".tern-project",".watchmanconfig",".babelrc",".jscsrc",".jshintrc",".jslintrc",".swcrc"],parsers:["json"],vscodeLanguageIds:["json"],linguistLanguageId:174},{name:"JSON with Comments",type:"data",extensions:[".jsonc",".code-snippets",".code-workspace",".sublime-build",".sublime-color-scheme",".sublime-commands",".sublime-completions",".sublime-keymap",".sublime-macro",".sublime-menu",".sublime-mousemap",".sublime-project",".sublime-settings",".sublime-theme",".sublime-workspace",".sublime_metrics",".sublime_session"],tmScope:"source.json.comments",aceMode:"javascript",aliases:["jsonc"],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",group:"JSON",filenames:[],parsers:["jsonc"],vscodeLanguageIds:["jsonc"],linguistLanguageId:423},{name:"JSON5",type:"data",extensions:[".json5"],tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json5"],vscodeLanguageIds:["json5"],linguistLanguageId:175}],NW=[{name:"Markdown",type:"prose",extensions:[".md",".livemd",".markdown",".mdown",".mdwn",".mkd",".mkdn",".mkdown",".ronn",".scd",".workbook"],tmScope:"text.md",aceMode:"markdown",aliases:["md","pandoc"],codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",filenames:["contents.lr","README"],wrap:!0,parsers:["markdown"],vscodeLanguageIds:["markdown"],linguistLanguageId:222},{name:"MDX",type:"prose",extensions:[".mdx"],tmScope:"text.md",aceMode:"markdown",aliases:["md","pandoc"],codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",filenames:[],wrap:!0,parsers:["mdx"],vscodeLanguageIds:["mdx"],linguistLanguageId:222}],hW={proseWrap:PZ.proseWrap,singleQuote:PZ.singleQuote},LW=hW,AW=[{name:"YAML",type:"data",extensions:[".yml",".mir",".reek",".rviz",".sublime-syntax",".syntax",".yaml",".yaml-tmlanguage",".yaml.sed",".yml.mysql"],tmScope:"source.yaml",aceMode:"yaml",aliases:["yml"],codemirrorMode:"yaml",codemirrorMimeType:"text/x-yaml",filenames:[".clang-format",".clang-tidy",".clangd",".gemrc","CITATION.cff","glide.lock","pixi.lock",".prettierrc",".stylelintrc",".lintstagedrc"],parsers:["yaml"],vscodeLanguageIds:["yaml","ansible","dockercompose","github-actions-workflow","home-assistant"],linguistLanguageId:407}],fW={bracketSpacing:PZ.bracketSpacing,singleQuote:PZ.singleQuote,proseWrap:PZ.proseWrap},gW=fW;function mW(Z){let $=Object.create(null),J=Object.create(null);for(let{importPlugin:z,parsers:V=[],printers:q=[]}of Z){let Q=async()=>{let W=await z();return Object.assign($,W.parsers),Object.assign(J,W.printers),W};for(let W of V)$[W]=async()=>(await Q()).parsers[W];for(let W of q)J[W]=async()=>(await Q()).printers[W]}return{parsers:$,printers:J}}var RW={...jW,...KW,...kW,...SW,...LW,...gW},YW=[...XW,...yW,...UW,...wW,...bW,...FW,...NW,...AW],{parsers:IW,printers:PW}=mW([{importPlugin:()=>import("./chunk-6bsgrr5h.js"),parsers:["acorn","espree"]},{importPlugin:()=>import("./chunk-azx0zxnx.js"),parsers:["__ng_action","__ng_binding","__ng_interpolation","__ng_directive"]},{importPlugin:()=>import("./chunk-8kz3n8ye.js"),parsers:["babel","babel-flow","babel-ts","__js_expression","__ts_expression","__vue_expression","__vue_ts_expression","__vue_event_binding","__vue_ts_event_binding","__babel_estree","json","json5","jsonc","json-stringify"]},{importPlugin:()=>import("./chunk-ed723mw1.js"),printers:["estree","estree-json"]},{importPlugin:()=>import("./chunk-n86s4fw4.js"),parsers:["flow"]},{importPlugin:()=>import("./chunk-yyqrbv2f.js"),parsers:["glimmer"],printers:["glimmer"]},{importPlugin:()=>import("./chunk-rptvpa1v.js"),parsers:["graphql"],printers:["graphql"]},{importPlugin:()=>import("./chunk-3h4y7n1a.js"),parsers:["html","angular","vue","lwc","mjml"],printers:["html"]},{importPlugin:()=>import("./chunk-b20xjnpw.js"),parsers:["markdown","mdx","remark"],printers:["mdast"]},{importPlugin:()=>import("./chunk-50w28xj1.js"),parsers:["meriyah"]},{importPlugin:()=>import("./chunk-awav98j0.js"),parsers:["css","less","scss"],printers:["postcss"]},{importPlugin:()=>import("./chunk-t3tkp1em.js"),parsers:["typescript"]},{importPlugin:()=>import("./chunk-n5sh2790.js"),parsers:["yaml"],printers:["yaml"]}]);function CW(){return[G7]}var K7=CW;function OW(Z,$){return D6(Z,TW.join($,"noop.js"))}var uW=OW;async function DW(Z,$){if(t1(Z))return import(Z);if(D5.isAbsolute(Z))return import(l5(Z).href);try{return await import(l5(D5.resolve(Z)).href)}catch{return uW(Z,$)}}async function lW(Z,$){let J=await DW(Z,$);return{name:Z,...J.default??J}}var i1=new Map;function pW(Z){if(typeof Z!=="string"&&!(Z instanceof URL))return Z;let $=process.cwd(),J=JSON.stringify({name:Z,cwd:$});if(!i1.has(J))i1.set(J,lW(Z,$));return i1.get(J)}function EW(){i1.clear()}function _W(Z=[]){return Promise.all(Z.map(($)=>pW($)))}var U7=_W,iW=_Z(x$(),1),aW=s1.sep==="\\"?(Z)=>B1(!1,Z,"\\","/"):(Z)=>Z;function rW(Z,$){let J=Z2($),z=t1(Z)?sW.fileURLToPath(Z):s1.resolve(Z);return s1.relative(J?s1.dirname(J):process.cwd(),z)}async function xW(Z,$){let J="";if(Z)J+=await b1(Z)??"";if(!$)J+=`
108
108
  node_modules`;if(!J)return;let z=(0,iW.default)({allowRelativePaths:!0}).add(J);return(V)=>z.checkIgnore(aW(rW(V,Z))).ignored}async function w7(Z,$){if(Z.length===0&&!$)Z=[void 0];let J=(await Promise.all(Z.map((z)=>xW(z,$)))).filter(Boolean);return(z)=>J.some((V)=>V(z))}async function cW(Z,$){let{ignorePath:J,withNodeModules:z}=$;return(await w7(J,z))(Z)}function nW(Z,$){return $=new Set($),Object.fromEntries(Object.entries(Z).filter(([J])=>!$.has(J)))}var dW=nW;async function eW(Z,$={}){if(typeof Z!=="string"&&!(Z instanceof URL))throw TypeError(`expect \`file\` to be a string or URL, got \`${typeof Z}\``);let{ignorePath:J,withNodeModules:z}=$;if(!Array.isArray(J))J=[J];let V=await cW(Z,{ignorePath:J,withNodeModules:z}),q;if(!V)q=$.parser??await oW(Z,$);return{ignored:V,inferredParser:q??null}}async function oW(Z,$){let J;if($.resolveConfig!==!1)J=await p6(Z,{editorconfig:!1});if(J==null?void 0:J.parser)return J.parser;let z=$.plugins??(J==null?void 0:J.plugins)??[];return z=(await Promise.all([K7(),U7(z)])).flat(),h4({plugins:z},{physicalFile:Z})}var tW=eW,ZH="3.6.2",M7={};M1(M7,{addDanglingComment:()=>D0,addLeadingComment:()=>U1,addTrailingComment:()=>w1,getAlignmentSize:()=>b4,getIndentSize:()=>QH,getMaxContinuousCount:()=>XH,getNextNonSpaceNonCommentCharacter:()=>jH,getNextNonSpaceNonCommentCharacterIndex:()=>SH,getPreferredQuote:()=>GH,getStringWidth:()=>M4,hasNewline:()=>b0,hasNewlineInRange:()=>UH,hasSpaces:()=>MH,isNextLineEmpty:()=>LH,isNextLineEmptyAfterIndex:()=>m4,isPreviousLineEmpty:()=>NH,makeString:()=>bH,skip:()=>S1,skipEverythingButNewLine:()=>x6,skipInlineComment:()=>A4,skipNewline:()=>_0,skipSpaces:()=>F0,skipToLineEnd:()=>r6,skipTrailingComment:()=>f4,skipWhitespace:()=>xq});function $H(Z,$){if($===!1)return!1;if(Z.charAt($)==="/"&&Z.charAt($+1)==="*"){for(let J=$+2;J<Z.length;++J)if(Z.charAt(J)==="*"&&Z.charAt(J+1)==="/")return J+2}return $}var A4=$H;function JH(Z,$){if($===!1)return!1;if(Z.charAt($)==="/"&&Z.charAt($+1)==="/")return x6(Z,$);return $}var f4=JH;function zH(Z,$){let J=null,z=$;while(z!==J)J=z,z=F0(Z,z),z=A4(Z,z),z=f4(Z,z),z=_0(Z,z);return z}var g4=zH;function VH(Z,$){let J=null,z=$;while(z!==J)J=z,z=r6(Z,z),z=A4(Z,z),z=F0(Z,z);return z=f4(Z,z),z=_0(Z,z),z!==!1&&b0(Z,z)}var m4=VH;function qH(Z,$){let J=Z.lastIndexOf(`
109
109
  `);if(J===-1)return 0;return b4(Z.slice(J+1).match(/^[\t ]*/u)[0],$)}var QH=qH;function WH(Z){if(typeof Z!=="string")throw TypeError("Expected a string");return Z.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function HH(Z,$){let J=Z.match(new RegExp(`(${WH($)})+`,"gu"));if(J===null)return 0;return J.reduce((z,V)=>Math.max(z,V.length/$.length),0)}var XH=HH;function vH(Z,$){let J=g4(Z,$);return J===!1?"":Z.charAt(J)}var jH=vH,I1="'",p5='"';function yH(Z,$){let J=$===!0||$===I1?I1:p5,z=J===I1?p5:I1,V=0,q=0;for(let Q of Z)if(Q===J)V++;else if(Q===z)q++;return V>q?z:J}var GH=yH;function KH(Z,$,J){for(let z=$;z<J;++z)if(Z.charAt(z)===`
110
110
  `)return!0;return!1}var UH=KH;function wH(Z,$,J={}){return F0(Z,J.backwards?$-1:$,J)!==$}var MH=wH;function kH(Z,$,J){let z=$==='"'?"'":'"',q=B1(!1,Z,/\\(.)|(["'])/gsu,(Q,W,H)=>{if(W===z)return W;if(H===$)return"\\"+H;if(H)return H;return J&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(W)?W:"\\"+W});return $+q+$}var bH=kH;function BH(Z,$,J){return g4(Z,J($))}function SH(Z,$){return arguments.length===2||typeof $==="number"?g4(Z,$):BH(...arguments)}function FH(Z,$,J){return F4(Z,J($))}function NH(Z,$){return arguments.length===2||typeof $==="number"?F4(Z,$):FH(...arguments)}function hH(Z,$,J){return m4(Z,J($))}function LH(Z,$){return arguments.length===2||typeof $==="number"?m4(Z,$):hH(...arguments)}function k0(Z,$=1){return async(...J)=>{let z=J[$]??{},{plugins:V=[]}=z;return J[$]={...z,plugins:(await Promise.all([K7(),U7(V)])).flat()},Z(...J)}}var k7=k0(j7);async function b7(Z,$){let{formatted:J}=await k7(Z,{...$,cursorOffset:-1});return J}async function AH(Z,$){return await b7(Z,$)===Z}async function fH(){Qq(),EW()}var gH=k0(N4,0),mH=k0((Z,$)=>h4($,{physicalFile:Z})),RH={errors:X6,optionCategories:y7,createIsIgnoredFunction:w7,formatOptionsHiddenDefaults:c2,normalizeOptions:$7,getSupportInfoWithoutPlugins:N4,normalizeOptionSettings:t6,inferParser:(Z,$)=>Promise.resolve(($==null?void 0:$.parser)??mH(Z,$)),vnopts:{ChoiceSchema:H6,apiDescriptor:l0},fastGlob:JJ.default,createTwoFilesPatch:ZJ,picocolors:zJ.default,leven:J6,utils:{omit:dW,createMockable:v6}},YH={parse:k0(eQ),formatAST:k0(oQ),formatDoc:k0(tQ),printToDoc:k0(ZW),printDocToString:k0($W),mockable:j6},KX=Z6;export{ZH as version,M7 as util,Xq as resolveConfigFile,p6 as resolveConfig,gH as getSupportInfo,tW as getFileInfo,k7 as formatWithCursor,b7 as format,U2 as doc,KX as default,fH as clearConfigCache,AH as check,RH as __internal,YH as __debug};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-yjj4cvqg.js";var h="./tree-sitter-typescript-zxjzwt75.wasm";export{h as default};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{gh as a,hh as b}from"./chunk-m2ny1en7.js";import"./chunk-09j71kp6.js";import"./chunk-js9wdh67.js";import"./chunk-0a0vat1h.js";import"./chunk-z8v2tsz2.js";import"./chunk-j8efst22.js";import"./chunk-8f0g7d7k.js";import"./chunk-abtn6nec.js";import"./chunk-d7t0bcvk.js";import"./chunk-7mc8nxve.js";import"./chunk-dfja6dj6.js";import"./chunk-n34y5gp6.js";import"./chunk-bn0h9dny.js";import"./chunk-q5363rr9.js";import"./chunk-7wthn44y.js";import"./chunk-a8p9aggx.js";import"./chunk-0xm85ayc.js";import"./chunk-s2za1n7h.js";import"./chunk-19sa03c1.js";import"./chunk-csdm3n24.js";import"./chunk-xk1nh1ay.js";import"./chunk-bsf6n350.js";import"./chunk-4vze3djr.js";import"./chunk-bzrsnv2k.js";import"./chunk-d0qqgxs4.js";import"./chunk-cqtkxwd8.js";import"./chunk-v00cptj6.js";import"./chunk-1d9f53sk.js";import"./chunk-svrxk3vf.js";import"./chunk-kkae8ead.js";import"./chunk-s6me101a.js";import"./chunk-jwtev7b7.js";import"./chunk-b9nwaaqs.js";import"./chunk-qsszerj7.js";import"./chunk-6jewfaqa.js";import"./chunk-6hdjkvr1.js";import"./chunk-1rn0vmvv.js";import"./chunk-fsy279s5.js";import"./chunk-hn1f6rne.js";import"./chunk-4kpvceap.js";import"./chunk-94qmhz2p.js";import"./chunk-20d0cd1j.js";import"./chunk-yn576pje.js";import"./chunk-b6dsv601.js";import"./chunk-j2zay4da.js";import"./chunk-4vemws1t.js";import"./chunk-yvqbewmc.js";import"./chunk-t299e2aw.js";import"./chunk-bv8pf0m1.js";import"./chunk-4mrz9b6d.js";import"./chunk-yjj4cvqg.js";export{b as AppRuntime,a as AppLayer};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Jg as r}from"./chunk-ps6jk326.js";import{GO as o}from"./chunk-yjj4cvqg.js";var c=new r("zod v4");async function m(){return async(n,e)=>{let t;if("_zod"in n)try{t=(await import("./chunk-pycjksh4.js")).toJSONSchema}catch{throw c}else try{t=(await import("./chunk-98vfbn0h.js")).zodToJsonSchema}catch{throw new r("zod-to-json-schema")}return t(n,e)}}export{m as default};