@artooi/ag-ui-web-component 0.2.1 → 0.3.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.
- package/CHANGELOG.md +46 -1
- package/README.md +12 -2
- package/dist/ag-ui-web-component.bundle.js +31 -28
- package/dist/ag-ui-web-component.bundle.js.map +4 -4
- package/dist/core/ag_ui_chat.d.ts +9 -0
- package/dist/core/ag_ui_chat.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +89 -17
- package/dist/index.js.map +3 -3
- package/dist/tools/parse_tool_catalog.d.ts +19 -0
- package/dist/tools/parse_tool_catalog.d.ts.map +1 -0
- package/dist/tools/route_map.d.ts.map +1 -1
- package/dist/tools/state_hook.d.ts.map +1 -1
- package/dist/ui/styles.d.ts +1 -1
- package/dist/ui/styles.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/core/ag_ui_chat.ts +76 -16
- package/src/index.ts +1 -0
- package/src/tools/parse_tool_catalog.ts +36 -0
- package/src/tools/route_map.ts +3 -2
- package/src/tools/state_hook.ts +12 -3
- package/src/ui/styles.ts +4 -1
- package/src/version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,49 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.3.0] — 2026-06-03
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- **`data-tools-url` — server tool-label catalog.** On connect the element
|
|
14
|
+
fetches a JSON catalog (`[{ name, summary, description? }]`) from the URL
|
|
15
|
+
(with `headers`) and uses it to label tool-call cards for **server-side tools**
|
|
16
|
+
whose schema never reaches the browser. Pairs with django-ag-ui's `tools/`
|
|
17
|
+
endpoint, so a tool's label flows from its server-side source (drf-mcp
|
|
18
|
+
`display_name`, `@tool(summary=…)`) with no per-tool client duplication.
|
|
19
|
+
Per-card label precedence: the tool's own `x-summary` → an explicit
|
|
20
|
+
`toolSummaries` entry → the fetched catalog → the raw name. Exports the
|
|
21
|
+
`ToolCatalogEntry` type and the `parseToolCatalog` helper.
|
|
22
|
+
|
|
23
|
+
## [0.2.2] — 2026-06-02
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
- **Friendly tool-call card labels.** The built-in tools now carry `x-summary`
|
|
27
|
+
labels (`navigate_to_route` → "Navigate", `list_routes` → "List pages",
|
|
28
|
+
`read_page` → "Read the page", state-hook `read_*`/`set_*` → "Read/Update
|
|
29
|
+
<name>"). For tools whose schema never reaches the browser — **server-side
|
|
30
|
+
tools** (drf-mcp, `@tool` registry) — a new `toolSummaries: Record<string,
|
|
31
|
+
string>` property maps tool name → label as a fallback (e.g.
|
|
32
|
+
`chat.toolSummaries = { list_projects: "Search projects" }`).
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
- A tool call that ends with **no client handler and no `TOOL_CALL_RESULT`** now
|
|
36
|
+
settles the card as **"No result returned."** instead of the misleading
|
|
37
|
+
"Executed on the server." (nothing executed it).
|
|
38
|
+
|
|
39
|
+
### Fixed
|
|
40
|
+
- **Incoming-text animations no longer double-fire.** Two distinct cases:
|
|
41
|
+
- *End of stream:* `data-text-animation="word"` wrapped the finished assistant
|
|
42
|
+
message into staggered `.word` spans on `TEXT_MESSAGE_END`, so a response
|
|
43
|
+
that had already streamed in re-animated itself one word at a time. The word
|
|
44
|
+
reveal now runs only when a message arrives **at once** (single text delta,
|
|
45
|
+
or an error bubble); a message streamed across multiple deltas keeps its
|
|
46
|
+
progressive reveal and isn't re-wrapped.
|
|
47
|
+
- *Reload from memory:* on rehydrate the whole transcript mounts at once, so
|
|
48
|
+
every restored assistant bubble animated its text in parallel (fade) or
|
|
49
|
+
re-wrapped word-by-word — wrong, since it's old content, not arriving. Restored
|
|
50
|
+
bubbles are now marked `message--restored`, excluded from the fade entrance
|
|
51
|
+
animation and never word-wrapped, so history appears statically.
|
|
52
|
+
|
|
10
53
|
## [0.2.1] — 2026-06-02
|
|
11
54
|
|
|
12
55
|
### Added
|
|
@@ -129,7 +172,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
129
172
|
### Notes
|
|
130
173
|
- First release — exercising the automated npm OIDC publish pipeline end-to-end.
|
|
131
174
|
|
|
132
|
-
[Unreleased]: https://github.com/Artui/ag-ui-web-component/compare/v0.
|
|
175
|
+
[Unreleased]: https://github.com/Artui/ag-ui-web-component/compare/v0.3.0...HEAD
|
|
176
|
+
[0.3.0]: https://github.com/Artui/ag-ui-web-component/compare/v0.2.2...v0.3.0
|
|
177
|
+
[0.2.2]: https://github.com/Artui/ag-ui-web-component/compare/v0.2.1...v0.2.2
|
|
133
178
|
[0.2.1]: https://github.com/Artui/ag-ui-web-component/compare/v0.2.0...v0.2.1
|
|
134
179
|
[0.2.0]: https://github.com/Artui/ag-ui-web-component/compare/v0.1.1...v0.2.0
|
|
135
180
|
[0.1.1]: https://github.com/Artui/ag-ui-web-component/compare/v0.1.0...v0.1.1
|
package/README.md
CHANGED
|
@@ -151,6 +151,7 @@ That's the whole integration: an `endpoint` attribute pointing at your AG-UI ser
|
|
|
151
151
|
| `data-slash-commands` | — | `"true"` to enable the `/`-command palette. |
|
|
152
152
|
| `data-skills` | — | Inline JSON skill catalog. |
|
|
153
153
|
| `data-skills-url` | — | URL of a JSON skill catalog (fetched with `headers`). |
|
|
154
|
+
| `data-tools-url` | — | URL of a server tool-label catalog (`[{ name, summary, description? }]`), fetched with `headers`; labels tool-call cards for server-side tools. |
|
|
154
155
|
| `collapsed` | `collapsed` | Reflected boolean; collapses the widget. Persisted per-tab in `sessionStorage`. |
|
|
155
156
|
| `theme` | — | CSS-only: `light` (default) / `dark` / `auto` / `code`. |
|
|
156
157
|
| `density` | — | CSS-only: `comfortable` (default) / `compact`. |
|
|
@@ -158,8 +159,17 @@ That's the whole integration: an `endpoint` attribute pointing at your AG-UI ser
|
|
|
158
159
|
|
|
159
160
|
**Properties** (JS only, not attributes): `headers`, `autoConfirm`, `confirmPredicate`,
|
|
160
161
|
`agentFactory`, `getTools`, `getContext`, `routeMap`, `navigate`, `getPageMap`,
|
|
161
|
-
`autoInjectPageMap`, `conversationStore`, `navigationResult`, `skillContext`,
|
|
162
|
-
`endpoint` / `toolDisplay` / `collapsed`.
|
|
162
|
+
`autoInjectPageMap`, `conversationStore`, `navigationResult`, `skillContext`, `toolSummaries`,
|
|
163
|
+
plus the mirrors `endpoint` / `toolDisplay` / `collapsed`.
|
|
164
|
+
|
|
165
|
+
`toolSummaries` is a `Record<string, string>` mapping tool name → a friendly card
|
|
166
|
+
label, used when a tool has no `x-summary` in its own schema. Built-in and client tools
|
|
167
|
+
should carry `x-summary` directly; this map is the seam for **server-side tools** (drf-mcp,
|
|
168
|
+
the django-ag-ui `@tool` registry), whose schema never reaches the browser — e.g.
|
|
169
|
+
`chat.toolSummaries = { list_projects: "Search projects" }`. Or point
|
|
170
|
+
`data-tools-url` at a server catalog endpoint (django-ag-ui's `tools/`) and the
|
|
171
|
+
labels are fetched automatically — per card, `x-summary` → an explicit
|
|
172
|
+
`toolSummaries` entry → the fetched catalog → the raw name.
|
|
163
173
|
|
|
164
174
|
**Methods**: `registerTool`, `registerStateHook`, `setSkills`, `appendMessage`, `newChat`,
|
|
165
175
|
`setCollapsed`, `toggleCollapsed`.
|