@genesislcap/ai-assistant 15.46.5-FUI-2648.1 → 15.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/ai-assistant.api.json +0 -65
  2. package/dist/ai-assistant.d.ts +16 -35
  3. package/dist/custom-elements.json +215 -21
  4. package/dist/dts/genesis/config.d.ts +30 -6
  5. package/dist/dts/genesis/config.d.ts.map +1 -1
  6. package/dist/dts/genesis/consumes.d.ts.map +1 -1
  7. package/dist/dts/genesis/event-fields.d.ts.map +1 -1
  8. package/dist/dts/genesis/filter-fields.d.ts +31 -0
  9. package/dist/dts/genesis/filter-fields.d.ts.map +1 -1
  10. package/dist/dts/genesis/index.d.ts +3 -1
  11. package/dist/dts/genesis/index.d.ts.map +1 -1
  12. package/dist/dts/genesis/reference-check.d.ts +83 -0
  13. package/dist/dts/genesis/reference-check.d.ts.map +1 -0
  14. package/dist/dts/genesis/reference-existence.d.ts +110 -0
  15. package/dist/dts/genesis/reference-existence.d.ts.map +1 -0
  16. package/dist/dts/genesis/resource-tools.d.ts +4 -4
  17. package/dist/dts/genesis/resource-tools.d.ts.map +1 -1
  18. package/dist/dts/genesis/review-model.d.ts +2 -2
  19. package/dist/dts/genesis/review-model.d.ts.map +1 -1
  20. package/dist/dts/genesis/row-source.d.ts +32 -0
  21. package/dist/dts/genesis/row-source.d.ts.map +1 -1
  22. package/dist/dts/genesis/server-text.d.ts +29 -0
  23. package/dist/dts/genesis/server-text.d.ts.map +1 -1
  24. package/dist/dts/genesis/types.d.ts +32 -5
  25. package/dist/dts/genesis/types.d.ts.map +1 -1
  26. package/dist/dts/genesis/write-payload.d.ts +14 -1
  27. package/dist/dts/genesis/write-payload.d.ts.map +1 -1
  28. package/dist/dts/genesis/write-plan.d.ts +8 -2
  29. package/dist/dts/genesis/write-plan.d.ts.map +1 -1
  30. package/dist/dts/genesis/write-tools.d.ts +5 -3
  31. package/dist/dts/genesis/write-tools.d.ts.map +1 -1
  32. package/dist/dts/genesis/write-turn.d.ts +4 -1
  33. package/dist/dts/genesis/write-turn.d.ts.map +1 -1
  34. package/dist/dts/main/main.d.ts +0 -16
  35. package/dist/dts/main/main.d.ts.map +1 -1
  36. package/dist/dts/main/main.styles.d.ts.map +1 -1
  37. package/dist/dts/main/main.template.d.ts +4 -7
  38. package/dist/dts/main/main.template.d.ts.map +1 -1
  39. package/dist/esm/genesis/config.js +152 -20
  40. package/dist/esm/genesis/consumes.js +2 -1
  41. package/dist/esm/genesis/event-fields.js +5 -8
  42. package/dist/esm/genesis/filter-fields.js +159 -78
  43. package/dist/esm/genesis/index.js +1 -0
  44. package/dist/esm/genesis/reference-check.js +132 -0
  45. package/dist/esm/genesis/reference-existence.js +283 -0
  46. package/dist/esm/genesis/resource-tools.js +135 -18
  47. package/dist/esm/genesis/review-model.js +3 -1
  48. package/dist/esm/genesis/row-source.js +107 -16
  49. package/dist/esm/genesis/server-text.js +52 -0
  50. package/dist/esm/genesis/write-payload.js +32 -4
  51. package/dist/esm/genesis/write-plan.js +3 -2
  52. package/dist/esm/genesis/write-tools.js +248 -44
  53. package/dist/esm/main/main.js +0 -21
  54. package/dist/esm/main/main.styles.js +0 -25
  55. package/dist/esm/main/main.template.js +34 -76
  56. package/dist/genesis-consumes.cjs +3 -2
  57. package/dist/genesis-consumes.cjs.map +2 -2
  58. package/dist/genesis-consumes.mjs +3 -2
  59. package/dist/genesis-consumes.mjs.map +2 -2
  60. package/docs/genesis.md +131 -21
  61. package/docs/styling.md +0 -130
  62. package/package.json +17 -17
  63. package/scripts/smoke-genesis-consumes-node.mjs +2 -2
package/docs/styling.md CHANGED
@@ -54,14 +54,8 @@ Parts on the conversation area (the outer frame exposes many more — e.g.
54
54
  | Part | Element |
55
55
  | --- | --- |
56
56
  | `chat-wrapper` | Outer frame (header + messages + composer) |
57
- | `conversation` | Holds the `stepper` slot and the scroll area, and nothing else |
58
- | `conversation-has-stepper` | That container, only while something is slotted into `stepper` |
59
57
  | `messages` | Scroll container (full width; owns the scrollbar) |
60
58
  | `messages-content` | Width-capped, centred column that holds every message |
61
- | `message-row` | Every message row — the flex line holding one avatar and one bubble |
62
- | `message-row-user` / `message-row-assistant` | That row, by **role** |
63
- | `message-row-<type>` | That row for one kind of message: `message-row-user`, `message-row-ai`, `message-row-ai-thinking`, `message-row-ai-function`, `message-row-interaction` |
64
- | `message-row-interaction-<presentation>` | An interaction row in one presentation: `message-row-interaction-label`, `-bare`, `-bubble` |
65
59
  | `message` | Every message bubble |
66
60
  | `message-<type>` | A bubble of one kind: `message-user`, `message-ai`, `message-ai-thinking`, `message-ai-function`, `message-interaction` |
67
61
  | `message-interaction-<presentation>` | An interaction bubble in one presentation: `message-interaction-label`, `message-interaction-bare`, `message-interaction-bubble` |
@@ -130,130 +124,6 @@ foundation-ai-assistant::part(message) {
130
124
  }
131
125
  ```
132
126
 
133
- ### Laying something out beside the conversation
134
-
135
- The assistant's column holds a lot: a header, a splash overlay, the scroll area,
136
- attachment chips, a blocked banner and the composer. Flexing the scroll area
137
- against something else used to mean flexing all of that.
138
-
139
- `conversation` is a container whose only two children are a `stepper` slot and
140
- the scroll area, so a host gets exactly two boxes to lay out:
141
-
142
- ```html
143
- <foundation-ai-assistant>
144
- <rapid-stepper slot="stepper" indicator-only hide-progress></rapid-stepper>
145
- </foundation-ai-assistant>
146
- ```
147
-
148
- ```css
149
- /* Side by side, only when something is actually slotted */
150
- foundation-ai-assistant::part(conversation-has-stepper) {
151
- flex-direction: row;
152
- gap: 16px;
153
- }
154
- ```
155
-
156
- The slot is named for the case it was built for, but nothing about it is
157
- stepper-specific — any single element works.
158
-
159
- Two things worth knowing:
160
-
161
- **Slotted content stays in the light DOM**, so you style your own element with
162
- ordinary CSS — no parts, no `::slotted`, no shadow boundary to cross:
163
-
164
- ```css
165
- rapid-stepper[slot='stepper'] {
166
- flex: 0 0 240px;
167
- }
168
- ```
169
-
170
- **Use `conversation-has-stepper`, not `conversation`,** for the layout switch.
171
- The container is always rendered, so a `flex-direction: row` on the bare name is
172
- live even when the slot is empty — harmless today, but it is a rule that means
173
- nothing until the slot is filled. The state name says what you actually mean.
174
-
175
- With the slot empty the container contributes no box of its own, so the column
176
- lays out exactly as it did before the container existed.
177
-
178
- ### Rows vs bubbles
179
-
180
- `message-row` is the flex line; `message` is the bubble sitting on it. Both carry
181
- the same vocabulary (`-user` / `-assistant` / `-<type>`), so pick by what you are
182
- actually changing:
183
-
184
- | You want to change | Select |
185
- | --- | --- |
186
- | Bubble colour, padding, radius, width | `message` |
187
- | Space between avatar and bubble, which side the row sits on, the entrance animation | `message-row` |
188
-
189
- ```css
190
- /* Loosen the whole conversation */
191
- foundation-ai-assistant::part(message-row) {
192
- gap: 16px;
193
- margin-block: 12px;
194
- }
195
-
196
- /* Drop the slide-in without touching anything else */
197
- foundation-ai-assistant::part(message-row) {
198
- animation: none;
199
- }
200
-
201
- /* Every assistant row, whatever its type */
202
- foundation-ai-assistant::part(message-row-assistant) {
203
- padding-inline-end: 48px;
204
- }
205
- ```
206
-
207
- #### Left-aligning user messages
208
-
209
- By default a user row is `flex-direction: row-reverse`, which puts the avatar and
210
- bubble on the right. That default stays; an app opts out through the row part.
211
-
212
- Because `::part()` rules come from the outer tree, they beat the component's own
213
- rules for normal declarations — no `!important` is needed:
214
-
215
- ```css
216
- /* 1. The row itself: avatar and bubble move to the left. */
217
- foundation-ai-assistant::part(message-row-user) {
218
- flex-direction: row;
219
- }
220
-
221
- /* 2. The bubble's squared "tail" points at the avatar, so move it to the other
222
- corner — this is the same radius the assistant bubble already uses. */
223
- foundation-ai-assistant::part(message-user) {
224
- border-radius: 4px 18px 18px;
225
- }
226
-
227
- /* 3. The entrance slides in from the right, which now runs against the layout.
228
- `@keyframes` resolve in the tree that set `animation-name`, so define your
229
- own in the app stylesheet — the component's are not reachable from outside. */
230
- @keyframes user-row-slide-in-left {
231
- from { opacity: 0%; transform: translateX(-16px); }
232
- to { opacity: 100%; transform: translateX(0); }
233
- }
234
-
235
- foundation-ai-assistant::part(message-row-user) {
236
- animation: user-row-slide-in-left 0.25s ease-out;
237
- }
238
- ```
239
-
240
- Rule 1 alone achieves the layout change; 2 and 3 are the details that otherwise
241
- give it away. Drop rule 3 entirely (`animation: none`) if you would rather have
242
- no entrance at all.
243
-
244
- **Use the type name, not the bare one.** `::part(message-row)` is every row, so
245
- setting `flex-direction` there also collapses the `column` layout that `label`
246
- and `bare` interaction rows depend on. `message-row-user` changes only what you
247
- mean to change.
248
-
249
- The loading-indicator row carries `message-row`, `message-row-assistant` and
250
- `message-row-ai` alongside its own `thinking`, so rules meant for "every row"
251
- reach it too — and `thinking` stays the precise name for just that row.
252
-
253
- The two full-width dividers are deliberately **not** `message-row`: they are not
254
- avatar-plus-bubble lines, and flex rules written for rows would not suit them.
255
- They keep their own names, `agent-switch-indicator` and `compaction-divider`.
256
-
257
127
  ### The composer
258
128
 
259
129
  The message box is one bordered surface (`composer`) holding the textarea and,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/ai-assistant",
3
3
  "description": "Genesis AI Assistant micro-frontend",
4
- "version": "15.46.5-FUI-2648.1",
4
+ "version": "15.47.0",
5
5
  "license": "SEE LICENSE IN license.txt",
6
6
  "main": "dist/esm/index.js",
7
7
  "types": "dist/ai-assistant.d.ts",
@@ -92,31 +92,31 @@
92
92
  }
93
93
  },
94
94
  "devDependencies": {
95
- "@genesislcap/foundation-comms": "15.46.5-FUI-2648.1",
96
- "@genesislcap/foundation-testing": "15.46.5-FUI-2648.1",
97
- "@genesislcap/genx": "15.46.5-FUI-2648.1",
98
- "@genesislcap/ts-builder": "15.46.5-FUI-2648.1",
99
- "@genesislcap/uvu-playwright-builder": "15.46.5-FUI-2648.1",
100
- "@genesislcap/vite-builder": "15.46.5-FUI-2648.1",
101
- "@genesislcap/webpack-builder": "15.46.5-FUI-2648.1",
95
+ "@genesislcap/foundation-comms": "15.47.0",
96
+ "@genesislcap/foundation-testing": "15.47.0",
97
+ "@genesislcap/genx": "15.47.0",
98
+ "@genesislcap/ts-builder": "15.47.0",
99
+ "@genesislcap/uvu-playwright-builder": "15.47.0",
100
+ "@genesislcap/vite-builder": "15.47.0",
101
+ "@genesislcap/webpack-builder": "15.47.0",
102
102
  "@types/dompurify": "^3.0.5",
103
103
  "@types/marked": "^5.0.2",
104
104
  "esbuild": "0.25.12"
105
105
  },
106
106
  "dependencies": {
107
- "@genesislcap/foundation-ai": "15.46.5-FUI-2648.1",
108
- "@genesislcap/foundation-logger": "15.46.5-FUI-2648.1",
109
- "@genesislcap/foundation-notifications": "15.46.5-FUI-2648.1",
110
- "@genesislcap/foundation-redux": "15.46.5-FUI-2648.1",
111
- "@genesislcap/foundation-ui": "15.46.5-FUI-2648.1",
112
- "@genesislcap/foundation-utils": "15.46.5-FUI-2648.1",
113
- "@genesislcap/rapid-design-system": "15.46.5-FUI-2648.1",
114
- "@genesislcap/web-core": "15.46.5-FUI-2648.1",
107
+ "@genesislcap/foundation-ai": "15.47.0",
108
+ "@genesislcap/foundation-logger": "15.47.0",
109
+ "@genesislcap/foundation-notifications": "15.47.0",
110
+ "@genesislcap/foundation-redux": "15.47.0",
111
+ "@genesislcap/foundation-ui": "15.47.0",
112
+ "@genesislcap/foundation-utils": "15.47.0",
113
+ "@genesislcap/rapid-design-system": "15.47.0",
114
+ "@genesislcap/web-core": "15.47.0",
115
115
  "dompurify": "^3.3.1",
116
116
  "marked": "^17.0.3"
117
117
  },
118
118
  "peerDependencies": {
119
- "@genesislcap/foundation-comms": "^15.46.5-FUI-2648.1"
119
+ "@genesislcap/foundation-comms": "^15.47.0"
120
120
  },
121
121
  "peerDependenciesMeta": {
122
122
  "@genesislcap/foundation-comms": {
@@ -20,8 +20,8 @@ const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..');
20
20
  const require = createRequire(import.meta.url);
21
21
 
22
22
  const EXPECTED = {
23
- kinds: ['request', 'event'],
24
- resourceFields: ['name', 'kind', 'op', 'context', 'maxRows', 'customCode'],
23
+ kinds: ['request', 'event', 'query'],
24
+ resourceFields: ['name', 'kind', 'op', 'context', 'maxRows', 'customCode', 'references'],
25
25
  vendors: ['anthropic', 'gemini'],
26
26
  tiers: ['low', 'high', 'reasoning'],
27
27
  };