@spacefast/common 0.0.26 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (302) hide show
  1. package/dist/agents/connect-targets.d.ts +6 -146
  2. package/dist/agents/connect-targets.js +63 -295
  3. package/dist/agents/private-key-oauth.d.ts +31 -1
  4. package/dist/agents/private-key-oauth.js +124 -33
  5. package/dist/agents/registry/core.d.ts +292 -0
  6. package/dist/agents/registry/core.js +1388 -0
  7. package/dist/agents/registry/deeplink-probes.d.ts +23 -0
  8. package/dist/agents/registry/deeplink-probes.js +18 -0
  9. package/dist/agents/registry/node.d.ts +56 -0
  10. package/dist/agents/registry/node.js +339 -0
  11. package/dist/brand-assets-build.js +1 -2
  12. package/dist/brand-assets.js +4 -7
  13. package/dist/brand.d.ts +17 -0
  14. package/dist/brand.js +24 -4
  15. package/dist/config/domains.d.ts +55 -28
  16. package/dist/config/domains.js +85 -41
  17. package/dist/config/index.js +1 -2
  18. package/dist/contracts/abuse.js +9 -24
  19. package/dist/contracts/access-profiles.d.ts +86 -0
  20. package/dist/contracts/access-profiles.js +89 -0
  21. package/dist/contracts/access.d.ts +21 -27
  22. package/dist/contracts/access.js +33 -64
  23. package/dist/contracts/activity.d.ts +18 -1
  24. package/dist/contracts/activity.js +70 -26
  25. package/dist/contracts/analytics.js +8 -10
  26. package/dist/contracts/api-keys.d.ts +77 -52
  27. package/dist/contracts/api-keys.js +44 -24
  28. package/dist/contracts/application-journal.d.ts +216 -0
  29. package/dist/contracts/application-journal.js +167 -0
  30. package/dist/contracts/auth.d.ts +90 -17
  31. package/dist/contracts/auth.js +86 -17
  32. package/dist/contracts/beta.d.ts +9 -4
  33. package/dist/contracts/beta.js +20 -16
  34. package/dist/contracts/billing.js +7 -11
  35. package/dist/contracts/bootstrap.d.ts +791 -0
  36. package/dist/contracts/bootstrap.js +51 -0
  37. package/dist/contracts/builds.d.ts +192 -7
  38. package/dist/contracts/builds.js +84 -21
  39. package/dist/contracts/channels.d.ts +43 -0
  40. package/dist/contracts/channels.js +25 -9
  41. package/dist/contracts/cli.d.ts +7 -0
  42. package/dist/contracts/cli.js +6 -0
  43. package/dist/contracts/collab-public.d.ts +1 -1
  44. package/dist/contracts/collab-public.js +5 -8
  45. package/dist/contracts/comments.d.ts +45 -35
  46. package/dist/contracts/comments.js +107 -77
  47. package/dist/contracts/commerce.d.ts +165 -0
  48. package/dist/contracts/commerce.js +146 -0
  49. package/dist/contracts/common.d.ts +3 -3
  50. package/dist/contracts/common.js +18 -29
  51. package/dist/contracts/content-contract-verification.d.ts +521 -0
  52. package/dist/contracts/content-contract-verification.js +320 -0
  53. package/dist/contracts/content-platform-fixture.d.ts +1278 -0
  54. package/dist/contracts/content-platform-fixture.js +44 -0
  55. package/dist/contracts/content-program.d.ts +994 -0
  56. package/dist/contracts/content-program.js +658 -0
  57. package/dist/contracts/content-sync.d.ts +290 -0
  58. package/dist/contracts/content-sync.js +167 -0
  59. package/dist/contracts/content.d.ts +432 -0
  60. package/dist/contracts/content.js +303 -0
  61. package/dist/contracts/continuation.d.ts +17 -1
  62. package/dist/contracts/continuation.js +23 -23
  63. package/dist/contracts/countries.js +3 -4
  64. package/dist/contracts/crons.d.ts +17 -0
  65. package/dist/contracts/crons.js +33 -15
  66. package/dist/contracts/dashboard-prefs.d.ts +56 -0
  67. package/dist/contracts/dashboard-prefs.js +51 -0
  68. package/dist/contracts/device-auth.d.ts +234 -37
  69. package/dist/contracts/device-auth.js +267 -53
  70. package/dist/contracts/docs.d.ts +6 -10
  71. package/dist/contracts/docs.js +5 -13
  72. package/dist/contracts/domains.d.ts +499 -102
  73. package/dist/contracts/domains.js +169 -58
  74. package/dist/contracts/email-preferences.d.ts +3 -3
  75. package/dist/contracts/email-preferences.js +6 -7
  76. package/dist/contracts/enums.d.ts +26 -26
  77. package/dist/contracts/enums.js +61 -54
  78. package/dist/contracts/error-code-meta.d.ts +273 -7
  79. package/dist/contracts/error-code-meta.js +81 -5
  80. package/dist/contracts/error-codes.d.ts +5 -5
  81. package/dist/contracts/error-codes.js +79 -16
  82. package/dist/contracts/events.d.ts +100 -20
  83. package/dist/contracts/events.js +107 -20
  84. package/dist/contracts/execution.d.ts +47 -66
  85. package/dist/contracts/execution.js +51 -64
  86. package/dist/contracts/feature-lifecycle.d.ts +70 -14
  87. package/dist/contracts/feature-lifecycle.js +86 -15
  88. package/dist/contracts/features.d.ts +100 -37
  89. package/dist/contracts/features.js +21 -27
  90. package/dist/contracts/fixtures/content-platform-v1.json +1108 -0
  91. package/dist/contracts/frame-session.d.ts +192 -0
  92. package/dist/contracts/frame-session.js +164 -0
  93. package/dist/contracts/functions.d.ts +218 -211
  94. package/dist/contracts/functions.js +273 -260
  95. package/dist/contracts/grant-copy.d.ts +43 -0
  96. package/dist/contracts/grant-copy.js +44 -0
  97. package/dist/contracts/grants.d.ts +64 -56
  98. package/dist/contracts/grants.js +124 -23
  99. package/dist/contracts/ids.d.ts +4 -1
  100. package/dist/contracts/ids.js +4 -1
  101. package/dist/contracts/internal.d.ts +5 -4
  102. package/dist/contracts/internal.js +12 -3
  103. package/dist/contracts/mcp.d.ts +17 -0
  104. package/dist/contracts/mcp.js +23 -0
  105. package/dist/contracts/me.d.ts +6 -1
  106. package/dist/contracts/me.js +12 -6
  107. package/dist/contracts/notifications.d.ts +27 -29
  108. package/dist/contracts/notifications.js +9 -4
  109. package/dist/contracts/oauth-resources.d.ts +121 -10
  110. package/dist/contracts/oauth-resources.js +130 -11
  111. package/dist/contracts/oauth-scope-actions.d.ts +90 -0
  112. package/dist/contracts/oauth-scope-actions.js +126 -0
  113. package/dist/contracts/operations.d.ts +27 -4
  114. package/dist/contracts/operations.js +11 -5
  115. package/dist/contracts/pages.d.ts +29 -5
  116. package/dist/contracts/pages.js +22 -5
  117. package/dist/contracts/partner-notifications.d.ts +3 -0
  118. package/dist/contracts/partner-notifications.js +65 -0
  119. package/dist/contracts/{platform.d.ts → partner.d.ts} +29 -42
  120. package/dist/contracts/{platform.js → partner.js} +27 -40
  121. package/dist/contracts/plan-policy.d.ts +1 -1
  122. package/dist/contracts/principal-assertion.d.ts +43 -0
  123. package/dist/contracts/principal-assertion.js +67 -0
  124. package/dist/contracts/principals.d.ts +73 -0
  125. package/dist/contracts/principals.js +59 -0
  126. package/dist/contracts/privacy.d.ts +11 -0
  127. package/dist/contracts/privacy.js +17 -0
  128. package/dist/contracts/problem-document.js +3 -4
  129. package/dist/contracts/publish-archive.d.ts +116 -18
  130. package/dist/contracts/publish-archive.js +6 -3
  131. package/dist/contracts/push-new.d.ts +4 -4
  132. package/dist/contracts/quotas.js +3 -3
  133. package/dist/contracts/realtime.d.ts +52 -0
  134. package/dist/contracts/realtime.js +54 -0
  135. package/dist/contracts/repository-connections.d.ts +1 -1
  136. package/dist/contracts/repository-connections.js +6 -2
  137. package/dist/contracts/resources.d.ts +105 -14
  138. package/dist/contracts/resources.js +145 -21
  139. package/dist/contracts/route-inventory.d.ts +358 -0
  140. package/dist/contracts/route-inventory.js +141 -0
  141. package/dist/contracts/runtime-api.d.ts +112 -35
  142. package/dist/contracts/runtime-api.js +86 -66
  143. package/dist/contracts/runtime-app.d.ts +11 -21
  144. package/dist/contracts/runtime-app.js +39 -24
  145. package/dist/contracts/runtime-components.d.ts +143 -0
  146. package/dist/contracts/runtime-components.js +199 -0
  147. package/dist/contracts/runtime-db.d.ts +45 -19
  148. package/dist/contracts/runtime-db.js +85 -20
  149. package/dist/contracts/runtime-purge.js +3 -5
  150. package/dist/contracts/runtime-services.d.ts +43 -75
  151. package/dist/contracts/runtime-services.js +29 -49
  152. package/dist/contracts/runtime-storage.d.ts +14 -14
  153. package/dist/contracts/runtime-storage.js +28 -13
  154. package/dist/contracts/sf-config-v1.d.ts +14 -18
  155. package/dist/contracts/slugs.js +13 -4
  156. package/dist/contracts/space-config.d.ts +235 -28
  157. package/dist/contracts/space-config.js +246 -91
  158. package/dist/contracts/spaces.d.ts +360 -255
  159. package/dist/contracts/spaces.js +190 -122
  160. package/dist/contracts/superadmin-activity.d.ts +3 -43
  161. package/dist/contracts/superadmin-activity.js +6 -30
  162. package/dist/contracts/superadmin-emails.d.ts +1 -0
  163. package/dist/contracts/superadmin-emails.js +17 -1
  164. package/dist/contracts/superadmin-runtime.d.ts +199 -0
  165. package/dist/contracts/superadmin-runtime.js +141 -0
  166. package/dist/contracts/superadmin-search.d.ts +22 -2
  167. package/dist/contracts/superadmin-search.js +14 -6
  168. package/dist/contracts/superadmin-spaces.d.ts +435 -186
  169. package/dist/contracts/superadmin-spaces.js +131 -25
  170. package/dist/contracts/superadmin-teams.d.ts +3 -0
  171. package/dist/contracts/superadmin-teams.js +1 -2
  172. package/dist/contracts/superadmin-tenants.d.ts +627 -6
  173. package/dist/contracts/superadmin-tenants.js +32 -7
  174. package/dist/contracts/superadmin.d.ts +98 -16
  175. package/dist/contracts/superadmin.js +63 -10
  176. package/dist/contracts/tags.d.ts +85 -58
  177. package/dist/contracts/tags.js +44 -34
  178. package/dist/contracts/teams.d.ts +72 -9
  179. package/dist/contracts/teams.js +84 -25
  180. package/dist/contracts/tenants.d.ts +135 -0
  181. package/dist/contracts/tenants.js +120 -0
  182. package/dist/contracts/test-triggers.d.ts +70 -0
  183. package/dist/contracts/test-triggers.js +116 -0
  184. package/dist/contracts/theme-json.js +3 -8
  185. package/dist/contracts/transfers.d.ts +1 -0
  186. package/dist/contracts/transfers.js +1 -0
  187. package/dist/contracts/usage.d.ts +209 -0
  188. package/dist/contracts/usage.js +124 -12
  189. package/dist/contracts/variables.d.ts +2 -2
  190. package/dist/contracts/variables.js +9 -13
  191. package/dist/contracts/webhooks.d.ts +13 -5
  192. package/dist/contracts/webhooks.js +3 -1
  193. package/dist/contracts/zero.d.ts +57 -64
  194. package/dist/contracts/zero.js +68 -66
  195. package/dist/dashboard-paths/index.d.ts +24 -21
  196. package/dist/dashboard-paths/index.js +35 -47
  197. package/dist/dashboard-paths/route-reservations.generated.d.ts +2 -0
  198. package/dist/dashboard-paths/route-reservations.generated.js +36 -0
  199. package/dist/docs/agent-arrival.d.ts +92 -0
  200. package/dist/docs/agent-arrival.js +227 -0
  201. package/dist/docs/agent-output-policy.d.ts +6 -0
  202. package/dist/docs/agent-output-policy.js +22 -0
  203. package/dist/docs/agent-prose.d.ts +11 -17
  204. package/dist/docs/agent-prose.js +62 -37
  205. package/dist/docs/agent-setup.d.ts +72 -41
  206. package/dist/docs/agent-setup.js +336 -436
  207. package/dist/docs/catalog.d.ts +147 -89
  208. package/dist/docs/catalog.js +157 -42
  209. package/dist/docs/error-docs.d.ts +2102 -1
  210. package/dist/docs/error-docs.js +285 -16
  211. package/dist/docs/index-build.d.ts +0 -1
  212. package/dist/docs/index-build.js +2 -3
  213. package/dist/docs/page-context-prompt.d.ts +77 -0
  214. package/dist/docs/page-context-prompt.js +131 -0
  215. package/dist/docs/reference-urls.d.ts +46 -0
  216. package/dist/docs/reference-urls.js +79 -0
  217. package/dist/docs/search.d.ts +6 -8
  218. package/dist/docs/search.js +10 -13
  219. package/dist/docs/skill-distribution.d.ts +4 -1
  220. package/dist/docs/skill-distribution.js +10 -5
  221. package/dist/docs/skills.d.ts +117 -117
  222. package/dist/docs/skills.js +120 -72
  223. package/dist/docs/start-prompts.d.ts +45 -0
  224. package/dist/docs/start-prompts.js +62 -0
  225. package/dist/domain-exploration.js +9 -13
  226. package/dist/og-template.d.ts +56 -0
  227. package/dist/og-template.js +56 -0
  228. package/dist/slug-policy/index.js +5 -11
  229. package/dist/utils/browser-credential.d.ts +13 -6
  230. package/dist/utils/browser-credential.js +14 -7
  231. package/dist/utils/build-settings.d.ts +16 -0
  232. package/dist/utils/build-settings.js +63 -17
  233. package/dist/utils/canonical-json.d.ts +3 -5
  234. package/dist/utils/canonical-json.js +3 -5
  235. package/dist/utils/cast-transport.d.ts +5 -17
  236. package/dist/utils/cast-transport.js +6 -19
  237. package/dist/utils/claim-token.js +1 -2
  238. package/dist/utils/comment-avatars.js +4 -6
  239. package/dist/utils/concurrency.js +2 -3
  240. package/dist/utils/content-type.d.ts +7 -6
  241. package/dist/utils/content-type.js +73 -51
  242. package/dist/utils/credential-policy.d.ts +50 -6
  243. package/dist/utils/credential-policy.js +123 -57
  244. package/dist/utils/egress-policy.fixtures.json +1 -1
  245. package/dist/utils/generate-space-name.d.ts +3 -8
  246. package/dist/utils/generate-space-name.js +3 -8
  247. package/dist/utils/grants.d.ts +0 -1
  248. package/dist/utils/grants.js +4 -7
  249. package/dist/utils/gravatar.d.ts +2 -4
  250. package/dist/utils/gravatar.js +6 -12
  251. package/dist/utils/id-hints.js +14 -23
  252. package/dist/utils/idempotency.d.ts +3 -3
  253. package/dist/utils/idempotency.js +6 -7
  254. package/dist/utils/local-space-state.d.ts +15 -15
  255. package/dist/utils/local-space-state.js +34 -23
  256. package/dist/utils/oauth-signed-query.d.ts +3 -5
  257. package/dist/utils/oauth-signed-query.js +6 -9
  258. package/dist/utils/one-shot-replay.d.ts +3 -5
  259. package/dist/utils/one-shot-replay.js +3 -5
  260. package/dist/utils/page-colors.d.ts +4 -10
  261. package/dist/utils/page-colors.js +11 -35
  262. package/dist/utils/page-fonts.js +6 -11
  263. package/dist/utils/page-preview.d.ts +0 -1
  264. package/dist/utils/page-preview.js +0 -1
  265. package/dist/utils/pages.d.ts +22 -11
  266. package/dist/utils/pages.js +70 -30
  267. package/dist/utils/privacy-regions.d.ts +19 -0
  268. package/dist/utils/privacy-regions.js +91 -0
  269. package/dist/utils/publish-form-data.d.ts +4 -5
  270. package/dist/utils/publish-form-data.js +2 -3
  271. package/dist/utils/publish-policy.d.ts +10 -23
  272. package/dist/utils/publish-policy.js +63 -116
  273. package/dist/utils/query-client.d.ts +2 -0
  274. package/dist/utils/query-client.js +10 -1
  275. package/dist/utils/runtime-paths.d.ts +4 -4
  276. package/dist/utils/runtime-paths.js +6 -8
  277. package/dist/utils/runtime-upload.d.ts +4 -0
  278. package/dist/utils/runtime-upload.js +5 -0
  279. package/dist/utils/secure-local-file.d.ts +3 -3
  280. package/dist/utils/secure-local-file.js +18 -24
  281. package/dist/utils/space-config.d.ts +11 -14
  282. package/dist/utils/space-config.js +10 -16
  283. package/dist/utils/static-runtime-policy.d.ts +5 -8
  284. package/dist/utils/static-runtime-policy.generated.d.ts +16 -0
  285. package/dist/utils/static-runtime-policy.generated.js +70 -0
  286. package/dist/utils/static-runtime-policy.js +17 -84
  287. package/dist/utils/storage-policy.js +1 -2
  288. package/dist/utils/upload-session.js +8 -14
  289. package/dist/utils/version-path.js +11 -19
  290. package/dist/utils/wpcom-auth-redirects.d.ts +5 -14
  291. package/dist/utils/wpcom-auth-redirects.js +1 -4
  292. package/dist/vocabulary.d.ts +7 -7
  293. package/dist/vocabulary.js +30 -16
  294. package/package.json +14 -2
  295. package/dist/agents/client-registry.d.ts +0 -22
  296. package/dist/agents/client-registry.js +0 -41
  297. package/dist/docs/agent-handoff-document.d.ts +0 -15
  298. package/dist/docs/agent-handoff-document.js +0 -180
  299. package/dist/docs/agent-solutions.d.ts +0 -110
  300. package/dist/docs/agent-solutions.js +0 -183
  301. package/dist/utils/query-keys.d.ts +0 -84
  302. package/dist/utils/query-keys.js +0 -108
@@ -1,27 +1,36 @@
1
1
  import { DOCS_BASE_URL } from "../config/domains.js";
2
2
  const BOTH_RUNTIMES = ["local", "hosted"];
3
+ const PUBLISH_CONTINUATION_INSTRUCTIONS = [
4
+ "If `publish.result.status` is `publishing`, call `operation_status` with `publish.result.job.poll.operationId`.",
5
+ "Call `operation_status` again only while `operation_status.result.done` is false.",
6
+ "Continue only when `operation_status.result.status` is `succeeded`.",
7
+ "Report `failed` or `canceled` and stop.",
8
+ ];
3
9
  /** Canonical agent workflows shared by MCP tools, prompts, resources, and recipe docs. */
4
10
  export const SPACEFAST_SKILLS = [
5
11
  {
6
12
  name: "create-and-publish-site",
7
13
  title: "Create and publish a polished website",
8
- description: "Turn a brief into a responsive website, review the result, publish it to Spacefast, and verify the live version.",
9
- whenToUse: "Use when the user wants an agent to design, build, improve, or launch a new website rather than only upload an existing build.",
14
+ description: "Build a responsive website from a brief. Publish it and verify the live version.",
15
+ whenToUse: "Use when the user wants a new website built, improved, or launched.",
10
16
  keywords: ["create", "website", "design", "build", "responsive", "launch", "publish"],
11
17
  runtimes: BOTH_RUNTIMES,
12
- tools: ["publish", "execute"],
18
+ tools: ["publish", "operation_status", "show_space_deployments"],
13
19
  docs: ["quickstart", "publishing"],
14
20
  instructions: [
15
- "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.",
16
- "Inspect the existing workspace before editing. Reuse its framework, package manager, components, assets, and build conventions when they are sound.",
17
- "Build a focused, accessible 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.",
18
- "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.",
19
- "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.",
20
- "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.",
21
+ "Use the user's brief. Infer optional design choices from the content and workspace.",
22
+ "Ask a question only when a missing required value blocks safe work.",
23
+ "Inspect the workspace. Reuse its framework, package manager, components, assets, and build commands when suitable.",
24
+ "Build an accessible site with real content, responsive layouts, clear hierarchy, and useful interaction states.",
25
+ "Run the real build. Check mobile and desktop layouts, links, assets, keyboard use, contrast, and layout stability.",
26
+ "Review the final diff. Remove secrets and local authentication data from the artifact.",
27
+ "Call `publish` once with the built output. Return useful access, live, and version URLs from the receipt. If the publish is anonymous, point the user to the claim action in the publish card and state its expiry.",
28
+ ...PUBLISH_CONTINUATION_INSTRUCTIONS,
21
29
  ],
22
30
  verification: [
23
- "Call `status` after publishing and confirm the intended version is live; use `diagnose` if serving is stalled or failed.",
24
- "Open the live URL and verify the primary page, navigation, assets, responsive layout, and main call to action before claiming success.",
31
+ "Call `show_space_deployments` with `space: publish.result.receipt.space.id`. Confirm that the intended version is ready and current.",
32
+ "If the deployment failed or stalled, report its stable error code and actionable diagnostics.",
33
+ "Open the live URL. Verify the main page, navigation, assets, responsive layout, and primary call to action.",
25
34
  ],
26
35
  runtimeNotes: {
27
36
  local: "On-Device can work directly inside the configured local workspace root and publish a local build path.",
@@ -41,16 +50,19 @@ export const SPACEFAST_SKILLS = [
41
50
  whenToUse: "Use when the artifact already exists and the user wants it published or updated.",
42
51
  keywords: ["publish", "deploy", "live", "verify", "version", "claim"],
43
52
  runtimes: BOTH_RUNTIMES,
44
- tools: ["publish", "status", "diagnose"],
53
+ tools: ["publish", "operation_status", "show_space_deployments"],
45
54
  docs: ["publishing", "workflow/publish-receipt", "workflow/secret-handling"],
46
55
  instructions: [
47
- "Identify the actual publish root or build output. Run the real build first when the source tree is not itself the artifact to publish.",
48
- "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.",
49
- "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.",
56
+ "Identify the actual publish root or build output. Run the real build first when the source tree is not the artifact.",
57
+ "Call `publish` once. Keep anonymous claim credentials in local custody.",
58
+ ...PUBLISH_CONTINUATION_INSTRUCTIONS,
59
+ "Return the live, access, and version URLs that are present. For an anonymous publish, state the claim expiry and point the user to the claim action in the publish card.",
60
+ "Never expose a raw claim credential. Never ask the user to paste one.",
50
61
  ],
51
62
  verification: [
52
- "Call `status` and confirm the intended version is live. Use `diagnose` for a failed or stalled publish.",
53
- "Open the live URL and verify representative content and assets rather than treating a successful upload or health check as serving proof.",
63
+ "Call `show_space_deployments` with `space: publish.result.receipt.space.id`. Confirm that the intended version is ready and current.",
64
+ "Report the stable error code and actionable diagnostics when the deployment failed or stalled.",
65
+ "Open the live URL. Verify representative content and assets before reporting success.",
54
66
  ],
55
67
  runtimeNotes: {
56
68
  local: "Publish a bounded local path; locally custodied claim credentials are reused automatically.",
@@ -60,7 +72,7 @@ export const SPACEFAST_SKILLS = [
60
72
  recipe: {
61
73
  slug: "recipes/agent-publish",
62
74
  tier: "full",
63
- url: `${DOCS_BASE_URL}/publishing/anonymous`,
75
+ url: `${DOCS_BASE_URL}/publish/anonymous`,
64
76
  },
65
77
  },
66
78
  {
@@ -70,13 +82,19 @@ export const SPACEFAST_SKILLS = [
70
82
  whenToUse: "Use when pushes or manual workflow runs should publish automatically from GitHub.",
71
83
  keywords: ["github", "actions", "ci", "push", "automatic", "workflow"],
72
84
  runtimes: BOTH_RUNTIMES,
73
- tools: ["execute"],
85
+ tools: [],
74
86
  docs: ["builds", "publishing", "workflow/secret-handling"],
75
87
  instructions: [
76
- "Inspect the repository's package manager, lockfile, build command, runtime version, output directory, and existing workflows before writing YAML.",
77
- "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`.",
78
- "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.",
79
- "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.",
88
+ "Inspect the package manager, lockfile, build command, runtime version, output directory, and existing workflows.",
89
+ "Create one least-privilege workflow for the intended branch and `workflow_dispatch`.",
90
+ "Check out the repository.",
91
+ "Install dependencies with the locked command.",
92
+ "Run the real build.",
93
+ "Run `npx -y spacefast@<pinned-version> publish <output> --json` with the actual output directory.",
94
+ "Store the credential as a masked `SPACEFAST_TOKEN` repository or environment secret.",
95
+ "Never echo credentials. Never upload authentication files or credentials as artifacts.",
96
+ "Use the repository's real package manager and output directory.",
97
+ "Do not replace custom build steps with a generic npm/dist example.",
80
98
  ],
81
99
  verification: [
82
100
  "Validate the workflow syntax and run it on an explicit test branch or manual dispatch.",
@@ -86,7 +104,7 @@ export const SPACEFAST_SKILLS = [
86
104
  recipe: {
87
105
  slug: "recipes/github-deploys",
88
106
  tier: "full",
89
- url: `${DOCS_BASE_URL}/publishing/git`,
107
+ url: `${DOCS_BASE_URL}/publish/git`,
90
108
  },
91
109
  },
92
110
  {
@@ -96,40 +114,50 @@ export const SPACEFAST_SKILLS = [
96
114
  whenToUse: "Use when reviewers need a realistic preview before a change goes live.",
97
115
  keywords: ["preview", "channel", "branch", "pull request", "review", "private"],
98
116
  runtimes: BOTH_RUNTIMES,
99
- tools: ["publish", "status", "execute"],
117
+ tools: ["publish", "operation_status", "show_space_deployments", "execute", "resume_execution"],
100
118
  docs: ["builds", "access-control"],
101
119
  instructions: [
102
- "Publish the branch through a connected repository or to an explicit non-production channel so the live production channel is unchanged.",
103
- "Keep the preview private by default. Use an Open URL for the owner's browser or create the narrowest scoped Link needed for reviewers.",
104
- "Label the preview with the branch, change, or pull request it represents and report what is intentionally out of scope.",
120
+ "Call `publish` once for an explicit non-production space or channel. Do not change the production target.",
121
+ ...PUBLISH_CONTINUATION_INSTRUCTIONS,
122
+ "Keep the preview private unless the user requests sharing.",
123
+ "For reviewer access, use one bounded `execute` program. Read current access, create the narrowest Link, then read it again.",
124
+ "If `execute` pauses, follow its `resumePrompt`. Then call `resume_execution` with the returned `executionId`.",
125
+ "Do not start another `execute` program.",
126
+ "Label the preview with its branch, change, or pull request. Report what is out of scope.",
105
127
  ],
106
128
  verification: [
107
- "Confirm the preview serves the expected version and production still points at its previous version.",
108
- "Test the reviewer link in a signed-out context and revoke it when review is complete.",
129
+ "Call `show_space_deployments` for each affected Space. Confirm that the preview changed. Confirm that production did not change.",
130
+ "Test the reviewer Link in a signed-out context. Report its scope and expiry.",
109
131
  ],
110
132
  recipe: {
111
133
  slug: "recipes/preview-channels",
112
134
  tier: "full",
113
- url: `${DOCS_BASE_URL}/publishing/git`,
135
+ url: `${DOCS_BASE_URL}/publish/git`,
114
136
  },
115
137
  },
116
138
  {
117
139
  name: "claim-flow",
118
140
  title: "Claim an anonymous space",
119
- description: "Attach an anonymous space to an account or team before expiry while keeping every claim credential in server or local custody.",
120
- whenToUse: "Use after an anonymous publish returns a claim URL and expiry.",
141
+ description: "Attach an anonymous space to an account or team before expiry. Keep claim credentials in server or local custody.",
142
+ whenToUse: "Use after an anonymous publish returns a claim action and expiry.",
121
143
  keywords: ["claim", "anonymous", "ownership", "team", "continuation", "credential"],
122
144
  runtimes: BOTH_RUNTIMES,
123
- tools: ["execute", "publish"],
145
+ tools: ["publish", "operation_status", "execute", "resume_execution"],
124
146
  docs: ["anonymous-publish", "workflow/continue-after-claim", "workflow/secret-handling"],
125
147
  instructions: [
126
- "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.",
127
- "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.",
128
- "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.",
148
+ "Point the user to the claim action in the publish card and state its expiry. Never copy the claim credential into model text.",
149
+ "When account credentials are available, use one bounded `execute` program. Search and describe the claim operation before calling it.",
150
+ "Pass only the required team ID and expected space ID.",
151
+ "After the claim resumes, read the space in the same program. Return its owner and claim state.",
152
+ "If `execute` pauses, follow its `resumePrompt`. Then call `resume_execution` with the returned `executionId`.",
153
+ "Do not start another `execute` program.",
154
+ "Otherwise, ask the user to use the claim action in the publish card.",
155
+ "After a browser claim, call `publish` again from On-Device. It exchanges the locally held credential without exposing it.",
156
+ ...PUBLISH_CONTINUATION_INSTRUCTIONS,
129
157
  ],
130
158
  verification: [
131
- "Confirm the space no longer has a claim expiry and appears under the intended account or team.",
132
- "Publish again from the same local root or inspect the space through `execute` to verify durable access works without asking for a raw token.",
159
+ "Confirm that the space has no claim expiry. Confirm that it belongs to the intended account or team.",
160
+ "Confirm that the republish uses durable access without a raw credential.",
133
161
  ],
134
162
  prompt: true,
135
163
  },
@@ -140,16 +168,18 @@ export const SPACEFAST_SKILLS = [
140
168
  whenToUse: "Use when the current live version is broken and a prior healthy version is known or discoverable.",
141
169
  keywords: ["rollback", "revert", "version", "incident", "restore"],
142
170
  runtimes: BOTH_RUNTIMES,
143
- tools: ["status", "rollback", "execute", "diagnose"],
171
+ tools: ["show_space_deployments", "execute", "resume_execution"],
144
172
  docs: ["versions-and-rollback"],
145
173
  instructions: [
146
- "Inspect recent immutable versions and current status. Compare the current live version with the candidate using the catalog `versions` and `diff` operations.",
147
- "Call `rollback` with the selected `versionId`. Rollback is additive and keeps later immutable versions available.",
148
- "If promotion returns an operation that is still settling, poll the catalog `operation_status` operation until it is done instead of assuming success.",
174
+ "Call `show_space_deployments`. Select a known-good ready version that is older than the current version.",
175
+ "Use one bounded `execute` program. Search and describe the version promotion operation before calling it.",
176
+ "Read the live pointer, promote the selected version, then read the pointer again in the same program.",
177
+ "If `execute` pauses, follow its `resumePrompt`. Then call `resume_execution` with the returned `executionId`.",
178
+ "Do not start another `execute` program.",
149
179
  ],
150
180
  verification: [
151
- "Call `status` and confirm the live pointer references the selected version.",
152
- "Open the live URL and verify the failing path or behavior is restored; use `diagnose` if it is not.",
181
+ "Call `show_space_deployments`. Confirm that the selected version is current and ready.",
182
+ "Open the live URL. Verify that the failing path or behavior works again.",
153
183
  ],
154
184
  prompt: true,
155
185
  },
@@ -160,16 +190,20 @@ export const SPACEFAST_SKILLS = [
160
190
  whenToUse: "Use when the user owns a domain they want a Spacefast space to serve.",
161
191
  keywords: ["domain", "dns", "tls", "https", "cname", "custom"],
162
192
  runtimes: BOTH_RUNTIMES,
163
- tools: ["execute"],
193
+ tools: ["show_space_domains", "execute", "resume_execution"],
164
194
  docs: ["custom-domains", "recipes/migrate-dns"],
165
195
  instructions: [
166
- "Add the domain with `sf domains add <domain>` or catalog operation `domains_add`; preserve the exact record values Spacefast returns.",
167
- "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.",
168
- "Keep the existing production hostname available during the cutover and avoid deleting old records until the new path is proven.",
196
+ "Call `show_space_domains`. Read the current domain, DNS, and certificate state.",
197
+ "If setup is required, use one bounded `execute` program. Search and describe the add or assign operation before calling it.",
198
+ "Read the domain again in the same program after the mutation resumes.",
199
+ "If `execute` pauses, follow its `resumePrompt`. Then call `resume_execution` with the returned `executionId`.",
200
+ "Do not start another `execute` program.",
201
+ "Return the exact DNS records from Spacefast. Do not claim that Spacefast changed third-party DNS.",
202
+ "Keep the existing production hostname until the custom domain is ready.",
169
203
  ],
170
204
  verification: [
171
- "Run `sf domains check` or catalog operation `domains_check` until DNS and certificate state are ready.",
172
- "Open the final custom-domain HTTPS URL and verify representative content before reporting it live.",
205
+ "After the external DNS change, call `show_space_domains`. Report the current verification state.",
206
+ "Open the HTTPS URL only after DNS and certificate states are ready. Verify representative content.",
173
207
  ],
174
208
  prompt: true,
175
209
  recipe: {
@@ -185,14 +219,17 @@ export const SPACEFAST_SKILLS = [
185
219
  whenToUse: "Use for moved pages, canonical host paths, and intentional permanent or temporary redirects.",
186
220
  keywords: ["redirect", "rewrite", "routing", "301", "302", "path"],
187
221
  runtimes: BOTH_RUNTIMES,
188
- tools: ["publish", "execute"],
222
+ tools: ["publish", "operation_status", "show_space_deployments"],
189
223
  docs: ["redirects"],
190
224
  instructions: [
191
225
  "Inspect existing routing rules, then add the smallest non-conflicting rules to `_redirects` at the publish root.",
192
- "Choose temporary or permanent status deliberately, preserve path/query semantics where required, and avoid redirect loops or rules that shadow real assets.",
193
- "Publish the redirect file as part of the same immutable version as the related content change.",
226
+ "Choose a temporary or permanent status deliberately. Preserve required path and query behavior.",
227
+ "Avoid redirect loops and rules that hide real assets.",
228
+ "Call `publish` once. Include the redirect file and related content in the same immutable version.",
229
+ ...PUBLISH_CONTINUATION_INSTRUCTIONS,
194
230
  ],
195
231
  verification: [
232
+ "Call `show_space_deployments` with `space: publish.result.receipt.space.id`. Confirm that the new version is current and ready.",
196
233
  "Request representative old and new paths and confirm the exact status and Location header.",
197
234
  "Verify the final target serves successfully and unrelated assets are not redirected.",
198
235
  ],
@@ -209,16 +246,22 @@ export const SPACEFAST_SKILLS = [
209
246
  whenToUse: "Use when an existing production domain must move to Spacefast.",
210
247
  keywords: ["dns", "migrate", "cutover", "domain", "downtime", "certificate"],
211
248
  runtimes: BOTH_RUNTIMES,
212
- tools: ["execute"],
249
+ tools: ["show_space_domains", "execute", "resume_execution"],
213
250
  docs: ["custom-domains"],
214
251
  instructions: [
215
- "Inventory the current authoritative DNS records and lower TTL ahead of the cutover when the provider and timing allow it.",
216
- "Add the domain to Spacefast and pre-stage every record it returns while preserving a working rollback path.",
217
- "Cut over only after the Spacefast endpoint, expected content, and TLS readiness can be validated. Keep the previous origin available until propagation is complete.",
252
+ "Inventory the current authoritative DNS records. Lower the TTL before cutover when the provider and timing permit it.",
253
+ "Call `show_space_domains`. Read the current DNS and certificate state.",
254
+ "If setup is required, use one bounded `execute` program. Search and describe the add or assign operation before calling it.",
255
+ "Read the domain again in the same program after the mutation resumes.",
256
+ "If `execute` pauses, follow its `resumePrompt`. Then call `resume_execution` with the returned `executionId`.",
257
+ "Do not start another `execute` program.",
258
+ "Create the returned DNS records at the provider. Keep the previous origin available during propagation.",
259
+ "Cut over only after the expected content and TLS state are ready.",
218
260
  ],
219
261
  verification: [
220
- "Check resolution from more than one resolver and confirm the certificate matches the final hostname.",
221
- "Open the public HTTPS URL, verify representative content, and monitor for old-origin traffic before removing rollback records.",
262
+ "Call `show_space_domains`. Confirm that DNS and certificate states are ready.",
263
+ "Check more than one resolver. Confirm that the certificate matches the final hostname.",
264
+ "Open the public HTTPS URL. Verify representative content before removing rollback records.",
222
265
  ],
223
266
  recipe: {
224
267
  slug: "recipes/migrate-dns",
@@ -233,16 +276,18 @@ export const SPACEFAST_SKILLS = [
233
276
  whenToUse: "Use when a build, finalize, activation, or live serving step fails or stalls.",
234
277
  keywords: ["debug", "failed", "build", "logs", "diagnose", "stalled"],
235
278
  runtimes: BOTH_RUNTIMES,
236
- tools: ["execute"],
279
+ tools: ["show_space_deployments", "execute", "publish", "operation_status"],
237
280
  docs: ["troubleshooting"],
238
281
  instructions: [
239
- "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.",
240
- "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.",
241
- "Apply the smallest fix tied to the evidence, rebuild, and publish again. Follow the problem document's `type` URL for any referenced error code.",
282
+ "Call `show_space_deployments`. Read the failed version, build state, stable error code, and diagnostics.",
283
+ "If more detail is required, use one bounded `execute` program. Read only the required build logs or version data.",
284
+ "Apply the smallest fix supported by the evidence. Run the real build.",
285
+ "Call `publish` once with the fixed output.",
286
+ ...PUBLISH_CONTINUATION_INSTRUCTIONS,
242
287
  ],
243
288
  verification: [
244
- "Re-run the relevant diagnostics or status operation through `execute` and confirm the new version reaches the intended live state.",
245
- "Open the affected live path and verify the concrete failure no longer reproduces.",
289
+ "Call `show_space_deployments` with `space: publish.result.receipt.space.id`. Confirm that the new version is current and ready.",
290
+ "Open the affected live path. Verify that the concrete failure does not occur.",
246
291
  ],
247
292
  prompt: true,
248
293
  },
@@ -253,16 +298,19 @@ export const SPACEFAST_SKILLS = [
253
298
  whenToUse: "Use when a space or path must be made public, team-only, or shared with specific people or machines.",
254
299
  keywords: ["access", "private", "public", "people", "links", "grant", "share"],
255
300
  runtimes: BOTH_RUNTIMES,
256
- tools: ["execute", "whoami"],
301
+ tools: ["execute", "resume_execution"],
257
302
  docs: ["access-control"],
258
303
  instructions: [
259
- "Inspect current Grants with `sf share` or the catalog `grants_list` operation and identify one explicit access intent. Anonymous spaces start Private.",
260
- "Apply the narrowest suitable Public or Team Grant, People invitation, scoped Link/password, or machine/external-identity Grant. Keep resource scopes explicit.",
261
- "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.",
304
+ "Use one bounded `execute` program. Search and describe the access operations before calling them.",
305
+ "Read current access. Apply the narrowest change for one explicit access intent. Read the resulting access state.",
306
+ "Run the matching access check in the same program after the mutation resumes.",
307
+ "If `execute` pauses, follow its `resumePrompt`. Then call `resume_execution` with the returned `executionId`.",
308
+ "Do not start another `execute` program.",
309
+ "Show new Link or machine secrets only to the requesting user. Never store them in logs or committed files.",
262
310
  ],
263
311
  verification: [
264
- "Use `sf share check --as public --path /docs` or the catalog `grants_check` operation for a representative request.",
265
- "Test a new Link in the intended signed-out or recipient context and confirm unrelated resources remain inaccessible.",
312
+ "Confirm that the access check permits the intended actor and path.",
313
+ "Test a new Link in the intended signed-out context. Confirm that unrelated resources stay inaccessible.",
266
314
  ],
267
315
  prompt: true,
268
316
  },
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Recipe hrefs come from the shared skill registry so a prompt can never
3
+ * invent a docs URL. `publish-and-verify` still points at a page that is not
4
+ * live yet, so the build-first guidance links the quickstart until that
5
+ * recipe ships.
6
+ */
7
+ export declare const CREATE_AND_PUBLISH_RECIPE: string;
8
+ export declare const PUBLISH_EXISTING_RECIPE: string;
9
+ /**
10
+ * The shipping intent a copied prompt carries beyond setup: what the user said
11
+ * they want shipped, with the recipe that ships it.
12
+ */
13
+ export declare const START_SHIPPING_INTENTS: {
14
+ readonly "create-and-publish": `Create a space and publish to it with the workflow at ${string}. Follow the receipt's access instructions to open the published page and check it works before reporting done.`;
15
+ readonly "build-website": `Build a polished website and publish it with the workflow at ${string}. Follow the receipt's access instructions to open the published page and check it works before reporting done.`;
16
+ readonly "publish-existing": `Publish this project's existing build with the workflow at ${string}. Follow the receipt's access instructions to open the published page and check the new Version works. Then return the Live URL and the immutable Version URL.`;
17
+ };
18
+ export type StartShippingIntent = keyof typeof START_SHIPPING_INTENTS;
19
+ /**
20
+ * The team a copied prompt binds the session to. Present in every copy that
21
+ * knows the team, whether the setup pointer is the public document or a
22
+ * private handoff link.
23
+ */
24
+ export declare function teamContextLine(teamName: string): string;
25
+ /**
26
+ * How a /start handoff prompt ends. The private-prompt builder's default
27
+ * closing points back at "the page task" and "the references above", which is
28
+ * right for a dashboard page brief and a dangling pointer on /start —
29
+ * fresh-agent evals read the dangling version as evidence of a phishing
30
+ * template. /start closes by handing the conversation back to the user.
31
+ */
32
+ export declare const START_HANDOFF_CLOSING = "Then ask me what to publish, and wait for my go.";
33
+ /**
34
+ * The paste-to-login command /start's terminal row puts on the clipboard: the
35
+ * one-use link goes to `sf login --handoff` over stdin. The display constant
36
+ * is what the row RENDERS — the real link only ever reaches the clipboard.
37
+ */
38
+ export declare function terminalLoginCommand(handoffUrl: string): string;
39
+ export declare const TERMINAL_LOGIN_COMMAND_DISPLAY: string;
40
+ /**
41
+ * Joins a base prompt with a shipping intent. An empty base means the copy
42
+ * carries a handoff link that serves the setup itself, so the intent stands
43
+ * alone instead of trailing blank lines.
44
+ */
45
+ export declare function composeStartPrompt(basePrompt: string, intent: StartShippingIntent | null): string;
@@ -0,0 +1,62 @@
1
+ /*
2
+ * The /start prompt vocabulary: every sentence a copied agent prompt is
3
+ * composed from. One module, importable by the dashboard AND the control
4
+ * plane, so any surface that mints a handoff can compose the identical prompt.
5
+ * The dashboard's wizard maps its steps and modes onto these intents; this
6
+ * module owns the words.
7
+ */
8
+ import { DOCS_BASE_URL } from "../config/domains.js";
9
+ import { findSpacefastSkill } from "./skills.js";
10
+ /**
11
+ * Recipe hrefs come from the shared skill registry so a prompt can never
12
+ * invent a docs URL. `publish-and-verify` still points at a page that is not
13
+ * live yet, so the build-first guidance links the quickstart until that
14
+ * recipe ships.
15
+ */
16
+ export const CREATE_AND_PUBLISH_RECIPE = findSpacefastSkill("create-and-publish-site")?.recipe?.url ?? `${DOCS_BASE_URL}/agents`;
17
+ export const PUBLISH_EXISTING_RECIPE = `${DOCS_BASE_URL}/quickstart`;
18
+ /**
19
+ * The shipping intent a copied prompt carries beyond setup: what the user said
20
+ * they want shipped, with the recipe that ships it.
21
+ */
22
+ export const START_SHIPPING_INTENTS = {
23
+ "create-and-publish": `Create a space and publish to it with the workflow at ${CREATE_AND_PUBLISH_RECIPE}. Follow the receipt's access instructions to open the published page and check it works before reporting done.`,
24
+ "build-website": `Build a polished website and publish it with the workflow at ${CREATE_AND_PUBLISH_RECIPE}. Follow the receipt's access instructions to open the published page and check it works before reporting done.`,
25
+ "publish-existing": `Publish this project's existing build with the workflow at ${PUBLISH_EXISTING_RECIPE}. Follow the receipt's access instructions to open the published page and check the new Version works. Then return the Live URL and the immutable Version URL.`,
26
+ };
27
+ /**
28
+ * The team a copied prompt binds the session to. Present in every copy that
29
+ * knows the team, whether the setup pointer is the public document or a
30
+ * private handoff link.
31
+ */
32
+ export function teamContextLine(teamName) {
33
+ return `Use my Spacefast team: ${teamName}.`;
34
+ }
35
+ /**
36
+ * How a /start handoff prompt ends. The private-prompt builder's default
37
+ * closing points back at "the page task" and "the references above", which is
38
+ * right for a dashboard page brief and a dangling pointer on /start —
39
+ * fresh-agent evals read the dangling version as evidence of a phishing
40
+ * template. /start closes by handing the conversation back to the user.
41
+ */
42
+ export const START_HANDOFF_CLOSING = "Then ask me what to publish, and wait for my go.";
43
+ /**
44
+ * The paste-to-login command /start's terminal row puts on the clipboard: the
45
+ * one-use link goes to `sf login --handoff` over stdin. The display constant
46
+ * is what the row RENDERS — the real link only ever reaches the clipboard.
47
+ */
48
+ export function terminalLoginCommand(handoffUrl) {
49
+ return `printf '%s\\n' '${handoffUrl}' | sf login --handoff`;
50
+ }
51
+ export const TERMINAL_LOGIN_COMMAND_DISPLAY = terminalLoginCommand("<one-use link>");
52
+ /**
53
+ * Joins a base prompt with a shipping intent. An empty base means the copy
54
+ * carries a handoff link that serves the setup itself, so the intent stands
55
+ * alone instead of trailing blank lines.
56
+ */
57
+ export function composeStartPrompt(basePrompt, intent) {
58
+ if (intent === null)
59
+ return basePrompt;
60
+ const text = START_SHIPPING_INTENTS[intent];
61
+ return basePrompt === "" ? text : `${basePrompt}\n\n${text}`;
62
+ }
@@ -90,9 +90,9 @@ function zonePriority(zone) {
90
90
  }
91
91
  return 1_000;
92
92
  }
93
- // The raw zone list contains reverse-DNS (`*.in-addr.arpa`), numeric, and
94
- // punycode-less IDN entries (`001.рус`) that are never something a person
95
- // registers. Keep only ASCII zones of one or two letter-initial labels.
93
+ // The raw zone list carries reverse-DNS (`*.in-addr.arpa`), numeric, and
94
+ // punycode-less IDN entries (`001.рус`) nobody registers. Keep only ASCII zones
95
+ // of one or two letter-initial labels.
96
96
  const REGISTRABLE_LABEL = /^[a-z][a-z0-9-]*$/;
97
97
  export function isRegistrableZone(zone) {
98
98
  if (zone.includes("arpa")) {
@@ -268,8 +268,7 @@ export function isShortDomainSuggestion(item) {
268
268
  }
269
269
  export function domainSuggestionMatchesMode(item, mode) {
270
270
  if (mode === "short") {
271
- // Hacks and compact names regardless of where they came from — AI ideas
272
- // that happen to be short belong here too.
271
+ // Hacks and compact names from any source, AI ideas included.
273
272
  return isShortDomainSuggestion(item);
274
273
  }
275
274
  return true;
@@ -452,11 +451,9 @@ export function buildAiStyleDomainSuggestions(query, limit = 24) {
452
451
  ];
453
452
  const tlds = ["com", "ai", "app", "dev", "io", "co", "studio", "world", "tools", "systems"];
454
453
  const items = [];
455
- // Score with the same components as buildDomainSuggestions so ideas
456
- // interleave by merit in the merged "suggestions" view: base 96 puts the
457
- // best idea (96 + 18 + 16 = 130) just under the direct .com match (134) and
458
- // well under the exact query (180), while per-stem/per-tld decay spreads
459
- // the tail through the TLD sweep instead of forming a separate block.
454
+ // Same score components as buildDomainSuggestions so ideas interleave by
455
+ // merit: base 96 puts the best idea (96 + 18 + 16 = 130) just under the direct
456
+ // .com match (134) and well under the exact query (180).
460
457
  stems.forEach((stem, stemIndex) => {
461
458
  tlds.forEach((tld, tldIndex) => {
462
459
  const domain = `${stem}.${tld}`;
@@ -479,9 +476,8 @@ export function buildAiStyleDomainSuggestions(query, limit = 24) {
479
476
  });
480
477
  });
481
478
  });
482
- // Scores are not monotonic with generation order (a later stem's .com beats
483
- // an earlier stem's long-tail TLD), so build every stem × tld combination
484
- // and cut by score — never by generation order — when applying the limit.
479
+ // Scores are not monotonic with generation order (a later stem's .com beats an
480
+ // earlier stem's long-tail TLD), so build every combination and cut by score.
485
481
  return items
486
482
  .toSorted((left, right) => right.score - left.score || left.domain.localeCompare(right.domain))
487
483
  .slice(0, limit);
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Canonical geometry for the Spacefast Open Graph image exported from Figma.
3
+ *
4
+ * Renderers may use different engines, but they must consume these dimensions
5
+ * and positions so every first-party surface produces the same template.
6
+ */
7
+ export declare const SPACEFAST_OG_TEMPLATE: {
8
+ readonly width: 2400;
9
+ readonly height: 800;
10
+ readonly background: "#fcfcfa";
11
+ readonly grid: {
12
+ readonly size: 80;
13
+ readonly stroke: "#e8e8e5";
14
+ readonly strokeWidth: 2;
15
+ };
16
+ readonly title: {
17
+ readonly left: 120;
18
+ readonly top: 96;
19
+ readonly width: 820;
20
+ readonly fontFamily: "Recoleta";
21
+ readonly fontWeight: 400;
22
+ readonly fontSize: 112;
23
+ readonly lineHeight: 0.9;
24
+ readonly letterSpacing: -4;
25
+ };
26
+ readonly wordmark: {
27
+ readonly left: 136;
28
+ readonly bottom: 96;
29
+ readonly width: 360;
30
+ readonly height: 68;
31
+ };
32
+ readonly globe: {
33
+ readonly left: 1178;
34
+ readonly top: 96;
35
+ readonly width: 160;
36
+ readonly height: 160;
37
+ };
38
+ readonly pin: {
39
+ readonly left: 1602;
40
+ readonly top: -82;
41
+ readonly width: 426;
42
+ readonly height: 402;
43
+ };
44
+ readonly people: {
45
+ readonly left: 1290;
46
+ readonly top: 386;
47
+ readonly width: 490;
48
+ readonly height: 421;
49
+ };
50
+ readonly branch: {
51
+ readonly left: 2036;
52
+ readonly top: 336;
53
+ readonly width: 256;
54
+ readonly height: 264;
55
+ };
56
+ };