@spacefast/common 0.0.26 → 0.2.1

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 +186 -7
  38. package/dist/contracts/builds.js +75 -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 +269 -7
  79. package/dist/contracts/error-code-meta.js +80 -5
  80. package/dist/contracts/error-codes.d.ts +5 -5
  81. package/dist/contracts/error-codes.js +78 -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 +112 -10
  110. package/dist/contracts/oauth-resources.js +116 -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 +2098 -1
  210. package/dist/docs/error-docs.js +281 -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
@@ -1,30 +1,28 @@
1
1
  import { z } from "zod";
2
2
  import { type RuntimeRealtimeMode } from "./execution.js";
3
3
  /**
4
- * Spacefast Zero: capsules schema, queries, mutations and endpoints that run
5
- * together inside one parent-owned transaction executed by the native runner
6
- * on a dedicated wp.cloud site, against that site's own MySQL.
4
+ * Spacefast Zero: capsules of schema, queries, mutations and endpoints that run
5
+ * together inside one parent-owned transaction, executed by the native runner
6
+ * on a dedicated wp.cloud site against that site's own MySQL.
7
7
  *
8
- * The transaction is what makes this a separate product rather than a
9
- * placement option for `./functions.js`. A capsule handler's semantics depend
10
- * on the transaction wrapped around it, and an isolate reaching the database
11
- * over a relay cannot offer one. See `endpointIsPortable` in `./execution.js`
12
- * for the narrow surface both products can host.
8
+ * The transaction is what makes this a separate product rather than a placement
9
+ * option for `./functions.js`: an isolate reaching the database over a relay
10
+ * cannot offer one. See `endpointIsPortable` in `./execution.js` for the narrow
11
+ * surface both products can host.
13
12
  */
14
13
  export declare const ZERO_SOURCE_METADATA_KEY = "statticZero";
15
14
  /**
16
- * The tag a compiled capsule artifact carries in the finalize payload, the
17
- * runtime config, the install profile, the client config the browser reads, and
18
- * every realtime event so PHP and the Rust runner can tell what they were
19
- * handed. It is a property of the artifact the tree produced, not a kind a
20
- * space declares: a publish can carry this beside a worker.
15
+ * The tag a compiled capsule artifact carries everywhere it travels, so PHP and
16
+ * the Rust runner can tell what they were handed. It is a property of the
17
+ * artifact, not a kind a space declares: a publish can carry this beside a
18
+ * worker.
21
19
  */
22
20
  export declare const ZERO_RUNTIME_KIND = "zero";
23
21
  export declare const ZERO_PLATFORM_ROUTE_PREFIX = "/__spacefast/zero";
24
22
  /**
25
- * Entry paths the Zero scaffold writes into `sf.jsonc#runtime`. They are
26
- * starting points, not the contract: a capsule's entries are whatever its
27
- * `runtime.server`/`runtime.client` say, and nothing infers them.
23
+ * Entry paths the Zero scaffold writes into `sf.jsonc#runtime`. Starting points
24
+ * only: a capsule's entries are whatever its `runtime.server`/`runtime.client`
25
+ * say, and nothing infers them.
28
26
  */
29
27
  export declare const ZERO_CLIENT_ENTRY = "client/index.tsx";
30
28
  export declare const ZERO_SERVER_ENTRY = "server/index.ts";
@@ -51,15 +49,13 @@ export declare const ZERO_PUBLIC_CLIENT_BUNDLE_PATH = "client.js";
51
49
  * Where platform-owned client bytes serve from: same origin as the space, one
52
50
  * content-addressed directory per platform build.
53
51
  *
54
- * Same origin is the whole point. Browsers have partitioned the HTTP cache by
55
- * top-level site since 2020, so a shared third-party CDN buys nothing a
56
- * same-origin URL does not and costs a `script-src` hole. What a stable,
57
- * content-addressed URL does buy is real: the digest changes only when the
58
- * platform bytes change, so publishing a capsule a hundred times re-downloads
59
- * the capsule's own bundle a hundred times and the platform's exactly once.
52
+ * Browsers have partitioned the HTTP cache by top-level site since 2020, so a
53
+ * shared third-party CDN buys nothing a same-origin URL does not, and costs a
54
+ * `script-src` hole. The digest changes only when the platform bytes change, so
55
+ * republishing a capsule re-downloads its own bundle but not the platform's.
60
56
  *
61
57
  * Underscore-prefixed by framework convention (`_next/static`, `_astro`), which
62
- * is also how the runtime recognises it as immutable see `immutable_path` in
58
+ * is also how the runtime recognises it as immutable. See `immutable_path` in
63
59
  * `crates/stattic-runtime-core/src/finalize.rs`.
64
60
  */
65
61
  export declare const ZERO_PLATFORM_ASSET_NAMESPACE = "_spacefast";
@@ -69,39 +65,33 @@ export declare function zeroPlatformAssetPath(digest: string, fileName: string):
69
65
  /**
70
66
  * The compiled capsule server, which the QuickJS runner instantiates whole.
71
67
  *
72
- * 768 KiB is inherited, not measured: nobody has yet established what the
73
- * runner actually tolerates, and DS77 keeps the number only until someone does.
74
- * It binds a real resource — the runner holds the module graph in the site's
75
- * PHP-worker memory before executing anything — so it stays low deliberately;
76
- * server code is handlers, not an application.
68
+ * 768 KiB is inherited, not measured: nobody has established what the runner
69
+ * actually tolerates. It binds a real resource, since the runner holds the
70
+ * module graph in the site's PHP-worker memory before executing anything, so it
71
+ * stays low deliberately.
77
72
  */
78
73
  export declare const ZERO_SERVER_BUNDLE_MAX_BYTES = 786432;
79
74
  /**
80
75
  * The tenant client bundle, and every other file the compile ships as content.
81
76
  *
82
- * This measures what the tenant publishes, and only that: the SDK, the kit, the
77
+ * This measures what the tenant publishes, and only that. The SDK, the kit, the
83
78
  * chart layer, preact, recharts and lucide are externals resolved through the
84
79
  * shell's import map to {@link ZERO_PLATFORM_ASSET_ROOT}, so platform bytes are
85
- * never weighed here (DS42). What remains is author code plus whatever npm the
86
- * author chose to bundle.
80
+ * never weighed here.
87
81
  *
88
- * 8 MiB matches the Functions per-entry cap (DS77) because the same reasoning
89
- * applies: a client bundle is static bytes to a browser, so nothing on the
90
- * serving side binds it, and the cap exists to fail an accidental
91
- * hundred-megabyte dependency in our tooling — where the build can say which
92
- * modules are large — rather than at upload. It is a guardrail, not a budget;
93
- * the size report is what an author should be reading.
82
+ * 8 MiB matches the Functions per-entry cap. A client bundle is static bytes to
83
+ * a browser, so nothing on the serving side binds it; the cap exists to fail an
84
+ * accidental hundred-megabyte dependency in tooling that can say which modules
85
+ * are large, rather than at upload.
94
86
  */
95
87
  export declare const ZERO_CLIENT_BUNDLE_MAX_BYTES: number;
96
88
  /**
97
89
  * A capsule's compiled server travels as version metadata, not as content, so a
98
- * server-only change leaves the published app shell byte-identical and the
99
- * version intent's manifest comparison would read it as "no changes" and never
100
- * deploy it. The publish writes this one small file into the version instead:
101
- * it holds a digest of everything the deploy would install, so any server,
102
- * schema, or runtime-config change moves the manifest. Same channel a Functions
103
- * bundle uses (`functionsBundleStoragePath`) — an ordinary manifest entry, no
104
- * artifact-specific plumbing.
90
+ * server-only change would leave the app shell byte-identical and the version
91
+ * intent's manifest comparison would read it as "no changes". The publish writes
92
+ * this one small file into the version instead: it holds a digest of everything
93
+ * the deploy would install, so any server, schema, or runtime-config change
94
+ * moves the manifest.
105
95
  */
106
96
  export declare const ZERO_RUNTIME_DEPLOY_PATH = "__spacefast/zero/deploy.json";
107
97
  export declare const ZERO_MANAGED_TABLE_COLUMNS: readonly ["id", "createdAt", "updatedAt"];
@@ -181,12 +171,12 @@ export declare const zeroDatabaseSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
181
171
  }, z.core.$strict>>;
182
172
  export type ZeroDatabase = z.infer<typeof zeroDatabaseSchema>;
183
173
  /**
184
- * The compiled server travels inline in the finalize payload; inlining keeps the
185
- * whole version one atomic write. Functions bundles do the opposite and land
186
- * in the content store first; see `functionsBundleRefSchema`.
174
+ * The compiled server travels inline in the finalize payload, which keeps the
175
+ * whole version one atomic write. Functions bundles land in the content store
176
+ * first; see `functionsBundleRefSchema`.
187
177
  *
188
- * The client never travels this way. It is content the browser fetches it
189
- * from the version tree like any other asset — so it ships as a static file.
178
+ * The client never travels this way: it is content the browser fetches from the
179
+ * version tree, so it ships as a static file.
190
180
  */
191
181
  export declare const zeroRuntimeBundleSchema: z.ZodObject<{
192
182
  path: z.ZodString;
@@ -217,6 +207,7 @@ export declare const zeroRuntimeRunSourceSchema: z.ZodObject<{
217
207
  gravatar: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
218
208
  spam: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
219
209
  email: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
210
+ content: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
220
211
  }, z.core.$strip>>;
221
212
  db: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
222
213
  }, z.core.$strict>;
@@ -245,6 +236,7 @@ export declare const zeroRuntimeEndpointSourceSchema: z.ZodObject<{
245
236
  gravatar: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
246
237
  spam: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
247
238
  email: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
239
+ content: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
248
240
  }, z.core.$strip>>;
249
241
  db: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
250
242
  }, z.core.$strict>;
@@ -816,6 +808,7 @@ export declare const zeroRuntimeFinalizePayloadSchema: z.ZodObject<{
816
808
  gravatar: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
817
809
  spam: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
818
810
  email: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
811
+ content: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
819
812
  }, z.core.$strip>>;
820
813
  db: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
821
814
  }, z.core.$strict>>>;
@@ -833,6 +826,7 @@ export declare const zeroRuntimeFinalizePayloadSchema: z.ZodObject<{
833
826
  gravatar: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
834
827
  spam: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
835
828
  email: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
829
+ content: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
836
830
  }, z.core.$strip>>;
837
831
  db: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
838
832
  }, z.core.$strict>>>;
@@ -937,10 +931,6 @@ export declare const zeroRuntimeConfigSchema: z.ZodObject<{
937
931
  signOutUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
938
932
  returnToParam: z.ZodDefault<z.ZodString>;
939
933
  }, z.core.$strict>>;
940
- variables: z.ZodObject<{
941
- source: z.ZodLiteral<"stattic-variables">;
942
- names: z.ZodDefault<z.ZodArray<z.ZodString>>;
943
- }, z.core.$strict>;
944
934
  realtime: z.ZodObject<{
945
935
  mode: z.ZodEnum<{
946
936
  local: "local";
@@ -1086,6 +1076,10 @@ export declare const zeroRuntimeConfigSchema: z.ZodObject<{
1086
1076
  }, z.core.$strip>>>;
1087
1077
  }, z.core.$strict>;
1088
1078
  }, z.core.$strict>;
1079
+ variables: z.ZodObject<{
1080
+ source: z.ZodLiteral<"stattic-variables">;
1081
+ names: z.ZodDefault<z.ZodArray<z.ZodString>>;
1082
+ }, z.core.$strict>;
1089
1083
  runtimeKind: z.ZodLiteral<"zero">;
1090
1084
  migrations: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1091
1085
  format: z.ZodLiteral<"stattic.zero.migrations.v1">;
@@ -1386,6 +1380,7 @@ export declare const zeroDeployMetadataSchema: z.ZodObject<{
1386
1380
  gravatar: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1387
1381
  spam: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1388
1382
  email: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1383
+ content: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1389
1384
  }, z.core.$strip>>;
1390
1385
  db: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1391
1386
  }, z.core.$strict>>>;
@@ -1403,6 +1398,7 @@ export declare const zeroDeployMetadataSchema: z.ZodObject<{
1403
1398
  gravatar: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1404
1399
  spam: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1405
1400
  email: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1401
+ content: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1406
1402
  }, z.core.$strip>>;
1407
1403
  db: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1408
1404
  }, z.core.$strict>>>;
@@ -1503,18 +1499,13 @@ export type ZeroDeployMetadata = z.infer<typeof zeroDeployMetadataSchema>;
1503
1499
  * What a live Zero capsule is, as the `capsule` member of a space's runtime
1504
1500
  * status.
1505
1501
  *
1506
- * There is no `versionId` here: this only ever describes the version the status
1507
- * response already names as live, and repeating it would invite the two to
1508
- * disagree. `artifactId` stays because it identifies the built capsule rather
1509
- * than the publish that carries it. There is no kind tag either — the member it
1510
- * rides in already says which product answered.
1502
+ * No `versionId`: the status response already names the live version, and
1503
+ * repeating it would invite the two to disagree. `artifactId` stays because it
1504
+ * identifies the built capsule rather than the publish that carries it.
1511
1505
  *
1512
- * Every field is derived from the version's own finalize metadata, which is
1513
- * what makes this safe to answer for a space whose runtime is asleep,
1514
- * mid-move, or failing: nothing here costs a call to the space's origin. It is
1515
- * also why there are no counts of things listed here — a caller that wants
1516
- * `tables.length` can take it — and why the database is not a field: a capsule
1517
- * always owns one, so its presence already said so.
1506
+ * Every field is derived from the version's own finalize metadata, so this is
1507
+ * safe to answer for a space whose runtime is asleep, mid-move, or failing.
1508
+ * Nothing here costs a call to the space's origin.
1518
1509
  */
1519
1510
  export declare const zeroAppSchema: z.ZodObject<{
1520
1511
  artifactId: z.ZodString;
@@ -1571,6 +1562,8 @@ export declare const zeroAppSchema: z.ZodObject<{
1571
1562
  path: z.ZodString;
1572
1563
  }, z.core.$strict>>>;
1573
1564
  sockets: z.ZodDefault<z.ZodArray<z.ZodString>>;
1565
+ serverBundleSize: z.ZodNullable<z.ZodNumber>;
1566
+ clientBundleSize: z.ZodNullable<z.ZodNumber>;
1574
1567
  migrationCount: z.ZodNumber;
1575
1568
  schemaHash: z.ZodNullable<z.ZodString>;
1576
1569
  variables: z.ZodObject<{
@@ -1,30 +1,28 @@
1
1
  import { z } from "zod";
2
2
  import { appRoutePathSchema, EXECUTION_ENV_MAX_KEYS, executionBundleSchema, executionCapabilitiesSchema, executionEnvNameSchema, executionIdentifierSchema, executionInspectPolicySchema, executionSha256Schema, executionStaticFileSchema, httpMethodSchema, LAKEBED_SERVER_ENV_FILE, PLATFORM_ROUTE_PREFIX, runtimeRealtimeModeSchema, SERVER_ENV_FILE, } from "./execution.js";
3
3
  /**
4
- * Spacefast Zero: capsules schema, queries, mutations and endpoints that run
5
- * together inside one parent-owned transaction executed by the native runner
6
- * on a dedicated wp.cloud site, against that site's own MySQL.
4
+ * Spacefast Zero: capsules of schema, queries, mutations and endpoints that run
5
+ * together inside one parent-owned transaction, executed by the native runner
6
+ * on a dedicated wp.cloud site against that site's own MySQL.
7
7
  *
8
- * The transaction is what makes this a separate product rather than a
9
- * placement option for `./functions.js`. A capsule handler's semantics depend
10
- * on the transaction wrapped around it, and an isolate reaching the database
11
- * over a relay cannot offer one. See `endpointIsPortable` in `./execution.js`
12
- * for the narrow surface both products can host.
8
+ * The transaction is what makes this a separate product rather than a placement
9
+ * option for `./functions.js`: an isolate reaching the database over a relay
10
+ * cannot offer one. See `endpointIsPortable` in `./execution.js` for the narrow
11
+ * surface both products can host.
13
12
  */
14
13
  export const ZERO_SOURCE_METADATA_KEY = "statticZero";
15
14
  /**
16
- * The tag a compiled capsule artifact carries in the finalize payload, the
17
- * runtime config, the install profile, the client config the browser reads, and
18
- * every realtime event so PHP and the Rust runner can tell what they were
19
- * handed. It is a property of the artifact the tree produced, not a kind a
20
- * space declares: a publish can carry this beside a worker.
15
+ * The tag a compiled capsule artifact carries everywhere it travels, so PHP and
16
+ * the Rust runner can tell what they were handed. It is a property of the
17
+ * artifact, not a kind a space declares: a publish can carry this beside a
18
+ * worker.
21
19
  */
22
20
  export const ZERO_RUNTIME_KIND = "zero";
23
21
  export const ZERO_PLATFORM_ROUTE_PREFIX = `${PLATFORM_ROUTE_PREFIX}/zero`;
24
22
  /**
25
- * Entry paths the Zero scaffold writes into `sf.jsonc#runtime`. They are
26
- * starting points, not the contract: a capsule's entries are whatever its
27
- * `runtime.server`/`runtime.client` say, and nothing infers them.
23
+ * Entry paths the Zero scaffold writes into `sf.jsonc#runtime`. Starting points
24
+ * only: a capsule's entries are whatever its `runtime.server`/`runtime.client`
25
+ * say, and nothing infers them.
28
26
  */
29
27
  export const ZERO_CLIENT_ENTRY = "client/index.tsx";
30
28
  export const ZERO_SERVER_ENTRY = "server/index.ts";
@@ -51,15 +49,13 @@ export const ZERO_PUBLIC_CLIENT_BUNDLE_PATH = "client.js";
51
49
  * Where platform-owned client bytes serve from: same origin as the space, one
52
50
  * content-addressed directory per platform build.
53
51
  *
54
- * Same origin is the whole point. Browsers have partitioned the HTTP cache by
55
- * top-level site since 2020, so a shared third-party CDN buys nothing a
56
- * same-origin URL does not and costs a `script-src` hole. What a stable,
57
- * content-addressed URL does buy is real: the digest changes only when the
58
- * platform bytes change, so publishing a capsule a hundred times re-downloads
59
- * the capsule's own bundle a hundred times and the platform's exactly once.
52
+ * Browsers have partitioned the HTTP cache by top-level site since 2020, so a
53
+ * shared third-party CDN buys nothing a same-origin URL does not, and costs a
54
+ * `script-src` hole. The digest changes only when the platform bytes change, so
55
+ * republishing a capsule re-downloads its own bundle but not the platform's.
60
56
  *
61
57
  * Underscore-prefixed by framework convention (`_next/static`, `_astro`), which
62
- * is also how the runtime recognises it as immutable see `immutable_path` in
58
+ * is also how the runtime recognises it as immutable. See `immutable_path` in
63
59
  * `crates/stattic-runtime-core/src/finalize.rs`.
64
60
  */
65
61
  export const ZERO_PLATFORM_ASSET_NAMESPACE = "_spacefast";
@@ -71,39 +67,33 @@ export function zeroPlatformAssetPath(digest, fileName) {
71
67
  /**
72
68
  * The compiled capsule server, which the QuickJS runner instantiates whole.
73
69
  *
74
- * 768 KiB is inherited, not measured: nobody has yet established what the
75
- * runner actually tolerates, and DS77 keeps the number only until someone does.
76
- * It binds a real resource — the runner holds the module graph in the site's
77
- * PHP-worker memory before executing anything — so it stays low deliberately;
78
- * server code is handlers, not an application.
70
+ * 768 KiB is inherited, not measured: nobody has established what the runner
71
+ * actually tolerates. It binds a real resource, since the runner holds the
72
+ * module graph in the site's PHP-worker memory before executing anything, so it
73
+ * stays low deliberately.
79
74
  */
80
75
  export const ZERO_SERVER_BUNDLE_MAX_BYTES = 786_432;
81
76
  /**
82
77
  * The tenant client bundle, and every other file the compile ships as content.
83
78
  *
84
- * This measures what the tenant publishes, and only that: the SDK, the kit, the
79
+ * This measures what the tenant publishes, and only that. The SDK, the kit, the
85
80
  * chart layer, preact, recharts and lucide are externals resolved through the
86
81
  * shell's import map to {@link ZERO_PLATFORM_ASSET_ROOT}, so platform bytes are
87
- * never weighed here (DS42). What remains is author code plus whatever npm the
88
- * author chose to bundle.
82
+ * never weighed here.
89
83
  *
90
- * 8 MiB matches the Functions per-entry cap (DS77) because the same reasoning
91
- * applies: a client bundle is static bytes to a browser, so nothing on the
92
- * serving side binds it, and the cap exists to fail an accidental
93
- * hundred-megabyte dependency in our tooling — where the build can say which
94
- * modules are large — rather than at upload. It is a guardrail, not a budget;
95
- * the size report is what an author should be reading.
84
+ * 8 MiB matches the Functions per-entry cap. A client bundle is static bytes to
85
+ * a browser, so nothing on the serving side binds it; the cap exists to fail an
86
+ * accidental hundred-megabyte dependency in tooling that can say which modules
87
+ * are large, rather than at upload.
96
88
  */
97
89
  export const ZERO_CLIENT_BUNDLE_MAX_BYTES = 8 * 1024 * 1024;
98
90
  /**
99
91
  * A capsule's compiled server travels as version metadata, not as content, so a
100
- * server-only change leaves the published app shell byte-identical and the
101
- * version intent's manifest comparison would read it as "no changes" and never
102
- * deploy it. The publish writes this one small file into the version instead:
103
- * it holds a digest of everything the deploy would install, so any server,
104
- * schema, or runtime-config change moves the manifest. Same channel a Functions
105
- * bundle uses (`functionsBundleStoragePath`) — an ordinary manifest entry, no
106
- * artifact-specific plumbing.
92
+ * server-only change would leave the app shell byte-identical and the version
93
+ * intent's manifest comparison would read it as "no changes". The publish writes
94
+ * this one small file into the version instead: it holds a digest of everything
95
+ * the deploy would install, so any server, schema, or runtime-config change
96
+ * moves the manifest.
107
97
  */
108
98
  export const ZERO_RUNTIME_DEPLOY_PATH = `${ZERO_RUNTIME_STORAGE_ROOT}/deploy.json`;
109
99
  export const ZERO_MANAGED_TABLE_COLUMNS = ["id", "createdAt", "updatedAt"];
@@ -118,9 +108,8 @@ export const ZERO_RESERVED_APP_ROUTE_PATHS = [
118
108
  `/${ZERO_PUBLIC_CLIENT_BUNDLE_PATH}`,
119
109
  "/auth/callback",
120
110
  ];
121
- // The whole platform namespace is reserved, not just the one directory a build
122
- // happens to write: an endpoint claiming a path under it would shadow bytes the
123
- // shell's import map already told the browser to fetch.
111
+ // The whole platform namespace is reserved: an endpoint claiming a path under it
112
+ // would shadow bytes the shell's import map already told the browser to fetch.
124
113
  export const ZERO_RESERVED_APP_ROUTE_PREFIXES = [
125
114
  "/auth/",
126
115
  `/${ZERO_PLATFORM_ASSET_NAMESPACE}/`,
@@ -264,12 +253,12 @@ export const zeroTableSchema = z
264
253
  export const zeroDatabaseSchema = z.record(z.string(), zeroTableSchema);
265
254
  const zeroSha256Schema = executionSha256Schema;
266
255
  /**
267
- * The compiled server travels inline in the finalize payload; inlining keeps the
268
- * whole version one atomic write. Functions bundles do the opposite and land
269
- * in the content store first; see `functionsBundleRefSchema`.
256
+ * The compiled server travels inline in the finalize payload, which keeps the
257
+ * whole version one atomic write. Functions bundles land in the content store
258
+ * first; see `functionsBundleRefSchema`.
270
259
  *
271
- * The client never travels this way. It is content the browser fetches it
272
- * from the version tree like any other asset — so it ships as a static file.
260
+ * The client never travels this way: it is content the browser fetches from the
261
+ * version tree, so it ships as a static file.
273
262
  */
274
263
  export const zeroRuntimeBundleSchema = executionBundleSchema({
275
264
  bundleRoot: ZERO_RUNTIME_BUNDLE_ROOT,
@@ -636,18 +625,13 @@ export const zeroDeployMetadataSchema = z
636
625
  * What a live Zero capsule is, as the `capsule` member of a space's runtime
637
626
  * status.
638
627
  *
639
- * There is no `versionId` here: this only ever describes the version the status
640
- * response already names as live, and repeating it would invite the two to
641
- * disagree. `artifactId` stays because it identifies the built capsule rather
642
- * than the publish that carries it. There is no kind tag either — the member it
643
- * rides in already says which product answered.
628
+ * No `versionId`: the status response already names the live version, and
629
+ * repeating it would invite the two to disagree. `artifactId` stays because it
630
+ * identifies the built capsule rather than the publish that carries it.
644
631
  *
645
- * Every field is derived from the version's own finalize metadata, which is
646
- * what makes this safe to answer for a space whose runtime is asleep,
647
- * mid-move, or failing: nothing here costs a call to the space's origin. It is
648
- * also why there are no counts of things listed here — a caller that wants
649
- * `tables.length` can take it — and why the database is not a field: a capsule
650
- * always owns one, so its presence already said so.
632
+ * Every field is derived from the version's own finalize metadata, so this is
633
+ * safe to answer for a space whose runtime is asleep, mid-move, or failing.
634
+ * Nothing here costs a call to the space's origin.
651
635
  */
652
636
  export const zeroAppSchema = z
653
637
  .object({
@@ -667,9 +651,27 @@ export const zeroAppSchema = z
667
651
  endpoints: z.array(zeroEndpointSchema).default([]),
668
652
  sockets: z.array(z.string()).default([]),
669
653
  /**
670
- * Migrations are operations, not names `create_table`, `add_column` and
671
- * friendsso a count is the honest summary here. The operations
672
- * themselves are the database surface's answer (`GET /v1/spaces/{id}/db`).
654
+ * Compiled bundle sizes in bytes, read from the finalize payload's own
655
+ * declarations. Null never 0 when a legacy version's metadata predates
656
+ * size reporting, so absence stays honest. Meter these against
657
+ * {@link ZERO_SERVER_BUNDLE_MAX_BYTES} and {@link ZERO_CLIENT_BUNDLE_MAX_BYTES}.
658
+ */
659
+ serverBundleSize: z
660
+ .number()
661
+ .int()
662
+ .nonnegative()
663
+ .nullable()
664
+ .describe("Compiled server bundle size in bytes, or null when this version's metadata does not record it."),
665
+ clientBundleSize: z
666
+ .number()
667
+ .int()
668
+ .nonnegative()
669
+ .nullable()
670
+ .describe("Compiled client bundle size in bytes, or null when this version's metadata does not record it."),
671
+ /**
672
+ * Migrations are operations, not names, so a count is the summary here. The
673
+ * operations themselves are the database surface's answer
674
+ * (`GET /v1/spaces/{id}/db`).
673
675
  */
674
676
  migrationCount: z.number().int().nonnegative(),
675
677
  /** Digest of the schema the live migration plan settled on, if it ran one. */
@@ -1,46 +1,49 @@
1
1
  /**
2
- * Dashboard route first-segments that cannot be used as team slugs.
3
- *
4
- * Append-only: add a new top-level static dashboard route's first segment here
5
- * before its route module lands. A repository structural test enforces this.
2
+ * `connect` is held for the team-level connect page (see
3
+ * `reservedSegmentActivationContract` in apps/my's dashboard route ledger).
6
4
  */
7
- export declare const TEAM_SLUG_ROUTE_RESERVATIONS: readonly ["accept-beta-invite", "accept-invitation", "account", "access", "agent", "claim", "device", "drop", "new-team", "oauth", "push", "sign-in", "start", "terminal", "two-factor"];
8
- /**
9
- * Dashboard route first-segments that cannot be used as space slugs.
10
- *
11
- * Append-only: add a new static route directly below a team's first segment
12
- * here before its route module lands. A repository structural test enforces
13
- * this.
14
- */
15
- export declare const SPACE_SLUG_ROUTE_RESERVATIONS: readonly ["billing", "connect", "domains", "drop", "members", "new", "resume", "settings"];
5
+ export declare const UNBUILT_SPACE_SLUG_ROUTE_RESERVATIONS: readonly ["connect"];
6
+ /** Dashboard route first-segments that cannot be used as team slugs. */
7
+ export declare const TEAM_SLUG_ROUTE_RESERVATIONS: readonly ["accept-beta-invite", "accept-invitation", "access", "account", "approvals", "claim", "device", "drop", "new-team", "oauth", "push", "sign-in", "start", "terminal", "two-factor"];
8
+ /** Dashboard route first-segments that cannot be used as space slugs. */
9
+ export declare const SPACE_SLUG_ROUTE_RESERVATIONS: readonly ["agents", "api-keys", "billing", "domains", "drop", "handoffs", "members", "new", "resume", "settings", "variables", "webhooks", "connect"];
16
10
  export type TeamSlugRouteReservation = (typeof TEAM_SLUG_ROUTE_RESERVATIONS)[number];
17
11
  export type SpaceSlugRouteReservation = (typeof SPACE_SLUG_ROUTE_RESERVATIONS)[number];
18
12
  export declare const TEAM_SLUG_ROUTE_RESERVATION_SET: ReadonlySet<string>;
19
13
  export declare const SPACE_SLUG_ROUTE_RESERVATION_SET: ReadonlySet<string>;
20
14
  /**
21
- * The Runtime page's sections. They are search params rather than path
22
- * segments, so `runtime` stays a single route (and a single ledger row) and a
23
- * space slugged "runtime" keeps its own Runtime page at
15
+ * The Runtime page's sections. Search params, not path segments, so `runtime`
16
+ * stays one route and a space slugged "runtime" keeps its own Runtime page at
24
17
  * `/<team>/runtime/runtime`.
25
18
  */
26
19
  export declare const SPACE_RUNTIME_SECTIONS: readonly ["overview", "database", "storage", "logs"];
27
20
  export type SpaceRuntimeSection = (typeof SPACE_RUNTIME_SECTIONS)[number];
28
21
  export declare const DEFAULT_SPACE_RUNTIME_SECTION: SpaceRuntimeSection;
29
- export type SpaceSettingsDestination = "access" | "advanced" | "builds" | "integrations" | "integrations/add" | "source-builds";
30
- export type TeamSettingsDestination = "access" | "audit" | "developer" | "developer/agents" | "developer/environment-variables" | "developer/handoffs" | "developer/webhooks" | "integrations";
22
+ /**
23
+ * What is left under a Space's Settings dialog. Builds, Integrations, and
24
+ * Variables are top-level Space surfaces with their own builders below.
25
+ */
26
+ export type SpaceSettingsDestination = "advanced" | "data-sources";
27
+ export type TeamSettingsDestination = "access" | "activity" | "billing" | "integrations" | "usage";
28
+ /** Top-level team surfaces; the name comes from the old Settings > Developer group. */
29
+ export type TeamDeveloperSurface = "agents" | "api-keys" | "handoffs" | "variables" | "webhooks";
31
30
  export declare function teamPath(teamSlug: string): string;
32
31
  export declare function spacePath(teamSlug: string, spaceSlug: string): string;
33
32
  export declare function versionDetailPath(teamSlug: string, spaceSlug: string, versionRef: string): string;
34
33
  export declare function buildDetailPath(teamSlug: string, spaceSlug: string, buildId: string): string;
35
34
  export declare function spaceDomainsPath(teamSlug: string, spaceSlug: string): string;
35
+ /** Build runs and the repository connection that produces them. */
36
+ export declare function spaceBuildsPath(teamSlug: string, spaceSlug: string): string;
37
+ export declare function spaceIntegrationsPath(teamSlug: string, spaceSlug: string): string;
38
+ export declare function spaceVariablesPath(teamSlug: string, spaceSlug: string): string;
36
39
  /**
37
- * The space's Runtime page. The default section is the bare URL — the route
38
- * strips it back out of the address bar so a link to "overview" and a link to
39
- * the page itself are the same link.
40
+ * The space's Runtime page. The route strips the default section back out of the
41
+ * address bar, so a link to "overview" and a link to the page are the same link.
40
42
  */
41
43
  export declare function spaceRuntimePath(teamSlug: string, spaceSlug: string, section?: SpaceRuntimeSection): string;
42
44
  export declare function spaceSettingsPath(teamSlug: string, spaceSlug: string, destination?: SpaceSettingsDestination): string;
43
45
  export declare function teamDomainsPath(teamSlug: string): string;
44
46
  export declare function teamBillingPath(teamSlug: string): string;
47
+ export declare function teamDeveloperSurfacePath(teamSlug: string, surface: TeamDeveloperSurface): string;
45
48
  export declare function teamDomainDetailPath(teamSlug: string, domainRef: string): string;
46
49
  export declare function teamSettingsPath(teamSlug: string, destination?: TeamSettingsDestination): string;