@jskit-ai/agent-docs 0.1.273 → 0.1.275

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 (104) hide show
  1. package/guide/agent/app-extras/assistant-conversation.md +7 -1
  2. package/guide/agent/app-extras/assistant-voice.md +5 -1
  3. package/guide/agent/app-setup/material-3-migration.md +180 -0
  4. package/guide/agent/app-setup/upgrading-jskit.md +5 -0
  5. package/guide/agent/framework/material-3.md +316 -73
  6. package/guide/agent/framework/ui-operations.md +18 -35
  7. package/guide/agent/framework/ui-pass.md +155 -0
  8. package/guide/agent/index.md +3 -0
  9. package/package.json +1 -1
  10. package/patterns/feature-package/example/booking-engine/package.json +1 -1
  11. package/patterns/minimal-foundation/example/package.json +5 -4
  12. package/patterns/minimal-foundation/example/src/main.js +5 -11
  13. package/patterns/minimal-foundation/example/src/pages/home/index.vue +5 -18
  14. package/patterns/minimal-foundation/example/src/theme/index.js +9 -0
  15. package/patterns/minimal-foundation/example/src/views/NotFound.vue +5 -4
  16. package/patterns/shell-foundation/example/package.json +6 -6
  17. package/patterns/shell-foundation/example/packages/main/package.json +1 -1
  18. package/patterns/shell-foundation/example/src/main.js +5 -11
  19. package/patterns/shell-foundation/example/src/pages/home/index.vue +21 -57
  20. package/patterns/shell-foundation/example/src/pages/home/settings/general/index.vue +24 -19
  21. package/patterns/shell-foundation/example/src/pages/home/settings.vue +27 -84
  22. package/patterns/shell-foundation/example/src/theme/index.js +9 -0
  23. package/patterns/shell-foundation/example/src/views/NotFound.vue +9 -7
  24. package/reference/autogen/PATTERN_INDEX.md +37 -37
  25. package/reference/autogen/README.md +1 -0
  26. package/reference/autogen/packages/agent-docs.md +8 -4
  27. package/reference/autogen/packages/assistant-core.md +3 -0
  28. package/reference/autogen/packages/console-web.md +5 -0
  29. package/reference/autogen/packages/http-web.md +29 -2
  30. package/reference/autogen/packages/kernel.md +2 -1
  31. package/reference/autogen/packages/material-web.md +54 -0
  32. package/reference/autogen/packages/shell-web.md +121 -9
  33. package/reference/autogen/tooling/jskit-catalog.md +81 -0
  34. package/reference/autogen/tooling/testUtils.md +7 -0
  35. package/skills/jskit/SKILL.md +11 -6
  36. package/skills/jskit/references/heuristics/INDEX.md +1 -1
  37. package/skills/jskit/references/heuristics/ui-contract.md +10 -7
  38. package/skills/jskit/references/heuristics/ui-testing.md +5 -3
  39. package/skills/jskit/references/material-3.md +315 -72
  40. package/skills/jskit/references/pattern-index.md +37 -37
  41. package/skills/jskit/references/patterns/app/minimal-foundation/example/package.json +5 -4
  42. package/skills/jskit/references/patterns/app/minimal-foundation/example/src/main.js +5 -11
  43. package/skills/jskit/references/patterns/app/minimal-foundation/example/src/pages/home/index.vue +5 -18
  44. package/skills/jskit/references/patterns/app/minimal-foundation/example/src/theme/index.js +9 -0
  45. package/skills/jskit/references/patterns/app/minimal-foundation/example/src/views/NotFound.vue +5 -4
  46. package/skills/jskit/references/patterns/app/shell-foundation/example/package.json +6 -6
  47. package/skills/jskit/references/patterns/app/shell-foundation/example/packages/main/package.json +1 -1
  48. package/skills/jskit/references/patterns/app/shell-foundation/example/src/main.js +5 -11
  49. package/skills/jskit/references/patterns/app/shell-foundation/example/src/pages/home/index.vue +21 -57
  50. package/skills/jskit/references/patterns/app/shell-foundation/example/src/pages/home/settings/general/index.vue +24 -19
  51. package/skills/jskit/references/patterns/app/shell-foundation/example/src/pages/home/settings.vue +27 -84
  52. package/skills/jskit/references/patterns/app/shell-foundation/example/src/theme/index.js +9 -0
  53. package/skills/jskit/references/patterns/app/shell-foundation/example/src/views/NotFound.vue +9 -7
  54. package/skills/jskit/references/patterns/assistant/assistant-surface/example/src/placement.js +1 -1
  55. package/skills/jskit/references/patterns/auth/accounts-hub/example/package.json +2 -2
  56. package/skills/jskit/references/patterns/auth/oidc-sign-in/example/package.json +2 -2
  57. package/skills/jskit/references/patterns/auth/supabase-auth/example/package.json +1 -1
  58. package/skills/jskit/references/patterns/connectors/calendar-cli/example/package.json +4 -4
  59. package/skills/jskit/references/patterns/console/console-surface/PATTERN.md +4 -2
  60. package/skills/jskit/references/patterns/console/console-surface/example/src/pages/console/index.vue +10 -40
  61. package/skills/jskit/references/patterns/console/console-surface/example/src/pages/console/settings/index.vue +3 -11
  62. package/skills/jskit/references/patterns/console/console-surface/example/src/pages/console/settings.vue +24 -72
  63. package/skills/jskit/references/patterns/console/console-surface/example/src/placement.js +28 -0
  64. package/skills/jskit/references/patterns/crud/crud-screen-set/PATTERN.md +13 -0
  65. package/skills/jskit/references/patterns/crud/crud-screen-set/example/books/BookEditPage.vue +2 -0
  66. package/skills/jskit/references/patterns/crud/crud-screen-set/example/books/BookFormFields.vue +0 -6
  67. package/skills/jskit/references/patterns/crud/crud-screen-set/example/books/BookListPage.vue +5 -2
  68. package/skills/jskit/references/patterns/crud/crud-screen-set/example/books/BookNewPage.vue +2 -0
  69. package/skills/jskit/references/patterns/crud/crud-screen-set/example/books/BookViewPage.vue +5 -9
  70. package/skills/jskit/references/patterns/crud/json-api-resource-package/example/packages/books/package.json +2 -2
  71. package/skills/jskit/references/patterns/database/mysql-application/example/package.json +1 -1
  72. package/skills/jskit/references/patterns/database/postgres-application/example/package.json +1 -1
  73. package/skills/jskit/references/patterns/realtime/realtime-application/example/package.json +2 -2
  74. package/skills/jskit/references/patterns/server/feature-package/example/booking-engine/package.json +1 -1
  75. package/skills/jskit/references/patterns/shell/application-shell/PATTERN.md +3 -1
  76. package/skills/jskit/references/patterns/shell/application-shell/example/expected-existing/src/pages/home/index.vue +5 -18
  77. package/skills/jskit/references/patterns/shell/application-shell/example/expected-existing/src/views/NotFound.vue +14 -0
  78. package/skills/jskit/references/patterns/shell/application-shell/example/src/pages/home/index.vue +21 -57
  79. package/skills/jskit/references/patterns/shell/application-shell/example/src/pages/home/settings/general/index.vue +24 -19
  80. package/skills/jskit/references/patterns/shell/application-shell/example/src/pages/home/settings.vue +27 -84
  81. package/skills/jskit/references/patterns/shell/application-shell/example/src/views/NotFound.vue +15 -0
  82. package/skills/jskit/references/patterns/ui/page-and-placement/example/src/components/SyncStatusElement.vue +2 -2
  83. package/skills/jskit/references/patterns/ui/page-and-placement/example/src/pages/home/reports/activity.vue +1 -1
  84. package/skills/jskit/references/patterns/ui/page-and-placement/example/src/pages/home/reports/overview.vue +1 -1
  85. package/skills/jskit/references/patterns/ui/page-and-placement/example/src/pages/home/reports.vue +6 -3
  86. package/skills/jskit/references/patterns/ui/page-and-placement/example/src/placement.js +1 -1
  87. package/skills/jskit/references/patterns/users/account-settings/example/src/components/account/settings/AccountSettingsNotificationsSection.vue +2 -8
  88. package/skills/jskit/references/patterns/users/account-settings/example/src/components/account/settings/AccountSettingsPreferencesSection.vue +2 -8
  89. package/skills/jskit/references/patterns/users/account-settings/example/src/components/account/settings/AccountSettingsProfileSection.vue +5 -11
  90. package/skills/jskit/references/patterns/users/account-settings/example/src/components/account/settings/AccountSettingsSignInMethodsSection.vue +3 -9
  91. package/skills/jskit/references/patterns/users/account-settings/example/src/pages/account/index.vue +7 -0
  92. package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users/package.json +2 -2
  93. package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users-workspace/package.json +3 -3
  94. package/skills/jskit/references/patterns/workspaces/workspace-surfaces/example/packages/main/src/client/components/AccountPendingInvitesCue.vue +1 -2
  95. package/skills/jskit/references/patterns/workspaces/workspace-surfaces/example/src/components/WorkspaceNotFoundCard.vue +5 -6
  96. package/skills/jskit/references/patterns/workspaces/workspace-surfaces/example/src/pages/admin/workspace/settings/index.vue +5 -12
  97. package/skills/jskit/references/patterns/workspaces/workspace-surfaces/example/src/pages/admin/workspace/settings.vue +24 -72
  98. package/skills/jskit/references/patterns/workspaces/workspace-surfaces/example/src/surfaces/admin/index.vue +3 -4
  99. package/skills/jskit/references/patterns/workspaces/workspace-surfaces/example/src/surfaces/app/index.vue +3 -3
  100. package/skills/jskit/references/ui-operations.md +18 -35
  101. package/skills/jskit/references/ui-pass.md +150 -0
  102. package/patterns/shell-foundation/example/src/pages/home/settings/index.vue +0 -7
  103. package/skills/jskit/references/patterns/app/shell-foundation/example/src/pages/home/settings/index.vue +0 -7
  104. package/skills/jskit/references/patterns/shell/application-shell/example/src/pages/home/settings/index.vue +0 -7
@@ -1106,6 +1106,11 @@ The always-visible `avatar-control` slot receives `{ size, height }` beside
1106
1106
  Show/Hide. An application can use it for a collapsed active-mic
1107
1107
  indicator or control without placing voice state in the conversation element.
1108
1108
  The element supplies no audio session or control actions.
1109
+ The optional `avatar-thumbnail` slot receives the same scope and replaces the
1110
+ collapsed **Show avatar** button's anonymous icon with application artwork, such
1111
+ as a still miniature of the avatar about 28 pixels across. The button's round
1112
+ 32-pixel disc clips it to a circle; its label, title and 44-pixel target stay
1113
+ the same. Without the slot the button shows the anonymous icon.
1109
1114
 
1110
1115
  The effective artwork height uses the conversation container's actual remaining
1111
1116
  space after its composer, feedback, support and other controls, leaving a target
@@ -1257,7 +1262,8 @@ surface failures in `error`; return `false` on unsuccessful creation. The shared
1257
1262
  `AssistantGoalControl` owns the form and presentation, not a scheduler or goal
1258
1263
  storage. Supported statuses are `active`, `paused`, `blocked`, `usageLimited`,
1259
1264
  `budgetLimited`, and `complete`. The UI offers creation only without an unfinished
1260
- goal and offers Pause/Resume only for their applicable statuses. `pending`
1265
+ goal and offers Pause/Resume only for their applicable statuses. Its menu closes
1266
+ after a successful Start or Cancel and stays open after Pause and Resume. `pending`
1261
1267
  disables Set and Resume; `stopPending` disables Pause and Cancel, which the
1262
1268
  supplied binding never blocks on message sending or unknown delivery.
1263
1269
 
@@ -323,7 +323,11 @@ the `reopen` slot and use `controller.reveal()` from its own header indicator.
323
323
 
324
324
  The host's `avatar` slot receives `state`, `mouthLevel`, `mouthPose`, `avatar` and
325
325
  `binding`. `VoiceAvatar` and `useVoiceAvatar` supply generic presentation; an
326
- application may provide artwork without acquiring audio ownership.
326
+ application may provide artwork without acquiring audio ownership. A `still`
327
+ avatar (`VoiceAvatar`'s `still` prop, or `still: true` in the props given to
328
+ `useVoiceAvatar`), such as a thumbnail, holds its state's expression: it never
329
+ blinks, gestures, cycles expressions or moves its mouth, and `reducedMotion` is
330
+ true for it, so the artwork can stop its own CSS motion too.
327
331
 
328
332
  ## Authorized speech connection
329
333
 
@@ -0,0 +1,180 @@
1
+ <!-- Generated by `npm run agent-docs:build` from `packages/agent-docs/site/guide/app-setup/material-3-migration.md`. Do not edit manually. -->
2
+
3
+ ---
4
+ title: Move an app to the Material 3 defaults
5
+ description: What an existing JSKIT app changes, and what it deletes, once its JSKIT packages draw exact Material 3 themselves.
6
+ ---
7
+
8
+ # Move an app to the Material 3 defaults
9
+
10
+ From this release the JSKIT web packages draw exact Material 3 themselves, in
11
+ light and dark, on phone, tablet and desktop: the shell, its app bar and
12
+ navigation, list-detail pages and the CRUD list, view, new and edit screens.
13
+ An app needs no CSS, overrides or patches of its own to look right, so moving
14
+ an existing app is mostly deleting. [Material 3](../framework/material-3.md)
15
+ describes the result; this page lists what changes in an app's source.
16
+
17
+ Upgrade the JSKIT packages together first ([Upgrade JSKIT](./upgrading-jskit.md)),
18
+ then work through the sections below. Nothing here changes a feature, field,
19
+ action, permission or validation.
20
+
21
+ ## 1. Theme: one seed, from `@jskit-ai/material-web`
22
+
23
+ Add `@jskit-ai/material-web` to the app's dependencies and build Vuetify from
24
+ it in `src/main.js`:
25
+
26
+ ```js
27
+ import "vuetify/styles";
28
+ import "@jskit-ai/material-web/client/material.css";
29
+ import { createVuetify } from "vuetify";
30
+ import * as components from "vuetify/components";
31
+ import * as directives from "vuetify/directives";
32
+ import { createMaterialVuetifyOptions } from "@jskit-ai/material-web/client";
33
+ import { theme } from "./theme/index.js";
34
+
35
+ const vuetify = createVuetify({ components, directives, ...createMaterialVuetifyOptions(theme) });
36
+ ```
37
+
38
+ `src/theme/index.js` holds the app's only theme facts:
39
+
40
+ ```js
41
+ export const theme = {
42
+ seed: "#6750A4",
43
+ colors: {},
44
+ icons: {}
45
+ };
46
+ ```
47
+
48
+ - Delete hand-written `themes: { light: {...}, dark: {...} }` blocks and every
49
+ hand-picked hex colour. Both schemes come from `seed`, with every Material 3
50
+ role (`primary-container`, `surface-container-high`, `outline-variant`, ...)
51
+ as a theme colour.
52
+ - A colour the app really owns (a partner brand, a status of its own) goes in
53
+ `colors` by camelCase name, such as `partner: "#0A7D3E"`. It becomes
54
+ `partner`, `on-partner`, `partner-container` and `on-partner-container`,
55
+ harmonized to the seed, in both schemes. `success`, `warning` and `info` are
56
+ already there.
57
+ - Delete `defaultTheme: "light"`. The app now follows the device's light or
58
+ dark setting.
59
+
60
+ ## 2. Delete the app's chrome CSS
61
+
62
+ Delete, rather than port:
63
+
64
+ - rules that restyle the shell's app bar, drawer, rail, navigation bar or page
65
+ title, and every `--shell-*` and `--shell-chrome-*` custom property (the shell
66
+ no longer reads them);
67
+ - `v-sheet border` panels and outlined cards used as page sections: Material 3
68
+ cards are elevated (`v-card`, the default) or filled
69
+ (`variant="flat" color="surface-container-highest"`), and a section on the
70
+ page needs no frame at all;
71
+ - `!important`, Sass variable overrides and component size or radius tweaks.
72
+ `material.css` sets 40dp buttons with a 48dp touch target, 12dp cards, 28dp
73
+ dialogs and sheets, 8dp chips and 16dp FABs, and an app's own props still win.
74
+
75
+ Use colour roles (`color="secondary-container"`, `bg-color="surface-container-high"`,
76
+ the `on-surface-variant` class) instead of colours.
77
+
78
+ ## 3. Icons: `$aliases`, not `mdi-*`
79
+
80
+ Replace `mdi-*` strings and `@mdi/js` imports with Vuetify aliases, which are
81
+ Material Symbols Rounded glyphs named in camelCase: `mdi-pencil` becomes
82
+ `$edit`, `mdi-delete` `$delete`, `mdi-cog-outline` `$settings`,
83
+ `mdi-account-circle` `$accountCircle`, `mdi-alert-circle` `$error`,
84
+ `mdi-dots-vertical` `$moreVert`. Then remove `@mdi/js` from `package.json`.
85
+ The full list is `@jskit-ai/material-web/client/symbols`; a glyph JSKIT lacks
86
+ goes in `theme.icons` as its 24x24 path data and works as `$name` everywhere.
87
+
88
+ ## 4. Typography: Material 3 type classes
89
+
90
+ Vuetify 4 has no Material 2 type classes, so text using them is unstyled.
91
+ Rename them:
92
+
93
+ | Material 2 class | Material 3 class |
94
+ | --- | --- |
95
+ | `text-h1`, `text-h2`, `text-h3` | `text-display-large`, `text-display-medium`, `text-display-small` |
96
+ | `text-h4`, `text-h5`, `text-h6` | `text-headline-large`, `text-headline-small`, `text-title-large` |
97
+ | `text-subtitle-1`, `text-subtitle-2` | `text-title-medium`, `text-title-small` |
98
+ | `text-body-1`, `text-body-2`, `text-caption` | `text-body-large`, `text-body-medium`, `text-body-small` |
99
+ | `text-button`, `text-overline` | `text-label-large`, `text-label-small` |
100
+ | `text-medium-emphasis` | `on-surface-variant` |
101
+
102
+ ## 5. Pages: titles, parents and the Up arrow
103
+
104
+ Each page declares its app bar title, and each inner page the page it belongs
105
+ to, in its `definePage()` block:
106
+
107
+ ```js
108
+ definePage({ meta: { jskit: { title: "Edit book", parent: "/books/:bookId" } } });
109
+ ```
110
+
111
+ `parent` is a path on the page's own surface, or `{ surface, path }` for
112
+ another one. A main navigation destination declares no parent and shows no
113
+ arrow. The shell's Up arrow returns to the page the person came from, or else
114
+ to the parent, so:
115
+
116
+ - delete "Back to X" buttons, `router.back()` and `history.back()` calls;
117
+ - delete redirects from a settings or section landing page to its first child.
118
+ A settings page is a list-detail page (`ShellListDetail`): on wide windows the
119
+ list stays beside the open section, and on narrow ones the list is the
120
+ landing page. Its `index.vue`, if it keeps one, is the empty detail
121
+ placeholder.
122
+
123
+ ## 6. Page actions go in the app bar
124
+
125
+ A page's own actions (Save, Edit, Delete, Refresh) move from rows of buttons in
126
+ the content into the app bar:
127
+
128
+ ```vue
129
+ <ShellPageActions>
130
+ <ShellPageAction icon="$edit" label="Edit" :to="editPath" />
131
+ <ShellPageAction primary label="Save" @click="save" />
132
+ </ShellPageActions>
133
+ ```
134
+
135
+ At most one action is `primary`; on compact windows the others show as icon
136
+ buttons named by their label.
137
+
138
+ ## 7. CRUD screens
139
+
140
+ The CRUD screens apply all of this themselves. An app that customized them
141
+ changes:
142
+
143
+ - **List.** The create action is an extended FAB on compact and medium windows
144
+ and the app bar's primary action on wider ones. Cards and table rows open the
145
+ record when tapped; their overflow menu holds the other record actions. A
146
+ table row's Open is a trailing chevron. Cards no longer show the record's id;
147
+ a list shows names and figures, never ids.
148
+ `CrudListRecordActionMenu` takes a `title` (the record's title, for its
149
+ accessible name) instead of `buttonLabel`, `buttonVariant` and `buttonSize`.
150
+ Filters are one chip row; the Filters chip opens every control in a bottom
151
+ sheet (compact) or a dialog.
152
+ - **View.** Drop `resource-plural-title` from `CrudViewScreen`. Its `fields`
153
+ slot is a list of value-first items:
154
+
155
+ ```vue
156
+ <template #fields="{ view }">
157
+ <v-list-item :title="view.record?.author" subtitle="Author" />
158
+ </template>
159
+ ```
160
+
161
+ - **New and edit.** Cancel and Save are in the app bar. Save, Cancel and delete
162
+ replace the form's history entry, so Back no longer reopens a finished form.
163
+ `useCrudDeleteAction()` no longer takes a `router` option.
164
+ - **Translations.** `jskit.http.actions.actions` and `jskit.http.crud.view.backTo`
165
+ are gone; `jskit.http.crud.list.recordActions` ("Actions for {title}") and
166
+ `jskit.shell.actions.back` are new.
167
+
168
+ ## 8. The navigation drawer and app tests
169
+
170
+ The drawer is 360dp wide; `drawerWidth="content"` on `ShellLayout` sizes it to
171
+ its items instead. Medium windows show the navigation rail, whose menu control
172
+ opens the drawer over the page. A modal drawer opens over the app bar, as
173
+ Material 3 draws it, so a browser test that clicked the menu control again to
174
+ close it taps the scrim or presses Escape instead.
175
+
176
+ ## 9. Check it
177
+
178
+ Look at every screen at 390, 768 and 1280 pixels wide, in light and dark. A
179
+ change that needs app CSS to look right is a JSKIT default to report, not a
180
+ rule to add.
@@ -184,6 +184,11 @@ bridges, JSON:API result transformers, `patch-package` patches, and deep
184
184
  `.assistant-*` layout overrides that duplicated those framework owners. Keep
185
185
  the public assistant surface id and normal page composition unchanged.
186
186
 
187
+ The release that makes the JSKIT web packages exact Material 3 also changes
188
+ app source: the theme, icons, type classes, page titles and parents, and page
189
+ actions. [Move an app to the Material 3 defaults](./material-3-migration.md)
190
+ lists each change, most of which delete app CSS and overrides.
191
+
187
192
  Commit `package.json`, every changed workspace manifest, and
188
193
  `package-lock.json` together. Do not hand-edit one JSKIT version after the
189
194
  updater succeeds; select a different published cohort only through a catalog