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