@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,15 +1,12 @@
|
|
|
1
|
+
import { INTERNAL_REDIRECT_RESPONSE_HEADERS, PLATFORM_MANAGED_RESPONSE_HEADER_PREFIXES, PLATFORM_MANAGED_RESPONSE_HEADERS } from "./static-runtime-policy.generated.js";
|
|
2
|
+
export { INTERNAL_REDIRECT_RESPONSE_HEADERS, PLATFORM_MANAGED_RESPONSE_HEADER_PREFIXES, PLATFORM_MANAGED_RESPONSE_HEADERS, };
|
|
1
3
|
export declare const PHP_LIKE_EXTENSIONS: string[];
|
|
2
|
-
export declare const INTERNAL_REDIRECT_RESPONSE_HEADERS: string[];
|
|
3
|
-
export declare const PLATFORM_MANAGED_RESPONSE_HEADERS: string[];
|
|
4
|
-
/** Reserved response-header namespaces owned by the platform's own serving signature. */
|
|
5
|
-
export declare const PLATFORM_MANAGED_RESPONSE_HEADER_PREFIXES: string[];
|
|
6
4
|
/** True when user rules may neither set nor remove this response header. */
|
|
7
5
|
export declare function isPlatformManagedResponseHeader(name: string): boolean;
|
|
8
6
|
/**
|
|
9
|
-
* The token grammar a `_headers` rule accepts for a header NAME.
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* generated rule can never fail the author's publish.
|
|
7
|
+
* The token grammar a `_headers` rule accepts for a header NAME. Anything that
|
|
8
|
+
* GENERATES `_headers` rules must gate on it too, so a generated rule can
|
|
9
|
+
* never fail the author's publish.
|
|
13
10
|
*/
|
|
14
11
|
export declare const HEADER_RULE_NAME_PATTERN: RegExp;
|
|
15
12
|
/** `content-type` → `Content-Type`: the casing compiled rules and generated `_headers` carry. */
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Reserved response-header namespaces carrying the platform's own serving signature. */
|
|
2
|
+
export declare const PLATFORM_MANAGED_RESPONSE_HEADER_PREFIXES: readonly string[];
|
|
3
|
+
/**
|
|
4
|
+
* The internal-redirect/sendfile family, every vendor spelling: headers that make the web
|
|
5
|
+
* server produce a different response instead of describing this one. Factored out of the
|
|
6
|
+
* managed set below so the proxy relay can drop exactly these from an untrusted upstream
|
|
7
|
+
* while still relaying ordinary response headers the managed set also lists.
|
|
8
|
+
*/
|
|
9
|
+
export declare const INTERNAL_REDIRECT_RESPONSE_HEADERS: readonly string[];
|
|
10
|
+
/**
|
|
11
|
+
* Rejected/platform-managed response headers: user `_headers` rules can never set or remove
|
|
12
|
+
* these. The internal-redirect family above is a strict subset — anything the proxy lane
|
|
13
|
+
* refuses to relay is also refused from `_headers`. Ask isPlatformManagedResponseHeader(),
|
|
14
|
+
* not this list alone: the reserved prefixes are the other half of the policy.
|
|
15
|
+
*/
|
|
16
|
+
export declare const PLATFORM_MANAGED_RESPONSE_HEADERS: readonly string[];
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// @generated by `cargo run -p stattic-runtime-compiler --bin protocol-codegen -- --policy-ts`.
|
|
2
|
+
// `crates/stattic-runtime-policy/src/lib.rs` is the only editable authority.
|
|
3
|
+
/** Reserved response-header namespaces carrying the platform's own serving signature. */
|
|
4
|
+
export const PLATFORM_MANAGED_RESPONSE_HEADER_PREFIXES = [
|
|
5
|
+
"x-spacefast-",
|
|
6
|
+
"x-stattic-",
|
|
7
|
+
];
|
|
8
|
+
/**
|
|
9
|
+
* The internal-redirect/sendfile family, every vendor spelling: headers that make the web
|
|
10
|
+
* server produce a different response instead of describing this one. Factored out of the
|
|
11
|
+
* managed set below so the proxy relay can drop exactly these from an untrusted upstream
|
|
12
|
+
* while still relaying ordinary response headers the managed set also lists.
|
|
13
|
+
*/
|
|
14
|
+
export const INTERNAL_REDIRECT_RESPONSE_HEADERS = [
|
|
15
|
+
"x-accel-buffering",
|
|
16
|
+
"x-accel-charset",
|
|
17
|
+
"x-accel-expires",
|
|
18
|
+
"x-accel-limit-rate",
|
|
19
|
+
"x-accel-redirect",
|
|
20
|
+
"x-lighttpd-send-file",
|
|
21
|
+
"x-lighttpd-sendfile",
|
|
22
|
+
"x-lighttpd-sendfile2",
|
|
23
|
+
"x-reproxy-url",
|
|
24
|
+
"x-sendfile",
|
|
25
|
+
];
|
|
26
|
+
/**
|
|
27
|
+
* Rejected/platform-managed response headers: user `_headers` rules can never set or remove
|
|
28
|
+
* these. The internal-redirect family above is a strict subset — anything the proxy lane
|
|
29
|
+
* refuses to relay is also refused from `_headers`. Ask isPlatformManagedResponseHeader(),
|
|
30
|
+
* not this list alone: the reserved prefixes are the other half of the policy.
|
|
31
|
+
*/
|
|
32
|
+
export const PLATFORM_MANAGED_RESPONSE_HEADERS = [
|
|
33
|
+
"accept-ranges",
|
|
34
|
+
"age",
|
|
35
|
+
"allow",
|
|
36
|
+
"alt-svc",
|
|
37
|
+
"cdn-cache-control",
|
|
38
|
+
"cloudflare-cdn-cache-control",
|
|
39
|
+
"connection",
|
|
40
|
+
"content-encoding",
|
|
41
|
+
"content-length",
|
|
42
|
+
"content-range",
|
|
43
|
+
"cookie",
|
|
44
|
+
"date",
|
|
45
|
+
"host",
|
|
46
|
+
"keep-alive",
|
|
47
|
+
"location",
|
|
48
|
+
"netlify-cdn-cache-control",
|
|
49
|
+
"proxy-authenticate",
|
|
50
|
+
"proxy-authorization",
|
|
51
|
+
"server",
|
|
52
|
+
"set-cookie",
|
|
53
|
+
"strict-transport-security",
|
|
54
|
+
"surrogate-control",
|
|
55
|
+
"te",
|
|
56
|
+
"trailer",
|
|
57
|
+
"transfer-encoding",
|
|
58
|
+
"upgrade",
|
|
59
|
+
"vary",
|
|
60
|
+
"x-accel-buffering",
|
|
61
|
+
"x-accel-charset",
|
|
62
|
+
"x-accel-expires",
|
|
63
|
+
"x-accel-limit-rate",
|
|
64
|
+
"x-accel-redirect",
|
|
65
|
+
"x-lighttpd-send-file",
|
|
66
|
+
"x-lighttpd-sendfile",
|
|
67
|
+
"x-lighttpd-sendfile2",
|
|
68
|
+
"x-reproxy-url",
|
|
69
|
+
"x-sendfile",
|
|
70
|
+
];
|
|
@@ -1,85 +1,21 @@
|
|
|
1
1
|
// Single source of truth for static-runtime content policy: PHP-like inert
|
|
2
2
|
// classification and safe content-type forcing.
|
|
3
3
|
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
// (static-runtime-policy.fixtures.json). Do not add platform/filesystem
|
|
4
|
+
// Pure by design (no node:path, no I/O) so the same rules can be code-generated
|
|
5
|
+
// into the PHP runtime and exercised against one shared fixture
|
|
6
|
+
// (static-runtime-policy.fixtures.json). Do not add platform or filesystem
|
|
8
7
|
// behavior here.
|
|
9
|
-
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
// read of an arbitrary internal path — a private-path disclosure primitive — while
|
|
14
|
-
// X-Accel-Limit-Rate pins the serving worker for the length of the transfer.
|
|
15
|
-
//
|
|
16
|
-
// These are dangerous from ANY origin we do not control, so this family is factored out
|
|
17
|
-
// of the platform-managed list below: a relay lane (runtime/engine/runtime/proxy.php)
|
|
18
|
-
// must drop exactly this set from an untrusted upstream while still relaying the
|
|
19
|
-
// ordinary response headers (location, content-encoding, content-range, allow) that the
|
|
20
|
-
// rest of the managed list contains.
|
|
21
|
-
export const INTERNAL_REDIRECT_RESPONSE_HEADERS = [
|
|
22
|
-
"x-accel-buffering",
|
|
23
|
-
"x-accel-charset",
|
|
24
|
-
"x-accel-expires",
|
|
25
|
-
"x-accel-limit-rate",
|
|
26
|
-
"x-accel-redirect",
|
|
27
|
-
"x-lighttpd-send-file",
|
|
28
|
-
"x-lighttpd-sendfile",
|
|
29
|
-
"x-lighttpd-sendfile2",
|
|
30
|
-
"x-reproxy-url",
|
|
31
|
-
"x-sendfile",
|
|
32
|
-
];
|
|
33
|
-
// Rejected/platform-managed response headers (the platform spec "Routing And
|
|
34
|
-
// Headers"): user `_headers` rules can never set or remove these. The
|
|
35
|
-
// internal-redirect/sendfile family above is spread in, so it stays a strict subset —
|
|
36
|
-
// anything the proxy lane refuses to relay is also refused from `_headers`. The rest is
|
|
37
|
-
// the connection and transport surface: hop-by-hop names (Connection, Keep-Alive, TE,
|
|
38
|
-
// Trailer, Transfer-Encoding, Upgrade, Proxy-*), framing, and the edge-cache trio.
|
|
8
|
+
// The platform-managed response-header policy is authored in Rust
|
|
9
|
+
// (crates/stattic-runtime-policy) and generated into the .generated.ts beside
|
|
10
|
+
// this file and into runtime/engine/shared/safety.php, so every managed header
|
|
11
|
+
// name is written down exactly once.
|
|
39
12
|
//
|
|
40
|
-
//
|
|
41
|
-
// `
|
|
42
|
-
//
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
// @spacefast/routing imports it directly, the PHP runtime maps and prefixes are
|
|
47
|
-
// generated from it into runtime/engine/shared/safety.php, and the Rust authorities
|
|
48
|
-
// (crates/stattic-runtime-core policy.rs, crates/stattic-zero-runner
|
|
49
|
-
// response_headers.rs) are drift-guarded against it by
|
|
50
|
-
// apps/control-plane/src/runtime/php-policy-parity.test.ts.
|
|
51
|
-
export const PLATFORM_MANAGED_RESPONSE_HEADERS = [
|
|
52
|
-
"accept-ranges",
|
|
53
|
-
"age",
|
|
54
|
-
"allow",
|
|
55
|
-
"alt-svc",
|
|
56
|
-
"cdn-cache-control",
|
|
57
|
-
"cloudflare-cdn-cache-control",
|
|
58
|
-
"connection",
|
|
59
|
-
"content-encoding",
|
|
60
|
-
"content-length",
|
|
61
|
-
"content-range",
|
|
62
|
-
"cookie",
|
|
63
|
-
"date",
|
|
64
|
-
"host",
|
|
65
|
-
"keep-alive",
|
|
66
|
-
"location",
|
|
67
|
-
"netlify-cdn-cache-control",
|
|
68
|
-
"proxy-authenticate",
|
|
69
|
-
"proxy-authorization",
|
|
70
|
-
"server",
|
|
71
|
-
"set-cookie",
|
|
72
|
-
"strict-transport-security",
|
|
73
|
-
"surrogate-control",
|
|
74
|
-
"te",
|
|
75
|
-
"trailer",
|
|
76
|
-
"transfer-encoding",
|
|
77
|
-
"upgrade",
|
|
78
|
-
"vary",
|
|
79
|
-
...INTERNAL_REDIRECT_RESPONSE_HEADERS,
|
|
80
|
-
];
|
|
81
|
-
/** Reserved response-header namespaces owned by the platform's own serving signature. */
|
|
82
|
-
export const PLATFORM_MANAGED_RESPONSE_HEADER_PREFIXES = ["x-spacefast-", "x-stattic-"];
|
|
13
|
+
// To change it: edit the Rust crate, run
|
|
14
|
+
// `bun scripts/check-finalizer-protocol.mjs --write`, then
|
|
15
|
+
// `bun --filter @spacefast/control-plane runtime:codegen-policy`.
|
|
16
|
+
import { INTERNAL_REDIRECT_RESPONSE_HEADERS, PLATFORM_MANAGED_RESPONSE_HEADER_PREFIXES, PLATFORM_MANAGED_RESPONSE_HEADERS, } from "./static-runtime-policy.generated.js";
|
|
17
|
+
export { INTERNAL_REDIRECT_RESPONSE_HEADERS, PLATFORM_MANAGED_RESPONSE_HEADER_PREFIXES, PLATFORM_MANAGED_RESPONSE_HEADERS, };
|
|
18
|
+
export const PHP_LIKE_EXTENSIONS = ["php", "php3", "php4", "php5", "php7", "php8", "phtml", "phar"];
|
|
83
19
|
const PLATFORM_MANAGED_RESPONSE_HEADER_SET = new Set(PLATFORM_MANAGED_RESPONSE_HEADERS);
|
|
84
20
|
/** True when user rules may neither set nor remove this response header. */
|
|
85
21
|
export function isPlatformManagedResponseHeader(name) {
|
|
@@ -88,10 +24,9 @@ export function isPlatformManagedResponseHeader(name) {
|
|
|
88
24
|
PLATFORM_MANAGED_RESPONSE_HEADER_PREFIXES.some((prefix) => lower.startsWith(prefix)));
|
|
89
25
|
}
|
|
90
26
|
/**
|
|
91
|
-
* The token grammar a `_headers` rule accepts for a header NAME.
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
* generated rule can never fail the author's publish.
|
|
27
|
+
* The token grammar a `_headers` rule accepts for a header NAME. Anything that
|
|
28
|
+
* GENERATES `_headers` rules must gate on it too, so a generated rule can
|
|
29
|
+
* never fail the author's publish.
|
|
95
30
|
*/
|
|
96
31
|
export const HEADER_RULE_NAME_PATTERN = /^[A-Za-z0-9-]+$/;
|
|
97
32
|
/** `content-type` → `Content-Type`: the casing compiled rules and generated `_headers` carry. */
|
|
@@ -105,9 +40,7 @@ export function canonicalHeaderName(input) {
|
|
|
105
40
|
}
|
|
106
41
|
const PHP_LIKE_EXTENSION_SET = new Set(PHP_LIKE_EXTENSIONS);
|
|
107
42
|
// Immutable-asset detection is NOT decided here: `compiled_cache_class` in
|
|
108
|
-
// crates/stattic-runtime-core (responses.rs) is the one implementation
|
|
109
|
-
// finalize. A TS re-implementation lived here once, drifted from the
|
|
110
|
-
// enforcer, and was deleted rather than re-synced.
|
|
43
|
+
// crates/stattic-runtime-core (responses.rs) is the one implementation.
|
|
111
44
|
function lastSegment(filePath) {
|
|
112
45
|
const slash = filePath.lastIndexOf("/");
|
|
113
46
|
return slash >= 0 ? filePath.slice(slash + 1) : filePath;
|
|
@@ -156,8 +156,7 @@ function storageHttpDateTimestamp(weekday, day, month, year, hour, minute, secon
|
|
|
156
156
|
return date.getTime() + (second === 60 ? 1_000 : 0);
|
|
157
157
|
}
|
|
158
158
|
// HTTP-date has exactly three accepted wire forms (RFC 9110 §5.6.7). General
|
|
159
|
-
// date parsers also accept
|
|
160
|
-
// validators must parse the grammar and validate its calendar components.
|
|
159
|
+
// date parsers also accept `tomorrow`, so this parses the grammar itself.
|
|
161
160
|
export function storageParseHttpDate(value) {
|
|
162
161
|
const input = value.trim();
|
|
163
162
|
let match = /^(Sun|Mon|Tue|Wed|Thu|Fri|Sat), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{2}):(\d{2}):(\d{2}) GMT$/.exec(input);
|
|
@@ -58,24 +58,18 @@ function parseUploadTargetServerError(raw) {
|
|
|
58
58
|
...(requestId ? { requestId } : {}),
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
// Manifest paging policy
|
|
62
|
-
// and the control plane's inline uploader).
|
|
61
|
+
// Manifest paging policy, shared by every uploader.
|
|
63
62
|
//
|
|
64
|
-
// `targets` is
|
|
65
|
-
//
|
|
66
|
-
//
|
|
67
|
-
//
|
|
68
|
-
//
|
|
69
|
-
// ask for — don't re-resume to double-check the uploads, since the runtime
|
|
70
|
-
// verifies size and sha256 on every PUT and finalize independently enumerates
|
|
71
|
-
// anything still missing.
|
|
63
|
+
// `targets` is one instruction page; `summary.upload` counts the whole
|
|
64
|
+
// manifest. A short page means a remainder only `resume` hands out, and an
|
|
65
|
+
// uploader that stops there finalizes a version the runtime rejects with
|
|
66
|
+
// `version_upload_incomplete`. Don't re-resume a complete page: finalize
|
|
67
|
+
// enumerates anything still missing.
|
|
72
68
|
export function uploadPageHasRemainder(page) {
|
|
73
69
|
return page.summary.upload > page.targets.length;
|
|
74
70
|
}
|
|
75
|
-
//
|
|
76
|
-
//
|
|
77
|
-
// one is a session that is not draining; retry it a bounded number of times,
|
|
78
|
-
// then fail loudly rather than page forever.
|
|
71
|
+
// An active session always hands back different work. A page that repeats
|
|
72
|
+
// the previous one is not draining, so retry boundedly rather than page forever.
|
|
79
73
|
export const UPLOAD_STALLED_RESUME_MAX_ATTEMPTS = 3;
|
|
80
74
|
export function uploadQueueAdvanced(before, after) {
|
|
81
75
|
if (!after || after.targets.length === 0) {
|
|
@@ -1,19 +1,14 @@
|
|
|
1
|
-
// Canonical object-path form (
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
// keys all mean. The PHP runtime applies the same transform (rawurldecode once
|
|
5
|
-
// + Normalizer::normalize) at upload and serve time.
|
|
1
|
+
// Canonical object-path form (spec "Upload Contract"): UTF-8, Unicode NFC,
|
|
2
|
+
// percent-decoded exactly once. Manifest paths, route-map keys and dedup keys
|
|
3
|
+
// all mean this form. The PHP runtime applies the same transform.
|
|
6
4
|
// oxlint-disable-next-line no-control-regex -- matching control characters is the point: they are never part of a servable path.
|
|
7
5
|
const CONTROL_CHARS_PATTERN = /[\u0000-\u001f\u007f]/;
|
|
8
|
-
// Structural normalization shared by lookups and intake
|
|
9
|
-
//
|
|
10
|
-
// Idempotent; safe to apply to already-canonical stored paths (NFC is
|
|
11
|
-
// idempotent, no percent-decoding).
|
|
6
|
+
// Structural normalization shared by lookups and intake. Idempotent, so it is
|
|
7
|
+
// safe on already-canonical stored paths (no percent-decoding here).
|
|
12
8
|
export function normalizeVersionPath(input) {
|
|
13
9
|
const normalized = input.replace(/\\/g, "/").replace(/^\/+/, "").normalize("NFC");
|
|
14
|
-
// Here
|
|
15
|
-
//
|
|
16
|
-
// character in an uploaded path used to pass the policy unclassified.
|
|
10
|
+
// Here, not only in canonicalizeVersionPath: staticUploadPathViolation
|
|
11
|
+
// validates with this function.
|
|
17
12
|
if (CONTROL_CHARS_PATTERN.test(normalized)) {
|
|
18
13
|
throw new Error(`invalid_version_path:${input}`);
|
|
19
14
|
}
|
|
@@ -34,10 +29,8 @@ export function normalizeVersionPath(input) {
|
|
|
34
29
|
return safePath;
|
|
35
30
|
}
|
|
36
31
|
// Intake canonicalization: percent-decode EXACTLY once, then NFC, then the
|
|
37
|
-
// structural rules. Applied wherever paths enter the system
|
|
38
|
-
//
|
|
39
|
-
// that are already canonical — decode-once is not idempotent. Throws on
|
|
40
|
-
// malformed percent sequences, control characters, traversal, and empty paths.
|
|
32
|
+
// structural rules. Applied wherever paths enter the system, never to paths
|
|
33
|
+
// that are already canonical, because decode-once is not idempotent.
|
|
41
34
|
export function canonicalizeVersionPath(input) {
|
|
42
35
|
let decoded;
|
|
43
36
|
try {
|
|
@@ -47,9 +40,8 @@ export function canonicalizeVersionPath(input) {
|
|
|
47
40
|
throw new Error(`invalid_version_path:${input}`);
|
|
48
41
|
}
|
|
49
42
|
const canonical = decoded.normalize("NFC");
|
|
50
|
-
// Backslashes
|
|
51
|
-
//
|
|
52
|
-
// Control characters are rejected by normalizeVersionPath below.
|
|
43
|
+
// Backslashes are denied at intake (spec "Static path policy"); only
|
|
44
|
+
// client-side helpers translate Windows separators.
|
|
53
45
|
if (canonical.includes("\\")) {
|
|
54
46
|
throw new Error(`invalid_version_path:${input}`);
|
|
55
47
|
}
|
|
@@ -3,31 +3,22 @@ export type LoginIntentSearch = {
|
|
|
3
3
|
returnTo?: string | undefined;
|
|
4
4
|
};
|
|
5
5
|
/**
|
|
6
|
-
* Optional query params WordPress.com's OAuth2 authorize endpoint understands
|
|
7
|
-
*
|
|
8
|
-
* hints — dropping them never breaks the OAuth handshake.
|
|
6
|
+
* Optional query params WordPress.com's OAuth2 authorize endpoint understands.
|
|
7
|
+
* All are cosmetic hints, so dropping them never breaks the handshake.
|
|
9
8
|
*/
|
|
10
9
|
export type WpcomAuthorizeExtras = {
|
|
11
10
|
/** Prefills the email field on the WP.com login screen (`user_email`). */
|
|
12
11
|
userEmail?: string | undefined;
|
|
13
12
|
/** Localizes the WP.com login/consent/signup screens (`locale`). */
|
|
14
13
|
locale?: string | undefined;
|
|
15
|
-
/**
|
|
16
|
-
* `implicit=false`: WP.com signs the user out of WordPress.com and shows a
|
|
17
|
-
* fresh login instead of silently reusing the current WP.com session. The
|
|
18
|
-
* only way to let a user switch WP.com accounts — without it, sign-out on
|
|
19
|
-
* our side loops them straight back into the same account.
|
|
20
|
-
*/
|
|
21
|
-
switchAccount?: boolean | undefined;
|
|
22
14
|
};
|
|
23
15
|
export declare function decorateWpcomAuthorizeUrl(authorizeUrl: string, extras?: WpcomAuthorizeExtras): string;
|
|
24
16
|
export declare function buildDashboardLoginPath(input: LoginIntentSearch): string;
|
|
25
17
|
export declare function buildWpcomAuthStartPath(input: LoginIntentSearch & {
|
|
26
18
|
/**
|
|
27
|
-
* A signed OAuth authorize query
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* here — the auth server verifies its signature.
|
|
19
|
+
* A signed OAuth authorize query, carried through the WordPress.com round
|
|
20
|
+
* trip so the auth server can resume the flow once the session exists.
|
|
21
|
+
* Opaque here; the auth server verifies its signature.
|
|
31
22
|
*/
|
|
32
23
|
oauthQuery?: string | undefined;
|
|
33
24
|
}): string;
|
|
@@ -6,14 +6,11 @@ export function decorateWpcomAuthorizeUrl(authorizeUrl, extras = {}) {
|
|
|
6
6
|
url.searchParams.set("user_email", email);
|
|
7
7
|
}
|
|
8
8
|
// WP.com validates locales against its own list and falls back to English,
|
|
9
|
-
// so a light shape check is enough here. English is the default
|
|
9
|
+
// so a light shape check is enough here. English is the default, so omit it.
|
|
10
10
|
const locale = extras.locale?.trim().toLowerCase().replace("_", "-");
|
|
11
11
|
if (locale && /^[a-z]{2}(-[a-z]{2})?$/.test(locale) && locale !== "en") {
|
|
12
12
|
url.searchParams.set("locale", locale);
|
|
13
13
|
}
|
|
14
|
-
if (extras.switchAccount) {
|
|
15
|
-
url.searchParams.set("implicit", "false");
|
|
16
|
-
}
|
|
17
14
|
return url.toString();
|
|
18
15
|
}
|
|
19
16
|
export function buildDashboardLoginPath(input) {
|
package/dist/vocabulary.d.ts
CHANGED
|
@@ -146,13 +146,13 @@ export declare const EXTERNAL_TERM_ALLOWLIST: readonly [{
|
|
|
146
146
|
readonly term: "WP Cloud";
|
|
147
147
|
readonly concept: "infra";
|
|
148
148
|
readonly allowedContexts: readonly ["fixed-phrase"];
|
|
149
|
-
readonly allowedPhrases: readonly ["the same infra as Automattic, WP Cloud, Pressable, and WordPress.com"];
|
|
149
|
+
readonly allowedPhrases: readonly ["the same infra as Automattic, WP Cloud, Pressable, and WordPress.com", "the same infrastructure as WordPress.com, Tumblr, WordPress VIP and WP Cloud"];
|
|
150
150
|
readonly replacement: "infra";
|
|
151
151
|
readonly reason: string;
|
|
152
152
|
}];
|
|
153
153
|
/**
|
|
154
154
|
* AMENDMENT (DECIDED 2026-07-02): the deploy vocabulary stays, as documented,
|
|
155
|
-
* first-class ALIASES of the canonical vocabulary
|
|
155
|
+
* first-class ALIASES of the canonical vocabulary. `deploy` is an exact alias of
|
|
156
156
|
* `publish` (the verb) and `deployments` is an alias of `versions` (the noun).
|
|
157
157
|
* The canonical lifecycle nouns are unchanged: version / channel / build.
|
|
158
158
|
*
|
|
@@ -164,7 +164,7 @@ export declare const EXTERNAL_TERM_ALLOWLIST: readonly [{
|
|
|
164
164
|
* - Wherever the alias is introduced, attach DEPLOY_ALIAS_DISAMBIGUATION
|
|
165
165
|
* (the one sanctioned disambiguation sentence) so readers land on the
|
|
166
166
|
* canonical nouns.
|
|
167
|
-
* - A bare "deployment" noun in FRESH prose is still discouraged
|
|
167
|
+
* - A bare "deployment" noun in FRESH prose is still discouraged. Write
|
|
168
168
|
* "version" (the thing) or "publish" (the act) unless deliberately using
|
|
169
169
|
* the alias, in which case disambiguate.
|
|
170
170
|
*/
|
|
@@ -211,7 +211,7 @@ export declare const PROVIDER_HYGIENE: {
|
|
|
211
211
|
readonly internalName: "WP Cloud";
|
|
212
212
|
readonly replacement: "infra";
|
|
213
213
|
readonly allowedContexts: readonly ["fixed-phrase"];
|
|
214
|
-
readonly allowedPhrases: readonly ["the same infra as Automattic, WP Cloud, Pressable, and WordPress.com"];
|
|
214
|
+
readonly allowedPhrases: readonly ["the same infra as Automattic, WP Cloud, Pressable, and WordPress.com", "the same infrastructure as WordPress.com, Tumblr, WordPress VIP and WP Cloud"];
|
|
215
215
|
readonly reason: string;
|
|
216
216
|
};
|
|
217
217
|
readonly codeStorage: {
|
|
@@ -247,10 +247,10 @@ export type CliCanonicalVerb = keyof typeof CLI_ALIASES;
|
|
|
247
247
|
* Disclosure tiers gate how much of a surface (CLI help, `sf docs`) shows by
|
|
248
248
|
* default, so neither humans nor agents are overwhelmed:
|
|
249
249
|
*
|
|
250
|
-
* - `essential
|
|
250
|
+
* - `essential`: the handful of commands/docs a new user or agent needs to
|
|
251
251
|
* make a first publish and manage a space. The default everywhere.
|
|
252
|
-
* - `full
|
|
253
|
-
* - `reference
|
|
252
|
+
* - `full`: the complete product CLI surface (everything not hidden).
|
|
253
|
+
* - `reference`: absolutely everything, including hidden/advanced commands.
|
|
254
254
|
*
|
|
255
255
|
* Tiers are cumulative for ranked surfaces (`reference` ⊇ `full` ⊇ `essential`);
|
|
256
256
|
* see {@link tierVisibleAt}. This is THE source of truth for tier ids + labels.
|
package/dist/vocabulary.js
CHANGED
|
@@ -5,29 +5,29 @@
|
|
|
5
5
|
// dashboard label, or "E2B" in marketing copy).
|
|
6
6
|
//
|
|
7
7
|
// This module is intentionally pure data + types: no side effects, no imports.
|
|
8
|
-
// It is additive
|
|
8
|
+
// It is additive. Wiring consumers (CLI, MCP, dashboard, docs generators) onto
|
|
9
9
|
// it happens in later chunks. The decisions encoded here are LOCKED:
|
|
10
10
|
//
|
|
11
|
-
// - `space` is the primitive noun everywhere, user surfaces and
|
|
11
|
+
// - `space` is the primitive noun everywhere, user surfaces and the Spacefast API
|
|
12
12
|
// alike. A space IS a site: there is no second host entity to name. `site`
|
|
13
13
|
// survives only as WP Cloud's own word for the box, in operator surfaces
|
|
14
14
|
// and the warm-pool inventory.
|
|
15
15
|
// - `publish` is the verb. AMENDED 2026-07-02: `deploy` / `deployments` are
|
|
16
|
-
// first-class ALIASES of `publish` / `versions` (see DEPLOY_ALIASES)
|
|
16
|
+
// first-class ALIASES of `publish` / `versions` (see DEPLOY_ALIASES). They
|
|
17
17
|
// stay listed and documented, always with the sanctioned disambiguation
|
|
18
18
|
// line (DEPLOY_ALIAS_DISAMBIGUATION) and with the canonical command named
|
|
19
19
|
// first. A bare "deployment" noun in fresh prose is still discouraged (say
|
|
20
20
|
// "version"), and the `dep_*` id framing stays retired.
|
|
21
21
|
// - `version` / `channel` / `build` are the lifecycle nouns.
|
|
22
|
-
// - `API key
|
|
22
|
+
// - `API key`, never "access token".
|
|
23
23
|
// - `Collab` is the feature; `comment` is the unit.
|
|
24
24
|
// - `Superpowers` is the page-enhancement feature.
|
|
25
25
|
// - Provider names stay off public surfaces by default: never "E2B" (say
|
|
26
26
|
// "Spacefast Builds" / "Spacefast CI"), never "code.storage" / "Pierre".
|
|
27
|
-
// The infra brand is "WP Cloud"
|
|
27
|
+
// The infra brand is "WP Cloud", never "WP.Cloud"/"wp-cloud" (AMENDED
|
|
28
28
|
// 2026-08-13). Prefer "infra"; when an external reference is genuinely
|
|
29
29
|
// necessary (provider identity fields, domain conflicts), name WP Cloud
|
|
30
|
-
// outright
|
|
30
|
+
// outright, NEVER the euphemism "the hosting provider". Marketing may use
|
|
31
31
|
// the family line "the same infra as Automattic, WP Cloud, Pressable, and
|
|
32
32
|
// WordPress.com" (see PROVIDER_HYGIENE).
|
|
33
33
|
export const CONCEPTS = {
|
|
@@ -37,7 +37,7 @@ export const CONCEPTS = {
|
|
|
37
37
|
aliases: [],
|
|
38
38
|
externalTerms: [],
|
|
39
39
|
deprecated: ["project", "site"],
|
|
40
|
-
description: "The primitive noun everywhere, user surfaces and
|
|
40
|
+
description: "The primitive noun everywhere, user surfaces and the Spacefast API alike. A " +
|
|
41
41
|
"space IS a site, so 'site' names nothing of ours; 'project' is never " +
|
|
42
42
|
"the primitive.",
|
|
43
43
|
},
|
|
@@ -109,7 +109,7 @@ export const CONCEPTS = {
|
|
|
109
109
|
externalTerms: ["WP Cloud"],
|
|
110
110
|
deprecated: ["code.storage", "Pierre", "the hosting provider"],
|
|
111
111
|
description: "The hosting substrate. Prefer 'infra'; when an external reference is " +
|
|
112
|
-
"necessary, name 'WP Cloud' (its real spelling)
|
|
112
|
+
"necessary, name 'WP Cloud' (its real spelling), never the euphemism " +
|
|
113
113
|
"'the hosting provider'. Never 'code.storage'/'Pierre'.",
|
|
114
114
|
},
|
|
115
115
|
};
|
|
@@ -119,7 +119,7 @@ export const EXTERNAL_TERM_ALLOWLIST = [
|
|
|
119
119
|
concept: "publish",
|
|
120
120
|
allowedContexts: ["github-integration", "platform-api"],
|
|
121
121
|
replacement: "version / publish",
|
|
122
|
-
reason: "GitHub speaks 'deployment'; the
|
|
122
|
+
reason: "GitHub speaks 'deployment'; the Spacefast API keeps it for contract " +
|
|
123
123
|
"stability. Elsewhere it is a sanctioned alias of 'version' when paired " +
|
|
124
124
|
"with DEPLOY_ALIAS_DISAMBIGUATION (see DEPLOY_ALIASES); bare fresh prose " +
|
|
125
125
|
"still says 'publish a version'.",
|
|
@@ -138,7 +138,7 @@ export const EXTERNAL_TERM_ALLOWLIST = [
|
|
|
138
138
|
concept: "space",
|
|
139
139
|
allowedContexts: ["operator"],
|
|
140
140
|
replacement: "space",
|
|
141
|
-
reason: "A space IS a site, so 'site' is no longer a Spacefast noun
|
|
141
|
+
reason: "A space IS a site, so 'site' is no longer a Spacefast noun. It is only " +
|
|
142
142
|
"WP Cloud's word for the box, which operator surfaces and warm-pool " +
|
|
143
143
|
"inventory may use. Every customer-facing surface says 'space'.",
|
|
144
144
|
},
|
|
@@ -146,11 +146,18 @@ export const EXTERNAL_TERM_ALLOWLIST = [
|
|
|
146
146
|
term: "WP Cloud",
|
|
147
147
|
concept: "infra",
|
|
148
148
|
allowedContexts: ["fixed-phrase"],
|
|
149
|
-
allowedPhrases: [
|
|
149
|
+
allowedPhrases: [
|
|
150
|
+
"the same infra as Automattic, WP Cloud, Pressable, and WordPress.com",
|
|
151
|
+
// The product-positioning line every agent-facing surface leads with
|
|
152
|
+
// (`SPACEFAST_POSITIONING` in brand.ts). Same licence as the family
|
|
153
|
+
// line above: WP Cloud is named as one of several sibling platforms,
|
|
154
|
+
// never as "the hosting provider" and never on its own.
|
|
155
|
+
"the same infrastructure as WordPress.com, Tumblr, WordPress VIP and WP Cloud",
|
|
156
|
+
],
|
|
150
157
|
replacement: "infra",
|
|
151
158
|
reason: "AMENDED 2026-08-13: prefer 'infra'. Same day: the platform-api " +
|
|
152
|
-
"carve-out is revoked
|
|
153
|
-
"wpcloud. Name WP Cloud (its real spelling
|
|
159
|
+
"carve-out is revoked. API values say mysql/phpmyadmin/infra, never " +
|
|
160
|
+
"wpcloud. Name WP Cloud (its real spelling, never 'WP.Cloud') only " +
|
|
154
161
|
"where the external reference is necessary: domain-conflict copy and " +
|
|
155
162
|
"the marketing family line in allowedPhrases. Never the euphemism " +
|
|
156
163
|
"'the hosting provider'.",
|
|
@@ -179,11 +186,18 @@ export const PROVIDER_HYGIENE = {
|
|
|
179
186
|
internalName: "WP Cloud",
|
|
180
187
|
replacement: "infra",
|
|
181
188
|
allowedContexts: ["fixed-phrase"],
|
|
182
|
-
allowedPhrases: [
|
|
189
|
+
allowedPhrases: [
|
|
190
|
+
"the same infra as Automattic, WP Cloud, Pressable, and WordPress.com",
|
|
191
|
+
// The product-positioning line every agent-facing surface leads with
|
|
192
|
+
// (`SPACEFAST_POSITIONING` in brand.ts). Same licence as the family
|
|
193
|
+
// line above: WP Cloud is named as one of several sibling platforms,
|
|
194
|
+
// never as "the hosting provider" and never on its own.
|
|
195
|
+
"the same infrastructure as WordPress.com, Tumblr, WordPress VIP and WP Cloud",
|
|
196
|
+
],
|
|
183
197
|
reason: "Hosting substrate; prefer 'infra' (AMENDED 2026-08-13, same day: the " +
|
|
184
|
-
"platform-api carve-out is revoked
|
|
198
|
+
"platform-api carve-out is revoked. API values say mysql/phpmyadmin/" +
|
|
185
199
|
"infra, never wpcloud). Necessary external references name WP Cloud " +
|
|
186
|
-
"outright
|
|
200
|
+
"outright, never 'the hosting provider'.",
|
|
187
201
|
},
|
|
188
202
|
codeStorage: {
|
|
189
203
|
internalName: "code.storage",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spacefast/common",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Shared TypeScript contracts and utilities for Spacefast packages.",
|
|
6
6
|
"repository": {
|
|
@@ -36,6 +36,11 @@
|
|
|
36
36
|
"import": "./dist/brand-assets-build.js",
|
|
37
37
|
"default": "./dist/brand-assets-build.js"
|
|
38
38
|
},
|
|
39
|
+
"./og-template": {
|
|
40
|
+
"types": "./dist/og-template.d.ts",
|
|
41
|
+
"import": "./dist/og-template.js",
|
|
42
|
+
"default": "./dist/og-template.js"
|
|
43
|
+
},
|
|
39
44
|
"./brand-assets/spacefast-wordmark.svg": "./brand-assets/spacefast-wordmark.svg",
|
|
40
45
|
"./brand-assets/spacefast-sf-full-bleed.svg": "./brand-assets/spacefast-sf-full-bleed.svg",
|
|
41
46
|
"./brand-assets/spacefast-favicon.svg": "./brand-assets/spacefast-favicon.svg",
|
|
@@ -96,7 +101,6 @@
|
|
|
96
101
|
}
|
|
97
102
|
},
|
|
98
103
|
"dependencies": {
|
|
99
|
-
"@tanstack/react-query": "^5.101.4",
|
|
100
104
|
"culori": "^4.0.2",
|
|
101
105
|
"js-yaml": "^4.1.1",
|
|
102
106
|
"mime": "^4.1.0",
|
|
@@ -104,5 +108,13 @@
|
|
|
104
108
|
"parse5": "^7.3.0",
|
|
105
109
|
"smol-toml": "^1.7.0",
|
|
106
110
|
"zod": "^4.4.3"
|
|
111
|
+
},
|
|
112
|
+
"peerDependencies": {
|
|
113
|
+
"@tanstack/react-query": "^5.101.4"
|
|
114
|
+
},
|
|
115
|
+
"peerDependenciesMeta": {
|
|
116
|
+
"@tanstack/react-query": {
|
|
117
|
+
"optional": true
|
|
118
|
+
}
|
|
107
119
|
}
|
|
108
120
|
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export declare const MACHINE_AGENT_CLIENT_IDS: readonly ["universal", "claude-code", "codex", "opencode", "github-copilot", "factory-droid", "cursor", "vscode", "gemini-cli", "windsurf", "cline", "continue"];
|
|
2
|
-
export declare const CONNECT_TARGET_IDS: readonly ["claude-code", "cursor", "vscode", "codex", "claude", "chatgpt"];
|
|
3
|
-
export type MachineAgentClientId = (typeof MACHINE_AGENT_CLIENT_IDS)[number];
|
|
4
|
-
export type ConnectTargetId = (typeof CONNECT_TARGET_IDS)[number];
|
|
5
|
-
export type AgentProductId = MachineAgentClientId | ConnectTargetId;
|
|
6
|
-
export declare const AGENT_PRODUCT_NAMES: {
|
|
7
|
-
readonly universal: "Universal (.agents)";
|
|
8
|
-
readonly "claude-code": "Claude Code";
|
|
9
|
-
readonly codex: "Codex";
|
|
10
|
-
readonly cursor: "Cursor";
|
|
11
|
-
readonly vscode: "VS Code";
|
|
12
|
-
readonly "github-copilot": "GitHub Copilot";
|
|
13
|
-
readonly "factory-droid": "Factory Droid";
|
|
14
|
-
readonly opencode: "OpenCode";
|
|
15
|
-
readonly "gemini-cli": "Gemini CLI";
|
|
16
|
-
readonly windsurf: "Windsurf";
|
|
17
|
-
readonly cline: "Cline";
|
|
18
|
-
readonly continue: "Continue";
|
|
19
|
-
readonly claude: "Claude";
|
|
20
|
-
readonly chatgpt: "ChatGPT";
|
|
21
|
-
};
|
|
22
|
-
export declare function agentProductName(id: AgentProductId): string;
|