glchat-a2ui-react-renderer 0.3.6 → 0.4.1

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 (128) hide show
  1. package/README.md +200 -267
  2. package/dist/index.d.ts +13 -6
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +14 -4
  5. package/dist/src/Provider.d.ts +33 -8
  6. package/dist/src/Provider.d.ts.map +1 -1
  7. package/dist/src/Provider.js +12 -10
  8. package/dist/src/SurfaceRenderer.d.ts +7 -1
  9. package/dist/src/SurfaceRenderer.d.ts.map +1 -1
  10. package/dist/src/SurfaceRenderer.js +2 -2
  11. package/dist/src/components/a2ui/v0_9/AudioPlayer/AudioPlayer.d.ts +1 -5
  12. package/dist/src/components/a2ui/v0_9/AudioPlayer/AudioPlayer.d.ts.map +1 -1
  13. package/dist/src/components/a2ui/v0_9/AudioPlayer/AudioPlayer.js +2 -12
  14. package/dist/src/components/a2ui/v0_9/Button/Button.d.ts +73 -239
  15. package/dist/src/components/a2ui/v0_9/Button/Button.d.ts.map +1 -1
  16. package/dist/src/components/a2ui/v0_9/Button/Button.js +2 -13
  17. package/dist/src/components/a2ui/v0_9/ChoicePicker/ChoicePicker.d.ts +1 -8
  18. package/dist/src/components/a2ui/v0_9/ChoicePicker/ChoicePicker.d.ts.map +1 -1
  19. package/dist/src/components/a2ui/v0_9/ChoicePicker/ChoicePicker.js +2 -51
  20. package/dist/src/components/a2ui/v0_9/TagInput/TagInput.d.ts +40 -196
  21. package/dist/src/components/a2ui/v0_9/TagInput/TagInput.d.ts.map +1 -1
  22. package/dist/src/components/a2ui/v0_9/TagInput/TagInput.js +3 -10
  23. package/dist/src/components/a2ui/v0_9/Timeout/Timeout.d.ts +24 -100
  24. package/dist/src/components/a2ui/v0_9/Timeout/Timeout.d.ts.map +1 -1
  25. package/dist/src/components/a2ui/v0_9/Timeout/Timeout.js +3 -23
  26. package/dist/src/components/a2ui/v0_9/common.d.ts +11 -57
  27. package/dist/src/components/a2ui/v0_9/common.d.ts.map +1 -1
  28. package/dist/src/components/a2ui/v0_9/common.js +0 -9
  29. package/dist/src/components/a2ui/v1_0/AudioPlayer/AudioPlayer.d.ts +3 -0
  30. package/dist/src/components/a2ui/v1_0/AudioPlayer/AudioPlayer.d.ts.map +1 -0
  31. package/dist/src/components/a2ui/v1_0/AudioPlayer/AudioPlayer.js +6 -0
  32. package/dist/src/components/a2ui/v1_0/Button/Button.d.ts +223 -0
  33. package/dist/src/components/a2ui/v1_0/Button/Button.d.ts.map +1 -0
  34. package/dist/src/components/a2ui/v1_0/Button/Button.js +26 -0
  35. package/dist/src/components/a2ui/v1_0/ChoicePicker/ChoicePicker.d.ts +3 -0
  36. package/dist/src/components/a2ui/v1_0/ChoicePicker/ChoicePicker.d.ts.map +1 -0
  37. package/dist/src/components/a2ui/v1_0/ChoicePicker/ChoicePicker.js +6 -0
  38. package/dist/src/components/a2ui/v1_0/TagInput/TagInput.d.ts +214 -0
  39. package/dist/src/components/a2ui/v1_0/TagInput/TagInput.d.ts.map +1 -0
  40. package/dist/src/components/a2ui/v1_0/TagInput/TagInput.js +34 -0
  41. package/dist/src/components/a2ui/v1_0/Timeout/Timeout.d.ts +58 -0
  42. package/dist/src/components/a2ui/v1_0/Timeout/Timeout.d.ts.map +1 -0
  43. package/dist/src/components/a2ui/v1_0/Timeout/Timeout.js +25 -0
  44. package/dist/src/components/a2ui/v1_0/common.d.ts +15 -0
  45. package/dist/src/components/a2ui/v1_0/common.d.ts.map +1 -0
  46. package/dist/src/components/a2ui/v1_0/common.js +16 -0
  47. package/dist/src/components/a2ui/views/AudioPlayer/AudioPlayer.d.ts +14 -0
  48. package/dist/src/components/a2ui/views/AudioPlayer/AudioPlayer.d.ts.map +1 -0
  49. package/dist/src/components/a2ui/views/AudioPlayer/AudioPlayer.js +10 -0
  50. package/dist/src/components/a2ui/views/Button/Button.d.ts +18 -0
  51. package/dist/src/components/a2ui/views/Button/Button.d.ts.map +1 -0
  52. package/dist/src/components/a2ui/views/Button/Button.js +22 -0
  53. package/dist/src/components/a2ui/views/ChoicePicker/ChoicePicker.d.ts +25 -0
  54. package/dist/src/components/a2ui/views/ChoicePicker/ChoicePicker.d.ts.map +1 -0
  55. package/dist/src/components/a2ui/views/ChoicePicker/ChoicePicker.js +46 -0
  56. package/dist/src/components/a2ui/views/ChoicePicker/theme.d.ts.map +1 -0
  57. package/dist/src/components/a2ui/views/TagInput/TagInput.d.ts +16 -0
  58. package/dist/src/components/a2ui/views/TagInput/TagInput.d.ts.map +1 -0
  59. package/dist/src/components/a2ui/views/TagInput/TagInput.js +12 -0
  60. package/dist/src/components/a2ui/views/Timeout/Timeout.d.ts +9 -0
  61. package/dist/src/components/a2ui/views/Timeout/Timeout.d.ts.map +1 -0
  62. package/dist/src/components/a2ui/views/Timeout/Timeout.js +27 -0
  63. package/dist/src/components/a2ui/views/weight.d.ts +7 -0
  64. package/dist/src/components/a2ui/views/weight.d.ts.map +1 -0
  65. package/dist/src/components/a2ui/views/weight.js +9 -0
  66. package/dist/src/core/SurfaceErrorBoundary.d.ts +27 -0
  67. package/dist/src/core/SurfaceErrorBoundary.d.ts.map +1 -0
  68. package/dist/src/core/SurfaceErrorBoundary.js +24 -0
  69. package/dist/src/core/SurfaceGroupProvider.d.ts +40 -0
  70. package/dist/src/core/SurfaceGroupProvider.d.ts.map +1 -0
  71. package/dist/src/core/SurfaceGroupProvider.js +142 -0
  72. package/dist/src/core/SurfaceRenderer.d.ts +4 -0
  73. package/dist/src/core/SurfaceRenderer.d.ts.map +1 -0
  74. package/dist/src/core/SurfaceRenderer.js +64 -0
  75. package/dist/src/core/errors.d.ts +44 -0
  76. package/dist/src/core/errors.d.ts.map +1 -0
  77. package/dist/src/core/errors.js +42 -0
  78. package/dist/src/core/types.d.ts +11 -0
  79. package/dist/src/core/types.d.ts.map +1 -0
  80. package/dist/src/core/types.js +1 -0
  81. package/dist/src/core/unknownComponent.d.ts +28 -0
  82. package/dist/src/core/unknownComponent.d.ts.map +1 -0
  83. package/dist/src/core/unknownComponent.js +41 -0
  84. package/dist/src/{v0_9 → core}/useSurfaces.d.ts +3 -3
  85. package/dist/src/core/useSurfaces.d.ts.map +1 -0
  86. package/dist/src/utils/detectVersion.d.ts +4 -2
  87. package/dist/src/utils/detectVersion.d.ts.map +1 -1
  88. package/dist/src/utils/detectVersion.js +5 -1
  89. package/dist/src/v0_8/Provider.d.ts +2 -1
  90. package/dist/src/v0_8/Provider.d.ts.map +1 -1
  91. package/dist/src/v0_8/Provider.js +3 -8
  92. package/dist/src/v0_9/Provider.d.ts +13 -13
  93. package/dist/src/v0_9/Provider.d.ts.map +1 -1
  94. package/dist/src/v0_9/Provider.js +14 -61
  95. package/dist/src/v0_9/catalog.d.ts +2 -8
  96. package/dist/src/v0_9/catalog.d.ts.map +1 -1
  97. package/dist/src/v0_9/catalog.js +3 -17
  98. package/dist/src/v1_0/Provider.d.ts +27 -0
  99. package/dist/src/v1_0/Provider.d.ts.map +1 -0
  100. package/dist/src/v1_0/Provider.js +35 -0
  101. package/dist/src/v1_0/catalog.d.ts +52 -0
  102. package/dist/src/v1_0/catalog.d.ts.map +1 -0
  103. package/dist/src/v1_0/catalog.js +118 -0
  104. package/dist/src/v1_0/types.d.ts +13 -0
  105. package/dist/src/v1_0/types.d.ts.map +1 -0
  106. package/dist/src/v1_0/types.js +1 -0
  107. package/json/README.md +27 -30
  108. package/json/v0_9/glchat_standard_catalog_definition.json +5 -5
  109. package/json/v1_0/a2ui-sample-messages-extension.json +150 -0
  110. package/json/v1_0/a2ui-sample-messages.json +144 -0
  111. package/json/v1_0/glchat_extension_catalog_definition.json +794 -0
  112. package/json/v1_0/glchat_standard_catalog_definition.json +1487 -0
  113. package/package.json +4 -4
  114. package/styles/globals.css +136 -67
  115. package/dist/src/components/a2ui/v0_9/ChoicePicker/theme.d.ts.map +0 -1
  116. package/dist/src/components/a2ui/v0_9/UnknownComponent/UnknownComponent.d.ts +0 -231
  117. package/dist/src/components/a2ui/v0_9/UnknownComponent/UnknownComponent.d.ts.map +0 -1
  118. package/dist/src/components/a2ui/v0_9/UnknownComponent/UnknownComponent.js +0 -24
  119. package/dist/src/v0_9/SurfaceErrorBoundary.d.ts +0 -18
  120. package/dist/src/v0_9/SurfaceErrorBoundary.d.ts.map +0 -1
  121. package/dist/src/v0_9/SurfaceErrorBoundary.js +0 -24
  122. package/dist/src/v0_9/SurfaceRenderer.d.ts +0 -3
  123. package/dist/src/v0_9/SurfaceRenderer.d.ts.map +0 -1
  124. package/dist/src/v0_9/SurfaceRenderer.js +0 -47
  125. package/dist/src/v0_9/useSurfaces.d.ts.map +0 -1
  126. /package/dist/src/components/a2ui/{v0_9 → views}/ChoicePicker/theme.d.ts +0 -0
  127. /package/dist/src/components/a2ui/{v0_9 → views}/ChoicePicker/theme.js +0 -0
  128. /package/dist/src/{v0_9 → core}/useSurfaces.js +0 -0
package/README.md CHANGED
@@ -1,21 +1,12 @@
1
1
  # glchat-a2ui-react-renderer
2
2
 
3
- GLChat styling and component extensions for [`@a2ui/react`](https://www.npmjs.com/package/@a2ui/react) (**A2UI v0.8 and v0.9**). This package wraps the standard A2UI renderer pipeline with registered catalogs, design tokens, and GLChat-specific UI components.
4
-
5
- ## Overview
6
-
7
- | Export | Description |
8
- |---|---|
9
- | `Provider` | Owns message processing, surface state, and the GLChat catalog |
10
- | `SurfaceRenderer` | Renders one or all active surfaces (requires `Provider`) |
11
- | `useA2UIVersion` | Returns the active protocol version (`v0.8` or `v0.9`) |
12
- | Design tokens | `styles/globals.css`, `styles/theme-v4.css`, `tailwind-config.cjs` |
3
+ React renderer for [A2UI](https://a2ui.org) **v1.0** with GLChat styling and components, built on [`@a2ui/react`](https://www.npmjs.com/package/@a2ui/react). A2UI v0.8 and v0.9 are still supported as [legacy versions](#legacy-versions-v08-and-v09).
13
4
 
14
5
  ## Requirements
15
6
 
16
7
  - React 18+
17
8
  - Tailwind CSS v3 or v4
18
- - [Material Symbols Outlined](https://fonts.google.com/icons) — required only for string-based `Icon` components (see [Icons](#icons))
9
+ - **Client-side rendering only.** In Next.js, load the renderer client-only (e.g. `next/dynamic` with `ssr: false`).
19
10
 
20
11
  ## Installation
21
12
 
@@ -23,217 +14,268 @@ GLChat styling and component extensions for [`@a2ui/react`](https://www.npmjs.co
23
14
  npm install glchat-a2ui-react-renderer
24
15
  ```
25
16
 
26
- ## Version selection
17
+ ## Setup
27
18
 
28
- `Provider` supports both A2UI v0.8 and v0.9 through a single API.
19
+ ### Styles
29
20
 
30
- | Mode | Behavior |
31
- |---|---|
32
- | Default | Uses **v0.9** when no messages are present |
33
- | Auto-detect | When `version` is omitted and `messages` arrive, detects from the first message (`version: "v0.9"` or v0.8 keys like `beginRendering`) |
34
- | Explicit | Pass `version="v0.8"` or `version="v0.9"` to lock the protocol |
21
+ **Tailwind v4:** add to the application CSS entry point:
35
22
 
36
- ## Quick start (v0.9)
23
+ ```css
24
+ @import "tailwindcss";
25
+ @import "glchat-a2ui-react-renderer/styles/globals.css"; /* design tokens */
26
+ @import "glchat-a2ui-react-renderer/styles/theme-v4.css"; /* registers tokens with Tailwind */
27
+ @source "../node_modules/glchat-a2ui-react-renderer"; /* optional: scan this package */
28
+ ```
37
29
 
38
- ```tsx
39
- import { Provider, SurfaceRenderer } from 'glchat-a2ui-react-renderer';
40
- import type { A2UIMessage, ActionPayload } from 'glchat-a2ui-react-renderer';
30
+ **Tailwind v3:** use the preset, include the package in `content`, and import `styles/globals.css` before the `@tailwind` directives:
41
31
 
42
- function App() {
43
- const messages: A2UIMessage[] = [
44
- { version: 'v0.9', createSurface: { surfaceId: 'main', catalogId: '/* ... */' } },
45
- { version: 'v0.9', updateComponents: { surfaceId: 'main', components: [/* ... */] } },
46
- ];
32
+ ```js
33
+ module.exports = {
34
+ presets: [require('glchat-a2ui-react-renderer/tailwind-config.cjs')],
35
+ content: [
36
+ './src/**/*.{js,ts,jsx,tsx}',
37
+ './node_modules/glchat-a2ui-react-renderer/dist/**/*.{js,jsx,ts,tsx}',
38
+ ],
39
+ };
40
+ ```
47
41
 
48
- const handleAction = (action: ActionPayload) => {
49
- // { name, surfaceId, sourceComponentId, timestamp, context }
50
- console.log('Action:', action);
51
- };
42
+ ### Icons
52
43
 
53
- return (
54
- <Provider messages={messages} onAction={handleAction}>
55
- <SurfaceRenderer />
56
- </Provider>
57
- );
44
+ `Icon` components with a string `name` use [Material Symbols Outlined](https://fonts.google.com/icons), which this package does not bundle. Load it in the application shell:
45
+
46
+ ```html
47
+ <link
48
+ href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined&display=swap"
49
+ rel="stylesheet"
50
+ />
51
+ ```
52
+
53
+ Icons given as an SVG path (`{ "svgPath": "..." }`) do not need the font.
54
+
55
+ ### Typography and theming
56
+
57
+ The default typeface is Inter, through the `--font-sans` token; the package does not load the font itself. Load Inter (e.g. `next/font/google` with `variable: '--font-sans'`), or use the application font:
58
+
59
+ ```css
60
+ .a2ui-surface {
61
+ --font-sans: var(--your-app-font);
58
62
  }
59
63
  ```
60
64
 
61
- Sample payloads: [`json/v0_9/a2ui-sample-messages.json`](json/v0_9/a2ui-sample-messages.json).
65
+ Colors are CSS custom properties. Override them **after** importing `globals.css`:
66
+
67
+ ```css
68
+ :root {
69
+ --primary: 220 90% 45%;
70
+ }
71
+ .dark {
72
+ --primary: 220 70% 50%;
73
+ }
74
+ ```
62
75
 
63
- ## Quick start (v0.8)
76
+ ## Quick start
64
77
 
65
78
  ```tsx
66
79
  import { Provider, SurfaceRenderer } from 'glchat-a2ui-react-renderer';
67
80
  import type { A2UIMessage, ActionPayload } from 'glchat-a2ui-react-renderer';
68
81
 
69
- function App() {
70
- const messages: A2UIMessage[] = [
71
- { beginRendering: { surfaceId: 'main', root: 'root' } },
72
- { surfaceUpdate: { surfaceId: 'main', components: [/* ... */] } },
73
- ];
74
-
82
+ function Chat({ messages }: { messages: A2UIMessage[] }) {
75
83
  const handleAction = (action: ActionPayload) => {
76
84
  // { name, surfaceId, sourceComponentId, timestamp, context }
77
- console.log('Action:', action);
85
+ sendToAgent({ action });
78
86
  };
79
87
 
80
88
  return (
81
89
  <Provider messages={messages} onAction={handleAction}>
82
- <SurfaceRenderer surfaceId="main" />
90
+ <SurfaceRenderer />
83
91
  </Provider>
84
92
  );
85
93
  }
86
94
  ```
87
95
 
88
- Sample payloads: [`json/v0_8/a2ui-sample-messages.json`](json/v0_8/a2ui-sample-messages.json).
89
-
90
- ## Icons
96
+ `messages` is **append-only**: only messages appended since the last render are processed. To start over with a new list, remount `Provider` (e.g. change its `key`).
91
97
 
92
- The upstream `Icon` component renders [Material Symbols Outlined](https://fonts.google.com/icons) when `name` is a string. This package does not bundle the font; consumers must load it in the application shell:
98
+ The protocol version is detected from the first message and then locked. Sample payloads: [`json/v1_0/`](json/v1_0/).
93
99
 
94
- ```html
95
- <link
96
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined&display=swap"
97
- rel="stylesheet"
98
- />
99
- ```
100
+ ### `Provider` props
100
101
 
101
- Alternatively, import it in global CSS before other stylesheets:
102
+ All props are optional.
102
103
 
103
- ```css
104
- @import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined&display=swap');
105
- ```
106
-
107
- Icons specified with an SVG path object (`{ "svgPath": "..." }`) render as inline SVG and do not require the font.
108
-
109
- ## Typography
110
-
111
- The default typeface is Inter, exposed through the `--font-sans` token. This package does not `@import` Google Fonts from `globals.css` to remain compatible with Next.js stylesheet merging.
104
+ | Prop | Description |
105
+ |---|---|
106
+ | `messages` | A2UI messages from the agent (append-only) |
107
+ | `onAction` | `(action, options?) => void`, called when the user triggers an action (see [Actions](#actions-and-data-model)). Without it, actions are ignored |
108
+ | `onAgentMessage` | Messages the renderer sends to the agent (see [Agent messages](#agent-messages)). Without it, they are dropped |
109
+ | `onError` | `(error: A2UIError) => void` (see [Error handling](#error-handling)). Defaults to one short `console.warn` line per error |
110
+ | `catalogsV1` | Custom v1.0 catalogs (see [Custom components](#custom-components)); read once on mount |
111
+ | `version` | Locks the protocol version (`'v1.0'`, `'v0.9'`, `'v0.8'`). Defaults to the version of the first message |
112
112
 
113
- Consumers may use an existing application font by overriding the token on `.a2ui-surface`:
113
+ ### `SurfaceRenderer` props
114
114
 
115
- ```css
116
- .a2ui-surface {
117
- --font-sans: var(--your-app-font);
118
- }
119
- ```
115
+ All props are optional.
120
116
 
121
- To adopt Inter explicitly:
117
+ | Prop | Description |
118
+ |---|---|
119
+ | `surfaceId` | Render only this surface. Defaults to all active surfaces |
120
+ | `fallback` | Shown while there is no surface yet, or a surface has no root component yet. Defaults to nothing |
121
+ | `errorFallback` | Replaces the error alert; a node or `(error) => node`. Defaults to "Unable to display this content. (CODE)" |
122
+ | `className` | Added to each surface's wrapper, next to `a2ui-surface` |
122
123
 
123
- - **Next.js:** configure `next/font/google` with `variable: '--font-sans'` on the root element.
124
- - **Plain CSS:** `@import` Inter before `globals.css`.
124
+ ## Catalogs
125
125
 
126
- ## GLChat catalog
126
+ GLChat publishes two v1.0 catalogs. `Provider` supports both, plus the A2UI basic catalog, so the agent picks how to integrate:
127
127
 
128
- ### v0.9 catalog
128
+ | Catalog | Contents | Agent usage |
129
+ |---|---|---|
130
+ | **Full** (`GLCHAT_CATALOG_ID_V1`) | A2UI basic catalog with GLChat overrides and extensions | Set as `createSurface.catalogId` |
131
+ | **GLChat-only** (`GLCHAT_EXTENSION_CATALOG_ID_V1`) | GLChat overrides and extensions only | Use the A2UI basic catalog as `createSurface.catalogId`, and set `"catalogId"` to this catalog on each GLChat component |
129
132
 
130
133
  | Component | Role |
131
134
  |---|---|
132
- | `Button` | Override — GLChat styling; adds `destructive` variant |
135
+ | `Button` | Override — GLChat styling; adds a `destructive` variant |
133
136
  | `ChoicePicker` | Override — select, multi-select, and checkbox list |
137
+ | `AudioPlayer` | Override — GLChat audio player |
134
138
  | `TagInput` | Extension |
135
139
  | `Timeout` | Extension |
136
140
 
137
- ### v0.8 catalog
141
+ The catalog definitions for agents, their IDs and samples are in [`json/v1_0/`](json/v1_0/) (see [`json/README.md`](json/README.md)).
138
142
 
139
- | Component | Role |
143
+ ## Actions and data model
144
+
145
+ `onAction` receives the action triggered by the user (`name`, `surfaceId`, `sourceComponentId`, `timestamp`, `context`).
146
+
147
+ When the agent creates a surface with `sendDataModel: true`, `onAction` also receives `{ dataModel }`: the current data of every surface that opted in, keyed by surface ID. Send it to the agent with the action (A2A: message metadata `a2uiClientDataModel`):
148
+
149
+ ```tsx
150
+ <Provider
151
+ messages={messages}
152
+ onAction={(action, options) =>
153
+ sendToAgent({ action }, { a2uiClientDataModel: options?.dataModel })
154
+ }
155
+ >
156
+ ```
157
+
158
+ ```json
159
+ { "version": "1.0", "surfaces": { "main": { "form": { "name": "Ada" } } } }
160
+ ```
161
+
162
+ ## Agent messages
163
+
164
+ Besides actions, the renderer sends other v1.0 messages to the agent through `onAgentMessage`. Forward them over the same connection:
165
+
166
+ | Message | When |
140
167
  |---|---|
141
- | `Button` | Override — GLChat styling with `primary` prop |
142
- | `ButtonAsLink` | Extension — borderless link-style button |
143
- | `DestructiveButton` | Extension — destructive action button |
144
- | `MultipleChoice` | Override — chips and checkbox variants |
145
- | `TagInput` | Extension |
146
- | `Timeout` | Extension |
168
+ | `rendererFunctionResponse` | Reply to an agent `callRendererFunction` |
169
+ | `callAgentFunction` | A component called `useSurfaceGroup().processor.callAgentFunction(surfaceId, call)` |
170
+ | `error` | A message from the agent failed to process (e.g. `VALIDATION_FAILED`) |
171
+
172
+ ```tsx
173
+ <Provider
174
+ messages={messages}
175
+ onAction={(action) => sendToAgent({ action })}
176
+ onAgentMessage={(message) => sendToAgent(message)}
177
+ >
178
+ ```
179
+
180
+ The agent's replies (`agentFunctionResponse`, `callRendererFunction`) go into `messages` like any other message.
181
+
182
+ ## Error handling
147
183
 
148
- Component implementations live under `src/components/a2ui/v0_9/` and `src/components/a2ui/v0_8/`.
184
+ When a surface fails, the renderer shows a short alert in its place, **"Unable to display this content. (CODE)"**, and reports an `A2UIError` to `onError`. Technical details are never shown to end users.
149
185
 
150
- See [Custom components](#custom-components) to register additional components on top of this catalog. Component schemas are documented in [`json/README.md`](json/README.md).
186
+ ```tsx
187
+ <Provider messages={messages} onError={(error) => logger.warn(error.code, error.message)}>
188
+ <SurfaceRenderer
189
+ fallback={<Spinner />}
190
+ errorFallback={(error) => <MyErrorCard code={error.code} />}
191
+ />
192
+ </Provider>
193
+ ```
194
+
195
+ | Field | Description |
196
+ |---|---|
197
+ | `code` | Machine-readable code (see below) |
198
+ | `source` | Where it failed (see below) |
199
+ | `message` | Developer-facing description; safe to log |
200
+ | `surfaceId` | Surface the error belongs to, when known |
201
+ | `path` | JSON Pointer to the invalid field, when known (e.g. `/components/1/text`) |
202
+ | `cause` | The original thrown value, for debugging |
151
203
 
152
- ## Custom components (Optional)
204
+ | `source` | When | Typical cause |
205
+ |---|---|---|
206
+ | `process` | An A2UI message was rejected (schema, catalog, integrity, …) | Invalid payload from the agent |
207
+ | `render` | A component threw while rendering | Bug in a renderer or custom component |
208
+ | `runtime` | An error after rendering (binding, function call, action); the surface stays visible | Invalid data from the agent |
209
+ | `version` | Messages switched protocol version after it was locked | Integration bug |
153
210
 
154
- Custom components are defined with a Zod schema and a React renderer, then registered in a `Catalog` passed to `Provider`.
211
+ `code` is an A2UI spec code (`VALIDATION_FAILED`, `CATALOG_NOT_FOUND`, `INTEGRITY_ERROR`, `RECURSION_LIMIT_EXCEEDED`, `DATA_ERROR`, `EXPRESSION_ERROR`, `INTERNAL_ERROR`) or one added by the renderer (`RENDER_FAILED`, `VERSION_MISMATCH`, and `PROCESSING_FAILED` for v0.8).
155
212
 
156
- **1. Define the component API**
213
+ - **Per surface:** a failed message only affects its own surface. The error clears when that surface is successfully updated or deleted.
214
+ - **No root yet is not an error:** `SurfaceRenderer` shows `fallback` while the root component may still be streaming.
215
+ - **Logging:** with `onError`, the renderer logs nothing; without it, it logs one short `console.warn` line. React may still log `RENDER_FAILED` errors to `console.error`.
216
+
217
+ ## Custom components
218
+
219
+ A component is a Zod schema plus a React renderer, registered in a `Catalog` passed to `catalogsV1`. Use the v1.0 schemas (`DynamicStringSchemaV1`, …).
157
220
 
158
221
  ```tsx
159
222
  import { z } from 'zod';
160
223
  import {
224
+ Catalog,
161
225
  createComponentImplementation,
162
- DynamicStringSchema,
163
- AccessibilityAttributesSchema,
226
+ DynamicStringSchemaV1,
164
227
  } from 'glchat-a2ui-react-renderer';
165
228
 
166
- export const BadgeApi = {
229
+ const BadgeApi = {
167
230
  name: 'Badge',
168
231
  schema: z
169
- .object({
170
- accessibility: AccessibilityAttributesSchema.optional(),
171
- weight: z.number().optional(),
172
- label: DynamicStringSchema.describe('Text shown in the badge.'),
173
- })
232
+ .object({ label: DynamicStringSchemaV1.describe('Text shown in the badge.') })
174
233
  .strict()
175
234
  .describe('A simple label badge.'),
176
235
  };
177
- ```
178
-
179
- **2. Implement the renderer**
180
236
 
181
- `createComponentImplementation` binds resolved props from the data model (e.g. `props.label`, `props.action`, `props.value`, `props.setValue` for interactive fields):
182
-
183
- ```tsx
184
- export const BadgeComponent = createComponentImplementation(BadgeApi, ({ props }) => (
237
+ const Badge = createComponentImplementation(BadgeApi, ({ props }) => (
185
238
  <span className="inline-flex rounded-md bg-muted px-2 py-0.5 text-sm">{props.label}</span>
186
239
  ));
187
- ```
188
240
 
189
- For child components, use `buildChild`:
241
+ const MY_CATALOG_ID = 'https://example.com/my-catalog.json';
242
+ const myCatalog = new Catalog(MY_CATALOG_ID, '1.0', [Badge]);
190
243
 
191
- ```tsx
192
- createComponentImplementation(MyApi, ({ props, buildChild }) => (
193
- <div>{props.child ? buildChild(props.child) : null}</div>
194
- );
244
+ <Provider messages={messages} catalogsV1={[myCatalog]} onAction={handleAction}>
245
+ <SurfaceRenderer />
246
+ </Provider>;
195
247
  ```
196
248
 
197
- **3. Build a catalog**
249
+ The agent then uses `"catalogId": MY_CATALOG_ID` on `Badge` components (or as the surface default). The catalog ID is matched exactly and never fetched.
198
250
 
199
- Start from `createGlchatCatalog()` and append the new component. Reuse `GLCHAT_CATALOG_ID` so existing `createSurface` messages remain valid:
251
+ To add components to the GLChat full catalog without changing the agent, register a catalog with the same ID; it replaces the built-in one:
200
252
 
201
253
  ```tsx
202
- import {
203
- Catalog,
204
- createGlchatCatalog,
205
- GLCHAT_CATALOG_ID,
206
- } from 'glchat-a2ui-react-renderer';
207
-
208
- const glchat = createGlchatCatalog();
209
- const catalog = new Catalog(
210
- GLCHAT_CATALOG_ID,
211
- [...glchat.components.values(), BadgeComponent],
212
- [...glchat.functions.values()],
213
- );
254
+ const glchat = createGlchatCatalogV1();
255
+ const extended = glchat.derive({
256
+ catalogId: GLCHAT_CATALOG_ID_V1,
257
+ components: [...glchat.components.keys(), Badge],
258
+ });
259
+ // <Provider catalogsV1={[extended]} … />
214
260
  ```
215
261
 
216
- **4. Pass the catalog to `Provider`**
262
+ Renderer tips:
217
263
 
218
- ```tsx
219
- <Provider messages={messages} catalog={catalog} onAction={handleAction}>
220
- <SurfaceRenderer />
221
- </Provider>
222
- ```
264
+ - Bound props are resolved for you (`props.label`, `props.value`, `props.setValue`, `props.action`).
265
+ - Call actions explicitly: `onClick={() => void props.action?.()}`. Passing `onClick={props.action}` would forward the click event as dispatch options.
266
+ - Render children with `buildChild(props.child)`.
223
267
 
224
268
  ## Custom layout
225
269
 
226
- For explicit control over surface layout, use `useSurfaceGroup`, `useSurfaces`, and `A2uiSurface` instead of `SurfaceRenderer`:
270
+ To control the layout of surfaces, use `useSurfaceGroup`, `useSurfaces` and `A2uiSurface` instead of `SurfaceRenderer`. `useSurfaceGroup().surfaceErrors` holds the processing errors by surface ID.
227
271
 
228
272
  ```tsx
229
273
  import { useSurfaceGroup, useSurfaces, A2uiSurface } from 'glchat-a2ui-react-renderer';
230
274
 
231
275
  function CustomLayout() {
232
- const model = useSurfaceGroup();
276
+ const { model } = useSurfaceGroup();
233
277
  const surfaces = useSurfaces(model);
234
278
 
235
- if (surfaces.length === 0) return <Spinner />;
236
-
237
279
  return surfaces.map((surface) => (
238
280
  <div key={surface.id} className="a2ui-surface">
239
281
  <A2uiSurface surface={surface} />
@@ -242,151 +284,42 @@ function CustomLayout() {
242
284
  }
243
285
  ```
244
286
 
245
- ## Tailwind setup
246
-
247
- ### Tailwind v4
248
-
249
- Add the following to the application CSS entry point:
250
-
251
- ```css
252
- @import "tailwindcss";
253
-
254
- /* Load design tokens */
255
- @import "glchat-a2ui-react-renderer/styles/globals.css";
256
-
257
- /* Register tokens with Tailwind */
258
- @import "glchat-a2ui-react-renderer/styles/theme-v4.css";
259
-
260
- /* Optional: ensure Tailwind scans this package */
261
- @source "../node_modules/glchat-a2ui-react-renderer";
262
- ```
263
-
264
- ---
265
-
266
- ## Tailwind v3
267
-
268
- Use the provided preset and include the package in `content`.
269
-
270
- ```js
271
- const glchatPreset = require('glchat-a2ui-react-renderer/tailwind-config.cjs');
272
-
273
- module.exports = {
274
- presets: [glchatPreset],
275
- content: [
276
- './src/**/*.{js,ts,jsx,tsx}',
277
- './app/**/*.{js,ts,jsx,tsx}',
278
- './node_modules/glchat-a2ui-react-renderer/dist/**/*.{js,jsx,ts,tsx}',
279
- ],
280
- };
281
- ```
282
-
283
- Import `styles/globals.css` before the `@tailwind` directives.
284
-
285
- ## Theming
286
-
287
- Components are styled with CSS custom properties. Override `:root` tokens in application CSS **after** importing `globals.css`:
288
-
289
- ```css
290
- :root {
291
- --primary: 220 90% 45%;
292
- --background: 0 0% 99%;
293
- }
294
-
295
- .dark {
296
- --primary: 220 70% 50%;
297
- }
298
- ```
299
-
300
- ## JSON schemas
287
+ ## Legacy versions (v0.8 and v0.9)
301
288
 
302
- Published for agent catalog registration and reference:
289
+ `Provider` and `SurfaceRenderer` work the same way for A2UI v0.8 and v0.9; the version is detected from the messages. New integrations should use v1.0.
303
290
 
304
- | File | Description |
305
- |---|---|
306
- | `json/glchat_standard_catalog_definition.json` | GLChat catalog definition |
307
- | `json/a2ui-sample-messages.json` | Sample message sequence |
291
+ | | v0.9 | v0.8 |
292
+ |---|---|---|
293
+ | Catalog ID | `GLCHAT_CATALOG_ID` | `GLCHAT_CATALOG_ID_V08` |
294
+ | GLChat components | `Button`, `ChoicePicker`, `AudioPlayer`, `TagInput`, `Timeout` | `Button`, `ButtonAsLink`, `DestructiveButton`, `MultipleChoice`, `TagInput`, `Timeout` |
295
+ | Custom components | `catalog` prop (start from `createGlchatCatalog()`) | `registry` prop (start from `createGlchatRegistry()`) |
296
+ | Theming prop | — | `theme` |
297
+ | Catalog and samples | [`json/v0_9/`](json/v0_9/) | [`json/v0_8/`](json/v0_8/) |
308
298
 
309
- ## Public API
299
+ v0.9 custom components use the v0.9 schemas (`DynamicStringSchema`, …) and catalog version `'v0.9'`.
310
300
 
311
- ### Components and hooks
301
+ ## Reference
312
302
 
313
- | Export | Description |
314
- |---|---|
315
- | `Provider` | Message processor, surface group, and GLChat catalog |
316
- | `SurfaceRenderer` | Renders one or all surfaces |
317
- | `useSurfaceGroup` | Subscribes to the surface group model from `Provider` |
318
- | `useSurfaces` | Returns active surfaces from a surface group model |
303
+ ### Exports
319
304
 
320
- ### Types
321
-
322
- | Export | Description |
323
- |---|---|
324
- | `ProviderProps` | Props for `Provider` |
325
- | `SurfaceRendererProps` | Props for `SurfaceRenderer` |
326
- | `A2UIMessage` | Server-to-client message type |
327
- | `ActionPayload` | Normalized action payload passed to `onAction` |
328
- | `ActionHandler` | `(action: ActionPayload) => void` |
329
- | `MessageErrorHandler` | `(error: Error) => void` |
330
- | `ReactComponentImplementation` | Catalog component implementation type |
331
- | `ReactA2uiComponentProps` | Props passed to custom component renderers |
332
- | `ComponentApi` | Zod schema definition for a catalog component |
333
- | `A2uiMessage` | Upstream message type (`@a2ui/web_core`) |
334
- | `A2uiClientAction` | Upstream client action type (`@a2ui/web_core`) |
335
-
336
- ### Catalog (GLChat)
337
-
338
- | Export | Description |
305
+ | Group | Exports |
339
306
  |---|---|
340
- | `createGlchatCatalog` | Builds the GLChat extended v0.9 catalog |
341
- | `GLCHAT_CATALOG_ID` | Catalog URI for `createSurface` messages |
342
- | `GlchatButtonComponent` | GLChat `Button` implementation |
343
- | `GlchatButtonApi` | Extended `Button` schema (includes `destructive` variant) |
344
- | `GlchatChoicePickerComponent` | GLChat `ChoicePicker` implementation |
345
- | `GlchatTagInputComponent` | `TagInput` implementation |
346
- | `TagInputApi` | `TagInput` schema |
347
- | `GlchatTimeoutComponent` | `Timeout` implementation |
348
- | `TimeoutApi` | `Timeout` schema |
349
-
350
- ### Re-exports (`@a2ui/react` v0.9)
351
-
352
- | Export | Description |
353
- |---|---|
354
- | `A2uiSurface` | Low-level surface renderer |
355
- | `createComponentImplementation` | Factory for catalog-bound components |
356
- | `createBinderlessComponentImplementation` | Factory for components without data binding |
357
- | `MarkdownContext` | Markdown renderer context |
358
- | `useMarkdownRenderer` | Hook for custom markdown rendering |
359
-
360
- ### Re-exports (`@a2ui/web_core` v0.9)
307
+ | Components and hooks | `Provider`, `SurfaceRenderer`, `useSurfaceGroup`, `useSurfaces`, `useA2UIVersion`, `useA2UIRegistry` (v0.8) |
308
+ | Types | `ProviderProps`, `SurfaceRendererProps`, `A2UIMessage`, `ActionPayload`, `V1ActionPayload`, `ActionHandler`, `ActionOptions`, `RendererDataModel`, `A2UIAgentMessage`, `AgentMessageHandler`, `A2UIError`, `A2UIErrorSource`, `MessageErrorHandler` |
309
+ | v1.0 catalogs | `createGlchatCatalogV1`, `createGlchatExtensionCatalogV1`, `GLCHAT_CATALOG_ID_V1`, `GLCHAT_EXTENSION_CATALOG_ID_V1`, `A2UI_BASIC_CATALOG_ID_V1`, and the GLChat components (`GlchatButtonComponentV1`, …) |
310
+ | Legacy catalogs | v0.9: `createGlchatCatalog`, `GLCHAT_CATALOG_ID`, `GlchatButtonComponent`, …; v0.8: `createGlchatRegistry`, `GLCHAT_CATALOG_ID_V08` |
311
+ | Re-exports | From `@a2ui/react` and `@a2ui/web_core`, for writing components: `A2uiSurface`, `Catalog`, `createComponentImplementation`, the v1.0 schemas (`DynamicStringSchemaV1`, …) and the v0.9 schemas (`DynamicStringSchema`, …) |
361
312
 
362
- | Export | Description |
363
- |---|---|
364
- | `Catalog` | Catalog container (components + functions) |
365
- | `MessageProcessor` | Processes A2UI message streams |
366
- | `SurfaceModel` | Single-surface state model |
367
- | `SurfaceGroupModel` | Multi-surface state model |
368
- | `ComponentIdSchema` | Component ID validator |
369
- | `ChildListSchema` | Child list validator |
370
- | `ActionSchema` | Action validator |
371
- | `DynamicStringSchema` | Dynamic string value validator |
372
- | `DynamicNumberSchema` | Dynamic number value validator |
373
- | `DynamicBooleanSchema` | Dynamic boolean value validator |
374
- | `DynamicStringListSchema` | Dynamic string list validator |
375
- | `DynamicValueSchema` | Dynamic value validator |
376
- | `CheckableSchema` | Validation rules validator |
377
- | `AccessibilityAttributesSchema` | Accessibility attributes validator |
313
+ See the [A2UI renderer documentation](https://a2ui.org/renderers/) for the upstream API.
378
314
 
379
315
  ### Package assets
380
316
 
381
- | Export | Description |
317
+ | Path | Description |
382
318
  |---|---|
383
- | `styles/globals.css` | Design tokens and A2UI surface overrides |
319
+ | `styles/globals.css` | Design tokens and A2UI surface styles |
384
320
  | `styles/theme-v4.css` | Tailwind v4 theme bridge |
385
321
  | `tailwind-config.cjs` | Tailwind v3 preset |
386
- | `json/glchat_standard_catalog_definition.json` | GLChat catalog JSON |
387
- | `json/a2ui-sample-messages.json` | Sample messages JSON |
388
-
389
- Refer to [A2UI renderer documentation](https://a2ui.org/renderers/) for upstream API details.
322
+ | `json/v1_0/`, `json/v0_9/`, `json/v0_8/` | Catalog definitions for agents, and sample messages |
390
323
 
391
324
  ## License
392
325
 
package/dist/index.d.ts CHANGED
@@ -1,13 +1,20 @@
1
- export { Provider, useSurfaceGroup, useA2UIRegistry, useA2UIVersion, type ProviderProps, type A2UIMessage, type ActionPayload, type ActionHandler, type MessageErrorHandler, } from './src/Provider.js';
1
+ export { Provider, useSurfaceGroup, useA2UIRegistry, useA2UIVersion, type ProviderProps, type A2UIMessage, type ActionPayload, type ActionHandler, type MessageErrorHandler, type A2UIAgentMessage, type AgentMessageHandler, type ActionOptions, type RendererDataModel, type V1ActionPayload, type A2UIError, type A2UIErrorSource, } from './src/Provider.js';
2
2
  export { SurfaceRenderer, type SurfaceRendererProps } from './src/SurfaceRenderer.js';
3
- export { useSurfaces } from './src/v0_9/useSurfaces.js';
3
+ export { useSurfaces } from './src/core/useSurfaces.js';
4
4
  export { createGlchatCatalog, GLCHAT_CATALOG_ID } from './src/v0_9/catalog.js';
5
- export { createGlchatRegistry, GLCHAT_CATALOG_ID_V08, ensureGlchatComponentsRegistered } from './src/v0_8/registry.js';
5
+ export { createGlchatRegistry, GLCHAT_CATALOG_ID_V08, ensureGlchatComponentsRegistered, } from './src/v0_8/registry.js';
6
6
  export { GlchatAudioPlayerComponent } from './src/components/a2ui/v0_9/AudioPlayer/AudioPlayer.js';
7
- export { GlchatButtonComponent, GlchatButtonApi } from './src/components/a2ui/v0_9/Button/Button.js';
7
+ export { GlchatButtonComponent, GlchatButtonApi, } from './src/components/a2ui/v0_9/Button/Button.js';
8
8
  export { GlchatChoicePickerComponent } from './src/components/a2ui/v0_9/ChoicePicker/ChoicePicker.js';
9
- export { GlchatTagInputComponent, TagInputApi } from './src/components/a2ui/v0_9/TagInput/TagInput.js';
9
+ export { GlchatTagInputComponent, TagInputApi, } from './src/components/a2ui/v0_9/TagInput/TagInput.js';
10
10
  export { GlchatTimeoutComponent, TimeoutApi } from './src/components/a2ui/v0_9/Timeout/Timeout.js';
11
- export { A2uiSurface, createComponentImplementation, createBinderlessComponentImplementation, MarkdownContext, useMarkdownRenderer, type ReactComponentImplementation, type ReactA2uiComponentProps, } from '@a2ui/react/v0_9';
11
+ export { createGlchatCatalogV1, createGlchatExtensionCatalogV1, createGlchatRuntimeCatalogsV1, GLCHAT_CATALOG_ID_V1, GLCHAT_EXTENSION_CATALOG_ID_V1, A2UI_BASIC_CATALOG_ID_V1, GLCHAT_V1_OVERRIDES, GLCHAT_V1_EXTENSIONS, COMPONENT_CATALOG_ID_KEY, } from './src/v1_0/catalog.js';
12
+ export { GlchatButtonComponentV1, GlchatButtonApiV1, } from './src/components/a2ui/v1_0/Button/Button.js';
13
+ export { GlchatChoicePickerComponentV1 } from './src/components/a2ui/v1_0/ChoicePicker/ChoicePicker.js';
14
+ export { GlchatAudioPlayerComponentV1 } from './src/components/a2ui/v1_0/AudioPlayer/AudioPlayer.js';
15
+ export { GlchatTagInputComponentV1, TagInputApiV1, } from './src/components/a2ui/v1_0/TagInput/TagInput.js';
16
+ export { GlchatTimeoutComponentV1, TimeoutApiV1, } from './src/components/a2ui/v1_0/Timeout/Timeout.js';
17
+ export { A2uiSurface, createComponentImplementation, createBinderlessComponentImplementation, MarkdownContext, useMarkdownRenderer, type ReactComponentImplementation, type ReactCatalogComponent, type ReactA2uiComponentProps, } from '@a2ui/react/v0_9';
12
18
  export { Catalog, MessageProcessor, SurfaceModel, SurfaceGroupModel, ComponentIdSchema, ChildListSchema, ActionSchema, DynamicStringSchema, DynamicNumberSchema, DynamicBooleanSchema, DynamicStringListSchema, DynamicValueSchema, CheckableSchema, AccessibilityAttributesSchema, type ComponentApi, type A2uiMessage, type A2uiClientAction, } from '@a2ui/web_core/v0_9';
19
+ export { ComponentIdSchema as ComponentIdSchemaV1, ChildListSchema as ChildListSchemaV1, ActionSchema as ActionSchemaV1, DynamicStringSchema as DynamicStringSchemaV1, DynamicNumberSchema as DynamicNumberSchemaV1, DynamicBooleanSchema as DynamicBooleanSchemaV1, DynamicStringListSchema as DynamicStringListSchemaV1, DynamicValueSchema as DynamicValueSchemaV1, } from '@a2ui/web_core/v1_0';
13
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,eAAe,EACf,cAAc,EACd,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,mBAAmB,GACzB,MA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