@spacefast/common 0.0.12 → 0.0.17

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 (189) hide show
  1. package/dist/agents/client-registry.d.ts +22 -0
  2. package/dist/agents/client-registry.js +41 -0
  3. package/dist/agents/connect-targets.d.ts +51 -6
  4. package/dist/agents/connect-targets.js +93 -28
  5. package/dist/brand.d.ts +0 -11
  6. package/dist/brand.js +0 -20
  7. package/dist/config/domains.d.ts +15 -6
  8. package/dist/config/domains.js +24 -10
  9. package/dist/config/postgres-budget.d.ts +3 -0
  10. package/dist/config/postgres-budget.js +6 -1
  11. package/dist/config/postgres-budget.json +2 -1
  12. package/dist/contracts/abuse.js +1 -1
  13. package/dist/contracts/access.d.ts +486 -1196
  14. package/dist/contracts/access.js +323 -1054
  15. package/dist/contracts/activity.d.ts +1 -1
  16. package/dist/contracts/activity.js +11 -15
  17. package/dist/contracts/api-keys.d.ts +16 -0
  18. package/dist/contracts/api-keys.js +11 -9
  19. package/dist/contracts/archives.d.ts +1 -2
  20. package/dist/contracts/archives.js +15 -17
  21. package/dist/contracts/beta.js +1 -1
  22. package/dist/contracts/builds.js +14 -14
  23. package/dist/contracts/channels.js +2 -2
  24. package/dist/contracts/comments.d.ts +143 -99
  25. package/dist/contracts/comments.js +194 -79
  26. package/dist/contracts/common.d.ts +12 -12
  27. package/dist/contracts/common.js +33 -30
  28. package/dist/contracts/continuation.js +5 -5
  29. package/dist/contracts/countries.js +2 -7
  30. package/dist/contracts/data-source-routes.d.ts +20 -0
  31. package/dist/contracts/data-source-routes.js +15 -0
  32. package/dist/contracts/device-auth.d.ts +13 -9
  33. package/dist/contracts/device-auth.js +12 -12
  34. package/dist/contracts/docs.d.ts +10 -10
  35. package/dist/contracts/domains.js +39 -33
  36. package/dist/contracts/enums.d.ts +4 -14
  37. package/dist/contracts/enums.js +3 -10
  38. package/dist/contracts/error-code-meta.d.ts +122 -56
  39. package/dist/contracts/error-code-meta.js +43 -19
  40. package/dist/contracts/error-codes.d.ts +7 -4
  41. package/dist/contracts/error-codes.js +48 -24
  42. package/dist/contracts/events.d.ts +22 -15
  43. package/dist/contracts/events.js +33 -5
  44. package/dist/contracts/execution.d.ts +238 -0
  45. package/dist/contracts/execution.js +309 -0
  46. package/dist/contracts/feature-lifecycle.d.ts +39 -188
  47. package/dist/contracts/feature-lifecycle.js +52 -196
  48. package/dist/contracts/features.d.ts +13 -115
  49. package/dist/contracts/features.js +5 -35
  50. package/dist/contracts/functions.d.ts +597 -0
  51. package/dist/contracts/functions.js +475 -0
  52. package/dist/contracts/grants.d.ts +1175 -0
  53. package/dist/contracts/grants.js +783 -0
  54. package/dist/contracts/ids.d.ts +7 -5
  55. package/dist/contracts/ids.js +7 -7
  56. package/dist/contracts/internal.js +2 -2
  57. package/dist/contracts/mcp.d.ts +17 -556
  58. package/dist/contracts/mcp.js +9 -103
  59. package/dist/contracts/me.js +3 -4
  60. package/dist/contracts/notifications.d.ts +108 -0
  61. package/dist/contracts/notifications.js +54 -0
  62. package/dist/contracts/oauth-resources.d.ts +22 -5
  63. package/dist/contracts/oauth-resources.js +23 -2
  64. package/dist/contracts/operations.d.ts +0 -48
  65. package/dist/contracts/operations.js +0 -19
  66. package/dist/contracts/pages.d.ts +10 -14
  67. package/dist/contracts/pages.js +17 -21
  68. package/dist/contracts/plan-policy.d.ts +1 -8
  69. package/dist/contracts/plan-policy.js +1 -4
  70. package/dist/contracts/platform.d.ts +78 -30
  71. package/dist/contracts/platform.js +69 -20
  72. package/dist/contracts/problem-document.d.ts +14 -0
  73. package/dist/contracts/problem-document.js +35 -0
  74. package/dist/contracts/push-new.d.ts +41 -2
  75. package/dist/contracts/push-new.js +4 -0
  76. package/dist/contracts/quotas.d.ts +0 -1
  77. package/dist/contracts/quotas.js +0 -5
  78. package/dist/contracts/repository-connections.d.ts +1 -1
  79. package/dist/contracts/resources.d.ts +16 -71
  80. package/dist/contracts/resources.js +13 -16
  81. package/dist/contracts/runtime-api.d.ts +666 -303
  82. package/dist/contracts/runtime-api.js +272 -113
  83. package/dist/contracts/runtime-app.d.ts +168 -0
  84. package/dist/contracts/runtime-app.js +42 -0
  85. package/dist/contracts/runtime-db.d.ts +424 -0
  86. package/dist/contracts/runtime-db.js +108 -0
  87. package/dist/contracts/runtime-storage.d.ts +120 -0
  88. package/dist/contracts/runtime-storage.js +40 -0
  89. package/dist/contracts/sf-config-v1.d.ts +54 -1
  90. package/dist/contracts/sf-config-v1.js +2 -2
  91. package/dist/contracts/sites.d.ts +6 -0
  92. package/dist/contracts/sites.js +30 -11
  93. package/dist/contracts/space-config.d.ts +91 -121
  94. package/dist/contracts/space-config.js +464 -42
  95. package/dist/contracts/spaces.d.ts +300 -171
  96. package/dist/contracts/spaces.js +128 -98
  97. package/dist/contracts/superadmin-emails.d.ts +2 -2
  98. package/dist/contracts/superadmin-spaces.d.ts +26 -130
  99. package/dist/contracts/superadmin-spaces.js +22 -0
  100. package/dist/contracts/superadmin-tenants.js +4 -4
  101. package/dist/contracts/superadmin.d.ts +4 -0
  102. package/dist/contracts/superadmin.js +14 -1
  103. package/dist/contracts/tags.d.ts +6 -6
  104. package/dist/contracts/tags.js +1 -1
  105. package/dist/contracts/teams.d.ts +9 -9
  106. package/dist/contracts/teams.js +25 -16
  107. package/dist/contracts/theme-json.js +1 -1
  108. package/dist/contracts/transfers.d.ts +0 -1
  109. package/dist/contracts/transfers.js +4 -4
  110. package/dist/contracts/variables.js +3 -3
  111. package/dist/contracts/zero.d.ts +384 -596
  112. package/dist/contracts/zero.js +167 -299
  113. package/dist/dashboard-paths/index.d.ts +18 -3
  114. package/dist/dashboard-paths/index.js +19 -0
  115. package/dist/docs/agent-handoff-document.d.ts +2 -2
  116. package/dist/docs/agent-handoff-document.js +8 -7
  117. package/dist/docs/agent-prose.d.ts +22 -3
  118. package/dist/docs/agent-prose.js +227 -55
  119. package/dist/docs/agent-setup.d.ts +14 -11
  120. package/dist/docs/agent-setup.js +289 -61
  121. package/dist/docs/agent-solutions.d.ts +6 -6
  122. package/dist/docs/agent-solutions.js +24 -22
  123. package/dist/docs/catalog.d.ts +53 -98
  124. package/dist/docs/catalog.js +90 -117
  125. package/dist/docs/error-docs.js +304 -236
  126. package/dist/docs/skill-distribution.d.ts +2 -0
  127. package/dist/docs/skill-distribution.js +7 -4
  128. package/dist/docs/skills.d.ts +546 -0
  129. package/dist/docs/skills.js +340 -0
  130. package/dist/utils/auth-redirect.d.ts +1 -3
  131. package/dist/utils/auth-redirect.js +1 -21
  132. package/dist/utils/browser-credential.d.ts +19 -0
  133. package/dist/utils/browser-credential.js +62 -0
  134. package/dist/utils/build-settings.d.ts +2 -0
  135. package/dist/utils/build-settings.js +61 -9
  136. package/dist/utils/comment-avatars.d.ts +7 -0
  137. package/dist/utils/comment-avatars.js +42 -0
  138. package/dist/utils/content-type.d.ts +3 -3
  139. package/dist/utils/content-type.js +38 -61
  140. package/dist/utils/credential-policy.d.ts +1 -1
  141. package/dist/utils/credential-policy.js +4 -0
  142. package/dist/utils/domain-diagnostics.d.ts +5 -5
  143. package/dist/utils/domain-diagnostics.js +21 -10
  144. package/dist/utils/egress-policy.fixtures.json +1 -1
  145. package/dist/utils/grants.d.ts +53 -0
  146. package/dist/utils/grants.js +160 -0
  147. package/dist/utils/local-space-state.d.ts +78 -4
  148. package/dist/utils/local-space-state.js +384 -82
  149. package/dist/utils/one-shot-replay.d.ts +14 -0
  150. package/dist/utils/one-shot-replay.js +21 -0
  151. package/dist/utils/page-preview.d.ts +7 -0
  152. package/dist/utils/page-preview.js +9 -0
  153. package/dist/utils/pages.d.ts +2 -5
  154. package/dist/utils/pages.js +64 -33
  155. package/dist/utils/publish-form-data.d.ts +22 -0
  156. package/dist/utils/publish-form-data.js +26 -0
  157. package/dist/utils/publish-policy.d.ts +34 -4
  158. package/dist/utils/publish-policy.js +149 -62
  159. package/dist/utils/query-keys.d.ts +8 -10
  160. package/dist/utils/query-keys.js +14 -10
  161. package/dist/utils/runtime-paths.d.ts +3 -0
  162. package/dist/utils/runtime-paths.js +7 -0
  163. package/dist/utils/secure-local-file.d.ts +73 -0
  164. package/dist/utils/secure-local-file.js +1373 -0
  165. package/dist/utils/space-config.d.ts +17 -4
  166. package/dist/utils/space-config.js +151 -8
  167. package/dist/utils/static-runtime-policy.d.ts +5 -0
  168. package/dist/utils/static-runtime-policy.js +54 -10
  169. package/dist/utils/storage-policy.d.ts +20 -0
  170. package/dist/utils/storage-policy.fixtures.json +174 -0
  171. package/dist/utils/storage-policy.js +193 -0
  172. package/dist/utils/upload-session.d.ts +15 -1
  173. package/dist/utils/upload-session.js +68 -2
  174. package/dist/utils/version-file-browser.d.ts +13 -0
  175. package/dist/utils/version-file-browser.js +59 -0
  176. package/package.json +20 -1
  177. package/dist/contracts/mounts.d.ts +0 -142
  178. package/dist/contracts/mounts.js +0 -56
  179. package/dist/utils/access-grant.d.ts +0 -14
  180. package/dist/utils/access-grant.js +0 -88
  181. package/dist/utils/access-match.d.ts +0 -46
  182. package/dist/utils/access-match.fixtures.json +0 -513
  183. package/dist/utils/access-match.js +0 -312
  184. package/dist/utils/access-verdict.fixtures.json +0 -421
  185. package/dist/utils/asset-fingerprint.d.ts +0 -53
  186. package/dist/utils/asset-fingerprint.js +0 -574
  187. package/dist/utils/sf-config-v1.d.ts +0 -2
  188. package/dist/utils/sf-config-v1.fixtures.json +0 -9
  189. package/dist/utils/sf-config-v1.js +0 -551
@@ -79,6 +79,7 @@ export declare const DeviceAuthorizationPollResponseSchema: z.ZodObject<{
79
79
  "teams:create": "teams:create";
80
80
  "spaces:read": "spaces:read";
81
81
  "spaces:write": "spaces:write";
82
+ "spaces:rename": "spaces:rename";
82
83
  "domains:read": "domains:read";
83
84
  "mcp:tools": "mcp:tools";
84
85
  "*": "*";
@@ -108,6 +109,7 @@ export declare const DeviceAuthorizationPollResponseSchema: z.ZodObject<{
108
109
  "webhooks:read": "webhooks:read";
109
110
  "webhooks:write": "webhooks:write";
110
111
  "builds:read": "builds:read";
112
+ "builds:trigger": "builds:trigger";
111
113
  "builds:create": "builds:create";
112
114
  "teams:write": "teams:write";
113
115
  "teams:members.write": "teams:members.write";
@@ -197,9 +199,9 @@ export declare const AgentHandoffCreateRequestSchema: z.ZodObject<{
197
199
  spaceId: z.ZodString;
198
200
  clientTargetId: z.ZodEnum<{
199
201
  "claude-code": "claude-code";
202
+ codex: "codex";
200
203
  cursor: "cursor";
201
204
  vscode: "vscode";
202
- codex: "codex";
203
205
  }>;
204
206
  }, z.core.$strict>;
205
207
  export type AgentHandoffCreateRequest = z.infer<typeof AgentHandoffCreateRequestSchema>;
@@ -211,9 +213,9 @@ export declare const AgentHandoffCreateResponseSchema: z.ZodObject<{
211
213
  spaceId: z.ZodString;
212
214
  clientTargetId: z.ZodEnum<{
213
215
  "claude-code": "claude-code";
216
+ codex: "codex";
214
217
  cursor: "cursor";
215
218
  vscode: "vscode";
216
- codex: "codex";
217
219
  }>;
218
220
  }, z.core.$strict>;
219
221
  export type AgentHandoffCreateResponse = z.infer<typeof AgentHandoffCreateResponseSchema>;
@@ -221,9 +223,9 @@ export declare const AgentHandoffRedeemRequestSchema: z.ZodObject<{
221
223
  url: z.ZodString;
222
224
  clientTargetId: z.ZodOptional<z.ZodEnum<{
223
225
  "claude-code": "claude-code";
226
+ codex: "codex";
224
227
  cursor: "cursor";
225
228
  vscode: "vscode";
226
- codex: "codex";
227
229
  }>>;
228
230
  }, z.core.$strict>;
229
231
  export type AgentHandoffRedeemRequest = z.infer<typeof AgentHandoffRedeemRequestSchema>;
@@ -272,6 +274,7 @@ export declare const AgentHandoffRedeemResponseSchema: z.ZodObject<{
272
274
  "teams:create": "teams:create";
273
275
  "spaces:read": "spaces:read";
274
276
  "spaces:write": "spaces:write";
277
+ "spaces:rename": "spaces:rename";
275
278
  "domains:read": "domains:read";
276
279
  "mcp:tools": "mcp:tools";
277
280
  "*": "*";
@@ -301,6 +304,7 @@ export declare const AgentHandoffRedeemResponseSchema: z.ZodObject<{
301
304
  "webhooks:read": "webhooks:read";
302
305
  "webhooks:write": "webhooks:write";
303
306
  "builds:read": "builds:read";
307
+ "builds:trigger": "builds:trigger";
304
308
  "builds:create": "builds:create";
305
309
  "teams:write": "teams:write";
306
310
  "teams:members.write": "teams:members.write";
@@ -338,9 +342,9 @@ export declare const AgentHandoffRedeemResponseSchema: z.ZodObject<{
338
342
  spaceId: z.ZodString;
339
343
  clientTargetId: z.ZodEnum<{
340
344
  "claude-code": "claude-code";
345
+ codex: "codex";
341
346
  cursor: "cursor";
342
347
  vscode: "vscode";
343
- codex: "codex";
344
348
  }>;
345
349
  }, z.core.$strict>;
346
350
  export type AgentHandoffRedeemResponse = z.infer<typeof AgentHandoffRedeemResponseSchema>;
@@ -353,8 +357,8 @@ export declare const AgentHandoffListQuerySchema: z.ZodObject<{
353
357
  }, z.core.$strip>;
354
358
  export type AgentHandoffListQuery = z.infer<typeof AgentHandoffListQuerySchema>;
355
359
  export declare const AgentHandoffStatusSchema: z.ZodEnum<{
356
- pending: "pending";
357
360
  revoked: "revoked";
361
+ pending: "pending";
358
362
  redeemed: "redeemed";
359
363
  }>;
360
364
  export declare const AgentHandoffSummarySchema: z.ZodObject<{
@@ -363,13 +367,13 @@ export declare const AgentHandoffSummarySchema: z.ZodObject<{
363
367
  spaceId: z.ZodString;
364
368
  clientTargetId: z.ZodEnum<{
365
369
  "claude-code": "claude-code";
370
+ codex: "codex";
366
371
  cursor: "cursor";
367
372
  vscode: "vscode";
368
- codex: "codex";
369
373
  }>;
370
374
  status: z.ZodEnum<{
371
- pending: "pending";
372
375
  revoked: "revoked";
376
+ pending: "pending";
373
377
  redeemed: "redeemed";
374
378
  }>;
375
379
  createdAt: z.ZodString;
@@ -384,13 +388,13 @@ export declare const AgentHandoffListResponseSchema: z.ZodArray<z.ZodObject<{
384
388
  spaceId: z.ZodString;
385
389
  clientTargetId: z.ZodEnum<{
386
390
  "claude-code": "claude-code";
391
+ codex: "codex";
387
392
  cursor: "cursor";
388
393
  vscode: "vscode";
389
- codex: "codex";
390
394
  }>;
391
395
  status: z.ZodEnum<{
392
- pending: "pending";
393
396
  revoked: "revoked";
397
+ pending: "pending";
394
398
  redeemed: "redeemed";
395
399
  }>;
396
400
  createdAt: z.ZodString;
@@ -172,8 +172,8 @@ export const DeviceAuthorizationDenyResponseSchema = z.object({
172
172
  export const AGENT_HANDOFF_CLIENT_TARGETS = ["claude-code", "codex", "cursor", "vscode"];
173
173
  export const AgentHandoffCreateRequestSchema = z
174
174
  .object({
175
- teamId: z.string().min(1).describe("Team that owns the selected Space."),
176
- spaceId: z.string().min(1).describe("Finite Space scope granted to the agent."),
175
+ teamId: z.string().min(1).describe("Team that owns the selected space."),
176
+ spaceId: z.string().min(1).describe("Finite space scope granted to the agent."),
177
177
  clientTargetId: z
178
178
  .enum(AGENT_HANDOFF_CLIENT_TARGETS)
179
179
  .describe("CLI-redeemable client family the handoff is bound to."),
@@ -185,13 +185,13 @@ export const AgentHandoffCreateResponseSchema = z
185
185
  url: z
186
186
  .string()
187
187
  .url()
188
- .describe("Sensitive one-time handoff URL. This is the only response field containing the fragment secret."),
188
+ .describe("Sensitive one-time handoff URL. This is the only response field containing the browser credential."),
189
189
  expiresAt: z
190
190
  .string()
191
191
  .datetime()
192
192
  .describe("Instant after which the handoff cannot be redeemed."),
193
- teamId: z.string().min(1).describe("Team that owns the selected Space."),
194
- spaceId: z.string().min(1).describe("Finite Space scope granted to the agent."),
193
+ teamId: z.string().min(1).describe("Team that owns the selected space."),
194
+ spaceId: z.string().min(1).describe("Finite space scope granted to the agent."),
195
195
  clientTargetId: z
196
196
  .enum(AGENT_HANDOFF_CLIENT_TARGETS)
197
197
  .describe("CLI-redeemable client family the handoff is bound to."),
@@ -212,9 +212,9 @@ export const AgentHandoffRedeemRequestSchema = z
212
212
  export const AgentHandoffRedeemResponseSchema = z
213
213
  .object({
214
214
  status: z.literal("redeemed").describe("The handoff was redeemed exactly once."),
215
- apiKey: ApiKeySchema.describe("Finite Space-scoped API key including its one-time secret."),
216
- teamId: z.string().min(1).describe("Team that owns the selected Space."),
217
- spaceId: z.string().min(1).describe("Finite Space scope granted to the agent."),
215
+ apiKey: ApiKeySchema.describe("Finite space-scoped API key including its one-time secret."),
216
+ teamId: z.string().min(1).describe("Team that owns the selected space."),
217
+ spaceId: z.string().min(1).describe("Finite space scope granted to the agent."),
218
218
  clientTargetId: z
219
219
  .enum(AGENT_HANDOFF_CLIENT_TARGETS)
220
220
  .describe("CLI-redeemable client family the handoff is bound to."),
@@ -228,19 +228,19 @@ export const AgentHandoffRevokeResponseSchema = z
228
228
  // List (`GET /v1/auth/agent-handoffs?teamId=…`): the human handoff ledger. Session-only,
229
229
  // scoped to one team, bounded to the newest rows (active handoffs are few and short-lived,
230
230
  // so the bound can never hide a revocable link); rows are the truthful lifecycle record,
231
- // never the secret (the fragment secret exists only in the one create response and is
231
+ // never the secret (the browser credential exists only in the one create response and is
232
232
  // never listed or replayed).
233
233
  export const AgentHandoffListQuerySchema = z.object({
234
234
  teamId: z.string().min(1).describe("Team whose issued agent handoffs to list."),
235
235
  });
236
236
  export const AgentHandoffStatusSchema = z
237
237
  .enum(["pending", "redeemed", "revoked"])
238
- .describe("Stored lifecycle status. `expired` is not a stored status it is derived by the caller from `expiresAt`.");
238
+ .describe("Stored lifecycle status. `expired` is not a stored status. The caller derives it from `expiresAt`.");
239
239
  export const AgentHandoffSummarySchema = z
240
240
  .object({
241
241
  id: z.string().min(1).describe("Opaque app-private handoff document identifier."),
242
- teamId: z.string().min(1).describe("Team that owns the selected Space."),
243
- spaceId: z.string().min(1).describe("Finite Space scope granted to the agent."),
242
+ teamId: z.string().min(1).describe("Team that owns the selected space."),
243
+ spaceId: z.string().min(1).describe("Finite space scope granted to the agent."),
244
244
  clientTargetId: z
245
245
  .enum(AGENT_HANDOFF_CLIENT_TARGETS)
246
246
  .describe("CLI-redeemable client family the handoff is bound to."),
@@ -9,12 +9,12 @@ export declare const docsIndexQuerySchema: z.ZodObject<{
9
9
  reference: "reference";
10
10
  }>>;
11
11
  category: z.ZodOptional<z.ZodEnum<{
12
- api: "api";
13
12
  guide: "guide";
13
+ api: "api";
14
14
  error: "error";
15
15
  cli: "cli";
16
- recipe: "recipe";
17
16
  workflow: "workflow";
17
+ recipe: "recipe";
18
18
  }>>;
19
19
  }, z.core.$strip>;
20
20
  /** Links carried by every docs entry. */
@@ -28,12 +28,12 @@ export declare const DocsEntrySchema: z.ZodObject<{
28
28
  title: z.ZodString;
29
29
  summary: z.ZodString;
30
30
  category: z.ZodEnum<{
31
- api: "api";
32
31
  guide: "guide";
32
+ api: "api";
33
33
  error: "error";
34
34
  cli: "cli";
35
- recipe: "recipe";
36
35
  workflow: "workflow";
36
+ recipe: "recipe";
37
37
  }>;
38
38
  tier: z.ZodEnum<{
39
39
  essential: "essential";
@@ -54,12 +54,12 @@ export declare const DocsDocSchema: z.ZodObject<{
54
54
  title: z.ZodString;
55
55
  summary: z.ZodString;
56
56
  category: z.ZodEnum<{
57
- api: "api";
58
57
  guide: "guide";
58
+ api: "api";
59
59
  error: "error";
60
60
  cli: "cli";
61
- recipe: "recipe";
62
61
  workflow: "workflow";
62
+ recipe: "recipe";
63
63
  }>;
64
64
  tier: z.ZodEnum<{
65
65
  essential: "essential";
@@ -84,12 +84,12 @@ export declare const DocsIndexResponseSchema: z.ZodObject<{
84
84
  }>;
85
85
  query: z.ZodNullable<z.ZodString>;
86
86
  category: z.ZodNullable<z.ZodEnum<{
87
- api: "api";
88
87
  guide: "guide";
88
+ api: "api";
89
89
  error: "error";
90
90
  cli: "cli";
91
- recipe: "recipe";
92
91
  workflow: "workflow";
92
+ recipe: "recipe";
93
93
  }>>;
94
94
  count: z.ZodNumber;
95
95
  entries: z.ZodArray<z.ZodObject<{
@@ -97,12 +97,12 @@ export declare const DocsIndexResponseSchema: z.ZodObject<{
97
97
  title: z.ZodString;
98
98
  summary: z.ZodString;
99
99
  category: z.ZodEnum<{
100
- api: "api";
101
100
  guide: "guide";
101
+ api: "api";
102
102
  error: "error";
103
103
  cli: "cli";
104
- recipe: "recipe";
105
104
  workflow: "workflow";
105
+ recipe: "recipe";
106
106
  }>;
107
107
  tier: z.ZodEnum<{
108
108
  essential: "essential";
@@ -14,17 +14,17 @@ export const domainRegistrarFacetSchema = z.object({
14
14
  provider: z
15
15
  .string()
16
16
  .optional()
17
- .describe('Wrapped registrar provider key when mode is "stattic", e.g. "wpcom".'),
17
+ .describe("Wrapped registrar provider key when `mode` is `stattic`, for example `wpcom`."),
18
18
  status: z
19
19
  .enum(["active", "pending_purchase", "pending_transfer_in", "expiring", "expired", "locked"])
20
20
  .optional()
21
21
  .describe("Registration lifecycle status; `expiring` is derived from the expiry date."),
22
- expiresAt: z.string().datetime().optional().describe("When the registration expires."),
22
+ expiresAt: z.string().datetime().optional().describe("Instant when the registration expires."),
23
23
  redemptionEndsAt: z
24
24
  .string()
25
25
  .datetime()
26
26
  .optional()
27
- .describe("End of the provider grace/redemption window after expiry."),
27
+ .describe("Instant when the provider grace or redemption window ends after expiry."),
28
28
  autoRenew: z.boolean().optional().describe("Whether the registration renews automatically."),
29
29
  transferLock: z
30
30
  .boolean()
@@ -40,15 +40,15 @@ export const domainDnsFacetSchema = z.object({
40
40
  managementKind: z
41
41
  .enum(["unmanaged_external", "connected_provider", "registrar_dns", "stattic_nameservers"])
42
42
  .optional()
43
- .describe("Derived DNS management state. Additive; `mode` remains the v1 compatibility field."),
43
+ .describe("Derived DNS management state. This field is additive. `mode` remains the v1 compatibility field."),
44
44
  dnsMode: z
45
45
  .enum(["authoritative", "adapter"])
46
46
  .optional()
47
- .describe("Hybrid DNS mode derived from `managementKind`: authoritative (Spacefast hosts the zone) or adapter (records managed/observed on the user's existing host). Additive read-model label."),
47
+ .describe("Hybrid DNS mode derived from `managementKind`: authoritative when Spacefast hosts the zone, or adapter when records are managed or observed on the user's existing host. This field is an additive read-model label."),
48
48
  provider: z
49
49
  .string()
50
50
  .optional()
51
- .describe('Wrapped DNS provider key when mode is "stattic", e.g. "route53" or "wpcom".'),
51
+ .describe("Wrapped DNS provider key when `mode` is `stattic`, for example `route53` or `wpcom`."),
52
52
  assignedNameservers: z
53
53
  .array(z.string())
54
54
  .optional()
@@ -88,13 +88,13 @@ export const domainVerificationSchema = z.object({
88
88
  .datetime()
89
89
  .nullable()
90
90
  .optional()
91
- .describe("When observed DNS was last polled."),
91
+ .describe("Instant when observed DNS was last polled."),
92
92
  lastVerifiedAt: z
93
93
  .string()
94
94
  .datetime()
95
95
  .nullable()
96
96
  .optional()
97
- .describe("Last time this domain proved DNS control."),
97
+ .describe("Instant when this domain last proved DNS control."),
98
98
  diagnostics: z
99
99
  .array(baseDiagnosticSchema)
100
100
  .optional()
@@ -171,7 +171,7 @@ export const domainRedirectTargetSchema = z
171
171
  .describe("Redirect destination: an absolute URL, or a space (optionally with a path).");
172
172
  export const domainRedirectStatusSchema = z
173
173
  .union([z.literal(301), z.literal(302), z.literal(307), z.literal(308)])
174
- .describe("HTTP redirect status; defaults to 308.");
174
+ .describe("HTTP redirect status. Defaults to 308.");
175
175
  // A domain either serves its Space or redirects away from it — whole-host
176
176
  // only. Path-level routing belongs in the serving Space's `_redirects`.
177
177
  export const domainRedirectSchema = z.object({
@@ -191,10 +191,10 @@ export const DomainSchema = z.object({
191
191
  .describe("Read-only U-label form, present only when it differs from `name`."),
192
192
  kind: z
193
193
  .enum(["hostname", "apex"])
194
- .describe("Derived, never create input: `apex` iff `name` equals `derivedGroup`."),
194
+ .describe("Derived field, never create input: `apex` if and only if `name` equals `derivedGroup`."),
195
195
  wildcardEnabled: z
196
196
  .boolean()
197
- .describe("Whether wildcard hostnames may be derived from this record."),
197
+ .describe("Whether wildcard hostnames can be derived from this record."),
198
198
  spaceId: z
199
199
  .string()
200
200
  .nullable()
@@ -219,8 +219,8 @@ export const DomainSchema = z.object({
219
219
  .array(domainHintSchema)
220
220
  .optional()
221
221
  .describe("Projected domain hints derived from diagnostics, actions, observations, and operations."),
222
- createdAt: z.string().datetime().describe("When the record was created."),
223
- updatedAt: z.string().datetime().describe("When the record last changed."),
222
+ createdAt: z.string().datetime().describe("Instant when the record was created."),
223
+ updatedAt: z.string().datetime().describe("Instant when the record last changed."),
224
224
  });
225
225
  export const domainListQuerySchema = cursorListQuerySchema.extend({
226
226
  teamId: z.string().min(1).optional().describe("Filter to domains owned by one team."),
@@ -242,7 +242,7 @@ export const spaceManagedDomainSchema = z.object({
242
242
  managed: z.literal(true),
243
243
  deletable: z.literal(false),
244
244
  assignable: z.literal(false),
245
- primary: z.boolean().describe("True when no custom primary domain overrides the managed URL."),
245
+ primary: z.boolean().describe("Whether no custom primary domain overrides the managed URL."),
246
246
  name: z.string().describe("Managed hostname."),
247
247
  unicodeName: z.string().optional(),
248
248
  kind: z.literal("hostname"),
@@ -281,7 +281,7 @@ export const domainCreateRequestSchema = z.object({
281
281
  .string()
282
282
  .min(1)
283
283
  .optional()
284
- .describe("Owning team. Defaults to the active team for sessions and the key's team."),
284
+ .describe("Owning team. Defaults to the active team for sessions and the API key's team."),
285
285
  });
286
286
  // Facet modes are never PATCHable: `dns.mode` changes only via POST /dns and
287
287
  // `registrar.mode` only via POST /registration. The PATCHable surface is
@@ -291,7 +291,7 @@ export const domainPatchSchema = z
291
291
  wildcardEnabled: z
292
292
  .boolean()
293
293
  .optional()
294
- .describe("Allow wildcard bindings under this domain record."),
294
+ .describe("Pass `true` to allow wildcard bindings under this domain record. Pass `false` to disallow them."),
295
295
  })
296
296
  .refine((value) => Object.keys(value).length > 0, {
297
297
  message: "At least one domain field is required.",
@@ -306,14 +306,14 @@ export const domainRegistrationSchema = z.object({
306
306
  provider: z
307
307
  .enum(["dsapi", "manual"])
308
308
  .nullable()
309
- .describe("Wrapped registrar bridge the registration lives at."),
309
+ .describe("Wrapped registrar bridge where the registration lives."),
310
310
  status: z.string().describe("Registration lifecycle status."),
311
- expiresAt: z.string().datetime().nullable().describe("When the registration expires."),
311
+ expiresAt: z.string().datetime().nullable().describe("Instant when the registration expires."),
312
312
  redemptionEndsAt: z
313
313
  .string()
314
314
  .datetime()
315
315
  .nullable()
316
- .describe("End of the redemption window after expiry."),
316
+ .describe("Instant when the redemption window ends after expiry."),
317
317
  autoRenew: z.boolean().describe("Whether the registration renews automatically."),
318
318
  transferLock: z.boolean().describe("Whether outbound transfers are locked."),
319
319
  privacySetting: z
@@ -321,7 +321,7 @@ export const domainRegistrationSchema = z.object({
321
321
  .nullable()
322
322
  .describe("WHOIS privacy behavior."),
323
323
  contactId: z.string().nullable().describe("Registrant contact record."),
324
- failureReason: z.string().nullable().describe("Provider failure detail, when failed."),
324
+ failureReason: z.string().nullable().describe("Provider failure detail when status is `failed`."),
325
325
  createdAt: z.string().datetime().nullable(),
326
326
  updatedAt: z.string().datetime().nullable(),
327
327
  });
@@ -377,8 +377,14 @@ export const domainRegistrationActionSchema = z.discriminatedUnion("action", [
377
377
  export const domainRegistrationActionResponseSchema = mutationEnvelope(domainRegistrationSchema);
378
378
  export const domainRegistrationPatchSchema = z
379
379
  .object({
380
- autoRenew: z.boolean().optional().describe("Toggle automatic renewal."),
381
- transferLock: z.boolean().optional().describe("Toggle the registrar transfer lock."),
380
+ autoRenew: z
381
+ .boolean()
382
+ .optional()
383
+ .describe("Pass `true` to enable automatic renewal. Pass `false` to disable it."),
384
+ transferLock: z
385
+ .boolean()
386
+ .optional()
387
+ .describe("Pass `true` to enable the registrar transfer lock. Pass `false` to disable it."),
382
388
  privacySetting: z
383
389
  .enum(["enable_privacy_service", "redact_contact_info", "disclose_contact_info"])
384
390
  .optional()
@@ -427,7 +433,7 @@ export const domainNameserverUpdateSchema = z.object({
427
433
  export const domainDnsModeRequestSchema = z.object({
428
434
  mode: z
429
435
  .enum(["stattic", "external"])
430
- .describe("Target DNS hosting mode. externalstattic snapshots observed records first."),
436
+ .describe("Target DNS hosting mode. On `external` to `stattic`, the server snapshots observed records first."),
431
437
  });
432
438
  // The transition receipt rides inside `data` (envelope law: `{data}` plus
433
439
  // `operation` only): the post-mutation Domain plus the transition diagnostics
@@ -473,11 +479,11 @@ export const domainDnsRecordSchema = z.object({
473
479
  .describe("Provider-only record metadata when advertised by capabilities."),
474
480
  managed: z
475
481
  .boolean()
476
- .describe("Spacefast-owned (verification/routing/ssl); read-only via the public API."),
482
+ .describe("Whether Spacefast owns this record for verification, routing, or SSL. Set by the server; read-only."),
477
483
  protected: z
478
484
  .boolean()
479
485
  .default(false)
480
- .describe("Read-only through public DNS record writes even when the record is not Spacefast-owned."),
486
+ .describe("Whether this record is read-only through public DNS record writes, even when Spacefast does not own it."),
481
487
  purpose: z
482
488
  .enum(["verification", "routing", "ssl"])
483
489
  .nullable()
@@ -497,8 +503,8 @@ export const domainDnsCapabilityFieldSchema = z.object({
497
503
  .enum(["string", "number", "boolean", "enum", "object", "array"])
498
504
  .describe("Machine-readable field type."),
499
505
  readable: z.boolean().describe("Whether provider snapshots can return this field."),
500
- creatable: z.boolean().describe("Whether create requests may set this field."),
501
- patchable: z.boolean().describe("Whether patch requests may change this field."),
506
+ creatable: z.boolean().describe("Whether create requests can set this field."),
507
+ patchable: z.boolean().describe("Whether patch requests can change this field."),
502
508
  requiredWhen: z
503
509
  .string()
504
510
  .nullable()
@@ -655,7 +661,7 @@ export const domainDnsCapabilitiesSchema = z
655
661
  "delegated_nameservers",
656
662
  "internal_service_key",
657
663
  ])
658
- .describe("Why DNS writes are or are not available."),
664
+ .describe("Why DNS writes are available or unavailable."),
659
665
  provider: z.string().nullable().describe("Effective DNS provider key when known."),
660
666
  recordTypes: z
661
667
  .array(domainDnsRecordSchema.shape.type)
@@ -944,7 +950,7 @@ export const domainActionCreateRequestSchema = domainActionDraftSchema.extend({
944
950
  .min(1)
945
951
  .max(320)
946
952
  .optional()
947
- .describe("Stable caller-supplied dedupe key; server derives one when omitted."),
953
+ .describe("Stable caller-supplied dedupe key. The server derives one when you omit this field."),
948
954
  });
949
955
  export const domainActionMutationResponseSchema = mutationEnvelope(domainActionSchema);
950
956
  export const domainDnsRecordSnapshotMetadataSchema = z.object({
@@ -1064,7 +1070,7 @@ const domainDnsRecordPatchableFields = z.object({
1064
1070
  .int()
1065
1071
  .min(60)
1066
1072
  .max(86400)
1067
- .describe("Time to live in seconds (60-86400); defaults to 3600 on create."),
1073
+ .describe("Time to live in seconds (60 to 86400). Defaults to 3600 on create."),
1068
1074
  priority: z
1069
1075
  .number()
1070
1076
  .int()
@@ -1095,8 +1101,8 @@ export const domainDnsRecordPatchSchema = domainDnsRecordPatchableFields
1095
1101
  })
1096
1102
  .superRefine(requireMxSrvPriority);
1097
1103
  // Executed in exactly this order — deletes, patches, puts, posts — as one
1098
- // atomic transaction; any failure rejects the whole batch with the failing
1099
- // entry in `error.param`.
1104
+ // atomic transaction; any failure rejects the whole batch with an RFC 6901
1105
+ // JSON Pointer to the failing entry in the problem document's `pointer`.
1100
1106
  export const domainDnsRecordBatchSchema = z
1101
1107
  .object({
1102
1108
  deletes: z
@@ -1188,7 +1194,7 @@ export const domainDiagnosticsResponseSchema = z.object({
1188
1194
  diagnostics: z
1189
1195
  .array(baseDiagnosticSchema)
1190
1196
  .optional()
1191
- .describe('Domain-level setup nudges computed at read time, e.g. "companion_hostname_unbound" when the apex/www pair is half-bound.'),
1197
+ .describe('Domain-level setup nudges computed at read time, for example "companion_hostname_unbound" when the apex/www pair is half-bound.'),
1192
1198
  hostnameDiagnostics: z
1193
1199
  .array(domainHostnameDiagnosticsSchema)
1194
1200
  .describe("Per-hostname DNS and SSL connectivity diagnostics."),
@@ -8,17 +8,15 @@ export declare const spaceStatus: z.ZodEnum<{
8
8
  deleting: "deleting";
9
9
  failed: "failed";
10
10
  }>;
11
- export declare const spaceDisabledReasonCodeValues: readonly ["anonymous_expired", "abuse_takedown", "tenant_suspended", "site_suspended", "visit_cap_exceeded"];
11
+ export declare const spaceDisabledReasonCodeValues: readonly ["anonymous_expired", "abuse_takedown", "tenant_suspended", "site_suspended"];
12
12
  export declare const spaceDisabledReasonCode: z.ZodEnum<{
13
13
  anonymous_expired: "anonymous_expired";
14
14
  abuse_takedown: "abuse_takedown";
15
15
  tenant_suspended: "tenant_suspended";
16
16
  site_suspended: "site_suspended";
17
- visit_cap_exceeded: "visit_cap_exceeded";
18
17
  }>;
19
- export declare const spaceTransferStatusValues: readonly ["pending_confirmation", "confirming_domains", "moving", "completed", "canceled", "expired"];
18
+ export declare const spaceTransferStatusValues: readonly ["pending_confirmation", "confirming_domains", "completed", "canceled", "expired"];
20
19
  export declare const spaceTransferStatus: z.ZodEnum<{
21
- moving: "moving";
22
20
  pending_confirmation: "pending_confirmation";
23
21
  confirming_domains: "confirming_domains";
24
22
  completed: "completed";
@@ -80,10 +78,10 @@ export declare function siteClassIsShared(value: SiteClass): boolean;
80
78
  export declare function siteClassIsDedicated(value: SiteClass): boolean;
81
79
  export declare const publishSourceKindValues: readonly ["direct_upload", "cli", "dashboard", "api", "git", "import", "agent", "build", "variable_update", "config_update"];
82
80
  export declare const publishSourceKind: z.ZodEnum<{
83
- api: "api";
84
- dashboard: "dashboard";
85
81
  build: "build";
86
82
  agent: "agent";
83
+ api: "api";
84
+ dashboard: "dashboard";
87
85
  direct_upload: "direct_upload";
88
86
  cli: "cli";
89
87
  git: "git";
@@ -168,14 +166,6 @@ export declare const enforcementTier: z.ZodEnum<{
168
166
  space_takedown: "space_takedown";
169
167
  account_suspend: "account_suspend";
170
168
  }>;
171
- export declare const cachePurgeAction: z.ZodEnum<{
172
- invalidate: "invalidate";
173
- }>;
174
- export declare const cachePurgeTarget: z.ZodEnum<{
175
- space: "space";
176
- domain: "domain";
177
- path: "path";
178
- }>;
179
169
  export declare const operationStatus: z.ZodEnum<{
180
170
  failed: "failed";
181
171
  canceled: "canceled";
@@ -11,18 +11,14 @@ export const spaceStatusValues = [
11
11
  "failed",
12
12
  ];
13
13
  export const spaceStatus = z.enum(spaceStatusValues);
14
- // Serving-axis disable reasons (internal-docs/platform.md "Space"): exactly
15
- // these five. Confirmed scan takedowns use `abuse_takedown`; infected state and
16
- // claim invalidation are explicit enforcement effects, not reason metadata.
17
- // `visit_cap_exceeded` is the anonymous visit-quota pause
18
- // (ANONYMOUS_PUBLISH_CAPS.maxLifetimeViews): recoverable, the claim token stays
19
- // intact, and claiming the space restores serving.
14
+ // Serving-axis disable reasons (internal-docs/platform.md "Space"). Confirmed
15
+ // scan takedowns use `abuse_takedown`; infected state and claim invalidation
16
+ // are explicit enforcement effects, not reason metadata.
20
17
  export const spaceDisabledReasonCodeValues = [
21
18
  "anonymous_expired",
22
19
  "abuse_takedown",
23
20
  "tenant_suspended",
24
21
  "site_suspended",
25
- "visit_cap_exceeded",
26
22
  ];
27
23
  export const spaceDisabledReasonCode = z.enum(spaceDisabledReasonCodeValues);
28
24
  // SpaceTransfer status machine (internal-docs/platform.md "Transfer
@@ -34,7 +30,6 @@ export const spaceDisabledReasonCode = z.enum(spaceDisabledReasonCodeValues);
34
30
  export const spaceTransferStatusValues = [
35
31
  "pending_confirmation",
36
32
  "confirming_domains",
37
- "moving",
38
33
  "completed",
39
34
  "canceled",
40
35
  "expired",
@@ -218,6 +213,4 @@ export const SAFETY_SEVERITY = {
218
213
  export const safetySeverity = z.number().int().min(1).max(5);
219
214
  export const enforcementTierValues = ["record", "space_takedown", "account_suspend"];
220
215
  export const enforcementTier = z.enum(enforcementTierValues);
221
- export const cachePurgeAction = z.enum(["invalidate"]);
222
- export const cachePurgeTarget = z.enum(["space", "domain", "path"]);
223
216
  export const operationStatus = z.enum(["queued", "running", "succeeded", "failed", "canceled"]);