@spacefast/common 0.0.11 → 0.0.13

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 (160) hide show
  1. package/dist/agents/connect-targets.d.ts +4 -4
  2. package/dist/agents/connect-targets.js +3 -3
  3. package/dist/agents/private-key-oauth.d.ts +37 -0
  4. package/dist/agents/private-key-oauth.js +158 -0
  5. package/dist/config/domains.js +1 -1
  6. package/dist/config/index.d.ts +1 -0
  7. package/dist/config/index.js +1 -0
  8. package/dist/config/postgres-budget.d.ts +126 -0
  9. package/dist/config/postgres-budget.js +135 -0
  10. package/dist/config/postgres-budget.json +50 -0
  11. package/dist/contracts/access.d.ts +386 -1183
  12. package/dist/contracts/access.js +240 -1018
  13. package/dist/contracts/activity.d.ts +1 -1
  14. package/dist/contracts/activity.js +11 -19
  15. package/dist/contracts/api-keys.d.ts +69 -45
  16. package/dist/contracts/api-keys.js +3 -0
  17. package/dist/contracts/archives.d.ts +9 -10
  18. package/dist/contracts/archives.js +4 -6
  19. package/dist/contracts/builds.d.ts +8 -8
  20. package/dist/contracts/builds.js +28 -48
  21. package/dist/contracts/channels.js +1 -2
  22. package/dist/contracts/comments.d.ts +102 -93
  23. package/dist/contracts/comments.js +121 -63
  24. package/dist/contracts/common.d.ts +4 -3
  25. package/dist/contracts/common.js +2 -0
  26. package/dist/contracts/countries.js +2 -7
  27. package/dist/contracts/data-source-routes.d.ts +20 -0
  28. package/dist/contracts/data-source-routes.js +15 -0
  29. package/dist/contracts/deployments.d.ts +3 -3
  30. package/dist/contracts/device-auth.d.ts +21 -15
  31. package/dist/contracts/docs.d.ts +5 -5
  32. package/dist/contracts/domains.d.ts +261 -1330
  33. package/dist/contracts/domains.js +39 -301
  34. package/dist/contracts/email-preferences.d.ts +50 -0
  35. package/dist/contracts/email-preferences.js +44 -0
  36. package/dist/contracts/enums.d.ts +3 -5
  37. package/dist/contracts/enums.js +3 -8
  38. package/dist/contracts/error-code-meta.d.ts +99 -33
  39. package/dist/contracts/error-code-meta.js +36 -9
  40. package/dist/contracts/error-codes.d.ts +1 -1
  41. package/dist/contracts/error-codes.js +28 -11
  42. package/dist/contracts/execution.d.ts +212 -0
  43. package/dist/contracts/execution.js +288 -0
  44. package/dist/contracts/feature-lifecycle.d.ts +498 -2
  45. package/dist/contracts/feature-lifecycle.js +539 -2
  46. package/dist/contracts/features.d.ts +184 -74
  47. package/dist/contracts/features.js +4 -303
  48. package/dist/contracts/functions.d.ts +729 -0
  49. package/dist/contracts/functions.js +485 -0
  50. package/dist/contracts/git.d.ts +1 -1
  51. package/dist/contracts/grants.d.ts +1158 -0
  52. package/dist/contracts/grants.js +696 -0
  53. package/dist/contracts/ids.d.ts +6 -5
  54. package/dist/contracts/ids.js +6 -5
  55. package/dist/contracts/internal.d.ts +3 -3
  56. package/dist/contracts/mcp.d.ts +12 -12
  57. package/dist/contracts/me.js +1 -1
  58. package/dist/contracts/mounts.d.ts +142 -0
  59. package/dist/contracts/mounts.js +56 -0
  60. package/dist/contracts/oauth-resources.d.ts +5 -5
  61. package/dist/contracts/oauth-resources.js +2 -0
  62. package/dist/contracts/operations.d.ts +4 -4
  63. package/dist/contracts/pages.d.ts +6 -14
  64. package/dist/contracts/pages.js +11 -23
  65. package/dist/contracts/plan-policy.d.ts +2 -9
  66. package/dist/contracts/plan-policy.js +1 -4
  67. package/dist/contracts/platform.d.ts +80 -32
  68. package/dist/contracts/platform.js +59 -12
  69. package/dist/contracts/push-new.d.ts +26 -2
  70. package/dist/contracts/push-new.js +8 -0
  71. package/dist/contracts/quotas.d.ts +0 -1
  72. package/dist/contracts/quotas.js +0 -5
  73. package/dist/contracts/repository-connections.d.ts +1 -1
  74. package/dist/contracts/resources.d.ts +21 -85
  75. package/dist/contracts/resources.js +17 -47
  76. package/dist/contracts/runtime-api.d.ts +799 -192
  77. package/dist/contracts/runtime-api.js +231 -100
  78. package/dist/contracts/runtime-app.d.ts +138 -0
  79. package/dist/contracts/runtime-app.js +21 -0
  80. package/dist/contracts/sf-config-v1.d.ts +5 -0
  81. package/dist/contracts/sf-config-v1.js +1 -1
  82. package/dist/contracts/sites.d.ts +17 -12
  83. package/dist/contracts/sites.js +30 -12
  84. package/dist/contracts/space-config.d.ts +46 -117
  85. package/dist/contracts/space-config.js +323 -25
  86. package/dist/contracts/spaces.d.ts +392 -256
  87. package/dist/contracts/spaces.js +163 -83
  88. package/dist/contracts/superadmin-emails.d.ts +27 -3
  89. package/dist/contracts/superadmin-emails.js +10 -15
  90. package/dist/contracts/superadmin-runtime.d.ts +2 -2
  91. package/dist/contracts/superadmin-spaces.d.ts +19 -142
  92. package/dist/contracts/superadmin-spaces.js +7 -0
  93. package/dist/contracts/tags.d.ts +66 -36
  94. package/dist/contracts/tags.js +195 -11
  95. package/dist/contracts/teams.d.ts +9 -9
  96. package/dist/contracts/transfers.d.ts +1 -2
  97. package/dist/contracts/variables.d.ts +4 -4
  98. package/dist/contracts/variables.js +4 -3
  99. package/dist/contracts/webhooks.d.ts +2 -2
  100. package/dist/contracts/zero.d.ts +437 -193
  101. package/dist/contracts/zero.js +149 -158
  102. package/dist/dashboard-paths/index.d.ts +3 -3
  103. package/dist/dashboard-paths/index.js +1 -0
  104. package/dist/docs/agent-prose.js +10 -8
  105. package/dist/docs/agent-setup.d.ts +6 -4
  106. package/dist/docs/agent-setup.js +26 -16
  107. package/dist/docs/agent-solutions.js +1 -1
  108. package/dist/docs/catalog.d.ts +35 -37
  109. package/dist/docs/catalog.js +36 -38
  110. package/dist/docs/error-docs.js +108 -44
  111. package/dist/utils/asset-fingerprint.d.ts +11 -0
  112. package/dist/utils/asset-fingerprint.js +46 -0
  113. package/dist/utils/auth-redirect.d.ts +1 -3
  114. package/dist/utils/auth-redirect.js +1 -21
  115. package/dist/utils/build-settings.d.ts +2 -0
  116. package/dist/utils/build-settings.js +61 -9
  117. package/dist/utils/credential-policy.d.ts +1 -1
  118. package/dist/utils/credential-policy.js +4 -0
  119. package/dist/utils/dns-instructions.d.ts +29 -0
  120. package/dist/utils/dns-instructions.js +78 -0
  121. package/dist/utils/domain-diagnostics.d.ts +29 -0
  122. package/dist/utils/domain-diagnostics.js +63 -0
  123. package/dist/utils/egress-policy.fixtures.json +51 -0
  124. package/dist/utils/grants.d.ts +53 -0
  125. package/dist/utils/grants.js +160 -0
  126. package/dist/utils/id-hints.d.ts +1 -0
  127. package/dist/utils/id-hints.js +55 -13
  128. package/dist/utils/local-space-state.js +1 -0
  129. package/dist/utils/page-colors.d.ts +50 -0
  130. package/dist/utils/page-colors.js +167 -0
  131. package/dist/utils/page-fonts.d.ts +2 -0
  132. package/dist/utils/page-fonts.js +4 -0
  133. package/dist/utils/pages.d.ts +19 -6
  134. package/dist/utils/pages.js +122 -49
  135. package/dist/utils/production-runtime.d.ts +18 -0
  136. package/dist/utils/production-runtime.js +28 -0
  137. package/dist/utils/publish-policy.d.ts +34 -4
  138. package/dist/utils/publish-policy.js +132 -61
  139. package/dist/utils/query-keys.d.ts +7 -13
  140. package/dist/utils/query-keys.js +12 -18
  141. package/dist/utils/source-archive-policy.d.ts +2 -0
  142. package/dist/utils/source-archive-policy.js +2 -0
  143. package/dist/utils/space-config.d.ts +5 -1
  144. package/dist/utils/space-config.js +35 -0
  145. package/dist/utils/static-runtime-policy.d.ts +5 -0
  146. package/dist/utils/static-runtime-policy.fixtures.json +57 -0
  147. package/dist/utils/static-runtime-policy.js +54 -10
  148. package/dist/utils/upload-session.d.ts +3 -0
  149. package/dist/utils/upload-session.js +31 -0
  150. package/package.json +6 -4
  151. package/dist/contracts/annotations.d.ts +0 -327
  152. package/dist/contracts/annotations.js +0 -235
  153. package/dist/contracts/generated-feature-launch-entries.d.ts +0 -2
  154. package/dist/contracts/generated-feature-launch-entries.js +0 -518
  155. package/dist/contracts/publishes.d.ts +0 -135
  156. package/dist/contracts/publishes.js +0 -162
  157. package/dist/utils/access-match.d.ts +0 -39
  158. package/dist/utils/access-match.js +0 -296
  159. package/dist/utils/sf-config-v1.d.ts +0 -2
  160. package/dist/utils/sf-config-v1.js +0 -542
@@ -24,8 +24,6 @@ export interface DocEntry {
24
24
  }
25
25
  /** Base URL all bundled docs links resolve against. */
26
26
  export declare const DOCS_BASE_URL = "https://spacefast.com/docs";
27
- /** Base URL for the standalone recipe pages (served at /recipes, not /docs). */
28
- export declare const RECIPES_BASE_URL = "https://spacefast.com/recipes";
29
27
  export declare const DOCS_CATALOG: readonly [{
30
28
  readonly slug: "quickstart";
31
29
  readonly title: "Quickstart";
@@ -44,6 +42,15 @@ export declare const DOCS_CATALOG: readonly [{
44
42
  readonly keywords: readonly ["publish", "go live", "upload", "release", "static"];
45
43
  readonly url: "https://spacefast.com/docs/publishing";
46
44
  readonly 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.";
45
+ }, {
46
+ readonly slug: "spaces/rename";
47
+ readonly title: "Rename a space";
48
+ readonly kind: "guide";
49
+ readonly tier: "full";
50
+ readonly summary: "Change a space slug and its managed view.fast address without breaking old links.";
51
+ readonly keywords: readonly ["space", "rename", "slug", "view.fast", "redirect", "managed hostname"];
52
+ readonly url: "https://spacefast.com/docs/spaces/rename";
53
+ readonly body: "Run `sf spaces update --space <space> --slug <new-slug> --wait`, or PATCH `/v1/spaces/{spaceId}` with `{ \"slug\": \"<new-slug>\" }`. The managed view.fast hostname changes with the slug. Former managed addresses and branch aliases redirect directly to their current counterparts with a temporary, path- and query-preserving 307 for the life of the space unless an operator explicitly releases them. Custom domains stay attached, and immutable version URLs do not change.";
47
54
  }, {
48
55
  readonly slug: "versions-and-rollback";
49
56
  readonly title: "Versions and rollback";
@@ -85,10 +92,10 @@ export declare const DOCS_CATALOG: readonly [{
85
92
  readonly title: "Publish receipt fields";
86
93
  readonly kind: "workflow";
87
94
  readonly tier: "full";
88
- readonly summary: "Use the receipt as the source of truth: space.liveUrl, version.immutableUrl, shareBlurb, claim.url, claim.expiresAt, links, diagnostics, and errors.";
95
+ readonly summary: "Use the receipt as the source of truth: space.liveUrl, open.url, version.immutableUrl, claim.url, claim.expiresAt, links, diagnostics, and errors.";
89
96
  readonly keywords: readonly ["receipt", "share", "claim", "diagnostics"];
90
97
  readonly url: "https://spacefast.com/docs/api#publish";
91
- readonly body: "receipt liveUrl immutableUrl shareBlurb claim url expiresAt diagnostics links finalize promote upload errors docsUrl";
98
+ readonly body: "receipt liveUrl open url immutableUrl claim expiresAt diagnostics links finalize promote upload errors docsUrl";
92
99
  }, {
93
100
  readonly slug: "workflow/continue-after-claim";
94
101
  readonly title: "Keep publishing after the user claims";
@@ -112,10 +119,10 @@ export declare const DOCS_CATALOG: readonly [{
112
119
  readonly title: "CLI command surface";
113
120
  readonly kind: "workflow";
114
121
  readonly tier: "full";
115
- readonly summary: "Use sf for repeat work: publish, versions, rollback, logs, domains, passwords, teams, API calls, and On-Device MCP serving.";
122
+ readonly summary: "Use sf for repeat work: publish, versions, rollback, logs, domains, sharing, teams, API calls, and On-Device MCP serving.";
116
123
  readonly keywords: readonly ["sf", "cli", "spacefast", "mcp", "json"];
117
124
  readonly url: "https://spacefast.com/docs/cli";
118
- readonly body: "sf spacefast CLI publish versions rollback logs domains passwords teams api mcp setup profile login --json";
125
+ readonly body: "sf spacefast CLI publish versions rollback logs domains share teams api mcp setup profile login --json";
119
126
  }, {
120
127
  readonly slug: "workflow/mcp-local";
121
128
  readonly title: "On-Device MCP through the CLI";
@@ -151,7 +158,7 @@ export declare const DOCS_CATALOG: readonly [{
151
158
  readonly summary: "Spacefast recognizes _redirects, _headers, nearest 404.html, and sf.jsonc. Static artifacts are served as files; server code is not executed.";
152
159
  readonly keywords: readonly ["_redirects", "_headers", "sf.jsonc", "spacefast.jsonc", "404"];
153
160
  readonly url: "https://spacefast.com/docs/configuration";
154
- readonly body: "_redirects _headers 404.html sf.jsonc static artifact server code not executed proxy rewrite headers basic auth";
161
+ readonly body: "_redirects _headers 404.html sf.jsonc static artifact server code not executed proxy rewrite headers";
155
162
  }, {
156
163
  readonly slug: "workflow/domains-diagnostics";
157
164
  readonly title: "Domains and DNS diagnostics";
@@ -211,10 +218,10 @@ export declare const DOCS_CATALOG: readonly [{
211
218
  readonly title: "Access control";
212
219
  readonly kind: "guide";
213
220
  readonly tier: "full";
214
- readonly summary: "Password-protect a space or grant access to specific people.";
215
- readonly keywords: readonly ["access", "password", "grant", "ban", "private", "audience", "auth"];
221
+ readonly summary: "Create scoped Grants, invite People, and manage Links or credentials.";
222
+ readonly keywords: readonly ["access", "share", "people", "links", "private", "team", "public"];
216
223
  readonly url: "https://spacefast.com/docs/access";
217
- readonly body: "Gate a space with `sf password set`, grant individuals with `sf access grant`, and review effective rules with `sf access effective`.";
224
+ readonly body: "Use `sf share grant`, `sf share people`, `sf share link`, `sf share password`, or `sf share token`. Inspect one route with `sf share check`; every audience uses the same path, capability, target, and constraint evaluator.";
218
225
  }, {
219
226
  readonly slug: "redirects";
220
227
  readonly title: "Redirects";
@@ -229,10 +236,10 @@ export declare const DOCS_CATALOG: readonly [{
229
236
  readonly title: "Custom headers";
230
237
  readonly kind: "guide";
231
238
  readonly tier: "full";
232
- readonly summary: "Attach response headers and path-scoped Basic Auth.";
233
- readonly keywords: readonly ["headers", "cache", "security", "basic auth", "_headers", "cors"];
239
+ readonly summary: "Attach supported response headers by path.";
240
+ readonly keywords: readonly ["headers", "cache", "security", "_headers", "cors"];
234
241
  readonly url: "https://spacefast.com/docs/headers";
235
- readonly 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.";
242
+ readonly body: "Add a `_headers` file at your publish root to set or remove supported response headers per path.";
236
243
  }, {
237
244
  readonly slug: "builds";
238
245
  readonly title: "Build from Git";
@@ -241,16 +248,16 @@ export declare const DOCS_CATALOG: readonly [{
241
248
  readonly summary: "Connect a repository so pushes build and publish automatically.";
242
249
  readonly keywords: readonly ["build", "git", "github", "ci", "push", "connect", "preview"];
243
250
  readonly url: "https://spacefast.com/docs/builds";
244
- readonly 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.";
251
+ readonly body: "Connect a repository with `sf git connect`; each push runs your build on Spacefast and publishes a version. Branch and pull-request previews are private by default; use Open for yourself or create a scoped Link for reviewers.";
245
252
  }, {
246
253
  readonly slug: "collab";
247
- readonly title: "Collaboration and annotations";
254
+ readonly title: "Comments";
248
255
  readonly kind: "guide";
249
256
  readonly tier: "full";
250
- readonly summary: "Leave review comments on a published space.";
251
- readonly keywords: readonly ["collab", "annotations", "comments", "review", "feedback", "annotate"];
257
+ readonly summary: "Leave comments directly on a space.";
258
+ readonly keywords: readonly ["comments", "collaboration", "feedback"];
252
259
  readonly url: "https://spacefast.com/docs/collab";
253
- readonly body: "Annotate a live space with review comments and resolve them from the CLI with `sf annotations` or in the dashboard.";
260
+ readonly body: "Leave comments directly on a live space and archive them from the dashboard or with `sf comments`.";
254
261
  }, {
255
262
  readonly slug: "analytics";
256
263
  readonly title: "Analytics";
@@ -436,10 +443,10 @@ export declare const DOCS_CATALOG: readonly [{
436
443
  readonly title: "sf access";
437
444
  readonly kind: "cli";
438
445
  readonly tier: "full";
439
- readonly summary: "Grant, ban, and inspect who can view a space.";
440
- readonly keywords: readonly ["access", "grant", "ban", "password", "effective", "rules", "policy"];
446
+ readonly summary: "Emergency visitor-session revocation.";
447
+ readonly keywords: readonly ["access", "sessions", "revoke", "logout"];
441
448
  readonly url: "https://spacefast.com/docs/cli";
442
- readonly 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.";
449
+ readonly body: "Use `sf access logout-all` to revoke every opened visitor session. Define audience-specific network restrictions on the corresponding Grant.";
443
450
  }, {
444
451
  readonly slug: "cli/teams";
445
452
  readonly title: "sf teams";
@@ -529,7 +536,7 @@ export declare const DOCS_CATALOG: readonly [{
529
536
  readonly summary: "Create, list, and update spaces over HTTP.";
530
537
  readonly keywords: readonly ["api", "spaces", "space", "create", "list", "endpoint"];
531
538
  readonly url: "https://spacefast.com/docs/api";
532
- readonly body: "`GET /v1/spaces` lists spaces; `POST /v1/spaces` creates one. Responses carry the space id, slug, and live URL.";
539
+ readonly body: "`GET /v1/spaces` lists spaces; `POST /v1/spaces` creates one. `PATCH /v1/spaces/{spaceId}` with a slug-only body renames the space and managed hostname. Former managed addresses temporarily 307 to the current hostname while immutable version URLs stay unchanged. Responses carry the space id, slug, and live URL.";
533
540
  }, {
534
541
  readonly slug: "api/versions";
535
542
  readonly title: "Versions API";
@@ -592,16 +599,16 @@ export declare const DOCS_CATALOG: readonly [{
592
599
  readonly summary: "Connect a repository so pushes publish automatically.";
593
600
  readonly keywords: readonly ["github", "git", "ci", "push", "connect", "automatic", "recipe"];
594
601
  readonly url: "https://spacefast.com/docs/builds";
595
- readonly body: "Connect a repository with `sf git connect`; each push builds on Spacefast and publishes a version, with pull requests getting preview URLs.";
602
+ readonly body: "Connect a repository with `sf git connect`; each push builds on Spacefast and publishes a version. Pull-request previews stay private until you create a scoped Link for reviewers.";
596
603
  }, {
597
604
  readonly slug: "recipes/preview-channels";
598
605
  readonly title: "Preview channels for pull requests";
599
606
  readonly kind: "recipe";
600
607
  readonly tier: "full";
601
- readonly summary: "Give every branch a shareable preview URL.";
608
+ readonly summary: "Give every branch a private preview with explicit sharing.";
602
609
  readonly keywords: readonly ["preview", "channel", "branch", "pull request", "staging", "recipe"];
603
610
  readonly url: "https://spacefast.com/docs/builds";
604
- readonly 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.";
611
+ readonly body: "Push a branch or open a pull request on a connected repository, or publish to a named channel, to get an isolated private preview without touching production. Use Open for your own browser or create a scoped Link when someone else needs access.";
605
612
  }, {
606
613
  readonly slug: "recipes/agent-publish";
607
614
  readonly title: "Let an agent publish for you";
@@ -618,17 +625,8 @@ export declare const DOCS_CATALOG: readonly [{
618
625
  readonly tier: "full";
619
626
  readonly summary: "Point your own domain at a space with automatic TLS.";
620
627
  readonly keywords: readonly ["domain", "custom domain", "dns", "tls", "https", "recipe"];
621
- readonly url: "https://spacefast.com/recipes/custom-domain";
628
+ readonly url: "https://spacefast.com/help/domains";
622
629
  readonly 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.";
623
- }, {
624
- readonly slug: "recipes/password-protect";
625
- readonly title: "Password-protect a space";
626
- readonly kind: "recipe";
627
- readonly tier: "full";
628
- readonly summary: "Put one shared password in front of a whole space.";
629
- readonly keywords: readonly ["password", "protect", "private", "access", "gate", "recipe"];
630
- readonly url: "https://spacefast.com/recipes/password-protect-a-space";
631
- readonly body: "Run `sf password set` to gate a space behind a single shared secret; clear it later with `sf password clear`.";
632
630
  }, {
633
631
  readonly slug: "recipes/redirects";
634
632
  readonly title: "Set up redirects";
@@ -636,7 +634,7 @@ export declare const DOCS_CATALOG: readonly [{
636
634
  readonly tier: "reference";
637
635
  readonly summary: "Add redirect rules that ship and roll back with a version.";
638
636
  readonly keywords: readonly ["redirect", "rewrite", "routing", "301", "recipe"];
639
- readonly url: "https://spacefast.com/recipes/redirects";
637
+ readonly url: "https://spacefast.com/help/redirects";
640
638
  readonly 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.";
641
639
  }, {
642
640
  readonly slug: "recipes/migrate-dns";
@@ -645,6 +643,6 @@ export declare const DOCS_CATALOG: readonly [{
645
643
  readonly tier: "reference";
646
644
  readonly summary: "Cut traffic over to a Spacefast-served domain safely.";
647
645
  readonly keywords: readonly ["dns", "migrate", "cutover", "domain", "nameserver", "recipe"];
648
- readonly url: "https://spacefast.com/recipes/custom-domain";
646
+ readonly url: "https://spacefast.com/help/domains";
649
647
  readonly 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.";
650
648
  }, ...DocEntry[]];
@@ -21,8 +21,6 @@ import { ERROR_DOCS } from "./error-docs.js";
21
21
  export const DOC_KINDS = ["guide", "cli", "api", "recipe", "workflow", "error"];
22
22
  /** Base URL all bundled docs links resolve against. */
23
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
24
  const HAND_WRITTEN_DOCS_CATALOG = [
27
25
  // ----- Guides -----------------------------------------------------------
28
26
  {
@@ -45,6 +43,16 @@ const HAND_WRITTEN_DOCS_CATALOG = [
45
43
  url: `${DOCS_BASE_URL}/publishing`,
46
44
  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
45
  },
46
+ {
47
+ slug: "spaces/rename",
48
+ title: "Rename a space",
49
+ kind: "guide",
50
+ tier: "full",
51
+ summary: "Change a space slug and its managed view.fast address without breaking old links.",
52
+ keywords: ["space", "rename", "slug", "view.fast", "redirect", "managed hostname"],
53
+ url: `${DOCS_BASE_URL}/spaces/rename`,
54
+ body: 'Run `sf spaces update --space <space> --slug <new-slug> --wait`, or PATCH `/v1/spaces/{spaceId}` with `{ "slug": "<new-slug>" }`. The managed view.fast hostname changes with the slug. Former managed addresses and branch aliases redirect directly to their current counterparts with a temporary, path- and query-preserving 307 for the life of the space unless an operator explicitly releases them. Custom domains stay attached, and immutable version URLs do not change.',
55
+ },
48
56
  {
49
57
  slug: "versions-and-rollback",
50
58
  title: "Versions and rollback",
@@ -91,10 +99,10 @@ const HAND_WRITTEN_DOCS_CATALOG = [
91
99
  title: "Publish receipt fields",
92
100
  kind: "workflow",
93
101
  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.",
102
+ summary: "Use the receipt as the source of truth: space.liveUrl, open.url, version.immutableUrl, claim.url, claim.expiresAt, links, diagnostics, and errors.",
95
103
  keywords: ["receipt", "share", "claim", "diagnostics"],
96
104
  url: `${DOCS_BASE_URL}/api#publish`,
97
- body: "receipt liveUrl immutableUrl shareBlurb claim url expiresAt diagnostics links finalize promote upload errors docsUrl",
105
+ body: "receipt liveUrl open url immutableUrl claim expiresAt diagnostics links finalize promote upload errors docsUrl",
98
106
  },
99
107
  {
100
108
  slug: "workflow/continue-after-claim",
@@ -127,10 +135,10 @@ const HAND_WRITTEN_DOCS_CATALOG = [
127
135
  title: "CLI command surface",
128
136
  kind: "workflow",
129
137
  tier: "full",
130
- summary: "Use sf for repeat work: publish, versions, rollback, logs, domains, passwords, teams, API calls, and On-Device MCP serving.",
138
+ summary: "Use sf for repeat work: publish, versions, rollback, logs, domains, sharing, teams, API calls, and On-Device MCP serving.",
131
139
  keywords: ["sf", "cli", "spacefast", "mcp", "json"],
132
140
  url: `${DOCS_BASE_URL}/cli`,
133
- body: "sf spacefast CLI publish versions rollback logs domains passwords teams api mcp setup profile login --json",
141
+ body: "sf spacefast CLI publish versions rollback logs domains share teams api mcp setup profile login --json",
134
142
  },
135
143
  {
136
144
  slug: "workflow/mcp-local",
@@ -179,7 +187,7 @@ const HAND_WRITTEN_DOCS_CATALOG = [
179
187
  summary: "Spacefast recognizes _redirects, _headers, nearest 404.html, and sf.jsonc. Static artifacts are served as files; server code is not executed.",
180
188
  keywords: ["_redirects", "_headers", "sf.jsonc", "spacefast.jsonc", "404"],
181
189
  url: `${DOCS_BASE_URL}/configuration`,
182
- body: "_redirects _headers 404.html sf.jsonc static artifact server code not executed proxy rewrite headers basic auth",
190
+ body: "_redirects _headers 404.html sf.jsonc static artifact server code not executed proxy rewrite headers",
183
191
  },
184
192
  {
185
193
  slug: "workflow/domains-diagnostics",
@@ -246,10 +254,10 @@ const HAND_WRITTEN_DOCS_CATALOG = [
246
254
  title: "Access control",
247
255
  kind: "guide",
248
256
  tier: "full",
249
- summary: "Password-protect a space or grant access to specific people.",
250
- keywords: ["access", "password", "grant", "ban", "private", "audience", "auth"],
257
+ summary: "Create scoped Grants, invite People, and manage Links or credentials.",
258
+ keywords: ["access", "share", "people", "links", "private", "team", "public"],
251
259
  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`.",
260
+ body: "Use `sf share grant`, `sf share people`, `sf share link`, `sf share password`, or `sf share token`. Inspect one route with `sf share check`; every audience uses the same path, capability, target, and constraint evaluator.",
253
261
  },
254
262
  {
255
263
  slug: "redirects",
@@ -266,10 +274,10 @@ const HAND_WRITTEN_DOCS_CATALOG = [
266
274
  title: "Custom headers",
267
275
  kind: "guide",
268
276
  tier: "full",
269
- summary: "Attach response headers and path-scoped Basic Auth.",
270
- keywords: ["headers", "cache", "security", "basic auth", "_headers", "cors"],
277
+ summary: "Attach supported response headers by path.",
278
+ keywords: ["headers", "cache", "security", "_headers", "cors"],
271
279
  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.",
280
+ body: "Add a `_headers` file at your publish root to set or remove supported response headers per path.",
273
281
  },
274
282
  {
275
283
  slug: "builds",
@@ -279,17 +287,17 @@ const HAND_WRITTEN_DOCS_CATALOG = [
279
287
  summary: "Connect a repository so pushes build and publish automatically.",
280
288
  keywords: ["build", "git", "github", "ci", "push", "connect", "preview"],
281
289
  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.",
290
+ body: "Connect a repository with `sf git connect`; each push runs your build on Spacefast and publishes a version. Branch and pull-request previews are private by default; use Open for yourself or create a scoped Link for reviewers.",
283
291
  },
284
292
  {
285
293
  slug: "collab",
286
- title: "Collaboration and annotations",
294
+ title: "Comments",
287
295
  kind: "guide",
288
296
  tier: "full",
289
- summary: "Leave review comments on a published space.",
290
- keywords: ["collab", "annotations", "comments", "review", "feedback", "annotate"],
297
+ summary: "Leave comments directly on a space.",
298
+ keywords: ["comments", "collaboration", "feedback"],
291
299
  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.",
300
+ body: "Leave comments directly on a live space and archive them from the dashboard or with `sf comments`.",
293
301
  },
294
302
  {
295
303
  slug: "analytics",
@@ -497,10 +505,10 @@ const HAND_WRITTEN_DOCS_CATALOG = [
497
505
  title: "sf access",
498
506
  kind: "cli",
499
507
  tier: "full",
500
- summary: "Grant, ban, and inspect who can view a space.",
501
- keywords: ["access", "grant", "ban", "password", "effective", "rules", "policy"],
508
+ summary: "Emergency visitor-session revocation.",
509
+ keywords: ["access", "sessions", "revoke", "logout"],
502
510
  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.",
511
+ body: "Use `sf access logout-all` to revoke every opened visitor session. Define audience-specific network restrictions on the corresponding Grant.",
504
512
  },
505
513
  {
506
514
  slug: "cli/teams",
@@ -601,7 +609,7 @@ const HAND_WRITTEN_DOCS_CATALOG = [
601
609
  summary: "Create, list, and update spaces over HTTP.",
602
610
  keywords: ["api", "spaces", "space", "create", "list", "endpoint"],
603
611
  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.",
612
+ body: "`GET /v1/spaces` lists spaces; `POST /v1/spaces` creates one. `PATCH /v1/spaces/{spaceId}` with a slug-only body renames the space and managed hostname. Former managed addresses temporarily 307 to the current hostname while immutable version URLs stay unchanged. Responses carry the space id, slug, and live URL.",
605
613
  },
606
614
  {
607
615
  slug: "api/versions",
@@ -672,17 +680,17 @@ const HAND_WRITTEN_DOCS_CATALOG = [
672
680
  summary: "Connect a repository so pushes publish automatically.",
673
681
  keywords: ["github", "git", "ci", "push", "connect", "automatic", "recipe"],
674
682
  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.",
683
+ body: "Connect a repository with `sf git connect`; each push builds on Spacefast and publishes a version. Pull-request previews stay private until you create a scoped Link for reviewers.",
676
684
  },
677
685
  {
678
686
  slug: "recipes/preview-channels",
679
687
  title: "Preview channels for pull requests",
680
688
  kind: "recipe",
681
689
  tier: "full",
682
- summary: "Give every branch a shareable preview URL.",
690
+ summary: "Give every branch a private preview with explicit sharing.",
683
691
  keywords: ["preview", "channel", "branch", "pull request", "staging", "recipe"],
684
692
  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.",
693
+ body: "Push a branch or open a pull request on a connected repository, or publish to a named channel, to get an isolated private preview without touching production. Use Open for your own browser or create a scoped Link when someone else needs access.",
686
694
  },
687
695
  {
688
696
  slug: "recipes/agent-publish",
@@ -701,19 +709,9 @@ const HAND_WRITTEN_DOCS_CATALOG = [
701
709
  tier: "full",
702
710
  summary: "Point your own domain at a space with automatic TLS.",
703
711
  keywords: ["domain", "custom domain", "dns", "tls", "https", "recipe"],
704
- url: `${RECIPES_BASE_URL}/custom-domain`,
712
+ url: "https://spacefast.com/help/domains",
705
713
  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
714
  },
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
715
  {
718
716
  slug: "recipes/redirects",
719
717
  title: "Set up redirects",
@@ -721,7 +719,7 @@ const HAND_WRITTEN_DOCS_CATALOG = [
721
719
  tier: "reference",
722
720
  summary: "Add redirect rules that ship and roll back with a version.",
723
721
  keywords: ["redirect", "rewrite", "routing", "301", "recipe"],
724
- url: `${RECIPES_BASE_URL}/redirects`,
722
+ url: "https://spacefast.com/help/redirects",
725
723
  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
724
  },
727
725
  {
@@ -731,7 +729,7 @@ const HAND_WRITTEN_DOCS_CATALOG = [
731
729
  tier: "reference",
732
730
  summary: "Cut traffic over to a Spacefast-served domain safely.",
733
731
  keywords: ["dns", "migrate", "cutover", "domain", "nameserver", "recipe"],
734
- url: `${RECIPES_BASE_URL}/custom-domain`,
732
+ url: "https://spacefast.com/help/domains",
735
733
  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
734
  },
737
735
  ];