@spacefast/common 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. package/README.md +42 -0
  2. package/dist/brand.d.ts +15 -0
  3. package/dist/brand.js +24 -0
  4. package/dist/config/domains.d.ts +30 -0
  5. package/dist/config/domains.js +75 -0
  6. package/dist/config/index.d.ts +1 -0
  7. package/dist/config/index.js +3 -0
  8. package/dist/contracts/abuse.d.ts +93 -0
  9. package/dist/contracts/abuse.js +50 -0
  10. package/dist/contracts/access.d.ts +409 -0
  11. package/dist/contracts/access.js +396 -0
  12. package/dist/contracts/account.d.ts +28 -0
  13. package/dist/contracts/account.js +54 -0
  14. package/dist/contracts/activity.d.ts +118 -0
  15. package/dist/contracts/activity.js +180 -0
  16. package/dist/contracts/analytics.d.ts +56 -0
  17. package/dist/contracts/analytics.js +91 -0
  18. package/dist/contracts/annotations.d.ts +327 -0
  19. package/dist/contracts/annotations.js +234 -0
  20. package/dist/contracts/api-keys.d.ts +517 -0
  21. package/dist/contracts/api-keys.js +235 -0
  22. package/dist/contracts/archives.d.ts +332 -0
  23. package/dist/contracts/archives.js +120 -0
  24. package/dist/contracts/auth.d.ts +86 -0
  25. package/dist/contracts/auth.js +82 -0
  26. package/dist/contracts/beta.d.ts +106 -0
  27. package/dist/contracts/beta.js +104 -0
  28. package/dist/contracts/billing.d.ts +328 -0
  29. package/dist/contracts/billing.js +203 -0
  30. package/dist/contracts/builds.d.ts +504 -0
  31. package/dist/contracts/builds.js +248 -0
  32. package/dist/contracts/channels.d.ts +49 -0
  33. package/dist/contracts/channels.js +51 -0
  34. package/dist/contracts/common.d.ts +238 -0
  35. package/dist/contracts/common.js +175 -0
  36. package/dist/contracts/deployments.d.ts +574 -0
  37. package/dist/contracts/deployments.js +97 -0
  38. package/dist/contracts/device-auth.d.ts +194 -0
  39. package/dist/contracts/device-auth.js +162 -0
  40. package/dist/contracts/domains.d.ts +6115 -0
  41. package/dist/contracts/domains.js +1435 -0
  42. package/dist/contracts/enums.d.ts +196 -0
  43. package/dist/contracts/enums.js +211 -0
  44. package/dist/contracts/error-code-meta.d.ts +1560 -0
  45. package/dist/contracts/error-code-meta.js +400 -0
  46. package/dist/contracts/error-codes.d.ts +13 -0
  47. package/dist/contracts/error-codes.js +416 -0
  48. package/dist/contracts/events.d.ts +398 -0
  49. package/dist/contracts/events.js +320 -0
  50. package/dist/contracts/fast-domain-search.d.ts +19 -0
  51. package/dist/contracts/fast-domain-search.js +22 -0
  52. package/dist/contracts/features.d.ts +240 -0
  53. package/dist/contracts/features.js +406 -0
  54. package/dist/contracts/git.d.ts +288 -0
  55. package/dist/contracts/git.js +116 -0
  56. package/dist/contracts/ids.d.ts +35 -0
  57. package/dist/contracts/ids.js +45 -0
  58. package/dist/contracts/intercom.d.ts +6 -0
  59. package/dist/contracts/intercom.js +5 -0
  60. package/dist/contracts/internal.d.ts +103 -0
  61. package/dist/contracts/internal.js +92 -0
  62. package/dist/contracts/mcp.d.ts +788 -0
  63. package/dist/contracts/mcp.js +161 -0
  64. package/dist/contracts/me.d.ts +81 -0
  65. package/dist/contracts/me.js +104 -0
  66. package/dist/contracts/oauth-resources.d.ts +30 -0
  67. package/dist/contracts/oauth-resources.js +61 -0
  68. package/dist/contracts/operations.d.ts +54 -0
  69. package/dist/contracts/operations.js +14 -0
  70. package/dist/contracts/plan-policy.d.ts +85 -0
  71. package/dist/contracts/plan-policy.js +75 -0
  72. package/dist/contracts/platform.d.ts +359 -0
  73. package/dist/contracts/platform.js +216 -0
  74. package/dist/contracts/push-new.d.ts +156 -0
  75. package/dist/contracts/push-new.js +52 -0
  76. package/dist/contracts/quotas.d.ts +16 -0
  77. package/dist/contracts/quotas.js +36 -0
  78. package/dist/contracts/repository-connections.d.ts +231 -0
  79. package/dist/contracts/repository-connections.js +106 -0
  80. package/dist/contracts/resources.d.ts +529 -0
  81. package/dist/contracts/resources.js +209 -0
  82. package/dist/contracts/routes.d.ts +45 -0
  83. package/dist/contracts/routes.js +31 -0
  84. package/dist/contracts/runtime-api.d.ts +449 -0
  85. package/dist/contracts/runtime-api.js +513 -0
  86. package/dist/contracts/sites.d.ts +393 -0
  87. package/dist/contracts/sites.js +121 -0
  88. package/dist/contracts/slugs.d.ts +31 -0
  89. package/dist/contracts/slugs.js +47 -0
  90. package/dist/contracts/space-config.d.ts +216 -0
  91. package/dist/contracts/space-config.js +237 -0
  92. package/dist/contracts/space-theme.d.ts +25 -0
  93. package/dist/contracts/space-theme.js +49 -0
  94. package/dist/contracts/spaces.d.ts +2760 -0
  95. package/dist/contracts/spaces.js +589 -0
  96. package/dist/contracts/superadmin-activity.d.ts +205 -0
  97. package/dist/contracts/superadmin-activity.js +107 -0
  98. package/dist/contracts/superadmin-emails.d.ts +212 -0
  99. package/dist/contracts/superadmin-emails.js +112 -0
  100. package/dist/contracts/superadmin-queues.d.ts +414 -0
  101. package/dist/contracts/superadmin-queues.js +202 -0
  102. package/dist/contracts/superadmin-runtime.d.ts +27 -0
  103. package/dist/contracts/superadmin-runtime.js +38 -0
  104. package/dist/contracts/superadmin-spaces.d.ts +429 -0
  105. package/dist/contracts/superadmin-spaces.js +82 -0
  106. package/dist/contracts/superadmin-tenants.d.ts +180 -0
  107. package/dist/contracts/superadmin-tenants.js +117 -0
  108. package/dist/contracts/superadmin.d.ts +654 -0
  109. package/dist/contracts/superadmin.js +309 -0
  110. package/dist/contracts/tags.d.ts +1140 -0
  111. package/dist/contracts/tags.js +1050 -0
  112. package/dist/contracts/teams.d.ts +233 -0
  113. package/dist/contracts/teams.js +174 -0
  114. package/dist/contracts/telemetry.d.ts +2 -0
  115. package/dist/contracts/telemetry.js +1 -0
  116. package/dist/contracts/transfers.d.ts +105 -0
  117. package/dist/contracts/transfers.js +48 -0
  118. package/dist/contracts/variables.d.ts +189 -0
  119. package/dist/contracts/variables.js +82 -0
  120. package/dist/contracts/webhooks.d.ts +159 -0
  121. package/dist/contracts/webhooks.js +59 -0
  122. package/dist/contracts/zero.d.ts +1538 -0
  123. package/dist/contracts/zero.js +755 -0
  124. package/dist/docs/agent-prose.d.ts +35 -0
  125. package/dist/docs/agent-prose.js +153 -0
  126. package/dist/docs/agent-setup.d.ts +6 -0
  127. package/dist/docs/agent-setup.js +164 -0
  128. package/dist/docs/agent-solutions.d.ts +110 -0
  129. package/dist/docs/agent-solutions.js +181 -0
  130. package/dist/docs/error-docs.d.ts +12 -0
  131. package/dist/docs/error-docs.js +1601 -0
  132. package/dist/docs/skill-distribution.d.ts +12 -0
  133. package/dist/docs/skill-distribution.js +18 -0
  134. package/dist/domain-exploration.d.ts +108 -0
  135. package/dist/domain-exploration.js +488 -0
  136. package/dist/domain-normalize.d.ts +1 -0
  137. package/dist/domain-normalize.js +14 -0
  138. package/dist/domain-zones.d.ts +1 -0
  139. package/dist/domain-zones.js +5272 -0
  140. package/dist/index.d.ts +1 -0
  141. package/dist/index.js +1 -0
  142. package/dist/utils/access-policy.d.ts +39 -0
  143. package/dist/utils/access-policy.js +232 -0
  144. package/dist/utils/api.d.ts +4 -0
  145. package/dist/utils/api.js +13 -0
  146. package/dist/utils/auth-redirect.d.ts +1 -0
  147. package/dist/utils/auth-redirect.js +48 -0
  148. package/dist/utils/auth.d.ts +5 -0
  149. package/dist/utils/auth.js +13 -0
  150. package/dist/utils/build-settings.d.ts +49 -0
  151. package/dist/utils/build-settings.js +366 -0
  152. package/dist/utils/claim-token.d.ts +1 -0
  153. package/dist/utils/claim-token.js +9 -0
  154. package/dist/utils/collections.d.ts +1 -0
  155. package/dist/utils/collections.js +5 -0
  156. package/dist/utils/concurrency.d.ts +1 -0
  157. package/dist/utils/concurrency.js +18 -0
  158. package/dist/utils/content-type.d.ts +10 -0
  159. package/dist/utils/content-type.js +145 -0
  160. package/dist/utils/error-display.d.ts +7 -0
  161. package/dist/utils/error-display.js +42 -0
  162. package/dist/utils/error.d.ts +1 -0
  163. package/dist/utils/error.js +3 -0
  164. package/dist/utils/generate-space-name.d.ts +14 -0
  165. package/dist/utils/generate-space-name.js +95 -0
  166. package/dist/utils/git-repository.d.ts +5 -0
  167. package/dist/utils/git-repository.js +99 -0
  168. package/dist/utils/guards.d.ts +1 -0
  169. package/dist/utils/guards.js +3 -0
  170. package/dist/utils/publish-detection.d.ts +10 -0
  171. package/dist/utils/publish-detection.js +118 -0
  172. package/dist/utils/publish-policy.d.ts +69 -0
  173. package/dist/utils/publish-policy.js +429 -0
  174. package/dist/utils/query-client.d.ts +7 -0
  175. package/dist/utils/query-client.js +21 -0
  176. package/dist/utils/query-keys.d.ts +75 -0
  177. package/dist/utils/query-keys.js +78 -0
  178. package/dist/utils/runtime-paths.d.ts +7 -0
  179. package/dist/utils/runtime-paths.js +28 -0
  180. package/dist/utils/runtime-upload.d.ts +19 -0
  181. package/dist/utils/runtime-upload.js +27 -0
  182. package/dist/utils/slug.d.ts +5 -0
  183. package/dist/utils/slug.js +13 -0
  184. package/dist/utils/space-config.d.ts +75 -0
  185. package/dist/utils/space-config.js +415 -0
  186. package/dist/utils/space-theme.d.ts +16 -0
  187. package/dist/utils/space-theme.js +89 -0
  188. package/dist/utils/static-runtime-policy.d.ts +17 -0
  189. package/dist/utils/static-runtime-policy.js +103 -0
  190. package/dist/utils/upload-session.d.ts +34 -0
  191. package/dist/utils/upload-session.js +69 -0
  192. package/dist/utils/urls.d.ts +2 -0
  193. package/dist/utils/urls.js +7 -0
  194. package/dist/utils/version-path.d.ts +6 -0
  195. package/dist/utils/version-path.js +51 -0
  196. package/dist/utils/wpcom-auth-redirects.d.ts +14 -0
  197. package/dist/utils/wpcom-auth-redirects.js +49 -0
  198. package/dist/utils/zero-realtime-signature.d.ts +12 -0
  199. package/dist/utils/zero-realtime-signature.js +45 -0
  200. package/dist/vocabulary.d.ts +230 -0
  201. package/dist/vocabulary.js +218 -0
  202. package/package.json +58 -0
@@ -0,0 +1,1601 @@
1
+ // Error reference content (internal-docs/platform.md "Global API Conventions"):
2
+ // every error envelope `docsUrl` points at `https://spacefast.com/docs/errors/{code}`,
3
+ // and those pages are GENERATED from this table — one entry per member of
4
+ // `ERROR_CODES`, asserted complete by the conformance suite so links never rot
5
+ // and pages never go missing. apps/www renders the HTML pages and writes the
6
+ // `.md` twins from the same entries.
7
+ import { BRAND } from "../brand.js";
8
+ import { ERROR_CODES, errorDocsUrl } from "../contracts/error-codes.js";
9
+ export const ERROR_DOCS = {
10
+ abuse_report_invalid_transition: {
11
+ summary: "The abuse report cannot move to the requested status from its current status.",
12
+ fix: "Fetch the report to see its current status and apply a valid transition.",
13
+ },
14
+ account_suspended: {
15
+ summary: "This account is suspended for a policy or abuse violation and cannot be used.",
16
+ fix: "Contact support to review the suspension if you believe it is a mistake.",
17
+ },
18
+ abuse_report_rate_limited: {
19
+ summary: "Too many abuse reports were submitted from this client in a short window.",
20
+ fix: "Wait for the window in the Retry-After header to pass before reporting again.",
21
+ },
22
+ abuse_takedown: {
23
+ summary: "This space was disabled by an abuse takedown and cannot be served or modified.",
24
+ fix: "If you believe this is a mistake, contact support with the space id.",
25
+ },
26
+ access_denied: {
27
+ summary: "The authorization request was denied by the user.",
28
+ fix: "Restart the login flow and approve the request to continue.",
29
+ },
30
+ ambiguous_space_slug: {
31
+ summary: "The slug matches spaces in more than one of your teams, so it cannot be resolved.",
32
+ fix: "Pass a teamRef alongside the slug, or reference the space by its spc_ id.",
33
+ },
34
+ anonymous_expired: {
35
+ summary: "This anonymous space expired before it was claimed.",
36
+ fix: "Publish again to get a fresh space, or claim spaces before their expiry next time.",
37
+ },
38
+ anonymous_pool_unavailable: {
39
+ summary: "No pooled capacity is available for anonymous publishes right now.",
40
+ fix: "Retry shortly; capacity replenishes automatically.",
41
+ },
42
+ anonymous_publish_rate_limited: {
43
+ summary: "Too many anonymous publishes came from this network in a short window.",
44
+ fix: "Wait for the window to pass, or sign in with an API key for higher limits.",
45
+ },
46
+ archive_body_required: {
47
+ summary: "This request must carry an archive body but none was provided.",
48
+ fix: "Send the zip bytes as the request body with the matching content-type header.",
49
+ },
50
+ archive_too_large: {
51
+ summary: "The uploaded archive exceeds the maximum allowed size.",
52
+ fix: "Reduce the archive size or upload files individually through a version upload session.",
53
+ },
54
+ auth_code_required: {
55
+ summary: "An authorization code is required to complete this step.",
56
+ fix: "Pass the code returned by the authorization step.",
57
+ },
58
+ authorization_pending: {
59
+ summary: "The device login has not been approved yet.",
60
+ fix: "Keep polling at the advised interval until the user approves the request.",
61
+ },
62
+ billing_receipt_invalid: {
63
+ summary: "The store receipt or notification could not be verified with the payment provider.",
64
+ fix: "Re-check the transaction id or purchase token and retry; contact support if it persists.",
65
+ },
66
+ billing_receipt_not_bound_to_team: {
67
+ summary: "The store purchase was made under a different account token than this team's.",
68
+ fix: "Verify the purchase from the team that initiated it, or contact support to rebind it.",
69
+ },
70
+ billing_store_not_configured: {
71
+ summary: "App Store or Google Play billing is not configured on this deployment.",
72
+ fix: "Use another billing method, or configure the store credentials on the server.",
73
+ },
74
+ billing_subscription_conflict: {
75
+ summary: "The team already has an active subscription with another payment provider.",
76
+ fix: "Cancel the existing subscription before subscribing through a different provider.",
77
+ },
78
+ billing_unknown_product: {
79
+ summary: "The purchased store product does not map to any plan sold by this deployment.",
80
+ fix: "Check the product id against the store catalog returned by the billing endpoints.",
81
+ },
82
+ build_command_missing: {
83
+ summary: "A build or install command could not be found during the build run.",
84
+ fix: "Check the command spelling and ensure its tool is declared in package.json or available in the build image.",
85
+ },
86
+ build_execution_unavailable: {
87
+ summary: "Build execution is not available on this deployment.",
88
+ fix: "Publish prebuilt static output instead, or wait for builds to become available.",
89
+ },
90
+ build_failed: {
91
+ summary: "The build run failed before producing a version.",
92
+ fix: "Inspect the build logs, fix the failure, and start a new build.",
93
+ },
94
+ build_install_failed: {
95
+ summary: "The dependency install step failed during the build run.",
96
+ fix: "Inspect the build logs for the install error, fix the lockfile or install command, and start a new build.",
97
+ },
98
+ build_no_index_html: {
99
+ summary: "The build produced output but no index.html at the site root.",
100
+ fix: "Make sure your build writes an index.html to the output directory, or point the output directory at the folder that contains it.",
101
+ },
102
+ build_not_created: {
103
+ summary: "The build could not be created.",
104
+ fix: "Verify the build request payload and retry.",
105
+ },
106
+ build_oom: {
107
+ summary: "The build process was killed, most likely after running out of memory.",
108
+ fix: "Reduce the build's memory usage or concurrency, then start a new build.",
109
+ },
110
+ build_output_dir_missing: {
111
+ summary: "The build finished but its output directory was not produced.",
112
+ fix: "Point the output directory setting at the folder your build writes (for example dist, build, out, or public).",
113
+ },
114
+ build_timeout: {
115
+ summary: "The build exceeded its time limit before producing a version.",
116
+ fix: "Speed up the build or raise the build timeout in the build settings, then start a new build.",
117
+ },
118
+ cache_purge_domain_required: {
119
+ summary: "A purge request must name the domain to purge.",
120
+ fix: "Pass the domain to purge in the request.",
121
+ },
122
+ cache_purge_path_required: {
123
+ summary: "A purge request must name at least one path.",
124
+ fix: "Pass one or more request paths to purge.",
125
+ },
126
+ channel_name_reserved: {
127
+ summary: "The channel name collides with a reserved hostname suffix and cannot be used.",
128
+ fix: "Choose a different channel name; v-prefixed numeric names and ver- prefixes are reserved.",
129
+ },
130
+ channel_pointer_moved: {
131
+ summary: "The channel was promoted to a different version since you read it.",
132
+ fix: "Re-read the channel pointer and retry the promote with the current version id.",
133
+ },
134
+ channel_unsupported: {
135
+ summary: "This space does not support the requested channel.",
136
+ fix: "Use the live channel, or create the channel before promoting to it.",
137
+ },
138
+ claim_blocked_takedown: {
139
+ summary: "This space is under an abuse takedown and cannot be claimed.",
140
+ fix: "Contact support if you believe the takedown is a mistake.",
141
+ },
142
+ claim_target_not_found: {
143
+ summary: "The team or account to claim the space into was not found.",
144
+ fix: "Verify the claim target and that your credential can act for it.",
145
+ },
146
+ claimed_space_quota_exceeded: {
147
+ summary: "Claiming this space would exceed the target team's space quota.",
148
+ fix: "Delete unused spaces or upgrade the plan, then claim again.",
149
+ },
150
+ cli_upgrade_required: {
151
+ summary: "This CLI version is too old to talk to the API safely.",
152
+ fix: "Upgrade the CLI to the latest release and retry.",
153
+ },
154
+ config_file_too_large: {
155
+ summary: "The sf.jsonc configuration file exceeds the maximum size.",
156
+ fix: "Keep the configuration file under the documented size limit (256 KB).",
157
+ },
158
+ config_invalid: {
159
+ summary: "The space configuration failed validation.",
160
+ fix: "Fix the reported fields against the published schema at /schemas/sf.json.",
161
+ },
162
+ config_meta_too_long: {
163
+ summary: "A meta field in the space configuration exceeds its maximum length.",
164
+ fix: "Shorten the meta title, description, or other reported field.",
165
+ },
166
+ config_templates_over_limit: {
167
+ summary: "The configuration declares more template files than the plan allows.",
168
+ fix: "Reduce the number of template entries in sf.jsonc.",
169
+ },
170
+ credential_expired: {
171
+ summary: "The credential used for this request has expired.",
172
+ fix: "Create a new API key or sign in again.",
173
+ },
174
+ credential_not_yet_valid: {
175
+ summary: "The credential is not valid yet because its start time is in the future.",
176
+ fix: "Wait until the credential's notBefore time, or adjust it.",
177
+ },
178
+ credential_retired: {
179
+ summary: "This request used a retired Spacefast token format or authentication header.",
180
+ fix: "Run sf login again and send the new sfa_ key as Authorization: Bearer.",
181
+ },
182
+ credential_revoked: {
183
+ summary: "The credential used for this request was revoked.",
184
+ fix: "Create a new API key and update your client.",
185
+ },
186
+ csam_blocked: {
187
+ summary: "The content was blocked because it matched known child sexual abuse material.",
188
+ fix: "This action is final and reported as required by law; do not retry.",
189
+ },
190
+ csam_policy_floor: {
191
+ summary: "CSAM enforcement policy cannot be set below the mandatory account-suspend floor.",
192
+ fix: "Set the CSAM category enforcement tier to account suspension.",
193
+ },
194
+ data_location_immutable: {
195
+ summary: "A space's data location cannot be changed after placement.",
196
+ fix: "Create a new space in the desired region and transfer content into it.",
197
+ },
198
+ device_authorization_failed: {
199
+ summary: "The device login request failed and cannot be completed.",
200
+ fix: "Start a new device login flow.",
201
+ },
202
+ device_verification_rate_limited: {
203
+ summary: "Too many incorrect device codes were entered in a short window.",
204
+ fix: "Wait for the lockout to pass, then enter the code shown by your CLI exactly.",
205
+ },
206
+ dns_export_required: {
207
+ summary: "This operation requires exporting the current DNS records first.",
208
+ fix: "Export the zone, confirm the snapshot, and retry the operation.",
209
+ },
210
+ dns_field_conflict: {
211
+ summary: "Two DNS fields cannot be used together for this provider or record type.",
212
+ fix: "Follow the capability rule in the error details and submit only the compatible fields.",
213
+ },
214
+ dns_import_partial_visibility: {
215
+ summary: "The DNS import could not see the full zone, so importing would lose records.",
216
+ fix: "Verify delegation and retry once the full zone is visible.",
217
+ },
218
+ dns_provider_auth_expired: {
219
+ summary: "The connected DNS provider authorization expired or was revoked.",
220
+ fix: "Reconnect the provider account for the affected connection, refresh the zone, then retry the DNS operation.",
221
+ },
222
+ dns_provider_batch_unsupported: {
223
+ summary: "The connected DNS provider cannot apply this batch with the required semantics.",
224
+ fix: "Split the change or use a provider/zone that supports atomic batch writes.",
225
+ },
226
+ dns_provider_change_pending: {
227
+ summary: "The DNS provider accepted the change but propagation or provider completion is still pending.",
228
+ fix: "Wait and re-check the pollable DNS operation before submitting another conflicting change.",
229
+ },
230
+ dns_provider_connection_in_use: {
231
+ summary: "The DNS provider connection is still attached to one or more zones.",
232
+ fix: "Detach or migrate attached zones before revoking the connection.",
233
+ },
234
+ dns_provider_connection_unavailable: {
235
+ summary: "The DNS provider connection cannot currently be used.",
236
+ fix: "Reconnect, re-enable, or replace the provider connection before retrying.",
237
+ },
238
+ dns_provider_conflict: {
239
+ summary: "The DNS provider rejected the change because it conflicts with existing provider state.",
240
+ fix: "Refresh the provider snapshot, resolve the conflicting record or setting, and retry.",
241
+ },
242
+ dns_provider_controlled_desired_state: {
243
+ summary: "This DNS provider is controlled through desired-state templates instead of direct record edits.",
244
+ fix: "Use the provider workflow template or primary-domain action for this provider-managed zone.",
245
+ },
246
+ dns_provider_credentials_expired: {
247
+ summary: "The DNS provider credentials have expired or were revoked.",
248
+ fix: "Reconnect the provider account or replace the API token.",
249
+ },
250
+ dns_provider_feature_descriptors: {
251
+ summary: "This provider exposes domain features through capability descriptors.",
252
+ fix: "Render and run the advertised feature action instead of assuming a raw DNS record change.",
253
+ },
254
+ dns_provider_feature_unavailable: {
255
+ summary: "The requested DNS provider field or feature is not available for this zone.",
256
+ fix: "Check the DNS capabilities response and remove unsupported fields.",
257
+ },
258
+ dns_provider_field_unsupported: {
259
+ summary: "The DNS provider does not support one of the requested record fields.",
260
+ fix: "Remove the unsupported field or switch to a provider and plan whose capabilities allow it.",
261
+ },
262
+ dns_provider_future_authoritative_backend: {
263
+ summary: `This domain uses a future ${BRAND.productName} authoritative DNS backend adapter.`,
264
+ fix: "Use the provider-neutral DNS endpoints and rely on the advertised capabilities for supported actions.",
265
+ },
266
+ dns_field_not_applicable: {
267
+ summary: "The DNS field is not writable for this provider, record type, or management mode.",
268
+ fix: "Check the DNS capabilities response and remove fields that are not creatable or patchable.",
269
+ },
270
+ dns_provider_missing_permission: {
271
+ summary: "The connected DNS provider account lacks the required permission.",
272
+ fix: "Reconnect with the required scope or use a provider credential that can edit this zone.",
273
+ },
274
+ dns_provider_not_connected: {
275
+ summary: "This domain has no connected DNS provider zone.",
276
+ fix: `Attach a provider zone or move the domain to ${BRAND.productName}-managed DNS before retrying.`,
277
+ },
278
+ dns_provider_operation_failed: {
279
+ summary: "The DNS provider operation failed before the requested change was accepted.",
280
+ fix: "Open the DNS operation details, follow its diagnostics, and retry only after the failing cause is resolved.",
281
+ },
282
+ dns_provider_permission_denied: {
283
+ summary: "The connected DNS provider denied permission for this zone or action.",
284
+ fix: "Grant DNS edit access for this zone, reconnect with broader scopes, or connect a different provider account.",
285
+ },
286
+ dns_provider_rate_limited: {
287
+ summary: "The DNS provider rate-limited the requested operation.",
288
+ fix: "Wait for the retry window in the error details, then retry.",
289
+ },
290
+ dns_provider_replace_all_requires_fresh_plan: {
291
+ summary: "This provider requires a fresh full-zone plan before replacing DNS records.",
292
+ fix: "Refresh the provider snapshot, review the replace-all plan, then run the action from that fresh plan.",
293
+ },
294
+ dns_provider_replace_all_write_strategy: {
295
+ summary: "This provider applies DNS changes with a replace-all write strategy.",
296
+ fix: "Review the full-zone diff carefully so unrelated MX, TXT, CAA, NS, and wildcard records are preserved.",
297
+ },
298
+ dns_provider_snapshot_stale: {
299
+ summary: "The cached DNS provider snapshot is stale.",
300
+ fix: "Refresh the provider snapshot, review the new diff, and retry the change against the latest record ids.",
301
+ },
302
+ dns_provider_snapshot_unavailable: {
303
+ summary: `${BRAND.productName} could not cache the latest DNS provider snapshot.`,
304
+ fix: "Retry refresh after the cache or provider recovers; do not edit connected-provider records from stale data.",
305
+ },
306
+ dns_provider_temporarily_unavailable: {
307
+ summary: "The DNS provider is rate-limited, degraded, or temporarily unavailable.",
308
+ fix: "Wait for the retry time in the error details or operation receipt, then retry the DNS operation.",
309
+ },
310
+ dns_provider_timeout: {
311
+ summary: "The DNS provider did not accept the change within the bounded wait.",
312
+ fix: "Check the operation status before retrying to avoid duplicate changes.",
313
+ },
314
+ dns_provider_validation_failed: {
315
+ summary: "The DNS provider rejected the submitted record data.",
316
+ fix: "Use the field details and provider message to correct the record.",
317
+ },
318
+ dns_provider_workflow_templates: {
319
+ summary: "This provider exposes setup through workflow templates instead of low-level DNS edits.",
320
+ fix: "Preview and run the advertised template so provider-specific side effects and receipts are captured.",
321
+ },
322
+ dns_provider_zone_not_found: {
323
+ summary: "The connected DNS provider zone could not be found.",
324
+ fix: "Refresh the provider account, reattach the zone, or reconnect the provider.",
325
+ },
326
+ dns_record_conflicts_with_managed: {
327
+ summary: `The DNS change conflicts with a record ${BRAND.productName} manages for this domain.`,
328
+ fix: "Remove or adjust the conflicting record; managed records cannot be overridden.",
329
+ },
330
+ dns_record_managed: {
331
+ summary: `This DNS record is managed by ${BRAND.productName} and cannot be edited directly.`,
332
+ fix: "Change the binding or feature that owns the record instead of editing it.",
333
+ },
334
+ dns_record_not_found: {
335
+ summary: "The DNS record was not found in this zone.",
336
+ fix: "List the zone's records to confirm the record id.",
337
+ },
338
+ domain_already_exists: {
339
+ summary: "This domain is already present in your inventory.",
340
+ fix: "Use the existing domain record instead of adding it again.",
341
+ },
342
+ domain_bound: {
343
+ summary: "The domain is currently bound to a space, which blocks this operation.",
344
+ fix: "Remove the domain's bindings first, then retry.",
345
+ },
346
+ domain_facet_already_managed: {
347
+ summary: `This facet of the domain is already managed by ${BRAND.productName}.`,
348
+ fix: "No action is needed; the facet is already active.",
349
+ },
350
+ domain_facet_external: {
351
+ summary: `This facet of the domain is managed outside ${BRAND.productName}.`,
352
+ fix: `Manage that facet at its external provider, or move it to ${BRAND.productName} first.`,
353
+ },
354
+ domain_facet_not_applicable: {
355
+ summary: "The requested facet does not apply to this domain.",
356
+ fix: "Check the domain's facets and use one that applies.",
357
+ },
358
+ domain_hostname_site_mismatch: {
359
+ summary: "All bindings of one hostname must point at spaces on the same underlying site.",
360
+ fix: "Bind the hostname to spaces on the same site, or remove the conflicting binding.",
361
+ },
362
+ domain_in_use: {
363
+ summary: "The domain is in use by another binding or assignment.",
364
+ fix: "Remove the existing use of the domain before retrying.",
365
+ },
366
+ domain_lookup_rate_limited: {
367
+ summary: "Too many domain lookups were made in a short window.",
368
+ fix: "Wait for the window in the Retry-After header to pass before searching again.",
369
+ },
370
+ domain_not_bound: {
371
+ summary: "The domain is not bound to this space.",
372
+ fix: "Bind the domain to the space first.",
373
+ },
374
+ domain_quota_exceeded: {
375
+ summary: "Adding this domain would exceed the plan's external domain allowance.",
376
+ fix: "Remove unused domains or upgrade the plan.",
377
+ },
378
+ domain_registration_active: {
379
+ summary: "The domain has an active registration, which blocks this operation.",
380
+ fix: "Wait for or cancel the registration before retrying.",
381
+ },
382
+ domain_registration_not_renewable: {
383
+ summary: "The domain registration cannot be renewed right now.",
384
+ fix: "Check the registration status and renewal window for the domain.",
385
+ },
386
+ domain_reserved_suffix: {
387
+ summary: `The hostname is under a ${BRAND.productName}-managed suffix and cannot be added as a domain.`,
388
+ fix: `Use a domain you own; ${BRAND.productName} default and management hostnames are assigned automatically.`,
389
+ },
390
+ domain_transfer_active: {
391
+ summary: "The domain has a transfer in progress, which blocks this operation.",
392
+ fix: "Wait for the transfer to finish or cancel it before retrying.",
393
+ },
394
+ domain_wildcard_label: {
395
+ summary: "The hostname uses a wildcard label in a position that is not allowed.",
396
+ fix: "Use a single leading wildcard (*.example.com) or a concrete hostname.",
397
+ },
398
+ domain_wildcard_not_enabled: {
399
+ summary: "Wildcard hostnames are not enabled for this domain or plan.",
400
+ fix: "Bind concrete hostnames, or enable wildcard support for the domain.",
401
+ },
402
+ download_required: {
403
+ summary: "This content is too large to return inline and must be downloaded.",
404
+ fix: "Use the download endpoint referenced in the error details.",
405
+ },
406
+ duplicate_version_path: {
407
+ summary: "The version upload declares the same file path twice.",
408
+ fix: "Deduplicate the file list so every path appears once.",
409
+ },
410
+ expired_token: {
411
+ summary: "The token has expired.",
412
+ fix: "Request a new token and retry.",
413
+ },
414
+ export_archive_not_ready: {
415
+ summary: "The export archive is still being prepared.",
416
+ fix: "Poll the export until its status is ready, then download the archive.",
417
+ },
418
+ export_version_not_found: {
419
+ summary: "The version requested for export was not found.",
420
+ fix: "List the space's versions and export an existing version id.",
421
+ },
422
+ feature_unavailable: {
423
+ summary: "This feature is not available on this deployment or plan.",
424
+ fix: "Check the feature's availability, or upgrade if it is plan-gated.",
425
+ },
426
+ files_mode_does_not_support_spa: {
427
+ summary: "SPA fallback cannot be combined with files-listing mode.",
428
+ fix: "Remove the SPA fallback or serve the space as a site instead of a file listing.",
429
+ },
430
+ forbidden: {
431
+ summary: "The credential is valid but does not allow this action.",
432
+ fix: "Use a credential whose policy grants this action on this resource.",
433
+ },
434
+ free_external_proxy_disabled: {
435
+ summary: "Proxy routes to external upstreams are not available on the Free plan.",
436
+ fix: "Remove the proxy rules or upgrade the plan to enable external proxying.",
437
+ },
438
+ free_headers_basic_auth_disabled: {
439
+ summary: "Basic-Auth via _headers is not available on the Free plan.",
440
+ fix: "Use space password protection, or upgrade the plan for _headers Basic Auth.",
441
+ },
442
+ idempotency_conflict_in_progress: {
443
+ summary: "Another request with the same Idempotency-Key is still in flight.",
444
+ fix: "Wait for the original request to finish; its response will be replayed.",
445
+ },
446
+ idempotency_key_reused: {
447
+ summary: "The Idempotency-Key was reused with a different request body.",
448
+ fix: "Use a fresh key for new requests; keys bind to one exact request body.",
449
+ },
450
+ immutable_version_requires_login: {
451
+ summary: "This immutable version URL is past its public window and now requires login.",
452
+ fix: "Sign in to view it, or promote the version to a channel for public serving.",
453
+ },
454
+ import_archive_not_uploaded: {
455
+ summary: "The import has no uploaded archive yet.",
456
+ fix: "Upload the archive to the import's upload target, then finalize.",
457
+ },
458
+ import_not_cancelable: {
459
+ summary: "The import has progressed past the point where it can be canceled.",
460
+ fix: "Wait for the import to finish; completed imports can be deleted as versions.",
461
+ },
462
+ import_not_waiting_for_archive: {
463
+ summary: "The import is not waiting for an archive upload.",
464
+ fix: "Check the import status; the archive step may already be complete.",
465
+ },
466
+ incumbent_controls_dns: {
467
+ summary: "Another team controls this domain's DNS, so the operation is blocked.",
468
+ fix: "Prove control by completing domain verification, or coordinate with the incumbent.",
469
+ },
470
+ inject_invalid: {
471
+ summary: "The inject config key is malformed.",
472
+ fix: "Make inject an object whose head/bodyStart/bodyEnd/noscript entries are arrays of up to 16 strings.",
473
+ },
474
+ inject_snippet_too_large: {
475
+ summary: "An inject snippet exceeds the per-snippet size limit.",
476
+ fix: "Keep each inject snippet at or under 8 KB.",
477
+ },
478
+ internal_error: {
479
+ summary: "Something went wrong on our side.",
480
+ fix: "Retry the request; if it persists, contact support with the requestId.",
481
+ },
482
+ invalid_claim_token: {
483
+ summary: "The claim token is invalid or does not match this space.",
484
+ fix: "Use the exact claim URL returned by the publish that created the space.",
485
+ },
486
+ invalid_data_location: {
487
+ summary: "The requested data location is not a supported region.",
488
+ fix: "Pick a region from the documented data locations, or use auto.",
489
+ },
490
+ invalid_device_code: {
491
+ summary: "The device code is invalid or has expired.",
492
+ fix: "Start a new device login flow.",
493
+ },
494
+ invalid_domain: {
495
+ summary: "The domain reference is invalid.",
496
+ fix: "Pass a valid domain id or name.",
497
+ },
498
+ invalid_domain_name: {
499
+ summary: "The domain name is not a valid registrable hostname.",
500
+ fix: "Check the spelling and use a fully-qualified domain name.",
501
+ },
502
+ invalid_file_path: {
503
+ summary: "A file path in the request is not a valid space path.",
504
+ fix: "Use forward-slash relative paths without traversal segments.",
505
+ },
506
+ invalid_grant: {
507
+ summary: "The authorization grant is invalid or was already used.",
508
+ fix: "Restart the login flow to obtain a new grant.",
509
+ },
510
+ invalid_publish_archive: {
511
+ summary: "The uploaded archive could not be read as a valid zip.",
512
+ fix: "Re-create the archive as a standard zip and upload again.",
513
+ },
514
+ invalid_publish_path: {
515
+ summary: "A file path in the publish payload is not allowed.",
516
+ fix: "Use forward-slash relative paths without traversal or control characters.",
517
+ },
518
+ invalid_publish_payload: {
519
+ summary: "The publish payload is malformed.",
520
+ fix: "Check the request against the publish schema in the API docs.",
521
+ },
522
+ invalid_request: {
523
+ summary: "The request is malformed.",
524
+ fix: "Fix the field referenced by param and details, then retry.",
525
+ },
526
+ invalid_runtime_event: {
527
+ summary: "The runtime event payload is not recognized.",
528
+ fix: "Verify the event shape matches the runtime callback contract.",
529
+ },
530
+ invalid_space: {
531
+ summary: "The space reference is invalid.",
532
+ fix: "Pass a valid spc_ id, slug, or hostname.",
533
+ },
534
+ invalid_space_mode: {
535
+ summary: "The requested space serving mode is not supported.",
536
+ fix: "Use a supported serving configuration.",
537
+ },
538
+ invalid_user_code: {
539
+ summary: "The user code does not match a pending device login.",
540
+ fix: "Enter the code exactly as shown by your CLI; codes expire after a few minutes.",
541
+ },
542
+ invalid_version_path: {
543
+ summary: "A file path in the version is not a valid space path.",
544
+ fix: "Use forward-slash relative paths without traversal segments.",
545
+ },
546
+ invalid_webhook_events: {
547
+ summary: "One or more webhook event codes are not in the event taxonomy.",
548
+ fix: "Subscribe only to documented activity event codes.",
549
+ },
550
+ invalid_webhook_payload: {
551
+ summary: "The webhook configuration payload is malformed.",
552
+ fix: "Fix the field referenced by param and retry.",
553
+ },
554
+ invalid_webhook_signature: {
555
+ summary: "The webhook signature did not verify.",
556
+ fix: "Verify with the current webhook secret over `{t}.{rawBody}` and reject stale timestamps.",
557
+ },
558
+ invalid_webhook_url: {
559
+ summary: "The webhook URL is not an allowed public HTTPS endpoint.",
560
+ fix: "Use a public HTTPS URL; private networks and link-local addresses are blocked.",
561
+ },
562
+ invalid_zero_realtime_event: {
563
+ summary: "The Zero realtime event payload is malformed or scoped to the wrong space.",
564
+ fix: "Send a valid Zero realtime event for the space in the request path.",
565
+ },
566
+ invalid_zero_realtime_replay_query: {
567
+ summary: "The Zero realtime replay query parameters are invalid.",
568
+ fix: "Use a valid afterEventId cursor and a numeric replay limit between 1 and 100.",
569
+ },
570
+ invitation_already_exists: {
571
+ summary: "An invitation for this email already exists on the team.",
572
+ fix: "Resend the existing invitation instead of creating a new one.",
573
+ },
574
+ invitation_not_pending: {
575
+ summary: "The invitation is no longer pending.",
576
+ fix: "Create a new invitation if the member still needs to join.",
577
+ },
578
+ ip_blocked: {
579
+ summary: "Requests from this IP address are blocked for abuse or policy reasons.",
580
+ fix: "Contact support with your IP address if you believe this block is in error.",
581
+ },
582
+ job_not_found: {
583
+ summary: "The background job was not found.",
584
+ fix: "Verify the job id; completed jobs are eventually pruned.",
585
+ },
586
+ job_not_promotable: {
587
+ summary: "The job cannot be promoted in its current state.",
588
+ fix: "Only delayed jobs can be promoted to run immediately.",
589
+ },
590
+ job_not_removable: {
591
+ summary: "The job cannot be removed in its current state.",
592
+ fix: "Wait for the job to settle before removing it.",
593
+ },
594
+ job_not_retryable: {
595
+ summary: "The job cannot be retried in its current state.",
596
+ fix: "Only failed jobs can be retried.",
597
+ },
598
+ last_owner: {
599
+ summary: "The last owner of a team cannot be removed or downgraded.",
600
+ fix: "Promote another member to owner first.",
601
+ },
602
+ log_retention_clamped: {
603
+ summary: "The requested log range exceeds the plan's retention and was clamped.",
604
+ fix: "Narrow the range, or upgrade the plan for longer retention.",
605
+ },
606
+ lost_domain_control: {
607
+ summary: `${BRAND.productName} no longer observes DNS control for this domain.`,
608
+ fix: "Restore the documented DNS records, then re-run domain verification.",
609
+ },
610
+ malware_detected: {
611
+ summary: "Malware was detected in the uploaded content.",
612
+ fix: "Remove the flagged files; contact support if you believe this is a false positive.",
613
+ },
614
+ managed_domain_protected: {
615
+ summary: "This is a system-managed view.fast hostname and cannot be mutated like a custom domain.",
616
+ fix: "Use it as a read-only managed hostname, or add a custom domain if you need editable DNS and binding controls.",
617
+ },
618
+ manifest_body_too_large: {
619
+ summary: "The upload manifest body exceeds the maximum size.",
620
+ fix: "Keep the manifest under 16 MB; split very large publishes into batches.",
621
+ },
622
+ manifest_duplicate_path: {
623
+ summary: "The upload manifest declares the same path more than once.",
624
+ fix: "Deduplicate paths; comparisons use the canonical (decoded, NFC) form.",
625
+ },
626
+ manifest_too_many_files: {
627
+ summary: "The upload manifest declares more files than the allowed ceiling.",
628
+ fix: "Reduce the file count or split content across multiple spaces.",
629
+ },
630
+ member_already_exists: {
631
+ summary: "This user is already a member of the team.",
632
+ fix: "Update the existing member's role instead of inviting again.",
633
+ },
634
+ missing_route_param: {
635
+ summary: "A required route parameter is missing from the request path.",
636
+ fix: "Check the endpoint path in the API reference and include every parameter.",
637
+ },
638
+ nameserver_delegation_required: {
639
+ summary: `This operation requires the domain to be delegated to ${BRAND.productName} nameservers.`,
640
+ fix: "Update the domain's nameservers at the registrar, then retry once delegation propagates.",
641
+ },
642
+ nameserver_divergence: {
643
+ summary: "The domain's observed nameservers diverge from the expected set.",
644
+ fix: "Align the registrar's nameserver records with the expected set, then re-check.",
645
+ },
646
+ noop_publish: {
647
+ summary: "The publish matched the live version exactly, so nothing changed.",
648
+ fix: "No action needed; the existing live version already serves this content.",
649
+ },
650
+ not_enrolled: {
651
+ summary: "This account is not enrolled in the private beta, so the API cannot be used yet.",
652
+ fix: "Join the waitlist or open your beta invite link, then sign in again.",
653
+ },
654
+ not_found: {
655
+ summary: "The requested resource was not found.",
656
+ fix: "Verify the id and that your credential can access the resource.",
657
+ },
658
+ path_case_collision: {
659
+ summary: "Two file paths differ only by letter case, which collides on serving.",
660
+ fix: "Rename one of the files so paths are unique case-insensitively.",
661
+ },
662
+ path_too_long: {
663
+ summary: "A file path exceeds the maximum length.",
664
+ fix: "Keep each file path at or under 1024 bytes.",
665
+ },
666
+ plan_grant_already_active: {
667
+ summary: "The team already holds an active operator grant for this plan.",
668
+ fix: "Revoke the existing grant first, or grant a different plan.",
669
+ },
670
+ plan_grant_already_revoked: {
671
+ summary: "This plan grant was already revoked.",
672
+ fix: "Nothing to do; create a new grant if the team should regain the plan.",
673
+ },
674
+ platform_tenant_immutable_client: {
675
+ summary: "The tenant's provider client cannot be changed.",
676
+ fix: "Create a new tenant with the desired provider client instead.",
677
+ },
678
+ policy_exceeds_grantor: {
679
+ summary: "The requested key policy grants more than your own credential allows.",
680
+ fix: "Request a policy that is a subset of the credential creating the key.",
681
+ },
682
+ principal_space_mismatch: {
683
+ summary: "The space does not belong to the principal in the request.",
684
+ fix: "Use the space's owning team or account in the request path.",
685
+ },
686
+ provider_error: {
687
+ summary: "The hosting provider reported an error.",
688
+ fix: "Retry; if the error persists, contact support with the requestId.",
689
+ },
690
+ provider_job_failed: {
691
+ summary: "A hosting-provider job failed while processing this operation.",
692
+ fix: "Retry the operation; if it keeps failing, contact support with the operation id.",
693
+ },
694
+ provider_job_timeout: {
695
+ summary: "A hosting-provider job timed out while processing this operation.",
696
+ fix: "Retry the operation; the provider may be slow right now.",
697
+ },
698
+ provider_runtime_feature_unsupported: {
699
+ summary: "The hosting provider does not support this runtime feature.",
700
+ fix: "Check the feature's availability for this site's runtime.",
701
+ },
702
+ provider_site_id_required: {
703
+ summary: "A provider site id is required for this internal operation.",
704
+ fix: "Pass the provider site reference.",
705
+ },
706
+ proxy_upstream_denied: {
707
+ summary: "The proxy upstream is on a denied network and cannot be used.",
708
+ fix: "Proxy only to public HTTPS upstreams; private and internal addresses are blocked.",
709
+ },
710
+ proxy_upstream_unresolved: {
711
+ summary: "The proxy upstream hostname could not be resolved.",
712
+ fix: "Verify the upstream DNS name resolves publicly, then publish again.",
713
+ },
714
+ publish_archive_compression_ratio_exceeded: {
715
+ summary: "The archive's compression ratio is suspiciously high and was rejected.",
716
+ fix: "Repackage the content without highly-compressible filler data.",
717
+ },
718
+ publish_archive_expanded_size_exceeded: {
719
+ summary: "The archive expands beyond the maximum allowed total size.",
720
+ fix: "Reduce the content size or upgrade the plan for higher limits.",
721
+ },
722
+ publish_archive_file_count_exceeded: {
723
+ summary: "The archive contains more files than the allowed ceiling.",
724
+ fix: "Reduce the file count or split content across multiple spaces.",
725
+ },
726
+ publish_archive_too_large: {
727
+ summary: "The uploaded archive exceeds the maximum allowed size.",
728
+ fix: "Reduce the archive size or use a version upload session for big publishes.",
729
+ },
730
+ publish_config_unsupported: {
731
+ summary: "The publish carries configuration this endpoint does not support.",
732
+ fix: "Move the configuration into sf.jsonc or the space settings.",
733
+ },
734
+ publish_failed: {
735
+ summary: "The publish failed before going live.",
736
+ fix: "Check the version diagnostics for the cause, then publish again.",
737
+ },
738
+ publish_file_missing: {
739
+ summary: "A declared file was never uploaded, so the publish cannot finalize.",
740
+ fix: "Upload every declared file, or resume the upload session to see what is missing.",
741
+ },
742
+ publish_setup_failed: {
743
+ summary: "Provisioning for this publish failed.",
744
+ fix: "Retry the publish; if it persists, contact support with the requestId.",
745
+ },
746
+ publish_upload_failed: {
747
+ summary: "Uploading the publish content failed.",
748
+ fix: "Retry the publish; partial uploads are resumable through the upload session.",
749
+ },
750
+ publish_verification_failed: {
751
+ summary: "Post-publish verification did not see the new content serving.",
752
+ fix: "Retry; if the space still serves stale content, contact support.",
753
+ },
754
+ queue_not_found: {
755
+ summary: "The named job queue does not exist.",
756
+ fix: "Check the queue name against the operator queue list.",
757
+ },
758
+ rate_limited: {
759
+ summary: "Too many requests were made in a short window.",
760
+ fix: "Wait for the window in the Retry-After header to pass, then retry.",
761
+ },
762
+ registration_expired: {
763
+ summary: "The domain registration has expired.",
764
+ fix: "Renew the domain at its registrar before retrying.",
765
+ },
766
+ registration_expiring: {
767
+ summary: "The domain registration is about to expire, which blocks this operation.",
768
+ fix: "Renew the domain first, then retry.",
769
+ },
770
+ routing_rules_over_plan: {
771
+ summary: "The published _redirects and _headers exceed the plan's routing-rule allowance.",
772
+ fix: "Reduce the rule count or upgrade the plan.",
773
+ },
774
+ runtime_action_forbidden: {
775
+ summary: "The runtime credential does not allow this action.",
776
+ fix: "Use a runtime token scoped for this action.",
777
+ },
778
+ runtime_api_not_found: {
779
+ summary: "The runtime management endpoint was not found.",
780
+ fix: "Check the runtime API path against the runtime contract.",
781
+ },
782
+ runtime_callback_forbidden: {
783
+ summary: "The runtime callback could not be authenticated.",
784
+ fix: "Verify the callback secret configuration for this runtime.",
785
+ },
786
+ runtime_engine_zip_missing: {
787
+ summary: "The runtime engine artifact is missing from this deployment.",
788
+ fix: "Rebuild the control plane so dist/runtime-engine.zip exists.",
789
+ },
790
+ runtime_hostname_unassigned: {
791
+ summary: "The hostname is not assigned to a runtime, so the request cannot be routed.",
792
+ fix: `Verify the binding is active and DNS points at ${BRAND.productName}.`,
793
+ },
794
+ runtime_instance_mismatch: {
795
+ summary: "The request reached a different runtime instance than the one it was issued for.",
796
+ fix: "Re-request instructions; the space may have moved to another instance.",
797
+ },
798
+ runtime_jti_missing: {
799
+ summary: "The runtime token is missing its replay-protection id.",
800
+ fix: "Mint a fresh runtime token; tokens must carry a jti claim.",
801
+ },
802
+ runtime_jti_replayed: {
803
+ summary: "The runtime token was already used; replays are rejected.",
804
+ fix: "Mint a fresh runtime token for each request.",
805
+ },
806
+ runtime_jwks_key_missing: {
807
+ summary: "No signing key matching the token's key id was found.",
808
+ fix: "Refresh the runtime JWKS; the signing keys may have rotated.",
809
+ },
810
+ runtime_logs_unavailable: {
811
+ summary: "Runtime logs are not available for this space right now.",
812
+ fix: "Retry shortly; logs may lag behind serving.",
813
+ },
814
+ runtime_management_unavailable: {
815
+ summary: "The runtime management surface is unavailable for this site.",
816
+ fix: "Retry shortly; if the site stays unreachable, contact support.",
817
+ },
818
+ runtime_not_provisioned: {
819
+ summary: "The space has no provisioned runtime yet.",
820
+ fix: "Wait for provisioning to finish; the operation receipt reports progress.",
821
+ },
822
+ runtime_operation_missing: {
823
+ summary: "The runtime operation referenced by this request was not found.",
824
+ fix: "Re-request instructions and retry with a current operation id.",
825
+ },
826
+ runtime_scope_forbidden: {
827
+ summary: "The runtime token's scope does not cover this path or action.",
828
+ fix: "Use the token minted for this exact session, space, and step.",
829
+ },
830
+ runtime_token_bad_signature: {
831
+ summary: "The runtime token signature did not verify.",
832
+ fix: "Mint a fresh token; verify clocks and JWKS freshness if it persists.",
833
+ },
834
+ runtime_token_expired: {
835
+ summary: "The runtime token has expired.",
836
+ fix: "Mint a fresh runtime token; step tokens are short-lived by design.",
837
+ },
838
+ runtime_token_invalid: {
839
+ summary: "The runtime token could not be parsed or validated.",
840
+ fix: "Mint a fresh runtime token.",
841
+ },
842
+ runtime_unauthorized: {
843
+ summary: "The request to the runtime carried no valid credential.",
844
+ fix: "Send the runtime JWT in the Authorization header.",
845
+ },
846
+ runtime_upload_operation_not_supported: {
847
+ summary: "The runtime upload session does not support this operation.",
848
+ fix: "Follow the upload instructions returned when the session was created.",
849
+ },
850
+ runtime_upload_required: {
851
+ summary: "This step requires uploaded content that has not arrived yet.",
852
+ fix: "Complete the uploads for this session, then retry the step.",
853
+ },
854
+ scan_pending: {
855
+ summary: "The content is still being scanned for safety and cannot be served yet.",
856
+ fix: "Wait for the scan to finish; serving resumes automatically once it clears.",
857
+ },
858
+ secret_variable_in_template: {
859
+ summary: "A secret variable was referenced in a template, which is blocked.",
860
+ fix: "Templates may only substitute non-secret variables; remove the secret reference.",
861
+ },
862
+ site_already_deleted: {
863
+ summary: "The site was already deleted.",
864
+ fix: "No action needed; the site is gone.",
865
+ },
866
+ site_capacity_exceeded: {
867
+ summary: "The site has reached its capacity and cannot take more content.",
868
+ fix: "Retry shortly; the platform rebalances spaces onto new sites automatically.",
869
+ },
870
+ site_has_live_spaces: {
871
+ summary: "The site still has live spaces assigned to it, so it cannot be deleted.",
872
+ fix: "Delete the live spaces or move them to another site before deleting this site.",
873
+ },
874
+ site_not_static: {
875
+ summary: "This operation only applies to static-runtime sites.",
876
+ fix: "Target a static-runtime site.",
877
+ },
878
+ site_required: {
879
+ summary: "A site reference is required for this operation.",
880
+ fix: "Pass the site id.",
881
+ },
882
+ site_suspended: {
883
+ summary: "The site is suspended, so its spaces cannot be served or modified.",
884
+ fix: "Resolve the suspension reason with support or the owning tenant.",
885
+ },
886
+ slow_down: {
887
+ summary: "The device login is being polled faster than the advised interval.",
888
+ fix: "Increase the polling interval; aggressive polling invalidates the flow.",
889
+ },
890
+ space_already_claimed: {
891
+ summary: "The space was already claimed by someone else.",
892
+ fix: "Publish a new space; a claim can only succeed once.",
893
+ },
894
+ space_claim_unavailable: {
895
+ summary: "This space cannot be claimed.",
896
+ fix: "Only anonymous, unexpired spaces with a valid claim token can be claimed.",
897
+ },
898
+ space_disabled: {
899
+ summary: "The space is disabled and cannot be served or modified.",
900
+ fix: "Check the disabled reason on the space; it explains the path to restore it.",
901
+ },
902
+ space_expired: {
903
+ summary: "The space expired and is no longer served.",
904
+ fix: "If it is within the recovery window, claim or restore it; otherwise publish again.",
905
+ },
906
+ space_has_active_version: {
907
+ summary: "The space still has an active version, which blocks this operation.",
908
+ fix: "Delete or supersede the active version first.",
909
+ },
910
+ space_import_archive_invalid: {
911
+ summary: `The import archive is not a valid ${BRAND.productName} export.`,
912
+ fix: "Export the source space again and upload the unmodified archive.",
913
+ },
914
+ space_import_archive_too_large: {
915
+ summary: "The import archive exceeds the maximum allowed size.",
916
+ fix: "Reduce the export size, or import versions individually.",
917
+ },
918
+ space_import_config_only_archive: {
919
+ summary: "The archive contains only configuration and cannot be imported as content.",
920
+ fix: "Include files in the export, or apply the configuration directly.",
921
+ },
922
+ space_import_runtime_schema_unsupported: {
923
+ summary: "The export was produced by an unsupported runtime schema version.",
924
+ fix: "Re-export from a current runtime, or upgrade before exporting.",
925
+ },
926
+ space_moving: {
927
+ summary: "The space is moving between sites, which blocks this operation.",
928
+ fix: "Wait for the move to finish, then retry.",
929
+ },
930
+ space_no_live_version: {
931
+ summary: "The space has no live version, so this operation has nothing to act on.",
932
+ fix: "Publish a version to the space, then retry.",
933
+ },
934
+ space_not_disabled: {
935
+ summary: "The space is not disabled, so it cannot be restored.",
936
+ fix: "No action needed; the space is already active.",
937
+ },
938
+ space_not_restorable: {
939
+ summary: "The space is past its recovery window and cannot be restored.",
940
+ fix: "Publish the content to a new space.",
941
+ },
942
+ space_ref_ambiguous: {
943
+ summary: "The space reference matches more than one accessible space.",
944
+ fix: "Use the spc_ id, or scope the reference with a teamRef.",
945
+ },
946
+ space_ref_required: {
947
+ summary: "A space reference is required for this operation.",
948
+ fix: "Pass a spc_ id, slug, or hostname.",
949
+ },
950
+ space_transferring: {
951
+ summary: "The space has a transfer in progress, which blocks this operation.",
952
+ fix: "Complete or cancel the transfer first.",
953
+ },
954
+ space_unclaimed: {
955
+ summary: "This operation requires a claimed space.",
956
+ fix: "Claim the space first using its claim URL.",
957
+ },
958
+ ssl_renewal_blocked: {
959
+ summary: "SSL certificate renewal is blocked for this hostname.",
960
+ fix: `Verify DNS still points at ${BRAND.productName}, then retry SSL issuance.`,
961
+ },
962
+ static_control_file_not_supported: {
963
+ summary: "This control file is not supported by the static runtime.",
964
+ fix: "Remove the file; see the routing docs for supported convention files.",
965
+ },
966
+ static_runtime_control_path_not_supported: {
967
+ summary: "This control path is not supported by the static runtime.",
968
+ fix: "Remove the path from the upload.",
969
+ },
970
+ static_runtime_required: {
971
+ summary: "This operation only applies to static-runtime spaces.",
972
+ fix: "Target a static-runtime space.",
973
+ },
974
+ storage_quota_exceeded: {
975
+ summary: "The publish would exceed the plan's storage allowance.",
976
+ fix: "Delete old versions or upgrade the plan.",
977
+ },
978
+ storage_usage_unavailable: {
979
+ summary: "Storage usage could not be computed right now.",
980
+ fix: "Retry shortly.",
981
+ },
982
+ stripe_error: {
983
+ summary: "The billing provider reported an error.",
984
+ fix: "Retry; if it persists, check the team's billing settings.",
985
+ },
986
+ superseded_by_publish: {
987
+ summary: "A newer publish superseded this operation, so it was skipped.",
988
+ fix: "No action needed; the newer publish already carries the change.",
989
+ },
990
+ takeover_notice_window: {
991
+ summary: "The hostname was recently bound elsewhere; a takeover notice window applies.",
992
+ fix: "Retry after the notice window, or have the current holder release the binding.",
993
+ },
994
+ team_ref_required: {
995
+ summary: "A team reference is required for this operation.",
996
+ fix: "Pass the team id or slug.",
997
+ },
998
+ team_required: {
999
+ summary: "This operation requires an acting team.",
1000
+ fix: "Choose a team or pass a team reference.",
1001
+ },
1002
+ team_slug_conflict: {
1003
+ summary: "The team slug is already taken.",
1004
+ fix: "Choose a different slug.",
1005
+ },
1006
+ event_payload_too_large: {
1007
+ summary: "The event payload exceeds the maximum size.",
1008
+ fix: "Send smaller batches.",
1009
+ },
1010
+ event_rate_limited: {
1011
+ summary: "Too many event submissions came from this client in a short window.",
1012
+ fix: "Drop or batch events; event delivery is best-effort and never required.",
1013
+ },
1014
+ template_file_too_large: {
1015
+ summary: "A template file exceeds the maximum size for substitution.",
1016
+ fix: "Keep template files under the documented size limit (16 KB).",
1017
+ },
1018
+ template_not_in_version: {
1019
+ summary: "The configuration names a template file the version does not contain.",
1020
+ fix: "Upload the file or remove its templates entry from sf.jsonc.",
1021
+ },
1022
+ template_variable_unresolved: {
1023
+ summary: "A template references a variable that has no value.",
1024
+ fix: "Define the variable for the space, site, or team, or remove the reference.",
1025
+ },
1026
+ tenant_id_mismatch: {
1027
+ summary: "The resource belongs to a different tenant than the request.",
1028
+ fix: "Use a credential and tenant header matching the resource's tenant.",
1029
+ },
1030
+ tenant_not_found: {
1031
+ summary: "The tenant was not found.",
1032
+ fix: "Verify the tenant id.",
1033
+ },
1034
+ tenant_not_granted: {
1035
+ summary: "Your credential has no grant on the requested tenant.",
1036
+ fix: "Use a credential issued for this tenant.",
1037
+ },
1038
+ tenant_past_due: {
1039
+ summary: "The tenant is past due; mutations are rejected while serving continues.",
1040
+ fix: "Settle the outstanding balance to restore full access.",
1041
+ },
1042
+ tenant_selection_required: {
1043
+ summary: "The credential spans multiple tenants, so the request must select one.",
1044
+ fix: "Send the tenant header naming the tenant to act on.",
1045
+ },
1046
+ tenant_suspended: {
1047
+ summary: "The tenant is suspended, so its resources cannot be served or modified.",
1048
+ fix: "Resolve the suspension with support.",
1049
+ },
1050
+ theme_value_invalid: {
1051
+ summary: "A theme value in the configuration is outside the allowed grammar.",
1052
+ fix: "Use allowed CSS values; the offending key is dropped with a warning otherwise.",
1053
+ },
1054
+ transfer_cross_tenant_unsupported: {
1055
+ summary: "Spaces cannot be transferred across tenants.",
1056
+ fix: "Export the space and import it under the target tenant instead.",
1057
+ },
1058
+ transfer_move_failed: {
1059
+ summary: "The space move backing this transfer failed.",
1060
+ fix: "Retry the transfer; if it persists, contact support with the transfer id.",
1061
+ },
1062
+ transfer_not_cancelable: {
1063
+ summary: "The transfer has progressed past the point where it can be canceled.",
1064
+ fix: "Wait for the transfer to finish.",
1065
+ },
1066
+ transfer_source_changed: {
1067
+ summary: "The space changed since the transfer was created, so it must be re-confirmed.",
1068
+ fix: "Review the space's current state and confirm the transfer again.",
1069
+ },
1070
+ transfer_target_same_as_source: {
1071
+ summary: "The transfer target is the same principal that already owns the space.",
1072
+ fix: "Pick a different target team or account.",
1073
+ },
1074
+ unauthorized: {
1075
+ summary: "The request carried no valid credential.",
1076
+ fix: "Send a bearer access token, use an agent OAuth client, or sign in.",
1077
+ },
1078
+ unsupported_publish_media_type: {
1079
+ summary: "The publish content-type is not supported.",
1080
+ fix: "Send JSON, multipart form data, or a zip archive.",
1081
+ },
1082
+ upload_hash_mismatch: {
1083
+ summary: "An uploaded file's bytes do not match the declared sha256.",
1084
+ fix: "Re-hash the local file and upload it again.",
1085
+ },
1086
+ upload_path_not_canonical: {
1087
+ summary: "An upload path is not in canonical (decoded, NFC-normalized) form.",
1088
+ fix: "Send paths exactly as declared, decoded once and NFC-normalized.",
1089
+ },
1090
+ upload_path_not_declared: {
1091
+ summary: "An uploaded path was not declared in the version's manifest.",
1092
+ fix: "Declare every path up front, or use an open session for incremental uploads.",
1093
+ },
1094
+ upload_session_cap_exceeded: {
1095
+ summary: "The open upload session exceeded its file or byte cap.",
1096
+ fix: "Stay within the session caps, or declare a manifest for large publishes.",
1097
+ },
1098
+ upload_size_mismatch: {
1099
+ summary: "An uploaded file's size does not match the declared size.",
1100
+ fix: "Re-check the local file and upload it again.",
1101
+ },
1102
+ user_banned: {
1103
+ summary: "This user is banned for a policy or abuse violation and cannot perform this action.",
1104
+ fix: "Contact support to appeal the ban if you believe it is a mistake.",
1105
+ },
1106
+ validation_error: {
1107
+ summary: "A request field failed validation.",
1108
+ fix: "Fix the field referenced by param and details, then retry.",
1109
+ },
1110
+ variable_cascade_failed: {
1111
+ summary: "Republishing spaces after a variable change failed.",
1112
+ fix: "Check the operation's diagnostics; live content keeps serving the previous values.",
1113
+ },
1114
+ verification_required: {
1115
+ summary: "Domain verification is required before this operation.",
1116
+ fix: "Add the verification DNS record, then run verify on the domain.",
1117
+ },
1118
+ version_already_live: {
1119
+ summary: "The version is already live on this channel.",
1120
+ fix: "No action needed.",
1121
+ },
1122
+ version_artifact_not_found: {
1123
+ summary: "The requested version artifact was not found.",
1124
+ fix: "List the version's convention artifacts to see what exists.",
1125
+ },
1126
+ version_busy: {
1127
+ summary: "The version is busy with another operation.",
1128
+ fix: "Wait for the in-flight operation to finish, then retry.",
1129
+ },
1130
+ version_canceled: {
1131
+ summary: "The version was canceled and cannot be used.",
1132
+ fix: "Start a new version.",
1133
+ },
1134
+ version_closed: {
1135
+ summary: "The version's upload session is closed; no more files can be added.",
1136
+ fix: "Start a new version for additional changes.",
1137
+ },
1138
+ version_expired: {
1139
+ summary: "The version's upload session expired before it was finalized.",
1140
+ fix: "Start a new version and finalize within the session window.",
1141
+ },
1142
+ version_failed: {
1143
+ summary: "The version failed and cannot be used.",
1144
+ fix: "Check the version diagnostics, fix the cause, and publish again.",
1145
+ },
1146
+ version_file_count_exceeded: {
1147
+ summary: "The version exceeds the maximum number of files.",
1148
+ fix: "Reduce the file count or split content across multiple spaces.",
1149
+ },
1150
+ version_file_not_found: {
1151
+ summary: "The requested file does not exist in this version.",
1152
+ fix: "List the version's files to confirm the path.",
1153
+ },
1154
+ version_file_too_large: {
1155
+ summary: "A file exceeds the plan's maximum file size.",
1156
+ fix: "Reduce the file size or upgrade the plan.",
1157
+ },
1158
+ version_files_missing: {
1159
+ summary: "Declared files were never uploaded, so the version cannot finalize.",
1160
+ fix: "Resume the upload session to see and upload the missing files.",
1161
+ },
1162
+ version_in_use: {
1163
+ summary: "The version is referenced by one or more channels and cannot be deleted.",
1164
+ fix: "Promote another version on those channels first; details lists them.",
1165
+ },
1166
+ version_live: {
1167
+ summary: "The version is live and cannot be deleted.",
1168
+ fix: "Promote another version to live first.",
1169
+ },
1170
+ version_no_publishable_files: {
1171
+ summary: "The version contains no publishable files.",
1172
+ fix: "Add at least one servable file before finalizing.",
1173
+ },
1174
+ version_not_finalizable: {
1175
+ summary: "The version cannot be finalized in its current status.",
1176
+ fix: "Only uploaded versions finalize; check the version status.",
1177
+ },
1178
+ version_not_found: {
1179
+ summary: "The version was not found.",
1180
+ fix: "List the space's versions to confirm the id.",
1181
+ },
1182
+ version_not_prepared: {
1183
+ summary: "The version is not prepared for this operation.",
1184
+ fix: "Complete the version's upload and finalize steps first.",
1185
+ },
1186
+ version_not_promotable: {
1187
+ summary: "The version cannot be promoted in its current status.",
1188
+ fix: "Only ready versions can be promoted to a channel.",
1189
+ },
1190
+ version_not_ready: {
1191
+ summary: "The version is not ready yet.",
1192
+ fix: "Wait for finalize to complete; the operation receipt reports progress.",
1193
+ },
1194
+ version_quota_exceeded: {
1195
+ summary: "The space has reached its version quota.",
1196
+ fix: "Delete old versions or upgrade the plan.",
1197
+ },
1198
+ version_total_bytes_exceeded: {
1199
+ summary: "The version exceeds the maximum total size.",
1200
+ fix: "Reduce the content size or upgrade the plan.",
1201
+ },
1202
+ webhook_delivery_budget_exceeded: {
1203
+ summary: "The webhook exhausted its delivery budget and was paused.",
1204
+ fix: "Fix the receiving endpoint, then redeliver or re-enable the webhook.",
1205
+ },
1206
+ whois_unavailable: {
1207
+ summary: "WHOIS data is unavailable for this domain right now.",
1208
+ fix: "Retry later.",
1209
+ },
1210
+ zero_artifact_abi_mismatch: {
1211
+ summary: "The Zero endpoint artifact was built for a different runner ABI.",
1212
+ fix: `Rebuild and republish the Zero project with the current ${BRAND.productName} CLI and runtime.`,
1213
+ },
1214
+ zero_artifact_invalid: {
1215
+ summary: "The Zero endpoint artifact is missing required runtime metadata.",
1216
+ fix: "Rebuild the Zero project and verify the generated zero endpoint artifacts are uploaded.",
1217
+ },
1218
+ zero_artifact_malformed: {
1219
+ summary: "The Zero endpoint artifact could not be parsed.",
1220
+ fix: "Rebuild the Zero project; do not edit generated artifact JSON by hand.",
1221
+ },
1222
+ zero_artifact_path_invalid: {
1223
+ summary: "The Zero endpoint artifact path is invalid.",
1224
+ fix: "Rebuild the Zero routes so all artifact paths stay inside the version bundle.",
1225
+ },
1226
+ zero_artifact_unreadable: {
1227
+ summary: "The Zero endpoint artifact could not be read by the runtime.",
1228
+ fix: "Verify the version finalized with all generated Zero files present.",
1229
+ },
1230
+ zero_auth_unavailable: {
1231
+ summary: "Hosted Zero auth is not configured for this deployment.",
1232
+ fix: "Finalize the Zero version with hosted auth URLs or use guest/local auth.",
1233
+ },
1234
+ zero_blob_key_invalid: {
1235
+ summary: "The local Zero blob key is invalid.",
1236
+ fix: "Use a non-empty blob key without unsafe path segments.",
1237
+ },
1238
+ zero_blob_store_full: {
1239
+ summary: "The local Zero blob store reached its configured size limit.",
1240
+ fix: "Delete local blobs or raise the dev blob store limit.",
1241
+ },
1242
+ zero_blob_too_large: {
1243
+ summary: "The local Zero blob value exceeds the maximum allowed size.",
1244
+ fix: "Store a smaller value or move the payload to external storage.",
1245
+ },
1246
+ zero_blob_value_invalid: {
1247
+ summary: "The local Zero blob request body is invalid.",
1248
+ fix: "Send a valid blob body within the configured local size limits.",
1249
+ },
1250
+ zero_bootstrap_encode_failed: {
1251
+ summary: "The Zero runner could not encode the JavaScript bootstrap data.",
1252
+ fix: "Retry with valid request metadata; report the issue if it persists.",
1253
+ },
1254
+ zero_bytecode_hash_mismatch: {
1255
+ summary: "The Zero endpoint bytecode hash does not match its artifact metadata.",
1256
+ fix: "Rebuild and republish so bytecode and endpoint metadata are from the same build.",
1257
+ },
1258
+ zero_bytecode_invalid: {
1259
+ summary: "The Zero endpoint bytecode could not be loaded by QuickJS.",
1260
+ fix: "Rebuild the project with the current Zero runner and redeploy.",
1261
+ },
1262
+ zero_bytecode_path_invalid: {
1263
+ summary: "The Zero endpoint bytecode path is invalid.",
1264
+ fix: "Rebuild the Zero routes so bytecode paths stay inside the version bundle.",
1265
+ },
1266
+ zero_bytecode_unreadable: {
1267
+ summary: "The Zero endpoint bytecode file could not be read.",
1268
+ fix: "Verify the version finalized with the generated bytecode files present.",
1269
+ },
1270
+ zero_client_bundle_not_loaded: {
1271
+ summary: "The local Zero dev client bundle has not been generated or loaded.",
1272
+ fix: "Restart zero dev or run a fresh local build before loading the client route.",
1273
+ },
1274
+ zero_db_connect_failed: {
1275
+ summary: "The Zero runner could not connect to the configured database.",
1276
+ fix: "Verify DATABASE_URL or the generated MySQL connection variables and retry.",
1277
+ },
1278
+ zero_db_execute_failed: {
1279
+ summary: "A Zero database write failed.",
1280
+ fix: "Inspect the mutation, schema, and database logs, then retry after fixing the SQL issue.",
1281
+ },
1282
+ zero_db_host_install_failed: {
1283
+ summary: "The Zero runner could not install the database host bridge.",
1284
+ fix: "Rebuild with a current runner and report the failure if it repeats.",
1285
+ },
1286
+ zero_db_operation_invalid: {
1287
+ summary: "The Zero database bridge received an invalid operation payload.",
1288
+ fix: "Use the generated Zero database client instead of constructing bridge calls manually.",
1289
+ },
1290
+ zero_db_operation_too_large: {
1291
+ summary: "The Zero database operation payload is too large.",
1292
+ fix: "Reduce query parameters or batch size and retry.",
1293
+ },
1294
+ zero_db_param_invalid: {
1295
+ summary: "A Zero database query parameter has an unsupported value.",
1296
+ fix: "Pass JSON-serializable scalar values or nulls to generated database helpers.",
1297
+ },
1298
+ zero_db_query_failed: {
1299
+ summary: "A Zero database read failed.",
1300
+ fix: "Inspect the query, schema, and database logs, then retry after fixing the SQL issue.",
1301
+ },
1302
+ zero_db_row_invalid: {
1303
+ summary: "A database row could not be converted into a Zero response value.",
1304
+ fix: "Check the table schema and stored values for unsupported data.",
1305
+ },
1306
+ zero_db_sql_invalid: {
1307
+ summary: "The Zero runner rejected unsafe or unsupported SQL.",
1308
+ fix: "Use generated Zero query helpers and avoid multiple statements or unsupported SQL forms.",
1309
+ },
1310
+ zero_db_too_many_params: {
1311
+ summary: "The Zero database operation has too many parameters.",
1312
+ fix: "Reduce the number of bound parameters or split the operation.",
1313
+ },
1314
+ zero_db_transaction_commit_failed: {
1315
+ summary: "The Zero database transaction could not be committed.",
1316
+ fix: "Retry after checking database connectivity and transaction conflicts.",
1317
+ },
1318
+ zero_db_transaction_invalid: {
1319
+ summary: "The Zero database transaction mode is invalid.",
1320
+ fix: "Use a supported generated transaction mode.",
1321
+ },
1322
+ zero_db_transaction_start_failed: {
1323
+ summary: "The Zero database transaction could not be started.",
1324
+ fix: "Check database connectivity and retry the mutation.",
1325
+ },
1326
+ zero_db_url_invalid: {
1327
+ summary: "The Zero database URL is malformed.",
1328
+ fix: "Set DATABASE_URL or the generated database variables to a valid MySQL connection URL.",
1329
+ },
1330
+ zero_db_url_missing: {
1331
+ summary: "No Zero database URL is configured.",
1332
+ fix: "Configure DATABASE_URL or finalize the version with database connection variables.",
1333
+ },
1334
+ zero_dev_endpoint_failed: {
1335
+ summary: "A local Zero dev endpoint failed while handling the request.",
1336
+ fix: "Check the local dev console output and fix the endpoint implementation.",
1337
+ },
1338
+ zero_dump_query_invalid: {
1339
+ summary: "The Zero database dump query parameters are invalid.",
1340
+ fix: "Use valid table, limit, and cursor parameters.",
1341
+ },
1342
+ zero_endpoint_index_invalid: {
1343
+ summary: "The Zero endpoint index does not contain valid endpoint mappings.",
1344
+ fix: "Rebuild and republish the Zero project.",
1345
+ },
1346
+ zero_endpoint_index_malformed: {
1347
+ summary: "The Zero endpoint index could not be parsed.",
1348
+ fix: "Rebuild the generated endpoint index and redeploy.",
1349
+ },
1350
+ zero_endpoint_index_path_invalid: {
1351
+ summary: "The Zero endpoint index path is invalid.",
1352
+ fix: "Verify the runtime bundle was finalized with the standard Zero layout.",
1353
+ },
1354
+ zero_endpoint_index_unreadable: {
1355
+ summary: "The Zero endpoint index could not be read.",
1356
+ fix: "Verify the version finalized with zero/endpoints-index.json present.",
1357
+ },
1358
+ zero_endpoint_mismatch: {
1359
+ summary: "The requested Zero endpoint does not match the endpoint artifact.",
1360
+ fix: "Rebuild routes and artifacts together and redeploy the version.",
1361
+ },
1362
+ zero_endpoint_not_found: {
1363
+ summary: "No Zero endpoint artifact exists for this endpoint id.",
1364
+ fix: "Check the route path and rebuild the Zero endpoint index.",
1365
+ },
1366
+ zero_envelope_encode_failed: {
1367
+ summary: "The PHP bridge could not encode the Zero runner request envelope.",
1368
+ fix: "Retry with valid request data; report the issue if it persists.",
1369
+ },
1370
+ zero_js_context_init_failed: {
1371
+ summary: "The Zero runner could not initialize a QuickJS context.",
1372
+ fix: "Retry or rebuild the runner; report persistent runtime initialization failures.",
1373
+ },
1374
+ zero_js_execution_failed: {
1375
+ summary: "The Zero endpoint JavaScript threw during execution.",
1376
+ fix: "Inspect the endpoint error and fix the handler code.",
1377
+ },
1378
+ zero_js_execution_timeout: {
1379
+ summary: "The Zero endpoint exceeded its JavaScript execution budget.",
1380
+ fix: "Reduce synchronous work or database round trips in the handler.",
1381
+ },
1382
+ zero_js_globals_failed: {
1383
+ summary: "The Zero runner could not install runtime globals for the endpoint.",
1384
+ fix: "Rebuild with a current runner and report the failure if it repeats.",
1385
+ },
1386
+ zero_js_response_malformed: {
1387
+ summary: "The Zero endpoint returned a malformed runner response.",
1388
+ fix: "Return a valid Response or supported Zero handler result.",
1389
+ },
1390
+ zero_js_runtime_init_failed: {
1391
+ summary: "The Zero runner could not initialize QuickJS.",
1392
+ fix: "Retry on a healthy runtime or rebuild the runner binary.",
1393
+ },
1394
+ zero_log_query_invalid: {
1395
+ summary: "The Zero log query parameters are invalid.",
1396
+ fix: "Use valid cursor, limit, mutationName, and requestId parameters.",
1397
+ },
1398
+ zero_method_not_allowed: {
1399
+ summary: "The request method is not allowed for this Zero endpoint.",
1400
+ fix: "Call the endpoint with one of the methods declared by the Zero route.",
1401
+ },
1402
+ zero_query_name_missing: {
1403
+ summary: "A Zero realtime query subscription did not include a query name.",
1404
+ fix: "Send a query.subscribe frame with a valid query name.",
1405
+ },
1406
+ zero_realtime_forbidden: {
1407
+ summary: "The Zero realtime event intake credential is invalid.",
1408
+ fix: "Send the configured bearer token or a valid signed realtime event.",
1409
+ },
1410
+ zero_realtime_message_invalid: {
1411
+ summary: "The Zero realtime websocket message is malformed.",
1412
+ fix: "Send a supported JSON realtime frame.",
1413
+ },
1414
+ zero_realtime_operation_unsupported: {
1415
+ summary: "The Zero realtime websocket operation is unsupported.",
1416
+ fix: "Use a supported Zero realtime operation such as query.subscribe or query.unsubscribe.",
1417
+ },
1418
+ zero_realtime_query_invalid: {
1419
+ summary: "The Zero realtime query subscription payload is invalid.",
1420
+ fix: "Include a valid query name and argument list.",
1421
+ },
1422
+ zero_realtime_space_required: {
1423
+ summary: "The Zero realtime request does not identify a space.",
1424
+ fix: "Use a /spaces/{spaceId} realtime URL or include a valid spaceId query parameter.",
1425
+ },
1426
+ zero_realtime_unavailable: {
1427
+ summary: "Zero realtime helpers are unavailable for this endpoint.",
1428
+ fix: "Enable realtime capability for the handler and rebuild the project.",
1429
+ },
1430
+ zero_realtime_websocket_forbidden: {
1431
+ summary: "The Zero realtime websocket credential is invalid.",
1432
+ fix: "Send the configured realtime client token by query, header, bearer token, or websocket subprotocol.",
1433
+ },
1434
+ zero_replay_failed: {
1435
+ summary: "The hosted Zero runtime could not fetch realtime replay events.",
1436
+ fix: "Retry shortly; check the central realtime and control-plane logs if it persists.",
1437
+ },
1438
+ zero_replay_query_invalid: {
1439
+ summary: "The hosted Zero realtime replay query is invalid.",
1440
+ fix: "Use a valid afterEventId cursor and numeric limit.",
1441
+ },
1442
+ zero_replay_unavailable: {
1443
+ summary: "Realtime replay is not configured for this Zero version.",
1444
+ fix: "Finalize the version with a Zero realtime replay URL or disable replay catch-up.",
1445
+ },
1446
+ zero_request_body_too_large: {
1447
+ summary: "The Zero request body exceeds the runtime size limit.",
1448
+ fix: "Send a smaller request body or move large payloads to blob/object storage.",
1449
+ },
1450
+ zero_response_too_large: {
1451
+ summary: "The Zero endpoint response exceeds the runtime size limit.",
1452
+ fix: "Return a smaller response body or paginate the data.",
1453
+ },
1454
+ zero_run_operation_unsupported: {
1455
+ summary: "The hosted Zero runtime does not support this run operation yet.",
1456
+ fix: "Use a generated endpoint or deploy a generated run handler for this operation.",
1457
+ },
1458
+ zero_runner_envelope_invalid: {
1459
+ summary: "The Zero runner request envelope is malformed.",
1460
+ fix: "Use the generated runtime bridge and redeploy if generated files are stale.",
1461
+ },
1462
+ zero_runner_failed: {
1463
+ summary: "The Zero runner process exited without a valid response.",
1464
+ fix: "Inspect runtime logs and rebuild the Zero project with the current runner.",
1465
+ },
1466
+ zero_runner_invalid_body: {
1467
+ summary: "The Zero runner returned an invalid response body.",
1468
+ fix: "Check the endpoint response and runner logs.",
1469
+ },
1470
+ zero_runner_invalid_response: {
1471
+ summary: "The Zero runner output was not valid JSON.",
1472
+ fix: "Inspect runner stderr and rebuild the runner if the failure persists.",
1473
+ },
1474
+ zero_runner_invalid_status: {
1475
+ summary: "The Zero runner returned an invalid HTTP status.",
1476
+ fix: "Ensure endpoint handlers return a status between 100 and 599.",
1477
+ },
1478
+ zero_runner_protocol_unsupported: {
1479
+ summary: "The Zero runner received an unsupported invoke protocol.",
1480
+ fix: "Rebuild and redeploy so the PHP bridge and Rust runner versions match.",
1481
+ },
1482
+ zero_runner_response_encode_failed: {
1483
+ summary: "The Zero runner could not encode its response.",
1484
+ fix: "Return JSON-serializable response metadata from the endpoint.",
1485
+ },
1486
+ zero_runner_stdin_invalid: {
1487
+ summary: "The Zero runner could not read its request envelope.",
1488
+ fix: "Retry; report the runtime bridge failure if it persists.",
1489
+ },
1490
+ zero_runner_stdin_too_large: {
1491
+ summary: "The Zero runner request envelope is too large.",
1492
+ fix: "Reduce request headers, body size, or route parameters.",
1493
+ },
1494
+ zero_runner_unavailable: {
1495
+ summary: "The Zero runner process could not be started.",
1496
+ fix: "Verify the runner binary is installed and executable in the runtime.",
1497
+ },
1498
+ zero_source_compile_failed: {
1499
+ summary: "The Zero endpoint source fallback failed to compile.",
1500
+ fix: "Fix the endpoint source and rebuild bytecode.",
1501
+ },
1502
+ zero_source_hash_mismatch: {
1503
+ summary: "The Zero endpoint source hash does not match its artifact metadata.",
1504
+ fix: "Rebuild and republish so source and endpoint metadata are from the same build.",
1505
+ },
1506
+ zero_source_invalid: {
1507
+ summary: "The Zero endpoint source is invalid.",
1508
+ fix: "Fix the generated endpoint source and rebuild.",
1509
+ },
1510
+ zero_source_path_invalid: {
1511
+ summary: "The Zero endpoint source path is invalid.",
1512
+ fix: "Rebuild the Zero routes so source paths stay inside the version bundle.",
1513
+ },
1514
+ zero_source_unreadable: {
1515
+ summary: "The Zero endpoint source file could not be read.",
1516
+ fix: "Verify the version finalized with generated source files present.",
1517
+ },
1518
+ wp_cloud_anonymous_pool_required: {
1519
+ summary: "This operation requires an anonymous pool site.",
1520
+ fix: "Target a pool-class site.",
1521
+ },
1522
+ wp_cloud_assignment_kind_mismatch: {
1523
+ summary: "The domain assignment's kind does not match the site.",
1524
+ fix: "Verify the assignment against the site's hosting kind.",
1525
+ },
1526
+ wp_cloud_assignment_space_mismatch: {
1527
+ summary: "The domain assignment belongs to a different space.",
1528
+ fix: "Use the assignment's owning space.",
1529
+ },
1530
+ wp_cloud_assignment_team_mismatch: {
1531
+ summary: "The domain assignment belongs to a different team.",
1532
+ fix: "Use the assignment's owning team.",
1533
+ },
1534
+ wp_cloud_client_in_use: {
1535
+ summary: "The provider client is in use and cannot be removed.",
1536
+ fix: "Reassign or delete the dependent sites first.",
1537
+ },
1538
+ wp_cloud_client_not_found: {
1539
+ summary: "The provider client was not found.",
1540
+ fix: "Verify the provider client id.",
1541
+ },
1542
+ wp_cloud_site_still_assigned: {
1543
+ summary: "The provider site still has assignments and cannot be released.",
1544
+ fix: "Remove the site's assignments first.",
1545
+ },
1546
+ wp_cloud_team_shared_site_exists: {
1547
+ summary: "The team already has a shared site of this class.",
1548
+ fix: "Use the existing shared site.",
1549
+ },
1550
+ wp_cloud_webhook_secret_not_configured: {
1551
+ summary: "The WP.Cloud webhook secret is not configured on this deployment.",
1552
+ fix: "Set the WP.Cloud webhook secret in the control-plane environment.",
1553
+ },
1554
+ };
1555
+ const PRODUCT = BRAND.productName;
1556
+ /** One generated reference page per error code; the `.md` twin is this exact text. */
1557
+ export function errorDocMarkdown(code) {
1558
+ const doc = ERROR_DOCS[code];
1559
+ return [
1560
+ `# ${code}`,
1561
+ "",
1562
+ doc.summary,
1563
+ "",
1564
+ `**How to resolve:** ${doc.fix}`,
1565
+ "",
1566
+ "## Error envelope",
1567
+ "",
1568
+ `Every ${PRODUCT} API error uses one envelope. \`code\` is stable and machine-readable,`,
1569
+ "`param` (when present) points at the offending request field, and `details` may carry",
1570
+ "structured context. Match on `code`, never on `message`.",
1571
+ "",
1572
+ "```json",
1573
+ JSON.stringify({
1574
+ error: {
1575
+ code,
1576
+ message: doc.summary,
1577
+ docsUrl: errorDocsUrl(code),
1578
+ requestId: "req_4mz0v8qk",
1579
+ },
1580
+ }, null, 2),
1581
+ "```",
1582
+ "",
1583
+ `See the full list of error codes in the [error reference](${BRAND.websiteOrigin}/docs/errors).`,
1584
+ "",
1585
+ ].join("\n");
1586
+ }
1587
+ /** The generated `/docs/errors` index page; the `.md` twin is this exact text. */
1588
+ export function errorDocsIndexMarkdown() {
1589
+ return [
1590
+ "# Error reference",
1591
+ "",
1592
+ `Every ${PRODUCT} API error response carries a stable \`code\` and a \`docsUrl\` that`,
1593
+ "links to one of the pages below. Codes are never renamed or removed. Match on",
1594
+ "`code` in clients; `message` text may improve over time.",
1595
+ "",
1596
+ "| Code | Meaning |",
1597
+ "| --- | --- |",
1598
+ ...ERROR_CODES.map((code) => `| [\`${code}\`](/docs/errors/${code}) | ${ERROR_DOCS[code].summary} |`),
1599
+ "",
1600
+ ].join("\n");
1601
+ }