@spacefast/common 0.0.23 → 0.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) hide show
  1. package/brand-assets/LICENSE-Haskoy.txt +93 -0
  2. package/brand-assets/haskoy-latin-variable.woff2 +0 -0
  3. package/brand-assets/spacefast-favicon.svg +4 -4
  4. package/brand-assets/spacefast-sf-full-bleed.svg +3 -3
  5. package/brand-assets/spacefast-wordmark.svg +2 -4
  6. package/dist/agents/connect-targets.js +1 -1
  7. package/dist/agents/private-key-oauth.d.ts +0 -1
  8. package/dist/agents/private-key-oauth.js +46 -63
  9. package/dist/brand-assets-build.js +4 -6
  10. package/dist/brand-assets.d.ts +5 -15
  11. package/dist/brand-assets.js +15 -14
  12. package/dist/config/domains.d.ts +47 -7
  13. package/dist/config/domains.js +66 -10
  14. package/dist/config/index.d.ts +0 -1
  15. package/dist/config/index.js +0 -1
  16. package/dist/contracts/abuse.d.ts +2 -0
  17. package/dist/contracts/abuse.js +12 -0
  18. package/dist/contracts/access.d.ts +124 -12
  19. package/dist/contracts/access.js +73 -9
  20. package/dist/contracts/activity.d.ts +1 -1
  21. package/dist/contracts/activity.js +5 -12
  22. package/dist/contracts/api-keys.d.ts +21 -21
  23. package/dist/contracts/api-keys.js +2 -2
  24. package/dist/contracts/beta.js +1 -1
  25. package/dist/contracts/billing.d.ts +3 -35
  26. package/dist/contracts/billing.js +33 -52
  27. package/dist/contracts/builds.d.ts +30 -18
  28. package/dist/contracts/builds.js +28 -9
  29. package/dist/contracts/channels.js +1 -1
  30. package/dist/contracts/cli.d.ts +10 -0
  31. package/dist/contracts/cli.js +10 -0
  32. package/dist/contracts/collab-public.d.ts +63 -0
  33. package/dist/contracts/collab-public.js +46 -0
  34. package/dist/contracts/comments.d.ts +282 -53
  35. package/dist/contracts/comments.js +173 -52
  36. package/dist/contracts/common.d.ts +3 -3
  37. package/dist/contracts/common.js +5 -5
  38. package/dist/contracts/crons.d.ts +35 -0
  39. package/dist/contracts/crons.js +42 -0
  40. package/dist/contracts/device-auth.d.ts +6 -6
  41. package/dist/contracts/device-auth.js +2 -2
  42. package/dist/contracts/docs.js +2 -2
  43. package/dist/contracts/domains.d.ts +38 -27
  44. package/dist/contracts/domains.js +29 -2
  45. package/dist/contracts/enums.d.ts +34 -30
  46. package/dist/contracts/enums.js +62 -48
  47. package/dist/contracts/error-code-meta.d.ts +50 -125
  48. package/dist/contracts/error-code-meta.js +29 -41
  49. package/dist/contracts/error-codes.d.ts +1 -1
  50. package/dist/contracts/error-codes.js +14 -33
  51. package/dist/contracts/execution.d.ts +47 -66
  52. package/dist/contracts/execution.js +53 -49
  53. package/dist/contracts/feature-lifecycle-core.d.ts +0 -6
  54. package/dist/contracts/feature-lifecycle-core.js +2 -31
  55. package/dist/contracts/feature-lifecycle.d.ts +12 -52
  56. package/dist/contracts/feature-lifecycle.js +16 -59
  57. package/dist/contracts/features.d.ts +48 -60
  58. package/dist/contracts/features.js +59 -51
  59. package/dist/contracts/functions.d.ts +266 -72
  60. package/dist/contracts/functions.js +260 -37
  61. package/dist/contracts/git.d.ts +28 -34
  62. package/dist/contracts/git.js +10 -11
  63. package/dist/contracts/grants.d.ts +9 -5
  64. package/dist/contracts/grants.js +18 -9
  65. package/dist/contracts/ids.js +2 -2
  66. package/dist/contracts/internal.d.ts +8 -6
  67. package/dist/contracts/internal.js +12 -12
  68. package/dist/contracts/mcp.d.ts +11 -0
  69. package/dist/contracts/mcp.js +5 -0
  70. package/dist/contracts/me.js +1 -1
  71. package/dist/contracts/oauth-resources.d.ts +4 -3
  72. package/dist/contracts/oauth-resources.js +12 -3
  73. package/dist/contracts/operations.d.ts +90 -5
  74. package/dist/contracts/operations.js +77 -3
  75. package/dist/contracts/pages.d.ts +12 -7
  76. package/dist/contracts/pages.js +24 -1
  77. package/dist/contracts/plan-policy.d.ts +0 -2
  78. package/dist/contracts/plan-policy.js +2 -3
  79. package/dist/contracts/platform.d.ts +61 -148
  80. package/dist/contracts/platform.js +70 -126
  81. package/dist/contracts/publish-archive.d.ts +508 -0
  82. package/dist/contracts/publish-archive.js +32 -0
  83. package/dist/contracts/push-new.d.ts +4 -4
  84. package/dist/contracts/quotas.js +2 -2
  85. package/dist/contracts/repository-connections.d.ts +43 -30
  86. package/dist/contracts/repository-connections.js +11 -3
  87. package/dist/contracts/resources.d.ts +12 -24
  88. package/dist/contracts/resources.js +36 -16
  89. package/dist/contracts/runtime-api.d.ts +433 -192
  90. package/dist/contracts/runtime-api.js +421 -356
  91. package/dist/contracts/runtime-app.d.ts +127 -120
  92. package/dist/contracts/runtime-app.js +19 -10
  93. package/dist/contracts/runtime-db.d.ts +5 -5
  94. package/dist/contracts/runtime-db.js +2 -2
  95. package/dist/contracts/runtime-purge.d.ts +8 -0
  96. package/dist/contracts/runtime-purge.js +7 -0
  97. package/dist/contracts/runtime-services.d.ts +219 -0
  98. package/dist/contracts/runtime-services.js +437 -0
  99. package/dist/contracts/runtime-storage.d.ts +46 -32
  100. package/dist/contracts/runtime-storage.js +31 -8
  101. package/dist/contracts/sf-config-v1.d.ts +48 -10
  102. package/dist/contracts/space-config.d.ts +69 -18
  103. package/dist/contracts/space-config.js +226 -27
  104. package/dist/contracts/spaces.d.ts +236 -450
  105. package/dist/contracts/spaces.js +131 -151
  106. package/dist/contracts/superadmin-activity.d.ts +57 -4
  107. package/dist/contracts/superadmin-activity.js +48 -2
  108. package/dist/contracts/superadmin-search.d.ts +126 -0
  109. package/dist/contracts/superadmin-search.js +61 -0
  110. package/dist/contracts/superadmin-spaces.d.ts +361 -92
  111. package/dist/contracts/superadmin-spaces.js +97 -24
  112. package/dist/contracts/superadmin-teams.d.ts +28 -10
  113. package/dist/contracts/superadmin-teams.js +5 -8
  114. package/dist/contracts/superadmin-tenants.d.ts +0 -6
  115. package/dist/contracts/superadmin-tenants.js +1 -7
  116. package/dist/contracts/superadmin.d.ts +135 -54
  117. package/dist/contracts/superadmin.js +46 -23
  118. package/dist/contracts/tags.d.ts +12 -12
  119. package/dist/contracts/tags.js +3 -3
  120. package/dist/contracts/teams.d.ts +49 -14
  121. package/dist/contracts/teams.js +40 -22
  122. package/dist/contracts/transfers.d.ts +0 -49
  123. package/dist/contracts/transfers.js +4 -8
  124. package/dist/contracts/usage.d.ts +61 -0
  125. package/dist/contracts/usage.js +64 -0
  126. package/dist/contracts/variables.d.ts +2 -7
  127. package/dist/contracts/variables.js +9 -8
  128. package/dist/contracts/webhooks.d.ts +2 -2
  129. package/dist/contracts/zero.d.ts +102 -73
  130. package/dist/contracts/zero.js +94 -32
  131. package/dist/dashboard-paths/index.d.ts +1 -1
  132. package/dist/dashboard-paths/index.js +1 -0
  133. package/dist/docs/agent-prose.d.ts +2 -2
  134. package/dist/docs/agent-prose.js +63 -70
  135. package/dist/docs/agent-setup.js +45 -15
  136. package/dist/docs/catalog.d.ts +24 -24
  137. package/dist/docs/catalog.js +35 -24
  138. package/dist/docs/error-docs.js +194 -270
  139. package/dist/docs/skills.d.ts +12 -12
  140. package/dist/docs/skills.js +4 -4
  141. package/dist/test-helpers/fetch-stub.d.ts +16 -0
  142. package/dist/test-helpers/fetch-stub.js +25 -0
  143. package/dist/utils/build-settings.d.ts +5 -1
  144. package/dist/utils/build-settings.js +91 -13
  145. package/dist/utils/canonical-json.d.ts +10 -0
  146. package/dist/utils/canonical-json.js +22 -0
  147. package/dist/utils/cast-transport.d.ts +28 -0
  148. package/dist/utils/cast-transport.js +52 -0
  149. package/dist/utils/claim-token.d.ts +0 -8
  150. package/dist/utils/claim-token.js +3 -15
  151. package/dist/utils/concurrency.js +1 -0
  152. package/dist/utils/credential-policy.d.ts +1 -1
  153. package/dist/utils/credential-policy.js +4 -3
  154. package/dist/utils/dns-instructions.js +9 -9
  155. package/dist/utils/env-file.d.ts +17 -0
  156. package/dist/utils/env-file.js +96 -0
  157. package/dist/utils/error-code.d.ts +2 -0
  158. package/dist/utils/error-code.js +8 -0
  159. package/dist/utils/generate-space-name.d.ts +8 -10
  160. package/dist/utils/generate-space-name.js +206 -21
  161. package/dist/utils/grant-decision.fixtures.json +2938 -0
  162. package/dist/utils/grants.d.ts +2 -0
  163. package/dist/utils/grants.js +26 -1
  164. package/dist/utils/gravatar.d.ts +9 -0
  165. package/dist/utils/gravatar.js +31 -0
  166. package/dist/utils/idempotency.d.ts +6 -0
  167. package/dist/utils/idempotency.js +28 -0
  168. package/dist/utils/local-space-state.d.ts +9 -16
  169. package/dist/utils/local-space-state.js +20 -50
  170. package/dist/utils/one-shot-replay.d.ts +4 -1
  171. package/dist/utils/page-colors.d.ts +14 -12
  172. package/dist/utils/page-colors.js +15 -13
  173. package/dist/utils/page-fonts.d.ts +2 -2
  174. package/dist/utils/page-fonts.js +15 -4
  175. package/dist/utils/pages.d.ts +21 -3
  176. package/dist/utils/pages.js +42 -13
  177. package/dist/utils/publish-form-data.d.ts +12 -0
  178. package/dist/utils/publish-form-data.js +10 -0
  179. package/dist/utils/publish-policy.d.ts +27 -0
  180. package/dist/utils/publish-policy.fixtures.json +403 -0
  181. package/dist/utils/publish-policy.js +45 -20
  182. package/dist/utils/push-new.d.ts +7 -0
  183. package/dist/utils/push-new.js +7 -0
  184. package/dist/utils/query-keys.d.ts +4 -5
  185. package/dist/utils/query-keys.js +2 -3
  186. package/dist/utils/runtime-paths.d.ts +5 -0
  187. package/dist/utils/runtime-paths.js +5 -0
  188. package/dist/utils/runtime-upload-batch.d.ts +0 -5
  189. package/dist/utils/runtime-upload-batch.js +1 -27
  190. package/dist/utils/runtime-upload.d.ts +6 -11
  191. package/dist/utils/runtime-upload.js +10 -13
  192. package/dist/utils/secure-local-file.js +5 -16
  193. package/dist/utils/space-config.d.ts +1 -34
  194. package/dist/utils/space-config.js +8 -326
  195. package/dist/utils/static-runtime-policy.d.ts +9 -3
  196. package/dist/utils/static-runtime-policy.fixtures.json +38 -41
  197. package/dist/utils/static-runtime-policy.js +22 -56
  198. package/dist/utils/storage-policy.d.ts +1 -1
  199. package/dist/utils/storage-policy.js +3 -1
  200. package/dist/utils/structured-error.d.ts +14 -0
  201. package/dist/utils/structured-error.js +22 -0
  202. package/dist/utils/upload-session.d.ts +4 -1
  203. package/dist/utils/upload-session.js +33 -5
  204. package/dist/utils/version-path.js +13 -4
  205. package/dist/vocabulary.d.ts +13 -11
  206. package/dist/vocabulary.js +42 -28
  207. package/package.json +7 -17
  208. package/dist/config/postgres-budget.d.ts +0 -129
  209. package/dist/config/postgres-budget.js +0 -140
  210. package/dist/config/postgres-budget.json +0 -51
  211. package/dist/contracts/archives.d.ts +0 -331
  212. package/dist/contracts/archives.js +0 -120
  213. package/dist/contracts/deployments.d.ts +0 -574
  214. package/dist/contracts/deployments.js +0 -97
  215. package/dist/contracts/sites.d.ts +0 -416
  216. package/dist/contracts/sites.js +0 -168
  217. package/dist/contracts/superadmin-queues.d.ts +0 -414
  218. package/dist/contracts/superadmin-queues.js +0 -202
  219. package/dist/contracts/superadmin-runtime.d.ts +0 -27
  220. package/dist/contracts/superadmin-runtime.js +0 -38
  221. package/dist/index.d.ts +0 -1
  222. package/dist/index.js +0 -1
  223. package/dist/utils/api.d.ts +0 -4
  224. package/dist/utils/api.js +0 -13
@@ -5,7 +5,7 @@ export declare const PROBLEM_CONTENT_TYPE = "application/problem+json";
5
5
  export declare function errorDocsUrl(code: string): string;
6
6
  /** Problem `title` derivation rule: the snake_case code as a sentence ("version_not_found" → "Version not found"). */
7
7
  export declare function errorTitle(code: string): string;
8
- export declare const ERROR_CODES: readonly ["abuse_report_invalid_transition", "abuse_report_rate_limited", "abuse_takedown", "access_denied", "account_suspended", "agent_handoff_declined", "agent_handoff_limit_reached", "agent_handoff_origin_unsupported", "ambiguous_space_slug", "anonymous_expired", "anonymous_pool_unavailable", "anonymous_publish_rate_limited", "anonymous_space_limit_reached", "api_key_scope_underivable", "archive_body_required", "archive_too_large", "auth_code_required", "authorization_pending", "billing_receipt_invalid", "billing_receipt_not_bound_to_team", "billing_store_not_configured", "billing_subscription_conflict", "billing_unknown_product", "build_command_missing", "build_execution_unavailable", "build_failed", "build_install_failed", "build_no_index_html", "build_not_created", "build_oom", "build_output_dir_missing", "build_timeout", "cache_purge_domain_required", "cache_purge_path_required", "channel_name_reserved", "channel_pointer_moved", "channel_unsupported", "claim_blocked_takedown", "claim_target_not_found", "claimed_space_quota_exceeded", "cli_upgrade_required", "comment_screenshot_rate_limited", "config_file_too_large", "config_functions_key_removed", "config_invalid", "config_meta_too_long", "config_name_too_long", "config_runtime_entry_missing", "config_runtime_invalid_kind", "config_templates_over_limit", "continuation_unavailable", "continuation_used", "credential_expired", "credential_not_yet_valid", "credential_retired", "credential_revoked", "csam_blocked", "csam_policy_floor", "custom_certificates_require_dedicated_site", "data_location_immutable", "db_not_available", "device_authorization_failed", "device_verification_rate_limited", "dns_export_required", "dns_field_conflict", "dns_field_not_applicable", "dns_import_partial_visibility", "dns_provider_auth_expired", "dns_provider_batch_unsupported", "dns_provider_change_pending", "dns_provider_conflict", "dns_provider_connection_in_use", "dns_provider_connection_unavailable", "dns_provider_controlled_desired_state", "dns_provider_credentials_expired", "dns_provider_feature_descriptors", "dns_provider_feature_unavailable", "dns_provider_field_unsupported", "dns_provider_future_authoritative_backend", "dns_provider_missing_permission", "dns_provider_not_connected", "dns_provider_operation_failed", "dns_provider_permission_denied", "dns_provider_rate_limited", "dns_provider_replace_all_requires_fresh_plan", "dns_provider_replace_all_write_strategy", "dns_provider_snapshot_stale", "dns_provider_snapshot_unavailable", "dns_provider_temporarily_unavailable", "dns_provider_timeout", "dns_provider_validation_failed", "dns_provider_workflow_templates", "dns_provider_zone_not_found", "dns_record_conflicts_with_managed", "dns_record_managed", "dns_record_not_found", "domain_already_exists", "domain_bound", "domain_facet_already_managed", "domain_facet_external", "domain_facet_not_applicable", "domain_hostname_site_mismatch", "domain_in_use", "domain_lookup_rate_limited", "domain_not_bound", "domain_quota_exceeded", "domain_registration_active", "domain_registration_not_renewable", "domain_reserved_suffix", "domain_transfer_active", "domain_wildcard_label", "domain_wildcard_not_enabled", "download_required", "duplicate_version_path", "enforcement_policy_overlap", "event_payload_too_large", "event_rate_limited", "expired_token", "export_archive_not_ready", "export_version_not_found", "feature_unavailable", "files_mode_does_not_support_spa", "forbidden", "free_external_proxy_disabled", "google_play_webhook_identity_not_configured", "idempotency_conflict_in_progress", "idempotency_key_reused", "import_archive_not_uploaded", "import_not_cancelable", "import_not_waiting_for_archive", "incumbent_controls_dns", "inject_invalid", "inject_snippet_too_large", "internal_error", "invalid_claim_token", "invalid_continuation_token", "invalid_data_location", "invalid_device_code", "invalid_domain", "invalid_domain_name", "invalid_file_path", "invalid_google_play_webhook_identity", "invalid_grant", "invalid_idempotency_key", "invalid_publish_archive", "invalid_publish_path", "invalid_publish_payload", "invalid_request", "invalid_runtime_event", "invalid_space", "invalid_space_mode", "invalid_user_code", "invalid_version_path", "invalid_webhook_events", "invalid_webhook_payload", "invalid_webhook_signature", "invalid_webhook_url", "invalid_zero_realtime_event", "invalid_zero_realtime_replay_query", "invitation_already_exists", "invitation_email_mismatch", "invitation_expired", "invitation_not_pending", "ip_blocked", "job_not_found", "job_not_promotable", "job_not_removable", "job_not_retryable", "last_owner", "log_retention_clamped", "lost_domain_control", "maintenance_in_progress", "malware_detected", "managed_domain_protected", "manifest_body_too_large", "manifest_duplicate_path", "manifest_too_many_files", "member_already_exists", "method_not_allowed", "missing_route_param", "move_target_capacity_lost", "name_managed_by_config", "nameserver_delegation_required", "nameserver_divergence", "noop_publish", "not_enrolled", "not_found", "path_case_collision", "path_too_long", "placement_invalid_burstable", "placement_mode_requires_plan", "plan_grant_already_active", "plan_grant_already_revoked", "platform_tenant_immutable_client", "policy_exceeds_grantor", "principal_space_mismatch", "provider_error", "provider_job_failed", "provider_job_timeout", "provider_runtime_feature_unsupported", "provider_site_id_required", "proxy_upstream_denied", "proxy_upstream_unresolved", "publish_archive_compression_ratio_exceeded", "publish_archive_expanded_size_exceeded", "publish_archive_file_count_exceeded", "publish_archive_too_large", "publish_base_changed", "publish_bytes_missing", "publish_config_unsupported", "publish_failed", "publish_file_missing", "publish_hash_mismatch", "publish_inline_limit_exceeded", "publish_not_cancelable", "publish_path_collision", "publish_path_invalid", "publish_setup_failed", "publish_snapshot_empty", "publish_upload_failed", "publish_verification_failed", "queue_not_found", "rate_limited", "registration_expired", "registration_expiring", "resource_revision_changed", "routing_rules_over_plan", "runtime_action_forbidden", "runtime_api_not_found", "runtime_callback_forbidden", "runtime_dev_unsupported", "runtime_engine_zip_missing", "runtime_hostname_unassigned", "runtime_instance_mismatch", "runtime_jti_missing", "runtime_jti_replayed", "runtime_jwks_key_missing", "runtime_kind_mismatch", "runtime_management_unavailable", "runtime_not_provisioned", "runtime_operation_missing", "runtime_scope_forbidden", "runtime_token_bad_signature", "runtime_token_expired", "runtime_token_invalid", "runtime_unauthorized", "runtime_upload_operation_not_supported", "runtime_upload_required", "scan_pending", "secret_variable_in_template", "service_booting", "service_signature_invalid", "site_already_deleted", "site_has_live_spaces", "site_not_static", "site_required", "site_suspended", "slow_down", "slug_invalid", "slug_reserved", "slug_unavailable", "source_archive_decompression_timeout", "source_archive_expansion_ratio_exceeded", "source_archive_validation_busy", "space_already_claimed", "space_capacity_warming", "space_claim_unavailable", "space_claimed_credential_available", "space_disabled", "space_expired", "space_has_active_publish", "space_has_active_version", "space_hostname_identity_missing", "space_import_archive_invalid", "space_import_archive_too_large", "space_import_config_only_archive", "space_import_runtime_schema_unsupported", "space_move_would_strand_zero_data", "space_moving", "space_no_live_version", "space_not_disabled", "space_not_restorable", "space_person_already_member", "space_person_invitation_pending", "space_person_self_invite", "space_ref_ambiguous", "space_ref_required", "space_transferring", "space_unclaimed", "ssl_renewal_blocked", "static_control_file_not_supported", "static_runtime_control_path_not_supported", "static_runtime_required", "storage_auth_required", "storage_bucket_unavailable", "storage_content_blocked", "storage_delete_forbidden", "storage_empty_file", "storage_file_too_large", "storage_key_invalid", "storage_object_not_found", "storage_quota_already_unlimited", "storage_quota_decrease_not_supported", "storage_quota_exceeded", "storage_unavailable", "storage_usage_unavailable", "stripe_error", "superseded_by_publish", "takeover_notice_window", "team_member_quota_exceeded", "team_ref_required", "team_required", "team_slug_conflict", "template_file_too_large", "template_not_in_version", "template_variable_unresolved", "tenant_id_mismatch", "tenant_not_found", "tenant_not_granted", "tenant_past_due", "tenant_selection_required", "tenant_suspended", "theme_value_invalid", "transfer_cross_tenant_unsupported", "transfer_move_failed", "transfer_not_cancelable", "transfer_push_failed", "transfer_source_changed", "transfer_target_same_as_source", "transfer_verify_failed", "unauthorized", "unsupported_publish_media_type", "upload_hash_mismatch", "upload_path_not_canonical", "upload_path_not_declared", "upload_size_mismatch", "user_banned", "validation_error", "variable_cascade_failed", "verification_required", "version_already_live", "version_artifact_not_found", "version_busy", "version_canceled", "version_closed", "version_expired", "version_failed", "version_file_count_exceeded", "version_file_not_found", "version_file_too_large", "version_files_missing", "version_in_use", "version_live", "version_no_publishable_files", "version_not_finalizable", "version_not_found", "version_not_prepared", "version_not_promotable", "version_not_ready", "version_quota_exceeded", "version_total_bytes_exceeded", "webhook_delivery_budget_exceeded", "whois_unavailable", "wp_cloud_anonymous_pool_required", "wp_cloud_assignment_kind_mismatch", "wp_cloud_assignment_space_mismatch", "wp_cloud_assignment_team_mismatch", "wp_cloud_client_in_use", "wp_cloud_client_not_found", "wp_cloud_site_still_assigned", "wp_cloud_team_shared_site_exists", "wp_cloud_webhook_secret_not_configured", "zero_activating", "zero_ai_unavailable", "zero_artifact_abi_mismatch", "zero_artifact_invalid", "zero_artifact_malformed", "zero_artifact_path_invalid", "zero_artifact_unreadable", "zero_auth_unavailable", "zero_blob_key_invalid", "zero_blob_store_full", "zero_blob_too_large", "zero_blob_value_invalid", "zero_bootstrap_encode_failed", "zero_bytecode_hash_mismatch", "zero_bytecode_invalid", "zero_bytecode_path_invalid", "zero_bytecode_unreadable", "zero_capabilities_encode_failed", "zero_client_bundle_not_loaded", "zero_db_connect_failed", "zero_db_execute_failed", "zero_db_export_cursor_invalid", "zero_db_export_failed", "zero_db_export_page_too_large", "zero_db_export_query_invalid", "zero_db_export_schema_changed", "zero_db_export_schema_unavailable", "zero_db_host_install_failed", "zero_db_operation_invalid", "zero_db_operation_too_large", "zero_db_param_invalid", "zero_db_query_failed", "zero_db_row_invalid", "zero_db_sql_invalid", "zero_db_target_denied", "zero_db_tls_required", "zero_db_too_many_params", "zero_db_transaction_active", "zero_db_transaction_commit_failed", "zero_db_transaction_invalid", "zero_db_transaction_missing", "zero_db_transaction_rollback_failed", "zero_db_transaction_start_failed", "zero_db_url_invalid", "zero_db_url_missing", "zero_dev_endpoint_failed", "zero_dump_query_invalid", "zero_endpoint_compile_failed", "zero_endpoint_conflict", "zero_endpoint_duplicate", "zero_endpoint_id_duplicate", "zero_endpoint_index_invalid", "zero_endpoint_index_malformed", "zero_endpoint_index_path_invalid", "zero_endpoint_index_unreadable", "zero_endpoint_invalid", "zero_endpoint_mismatch", "zero_endpoint_not_found", "zero_endpoints_invalid", "zero_endpoints_too_many", "zero_envelope_encode_failed", "zero_js_context_init_failed", "zero_js_execution_failed", "zero_js_execution_timeout", "zero_js_globals_failed", "zero_js_response_malformed", "zero_js_runtime_init_failed", "zero_log_query_invalid", "zero_method_not_allowed", "zero_migration_failed", "zero_query_name_missing", "zero_realtime_forbidden", "zero_realtime_message_invalid", "zero_realtime_operation_unsupported", "zero_realtime_query_invalid", "zero_realtime_space_required", "zero_realtime_unavailable", "zero_realtime_websocket_forbidden", "zero_replay_failed", "zero_replay_query_invalid", "zero_replay_unavailable", "zero_request_body_too_large", "zero_requires_dedicated_plan", "zero_response_header_forbidden", "zero_response_header_invalid", "zero_response_too_large", "zero_routes_invalid", "zero_run_compile_failed", "zero_run_duplicate", "zero_run_invalid", "zero_run_operation_unsupported", "zero_runner_envelope_invalid", "zero_runner_failed", "zero_runner_invalid_body", "zero_runner_invalid_response", "zero_runner_invalid_status", "zero_runner_protocol_unsupported", "zero_runner_response_encode_failed", "zero_runner_stdin_invalid", "zero_runner_stdin_too_large", "zero_runner_unavailable", "zero_runs_invalid", "zero_runs_require_runtime_compiler", "zero_runs_too_many", "zero_shopify_unavailable"];
8
+ export declare const ERROR_CODES: readonly ["abuse_report_invalid_transition", "abuse_report_rate_limited", "abuse_takedown", "access_denied", "account_suspended", "agent_handoff_declined", "agent_handoff_limit_reached", "agent_handoff_origin_unsupported", "ambiguous_space_slug", "anonymous_expired", "anonymous_publish_rate_limited", "anonymous_space_limit_reached", "api_key_scope_underivable", "archive_too_large", "auth_code_required", "authorization_pending", "blob_gate_record_missing", "blob_gate_token_invalid", "build_command_missing", "build_execution_unavailable", "build_failed", "build_install_failed", "build_no_index_html", "build_not_created", "build_oom", "build_output_contains_server_bundle", "build_output_dir_missing", "build_timeout", "cache_purge_domain_required", "cache_purge_path_required", "channel_name_reserved", "channel_pointer_moved", "channel_unsupported", "claim_blocked_takedown", "claim_target_not_found", "claimed_space_quota_exceeded", "cli_upgrade_required", "config_file_too_large", "config_functions_key_removed", "config_invalid", "config_meta_too_long", "config_name_too_long", "config_runtime_entry_missing", "config_runtime_invalid_kind", "config_templates_over_limit", "continuation_unavailable", "continuation_used", "credential_expired", "credential_not_yet_valid", "credential_retired", "credential_revoked", "csam_blocked", "csam_policy_floor", "data_location_immutable", "db_not_available", "device_authorization_failed", "device_verification_rate_limited", "dns_export_required", "dns_field_conflict", "dns_field_not_applicable", "dns_import_partial_visibility", "dns_provider_auth_expired", "dns_provider_batch_unsupported", "dns_provider_change_pending", "dns_provider_conflict", "dns_provider_connection_in_use", "dns_provider_connection_unavailable", "dns_provider_controlled_desired_state", "dns_provider_credentials_expired", "dns_provider_feature_descriptors", "dns_provider_feature_unavailable", "dns_provider_field_unsupported", "dns_provider_future_authoritative_backend", "dns_provider_missing_permission", "dns_provider_not_connected", "dns_provider_operation_failed", "dns_provider_permission_denied", "dns_provider_rate_limited", "dns_provider_replace_all_requires_fresh_plan", "dns_provider_replace_all_write_strategy", "dns_provider_snapshot_stale", "dns_provider_snapshot_unavailable", "dns_provider_temporarily_unavailable", "dns_provider_timeout", "dns_provider_validation_failed", "dns_provider_workflow_templates", "dns_provider_zone_not_found", "dns_record_conflicts_with_managed", "dns_record_managed", "dns_record_not_found", "domain_already_exists", "domain_bound", "domain_facet_already_managed", "domain_facet_external", "domain_facet_not_applicable", "domain_hostname_site_mismatch", "domain_in_use", "domain_lookup_rate_limited", "domain_not_bound", "domain_quota_exceeded", "domain_registration_active", "domain_registration_not_renewable", "domain_reserved_suffix", "domain_transfer_active", "domain_wildcard_label", "domain_wildcard_not_enabled", "download_required", "duplicate_version_path", "enforcement_policy_overlap", "event_payload_too_large", "event_rate_limited", "expired_token", "feature_unavailable", "files_mode_does_not_support_spa", "forbidden", "free_external_proxy_disabled", "idempotency_conflict_in_progress", "idempotency_key_reused", "incumbent_controls_dns", "ingest_admission_exceeded", "inject_invalid", "inject_snippet_too_large", "internal_error", "invalid_claim_token", "invalid_continuation_token", "invalid_data_location", "invalid_device_code", "invalid_domain", "invalid_domain_name", "invalid_file_path", "invalid_grant", "invalid_idempotency_key", "invalid_publish_archive", "invalid_publish_path", "invalid_publish_payload", "invalid_request", "invalid_runtime_event", "invalid_space", "invalid_space_mode", "invalid_user_code", "invalid_version_path", "invalid_webhook_events", "invalid_webhook_payload", "invalid_webhook_signature", "invalid_webhook_url", "invalid_zero_realtime_event", "invalid_zero_realtime_replay_query", "invitation_already_exists", "invitation_email_mismatch", "invitation_expired", "invitation_not_pending", "ip_blocked", "job_not_found", "job_not_promotable", "job_not_removable", "job_not_retryable", "last_owner", "log_retention_clamped", "lost_domain_control", "maintenance_in_progress", "malware_detected", "managed_domain_protected", "manifest_body_too_large", "manifest_duplicate_path", "manifest_too_many_files", "member_already_exists", "method_not_allowed", "missing_route_param", "move_target_capacity_lost", "name_managed_by_config", "nameserver_delegation_required", "nameserver_divergence", "noop_publish", "not_enrolled", "not_found", "path_case_collision", "path_too_long", "placement_invalid_burstable", "plan_grant_already_active", "plan_grant_already_revoked", "platform_tenant_immutable_client", "policy_exceeds_grantor", "prebuilt_metadata_invalid", "principal_space_mismatch", "promote_admission_exceeded", "provider_error", "provider_job_failed", "provider_job_timeout", "provider_privilege", "provider_runtime_feature_unsupported", "provider_site_id_required", "proxy_upstream_denied", "proxy_upstream_unresolved", "publish_archive_compression_ratio_exceeded", "publish_archive_expanded_size_exceeded", "publish_archive_file_count_exceeded", "publish_archive_too_large", "publish_base_changed", "publish_bytes_missing", "publish_config_unsupported", "publish_failed", "publish_file_missing", "publish_hash_mismatch", "publish_inline_limit_exceeded", "publish_not_cancelable", "publish_path_collision", "publish_path_invalid", "publish_session_expired", "publish_setup_failed", "publish_snapshot_empty", "publish_upload_failed", "publish_verification_failed", "queue_not_found", "rate_limited", "registration_expired", "registration_expiring", "resource_revision_changed", "response_headers_unservable", "response_table_too_large", "review_item_claimed", "routing_rules_over_plan", "runtime_action_forbidden", "runtime_api_not_found", "runtime_callback_forbidden", "runtime_dev_unsupported", "runtime_hostname_unassigned", "runtime_instance_mismatch", "runtime_jti_missing", "runtime_jti_replayed", "runtime_jwks_key_missing", "runtime_kind_mismatch", "runtime_management_unavailable", "runtime_not_provisioned", "runtime_operation_missing", "runtime_purge_failed", "runtime_release_unverifiable", "runtime_scope_forbidden", "runtime_token_bad_signature", "runtime_token_expired", "runtime_token_invalid", "runtime_unauthorized", "runtime_upload_operation_not_supported", "runtime_upload_required", "scan_pending", "secret_variable_in_template", "service_booting", "service_signature_invalid", "site_already_deleted", "site_has_live_spaces", "site_not_static", "site_required", "site_suspended", "slow_down", "slug_invalid", "slug_reserved", "slug_unavailable", "source_archive_decompression_timeout", "source_archive_expansion_ratio_exceeded", "source_archive_validation_busy", "space_already_claimed", "space_claim_unavailable", "space_claimed_credential_available", "space_disabled", "space_expired", "space_has_active_publish", "space_has_active_version", "space_hostname_identity_missing", "space_no_live_version", "space_not_disabled", "space_not_restorable", "space_person_already_member", "space_person_invitation_pending", "space_person_self_invite", "space_ref_ambiguous", "space_ref_required", "space_transferring", "space_unclaimed", "ssl_renewal_blocked", "static_control_file_not_supported", "static_runtime_control_path_not_supported", "static_runtime_required", "storage_auth_required", "storage_bucket_unavailable", "storage_content_blocked", "storage_delete_forbidden", "storage_empty_file", "storage_file_too_large", "storage_key_invalid", "storage_object_not_found", "storage_quota_already_unlimited", "storage_quota_decrease_not_supported", "storage_quota_exceeded", "storage_unavailable", "stripe_error", "superseded_by_publish", "takeover_notice_window", "team_member_quota_exceeded", "team_ref_required", "team_required", "team_slug_conflict", "template_file_too_large", "template_not_in_version", "template_variable_unresolved", "tenant_id_mismatch", "tenant_not_found", "tenant_not_granted", "tenant_past_due", "tenant_selection_required", "tenant_suspended", "theme_value_invalid", "transfer_cross_tenant_unsupported", "transfer_not_cancelable", "transfer_push_failed", "transfer_source_changed", "transfer_target_same_as_source", "transfer_verify_failed", "unauthorized", "unsupported_publish_media_type", "upload_hash_mismatch", "upload_path_not_canonical", "upload_path_not_declared", "upload_size_mismatch", "user_banned", "validation_error", "verification_required", "version_already_live", "version_artifact_not_found", "version_busy", "version_canceled", "version_closed", "version_expired", "version_failed", "version_file_count_exceeded", "version_file_not_found", "version_file_too_large", "version_files_missing", "version_in_use", "version_live", "version_no_publishable_files", "version_not_finalizable", "version_not_found", "version_not_prepared", "version_not_promotable", "version_not_ready", "version_quota_exceeded", "version_total_bytes_exceeded", "webhook_delivery_budget_exceeded", "whois_unavailable", "wp_cloud_assignment_kind_mismatch", "wp_cloud_assignment_space_mismatch", "wp_cloud_assignment_team_mismatch", "wp_cloud_client_in_use", "wp_cloud_client_not_found", "wp_cloud_site_still_assigned", "wp_cloud_team_shared_site_exists", "wp_cloud_webhook_secret_not_configured", "zero_ai_unavailable", "zero_artifact_abi_mismatch", "zero_artifact_invalid", "zero_artifact_malformed", "zero_artifact_path_invalid", "zero_artifact_unreadable", "zero_auth_unavailable", "zero_blob_key_invalid", "zero_blob_store_full", "zero_blob_too_large", "zero_blob_value_invalid", "zero_bootstrap_encode_failed", "zero_bytecode_hash_mismatch", "zero_bytecode_invalid", "zero_bytecode_path_invalid", "zero_bytecode_unreadable", "zero_capabilities_encode_failed", "zero_client_bundle_not_loaded", "zero_db_connect_failed", "zero_db_execute_failed", "zero_db_export_cursor_invalid", "zero_db_export_failed", "zero_db_export_page_too_large", "zero_db_export_query_invalid", "zero_db_export_schema_changed", "zero_db_export_schema_unavailable", "zero_db_host_install_failed", "zero_db_operation_invalid", "zero_db_operation_too_large", "zero_db_param_invalid", "zero_db_query_failed", "zero_db_row_invalid", "zero_db_sql_invalid", "zero_db_target_denied", "zero_db_tls_required", "zero_db_too_many_params", "zero_db_transaction_active", "zero_db_transaction_commit_failed", "zero_db_transaction_invalid", "zero_db_transaction_missing", "zero_db_transaction_rollback_failed", "zero_db_transaction_start_failed", "zero_db_url_invalid", "zero_db_url_missing", "zero_dev_endpoint_failed", "zero_dump_query_invalid", "zero_endpoint_compile_failed", "zero_endpoint_conflict", "zero_endpoint_duplicate", "zero_endpoint_id_duplicate", "zero_endpoint_index_invalid", "zero_endpoint_index_malformed", "zero_endpoint_index_path_invalid", "zero_endpoint_index_unreadable", "zero_endpoint_invalid", "zero_endpoint_mismatch", "zero_endpoint_not_found", "zero_endpoints_invalid", "zero_endpoints_too_many", "zero_envelope_encode_failed", "zero_js_context_init_failed", "zero_js_execution_failed", "zero_js_execution_timeout", "zero_js_globals_failed", "zero_js_response_malformed", "zero_js_runtime_init_failed", "zero_log_query_invalid", "zero_method_not_allowed", "zero_migration_failed", "zero_query_name_missing", "zero_realtime_forbidden", "zero_realtime_message_invalid", "zero_realtime_operation_unsupported", "zero_realtime_query_invalid", "zero_realtime_space_required", "zero_realtime_unavailable", "zero_realtime_websocket_forbidden", "zero_replay_failed", "zero_replay_query_invalid", "zero_replay_unavailable", "zero_request_body_too_large", "zero_response_header_forbidden", "zero_response_header_invalid", "zero_response_too_large", "zero_routes_invalid", "zero_run_compile_failed", "zero_run_duplicate", "zero_run_invalid", "zero_run_operation_unsupported", "zero_runner_envelope_invalid", "zero_runner_failed", "zero_runner_invalid_body", "zero_runner_invalid_response", "zero_runner_invalid_status", "zero_runner_protocol_unsupported", "zero_runner_response_encode_failed", "zero_runner_stdin_invalid", "zero_runner_stdin_too_large", "zero_runner_unavailable", "zero_runs_invalid", "zero_runs_require_runtime_compiler", "zero_runs_too_many"];
9
9
  export type ErrorCode = (typeof ERROR_CODES)[number];
10
10
  export declare function isErrorCode(value: string): value is ErrorCode;
11
11
  /**
@@ -1,4 +1,4 @@
1
- // The single error-code table (internal-docs/platform.md "Global API Conventions").
1
+ // The single error-code table (the platform spec "Global API Conventions").
2
2
  // Every problem document `code` the control plane emits is a member of this table, and
3
3
  // the problem `type` is derived mechanically from the code
4
4
  // (`https://spacefast.com/docs/errors/{code}`).
@@ -34,19 +34,14 @@ export const ERROR_CODES = [
34
34
  "agent_handoff_origin_unsupported",
35
35
  "ambiguous_space_slug",
36
36
  "anonymous_expired",
37
- "anonymous_pool_unavailable",
38
37
  "anonymous_publish_rate_limited",
39
38
  "anonymous_space_limit_reached",
40
39
  "api_key_scope_underivable",
41
- "archive_body_required",
42
40
  "archive_too_large",
43
41
  "auth_code_required",
44
42
  "authorization_pending",
45
- "billing_receipt_invalid",
46
- "billing_receipt_not_bound_to_team",
47
- "billing_store_not_configured",
48
- "billing_subscription_conflict",
49
- "billing_unknown_product",
43
+ "blob_gate_record_missing",
44
+ "blob_gate_token_invalid",
50
45
  "build_command_missing",
51
46
  "build_execution_unavailable",
52
47
  "build_failed",
@@ -54,6 +49,7 @@ export const ERROR_CODES = [
54
49
  "build_no_index_html",
55
50
  "build_not_created",
56
51
  "build_oom",
52
+ "build_output_contains_server_bundle",
57
53
  "build_output_dir_missing",
58
54
  "build_timeout",
59
55
  "cache_purge_domain_required",
@@ -65,7 +61,6 @@ export const ERROR_CODES = [
65
61
  "claim_target_not_found",
66
62
  "claimed_space_quota_exceeded",
67
63
  "cli_upgrade_required",
68
- "comment_screenshot_rate_limited",
69
64
  "config_file_too_large",
70
65
  "config_functions_key_removed",
71
66
  "config_invalid",
@@ -82,7 +77,6 @@ export const ERROR_CODES = [
82
77
  "credential_revoked",
83
78
  "csam_blocked",
84
79
  "csam_policy_floor",
85
- "custom_certificates_require_dedicated_site",
86
80
  "data_location_immutable",
87
81
  "db_not_available",
88
82
  "device_authorization_failed",
@@ -142,19 +136,14 @@ export const ERROR_CODES = [
142
136
  "event_payload_too_large",
143
137
  "event_rate_limited",
144
138
  "expired_token",
145
- "export_archive_not_ready",
146
- "export_version_not_found",
147
139
  "feature_unavailable",
148
140
  "files_mode_does_not_support_spa",
149
141
  "forbidden",
150
142
  "free_external_proxy_disabled",
151
- "google_play_webhook_identity_not_configured",
152
143
  "idempotency_conflict_in_progress",
153
144
  "idempotency_key_reused",
154
- "import_archive_not_uploaded",
155
- "import_not_cancelable",
156
- "import_not_waiting_for_archive",
157
145
  "incumbent_controls_dns",
146
+ "ingest_admission_exceeded",
158
147
  "inject_invalid",
159
148
  "inject_snippet_too_large",
160
149
  "internal_error",
@@ -165,7 +154,6 @@ export const ERROR_CODES = [
165
154
  "invalid_domain",
166
155
  "invalid_domain_name",
167
156
  "invalid_file_path",
168
- "invalid_google_play_webhook_identity",
169
157
  "invalid_grant",
170
158
  "invalid_idempotency_key",
171
159
  "invalid_publish_archive",
@@ -214,15 +202,17 @@ export const ERROR_CODES = [
214
202
  "path_case_collision",
215
203
  "path_too_long",
216
204
  "placement_invalid_burstable",
217
- "placement_mode_requires_plan",
218
205
  "plan_grant_already_active",
219
206
  "plan_grant_already_revoked",
220
207
  "platform_tenant_immutable_client",
221
208
  "policy_exceeds_grantor",
209
+ "prebuilt_metadata_invalid",
222
210
  "principal_space_mismatch",
211
+ "promote_admission_exceeded",
223
212
  "provider_error",
224
213
  "provider_job_failed",
225
214
  "provider_job_timeout",
215
+ "provider_privilege",
226
216
  "provider_runtime_feature_unsupported",
227
217
  "provider_site_id_required",
228
218
  "proxy_upstream_denied",
@@ -241,6 +231,7 @@ export const ERROR_CODES = [
241
231
  "publish_not_cancelable",
242
232
  "publish_path_collision",
243
233
  "publish_path_invalid",
234
+ "publish_session_expired",
244
235
  "publish_setup_failed",
245
236
  "publish_snapshot_empty",
246
237
  "publish_upload_failed",
@@ -250,12 +241,14 @@ export const ERROR_CODES = [
250
241
  "registration_expired",
251
242
  "registration_expiring",
252
243
  "resource_revision_changed",
244
+ "response_headers_unservable",
245
+ "response_table_too_large",
246
+ "review_item_claimed",
253
247
  "routing_rules_over_plan",
254
248
  "runtime_action_forbidden",
255
249
  "runtime_api_not_found",
256
250
  "runtime_callback_forbidden",
257
251
  "runtime_dev_unsupported",
258
- "runtime_engine_zip_missing",
259
252
  "runtime_hostname_unassigned",
260
253
  "runtime_instance_mismatch",
261
254
  "runtime_jti_missing",
@@ -265,6 +258,8 @@ export const ERROR_CODES = [
265
258
  "runtime_management_unavailable",
266
259
  "runtime_not_provisioned",
267
260
  "runtime_operation_missing",
261
+ "runtime_purge_failed",
262
+ "runtime_release_unverifiable",
268
263
  "runtime_scope_forbidden",
269
264
  "runtime_token_bad_signature",
270
265
  "runtime_token_expired",
@@ -289,7 +284,6 @@ export const ERROR_CODES = [
289
284
  "source_archive_expansion_ratio_exceeded",
290
285
  "source_archive_validation_busy",
291
286
  "space_already_claimed",
292
- "space_capacity_warming",
293
287
  "space_claim_unavailable",
294
288
  "space_claimed_credential_available",
295
289
  "space_disabled",
@@ -297,12 +291,6 @@ export const ERROR_CODES = [
297
291
  "space_has_active_publish",
298
292
  "space_has_active_version",
299
293
  "space_hostname_identity_missing",
300
- "space_import_archive_invalid",
301
- "space_import_archive_too_large",
302
- "space_import_config_only_archive",
303
- "space_import_runtime_schema_unsupported",
304
- "space_move_would_strand_zero_data",
305
- "space_moving",
306
294
  "space_no_live_version",
307
295
  "space_not_disabled",
308
296
  "space_not_restorable",
@@ -329,7 +317,6 @@ export const ERROR_CODES = [
329
317
  "storage_quota_decrease_not_supported",
330
318
  "storage_quota_exceeded",
331
319
  "storage_unavailable",
332
- "storage_usage_unavailable",
333
320
  "stripe_error",
334
321
  "superseded_by_publish",
335
322
  "takeover_notice_window",
@@ -348,7 +335,6 @@ export const ERROR_CODES = [
348
335
  "tenant_suspended",
349
336
  "theme_value_invalid",
350
337
  "transfer_cross_tenant_unsupported",
351
- "transfer_move_failed",
352
338
  "transfer_not_cancelable",
353
339
  "transfer_push_failed",
354
340
  "transfer_source_changed",
@@ -362,7 +348,6 @@ export const ERROR_CODES = [
362
348
  "upload_size_mismatch",
363
349
  "user_banned",
364
350
  "validation_error",
365
- "variable_cascade_failed",
366
351
  "verification_required",
367
352
  "version_already_live",
368
353
  "version_artifact_not_found",
@@ -387,7 +372,6 @@ export const ERROR_CODES = [
387
372
  "version_total_bytes_exceeded",
388
373
  "webhook_delivery_budget_exceeded",
389
374
  "whois_unavailable",
390
- "wp_cloud_anonymous_pool_required",
391
375
  "wp_cloud_assignment_kind_mismatch",
392
376
  "wp_cloud_assignment_space_mismatch",
393
377
  "wp_cloud_assignment_team_mismatch",
@@ -396,7 +380,6 @@ export const ERROR_CODES = [
396
380
  "wp_cloud_site_still_assigned",
397
381
  "wp_cloud_team_shared_site_exists",
398
382
  "wp_cloud_webhook_secret_not_configured",
399
- "zero_activating",
400
383
  "zero_ai_unavailable",
401
384
  "zero_artifact_abi_mismatch",
402
385
  "zero_artifact_invalid",
@@ -478,7 +461,6 @@ export const ERROR_CODES = [
478
461
  "zero_replay_query_invalid",
479
462
  "zero_replay_unavailable",
480
463
  "zero_request_body_too_large",
481
- "zero_requires_dedicated_plan",
482
464
  "zero_response_header_forbidden",
483
465
  "zero_response_header_invalid",
484
466
  "zero_response_too_large",
@@ -500,7 +482,6 @@ export const ERROR_CODES = [
500
482
  "zero_runs_invalid",
501
483
  "zero_runs_require_runtime_compiler",
502
484
  "zero_runs_too_many",
503
- "zero_shopify_unavailable",
504
485
  ];
505
486
  const ERROR_CODE_SET = new Set(ERROR_CODES);
506
487
  export function isErrorCode(value) {
@@ -14,22 +14,16 @@ import { z } from "zod";
14
14
  * as well ourselves.
15
15
  *
16
16
  * The only surface both can host is an endpoint that touches neither the
17
- * database nor the caller's identity — see `endpointIsPortable`. That is the
18
- * portable seam, and it is deliberately narrow: a capsule handler's semantics
19
- * depend on the transaction wrapped around it, which does not exist on an
20
- * isolate a continent away from the database.
21
- */
22
- /**
23
- * What a live version runs. `static` is bytes on disk with no execution at
24
- * all, and remains the overwhelming majority of traffic; the other two each
25
- * name a product.
17
+ * database, the caller's identity, nor realtime — see `endpointIsPortable`.
18
+ * That is the portable seam, and it is deliberately narrow: a capsule
19
+ * handler's semantics depend on the transaction wrapped around it, which does
20
+ * not exist on an isolate a continent away from the database.
21
+ *
22
+ * Neither is a "kind" a space declares. Every space owns a site, so what runs
23
+ * is a routing decision derived from what the published tree carries: static
24
+ * files, a worker, a capsule, or any mix of the three in one publish. There is
25
+ * no enum here to disagree with the tree.
26
26
  */
27
- export declare const runtimeKindSchema: z.ZodEnum<{
28
- zero: "zero";
29
- functions: "functions";
30
- static: "static";
31
- }>;
32
- export type RuntimeKind = z.infer<typeof runtimeKindSchema>;
33
27
  /**
34
28
  * How a live runtime delivers realtime invalidations.
35
29
  *
@@ -60,6 +54,7 @@ export declare const EXECUTION_ENV_TOTAL_VALUE_MAX_BYTES: number;
60
54
  export declare const SERVER_ENV_FILE = ".env.server";
61
55
  /** Lakebed's documented server-only env filename, accepted for capsule portability. */
62
56
  export declare const LAKEBED_SERVER_ENV_FILE = ".env.lakebed.server";
57
+ export declare const SERVER_ENV_FILES: readonly [".env.server", ".env.lakebed.server"];
63
58
  /**
64
59
  * Names the platform reserves for itself in the tenant environment. Tenant
65
60
  * code cannot set these, so it cannot spoof the values the broker trusts.
@@ -114,17 +109,37 @@ export declare const executionCapabilitiesSchema: z.ZodDefault<z.ZodObject<{
114
109
  env: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
115
110
  realtime: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
116
111
  logging: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
112
+ gravatar: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
113
+ spam: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
114
+ email: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
117
115
  }, z.core.$strip>>;
118
116
  export type ExecutionCapabilities = z.infer<typeof executionCapabilitiesSchema>;
117
+ /**
118
+ * The order every surface renders a capability list in. Fixed rather than
119
+ * derived from a response body, so two spaces never list their capabilities
120
+ * differently because JSON came back reshuffled — and declared here, beside the
121
+ * schema, so adding a capability cannot leave a renderer silently omitting it.
122
+ */
123
+ export declare const EXECUTION_CAPABILITY_ORDER: readonly ["db", "fetch", "auth", "env", "realtime", "logging", "gravatar", "spam", "email"];
119
124
  /**
120
125
  * The portable seam, stated as one predicate.
121
126
  *
122
- * `db` and `auth` are the two capabilities that bind a handler to the local
123
- * tier. `db` because Zero's store guarantees every handler runs inside one
124
- * parent-owned transaction, which an isolate reaching the database over a
125
- * relay cannot offer. `auth` because capsule identity is resolved against that
126
- * same transaction's view. Everything else fetch, env, realtime, logging —
127
- * is brokered identically on both tiers and does not constrain placement.
127
+ * `db`, `auth` and `realtime` are the three capabilities that bind a handler
128
+ * to the local tier. `db` because Zero's store guarantees every handler runs
129
+ * inside one parent-owned transaction, which an isolate reaching the database
130
+ * over a relay cannot offer. `auth` because capsule identity is resolved
131
+ * against that same transaction's view. `realtime` because invalidations are
132
+ * emitted by the native runner beside the store, and the Functions grant
133
+ * vocabulary has no counterpart for them — a worker declaring the capability
134
+ * would fail closed at the relay with nothing to reach. Everything else —
135
+ * fetch, env, logging, and the three platform services — is brokered
136
+ * identically on both tiers and does not constrain placement.
137
+ *
138
+ * `email` is the one worth stating explicitly, because it looks like it should
139
+ * bind: a Zero mutation's send is atomic with its database writes, and a
140
+ * Function's is not. That is a difference in the *guarantee* either tier can
141
+ * offer, not in what the handler is allowed to reach, and placement follows
142
+ * what code reaches. An author who needs that atomicity writes a capsule.
128
143
  *
129
144
  * Nothing here decides placement automatically: the product a version deploys
130
145
  * to is a property of what its author wrote, and this predicate only reports
@@ -156,6 +171,9 @@ export declare function executionEndpointSourceSchema(routePathSchema: z.ZodType
156
171
  env: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
157
172
  realtime: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
158
173
  logging: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
174
+ gravatar: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
175
+ spam: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
176
+ email: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
159
177
  }, z.core.$strip>>;
160
178
  }, z.core.$strict>;
161
179
  /**
@@ -175,6 +193,13 @@ export declare function executionBundleSchema(options: {
175
193
  export declare function executionStaticFileSchema(options: {
176
194
  storageRoot: string;
177
195
  maxBytes: number;
196
+ /**
197
+ * The one underscore-prefixed root a platform compile may write into. Author
198
+ * trees still cannot: the leading-underscore ban is what keeps `_headers` and
199
+ * `_redirects` from being forged as content, and this exemption is a literal
200
+ * prefix the compiler owns, not a relaxation of the rule.
201
+ */
202
+ platformAssetRoot?: string;
178
203
  }): z.ZodObject<{
179
204
  path: z.ZodString;
180
205
  contentType: z.ZodString;
@@ -188,51 +213,7 @@ export declare function executionStaticFileSchema(options: {
188
213
  * the same question on each.
189
214
  */
190
215
  export declare const executionInspectPolicySchema: z.ZodEnum<{
191
- public: "public";
192
216
  private: "private";
217
+ public: "public";
193
218
  }>;
194
219
  export type ExecutionInspectPolicy = z.infer<typeof executionInspectPolicySchema>;
195
- export declare const executionLogEntrySchema: z.ZodObject<{
196
- id: z.ZodString;
197
- timestamp: z.ZodString;
198
- level: z.ZodEnum<{
199
- info: "info";
200
- error: "error";
201
- debug: "debug";
202
- warn: "warn";
203
- }>;
204
- requestId: z.ZodNullable<z.ZodString>;
205
- versionId: z.ZodNullable<z.ZodString>;
206
- handlerName: z.ZodNullable<z.ZodString>;
207
- message: z.ZodString;
208
- metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
209
- }, z.core.$strict>;
210
- export type ExecutionLogEntry = z.infer<typeof executionLogEntrySchema>;
211
- export declare const executionLogListQuerySchema: z.ZodObject<{
212
- limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
213
- cursor: z.ZodOptional<z.ZodString>;
214
- requestId: z.ZodOptional<z.ZodString>;
215
- handlerName: z.ZodOptional<z.ZodString>;
216
- }, z.core.$strict>;
217
- export type ExecutionLogListQuery = z.infer<typeof executionLogListQuerySchema>;
218
- export declare const executionLogListResponseSchema: z.ZodObject<{
219
- data: z.ZodArray<z.ZodObject<{
220
- id: z.ZodString;
221
- timestamp: z.ZodString;
222
- level: z.ZodEnum<{
223
- info: "info";
224
- error: "error";
225
- debug: "debug";
226
- warn: "warn";
227
- }>;
228
- requestId: z.ZodNullable<z.ZodString>;
229
- versionId: z.ZodNullable<z.ZodString>;
230
- handlerName: z.ZodNullable<z.ZodString>;
231
- message: z.ZodString;
232
- metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
233
- }, z.core.$strict>>;
234
- pagination: z.ZodObject<{
235
- nextCursor: z.ZodNullable<z.ZodString>;
236
- }, z.core.$strict>;
237
- }, z.core.$strict>;
238
- export type ExecutionLogListResponse = z.infer<typeof executionLogListResponseSchema>;
@@ -14,17 +14,16 @@ import { z } from "zod";
14
14
  * as well ourselves.
15
15
  *
16
16
  * The only surface both can host is an endpoint that touches neither the
17
- * database nor the caller's identity — see `endpointIsPortable`. That is the
18
- * portable seam, and it is deliberately narrow: a capsule handler's semantics
19
- * depend on the transaction wrapped around it, which does not exist on an
20
- * isolate a continent away from the database.
21
- */
22
- /**
23
- * What a live version runs. `static` is bytes on disk with no execution at
24
- * all, and remains the overwhelming majority of traffic; the other two each
25
- * name a product.
17
+ * database, the caller's identity, nor realtime — see `endpointIsPortable`.
18
+ * That is the portable seam, and it is deliberately narrow: a capsule
19
+ * handler's semantics depend on the transaction wrapped around it, which does
20
+ * not exist on an isolate a continent away from the database.
21
+ *
22
+ * Neither is a "kind" a space declares. Every space owns a site, so what runs
23
+ * is a routing decision derived from what the published tree carries: static
24
+ * files, a worker, a capsule, or any mix of the three in one publish. There is
25
+ * no enum here to disagree with the tree.
26
26
  */
27
- export const runtimeKindSchema = z.enum(["static", "zero", "functions"]);
28
27
  /**
29
28
  * How a live runtime delivers realtime invalidations.
30
29
  *
@@ -50,6 +49,7 @@ export const EXECUTION_ENV_TOTAL_VALUE_MAX_BYTES = 64 * 1024;
50
49
  export const SERVER_ENV_FILE = ".env.server";
51
50
  /** Lakebed's documented server-only env filename, accepted for capsule portability. */
52
51
  export const LAKEBED_SERVER_ENV_FILE = ".env.lakebed.server";
52
+ export const SERVER_ENV_FILES = [SERVER_ENV_FILE, LAKEBED_SERVER_ENV_FILE];
53
53
  /**
54
54
  * Names the platform reserves for itself in the tenant environment. Tenant
55
55
  * code cannot set these, so it cannot spoof the values the broker trusts.
@@ -187,25 +187,57 @@ export const executionCapabilitiesSchema = z
187
187
  env: z.boolean().default(false),
188
188
  realtime: z.boolean().default(false),
189
189
  logging: z.boolean().default(false),
190
+ gravatar: z.boolean().default(false),
191
+ spam: z.boolean().default(false),
192
+ email: z.boolean().default(false),
190
193
  })
191
194
  .partial()
192
195
  .default({});
196
+ /**
197
+ * The order every surface renders a capability list in. Fixed rather than
198
+ * derived from a response body, so two spaces never list their capabilities
199
+ * differently because JSON came back reshuffled — and declared here, beside the
200
+ * schema, so adding a capability cannot leave a renderer silently omitting it.
201
+ */
202
+ export const EXECUTION_CAPABILITY_ORDER = [
203
+ "db",
204
+ "fetch",
205
+ "auth",
206
+ "env",
207
+ "realtime",
208
+ "logging",
209
+ "gravatar",
210
+ "spam",
211
+ "email",
212
+ ];
213
+ // A capability added to executionCapabilitiesSchema must also be added to the order above.
214
+ true;
193
215
  /**
194
216
  * The portable seam, stated as one predicate.
195
217
  *
196
- * `db` and `auth` are the two capabilities that bind a handler to the local
197
- * tier. `db` because Zero's store guarantees every handler runs inside one
198
- * parent-owned transaction, which an isolate reaching the database over a
199
- * relay cannot offer. `auth` because capsule identity is resolved against that
200
- * same transaction's view. Everything else fetch, env, realtime, logging —
201
- * is brokered identically on both tiers and does not constrain placement.
218
+ * `db`, `auth` and `realtime` are the three capabilities that bind a handler
219
+ * to the local tier. `db` because Zero's store guarantees every handler runs
220
+ * inside one parent-owned transaction, which an isolate reaching the database
221
+ * over a relay cannot offer. `auth` because capsule identity is resolved
222
+ * against that same transaction's view. `realtime` because invalidations are
223
+ * emitted by the native runner beside the store, and the Functions grant
224
+ * vocabulary has no counterpart for them — a worker declaring the capability
225
+ * would fail closed at the relay with nothing to reach. Everything else —
226
+ * fetch, env, logging, and the three platform services — is brokered
227
+ * identically on both tiers and does not constrain placement.
228
+ *
229
+ * `email` is the one worth stating explicitly, because it looks like it should
230
+ * bind: a Zero mutation's send is atomic with its database writes, and a
231
+ * Function's is not. That is a difference in the *guarantee* either tier can
232
+ * offer, not in what the handler is allowed to reach, and placement follows
233
+ * what code reaches. An author who needs that atomicity writes a capsule.
202
234
  *
203
235
  * Nothing here decides placement automatically: the product a version deploys
204
236
  * to is a property of what its author wrote, and this predicate only reports
205
237
  * whether the code could also have run on the other tier.
206
238
  */
207
239
  export function endpointIsPortable(capabilities) {
208
- return capabilities.db !== true && capabilities.auth !== true;
240
+ return capabilities.db !== true && capabilities.auth !== true && capabilities.realtime !== true;
209
241
  }
210
242
  /**
211
243
  * A source-carrying handler, before it is compiled to whichever tier will run
@@ -248,6 +280,7 @@ export function executionBundleSchema(options) {
248
280
  .strict();
249
281
  }
250
282
  export function executionStaticFileSchema(options) {
283
+ const platformAssetPrefix = options.platformAssetRoot ? `${options.platformAssetRoot}/` : null;
251
284
  return z
252
285
  .object({
253
286
  path: z
@@ -260,7 +293,9 @@ export function executionStaticFileSchema(options) {
260
293
  .refine((path) => !path.startsWith(`${options.storageRoot}/`), {
261
294
  message: `Static files cannot use ${options.storageRoot}.`,
262
295
  })
263
- .refine((path) => !path.startsWith("_") && !path.startsWith("."), {
296
+ .refine((path) => (!path.startsWith("_") ||
297
+ (platformAssetPrefix !== null && path.startsWith(platformAssetPrefix))) &&
298
+ !path.startsWith("."), {
264
299
  message: "Static file paths cannot use private root prefixes.",
265
300
  }),
266
301
  contentType: z.string().min(1).max(255),
@@ -276,34 +311,3 @@ export function executionStaticFileSchema(options) {
276
311
  * the same question on each.
277
312
  */
278
313
  export const executionInspectPolicySchema = z.enum(["private", "public"]);
279
- export const executionLogEntrySchema = z
280
- .object({
281
- id: z.string().min(1),
282
- timestamp: z.string().datetime(),
283
- level: z.enum(["debug", "info", "warn", "error"]),
284
- requestId: z.string().min(1).nullable(),
285
- versionId: z.string().min(1).nullable(),
286
- /** Zero names the mutation; Functions names the handler. */
287
- handlerName: z.string().min(1).nullable(),
288
- message: z.string(),
289
- metadata: z.record(z.string(), z.unknown()).default({}),
290
- })
291
- .strict();
292
- export const executionLogListQuerySchema = z
293
- .object({
294
- limit: z.coerce.number().int().min(1).max(100).default(50),
295
- cursor: z.string().min(1).optional(),
296
- requestId: z.string().min(1).optional(),
297
- handlerName: z.string().min(1).optional(),
298
- })
299
- .strict();
300
- export const executionLogListResponseSchema = z
301
- .object({
302
- data: z.array(executionLogEntrySchema),
303
- pagination: z
304
- .object({
305
- nextCursor: z.string().nullable(),
306
- })
307
- .strict(),
308
- })
309
- .strict();
@@ -1,9 +1,5 @@
1
1
  export declare const FEATURE_STAGES: readonly ["internal", "private_beta", "ga"];
2
2
  export type FeatureStage = (typeof FEATURE_STAGES)[number];
3
- export declare const FEATURE_ASSIGNMENT_SCOPES: readonly ["user", "team", "global"];
4
- export type FeatureAssignmentScope = (typeof FEATURE_ASSIGNMENT_SCOPES)[number];
5
- export declare const FEATURE_EXECUTION_ACTOR_POLICIES: readonly ["request_actor", "persisted_request_actor", "resource_team", "global_policy"];
6
- export type FeatureExecutionActorPolicy = (typeof FEATURE_EXECUTION_ACTOR_POLICIES)[number];
7
3
  export declare const FEATURE_OWNER_IDS: readonly ["team:access", "team:build-platform", "team:collaboration", "team:commerce", "team:domains", "team:publishing", "team:runtime", "team:spaces", "team:tag-manager", "team:zero"];
8
4
  export type FeatureOwnerId = (typeof FEATURE_OWNER_IDS)[number];
9
5
  export type FeatureRegistryEntry<K extends string = string, DependencyKey extends string = K> = {
@@ -14,7 +10,6 @@ export type FeatureRegistryEntry<K extends string = string, DependencyKey extend
14
10
  readonly stage: FeatureStage;
15
11
  readonly surface: boolean;
16
12
  readonly defaultEnabled: boolean;
17
- readonly assignmentScopes: readonly FeatureAssignmentScope[];
18
13
  readonly docs: {
19
14
  readonly channel: "public" | "handbook";
20
15
  readonly slug: string;
@@ -26,7 +21,6 @@ export type FeatureRegistryEntry<K extends string = string, DependencyKey extend
26
21
  readonly reviewAfter: string | null;
27
22
  readonly removeAfter: string | null;
28
23
  readonly gaAt: string | null;
29
- readonly allowedActorPolicies: readonly FeatureExecutionActorPolicy[];
30
24
  readonly downRamp: {
31
25
  readonly code: string;
32
26
  readonly summary: string;