@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
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
export const MACHINE_AGENT_CLIENT_IDS = [
|
|
2
|
-
"universal",
|
|
3
|
-
"claude-code",
|
|
4
|
-
"codex",
|
|
5
|
-
"opencode",
|
|
6
|
-
"github-copilot",
|
|
7
|
-
"factory-droid",
|
|
8
|
-
"cursor",
|
|
9
|
-
"vscode",
|
|
10
|
-
"gemini-cli",
|
|
11
|
-
"windsurf",
|
|
12
|
-
"cline",
|
|
13
|
-
"continue",
|
|
14
|
-
];
|
|
15
|
-
export const CONNECT_TARGET_IDS = [
|
|
16
|
-
"claude-code",
|
|
17
|
-
"cursor",
|
|
18
|
-
"vscode",
|
|
19
|
-
"codex",
|
|
20
|
-
"claude",
|
|
21
|
-
"chatgpt",
|
|
22
|
-
];
|
|
23
|
-
export const AGENT_PRODUCT_NAMES = {
|
|
24
|
-
universal: "Universal (.agents)",
|
|
25
|
-
"claude-code": "Claude Code",
|
|
26
|
-
codex: "Codex",
|
|
27
|
-
cursor: "Cursor",
|
|
28
|
-
vscode: "VS Code",
|
|
29
|
-
"github-copilot": "GitHub Copilot",
|
|
30
|
-
"factory-droid": "Factory Droid",
|
|
31
|
-
opencode: "OpenCode",
|
|
32
|
-
"gemini-cli": "Gemini CLI",
|
|
33
|
-
windsurf: "Windsurf",
|
|
34
|
-
cline: "Cline",
|
|
35
|
-
continue: "Continue",
|
|
36
|
-
claude: "Claude",
|
|
37
|
-
chatgpt: "ChatGPT",
|
|
38
|
-
};
|
|
39
|
-
export function agentProductName(id) {
|
|
40
|
-
return AGENT_PRODUCT_NAMES[id];
|
|
41
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The exact markdown body served to agents at `/agent/<documentId>`.
|
|
3
|
-
* Deterministic and ID-free on purpose — see the module comment.
|
|
4
|
-
*/
|
|
5
|
-
export declare function renderAgentHandoffDocumentMarkdown(input: {
|
|
6
|
-
mcpEndpoint: string;
|
|
7
|
-
}): string;
|
|
8
|
-
/**
|
|
9
|
-
* The browser variant served at `/agent/<documentId>`: the full instructions in
|
|
10
|
-
* the initial response body, zero scripts (nothing may ever inspect or echo a
|
|
11
|
-
* handoff credential), same bytes for every ID.
|
|
12
|
-
*/
|
|
13
|
-
export declare function renderAgentHandoffDocumentHtml(input: {
|
|
14
|
-
mcpEndpoint: string;
|
|
15
|
-
}): string;
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* The public setup document behind agent handoff links.
|
|
3
|
-
*
|
|
4
|
-
* Private handoff links carry a one-use path token while the durable agent
|
|
5
|
-
* credential stays encrypted at the broker. The minted prompt tells the agent
|
|
6
|
-
* to fetch the reconstructed clean document URL instead. This
|
|
7
|
-
* fetch is UNAUTHENTICATED BY DESIGN — which means the response
|
|
8
|
-
* must never become an existence oracle. The contract here is
|
|
9
|
-
* indistinguishability: every well-formed document ID serves the exact same
|
|
10
|
-
* bytes, with the same status and the same timing, whether or not a handoff with
|
|
11
|
-
* that ID exists. That is why these renderers take no document ID and hit no
|
|
12
|
-
* store: the document is one static artifact, target-agnostic, published behind
|
|
13
|
-
* a `/agent/*` rewrite on the dashboard space. Per-target polish deliberately
|
|
14
|
-
* loses to indistinguishability — instead of looking up the handoff's client
|
|
15
|
-
* target (which would need a public by-ID lookup, an oracle), the document
|
|
16
|
-
* carries a named section for every connect target and the minted prompt's
|
|
17
|
-
* "follow the <client> setup instructions" resolves to the right section.
|
|
18
|
-
*
|
|
19
|
-
* Lifecycle safety stays where the secret authenticates: an expired, used, or
|
|
20
|
-
* revoked link fails at the app-private exchange, never at fetch time (see
|
|
21
|
-
* ./agent-setup.ts, `AGENT_HANDOFF_DECLINE_REASONS`).
|
|
22
|
-
*/
|
|
23
|
-
import { buildConnectTargets } from "../agents/connect-targets.js";
|
|
24
|
-
import { BRAND } from "../brand.js";
|
|
25
|
-
import { AGENT_HANDOFF_BROWSER_APPROVAL_GUIDANCE, AGENT_HANDOFF_CLI_APPROVAL_GUIDANCE, AGENT_HANDOFF_CLI_TARGET_IDS, AGENT_HANDOFF_CREDENTIAL_HYGIENE, AGENT_HANDOFF_FETCH_SAFETY, AGENT_HANDOFF_PREAMBLE, AGENT_HANDOFF_PUBLISH_PROSE, agentHandoffConnectSections, agentSetupTextUrl, } from "./agent-setup.js";
|
|
26
|
-
const DOCUMENT_TITLE = `Set up ${BRAND.productName} from an agent handoff`;
|
|
27
|
-
const DOCUMENT_SCOPE = `This is the public setup document for ${BRAND.productName} agent handoff links (\`/agent/<id>\` on the dashboard origin). Every link serves this same document — fetching it never uses a handoff and reveals nothing about one.`;
|
|
28
|
-
const CONNECT_INTRO = "Set up the client you are running in. Each section stands on its own.";
|
|
29
|
-
/**
|
|
30
|
-
* The exact markdown body served to agents at `/agent/<documentId>`.
|
|
31
|
-
* Deterministic and ID-free on purpose — see the module comment.
|
|
32
|
-
*/
|
|
33
|
-
export function renderAgentHandoffDocumentMarkdown(input) {
|
|
34
|
-
const targets = buildConnectTargets({ mcpEndpoint: input.mcpEndpoint });
|
|
35
|
-
const cliTargetNames = targets
|
|
36
|
-
.filter((target) => AGENT_HANDOFF_CLI_TARGET_IDS.includes(target.id))
|
|
37
|
-
.map((target) => target.name);
|
|
38
|
-
const connectSections = targets.flatMap((target) => {
|
|
39
|
-
const sections = agentHandoffConnectSections(target);
|
|
40
|
-
sections.unshift(`### ${target.name}`);
|
|
41
|
-
return sections;
|
|
42
|
-
});
|
|
43
|
-
const sections = [
|
|
44
|
-
`# ${DOCUMENT_TITLE}`,
|
|
45
|
-
DOCUMENT_SCOPE,
|
|
46
|
-
AGENT_HANDOFF_PREAMBLE,
|
|
47
|
-
["## Connect", CONNECT_INTRO, ...connectSections].join("\n\n"),
|
|
48
|
-
[
|
|
49
|
-
"## Continue the approved handoff",
|
|
50
|
-
AGENT_HANDOFF_FETCH_SAFETY,
|
|
51
|
-
`From ${cliTargetNames.join(" or ")} (or any client with a shell): ${AGENT_HANDOFF_CLI_APPROVAL_GUIDANCE}`,
|
|
52
|
-
`From every other client: ${AGENT_HANDOFF_BROWSER_APPROVAL_GUIDANCE}`,
|
|
53
|
-
AGENT_HANDOFF_CREDENTIAL_HYGIENE,
|
|
54
|
-
].join("\n\n"),
|
|
55
|
-
["## Publish", AGENT_HANDOFF_PUBLISH_PROSE].join("\n\n"),
|
|
56
|
-
`General agent instructions: ${agentSetupTextUrl}`,
|
|
57
|
-
];
|
|
58
|
-
return `${sections.join("\n\n")}\n`;
|
|
59
|
-
}
|
|
60
|
-
function escapeHtml(value) {
|
|
61
|
-
return value
|
|
62
|
-
.replaceAll("&", "&")
|
|
63
|
-
.replaceAll("<", "<")
|
|
64
|
-
.replaceAll(">", ">")
|
|
65
|
-
.replaceAll('"', """);
|
|
66
|
-
}
|
|
67
|
-
function linkify(escaped) {
|
|
68
|
-
return escaped.replace(/https?:\/\/[^\s<)]+/g, (url) => `<a href="${url}" rel="noopener">${url}</a>`);
|
|
69
|
-
}
|
|
70
|
-
/** Inline markdown: backtick code spans stay literal; bare URLs become links. */
|
|
71
|
-
function renderInline(text) {
|
|
72
|
-
return text
|
|
73
|
-
.split("`")
|
|
74
|
-
.map((part, index) => index % 2 === 1 ? `<code>${escapeHtml(part)}</code>` : linkify(escapeHtml(part)))
|
|
75
|
-
.join("");
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Renders the document's own markdown grammar (headings, paragraphs, fenced
|
|
79
|
-
* code, inline code, bare URLs) to HTML. Not a general markdown engine: the
|
|
80
|
-
* input is our generated document above, so anything else stays literal text.
|
|
81
|
-
*/
|
|
82
|
-
function markdownToHtmlBody(markdown) {
|
|
83
|
-
const html = [];
|
|
84
|
-
let paragraph = [];
|
|
85
|
-
let codeBlock = null;
|
|
86
|
-
const flushParagraph = () => {
|
|
87
|
-
if (paragraph.length > 0) {
|
|
88
|
-
html.push(`<p>${paragraph.map(renderInline).join("\n")}</p>`);
|
|
89
|
-
paragraph = [];
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
for (const line of markdown.split("\n")) {
|
|
93
|
-
if (codeBlock !== null) {
|
|
94
|
-
if (line.startsWith("```")) {
|
|
95
|
-
html.push(`<pre><code>${escapeHtml(codeBlock.join("\n"))}</code></pre>`);
|
|
96
|
-
codeBlock = null;
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
codeBlock.push(line);
|
|
100
|
-
}
|
|
101
|
-
continue;
|
|
102
|
-
}
|
|
103
|
-
if (line.startsWith("```")) {
|
|
104
|
-
flushParagraph();
|
|
105
|
-
codeBlock = [];
|
|
106
|
-
continue;
|
|
107
|
-
}
|
|
108
|
-
const heading = /^(#{1,3}) (.*)$/.exec(line);
|
|
109
|
-
if (heading?.[1] && heading[2] !== undefined) {
|
|
110
|
-
flushParagraph();
|
|
111
|
-
const level = heading[1].length;
|
|
112
|
-
html.push(`<h${level}>${renderInline(heading[2])}</h${level}>`);
|
|
113
|
-
continue;
|
|
114
|
-
}
|
|
115
|
-
if (line.trim() === "") {
|
|
116
|
-
flushParagraph();
|
|
117
|
-
continue;
|
|
118
|
-
}
|
|
119
|
-
paragraph.push(line);
|
|
120
|
-
}
|
|
121
|
-
flushParagraph();
|
|
122
|
-
return html.join("\n");
|
|
123
|
-
}
|
|
124
|
-
const DOCUMENT_STYLES = `
|
|
125
|
-
:root { color-scheme: light dark; }
|
|
126
|
-
body {
|
|
127
|
-
margin: 0 auto;
|
|
128
|
-
padding: 3rem 1.25rem 5rem;
|
|
129
|
-
max-width: 42rem;
|
|
130
|
-
font: 16px/1.6 ui-sans-serif, system-ui, sans-serif;
|
|
131
|
-
background: #ffffff;
|
|
132
|
-
color: #1a1a1e;
|
|
133
|
-
}
|
|
134
|
-
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 1rem; }
|
|
135
|
-
h2 { font-size: 1.2rem; margin: 2.5rem 0 0.75rem; }
|
|
136
|
-
h3 { font-size: 1rem; margin: 2rem 0 0.5rem; }
|
|
137
|
-
p { margin: 0.75rem 0; }
|
|
138
|
-
a { color: inherit; text-underline-offset: 3px; word-break: break-word; }
|
|
139
|
-
code {
|
|
140
|
-
font: 0.875em ui-monospace, monospace;
|
|
141
|
-
background: rgba(125, 125, 135, 0.14);
|
|
142
|
-
border-radius: 4px;
|
|
143
|
-
padding: 0.1em 0.35em;
|
|
144
|
-
}
|
|
145
|
-
pre {
|
|
146
|
-
background: rgba(125, 125, 135, 0.1);
|
|
147
|
-
border: 1px solid rgba(125, 125, 135, 0.25);
|
|
148
|
-
border-radius: 8px;
|
|
149
|
-
padding: 0.875rem 1rem;
|
|
150
|
-
overflow-x: auto;
|
|
151
|
-
}
|
|
152
|
-
pre code { background: none; padding: 0; font-size: 0.8125rem; }
|
|
153
|
-
@media (prefers-color-scheme: dark) {
|
|
154
|
-
body { background: #0e0e10; color: #ececf1; }
|
|
155
|
-
}
|
|
156
|
-
`.trim();
|
|
157
|
-
/**
|
|
158
|
-
* The browser variant served at `/agent/<documentId>`: the full instructions in
|
|
159
|
-
* the initial response body, zero scripts (nothing may ever inspect or echo a
|
|
160
|
-
* handoff credential), same bytes for every ID.
|
|
161
|
-
*/
|
|
162
|
-
export function renderAgentHandoffDocumentHtml(input) {
|
|
163
|
-
const markdown = renderAgentHandoffDocumentMarkdown(input);
|
|
164
|
-
return [
|
|
165
|
-
"<!doctype html>",
|
|
166
|
-
'<html lang="en">',
|
|
167
|
-
"<head>",
|
|
168
|
-
'<meta charset="utf-8">',
|
|
169
|
-
'<meta name="viewport" content="width=device-width, initial-scale=1">',
|
|
170
|
-
'<meta name="robots" content="noindex">',
|
|
171
|
-
`<title>${escapeHtml(DOCUMENT_TITLE)}</title>`,
|
|
172
|
-
`<style>${DOCUMENT_STYLES}</style>`,
|
|
173
|
-
"</head>",
|
|
174
|
-
"<body>",
|
|
175
|
-
markdownToHtmlBody(markdown),
|
|
176
|
-
"</body>",
|
|
177
|
-
"</html>",
|
|
178
|
-
"",
|
|
179
|
-
].join("\n");
|
|
180
|
-
}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
export declare const hostedMcpEndpointUrl = "https://mcp.spacefast.com";
|
|
2
|
-
export type AgentSolutionLane = "plugin" | "hosted-mcp" | "local-mcp" | "cli" | "prompt";
|
|
3
|
-
export type AgentSolutionId = "codex" | "claude-code" | "claude-cowork" | "chatgpt" | "claude-ai" | "raycast" | "cursor" | "terminal" | "generic";
|
|
4
|
-
export type AgentSolution = {
|
|
5
|
-
aliases: readonly string[];
|
|
6
|
-
commands?: readonly string[];
|
|
7
|
-
description: string;
|
|
8
|
-
detailGuideUrl?: string;
|
|
9
|
-
guideUrl: string;
|
|
10
|
-
id: AgentSolutionId;
|
|
11
|
-
label: string;
|
|
12
|
-
lane: AgentSolutionLane;
|
|
13
|
-
setupText: string;
|
|
14
|
-
summary: string;
|
|
15
|
-
};
|
|
16
|
-
export declare const agentSolutions: readonly [{
|
|
17
|
-
readonly id: "codex";
|
|
18
|
-
readonly label: "Codex";
|
|
19
|
-
readonly aliases: readonly ["codex cli", "codex plugin", "openai codex"];
|
|
20
|
-
readonly lane: "plugin";
|
|
21
|
-
readonly summary: "Recommended: Codex plugin.";
|
|
22
|
-
readonly description: "Install the Spacefast skill/plugin so Codex can publish, update, and inspect spaces from the same setup path.";
|
|
23
|
-
readonly commands: readonly ["npx -y skills add spacefast/plugins --skill spacefast -g -a codex -y"];
|
|
24
|
-
readonly guideUrl: `${string}/for-codex`;
|
|
25
|
-
readonly detailGuideUrl: `${string}/guides/how-to-use-with-codex`;
|
|
26
|
-
readonly setupText: string;
|
|
27
|
-
}, {
|
|
28
|
-
readonly id: "claude-code";
|
|
29
|
-
readonly label: "Claude Code";
|
|
30
|
-
readonly aliases: readonly ["claude code", "claude cli"];
|
|
31
|
-
readonly lane: "plugin";
|
|
32
|
-
readonly summary: "Recommended: Claude plugin.";
|
|
33
|
-
readonly description: "Install the Spacefast Claude plugin once, then Claude Code can publish and operate spaces from the terminal.";
|
|
34
|
-
readonly commands: readonly ["claude plugin marketplace add spacefast/plugins", "claude plugin install spacefast@spacefast"];
|
|
35
|
-
readonly guideUrl: `${string}/for-claude`;
|
|
36
|
-
readonly detailGuideUrl: `${string}/guides/how-to-use-with-claude-code`;
|
|
37
|
-
readonly setupText: string;
|
|
38
|
-
}, {
|
|
39
|
-
readonly id: "claude-cowork";
|
|
40
|
-
readonly label: "Claude Cowork";
|
|
41
|
-
readonly aliases: readonly ["cowork", "claude cowork"];
|
|
42
|
-
readonly lane: "plugin";
|
|
43
|
-
readonly summary: "Recommended: Claude plugin.";
|
|
44
|
-
readonly description: "Use the Spacefast Claude plugin path so Cowork gets the same publish instructions and MCP-aware setup as Claude Code.";
|
|
45
|
-
readonly commands: readonly ["claude plugin marketplace add spacefast/plugins", "claude plugin install spacefast@spacefast"];
|
|
46
|
-
readonly guideUrl: `${string}/for-claude`;
|
|
47
|
-
readonly detailGuideUrl: `${string}/guides/how-to-use-with-claude-cowork`;
|
|
48
|
-
readonly setupText: string;
|
|
49
|
-
}, {
|
|
50
|
-
readonly id: "chatgpt";
|
|
51
|
-
readonly label: "ChatGPT";
|
|
52
|
-
readonly aliases: readonly ["chatgpt", "custom gpt", "openai apps"];
|
|
53
|
-
readonly lane: "hosted-mcp";
|
|
54
|
-
readonly summary: "Recommended: direct hosted MCP.";
|
|
55
|
-
readonly description: "Connect ChatGPT-style cloud agents to Spacefast through hosted MCP; use inline files or signed uploads instead of local paths.";
|
|
56
|
-
readonly commands: readonly ["https://mcp.spacefast.com"];
|
|
57
|
-
readonly guideUrl: `${string}/agents`;
|
|
58
|
-
readonly setupText: string;
|
|
59
|
-
}, {
|
|
60
|
-
readonly id: "claude-ai";
|
|
61
|
-
readonly label: "Claude.ai";
|
|
62
|
-
readonly aliases: readonly ["claude.ai", "claude app", "claude web"];
|
|
63
|
-
readonly lane: "hosted-mcp";
|
|
64
|
-
readonly summary: "Recommended: direct hosted MCP.";
|
|
65
|
-
readonly description: "Connect the web Claude app to Spacefast through hosted MCP when it cannot read your local checkout.";
|
|
66
|
-
readonly commands: readonly ["https://mcp.spacefast.com"];
|
|
67
|
-
readonly guideUrl: `${string}/agents`;
|
|
68
|
-
readonly setupText: string;
|
|
69
|
-
}, {
|
|
70
|
-
readonly id: "raycast";
|
|
71
|
-
readonly label: "Raycast";
|
|
72
|
-
readonly aliases: readonly ["raycast", "raycast ai"];
|
|
73
|
-
readonly lane: "hosted-mcp";
|
|
74
|
-
readonly summary: "Recommended: direct hosted MCP.";
|
|
75
|
-
readonly description: "Use hosted MCP for Raycast and similar clients that can connect to a remote MCP server but should not need a local Spacefast install.";
|
|
76
|
-
readonly commands: readonly ["https://mcp.spacefast.com"];
|
|
77
|
-
readonly guideUrl: `${string}/agents`;
|
|
78
|
-
readonly setupText: string;
|
|
79
|
-
}, {
|
|
80
|
-
readonly id: "cursor";
|
|
81
|
-
readonly label: "Cursor or MCP client";
|
|
82
|
-
readonly aliases: readonly ["cursor", "mcp client", "windsurf", "opencode"];
|
|
83
|
-
readonly lane: "local-mcp";
|
|
84
|
-
readonly summary: "Recommended: local MCP when it needs the checkout.";
|
|
85
|
-
readonly description: "Use On-Device MCP for editor agents that need local files; use hosted MCP instead when they only need cloud-safe tools.";
|
|
86
|
-
readonly commands: readonly ["sf setup agent --agent auto --connect", "sf mcp install --agent auto --mode local --transport stdio --connect"];
|
|
87
|
-
readonly guideUrl: `${string}/agents`;
|
|
88
|
-
readonly setupText: string;
|
|
89
|
-
}, {
|
|
90
|
-
readonly id: "terminal";
|
|
91
|
-
readonly label: "Terminal or CI";
|
|
92
|
-
readonly aliases: readonly ["terminal", "cli", "ci", "github actions"];
|
|
93
|
-
readonly lane: "cli";
|
|
94
|
-
readonly summary: "Recommended: Spacefast CLI.";
|
|
95
|
-
readonly description: "Use the CLI for repeat publishes, CI jobs, JSON output, rollback, logs, and domains.";
|
|
96
|
-
readonly commands: readonly [string, "sf login", "sf publish {file-or-dir} --json"];
|
|
97
|
-
readonly guideUrl: `${string}/cli`;
|
|
98
|
-
readonly setupText: string;
|
|
99
|
-
}, {
|
|
100
|
-
readonly id: "generic";
|
|
101
|
-
readonly label: "Generic agent prompt";
|
|
102
|
-
readonly aliases: readonly ["generic", "unknown", "gemini"];
|
|
103
|
-
readonly lane: "prompt";
|
|
104
|
-
readonly summary: "Recommended: generic prompt + setup contract.";
|
|
105
|
-
readonly description: "Use this when the client has no known plugin or MCP connector. The agent reads Spacefast's setup contract and picks the smallest working lane.";
|
|
106
|
-
readonly guideUrl: string;
|
|
107
|
-
readonly setupText: string;
|
|
108
|
-
}];
|
|
109
|
-
export declare function getAgentSolution(id: AgentSolutionId): AgentSolution;
|
|
110
|
-
export declare function renderAgentSolutionIndexText(solutions?: readonly AgentSolution[]): string;
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import { BRAND } from "../brand.js";
|
|
2
|
-
import { DOCS_BASE_URL, serviceOrigin } from "../config/domains.js";
|
|
3
|
-
import { agentSetupPrompt, agentSetupTextUrl, agentSetupUrl } from "./agent-setup.js";
|
|
4
|
-
import { spacefastClaudePluginAddCommand, spacefastClaudePluginInstallCommand, spacefastCodexSkillInstallCommand, spacefastInstallCurlCommand, } from "./skill-distribution.js";
|
|
5
|
-
export const hostedMcpEndpointUrl = "https://mcp.spacefast.com";
|
|
6
|
-
const WEBSITE_ORIGIN = serviceOrigin("www", "prod");
|
|
7
|
-
function pluginText(label, commands, guideUrl) {
|
|
8
|
-
return [
|
|
9
|
-
`Set up ${BRAND.productName} for ${label}.`,
|
|
10
|
-
"",
|
|
11
|
-
"Run once:",
|
|
12
|
-
...commands.map((command) => ` ${command}`),
|
|
13
|
-
"",
|
|
14
|
-
`Then ask ${label} to publish with ${BRAND.productName}.`,
|
|
15
|
-
`Guide: ${guideUrl}`,
|
|
16
|
-
`Generic agent contract: ${agentSetupUrl}`,
|
|
17
|
-
].join("\n");
|
|
18
|
-
}
|
|
19
|
-
function hostedMcpText(label, guideUrl) {
|
|
20
|
-
return [
|
|
21
|
-
`Connect ${label} to ${BRAND.productName} with hosted MCP.`,
|
|
22
|
-
"",
|
|
23
|
-
`MCP endpoint: ${hostedMcpEndpointUrl}`,
|
|
24
|
-
"Transport: Streamable HTTP",
|
|
25
|
-
"Resource: https://mcp.spacefast.com",
|
|
26
|
-
"Minimum scope: mcp:tools",
|
|
27
|
-
"Common scopes: teams:read teams:create spaces:read spaces:write spaces:rename publish:write domains:read domains:write",
|
|
28
|
-
"",
|
|
29
|
-
"Hosted MCP is for cloud/browser agents. Publish small generated files inline or use signed uploads for larger artifacts; it has no filesystem.",
|
|
30
|
-
`Guide: ${guideUrl}`,
|
|
31
|
-
`Plain-text setup contract: ${agentSetupTextUrl}`,
|
|
32
|
-
].join("\n");
|
|
33
|
-
}
|
|
34
|
-
function localMcpText(label, guideUrl) {
|
|
35
|
-
return [
|
|
36
|
-
`Set up ${BRAND.productName} for ${label} with local MCP when it needs your checkout or filesystem.`,
|
|
37
|
-
"",
|
|
38
|
-
`Install CLI: ${spacefastInstallCurlCommand}`,
|
|
39
|
-
"Configure the agent: sf setup agent --agent auto --connect",
|
|
40
|
-
"Install local stdio MCP: sf mcp install --agent auto --mode local --transport stdio --connect",
|
|
41
|
-
"Run stdio server directly: sf mcp",
|
|
42
|
-
"",
|
|
43
|
-
`Guide: ${guideUrl}`,
|
|
44
|
-
`Plain-text setup contract: ${agentSetupTextUrl}`,
|
|
45
|
-
].join("\n");
|
|
46
|
-
}
|
|
47
|
-
export const agentSolutions = [
|
|
48
|
-
{
|
|
49
|
-
id: "codex",
|
|
50
|
-
label: "Codex",
|
|
51
|
-
aliases: ["codex cli", "codex plugin", "openai codex"],
|
|
52
|
-
lane: "plugin",
|
|
53
|
-
summary: "Recommended: Codex plugin.",
|
|
54
|
-
description: `Install the ${BRAND.productName} skill/plugin so Codex can publish, update, and inspect spaces from the same setup path.`,
|
|
55
|
-
commands: [spacefastCodexSkillInstallCommand],
|
|
56
|
-
guideUrl: `${WEBSITE_ORIGIN}/for-codex`,
|
|
57
|
-
detailGuideUrl: `${WEBSITE_ORIGIN}/guides/how-to-use-with-codex`,
|
|
58
|
-
setupText: pluginText("Codex", [spacefastCodexSkillInstallCommand], `${WEBSITE_ORIGIN}/for-codex`),
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
id: "claude-code",
|
|
62
|
-
label: "Claude Code",
|
|
63
|
-
aliases: ["claude code", "claude cli"],
|
|
64
|
-
lane: "plugin",
|
|
65
|
-
summary: "Recommended: Claude plugin.",
|
|
66
|
-
description: `Install the ${BRAND.productName} Claude plugin once, then Claude Code can publish and operate spaces from the terminal.`,
|
|
67
|
-
commands: [spacefastClaudePluginAddCommand, spacefastClaudePluginInstallCommand],
|
|
68
|
-
guideUrl: `${WEBSITE_ORIGIN}/for-claude`,
|
|
69
|
-
detailGuideUrl: `${WEBSITE_ORIGIN}/guides/how-to-use-with-claude-code`,
|
|
70
|
-
setupText: pluginText("Claude Code", [spacefastClaudePluginAddCommand, spacefastClaudePluginInstallCommand], `${WEBSITE_ORIGIN}/guides/how-to-use-with-claude-code`),
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
id: "claude-cowork",
|
|
74
|
-
label: "Claude Cowork",
|
|
75
|
-
aliases: ["cowork", "claude cowork"],
|
|
76
|
-
lane: "plugin",
|
|
77
|
-
summary: "Recommended: Claude plugin.",
|
|
78
|
-
description: `Use the ${BRAND.productName} Claude plugin path so Cowork gets the same publish instructions and MCP-aware setup as Claude Code.`,
|
|
79
|
-
commands: [spacefastClaudePluginAddCommand, spacefastClaudePluginInstallCommand],
|
|
80
|
-
guideUrl: `${WEBSITE_ORIGIN}/for-claude`,
|
|
81
|
-
detailGuideUrl: `${WEBSITE_ORIGIN}/guides/how-to-use-with-claude-cowork`,
|
|
82
|
-
setupText: pluginText("Claude Cowork", [spacefastClaudePluginAddCommand, spacefastClaudePluginInstallCommand, agentSetupPrompt], `${WEBSITE_ORIGIN}/guides/how-to-use-with-claude-cowork`),
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
id: "chatgpt",
|
|
86
|
-
label: "ChatGPT",
|
|
87
|
-
aliases: ["chatgpt", "custom gpt", "openai apps"],
|
|
88
|
-
lane: "hosted-mcp",
|
|
89
|
-
summary: "Recommended: direct hosted MCP.",
|
|
90
|
-
description: `Connect ChatGPT-style cloud agents to ${BRAND.productName} through hosted MCP; use inline files or signed uploads instead of local paths.`,
|
|
91
|
-
commands: [hostedMcpEndpointUrl],
|
|
92
|
-
guideUrl: `${DOCS_BASE_URL}/agents`,
|
|
93
|
-
setupText: hostedMcpText("ChatGPT", `${DOCS_BASE_URL}/agents`),
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
id: "claude-ai",
|
|
97
|
-
label: "Claude.ai",
|
|
98
|
-
aliases: ["claude.ai", "claude app", "claude web"],
|
|
99
|
-
lane: "hosted-mcp",
|
|
100
|
-
summary: "Recommended: direct hosted MCP.",
|
|
101
|
-
description: `Connect the web Claude app to ${BRAND.productName} through hosted MCP when it cannot read your local checkout.`,
|
|
102
|
-
commands: [hostedMcpEndpointUrl],
|
|
103
|
-
guideUrl: `${DOCS_BASE_URL}/agents`,
|
|
104
|
-
setupText: hostedMcpText("Claude.ai", `${DOCS_BASE_URL}/agents`),
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
id: "raycast",
|
|
108
|
-
label: "Raycast",
|
|
109
|
-
aliases: ["raycast", "raycast ai"],
|
|
110
|
-
lane: "hosted-mcp",
|
|
111
|
-
summary: "Recommended: direct hosted MCP.",
|
|
112
|
-
description: `Use hosted MCP for Raycast and similar clients that can connect to a remote MCP server but should not need a local ${BRAND.productName} install.`,
|
|
113
|
-
commands: [hostedMcpEndpointUrl],
|
|
114
|
-
guideUrl: `${DOCS_BASE_URL}/agents`,
|
|
115
|
-
setupText: hostedMcpText("Raycast", `${DOCS_BASE_URL}/agents`),
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
id: "cursor",
|
|
119
|
-
label: "Cursor or MCP client",
|
|
120
|
-
aliases: ["cursor", "mcp client", "windsurf", "opencode"],
|
|
121
|
-
lane: "local-mcp",
|
|
122
|
-
summary: "Recommended: local MCP when it needs the checkout.",
|
|
123
|
-
description: `Use On-Device MCP for editor agents that need local files; use hosted MCP instead when they only need cloud-safe tools.`,
|
|
124
|
-
commands: [
|
|
125
|
-
"sf setup agent --agent auto --connect",
|
|
126
|
-
"sf mcp install --agent auto --mode local --transport stdio --connect",
|
|
127
|
-
],
|
|
128
|
-
guideUrl: `${DOCS_BASE_URL}/agents`,
|
|
129
|
-
setupText: localMcpText("Cursor or another MCP client", `${DOCS_BASE_URL}/agents`),
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
id: "terminal",
|
|
133
|
-
label: "Terminal or CI",
|
|
134
|
-
aliases: ["terminal", "cli", "ci", "github actions"],
|
|
135
|
-
lane: "cli",
|
|
136
|
-
summary: `Recommended: ${BRAND.productName} CLI.`,
|
|
137
|
-
description: "Use the CLI for repeat publishes, CI jobs, JSON output, rollback, logs, and domains.",
|
|
138
|
-
commands: [spacefastInstallCurlCommand, "sf login", "sf publish {file-or-dir} --json"],
|
|
139
|
-
guideUrl: `${DOCS_BASE_URL}/cli`,
|
|
140
|
-
setupText: [
|
|
141
|
-
`Install CLI: ${spacefastInstallCurlCommand}`,
|
|
142
|
-
"Login: sf login",
|
|
143
|
-
"Publish: sf publish {file-or-dir} --json",
|
|
144
|
-
`Guide: ${DOCS_BASE_URL}/cli`,
|
|
145
|
-
].join("\n"),
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
id: "generic",
|
|
149
|
-
label: "Generic agent prompt",
|
|
150
|
-
aliases: ["generic", "unknown", "gemini"],
|
|
151
|
-
lane: "prompt",
|
|
152
|
-
summary: "Recommended: generic prompt + setup contract.",
|
|
153
|
-
description: `Use this when the client has no known plugin or MCP connector. The agent reads ${BRAND.productName}'s setup contract and picks the smallest working lane.`,
|
|
154
|
-
guideUrl: agentSetupUrl,
|
|
155
|
-
setupText: agentSetupPrompt,
|
|
156
|
-
},
|
|
157
|
-
];
|
|
158
|
-
export function getAgentSolution(id) {
|
|
159
|
-
const solution = agentSolutions.find((entry) => entry.id === id);
|
|
160
|
-
if (!solution)
|
|
161
|
-
throw new Error(`Unknown agent solution: ${id}`);
|
|
162
|
-
return solution;
|
|
163
|
-
}
|
|
164
|
-
export function renderAgentSolutionIndexText(solutions = agentSolutions) {
|
|
165
|
-
return [
|
|
166
|
-
`# ${BRAND.productName} agent setup options`,
|
|
167
|
-
"",
|
|
168
|
-
...solutions.flatMap((solution) => [
|
|
169
|
-
`## ${solution.label}`,
|
|
170
|
-
"",
|
|
171
|
-
`Recommended lane: ${solution.lane}`,
|
|
172
|
-
solution.summary,
|
|
173
|
-
solution.description,
|
|
174
|
-
"",
|
|
175
|
-
`Guide: ${solution.guideUrl}`,
|
|
176
|
-
solution.detailGuideUrl ? `Detailed guide: ${solution.detailGuideUrl}` : null,
|
|
177
|
-
"",
|
|
178
|
-
"Setup:",
|
|
179
|
-
solution.setupText,
|
|
180
|
-
"",
|
|
181
|
-
].filter((line) => Boolean(line))),
|
|
182
|
-
].join("\n");
|
|
183
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
export declare const qk: {
|
|
2
|
-
session: () => readonly ["session"];
|
|
3
|
-
authCapabilities: () => readonly ["auth", "capabilities"];
|
|
4
|
-
accountSessions: () => readonly ["account", "sessions"];
|
|
5
|
-
accountConnections: () => readonly ["account", "connections"];
|
|
6
|
-
accountInvitations: () => readonly ["account", "invitations"];
|
|
7
|
-
apiTokens: (teamId?: string) => readonly ["api-tokens"] | readonly ["api-tokens", string];
|
|
8
|
-
agentAccounts: (teamId: string) => readonly ["agent-accounts", string];
|
|
9
|
-
mcpDashboard: (teamId: string) => readonly ["mcp", "dashboard", string];
|
|
10
|
-
teams: () => readonly ["teams", "list"];
|
|
11
|
-
team: (ref: string) => readonly ["teams", "by-ref", string];
|
|
12
|
-
teamDetail: (id: string) => readonly ["teams", string, "detail"];
|
|
13
|
-
teamMembers: (id: string) => readonly ["teams", string, "members"];
|
|
14
|
-
teamInvites: (id: string) => readonly ["teams", string, "invites"];
|
|
15
|
-
teamBilling: (id: string) => readonly ["teams", string, "billing"];
|
|
16
|
-
teamUsage: (id: string) => readonly ["teams", string, "usage"];
|
|
17
|
-
teamEntitlements: (id: string) => readonly ["teams", string, "entitlements"];
|
|
18
|
-
teamFeatures: (id: string) => readonly ["teams", string, "features"];
|
|
19
|
-
teamSettings: (id: string) => readonly ["teams", string, "settings"];
|
|
20
|
-
teamSpaces: (id: string) => readonly ["teams", string, "spaces"];
|
|
21
|
-
teamDomains: (id: string) => readonly ["teams", string, "domains"];
|
|
22
|
-
teamManagedDomains: (id: string) => readonly ["teams", string, "managed-domains"];
|
|
23
|
-
slugAvailability: (kind: "team" | "space", slug: string, teamId?: string, currentSlug?: string) => readonly ["slugs", "availability", "space" | "team", string, string, string];
|
|
24
|
-
teamVariables: (id: string) => readonly ["teams", string, "variables"];
|
|
25
|
-
teamActivity: (id: string, limit: number) => readonly ["teams", string, "activity", number];
|
|
26
|
-
space: (id: string) => readonly ["spaces", string];
|
|
27
|
-
spaceByRef: (teamRef: string, spaceRef: string) => readonly ["spaces", "by-ref", string, string];
|
|
28
|
-
spaceVersions: (id: string) => readonly ["spaces", string, "versions"];
|
|
29
|
-
spaceVersionsHistory: (id: string) => readonly ["spaces", string, "versions", "history"];
|
|
30
|
-
spaceCollaboration: (id: string) => readonly ["spaces", string, "collaboration"];
|
|
31
|
-
spaceComments: (id: string) => readonly ["spaces", string, "comments"];
|
|
32
|
-
spaceCommentThread: (id: string, threadId: string) => readonly ["spaces", string, "comments", string];
|
|
33
|
-
spaceActivity: (id: string, limit: number) => readonly ["spaces", string, "activity", number];
|
|
34
|
-
spaceTags: (id: string) => readonly ["spaces", string, "tags"];
|
|
35
|
-
spaceTagVersion: (id: string, versionId: string) => readonly ["spaces", string, "tags", string];
|
|
36
|
-
spaceTagDiff: (id: string, versionId: string) => readonly ["spaces", string, "tags", string, "diff"];
|
|
37
|
-
spaceTagReleases: (id: string) => readonly ["spaces", string, "tags", "releases"];
|
|
38
|
-
spaceTagsEffective: (id: string) => readonly ["spaces", string, "tags", "effective"];
|
|
39
|
-
build: (spaceId: string, id: string) => readonly ["spaces", string, "builds", string];
|
|
40
|
-
buildLogs: (spaceId: string, id: string, limit?: number) => readonly ["spaces", string, "builds", string, "logs"] | readonly ["spaces", string, "builds", string, "logs", number];
|
|
41
|
-
spaceBuilds: (id: string) => readonly ["spaces", string, "builds"];
|
|
42
|
-
spaceRepositoryConnection: (id: string, connectionType?: string) => readonly ["spaces", string, "repository-connection", string];
|
|
43
|
-
repositoryInstallations: (spaceId: string) => readonly ["spaces", string, "repository-installations"];
|
|
44
|
-
repositoryInstallationRepositories: (spaceId: string, installationId: string) => readonly ["spaces", string, "repository-installations", string, "repositories"];
|
|
45
|
-
spaceRepositoryAnalyze: (id: string, connectionType?: string, ref?: string, root?: string) => readonly ["spaces", string, "repository-connection", string, "analyze", string, string];
|
|
46
|
-
spaceRepositoryWebhookDeliveries: (id: string, connectionType?: string) => readonly ["spaces", string, "repository-webhook-deliveries", string];
|
|
47
|
-
teamWebhooks: (teamId: string) => readonly ["teams", string, "webhooks"];
|
|
48
|
-
webhook: (webhookId: string) => readonly ["webhooks", string];
|
|
49
|
-
webhookDeliveries: (webhookId: string) => readonly ["webhooks", string, "deliveries"];
|
|
50
|
-
spaceVersion: (id: string, versionId: string) => readonly ["spaces", string, "versions", string];
|
|
51
|
-
spaceVersionComments: (id: string, versionId: string, status?: string) => readonly ["spaces", string, "versions", string, "comments"] | readonly ["spaces", string, "versions", string, "comments", string];
|
|
52
|
-
spaceVersionFiles: (id: string, versionId: string) => readonly ["spaces", string, "versions", string, "files"];
|
|
53
|
-
spaceVersionFile: (id: string, versionId: string, path: string) => readonly ["spaces", string, "versions", string, "files", string];
|
|
54
|
-
spaceVersionFileUrlPreview: (id: string, versionId: string, path: string) => readonly ["spaces", string, "versions", string, "files", string, "url-preview"];
|
|
55
|
-
spaceVersionFileDiff: (id: string, versionId: string, baseVersionId?: string) => readonly ["spaces", string, "versions", string, "files", "diff", string];
|
|
56
|
-
spaceVersionConventionArtifacts: (id: string, versionId: string) => readonly ["spaces", string, "versions", string, "convention-artifacts"];
|
|
57
|
-
spaceVersionConventionArtifact: (id: string, versionId: string, kind: "redirects" | "headers") => readonly ["spaces", string, "versions", string, "convention-artifacts", "headers" | "redirects"];
|
|
58
|
-
spaceVersionRoutingSummary: (id: string, versionId: string) => readonly ["spaces", string, "versions", string, "routing-summary"];
|
|
59
|
-
spaceDiagnostics: (id: string) => readonly ["spaces", string, "diagnostics"];
|
|
60
|
-
spaceDomains: (id: string) => readonly ["spaces", string, "domains"];
|
|
61
|
-
spaceRuntimeStatus: (id: string) => readonly ["spaces", string, "runtime"];
|
|
62
|
-
spaceApplyState: (id: string) => readonly ["spaces", string, "apply-state"];
|
|
63
|
-
spaceDatabase: (id: string) => readonly ["spaces", string, "db"];
|
|
64
|
-
spaceDatabaseDump: (id: string, table: string | undefined, limit: number) => readonly ["spaces", string, "db", "dump", string, number];
|
|
65
|
-
spaceStorage: (id: string) => readonly ["spaces", string, "storage"];
|
|
66
|
-
spaceRuntimeLogs: (id: string, limit: number) => readonly ["spaces", string, "logs", "runtime", number];
|
|
67
|
-
spaceRuntimeRealtimeEvents: (id: string, limit: number) => readonly ["spaces", string, "runtime", "realtime", "events", number];
|
|
68
|
-
spaceVariables: (id: string) => readonly ["spaces", string, "variables"];
|
|
69
|
-
spaceCertificates: (id: string) => readonly ["spaces", string, "runtime", "certificates"];
|
|
70
|
-
spaceLogs: (id: string, kind: "build" | "access" | "runtime") => readonly ["spaces", string, "logs", "build" | "access" | "runtime"];
|
|
71
|
-
spaceAnalytics: (id: string, window: string) => readonly ["spaces", string, "analytics", string];
|
|
72
|
-
teamAgentHandoffs: (teamId: string) => readonly ["teams", string, "agent-handoffs"];
|
|
73
|
-
teamAccessDefaults: (teamId: string) => readonly ["teams", string, "access", "defaults"];
|
|
74
|
-
domain: (teamId: string, ref: string) => readonly ["teams", string, "domains", string];
|
|
75
|
-
domainDiagnostics: (teamId: string, domainId: string) => readonly ["teams", string, "domains", string, "diagnostics"];
|
|
76
|
-
domainDnsCapabilities: (domainId: string) => readonly ["domains", string, "dns", "capabilities"];
|
|
77
|
-
domainDnsRecords: (domainId: string) => readonly ["domains", string, "dns", "records"];
|
|
78
|
-
domainDnsOperations: (domainId: string) => readonly ["domains", string, "dns", "operations"];
|
|
79
|
-
domainActions: (domainId: string) => readonly ["domains", string, "actions"];
|
|
80
|
-
domainProviderConnections: (teamId: string) => readonly ["domains", "provider-connections", string];
|
|
81
|
-
notifications: () => readonly ["notifications"];
|
|
82
|
-
notificationsList: (unreadOnly: boolean) => readonly ["notifications", "list", boolean];
|
|
83
|
-
notificationsUnreadCount: () => readonly ["notifications", "unread-count"];
|
|
84
|
-
};
|