@spacefast/common 0.0.26 → 0.2.2

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 (302) hide show
  1. package/dist/agents/connect-targets.d.ts +6 -146
  2. package/dist/agents/connect-targets.js +63 -295
  3. package/dist/agents/private-key-oauth.d.ts +31 -1
  4. package/dist/agents/private-key-oauth.js +124 -33
  5. package/dist/agents/registry/core.d.ts +292 -0
  6. package/dist/agents/registry/core.js +1388 -0
  7. package/dist/agents/registry/deeplink-probes.d.ts +23 -0
  8. package/dist/agents/registry/deeplink-probes.js +18 -0
  9. package/dist/agents/registry/node.d.ts +56 -0
  10. package/dist/agents/registry/node.js +339 -0
  11. package/dist/brand-assets-build.js +1 -2
  12. package/dist/brand-assets.js +4 -7
  13. package/dist/brand.d.ts +17 -0
  14. package/dist/brand.js +24 -4
  15. package/dist/config/domains.d.ts +55 -28
  16. package/dist/config/domains.js +85 -41
  17. package/dist/config/index.js +1 -2
  18. package/dist/contracts/abuse.js +9 -24
  19. package/dist/contracts/access-profiles.d.ts +86 -0
  20. package/dist/contracts/access-profiles.js +89 -0
  21. package/dist/contracts/access.d.ts +21 -27
  22. package/dist/contracts/access.js +33 -64
  23. package/dist/contracts/activity.d.ts +18 -1
  24. package/dist/contracts/activity.js +70 -26
  25. package/dist/contracts/analytics.js +8 -10
  26. package/dist/contracts/api-keys.d.ts +77 -52
  27. package/dist/contracts/api-keys.js +44 -24
  28. package/dist/contracts/application-journal.d.ts +216 -0
  29. package/dist/contracts/application-journal.js +167 -0
  30. package/dist/contracts/auth.d.ts +90 -17
  31. package/dist/contracts/auth.js +86 -17
  32. package/dist/contracts/beta.d.ts +9 -4
  33. package/dist/contracts/beta.js +20 -16
  34. package/dist/contracts/billing.js +7 -11
  35. package/dist/contracts/bootstrap.d.ts +791 -0
  36. package/dist/contracts/bootstrap.js +51 -0
  37. package/dist/contracts/builds.d.ts +192 -7
  38. package/dist/contracts/builds.js +84 -21
  39. package/dist/contracts/channels.d.ts +43 -0
  40. package/dist/contracts/channels.js +25 -9
  41. package/dist/contracts/cli.d.ts +7 -0
  42. package/dist/contracts/cli.js +6 -0
  43. package/dist/contracts/collab-public.d.ts +1 -1
  44. package/dist/contracts/collab-public.js +5 -8
  45. package/dist/contracts/comments.d.ts +45 -35
  46. package/dist/contracts/comments.js +107 -77
  47. package/dist/contracts/commerce.d.ts +165 -0
  48. package/dist/contracts/commerce.js +146 -0
  49. package/dist/contracts/common.d.ts +3 -3
  50. package/dist/contracts/common.js +18 -29
  51. package/dist/contracts/content-contract-verification.d.ts +521 -0
  52. package/dist/contracts/content-contract-verification.js +320 -0
  53. package/dist/contracts/content-platform-fixture.d.ts +1278 -0
  54. package/dist/contracts/content-platform-fixture.js +44 -0
  55. package/dist/contracts/content-program.d.ts +994 -0
  56. package/dist/contracts/content-program.js +658 -0
  57. package/dist/contracts/content-sync.d.ts +290 -0
  58. package/dist/contracts/content-sync.js +167 -0
  59. package/dist/contracts/content.d.ts +432 -0
  60. package/dist/contracts/content.js +303 -0
  61. package/dist/contracts/continuation.d.ts +17 -1
  62. package/dist/contracts/continuation.js +23 -23
  63. package/dist/contracts/countries.js +3 -4
  64. package/dist/contracts/crons.d.ts +17 -0
  65. package/dist/contracts/crons.js +33 -15
  66. package/dist/contracts/dashboard-prefs.d.ts +56 -0
  67. package/dist/contracts/dashboard-prefs.js +51 -0
  68. package/dist/contracts/device-auth.d.ts +234 -37
  69. package/dist/contracts/device-auth.js +267 -53
  70. package/dist/contracts/docs.d.ts +6 -10
  71. package/dist/contracts/docs.js +5 -13
  72. package/dist/contracts/domains.d.ts +499 -102
  73. package/dist/contracts/domains.js +169 -58
  74. package/dist/contracts/email-preferences.d.ts +3 -3
  75. package/dist/contracts/email-preferences.js +6 -7
  76. package/dist/contracts/enums.d.ts +26 -26
  77. package/dist/contracts/enums.js +61 -54
  78. package/dist/contracts/error-code-meta.d.ts +273 -7
  79. package/dist/contracts/error-code-meta.js +81 -5
  80. package/dist/contracts/error-codes.d.ts +5 -5
  81. package/dist/contracts/error-codes.js +79 -16
  82. package/dist/contracts/events.d.ts +100 -20
  83. package/dist/contracts/events.js +107 -20
  84. package/dist/contracts/execution.d.ts +47 -66
  85. package/dist/contracts/execution.js +51 -64
  86. package/dist/contracts/feature-lifecycle.d.ts +70 -14
  87. package/dist/contracts/feature-lifecycle.js +86 -15
  88. package/dist/contracts/features.d.ts +100 -37
  89. package/dist/contracts/features.js +21 -27
  90. package/dist/contracts/fixtures/content-platform-v1.json +1108 -0
  91. package/dist/contracts/frame-session.d.ts +192 -0
  92. package/dist/contracts/frame-session.js +164 -0
  93. package/dist/contracts/functions.d.ts +218 -211
  94. package/dist/contracts/functions.js +273 -260
  95. package/dist/contracts/grant-copy.d.ts +43 -0
  96. package/dist/contracts/grant-copy.js +44 -0
  97. package/dist/contracts/grants.d.ts +64 -56
  98. package/dist/contracts/grants.js +124 -23
  99. package/dist/contracts/ids.d.ts +4 -1
  100. package/dist/contracts/ids.js +4 -1
  101. package/dist/contracts/internal.d.ts +5 -4
  102. package/dist/contracts/internal.js +12 -3
  103. package/dist/contracts/mcp.d.ts +17 -0
  104. package/dist/contracts/mcp.js +23 -0
  105. package/dist/contracts/me.d.ts +6 -1
  106. package/dist/contracts/me.js +12 -6
  107. package/dist/contracts/notifications.d.ts +27 -29
  108. package/dist/contracts/notifications.js +9 -4
  109. package/dist/contracts/oauth-resources.d.ts +121 -10
  110. package/dist/contracts/oauth-resources.js +130 -11
  111. package/dist/contracts/oauth-scope-actions.d.ts +90 -0
  112. package/dist/contracts/oauth-scope-actions.js +126 -0
  113. package/dist/contracts/operations.d.ts +27 -4
  114. package/dist/contracts/operations.js +11 -5
  115. package/dist/contracts/pages.d.ts +29 -5
  116. package/dist/contracts/pages.js +22 -5
  117. package/dist/contracts/partner-notifications.d.ts +3 -0
  118. package/dist/contracts/partner-notifications.js +65 -0
  119. package/dist/contracts/{platform.d.ts → partner.d.ts} +29 -42
  120. package/dist/contracts/{platform.js → partner.js} +27 -40
  121. package/dist/contracts/plan-policy.d.ts +1 -1
  122. package/dist/contracts/principal-assertion.d.ts +43 -0
  123. package/dist/contracts/principal-assertion.js +67 -0
  124. package/dist/contracts/principals.d.ts +73 -0
  125. package/dist/contracts/principals.js +59 -0
  126. package/dist/contracts/privacy.d.ts +11 -0
  127. package/dist/contracts/privacy.js +17 -0
  128. package/dist/contracts/problem-document.js +3 -4
  129. package/dist/contracts/publish-archive.d.ts +116 -18
  130. package/dist/contracts/publish-archive.js +6 -3
  131. package/dist/contracts/push-new.d.ts +4 -4
  132. package/dist/contracts/quotas.js +3 -3
  133. package/dist/contracts/realtime.d.ts +52 -0
  134. package/dist/contracts/realtime.js +54 -0
  135. package/dist/contracts/repository-connections.d.ts +1 -1
  136. package/dist/contracts/repository-connections.js +6 -2
  137. package/dist/contracts/resources.d.ts +105 -14
  138. package/dist/contracts/resources.js +145 -21
  139. package/dist/contracts/route-inventory.d.ts +358 -0
  140. package/dist/contracts/route-inventory.js +141 -0
  141. package/dist/contracts/runtime-api.d.ts +112 -35
  142. package/dist/contracts/runtime-api.js +86 -66
  143. package/dist/contracts/runtime-app.d.ts +11 -21
  144. package/dist/contracts/runtime-app.js +39 -24
  145. package/dist/contracts/runtime-components.d.ts +143 -0
  146. package/dist/contracts/runtime-components.js +199 -0
  147. package/dist/contracts/runtime-db.d.ts +45 -19
  148. package/dist/contracts/runtime-db.js +85 -20
  149. package/dist/contracts/runtime-purge.js +3 -5
  150. package/dist/contracts/runtime-services.d.ts +43 -75
  151. package/dist/contracts/runtime-services.js +29 -49
  152. package/dist/contracts/runtime-storage.d.ts +14 -14
  153. package/dist/contracts/runtime-storage.js +28 -13
  154. package/dist/contracts/sf-config-v1.d.ts +14 -18
  155. package/dist/contracts/slugs.js +13 -4
  156. package/dist/contracts/space-config.d.ts +235 -28
  157. package/dist/contracts/space-config.js +246 -91
  158. package/dist/contracts/spaces.d.ts +360 -255
  159. package/dist/contracts/spaces.js +190 -122
  160. package/dist/contracts/superadmin-activity.d.ts +3 -43
  161. package/dist/contracts/superadmin-activity.js +6 -30
  162. package/dist/contracts/superadmin-emails.d.ts +1 -0
  163. package/dist/contracts/superadmin-emails.js +17 -1
  164. package/dist/contracts/superadmin-runtime.d.ts +199 -0
  165. package/dist/contracts/superadmin-runtime.js +141 -0
  166. package/dist/contracts/superadmin-search.d.ts +22 -2
  167. package/dist/contracts/superadmin-search.js +14 -6
  168. package/dist/contracts/superadmin-spaces.d.ts +435 -186
  169. package/dist/contracts/superadmin-spaces.js +131 -25
  170. package/dist/contracts/superadmin-teams.d.ts +3 -0
  171. package/dist/contracts/superadmin-teams.js +1 -2
  172. package/dist/contracts/superadmin-tenants.d.ts +627 -6
  173. package/dist/contracts/superadmin-tenants.js +32 -7
  174. package/dist/contracts/superadmin.d.ts +98 -16
  175. package/dist/contracts/superadmin.js +63 -10
  176. package/dist/contracts/tags.d.ts +85 -58
  177. package/dist/contracts/tags.js +44 -34
  178. package/dist/contracts/teams.d.ts +72 -9
  179. package/dist/contracts/teams.js +84 -25
  180. package/dist/contracts/tenants.d.ts +135 -0
  181. package/dist/contracts/tenants.js +120 -0
  182. package/dist/contracts/test-triggers.d.ts +70 -0
  183. package/dist/contracts/test-triggers.js +116 -0
  184. package/dist/contracts/theme-json.js +3 -8
  185. package/dist/contracts/transfers.d.ts +1 -0
  186. package/dist/contracts/transfers.js +1 -0
  187. package/dist/contracts/usage.d.ts +209 -0
  188. package/dist/contracts/usage.js +124 -12
  189. package/dist/contracts/variables.d.ts +2 -2
  190. package/dist/contracts/variables.js +9 -13
  191. package/dist/contracts/webhooks.d.ts +13 -5
  192. package/dist/contracts/webhooks.js +3 -1
  193. package/dist/contracts/zero.d.ts +57 -64
  194. package/dist/contracts/zero.js +68 -66
  195. package/dist/dashboard-paths/index.d.ts +24 -21
  196. package/dist/dashboard-paths/index.js +35 -47
  197. package/dist/dashboard-paths/route-reservations.generated.d.ts +2 -0
  198. package/dist/dashboard-paths/route-reservations.generated.js +36 -0
  199. package/dist/docs/agent-arrival.d.ts +92 -0
  200. package/dist/docs/agent-arrival.js +227 -0
  201. package/dist/docs/agent-output-policy.d.ts +6 -0
  202. package/dist/docs/agent-output-policy.js +22 -0
  203. package/dist/docs/agent-prose.d.ts +11 -17
  204. package/dist/docs/agent-prose.js +62 -37
  205. package/dist/docs/agent-setup.d.ts +72 -41
  206. package/dist/docs/agent-setup.js +336 -436
  207. package/dist/docs/catalog.d.ts +147 -89
  208. package/dist/docs/catalog.js +157 -42
  209. package/dist/docs/error-docs.d.ts +2102 -1
  210. package/dist/docs/error-docs.js +285 -16
  211. package/dist/docs/index-build.d.ts +0 -1
  212. package/dist/docs/index-build.js +2 -3
  213. package/dist/docs/page-context-prompt.d.ts +77 -0
  214. package/dist/docs/page-context-prompt.js +131 -0
  215. package/dist/docs/reference-urls.d.ts +46 -0
  216. package/dist/docs/reference-urls.js +79 -0
  217. package/dist/docs/search.d.ts +6 -8
  218. package/dist/docs/search.js +10 -13
  219. package/dist/docs/skill-distribution.d.ts +4 -1
  220. package/dist/docs/skill-distribution.js +10 -5
  221. package/dist/docs/skills.d.ts +117 -117
  222. package/dist/docs/skills.js +120 -72
  223. package/dist/docs/start-prompts.d.ts +45 -0
  224. package/dist/docs/start-prompts.js +62 -0
  225. package/dist/domain-exploration.js +9 -13
  226. package/dist/og-template.d.ts +56 -0
  227. package/dist/og-template.js +56 -0
  228. package/dist/slug-policy/index.js +5 -11
  229. package/dist/utils/browser-credential.d.ts +13 -6
  230. package/dist/utils/browser-credential.js +14 -7
  231. package/dist/utils/build-settings.d.ts +16 -0
  232. package/dist/utils/build-settings.js +63 -17
  233. package/dist/utils/canonical-json.d.ts +3 -5
  234. package/dist/utils/canonical-json.js +3 -5
  235. package/dist/utils/cast-transport.d.ts +5 -17
  236. package/dist/utils/cast-transport.js +6 -19
  237. package/dist/utils/claim-token.js +1 -2
  238. package/dist/utils/comment-avatars.js +4 -6
  239. package/dist/utils/concurrency.js +2 -3
  240. package/dist/utils/content-type.d.ts +7 -6
  241. package/dist/utils/content-type.js +73 -51
  242. package/dist/utils/credential-policy.d.ts +50 -6
  243. package/dist/utils/credential-policy.js +123 -57
  244. package/dist/utils/egress-policy.fixtures.json +1 -1
  245. package/dist/utils/generate-space-name.d.ts +3 -8
  246. package/dist/utils/generate-space-name.js +3 -8
  247. package/dist/utils/grants.d.ts +0 -1
  248. package/dist/utils/grants.js +4 -7
  249. package/dist/utils/gravatar.d.ts +2 -4
  250. package/dist/utils/gravatar.js +6 -12
  251. package/dist/utils/id-hints.js +14 -23
  252. package/dist/utils/idempotency.d.ts +3 -3
  253. package/dist/utils/idempotency.js +6 -7
  254. package/dist/utils/local-space-state.d.ts +15 -15
  255. package/dist/utils/local-space-state.js +34 -23
  256. package/dist/utils/oauth-signed-query.d.ts +3 -5
  257. package/dist/utils/oauth-signed-query.js +6 -9
  258. package/dist/utils/one-shot-replay.d.ts +3 -5
  259. package/dist/utils/one-shot-replay.js +3 -5
  260. package/dist/utils/page-colors.d.ts +4 -10
  261. package/dist/utils/page-colors.js +11 -35
  262. package/dist/utils/page-fonts.js +6 -11
  263. package/dist/utils/page-preview.d.ts +0 -1
  264. package/dist/utils/page-preview.js +0 -1
  265. package/dist/utils/pages.d.ts +22 -11
  266. package/dist/utils/pages.js +70 -30
  267. package/dist/utils/privacy-regions.d.ts +19 -0
  268. package/dist/utils/privacy-regions.js +91 -0
  269. package/dist/utils/publish-form-data.d.ts +4 -5
  270. package/dist/utils/publish-form-data.js +2 -3
  271. package/dist/utils/publish-policy.d.ts +10 -23
  272. package/dist/utils/publish-policy.js +63 -116
  273. package/dist/utils/query-client.d.ts +2 -0
  274. package/dist/utils/query-client.js +10 -1
  275. package/dist/utils/runtime-paths.d.ts +4 -4
  276. package/dist/utils/runtime-paths.js +6 -8
  277. package/dist/utils/runtime-upload.d.ts +4 -0
  278. package/dist/utils/runtime-upload.js +5 -0
  279. package/dist/utils/secure-local-file.d.ts +3 -3
  280. package/dist/utils/secure-local-file.js +18 -24
  281. package/dist/utils/space-config.d.ts +11 -14
  282. package/dist/utils/space-config.js +10 -16
  283. package/dist/utils/static-runtime-policy.d.ts +5 -8
  284. package/dist/utils/static-runtime-policy.generated.d.ts +16 -0
  285. package/dist/utils/static-runtime-policy.generated.js +70 -0
  286. package/dist/utils/static-runtime-policy.js +17 -84
  287. package/dist/utils/storage-policy.js +1 -2
  288. package/dist/utils/upload-session.js +8 -14
  289. package/dist/utils/version-path.js +11 -19
  290. package/dist/utils/wpcom-auth-redirects.d.ts +5 -14
  291. package/dist/utils/wpcom-auth-redirects.js +1 -4
  292. package/dist/vocabulary.d.ts +7 -7
  293. package/dist/vocabulary.js +30 -16
  294. package/package.json +14 -2
  295. package/dist/agents/client-registry.d.ts +0 -22
  296. package/dist/agents/client-registry.js +0 -41
  297. package/dist/docs/agent-handoff-document.d.ts +0 -15
  298. package/dist/docs/agent-handoff-document.js +0 -180
  299. package/dist/docs/agent-solutions.d.ts +0 -110
  300. package/dist/docs/agent-solutions.js +0 -183
  301. package/dist/utils/query-keys.d.ts +0 -84
  302. package/dist/utils/query-keys.js +0 -108
@@ -14,9 +14,6 @@ export declare const runtimePurgeReceiptSchema: z.ZodObject<{
14
14
  }>;
15
15
  urls: z.ZodOptional<z.ZodNumber>;
16
16
  }, z.core.$strip>;
17
- export declare const runtimeSpacePurgeRequestSchema: z.ZodObject<{
18
- urls: z.ZodOptional<z.ZodArray<z.ZodString>>;
19
- }, z.core.$strip>;
20
17
  export declare const runtimeSpacePurgeResponseSchema: z.ZodObject<{
21
18
  space_id: z.ZodString;
22
19
  purge: z.ZodObject<{
@@ -82,6 +79,32 @@ export declare const runtimeVersionCreateRequestSchema: z.ZodObject<{
82
79
  expires_at: z.ZodOptional<z.ZodString>;
83
80
  metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
84
81
  }, z.core.$strip>;
82
+ export declare const runtimeStaticZipIngestResponseSchema: z.ZodObject<{
83
+ space_id: z.ZodString;
84
+ files: z.ZodArray<z.ZodObject<{
85
+ path: z.ZodString;
86
+ size: z.ZodNumber;
87
+ sha256: z.ZodString;
88
+ sniff: z.ZodEnum<{
89
+ text: "text";
90
+ binary: "binary";
91
+ png: "png";
92
+ jpeg: "jpeg";
93
+ gif: "gif";
94
+ webp: "webp";
95
+ avif: "avif";
96
+ ico: "ico";
97
+ pdf: "pdf";
98
+ gzip: "gzip";
99
+ woff: "woff";
100
+ woff2: "woff2";
101
+ ttf: "ttf";
102
+ otf: "otf";
103
+ }>;
104
+ }, z.core.$strip>>;
105
+ pin_expires_at: z.ZodString;
106
+ }, z.core.$strip>;
107
+ export type RuntimeStaticZipIngestResponse = z.infer<typeof runtimeStaticZipIngestResponseSchema>;
85
108
  export declare const runtimeVersionCreateResponseSchema: z.ZodObject<{
86
109
  space_id: z.ZodString;
87
110
  version_id: z.ZodString;
@@ -118,10 +141,9 @@ export declare const runtimeUploadSessionDescriptorSchema: z.ZodObject<{
118
141
  }, z.core.$strip>;
119
142
  export type RuntimeUploadSessionDescriptor = z.infer<typeof runtimeUploadSessionDescriptorSchema>;
120
143
  /**
121
- * The retention half of a create-version body or session descriptor, spelled
122
- * once. `retained_files` is omitted when empty with an explicit `retention`
123
- * that omission is unambiguous: it means retain nothing beyond what `all`
124
- * materializes.
144
+ * The retention half of a create-version body or session descriptor.
145
+ * `retained_files` is omitted when empty; with an explicit `retention` that
146
+ * omission means retain nothing beyond what `all` materializes.
125
147
  */
126
148
  export declare function runtimeRetentionFields(input: {
127
149
  retention: RuntimeRetentionMode;
@@ -337,6 +359,7 @@ export declare const runtimeVersionFinalizeRequestSchema: z.ZodObject<{
337
359
  reusable_version_id: z.ZodOptional<z.ZodString>;
338
360
  metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
339
361
  }, z.core.$strip>>;
362
+ previous_version_id: z.ZodOptional<z.ZodString>;
340
363
  zero: z.ZodOptional<z.ZodObject<{
341
364
  auth: z.ZodDefault<z.ZodObject<{
342
365
  provider: z.ZodDefault<z.ZodLiteral<"gravatar">>;
@@ -346,10 +369,6 @@ export declare const runtimeVersionFinalizeRequestSchema: z.ZodObject<{
346
369
  signOutUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
347
370
  returnToParam: z.ZodDefault<z.ZodString>;
348
371
  }, z.core.$strict>>;
349
- variables: z.ZodObject<{
350
- source: z.ZodLiteral<"stattic-variables">;
351
- names: z.ZodDefault<z.ZodArray<z.ZodString>>;
352
- }, z.core.$strict>;
353
372
  realtime: z.ZodObject<{
354
373
  mode: z.ZodEnum<{
355
374
  local: "local";
@@ -495,6 +514,10 @@ export declare const runtimeVersionFinalizeRequestSchema: z.ZodObject<{
495
514
  }, z.core.$strip>>>;
496
515
  }, z.core.$strict>;
497
516
  }, z.core.$strict>;
517
+ variables: z.ZodObject<{
518
+ source: z.ZodLiteral<"stattic-variables">;
519
+ names: z.ZodDefault<z.ZodArray<z.ZodString>>;
520
+ }, z.core.$strict>;
498
521
  runtimeKind: z.ZodLiteral<"zero">;
499
522
  migrations: z.ZodDefault<z.ZodNullable<z.ZodObject<{
500
523
  format: z.ZodLiteral<"stattic.zero.migrations.v1">;
@@ -638,6 +661,7 @@ export declare const runtimeVersionFinalizeRequestSchema: z.ZodObject<{
638
661
  gravatar: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
639
662
  spam: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
640
663
  email: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
664
+ content: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
641
665
  }, z.core.$strip>>;
642
666
  platform: z.ZodDefault<z.ZodObject<{
643
667
  nextCache: z.ZodDefault<z.ZodBoolean>;
@@ -724,6 +748,19 @@ export declare const runtimeVersionFinalizeRequestSchema: z.ZodObject<{
724
748
  index: z.ZodOptional<z.ZodString>;
725
749
  }, z.core.$strip>>;
726
750
  previews: z.ZodRecord<z.ZodString, z.ZodString>;
751
+ platform: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
752
+ legal: "legal";
753
+ login: "login";
754
+ suspended: "suspended";
755
+ undeployed: "undeployed";
756
+ gone: "gone";
757
+ "runtime-error": "runtime-error";
758
+ "rate-limited": "rate-limited";
759
+ "tier-unavailable": "tier-unavailable";
760
+ "proxy-error": "proxy-error";
761
+ "method-not-allowed": "method-not-allowed";
762
+ "content-too-large": "content-too-large";
763
+ }>, z.ZodString>>;
727
764
  collab: z.ZodOptional<z.ZodString>;
728
765
  }, z.core.$strip>>;
729
766
  experimental_gutenberg: z.ZodOptional<z.ZodBoolean>;
@@ -968,14 +1005,44 @@ export declare const runtimeCatalogDeltaSchema: z.ZodObject<{
968
1005
  export declare const runtimeCompileDiagnosticSchema: z.ZodObject<{
969
1006
  severity: z.ZodEnum<{
970
1007
  info: "info";
971
- error: "error";
972
1008
  warning: "warning";
1009
+ error: "error";
973
1010
  }>;
974
1011
  code: z.ZodString;
975
1012
  message: z.ZodString;
976
1013
  path: z.ZodOptional<z.ZodString>;
977
1014
  details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
978
1015
  }, z.core.$strip>;
1016
+ export declare const runtimeRouteInventorySchema: z.ZodObject<{
1017
+ format: z.ZodLiteral<"stattic.route-inventory.v1">;
1018
+ routes: z.ZodArray<z.ZodObject<{
1019
+ id: z.ZodString;
1020
+ kind: z.ZodEnum<{
1021
+ proxy: "proxy";
1022
+ functions: "functions";
1023
+ redirect: "redirect";
1024
+ rewrite: "rewrite";
1025
+ "not-found": "not-found";
1026
+ "php-function": "php-function";
1027
+ "zero-control": "zero-control";
1028
+ "zero-endpoint": "zero-endpoint";
1029
+ }>;
1030
+ source: z.ZodString;
1031
+ runtime: z.ZodEnum<{
1032
+ routing: "routing";
1033
+ php: "php";
1034
+ "cloudflare-worker": "cloudflare-worker";
1035
+ "quick-js": "quick-js";
1036
+ }>;
1037
+ host: z.ZodString;
1038
+ path: z.ZodString;
1039
+ methods: z.ZodArray<z.ZodString>;
1040
+ auth: z.ZodLiteral<"inherit">;
1041
+ cache: z.ZodOptional<z.ZodLiteral<"shared">>;
1042
+ destination: z.ZodOptional<z.ZodString>;
1043
+ status: z.ZodOptional<z.ZodNumber>;
1044
+ }, z.core.$strip>>;
1045
+ }, z.core.$strip>;
979
1046
  export declare const runtimeCompiledRoutingSchema: z.ZodObject<{
980
1047
  redirect_rule_count: z.ZodNumber;
981
1048
  header_rule_count: z.ZodNumber;
@@ -1023,8 +1090,8 @@ export declare const runtimeVersionFinalizeResponseSchema: z.ZodObject<{
1023
1090
  diagnostics: z.ZodDefault<z.ZodArray<z.ZodObject<{
1024
1091
  severity: z.ZodEnum<{
1025
1092
  info: "info";
1026
- error: "error";
1027
1093
  warning: "warning";
1094
+ error: "error";
1028
1095
  }>;
1029
1096
  code: z.ZodString;
1030
1097
  message: z.ZodString;
@@ -1040,6 +1107,36 @@ export declare const runtimeVersionFinalizeResponseSchema: z.ZodObject<{
1040
1107
  destination: z.ZodString;
1041
1108
  }, z.core.$strip>>>;
1042
1109
  }, z.core.$strip>>;
1110
+ route_inventory: z.ZodOptional<z.ZodObject<{
1111
+ format: z.ZodLiteral<"stattic.route-inventory.v1">;
1112
+ routes: z.ZodArray<z.ZodObject<{
1113
+ id: z.ZodString;
1114
+ kind: z.ZodEnum<{
1115
+ proxy: "proxy";
1116
+ functions: "functions";
1117
+ redirect: "redirect";
1118
+ rewrite: "rewrite";
1119
+ "not-found": "not-found";
1120
+ "php-function": "php-function";
1121
+ "zero-control": "zero-control";
1122
+ "zero-endpoint": "zero-endpoint";
1123
+ }>;
1124
+ source: z.ZodString;
1125
+ runtime: z.ZodEnum<{
1126
+ routing: "routing";
1127
+ php: "php";
1128
+ "cloudflare-worker": "cloudflare-worker";
1129
+ "quick-js": "quick-js";
1130
+ }>;
1131
+ host: z.ZodString;
1132
+ path: z.ZodString;
1133
+ methods: z.ZodArray<z.ZodString>;
1134
+ auth: z.ZodLiteral<"inherit">;
1135
+ cache: z.ZodOptional<z.ZodLiteral<"shared">>;
1136
+ destination: z.ZodOptional<z.ZodString>;
1137
+ status: z.ZodOptional<z.ZodNumber>;
1138
+ }, z.core.$strip>>;
1139
+ }, z.core.$strip>>;
1043
1140
  variable_digests: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1044
1141
  system_variable_dependencies: z.ZodDefault<z.ZodArray<z.ZodString>>;
1045
1142
  manifest: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -1340,26 +1437,6 @@ export declare const runtimeTombstonesUpdateResponseSchema: z.ZodObject<{
1340
1437
  space_id: z.ZodString;
1341
1438
  tombstone_count: z.ZodNumber;
1342
1439
  }, z.core.$strip>;
1343
- export declare const runtimeRetentionPolicyUpdateRequestSchema: z.ZodObject<{
1344
- prunable_version_ids: z.ZodArray<z.ZodString>;
1345
- }, z.core.$strip>;
1346
- export declare const runtimeRetentionPolicyUpdateResponseSchema: z.ZodObject<{
1347
- purge: z.ZodOptional<z.ZodObject<{
1348
- status: z.ZodEnum<{
1349
- failed: "failed";
1350
- queued: "queued";
1351
- pending: "pending";
1352
- ok: "ok";
1353
- }>;
1354
- mode: z.ZodEnum<{
1355
- domain: "domain";
1356
- urls: "urls";
1357
- }>;
1358
- urls: z.ZodOptional<z.ZodNumber>;
1359
- }, z.core.$strip>>;
1360
- space_id: z.ZodString;
1361
- prunable_count: z.ZodNumber;
1362
- }, z.core.$strip>;
1363
1440
  export declare const runtimeVersionDeleteResponseSchema: z.ZodObject<{
1364
1441
  purge: z.ZodOptional<z.ZodObject<{
1365
1442
  status: z.ZodEnum<{
@@ -1458,6 +1535,7 @@ export declare const runtimeCallbackEventSchema: z.ZodObject<{
1458
1535
  operation_action: z.ZodOptional<z.ZodString>;
1459
1536
  space_id: z.ZodOptional<z.ZodString>;
1460
1537
  version_id: z.ZodOptional<z.ZodString>;
1538
+ version_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
1461
1539
  route_name: z.ZodOptional<z.ZodString>;
1462
1540
  hostnames: z.ZodOptional<z.ZodArray<z.ZodString>>;
1463
1541
  changed_paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -1513,6 +1591,7 @@ export declare const runtimeEventsDrainResponseSchema: z.ZodObject<{
1513
1591
  operation_action: z.ZodOptional<z.ZodString>;
1514
1592
  space_id: z.ZodOptional<z.ZodString>;
1515
1593
  version_id: z.ZodOptional<z.ZodString>;
1594
+ version_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
1516
1595
  route_name: z.ZodOptional<z.ZodString>;
1517
1596
  hostnames: z.ZodOptional<z.ZodArray<z.ZodString>>;
1518
1597
  changed_paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -1667,7 +1746,6 @@ export declare const runtimeEngineJobTickResponseSchema: z.ZodObject<{
1667
1746
  drained: z.ZodOptional<z.ZodBoolean>;
1668
1747
  }, z.core.$strip>;
1669
1748
  export type RuntimeVersionCreateRequest = z.infer<typeof runtimeVersionCreateRequestSchema>;
1670
- export type RuntimeSpacePurgeRequest = z.infer<typeof runtimeSpacePurgeRequestSchema>;
1671
1749
  export type RuntimeVersionFinalizeRequest = z.infer<typeof runtimeVersionFinalizeRequestSchema>;
1672
1750
  export type RuntimeVersionFinalizeResponse = z.infer<typeof runtimeVersionFinalizeResponseSchema>;
1673
1751
  export type RuntimeFinalizeTelemetry = z.infer<typeof runtimeFinalizeTelemetrySchema>;
@@ -1675,7 +1753,6 @@ export type RuntimeReadinessTarget = z.infer<typeof runtimeReadinessTargetSchema
1675
1753
  export type RuntimeHostnameIntentUpdateRequest = z.infer<typeof runtimeHostnameIntentUpdateRequestSchema>;
1676
1754
  export type RuntimeRouteUpdateRequest = z.infer<typeof runtimeRouteUpdateRequestSchema>;
1677
1755
  export type RuntimeTombstonesUpdateRequest = z.infer<typeof runtimeTombstonesUpdateRequestSchema>;
1678
- export type RuntimeRetentionPolicyUpdateRequest = z.infer<typeof runtimeRetentionPolicyUpdateRequestSchema>;
1679
1756
  export type RuntimeSpaceState = z.infer<typeof runtimeSpaceStateSchema>;
1680
1757
  export type RuntimeCallbackEvent = z.infer<typeof runtimeCallbackEventSchema>;
1681
1758
  export type RuntimeEventsDrainRequest = z.infer<typeof runtimeEventsDrainRequestSchema>;
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod";
2
+ import { CONTENT_SNIFF_KINDS } from "../utils/content-type.js";
2
3
  import { accessFenceKindSchema } from "./access.js";
3
4
  import { functionsRuntimeConfigSchema } from "./functions.js";
4
5
  import { grantSchema } from "./grants.js";
@@ -38,7 +39,7 @@ const previousVersionIdSchema = z
38
39
  .string()
39
40
  .min(1)
40
41
  .optional()
41
- .describe("The pointer target this activation replaces (diff baseline).");
42
+ .describe("The previous live version used as the catalog diff baseline.");
42
43
  export const runtimePurgeReceiptSchema = z.object({
43
44
  status: runtimePurgeStatusSchema,
44
45
  mode: z.enum(["urls", "domain"]),
@@ -47,15 +48,11 @@ export const runtimePurgeReceiptSchema = z.object({
47
48
  const runtimeMutationPurgeFields = {
48
49
  purge: runtimePurgeReceiptSchema.optional(),
49
50
  };
50
- export const runtimeSpacePurgeRequestSchema = z.object({
51
- urls: z.array(z.string().startsWith("/")).optional(),
52
- });
53
51
  export const runtimeSpacePurgeResponseSchema = z.object({
54
52
  space_id: z.string().min(1),
55
53
  purge: runtimePurgeReceiptSchema,
56
54
  });
57
- // One bounded page of a version's file catalog the runtime's own answer to
58
- // "which files does this version have". `view=source` is the uploaded,
55
+ // One bounded page of a version's file catalog. `view=source` is the uploaded,
59
56
  // pre-substitution object; `view=served` is the immutable byte a visitor
60
57
  // receives, and `variant_route` marks a channel's substituted bytes within it.
61
58
  export const runtimeVersionFilesResponseSchema = z.object({
@@ -77,16 +74,15 @@ export const runtimeVersionCreateRequestSchema = z.object({
77
74
  version_id: z.string().min(1).optional(),
78
75
  files: z.array(manifestFileSchema),
79
76
  // Retention is stated, never inferred. `all` carries every path of
80
- // `reusable_version_id` forward the runtime materializes that list from the
81
- // base version's own catalog at finalize, under the space lock, which is what
82
- // keeps the lazy publish path free of a pre-upload round trip. `list` retains
83
- // exactly `retained_files`, and an EMPTY list is meaningful: it is a publish
84
- // that drops every path the base held. `none` retains nothing.
77
+ // `reusable_version_id` forward, materialized from the base catalog at
78
+ // finalize under the space lock, which keeps the lazy publish path free of a
79
+ // pre-upload round trip. `list` retains exactly `retained_files`, and an EMPTY
80
+ // list is meaningful: it drops every path the base held. `none` retains
81
+ // nothing.
85
82
  //
86
- // `all` and `list` both require `reusable_version_id`. Only `list` may carry
87
- // `retained_files`. Inferring `all` from "base named + empty list" used to
88
- // silently undo deletes — the runtime has no delete list, so deletion IS
89
- // omission from the retained set.
83
+ // `all` and `list` both require `reusable_version_id`; only `list` may carry
84
+ // `retained_files`. The runtime has no delete list, so deletion IS omission
85
+ // from the retained set.
90
86
  retention: runtimeRetentionModeSchema,
91
87
  retained_files: z.array(manifestFileSchema).optional(),
92
88
  reusable_version_id: z.string().min(1).optional(),
@@ -94,6 +90,16 @@ export const runtimeVersionCreateRequestSchema = z.object({
94
90
  expires_at: z.string().optional(),
95
91
  metadata: z.record(z.string(), z.unknown()).default({}),
96
92
  });
93
+ export const runtimeStaticZipIngestResponseSchema = z.object({
94
+ space_id: z.string().min(1),
95
+ files: z.array(z.object({
96
+ path: z.string().min(1),
97
+ size: z.number().int().nonnegative(),
98
+ sha256: z.string().regex(/^[a-f0-9]{64}$/),
99
+ sniff: z.enum(CONTENT_SNIFF_KINDS),
100
+ })),
101
+ pin_expires_at: z.string().datetime({ offset: true }),
102
+ });
97
103
  export const runtimeVersionCreateResponseSchema = z.object({
98
104
  space_id: z.string(),
99
105
  version_id: z.string(),
@@ -107,20 +113,18 @@ export const runtimeUploadSessionDescriptorSchema = z.object({
107
113
  expires_at: z.string(),
108
114
  manifest_hash: z.string().optional(),
109
115
  files: z.array(manifestFileSchema),
110
- // Retained files only travel in the authenticated finalize request: they are
111
- // unbounded and unused while accepting a PUT, which is also what keeps a lazy
112
- // session's descriptor inside its JWT budget. Retention itself is stated on
113
- // the wire — see the create request.
116
+ // Retained files travel only in the authenticated finalize request: they are
117
+ // unbounded and unused while accepting a PUT, which keeps a lazy session's
118
+ // descriptor inside its JWT budget.
114
119
  retention: runtimeRetentionModeSchema,
115
120
  retained_files: z.array(manifestFileSchema).optional(),
116
121
  reusable_version_id: z.string().min(1).optional(),
117
122
  metadata: z.record(z.string(), z.unknown()).default({}),
118
123
  });
119
124
  /**
120
- * The retention half of a create-version body or session descriptor, spelled
121
- * once. `retained_files` is omitted when empty with an explicit `retention`
122
- * that omission is unambiguous: it means retain nothing beyond what `all`
123
- * materializes.
125
+ * The retention half of a create-version body or session descriptor.
126
+ * `retained_files` is omitted when empty; with an explicit `retention` that
127
+ * omission means retain nothing beyond what `all` materializes.
124
128
  */
125
129
  export function runtimeRetentionFields(input) {
126
130
  return {
@@ -221,9 +225,9 @@ export const runtimeAuthorizationProjectionSchema = z
221
225
  // The space-level Comments projection the runtime serves as the whole answer
222
226
  // for `/__spacefast/comments/config`; the runtime adds only per-request fields.
223
227
  const runtimeSdkCommentsSchema = z.object({
224
- // Comments boot on the live/published host.
228
+ // Which hosts Comments boot on: the live/published host, and the immutable
229
+ // version (preview) host.
225
230
  live: z.boolean(),
226
- // ...and on an immutable version (preview) host.
227
231
  preview: z.boolean(),
228
232
  // Null before the Space has ever published.
229
233
  live_url: z.string().url().max(2000).nullable(),
@@ -432,17 +436,17 @@ const runtimeSubstitutionChannelSchema = z.object({
432
436
  export const runtimeVersionFinalizeRequestSchema = z.object({
433
437
  upload_id: z.string().min(1),
434
438
  session: runtimeUploadSessionDescriptorSchema.optional(),
439
+ // Capsule versions finalize and activate in separate calls, but still need
440
+ // the same publish delta as the combined path.
441
+ previous_version_id: previousVersionIdSchema,
435
442
  zero: zeroRuntimeConfigSchema.optional(),
436
443
  // Dispatch configuration for a Functions version. Absent for static versions,
437
- // and absent when no execution host is configured the version then serves
438
- // as pure static content, because this config is what makes the origin
439
- // dispatch at all.
444
+ // and absent when no execution host is configured; this config is what makes
445
+ // the origin dispatch at all.
440
446
  functions: functionsRuntimeConfigSchema.optional(),
441
- // Variable resolution is the control plane's half of substitution and stays
442
- // there: scopes come from its database, secret values are never decrypted for
443
- // it, and `SPACEFAST_*` names are platform-provided. The finalizer owns the
444
- // substitution itself — it has the staged bytes and the config that declares
445
- // which paths are templates, so nothing pre-substituted crosses this wire.
447
+ // The control plane resolves variable scopes; secret values are never
448
+ // decrypted for it. The finalizer performs the substitution itself, so
449
+ // nothing pre-substituted crosses this wire.
446
450
  variable_scopes: z.array(runtimeVariableScopeSchema).optional(),
447
451
  system_variables: z.record(z.string().min(1), z.string()).optional(),
448
452
  // The space's channels, so the finalizer can compile each one's variant files
@@ -467,11 +471,9 @@ export const runtimeVersionFinalizeRequestSchema = z.object({
467
471
  noindexHost: z.boolean().optional(),
468
472
  config: runtimeServingConfigSchema.optional(),
469
473
  // Origins the platform's own browser code loads from, keyed by the CSP
470
- // directive each belongs in. Which origins those are is a control-plane
471
- // decision they come from its environment and are validated against the
472
- // host this version will serve from while the merge itself belongs to
473
- // the finalizer, which is the only side that sees every CSP the version
474
- // sets, in `_headers` and in config rules alike.
474
+ // directive each belongs in. The control plane picks them, validated
475
+ // against the host this version will serve from; the finalizer merges
476
+ // them, because only it sees every CSP the version sets.
475
477
  platform_csp_sources: z
476
478
  .record(z.string().min(1).max(64), z.array(z.string().min(1).max(512)).max(16))
477
479
  .optional(),
@@ -530,9 +532,8 @@ export const runtimeCatalogDeltaSchema = z.object({
530
532
  });
531
533
  // One compiled diagnostic from the finalizer. `path` is the committed file it
532
534
  // points at, carrying `file:line` when the compiler knew a line; `details` is
533
- // what it points at INSIDE that file the variable, the channel, the colliding
534
- // routes — which is the difference between a publish failure you can act on and
535
- // one you can only retry.
535
+ // what it points at INSIDE that file: the variable, the channel, or the
536
+ // colliding routes.
536
537
  export const runtimeCompileDiagnosticSchema = z.object({
537
538
  severity: z.enum(["info", "warning", "error"]),
538
539
  code: z.string().min(1),
@@ -540,6 +541,31 @@ export const runtimeCompileDiagnosticSchema = z.object({
540
541
  path: z.string().optional(),
541
542
  details: z.record(z.string(), z.unknown()).optional(),
542
543
  });
544
+ export const runtimeRouteInventorySchema = z.object({
545
+ format: z.literal("stattic.route-inventory.v1"),
546
+ routes: z.array(z.object({
547
+ id: z.string().regex(/^sha256:[a-f0-9]{64}$/),
548
+ kind: z.enum([
549
+ "redirect",
550
+ "rewrite",
551
+ "proxy",
552
+ "not-found",
553
+ "functions",
554
+ "php-function",
555
+ "zero-control",
556
+ "zero-endpoint",
557
+ ]),
558
+ source: z.string().min(1),
559
+ runtime: z.enum(["routing", "cloudflare-worker", "php", "quick-js"]),
560
+ host: z.string().min(1),
561
+ path: z.string().startsWith("/"),
562
+ methods: z.array(z.string().min(1)).min(1),
563
+ auth: z.literal("inherit"),
564
+ cache: z.literal("shared").optional(),
565
+ destination: z.string().min(1).optional(),
566
+ status: z.number().int().min(200).max(599).optional(),
567
+ })),
568
+ });
543
569
  // What the version's conventions and config compiled TO. The counts are the
544
570
  // control plane's version-row projection; `proxy_rules` is what it overlays the
545
571
  // publishing team's plan onto, because the compiled artifact never bakes a plan
@@ -554,11 +580,9 @@ export const runtimeCompiledRoutingSchema = z.object({
554
580
  .default([]),
555
581
  });
556
582
  // What one finalize RUN cost, stage by stage, straight off the native
557
- // finalizer's envelope which is why these keys are camelCase while the rest of
558
- // this receipt is not: PHP passes the object through rather than restating it.
559
- // Everything else here is read back from the version's immutable metadata;
560
- // timings cannot be, because they differ on every run. `skippedFiles` is the
561
- // incrementality gauge: it stays 0 while every finalize rebuilds everything.
583
+ // finalizer's envelope, which is why these keys are camelCase while the rest of
584
+ // this receipt is not. `skippedFiles` is the incrementality gauge: it stays 0
585
+ // while every finalize rebuilds everything.
562
586
  export const runtimeFinalizeTelemetrySchema = z.object({
563
587
  stagedFiles: z.number().int().nonnegative(),
564
588
  generatedFiles: z.number().int().nonnegative(),
@@ -583,11 +607,13 @@ export const runtimeVersionFinalizeResponseSchema = z.object({
583
607
  version_id: z.string(),
584
608
  status: z.literal("ready"),
585
609
  zero_endpoint_count: z.number().int().nonnegative().optional(),
586
- // The finalizer is the one conventions/config compiler, so what it compiled is
587
- // reported back rather than recomputed: the control plane runs no second
588
- // compile pass to learn its own version row.
610
+ // The finalizer is the one conventions/config compiler, so the control plane
611
+ // runs no second compile pass to learn its own version row.
589
612
  diagnostics: z.array(runtimeCompileDiagnosticSchema).default([]),
590
613
  routing: runtimeCompiledRoutingSchema.optional(),
614
+ // Versioned, finalizer-owned route declarations. Optional while runtimes
615
+ // finalized before the inventory ships remain replayable.
616
+ route_inventory: runtimeRouteInventorySchema.optional(),
591
617
  // Provenance for the substitution the finalizer performed: dependency name
592
618
  // (`NAME` or `NAME@channel`) -> SHA-256 of the value it resolved to. This is
593
619
  // what answers "does changing this variable require a republish?".
@@ -622,9 +648,10 @@ export const runtimeZeroMigrationsApplyResponseSchema = z.object({
622
648
  export const runtimeRouteUpdateRequestSchema = z.object({
623
649
  version_id: z.string().min(1),
624
650
  config: runtimeRouteConfigSchema.optional(),
625
- // The engine stores this with the route pointer and no-ops the whole PUT — no
626
- // policy store, no journal event, no edge purge when version, digest, and
627
- // hostname intent all match the stored route. Absent = always write.
651
+ // The engine stores this with the route pointer. When version, digest, and
652
+ // hostname intent all match the stored route, the engine no-ops the whole
653
+ // PUT: no policy store, no journal event, no edge purge. Absent = always
654
+ // write.
628
655
  config_digest: z.string().min(1).optional(),
629
656
  // No `changed_paths`: the runtime holds both catalogs and scopes the purge
630
657
  // from `previous_version_id` itself.
@@ -673,17 +700,6 @@ export const runtimeTombstonesUpdateResponseSchema = z.object({
673
700
  tombstone_count: z.number().int().nonnegative(),
674
701
  ...runtimeMutationPurgeFields,
675
702
  });
676
- // The control plane computes prunable version ids; the engine stores the list
677
- // and its housekeeping tick prunes trees after re-checking live route pointers.
678
- // An empty list clears the policy.
679
- export const runtimeRetentionPolicyUpdateRequestSchema = z.object({
680
- prunable_version_ids: z.array(z.string()),
681
- });
682
- export const runtimeRetentionPolicyUpdateResponseSchema = z.object({
683
- space_id: z.string(),
684
- prunable_count: z.number().int().nonnegative(),
685
- ...runtimeMutationPurgeFields,
686
- });
687
703
  export const runtimeVersionDeleteResponseSchema = z.object({
688
704
  space_id: z.string(),
689
705
  version_id: z.string(),
@@ -758,7 +774,7 @@ export const runtimeZeroDbImportResponseSchema = z.object({
758
774
  });
759
775
  // Per-space generation state reported by the authed state endpoint. The
760
776
  // reconciliation sweep compares it against control-plane expectations and
761
- // repairs targeted mismatches never a blanket re-sync.
777
+ // repairs targeted mismatches, never a blanket re-sync.
762
778
  export const runtimeSpaceStateSchema = z.object({
763
779
  space_id: z.string().min(1).describe("Space whose runtime route pointers follow."),
764
780
  routes: z
@@ -832,6 +848,10 @@ export const runtimeCallbackEventSchema = z.looseObject({
832
848
  .describe("Runtime management action authorized for the operation."),
833
849
  space_id: z.string().optional().describe("Space the event applies to, when space-scoped."),
834
850
  version_id: z.string().optional().describe("Version the event applies to, when version-scoped."),
851
+ version_ids: z
852
+ .array(z.string().min(1))
853
+ .optional()
854
+ .describe("Exact versions covered by a completed space-scoped runtime operation."),
835
855
  route_name: z.string().optional().describe("Route pointer the event updated, when route-scoped."),
836
856
  hostnames: z
837
857
  .array(z.string().min(1))
@@ -903,7 +923,7 @@ export const runtimeEventsDrainRequestSchema = z
903
923
  });
904
924
  export const runtimeEventsDrainResponseSchema = z.object({
905
925
  // Cursor runtimes keep these at zero. Older engines report their legacy
906
- // delivery counters here while a rolling bundle update is still converging.
926
+ // delivery counters here while a rolling bundle update is still syncing.
907
927
  delivered_count: z.number().int().nonnegative(),
908
928
  failed_count: z.number().int().nonnegative(),
909
929
  expired_count: z.number().int().nonnegative().optional(),
@@ -979,7 +999,7 @@ export const runtimeEngineJobRecordSchema = z.object({
979
999
  export const runtimeEngineJobCreateRequestSchema = z.object({
980
1000
  type: z.string().min(1),
981
1001
  payload: z.record(z.string(), z.unknown()).default({}),
982
- // Unique per (type, space, operation) create is upsert-by-key.
1002
+ // Unique per (type, space, operation). Create is upsert-by-key.
983
1003
  idempotency_key: z.string().min(1),
984
1004
  });
985
1005
  export const runtimeEngineJobResponseSchema = z.object({
@@ -1,20 +1,13 @@
1
1
  import { z } from "zod";
2
2
  /**
3
- * The one answer to "what is running on this space".
3
+ * What is running on this space.
4
4
  *
5
- * One published tree can carry static files, a worker and a capsule at once
6
- * every space owns a site, so what answers a request is a routing decision, not
7
- * a kind the space declared. This is therefore two independent members rather
8
- * than a discriminated union: each is `null` when the live tree carries none of
9
- * that product, and both `null` is the overwhelmingly common answer. A static
10
- * space is not a degenerate app, it is the absence of one.
5
+ * A published tree can carry a worker and a capsule at once, so these are two
6
+ * independent nullable members rather than a discriminated union. Each is
7
+ * `null` when the live tree carries none of that product.
11
8
  *
12
- * When both are present the capsule wins a path conflict it is the one that
13
- * owns the space's database and its transaction.
14
- *
15
- * It lives in its own module because it is the only place that needs to know
16
- * about both products at once. `spaces.ts` imports it to describe runtime
17
- * status; neither `zero.ts` nor `functions.ts` has to learn about the other.
9
+ * When both are present the capsule wins a path conflict: it owns the space's
10
+ * database and its transaction.
18
11
  */
19
12
  export declare const runtimeAppSchema: z.ZodObject<{
20
13
  capsule: z.ZodNullable<z.ZodObject<{
@@ -72,6 +65,8 @@ export declare const runtimeAppSchema: z.ZodObject<{
72
65
  path: z.ZodString;
73
66
  }, z.core.$strict>>>;
74
67
  sockets: z.ZodDefault<z.ZodArray<z.ZodString>>;
68
+ serverBundleSize: z.ZodNullable<z.ZodNumber>;
69
+ clientBundleSize: z.ZodNullable<z.ZodNumber>;
75
70
  migrationCount: z.ZodNumber;
76
71
  schemaHash: z.ZodNullable<z.ZodString>;
77
72
  variables: z.ZodObject<{
@@ -126,6 +121,7 @@ export declare const runtimeAppSchema: z.ZodObject<{
126
121
  gravatar: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
127
122
  spam: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
128
123
  email: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
124
+ content: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
129
125
  }, z.core.$strip>>;
130
126
  executionState: z.ZodEnum<{
131
127
  ready: "ready";
@@ -141,14 +137,7 @@ export declare const runtimeAppSchema: z.ZodObject<{
141
137
  }, z.core.$strict>>;
142
138
  }, z.core.$strict>;
143
139
  export type RuntimeApp = z.infer<typeof runtimeAppSchema>;
144
- /**
145
- * Replay of the invalidation events a live runtime emitted.
146
- *
147
- * The event shape itself is Zero's — it names mutations, changed tables and
148
- * changed queries, which only a capsule has — but the route that serves it is
149
- * the runtime family's, so the page contract lives here beside the rest of the
150
- * unified surface rather than inside one product.
151
- */
140
+ /** Replay of the invalidation events a live runtime emitted, in Zero's event shape. */
152
141
  export declare const runtimeRealtimeEventListQuerySchema: z.ZodObject<{
153
142
  afterEventId: z.ZodOptional<z.ZodString>;
154
143
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
@@ -167,6 +156,7 @@ export declare const runtimeRealtimeEventListResponseSchema: z.ZodObject<{
167
156
  schemaHash: z.ZodString;
168
157
  committedAt: z.ZodString;
169
158
  }, z.core.$strict>>;
159
+ nextAfterEventId: z.ZodNullable<z.ZodString>;
170
160
  pagination: z.ZodObject<{
171
161
  nextCursor: z.ZodNullable<z.ZodString>;
172
162
  hasMore: z.ZodBoolean;