@desplega.ai/agent-swarm 2.14.0 → 2.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (344) hide show
  1. package/dist/acp-adapter-7jv7w8jh.js +17 -0
  2. package/dist/{acp-targets-23exz4z4.js → acp-targets-0ebmg3et.js} +10 -10
  3. package/dist/{actions-zcr25x27.js → actions-0ds9dx6c.js} +28 -28
  4. package/dist/{agent-fs-provision-7fa9e12e.js → agent-fs-provision-zpbxa9jc.js} +4 -4
  5. package/dist/{amp-adapter-s7ytmv6b.js → amp-adapter-awh5nn7a.js} +3 -3
  6. package/dist/{anthropic-messages-vdd1zmha.js → anthropic-messages-gtgp9r85.js} +17 -17
  7. package/dist/{app-5d3sz1hy.js → app-nzejkvpp.js} +10 -10
  8. package/dist/{approval-notifications-7qgkzkzx.js → approval-notifications-hbqtb2w3.js} +11 -11
  9. package/dist/{assistant-p2yvhc3j.js → assistant-1paft129.js} +29 -29
  10. package/dist/{boot-args-schema-ry6cb0p7.js → boot-args-schema-zs435mfx.js} +1 -1
  11. package/dist/{boot-reembed-2hkm3vz2.js → boot-reembed-7xq2qgg4.js} +1 -1
  12. package/dist/{boot-reembed-c9643ms3.js → boot-reembed-91qrd4mz.js} +1 -1
  13. package/dist/{boot-scrub-sweep-3ycxr51t.js → boot-scrub-sweep-3h5xscw6.js} +2 -2
  14. package/dist/{boot-seeds-2hzvvzg0.js → boot-seeds-xkxqa8zc.js} +4 -4
  15. package/dist/{boxd-9py3x0jb.js → boxd-464x3w4m.js} +3 -3
  16. package/dist/{claude-adapter-dnkww93e.js → claude-adapter-6d8eyf2f.js} +12 -13
  17. package/dist/{claude-managed-adapter-yk0cr5x6.js → claude-managed-adapter-jzxcaf9m.js} +4 -4
  18. package/dist/{claude-managed-setup-4byxpp47.js → claude-managed-setup-5fcx0qh3.js} +10 -10
  19. package/dist/{claude-sdk-session-4wf3dbvs.js → claude-sdk-session-11vhz1hc.js} +11442 -12786
  20. package/dist/{cli-2ckwgs7q.js → cli-02ba8qx5.js} +1 -1
  21. package/dist/{cli-wvgg7r4j.js → cli-08gfvs58.js} +2 -2
  22. package/dist/{cli-ad00h1st.js → cli-0dkpdvnn.js} +10 -10
  23. package/dist/{cli-879txsac.js → cli-0mq8kxfx.js} +4 -4
  24. package/dist/{cli-rp1n2xpd.js → cli-0nvqg1hb.js} +1 -1
  25. package/dist/{cli-qrwjk4xy.js → cli-0qyfna7a.js} +5 -5
  26. package/dist/cli-0vxbrxr3.js +1006 -0
  27. package/dist/{cli-vxmmttmt.js → cli-132h67ps.js} +52 -52
  28. package/dist/{cli-yd7e590v.js → cli-1e13gvfn.js} +14 -14
  29. package/dist/cli-1hj68b3h.js +30 -0
  30. package/dist/{cli-hzhv7yac.js → cli-1zbj28py.js} +1 -1
  31. package/dist/{cli-0k7ppk9k.js → cli-20mkgwev.js} +43 -38
  32. package/dist/{cli-ejnhs815.js → cli-288k5ep1.js} +11 -11
  33. package/dist/{cli-njvpngc6.js → cli-2n7qdqfv.js} +3 -3
  34. package/dist/{cli-r04ve9xw.js → cli-2r62jy9s.js} +1 -1
  35. package/dist/{cli-9j1t3kf6.js → cli-3179w2rz.js} +2 -2
  36. package/dist/cli-3a3hm1z8.js +15 -0
  37. package/dist/cli-3bagv8rt.js +37 -0
  38. package/dist/{cli-6ajyhxh7.js → cli-3bcsc3m7.js} +2 -2
  39. package/dist/{cli-jgq9xptq.js → cli-3g0vbq46.js} +4 -4
  40. package/dist/{cli-69szn7w7.js → cli-3ktfe5jx.js} +71 -47
  41. package/dist/{cli-yjb3cddd.js → cli-44r66df2.js} +1 -1
  42. package/dist/{cli-mv8ft7b0.js → cli-4y2bekkn.js} +3 -3
  43. package/dist/cli-547fsc36.js +15 -0
  44. package/dist/{cli-6p8p2e6r.js → cli-5pyes68e.js} +1278 -23
  45. package/dist/{cli-930zbczq.js → cli-5t00r6c9.js} +3 -3
  46. package/dist/{cli-kc7vd07m.js → cli-5xjdft4s.js} +3601 -1700
  47. package/dist/{cli-4dyzzkfb.js → cli-643skca1.js} +954 -180
  48. package/dist/{cli-vr4eyq6p.js → cli-6a77m17n.js} +540 -412
  49. package/dist/{cli-v41kn3cd.js → cli-6prwz0zn.js} +4427 -5566
  50. package/dist/{cli-1nfabrt4.js → cli-6xrbpj5j.js} +4 -4
  51. package/dist/{cli-meydjstb.js → cli-6yhjqd6k.js} +4965 -69
  52. package/dist/{cli-6yy4fepf.js → cli-727sq1f9.js} +4 -4
  53. package/dist/{cli-snxhtehz.js → cli-7abeph0b.js} +7 -8
  54. package/dist/{cli-ty3gha1p.js → cli-7b9bwrfg.js} +2 -2
  55. package/dist/{cli-g6a696c0.js → cli-7dwsn9y5.js} +4 -4
  56. package/dist/{cli-r9d2tya0.js → cli-7qkbab03.js} +5 -5
  57. package/dist/{cli-7ca8hczj.js → cli-7svwhw1a.js} +1 -1
  58. package/dist/{cli-ze1ndjs4.js → cli-83kf2y60.js} +8 -8
  59. package/dist/{cli-rs1rzwp4.js → cli-8crn0510.js} +1 -1
  60. package/dist/{cli-wym6rxgt.js → cli-8kemtj1r.js} +10 -15
  61. package/dist/{cli-md4tn21h.js → cli-967jrz7j.js} +40 -26
  62. package/dist/{cli-jcnc5ret.js → cli-976m0zcw.js} +38 -28
  63. package/dist/{cli-cbg0j1yt.js → cli-98sea4d9.js} +3 -3
  64. package/dist/{cli-xh5fpmg8.js → cli-9txap41q.js} +101 -18
  65. package/dist/{cli-24wervhz.js → cli-aktk3qt6.js} +3 -3
  66. package/dist/{cli-096aftq6.js → cli-b70cpf8f.js} +7 -7
  67. package/dist/{cli-2ap1the6.js → cli-by7s3n4p.js} +1 -1
  68. package/dist/{cli-w4bvtxet.js → cli-byzq8xht.js} +7 -7
  69. package/dist/{cli-phe2vcw5.js → cli-d1zkys4j.js} +150 -99
  70. package/dist/cli-dr6x9qdk.js +15 -0
  71. package/dist/cli-dt931hb8.js +9740 -0
  72. package/dist/{cli-0e914dp9.js → cli-e1wprqnd.js} +3 -3
  73. package/dist/{cli-2ayk9gn8.js → cli-e2wzzw17.js} +2 -2
  74. package/dist/{cli-1jx0srjt.js → cli-e9p9h14n.js} +1921 -80
  75. package/dist/{cli-2savn6mm.js → cli-eaqxkeq0.js} +10 -10
  76. package/dist/{cli-dw9rtjm3.js → cli-etykr11s.js} +3061 -727
  77. package/dist/{cli-73rmgm45.js → cli-f07sgaax.js} +2 -2
  78. package/dist/{cli-gc6b94tj.js → cli-fe8he9cy.js} +2 -2
  79. package/dist/{cli-s4pccby1.js → cli-h0edykd1.js} +1 -1
  80. package/dist/cli-h5cveb69.js +15 -0
  81. package/dist/{cli-gcyws2bp.js → cli-hamdfjtx.js} +2 -2
  82. package/dist/{cli-jwnac23b.js → cli-hh5m39pt.js} +1 -1
  83. package/dist/{cli-f9g96z28.js → cli-j8fmn3wv.js} +11 -11
  84. package/dist/cli-jngvszex.js +1514 -0
  85. package/dist/{cli-8vbxjzk0.js → cli-k791mabe.js} +6 -6
  86. package/dist/{cli-9fwznq4p.js → cli-k9m8fckz.js} +7 -7
  87. package/dist/{cli-39t9d248.js → cli-kz8rar0g.js} +1 -1
  88. package/dist/{cli-rzbsh6bw.js → cli-n15fhd43.js} +1 -1
  89. package/dist/{cli-wvbaq052.js → cli-nmdy8bzf.js} +10 -3
  90. package/dist/{cli-t9pzz2eq.js → cli-ntmjzyte.js} +4 -1
  91. package/dist/{cli-adzmmcvf.js → cli-ny8f5g7t.js} +2 -2
  92. package/dist/cli-p0g0erm9.js +15 -0
  93. package/dist/{cli-2zjxake1.js → cli-pgdqhdkw.js} +4 -4
  94. package/dist/cli-ph1jce1b.js +16 -0
  95. package/dist/{cli-v4z5v3jd.js → cli-phantfg3.js} +480 -328
  96. package/dist/{cli-2414h5r9.js → cli-rb1z91g8.js} +10221 -1397
  97. package/dist/{cli-a49frv85.js → cli-redtbppc.js} +1 -1
  98. package/dist/{cli-91amj3md.js → cli-s7bfz1ye.js} +15 -15
  99. package/dist/{cli-kg63yp1r.js → cli-sf5kp73f.js} +18 -18
  100. package/dist/{cli-fww016hh.js → cli-sq32dgfe.js} +1373 -7129
  101. package/dist/{cli-enavhq6r.js → cli-tbrjvrrg.js} +1 -1
  102. package/dist/{cli-84xn7bgz.js → cli-tdd9dvw6.js} +1 -1
  103. package/dist/{cli-qkbevqer.js → cli-tjrrabez.js} +3 -3
  104. package/dist/{cli-q457ga28.js → cli-tkrp183j.js} +11 -11
  105. package/dist/{cli-7w1fs01q.js → cli-trvtxwzt.js} +2 -2
  106. package/dist/{cli-ayxxkk3p.js → cli-v1rhq77v.js} +8 -8
  107. package/dist/{cli-9j47sgzy.js → cli-v3jxx8dv.js} +2 -2
  108. package/dist/{cli-f2rwt43y.js → cli-v84kb7af.js} +13 -13
  109. package/dist/{cli-3mhdmcd4.js → cli-vp2ksaq9.js} +1 -1
  110. package/dist/{cli-b0m3bg0f.js → cli-vrb8pvrf.js} +6 -6
  111. package/dist/cli-vxxdf2ma.js +15 -0
  112. package/dist/{cli-wd7b5hgc.js → cli-w81s97bn.js} +1 -1
  113. package/dist/{cli-bqfx72e6.js → cli-wkzrknpt.js} +1 -1
  114. package/dist/{cli-cg1q8ymp.js → cli-wqpvfq2m.js} +1 -1
  115. package/dist/{cli-pq0kv31y.js → cli-wsh5vfa7.js} +9 -9
  116. package/dist/{cli-shyhb4t5.js → cli-wtwe8vng.js} +39 -39
  117. package/dist/{cli-3wsabyt0.js → cli-ww8wxfzx.js} +2 -2
  118. package/dist/{cli-e8trbfx1.js → cli-x80zagf5.js} +1 -1
  119. package/dist/{cli-r495stwd.js → cli-xd6ntv7x.js} +2 -2
  120. package/dist/{cli-0h6m6z5g.js → cli-xmc2nrtv.js} +1 -1
  121. package/dist/{cli-q5n3deaf.js → cli-ytgtqsy9.js} +1 -1
  122. package/dist/{cli-srq69pn1.js → cli-yvnnyjxm.js} +1 -1
  123. package/dist/{cli-krk8y8c7.js → cli-z0c98h7h.js} +1747 -439
  124. package/dist/{cli-mw1tmn3x.js → cli-z0effej1.js} +7 -7
  125. package/dist/{cli-7g5qj2ca.js → cli-zcb64xzv.js} +1 -1
  126. package/dist/{cli-m0ea8ggd.js → cli-zdkcp8p0.js} +2 -2
  127. package/dist/{cli-37p61fcg.js → cli-zgsd2w2k.js} +20 -22
  128. package/dist/{cli-tc165vrb.js → cli-zmfs06hg.js} +7 -6
  129. package/dist/{cli-edxfzgah.js → cli-zvsy4abb.js} +4 -4
  130. package/dist/{cli-z8t4485r.js → cli-zyf288rw.js} +2 -2
  131. package/dist/cli.js +58 -59
  132. package/dist/{codex-adapter-eq61radw.js → codex-adapter-seht4h9t.js} +9 -9
  133. package/dist/{codex-hook-8nmepvz6.js → codex-hook-w5nmtrn2.js} +2 -2
  134. package/dist/{codex-login-vbd9707w.js → codex-login-67qarfcg.js} +1 -1
  135. package/dist/{codex-session-runner-rfx355h4.js → codex-session-runner-tq95x3gq.js} +10 -10
  136. package/dist/{commands-d1z0sx62.js → commands-0awwqxq5.js} +3 -3
  137. package/dist/{controller-9hz6d8x3.js → controller-hgjx521c.js} +4 -4
  138. package/dist/{controllers-connect-tz07d2xr.js → controllers-connect-j4kdmhfj.js} +28 -28
  139. package/dist/core-8fw1gwg7.js +41 -0
  140. package/dist/{cursor-adapter-ef22ze3j.js → cursor-adapter-0rg8wk6j.js} +2 -2
  141. package/dist/{db-gd81d68c.js → db-8xs2js3s.js} +3 -3
  142. package/dist/{db-vrckks6q.js → db-dd6hj211.js} +2 -2
  143. package/dist/{devin-adapter-kdt6a2bh.js → devin-adapter-tn1twrha.js} +1 -1
  144. package/dist/{devtools-qxfgbsqz.js → devtools-b8qts77k.js} +1 -1
  145. package/dist/{dispatcher-76as8w2t.js → dispatcher-v7drd034.js} +24 -24
  146. package/dist/{docker-51ta7jsh.js → docker-6007r2fj.js} +2 -2
  147. package/dist/{dsh-adapter-ypfvcdyz.js → dsh-adapter-ah8npj2x.js} +2 -2
  148. package/dist/{e2b-dm9r8hpy.js → e2b-hg80w0qr.js} +2 -2
  149. package/dist/{e2b-05kn3kpq.js → e2b-z1g7vpz6.js} +4 -4
  150. package/dist/{easter-egg-3d-sg21j15g.js → easter-egg-3d-8n4w3s9k.js} +1 -1
  151. package/dist/{embedding-space-zsdw37bb.js → embedding-space-0p921zt3.js} +5 -5
  152. package/dist/{embeddings-p4e3e1m6.js → embeddings-9s7kbrc6.js} +1 -1
  153. package/dist/emscripten-module-Q67P5WYC-3sde6cre.js +2458 -0
  154. package/dist/{event-bus-tvf2grf4.js → event-bus-pawddp92.js} +1 -1
  155. package/dist/{execute-nztd0af0.js → execute-x0fy9j0m.js} +1 -1
  156. package/dist/{external-channel-717yzn4d.js → external-channel-ktfvn29c.js} +2 -2
  157. package/dist/ffi-cbfmmtqk.js +85 -0
  158. package/dist/fx-adapter-15vjxvgm.js +20 -0
  159. package/dist/getMachineId-bsd-2rd3pnz7.js +36 -0
  160. package/dist/getMachineId-bsd-3p48mkt1.js +36 -0
  161. package/dist/{getMachineId-bsd-637a7rbk.js → getMachineId-bsd-bk6tmeen.js} +5 -5
  162. package/dist/getMachineId-bsd-pssqgwmm.js +37 -0
  163. package/dist/getMachineId-bsd-v218x3xd.js +36 -0
  164. package/dist/getMachineId-bsd-wbxcazef.js +36 -0
  165. package/dist/getMachineId-bsd-x0942pbz.js +36 -0
  166. package/dist/getMachineId-darwin-5qsy4qcg.js +36 -0
  167. package/dist/getMachineId-darwin-6v7zsshx.js +37 -0
  168. package/dist/getMachineId-darwin-fcc3fjag.js +36 -0
  169. package/dist/getMachineId-darwin-pg84hftj.js +36 -0
  170. package/dist/{getMachineId-darwin-9vytrcnn.js → getMachineId-darwin-tyyevt26.js} +5 -5
  171. package/dist/getMachineId-darwin-wagmbf0d.js +36 -0
  172. package/dist/getMachineId-darwin-zvkmwr3y.js +36 -0
  173. package/dist/{getMachineId-linux-mkzsvyyz.js → getMachineId-linux-2ncg1epd.js} +3 -3
  174. package/dist/getMachineId-linux-2tmt2ptc.js +29 -0
  175. package/dist/getMachineId-linux-empwyp2y.js +29 -0
  176. package/dist/getMachineId-linux-fanqd45b.js +29 -0
  177. package/dist/getMachineId-linux-h6fyga0x.js +29 -0
  178. package/dist/getMachineId-linux-tbhgz1k9.js +29 -0
  179. package/dist/getMachineId-linux-zrbyw7dt.js +29 -0
  180. package/dist/getMachineId-unsupported-29g9dkgv.js +19 -0
  181. package/dist/getMachineId-unsupported-8xfq8djv.js +19 -0
  182. package/dist/getMachineId-unsupported-8y9cag1p.js +19 -0
  183. package/dist/getMachineId-unsupported-a6sjrm02.js +19 -0
  184. package/dist/getMachineId-unsupported-bp3w7ds0.js +19 -0
  185. package/dist/{getMachineId-unsupported-4cfs2n11.js → getMachineId-unsupported-sj6fk8sw.js} +3 -3
  186. package/dist/getMachineId-unsupported-v0p5gdxp.js +19 -0
  187. package/dist/getMachineId-win-hc996p0x.js +38 -0
  188. package/dist/{getMachineId-win-154s3qma.js → getMachineId-win-msq9ad87.js} +6 -6
  189. package/dist/getMachineId-win-tajyqwd6.js +38 -0
  190. package/dist/getMachineId-win-tzc163da.js +38 -0
  191. package/dist/getMachineId-win-xdaa0mgq.js +38 -0
  192. package/dist/getMachineId-win-xk6p98m5.js +38 -0
  193. package/dist/getMachineId-win-xtk658fm.js +38 -0
  194. package/dist/{google-generative-ai-sw77egmr.js → google-generative-ai-nzndg246.js} +1 -1
  195. package/dist/{google-vertex-rrw93g8h.js → google-vertex-ragh3nnw.js} +1 -1
  196. package/dist/grok-adapter-77httan0.js +20 -0
  197. package/dist/handlers-c1jp5b6h.js +39 -0
  198. package/dist/heartbeat-5yaj6dym.js +49 -0
  199. package/dist/{hook-ctz0xmp3.js → hook-2jttae8s.js} +10 -11
  200. package/dist/hook-c99nycyh.js +21 -0
  201. package/dist/{http-zregegrx.js → http-7y9dbfrr.js} +155 -122
  202. package/dist/{index-kzdqn3dd.js → index-6g9rdcrj.js} +3036 -758
  203. package/dist/index-7dwh9kxh.js +41 -0
  204. package/dist/{index-ym9fgxad.js → index-8p03vx1h.js} +8 -8
  205. package/dist/{index-maddg9ys.js → index-cw8nxnba.js} +4330 -15375
  206. package/dist/{index-fdym6ryb.js → index-dm7c6hw5.js} +28 -28
  207. package/dist/index-fqf82sbk.js +10584 -0
  208. package/dist/{index-126v2d0t.js → index-g7rthzrv.js} +11 -2923
  209. package/dist/{index-x9qf8dg7.js → index-h9xnzfhx.js} +21 -20
  210. package/dist/{index-42jq9yy3.js → index-jvfp0j47.js} +516 -10
  211. package/dist/{index-mtnbhe12.js → index-q60mhcpd.js} +23631 -19921
  212. package/dist/{index-evay0xyk.js → index-qxcfv8vq.js} +1 -1
  213. package/dist/{index-rz8ve510.js → index-t274qhhs.js} +6 -6
  214. package/dist/{index-kdmkfjt7.js → index-t4n9z755.js} +3491 -2487
  215. package/dist/{index-7dgxveck.js → index-tcegcysh.js} +5 -5
  216. package/dist/{index-whysn1wf.js → index-tn1m3q9b.js} +3 -3
  217. package/dist/index-wp9tarbt.js +43 -0
  218. package/dist/{index-5kx15d19.js → index-xhp7yp3t.js} +1 -1
  219. package/dist/index-z6np2405.js +38 -0
  220. package/dist/{k8s-ejkk0aw7.js → k8s-mr1r12th.js} +2 -2
  221. package/dist/{keepalive-zdqay870.js → keepalive-7eyb8y4t.js} +4 -4
  222. package/dist/lead-50cgn8s1.js +81 -0
  223. package/dist/{maintenance-t5ndg11m.js → maintenance-tdrd8nwv.js} +1 -1
  224. package/dist/module-ES6BEMUI-6htewwha.js +1210 -0
  225. package/dist/{node-0as4n1ef.js → node-gbx1t3pa.js} +1 -1
  226. package/dist/{oauth-refresh-sweep-y9zyd7t6.js → oauth-refresh-sweep-f4c7g37h.js} +3 -3
  227. package/dist/{object-webhooks-mkca91s0.js → object-webhooks-p190rdxp.js} +7 -7
  228. package/dist/{onboard-ss995244.js → onboard-56h4sks6.js} +7 -7
  229. package/dist/{opencode-adapter-mwpz0278.js → opencode-adapter-xg3yxfr0.js} +8 -8
  230. package/dist/{otel-impl-6n6vva3x.js → otel-impl-kepzgm4n.js} +36360 -9179
  231. package/dist/{pending-2sxh1t6j.js → pending-xgv316w0.js} +25 -25
  232. package/dist/{pi-mono-adapter-sfb7zy43.js → pi-mono-adapter-txe0syzb.js} +19 -22
  233. package/dist/{pricing-refresh-h79bg4cf.js → pricing-refresh-041zpyhf.js} +2 -2
  234. package/dist/{rbac-roles-ckq0czp4.js → rbac-roles-8f3jbcaf.js} +2 -2
  235. package/dist/{rbac-roles-jg2e260w.js → rbac-roles-cw7rrw5b.js} +3 -3
  236. package/dist/{render-v2-ymbshmn0.js → render-v2-2ezw4mzt.js} +10 -10
  237. package/dist/{resume-jdhnt4jk.js → resume-p14wdx8m.js} +13 -13
  238. package/dist/{runtime-y28jhhnf.js → runtime-he7c9g1r.js} +1 -1
  239. package/dist/{session-access-k4ta5hvp.js → session-access-8jvq86fj.js} +5 -5
  240. package/dist/{session-source-backfill-528j4s8j.js → session-source-backfill-6fe3hcgb.js} +3 -3
  241. package/dist/{setup-d6pj82fr.js → setup-6v0bn4r1.js} +3 -3
  242. package/dist/thread-buffer-8860v1ta.js +40 -0
  243. package/dist/{token-util-pjgekqxr.js → token-util-hnzceyn9.js} +1 -1
  244. package/dist/{token-pgr2w4s3.js → token-xnc02n6w.js} +21 -14
  245. package/dist/{tree-visibility-kjxv3nxk.js → tree-visibility-g1a8ff4r.js} +2 -2
  246. package/dist/{user-merge-jobs-rabbncf6.js → user-merge-jobs-vjsps179.js} +3 -3
  247. package/dist/{virtual-modules-22k51txd.js → virtual-modules-mreda4fp.js} +3 -3
  248. package/dist/{work-objects-xtjbar3r.js → work-objects-hfw15e35.js} +26 -26
  249. package/dist/{worker-follow-up-fg48vk6d.js → worker-follow-up-gbaz2ydz.js} +24 -24
  250. package/dist/worker-hkm8ftqp.js +81 -0
  251. package/dist/{x-vfsqypht.js → x-k29vmskt.js} +2 -2
  252. package/openapi.json +57 -1
  253. package/package.json +39 -39
  254. package/src/be/db/model-profiles.ts +103 -12
  255. package/src/be/db/tasks/read.ts +5 -0
  256. package/src/be/db.ts +14 -4
  257. package/src/be/model-group-resolution.ts +134 -0
  258. package/src/be/model-tier-resolution.ts +120 -17
  259. package/src/be/model-validation.ts +9 -1
  260. package/src/be/runtime-pools/routing.ts +22 -8
  261. package/src/be/scripts/extract-schema.ts +7 -0
  262. package/src/be/swarm-config-guard.ts +17 -7
  263. package/src/commands/onboard/agent-fs-version.ts +1 -1
  264. package/src/extensions/contract-types.generated.ts +1 -1
  265. package/src/http/db-query.ts +8 -2
  266. package/src/http/operator-actor.ts +3 -8
  267. package/src/http/poll.ts +20 -1
  268. package/src/http/repos.ts +3 -1
  269. package/src/http/schedules.ts +23 -3
  270. package/src/http/tasks.ts +11 -1
  271. package/src/prompts/base-prompt.ts +10 -6
  272. package/src/prompts/session-templates.ts +3 -3
  273. package/src/providers/acp-targets.ts +1 -1
  274. package/src/providers/amp-adapter.ts +11 -9
  275. package/src/providers/cursor-adapter.ts +1 -1
  276. package/src/realtime/browser.generated.txt +1 -1
  277. package/src/scheduler/schedule-task.ts +1 -0
  278. package/src/scripts-runtime/types/swarm-extension.d.ts +2 -0
  279. package/src/slack/config.ts +4 -0
  280. package/src/slack/render-v2.ts +2 -1
  281. package/src/slack/responses.ts +2 -1
  282. package/src/tasks/follow-up-gate.ts +142 -38
  283. package/src/tasks/worker-follow-up.ts +126 -37
  284. package/src/tests/amp-adapter.test.ts +57 -9
  285. package/src/tests/base-prompt.test.ts +36 -2
  286. package/src/tests/db-retention-defaults.test.ts +28 -3
  287. package/src/tests/entrypoint-repo-autoclone-args.test.ts +10 -0
  288. package/src/tests/follow-up-gate-shadow.test.ts +268 -10
  289. package/src/tests/linear-outbound-sync.test.ts +59 -25
  290. package/src/tests/operator-actor-keyless.test.ts +103 -0
  291. package/src/tests/profile-tier-alias.test.ts +9 -3
  292. package/src/tests/runner-repo-clone-args.test.ts +15 -6
  293. package/src/tests/workflow-system-one-extraction.test.ts +21 -0
  294. package/src/tests/workflow-wait-filter.test.ts +7 -7
  295. package/src/tests/worktree-reaper.test.ts +15 -4
  296. package/src/tools/schedules/create-schedule.ts +20 -3
  297. package/src/tools/schedules/patch-schedule.ts +30 -4
  298. package/src/tools/schedules/update-schedule.ts +30 -4
  299. package/src/tools/send-task.ts +17 -3
  300. package/src/tools/slack-post.ts +7 -2
  301. package/src/tools/slack-reply.ts +6 -2
  302. package/src/tools/task-action.ts +16 -3
  303. package/src/tools/utils.ts +1 -1
  304. package/src/types.ts +10 -0
  305. package/src/utils/amp-models.ts +20 -4
  306. package/src/utils/secret-scrubber.ts +6 -4
  307. package/src/workflows/engine.ts +36 -8
  308. package/src/workflows/executors/agent-task.ts +13 -2
  309. package/src/workflows/executors/code-match.ts +11 -31
  310. package/src/workflows/executors/script.ts +13 -0
  311. package/src/workflows/executors/system-one-extraction.ts +9 -6
  312. package/src/workflows/executors/wait.ts +1 -1
  313. package/src/workflows/foreach-driver.ts +5 -1
  314. package/src/workflows/model-validation.ts +13 -1
  315. package/src/workflows/predicate-sandbox.ts +171 -0
  316. package/src/workflows/retry-poller.ts +1 -1
  317. package/src/workflows/wait-filter.ts +14 -192
  318. package/templates/skills/heartbeat-runbook/content.md +1 -0
  319. package/templates/skills/slack-interaction/content.md +4 -0
  320. package/templates/skills/swarm-docs/content.md +1 -0
  321. package/dist/acp-adapter-99n6z9ky.js +0 -17
  322. package/dist/cli-5ss6qqt9.js +0 -45
  323. package/dist/cli-dzzh58sy.js +0 -6996
  324. package/dist/cli-j9ccfveb.js +0 -1849
  325. package/dist/cli-mna6pmfx.js +0 -1485
  326. package/dist/cli-r8ddn0hf.js +0 -25583
  327. package/dist/core-dynsv289.js +0 -41
  328. package/dist/fx-adapter-9k0hptnz.js +0 -20
  329. package/dist/grok-adapter-skdj2pce.js +0 -20
  330. package/dist/handlers-5btjqkz6.js +0 -39
  331. package/dist/heartbeat-vfb1gy84.js +0 -49
  332. package/dist/hook-eh52p7yd.js +0 -22
  333. package/dist/index-7w8p6em0.js +0 -41
  334. package/dist/index-t56y945n.js +0 -4
  335. package/dist/index-vfemrwwk.js +0 -10002
  336. package/dist/index-vz4semsx.js +0 -38
  337. package/dist/index-y3s0xp2v.js +0 -43
  338. package/dist/lead-6cscw8a5.js +0 -82
  339. package/dist/thread-buffer-9w6x5zec.js +0 -40
  340. package/dist/worker-g4aj93dt.js +0 -82
  341. package/dist/{azure-openai-responses-jeaas6x0.js → azure-openai-responses-e76k86gf.js} +4 -4
  342. package/dist/{openai-codex-responses-70g39cgz.js → openai-codex-responses-z2h941b8.js} +4 -4
  343. package/dist/{openai-completions-cv3hp4h5.js → openai-completions-5bxdkeg9.js} +4 -4
  344. package/dist/{openai-responses-trsvnks6.js → openai-responses-dzf3e8r5.js} +4 -4
@@ -54,7 +54,7 @@ import {
54
54
  getWorkflowVersions2,
55
55
  getMcpServerById2,
56
56
  init_db4
57
- } from "./cli-krk8y8c7.js";
57
+ } from "./cli-z0c98h7h.js";
58
58
  import {
59
59
  McpHttpClient,
60
60
  init_http_client
@@ -69,17 +69,17 @@ import {
69
69
  oauthAppRowToProviderConfig,
70
70
  ensureAuthorizationTokenOrThrow,
71
71
  init_ensure_token
72
- } from "./cli-m0ea8ggd.js";
72
+ } from "./cli-zdkcp8p0.js";
73
73
  import {
74
74
  AGENT_FS_API_KEY_CONFIG,
75
75
  init_script_fs,
76
76
  resolveAgentFsIdentity,
77
77
  init_agent_fs_identity
78
- } from "./cli-6ajyhxh7.js";
78
+ } from "./cli-3bcsc3m7.js";
79
79
  import {
80
80
  validateDefinition,
81
81
  init_definition2
82
- } from "./cli-jcnc5ret.js";
82
+ } from "./cli-976m0zcw.js";
83
83
  import {
84
84
  getApiKey,
85
85
  init_api_key
@@ -90,13 +90,13 @@ import {
90
90
  mintScriptRunToken,
91
91
  revokeSessionToken,
92
92
  init_users
93
- } from "./cli-adzmmcvf.js";
93
+ } from "./cli-ny8f5g7t.js";
94
94
  import {
95
95
  defaultAssetKey,
96
96
  init_key,
97
97
  AppIconSchema,
98
98
  init_types5
99
- } from "./cli-tc165vrb.js";
99
+ } from "./cli-zmfs06hg.js";
100
100
  import {
101
101
  init_zod
102
102
  } from "./cli-96234j5w.js";
@@ -130,7 +130,7 @@ import {
130
130
  refreshSecretScrubberCache,
131
131
  registerVolatileSecret,
132
132
  init_secret_scrubber
133
- } from "./cli-r9d2tya0.js";
133
+ } from "./cli-7qkbab03.js";
134
134
  import {
135
135
  __toESM,
136
136
  __commonJS,
@@ -163,6 +163,9 @@ var require_CronField = __commonJS(function(exports) {
163
163
  static get chars() {
164
164
  return Object.freeze([]);
165
165
  }
166
+ static isValidChar(value) {
167
+ return this.chars.includes(value);
168
+ }
166
169
  static get validChars() {
167
170
  return /^[?,*\dH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/;
168
171
  }
@@ -180,7 +183,7 @@ var require_CronField = __commonJS(function(exports) {
180
183
  ...options,
181
184
  rawValue: options.rawValue ?? ""
182
185
  };
183
- this.#values = values.sort(CronField.sorter);
186
+ this.#values = [...values].sort(CronField.sorter);
184
187
  this.#wildcard = this.options.wildcard !== undefined ? this.options.wildcard : this.#isWildcardValue();
185
188
  this.#hasLastChar = this.options.rawValue.includes("L") || values.includes("L");
186
189
  this.#hasQuestionMarkChar = this.options.rawValue.includes("?") || values.includes("?");
@@ -215,6 +218,23 @@ var require_CronField = __commonJS(function(exports) {
215
218
  return a.localeCompare(b);
216
219
  return aIsNumber ? -1 : 1;
217
220
  }
221
+ static findNearestValueInList(values, currentValue, reverse) {
222
+ if (reverse) {
223
+ for (let i = values.length - 1;i >= 0; i--) {
224
+ if (values[i] < currentValue)
225
+ return values[i];
226
+ }
227
+ return null;
228
+ }
229
+ for (let i = 0;i < values.length; i++) {
230
+ if (values[i] > currentValue)
231
+ return values[i];
232
+ }
233
+ return null;
234
+ }
235
+ findNearestValue(currentValue, reverse) {
236
+ return this.constructor.findNearestValueInList(this.values, currentValue, reverse);
237
+ }
218
238
  serialize() {
219
239
  return {
220
240
  wildcard: this.#wildcard,
@@ -224,17 +244,17 @@ var require_CronField = __commonJS(function(exports) {
224
244
  validate() {
225
245
  let badValue;
226
246
  const charsString = this.chars.length > 0 ? ` or chars ${this.chars.join("")}` : "";
227
- const charTest = (value) => (char) => new RegExp(`^\\d{0,2}${char}$`).test(value);
247
+ const field = this.constructor;
228
248
  const rangeTest = (value) => {
229
249
  badValue = value;
230
- return typeof value === "number" ? value >= this.min && value <= this.max : this.chars.some(charTest(value));
250
+ return typeof value === "number" ? value >= this.min && value <= this.max : field.isValidChar(value);
231
251
  };
232
252
  const isValidRange = this.#values.every(rangeTest);
233
253
  if (!isValidRange) {
234
254
  throw new Error(`${this.constructor.name} Validation error, got value ${badValue} expected range ${this.min}-${this.max}${charsString}`);
235
255
  }
236
256
  const duplicate = this.#values.find((value, index) => this.#values.indexOf(value) !== index);
237
- if (duplicate) {
257
+ if (duplicate !== undefined) {
238
258
  throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${duplicate}`);
239
259
  }
240
260
  }
@@ -248,135 +268,6 @@ var require_CronField = __commonJS(function(exports) {
248
268
  exports.CronField = CronField;
249
269
  });
250
270
 
251
- // node_modules/cron-parser/dist/fields/CronDayOfMonth.js
252
- var require_CronDayOfMonth = __commonJS(function(exports) {
253
- Object.defineProperty(exports, "__esModule", { value: true });
254
- exports.CronDayOfMonth = undefined;
255
- var CronField_1 = require_CronField();
256
- var MIN_DAY = 1;
257
- var MAX_DAY = 31;
258
- var DAY_CHARS = Object.freeze(["L"]);
259
-
260
- class CronDayOfMonth extends CronField_1.CronField {
261
- static get min() {
262
- return MIN_DAY;
263
- }
264
- static get max() {
265
- return MAX_DAY;
266
- }
267
- static get chars() {
268
- return DAY_CHARS;
269
- }
270
- static get validChars() {
271
- return /^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/;
272
- }
273
- constructor(values, options) {
274
- super(values, options);
275
- this.validate();
276
- }
277
- get values() {
278
- return super.values;
279
- }
280
- }
281
- exports.CronDayOfMonth = CronDayOfMonth;
282
- });
283
-
284
- // node_modules/cron-parser/dist/fields/CronDayOfWeek.js
285
- var require_CronDayOfWeek = __commonJS(function(exports) {
286
- Object.defineProperty(exports, "__esModule", { value: true });
287
- exports.CronDayOfWeek = undefined;
288
- var CronField_1 = require_CronField();
289
- var MIN_DAY = 0;
290
- var MAX_DAY = 7;
291
- var DAY_CHARS = Object.freeze(["L"]);
292
-
293
- class CronDayOfWeek extends CronField_1.CronField {
294
- static get min() {
295
- return MIN_DAY;
296
- }
297
- static get max() {
298
- return MAX_DAY;
299
- }
300
- static get chars() {
301
- return DAY_CHARS;
302
- }
303
- static get validChars() {
304
- return /^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/;
305
- }
306
- constructor(values, options) {
307
- super(values, options);
308
- this.validate();
309
- }
310
- get values() {
311
- return super.values;
312
- }
313
- get nthDay() {
314
- return this.options.nthDayOfWeek ?? 0;
315
- }
316
- }
317
- exports.CronDayOfWeek = CronDayOfWeek;
318
- });
319
-
320
- // node_modules/cron-parser/dist/fields/CronHour.js
321
- var require_CronHour = __commonJS(function(exports) {
322
- Object.defineProperty(exports, "__esModule", { value: true });
323
- exports.CronHour = undefined;
324
- var CronField_1 = require_CronField();
325
- var MIN_HOUR = 0;
326
- var MAX_HOUR = 23;
327
- var HOUR_CHARS = Object.freeze([]);
328
-
329
- class CronHour extends CronField_1.CronField {
330
- static get min() {
331
- return MIN_HOUR;
332
- }
333
- static get max() {
334
- return MAX_HOUR;
335
- }
336
- static get chars() {
337
- return HOUR_CHARS;
338
- }
339
- constructor(values, options) {
340
- super(values, options);
341
- this.validate();
342
- }
343
- get values() {
344
- return super.values;
345
- }
346
- }
347
- exports.CronHour = CronHour;
348
- });
349
-
350
- // node_modules/cron-parser/dist/fields/CronMinute.js
351
- var require_CronMinute = __commonJS(function(exports) {
352
- Object.defineProperty(exports, "__esModule", { value: true });
353
- exports.CronMinute = undefined;
354
- var CronField_1 = require_CronField();
355
- var MIN_MINUTE = 0;
356
- var MAX_MINUTE = 59;
357
- var MINUTE_CHARS = Object.freeze([]);
358
-
359
- class CronMinute extends CronField_1.CronField {
360
- static get min() {
361
- return MIN_MINUTE;
362
- }
363
- static get max() {
364
- return MAX_MINUTE;
365
- }
366
- static get chars() {
367
- return MINUTE_CHARS;
368
- }
369
- constructor(values, options) {
370
- super(values, options);
371
- this.validate();
372
- }
373
- get values() {
374
- return super.values;
375
- }
376
- }
377
- exports.CronMinute = CronMinute;
378
- });
379
-
380
271
  // node_modules/luxon/build/node/luxon.js
381
272
  var require_luxon = __commonJS(function(exports) {
382
273
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -5269,32 +5160,16 @@ var require_CronDate = __commonJS(function(exports) {
5269
5160
  class CronDate {
5270
5161
  #date;
5271
5162
  #dstStart = null;
5163
+ #dstStartLandingHour = null;
5272
5164
  #dstEnd = null;
5273
- #verbMap = {
5274
- add: {
5275
- [TimeUnit.Year]: this.addYear.bind(this),
5276
- [TimeUnit.Month]: this.addMonth.bind(this),
5277
- [TimeUnit.Day]: this.addDay.bind(this),
5278
- [TimeUnit.Hour]: this.addHour.bind(this),
5279
- [TimeUnit.Minute]: this.addMinute.bind(this),
5280
- [TimeUnit.Second]: this.addSecond.bind(this)
5281
- },
5282
- subtract: {
5283
- [TimeUnit.Year]: this.subtractYear.bind(this),
5284
- [TimeUnit.Month]: this.subtractMonth.bind(this),
5285
- [TimeUnit.Day]: this.subtractDay.bind(this),
5286
- [TimeUnit.Hour]: this.subtractHour.bind(this),
5287
- [TimeUnit.Minute]: this.subtractMinute.bind(this),
5288
- [TimeUnit.Second]: this.subtractSecond.bind(this)
5289
- }
5290
- };
5291
5165
  constructor(timestamp, tz) {
5292
5166
  const dateOpts = { zone: tz };
5293
- if (!timestamp) {
5167
+ if (!timestamp && timestamp !== 0) {
5294
5168
  this.#date = luxon_1.DateTime.local();
5295
5169
  } else if (timestamp instanceof CronDate) {
5296
5170
  this.#date = timestamp.#date;
5297
5171
  this.#dstStart = timestamp.#dstStart;
5172
+ this.#dstStartLandingHour = timestamp.#dstStartLandingHour;
5298
5173
  this.#dstEnd = timestamp.#dstEnd;
5299
5174
  } else if (timestamp instanceof Date) {
5300
5175
  this.#date = luxon_1.DateTime.fromJSDate(timestamp, dateOpts);
@@ -5305,6 +5180,7 @@ var require_CronDate = __commonJS(function(exports) {
5305
5180
  this.#date.isValid || (this.#date = luxon_1.DateTime.fromRFC2822(timestamp, dateOpts));
5306
5181
  this.#date.isValid || (this.#date = luxon_1.DateTime.fromSQL(timestamp, dateOpts));
5307
5182
  this.#date.isValid || (this.#date = luxon_1.DateTime.fromFormat(timestamp, "EEE, d MMM yyyy HH:mm:ss", dateOpts));
5183
+ this.#date.isValid || (this.#date = luxon_1.DateTime.fromHTTP(timestamp, dateOpts));
5308
5184
  }
5309
5185
  if (!this.#date.isValid) {
5310
5186
  throw new Error(`CronDate: unhandled timestamp: ${timestamp}`);
@@ -5319,8 +5195,12 @@ var require_CronDate = __commonJS(function(exports) {
5319
5195
  get dstStart() {
5320
5196
  return this.#dstStart;
5321
5197
  }
5322
- set dstStart(value) {
5323
- this.#dstStart = value;
5198
+ get dstStartLandingHour() {
5199
+ return this.#dstStartLandingHour;
5200
+ }
5201
+ clearDstStart() {
5202
+ this.#dstStart = null;
5203
+ this.#dstStartLandingHour = null;
5324
5204
  }
5325
5205
  get dstEnd() {
5326
5206
  return this.#dstEnd;
@@ -5365,10 +5245,36 @@ var require_CronDate = __commonJS(function(exports) {
5365
5245
  this.#date = this.#date.minus({ seconds: 1 });
5366
5246
  }
5367
5247
  addUnit(unit) {
5368
- this.#verbMap.add[unit]();
5248
+ switch (unit) {
5249
+ case TimeUnit.Year:
5250
+ return this.addYear();
5251
+ case TimeUnit.Month:
5252
+ return this.addMonth();
5253
+ case TimeUnit.Day:
5254
+ return this.addDay();
5255
+ case TimeUnit.Hour:
5256
+ return this.addHour();
5257
+ case TimeUnit.Minute:
5258
+ return this.addMinute();
5259
+ case TimeUnit.Second:
5260
+ return this.addSecond();
5261
+ }
5369
5262
  }
5370
5263
  subtractUnit(unit) {
5371
- this.#verbMap.subtract[unit]();
5264
+ switch (unit) {
5265
+ case TimeUnit.Year:
5266
+ return this.subtractYear();
5267
+ case TimeUnit.Month:
5268
+ return this.subtractMonth();
5269
+ case TimeUnit.Day:
5270
+ return this.subtractDay();
5271
+ case TimeUnit.Hour:
5272
+ return this.subtractHour();
5273
+ case TimeUnit.Minute:
5274
+ return this.subtractMinute();
5275
+ case TimeUnit.Second:
5276
+ return this.subtractSecond();
5277
+ }
5372
5278
  }
5373
5279
  invokeDateOperation(verb, unit) {
5374
5280
  if (verb === DateMathOp.Add) {
@@ -5406,6 +5312,15 @@ var require_CronDate = __commonJS(function(exports) {
5406
5312
  getMilliseconds() {
5407
5313
  return this.#date.millisecond;
5408
5314
  }
5315
+ getUTCOffset() {
5316
+ return this.#date.offset;
5317
+ }
5318
+ setStartOfDay() {
5319
+ this.#date = this.#date.startOf("day");
5320
+ }
5321
+ setEndOfDay() {
5322
+ this.#date = this.#date.endOf("day");
5323
+ }
5409
5324
  getTime() {
5410
5325
  return this.#date.valueOf();
5411
5326
  }
@@ -5437,29 +5352,34 @@ var require_CronDate = __commonJS(function(exports) {
5437
5352
  toJSON() {
5438
5353
  return this.#date.toJSON();
5439
5354
  }
5355
+ #set(unit, value) {
5356
+ if (this.#date[unit] !== value) {
5357
+ this.#date = this.#date.set({ [unit]: value });
5358
+ }
5359
+ }
5440
5360
  setDate(d) {
5441
- this.#date = this.#date.set({ day: d });
5361
+ this.#set("day", d);
5442
5362
  }
5443
5363
  setFullYear(y) {
5444
- this.#date = this.#date.set({ year: y });
5364
+ this.#set("year", y);
5445
5365
  }
5446
5366
  setDay(d) {
5447
- this.#date = this.#date.set({ weekday: d });
5367
+ this.#set("weekday", d);
5448
5368
  }
5449
5369
  setMonth(m) {
5450
- this.#date = this.#date.set({ month: m + 1 });
5370
+ this.#set("month", m + 1);
5451
5371
  }
5452
5372
  setHours(h) {
5453
- this.#date = this.#date.set({ hour: h });
5373
+ this.#set("hour", h);
5454
5374
  }
5455
5375
  setMinutes(m) {
5456
- this.#date = this.#date.set({ minute: m });
5376
+ this.#set("minute", m);
5457
5377
  }
5458
5378
  setSeconds(s) {
5459
- this.#date = this.#date.set({ second: s });
5379
+ this.#set("second", s);
5460
5380
  }
5461
5381
  setMilliseconds(s) {
5462
- this.#date = this.#date.set({ millisecond: s });
5382
+ this.#set("millisecond", s);
5463
5383
  }
5464
5384
  toString() {
5465
5385
  return this.toDate().toString();
@@ -5488,17 +5408,24 @@ var require_CronDate = __commonJS(function(exports) {
5488
5408
  applyDateOperation(op, unit, hoursLength) {
5489
5409
  if (unit === TimeUnit.Month || unit === TimeUnit.Day) {
5490
5410
  this.invokeDateOperation(op, unit);
5411
+ this.clearDstStart();
5412
+ if (op === DateMathOp.Add && hoursLength !== 24 && this.getHours() > 0) {
5413
+ this.#dstStart = 0;
5414
+ this.#dstStartLandingHour = this.getHours();
5415
+ }
5491
5416
  return;
5492
5417
  }
5493
5418
  const previousHour = this.getHours();
5419
+ const previousOffset = this.getUTCOffset();
5494
5420
  this.invokeDateOperation(op, unit);
5495
5421
  const currentHour = this.getHours();
5496
- const diff = currentHour - previousHour;
5497
- if (diff === 2) {
5422
+ const advance = (currentHour - previousHour + 24) % 24;
5423
+ if (op === DateMathOp.Add && this.getUTCOffset() > previousOffset && advance >= 2) {
5498
5424
  if (hoursLength !== 24) {
5499
- this.dstStart = currentHour;
5425
+ this.#dstStart = (previousHour + 1) % 24;
5426
+ this.#dstStartLandingHour = currentHour;
5500
5427
  }
5501
- } else if (diff === 0 && this.getMinutes() === 0 && this.getSeconds() === 0) {
5428
+ } else if (advance === 0 && this.getMinutes() === 0 && this.getSeconds() === 0) {
5502
5429
  if (hoursLength !== 24) {
5503
5430
  this.dstEnd = currentHour;
5504
5431
  }
@@ -5546,6 +5473,150 @@ var require_CronMonth = __commonJS(function(exports) {
5546
5473
  exports.CronMonth = CronMonth;
5547
5474
  });
5548
5475
 
5476
+ // node_modules/cron-parser/dist/fields/CronDayOfMonth.js
5477
+ var require_CronDayOfMonth = __commonJS(function(exports) {
5478
+ Object.defineProperty(exports, "__esModule", { value: true });
5479
+ exports.CronDayOfMonth = undefined;
5480
+ var CronField_1 = require_CronField();
5481
+ var CronMonth_1 = require_CronMonth();
5482
+ var MIN_DAY = 1;
5483
+ var MAX_DAY = 31;
5484
+ var DAY_CHARS = Object.freeze(["L"]);
5485
+
5486
+ class CronDayOfMonth extends CronField_1.CronField {
5487
+ static fromMonth(month, values, options) {
5488
+ if (month.length !== 1) {
5489
+ return new CronDayOfMonth(values, options);
5490
+ }
5491
+ const daysInMonth = CronMonth_1.CronMonth.daysInMonth[month[0] - 1];
5492
+ const days = values.filter((value) => typeof value !== "number" || value <= daysInMonth);
5493
+ return new CronDayOfMonth(days.length > 0 ? days : values, options);
5494
+ }
5495
+ static get min() {
5496
+ return MIN_DAY;
5497
+ }
5498
+ static get max() {
5499
+ return MAX_DAY;
5500
+ }
5501
+ static get chars() {
5502
+ return DAY_CHARS;
5503
+ }
5504
+ static get validChars() {
5505
+ return /^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/;
5506
+ }
5507
+ constructor(values, options) {
5508
+ super(values, options);
5509
+ this.validate();
5510
+ }
5511
+ get values() {
5512
+ return super.values;
5513
+ }
5514
+ }
5515
+ exports.CronDayOfMonth = CronDayOfMonth;
5516
+ });
5517
+
5518
+ // node_modules/cron-parser/dist/fields/CronDayOfWeek.js
5519
+ var require_CronDayOfWeek = __commonJS(function(exports) {
5520
+ Object.defineProperty(exports, "__esModule", { value: true });
5521
+ exports.CronDayOfWeek = undefined;
5522
+ var CronField_1 = require_CronField();
5523
+ var MIN_DAY = 0;
5524
+ var MAX_DAY = 7;
5525
+ var DAY_CHARS = Object.freeze(["L"]);
5526
+
5527
+ class CronDayOfWeek extends CronField_1.CronField {
5528
+ static get min() {
5529
+ return MIN_DAY;
5530
+ }
5531
+ static get max() {
5532
+ return MAX_DAY;
5533
+ }
5534
+ static get chars() {
5535
+ return DAY_CHARS;
5536
+ }
5537
+ static isValidChar(value) {
5538
+ return /^[0-7]?L$/.test(value);
5539
+ }
5540
+ static get validChars() {
5541
+ return /^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/;
5542
+ }
5543
+ constructor(values, options) {
5544
+ super(values, options);
5545
+ this.validate();
5546
+ if (this.values.some((value) => value === "L")) {
5547
+ throw new Error(`${this.constructor.name} Validation error, unexpected standalone L`);
5548
+ }
5549
+ }
5550
+ get values() {
5551
+ return super.values;
5552
+ }
5553
+ get nthDay() {
5554
+ return this.options.nthDayOfWeek ?? 0;
5555
+ }
5556
+ }
5557
+ exports.CronDayOfWeek = CronDayOfWeek;
5558
+ });
5559
+
5560
+ // node_modules/cron-parser/dist/fields/CronHour.js
5561
+ var require_CronHour = __commonJS(function(exports) {
5562
+ Object.defineProperty(exports, "__esModule", { value: true });
5563
+ exports.CronHour = undefined;
5564
+ var CronField_1 = require_CronField();
5565
+ var MIN_HOUR = 0;
5566
+ var MAX_HOUR = 23;
5567
+ var HOUR_CHARS = Object.freeze([]);
5568
+
5569
+ class CronHour extends CronField_1.CronField {
5570
+ static get min() {
5571
+ return MIN_HOUR;
5572
+ }
5573
+ static get max() {
5574
+ return MAX_HOUR;
5575
+ }
5576
+ static get chars() {
5577
+ return HOUR_CHARS;
5578
+ }
5579
+ constructor(values, options) {
5580
+ super(values, options);
5581
+ this.validate();
5582
+ }
5583
+ get values() {
5584
+ return super.values;
5585
+ }
5586
+ }
5587
+ exports.CronHour = CronHour;
5588
+ });
5589
+
5590
+ // node_modules/cron-parser/dist/fields/CronMinute.js
5591
+ var require_CronMinute = __commonJS(function(exports) {
5592
+ Object.defineProperty(exports, "__esModule", { value: true });
5593
+ exports.CronMinute = undefined;
5594
+ var CronField_1 = require_CronField();
5595
+ var MIN_MINUTE = 0;
5596
+ var MAX_MINUTE = 59;
5597
+ var MINUTE_CHARS = Object.freeze([]);
5598
+
5599
+ class CronMinute extends CronField_1.CronField {
5600
+ static get min() {
5601
+ return MIN_MINUTE;
5602
+ }
5603
+ static get max() {
5604
+ return MAX_MINUTE;
5605
+ }
5606
+ static get chars() {
5607
+ return MINUTE_CHARS;
5608
+ }
5609
+ constructor(values, options) {
5610
+ super(values, options);
5611
+ this.validate();
5612
+ }
5613
+ get values() {
5614
+ return super.values;
5615
+ }
5616
+ }
5617
+ exports.CronMinute = CronMinute;
5618
+ });
5619
+
5549
5620
  // node_modules/cron-parser/dist/fields/CronSecond.js
5550
5621
  var require_CronSecond = __commonJS(function(exports) {
5551
5622
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -5660,8 +5731,9 @@ var require_CronFieldCollection = __commonJS(function(exports) {
5660
5731
  if (!dayOfWeek) {
5661
5732
  throw new Error("Validation error, Field dayOfWeek is missing");
5662
5733
  }
5663
- if (month.values.length === 1 && !dayOfMonth.hasLastChar) {
5664
- if (!(parseInt(dayOfMonth.values[0], 10) <= fields_1.CronMonth.daysInMonth[month.values[0] - 1])) {
5734
+ if (!dayOfMonth.hasLastChar && dayOfWeek.isWildcard) {
5735
+ const longestMonth = Math.max(...month.values.map((value) => fields_1.CronMonth.daysInMonth[value - 1]));
5736
+ if (!(parseInt(dayOfMonth.values[0], 10) <= longestMonth)) {
5665
5737
  throw new Error("Invalid explicit day of month definition");
5666
5738
  }
5667
5739
  }
@@ -5747,6 +5819,10 @@ var require_CronFieldCollection = __commonJS(function(exports) {
5747
5819
  return null;
5748
5820
  }
5749
5821
  if (step === 1 && range.start === field.min && range.end && range.end >= max) {
5822
+ const isDayField = field instanceof fields_1.CronDayOfMonth || field instanceof fields_1.CronDayOfWeek;
5823
+ if (isDayField && !field.isWildcard) {
5824
+ return null;
5825
+ }
5750
5826
  return field.hasQuestionMarkChar ? "?" : "*";
5751
5827
  }
5752
5828
  if (step !== 1 && range.start === field.min && range.end && range.end >= max - step + 1) {
@@ -5754,7 +5830,7 @@ var require_CronFieldCollection = __commonJS(function(exports) {
5754
5830
  }
5755
5831
  return null;
5756
5832
  }
5757
- static #handleMultipleRanges(range, max) {
5833
+ static #handleMultipleRanges(range) {
5758
5834
  const step = range.step;
5759
5835
  if (step === 1) {
5760
5836
  return `${range.start}-${range.end}`;
@@ -5779,7 +5855,7 @@ var require_CronFieldCollection = __commonJS(function(exports) {
5779
5855
  const seed = { length: range.end - range.start + 1 };
5780
5856
  return Array.from(seed, mapFn).filter((value) => value !== null).join(",");
5781
5857
  }
5782
- return range.end === max - step + 1 ? `${range.start}/${step}` : `${range.start}-${range.end}/${step}`;
5858
+ return `${range.start}-${range.end}/${step}`;
5783
5859
  }
5784
5860
  stringifyField(field) {
5785
5861
  let max = field.max;
@@ -5800,7 +5876,7 @@ var require_CronFieldCollection = __commonJS(function(exports) {
5800
5876
  }
5801
5877
  }
5802
5878
  return ranges.map((range) => {
5803
- const value = range.count === 1 ? range.start.toString() : CronFieldCollection.#handleMultipleRanges(range, max);
5879
+ const value = range.count === 1 ? range.start.toString() : CronFieldCollection.#handleMultipleRanges(range);
5804
5880
  if (field instanceof fields_1.CronDayOfWeek && field.nthDay > 0) {
5805
5881
  return `${value}#${field.nthDay}`;
5806
5882
  }
@@ -5841,17 +5917,20 @@ var require_CronExpression = __commonJS(function(exports) {
5841
5917
  class CronExpression {
5842
5918
  #options;
5843
5919
  #tz;
5920
+ #initialDate;
5844
5921
  #currentDate;
5845
5922
  #startDate;
5846
5923
  #endDate;
5847
5924
  #fields;
5925
+ #dstTransitionDayKey = null;
5926
+ #isDstTransitionDay = false;
5848
5927
  constructor(fields, options) {
5849
5928
  this.#options = options;
5850
5929
  this.#tz = options.tz;
5851
- this.#startDate = options.startDate ? new CronDate_1.CronDate(options.startDate, this.#tz) : null;
5852
- this.#endDate = options.endDate ? new CronDate_1.CronDate(options.endDate, this.#tz) : null;
5930
+ this.#startDate = options.startDate != null ? new CronDate_1.CronDate(options.startDate, this.#tz) : null;
5931
+ this.#endDate = options.endDate != null ? new CronDate_1.CronDate(options.endDate, this.#tz) : null;
5853
5932
  let currentDateValue = options.currentDate ?? options.startDate;
5854
- if (currentDateValue) {
5933
+ if (currentDateValue != null) {
5855
5934
  const tempCurrentDate = new CronDate_1.CronDate(currentDateValue, this.#tz);
5856
5935
  if (this.#startDate && tempCurrentDate.getTime() < this.#startDate.getTime()) {
5857
5936
  currentDateValue = this.#startDate;
@@ -5859,7 +5938,8 @@ var require_CronExpression = __commonJS(function(exports) {
5859
5938
  currentDateValue = this.#endDate;
5860
5939
  }
5861
5940
  }
5862
- this.#currentDate = new CronDate_1.CronDate(currentDateValue, this.#tz);
5941
+ this.#initialDate = new CronDate_1.CronDate(currentDateValue, this.#tz);
5942
+ this.#currentDate = this.#initialDate;
5863
5943
  this.#fields = fields;
5864
5944
  }
5865
5945
  get fields() {
@@ -5871,15 +5951,56 @@ var require_CronExpression = __commonJS(function(exports) {
5871
5951
  static #matchSchedule(value, sequence) {
5872
5952
  return sequence.some((element) => element === value);
5873
5953
  }
5954
+ #getMinOrMax(values, reverse) {
5955
+ return values[reverse ? values.length - 1 : 0];
5956
+ }
5957
+ #checkDstTransition(currentDate) {
5958
+ const key = `${currentDate.getFullYear()}-${currentDate.getMonth() + 1}-${currentDate.getDate()}`;
5959
+ if (this.#dstTransitionDayKey === key) {
5960
+ return this.#isDstTransitionDay;
5961
+ }
5962
+ const startOfDay = new CronDate_1.CronDate(currentDate);
5963
+ startOfDay.setStartOfDay();
5964
+ const endOfDay = new CronDate_1.CronDate(currentDate);
5965
+ endOfDay.setEndOfDay();
5966
+ this.#dstTransitionDayKey = key;
5967
+ this.#isDstTransitionDay = startOfDay.getUTCOffset() !== endOfDay.getUTCOffset();
5968
+ return this.#isDstTransitionDay;
5969
+ }
5970
+ #moveToNextSecond(currentDate, dateMathVerb, reverse) {
5971
+ const seconds = this.#fields.second.values;
5972
+ const currentSecond = currentDate.getSeconds();
5973
+ const nextSecond = this.#fields.second.findNearestValue(currentSecond, reverse);
5974
+ if (nextSecond !== null) {
5975
+ currentDate.setSeconds(nextSecond);
5976
+ return;
5977
+ }
5978
+ currentDate.applyDateOperation(dateMathVerb, CronDate_1.TimeUnit.Minute, this.#fields.hour.values.length);
5979
+ currentDate.setSeconds(this.#getMinOrMax(seconds, reverse));
5980
+ }
5981
+ #moveToNextMinute(currentDate, dateMathVerb, reverse) {
5982
+ const minutes = this.#fields.minute.values;
5983
+ const seconds = this.#fields.second.values;
5984
+ const currentMinute = currentDate.getMinutes();
5985
+ const nextMinute = this.#fields.minute.findNearestValue(currentMinute, reverse);
5986
+ if (nextMinute !== null) {
5987
+ currentDate.setMinutes(nextMinute);
5988
+ currentDate.setSeconds(this.#getMinOrMax(seconds, reverse));
5989
+ return;
5990
+ }
5991
+ currentDate.applyDateOperation(dateMathVerb, CronDate_1.TimeUnit.Hour, this.#fields.hour.values.length);
5992
+ currentDate.setMinutes(this.#getMinOrMax(minutes, reverse));
5993
+ currentDate.setSeconds(this.#getMinOrMax(seconds, reverse));
5994
+ }
5874
5995
  static #isLastWeekdayOfMonthMatch(expressions, currentDate) {
5875
- const isLastWeekdayOfMonth = currentDate.isLastWeekdayOfMonth();
5876
- return expressions.some((expression) => {
5877
- const weekday = parseInt(expression.toString().charAt(0), 10) % 7;
5878
- if (Number.isNaN(weekday)) {
5879
- throw new Error(`Invalid last weekday of the month expression: ${expression}`);
5880
- }
5881
- return currentDate.getDay() === weekday && isLastWeekdayOfMonth;
5882
- });
5996
+ if (!currentDate.isLastWeekdayOfMonth()) {
5997
+ return false;
5998
+ }
5999
+ const day = currentDate.getDay();
6000
+ return expressions.some((expression) => day === parseInt(expression.toString().charAt(0), 10) % 7);
6001
+ }
6002
+ static #isNthWeekdayOfMonthMatch(nthDay, currentDate) {
6003
+ return nthDay <= 0 || Math.ceil(currentDate.getDate() / 7) === nthDay;
5883
6004
  }
5884
6005
  next() {
5885
6006
  return this.#findSchedule();
@@ -5931,7 +6052,7 @@ var require_CronExpression = __commonJS(function(exports) {
5931
6052
  return items;
5932
6053
  }
5933
6054
  reset(newDate) {
5934
- this.#currentDate = new CronDate_1.CronDate(newDate || this.#options.currentDate);
6055
+ this.#currentDate = newDate ? new CronDate_1.CronDate(newDate, this.#tz) : this.#initialDate;
5935
6056
  }
5936
6057
  stringify(includeSeconds = false) {
5937
6058
  return this.#fields.stringify(includeSeconds);
@@ -5945,12 +6066,6 @@ var require_CronExpression = __commonJS(function(exports) {
5945
6066
  if (!this.#matchDayOfMonth(dt)) {
5946
6067
  return false;
5947
6068
  }
5948
- if (this.#fields.dayOfWeek.nthDay > 0) {
5949
- const weekInMonth = Math.ceil(dt.getDate() / 7);
5950
- if (weekInMonth !== this.#fields.dayOfWeek.nthDay) {
5951
- return false;
5952
- }
5953
- }
5954
6069
  return true;
5955
6070
  }
5956
6071
  toString() {
@@ -5962,7 +6077,8 @@ var require_CronExpression = __commonJS(function(exports) {
5962
6077
  const isDayOfWeekWildcardMatch = this.#fields.dayOfWeek.isWildcard;
5963
6078
  const isRestrictedDayOfWeek = !isDayOfWeekWildcardMatch;
5964
6079
  const matchedDOM = CronExpression.#matchSchedule(currentDate.getDate(), this.#fields.dayOfMonth.values) || this.#fields.dayOfMonth.hasLastChar && currentDate.isLastDayOfMonth();
5965
- const matchedDOW = CronExpression.#matchSchedule(currentDate.getDay(), this.#fields.dayOfWeek.values) || this.#fields.dayOfWeek.hasLastChar && CronExpression.#isLastWeekdayOfMonthMatch(this.#fields.dayOfWeek.values, currentDate);
6080
+ const nthDay = this.#fields.dayOfWeek.nthDay;
6081
+ const matchedDOW = CronExpression.#matchSchedule(currentDate.getDay(), this.#fields.dayOfWeek.values) && CronExpression.#isNthWeekdayOfMonthMatch(nthDay, currentDate) || this.#fields.dayOfWeek.hasLastChar && CronExpression.#isLastWeekdayOfMonthMatch(this.#fields.dayOfWeek.values, currentDate);
5966
6082
  if (isRestrictedDayOfMonth && isRestrictedDayOfWeek && (matchedDOM || matchedDOW)) {
5967
6083
  return true;
5968
6084
  }
@@ -5975,25 +6091,47 @@ var require_CronExpression = __commonJS(function(exports) {
5975
6091
  return false;
5976
6092
  }
5977
6093
  #matchHour(currentDate, dateMathVerb, reverse) {
6094
+ const hourValues = this.#fields.hour.values;
6095
+ const hours = hourValues;
5978
6096
  const currentHour = currentDate.getHours();
5979
- const isMatch = CronExpression.#matchSchedule(currentHour, this.#fields.hour.values);
5980
- const isDstStart = currentDate.dstStart === currentHour;
6097
+ const isMatch = CronExpression.#matchSchedule(currentHour, hourValues);
5981
6098
  const isDstEnd = currentDate.dstEnd === currentHour;
5982
- if (!isMatch && !isDstStart) {
5983
- currentDate.dstStart = null;
5984
- currentDate.applyDateOperation(dateMathVerb, CronDate_1.TimeUnit.Hour, this.#fields.hour.values.length);
5985
- return false;
5986
- }
5987
- if (isDstStart && !CronExpression.#matchSchedule(currentHour - 1, this.#fields.hour.values)) {
5988
- currentDate.invokeDateOperation(dateMathVerb, CronDate_1.TimeUnit.Hour);
5989
- return false;
6099
+ if (currentDate.dstStart !== null && currentDate.dstStartLandingHour === currentHour) {
6100
+ for (let skipped = currentDate.dstStart;skipped !== currentHour; skipped = (skipped + 1) % 24) {
6101
+ if (CronExpression.#matchSchedule(skipped, hourValues)) {
6102
+ return true;
6103
+ }
6104
+ }
5990
6105
  }
5991
6106
  if (isDstEnd && !reverse) {
5992
6107
  currentDate.dstEnd = null;
5993
- currentDate.applyDateOperation(CronDate_1.DateMathOp.Add, CronDate_1.TimeUnit.Hour, this.#fields.hour.values.length);
6108
+ currentDate.applyDateOperation(CronDate_1.DateMathOp.Add, CronDate_1.TimeUnit.Hour, hours.length);
5994
6109
  return false;
5995
6110
  }
5996
- return true;
6111
+ if (isMatch) {
6112
+ return true;
6113
+ }
6114
+ currentDate.clearDstStart();
6115
+ const nextHour = this.#fields.hour.findNearestValue(currentHour, reverse);
6116
+ if (nextHour === null) {
6117
+ currentDate.applyDateOperation(dateMathVerb, CronDate_1.TimeUnit.Day, hours.length);
6118
+ return false;
6119
+ }
6120
+ if (this.#checkDstTransition(currentDate)) {
6121
+ const steps = reverse ? currentHour - nextHour : nextHour - currentHour;
6122
+ for (let i = 0;i < steps; i++) {
6123
+ currentDate.applyDateOperation(dateMathVerb, CronDate_1.TimeUnit.Hour, hours.length);
6124
+ if (!reverse && currentDate.getHours() >= nextHour)
6125
+ break;
6126
+ if (reverse && currentDate.getHours() <= nextHour)
6127
+ break;
6128
+ }
6129
+ } else {
6130
+ currentDate.setHours(nextHour);
6131
+ }
6132
+ currentDate.setMinutes(this.#getMinOrMax(this.#fields.minute.values, reverse));
6133
+ currentDate.setSeconds(this.#getMinOrMax(this.#fields.second.values, reverse));
6134
+ return false;
5997
6135
  }
5998
6136
  #validateTimeSpan(currentDate) {
5999
6137
  if (!this.#startDate && !this.#endDate) {
@@ -6011,54 +6149,55 @@ var require_CronExpression = __commonJS(function(exports) {
6011
6149
  const dateMathVerb = reverse ? CronDate_1.DateMathOp.Subtract : CronDate_1.DateMathOp.Add;
6012
6150
  const currentDate = new CronDate_1.CronDate(this.#currentDate);
6013
6151
  const startTimestamp = currentDate.getTime();
6152
+ if (currentDate.getMilliseconds() > 0) {
6153
+ currentDate.setMilliseconds(0);
6154
+ if (!reverse) {
6155
+ currentDate.applyDateOperation(CronDate_1.DateMathOp.Add, CronDate_1.TimeUnit.Second, this.#fields.hour.values.length);
6156
+ }
6157
+ }
6014
6158
  let stepCount = 0;
6015
6159
  while (++stepCount < LOOP_LIMIT) {
6016
6160
  this.#validateTimeSpan(currentDate);
6017
- if (!this.#matchDayOfMonth(currentDate)) {
6018
- currentDate.applyDateOperation(dateMathVerb, CronDate_1.TimeUnit.Day, this.#fields.hour.values.length);
6161
+ if (!CronExpression.#matchSchedule(currentDate.getMonth() + 1, this.#fields.month.values)) {
6162
+ currentDate.applyDateOperation(dateMathVerb, CronDate_1.TimeUnit.Month, this.#fields.hour.values.length);
6019
6163
  continue;
6020
6164
  }
6021
- if (!(this.#fields.dayOfWeek.nthDay <= 0 || Math.ceil(currentDate.getDate() / 7) === this.#fields.dayOfWeek.nthDay)) {
6165
+ if (!this.#matchDayOfMonth(currentDate)) {
6022
6166
  currentDate.applyDateOperation(dateMathVerb, CronDate_1.TimeUnit.Day, this.#fields.hour.values.length);
6023
6167
  continue;
6024
6168
  }
6025
- if (!CronExpression.#matchSchedule(currentDate.getMonth() + 1, this.#fields.month.values)) {
6026
- currentDate.applyDateOperation(dateMathVerb, CronDate_1.TimeUnit.Month, this.#fields.hour.values.length);
6027
- continue;
6028
- }
6029
6169
  if (!this.#matchHour(currentDate, dateMathVerb, reverse)) {
6030
6170
  continue;
6031
6171
  }
6032
6172
  if (!CronExpression.#matchSchedule(currentDate.getMinutes(), this.#fields.minute.values)) {
6033
- currentDate.applyDateOperation(dateMathVerb, CronDate_1.TimeUnit.Minute, this.#fields.hour.values.length);
6173
+ this.#moveToNextMinute(currentDate, dateMathVerb, reverse);
6034
6174
  continue;
6035
6175
  }
6036
6176
  if (!CronExpression.#matchSchedule(currentDate.getSeconds(), this.#fields.second.values)) {
6037
- currentDate.applyDateOperation(dateMathVerb, CronDate_1.TimeUnit.Second, this.#fields.hour.values.length);
6177
+ this.#moveToNextSecond(currentDate, dateMathVerb, reverse);
6038
6178
  continue;
6039
6179
  }
6040
6180
  if (startTimestamp === currentDate.getTime()) {
6041
- if (dateMathVerb === "Add" || currentDate.getMilliseconds() === 0) {
6042
- currentDate.applyDateOperation(dateMathVerb, CronDate_1.TimeUnit.Second, this.#fields.hour.values.length);
6043
- }
6181
+ currentDate.applyDateOperation(dateMathVerb, CronDate_1.TimeUnit.Second, this.#fields.hour.values.length);
6044
6182
  continue;
6045
6183
  }
6046
6184
  break;
6047
6185
  }
6048
- if (stepCount > LOOP_LIMIT) {
6186
+ if (stepCount >= LOOP_LIMIT) {
6049
6187
  throw new Error(exports.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);
6050
6188
  }
6051
- if (currentDate.getMilliseconds() !== 0) {
6052
- currentDate.setMilliseconds(0);
6053
- }
6054
6189
  this.#currentDate = currentDate;
6055
6190
  return currentDate;
6056
6191
  }
6057
6192
  [Symbol.iterator]() {
6058
6193
  return {
6059
6194
  next: () => {
6060
- const schedule = this.#findSchedule();
6061
- return { value: schedule, done: !this.hasNext() };
6195
+ try {
6196
+ const schedule = this.#findSchedule();
6197
+ return { value: schedule, done: false };
6198
+ } catch {
6199
+ return { value: undefined, done: true };
6200
+ }
6062
6201
  }
6063
6202
  };
6064
6203
  }
@@ -6148,28 +6287,32 @@ var require_CronExpressionParser = __commonJS(function(exports) {
6148
6287
  DayOfWeek[DayOfWeek["fri"] = 5] = "fri";
6149
6288
  DayOfWeek[DayOfWeek["sat"] = 6] = "sat";
6150
6289
  })(DayOfWeek || (exports.DayOfWeek = DayOfWeek = {}));
6290
+ var MAX_FIELD_VALUES = 256;
6291
+ var MAX_EXPRESSION_LENGTH = 1024;
6151
6292
 
6152
6293
  class CronExpressionParser {
6153
6294
  static parse(expression, options = {}) {
6154
6295
  const { strict = false, hashSeed } = options;
6155
6296
  const rand = (0, random_1.seededRandom)(hashSeed);
6156
- expression = PredefinedExpressions[expression] || expression;
6297
+ if (Object.hasOwn(PredefinedExpressions, expression)) {
6298
+ expression = PredefinedExpressions[expression];
6299
+ }
6157
6300
  const rawFields = CronExpressionParser.#getRawFields(expression, strict);
6158
6301
  if (!(rawFields.dayOfMonth === "*" || rawFields.dayOfWeek === "*" || !strict)) {
6159
6302
  throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");
6160
6303
  }
6161
- const second = CronExpressionParser.#parseField(CronUnit.Second, rawFields.second, fields_1.CronSecond.constraints, rand);
6162
- const minute = CronExpressionParser.#parseField(CronUnit.Minute, rawFields.minute, fields_1.CronMinute.constraints, rand);
6163
- const hour = CronExpressionParser.#parseField(CronUnit.Hour, rawFields.hour, fields_1.CronHour.constraints, rand);
6164
- const month = CronExpressionParser.#parseField(CronUnit.Month, rawFields.month, fields_1.CronMonth.constraints, rand);
6165
- const dayOfMonth = CronExpressionParser.#parseField(CronUnit.DayOfMonth, rawFields.dayOfMonth, fields_1.CronDayOfMonth.constraints, rand);
6304
+ const second = CronExpressionParser.#parseField(CronUnit.Second, rawFields.second, fields_1.CronSecond.constraints, rand, strict);
6305
+ const minute = CronExpressionParser.#parseField(CronUnit.Minute, rawFields.minute, fields_1.CronMinute.constraints, rand, strict);
6306
+ const hour = CronExpressionParser.#parseField(CronUnit.Hour, rawFields.hour, fields_1.CronHour.constraints, rand, strict);
6307
+ const month = CronExpressionParser.#parseField(CronUnit.Month, rawFields.month, fields_1.CronMonth.constraints, rand, strict);
6308
+ const dayOfMonth = CronExpressionParser.#parseField(CronUnit.DayOfMonth, rawFields.dayOfMonth, fields_1.CronDayOfMonth.constraints, rand, strict);
6166
6309
  const { dayOfWeek: _dayOfWeek, nthDayOfWeek } = CronExpressionParser.#parseNthDay(rawFields.dayOfWeek);
6167
- const dayOfWeek = CronExpressionParser.#parseField(CronUnit.DayOfWeek, _dayOfWeek, fields_1.CronDayOfWeek.constraints, rand);
6310
+ const dayOfWeek = CronExpressionParser.#parseField(CronUnit.DayOfWeek, _dayOfWeek, fields_1.CronDayOfWeek.constraints, rand, strict);
6168
6311
  const fields = new CronFieldCollection_1.CronFieldCollection({
6169
6312
  second: new fields_1.CronSecond(second, { rawValue: rawFields.second }),
6170
6313
  minute: new fields_1.CronMinute(minute, { rawValue: rawFields.minute }),
6171
6314
  hour: new fields_1.CronHour(hour, { rawValue: rawFields.hour }),
6172
- dayOfMonth: new fields_1.CronDayOfMonth(dayOfMonth, { rawValue: rawFields.dayOfMonth }),
6315
+ dayOfMonth: fields_1.CronDayOfMonth.fromMonth(month, dayOfMonth, { rawValue: rawFields.dayOfMonth }),
6173
6316
  month: new fields_1.CronMonth(month, { rawValue: rawFields.month }),
6174
6317
  dayOfWeek: new fields_1.CronDayOfWeek(dayOfWeek, { rawValue: rawFields.dayOfWeek, nthDayOfWeek })
6175
6318
  });
@@ -6180,6 +6323,9 @@ var require_CronExpressionParser = __commonJS(function(exports) {
6180
6323
  throw new Error("Invalid cron expression");
6181
6324
  }
6182
6325
  expression = expression || "0 * * * * *";
6326
+ if (expression.length > MAX_EXPRESSION_LENGTH) {
6327
+ throw new Error(`Invalid cron expression, too long, expected at most ${MAX_EXPRESSION_LENGTH} characters`);
6328
+ }
6183
6329
  const atoms = expression.trim().split(/\s+/);
6184
6330
  if (strict && atoms.length < 6) {
6185
6331
  throw new Error("Invalid cron expression, expected 6 fields");
@@ -6187,18 +6333,19 @@ var require_CronExpressionParser = __commonJS(function(exports) {
6187
6333
  if (atoms.length > 6) {
6188
6334
  throw new Error("Invalid cron expression, too many fields");
6189
6335
  }
6190
- const defaults = ["*", "*", "*", "*", "*", "0"];
6336
+ const defaults = ["0", "*", "*", "*", "*", "*"];
6191
6337
  if (atoms.length < defaults.length) {
6192
- atoms.unshift(...defaults.slice(atoms.length));
6338
+ atoms.unshift(...defaults.slice(0, defaults.length - atoms.length));
6193
6339
  }
6194
6340
  const [second, minute, hour, dayOfMonth, month, dayOfWeek] = atoms;
6195
6341
  return { second, minute, hour, dayOfMonth, month, dayOfWeek };
6196
6342
  }
6197
- static #parseField(field, value, constraints, rand) {
6343
+ static #parseField(field, value, constraints, rand, strict) {
6198
6344
  if (field === CronUnit.Month || field === CronUnit.DayOfWeek) {
6345
+ const aliases = field === CronUnit.Month ? Months : DayOfWeek;
6199
6346
  value = value.replace(/[a-z]{3}/gi, (match) => {
6200
6347
  match = match.toLowerCase();
6201
- const replacer = Months[match] || DayOfWeek[match];
6348
+ const replacer = aliases[match];
6202
6349
  if (replacer === undefined) {
6203
6350
  throw new Error(`Validation error, cannot resolve alias "${match}"`);
6204
6351
  }
@@ -6209,59 +6356,90 @@ var require_CronExpressionParser = __commonJS(function(exports) {
6209
6356
  throw new Error(`Invalid characters, got value: ${value}`);
6210
6357
  }
6211
6358
  value = this.#parseWildcard(value, constraints);
6212
- value = this.#parseHashed(value, constraints, rand);
6359
+ value = this.#parseHashed(value, constraints, rand, field, strict);
6213
6360
  return this.#parseSequence(field, value, constraints);
6214
6361
  }
6215
6362
  static #parseWildcard(value, constraints) {
6216
- return value.replace(/[*?]/g, constraints.min + "-" + constraints.max);
6363
+ const parsed = value.replace(/(^|,)[*?](?=\/|,|$)/g, (_, separator) => `${separator}${constraints.min}-${constraints.max}`);
6364
+ if (/[*?]/.test(parsed)) {
6365
+ throw new Error(`Invalid wildcard, got value: ${value}`);
6366
+ }
6367
+ return parsed;
6217
6368
  }
6218
- static #parseHashed(value, constraints, rand) {
6369
+ static #parseHashed(value, constraints, rand, field, strict) {
6219
6370
  const randomValue = rand();
6371
+ let count = 0;
6220
6372
  return value.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g, (_, min, max, step) => {
6221
6373
  if (min && max && step) {
6222
6374
  const minNum = parseInt(min, 10);
6223
6375
  const maxNum = parseInt(max, 10);
6224
6376
  const stepNum = parseInt(step, 10);
6225
- if (minNum > maxNum) {
6226
- throw new Error(`Invalid range: ${minNum}-${maxNum}, min > max`);
6227
- }
6228
6377
  if (stepNum <= 0) {
6229
6378
  throw new Error(`Invalid step: ${stepNum}, must be positive`);
6230
6379
  }
6231
- const minStart = Math.max(minNum, constraints.min);
6232
- const offset = Math.floor(randomValue * stepNum);
6233
- const values = [];
6234
- for (let i = Math.floor(minStart / stepNum) * stepNum + offset;i <= maxNum; i += stepNum) {
6235
- if (i >= minStart) {
6236
- values.push(i);
6237
- }
6238
- }
6239
- return values.join(",");
6380
+ const range = CronExpressionParser.#hashedRange(minNum, maxNum, constraints, field, strict);
6381
+ count += Math.ceil((range.max - range.min + 1) / stepNum);
6382
+ CronExpressionParser.#assertMaxFieldValues(field, count);
6383
+ return CronExpressionParser.#hashedStep(randomValue, range.min, range.max, stepNum, field, strict);
6240
6384
  } else if (min && max) {
6241
6385
  const minNum = parseInt(min, 10);
6242
6386
  const maxNum = parseInt(max, 10);
6243
- if (minNum > maxNum) {
6244
- throw new Error(`Invalid range: ${minNum}-${maxNum}, min > max`);
6245
- }
6246
- return String(Math.floor(randomValue * (maxNum - minNum + 1)) + minNum);
6387
+ const range = CronExpressionParser.#hashedRange(minNum, maxNum, constraints, field, strict);
6388
+ return String(CronExpressionParser.#hashedValue(randomValue, range.min, range.max));
6247
6389
  } else if (step) {
6248
6390
  const stepNum = parseInt(step, 10);
6249
6391
  if (stepNum <= 0) {
6250
6392
  throw new Error(`Invalid step: ${stepNum}, must be positive`);
6251
6393
  }
6252
- const offset = Math.floor(randomValue * stepNum);
6253
- const values = [];
6254
- for (let i = Math.floor(constraints.min / stepNum) * stepNum + offset;i <= constraints.max; i += stepNum) {
6255
- if (i >= constraints.min) {
6256
- values.push(i);
6257
- }
6258
- }
6259
- return values.join(",");
6394
+ count += Math.ceil((constraints.max - constraints.min + 1) / stepNum);
6395
+ CronExpressionParser.#assertMaxFieldValues(field, count);
6396
+ return CronExpressionParser.#hashedStep(randomValue, constraints.min, constraints.max, stepNum, field, strict);
6260
6397
  } else {
6261
- return String(Math.floor(randomValue * (constraints.max - constraints.min + 1) + constraints.min));
6398
+ return String(CronExpressionParser.#hashedValue(randomValue, constraints.min, constraints.max));
6262
6399
  }
6263
6400
  });
6264
6401
  }
6402
+ static #hashedValue(randomValue, min, max) {
6403
+ return Math.floor(randomValue * (max - min + 1)) + min;
6404
+ }
6405
+ static #fieldName(field) {
6406
+ return field.charAt(0).toLowerCase() + field.slice(1);
6407
+ }
6408
+ static #hashedRange(min, max, constraints, field, strict) {
6409
+ if (min > max) {
6410
+ throw new Error(`Invalid range: ${min}-${max}, min > max`);
6411
+ }
6412
+ if (strict && (min < constraints.min || max > constraints.max)) {
6413
+ throw new Error(`Invalid range: ${min}-${max}, outside the ${constraints.min}-${constraints.max} range of the ${CronExpressionParser.#fieldName(field)} field`);
6414
+ }
6415
+ const rangeMin = Math.max(min, constraints.min);
6416
+ const rangeMax = Math.min(max, constraints.max);
6417
+ if (rangeMin > rangeMax) {
6418
+ throw new Error(`Invalid range: ${min}-${max}, no usable value in the ${CronExpressionParser.#fieldName(field)} field`);
6419
+ }
6420
+ return { min: rangeMin, max: rangeMax };
6421
+ }
6422
+ static #hashedStep(randomValue, min, max, step, field, strict) {
6423
+ if (strict && step > max - min + 1) {
6424
+ throw new Error(`Invalid step: ${step}, wider than the ${min}-${max} range of the ${CronExpressionParser.#fieldName(field)} field`);
6425
+ }
6426
+ const offset = Math.floor(randomValue * step);
6427
+ const values = [];
6428
+ for (let i = Math.floor(min / step) * step + offset;i <= max; i += step) {
6429
+ if (i >= min) {
6430
+ values.push(i);
6431
+ }
6432
+ }
6433
+ if (values.length === 0) {
6434
+ return String(CronExpressionParser.#hashedValue(randomValue, min, max));
6435
+ }
6436
+ return values.join(",");
6437
+ }
6438
+ static #assertMaxFieldValues(field, count) {
6439
+ if (count > MAX_FIELD_VALUES) {
6440
+ throw new Error(`Constraint error, too many values in ${field} field, expected at most ${MAX_FIELD_VALUES}`);
6441
+ }
6442
+ }
6265
6443
  static #parseSequence(field, val, constraints) {
6266
6444
  const stack = [];
6267
6445
  function handleResult(result, constraints) {
@@ -6281,12 +6459,13 @@ var require_CronExpressionParser = __commonJS(function(exports) {
6281
6459
  }
6282
6460
  }
6283
6461
  const atoms = val.split(",");
6284
- atoms.forEach((atom) => {
6462
+ for (const atom of atoms) {
6463
+ CronExpressionParser.#assertMaxFieldValues(field, stack.length);
6285
6464
  if (!(atom.length > 0)) {
6286
6465
  throw new Error("Invalid list value format");
6287
6466
  }
6288
6467
  handleResult(CronExpressionParser.#parseRepeat(field, atom, constraints), constraints);
6289
- });
6468
+ }
6290
6469
  return stack;
6291
6470
  }
6292
6471
  static #parseRepeat(field, val, constraints) {
@@ -6295,10 +6474,10 @@ var require_CronExpressionParser = __commonJS(function(exports) {
6295
6474
  throw new Error(`Invalid repeat: ${val}`);
6296
6475
  }
6297
6476
  if (atoms.length === 2) {
6298
- if (!isNaN(parseInt(atoms[0], 10))) {
6477
+ if (!atoms[0].includes("-")) {
6299
6478
  atoms[0] = `${atoms[0]}-${constraints.max}`;
6300
6479
  }
6301
- return CronExpressionParser.#parseRange(field, atoms[0], parseInt(atoms[1], 10), constraints);
6480
+ return CronExpressionParser.#parseRange(field, atoms[0], +atoms[1], constraints);
6302
6481
  }
6303
6482
  return CronExpressionParser.#parseRange(field, val, 1, constraints);
6304
6483
  }
@@ -6318,7 +6497,7 @@ var require_CronExpressionParser = __commonJS(function(exports) {
6318
6497
  }
6319
6498
  static #createRange(field, min, max, repeatInterval) {
6320
6499
  const stack = [];
6321
- if (field === CronUnit.DayOfWeek && max % 7 === 0) {
6500
+ if (field === CronUnit.DayOfWeek && max % 7 === 0 && (max - min) % repeatInterval === 0) {
6322
6501
  stack.push(0);
6323
6502
  }
6324
6503
  for (let index = min;index <= max; index += repeatInterval) {
@@ -6333,7 +6512,10 @@ var require_CronExpressionParser = __commonJS(function(exports) {
6333
6512
  if (atoms.length <= 1) {
6334
6513
  return isNaN(+val) ? val : +val;
6335
6514
  }
6336
- const [min, max] = atoms.map((num) => parseInt(num, 10));
6515
+ if (atoms.length > 2) {
6516
+ throw new Error(`Invalid range: ${val}`);
6517
+ }
6518
+ const [min, max] = atoms.map((atom) => /^\d+$/.test(atom) ? +atom : NaN);
6337
6519
  this.#validateRange(min, max, constraints);
6338
6520
  this.#validateRepeatInterval(repeatInterval);
6339
6521
  return this.#createRange(field, min, max, repeatInterval);
@@ -6344,7 +6526,7 @@ var require_CronExpressionParser = __commonJS(function(exports) {
6344
6526
  return { dayOfWeek: atoms[0] };
6345
6527
  }
6346
6528
  const nthValue = +atoms[atoms.length - 1];
6347
- const matches = val.match(/([,-/])/);
6529
+ const matches = val.match(/([,\-/L])/);
6348
6530
  if (matches !== null) {
6349
6531
  throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${matches?.[0]}\` special characters are incompatible`);
6350
6532
  }
@@ -6362,57 +6544,13 @@ var require_CronExpressionParser = __commonJS(function(exports) {
6362
6544
 
6363
6545
  // node_modules/cron-parser/dist/CronFileParser.js
6364
6546
  var require_CronFileParser = __commonJS(function(exports) {
6365
- var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
6366
- if (k2 === undefined)
6367
- k2 = k;
6368
- var desc = Object.getOwnPropertyDescriptor(m, k);
6369
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6370
- desc = { enumerable: true, get: function() {
6371
- return m[k];
6372
- } };
6373
- }
6374
- Object.defineProperty(o, k2, desc);
6375
- } : function(o, m, k, k2) {
6376
- if (k2 === undefined)
6377
- k2 = k;
6378
- o[k2] = m[k];
6379
- });
6380
- var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
6381
- Object.defineProperty(o, "default", { enumerable: true, value: v });
6382
- } : function(o, v) {
6383
- o["default"] = v;
6384
- });
6385
- var __importStar = exports && exports.__importStar || function() {
6386
- var ownKeys = function(o) {
6387
- ownKeys = Object.getOwnPropertyNames || function(o) {
6388
- var ar = [];
6389
- for (var k in o)
6390
- if (Object.prototype.hasOwnProperty.call(o, k))
6391
- ar[ar.length] = k;
6392
- return ar;
6393
- };
6394
- return ownKeys(o);
6395
- };
6396
- return function(mod) {
6397
- if (mod && mod.__esModule)
6398
- return mod;
6399
- var result = {};
6400
- if (mod != null) {
6401
- for (var k = ownKeys(mod), i = 0;i < k.length; i++)
6402
- if (k[i] !== "default")
6403
- __createBinding(result, mod, k[i]);
6404
- }
6405
- __setModuleDefault(result, mod);
6406
- return result;
6407
- };
6408
- }();
6409
6547
  Object.defineProperty(exports, "__esModule", { value: true });
6410
6548
  exports.CronFileParser = undefined;
6411
6549
  var CronExpressionParser_1 = require_CronExpressionParser();
6412
6550
 
6413
6551
  class CronFileParser {
6414
6552
  static async parseFile(filePath) {
6415
- const { readFile } = await Promise.resolve().then(() => __importStar(__require("fs/promises")));
6553
+ const { readFile } = __require("fs/promises");
6416
6554
  const data = await readFile(filePath, "utf8");
6417
6555
  return CronFileParser.#parseContent(data);
6418
6556
  }
@@ -6434,26 +6572,37 @@ var require_CronFileParser = __commonJS(function(exports) {
6434
6572
  if (entry.length === 0 || entry.startsWith("#")) {
6435
6573
  continue;
6436
6574
  }
6437
- const variableMatch = entry.match(/^(.*)=(.*)$/);
6575
+ const variableMatch = entry.match(/^([^\s=]+)\s*=\s*(.*)$/);
6438
6576
  if (variableMatch) {
6439
6577
  const [, key, value] = variableMatch;
6440
- result.variables[key] = value.replace(/["']/g, "");
6578
+ Object.defineProperty(result.variables, key, {
6579
+ value: value.replace(/^(["'])(.*)\1$/, "$2"),
6580
+ enumerable: true,
6581
+ writable: true,
6582
+ configurable: true
6583
+ });
6441
6584
  continue;
6442
6585
  }
6443
6586
  try {
6444
6587
  const parsedEntry = CronFileParser.#parseEntry(entry);
6445
6588
  result.expressions.push(parsedEntry.interval);
6446
6589
  } catch (err) {
6447
- result.errors[entry] = err;
6590
+ Object.defineProperty(result.errors, entry, {
6591
+ value: err,
6592
+ enumerable: true,
6593
+ writable: true,
6594
+ configurable: true
6595
+ });
6448
6596
  }
6449
6597
  }
6450
6598
  return result;
6451
6599
  }
6452
6600
  static #parseEntry(entry) {
6453
- const atoms = entry.split(" ");
6601
+ const atoms = entry.split(/\s+/);
6602
+ const scheduleLength = atoms[0].startsWith("@") ? 1 : 5;
6454
6603
  return {
6455
- interval: CronExpressionParser_1.CronExpressionParser.parse(atoms.slice(0, 5).join(" ")),
6456
- command: atoms.slice(5, atoms.length)
6604
+ interval: CronExpressionParser_1.CronExpressionParser.parse(atoms.slice(0, scheduleLength).join(" ")),
6605
+ command: atoms.slice(scheduleLength, atoms.length)
6457
6606
  };
6458
6607
  }
6459
6608
  }
@@ -179392,6 +179541,8 @@ function extractorPath() {
179392
179541
  return fileURLToPath2(new URL("../../scripts-runtime/extract-args-schema.ts", import.meta.url));
179393
179542
  }
179394
179543
  async function extractArgsJsonSchema(source) {
179544
+ if (getDeploymentScriptExecutorName() === "quickjs")
179545
+ return null;
179395
179546
  const tmpdir = `${process.env.TMPDIR ?? "/tmp"}/schema-extract-${crypto.randomUUID()}`;
179396
179547
  try {
179397
179548
  await Bun.$`mkdir -p ${tmpdir}`.quiet();
@@ -179443,6 +179594,7 @@ async function extractArgsJsonSchema(source) {
179443
179594
  var TIMEOUT_MS = 5000;
179444
179595
  var init_extract_schema = __esm(() => {
179445
179596
  init_native();
179597
+ init_registry();
179446
179598
  init_sandboxed_process();
179447
179599
  });
179448
179600