@spacefast/common 0.0.24 → 0.0.26
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.js +1 -1
- package/dist/agents/private-key-oauth.d.ts +0 -1
- package/dist/agents/private-key-oauth.js +46 -63
- package/dist/brand-assets-build.js +4 -6
- package/dist/brand-assets.d.ts +5 -15
- package/dist/brand-assets.js +15 -14
- package/dist/config/domains.d.ts +47 -7
- package/dist/config/domains.js +65 -10
- package/dist/contracts/access.d.ts +3 -3
- package/dist/contracts/activity.d.ts +1 -1
- package/dist/contracts/activity.js +5 -3
- package/dist/contracts/api-keys.js +2 -2
- package/dist/contracts/billing.d.ts +2 -1
- package/dist/contracts/billing.js +30 -0
- package/dist/contracts/builds.d.ts +34 -22
- package/dist/contracts/builds.js +18 -6
- package/dist/contracts/channels.js +1 -1
- package/dist/contracts/comments.d.ts +1 -1
- package/dist/contracts/common.d.ts +6 -6
- package/dist/contracts/common.js +5 -5
- package/dist/contracts/crons.d.ts +35 -0
- package/dist/contracts/crons.js +42 -0
- package/dist/contracts/device-auth.js +1 -1
- package/dist/contracts/docs.d.ts +5 -5
- package/dist/contracts/docs.js +2 -2
- package/dist/contracts/domains.d.ts +74 -63
- package/dist/contracts/domains.js +29 -2
- package/dist/contracts/enums.d.ts +3 -2
- package/dist/contracts/enums.js +10 -10
- package/dist/contracts/error-code-meta.d.ts +14 -0
- package/dist/contracts/error-code-meta.js +17 -0
- package/dist/contracts/error-codes.d.ts +1 -1
- package/dist/contracts/error-codes.js +4 -1
- package/dist/contracts/execution.d.ts +15 -12
- package/dist/contracts/execution.js +15 -12
- package/dist/contracts/feature-lifecycle.d.ts +4 -14
- package/dist/contracts/feature-lifecycle.js +0 -11
- package/dist/contracts/features.d.ts +33 -47
- package/dist/contracts/features.js +27 -20
- package/dist/contracts/functions.d.ts +169 -2
- package/dist/contracts/functions.js +160 -4
- package/dist/contracts/git.d.ts +27 -33
- package/dist/contracts/git.js +10 -11
- package/dist/contracts/grants.d.ts +2 -2
- package/dist/contracts/ids.js +2 -2
- package/dist/contracts/internal.d.ts +5 -16
- package/dist/contracts/internal.js +2 -12
- package/dist/contracts/mcp.d.ts +11 -0
- package/dist/contracts/mcp.js +5 -0
- package/dist/contracts/me.js +1 -1
- package/dist/contracts/operations.d.ts +4 -4
- package/dist/contracts/operations.js +2 -2
- package/dist/contracts/pages.d.ts +6 -6
- package/dist/contracts/plan-policy.d.ts +1 -1
- package/dist/contracts/plan-policy.js +1 -1
- package/dist/contracts/platform.d.ts +4 -4
- package/dist/contracts/publish-archive.d.ts +170 -160
- package/dist/contracts/publish-archive.js +8 -1
- package/dist/contracts/push-new.d.ts +4 -4
- package/dist/contracts/quotas.js +2 -2
- package/dist/contracts/repository-connections.d.ts +43 -30
- package/dist/contracts/repository-connections.js +11 -3
- package/dist/contracts/resources.d.ts +8 -8
- package/dist/contracts/resources.js +6 -6
- package/dist/contracts/runtime-api.d.ts +103 -56
- package/dist/contracts/runtime-api.js +67 -26
- package/dist/contracts/runtime-app.d.ts +2 -2
- package/dist/contracts/runtime-db.d.ts +6 -6
- package/dist/contracts/runtime-db.js +2 -2
- package/dist/contracts/runtime-purge.d.ts +8 -0
- package/dist/contracts/runtime-purge.js +7 -0
- package/dist/contracts/runtime-storage.d.ts +3 -2
- package/dist/contracts/runtime-storage.js +2 -1
- package/dist/contracts/sf-config-v1.d.ts +48 -10
- package/dist/contracts/space-config.d.ts +60 -3
- package/dist/contracts/space-config.js +213 -18
- package/dist/contracts/spaces.d.ts +55 -74
- package/dist/contracts/spaces.js +11 -14
- package/dist/contracts/superadmin-spaces.d.ts +9 -9
- package/dist/contracts/superadmin-teams.d.ts +2 -2
- package/dist/contracts/superadmin-tenants.d.ts +0 -6
- package/dist/contracts/superadmin-tenants.js +1 -7
- package/dist/contracts/superadmin.d.ts +135 -22
- package/dist/contracts/superadmin.js +43 -12
- package/dist/contracts/tags.d.ts +21 -21
- package/dist/contracts/tags.js +3 -3
- package/dist/contracts/teams.d.ts +14 -17
- package/dist/contracts/teams.js +6 -6
- package/dist/contracts/transfers.js +2 -2
- package/dist/contracts/variables.d.ts +4 -4
- package/dist/contracts/variables.js +3 -3
- package/dist/contracts/webhooks.d.ts +4 -4
- package/dist/contracts/zero.d.ts +15 -17
- package/dist/contracts/zero.js +12 -12
- package/dist/docs/agent-prose.d.ts +1 -1
- package/dist/docs/agent-prose.js +11 -14
- package/dist/docs/agent-setup.js +5 -2
- package/dist/docs/catalog.d.ts +7 -7
- package/dist/docs/catalog.js +7 -7
- package/dist/docs/error-docs.js +145 -133
- package/dist/docs/skills.d.ts +12 -12
- package/dist/docs/skills.js +4 -4
- package/dist/test-helpers/fetch-stub.js +1 -0
- package/dist/utils/build-settings.d.ts +5 -1
- package/dist/utils/build-settings.js +82 -10
- package/dist/utils/canonical-json.js +1 -0
- package/dist/utils/concurrency.js +1 -0
- package/dist/utils/credential-policy.js +4 -3
- package/dist/utils/dns-instructions.js +9 -9
- package/dist/utils/error-code.js +1 -0
- package/dist/utils/grant-decision.fixtures.json +2 -2
- package/dist/utils/grants.js +3 -1
- package/dist/utils/local-space-state.d.ts +8 -11
- package/dist/utils/local-space-state.js +13 -24
- package/dist/utils/one-shot-replay.d.ts +4 -1
- package/dist/utils/page-colors.d.ts +14 -12
- package/dist/utils/page-colors.js +15 -13
- package/dist/utils/page-fonts.d.ts +1 -1
- package/dist/utils/page-fonts.js +11 -18
- package/dist/utils/pages.d.ts +20 -1
- package/dist/utils/pages.js +22 -9
- package/dist/utils/publish-policy.d.ts +7 -0
- package/dist/utils/publish-policy.fixtures.json +11 -5
- package/dist/utils/publish-policy.js +9 -1
- package/dist/utils/query-keys.d.ts +4 -4
- package/dist/utils/query-keys.js +2 -2
- package/dist/utils/runtime-upload.d.ts +5 -0
- package/dist/utils/runtime-upload.js +7 -0
- package/dist/utils/secure-local-file.js +5 -16
- package/dist/utils/space-config.d.ts +1 -1
- package/dist/utils/space-config.js +3 -0
- package/dist/utils/static-runtime-policy.d.ts +9 -3
- package/dist/utils/static-runtime-policy.fixtures.json +38 -41
- package/dist/utils/static-runtime-policy.js +22 -56
- package/dist/utils/upload-session.d.ts +4 -1
- package/dist/utils/upload-session.js +33 -5
- package/dist/utils/version-path.js +1 -1
- package/dist/vocabulary.d.ts +8 -8
- package/dist/vocabulary.js +31 -20
- package/package.json +2 -17
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { AnyObjectSchema, CursorPaginationSchema, cursorListQuerySchema } from "./common.js";
|
|
3
|
-
// The single event taxonomy (
|
|
3
|
+
// The single event taxonomy (the platform spec "Event taxonomy").
|
|
4
4
|
// Every emitted activity event and every webhook `events` filter selects on
|
|
5
5
|
// these codes.
|
|
6
6
|
// `appendActivityEvent` is typed against this list, so emitting a code that is
|
|
@@ -75,6 +75,8 @@ export const ACTIVITY_EVENT_CODES = [
|
|
|
75
75
|
"transfer.canceled",
|
|
76
76
|
"transfer.expired",
|
|
77
77
|
"transfer.failed",
|
|
78
|
+
// cron (only failures are reported; a run that succeeds is silent)
|
|
79
|
+
"cron.failed",
|
|
78
80
|
// variable (key-level only; never values)
|
|
79
81
|
"variable.updated",
|
|
80
82
|
"variable.deleted",
|
|
@@ -115,12 +117,12 @@ export const ACTIVITY_EVENT_CODES = [
|
|
|
115
117
|
"abuse_report.created",
|
|
116
118
|
"abuse_report.updated",
|
|
117
119
|
// claim (additive extension: a claim attempt against a taken-down space is
|
|
118
|
-
// flagged, never silently 404ed —
|
|
120
|
+
// flagged, never silently 404ed — the platform spec "Abuse Posture")
|
|
119
121
|
"claim.blocked_takedown",
|
|
120
122
|
"claim.authority_rotated",
|
|
121
123
|
// user (additive extension: account lifecycle plus the 2FA and
|
|
122
124
|
// admin-impersonation effects that must surface through ActivityEvent —
|
|
123
|
-
//
|
|
125
|
+
// the platform spec Better Auth usage). `user.created` fires once on
|
|
124
126
|
// signup; `user.signed_in` fires per non-impersonation session creation;
|
|
125
127
|
// `user.deleted` fires on account deletion and retains the analyticsId in
|
|
126
128
|
// its details so right-to-erasure can be completed in every provider.
|
|
@@ -149,7 +149,7 @@ export const ApiKeyPresetSchema = z
|
|
|
149
149
|
])
|
|
150
150
|
.describe("Named policy preset compiled into a concrete access policy when the key is created.");
|
|
151
151
|
// `system` is never a principal type: runtime/internal credentials are
|
|
152
|
-
// platform-owned and omit ownerPrincipal entirely (
|
|
152
|
+
// platform-owned and omit ownerPrincipal entirely (the platform spec).
|
|
153
153
|
const ApiKeyOwnerPrincipalSchema = z.object({
|
|
154
154
|
type: z.enum(["team", "external"]).describe("Principal type that owns this key."),
|
|
155
155
|
id: z.string().min(1).describe("Stable principal id (Better Auth team id, or external id)."),
|
|
@@ -239,7 +239,7 @@ export const ApiKeyPatchRequestSchema = z
|
|
|
239
239
|
.refine((value) => Object.keys(value).length > 0, {
|
|
240
240
|
message: "At least one mutable API key field is required.",
|
|
241
241
|
});
|
|
242
|
-
// Target §5C contract (internal
|
|
242
|
+
// Target §5C contract (the internal plan
|
|
243
243
|
// "API key: finite permissions, no broad role"): key creation selects an
|
|
244
244
|
// explicit, finite scope and permission set — never a team-wide role that
|
|
245
245
|
// falls out of an omitted field. This is deliberately a DISJOINT shape from
|
|
@@ -10,6 +10,7 @@ export declare const billingIntervalSchema: z.ZodEnum<{
|
|
|
10
10
|
yearly: "yearly";
|
|
11
11
|
}>;
|
|
12
12
|
export type BillingIntervalValue = z.infer<typeof billingIntervalSchema>;
|
|
13
|
+
export declare const stripeSyncEventTypes: readonly ["checkout.session.completed", "checkout.session.expired", "checkout.session.async_payment_succeeded", "checkout.session.async_payment_failed", "customer.subscription.created", "customer.subscription.updated", "customer.subscription.paused", "customer.subscription.resumed", "customer.subscription.deleted", "customer.subscription.trial_will_end", "invoice.created", "invoice.finalized", "invoice.updated", "invoice.paid", "invoice.payment_succeeded", "invoice.payment_failed", "invoice.marked_uncollectible", "invoice.voided", "refund.created", "refund.updated", "charge.dispute.created", "charge.dispute.updated", "charge.dispute.closed", "charge.dispute.funds_withdrawn", "charge.dispute.funds_reinstated"];
|
|
13
14
|
export declare const billingTransactionKindValues: readonly ["purchase", "renewal", "refund", "adjustment"];
|
|
14
15
|
export declare const billingTransactionKindSchema: z.ZodEnum<{
|
|
15
16
|
purchase: "purchase";
|
|
@@ -30,9 +31,9 @@ export type BillingTransactionScope = z.infer<typeof billingTransactionScopeSche
|
|
|
30
31
|
export declare const billingAddonSourceValues: readonly ["grant", "stripe"];
|
|
31
32
|
export declare const billingAddonLimitKeyValues: readonly ["teamMembers", "subTeams", "storageBytes", "externalDomainGroups"];
|
|
32
33
|
export declare const billingAddonLimitKeySchema: z.ZodEnum<{
|
|
34
|
+
storageBytes: "storageBytes";
|
|
33
35
|
teamMembers: "teamMembers";
|
|
34
36
|
subTeams: "subTeams";
|
|
35
|
-
storageBytes: "storageBytes";
|
|
36
37
|
externalDomainGroups: "externalDomainGroups";
|
|
37
38
|
}>;
|
|
38
39
|
export type BillingAddonLimitKey = z.infer<typeof billingAddonLimitKeySchema>;
|
|
@@ -7,6 +7,36 @@ export const billingProviderValues = ["stripe", "grant"];
|
|
|
7
7
|
export const billingProviderSchema = z.enum(billingProviderValues).describe("Billing provider.");
|
|
8
8
|
export const billingIntervalValues = ["monthly", "yearly"];
|
|
9
9
|
export const billingIntervalSchema = z.enum(billingIntervalValues);
|
|
10
|
+
// Keep Stripe endpoint subscriptions and the webhook intake allowlist on one
|
|
11
|
+
// contract. The environment setup command imports this exact list, so adding a
|
|
12
|
+
// new processor event cannot leave deployed webhook endpoints behind.
|
|
13
|
+
export const stripeSyncEventTypes = [
|
|
14
|
+
"checkout.session.completed",
|
|
15
|
+
"checkout.session.expired",
|
|
16
|
+
"checkout.session.async_payment_succeeded",
|
|
17
|
+
"checkout.session.async_payment_failed",
|
|
18
|
+
"customer.subscription.created",
|
|
19
|
+
"customer.subscription.updated",
|
|
20
|
+
"customer.subscription.paused",
|
|
21
|
+
"customer.subscription.resumed",
|
|
22
|
+
"customer.subscription.deleted",
|
|
23
|
+
"customer.subscription.trial_will_end",
|
|
24
|
+
"invoice.created",
|
|
25
|
+
"invoice.finalized",
|
|
26
|
+
"invoice.updated",
|
|
27
|
+
"invoice.paid",
|
|
28
|
+
"invoice.payment_succeeded",
|
|
29
|
+
"invoice.payment_failed",
|
|
30
|
+
"invoice.marked_uncollectible",
|
|
31
|
+
"invoice.voided",
|
|
32
|
+
"refund.created",
|
|
33
|
+
"refund.updated",
|
|
34
|
+
"charge.dispute.created",
|
|
35
|
+
"charge.dispute.updated",
|
|
36
|
+
"charge.dispute.closed",
|
|
37
|
+
"charge.dispute.funds_withdrawn",
|
|
38
|
+
"charge.dispute.funds_reinstated",
|
|
39
|
+
];
|
|
10
40
|
// Transaction ledger vocabulary. Every REAL payment event lands as one row —
|
|
11
41
|
// operator grants never do (no transactions by definition). Amounts are
|
|
12
42
|
// micros of the payment currency (1_000_000 micros = 1 unit) so Stripe cents
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
export declare const BuildSettingsOverrideSchema: z.ZodObject<{
|
|
3
|
+
rootDirectory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4
|
+
installDirectory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5
|
+
installCommand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6
|
+
buildCommand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7
|
+
outputDirectory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8
|
+
ignoredBuildCommand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9
|
+
frameworkPreset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
10
|
+
platformPreset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
11
|
+
allowUnsupportedPlatformFeatures: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
+
timeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
}, z.core.$strip>;
|
|
2
14
|
export declare const BuildSettingsSchema: z.ZodObject<{
|
|
3
15
|
rootDirectory: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
4
16
|
installDirectory: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -181,14 +193,14 @@ export declare const BuildSchema: z.ZodObject<{
|
|
|
181
193
|
code: z.ZodString;
|
|
182
194
|
severity: z.ZodEnum<{
|
|
183
195
|
info: "info";
|
|
184
|
-
warning: "warning";
|
|
185
196
|
error: "error";
|
|
197
|
+
warning: "warning";
|
|
186
198
|
}>;
|
|
187
199
|
message: z.ZodString;
|
|
188
200
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
189
201
|
provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
190
202
|
registrar: "registrar";
|
|
191
|
-
|
|
203
|
+
infra: "infra";
|
|
192
204
|
dns: "dns";
|
|
193
205
|
runtime: "runtime";
|
|
194
206
|
}>>>;
|
|
@@ -213,16 +225,16 @@ export declare const buildCreateRequestSchema: z.ZodObject<{
|
|
|
213
225
|
pullRequestNumber: z.ZodOptional<z.ZodNumber>;
|
|
214
226
|
}, z.core.$strip>], "kind">;
|
|
215
227
|
settings: z.ZodOptional<z.ZodObject<{
|
|
216
|
-
rootDirectory: z.ZodOptional<z.
|
|
217
|
-
installDirectory: z.ZodOptional<z.
|
|
218
|
-
installCommand: z.ZodOptional<z.
|
|
219
|
-
buildCommand: z.ZodOptional<z.
|
|
220
|
-
outputDirectory: z.ZodOptional<z.
|
|
221
|
-
ignoredBuildCommand: z.ZodOptional<z.
|
|
222
|
-
frameworkPreset: z.ZodOptional<z.
|
|
223
|
-
platformPreset: z.ZodOptional<z.
|
|
224
|
-
allowUnsupportedPlatformFeatures: z.ZodOptional<z.
|
|
225
|
-
timeoutSeconds: z.ZodOptional<z.
|
|
228
|
+
rootDirectory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
229
|
+
installDirectory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
230
|
+
installCommand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
231
|
+
buildCommand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
232
|
+
outputDirectory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
233
|
+
ignoredBuildCommand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
234
|
+
frameworkPreset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
235
|
+
platformPreset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
236
|
+
allowUnsupportedPlatformFeatures: z.ZodOptional<z.ZodBoolean>;
|
|
237
|
+
timeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
226
238
|
}, z.core.$strip>>;
|
|
227
239
|
target: z.ZodOptional<z.ZodObject<{
|
|
228
240
|
channel: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
|
|
@@ -232,14 +244,14 @@ export declare const buildCreateRequestSchema: z.ZodObject<{
|
|
|
232
244
|
code: z.ZodString;
|
|
233
245
|
severity: z.ZodEnum<{
|
|
234
246
|
info: "info";
|
|
235
|
-
warning: "warning";
|
|
236
247
|
error: "error";
|
|
248
|
+
warning: "warning";
|
|
237
249
|
}>;
|
|
238
250
|
message: z.ZodString;
|
|
239
251
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
240
252
|
provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
241
253
|
registrar: "registrar";
|
|
242
|
-
|
|
254
|
+
infra: "infra";
|
|
243
255
|
dns: "dns";
|
|
244
256
|
runtime: "runtime";
|
|
245
257
|
}>>>;
|
|
@@ -295,14 +307,14 @@ export declare const buildSourceArchiveUploadSchema: z.ZodObject<{
|
|
|
295
307
|
code: z.ZodString;
|
|
296
308
|
severity: z.ZodEnum<{
|
|
297
309
|
info: "info";
|
|
298
|
-
warning: "warning";
|
|
299
310
|
error: "error";
|
|
311
|
+
warning: "warning";
|
|
300
312
|
}>;
|
|
301
313
|
message: z.ZodString;
|
|
302
314
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
303
315
|
provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
304
316
|
registrar: "registrar";
|
|
305
|
-
|
|
317
|
+
infra: "infra";
|
|
306
318
|
dns: "dns";
|
|
307
319
|
runtime: "runtime";
|
|
308
320
|
}>>>;
|
|
@@ -359,14 +371,14 @@ export declare const buildCreateResponseSchema: z.ZodObject<{
|
|
|
359
371
|
code: z.ZodString;
|
|
360
372
|
severity: z.ZodEnum<{
|
|
361
373
|
info: "info";
|
|
362
|
-
warning: "warning";
|
|
363
374
|
error: "error";
|
|
375
|
+
warning: "warning";
|
|
364
376
|
}>;
|
|
365
377
|
message: z.ZodString;
|
|
366
378
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
367
379
|
provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
368
380
|
registrar: "registrar";
|
|
369
|
-
|
|
381
|
+
infra: "infra";
|
|
370
382
|
dns: "dns";
|
|
371
383
|
runtime: "runtime";
|
|
372
384
|
}>>>;
|
|
@@ -424,14 +436,14 @@ export declare const buildCreateResponseSchema: z.ZodObject<{
|
|
|
424
436
|
code: z.ZodString;
|
|
425
437
|
severity: z.ZodEnum<{
|
|
426
438
|
info: "info";
|
|
427
|
-
warning: "warning";
|
|
428
439
|
error: "error";
|
|
440
|
+
warning: "warning";
|
|
429
441
|
}>;
|
|
430
442
|
message: z.ZodString;
|
|
431
443
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
432
444
|
provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
433
445
|
registrar: "registrar";
|
|
434
|
-
|
|
446
|
+
infra: "infra";
|
|
435
447
|
dns: "dns";
|
|
436
448
|
runtime: "runtime";
|
|
437
449
|
}>>>;
|
|
@@ -493,14 +505,14 @@ export declare const buildListResponseSchema: z.ZodObject<{
|
|
|
493
505
|
code: z.ZodString;
|
|
494
506
|
severity: z.ZodEnum<{
|
|
495
507
|
info: "info";
|
|
496
|
-
warning: "warning";
|
|
497
508
|
error: "error";
|
|
509
|
+
warning: "warning";
|
|
498
510
|
}>;
|
|
499
511
|
message: z.ZodString;
|
|
500
512
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
501
513
|
provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
502
514
|
registrar: "registrar";
|
|
503
|
-
|
|
515
|
+
infra: "infra";
|
|
504
516
|
dns: "dns";
|
|
505
517
|
runtime: "runtime";
|
|
506
518
|
}>>>;
|
package/dist/contracts/builds.js
CHANGED
|
@@ -4,16 +4,30 @@ import { buildStatus } from "./enums.js";
|
|
|
4
4
|
import { uploadInstructionsSchema } from "./internal.js";
|
|
5
5
|
import { versionLogEntrySchema } from "./spaces.js";
|
|
6
6
|
const nullableCommandSchema = z.string().trim().min(1).nullable();
|
|
7
|
-
const buildTimeoutSecondsSchema = z.number().int().min(60).max(7200)
|
|
7
|
+
const buildTimeoutSecondsSchema = z.number().int().min(60).max(7200);
|
|
8
8
|
const scpStyleGitRemotePattern = /^[^@\s/:]+@[^:\s]+:[^\s]+$/;
|
|
9
9
|
const gitCloneUrlSchema = z
|
|
10
10
|
.string()
|
|
11
11
|
.trim()
|
|
12
12
|
.min(1)
|
|
13
13
|
.refine((value) => scpStyleGitRemotePattern.test(value) || z.string().url().safeParse(value).success, "Clone URL must be a URL or scp-style Git remote.");
|
|
14
|
-
// Build (`bld_`,
|
|
14
|
+
// Build (`bld_`, the platform spec "Build"): a first-class resource with
|
|
15
15
|
// its own table; ids are opaque and NEVER derived from version ids. The runner
|
|
16
16
|
// mints the produced version through the normal finalize path.
|
|
17
|
+
export const BuildSettingsOverrideSchema = z
|
|
18
|
+
.object({
|
|
19
|
+
rootDirectory: nullableCommandSchema.optional(),
|
|
20
|
+
installDirectory: nullableCommandSchema.optional(),
|
|
21
|
+
installCommand: nullableCommandSchema.optional(),
|
|
22
|
+
buildCommand: nullableCommandSchema.optional(),
|
|
23
|
+
outputDirectory: nullableCommandSchema.optional(),
|
|
24
|
+
ignoredBuildCommand: nullableCommandSchema.optional(),
|
|
25
|
+
frameworkPreset: nullableCommandSchema.optional(),
|
|
26
|
+
platformPreset: nullableCommandSchema.optional(),
|
|
27
|
+
allowUnsupportedPlatformFeatures: z.boolean().optional(),
|
|
28
|
+
timeoutSeconds: buildTimeoutSecondsSchema.optional(),
|
|
29
|
+
})
|
|
30
|
+
.describe("Sparse per-request build setting overrides applied over saved settings.");
|
|
17
31
|
export const BuildSettingsSchema = z
|
|
18
32
|
.object({
|
|
19
33
|
rootDirectory: nullableCommandSchema.default(null),
|
|
@@ -25,7 +39,7 @@ export const BuildSettingsSchema = z
|
|
|
25
39
|
frameworkPreset: nullableCommandSchema.default(null),
|
|
26
40
|
platformPreset: nullableCommandSchema.default(null),
|
|
27
41
|
allowUnsupportedPlatformFeatures: z.boolean().default(false),
|
|
28
|
-
timeoutSeconds: buildTimeoutSecondsSchema,
|
|
42
|
+
timeoutSeconds: buildTimeoutSecondsSchema.default(900),
|
|
29
43
|
})
|
|
30
44
|
.describe("Resolved build settings. Builds persist this as an immutable `settingsSnapshot`.");
|
|
31
45
|
export const BuildTargetSchema = z
|
|
@@ -226,9 +240,7 @@ export const BuildSchema = z.object({
|
|
|
226
240
|
});
|
|
227
241
|
export const buildCreateRequestSchema = z.object({
|
|
228
242
|
input: BuildCreateInputSchema,
|
|
229
|
-
settings:
|
|
230
|
-
.optional()
|
|
231
|
-
.describe("Per-run settings overrides, persisted as `settingsSnapshot` after resolution."),
|
|
243
|
+
settings: BuildSettingsOverrideSchema.optional().describe("Per-run settings overrides, persisted as `settingsSnapshot` after resolution."),
|
|
232
244
|
target: BuildTargetSchema.partial().optional(),
|
|
233
245
|
diagnostics: z
|
|
234
246
|
.array(baseDiagnosticSchema)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
// Channels READ surface (
|
|
2
|
+
// Channels READ surface (the platform spec "Channels"): a read-only
|
|
3
3
|
// projection over the existing `channels` table and the `channel.promoted`
|
|
4
4
|
// activity log. No writes, no new storage — promotion stays owned by the
|
|
5
5
|
// publish/version lifecycle. Additive only.
|
|
@@ -261,8 +261,8 @@ export declare const noticePublishSchema: z.ZodObject<{
|
|
|
261
261
|
level: z.ZodDefault<z.ZodEnum<{
|
|
262
262
|
info: "info";
|
|
263
263
|
success: "success";
|
|
264
|
-
warning: "warning";
|
|
265
264
|
error: "error";
|
|
265
|
+
warning: "warning";
|
|
266
266
|
}>>;
|
|
267
267
|
payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
268
268
|
}, z.core.$strip>;
|
|
@@ -9,14 +9,14 @@ export declare const baseDiagnosticSchema: z.ZodObject<{
|
|
|
9
9
|
code: z.ZodString;
|
|
10
10
|
severity: z.ZodEnum<{
|
|
11
11
|
info: "info";
|
|
12
|
-
warning: "warning";
|
|
13
12
|
error: "error";
|
|
13
|
+
warning: "warning";
|
|
14
14
|
}>;
|
|
15
15
|
message: z.ZodString;
|
|
16
16
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
17
17
|
provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
18
18
|
registrar: "registrar";
|
|
19
|
-
|
|
19
|
+
infra: "infra";
|
|
20
20
|
dns: "dns";
|
|
21
21
|
runtime: "runtime";
|
|
22
22
|
}>>>;
|
|
@@ -176,14 +176,14 @@ export declare const AsyncOperationSchema: z.ZodObject<{
|
|
|
176
176
|
code: z.ZodString;
|
|
177
177
|
severity: z.ZodEnum<{
|
|
178
178
|
info: "info";
|
|
179
|
-
warning: "warning";
|
|
180
179
|
error: "error";
|
|
180
|
+
warning: "warning";
|
|
181
181
|
}>;
|
|
182
182
|
message: z.ZodString;
|
|
183
183
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
184
184
|
provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
185
185
|
registrar: "registrar";
|
|
186
|
-
|
|
186
|
+
infra: "infra";
|
|
187
187
|
dns: "dns";
|
|
188
188
|
runtime: "runtime";
|
|
189
189
|
}>>>;
|
|
@@ -220,14 +220,14 @@ export declare function mutationEnvelope<T extends z.ZodType>(data: T): z.ZodObj
|
|
|
220
220
|
code: z.ZodString;
|
|
221
221
|
severity: z.ZodEnum<{
|
|
222
222
|
info: "info";
|
|
223
|
-
warning: "warning";
|
|
224
223
|
error: "error";
|
|
224
|
+
warning: "warning";
|
|
225
225
|
}>;
|
|
226
226
|
message: z.ZodString;
|
|
227
227
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
228
228
|
provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
229
229
|
registrar: "registrar";
|
|
230
|
-
|
|
230
|
+
infra: "infra";
|
|
231
231
|
dns: "dns";
|
|
232
232
|
runtime: "runtime";
|
|
233
233
|
}>>>;
|
package/dist/contracts/common.js
CHANGED
|
@@ -6,7 +6,7 @@ export const SpaceViewerSchema = z.object({
|
|
|
6
6
|
description: z.string().nullable(),
|
|
7
7
|
ogImagePath: z.string().nullable(),
|
|
8
8
|
});
|
|
9
|
-
// The ONE Diagnostic shape (
|
|
9
|
+
// The ONE Diagnostic shape (the platform spec). Every lifecycle
|
|
10
10
|
// resource (versions, builds, bindings, assignments, exports, imports, transfers)
|
|
11
11
|
// carries `diagnostics: Diagnostic[]` using exactly this vocabulary.
|
|
12
12
|
export const baseDiagnosticSchema = z.object({
|
|
@@ -32,7 +32,7 @@ export const baseDiagnosticSchema = z.object({
|
|
|
32
32
|
.nullish()
|
|
33
33
|
.describe("Whether retrying the same operation can resolve this diagnostic without the caller changing anything."),
|
|
34
34
|
});
|
|
35
|
-
// Canonical DnsInstruction (
|
|
35
|
+
// Canonical DnsInstruction (the platform spec): provider vocabulary
|
|
36
36
|
// never leaks into `purpose`.
|
|
37
37
|
export const DnsInstructionSchema = z.object({
|
|
38
38
|
type: z.enum(["A", "AAAA", "CNAME", "TXT", "ALIAS"]),
|
|
@@ -41,7 +41,7 @@ export const DnsInstructionSchema = z.object({
|
|
|
41
41
|
ttl: z.number().int().optional(),
|
|
42
42
|
purpose: z.enum(["verification", "routing", "ssl"]).describe("Why this record is needed."),
|
|
43
43
|
});
|
|
44
|
-
// One shared requiredActions vocabulary (
|
|
44
|
+
// One shared requiredActions vocabulary (the platform spec):
|
|
45
45
|
// lifecycle resources expose the concrete user steps that unblock them. New action types are
|
|
46
46
|
// added HERE, never as per-resource variants.
|
|
47
47
|
export const requiredActionSchema = z.discriminatedUnion("type", [
|
|
@@ -64,7 +64,7 @@ export const requiredActionSchema = z.discriminatedUnion("type", [
|
|
|
64
64
|
export const requiredActionsSchema = z
|
|
65
65
|
.array(requiredActionSchema)
|
|
66
66
|
.describe("Concrete user steps that unblock this resource, using the one shared vocabulary.");
|
|
67
|
-
// The error shape (
|
|
67
|
+
// The error shape (the platform spec "Global API Conventions"): every 4xx/5xx body
|
|
68
68
|
// is one RFC 9457 problem details document served as `application/problem+json`. `type` and
|
|
69
69
|
// `title` are derived mechanically from `code` (see contracts/error-codes.ts); `code`,
|
|
70
70
|
// `pointer` (RFC 6901), `details`, `suggestions`, `next`, and `requestId` are extension members.
|
|
@@ -93,7 +93,7 @@ export const ProblemDetailsSchema = z.object({
|
|
|
93
93
|
.describe("Copy-pasteable commands or API requests an agent can run next."),
|
|
94
94
|
requestId: z.string().describe("The request id to quote when contacting support."),
|
|
95
95
|
});
|
|
96
|
-
// Success envelope (
|
|
96
|
+
// Success envelope (the platform spec "Global API Conventions"): `{ data: T }` for
|
|
97
97
|
// single resources and mutations, `{ data: T[], pagination }` for lists. Mutations whose work
|
|
98
98
|
// outlives the request also carry `operation` — wrap with `.extend({ operation: ... })`.
|
|
99
99
|
export function dataEnvelope(data) {
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const spaceCronFailureSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
occurredAt: z.ZodString;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export type SpaceCronFailure = z.infer<typeof spaceCronFailureSchema>;
|
|
7
|
+
export declare const spaceCronListItemSchema: z.ZodObject<{
|
|
8
|
+
key: z.ZodString;
|
|
9
|
+
path: z.ZodString;
|
|
10
|
+
schedule: z.ZodString;
|
|
11
|
+
recentFailures: z.ZodArray<z.ZodObject<{
|
|
12
|
+
id: z.ZodString;
|
|
13
|
+
occurredAt: z.ZodString;
|
|
14
|
+
}, z.core.$strip>>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
export type SpaceCronListItem = z.infer<typeof spaceCronListItemSchema>;
|
|
17
|
+
export declare const spaceCronsResponseSchema: z.ZodObject<{
|
|
18
|
+
data: z.ZodObject<{
|
|
19
|
+
versionId: z.ZodNullable<z.ZodString>;
|
|
20
|
+
crons: z.ZodArray<z.ZodObject<{
|
|
21
|
+
key: z.ZodString;
|
|
22
|
+
path: z.ZodString;
|
|
23
|
+
schedule: z.ZodString;
|
|
24
|
+
recentFailures: z.ZodArray<z.ZodObject<{
|
|
25
|
+
id: z.ZodString;
|
|
26
|
+
occurredAt: z.ZodString;
|
|
27
|
+
}, z.core.$strip>>;
|
|
28
|
+
}, z.core.$strip>>;
|
|
29
|
+
unattributedFailures: z.ZodArray<z.ZodObject<{
|
|
30
|
+
id: z.ZodString;
|
|
31
|
+
occurredAt: z.ZodString;
|
|
32
|
+
}, z.core.$strip>>;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export type SpaceCronsResponse = z.infer<typeof spaceCronsResponseSchema>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
// Crons READ surface: what the live version declares, plus what has failed.
|
|
3
|
+
//
|
|
4
|
+
// There is no write side and there will not be one. `crons` is an sf.jsonc key,
|
|
5
|
+
// so the config file is the only writer and a publish is the only edit — which
|
|
6
|
+
// is what makes a rollback restore the previous schedules for free. This
|
|
7
|
+
// projection exists so a human or an agent can ask what is actually scheduled
|
|
8
|
+
// right now without re-reading the file they think they published.
|
|
9
|
+
// One reported failure. Deliberately just an identity and an instant: the
|
|
10
|
+
// platform's own report of a failed run carries a payload whose shape is not
|
|
11
|
+
// pinned yet, and guessing fields into a public contract now would freeze the
|
|
12
|
+
// wrong ones. A timestamp is what both the CLI table and "did my cron break?"
|
|
13
|
+
// actually need; the space's activity feed carries the narrative.
|
|
14
|
+
export const spaceCronFailureSchema = z.object({
|
|
15
|
+
id: z.string().describe("Identifier of this failure report."),
|
|
16
|
+
occurredAt: z.string().datetime().describe("Instant the failure was reported."),
|
|
17
|
+
});
|
|
18
|
+
// One scheduled entry, exactly as the live version declared it. `key` is the
|
|
19
|
+
// path's slug and is what names this entry everywhere else — the CLI argument,
|
|
20
|
+
// the failure reports, the platform's own bookkeeping.
|
|
21
|
+
export const spaceCronListItemSchema = z.object({
|
|
22
|
+
key: z.string().describe("Stable identifier for this entry, derived from its path."),
|
|
23
|
+
path: z.string().describe("Path on this space that gets requested."),
|
|
24
|
+
schedule: z
|
|
25
|
+
.string()
|
|
26
|
+
.describe("Schedule as declared, verbatim: named, an Nh/Nd/Nw interval, or a five-field crontab expression."),
|
|
27
|
+
recentFailures: z
|
|
28
|
+
.array(spaceCronFailureSchema)
|
|
29
|
+
.describe("Most recent failures reported for this entry, newest first. Empty when it has not failed."),
|
|
30
|
+
});
|
|
31
|
+
export const spaceCronsResponseSchema = z.object({
|
|
32
|
+
data: z.object({
|
|
33
|
+
versionId: z
|
|
34
|
+
.string()
|
|
35
|
+
.nullable()
|
|
36
|
+
.describe("Live version these declarations come from, or null before the first publish."),
|
|
37
|
+
crons: z.array(spaceCronListItemSchema),
|
|
38
|
+
unattributedFailures: z
|
|
39
|
+
.array(spaceCronFailureSchema)
|
|
40
|
+
.describe("Failures that could not be tied to one entry, newest first. A cron removed from the config can still have failed while it was live."),
|
|
41
|
+
}),
|
|
42
|
+
});
|
|
@@ -3,7 +3,7 @@ import { AGENT_HANDOFF_DECLINE_REASONS } from "../docs/agent-setup.js";
|
|
|
3
3
|
import { ApiKeyPresetSchema, ApiKeySchema } from "./api-keys.js";
|
|
4
4
|
import { DeviceTeamScopeSchema } from "./device-team-scope.js";
|
|
5
5
|
export { DeviceTeamScopeSchema } from "./device-team-scope.js";
|
|
6
|
-
// Device authorization flow (
|
|
6
|
+
// Device authorization flow (the platform spec Credential Bootstrap):
|
|
7
7
|
// `POST /v1/auth/device` starts the flow, `POST /v1/auth/device/poll` redeems
|
|
8
8
|
// it. Device codes are bearer capabilities: they ride POST bodies only, are
|
|
9
9
|
// never logged, and redeem exactly once. User codes are short display codes the
|
package/dist/contracts/docs.d.ts
CHANGED
|
@@ -11,8 +11,8 @@ export declare const docsIndexQuerySchema: z.ZodObject<{
|
|
|
11
11
|
category: z.ZodOptional<z.ZodEnum<{
|
|
12
12
|
guide: "guide";
|
|
13
13
|
api: "api";
|
|
14
|
-
cli: "cli";
|
|
15
14
|
error: "error";
|
|
15
|
+
cli: "cli";
|
|
16
16
|
workflow: "workflow";
|
|
17
17
|
recipe: "recipe";
|
|
18
18
|
}>>;
|
|
@@ -30,8 +30,8 @@ export declare const DocsEntrySchema: z.ZodObject<{
|
|
|
30
30
|
category: z.ZodEnum<{
|
|
31
31
|
guide: "guide";
|
|
32
32
|
api: "api";
|
|
33
|
-
cli: "cli";
|
|
34
33
|
error: "error";
|
|
34
|
+
cli: "cli";
|
|
35
35
|
workflow: "workflow";
|
|
36
36
|
recipe: "recipe";
|
|
37
37
|
}>;
|
|
@@ -56,8 +56,8 @@ export declare const DocsDocSchema: z.ZodObject<{
|
|
|
56
56
|
category: z.ZodEnum<{
|
|
57
57
|
guide: "guide";
|
|
58
58
|
api: "api";
|
|
59
|
-
cli: "cli";
|
|
60
59
|
error: "error";
|
|
60
|
+
cli: "cli";
|
|
61
61
|
workflow: "workflow";
|
|
62
62
|
recipe: "recipe";
|
|
63
63
|
}>;
|
|
@@ -86,8 +86,8 @@ export declare const DocsIndexResponseSchema: z.ZodObject<{
|
|
|
86
86
|
category: z.ZodNullable<z.ZodEnum<{
|
|
87
87
|
guide: "guide";
|
|
88
88
|
api: "api";
|
|
89
|
-
cli: "cli";
|
|
90
89
|
error: "error";
|
|
90
|
+
cli: "cli";
|
|
91
91
|
workflow: "workflow";
|
|
92
92
|
recipe: "recipe";
|
|
93
93
|
}>>;
|
|
@@ -99,8 +99,8 @@ export declare const DocsIndexResponseSchema: z.ZodObject<{
|
|
|
99
99
|
category: z.ZodEnum<{
|
|
100
100
|
guide: "guide";
|
|
101
101
|
api: "api";
|
|
102
|
-
cli: "cli";
|
|
103
102
|
error: "error";
|
|
103
|
+
cli: "cli";
|
|
104
104
|
workflow: "workflow";
|
|
105
105
|
recipe: "recipe";
|
|
106
106
|
}>;
|
package/dist/contracts/docs.js
CHANGED
|
@@ -19,7 +19,7 @@ export const docsIndexQuerySchema = z.object({
|
|
|
19
19
|
.describe("Disclosure tier to list. `essential` (default) shows the core pages; `full` adds advanced pages; `reference` returns everything."),
|
|
20
20
|
category: docCategoryEnum
|
|
21
21
|
.optional()
|
|
22
|
-
.describe("Restrict to one docs area: guide
|
|
22
|
+
.describe("Restrict to one docs area: `guide`, `cli`, `api`, `recipe`, `workflow`, or `error`."),
|
|
23
23
|
});
|
|
24
24
|
/** Links carried by every docs entry. */
|
|
25
25
|
export const DocsLinksSchema = z.object({
|
|
@@ -28,7 +28,7 @@ export const DocsLinksSchema = z.object({
|
|
|
28
28
|
});
|
|
29
29
|
/** One entry in the docs index. */
|
|
30
30
|
export const DocsEntrySchema = z.object({
|
|
31
|
-
slug: z.string().describe("Stable topic id,
|
|
31
|
+
slug: z.string().describe("Stable topic id, for example `publishing` or `api/spaces`."),
|
|
32
32
|
title: z.string(),
|
|
33
33
|
summary: z.string(),
|
|
34
34
|
category: docCategoryEnum,
|