@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
|
@@ -9,18 +9,13 @@ export declare const StatticActionSchema: z.ZodEnum<{
|
|
|
9
9
|
"domains:read": "domains:read";
|
|
10
10
|
"spaces:publish": "spaces:publish";
|
|
11
11
|
"builds:trigger": "builds:trigger";
|
|
12
|
-
"mcp:tools": "mcp:tools";
|
|
13
12
|
"*": "*";
|
|
14
|
-
"sites:read": "sites:read";
|
|
15
|
-
"sites:create": "sites:create";
|
|
16
|
-
"sites:write": "sites:write";
|
|
17
|
-
"sites:delete": "sites:delete";
|
|
18
|
-
"sites:policy.write": "sites:policy.write";
|
|
19
13
|
"spaces:create": "spaces:create";
|
|
20
14
|
"spaces:delete": "spaces:delete";
|
|
21
15
|
"spaces:transfer": "spaces:transfer";
|
|
22
16
|
"spaces:export": "spaces:export";
|
|
23
17
|
"spaces:import": "spaces:import";
|
|
18
|
+
"spaces:policy.write": "spaces:policy.write";
|
|
24
19
|
"versions:read": "versions:read";
|
|
25
20
|
"versions:promote": "versions:promote";
|
|
26
21
|
"versions:delete": "versions:delete";
|
|
@@ -37,6 +32,13 @@ export declare const StatticActionSchema: z.ZodEnum<{
|
|
|
37
32
|
"webhooks:write": "webhooks:write";
|
|
38
33
|
"builds:read": "builds:read";
|
|
39
34
|
"builds:create": "builds:create";
|
|
35
|
+
"variables:read": "variables:read";
|
|
36
|
+
"variables:write": "variables:write";
|
|
37
|
+
"tenants:read": "tenants:read";
|
|
38
|
+
"tenants:write": "tenants:write";
|
|
39
|
+
"principals:read": "principals:read";
|
|
40
|
+
"principals:write": "principals:write";
|
|
41
|
+
"infrastructure:read": "infrastructure:read";
|
|
40
42
|
"teams:write": "teams:write";
|
|
41
43
|
"teams:members.write": "teams:members.write";
|
|
42
44
|
"billing:read": "billing:read";
|
|
@@ -47,6 +49,7 @@ export declare const StatticActionSchema: z.ZodEnum<{
|
|
|
47
49
|
"runtime:manage": "runtime:manage";
|
|
48
50
|
}>;
|
|
49
51
|
export type StatticAction = z.infer<typeof StatticActionSchema>;
|
|
52
|
+
export declare const PARTNER_MANAGEMENT_ACTIONS: readonly ["tenants:read", "tenants:write", "principals:read", "infrastructure:read"];
|
|
50
53
|
export type ParsedStatticResource = {
|
|
51
54
|
kind: "tenant";
|
|
52
55
|
tenantId: string;
|
|
@@ -93,18 +96,13 @@ export declare const ApiCredentialPolicySchema: z.ZodObject<{
|
|
|
93
96
|
"domains:read": "domains:read";
|
|
94
97
|
"spaces:publish": "spaces:publish";
|
|
95
98
|
"builds:trigger": "builds:trigger";
|
|
96
|
-
"mcp:tools": "mcp:tools";
|
|
97
99
|
"*": "*";
|
|
98
|
-
"sites:read": "sites:read";
|
|
99
|
-
"sites:create": "sites:create";
|
|
100
|
-
"sites:write": "sites:write";
|
|
101
|
-
"sites:delete": "sites:delete";
|
|
102
|
-
"sites:policy.write": "sites:policy.write";
|
|
103
100
|
"spaces:create": "spaces:create";
|
|
104
101
|
"spaces:delete": "spaces:delete";
|
|
105
102
|
"spaces:transfer": "spaces:transfer";
|
|
106
103
|
"spaces:export": "spaces:export";
|
|
107
104
|
"spaces:import": "spaces:import";
|
|
105
|
+
"spaces:policy.write": "spaces:policy.write";
|
|
108
106
|
"versions:read": "versions:read";
|
|
109
107
|
"versions:promote": "versions:promote";
|
|
110
108
|
"versions:delete": "versions:delete";
|
|
@@ -121,6 +119,13 @@ export declare const ApiCredentialPolicySchema: z.ZodObject<{
|
|
|
121
119
|
"webhooks:write": "webhooks:write";
|
|
122
120
|
"builds:read": "builds:read";
|
|
123
121
|
"builds:create": "builds:create";
|
|
122
|
+
"variables:read": "variables:read";
|
|
123
|
+
"variables:write": "variables:write";
|
|
124
|
+
"tenants:read": "tenants:read";
|
|
125
|
+
"tenants:write": "tenants:write";
|
|
126
|
+
"principals:read": "principals:read";
|
|
127
|
+
"principals:write": "principals:write";
|
|
128
|
+
"infrastructure:read": "infrastructure:read";
|
|
124
129
|
"teams:write": "teams:write";
|
|
125
130
|
"teams:members.write": "teams:members.write";
|
|
126
131
|
"billing:read": "billing:read";
|
|
@@ -146,16 +151,20 @@ export declare const ApiKeyPresetSchema: z.ZodEnum<{
|
|
|
146
151
|
ci_deploy: "ci_deploy";
|
|
147
152
|
space_publisher: "space_publisher";
|
|
148
153
|
space_admin: "space_admin";
|
|
149
|
-
site_admin: "site_admin";
|
|
150
154
|
domain_manager: "domain_manager";
|
|
151
155
|
team_admin: "team_admin";
|
|
152
156
|
billing_viewer: "billing_viewer";
|
|
157
|
+
partner_admin: "partner_admin";
|
|
153
158
|
}>;
|
|
154
159
|
export type ApiKeyPreset = z.infer<typeof ApiKeyPresetSchema>;
|
|
155
160
|
export declare const ApiKeySchema: z.ZodObject<{
|
|
156
161
|
id: z.ZodString;
|
|
157
162
|
name: z.ZodNullable<z.ZodString>;
|
|
158
163
|
tenantId: z.ZodNullable<z.ZodString>;
|
|
164
|
+
mode: z.ZodEnum<{
|
|
165
|
+
live: "live";
|
|
166
|
+
test: "test";
|
|
167
|
+
}>;
|
|
159
168
|
subject: z.ZodNullable<z.ZodObject<{
|
|
160
169
|
type: z.ZodEnum<{
|
|
161
170
|
team: "team";
|
|
@@ -177,10 +186,10 @@ export declare const ApiKeySchema: z.ZodObject<{
|
|
|
177
186
|
ci_deploy: "ci_deploy";
|
|
178
187
|
space_publisher: "space_publisher";
|
|
179
188
|
space_admin: "space_admin";
|
|
180
|
-
site_admin: "site_admin";
|
|
181
189
|
domain_manager: "domain_manager";
|
|
182
190
|
team_admin: "team_admin";
|
|
183
191
|
billing_viewer: "billing_viewer";
|
|
192
|
+
partner_admin: "partner_admin";
|
|
184
193
|
}>>;
|
|
185
194
|
teamScope: z.ZodNullable<z.ZodType<import("./device-team-scope.js").DeviceTeamScope, unknown, z.core.$ZodTypeInternals<import("./device-team-scope.js").DeviceTeamScope, unknown>>>;
|
|
186
195
|
policy: z.ZodNullable<z.ZodObject<{
|
|
@@ -199,18 +208,13 @@ export declare const ApiKeySchema: z.ZodObject<{
|
|
|
199
208
|
"domains:read": "domains:read";
|
|
200
209
|
"spaces:publish": "spaces:publish";
|
|
201
210
|
"builds:trigger": "builds:trigger";
|
|
202
|
-
"mcp:tools": "mcp:tools";
|
|
203
211
|
"*": "*";
|
|
204
|
-
"sites:read": "sites:read";
|
|
205
|
-
"sites:create": "sites:create";
|
|
206
|
-
"sites:write": "sites:write";
|
|
207
|
-
"sites:delete": "sites:delete";
|
|
208
|
-
"sites:policy.write": "sites:policy.write";
|
|
209
212
|
"spaces:create": "spaces:create";
|
|
210
213
|
"spaces:delete": "spaces:delete";
|
|
211
214
|
"spaces:transfer": "spaces:transfer";
|
|
212
215
|
"spaces:export": "spaces:export";
|
|
213
216
|
"spaces:import": "spaces:import";
|
|
217
|
+
"spaces:policy.write": "spaces:policy.write";
|
|
214
218
|
"versions:read": "versions:read";
|
|
215
219
|
"versions:promote": "versions:promote";
|
|
216
220
|
"versions:delete": "versions:delete";
|
|
@@ -227,6 +231,13 @@ export declare const ApiKeySchema: z.ZodObject<{
|
|
|
227
231
|
"webhooks:write": "webhooks:write";
|
|
228
232
|
"builds:read": "builds:read";
|
|
229
233
|
"builds:create": "builds:create";
|
|
234
|
+
"variables:read": "variables:read";
|
|
235
|
+
"variables:write": "variables:write";
|
|
236
|
+
"tenants:read": "tenants:read";
|
|
237
|
+
"tenants:write": "tenants:write";
|
|
238
|
+
"principals:read": "principals:read";
|
|
239
|
+
"principals:write": "principals:write";
|
|
240
|
+
"infrastructure:read": "infrastructure:read";
|
|
230
241
|
"teams:write": "teams:write";
|
|
231
242
|
"teams:members.write": "teams:members.write";
|
|
232
243
|
"billing:read": "billing:read";
|
|
@@ -270,6 +281,10 @@ export declare const ApiKeyListResponseSchema: z.ZodObject<{
|
|
|
270
281
|
id: z.ZodString;
|
|
271
282
|
name: z.ZodNullable<z.ZodString>;
|
|
272
283
|
tenantId: z.ZodNullable<z.ZodString>;
|
|
284
|
+
mode: z.ZodEnum<{
|
|
285
|
+
live: "live";
|
|
286
|
+
test: "test";
|
|
287
|
+
}>;
|
|
273
288
|
subject: z.ZodNullable<z.ZodObject<{
|
|
274
289
|
type: z.ZodEnum<{
|
|
275
290
|
team: "team";
|
|
@@ -291,10 +306,10 @@ export declare const ApiKeyListResponseSchema: z.ZodObject<{
|
|
|
291
306
|
ci_deploy: "ci_deploy";
|
|
292
307
|
space_publisher: "space_publisher";
|
|
293
308
|
space_admin: "space_admin";
|
|
294
|
-
site_admin: "site_admin";
|
|
295
309
|
domain_manager: "domain_manager";
|
|
296
310
|
team_admin: "team_admin";
|
|
297
311
|
billing_viewer: "billing_viewer";
|
|
312
|
+
partner_admin: "partner_admin";
|
|
298
313
|
}>>;
|
|
299
314
|
teamScope: z.ZodNullable<z.ZodType<import("./device-team-scope.js").DeviceTeamScope, unknown, z.core.$ZodTypeInternals<import("./device-team-scope.js").DeviceTeamScope, unknown>>>;
|
|
300
315
|
policy: z.ZodNullable<z.ZodObject<{
|
|
@@ -313,18 +328,13 @@ export declare const ApiKeyListResponseSchema: z.ZodObject<{
|
|
|
313
328
|
"domains:read": "domains:read";
|
|
314
329
|
"spaces:publish": "spaces:publish";
|
|
315
330
|
"builds:trigger": "builds:trigger";
|
|
316
|
-
"mcp:tools": "mcp:tools";
|
|
317
331
|
"*": "*";
|
|
318
|
-
"sites:read": "sites:read";
|
|
319
|
-
"sites:create": "sites:create";
|
|
320
|
-
"sites:write": "sites:write";
|
|
321
|
-
"sites:delete": "sites:delete";
|
|
322
|
-
"sites:policy.write": "sites:policy.write";
|
|
323
332
|
"spaces:create": "spaces:create";
|
|
324
333
|
"spaces:delete": "spaces:delete";
|
|
325
334
|
"spaces:transfer": "spaces:transfer";
|
|
326
335
|
"spaces:export": "spaces:export";
|
|
327
336
|
"spaces:import": "spaces:import";
|
|
337
|
+
"spaces:policy.write": "spaces:policy.write";
|
|
328
338
|
"versions:read": "versions:read";
|
|
329
339
|
"versions:promote": "versions:promote";
|
|
330
340
|
"versions:delete": "versions:delete";
|
|
@@ -341,6 +351,13 @@ export declare const ApiKeyListResponseSchema: z.ZodObject<{
|
|
|
341
351
|
"webhooks:write": "webhooks:write";
|
|
342
352
|
"builds:read": "builds:read";
|
|
343
353
|
"builds:create": "builds:create";
|
|
354
|
+
"variables:read": "variables:read";
|
|
355
|
+
"variables:write": "variables:write";
|
|
356
|
+
"tenants:read": "tenants:read";
|
|
357
|
+
"tenants:write": "tenants:write";
|
|
358
|
+
"principals:read": "principals:read";
|
|
359
|
+
"principals:write": "principals:write";
|
|
360
|
+
"infrastructure:read": "infrastructure:read";
|
|
344
361
|
"teams:write": "teams:write";
|
|
345
362
|
"teams:members.write": "teams:members.write";
|
|
346
363
|
"billing:read": "billing:read";
|
|
@@ -386,10 +403,10 @@ export declare const ApiKeyCreateRequestSchema: z.ZodObject<{
|
|
|
386
403
|
ci_deploy: "ci_deploy";
|
|
387
404
|
space_publisher: "space_publisher";
|
|
388
405
|
space_admin: "space_admin";
|
|
389
|
-
site_admin: "site_admin";
|
|
390
406
|
domain_manager: "domain_manager";
|
|
391
407
|
team_admin: "team_admin";
|
|
392
408
|
billing_viewer: "billing_viewer";
|
|
409
|
+
partner_admin: "partner_admin";
|
|
393
410
|
}>>;
|
|
394
411
|
policy: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
395
412
|
version: z.ZodLiteral<"2026-06-09">;
|
|
@@ -407,18 +424,13 @@ export declare const ApiKeyCreateRequestSchema: z.ZodObject<{
|
|
|
407
424
|
"domains:read": "domains:read";
|
|
408
425
|
"spaces:publish": "spaces:publish";
|
|
409
426
|
"builds:trigger": "builds:trigger";
|
|
410
|
-
"mcp:tools": "mcp:tools";
|
|
411
427
|
"*": "*";
|
|
412
|
-
"sites:read": "sites:read";
|
|
413
|
-
"sites:create": "sites:create";
|
|
414
|
-
"sites:write": "sites:write";
|
|
415
|
-
"sites:delete": "sites:delete";
|
|
416
|
-
"sites:policy.write": "sites:policy.write";
|
|
417
428
|
"spaces:create": "spaces:create";
|
|
418
429
|
"spaces:delete": "spaces:delete";
|
|
419
430
|
"spaces:transfer": "spaces:transfer";
|
|
420
431
|
"spaces:export": "spaces:export";
|
|
421
432
|
"spaces:import": "spaces:import";
|
|
433
|
+
"spaces:policy.write": "spaces:policy.write";
|
|
422
434
|
"versions:read": "versions:read";
|
|
423
435
|
"versions:promote": "versions:promote";
|
|
424
436
|
"versions:delete": "versions:delete";
|
|
@@ -435,6 +447,13 @@ export declare const ApiKeyCreateRequestSchema: z.ZodObject<{
|
|
|
435
447
|
"webhooks:write": "webhooks:write";
|
|
436
448
|
"builds:read": "builds:read";
|
|
437
449
|
"builds:create": "builds:create";
|
|
450
|
+
"variables:read": "variables:read";
|
|
451
|
+
"variables:write": "variables:write";
|
|
452
|
+
"tenants:read": "tenants:read";
|
|
453
|
+
"tenants:write": "tenants:write";
|
|
454
|
+
"principals:read": "principals:read";
|
|
455
|
+
"principals:write": "principals:write";
|
|
456
|
+
"infrastructure:read": "infrastructure:read";
|
|
438
457
|
"teams:write": "teams:write";
|
|
439
458
|
"teams:members.write": "teams:members.write";
|
|
440
459
|
"billing:read": "billing:read";
|
|
@@ -483,18 +502,13 @@ export declare const ApiKeyPatchRequestSchema: z.ZodObject<{
|
|
|
483
502
|
"domains:read": "domains:read";
|
|
484
503
|
"spaces:publish": "spaces:publish";
|
|
485
504
|
"builds:trigger": "builds:trigger";
|
|
486
|
-
"mcp:tools": "mcp:tools";
|
|
487
505
|
"*": "*";
|
|
488
|
-
"sites:read": "sites:read";
|
|
489
|
-
"sites:create": "sites:create";
|
|
490
|
-
"sites:write": "sites:write";
|
|
491
|
-
"sites:delete": "sites:delete";
|
|
492
|
-
"sites:policy.write": "sites:policy.write";
|
|
493
506
|
"spaces:create": "spaces:create";
|
|
494
507
|
"spaces:delete": "spaces:delete";
|
|
495
508
|
"spaces:transfer": "spaces:transfer";
|
|
496
509
|
"spaces:export": "spaces:export";
|
|
497
510
|
"spaces:import": "spaces:import";
|
|
511
|
+
"spaces:policy.write": "spaces:policy.write";
|
|
498
512
|
"versions:read": "versions:read";
|
|
499
513
|
"versions:promote": "versions:promote";
|
|
500
514
|
"versions:delete": "versions:delete";
|
|
@@ -511,6 +525,13 @@ export declare const ApiKeyPatchRequestSchema: z.ZodObject<{
|
|
|
511
525
|
"webhooks:write": "webhooks:write";
|
|
512
526
|
"builds:read": "builds:read";
|
|
513
527
|
"builds:create": "builds:create";
|
|
528
|
+
"variables:read": "variables:read";
|
|
529
|
+
"variables:write": "variables:write";
|
|
530
|
+
"tenants:read": "tenants:read";
|
|
531
|
+
"tenants:write": "tenants:write";
|
|
532
|
+
"principals:read": "principals:read";
|
|
533
|
+
"principals:write": "principals:write";
|
|
534
|
+
"infrastructure:read": "infrastructure:read";
|
|
514
535
|
"teams:write": "teams:write";
|
|
515
536
|
"teams:members.write": "teams:members.write";
|
|
516
537
|
"billing:read": "billing:read";
|
|
@@ -558,18 +579,13 @@ export declare const ApiKeyScopedCreateRequestSchema: z.ZodObject<{
|
|
|
558
579
|
"domains:read": "domains:read";
|
|
559
580
|
"spaces:publish": "spaces:publish";
|
|
560
581
|
"builds:trigger": "builds:trigger";
|
|
561
|
-
"mcp:tools": "mcp:tools";
|
|
562
582
|
"*": "*";
|
|
563
|
-
"sites:read": "sites:read";
|
|
564
|
-
"sites:create": "sites:create";
|
|
565
|
-
"sites:write": "sites:write";
|
|
566
|
-
"sites:delete": "sites:delete";
|
|
567
|
-
"sites:policy.write": "sites:policy.write";
|
|
568
583
|
"spaces:create": "spaces:create";
|
|
569
584
|
"spaces:delete": "spaces:delete";
|
|
570
585
|
"spaces:transfer": "spaces:transfer";
|
|
571
586
|
"spaces:export": "spaces:export";
|
|
572
587
|
"spaces:import": "spaces:import";
|
|
588
|
+
"spaces:policy.write": "spaces:policy.write";
|
|
573
589
|
"versions:read": "versions:read";
|
|
574
590
|
"versions:promote": "versions:promote";
|
|
575
591
|
"versions:delete": "versions:delete";
|
|
@@ -586,6 +602,13 @@ export declare const ApiKeyScopedCreateRequestSchema: z.ZodObject<{
|
|
|
586
602
|
"webhooks:write": "webhooks:write";
|
|
587
603
|
"builds:read": "builds:read";
|
|
588
604
|
"builds:create": "builds:create";
|
|
605
|
+
"variables:read": "variables:read";
|
|
606
|
+
"variables:write": "variables:write";
|
|
607
|
+
"tenants:read": "tenants:read";
|
|
608
|
+
"tenants:write": "tenants:write";
|
|
609
|
+
"principals:read": "principals:read";
|
|
610
|
+
"principals:write": "principals:write";
|
|
611
|
+
"infrastructure:read": "infrastructure:read";
|
|
589
612
|
"teams:write": "teams:write";
|
|
590
613
|
"teams:members.write": "teams:members.write";
|
|
591
614
|
"billing:read": "billing:read";
|
|
@@ -619,18 +642,13 @@ export declare const ApiKeyScopedPatchRequestSchema: z.ZodObject<{
|
|
|
619
642
|
"domains:read": "domains:read";
|
|
620
643
|
"spaces:publish": "spaces:publish";
|
|
621
644
|
"builds:trigger": "builds:trigger";
|
|
622
|
-
"mcp:tools": "mcp:tools";
|
|
623
645
|
"*": "*";
|
|
624
|
-
"sites:read": "sites:read";
|
|
625
|
-
"sites:create": "sites:create";
|
|
626
|
-
"sites:write": "sites:write";
|
|
627
|
-
"sites:delete": "sites:delete";
|
|
628
|
-
"sites:policy.write": "sites:policy.write";
|
|
629
646
|
"spaces:create": "spaces:create";
|
|
630
647
|
"spaces:delete": "spaces:delete";
|
|
631
648
|
"spaces:transfer": "spaces:transfer";
|
|
632
649
|
"spaces:export": "spaces:export";
|
|
633
650
|
"spaces:import": "spaces:import";
|
|
651
|
+
"spaces:policy.write": "spaces:policy.write";
|
|
634
652
|
"versions:read": "versions:read";
|
|
635
653
|
"versions:promote": "versions:promote";
|
|
636
654
|
"versions:delete": "versions:delete";
|
|
@@ -647,6 +665,13 @@ export declare const ApiKeyScopedPatchRequestSchema: z.ZodObject<{
|
|
|
647
665
|
"webhooks:write": "webhooks:write";
|
|
648
666
|
"builds:read": "builds:read";
|
|
649
667
|
"builds:create": "builds:create";
|
|
668
|
+
"variables:read": "variables:read";
|
|
669
|
+
"variables:write": "variables:write";
|
|
670
|
+
"tenants:read": "tenants:read";
|
|
671
|
+
"tenants:write": "tenants:write";
|
|
672
|
+
"principals:read": "principals:read";
|
|
673
|
+
"principals:write": "principals:write";
|
|
674
|
+
"infrastructure:read": "infrastructure:read";
|
|
650
675
|
"teams:write": "teams:write";
|
|
651
676
|
"teams:members.write": "teams:members.write";
|
|
652
677
|
"billing:read": "billing:read";
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { AnyObjectSchema, CursorPaginationSchema, cursorListQuerySchema } from "./common.js";
|
|
3
3
|
import { DeviceTeamScopeSchema } from "./device-team-scope.js";
|
|
4
|
+
import { tenantMode } from "./enums.js";
|
|
4
5
|
export const SPACEFAST_ACCESS_POLICY_VERSION = "2026-06-09";
|
|
5
6
|
export const StatticActionSchema = z.enum([
|
|
6
|
-
"sites:read",
|
|
7
|
-
"sites:create",
|
|
8
|
-
"sites:write",
|
|
9
|
-
"sites:delete",
|
|
10
|
-
"sites:policy.write",
|
|
11
7
|
"spaces:read",
|
|
12
8
|
"spaces:create",
|
|
13
9
|
"spaces:write",
|
|
@@ -17,6 +13,7 @@ export const StatticActionSchema = z.enum([
|
|
|
17
13
|
"spaces:transfer",
|
|
18
14
|
"spaces:export",
|
|
19
15
|
"spaces:import",
|
|
16
|
+
"spaces:policy.write",
|
|
20
17
|
"versions:read",
|
|
21
18
|
"versions:promote",
|
|
22
19
|
"versions:delete",
|
|
@@ -35,6 +32,20 @@ export const StatticActionSchema = z.enum([
|
|
|
35
32
|
"builds:read",
|
|
36
33
|
"builds:trigger",
|
|
37
34
|
"builds:create",
|
|
35
|
+
// Variables hang off a principal (a team or an external customer), not off a
|
|
36
|
+
// team's administration. They get their own verbs so a route can grant
|
|
37
|
+
// variable access without handing out team-write authority, and so a
|
|
38
|
+
// principal-scoped credential never has to borrow `teams:write` to reach them.
|
|
39
|
+
"variables:read",
|
|
40
|
+
"variables:write",
|
|
41
|
+
// Partner-tier actions. They are only ever grantable on a tenant-rooted
|
|
42
|
+
// resource: a tenant, the principals it owns, and the infrastructure its
|
|
43
|
+
// spaces run on are tenant-level nouns with no team-scoped meaning.
|
|
44
|
+
"tenants:read",
|
|
45
|
+
"tenants:write",
|
|
46
|
+
"principals:read",
|
|
47
|
+
"principals:write",
|
|
48
|
+
"infrastructure:read",
|
|
38
49
|
"teams:read",
|
|
39
50
|
"teams:create",
|
|
40
51
|
"teams:write",
|
|
@@ -44,10 +55,23 @@ export const StatticActionSchema = z.enum([
|
|
|
44
55
|
"tokens:read",
|
|
45
56
|
"tokens:create",
|
|
46
57
|
"tokens:revoke",
|
|
47
|
-
"mcp:tools",
|
|
48
58
|
"runtime:manage",
|
|
49
59
|
"*",
|
|
50
60
|
]);
|
|
61
|
+
// The partner-management actions: the ones whose subject IS the tenant rather
|
|
62
|
+
// than something inside it. Holding any of them on a tenant root is what makes
|
|
63
|
+
// a credential a partner credential — and therefore what earns the partner
|
|
64
|
+
// response projection. Tenant-rooted RESOURCES alone cannot mean that: the
|
|
65
|
+
// consumer admission action `teams:create` is also granted on the tenant root
|
|
66
|
+
// because that is where creating a not-yet-existing team has to hang. It is
|
|
67
|
+
// admission-only — no team-scoped route gates on it — so its tenant-root reach
|
|
68
|
+
// grants no team authority.
|
|
69
|
+
export const PARTNER_MANAGEMENT_ACTIONS = [
|
|
70
|
+
"tenants:read",
|
|
71
|
+
"tenants:write",
|
|
72
|
+
"principals:read",
|
|
73
|
+
"infrastructure:read",
|
|
74
|
+
];
|
|
51
75
|
const DescribedStatticActionSchema = StatticActionSchema.describe("Namespaced IAM-lite action (`noun:verb`), or `*` for all actions.");
|
|
52
76
|
const RESOURCE_PREFIX = "stt://tenant/";
|
|
53
77
|
function isResourceSegment(value) {
|
|
@@ -105,13 +129,11 @@ export const ApiCredentialPolicySchema = z
|
|
|
105
129
|
.object({
|
|
106
130
|
version: z
|
|
107
131
|
.literal(SPACEFAST_ACCESS_POLICY_VERSION)
|
|
108
|
-
.describe("
|
|
132
|
+
.describe("Must be the current platform policy version."),
|
|
109
133
|
statements: z
|
|
110
134
|
.array(z
|
|
111
135
|
.object({
|
|
112
|
-
effect: z
|
|
113
|
-
.enum(["allow", "deny"])
|
|
114
|
-
.describe("Statement effect. Explicit deny always wins over allow."),
|
|
136
|
+
effect: z.enum(["allow", "deny"]).describe("Explicit deny always wins over allow."),
|
|
115
137
|
actions: z
|
|
116
138
|
.array(DescribedStatticActionSchema)
|
|
117
139
|
.min(1)
|
|
@@ -142,14 +164,14 @@ export const ApiKeyPresetSchema = z
|
|
|
142
164
|
"ci_deploy",
|
|
143
165
|
"space_publisher",
|
|
144
166
|
"space_admin",
|
|
145
|
-
"site_admin",
|
|
146
167
|
"domain_manager",
|
|
147
168
|
"team_admin",
|
|
148
169
|
"billing_viewer",
|
|
170
|
+
"partner_admin",
|
|
149
171
|
])
|
|
150
|
-
.describe("
|
|
151
|
-
//
|
|
152
|
-
//
|
|
172
|
+
.describe("Preset compiled into a concrete access policy when the key is created.");
|
|
173
|
+
// Runtime and internal credentials are platform-owned and omit ownerPrincipal
|
|
174
|
+
// entirely, so `system` is never a principal type here.
|
|
153
175
|
const ApiKeyOwnerPrincipalSchema = z.object({
|
|
154
176
|
type: z.enum(["team", "external"]).describe("Principal type that owns this key."),
|
|
155
177
|
id: z.string().min(1).describe("Stable principal id (Better Auth team id, or external id)."),
|
|
@@ -164,6 +186,7 @@ export const ApiKeySchema = z.object({
|
|
|
164
186
|
id: z.string().describe("API key id."),
|
|
165
187
|
name: z.string().nullable().describe("Human-readable key name."),
|
|
166
188
|
tenantId: z.string().nullable().describe("Tenant the key belongs to."),
|
|
189
|
+
mode: tenantMode.describe("`test` when the key belongs to a linked test tenant, `live` otherwise."),
|
|
167
190
|
subject: ApiKeySubjectSchema.nullable().describe("Subject the key acts as."),
|
|
168
191
|
ownerPrincipal: ApiKeyOwnerPrincipalSchema.nullable().describe("Owning principal (ownership metadata, never the authorization gate)."),
|
|
169
192
|
createdByUserId: z.string().describe("User who created the key."),
|
|
@@ -179,7 +202,7 @@ export const ApiKeySchema = z.object({
|
|
|
179
202
|
.array(z.string())
|
|
180
203
|
.nullable()
|
|
181
204
|
.describe("CIDR/IP allowlist. Requests from other addresses are rejected."),
|
|
182
|
-
revokedAt: z.string().datetime().nullable().describe("Revocation instant
|
|
205
|
+
revokedAt: z.string().datetime().nullable().describe("Revocation instant."),
|
|
183
206
|
enabled: z.boolean().describe("Whether the key currently authenticates."),
|
|
184
207
|
createdAt: z.string().datetime().describe("Creation instant."),
|
|
185
208
|
updatedAt: z.string().datetime().describe("Last update instant."),
|
|
@@ -190,7 +213,7 @@ export const ApiKeyListQuerySchema = cursorListQuerySchema.extend({
|
|
|
190
213
|
.string()
|
|
191
214
|
.min(1)
|
|
192
215
|
.optional()
|
|
193
|
-
.describe("Owning team whose keys to list. Defaults to the caller's own team
|
|
216
|
+
.describe("Owning team whose keys to list. Defaults to the caller's own team; any team the credential policy reaches is allowed."),
|
|
194
217
|
});
|
|
195
218
|
export const ApiKeyListResponseSchema = z.object({
|
|
196
219
|
data: z.array(ApiKeySchema),
|
|
@@ -239,14 +262,11 @@ export const ApiKeyPatchRequestSchema = z
|
|
|
239
262
|
.refine((value) => Object.keys(value).length > 0, {
|
|
240
263
|
message: "At least one mutable API key field is required.",
|
|
241
264
|
});
|
|
242
|
-
//
|
|
243
|
-
//
|
|
244
|
-
//
|
|
245
|
-
//
|
|
246
|
-
//
|
|
247
|
-
// stays valid only on the legacy route (api-keys/routes.ts); this is the only
|
|
248
|
-
// request shape the public core contract (api-contracts/core/api-keys.ts)
|
|
249
|
-
// accepts.
|
|
265
|
+
// Key creation selects an explicit, finite scope and permission set, never a
|
|
266
|
+
// team-wide role that falls out of an omitted field. Deliberately DISJOINT from
|
|
267
|
+
// `ApiKeyCreateRequestSchema`: that shape stays valid only on the legacy route
|
|
268
|
+
// (api-keys/routes.ts), while this is the only shape the public core contract
|
|
269
|
+
// (api-contracts/core/api-keys.ts) accepts.
|
|
250
270
|
export const ApiKeyScopeSchema = z
|
|
251
271
|
.discriminatedUnion("kind", [
|
|
252
272
|
z.object({ kind: z.literal("team"), teamId: z.string().min(1) }).strict(),
|