@spacefast/common 0.0.23 → 0.0.26

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 (224) hide show
  1. package/brand-assets/LICENSE-Haskoy.txt +93 -0
  2. package/brand-assets/haskoy-latin-variable.woff2 +0 -0
  3. package/brand-assets/spacefast-favicon.svg +4 -4
  4. package/brand-assets/spacefast-sf-full-bleed.svg +3 -3
  5. package/brand-assets/spacefast-wordmark.svg +2 -4
  6. package/dist/agents/connect-targets.js +1 -1
  7. package/dist/agents/private-key-oauth.d.ts +0 -1
  8. package/dist/agents/private-key-oauth.js +46 -63
  9. package/dist/brand-assets-build.js +4 -6
  10. package/dist/brand-assets.d.ts +5 -15
  11. package/dist/brand-assets.js +15 -14
  12. package/dist/config/domains.d.ts +47 -7
  13. package/dist/config/domains.js +66 -10
  14. package/dist/config/index.d.ts +0 -1
  15. package/dist/config/index.js +0 -1
  16. package/dist/contracts/abuse.d.ts +2 -0
  17. package/dist/contracts/abuse.js +12 -0
  18. package/dist/contracts/access.d.ts +124 -12
  19. package/dist/contracts/access.js +73 -9
  20. package/dist/contracts/activity.d.ts +1 -1
  21. package/dist/contracts/activity.js +5 -12
  22. package/dist/contracts/api-keys.d.ts +21 -21
  23. package/dist/contracts/api-keys.js +2 -2
  24. package/dist/contracts/beta.js +1 -1
  25. package/dist/contracts/billing.d.ts +3 -35
  26. package/dist/contracts/billing.js +33 -52
  27. package/dist/contracts/builds.d.ts +30 -18
  28. package/dist/contracts/builds.js +28 -9
  29. package/dist/contracts/channels.js +1 -1
  30. package/dist/contracts/cli.d.ts +10 -0
  31. package/dist/contracts/cli.js +10 -0
  32. package/dist/contracts/collab-public.d.ts +63 -0
  33. package/dist/contracts/collab-public.js +46 -0
  34. package/dist/contracts/comments.d.ts +282 -53
  35. package/dist/contracts/comments.js +173 -52
  36. package/dist/contracts/common.d.ts +3 -3
  37. package/dist/contracts/common.js +5 -5
  38. package/dist/contracts/crons.d.ts +35 -0
  39. package/dist/contracts/crons.js +42 -0
  40. package/dist/contracts/device-auth.d.ts +6 -6
  41. package/dist/contracts/device-auth.js +2 -2
  42. package/dist/contracts/docs.js +2 -2
  43. package/dist/contracts/domains.d.ts +38 -27
  44. package/dist/contracts/domains.js +29 -2
  45. package/dist/contracts/enums.d.ts +34 -30
  46. package/dist/contracts/enums.js +62 -48
  47. package/dist/contracts/error-code-meta.d.ts +50 -125
  48. package/dist/contracts/error-code-meta.js +29 -41
  49. package/dist/contracts/error-codes.d.ts +1 -1
  50. package/dist/contracts/error-codes.js +14 -33
  51. package/dist/contracts/execution.d.ts +47 -66
  52. package/dist/contracts/execution.js +53 -49
  53. package/dist/contracts/feature-lifecycle-core.d.ts +0 -6
  54. package/dist/contracts/feature-lifecycle-core.js +2 -31
  55. package/dist/contracts/feature-lifecycle.d.ts +12 -52
  56. package/dist/contracts/feature-lifecycle.js +16 -59
  57. package/dist/contracts/features.d.ts +48 -60
  58. package/dist/contracts/features.js +59 -51
  59. package/dist/contracts/functions.d.ts +266 -72
  60. package/dist/contracts/functions.js +260 -37
  61. package/dist/contracts/git.d.ts +28 -34
  62. package/dist/contracts/git.js +10 -11
  63. package/dist/contracts/grants.d.ts +9 -5
  64. package/dist/contracts/grants.js +18 -9
  65. package/dist/contracts/ids.js +2 -2
  66. package/dist/contracts/internal.d.ts +8 -6
  67. package/dist/contracts/internal.js +12 -12
  68. package/dist/contracts/mcp.d.ts +11 -0
  69. package/dist/contracts/mcp.js +5 -0
  70. package/dist/contracts/me.js +1 -1
  71. package/dist/contracts/oauth-resources.d.ts +4 -3
  72. package/dist/contracts/oauth-resources.js +12 -3
  73. package/dist/contracts/operations.d.ts +90 -5
  74. package/dist/contracts/operations.js +77 -3
  75. package/dist/contracts/pages.d.ts +12 -7
  76. package/dist/contracts/pages.js +24 -1
  77. package/dist/contracts/plan-policy.d.ts +0 -2
  78. package/dist/contracts/plan-policy.js +2 -3
  79. package/dist/contracts/platform.d.ts +61 -148
  80. package/dist/contracts/platform.js +70 -126
  81. package/dist/contracts/publish-archive.d.ts +508 -0
  82. package/dist/contracts/publish-archive.js +32 -0
  83. package/dist/contracts/push-new.d.ts +4 -4
  84. package/dist/contracts/quotas.js +2 -2
  85. package/dist/contracts/repository-connections.d.ts +43 -30
  86. package/dist/contracts/repository-connections.js +11 -3
  87. package/dist/contracts/resources.d.ts +12 -24
  88. package/dist/contracts/resources.js +36 -16
  89. package/dist/contracts/runtime-api.d.ts +433 -192
  90. package/dist/contracts/runtime-api.js +421 -356
  91. package/dist/contracts/runtime-app.d.ts +127 -120
  92. package/dist/contracts/runtime-app.js +19 -10
  93. package/dist/contracts/runtime-db.d.ts +5 -5
  94. package/dist/contracts/runtime-db.js +2 -2
  95. package/dist/contracts/runtime-purge.d.ts +8 -0
  96. package/dist/contracts/runtime-purge.js +7 -0
  97. package/dist/contracts/runtime-services.d.ts +219 -0
  98. package/dist/contracts/runtime-services.js +437 -0
  99. package/dist/contracts/runtime-storage.d.ts +46 -32
  100. package/dist/contracts/runtime-storage.js +31 -8
  101. package/dist/contracts/sf-config-v1.d.ts +48 -10
  102. package/dist/contracts/space-config.d.ts +69 -18
  103. package/dist/contracts/space-config.js +226 -27
  104. package/dist/contracts/spaces.d.ts +236 -450
  105. package/dist/contracts/spaces.js +131 -151
  106. package/dist/contracts/superadmin-activity.d.ts +57 -4
  107. package/dist/contracts/superadmin-activity.js +48 -2
  108. package/dist/contracts/superadmin-search.d.ts +126 -0
  109. package/dist/contracts/superadmin-search.js +61 -0
  110. package/dist/contracts/superadmin-spaces.d.ts +361 -92
  111. package/dist/contracts/superadmin-spaces.js +97 -24
  112. package/dist/contracts/superadmin-teams.d.ts +28 -10
  113. package/dist/contracts/superadmin-teams.js +5 -8
  114. package/dist/contracts/superadmin-tenants.d.ts +0 -6
  115. package/dist/contracts/superadmin-tenants.js +1 -7
  116. package/dist/contracts/superadmin.d.ts +135 -54
  117. package/dist/contracts/superadmin.js +46 -23
  118. package/dist/contracts/tags.d.ts +12 -12
  119. package/dist/contracts/tags.js +3 -3
  120. package/dist/contracts/teams.d.ts +49 -14
  121. package/dist/contracts/teams.js +40 -22
  122. package/dist/contracts/transfers.d.ts +0 -49
  123. package/dist/contracts/transfers.js +4 -8
  124. package/dist/contracts/usage.d.ts +61 -0
  125. package/dist/contracts/usage.js +64 -0
  126. package/dist/contracts/variables.d.ts +2 -7
  127. package/dist/contracts/variables.js +9 -8
  128. package/dist/contracts/webhooks.d.ts +2 -2
  129. package/dist/contracts/zero.d.ts +102 -73
  130. package/dist/contracts/zero.js +94 -32
  131. package/dist/dashboard-paths/index.d.ts +1 -1
  132. package/dist/dashboard-paths/index.js +1 -0
  133. package/dist/docs/agent-prose.d.ts +2 -2
  134. package/dist/docs/agent-prose.js +63 -70
  135. package/dist/docs/agent-setup.js +45 -15
  136. package/dist/docs/catalog.d.ts +24 -24
  137. package/dist/docs/catalog.js +35 -24
  138. package/dist/docs/error-docs.js +194 -270
  139. package/dist/docs/skills.d.ts +12 -12
  140. package/dist/docs/skills.js +4 -4
  141. package/dist/test-helpers/fetch-stub.d.ts +16 -0
  142. package/dist/test-helpers/fetch-stub.js +25 -0
  143. package/dist/utils/build-settings.d.ts +5 -1
  144. package/dist/utils/build-settings.js +91 -13
  145. package/dist/utils/canonical-json.d.ts +10 -0
  146. package/dist/utils/canonical-json.js +22 -0
  147. package/dist/utils/cast-transport.d.ts +28 -0
  148. package/dist/utils/cast-transport.js +52 -0
  149. package/dist/utils/claim-token.d.ts +0 -8
  150. package/dist/utils/claim-token.js +3 -15
  151. package/dist/utils/concurrency.js +1 -0
  152. package/dist/utils/credential-policy.d.ts +1 -1
  153. package/dist/utils/credential-policy.js +4 -3
  154. package/dist/utils/dns-instructions.js +9 -9
  155. package/dist/utils/env-file.d.ts +17 -0
  156. package/dist/utils/env-file.js +96 -0
  157. package/dist/utils/error-code.d.ts +2 -0
  158. package/dist/utils/error-code.js +8 -0
  159. package/dist/utils/generate-space-name.d.ts +8 -10
  160. package/dist/utils/generate-space-name.js +206 -21
  161. package/dist/utils/grant-decision.fixtures.json +2938 -0
  162. package/dist/utils/grants.d.ts +2 -0
  163. package/dist/utils/grants.js +26 -1
  164. package/dist/utils/gravatar.d.ts +9 -0
  165. package/dist/utils/gravatar.js +31 -0
  166. package/dist/utils/idempotency.d.ts +6 -0
  167. package/dist/utils/idempotency.js +28 -0
  168. package/dist/utils/local-space-state.d.ts +9 -16
  169. package/dist/utils/local-space-state.js +20 -50
  170. package/dist/utils/one-shot-replay.d.ts +4 -1
  171. package/dist/utils/page-colors.d.ts +14 -12
  172. package/dist/utils/page-colors.js +15 -13
  173. package/dist/utils/page-fonts.d.ts +2 -2
  174. package/dist/utils/page-fonts.js +15 -4
  175. package/dist/utils/pages.d.ts +21 -3
  176. package/dist/utils/pages.js +42 -13
  177. package/dist/utils/publish-form-data.d.ts +12 -0
  178. package/dist/utils/publish-form-data.js +10 -0
  179. package/dist/utils/publish-policy.d.ts +27 -0
  180. package/dist/utils/publish-policy.fixtures.json +403 -0
  181. package/dist/utils/publish-policy.js +45 -20
  182. package/dist/utils/push-new.d.ts +7 -0
  183. package/dist/utils/push-new.js +7 -0
  184. package/dist/utils/query-keys.d.ts +4 -5
  185. package/dist/utils/query-keys.js +2 -3
  186. package/dist/utils/runtime-paths.d.ts +5 -0
  187. package/dist/utils/runtime-paths.js +5 -0
  188. package/dist/utils/runtime-upload-batch.d.ts +0 -5
  189. package/dist/utils/runtime-upload-batch.js +1 -27
  190. package/dist/utils/runtime-upload.d.ts +6 -11
  191. package/dist/utils/runtime-upload.js +10 -13
  192. package/dist/utils/secure-local-file.js +5 -16
  193. package/dist/utils/space-config.d.ts +1 -34
  194. package/dist/utils/space-config.js +8 -326
  195. package/dist/utils/static-runtime-policy.d.ts +9 -3
  196. package/dist/utils/static-runtime-policy.fixtures.json +38 -41
  197. package/dist/utils/static-runtime-policy.js +22 -56
  198. package/dist/utils/storage-policy.d.ts +1 -1
  199. package/dist/utils/storage-policy.js +3 -1
  200. package/dist/utils/structured-error.d.ts +14 -0
  201. package/dist/utils/structured-error.js +22 -0
  202. package/dist/utils/upload-session.d.ts +4 -1
  203. package/dist/utils/upload-session.js +33 -5
  204. package/dist/utils/version-path.js +13 -4
  205. package/dist/vocabulary.d.ts +13 -11
  206. package/dist/vocabulary.js +42 -28
  207. package/package.json +7 -17
  208. package/dist/config/postgres-budget.d.ts +0 -129
  209. package/dist/config/postgres-budget.js +0 -140
  210. package/dist/config/postgres-budget.json +0 -51
  211. package/dist/contracts/archives.d.ts +0 -331
  212. package/dist/contracts/archives.js +0 -120
  213. package/dist/contracts/deployments.d.ts +0 -574
  214. package/dist/contracts/deployments.js +0 -97
  215. package/dist/contracts/sites.d.ts +0 -416
  216. package/dist/contracts/sites.js +0 -168
  217. package/dist/contracts/superadmin-queues.d.ts +0 -414
  218. package/dist/contracts/superadmin-queues.js +0 -202
  219. package/dist/contracts/superadmin-runtime.d.ts +0 -27
  220. package/dist/contracts/superadmin-runtime.js +0 -38
  221. package/dist/index.d.ts +0 -1
  222. package/dist/index.js +0 -1
  223. package/dist/utils/api.d.ts +0 -4
  224. package/dist/utils/api.js +0 -13
@@ -7,6 +7,8 @@ export declare const StatticActionSchema: z.ZodEnum<{
7
7
  "spaces:write": "spaces:write";
8
8
  "spaces:rename": "spaces:rename";
9
9
  "domains:read": "domains:read";
10
+ "spaces:publish": "spaces:publish";
11
+ "builds:trigger": "builds:trigger";
10
12
  "mcp:tools": "mcp:tools";
11
13
  "*": "*";
12
14
  "sites:read": "sites:read";
@@ -16,7 +18,6 @@ export declare const StatticActionSchema: z.ZodEnum<{
16
18
  "sites:policy.write": "sites:policy.write";
17
19
  "spaces:create": "spaces:create";
18
20
  "spaces:delete": "spaces:delete";
19
- "spaces:publish": "spaces:publish";
20
21
  "spaces:transfer": "spaces:transfer";
21
22
  "spaces:export": "spaces:export";
22
23
  "spaces:import": "spaces:import";
@@ -35,7 +36,6 @@ export declare const StatticActionSchema: z.ZodEnum<{
35
36
  "webhooks:read": "webhooks:read";
36
37
  "webhooks:write": "webhooks:write";
37
38
  "builds:read": "builds:read";
38
- "builds:trigger": "builds:trigger";
39
39
  "builds:create": "builds:create";
40
40
  "teams:write": "teams:write";
41
41
  "teams:members.write": "teams:members.write";
@@ -91,6 +91,8 @@ export declare const ApiCredentialPolicySchema: z.ZodObject<{
91
91
  "spaces:write": "spaces:write";
92
92
  "spaces:rename": "spaces:rename";
93
93
  "domains:read": "domains:read";
94
+ "spaces:publish": "spaces:publish";
95
+ "builds:trigger": "builds:trigger";
94
96
  "mcp:tools": "mcp:tools";
95
97
  "*": "*";
96
98
  "sites:read": "sites:read";
@@ -100,7 +102,6 @@ export declare const ApiCredentialPolicySchema: z.ZodObject<{
100
102
  "sites:policy.write": "sites:policy.write";
101
103
  "spaces:create": "spaces:create";
102
104
  "spaces:delete": "spaces:delete";
103
- "spaces:publish": "spaces:publish";
104
105
  "spaces:transfer": "spaces:transfer";
105
106
  "spaces:export": "spaces:export";
106
107
  "spaces:import": "spaces:import";
@@ -119,7 +120,6 @@ export declare const ApiCredentialPolicySchema: z.ZodObject<{
119
120
  "webhooks:read": "webhooks:read";
120
121
  "webhooks:write": "webhooks:write";
121
122
  "builds:read": "builds:read";
122
- "builds:trigger": "builds:trigger";
123
123
  "builds:create": "builds:create";
124
124
  "teams:write": "teams:write";
125
125
  "teams:members.write": "teams:members.write";
@@ -135,8 +135,8 @@ export declare const ApiCredentialPolicySchema: z.ZodObject<{
135
135
  "request.client": z.ZodOptional<z.ZodEnum<{
136
136
  api: "api";
137
137
  dashboard: "dashboard";
138
- worker: "worker";
139
138
  cli: "cli";
139
+ worker: "worker";
140
140
  }>>;
141
141
  }, z.core.$strict>>;
142
142
  }, z.core.$strict>>;
@@ -197,6 +197,8 @@ export declare const ApiKeySchema: z.ZodObject<{
197
197
  "spaces:write": "spaces:write";
198
198
  "spaces:rename": "spaces:rename";
199
199
  "domains:read": "domains:read";
200
+ "spaces:publish": "spaces:publish";
201
+ "builds:trigger": "builds:trigger";
200
202
  "mcp:tools": "mcp:tools";
201
203
  "*": "*";
202
204
  "sites:read": "sites:read";
@@ -206,7 +208,6 @@ export declare const ApiKeySchema: z.ZodObject<{
206
208
  "sites:policy.write": "sites:policy.write";
207
209
  "spaces:create": "spaces:create";
208
210
  "spaces:delete": "spaces:delete";
209
- "spaces:publish": "spaces:publish";
210
211
  "spaces:transfer": "spaces:transfer";
211
212
  "spaces:export": "spaces:export";
212
213
  "spaces:import": "spaces:import";
@@ -225,7 +226,6 @@ export declare const ApiKeySchema: z.ZodObject<{
225
226
  "webhooks:read": "webhooks:read";
226
227
  "webhooks:write": "webhooks:write";
227
228
  "builds:read": "builds:read";
228
- "builds:trigger": "builds:trigger";
229
229
  "builds:create": "builds:create";
230
230
  "teams:write": "teams:write";
231
231
  "teams:members.write": "teams:members.write";
@@ -241,8 +241,8 @@ export declare const ApiKeySchema: z.ZodObject<{
241
241
  "request.client": z.ZodOptional<z.ZodEnum<{
242
242
  api: "api";
243
243
  dashboard: "dashboard";
244
- worker: "worker";
245
244
  cli: "cli";
245
+ worker: "worker";
246
246
  }>>;
247
247
  }, z.core.$strict>>;
248
248
  }, z.core.$strict>>;
@@ -311,6 +311,8 @@ export declare const ApiKeyListResponseSchema: z.ZodObject<{
311
311
  "spaces:write": "spaces:write";
312
312
  "spaces:rename": "spaces:rename";
313
313
  "domains:read": "domains:read";
314
+ "spaces:publish": "spaces:publish";
315
+ "builds:trigger": "builds:trigger";
314
316
  "mcp:tools": "mcp:tools";
315
317
  "*": "*";
316
318
  "sites:read": "sites:read";
@@ -320,7 +322,6 @@ export declare const ApiKeyListResponseSchema: z.ZodObject<{
320
322
  "sites:policy.write": "sites:policy.write";
321
323
  "spaces:create": "spaces:create";
322
324
  "spaces:delete": "spaces:delete";
323
- "spaces:publish": "spaces:publish";
324
325
  "spaces:transfer": "spaces:transfer";
325
326
  "spaces:export": "spaces:export";
326
327
  "spaces:import": "spaces:import";
@@ -339,7 +340,6 @@ export declare const ApiKeyListResponseSchema: z.ZodObject<{
339
340
  "webhooks:read": "webhooks:read";
340
341
  "webhooks:write": "webhooks:write";
341
342
  "builds:read": "builds:read";
342
- "builds:trigger": "builds:trigger";
343
343
  "builds:create": "builds:create";
344
344
  "teams:write": "teams:write";
345
345
  "teams:members.write": "teams:members.write";
@@ -355,8 +355,8 @@ export declare const ApiKeyListResponseSchema: z.ZodObject<{
355
355
  "request.client": z.ZodOptional<z.ZodEnum<{
356
356
  api: "api";
357
357
  dashboard: "dashboard";
358
- worker: "worker";
359
358
  cli: "cli";
359
+ worker: "worker";
360
360
  }>>;
361
361
  }, z.core.$strict>>;
362
362
  }, z.core.$strict>>;
@@ -405,6 +405,8 @@ export declare const ApiKeyCreateRequestSchema: z.ZodObject<{
405
405
  "spaces:write": "spaces:write";
406
406
  "spaces:rename": "spaces:rename";
407
407
  "domains:read": "domains:read";
408
+ "spaces:publish": "spaces:publish";
409
+ "builds:trigger": "builds:trigger";
408
410
  "mcp:tools": "mcp:tools";
409
411
  "*": "*";
410
412
  "sites:read": "sites:read";
@@ -414,7 +416,6 @@ export declare const ApiKeyCreateRequestSchema: z.ZodObject<{
414
416
  "sites:policy.write": "sites:policy.write";
415
417
  "spaces:create": "spaces:create";
416
418
  "spaces:delete": "spaces:delete";
417
- "spaces:publish": "spaces:publish";
418
419
  "spaces:transfer": "spaces:transfer";
419
420
  "spaces:export": "spaces:export";
420
421
  "spaces:import": "spaces:import";
@@ -433,7 +434,6 @@ export declare const ApiKeyCreateRequestSchema: z.ZodObject<{
433
434
  "webhooks:read": "webhooks:read";
434
435
  "webhooks:write": "webhooks:write";
435
436
  "builds:read": "builds:read";
436
- "builds:trigger": "builds:trigger";
437
437
  "builds:create": "builds:create";
438
438
  "teams:write": "teams:write";
439
439
  "teams:members.write": "teams:members.write";
@@ -449,8 +449,8 @@ export declare const ApiKeyCreateRequestSchema: z.ZodObject<{
449
449
  "request.client": z.ZodOptional<z.ZodEnum<{
450
450
  api: "api";
451
451
  dashboard: "dashboard";
452
- worker: "worker";
453
452
  cli: "cli";
453
+ worker: "worker";
454
454
  }>>;
455
455
  }, z.core.$strict>>;
456
456
  }, z.core.$strict>>;
@@ -481,6 +481,8 @@ export declare const ApiKeyPatchRequestSchema: z.ZodObject<{
481
481
  "spaces:write": "spaces:write";
482
482
  "spaces:rename": "spaces:rename";
483
483
  "domains:read": "domains:read";
484
+ "spaces:publish": "spaces:publish";
485
+ "builds:trigger": "builds:trigger";
484
486
  "mcp:tools": "mcp:tools";
485
487
  "*": "*";
486
488
  "sites:read": "sites:read";
@@ -490,7 +492,6 @@ export declare const ApiKeyPatchRequestSchema: z.ZodObject<{
490
492
  "sites:policy.write": "sites:policy.write";
491
493
  "spaces:create": "spaces:create";
492
494
  "spaces:delete": "spaces:delete";
493
- "spaces:publish": "spaces:publish";
494
495
  "spaces:transfer": "spaces:transfer";
495
496
  "spaces:export": "spaces:export";
496
497
  "spaces:import": "spaces:import";
@@ -509,7 +510,6 @@ export declare const ApiKeyPatchRequestSchema: z.ZodObject<{
509
510
  "webhooks:read": "webhooks:read";
510
511
  "webhooks:write": "webhooks:write";
511
512
  "builds:read": "builds:read";
512
- "builds:trigger": "builds:trigger";
513
513
  "builds:create": "builds:create";
514
514
  "teams:write": "teams:write";
515
515
  "teams:members.write": "teams:members.write";
@@ -525,8 +525,8 @@ export declare const ApiKeyPatchRequestSchema: z.ZodObject<{
525
525
  "request.client": z.ZodOptional<z.ZodEnum<{
526
526
  api: "api";
527
527
  dashboard: "dashboard";
528
- worker: "worker";
529
528
  cli: "cli";
529
+ worker: "worker";
530
530
  }>>;
531
531
  }, z.core.$strict>>;
532
532
  }, z.core.$strict>>;
@@ -556,6 +556,8 @@ export declare const ApiKeyScopedCreateRequestSchema: z.ZodObject<{
556
556
  "spaces:write": "spaces:write";
557
557
  "spaces:rename": "spaces:rename";
558
558
  "domains:read": "domains:read";
559
+ "spaces:publish": "spaces:publish";
560
+ "builds:trigger": "builds:trigger";
559
561
  "mcp:tools": "mcp:tools";
560
562
  "*": "*";
561
563
  "sites:read": "sites:read";
@@ -565,7 +567,6 @@ export declare const ApiKeyScopedCreateRequestSchema: z.ZodObject<{
565
567
  "sites:policy.write": "sites:policy.write";
566
568
  "spaces:create": "spaces:create";
567
569
  "spaces:delete": "spaces:delete";
568
- "spaces:publish": "spaces:publish";
569
570
  "spaces:transfer": "spaces:transfer";
570
571
  "spaces:export": "spaces:export";
571
572
  "spaces:import": "spaces:import";
@@ -584,7 +585,6 @@ export declare const ApiKeyScopedCreateRequestSchema: z.ZodObject<{
584
585
  "webhooks:read": "webhooks:read";
585
586
  "webhooks:write": "webhooks:write";
586
587
  "builds:read": "builds:read";
587
- "builds:trigger": "builds:trigger";
588
588
  "builds:create": "builds:create";
589
589
  "teams:write": "teams:write";
590
590
  "teams:members.write": "teams:members.write";
@@ -617,6 +617,8 @@ export declare const ApiKeyScopedPatchRequestSchema: z.ZodObject<{
617
617
  "spaces:write": "spaces:write";
618
618
  "spaces:rename": "spaces:rename";
619
619
  "domains:read": "domains:read";
620
+ "spaces:publish": "spaces:publish";
621
+ "builds:trigger": "builds:trigger";
620
622
  "mcp:tools": "mcp:tools";
621
623
  "*": "*";
622
624
  "sites:read": "sites:read";
@@ -626,7 +628,6 @@ export declare const ApiKeyScopedPatchRequestSchema: z.ZodObject<{
626
628
  "sites:policy.write": "sites:policy.write";
627
629
  "spaces:create": "spaces:create";
628
630
  "spaces:delete": "spaces:delete";
629
- "spaces:publish": "spaces:publish";
630
631
  "spaces:transfer": "spaces:transfer";
631
632
  "spaces:export": "spaces:export";
632
633
  "spaces:import": "spaces:import";
@@ -645,7 +646,6 @@ export declare const ApiKeyScopedPatchRequestSchema: z.ZodObject<{
645
646
  "webhooks:read": "webhooks:read";
646
647
  "webhooks:write": "webhooks:write";
647
648
  "builds:read": "builds:read";
648
- "builds:trigger": "builds:trigger";
649
649
  "builds:create": "builds:create";
650
650
  "teams:write": "teams:write";
651
651
  "teams:members.write": "teams:members.write";
@@ -149,7 +149,7 @@ export const ApiKeyPresetSchema = z
149
149
  ])
150
150
  .describe("Named policy preset compiled into a concrete access policy when the key is created.");
151
151
  // `system` is never a principal type: runtime/internal credentials are
152
- // platform-owned and omit ownerPrincipal entirely (internal-docs/platform.md).
152
+ // platform-owned and omit ownerPrincipal entirely (the platform spec).
153
153
  const ApiKeyOwnerPrincipalSchema = z.object({
154
154
  type: z.enum(["team", "external"]).describe("Principal type that owns this key."),
155
155
  id: z.string().min(1).describe("Stable principal id (Better Auth team id, or external id)."),
@@ -239,7 +239,7 @@ export const ApiKeyPatchRequestSchema = z
239
239
  .refine((value) => Object.keys(value).length > 0, {
240
240
  message: "At least one mutable API key field is required.",
241
241
  });
242
- // Target §5C contract (internal-docs/cli-ux-dx-improvement-plan-2026-07-12.html
242
+ // Target §5C contract (the internal plan
243
243
  // "API key: finite permissions, no broad role"): key creation selects an
244
244
  // explicit, finite scope and permission set — never a team-wide role that
245
245
  // falls out of an omitted field. This is deliberately a DISJOINT shape from
@@ -1,7 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { makeOffsetListSchema } from "./common.js";
3
3
  import { superadminPaginationSchema } from "./superadmin.js";
4
- // Private-beta enrollment contracts (internal-docs/prelaunch-private-beta-plan.md).
4
+ // Private-beta enrollment contracts.
5
5
  // Two invite systems coexist: `stattic_beta_signups` (this file) is the public
6
6
  // waitlist, while `stattic_auth_invitation` stays team-membership-only — the
7
7
  // two share no rows, routes, or email templates.
@@ -1,10 +1,8 @@
1
1
  import { z } from "zod";
2
- export declare const billingProviderValues: readonly ["stripe", "app_store", "google_play", "grant"];
2
+ export declare const billingProviderValues: readonly ["stripe", "grant"];
3
3
  export declare const billingProviderSchema: z.ZodEnum<{
4
4
  grant: "grant";
5
5
  stripe: "stripe";
6
- app_store: "app_store";
7
- google_play: "google_play";
8
6
  }>;
9
7
  export declare const billingIntervalValues: readonly ["monthly", "yearly"];
10
8
  export declare const billingIntervalSchema: z.ZodEnum<{
@@ -12,11 +10,7 @@ export declare const billingIntervalSchema: z.ZodEnum<{
12
10
  yearly: "yearly";
13
11
  }>;
14
12
  export type BillingIntervalValue = z.infer<typeof billingIntervalSchema>;
15
- export declare const appStoreEnvironmentValues: readonly ["Sandbox", "Production", "Xcode", "LocalTesting"];
16
- export declare const googlePlaySubscriptionStateValues: readonly ["SUBSCRIPTION_STATE_UNSPECIFIED", "SUBSCRIPTION_STATE_PENDING", "SUBSCRIPTION_STATE_ACTIVE", "SUBSCRIPTION_STATE_PAUSED", "SUBSCRIPTION_STATE_IN_GRACE_PERIOD", "SUBSCRIPTION_STATE_ON_HOLD", "SUBSCRIPTION_STATE_CANCELED", "SUBSCRIPTION_STATE_EXPIRED", "SUBSCRIPTION_STATE_PENDING_PURCHASE_EXPIRED"];
17
- export type GooglePlaySubscriptionState = (typeof googlePlaySubscriptionStateValues)[number];
18
- export declare const googlePlayAcknowledgementStateValues: readonly ["ACKNOWLEDGEMENT_STATE_UNSPECIFIED", "ACKNOWLEDGEMENT_STATE_PENDING", "ACKNOWLEDGEMENT_STATE_ACKNOWLEDGED"];
19
- export type GooglePlayAcknowledgementState = (typeof googlePlayAcknowledgementStateValues)[number];
13
+ export declare const stripeSyncEventTypes: readonly ["checkout.session.completed", "checkout.session.expired", "checkout.session.async_payment_succeeded", "checkout.session.async_payment_failed", "customer.subscription.created", "customer.subscription.updated", "customer.subscription.paused", "customer.subscription.resumed", "customer.subscription.deleted", "customer.subscription.trial_will_end", "invoice.created", "invoice.finalized", "invoice.updated", "invoice.paid", "invoice.payment_succeeded", "invoice.payment_failed", "invoice.marked_uncollectible", "invoice.voided", "refund.created", "refund.updated", "charge.dispute.created", "charge.dispute.updated", "charge.dispute.closed", "charge.dispute.funds_withdrawn", "charge.dispute.funds_reinstated"];
20
14
  export declare const billingTransactionKindValues: readonly ["purchase", "renewal", "refund", "adjustment"];
21
15
  export declare const billingTransactionKindSchema: z.ZodEnum<{
22
16
  purchase: "purchase";
@@ -37,9 +31,9 @@ export type BillingTransactionScope = z.infer<typeof billingTransactionScopeSche
37
31
  export declare const billingAddonSourceValues: readonly ["grant", "stripe"];
38
32
  export declare const billingAddonLimitKeyValues: readonly ["teamMembers", "subTeams", "storageBytes", "externalDomainGroups"];
39
33
  export declare const billingAddonLimitKeySchema: z.ZodEnum<{
34
+ storageBytes: "storageBytes";
40
35
  teamMembers: "teamMembers";
41
36
  subTeams: "subTeams";
42
- storageBytes: "storageBytes";
43
37
  externalDomainGroups: "externalDomainGroups";
44
38
  }>;
45
39
  export type BillingAddonLimitKey = z.infer<typeof billingAddonLimitKeySchema>;
@@ -47,8 +41,6 @@ export declare const billingPlanSourceSchema: z.ZodObject<{
47
41
  provider: z.ZodEnum<{
48
42
  grant: "grant";
49
43
  stripe: "stripe";
50
- app_store: "app_store";
51
- google_play: "google_play";
52
44
  }>;
53
45
  planCode: z.ZodEnum<{
54
46
  free: "free";
@@ -62,30 +54,6 @@ export declare const billingPlanSourceSchema: z.ZodObject<{
62
54
  expiresAt: z.ZodNullable<z.ZodString>;
63
55
  }, z.core.$strip>;
64
56
  export type BillingPlanSource = z.infer<typeof billingPlanSourceSchema>;
65
- export declare const billingStoreAccountResponseSchema: z.ZodObject<{
66
- token: z.ZodString;
67
- appStoreProducts: z.ZodArray<z.ZodString>;
68
- googlePlayBasePlans: z.ZodArray<z.ZodString>;
69
- }, z.core.$strip>;
70
- export declare const appStoreVerifyRequestSchema: z.ZodObject<{
71
- transactionId: z.ZodString;
72
- }, z.core.$strip>;
73
- export declare const googlePlayRecoverRequestSchema: z.ZodObject<{
74
- purchaseToken: z.ZodString;
75
- }, z.core.$strip>;
76
- export declare const storeSubscriptionResultSchema: z.ZodObject<{
77
- provider: z.ZodEnum<{
78
- grant: "grant";
79
- stripe: "stripe";
80
- app_store: "app_store";
81
- google_play: "google_play";
82
- }>;
83
- reference: z.ZodString;
84
- productId: z.ZodString;
85
- planCode: z.ZodNullable<z.ZodString>;
86
- isActive: z.ZodBoolean;
87
- expiresAt: z.ZodNullable<z.ZodString>;
88
- }, z.core.$strip>;
89
57
  export declare const stripeCheckoutRequestSchema: z.ZodObject<{
90
58
  planCode: z.ZodDefault<z.ZodEnum<{
91
59
  free: "free";
@@ -3,37 +3,44 @@ import { planCodeSchema, planLimitValueSchema } from "./features.js";
3
3
  // Billing providers a team plan can resolve from. `grant` is a
4
4
  // superadmin-assigned subscription: no payment, no transactions, just an
5
5
  // operator-issued entitlement row (optionally expiring).
6
- export const billingProviderValues = ["stripe", "app_store", "google_play", "grant"];
6
+ export const billingProviderValues = ["stripe", "grant"];
7
7
  export const billingProviderSchema = z.enum(billingProviderValues).describe("Billing provider.");
8
8
  export const billingIntervalValues = ["monthly", "yearly"];
9
9
  export const billingIntervalSchema = z.enum(billingIntervalValues);
10
- export const appStoreEnvironmentValues = [
11
- "Sandbox",
12
- "Production",
13
- "Xcode",
14
- "LocalTesting",
15
- ];
16
- // Google Play subscriptionsv2 states (subset we persist verbatim).
17
- export const googlePlaySubscriptionStateValues = [
18
- "SUBSCRIPTION_STATE_UNSPECIFIED",
19
- "SUBSCRIPTION_STATE_PENDING",
20
- "SUBSCRIPTION_STATE_ACTIVE",
21
- "SUBSCRIPTION_STATE_PAUSED",
22
- "SUBSCRIPTION_STATE_IN_GRACE_PERIOD",
23
- "SUBSCRIPTION_STATE_ON_HOLD",
24
- "SUBSCRIPTION_STATE_CANCELED",
25
- "SUBSCRIPTION_STATE_EXPIRED",
26
- "SUBSCRIPTION_STATE_PENDING_PURCHASE_EXPIRED",
27
- ];
28
- export const googlePlayAcknowledgementStateValues = [
29
- "ACKNOWLEDGEMENT_STATE_UNSPECIFIED",
30
- "ACKNOWLEDGEMENT_STATE_PENDING",
31
- "ACKNOWLEDGEMENT_STATE_ACKNOWLEDGED",
10
+ // Keep Stripe endpoint subscriptions and the webhook intake allowlist on one
11
+ // contract. The environment setup command imports this exact list, so adding a
12
+ // new processor event cannot leave deployed webhook endpoints behind.
13
+ export const stripeSyncEventTypes = [
14
+ "checkout.session.completed",
15
+ "checkout.session.expired",
16
+ "checkout.session.async_payment_succeeded",
17
+ "checkout.session.async_payment_failed",
18
+ "customer.subscription.created",
19
+ "customer.subscription.updated",
20
+ "customer.subscription.paused",
21
+ "customer.subscription.resumed",
22
+ "customer.subscription.deleted",
23
+ "customer.subscription.trial_will_end",
24
+ "invoice.created",
25
+ "invoice.finalized",
26
+ "invoice.updated",
27
+ "invoice.paid",
28
+ "invoice.payment_succeeded",
29
+ "invoice.payment_failed",
30
+ "invoice.marked_uncollectible",
31
+ "invoice.voided",
32
+ "refund.created",
33
+ "refund.updated",
34
+ "charge.dispute.created",
35
+ "charge.dispute.updated",
36
+ "charge.dispute.closed",
37
+ "charge.dispute.funds_withdrawn",
38
+ "charge.dispute.funds_reinstated",
32
39
  ];
33
40
  // Transaction ledger vocabulary. Every REAL payment event lands as one row —
34
41
  // operator grants never do (no transactions by definition). Amounts are
35
- // micros of the payment currency (1_000_000 micros = 1 unit) so Apple
36
- // milliunits, Google units+nanos, and Stripe cents all normalize losslessly.
42
+ // micros of the payment currency (1_000_000 micros = 1 unit) so Stripe cents
43
+ // normalize losslessly.
37
44
  export const billingTransactionKindValues = [
38
45
  "purchase",
39
46
  "renewal",
@@ -61,33 +68,7 @@ export const billingPlanSourceSchema = z.object({
61
68
  provider: billingProviderSchema,
62
69
  planCode: planCodeSchema,
63
70
  active: z.boolean(),
64
- detail: z
65
- .string()
66
- .describe("Provider-specific reference: subscription/grant id, transaction id, or token."),
67
- expiresAt: z.string().datetime().nullable(),
68
- });
69
- // Mobile-client store flows: the team's store account token is passed as
70
- // Apple `appAccountToken` / Google `obfuscatedExternalAccountId` at purchase
71
- // time so receipts bind back to the team server-side.
72
- export const billingStoreAccountResponseSchema = z.object({
73
- token: z.string().uuid(),
74
- appStoreProducts: z.array(z.string()).describe("App Store product ids sold by this deployment."),
75
- googlePlayBasePlans: z
76
- .array(z.string())
77
- .describe("Google Play base plan ids sold by this deployment."),
78
- });
79
- export const appStoreVerifyRequestSchema = z.object({
80
- transactionId: z.string().trim().min(1),
81
- });
82
- export const googlePlayRecoverRequestSchema = z.object({
83
- purchaseToken: z.string().trim().min(1),
84
- });
85
- export const storeSubscriptionResultSchema = z.object({
86
- provider: billingProviderSchema,
87
- reference: z.string().describe("Provider-side id: transaction id or purchase token."),
88
- productId: z.string(),
89
- planCode: z.string().nullable(),
90
- isActive: z.boolean(),
71
+ detail: z.string().describe("Provider-specific reference: subscription or grant id."),
91
72
  expiresAt: z.string().datetime().nullable(),
92
73
  });
93
74
  export const stripeCheckoutRequestSchema = z.object({
@@ -1,4 +1,16 @@
1
1
  import { z } from "zod";
2
+ export declare const BuildSettingsOverrideSchema: z.ZodObject<{
3
+ rootDirectory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4
+ installDirectory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5
+ installCommand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6
+ buildCommand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7
+ outputDirectory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8
+ ignoredBuildCommand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9
+ frameworkPreset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
+ platformPreset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
+ allowUnsupportedPlatformFeatures: z.ZodOptional<z.ZodBoolean>;
12
+ timeoutSeconds: z.ZodOptional<z.ZodNumber>;
13
+ }, z.core.$strip>;
2
14
  export declare const BuildSettingsSchema: z.ZodObject<{
3
15
  rootDirectory: z.ZodDefault<z.ZodNullable<z.ZodString>>;
4
16
  installDirectory: z.ZodDefault<z.ZodNullable<z.ZodString>>;
@@ -24,7 +36,7 @@ declare const InternalBuildSourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
24
36
  kind: z.ZodLiteral<"archive">;
25
37
  uploadId: z.ZodOptional<z.ZodString>;
26
38
  sourceMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
27
- objectKey: z.ZodOptional<z.ZodString>;
39
+ sourceBuildId: z.ZodOptional<z.ZodString>;
28
40
  uploadedAt: z.ZodOptional<z.ZodString>;
29
41
  recoveredAt: z.ZodOptional<z.ZodString>;
30
42
  sha256: z.ZodOptional<z.ZodString>;
@@ -37,7 +49,7 @@ declare const InternalBuildInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
37
49
  kind: z.ZodLiteral<"archive">;
38
50
  uploadId: z.ZodOptional<z.ZodString>;
39
51
  sourceMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
40
- objectKey: z.ZodOptional<z.ZodString>;
52
+ sourceBuildId: z.ZodOptional<z.ZodString>;
41
53
  uploadedAt: z.ZodOptional<z.ZodString>;
42
54
  recoveredAt: z.ZodOptional<z.ZodString>;
43
55
  sha256: z.ZodOptional<z.ZodString>;
@@ -188,7 +200,7 @@ export declare const BuildSchema: z.ZodObject<{
188
200
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
189
201
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
190
202
  registrar: "registrar";
191
- wpcloud: "wpcloud";
203
+ infra: "infra";
192
204
  dns: "dns";
193
205
  runtime: "runtime";
194
206
  }>>>;
@@ -213,16 +225,16 @@ export declare const buildCreateRequestSchema: z.ZodObject<{
213
225
  pullRequestNumber: z.ZodOptional<z.ZodNumber>;
214
226
  }, z.core.$strip>], "kind">;
215
227
  settings: z.ZodOptional<z.ZodObject<{
216
- rootDirectory: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
217
- installDirectory: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
218
- installCommand: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
219
- buildCommand: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
220
- outputDirectory: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
221
- ignoredBuildCommand: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
222
- frameworkPreset: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
223
- platformPreset: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
224
- allowUnsupportedPlatformFeatures: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
225
- timeoutSeconds: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
228
+ rootDirectory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
229
+ installDirectory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
230
+ installCommand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
231
+ buildCommand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
232
+ outputDirectory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
233
+ ignoredBuildCommand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
234
+ frameworkPreset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
235
+ platformPreset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
236
+ allowUnsupportedPlatformFeatures: z.ZodOptional<z.ZodBoolean>;
237
+ timeoutSeconds: z.ZodOptional<z.ZodNumber>;
226
238
  }, z.core.$strip>>;
227
239
  target: z.ZodOptional<z.ZodObject<{
228
240
  channel: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
@@ -239,7 +251,7 @@ export declare const buildCreateRequestSchema: z.ZodObject<{
239
251
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
240
252
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
241
253
  registrar: "registrar";
242
- wpcloud: "wpcloud";
254
+ infra: "infra";
243
255
  dns: "dns";
244
256
  runtime: "runtime";
245
257
  }>>>;
@@ -302,7 +314,7 @@ export declare const buildSourceArchiveUploadSchema: z.ZodObject<{
302
314
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
303
315
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
304
316
  registrar: "registrar";
305
- wpcloud: "wpcloud";
317
+ infra: "infra";
306
318
  dns: "dns";
307
319
  runtime: "runtime";
308
320
  }>>>;
@@ -366,7 +378,7 @@ export declare const buildCreateResponseSchema: z.ZodObject<{
366
378
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
367
379
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
368
380
  registrar: "registrar";
369
- wpcloud: "wpcloud";
381
+ infra: "infra";
370
382
  dns: "dns";
371
383
  runtime: "runtime";
372
384
  }>>>;
@@ -431,7 +443,7 @@ export declare const buildCreateResponseSchema: z.ZodObject<{
431
443
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
432
444
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
433
445
  registrar: "registrar";
434
- wpcloud: "wpcloud";
446
+ infra: "infra";
435
447
  dns: "dns";
436
448
  runtime: "runtime";
437
449
  }>>>;
@@ -500,7 +512,7 @@ export declare const buildListResponseSchema: z.ZodObject<{
500
512
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
501
513
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
502
514
  registrar: "registrar";
503
- wpcloud: "wpcloud";
515
+ infra: "infra";
504
516
  dns: "dns";
505
517
  runtime: "runtime";
506
518
  }>>>;
@@ -4,16 +4,30 @@ import { buildStatus } from "./enums.js";
4
4
  import { uploadInstructionsSchema } from "./internal.js";
5
5
  import { versionLogEntrySchema } from "./spaces.js";
6
6
  const nullableCommandSchema = z.string().trim().min(1).nullable();
7
- const buildTimeoutSecondsSchema = z.number().int().min(60).max(7200).default(900);
7
+ const buildTimeoutSecondsSchema = z.number().int().min(60).max(7200);
8
8
  const scpStyleGitRemotePattern = /^[^@\s/:]+@[^:\s]+:[^\s]+$/;
9
9
  const gitCloneUrlSchema = z
10
10
  .string()
11
11
  .trim()
12
12
  .min(1)
13
13
  .refine((value) => scpStyleGitRemotePattern.test(value) || z.string().url().safeParse(value).success, "Clone URL must be a URL or scp-style Git remote.");
14
- // Build (`bld_`, internal-docs/platform.md "Build"): a first-class resource with
14
+ // Build (`bld_`, the platform spec "Build"): a first-class resource with
15
15
  // its own table; ids are opaque and NEVER derived from version ids. The runner
16
16
  // mints the produced version through the normal finalize path.
17
+ export const BuildSettingsOverrideSchema = z
18
+ .object({
19
+ rootDirectory: nullableCommandSchema.optional(),
20
+ installDirectory: nullableCommandSchema.optional(),
21
+ installCommand: nullableCommandSchema.optional(),
22
+ buildCommand: nullableCommandSchema.optional(),
23
+ outputDirectory: nullableCommandSchema.optional(),
24
+ ignoredBuildCommand: nullableCommandSchema.optional(),
25
+ frameworkPreset: nullableCommandSchema.optional(),
26
+ platformPreset: nullableCommandSchema.optional(),
27
+ allowUnsupportedPlatformFeatures: z.boolean().optional(),
28
+ timeoutSeconds: buildTimeoutSecondsSchema.optional(),
29
+ })
30
+ .describe("Sparse per-request build setting overrides applied over saved settings.");
17
31
  export const BuildSettingsSchema = z
18
32
  .object({
19
33
  rootDirectory: nullableCommandSchema.default(null),
@@ -25,7 +39,7 @@ export const BuildSettingsSchema = z
25
39
  frameworkPreset: nullableCommandSchema.default(null),
26
40
  platformPreset: nullableCommandSchema.default(null),
27
41
  allowUnsupportedPlatformFeatures: z.boolean().default(false),
28
- timeoutSeconds: buildTimeoutSecondsSchema,
42
+ timeoutSeconds: buildTimeoutSecondsSchema.default(900),
29
43
  })
30
44
  .describe("Resolved build settings. Builds persist this as an immutable `settingsSnapshot`.");
31
45
  export const BuildTargetSchema = z
@@ -49,8 +63,15 @@ const internalArchiveBuildSourceSchema = z.object({
49
63
  .record(z.string(), z.unknown())
50
64
  .optional()
51
65
  .describe("Internal source provenance copied to the produced version."),
52
- objectKey: z.string().optional().describe("Internal staged archive object key."),
53
- uploadedAt: z.string().datetime().optional().describe("When the archive finished staging."),
66
+ sourceBuildId: z
67
+ .string()
68
+ .optional()
69
+ .describe("Build id whose provider runtime holds the source archive."),
70
+ uploadedAt: z
71
+ .string()
72
+ .datetime()
73
+ .optional()
74
+ .describe("When the archive reached the provider runtime."),
54
75
  recoveredAt: z
55
76
  .string()
56
77
  .datetime()
@@ -126,7 +147,7 @@ export const PublicBuildInputSchema = z
126
147
  })
127
148
  .strict(),
128
149
  ])
129
- .describe("Public build input. Internal clone URLs and staged object keys are hidden.");
150
+ .describe("Public build input. Internal clone URLs and provider source references are hidden.");
130
151
  export const BuildCreateInputSchema = z
131
152
  .discriminatedUnion("kind", [
132
153
  z
@@ -219,9 +240,7 @@ export const BuildSchema = z.object({
219
240
  });
220
241
  export const buildCreateRequestSchema = z.object({
221
242
  input: BuildCreateInputSchema,
222
- settings: BuildSettingsSchema.partial()
223
- .optional()
224
- .describe("Per-run settings overrides, persisted as `settingsSnapshot` after resolution."),
243
+ settings: BuildSettingsOverrideSchema.optional().describe("Per-run settings overrides, persisted as `settingsSnapshot` after resolution."),
225
244
  target: BuildTargetSchema.partial().optional(),
226
245
  diagnostics: z
227
246
  .array(baseDiagnosticSchema)
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- // Channels READ surface (internal-docs/platform.md "Channels"): a read-only
2
+ // Channels READ surface (the platform spec "Channels"): a read-only
3
3
  // projection over the existing `channels` table and the `channel.promoted`
4
4
  // activity log. No writes, no new storage — promotion stays owned by the
5
5
  // publish/version lifecycle. Additive only.