@bkm016/basalt 0.1.21 → 0.1.22

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 (597) hide show
  1. package/{chunk-51a0843g.js → chunk-09tdbx7b.js} +1 -1
  2. package/{chunk-225dyk1y.js → chunk-0rsyawz5.js} +1 -1
  3. package/{chunk-y8mf9tcj.js → chunk-1td9hjn9.js} +8 -8
  4. package/{chunk-g6cc7ac1.js → chunk-1xjkzzyh.js} +2 -2
  5. package/{chunk-43qf44t8.js → chunk-38932kzp.js} +2 -2
  6. package/{chunk-gdx1j9c5.js → chunk-5415fcz7.js} +2 -2
  7. package/{chunk-3phf8eg6.js → chunk-5kezbmgw.js} +2 -2
  8. package/{chunk-qz6ybxjg.js → chunk-5ph58x6w.js} +8 -8
  9. package/{chunk-kgnd32hn.js → chunk-6jdqe7sz.js} +1 -1
  10. package/{chunk-2m2sa0bp.js → chunk-6ztgzx9s.js} +1 -1
  11. package/{chunk-3r38vbt5.js → chunk-7dzcdpdt.js} +1 -1
  12. package/{chunk-kka12j10.js → chunk-82djd5fk.js} +1 -1
  13. package/{chunk-x1y4s01x.js → chunk-86vhsd3y.js} +11 -11
  14. package/{chunk-jhwb962k.js → chunk-8rfv9mm1.js} +9 -9
  15. package/{chunk-m9386732.js → chunk-8tvz5ht1.js} +2 -2
  16. package/{chunk-ve1b6vg6.js → chunk-9pjmwz01.js} +1 -1
  17. package/{chunk-ewaskman.js → chunk-9wjd9bxm.js} +1 -1
  18. package/chunk-b49005n2.js +471 -0
  19. package/{chunk-feyt85gg.js → chunk-bdz2561d.js} +1 -1
  20. package/{chunk-3t8wz9w8.js → chunk-bkvhwgeb.js} +1 -1
  21. package/{chunk-kypdthjg.js → chunk-bp9tfav3.js} +1 -1
  22. package/{chunk-ak95r8mq.js → chunk-cc9htxzx.js} +216 -215
  23. package/chunk-chfzk1fx.js +3 -0
  24. package/{chunk-syhhzr1j.js → chunk-cv5kdnsw.js} +2 -2
  25. package/{chunk-sq5ppnr3.js → chunk-d79s1s4t.js} +3 -3
  26. package/{chunk-qn70tm91.js → chunk-ec6bzt7w.js} +3 -3
  27. package/{chunk-h00wjps7.js → chunk-eq54cmsa.js} +1 -1
  28. package/{chunk-03b5jh31.js → chunk-g54nd4fd.js} +1 -1
  29. package/{chunk-2fymxwe7.js → chunk-g8p5c4vx.js} +5 -5
  30. package/{chunk-tmq8ktys.js → chunk-g9bemxpt.js} +1 -1
  31. package/{chunk-35y6nf6k.js → chunk-hk5p2eee.js} +4 -4
  32. package/{chunk-9t3v8c3m.js → chunk-jerp4pj5.js} +1 -1
  33. package/{chunk-0x0459qp.js → chunk-jsvqp20s.js} +1 -1
  34. package/{chunk-85sjfyjd.js → chunk-kb526065.js} +1 -1
  35. package/{chunk-cjh5h31t.js → chunk-kpw1qa2n.js} +3 -3
  36. package/{chunk-97ntcrm7.js → chunk-mbvy2t23.js} +1 -1
  37. package/{chunk-ttv805sb.js → chunk-mmnsdje8.js} +5 -5
  38. package/{chunk-9x28stv0.js → chunk-nffwakxq.js} +1 -1
  39. package/{chunk-wxzk086k.js → chunk-nfj8sj53.js} +1 -1
  40. package/{chunk-ak9rkrf3.js → chunk-pzwaz2ew.js} +2 -2
  41. package/{chunk-jy07y4pv.js → chunk-qtrd33pp.js} +5 -5
  42. package/{chunk-hhxtc9jn.js → chunk-rbk6jxcr.js} +1 -1
  43. package/{chunk-c5ydt3vq.js → chunk-rx812nrp.js} +2 -2
  44. package/{chunk-h1fwdz4h.js → chunk-sfgw0vmt.js} +1 -1
  45. package/chunk-tmefdwxy.js +2 -0
  46. package/chunk-tvg54x0x.js +2 -0
  47. package/chunk-v89f2k9b.js +2 -0
  48. package/{chunk-z4g2q36h.js → chunk-vhe16b65.js} +2 -2
  49. package/{chunk-np123myw.js → chunk-w4kasz4j.js} +4 -4
  50. package/{chunk-4fj91gt1.js → chunk-w4zkgn1c.js} +2 -2
  51. package/chunk-we5emq6f.js +2 -0
  52. package/{chunk-jpwr1sd2.js → chunk-x0dcabw6.js} +2 -2
  53. package/{chunk-ntntwtxn.js → chunk-xtj7b70y.js} +2 -2
  54. package/{chunk-bn1aaewd.js → chunk-xwew53k7.js} +4 -4
  55. package/{chunk-e8xywvv4.js → chunk-xyhr89y5.js} +1 -1
  56. package/{chunk-hrn2ss1a.js → chunk-yce46csn.js} +1 -1
  57. package/{chunk-ftg4b5pa.js → chunk-yetcb1z9.js} +2 -2
  58. package/chunk-ypmpf75h.js +2 -0
  59. package/chunk-zz48zvk5.js +2 -0
  60. package/compiled.js +5 -5
  61. package/package.json +1 -1
  62. package/ui-test-worker.js +1 -1
  63. package/web/chunk-04c54f1s.js +1 -0
  64. package/web/chunk-04c54f1s.js.br +2 -0
  65. package/web/chunk-04c54f1s.js.gz +0 -0
  66. package/web/chunk-04m1cb8w.js +1 -0
  67. package/web/chunk-04m1cb8w.js.br +0 -0
  68. package/web/chunk-04m1cb8w.js.gz +0 -0
  69. package/web/{chunk-j2y3wkxc.js → chunk-08z6mkgz.js} +1 -1
  70. package/web/chunk-08z6mkgz.js.br +0 -0
  71. package/web/chunk-08z6mkgz.js.gz +0 -0
  72. package/web/{chunk-yw5wyz1q.js → chunk-0g9m3rpw.js} +1 -1
  73. package/web/chunk-0g9m3rpw.js.br +0 -0
  74. package/web/chunk-0g9m3rpw.js.gz +0 -0
  75. package/web/{chunk-5vc1wkwb.js → chunk-0jccrdw3.js} +1 -1
  76. package/web/chunk-0jccrdw3.js.br +0 -0
  77. package/web/chunk-0jccrdw3.js.gz +0 -0
  78. package/web/{chunk-yarsp7h7.js → chunk-0vweazdh.js} +1 -1
  79. package/web/chunk-0vweazdh.js.br +0 -0
  80. package/web/chunk-0vweazdh.js.gz +0 -0
  81. package/web/chunk-1vtf555r.js +1 -0
  82. package/web/chunk-1vtf555r.js.br +0 -0
  83. package/web/chunk-1vtf555r.js.gz +0 -0
  84. package/web/{chunk-2h2w244w.js → chunk-29z0ft67.js} +1 -1
  85. package/web/chunk-29z0ft67.js.br +0 -0
  86. package/web/chunk-29z0ft67.js.gz +0 -0
  87. package/web/{chunk-v7ck87jf.js → chunk-2q3m4btb.js} +1 -1
  88. package/web/chunk-2q3m4btb.js.br +0 -0
  89. package/web/chunk-2q3m4btb.js.gz +0 -0
  90. package/web/{chunk-b83bzjcx.js → chunk-2s6fhjjc.js} +90 -90
  91. package/web/chunk-2s6fhjjc.js.br +0 -0
  92. package/web/chunk-2s6fhjjc.js.gz +0 -0
  93. package/web/{chunk-rsc5k5he.js → chunk-2vdx4ykn.js} +1 -1
  94. package/web/chunk-2vdx4ykn.js.br +0 -0
  95. package/web/chunk-2vdx4ykn.js.gz +0 -0
  96. package/web/{chunk-0w6ta3ps.js → chunk-2zgqe8r7.js} +1 -1
  97. package/web/chunk-2zgqe8r7.js.br +0 -0
  98. package/web/chunk-2zgqe8r7.js.gz +0 -0
  99. package/web/{chunk-07dd0jed.js → chunk-3kqpmg83.js} +1 -1
  100. package/web/chunk-3kqpmg83.js.br +0 -0
  101. package/web/chunk-3kqpmg83.js.gz +0 -0
  102. package/web/chunk-3rmqxna0.js +1 -0
  103. package/web/chunk-3rmqxna0.js.br +0 -0
  104. package/web/chunk-3rmqxna0.js.gz +0 -0
  105. package/web/{chunk-vvk9nche.js → chunk-3xmv2349.js} +2 -2
  106. package/web/chunk-3xmv2349.js.br +0 -0
  107. package/web/chunk-3xmv2349.js.gz +0 -0
  108. package/web/{chunk-wh0vt2vd.js → chunk-46cdys11.js} +1 -1
  109. package/web/chunk-46cdys11.js.br +0 -0
  110. package/web/{chunk-wh0vt2vd.js.gz → chunk-46cdys11.js.gz} +0 -0
  111. package/web/chunk-46mw23f0.js +8 -0
  112. package/web/chunk-46mw23f0.js.br +0 -0
  113. package/web/chunk-46mw23f0.js.gz +0 -0
  114. package/web/{chunk-n00se8nk.js → chunk-4r0dvjrr.js} +1 -1
  115. package/web/chunk-4r0dvjrr.js.br +0 -0
  116. package/web/chunk-4r0dvjrr.js.gz +0 -0
  117. package/web/{chunk-16b5anw4.js → chunk-4v6m84pg.js} +1 -1
  118. package/web/chunk-4v6m84pg.js.br +0 -0
  119. package/web/chunk-4v6m84pg.js.gz +0 -0
  120. package/web/{chunk-c69t0ysj.js → chunk-4ye31s2w.js} +1 -1
  121. package/web/chunk-4ye31s2w.js.br +4 -0
  122. package/web/chunk-4ye31s2w.js.gz +0 -0
  123. package/web/{chunk-kr7shpnb.js → chunk-5kavsn22.js} +1 -1
  124. package/web/chunk-5kavsn22.js.br +0 -0
  125. package/web/{chunk-kr7shpnb.js.gz → chunk-5kavsn22.js.gz} +0 -0
  126. package/web/{chunk-m7kypzvp.js → chunk-5q2h4tg8.js} +1 -1
  127. package/web/chunk-5q2h4tg8.js.br +4 -0
  128. package/web/chunk-5q2h4tg8.js.gz +0 -0
  129. package/web/{chunk-gt4dzb4b.js → chunk-5tbk6dx6.js} +1 -1
  130. package/web/chunk-5tbk6dx6.js.br +0 -0
  131. package/web/chunk-5tbk6dx6.js.gz +0 -0
  132. package/web/{chunk-ffwyfdg4.js → chunk-5yb0sm1r.js} +1 -1
  133. package/web/chunk-5yb0sm1r.js.br +0 -0
  134. package/web/chunk-5yb0sm1r.js.gz +0 -0
  135. package/web/chunk-5yz46tjw.js +2 -0
  136. package/web/chunk-5yz46tjw.js.br +0 -0
  137. package/web/chunk-5yz46tjw.js.gz +0 -0
  138. package/web/{chunk-hw4f79k8.js → chunk-619a8t38.js} +1 -1
  139. package/web/chunk-619a8t38.js.br +0 -0
  140. package/web/chunk-619a8t38.js.gz +0 -0
  141. package/web/{chunk-7remkcff.js → chunk-6areryyn.js} +1 -1
  142. package/web/chunk-6areryyn.js.br +0 -0
  143. package/web/chunk-6areryyn.js.gz +0 -0
  144. package/web/{chunk-5wgdprjp.js → chunk-6ms78sx5.js} +1 -1
  145. package/web/chunk-6ms78sx5.js.br +0 -0
  146. package/web/chunk-6ms78sx5.js.gz +0 -0
  147. package/web/{chunk-50wrjr22.js → chunk-6ts9mtye.js} +1 -1
  148. package/web/chunk-6ts9mtye.js.br +0 -0
  149. package/web/chunk-6ts9mtye.js.gz +0 -0
  150. package/web/{chunk-abahqsws.js → chunk-79whhay2.js} +1 -1
  151. package/web/chunk-79whhay2.js.br +0 -0
  152. package/web/chunk-79whhay2.js.gz +0 -0
  153. package/web/{chunk-jge5e8c4.js → chunk-7n1abr86.js} +1 -1
  154. package/web/chunk-7n1abr86.js.br +0 -0
  155. package/web/chunk-7n1abr86.js.gz +0 -0
  156. package/web/chunk-7qxfx983.js +1 -0
  157. package/web/chunk-7qxfx983.js.br +0 -0
  158. package/web/chunk-7qxfx983.js.gz +0 -0
  159. package/web/chunk-91k30q92.js +1 -0
  160. package/web/chunk-91k30q92.js.br +0 -0
  161. package/web/chunk-91k30q92.js.gz +0 -0
  162. package/web/{chunk-78t5dqea.js → chunk-91nyvkrb.js} +1 -1
  163. package/web/chunk-91nyvkrb.js.br +0 -0
  164. package/web/chunk-91nyvkrb.js.gz +0 -0
  165. package/web/{chunk-0q5drhbk.js → chunk-9mbr6znb.js} +1 -1
  166. package/web/chunk-9mbr6znb.js.br +0 -0
  167. package/web/chunk-9mbr6znb.js.gz +0 -0
  168. package/web/{chunk-h4g8j133.js → chunk-9mvw6a5v.js} +1 -1
  169. package/web/chunk-9mvw6a5v.js.br +0 -0
  170. package/web/chunk-9mvw6a5v.js.gz +0 -0
  171. package/web/{chunk-2hd51wb6.js → chunk-a6hdn8tb.js} +1 -1
  172. package/web/chunk-a6hdn8tb.js.br +0 -0
  173. package/web/chunk-a6hdn8tb.js.gz +0 -0
  174. package/web/{chunk-e6r1sb5r.js → chunk-ar6m9fza.js} +1 -1
  175. package/web/chunk-ar6m9fza.js.br +0 -0
  176. package/web/chunk-ar6m9fza.js.gz +0 -0
  177. package/web/{chunk-d4kjy2qn.js → chunk-ayqakyyq.js} +1 -1
  178. package/web/chunk-ayqakyyq.js.br +0 -0
  179. package/web/chunk-ayqakyyq.js.gz +0 -0
  180. package/web/{chunk-4zftsyq2.js → chunk-cc6hn5xv.js} +1 -1
  181. package/web/chunk-cc6hn5xv.js.br +0 -0
  182. package/web/chunk-cc6hn5xv.js.gz +0 -0
  183. package/web/{chunk-0hvyq55w.js → chunk-ccymg1hp.js} +1 -1
  184. package/web/chunk-ccymg1hp.js.br +0 -0
  185. package/web/chunk-ccymg1hp.js.gz +0 -0
  186. package/web/{chunk-55kw8p9r.js → chunk-cg9fe42b.js} +1 -1
  187. package/web/chunk-cg9fe42b.js.br +0 -0
  188. package/web/chunk-cg9fe42b.js.gz +0 -0
  189. package/web/chunk-cmcgmf94.js +1 -0
  190. package/web/chunk-cmcgmf94.js.br +0 -0
  191. package/web/chunk-cmcgmf94.js.gz +0 -0
  192. package/web/chunk-cnbbvd6n.js +1 -0
  193. package/web/chunk-cnbbvd6n.js.br +0 -0
  194. package/web/chunk-cnbbvd6n.js.gz +0 -0
  195. package/web/{chunk-8c6h952g.js → chunk-cxp2nbtc.js} +1 -1
  196. package/web/chunk-cxp2nbtc.js.br +0 -0
  197. package/web/chunk-cxp2nbtc.js.gz +0 -0
  198. package/web/{chunk-j7sfcfxr.js → chunk-dj2b64aj.js} +1 -1
  199. package/web/chunk-dj2b64aj.js.br +0 -0
  200. package/web/chunk-dj2b64aj.js.gz +0 -0
  201. package/web/{chunk-2w4rdnhj.js → chunk-dsga6rp3.js} +1 -1
  202. package/web/chunk-dsga6rp3.js.br +0 -0
  203. package/web/chunk-dsga6rp3.js.gz +0 -0
  204. package/web/chunk-ek6q6a08.js +1 -0
  205. package/web/chunk-ek6q6a08.js.br +2 -0
  206. package/web/chunk-ek6q6a08.js.gz +0 -0
  207. package/web/{chunk-21d8pzcm.js → chunk-et1nm6h1.js} +2 -2
  208. package/web/chunk-et1nm6h1.js.br +0 -0
  209. package/web/chunk-et1nm6h1.js.gz +0 -0
  210. package/web/chunk-f1016wh6.js +1 -0
  211. package/web/chunk-f1016wh6.js.br +0 -0
  212. package/web/chunk-f1016wh6.js.gz +0 -0
  213. package/web/{chunk-z7adzvfz.js → chunk-f42mwg61.js} +1 -1
  214. package/web/chunk-f42mwg61.js.br +0 -0
  215. package/web/chunk-f42mwg61.js.gz +0 -0
  216. package/web/{chunk-pvhz0gqy.js → chunk-fk35d3bz.js} +1 -1
  217. package/web/chunk-fk35d3bz.js.br +0 -0
  218. package/web/chunk-fk35d3bz.js.gz +0 -0
  219. package/web/{chunk-keway722.js → chunk-fpwztdhn.js} +1 -1
  220. package/web/chunk-fpwztdhn.js.br +0 -0
  221. package/web/chunk-fpwztdhn.js.gz +0 -0
  222. package/web/{chunk-qcgs1mft.js → chunk-g30nqfka.js} +1 -1
  223. package/web/chunk-g30nqfka.js.br +0 -0
  224. package/web/chunk-g30nqfka.js.gz +0 -0
  225. package/web/chunk-gbwy4pfg.css +1 -0
  226. package/web/chunk-gbwy4pfg.css.br +0 -0
  227. package/web/chunk-gbwy4pfg.css.gz +0 -0
  228. package/web/{chunk-31vxes2p.js → chunk-gepgx19m.js} +1 -1
  229. package/web/chunk-gepgx19m.js.br +0 -0
  230. package/web/chunk-gepgx19m.js.gz +0 -0
  231. package/web/{chunk-62z94rt2.js → chunk-grz69q28.js} +1 -1
  232. package/web/chunk-grz69q28.js.br +0 -0
  233. package/web/chunk-grz69q28.js.gz +0 -0
  234. package/web/{chunk-acv6gk2b.js → chunk-gt62acsh.js} +1 -1
  235. package/web/chunk-gt62acsh.js.br +0 -0
  236. package/web/chunk-gt62acsh.js.gz +0 -0
  237. package/web/{chunk-w5c2r59n.js → chunk-h28xrvmg.js} +1 -1
  238. package/web/chunk-h28xrvmg.js.br +0 -0
  239. package/web/chunk-h28xrvmg.js.gz +0 -0
  240. package/web/{chunk-56tqa12m.js → chunk-h80ypke7.js} +1 -1
  241. package/web/chunk-h80ypke7.js.br +0 -0
  242. package/web/chunk-h80ypke7.js.gz +0 -0
  243. package/web/chunk-k1cd6e24.js +1 -0
  244. package/web/chunk-k1cd6e24.js.br +0 -0
  245. package/web/chunk-k1cd6e24.js.gz +0 -0
  246. package/web/chunk-k9248573.js +1 -0
  247. package/web/chunk-k9248573.js.br +0 -0
  248. package/web/chunk-k9248573.js.gz +0 -0
  249. package/web/{chunk-cbtpaf3e.js → chunk-kqgn9dsa.js} +1 -1
  250. package/web/chunk-kqgn9dsa.js.br +0 -0
  251. package/web/chunk-kqgn9dsa.js.gz +0 -0
  252. package/web/chunk-kqngpw5m.js +1 -0
  253. package/web/chunk-kqngpw5m.js.br +0 -0
  254. package/web/chunk-kqngpw5m.js.gz +0 -0
  255. package/web/{chunk-d1gga18f.js → chunk-kzj105r1.js} +1 -1
  256. package/web/chunk-kzj105r1.js.br +0 -0
  257. package/web/chunk-kzj105r1.js.gz +0 -0
  258. package/web/chunk-m14v2en1.js +1 -0
  259. package/web/chunk-m14v2en1.js.br +0 -0
  260. package/web/chunk-m14v2en1.js.gz +0 -0
  261. package/web/{chunk-2dykyq1n.js → chunk-m34et8g4.js} +1 -1
  262. package/web/chunk-m34et8g4.js.br +0 -0
  263. package/web/chunk-m34et8g4.js.gz +0 -0
  264. package/web/{chunk-60fbfw70.js → chunk-md1f6gmk.js} +1 -1
  265. package/web/chunk-md1f6gmk.js.br +0 -0
  266. package/web/chunk-md1f6gmk.js.gz +0 -0
  267. package/web/{chunk-fbzhgaak.js → chunk-n05xf20n.js} +1 -1
  268. package/web/chunk-n05xf20n.js.br +0 -0
  269. package/web/chunk-n05xf20n.js.gz +0 -0
  270. package/web/{chunk-zb01zmms.js → chunk-n2k1gd6n.js} +1 -1
  271. package/web/chunk-n2k1gd6n.js.br +0 -0
  272. package/web/chunk-n2k1gd6n.js.gz +0 -0
  273. package/web/{chunk-s7a2f62f.js → chunk-nm8yza3v.js} +1 -1
  274. package/web/chunk-nm8yza3v.js.br +0 -0
  275. package/web/chunk-nm8yza3v.js.gz +0 -0
  276. package/web/chunk-pbg9rdwv.js +1 -0
  277. package/web/chunk-pbg9rdwv.js.br +2 -0
  278. package/web/chunk-pbg9rdwv.js.gz +0 -0
  279. package/web/{chunk-8wgev3hd.js → chunk-qj9nd038.js} +1 -1
  280. package/web/chunk-qj9nd038.js.br +0 -0
  281. package/web/chunk-qj9nd038.js.gz +0 -0
  282. package/web/chunk-qjaex9c0.js +1 -0
  283. package/web/chunk-qjaex9c0.js.br +2 -0
  284. package/web/chunk-qjaex9c0.js.gz +0 -0
  285. package/web/{chunk-2c4affp1.js → chunk-qq79vsm8.js} +1 -1
  286. package/web/chunk-qq79vsm8.js.br +0 -0
  287. package/web/chunk-qq79vsm8.js.gz +0 -0
  288. package/web/{chunk-t0xjx21h.js → chunk-qs5wnwd6.js} +1 -1
  289. package/web/chunk-qs5wnwd6.js.br +0 -0
  290. package/web/chunk-qs5wnwd6.js.gz +0 -0
  291. package/web/{chunk-595tqsv5.js → chunk-r381n550.js} +1 -1
  292. package/web/chunk-r381n550.js.br +0 -0
  293. package/web/chunk-r381n550.js.gz +0 -0
  294. package/web/{chunk-2tc6krye.js → chunk-r48vazdm.js} +1 -1
  295. package/web/chunk-r48vazdm.js.br +0 -0
  296. package/web/chunk-r48vazdm.js.gz +0 -0
  297. package/web/{chunk-ngdj0r7w.js → chunk-r55seq42.js} +1 -1
  298. package/web/chunk-r55seq42.js.br +0 -0
  299. package/web/chunk-r55seq42.js.gz +0 -0
  300. package/web/{chunk-gs41j1vb.js → chunk-r79zekav.js} +1 -1
  301. package/web/chunk-r79zekav.js.br +0 -0
  302. package/web/chunk-r79zekav.js.gz +0 -0
  303. package/web/{chunk-fztzcy7c.js → chunk-r8qyvcks.js} +1 -1
  304. package/web/chunk-r8qyvcks.js.br +0 -0
  305. package/web/chunk-r8qyvcks.js.gz +0 -0
  306. package/web/chunk-r9dt0730.js +1 -0
  307. package/web/chunk-r9dt0730.js.br +0 -0
  308. package/web/chunk-r9dt0730.js.gz +0 -0
  309. package/web/{chunk-82zwwy0b.js → chunk-rpjzwknn.js} +1 -1
  310. package/web/chunk-rpjzwknn.js.br +0 -0
  311. package/web/{chunk-82zwwy0b.js.gz → chunk-rpjzwknn.js.gz} +0 -0
  312. package/web/{chunk-c37hhmtd.js → chunk-sk3065js.js} +1 -1
  313. package/web/chunk-sk3065js.js.br +0 -0
  314. package/web/chunk-sk3065js.js.gz +0 -0
  315. package/web/{chunk-qh24q7c0.js → chunk-smywa1zw.js} +1 -1
  316. package/web/chunk-smywa1zw.js.br +0 -0
  317. package/web/chunk-smywa1zw.js.gz +0 -0
  318. package/web/{chunk-kx2k462h.js → chunk-trssyq9a.js} +1 -1
  319. package/web/chunk-trssyq9a.js.br +0 -0
  320. package/web/chunk-trssyq9a.js.gz +0 -0
  321. package/web/{chunk-sac6fn9n.js → chunk-v329f8df.js} +1 -1
  322. package/web/chunk-v329f8df.js.br +0 -0
  323. package/web/chunk-v329f8df.js.gz +0 -0
  324. package/web/{chunk-p6ma361e.js → chunk-vb2feptd.js} +1 -1
  325. package/web/chunk-vb2feptd.js.br +0 -0
  326. package/web/chunk-vb2feptd.js.gz +0 -0
  327. package/web/chunk-vff33vj3.js +1 -0
  328. package/web/chunk-vff33vj3.js.br +2 -0
  329. package/web/chunk-vff33vj3.js.gz +0 -0
  330. package/web/{chunk-5nbmnchg.js → chunk-w9adyaze.js} +1 -1
  331. package/web/chunk-w9adyaze.js.br +0 -0
  332. package/web/chunk-w9adyaze.js.gz +0 -0
  333. package/web/{chunk-c1zhat04.js → chunk-wgc8z5jv.js} +1 -1
  334. package/web/chunk-wgc8z5jv.js.br +0 -0
  335. package/web/chunk-wgc8z5jv.js.gz +0 -0
  336. package/web/{chunk-m5b7hny2.js → chunk-wvdk3w03.js} +1 -1
  337. package/web/chunk-wvdk3w03.js.br +0 -0
  338. package/web/chunk-wvdk3w03.js.gz +0 -0
  339. package/web/{chunk-ajpzsx51.js → chunk-wxmaw4ht.js} +1 -1
  340. package/web/chunk-wxmaw4ht.js.br +0 -0
  341. package/web/chunk-wxmaw4ht.js.gz +0 -0
  342. package/web/{chunk-2w27acew.js → chunk-x19jdqnt.js} +1 -1
  343. package/web/chunk-x19jdqnt.js.br +0 -0
  344. package/web/chunk-x19jdqnt.js.gz +0 -0
  345. package/web/{chunk-3d3y4tep.js → chunk-x4153gx3.js} +1 -1
  346. package/web/chunk-x4153gx3.js.br +0 -0
  347. package/web/chunk-x4153gx3.js.gz +0 -0
  348. package/web/{chunk-39kaz6fa.js → chunk-x7wmb5d3.js} +1 -1
  349. package/web/chunk-x7wmb5d3.js.br +0 -0
  350. package/web/chunk-x7wmb5d3.js.gz +0 -0
  351. package/web/{chunk-dbv8qpen.js → chunk-xp2zpmpp.js} +2 -2
  352. package/web/chunk-xp2zpmpp.js.br +0 -0
  353. package/web/chunk-xp2zpmpp.js.gz +0 -0
  354. package/web/chunk-y09v3sz7.js +1 -0
  355. package/web/chunk-y09v3sz7.js.br +0 -0
  356. package/web/chunk-y09v3sz7.js.gz +0 -0
  357. package/web/{chunk-780qvh05.js → chunk-ywmsxe5z.js} +1 -1
  358. package/web/chunk-ywmsxe5z.js.br +0 -0
  359. package/web/{chunk-780qvh05.js.gz → chunk-ywmsxe5z.js.gz} +0 -0
  360. package/web/{chunk-fsz1msjr.js → chunk-yzyxa823.js} +1 -1
  361. package/web/chunk-yzyxa823.js.br +0 -0
  362. package/web/chunk-yzyxa823.js.gz +0 -0
  363. package/web/{chunk-ex66t805.js → chunk-zwx48gb8.js} +1 -1
  364. package/web/chunk-zwx48gb8.js.br +0 -0
  365. package/web/chunk-zwx48gb8.js.gz +0 -0
  366. package/web/index.html +1 -1
  367. package/web/index.html.br +0 -0
  368. package/web/index.html.gz +0 -0
  369. package/worker.js +1 -1
  370. package/chunk-49hsqsht.js +0 -2
  371. package/chunk-5h59tby8.js +0 -470
  372. package/chunk-b516bp7n.js +0 -3
  373. package/chunk-kb5h9rmb.js +0 -2
  374. package/chunk-r36b12zb.js +0 -2
  375. package/chunk-re8n2te5.js +0 -2
  376. package/chunk-rqrjzz73.js +0 -2
  377. package/chunk-w3n8wm44.js +0 -2
  378. package/web/chunk-07dd0jed.js.br +0 -0
  379. package/web/chunk-07dd0jed.js.gz +0 -0
  380. package/web/chunk-0hvyq55w.js.br +0 -0
  381. package/web/chunk-0hvyq55w.js.gz +0 -0
  382. package/web/chunk-0q5drhbk.js.br +0 -0
  383. package/web/chunk-0q5drhbk.js.gz +0 -0
  384. package/web/chunk-0w6ta3ps.js.br +0 -0
  385. package/web/chunk-0w6ta3ps.js.gz +0 -0
  386. package/web/chunk-16b5anw4.js.br +0 -0
  387. package/web/chunk-16b5anw4.js.gz +0 -0
  388. package/web/chunk-21d8pzcm.js.br +0 -0
  389. package/web/chunk-21d8pzcm.js.gz +0 -0
  390. package/web/chunk-2c4affp1.js.br +0 -0
  391. package/web/chunk-2c4affp1.js.gz +0 -0
  392. package/web/chunk-2dykyq1n.js.br +0 -0
  393. package/web/chunk-2dykyq1n.js.gz +0 -0
  394. package/web/chunk-2h2w244w.js.br +0 -0
  395. package/web/chunk-2h2w244w.js.gz +0 -0
  396. package/web/chunk-2hd51wb6.js.br +0 -0
  397. package/web/chunk-2hd51wb6.js.gz +0 -0
  398. package/web/chunk-2tc6krye.js.br +0 -0
  399. package/web/chunk-2tc6krye.js.gz +0 -0
  400. package/web/chunk-2w27acew.js.br +0 -0
  401. package/web/chunk-2w27acew.js.gz +0 -0
  402. package/web/chunk-2w4rdnhj.js.br +0 -0
  403. package/web/chunk-2w4rdnhj.js.gz +0 -0
  404. package/web/chunk-31vxes2p.js.br +0 -0
  405. package/web/chunk-31vxes2p.js.gz +0 -0
  406. package/web/chunk-32qd2y5h.js +0 -1
  407. package/web/chunk-32qd2y5h.js.br +0 -0
  408. package/web/chunk-32qd2y5h.js.gz +0 -0
  409. package/web/chunk-39kaz6fa.js.br +0 -0
  410. package/web/chunk-39kaz6fa.js.gz +0 -0
  411. package/web/chunk-3d3y4tep.js.br +0 -0
  412. package/web/chunk-3d3y4tep.js.gz +0 -0
  413. package/web/chunk-4makcmpw.js +0 -1
  414. package/web/chunk-4makcmpw.js.br +0 -0
  415. package/web/chunk-4makcmpw.js.gz +0 -0
  416. package/web/chunk-4zftsyq2.js.br +0 -0
  417. package/web/chunk-4zftsyq2.js.gz +0 -0
  418. package/web/chunk-50wrjr22.js.br +0 -0
  419. package/web/chunk-50wrjr22.js.gz +0 -0
  420. package/web/chunk-55kw8p9r.js.br +0 -0
  421. package/web/chunk-55kw8p9r.js.gz +0 -0
  422. package/web/chunk-56tqa12m.js.br +0 -0
  423. package/web/chunk-56tqa12m.js.gz +0 -0
  424. package/web/chunk-595tqsv5.js.br +0 -0
  425. package/web/chunk-595tqsv5.js.gz +0 -0
  426. package/web/chunk-5h193k2c.js +0 -1
  427. package/web/chunk-5h193k2c.js.br +0 -0
  428. package/web/chunk-5h193k2c.js.gz +0 -0
  429. package/web/chunk-5nbmnchg.js.br +0 -0
  430. package/web/chunk-5nbmnchg.js.gz +0 -0
  431. package/web/chunk-5vc1wkwb.js.br +0 -0
  432. package/web/chunk-5vc1wkwb.js.gz +0 -0
  433. package/web/chunk-5wgdprjp.js.br +0 -0
  434. package/web/chunk-5wgdprjp.js.gz +0 -0
  435. package/web/chunk-60fbfw70.js.br +0 -0
  436. package/web/chunk-60fbfw70.js.gz +0 -0
  437. package/web/chunk-62z94rt2.js.br +0 -0
  438. package/web/chunk-62z94rt2.js.gz +0 -0
  439. package/web/chunk-67khfy00.css +0 -1
  440. package/web/chunk-67khfy00.css.br +0 -0
  441. package/web/chunk-67khfy00.css.gz +0 -0
  442. package/web/chunk-6bt2t0xt.js +0 -8
  443. package/web/chunk-6bt2t0xt.js.br +0 -0
  444. package/web/chunk-6bt2t0xt.js.gz +0 -0
  445. package/web/chunk-780qvh05.js.br +0 -0
  446. package/web/chunk-78t5dqea.js.br +0 -0
  447. package/web/chunk-78t5dqea.js.gz +0 -0
  448. package/web/chunk-7edmyret.js +0 -1
  449. package/web/chunk-7edmyret.js.br +0 -0
  450. package/web/chunk-7edmyret.js.gz +0 -0
  451. package/web/chunk-7remkcff.js.br +0 -0
  452. package/web/chunk-7remkcff.js.gz +0 -0
  453. package/web/chunk-7s062q01.js +0 -1
  454. package/web/chunk-7s062q01.js.br +0 -0
  455. package/web/chunk-7s062q01.js.gz +0 -0
  456. package/web/chunk-82zwwy0b.js.br +0 -0
  457. package/web/chunk-8c6h952g.js.br +0 -0
  458. package/web/chunk-8c6h952g.js.gz +0 -0
  459. package/web/chunk-8wgev3hd.js.br +0 -0
  460. package/web/chunk-8wgev3hd.js.gz +0 -0
  461. package/web/chunk-9vcbnf1m.js +0 -1
  462. package/web/chunk-9vcbnf1m.js.br +0 -0
  463. package/web/chunk-9vcbnf1m.js.gz +0 -0
  464. package/web/chunk-abahqsws.js.br +0 -0
  465. package/web/chunk-abahqsws.js.gz +0 -0
  466. package/web/chunk-acv6gk2b.js.br +0 -0
  467. package/web/chunk-acv6gk2b.js.gz +0 -0
  468. package/web/chunk-ajpzsx51.js.br +0 -0
  469. package/web/chunk-ajpzsx51.js.gz +0 -0
  470. package/web/chunk-b1b9txvk.js +0 -1
  471. package/web/chunk-b1b9txvk.js.br +0 -0
  472. package/web/chunk-b1b9txvk.js.gz +0 -0
  473. package/web/chunk-b83bzjcx.js.br +0 -0
  474. package/web/chunk-b83bzjcx.js.gz +0 -0
  475. package/web/chunk-c1zhat04.js.br +0 -0
  476. package/web/chunk-c1zhat04.js.gz +0 -0
  477. package/web/chunk-c37hhmtd.js.br +0 -0
  478. package/web/chunk-c37hhmtd.js.gz +0 -0
  479. package/web/chunk-c69t0ysj.js.br +0 -0
  480. package/web/chunk-c69t0ysj.js.gz +0 -0
  481. package/web/chunk-caz85hz4.js +0 -1
  482. package/web/chunk-caz85hz4.js.br +0 -0
  483. package/web/chunk-caz85hz4.js.gz +0 -0
  484. package/web/chunk-cbtpaf3e.js.br +0 -0
  485. package/web/chunk-cbtpaf3e.js.gz +0 -0
  486. package/web/chunk-d1gga18f.js.br +0 -0
  487. package/web/chunk-d1gga18f.js.gz +0 -0
  488. package/web/chunk-d4kjy2qn.js.br +0 -0
  489. package/web/chunk-d4kjy2qn.js.gz +0 -0
  490. package/web/chunk-dbv8qpen.js.br +0 -0
  491. package/web/chunk-dbv8qpen.js.gz +0 -0
  492. package/web/chunk-e6r1sb5r.js.br +0 -0
  493. package/web/chunk-e6r1sb5r.js.gz +0 -0
  494. package/web/chunk-ep5qff8m.js +0 -1
  495. package/web/chunk-ep5qff8m.js.br +0 -0
  496. package/web/chunk-ep5qff8m.js.gz +0 -0
  497. package/web/chunk-ex66t805.js.br +0 -0
  498. package/web/chunk-ex66t805.js.gz +0 -0
  499. package/web/chunk-fb8qtyqg.js +0 -1
  500. package/web/chunk-fb8qtyqg.js.br +0 -0
  501. package/web/chunk-fb8qtyqg.js.gz +0 -0
  502. package/web/chunk-fbzhgaak.js.br +0 -0
  503. package/web/chunk-fbzhgaak.js.gz +0 -0
  504. package/web/chunk-ffwyfdg4.js.br +0 -0
  505. package/web/chunk-ffwyfdg4.js.gz +0 -0
  506. package/web/chunk-fsz1msjr.js.br +0 -0
  507. package/web/chunk-fsz1msjr.js.gz +0 -0
  508. package/web/chunk-fztzcy7c.js.br +0 -0
  509. package/web/chunk-fztzcy7c.js.gz +0 -0
  510. package/web/chunk-g4st8a4e.js +0 -1
  511. package/web/chunk-g4st8a4e.js.br +0 -0
  512. package/web/chunk-g4st8a4e.js.gz +0 -0
  513. package/web/chunk-gs41j1vb.js.br +0 -0
  514. package/web/chunk-gs41j1vb.js.gz +0 -0
  515. package/web/chunk-gt4dzb4b.js.br +0 -0
  516. package/web/chunk-gt4dzb4b.js.gz +0 -0
  517. package/web/chunk-h4g8j133.js.br +0 -0
  518. package/web/chunk-h4g8j133.js.gz +0 -0
  519. package/web/chunk-ht3cek8b.js +0 -1
  520. package/web/chunk-ht3cek8b.js.br +0 -2
  521. package/web/chunk-ht3cek8b.js.gz +0 -0
  522. package/web/chunk-hw4f79k8.js.br +0 -0
  523. package/web/chunk-hw4f79k8.js.gz +0 -0
  524. package/web/chunk-j2y3wkxc.js.br +0 -0
  525. package/web/chunk-j2y3wkxc.js.gz +0 -0
  526. package/web/chunk-j7sfcfxr.js.br +0 -0
  527. package/web/chunk-j7sfcfxr.js.gz +0 -0
  528. package/web/chunk-jge5e8c4.js.br +0 -0
  529. package/web/chunk-jge5e8c4.js.gz +0 -0
  530. package/web/chunk-jyjgvcac.js +0 -2
  531. package/web/chunk-jyjgvcac.js.br +0 -0
  532. package/web/chunk-jyjgvcac.js.gz +0 -0
  533. package/web/chunk-k9bzz441.js +0 -1
  534. package/web/chunk-k9bzz441.js.br +0 -0
  535. package/web/chunk-k9bzz441.js.gz +0 -0
  536. package/web/chunk-keway722.js.br +0 -0
  537. package/web/chunk-keway722.js.gz +0 -0
  538. package/web/chunk-kr7shpnb.js.br +0 -0
  539. package/web/chunk-kv5swske.js +0 -1
  540. package/web/chunk-kv5swske.js.br +0 -0
  541. package/web/chunk-kv5swske.js.gz +0 -0
  542. package/web/chunk-kx2k462h.js.br +0 -0
  543. package/web/chunk-kx2k462h.js.gz +0 -0
  544. package/web/chunk-m5b7hny2.js.br +0 -0
  545. package/web/chunk-m5b7hny2.js.gz +0 -0
  546. package/web/chunk-m7kypzvp.js.br +0 -0
  547. package/web/chunk-m7kypzvp.js.gz +0 -0
  548. package/web/chunk-n00se8nk.js.br +0 -0
  549. package/web/chunk-n00se8nk.js.gz +0 -0
  550. package/web/chunk-ngdj0r7w.js.br +0 -0
  551. package/web/chunk-ngdj0r7w.js.gz +0 -0
  552. package/web/chunk-p6ma361e.js.br +0 -0
  553. package/web/chunk-p6ma361e.js.gz +0 -0
  554. package/web/chunk-pvhz0gqy.js.br +0 -0
  555. package/web/chunk-pvhz0gqy.js.gz +0 -0
  556. package/web/chunk-q96eky9v.js +0 -1
  557. package/web/chunk-q96eky9v.js.br +0 -0
  558. package/web/chunk-q96eky9v.js.gz +0 -0
  559. package/web/chunk-qcgs1mft.js.br +0 -0
  560. package/web/chunk-qcgs1mft.js.gz +0 -0
  561. package/web/chunk-qh24q7c0.js.br +0 -0
  562. package/web/chunk-qh24q7c0.js.gz +0 -0
  563. package/web/chunk-r1xksxab.js +0 -1
  564. package/web/chunk-r1xksxab.js.br +0 -0
  565. package/web/chunk-r1xksxab.js.gz +0 -0
  566. package/web/chunk-rsc5k5he.js.br +0 -0
  567. package/web/chunk-rsc5k5he.js.gz +0 -0
  568. package/web/chunk-s7a2f62f.js.br +0 -0
  569. package/web/chunk-s7a2f62f.js.gz +0 -0
  570. package/web/chunk-sac6fn9n.js.br +0 -0
  571. package/web/chunk-sac6fn9n.js.gz +0 -0
  572. package/web/chunk-t0xjx21h.js.br +0 -0
  573. package/web/chunk-t0xjx21h.js.gz +0 -0
  574. package/web/chunk-v7ck87jf.js.br +0 -0
  575. package/web/chunk-v7ck87jf.js.gz +0 -0
  576. package/web/chunk-vvk9nche.js.br +0 -0
  577. package/web/chunk-vvk9nche.js.gz +0 -0
  578. package/web/chunk-vxtfen72.js +0 -1
  579. package/web/chunk-vxtfen72.js.br +0 -0
  580. package/web/chunk-vxtfen72.js.gz +0 -0
  581. package/web/chunk-w5c2r59n.js.br +0 -0
  582. package/web/chunk-w5c2r59n.js.gz +0 -0
  583. package/web/chunk-wh0vt2vd.js.br +0 -0
  584. package/web/chunk-xe7fj72r.js +0 -1
  585. package/web/chunk-xe7fj72r.js.br +0 -0
  586. package/web/chunk-xe7fj72r.js.gz +0 -0
  587. package/web/chunk-yarsp7h7.js.br +0 -0
  588. package/web/chunk-yarsp7h7.js.gz +0 -0
  589. package/web/chunk-yw5wyz1q.js.br +0 -0
  590. package/web/chunk-yw5wyz1q.js.gz +0 -0
  591. package/web/chunk-z3ea4vhk.js +0 -1
  592. package/web/chunk-z3ea4vhk.js.br +0 -0
  593. package/web/chunk-z3ea4vhk.js.gz +0 -0
  594. package/web/chunk-z7adzvfz.js.br +0 -0
  595. package/web/chunk-z7adzvfz.js.gz +0 -0
  596. package/web/chunk-zb01zmms.js.br +0 -0
  597. package/web/chunk-zb01zmms.js.gz +0 -0
@@ -1,9 +1,9 @@
1
1
  // @bun
2
- import{o,e,u,cr,qt,O,be,M,Fo,Fn,ur}from"./chunk-y8mf9tcj.js";import{Do,Rt,ft,k,Un,Uo}from"./chunk-rqrjzz73.js";import*as S from"fs/promises";import*as ne from"fs";import*as v from"path";import*as $e from"child_process";import*as at from"crypto";import*as ct from"readline";function C(a){if(a.inputSchema.type!=="object")throw Error(`JSON schema for tool "${a.name}" must be an object, but got ${a.inputSchema.type}`);return{type:"custom",name:a.name,input_schema:a.inputSchema,description:a.description,run:a.run,parse:(r)=>r,...a.close?{close:a.close}:{}}}var F=ft.promises,J=448,yt=384;function ae(a,r){let t=k.relative(a,r);return t===""||!t.startsWith(".."+k.sep)&&t!==".."&&!k.isAbsolute(t)}async function Se(a,r){for(let t of a)if(ae(await X(k.resolve(t)),r))return t;return}var wt=40;function Z(a){let r=a?.code;return typeof r==="string"?r:void 0}async function X(a){let r=[],t=a,i=0;for(;;){let n;try{n=await F.realpath(t)}catch(s){let c;try{c=(await F.lstat(t)).isSymbolicLink()}catch(l){let f=Z(l);if(f!=="ENOENT"&&f!=="ENOTDIR")throw l;let h=k.dirname(t);if(h===t)throw l;r.push(k.basename(t)),t=h;continue}if(!c)throw s;if(++i>wt)throw Object.assign(Error("too many levels of symbolic links"),{code:"ELOOP"});t=k.resolve(k.dirname(t),await F.readlink(t));continue}return r.length?k.join(n,...r.reverse()):n}}async function Ae(a,r,t){let i=t?.allowedRoots??[],n=await X(k.resolve(a)),s;try{s=await X(k.resolve(n,r))}catch(l){throw new M(q(l,`path ${JSON.stringify(r)}`))}if(ae(n,s)||await Se(i,s)!==void 0)return s;let c=i.length?"the session's working directory and its other permitted directories":"the session's working directory";throw new M(`path ${JSON.stringify(r)} is outside ${c}`)}async function Ee(a,r){let t=k.dirname(a),i=k.join(t,`.tmp-${process.pid}-${Rt.randomUUID()}`),n=await F.stat(a).then((c)=>c.mode&511,()=>{return}),s;try{if(s=await F.open(i,"wx",yt),n!==void 0)await s.chmod(n);await s.writeFile(r,"utf-8"),await s.sync(),await s.close(),s=void 0,await F.rename(i,a)}catch(c){if(s)await s.close().catch(()=>{});throw await F.unlink(i).catch(()=>{}),c}}function q(a,r){let t=Z(a);switch(t){case"ENOENT":return`${r}: no such file or directory`;case"EACCES":case"EPERM":return`${r}: permission denied`;case"ENOTDIR":return`${r}: not a directory`;case"EISDIR":return`${r}: is a directory`;case"ELOOP":return`${r}: too many levels of symbolic links`;case"ENAMETOOLONG":return`${r}: file name too long`;case"ENOSPC":return`${r}: no space left on device`;case"EMFILE":case"ENFILE":return`${r}: too many open files`;default:return`${r}: ${t!==void 0?`i/o error (${t})`:"i/o error"}`}}var N=ft.promises,_t=Uo.promisify(Do.execFile);async function gt(a){let{client:r,sessionId:t}=a;if(!r)return async()=>{};let i=O(r),n=a.session;if(!n){if(t===void 0)return async()=>{};i.warn("AgentToolContext.sessionId is deprecated and costs an extra session fetch; fetch the session once and set `session` instead",{component:"agent-tool-context"}),n=await r.beta.sessions.retrieve(t)}let s=k.resolve(a.workdir,"skills"),c=[];for(let l of n.agent.skills)try{let f=await r.beta.skills.versions.retrieve(l.version,{skill_id:l.skill_id}),h=k.basename(f.name.trim());if(h===""||h==="."||h==="..")h=l.skill_id;let d=k.resolve(s,h);if(d!==s&&!d.startsWith(s+k.sep)){i.warn("skill name escapes the skills dir; skipping",{component:"agent-tool-context",name:f.name});continue}let m=await r.beta.skills.versions.download(f.id,{skill_id:l.skill_id});await N.rm(d,{recursive:!0,force:!0}),await N.mkdir(d,{recursive:!0,mode:J}),c.push(d),await Ce(m,d),i.info("downloaded skill",{component:"agent-tool-context",skill_id:l.skill_id,version:f.id,dest:d})}catch(f){i.warn("failed to download skill",{component:"agent-tool-context",skill_id:l.skill_id,error:String(f)})}return async()=>{for(let l of c)await N.rm(l,{recursive:!0,force:!0}).catch((f)=>{i.warn("failed to clean up skill",{component:"agent-tool-context",dest:l,error:String(f)})})}}function St(a){for(let r of a){let t=r.trim();if(!t)continue;if(k.isAbsolute(t)||t.split(/[\\/]/).includes(".."))throw new u(`refusing to extract unsafe archive member: ${t}`)}}var Me="skill archive listing is inconsistent; refusing to extract",Et={unzip:new Set(["-","d","?"]),tar:new Set(["-","d","C"])};function xe(a){let r=a.split(`
2
+ import{o,e,u,cr,qt,O,be,M,$o,Fn,ur}from"./chunk-1td9hjn9.js";import{Uo,Rt,ft,k,Un,Bo}from"./chunk-tvg54x0x.js";import*as S from"fs/promises";import*as ne from"fs";import*as v from"path";import*as $e from"child_process";import*as at from"crypto";import*as ct from"readline";function C(a){if(a.inputSchema.type!=="object")throw Error(`JSON schema for tool "${a.name}" must be an object, but got ${a.inputSchema.type}`);return{type:"custom",name:a.name,input_schema:a.inputSchema,description:a.description,run:a.run,parse:(r)=>r,...a.close?{close:a.close}:{}}}var F=ft.promises,J=448,yt=384;function ae(a,r){let t=k.relative(a,r);return t===""||!t.startsWith(".."+k.sep)&&t!==".."&&!k.isAbsolute(t)}async function Se(a,r){for(let t of a)if(ae(await X(k.resolve(t)),r))return t;return}var wt=40;function Z(a){let r=a?.code;return typeof r==="string"?r:void 0}async function X(a){let r=[],t=a,i=0;for(;;){let n;try{n=await F.realpath(t)}catch(s){let c;try{c=(await F.lstat(t)).isSymbolicLink()}catch(l){let f=Z(l);if(f!=="ENOENT"&&f!=="ENOTDIR")throw l;let h=k.dirname(t);if(h===t)throw l;r.push(k.basename(t)),t=h;continue}if(!c)throw s;if(++i>wt)throw Object.assign(Error("too many levels of symbolic links"),{code:"ELOOP"});t=k.resolve(k.dirname(t),await F.readlink(t));continue}return r.length?k.join(n,...r.reverse()):n}}async function Ae(a,r,t){let i=t?.allowedRoots??[],n=await X(k.resolve(a)),s;try{s=await X(k.resolve(n,r))}catch(l){throw new M(q(l,`path ${JSON.stringify(r)}`))}if(ae(n,s)||await Se(i,s)!==void 0)return s;let c=i.length?"the session's working directory and its other permitted directories":"the session's working directory";throw new M(`path ${JSON.stringify(r)} is outside ${c}`)}async function Ee(a,r){let t=k.dirname(a),i=k.join(t,`.tmp-${process.pid}-${Rt.randomUUID()}`),n=await F.stat(a).then((c)=>c.mode&511,()=>{return}),s;try{if(s=await F.open(i,"wx",yt),n!==void 0)await s.chmod(n);await s.writeFile(r,"utf-8"),await s.sync(),await s.close(),s=void 0,await F.rename(i,a)}catch(c){if(s)await s.close().catch(()=>{});throw await F.unlink(i).catch(()=>{}),c}}function q(a,r){let t=Z(a);switch(t){case"ENOENT":return`${r}: no such file or directory`;case"EACCES":case"EPERM":return`${r}: permission denied`;case"ENOTDIR":return`${r}: not a directory`;case"EISDIR":return`${r}: is a directory`;case"ELOOP":return`${r}: too many levels of symbolic links`;case"ENAMETOOLONG":return`${r}: file name too long`;case"ENOSPC":return`${r}: no space left on device`;case"EMFILE":case"ENFILE":return`${r}: too many open files`;default:return`${r}: ${t!==void 0?`i/o error (${t})`:"i/o error"}`}}var N=ft.promises,_t=Bo.promisify(Uo.execFile);async function gt(a){let{client:r,sessionId:t}=a;if(!r)return async()=>{};let i=O(r),n=a.session;if(!n){if(t===void 0)return async()=>{};i.warn("AgentToolContext.sessionId is deprecated and costs an extra session fetch; fetch the session once and set `session` instead",{component:"agent-tool-context"}),n=await r.beta.sessions.retrieve(t)}let s=k.resolve(a.workdir,"skills"),c=[];for(let l of n.agent.skills)try{let f=await r.beta.skills.versions.retrieve(l.version,{skill_id:l.skill_id}),h=k.basename(f.name.trim());if(h===""||h==="."||h==="..")h=l.skill_id;let d=k.resolve(s,h);if(d!==s&&!d.startsWith(s+k.sep)){i.warn("skill name escapes the skills dir; skipping",{component:"agent-tool-context",name:f.name});continue}let m=await r.beta.skills.versions.download(f.id,{skill_id:l.skill_id});await N.rm(d,{recursive:!0,force:!0}),await N.mkdir(d,{recursive:!0,mode:J}),c.push(d),await Ce(m,d),i.info("downloaded skill",{component:"agent-tool-context",skill_id:l.skill_id,version:f.id,dest:d})}catch(f){i.warn("failed to download skill",{component:"agent-tool-context",skill_id:l.skill_id,error:String(f)})}return async()=>{for(let l of c)await N.rm(l,{recursive:!0,force:!0}).catch((f)=>{i.warn("failed to clean up skill",{component:"agent-tool-context",dest:l,error:String(f)})})}}function St(a){for(let r of a){let t=r.trim();if(!t)continue;if(k.isAbsolute(t)||t.split(/[\\/]/).includes(".."))throw new u(`refusing to extract unsafe archive member: ${t}`)}}var Me="skill archive listing is inconsistent; refusing to extract",Et={unzip:new Set(["-","d","?"]),tar:new Set(["-","d","C"])};function xe(a){let r=a.split(`
3
3
  `);if(r[r.length-1]==="")r.pop();return r}function bt(a,r){return/^[\x20-\x7E]+$/.test(r)&&!/[\\^#]/.test(r)&&!(a==="unzip"&&r.startsWith("-"))}function Ot(a,r,t){let i=xe(r),n=xe(t);if(i.length!==n.length)throw new u(Me);let s=[],c=[];return i.forEach((l,f)=>{if(Et[a].has(n[f].charAt(0))){s.push(l);return}if(!bt(a,l))throw new u(`refusing to extract archive: cannot safely exclude member ${JSON.stringify(l)}`);c.push(l)}),{plain:s,special:c}}async function De(a){for(let r of await N.readdir(a,{withFileTypes:!0}))if(r.isDirectory())await De(k.join(a,r.name));else if(!r.isFile())throw new u(Me)}async function Oe(a,r){try{let{stdout:t}=await _t(a,r);return t}catch(t){if(Z(t)==="ENOENT")throw new u(`skill extraction requires the \`${a}\` command, but it was not found on PATH`);throw t}}function Mt(a){let r,t=!1;for(let i of a){let n=i.trim().split("/").filter((c)=>c!==""&&c!==".");if(n.length===0)continue;let s=n[0];if(r===void 0)r=s;else if(s!==r)return"";if(n.length>1)t=!0}return r!==void 0&&t?r:""}async function Ce(a,r){let t=k.join(r,`.skill-archive-${process.pid}-${Date.now()}`);if(!a.body)throw new u("skill download response had no body");await Un.promises.pipeline(Un.Readable.fromWeb(a.body),ft.createWriteStream(t));let i=k.join(k.dirname(r),`.skill-stage-${process.pid}-${Date.now()}`),n=k.join(k.dirname(r),`.skill-exclude-${process.pid}-${Date.now()}`);try{let s=await kt(t,4),c=s.length>=4&&s[0]===80&&s[1]===75&&s[2]===3&&s[3]===4,l=c?"unzip":"tar",f=await Oe(l,c?["-Z1",t]:["-tf",t]),h=await Oe(l,c?["-Z","--h","--t",t]:["-tvf",t]),{plain:d,special:m}=Ot(l,f,h);St([...d,...m]);let _=Mt(d);if(await N.mkdir(i,{recursive:!0,mode:J}),d.length>0)await Oe(l,await vt(l,t,i,m,n));await De(i);let E=_?k.join(i,_):i,D=await N.readdir(E).catch((I)=>{throw Z(I)==="ENOENT"?new u(Me):I});for(let I of D)await N.rename(k.join(E,I),k.join(r,I))}finally{await N.rm(t,{force:!0}),await N.rm(n,{force:!0}),await N.rm(i,{recursive:!0,force:!0})}}async function vt(a,r,t,i,n){let s=i.map((c)=>c.replace(/[*?[\\]/g,"\\$&"));if(a==="unzip")return["-oq",r,"-d",t,...s.length>0?["-x",...s]:[]];if(s.length===0)return["-xf",r,"-C",t];return await N.writeFile(n,s.join(`
4
4
  `)+`
5
5
  `,{flag:"wx",mode:384}),["-xf",r,"-C",t,"-X",n]}async function kt(a,r){let t=await N.open(a,"r");try{let i=Buffer.alloc(r),{bytesRead:n}=await t.read(i,0,r,0);return i.subarray(0,n)}finally{await t.close()}}var g=ft.promises,z=ft.constants,Ue=448,It=384,Nt=448,ke=z.O_NOFOLLOW??0,Tt=z.O_NONBLOCK??0,y=(()=>{class a extends Error{constructor(r,t){super(`path ${JSON.stringify(t)} ${r}`);this.name="FileStoreError",this.reason=r,this.relPath=t}}return a.ESCAPES_ROOT="escapes the store root",a.IS_A_SYMLINK="is a symlink",a.NOT_A_FILE="is not a regular file",a.NOT_A_DIRECTORY="is not a directory",a.NOT_UTF8="is not valid utf-8",a.MOVE_DESTINATION_EXISTS="already exists",a})();function Ie(a){return a.startsWith("/")&&!a.split("/").includes("..")}var ve=(()=>{class a{constructor(r,t,i=!1){this.hashes=new Map,this.rootPath=r,this.removedOnDispose=t,this.decoder=i?new TextDecoder("utf-8",{fatal:!0}):void 0}static async open(r,t){if(!Lt())throw Error("FileStore requires O_NOFOLLOW support on this platform");let i=!1;try{await g.lstat(r)}catch(n){if(n.code!=="ENOENT")throw n;i=!0}return new a(k.resolve(r),i,t?.utf8??!1)}async createRoot(){await $t(this.rootPath)}root(){return{path:this.rootPath,removedOnDispose:this.removedOnDispose}}async dispose(){if(!this.removedOnDispose)return;await g.rm(this.rootPath,{recursive:!0,force:!0})}async put(r,t,i){let n=r.replace(/\\/g,"/");if(n.endsWith("/")||n.endsWith("/.")||n===""||n===".")throw new y(y.NOT_A_FILE,r);let s=this.resolveUnderRoot(r),c=typeof t==="string"?cr(t):t;this.requireUtf8(r,c),await Fe(this.rootPath,k.dirname(s)),await At(s,c,i?.executable??!1)}async get(r){let t=this.resolveUnderRoot(r),i;try{i=await je(r,t)}catch(s){if(s.code==="ENOENT")return null;throw s}let n;try{let s=await i.readFile();n=new Uint8Array(s.buffer,s.byteOffset,s.byteLength)}finally{await i.close()}return this.requireUtf8(r,n),n}async ls(r="/"){let t=this.resolveUnderRoot(r);return new Set((await Pe(this.rootPath,r,t)).map(([i])=>i))}async findSymlinks(r="/"){let t=this.resolveUnderRoot(r);return Dt(this.rootPath,r,t)}async hashtree(r="/"){let t=this.resolveUnderRoot(r),i=ce.nowNs(),n=Object.create(null);for(let[s,c]of await Pe(this.rootPath,r,t)){let l=await this.hashViaCache(s,c,i);if(l!==null)n[s]=l}return n}async hashFile(r){let t=this.resolveUnderRoot(r),i;try{i=await g.lstat(t,{bigint:!0})}catch(s){if(s.code==="ENOENT")return null;throw s}if(i.isSymbolicLink())throw new y(y.IS_A_SYMLINK,r);if(!i.isFile())throw new y(y.NOT_A_FILE,r);let n=k.relative(this.rootPath,t).split(k.sep).join("/");return this.hashViaCache(n,t,ce.nowNs())}async move(r,t){let i=this.resolveUnderRoot(r),n=this.resolveUnderRoot(t);if(i===this.rootPath||n===this.rootPath)return;if(await g.stat(n).then(()=>!0,()=>!1))throw new y(y.MOVE_DESTINATION_EXISTS,t);await Fe(this.rootPath,k.dirname(n)),await g.rename(i,n)}async remove(r){let t=this.resolveUnderRoot(r);if(t===this.rootPath)return;let i;try{i=await g.lstat(t,{bigint:!0})}catch(n){if(n.code==="ENOENT")return;throw n}if(i.isDirectory())await g.rm(t,{recursive:!0,force:!0});else try{await g.unlink(t)}catch(n){if(n.code!=="ENOENT")throw n}}resolveUnderRoot(r){let t=r.replace(/\\/g,"/").replace(/^\/+/,""),i=t.split("/").filter((n)=>n!==""&&n!==".");if(k.posix.isAbsolute(t)||i.includes(".."))throw new y(y.ESCAPES_ROOT,r);return i.length===0?this.rootPath:k.join(this.rootPath,...i)}requireUtf8(r,t){if(!this.decoder)return;try{this.decoder.decode(t)}catch{throw new y(y.NOT_UTF8,r)}}async hashViaCache(r,t,i){let n;try{n=await g.lstat(t,{bigint:!0})}catch(l){if(l.code==="ENOENT")return null;throw l}if(!n.isFile())return null;let s=this.hashes.get(r),c;if(s!==void 0&&Ft(s,n))c=s.sha;else try{c=await ce.hashFile(t)}catch(l){let f=l.code;if(f==="ENOENT"||l instanceof y)return null;if(f==="ELOOP"||f==="EMLINK")return null;throw l}if(Pt(n,i))this.hashes.set(r,{mtimeNs:n.mtimeNs,ctimeNs:n.ctimeNs,size:n.size,sha:c});return c}}return a.isPathLegal=Ie,a})();function Lt(){return ke!==0}async function $t(a){let r=[],t=a;for(;;){try{await g.stat(t);break}catch(n){let s=n.code;if(s!=="ENOENT"&&s!=="ENOTDIR"&&s!=="ELOOP")throw n}r.push(t);let i=k.dirname(t);if(i===t)break;t=i}for(let i of r.reverse())try{await g.mkdir(i,{mode:Ue})}catch(n){if(n.code!=="EEXIST")throw n}}async function Fe(a,r){let t=k.relative(a,r);if(t==="")return;let i=a;for(let n of t.split(k.sep)){i=k.join(i,n);try{await g.mkdir(i,{mode:Ue})}catch(s){if(s.code!=="EEXIST")throw s}}}async function At(a,r,t){let i=t?Nt:It,n=k.join(k.dirname(a),`.fs-${Rt.randomBytes(8).toString("hex")}.tmp`),s;try{s=await g.open(n,z.O_WRONLY|z.O_CREAT|z.O_EXCL|ke,i),await s.writeFile(r),await s.close(),s=void 0,await g.rename(n,a)}catch(c){if(s)await s.close().catch(()=>{});throw await g.unlink(n).catch(()=>{}),c}}async function je(a,r){let t;try{t=await g.open(r,z.O_RDONLY|ke|Tt)}catch(i){let n=i.code;if(n==="ELOOP"||n==="EMLINK")throw new y(y.IS_A_SYMLINK,a);throw i}try{if(!(await t.stat()).isFile())throw new y(y.NOT_A_FILE,a)}catch(i){throw await t.close().catch(()=>{}),i}return t}async function xt(a){let r=Rt.createHash("sha256"),t=await je(k.basename(a),a),i=new Uint8Array(1048576);try{for(;;){let{bytesRead:n}=await t.read(i,0,i.length);if(n===0)break;r.update(i.subarray(0,n))}}finally{await t.close()}return r.digest("hex")}async function Pe(a,r,t){if(!await Ct(r,t))return[];let i=[];return await Be(t,(n,s)=>{if(s.isFile())i.push([k.relative(a,n).split(k.sep).join("/"),n])}),i.sort(),i}async function Dt(a,r,t){let i=(c)=>k.relative(a,c).split(k.sep).join("/"),n;try{n=await g.lstat(t,{bigint:!0})}catch(c){let l=c.code;if(l==="ENOENT"||l==="ENOTDIR")return new Set;throw c}if(n.isSymbolicLink())return new Set([i(t)]);if(!n.isDirectory())throw new y(y.NOT_A_DIRECTORY,r);let s=new Set;return await Be(t,(c,l)=>{if(l.isSymbolicLink())s.add(i(c))}),s}async function Ct(a,r){let t;try{t=await g.lstat(r,{bigint:!0})}catch(i){let n=i.code;if(n==="ENOENT"||n==="ENOTDIR")return!1;throw i}if(!t.isDirectory())throw new y(y.NOT_A_DIRECTORY,a);return!0}async function Be(a,r){let t=[a];while(t.length){let i=t.pop(),n;try{n=await g.readdir(i,{withFileTypes:!0})}catch(s){if(s.code==="ENOENT")continue;throw s}for(let s of n){let c=k.join(i,s.name);if(r(c,s),s.isDirectory()&&!s.isSymbolicLink())t.push(c)}}}function Ft(a,r){return r.mtimeNs===a.mtimeNs&&r.ctimeNs===a.ctimeNs&&r.size===a.size}function Pt(a,r){return(a.mtimeNs>a.ctimeNs?a.mtimeNs:a.ctimeNs)<r-ce.timestampTrustMarginNs}var Wt=2000000000n,ce={hashFile:xt,timestampTrustMarginNs:Wt,nowNs:()=>BigInt(Date.now())*1000000n},Ye=ve,We=Symbol.asyncDispose;if(We)Object.defineProperty(ve.prototype,We,{value:ve.prototype.dispose,configurable:!0,writable:!0});var w,L,le,Q,fe,p,G,de,A,qe,he,ze,Ge,Re,Ne,He,Ke,Te,Ve,Xe,me,ue,Je,Ze,Ut=30000,K=".anthropic-memory-store",et=1;function Qe(a){return Rt.createHash("sha256").update(`version ${et}
6
- ${a}`,"utf-8").digest("hex")}var jt=30000,Bt=100,Yt=20,zt=16,Gt=32,Ht=8,Kt=50;class P extends u{constructor(a,r){super(a);if(this.name="SessionMemoryError",r!==void 0)this.cause=r}}class tt{constructor(a,r,t){this.mode=a,this.cap=r,this.waiveWindow=t,this.attempted=0,this.capped=0,this.suppressed=0}takeSlot(){if(this.attempted>=this.cap)return this.capped++,!1;return this.attempted++,!0}}var Vt=(()=>{class a{constructor(r,t){w.add(this),L.set(this,void 0),le.set(this,void 0),Q.set(this,void 0),fe.set(this,void 0),p.set(this,void 0),G.set(this,void 0),de.set(this,!1),A.set(this,[]),o(this,L,r,"f"),o(this,le,t.workdir,"f"),o(this,Q,t.syncIntervalMs??Fo,"f"),Fn(e(this,Q,"f"),"syncIntervalMs"),o(this,fe,t.syncDeletions??"enabled","f"),o(this,p,O(r),"f"),o(this,G,Date.now(),"f")}get roots(){return e(this,A,"f").map((r)=>r.files.root().path)}get readOnlyRoots(){return e(this,A,"f").filter((r)=>r.readOnly).map((r)=>r.files.root().path)}async download(r){for(let t of r.resources){if(t.type!=="memory_store")continue;let i=e(this,w,"m",qe).call(this,t),n;try{if(n={memoryStoreId:t.memory_store_id,files:await Ye.open(i,{utf8:!0}),readOnly:t.access==="read_only",baseline:new Map,refusedShas:new Map,pendingDeletes:new Map},!n.files.root().removedOnDispose)throw new P(`something already exists at the memory store's path: ${i} (memory_store_id=${t.memory_store_id}); it must not exist when the session starts`);try{await n.files.createRoot()}catch(s){if(!H(s))throw s;throw new P(`cannot create the memory store's folder: ${i} (memory_store_id=${t.memory_store_id}): ${s}; the worker host must make this mount path writable`,s)}await e(this,w,"m",Ne).call(this,n),e(this,p,"f").info("downloaded memories",{count:n.baseline.size,memory_store_id:n.memoryStoreId,dest:n.files.root().path}),e(this,A,"f").push(n)}catch(s){if(n)await n.files.dispose().catch(()=>{});if(s instanceof P)throw s;throw new P(`failed to download memory store memory_store_id=${t.memory_store_id}: ${s}`,s)}}o(this,G,Date.now(),"f")}async finish(){if(e(this,de,"f"))throw new u("finish() was already called: it is the session's last sync and runs once");o(this,de,!0,"f"),await this.syncAll(!0)}async syncAll(r){await Promise.all(e(this,A,"f").map((t)=>e(this,w,"m",ze).call(this,t,r))),o(this,G,Date.now(),"f")}async syncIfDue(){if(Date.now()-e(this,G,"f")<e(this,Q,"f"))return;await this.syncAll(!1)}async flushWrites(r){await Promise.all(e(this,A,"f").map((t)=>e(this,w,"m",Ge).call(this,t,r)))}async dispose(){for(let r of e(this,A,"f")){let t=r.files.root();try{let i=await e(this,w,"m",he).call(this,r);if(!i.markerOk&&Object.keys(i.files).length>0){e(this,p,"f").warn(`${i.distrustReason}; leaving the memory store folder on disk`,{root:t.path,memory_store_id:r.memoryStoreId});continue}await r.files.dispose()}catch(i){if(!(i instanceof y)&&!H(i))throw i;e(this,p,"f").warn("failed to remove the memory store folder",{root:r.files.root().path,memory_store_id:r.memoryStoreId,error:String(i)});continue}if(t.removedOnDispose)e(this,p,"f").info("removed memory store dir",{dest:t.path,memory_store_id:r.memoryStoreId})}}}return L=new WeakMap,le=new WeakMap,Q=new WeakMap,fe=new WeakMap,p=new WeakMap,G=new WeakMap,de=new WeakMap,A=new WeakMap,w=new WeakSet,qe=function(t){if(t.mount_path){if(!Ie(t.mount_path))throw new P(`memory store mount_path is not a clean absolute path: ${JSON.stringify(t.mount_path)} (memory_store_id=${t.memory_store_id})`);return t.mount_path}return k.join(e(this,le,"f"),"memory",t.name||t.memory_store_id)},he=async function(t){let i=await t.files.hashtree(),n=i[K];if(delete i[K],n===Qe(t.memoryStoreId))return{files:i,markerOk:!0,distrustReason:null};return{files:i,markerOk:!1,distrustReason:n!==void 0?"the marker file does not match this store":"the marker file is gone"}},ze=async function(t,i){try{let n=await e(this,w,"m",he).call(this,t),s=n.files;if(!n.markerOk){if(Object.keys(s).length>0){e(this,p,"f").warn(`${n.distrustReason}; leaving the memory store folder as found and not syncing`,{root:t.files.root().path,memory_store_id:t.memoryStoreId});return}await e(this,w,"m",Re).call(this,t,"the folder or its marker is gone");return}if(Object.keys(s).length===0&&t.baseline.size>1){await e(this,w,"m",Re).call(this,t,"every memory file is gone at once");return}let c=new Map;for await(let[m,_]of e(this,w,"m",me).call(this,t.memoryStoreId))c.set(m,_);let l=new tt(e(this,fe,"f"),Math.max(Ht,Math.min(Kt,Math.floor(t.baseline.size/4))),i),f=[],h=new Map,d=[...new Set([...c.keys(),...Object.keys(s),...t.baseline.keys()])].sort();for(let m of d){let _=c.get(m),E=s[m],D=t.baseline.get(m),I;if(E===void 0&&D!==void 0&&_!==void 0&&_.content_sha256===D&&!t.readOnly)I=await e(this,w,"m",Je).call(this,t,m,_,D,l);else I=await e(this,w,"m",He).call(this,t,m,_,E,f);if(I!==void 0)h.set(m,I)}if(t.baseline=h,await e(this,w,"m",Ve).call(this,t,f),l.suppressed>0)e(this,p,"f").debug("remote deletes are disabled; locally deleted memories stay on the server",{count:l.suppressed,memory_store_id:t.memoryStoreId});if(l.capped>0)e(this,p,"f").warn(`delete cap reached: ${l.mode==="log_only"?"would send":"sent"} ${l.attempted} deletes, held ${l.capped} for later syncs`,{memory_store_id:t.memoryStoreId})}catch(n){e(this,p,"f").warn("memory sync failed",{memory_store_id:t.memoryStoreId,error:String(n)})}},Ge=async function(t,i){let n=new Map,s=new Set,c=async()=>{if(t.readOnly)return;let l=await e(this,w,"m",he).call(this,t);if(!l.markerOk){e(this,p,"f").warn(`${l.distrustReason}; not uploading anything from the memory store folder`,{root:t.files.root().path,memory_store_id:t.memoryStoreId});return}for(let[d,m]of Object.entries(l.files))if(m!==t.baseline.get(d)&&t.refusedShas.get(d)!==m)n.set(d,m),s.add(d);if(n.size===0||i?.aborted)return;let f=new Map;for await(let[d,m]of e(this,w,"m",me).call(this,t.memoryStoreId)){if(i?.aborted)return;f.set(d,m)}let h=[];for(let d of[...n.keys()].sort()){let m=n.get(d),_=t.baseline.get(d),E=f.get(d);if(E!==void 0&&E.content_sha256===m){t.baseline.set(d,E.content_sha256),s.delete(d);continue}if(E!==void 0&&E.content_sha256!==_){e(this,p,"f").warn("memory changed both locally and remotely; the flush leaves the remote version",{path:d,memory_store_id:t.memoryStoreId}),s.delete(d);continue}h.push([d,m,E])}await e(this,w,"m",Xe).call(this,t,h,s,i)};try{if(await Xt(c(),i),i?.aborted&&s.size>0)e(this,p,"f").warn(`memory flush cut off part-way; ${s.size} of ${n.size} changed files had not finished uploading`,{memory_store_id:t.memoryStoreId})}catch(l){e(this,p,"f").warn("memory flush failed",{memory_store_id:t.memoryStoreId,error:String(l)})}},Re=async function(t,i){e(this,p,"f").warn(`${i}; re-downloading the memory store folder instead of syncing`,{root:t.files.root().path,memory_store_id:t.memoryStoreId}),await t.files.createRoot(),await e(this,w,"m",Ne).call(this,t)},Ne=async function(t){t.baseline=new Map,t.pendingDeletes.clear(),await t.files.put(K,`version ${et}
6
+ ${a}`,"utf-8").digest("hex")}var jt=30000,Bt=100,Yt=20,zt=16,Gt=32,Ht=8,Kt=50;class P extends u{constructor(a,r){super(a);if(this.name="SessionMemoryError",r!==void 0)this.cause=r}}class tt{constructor(a,r,t){this.mode=a,this.cap=r,this.waiveWindow=t,this.attempted=0,this.capped=0,this.suppressed=0}takeSlot(){if(this.attempted>=this.cap)return this.capped++,!1;return this.attempted++,!0}}var Vt=(()=>{class a{constructor(r,t){w.add(this),L.set(this,void 0),le.set(this,void 0),Q.set(this,void 0),fe.set(this,void 0),p.set(this,void 0),G.set(this,void 0),de.set(this,!1),A.set(this,[]),o(this,L,r,"f"),o(this,le,t.workdir,"f"),o(this,Q,t.syncIntervalMs??$o,"f"),Fn(e(this,Q,"f"),"syncIntervalMs"),o(this,fe,t.syncDeletions??"enabled","f"),o(this,p,O(r),"f"),o(this,G,Date.now(),"f")}get roots(){return e(this,A,"f").map((r)=>r.files.root().path)}get readOnlyRoots(){return e(this,A,"f").filter((r)=>r.readOnly).map((r)=>r.files.root().path)}async download(r){for(let t of r.resources){if(t.type!=="memory_store")continue;let i=e(this,w,"m",qe).call(this,t),n;try{if(n={memoryStoreId:t.memory_store_id,files:await Ye.open(i,{utf8:!0}),readOnly:t.access==="read_only",baseline:new Map,refusedShas:new Map,pendingDeletes:new Map},!n.files.root().removedOnDispose)throw new P(`something already exists at the memory store's path: ${i} (memory_store_id=${t.memory_store_id}); it must not exist when the session starts`);try{await n.files.createRoot()}catch(s){if(!H(s))throw s;throw new P(`cannot create the memory store's folder: ${i} (memory_store_id=${t.memory_store_id}): ${s}; the worker host must make this mount path writable`,s)}await e(this,w,"m",Ne).call(this,n),e(this,p,"f").info("downloaded memories",{count:n.baseline.size,memory_store_id:n.memoryStoreId,dest:n.files.root().path}),e(this,A,"f").push(n)}catch(s){if(n)await n.files.dispose().catch(()=>{});if(s instanceof P)throw s;throw new P(`failed to download memory store memory_store_id=${t.memory_store_id}: ${s}`,s)}}o(this,G,Date.now(),"f")}async finish(){if(e(this,de,"f"))throw new u("finish() was already called: it is the session's last sync and runs once");o(this,de,!0,"f"),await this.syncAll(!0)}async syncAll(r){await Promise.all(e(this,A,"f").map((t)=>e(this,w,"m",ze).call(this,t,r))),o(this,G,Date.now(),"f")}async syncIfDue(){if(Date.now()-e(this,G,"f")<e(this,Q,"f"))return;await this.syncAll(!1)}async flushWrites(r){await Promise.all(e(this,A,"f").map((t)=>e(this,w,"m",Ge).call(this,t,r)))}async dispose(){for(let r of e(this,A,"f")){let t=r.files.root();try{let i=await e(this,w,"m",he).call(this,r);if(!i.markerOk&&Object.keys(i.files).length>0){e(this,p,"f").warn(`${i.distrustReason}; leaving the memory store folder on disk`,{root:t.path,memory_store_id:r.memoryStoreId});continue}await r.files.dispose()}catch(i){if(!(i instanceof y)&&!H(i))throw i;e(this,p,"f").warn("failed to remove the memory store folder",{root:r.files.root().path,memory_store_id:r.memoryStoreId,error:String(i)});continue}if(t.removedOnDispose)e(this,p,"f").info("removed memory store dir",{dest:t.path,memory_store_id:r.memoryStoreId})}}}return L=new WeakMap,le=new WeakMap,Q=new WeakMap,fe=new WeakMap,p=new WeakMap,G=new WeakMap,de=new WeakMap,A=new WeakMap,w=new WeakSet,qe=function(t){if(t.mount_path){if(!Ie(t.mount_path))throw new P(`memory store mount_path is not a clean absolute path: ${JSON.stringify(t.mount_path)} (memory_store_id=${t.memory_store_id})`);return t.mount_path}return k.join(e(this,le,"f"),"memory",t.name||t.memory_store_id)},he=async function(t){let i=await t.files.hashtree(),n=i[K];if(delete i[K],n===Qe(t.memoryStoreId))return{files:i,markerOk:!0,distrustReason:null};return{files:i,markerOk:!1,distrustReason:n!==void 0?"the marker file does not match this store":"the marker file is gone"}},ze=async function(t,i){try{let n=await e(this,w,"m",he).call(this,t),s=n.files;if(!n.markerOk){if(Object.keys(s).length>0){e(this,p,"f").warn(`${n.distrustReason}; leaving the memory store folder as found and not syncing`,{root:t.files.root().path,memory_store_id:t.memoryStoreId});return}await e(this,w,"m",Re).call(this,t,"the folder or its marker is gone");return}if(Object.keys(s).length===0&&t.baseline.size>1){await e(this,w,"m",Re).call(this,t,"every memory file is gone at once");return}let c=new Map;for await(let[m,_]of e(this,w,"m",me).call(this,t.memoryStoreId))c.set(m,_);let l=new tt(e(this,fe,"f"),Math.max(Ht,Math.min(Kt,Math.floor(t.baseline.size/4))),i),f=[],h=new Map,d=[...new Set([...c.keys(),...Object.keys(s),...t.baseline.keys()])].sort();for(let m of d){let _=c.get(m),E=s[m],D=t.baseline.get(m),I;if(E===void 0&&D!==void 0&&_!==void 0&&_.content_sha256===D&&!t.readOnly)I=await e(this,w,"m",Je).call(this,t,m,_,D,l);else I=await e(this,w,"m",He).call(this,t,m,_,E,f);if(I!==void 0)h.set(m,I)}if(t.baseline=h,await e(this,w,"m",Ve).call(this,t,f),l.suppressed>0)e(this,p,"f").debug("remote deletes are disabled; locally deleted memories stay on the server",{count:l.suppressed,memory_store_id:t.memoryStoreId});if(l.capped>0)e(this,p,"f").warn(`delete cap reached: ${l.mode==="log_only"?"would send":"sent"} ${l.attempted} deletes, held ${l.capped} for later syncs`,{memory_store_id:t.memoryStoreId})}catch(n){e(this,p,"f").warn("memory sync failed",{memory_store_id:t.memoryStoreId,error:String(n)})}},Ge=async function(t,i){let n=new Map,s=new Set,c=async()=>{if(t.readOnly)return;let l=await e(this,w,"m",he).call(this,t);if(!l.markerOk){e(this,p,"f").warn(`${l.distrustReason}; not uploading anything from the memory store folder`,{root:t.files.root().path,memory_store_id:t.memoryStoreId});return}for(let[d,m]of Object.entries(l.files))if(m!==t.baseline.get(d)&&t.refusedShas.get(d)!==m)n.set(d,m),s.add(d);if(n.size===0||i?.aborted)return;let f=new Map;for await(let[d,m]of e(this,w,"m",me).call(this,t.memoryStoreId)){if(i?.aborted)return;f.set(d,m)}let h=[];for(let d of[...n.keys()].sort()){let m=n.get(d),_=t.baseline.get(d),E=f.get(d);if(E!==void 0&&E.content_sha256===m){t.baseline.set(d,E.content_sha256),s.delete(d);continue}if(E!==void 0&&E.content_sha256!==_){e(this,p,"f").warn("memory changed both locally and remotely; the flush leaves the remote version",{path:d,memory_store_id:t.memoryStoreId}),s.delete(d);continue}h.push([d,m,E])}await e(this,w,"m",Xe).call(this,t,h,s,i)};try{if(await Xt(c(),i),i?.aborted&&s.size>0)e(this,p,"f").warn(`memory flush cut off part-way; ${s.size} of ${n.size} changed files had not finished uploading`,{memory_store_id:t.memoryStoreId})}catch(l){e(this,p,"f").warn("memory flush failed",{memory_store_id:t.memoryStoreId,error:String(l)})}},Re=async function(t,i){e(this,p,"f").warn(`${i}; re-downloading the memory store folder instead of syncing`,{root:t.files.root().path,memory_store_id:t.memoryStoreId}),await t.files.createRoot(),await e(this,w,"m",Ne).call(this,t)},Ne=async function(t){t.baseline=new Map,t.pendingDeletes.clear(),await t.files.put(K,`version ${et}
7
7
  ${t.memoryStoreId}`);for await(let[i,n]of e(this,w,"m",me).call(this,t.memoryStoreId,"full"))if(await e(this,w,"m",Te).call(this,t,i,n.content??""))t.baseline.set(i,n.content_sha256)},He=async function(t,i,n,s,c){let l=t.baseline.get(i);if(s!==void 0)t.pendingDeletes.delete(i);if(!n){if(s===void 0){t.pendingDeletes.delete(i);return}if(l!==void 0){if(s===l){let _=await e(this,w,"m",Ke).call(this,t,i,l);if(_===void 0)return;if(_===l)return l;s=_}if(t.readOnly)e(this,p,"f").warn("memory deleted remotely but edited locally; keeping the file, which a read-only store cannot push",{path:i,memory_store_id:t.memoryStoreId});else if(t.refusedShas.get(i)!==s)e(this,p,"f").info("memory deleted remotely but edited locally; re-creating it from the file",{path:i,memory_store_id:t.memoryStoreId})}if(t.readOnly)return;if(t.refusedShas.get(i)===s)return;return await e(this,w,"m",ue).call(this,t,i,s,void 0)}let f=n.content_sha256,h=f!==l,d=s!==void 0&&s!==l&&s!==f,m=!t.readOnly&&d;if(s===void 0&&l!==void 0){if(h)e(this,p,"f").warn("memory deleted locally but changed remotely; restoring the remote version",{path:i,memory_store_id:t.memoryStoreId}),t.pendingDeletes.delete(i),c.push([i,n]);return l}if(h){if(s===f)return f;if(d)e(this,p,"f").warn("memory changed both locally and remotely; keeping the remote version",{path:i,memory_store_id:t.memoryStoreId});return c.push([i,n]),l}if(m){if(t.refusedShas.get(i)===s)return f;return await e(this,w,"m",ue).call(this,t,i,s,n)??f}return f},Ke=async function(t,i,n){let s;try{s=await t.files.hashFile(i)}catch(c){if(!(c instanceof y)&&!H(c))throw c;return n}if(s===null)return;if(s!==n)return s;try{await t.files.remove(i)}catch(c){if(!(c instanceof y)&&!H(c))throw c;return e(this,p,"f").warn("failed to remove memory deleted remotely",{path:i,memory_store_id:t.memoryStoreId,error:String(c)}),n}return},Te=async function(t,i,n){try{await t.files.put(i,n)}catch(s){if(!(s instanceof y)&&!H(s))throw s;return e(this,p,"f").warn("failed to write memory",{path:i,memory_store_id:t.memoryStoreId,error:String(s)}),!1}return!0},Ve=async function(t,i){if(i.length===0)return;let n=async(l,f)=>{let h;try{h=await e(this,L,"f").beta.memoryStores.memories.retrieve(f.id,{memory_store_id:t.memoryStoreId,view:"full"})}catch(d){if(be(d,404))return;e(this,p,"f").warn("failed to fetch memory content",{path:l,memory_store_id:t.memoryStoreId,error:String(d)});return}if(await e(this,w,"m",Te).call(this,t,l,h.content??""))t.baseline.set(l,h.content_sha256)},s=i[Symbol.iterator](),c=async()=>{for(let[l,f]of s)await n(l,f)};await Promise.all(Array.from({length:Math.min(zt,i.length)},c))},Xe=async function(t,i,n,s){let c=i[Symbol.iterator](),l=async()=>{for(let[f,h,d]of c){if(s?.aborted)return;let m=await e(this,w,"m",ue).call(this,t,f,h,d);if(n.delete(f),m!==void 0)t.baseline.set(f,m)}};await Promise.all(Array.from({length:Math.min(Gt,i.length)},l))},me=async function*(t,i="basic"){let n=i==="basic"?Bt:Yt;for await(let s of e(this,L,"f").beta.memoryStores.memories.list(t,{view:i,limit:n})){if(s.type!=="memory")continue;let c=s.path.replace(/^\/+/,"");if(c===K){e(this,p,"f").warn("the server listed the reserved marker path; skipping",{path:s.path,memory_store_id:t});continue}yield[c,s]}},ue=async function r(t,i,n,s){try{let c=await t.files.get(i);if(c===null)return;let l=qt(c),f=s?await e(this,L,"f").beta.memoryStores.memories.update(s.id,{memory_store_id:t.memoryStoreId,content:l,precondition:{type:"content_sha256",content_sha256:s.content_sha256}}):await e(this,L,"f").beta.memoryStores.memories.create(t.memoryStoreId,{path:"/"+i,content:l});return t.refusedShas.delete(i),f.content_sha256}catch(c){if(s&&be(c,404))return await e(this,w,"m",r).call(this,t,i,n,void 0);let l=c instanceof y||be(c,400)||be(c,413);if(s&&be(c,409))e(this,p,"f").warn("memory changed both locally and remotely; the upload was refused and the local edit loses",{path:i,memory_store_id:t.memoryStoreId});else if(l&&n!==void 0)t.refusedShas.set(i,n),e(this,p,"f").warn("the server rejected this memory file, so it stays un-synced until its content changes",{path:i,memory_store_id:t.memoryStoreId,rejection:String(c)});else e(this,p,"f").warn("failed to upload memory",{path:i,memory_store_id:t.memoryStoreId,error:String(c)});return}},Je=async function(t,i,n,s,c){if(c.mode==="disabled")return c.suppressed++,s;let l=t.pendingDeletes.get(i);if(l===void 0)l=Date.now(),t.pendingDeletes.set(i,l);if(!c.waiveWindow&&Date.now()-l<jt)return s;let f,h;try{f=await t.files.hashFile(K)===Qe(t.memoryStoreId),h=await t.files.hashFile(i)===null}catch(m){if(!(m instanceof y)&&!H(m))throw m;f=h=!1}if(!f)return s;if(!h)return t.pendingDeletes.delete(i),s;if(!c.takeSlot())return s;if(c.mode==="log_only")return e(this,p,"f").info("log-only: sync would delete this memory on the server",{path:i,memory_store_id:t.memoryStoreId}),s;let d=await e(this,w,"m",Ze).call(this,t,i,n,s);if(d===void 0)t.pendingDeletes.delete(i);return d},Ze=async function(t,i,n,s){try{await e(this,L,"f").beta.memoryStores.memories.delete(n.id,{memory_store_id:t.memoryStoreId,expected_content_sha256:s})}catch(c){if(be(c,404))return;if(be(c,409)||be(c,412))e(this,p,"f").warn("memory deleted locally but changed remotely; keeping the remote version",{path:i,memory_store_id:t.memoryStoreId});else e(this,p,"f").warn("failed to delete memory",{path:i,memory_store_id:t.memoryStoreId,error:String(c)});return s}e(this,p,"f").info("propagated local deletion",{path:i,memory_store_id:t.memoryStoreId});return},a})();function H(a){return typeof a==="object"&&a!==null&&typeof a.code==="string"}async function Xt(a,r){if(!r){await a;return}let t,i=new Promise((n)=>{if(t=n,r.aborted)n()});r.addEventListener("abort",t,{once:!0});try{await Promise.race([a,i])}finally{r.removeEventListener("abort",t)}}var pe,b,R,ee,W,T,Le,ye,te,we,_e,U,j,V,B,re,x,rt,it,nt=102400,lt=120000,Jt=262144,Zt=65536,ot=Buffer.from(`
8
8
  `),ie=102400,Qt=2000,er=200;class dt extends u{constructor(a){super(`bash command timed out after ${a}ms`);this.name="BashTimeoutError",this.timeoutMs=a}}var tr=/\x1b\[[0-9;?]*[ -/]*[@-~]/g,rr=S.glob;function ht(a){return a===void 0?Jt:a}function Y(a){if(a===void 0)return;throw new u("The `unrestrictedPaths` option you passed to the agent toolset (AgentToolContext) is no longer supported. The toolset's file tools (read, write, edit, glob, grep) are now always confined to the working directory plus the directories listed in `allowedRoots`. Remove `unrestrictedPaths` from your context; to let the file tools reach any other directory, add it to `allowedRoots`.")}function Vr(a){return[or(a),sr(a),fr(a),dr(a),mr(a),pr(a)]}async function oe(a,r){return Y(a.unrestrictedPaths),Ae(a.workdir,r,{allowedRoots:a.allowedRoots??[]})}function mt(a,r){return Se(a.readOnlyRoots??[],r)}function ir(){let a={};for(let[r,t]of Object.entries(process.env)){if(r.startsWith("ANTHROPIC_"))continue;a[r]=t}return a}var nr=(()=>{class a{constructor(r,t=ir()){pe.add(this),b.set(this,void 0),R.set(this,""),ee.set(this,!1),W.set(this,!1),T.set(this,null),o(this,b,$e.spawn("/bin/bash",["--noprofile","--norc"],{cwd:r,env:{...t,PS1:"",PS2:"",TERM:"dumb"},stdio:["pipe","pipe","pipe"],detached:!0}),"f"),e(this,b,"f").stdout.setEncoding("utf8"),e(this,b,"f").stderr.setEncoding("utf8"),e(this,b,"f").stdout.on("data",(i)=>e(this,pe,"m",Le).call(this,i)),e(this,b,"f").stderr.on("data",(i)=>e(this,pe,"m",Le).call(this,i)),e(this,b,"f").once("close",()=>{o(this,W,!0,"f");let i=e(this,T,"f");o(this,T,null,"f"),i?.resolve()})}get closed(){return e(this,W,"f")}async exec(r,t={}){if(e(this,W,"f"))throw new u("bash session terminated");let i=t.timeoutMs??lt,n=t.signal;n?.throwIfAborted(),o(this,R,"","f"),o(this,ee,!1,"f");let s=`__ANT_CMD_${at.randomUUID()}_DONE__`,c=`${s.slice(0,8)}''${s.slice(8)}`,l=`{ ${r}
9
9
  } </dev/null 2>&1; printf '\\n${c}%d\\n' $?
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{B}from"./chunk-9w1m9av8.js";import{_}from"./chunk-k9x1r69s.js";import{a}from"./chunk-zkjnt298.js";var u=a(_());var M=a(_());var C=a(B()),d=a(_());var S=a(B()),f=a(_()),v=(e,t,r)=>{let o={EcsContainer:async(s)=>{let{fromHttp:i}=await import("./chunk-5m51j40e.js"),{fromContainerMetadata:n}=await import("./chunk-5mt8xxex.js");return r?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>f.chain(i(s??{}),n(s))().then(p)},Ec2InstanceMetadata:async(s)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:i}=await import("./chunk-5mt8xxex.js");return async()=>i(s)().then(p)},Environment:async(s)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:i}=await import("./chunk-1kdd7xry.js");return async()=>i(s)().then(p)}};if(e in o)return o[e];else throw new f.CredentialsProviderError(`Unsupported credential source in profile ${t}. Got ${e}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:r})},p=(e)=>S.setCredentialFeature(e,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var R=(e,{profile:t="default",logger:r}={})=>Boolean(e)&&typeof e==="object"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(q(e,{profile:t,logger:r})||H(e,{profile:t,logger:r})),q=(e,{profile:t,logger:r})=>{let o=typeof e.source_profile==="string"&&typeof e.credential_source>"u";if(o)r?.debug?.(` ${t} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`);return o},H=(e,{profile:t,logger:r})=>{let o=typeof e.credential_source==="string"&&typeof e.source_profile>"u";if(o)r?.debug?.(` ${t} isCredentialSourceProfile credential_source=${e.credential_source}`);return o},A=async(e,t,r,o,s={},i)=>{r.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let n=t[e],{source_profile:c,region:K}=n;if(!r.roleAssumer){let{getDefaultRoleAssumer:l}=await import("./chunk-h1fwdz4h.js");r.roleAssumer=l({...r.clientConfig,credentialProviderLogger:r.logger,parentClientConfig:{...o,...r?.parentClientConfig,region:K??r?.parentClientConfig?.region??o?.region}},r.clientPlugins)}if(c&&c in s)throw new d.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${d.getProfileName(r)}. Profiles visited: `+Object.keys(s).join(", "),{logger:r.logger});r.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${c?`source_profile=[${c}]`:`profile=[${e}]`}`);let P=c?i(c,t,r,o,{...s,[c]:!0},I(t[c]??{})):(await v(n.credential_source,e,r.logger)(r))();if(I(n))return P.then((l)=>C.setCredentialFeature(l,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));else{let l={RoleArn:n.role_arn,RoleSessionName:n.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:n.external_id,DurationSeconds:parseInt(n.duration_seconds||"3600",10)},{mfa_serial:m}=n;if(m){if(!r.mfaCodeProvider)throw new d.CredentialsProviderError(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:r.logger,tryNextLink:!1});l.SerialNumber=m,l.TokenCode=await r.mfaCodeProvider(m)}let G=await P;return r.roleAssumer(G,l).then((U)=>C.setCredentialFeature(U,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},I=(e)=>!e.role_arn&&!!e.credential_source;var L=a(B()),O=(e)=>Boolean(e&&e.login_session),b=async(e,t,r)=>{let{fromLoginCredentials:o}=await import("./chunk-kypdthjg.js"),s=await o({...t,profile:e})({callerClientConfig:r});return L.setCredentialFeature(s,"CREDENTIALS_PROFILE_LOGIN","AC")};var x=a(B()),k=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.credential_process==="string",F=async(e,t)=>{let{fromProcess:r}=await import("./chunk-16yz5ebn.js"),o=await r({...e,profile:t})();return x.setCredentialFeature(o,"CREDENTIALS_PROFILE_PROCESS","v")};var y=a(B()),h=async(e,t,r={},o)=>{let{fromSSO:s}=await import("./chunk-3t8wz9w8.js");return s({profile:e,logger:r.logger,parentClientConfig:r.parentClientConfig,clientConfig:r.clientConfig})({callerClientConfig:o}).then((i)=>{if(t.sso_session)return y.setCredentialFeature(i,"CREDENTIALS_PROFILE_SSO","r");else return y.setCredentialFeature(i,"CREDENTIALS_PROFILE_SSO_LEGACY","t")})},D=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var T=a(B()),g=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.aws_access_key_id==="string"&&typeof e.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1&&["undefined","string"].indexOf(typeof e.aws_account_id)>-1,w=async(e,t)=>{t?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");let r={accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}};return T.setCredentialFeature(r,"CREDENTIALS_PROFILE","n")};var W=a(B()),N=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.web_identity_token_file==="string"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1,j=async(e,t,r)=>{let{fromTokenFile:o}=await import("./chunk-2m2sa0bp.js"),s=await o({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:t.roleAssumerWithWebIdentity,logger:t.logger,parentClientConfig:t.parentClientConfig})({callerClientConfig:r});return W.setCredentialFeature(s,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")};var E=async(e,t,r,o,s={},i=!1)=>{let n=t[e];if(Object.keys(s).length>0&&g(n))return w(n,r);if(i||R(n,{profile:e,logger:r.logger}))return A(e,t,r,o,s,E);if(g(n))return w(n,r);if(N(n))return j(n,r,o);if(k(n))return F(r,e);if(D(n))return await h(e,n,r,o);if(O(n))return b(e,r,o);throw new M.CredentialsProviderError(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:r.logger})};var V=(e={})=>async({callerClientConfig:t}={})=>{e.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let r=await u.parseKnownFiles(e);return E(u.getProfileName({profile:e.profile??t?.profile}),r,e,t)};export{V as fromIni};
2
+ import{B}from"./chunk-9w1m9av8.js";import{_}from"./chunk-k9x1r69s.js";import{a}from"./chunk-zkjnt298.js";var u=a(_());var M=a(_());var C=a(B()),d=a(_());var S=a(B()),f=a(_()),v=(e,t,r)=>{let o={EcsContainer:async(s)=>{let{fromHttp:i}=await import("./chunk-5m51j40e.js"),{fromContainerMetadata:n}=await import("./chunk-5mt8xxex.js");return r?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>f.chain(i(s??{}),n(s))().then(p)},Ec2InstanceMetadata:async(s)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:i}=await import("./chunk-5mt8xxex.js");return async()=>i(s)().then(p)},Environment:async(s)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:i}=await import("./chunk-1kdd7xry.js");return async()=>i(s)().then(p)}};if(e in o)return o[e];else throw new f.CredentialsProviderError(`Unsupported credential source in profile ${t}. Got ${e}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:r})},p=(e)=>S.setCredentialFeature(e,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var R=(e,{profile:t="default",logger:r}={})=>Boolean(e)&&typeof e==="object"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(q(e,{profile:t,logger:r})||H(e,{profile:t,logger:r})),q=(e,{profile:t,logger:r})=>{let o=typeof e.source_profile==="string"&&typeof e.credential_source>"u";if(o)r?.debug?.(` ${t} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`);return o},H=(e,{profile:t,logger:r})=>{let o=typeof e.credential_source==="string"&&typeof e.source_profile>"u";if(o)r?.debug?.(` ${t} isCredentialSourceProfile credential_source=${e.credential_source}`);return o},A=async(e,t,r,o,s={},i)=>{r.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let n=t[e],{source_profile:c,region:K}=n;if(!r.roleAssumer){let{getDefaultRoleAssumer:l}=await import("./chunk-sfgw0vmt.js");r.roleAssumer=l({...r.clientConfig,credentialProviderLogger:r.logger,parentClientConfig:{...o,...r?.parentClientConfig,region:K??r?.parentClientConfig?.region??o?.region}},r.clientPlugins)}if(c&&c in s)throw new d.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${d.getProfileName(r)}. Profiles visited: `+Object.keys(s).join(", "),{logger:r.logger});r.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${c?`source_profile=[${c}]`:`profile=[${e}]`}`);let P=c?i(c,t,r,o,{...s,[c]:!0},I(t[c]??{})):(await v(n.credential_source,e,r.logger)(r))();if(I(n))return P.then((l)=>C.setCredentialFeature(l,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));else{let l={RoleArn:n.role_arn,RoleSessionName:n.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:n.external_id,DurationSeconds:parseInt(n.duration_seconds||"3600",10)},{mfa_serial:m}=n;if(m){if(!r.mfaCodeProvider)throw new d.CredentialsProviderError(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:r.logger,tryNextLink:!1});l.SerialNumber=m,l.TokenCode=await r.mfaCodeProvider(m)}let G=await P;return r.roleAssumer(G,l).then((U)=>C.setCredentialFeature(U,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},I=(e)=>!e.role_arn&&!!e.credential_source;var L=a(B()),O=(e)=>Boolean(e&&e.login_session),b=async(e,t,r)=>{let{fromLoginCredentials:o}=await import("./chunk-bp9tfav3.js"),s=await o({...t,profile:e})({callerClientConfig:r});return L.setCredentialFeature(s,"CREDENTIALS_PROFILE_LOGIN","AC")};var x=a(B()),k=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.credential_process==="string",F=async(e,t)=>{let{fromProcess:r}=await import("./chunk-16yz5ebn.js"),o=await r({...e,profile:t})();return x.setCredentialFeature(o,"CREDENTIALS_PROFILE_PROCESS","v")};var y=a(B()),h=async(e,t,r={},o)=>{let{fromSSO:s}=await import("./chunk-bkvhwgeb.js");return s({profile:e,logger:r.logger,parentClientConfig:r.parentClientConfig,clientConfig:r.clientConfig})({callerClientConfig:o}).then((i)=>{if(t.sso_session)return y.setCredentialFeature(i,"CREDENTIALS_PROFILE_SSO","r");else return y.setCredentialFeature(i,"CREDENTIALS_PROFILE_SSO_LEGACY","t")})},D=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var T=a(B()),g=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.aws_access_key_id==="string"&&typeof e.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1&&["undefined","string"].indexOf(typeof e.aws_account_id)>-1,w=async(e,t)=>{t?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");let r={accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}};return T.setCredentialFeature(r,"CREDENTIALS_PROFILE","n")};var W=a(B()),N=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.web_identity_token_file==="string"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1,j=async(e,t,r)=>{let{fromTokenFile:o}=await import("./chunk-6ztgzx9s.js"),s=await o({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:t.roleAssumerWithWebIdentity,logger:t.logger,parentClientConfig:t.parentClientConfig})({callerClientConfig:r});return W.setCredentialFeature(s,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")};var E=async(e,t,r,o,s={},i=!1)=>{let n=t[e];if(Object.keys(s).length>0&&g(n))return w(n,r);if(i||R(n,{profile:e,logger:r.logger}))return A(e,t,r,o,s,E);if(g(n))return w(n,r);if(N(n))return j(n,r,o);if(k(n))return F(r,e);if(D(n))return await h(e,n,r,o);if(O(n))return b(e,r,o);throw new M.CredentialsProviderError(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:r.logger})};var V=(e={})=>async({callerClientConfig:t}={})=>{e.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let r=await u.parseKnownFiles(e);return E(u.getProfileName({profile:e.profile??t?.profile}),r,e,t)};export{V as fromIni};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Bn}from"./chunk-x1y4s01x.js";import"./chunk-ak9rkrf3.js";import{zr,bi}from"./chunk-ftg4b5pa.js";import{gt,at,yt}from"./chunk-np123myw.js";import{et}from"./chunk-4fbj3k59.js";import{se}from"./chunk-keq5kv9b.js";import{pe}from"./chunk-fj56fznw.js";import{V,X}from"./chunk-e2m8ap8f.js";import{Re,bt,Y}from"./chunk-43qf44t8.js";import{J}from"./chunk-0b2brwjc.js";import{W,ae,_e,Ae,K}from"./chunk-35y6nf6k.js";var g=new Set(["openai","openai-codex","opencode","azure"]),h=16;function y(r){return X(V(r),"Azure OpenAI API error")}var A=(r,a,e)=>{let t=new W,i=ae(a,r.compat?.supportsMidConvoSystemMessages);return(async()=>{let n=zr(r,e),s={role:"assistant",content:[],api:"azure-openai-responses",provider:r.provider,model:r.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"pending",timestamp:Date.now()};try{let p=e?.apiKey;if(!p)throw Error(`No API key for provider: ${r.provider}`);let c=R(r,p,e),o=Re(_e(i.messages),r.compat?.supportsOpenAIGrammarTools??!1),m=T(r,i,e,n,o),u=await e?.onPayload?.(m,r);if(u!==void 0)m=u;let f={...e?.signal?{signal:e.signal}:{},...e?.timeoutMs!==void 0?{timeout:e.timeoutMs}:{},maxRetries:0},{data:d,response:l}=await pe(()=>c.responses.create(m,f).withResponse(),{maxRetries:e?.maxRetries,maxRetryDelayMs:e?.maxRetryDelayMs,signal:e?.signal});if(await e?.onResponse?.({status:l.status,headers:J(l.headers)},r),t.push({type:"start",partial:s}),await yt(d,s,t,r,{onProviderStreamEvent:e?.onProviderStreamEvent,grammarToolInputProperties:o}),e?.signal?.aborted)throw Error("Request was aborted");if(s.stopReason==="pending")throw Error("Azure OpenAI Responses stream ended without a stop reason");if(s.stopReason==="aborted"||s.stopReason==="error")throw Error(s.errorMessage||"An unknown error occurred");t.push({type:"done",reason:s.stopReason,message:s}),t.end()}catch(p){for(let c of s.content)delete c.index,delete c.partialJson,delete c.customInput;s.stopReason=e?.signal?.aborted?"aborted":"error",s.errorMessage=y(p),t.push({type:"error",reason:s.stopReason,error:s}),t.end()}})(),t},z=(r,a,e)=>{let t=e?.apiKey;if(!t)throw Error(`No API key for provider: ${r.provider}`);let i={...Y(r,a,e,t),toolChoice:e?.toolChoice},n=e?.reasoning?K(r,e.reasoning):void 0;return A(r,a,{...i,reasoningEffort:n==="off"?void 0:n})};function R(r,a,e){let t={"User-Agent":se(),...r.headers};if(e?.headers)Object.assign(t,e.headers);let{baseUrl:i,apiVersion:n}=bi(r,e);return new Bn({apiKey:a,apiVersion:n,dangerouslyAllowBrowser:!0,fetch:e?.fetch,defaultHeaders:t,baseURL:i})}function T(r,a,e,t,i=Re(_e(a.messages),r.compat?.supportsOpenAIGrammarTools??!1)){let n=r.compat?.supportsAdditionalTools??!1,s=r.compat?.supportsToolSearch??!1,p=Ae(a.messages,n||s),c=gt(r,a,g,{grammarToolInputProperties:i,supportsMidConvoSystemMessages:r.compat?.supportsMidConvoSystemMessages??!1,supportsAdditionalTools:n,supportsToolSearch:s,toolOptions:{supportsStrictMode:r.compat?.supportsStrictMode??!0,supportsOpenAIGrammarTools:r.compat?.supportsOpenAIGrammarTools??!1}}),o={model:t,input:c,stream:!0,prompt_cache_key:et(e?.sessionId),store:!1};if(e?.maxTokens)o.max_output_tokens=Math.max(e.maxTokens,h);if(e?.temperature!==void 0)o.temperature=e?.temperature;if(p.requestTools.length>0)o.tools=at(p.requestTools,{supportsStrictMode:r.compat?.supportsStrictMode??!0,supportsOpenAIGrammarTools:r.compat?.supportsOpenAIGrammarTools??!1});if(e?.toolChoice!==void 0)o.tool_choice=e.toolChoice;let m=e?.reasoningEffort??(e?.reasoningSummary?"medium":void 0);if(r.reasoning){if(m){let f=e?.reasoningEffort?r.thinkingLevelMap?.[e.reasoningEffort]??e.reasoningEffort:m;o.reasoning={effort:f,summary:e?.reasoningSummary||"auto"},o.include=["reasoning.encrypted_content"]}else if(r.thinkingLevelMap?.off!==null)o.reasoning={effort:r.thinkingLevelMap?.off??"none"}}let u=bt(r,m??"off",e?.samplingParams);if(u)Object.assign(o,u);return o}export{A as stream,z as streamSimple};
2
+ import{Bn}from"./chunk-86vhsd3y.js";import"./chunk-pzwaz2ew.js";import{zr,Si}from"./chunk-yetcb1z9.js";import{gt,at,yt}from"./chunk-w4kasz4j.js";import{et}from"./chunk-4fbj3k59.js";import{se}from"./chunk-keq5kv9b.js";import{pe}from"./chunk-fj56fznw.js";import{V,X}from"./chunk-e2m8ap8f.js";import{Re,bt,Y}from"./chunk-38932kzp.js";import{J}from"./chunk-0b2brwjc.js";import{W,ae,_e,Ae,K}from"./chunk-hk5p2eee.js";var g=new Set(["openai","openai-codex","opencode","azure"]),h=16;function y(r){return X(V(r),"Azure OpenAI API error")}var A=(r,a,e)=>{let t=new W,i=ae(a,r.compat?.supportsMidConvoSystemMessages);return(async()=>{let n=zr(r,e),s={role:"assistant",content:[],api:"azure-openai-responses",provider:r.provider,model:r.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"pending",timestamp:Date.now()};try{let p=e?.apiKey;if(!p)throw Error(`No API key for provider: ${r.provider}`);let c=R(r,p,e),o=Re(_e(i.messages),r.compat?.supportsOpenAIGrammarTools??!1),m=T(r,i,e,n,o),u=await e?.onPayload?.(m,r);if(u!==void 0)m=u;let f={...e?.signal?{signal:e.signal}:{},...e?.timeoutMs!==void 0?{timeout:e.timeoutMs}:{},maxRetries:0},{data:d,response:l}=await pe(()=>c.responses.create(m,f).withResponse(),{maxRetries:e?.maxRetries,maxRetryDelayMs:e?.maxRetryDelayMs,signal:e?.signal});if(await e?.onResponse?.({status:l.status,headers:J(l.headers)},r),t.push({type:"start",partial:s}),await yt(d,s,t,r,{onProviderStreamEvent:e?.onProviderStreamEvent,grammarToolInputProperties:o}),e?.signal?.aborted)throw Error("Request was aborted");if(s.stopReason==="pending")throw Error("Azure OpenAI Responses stream ended without a stop reason");if(s.stopReason==="aborted"||s.stopReason==="error")throw Error(s.errorMessage||"An unknown error occurred");t.push({type:"done",reason:s.stopReason,message:s}),t.end()}catch(p){for(let c of s.content)delete c.index,delete c.partialJson,delete c.customInput;s.stopReason=e?.signal?.aborted?"aborted":"error",s.errorMessage=y(p),t.push({type:"error",reason:s.stopReason,error:s}),t.end()}})(),t},z=(r,a,e)=>{let t=e?.apiKey;if(!t)throw Error(`No API key for provider: ${r.provider}`);let i={...Y(r,a,e,t),toolChoice:e?.toolChoice},n=e?.reasoning?K(r,e.reasoning):void 0;return A(r,a,{...i,reasoningEffort:n==="off"?void 0:n})};function R(r,a,e){let t={"User-Agent":se(),...r.headers};if(e?.headers)Object.assign(t,e.headers);let{baseUrl:i,apiVersion:n}=Si(r,e);return new Bn({apiKey:a,apiVersion:n,dangerouslyAllowBrowser:!0,fetch:e?.fetch,defaultHeaders:t,baseURL:i})}function T(r,a,e,t,i=Re(_e(a.messages),r.compat?.supportsOpenAIGrammarTools??!1)){let n=r.compat?.supportsAdditionalTools??!1,s=r.compat?.supportsToolSearch??!1,p=Ae(a.messages,n||s),c=gt(r,a,g,{grammarToolInputProperties:i,supportsMidConvoSystemMessages:r.compat?.supportsMidConvoSystemMessages??!1,supportsAdditionalTools:n,supportsToolSearch:s,toolOptions:{supportsStrictMode:r.compat?.supportsStrictMode??!0,supportsOpenAIGrammarTools:r.compat?.supportsOpenAIGrammarTools??!1}}),o={model:t,input:c,stream:!0,prompt_cache_key:et(e?.sessionId),store:!1};if(e?.maxTokens)o.max_output_tokens=Math.max(e.maxTokens,h);if(e?.temperature!==void 0)o.temperature=e?.temperature;if(p.requestTools.length>0)o.tools=at(p.requestTools,{supportsStrictMode:r.compat?.supportsStrictMode??!0,supportsOpenAIGrammarTools:r.compat?.supportsOpenAIGrammarTools??!1});if(e?.toolChoice!==void 0)o.tool_choice=e.toolChoice;let m=e?.reasoningEffort??(e?.reasoningSummary?"medium":void 0);if(r.reasoning){if(m){let f=e?.reasoningEffort?r.thinkingLevelMap?.[e.reasoningEffort]??e.reasoningEffort:m;o.reasoning={effort:f,summary:e?.reasoningSummary||"auto"},o.include=["reasoning.encrypted_content"]}else if(r.thinkingLevelMap?.off!==null)o.reasoning={effort:r.thinkingLevelMap?.off??"none"}}let u=bt(r,m??"off",e?.samplingParams);if(u)Object.assign(o,u);return o}export{A as stream,z as streamSimple};