@spacefast/common 0.0.26 → 0.2.1

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 +186 -7
  38. package/dist/contracts/builds.js +75 -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 +269 -7
  79. package/dist/contracts/error-code-meta.js +80 -5
  80. package/dist/contracts/error-codes.d.ts +5 -5
  81. package/dist/contracts/error-codes.js +78 -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 +112 -10
  110. package/dist/contracts/oauth-resources.js +116 -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 +2098 -1
  210. package/dist/docs/error-docs.js +281 -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
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Deeplink probe results, keyed `<agentId>:<methodId>`.
3
+ *
4
+ * Deeplinks are volatile vendor behavior, so the registry never asserts they
5
+ * work — it records what a probe last observed. This module is the ONLY place a
6
+ * status stronger than `declared` may come from, and it is written by
7
+ * `scripts/marketplaces/probe-deeplinks.mjs` (scheduled weekly by
8
+ * `.github/workflows/deeplink-probe.yml`). A `failed` entry demotes its deeplink
9
+ * out of `interactive-primary` automatically, so the page falls through to the
10
+ * method's declared fallback.
11
+ *
12
+ * Browser-safe by construction: plain data, no filesystem, no network.
13
+ *
14
+ * TODO(deeplink-probe): the probe currently only writes this file by hand-run.
15
+ * Wire the scheduled workflow to open a PR with the regenerated map so a broken
16
+ * vendor deeplink demotes itself without a human in the loop.
17
+ */
18
+ export type DeeplinkProbeResult = Readonly<{
19
+ checkedAt: string;
20
+ evidence?: string;
21
+ status: "probed" | "failed";
22
+ }>;
23
+ export declare const DEEPLINK_PROBE_RESULTS: Readonly<Record<string, DeeplinkProbeResult>>;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Deeplink probe results, keyed `<agentId>:<methodId>`.
3
+ *
4
+ * Deeplinks are volatile vendor behavior, so the registry never asserts they
5
+ * work — it records what a probe last observed. This module is the ONLY place a
6
+ * status stronger than `declared` may come from, and it is written by
7
+ * `scripts/marketplaces/probe-deeplinks.mjs` (scheduled weekly by
8
+ * `.github/workflows/deeplink-probe.yml`). A `failed` entry demotes its deeplink
9
+ * out of `interactive-primary` automatically, so the page falls through to the
10
+ * method's declared fallback.
11
+ *
12
+ * Browser-safe by construction: plain data, no filesystem, no network.
13
+ *
14
+ * TODO(deeplink-probe): the probe currently only writes this file by hand-run.
15
+ * Wire the scheduled workflow to open a PR with the regenerated map so a broken
16
+ * vendor deeplink demotes itself without a human in the loop.
17
+ */
18
+ export const DEEPLINK_PROBE_RESULTS = {};
@@ -0,0 +1,56 @@
1
+ import { type AgentCapability, type AgentId } from "./core.js";
2
+ export type AgentRegistryEnvironment = Readonly<Record<string, string | undefined>>;
3
+ export type AgentMcpFormat = "codex-toml" | "flat-json" | "mcp-json" | "opencode-json" | "vscode-json" | "zed-json";
4
+ export type AgentMcpMethod = "local" | "remote-proxy" | "remote-oauth";
5
+ export type AgentMcpValue = boolean | null | number | string | readonly AgentMcpValue[] | Readonly<{
6
+ [key: string]: AgentMcpValue;
7
+ }>;
8
+ export type AgentMcpServerConfig = Readonly<{
9
+ [key: string]: AgentMcpValue;
10
+ }>;
11
+ export type AgentMcpServerConfigEncoder = Readonly<{
12
+ format: AgentMcpFormat;
13
+ rootKey: "context_servers" | "mcp" | "mcpServers" | "servers" | null;
14
+ schemaUrl?: string;
15
+ build: (input: {
16
+ command: string;
17
+ endpoint: string;
18
+ method: AgentMcpMethod;
19
+ resource: string | null;
20
+ }) => AgentMcpServerConfig;
21
+ }>;
22
+ export type AgentNodeEntry = Readonly<{
23
+ capabilities: readonly AgentCapability[];
24
+ detectionPaths: (home: string, cwd: string, env: AgentRegistryEnvironment) => readonly string[];
25
+ id: AgentId;
26
+ mcp: Readonly<{
27
+ configPath: (home: string, cwd: string, env: AgentRegistryEnvironment) => string;
28
+ format: AgentMcpFormat;
29
+ serverConfigEncoder: AgentMcpServerConfigEncoder;
30
+ }> | null;
31
+ name: string;
32
+ skillDir: Readonly<{
33
+ alternativeGlobalPaths: (home: string, cwd: string, env: AgentRegistryEnvironment) => readonly string[];
34
+ global: (home: string, cwd: string, env: AgentRegistryEnvironment) => string;
35
+ project: (home: string, cwd: string, env: AgentRegistryEnvironment) => string;
36
+ }> | null;
37
+ }>;
38
+ export declare const MACHINE_AGENT_IDS: ("amp" | "hermes" | "claude-code" | "claude-app" | "claude-desktop" | "cursor" | "codex" | "chatgpt" | "vscode" | "github-copilot" | "devin-desktop" | "devin-cloud" | "zed" | "gemini-cli" | "opencode" | "warp" | "factory-droid" | "cline" | "continue" | "raycast" | "poke" | "pi" | "indent" | "openclaw")[];
39
+ export declare function agentNodeCatalog(input: {
40
+ cwd: string;
41
+ env?: AgentRegistryEnvironment;
42
+ home: string;
43
+ }): readonly AgentNodeEntry[];
44
+ export declare function getAgentNodeEntry(id: AgentId, input: {
45
+ cwd: string;
46
+ env?: AgentRegistryEnvironment;
47
+ home: string;
48
+ }): AgentNodeEntry | null;
49
+ export declare function buildAgentMcpServerConfig(input: {
50
+ agentId: AgentId;
51
+ command: string;
52
+ endpoint: string;
53
+ method: AgentMcpMethod;
54
+ resource: string | null;
55
+ }): AgentMcpServerConfig;
56
+ export declare function agentEnvironmentHint(env: AgentRegistryEnvironment): AgentId | null;
@@ -0,0 +1,339 @@
1
+ import path from "node:path";
2
+ import { AGENT_REGISTRY, getAgentEntry, } from "./core.js";
3
+ const commonEncoder = {
4
+ format: "mcp-json",
5
+ rootKey: "mcpServers",
6
+ build: ({ command, endpoint, method, resource }) => {
7
+ if (method !== "remote-oauth") {
8
+ return { command, args: method === "remote-proxy" ? ["mcp", "proxy"] : ["mcp"] };
9
+ }
10
+ return { type: "http", url: endpoint, oauth_resource: resource };
11
+ },
12
+ };
13
+ /**
14
+ * Cursor takes the same `type: "http"` remote entry every other `mcpServers`
15
+ * client does. The bare `{ url }` this used to write is the shape nobody ships:
16
+ * it disagreed with the registry's own Cursor config and with the comparable
17
+ * vendors, and several clients read a bare url as a stdio command.
18
+ */
19
+ const cursorEncoder = commonEncoder;
20
+ /**
21
+ * Gemini CLI's own dialect: `httpUrl` plus an explicit `oauth` block, not
22
+ * `type` + `url` (spec §5.13 dialect table).
23
+ */
24
+ const geminiEncoder = {
25
+ ...commonEncoder,
26
+ build: ({ command, endpoint, method }) => method === "remote-oauth"
27
+ ? { httpUrl: endpoint, oauth: { enabled: true } }
28
+ : { command, args: method === "remote-proxy" ? ["mcp", "proxy"] : ["mcp"] },
29
+ };
30
+ const vscodeEncoder = {
31
+ format: "vscode-json",
32
+ rootKey: "servers",
33
+ build: ({ command, endpoint, method }) => method === "remote-oauth"
34
+ ? { type: "http", url: endpoint }
35
+ : {
36
+ type: "stdio",
37
+ command,
38
+ args: method === "remote-proxy" ? ["mcp", "proxy"] : ["mcp"],
39
+ },
40
+ };
41
+ const codexEncoder = {
42
+ format: "codex-toml",
43
+ rootKey: null,
44
+ build: ({ command, endpoint, method, resource }) => method === "remote-oauth"
45
+ ? { url: endpoint, oauth_resource: resource }
46
+ : { command, args: method === "remote-proxy" ? ["mcp", "proxy"] : ["mcp"] },
47
+ };
48
+ const opencodeEncoder = {
49
+ format: "opencode-json",
50
+ rootKey: "mcp",
51
+ schemaUrl: "https://opencode.ai/config.json",
52
+ build: ({ command, endpoint, method }) => method === "remote-oauth"
53
+ ? { type: "remote", url: endpoint, enabled: true }
54
+ : {
55
+ type: "local",
56
+ command: [command, ...(method === "remote-proxy" ? ["mcp", "proxy"] : ["mcp"])],
57
+ enabled: true,
58
+ },
59
+ };
60
+ const copilotEncoder = {
61
+ ...commonEncoder,
62
+ build: (input) => ({ ...commonEncoder.build(input), tools: ["*"] }),
63
+ };
64
+ const droidEncoder = {
65
+ ...commonEncoder,
66
+ build: (input) => ({
67
+ ...commonEncoder.build(input),
68
+ type: input.method === "remote-oauth" ? "http" : "stdio",
69
+ disabled: false,
70
+ }),
71
+ };
72
+ const zedEncoder = {
73
+ format: "zed-json",
74
+ rootKey: "context_servers",
75
+ build: ({ command, endpoint, method }) => method === "remote-oauth"
76
+ ? { source: "custom", url: endpoint, settings: {} }
77
+ : {
78
+ source: "custom",
79
+ command: {
80
+ path: command,
81
+ args: method === "remote-proxy" ? ["mcp", "proxy"] : ["mcp"],
82
+ },
83
+ },
84
+ };
85
+ const ampEncoder = {
86
+ format: "flat-json",
87
+ rootKey: null,
88
+ build: ({ command, endpoint, method }) => method === "remote-oauth"
89
+ ? { url: endpoint }
90
+ : { command, args: method === "remote-proxy" ? ["mcp", "proxy"] : ["mcp"] },
91
+ };
92
+ const clineEncoder = {
93
+ ...commonEncoder,
94
+ build: ({ command, endpoint, method }) => method === "remote-oauth"
95
+ ? { type: "streamableHttp", url: endpoint, disabled: false }
96
+ : {
97
+ type: "stdio",
98
+ command,
99
+ args: method === "remote-proxy" ? ["mcp", "proxy"] : ["mcp"],
100
+ disabled: false,
101
+ },
102
+ };
103
+ const universalSkill = {
104
+ global: ({ home }) => path.join(home, ".agents", "skills"),
105
+ project: ({ cwd }) => path.join(cwd, ".agents", "skills"),
106
+ };
107
+ const definitions = [
108
+ {
109
+ id: "claude-code",
110
+ detection: ({ home }) => [path.join(home, ".claude")],
111
+ skill: {
112
+ global: ({ home }) => path.join(home, ".claude", "skills"),
113
+ project: ({ cwd }) => path.join(cwd, ".claude", "skills"),
114
+ alternatives: ({ home }) => [path.join(home, ".agents", "skills")],
115
+ },
116
+ mcp: { config: ({ home }) => path.join(home, ".claude.json"), encoder: commonEncoder },
117
+ },
118
+ {
119
+ id: "cursor",
120
+ detection: ({ home }) => [path.join(home, ".cursor")],
121
+ skill: {
122
+ global: ({ home }) => path.join(home, ".cursor", "skills"),
123
+ project: universalSkill.project,
124
+ alternatives: ({ home }) => [
125
+ path.join(home, ".agents", "skills"),
126
+ path.join(home, ".claude", "skills"),
127
+ ],
128
+ },
129
+ mcp: { config: ({ home }) => path.join(home, ".cursor", "mcp.json"), encoder: cursorEncoder },
130
+ },
131
+ {
132
+ id: "codex",
133
+ detection: ({ env, home }) => [codexHome(home, env)],
134
+ skill: {
135
+ global: ({ env, home }) => path.join(codexHome(home, env), "skills"),
136
+ project: universalSkill.project,
137
+ alternatives: ({ home }) => [path.join(home, ".agents", "skills")],
138
+ },
139
+ mcp: {
140
+ config: ({ env, home }) => path.join(codexHome(home, env), "config.toml"),
141
+ encoder: codexEncoder,
142
+ },
143
+ },
144
+ {
145
+ id: "vscode",
146
+ detection: ({ home }) => [
147
+ path.join(home, ".vscode"),
148
+ path.join(home, "Library", "Application Support", "Code"),
149
+ path.join(home, ".config", "Code"),
150
+ ],
151
+ skill: universalSkill,
152
+ mcp: { config: ({ cwd }) => path.join(cwd, ".vscode", "mcp.json"), encoder: vscodeEncoder },
153
+ },
154
+ {
155
+ id: "github-copilot",
156
+ detection: ({ home }) => [path.join(home, ".copilot")],
157
+ skill: {
158
+ global: ({ home }) => path.join(home, ".copilot", "skills"),
159
+ project: universalSkill.project,
160
+ alternatives: ({ home }) => [path.join(home, ".agents", "skills")],
161
+ },
162
+ mcp: {
163
+ config: ({ home }) => path.join(home, ".copilot", "mcp-config.json"),
164
+ encoder: copilotEncoder,
165
+ },
166
+ },
167
+ {
168
+ id: "devin-desktop",
169
+ detection: ({ home }) => [path.join(home, ".devin")],
170
+ skill: universalSkill,
171
+ mcp: {
172
+ config: ({ home }) => path.join(home, ".devin", "mcp_config.json"),
173
+ encoder: commonEncoder,
174
+ },
175
+ },
176
+ {
177
+ id: "zed",
178
+ detection: ({ home }) => [path.join(home, ".config", "zed")],
179
+ skill: universalSkill,
180
+ mcp: {
181
+ config: ({ home }) => path.join(home, ".config", "zed", "settings.json"),
182
+ encoder: zedEncoder,
183
+ },
184
+ },
185
+ {
186
+ id: "gemini-cli",
187
+ detection: ({ home }) => [path.join(home, ".gemini")],
188
+ skill: {
189
+ ...universalSkill,
190
+ alternatives: ({ home }) => [path.join(home, ".gemini", "skills")],
191
+ },
192
+ mcp: {
193
+ config: ({ home }) => path.join(home, ".gemini", "settings.json"),
194
+ encoder: geminiEncoder,
195
+ },
196
+ },
197
+ {
198
+ id: "opencode",
199
+ detection: ({ home }) => [path.join(home, ".config", "opencode")],
200
+ skill: {
201
+ global: ({ home }) => path.join(home, ".config", "opencode", "skills"),
202
+ project: universalSkill.project,
203
+ alternatives: ({ home }) => [
204
+ path.join(home, ".agents", "skills"),
205
+ path.join(home, ".claude", "skills"),
206
+ ],
207
+ },
208
+ mcp: {
209
+ config: ({ home }) => path.join(home, ".config", "opencode", "opencode.json"),
210
+ encoder: opencodeEncoder,
211
+ },
212
+ },
213
+ {
214
+ id: "amp",
215
+ detection: ({ home }) => [path.join(home, ".config", "amp")],
216
+ skill: universalSkill,
217
+ mcp: {
218
+ config: ({ home }) => path.join(home, ".config", "amp", "mcp.json"),
219
+ encoder: ampEncoder,
220
+ },
221
+ },
222
+ {
223
+ id: "warp",
224
+ detection: ({ home }) => [path.join(home, ".warp")],
225
+ skill: universalSkill,
226
+ mcp: { config: ({ home }) => path.join(home, ".warp", "mcp.json"), encoder: commonEncoder },
227
+ },
228
+ {
229
+ id: "factory-droid",
230
+ detection: ({ home }) => [path.join(home, ".factory")],
231
+ skill: {
232
+ global: ({ home }) => path.join(home, ".factory", "skills"),
233
+ project: ({ cwd }) => path.join(cwd, ".factory", "skills"),
234
+ alternatives: ({ home }) => [path.join(home, ".agents", "skills")],
235
+ },
236
+ mcp: { config: ({ home }) => path.join(home, ".factory", "mcp.json"), encoder: droidEncoder },
237
+ },
238
+ {
239
+ id: "cline",
240
+ detection: ({ home }) => [path.join(home, ".cline")],
241
+ skill: {
242
+ global: ({ home }) => path.join(home, ".cline", "skills"),
243
+ project: ({ cwd }) => path.join(cwd, ".cline", "skills"),
244
+ alternatives: ({ home }) => [
245
+ path.join(home, ".agents", "skills"),
246
+ path.join(home, ".claude", "skills"),
247
+ ],
248
+ },
249
+ mcp: {
250
+ config: ({ home }) => path.join(home, ".cline", "data", "settings", "cline_mcp_settings.json"),
251
+ encoder: clineEncoder,
252
+ },
253
+ },
254
+ {
255
+ id: "continue",
256
+ detection: ({ cwd, home }) => [path.join(cwd, ".continue"), path.join(home, ".continue")],
257
+ skill: {
258
+ global: ({ home }) => path.join(home, ".continue", "skills"),
259
+ project: ({ cwd }) => path.join(cwd, ".continue", "skills"),
260
+ alternatives: ({ home }) => [path.join(home, ".claude", "skills")],
261
+ },
262
+ },
263
+ {
264
+ id: "pi",
265
+ detection: ({ home }) => [path.join(home, ".pi")],
266
+ skill: universalSkill,
267
+ },
268
+ {
269
+ id: "hermes",
270
+ detection: ({ home }) => [path.join(home, ".hermes")],
271
+ skill: universalSkill,
272
+ },
273
+ {
274
+ id: "openclaw",
275
+ detection: ({ home }) => [path.join(home, ".openclaw")],
276
+ skill: universalSkill,
277
+ },
278
+ ];
279
+ const definitionById = new Map(definitions.map((definition) => [definition.id, definition]));
280
+ export const MACHINE_AGENT_IDS = AGENT_REGISTRY.filter((entry) => entry.machineClient).map((entry) => entry.id);
281
+ export function agentNodeCatalog(input) {
282
+ const context = { cwd: input.cwd, env: input.env ?? {}, home: input.home };
283
+ return definitions.map((definition) => materializeNodeEntry(definition, context));
284
+ }
285
+ export function getAgentNodeEntry(id, input) {
286
+ const definition = definitionById.get(id);
287
+ if (!definition)
288
+ return null;
289
+ return materializeNodeEntry(definition, {
290
+ cwd: input.cwd,
291
+ env: input.env ?? {},
292
+ home: input.home,
293
+ });
294
+ }
295
+ export function buildAgentMcpServerConfig(input) {
296
+ const definition = definitionById.get(input.agentId);
297
+ if (!definition?.mcp) {
298
+ return commonEncoder.build(input);
299
+ }
300
+ return definition.mcp.encoder.build(input);
301
+ }
302
+ export function agentEnvironmentHint(env) {
303
+ const termProgram = env.TERM_PROGRAM?.toLowerCase() ?? "";
304
+ if (env.CURSOR_TRACE_ID || termProgram.includes("cursor"))
305
+ return "cursor";
306
+ if (env.CLAUDECODE || env.CLAUDE_CODE)
307
+ return "claude-code";
308
+ if (env.CODEX_HOME)
309
+ return "codex";
310
+ if (env.VSCODE_PID || termProgram.includes("vscode"))
311
+ return "vscode";
312
+ return null;
313
+ }
314
+ function materializeNodeEntry(definition, context) {
315
+ const agent = getAgentEntry(definition.id);
316
+ return {
317
+ capabilities: agent.capabilities,
318
+ detectionPaths: () => definition.detection(context),
319
+ id: definition.id,
320
+ mcp: definition.mcp
321
+ ? {
322
+ configPath: () => definition.mcp?.config(context) ?? "",
323
+ format: definition.mcp.encoder.format,
324
+ serverConfigEncoder: definition.mcp.encoder,
325
+ }
326
+ : null,
327
+ name: agent.name,
328
+ skillDir: definition.skill
329
+ ? {
330
+ alternativeGlobalPaths: () => definition.skill?.alternatives?.(context) ?? [],
331
+ global: () => definition.skill?.global(context) ?? path.join(context.home, ".agents", "skills"),
332
+ project: () => definition.skill?.project(context) ?? path.join(context.cwd, ".agents", "skills"),
333
+ }
334
+ : null,
335
+ };
336
+ }
337
+ function codexHome(home, env) {
338
+ return env.CODEX_HOME?.trim() || path.join(home, ".codex");
339
+ }
@@ -27,8 +27,7 @@ function numericAttribute(name, value) {
27
27
  export function spacefastWordmarkSvg(options = {}) {
28
28
  const colors = resolvedColors(options.colors);
29
29
  const label = svgAttribute(options.ariaLabel ?? "Spacefast");
30
- // The logotype is single-color: `plate` (ink) is its fill. The plate/shadow
31
- // layer idiom retired with the riso system — the wordmark is bare letterforms.
30
+ // The logotype is single-color: `plate` (ink) is its fill.
32
31
  return `<svg xmlns="http://www.w3.org/2000/svg"${numericAttribute("width", options.width)}${numericAttribute("height", options.height)} viewBox="${SPACEFAST_WORDMARK_VIEW_BOX}" role="img" aria-label="${label}">
33
32
  <path fill="${svgAttribute(colors.plate)}" d="${SPACEFAST_WORDMARK_PATH}"/>
34
33
  </svg>
@@ -6,18 +6,15 @@
6
6
  * build outputs of these constants, never independent sources of truth.
7
7
  */
8
8
  // The 2026-08 "printed matter" palette (DESIGN.md §3). `plate`/`paper` name the
9
- // icon serializers' layers; the wordmark itself is a single-color logotype and
10
- // takes whatever ink its surface supplies.
9
+ // icon serializers' layers; the wordmark takes whatever ink its surface supplies.
11
10
  export const SPACEFAST_BRAND_COLORS = {
12
11
  shadow: "#d8f24b",
13
12
  plate: "#0c0c0c",
14
13
  paper: "#fcfcfa",
15
14
  };
16
- // The logotype: bare "SPACEFAST" letterforms in the right-angle stencil
17
- // alphabet no plates, no offset shadow (that idiom retired with the riso
18
- // system). One path, one color; surfaces set the fill (ink on light grounds,
19
- // paper on dark). Exported from the Spacefast Figma file via the standalone
20
- // `www` repo (`public/static/brand/spacefast-wordmark.svg`).
15
+ // The logotype: bare "SPACEFAST" letterforms, one path, one color. Surfaces set
16
+ // the fill (ink on light grounds, paper on dark). Exported from the Spacefast
17
+ // Figma file via the `www` repo (`public/static/brand/spacefast-wordmark.svg`).
21
18
  export const SPACEFAST_WORDMARK_VIEW_BOX = "0 0 152 28.9062";
22
19
  // This is a literal so browser consumers render ordinary SVG markup without
23
20
  // assembling path text at runtime.
package/dist/brand.d.ts CHANGED
@@ -2,4 +2,21 @@ export declare const BRAND: {
2
2
  /** Consumer product name shown on every user surface. */
3
3
  readonly productName: "Spacefast";
4
4
  };
5
+ /**
6
+ * What Spacefast is, in one paragraph, for a reader who has never heard of it.
7
+ *
8
+ * Every agent-facing surface leads with this: the copied page context, the
9
+ * `/v1/context` positioning fragment, the skill templates. An agent that
10
+ * only ever sees "here are three endpoints" cannot tell a user what it is
11
+ * working with, so the positioning is part of the context, not marketing.
12
+ *
13
+ * One constant, one wording. Do not paraphrase it at a call site.
14
+ */
15
+ export declare const SPACEFAST_POSITIONING: string;
16
+ /**
17
+ * The one-line positioning for lean agent prompts and handoff documents,
18
+ * where every word costs attention. The paragraph above stays for surfaces
19
+ * that can afford it. One constant, one wording — same rule as above.
20
+ */
21
+ export declare const SPACEFAST_POSITIONING_SHORT = "Spacefast (https://spacefast.com) is Automattic's platform where agents publish and host sites and apps.";
5
22
  export declare const GITHUB_CHECK_RUN_NAME: "Spacefast Builds";
package/dist/brand.js CHANGED
@@ -2,8 +2,28 @@ export const BRAND = {
2
2
  /** Consumer product name shown on every user surface. */
3
3
  productName: "Spacefast",
4
4
  };
5
- // The GitHub check-run name every build reports under. One constant because the
6
- // create and update paths live in different modules and drifted once
7
- // ("Stattic" vs "Spacefast") — GitHub keys check runs by name, so a mismatch
8
- // shows two orphaned checks per commit.
5
+ /**
6
+ * What Spacefast is, in one paragraph, for a reader who has never heard of it.
7
+ *
8
+ * Every agent-facing surface leads with this: the copied page context, the
9
+ * `/v1/context` positioning fragment, the skill templates. An agent that
10
+ * only ever sees "here are three endpoints" cannot tell a user what it is
11
+ * working with, so the positioning is part of the context, not marketing.
12
+ *
13
+ * One constant, one wording. Do not paraphrase it at a call site.
14
+ */
15
+ export const SPACEFAST_POSITIONING = "Spacefast is a batteries-included platform by Automattic to deploy any agentic artifacts, " +
16
+ "websites, generated static sites, full-stack TypeScript projects, PHP functions and Spacefast " +
17
+ "Zero capsules. Every space comes with database, storage, transactional emails, built-in auth " +
18
+ "for small or internal apps. Pages deployed to Spacefast are private by default but can be made " +
19
+ "public. Spacefast is built on the same infrastructure as WordPress.com, Tumblr, WordPress VIP " +
20
+ "and WP Cloud.";
21
+ /**
22
+ * The one-line positioning for lean agent prompts and handoff documents,
23
+ * where every word costs attention. The paragraph above stays for surfaces
24
+ * that can afford it. One constant, one wording — same rule as above.
25
+ */
26
+ export const SPACEFAST_POSITIONING_SHORT = "Spacefast (https://spacefast.com) is Automattic's platform where agents publish and host sites and apps.";
27
+ // GitHub keys check runs by name, so the create and update paths (separate
28
+ // modules) must both use this constant or a commit grows two orphaned checks.
9
29
  export const GITHUB_CHECK_RUN_NAME = `${BRAND.productName} Builds`;
@@ -7,7 +7,7 @@ export type EnvDomains = {
7
7
  readonly apex: string;
8
8
  /** Cookie domain that scopes auth across every subdomain of this env. */
9
9
  readonly cookieDomain: string;
10
- /** Scheme used to build origins. SSL everywhere even local (via portless). */
10
+ /** Scheme used to build origins. SSL everywhere, even local (via portless). */
11
11
  readonly protocol: "http" | "https";
12
12
  /** Fully-qualified hostname per service. */
13
13
  readonly hosts: Readonly<Record<Service, string>>;
@@ -18,15 +18,13 @@ export declare const PROD_ENV_DOMAIN: "spacefast.com";
18
18
  export declare const DEV_ENV_DOMAIN: "sf.localhost";
19
19
  /** The deployed staging apex. Not local: staging is a hosted environment. */
20
20
  export declare const STAGING_ENV_DOMAIN: "stattic.net";
21
- /** The deployed dev apex distinct from local dev, which stays on sf.localhost. */
21
+ /** The deployed dev apex. Local dev is separate and stays on sf.localhost. */
22
22
  export declare const DEV_DEPLOY_ENV_DOMAIN: "stattic.xyz";
23
23
  /**
24
24
  * The three environments the deploy lanes ship to, keyed by the name each one
25
25
  * carries everywhere else: the branch map in scripts/deploy-environment.mjs,
26
- * the GitHub Environment, and `SPACEFAST_ENV` on the running service.
27
- *
28
- * Distinct from `DeployEnv` below, which names the *local* stacks (dev/test on
29
- * sf.localhost) beside prod.
26
+ * the GitHub Environment, and `SPACEFAST_ENV` on the running service. Distinct
27
+ * from `DeployEnv` above, which names the local stacks beside prod.
30
28
  */
31
29
  export type HostedEnv = "dev" | "staging" | "prod";
32
30
  export declare const HOSTED_ENV_DOMAINS: Readonly<Record<HostedEnv, string>>;
@@ -39,18 +37,25 @@ export declare function hostedEnvFor(environment: string | undefined): HostedEnv
39
37
  /** The apex a hosted environment serves from, or null when the name is not one. */
40
38
  export declare function hostedEnvDomain(environment: string | undefined): string | null;
41
39
  /**
42
- * Construct the full per-service host map from a single env domain
43
- * (`spacefast.com`, `stattic.net`, `sf.localhost`, …). One knob services are
44
- * always `<service>.<domain>` over https, with three deliberate exceptions: the
45
- * marketing site sits on the bare apex of a hosted environment (so staging
46
- * rehearses production's shape rather than a `www.` variant of it), and both
47
- * Git push and the internal handbook live on their own apexes in prod.
40
+ * The per-service host map for one env domain (`spacefast.com`, `sf.localhost`,
41
+ * …). Services are `<service>.<domain>` over https, with three exceptions: the
42
+ * marketing site takes the bare apex of a hosted environment (so staging
43
+ * rehearses production's shape), and Git push and the internal handbook get
44
+ * their own apexes in prod.
48
45
  */
49
46
  export declare function envDomainsFor(domain: string): EnvDomains;
50
47
  /** Origin (scheme + host, no trailing slash) for a service in an environment. */
51
48
  export declare function serviceOrigin(service: Service, env: DeployEnv): string;
52
- /** Base URL every documentation link catalog entries, skills, error pages — resolves against. */
49
+ /** Base URL every documentation link resolves against: catalog entries, skills, error pages. */
53
50
  export declare const DOCS_BASE_URL: string;
51
+ /**
52
+ * The API origin every first-party client falls back to when nothing else names
53
+ * a provider: no `--api-url`, no `SPACEFAST_API_URL`, no saved profile or
54
+ * checkout link. The CLI and the MCP server share this one literal so a caller
55
+ * cannot be pointed at two different "defaults" depending on which surface it
56
+ * came through.
57
+ */
58
+ export declare const DEFAULT_API_URL: string;
54
59
  /**
55
60
  * The production infrastructure apex. Committed artifacts and anything
56
61
  * customer- or agent-facing (OpenAPI examples, docs, skills) must show this
@@ -63,23 +68,45 @@ export declare const DEV_VIEW_FAST_APEX: "preview.space";
63
68
  /**
64
69
  * Resolve the infrastructure apex, allowing an explicit deployment override.
65
70
  *
66
- * Only production has an apex here. Every other hosted environment names its
67
- * own through `SPACEFAST_VIEW_FAST_APEX`, because a space apex is a zone that
68
- * has to exist, be delegated, and be attached at the provider not a name this
69
- * registry can pick on a deployment's behalf. Two environments allocating from
70
- * one apex race for the same hostname, and the one that loses is a customer's
71
- * site.
71
+ * Only production has an apex here. Every other hosted environment names its own
72
+ * through `SPACEFAST_VIEW_FAST_APEX`, because a space apex is a zone that must
73
+ * exist, be delegated, and be attached at the provider. Two environments
74
+ * allocating from one apex race for the same hostname, and the loser is a
75
+ * customer's site.
72
76
  *
73
- * When nothing names the apex, this falls back to the local one rather than
74
- * production's: a caller that cannot say which environment it is has no claim
75
- * on production's namespace. Holding deployments to naming it belongs to the
76
- * process that mints hostnames, not to this module the control plane's env
77
- * schema refuses to boot without it, while builds and browser bundles import
78
- * this registry for its host scheme and must not explode over an environment
79
- * they do not have.
77
+ * When nothing names the apex this falls back to the local one: a caller that
78
+ * cannot say which environment it is has no claim on production's namespace. The
79
+ * control plane's env schema is what holds deployments to naming it; builds and
80
+ * browser bundles import this registry only for its host scheme.
80
81
  */
81
82
  export declare function resolveViewFastApex(environment: Readonly<Partial<Pick<NodeJS.ProcessEnv, "NODE_ENV" | "SPACEFAST_ENV" | "SPACEFAST_VIEW_FAST_APEX">>>): string;
82
83
  /** Infrastructure apex used for public managed/custom domains. */
83
84
  export declare const VIEW_FAST_APEX: string;
84
- /** Reserved first-label prefix for the management namespace; users may not register it. */
85
- export declare const MANAGEMENT_LABEL_PREFIX: "wpc-manage-";
85
+ /**
86
+ * The Spacefast-owned apex under which a LINKED TEST TENANT's simulated sites and
87
+ * hostname namespaces materialize (partner-operations spec §1). It is never
88
+ * served by real infrastructure — nothing points DNS at it and no cert is
89
+ * provisioned — so it exists purely as a collision-free namespace: a test
90
+ * tenant's hostnames are `{label}.{tenant}.{TEST_APEX}` (per-tenant, see
91
+ * `testApexForTenant`), which is also the marker the runtime-API transport uses
92
+ * to recognize a simulated box and short-circuit rather than reach a real one.
93
+ *
94
+ * Defaults to `test.{VIEW_FAST_APEX}` so every environment gets a distinct test
95
+ * apex for free; a deployment can override it with `SPACEFAST_TEST_APEX`.
96
+ */
97
+ export declare function resolveTestApex(environment: Readonly<Partial<Pick<NodeJS.ProcessEnv, "NODE_ENV" | "SPACEFAST_ENV" | "SPACEFAST_VIEW_FAST_APEX" | "SPACEFAST_TEST_APEX">>>): string;
98
+ /** The resolved test-mode apex for this process. */
99
+ export declare const TEST_APEX: string;
100
+ export declare function testApexForTenant(tenantId: string, testApex?: string): string;
101
+ /**
102
+ * Whether a hostname belongs to the test-mode apex (a simulated box).
103
+ *
104
+ * STRICTLY a suffix check — the apex ITSELF is never a simulated hostname. Every
105
+ * simulated hostname is `{label}.{tenant}.{TEST_APEX}` (two labels deep), while
106
+ * the bare apex is reachable as a LIVE space's hostname: `TEST_APEX` defaults to
107
+ * `test.{VIEW_FAST_APEX}`, so a live space slugged `test` is served at exactly
108
+ * `test.view.fast`. Matching the apex would make every Runtime-API call for that
109
+ * space short-circuit to a synthetic response — engine installs reporting
110
+ * `installed` and publishes reporting success while nothing ever reaches the box.
111
+ */
112
+ export declare function isTestApexHostname(hostname: string, testApex?: string): boolean;