@selvajs/platform 0.17.0-beta.3 → 0.18.0

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 (127) hide show
  1. package/README.md +25 -28
  2. package/dist/access/rules.d.ts +20 -26
  3. package/dist/access/rules.d.ts.map +1 -1
  4. package/dist/access/rules.js +16 -16
  5. package/dist/access/rules.js.map +1 -1
  6. package/dist/auth/interface.d.ts +99 -116
  7. package/dist/auth/interface.d.ts.map +1 -1
  8. package/dist/auth/types.d.ts +1 -4
  9. package/dist/auth/types.d.ts.map +1 -1
  10. package/dist/bindings/interface.d.ts +19 -32
  11. package/dist/bindings/interface.d.ts.map +1 -1
  12. package/dist/bindings/interface.js +6 -12
  13. package/dist/bindings/interface.js.map +1 -1
  14. package/dist/computeServer/interface.d.ts +34 -41
  15. package/dist/computeServer/interface.d.ts.map +1 -1
  16. package/dist/computeServer/secrets.d.ts +16 -20
  17. package/dist/computeServer/secrets.d.ts.map +1 -1
  18. package/dist/computeServer/secrets.js +11 -12
  19. package/dist/computeServer/secrets.js.map +1 -1
  20. package/dist/computeServer/types.d.ts +15 -17
  21. package/dist/computeServer/types.d.ts.map +1 -1
  22. package/dist/computeServer/types.js.map +1 -1
  23. package/dist/computeServer/utils.d.ts +8 -14
  24. package/dist/computeServer/utils.d.ts.map +1 -1
  25. package/dist/computeServer/utils.js +8 -16
  26. package/dist/computeServer/utils.js.map +1 -1
  27. package/dist/config.d.ts +16 -39
  28. package/dist/config.d.ts.map +1 -1
  29. package/dist/config.js +1 -2
  30. package/dist/config.js.map +1 -1
  31. package/dist/context.d.ts +12 -19
  32. package/dist/context.d.ts.map +1 -1
  33. package/dist/context.js +6 -10
  34. package/dist/context.js.map +1 -1
  35. package/dist/data/interface.d.ts +32 -47
  36. package/dist/data/interface.d.ts.map +1 -1
  37. package/dist/data/interface.js +7 -10
  38. package/dist/data/interface.js.map +1 -1
  39. package/dist/definitions/interface.d.ts +24 -31
  40. package/dist/definitions/interface.d.ts.map +1 -1
  41. package/dist/definitions/schemas.d.ts.map +1 -1
  42. package/dist/definitions/schemas.js +6 -9
  43. package/dist/definitions/schemas.js.map +1 -1
  44. package/dist/definitions/types.d.ts +26 -42
  45. package/dist/definitions/types.d.ts.map +1 -1
  46. package/dist/definitions/types.js +0 -1
  47. package/dist/definitions/types.js.map +1 -1
  48. package/dist/errors/interface.d.ts +4 -8
  49. package/dist/errors/interface.d.ts.map +1 -1
  50. package/dist/errors/interface.js.map +1 -1
  51. package/dist/errors.d.ts +2 -5
  52. package/dist/errors.d.ts.map +1 -1
  53. package/dist/errors.js +2 -5
  54. package/dist/errors.js.map +1 -1
  55. package/dist/events/audit.d.ts +13 -26
  56. package/dist/events/audit.d.ts.map +1 -1
  57. package/dist/events/interface.d.ts +17 -33
  58. package/dist/events/interface.d.ts.map +1 -1
  59. package/dist/events/interface.js +7 -22
  60. package/dist/events/interface.js.map +1 -1
  61. package/dist/index.d.ts.map +1 -1
  62. package/dist/index.js.map +1 -1
  63. package/dist/invites/interface.d.ts +3 -9
  64. package/dist/invites/interface.d.ts.map +1 -1
  65. package/dist/invites/types.d.ts +13 -10
  66. package/dist/invites/types.d.ts.map +1 -1
  67. package/dist/logging/interface.d.ts +19 -33
  68. package/dist/logging/interface.d.ts.map +1 -1
  69. package/dist/logging/interface.js +9 -17
  70. package/dist/logging/interface.js.map +1 -1
  71. package/dist/metrics/interface.d.ts +16 -31
  72. package/dist/metrics/interface.d.ts.map +1 -1
  73. package/dist/metrics/interface.js +1 -5
  74. package/dist/metrics/interface.js.map +1 -1
  75. package/dist/organizations/interface.d.ts +14 -23
  76. package/dist/organizations/interface.d.ts.map +1 -1
  77. package/dist/organizations/paths.d.ts +9 -12
  78. package/dist/organizations/paths.d.ts.map +1 -1
  79. package/dist/organizations/paths.js +12 -16
  80. package/dist/organizations/paths.js.map +1 -1
  81. package/dist/organizations/schemas.d.ts +10 -19
  82. package/dist/organizations/schemas.d.ts.map +1 -1
  83. package/dist/organizations/schemas.js +10 -19
  84. package/dist/organizations/schemas.js.map +1 -1
  85. package/dist/organizations/types.d.ts +3 -4
  86. package/dist/organizations/types.d.ts.map +1 -1
  87. package/dist/pagination.d.ts +13 -21
  88. package/dist/pagination.d.ts.map +1 -1
  89. package/dist/pagination.js.map +1 -1
  90. package/dist/permissions/interface.d.ts +12 -21
  91. package/dist/permissions/interface.d.ts.map +1 -1
  92. package/dist/permissions/types.d.ts +5 -5
  93. package/dist/permissions/types.js +5 -5
  94. package/dist/platformProjects/interface.d.ts +7 -14
  95. package/dist/platformProjects/interface.d.ts.map +1 -1
  96. package/dist/platformProjects/types.d.ts +1 -4
  97. package/dist/platformProjects/types.d.ts.map +1 -1
  98. package/dist/projects/interface.d.ts +12 -17
  99. package/dist/projects/interface.d.ts.map +1 -1
  100. package/dist/shareLinks/interface.d.ts +5 -8
  101. package/dist/shareLinks/interface.d.ts.map +1 -1
  102. package/dist/shareLinks/schemas.d.ts.map +1 -1
  103. package/dist/shareLinks/schemas.js +1 -5
  104. package/dist/shareLinks/schemas.js.map +1 -1
  105. package/dist/shareLinks/types.d.ts +5 -6
  106. package/dist/shareLinks/types.d.ts.map +1 -1
  107. package/dist/shareLinks/types.js.map +1 -1
  108. package/dist/solveCache/interface.d.ts +32 -46
  109. package/dist/solveCache/interface.d.ts.map +1 -1
  110. package/dist/solveCache/interface.js.map +1 -1
  111. package/dist/storage/assetClasses.d.ts +16 -24
  112. package/dist/storage/assetClasses.d.ts.map +1 -1
  113. package/dist/storage/assetClasses.js +21 -28
  114. package/dist/storage/assetClasses.js.map +1 -1
  115. package/dist/storage/cacheBust.d.ts +12 -14
  116. package/dist/storage/cacheBust.d.ts.map +1 -1
  117. package/dist/storage/cacheBust.js +12 -14
  118. package/dist/storage/cacheBust.js.map +1 -1
  119. package/dist/storage/image.d.ts +9 -13
  120. package/dist/storage/image.d.ts.map +1 -1
  121. package/dist/storage/image.js +9 -13
  122. package/dist/storage/image.js.map +1 -1
  123. package/dist/userProfile/interface.d.ts +1 -1
  124. package/dist/userProfile/types.d.ts +1 -5
  125. package/dist/userProfile/types.d.ts.map +1 -1
  126. package/dist/userProfile/types.js.map +1 -1
  127. package/package.json +3 -3
@@ -7,13 +7,13 @@ import type { ListOptions, Page } from '../pagination.js';
7
7
  */
8
8
  export interface IPasswordAuth {
9
9
  /**
10
- * Verify credentials. Discriminated union — callers MUST `switch (result.kind)`,
11
- * never treat truthiness as authenticated.
10
+ * Verify credentials. Returns a discriminated union — callers must
11
+ * `switch (result.kind)`, never treat truthiness as authenticated.
12
12
  */
13
13
  verifyLogin(email: string, password: string): Promise<LoginResult>;
14
14
  /**
15
- * Admin-initiated user creation. Pure identity callers grant platform
16
- * permissions separately via `IPlatformPermissionStore.set`.
15
+ * Admin-initiated user creation. Grant platform permissions separately
16
+ * via `IPlatformPermissionStore.set`.
17
17
  */
18
18
  createUserWithPassword(email: string, password: string): Promise<AuthUser>;
19
19
  /** Self-service registration. Return null when self-registration is disabled. */
@@ -21,47 +21,43 @@ export interface IPasswordAuth {
21
21
  }
22
22
  /**
23
23
  * Optional OAuth surface. Implemented by providers that broker OAuth flows
24
- * (Supabase Auth, future Eterna/Auth0/etc.). Local credential-only providers
24
+ * (Supabase Auth, future Eterna/Auth0/etc.); local credential-only providers
25
25
  * leave `IAuthProvider.oauth` undefined.
26
26
  *
27
- * Lifecycle is the standard authorization-code flow:
27
+ * Standard authorization-code flow:
28
28
  *
29
29
  * 1. Browser hits `/auth/{provider}/start?provider=google` → server calls
30
30
  * `getOAuthAuthorizationUrl` and 303s to the result.
31
- * 2. IdP redirects back to `/auth/{provider}/callback?code=...` →
32
- * server calls `exchangeOAuthCode` to mint the session pair.
33
- * 3. When the access token expires, the session-refresh middleware in
34
- * `hooks.server.ts` calls `refreshSession` with the stored refresh
35
- * token to swap for a fresh pair without bouncing the user.
31
+ * 2. IdP redirects back to `/auth/{provider}/callback?code=...` → server
32
+ * calls `exchangeOAuthCode` to mint the session pair.
33
+ * 3. When the access token expires, session-refresh middleware in
34
+ * `hooks.server.ts` calls `refreshSession` to swap in a fresh pair
35
+ * without bouncing the user.
36
36
  *
37
- * Each method returns `null` (rather than throwing) on irrecoverable
38
- * credential failures the route layer translates `null` into the right
39
- * HTTP shape (401 for refresh, login redirect for callback).
37
+ * Each method returns `null` rather than throwing on irrecoverable
38
+ * credential failures, so the route layer can pick the right HTTP shape
39
+ * (401 for refresh, login redirect for callback).
40
40
  */
41
41
  export interface IOAuthAuth {
42
42
  /**
43
- * The OAuth providers this adapter is configured to broker. Returned as
44
- * lowercased identifiers ("google", "github", …) the adapter reads its
45
- * own configuration source (env var, dashboard, hard-coded list) and
46
- * decides what's available. Empty array when none are wired.
43
+ * OAuth providers this adapter is configured to broker, as lowercased
44
+ * identifiers ("google", "github", …). Empty array when none are wired.
47
45
  *
48
- * Driving adapters (HTTP routes, UI) call this instead of reading
49
- * provider-specific env vars directly keeps the provider name out of
50
- * `selva`.
46
+ * Route/UI code calls this instead of reading provider-specific env vars
47
+ * directly, keeping provider config out of `selva`.
51
48
  */
52
49
  listProviders(): readonly string[];
53
50
  /**
54
- * Build the IdP authorization URL the browser should be redirected to.
55
- * `redirectTo` is the full callback URL — must be the route that handles
56
- * the `?code=...` exchange. Provider-name validation is the caller's job;
57
- * passing an unconfigured provider may surface as an upstream error.
51
+ * Build the IdP authorization URL to redirect the browser to. `redirectTo`
52
+ * must be the route that handles the `?code=...` exchange. Provider-name
53
+ * validation is the caller's job — an unconfigured provider may surface
54
+ * as an upstream error.
58
55
  */
59
56
  getOAuthAuthorizationUrl(provider: 'google' | 'github' | 'azure' | 'gitlab', redirectTo: string): Promise<string>;
60
57
  /**
61
- * Exchange an authorization code for a session. Returns the resolved
62
- * identity and an access/refresh token pair. `null` when the code is
63
- * invalid, expired, or already redeemed callers MUST treat null as
64
- * "send the user back to /login".
58
+ * Exchange an authorization code for a session: the resolved identity plus
59
+ * an access/refresh token pair, or `null` if the code is invalid, expired,
60
+ * or already redeemed. Callers must treat null as "send back to /login".
65
61
  */
66
62
  exchangeOAuthCode(code: string): Promise<{
67
63
  user: AuthUser;
@@ -75,8 +71,8 @@ export interface IOAuthAuth {
75
71
  * clearing the refresh cookie.
76
72
  *
77
73
  * @deprecated Session refresh is session lifecycle, not OAuth — a consumer
78
- * that brokers no OAuth still needs it (to refresh a password session, or
79
- * to revoke on logout). Moved to `IAuthProvider.sessionRefresh`
74
+ * that brokers no OAuth still needs it (refreshing a password session, or
75
+ * revoking on logout). Moved to `IAuthProvider.sessionRefresh`
80
76
  * (`ISessionRefresh`). This member delegates for one release and will be
81
77
  * removed in the next minor; migrate callers to
82
78
  * `auth.sessionRefresh?.refreshSession(...)`.
@@ -87,16 +83,14 @@ export interface IOAuthAuth {
87
83
  } | null>;
88
84
  }
89
85
  /**
90
- * Optional session-lifecycle surface: refresh an expiring session, and revoke
91
- * one server-side. Deliberately NOT part of `IOAuthAuth` — refresh and revoke
92
- * are properties of a *session*, regardless of how that session was minted.
93
- * A deployment that brokers no OAuth (`oauth.listProviders()` `[]`) still
94
- * needs to revoke on logout, and would otherwise have to reach into an OAuth
95
- * capability whose stated precondition it does not meet.
86
+ * Optional session-lifecycle surface: refresh an expiring session, revoke one
87
+ * server-side. Deliberately not part of `IOAuthAuth` — refresh and revoke are
88
+ * properties of a *session*, regardless of how it was minted. A deployment
89
+ * that brokers no OAuth still needs to revoke on logout.
96
90
  *
97
- * Undefined for providers that cannot invalidate a session server-side (the
98
- * local HMAC provider mints stateless tokens; there is nothing to revoke).
99
- * Callers MUST treat absence as "cookie deletion is all we can do".
91
+ * Undefined for providers that can't invalidate a session server-side (the
92
+ * local HMAC provider mints stateless tokens nothing to revoke). Callers
93
+ * must treat absence as "cookie deletion is all we can do".
100
94
  */
101
95
  export interface ISessionRefresh {
102
96
  /**
@@ -110,30 +104,30 @@ export interface ISessionRefresh {
110
104
  refreshToken: string;
111
105
  } | null>;
112
106
  /**
113
- * Invalidate a session server-side so the token stops being accepted
107
+ * Invalidate a session server-side so its token stops being accepted
114
108
  * before it would naturally expire. Called on logout.
115
109
  *
116
- * `token` is the session's access token (the value the driving layer holds
117
- * in its session cookie). Adapters that revoke by refresh token instead
118
- * accept either — the contract is "the credential the caller has".
110
+ * `token` is the session's access token (what the driving layer holds in
111
+ * its session cookie). Adapters that revoke by refresh token accept
112
+ * either — the contract is "the credential the caller has".
119
113
  *
120
114
  * Best-effort and idempotent: revoking an already-revoked, expired, or
121
- * unknown token returns `true`, because the desired end state (that token
115
+ * unknown token returns `true`, since the desired end state (that token
122
116
  * grants nothing) holds either way. Returns `false` only when the provider
123
- * could not carry out the revocation and the token may still be live —
124
- * callers SHOULD still clear the cookie, but MAY log the failure. Never
125
- * throws: a failed revoke MUST NOT prevent a user from logging out.
117
+ * couldn't carry out the revocation and the token may still be live —
118
+ * callers should still clear the cookie but may log the failure. Never
119
+ * throws: a failed revoke must not block logout.
126
120
  */
127
121
  revokeSession(token: string): Promise<boolean>;
128
122
  }
129
123
  /**
130
124
  * Optional passwordless email surface — "type your email, click the link in
131
125
  * your inbox, you're in." Implemented by providers that broker email delivery
132
- * + token verification (Supabase Auth, future Eterna ID, …). Adapters that
126
+ * and token verification (Supabase Auth, future Eterna ID, …). Adapters that
133
127
  * can't send mail or don't model this flow leave `IAuthProvider.emailLink`
134
128
  * undefined.
135
129
  *
136
- * Lifecycle is two phases mirroring OAuth's start/callback split:
130
+ * Two phases, mirroring OAuth's start/callback split:
137
131
  *
138
132
  * 1. User submits an email → server calls `sendMagicLink(email,
139
133
  * callbackUrl)`. The adapter delivers a link to that callback URL with
@@ -142,20 +136,19 @@ export interface ISessionRefresh {
142
136
  * 2. User clicks the link, browser hits the callback route → server calls
143
137
  * `verifyMagicLink(rawTokenFromUrl)` to mint a session.
144
138
  *
145
- * The driving adapter never inspects the token itself — it forwards the raw
146
- * URL string. Adapter-specific token shapes stay inside the adapter.
139
+ * The route layer never inspects the token — it just forwards the raw URL
140
+ * string. Adapter-specific token shapes stay inside the adapter.
147
141
  */
148
142
  export interface IEmailLinkAuth {
149
143
  /**
150
- * Send a magic-link email. `callbackUrl` is the absolute URL the
151
- * adapter should embed in the link — must point at the route that
152
- * handles `verifyMagicLink`.
144
+ * Send a magic-link email. `callbackUrl` is the absolute URL the adapter
145
+ * embeds in the link — must point at the route that handles
146
+ * `verifyMagicLink`.
153
147
  *
154
- * Returns `{ ok: true }` on success. On adapter-classified failures
155
- * (rate limit, signup disabled, invalid email) returns
156
- * `{ ok: false, reason }` so the route can render a user-friendly
157
- * message without exposing provider internals. Network/unknown errors
158
- * still throw.
148
+ * Returns `{ ok: false, reason }` for adapter-classified failures (rate
149
+ * limit, signup disabled, invalid email) so the route can render a
150
+ * user-friendly message without exposing provider internals. Network or
151
+ * unknown errors still throw.
159
152
  */
160
153
  sendMagicLink(email: string, callbackUrl: string): Promise<{
161
154
  ok: true;
@@ -164,12 +157,12 @@ export interface IEmailLinkAuth {
164
157
  reason: 'rate_limited' | 'signup_disabled' | 'invalid_email';
165
158
  }>;
166
159
  /**
167
- * Verify the token the IdP sent the user. `rawCallbackUrl` is the full
168
- * URL the user landed on (or an opaque adapter-specific token string —
160
+ * Verify the token the IdP sent the user. `rawCallbackUrl` is the full URL
161
+ * the user landed on (or an opaque adapter-specific token string —
169
162
  * adapters document which); the adapter pulls whatever fields it needs.
170
163
  *
171
- * Returns `null` for invalid/expired/already-redeemed tokens — callers
172
- * MUST treat null as "send the user back to /login". `refreshToken` is
164
+ * Returns `null` for invalid, expired, or already-redeemed tokens —
165
+ * callers must treat null as "send back to /login". `refreshToken` is
173
166
  * present only for adapters that issue refresh tokens for email-link
174
167
  * sessions (Supabase does); omit otherwise.
175
168
  */
@@ -182,59 +175,52 @@ export interface IEmailLinkAuth {
182
175
  /**
183
176
  * Optional forward-proxy authentication surface. Implemented by providers
184
177
  * that derive identity from signals injected by a trusted upstream reverse
185
- * proxy (HTTP headers, mTLS, etc.) — e.g. Caddy `forward_auth`,
186
- * oauth2-proxy, Authelia, Pomerium, Traefik forward-auth.
178
+ * proxy (HTTP headers, mTLS, etc.) — e.g. Caddy `forward_auth`, oauth2-proxy,
179
+ * Authelia, Pomerium, Traefik forward-auth.
187
180
  *
188
- * TRUST BOUNDARY — READ BEFORE IMPLEMENTING
181
+ * TRUST BOUNDARY — READ BEFORE IMPLEMENTING
189
182
  *
190
183
  * The signals this surface consumes are NOT verified cryptographically by
191
- * Selva. They are trusted because the deployment runs the app behind a
184
+ * Selva. They're trusted only because the deployment runs the app behind a
192
185
  * proxy that:
193
186
  *
194
187
  * 1. Authenticates the user against an upstream IdP, AND
195
- * 2. STRIPS any client-supplied copies of the trusted headers from
188
+ * 2. Strips any client-supplied copies of the trusted headers from
196
189
  * inbound requests before adding its own, AND
197
- * 3. Is the ONLY network path that can reach the app process (bind to
198
- * 127.0.0.1, firewall the app port, or a private socket).
190
+ * 3. Is the only network path that can reach the app process (bind to
191
+ * 127.0.0.1, firewall the app port, or use a private socket).
199
192
  *
200
193
  * If any condition fails, an attacker can spoof the headers and become
201
- * anyone. **Each implementer of this interface MUST ship a README that
202
- * states, loudly, the exact proxy configuration required.** The platform
203
- * layer cannot verify this — it is the provider's contract with its
204
- * operator.
194
+ * anyone. Each implementer of this interface MUST ship a README stating the
195
+ * exact proxy configuration required the platform layer can't verify this;
196
+ * it's the provider's contract with its operator.
205
197
  *
206
- * Lifecycle: `identifyFromHeaders` is called from `hooks.server.ts` on
207
- * every authed request whose session cookie is missing or invalid. It MUST
208
- * be cheap — a header read plus at most one indexed lookup. No network
209
- * calls, no synchronous disk scans of unbounded size.
198
+ * `identifyFromHeaders` is called from `hooks.server.ts` on every authed
199
+ * request whose session cookie is missing or invalid. It must be cheap — a
200
+ * header read plus at most one indexed lookup, no network calls, no
201
+ * unbounded disk scans.
210
202
  */
211
203
  export interface IProxyAuth {
212
204
  /**
213
- * Identify the caller from trusted upstream-proxy signals on the
214
- * incoming request. Return `null` for "not identified" (header missing,
215
- * UPN not allowlisted, account disabled). MUST NOT throw for absent
216
- * headers those are the normal anonymous case.
205
+ * Identify the caller from trusted upstream-proxy signals on the incoming
206
+ * request. Returns `null` for "not identified" (header missing, UPN not
207
+ * allowlisted, account disabled) must not throw for absent headers,
208
+ * since that's the normal anonymous case.
217
209
  *
218
210
  * On first identification of a previously-allowlisted user, the
219
- * implementation MAY materialize stored fields (display name, email)
220
- * from the same headers. Auto-creating arbitrary users from headers
221
- * is forbidden: the allowlist IS the security boundary.
211
+ * implementation may materialize stored fields (display name, email) from
212
+ * the same headers. Auto-creating arbitrary users from headers is
213
+ * forbidden: the allowlist is the security boundary.
222
214
  */
223
215
  identifyFromHeaders(headers: Headers): Promise<AuthUser | null>;
224
216
  /**
225
- * Diagnostic helper. Returns true iff none of the identity headers this
226
- * provider trusts arrived on the request. The hook layer uses this on
227
- * `/login` misses to distinguish "proxy never reached us" from "proxy is
228
- * here but didn't recognise the user" so operators can tell silent
229
- * forward-auth misconfigurations apart from real allowlist gaps without
230
- * leaking the trusted header names to end users.
217
+ * True iff none of the identity headers this provider trusts arrived on
218
+ * the request. The hook layer uses this on `/login` misses to tell
219
+ * "proxy never reached us" apart from "proxy is here but didn't recognise
220
+ * the user", without leaking the trusted header names to end users.
231
221
  */
232
222
  hasNoIdentityHeaders(headers: Headers): boolean;
233
- /**
234
- * Diagnostic helper. Returns the identity-header names this provider is
235
- * configured to read. Used purely for log output — never surfaced to end
236
- * users.
237
- */
223
+ /** Identity-header names this provider reads. Log output only, never surfaced to end users. */
238
224
  readonly configuredHeaderNames: readonly string[];
239
225
  }
240
226
  /**
@@ -242,8 +228,8 @@ export interface IProxyAuth {
242
228
  * in `IUserProfileStore`, platform permissions in `IPlatformPermissionStore`,
243
229
  * password ops in optional `passwordAuth`, OAuth in optional `oauth`.
244
230
  *
245
- * Methods here do NOT take a `RequestContext` — the provider produces the
246
- * identity used to *build* the context.
231
+ * Methods here don't take a `RequestContext` — the provider produces the
232
+ * identity used to build the context, not the other way around.
247
233
  */
248
234
  export interface IAuthProvider {
249
235
  /** Display name shown in admin UI (e.g. "Local", "Microsoft Entra ID"). */
@@ -265,38 +251,35 @@ export interface IAuthProvider {
265
251
  readonly emailLink?: IEmailLinkAuth;
266
252
  /**
267
253
  * Present for providers that derive identity from a trusted upstream
268
- * proxy (forward-auth headers, mTLS, etc.). Undefined for credential
269
- * or OIDC-broker providers. See `IProxyAuth` for the trust contract.
254
+ * proxy (forward-auth headers, mTLS, etc.). Undefined for credential or
255
+ * OIDC-broker providers. See `IProxyAuth` for the trust contract.
270
256
  *
271
- * When set, the platform treats sign-out as the proxy/IdP's job and
272
- * does not render a logout button — Selva has no session to destroy.
257
+ * When set, the platform treats sign-out as the proxy/IdP's job and skips
258
+ * the logout button — Selva has no session to destroy.
273
259
  */
274
260
  readonly proxyAuth?: IProxyAuth;
275
- /**
276
- * Verify a token (session cookie, JWT, ID token, etc.). Returns the user
277
- * or null when invalid/expired.
278
- */
261
+ /** Verify a token (session cookie, JWT, ID token, etc.); null if invalid or expired. */
279
262
  verifyToken(token: string): Promise<AuthUser | null>;
280
263
  getUser(id: string): Promise<AuthUser | null>;
281
264
  /** Returns null if the provider does not support user management. */
282
265
  listUsers(opts?: ListOptions): Promise<Page<AuthUser> | null>;
283
266
  /**
284
- * Optional: allowlist a user without a password (OAuth providers). Pure
285
- * identity — callers grant permissions via `IPlatformPermissionStore.set`.
267
+ * Allowlist a user without a password (OAuth providers). Callers grant
268
+ * permissions via `IPlatformPermissionStore.set`.
286
269
  */
287
270
  createUser?(email: string): Promise<AuthUser>;
288
271
  /**
289
- * Delete a user identity. The sole-`instance_admin` invariant is NOT
290
- * enforced here — callers MUST consult
272
+ * Delete a user identity. Callers must consult
291
273
  * `IPlatformPermissionStore.countInstanceAdminsExcluding(id)` first and
292
- * surface `'last_admin'` themselves.
274
+ * surface `'last_admin'` themselves — the sole-`instance_admin` invariant
275
+ * isn't enforced here.
293
276
  */
294
277
  deleteUser(id: string): Promise<UserManagementResult>;
295
278
  /**
296
- * Disable a user. Identity is preserved (preferred over deletion). Same
279
+ * Disable a user, preserving identity (preferred over deletion). Same
297
280
  * invariant rules as `deleteUser`.
298
281
  *
299
- * Existing sessions are NOT guaranteed to stop working the instant this
282
+ * Existing sessions aren't guaranteed to stop working the instant this
300
283
  * returns — adapters that verify tokens locally may keep accepting an
301
284
  * already-issued access token until their next revalidation (the Supabase
302
285
  * adapter bounds this by `revalidateMs`, default 60s). Callers needing
@@ -304,8 +287,8 @@ export interface IAuthProvider {
304
287
  */
305
288
  disableUser(id: string): Promise<UserManagementResult>;
306
289
  /**
307
- * Stamp `lastLoginAt`. Best-effort — failure MUST NOT block auth.
308
- * Adapters MAY debounce (e.g. skip if existing timestamp < 60s old).
290
+ * Stamp `lastLoginAt`. Best-effort — failure must not block auth. Adapters
291
+ * may debounce (e.g. skip if the existing timestamp is under 60s old).
309
292
  */
310
293
  touchLastLogin?(id: string): Promise<void>;
311
294
  }
@@ -1 +1 @@
1
- {"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../src/auth/interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAC9E,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE1D;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC7B;;;OAGG;IACH,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAEnE;;;OAGG;IACH,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAE3E,iFAAiF;IACjF,YAAY,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;CACzE;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,UAAU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MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEtD;;;;;;;;;OASG;IACH,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEvD;;;OAGG;IACH,cAAc,CAAC,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3C"}
@@ -21,10 +21,7 @@ export interface AuthUser {
21
21
  * - `last_admin` — refused; would leave zero `instance_admin` users
22
22
  */
23
23
  export type UserManagementResult = 'ok' | 'not_found' | 'not_supported' | 'last_admin';
24
- /**
25
- * - `success` — credentials valid; includes session token the provider minted.
26
- * - `failed` — credentials invalid, user disabled, or rate-limited.
27
- */
24
+ /** `success` includes the session token the provider minted. */
28
25
  export type LoginResult = {
29
26
  kind: 'success';
30
27
  user: AuthUser;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/auth/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,QAAQ;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kFAAkF;IAClF,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,IAAI,GAAG,WAAW,GAAG,eAAe,GAAG,YAAY,CAAC;AAEvF;;;GAGG;AACH,MAAM,MAAM,WAAW,GACpB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,GACzD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,CAAC,EAAE,qBAAqB,GAAG,UAAU,GAAG,cAAc,CAAA;CAAE,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/auth/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,QAAQ;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kFAAkF;IAClF,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,IAAI,GAAG,WAAW,GAAG,eAAe,GAAG,YAAY,CAAC;AAEvF,gEAAgE;AAChE,MAAM,MAAM,WAAW,GACpB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,GACzD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,CAAC,EAAE,qBAAqB,GAAG,UAAU,GAAG,cAAc,CAAA;CAAE,CAAC"}
@@ -3,49 +3,36 @@
3
3
  * in the schema. The host (selva app or a fork) supplies an implementation;
4
4
  * the platform stays domain-agnostic.
5
5
  *
6
- * Keys are opaque strings. The host defines the namespace
7
- * (e.g. 'capture.geometry', 'parcel.boundary') and the resolver interprets it
8
- * however it likes — typically as an address into the host's own domain store.
9
- *
10
- * Status: preliminary. The interface is expected to refine once we wire a
11
- * real binding end-to-end (see docs/upstream-binding-prep PR plan). Current
12
- * shape is the minimum needed to slot a host implementation behind
13
- * `SelvaConfig.bindingResolver`.
6
+ * Keys are opaque strings namespaced by the host (e.g. 'capture.geometry',
7
+ * 'parcel.boundary') and interpreted however it likes — typically as an
8
+ * address into the host's own domain store.
14
9
  */
15
10
  import type { RequestContext } from '../context.js';
16
11
  export interface IBindingResolver {
17
12
  /**
18
- * Resolve a batch of bound keys in one call.
19
- *
20
- * - `keys` is what the schema author wrote (`source.key`) — opaque to the
21
- * platform, interpreted by the resolver. The author writes keys at
22
- * design time, so the key should describe WHAT attribute to read, not
23
- * WHICH entity to read it from.
24
- * - `scope` is set by the calling route at solve time — opaque to the
25
- * platform, supplies the "which entity" anchor that varies per
26
- * request (capture id, parcel id, custom struct). Optional because
27
- * not every host needs it.
13
+ * Resolves a batch of bound keys in one call.
28
14
  *
29
- * Implementations should return ONLY the keys they successfully
30
- * resolved absent entries in the returned map signal "missing" to the
31
- * caller, who then decides what to do (e.g. error the solve, or fall back
32
- * to the input's `default`).
15
+ * `keys` is what the schema author wrote (`source.key`) — describes WHAT
16
+ * attribute to read, not WHICH entity. `scope` is set by the calling
17
+ * route at solve time and supplies the "which entity" anchor that varies
18
+ * per request (capture id, parcel id, custom struct); optional because
19
+ * not every host needs it.
33
20
  *
34
- * Do not throw for individual missing keys. Throw only for resolver-wide
35
- * failures (DB unreachable, configuration error). Per-key "not found" is
36
- * normal and is signalled by omitting the entry.
21
+ * Return only the keys that resolved successfully an absent entry
22
+ * signals "missing" to the caller, which then errors the solve or falls
23
+ * back to the input's `default`. Throw only for resolver-wide failures
24
+ * (DB unreachable, configuration error); a missing individual key is not
25
+ * an error condition.
37
26
  *
38
- * Batching is intentional: a single solve often binds multiple inputs
39
- * from one domain object, and the resolver should be able to do that
40
- * with a single DB round-trip.
27
+ * Batched because a single solve often binds multiple inputs from one
28
+ * domain object, and the resolver should do that in one DB round-trip.
41
29
  */
42
30
  resolve(ctx: RequestContext, keys: readonly string[], scope?: unknown): Promise<Map<string, unknown>>;
43
31
  }
44
32
  /**
45
- * Default resolver used when the host hasn't configured one. Returns an
46
- * empty map for any request, which makes every bound input fail at solve
47
- * time — a loud signal that a resolver needs to be wired up. Drop-in replace
48
- * via `SelvaConfig.bindingResolver` once the host has a real implementation.
33
+ * Default resolver for when the host hasn't configured one. Returns an
34
+ * empty map for any request, so every bound input fails at solve time —
35
+ * a loud signal that a resolver needs wiring up.
49
36
  */
50
37
  export declare class NoopBindingResolver implements IBindingResolver {
51
38
  resolve(): Promise<Map<string, unknown>>;
@@ -1 +1 @@
1
- {"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../src/bindings/interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,MAAM,WAAW,gBAAgB;IAChC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,OAAO,CACN,GAAG,EAAE,cAAc,EACnB,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,KAAK,CAAC,EAAE,OAAO,GACb,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACjC;AAED;;;;;GAKG;AACH,qBAAa,mBAAoB,YAAW,gBAAgB;IACrD,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAG9C"}
1
+ {"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../src/bindings/interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,MAAM,WAAW,gBAAgB;IAChC;;;;;;;;;;;;;;;;;OAiBG;IACH,OAAO,CACN,GAAG,EAAE,cAAc,EACnB,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,KAAK,CAAC,EAAE,OAAO,GACb,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACjC;AAED;;;;GAIG;AACH,qBAAa,mBAAoB,YAAW,gBAAgB;IACrD,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAG9C"}
@@ -3,20 +3,14 @@
3
3
  * in the schema. The host (selva app or a fork) supplies an implementation;
4
4
  * the platform stays domain-agnostic.
5
5
  *
6
- * Keys are opaque strings. The host defines the namespace
7
- * (e.g. 'capture.geometry', 'parcel.boundary') and the resolver interprets it
8
- * however it likes — typically as an address into the host's own domain store.
9
- *
10
- * Status: preliminary. The interface is expected to refine once we wire a
11
- * real binding end-to-end (see docs/upstream-binding-prep PR plan). Current
12
- * shape is the minimum needed to slot a host implementation behind
13
- * `SelvaConfig.bindingResolver`.
6
+ * Keys are opaque strings namespaced by the host (e.g. 'capture.geometry',
7
+ * 'parcel.boundary') and interpreted however it likes — typically as an
8
+ * address into the host's own domain store.
14
9
  */
15
10
  /**
16
- * Default resolver used when the host hasn't configured one. Returns an
17
- * empty map for any request, which makes every bound input fail at solve
18
- * time — a loud signal that a resolver needs to be wired up. Drop-in replace
19
- * via `SelvaConfig.bindingResolver` once the host has a real implementation.
11
+ * Default resolver for when the host hasn't configured one. Returns an
12
+ * empty map for any request, so every bound input fails at solve time —
13
+ * a loud signal that a resolver needs wiring up.
20
14
  */
21
15
  export class NoopBindingResolver {
22
16
  async resolve() {
@@ -1 +1 @@
1
- {"version":3,"file":"interface.js","sourceRoot":"","sources":["../../src/bindings/interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAqCH;;;;;GAKG;AACH,MAAM,OAAO,mBAAmB;IAC/B,KAAK,CAAC,OAAO;QACZ,OAAO,IAAI,GAAG,EAAE,CAAC;IAClB,CAAC;CACD"}
1
+ {"version":3,"file":"interface.js","sourceRoot":"","sources":["../../src/bindings/interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA8BH;;;;GAIG;AACH,MAAM,OAAO,mBAAmB;IAC/B,KAAK,CAAC,OAAO;QACZ,OAAO,IAAI,GAAG,EAAE,CAAC;IAClB,CAAC;CACD"}