@jskit-ai/agent-docs 0.1.332 → 0.1.333

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 (36) hide show
  1. package/guide/agent/app-setup/authentication.md +106 -8
  2. package/guide/agent/framework/crud-form-actions.md +18 -7
  3. package/guide/agent/framework/material-3.md +9 -3
  4. package/guide/agent/framework/quality-pass.md +8 -2
  5. package/package.json +1 -1
  6. package/patterns/minimal-foundation/example/package.json +2 -2
  7. package/patterns/shell-foundation/example/package.json +3 -3
  8. package/reference/autogen/PATTERN_INDEX.md +19 -19
  9. package/reference/autogen/packages/auth-core.md +13 -0
  10. package/reference/autogen/packages/auth-provider-local-core.md +40 -5
  11. package/reference/autogen/packages/auth-provider-local-db-core.md +15 -0
  12. package/reference/autogen/packages/auth-web.md +26 -0
  13. package/reference/autogen/packages/http-web.md +2 -0
  14. package/reference/autogen/packages/shell-web.md +27 -0
  15. package/skills/jskit/references/crud-form-actions.md +18 -7
  16. package/skills/jskit/references/heuristics/client-requests.md +1 -1
  17. package/skills/jskit/references/heuristics/crud-authoring.md +3 -2
  18. package/skills/jskit/references/heuristics/live-actions.md +4 -1
  19. package/skills/jskit/references/heuristics/ui-contract.md +9 -1
  20. package/skills/jskit/references/material-3.md +9 -3
  21. package/skills/jskit/references/pattern-index.md +19 -19
  22. package/skills/jskit/references/patterns/app/minimal-foundation/example/package.json +2 -2
  23. package/skills/jskit/references/patterns/app/shell-foundation/example/package.json +3 -3
  24. package/skills/jskit/references/patterns/auth/accounts-hub/example/package.json +1 -1
  25. package/skills/jskit/references/patterns/auth/auth-surface/PATTERN.md +10 -8
  26. package/skills/jskit/references/patterns/auth/auth-surface/example/src/pages/auth/email-change.vue +17 -0
  27. package/skills/jskit/references/patterns/auth/auth-surface/example/src/views/auth/EmailChangeView.vue +12 -0
  28. package/skills/jskit/references/patterns/auth/oidc-sign-in/example/package.json +2 -2
  29. package/skills/jskit/references/patterns/auth/supabase-auth/example/package.json +1 -1
  30. package/skills/jskit/references/patterns/realtime/realtime-application/example/package.json +2 -2
  31. package/skills/jskit/references/patterns/users/account-settings/example/src/components/account/settings/AccountSettingsNotificationsSection.vue +3 -1
  32. package/skills/jskit/references/patterns/users/account-settings/example/src/components/account/settings/AccountSettingsPreferencesSection.vue +3 -1
  33. package/skills/jskit/references/patterns/users/account-settings/example/src/components/account/settings/AccountSettingsProfileSection.vue +4 -1
  34. package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users/package.json +1 -1
  35. package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users-workspace/package.json +2 -2
  36. package/skills/jskit/references/quality-pass.md +8 -2
@@ -98,8 +98,8 @@ declares a `rateLimit`, which the kernel enforces for each client address. A
98
98
  request over it is refused with status 429, the code `kernel.http.rateLimited`
99
99
  (`params.count` is the seconds to wait) and a `Retry-After` header. The
100
100
  defaults, per minute: `login`, `register`, `registerConfirm`,
101
- `loginOtpRequest` and `loginOtpVerify` 10; `registerConfirmationResend` and
102
- `passwordForgot` 5;
101
+ `loginOtpRequest`, `loginOtpVerify` and `emailChangeConfirm` 10;
102
+ `registerConfirmationResend`, `passwordForgot` and `emailChange` 5;
103
103
  `oauthStart`, `oauthComplete`, `passSignIn`, `passwordRecovery` and `passwordReset` 20;
104
104
  `devLoginAs` 30. Change one in the application's server configuration;
105
105
  `false` removes it:
@@ -163,6 +163,21 @@ 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 events (local auth).** Each sign-in and each refused one is an
167
+ event, for a page that lists an account's sign-ins or for an audit log:
168
+ `type` (`signedIn` or `failed`), `method` (`password`, `registration`,
169
+ `confirmation`, `recovery`, `pass`, or `provider` with `provider`, such as
170
+ `google`), a refusal's `reason` (`invalidCredentials`, `locked`,
171
+ `unconfirmed` or `disabled`), `userId` (the local account, "" when the email
172
+ names none), `email`, the request's `ip` and `userAgent`, and `at`; never a
173
+ password, secret or token. An application that keeps them installs the
174
+ `auth.local.sign-in-events` capability, a function given each event
175
+ (`AuthLocalSignInEvent` in `@jskit-ai/auth-provider-local-core/server/types`),
176
+ and stores them in a table of its own, with how long it keeps them. It is
177
+ called after the request has answered, so a refused sign-in takes the same
178
+ time whatever it does; when it fails, local auth logs the failure, and a
179
+ stopping server waits for it a while. Without one, local auth logs each event.
180
+
166
181
  ## Sign-in cookies and SameSite
167
182
 
168
183
  Local auth's cookies (access, refresh, recovery and OAuth attempt) and
@@ -452,8 +467,8 @@ error.
452
467
 
453
468
  | Capability | Methods |
454
469
  | --- | --- |
455
- | `auth.local.accounts` | `create(account, options)`, `findById(userId, options)`, `findByEmail(email, options)`, `updatePassword(userId, passwordRecord, options)`, `updateProfile(userId, { displayName }, options)`, `markEmailVerified(userId, options)` |
456
- | `auth.local.sessions` | `create(session, options)`, `update(sessionId, { purpose, expiresAt }, { ...options, onlyIf })`, `revoke(sessionId, options)`, `revokeForUser(userId, { ...options, exceptSessionId })`, `deleteExpired(now, options)` |
470
+ | `auth.local.accounts` | `create(account, options)`, `findById(userId, options)`, `findByEmail(email, options)`, `updatePassword(userId, passwordRecord, options)`, `updateProfile(userId, { displayName }, options)`, `markEmailVerified(userId, options)`, `disable(userId, { message }, options)`, `enable(userId, options)` |
471
+ | `auth.local.sessions` | `create(session, options)`, `update(sessionId, { purpose, expiresAt }, { ...options, onlyIf })`, `revoke(sessionId, options)`, `revokeForUser(userId, { ...options, exceptSessionId })`, `deleteExpired(now, options)`, `listForUser(userId, options)` |
457
472
  | `auth.local.recovery` | `create(token, options)`, `findByTokenHash(tokenHash, options)`, `consume(tokenId, options)`, `consumeForUser(userId, { ...options, idPrefix })` |
458
473
 
459
474
  `markEmailVerified` records that the account proved it owns its email address,
@@ -462,6 +477,40 @@ for example by using an emailed link, in the `email_verified_at` column (run
462
477
  `emailVerifiedAt` (empty until then). `deleteExpired` deletes the sessions that
463
478
  expired by `now` and answers how many.
464
479
 
480
+ `disable` stops an account signing in, for example while an application
481
+ suspends or closes it: every sign-in and every session of the account is
482
+ refused from its next request, until `enable`. `message`, at most 500
483
+ characters, is what the person is told when they sign in with the right
484
+ password, a linked provider or a one-time pass, such as `This account is
485
+ suspended until 14 Dec. We've emailed you why.`: status 403, the code
486
+ `auth.local.login.disabled`, and the message as the error's text, which the
487
+ sign-in page shows as written. Without a message the text is `This account is
488
+ disabled.`, translated like any other. A wrong password is an ordinary failed
489
+ sign-in, so only someone who could sign in learns that the account is
490
+ disabled. The message is kept in the `disabled_message` column (run
491
+ `npm run db:migrate`) until `enable` clears it. Both answer the account
492
+ (`disabled`, `disabledMessage`, "" when it has none), or null when there is no
493
+ such account, and refuse a missing id, as `disable` refuses a message that is
494
+ not text of at most 500 characters, with a `TypeError`. Neither signs the
495
+ account out: its sessions work again after `enable`, unless
496
+ `auth.local.sessions`' `revokeForUser` ended them.
497
+
498
+ Every session keeps where and when it was last seen: `ip` (the request's
499
+ address, Fastify's `request.ip`, so set `TRUSTED_PROXIES` behind a proxy),
500
+ `userAgent` (the browser's `User-Agent`, at most 512 characters) and
501
+ `lastSeenAt`. Signing in sets them from the sign-in's request, and a request
502
+ that finds the session more than five minutes after it was last seen sets them
503
+ again, so most requests write nothing; one that does not say where it comes
504
+ from keeps the address and browser. Each is "" when unknown, as for sessions
505
+ from before (run `npm run db:migrate` for the `ip`, `user_agent` and
506
+ `last_seen_at` columns). `listForUser` answers the account's sessions that are
507
+ neither revoked nor expired, the newest first, every one of them, and refuses
508
+ a missing id with a `TypeError`. For a person's own list, name the account
509
+ from the request's authentication, never from what the client sends:
510
+ `authenticateRequest(request)` answers `actor.providerUserId` and the
511
+ request's own `sessionId`, which the list can mark as this browser. End one
512
+ session with `revoke(sessionId)` once the list showed it is that account's.
513
+
465
514
  A recovery token's kind is the start of its id: local sign-in's password resets
466
515
  are `rec_…`, and an app's own kind (a sign-in link, say) takes a prefix of its
467
516
  own, such as `magic_…`. `consumeForUser` consumes the user's open tokens of the
@@ -589,7 +638,8 @@ page shows the reason:
589
638
  | `auth.pass.wrongResource` | 401 | For another resource. |
590
639
  | `auth.pass.expired` | 401 | Expired (30 seconds of clock difference are allowed). |
591
640
  | `auth.pass.replayed` | 401 | Already used, on this server or another sharing its store. |
592
- | `auth.pass.unmapped` | 403 | The mapping names no account, or a disabled one. |
641
+ | `auth.pass.unmapped` | 403 | The mapping names no account. |
642
+ | `auth.local.login.disabled` | 403 | The mapping names a disabled account; the reason is the account's message (see `disable` above). |
593
643
 
594
644
  Each pass signs in once. Local auth records each pass it accepts, by the hash
595
645
  of its id, until it could no longer be used anyway (30 seconds after it
@@ -740,6 +790,53 @@ or compatibility adapter.
740
790
  the completed password-reset flow before releasing the updated application.
741
791
  This change does not alter identity, session or recovery-token storage.
742
792
 
793
+ ## Email change (local auth)
794
+
795
+ A person changes their email by proving the new address: local auth sends it a
796
+ link, and only using the link changes the email.
797
+
798
+ - The signed-in person asks with their password: `POST /api/email-change`
799
+ with `{ email, password }` (the action `auth.emailChange.request`, the
800
+ service's `requestEmailChange(request, input)`). An account with no password
801
+ sets one first, through a password reset.
802
+ - The application asks for an account it chose, without a password:
803
+ `authService.requestEmailChangeForUser({ userId, email })`, for example an
804
+ operator's change for a person who lost their old address. Who may ask is the
805
+ application's decision, so it has no route; the application's own action
806
+ checks its caller first.
807
+ - The link opens `/auth/email-change?token=...`, the `auth.email-change` route,
808
+ whose page (`DefaultEmailChangeView` from `@jskit-ai/auth-web`) posts the
809
+ token to `POST /api/email-change/confirm` (`confirmEmailChange({ token })`),
810
+ public, since the link proves who uses it, and shows the new email. The
811
+ application adds the page as it adds the reset page, rendering the view in
812
+ `src/pages/auth/email-change.vue`.
813
+
814
+ The account keeps the new address as its waiting change until the link is
815
+ used; a newer request replaces it, so an earlier link stops working. A link
816
+ works for a day and once. Using it changes the email, ends the password resets
817
+ sent to the old address, and sends the old address a notice; the account's
818
+ sessions stay signed in and show the new email from their next request. Each
819
+ refusal has its code: `auth.local.emailChange.passwordInvalid` and `sameEmail`
820
+ (400), `emailTaken` (409, also when another account took the address after the
821
+ link was sent), `linkInvalid` (400: used, replaced, expired or altered) and
822
+ `accountNotFound` (404, the application's request for an id with no account).
823
+
824
+ The application sends the links and notices through the optional
825
+ `auth.local.email-change-sender` capability, an async function given
826
+ `{ type: "confirmation", email, currentEmail, confirmationUrl }` (to the new
827
+ address) or `{ type: "notice", email, newEmail }` (to the old one). It is wired
828
+ like the recovery sender above and sends as `APP_ENV` says, as it does:
829
+ production to each address, staging only to `STAGING_EMAIL_TO` (with
830
+ `originalEmail`), development and test to the log. It runs after the request
831
+ has answered, and a failure is logged with the address, never answered.
832
+ Without one, development and test log each link and notice, and a staging or
833
+ production server has no email change: `features.emailChange` is false and the
834
+ operations answer
835
+ `AUTH_OPERATION_UNSUPPORTED`. A sender needs `APP_PUBLIC_URL`, which its links
836
+ name. The database backend keeps the waiting change in
837
+ `auth_local_users.pending_email` (migration `auth_local_db_users_pending_email`)
838
+ and sets `email_verified_at` when the link is used.
839
+
743
840
  ## Google, Microsoft and GitHub sign-in with local auth
744
841
 
745
842
  Local auth signs people in through Google, Microsoft and GitHub when the
@@ -803,8 +900,8 @@ the `auth_local_identities` and `auth_local_oauth_attempts` tables.
803
900
  ## Browser boundary
804
901
 
805
902
  `@jskit-ai/auth-web` owns the normal auth views, guard runtime, sign-out flow,
806
- and auth-aware HTTP integration. `DefaultLoginView`, `DefaultResetPasswordView`
807
- and `DefaultSignOutView` fill the window themselves: a card on
903
+ and auth-aware HTTP integration. `DefaultLoginView`, `DefaultResetPasswordView`,
904
+ `DefaultEmailChangeView` and `DefaultSignOutView` fill the window themselves: a card on
808
905
  `surface-container` on wide windows, the whole screen on phones, and each
809
906
  screen's one `h1` ("Sign in", "Create your account", "Reset password", ...).
810
907
  Every app shows its identity there, so a person always sees which app they are
@@ -813,7 +910,8 @@ beside the card on wide windows (`primary-container`, its children from top to
813
910
  bottom) and a compact row above the card on phones. The slot gets `{ compact }`
814
911
  to choose what to show, and holds no heading. The `auth/auth-surface` pattern
815
912
  does this already: its pages render the app's view wrappers
816
- (`src/views/auth/LoginView.vue`, `ResetPasswordView.vue`, `SignOutView.vue`),
913
+ (`src/views/auth/LoginView.vue`, `ResetPasswordView.vue`, `EmailChangeView.vue`,
914
+ `SignOutView.vue`),
817
915
  and each fills the slot with `src/components/AppBrand.vue`, the app's name as
818
916
  `index.html`'s `<title>` spells it. Renaming the app renames both:
819
917
 
@@ -11,9 +11,15 @@ description: Customize shared CRUD form actions and local validation guidance.
11
11
  its default content. The slot exposes `screen`, `mode`, `formRuntime`,
12
12
  `formState`, `addEdit`, `saveLabel`, the resolved
13
13
  `cancelTo` route target, and `submit`. Custom actions call `submit()` and bind
14
- their disabled state to `addEdit.isSubmitDisabled`. Keyboard submission uses
15
- the same runtime. `addEdit.isSaving` stays true through the request and
16
- asynchronous `onSaveSuccess` callback; duplicate
14
+ their disabled state to `addEdit.isSubmitDisabled` and their pending state to
15
+ `addEdit.isSubmitPending` (the save, or the record's reload after it, is
16
+ running). `ShellPageAction` takes both and keeps keyboard focus while it is
17
+ pending; a plain button, when possible, takes
18
+ `v-pending="addEdit.isSubmitPending"` and
19
+ `:disabled="addEdit.isSubmitDisabled && !addEdit.isSubmitPending"`, since a
20
+ focused button that becomes disabled drops focus to the page body. Keyboard
21
+ submission uses the same runtime. `addEdit.isSaving` stays true through the
22
+ request and asynchronous `onSaveSuccess` callback; duplicate
17
23
  submissions remain blocked during both.
18
24
 
19
25
  `useAddEdit()` and the `addEdit` runtime exposed by `useCrudAddEdit()` and
@@ -42,9 +48,13 @@ Inside `CrudAddEditScreen`, alongside the existing `fields` slot:
42
48
  <template #actions="{ addEdit, submit, saveLabel, cancelTo }">
43
49
  <v-btn v-if="cancelTo" variant="outlined" :to="cancelTo">Cancel</v-btn>
44
50
  <div>
45
- <v-btn :disabled="addEdit.isSubmitDisabled" @click="submit">
46
- {{ addEdit.isSaving ? "Saving…" : saveLabel }}
47
- </v-btn>
51
+ <ShellPageAction
52
+ primary
53
+ :label="addEdit.isSaving ? 'Saving…' : saveLabel"
54
+ :disabled="addEdit.isSubmitDisabled"
55
+ :pending="addEdit.isSubmitPending"
56
+ @click="submit"
57
+ />
48
58
  <p v-if="addEdit.validationAttempted" aria-live="polite">
49
59
  {{ Object.values(addEdit.validationErrors).join(" ") }}
50
60
  </p>
@@ -58,7 +68,8 @@ to clear the successfully saved model, call `screen.addEdit.resetValidation()`,
58
68
  and prepare the next entry. This callback replaces default success navigation
59
69
  and invalidation; perform those there when needed. Clear the model only in
60
70
  `onSaveSuccess`: `submit()` also resolves after invalid or failed submissions.
61
- Guard action selection with `isSubmitDisabled` and restore the default action
71
+ Guard action selection with `isSubmitDisabled` (true while pending too) and
72
+ restore the default action
62
73
  after each attempt so keyboard submission uses normal Save. Track the clicked
63
74
  button separately to keep guidance beside it while fields are corrected.
64
75
 
@@ -274,8 +274,9 @@ dialog, chip or FAB.
274
274
  (`@jskit-ai/shell-web/client/components/ShellPageActions`), each a
275
275
  `ShellPageAction` with `icon`, `label` (also its accessible name and compact
276
276
  tooltip), and `primary`, `to`, `replace`, `href` (with `download` for a
277
- file, such as a CSV export), `disabled`, `loading` or `color` (`error` for a
278
- destructive one); attributes such as `target` reach its button. On compact
277
+ file, such as a CSV export), `disabled`, `pending`, `loading` or `color`
278
+ (`error` for a destructive one); attributes such as `target` reach its
279
+ button. On compact
279
280
  widths the bar shows the single `primary` action (a form's Save) and puts
280
281
  the other actions, and the top-right items that don't fit beside the title,
281
282
  in its "More actions" menu, where `overflow` actions always are; medium and
@@ -367,7 +368,12 @@ dialog, chip or FAB.
367
368
  loading uses Material skeletons that reserve the final content geometry;
368
369
  never use a generic spinner or circular progress indicator, and never let
369
370
  content jump when data arrives. An action without a loading content region
370
- uses a stable disabled/pending label and shared feedback, not a spinner.
371
+ uses a stable pending label ("Saving…") and shared feedback, not a spinner.
372
+ - While a command runs, mark its button pending rather than `disabled` when
373
+ possible: `pending` on `ShellPageAction` and `ShellPrimaryAction`,
374
+ `v-pending` on other buttons. It keeps keyboard focus, reads as unavailable
375
+ and ignores a second press; a focused button that becomes `disabled` drops
376
+ focus to the page body. Keep `disabled` for an action that cannot run.
371
377
  - Keep failures at their semantic owner. A resource that cannot render uses a
372
378
  stable in-page error and retry state; field validation stays beside the
373
379
  field. A user-triggered command uses JSKIT's shared action
@@ -17,8 +17,8 @@ in a JSKIT app. The rules it applies are already in [Material 3](/guide/framewor
17
17
  ## States on every screen
18
18
 
19
19
  - **Loading:** Material skeletons with the geometry of the content they stand
20
- for, never a spinner; an action keeps a stable label while it runs and
21
- cannot be sent twice ([Components, state, and feedback](/guide/framework/material-3#components-state-and-feedback)).
20
+ for, never a spinner; an action keeps a stable label and its keyboard focus
21
+ while it runs, and cannot be sent twice ([Components, state, and feedback](/guide/framework/material-3#components-state-and-feedback)).
22
22
  Ordinary reads stop after 30 seconds, so a slow read ends in its error state.
23
23
  - **Empty:** a list's empty state carries an icon, a line saying what would be
24
24
  there and one action, such as New; with filters or a search applied it
@@ -60,6 +60,12 @@ in a JSKIT app. The rules it applies are already in [Material 3](/guide/framewor
60
60
  width.
61
61
  - **Double submit:** click Save twice quickly; the command's pending state
62
62
  must send one request.
63
+ - **Keyboard through a running command:** Tab to Save (or Send, "Load more",
64
+ a dialog's confirm), press Enter and answer the request late
65
+ (`page.route`). Focus should stay on the button while it runs, and move to
66
+ the field a refusal marks. Focus on the page body there usually means the
67
+ button was `disabled` while it ran; mark it pending instead when possible
68
+ ([Material 3 rules](/guide/framework/material-3#components-state-and-feedback)).
63
69
  - **Session and tabs:** sign out in another tab and come back; let the session
64
70
  expire mid-form. The auth guard sends the person to sign-in and back.
65
71
  - **Time:** dates follow [strict temporal values](/guide/framework/crud-operations#strict-temporal-values);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jskit-ai/agent-docs",
3
- "version": "0.1.332",
3
+ "version": "0.1.333",
4
4
  "description": "Distributed JSKIT agent references, prompts, guides, and generated reference maps.",
5
5
  "type": "module",
6
6
  "files": [
@@ -35,7 +35,7 @@
35
35
  "@local/main": "0.1.0",
36
36
  "@fastify/static": "^10.1.3",
37
37
  "@jskit-ai/kernel": "0.2.27",
38
- "@jskit-ai/material-web": "0.1.8",
38
+ "@jskit-ai/material-web": "0.1.9",
39
39
  "@tanstack/vue-query": "^5.101.0",
40
40
  "fastify": "^5.12.7",
41
41
  "pino": "^10.3.1",
@@ -50,7 +50,7 @@
50
50
  },
51
51
  "devDependencies": {
52
52
  "@jskit-ai/config-eslint": "0.1.252",
53
- "@jskit-ai/jskit-catalog": "0.2.84",
53
+ "@jskit-ai/jskit-catalog": "0.2.85",
54
54
  "@playwright/test": "1.61.1",
55
55
  "@vitejs/plugin-vue": "^6.0.7",
56
56
  "eslint": "^10.8.0",
@@ -35,7 +35,7 @@
35
35
  "@local/main": "0.1.0",
36
36
  "@fastify/static": "^10.1.3",
37
37
  "@jskit-ai/kernel": "0.2.27",
38
- "@jskit-ai/material-web": "0.1.8",
38
+ "@jskit-ai/material-web": "0.1.9",
39
39
  "@tanstack/vue-query": "^5.101.0",
40
40
  "fastify": "^5.12.7",
41
41
  "pino": "^10.3.1",
@@ -45,13 +45,13 @@
45
45
  "vue-router": "^5.3.1",
46
46
  "vuetify": "^4.3.0",
47
47
  "@jskit-ai/http-runtime": "0.2.27",
48
- "@jskit-ai/shell-web": "0.2.38",
48
+ "@jskit-ai/shell-web": "0.2.39",
49
49
  "@fastify/fast-json-stringify-compiler": "^5.1.0",
50
50
  "@vue/devtools-api": "^8.2.1"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@jskit-ai/config-eslint": "0.1.252",
54
- "@jskit-ai/jskit-catalog": "0.2.84",
54
+ "@jskit-ai/jskit-catalog": "0.2.85",
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.332`
18
+ - Owner: `@jskit-ai/agent-docs@0.1.333`
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.332`
29
+ - Owner: `@jskit-ai/agent-docs@0.1.333`
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.70`
40
+ - Owner: `@jskit-ai/assistant-runtime@0.2.71`
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.42`
51
+ - Owner: `@jskit-ai/oidc-issuer-core@0.1.43`
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.44`
62
+ - Owner: `@jskit-ai/auth-web@0.2.45`
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.48`
73
+ - Owner: `@jskit-ai/auth-provider-oidc-core@0.2.49`
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.33`
84
+ - Owner: `@jskit-ai/auth-provider-supabase-core@0.2.34`
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.279`
249
+ - Owner: `@jskit-ai/console-web@0.1.280`
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`
@@ -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.45`
282
+ - Owner: `@jskit-ai/http-web@0.2.46`
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`
@@ -323,7 +323,7 @@ Wrap a JSKIT web application in a Capacitor Android shell using native Capacitor
323
323
 
324
324
  - Id: `mobile/android-application`
325
325
  - Keywords: `android`, `capacitor`, `device`, `mobile`, `native`, `shell`, `webview`
326
- - Owner: `@jskit-ai/mobile-capacitor@0.2.38`
326
+ - Owner: `@jskit-ai/mobile-capacitor@0.2.39`
327
327
  - Read: [PATTERN.md](../../skills/jskit/references/patterns/mobile/android-application/PATTERN.md)
328
328
  - Examples: [example/](../../skills/jskit/references/patterns/mobile/android-application/example/)
329
329
  - Requires: `@capacitor/android`, `@capacitor/app`, `@capacitor/cli`, `@jskit-ai/mobile-capacitor`
@@ -334,7 +334,7 @@ Add JSKIT realtime events with an optional Redis backplane and an explicit shell
334
334
 
335
335
  - Id: `realtime/realtime-application`
336
336
  - Keywords: `realtime`, `redis`, `socket.io`, `sockets`, `status`, `websocket`
337
- - Owner: `@jskit-ai/realtime@0.2.41`
337
+ - Owner: `@jskit-ai/realtime@0.2.42`
338
338
  - Read: [PATTERN.md](../../skills/jskit/references/patterns/realtime/realtime-application/PATTERN.md)
339
339
  - Examples: [example/](../../skills/jskit/references/patterns/realtime/realtime-application/example/)
340
340
  - Requires: `@jskit-ai/realtime`, `@jskit-ai/shell-web`
@@ -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.56`
348
+ - Owner: `@jskit-ai/rewarded-web@0.2.57`
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.332`
359
+ - Owner: `@jskit-ai/agent-docs@0.1.333`
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`
@@ -367,7 +367,7 @@ Compose the JSKIT responsive shell, semantic placements, settings navigation, an
367
367
 
368
368
  - Id: `shell/application-shell`
369
369
  - Keywords: `adaptive`, `app`, `layout`, `navigation`, `placement`, `responsive`, `settings`, `shell`
370
- - Owner: `@jskit-ai/shell-web@0.2.38`
370
+ - Owner: `@jskit-ai/shell-web@0.2.39`
371
371
  - Read: [PATTERN.md](../../skills/jskit/references/patterns/shell/application-shell/PATTERN.md)
372
372
  - Examples: [example/](../../skills/jskit/references/patterns/shell/application-shell/example/)
373
373
  - Requires: `@jskit-ai/kernel`, `@jskit-ai/shell-web`
@@ -378,7 +378,7 @@ Add product routes and shell extensions through file routing, semantic placement
378
378
 
379
379
  - Id: `ui/page-and-placement`
380
380
  - Keywords: `component`, `navigation`, `outlet`, `page`, `placement`, `routes`, `section`, `shell`, `subpages`, `vue`
381
- - Owner: `@jskit-ai/shell-web@0.2.38`
381
+ - Owner: `@jskit-ai/shell-web@0.2.39`
382
382
  - Read: [PATTERN.md](../../skills/jskit/references/patterns/ui/page-and-placement/PATTERN.md)
383
383
  - Examples: [example/](../../skills/jskit/references/patterns/ui/page-and-placement/example/)
384
384
  - Requires: `@jskit-ai/kernel`, `@jskit-ai/shell-web`
@@ -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.62`
392
+ - Owner: `@jskit-ai/users-web@0.2.63`
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.49`
403
+ - Owner: `@jskit-ai/users-core@0.2.50`
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.49`
414
+ - Owner: `@jskit-ai/workspaces-core@0.2.50`
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.62`
425
+ - Owner: `@jskit-ai/workspaces-web@0.2.63`
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`
@@ -34,6 +34,12 @@ Exports
34
34
  Exports
35
35
  - `createAuthActions({ authService })`
36
36
 
37
+ ### `src/server/actions/emailChangeActions.js`
38
+ Exports
39
+ - `ACTION_CONFIRM_EMAIL_CHANGE`
40
+ - `ACTION_REQUEST_EMAIL_CHANGE`
41
+ - `createEmailChangeActions({ authService })`
42
+
37
43
  ### `src/server/actions/secondFactorActions.js`
38
44
  Exports
39
45
  - `ACTION_CONFIRM_SECOND_FACTOR_SETUP`
@@ -413,6 +419,11 @@ Exports
413
419
  - `authDevLoginAsBodyValidator`
414
420
  - `authDevLoginAsCommand`
415
421
 
422
+ ### `src/shared/commands/authEmailChangeCommands.js`
423
+ Exports
424
+ - `authEmailChangeConfirmCommand`
425
+ - `authEmailChangeRequestCommand`
426
+
416
427
  ### `src/shared/commands/authLoginOAuthCompleteCommand.js`
417
428
  Exports
418
429
  - `authLoginOAuthCompleteBodyValidator`
@@ -533,6 +544,8 @@ Exports
533
544
  - `authSecondFactorSetupConfirmCommand`
534
545
  - `authSecondFactorSetupStartCommand`
535
546
  - `authSecondFactorVerifyCommand`
547
+ - `authEmailChangeConfirmCommand`
548
+ - `authEmailChangeRequestCommand`
536
549
 
537
550
  ### `src/shared/index.js`
538
551
  Exports
@@ -17,6 +17,7 @@ Use this on demand; do not load the full index at startup.
17
17
  ### `src/server/lib/accounts.js`
18
18
  Exports
19
19
  - `NO_PASSWORD`
20
+ - `accountDisabledError(user)`
20
21
  - `createLocalAccounts({ appProfileProjection, backend, config, emailConfirmation, firstAccountSetup, invitationContextResolver, passwords, profileProjector, sessions })`
21
22
  - `hasPassword(user)`
22
23
  - `normalizeDisplayName(value, email)`
@@ -46,15 +47,16 @@ Local functions
46
47
 
47
48
  ### `src/server/lib/config.js`
48
49
  Exports
49
- - `resolveLocalAuthConfig({ appRoot, env, fileBackend, emailRecovery, emailConfirmationSender = false })`
50
+ - `resolveLocalAuthConfig({ appRoot, env, fileBackend, emailRecovery, emailConfirmationSender = false, emailChangeSender = false })`
50
51
  Local functions
51
52
  - `resolveStoreDir(env, appRoot)`
52
53
  - `resolveSessionSecret(env, { storeDir, isDeployed })`
53
54
  - `resolveSecondFactorKey(env, { isDeployed, sessionSecret })`
54
55
  - `resolveSetupCode(env, { isDeployed })`
55
- - `resolveAppPublicUrl(env, { emailRecovery, emailedConfirmation, oauthEnabled, deployedSecondFactor })`
56
+ - `resolveAppPublicUrl(env, { emailRecovery, emailedConfirmation, emailedChange, oauthEnabled, deployedSecondFactor })`
56
57
  - `resolveRecoveryDelivery(env, { emailRecovery, isDeployed })`
57
58
  - `resolveConfirmationDelivery(env, { emailConfirmationSender, isDeployed, selfRegistration })`
59
+ - `resolveEmailChangeDelivery({ emailChangeSender, isDeployed })`
58
60
  - `resolvePasswordMinLength(env)`
59
61
 
60
62
  ### `src/server/lib/deliveries.js`
@@ -62,6 +64,17 @@ Exports
62
64
  - `DELIVERY_SHUTDOWN_WAIT_MS`
63
65
  - `createLocalDeliveries({ logger })`
64
66
 
67
+ ### `src/server/lib/emailChange.js`
68
+ Exports
69
+ - `createLocalEmailChange({ backend, config, deliveries, emailChangeSender, passwords, profileProjector, sessions })`
70
+ - `createLoggedEmailChangeSender(logger)`
71
+ Local functions
72
+ - `fieldRefusal(status, { code, message, field })`
73
+ - `passwordInvalidError()`
74
+ - `sameEmailError()`
75
+ - `emailTakenError()`
76
+ - `linkInvalidError()`
77
+
65
78
  ### `src/server/lib/emailConfirmation.js`
66
79
  Exports
67
80
  - `CONFIRMATION_TOKEN_TTL_SECONDS`
@@ -137,9 +150,11 @@ Exports
137
150
  - `createLocalDeliveries`
138
151
  - `resolveLocalAuthConfig`
139
152
  - `createLoggedConfirmationSender`
153
+ - `createLoggedEmailChangeSender`
140
154
  - `createLoggedRecoverySender`
141
155
  - `createLocalFileBackend`
142
156
  - `createLoggedSecondFactorEvents`
157
+ - `createLoggedSignInEvents`
143
158
  - `SETUP_CODE_ENV`
144
159
  - `SETUP_CODE_FILE`
145
160
  - `createFirstAccountSetup`
@@ -229,15 +244,17 @@ Exports
229
244
 
230
245
  ### `src/server/lib/service.js`
231
246
  Exports
232
- - `createLocalAuthService({ backend, config, confirmationMode = confirmEveryRegistrationByLink, confirmationSender, deliveries: givenDeliveries = null, firstAccountSetup: givenFirstAccountSetup = null, invitationContextResolver, logger, passIdentity = noPassIdentities, passwordStrategy, profileProjector, recoverySender, secondFactorEvents })`
247
+ - `createLocalAuthService({ backend, config, confirmationMode = confirmEveryRegistrationByLink, confirmationSender, deliveries: givenDeliveries = null, emailChangeSender, firstAccountSetup: givenFirstAccountSetup = null, invitationContextResolver, logger, passIdentity = noPassIdentities, passwordStrategy, profileProjector, recoverySender, secondFactorEvents, signInEvents })`
233
248
 
234
249
  ### `src/server/lib/sessions.js`
235
250
  Exports
236
251
  - `cookieOptions({ isDeployed, cookieSameSite }, maxAge)`
237
- - `createLocalSessions({ appProfileProjection, backend, config, profileProjector })`
252
+ - `createLocalSessions({ appProfileProjection, backend, config, deliveries, profileProjector, signInEvents })`
253
+ - `createLoggedSignInEvents(logger)`
238
254
  - `safeRequestCookies(request)`
239
255
  Local functions
240
256
  - `nowSeconds()`
257
+ - `requestClient(request)`
241
258
  - `unauthenticatedAuthResult(clearSession = false)`
242
259
  - `clearCookieOptions(config)`
243
260
  - `buildAccessToken({ user, session, secret, ttlSeconds = ACCESS_TTL_SECONDS })`
@@ -283,11 +300,14 @@ Exports
283
300
  - `type AuthLocalSecondFactor`
284
301
  - `type AuthLocalSecondFactorEvent`
285
302
  - `type AuthLocalSecondFactorEvents`
303
+ - `type AuthLocalSignInEvent`
304
+ - `type AuthLocalSignInEvents`
286
305
  - `type AuthLocalSignInFailures`
287
306
  - `type AuthLocalBackend`
288
307
  - `type AuthLocalPasswordStrategy`
289
308
  - `type AuthLocalRecoverySender`
290
309
  - `type AuthLocalConfirmationSender`
310
+ - `type AuthLocalEmailChangeSender`
291
311
  - `type AuthLocalConfirmationMode`
292
312
  - `type AuthLocalConfig`
293
313
  - `type AuthLocalDeliveries`
@@ -298,6 +318,14 @@ Exports
298
318
 
299
319
  ### test-support
300
320
 
321
+ ### `test-support/emailChangeScenario.js`
322
+ Exports
323
+ - `emailChangeService(backend)`
324
+ - `exerciseEmailChange(t, backend)`
325
+ Local functions
326
+ - `sessionCookies(session)`
327
+ - `tokenOf(delivery)`
328
+
301
329
  ### `test-support/emailConfirmationScenario.js`
302
330
  Exports
303
331
  - `exerciseEmailConfirmation(t, service, storedRegistrations, storedAccount)`
@@ -307,7 +335,7 @@ Local functions
307
335
 
308
336
  ### `test-support/localService.js`
309
337
  Exports
310
- - `localServiceOptions({ env = {}, emailRecovery = false, emailConfirmationSender = false } = {})`
338
+ - `localServiceOptions({ env = {}, emailRecovery = false, emailConfirmationSender = false, emailChangeSender = false } = {})`
311
339
 
312
340
  ### `test-support/oauthHarness.js`
313
341
  Exports
@@ -345,6 +373,13 @@ Local functions
345
373
  - `wrongCode(secret)`
346
374
  - `signIn(service, email)`
347
375
 
376
+ ### `test-support/sessionMetadataScenario.js`
377
+ Exports
378
+ - `exerciseSessionMetadata(t, { service, backend })`
379
+ - `requestFrom(ip, userAgent, cookies = {})`
380
+ Local functions
381
+ - `sessionCookies(session)`
382
+
348
383
  ### `test-support/signInThrottleScenario.js`
349
384
  Exports
350
385
  - `exerciseSignInThrottle(t, service)`