@spacefast/common 0.0.13 → 0.0.18

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 (154) hide show
  1. package/dist/agents/client-registry.d.ts +22 -0
  2. package/dist/agents/client-registry.js +41 -0
  3. package/dist/agents/connect-targets.d.ts +51 -6
  4. package/dist/agents/connect-targets.js +93 -28
  5. package/dist/brand.d.ts +0 -11
  6. package/dist/brand.js +0 -20
  7. package/dist/config/domains.d.ts +15 -6
  8. package/dist/config/domains.js +24 -10
  9. package/dist/config/postgres-budget.d.ts +3 -0
  10. package/dist/config/postgres-budget.js +6 -1
  11. package/dist/config/postgres-budget.json +2 -1
  12. package/dist/contracts/abuse.js +1 -1
  13. package/dist/contracts/access.d.ts +149 -44
  14. package/dist/contracts/access.js +94 -8
  15. package/dist/contracts/activity.js +5 -1
  16. package/dist/contracts/api-keys.js +9 -9
  17. package/dist/contracts/archives.js +11 -11
  18. package/dist/contracts/beta.js +1 -1
  19. package/dist/contracts/builds.js +14 -14
  20. package/dist/contracts/channels.js +2 -2
  21. package/dist/contracts/comments.d.ts +86 -15
  22. package/dist/contracts/comments.js +116 -20
  23. package/dist/contracts/common.d.ts +12 -12
  24. package/dist/contracts/common.js +33 -30
  25. package/dist/contracts/continuation.js +5 -5
  26. package/dist/contracts/data-source-routes.js +1 -1
  27. package/dist/contracts/device-auth.d.ts +6 -6
  28. package/dist/contracts/device-auth.js +12 -12
  29. package/dist/contracts/docs.d.ts +10 -10
  30. package/dist/contracts/domains.js +39 -33
  31. package/dist/contracts/enums.d.ts +2 -10
  32. package/dist/contracts/enums.js +0 -2
  33. package/dist/contracts/error-code-meta.d.ts +116 -47
  34. package/dist/contracts/error-code-meta.js +37 -16
  35. package/dist/contracts/error-codes.d.ts +7 -4
  36. package/dist/contracts/error-codes.js +46 -21
  37. package/dist/contracts/events.d.ts +10 -3
  38. package/dist/contracts/events.js +33 -5
  39. package/dist/contracts/execution.d.ts +26 -0
  40. package/dist/contracts/execution.js +21 -0
  41. package/dist/contracts/feature-lifecycle.d.ts +21 -24
  42. package/dist/contracts/feature-lifecycle.js +28 -26
  43. package/dist/contracts/features.js +4 -4
  44. package/dist/contracts/functions.d.ts +8 -140
  45. package/dist/contracts/functions.js +9 -19
  46. package/dist/contracts/git.d.ts +1 -1
  47. package/dist/contracts/grants.d.ts +96 -79
  48. package/dist/contracts/grants.js +130 -43
  49. package/dist/contracts/ids.d.ts +2 -2
  50. package/dist/contracts/ids.js +2 -4
  51. package/dist/contracts/internal.js +2 -2
  52. package/dist/contracts/mcp.d.ts +17 -556
  53. package/dist/contracts/mcp.js +9 -103
  54. package/dist/contracts/me.js +3 -4
  55. package/dist/contracts/notifications.d.ts +108 -0
  56. package/dist/contracts/notifications.js +54 -0
  57. package/dist/contracts/oauth-resources.d.ts +18 -1
  58. package/dist/contracts/oauth-resources.js +22 -2
  59. package/dist/contracts/operations.d.ts +2 -50
  60. package/dist/contracts/operations.js +0 -19
  61. package/dist/contracts/pages.d.ts +8 -4
  62. package/dist/contracts/pages.js +16 -3
  63. package/dist/contracts/platform.js +10 -8
  64. package/dist/contracts/problem-document.d.ts +14 -0
  65. package/dist/contracts/problem-document.js +35 -0
  66. package/dist/contracts/push-new.d.ts +21 -6
  67. package/dist/contracts/push-new.js +3 -7
  68. package/dist/contracts/resources.d.ts +8 -7
  69. package/dist/contracts/resources.js +9 -6
  70. package/dist/contracts/runtime-api.d.ts +162 -92
  71. package/dist/contracts/runtime-api.js +99 -27
  72. package/dist/contracts/runtime-app.d.ts +41 -11
  73. package/dist/contracts/runtime-app.js +22 -1
  74. package/dist/contracts/runtime-db.d.ts +424 -0
  75. package/dist/contracts/runtime-db.js +108 -0
  76. package/dist/contracts/runtime-storage.d.ts +120 -0
  77. package/dist/contracts/runtime-storage.js +40 -0
  78. package/dist/contracts/sf-config-v1.d.ts +49 -1
  79. package/dist/contracts/sf-config-v1.js +2 -2
  80. package/dist/contracts/sites.d.ts +1 -0
  81. package/dist/contracts/sites.js +20 -12
  82. package/dist/contracts/space-config.d.ts +62 -22
  83. package/dist/contracts/space-config.js +173 -47
  84. package/dist/contracts/spaces.d.ts +79 -45
  85. package/dist/contracts/spaces.js +66 -50
  86. package/dist/contracts/superadmin-spaces.d.ts +13 -2
  87. package/dist/contracts/superadmin-spaces.js +15 -0
  88. package/dist/contracts/superadmin-tenants.js +4 -4
  89. package/dist/contracts/superadmin.d.ts +4 -0
  90. package/dist/contracts/superadmin.js +14 -1
  91. package/dist/contracts/tags.d.ts +17 -17
  92. package/dist/contracts/tags.js +1 -1
  93. package/dist/contracts/teams.js +25 -16
  94. package/dist/contracts/theme-json.js +1 -1
  95. package/dist/contracts/transfers.js +4 -4
  96. package/dist/contracts/variables.js +3 -3
  97. package/dist/contracts/zero.d.ts +204 -338
  98. package/dist/contracts/zero.js +94 -98
  99. package/dist/dashboard-paths/index.d.ts +16 -1
  100. package/dist/dashboard-paths/index.js +18 -0
  101. package/dist/docs/agent-handoff-document.d.ts +2 -2
  102. package/dist/docs/agent-handoff-document.js +8 -7
  103. package/dist/docs/agent-prose.d.ts +22 -3
  104. package/dist/docs/agent-prose.js +221 -51
  105. package/dist/docs/agent-setup.d.ts +13 -10
  106. package/dist/docs/agent-setup.js +279 -53
  107. package/dist/docs/agent-solutions.d.ts +6 -6
  108. package/dist/docs/agent-solutions.js +23 -21
  109. package/dist/docs/catalog.d.ts +29 -74
  110. package/dist/docs/catalog.js +65 -92
  111. package/dist/docs/error-docs.js +293 -221
  112. package/dist/docs/skill-distribution.d.ts +2 -0
  113. package/dist/docs/skill-distribution.js +7 -4
  114. package/dist/docs/skills.d.ts +546 -0
  115. package/dist/docs/skills.js +340 -0
  116. package/dist/utils/browser-credential.d.ts +19 -0
  117. package/dist/utils/browser-credential.js +62 -0
  118. package/dist/utils/comment-avatars.d.ts +7 -0
  119. package/dist/utils/comment-avatars.js +42 -0
  120. package/dist/utils/content-type.d.ts +3 -3
  121. package/dist/utils/content-type.js +38 -61
  122. package/dist/utils/domain-diagnostics.d.ts +5 -5
  123. package/dist/utils/domain-diagnostics.js +21 -10
  124. package/dist/utils/local-space-state.d.ts +78 -4
  125. package/dist/utils/local-space-state.js +383 -82
  126. package/dist/utils/one-shot-replay.d.ts +14 -0
  127. package/dist/utils/one-shot-replay.js +21 -0
  128. package/dist/utils/page-preview.d.ts +7 -0
  129. package/dist/utils/page-preview.js +9 -0
  130. package/dist/utils/pages.d.ts +2 -11
  131. package/dist/utils/pages.js +58 -14
  132. package/dist/utils/publish-form-data.d.ts +22 -0
  133. package/dist/utils/publish-form-data.js +26 -0
  134. package/dist/utils/publish-policy.js +20 -4
  135. package/dist/utils/query-keys.d.ts +7 -4
  136. package/dist/utils/query-keys.js +13 -4
  137. package/dist/utils/runtime-paths.d.ts +3 -0
  138. package/dist/utils/runtime-paths.js +7 -0
  139. package/dist/utils/secure-local-file.d.ts +73 -0
  140. package/dist/utils/secure-local-file.js +1373 -0
  141. package/dist/utils/space-config.d.ts +13 -4
  142. package/dist/utils/space-config.js +123 -15
  143. package/dist/utils/storage-policy.d.ts +20 -0
  144. package/dist/utils/storage-policy.fixtures.json +174 -0
  145. package/dist/utils/storage-policy.js +193 -0
  146. package/dist/utils/upload-session.d.ts +12 -1
  147. package/dist/utils/upload-session.js +37 -2
  148. package/dist/utils/version-file-browser.d.ts +13 -0
  149. package/dist/utils/version-file-browser.js +59 -0
  150. package/package.json +19 -1
  151. package/dist/contracts/mounts.d.ts +0 -142
  152. package/dist/contracts/mounts.js +0 -56
  153. package/dist/utils/asset-fingerprint.d.ts +0 -64
  154. package/dist/utils/asset-fingerprint.js +0 -620
@@ -7,8 +7,10 @@ export declare const spacefastSkillFetchCommand: string;
7
7
  export declare const spacefastSkillInstallCommand = "npx -y skills add spacefast/plugins --skill spacefast -g -y";
8
8
  export declare const spacefastInstallCurlCommand: string;
9
9
  export declare const spacefastInstallPowerShellCommand: string;
10
+ export declare const spacefastInstallNpmCommand = "npm install -g spacefast";
10
11
  export declare const spacefastClaudePluginAddCommand = "claude plugin marketplace add spacefast/plugins";
11
12
  export declare const spacefastClaudePluginInstallCommand = "claude plugin install spacefast@spacefast";
13
+ export declare const spacefastClaudeDesktopExtensionUrl = "https://github.com/spacefast/plugins/releases/latest/download/claude-desktop.mcpb";
12
14
  export declare const spacefastCodexPluginAddCommand = "codex plugin marketplace add spacefast/plugins";
13
15
  export declare const spacefastCodexPluginInstallCommand = "codex plugin add spacefast@spacefast";
14
16
  export declare const spacefastCodexSkillInstallCommand = "npx -y skills add spacefast/plugins --skill spacefast -g -a codex -y";
@@ -1,15 +1,18 @@
1
- import { BRAND } from "../brand.js";
1
+ import { serviceOrigin } from "../config/domains.js";
2
2
  export const spacefastSkillName = "spacefast";
3
3
  export const spacefastSkillRepoOwner = "spacefast";
4
4
  export const spacefastSkillRepoName = "plugins";
5
5
  export const spacefastSkillRepoRef = `${spacefastSkillRepoOwner}/${spacefastSkillRepoName}`;
6
- export const spacefastSkillUrl = `${BRAND.apiOrigin}/skill`;
6
+ export const spacefastSkillUrl = `${serviceOrigin("api", "prod")}/skill`;
7
7
  export const spacefastSkillFetchCommand = `curl -fsSL ${spacefastSkillUrl}`;
8
8
  export const spacefastSkillInstallCommand = `npx -y skills add ${spacefastSkillRepoRef} --skill ${spacefastSkillName} -g -y`;
9
- export const spacefastInstallCurlCommand = `curl -fsSL ${BRAND.websiteOrigin}/install.sh | bash`;
10
- export const spacefastInstallPowerShellCommand = `irm ${BRAND.websiteOrigin}/install.ps1 | iex`;
9
+ export const spacefastInstallCurlCommand = `curl -fsSL ${serviceOrigin("www", "prod")}/install.sh | bash`;
10
+ export const spacefastInstallPowerShellCommand = `irm ${serviceOrigin("www", "prod")}/install.ps1 | iex`;
11
+ // The npm lane: the `spacefast` package ships both the `sf` and `spacefast` bins.
12
+ export const spacefastInstallNpmCommand = "npm install -g spacefast";
11
13
  export const spacefastClaudePluginAddCommand = `claude plugin marketplace add ${spacefastSkillRepoRef}`;
12
14
  export const spacefastClaudePluginInstallCommand = `claude plugin install ${spacefastSkillName}@${spacefastSkillName}`;
15
+ export const spacefastClaudeDesktopExtensionUrl = `https://github.com/${spacefastSkillRepoRef}/releases/latest/download/claude-desktop.mcpb`;
13
16
  // Codex mirrors the Claude plugin commands (same marketplace repo, same
14
17
  // plugin name); the release workflow validates both installs against the
15
18
  // assembled dist/plugins tree.
@@ -0,0 +1,546 @@
1
+ import type { CliDisclosureTier } from "../vocabulary.js";
2
+ export type SpacefastSkillRuntime = "local" | "hosted";
3
+ export interface SpacefastSkillDefinition {
4
+ readonly name: string;
5
+ readonly title: string;
6
+ readonly description: string;
7
+ readonly whenToUse: string;
8
+ readonly keywords: readonly string[];
9
+ readonly runtimes: readonly SpacefastSkillRuntime[];
10
+ readonly tools: readonly string[];
11
+ readonly docs: readonly string[];
12
+ readonly instructions: readonly string[];
13
+ readonly verification: readonly string[];
14
+ readonly runtimeNotes?: Readonly<Partial<Record<SpacefastSkillRuntime, string>>>;
15
+ readonly prompt?: boolean;
16
+ readonly recipe?: {
17
+ readonly slug: `recipes/${string}`;
18
+ readonly tier: CliDisclosureTier;
19
+ readonly url: string;
20
+ };
21
+ }
22
+ /** Canonical agent workflows shared by MCP tools, prompts, resources, and recipe docs. */
23
+ export declare const SPACEFAST_SKILLS: readonly [{
24
+ readonly name: "create-and-publish-site";
25
+ readonly title: "Create and publish a polished website";
26
+ readonly description: "Turn a brief into a responsive static website, review the result, publish it to Spacefast, and verify the live version.";
27
+ readonly whenToUse: "Use when the user wants an agent to design, build, improve, or launch a new website rather than only upload an existing build.";
28
+ readonly keywords: readonly ["create", "website", "design", "build", "responsive", "launch", "publish"];
29
+ readonly runtimes: readonly ["local", "hosted"];
30
+ readonly tools: readonly ["publish", "execute"];
31
+ readonly docs: readonly ["quickstart", "publishing"];
32
+ readonly instructions: readonly ["Clarify the audience, goal, required content, brand constraints, and desired call to action. If the visual direction is open, propose two or three distinct directions and choose one with the user.", "Inspect the existing workspace before editing. Reuse its framework, package manager, components, assets, and build conventions when they are sound.", "Build a focused, accessible static experience with a clear hierarchy, real content, responsive layouts, useful interaction states, and no placeholder copy. Keep the main path simple and put secondary detail behind progressive disclosure.", "Run the real build and inspect the result at mobile and desktop widths. Fix overflow, illegible contrast, broken links, missing assets, keyboard traps, and avoidable layout shift.", "Review the workspace diff and summarize material design or content judgments before publishing. Never include API keys, claim credentials, upload credentials, or local auth state in the artifact.", "Publish the built output with `publish`. Present Open as the reusable access link and Claim as the one-time ownership link. Treat live and immutable-version URLs as receipt metadata, not extra actions."];
33
+ readonly verification: readonly ["Call `status` after publishing and confirm the intended version is live; use `diagnose` if serving is stalled or failed.", "Open the live URL and verify the primary page, navigation, assets, responsive layout, and main call to action before claiming success."];
34
+ readonly runtimeNotes: {
35
+ readonly local: "On-Device can work directly inside the configured local workspace root and publish a local build path.";
36
+ readonly hosted: "Hosted has no filesystem. Generate small files in the client and publish them inline, or use catalog manifest and import operations for larger artifacts.";
37
+ };
38
+ readonly prompt: true;
39
+ readonly recipe: {
40
+ readonly slug: "recipes/create-and-publish-site";
41
+ readonly tier: "full";
42
+ readonly url: `${string}/getting-started/agents`;
43
+ };
44
+ }, {
45
+ readonly name: "publish-and-verify";
46
+ readonly title: "Publish and verify";
47
+ readonly description: "Publish an existing static build, confirm the new version is actually live, and return the useful URLs without leaking credentials.";
48
+ readonly whenToUse: "Use when the artifact already exists and the user wants it published or updated.";
49
+ readonly keywords: readonly ["publish", "deploy", "live", "verify", "version", "claim"];
50
+ readonly runtimes: readonly ["local", "hosted"];
51
+ readonly tools: readonly ["publish", "status", "diagnose"];
52
+ readonly docs: readonly ["publishing", "workflow/publish-receipt", "workflow/secret-handling"];
53
+ readonly instructions: readonly ["Identify the actual publish root or build output. Run the real build first when the source tree is not itself the static artifact.", "Publish with `publish`. For an anonymous On-Device publish, keep the claim credential in local custody and return only the claim URL and expiry; never expose or ask the user to paste the raw token.", "Report the bare Live URL, private Access URL when present, immutable Version URL when present, anonymous Claim URL and expiry when present, plus actionable diagnostics."];
54
+ readonly verification: readonly ["Call `status` and confirm the intended version is live. Use `diagnose` for a failed or stalled publish.", "Open the live URL and verify representative content and assets rather than treating a successful upload or health check as serving proof."];
55
+ readonly runtimeNotes: {
56
+ readonly local: "Publish a bounded local path; locally custodied claim credentials are reused automatically.";
57
+ readonly hosted: "Publish inline files, or use catalog manifest and import operations for larger artifacts. Hosted has no filesystem.";
58
+ };
59
+ readonly prompt: true;
60
+ readonly recipe: {
61
+ readonly slug: "recipes/agent-publish";
62
+ readonly tier: "full";
63
+ readonly url: `${string}/publishing/anonymous`;
64
+ };
65
+ }, {
66
+ readonly name: "ci-github-actions";
67
+ readonly title: "Publish from GitHub Actions";
68
+ readonly description: "Create a repository-aware GitHub Actions workflow that builds and publishes with a masked Spacefast token.";
69
+ readonly whenToUse: "Use when pushes or manual workflow runs should publish automatically from GitHub.";
70
+ readonly keywords: readonly ["github", "actions", "ci", "push", "automatic", "workflow"];
71
+ readonly runtimes: readonly ["local", "hosted"];
72
+ readonly tools: readonly ["execute"];
73
+ readonly docs: readonly ["builds", "publishing", "workflow/secret-handling"];
74
+ readonly instructions: readonly ["Inspect the repository's package manager, lockfile, build command, runtime version, output directory, and existing workflows before writing YAML.", "Create a least-privilege workflow triggered by the intended branch and `workflow_dispatch`: check out the repository, install with the locked dependency command, build, and run `npx -y spacefast@<pinned-version> publish <output> --json`.", "Store the credential as a masked `SPACEFAST_TOKEN` repository or environment secret. Never echo it or upload generated auth files, claim credentials, or upload credentials as artifacts.", "Use the repository's real package manager and output directory; do not copy a generic npm/dist example over a Bun, pnpm, yarn, or custom build."];
75
+ readonly verification: readonly ["Validate the workflow syntax and run it on an explicit test branch or manual dispatch.", "Inspect the publish receipt and live URL; a green build step alone is not serving proof."];
76
+ readonly prompt: true;
77
+ readonly recipe: {
78
+ readonly slug: "recipes/github-deploys";
79
+ readonly tier: "full";
80
+ readonly url: `${string}/publishing/git`;
81
+ };
82
+ }, {
83
+ readonly name: "preview-channels";
84
+ readonly title: "Preview changes safely";
85
+ readonly description: "Publish branch or pull-request work to an isolated private preview and share it explicitly without touching production.";
86
+ readonly whenToUse: "Use when reviewers need a realistic preview before a change goes live.";
87
+ readonly keywords: readonly ["preview", "channel", "branch", "pull request", "review", "private"];
88
+ readonly runtimes: readonly ["local", "hosted"];
89
+ readonly tools: readonly ["publish", "status", "execute"];
90
+ readonly docs: readonly ["builds", "access-control"];
91
+ readonly instructions: readonly ["Publish the branch through a connected repository or to an explicit non-production channel so the live production channel is unchanged.", "Keep the preview private by default. Use an Open URL for the owner's browser or create the narrowest scoped Link needed for reviewers.", "Label the preview with the branch, change, or pull request it represents and report what is intentionally out of scope."];
92
+ readonly verification: readonly ["Confirm the preview serves the expected version and production still points at its previous version.", "Test the reviewer link in a signed-out context and revoke it when review is complete."];
93
+ readonly recipe: {
94
+ readonly slug: "recipes/preview-channels";
95
+ readonly tier: "full";
96
+ readonly url: `${string}/publishing/git`;
97
+ };
98
+ }, {
99
+ readonly name: "claim-flow";
100
+ readonly title: "Claim an anonymous space";
101
+ readonly description: "Attach an anonymous space to an account or team before expiry while keeping every claim credential in server or local custody.";
102
+ readonly whenToUse: "Use after an anonymous publish returns a claim URL and expiry.";
103
+ readonly keywords: readonly ["claim", "anonymous", "ownership", "team", "continuation", "credential"];
104
+ readonly runtimes: readonly ["local", "hosted"];
105
+ readonly tools: readonly ["execute", "publish"];
106
+ readonly docs: readonly ["anonymous-publish", "workflow/continue-after-claim", "workflow/secret-handling"];
107
+ readonly instructions: readonly ["Return the claim URL and expiry to the user, never the raw claim credential. On-Device stores that credential in `.spacefast/state.json` and reuses it without returning it to the model.", "When authenticated On-Device credentials are available, use the catalog `claim` operation with only `teamId` and the expected `spaceId`; otherwise let the user open the claim URL in their browser.", "Publish again from On-Device after the browser claim. `publish` automatically exchanges the locally held claim credential once, persists the durable space-scoped credential, and retries without exposing either secret."];
108
+ readonly verification: readonly ["Confirm the space no longer has a claim expiry and appears under the intended account or team.", "Publish again from the same local root or inspect the space through `execute` to verify durable access works without asking for a raw token."];
109
+ readonly prompt: true;
110
+ }, {
111
+ readonly name: "rollback-safely";
112
+ readonly title: "Roll back safely";
113
+ readonly description: "Promote a known-good immutable version without rebuilding, then prove the live URL serves it.";
114
+ readonly whenToUse: "Use when the current live version is broken and a prior healthy version is known or discoverable.";
115
+ readonly keywords: readonly ["rollback", "revert", "version", "incident", "restore"];
116
+ readonly runtimes: readonly ["local", "hosted"];
117
+ readonly tools: readonly ["status", "rollback", "execute", "diagnose"];
118
+ readonly docs: readonly ["versions-and-rollback"];
119
+ readonly instructions: readonly ["Inspect recent immutable versions and current status. Compare the current live version with the candidate using the catalog `versions` and `diff` operations.", "Call `rollback` with the selected `versionId`. Rollback is additive and keeps later immutable versions available.", "If promotion returns an operation that is still settling, poll the catalog `operation_status` operation until it is done instead of assuming success."];
120
+ readonly verification: readonly ["Call `status` and confirm the live pointer references the selected version.", "Open the live URL and verify the failing path or behavior is restored; use `diagnose` if it is not."];
121
+ readonly prompt: true;
122
+ }, {
123
+ readonly name: "set-up-custom-domain";
124
+ readonly title: "Set up a custom domain";
125
+ readonly description: "Attach a domain, provide the exact DNS records, and wait for HTTPS serving proof before reporting it live.";
126
+ readonly whenToUse: "Use when the user owns a domain they want a Spacefast space to serve.";
127
+ readonly keywords: readonly ["domain", "dns", "tls", "https", "cname", "custom"];
128
+ readonly runtimes: readonly ["local", "hosted"];
129
+ readonly tools: readonly ["execute"];
130
+ readonly docs: readonly ["custom-domains", "recipes/migrate-dns"];
131
+ readonly instructions: readonly ["Add the domain with `sf domains add <domain>` or catalog operation `domains_add`; preserve the exact record values Spacefast returns.", "Give the user those DNS records to create at their provider. Do not claim this MCP changed third-party DNS unless it actually has an authorized provider integration.", "Keep the existing production hostname available during the cutover and avoid deleting old records until the new path is proven."];
132
+ readonly verification: readonly ["Run `sf domains check` or catalog operation `domains_check` until DNS and certificate state are ready.", "Open the final custom-domain HTTPS URL and verify representative content before reporting it live."];
133
+ readonly prompt: true;
134
+ readonly recipe: {
135
+ readonly slug: "recipes/custom-domain";
136
+ readonly tier: "full";
137
+ readonly url: "https://spacefast.com/help/domains";
138
+ };
139
+ }, {
140
+ readonly name: "redirects";
141
+ readonly title: "Ship redirects with a version";
142
+ readonly description: "Add redirect rules to the publish artifact so routing changes are versioned and roll back with the content.";
143
+ readonly whenToUse: "Use for moved pages, canonical host paths, and intentional permanent or temporary redirects.";
144
+ readonly keywords: readonly ["redirect", "rewrite", "routing", "301", "302", "path"];
145
+ readonly runtimes: readonly ["local", "hosted"];
146
+ readonly tools: readonly ["publish", "execute"];
147
+ readonly docs: readonly ["redirects"];
148
+ readonly instructions: readonly ["Inspect existing routing rules, then add the smallest non-conflicting rules to `_redirects` at the publish root.", "Choose temporary or permanent status deliberately, preserve path/query semantics where required, and avoid redirect loops or rules that shadow real assets.", "Publish the redirect file as part of the same immutable version as the related content change."];
149
+ readonly verification: readonly ["Request representative old and new paths and confirm the exact status and Location header.", "Verify the final target serves successfully and unrelated assets are not redirected."];
150
+ readonly recipe: {
151
+ readonly slug: "recipes/redirects";
152
+ readonly tier: "reference";
153
+ readonly url: "https://spacefast.com/help/redirects";
154
+ };
155
+ }, {
156
+ readonly name: "migrate-dns";
157
+ readonly title: "Migrate DNS without avoidable downtime";
158
+ readonly description: "Pre-stage a custom domain, prove certificate readiness, and cut traffic over with a reversible DNS change.";
159
+ readonly whenToUse: "Use when an existing production domain must move to Spacefast.";
160
+ readonly keywords: readonly ["dns", "migrate", "cutover", "domain", "downtime", "certificate"];
161
+ readonly runtimes: readonly ["local", "hosted"];
162
+ readonly tools: readonly ["execute"];
163
+ readonly docs: readonly ["custom-domains"];
164
+ readonly instructions: readonly ["Inventory the current authoritative DNS records and lower TTL ahead of the cutover when the provider and timing allow it.", "Add the domain to Spacefast and pre-stage every record it returns while preserving a working rollback path.", "Cut over only after the Spacefast endpoint, expected content, and TLS readiness can be validated. Keep the previous origin available until propagation is complete."];
165
+ readonly verification: readonly ["Check resolution from more than one resolver and confirm the certificate matches the final hostname.", "Open the public HTTPS URL, verify representative content, and monitor for old-origin traffic before removing rollback records."];
166
+ readonly recipe: {
167
+ readonly slug: "recipes/migrate-dns";
168
+ readonly tier: "reference";
169
+ readonly url: "https://spacefast.com/help/domains";
170
+ };
171
+ }, {
172
+ readonly name: "debug-a-failed-build";
173
+ readonly title: "Debug a failed build";
174
+ readonly description: "Use ranked diagnostics and real logs to find why a publish failed or stalled, fix it, and re-verify.";
175
+ readonly whenToUse: "Use when a build, finalize, activation, or live serving step fails or stalls.";
176
+ readonly keywords: readonly ["debug", "failed", "build", "logs", "diagnose", "stalled"];
177
+ readonly runtimes: readonly ["local", "hosted"];
178
+ readonly tools: readonly ["execute"];
179
+ readonly docs: readonly ["troubleshooting"];
180
+ readonly instructions: readonly ["Use `execute` to find and call the catalog diagnostics operation for the space and optional version. Read its ranked findings, locations, error codes, fix hints, and docs links instead of guessing from a generic status.", "Use the catalog `build_logs` operation for publish/finalize detail, runtime-log operations for serving errors, and version operations to compare with the last ready version.", "Apply the smallest fix tied to the evidence, rebuild, and publish again. Follow the problem document's `type` URL for any referenced error code."];
181
+ readonly verification: readonly ["Re-run the relevant diagnostics or status operation through `execute` and confirm the new version reaches the intended live state.", "Open the affected live path and verify the concrete failure no longer reproduces."];
182
+ readonly prompt: true;
183
+ }, {
184
+ readonly name: "manage-access";
185
+ readonly title: "Manage access";
186
+ readonly description: "Create narrowly scoped Grants, People, and Links, then verify a concrete request without leaking credentials.";
187
+ readonly whenToUse: "Use when a space or path must be made public, team-only, or shared with specific people or machines.";
188
+ readonly keywords: readonly ["access", "private", "public", "people", "links", "grant", "share"];
189
+ readonly runtimes: readonly ["local", "hosted"];
190
+ readonly tools: readonly ["execute", "whoami"];
191
+ readonly docs: readonly ["access-control"];
192
+ readonly instructions: readonly ["Inspect current Grants with `sf share` or the catalog `grants_list` operation and identify one explicit access intent. Anonymous spaces start Private.", "Apply the narrowest suitable Public or Team Grant, People invitation, scoped Link/password, or machine/external-identity Grant. Keep resource scopes explicit.", "Show newly created Link or machine secrets only to the requesting user. Never put credentials, claim credentials, or API keys in logs or committed files."];
193
+ readonly verification: readonly ["Use `sf share check --as public --path /docs` or the catalog `grants_check` operation for a representative request.", "Test a new Link in the intended signed-out or recipient context and confirm unrelated resources remain inaccessible."];
194
+ readonly prompt: true;
195
+ }];
196
+ export declare const SPACEFAST_PROMPT_SKILLS: ({
197
+ readonly name: "create-and-publish-site";
198
+ readonly title: "Create and publish a polished website";
199
+ readonly description: "Turn a brief into a responsive static website, review the result, publish it to Spacefast, and verify the live version.";
200
+ readonly whenToUse: "Use when the user wants an agent to design, build, improve, or launch a new website rather than only upload an existing build.";
201
+ readonly keywords: readonly ["create", "website", "design", "build", "responsive", "launch", "publish"];
202
+ readonly runtimes: readonly ["local", "hosted"];
203
+ readonly tools: readonly ["publish", "execute"];
204
+ readonly docs: readonly ["quickstart", "publishing"];
205
+ readonly instructions: readonly ["Clarify the audience, goal, required content, brand constraints, and desired call to action. If the visual direction is open, propose two or three distinct directions and choose one with the user.", "Inspect the existing workspace before editing. Reuse its framework, package manager, components, assets, and build conventions when they are sound.", "Build a focused, accessible static experience with a clear hierarchy, real content, responsive layouts, useful interaction states, and no placeholder copy. Keep the main path simple and put secondary detail behind progressive disclosure.", "Run the real build and inspect the result at mobile and desktop widths. Fix overflow, illegible contrast, broken links, missing assets, keyboard traps, and avoidable layout shift.", "Review the workspace diff and summarize material design or content judgments before publishing. Never include API keys, claim credentials, upload credentials, or local auth state in the artifact.", "Publish the built output with `publish`. Present Open as the reusable access link and Claim as the one-time ownership link. Treat live and immutable-version URLs as receipt metadata, not extra actions."];
206
+ readonly verification: readonly ["Call `status` after publishing and confirm the intended version is live; use `diagnose` if serving is stalled or failed.", "Open the live URL and verify the primary page, navigation, assets, responsive layout, and main call to action before claiming success."];
207
+ readonly runtimeNotes: {
208
+ readonly local: "On-Device can work directly inside the configured local workspace root and publish a local build path.";
209
+ readonly hosted: "Hosted has no filesystem. Generate small files in the client and publish them inline, or use catalog manifest and import operations for larger artifacts.";
210
+ };
211
+ readonly prompt: true;
212
+ readonly recipe: {
213
+ readonly slug: "recipes/create-and-publish-site";
214
+ readonly tier: "full";
215
+ readonly url: `${string}/getting-started/agents`;
216
+ };
217
+ } | {
218
+ readonly name: "publish-and-verify";
219
+ readonly title: "Publish and verify";
220
+ readonly description: "Publish an existing static build, confirm the new version is actually live, and return the useful URLs without leaking credentials.";
221
+ readonly whenToUse: "Use when the artifact already exists and the user wants it published or updated.";
222
+ readonly keywords: readonly ["publish", "deploy", "live", "verify", "version", "claim"];
223
+ readonly runtimes: readonly ["local", "hosted"];
224
+ readonly tools: readonly ["publish", "status", "diagnose"];
225
+ readonly docs: readonly ["publishing", "workflow/publish-receipt", "workflow/secret-handling"];
226
+ readonly instructions: readonly ["Identify the actual publish root or build output. Run the real build first when the source tree is not itself the static artifact.", "Publish with `publish`. For an anonymous On-Device publish, keep the claim credential in local custody and return only the claim URL and expiry; never expose or ask the user to paste the raw token.", "Report the bare Live URL, private Access URL when present, immutable Version URL when present, anonymous Claim URL and expiry when present, plus actionable diagnostics."];
227
+ readonly verification: readonly ["Call `status` and confirm the intended version is live. Use `diagnose` for a failed or stalled publish.", "Open the live URL and verify representative content and assets rather than treating a successful upload or health check as serving proof."];
228
+ readonly runtimeNotes: {
229
+ readonly local: "Publish a bounded local path; locally custodied claim credentials are reused automatically.";
230
+ readonly hosted: "Publish inline files, or use catalog manifest and import operations for larger artifacts. Hosted has no filesystem.";
231
+ };
232
+ readonly prompt: true;
233
+ readonly recipe: {
234
+ readonly slug: "recipes/agent-publish";
235
+ readonly tier: "full";
236
+ readonly url: `${string}/publishing/anonymous`;
237
+ };
238
+ } | {
239
+ readonly name: "ci-github-actions";
240
+ readonly title: "Publish from GitHub Actions";
241
+ readonly description: "Create a repository-aware GitHub Actions workflow that builds and publishes with a masked Spacefast token.";
242
+ readonly whenToUse: "Use when pushes or manual workflow runs should publish automatically from GitHub.";
243
+ readonly keywords: readonly ["github", "actions", "ci", "push", "automatic", "workflow"];
244
+ readonly runtimes: readonly ["local", "hosted"];
245
+ readonly tools: readonly ["execute"];
246
+ readonly docs: readonly ["builds", "publishing", "workflow/secret-handling"];
247
+ readonly instructions: readonly ["Inspect the repository's package manager, lockfile, build command, runtime version, output directory, and existing workflows before writing YAML.", "Create a least-privilege workflow triggered by the intended branch and `workflow_dispatch`: check out the repository, install with the locked dependency command, build, and run `npx -y spacefast@<pinned-version> publish <output> --json`.", "Store the credential as a masked `SPACEFAST_TOKEN` repository or environment secret. Never echo it or upload generated auth files, claim credentials, or upload credentials as artifacts.", "Use the repository's real package manager and output directory; do not copy a generic npm/dist example over a Bun, pnpm, yarn, or custom build."];
248
+ readonly verification: readonly ["Validate the workflow syntax and run it on an explicit test branch or manual dispatch.", "Inspect the publish receipt and live URL; a green build step alone is not serving proof."];
249
+ readonly prompt: true;
250
+ readonly recipe: {
251
+ readonly slug: "recipes/github-deploys";
252
+ readonly tier: "full";
253
+ readonly url: `${string}/publishing/git`;
254
+ };
255
+ } | {
256
+ readonly name: "preview-channels";
257
+ readonly title: "Preview changes safely";
258
+ readonly description: "Publish branch or pull-request work to an isolated private preview and share it explicitly without touching production.";
259
+ readonly whenToUse: "Use when reviewers need a realistic preview before a change goes live.";
260
+ readonly keywords: readonly ["preview", "channel", "branch", "pull request", "review", "private"];
261
+ readonly runtimes: readonly ["local", "hosted"];
262
+ readonly tools: readonly ["publish", "status", "execute"];
263
+ readonly docs: readonly ["builds", "access-control"];
264
+ readonly instructions: readonly ["Publish the branch through a connected repository or to an explicit non-production channel so the live production channel is unchanged.", "Keep the preview private by default. Use an Open URL for the owner's browser or create the narrowest scoped Link needed for reviewers.", "Label the preview with the branch, change, or pull request it represents and report what is intentionally out of scope."];
265
+ readonly verification: readonly ["Confirm the preview serves the expected version and production still points at its previous version.", "Test the reviewer link in a signed-out context and revoke it when review is complete."];
266
+ readonly recipe: {
267
+ readonly slug: "recipes/preview-channels";
268
+ readonly tier: "full";
269
+ readonly url: `${string}/publishing/git`;
270
+ };
271
+ } | {
272
+ readonly name: "claim-flow";
273
+ readonly title: "Claim an anonymous space";
274
+ readonly description: "Attach an anonymous space to an account or team before expiry while keeping every claim credential in server or local custody.";
275
+ readonly whenToUse: "Use after an anonymous publish returns a claim URL and expiry.";
276
+ readonly keywords: readonly ["claim", "anonymous", "ownership", "team", "continuation", "credential"];
277
+ readonly runtimes: readonly ["local", "hosted"];
278
+ readonly tools: readonly ["execute", "publish"];
279
+ readonly docs: readonly ["anonymous-publish", "workflow/continue-after-claim", "workflow/secret-handling"];
280
+ readonly instructions: readonly ["Return the claim URL and expiry to the user, never the raw claim credential. On-Device stores that credential in `.spacefast/state.json` and reuses it without returning it to the model.", "When authenticated On-Device credentials are available, use the catalog `claim` operation with only `teamId` and the expected `spaceId`; otherwise let the user open the claim URL in their browser.", "Publish again from On-Device after the browser claim. `publish` automatically exchanges the locally held claim credential once, persists the durable space-scoped credential, and retries without exposing either secret."];
281
+ readonly verification: readonly ["Confirm the space no longer has a claim expiry and appears under the intended account or team.", "Publish again from the same local root or inspect the space through `execute` to verify durable access works without asking for a raw token."];
282
+ readonly prompt: true;
283
+ } | {
284
+ readonly name: "rollback-safely";
285
+ readonly title: "Roll back safely";
286
+ readonly description: "Promote a known-good immutable version without rebuilding, then prove the live URL serves it.";
287
+ readonly whenToUse: "Use when the current live version is broken and a prior healthy version is known or discoverable.";
288
+ readonly keywords: readonly ["rollback", "revert", "version", "incident", "restore"];
289
+ readonly runtimes: readonly ["local", "hosted"];
290
+ readonly tools: readonly ["status", "rollback", "execute", "diagnose"];
291
+ readonly docs: readonly ["versions-and-rollback"];
292
+ readonly instructions: readonly ["Inspect recent immutable versions and current status. Compare the current live version with the candidate using the catalog `versions` and `diff` operations.", "Call `rollback` with the selected `versionId`. Rollback is additive and keeps later immutable versions available.", "If promotion returns an operation that is still settling, poll the catalog `operation_status` operation until it is done instead of assuming success."];
293
+ readonly verification: readonly ["Call `status` and confirm the live pointer references the selected version.", "Open the live URL and verify the failing path or behavior is restored; use `diagnose` if it is not."];
294
+ readonly prompt: true;
295
+ } | {
296
+ readonly name: "set-up-custom-domain";
297
+ readonly title: "Set up a custom domain";
298
+ readonly description: "Attach a domain, provide the exact DNS records, and wait for HTTPS serving proof before reporting it live.";
299
+ readonly whenToUse: "Use when the user owns a domain they want a Spacefast space to serve.";
300
+ readonly keywords: readonly ["domain", "dns", "tls", "https", "cname", "custom"];
301
+ readonly runtimes: readonly ["local", "hosted"];
302
+ readonly tools: readonly ["execute"];
303
+ readonly docs: readonly ["custom-domains", "recipes/migrate-dns"];
304
+ readonly instructions: readonly ["Add the domain with `sf domains add <domain>` or catalog operation `domains_add`; preserve the exact record values Spacefast returns.", "Give the user those DNS records to create at their provider. Do not claim this MCP changed third-party DNS unless it actually has an authorized provider integration.", "Keep the existing production hostname available during the cutover and avoid deleting old records until the new path is proven."];
305
+ readonly verification: readonly ["Run `sf domains check` or catalog operation `domains_check` until DNS and certificate state are ready.", "Open the final custom-domain HTTPS URL and verify representative content before reporting it live."];
306
+ readonly prompt: true;
307
+ readonly recipe: {
308
+ readonly slug: "recipes/custom-domain";
309
+ readonly tier: "full";
310
+ readonly url: "https://spacefast.com/help/domains";
311
+ };
312
+ } | {
313
+ readonly name: "redirects";
314
+ readonly title: "Ship redirects with a version";
315
+ readonly description: "Add redirect rules to the publish artifact so routing changes are versioned and roll back with the content.";
316
+ readonly whenToUse: "Use for moved pages, canonical host paths, and intentional permanent or temporary redirects.";
317
+ readonly keywords: readonly ["redirect", "rewrite", "routing", "301", "302", "path"];
318
+ readonly runtimes: readonly ["local", "hosted"];
319
+ readonly tools: readonly ["publish", "execute"];
320
+ readonly docs: readonly ["redirects"];
321
+ readonly instructions: readonly ["Inspect existing routing rules, then add the smallest non-conflicting rules to `_redirects` at the publish root.", "Choose temporary or permanent status deliberately, preserve path/query semantics where required, and avoid redirect loops or rules that shadow real assets.", "Publish the redirect file as part of the same immutable version as the related content change."];
322
+ readonly verification: readonly ["Request representative old and new paths and confirm the exact status and Location header.", "Verify the final target serves successfully and unrelated assets are not redirected."];
323
+ readonly recipe: {
324
+ readonly slug: "recipes/redirects";
325
+ readonly tier: "reference";
326
+ readonly url: "https://spacefast.com/help/redirects";
327
+ };
328
+ } | {
329
+ readonly name: "migrate-dns";
330
+ readonly title: "Migrate DNS without avoidable downtime";
331
+ readonly description: "Pre-stage a custom domain, prove certificate readiness, and cut traffic over with a reversible DNS change.";
332
+ readonly whenToUse: "Use when an existing production domain must move to Spacefast.";
333
+ readonly keywords: readonly ["dns", "migrate", "cutover", "domain", "downtime", "certificate"];
334
+ readonly runtimes: readonly ["local", "hosted"];
335
+ readonly tools: readonly ["execute"];
336
+ readonly docs: readonly ["custom-domains"];
337
+ readonly instructions: readonly ["Inventory the current authoritative DNS records and lower TTL ahead of the cutover when the provider and timing allow it.", "Add the domain to Spacefast and pre-stage every record it returns while preserving a working rollback path.", "Cut over only after the Spacefast endpoint, expected content, and TLS readiness can be validated. Keep the previous origin available until propagation is complete."];
338
+ readonly verification: readonly ["Check resolution from more than one resolver and confirm the certificate matches the final hostname.", "Open the public HTTPS URL, verify representative content, and monitor for old-origin traffic before removing rollback records."];
339
+ readonly recipe: {
340
+ readonly slug: "recipes/migrate-dns";
341
+ readonly tier: "reference";
342
+ readonly url: "https://spacefast.com/help/domains";
343
+ };
344
+ } | {
345
+ readonly name: "debug-a-failed-build";
346
+ readonly title: "Debug a failed build";
347
+ readonly description: "Use ranked diagnostics and real logs to find why a publish failed or stalled, fix it, and re-verify.";
348
+ readonly whenToUse: "Use when a build, finalize, activation, or live serving step fails or stalls.";
349
+ readonly keywords: readonly ["debug", "failed", "build", "logs", "diagnose", "stalled"];
350
+ readonly runtimes: readonly ["local", "hosted"];
351
+ readonly tools: readonly ["execute"];
352
+ readonly docs: readonly ["troubleshooting"];
353
+ readonly instructions: readonly ["Use `execute` to find and call the catalog diagnostics operation for the space and optional version. Read its ranked findings, locations, error codes, fix hints, and docs links instead of guessing from a generic status.", "Use the catalog `build_logs` operation for publish/finalize detail, runtime-log operations for serving errors, and version operations to compare with the last ready version.", "Apply the smallest fix tied to the evidence, rebuild, and publish again. Follow the problem document's `type` URL for any referenced error code."];
354
+ readonly verification: readonly ["Re-run the relevant diagnostics or status operation through `execute` and confirm the new version reaches the intended live state.", "Open the affected live path and verify the concrete failure no longer reproduces."];
355
+ readonly prompt: true;
356
+ } | {
357
+ readonly name: "manage-access";
358
+ readonly title: "Manage access";
359
+ readonly description: "Create narrowly scoped Grants, People, and Links, then verify a concrete request without leaking credentials.";
360
+ readonly whenToUse: "Use when a space or path must be made public, team-only, or shared with specific people or machines.";
361
+ readonly keywords: readonly ["access", "private", "public", "people", "links", "grant", "share"];
362
+ readonly runtimes: readonly ["local", "hosted"];
363
+ readonly tools: readonly ["execute", "whoami"];
364
+ readonly docs: readonly ["access-control"];
365
+ readonly instructions: readonly ["Inspect current Grants with `sf share` or the catalog `grants_list` operation and identify one explicit access intent. Anonymous spaces start Private.", "Apply the narrowest suitable Public or Team Grant, People invitation, scoped Link/password, or machine/external-identity Grant. Keep resource scopes explicit.", "Show newly created Link or machine secrets only to the requesting user. Never put credentials, claim credentials, or API keys in logs or committed files."];
366
+ readonly verification: readonly ["Use `sf share check --as public --path /docs` or the catalog `grants_check` operation for a representative request.", "Test a new Link in the intended signed-out or recipient context and confirm unrelated resources remain inaccessible."];
367
+ readonly prompt: true;
368
+ })[];
369
+ export declare const SPACEFAST_RECIPE_SKILLS: (({
370
+ readonly name: "create-and-publish-site";
371
+ readonly title: "Create and publish a polished website";
372
+ readonly description: "Turn a brief into a responsive static website, review the result, publish it to Spacefast, and verify the live version.";
373
+ readonly whenToUse: "Use when the user wants an agent to design, build, improve, or launch a new website rather than only upload an existing build.";
374
+ readonly keywords: readonly ["create", "website", "design", "build", "responsive", "launch", "publish"];
375
+ readonly runtimes: readonly ["local", "hosted"];
376
+ readonly tools: readonly ["publish", "execute"];
377
+ readonly docs: readonly ["quickstart", "publishing"];
378
+ readonly instructions: readonly ["Clarify the audience, goal, required content, brand constraints, and desired call to action. If the visual direction is open, propose two or three distinct directions and choose one with the user.", "Inspect the existing workspace before editing. Reuse its framework, package manager, components, assets, and build conventions when they are sound.", "Build a focused, accessible static experience with a clear hierarchy, real content, responsive layouts, useful interaction states, and no placeholder copy. Keep the main path simple and put secondary detail behind progressive disclosure.", "Run the real build and inspect the result at mobile and desktop widths. Fix overflow, illegible contrast, broken links, missing assets, keyboard traps, and avoidable layout shift.", "Review the workspace diff and summarize material design or content judgments before publishing. Never include API keys, claim credentials, upload credentials, or local auth state in the artifact.", "Publish the built output with `publish`. Present Open as the reusable access link and Claim as the one-time ownership link. Treat live and immutable-version URLs as receipt metadata, not extra actions."];
379
+ readonly verification: readonly ["Call `status` after publishing and confirm the intended version is live; use `diagnose` if serving is stalled or failed.", "Open the live URL and verify the primary page, navigation, assets, responsive layout, and main call to action before claiming success."];
380
+ readonly runtimeNotes: {
381
+ readonly local: "On-Device can work directly inside the configured local workspace root and publish a local build path.";
382
+ readonly hosted: "Hosted has no filesystem. Generate small files in the client and publish them inline, or use catalog manifest and import operations for larger artifacts.";
383
+ };
384
+ readonly prompt: true;
385
+ readonly recipe: {
386
+ readonly slug: "recipes/create-and-publish-site";
387
+ readonly tier: "full";
388
+ readonly url: `${string}/getting-started/agents`;
389
+ };
390
+ } | {
391
+ readonly name: "publish-and-verify";
392
+ readonly title: "Publish and verify";
393
+ readonly description: "Publish an existing static build, confirm the new version is actually live, and return the useful URLs without leaking credentials.";
394
+ readonly whenToUse: "Use when the artifact already exists and the user wants it published or updated.";
395
+ readonly keywords: readonly ["publish", "deploy", "live", "verify", "version", "claim"];
396
+ readonly runtimes: readonly ["local", "hosted"];
397
+ readonly tools: readonly ["publish", "status", "diagnose"];
398
+ readonly docs: readonly ["publishing", "workflow/publish-receipt", "workflow/secret-handling"];
399
+ readonly instructions: readonly ["Identify the actual publish root or build output. Run the real build first when the source tree is not itself the static artifact.", "Publish with `publish`. For an anonymous On-Device publish, keep the claim credential in local custody and return only the claim URL and expiry; never expose or ask the user to paste the raw token.", "Report the bare Live URL, private Access URL when present, immutable Version URL when present, anonymous Claim URL and expiry when present, plus actionable diagnostics."];
400
+ readonly verification: readonly ["Call `status` and confirm the intended version is live. Use `diagnose` for a failed or stalled publish.", "Open the live URL and verify representative content and assets rather than treating a successful upload or health check as serving proof."];
401
+ readonly runtimeNotes: {
402
+ readonly local: "Publish a bounded local path; locally custodied claim credentials are reused automatically.";
403
+ readonly hosted: "Publish inline files, or use catalog manifest and import operations for larger artifacts. Hosted has no filesystem.";
404
+ };
405
+ readonly prompt: true;
406
+ readonly recipe: {
407
+ readonly slug: "recipes/agent-publish";
408
+ readonly tier: "full";
409
+ readonly url: `${string}/publishing/anonymous`;
410
+ };
411
+ } | {
412
+ readonly name: "ci-github-actions";
413
+ readonly title: "Publish from GitHub Actions";
414
+ readonly description: "Create a repository-aware GitHub Actions workflow that builds and publishes with a masked Spacefast token.";
415
+ readonly whenToUse: "Use when pushes or manual workflow runs should publish automatically from GitHub.";
416
+ readonly keywords: readonly ["github", "actions", "ci", "push", "automatic", "workflow"];
417
+ readonly runtimes: readonly ["local", "hosted"];
418
+ readonly tools: readonly ["execute"];
419
+ readonly docs: readonly ["builds", "publishing", "workflow/secret-handling"];
420
+ readonly instructions: readonly ["Inspect the repository's package manager, lockfile, build command, runtime version, output directory, and existing workflows before writing YAML.", "Create a least-privilege workflow triggered by the intended branch and `workflow_dispatch`: check out the repository, install with the locked dependency command, build, and run `npx -y spacefast@<pinned-version> publish <output> --json`.", "Store the credential as a masked `SPACEFAST_TOKEN` repository or environment secret. Never echo it or upload generated auth files, claim credentials, or upload credentials as artifacts.", "Use the repository's real package manager and output directory; do not copy a generic npm/dist example over a Bun, pnpm, yarn, or custom build."];
421
+ readonly verification: readonly ["Validate the workflow syntax and run it on an explicit test branch or manual dispatch.", "Inspect the publish receipt and live URL; a green build step alone is not serving proof."];
422
+ readonly prompt: true;
423
+ readonly recipe: {
424
+ readonly slug: "recipes/github-deploys";
425
+ readonly tier: "full";
426
+ readonly url: `${string}/publishing/git`;
427
+ };
428
+ } | {
429
+ readonly name: "preview-channels";
430
+ readonly title: "Preview changes safely";
431
+ readonly description: "Publish branch or pull-request work to an isolated private preview and share it explicitly without touching production.";
432
+ readonly whenToUse: "Use when reviewers need a realistic preview before a change goes live.";
433
+ readonly keywords: readonly ["preview", "channel", "branch", "pull request", "review", "private"];
434
+ readonly runtimes: readonly ["local", "hosted"];
435
+ readonly tools: readonly ["publish", "status", "execute"];
436
+ readonly docs: readonly ["builds", "access-control"];
437
+ readonly instructions: readonly ["Publish the branch through a connected repository or to an explicit non-production channel so the live production channel is unchanged.", "Keep the preview private by default. Use an Open URL for the owner's browser or create the narrowest scoped Link needed for reviewers.", "Label the preview with the branch, change, or pull request it represents and report what is intentionally out of scope."];
438
+ readonly verification: readonly ["Confirm the preview serves the expected version and production still points at its previous version.", "Test the reviewer link in a signed-out context and revoke it when review is complete."];
439
+ readonly recipe: {
440
+ readonly slug: "recipes/preview-channels";
441
+ readonly tier: "full";
442
+ readonly url: `${string}/publishing/git`;
443
+ };
444
+ } | {
445
+ readonly name: "claim-flow";
446
+ readonly title: "Claim an anonymous space";
447
+ readonly description: "Attach an anonymous space to an account or team before expiry while keeping every claim credential in server or local custody.";
448
+ readonly whenToUse: "Use after an anonymous publish returns a claim URL and expiry.";
449
+ readonly keywords: readonly ["claim", "anonymous", "ownership", "team", "continuation", "credential"];
450
+ readonly runtimes: readonly ["local", "hosted"];
451
+ readonly tools: readonly ["execute", "publish"];
452
+ readonly docs: readonly ["anonymous-publish", "workflow/continue-after-claim", "workflow/secret-handling"];
453
+ readonly instructions: readonly ["Return the claim URL and expiry to the user, never the raw claim credential. On-Device stores that credential in `.spacefast/state.json` and reuses it without returning it to the model.", "When authenticated On-Device credentials are available, use the catalog `claim` operation with only `teamId` and the expected `spaceId`; otherwise let the user open the claim URL in their browser.", "Publish again from On-Device after the browser claim. `publish` automatically exchanges the locally held claim credential once, persists the durable space-scoped credential, and retries without exposing either secret."];
454
+ readonly verification: readonly ["Confirm the space no longer has a claim expiry and appears under the intended account or team.", "Publish again from the same local root or inspect the space through `execute` to verify durable access works without asking for a raw token."];
455
+ readonly prompt: true;
456
+ } | {
457
+ readonly name: "rollback-safely";
458
+ readonly title: "Roll back safely";
459
+ readonly description: "Promote a known-good immutable version without rebuilding, then prove the live URL serves it.";
460
+ readonly whenToUse: "Use when the current live version is broken and a prior healthy version is known or discoverable.";
461
+ readonly keywords: readonly ["rollback", "revert", "version", "incident", "restore"];
462
+ readonly runtimes: readonly ["local", "hosted"];
463
+ readonly tools: readonly ["status", "rollback", "execute", "diagnose"];
464
+ readonly docs: readonly ["versions-and-rollback"];
465
+ readonly instructions: readonly ["Inspect recent immutable versions and current status. Compare the current live version with the candidate using the catalog `versions` and `diff` operations.", "Call `rollback` with the selected `versionId`. Rollback is additive and keeps later immutable versions available.", "If promotion returns an operation that is still settling, poll the catalog `operation_status` operation until it is done instead of assuming success."];
466
+ readonly verification: readonly ["Call `status` and confirm the live pointer references the selected version.", "Open the live URL and verify the failing path or behavior is restored; use `diagnose` if it is not."];
467
+ readonly prompt: true;
468
+ } | {
469
+ readonly name: "set-up-custom-domain";
470
+ readonly title: "Set up a custom domain";
471
+ readonly description: "Attach a domain, provide the exact DNS records, and wait for HTTPS serving proof before reporting it live.";
472
+ readonly whenToUse: "Use when the user owns a domain they want a Spacefast space to serve.";
473
+ readonly keywords: readonly ["domain", "dns", "tls", "https", "cname", "custom"];
474
+ readonly runtimes: readonly ["local", "hosted"];
475
+ readonly tools: readonly ["execute"];
476
+ readonly docs: readonly ["custom-domains", "recipes/migrate-dns"];
477
+ readonly instructions: readonly ["Add the domain with `sf domains add <domain>` or catalog operation `domains_add`; preserve the exact record values Spacefast returns.", "Give the user those DNS records to create at their provider. Do not claim this MCP changed third-party DNS unless it actually has an authorized provider integration.", "Keep the existing production hostname available during the cutover and avoid deleting old records until the new path is proven."];
478
+ readonly verification: readonly ["Run `sf domains check` or catalog operation `domains_check` until DNS and certificate state are ready.", "Open the final custom-domain HTTPS URL and verify representative content before reporting it live."];
479
+ readonly prompt: true;
480
+ readonly recipe: {
481
+ readonly slug: "recipes/custom-domain";
482
+ readonly tier: "full";
483
+ readonly url: "https://spacefast.com/help/domains";
484
+ };
485
+ } | {
486
+ readonly name: "redirects";
487
+ readonly title: "Ship redirects with a version";
488
+ readonly description: "Add redirect rules to the publish artifact so routing changes are versioned and roll back with the content.";
489
+ readonly whenToUse: "Use for moved pages, canonical host paths, and intentional permanent or temporary redirects.";
490
+ readonly keywords: readonly ["redirect", "rewrite", "routing", "301", "302", "path"];
491
+ readonly runtimes: readonly ["local", "hosted"];
492
+ readonly tools: readonly ["publish", "execute"];
493
+ readonly docs: readonly ["redirects"];
494
+ readonly instructions: readonly ["Inspect existing routing rules, then add the smallest non-conflicting rules to `_redirects` at the publish root.", "Choose temporary or permanent status deliberately, preserve path/query semantics where required, and avoid redirect loops or rules that shadow real assets.", "Publish the redirect file as part of the same immutable version as the related content change."];
495
+ readonly verification: readonly ["Request representative old and new paths and confirm the exact status and Location header.", "Verify the final target serves successfully and unrelated assets are not redirected."];
496
+ readonly recipe: {
497
+ readonly slug: "recipes/redirects";
498
+ readonly tier: "reference";
499
+ readonly url: "https://spacefast.com/help/redirects";
500
+ };
501
+ } | {
502
+ readonly name: "migrate-dns";
503
+ readonly title: "Migrate DNS without avoidable downtime";
504
+ readonly description: "Pre-stage a custom domain, prove certificate readiness, and cut traffic over with a reversible DNS change.";
505
+ readonly whenToUse: "Use when an existing production domain must move to Spacefast.";
506
+ readonly keywords: readonly ["dns", "migrate", "cutover", "domain", "downtime", "certificate"];
507
+ readonly runtimes: readonly ["local", "hosted"];
508
+ readonly tools: readonly ["execute"];
509
+ readonly docs: readonly ["custom-domains"];
510
+ readonly instructions: readonly ["Inventory the current authoritative DNS records and lower TTL ahead of the cutover when the provider and timing allow it.", "Add the domain to Spacefast and pre-stage every record it returns while preserving a working rollback path.", "Cut over only after the Spacefast endpoint, expected content, and TLS readiness can be validated. Keep the previous origin available until propagation is complete."];
511
+ readonly verification: readonly ["Check resolution from more than one resolver and confirm the certificate matches the final hostname.", "Open the public HTTPS URL, verify representative content, and monitor for old-origin traffic before removing rollback records."];
512
+ readonly recipe: {
513
+ readonly slug: "recipes/migrate-dns";
514
+ readonly tier: "reference";
515
+ readonly url: "https://spacefast.com/help/domains";
516
+ };
517
+ } | {
518
+ readonly name: "debug-a-failed-build";
519
+ readonly title: "Debug a failed build";
520
+ readonly description: "Use ranked diagnostics and real logs to find why a publish failed or stalled, fix it, and re-verify.";
521
+ readonly whenToUse: "Use when a build, finalize, activation, or live serving step fails or stalls.";
522
+ readonly keywords: readonly ["debug", "failed", "build", "logs", "diagnose", "stalled"];
523
+ readonly runtimes: readonly ["local", "hosted"];
524
+ readonly tools: readonly ["execute"];
525
+ readonly docs: readonly ["troubleshooting"];
526
+ readonly instructions: readonly ["Use `execute` to find and call the catalog diagnostics operation for the space and optional version. Read its ranked findings, locations, error codes, fix hints, and docs links instead of guessing from a generic status.", "Use the catalog `build_logs` operation for publish/finalize detail, runtime-log operations for serving errors, and version operations to compare with the last ready version.", "Apply the smallest fix tied to the evidence, rebuild, and publish again. Follow the problem document's `type` URL for any referenced error code."];
527
+ readonly verification: readonly ["Re-run the relevant diagnostics or status operation through `execute` and confirm the new version reaches the intended live state.", "Open the affected live path and verify the concrete failure no longer reproduces."];
528
+ readonly prompt: true;
529
+ } | {
530
+ readonly name: "manage-access";
531
+ readonly title: "Manage access";
532
+ readonly description: "Create narrowly scoped Grants, People, and Links, then verify a concrete request without leaking credentials.";
533
+ readonly whenToUse: "Use when a space or path must be made public, team-only, or shared with specific people or machines.";
534
+ readonly keywords: readonly ["access", "private", "public", "people", "links", "grant", "share"];
535
+ readonly runtimes: readonly ["local", "hosted"];
536
+ readonly tools: readonly ["execute", "whoami"];
537
+ readonly docs: readonly ["access-control"];
538
+ readonly instructions: readonly ["Inspect current Grants with `sf share` or the catalog `grants_list` operation and identify one explicit access intent. Anonymous spaces start Private.", "Apply the narrowest suitable Public or Team Grant, People invitation, scoped Link/password, or machine/external-identity Grant. Keep resource scopes explicit.", "Show newly created Link or machine secrets only to the requesting user. Never put credentials, claim credentials, or API keys in logs or committed files."];
539
+ readonly verification: readonly ["Use `sf share check --as public --path /docs` or the catalog `grants_check` operation for a representative request.", "Test a new Link in the intended signed-out or recipient context and confirm unrelated resources remain inaccessible."];
540
+ readonly prompt: true;
541
+ }) & {
542
+ recipe: NonNullable<SpacefastSkillDefinition["recipe"]>;
543
+ })[];
544
+ export declare function findSpacefastSkill(name: string): SpacefastSkillDefinition | undefined;
545
+ export declare function searchSpacefastSkills(query?: string, limit?: number): readonly SpacefastSkillDefinition[];
546
+ export declare function renderSpacefastSkill(skillOrName: SpacefastSkillDefinition | string, runtime: SpacefastSkillRuntime): string;