@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.
- package/dist/agents/connect-targets.d.ts +6 -146
- package/dist/agents/connect-targets.js +63 -295
- package/dist/agents/private-key-oauth.d.ts +31 -1
- package/dist/agents/private-key-oauth.js +124 -33
- package/dist/agents/registry/core.d.ts +292 -0
- package/dist/agents/registry/core.js +1388 -0
- package/dist/agents/registry/deeplink-probes.d.ts +23 -0
- package/dist/agents/registry/deeplink-probes.js +18 -0
- package/dist/agents/registry/node.d.ts +56 -0
- package/dist/agents/registry/node.js +339 -0
- package/dist/brand-assets-build.js +1 -2
- package/dist/brand-assets.js +4 -7
- package/dist/brand.d.ts +17 -0
- package/dist/brand.js +24 -4
- package/dist/config/domains.d.ts +55 -28
- package/dist/config/domains.js +85 -41
- package/dist/config/index.js +1 -2
- package/dist/contracts/abuse.js +9 -24
- package/dist/contracts/access-profiles.d.ts +86 -0
- package/dist/contracts/access-profiles.js +89 -0
- package/dist/contracts/access.d.ts +21 -27
- package/dist/contracts/access.js +33 -64
- package/dist/contracts/activity.d.ts +18 -1
- package/dist/contracts/activity.js +70 -26
- package/dist/contracts/analytics.js +8 -10
- package/dist/contracts/api-keys.d.ts +77 -52
- package/dist/contracts/api-keys.js +44 -24
- package/dist/contracts/application-journal.d.ts +216 -0
- package/dist/contracts/application-journal.js +167 -0
- package/dist/contracts/auth.d.ts +90 -17
- package/dist/contracts/auth.js +86 -17
- package/dist/contracts/beta.d.ts +9 -4
- package/dist/contracts/beta.js +20 -16
- package/dist/contracts/billing.js +7 -11
- package/dist/contracts/bootstrap.d.ts +791 -0
- package/dist/contracts/bootstrap.js +51 -0
- package/dist/contracts/builds.d.ts +192 -7
- package/dist/contracts/builds.js +84 -21
- package/dist/contracts/channels.d.ts +43 -0
- package/dist/contracts/channels.js +25 -9
- package/dist/contracts/cli.d.ts +7 -0
- package/dist/contracts/cli.js +6 -0
- package/dist/contracts/collab-public.d.ts +1 -1
- package/dist/contracts/collab-public.js +5 -8
- package/dist/contracts/comments.d.ts +45 -35
- package/dist/contracts/comments.js +107 -77
- package/dist/contracts/commerce.d.ts +165 -0
- package/dist/contracts/commerce.js +146 -0
- package/dist/contracts/common.d.ts +3 -3
- package/dist/contracts/common.js +18 -29
- package/dist/contracts/content-contract-verification.d.ts +521 -0
- package/dist/contracts/content-contract-verification.js +320 -0
- package/dist/contracts/content-platform-fixture.d.ts +1278 -0
- package/dist/contracts/content-platform-fixture.js +44 -0
- package/dist/contracts/content-program.d.ts +994 -0
- package/dist/contracts/content-program.js +658 -0
- package/dist/contracts/content-sync.d.ts +290 -0
- package/dist/contracts/content-sync.js +167 -0
- package/dist/contracts/content.d.ts +432 -0
- package/dist/contracts/content.js +303 -0
- package/dist/contracts/continuation.d.ts +17 -1
- package/dist/contracts/continuation.js +23 -23
- package/dist/contracts/countries.js +3 -4
- package/dist/contracts/crons.d.ts +17 -0
- package/dist/contracts/crons.js +33 -15
- package/dist/contracts/dashboard-prefs.d.ts +56 -0
- package/dist/contracts/dashboard-prefs.js +51 -0
- package/dist/contracts/device-auth.d.ts +234 -37
- package/dist/contracts/device-auth.js +267 -53
- package/dist/contracts/docs.d.ts +6 -10
- package/dist/contracts/docs.js +5 -13
- package/dist/contracts/domains.d.ts +499 -102
- package/dist/contracts/domains.js +169 -58
- package/dist/contracts/email-preferences.d.ts +3 -3
- package/dist/contracts/email-preferences.js +6 -7
- package/dist/contracts/enums.d.ts +26 -26
- package/dist/contracts/enums.js +61 -54
- package/dist/contracts/error-code-meta.d.ts +273 -7
- package/dist/contracts/error-code-meta.js +81 -5
- package/dist/contracts/error-codes.d.ts +5 -5
- package/dist/contracts/error-codes.js +79 -16
- package/dist/contracts/events.d.ts +100 -20
- package/dist/contracts/events.js +107 -20
- package/dist/contracts/execution.d.ts +47 -66
- package/dist/contracts/execution.js +51 -64
- package/dist/contracts/feature-lifecycle.d.ts +70 -14
- package/dist/contracts/feature-lifecycle.js +86 -15
- package/dist/contracts/features.d.ts +100 -37
- package/dist/contracts/features.js +21 -27
- package/dist/contracts/fixtures/content-platform-v1.json +1108 -0
- package/dist/contracts/frame-session.d.ts +192 -0
- package/dist/contracts/frame-session.js +164 -0
- package/dist/contracts/functions.d.ts +218 -211
- package/dist/contracts/functions.js +273 -260
- package/dist/contracts/grant-copy.d.ts +43 -0
- package/dist/contracts/grant-copy.js +44 -0
- package/dist/contracts/grants.d.ts +64 -56
- package/dist/contracts/grants.js +124 -23
- package/dist/contracts/ids.d.ts +4 -1
- package/dist/contracts/ids.js +4 -1
- package/dist/contracts/internal.d.ts +5 -4
- package/dist/contracts/internal.js +12 -3
- package/dist/contracts/mcp.d.ts +17 -0
- package/dist/contracts/mcp.js +23 -0
- package/dist/contracts/me.d.ts +6 -1
- package/dist/contracts/me.js +12 -6
- package/dist/contracts/notifications.d.ts +27 -29
- package/dist/contracts/notifications.js +9 -4
- package/dist/contracts/oauth-resources.d.ts +121 -10
- package/dist/contracts/oauth-resources.js +130 -11
- package/dist/contracts/oauth-scope-actions.d.ts +90 -0
- package/dist/contracts/oauth-scope-actions.js +126 -0
- package/dist/contracts/operations.d.ts +27 -4
- package/dist/contracts/operations.js +11 -5
- package/dist/contracts/pages.d.ts +29 -5
- package/dist/contracts/pages.js +22 -5
- package/dist/contracts/partner-notifications.d.ts +3 -0
- package/dist/contracts/partner-notifications.js +65 -0
- package/dist/contracts/{platform.d.ts → partner.d.ts} +29 -42
- package/dist/contracts/{platform.js → partner.js} +27 -40
- package/dist/contracts/plan-policy.d.ts +1 -1
- package/dist/contracts/principal-assertion.d.ts +43 -0
- package/dist/contracts/principal-assertion.js +67 -0
- package/dist/contracts/principals.d.ts +73 -0
- package/dist/contracts/principals.js +59 -0
- package/dist/contracts/privacy.d.ts +11 -0
- package/dist/contracts/privacy.js +17 -0
- package/dist/contracts/problem-document.js +3 -4
- package/dist/contracts/publish-archive.d.ts +116 -18
- package/dist/contracts/publish-archive.js +6 -3
- package/dist/contracts/push-new.d.ts +4 -4
- package/dist/contracts/quotas.js +3 -3
- package/dist/contracts/realtime.d.ts +52 -0
- package/dist/contracts/realtime.js +54 -0
- package/dist/contracts/repository-connections.d.ts +1 -1
- package/dist/contracts/repository-connections.js +6 -2
- package/dist/contracts/resources.d.ts +105 -14
- package/dist/contracts/resources.js +145 -21
- package/dist/contracts/route-inventory.d.ts +358 -0
- package/dist/contracts/route-inventory.js +141 -0
- package/dist/contracts/runtime-api.d.ts +112 -35
- package/dist/contracts/runtime-api.js +86 -66
- package/dist/contracts/runtime-app.d.ts +11 -21
- package/dist/contracts/runtime-app.js +39 -24
- package/dist/contracts/runtime-components.d.ts +143 -0
- package/dist/contracts/runtime-components.js +199 -0
- package/dist/contracts/runtime-db.d.ts +45 -19
- package/dist/contracts/runtime-db.js +85 -20
- package/dist/contracts/runtime-purge.js +3 -5
- package/dist/contracts/runtime-services.d.ts +43 -75
- package/dist/contracts/runtime-services.js +29 -49
- package/dist/contracts/runtime-storage.d.ts +14 -14
- package/dist/contracts/runtime-storage.js +28 -13
- package/dist/contracts/sf-config-v1.d.ts +14 -18
- package/dist/contracts/slugs.js +13 -4
- package/dist/contracts/space-config.d.ts +235 -28
- package/dist/contracts/space-config.js +246 -91
- package/dist/contracts/spaces.d.ts +360 -255
- package/dist/contracts/spaces.js +190 -122
- package/dist/contracts/superadmin-activity.d.ts +3 -43
- package/dist/contracts/superadmin-activity.js +6 -30
- package/dist/contracts/superadmin-emails.d.ts +1 -0
- package/dist/contracts/superadmin-emails.js +17 -1
- package/dist/contracts/superadmin-runtime.d.ts +199 -0
- package/dist/contracts/superadmin-runtime.js +141 -0
- package/dist/contracts/superadmin-search.d.ts +22 -2
- package/dist/contracts/superadmin-search.js +14 -6
- package/dist/contracts/superadmin-spaces.d.ts +435 -186
- package/dist/contracts/superadmin-spaces.js +131 -25
- package/dist/contracts/superadmin-teams.d.ts +3 -0
- package/dist/contracts/superadmin-teams.js +1 -2
- package/dist/contracts/superadmin-tenants.d.ts +627 -6
- package/dist/contracts/superadmin-tenants.js +32 -7
- package/dist/contracts/superadmin.d.ts +98 -16
- package/dist/contracts/superadmin.js +63 -10
- package/dist/contracts/tags.d.ts +85 -58
- package/dist/contracts/tags.js +44 -34
- package/dist/contracts/teams.d.ts +72 -9
- package/dist/contracts/teams.js +84 -25
- package/dist/contracts/tenants.d.ts +135 -0
- package/dist/contracts/tenants.js +120 -0
- package/dist/contracts/test-triggers.d.ts +70 -0
- package/dist/contracts/test-triggers.js +116 -0
- package/dist/contracts/theme-json.js +3 -8
- package/dist/contracts/transfers.d.ts +1 -0
- package/dist/contracts/transfers.js +1 -0
- package/dist/contracts/usage.d.ts +209 -0
- package/dist/contracts/usage.js +124 -12
- package/dist/contracts/variables.d.ts +2 -2
- package/dist/contracts/variables.js +9 -13
- package/dist/contracts/webhooks.d.ts +13 -5
- package/dist/contracts/webhooks.js +3 -1
- package/dist/contracts/zero.d.ts +57 -64
- package/dist/contracts/zero.js +68 -66
- package/dist/dashboard-paths/index.d.ts +24 -21
- package/dist/dashboard-paths/index.js +35 -47
- package/dist/dashboard-paths/route-reservations.generated.d.ts +2 -0
- package/dist/dashboard-paths/route-reservations.generated.js +36 -0
- package/dist/docs/agent-arrival.d.ts +92 -0
- package/dist/docs/agent-arrival.js +227 -0
- package/dist/docs/agent-output-policy.d.ts +6 -0
- package/dist/docs/agent-output-policy.js +22 -0
- package/dist/docs/agent-prose.d.ts +11 -17
- package/dist/docs/agent-prose.js +62 -37
- package/dist/docs/agent-setup.d.ts +72 -41
- package/dist/docs/agent-setup.js +336 -436
- package/dist/docs/catalog.d.ts +147 -89
- package/dist/docs/catalog.js +157 -42
- package/dist/docs/error-docs.d.ts +2102 -1
- package/dist/docs/error-docs.js +285 -16
- package/dist/docs/index-build.d.ts +0 -1
- package/dist/docs/index-build.js +2 -3
- package/dist/docs/page-context-prompt.d.ts +77 -0
- package/dist/docs/page-context-prompt.js +131 -0
- package/dist/docs/reference-urls.d.ts +46 -0
- package/dist/docs/reference-urls.js +79 -0
- package/dist/docs/search.d.ts +6 -8
- package/dist/docs/search.js +10 -13
- package/dist/docs/skill-distribution.d.ts +4 -1
- package/dist/docs/skill-distribution.js +10 -5
- package/dist/docs/skills.d.ts +117 -117
- package/dist/docs/skills.js +120 -72
- package/dist/docs/start-prompts.d.ts +45 -0
- package/dist/docs/start-prompts.js +62 -0
- package/dist/domain-exploration.js +9 -13
- package/dist/og-template.d.ts +56 -0
- package/dist/og-template.js +56 -0
- package/dist/slug-policy/index.js +5 -11
- package/dist/utils/browser-credential.d.ts +13 -6
- package/dist/utils/browser-credential.js +14 -7
- package/dist/utils/build-settings.d.ts +16 -0
- package/dist/utils/build-settings.js +63 -17
- package/dist/utils/canonical-json.d.ts +3 -5
- package/dist/utils/canonical-json.js +3 -5
- package/dist/utils/cast-transport.d.ts +5 -17
- package/dist/utils/cast-transport.js +6 -19
- package/dist/utils/claim-token.js +1 -2
- package/dist/utils/comment-avatars.js +4 -6
- package/dist/utils/concurrency.js +2 -3
- package/dist/utils/content-type.d.ts +7 -6
- package/dist/utils/content-type.js +73 -51
- package/dist/utils/credential-policy.d.ts +50 -6
- package/dist/utils/credential-policy.js +123 -57
- package/dist/utils/egress-policy.fixtures.json +1 -1
- package/dist/utils/generate-space-name.d.ts +3 -8
- package/dist/utils/generate-space-name.js +3 -8
- package/dist/utils/grants.d.ts +0 -1
- package/dist/utils/grants.js +4 -7
- package/dist/utils/gravatar.d.ts +2 -4
- package/dist/utils/gravatar.js +6 -12
- package/dist/utils/id-hints.js +14 -23
- package/dist/utils/idempotency.d.ts +3 -3
- package/dist/utils/idempotency.js +6 -7
- package/dist/utils/local-space-state.d.ts +15 -15
- package/dist/utils/local-space-state.js +34 -23
- package/dist/utils/oauth-signed-query.d.ts +3 -5
- package/dist/utils/oauth-signed-query.js +6 -9
- package/dist/utils/one-shot-replay.d.ts +3 -5
- package/dist/utils/one-shot-replay.js +3 -5
- package/dist/utils/page-colors.d.ts +4 -10
- package/dist/utils/page-colors.js +11 -35
- package/dist/utils/page-fonts.js +6 -11
- package/dist/utils/page-preview.d.ts +0 -1
- package/dist/utils/page-preview.js +0 -1
- package/dist/utils/pages.d.ts +22 -11
- package/dist/utils/pages.js +70 -30
- package/dist/utils/privacy-regions.d.ts +19 -0
- package/dist/utils/privacy-regions.js +91 -0
- package/dist/utils/publish-form-data.d.ts +4 -5
- package/dist/utils/publish-form-data.js +2 -3
- package/dist/utils/publish-policy.d.ts +10 -23
- package/dist/utils/publish-policy.js +63 -116
- package/dist/utils/query-client.d.ts +2 -0
- package/dist/utils/query-client.js +10 -1
- package/dist/utils/runtime-paths.d.ts +4 -4
- package/dist/utils/runtime-paths.js +6 -8
- package/dist/utils/runtime-upload.d.ts +4 -0
- package/dist/utils/runtime-upload.js +5 -0
- package/dist/utils/secure-local-file.d.ts +3 -3
- package/dist/utils/secure-local-file.js +18 -24
- package/dist/utils/space-config.d.ts +11 -14
- package/dist/utils/space-config.js +10 -16
- package/dist/utils/static-runtime-policy.d.ts +5 -8
- package/dist/utils/static-runtime-policy.generated.d.ts +16 -0
- package/dist/utils/static-runtime-policy.generated.js +70 -0
- package/dist/utils/static-runtime-policy.js +17 -84
- package/dist/utils/storage-policy.js +1 -2
- package/dist/utils/upload-session.js +8 -14
- package/dist/utils/version-path.js +11 -19
- package/dist/utils/wpcom-auth-redirects.d.ts +5 -14
- package/dist/utils/wpcom-auth-redirects.js +1 -4
- package/dist/vocabulary.d.ts +7 -7
- package/dist/vocabulary.js +30 -16
- package/package.json +14 -2
- package/dist/agents/client-registry.d.ts +0 -22
- package/dist/agents/client-registry.js +0 -41
- package/dist/docs/agent-handoff-document.d.ts +0 -15
- package/dist/docs/agent-handoff-document.js +0 -180
- package/dist/docs/agent-solutions.d.ts +0 -110
- package/dist/docs/agent-solutions.js +0 -183
- package/dist/utils/query-keys.d.ts +0 -84
- 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.
|
|
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>
|
package/dist/brand-assets.js
CHANGED
|
@@ -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
|
|
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
|
|
17
|
-
//
|
|
18
|
-
//
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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`;
|
package/dist/config/domains.d.ts
CHANGED
|
@@ -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
|
|
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
|
|
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
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
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
|
|
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
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
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
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
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
|
-
/**
|
|
85
|
-
|
|
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;
|