@spacefast/common 0.0.3 → 0.0.6

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 (159) hide show
  1. package/dist/agents/connect-targets.d.ts +133 -0
  2. package/dist/agents/connect-targets.js +224 -0
  3. package/dist/brand.d.ts +1 -0
  4. package/dist/brand.js +5 -0
  5. package/dist/config/domains.d.ts +12 -6
  6. package/dist/config/domains.js +30 -38
  7. package/dist/contracts/access.d.ts +829 -129
  8. package/dist/contracts/access.js +771 -148
  9. package/dist/contracts/activity.d.ts +5 -5
  10. package/dist/contracts/activity.js +28 -2
  11. package/dist/contracts/annotations.d.ts +3 -5
  12. package/dist/contracts/api-keys.d.ts +9 -10
  13. package/dist/contracts/api-keys.js +9 -6
  14. package/dist/contracts/archives.d.ts +22 -16
  15. package/dist/contracts/archives.js +11 -4
  16. package/dist/contracts/billing.d.ts +21 -30
  17. package/dist/contracts/builds.d.ts +21 -17
  18. package/dist/contracts/builds.js +12 -0
  19. package/dist/contracts/channels.d.ts +2 -2
  20. package/dist/contracts/common.d.ts +7 -5
  21. package/dist/contracts/common.js +4 -0
  22. package/dist/contracts/continuation.d.ts +63 -0
  23. package/dist/contracts/continuation.js +91 -0
  24. package/dist/contracts/countries.d.ts +2 -0
  25. package/dist/contracts/countries.js +261 -0
  26. package/dist/contracts/deployments.d.ts +34 -34
  27. package/dist/contracts/device-auth.d.ts +4 -11
  28. package/dist/contracts/device-auth.js +4 -0
  29. package/dist/contracts/docs.d.ts +119 -0
  30. package/dist/contracts/docs.js +51 -0
  31. package/dist/contracts/domains.d.ts +295 -253
  32. package/dist/contracts/domains.js +26 -4
  33. package/dist/contracts/enums.d.ts +17 -18
  34. package/dist/contracts/enums.js +25 -14
  35. package/dist/contracts/error-code-meta.d.ts +84 -0
  36. package/dist/contracts/error-code-meta.js +99 -10
  37. package/dist/contracts/error-codes.d.ts +1 -1
  38. package/dist/contracts/error-codes.js +17 -0
  39. package/dist/contracts/events.d.ts +13 -13
  40. package/dist/contracts/features.d.ts +93 -23
  41. package/dist/contracts/features.js +178 -13
  42. package/dist/contracts/git.d.ts +3 -9
  43. package/dist/contracts/ids.d.ts +5 -0
  44. package/dist/contracts/ids.js +5 -0
  45. package/dist/contracts/internal.d.ts +3 -3
  46. package/dist/contracts/mcp.d.ts +34 -36
  47. package/dist/contracts/me.d.ts +8 -8
  48. package/dist/contracts/me.js +1 -1
  49. package/dist/contracts/oauth-resources.d.ts +19 -8
  50. package/dist/contracts/oauth-resources.js +44 -13
  51. package/dist/contracts/operations.d.ts +2 -2
  52. package/dist/contracts/plan-policy.d.ts +4 -4
  53. package/dist/contracts/platform.d.ts +3 -105
  54. package/dist/contracts/platform.js +0 -50
  55. package/dist/contracts/push-new.d.ts +4 -4
  56. package/dist/contracts/quotas.d.ts +2 -0
  57. package/dist/contracts/quotas.js +8 -0
  58. package/dist/contracts/repository-connections.d.ts +1 -3
  59. package/dist/contracts/resources.d.ts +112 -28
  60. package/dist/contracts/resources.js +26 -2
  61. package/dist/contracts/routes.d.ts +0 -2
  62. package/dist/contracts/runtime-api.d.ts +365 -43
  63. package/dist/contracts/runtime-api.js +275 -6
  64. package/dist/contracts/sites.d.ts +45 -28
  65. package/dist/contracts/sites.js +21 -0
  66. package/dist/contracts/space-config.d.ts +201 -2
  67. package/dist/contracts/space-config.js +135 -5
  68. package/dist/contracts/spaces.d.ts +423 -162
  69. package/dist/contracts/spaces.js +94 -8
  70. package/dist/contracts/superadmin-emails.d.ts +7 -5
  71. package/dist/contracts/superadmin-emails.js +8 -0
  72. package/dist/contracts/superadmin-queues.d.ts +32 -32
  73. package/dist/contracts/superadmin-spaces.d.ts +418 -24
  74. package/dist/contracts/superadmin-spaces.js +24 -0
  75. package/dist/contracts/superadmin-tenants.d.ts +8 -8
  76. package/dist/contracts/superadmin.d.ts +17 -104
  77. package/dist/contracts/superadmin.js +6 -14
  78. package/dist/contracts/tags.d.ts +42 -41
  79. package/dist/contracts/tags.js +2 -1
  80. package/dist/contracts/teams.d.ts +40 -23
  81. package/dist/contracts/teams.js +20 -1
  82. package/dist/contracts/theme-json.d.ts +30 -0
  83. package/dist/contracts/theme-json.js +48 -0
  84. package/dist/contracts/transfers.d.ts +9 -9
  85. package/dist/contracts/variables.d.ts +14 -16
  86. package/dist/contracts/variables.js +0 -5
  87. package/dist/contracts/webhooks.d.ts +6 -4
  88. package/dist/contracts/webhooks.js +1 -1
  89. package/dist/contracts/zero.d.ts +13 -18
  90. package/dist/docs/agent-prose.d.ts +43 -3
  91. package/dist/docs/agent-prose.js +153 -10
  92. package/dist/docs/agent-setup.js +48 -15
  93. package/dist/docs/agent-solutions.d.ts +5 -5
  94. package/dist/docs/agent-solutions.js +2 -2
  95. package/dist/docs/catalog.d.ts +650 -0
  96. package/dist/docs/catalog.js +758 -0
  97. package/dist/docs/error-docs.d.ts +0 -2
  98. package/dist/docs/error-docs.js +89 -35
  99. package/dist/docs/index-build.d.ts +17 -0
  100. package/dist/docs/index-build.js +24 -0
  101. package/dist/docs/search.d.ts +54 -0
  102. package/dist/docs/search.js +96 -0
  103. package/dist/docs/skill-distribution.d.ts +5 -3
  104. package/dist/docs/skill-distribution.js +8 -8
  105. package/dist/utils/access-match.d.ts +39 -0
  106. package/dist/utils/access-match.js +296 -0
  107. package/dist/utils/auth-redirect.d.ts +3 -1
  108. package/dist/utils/auth-redirect.js +21 -1
  109. package/dist/utils/build-settings.d.ts +6 -0
  110. package/dist/utils/build-settings.js +429 -46
  111. package/dist/utils/claim-token.d.ts +8 -0
  112. package/dist/utils/claim-token.js +23 -2
  113. package/dist/utils/content-type.d.ts +1 -0
  114. package/dist/utils/content-type.js +1 -1
  115. package/dist/utils/credential-policy.d.ts +54 -0
  116. package/dist/utils/{access-policy.js → credential-policy.js} +28 -2
  117. package/dist/utils/gate-theme.d.ts +61 -0
  118. package/dist/utils/gate-theme.js +217 -0
  119. package/dist/utils/git-repository.d.ts +0 -1
  120. package/dist/utils/git-repository.js +0 -3
  121. package/dist/utils/id-hints.d.ts +8 -0
  122. package/dist/utils/id-hints.js +61 -0
  123. package/dist/utils/local-space-state.d.ts +91 -0
  124. package/dist/utils/local-space-state.js +251 -0
  125. package/dist/utils/oauth-signed-query.d.ts +8 -0
  126. package/dist/utils/oauth-signed-query.js +26 -0
  127. package/dist/utils/publish-detection.d.ts +0 -8
  128. package/dist/utils/publish-detection.js +0 -93
  129. package/dist/utils/publish-policy.d.ts +6 -5
  130. package/dist/utils/publish-policy.js +71 -7
  131. package/dist/utils/query-keys.d.ts +17 -6
  132. package/dist/utils/query-keys.js +27 -4
  133. package/dist/utils/runtime-paths.d.ts +0 -1
  134. package/dist/utils/runtime-paths.js +0 -1
  135. package/dist/utils/runtime-upload-batch.d.ts +18 -0
  136. package/dist/utils/runtime-upload-batch.js +90 -0
  137. package/dist/utils/runtime-upload.d.ts +2 -0
  138. package/dist/utils/runtime-upload.js +5 -0
  139. package/dist/utils/space-config.d.ts +4 -0
  140. package/dist/utils/space-config.js +10 -1
  141. package/dist/utils/space-theme.d.ts +2 -0
  142. package/dist/utils/space-theme.js +9 -0
  143. package/dist/utils/static-runtime-policy.d.ts +1 -1
  144. package/dist/utils/static-runtime-policy.js +47 -15
  145. package/dist/utils/upload-session.d.ts +1 -1
  146. package/dist/utils/wpcom-auth-redirects.d.ts +32 -2
  147. package/dist/utils/wpcom-auth-redirects.js +26 -10
  148. package/dist/vocabulary.d.ts +130 -30
  149. package/dist/vocabulary.js +77 -36
  150. package/package.json +16 -1
  151. package/dist/contracts/account.d.ts +0 -28
  152. package/dist/contracts/account.js +0 -54
  153. package/dist/contracts/intercom.d.ts +0 -6
  154. package/dist/contracts/intercom.js +0 -5
  155. package/dist/contracts/telemetry.d.ts +0 -2
  156. package/dist/contracts/telemetry.js +0 -1
  157. package/dist/utils/access-policy.d.ts +0 -39
  158. package/dist/utils/error-display.d.ts +0 -7
  159. package/dist/utils/error-display.js +0 -42
@@ -0,0 +1,758 @@
1
+ // Canonical, single-sourced documentation catalog. This hand-curated product
2
+ // content (guides + API reference + CLI + recipes) is the ONE source of truth
3
+ // shared by two surfaces so they can never drift:
4
+ // - the CLI's offline `sf docs` index (packages/cli re-exports this module and
5
+ // derives the bundled `docs-index.generated.json` from it), and
6
+ // - the control-plane's machine-readable `GET /v1/docs` API, which builds the
7
+ // same index in memory at startup.
8
+ //
9
+ // Entries are tier-tagged from the SAME disclosure tiers the CLI help uses
10
+ // (vocabulary.ts), so listings are ESSENTIAL by default and widen to FULL /
11
+ // REFERENCE. Vocabulary rules apply: say "space", "publish", "version",
12
+ // "channel", "API key", "infra" — never "deployment"/"project"/"site"/"E2B".
13
+ //
14
+ // The "error" kind entries below are GENERATED from ERROR_DOCS (error-docs.ts),
15
+ // not hand-written — one catalog entry per ERROR_CODES member, reference tier —
16
+ // so every error code is searchable from `sf docs <code>`, `GET /v1/docs?q=`,
17
+ // and MCP search without a second hand-maintained corpus to drift.
18
+ import { errorDocsUrl } from "../contracts/error-codes.js";
19
+ import { ERROR_DOCS } from "./error-docs.js";
20
+ /** Which part of the docs a page belongs to (runtime list + derived type). */
21
+ export const DOC_KINDS = ["guide", "cli", "api", "recipe", "workflow", "error"];
22
+ /** Base URL all bundled docs links resolve against. */
23
+ export const DOCS_BASE_URL = "https://spacefast.com/docs";
24
+ /** Base URL for the standalone recipe pages (served at /recipes, not /docs). */
25
+ export const RECIPES_BASE_URL = "https://spacefast.com/recipes";
26
+ const HAND_WRITTEN_DOCS_CATALOG = [
27
+ // ----- Guides -----------------------------------------------------------
28
+ {
29
+ slug: "quickstart",
30
+ title: "Quickstart",
31
+ kind: "guide",
32
+ tier: "essential",
33
+ summary: "Publish your first space in under two minutes.",
34
+ keywords: ["start", "getting started", "first", "new", "setup", "hello world"],
35
+ url: `${DOCS_BASE_URL}/quickstart`,
36
+ body: "Install the CLI, run `sf init` in your working directory, then `sf publish` to take the current build live on a new space.",
37
+ },
38
+ {
39
+ slug: "publishing",
40
+ title: "Publishing a space",
41
+ kind: "guide",
42
+ tier: "essential",
43
+ summary: "How `sf publish` builds, uploads, and goes live.",
44
+ keywords: ["publish", "go live", "upload", "release", "static"],
45
+ url: `${DOCS_BASE_URL}/publishing`,
46
+ body: "`sf publish` snapshots your output directory into an immutable version and promotes it to the production channel. Use `--no-wait` to return before serving finishes.",
47
+ },
48
+ {
49
+ slug: "versions-and-rollback",
50
+ title: "Versions and rollback",
51
+ kind: "guide",
52
+ tier: "essential",
53
+ summary: "Every publish is an immutable version you can roll back to.",
54
+ keywords: ["version", "rollback", "history", "revert", "channel", "promote"],
55
+ url: `${DOCS_BASE_URL}/rollback`,
56
+ body: "List versions with `sf versions`, promote one to a channel, and undo a bad publish instantly with `sf rollback`.",
57
+ },
58
+ {
59
+ slug: "anonymous-publish",
60
+ title: "Anonymous publish and claim",
61
+ kind: "guide",
62
+ tier: "essential",
63
+ summary: "Publish without an account, then claim the space with its token.",
64
+ keywords: ["anonymous", "claim", "unclaimed", "agent", "token", "adopt"],
65
+ url: `${DOCS_BASE_URL}/anonymous-publish`,
66
+ body: "Publish without logging in to get an instant URL and a claim token; run `sf spaces claim` with that token to bind the space to your account.",
67
+ },
68
+ {
69
+ slug: "agents",
70
+ title: "Agents and MCP",
71
+ kind: "guide",
72
+ tier: "essential",
73
+ summary: "Let an AI agent publish and operate spaces via the CLI, API, or MCP.",
74
+ keywords: ["agent", "ai", "mcp", "model context protocol", "automation", "assistant"],
75
+ url: `${DOCS_BASE_URL}/agents`,
76
+ body: "Agents use the same REST API and CLI as humans. Install the MCP server with `sf mcp install` so an assistant can publish, inspect, and manage spaces with structured tools.",
77
+ },
78
+ // ----- Agent workflows --------------------------------------------------
79
+ {
80
+ slug: "workflow/publish-curl",
81
+ title: "No-install publish with curl",
82
+ kind: "workflow",
83
+ tier: "full",
84
+ summary: "Publish a file or zipped output folder directly to /v1/publish. No account, CLI install, or MCP setup is required for anonymous publishes.",
85
+ keywords: ["publish", "curl", "anonymous", "no install", "claim"],
86
+ url: `${DOCS_BASE_URL}/agents#publish-with-curl`,
87
+ body: "curl publish static file folder archive zip anonymous no account no install live URL immutable version claim link /v1/publish",
88
+ },
89
+ {
90
+ slug: "workflow/publish-receipt",
91
+ title: "Publish receipt fields",
92
+ kind: "workflow",
93
+ tier: "full",
94
+ summary: "Use the receipt as the source of truth: space.liveUrl, version.immutableUrl, shareBlurb, claim.url, claim.expiresAt, links, diagnostics, and errors.",
95
+ keywords: ["receipt", "share", "claim", "diagnostics"],
96
+ url: `${DOCS_BASE_URL}/api#publish`,
97
+ body: "receipt liveUrl immutableUrl shareBlurb claim url expiresAt diagnostics links finalize promote upload errors docsUrl",
98
+ },
99
+ {
100
+ slug: "workflow/continue-after-claim",
101
+ title: "Keep publishing after the user claims",
102
+ kind: "workflow",
103
+ tier: "full",
104
+ summary: "After the owner claims an anonymous space with continuation enabled, exchange the saved claim token once for a durable space-scoped access token, save it over the claim token, and keep publishing.",
105
+ keywords: [
106
+ "continue",
107
+ "exchange",
108
+ "claim token",
109
+ "space_claimed_credential_available",
110
+ "continuation",
111
+ ],
112
+ url: `${DOCS_BASE_URL}/agents#continue-after-claim`,
113
+ body: "continue continuation claim token exchange voucher continue_space POST /v1/anonymous-claim/exchange space_claimed_credential_available continuation_used continuation_unavailable durable access token state.json update after claim claim_status",
114
+ },
115
+ {
116
+ slug: "workflow/secret-handling",
117
+ title: "Secret handling rules",
118
+ kind: "workflow",
119
+ tier: "full",
120
+ summary: "Treat claim tokens, upload tokens, device codes, API keys, auth files, and .spacefast state as credentials. Do not print, commit, archive, or log them.",
121
+ keywords: ["secret", "token", "claim token", "redact"],
122
+ url: `${DOCS_BASE_URL}/agents#secret-handling`,
123
+ body: "secret handling claim token upload token device code API key auth file .spacefast state redact logs transcripts archive",
124
+ },
125
+ {
126
+ slug: "workflow/cli-surface",
127
+ title: "CLI command surface",
128
+ kind: "workflow",
129
+ tier: "full",
130
+ summary: "Use sf for repeat work: publish, versions, rollback, logs, domains, passwords, teams, API calls, and On-Device MCP serving.",
131
+ keywords: ["sf", "cli", "spacefast", "mcp", "json"],
132
+ url: `${DOCS_BASE_URL}/cli`,
133
+ body: "sf spacefast CLI publish versions rollback logs domains passwords teams api mcp setup profile login --json",
134
+ },
135
+ {
136
+ slug: "workflow/mcp-local",
137
+ title: "On-Device MCP through the CLI",
138
+ kind: "workflow",
139
+ tier: "full",
140
+ summary: "Run sf mcp for stdio or sf mcp http --host 127.0.0.1 --port 3945 --path /mcp for On-Device Streamable HTTP.",
141
+ keywords: ["mcp", "stdio", "streamable http", "on-device", "local"],
142
+ url: `${DOCS_BASE_URL}/agents#mcp`,
143
+ body: "MCP on-device local CLI stdio streamable HTTP sf mcp roots files workspace tool calls structuredContent apps",
144
+ },
145
+ {
146
+ slug: "workflow/workspace-files",
147
+ title: "Agent workspace files",
148
+ kind: "workflow",
149
+ tier: "full",
150
+ summary: "Hosted MCP workspace tools edit, import, export, and publish a durable virtual workspace; On-Device MCP workspace tools edit the bounded local root.",
151
+ keywords: [
152
+ "workspace",
153
+ "files",
154
+ "patch",
155
+ "diff",
156
+ "virtual workspace",
157
+ "workspace import",
158
+ "workspace export",
159
+ "just-bash",
160
+ ],
161
+ url: `${DOCS_BASE_URL}/agents#workspace-files`,
162
+ body: "workspace file editing read write patch diff list manifest import export import_url hosted virtual workspace just-bash shell handoff on-device root SPACEFAST_MCP_WORKSPACE_ROOT secret scanning bounded files",
163
+ },
164
+ {
165
+ slug: "workflow/mcp-resources",
166
+ title: "MCP resources for account, teams, spaces, and policy",
167
+ kind: "workflow",
168
+ tier: "full",
169
+ summary: "Use read-only resources for bounded context before tools: account/current, teams/current, spaces/recent, space detail, recent versions, policy/current, and workspace/manifest.",
170
+ keywords: ["resources", "account", "teams", "spaces", "policy", "context"],
171
+ url: `${DOCS_BASE_URL}/agents#mcp-resources`,
172
+ body: "MCP resources account current teams current list spaces recent space detail versions recent domains logs summary policy current workspace manifest tools catalog read-only context redacted",
173
+ },
174
+ {
175
+ slug: "workflow/space-files",
176
+ title: "Space file conventions",
177
+ kind: "workflow",
178
+ tier: "full",
179
+ summary: "Spacefast recognizes _redirects, _headers, nearest 404.html, and sf.jsonc. Static artifacts are served as files; server code is not executed.",
180
+ keywords: ["_redirects", "_headers", "sf.jsonc", "spacefast.jsonc", "404"],
181
+ url: `${DOCS_BASE_URL}/configuration`,
182
+ body: "_redirects _headers 404.html sf.jsonc static artifact server code not executed proxy rewrite headers basic auth",
183
+ },
184
+ {
185
+ slug: "workflow/domains-diagnostics",
186
+ title: "Domains and DNS diagnostics",
187
+ kind: "workflow",
188
+ tier: "full",
189
+ summary: "Use domain diagnostics for attach, verification, DNS, nameserver, and rollback-safe recovery steps.",
190
+ keywords: ["domain", "dns", "verification"],
191
+ url: `${DOCS_BASE_URL}/domains`,
192
+ body: "domains DNS diagnostics attach verification nameservers custom domain certificate recovery instructions",
193
+ },
194
+ {
195
+ slug: "workflow/logs-diagnostics",
196
+ title: "Logs and diagnostics",
197
+ kind: "workflow",
198
+ tier: "full",
199
+ summary: "Use access logs for traffic questions, runtime logs for serving diagnostics, and build logs for publish/finalize failures.",
200
+ keywords: ["logs", "diagnostics", "build logs"],
201
+ url: `${DOCS_BASE_URL}/builds#watch-and-manage-builds`,
202
+ body: "logs access runtime build diagnostics publish finalize failures request id docsUrl suggestions recovery",
203
+ },
204
+ {
205
+ slug: "workflow/agent-auth",
206
+ title: "Agent accounts and OAuth",
207
+ kind: "workflow",
208
+ tier: "full",
209
+ summary: "Prefer OAuth agent accounts with private_key_jwt and SPACEFAST_AGENT_CONFIG for On-Device MCP and automation instead of broad shared API keys.",
210
+ keywords: ["oauth", "agent account", "private_key_jwt", "SPACEFAST_AGENT_CONFIG"],
211
+ url: `${DOCS_BASE_URL}/agents#agent-accounts`,
212
+ body: "OAuth agent account private_key_jwt SPACEFAST_AGENT_CONFIG client credentials scoped token mcp automation teams",
213
+ },
214
+ {
215
+ slug: "custom-domains",
216
+ title: "Custom domains",
217
+ kind: "guide",
218
+ tier: "full",
219
+ summary: "Attach your own domain and let Spacefast manage TLS.",
220
+ keywords: ["domain", "dns", "https", "tls", "certificate", "cname", "nameserver"],
221
+ url: `${DOCS_BASE_URL}/domains`,
222
+ body: "Add a domain with `sf domains add`, point DNS at Spacefast, and a certificate is issued automatically. Inspect status with `sf domains check`.",
223
+ },
224
+ {
225
+ slug: "configuration",
226
+ title: "Configuration (sf.jsonc)",
227
+ kind: "guide",
228
+ tier: "full",
229
+ summary: "Ship space metadata and SPA settings alongside your files.",
230
+ keywords: ["config", "sf.jsonc", "spacefast.jsonc", "metadata", "spa", "schema", "settings"],
231
+ url: `${DOCS_BASE_URL}/configuration`,
232
+ body: "Add `sf.jsonc` at your publish root so configuration travels with each version and rolls back with it. `sf init` scaffolds it with a `$schema` pointer for autocomplete.",
233
+ },
234
+ {
235
+ slug: "environment-variables",
236
+ title: "Environment variables",
237
+ kind: "guide",
238
+ tier: "full",
239
+ summary: "Set build-time configuration and secrets per space.",
240
+ keywords: ["env", "environment", "secrets", "config", "variables", "dotenv"],
241
+ url: `${DOCS_BASE_URL}/configuration`,
242
+ body: "Manage a space's variables with `sf env set` / `sf env ls`, or import a dotenv file with `sf env import`. Secret values are masked in `--json` output.",
243
+ },
244
+ {
245
+ slug: "access-control",
246
+ title: "Access control",
247
+ kind: "guide",
248
+ tier: "full",
249
+ summary: "Password-protect a space or grant access to specific people.",
250
+ keywords: ["access", "password", "grant", "ban", "private", "audience", "auth"],
251
+ url: `${DOCS_BASE_URL}/access`,
252
+ body: "Gate a space with `sf password set`, grant individuals with `sf access grant`, and review effective rules with `sf access effective`.",
253
+ },
254
+ {
255
+ slug: "redirects",
256
+ title: "Redirects",
257
+ kind: "guide",
258
+ tier: "full",
259
+ summary: "Declare redirect rules that travel with each version.",
260
+ keywords: ["redirect", "rewrite", "routing", "301", "302", "_redirects"],
261
+ url: `${DOCS_BASE_URL}/redirects`,
262
+ body: "Add a `_redirects` file at your publish root to redirect, rewrite, or proxy; it compiles at finalize and rolls back with the version. Inspect resolution with `sf routing inspect`.",
263
+ },
264
+ {
265
+ slug: "headers",
266
+ title: "Custom headers",
267
+ kind: "guide",
268
+ tier: "full",
269
+ summary: "Attach response headers and path-scoped Basic Auth.",
270
+ keywords: ["headers", "cache", "security", "basic auth", "_headers", "cors"],
271
+ url: `${DOCS_BASE_URL}/headers`,
272
+ body: "Add a `_headers` file at your publish root to set or remove response headers per path. Path-scoped Basic Auth credentials travel with the publish.",
273
+ },
274
+ {
275
+ slug: "builds",
276
+ title: "Build from Git",
277
+ kind: "guide",
278
+ tier: "full",
279
+ summary: "Connect a repository so pushes build and publish automatically.",
280
+ keywords: ["build", "git", "github", "ci", "push", "connect", "preview"],
281
+ url: `${DOCS_BASE_URL}/builds`,
282
+ body: "Connect a repository with `sf git connect`; each push runs your build on Spacefast and publishes a version, with branches and pull requests getting preview URLs.",
283
+ },
284
+ {
285
+ slug: "collab",
286
+ title: "Collaboration and annotations",
287
+ kind: "guide",
288
+ tier: "full",
289
+ summary: "Leave review comments on a published space.",
290
+ keywords: ["collab", "annotations", "comments", "review", "feedback", "annotate"],
291
+ url: `${DOCS_BASE_URL}/collab`,
292
+ body: "Annotate a live space with review comments and resolve them from the CLI with `sf annotations` or in the dashboard.",
293
+ },
294
+ {
295
+ slug: "analytics",
296
+ title: "Analytics",
297
+ kind: "guide",
298
+ tier: "full",
299
+ summary: "See traffic and visitor counts for a space.",
300
+ keywords: ["analytics", "traffic", "visitors", "stats", "metrics", "pageviews"],
301
+ url: `${DOCS_BASE_URL}/cli`,
302
+ body: "Inspect a space's traffic with `sf analytics`; history depth and granularity depend on the team's plan.",
303
+ },
304
+ {
305
+ slug: "proxy-routes",
306
+ title: "Proxy routes",
307
+ kind: "guide",
308
+ tier: "reference",
309
+ summary: "Proxy selected paths to an upstream origin.",
310
+ keywords: ["proxy", "upstream", "route", "api", "backend", "rewrite"],
311
+ url: `${DOCS_BASE_URL}/proxy-routes`,
312
+ body: "Forward specific path prefixes to an external upstream so a static space can front a dynamic API without exposing the origin.",
313
+ },
314
+ {
315
+ slug: "image-acceleration",
316
+ title: "Image acceleration",
317
+ kind: "guide",
318
+ tier: "reference",
319
+ summary: "Serve optimized, resized images from your space.",
320
+ keywords: ["image", "images", "optimization", "resize", "cdn", "acceleration"],
321
+ url: `${DOCS_BASE_URL}/image-acceleration`,
322
+ body: "Spacefast can resize and re-encode images on the fly so you ship one source asset and serve device-appropriate variants.",
323
+ },
324
+ {
325
+ slug: "integrations/nextjs",
326
+ title: "Next.js integration",
327
+ kind: "guide",
328
+ tier: "reference",
329
+ summary: "Publish a Next.js static export to a space.",
330
+ keywords: ["nextjs", "next", "react", "framework", "integration", "export"],
331
+ url: `${DOCS_BASE_URL}/integrations/nextjs`,
332
+ body: "Build your Next.js static export and publish the output directory with `sf publish`; `sf init` detects the framework and sets the output path.",
333
+ },
334
+ {
335
+ slug: "integrations/vite",
336
+ title: "Vite integration",
337
+ kind: "guide",
338
+ tier: "reference",
339
+ summary: "Publish a Vite build to a space.",
340
+ keywords: ["vite", "react", "vue", "svelte", "framework", "integration", "build"],
341
+ url: `${DOCS_BASE_URL}/integrations/vite`,
342
+ body: "Run your Vite build and publish `dist/` with `sf publish`; `sf init` detects Vite and preconfigures the output directory.",
343
+ },
344
+ {
345
+ slug: "limits",
346
+ title: "Limits and quotas",
347
+ kind: "guide",
348
+ tier: "reference",
349
+ summary: "File counts, sizes, and rate limits per plan.",
350
+ keywords: ["limits", "quota", "size", "rate limit", "plan", "storage"],
351
+ url: `${DOCS_BASE_URL}/limits`,
352
+ body: "Reference for per-space file counts, archive and file size ceilings, version retention, and rate limits, which vary by plan.",
353
+ },
354
+ {
355
+ slug: "troubleshooting",
356
+ title: "Troubleshooting",
357
+ kind: "guide",
358
+ tier: "reference",
359
+ summary: "Diagnose failed publishes, builds, and domains.",
360
+ keywords: ["troubleshoot", "debug", "error", "doctor", "diagnose", "fix"],
361
+ url: `${DOCS_BASE_URL}/troubleshooting`,
362
+ body: "Common publish, build, and domain failures and how to resolve them. Run `sf doctor` to check your local setup and auth state.",
363
+ },
364
+ {
365
+ slug: "migrate-from",
366
+ title: "Migrate to Spacefast",
367
+ kind: "guide",
368
+ tier: "reference",
369
+ summary: "Move from Netlify, Vercel, and other hosts.",
370
+ keywords: ["migrate", "netlify", "vercel", "cloudflare", "github pages", "here.now", "import"],
371
+ url: `${DOCS_BASE_URL}/migrate-from`,
372
+ body: "Step-by-step migrations that map another host's build output, redirects, and headers onto a Spacefast space.",
373
+ },
374
+ // ----- CLI reference ----------------------------------------------------
375
+ {
376
+ slug: "cli",
377
+ title: "CLI overview",
378
+ kind: "cli",
379
+ tier: "essential",
380
+ summary: "Install, authenticate, and the first-publish command path.",
381
+ keywords: ["cli", "sf", "command", "install", "overview", "help"],
382
+ url: `${DOCS_BASE_URL}/cli`,
383
+ body: "Run `sf help` for the essential commands, `sf help --full` for everything. The CLI emits a `{ data }` / `{ error }` JSON envelope under `--json`.",
384
+ },
385
+ {
386
+ slug: "cli/publish",
387
+ title: "sf publish",
388
+ kind: "cli",
389
+ tier: "essential",
390
+ summary: "Build, upload, and take the current output live on a space.",
391
+ keywords: ["publish", "sf publish", "go live", "upload", "release"],
392
+ url: `${DOCS_BASE_URL}/cli`,
393
+ body: "`sf publish [DIR]` snapshots a directory into an immutable version and promotes it to the production channel. Add `--no-wait` to return before serving finishes.",
394
+ },
395
+ {
396
+ slug: "login",
397
+ title: "sf login",
398
+ kind: "cli",
399
+ tier: "essential",
400
+ summary: "Authenticate the CLI with your Spacefast account.",
401
+ keywords: ["login", "auth", "authenticate", "token", "device", "signin"],
402
+ url: `${DOCS_BASE_URL}/cli`,
403
+ body: "`sf login` starts the device-authorization flow; for non-interactive use pass `--token` or set `SPACEFAST_TOKEN`.",
404
+ },
405
+ {
406
+ slug: "init",
407
+ title: "sf init",
408
+ kind: "cli",
409
+ tier: "essential",
410
+ summary: "Scaffold an sf.jsonc config in the current directory.",
411
+ keywords: ["init", "config", "scaffold", "sf.jsonc", "setup"],
412
+ url: `${DOCS_BASE_URL}/cli`,
413
+ body: "`sf init` detects your framework and writes a starter `sf.jsonc` so subsequent `sf publish` runs are zero-config.",
414
+ },
415
+ {
416
+ slug: "claim",
417
+ title: "sf spaces claim",
418
+ kind: "cli",
419
+ tier: "essential",
420
+ summary: "Attach an anonymously-published space to your account.",
421
+ keywords: ["claim", "anonymous", "attach", "token", "adopt", "spaces"],
422
+ url: `${DOCS_BASE_URL}/cli`,
423
+ body: "After an agent publishes anonymously, run `sf spaces claim` with the claim token to bind the space to your account.",
424
+ },
425
+ {
426
+ slug: "cli/spaces",
427
+ title: "sf spaces",
428
+ kind: "cli",
429
+ tier: "full",
430
+ summary: "List, inspect, transfer, import, and remove spaces.",
431
+ keywords: ["spaces", "space", "ls", "get", "rm", "transfer", "import", "export"],
432
+ url: `${DOCS_BASE_URL}/cli`,
433
+ body: "The `sf spaces` group manages spaces: `ls`, `get`, `claim`, `transfer`, `duplicate`, `import`/`export`, and `rm`.",
434
+ },
435
+ {
436
+ slug: "cli/versions",
437
+ title: "sf versions",
438
+ kind: "cli",
439
+ tier: "full",
440
+ summary: "List, inspect, download, and remove immutable versions.",
441
+ keywords: ["versions", "version", "ls", "get", "download", "rollback", "history"],
442
+ url: `${DOCS_BASE_URL}/cli`,
443
+ body: "`sf versions ls` shows a space's history; `sf versions get` inspects one and `sf rollback` promotes an earlier version back to live.",
444
+ },
445
+ {
446
+ slug: "cli/channels",
447
+ title: "sf channels",
448
+ kind: "cli",
449
+ tier: "full",
450
+ summary: "List channels and see which version each points at.",
451
+ keywords: ["channels", "channel", "promote", "production", "preview", "history"],
452
+ url: `${DOCS_BASE_URL}/cli`,
453
+ body: "`sf channels ls` lists a space's channels and their current version; `sf channels history` shows past pointer moves. Move a channel with `sf promote`.",
454
+ },
455
+ {
456
+ slug: "cli/domains",
457
+ title: "sf domains",
458
+ kind: "cli",
459
+ tier: "full",
460
+ summary: "Add, check, and manage custom domains and DNS.",
461
+ keywords: ["domains", "domain", "dns", "add", "check", "nameservers", "diagnostics"],
462
+ url: `${DOCS_BASE_URL}/cli`,
463
+ body: "The `sf domains` group covers `add`, `check`, `diagnostics`, `ls`, `rm`, and a full `dns` subtree for managing records and nameservers.",
464
+ },
465
+ {
466
+ slug: "cli/env",
467
+ title: "sf env",
468
+ kind: "cli",
469
+ tier: "full",
470
+ summary: "Set, list, import, and pull a space's variables.",
471
+ keywords: ["env", "environment", "variables", "secrets", "set", "import", "pull"],
472
+ url: `${DOCS_BASE_URL}/cli`,
473
+ body: "`sf env set` / `sf env ls` manage a space's variables; `sf env import` loads a dotenv file and `sf env pull` writes them back out.",
474
+ },
475
+ {
476
+ slug: "cli/builds",
477
+ title: "sf builds",
478
+ kind: "cli",
479
+ tier: "full",
480
+ summary: "List, inspect, and retry cloud builds.",
481
+ keywords: ["builds", "build", "ls", "logs", "retry", "cancel", "ci"],
482
+ url: `${DOCS_BASE_URL}/cli`,
483
+ body: "`sf builds ls` lists cloud builds; `sf builds logs`, `sf builds retry`, and `sf builds cancel` operate on a single build.",
484
+ },
485
+ {
486
+ slug: "cli/git",
487
+ title: "sf git",
488
+ kind: "cli",
489
+ tier: "full",
490
+ summary: "Connect a repository for push-to-publish builds.",
491
+ keywords: ["git", "github", "connect", "repository", "ci", "sync", "disconnect"],
492
+ url: `${DOCS_BASE_URL}/cli`,
493
+ body: "`sf git connect` links a repository so pushes build and publish automatically; `sf git ls`, `sf git sync`, and `sf git disconnect` manage the connection.",
494
+ },
495
+ {
496
+ slug: "cli/access",
497
+ title: "sf access",
498
+ kind: "cli",
499
+ tier: "full",
500
+ summary: "Grant, ban, and inspect who can view a space.",
501
+ keywords: ["access", "grant", "ban", "password", "effective", "rules", "policy"],
502
+ url: `${DOCS_BASE_URL}/cli`,
503
+ body: "`sf access grant` / `sf access ban` edit access rules; `sf access effective` shows the resolved policy. Use `sf password set` for a shared password.",
504
+ },
505
+ {
506
+ slug: "cli/teams",
507
+ title: "sf teams",
508
+ kind: "cli",
509
+ tier: "full",
510
+ summary: "Create teams, invite members, and switch context.",
511
+ keywords: ["teams", "team", "members", "invitations", "switch", "create"],
512
+ url: `${DOCS_BASE_URL}/cli`,
513
+ body: "`sf teams create` makes a team, `sf teams invitations add` invites people, `sf teams members ls` lists them, and `sf teams switch` sets the active team.",
514
+ },
515
+ {
516
+ slug: "cli/api-keys",
517
+ title: "sf api-keys",
518
+ kind: "cli",
519
+ tier: "full",
520
+ summary: "Create and revoke API keys for the platform API.",
521
+ keywords: ["api-keys", "api key", "token", "create", "revoke", "list", "credential"],
522
+ url: `${DOCS_BASE_URL}/cli`,
523
+ body: "`sf api-keys create` mints a bearer key (shown once, masked in `--json`); `sf api-keys list` and `sf api-keys revoke` manage existing keys.",
524
+ },
525
+ {
526
+ slug: "cli/analytics",
527
+ title: "sf analytics",
528
+ kind: "cli",
529
+ tier: "full",
530
+ summary: "Print traffic and visitor counts for a space.",
531
+ keywords: ["analytics", "traffic", "visitors", "stats", "metrics"],
532
+ url: `${DOCS_BASE_URL}/cli`,
533
+ body: "`sf analytics` reports a space's traffic; history depth and granularity depend on the team's plan.",
534
+ },
535
+ {
536
+ slug: "cli/api",
537
+ title: "sf api",
538
+ kind: "cli",
539
+ tier: "full",
540
+ summary: "Make an authenticated raw call to the platform API.",
541
+ keywords: ["api", "sf api", "http", "raw", "request", "curl", "endpoint"],
542
+ url: `${DOCS_BASE_URL}/cli`,
543
+ body: "`sf api <METHOD> <PATH>` sends an authenticated request against the platform API and prints the `{ data }` / `{ error }` envelope — handy for endpoints without a dedicated command.",
544
+ },
545
+ {
546
+ slug: "cli/mcp",
547
+ title: "sf mcp",
548
+ kind: "cli",
549
+ tier: "full",
550
+ summary: "Run and install the Spacefast MCP server.",
551
+ keywords: ["mcp", "model context protocol", "agent", "install", "server", "tools"],
552
+ url: `${DOCS_BASE_URL}/cli`,
553
+ body: "`sf mcp` runs the MCP server so an AI assistant can call Spacefast tools; `sf mcp install` wires it into a supported client's config.",
554
+ },
555
+ {
556
+ slug: "cli/docs",
557
+ title: "sf docs",
558
+ kind: "cli",
559
+ tier: "full",
560
+ summary: "Search the offline documentation index from the CLI.",
561
+ keywords: ["docs", "search", "help", "reference", "offline", "topic"],
562
+ url: `${DOCS_BASE_URL}/cli`,
563
+ body: "`sf docs` lists documentation topics and `sf docs <topic>` prints a page. The index ships with the CLI and mirrors the machine-readable `GET /v1/docs` API.",
564
+ },
565
+ {
566
+ slug: "json-output",
567
+ title: "JSON output and exit codes",
568
+ kind: "cli",
569
+ tier: "full",
570
+ summary: "Machine-readable envelopes and stable exit codes for scripts.",
571
+ keywords: ["json", "exit code", "scripting", "envelope", "automation", "ci", "agent"],
572
+ url: `${DOCS_BASE_URL}/cli`,
573
+ body: "Pass `--json` for a `{ data }` success or `{ error }` failure envelope on stdout/stderr. Exit codes are stable so scripts and agents can branch on them.",
574
+ },
575
+ // ----- API reference ----------------------------------------------------
576
+ {
577
+ slug: "api",
578
+ title: "Platform API overview",
579
+ kind: "api",
580
+ tier: "full",
581
+ summary: "Authenticate and call the Spacefast platform API.",
582
+ keywords: ["api", "rest", "http", "platform", "endpoint", "openapi", "bearer"],
583
+ url: `${DOCS_BASE_URL}/api`,
584
+ body: "The platform API uses bearer API keys and returns the same `{ data }` / `{ error }` envelope as the CLI. Create a key with `sf api-keys create`.",
585
+ },
586
+ {
587
+ slug: "api/publish",
588
+ title: "Publish API",
589
+ kind: "api",
590
+ tier: "full",
591
+ summary: "Publish a version in a single authenticated request.",
592
+ keywords: ["api", "publish", "upload", "version", "archive", "http"],
593
+ url: `${DOCS_BASE_URL}/api`,
594
+ body: "Send your files in one authenticated publish request to create an immutable version and take it live; the response carries the space and live URL.",
595
+ },
596
+ {
597
+ slug: "api/spaces",
598
+ title: "Spaces API",
599
+ kind: "api",
600
+ tier: "full",
601
+ summary: "Create, list, and update spaces over HTTP.",
602
+ keywords: ["api", "spaces", "space", "create", "list", "endpoint"],
603
+ url: `${DOCS_BASE_URL}/api`,
604
+ body: "`GET /v1/spaces` lists spaces; `POST /v1/spaces` creates one. Responses carry the space id, slug, and live URL.",
605
+ },
606
+ {
607
+ slug: "api/versions",
608
+ title: "Versions API",
609
+ kind: "api",
610
+ tier: "full",
611
+ summary: "List versions and promote them to channels over HTTP.",
612
+ keywords: ["api", "versions", "publish", "channel", "promote", "rollback"],
613
+ url: `${DOCS_BASE_URL}/api`,
614
+ body: "List a space's versions, then promote one to a channel to move traffic. Rolling back is promoting an earlier version.",
615
+ },
616
+ {
617
+ slug: "api/domains",
618
+ title: "Domains API",
619
+ kind: "api",
620
+ tier: "reference",
621
+ summary: "Attach and inspect custom domains over HTTP.",
622
+ keywords: ["api", "domains", "domain", "dns", "certificate", "endpoint"],
623
+ url: `${DOCS_BASE_URL}/api`,
624
+ body: "Add a custom domain, read its verification and certificate status, and manage DNS records through the platform API.",
625
+ },
626
+ {
627
+ slug: "api/teams",
628
+ title: "Teams API",
629
+ kind: "api",
630
+ tier: "reference",
631
+ summary: "Manage teams, members, and invitations over HTTP.",
632
+ keywords: ["api", "teams", "team", "members", "invitations", "endpoint"],
633
+ url: `${DOCS_BASE_URL}/api`,
634
+ body: "Create teams, list members, and manage invitations programmatically. Webhooks and API keys are team-scoped.",
635
+ },
636
+ {
637
+ slug: "api/docs",
638
+ title: "Docs API (GET /v1/docs)",
639
+ kind: "api",
640
+ tier: "reference",
641
+ summary: "Fetch the machine-readable documentation index.",
642
+ keywords: ["api", "docs", "index", "discovery", "machine-readable", "v1/docs"],
643
+ url: `${DOCS_BASE_URL}/api`,
644
+ body: "`GET /v1/docs` returns the tier-aware docs index (filter with `q` and `category`); `GET /v1/docs/{slug}` returns one page. It mirrors the CLI's offline `sf docs`.",
645
+ },
646
+ {
647
+ slug: "api/webhooks",
648
+ title: "Webhooks",
649
+ kind: "api",
650
+ tier: "reference",
651
+ summary: "Subscribe to version, build, and domain lifecycle events.",
652
+ keywords: ["api", "webhook", "events", "callback", "notifications", "build", "signature"],
653
+ url: `${DOCS_BASE_URL}/webhooks`,
654
+ body: "Register a team-scoped, signed webhook to receive version, build, domain, and transfer events. Verify the signature header before trusting a payload.",
655
+ },
656
+ {
657
+ slug: "api/platform",
658
+ title: "Platform (tenant) API",
659
+ kind: "api",
660
+ tier: "reference",
661
+ summary: "The tenant-facing platform API for running Spacefast as infra.",
662
+ keywords: ["api", "platform", "tenant", "infra", "openapi", "multi-tenant"],
663
+ url: `${DOCS_BASE_URL}/platforms`,
664
+ body: "The platform API is the tenant-facing surface for operating Spacefast as hosting infra. It shares the `{ data }` / `{ error }` envelope and is documented via OpenAPI.",
665
+ },
666
+ // ----- Recipes ----------------------------------------------------------
667
+ {
668
+ slug: "recipes/github-deploys",
669
+ title: "Publish from GitHub",
670
+ kind: "recipe",
671
+ tier: "full",
672
+ summary: "Connect a repository so pushes publish automatically.",
673
+ keywords: ["github", "git", "ci", "push", "connect", "automatic", "recipe"],
674
+ url: `${DOCS_BASE_URL}/builds`,
675
+ body: "Connect a repository with `sf git connect`; each push builds on Spacefast and publishes a version, with pull requests getting preview URLs.",
676
+ },
677
+ {
678
+ slug: "recipes/preview-channels",
679
+ title: "Preview channels for pull requests",
680
+ kind: "recipe",
681
+ tier: "full",
682
+ summary: "Give every branch a shareable preview URL.",
683
+ keywords: ["preview", "channel", "branch", "pull request", "staging", "recipe"],
684
+ url: `${DOCS_BASE_URL}/builds`,
685
+ body: "Push a branch or open a pull request on a connected repository, or publish to a named channel, to get an isolated preview URL without touching production.",
686
+ },
687
+ {
688
+ slug: "recipes/agent-publish",
689
+ title: "Let an agent publish for you",
690
+ kind: "recipe",
691
+ tier: "full",
692
+ summary: "Drive a first publish from an AI agent, then claim it.",
693
+ keywords: ["agent", "ai", "mcp", "anonymous", "claim", "automation", "recipe"],
694
+ url: `${DOCS_BASE_URL}/anonymous-publish`,
695
+ body: "Let an agent publish anonymously for an instant URL and a claim token, then hand the token to a human who runs `sf spaces claim`.",
696
+ },
697
+ {
698
+ slug: "recipes/custom-domain",
699
+ title: "Add a custom domain",
700
+ kind: "recipe",
701
+ tier: "full",
702
+ summary: "Point your own domain at a space with automatic TLS.",
703
+ keywords: ["domain", "custom domain", "dns", "tls", "https", "recipe"],
704
+ url: `${RECIPES_BASE_URL}/custom-domain`,
705
+ body: "Add the domain with `sf domains add`, set the DNS records Spacefast prints, and wait for `sf domains check` to report a ready certificate.",
706
+ },
707
+ {
708
+ slug: "recipes/password-protect",
709
+ title: "Password-protect a space",
710
+ kind: "recipe",
711
+ tier: "full",
712
+ summary: "Put one shared password in front of a whole space.",
713
+ keywords: ["password", "protect", "private", "access", "gate", "recipe"],
714
+ url: `${RECIPES_BASE_URL}/password-protect-a-space`,
715
+ body: "Run `sf password set` to gate a space behind a single shared secret; clear it later with `sf password clear`.",
716
+ },
717
+ {
718
+ slug: "recipes/redirects",
719
+ title: "Set up redirects",
720
+ kind: "recipe",
721
+ tier: "reference",
722
+ summary: "Add redirect rules that ship and roll back with a version.",
723
+ keywords: ["redirect", "rewrite", "routing", "301", "recipe"],
724
+ url: `${RECIPES_BASE_URL}/redirects`,
725
+ body: "Add redirect rules to a `_redirects` file at your publish root so they publish as part of the version and roll back with it.",
726
+ },
727
+ {
728
+ slug: "recipes/migrate-dns",
729
+ title: "Migrate DNS to a custom domain",
730
+ kind: "recipe",
731
+ tier: "reference",
732
+ summary: "Cut traffic over to a Spacefast-served domain safely.",
733
+ keywords: ["dns", "migrate", "cutover", "domain", "nameserver", "recipe"],
734
+ url: `${RECIPES_BASE_URL}/custom-domain`,
735
+ body: "Pre-stage the domain with `sf domains add`, verify the certificate is ready with `sf domains check`, then update DNS to flip traffic with zero downtime.",
736
+ },
737
+ ];
738
+ // ----- Error reference (generated) -----------------------------------------
739
+ // One reference-tier catalog entry per ERROR_DOCS member, so `sf docs <code>`,
740
+ // `GET /v1/docs?q=<code>`, and MCP search all resolve error codes in a single
741
+ // query. Slug is `errors/{code}` (matches the /docs/errors/{code} route); body
742
+ // is the summary + fix, mirroring the generated error doc page.
743
+ function errorDocsCatalogEntries() {
744
+ return Object.entries(ERROR_DOCS).map(([code, doc]) => ({
745
+ slug: `errors/${code}`,
746
+ title: code,
747
+ kind: "error",
748
+ tier: "reference",
749
+ summary: doc.summary,
750
+ keywords: ["error", "code", code],
751
+ url: errorDocsUrl(code),
752
+ body: `${doc.summary} **How to resolve:** ${doc.fix}`,
753
+ }));
754
+ }
755
+ export const DOCS_CATALOG = [
756
+ ...HAND_WRITTEN_DOCS_CATALOG,
757
+ ...errorDocsCatalogEntries(),
758
+ ];