@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.
Files changed (145) hide show
  1. package/brand-assets/LICENSE-Haskoy.txt +93 -0
  2. package/brand-assets/haskoy-latin-variable.woff2 +0 -0
  3. package/brand-assets/spacefast-favicon.svg +4 -4
  4. package/brand-assets/spacefast-sf-full-bleed.svg +3 -3
  5. package/brand-assets/spacefast-wordmark.svg +2 -4
  6. package/dist/agents/connect-targets.js +1 -1
  7. package/dist/agents/private-key-oauth.d.ts +0 -1
  8. package/dist/agents/private-key-oauth.js +46 -63
  9. package/dist/brand-assets-build.js +4 -6
  10. package/dist/brand-assets.d.ts +5 -15
  11. package/dist/brand-assets.js +15 -14
  12. package/dist/config/domains.d.ts +47 -7
  13. package/dist/config/domains.js +65 -10
  14. package/dist/contracts/access.d.ts +3 -3
  15. package/dist/contracts/activity.d.ts +1 -1
  16. package/dist/contracts/activity.js +5 -3
  17. package/dist/contracts/api-keys.js +2 -2
  18. package/dist/contracts/billing.d.ts +2 -1
  19. package/dist/contracts/billing.js +30 -0
  20. package/dist/contracts/builds.d.ts +34 -22
  21. package/dist/contracts/builds.js +18 -6
  22. package/dist/contracts/channels.js +1 -1
  23. package/dist/contracts/comments.d.ts +1 -1
  24. package/dist/contracts/common.d.ts +6 -6
  25. package/dist/contracts/common.js +5 -5
  26. package/dist/contracts/crons.d.ts +35 -0
  27. package/dist/contracts/crons.js +42 -0
  28. package/dist/contracts/device-auth.js +1 -1
  29. package/dist/contracts/docs.d.ts +5 -5
  30. package/dist/contracts/docs.js +2 -2
  31. package/dist/contracts/domains.d.ts +74 -63
  32. package/dist/contracts/domains.js +29 -2
  33. package/dist/contracts/enums.d.ts +3 -2
  34. package/dist/contracts/enums.js +10 -10
  35. package/dist/contracts/error-code-meta.d.ts +14 -0
  36. package/dist/contracts/error-code-meta.js +17 -0
  37. package/dist/contracts/error-codes.d.ts +1 -1
  38. package/dist/contracts/error-codes.js +4 -1
  39. package/dist/contracts/execution.d.ts +15 -12
  40. package/dist/contracts/execution.js +15 -12
  41. package/dist/contracts/feature-lifecycle.d.ts +4 -14
  42. package/dist/contracts/feature-lifecycle.js +0 -11
  43. package/dist/contracts/features.d.ts +33 -47
  44. package/dist/contracts/features.js +27 -20
  45. package/dist/contracts/functions.d.ts +169 -2
  46. package/dist/contracts/functions.js +160 -4
  47. package/dist/contracts/git.d.ts +27 -33
  48. package/dist/contracts/git.js +10 -11
  49. package/dist/contracts/grants.d.ts +2 -2
  50. package/dist/contracts/ids.js +2 -2
  51. package/dist/contracts/internal.d.ts +5 -16
  52. package/dist/contracts/internal.js +2 -12
  53. package/dist/contracts/mcp.d.ts +11 -0
  54. package/dist/contracts/mcp.js +5 -0
  55. package/dist/contracts/me.js +1 -1
  56. package/dist/contracts/operations.d.ts +4 -4
  57. package/dist/contracts/operations.js +2 -2
  58. package/dist/contracts/pages.d.ts +6 -6
  59. package/dist/contracts/plan-policy.d.ts +1 -1
  60. package/dist/contracts/plan-policy.js +1 -1
  61. package/dist/contracts/platform.d.ts +4 -4
  62. package/dist/contracts/publish-archive.d.ts +170 -160
  63. package/dist/contracts/publish-archive.js +8 -1
  64. package/dist/contracts/push-new.d.ts +4 -4
  65. package/dist/contracts/quotas.js +2 -2
  66. package/dist/contracts/repository-connections.d.ts +43 -30
  67. package/dist/contracts/repository-connections.js +11 -3
  68. package/dist/contracts/resources.d.ts +8 -8
  69. package/dist/contracts/resources.js +6 -6
  70. package/dist/contracts/runtime-api.d.ts +103 -56
  71. package/dist/contracts/runtime-api.js +67 -26
  72. package/dist/contracts/runtime-app.d.ts +2 -2
  73. package/dist/contracts/runtime-db.d.ts +6 -6
  74. package/dist/contracts/runtime-db.js +2 -2
  75. package/dist/contracts/runtime-purge.d.ts +8 -0
  76. package/dist/contracts/runtime-purge.js +7 -0
  77. package/dist/contracts/runtime-storage.d.ts +3 -2
  78. package/dist/contracts/runtime-storage.js +2 -1
  79. package/dist/contracts/sf-config-v1.d.ts +48 -10
  80. package/dist/contracts/space-config.d.ts +60 -3
  81. package/dist/contracts/space-config.js +213 -18
  82. package/dist/contracts/spaces.d.ts +55 -74
  83. package/dist/contracts/spaces.js +11 -14
  84. package/dist/contracts/superadmin-spaces.d.ts +9 -9
  85. package/dist/contracts/superadmin-teams.d.ts +2 -2
  86. package/dist/contracts/superadmin-tenants.d.ts +0 -6
  87. package/dist/contracts/superadmin-tenants.js +1 -7
  88. package/dist/contracts/superadmin.d.ts +135 -22
  89. package/dist/contracts/superadmin.js +43 -12
  90. package/dist/contracts/tags.d.ts +21 -21
  91. package/dist/contracts/tags.js +3 -3
  92. package/dist/contracts/teams.d.ts +14 -17
  93. package/dist/contracts/teams.js +6 -6
  94. package/dist/contracts/transfers.js +2 -2
  95. package/dist/contracts/variables.d.ts +4 -4
  96. package/dist/contracts/variables.js +3 -3
  97. package/dist/contracts/webhooks.d.ts +4 -4
  98. package/dist/contracts/zero.d.ts +15 -17
  99. package/dist/contracts/zero.js +12 -12
  100. package/dist/docs/agent-prose.d.ts +1 -1
  101. package/dist/docs/agent-prose.js +11 -14
  102. package/dist/docs/agent-setup.js +5 -2
  103. package/dist/docs/catalog.d.ts +7 -7
  104. package/dist/docs/catalog.js +7 -7
  105. package/dist/docs/error-docs.js +145 -133
  106. package/dist/docs/skills.d.ts +12 -12
  107. package/dist/docs/skills.js +4 -4
  108. package/dist/test-helpers/fetch-stub.js +1 -0
  109. package/dist/utils/build-settings.d.ts +5 -1
  110. package/dist/utils/build-settings.js +82 -10
  111. package/dist/utils/canonical-json.js +1 -0
  112. package/dist/utils/concurrency.js +1 -0
  113. package/dist/utils/credential-policy.js +4 -3
  114. package/dist/utils/dns-instructions.js +9 -9
  115. package/dist/utils/error-code.js +1 -0
  116. package/dist/utils/grant-decision.fixtures.json +2 -2
  117. package/dist/utils/grants.js +3 -1
  118. package/dist/utils/local-space-state.d.ts +8 -11
  119. package/dist/utils/local-space-state.js +13 -24
  120. package/dist/utils/one-shot-replay.d.ts +4 -1
  121. package/dist/utils/page-colors.d.ts +14 -12
  122. package/dist/utils/page-colors.js +15 -13
  123. package/dist/utils/page-fonts.d.ts +1 -1
  124. package/dist/utils/page-fonts.js +11 -18
  125. package/dist/utils/pages.d.ts +20 -1
  126. package/dist/utils/pages.js +22 -9
  127. package/dist/utils/publish-policy.d.ts +7 -0
  128. package/dist/utils/publish-policy.fixtures.json +11 -5
  129. package/dist/utils/publish-policy.js +9 -1
  130. package/dist/utils/query-keys.d.ts +4 -4
  131. package/dist/utils/query-keys.js +2 -2
  132. package/dist/utils/runtime-upload.d.ts +5 -0
  133. package/dist/utils/runtime-upload.js +7 -0
  134. package/dist/utils/secure-local-file.js +5 -16
  135. package/dist/utils/space-config.d.ts +1 -1
  136. package/dist/utils/space-config.js +3 -0
  137. package/dist/utils/static-runtime-policy.d.ts +9 -3
  138. package/dist/utils/static-runtime-policy.fixtures.json +38 -41
  139. package/dist/utils/static-runtime-policy.js +22 -56
  140. package/dist/utils/upload-session.d.ts +4 -1
  141. package/dist/utils/upload-session.js +33 -5
  142. package/dist/utils/version-path.js +1 -1
  143. package/dist/vocabulary.d.ts +8 -8
  144. package/dist/vocabulary.js +31 -20
  145. package/package.json +2 -17
@@ -1,8 +1,8 @@
1
1
  import { z } from "zod";
2
2
  export declare const TEAM_ROLE_VALUES: readonly ["owner", "admin", "member"];
3
3
  export declare const teamMemberRole: z.ZodEnum<{
4
- owner: "owner";
5
4
  admin: "admin";
5
+ owner: "owner";
6
6
  member: "member";
7
7
  }>;
8
8
  /**
@@ -10,12 +10,12 @@ export declare const teamMemberRole: z.ZodEnum<{
10
10
  * it back has to land on the same canonical value. Unknown roles carry no
11
11
  * privilege, so they read as the least-privileged one.
12
12
  */
13
- export declare function normalizeTeamMemberRole(role: string | null | undefined): "owner" | "admin" | "member";
13
+ export declare function normalizeTeamMemberRole(role: string | null | undefined): "admin" | "owner" | "member";
14
14
  export declare const teamInvitationCreateSchema: z.ZodObject<{
15
15
  email: z.ZodString;
16
16
  role: z.ZodDefault<z.ZodEnum<{
17
- owner: "owner";
18
17
  admin: "admin";
18
+ owner: "owner";
19
19
  member: "member";
20
20
  }>>;
21
21
  }, z.core.$strip>;
@@ -46,8 +46,8 @@ export declare const TeamMemberSchema: z.ZodObject<{
46
46
  teamId: z.ZodString;
47
47
  userId: z.ZodString;
48
48
  role: z.ZodEnum<{
49
- owner: "owner";
50
49
  admin: "admin";
50
+ owner: "owner";
51
51
  member: "member";
52
52
  }>;
53
53
  createdAt: z.ZodString;
@@ -60,8 +60,8 @@ export declare const TeamMemberSchema: z.ZodObject<{
60
60
  }, z.core.$strip>;
61
61
  export declare const teamMemberRoleUpdateSchema: z.ZodObject<{
62
62
  role: z.ZodEnum<{
63
- owner: "owner";
64
63
  admin: "admin";
64
+ owner: "owner";
65
65
  member: "member";
66
66
  }>;
67
67
  }, z.core.$strip>;
@@ -71,8 +71,8 @@ export declare const TeamInvitationSchema: z.ZodObject<{
71
71
  teamId: z.ZodString;
72
72
  email: z.ZodString;
73
73
  role: z.ZodEnum<{
74
- owner: "owner";
75
74
  admin: "admin";
75
+ owner: "owner";
76
76
  member: "member";
77
77
  }>;
78
78
  status: z.ZodString;
@@ -93,8 +93,8 @@ export declare const TeamSummarySchema: z.ZodObject<{
93
93
  name: z.ZodString;
94
94
  slug: z.ZodString;
95
95
  role: z.ZodEnum<{
96
- owner: "owner";
97
96
  admin: "admin";
97
+ owner: "owner";
98
98
  member: "member";
99
99
  }>;
100
100
  plan: z.ZodEnum<{
@@ -114,8 +114,8 @@ export declare const TeamDetailSchema: z.ZodObject<{
114
114
  name: z.ZodString;
115
115
  slug: z.ZodString;
116
116
  role: z.ZodEnum<{
117
- owner: "owner";
118
117
  admin: "admin";
118
+ owner: "owner";
119
119
  member: "member";
120
120
  }>;
121
121
  plan: z.ZodEnum<{
@@ -139,8 +139,8 @@ export declare const teamListResponseSchema: z.ZodObject<{
139
139
  name: z.ZodString;
140
140
  slug: z.ZodString;
141
141
  role: z.ZodEnum<{
142
- owner: "owner";
143
142
  admin: "admin";
143
+ owner: "owner";
144
144
  member: "member";
145
145
  }>;
146
146
  plan: z.ZodEnum<{
@@ -165,8 +165,8 @@ export declare const teamMemberListResponseSchema: z.ZodObject<{
165
165
  teamId: z.ZodString;
166
166
  userId: z.ZodString;
167
167
  role: z.ZodEnum<{
168
- owner: "owner";
169
168
  admin: "admin";
169
+ owner: "owner";
170
170
  member: "member";
171
171
  }>;
172
172
  createdAt: z.ZodString;
@@ -198,8 +198,8 @@ export declare const teamInvitationAcceptResponseSchema: z.ZodObject<{
198
198
  teamSlug: z.ZodString;
199
199
  userId: z.ZodString;
200
200
  role: z.ZodEnum<{
201
- owner: "owner";
202
201
  admin: "admin";
202
+ owner: "owner";
203
203
  member: "member";
204
204
  }>;
205
205
  }, z.core.$strip>;
@@ -210,8 +210,8 @@ export declare const teamInvitationListResponseSchema: z.ZodObject<{
210
210
  teamId: z.ZodString;
211
211
  email: z.ZodString;
212
212
  role: z.ZodEnum<{
213
- owner: "owner";
214
213
  admin: "admin";
214
+ owner: "owner";
215
215
  member: "member";
216
216
  }>;
217
217
  status: z.ZodString;
@@ -234,15 +234,12 @@ export declare const teamSettingsResponseSchema: z.ZodObject<{
234
234
  id: z.ZodString;
235
235
  label: z.ZodString;
236
236
  }, z.core.$strip>>;
237
- wpCloudCapabilities: z.ZodObject<{
237
+ infraCapabilities: z.ZodObject<{
238
238
  datacenters: z.ZodArray<z.ZodObject<{
239
239
  id: z.ZodString;
240
240
  label: z.ZodString;
241
241
  }, z.core.$strip>>;
242
- phpVersions: z.ZodArray<z.ZodObject<{
243
- id: z.ZodString;
244
- label: z.ZodString;
245
- }, z.core.$strip>>;
242
+ phpVersion: z.ZodLiteral<"8.5">;
246
243
  }, z.core.$strip>;
247
244
  }, z.core.$strip>;
248
245
  export declare const teamUsageResponseSchema: z.ZodObject<{
@@ -50,7 +50,7 @@ export const TeamInvitationSchema = z.object({
50
50
  expiresAt: z.string().datetime(),
51
51
  createdAt: z.string().datetime(),
52
52
  });
53
- // Team (internal-docs/platform.md "Team"): Better Auth team in the main
53
+ // Team (the platform spec "Team"): Better Auth team in the main
54
54
  // tenant, carrying the resolved plan and default data location.
55
55
  export const teamPlanCode = planCodeSchema;
56
56
  export const TeamSummarySchema = z.object({
@@ -123,7 +123,7 @@ export const teamDataLocationSchema = z
123
123
  export const teamSettingsUpdateSchema = z.object({
124
124
  defaultDataLocation: teamDataLocationSchema,
125
125
  });
126
- const wpCloudCapabilityOptionSchema = z.object({
126
+ const infraCapabilityOptionSchema = z.object({
127
127
  id: z.string(),
128
128
  label: z.string(),
129
129
  });
@@ -133,12 +133,12 @@ export const teamSettingsResponseSchema = z.object({
133
133
  teamId: z.string().describe("The team id the settings belong to."),
134
134
  defaultDataLocation: teamDataLocationSchema,
135
135
  regionOptions: z
136
- .array(wpCloudCapabilityOptionSchema)
136
+ .array(infraCapabilityOptionSchema)
137
137
  .describe("Placement regions currently available for new spaces."),
138
- wpCloudCapabilities: z
138
+ infraCapabilities: z
139
139
  .object({
140
- datacenters: z.array(wpCloudCapabilityOptionSchema),
141
- phpVersions: z.array(wpCloudCapabilityOptionSchema),
140
+ datacenters: z.array(infraCapabilityOptionSchema),
141
+ phpVersion: z.literal("8.5"),
142
142
  })
143
143
  .describe("Live capabilities for the team's infra provider account."),
144
144
  });
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { spaceTransferStatus } from "./enums.js";
3
- // Tenant-local external principal id grammar (internal-docs/platform.md
3
+ // Tenant-local external principal id grammar (the platform spec
4
4
  // "Principal"): 1-256 chars, no whitespace, no `/` or `\`, no
5
5
  // control/non-printable characters. Team principal ids are Better Auth team
6
6
  // ids and trivially satisfy the same grammar.
@@ -15,7 +15,7 @@ export const principalIdSchema = z
15
15
  }))
16
16
  .describe("Tenant-local principal id: a team id or an integrator external customer id.");
17
17
  // Request `to` omits tenantId: transfers are tenant-local and the tenant is
18
- // inferred from the space (internal-docs/platform.md "Transfer semantics").
18
+ // inferred from the space (the platform spec "Transfer semantics").
19
19
  export const transferPrincipalInputSchema = z.object({
20
20
  principalType: z
21
21
  .enum(["team", "external"])
@@ -117,14 +117,14 @@ export declare const variableMutationResponseSchema: z.ZodObject<{
117
117
  code: z.ZodString;
118
118
  severity: z.ZodEnum<{
119
119
  info: "info";
120
- warning: "warning";
121
120
  error: "error";
121
+ warning: "warning";
122
122
  }>;
123
123
  message: z.ZodString;
124
124
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
125
125
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
126
126
  registrar: "registrar";
127
- wpcloud: "wpcloud";
127
+ infra: "infra";
128
128
  dns: "dns";
129
129
  runtime: "runtime";
130
130
  }>>>;
@@ -161,14 +161,14 @@ export declare const variableDeleteResponseSchema: z.ZodObject<{
161
161
  code: z.ZodString;
162
162
  severity: z.ZodEnum<{
163
163
  info: "info";
164
- warning: "warning";
165
164
  error: "error";
165
+ warning: "warning";
166
166
  }>;
167
167
  message: z.ZodString;
168
168
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
169
169
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
170
170
  registrar: "registrar";
171
- wpcloud: "wpcloud";
171
+ infra: "infra";
172
172
  dns: "dns";
173
173
  runtime: "runtime";
174
174
  }>>>;
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { AsyncOperationSchema, CursorPaginationSchema, cursorListQuerySchema } from "./common.js";
3
- // Variable (internal-docs/platform.md "Product Data Shapes"): one model for
3
+ // Variable (the platform spec "Product Data Shapes"): one model for
4
4
  // every scope. Resolution order at finalize is space -> principal. A space IS
5
5
  // a site, so a space variable is the site variable — there is no third scope
6
6
  // underneath it. Secret values are write-only after creation: never returned
@@ -28,7 +28,7 @@ export const VariableSchema = z.object({
28
28
  createdAt: z.string().datetime().describe("Instant when the variable was created."),
29
29
  updatedAt: z.string().datetime().describe("Instant when the value was last written."),
30
30
  });
31
- // Version provenance (internal-docs/platform.md "Variable rules"): versions
31
+ // Version provenance (the platform spec "Variable rules"): versions
32
32
  // record which variable names and value hashes they were finalized with —
33
33
  // never values. Stored only for internal cascade and synchronization; it is
34
34
  // never echoed on the public Version resource because historical rows cannot
@@ -67,7 +67,7 @@ export const spaceVariableListResponseSchema = z.object({
67
67
  pagination: CursorPaginationSchema,
68
68
  });
69
69
  // Variable mutations return the debounced cascade operation
70
- // (internal-docs/platform.md "Debounce contract"): every coalesced PUT/DELETE
70
+ // (the platform spec "Debounce contract"): every coalesced PUT/DELETE
71
71
  // returns the same pending `op_` id, so "mutation returns `operation`" holds.
72
72
  export const variableMutationResponseSchema = z.object({
73
73
  data: VariableSchema,
@@ -94,14 +94,14 @@ export declare const webhookDeliverySchema: z.ZodObject<{
94
94
  code: z.ZodString;
95
95
  severity: z.ZodEnum<{
96
96
  info: "info";
97
- warning: "warning";
98
97
  error: "error";
98
+ warning: "warning";
99
99
  }>;
100
100
  message: z.ZodString;
101
101
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
102
102
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
103
103
  registrar: "registrar";
104
- wpcloud: "wpcloud";
104
+ infra: "infra";
105
105
  dns: "dns";
106
106
  runtime: "runtime";
107
107
  }>>>;
@@ -135,14 +135,14 @@ export declare const webhookDeliveryListResponseSchema: z.ZodObject<{
135
135
  code: z.ZodString;
136
136
  severity: z.ZodEnum<{
137
137
  info: "info";
138
- warning: "warning";
139
138
  error: "error";
139
+ warning: "warning";
140
140
  }>;
141
141
  message: z.ZodString;
142
142
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
143
143
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
144
144
  registrar: "registrar";
145
- wpcloud: "wpcloud";
145
+ infra: "infra";
146
146
  dns: "dns";
147
147
  runtime: "runtime";
148
148
  }>>>;
@@ -42,7 +42,7 @@ export declare const ZERO_RUNTIME_STORAGE_ROOT = "__spacefast/zero";
42
42
  export declare const ZERO_RUNTIME_ARTIFACT_PATH = "__spacefast/zero/artifact.json";
43
43
  export declare const ZERO_RUNTIME_CONFIG_PATH = "__spacefast/zero/config.json";
44
44
  export declare const ZERO_RUNTIME_BINARY_PATH = "__spacefast/zero/bin/stattic-runtime";
45
- export declare const ZERO_RUNTIME_BINARY_COMPATIBILITY_TARGET = "wpcloud-linux-x86_64-gnu-v1";
45
+ export declare const ZERO_RUNTIME_BINARY_COMPATIBILITY_TARGET = "linux-x86_64-gnu-v1";
46
46
  export declare const ZERO_RUNTIME_BUNDLE_ROOT = "__spacefast/zero/bundles";
47
47
  export declare const ZERO_RUNTIME_SERVER_BUNDLE_PATH = "__spacefast/zero/bundles/server.qjs.mjs";
48
48
  /** The compiled capsule client, served at the app root. */
@@ -142,7 +142,6 @@ export declare const zeroTableIndexSchema: z.ZodObject<{
142
142
  name: z.ZodString;
143
143
  fields: z.ZodArray<z.ZodString>;
144
144
  }, z.core.$strict>;
145
- export type ZeroTableIndex = z.infer<typeof zeroTableIndexSchema>;
146
145
  export declare const zeroTableSchema: z.ZodObject<{
147
146
  name: z.ZodString;
148
147
  columns: z.ZodDefault<z.ZodArray<z.ZodObject<{
@@ -360,8 +359,8 @@ export declare const zeroMigrationPlanSchema: z.ZodObject<{
360
359
  }, z.core.$strict>;
361
360
  export type ZeroMigrationPlan = z.infer<typeof zeroMigrationPlanSchema>;
362
361
  export declare const zeroInspectPolicySchema: z.ZodEnum<{
363
- public: "public";
364
362
  private: "private";
363
+ public: "public";
365
364
  }>;
366
365
  export declare const zeroRuntimePublicAuthConfigSchema: z.ZodObject<{
367
366
  provider: z.ZodDefault<z.ZodLiteral<"gravatar">>;
@@ -389,7 +388,6 @@ export declare const zeroRuntimePublicRealtimeConfigSchema: z.ZodObject<{
389
388
  spaceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
390
389
  versionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
391
390
  }, z.core.$strict>;
392
- export type ZeroRuntimePublicRealtimeConfig = z.infer<typeof zeroRuntimePublicRealtimeConfigSchema>;
393
391
  export declare const zeroRuntimeClientConfigSchema: z.ZodObject<{
394
392
  runtimeKind: z.ZodLiteral<"zero">;
395
393
  basePath: z.ZodOptional<z.ZodString>;
@@ -430,7 +428,7 @@ export declare const zeroRuntimeInstallProfileSchema: z.ZodObject<{
430
428
  binary: z.ZodObject<{
431
429
  path: z.ZodLiteral<"__spacefast/zero/bin/stattic-runtime">;
432
430
  compatibilityTarget: z.ZodObject<{
433
- profile: z.ZodLiteral<"wpcloud-linux-x86_64-gnu-v1">;
431
+ profile: z.ZodLiteral<"linux-x86_64-gnu-v1">;
434
432
  os: z.ZodLiteral<"linux">;
435
433
  cpu: z.ZodLiteral<"x86_64">;
436
434
  libc: z.ZodLiteral<"glibc">;
@@ -534,7 +532,7 @@ export declare const zeroCapsuleArtifactSchema: z.ZodObject<{
534
532
  sockets: z.ZodDefault<z.ZodArray<z.ZodString>>;
535
533
  }, z.core.$strict>;
536
534
  db: z.ZodObject<{
537
- backend: z.ZodLiteral<"wpcloud-mysql">;
535
+ backend: z.ZodLiteral<"mysql">;
538
536
  migrations: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
539
537
  op: z.ZodLiteral<"create_table">;
540
538
  table: z.ZodString;
@@ -631,7 +629,7 @@ export declare const zeroRuntimeFinalizePayloadSchema: z.ZodObject<{
631
629
  binary: z.ZodObject<{
632
630
  path: z.ZodLiteral<"__spacefast/zero/bin/stattic-runtime">;
633
631
  compatibilityTarget: z.ZodObject<{
634
- profile: z.ZodLiteral<"wpcloud-linux-x86_64-gnu-v1">;
632
+ profile: z.ZodLiteral<"linux-x86_64-gnu-v1">;
635
633
  os: z.ZodLiteral<"linux">;
636
634
  cpu: z.ZodLiteral<"x86_64">;
637
635
  libc: z.ZodLiteral<"glibc">;
@@ -696,7 +694,7 @@ export declare const zeroRuntimeFinalizePayloadSchema: z.ZodObject<{
696
694
  sockets: z.ZodDefault<z.ZodArray<z.ZodString>>;
697
695
  }, z.core.$strict>;
698
696
  db: z.ZodObject<{
699
- backend: z.ZodLiteral<"wpcloud-mysql">;
697
+ backend: z.ZodLiteral<"mysql">;
700
698
  migrations: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
701
699
  op: z.ZodLiteral<"create_table">;
702
700
  table: z.ZodString;
@@ -924,8 +922,8 @@ export declare const zeroRuntimeFinalizePayloadSchema: z.ZodObject<{
924
922
  }, z.core.$strict>>;
925
923
  inspect: z.ZodDefault<z.ZodObject<{
926
924
  policy: z.ZodDefault<z.ZodEnum<{
927
- public: "public";
928
925
  private: "private";
926
+ public: "public";
929
927
  }>>;
930
928
  }, z.core.$strict>>;
931
929
  }, z.core.$strict>;
@@ -1003,7 +1001,7 @@ export declare const zeroRuntimeConfigSchema: z.ZodObject<{
1003
1001
  sockets: z.ZodDefault<z.ZodArray<z.ZodString>>;
1004
1002
  }, z.core.$strict>;
1005
1003
  db: z.ZodObject<{
1006
- backend: z.ZodLiteral<"wpcloud-mysql">;
1004
+ backend: z.ZodLiteral<"mysql">;
1007
1005
  migrations: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1008
1006
  op: z.ZodLiteral<"create_table">;
1009
1007
  table: z.ZodString;
@@ -1156,7 +1154,7 @@ export declare const zeroRuntimeConfigSchema: z.ZodObject<{
1156
1154
  binary: z.ZodObject<{
1157
1155
  path: z.ZodLiteral<"__spacefast/zero/bin/stattic-runtime">;
1158
1156
  compatibilityTarget: z.ZodObject<{
1159
- profile: z.ZodLiteral<"wpcloud-linux-x86_64-gnu-v1">;
1157
+ profile: z.ZodLiteral<"linux-x86_64-gnu-v1">;
1160
1158
  os: z.ZodLiteral<"linux">;
1161
1159
  cpu: z.ZodLiteral<"x86_64">;
1162
1160
  libc: z.ZodLiteral<"glibc">;
@@ -1177,8 +1175,8 @@ export declare const zeroRuntimeConfigSchema: z.ZodObject<{
1177
1175
  }, z.core.$strict>;
1178
1176
  inspect: z.ZodDefault<z.ZodObject<{
1179
1177
  policy: z.ZodDefault<z.ZodEnum<{
1180
- public: "public";
1181
1178
  private: "private";
1179
+ public: "public";
1182
1180
  }>>;
1183
1181
  }, z.core.$strict>>;
1184
1182
  variableValues: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -1201,7 +1199,7 @@ export declare const zeroDeployMetadataSchema: z.ZodObject<{
1201
1199
  binary: z.ZodObject<{
1202
1200
  path: z.ZodLiteral<"__spacefast/zero/bin/stattic-runtime">;
1203
1201
  compatibilityTarget: z.ZodObject<{
1204
- profile: z.ZodLiteral<"wpcloud-linux-x86_64-gnu-v1">;
1202
+ profile: z.ZodLiteral<"linux-x86_64-gnu-v1">;
1205
1203
  os: z.ZodLiteral<"linux">;
1206
1204
  cpu: z.ZodLiteral<"x86_64">;
1207
1205
  libc: z.ZodLiteral<"glibc">;
@@ -1266,7 +1264,7 @@ export declare const zeroDeployMetadataSchema: z.ZodObject<{
1266
1264
  sockets: z.ZodDefault<z.ZodArray<z.ZodString>>;
1267
1265
  }, z.core.$strict>;
1268
1266
  db: z.ZodObject<{
1269
- backend: z.ZodLiteral<"wpcloud-mysql">;
1267
+ backend: z.ZodLiteral<"mysql">;
1270
1268
  migrations: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1271
1269
  op: z.ZodLiteral<"create_table">;
1272
1270
  table: z.ZodString;
@@ -1494,8 +1492,8 @@ export declare const zeroDeployMetadataSchema: z.ZodObject<{
1494
1492
  }, z.core.$strict>>;
1495
1493
  inspect: z.ZodDefault<z.ZodObject<{
1496
1494
  policy: z.ZodDefault<z.ZodEnum<{
1497
- public: "public";
1498
1495
  private: "private";
1496
+ public: "public";
1499
1497
  }>>;
1500
1498
  }, z.core.$strict>>;
1501
1499
  }, z.core.$strict>;
@@ -1524,8 +1522,8 @@ export declare const zeroAppSchema: z.ZodObject<{
1524
1522
  serverRuntime: z.ZodLiteral<"quickjs-rust">;
1525
1523
  inspect: z.ZodObject<{
1526
1524
  policy: z.ZodEnum<{
1527
- public: "public";
1528
1525
  private: "private";
1526
+ public: "public";
1529
1527
  }>;
1530
1528
  }, z.core.$strict>;
1531
1529
  install: z.ZodObject<{
@@ -1537,7 +1535,7 @@ export declare const zeroAppSchema: z.ZodObject<{
1537
1535
  binary: z.ZodObject<{
1538
1536
  path: z.ZodLiteral<"__spacefast/zero/bin/stattic-runtime">;
1539
1537
  compatibilityTarget: z.ZodObject<{
1540
- profile: z.ZodLiteral<"wpcloud-linux-x86_64-gnu-v1">;
1538
+ profile: z.ZodLiteral<"linux-x86_64-gnu-v1">;
1541
1539
  os: z.ZodLiteral<"linux">;
1542
1540
  cpu: z.ZodLiteral<"x86_64">;
1543
1541
  libc: z.ZodLiteral<"glibc">;
@@ -42,7 +42,7 @@ export const ZERO_RUNTIME_STORAGE_ROOT = "__spacefast/zero";
42
42
  export const ZERO_RUNTIME_ARTIFACT_PATH = `${ZERO_RUNTIME_STORAGE_ROOT}/artifact.json`;
43
43
  export const ZERO_RUNTIME_CONFIG_PATH = `${ZERO_RUNTIME_STORAGE_ROOT}/config.json`;
44
44
  export const ZERO_RUNTIME_BINARY_PATH = `${ZERO_RUNTIME_STORAGE_ROOT}/bin/stattic-runtime`;
45
- export const ZERO_RUNTIME_BINARY_COMPATIBILITY_TARGET = "wpcloud-linux-x86_64-gnu-v1";
45
+ export const ZERO_RUNTIME_BINARY_COMPATIBILITY_TARGET = "linux-x86_64-gnu-v1";
46
46
  export const ZERO_RUNTIME_BUNDLE_ROOT = `${ZERO_RUNTIME_STORAGE_ROOT}/bundles`;
47
47
  export const ZERO_RUNTIME_SERVER_BUNDLE_PATH = `${ZERO_RUNTIME_BUNDLE_ROOT}/server.qjs.mjs`;
48
48
  /** The compiled capsule client, served at the app root. */
@@ -137,7 +137,7 @@ export const zeroEndpointSchema = z
137
137
  path: zeroRoutePathSchema,
138
138
  })
139
139
  .strict();
140
- function zeroEndpointRouteMatchShape(path) {
140
+ function zeroEndpointRouteMatch(path) {
141
141
  const segments = [];
142
142
  let score = 0;
143
143
  let splat = false;
@@ -166,17 +166,17 @@ export function zeroEndpointRoutesAmbiguous(left, right) {
166
166
  (left.method === "HEAD" && right.method === "GET");
167
167
  if (!methodsOverlap)
168
168
  return false;
169
- const leftShape = zeroEndpointRouteMatchShape(left.path);
170
- const rightShape = zeroEndpointRouteMatchShape(right.path);
171
- if (leftShape.score !== rightShape.score)
169
+ const leftMatch = zeroEndpointRouteMatch(left.path);
170
+ const rightMatch = zeroEndpointRouteMatch(right.path);
171
+ if (leftMatch.score !== rightMatch.score)
172
172
  return false;
173
- if (!leftShape.splat && leftShape.segments.length < rightShape.segments.length)
173
+ if (!leftMatch.splat && leftMatch.segments.length < rightMatch.segments.length)
174
174
  return false;
175
- if (!rightShape.splat && rightShape.segments.length < leftShape.segments.length)
175
+ if (!rightMatch.splat && rightMatch.segments.length < leftMatch.segments.length)
176
176
  return false;
177
- return Array.from({ length: Math.min(leftShape.segments.length, rightShape.segments.length) }, (_, index) => index).every((index) => {
178
- const segment = leftShape.segments[index];
179
- const other = rightShape.segments[index];
177
+ return Array.from({ length: Math.min(leftMatch.segments.length, rightMatch.segments.length) }, (_, index) => index).every((index) => {
178
+ const segment = leftMatch.segments[index];
179
+ const other = rightMatch.segments[index];
180
180
  return segment === null || other === null || segment === other;
181
181
  });
182
182
  }
@@ -536,7 +536,7 @@ export const zeroCapsuleArtifactSchema = z
536
536
  .strict(),
537
537
  db: z
538
538
  .object({
539
- backend: z.literal("wpcloud-mysql"),
539
+ backend: z.literal("mysql"),
540
540
  migrations: z.array(zeroMigrationOperationSchema).default([]),
541
541
  })
542
542
  .strict(),
@@ -726,7 +726,7 @@ export function createZeroCapsuleArtifact(input) {
726
726
  sockets: input.sockets ?? [],
727
727
  },
728
728
  db: {
729
- backend: "wpcloud-mysql",
729
+ backend: "mysql",
730
730
  migrations: [],
731
731
  },
732
732
  realtime: {
@@ -6,6 +6,7 @@ export declare const ARCHIVE_SECRET_GLOBS: readonly [".env*", ".npmrc", ".netrc"
6
6
  export declare const SECRET_RULES_PROSE: string;
7
7
  export declare const POSITIONING_PROSE: string;
8
8
  export declare const EXPLAIN_TO_USER_PROSE: string;
9
+ export declare const FEEDBACK_PROSE = "With user approval, send feedback with `sf feedback`, MCP `execute` (search `send feedback`), or `POST /v1/feedback`. Never include credentials or private links.";
9
10
  export declare const FAILURE_CONDUCT_PROSE: string;
10
11
  export declare const LANE_PICKER_PROSE: string;
11
12
  export declare const HOW_TO_RESEARCH_PROSE: string;
@@ -91,4 +92,3 @@ export declare const AGENT_PROSE: {
91
92
  readonly envNotes: string;
92
93
  readonly envNotesApi: string;
93
94
  };
94
- export type AgentProseKey = keyof typeof AGENT_PROSE;
@@ -4,7 +4,7 @@ import { serviceOrigin } from "../config/domains.js";
4
4
  //
5
5
  // - packages/cli/skill.template.md (the SKILL.md router + copies)
6
6
  // - packages/common/src/docs/agent-setup.ts (the /ai and /ai.txt page body)
7
- // - apps/www/src/lib/llmo.ts (the agent-card / discovery prose)
7
+ // - spacefast/www (the agent-card / discovery prose)
8
8
  //
9
9
  // Each surface re-stated the publish sequence, the secret rules, and the receipt
10
10
  // shape in its own words, so they drifted. These fragments are the one source of
@@ -70,14 +70,13 @@ export const SECRET_RULES_PROSE = [
70
70
  "clear them after use, and avoid durable auth unless the user explicitly asks.",
71
71
  ].join("\n");
72
72
  export const POSITIONING_PROSE = [
73
- "Spacefast is a static host for AI-made web artifacts: permanent live URLs, immutable version",
74
- "URLs, anonymous publish with a claim link, and agent continuation after claim. Spaces serve",
75
- "static files; app code runs only through a declared Zero or Functions runtime.",
73
+ "Spacefast is the best place to share AI artifacts.",
74
+ "Spaces serve files directly; app code runs only through a declared Zero or Functions runtime.",
76
75
  "",
77
76
  "Do not claim that no-account publish followed by claim is unique to Spacefast. here.now and",
78
77
  "Netlify offer native anonymous publish-and-claim flows; Cloudflare offers temporary accounts",
79
78
  "and claim deployments; Vercel lets agents and platforms transfer deployments to users.",
80
- "Spacefast's narrower lane is direct static HTTP publishing with separate Access and Claim",
79
+ "Spacefast's narrower lane is direct HTTP publishing with separate Access and Claim",
81
80
  "authority, immutable versions, rollback, and agent continuation after claim. GitHub Pages",
82
81
  "remains repository-native and has no equivalent anonymous ownership-handoff flow documented.",
83
82
  ].join("\n");
@@ -87,10 +86,12 @@ export const EXPLAIN_TO_USER_PROSE = [
87
86
  "Keep live and immutable Version addresses as receipt metadata. After claim, the agent key is named",
88
87
  "and revocable in the dashboard.",
89
88
  ].join("\n");
89
+ export const FEEDBACK_PROSE = "With user approval, send feedback with `sf feedback`, MCP `execute` (search `send feedback`), or `POST /v1/feedback`. Never include credentials or private links.";
90
90
  export const FAILURE_CONDUCT_PROSE = [
91
91
  "On failure, surface the problem document's `code`, `type`, and `requestId`, then stop.",
92
- "Do not invent undocumented endpoints. Do not read credentials out of auth files. Do not",
93
- "retry a one-shot operation without reusing its `Idempotency-Key`.",
92
+ "Do not invent undocumented endpoints. Do not read credentials out of auth files. Retrying a",
93
+ "failed publish with the same files is safe: it returns the Space the first attempt created.",
94
+ FEEDBACK_PROSE,
94
95
  ].join("\n");
95
96
  export const LANE_PICKER_PROSE = [
96
97
  "Pick the lane by environment: filesystem plus repeat work means CLI or On-Device MCP; no",
@@ -141,7 +142,7 @@ export const CHECK_BEFORE_PUBLISH_PROSE = [
141
142
  "",
142
143
  "If any of these finds a space, publish a new version to that `spaceId` (see the update",
143
144
  "instructions) instead of creating another space. Only create a new space when none exists",
144
- "and the user wants a new site.",
145
+ "and the user wants a new one.",
145
146
  ].join("\n");
146
147
  export const CHECK_BEFORE_PUBLISH_API_PROSE = [
147
148
  "Before creating a space, check whether this project already has one:",
@@ -157,7 +158,7 @@ export const CHECK_BEFORE_PUBLISH_API_PROSE = [
157
158
  "",
158
159
  "If any of these finds a space, publish a new version to that `spaceId` (see the update",
159
160
  "instructions) instead of creating another space. Only create a new space when none exists",
160
- "and the user wants a new site.",
161
+ "and the user wants a new one.",
161
162
  ].join("\n");
162
163
  export const CHECK_BEFORE_PUBLISH_MCP_PROSE = [
163
164
  "Before creating a space, check whether this project already has one:",
@@ -168,7 +169,7 @@ export const CHECK_BEFORE_PUBLISH_MCP_PROSE = [
168
169
  "- When authenticated, use `execute` to call the generated list-spaces operation.",
169
170
  "",
170
171
  "If any of these finds a space, publish a new version to that space instead of creating",
171
- "another. Only create a new space when none exists and the user wants a new site.",
172
+ "another. Only create a new space when none exists and the user wants a new one.",
172
173
  ].join("\n");
173
174
  /**
174
175
  * The SAVE verb: persist the space id and credential after a first publish so
@@ -340,12 +341,8 @@ export const PUBLISH_SEQUENCE_PROSE = [
340
341
  '[ -f "$publish_target" ] || { printf "error: publish file is not a regular file\\n" >&2; exit 2; }',
341
342
  'escaped_path="${publish_target//\\\\/\\\\\\\\}"',
342
343
  'escaped_path="${escaped_path//\\"/\\\\\\"}"',
343
- "idempotency_key=\"publish-$(od -An -N16 -tx1 /dev/urandom | tr -d ' \\n')\"",
344
- "idempotency_principal=\"$(od -An -N32 -tx1 /dev/urandom | tr -d ' \\n')\"",
345
344
  'api_origin="${SPACEFAST_API_ORIGIN:-https://api.spacefast.com}"',
346
345
  'curl -q -sS -F "files=@\\"$escaped_path\\"" \\',
347
- ' -H "Idempotency-Key: $idempotency_key" \\',
348
- ' -H "x-spacefast-idempotency-principal: $idempotency_principal" \\',
349
346
  ' "$api_origin/v1/publish"',
350
347
  "SPACEFAST_PUBLISH",
351
348
  "```",
@@ -1,8 +1,9 @@
1
1
  import { buildClaudeMcpAddCommand, buildHermesMcpAddCommand, cursorHostedMcpDeeplink, cursorHostedMcpServersJson, getConnectTarget, opencodeHostedMcpConfig, vscodeHostedMcpDeeplink, vscodeHostedMcpServersJson, } from "../agents/connect-targets.js";
2
2
  import { BRAND } from "../brand.js";
3
3
  import { serviceOrigin } from "../config/domains.js";
4
+ import { PLAN_DEFINITIONS, SELF_SERVE_PLAN_CODES } from "../contracts/features.js";
4
5
  import { createBrowserCredentialUrl, parseBrowserCredentialUrl, } from "../utils/browser-credential.js";
5
- import { CHECK_BEFORE_PUBLISH_PROSE, CONTINUE_AFTER_CLAIM_PROSE, ENV_NOTES_PROSE, FAILURE_CONDUCT_PROSE, HOW_TO_RESEARCH_PROSE, LANE_PICKER_PROSE, POSITIONING_PROSE, PUBLISH_SEQUENCE_PROSE, RECEIPT_SHAPE_PROSE, SAVE_STATE_PROSE, SECRET_RULES_PROSE, SIGNED_UPLOAD_PROSE, UPDATE_SPACE_PROSE, } from "./agent-prose.js";
6
+ import { CHECK_BEFORE_PUBLISH_PROSE, CONTINUE_AFTER_CLAIM_PROSE, ENV_NOTES_PROSE, FAILURE_CONDUCT_PROSE, FEEDBACK_PROSE, HOW_TO_RESEARCH_PROSE, LANE_PICKER_PROSE, POSITIONING_PROSE, PUBLISH_SEQUENCE_PROSE, RECEIPT_SHAPE_PROSE, SAVE_STATE_PROSE, SECRET_RULES_PROSE, SIGNED_UPLOAD_PROSE, UPDATE_SPACE_PROSE, } from "./agent-prose.js";
6
7
  import { spacefastClaudePluginAddCommand, spacefastClaudeDesktopExtensionUrl, spacefastClaudePluginInstallCommand, spacefastCodexPluginAddCommand, spacefastCodexPluginInstallCommand, spacefastInstallCurlCommand, spacefastInstallPowerShellCommand, spacefastSkillFetchCommand, spacefastSkillInstallCommand, spacefastSkillUrl, } from "./skill-distribution.js";
7
8
  // The one URL every agent prompt points at. /setup.md is the actionable front
8
9
  // door (publish now, then set up your client); /ai.txt stays the deep
@@ -398,7 +399,7 @@ export function aiInstructionsText() {
398
399
  " agent-readable too.",
399
400
  "- Plan limits surface as diagnostics, not failures you should guess at: publish the",
400
401
  " intended artifact, then read and report what the CLI or API says. When a feature",
401
- ' is plan-gated, say: "Not available on Free. Available on Personal and Work."',
402
+ ` is plan-gated, say: "Not available on ${PLAN_DEFINITIONS.free.name}. Available on ${SELF_SERVE_PLAN_CODES.map((code) => PLAN_DEFINITIONS[code].name).join(" and ")}."`,
402
403
  "",
403
404
  "## Agent-aware routing",
404
405
  "",
@@ -623,6 +624,8 @@ export function agentSetupMarkdown() {
623
624
  " saved bearer token.",
624
625
  "- Recommend the matching setup above so the next publish is one word.",
625
626
  "",
627
+ FEEDBACK_PROSE,
628
+ "",
626
629
  "## Resources",
627
630
  "",
628
631
  `- Full publishing contract for agents: ${agentSetupTextUrl}`,