@spacefast/common 0.0.24 → 0.2.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 (320) hide show
  1. package/brand-assets/LICENSE-Haskoy.txt +93 -0
  2. package/brand-assets/haskoy-latin-variable.woff2 +0 -0
  3. package/brand-assets/spacefast-favicon.svg +4 -4
  4. package/brand-assets/spacefast-sf-full-bleed.svg +3 -3
  5. package/brand-assets/spacefast-wordmark.svg +2 -4
  6. package/dist/agents/connect-targets.d.ts +6 -146
  7. package/dist/agents/connect-targets.js +63 -295
  8. package/dist/agents/private-key-oauth.d.ts +31 -2
  9. package/dist/agents/private-key-oauth.js +166 -92
  10. package/dist/agents/registry/core.d.ts +292 -0
  11. package/dist/agents/registry/core.js +1388 -0
  12. package/dist/agents/registry/deeplink-probes.d.ts +23 -0
  13. package/dist/agents/registry/deeplink-probes.js +18 -0
  14. package/dist/agents/registry/node.d.ts +56 -0
  15. package/dist/agents/registry/node.js +339 -0
  16. package/dist/brand-assets-build.js +3 -6
  17. package/dist/brand-assets.d.ts +5 -15
  18. package/dist/brand-assets.js +12 -14
  19. package/dist/brand.d.ts +17 -0
  20. package/dist/brand.js +24 -4
  21. package/dist/config/domains.d.ts +79 -12
  22. package/dist/config/domains.js +128 -29
  23. package/dist/config/index.js +1 -2
  24. package/dist/contracts/abuse.js +9 -24
  25. package/dist/contracts/access-profiles.d.ts +86 -0
  26. package/dist/contracts/access-profiles.js +89 -0
  27. package/dist/contracts/access.d.ts +24 -30
  28. package/dist/contracts/access.js +33 -64
  29. package/dist/contracts/activity.d.ts +18 -1
  30. package/dist/contracts/activity.js +72 -26
  31. package/dist/contracts/analytics.js +8 -10
  32. package/dist/contracts/api-keys.d.ts +77 -52
  33. package/dist/contracts/api-keys.js +44 -24
  34. package/dist/contracts/application-journal.d.ts +216 -0
  35. package/dist/contracts/application-journal.js +167 -0
  36. package/dist/contracts/auth.d.ts +90 -17
  37. package/dist/contracts/auth.js +86 -17
  38. package/dist/contracts/beta.d.ts +9 -4
  39. package/dist/contracts/beta.js +20 -16
  40. package/dist/contracts/billing.d.ts +2 -1
  41. package/dist/contracts/billing.js +37 -11
  42. package/dist/contracts/bootstrap.d.ts +791 -0
  43. package/dist/contracts/bootstrap.js +51 -0
  44. package/dist/contracts/builds.d.ts +209 -18
  45. package/dist/contracts/builds.js +93 -27
  46. package/dist/contracts/channels.d.ts +43 -0
  47. package/dist/contracts/channels.js +25 -9
  48. package/dist/contracts/cli.d.ts +7 -0
  49. package/dist/contracts/cli.js +6 -0
  50. package/dist/contracts/collab-public.d.ts +1 -1
  51. package/dist/contracts/collab-public.js +5 -8
  52. package/dist/contracts/comments.d.ts +44 -34
  53. package/dist/contracts/comments.js +107 -77
  54. package/dist/contracts/commerce.d.ts +165 -0
  55. package/dist/contracts/commerce.js +146 -0
  56. package/dist/contracts/common.d.ts +3 -3
  57. package/dist/contracts/common.js +20 -31
  58. package/dist/contracts/content-contract-verification.d.ts +521 -0
  59. package/dist/contracts/content-contract-verification.js +320 -0
  60. package/dist/contracts/content-platform-fixture.d.ts +1278 -0
  61. package/dist/contracts/content-platform-fixture.js +44 -0
  62. package/dist/contracts/content-program.d.ts +994 -0
  63. package/dist/contracts/content-program.js +658 -0
  64. package/dist/contracts/content-sync.d.ts +290 -0
  65. package/dist/contracts/content-sync.js +167 -0
  66. package/dist/contracts/content.d.ts +432 -0
  67. package/dist/contracts/content.js +303 -0
  68. package/dist/contracts/continuation.d.ts +17 -1
  69. package/dist/contracts/continuation.js +23 -23
  70. package/dist/contracts/countries.js +3 -4
  71. package/dist/contracts/crons.d.ts +52 -0
  72. package/dist/contracts/crons.js +60 -0
  73. package/dist/contracts/dashboard-prefs.d.ts +56 -0
  74. package/dist/contracts/dashboard-prefs.js +51 -0
  75. package/dist/contracts/device-auth.d.ts +234 -37
  76. package/dist/contracts/device-auth.js +267 -53
  77. package/dist/contracts/docs.d.ts +1 -5
  78. package/dist/contracts/docs.js +7 -15
  79. package/dist/contracts/domains.d.ts +501 -93
  80. package/dist/contracts/domains.js +193 -55
  81. package/dist/contracts/email-preferences.d.ts +3 -3
  82. package/dist/contracts/email-preferences.js +6 -7
  83. package/dist/contracts/enums.d.ts +27 -26
  84. package/dist/contracts/enums.js +68 -61
  85. package/dist/contracts/error-code-meta.d.ts +283 -7
  86. package/dist/contracts/error-code-meta.js +97 -5
  87. package/dist/contracts/error-codes.d.ts +5 -5
  88. package/dist/contracts/error-codes.js +82 -17
  89. package/dist/contracts/events.d.ts +100 -20
  90. package/dist/contracts/events.js +107 -20
  91. package/dist/contracts/execution.d.ts +48 -64
  92. package/dist/contracts/execution.js +52 -62
  93. package/dist/contracts/feature-lifecycle.d.ts +73 -27
  94. package/dist/contracts/feature-lifecycle.js +86 -26
  95. package/dist/contracts/features.d.ts +68 -19
  96. package/dist/contracts/features.js +42 -41
  97. package/dist/contracts/fixtures/content-platform-v1.json +1108 -0
  98. package/dist/contracts/frame-session.d.ts +192 -0
  99. package/dist/contracts/frame-session.js +164 -0
  100. package/dist/contracts/functions.d.ts +338 -164
  101. package/dist/contracts/functions.js +367 -198
  102. package/dist/contracts/git.d.ts +27 -33
  103. package/dist/contracts/git.js +10 -11
  104. package/dist/contracts/grant-copy.d.ts +43 -0
  105. package/dist/contracts/grant-copy.js +44 -0
  106. package/dist/contracts/grants.d.ts +62 -54
  107. package/dist/contracts/grants.js +124 -23
  108. package/dist/contracts/ids.d.ts +4 -1
  109. package/dist/contracts/ids.js +6 -3
  110. package/dist/contracts/internal.d.ts +8 -18
  111. package/dist/contracts/internal.js +13 -14
  112. package/dist/contracts/mcp.d.ts +28 -0
  113. package/dist/contracts/mcp.js +28 -0
  114. package/dist/contracts/me.d.ts +6 -1
  115. package/dist/contracts/me.js +12 -6
  116. package/dist/contracts/notifications.d.ts +27 -29
  117. package/dist/contracts/notifications.js +9 -4
  118. package/dist/contracts/oauth-resources.d.ts +112 -10
  119. package/dist/contracts/oauth-resources.js +116 -11
  120. package/dist/contracts/oauth-scope-actions.d.ts +90 -0
  121. package/dist/contracts/oauth-scope-actions.js +126 -0
  122. package/dist/contracts/operations.d.ts +27 -4
  123. package/dist/contracts/operations.js +12 -6
  124. package/dist/contracts/pages.d.ts +31 -7
  125. package/dist/contracts/pages.js +22 -5
  126. package/dist/contracts/partner-notifications.d.ts +3 -0
  127. package/dist/contracts/partner-notifications.js +65 -0
  128. package/dist/contracts/{platform.d.ts → partner.d.ts} +29 -42
  129. package/dist/contracts/{platform.js → partner.js} +27 -40
  130. package/dist/contracts/plan-policy.js +1 -1
  131. package/dist/contracts/principal-assertion.d.ts +43 -0
  132. package/dist/contracts/principal-assertion.js +67 -0
  133. package/dist/contracts/principals.d.ts +73 -0
  134. package/dist/contracts/principals.js +59 -0
  135. package/dist/contracts/privacy.d.ts +11 -0
  136. package/dist/contracts/privacy.js +17 -0
  137. package/dist/contracts/problem-document.js +3 -4
  138. package/dist/contracts/publish-archive.d.ts +269 -161
  139. package/dist/contracts/publish-archive.js +11 -1
  140. package/dist/contracts/push-new.d.ts +8 -8
  141. package/dist/contracts/quotas.js +5 -5
  142. package/dist/contracts/realtime.d.ts +52 -0
  143. package/dist/contracts/realtime.js +54 -0
  144. package/dist/contracts/repository-connections.d.ts +44 -31
  145. package/dist/contracts/repository-connections.js +17 -5
  146. package/dist/contracts/resources.d.ts +105 -14
  147. package/dist/contracts/resources.js +150 -26
  148. package/dist/contracts/route-inventory.d.ts +358 -0
  149. package/dist/contracts/route-inventory.js +141 -0
  150. package/dist/contracts/runtime-api.d.ts +206 -82
  151. package/dist/contracts/runtime-api.js +131 -70
  152. package/dist/contracts/runtime-app.d.ts +13 -23
  153. package/dist/contracts/runtime-app.js +39 -24
  154. package/dist/contracts/runtime-components.d.ts +143 -0
  155. package/dist/contracts/runtime-components.js +199 -0
  156. package/dist/contracts/runtime-db.d.ts +49 -23
  157. package/dist/contracts/runtime-db.js +87 -22
  158. package/dist/contracts/runtime-purge.d.ts +8 -0
  159. package/dist/contracts/runtime-purge.js +5 -0
  160. package/dist/contracts/runtime-services.d.ts +43 -75
  161. package/dist/contracts/runtime-services.js +29 -49
  162. package/dist/contracts/runtime-storage.d.ts +15 -14
  163. package/dist/contracts/runtime-storage.js +30 -14
  164. package/dist/contracts/sf-config-v1.d.ts +48 -14
  165. package/dist/contracts/slugs.js +13 -4
  166. package/dist/contracts/space-config.d.ts +283 -19
  167. package/dist/contracts/space-config.js +430 -80
  168. package/dist/contracts/spaces.d.ts +376 -290
  169. package/dist/contracts/spaces.js +200 -135
  170. package/dist/contracts/superadmin-activity.d.ts +3 -43
  171. package/dist/contracts/superadmin-activity.js +6 -30
  172. package/dist/contracts/superadmin-emails.d.ts +1 -0
  173. package/dist/contracts/superadmin-emails.js +17 -1
  174. package/dist/contracts/superadmin-runtime.d.ts +199 -0
  175. package/dist/contracts/superadmin-runtime.js +141 -0
  176. package/dist/contracts/superadmin-search.d.ts +22 -2
  177. package/dist/contracts/superadmin-search.js +14 -6
  178. package/dist/contracts/superadmin-spaces.d.ts +438 -189
  179. package/dist/contracts/superadmin-spaces.js +131 -25
  180. package/dist/contracts/superadmin-teams.d.ts +5 -2
  181. package/dist/contracts/superadmin-teams.js +1 -2
  182. package/dist/contracts/superadmin-tenants.d.ts +627 -12
  183. package/dist/contracts/superadmin-tenants.js +32 -13
  184. package/dist/contracts/superadmin.d.ts +232 -37
  185. package/dist/contracts/superadmin.js +106 -22
  186. package/dist/contracts/tags.d.ts +85 -58
  187. package/dist/contracts/tags.js +47 -37
  188. package/dist/contracts/teams.d.ts +86 -26
  189. package/dist/contracts/teams.js +90 -31
  190. package/dist/contracts/tenants.d.ts +135 -0
  191. package/dist/contracts/tenants.js +120 -0
  192. package/dist/contracts/test-triggers.d.ts +70 -0
  193. package/dist/contracts/test-triggers.js +116 -0
  194. package/dist/contracts/theme-json.js +3 -8
  195. package/dist/contracts/transfers.d.ts +1 -0
  196. package/dist/contracts/transfers.js +3 -2
  197. package/dist/contracts/usage.d.ts +209 -0
  198. package/dist/contracts/usage.js +124 -12
  199. package/dist/contracts/variables.d.ts +2 -2
  200. package/dist/contracts/variables.js +9 -13
  201. package/dist/contracts/webhooks.d.ts +13 -5
  202. package/dist/contracts/webhooks.js +3 -1
  203. package/dist/contracts/zero.d.ts +72 -81
  204. package/dist/contracts/zero.js +80 -78
  205. package/dist/dashboard-paths/index.d.ts +24 -21
  206. package/dist/dashboard-paths/index.js +35 -47
  207. package/dist/dashboard-paths/route-reservations.generated.d.ts +2 -0
  208. package/dist/dashboard-paths/route-reservations.generated.js +36 -0
  209. package/dist/docs/agent-arrival.d.ts +92 -0
  210. package/dist/docs/agent-arrival.js +227 -0
  211. package/dist/docs/agent-output-policy.d.ts +6 -0
  212. package/dist/docs/agent-output-policy.js +22 -0
  213. package/dist/docs/agent-prose.d.ts +12 -18
  214. package/dist/docs/agent-prose.js +73 -51
  215. package/dist/docs/agent-setup.d.ts +72 -41
  216. package/dist/docs/agent-setup.js +339 -436
  217. package/dist/docs/catalog.d.ts +153 -95
  218. package/dist/docs/catalog.js +163 -48
  219. package/dist/docs/error-docs.d.ts +2098 -1
  220. package/dist/docs/error-docs.js +421 -144
  221. package/dist/docs/index-build.d.ts +0 -1
  222. package/dist/docs/index-build.js +2 -3
  223. package/dist/docs/page-context-prompt.d.ts +77 -0
  224. package/dist/docs/page-context-prompt.js +131 -0
  225. package/dist/docs/reference-urls.d.ts +46 -0
  226. package/dist/docs/reference-urls.js +79 -0
  227. package/dist/docs/search.d.ts +6 -8
  228. package/dist/docs/search.js +10 -13
  229. package/dist/docs/skill-distribution.d.ts +4 -1
  230. package/dist/docs/skill-distribution.js +10 -5
  231. package/dist/docs/skills.d.ts +120 -120
  232. package/dist/docs/skills.js +121 -73
  233. package/dist/docs/start-prompts.d.ts +45 -0
  234. package/dist/docs/start-prompts.js +62 -0
  235. package/dist/domain-exploration.js +9 -13
  236. package/dist/og-template.d.ts +56 -0
  237. package/dist/og-template.js +56 -0
  238. package/dist/slug-policy/index.js +5 -11
  239. package/dist/test-helpers/fetch-stub.js +1 -0
  240. package/dist/utils/browser-credential.d.ts +13 -6
  241. package/dist/utils/browser-credential.js +14 -7
  242. package/dist/utils/build-settings.d.ts +21 -1
  243. package/dist/utils/build-settings.js +133 -15
  244. package/dist/utils/canonical-json.d.ts +3 -5
  245. package/dist/utils/canonical-json.js +4 -5
  246. package/dist/utils/cast-transport.d.ts +5 -17
  247. package/dist/utils/cast-transport.js +6 -19
  248. package/dist/utils/claim-token.js +1 -2
  249. package/dist/utils/comment-avatars.js +4 -6
  250. package/dist/utils/concurrency.js +3 -3
  251. package/dist/utils/content-type.d.ts +7 -6
  252. package/dist/utils/content-type.js +73 -51
  253. package/dist/utils/credential-policy.d.ts +50 -6
  254. package/dist/utils/credential-policy.js +126 -59
  255. package/dist/utils/dns-instructions.js +9 -9
  256. package/dist/utils/egress-policy.fixtures.json +1 -1
  257. package/dist/utils/error-code.js +1 -0
  258. package/dist/utils/generate-space-name.d.ts +3 -8
  259. package/dist/utils/generate-space-name.js +3 -8
  260. package/dist/utils/grant-decision.fixtures.json +2 -2
  261. package/dist/utils/grants.d.ts +0 -1
  262. package/dist/utils/grants.js +7 -8
  263. package/dist/utils/gravatar.d.ts +2 -4
  264. package/dist/utils/gravatar.js +6 -12
  265. package/dist/utils/id-hints.js +14 -23
  266. package/dist/utils/idempotency.d.ts +3 -3
  267. package/dist/utils/idempotency.js +6 -7
  268. package/dist/utils/local-space-state.d.ts +23 -26
  269. package/dist/utils/local-space-state.js +46 -46
  270. package/dist/utils/oauth-signed-query.d.ts +3 -5
  271. package/dist/utils/oauth-signed-query.js +6 -9
  272. package/dist/utils/one-shot-replay.d.ts +7 -6
  273. package/dist/utils/one-shot-replay.js +3 -5
  274. package/dist/utils/page-colors.d.ts +15 -19
  275. package/dist/utils/page-colors.js +23 -45
  276. package/dist/utils/page-fonts.d.ts +1 -1
  277. package/dist/utils/page-fonts.js +8 -20
  278. package/dist/utils/page-preview.d.ts +0 -1
  279. package/dist/utils/page-preview.js +0 -1
  280. package/dist/utils/pages.d.ts +33 -3
  281. package/dist/utils/pages.js +83 -30
  282. package/dist/utils/privacy-regions.d.ts +19 -0
  283. package/dist/utils/privacy-regions.js +91 -0
  284. package/dist/utils/publish-form-data.d.ts +4 -5
  285. package/dist/utils/publish-form-data.js +2 -3
  286. package/dist/utils/publish-policy.d.ts +11 -17
  287. package/dist/utils/publish-policy.fixtures.json +11 -5
  288. package/dist/utils/publish-policy.js +65 -110
  289. package/dist/utils/query-client.d.ts +2 -0
  290. package/dist/utils/query-client.js +10 -1
  291. package/dist/utils/runtime-paths.d.ts +4 -4
  292. package/dist/utils/runtime-paths.js +6 -8
  293. package/dist/utils/runtime-upload.d.ts +9 -0
  294. package/dist/utils/runtime-upload.js +12 -0
  295. package/dist/utils/secure-local-file.d.ts +3 -3
  296. package/dist/utils/secure-local-file.js +23 -40
  297. package/dist/utils/space-config.d.ts +12 -15
  298. package/dist/utils/space-config.js +13 -16
  299. package/dist/utils/static-runtime-policy.d.ts +10 -7
  300. package/dist/utils/static-runtime-policy.fixtures.json +38 -41
  301. package/dist/utils/static-runtime-policy.generated.d.ts +16 -0
  302. package/dist/utils/static-runtime-policy.generated.js +70 -0
  303. package/dist/utils/static-runtime-policy.js +31 -132
  304. package/dist/utils/storage-policy.js +1 -2
  305. package/dist/utils/upload-session.d.ts +4 -1
  306. package/dist/utils/upload-session.js +41 -19
  307. package/dist/utils/version-path.js +11 -19
  308. package/dist/utils/wpcom-auth-redirects.d.ts +5 -14
  309. package/dist/utils/wpcom-auth-redirects.js +1 -4
  310. package/dist/vocabulary.d.ts +13 -13
  311. package/dist/vocabulary.js +52 -27
  312. package/package.json +15 -18
  313. package/dist/agents/client-registry.d.ts +0 -22
  314. package/dist/agents/client-registry.js +0 -41
  315. package/dist/docs/agent-handoff-document.d.ts +0 -15
  316. package/dist/docs/agent-handoff-document.js +0 -180
  317. package/dist/docs/agent-solutions.d.ts +0 -110
  318. package/dist/docs/agent-solutions.js +0 -183
  319. package/dist/utils/query-keys.d.ts +0 -84
  320. package/dist/utils/query-keys.js +0 -108
@@ -0,0 +1,90 @@
1
+ import { type StatticAction } from "./api-keys.js";
2
+ /**
3
+ * Tenant-admission actions — the ONE declaration the credential compiler and
4
+ * scope-grantability both read, so they cannot drift. These are account-level:
5
+ * compiled onto the tenant root and checked ONLY there (creating a
6
+ * not-yet-existing team has no team to hang on), so their reach across the
7
+ * shared tenant grants no team authority. Every other action is team-role:
8
+ * compiled per team and intersected with the holder's LIVE role there.
9
+ */
10
+ export declare const TENANT_ADMISSION_ACTIONS: readonly ["teams:create"];
11
+ export declare function isTenantAdmissionAction(action: StatticAction): boolean;
12
+ /**
13
+ * The one table binding OAuth scopes to IAM-lite actions, in both directions.
14
+ *
15
+ * Each scope declares only the actions it adds, plus the narrower scopes it
16
+ * subsumes. Everything else is derived:
17
+ *
18
+ * - forward (`oauthScopeActions`): a scope grants its own actions plus every
19
+ * action of the scopes it covers, transitively. That is also what an API-key
20
+ * preset with the same name is allowed to do, so `credential-policy.ts`
21
+ * compiles presets from here rather than from a second list.
22
+ * - inverse (`oauthScopesForActions`): a policy's actions name the scopes whose
23
+ * *own* actions they reach. Covered actions are deliberately not signals —
24
+ * otherwise a read-only policy would label itself `publish:write` just for
25
+ * holding `spaces:read`.
26
+ *
27
+ * Keep both halves honest by editing one entry: adding an action to a scope
28
+ * widens the grant and the label together, and `oauth-resources.test.ts` pins
29
+ * the derivation's invariants.
30
+ */
31
+ declare const OAUTH_SCOPE_GRAPH: {
32
+ readonly "teams:read": {
33
+ readonly covers: readonly [];
34
+ readonly actions: readonly ["teams:read"];
35
+ };
36
+ readonly "teams:create": {
37
+ readonly covers: readonly [];
38
+ readonly actions: readonly ["teams:create"];
39
+ };
40
+ readonly "spaces:read": {
41
+ readonly covers: readonly [];
42
+ readonly actions: readonly ["spaces:read", "versions:read", "builds:read"];
43
+ };
44
+ readonly "spaces:write": {
45
+ readonly covers: readonly [];
46
+ readonly actions: readonly ["spaces:create", "spaces:write"];
47
+ };
48
+ readonly "spaces:rename": {
49
+ readonly covers: readonly [];
50
+ readonly actions: readonly ["spaces:rename"];
51
+ };
52
+ readonly "publish:write": {
53
+ readonly covers: readonly ["spaces:read", "spaces:write"];
54
+ readonly actions: readonly ["spaces:publish", "versions:promote", "versions:download", "builds:trigger", "builds:create"];
55
+ };
56
+ readonly "domains:read": {
57
+ readonly covers: readonly [];
58
+ readonly actions: readonly ["domains:read"];
59
+ };
60
+ readonly "domains:write": {
61
+ readonly covers: readonly ["domains:read"];
62
+ readonly actions: readonly ["domains:create", "domains:verify", "domains:assign", "domains:bind", "domains:delete", "domains:dns.write", "domains:purchase"];
63
+ };
64
+ readonly "spaces:publish": {
65
+ readonly covers: readonly [];
66
+ readonly actions: readonly ["spaces:publish"];
67
+ };
68
+ readonly "builds:trigger": {
69
+ readonly covers: readonly [];
70
+ readonly actions: readonly ["builds:trigger"];
71
+ };
72
+ };
73
+ export type OAuthScopeWithActions = keyof typeof OAUTH_SCOPE_GRAPH;
74
+ export declare function oauthScopeHasActions(scope: string): scope is OAuthScopeWithActions;
75
+ /**
76
+ * The scopes a credential policy can be *labelled* with: the capability set the
77
+ * dashboard and CLI offer per machine OAuth client. Derived from the graph's
78
+ * own order so the label list reads the way the consent screen does.
79
+ */
80
+ export declare const OAUTH_PRIMARY_SCOPES: ("teams:read" | "teams:create" | "spaces:read" | "spaces:write" | "spaces:rename" | "publish:write" | "domains:read" | "domains:write" | "spaces:publish" | "builds:trigger")[];
81
+ /** Every action a scope grants, including the scopes it subsumes. */
82
+ export declare function oauthScopeActionsFor(scope: OAuthScopeWithActions): StatticAction[];
83
+ /** Every action a set of scopes grants together. Unknown scopes grant nothing. */
84
+ export declare function oauthScopeActions(scopes: readonly string[] | null | undefined): StatticAction[];
85
+ /**
86
+ * The primary scopes a set of allowed actions amounts to. `*` is every primary
87
+ * scope; anything else matches on a scope's own actions only.
88
+ */
89
+ export declare function oauthScopesForActions(actions: Iterable<string>): OAuthScopeWithActions[];
90
+ export {};
@@ -0,0 +1,126 @@
1
+ import { StatticActionSchema } from "./api-keys.js";
2
+ import { OAUTH_MCP_RESOURCE_SCOPES } from "./oauth-resources.js";
3
+ /**
4
+ * Tenant-admission actions — the ONE declaration the credential compiler and
5
+ * scope-grantability both read, so they cannot drift. These are account-level:
6
+ * compiled onto the tenant root and checked ONLY there (creating a
7
+ * not-yet-existing team has no team to hang on), so their reach across the
8
+ * shared tenant grants no team authority. Every other action is team-role:
9
+ * compiled per team and intersected with the holder's LIVE role there.
10
+ */
11
+ export const TENANT_ADMISSION_ACTIONS = [
12
+ "teams:create",
13
+ ];
14
+ const TENANT_ADMISSION_ACTION_SET = new Set(TENANT_ADMISSION_ACTIONS);
15
+ export function isTenantAdmissionAction(action) {
16
+ return TENANT_ADMISSION_ACTION_SET.has(action);
17
+ }
18
+ /**
19
+ * The one table binding OAuth scopes to IAM-lite actions, in both directions.
20
+ *
21
+ * Each scope declares only the actions it adds, plus the narrower scopes it
22
+ * subsumes. Everything else is derived:
23
+ *
24
+ * - forward (`oauthScopeActions`): a scope grants its own actions plus every
25
+ * action of the scopes it covers, transitively. That is also what an API-key
26
+ * preset with the same name is allowed to do, so `credential-policy.ts`
27
+ * compiles presets from here rather than from a second list.
28
+ * - inverse (`oauthScopesForActions`): a policy's actions name the scopes whose
29
+ * *own* actions they reach. Covered actions are deliberately not signals —
30
+ * otherwise a read-only policy would label itself `publish:write` just for
31
+ * holding `spaces:read`.
32
+ *
33
+ * Keep both halves honest by editing one entry: adding an action to a scope
34
+ * widens the grant and the label together, and `oauth-resources.test.ts` pins
35
+ * the derivation's invariants.
36
+ */
37
+ const OAUTH_SCOPE_GRAPH = {
38
+ "teams:read": { covers: [], actions: ["teams:read"] },
39
+ "teams:create": { covers: [], actions: ["teams:create"] },
40
+ "spaces:read": {
41
+ covers: [],
42
+ actions: ["spaces:read", "versions:read", "builds:read"],
43
+ },
44
+ "spaces:write": { covers: [], actions: ["spaces:create", "spaces:write"] },
45
+ "spaces:rename": { covers: [], actions: ["spaces:rename"] },
46
+ // The publish tier is read + write plus the version and build verbs a
47
+ // publish flow needs. `spaces:publish` and `builds:trigger` are also offered
48
+ // on their own as granular API-resource scopes; they stay listed here as
49
+ // publish's own actions so a policy holding nothing but them still labels as
50
+ // a publisher.
51
+ "publish:write": {
52
+ covers: ["spaces:read", "spaces:write"],
53
+ actions: [
54
+ "spaces:publish",
55
+ "versions:promote",
56
+ "versions:download",
57
+ "builds:trigger",
58
+ "builds:create",
59
+ ],
60
+ },
61
+ "domains:read": { covers: [], actions: ["domains:read"] },
62
+ "domains:write": {
63
+ covers: ["domains:read"],
64
+ actions: [
65
+ "domains:create",
66
+ "domains:verify",
67
+ "domains:assign",
68
+ "domains:bind",
69
+ "domains:delete",
70
+ "domains:dns.write",
71
+ "domains:purchase",
72
+ ],
73
+ },
74
+ // Granular API-resource scopes. They never label a policy on their own — the
75
+ // inverse only ranges over the primary scopes below.
76
+ "spaces:publish": { covers: [], actions: ["spaces:publish"] },
77
+ "builds:trigger": { covers: [], actions: ["builds:trigger"] },
78
+ };
79
+ export function oauthScopeHasActions(scope) {
80
+ return scope in OAUTH_SCOPE_GRAPH;
81
+ }
82
+ const primaryScopeSet = new Set(OAUTH_MCP_RESOURCE_SCOPES);
83
+ /**
84
+ * The scopes a credential policy can be *labelled* with: the capability set the
85
+ * dashboard and CLI offer per machine OAuth client. Derived from the graph's
86
+ * own order so the label list reads the way the consent screen does.
87
+ */
88
+ export const OAUTH_PRIMARY_SCOPES = Object.keys(OAUTH_SCOPE_GRAPH)
89
+ .filter(oauthScopeHasActions)
90
+ .filter((scope) => primaryScopeSet.has(scope));
91
+ // Derived action lists are emitted in `StatticActionSchema` order, so a
92
+ // credential's permissions read the same however the graph is authored and a
93
+ // reordered entry never churns the wire contract.
94
+ const ACTION_ORDER = new Map(StatticActionSchema.options.map((action, index) => [action, index]));
95
+ function actionsForScope(scope, seen) {
96
+ if (seen.has(scope))
97
+ return [];
98
+ seen.add(scope);
99
+ const entry = OAUTH_SCOPE_GRAPH[scope];
100
+ return [
101
+ ...entry.actions,
102
+ ...entry.covers
103
+ .filter(oauthScopeHasActions)
104
+ .flatMap((covered) => actionsForScope(covered, seen)),
105
+ ];
106
+ }
107
+ /** Every action a scope grants, including the scopes it subsumes. */
108
+ export function oauthScopeActionsFor(scope) {
109
+ return [...new Set(actionsForScope(scope, new Set()))].toSorted((left, right) => (ACTION_ORDER.get(left) ?? 0) - (ACTION_ORDER.get(right) ?? 0));
110
+ }
111
+ /** Every action a set of scopes grants together. Unknown scopes grant nothing. */
112
+ export function oauthScopeActions(scopes) {
113
+ return [
114
+ ...new Set((scopes ?? []).filter(oauthScopeHasActions).flatMap((scope) => oauthScopeActionsFor(scope))),
115
+ ];
116
+ }
117
+ /**
118
+ * The primary scopes a set of allowed actions amounts to. `*` is every primary
119
+ * scope; anything else matches on a scope's own actions only.
120
+ */
121
+ export function oauthScopesForActions(actions) {
122
+ const allowed = new Set(actions);
123
+ if (allowed.has("*"))
124
+ return [...OAUTH_PRIMARY_SCOPES];
125
+ return OAUTH_PRIMARY_SCOPES.filter((scope) => OAUTH_SCOPE_GRAPH[scope].actions.some((action) => allowed.has(action)));
126
+ }
@@ -43,7 +43,7 @@ export declare const UserOperationSchema: z.ZodObject<{
43
43
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
44
44
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
45
45
  registrar: "registrar";
46
- wpcloud: "wpcloud";
46
+ infra: "infra";
47
47
  dns: "dns";
48
48
  runtime: "runtime";
49
49
  }>>>;
@@ -68,9 +68,9 @@ export declare const UserOperationSchema: z.ZodObject<{
68
68
  integration_release: "integration_release";
69
69
  }>;
70
70
  versionSource: z.ZodOptional<z.ZodEnum<{
71
- direct_upload: "direct_upload";
72
71
  git: "git";
73
72
  settings: "settings";
73
+ direct_upload: "direct_upload";
74
74
  }>>;
75
75
  integrationRelease: z.ZodOptional<z.ZodObject<{
76
76
  environment: z.ZodEnum<{
@@ -117,7 +117,7 @@ export declare const operationListResponseSchema: z.ZodObject<{
117
117
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
118
118
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
119
119
  registrar: "registrar";
120
- wpcloud: "wpcloud";
120
+ infra: "infra";
121
121
  dns: "dns";
122
122
  runtime: "runtime";
123
123
  }>>>;
@@ -142,9 +142,9 @@ export declare const operationListResponseSchema: z.ZodObject<{
142
142
  integration_release: "integration_release";
143
143
  }>;
144
144
  versionSource: z.ZodOptional<z.ZodEnum<{
145
- direct_upload: "direct_upload";
146
145
  git: "git";
147
146
  settings: "settings";
147
+ direct_upload: "direct_upload";
148
148
  }>>;
149
149
  integrationRelease: z.ZodOptional<z.ZodObject<{
150
150
  environment: z.ZodEnum<{
@@ -222,6 +222,29 @@ export declare const SuperadminOperationListSchema: z.ZodObject<{
222
222
  total: z.ZodNumber;
223
223
  windowHours: z.ZodNumber;
224
224
  }, z.core.$strip>;
225
+ export declare const SuperadminOperationDetailSchema: z.ZodObject<{
226
+ id: z.ZodString;
227
+ eventType: z.ZodString;
228
+ status: z.ZodString;
229
+ resourceType: z.ZodString;
230
+ resourceId: z.ZodString;
231
+ attempts: z.ZodNumber;
232
+ dueAt: z.ZodNullable<z.ZodString>;
233
+ leaseExpiresAt: z.ZodNullable<z.ZodString>;
234
+ stuck: z.ZodBoolean;
235
+ blockedByOperationId: z.ZodNullable<z.ZodString>;
236
+ inflightKey: z.ZodNullable<z.ZodString>;
237
+ lastError: z.ZodNullable<z.ZodString>;
238
+ createdAt: z.ZodString;
239
+ updatedAt: z.ZodString;
240
+ finishedAt: z.ZodNullable<z.ZodString>;
241
+ firstDueAt: z.ZodString;
242
+ payload: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
243
+ progress: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
244
+ receipt: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
245
+ cursor: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
246
+ }, z.core.$strip>;
247
+ export type SuperadminOperationDetail = z.infer<typeof SuperadminOperationDetailSchema>;
225
248
  export declare const SuperadminOperationSummarySchema: z.ZodObject<{
226
249
  windowHours: z.ZodNumber;
227
250
  live: z.ZodObject<{
@@ -32,13 +32,13 @@ export const operationListQuerySchema = cursorListQuerySchema.extend({
32
32
  .string()
33
33
  .min(1)
34
34
  .optional()
35
- .describe("Filter to operations touching one resource type, e.g. `space`."),
35
+ .describe("Filter to operations touching one resource type, for example `space`."),
36
36
  resourceId: z.string().min(1).optional().describe("Filter to operations touching one resource."),
37
37
  spaceId: z
38
38
  .string()
39
39
  .min(1)
40
40
  .optional()
41
- .describe("Filter to operations pertaining to one Space its own operations plus those of its versions and builds. The Space must be readable by the caller."),
41
+ .describe("Filter to operations for one Space: its own operations plus those of its versions and builds. The Space must be readable by the caller."),
42
42
  });
43
43
  export const operationListResponseSchema = z.object({
44
44
  data: z.array(UserOperationSchema),
@@ -46,8 +46,7 @@ export const operationListResponseSchema = z.object({
46
46
  });
47
47
  // ---------------------------------------------------------------------------
48
48
  // Superadmin operator surface: the operations rows ARE the queue, bucketed by
49
- // claim eligibility. Served by the control plane's feed service and consumed
50
- // by the superadmin dashboard and the e2e harness.
49
+ // claim eligibility.
51
50
  /** Buckets an operator triages by. Live buckets partition the live population:
52
51
  * a queued row is exactly one of ready / scheduled / blocked. */
53
52
  export const SUPERADMIN_OPERATION_FILTERS = [
@@ -75,8 +74,8 @@ export const SuperadminOperationRowSchema = z.object({
75
74
  resourceType: z.string(),
76
75
  resourceId: z.string(),
77
76
  attempts: z.number().int().nonnegative(),
78
- // The mutable eligibility clock, meaningless once the row is terminal null
79
- // there rather than a stale instant an operator would read as a schedule.
77
+ // The mutable eligibility clock. Null once the row is terminal, rather than a
78
+ // stale instant an operator would read as a schedule.
80
79
  dueAt: z.string().datetime().nullable(),
81
80
  leaseExpiresAt: z.string().datetime().nullable(),
82
81
  // Computed with the database clock so row labels agree with server-side
@@ -94,6 +93,13 @@ export const SuperadminOperationListSchema = z.object({
94
93
  total: z.number().int().nonnegative(),
95
94
  windowHours: z.number().int().positive(),
96
95
  });
96
+ export const SuperadminOperationDetailSchema = SuperadminOperationRowSchema.extend({
97
+ firstDueAt: z.string().datetime(),
98
+ payload: z.record(z.string(), z.unknown()).nullable(),
99
+ progress: z.record(z.string(), z.unknown()).nullable(),
100
+ receipt: z.record(z.string(), z.unknown()).nullable(),
101
+ cursor: z.record(z.string(), z.unknown()).nullable(),
102
+ });
97
103
  export const SuperadminOperationSummarySchema = z.object({
98
104
  windowHours: z.number().int().positive(),
99
105
  live: z.object({
@@ -1,36 +1,43 @@
1
1
  import { z } from "zod";
2
2
  export declare const SITE_PAGE_IDS: readonly ["404", "denied", "access", "index", "preview"];
3
3
  export declare const sitePageIdSchema: z.ZodEnum<{
4
+ access: "access";
4
5
  denied: "denied";
5
6
  index: "index";
6
7
  preview: "preview";
7
- access: "access";
8
8
  404: "404";
9
9
  }>;
10
10
  export type SitePageId = z.infer<typeof sitePageIdSchema>;
11
11
  export declare const ROUTE_PAGE_IDS: readonly ["404", "denied", "access"];
12
12
  export declare const routePageIdSchema: z.ZodEnum<{
13
- denied: "denied";
14
13
  access: "access";
14
+ denied: "denied";
15
15
  404: "404";
16
16
  }>;
17
17
  export type RoutePageId = z.infer<typeof routePageIdSchema>;
18
- export declare const CUSTOM_PAGE_IDS: readonly ["404", "denied", "access", "index", "preview", "collab"];
18
+ export declare const CUSTOM_PAGE_IDS: readonly ["404", "denied", "access", "index", "preview", "collab", "login", "undeployed", "suspended", "gone", "runtime-error", "rate-limited"];
19
19
  export declare const customPageIdSchema: z.ZodEnum<{
20
20
  collab: "collab";
21
+ login: "login";
22
+ access: "access";
23
+ suspended: "suspended";
21
24
  denied: "denied";
22
25
  index: "index";
23
26
  preview: "preview";
24
- access: "access";
25
27
  404: "404";
28
+ undeployed: "undeployed";
29
+ gone: "gone";
30
+ "runtime-error": "runtime-error";
31
+ "rate-limited": "rate-limited";
26
32
  }>;
27
33
  export type CustomPageId = z.infer<typeof customPageIdSchema>;
28
34
  export declare const COLLAB_PAGE_SOURCE = "_pages/collab.html";
29
35
  export declare const COLLAB_PAGE_PATH: "/_pages/collab.html";
30
36
  export declare const COLLAB_PAGE_ELEMENTS: readonly ["sf-space", "sf-comments", "sf-thread", "sf-timeline", "sf-presence", "sf-versions"];
31
- export declare const PLATFORM_PAGE_IDS: readonly ["undeployed", "suspended", "legal", "gone", "runtime-error", "rate-limited", "tier-unavailable", "proxy-error", "method-not-allowed", "content-too-large"];
37
+ export declare const PLATFORM_PAGE_IDS: readonly ["login", "undeployed", "suspended", "legal", "gone", "runtime-error", "rate-limited", "tier-unavailable", "proxy-error", "method-not-allowed", "content-too-large"];
32
38
  export declare const platformPageIdSchema: z.ZodEnum<{
33
39
  legal: "legal";
40
+ login: "login";
34
41
  suspended: "suspended";
35
42
  undeployed: "undeployed";
36
43
  gone: "gone";
@@ -51,7 +58,10 @@ export type PageDefinition = {
51
58
  noindex: boolean;
52
59
  customTemplate: boolean;
53
60
  };
54
- export declare const PAGE_CATALOG: Readonly<Record<SitePageId, PageDefinition>>;
61
+ type PageCatalog = {
62
+ [PageId in SitePageId]: PageDefinition;
63
+ };
64
+ export declare const PAGE_CATALOG: PageCatalog;
55
65
  export declare const PAGE_SOURCE_MAX_BYTES: number;
56
66
  export declare const PAGES_DIRECTORY = "_pages";
57
67
  export declare const PAGE_LAYOUT_FILE = "_layout.html";
@@ -59,13 +69,27 @@ export declare const pageArtifactKeySchema: z.ZodString;
59
69
  export declare const runtimePagesSchema: z.ZodObject<{
60
70
  routes: z.ZodRecord<z.ZodString, z.ZodObject<{
61
71
  pages: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
62
- denied: "denied";
63
72
  access: "access";
73
+ denied: "denied";
64
74
  404: "404";
65
75
  }>, z.ZodString>>;
66
76
  index: z.ZodOptional<z.ZodString>;
67
77
  }, z.core.$strip>>;
68
78
  previews: z.ZodRecord<z.ZodString, z.ZodString>;
79
+ platform: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
80
+ legal: "legal";
81
+ login: "login";
82
+ suspended: "suspended";
83
+ undeployed: "undeployed";
84
+ gone: "gone";
85
+ "runtime-error": "runtime-error";
86
+ "rate-limited": "rate-limited";
87
+ "tier-unavailable": "tier-unavailable";
88
+ "proxy-error": "proxy-error";
89
+ "method-not-allowed": "method-not-allowed";
90
+ "content-too-large": "content-too-large";
91
+ }>, z.ZodString>>;
69
92
  collab: z.ZodOptional<z.ZodString>;
70
93
  }, z.core.$strip>;
71
94
  export type RuntimePages = z.infer<typeof runtimePagesSchema>;
95
+ export {};
@@ -6,11 +6,24 @@ export const routePageIdSchema = z.enum(ROUTE_PAGE_IDS);
6
6
  // `collab` is publishable but has no built-in template: with no layout of their
7
7
  // own a Space's reviewers get the platform frame at `/__/collab`, so there is
8
8
  // nothing for a default `_pages/collab.html` to be. Hence CUSTOM ⊃ SITE.
9
- export const CUSTOM_PAGE_IDS = ["404", "denied", "access", "index", "preview", "collab"];
9
+ export const CUSTOM_PAGE_IDS = [
10
+ "404",
11
+ "denied",
12
+ "access",
13
+ "index",
14
+ "preview",
15
+ "collab",
16
+ "login",
17
+ "undeployed",
18
+ "suspended",
19
+ "gone",
20
+ "runtime-error",
21
+ "rate-limited",
22
+ ];
10
23
  export const customPageIdSchema = z.enum(CUSTOM_PAGE_IDS);
11
24
  // The Space-level review room the collaboration orb expands into, and the URL
12
25
  // its compiled document answers at (collab-public-api.html §3). One room per
13
- // Space, so one page, at the root never a per-directory override.
26
+ // Space: one page, at the root, never a per-directory override.
14
27
  // The PHP mirror is SPACEFAST_COLLAB_PAGE_PATH in runtime/engine/shared/context.php.
15
28
  export const COLLAB_PAGE_SOURCE = "_pages/collab.html";
16
29
  export const COLLAB_PAGE_PATH = `/${COLLAB_PAGE_SOURCE}`;
@@ -26,6 +39,7 @@ export const COLLAB_PAGE_ELEMENTS = [
26
39
  "sf-versions",
27
40
  ];
28
41
  export const PLATFORM_PAGE_IDS = [
42
+ "login",
29
43
  "undeployed",
30
44
  "suspended",
31
45
  "legal",
@@ -68,9 +82,9 @@ export const PAGE_CATALOG = {
68
82
  customTemplate: false,
69
83
  },
70
84
  // The visitor access page: the deny surface WITH lanes (sign in, SSO,
71
- // password, request an invite). Rendered by the runtime at the requested URL;
72
- // publishers may fully retheme it the runtime injects the functional lane
73
- // blocks into the sf-access-* slots so forms and states stay correct.
85
+ // password, request an invite), rendered at the requested URL. Publishers may
86
+ // fully retheme it; the runtime injects the lane blocks into the sf-access-*
87
+ // slots so forms and states stay correct.
74
88
  access: {
75
89
  id: "access",
76
90
  status: 403,
@@ -107,6 +121,9 @@ export const runtimePagesSchema = z.object({
107
121
  index: pageArtifactKeySchema.optional(),
108
122
  })),
109
123
  previews: z.record(z.string().startsWith("/").max(2048), pageArtifactKeySchema),
124
+ // Partner platform pages are compiled with tenant/team presentation at
125
+ // finalize. First-party versions omit this map and keep the PHP fallback.
126
+ platform: z.record(platformPageIdSchema, pageArtifactKeySchema).optional(),
110
127
  // Present only when the Space published its own review room; its absence is
111
128
  // what tells the SDK to expand into the platform frame instead.
112
129
  collab: pageArtifactKeySchema.optional(),
@@ -0,0 +1,3 @@
1
+ export declare const PRINCIPAL_NOTIFICATION_EVENT_CODES: readonly ["principal.notification.claim", "principal.notification.space_expiry", "principal.notification.access_invitation", "principal.notification.access_request", "principal.notification.access_verification", "principal.notification.publish_receipt", "principal.notification.comment"];
2
+ export type PrincipalNotificationEventCode = (typeof PRINCIPAL_NOTIFICATION_EVENT_CODES)[number];
3
+ export declare const PRINCIPAL_NOTIFICATION_EVENT_PREFIX = "principal.notification.";
@@ -0,0 +1,65 @@
1
+ // The `principal.notification.*` catalog (partner API spec §7 "Events").
2
+ //
3
+ // For a partner tenant, Spacefast does NOT send email to the tenant's own end
4
+ // customers (principals): a partner white-labels that surface. Instead, each
5
+ // customer-facing notification that Spacefast would otherwise email is delivered
6
+ // to the partner as a webhook event on the tenant subscription, and the partner
7
+ // sends its own branded message. No active subscription → no send and no
8
+ // Spacefast-sender fallback (§7 L343-345). `ten_main` consumer email is
9
+ // untouched.
10
+ //
11
+ // This module is the subscribe-side catalog: the codes a partner subscribes to
12
+ // and the guards over them. `activity.ts` folds this list into
13
+ // `ACTIVITY_EVENT_CODES` so these are first-class taxonomy codes — every one
14
+ // carries a dashboard activity-grammar row and is a valid webhook `events`
15
+ // filter. The test pins that fold as a subset relationship.
16
+ //
17
+ // Enumeration is from a complete audit of the partner-reachable email send
18
+ // sites, keeping only notifications whose recipient is a partner tenant's own
19
+ // customer. Dropped: Spacefast dashboard-ACCOUNT auth / security notices
20
+ // (password reset, account email verification, provider changes) — a partner
21
+ // customer's dashboard account authenticates through the partner's own issuer via
22
+ // partner tokens, so Spacefast never sends those; and team-member /
23
+ // dashboard-collaborator email, which is not a partner end-customer notification.
24
+ // NOTE: a private space's own visitor email-verification challenges (open-page
25
+ // verify, access-request verify) are a different thing — they reach the partner's
26
+ // end customer and ARE delegated, via `access_verification` below.
27
+ export const PRINCIPAL_NOTIFICATION_EVENT_CODES = [
28
+ // A claimable space's claim link is available to hand to the customer who
29
+ // created it (partner API spec §13 Q3 — the one certain event). Spacefast
30
+ // surfaces the claim link in its own CLI/API response for `ten_main`; for a
31
+ // partner tenant the link reaches the customer only through the partner, so
32
+ // this event carries it.
33
+ "principal.notification.claim",
34
+ // A claimable space is expiring soon and can still be kept by claiming it.
35
+ // The Spacefast-sent expiry reminder for a partner-owned claimable space
36
+ // (operations/jobs/space-lifecycle.ts) becomes this event instead.
37
+ "principal.notification.space_expiry",
38
+ // A person was invited to access a space. The Spacefast-sent space access
39
+ // invitation for a partner space (access/email.ts) becomes this event.
40
+ "principal.notification.access_invitation",
41
+ // Someone requested access to a private space and the owner must review it,
42
+ // or a pending request was decided (approved/denied). The Spacefast-sent
43
+ // access-request review + decision mail for a partner space (access/email.ts,
44
+ // access/transition.ts) becomes this event.
45
+ "principal.notification.access_request",
46
+ // A visitor to a partner's private space must verify their email address —
47
+ // either to open a page behind a verified-email gate, or to submit an access
48
+ // request. Spacefast would otherwise send the visitor an essential-auth
49
+ // "verify your email" link (access/email.ts, access/verified-email-proof.ts);
50
+ // for a partner space that recipient is the partner's own end customer, so the
51
+ // verify URL is delegated as this event for the partner to deliver instead.
52
+ "principal.notification.access_verification",
53
+ // A publish/build lifecycle receipt for a partner space, where applicable
54
+ // (§7 "publish receipt where applicable"). Partner spaces early-exit the
55
+ // team-scoped receipt paths today; this is the code those paths emit on.
56
+ "principal.notification.publish_receipt",
57
+ // Comment activity on a partner space (a new thread, reply, or mention). The
58
+ // Spacefast-sent collaboration email for a partner space (cast-worker.ts)
59
+ // becomes this event; the partner notifies its own customer.
60
+ "principal.notification.comment",
61
+ ];
62
+ // The prefix every principal-notification code shares. `subscriptions` filters
63
+ // select on it as a wildcard (`principal.notification.*`), so a partner can
64
+ // subscribe to the whole class in one filter.
65
+ export const PRINCIPAL_NOTIFICATION_EVENT_PREFIX = "principal.notification.";