void 0.7.1 → 0.7.3

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 (167) hide show
  1. package/dist/agents-DqkFfc2c.mjs +151 -0
  2. package/dist/{auth-cmd-DVKi6dzh.mjs → auth-cmd-Dk0acCT5.mjs} +2 -2
  3. package/dist/{better-auth-shared-C9_GHSkR.d.mts → better-auth-shared-CZsIpjey.d.mts} +1 -1
  4. package/dist/{cache-B0BgSTZi.mjs → cache-DGSZ5Bh6.mjs} +2 -2
  5. package/dist/{cancel-deploy-D9OFt5gA.mjs → cancel-deploy-CrY3kt93.mjs} +1 -1
  6. package/dist/cli/cli.mjs +27 -174
  7. package/dist/{client-BUdfE3QJ.mjs → client-DCqnMpDt.mjs} +97 -11
  8. package/dist/{create-project-CN1pF-OQ.mjs → create-project-Bg88Kq_I.mjs} +3 -3
  9. package/dist/{db-BIP2kuEt.mjs → db-ClNu7vYQ.mjs} +13 -13
  10. package/dist/{delete-DJTvwbr-.mjs → delete-DXcX1yQZ.mjs} +2 -2
  11. package/dist/{deploy-BqXz1ycW.mjs → deploy-BkjqNk9U.mjs} +565 -161
  12. package/dist/{domain-B-fIU3VE.mjs → domain-CDQhvYNZ.mjs} +1 -1
  13. package/dist/{env-BwbZJd2x.mjs → env-CnrQY2b6.mjs} +1 -1
  14. package/dist/{env-helpers-Dr9Y7RnE.d.mts → env-helpers-CbeM_7-k.d.mts} +1 -1
  15. package/dist/{gen-U0Ktr4Zd.mjs → gen-C0EY2k27.mjs} +1 -1
  16. package/dist/{handler-B0ds0OHJ.d.mts → handler-dKQWyF-G.d.mts} +3 -3
  17. package/dist/index.d.mts +3 -3
  18. package/dist/index.mjs +13 -12
  19. package/dist/{init-Bb_Qsdq6.mjs → init-CPny6w9D.mjs} +63 -28
  20. package/dist/{link-D4d26PCm.mjs → link-eZ0aiHFK.mjs} +2 -2
  21. package/dist/{list-bQc1eQCZ.mjs → list-ztyEz4TW.mjs} +2 -2
  22. package/dist/{login-RWUDCfdx.mjs → login-B5HHT32i.mjs} +1 -1
  23. package/dist/{logs-DrkTklop.mjs → logs-J4BN0LXd.mjs} +1 -1
  24. package/dist/{mcp-kZ4zg13a.mjs → mcp-Bdu9bnjR.mjs} +1 -1
  25. package/dist/{node-DDfXj10V.mjs → node-DFqMcZR1.mjs} +3 -3
  26. package/dist/pages/client.d.mts +1 -1
  27. package/dist/pages/client.mjs +3 -0
  28. package/dist/pages/head-client.d.mts +1 -1
  29. package/dist/pages/head.d.mts +1 -1
  30. package/dist/pages/index.d.mts +2 -2
  31. package/dist/pages/index.mjs +1 -1
  32. package/dist/pages/islands-plugin.d.mts +1 -1
  33. package/dist/pages/protocol.d.mts +2 -2
  34. package/dist/pages/protocol.mjs +23 -18
  35. package/dist/{prepare-BAtWufvm.mjs → prepare-DKkx-2Kt.mjs} +1 -1
  36. package/dist/{project-cmd-ATFi3kRm.mjs → project-cmd-DKiQYdSd.mjs} +8 -8
  37. package/dist/{protocol-BWzXs2A2.d.mts → protocol-CK4OFwfR.d.mts} +2 -2
  38. package/dist/{rollback-BSyita3C.mjs → rollback-ZNvT8T54.mjs} +1 -1
  39. package/dist/{runner-6Ep3fNQu.mjs → runner-BUPRnMFN.mjs} +1 -1
  40. package/dist/runtime/ai.mjs +1 -1
  41. package/dist/runtime/auth.d.mts +1 -1
  42. package/dist/runtime/better-auth-pg.d.mts +1 -1
  43. package/dist/runtime/better-auth-pg.mjs +2 -2
  44. package/dist/runtime/better-auth.d.mts +1 -1
  45. package/dist/runtime/better-auth.mjs +2 -2
  46. package/dist/runtime/client.d.mts +2 -2
  47. package/dist/runtime/client.mjs +1 -1
  48. package/dist/runtime/env-helpers.d.mts +1 -1
  49. package/dist/runtime/env-public-client.d.mts +1 -1
  50. package/dist/runtime/env-public.d.mts +2 -2
  51. package/dist/runtime/env-public.mjs +1 -1
  52. package/dist/runtime/env.mjs +1 -1
  53. package/dist/runtime/fetch-stream.d.mts +1 -1
  54. package/dist/runtime/fetch-stream.mjs +1 -1
  55. package/dist/runtime/fetch.d.mts +1 -1
  56. package/dist/runtime/fetch.mjs +1 -1
  57. package/dist/runtime/handler.d.mts +1 -1
  58. package/dist/runtime/handler.mjs +1 -1
  59. package/dist/runtime/isr.mjs +1 -1
  60. package/dist/runtime/migration-handler.mjs +2 -2
  61. package/dist/runtime/validator.d.mts +1 -1
  62. package/dist/runtime/ws-server.d.mts +2 -2
  63. package/dist/runtime/ws.d.mts +3 -3
  64. package/dist/{secret-DmjBDxB1.mjs → secret-BXHx515u.mjs} +2 -2
  65. package/dist/{skills-ipldjlKE.mjs → skills-CbuYOthf.mjs} +1 -1
  66. package/package.json +13 -13
  67. package/skills/void/docs/guide/deployment.md +4 -6
  68. package/skills/void/docs/index.md +3 -3
  69. package/skills/void/docs/node_modules/void/AGENTS.md +1 -1
  70. package/skills/void/docs/node_modules/void/node_modules/@types/node/README.md +1 -1
  71. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@types/node/README.md +1 -1
  72. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/AGENTS.md +15 -0
  73. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/README.md +208 -0
  74. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/build.md +21 -0
  75. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/fmt.md +18 -0
  76. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/index.md +31 -0
  77. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/lint.md +24 -0
  78. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/pack.md +17 -0
  79. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/run.md +249 -0
  80. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/staged.md +15 -0
  81. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/test.md +18 -0
  82. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/build.md +40 -0
  83. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/cache.md +119 -0
  84. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/check.md +44 -0
  85. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/ci.md +64 -0
  86. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/commit-hooks.md +51 -0
  87. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/create.md +88 -0
  88. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/dev.md +24 -0
  89. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/env.md +102 -0
  90. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/fmt.md +41 -0
  91. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/ide-integration.md +101 -0
  92. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/implode.md +23 -0
  93. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/index.md +128 -0
  94. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/install.md +147 -0
  95. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/lint.md +50 -0
  96. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/migrate.md +173 -0
  97. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/pack.md +61 -0
  98. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/run.md +324 -0
  99. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/test.md +35 -0
  100. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/troubleshooting.md +132 -0
  101. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/upgrade.md +49 -0
  102. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/vpx.md +66 -0
  103. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/why.md +39 -0
  104. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/index.md +12 -0
  105. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/team.md +35 -0
  106. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/templates/generator/README.md +35 -0
  107. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/templates/monorepo/README.md +29 -0
  108. package/skills/void/docs/node_modules/void/node_modules/vite-plus/AGENTS.md +15 -0
  109. package/skills/void/docs/node_modules/void/node_modules/vite-plus/README.md +208 -0
  110. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/build.md +21 -0
  111. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/fmt.md +18 -0
  112. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/index.md +31 -0
  113. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/lint.md +24 -0
  114. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/pack.md +17 -0
  115. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/run.md +249 -0
  116. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/staged.md +15 -0
  117. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/test.md +18 -0
  118. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/build.md +40 -0
  119. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/cache.md +119 -0
  120. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/check.md +44 -0
  121. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/ci.md +64 -0
  122. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/commit-hooks.md +51 -0
  123. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/create.md +88 -0
  124. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/dev.md +24 -0
  125. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/env.md +102 -0
  126. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/fmt.md +41 -0
  127. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/ide-integration.md +101 -0
  128. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/implode.md +23 -0
  129. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/index.md +128 -0
  130. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/install.md +147 -0
  131. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/lint.md +50 -0
  132. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/migrate.md +173 -0
  133. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/pack.md +61 -0
  134. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/run.md +324 -0
  135. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/test.md +35 -0
  136. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/troubleshooting.md +132 -0
  137. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/upgrade.md +49 -0
  138. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/vpx.md +66 -0
  139. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/why.md +39 -0
  140. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/index.md +12 -0
  141. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/team.md +35 -0
  142. package/skills/void/docs/node_modules/void/node_modules/vite-plus/templates/generator/README.md +35 -0
  143. package/skills/void/docs/node_modules/void/node_modules/vite-plus/templates/monorepo/README.md +29 -0
  144. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/tsdown/README.md +0 -55
  145. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite/LICENSE.md +0 -2230
  146. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite/README.md +0 -20
  147. package/skills/void/docs/node_modules/void/node_modules/tsdown/README.md +0 -55
  148. package/skills/void/docs/node_modules/void/node_modules/vite/LICENSE.md +0 -2230
  149. package/skills/void/docs/node_modules/void/node_modules/vite/README.md +0 -20
  150. /package/dist/{auth-BdsJ0Aff.d.mts → auth-DrfOTMmr.d.mts} +0 -0
  151. /package/dist/{auth-migrations-BAtAck2g.mjs → auth-migrations-BwLPwRgH.mjs} +0 -0
  152. /package/dist/{better-auth-shared-CdYmQGry.mjs → better-auth-shared-APuDaPqW.mjs} +0 -0
  153. /package/dist/{defer-DcxEsVH1.mjs → defer-2ARBu8Et.mjs} +0 -0
  154. /package/dist/{drizzle-NnudE_UN.mjs → drizzle-C-NRqGhx.mjs} +0 -0
  155. /package/dist/{env-raw-BDL4TvdN.mjs → env-raw-DtfQ9E31.mjs} +0 -0
  156. /package/dist/{fetch-error-BQ8sZ5Nd.mjs → fetch-error-CEr0ACTl.mjs} +0 -0
  157. /package/dist/{fetch-error-CVZ5CGA-.d.mts → fetch-error-DflegrF3.d.mts} +0 -0
  158. /package/dist/{head-P-egrtFE.d.mts → head-CZGAunBV.d.mts} +0 -0
  159. /package/dist/{headers-DCXc7mDs.mjs → headers-YVkHjOyq.mjs} +0 -0
  160. /package/dist/{preset-D4I73kT4.mjs → preset-DFvePt0l.mjs} +0 -0
  161. /package/dist/{project-slug-CKam8lF9.mjs → project-slug-KRvHQEQI.mjs} +0 -0
  162. /package/dist/{resolve-project-Br5BR03U.mjs → resolve-project-DdjLQ2tB.mjs} +0 -0
  163. /package/dist/{runner-pg-D0wWHYnr.mjs → runner-pg-BI6f6Ncm.mjs} +0 -0
  164. /package/dist/{standard-schema-9CRjx-uR.d.mts → standard-schema-BfGDWXff.d.mts} +0 -0
  165. /package/dist/{subcommand-prompt-BKjuNAPb.mjs → subcommand-prompt-BMS1TNG5.mjs} +0 -0
  166. /package/dist/{types-mHOEwpW4.d.mts → types-AdKzPp2C.d.mts} +0 -0
  167. /package/dist/{yarn-pnp-BFqMV_bl.mjs → yarn-pnp-6LD6_3Ej.mjs} +0 -0
@@ -0,0 +1,151 @@
1
+ import { a as join } from "./pathe.M-eThtNZ-D-kmWkCS.mjs";
2
+ import { existsSync, readFileSync } from "node:fs";
3
+ import { fileURLToPath } from "node:url";
4
+ //#region src/cli/agents.ts
5
+ function getPackageDir() {
6
+ let dir = join(fileURLToPath(import.meta.url), "..");
7
+ for (let i = 0; i < 5; i++) {
8
+ if (existsSync(join(dir, "package.json"))) {
9
+ if (JSON.parse(readFileSync(join(dir, "package.json"), "utf-8")).name === "void") return dir;
10
+ }
11
+ dir = join(dir, "..");
12
+ }
13
+ throw new Error("Could not find void package root");
14
+ }
15
+ const agents = {
16
+ "claude-code": {
17
+ displayName: "Claude Code",
18
+ skillsDir: ".claude/skills",
19
+ detect: (root) => existsSync(join(root, ".claude")) || existsSync(join(root, "CLAUDE.md")),
20
+ mcpConfig: [{
21
+ filePath: ".claude/settings.json",
22
+ rootKey: "mcpServers"
23
+ }, {
24
+ filePath: ".claude/settings.local.json",
25
+ rootKey: "mcpServers"
26
+ }]
27
+ },
28
+ amp: {
29
+ displayName: "Amp",
30
+ skillsDir: ".agents/skills",
31
+ detect: (root) => existsSync(join(root, ".agents")),
32
+ mcpHint: "Run `npx void mcp` — this starts a stdio MCP server. See your agent's docs for how to add a local MCP server."
33
+ },
34
+ codex: {
35
+ displayName: "Codex",
36
+ skillsDir: ".agents/skills",
37
+ detect: (root) => existsSync(join(root, ".codex")),
38
+ mcpHint: "codex mcp add void -- npx void mcp"
39
+ },
40
+ cursor: {
41
+ displayName: "Cursor",
42
+ skillsDir: ".agents/skills",
43
+ detect: (root) => existsSync(join(root, ".cursor")),
44
+ mcpConfig: [{
45
+ filePath: ".cursor/mcp.json",
46
+ rootKey: "mcpServers"
47
+ }]
48
+ },
49
+ windsurf: {
50
+ displayName: "Windsurf",
51
+ skillsDir: ".windsurf/skills",
52
+ detect: (root) => existsSync(join(root, ".windsurf")),
53
+ mcpConfig: [{
54
+ filePath: ".windsurf/mcp.json",
55
+ rootKey: "mcpServers"
56
+ }]
57
+ },
58
+ "gemini-cli": {
59
+ displayName: "Gemini CLI",
60
+ skillsDir: ".agents/skills",
61
+ detect: (root) => existsSync(join(root, ".gemini")),
62
+ mcpHint: "gemini mcp add void -- npx void mcp"
63
+ },
64
+ "github-copilot": {
65
+ displayName: "GitHub Copilot",
66
+ skillsDir: ".agents/skills",
67
+ detect: (root) => existsSync(join(root, ".github", "copilot-instructions.md")) || existsSync(join(root, ".vscode", "mcp.json")),
68
+ mcpConfig: [{
69
+ filePath: ".vscode/mcp.json",
70
+ rootKey: "servers",
71
+ extraFields: { type: "stdio" }
72
+ }]
73
+ },
74
+ cline: {
75
+ displayName: "Cline",
76
+ skillsDir: ".cline/skills",
77
+ detect: (root) => existsSync(join(root, ".cline")),
78
+ mcpHint: "Run `npx void mcp` — this starts a stdio MCP server. See your agent's docs for how to add a local MCP server."
79
+ },
80
+ roo: {
81
+ displayName: "Roo Code",
82
+ skillsDir: ".roo/skills",
83
+ detect: (root) => existsSync(join(root, ".roo")),
84
+ mcpConfig: [{
85
+ filePath: ".roo/mcp.json",
86
+ rootKey: "mcpServers"
87
+ }]
88
+ },
89
+ kilo: {
90
+ displayName: "Kilo Code",
91
+ skillsDir: ".kilocode/skills",
92
+ detect: (root) => existsSync(join(root, ".kilocode")),
93
+ mcpHint: "Run `npx void mcp` — this starts a stdio MCP server. See your agent's docs for how to add a local MCP server."
94
+ },
95
+ continue: {
96
+ displayName: "Continue",
97
+ skillsDir: ".continue/skills",
98
+ detect: (root) => existsSync(join(root, ".continue")),
99
+ mcpHint: "Run `npx void mcp` — this starts a stdio MCP server. See your agent's docs for how to add a local MCP server."
100
+ },
101
+ goose: {
102
+ displayName: "Goose",
103
+ skillsDir: ".goose/skills",
104
+ detect: (root) => existsSync(join(root, ".goose")),
105
+ mcpHint: "Run `npx void mcp` — this starts a stdio MCP server. See your agent's docs for how to add a local MCP server."
106
+ },
107
+ opencode: {
108
+ displayName: "OpenCode",
109
+ skillsDir: ".agents/skills",
110
+ detect: (root) => existsSync(join(root, ".opencode")),
111
+ mcpHint: "Run `npx void mcp` — this starts a stdio MCP server. See your agent's docs for how to add a local MCP server."
112
+ },
113
+ trae: {
114
+ displayName: "Trae",
115
+ skillsDir: ".trae/skills",
116
+ detect: (root) => existsSync(join(root, ".trae")),
117
+ mcpHint: "Run `npx void mcp` — this starts a stdio MCP server. See your agent's docs for how to add a local MCP server."
118
+ },
119
+ junie: {
120
+ displayName: "Junie",
121
+ skillsDir: ".junie/skills",
122
+ detect: (root) => existsSync(join(root, ".junie")),
123
+ mcpHint: "Run `npx void mcp` — this starts a stdio MCP server. See your agent's docs for how to add a local MCP server."
124
+ },
125
+ "kiro-cli": {
126
+ displayName: "Kiro CLI",
127
+ skillsDir: ".kiro/skills",
128
+ detect: (root) => existsSync(join(root, ".kiro")),
129
+ mcpHint: "Run `npx void mcp` — this starts a stdio MCP server. See your agent's docs for how to add a local MCP server."
130
+ },
131
+ zencoder: {
132
+ displayName: "Zencoder",
133
+ skillsDir: ".zencoder/skills",
134
+ detect: (root) => existsSync(join(root, ".zencoder")),
135
+ mcpHint: "Run `npx void mcp` — this starts a stdio MCP server. See your agent's docs for how to add a local MCP server."
136
+ },
137
+ "qwen-code": {
138
+ displayName: "Qwen Code",
139
+ skillsDir: ".qwen/skills",
140
+ detect: (root) => existsSync(join(root, ".qwen")),
141
+ mcpHint: "Run `npx void mcp` — this starts a stdio MCP server. See your agent's docs for how to add a local MCP server."
142
+ }
143
+ };
144
+ function getAgentById(id) {
145
+ return agents[id];
146
+ }
147
+ function detectAgents(root) {
148
+ return Object.values(agents).filter((a) => a.detect(root));
149
+ }
150
+ //#endregion
151
+ export { getAgentById as n, getPackageDir as r, detectAgents as t };
@@ -1,6 +1,6 @@
1
1
  import { c as R } from "./dist-Dayj3gCK.mjs";
2
- import { n as PlatformClient, s as getToken, u as removeToken } from "./client-BUdfE3QJ.mjs";
3
- import { n as runLoginCommand } from "./login-RWUDCfdx.mjs";
2
+ import { c as getToken, d as removeToken, n as PlatformClient } from "./client-DCqnMpDt.mjs";
3
+ import { n as runLoginCommand } from "./login-B5HHT32i.mjs";
4
4
  import { execSync } from "node:child_process";
5
5
  //#region src/cli/auth-cmd.ts
6
6
  async function runAuthCommand(root, args) {
@@ -1,4 +1,4 @@
1
- import { i as VoidAuthConfig, n as AuthState } from "./auth-BdsJ0Aff.mjs";
1
+ import { i as VoidAuthConfig, n as AuthState } from "./auth-DrfOTMmr.mjs";
2
2
  import { DBFieldAttribute } from "better-auth/db";
3
3
  import { BetterAuthOptions, betterAuth } from "better-auth";
4
4
  import { Context } from "hono";
@@ -1,8 +1,8 @@
1
1
  import { i as dim, n as cliTitle, r as createSpinner } from "./output-BwlcIYSR.mjs";
2
2
  import { c as R, g as ge, y as ye } from "./dist-Dayj3gCK.mjs";
3
3
  import { r as readProjectConfig } from "./project-TqORyHn8.mjs";
4
- import { n as PlatformClient, s as getToken } from "./client-BUdfE3QJ.mjs";
5
- import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-Br5BR03U.mjs";
4
+ import { c as getToken, n as PlatformClient } from "./client-DCqnMpDt.mjs";
5
+ import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-DdjLQ2tB.mjs";
6
6
  //#region src/cli/cache.ts
7
7
  async function runPurgeCacheCommand(root, projectSlug) {
8
8
  console.log();
@@ -1,7 +1,7 @@
1
1
  import { n as cliTitle } from "./output-BwlcIYSR.mjs";
2
2
  import { c as R, g as ge, v as ue, x as q, y as ye } from "./dist-Dayj3gCK.mjs";
3
3
  import { r as readProjectConfig } from "./project-TqORyHn8.mjs";
4
- import { n as PlatformClient, s as getToken } from "./client-BUdfE3QJ.mjs";
4
+ import { c as getToken, n as PlatformClient } from "./client-DCqnMpDt.mjs";
5
5
  //#region src/cli/cancel-deploy.ts
6
6
  const ACTIVE_STATUSES = new Set([
7
7
  "pending",
package/dist/cli/cli.mjs CHANGED
@@ -2,156 +2,9 @@
2
2
  import { a as join } from "../pathe.M-eThtNZ-D-kmWkCS.mjs";
3
3
  import { c as sectionTitle, o as helpLine, s as import_picocolors, t as categoryTitle } from "../output-BwlcIYSR.mjs";
4
4
  import { c as R, u as Se, y as ye } from "../dist-Dayj3gCK.mjs";
5
- import { existsSync, readFileSync } from "node:fs";
6
- import { fileURLToPath } from "node:url";
5
+ import { r as getPackageDir } from "../agents-DqkFfc2c.mjs";
6
+ import { readFileSync } from "node:fs";
7
7
  import { parseArgs } from "node:util";
8
- //#region src/cli/agents.ts
9
- function getPackageDir() {
10
- let dir = join(fileURLToPath(import.meta.url), "..");
11
- for (let i = 0; i < 5; i++) {
12
- if (existsSync(join(dir, "package.json"))) {
13
- if (JSON.parse(readFileSync(join(dir, "package.json"), "utf-8")).name === "void") return dir;
14
- }
15
- dir = join(dir, "..");
16
- }
17
- throw new Error("Could not find void package root");
18
- }
19
- const agents = {
20
- "claude-code": {
21
- displayName: "Claude Code",
22
- skillsDir: ".claude/skills",
23
- detect: (root) => existsSync(join(root, ".claude")) || existsSync(join(root, "CLAUDE.md")),
24
- mcpConfig: [{
25
- filePath: ".claude/settings.json",
26
- rootKey: "mcpServers"
27
- }, {
28
- filePath: ".claude/settings.local.json",
29
- rootKey: "mcpServers"
30
- }]
31
- },
32
- amp: {
33
- displayName: "Amp",
34
- skillsDir: ".agents/skills",
35
- detect: (root) => existsSync(join(root, ".agents")),
36
- mcpHint: "Run `npx void mcp` — this starts a stdio MCP server. See your agent's docs for how to add a local MCP server."
37
- },
38
- codex: {
39
- displayName: "Codex",
40
- skillsDir: ".agents/skills",
41
- detect: (root) => existsSync(join(root, ".codex")),
42
- mcpHint: "codex mcp add void -- npx void mcp"
43
- },
44
- cursor: {
45
- displayName: "Cursor",
46
- skillsDir: ".agents/skills",
47
- detect: (root) => existsSync(join(root, ".cursor")),
48
- mcpConfig: [{
49
- filePath: ".cursor/mcp.json",
50
- rootKey: "mcpServers"
51
- }]
52
- },
53
- windsurf: {
54
- displayName: "Windsurf",
55
- skillsDir: ".windsurf/skills",
56
- detect: (root) => existsSync(join(root, ".windsurf")),
57
- mcpConfig: [{
58
- filePath: ".windsurf/mcp.json",
59
- rootKey: "mcpServers"
60
- }]
61
- },
62
- "gemini-cli": {
63
- displayName: "Gemini CLI",
64
- skillsDir: ".agents/skills",
65
- detect: (root) => existsSync(join(root, ".gemini")),
66
- mcpHint: "gemini mcp add void -- npx void mcp"
67
- },
68
- "github-copilot": {
69
- displayName: "GitHub Copilot",
70
- skillsDir: ".agents/skills",
71
- detect: (root) => existsSync(join(root, ".github", "copilot-instructions.md")) || existsSync(join(root, ".vscode", "mcp.json")),
72
- mcpConfig: [{
73
- filePath: ".vscode/mcp.json",
74
- rootKey: "servers",
75
- extraFields: { type: "stdio" }
76
- }]
77
- },
78
- cline: {
79
- displayName: "Cline",
80
- skillsDir: ".cline/skills",
81
- detect: (root) => existsSync(join(root, ".cline")),
82
- mcpHint: "Run `npx void mcp` — this starts a stdio MCP server. See your agent's docs for how to add a local MCP server."
83
- },
84
- roo: {
85
- displayName: "Roo Code",
86
- skillsDir: ".roo/skills",
87
- detect: (root) => existsSync(join(root, ".roo")),
88
- mcpConfig: [{
89
- filePath: ".roo/mcp.json",
90
- rootKey: "mcpServers"
91
- }]
92
- },
93
- kilo: {
94
- displayName: "Kilo Code",
95
- skillsDir: ".kilocode/skills",
96
- detect: (root) => existsSync(join(root, ".kilocode")),
97
- mcpHint: "Run `npx void mcp` — this starts a stdio MCP server. See your agent's docs for how to add a local MCP server."
98
- },
99
- continue: {
100
- displayName: "Continue",
101
- skillsDir: ".continue/skills",
102
- detect: (root) => existsSync(join(root, ".continue")),
103
- mcpHint: "Run `npx void mcp` — this starts a stdio MCP server. See your agent's docs for how to add a local MCP server."
104
- },
105
- goose: {
106
- displayName: "Goose",
107
- skillsDir: ".goose/skills",
108
- detect: (root) => existsSync(join(root, ".goose")),
109
- mcpHint: "Run `npx void mcp` — this starts a stdio MCP server. See your agent's docs for how to add a local MCP server."
110
- },
111
- opencode: {
112
- displayName: "OpenCode",
113
- skillsDir: ".agents/skills",
114
- detect: (root) => existsSync(join(root, ".opencode")),
115
- mcpHint: "Run `npx void mcp` — this starts a stdio MCP server. See your agent's docs for how to add a local MCP server."
116
- },
117
- trae: {
118
- displayName: "Trae",
119
- skillsDir: ".trae/skills",
120
- detect: (root) => existsSync(join(root, ".trae")),
121
- mcpHint: "Run `npx void mcp` — this starts a stdio MCP server. See your agent's docs for how to add a local MCP server."
122
- },
123
- junie: {
124
- displayName: "Junie",
125
- skillsDir: ".junie/skills",
126
- detect: (root) => existsSync(join(root, ".junie")),
127
- mcpHint: "Run `npx void mcp` — this starts a stdio MCP server. See your agent's docs for how to add a local MCP server."
128
- },
129
- "kiro-cli": {
130
- displayName: "Kiro CLI",
131
- skillsDir: ".kiro/skills",
132
- detect: (root) => existsSync(join(root, ".kiro")),
133
- mcpHint: "Run `npx void mcp` — this starts a stdio MCP server. See your agent's docs for how to add a local MCP server."
134
- },
135
- zencoder: {
136
- displayName: "Zencoder",
137
- skillsDir: ".zencoder/skills",
138
- detect: (root) => existsSync(join(root, ".zencoder")),
139
- mcpHint: "Run `npx void mcp` — this starts a stdio MCP server. See your agent's docs for how to add a local MCP server."
140
- },
141
- "qwen-code": {
142
- displayName: "Qwen Code",
143
- skillsDir: ".qwen/skills",
144
- detect: (root) => existsSync(join(root, ".qwen")),
145
- mcpHint: "Run `npx void mcp` — this starts a stdio MCP server. See your agent's docs for how to add a local MCP server."
146
- }
147
- };
148
- function getAgentById(id) {
149
- return agents[id];
150
- }
151
- function detectAgents(root) {
152
- return Object.values(agents).filter((a) => a.detect(root));
153
- }
154
- //#endregion
155
8
  //#region src/cli/args.ts
156
9
  function parseDeployArgs(args) {
157
10
  let parsed;
@@ -1621,7 +1474,7 @@ async function runSubcommandGroup(command, subcommands, parse, run) {
1621
1474
  const sub = args[1];
1622
1475
  try {
1623
1476
  if ((!sub || sub.startsWith("-")) && process.stdin.isTTY) {
1624
- const { promptSubcommand } = await import("../subcommand-prompt-BKjuNAPb.mjs");
1477
+ const { promptSubcommand } = await import("../subcommand-prompt-BMS1TNG5.mjs");
1625
1478
  const result = await promptSubcommand(command, subcommands);
1626
1479
  if (!result) process.exit(0);
1627
1480
  await run(root, parse(buildArgs(result, args.slice(1))));
@@ -1650,7 +1503,7 @@ else if (command === "deploy") {
1650
1503
  R.error(err instanceof Error ? err.message : String(err));
1651
1504
  process.exit(1);
1652
1505
  }
1653
- import("../deploy-BqXz1ycW.mjs").then((n) => n.t).then(({ runDeploy }) => {
1506
+ import("../deploy-BkjqNk9U.mjs").then((n) => n.t).then(({ runDeploy }) => {
1654
1507
  runDeploy(root, {
1655
1508
  projectSlug: deployArgs.projectSlug,
1656
1509
  dir: deployArgs.dir,
@@ -1662,13 +1515,13 @@ else if (command === "deploy") {
1662
1515
  process.exit(1);
1663
1516
  });
1664
1517
  });
1665
- } else if (command === "auth") runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-cmd-DVKi6dzh.mjs").then(({ runAuthCommand }) => runAuthCommand(root, parsed)));
1666
- else if (command === "project") runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-ATFi3kRm.mjs").then(({ runProjectCommand }) => runProjectCommand(root, parsed)));
1667
- else if (command === "secret") runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-DmjBDxB1.mjs").then(({ runSecretCommand }) => runSecretCommand(root, parsed)));
1668
- else if (command === "domain") runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-B-fIU3VE.mjs").then(({ runDomainCommand }) => runDomainCommand(root, parsed)));
1669
- else if (command === "db") runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-BIP2kuEt.mjs").then(({ runDbCommand }) => runDbCommand(root, parsed)));
1670
- else if (command === "env") runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-BwbZJd2x.mjs").then(({ runEnvCommand }) => runEnvCommand(root, parsed)));
1671
- else if (command === "gen") runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-U0Ktr4Zd.mjs").then(({ runGenCommand }) => runGenCommand(root, parsed)));
1518
+ } else if (command === "auth") runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-cmd-Dk0acCT5.mjs").then(({ runAuthCommand }) => runAuthCommand(root, parsed)));
1519
+ else if (command === "project") runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-DKiQYdSd.mjs").then(({ runProjectCommand }) => runProjectCommand(root, parsed)));
1520
+ else if (command === "secret") runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-BXHx515u.mjs").then(({ runSecretCommand }) => runSecretCommand(root, parsed)));
1521
+ else if (command === "domain") runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-CDQhvYNZ.mjs").then(({ runDomainCommand }) => runDomainCommand(root, parsed)));
1522
+ else if (command === "db") runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-ClNu7vYQ.mjs").then(({ runDbCommand }) => runDbCommand(root, parsed)));
1523
+ else if (command === "env") runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-CnrQY2b6.mjs").then(({ runEnvCommand }) => runEnvCommand(root, parsed)));
1524
+ else if (command === "gen") runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-C0EY2k27.mjs").then(({ runGenCommand }) => runGenCommand(root, parsed)));
1672
1525
  else if (command === "prepare") {
1673
1526
  const root = process.cwd();
1674
1527
  let prepareArgs;
@@ -1678,7 +1531,7 @@ else if (command === "prepare") {
1678
1531
  R.error(err instanceof Error ? err.message : String(err));
1679
1532
  process.exit(1);
1680
1533
  }
1681
- import("../prepare-BAtWufvm.mjs").then(({ runPrepareCommand }) => {
1534
+ import("../prepare-DKkx-2Kt.mjs").then(({ runPrepareCommand }) => {
1682
1535
  runPrepareCommand(root, prepareArgs).catch((err) => {
1683
1536
  R.error(err.message ?? err);
1684
1537
  process.exit(1);
@@ -1686,7 +1539,7 @@ else if (command === "prepare") {
1686
1539
  });
1687
1540
  } else if (command === "init") {
1688
1541
  const root = process.cwd();
1689
- import("../init-Bb_Qsdq6.mjs").then(({ runInitCommand, parseInitArgs }) => {
1542
+ import("../init-CPny6w9D.mjs").then(({ runInitCommand, parseInitArgs }) => {
1690
1543
  let initArgs;
1691
1544
  try {
1692
1545
  initArgs = parseInitArgs(args.slice(1));
@@ -1699,7 +1552,7 @@ else if (command === "prepare") {
1699
1552
  process.exit(1);
1700
1553
  });
1701
1554
  });
1702
- } else if (command === "mcp") import("../mcp-kZ4zg13a.mjs").then(({ runMcp }) => {
1555
+ } else if (command === "mcp") import("../mcp-Bdu9bnjR.mjs").then(({ runMcp }) => {
1703
1556
  runMcp();
1704
1557
  });
1705
1558
  else if (command === "-v" || command === "--version") {
@@ -1768,36 +1621,36 @@ else if (command === "-v" || command === "--version") {
1768
1621
  ];
1769
1622
  (async () => {
1770
1623
  printVoidHeader();
1771
- const { promptSubcommand } = await import("../subcommand-prompt-BKjuNAPb.mjs");
1624
+ const { promptSubcommand } = await import("../subcommand-prompt-BMS1TNG5.mjs");
1772
1625
  const result = await promptSubcommand("", topLevelCommands);
1773
1626
  if (!result) process.exit(0);
1774
1627
  const cmd = result.subcommand;
1775
1628
  const root = process.cwd();
1776
1629
  switch (cmd) {
1777
1630
  case "init": {
1778
- const { runInitCommand, parseInitArgs } = await import("../init-Bb_Qsdq6.mjs");
1631
+ const { runInitCommand, parseInitArgs } = await import("../init-CPny6w9D.mjs");
1779
1632
  await runInitCommand(root, parseInitArgs([]));
1780
1633
  return;
1781
1634
  }
1782
1635
  case "deploy": {
1783
- const { runDeploy } = await import("../deploy-BqXz1ycW.mjs").then((n) => n.t);
1636
+ const { runDeploy } = await import("../deploy-BkjqNk9U.mjs").then((n) => n.t);
1784
1637
  await runDeploy(root);
1785
1638
  return;
1786
1639
  }
1787
1640
  case "mcp": {
1788
- const { runMcp } = await import("../mcp-kZ4zg13a.mjs");
1641
+ const { runMcp } = await import("../mcp-Bdu9bnjR.mjs");
1789
1642
  runMcp();
1790
1643
  return;
1791
1644
  }
1792
- case "auth": return runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (r, p) => import("../auth-cmd-DVKi6dzh.mjs").then(({ runAuthCommand }) => runAuthCommand(r, p)));
1793
- case "project": return runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (r, p) => import("../project-cmd-ATFi3kRm.mjs").then(({ runProjectCommand }) => runProjectCommand(r, p)));
1794
- case "secret": return runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (r, p) => import("../secret-DmjBDxB1.mjs").then(({ runSecretCommand }) => runSecretCommand(r, p)));
1795
- case "domain": return runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (r, p) => import("../domain-B-fIU3VE.mjs").then(({ runDomainCommand }) => runDomainCommand(r, p)));
1796
- case "db": return runSubcommandGroup("db", dbSubcommands, parseDbArgs, (r, p) => import("../db-BIP2kuEt.mjs").then(({ runDbCommand }) => runDbCommand(r, p)));
1797
- case "env": return runSubcommandGroup("env", envSubcommands, parseEnvArgs, (r, p) => import("../env-BwbZJd2x.mjs").then(({ runEnvCommand }) => runEnvCommand(r, p)));
1798
- case "gen": return runSubcommandGroup("gen", genSubcommands, parseGenArgs, (r, p) => import("../gen-U0Ktr4Zd.mjs").then(({ runGenCommand }) => runGenCommand(r, p)));
1645
+ case "auth": return runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (r, p) => import("../auth-cmd-Dk0acCT5.mjs").then(({ runAuthCommand }) => runAuthCommand(r, p)));
1646
+ case "project": return runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (r, p) => import("../project-cmd-DKiQYdSd.mjs").then(({ runProjectCommand }) => runProjectCommand(r, p)));
1647
+ case "secret": return runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (r, p) => import("../secret-BXHx515u.mjs").then(({ runSecretCommand }) => runSecretCommand(r, p)));
1648
+ case "domain": return runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (r, p) => import("../domain-CDQhvYNZ.mjs").then(({ runDomainCommand }) => runDomainCommand(r, p)));
1649
+ case "db": return runSubcommandGroup("db", dbSubcommands, parseDbArgs, (r, p) => import("../db-ClNu7vYQ.mjs").then(({ runDbCommand }) => runDbCommand(r, p)));
1650
+ case "env": return runSubcommandGroup("env", envSubcommands, parseEnvArgs, (r, p) => import("../env-CnrQY2b6.mjs").then(({ runEnvCommand }) => runEnvCommand(r, p)));
1651
+ case "gen": return runSubcommandGroup("gen", genSubcommands, parseGenArgs, (r, p) => import("../gen-C0EY2k27.mjs").then(({ runGenCommand }) => runGenCommand(r, p)));
1799
1652
  case "prepare": {
1800
- const { runPrepareCommand } = await import("../prepare-BAtWufvm.mjs");
1653
+ const { runPrepareCommand } = await import("../prepare-DKkx-2Kt.mjs");
1801
1654
  await runPrepareCommand(root, parsePrepareArgs([]));
1802
1655
  return;
1803
1656
  }
@@ -1811,4 +1664,4 @@ else if (command === "-v" || command === "--version") {
1811
1664
  });
1812
1665
  } else printGlobalHelp();
1813
1666
  //#endregion
1814
- export { getAgentById as n, getPackageDir as r, detectAgents as t };
1667
+ export {};
@@ -3,6 +3,7 @@ import { a as join } from "./pathe.M-eThtNZ-D-kmWkCS.mjs";
3
3
  import { s as import_picocolors } from "./output-BwlcIYSR.mjs";
4
4
  import { t as isVoidInternalStaging } from "./project-TqORyHn8.mjs";
5
5
  import { t as cfAccessHeaders } from "./cf-access-Dee5cXxL.mjs";
6
+ import { r as getPackageDir } from "./agents-DqkFfc2c.mjs";
6
7
  import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
7
8
  import { homedir } from "node:os";
8
9
  import { Entry } from "@napi-rs/keyring";
@@ -265,9 +266,34 @@ function isGatedHost(apiUrl) {
265
266
  var client_exports = /* @__PURE__ */ __exportAll({
266
267
  PlatformApiError: () => PlatformApiError,
267
268
  PlatformClient: () => PlatformClient,
269
+ isCliOutdatedError: () => isCliOutdatedError,
268
270
  isExpiredTokenError: () => isExpiredTokenError,
269
- parsePlatformErrorBody: () => parsePlatformErrorBody
271
+ parsePlatformErrorBody: () => parsePlatformErrorBody,
272
+ readCliVersion: () => readCliVersion
270
273
  });
274
+ /**
275
+ * Current CLI version. Sent as `X-Void-CLI-Version` on every platform
276
+ * request so the platform's CLI-version gate can refuse stale CLIs
277
+ * cleanly (HTTP 426 + `cli_outdated`) instead of letting a wire
278
+ * mismatch surface as an opaque parse error.
279
+ *
280
+ * Resolved once per process. Returns `null` when package.json can't be
281
+ * read or has no `version` string — the ctor then OMITS the header
282
+ * entirely. We deliberately do NOT send a placeholder string like
283
+ * "unknown": the platform treats present-but-unparseable headers as a
284
+ * stale-CLI signal and would 426 the request, bricking the CLI on any
285
+ * packaging error. Missing-header is the documented pass-through path.
286
+ */
287
+ function readCliVersion() {
288
+ try {
289
+ const pkgPath = join(getPackageDir(), "package.json");
290
+ const pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));
291
+ return typeof pkg.version === "string" ? pkg.version : null;
292
+ } catch {
293
+ return null;
294
+ }
295
+ }
296
+ const VOID_CLI_VERSION = readCliVersion();
271
297
  function parsePlatformErrorBody(body) {
272
298
  try {
273
299
  const parsed = JSON.parse(body);
@@ -277,16 +303,29 @@ function parsePlatformErrorBody(body) {
277
303
  return null;
278
304
  }
279
305
  }
306
+ /**
307
+ * Detects the `cli_outdated` 426 response shape emitted by the platform's
308
+ * `cliVersionGate` middleware. When present, callers should surface the
309
+ * server's `message` field verbatim — it already includes upgrade
310
+ * instructions — rather than the default `<action>: <status> <body>`
311
+ * which would dump raw JSON at the user.
312
+ */
313
+ function isCliOutdatedError(err) {
314
+ if (!(err instanceof PlatformApiError)) return false;
315
+ if (err.status !== 426) return false;
316
+ return parsePlatformErrorBody(err.body)?.error === "cli_outdated";
317
+ }
280
318
  var PlatformApiError = class extends Error {
281
319
  status;
282
320
  body;
283
321
  code;
284
322
  constructor(action, status, body) {
285
- super(`${action}: ${status} ${body}`);
323
+ const parsed = parsePlatformErrorBody(body);
324
+ const message = status === 426 && parsed?.error === "cli_outdated" && parsed.message ? parsed.message : `${action}: ${status} ${body}`;
325
+ super(message);
286
326
  this.name = "PlatformApiError";
287
327
  this.status = status;
288
328
  this.body = body;
289
- const parsed = parsePlatformErrorBody(body);
290
329
  this.code = parsed?.error ?? parsed?.message;
291
330
  }
292
331
  };
@@ -313,6 +352,7 @@ var PlatformClient = class {
313
352
  ensureCloudflaredToken(this.baseUrl);
314
353
  this.authHeaders = {
315
354
  Authorization: `Bearer ${token}`,
355
+ ...VOID_CLI_VERSION !== null && { "X-Void-CLI-Version": VOID_CLI_VERSION },
316
356
  ...cfAccessHeaders(process.env)
317
357
  };
318
358
  }
@@ -398,17 +438,63 @@ var PlatformClient = class {
398
438
  };
399
439
  }
400
440
  }
401
- async *deploy(projectId, formData) {
402
- const cliLog = this.cliLog;
441
+ /**
442
+ * Request presigned R2 PUT URLs for a batch of assets. Each entry carries
443
+ * both `blake3` (storage key) and `md5` (wire-level integrity primitive)
444
+ * so the platform can sign a PUT URL that R2 enforces against the bytes
445
+ * the CLI is about to upload. See design doc 0068 for the full protocol.
446
+ */
447
+ async requestUploadUrls(projectId, assets) {
448
+ const url = `${this.baseUrl}/projects/${projectId}/deploy/upload-urls`;
449
+ this.cliLog?.info("upload_urls_post", {
450
+ url,
451
+ assetCount: assets.length
452
+ });
453
+ const res = await fetch(url, {
454
+ method: "POST",
455
+ headers: {
456
+ "Content-Type": "application/json",
457
+ ...this.authHeaders
458
+ },
459
+ body: JSON.stringify({ assets })
460
+ });
461
+ const cfRay = res.headers.get("cf-ray");
462
+ const cfCacheStatus = res.headers.get("cf-cache-status");
463
+ this.cliLog?.info("upload_urls_response", {
464
+ status: res.status,
465
+ cfRay,
466
+ cfCacheStatus
467
+ });
468
+ if (!res.ok) await throwPlatformApiError("Failed to request upload URLs", res);
469
+ return (await res.json()).urls;
470
+ }
471
+ /**
472
+ * Manifest-only (direct-to-R2) deploy. POSTs a JSON body containing the
473
+ * deploy manifest, asset manifest (no asset bytes), and any worker module
474
+ * bytes (base64-encoded). Streams an NDJSON response that the caller can
475
+ * apply with the existing `applyDeployEvent` machinery.
476
+ */
477
+ async *finalizeDeploy(projectId, payload) {
403
478
  const url = `${this.baseUrl}/projects/${projectId}/deploy`;
479
+ yield* this.streamDeployRequest(url, {
480
+ method: "POST",
481
+ headers: {
482
+ "Content-Type": "application/json",
483
+ ...this.authHeaders
484
+ },
485
+ body: JSON.stringify(payload)
486
+ });
487
+ }
488
+ /**
489
+ * POST + NDJSON-stream-reader used by `finalizeDeploy()`. Captures
490
+ * `cf-ray` + `cf-cache-status` for postmortem correlation.
491
+ */
492
+ async *streamDeployRequest(url, init) {
493
+ const cliLog = this.cliLog;
404
494
  cliLog?.info("deploy_post", { url });
405
495
  let res;
406
496
  try {
407
- res = await fetch(url, {
408
- method: "POST",
409
- headers: { ...this.authHeaders },
410
- body: formData
411
- });
497
+ res = await fetch(url, init);
412
498
  } catch (err) {
413
499
  cliLog?.error("deploy_fetch_rejected", err, { url });
414
500
  throw err;
@@ -619,4 +705,4 @@ var PlatformClient = class {
619
705
  }
620
706
  };
621
707
  //#endregion
622
- export { parsePlatformErrorBody as a, getTokenSource as c, runLogin as d, saveToken as f, isExpiredTokenError as i, isStagingMode as l, PlatformClient as n, getSiteDomain as o, client_exports as r, getToken as s, PlatformApiError as t, removeToken as u };
708
+ export { isExpiredTokenError as a, getToken as c, removeToken as d, runLogin as f, isCliOutdatedError as i, getTokenSource as l, PlatformClient as n, parsePlatformErrorBody as o, saveToken as p, client_exports as r, getSiteDomain as s, PlatformApiError as t, isStagingMode as u };
@@ -1,9 +1,9 @@
1
1
  import { s as import_picocolors } from "./output-BwlcIYSR.mjs";
2
2
  import { _ as me, c as R, i as Ee, l as Re, x as q } from "./dist-Dayj3gCK.mjs";
3
3
  import { a as writeProjectConfig } from "./project-TqORyHn8.mjs";
4
- import { o as getSiteDomain, t as PlatformApiError } from "./client-BUdfE3QJ.mjs";
5
- import { n as validateProjectSlug } from "./project-slug-CKam8lF9.mjs";
6
- import { n as inferDefaultSlug } from "./resolve-project-Br5BR03U.mjs";
4
+ import { s as getSiteDomain, t as PlatformApiError } from "./client-DCqnMpDt.mjs";
5
+ import { n as validateProjectSlug } from "./project-slug-KRvHQEQI.mjs";
6
+ import { n as inferDefaultSlug } from "./resolve-project-DdjLQ2tB.mjs";
7
7
  //#region src/cli/prompt.ts
8
8
  async function promptProjectSetupAction(message = "Set up a Void project:", options = {}) {
9
9
  const result = await Ee({