@jskit-ai/agent-docs 0.1.317 → 0.1.319

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 (24) hide show
  1. package/guide/agent/app-setup/authentication.md +35 -3
  2. package/guide/agent/app-setup/multi-homing.md +24 -7
  3. package/guide/agent/framework/data-access.md +4 -1
  4. package/package.json +1 -1
  5. package/patterns/minimal-foundation/example/package.json +1 -1
  6. package/patterns/shell-foundation/example/package.json +1 -1
  7. package/reference/autogen/PATTERN_INDEX.md +16 -16
  8. package/reference/autogen/packages/auth-core.md +1 -0
  9. package/reference/autogen/packages/auth-provider-local-core.md +4 -4
  10. package/reference/autogen/packages/auth-provider-oidc-core.md +1 -1
  11. package/reference/autogen/packages/http-web.md +2 -0
  12. package/skills/jskit/references/data-access.md +4 -1
  13. package/skills/jskit/references/heuristics/live-actions.md +5 -0
  14. package/skills/jskit/references/heuristics/server-search.md +1 -1
  15. package/skills/jskit/references/multi-homing.md +24 -7
  16. package/skills/jskit/references/pattern-index.md +16 -16
  17. package/skills/jskit/references/patterns/app/minimal-foundation/example/package.json +1 -1
  18. package/skills/jskit/references/patterns/app/shell-foundation/example/package.json +1 -1
  19. package/skills/jskit/references/patterns/auth/accounts-hub/example/package.json +1 -1
  20. package/skills/jskit/references/patterns/auth/oidc-sign-in/example/package.json +2 -2
  21. package/skills/jskit/references/patterns/auth/supabase-auth/example/package.json +1 -1
  22. package/skills/jskit/references/patterns/crud/crud-feature-package/example/packages/books/package.json +1 -1
  23. package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users/package.json +2 -2
  24. package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users-workspace/package.json +3 -3
@@ -163,6 +163,36 @@ sign-in factor, and at least 8 when it is used with another factor; set
163
163
 
164
164
  The login page shows either refusal, translated, with the wait.
165
165
 
166
+ ## Sign-in cookies and SameSite
167
+
168
+ Local auth's cookies (access, refresh, recovery and OAuth attempt) and
169
+ auth-core's CSRF cookie are httpOnly, at `Path=/`, and in production Secure
170
+ with the `__Host-` prefix. One setting gives them all their SameSite:
171
+
172
+ | Env | Default | Meaning |
173
+ | --- | --- | --- |
174
+ | `AUTH_COOKIE_SAME_SITE` | `lax` | `lax` or `strict`, letter case and spaces aside. Any other value, `none` included, stops startup, naming the setting. |
175
+
176
+ `lax` sends the cookies with a top-level navigation that another site starts,
177
+ such as a link in a webmail page; `strict` keeps them off every request
178
+ another site starts. A site is the scheme and registrable domain, so
179
+ applications on sibling subdomains of one registrable domain are one site and
180
+ their requests carry the cookies either way; the `__Host-` prefix is what
181
+ stops a sibling from setting them.
182
+
183
+ With `strict`, a page opened from another site loads without the cookies, and
184
+ its own requests then carry them, so it shows the person signed in. An
185
+ application's JSKIT server sends every page the same, whatever its cookies;
186
+ only `/api` requests read the session. Sign-in through Google, Microsoft or
187
+ GitHub keeps working: the provider's cross-site return to `/auth/login` only
188
+ loads the login page, and the attempt cookie is read by that page's own
189
+ `POST /api/oauth/complete`, a same-origin request, which carries Strict
190
+ cookies. What `strict` does change: an `/api` GET route that a link on another
191
+ site opens directly, such as a download, gets no session.
192
+
193
+ With the Supabase or OIDC provider the setting applies to the CSRF cookie only;
194
+ those providers' own cookies stay `Lax`.
195
+
166
196
  ## Second factor (local auth)
167
197
 
168
198
  Local auth offers a second factor: codes from an authenticator app (TOTP,
@@ -590,9 +620,11 @@ Security behavior:
590
620
  - The authorization-code flow uses PKCE (`S256`) and `state`, plus `nonce` for
591
621
  OpenID Connect. The attempt is stored server-side, in the file store or the
592
622
  `auth_local_oauth_attempts` table, under the hash of a random httpOnly
593
- `jskit_local_oauth_attempt` cookie (`__Host-` in production), so it completes
594
- only in the starting browser and works across several servers. It is deleted
595
- when used and expires after ten minutes.
623
+ `jskit_local_oauth_attempt` cookie (`__Host-` in production, SameSite from
624
+ `AUTH_COOKIE_SAME_SITE`; see
625
+ [Sign-in cookies and SameSite](#sign-in-cookies-and-samesite)), so it
626
+ completes only in the starting browser and works across several servers. It
627
+ is deleted when used and expires after ten minutes.
596
628
  - ID tokens are verified against the provider's JWKS: signature, issuer,
597
629
  audience, expiry and nonce.
598
630
  - Only a verified email signs in: Google's `email_verified`, GitHub's primary
@@ -229,16 +229,22 @@ capability from one of the application's providers. Without one, invitations
229
229
  are still created and delivery reports `mailer_unconfigured`. After **Send
230
230
  invite**, the Members panel's notice follows the delivery status: `sent` says
231
231
  the invite was sent; `simulated` (a test copy, whose `SIDE_EFFECTS` is not
232
- `live`) and `mailer_unconfigured` say no email was sent; `failed` is a warning
233
- that the email failed. Each of those three points to the invite link, which
234
- the panel shows under the form with its **Copy** button. A status the panel
235
- does not know says only that the invite was created. The mailer, typed
232
+ `live`) and `mailer_unconfigured` say no email was sent; `held` says email
233
+ isn't set up yet, so the invite will be sent once it is; `failed` is a warning
234
+ that the email failed. Each of those four points to the invite link, which
235
+ the panel shows under the form with its **Copy** button. For a status the
236
+ panel does not know, it shows the delivery result's own `message` (in the
237
+ person's language when its `messageCode` has a translation), and without one
238
+ says only that the invite was created. The mailer, typed
236
239
  `WorkspaceInviteMailer` in `@jskit-ai/workspaces-core/server/types`, is an
237
240
  object whose `sendWorkspaceInvite(message, options)` receives `{ inviteId,
238
241
  email, inviteUrl, workspace, inviter, roleSid, expiresAt, locale, message }`,
239
- where the inner `message` is the rendered `{ subject, text, html }`. `inviteId`
240
- is the saved invitation's id and `workspace.id` its workspace's, so a mailer
241
- that holds email until delivery is set up can record which invitation each one
242
+ where the inner `message` is the rendered `{ subject, text, html }`, and
243
+ answers `{ status, message, messageCode, messageParams, providerMessageId }`
244
+ (every field optional; the status defaults to `sent`). A mailer that holds
245
+ email until the application's email is set up, and sends it then, answers
246
+ `status: "held"`. `inviteId` is the saved invitation's id and `workspace.id`
247
+ its workspace's, so such a mailer can record which invitation each email
242
248
  belongs to without reading `workspace_invites`:
243
249
 
244
250
  ```js
@@ -340,6 +346,13 @@ before removing or renaming a reported grant, search the code for it
340
346
  such as `crud.${resource}.list`). If the application checks it, list it in
341
347
  `customPermissions`; remove the grant only when nothing uses it.
342
348
 
349
+ In the browser, a command names the permission it needs as
350
+ `useCommand({ runPermissions })`. While the person lacks it, the command's
351
+ `canRun` is false and `run()` sends nothing: it shows the notice the server's
352
+ refusal shows (a 403 `ACTION_PERMISSION_DENIED`, "Forbidden.") through the
353
+ command's feedback, and resolves `null`. Hide or disable the control from
354
+ `canRun`, so the notice is the exception.
355
+
343
356
  ## Role display labels
344
357
 
345
358
  Set optional `label` strings in the existing `roleCatalog.roles` definitions,
@@ -591,6 +604,10 @@ The route slug, selected workspace, query keys, and server scope stay aligned.
591
604
  Invalid workspace URLs show a deliberate not-found/forbidden state instead of
592
605
  silently selecting another workspace. The browser waits for the server's answer
593
606
  about an unknown slug before deciding, so the surface can show that state.
607
+ The bootstrap answer, which carries the workspace and the person's permissions
608
+ in it, belongs to the workspace, not to a page: it still applies when the
609
+ person has moved to another page of the same workspace before it arrives, and a
610
+ move to another workspace asks again.
594
611
 
595
612
  ### Surfaces and where `/` lands
596
613
 
@@ -1100,7 +1100,10 @@ then narrowed is also wrong, since the row wanted can sit past it.
1100
1100
  it.
1101
1101
  - A CRUD list refuses a query key it does not take with a 400
1102
1102
  (`crud.query.undeclaredKeys`). A list filter is declared in the feature's
1103
- `listFilterQueryValidator` and the resource's searchSchema.
1103
+ `listFilterQueryValidator` and the resource's searchSchema. The person sees
1104
+ only that nothing was loaded and to reload or tell support, with no Retry;
1105
+ the keys refused, the keys the list takes and how to declare one are in the
1106
+ server log, as a warning, and in the error's `details`.
1104
1107
  - Prove a capped read with a test that seeds past the cap and makes the row
1105
1108
  the cap leaves out (the oldest, for a newest-first read) the one that
1106
1109
  matches: the read that asks for it finds it; a read narrowed in code does
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jskit-ai/agent-docs",
3
- "version": "0.1.317",
3
+ "version": "0.1.319",
4
4
  "description": "Distributed JSKIT agent references, prompts, guides, and generated reference maps.",
5
5
  "type": "module",
6
6
  "files": [
@@ -50,7 +50,7 @@
50
50
  },
51
51
  "devDependencies": {
52
52
  "@jskit-ai/config-eslint": "0.1.251",
53
- "@jskit-ai/jskit-catalog": "0.2.69",
53
+ "@jskit-ai/jskit-catalog": "0.2.71",
54
54
  "@playwright/test": "1.61.1",
55
55
  "@vitejs/plugin-vue": "^6.0.7",
56
56
  "eslint": "^10.8.0",
@@ -51,7 +51,7 @@
51
51
  },
52
52
  "devDependencies": {
53
53
  "@jskit-ai/config-eslint": "0.1.251",
54
- "@jskit-ai/jskit-catalog": "0.2.69",
54
+ "@jskit-ai/jskit-catalog": "0.2.71",
55
55
  "@playwright/test": "1.61.1",
56
56
  "@vitejs/plugin-vue": "^6.0.7",
57
57
  "eslint": "^10.8.0",
@@ -15,7 +15,7 @@ A concrete Fastify, Vue, and JSKIT application foundation for products that do n
15
15
 
16
16
  - Id: `app/minimal-foundation`
17
17
  - Keywords: `app`, `fastify`, `foundation`, `minimal`, `server`, `vite`, `vue`
18
- - Owner: `@jskit-ai/agent-docs@0.1.317`
18
+ - Owner: `@jskit-ai/agent-docs@0.1.319`
19
19
  - Read: [PATTERN.md](../../skills/jskit/references/patterns/app/minimal-foundation/PATTERN.md)
20
20
  - Examples: [example/](../../skills/jskit/references/patterns/app/minimal-foundation/example/)
21
21
  - Requires: `@jskit-ai/http-runtime`, `@jskit-ai/kernel`
@@ -26,7 +26,7 @@ A concrete JSKIT web application foundation with responsive shell navigation, se
26
26
 
27
27
  - Id: `app/shell-foundation`
28
28
  - Keywords: `app`, `foundation`, `material`, `navigation`, `placements`, `shell`, `vite`, `vue`
29
- - Owner: `@jskit-ai/agent-docs@0.1.317`
29
+ - Owner: `@jskit-ai/agent-docs@0.1.319`
30
30
  - Read: [PATTERN.md](../../skills/jskit/references/patterns/app/shell-foundation/PATTERN.md)
31
31
  - Examples: [example/](../../skills/jskit/references/patterns/app/shell-foundation/example/)
32
32
  - Requires: `@jskit-ai/http-runtime`, `@jskit-ai/kernel`, `@jskit-ai/shell-web`
@@ -37,7 +37,7 @@ Configure an assistant runtime for one application surface and expose its chat a
37
37
 
38
38
  - Id: `assistant/assistant-surface`
39
39
  - Keywords: `ai`, `assistant`, `chat`, `config`, `environment`, `page`, `placement`, `settings`, `surface`
40
- - Owner: `@jskit-ai/assistant-runtime@0.2.58`
40
+ - Owner: `@jskit-ai/assistant-runtime@0.2.59`
41
41
  - Read: [PATTERN.md](../../skills/jskit/references/patterns/assistant/assistant-surface/PATTERN.md)
42
42
  - Examples: [example/](../../skills/jskit/references/patterns/assistant/assistant-surface/example/)
43
43
  - Requires: `@jskit-ai/assistant-runtime`, `@jskit-ai/connectors-catalog`, `@jskit-ai/connectors-core`, `@jskit-ai/shell-web`
@@ -48,7 +48,7 @@ Run one OpenID Connect sign-in for all of an owner's apps as its own JSKIT proje
48
48
 
49
49
  - Id: `auth/accounts-hub`
50
50
  - Keywords: `accounts hub`, `auth`, `authentication`, `issuer`, `master login`, `oidc`, `openid connect`, `single sign-on`, `sso`
51
- - Owner: `@jskit-ai/oidc-issuer-core@0.1.32`
51
+ - Owner: `@jskit-ai/oidc-issuer-core@0.1.34`
52
52
  - Read: [PATTERN.md](../../skills/jskit/references/patterns/auth/accounts-hub/PATTERN.md)
53
53
  - Examples: [example/](../../skills/jskit/references/patterns/auth/accounts-hub/example/)
54
54
  - Requires: `@jskit-ai/oidc-issuer-core`
@@ -59,7 +59,7 @@ Compose JSKIT authentication routes, views, profile controls, and public surface
59
59
 
60
60
  - Id: `auth/auth-surface`
61
61
  - Keywords: `account`, `auth`, `login`, `logout`, `password`, `placement`, `profile`, `reset`, `surface`
62
- - Owner: `@jskit-ai/auth-web@0.2.34`
62
+ - Owner: `@jskit-ai/auth-web@0.2.35`
63
63
  - Read: [PATTERN.md](../../skills/jskit/references/patterns/auth/auth-surface/PATTERN.md)
64
64
  - Examples: [example/](../../skills/jskit/references/patterns/auth/auth-surface/example/)
65
65
  - Requires: `@jskit-ai/auth-core`, `@jskit-ai/auth-web`, `@jskit-ai/shell-web`
@@ -70,7 +70,7 @@ Let people sign in with the accounts they already have in an accounts hub or ano
70
70
 
71
71
  - Id: `auth/oidc-sign-in`
72
72
  - Keywords: `accounts hub`, `auth`, `authentication`, `back-channel logout`, `dynamic client registration`, `issuer`, `master login`, `oidc`, `openid connect`, `single sign-on`, `sso`
73
- - Owner: `@jskit-ai/auth-provider-oidc-core@0.2.37`
73
+ - Owner: `@jskit-ai/auth-provider-oidc-core@0.2.39`
74
74
  - Read: [PATTERN.md](../../skills/jskit/references/patterns/auth/oidc-sign-in/PATTERN.md)
75
75
  - Examples: [example/](../../skills/jskit/references/patterns/auth/oidc-sign-in/example/)
76
76
  - Requires: `@jskit-ai/auth-provider-oidc-core`, `@jskit-ai/auth-web`
@@ -81,7 +81,7 @@ Add Supabase authentication through normal npm composition, explicit environment
81
81
 
82
82
  - Id: `auth/supabase-auth`
83
83
  - Keywords: `auth`, `authentication`, `oauth`, `sessions`, `supabase`
84
- - Owner: `@jskit-ai/auth-provider-supabase-core@0.2.25`
84
+ - Owner: `@jskit-ai/auth-provider-supabase-core@0.2.26`
85
85
  - Read: [PATTERN.md](../../skills/jskit/references/patterns/auth/supabase-auth/PATTERN.md)
86
86
  - Examples: [example/](../../skills/jskit/references/patterns/auth/supabase-auth/example/)
87
87
  - Requires: `@jskit-ai/auth-provider-supabase-core`
@@ -246,7 +246,7 @@ Add a protected administration surface, settings shell, and semantic navigation
246
246
 
247
247
  - Id: `console/console-surface`
248
248
  - Keywords: `admin`, `console`, `navigation`, `owner`, `placement`, `settings`, `surface`
249
- - Owner: `@jskit-ai/console-web@0.1.265`
249
+ - Owner: `@jskit-ai/console-web@0.1.267`
250
250
  - Read: [PATTERN.md](../../skills/jskit/references/patterns/console/console-surface/PATTERN.md)
251
251
  - Examples: [example/](../../skills/jskit/references/patterns/console/console-surface/example/)
252
252
  - Requires: `@jskit-ai/console-core`, `@jskit-ai/console-web`, `@jskit-ai/shell-web`
@@ -268,7 +268,7 @@ Build a complete application-owned CRUD server package from a migration, a table
268
268
 
269
269
  - Id: `crud/crud-feature-package`
270
270
  - Keywords: `actions`, `crud`, `database`, `defineCrudFeature`, `json-api`, `migration`, `owns`, `permissions`, `repository`, `routes`, `service`, `table resource`
271
- - Owner: `@jskit-ai/crud-core@0.2.32`
271
+ - Owner: `@jskit-ai/crud-core@0.2.33`
272
272
  - Read: [PATTERN.md](../../skills/jskit/references/patterns/crud/crud-feature-package/PATTERN.md)
273
273
  - Examples: [example/](../../skills/jskit/references/patterns/crud/crud-feature-package/example/)
274
274
  - Requires: `@jskit-ai/crud-core`, `@jskit-ai/resource-core`, `@jskit-ai/resource-crud-core`
@@ -279,7 +279,7 @@ Build a routed CRUD user interface as thin application pages over JSKIT's shared
279
279
 
280
280
  - Id: `crud/crud-screen-set`
281
281
  - Keywords: `actions`, `add`, `crud`, `delete`, `edit`, `filters`, `list`, `material`, `routes`, `view`, `vue`
282
- - Owner: `@jskit-ai/http-web@0.2.37`
282
+ - Owner: `@jskit-ai/http-web@0.2.38`
283
283
  - Read: [PATTERN.md](../../skills/jskit/references/patterns/crud/crud-screen-set/PATTERN.md)
284
284
  - Examples: [example/](../../skills/jskit/references/patterns/crud/crud-screen-set/example/)
285
285
  - Requires: `@jskit-ai/http-web`, `@jskit-ai/resource-core`, `@jskit-ai/resource-crud-core`
@@ -345,7 +345,7 @@ Compose application-owned Google Publisher Tag delivery with the generic rewarde
345
345
 
346
346
  - Id: `rewards/google-rewarded`
347
347
  - Keywords: `ads`, `google`, `publisher tag`, `rewarded`, `unlock`
348
- - Owner: `@jskit-ai/rewarded-web@0.2.42`
348
+ - Owner: `@jskit-ai/rewarded-web@0.2.44`
349
349
  - Read: [PATTERN.md](../../skills/jskit/references/patterns/rewards/google-rewarded/PATTERN.md)
350
350
  - Examples: [example/](../../skills/jskit/references/patterns/rewards/google-rewarded/example/)
351
351
  - Requires: `@jskit-ai/rewarded-web`
@@ -356,7 +356,7 @@ Define a server feature through explicit capabilities and first-class actions, a
356
356
 
357
357
  - Id: `server/feature-package`
358
358
  - Keywords: `actions`, `aggregate`, `feature`, `handle`, `orchestration`, `owns`, `package`, `provider`, `repository`, `routes`, `server`, `table resource`
359
- - Owner: `@jskit-ai/agent-docs@0.1.317`
359
+ - Owner: `@jskit-ai/agent-docs@0.1.319`
360
360
  - Read: [PATTERN.md](../../skills/jskit/references/patterns/server/feature-package/PATTERN.md)
361
361
  - Examples: [example/](../../skills/jskit/references/patterns/server/feature-package/example/)
362
362
  - Requires: `@jskit-ai/kernel`
@@ -389,7 +389,7 @@ Compose an account settings route and profile, preference, notification, and sig
389
389
 
390
390
  - Id: `users/account-settings`
391
391
  - Keywords: `account`, `link provider`, `notifications`, `oauth`, `preferences`, `profile`, `settings`, `sign-in methods`, `user`, `vue`
392
- - Owner: `@jskit-ai/users-web@0.2.48`
392
+ - Owner: `@jskit-ai/users-web@0.2.50`
393
393
  - Read: [PATTERN.md](../../skills/jskit/references/patterns/users/account-settings/PATTERN.md)
394
394
  - Examples: [example/](../../skills/jskit/references/patterns/users/account-settings/example/)
395
395
  - Requires: `@jskit-ai/shell-web`, `@jskit-ai/users-core`, `@jskit-ai/users-web`
@@ -400,7 +400,7 @@ Expose user administration and workspace-scoped member operations through app-ow
400
400
 
401
401
  - Id: `users/user-administration-server`
402
402
  - Keywords: `account`, `admin`, `member`, `repository`, `resource`, `routes`, `service`, `user`, `workspace`
403
- - Owner: `@jskit-ai/users-core@0.2.36`
403
+ - Owner: `@jskit-ai/users-core@0.2.38`
404
404
  - Read: [PATTERN.md](../../skills/jskit/references/patterns/users/user-administration-server/PATTERN.md)
405
405
  - Examples: [example/](../../skills/jskit/references/patterns/users/user-administration-server/example/)
406
406
  - Requires: `@jskit-ai/crud-core`, `@jskit-ai/users-core`
@@ -411,7 +411,7 @@ Configure roles, workspace access policy, invitations, and app-owned invitation
411
411
 
412
412
  - Id: `workspaces/workspace-server`
413
413
  - Keywords: `access`, `invite`, `membership`, `multitenancy`, `policy`, `role`, `tenancy`, `workspace`
414
- - Owner: `@jskit-ai/workspaces-core@0.2.36`
414
+ - Owner: `@jskit-ai/workspaces-core@0.2.38`
415
415
  - Read: [PATTERN.md](../../skills/jskit/references/patterns/workspaces/workspace-server/PATTERN.md)
416
416
  - Examples: [example/](../../skills/jskit/references/patterns/workspaces/workspace-server/example/)
417
417
  - Requires: `@jskit-ai/users-core`, `@jskit-ai/workspaces-core`
@@ -422,7 +422,7 @@ Compose workspace selection, invitation, member administration, settings, and re
422
422
 
423
423
  - Id: `workspaces/workspace-surfaces`
424
424
  - Keywords: `admin`, `invite`, `member`, `navigation`, `settings`, `surface`, `switcher`, `workspace`
425
- - Owner: `@jskit-ai/workspaces-web@0.2.48`
425
+ - Owner: `@jskit-ai/workspaces-web@0.2.50`
426
426
  - Read: [PATTERN.md](../../skills/jskit/references/patterns/workspaces/workspace-surfaces/PATTERN.md)
427
427
  - Examples: [example/](../../skills/jskit/references/patterns/workspaces/workspace-surfaces/example/)
428
428
  - Requires: `@jskit-ai/shell-web`, `@jskit-ai/workspaces-core`, `@jskit-ai/workspaces-web`
@@ -254,6 +254,7 @@ Exports
254
254
  ### `src/server/utils.js`
255
255
  Exports
256
256
  - `hostOnlyCookieName(name, secure)`
257
+ - `resolveAuthCookieSameSite(env)`
257
258
  - `normalizeEmail(value)`
258
259
  - `normalizeOAuthIntent(value, { fallback = "login" } = {})`
259
260
  - `normalizeReturnToPath(value, { fallback = "/", allowedOrigins = [] } = {})`
@@ -222,13 +222,13 @@ Exports
222
222
 
223
223
  ### `src/server/lib/sessions.js`
224
224
  Exports
225
- - `cookieOptions(isProduction, maxAge)`
225
+ - `cookieOptions({ isProduction, cookieSameSite }, maxAge)`
226
226
  - `createLocalSessions({ appProfileProjection, backend, config, profileProjector })`
227
227
  - `safeRequestCookies(request)`
228
228
  Local functions
229
229
  - `nowSeconds()`
230
230
  - `unauthenticatedAuthResult(clearSession = false)`
231
- - `clearCookieOptions(isProduction)`
231
+ - `clearCookieOptions(config)`
232
232
  - `buildAccessToken({ user, session, secret, ttlSeconds = ACCESS_TTL_SECONDS })`
233
233
  - `buildSessionPayload({ user, session, refreshToken, secret })`
234
234
 
@@ -299,11 +299,11 @@ Exports
299
299
  - `APP_URL`
300
300
  - `ATTEMPT_COOKIE`
301
301
  - `approveAtProvider(service, { provider = "google", returnTo = "/home", cookies = {}, link = false } = {})`
302
- - `createService({ backend, oauthProviders, profileProjector, firstAccountSetup })`
302
+ - `createService({ backend, oauthProviders, profileProjector, firstAccountSetup, env = {} })`
303
303
  - `oidcProviderEntry(issuer, { id = "google", label = "Google" } = {})`
304
304
  - `sessionCookies(session)`
305
305
  - `startFakeGitHub({ user = { id: 4242, login: "ada", name: "Ada Lovelace" }, emails } = {})`
306
- - `startOidcProvider({ account } = {})`
306
+ - `startOidcProvider({ account, appUrl = APP_URL, consentPage = false } = {})`
307
307
  Local functions
308
308
  - `readBody(req)`
309
309
 
@@ -151,4 +151,4 @@ Exports
151
151
  - `ACCOUNT`
152
152
  - `REGISTRATION_TOKEN`
153
153
  - `followAuthorization(url, { redirectPrefix })`
154
- - `startMockIssuer({ blocked = false, account = ACCOUNT, staticClients = [] } = {})`
154
+ - `startMockIssuer({ blocked = false, account = ACCOUNT, staticClients = [], consentPage = false } = {})`
@@ -288,6 +288,8 @@ Local functions
288
288
  ### `src/client/composables/runtime/useCommandCore.js`
289
289
  Exports
290
290
  - `useCommandCore({ model, resource, writeMethod = "POST", canRun, fieldBag, feedback, input, buildRawPayload, buildCommandPayload, buildCommandOptions = emptyRecord, onRunSuccess, onRunError, suppressSuccessMessage = false, messages = {} })`
291
+ Local functions
292
+ - `permissionRefusal()`
291
293
 
292
294
  ### `src/client/composables/runtime/useEndpointResource.js`
293
295
  Exports
@@ -1095,7 +1095,10 @@ then narrowed is also wrong, since the row wanted can sit past it.
1095
1095
  it.
1096
1096
  - A CRUD list refuses a query key it does not take with a 400
1097
1097
  (`crud.query.undeclaredKeys`). A list filter is declared in the feature's
1098
- `listFilterQueryValidator` and the resource's searchSchema.
1098
+ `listFilterQueryValidator` and the resource's searchSchema. The person sees
1099
+ only that nothing was loaded and to reload or tell support, with no Retry;
1100
+ the keys refused, the keys the list takes and how to declare one are in the
1101
+ server log, as a warning, and in the error's `details`.
1099
1102
  - Prove a capped read with a test that seeds past the cap and makes the row
1100
1103
  the cap leaves out (the oldest, for a newest-first read) the one that
1101
1104
  matches: the read that asks for it finds it; a read narrowed in code does
@@ -15,6 +15,11 @@ Rules:
15
15
  - A `useCommand()` with `writeMethod: "DELETE"` sends its parsed input as the
16
16
  request body when it declares `input` or `buildRawPayload`, and no body when
17
17
  it declares neither; a route that validates a DELETE body needs one of them.
18
+ - A `useCommand()` whose `runPermissions` the person lacks has `canRun` false,
19
+ and its `run()` sends nothing: it shows the notice a server 403 shows
20
+ (`ACTION_PERMISSION_DENIED`, "Forbidden.") through the command's feedback and
21
+ resolves `null`. Hide or disable the control from `canRun` so that notice
22
+ stays the exception.
18
23
  - Prefer form runtimes such as `useCrudAddEdit()` or `useAddEdit()` for real forms.
19
24
  - Prefer `useCrudList()` and `useCrudView()` for routed CRUD loading and URL resolution.
20
25
  - For ordinary routed CRUD record deletion, start from the package-owned CRUD
@@ -243,7 +243,7 @@ owns: [{ resource: contactResource, rowPolicy: ownContactsOrShared }]
243
243
  - Put visibility in the owner's row policy, never in a search key or route query validation.
244
244
  - Do not expose a query key publicly just because the service maps to it internally.
245
245
  - Do not rely on route validators alone; a public key still needs a matching backend search definition.
246
- - A CRUD list refuses a query key its route does not declare with a 400 (`crud.query.undeclaredKeys`), so an undeclared filter fails loudly instead of answering every row.
246
+ - A CRUD list refuses a query key its route does not declare with a 400 (`crud.query.undeclaredKeys`), so an undeclared filter fails loudly instead of answering every row. The screen shows a plain sentence and no Retry; read the server log's warning (or the error's `details`) for the keys refused and the keys the list takes.
247
247
  - Never narrow the rows a read answered in code, and never search a list's loaded page in the browser: the filter goes in the read, and a picker or Search box sends `q` ([Narrow in the query](../data-access.md#narrow-in-the-query); `jskit/narrow-in-query`, `jskit/search-on-server`, and `jskit check`'s `data/search-q` for a lookup or list screen whose resource has no `searchSchema.q`).
248
248
 
249
249
  ## Quick Rule Of Thumb
@@ -229,16 +229,22 @@ capability from one of the application's providers. Without one, invitations
229
229
  are still created and delivery reports `mailer_unconfigured`. After **Send
230
230
  invite**, the Members panel's notice follows the delivery status: `sent` says
231
231
  the invite was sent; `simulated` (a test copy, whose `SIDE_EFFECTS` is not
232
- `live`) and `mailer_unconfigured` say no email was sent; `failed` is a warning
233
- that the email failed. Each of those three points to the invite link, which
234
- the panel shows under the form with its **Copy** button. A status the panel
235
- does not know says only that the invite was created. The mailer, typed
232
+ `live`) and `mailer_unconfigured` say no email was sent; `held` says email
233
+ isn't set up yet, so the invite will be sent once it is; `failed` is a warning
234
+ that the email failed. Each of those four points to the invite link, which
235
+ the panel shows under the form with its **Copy** button. For a status the
236
+ panel does not know, it shows the delivery result's own `message` (in the
237
+ person's language when its `messageCode` has a translation), and without one
238
+ says only that the invite was created. The mailer, typed
236
239
  `WorkspaceInviteMailer` in `@jskit-ai/workspaces-core/server/types`, is an
237
240
  object whose `sendWorkspaceInvite(message, options)` receives `{ inviteId,
238
241
  email, inviteUrl, workspace, inviter, roleSid, expiresAt, locale, message }`,
239
- where the inner `message` is the rendered `{ subject, text, html }`. `inviteId`
240
- is the saved invitation's id and `workspace.id` its workspace's, so a mailer
241
- that holds email until delivery is set up can record which invitation each one
242
+ where the inner `message` is the rendered `{ subject, text, html }`, and
243
+ answers `{ status, message, messageCode, messageParams, providerMessageId }`
244
+ (every field optional; the status defaults to `sent`). A mailer that holds
245
+ email until the application's email is set up, and sends it then, answers
246
+ `status: "held"`. `inviteId` is the saved invitation's id and `workspace.id`
247
+ its workspace's, so such a mailer can record which invitation each email
242
248
  belongs to without reading `workspace_invites`:
243
249
 
244
250
  ```js
@@ -340,6 +346,13 @@ before removing or renaming a reported grant, search the code for it
340
346
  such as `crud.${resource}.list`). If the application checks it, list it in
341
347
  `customPermissions`; remove the grant only when nothing uses it.
342
348
 
349
+ In the browser, a command names the permission it needs as
350
+ `useCommand({ runPermissions })`. While the person lacks it, the command's
351
+ `canRun` is false and `run()` sends nothing: it shows the notice the server's
352
+ refusal shows (a 403 `ACTION_PERMISSION_DENIED`, "Forbidden.") through the
353
+ command's feedback, and resolves `null`. Hide or disable the control from
354
+ `canRun`, so the notice is the exception.
355
+
343
356
  ## Role display labels
344
357
 
345
358
  Set optional `label` strings in the existing `roleCatalog.roles` definitions,
@@ -591,6 +604,10 @@ The route slug, selected workspace, query keys, and server scope stay aligned.
591
604
  Invalid workspace URLs show a deliberate not-found/forbidden state instead of
592
605
  silently selecting another workspace. The browser waits for the server's answer
593
606
  about an unknown slug before deciding, so the surface can show that state.
607
+ The bootstrap answer, which carries the workspace and the person's permissions
608
+ in it, belongs to the workspace, not to a page: it still applies when the
609
+ person has moved to another page of the same workspace before it arrives, and a
610
+ move to another workspace asks again.
594
611
 
595
612
  ### Surfaces and where `/` lands
596
613
 
@@ -15,7 +15,7 @@ A concrete Fastify, Vue, and JSKIT application foundation for products that do n
15
15
 
16
16
  - Id: `app/minimal-foundation`
17
17
  - Keywords: `app`, `fastify`, `foundation`, `minimal`, `server`, `vite`, `vue`
18
- - Owner: `@jskit-ai/agent-docs@0.1.317`
18
+ - Owner: `@jskit-ai/agent-docs@0.1.319`
19
19
  - Read: [PATTERN.md](patterns/app/minimal-foundation/PATTERN.md)
20
20
  - Examples: [example/](patterns/app/minimal-foundation/example/)
21
21
  - Requires: `@jskit-ai/http-runtime`, `@jskit-ai/kernel`
@@ -26,7 +26,7 @@ A concrete JSKIT web application foundation with responsive shell navigation, se
26
26
 
27
27
  - Id: `app/shell-foundation`
28
28
  - Keywords: `app`, `foundation`, `material`, `navigation`, `placements`, `shell`, `vite`, `vue`
29
- - Owner: `@jskit-ai/agent-docs@0.1.317`
29
+ - Owner: `@jskit-ai/agent-docs@0.1.319`
30
30
  - Read: [PATTERN.md](patterns/app/shell-foundation/PATTERN.md)
31
31
  - Examples: [example/](patterns/app/shell-foundation/example/)
32
32
  - Requires: `@jskit-ai/http-runtime`, `@jskit-ai/kernel`, `@jskit-ai/shell-web`
@@ -37,7 +37,7 @@ Configure an assistant runtime for one application surface and expose its chat a
37
37
 
38
38
  - Id: `assistant/assistant-surface`
39
39
  - Keywords: `ai`, `assistant`, `chat`, `config`, `environment`, `page`, `placement`, `settings`, `surface`
40
- - Owner: `@jskit-ai/assistant-runtime@0.2.58`
40
+ - Owner: `@jskit-ai/assistant-runtime@0.2.59`
41
41
  - Read: [PATTERN.md](patterns/assistant/assistant-surface/PATTERN.md)
42
42
  - Examples: [example/](patterns/assistant/assistant-surface/example/)
43
43
  - Requires: `@jskit-ai/assistant-runtime`, `@jskit-ai/connectors-catalog`, `@jskit-ai/connectors-core`, `@jskit-ai/shell-web`
@@ -48,7 +48,7 @@ Run one OpenID Connect sign-in for all of an owner's apps as its own JSKIT proje
48
48
 
49
49
  - Id: `auth/accounts-hub`
50
50
  - Keywords: `accounts hub`, `auth`, `authentication`, `issuer`, `master login`, `oidc`, `openid connect`, `single sign-on`, `sso`
51
- - Owner: `@jskit-ai/oidc-issuer-core@0.1.32`
51
+ - Owner: `@jskit-ai/oidc-issuer-core@0.1.34`
52
52
  - Read: [PATTERN.md](patterns/auth/accounts-hub/PATTERN.md)
53
53
  - Examples: [example/](patterns/auth/accounts-hub/example/)
54
54
  - Requires: `@jskit-ai/oidc-issuer-core`
@@ -59,7 +59,7 @@ Compose JSKIT authentication routes, views, profile controls, and public surface
59
59
 
60
60
  - Id: `auth/auth-surface`
61
61
  - Keywords: `account`, `auth`, `login`, `logout`, `password`, `placement`, `profile`, `reset`, `surface`
62
- - Owner: `@jskit-ai/auth-web@0.2.34`
62
+ - Owner: `@jskit-ai/auth-web@0.2.35`
63
63
  - Read: [PATTERN.md](patterns/auth/auth-surface/PATTERN.md)
64
64
  - Examples: [example/](patterns/auth/auth-surface/example/)
65
65
  - Requires: `@jskit-ai/auth-core`, `@jskit-ai/auth-web`, `@jskit-ai/shell-web`
@@ -70,7 +70,7 @@ Let people sign in with the accounts they already have in an accounts hub or ano
70
70
 
71
71
  - Id: `auth/oidc-sign-in`
72
72
  - Keywords: `accounts hub`, `auth`, `authentication`, `back-channel logout`, `dynamic client registration`, `issuer`, `master login`, `oidc`, `openid connect`, `single sign-on`, `sso`
73
- - Owner: `@jskit-ai/auth-provider-oidc-core@0.2.37`
73
+ - Owner: `@jskit-ai/auth-provider-oidc-core@0.2.39`
74
74
  - Read: [PATTERN.md](patterns/auth/oidc-sign-in/PATTERN.md)
75
75
  - Examples: [example/](patterns/auth/oidc-sign-in/example/)
76
76
  - Requires: `@jskit-ai/auth-provider-oidc-core`, `@jskit-ai/auth-web`
@@ -81,7 +81,7 @@ Add Supabase authentication through normal npm composition, explicit environment
81
81
 
82
82
  - Id: `auth/supabase-auth`
83
83
  - Keywords: `auth`, `authentication`, `oauth`, `sessions`, `supabase`
84
- - Owner: `@jskit-ai/auth-provider-supabase-core@0.2.25`
84
+ - Owner: `@jskit-ai/auth-provider-supabase-core@0.2.26`
85
85
  - Read: [PATTERN.md](patterns/auth/supabase-auth/PATTERN.md)
86
86
  - Examples: [example/](patterns/auth/supabase-auth/example/)
87
87
  - Requires: `@jskit-ai/auth-provider-supabase-core`
@@ -246,7 +246,7 @@ Add a protected administration surface, settings shell, and semantic navigation
246
246
 
247
247
  - Id: `console/console-surface`
248
248
  - Keywords: `admin`, `console`, `navigation`, `owner`, `placement`, `settings`, `surface`
249
- - Owner: `@jskit-ai/console-web@0.1.265`
249
+ - Owner: `@jskit-ai/console-web@0.1.267`
250
250
  - Read: [PATTERN.md](patterns/console/console-surface/PATTERN.md)
251
251
  - Examples: [example/](patterns/console/console-surface/example/)
252
252
  - Requires: `@jskit-ai/console-core`, `@jskit-ai/console-web`, `@jskit-ai/shell-web`
@@ -268,7 +268,7 @@ Build a complete application-owned CRUD server package from a migration, a table
268
268
 
269
269
  - Id: `crud/crud-feature-package`
270
270
  - Keywords: `actions`, `crud`, `database`, `defineCrudFeature`, `json-api`, `migration`, `owns`, `permissions`, `repository`, `routes`, `service`, `table resource`
271
- - Owner: `@jskit-ai/crud-core@0.2.32`
271
+ - Owner: `@jskit-ai/crud-core@0.2.33`
272
272
  - Read: [PATTERN.md](patterns/crud/crud-feature-package/PATTERN.md)
273
273
  - Examples: [example/](patterns/crud/crud-feature-package/example/)
274
274
  - Requires: `@jskit-ai/crud-core`, `@jskit-ai/resource-core`, `@jskit-ai/resource-crud-core`
@@ -279,7 +279,7 @@ Build a routed CRUD user interface as thin application pages over JSKIT's shared
279
279
 
280
280
  - Id: `crud/crud-screen-set`
281
281
  - Keywords: `actions`, `add`, `crud`, `delete`, `edit`, `filters`, `list`, `material`, `routes`, `view`, `vue`
282
- - Owner: `@jskit-ai/http-web@0.2.37`
282
+ - Owner: `@jskit-ai/http-web@0.2.38`
283
283
  - Read: [PATTERN.md](patterns/crud/crud-screen-set/PATTERN.md)
284
284
  - Examples: [example/](patterns/crud/crud-screen-set/example/)
285
285
  - Requires: `@jskit-ai/http-web`, `@jskit-ai/resource-core`, `@jskit-ai/resource-crud-core`
@@ -345,7 +345,7 @@ Compose application-owned Google Publisher Tag delivery with the generic rewarde
345
345
 
346
346
  - Id: `rewards/google-rewarded`
347
347
  - Keywords: `ads`, `google`, `publisher tag`, `rewarded`, `unlock`
348
- - Owner: `@jskit-ai/rewarded-web@0.2.42`
348
+ - Owner: `@jskit-ai/rewarded-web@0.2.44`
349
349
  - Read: [PATTERN.md](patterns/rewards/google-rewarded/PATTERN.md)
350
350
  - Examples: [example/](patterns/rewards/google-rewarded/example/)
351
351
  - Requires: `@jskit-ai/rewarded-web`
@@ -356,7 +356,7 @@ Define a server feature through explicit capabilities and first-class actions, a
356
356
 
357
357
  - Id: `server/feature-package`
358
358
  - Keywords: `actions`, `aggregate`, `feature`, `handle`, `orchestration`, `owns`, `package`, `provider`, `repository`, `routes`, `server`, `table resource`
359
- - Owner: `@jskit-ai/agent-docs@0.1.317`
359
+ - Owner: `@jskit-ai/agent-docs@0.1.319`
360
360
  - Read: [PATTERN.md](patterns/server/feature-package/PATTERN.md)
361
361
  - Examples: [example/](patterns/server/feature-package/example/)
362
362
  - Requires: `@jskit-ai/kernel`
@@ -389,7 +389,7 @@ Compose an account settings route and profile, preference, notification, and sig
389
389
 
390
390
  - Id: `users/account-settings`
391
391
  - Keywords: `account`, `link provider`, `notifications`, `oauth`, `preferences`, `profile`, `settings`, `sign-in methods`, `user`, `vue`
392
- - Owner: `@jskit-ai/users-web@0.2.48`
392
+ - Owner: `@jskit-ai/users-web@0.2.50`
393
393
  - Read: [PATTERN.md](patterns/users/account-settings/PATTERN.md)
394
394
  - Examples: [example/](patterns/users/account-settings/example/)
395
395
  - Requires: `@jskit-ai/shell-web`, `@jskit-ai/users-core`, `@jskit-ai/users-web`
@@ -400,7 +400,7 @@ Expose user administration and workspace-scoped member operations through app-ow
400
400
 
401
401
  - Id: `users/user-administration-server`
402
402
  - Keywords: `account`, `admin`, `member`, `repository`, `resource`, `routes`, `service`, `user`, `workspace`
403
- - Owner: `@jskit-ai/users-core@0.2.36`
403
+ - Owner: `@jskit-ai/users-core@0.2.38`
404
404
  - Read: [PATTERN.md](patterns/users/user-administration-server/PATTERN.md)
405
405
  - Examples: [example/](patterns/users/user-administration-server/example/)
406
406
  - Requires: `@jskit-ai/crud-core`, `@jskit-ai/users-core`
@@ -411,7 +411,7 @@ Configure roles, workspace access policy, invitations, and app-owned invitation
411
411
 
412
412
  - Id: `workspaces/workspace-server`
413
413
  - Keywords: `access`, `invite`, `membership`, `multitenancy`, `policy`, `role`, `tenancy`, `workspace`
414
- - Owner: `@jskit-ai/workspaces-core@0.2.36`
414
+ - Owner: `@jskit-ai/workspaces-core@0.2.38`
415
415
  - Read: [PATTERN.md](patterns/workspaces/workspace-server/PATTERN.md)
416
416
  - Examples: [example/](patterns/workspaces/workspace-server/example/)
417
417
  - Requires: `@jskit-ai/users-core`, `@jskit-ai/workspaces-core`
@@ -422,7 +422,7 @@ Compose workspace selection, invitation, member administration, settings, and re
422
422
 
423
423
  - Id: `workspaces/workspace-surfaces`
424
424
  - Keywords: `admin`, `invite`, `member`, `navigation`, `settings`, `surface`, `switcher`, `workspace`
425
- - Owner: `@jskit-ai/workspaces-web@0.2.48`
425
+ - Owner: `@jskit-ai/workspaces-web@0.2.50`
426
426
  - Read: [PATTERN.md](patterns/workspaces/workspace-surfaces/PATTERN.md)
427
427
  - Examples: [example/](patterns/workspaces/workspace-surfaces/example/)
428
428
  - Requires: `@jskit-ai/shell-web`, `@jskit-ai/workspaces-core`, `@jskit-ai/workspaces-web`
@@ -50,7 +50,7 @@
50
50
  },
51
51
  "devDependencies": {
52
52
  "@jskit-ai/config-eslint": "0.1.251",
53
- "@jskit-ai/jskit-catalog": "0.2.69",
53
+ "@jskit-ai/jskit-catalog": "0.2.71",
54
54
  "@playwright/test": "1.61.1",
55
55
  "@vitejs/plugin-vue": "^6.0.7",
56
56
  "eslint": "^10.8.0",
@@ -51,7 +51,7 @@
51
51
  },
52
52
  "devDependencies": {
53
53
  "@jskit-ai/config-eslint": "0.1.251",
54
- "@jskit-ai/jskit-catalog": "0.2.69",
54
+ "@jskit-ai/jskit-catalog": "0.2.71",
55
55
  "@playwright/test": "1.61.1",
56
56
  "@vitejs/plugin-vue": "^6.0.7",
57
57
  "eslint": "^10.8.0",
@@ -4,6 +4,6 @@
4
4
  "dependencies": {
5
5
  "@jskit-ai/database-runtime": "0.1.271",
6
6
  "@jskit-ai/database-runtime-mysql": "0.1.269",
7
- "@jskit-ai/oidc-issuer-core": "0.1.32"
7
+ "@jskit-ai/oidc-issuer-core": "0.1.34"
8
8
  }
9
9
  }
@@ -2,7 +2,7 @@
2
2
  "private": true,
3
3
  "type": "module",
4
4
  "dependencies": {
5
- "@jskit-ai/auth-provider-oidc-core": "0.2.37",
6
- "@jskit-ai/auth-web": "0.2.34"
5
+ "@jskit-ai/auth-provider-oidc-core": "0.2.39",
6
+ "@jskit-ai/auth-web": "0.2.35"
7
7
  }
8
8
  }
@@ -2,6 +2,6 @@
2
2
  "private": true,
3
3
  "type": "module",
4
4
  "dependencies": {
5
- "@jskit-ai/auth-provider-supabase-core": "0.2.25"
5
+ "@jskit-ai/auth-provider-supabase-core": "0.2.26"
6
6
  }
7
7
  }
@@ -9,7 +9,7 @@
9
9
  "./shared": "./src/shared/index.js"
10
10
  },
11
11
  "dependencies": {
12
- "@jskit-ai/crud-core": "0.2.32",
12
+ "@jskit-ai/crud-core": "0.2.33",
13
13
  "@jskit-ai/resource-core": "0.1.213",
14
14
  "@jskit-ai/resource-crud-core": "0.1.215"
15
15
  },
@@ -10,9 +10,9 @@
10
10
  "./shared": "./src/shared/index.js"
11
11
  },
12
12
  "dependencies": {
13
- "@jskit-ai/crud-core": "0.2.32",
13
+ "@jskit-ai/crud-core": "0.2.33",
14
14
  "@jskit-ai/resource-crud-core": "0.1.215",
15
- "@jskit-ai/users-core": "0.2.36"
15
+ "@jskit-ai/users-core": "0.2.38"
16
16
  },
17
17
  "jskit": {
18
18
  "kind": "runtime",
@@ -10,10 +10,10 @@
10
10
  "./shared": "./src/shared/index.js"
11
11
  },
12
12
  "dependencies": {
13
- "@jskit-ai/crud-core": "0.2.32",
13
+ "@jskit-ai/crud-core": "0.2.33",
14
14
  "@jskit-ai/resource-crud-core": "0.1.215",
15
- "@jskit-ai/users-core": "0.2.36",
16
- "@jskit-ai/workspaces-core": "0.2.36"
15
+ "@jskit-ai/users-core": "0.2.38",
16
+ "@jskit-ai/workspaces-core": "0.2.38"
17
17
  },
18
18
  "peerDependencies": {
19
19
  "@jskit-ai/kernel": "0.2.22",