@spacefast/common 0.2.2 → 0.4.1

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 (226) hide show
  1. package/dist/agents/marketplace-prompts.d.ts +1 -0
  2. package/dist/agents/marketplace-prompts.js +6 -0
  3. package/dist/agents/registry/core.d.ts +4 -12
  4. package/dist/agents/registry/core.js +7 -28
  5. package/dist/config/domains.d.ts +10 -8
  6. package/dist/config/domains.js +4 -7
  7. package/dist/contracts/access-core.d.ts +135 -0
  8. package/dist/contracts/access-core.js +242 -0
  9. package/dist/contracts/access-profiles.d.ts +8 -8
  10. package/dist/contracts/access-profiles.js +8 -8
  11. package/dist/contracts/access.d.ts +14 -103
  12. package/dist/contracts/access.js +10 -210
  13. package/dist/contracts/activity.d.ts +54 -55
  14. package/dist/contracts/activity.js +38 -9
  15. package/dist/contracts/api-keys.d.ts +69 -26
  16. package/dist/contracts/api-keys.js +29 -2
  17. package/dist/contracts/application-journal.d.ts +197 -4
  18. package/dist/contracts/application-journal.js +97 -16
  19. package/dist/contracts/auth.d.ts +20 -0
  20. package/dist/contracts/auth.js +18 -0
  21. package/dist/contracts/beta.d.ts +13 -0
  22. package/dist/contracts/beta.js +28 -0
  23. package/dist/contracts/billing.d.ts +2 -2
  24. package/dist/contracts/bootstrap.d.ts +23 -6
  25. package/dist/contracts/builds.d.ts +18 -4
  26. package/dist/contracts/builds.js +7 -4
  27. package/dist/contracts/channels.d.ts +43 -0
  28. package/dist/contracts/channels.js +22 -6
  29. package/dist/contracts/comments.d.ts +49 -0
  30. package/dist/contracts/comments.js +61 -2
  31. package/dist/contracts/commerce.d.ts +19 -13
  32. package/dist/contracts/connector-access.d.ts +28 -0
  33. package/dist/contracts/connector-access.js +31 -0
  34. package/dist/contracts/connectors.d.ts +2382 -0
  35. package/dist/contracts/connectors.js +941 -0
  36. package/dist/contracts/content-contract-verification.d.ts +112 -58
  37. package/dist/contracts/content-contract-verification.js +42 -54
  38. package/dist/contracts/content-model-emit.d.ts +97 -0
  39. package/dist/contracts/content-model-emit.js +306 -0
  40. package/dist/contracts/content-model-sdk.d.ts +101 -0
  41. package/dist/contracts/content-model-sdk.js +232 -0
  42. package/dist/contracts/{content-program.d.ts → content-model.d.ts} +338 -82
  43. package/dist/contracts/{content-program.js → content-model.js} +291 -63
  44. package/dist/contracts/content-platform-fixture.d.ts +380 -110
  45. package/dist/contracts/content-platform-fixture.js +8 -8
  46. package/dist/contracts/content-sync.d.ts +197 -74
  47. package/dist/contracts/content-sync.js +98 -37
  48. package/dist/contracts/content.d.ts +30 -422
  49. package/dist/contracts/content.js +34 -294
  50. package/dist/contracts/dashboard-prefs.d.ts +10 -3
  51. package/dist/contracts/dashboard-prefs.js +6 -3
  52. package/dist/contracts/data-location.d.ts +9 -0
  53. package/dist/contracts/data-location.js +7 -0
  54. package/dist/contracts/deployment-comparison.d.ts +67 -0
  55. package/dist/contracts/deployment-comparison.js +68 -0
  56. package/dist/contracts/device-auth.d.ts +55 -11
  57. package/dist/contracts/domains.d.ts +40 -16
  58. package/dist/contracts/domains.js +23 -0
  59. package/dist/contracts/enums.d.ts +1 -10
  60. package/dist/contracts/enums.js +0 -15
  61. package/dist/contracts/error-code-meta.d.ts +384 -20
  62. package/dist/contracts/error-code-meta.js +200 -5
  63. package/dist/contracts/error-codes.d.ts +17 -4
  64. package/dist/contracts/error-codes.js +108 -10
  65. package/dist/contracts/events.d.ts +5 -0
  66. package/dist/contracts/events.js +12 -3
  67. package/dist/contracts/execution.d.ts +5 -1
  68. package/dist/contracts/execution.js +4 -0
  69. package/dist/contracts/feature-lifecycle.d.ts +53 -20
  70. package/dist/contracts/feature-lifecycle.js +65 -23
  71. package/dist/contracts/features.d.ts +57 -31
  72. package/dist/contracts/features.js +0 -1
  73. package/dist/contracts/feedback.d.ts +124 -0
  74. package/dist/contracts/feedback.js +64 -0
  75. package/dist/contracts/fixtures/content-model-sdk-v1.generated.d.ts +129 -0
  76. package/dist/contracts/fixtures/content-model-sdk-v1.generated.js +48 -0
  77. package/dist/contracts/fixtures/content-platform-v1.json +101 -49
  78. package/dist/contracts/frame-session.d.ts +60 -10
  79. package/dist/contracts/frame-session.js +52 -12
  80. package/dist/contracts/functions.d.ts +28 -2
  81. package/dist/contracts/functions.js +25 -2
  82. package/dist/contracts/grant-copy.d.ts +2 -0
  83. package/dist/contracts/grant-copy.js +2 -0
  84. package/dist/contracts/grants-core.d.ts +95 -0
  85. package/dist/contracts/grants-core.js +435 -0
  86. package/dist/contracts/grants.d.ts +13 -84
  87. package/dist/contracts/grants.js +21 -369
  88. package/dist/contracts/ids-core.d.ts +11 -0
  89. package/dist/contracts/ids-core.js +14 -0
  90. package/dist/contracts/ids.d.ts +7 -4
  91. package/dist/contracts/ids.js +12 -4
  92. package/dist/contracts/internal.d.ts +18 -0
  93. package/dist/contracts/internal.js +19 -0
  94. package/dist/contracts/mcp.d.ts +8 -18
  95. package/dist/contracts/mcp.js +2 -23
  96. package/dist/contracts/notifications.d.ts +4 -1
  97. package/dist/contracts/notifications.js +1 -0
  98. package/dist/contracts/oauth-resources.d.ts +46 -9
  99. package/dist/contracts/oauth-resources.js +50 -1
  100. package/dist/contracts/oauth-scope-actions.d.ts +27 -3
  101. package/dist/contracts/oauth-scope-actions.js +18 -8
  102. package/dist/contracts/operations.d.ts +1 -1
  103. package/dist/contracts/partner-account.d.ts +629 -0
  104. package/dist/contracts/partner-account.js +18 -0
  105. package/dist/contracts/principal-assertion.d.ts +74 -1
  106. package/dist/contracts/principal-assertion.js +67 -3
  107. package/dist/contracts/publish-archive.d.ts +22 -1
  108. package/dist/contracts/push-new.d.ts +3 -3
  109. package/dist/contracts/push-new.js +1 -1
  110. package/dist/contracts/quotas.js +2 -1
  111. package/dist/contracts/repository-connections.d.ts +10 -6
  112. package/dist/contracts/repository-connections.js +15 -0
  113. package/dist/contracts/resources.d.ts +6 -5
  114. package/dist/contracts/resources.js +7 -0
  115. package/dist/contracts/route-inventory.d.ts +74 -19
  116. package/dist/contracts/route-inventory.js +20 -6
  117. package/dist/contracts/runtime-api.d.ts +415 -4
  118. package/dist/contracts/runtime-api.js +60 -15
  119. package/dist/contracts/runtime-app.d.ts +6 -1
  120. package/dist/contracts/runtime-components.d.ts +646 -18
  121. package/dist/contracts/runtime-components.js +304 -188
  122. package/dist/contracts/runtime-services.d.ts +15 -0
  123. package/dist/contracts/runtime-services.js +25 -0
  124. package/dist/contracts/runtime-storage.d.ts +32 -0
  125. package/dist/contracts/runtime-storage.js +37 -0
  126. package/dist/contracts/source-workspaces.d.ts +511 -0
  127. package/dist/contracts/source-workspaces.js +276 -0
  128. package/dist/contracts/space-config-spacefast.d.ts +394 -0
  129. package/dist/contracts/space-config-spacefast.js +70 -0
  130. package/dist/contracts/space-config.d.ts +177 -90
  131. package/dist/contracts/space-config.js +77 -92
  132. package/dist/contracts/spaces.d.ts +132 -24
  133. package/dist/contracts/spaces.js +77 -13
  134. package/dist/contracts/superadmin-connectors.d.ts +371 -0
  135. package/dist/contracts/superadmin-connectors.js +61 -0
  136. package/dist/contracts/superadmin-emails.d.ts +1 -1
  137. package/dist/contracts/superadmin-emails.js +1 -1
  138. package/dist/contracts/superadmin-entities.d.ts +105 -0
  139. package/dist/contracts/superadmin-entities.js +64 -0
  140. package/dist/contracts/superadmin-runtime.d.ts +35 -116
  141. package/dist/contracts/superadmin-runtime.js +13 -69
  142. package/dist/contracts/superadmin-search.d.ts +12 -14
  143. package/dist/contracts/superadmin-search.js +2 -2
  144. package/dist/contracts/superadmin-spaces.d.ts +15 -72
  145. package/dist/contracts/superadmin-spaces.js +2 -7
  146. package/dist/contracts/superadmin-teams.d.ts +12 -0
  147. package/dist/contracts/superadmin-teams.js +7 -1
  148. package/dist/contracts/superadmin-tenants.d.ts +44 -16
  149. package/dist/contracts/superadmin.d.ts +2 -2
  150. package/dist/contracts/tags.d.ts +12 -12
  151. package/dist/contracts/teams.d.ts +29 -1
  152. package/dist/contracts/teams.js +24 -2
  153. package/dist/contracts/tenants.d.ts +98 -0
  154. package/dist/contracts/tenants.js +20 -0
  155. package/dist/contracts/transfers.d.ts +92 -0
  156. package/dist/contracts/transfers.js +37 -0
  157. package/dist/contracts/usage.d.ts +9 -1
  158. package/dist/contracts/usage.js +2 -0
  159. package/dist/contracts/visual-review.d.ts +448 -0
  160. package/dist/contracts/visual-review.js +156 -0
  161. package/dist/contracts/wordpress-php-toolkit.json +9 -0
  162. package/dist/contracts/work-mode.d.ts +24 -0
  163. package/dist/contracts/work-mode.js +17 -0
  164. package/dist/contracts/wp-cli.d.ts +66 -0
  165. package/dist/contracts/wp-cli.js +68 -0
  166. package/dist/contracts/zero-catalog.d.ts +29 -0
  167. package/dist/contracts/zero-catalog.js +55 -0
  168. package/dist/contracts/zero-platform-abilities.generated.d.ts +31 -0
  169. package/dist/contracts/zero-platform-abilities.generated.js +373 -0
  170. package/dist/contracts/zero-spacefast.d.ts +444 -0
  171. package/dist/contracts/zero-spacefast.js +149 -0
  172. package/dist/contracts/zero-types.d.ts +47 -0
  173. package/dist/contracts/zero-types.js +263 -0
  174. package/dist/contracts/zero.d.ts +781 -14
  175. package/dist/contracts/zero.js +204 -10
  176. package/dist/dashboard-paths/index.d.ts +2 -2
  177. package/dist/dashboard-paths/route-reservations.generated.d.ts +2 -2
  178. package/dist/dashboard-paths/route-reservations.generated.js +5 -0
  179. package/dist/docs/agent-prose.d.ts +1 -1
  180. package/dist/docs/agent-prose.js +15 -18
  181. package/dist/docs/agent-setup.d.ts +1 -1
  182. package/dist/docs/agent-setup.js +5 -13
  183. package/dist/docs/catalog.d.ts +64 -28
  184. package/dist/docs/catalog.js +155 -28
  185. package/dist/docs/error-docs.d.ts +361 -17
  186. package/dist/docs/error-docs.js +365 -21
  187. package/dist/docs/reference-urls.js +1 -1
  188. package/dist/docs/skills.d.ts +84 -84
  189. package/dist/docs/skills.js +66 -47
  190. package/dist/docs/start-prompts.d.ts +14 -0
  191. package/dist/docs/start-prompts.js +20 -0
  192. package/dist/utils/account-labels.d.ts +7 -0
  193. package/dist/utils/account-labels.js +15 -0
  194. package/dist/utils/auth.d.ts +1 -0
  195. package/dist/utils/auth.js +1 -0
  196. package/dist/utils/credential-policy.d.ts +22 -1
  197. package/dist/utils/credential-policy.js +55 -6
  198. package/dist/utils/local-space-state.d.ts +7 -0
  199. package/dist/utils/local-space-state.js +7 -0
  200. package/dist/utils/logger.d.ts +34 -0
  201. package/dist/utils/logger.js +144 -0
  202. package/dist/utils/page-routes.d.ts +9 -0
  203. package/dist/utils/page-routes.js +82 -0
  204. package/dist/utils/pages.d.ts +2 -0
  205. package/dist/utils/pages.js +7 -0
  206. package/dist/utils/publish-form-data.d.ts +2 -0
  207. package/dist/utils/publish-form-data.js +2 -0
  208. package/dist/utils/publish-policy-spacefast.d.ts +13 -0
  209. package/dist/utils/publish-policy-spacefast.js +117 -0
  210. package/dist/utils/publish-policy.d.ts +22 -16
  211. package/dist/utils/publish-policy.fixtures.json +15 -0
  212. package/dist/utils/publish-policy.js +62 -139
  213. package/dist/utils/query-client.js +9 -1
  214. package/dist/utils/runtime-upload.d.ts +4 -0
  215. package/dist/utils/runtime-upload.js +5 -0
  216. package/dist/utils/space-config.d.ts +2 -3
  217. package/dist/utils/space-config.js +1 -1
  218. package/dist/utils/uploaded-source.d.ts +4 -0
  219. package/dist/utils/uploaded-source.js +12 -0
  220. package/dist/visual-review.d.ts +4 -0
  221. package/dist/visual-review.js +208 -0
  222. package/dist/vocabulary.d.ts +38 -0
  223. package/dist/vocabulary.js +55 -0
  224. package/package.json +7 -2
  225. package/dist/agents/registry/deeplink-probes.d.ts +0 -23
  226. package/dist/agents/registry/deeplink-probes.js +0 -18
@@ -36,8 +36,8 @@ export declare const SpaceCreateResponseSchema: z.ZodObject<{
36
36
  providerMainHostname: z.ZodNullable<z.ZodString>;
37
37
  provisioningState: z.ZodEnum<{
38
38
  provisioning: "provisioning";
39
- degraded: "degraded";
40
39
  converged: "converged";
40
+ degraded: "degraded";
41
41
  }>;
42
42
  }, z.core.$strip>>;
43
43
  anonymous: z.ZodBoolean;
@@ -45,10 +45,10 @@ export declare const SpaceCreateResponseSchema: z.ZodObject<{
45
45
  title: z.ZodString;
46
46
  status: z.ZodEnum<{
47
47
  active: "active";
48
- failed: "failed";
49
48
  provisioning: "provisioning";
50
49
  updating: "updating";
51
50
  deleting: "deleting";
51
+ failed: "failed";
52
52
  }>;
53
53
  disabled: z.ZodNullable<z.ZodObject<{
54
54
  at: z.ZodNullable<z.ZodString>;
@@ -160,7 +160,6 @@ export declare const SpaceCreateResponseSchema: z.ZodObject<{
160
160
  burstable: z.ZodOptional<z.ZodBoolean>;
161
161
  }, z.core.$strict>>;
162
162
  markdownNegotiation: z.ZodOptional<z.ZodBoolean>;
163
- experimental_gutenberg: z.ZodOptional<z.ZodBoolean>;
164
163
  inject: z.ZodOptional<z.ZodObject<{
165
164
  head: z.ZodOptional<z.ZodArray<z.ZodString>>;
166
165
  bodyStart: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -184,6 +183,7 @@ export declare const SpaceCreateResponseSchema: z.ZodObject<{
184
183
  remoteUrl: z.ZodNullable<z.ZodString>;
185
184
  repository: z.ZodNullable<z.ZodString>;
186
185
  defaultBranch: z.ZodNullable<z.ZodString>;
186
+ provisioned: z.ZodBoolean;
187
187
  }, z.core.$strip>>;
188
188
  operation: z.ZodNullable<z.ZodObject<{
189
189
  id: z.ZodString;
@@ -374,7 +374,6 @@ export declare const spaceCreateSchema: z.ZodDefault<z.ZodOptional<z.ZodObject<{
374
374
  burstable: z.ZodOptional<z.ZodBoolean>;
375
375
  }, z.core.$strict>>;
376
376
  markdownNegotiation: z.ZodOptional<z.ZodBoolean>;
377
- experimental_gutenberg: z.ZodOptional<z.ZodBoolean>;
378
377
  inject: z.ZodOptional<z.ZodObject<{
379
378
  head: z.ZodOptional<z.ZodArray<z.ZodString>>;
380
379
  bodyStart: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -387,7 +386,18 @@ export declare const spaceCreateSchema: z.ZodDefault<z.ZodOptional<z.ZodObject<{
387
386
  }, z.core.$strict>>>>;
388
387
  defaultDataSource: z.ZodOptional<z.ZodString>;
389
388
  }, z.core.$strip>>;
390
- dataLocation: z.ZodOptional<z.ZodString>;
389
+ access: z.ZodOptional<z.ZodEnum<{
390
+ team: "team";
391
+ private: "private";
392
+ public: "public";
393
+ }>>;
394
+ dataLocation: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodEnum<{
395
+ auto: "auto";
396
+ ams: "ams";
397
+ bur: "bur";
398
+ dca: "dca";
399
+ dfw: "dfw";
400
+ }>>>;
391
401
  }, z.core.$strip>>>;
392
402
  export declare const spacePatchSchema: z.ZodObject<{
393
403
  title: z.ZodOptional<z.ZodString>;
@@ -460,7 +470,6 @@ export declare const spacePatchSchema: z.ZodObject<{
460
470
  burstable: z.ZodOptional<z.ZodBoolean>;
461
471
  }, z.core.$strict>>;
462
472
  markdownNegotiation: z.ZodOptional<z.ZodBoolean>;
463
- experimental_gutenberg: z.ZodOptional<z.ZodBoolean>;
464
473
  inject: z.ZodOptional<z.ZodObject<{
465
474
  head: z.ZodOptional<z.ZodArray<z.ZodString>>;
466
475
  bodyStart: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -632,8 +641,8 @@ export declare const anonymousClaimStatusResponseSchema: z.ZodObject<{
632
641
  expiresAt: z.ZodNullable<z.ZodString>;
633
642
  continuation: z.ZodOptional<z.ZodEnum<{
634
643
  available: "available";
635
- used: "used";
636
644
  unavailable: "unavailable";
645
+ used: "used";
637
646
  }>>;
638
647
  }, z.core.$strip>;
639
648
  }, z.core.$strip>;
@@ -789,6 +798,7 @@ export declare const spaceVersionListSchema: z.ZodObject<{
789
798
  failedStage: z.ZodNullable<z.ZodString>;
790
799
  manifestHash: z.ZodNullable<z.ZodString>;
791
800
  buildId: z.ZodNullable<z.ZodString>;
801
+ gitCommitSha: z.ZodNullable<z.ZodString>;
792
802
  importedFromVersionId: z.ZodNullable<z.ZodString>;
793
803
  variables: z.ZodNull;
794
804
  fileCount: z.ZodNullable<z.ZodNumber>;
@@ -878,7 +888,6 @@ export declare const spaceVersionListSchema: z.ZodObject<{
878
888
  burstable: z.ZodOptional<z.ZodBoolean>;
879
889
  }, z.core.$strict>>;
880
890
  markdownNegotiation: z.ZodOptional<z.ZodBoolean>;
881
- experimental_gutenberg: z.ZodOptional<z.ZodBoolean>;
882
891
  inject: z.ZodOptional<z.ZodObject<{
883
892
  head: z.ZodOptional<z.ZodArray<z.ZodString>>;
884
893
  bodyStart: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -994,8 +1003,8 @@ export declare const spaceListSchema: z.ZodObject<{
994
1003
  providerMainHostname: z.ZodNullable<z.ZodString>;
995
1004
  provisioningState: z.ZodEnum<{
996
1005
  provisioning: "provisioning";
997
- degraded: "degraded";
998
1006
  converged: "converged";
1007
+ degraded: "degraded";
999
1008
  }>;
1000
1009
  }, z.core.$strip>>;
1001
1010
  anonymous: z.ZodBoolean;
@@ -1003,10 +1012,10 @@ export declare const spaceListSchema: z.ZodObject<{
1003
1012
  title: z.ZodString;
1004
1013
  status: z.ZodEnum<{
1005
1014
  active: "active";
1006
- failed: "failed";
1007
1015
  provisioning: "provisioning";
1008
1016
  updating: "updating";
1009
1017
  deleting: "deleting";
1018
+ failed: "failed";
1010
1019
  }>;
1011
1020
  disabled: z.ZodNullable<z.ZodObject<{
1012
1021
  at: z.ZodNullable<z.ZodString>;
@@ -1118,7 +1127,6 @@ export declare const spaceListSchema: z.ZodObject<{
1118
1127
  burstable: z.ZodOptional<z.ZodBoolean>;
1119
1128
  }, z.core.$strict>>;
1120
1129
  markdownNegotiation: z.ZodOptional<z.ZodBoolean>;
1121
- experimental_gutenberg: z.ZodOptional<z.ZodBoolean>;
1122
1130
  inject: z.ZodOptional<z.ZodObject<{
1123
1131
  head: z.ZodOptional<z.ZodArray<z.ZodString>>;
1124
1132
  bodyStart: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -1142,6 +1150,7 @@ export declare const spaceListSchema: z.ZodObject<{
1142
1150
  remoteUrl: z.ZodNullable<z.ZodString>;
1143
1151
  repository: z.ZodNullable<z.ZodString>;
1144
1152
  defaultBranch: z.ZodNullable<z.ZodString>;
1153
+ provisioned: z.ZodBoolean;
1145
1154
  }, z.core.$strip>>;
1146
1155
  operation: z.ZodNullable<z.ZodObject<{
1147
1156
  id: z.ZodString;
@@ -1195,11 +1204,13 @@ export declare const spaceListSchema: z.ZodObject<{
1195
1204
  export declare const spaceListQuerySchema: z.ZodObject<{
1196
1205
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
1197
1206
  cursor: z.ZodOptional<z.ZodString>;
1207
+ principal: z.ZodOptional<z.ZodString>;
1198
1208
  team: z.ZodOptional<z.ZodString>;
1199
1209
  }, z.core.$strip>;
1200
1210
  export declare const spaceVersionListQuerySchema: z.ZodObject<{
1201
1211
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
1202
1212
  cursor: z.ZodOptional<z.ZodString>;
1213
+ gitCommitSha: z.ZodOptional<z.ZodString>;
1203
1214
  }, z.core.$strip>;
1204
1215
  export declare const versionLogEntrySchema: z.ZodObject<{
1205
1216
  timestamp: z.ZodString;
@@ -1658,17 +1669,18 @@ export declare const spaceFilesResponseSchema: z.ZodObject<{
1658
1669
  matched: z.ZodNumber;
1659
1670
  }, z.core.$strip>;
1660
1671
  }, z.core.$strip>;
1672
+ export declare const externalVersionFilePathSchema: z.ZodString;
1661
1673
  export declare const spaceVersionFilePathQuerySchema: z.ZodObject<{
1662
1674
  path: z.ZodString;
1663
1675
  }, z.core.$strip>;
1664
1676
  /**
1665
- * Which representation of a path the runtime should hand back: `source` is the
1666
- * uploaded, pre-substitution object; `served` is the immutable byte the
1667
- * version actually serves. A private config input exists in `source` and is
1668
- * absent from `served`.
1677
+ * Which representation of a path the runtime should hand back: `uploaded` is
1678
+ * the byte the publisher uploaded before any transform; `served` is the
1679
+ * immutable byte this version answers with. A private config input exists in
1680
+ * `uploaded` and is absent from `served`.
1669
1681
  */
1670
1682
  export declare const spaceVersionFileViewSchema: z.ZodEnum<{
1671
- source: "source";
1683
+ uploaded: "uploaded";
1672
1684
  served: "served";
1673
1685
  }>;
1674
1686
  export declare const VERSION_FILE_LINKS_MAX_PATHS = 200;
@@ -1680,7 +1692,7 @@ export declare const VERSION_FILE_LINKS_MAX_PATHS = 200;
1680
1692
  export declare const spaceVersionFileLinksQuerySchema: z.ZodObject<{
1681
1693
  path: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>;
1682
1694
  view: z.ZodDefault<z.ZodEnum<{
1683
- source: "source";
1695
+ uploaded: "uploaded";
1684
1696
  served: "served";
1685
1697
  }>>;
1686
1698
  }, z.core.$strip>;
@@ -1696,7 +1708,7 @@ export declare const spaceVersionFileLinkSchema: z.ZodObject<{
1696
1708
  export declare const spaceVersionFileLinksResponseSchema: z.ZodObject<{
1697
1709
  versionId: z.ZodString;
1698
1710
  view: z.ZodEnum<{
1699
- source: "source";
1711
+ uploaded: "uploaded";
1700
1712
  served: "served";
1701
1713
  }>;
1702
1714
  links: z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -1704,6 +1716,39 @@ export declare const spaceVersionFileLinksResponseSchema: z.ZodObject<{
1704
1716
  expiresAt: z.ZodString;
1705
1717
  }, z.core.$strip>>;
1706
1718
  }, z.core.$strip>;
1719
+ /**
1720
+ * Where the preview should land, in the same `landingPath` shape and with the
1721
+ * same normalization as opening a private Space (`POST /v1/spaces/:spaceId/open`).
1722
+ */
1723
+ export declare const spaceVersionPreviewSessionCreateSchema: z.ZodObject<{
1724
+ landingPath: z.ZodDefault<z.ZodString>;
1725
+ }, z.core.$strip>;
1726
+ export type SpaceVersionPreviewSessionCreate = z.infer<typeof spaceVersionPreviewSessionCreateSchema>;
1727
+ /**
1728
+ * A short-lived, version-scoped browsing session for embedding a private
1729
+ * version in the dashboard.
1730
+ *
1731
+ * `url` is the version's own immutable origin with a signed proof on it, and it
1732
+ * is spent on one hop: the runtime verifies the proof, echoes it into an
1733
+ * HttpOnly, partitioned cookie on that origin, and redirects to the same page
1734
+ * without it. The framed document's own location therefore carries no secret —
1735
+ * which matters because it is the customer's page, and every script on it can
1736
+ * read `location.search`. From then on the cookie is what the page and every
1737
+ * relative subresource present. The proof is bound to this one version's host,
1738
+ * so it opens nothing else the Space serves.
1739
+ *
1740
+ * Deliberately not a listable collection: nothing is stored, so there is no
1741
+ * session to enumerate and none to revoke short of moving the Space's session
1742
+ * version. Mint another when this one expires.
1743
+ */
1744
+ export declare const spaceVersionPreviewSessionSchema: z.ZodObject<{
1745
+ versionId: z.ZodString;
1746
+ origin: z.ZodString;
1747
+ landingPath: z.ZodString;
1748
+ url: z.ZodString;
1749
+ expiresAt: z.ZodString;
1750
+ }, z.core.$strip>;
1751
+ export type SpaceVersionPreviewSession = z.infer<typeof spaceVersionPreviewSessionSchema>;
1707
1752
  export declare const spaceVersionConventionArtifactKindSchema: z.ZodEnum<{
1708
1753
  headers: "headers";
1709
1754
  redirects: "redirects";
@@ -1967,6 +2012,15 @@ export declare const spaceVersionIntentResponseSchema: z.ZodObject<{
1967
2012
  sha256: z.ZodOptional<z.ZodString>;
1968
2013
  contentType: z.ZodOptional<z.ZodString>;
1969
2014
  }, z.core.$strip>>>;
2015
+ bulk: z.ZodOptional<z.ZodObject<{
2016
+ kind: z.ZodLiteral<"zip-cas-v1">;
2017
+ method: z.ZodLiteral<"PUT">;
2018
+ url: z.ZodUnion<[z.ZodString, z.ZodString]>;
2019
+ headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
2020
+ maxCompressedBytes: z.ZodNumber;
2021
+ maxExpandedBytes: z.ZodNumber;
2022
+ maxBlobs: z.ZodNumber;
2023
+ }, z.core.$strip>>;
1970
2024
  links: z.ZodObject<{
1971
2025
  refresh: z.ZodString;
1972
2026
  resume: z.ZodOptional<z.ZodString>;
@@ -2049,7 +2103,13 @@ export declare const publishRequestSchema: z.ZodObject<{
2049
2103
  space: z.ZodOptional<z.ZodObject<{
2050
2104
  slug: z.ZodOptional<z.ZodString>;
2051
2105
  title: z.ZodOptional<z.ZodString>;
2052
- dataLocation: z.ZodOptional<z.ZodString>;
2106
+ dataLocation: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodEnum<{
2107
+ auto: "auto";
2108
+ ams: "ams";
2109
+ bur: "bur";
2110
+ dca: "dca";
2111
+ dfw: "dfw";
2112
+ }>>>;
2053
2113
  }, z.core.$strip>>;
2054
2114
  config: z.ZodOptional<z.ZodObject<{
2055
2115
  index: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
@@ -2119,7 +2179,6 @@ export declare const publishRequestSchema: z.ZodObject<{
2119
2179
  burstable: z.ZodOptional<z.ZodBoolean>;
2120
2180
  }, z.core.$strict>>;
2121
2181
  markdownNegotiation: z.ZodOptional<z.ZodBoolean>;
2122
- experimental_gutenberg: z.ZodOptional<z.ZodBoolean>;
2123
2182
  inject: z.ZodOptional<z.ZodObject<{
2124
2183
  head: z.ZodOptional<z.ZodArray<z.ZodString>>;
2125
2184
  bodyStart: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -2132,6 +2191,11 @@ export declare const publishRequestSchema: z.ZodObject<{
2132
2191
  }, z.core.$strict>>>>;
2133
2192
  defaultDataSource: z.ZodOptional<z.ZodString>;
2134
2193
  }, z.core.$strip>>;
2194
+ access: z.ZodOptional<z.ZodEnum<{
2195
+ team: "team";
2196
+ private: "private";
2197
+ public: "public";
2198
+ }>>;
2135
2199
  deletePaths: z.ZodDefault<z.ZodArray<z.ZodString>>;
2136
2200
  immutableAssetPrefixes: z.ZodOptional<z.ZodArray<z.ZodString>>;
2137
2201
  spaceId: z.ZodOptional<z.ZodString>;
@@ -2180,6 +2244,15 @@ export declare const publishUploadReceiptSchema: z.ZodObject<{
2180
2244
  sha256: z.ZodOptional<z.ZodString>;
2181
2245
  contentType: z.ZodOptional<z.ZodString>;
2182
2246
  }, z.core.$strip>>>;
2247
+ bulk: z.ZodOptional<z.ZodObject<{
2248
+ kind: z.ZodLiteral<"zip-cas-v1">;
2249
+ method: z.ZodLiteral<"PUT">;
2250
+ url: z.ZodUnion<[z.ZodString, z.ZodString]>;
2251
+ headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
2252
+ maxCompressedBytes: z.ZodNumber;
2253
+ maxExpandedBytes: z.ZodNumber;
2254
+ maxBlobs: z.ZodNumber;
2255
+ }, z.core.$strip>>;
2183
2256
  links: z.ZodObject<{
2184
2257
  refresh: z.ZodString;
2185
2258
  resume: z.ZodOptional<z.ZodString>;
@@ -2269,6 +2342,9 @@ export declare const publishActivationSchema: z.ZodObject<{
2269
2342
  superseded: "superseded";
2270
2343
  }>;
2271
2344
  currentLiveVersionId: z.ZodNullable<z.ZodString>;
2345
+ reason: z.ZodOptional<z.ZodEnum<{
2346
+ channel_promotion_manual: "channel_promotion_manual";
2347
+ }>>;
2272
2348
  }, z.core.$strip>;
2273
2349
  export declare const publishNextSchema: z.ZodObject<{
2274
2350
  action: z.ZodEnum<{
@@ -2327,6 +2403,9 @@ export declare const publishReceiptSchema: z.ZodObject<{
2327
2403
  superseded: "superseded";
2328
2404
  }>;
2329
2405
  currentLiveVersionId: z.ZodNullable<z.ZodString>;
2406
+ reason: z.ZodOptional<z.ZodEnum<{
2407
+ channel_promotion_manual: "channel_promotion_manual";
2408
+ }>>;
2330
2409
  }, z.core.$strip>;
2331
2410
  next: z.ZodObject<{
2332
2411
  action: z.ZodEnum<{
@@ -2347,14 +2426,15 @@ export declare const publishReceiptSchema: z.ZodObject<{
2347
2426
  remoteUrl: z.ZodNullable<z.ZodString>;
2348
2427
  repository: z.ZodNullable<z.ZodString>;
2349
2428
  defaultBranch: z.ZodNullable<z.ZodString>;
2429
+ provisioned: z.ZodBoolean;
2350
2430
  }, z.core.$strip>>;
2351
2431
  authMode: z.ZodOptional<z.ZodEnum<{
2352
2432
  anonymous: "anonymous";
2353
2433
  authenticated: "authenticated";
2354
2434
  }>>;
2355
2435
  persistence: z.ZodOptional<z.ZodEnum<{
2356
- managed: "managed";
2357
2436
  temporary: "temporary";
2437
+ managed: "managed";
2358
2438
  }>>;
2359
2439
  operation: z.ZodOptional<z.ZodObject<{
2360
2440
  id: z.ZodString;
@@ -2426,6 +2506,15 @@ export declare const publishReceiptSchema: z.ZodObject<{
2426
2506
  sha256: z.ZodOptional<z.ZodString>;
2427
2507
  contentType: z.ZodOptional<z.ZodString>;
2428
2508
  }, z.core.$strip>>>;
2509
+ bulk: z.ZodOptional<z.ZodObject<{
2510
+ kind: z.ZodLiteral<"zip-cas-v1">;
2511
+ method: z.ZodLiteral<"PUT">;
2512
+ url: z.ZodUnion<[z.ZodString, z.ZodString]>;
2513
+ headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
2514
+ maxCompressedBytes: z.ZodNumber;
2515
+ maxExpandedBytes: z.ZodNumber;
2516
+ maxBlobs: z.ZodNumber;
2517
+ }, z.core.$strip>>;
2429
2518
  links: z.ZodObject<{
2430
2519
  refresh: z.ZodString;
2431
2520
  resume: z.ZodOptional<z.ZodString>;
@@ -2529,6 +2618,15 @@ export declare const spaceVersionRefreshResponseSchema: z.ZodObject<{
2529
2618
  sha256: z.ZodOptional<z.ZodString>;
2530
2619
  contentType: z.ZodOptional<z.ZodString>;
2531
2620
  }, z.core.$strip>>>;
2621
+ bulk: z.ZodOptional<z.ZodObject<{
2622
+ kind: z.ZodLiteral<"zip-cas-v1">;
2623
+ method: z.ZodLiteral<"PUT">;
2624
+ url: z.ZodUnion<[z.ZodString, z.ZodString]>;
2625
+ headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
2626
+ maxCompressedBytes: z.ZodNumber;
2627
+ maxExpandedBytes: z.ZodNumber;
2628
+ maxBlobs: z.ZodNumber;
2629
+ }, z.core.$strip>>;
2532
2630
  links: z.ZodObject<{
2533
2631
  refresh: z.ZodString;
2534
2632
  resume: z.ZodOptional<z.ZodString>;
@@ -2602,10 +2700,10 @@ export declare const spaceRuntimeStatusSchema: z.ZodObject<{
2602
2700
  liveUrl: z.ZodNullable<z.ZodString>;
2603
2701
  runtimeState: z.ZodEnum<{
2604
2702
  active: "active";
2605
- failed: "failed";
2606
2703
  provisioning: "provisioning";
2607
2704
  updating: "updating";
2608
2705
  deleting: "deleting";
2706
+ failed: "failed";
2609
2707
  }>;
2610
2708
  liveVersionStatus: z.ZodNullable<z.ZodEnum<{
2611
2709
  failed: "failed";
@@ -2714,8 +2812,11 @@ export declare const spaceRuntimeStatusSchema: z.ZodObject<{
2714
2812
  tables: z.ZodDefault<z.ZodArray<z.ZodString>>;
2715
2813
  queries: z.ZodDefault<z.ZodArray<z.ZodString>>;
2716
2814
  mutations: z.ZodDefault<z.ZodArray<z.ZodString>>;
2717
- actions: z.ZodDefault<z.ZodArray<z.ZodString>>;
2718
2815
  endpoints: z.ZodDefault<z.ZodArray<z.ZodObject<{
2816
+ mode: z.ZodEnum<{
2817
+ read: "read";
2818
+ write: "write";
2819
+ }>;
2719
2820
  method: z.ZodEnum<{
2720
2821
  POST: "POST";
2721
2822
  PUT: "PUT";
@@ -2785,6 +2886,8 @@ export declare const spaceRuntimeStatusSchema: z.ZodObject<{
2785
2886
  spam: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2786
2887
  email: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2787
2888
  content: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2889
+ storage: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2890
+ connectors: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2788
2891
  }, z.core.$strip>>;
2789
2892
  executionState: z.ZodEnum<{
2790
2893
  ready: "ready";
@@ -2841,8 +2944,11 @@ export declare const spaceRuntimeStatusSchema: z.ZodObject<{
2841
2944
  tables: z.ZodDefault<z.ZodArray<z.ZodString>>;
2842
2945
  queries: z.ZodDefault<z.ZodArray<z.ZodString>>;
2843
2946
  mutations: z.ZodDefault<z.ZodArray<z.ZodString>>;
2844
- actions: z.ZodDefault<z.ZodArray<z.ZodString>>;
2845
2947
  endpoints: z.ZodDefault<z.ZodArray<z.ZodObject<{
2948
+ mode: z.ZodEnum<{
2949
+ read: "read";
2950
+ write: "write";
2951
+ }>;
2846
2952
  method: z.ZodEnum<{
2847
2953
  POST: "POST";
2848
2954
  PUT: "PUT";
@@ -2912,6 +3018,8 @@ export declare const spaceRuntimeStatusSchema: z.ZodObject<{
2912
3018
  spam: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2913
3019
  email: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2914
3020
  content: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
3021
+ storage: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
3022
+ connectors: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2915
3023
  }, z.core.$strip>>;
2916
3024
  executionState: z.ZodEnum<{
2917
3025
  ready: "ready";
@@ -1,8 +1,9 @@
1
1
  import { z } from "zod";
2
2
  import { SPACE_SLUG_MAX_LENGTH } from "../slug-policy/index.js";
3
3
  import { normalizeVersionPath } from "../utils/version-path.js";
4
- import { accessRoleSchema, publishedAccessSchema } from "./access.js";
4
+ import { accessRoleSchema, accessScopePathSchema, publishedAccessSchema, spaceAccessPresetSchema, } from "./access.js";
5
5
  import { AsyncOperationSchema, baseDiagnosticSchema, CursorPaginationSchema, cursorListQuerySchema, } from "./common.js";
6
+ import { dataLocationSchema } from "./data-location.js";
6
7
  import { versionStatus, spaceStatus } from "./enums.js";
7
8
  import { runtimeInternalArtifactPath } from "./execution.js";
8
9
  import { uploadInstructionsSchema, manifestFileSchema } from "./internal.js";
@@ -66,7 +67,10 @@ export const spaceCreateSchema = z
66
67
  slug: z.string().min(2).max(55).optional(),
67
68
  title: z.string().min(1).max(255).optional(),
68
69
  config: spaceConfigSchema.optional().describe("Initial SpaceConfig overlay for the new space."),
69
- dataLocation: z.string().min(1).optional(),
70
+ access: spaceAccessPresetSchema
71
+ .optional()
72
+ .describe("Set the initial root access for this new team-owned Space. Omit this field to use the team's default."),
73
+ dataLocation: dataLocationSchema.optional(),
70
74
  })
71
75
  .superRefine((value, ctx) => {
72
76
  if (value.teamId && value.principal?.type === "team" && value.teamId !== value.principal.id) {
@@ -321,13 +325,22 @@ export const spaceListSchema = z.object({
321
325
  pagination: CursorPaginationSchema,
322
326
  });
323
327
  export const spaceListQuerySchema = cursorListQuerySchema.extend({
328
+ principal: principalIdSchema
329
+ .optional()
330
+ .describe("Filter that limits results to spaces owned by this external principal."),
324
331
  team: z
325
332
  .string()
326
333
  .min(1)
327
334
  .optional()
328
335
  .describe("Filter that limits results to spaces owned by this team id or slug."),
329
336
  });
330
- export const spaceVersionListQuerySchema = cursorListQuerySchema;
337
+ export const spaceVersionListQuerySchema = cursorListQuerySchema.extend({
338
+ gitCommitSha: z
339
+ .string()
340
+ .regex(/^[0-9a-f]{40}$/, "gitCommitSha must be a full lowercase commit SHA.")
341
+ .optional()
342
+ .describe("Only versions built from this exact git commit."),
343
+ });
331
344
  // Version processing log lines (upload/finalize/promote output), newest-first.
332
345
  export const versionLogEntrySchema = z.object({
333
346
  timestamp: z.string().datetime().describe("Instant when the version last changed state."),
@@ -392,7 +405,7 @@ export const spaceFilesResponseSchema = z.object({
392
405
  index: spaceVersionFileIndexSchema,
393
406
  search: spaceVersionFilesSearchSchema,
394
407
  });
395
- const externalVersionFilePathSchema = z
408
+ export const externalVersionFilePathSchema = z
396
409
  .string()
397
410
  .min(1)
398
411
  .refine((value) => {
@@ -409,12 +422,12 @@ export const spaceVersionFilePathQuerySchema = z.object({
409
422
  path: externalVersionFilePathSchema,
410
423
  });
411
424
  /**
412
- * Which representation of a path the runtime should hand back: `source` is the
413
- * uploaded, pre-substitution object; `served` is the immutable byte the
414
- * version actually serves. A private config input exists in `source` and is
415
- * absent from `served`.
425
+ * Which representation of a path the runtime should hand back: `uploaded` is
426
+ * the byte the publisher uploaded before any transform; `served` is the
427
+ * immutable byte this version answers with. A private config input exists in
428
+ * `uploaded` and is absent from `served`.
416
429
  */
417
- export const spaceVersionFileViewSchema = z.enum(["source", "served"]);
430
+ export const spaceVersionFileViewSchema = z.enum(["uploaded", "served"]);
418
431
  // Minting is a read, so it rides the URL, which has a practical ceiling a JSON
419
432
  // body does not. Clients chunk; each chunk is one authorization.
420
433
  export const VERSION_FILE_LINKS_MAX_PATHS = 200;
@@ -432,8 +445,8 @@ export const spaceVersionFileLinksQuerySchema = z.object({
432
445
  .preprocess((value) => (typeof value === "string" ? [value] : value), z.array(spaceVersionFileLinkPathSchema).min(1).max(VERSION_FILE_LINKS_MAX_PATHS))
433
446
  .describe("Version-relative file paths to mint read links for; repeat the parameter per path."),
434
447
  view: spaceVersionFileViewSchema
435
- .default("source")
436
- .describe("Which representation to read: the uploaded source or the served byte."),
448
+ .default("uploaded")
449
+ .describe("Which representation to read: `uploaded` is the byte the publisher uploaded before any transform; `served` is the immutable byte this version answers with."),
437
450
  });
438
451
  export const spaceVersionFileLinkSchema = z.object({
439
452
  url: z.string().url().describe("Short-lived signed URL that serves the file's bytes."),
@@ -449,6 +462,43 @@ export const spaceVersionFileLinksResponseSchema = z.object({
449
462
  view: spaceVersionFileViewSchema,
450
463
  links: z.record(z.string(), spaceVersionFileLinkSchema),
451
464
  });
465
+ /**
466
+ * Where the preview should land, in the same `landingPath` shape and with the
467
+ * same normalization as opening a private Space (`POST /v1/spaces/:spaceId/open`).
468
+ */
469
+ export const spaceVersionPreviewSessionCreateSchema = z.object({
470
+ landingPath: accessScopePathSchema
471
+ .default("/")
472
+ .describe("Page to open in the preview. Defaults to the version's root."),
473
+ });
474
+ /**
475
+ * A short-lived, version-scoped browsing session for embedding a private
476
+ * version in the dashboard.
477
+ *
478
+ * `url` is the version's own immutable origin with a signed proof on it, and it
479
+ * is spent on one hop: the runtime verifies the proof, echoes it into an
480
+ * HttpOnly, partitioned cookie on that origin, and redirects to the same page
481
+ * without it. The framed document's own location therefore carries no secret —
482
+ * which matters because it is the customer's page, and every script on it can
483
+ * read `location.search`. From then on the cookie is what the page and every
484
+ * relative subresource present. The proof is bound to this one version's host,
485
+ * so it opens nothing else the Space serves.
486
+ *
487
+ * Deliberately not a listable collection: nothing is stored, so there is no
488
+ * session to enumerate and none to revoke short of moving the Space's session
489
+ * version. Mint another when this one expires.
490
+ */
491
+ export const spaceVersionPreviewSessionSchema = z.object({
492
+ versionId: z.string(),
493
+ /** The version origin the preview is scoped to; nothing outside it is authorized. */
494
+ origin: z.string().url(),
495
+ landingPath: z.string(),
496
+ url: z
497
+ .string()
498
+ .url()
499
+ .describe("Frame this URL. Following it once exchanges the proof it carries for a cookie and redirects to the same page without it."),
500
+ expiresAt: z.string().datetime().describe("When the preview session stops working."),
501
+ });
452
502
  export const spaceVersionConventionArtifactKindSchema = z.enum(["redirects", "headers"]);
453
503
  export const spaceVersionConventionArtifactPathSchema = z.enum(["_redirects", "_headers"]);
454
504
  export const spaceVersionConventionArtifactSourceSchema = z.enum([
@@ -586,12 +636,22 @@ export const publishRequestSchema = z
586
636
  .object({
587
637
  slug: z.string().min(2).max(55).optional(),
588
638
  title: z.string().min(1).max(255).optional(),
589
- dataLocation: z.string().min(1).optional(),
639
+ dataLocation: dataLocationSchema.optional(),
590
640
  })
591
641
  .optional(),
592
642
  config: spaceConfigSchema.optional().describe("SpaceConfig overlay to store on the space."),
643
+ access: spaceAccessPresetSchema
644
+ .optional()
645
+ .describe("Set the initial root access for this new team-owned Space. Omit this field to use the team's default. Do not set this field with spaceId."),
593
646
  })
594
647
  .superRefine((value, ctx) => {
648
+ if (value.access !== undefined && value.spaceId !== undefined) {
649
+ ctx.addIssue({
650
+ code: z.ZodIssueCode.custom,
651
+ message: "access applies only when this publish creates a Space.",
652
+ path: ["access"],
653
+ });
654
+ }
595
655
  if (value.teamId && value.principal?.type === "team" && value.teamId !== value.principal.id) {
596
656
  ctx.addIssue({
597
657
  code: z.ZodIssueCode.custom,
@@ -654,11 +714,15 @@ export const publishActivationSchema = z.object({
654
714
  .describe("Channel this publish targeted; null means a ready version without promotion."),
655
715
  outcome: z
656
716
  .enum(["activated", "unpromoted", "superseded", "pending"])
657
- .describe("activated: the live pointer moved to this version. unpromoted: ready with channel null, by request. superseded: ready, but a newer publish holds the live pointer. pending: not settled yet."),
717
+ .describe("activated: the live pointer moved to this version. unpromoted: ready without promotion — either the caller passed channel null, or the live channel's promotion policy held it; `reason` says which. superseded: ready, but a newer publish holds the live pointer. pending: not settled yet."),
658
718
  currentLiveVersionId: z
659
719
  .string()
660
720
  .nullable()
661
721
  .describe("The version currently serving live traffic, or null when the space has none."),
722
+ reason: z
723
+ .enum(["channel_promotion_manual"])
724
+ .optional()
725
+ .describe("Why the outcome is not what the caller asked for. channel_promotion_manual: the live channel's promotion policy is manual, so this publish finalized ready but unpromoted; POST promote to move the pointer."),
662
726
  });
663
727
  // A deterministic projection of (version status, activation outcome, pending
664
728
  // bytes, operation state). An agent drives the whole lifecycle by branching on