void 1.12.1 → 1.13.0

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 (372) hide show
  1. package/README.md +1 -0
  2. package/dist/{account-cmd-BU1Fy_Bf.mjs → account-cmd-4fQiXYX7.mjs} +6 -6
  3. package/dist/{application-analysis-DVeN8yoi.mjs → application-analysis-BjEwHTV2.mjs} +19 -13
  4. package/dist/{application-routing-KKw4Y84h.mjs → application-routing-COCfD2yc.mjs} +1 -1
  5. package/dist/args-DrnTI35r.mjs +88 -0
  6. package/dist/args-MnQnqypt.mjs +1 -0
  7. package/dist/{auth-CqwJwItO.mjs → auth-CeBmolb-.mjs} +3 -3
  8. package/dist/{auth-A7cZ8aXA.mjs → auth-CvaDxOMi.mjs} +1 -1
  9. package/dist/{auth-link-Duu2NvN5.mjs → auth-link-I4omV0pL.mjs} +6 -6
  10. package/dist/{auth-router-vgtOdb9j.mjs → auth-router-CXq4q7bb.mjs} +6 -5
  11. package/dist/{better-auth-shared-BS3pDQbT.d.mts → better-auth-shared-CrIkcN8I.d.mts} +2 -1
  12. package/dist/bindings-C7zOgxT3.d.mts +28 -0
  13. package/dist/browser-run-BKgZVwLk.mjs +124 -0
  14. package/dist/{build-cmd-B7OJ0U5R.mjs → build-cmd-Biz6u4rn.mjs} +6 -6
  15. package/dist/{cache-wSpi3aeM.mjs → cache-WkLMUrjQ.mjs} +6 -6
  16. package/dist/{cancel-deploy-DMWzkAlb.mjs → cancel-deploy-BRsrmyTk.mjs} +6 -5
  17. package/dist/{cf-access-DHklo7Rg.mjs → cf-access-B21j-nd6.mjs} +1 -1
  18. package/dist/{cf-build-output-Cso7Vh-t.mjs → cf-build-output-G-7Tdd8b.mjs} +6 -5
  19. package/dist/cf-build-output-Qc43LWzE.mjs +1 -0
  20. package/dist/{cf-command-values-5BPBRc9Z.mjs → cf-command-values-cUnJwCyG.mjs} +24 -1
  21. package/dist/{cf-config-migrate-D271BTiw.mjs → cf-config-migrate-CsbQGzMf.mjs} +200 -94
  22. package/dist/cf-user-agent-HHTRzfud.mjs +15 -0
  23. package/dist/cf-version-api-BWHMVtzw.mjs +1 -0
  24. package/dist/cf-version-api-XEEK2B9A.mjs +856 -0
  25. package/dist/cf-worker-settings-DJKdy97k.mjs +127 -0
  26. package/dist/cli/cli.mjs +1 -1
  27. package/dist/cli/cloudflare-operation-process.mjs +111 -47
  28. package/dist/cli/env-schema-probe.mjs +3 -3
  29. package/dist/cli/json-command-process.d.mts +6 -0
  30. package/dist/cli/json-command-process.mjs +91 -0
  31. package/dist/{cli-main-BrChcpE3.mjs → cli-main-CJTGhcYN.mjs} +84 -113
  32. package/dist/{client-eLZwqkPH.mjs → client-0um7Lzze.mjs} +1 -1
  33. package/dist/{client-DE2m2ldh.mjs → client-BEHI4UWn.mjs} +14 -8
  34. package/dist/{cloudflare-auth-eWfhdZCk.mjs → cloudflare-auth-iOgRurWm.mjs} +1 -1
  35. package/dist/{cloudflare-cmd-SsFlJe2B.mjs → cloudflare-cmd-DsSlXbNy.mjs} +5 -5
  36. package/dist/{cloudflare-config-D9UFH_A5.mjs → cloudflare-config-KPHKf57C.mjs} +2 -2
  37. package/dist/{cloudflare-connect-BgpHcSg3.mjs → cloudflare-connect-bEtneBjT.mjs} +5 -4
  38. package/dist/{cloudflare-operations-ByjFGats.mjs → cloudflare-operations-BmICrRnm.mjs} +1 -1
  39. package/dist/{cloudflare-operations-BIRQkYwL.mjs → cloudflare-operations-D-9psgPQ.mjs} +19 -11
  40. package/dist/cloudflare-preview-8eLSQPdO.mjs +1 -0
  41. package/dist/cloudflare-preview-BaeU-m74.mjs +112 -0
  42. package/dist/{cloudflare-process-60r4Z2Zf.mjs → cloudflare-process-DFNpqV_m.mjs} +57 -29
  43. package/dist/cloudflare-user-output-DFbD0l4l.mjs +36 -0
  44. package/dist/collect-Aam0GwAU.mjs +1 -0
  45. package/dist/{collect-rNLybAnF.mjs → collect-KC4cizWM.mjs} +6 -1
  46. package/dist/{config-DA6ZbLXO.d.mts → config-BdmM5ZzP.d.mts} +12 -2
  47. package/dist/{config-BFX5ZB1J.mjs → config-CUYGZqdN.mjs} +2 -2
  48. package/dist/{config-BSoW3QCB.mjs → config-C_UjzkVS.mjs} +3 -3
  49. package/dist/{config-DtjrUtPo.mjs → config-Ge-MytMU.mjs} +1 -1
  50. package/dist/{config-Dv5jri1-.mjs → config-KZAiI3gG.mjs} +32 -6
  51. package/dist/config-entry.d.mts +1 -1
  52. package/dist/config-write-dKLINlm2.mjs +80 -0
  53. package/dist/{connect-D0V0o40j.mjs → connect-Bqq3b9sX.mjs} +10 -9
  54. package/dist/{create-project-CbuDH5Hv.mjs → create-project-MXoP_rte.mjs} +1 -1
  55. package/dist/{create-project-8FdN6D2i.mjs → create-project-T-9AIQDe.mjs} +7 -6
  56. package/dist/{db-BNPIjLkK.mjs → db-B3eoVDNA.mjs} +50 -47
  57. package/dist/{db-args-CiQVg8SJ.mjs → db-args-BcvTZ8KE.mjs} +1 -1
  58. package/dist/db-args-Cx1y4vZn.mjs +1 -0
  59. package/dist/{db-types-B4Cf9dzR.mjs → db-types-BpgXVtQZ.mjs} +1 -1
  60. package/dist/{delete-WtLEfap2.mjs → delete-Cf6SroAw.mjs} +7 -6
  61. package/dist/deploy-DZ9j7MC4.mjs +2 -0
  62. package/dist/{deploy-BgSbagIP.mjs → deploy-UojYUEWr.mjs} +803 -1415
  63. package/dist/{deploy-managed-static-BWBsxOww.mjs → deploy-managed-static-DV_OmTWf.mjs} +54 -393
  64. package/dist/{deploy-security-notice-IRGy6Edf.mjs → deploy-security-notice-3jX71IeP.mjs} +6 -4
  65. package/dist/deploy-summary-Dkl0zvQy.mjs +377 -0
  66. package/dist/{deploy-transport-BKP_oV9q.mjs → deploy-transport-4ISWxx8n.mjs} +4 -3
  67. package/dist/deploy.mjs +14 -10
  68. package/dist/discover-BZWVWeQs.mjs +1 -0
  69. package/dist/{discover-IcspacCg.mjs → discover-BeFs7OPS.mjs} +1 -1
  70. package/dist/{dispatch-DIhDA3NI.mjs → dispatch-BUKbPdqb.mjs} +7 -7
  71. package/dist/{dist-Cr_xGE_K.mjs → dist-BngS28id.mjs} +6 -6
  72. package/dist/{dist-C47zy_kJ.mjs → dist-x99fIj4n.mjs} +1 -1
  73. package/dist/{domain-mweyYXSw.mjs → domain-BK6NWkWK.mjs} +7 -7
  74. package/dist/{drizzle-BJDMPrj7.mjs → drizzle-CnSbVeiZ.mjs} +12 -13
  75. package/dist/{drizzle-CQ5jWuDL.mjs → drizzle-CrkwVwK8.mjs} +1 -1
  76. package/dist/{email-DcQNP40O.mjs → email-BBSDV0J5.mjs} +13 -12
  77. package/dist/{email-cloudflare-DeYH3Ke7.mjs → email-cloudflare-C-guKEbz.mjs} +10 -8
  78. package/dist/{env-DaAoYR2-.mjs → env-BVnKiGYJ.mjs} +8 -8
  79. package/dist/{env-EjHqc7m9.mjs → env-CU2tMDdO.mjs} +6 -1
  80. package/dist/{env-types-D2hBodXP.mjs → env-types-B33fEHRH.mjs} +1 -1
  81. package/dist/{env-validation-j9pjCDfA.mjs → env-validation-BnAsx6gz.mjs} +1 -1
  82. package/dist/{env-validation-D-v5_CWL.mjs → env-validation-SXsjd6-Z.mjs} +4 -4
  83. package/dist/{fetch-CiEsvjpP.mjs → fetch-DL7OCgwB.mjs} +1 -1
  84. package/dist/{fetch-stream-BIG5lHW6.mjs → fetch-stream-DEilLTCc.mjs} +2 -2
  85. package/dist/{gen-aOtHhZLD.mjs → gen-BxuIN1bz.mjs} +10 -9
  86. package/dist/gen-DaayFP9v.mjs +1 -0
  87. package/dist/{generate-Dq2Bgw75.mjs → generate-Ck-L3e0e.mjs} +1 -1
  88. package/dist/{generate-C3ZAqCy-.mjs → generate-t1dDUYZZ.mjs} +1 -1
  89. package/dist/{github-cmd-BR19Ffdz.mjs → github-cmd-B7U9Hjmi.mjs} +7 -6
  90. package/dist/{handler-DCrDLzw2.mjs → handler-2wAywJgj.mjs} +11 -9
  91. package/dist/{headers-DqBsjDxg.mjs → headers-DPI4MDGC.mjs} +1 -1
  92. package/dist/{help-DvClCzqL.mjs → help-Bgiu5PMX.mjs} +36 -4
  93. package/dist/help-DWGHmt_n.mjs +1 -0
  94. package/dist/html-5sfGLjiI.d.mts +3 -0
  95. package/dist/html-DPSOBDCh.mjs +1 -0
  96. package/dist/{index-Dn2mkPr2.d.mts → index-CqF8_p9C.d.mts} +5 -105
  97. package/dist/index-Cvqotnhc.d.mts +91 -0
  98. package/dist/{index-BQ5qYiAw.d.mts → index-DAinHkj8.d.mts} +1 -1
  99. package/dist/{index-8cAgNdb6.d.mts → index-lnEWwVAS.d.mts} +1 -1
  100. package/dist/index.d.mts +3 -2
  101. package/dist/index.mjs +536 -170
  102. package/dist/{info-P6MBiVJi.mjs → info-7COlpAfY.mjs} +32 -20
  103. package/dist/{init-C8YpkGIP.mjs → init-DftAx3L4.mjs} +237 -88
  104. package/dist/input-jcps6lAn.mjs +64 -0
  105. package/dist/interactive-prompts-EK0dilFu.mjs +43 -0
  106. package/dist/{limits-BCoQLpn3.mjs → limits-3I3VdX2E.mjs} +4 -1
  107. package/dist/{link-Dyz9IGcM.mjs → link-C3WMNFTG.mjs} +7 -7
  108. package/dist/{list-VGYBMjmx.mjs → list-K4EGVUZN.mjs} +9 -9
  109. package/dist/{load-user-env-B8qC0Q2Y.mjs → load-user-env-uMmQJ-Th.mjs} +1 -1
  110. package/dist/{local-d1-CYOYkVwO.mjs → local-d1-BtLCVC1p.mjs} +2 -2
  111. package/dist/login-BJwPhV_S.mjs +1 -0
  112. package/dist/{login-CWFr-G2I.mjs → login-DaugBfBG.mjs} +6 -5
  113. package/dist/{logs-kS1wuR4b.mjs → logs-BR2szdN5.mjs} +6 -6
  114. package/dist/migrate-BHD46A31.mjs +1 -0
  115. package/dist/{migrate-BNZL1hee.mjs → migrate-Dtlg8fC6.mjs} +7 -7
  116. package/dist/nitro.mjs +3 -3
  117. package/dist/{node-DVJWfV6s.mjs → node-BbKlLpHa.mjs} +5 -5
  118. package/dist/{operator-ai-logging-DD0n6zc2.mjs → operator-ai-logging-4Nvs6Ut3.mjs} +5 -5
  119. package/dist/{operator-args-nvetCWuz.mjs → operator-args-DWvqq3Ws.mjs} +31 -15
  120. package/dist/{operator-auth-DMvn-y9X.mjs → operator-auth-DtRMGXYY.mjs} +2 -2
  121. package/dist/{operator-client-dFNnXfyB.mjs → operator-client-BG0VIMMM.mjs} +2 -2
  122. package/dist/operator-cmd-CR3Q9k4c.mjs +1 -0
  123. package/dist/{operator-cmd-a7yOf2tH.mjs → operator-cmd-D4YcMKO-.mjs} +9 -9
  124. package/dist/{operator-security-D5MToU0p.mjs → operator-security-nVLo8vDt.mjs} +11 -5
  125. package/dist/{output-BZLnu0z8.mjs → output-DhJgS6Ve.mjs} +1 -1
  126. package/dist/output-OYwcEwok.mjs +1 -0
  127. package/dist/pages/client.d.mts +34 -20
  128. package/dist/pages/client.mjs +172 -74
  129. package/dist/pages/index.d.mts +11 -4
  130. package/dist/pages/index.mjs +5 -5
  131. package/dist/pages/islands-plugin.d.mts +2 -2
  132. package/dist/pages/islands-plugin.mjs +5 -3
  133. package/dist/pages/protocol.d.mts +3 -3
  134. package/dist/pages/protocol.mjs +3 -3
  135. package/dist/pages/serialize.d.mts +2 -2
  136. package/dist/pages/serialize.mjs +1 -1
  137. package/dist/parse-filename-DIPUjoCh.d.mts +2 -0
  138. package/dist/platform-C3Q44RJ8.mjs +250 -0
  139. package/dist/platform-args-BSyVZESg.mjs +1 -0
  140. package/dist/{platform-args-CvZSuhYS.mjs → platform-args-BnocJDC_.mjs} +1 -1
  141. package/dist/{platform-auth-config-CpszX-Ne.mjs → platform-auth-config-BbfNhjBc.mjs} +9 -9
  142. package/dist/{platform-auth-protection-DA6Tw8Og.mjs → platform-auth-protection-BHPV4MUf.mjs} +9 -8
  143. package/dist/{platform-auth-recovery-Cztrb1JC.mjs → platform-auth-recovery-DE0nArYy.mjs} +8 -7
  144. package/dist/{platform-cmd-m6Asj6nO.mjs → platform-cmd-CLRU3BRb.mjs} +11 -10
  145. package/dist/{platform-cmd-u1j88ggF.mjs → platform-cmd-Cs2LkT5L.mjs} +1 -1
  146. package/dist/{platform-discovery-CLxtixHJ.mjs → platform-discovery-CKeeeD82.mjs} +1 -1
  147. package/dist/{platform-domain-DJSznNTA.mjs → platform-domain-kn3WuKPG.mjs} +6 -5
  148. package/dist/{platform-lifecycle-BC-9p58d.mjs → platform-lifecycle-BoCEYy2w.mjs} +1 -1
  149. package/dist/{platform-lifecycle-GFeXv3NC.mjs → platform-lifecycle-CKwOg8wz.mjs} +244 -104
  150. package/dist/{platform-management-BwHkz46V.mjs → platform-management-CaSdFthX.mjs} +1 -1
  151. package/dist/{platform-management-DX1zINou.mjs → platform-management-fyrsq2Ra.mjs} +27 -14
  152. package/dist/{platform-plans-config-DiydtNKY.mjs → platform-plans-config-BSI-6Inu.mjs} +11 -5
  153. package/dist/{platform-recovery-CnzBbudV.mjs → platform-recovery-PwJ54AIZ.mjs} +3 -3
  154. package/dist/{platform-registry-DHH6fivm.mjs → platform-registry-zHH3RiIm.mjs} +2 -1
  155. package/dist/{platform-setup-Lph9i-rh.mjs → platform-setup-DwYITHfY.mjs} +3 -3
  156. package/dist/{plugin-inference-COlq96WJ.mjs → plugin-inference-D5MjBVMB.mjs} +60 -142
  157. package/dist/prepare-CLl_TA_r.mjs +1 -0
  158. package/dist/{prepare-WvijE289.mjs → prepare-DZEs5AGr.mjs} +3 -3
  159. package/dist/{prepare-co1o1FFd.mjs → prepare-DhVzN7CB.mjs} +14 -12
  160. package/dist/{project-uXKua1it.mjs → project-BXpm-vgG.mjs} +1 -1
  161. package/dist/{project-dh9431bN.mjs → project-DC-BqHef.mjs} +1 -1
  162. package/dist/{project-cmd-BWJTplpc.mjs → project-cmd-BKN3qT4R.mjs} +31 -21
  163. package/dist/{project-paths-2ENfCCih.mjs → project-paths-BeAxxqGh.mjs} +1 -1
  164. package/dist/{project-security-BV1xfj1K.mjs → project-security-B-SHxprt.mjs} +1 -1
  165. package/dist/{project-security-CY_aahvW.mjs → project-security-BWTd6cTU.mjs} +87 -46
  166. package/dist/{project-team-BlIFXlmT.mjs → project-team-jcn9reIB.mjs} +6 -6
  167. package/dist/{project-token-CMsB7I1-.mjs → project-token-BHkBKtzt.mjs} +6 -6
  168. package/dist/{project-tsconfig-BOA4ym99.mjs → project-tsconfig-LjgxDdj_.mjs} +1 -1
  169. package/dist/{project-zero-trust-BI6pdpx4.mjs → project-zero-trust-2t_qI6xa.mjs} +4 -4
  170. package/dist/{protocol-4rEnumif.mjs → protocol-DhMbnxzy.mjs} +120 -35
  171. package/dist/{protocol-ERy-n3jf.d.mts → protocol-wG7JP5Mm.d.mts} +27 -4
  172. package/dist/{provision-DFv7SJDn.mjs → provision-C04aXE3a.mjs} +1 -1
  173. package/dist/{provision-Bh44omGA.mjs → provision-CQykn8gu.mjs} +8 -4
  174. package/dist/{redirect-Dyvuil0Q.mjs → redirect-DjyA_hx_.mjs} +1 -1
  175. package/dist/{requests-CfmJxNYg.mjs → requests-BznxnxTT.mjs} +5 -5
  176. package/dist/resolve-project-Bob_rEi2.mjs +1 -0
  177. package/dist/{resolve-project-8WZ3iVmr.mjs → resolve-project-s_FGWyr-.mjs} +2 -2
  178. package/dist/resource-binding-5nI30acw.mjs +20 -0
  179. package/dist/{resource-name-DlJ9QXzg.mjs → resource-name-D_gw36kh.mjs} +5 -1
  180. package/dist/{rollback-DL5HuAsM.mjs → rollback-CLiINtpt.mjs} +25 -14
  181. package/dist/{route-types-CSed9-Dp.mjs → route-types-DxvqN5bL.mjs} +59 -9
  182. package/dist/{route-url-B41eQ8QI.mjs → route-url-CRC8yR_2.mjs} +2 -3
  183. package/dist/{route-url-Bd6IX-JZ.d.mts → route-url-zDfC-7DD.d.mts} +33 -5
  184. package/dist/routes-stub.d.mts +18 -2
  185. package/dist/routes-stub.mjs +1 -1
  186. package/dist/{runner-CeguHWJx.mjs → runner-CnUrhc8H.mjs} +1 -1
  187. package/dist/{runner-mysql-DOjbj-N1.mjs → runner-mysql-CW6bFa67.mjs} +1 -1
  188. package/dist/{runner-mysql-D549vGGm.mjs → runner-mysql-DSLGFOlC.mjs} +1 -1
  189. package/dist/{runner-pg-Buzw17hl.mjs → runner-pg-BcGF7iBR.mjs} +1 -1
  190. package/dist/{runner-pg-DMJquR3d.mjs → runner-pg-OeP0JpEo.mjs} +1 -1
  191. package/dist/{runner-Bf94YVJK.mjs → runner-rnXCGa20.mjs} +1 -1
  192. package/dist/runtime/ai/index.mjs +1 -1
  193. package/dist/runtime/auth/better-auth-d1.d.mts +1 -1
  194. package/dist/runtime/auth/better-auth-mysql.d.mts +1 -1
  195. package/dist/runtime/auth/better-auth-postgres.d.mts +1 -1
  196. package/dist/runtime/client/fetch-server.mjs +1 -1
  197. package/dist/runtime/client/fetch-stream.mjs +1 -1
  198. package/dist/runtime/client/fetch.mjs +1 -1
  199. package/dist/runtime/client/index.mjs +2 -2
  200. package/dist/runtime/client/react.mjs +2 -2
  201. package/dist/runtime/client/solid.mjs +2 -2
  202. package/dist/runtime/client/svelte.mjs +2 -2
  203. package/dist/runtime/client/vue.mjs +2 -2
  204. package/dist/runtime/durable/index.mjs +11 -26
  205. package/dist/runtime/env/runtime.d.mts +2 -10
  206. package/dist/runtime/handler/index.d.mts +3 -2
  207. package/dist/runtime/handler/index.mjs +2 -2
  208. package/dist/runtime/handler/validator.d.mts +1 -1
  209. package/dist/runtime/handler/validator.mjs +1 -1
  210. package/dist/runtime/html.d.mts +2 -0
  211. package/dist/runtime/html.mjs +1 -0
  212. package/dist/runtime/image/index.d.mts +103 -0
  213. package/dist/runtime/image/index.mjs +89 -0
  214. package/dist/runtime/jsx/index.d.mts +3 -0
  215. package/dist/runtime/jsx/index.mjs +2 -0
  216. package/dist/runtime/jsx/jsx-dev-runtime.d.mts +1 -0
  217. package/dist/runtime/jsx/jsx-dev-runtime.mjs +2 -0
  218. package/dist/runtime/jsx/jsx-runtime.d.mts +1 -0
  219. package/dist/runtime/jsx/jsx-runtime.mjs +2 -0
  220. package/dist/runtime/limits/index.mjs +1 -1
  221. package/dist/runtime/live/client.d.mts +2 -2
  222. package/dist/runtime/live/index.d.mts +1 -1
  223. package/dist/runtime/routing/index.d.mts +87 -4
  224. package/dist/runtime/routing/index.mjs +59 -20
  225. package/dist/runtime/routing/route-url.d.mts +2 -2
  226. package/dist/runtime/routing/route-url.mjs +1 -1
  227. package/dist/runtime/sandbox/index.mjs +1 -1
  228. package/dist/runtime/sse/client.d.mts +1 -1
  229. package/dist/runtime/workflows/entry.d.mts +8 -0
  230. package/dist/runtime/workflows/entry.mjs +49 -0
  231. package/dist/runtime/workflows/index.d.mts +3 -0
  232. package/dist/runtime/workflows/index.mjs +77 -0
  233. package/dist/runtime/ws/index.d.mts +1 -1
  234. package/dist/runtime/ws/index.mjs +2 -2
  235. package/dist/runtime/ws/room.d.mts +1 -1
  236. package/dist/runtime/ws/server.d.mts +2 -2
  237. package/dist/runtime-Db72hLY-.d.mts +11 -0
  238. package/dist/scan-BxhB4BA-.mjs +946 -0
  239. package/dist/scan-D2ISAobj.mjs +308 -0
  240. package/dist/{secret-C-WBaUSS.mjs → secret-Ck9N5xbU.mjs} +9 -8
  241. package/dist/{security-sarif-ClyYwtAW.mjs → security-sarif-DzTIqNwZ.mjs} +1 -1
  242. package/dist/{serialize-DN-envGQ.d.mts → serialize-Dr9B-0yV.d.mts} +10 -1
  243. package/dist/{serialize-BmB4BfKu.mjs → serialize-nW4IeEBI.mjs} +23 -2
  244. package/dist/{skills-C-csz78e.mjs → skills-BR7YHAF7.mjs} +1 -1
  245. package/dist/{scan-Ct_SEzH4.mjs → source-analysis-cache-Ccm_JSOl.mjs} +340 -902
  246. package/dist/standard-schema-DvMcZGMK.mjs +8 -0
  247. package/dist/{subcommand-prompt-B4LOLosl.mjs → subcommand-prompt-AFf2LcrC.mjs} +2 -2
  248. package/dist/{types-FDH6NuY1.d.mts → types-RYVujNS6.d.mts} +4 -2
  249. package/dist/{version-metadata-DqgLa6gc.mjs → untrusted-env-4oW0TdBP.mjs} +1 -23
  250. package/dist/{url-DBQluotE.mjs → url-DAQ1c3lh.mjs} +45 -1
  251. package/dist/{validate-CtBWCzez.mjs → validate-B1PsQ_mt.mjs} +1 -1
  252. package/dist/validate-p9b3r1k4.mjs +1 -0
  253. package/dist/{validation-error-CtcAvyI7.mjs → validation-error-EKI0wMWX.mjs} +2 -2
  254. package/dist/{validator-Dfh9kCDm.mjs → validator-JJcf9E48.mjs} +5 -8
  255. package/dist/version-metadata-CEla0kgi.mjs +23 -0
  256. package/dist/{wrangler-DVe5KV5G.mjs → wrangler-AyMfdVJK.mjs} +34 -69
  257. package/dist/wrangler-BT7qrzWc.mjs +1 -0
  258. package/dist/{wrapper-CcMYpOS8.mjs → wrapper-DPlTBVOx.mjs} +5 -5
  259. package/docs/guide/ai.md +1 -1
  260. package/docs/guide/app-types.md +6 -23
  261. package/docs/guide/auth.md +2 -4
  262. package/docs/guide/database/d1.md +21 -67
  263. package/docs/guide/database/mysql.md +8 -0
  264. package/docs/guide/database/postgresql.md +2 -2
  265. package/docs/guide/database.md +1 -1
  266. package/docs/guide/deployment.md +18 -0
  267. package/docs/guide/edge/prerendering.md +3 -7
  268. package/docs/guide/edge/redirects.md +1 -1
  269. package/docs/guide/edge/revalidation.md +8 -17
  270. package/docs/guide/edge/rewrites.md +1 -1
  271. package/docs/guide/edge/static-assets.md +10 -22
  272. package/docs/guide/email/domains.md +3 -1
  273. package/docs/guide/email/receiving.md +2 -2
  274. package/docs/guide/email/sending.md +3 -1
  275. package/docs/guide/env-vars.md +2 -0
  276. package/docs/guide/image-generation.md +142 -0
  277. package/docs/guide/index.md +17 -15
  278. package/docs/guide/jobs.md +2 -4
  279. package/docs/guide/kv.md +1 -1
  280. package/docs/guide/og-images.md +83 -0
  281. package/docs/guide/pages-routing/actions-and-forms.md +6 -4
  282. package/docs/guide/pages-routing/errors.md +20 -4
  283. package/docs/guide/pages-routing/head.md +5 -5
  284. package/docs/guide/pages-routing/islands.md +4 -14
  285. package/docs/guide/pages-routing/markdown.md +2 -2
  286. package/docs/guide/pages-routing/overview.md +129 -15
  287. package/docs/guide/platform/administration/plans.md +47 -16
  288. package/docs/guide/platform/administration/projects.md +10 -0
  289. package/docs/guide/platform/administration/security-audits.md +76 -30
  290. package/docs/guide/platform/administration/zero-trust.md +1 -1
  291. package/docs/guide/platform/installation/ci.md +0 -4
  292. package/docs/guide/platform/installation/credentials.md +1 -1
  293. package/docs/guide/platform/installation/maintenance.md +11 -9
  294. package/docs/guide/platform/installation/prerequisites.md +3 -1
  295. package/docs/guide/platform/installation/setup.md +7 -15
  296. package/docs/guide/platform/installation/uninstall.md +6 -12
  297. package/docs/guide/project-collaboration.md +1 -4
  298. package/docs/guide/queues.md +6 -8
  299. package/docs/guide/quickstart.md +6 -8
  300. package/docs/guide/sandboxes.md +1 -1
  301. package/docs/guide/self-hosted-platform.md +4 -7
  302. package/docs/guide/server-routing.md +5 -3
  303. package/docs/guide/ssg.md +1 -1
  304. package/docs/guide/type-safety.md +74 -10
  305. package/docs/guide/websockets.md +5 -7
  306. package/docs/guide/workflows.md +122 -0
  307. package/docs/index.md +2 -3
  308. package/docs/integrations/agents.md +3 -16
  309. package/docs/integrations/cloudflare.md +98 -2
  310. package/docs/integrations/frameworks/analog.md +9 -11
  311. package/docs/integrations/frameworks/astro.md +16 -17
  312. package/docs/integrations/frameworks/nuxt.md +11 -13
  313. package/docs/integrations/frameworks/overview.md +18 -20
  314. package/docs/integrations/frameworks/react-router.md +55 -6
  315. package/docs/integrations/frameworks/sveltekit.md +8 -6
  316. package/docs/integrations/frameworks/tanstack-start.md +10 -6
  317. package/docs/integrations/hono.md +27 -12
  318. package/docs/integrations/nodejs-bun-deno.md +10 -2
  319. package/docs/reference/api/database.md +8 -10
  320. package/docs/reference/api/env.md +2 -2
  321. package/docs/reference/api/handlers.md +1 -1
  322. package/docs/reference/api/html.md +45 -0
  323. package/docs/reference/api/pages.md +118 -167
  324. package/docs/reference/api/rewrites.md +5 -5
  325. package/docs/reference/api/types.md +13 -6
  326. package/docs/reference/api/workflows.md +48 -0
  327. package/docs/reference/api.md +7 -1
  328. package/docs/reference/cli/database.md +22 -10
  329. package/docs/reference/cli/deploy.md +49 -4
  330. package/docs/reference/cli/domains.md +7 -3
  331. package/docs/reference/cli/email.md +3 -1
  332. package/docs/reference/cli/platform-installation.md +9 -53
  333. package/docs/reference/cli/platform-security.md +36 -8
  334. package/docs/reference/cli/platform-users.md +11 -1
  335. package/docs/reference/cli/platform-zero-trust.md +1 -1
  336. package/docs/reference/cli/project.md +52 -11
  337. package/docs/reference/cli/setup.md +8 -10
  338. package/docs/reference/cli.md +49 -47
  339. package/docs/reference/config.md +22 -8
  340. package/docs/reference/resource-inference.md +8 -1
  341. package/docs/reference/structure.md +5 -0
  342. package/package.json +52 -25
  343. package/schema.json +20 -1
  344. package/skills/void/SKILL.md +60 -54
  345. package/dist/cf-build-output-Wpk_e5CI.mjs +0 -1
  346. package/dist/cf-worker-settings-BBdlhm9U.mjs +0 -41
  347. package/dist/cli/db-execute-process.d.mts +0 -2
  348. package/dist/cli/db-execute-process.mjs +0 -57
  349. package/dist/cloudflare-user-output-CCR99eQY.mjs +0 -19
  350. package/dist/collect-B6nlSnsb.mjs +0 -1
  351. package/dist/db-args-BvMwAber.mjs +0 -1
  352. package/dist/deploy-Do6FWqon.mjs +0 -2
  353. package/dist/discover-D2KGP3cR.mjs +0 -1
  354. package/dist/entry-Bwb9ev8K.mjs +0 -113
  355. package/dist/gen-vhBDHs3q.mjs +0 -1
  356. package/dist/help-fKPzcTJv.mjs +0 -1
  357. package/dist/isr-config-DiTnL9Tb.mjs +0 -115
  358. package/dist/login-DECm3e9b.mjs +0 -1
  359. package/dist/migrate-C9aoWLvY.mjs +0 -1
  360. package/dist/operator-cmd-CVfK5U0B.mjs +0 -1
  361. package/dist/output-D7K9TWIA.mjs +0 -1
  362. package/dist/platform-args-CMwMoiLp.mjs +0 -1
  363. package/dist/prepare-DcwigRUS.mjs +0 -1
  364. package/dist/providers-D5P8j_8D.d.mts +0 -5
  365. package/dist/resolve-project-YsTH-U9I.mjs +0 -1
  366. package/dist/static-exports-s7P86Ngp.mjs +0 -354
  367. package/dist/validate-CZYUIfR-.mjs +0 -1
  368. package/dist/wrangler-Dq269bjx.mjs +0 -1
  369. package/docs/guide/platform/development/local.md +0 -120
  370. package/docs/guide/platform/development/runtime.md +0 -115
  371. package/docs/guide/platform/development/schema-ci.md +0 -44
  372. package/docs/guide/platform-development.md +0 -16
@@ -1,17 +1,18 @@
1
- import { A as confirm, H as outro, K as select, L as log, U as password, X as text$1, tt as isCancel, z as multiselect } from "./dist-Cr_xGE_K.mjs";
2
1
  import { a as join, c as resolve, n as dirname } from "./dist-DMYe8CZJ.mjs";
2
+ import { a as select, i as password, n as confirm, o as text$1, r as multiselect } from "./interactive-prompts-EK0dilFu.mjs";
3
3
  import { t as Buffer } from "./node-buffer-D7kgjaDs.mjs";
4
- import { a as createSpinner, f as formatUrl, g as note, h as import_picocolors, i as cliCommandName, p as getErrorMessage, y as printSuccess } from "./output-BZLnu0z8.mjs";
4
+ import { a as createSpinner, f as formatUrl, g as note, h as import_picocolors, i as cliCommandName, p as getErrorMessage, y as printSuccess } from "./output-DhJgS6Ve.mjs";
5
5
  import { t as cfAccessHeaders } from "./cf-access-DmkKPcAI.mjs";
6
- import { _ as resolvePinnedApiBaseUrl, o as createDefaultRunWrangler } from "./provision-Bh44omGA.mjs";
7
- import { a as platformManagementSetupPage, c as platformSetupLink, d as planWritesDns, i as platformInstallCommandArguments, l as platformSetupPages, n as formatPlatformSetupPlan, o as platformPromptAnswer, r as openPlatformSetupPage, s as platformSetupFieldHelp, t as formatPlatformInstallCommand, u as planCreatesZone } from "./platform-setup-Lph9i-rh.mjs";
8
- import { o as runCloudflareAuthCommand } from "./cloudflare-auth-eWfhdZCk.mjs";
9
- import { l as resolveCloudflareOperationArgv } from "./cloudflare-process-60r4Z2Zf.mjs";
10
- import { S as writePendingInstallationSecrets, a as latestPlatformWorkerCutoverGeneration, c as normalizePlatformApiUrl, d as platformRegistryDirectory, f as platformWorkerSecretUpdateIntentState, h as readPendingInstallationSecrets, m as readInstallationRecoverySecrets, n as assertPlatformInstallationSlugAvailable, o as listInstallationManifests, p as promoteInstallationSecrets, t as acquirePlatformLifecycleLock, v as resolveInstallationManifest, x as writeInstallationManifest, y as savePlatformConnection } from "./platform-registry-DHH6fivm.mjs";
6
+ import { _ as resolvePinnedApiBaseUrl, o as createDefaultRunWrangler } from "./provision-CQykn8gu.mjs";
7
+ import { a as platformManagementSetupPage, c as platformSetupLink, d as planWritesDns, i as platformInstallCommandArguments, l as platformSetupPages, n as formatPlatformSetupPlan, o as platformPromptAnswer, r as openPlatformSetupPage, s as platformSetupFieldHelp, t as formatPlatformInstallCommand, u as planCreatesZone } from "./platform-setup-DwYITHfY.mjs";
8
+ import { H as outro, L as log, tt as isCancel } from "./dist-BngS28id.mjs";
9
+ import { o as runCloudflareAuthCommand } from "./cloudflare-auth-iOgRurWm.mjs";
10
+ import { d as resolveCloudflareOperationArgv } from "./cloudflare-process-DFNpqV_m.mjs";
11
+ import { S as writePendingInstallationSecrets, a as latestPlatformWorkerCutoverGeneration, c as normalizePlatformApiUrl, d as platformRegistryDirectory, f as platformWorkerSecretUpdateIntentState, h as readPendingInstallationSecrets, m as readInstallationRecoverySecrets, n as assertPlatformInstallationSlugAvailable, o as listInstallationManifests, p as promoteInstallationSecrets, t as acquirePlatformLifecycleLock, v as resolveInstallationManifest, x as writeInstallationManifest, y as savePlatformConnection } from "./platform-registry-zHH3RiIm.mjs";
11
12
  import { t as hasOwnKey } from "./has-own-key-D9QEnAkF.mjs";
12
- import { t as ensurePlatformAccessToken } from "./cf-access-DHklo7Rg.mjs";
13
+ import { t as ensurePlatformAccessToken } from "./cf-access-B21j-nd6.mjs";
13
14
  import { i as updateProjectWorkerRuntimeLogs, n as assertPlatformRuntimeLogsSupported, r as shouldUpdateProjectWorkerRuntimeLogs } from "./platform-runtime-logs-CdJGnk3f.mjs";
14
- import { r as assertPlatformStorageSupported, t as parsePlatformArgs } from "./platform-args-CvZSuhYS.mjs";
15
+ import { r as assertPlatformStorageSupported, t as parsePlatformArgs } from "./platform-args-BnocJDC_.mjs";
15
16
  import { t as writeFileAtomic } from "./atomic-write-DA6eD1Kp.mjs";
16
17
  import { copyFileSync, cpSync, existsSync, lstatSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
17
18
  import { fileURLToPath } from "node:url";
@@ -21,7 +22,7 @@ import { createHash, createHmac, randomBytes, randomUUID } from "node:crypto";
21
22
  import { tmpdir } from "node:os";
22
23
  import { stripVTControlCharacters } from "node:util";
23
24
  import { readFile } from "node:fs/promises";
24
- import { cloudflareCommandDiagnostic, encodeCloudflareVersionMessage, parseCloudflareVersionMessage, readCloudflareTriggerConfig, readCloudflareVersionMigrationTag, stabilizeCloudflareVersionTriggers } from "@void/deploy-cloudflare";
25
+ import { cloudflareCommandDiagnostic, cloudflareVersionAnnotation, encodeCloudflareVersionMessage, parseCloudflareVersionMessage, readCloudflareTriggerConfig, readCloudflareVersionMigrationTag, resolveCloudflareVersionMessage, stabilizeCloudflareVersionTriggers } from "@void/deploy-cloudflare";
25
26
  import { createServer, request } from "node:http";
26
27
  import { setTimeout as setTimeout$1 } from "node:timers/promises";
27
28
  import { createDefaultPlanCatalog, parsePlatformPlanCatalog } from "@void/platform/plans";
@@ -789,6 +790,10 @@ var PlatformCloudflareClient = class PlatformCloudflareClient {
789
790
  throw error;
790
791
  }
791
792
  }
793
+ async hasWorkerDurableObjectBinding(accountId, workerName, className) {
794
+ const { bindings } = await this.request(`/accounts/${encodeURIComponent(accountId)}/workers/scripts/${encodeURIComponent(workerName)}/settings`);
795
+ return bindings.some((binding) => binding.type === "durable_object_namespace" && binding.class_name === className && (binding.script_name === void 0 || binding.script_name === workerName));
796
+ }
792
797
  async getWorkerPlainTextBindings(accountId, workerName) {
793
798
  const settings = await this.request(`/accounts/${encodeURIComponent(accountId)}/workers/scripts/${encodeURIComponent(workerName)}/settings`);
794
799
  const bindings = {};
@@ -1774,7 +1779,9 @@ function secretReference(name) {
1774
1779
  }
1775
1780
  /** Only scoped credentials for the reviewed platform origins enter the process environment. */
1776
1781
  function activatePlatformAccessCredentials(encoded, origins) {
1777
- if (!encoded) return;
1782
+ if (encoded) process.env.VOID_ACCESS_CREDENTIALS = mergePlatformAccessCredentials(encoded, origins);
1783
+ }
1784
+ function mergePlatformAccessCredentials(encoded, origins) {
1778
1785
  const entries = JSON.parse(encoded);
1779
1786
  if (!entries || typeof entries !== "object" || Array.isArray(entries)) throw new Error("platform: Invalid saved Access credentials.");
1780
1787
  const allowed = new Set(origins.map((origin) => new URL(origin).origin));
@@ -1785,7 +1792,7 @@ function activatePlatformAccessCredentials(encoded, origins) {
1785
1792
  }
1786
1793
  const current = process.env.VOID_ACCESS_CREDENTIALS ? JSON.parse(process.env.VOID_ACCESS_CREDENTIALS) : {};
1787
1794
  if (!current || typeof current !== "object" || Array.isArray(current)) throw new Error("platform: VOID_ACCESS_CREDENTIALS must contain an origin-keyed object.");
1788
- process.env.VOID_ACCESS_CREDENTIALS = JSON.stringify({
1795
+ return JSON.stringify({
1789
1796
  ...current,
1790
1797
  ...entries
1791
1798
  });
@@ -4270,9 +4277,8 @@ function readActivePlatformWorkerDeployment(response) {
4270
4277
  */
4271
4278
  async function platformWorkerVersionHasTriggerRecord(readCloudflare, accountId, workerName, versionId) {
4272
4279
  const version = await readCloudflare(`/accounts/${encodeURIComponent(accountId)}/workers/scripts/${encodeURIComponent(workerName)}/versions/${encodeURIComponent(versionId)}`);
4273
- const annotations = version && typeof version === "object" ? version.annotations : null;
4274
- const message = annotations && typeof annotations === "object" ? annotations["workers/message"] : null;
4275
- return parseCloudflareVersionMessage(typeof message === "string" ? message : null)?.schema === 2;
4280
+ const resolved = await resolveCloudflareVersionMessage(cloudflareVersionAnnotation(version), versionId, () => readCloudflare(`/accounts/${encodeURIComponent(accountId)}/workers/workers/${encodeURIComponent(workerName)}/versions/${encodeURIComponent(versionId)}?include=modules`));
4281
+ return parseCloudflareVersionMessage(resolved)?.schema === 2;
4276
4282
  }
4277
4283
  async function readPlatformWorkerDeployments(configPath, accountId, workerName, runner = runPlatformWrangler) {
4278
4284
  const result = await runner({
@@ -4375,9 +4381,12 @@ async function readPlatformWorkerVersionSnapshot(configPath, accountId, workerNa
4375
4381
  const ownershipBindings = Array.isArray(bindings) ? bindings.filter((binding) => binding && typeof binding === "object" && binding.name === "PLATFORM_OWNERSHIP_MARKER" && binding.type === "plain_text" && typeof binding.text === "string") : [];
4376
4382
  if (ownershipBindings.length !== 1 || ownershipBindings[0].text !== expectedOwnershipMarker) throw new PlatformWorkerOwnershipError(`platform: Active Worker version ${versionId} for ${workerName} does not belong to this installation.`);
4377
4383
  await validateCurrentVersion?.();
4378
- const annotations = value.annotations;
4379
- const message = annotations && typeof annotations === "object" && typeof annotations["workers/message"] === "string" ? annotations["workers/message"] ?? null : null;
4380
- const metadata = parseCloudflareVersionMessage(message);
4384
+ const resolved = await resolveCloudflareVersionMessage(cloudflareVersionAnnotation(value), versionId, {
4385
+ configPath,
4386
+ workerName,
4387
+ runWrangler: platformWorkerCommandRunner(accountId, process.cwd(), runner)
4388
+ });
4389
+ const metadata = parseCloudflareVersionMessage(resolved);
4381
4390
  if (metadata?.schema !== 2 && unrecordedTriggerConfig) return {
4382
4391
  migrationTag: readCloudflareVersionMigrationTag(value),
4383
4392
  triggerConfig: unrecordedTriggerConfig,
@@ -4429,8 +4438,9 @@ function recordWorkerSecretUpdateState(manifest, generation, state, intentId, co
4429
4438
  resultHash: intentId
4430
4439
  }, completedAt);
4431
4440
  }
4432
- function workerCutoverUpdatesSecrets(manifest, generation) {
4433
- return manifest.steps.some((step) => step.key === `worker-secret-updates:${generation}:pending`);
4441
+ /** An older version may lack a newly provisioned class or hold a revoked credential. */
4442
+ function workerCutoverRollsForward(manifest, generation) {
4443
+ return manifest.steps.some((step) => step.key === `worker-secret-updates:${generation}:pending` || step.key === `worker-scheduler-migration:${generation}`);
4434
4444
  }
4435
4445
  function recordWorkerCutoverStage(manifest, generation, key, previousVersionId, stagedVersionId, workerName, previousTriggers, completedAt) {
4436
4446
  return recordInstallationStep(manifest, {
@@ -4692,7 +4702,7 @@ async function recoverInterruptedPlatformWorkerCutover(input) {
4692
4702
  const { interruptedCutover, configs, previousConfigs, plan, dependencies, ids, previousPublicEndpoints, hasEmailGatewayArtifact, runPinnedPlatformWrangler, now, writeRemoteInstallationCheckpoint, onManifestChange } = input;
4693
4703
  let { manifest, workerActions } = input;
4694
4704
  if (interruptedCutover) {
4695
- const retainUpdatedCredentials = workerCutoverUpdatesSecrets(manifest, interruptedCutover.generation);
4705
+ const rollForward = workerCutoverRollsForward(manifest, interruptedCutover.generation);
4696
4706
  for (const key of [
4697
4707
  "dispatch",
4698
4708
  "tail",
@@ -4711,13 +4721,13 @@ async function recoverInterruptedPlatformWorkerCutover(input) {
4711
4721
  ...previousConfigs[key],
4712
4722
  name: snapshot.workerName
4713
4723
  }, preservedRoutes);
4714
- if (retainUpdatedCredentials) {
4724
+ if (rollForward) {
4715
4725
  const directory = mkdtempSync(join(tmpdir(), "void-platform-resume-"));
4716
4726
  try {
4717
4727
  const configPath = join(directory, "wrangler.json");
4718
4728
  writeFileSync(configPath, JSON.stringify(recoveryConfig), { mode: 384 });
4719
4729
  const currentVersionId = await readActivePlatformWorkerVersion(configPath, plan.account.id, snapshot.workerName, runPinnedPlatformWrangler);
4720
- if (currentVersionId !== snapshot.stagedVersionId && (snapshot.previousVersionId === null || currentVersionId !== snapshot.previousVersionId)) throw new Error(`Worker ${snapshot.workerName} changed concurrently after the credential update; refusing to overwrite it.`);
4730
+ if (currentVersionId !== snapshot.stagedVersionId && (snapshot.previousVersionId === null || currentVersionId !== snapshot.previousVersionId)) throw new Error(`Worker ${snapshot.workerName} changed concurrently during the retained cutover; refusing to overwrite it.`);
4721
4731
  } finally {
4722
4732
  rmSync(directory, {
4723
4733
  force: true,
@@ -4760,8 +4770,8 @@ async function recoverInterruptedPlatformWorkerCutover(input) {
4760
4770
  });
4761
4771
  }
4762
4772
  }
4763
- manifest = recordWorkerCutoverResolution(manifest, interruptedCutover.generation, retainUpdatedCredentials ? "committed" : "restored", now());
4764
- manifest = recordWorkerTrafficState(manifest, interruptedCutover.generation, !retainUpdatedCredentials && previousPublicEndpoints && interruptedCutover.unsafeTraffic.size === 0, now());
4773
+ manifest = recordWorkerCutoverResolution(manifest, interruptedCutover.generation, rollForward ? "committed" : "restored", now());
4774
+ manifest = recordWorkerTrafficState(manifest, interruptedCutover.generation, !rollForward && previousPublicEndpoints && interruptedCutover.unsafeTraffic.size === 0, now());
4765
4775
  onManifestChange(manifest);
4766
4776
  writeInstallationManifest(manifest);
4767
4777
  await writeRemoteInstallationCheckpoint(dependencies.client, plan, manifest);
@@ -5147,6 +5157,7 @@ async function deployPlatformWorker(config, secrets, options) {
5147
5157
  if (nextTraffic.customDomains.length > 0) await options.publishCustomDomains(workerName, nextTraffic.customDomains);
5148
5158
  if (options.managedRoutes.length > 0) await options.publishRoutes(workerName, options.managedRoutes);
5149
5159
  await options.onTrafficPublished();
5160
+ if (options.provisionsDurableObject) return null;
5150
5161
  const committedVersionId = uploadedVersionId;
5151
5162
  const rollback = () => rollbackPlatformWorker({
5152
5163
  accountId,
@@ -5170,7 +5181,7 @@ async function deployPlatformWorker(config, secrets, options) {
5170
5181
  return rollback;
5171
5182
  } catch (error) {
5172
5183
  const unsafeTraffic = error instanceof PlatformWorkerCustomDomainsChangedError || error instanceof PlatformWorkerRoutesChangedError;
5173
- const rollbackVersionId = activatedVersionId && uploadedVersionId ? uploadedVersionId : null;
5184
+ const rollbackVersionId = activatedVersionId && !options.provisionsDurableObject ? uploadedVersionId : null;
5174
5185
  const recoveryFailures = await recoverFailedPlatformWorkerDeployment({
5175
5186
  checkpointUnsafeTraffic: options.onUnsafeTraffic,
5176
5187
  closeRoutingGate: options.retainNewWorker,
@@ -5341,7 +5352,14 @@ function platformWorkerDeployCallbacks(input) {
5341
5352
  readCloudflare: (path) => client.request(path),
5342
5353
  onStaged: async (previousVersionId, stagedVersionId, previousTriggers) => {
5343
5354
  await checkpoint(async () => {
5344
- await writeManifest(recordWorkerCutoverStage(readManifest(), generation, key, previousVersionId, stagedVersionId, action.name, previousTriggers, now()));
5355
+ const completedAt = now();
5356
+ let next = recordWorkerCutoverStage(readManifest(), generation, key, previousVersionId, stagedVersionId, action.name, previousTriggers, completedAt);
5357
+ if (input.provisionsDurableObject) next = recordInstallationStep(next, {
5358
+ key: `worker-scheduler-migration:${generation}`,
5359
+ resultHash: "SecurityScanScheduler",
5360
+ completedAt
5361
+ }, completedAt);
5362
+ await writeManifest(next);
5345
5363
  });
5346
5364
  },
5347
5365
  onTrafficPublished: async () => {
@@ -5464,6 +5482,7 @@ async function uploadInstallationWorkers(input) {
5464
5482
  key,
5465
5483
  action,
5466
5484
  generation: workerCutoverGeneration,
5485
+ provisionsDurableObject: input.provisionsDurableObject,
5467
5486
  now,
5468
5487
  readManifest: () => state.manifest,
5469
5488
  writeManifest,
@@ -5479,6 +5498,7 @@ async function uploadInstallationWorkers(input) {
5479
5498
  managedRoutes: preserveDisabled ? [] : managedRoutes.filter((route) => route.script === action.name).map((route) => route.pattern),
5480
5499
  preservedRoutes,
5481
5500
  previousConfig: previousWorkerConfig,
5501
+ provisionsDurableObject: input.provisionsDurableObject,
5482
5502
  previousPublicEndpoints,
5483
5503
  ...dependencies.replaceOutsideChanges?.includes(action.name) ? { replaceOutsideChanges: true } : {},
5484
5504
  runner: parallelWorkerUploads ? runParallelPinnedPlatformWrangler : runPinnedPlatformWrangler,
@@ -5824,6 +5844,8 @@ async function enableInstallationServices(input) {
5824
5844
  ...state.manifest,
5825
5845
  deployment: plan.deployment,
5826
5846
  deploymentExecution: runtime.deploymentExecution,
5847
+ managedWorkflows: runtime.managedWorkflows ?? 0,
5848
+ schemaVersion: runtime.managedWorkflows === 1 ? 2 : 1,
5827
5849
  platformVersion: version,
5828
5850
  runtime: runtimeProvenance,
5829
5851
  safetyProtocols: runtime.safetyProtocols,
@@ -5849,8 +5871,14 @@ async function verifyHealthException(access, app, destination) {
5849
5871
  const policy = policies[0];
5850
5872
  if (policies.length !== 1 || policy?.decision !== "bypass" || JSON.stringify(policy.include) !== "[{\"everyone\":{}}]" || policy.require !== void 0 && (!Array.isArray(policy.require) || policy.require.length > 0) || policy.exclude !== void 0 && (!Array.isArray(policy.exclude) || policy.exclude.length > 0)) throw new Error(`platform: The Access policy for ${destination} does not match the reserved health-check exception.`);
5851
5873
  }
5874
+ function verifyPlatformAccessHealthChecks(input) {
5875
+ return reconcilePlatformAccessHealthChecks(input);
5876
+ }
5852
5877
  /** Keep the same path-only exception used by project Zero Trust available during bootstrap. */
5853
- async function ensurePlatformAccessHealthChecks(input) {
5878
+ function ensurePlatformAccessHealthChecks(input) {
5879
+ return reconcilePlatformAccessHealthChecks(input, input.save);
5880
+ }
5881
+ async function reconcilePlatformAccessHealthChecks(input, writeCheckpoint) {
5854
5882
  const appAccess = !input.manifest.steps.some((step) => step.key === "app-access-initialized:v1") && input.checkpoint.appAccessSetupJson ? parsePlatformAppAccessSetup(JSON.parse(input.checkpoint.appAccessSetupJson)) : null;
5855
5883
  if (appAccess && appAccess.accountId !== input.plan.account.id) throw new Error("platform: App access recovery belongs to another Cloudflare account.");
5856
5884
  if (!input.plan.deployment.authentication.accessProtection && !appAccess?.managed) return;
@@ -5873,7 +5901,7 @@ async function ensurePlatformAccessHealthChecks(input) {
5873
5901
  resources: {}
5874
5902
  };
5875
5903
  if (!state || state.version !== 1 || state.accountId !== accountId || input.manifest.account.id !== accountId || state.installationId !== input.manifest.id || state.installationId !== input.plan.installationId || state.nonce !== nonce || !state.resources || typeof state.resources !== "object" || Array.isArray(state.resources)) throw new Error("platform: Access health recovery data belongs to a different installation.");
5876
- const save = () => input.save(JSON.stringify(state));
5904
+ const save = () => writeCheckpoint?.(JSON.stringify(state));
5877
5905
  const inventory = await access.list("apps");
5878
5906
  for (const { key, destination } of platformAccessHealthTargets(input.plan)) {
5879
5907
  const expected = {
@@ -5909,6 +5937,7 @@ async function ensurePlatformAccessHealthChecks(input) {
5909
5937
  if (!recorded?.id) {
5910
5938
  if (spec.mode !== "create") throw new Error(`platform: Configure an Access exception limited to ${destination}, then resume. Void's private probe token still protects this endpoint.`);
5911
5939
  if (inventory.some((app) => app.name === name)) throw new Error("platform: An Access health application with this installation identity already exists. Inspect it before resuming.");
5940
+ if (!writeCheckpoint) continue;
5912
5941
  recorded = {
5913
5942
  name,
5914
5943
  fingerprint,
@@ -5985,7 +6014,7 @@ async function verifyInstalledPlatformAccessProtection(input) {
5985
6014
  }
5986
6015
  const existingWorkers = input.plan.actions.filter((action) => action.kind === "worker" && action.action === "update").map((action) => action.name);
5987
6016
  if (existingWorkers.length) {
5988
- const { verifyProtectionWorkerOrigins } = await import("./platform-auth-protection-DA6Tw8Og.mjs");
6017
+ const { verifyProtectionWorkerOrigins } = await import("./platform-auth-protection-BHPV4MUf.mjs");
5989
6018
  await verifyProtectionWorkerOrigins({
5990
6019
  request: input.client.request.bind(input.client),
5991
6020
  listWorkerDomains: input.client.listWorkerDomains.bind(input.client),
@@ -6005,10 +6034,7 @@ function withAuthentication(deployment, authentication) {
6005
6034
  }
6006
6035
  });
6007
6036
  }
6008
- async function prepareInstallationAuthentication(input) {
6009
- const { state, releaseDatabaseLock, runtime, authenticationProtocolTransition, now, dependencies } = input;
6010
- const { workerSecretUpdateIntent } = state;
6011
- const liveAuthentication = await releaseDatabaseLock.readAuthenticationState?.();
6037
+ function applyInstallationAuthentication({ state, runtime, authenticationProtocolTransition }, liveAuthentication) {
6012
6038
  if (liveAuthentication) {
6013
6039
  state.authenticationEnforcementActive = liveAuthentication.sessionsRequired;
6014
6040
  if (liveAuthentication.sessionsRequired && runtime.authenticationProtocolVersion !== 1) throw new Error("platform: This runtime cannot enforce the active authentication configuration. Use an authentication-compatible runtime.");
@@ -6033,12 +6059,56 @@ async function prepareInstallationAuthentication(input) {
6033
6059
  configurable: true
6034
6060
  })
6035
6061
  };
6062
+ }
6063
+ async function verifyInstallationAccessSetup({ state, dependencies }, liveAuthentication) {
6064
+ const protection = liveAuthentication ? liveAuthentication.protection : state.secrets.authenticationSetupJson ? parsePlatformAuthenticationSetup(JSON.parse(state.secrets.authenticationSetupJson)).protection : null;
6065
+ if (!protection) throw new Error("platform: The active Access protection configuration is unavailable. Restore its database and encrypted setup checkpoint before maintenance.");
6066
+ dependencies.onProgress?.("Verifying current Access policies and protected origins");
6067
+ await (dependencies.verifyAccessProtection ?? verifyInstalledPlatformAccessProtection)({
6068
+ client: dependencies.client,
6069
+ manifest: state.manifest,
6070
+ plan: state.plan,
6071
+ dashboardUrl: platformDashboardUrl(state.plan.deployment),
6072
+ protection,
6073
+ checkpoint: secretCheckpoint(state.secrets, state.workerSecretUpdateIntent)
6074
+ });
6075
+ }
6076
+ function installationAccessCredentials(state) {
6077
+ if (!state.secrets.accessCredentialsJson) return;
6078
+ const credentials = JSON.parse(state.secrets.accessCredentialsJson);
6079
+ if (!credentials || typeof credentials !== "object" || Array.isArray(credentials)) throw new Error("platform: Invalid saved Access credentials.");
6080
+ const origins = [state.plan.apiUrl, state.plan.proxyUrl];
6081
+ return mergePlatformAccessCredentials(JSON.stringify(Object.fromEntries(Object.entries(credentials).filter(([origin]) => origins.includes(origin)))), origins);
6082
+ }
6083
+ async function preflightInstallationAuthentication(input, lock) {
6084
+ const liveAuthentication = await lock.readAuthenticationState?.() ?? null;
6085
+ const preview = {
6086
+ ...input,
6087
+ state: { ...input.state }
6088
+ };
6089
+ applyInstallationAuthentication(preview, liveAuthentication);
6090
+ installationAccessCredentials(preview.state);
6091
+ checkpointAuthenticationResources(preview.state.manifest, preview.state.secrets, preview.state.manifest.updatedAt);
6092
+ if (preview.state.plan.deployment.authentication.accessProtection) {
6093
+ await verifyInstallationAccessSetup(preview, liveAuthentication);
6094
+ if (!input.dependencies.prepareHealthAccess) await verifyPlatformAccessHealthChecks({
6095
+ client: preview.dependencies.client,
6096
+ manifest: preview.state.manifest,
6097
+ plan: preview.state.plan,
6098
+ checkpoint: secretCheckpoint(preview.state.secrets, preview.state.workerSecretUpdateIntent)
6099
+ });
6100
+ }
6101
+ return liveAuthentication;
6102
+ }
6103
+ async function prepareInstallationAuthentication(input) {
6104
+ const { state, releaseDatabaseLock, runtime, now, dependencies, checkedAuthentication } = input;
6105
+ const { authenticationProtocolTransition } = input;
6106
+ const { workerSecretUpdateIntent } = state;
6107
+ const liveAuthentication = checkedAuthentication === void 0 ? await releaseDatabaseLock.readAuthenticationState?.() : checkedAuthentication;
6108
+ applyInstallationAuthentication(input, liveAuthentication);
6036
6109
  const activateAccessCredentials = () => {
6037
- if (!state.secrets.accessCredentialsJson) return;
6038
- const credentials = JSON.parse(state.secrets.accessCredentialsJson);
6039
- if (!credentials || typeof credentials !== "object" || Array.isArray(credentials)) throw new Error("platform: Invalid saved Access credentials.");
6040
- const origins = [state.plan.apiUrl, state.plan.proxyUrl];
6041
- activatePlatformAccessCredentials(JSON.stringify(Object.fromEntries(Object.entries(credentials).filter(([origin]) => origins.includes(origin)))), origins);
6110
+ const credentials = installationAccessCredentials(state);
6111
+ if (credentials !== void 0) process.env.VOID_ACCESS_CREDENTIALS = credentials;
6042
6112
  };
6043
6113
  activateAccessCredentials();
6044
6114
  state.manifest = checkpointAuthenticationResources(state.manifest, state.secrets, now());
@@ -6139,19 +6209,7 @@ async function prepareInstallationAuthentication(input) {
6139
6209
  });
6140
6210
  }
6141
6211
  }
6142
- if (state.plan.deployment.authentication.accessProtection) {
6143
- const protection = liveAuthentication ? liveAuthentication.protection : state.secrets.authenticationSetupJson ? parsePlatformAuthenticationSetup(JSON.parse(state.secrets.authenticationSetupJson)).protection : null;
6144
- if (!protection) throw new Error("platform: The active Access protection configuration is unavailable. Restore its database and encrypted setup checkpoint before maintenance.");
6145
- dependencies.onProgress?.("Verifying current Access policies and protected origins");
6146
- await (dependencies.verifyAccessProtection ?? verifyInstalledPlatformAccessProtection)({
6147
- client: dependencies.client,
6148
- manifest: state.manifest,
6149
- plan: state.plan,
6150
- dashboardUrl: platformDashboardUrl(state.plan.deployment),
6151
- protection,
6152
- checkpoint: secretCheckpoint(state.secrets, workerSecretUpdateIntent)
6153
- });
6154
- }
6212
+ if (checkedAuthentication === void 0 && state.plan.deployment.authentication.accessProtection) await verifyInstallationAccessSetup(input, liveAuthentication);
6155
6213
  if (state.plan.deployment.authentication.accessProtection || appAccessSetupRequired && state.secrets.appAccessSetupJson && JSON.parse(state.secrets.appAccessSetupJson).managed === true) {
6156
6214
  dependencies.onProgress?.("Preparing Access for authenticated platform health checks");
6157
6215
  try {
@@ -6455,10 +6513,13 @@ async function assertProjectZeroTrustAllowsUninstall(read, options = {}) {
6455
6513
  ].join("\n"));
6456
6514
  }
6457
6515
  // src/cli/platform-installer-database.ts
6516
+ function platformDatabaseSchemaStep(database) {
6517
+ return `database-schema:${database.schemaDigest}`;
6518
+ }
6458
6519
  async function preparePlatformDatabaseSchema(manifest, runtime, runtimeDirectory, sourcePlatformVersion, hadPriorWorkers, plan, dependencies, releaseDatabaseLock, now, writeRemoteInstallationCheckpoint, onManifestChange) {
6459
6520
  dependencies.onProgress?.("Checking the platform database schema");
6460
6521
  const rollbackDatabase = dependencies.databaseRollbackSource;
6461
- const migrationStep = `database-schema:${runtime.database.schemaDigest}`;
6522
+ const migrationStep = platformDatabaseSchemaStep(runtime.database);
6462
6523
  if (rollbackDatabase) {
6463
6524
  const verifyDatabase = releaseDatabaseLock.verifyDatabase;
6464
6525
  if (!verifyDatabase) throw new Error("platform: The PostgreSQL lifecycle lock cannot verify the forward-only rollback schema.");
@@ -6687,18 +6748,21 @@ async function inspectPlatformDatabaseStateConnection(client, database) {
6687
6748
  schemaDigest: platformDatabaseSchemaDigest(database.lineage, applied)
6688
6749
  };
6689
6750
  }
6690
- async function preparePlatformDatabaseConnection(client, runtimeDirectory, database, sourcePlatformVersion, hasPriorWorkers) {
6691
- verifyPlatformDatabaseArtifacts(runtimeDirectory, database);
6751
+ async function inspectPlatformDatabaseUpgrade(client, database, sourcePlatformVersion, hasPriorWorkers) {
6692
6752
  const before = await inspectPlatformDatabaseStateConnection(client, database);
6693
6753
  if (before.pendingMigrations.length === 0) {
6694
6754
  if (before.schemaDigest !== database.schemaDigest) throw new Error("platform: PostgreSQL schema digest does not match the packaged runtime.");
6695
- return {
6696
- appliedMigrations: 0,
6697
- previousSchemaDigest: before.schemaDigest,
6698
- schemaDigest: before.schemaDigest
6699
- };
6700
- }
6701
- if (hasPriorWorkers && !database.rollbackSafeFrom.some((entry) => entry.platformVersion === sourcePlatformVersion && entry.schemaDigest === before.schemaDigest)) throw new Error(`platform: Void Platform ${sourcePlatformVersion ?? "unknown"} cannot safely roll back after migrating database schema ${before.schemaDigest} to this release. Upgrade through a supported intermediate version or install into a fresh database.`);
6755
+ } else if (hasPriorWorkers && !database.rollbackSafeFrom.some((entry) => entry.platformVersion === sourcePlatformVersion && entry.schemaDigest === before.schemaDigest)) throw new Error(`platform: Void Platform ${sourcePlatformVersion ?? "unknown"} cannot safely roll back after migrating database schema ${before.schemaDigest} to this release. Upgrade through a supported intermediate version or install into a fresh database.`);
6756
+ return before;
6757
+ }
6758
+ async function preparePlatformDatabaseConnection(client, runtimeDirectory, database, sourcePlatformVersion, hasPriorWorkers) {
6759
+ verifyPlatformDatabaseArtifacts(runtimeDirectory, database);
6760
+ const before = await inspectPlatformDatabaseUpgrade(client, database, sourcePlatformVersion, hasPriorWorkers);
6761
+ if (before.pendingMigrations.length === 0) return {
6762
+ appliedMigrations: 0,
6763
+ previousSchemaDigest: before.schemaDigest,
6764
+ schemaDigest: before.schemaDigest
6765
+ };
6702
6766
  await client.query("BEGIN");
6703
6767
  try {
6704
6768
  await client.query("CREATE SCHEMA IF NOT EXISTS \"drizzle\"");
@@ -6812,8 +6876,14 @@ async function acquirePlatformDatabaseLifecycleLockConnection(client, installati
6812
6876
  ])).rows.length !== 1) throw new Error("platform: The PostgreSQL database ownership claim changed unexpectedly.");
6813
6877
  release.authoritativeManifest = manifest;
6814
6878
  };
6879
+ release.preflightDatabaseUpgrade = async (runtimeDirectory, database, manifest, hasPriorWorkers) => {
6880
+ const schemaStep = platformDatabaseSchemaStep(database);
6881
+ if (manifest.steps.some((step) => step.key === schemaStep)) await verifyPlatformDatabaseConnection(client, runtimeDirectory, database);
6882
+ else await inspectPlatformDatabaseUpgrade(client, database, manifest.platformVersion, hasPriorWorkers);
6883
+ };
6815
6884
  release.prepareDatabase = (runtimeDirectory, database, sourcePlatformVersion, hasPriorWorkers) => preparePlatformDatabaseConnection(client, runtimeDirectory, database, sourcePlatformVersion, hasPriorWorkers);
6816
6885
  release.prepareSandboxDrain = (requiredAdmissionProtocol) => preparePlatformSandboxDrainConnection(client, requiredAdmissionProtocol);
6886
+ release.assertWorkflowRollbackSafe = () => assertWorkflowRollbackSafe(client);
6817
6887
  release.verifyDatabase = (runtimeDirectory, database) => verifyPlatformDatabaseConnection(client, runtimeDirectory, database);
6818
6888
  return release;
6819
6889
  }
@@ -7002,6 +7072,15 @@ async function claimPlatformDatabaseConnection(client, installationId, ownership
7002
7072
  throw error;
7003
7073
  }
7004
7074
  }
7075
+ /** Older runtimes cannot run an existing Workflow, clean up its owner, or parse a catalog saved with Workflow limits. */
7076
+ async function assertWorkflowRollbackSafe(client) {
7077
+ if ((await client.query(`SELECT
7078
+ EXISTS (SELECT 1 FROM resources WHERE type='workflow')
7079
+ OR EXISTS (SELECT 1 FROM project_cleanup_jobs WHERE kind='cf-resource' AND payload->>'type'='workflow')
7080
+ OR EXISTS (SELECT 1 FROM platform_settings, LATERAL jsonb_array_elements(value->'plans') plan
7081
+ WHERE key='plans:catalog' AND (plan->'limits') ?| ARRAY['workflowsPerProject','workflowSchedulesPerProject','workflowMaxConcurrentInstances'])
7082
+ AS in_use`)).rows[0]?.in_use !== false) throw new Error("platform: This installation has Workflow resources or saved Workflow plan limits. Choose a rollback runtime that supports managed Workflows.");
7083
+ }
7005
7084
  // src/cli/platform-install-provisioning.ts
7006
7085
  async function provisionInstallationServices(input) {
7007
7086
  const { state, now, releaseDatabaseLock, dependencies, writeRemoteInstallationCheckpoint, checkpointOperation, externalHyperdriveOriginHash, runtime, runtimeDirectory, sourcePlatformVersion, hadPriorWorkers } = input;
@@ -7457,6 +7536,7 @@ async function installPlatform(plan, secrets, existing, dependencies) {
7457
7536
  assertPlatformStorageSupported(plan.deployment, runtime);
7458
7537
  const hasEmailGatewayArtifact = runtime.artifacts.emailGateway !== void 0;
7459
7538
  if (existing?.steps.some((step) => step.key === "private-previews-initialized:v1") && runtime.privatePreviews !== 1) throw new Error("platform: This installation has private previews. Use a runtime with private preview support.");
7539
+ if (runtime.securityAudits !== 1 && existing?.steps.some((step) => step.key.startsWith("worker-scheduler-migration:"))) throw new Error("platform: Resume this installation with a runtime that exports SecurityScanScheduler.");
7460
7540
  if (runtime.emailProtocolVersion !== 1 && plan.deployment.capabilities.email) throw new Error("platform: This runtime cannot serve enabled platform email without email protocol version 1.");
7461
7541
  if (runtime.emailProtocolVersion !== 1 && existing?.resources.some((resource) => resource.key === "email-gateway-worker" && resource.state === "ready")) throw new Error("platform: This runtime cannot replace an installed email gateway Worker. Use a runtime with email protocol version 1.");
7462
7542
  const workerKeys = hasEmailGatewayArtifact ? [
@@ -7506,6 +7586,7 @@ async function installPlatform(plan, secrets, existing, dependencies) {
7506
7586
  const shouldBootstrapSharedEmail = !preserveDisabled && plan.deployment.capabilities.email && runtime.emailProtocolVersion === 1 && !!plan.deployment.emailSharedZoneId;
7507
7587
  const previousPublicEndpoints = stablePublicEndpointState(existing);
7508
7588
  const authenticationProtocolTransition = hadPriorWorkers && existing?.deployment.authentication.configurable !== true && runtime.authenticationProtocolVersion === 1;
7589
+ let restoredPublicEndpoints = previousPublicEndpoints;
7509
7590
  let workerTrafficGuarded = false;
7510
7591
  let manifest;
7511
7592
  if (!existing) {
@@ -7554,11 +7635,38 @@ async function installPlatform(plan, secrets, existing, dependencies) {
7554
7635
  workerDeploymentCommitted: false,
7555
7636
  authenticationEnforcementActive: false
7556
7637
  };
7638
+ const assertSecretUpdateAuthority = () => assertPlatformWorkerSecretUpdateAuthority({
7639
+ explicitUpdates: explicitWorkerSecretUpdates,
7640
+ localIntent: state.secrets.pendingWorkerSecretUpdateIntent,
7641
+ manifest: state.manifest,
7642
+ requiresEmailSigningSecret: state.manifest.deployment.capabilities.email || state.plan.deployment.capabilities.email
7643
+ });
7644
+ const upgradePreflightLock = dependencies.upgradePreflightLock;
7645
+ const authenticationInput = {
7646
+ state,
7647
+ runtime,
7648
+ authenticationProtocolTransition,
7649
+ dependencies
7650
+ };
7651
+ let checkedAuthentication;
7652
+ const checkWorkflowCompatibility = async (lock) => {
7653
+ if (runtime.managedWorkflows !== 1 && (state.manifest.managedWorkflows === 1 || dependencies.databaseRollbackSource?.manifest.managedWorkflows === 1)) {
7654
+ if (!lock.assertWorkflowRollbackSafe) throw new Error("platform: Cannot check Workflow state on the platform database.");
7655
+ await lock.assertWorkflowRollbackSafe();
7656
+ }
7657
+ };
7658
+ if (upgradePreflightLock) {
7659
+ await checkWorkflowCompatibility(upgradePreflightLock);
7660
+ assertSecretUpdateAuthority();
7661
+ assertPlatformRuntimeSafety(runtime, state.manifest.safetyProtocols, upgradePreflightLock.requiredSafetyProtocols);
7662
+ await upgradePreflightLock.preflightDatabaseUpgrade?.(runtimeDirectory, runtime.database, state.manifest, hadPriorWorkers);
7663
+ checkedAuthentication = await preflightInstallationAuthentication(authenticationInput, upgradePreflightLock);
7664
+ }
7557
7665
  const pendingSecrets = secretCheckpoint(state.secrets, state.workerSecretUpdateIntent);
7558
7666
  writePendingInstallationSecrets(state.manifest, {
7559
7667
  ...pendingSecrets,
7560
7668
  databaseClaimState: "claiming"
7561
- });
7669
+ }, void 0, dependencies.onFirstWrite);
7562
7670
  dependencies.onProgress?.("Preparing the platform database");
7563
7671
  try {
7564
7672
  await (dependencies.claimDatabase ?? claimPlatformDatabase)(state.secrets.databaseUrl, state.manifest.id, state.manifest.ownershipNonce);
@@ -7582,13 +7690,9 @@ async function installPlatform(plan, secrets, existing, dependencies) {
7582
7690
  await releaseDatabaseLock();
7583
7691
  throw new Error("platform: This installation changed on another host. Local state was refreshed; rerun the command to review a current plan.");
7584
7692
  }
7585
- try {
7586
- assertPlatformWorkerSecretUpdateAuthority({
7587
- explicitUpdates: explicitWorkerSecretUpdates,
7588
- localIntent: state.secrets.pendingWorkerSecretUpdateIntent,
7589
- manifest: state.manifest,
7590
- requiresEmailSigningSecret: state.manifest.deployment.capabilities.email || state.plan.deployment.capabilities.email
7591
- });
7693
+ if (!upgradePreflightLock) try {
7694
+ await checkWorkflowCompatibility(releaseDatabaseLock);
7695
+ assertSecretUpdateAuthority();
7592
7696
  } catch (error) {
7593
7697
  await releaseDatabaseLock();
7594
7698
  throw error;
@@ -7610,7 +7714,7 @@ async function installPlatform(plan, secrets, existing, dependencies) {
7610
7714
  };
7611
7715
  let operationStarted = false;
7612
7716
  try {
7613
- assertPlatformRuntimeSafety(runtime, state.manifest.safetyProtocols, releaseDatabaseLock.requiredSafetyProtocols);
7717
+ if (!upgradePreflightLock) assertPlatformRuntimeSafety(runtime, state.manifest.safetyProtocols, releaseDatabaseLock.requiredSafetyProtocols);
7614
7718
  if (existing) await dependencies.verifyExistingOwnership?.(state.manifest, authoritative !== null && authoritative !== void 0);
7615
7719
  const action = dependencies.operation ?? (existing ? "upgrade" : "install");
7616
7720
  const previousOperation = state.manifest.operation;
@@ -7633,12 +7737,10 @@ async function installPlatform(plan, secrets, existing, dependencies) {
7633
7737
  };
7634
7738
  await checkpointOperation("preparing");
7635
7739
  await prepareInstallationAuthentication({
7636
- state,
7740
+ ...authenticationInput,
7637
7741
  releaseDatabaseLock,
7638
- runtime,
7639
- authenticationProtocolTransition,
7640
- now,
7641
- dependencies
7742
+ checkedAuthentication,
7743
+ now
7642
7744
  });
7643
7745
  const provisioned = await provisionInstallationServices({
7644
7746
  state,
@@ -7667,7 +7769,9 @@ async function installPlatform(plan, secrets, existing, dependencies) {
7667
7769
  const createsWorker = state.plan.actions.some((action) => action.kind === "worker" && action.action === "create" && (hasEmailGatewayArtifact || action.key !== "email-gateway-worker"));
7668
7770
  const recoveringCreatedWorker = interruptedCutover !== null && [...interruptedCutover.staged.values()].some((snapshot) => snapshot.previousVersionId === null);
7669
7771
  const requiresSandboxDrain = !preserveDisabled && targetSandboxDrainProtocol >= 1 && sandboxDrainState === "pending";
7670
- const requiresTrafficGuard = !previousPublicEndpoints || hadPriorWorkers && !!state.workerSecretUpdateIntent || !!interruptedCutover && workerCutoverUpdatesSecrets(state.manifest, interruptedCutover.generation) || recoveringUnsafeTraffic || createsWorker || recoveringCreatedWorker || state.manifest.usageProtocolVersion !== targetUsageProtocolVersion || runtime.privatePreviews === 1 && !state.manifest.steps.some((step) => step.key === "private-previews-initialized:v1") || authenticationProtocolTransition || shouldBootstrapSharedEmail || requiresSandboxDrain || !!state.plan.deployment.appAccess && !state.manifest.steps.some((step) => step.key === "app-access-initialized:v1");
7772
+ const apiAction = state.plan.actions.find((action) => action.key === "api-worker");
7773
+ const provisionScheduler = runtime.securityAudits === 1 && apiAction?.action === "update" && !await dependencies.client.hasWorkerDurableObjectBinding(plan.account.id, apiAction.name, "SecurityScanScheduler");
7774
+ const requiresTrafficGuard = provisionScheduler || !previousPublicEndpoints || hadPriorWorkers && !!state.workerSecretUpdateIntent || !!interruptedCutover && workerCutoverRollsForward(state.manifest, interruptedCutover.generation) || recoveringUnsafeTraffic || createsWorker || recoveringCreatedWorker || state.manifest.usageProtocolVersion !== targetUsageProtocolVersion || runtime.privatePreviews === 1 && !state.manifest.steps.some((step) => step.key === "private-previews-initialized:v1") || authenticationProtocolTransition || shouldBootstrapSharedEmail || requiresSandboxDrain || !!state.plan.deployment.appAccess && !state.manifest.steps.some((step) => step.key === "app-access-initialized:v1");
7671
7775
  const configInput = {
7672
7776
  authenticationDatabaseUncached: true,
7673
7777
  proxyHealthBinding: true,
@@ -7698,8 +7802,15 @@ async function installPlatform(plan, secrets, existing, dependencies) {
7698
7802
  publicEndpoints: !preserveDisabled,
7699
7803
  trafficState: preserveDisabled ? "staging" : "enabled"
7700
7804
  });
7805
+ const schedulerConfigs = provisionScheduler ? createPlatformWorkerConfigs({
7806
+ ...configInput,
7807
+ privatePreviews: runtime.privatePreviews === 1,
7808
+ publicEndpoints: !preserveDisabled,
7809
+ trafficState: "staging",
7810
+ deferSecurityScanSchedulerBinding: true
7811
+ }) : null;
7701
7812
  const outsideChangeConfigs = workerKeys.flatMap((key) => {
7702
- const config = enabledConfigs[key];
7813
+ const config = key === "api" && schedulerConfigs ? schedulerConfigs.api : enabledConfigs[key];
7703
7814
  return dependencies.replaceOutsideChanges?.includes(String(config.name)) ? [config] : [];
7704
7815
  });
7705
7816
  if (outsideChangeConfigs.length > 0) await dependencies.uploadOutsideChanges?.(outsideChangeConfigs);
@@ -7755,29 +7866,12 @@ async function installPlatform(plan, secrets, existing, dependencies) {
7755
7866
  state.manifest = next;
7756
7867
  }
7757
7868
  }));
7758
- state.workerCutoverGeneration = nextWorkerCutoverGeneration(state.manifest);
7759
- if (state.workerSecretUpdateIntent) {
7760
- state.workerSecretUpdateIntent = {
7761
- ...state.workerSecretUpdateIntent,
7762
- generation: null
7763
- };
7764
- writePendingInstallationSecrets(state.manifest, secretCheckpoint(state.secrets, state.workerSecretUpdateIntent));
7765
- state.manifest = recordWorkerSecretUpdateState(state.manifest, state.workerCutoverGeneration, "pending", state.workerSecretUpdateIntent.id, now());
7766
- writeInstallationManifest(state.manifest);
7767
- await writeRemoteInstallationCheckpoint(dependencies.client, state.plan, state.manifest);
7768
- state.workerSecretUpdateIntent = {
7769
- ...state.workerSecretUpdateIntent,
7770
- generation: state.workerCutoverGeneration
7771
- };
7772
- writePendingInstallationSecrets(state.manifest, secretCheckpoint(state.secrets, state.workerSecretUpdateIntent));
7773
- }
7774
- await uploadInstallationWorkers({
7869
+ const uploadOptions = {
7775
7870
  state,
7776
7871
  dependencies,
7777
7872
  requiresStagedCommit,
7778
7873
  recoveringUnsafeTraffic,
7779
7874
  workerActions,
7780
- workerKeys,
7781
7875
  workerDeploymentSecrets,
7782
7876
  zoneId,
7783
7877
  now,
@@ -7791,6 +7885,45 @@ async function installPlatform(plan, secrets, existing, dependencies) {
7791
7885
  ids,
7792
7886
  runParallelPinnedPlatformWrangler,
7793
7887
  runPinnedPlatformWrangler
7888
+ };
7889
+ const beginWorkerCutover = async () => {
7890
+ state.workerCutoverGeneration = nextWorkerCutoverGeneration(state.manifest);
7891
+ if (state.workerSecretUpdateIntent) {
7892
+ state.workerSecretUpdateIntent = {
7893
+ ...state.workerSecretUpdateIntent,
7894
+ generation: null
7895
+ };
7896
+ writePendingInstallationSecrets(state.manifest, secretCheckpoint(state.secrets, state.workerSecretUpdateIntent));
7897
+ state.manifest = recordWorkerSecretUpdateState(state.manifest, state.workerCutoverGeneration, "pending", state.workerSecretUpdateIntent.id, now());
7898
+ writeInstallationManifest(state.manifest);
7899
+ await writeRemoteInstallationCheckpoint(dependencies.client, state.plan, state.manifest);
7900
+ state.workerSecretUpdateIntent = {
7901
+ ...state.workerSecretUpdateIntent,
7902
+ generation: state.workerCutoverGeneration
7903
+ };
7904
+ writePendingInstallationSecrets(state.manifest, secretCheckpoint(state.secrets, state.workerSecretUpdateIntent));
7905
+ }
7906
+ };
7907
+ await beginWorkerCutover();
7908
+ if (schedulerConfigs) {
7909
+ const generation = state.workerCutoverGeneration;
7910
+ await uploadInstallationWorkers({
7911
+ ...uploadOptions,
7912
+ workerKeys: ["api"],
7913
+ configs: schedulerConfigs,
7914
+ requiresStagedCommit: true,
7915
+ provisionsDurableObject: true
7916
+ });
7917
+ state.manifest = recordWorkerCutoverResolution(state.manifest, generation, "committed", now());
7918
+ state.manifest = recordWorkerTrafficState(state.manifest, generation, false, now());
7919
+ restoredPublicEndpoints = false;
7920
+ writeInstallationManifest(state.manifest);
7921
+ await writeRemoteInstallationCheckpoint(dependencies.client, state.plan, state.manifest);
7922
+ await beginWorkerCutover();
7923
+ }
7924
+ await uploadInstallationWorkers({
7925
+ ...uploadOptions,
7926
+ workerKeys
7794
7927
  });
7795
7928
  await publishInstallationAiLogging({
7796
7929
  client: dependencies.client,
@@ -7813,6 +7946,8 @@ async function installPlatform(plan, secrets, existing, dependencies) {
7813
7946
  ...state.manifest,
7814
7947
  deployment: state.plan.deployment,
7815
7948
  deploymentExecution: runtime.deploymentExecution,
7949
+ managedWorkflows: runtime.managedWorkflows ?? 0,
7950
+ schemaVersion: runtime.managedWorkflows === 1 ? 2 : 1,
7816
7951
  platformVersion: version,
7817
7952
  runtime: runtimeProvenance,
7818
7953
  updatedAt: now(),
@@ -8003,7 +8138,7 @@ async function installPlatform(plan, secrets, existing, dependencies) {
8003
8138
  dependencies,
8004
8139
  workerTrafficGuarded,
8005
8140
  authenticationProtocolTransition,
8006
- previousPublicEndpoints,
8141
+ previousPublicEndpoints: restoredPublicEndpoints,
8007
8142
  operationStarted,
8008
8143
  now,
8009
8144
  writeRemoteInstallationCheckpoint
@@ -8392,13 +8527,13 @@ function needsReviewUpload(change) {
8392
8527
  * The earlier version of each Worker that the installer makes active again
8393
8528
  * before it deploys. A run that stopped during a Worker cutover left Void's
8394
8529
  * version active, and the next run first restores the earlier one. Like the
8395
- * installer, retain rotated credentials or a configurable sign-in transition
8530
+ * installer, retain a class migration, rotated credentials, or a configurable sign-in transition
8396
8531
  * that already requires sign-in. Every Worker that this check reads exists,
8397
8532
  * so the installation had Workers before.
8398
8533
  */
8399
8534
  async function restoredPlatformWorkerVersions(installation, runtime) {
8400
8535
  const cutover = interruptedWorkerCutover(installation.manifest);
8401
- if (!cutover || workerCutoverUpdatesSecrets(installation.manifest, cutover.generation) || installation.manifest.deployment.authentication.configurable !== true && runtime.manifest.authenticationProtocolVersion === 1 && (await installation.readAuthenticationState?.())?.sessionsRequired === true) return /* @__PURE__ */ new Map();
8536
+ if (!cutover || workerCutoverRollsForward(installation.manifest, cutover.generation) || installation.manifest.deployment.authentication.configurable !== true && runtime.manifest.authenticationProtocolVersion === 1 && (await installation.readAuthenticationState?.())?.sessionsRequired === true) return /* @__PURE__ */ new Map();
8402
8537
  return new Map([...cutover.staged.values()].flatMap((snapshot) => snapshot.previousVersionId === null ? [] : [[snapshot.workerName, snapshot.previousVersionId]]));
8403
8538
  }
8404
8539
  /** Find the existing platform Workers that a run uploads and that were changed outside Void. */
@@ -8669,7 +8804,7 @@ const assertNewNameAvailable = (slug) => {
8669
8804
  };
8670
8805
  async function runPlatformLifecycleCommand(commandArgs) {
8671
8806
  if (commandArgs.subcommand === "domain") {
8672
- const { runPlatformDomainCommand } = await import("./platform-domain-DJSznNTA.mjs");
8807
+ const { runPlatformDomainCommand } = await import("./platform-domain-kn3WuKPG.mjs");
8673
8808
  await runPlatformDomainCommand(commandArgs);
8674
8809
  return;
8675
8810
  }
@@ -8678,7 +8813,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
8678
8813
  const credential = await resolvePlatformCloudflareCredential();
8679
8814
  const client = new PlatformCloudflareClient(credential.token, { credential: platformOperatorCredentialLabel(credential) });
8680
8815
  const accountId = await selectAccount(await withPlatformProgress("Reading Cloudflare accounts", () => readAccounts(client)), commandArgs.account);
8681
- const { recoverPlatformInstallations } = await import("./platform-recovery-CnzBbudV.mjs");
8816
+ const { recoverPlatformInstallations } = await import("./platform-recovery-PwJ54AIZ.mjs");
8682
8817
  const recovered = await withPlatformProgress("Discovering platform installations", () => recoverPlatformInstallations(client, accountId, void 0, commandArgs.selector));
8683
8818
  if (recovered.length === 0) {
8684
8819
  log.info(`No recoverable Void platform installations were found in ${accountId}.`);
@@ -8689,7 +8824,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
8689
8824
  return;
8690
8825
  }
8691
8826
  if (commandArgs.subcommand !== "install") {
8692
- const { runInstalledPlatformCommand } = await import("./platform-management-BwHkz46V.mjs");
8827
+ const { runInstalledPlatformCommand } = await import("./platform-management-CaSdFthX.mjs");
8693
8828
  await runInstalledPlatformCommand(commandArgs);
8694
8829
  return;
8695
8830
  }
@@ -8805,6 +8940,11 @@ async function runPlatformLifecycleCommand(commandArgs) {
8805
8940
  const accounts = await withPlatformProgress("Reading Cloudflare accounts", () => readAccounts(client));
8806
8941
  const accountId = existing ? existing.account.id : await selectAccount(accounts, args.account);
8807
8942
  if (existing && args.account && await selectAccount(accounts, args.account) !== existing.account.id) throw new Error("platform: The installation belongs to a different Cloudflare account.");
8943
+ try {
8944
+ await withPlatformProgress("Checking Workers for Platforms", () => client.listDispatchNamespaces(accountId));
8945
+ } catch (error) {
8946
+ if (error instanceof PlatformCloudflarePrerequisiteError) throw error;
8947
+ }
8808
8948
  const recorded = existing?.deployment;
8809
8949
  if (existing && recorded && isPlatformSetupDraft(existing) && (args.applicationDomain && normalizeApplicationDomain(args.applicationDomain) !== recorded.application.baseDomain || args.zone && normalizeApplicationDomain(args.zone) !== recorded.application.zoneName || args.workersDev && !!recorded.application.zoneName || args.controlPlaneDomain && normalizeApplicationDomain(args.controlPlaneDomain) !== recorded.controlPlane.apiHostname || args.dedicatedZone && !recorded.application.dedicatedZone)) throw new Error("platform: These options differ from the saved setup. Resume its recorded configuration or choose another installation name.");
8810
8950
  let workersDev = !!recorded?.application.workersDev && !recorded.application.zoneName || args.workersDev === true;
@@ -8858,7 +8998,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
8858
8998
  progress?.stop("Read the saved installation.");
8859
8999
  progress = void 0;
8860
9000
  if (authoritative) {
8861
- const { selectAuthoritativePlatformManifest } = await import("./platform-management-BwHkz46V.mjs");
9001
+ const { selectAuthoritativePlatformManifest } = await import("./platform-management-CaSdFthX.mjs");
8862
9002
  const selected = selectAuthoritativePlatformManifest(existing, authoritative);
8863
9003
  authoritativeProvisionIntents = true;
8864
9004
  if (!args.plan && JSON.stringify(selected) !== JSON.stringify(existing)) writeInstallationManifest(selected);
@@ -9351,7 +9491,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
9351
9491
  })).actions.filter((action) => action.kind === "worker"),
9352
9492
  revalidateBeforeWorkerDeploy: (manifest, action) => revalidatePlatformInstallAction(client, plan, manifest, action),
9353
9493
  verifyExistingOwnership: async (manifest, databaseCheckpointExists) => {
9354
- const { verifyPlatformInstallationOwnership } = await import("./platform-management-BwHkz46V.mjs");
9494
+ const { verifyPlatformInstallationOwnership } = await import("./platform-management-CaSdFthX.mjs");
9355
9495
  const retainedReplacementKeys = new Set(plan.actions.filter((action) => {
9356
9496
  const previous = manifest.resources.find((resource) => resource.key === action.key);
9357
9497
  return action.action === "create" && previous && previous.name !== action.name;