@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
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- export declare const ACTIVITY_EVENT_CODES: readonly ["space.created", "space.claimed", "feedback.lead_claim_pending", "space.transferred", "space.move_requested", "space.moved", "space.expired", "space.disabled", "space.enabled", "space.deleted", "space.config_updated", "space.slug_updated", "space.password_updated", "site.provision_requested", "site.placement_hold_set", "site.placement_hold_cleared", "site.burst_toggled", "space.access_logout_all", "space.access_transfer_scrub", "space.access_operator_token", "space.sharing_updated", "space.share_link_created", "space.share_link_revoked", "space.invite_created", "space.invite_revoked", "space.access_request_created", "space.access_request_resolved", "space.firewall_updated", "team.access_defaults_updated", "team.service_token_created", "team.service_token_revoked", "team.access_connection_created", "team.access_connection_updated", "team.access_connection_revoked", "version.created", "version.ready", "version.warning", "version.failed", "version.expired", "version.canceled", "version.deleted", "version.retention_warning", "version.retention_deleted", "channel.promoted", "build.created", "build.succeeded", "build.failed", "build.canceled", "build.skipped", "domain.created", "domain.verified", "domain.verification_failed", "domain.control_lost", "domain.dns_updated", "domain.nameservers_updated", "domain.registration_purchased", "domain.registration_renewed", "domain.registration_expiring", "domain.registration_expired", "domain.transfer_in_started", "domain.transfer_out_started", "domain.deleted", "domain.attached", "domain.activated", "domain.blocked", "domain.detached", "transfer.requested", "transfer.confirmed", "transfer.completed", "transfer.canceled", "transfer.expired", "transfer.failed", "variable.updated", "variable.deleted", "api_key.created", "api_key.updated", "api_key.revoked", "agent_handoff.created", "agent_handoff.redeemed", "agent_handoff.revoked", "webhook.created", "webhook.updated", "webhook.secret_rotated", "webhook.disabled", "webhook.deleted", "team.updated", "team.slug_updated", "team.member_added", "team.member_removed", "team.member_role_updated", "team.builds_deploys_quota_exceeded", "tenant.past_due", "tenant.suspended", "tenant.reactivated", "tenant.deleted", "export.ready", "export.failed", "import.ready", "import.failed", "comment.token_minted", "comment.created", "comment.reply_created", "comment.archived", "comment.unarchived", "abuse_report.created", "abuse_report.updated", "claim.blocked_takedown", "user.created", "user.signed_in", "user.deleted", "user.impersonation_started", "user.impersonation_stopped", "user.two_factor_enabled", "user.two_factor_disabled"];
2
+ export declare const ACTIVITY_EVENT_CODES: readonly ["space.created", "space.claimed", "feedback.lead_claim_pending", "space.transferred", "space.move_requested", "space.moved", "space.expired", "space.disabled", "space.enabled", "space.deleted", "space.config_updated", "space.slug_updated", "site.provision_requested", "site.placement_hold_set", "site.placement_hold_cleared", "site.burst_toggled", "space.access_logout_all", "space.access_transfer_scrub", "space.share_link_created", "space.share_link_revoked", "space.access_request_created", "space.access_request_resolved", "space.grant_created", "space.grant_updated", "space.grant_revoked", "team.access_defaults_updated", "version.created", "version.ready", "version.warning", "version.failed", "version.expired", "version.canceled", "version.deleted", "version.retention_warning", "version.retention_deleted", "channel.promoted", "build.created", "build.succeeded", "build.failed", "build.canceled", "build.skipped", "domain.created", "domain.verified", "domain.verification_failed", "domain.control_lost", "domain.dns_updated", "domain.nameservers_updated", "domain.registration_purchased", "domain.registration_renewed", "domain.registration_expiring", "domain.registration_expired", "domain.transfer_in_started", "domain.transfer_out_started", "domain.deleted", "domain.attached", "domain.activated", "domain.blocked", "domain.detached", "transfer.requested", "transfer.confirmed", "transfer.completed", "transfer.canceled", "transfer.expired", "transfer.failed", "variable.updated", "variable.deleted", "api_key.created", "api_key.updated", "api_key.revoked", "agent_handoff.created", "agent_handoff.redeemed", "agent_handoff.revoked", "webhook.created", "webhook.updated", "webhook.secret_rotated", "webhook.disabled", "webhook.deleted", "team.updated", "team.slug_updated", "team.member_added", "team.member_removed", "team.member_role_updated", "team.builds_deploys_quota_exceeded", "tenant.past_due", "tenant.suspended", "tenant.reactivated", "tenant.deleted", "export.ready", "export.failed", "import.ready", "import.failed", "comment.token_minted", "comment.created", "comment.reply_created", "comment.archived", "comment.unarchived", "abuse_report.created", "abuse_report.updated", "claim.blocked_takedown", "claim.authority_rotated", "user.created", "user.signed_in", "user.deleted", "user.impersonation_started", "user.impersonation_stopped", "user.two_factor_enabled", "user.two_factor_disabled"];
3
3
  export type ActivityEventCode = (typeof ACTIVITY_EVENT_CODES)[number];
4
4
  export declare function isActivityEventCode(value: string): value is ActivityEventCode;
5
5
  export declare function isValidActivityEventFilter(filter: string): boolean;
@@ -2,7 +2,7 @@ import { z } from "zod";
2
2
  import { AnyObjectSchema, CursorPaginationSchema, cursorListQuerySchema } from "./common.js";
3
3
  // The single event taxonomy (internal-docs/platform.md "Event taxonomy").
4
4
  // Every emitted activity event and every webhook `events` filter selects on
5
- // these codes. Growth is additive-only: codes are never renamed or removed.
5
+ // these codes.
6
6
  // `appendActivityEvent` is typed against this list, so emitting a code that is
7
7
  // not in the table is a typecheck (CI) failure.
8
8
  export const ACTIVITY_EVENT_CODES = [
@@ -19,31 +19,22 @@ export const ACTIVITY_EVENT_CODES = [
19
19
  "space.deleted",
20
20
  "space.config_updated",
21
21
  "space.slug_updated",
22
- "space.password_updated",
23
22
  // site
24
23
  "site.provision_requested",
25
24
  "site.placement_hold_set",
26
25
  "site.placement_hold_cleared",
27
26
  "site.burst_toggled",
28
- // access (internal-docs/access-plan.html): every access mutation emits an
29
- // activity event; operator mints are audited and owner-visible (X-27).
27
+ // access
30
28
  "space.access_logout_all",
31
29
  "space.access_transfer_scrub",
32
- "space.access_operator_token",
33
- "space.sharing_updated",
34
30
  "space.share_link_created",
35
31
  "space.share_link_revoked",
36
- "space.invite_created",
37
- "space.invite_revoked",
38
32
  "space.access_request_created",
39
33
  "space.access_request_resolved",
40
- "space.firewall_updated",
34
+ "space.grant_created",
35
+ "space.grant_updated",
36
+ "space.grant_revoked",
41
37
  "team.access_defaults_updated",
42
- "team.service_token_created",
43
- "team.service_token_revoked",
44
- "team.access_connection_created",
45
- "team.access_connection_updated",
46
- "team.access_connection_revoked",
47
38
  // version
48
39
  "version.created",
49
40
  "version.ready",
@@ -135,6 +126,7 @@ export const ACTIVITY_EVENT_CODES = [
135
126
  // claim (additive extension: a claim attempt against a taken-down space is
136
127
  // flagged, never silently 404ed — internal-docs/platform.md "Abuse Posture")
137
128
  "claim.blocked_takedown",
129
+ "claim.authority_rotated",
138
130
  // user (additive extension: account lifecycle plus the 2FA and
139
131
  // admin-impersonation effects that must surface through ActivityEvent —
140
132
  // internal-docs/platform.md Better Auth usage). `user.created` fires once on
@@ -201,7 +193,11 @@ export const activityQuerySchema = cursorListQuerySchema.extend({
201
193
  .describe("Filter to events owned by a team or an external customer principal."),
202
194
  principalId: z.string().min(1).optional().describe("Filter to a single principal id."),
203
195
  spaceId: z.string().min(1).optional().describe("Filter to events for one space."),
204
- code: z.string().min(1).optional().describe("Filter to one event code, e.g. `space.created`."),
196
+ code: z
197
+ .string()
198
+ .min(1)
199
+ .optional()
200
+ .describe("Filter to one event code, for example `space.created`."),
205
201
  since: z.string().datetime().optional().describe("Only events at or after this time."),
206
202
  until: z.string().datetime().optional().describe("Only events at or before this time."),
207
203
  });
@@ -5,6 +5,7 @@ export declare const StatticActionSchema: z.ZodEnum<{
5
5
  "teams:create": "teams:create";
6
6
  "spaces:read": "spaces:read";
7
7
  "spaces:write": "spaces:write";
8
+ "spaces:rename": "spaces:rename";
8
9
  "domains:read": "domains:read";
9
10
  "mcp:tools": "mcp:tools";
10
11
  "*": "*";
@@ -34,6 +35,7 @@ export declare const StatticActionSchema: z.ZodEnum<{
34
35
  "webhooks:read": "webhooks:read";
35
36
  "webhooks:write": "webhooks:write";
36
37
  "builds:read": "builds:read";
38
+ "builds:trigger": "builds:trigger";
37
39
  "builds:create": "builds:create";
38
40
  "teams:write": "teams:write";
39
41
  "teams:members.write": "teams:members.write";
@@ -87,6 +89,7 @@ export declare const ApiCredentialPolicySchema: z.ZodObject<{
87
89
  "teams:create": "teams:create";
88
90
  "spaces:read": "spaces:read";
89
91
  "spaces:write": "spaces:write";
92
+ "spaces:rename": "spaces:rename";
90
93
  "domains:read": "domains:read";
91
94
  "mcp:tools": "mcp:tools";
92
95
  "*": "*";
@@ -116,6 +119,7 @@ export declare const ApiCredentialPolicySchema: z.ZodObject<{
116
119
  "webhooks:read": "webhooks:read";
117
120
  "webhooks:write": "webhooks:write";
118
121
  "builds:read": "builds:read";
122
+ "builds:trigger": "builds:trigger";
119
123
  "builds:create": "builds:create";
120
124
  "teams:write": "teams:write";
121
125
  "teams:members.write": "teams:members.write";
@@ -191,6 +195,7 @@ export declare const ApiKeySchema: z.ZodObject<{
191
195
  "teams:create": "teams:create";
192
196
  "spaces:read": "spaces:read";
193
197
  "spaces:write": "spaces:write";
198
+ "spaces:rename": "spaces:rename";
194
199
  "domains:read": "domains:read";
195
200
  "mcp:tools": "mcp:tools";
196
201
  "*": "*";
@@ -220,6 +225,7 @@ export declare const ApiKeySchema: z.ZodObject<{
220
225
  "webhooks:read": "webhooks:read";
221
226
  "webhooks:write": "webhooks:write";
222
227
  "builds:read": "builds:read";
228
+ "builds:trigger": "builds:trigger";
223
229
  "builds:create": "builds:create";
224
230
  "teams:write": "teams:write";
225
231
  "teams:members.write": "teams:members.write";
@@ -303,6 +309,7 @@ export declare const ApiKeyListResponseSchema: z.ZodObject<{
303
309
  "teams:create": "teams:create";
304
310
  "spaces:read": "spaces:read";
305
311
  "spaces:write": "spaces:write";
312
+ "spaces:rename": "spaces:rename";
306
313
  "domains:read": "domains:read";
307
314
  "mcp:tools": "mcp:tools";
308
315
  "*": "*";
@@ -332,6 +339,7 @@ export declare const ApiKeyListResponseSchema: z.ZodObject<{
332
339
  "webhooks:read": "webhooks:read";
333
340
  "webhooks:write": "webhooks:write";
334
341
  "builds:read": "builds:read";
342
+ "builds:trigger": "builds:trigger";
335
343
  "builds:create": "builds:create";
336
344
  "teams:write": "teams:write";
337
345
  "teams:members.write": "teams:members.write";
@@ -395,6 +403,7 @@ export declare const ApiKeyCreateRequestSchema: z.ZodObject<{
395
403
  "teams:create": "teams:create";
396
404
  "spaces:read": "spaces:read";
397
405
  "spaces:write": "spaces:write";
406
+ "spaces:rename": "spaces:rename";
398
407
  "domains:read": "domains:read";
399
408
  "mcp:tools": "mcp:tools";
400
409
  "*": "*";
@@ -424,6 +433,7 @@ export declare const ApiKeyCreateRequestSchema: z.ZodObject<{
424
433
  "webhooks:read": "webhooks:read";
425
434
  "webhooks:write": "webhooks:write";
426
435
  "builds:read": "builds:read";
436
+ "builds:trigger": "builds:trigger";
427
437
  "builds:create": "builds:create";
428
438
  "teams:write": "teams:write";
429
439
  "teams:members.write": "teams:members.write";
@@ -469,6 +479,7 @@ export declare const ApiKeyPatchRequestSchema: z.ZodObject<{
469
479
  "teams:create": "teams:create";
470
480
  "spaces:read": "spaces:read";
471
481
  "spaces:write": "spaces:write";
482
+ "spaces:rename": "spaces:rename";
472
483
  "domains:read": "domains:read";
473
484
  "mcp:tools": "mcp:tools";
474
485
  "*": "*";
@@ -498,6 +509,7 @@ export declare const ApiKeyPatchRequestSchema: z.ZodObject<{
498
509
  "webhooks:read": "webhooks:read";
499
510
  "webhooks:write": "webhooks:write";
500
511
  "builds:read": "builds:read";
512
+ "builds:trigger": "builds:trigger";
501
513
  "builds:create": "builds:create";
502
514
  "teams:write": "teams:write";
503
515
  "teams:members.write": "teams:members.write";
@@ -542,6 +554,7 @@ export declare const ApiKeyScopedCreateRequestSchema: z.ZodObject<{
542
554
  "teams:create": "teams:create";
543
555
  "spaces:read": "spaces:read";
544
556
  "spaces:write": "spaces:write";
557
+ "spaces:rename": "spaces:rename";
545
558
  "domains:read": "domains:read";
546
559
  "mcp:tools": "mcp:tools";
547
560
  "*": "*";
@@ -571,6 +584,7 @@ export declare const ApiKeyScopedCreateRequestSchema: z.ZodObject<{
571
584
  "webhooks:read": "webhooks:read";
572
585
  "webhooks:write": "webhooks:write";
573
586
  "builds:read": "builds:read";
587
+ "builds:trigger": "builds:trigger";
574
588
  "builds:create": "builds:create";
575
589
  "teams:write": "teams:write";
576
590
  "teams:members.write": "teams:members.write";
@@ -601,6 +615,7 @@ export declare const ApiKeyScopedPatchRequestSchema: z.ZodObject<{
601
615
  "teams:create": "teams:create";
602
616
  "spaces:read": "spaces:read";
603
617
  "spaces:write": "spaces:write";
618
+ "spaces:rename": "spaces:rename";
604
619
  "domains:read": "domains:read";
605
620
  "mcp:tools": "mcp:tools";
606
621
  "*": "*";
@@ -630,6 +645,7 @@ export declare const ApiKeyScopedPatchRequestSchema: z.ZodObject<{
630
645
  "webhooks:read": "webhooks:read";
631
646
  "webhooks:write": "webhooks:write";
632
647
  "builds:read": "builds:read";
648
+ "builds:trigger": "builds:trigger";
633
649
  "builds:create": "builds:create";
634
650
  "teams:write": "teams:write";
635
651
  "teams:members.write": "teams:members.write";
@@ -11,6 +11,7 @@ export const StatticActionSchema = z.enum([
11
11
  "spaces:read",
12
12
  "spaces:create",
13
13
  "spaces:write",
14
+ "spaces:rename",
14
15
  "spaces:delete",
15
16
  "spaces:publish",
16
17
  "spaces:transfer",
@@ -32,6 +33,7 @@ export const StatticActionSchema = z.enum([
32
33
  "webhooks:read",
33
34
  "webhooks:write",
34
35
  "builds:read",
36
+ "builds:trigger",
35
37
  "builds:create",
36
38
  "teams:read",
37
39
  "teams:create",
@@ -46,7 +48,7 @@ export const StatticActionSchema = z.enum([
46
48
  "runtime:manage",
47
49
  "*",
48
50
  ]);
49
- const DescribedStatticActionSchema = StatticActionSchema.describe("A namespaced IAM-lite action (`noun:verb`) or `*` for all actions.");
51
+ const DescribedStatticActionSchema = StatticActionSchema.describe("Namespaced IAM-lite action (`noun:verb`), or `*` for all actions.");
50
52
  const RESOURCE_PREFIX = "stt://tenant/";
51
53
  function isResourceSegment(value) {
52
54
  return Boolean(value && value.length > 0 && !/[\s/\\]/.test(value));
@@ -98,7 +100,7 @@ const StatticResourceSchema = z
98
100
  .refine((value) => parseStatticResource(value) !== null, {
99
101
  message: "Resource must be a stt:// URI from the StatticResource union (tenant, principal, site, space, site space, domain, or domain-group).",
100
102
  })
101
- .describe("A resource URI from the StatticResource union: stt://tenant/{t}, …/principal/(team|external)/{id}[/*], …/site/{id}[/*], …/space/{id}[/*], …/site/{id}/space/{id}[/*], …/domain/{id}, or …/domain-group/{id}.");
103
+ .describe("Resource URI from the resource union: stt://tenant/{t}, …/principal/(team|external)/{id}[/*], …/site/{id}[/*], …/space/{id}[/*], …/site/{id}/space/{id}[/*], …/domain/{id}, or …/domain-group/{id}.");
102
104
  export const ApiCredentialPolicySchema = z
103
105
  .object({
104
106
  version: z
@@ -127,11 +129,11 @@ export const ApiCredentialPolicySchema = z
127
129
  })
128
130
  .strict()
129
131
  .optional()
130
- .describe("ANDed condition attributes. Unresolvable attributes fail closed: no-match for allow, match for deny."),
132
+ .describe("AND condition attributes. Unresolvable attributes fail closed: no match for allow, and match for deny."),
131
133
  })
132
134
  .strict())
133
135
  .min(1)
134
- .describe("Evaluation: explicit deny wins, explicit allow permits, otherwise implicit deny."),
136
+ .describe("Evaluation order: explicit deny wins, explicit allow permits, otherwise implicit deny."),
135
137
  })
136
138
  .strict()
137
139
  .describe("IAM-lite access policy evaluated for every credentialed request.");
@@ -145,12 +147,12 @@ export const ApiKeyPresetSchema = z
145
147
  "team_admin",
146
148
  "billing_viewer",
147
149
  ])
148
- .describe("Named policy preset compiled into a concrete access policy at key creation.");
150
+ .describe("Named policy preset compiled into a concrete access policy when the key is created.");
149
151
  // `system` is never a principal type: runtime/internal credentials are
150
152
  // platform-owned and omit ownerPrincipal entirely (internal-docs/platform.md).
151
153
  const ApiKeyOwnerPrincipalSchema = z.object({
152
154
  type: z.enum(["team", "external"]).describe("Principal type that owns this key."),
153
- id: z.string().min(1).describe("Stable principal id (Better Auth team id or external id)."),
155
+ id: z.string().min(1).describe("Stable principal id (Better Auth team id, or external id)."),
154
156
  });
155
157
  const ApiKeySubjectSchema = z.object({
156
158
  type: z
@@ -188,7 +190,7 @@ export const ApiKeyListQuerySchema = cursorListQuerySchema.extend({
188
190
  .string()
189
191
  .min(1)
190
192
  .optional()
191
- .describe("Owning team whose keys to list. Defaults to the caller's own team; any team the credential's policy reaches is allowed."),
193
+ .describe("Owning team whose keys to list. Defaults to the caller's own team. Any team that the credential policy reaches is allowed."),
192
194
  });
193
195
  export const ApiKeyListResponseSchema = z.object({
194
196
  data: z.array(ApiKeySchema),
@@ -200,7 +202,7 @@ export const ApiKeyCreateRequestSchema = z.object({
200
202
  .string()
201
203
  .min(1)
202
204
  .optional()
203
- .describe("Owning team for the new key. Defaults to the caller's own team; authorization is by the credential's policy, not key ownership."),
205
+ .describe("Owning team for the new key. Defaults to the caller's own team. Authorization is by the credential policy, not key ownership."),
204
206
  preset: ApiKeyPresetSchema.optional(),
205
207
  policy: ApiCredentialPolicySchema.nullable()
206
208
  .optional()
@@ -250,7 +252,7 @@ export const ApiKeyScopeSchema = z
250
252
  z.object({ kind: z.literal("team"), teamId: z.string().min(1) }).strict(),
251
253
  z.object({ kind: z.literal("space"), spaceId: z.string().min(1) }).strict(),
252
254
  ])
253
- .describe("Explicit, finite policy target. A space scope narrows the derived policy to exactly that space never the owning team's whole tree.");
255
+ .describe("Explicit, finite policy target. A space scope narrows the derived policy to exactly that space, never the owning team's whole tree.");
254
256
  export const ApiKeyScopedCreateRequestSchema = z
255
257
  .object({
256
258
  name: z.string().trim().min(1).max(255).optional().describe("Human-readable key name."),
@@ -6,8 +6,7 @@ export declare const archiveListQuerySchema: z.ZodObject<{
6
6
  export declare const spaceExportRequestSchema: z.ZodObject<{
7
7
  versionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
8
8
  includeFiles: z.ZodDefault<z.ZodBoolean>;
9
- includeExplicitConfig: z.ZodDefault<z.ZodBoolean>;
10
- }, z.core.$strip>;
9
+ }, z.core.$strict>;
11
10
  export declare const spaceExportArchiveSchema: z.ZodObject<{
12
11
  contentType: z.ZodLiteral<"application/zip">;
13
12
  downloadUrl: z.ZodString;
@@ -2,7 +2,8 @@ import { z } from "zod";
2
2
  import { baseDiagnosticSchema, CursorPaginationSchema, cursorListQuerySchema } from "./common.js";
3
3
  import { uploadInstructionsSchema } from "./internal.js";
4
4
  export const archiveListQuerySchema = cursorListQuerySchema;
5
- export const spaceExportRequestSchema = z.object({
5
+ export const spaceExportRequestSchema = z
6
+ .object({
6
7
  versionIds: z
7
8
  .array(z.string().min(1))
8
9
  .min(1)
@@ -11,12 +12,9 @@ export const spaceExportRequestSchema = z.object({
11
12
  includeFiles: z
12
13
  .boolean()
13
14
  .default(true)
14
- .describe("Include version file trees and compiled serving artifacts. `false` produces a config-only archive that is not self-servable and cannot be re-imported."),
15
- includeExplicitConfig: z
16
- .boolean()
17
- .default(true)
18
- .describe("Include explicit space config (the space access policy) in the archive. Version manifests are always included."),
19
- });
15
+ .describe("Pass `true` to include version file trees and compiled serving artifacts. Pass `false` for a config-only archive that is not self-servable and cannot be re-imported."),
16
+ })
17
+ .strict();
20
18
  export const spaceExportArchiveSchema = z.object({
21
19
  // Zip-only contract: spacefast_export_v1 archives are always zip (the spec
22
20
  // allows "zip or tar"; one format keeps the enum honest).
@@ -35,8 +33,8 @@ export const spaceExportArchiveSchema = z.object({
35
33
  .describe("SHA-256 of the archive bytes (64 lowercase hex characters), for verification."),
36
34
  });
37
35
  export const spaceExportSchema = z.object({
38
- id: z.string().describe("Export handle id (exp_)."),
39
- spaceId: z.string().describe("Source space id (spc_)."),
36
+ id: z.string().describe("The export handle id (`exp_…`)."),
37
+ spaceId: z.string().describe("The source space id (`spc_…`)."),
40
38
  status: z
41
39
  .enum(["queued", "running", "ready", "failed", "expired"])
42
40
  .describe("Export lifecycle. `expired` means the archive download window has passed."),
@@ -54,8 +52,8 @@ export const spaceExportSchema = z.object({
54
52
  .string()
55
53
  .nullable()
56
54
  .describe("Operation (op_…) tracking the asynchronous export work."),
57
- createdAt: z.string().datetime().describe("When the export handle was created."),
58
- updatedAt: z.string().datetime().describe("When the export handle last changed."),
55
+ createdAt: z.string().datetime().describe("Instant when the export handle was created."),
56
+ updatedAt: z.string().datetime().describe("Instant when the export handle last changed."),
59
57
  });
60
58
  export const spaceExportListResponseSchema = z.object({
61
59
  data: z.array(spaceExportSchema),
@@ -83,11 +81,11 @@ export const spaceImportRequestSchema = z.object({
83
81
  publish: z
84
82
  .boolean()
85
83
  .default(false)
86
- .describe("Promote the newest imported version to the live channel once materialized. Imported versions never go public implicitly."),
84
+ .describe("Pass `true` to promote the newest imported version to the live channel after it materializes. Imported versions never go public implicitly."),
87
85
  });
88
86
  export const spaceImportSchema = z.object({
89
- id: z.string().describe("Import handle id (imp_)."),
90
- targetSpaceId: z.string().describe("Target space id (spc_) the import materializes into."),
87
+ id: z.string().describe("The import handle id (`imp_…`)."),
88
+ targetSpaceId: z.string().describe("The target space id (`spc_…`) the import materializes into."),
91
89
  status: z
92
90
  .enum([
93
91
  "created",
@@ -101,7 +99,7 @@ export const spaceImportSchema = z.object({
101
99
  .describe("Import lifecycle. Upload-kind imports wait in `waiting_for_archive` until the archive is uploaded and the import is finalized."),
102
100
  archiveUpload: uploadInstructionsSchema
103
101
  .optional()
104
- .describe("Archive upload instructions the same upload contract as publish. Present while status is `waiting_for_archive`: PUT the archive to `{baseUrl}/{files[0]}` with the session token, then POST `links.finalize`. Each fetch of the import re-mints a fresh token."),
102
+ .describe("Archive upload instructions. This is the same upload contract as publish. Present while status is `waiting_for_archive`: PUT the archive to `{baseUrl}/{files[0]}` with the session token, then POST `links.finalize`. Each fetch of the import mints a fresh token."),
105
103
  draftVersionIds: z
106
104
  .array(z.string())
107
105
  .describe("Version ids (ver_…) minted and owned by this import."),
@@ -113,8 +111,8 @@ export const spaceImportSchema = z.object({
113
111
  .string()
114
112
  .nullable()
115
113
  .describe("Operation (op_…) tracking the asynchronous import work."),
116
- createdAt: z.string().datetime().describe("When the import handle was created."),
117
- updatedAt: z.string().datetime().describe("When the import handle last changed."),
114
+ createdAt: z.string().datetime().describe("Instant when the import handle was created."),
115
+ updatedAt: z.string().datetime().describe("Instant when the import handle last changed."),
118
116
  });
119
117
  export const spaceImportListResponseSchema = z.object({
120
118
  data: z.array(spaceImportSchema),
@@ -91,7 +91,7 @@ export const SuperadminBetaSignupSchema = z.object({
91
91
  invitedBy: z
92
92
  .string()
93
93
  .nullable()
94
- .describe("Inviting operator's user id; null = auto-approved (Automattician signup)."),
94
+ .describe("Inviting operator user id; null when auto-approved (Automattician signup)."),
95
95
  enrolledUserId: z.string().nullable(),
96
96
  createdAt: z.string().datetime(),
97
97
  });
@@ -27,7 +27,7 @@ export const BuildSettingsSchema = z
27
27
  allowUnsupportedPlatformFeatures: z.boolean().default(false),
28
28
  timeoutSeconds: buildTimeoutSecondsSchema,
29
29
  })
30
- .describe("Resolved build settings. Builds persist this as an immutable settingsSnapshot.");
30
+ .describe("Resolved build settings. Builds persist this as an immutable `settingsSnapshot`.");
31
31
  export const BuildTargetSchema = z
32
32
  .object({
33
33
  channel: z
@@ -39,7 +39,7 @@ export const BuildTargetSchema = z
39
39
  .describe("Channel to promote when the build succeeds; null means no automatic promotion."),
40
40
  preview: z.boolean().default(false).describe("Whether the build targets preview behavior."),
41
41
  })
42
- .describe("Where a successful build should publish or preview.");
42
+ .describe("Where a successful build should publish or run in preview mode.");
43
43
  // Shared by InternalBuildSourceSchema and InternalBuildInputSchema: both carry
44
44
  // this exact archive-source member in their `kind` discriminated union.
45
45
  const internalArchiveBuildSourceSchema = z.object({
@@ -48,7 +48,7 @@ const internalArchiveBuildSourceSchema = z.object({
48
48
  sourceMetadata: z
49
49
  .record(z.string(), z.unknown())
50
50
  .optional()
51
- .describe("Internal source provenance copied to the produced Version."),
51
+ .describe("Internal source provenance copied to the produced version."),
52
52
  objectKey: z.string().optional().describe("Internal staged archive object key."),
53
53
  uploadedAt: z.string().datetime().optional().describe("When the archive finished staging."),
54
54
  recoveredAt: z
@@ -76,7 +76,7 @@ const InternalBuildSourceSchema = z
76
76
  }),
77
77
  internalArchiveBuildSourceSchema,
78
78
  ])
79
- .describe("Legacy internal build source shape retained while build routes migrate to input.");
79
+ .describe("Legacy internal build source shape, retained while build routes migrate to input.");
80
80
  const InternalBuildInputSchema = z
81
81
  .discriminatedUnion("kind", [
82
82
  internalArchiveBuildSourceSchema,
@@ -126,7 +126,7 @@ export const PublicBuildInputSchema = z
126
126
  })
127
127
  .strict(),
128
128
  ])
129
- .describe("Public build input. Internal clone URLs and staged object keys are not exposed.");
129
+ .describe("Public build input. Internal clone URLs and staged object keys are hidden.");
130
130
  export const BuildCreateInputSchema = z
131
131
  .discriminatedUnion("kind", [
132
132
  z
@@ -135,7 +135,7 @@ export const BuildCreateInputSchema = z
135
135
  sourceMetadata: z
136
136
  .record(z.string(), z.unknown())
137
137
  .optional()
138
- .describe("Optional source provenance for the produced Version."),
138
+ .describe("Optional source provenance for the produced version."),
139
139
  })
140
140
  .strict(),
141
141
  z.object({
@@ -153,7 +153,7 @@ export const BuildCreateInputSchema = z
153
153
  // plain string here since the runner's specific phase vocabulary is an
154
154
  // app-level concern, not a shared contract.
155
155
  const buildExecutionPhaseSchema = z.object({
156
- phase: z.string().min(1).describe("Build phase name; see BUILD_PHASES in builds/runner.ts."),
156
+ phase: z.string().min(1).describe("Build phase name. See `BUILD_PHASES` in `builds/runner.ts`."),
157
157
  at: z.string().datetime(),
158
158
  });
159
159
  const buildExecutionLaunchSchema = z.object({
@@ -188,11 +188,11 @@ const InternalBuildExecutionSchema = z
188
188
  phases: z
189
189
  .array(buildExecutionPhaseSchema)
190
190
  .optional()
191
- .describe("Phase timeline the runner appends to via recordBuildPhase."),
191
+ .describe("Phase timeline that the runner appends to with `recordBuildPhase`."),
192
192
  })
193
193
  .describe("Internal runner execution metadata surfaced only where appropriate.");
194
194
  export const BuildSchema = z.object({
195
- id: z.string().describe("Build id (`bld_`); opaque, never derived from a version id."),
195
+ id: z.string().describe("Build id (`bld_`); opaque and never derived from a version id."),
196
196
  spaceId: z.string().describe("Space (`spc_`) the build produces a version for."),
197
197
  status: buildStatus.describe("Build lifecycle status."),
198
198
  input: PublicBuildInputSchema,
@@ -206,12 +206,12 @@ export const BuildSchema = z.object({
206
206
  producedVersionId: z
207
207
  .string()
208
208
  .nullable()
209
- .describe("Version (`ver_`) minted by a succeeded build; null otherwise."),
209
+ .describe("Version (`ver_`) minted by a successful build; null otherwise."),
210
210
  reusedVersionId: z
211
211
  .string()
212
212
  .nullable()
213
213
  .default(null)
214
- .describe("Existing version reused by a succeeded no-change build; null otherwise."),
214
+ .describe("Existing version reused by a successful no-change build; null otherwise."),
215
215
  diagnostics: z.array(baseDiagnosticSchema).default([]),
216
216
  createdAt: z.string().datetime(),
217
217
  startedAt: z.string().datetime().nullable().describe("When the runner picked the build up."),
@@ -221,7 +221,7 @@ export const buildCreateRequestSchema = z.object({
221
221
  input: BuildCreateInputSchema,
222
222
  settings: BuildSettingsSchema.partial()
223
223
  .optional()
224
- .describe("Per-run settings overrides; persisted as settingsSnapshot after resolution."),
224
+ .describe("Per-run settings overrides, persisted as `settingsSnapshot` after resolution."),
225
225
  target: BuildTargetSchema.partial().optional(),
226
226
  diagnostics: z
227
227
  .array(baseDiagnosticSchema)
@@ -253,9 +253,9 @@ export const spaceBuildIntegrationSchema = z
253
253
  .object({
254
254
  branchChannels: z
255
255
  .record(z.string().min(1).describe("Git branch or ref name."), z.literal("live").describe("Channel the branch's builds promote to."))
256
- .describe("Exact branch/ref name to channel name, e.g. { main: 'live' }."),
256
+ .describe("Exact branch or ref name to channel name, for example `{ main: 'live' }`."),
257
257
  })
258
- .describe("Per-space build integration config: where repository builds promote.");
258
+ .describe("Per-space build integration config that defines where repository builds promote.");
259
259
  /** Channel a repository build promotes to, or null when the ref is unmapped (default channel applies). */
260
260
  export function resolveBuildChannel(integration, ref) {
261
261
  return integration?.branchChannels[ref] ?? null;
@@ -21,7 +21,7 @@ export const channelListItemSchema = z.object({
21
21
  .nullable()
22
22
  .optional()
23
23
  .describe("Last version this channel served before the current pointer (rollback target)."),
24
- updatedAt: z.string().datetime().describe("When this channel pointer last moved."),
24
+ updatedAt: z.string().datetime().describe("Instant when this channel pointer last moved."),
25
25
  });
26
26
  // One entry of a channel's promotion history (the deploy log): a single
27
27
  // `channel.promoted` event, newest first. This is the audit trail of every
@@ -40,7 +40,7 @@ export const channelHistoryEntrySchema = z.object({
40
40
  .optional()
41
41
  .describe("Kind of actor that performed the promotion."),
42
42
  actorId: z.string().nullable().optional().describe("Identifier of the promoting actor."),
43
- at: z.string().datetime().describe("When the promotion happened."),
43
+ at: z.string().datetime().describe("Instant when the promotion happened."),
44
44
  });
45
45
  export const channelListResponseSchema = z.object({
46
46
  data: z.array(channelListItemSchema),