void 0.22.0 → 0.23.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 (276) hide show
  1. package/README.md +5 -1
  2. package/dist/{account-cmd-CjyxcGkM.mjs → account-cmd-C84Ee8cO.mjs} +4 -4
  3. package/dist/{scan-ClYmX3sa.mjs → application-analysis-BVsVqc11.mjs} +135 -18
  4. package/dist/application-routing-B7QEjqSR.mjs +27 -0
  5. package/dist/{auth-CZuiVsFh.mjs → auth-CCjt0hcq.mjs} +1 -1
  6. package/dist/{auth-DLNN0D3Z.mjs → auth-CSkdO2Bb.mjs} +4 -47
  7. package/dist/{auth-link-BLO4ptzo.mjs → auth-link-CioEg6uY.mjs} +4 -4
  8. package/dist/{auth-router-ZUg9MF_U.mjs → auth-router-BsR981d4.mjs} +4 -4
  9. package/dist/{better-auth-shared-rsBGBvWJ.mjs → better-auth-shared-hy6RPh9W.mjs} +13 -2
  10. package/dist/{build-cmd-BxR5FROK.mjs → build-cmd-LzvNJORH.mjs} +17 -5
  11. package/dist/{cache-D0sWhgKI.mjs → cache-C4MvnrMH.mjs} +2 -2
  12. package/dist/{cancel-deploy-D4NUqFbi.mjs → cancel-deploy-abUxpP2n.mjs} +2 -2
  13. package/dist/{cf-build-output-BJ6yGEIS.mjs → cf-build-output-BPqOT964.mjs} +2 -1
  14. package/dist/cf-build-output-_0HNWysu.mjs +2 -0
  15. package/dist/cli/cli.mjs +80 -455
  16. package/dist/cli/{cf-compat.mjs → cloudflare-operation-process.mjs} +442 -421
  17. package/dist/cli/env-schema-probe.d.mts +2 -1
  18. package/dist/cli/env-schema-probe.mjs +3 -3
  19. package/dist/client-Cu7jWiF1.mjs +2 -0
  20. package/dist/{client-BTZ3XkrB.mjs → client-RV8NVeB8.mjs} +140 -21
  21. package/dist/{cloudflare-auth-DQkqoMYa.mjs → cloudflare-auth-Qdc7tw8F.mjs} +41 -38
  22. package/dist/{cloudflare-cmd-BKlfGHAy.mjs → cloudflare-cmd-BcrVyTmJ.mjs} +5 -5
  23. package/dist/cloudflare-config-Bktvwtpf.mjs +182 -0
  24. package/dist/{cloudflare-connect-Ctmrw579.mjs → cloudflare-connect-B8uPZ4nx.mjs} +3 -3
  25. package/dist/{cloudflare-operations-BT6OWFBk.mjs → cloudflare-operations-AiWashgg.mjs} +1 -1
  26. package/dist/{cloudflare-operations-B9tzgjmf.mjs → cloudflare-operations-fxHb-byx.mjs} +116 -172
  27. package/dist/{preset-UHj9ARyP.mjs → cloudflare-process-B-wekeR6.mjs} +93 -6
  28. package/dist/{config-VavjpDnp.d.mts → config-BMHb8RCj.d.mts} +1 -0
  29. package/dist/config-C_XRIPx2.mjs +89 -0
  30. package/dist/config-entry.d.mts +1 -1
  31. package/dist/{connect-Dg-WkW-C.mjs → connect-Bd4kJd9U.mjs} +5 -5
  32. package/dist/{create-project-DdoqwFLF.mjs → create-project-Boczwj5r.mjs} +1 -1
  33. package/dist/{create-project-l9J7pbtm.mjs → create-project-bMf6ffLZ.mjs} +2 -2
  34. package/dist/{db-gp2sCXyN.mjs → db-8uG64XLl.mjs} +21 -21
  35. package/dist/{delete-TTedbH6B.mjs → delete-NvbiyeJf.mjs} +2 -2
  36. package/dist/{deploy-CH-o2CaZ.mjs → deploy-DzAIwqNU.mjs} +908 -582
  37. package/dist/{deploy-B19L2Bra.mjs → deploy-bjXdFCtn.mjs} +1 -1
  38. package/dist/{domain-JRF59P_r.mjs → domain-y5Tvydvo.mjs} +3 -3
  39. package/dist/{email-Bo6G9LOZ.mjs → email-B3umsW75.mjs} +13 -28
  40. package/dist/{env-BYOrWQnv.mjs → env-BS6qYHDb.mjs} +4 -4
  41. package/dist/{env-public-BxU_0yTL.d.mts → env-public-BX_r8HR6.d.mts} +1 -1
  42. package/dist/{env-validation-BB4GkLxn.mjs → env-validation-BPn7vk-V.mjs} +18 -71
  43. package/dist/{env-validation-BXge7uyK.mjs → env-validation-DbTg7-ar.mjs} +1 -1
  44. package/dist/{fetch-CXDChK7B.mjs → fetch-BIZJh7vR.mjs} +2 -2
  45. package/dist/{fetch-stream-AOByI7Ki.mjs → fetch-stream-IvCYKyQL.mjs} +24 -4
  46. package/dist/{gen-sCtlCOdA.mjs → gen-B580--vC.mjs} +2 -2
  47. package/dist/gen-BVaUUumi.mjs +2 -0
  48. package/dist/{github-cmd-0-7PexDq.mjs → github-cmd-v45BdfKX.mjs} +2 -2
  49. package/dist/{handler-HEcZsaij.d.mts → handler-CZ4nAylQ.d.mts} +1 -1
  50. package/dist/help-DofyZuY7.mjs +2 -0
  51. package/dist/{help-GKtwl07I.mjs → help-daGKjXGk.mjs} +229 -747
  52. package/dist/index.d.mts +1 -1
  53. package/dist/index.mjs +288 -1502
  54. package/dist/info-B97bTX9N.mjs +113 -0
  55. package/dist/{init-FZx3Elvz.mjs → init-Bvy7zrBo.mjs} +46 -15
  56. package/dist/limits-Bq5LG8Id.d.mts +27 -0
  57. package/dist/limits-Cjuk2VPm.mjs +68 -0
  58. package/dist/{link-BrQfb_CU.mjs → link-CDqqCjFl.mjs} +3 -3
  59. package/dist/{list-D44jmIAM.mjs → list-CZj0dzKY.mjs} +3 -3
  60. package/dist/{live-CKJlvlNp.d.mts → live-Chw1eIMv.d.mts} +1 -1
  61. package/dist/{local-d1-Bg9OzEEO.mjs → local-d1-2CMnpuW_.mjs} +2 -2
  62. package/dist/login-DYt_An22.mjs +2 -0
  63. package/dist/{login-CAsAsQ-_.mjs → login-UZKFM_u7.mjs} +3 -3
  64. package/dist/{logs-BjKvFnVM.mjs → logs-CUZ6t9t3.mjs} +3 -3
  65. package/dist/migrate-8_2u55MD.mjs +2 -0
  66. package/dist/{migrate-BPITvDJN.mjs → migrate-DHul7PRV.mjs} +2 -1
  67. package/dist/{node-Dt7z256D.mjs → node-BkyRWRx8.mjs} +1 -1
  68. package/dist/operator-args-CLgKGlwU.mjs +690 -0
  69. package/dist/{operator-cmd-BK5CCiT9.mjs → operator-cmd-DBA6dl0m.mjs} +68 -22
  70. package/dist/pages/client.d.mts +34 -2
  71. package/dist/pages/client.mjs +59 -3
  72. package/dist/pages/index.d.mts +1 -1
  73. package/dist/pages/index.mjs +1 -1
  74. package/dist/pages/islands-plugin.mjs +1 -1
  75. package/dist/pages/protocol.d.mts +2 -2
  76. package/dist/pages/protocol.mjs +2 -308
  77. package/dist/{parse-filename-DioPHiR9.mjs → parse-filename-CUbj-1MP.mjs} +35 -1
  78. package/dist/plan-D1Q5rf-r.mjs +2 -0
  79. package/dist/plan-NPpwZ_kc.mjs +58 -0
  80. package/dist/platform-args-BJdRtlLq.mjs +506 -0
  81. package/dist/platform-args-D3RXyR6h.mjs +2 -0
  82. package/dist/{platform-auth-config-BlN8xTdD.mjs → platform-auth-config-B56E9YP1.mjs} +3 -3
  83. package/dist/{platform-auth-protection-7d5aV2Jg.mjs → platform-auth-protection-BDWO_aER.mjs} +2 -2
  84. package/dist/{platform-auth-recovery-Dxij8ZbR.mjs → platform-auth-recovery-1gg4CSRe.mjs} +3 -3
  85. package/dist/{platform-cmd-E0FuL212.mjs → platform-cmd-Bt-1w6pY.mjs} +1 -1
  86. package/dist/{platform-cmd-B3hwKrFK.mjs → platform-cmd-DMcQStSc.mjs} +24 -3
  87. package/dist/{platform-domain-D6Xcy9ZX.mjs → platform-domain-BNkcz0OB.mjs} +2 -2
  88. package/dist/{platform-lifecycle-k0E0xoxx.mjs → platform-lifecycle-9OyBALhH.mjs} +327 -215
  89. package/dist/{platform-lifecycle-DMh_qrry.mjs → platform-lifecycle-BE6C_jxh.mjs} +1 -1
  90. package/dist/{platform-management-Brz_BDiT.mjs → platform-management-CjwLVQwN.mjs} +6 -3
  91. package/dist/{platform-management-DOtss0BN.mjs → platform-management-CnyTdcWX.mjs} +1 -1
  92. package/dist/platform-plans-config-BNGKGr4P.mjs +359 -0
  93. package/dist/{platform-recovery-BvtcXON5.mjs → platform-recovery-D6KSpuFm.mjs} +2 -2
  94. package/dist/{plugin-inference-BMfKRSqE.mjs → plugin-inference-CXWnn79A.mjs} +174 -64
  95. package/dist/{prepare-C-6YZyyg.mjs → prepare-B5Mkic5u.mjs} +1 -1
  96. package/dist/{prepare-CRhJbVrG.mjs → prepare-DOsL0CC9.mjs} +4 -20
  97. package/dist/prepare-cgvDMtSb.mjs +2 -0
  98. package/dist/{project-cmd-BZLCqOqw.mjs → project-cmd-CNzrqvBv.mjs} +16 -16
  99. package/dist/{project-team-BvgM0WoX.mjs → project-team-DQOWPfQT.mjs} +2 -2
  100. package/dist/{project-token-l5DqK6Az.mjs → project-token-CTDYU0Cc.mjs} +2 -2
  101. package/dist/{project-zero-trust-v6Mvpp8y.mjs → project-zero-trust-BNAkW-_0.mjs} +2 -2
  102. package/dist/{protocol-BBa6cstI.d.mts → protocol-CjF_iI9X.d.mts} +2 -2
  103. package/dist/protocol-U7bfjHmA.mjs +331 -0
  104. package/dist/{provision-Fr9pRqce.mjs → provision-C4ORE7G7.mjs} +1 -1
  105. package/dist/{provision-C4IGqkBf.mjs → provision-CJFgTZY8.mjs} +89 -198
  106. package/dist/{requests-DN-BbNiM.mjs → requests-MhxYnau8.mjs} +2 -2
  107. package/dist/resource-name-C7LVpcRm.mjs +11 -0
  108. package/dist/{rollback-D7rzSaZM.mjs → rollback-CJ6iSDoU.mjs} +3 -3
  109. package/dist/route-url-CG7U-cRN.mjs +15 -0
  110. package/dist/{runner-B8wXwWlo.mjs → runner-CXA9Fh8h.mjs} +1 -1
  111. package/dist/{runner-p-dMs2UN.mjs → runner-Ol0TNjk6.mjs} +2 -2
  112. package/dist/runtime/ai.d.mts +12 -8
  113. package/dist/runtime/ai.mjs +84 -17
  114. package/dist/runtime/better-auth-mysql.mjs +1 -1
  115. package/dist/runtime/better-auth-pg.mjs +1 -1
  116. package/dist/runtime/better-auth.mjs +1 -1
  117. package/dist/runtime/client-react.mjs +2 -2
  118. package/dist/runtime/client-solid.mjs +2 -2
  119. package/dist/runtime/client-svelte.mjs +2 -2
  120. package/dist/runtime/client-vue.mjs +2 -2
  121. package/dist/runtime/client.mjs +2 -2
  122. package/dist/runtime/durable.d.mts +3 -1
  123. package/dist/runtime/durable.mjs +4 -1
  124. package/dist/runtime/email/testing.mjs +1 -1
  125. package/dist/runtime/env-public.d.mts +1 -1
  126. package/dist/runtime/fetch-stream.mjs +1 -1
  127. package/dist/runtime/fetch.mjs +1 -1
  128. package/dist/runtime/handler.d.mts +1 -1
  129. package/dist/runtime/kv.mjs +0 -1
  130. package/dist/runtime/limits.d.mts +2 -0
  131. package/dist/runtime/limits.mjs +2 -0
  132. package/dist/runtime/live-client.d.mts +1 -1
  133. package/dist/runtime/live-server.mjs +25 -16
  134. package/dist/runtime/live.d.mts +1 -1
  135. package/dist/runtime/migration-handler.mjs +62 -42
  136. package/dist/runtime/route-url.d.mts +4 -0
  137. package/dist/runtime/route-url.mjs +2 -0
  138. package/dist/runtime/routing.d.mts +180 -0
  139. package/dist/runtime/routing.mjs +1082 -0
  140. package/dist/runtime/sandbox-container.d.mts +1 -1
  141. package/dist/runtime/sandbox-container.mjs +1 -1
  142. package/dist/runtime/sandbox.d.mts +3 -3
  143. package/dist/runtime/sandbox.mjs +75 -45
  144. package/dist/runtime/sse.mjs +1 -1
  145. package/dist/runtime/validator.d.mts +1 -1
  146. package/dist/runtime/ws-server.d.mts +4 -2
  147. package/dist/runtime/ws-server.mjs +27 -2
  148. package/dist/runtime/ws.d.mts +2 -2
  149. package/dist/runtime/ws.mjs +8 -6
  150. package/dist/{sandbox-qpNBT8a3.d.mts → sandbox-XZAqzFlG.d.mts} +11 -8
  151. package/dist/{sandbox-container-DdNEBfCc.d.mts → sandbox-container-Bo0eiFKz.d.mts} +2 -1
  152. package/dist/{sandbox-container-4fdqLnyb.mjs → sandbox-container-C6ItmVuN.mjs} +4 -2
  153. package/dist/{scan-4tfN-PSn.mjs → scan-C7okrLyM.mjs} +4 -35
  154. package/dist/{secret-BOtOl_cb.mjs → secret-Dli5fP0B.mjs} +4 -4
  155. package/dist/{sse-BaC1jXko.mjs → sse-CQNaDFFV.mjs} +6 -3
  156. package/dist/validate-Dq_L3s0S.mjs +2 -0
  157. package/dist/{validate-CIUwFpjB.mjs → validate-ctOrgiS3.mjs} +2 -1
  158. package/dist/{wrangler-DQF1vKyf.mjs → wrangler-7K-bW_DL.mjs} +8 -239
  159. package/dist/{ws-BoY7vQML.d.mts → ws-CL1w7GXU.d.mts} +13 -2
  160. package/package.json +15 -8
  161. package/skills/migrate-vite-cloudflare-to-void/SKILL.md +34 -157
  162. package/skills/void/SKILL.md +50 -135
  163. package/skills/void/docs/guide/ai.md +94 -84
  164. package/skills/void/docs/guide/app-types.md +3 -32
  165. package/skills/void/docs/guide/auth.md +12 -116
  166. package/skills/void/docs/guide/database/d1.md +9 -54
  167. package/skills/void/docs/guide/database/mysql.md +1 -1
  168. package/skills/void/docs/guide/database/postgresql.md +5 -26
  169. package/skills/void/docs/guide/database.md +23 -75
  170. package/skills/void/docs/guide/deployment.md +27 -113
  171. package/skills/void/docs/guide/durable-state.md +43 -18
  172. package/skills/void/docs/guide/edge/headers.md +3 -47
  173. package/skills/void/docs/guide/edge/prerendering.md +5 -20
  174. package/skills/void/docs/guide/edge/redirects.md +11 -64
  175. package/skills/void/docs/guide/edge/revalidation.md +5 -18
  176. package/skills/void/docs/guide/edge/rewrites.md +56 -284
  177. package/skills/void/docs/guide/edge/static-assets.md +22 -72
  178. package/skills/void/docs/guide/email/domains.md +112 -0
  179. package/skills/void/docs/guide/email/receiving.md +139 -0
  180. package/skills/void/docs/guide/email/sending.md +231 -0
  181. package/skills/void/docs/guide/email.md +13 -619
  182. package/skills/void/docs/guide/env-migration.md +11 -11
  183. package/skills/void/docs/guide/env-vars.md +9 -29
  184. package/skills/void/docs/guide/index.md +0 -15
  185. package/skills/void/docs/guide/jobs.md +3 -18
  186. package/skills/void/docs/guide/kv.md +5 -11
  187. package/skills/void/docs/guide/live.md +5 -56
  188. package/skills/void/docs/guide/pages-routing/actions-and-forms.md +78 -125
  189. package/skills/void/docs/guide/pages-routing/head.md +10 -10
  190. package/skills/void/docs/guide/pages-routing/islands.md +6 -36
  191. package/skills/void/docs/guide/pages-routing/layouts.md +6 -128
  192. package/skills/void/docs/guide/pages-routing/loaders.md +3 -19
  193. package/skills/void/docs/guide/pages-routing/markdown.md +13 -171
  194. package/skills/void/docs/guide/pages-routing/overview.md +7 -17
  195. package/skills/void/docs/guide/pages-routing/view-transitions.md +1 -1
  196. package/skills/void/docs/guide/platform/administration/access.md +1 -4
  197. package/skills/void/docs/guide/platform/administration/email.md +35 -8
  198. package/skills/void/docs/guide/platform/administration/operations.md +26 -4
  199. package/skills/void/docs/guide/platform/administration/plans.md +126 -0
  200. package/skills/void/docs/guide/platform/administration/projects.md +5 -2
  201. package/skills/void/docs/guide/platform/administration/zero-trust.md +23 -152
  202. package/skills/void/docs/guide/platform/development/runtime.md +3 -13
  203. package/skills/void/docs/guide/platform/development/schema-ci.md +0 -58
  204. package/skills/void/docs/guide/platform/installation/credentials.md +6 -4
  205. package/skills/void/docs/guide/platform/installation/domains.md +30 -2
  206. package/skills/void/docs/guide/platform/installation/first-deployment.md +2 -0
  207. package/skills/void/docs/guide/platform/installation/maintenance.md +3 -1
  208. package/skills/void/docs/guide/platform/installation/prerequisites.md +20 -15
  209. package/skills/void/docs/guide/platform/installation/setup.md +9 -5
  210. package/skills/void/docs/guide/platform-administration.md +1 -0
  211. package/skills/void/docs/guide/queues.md +7 -9
  212. package/skills/void/docs/guide/quickstart.md +38 -37
  213. package/skills/void/docs/guide/remote-dev.md +4 -9
  214. package/skills/void/docs/guide/sandboxes.md +29 -21
  215. package/skills/void/docs/guide/server-routing.md +9 -72
  216. package/skills/void/docs/guide/sse.md +4 -18
  217. package/skills/void/docs/guide/ssg.md +3 -15
  218. package/skills/void/docs/guide/ssr.md +14 -62
  219. package/skills/void/docs/guide/storage.md +9 -4
  220. package/skills/void/docs/guide/type-safety.md +3 -14
  221. package/skills/void/docs/guide/typed-fetch.md +3 -7
  222. package/skills/void/docs/guide/websockets.md +68 -40
  223. package/skills/void/docs/integrations/agents.md +3 -3
  224. package/skills/void/docs/integrations/cloudflare.md +85 -316
  225. package/skills/void/docs/integrations/frameworks/analog.md +5 -64
  226. package/skills/void/docs/integrations/frameworks/astro.md +4 -73
  227. package/skills/void/docs/integrations/frameworks/nuxt.md +5 -62
  228. package/skills/void/docs/integrations/frameworks/overview.md +11 -54
  229. package/skills/void/docs/integrations/frameworks/react-router.md +5 -60
  230. package/skills/void/docs/integrations/frameworks/sveltekit.md +6 -65
  231. package/skills/void/docs/integrations/frameworks/tanstack-start.md +4 -62
  232. package/skills/void/docs/integrations/nodejs-bun-deno.md +5 -69
  233. package/skills/void/docs/reference/api/auth.md +156 -0
  234. package/skills/void/docs/reference/api/client.md +87 -0
  235. package/skills/void/docs/reference/api/database.md +95 -0
  236. package/skills/void/docs/reference/api/durable.md +46 -0
  237. package/skills/void/docs/reference/api/env.md +50 -0
  238. package/skills/void/docs/reference/api/handlers.md +254 -0
  239. package/skills/void/docs/reference/api/pages.md +241 -0
  240. package/skills/void/docs/reference/api/plugin.md +39 -0
  241. package/skills/void/docs/reference/api/resources.md +109 -0
  242. package/skills/void/docs/reference/api/rewrites.md +76 -0
  243. package/skills/void/docs/reference/api/types.md +92 -0
  244. package/skills/void/docs/reference/api.md +56 -1218
  245. package/skills/void/docs/reference/cli/auth.md +88 -0
  246. package/skills/void/docs/reference/cli/database.md +128 -0
  247. package/skills/void/docs/reference/cli/deploy.md +85 -0
  248. package/skills/void/docs/reference/cli/domains.md +41 -0
  249. package/skills/void/docs/reference/cli/email.md +129 -0
  250. package/skills/void/docs/reference/cli/generate.md +116 -0
  251. package/skills/void/docs/reference/cli/github.md +189 -0
  252. package/skills/void/docs/reference/cli/platform-config.md +92 -0
  253. package/skills/void/docs/reference/cli/platform-email.md +81 -0
  254. package/skills/void/docs/reference/cli/platform-installation.md +127 -0
  255. package/skills/void/docs/reference/cli/platform-operations.md +90 -0
  256. package/skills/void/docs/reference/cli/platform-users.md +89 -0
  257. package/skills/void/docs/reference/cli/platform-zero-trust.md +45 -0
  258. package/skills/void/docs/reference/cli/platform.md +70 -0
  259. package/skills/void/docs/reference/cli/project.md +214 -0
  260. package/skills/void/docs/reference/cli/secrets.md +76 -0
  261. package/skills/void/docs/reference/cli/setup.md +70 -0
  262. package/skills/void/docs/reference/cli.md +32 -1682
  263. package/skills/void/docs/reference/config.md +12 -18
  264. package/skills/void/docs/reference/resource-inference.md +3 -58
  265. package/skills/void/docs/reference/structure.md +14 -41
  266. package/dist/canonical-json-DuDiiUsQ.mjs +0 -13
  267. package/dist/client-Czz8o5jP.mjs +0 -2
  268. package/dist/gen-CNJ62MM7.mjs +0 -2
  269. package/dist/help-CmZzxUba.mjs +0 -2
  270. package/dist/login-CGcRKEoi.mjs +0 -2
  271. package/dist/migrate-CYfbKkXh.mjs +0 -2
  272. package/dist/plan-BEZ8VJW0.mjs +0 -256
  273. package/dist/plan-DpuOr14e.mjs +0 -2
  274. package/dist/prepare-Bm3iq-u4.mjs +0 -2
  275. package/dist/validate-EKmJWxmy.mjs +0 -2
  276. /package/dist/cli/{cf-compat.d.mts → cloudflare-operation-process.d.mts} +0 -0
@@ -1,129 +1,29 @@
1
1
  ---
2
2
  name: void
3
- description: Void skill for app development and CLI operations. Use this skill to route user requests to the appropriate bundled Void docs.
3
+ description: Build Void apps and use the Void CLI by loading the relevant bundled guides and references.
4
4
  ---
5
5
 
6
- # Void Skill
6
+ # Void
7
7
 
8
- This skill is a router. Open the minimum relevant docs files under `docs/` and execute.
8
+ Read only the guides needed for the user's task. The bundled documentation lives
9
+ under `docs/` beside this skill; in an installed project it is available at
10
+ `node_modules/void/skills/void/docs/`.
9
11
 
10
- Docs in this skill are bundled from `docs/` during `void` package build and live at:
12
+ Before running a Void command, find its group in `docs/reference/cli.md`, then
13
+ read the matching page under `docs/reference/cli/` for syntax, options, and
14
+ deployment target. Use Void commands for application and platform
15
+ workflows. Mention Wrangler only when the user needs to recognize a literal
16
+ configuration file or environment variable.
11
17
 
12
- - `skills/void/docs/**/*.md`
13
-
14
- `void init --agents` always writes brief instructions to `AGENTS.md`, pointing to `node_modules/void/skills/void/docs/`. It preserves content outside its versioned block, leaves other instruction files untouched, and links skills for detected agents without asking which agent is in use.
15
-
16
- `void init` offers Git initialization with `--git` / `--no-git` overrides and suggests an optional initial commit command. It preserves existing repositories and never commits automatically; see `docs/reference/cli.md` for CI and workspace behavior.
17
-
18
- ## Command Naming
19
-
20
- For a new platform installation, prefer an app domain at the zone apex. Nested
21
- app domains need an active wildcard edge certificate and SSL-and-Certificates
22
- read permission; `void platform install --plan` verifies coverage. Use the
23
- self-hosted platform guide for certificate setup rather than enabling a paid
24
- product without an explicit request.
25
-
26
- For first-time platform setup, follow the installation pages linked from `docs/guide/self-hosted-platform.md` in order and introduce credentials when the user reaches that step. Recommend a domain; offer explicit `void platform install --workers-dev` for testing before one is ready. PostgreSQL, credentials for the selected login methods, runtime/R2 credentials, and saved signing/encryption keys are required. GitHub is the default and is optional. `--auth-config` accepts nonsecret provider configuration with environment secret references; `--plan` does not read those secrets. Configurable installations finish first-administrator setup using a one-time code and browser identity confirmation. Domain-free installation skips zone/DNS/certificate operations and can use browser login. `void platform domain set <domain>` later performs resumable DNS/HTTPS setup while preserving existing test URLs and the API origin. The command checks the deployed runtime token's cache-purge permission for the new zone; it does not ask users to retrieve that token. Interactive installation asks whether Void should create Hyperdrive or use a separately managed one; if the latter is missing, it gives setup instructions and stops before provisioning. It still prompts for the owner PostgreSQL URL. Prefer interactive prompts for secrets and keep CI variables in the CI workflow. Void creates the platform infrastructure and database tables.
27
-
28
- For an existing Cloudflare site, run `void deploy` with its root `wrangler.jsonc` or `wrangler.json`. An unlinked project gets a prompt to link and deploy using the existing Worker and resources. Accepting verifies and saves the destination, migrates the root config to `void.config.ts` and `void.lock.json`, then continues deployment. Keep new application resources, migrations, auth setup, and secret changes separate from this first handoff; ISR has its own explicit cache choice. The active Worker Version must be the latest upload so inherited secrets have an unambiguous source. Failed builds retain the link for retry. Read `docs/integrations/cloudflare.md` for the supported configuration and rollback behavior.
29
-
30
- When linking reports missing inferred resources, check the listed bindings and inference reasons against the existing Worker and `void.config.ts`; preserve `.void/cloudflare-link.json` for retries. For prerendered/revalidated sites without a cache, migration saves an explicit `routing.isr` choice in `void.config.ts`. True provisions the cache during this deployment; false keeps ISR disabled on retries and later deployments until changed. Keep page-level exports with either choice. CI must configure the boolean before resuming a migration with no saved choice. An application KV binding explicitly named `ISR_CACHE` is still required. Existing D1 bindings without checked-in migrations retain their local migration settings during handoff.
31
-
32
- For Cloudflare upload failures, use the detailed error message printed by the CLI and saved in the deploy log. A numeric error code alone may not identify the cause.
33
-
34
- Platform administration uses `void platform auth login` and the nested
35
- `user`, `project`, `deployment`, `build`, `signup`, `invitation`, `email`, `system`, and
36
- hosted-only `worker` groups. Open the operator section of `docs/reference/cli.md`
37
- before running these commands. Use `--json` for structured reads and `--plan`
38
- to inspect mutations; approved noninteractive mutations require `--yes`.
39
- The last active administrator cannot be deleted or suspended. If an allowed
40
- administrator removal reports partial cleanup, access remains revoked; use a
41
- remaining administrator to inspect the result and retry.
42
- Use `void platform config auth` to configure login methods; `platform auth`
43
- manages your administrator session. Test a pending configuration before enabling
44
- it, explicitly link identities when switching methods, and verify a linked
45
- alternative before disabling a method. Disabling revokes its human sessions,
46
- including human tokens used in CI, while scoped deployment tokens remain valid.
47
- Create CI credentials with `void project token create`; they are bound to one
48
- project, expire within 90 days, and support explicit renewal and revocation.
49
- Cloudflare Access service credentials pass only the perimeter and never renew or
50
- elevate a human or operator token.
51
- For scripted configuration, use nonsecret JSON with `--file` and read secrets
52
- with `--client-secret-env`; never put client secrets in command arguments.
53
- Use `void platform config auth admission` to select company-approved automatic
54
- signup when the organization's identity policy already determines eligibility;
55
- individual invitations remain optional. The same controls are available under
56
- Settings in the administrator UI.
57
- Access login and platform protection are independent. The installer can create
58
- dedicated Access applications or connect existing ones, including a separate
59
- identity account. Protection setup verifies API/proxy coverage and uses scoped
60
- service credentials for installation and CI. Use `platform config auth protection`
61
- to show, enable, or disable protection; retain the company gate when probes fail.
62
- Users link another enabled method with `void account link [connection-id]` after
63
- recent sign-in and explicit browser identity confirmation. For expired first-admin
64
- codes, resume installation or repair completed provisioning. Lost-provider recovery
65
- uses `platform config auth recover` with installation ownership, original recovery
66
- keys, an existing administrator ID, and a real provider login; never reopen signup.
67
- Operator credentials are separate from application deployment credentials and
68
- ignore repository platform selections. `VOID_OPERATOR_TOKEN` requires an
69
- explicit `VOID_API_URL` or `--connection`; credentials must never be written to
70
- project files. `signup open` allows public signup and `signup restrict` enforces
71
- the allowlist. For OIDC identities without verified email, use `signup allow identity
72
- <connection-id> <subject>` and the exact `signup disallow` counterpart; never infer an
73
- email or link accounts. Inspect `system events` and the target object after an ambiguous
74
- mutation failure before retrying.
75
-
76
- Use `void connect` for deployment onboarding: no arguments offers Cloudflare or a Void platform, `--platform cloudflare` signs in and selects an account, and a platform URL verifies discovery and signs in with a supported provider. It preserves existing project links when connecting elsewhere. `--no-login` saves only verified Void connection metadata; authenticated headless connection requires a valid origin-scoped keychain session or `VOID_TOKEN` with matching `VOID_API_URL`. Platform installation and administration use `void platform`.
77
-
78
- For Void platform project access, use `void project team`: invite only an email already registered on that platform and assign `reader`, `collaborator`, or `admin`. The invited account uses `void connect <url>` followed by pending/accept/decline on that active connection, regardless of the current directory's project link or deploy target. `VOID_API_URL` overrides the connection; an unscoped `VOID_TOKEN` selects Void Cloud. Acceptance preserves directory links; run `void project link` in an unlinked checkout of the invited application. Project-scoped team management does not apply to direct Cloudflare deployments. Installation administrators transfer ownership with `void platform project owner <project-id> <user-id> --plan` and apply the reviewed transfer with `--yes`.
79
-
80
- For a self-hosted platform's project Zero Trust policy, installation administrators use `void platform zero-trust`; pass the Access management token only through `--token-stdin`. Project owners and project administrators use `void project zero-trust status|protect|public|reconcile`; these commands do not apply to direct Cloudflare deployments. When a deploy or rollback is refused because protection is not settled, check `void project zero-trust status`; an owner or project administrator can run `void project zero-trust reconcile` before retrying.
81
-
82
- Use Void commands for every user-facing workflow. Never ask the user to install, authenticate, or run Wrangler directly. Say Cloudflare or Void instead, except when naming literal `wrangler.jsonc` / `wrangler.json` files or `WRANGLER_*` environment variables the user must inspect.
83
-
84
- `void auth login|status|logout` follows the saved deploy destination or asks the user to choose; `void account` explicitly manages a Void platform account.
85
-
86
- Use `void` in examples and commands in this skill. For first-time setup, prefer `void init` followed by `void deploy`; in an empty directory, install `void` first and let `void init` add the matching Pages adapter and starter dependencies with Vite+ as the default scaffold toolchain. In an existing app, `void init` configures Void in place by adding missing Vite scripts and creating or patching `vite.config.*` with `voidPlugin()`. For Cloudflare deployment, Void uses bundled tooling and secure browser OAuth; init or the first deploy saves the selected `account_id`, and `void cloudflare login|status|logout` manages the session; Void-managed deployment requires an explicitly connected platform. Use `void connect <url>` for an existing platform or `void platform install --plan` to preview a company control plane in the user's Cloudflare account. The core self-hosted platform excludes the dashboard, GitHub App, and build Containers; lifecycle commands are resumable and verify remote, Worker, and R2 ownership before mutations. `void platform disable` gates traffic through installation-owned routing storage and remains disabled through repair or upgrade; `void platform enable` explicitly restores traffic. Safe uninstall retains name-addressed Workers, R2, AI Gateway, external PostgreSQL, and zones for explicit manual cleanup. Direct Cloudflare deploys support native Void apps, static/SPA/SSG output, and Cloudflare builds from TanStack Start, React Router, vinext, SvelteKit, Nuxt, Analog, and Astro. They provision inferred resources, validate and apply migrations, require schema-declared server values in encrypted remote secret storage, upload and probe an immutable Worker Version, then activate and synchronize triggers. Native Void features are Workers Free-compatible by default; `void/sandbox` is an explicit exception because it uses Cloudflare Containers and therefore requires Workers Paid. A Sandbox deploy checks Containers access before provisioning/building, while apps without Sandbox perform no entitlement probe. Versions without preview URLs are staged at 0% and probed through workers.dev using a version override; the same safe fallback applies when Access blocks a generated preview alias but admits the stable Worker hostname. Set `CLOUDFLARE_WORKERS_SUBDOMAIN` in a fresh CI checkout, while local deploys cache it automatically. When Cloudflare Access protects `workers.dev`, use an admitted `CF_ACCESS_CLIENT_ID` / `CF_ACCESS_CLIENT_SECRET` service-token pair for CI, or a short-lived `CF_ACCESS_TOKEN` from `cloudflared` for an interactive local readiness probe. With Cloudflare saved in `.void/project.json`, secret, domain, project status/log/rollback, and remote database commands operate directly on the pinned Worker/account. Logs are a live tail. Rollback restores the selected version's saved schedules, queues, workflows, routes, and domains but never reverses database migrations; versions without complete trigger snapshots use code-only rollback and keep the current routes and schedules. On either deployment platform, auth-enabled `void deploy` preserves an existing `BETTER_AUTH_SECRET` or creates a persistent encrypted secret when missing; always use Void's deployment flow so it can manage that secret safely.
87
-
88
- Use `void` and `@void/*` in code examples and package manifests.
89
-
90
- Non-interactive self-hosted platform install, upgrade, repair, disable, enable, and uninstall commands require `--yes`; `--plan` is read-only and needs no acknowledgement.
91
-
92
- Platform install plans show actual resource names, the GitHub callback, and credential links without opening credential pages or saving a draft; Cloudflare browser login still opens if needed. New platforms use `void-<name>-<role>` names without random suffixes. Conflicts stop installation; existing installations retain recorded names. Approved interactive installs open the runtime-token, GitHub OAuth, and R2 pages only when those credentials are missing, with fallback instructions. Local credential drafts preserve the callback across retries and encrypt partial inputs. Interactive installs list unfinished installs, including interrupted provisioning, or offer "Start a new platform install". Entering an unfinished name asks to resume it; declining returns to name entry. Completed platforms are excluded, and new installs never inherit or delete old credentials or resources. Use `--resume --name <id>` to continue directly or in CI. Do not generate replacement signing keys or create another installation to recover a cancelled prompt.
93
-
94
- Cloudflare browser login does not grant AI Gateway access. A platform installation preview may mark that resource `inspect`; apply must verify it with the existing runtime-token input (Account → AI Gateway → Edit) before any provisioning. Never treat a permission failure as an empty resource inventory or skip ownership verification. The runtime token is used only for AI Gateway provider calls; other operations retain the operator credential.
95
-
96
- Use `--runtime <directory>` on platform install, upgrade, repair, enable, or rollback when deploying a locally built `@void/platform` runtime. The directory must contain the generated integrity manifest, Worker artifacts, and migration tree. Build it with `vp run --filter @void/platform build`; Git source revisions are detected automatically, with `-dirty` for uncommitted changes. `VOID_PLATFORM_SOURCE_REVISION` is an optional override. Do not treat this as a safety bypass: custom and packaged runtimes follow the same verification and rollback path.
97
-
98
- For self-hosted platform installation, require a dedicated empty PostgreSQL database. Interactive lifecycle commands use Cloudflare browser OAuth with keyring storage. Wrangler OAuth has Zone Read, so a plan that creates a zone or DNS record requires a scoped `CLOUDFLARE_API_TOKEN` with Account → Zone → Edit and/or Zone → DNS → Edit; finish Workers onboarding and choose a workers.dev subdomain for a fresh Cloudflare account. The installed platform uses a separate `VOID_PLATFORM_RUNTIME_CLOUDFLARE_API_TOKEN`. Its core permissions include Hyperdrive: Write at account scope and Cache Purge: Purge on the application zone; SSL and Certificates: Edit is needed only when a custom runtime enables custom project domains. Managed Sandbox apps additionally require Workers Paid plus Account → Containers → Edit and Account → Cloudchamber → Edit on that runtime token; these are checked on the first Sandbox application deploy, not during platform install or upgrade. The installer preflights account and Hyperdrive access and safely verifies Cache Purge for an existing zone with a unique nonexistent URL. Fresh installs require unique per-installation values from the operator's secret manager: `VOID_PLATFORM_JWT_SECRET` with at least 32 random bytes and `VOID_PLATFORM_PROJECT_SECRET_KEY` as canonical base64 for 32 random bytes. Never let a local checkpoint or ephemeral CI runner be their only custodian. Enabling email generates a separate signing key in encrypted recovery state; supply `VOID_PLATFORM_EMAIL_SIGNING_SECRET` from the secret manager for headless installs without persistent recovery files. The installer transactionally claims the database for one installation, pins that URL after a successful claim, never removes the claim during uninstall, and uses it for a cross-host lifecycle lock plus a secret-free authoritative lifecycle manifest. Local recovery checkpoints are AES-256-GCM encrypted with an OS-keychain key; never place platform secrets in plaintext files. After discovery on a new machine, provide `VOID_PLATFORM_DATABASE_URL`. For email-enabled installations without encrypted recovery state, also restore the original `VOID_PLATFORM_EMAIL_SIGNING_SECRET`; recreating only the email gateway needs this key, not JWT or runtime credentials. Normal upgrades preserve other deployed Worker secrets; restore the original runtime, GitHub, R2, JWT, and project-encryption values when recreating the API or proxy as documented. Upgrades enable managed Sandboxes automatically. An upgrade from the tenant-owned legacy may still require `void platform system sandbox-drain`: preview with `--plan`, follow each `nextCursor`, then apply with `--yes` until the DB-backed response reports `complete: true`; never delete an unverified app by name. The installer trusts only DB-backed sandbox-drain probe protocol v1. Before it accepts an empty inventory, the database admission barrier makes older deployment inserts finish and become visible or rejects them after the protocol floor is armed. Lifecycle redeploys preserve unmanaged Worker routes and custom domains in both the new trigger state and rollback snapshot. They stop before migrations or uploads when live Hyperdrive origin metadata differs from the pinned database. Platform upgrade SQL is forward-only: packaged hashes and the live Drizzle prefix must match, pending migrations require an exact source-version/schema rollback edge, and the old version remains authoritative until target health succeeds. Use `void platform rollback --runtime <earlier>` only when the installed runtime declares the exact earlier version/schema compatible; pass `--from-runtime` for the exact current custom artifact. Rollback preserves the forward database schema and cannot lower a database-required safety protocol. Safe uninstall retains Worker routes, custom domains, and R2 for explicit manual cleanup because Cloudflare cannot condition their deletion on an immutable generation.
99
-
100
- For an organization-managed Hyperdrive, set `VOID_PLATFORM_HYPERDRIVE_ID`, `VOID_PLATFORM_HYPERDRIVE_ORIGIN_HOST`, and `VOID_PLATFORM_HYPERDRIVE_ORIGIN_USER` together before installation. Use `VOID_PLATFORM_DATABASE_URL` for a separate owner connection that runs migrations; the Hyperdrive must be named `void-<installation-name>-database` and have SQL result caching disabled. See `docs/guide/platform/installation/prerequisites.md`.
101
-
102
- For self-hosted recovery, `VOID_PLATFORM_PROJECT_SECRET_KEY` restores an original `v1` project-secret keyring. After rotation, restore every retained version with `VOID_PLATFORM_PROJECT_SECRET_KEYS_JSON` and its active entry with `VOID_PLATFORM_PROJECT_SECRET_ACTIVE_KEY_VERSION`. These inputs restore a missing API Worker and never replace the live keyring of an existing Worker. Inject them from a secret manager without logging them or writing plaintext files.
103
-
104
- For Cloudflare user switching, `void cloudflare login` always opens a fresh browser sign-in. `void cloudflare status` distinguishes the authenticated user and credential method from the project's pinned deployment account. Login never retargets a project. Remove API-credential environment overrides from the current shell before browser sign-in, without printing their values; automatic deployment checks continue to reuse valid sessions.
105
-
106
- ## No-Args Behavior
107
-
108
- Published self-hosted platform routes and custom domains are observed and recorded as retained attachments. Lifecycle commands gate traffic through installation-owned routing storage but never delete those attachments unattended.
109
-
110
- If invoked without a concrete task, do a brief app status check and report:
111
-
112
- 1. App type (`void`, `framework`, `spa`, `static`) using `docs/app-types.md` criteria.
113
- 2. Backend feature usage (`routes/`, `pages/`, `middleware/`, `migrations/`, `crons/`, `queues/`, SSR entries).
114
- 3. Runtime signals (`void/db`, `void/kv`, `void/storage`, queue usage).
115
- 4. Auth signals (`void/auth`, `auth` client imports, OAuth env vars).
116
- 5. Deployment platform and optional Void project linkage (`.void/project.json`), plus config readiness (`void.config.ts`, Cloudflare `account_id`, tsconfig extends).
117
- 6. Optional health checks (`void account whoami`, `void db status` when relevant).
118
-
119
- Then ask what to do next.
18
+ Use `void` and `@void/*` in imports, examples, and package manifests. Follow the
19
+ project's existing framework and deployment destination.
120
20
 
121
21
  ## Task Routing
122
22
 
123
23
  | User intent | Docs file(s) |
124
24
  | ------------------------------------------ | ----------------------------------------------------------------------------------------- |
125
25
  | CLI command syntax, flags, env vars | `docs/reference/cli.md` |
126
- | Initial setup, onboarding, first app | `docs/guide/quickstart.md`, `docs/reference/cli.md` |
26
+ | Initial setup, onboarding, first app | `docs/guide/quickstart.md`, `docs/reference/cli/setup.md` |
127
27
  | App type detection and mode behavior | `docs/guide/app-types.md`, `docs/reference/config.md` |
128
28
  | Server/API routing and middleware | `docs/guide/server-routing.md`, `docs/integrations/hono.md` |
129
29
  | Pages mode, loader/action, forms, layouts | `docs/guide/pages-routing/*.md`, `docs/guide/type-safety.md` |
@@ -132,39 +32,54 @@ Then ask what to do next.
132
32
  | Authentication | `docs/guide/auth.md`, `docs/guide/env-vars.md` |
133
33
  | Cloudflare runtime bindings and config | `docs/integrations/cloudflare.md`, `docs/reference/config.md`, `docs/guide/env-vars.md` |
134
34
  | AI inference (Workers AI, providers) | `docs/guide/ai.md` |
35
+ | Durable State and WebSockets | `docs/guide/durable-state.md`, `docs/guide/websockets.md` |
36
+ | Server-sent events and live streams | `docs/guide/sse.md`, `docs/guide/live.md` |
37
+ | Sandboxes | `docs/guide/sandboxes.md` |
38
+ | Email | `docs/guide/email.md`, then the matching guide under `docs/guide/email/` |
135
39
  | KV / storage / queues / cron jobs | `docs/guide/kv.md`, `docs/guide/storage.md`, `docs/guide/queues.md`, `docs/guide/jobs.md` |
136
40
  | SSR and caching | `docs/guide/ssr.md`, `docs/guide/edge/*.md` |
137
41
  | Rewrites, redirects, fallbacks | `docs/guide/edge/rewrites.md`, `docs/guide/edge/redirects.md`, `docs/reference/config.md` |
138
42
  | Static site generation | `docs/guide/ssg.md` |
139
- | Deployment and CI | `docs/guide/deployment.md`, `docs/reference/cli.md` |
140
- | Install or maintain a company platform | `docs/guide/self-hosted-platform.md`, `docs/reference/cli.md` |
43
+ | Deployment and CI | `docs/guide/deployment.md`, `docs/reference/cli/deploy.md` |
44
+ | Install or maintain a company platform | `docs/guide/self-hosted-platform.md`, `docs/reference/cli/platform-installation.md` |
141
45
  | Develop or deploy a platform fork | `docs/guide/platform-development.md`, `docs/guide/self-hosted-platform.md` |
142
- | Platform administration | `docs/guide/platform-administration.md`, `docs/reference/cli.md` |
143
- | Self-host deploy to own Cloudflare account | `docs/integrations/cloudflare.md`, `docs/reference/cli.md` |
144
- | Project status, deployment history | `docs/reference/cli.md` |
145
- | Cache purging | `docs/reference/cli.md` |
146
- | Project logs, runtime errors | `docs/reference/cli.md` |
147
- | Secrets management (put/sync/delete) | `docs/reference/cli.md`, `docs/guide/env-vars.md` |
46
+ | Platform administration | `docs/guide/platform-administration.md`, `docs/reference/cli/platform.md` |
47
+ | Platform plans and account limits | `docs/guide/platform/administration/plans.md`, `docs/reference/cli/platform-config.md` |
48
+ | Self-host deploy to own Cloudflare account | `docs/integrations/cloudflare.md`, `docs/reference/cli/deploy.md` |
49
+ | Project status, deployment history | `docs/reference/cli/project.md` |
50
+ | Cache purging | `docs/reference/cli/project.md` |
51
+ | Project logs, runtime errors | `docs/reference/cli/project.md` |
52
+ | Secrets management (put/sync/delete) | `docs/reference/cli/secrets.md`, `docs/guide/env-vars.md` |
148
53
  | Typed env vars (`defineEnv`, `env.ts`) | `docs/guide/env-vars.md` |
149
- | Custom domain setup | `docs/reference/cli.md` |
150
- | Database status, reset, seed, export | `docs/reference/cli.md`, `docs/guide/database.md` |
151
- | Auth login/logout/whoami | `docs/reference/cli.md` |
54
+ | Custom domain setup | `docs/reference/cli/domains.md` |
55
+ | Database status, reset, seed, export | `docs/reference/cli/database.md`, `docs/guide/database.md` |
56
+ | Auth login/logout/whoami | `docs/reference/cli/auth.md` |
152
57
  | Overview / introduction | `docs/guide/index.md` |
153
58
  | API surface details | `docs/reference/api.md` |
154
59
  | Meta framework integration | `docs/integrations/frameworks/*.md` |
155
60
  | Coding agent setup | `docs/integrations/agents.md` |
156
61
  | Node.js / Bun / Deno targets | `docs/integrations/nodejs-bun-deno.md` |
157
- | ORMs and external databases | `docs/integrations/orms-and-external-dbs.md` |
62
+ | ORMs and external databases | `docs/guide/database.md` |
158
63
  | Project structure and conventions | `docs/reference/structure.md` |
159
64
  | Resource/binding inference | `docs/reference/resource-inference.md` |
160
65
 
161
- ## Working Rules
162
-
163
- - For any task involving running `void` commands — including checking status, managing secrets, viewing logs, or deploying — open `docs/reference/cli.md` FIRST. Do not guess command syntax.
164
- - Never guess or infer `void` CLI command names or flags. Always consult `docs/reference/cli.md` for the exact command before running it.
165
- - For multi-topic tasks, combine only the needed doc files.
166
- - If docs and memory differ, follow docs.
167
- - For Void-managed auth, `void db generate` automatically includes the production Better Auth schema in the generated migration, including configured model/field renames and plugin tables. Keep those migrations under `db/migrations/`; do not duplicate generated auth tables in the application Drizzle schema.
168
- - **Env vars:** When the project has `env.ts`, the canonical access pattern is `import { env } from "void/env"`. Declare every env key in `env.ts` via `defineEnv({...})` so values are typed and validated. Do not introduce ad-hoc `process.env.X` or untyped `c.env.X` access in new code — add the key to `env.ts` first.
169
-
170
- For platform email domains, use `void email domain add` with an account- and zone-scoped Cloudflare API token. Read inbound, outbound, and management readiness separately; `domain sync` reconciles without rotating secrets. Use a stable `sendEmail({ idempotencyKey })` for retryable sends and inspect `void email logs` when the result is `OUTCOME_UNKNOWN`; never retry an uncertain send with a new key. Administrators can inspect retained outcomes with `void platform email logs <project-id|slug> --json`; use the project ID after deletion. Native Cloudflare email setup remains `void email setup --platform cloudflare` and does not support platform idempotency keys.
66
+ ## Working rules
67
+
68
+ - Read the relevant guide before changing configuration, persistent resources,
69
+ authentication, or deployment workflows. The guides define current behavior;
70
+ avoid copying a second set of instructions into this skill.
71
+ - Before moving deployed Durable State or WebSocket definitions, read their
72
+ guides and use `void info` to preserve resource names and instance keys.
73
+ - Declare application environment keys in `env.ts` and access them through
74
+ `void/env`; follow `docs/guide/env-vars.md` for local and production values.
75
+ - For platform setup, follow the pages linked from
76
+ `docs/guide/self-hosted-platform.md`. For recovery, use its documented resume
77
+ or repair workflow and preserve the installation's credentials and resources.
78
+ - Use `--plan` to review platform changes. If an operation has an uncertain
79
+ outcome, inspect its status and events before retrying.
80
+
81
+ If the user invokes this skill without a task, inspect the app's local structure,
82
+ configuration, and saved deployment destination, give a brief status, and ask
83
+ what they want to work on.
84
+
85
+ For AI and Sandbox operations, use `.match({ ok, limited })` and choose a useful quota fallback. In Pages, prefer the adapter’s `Form` with `useForm()` so action failures remain visible and entered data is preserved. See `docs/guide/ai.md`, `docs/guide/sandboxes.md`, and `docs/guide/pages-routing/actions-and-forms.md`.
@@ -10,6 +10,14 @@ Void provides a typed AI client for Workers AI and Cloudflare's [AI Gateway](htt
10
10
  import { ai } from 'void/ai';
11
11
  ```
12
12
 
13
+ ## Handling usage limits
14
+
15
+ Every AI operation is lazy and must be executed with `.match({ ok, limited })`. Both handlers are required, including for provider-native requests, model listing and document conversion. Return a useful fallback from `limited`, or use `limit.response({ message: 'AI is temporarily unavailable.' })` to send a structured HTTP 429. Limits expose `resource`, `reason`, and an optional `retryAt`. Other failures still reject.
16
+
17
+ Do not await the operation itself; await its `.match()` call. TypeScript checks your handlers and the resulting success/fallback union.
18
+
19
+ Streaming responses end with a `void:error` SSE event if generation is interrupted after the response starts. A recognized quota interruption calls your `limited` handler and emits `void:limit`, preserving the message from `limit.response()`. `fetchStream()` throws on either terminal event so your UI can exit its generating state. This also applies to streaming provider responses and `ai.run()` with `stream: true`.
20
+
13
21
  ## Basic Usage
14
22
 
15
23
  Call `ai.run()` with a model name and inputs. Model names and input types are fully typed from `@cloudflare/workers-types`.
@@ -21,9 +29,11 @@ import { ai } from 'void/ai';
21
29
  export const POST = defineHandler(async (c) => {
22
30
  const { prompt } = await c.req.json();
23
31
 
24
- const result = await ai.run('@cf/meta/llama-3.3-70b-instruct-fp8-fast', {
25
- messages: [{ role: 'user', content: prompt }],
26
- });
32
+ const result = await ai
33
+ .run('@cf/meta/llama-3.3-70b-instruct-fp8-fast', {
34
+ messages: [{ role: 'user', content: prompt }],
35
+ })
36
+ .match({ ok: (result) => result, limited: (limit) => limit.response() });
27
37
 
28
38
  return c.json(result);
29
39
  });
@@ -42,23 +52,27 @@ import { ai } from 'void/ai';
42
52
  export const POST = defineHandler(async (c) => {
43
53
  const { prompt } = await c.req.json();
44
54
 
45
- return ai.stream('@cf/meta/llama-3.3-70b-instruct-fp8-fast', {
46
- messages: [{ role: 'user', content: prompt }],
47
- });
55
+ return ai
56
+ .stream('@cf/meta/llama-3.3-70b-instruct-fp8-fast', {
57
+ messages: [{ role: 'user', content: prompt }],
58
+ })
59
+ .match({ ok: (result) => result, limited: (limit) => limit.response() });
48
60
  });
49
61
  ```
50
62
 
51
- `ai.stream()` calls `ai.run()` with `stream: true` and wraps the result in a `Response` with `content-type: text/event-stream` and `cache-control: no-cache` headers.
52
-
53
63
  ## Listing Models
54
64
 
55
65
  Use `ai.models()` to list available models:
56
66
 
57
67
  ```ts
58
- const models = await ai.models();
68
+ const models = await ai
69
+ .models()
70
+ .match({ ok: (result) => result, limited: (limit) => limit.response() });
59
71
 
60
72
  // Filter by task
61
- const textModels = await ai.models({ task: 'Text Generation' });
73
+ const textModels = await ai
74
+ .models({ task: 'Text Generation' })
75
+ .match({ ok: (result) => result, limited: (limit) => limit.response() });
62
76
  ```
63
77
 
64
78
  ## Markdown Conversion
@@ -66,7 +80,9 @@ const textModels = await ai.models({ task: 'Text Generation' });
66
80
  Use `ai.toMarkdown()` to convert documents to markdown:
67
81
 
68
82
  ```ts
69
- const result = await ai.toMarkdown([{ name: 'document.pdf', blob: pdfBytes }]);
83
+ const result = await ai
84
+ .toMarkdown([{ name: 'document.pdf', blob: pdfBytes }])
85
+ .match({ ok: (result) => result, limited: (limit) => limit.response() });
70
86
  ```
71
87
 
72
88
  ## Local Development
@@ -80,12 +96,11 @@ npm run dev
80
96
 
81
97
  When the app imports `void/ai`, Void enables a remote Workers AI binding during
82
98
  development and preview. Requests use your Cloudflare account and its allowance;
83
- Workers AI has no local simulator. The session uses the same keychain-backed
84
- Cloudflare login as the CLI, or `CLOUDFLARE_API_TOKEN` in an automated environment.
99
+ Workers AI has no local simulator. Use your Cloudflare login or
100
+ `CLOUDFLARE_API_TOKEN` in an automated environment.
85
101
 
86
102
  For a team platform, use `void connect <platform-url>` and link your project.
87
- Development requests use that platform's HTTPS proxy and usage controls.
88
- Credentials are injected into server bindings automatically.
103
+ Development requests use that platform's account and usage limits.
89
104
 
90
105
  ## Usage Limits
91
106
 
@@ -93,55 +108,54 @@ Workers AI usage is measured in [neurons](https://developers.cloudflare.com/work
93
108
  On a direct deployment, usage belongs to your Cloudflare account. Provider-native
94
109
  requests also use your provider credentials and their billing terms.
95
110
 
96
- A team platform tracks usage in its own account and can apply per-user limits.
97
- Fresh self-hosted installations assign the `custom` profile, which has no
98
- platform-imposed AI allowance. Administrators can select a quota profile through
99
- [Platform Administration](./platform-administration.md). These profiles do not
100
- subscribe users to a commercial plan or charge them automatically; the operator
101
- remains responsible for its infrastructure and provider accounts.
111
+ A team platform uses its own Cloudflare account and may apply per-user limits. Ask your administrator about the available allowance.
102
112
 
103
113
  ## Cloudflare Gateway Models
104
114
 
105
115
  `ai.run()` mirrors Cloudflare's `env.AI.run()` model naming and input schemas. Third-party models use Cloudflare model IDs and Cloudflare-managed credentials.
106
116
 
107
117
  ```ts
108
- const result = await ai.run('google/gemini-2.5-flash', {
109
- contents: [
110
- {
111
- role: 'user',
112
- parts: [{ text: 'Explain Durable Objects in one paragraph.' }],
113
- },
114
- ],
115
- });
118
+ const result = await ai
119
+ .run('google/gemini-2.5-flash', {
120
+ contents: [
121
+ {
122
+ role: 'user',
123
+ parts: [{ text: 'Explain Durable Objects in one paragraph.' }],
124
+ },
125
+ ],
126
+ })
127
+ .match({ ok: (result) => result, limited: (limit) => limit.response() });
116
128
  ```
117
129
 
118
130
  OpenAI-compatible models use OpenAI-style `messages`:
119
131
 
120
132
  ```ts
121
- const result = await ai.run('openai/gpt-4.1-mini', {
122
- messages: [{ role: 'user', content: 'Summarize this deploy.' }],
123
- });
133
+ const result = await ai
134
+ .run('openai/gpt-4.1-mini', {
135
+ messages: [{ role: 'user', content: 'Summarize this deploy.' }],
136
+ })
137
+ .match({ ok: (result) => result, limited: (limit) => limit.response() });
124
138
  ```
125
139
 
126
140
  Pass Cloudflare AI Gateway options as the third argument:
127
141
 
128
142
  ```ts
129
- const result = await ai.run(
130
- 'openai/gpt-4.1-mini',
131
- {
132
- messages: [{ role: 'user', content: 'Summarize this deploy.' }],
133
- },
134
- {
135
- gateway: {
136
- skipCache: true,
143
+ const result = await ai
144
+ .run(
145
+ 'openai/gpt-4.1-mini',
146
+ {
147
+ messages: [{ role: 'user', content: 'Summarize this deploy.' }],
148
+ },
149
+ {
150
+ gateway: {
151
+ skipCache: true,
152
+ },
137
153
  },
138
- },
139
- );
154
+ )
155
+ .match({ ok: (result) => result, limited: (limit) => limit.response() });
140
156
  ```
141
157
 
142
- Managed requests use the installation's gateway and project metadata. Direct
143
- requests use your Workers AI binding; provider-native requests require your own
144
- `ai.gateway` configuration.
158
+ For provider-native requests on a direct deployment, configure [`ai.gateway`](../integrations/cloudflare.md#ai-self-host).
145
159
 
146
160
  ## Provider-Native Requests
147
161
 
@@ -159,13 +173,16 @@ import { ai } from 'void/ai';
159
173
  export const POST = defineHandler(async (c) => {
160
174
  const { prompt } = await c.req.json();
161
175
 
162
- const response = await ai.provider('openai').fetch('/chat/completions', {
163
- body: {
164
- model: 'gpt-4o',
165
- messages: [{ role: 'user', content: prompt }],
166
- max_tokens: 512,
167
- },
168
- });
176
+ const response = await ai
177
+ .provider('openai')
178
+ .fetch('/chat/completions', {
179
+ body: {
180
+ model: 'gpt-4o',
181
+ messages: [{ role: 'user', content: prompt }],
182
+ max_tokens: 512,
183
+ },
184
+ })
185
+ .match({ ok: (result) => result, limited: (limit) => limit.response() });
169
186
 
170
187
  const result = await response.json();
171
188
  return c.json(result);
@@ -186,7 +203,8 @@ const response = await ai
186
203
  },
187
204
  ],
188
205
  },
189
- });
206
+ })
207
+ .match({ ok: (result) => result, limited: (limit) => limit.response() });
190
208
 
191
209
  const result = await response.json();
192
210
  ```
@@ -204,7 +222,8 @@ const response = await ai
204
222
  })
205
223
  .fetch('/v1/respond', {
206
224
  body: { prompt: 'Hello' },
207
- });
225
+ })
226
+ .match({ ok: (result) => result, limited: (limit) => limit.response() });
208
227
  ```
209
228
 
210
229
  ### Image Generation
@@ -214,38 +233,45 @@ Use `ai.run()` or `ai.image()` for Cloudflare-native image models:
214
233
  ```ts
215
234
  export const POST = defineHandler(async (c) => {
216
235
  const { prompt } = await c.req.json();
217
- return ai.image('@cf/black-forest-labs/flux-1-schnell', { prompt });
236
+ return ai
237
+ .image('@cf/black-forest-labs/flux-1-schnell', { prompt })
238
+ .match({ ok: (result) => result, limited: (limit) => limit.response() });
218
239
  });
219
240
  ```
220
241
 
221
- Use `ai.provider().fetch()` for provider-native image APIs:
242
+ Use `ai.provider().fetch()` for provider-native image APIs. Match the [provider's request schema](https://developers.openai.com/api/reference/resources/images/methods/generate):
222
243
 
223
244
  ```ts
224
245
  export const POST = defineHandler(async (c) => {
225
246
  const { prompt } = await c.req.json();
226
247
 
227
- return ai.provider('openai').fetch('/images/generations', {
228
- body: {
229
- model: 'gpt-image-1.5',
230
- prompt,
231
- size: '1024x1024',
232
- response_format: 'b64_json',
233
- },
234
- });
248
+ return ai
249
+ .provider('openai')
250
+ .fetch('/images/generations', {
251
+ body: {
252
+ model: 'gpt-image-2.5-sunburst',
253
+ prompt,
254
+ size: '1024x1024',
255
+ },
256
+ })
257
+ .match({ ok: (result) => result, limited: (limit) => limit.response() });
235
258
  });
236
259
  ```
237
260
 
238
- For multipart provider APIs, pass a `FormData` body. Void serializes the body through the proxy and reconstructs it before forwarding to AI Gateway:
261
+ For multipart provider APIs, pass `FormData`:
239
262
 
240
263
  ```ts
241
264
  export const POST = defineHandler(async (c) => {
242
265
  const body = await c.req.parseBody();
243
266
  const form = new FormData();
244
- form.set('model', 'gpt-image-1.5');
267
+ form.set('model', 'gpt-image-2.5-sunburst');
245
268
  form.set('prompt', String(body.prompt));
246
269
  form.set('image', body.image as Blob, 'source.png');
247
270
 
248
- return ai.provider('openai').fetch('/images/edits', { body: form });
271
+ return ai
272
+ .provider('openai')
273
+ .fetch('/images/edits', { body: form })
274
+ .match({ ok: (result) => result, limited: (limit) => limit.response() });
249
275
  });
250
276
  ```
251
277
 
@@ -290,22 +316,6 @@ For local development, add it to `.env` in your project root:
290
316
  OPENAI_API_KEY=sk-...
291
317
  ```
292
318
 
293
- If the key is missing at runtime, `ai.provider().fetch()` throws a descriptive error telling you which env var to set.
294
-
295
319
  ### Streaming with Provider-Native APIs
296
320
 
297
- Provider-native streaming APIs return the provider response directly:
298
-
299
- ```ts
300
- export const POST = defineHandler(async (c) => {
301
- const { prompt } = await c.req.json();
302
-
303
- return ai.provider('openai').fetch('/chat/completions', {
304
- body: {
305
- model: 'gpt-4o',
306
- messages: [{ role: 'user', content: prompt }],
307
- stream: true,
308
- },
309
- });
310
- });
311
- ```
321
+ Return the provider response directly. For example, add `stream: true` to the OpenAI request body shown above.
@@ -16,27 +16,16 @@ The type is auto-detected from your project structure, or you can set it explici
16
16
 
17
17
  In a Void app, Void handles server routing and deployment. Use React, Vue, Svelte, or Solid for server-rendered pages, or build a frontend with any library that works with Vite.
18
18
 
19
- All Void features that involve backend logic are available in this mode, including [server routing](./server-routing.md), [pages mode](./pages-routing/overview.md), [authentication](./auth.md), [typed fetch](./typed-fetch.md), [cron jobs](./jobs.md), and [queues](./queues.md).
20
-
21
19
  A Void app can be **API-only** (just `routes/`), a **SPA + API** (frontend in `src/` with API routes), or **full-stack with pages mode** (server-rendered pages in `pages/` with co-located data loading):
22
20
 
23
21
  <VoidAppFileTree annotations />
24
22
 
25
- Your worker handles API routes, page rendering, and (optionally) [custom SSR](./ssr.md). Static assets are served from the edge via per-worker assets. Cloudflare bindings (D1, KV, R2) are [inferred from your source code](../reference/resource-inference.md) and provisioned automatically.
23
+ Void serves API routes, page rendering, and optional [custom SSR](./ssr.md) alongside static assets. Resources such as D1, KV, and R2 are [inferred from your code](../reference/resource-inference.md) and provisioned when you deploy.
26
24
 
27
25
  Void apps can also use [`output: 'static'`](./ssg.md) to pre-render all pages at build time. That gives you a fully static site that can be deployed anywhere, with no Cloudflare Worker required.
28
26
 
29
27
  **Deploy:** `void deploy` builds the app, provisions resources, applies migrations, and uploads it to your saved Cloudflare or Void target. See [Deployment](./deployment.md) for setup.
30
28
 
31
- **Detected when any of these exist:**
32
-
33
- - `routes/` directory
34
- - `pages/` directory
35
- - `middleware/` directory
36
- - `crons/` directory
37
- - `queues/` directory
38
- - Custom SSR entry (`src/main.ssr.ts` or `src/main.ssr.tsx`)
39
-
40
29
  ## Meta Frameworks
41
30
 
42
31
  Void supports deploying Vite-based meta-framework apps with `void deploy`. The framework owns routing and SSR. Void handles [binding inference](../reference/resource-inference.md), [typed DB queries](./database.md), migrations, and deployment.
@@ -50,15 +39,11 @@ Void supports deploying Vite-based meta-framework apps with `void deploy`. The f
50
39
  | [Analog](https://analogjs.org/) | `@analogjs/platform` | [Guide](../integrations/frameworks/analog.md) |
51
40
  | [Astro](https://astro.build/) | `astro` | [Guide](../integrations/frameworks/astro.md) |
52
41
 
53
- Add `voidPlugin()` to the framework's Vite config to get binding inference, typed DB generation, migration management, cron jobs, queues, and caching. Void-managed auth is not supported in framework mode; use Better Auth's official integration for your framework. See the [Meta Frameworks Integration](../integrations/frameworks/overview.md) for the full feature matrix, deploy pipeline, and per-framework setup guides.
54
-
55
- **Deploy:** `void deploy` runs your framework's build, provisions resources, applies migrations, and deploys to the selected target. Your framework continues to handle routing and rendering.
56
-
57
- **Detected when** any of the above packages is in your dependencies.
42
+ Add `voidPlugin()` to the framework's Vite config to get binding inference, typed DB generation, migration management, cron jobs, queues, and caching. Void-managed auth is not supported in framework mode; use Better Auth's official integration for your framework. See the [Meta Frameworks Integration](../integrations/frameworks/overview.md) for supported features and setup guides.
58
43
 
59
44
  ## Pre-built Static Sites
60
45
 
61
- Any project that produces static files, whether that is an SPA, a static site, or a plain directory. Assets are served directly from the edge, and a minimal passthrough worker is generated automatically. You do not need to write worker code yourself.
46
+ Any project that produces static files, whether that is an SPA, a static site, or a plain directory. Void serves the assets without requiring application code.
62
47
 
63
48
  **SPAs** (client-side single-page apps) fall back all non-file paths to `index.html` with a 200 status, so client-side routing works out of the box. Detected when `vite` is a dependency and no backend files exist.
64
49
 
@@ -116,20 +101,6 @@ To deploy only the static output, set:
116
101
  { "inference": { "appType": "static" } }
117
102
  ```
118
103
 
119
- ## Auto-Detection
120
-
121
- When running `void deploy` and no `inference.appType` is set in `void.config.ts`, the detection logic runs in this order:
122
-
123
- | Priority | Condition | Type |
124
- | -------- | --------------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
125
- | 1 | `--dir` flag | Static (or SPA with `--spa`) |
126
- | 2 | Known SSG in dependencies (`vitepress`, `@docusaurus/core`) | Static, builds with SSG CLI |
127
- | 2a | ...and backend files also exist | Refused — set `inference.appType` yourself |
128
- | 3 | `@tanstack/react-start`, `@react-router/dev`, `@sveltejs/kit`, `nuxt`, `@analogjs/platform`, or `astro` in deps | Framework |
129
- | 4 | Backend files exist (`routes/`, `pages/`, `middleware/`, `crons/`, `queues/`, SSR entry) | Void app |
130
- | 5 | `vite` or `vite-plus` in dependencies, no backend files | SPA, builds with `vite build` or `vp build` |
131
- | 6 | `dist/index.html` or `./index.html` exists | Static (no build step) |
132
-
133
104
  ## Explicit Configuration
134
105
 
135
106
  To lock the app type and skip auto-detection, set `inference.appType` in [`void.config.ts`](../reference/config.md):