Skip to content

Commit 8bf644a

Browse files
authored
fix(react): migrate runtime imports off v0_9 and fix MessageProcessor catalog inference (#4181)
1 parent 0d2fcf3 commit 8bf644a

43 files changed

Lines changed: 174 additions & 152 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎typescript/core/web_core/CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
- `GenericBinder` resolves a union property as an action only when it references `Action` or has an object option whose only key is `event` or `functionCall`, as in the specification's `Action`. A union whose object option has other keys beside `event`, such as `{label, event}`, now resolves as a plain value instead of an action closure. [#4086](https://github.com/a2ui-project/a2ui/issues/4086), [#4087](https://github.com/a2ui-project/a2ui/pull/4087)
4040
- (v1_0) Function calls inside `${...}` template expressions of `formatString` now inherit the `catalogId` that the enclosing `formatString` call resolved to (preserving reserved `@`-prefixed system calls such as `${@index()}` as catalogless), so nested template calls resolve against `formatString`'s catalog on defaultless surfaces and when the surface defines a different default `catalogId` ([#3727](https://github.com/a2ui-project/a2ui/issues/3727), [#4028](https://github.com/a2ui-project/a2ui/pull/4028)).
4141
- `extractRefFields`, `NodeResolver`, `GenericBinder`, `scrapeSchemaBehavior`, `scrapeComponentBehavior` (newly exported), and `Catalog.componentRefMap` now resolve child references and dynamic bindings across wrapped (`ZodCatch`, `ZodPipeline`), composite (`ZodIntersection`, `ZodUnion`, `ZodDiscriminatedUnion`), empty-shape (`z.object({})`), open (`.passthrough()`, `.catchall()`, `z.record()`, `z.any()`, `z.unknown()`), and unannotated `child` / `children` component schemas ([#3783](https://github.com/a2ui-project/a2ui/issues/3783), [#3938](https://github.com/a2ui-project/a2ui/pull/3938)).
42+
- Export `getMarkdownRenderer`, `markdown`, and `setMarkdownRenderer` from `@a2ui/web_core/universal`, make `Catalog<T, F>` covariant in `T` and `F`, and infer `T` from the `catalogs` argument of `new MessageProcessor(catalogs)` so `SurfaceModel` instances carry the component implementation type of their registered catalogs ([#3423](https://github.com/a2ui-project/a2ui/issues/3423), [#4181](https://github.com/a2ui-project/a2ui/pull/4181)).
4243

4344
## 0.15.0
4445

‎typescript/core/web_core/src/catalog/types.ts‎

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,10 @@ export class Catalog<
636636
* @param functions The functions of the new catalog.
637637
* @returns A new catalog.
638638
*/
639-
withEntries(components: T[], functions: F[]): Catalog<T, F> {
639+
withEntries<U extends ComponentApi = T, G extends FunctionApi = F>(
640+
components: U[],
641+
functions: G[],
642+
): Catalog<U, G> {
640643
return this.rebuild(components, functions, {
641644
id: this.id,
642645
schemaId: this.schemaId,
@@ -661,25 +664,29 @@ export class Catalog<
661664
* `$defs` entry that the catalog's `$defs`, or another agent function's,
662665
* defines differently.
663666
*/
664-
copyWith(options: CopyWithCatalogOptions<T, F> = {}): Catalog<T, F> {
665-
const nextComponents =
666-
options.components !== undefined ? [...options.components] : [...this.components.values()];
667-
let baseFunctions: F[];
667+
copyWith<U extends ComponentApi = T, G extends FunctionApi = F>(
668+
options: CopyWithCatalogOptions<U, G> = {},
669+
): Catalog<U, G> {
670+
const nextComponents: U[] =
671+
options.components !== undefined
672+
? [...options.components]
673+
: ([...this.components.values()] as unknown as U[]);
674+
let baseFunctions: G[];
668675
if (options.functions !== undefined) {
669676
baseFunctions = [...options.functions];
670677
} else if (options.agentFunctions !== undefined) {
671678
baseFunctions = [];
672679
for (const fn of this.functions.values()) {
673680
if (isAgentFunction(fn)) {
674681
if (fn.declaration !== undefined) {
675-
baseFunctions.push(fn.declaration as unknown as F);
682+
baseFunctions.push(fn.declaration as unknown as G);
676683
}
677684
} else {
678-
baseFunctions.push(fn);
685+
baseFunctions.push(fn as unknown as G);
679686
}
680687
}
681688
} else {
682-
baseFunctions = [...this.functions.values()];
689+
baseFunctions = [...this.functions.values()] as unknown as G[];
683690
}
684691
const nextId = options.catalogId ?? this.id;
685692
const mergedFunctions = mergeAgentFunctions(nextId, baseFunctions, options.agentFunctions);
@@ -713,12 +720,14 @@ export class Catalog<
713720
* @returns A new catalog.
714721
* @throws {A2uiCatalogError} If a name is not an entry of this catalog.
715722
*/
716-
derive(options: DeriveCatalogOptions<T, F>): Catalog<T, F> {
717-
const pick = <E extends {name: string}>(
723+
derive<U extends ComponentApi = T, G extends FunctionApi = F>(
724+
options: DeriveCatalogOptions<U, G>,
725+
): Catalog<T | U, F | G> {
726+
const pick = <Own extends {name: string}, Extra extends {name: string}>(
718727
kind: string,
719-
own: ReadonlyMap<string, E>,
720-
wanted: readonly (string | E)[] | undefined,
721-
): E[] => {
728+
own: ReadonlyMap<string, Own>,
729+
wanted: readonly (string | Extra)[] | undefined,
730+
): (Own | Extra)[] => {
722731
if (wanted === undefined) return [...own.values()];
723732
return wanted.map(item => {
724733
if (typeof item !== 'string') return item;
@@ -742,9 +751,9 @@ export class Catalog<
742751
* Builds a catalog with this catalog's version, theme and layout, the given
743752
* entries and the given fields that describe the catalog.
744753
*/
745-
private rebuild(
746-
components: T[],
747-
functions: F[],
754+
private rebuild<U extends ComponentApi, G extends FunctionApi>(
755+
components: U[],
756+
functions: G[],
748757
described: {
749758
id: string;
750759
protocolVersion?: ProtocolVersion | string;
@@ -754,13 +763,13 @@ export class Catalog<
754763
description?: string;
755764
instructions?: string;
756765
},
757-
): Catalog<T, F> {
766+
): Catalog<U, G> {
758767
const componentsChanged =
759768
components.length !== this.components.size ||
760-
components.some(c => this.components.get(c.name) !== c);
769+
components.some(c => (this.components.get(c.name) as unknown) !== c);
761770
const functionsChanged =
762771
functions.length !== this.functions.size ||
763-
functions.some(f => this.functions.get(f.name) !== f);
772+
functions.some(f => (this.functions.get(f.name) as unknown) !== f);
764773
let baseDefs = this.defs;
765774
if (baseDefs && (componentsChanged || functionsChanged)) {
766775
const copy = {...baseDefs};
@@ -774,7 +783,7 @@ export class Catalog<
774783
anyFunction: this.unions.anyFunction || functionsChanged,
775784
}
776785
: undefined;
777-
return new Catalog<T, F>(
786+
return new Catalog<U, G>(
778787
described.id,
779788
described.protocolVersion ?? this.protocolVersion,
780789
components,

‎typescript/core/web_core/src/processing/message-processor.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ export class MessageProcessor<T extends ComponentApi = ComponentApi> {
251251
* @throws {A2uiValidationError} If `options.unifiedOutbound` is true without `options.outboundListener`.
252252
*/
253253
constructor(
254-
catalogs: Catalog<any>[],
254+
catalogs: Catalog<T, any>[],
255255
private actionHandler?: ActionListener,
256256
options?: MessageProcessorOptions,
257257
) {

‎typescript/core/web_core/src/universal/index.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,9 @@ export {
3333
createAccessibilityTargets,
3434
type AccessibilityTargets,
3535
} from './host_accessibility.js';
36+
export {
37+
getMarkdownRenderer,
38+
markdown,
39+
setMarkdownRenderer,
40+
} from './basic_catalog/directives/directives.js';
3641
export type {WebComponentImplementation} from './web_component_implementation.js';

‎typescript/renderers/react/CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
- **BREAKING CHANGE**: Stop assigning `element.context` in `WebComponentNode`, and deprecate `ReactComponentImplementation.render`, `ReactRenderProps`, `ReactRenderProps.context`, `ReactA2uiComponentProps.context`, and `ReactWcHost.context`. Recommended migration: accept `node` on custom `A2uiWebComponentElement` classes, implement `view({node, buildChild})` (or read resolved `props` and `metadata` in `createComponentImplementation`), and obtain the `SurfaceModel` via `useA2uiSurface()`. [#3841](https://github.com/a2ui-project/a2ui/pull/3841)
44
- **BREAKING CHANGE**: `a2ui-react-<name>` host elements apply the component's `accessibility` attributes: `aria-live`, `aria-hidden`, and `inert` on the host, and `aria-label` and `aria-description` on the host with `role="group"` (unless the host already has a `role`). A component built with `createComponentImplementation` or `createBinderlessComponentImplementation` can pass the new `accessibilityRef` prop to an inner element to receive `aria-label` and `aria-description` instead, along with `aria-invalid="true"` while a check fails. The new `validationErrorsRef` prop marks the element that shows the validation errors; while there are errors, the `accessibilityRef` element gets `aria-describedby` pointing at it. Recommended migration: a component that already sets `aria-label` from `props.accessibility.label` on an inner element should pass `accessibilityRef` to that element, or the label is announced twice. [#3499](https://github.com/a2ui-project/a2ui/issues/3499), [#3869](https://github.com/a2ui-project/a2ui/pull/3869)
55
- Widen `react` and `react-dom` peer dependency ranges to `^17.0.0 || ^18.0.0 || ^19.0.0`, with internal fallbacks for `useSyncExternalStore` and `useId` when running on React 17. [#2372](https://github.com/a2ui-project/a2ui/issues/2372), [#3964](https://github.com/a2ui-project/a2ui/pull/3964)
6+
- Import core and universal symbols from `@a2ui/web_core` and `@a2ui/web_core/universal` instead of `@a2ui/web_core/v0_9/*` in the `@a2ui/react` runtime so v1.0 bundles no longer pull in v0.9 schemas or v0.9 basic catalog custom elements ([#3423](https://github.com/a2ui-project/a2ui/issues/3423), [#4181](https://github.com/a2ui-project/a2ui/pull/4181)).
67

78
## 0.15.0
89

‎typescript/renderers/react/README.md‎

Lines changed: 27 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ imported from a versioned path:
3030
import {A2uiSurface} from '@a2ui/react';
3131
import {MessageProcessor} from '@a2ui/web_core';
3232

33-
// Basic catalog for v0.9 / v0.9.1:
34-
import {basicCatalog} from '@a2ui/web_core/v0_9/basic_catalog';
35-
// ...or for v1.0:
36-
// import {basicCatalog} from '@a2ui/web_core/catalogs/basic/v1';
33+
// Basic catalog for v1.0:
34+
import {basicCatalog} from '@a2ui/web_core/catalogs/basic/v1';
35+
// ...or for v0.9 and v0.9.1:
36+
// import {basicCatalog} from '@a2ui/web_core/v0_9/basic_catalog';
3737
```
3838

3939
The `@a2ui/react/v0_9` entry point still works but only re-exports the package
@@ -47,12 +47,12 @@ The React renderer works alongside the `MessageProcessor` from `@a2ui/web_core`.
4747
- **Surface** — an independent rendering area, uniquely identified by a string ID, that the agent creates and populates with components.
4848
- **Catalog** — the set of components (e.g. `Text`, `Column`, `Button`) available for a surface to use.
4949

50-
The example below creates a processor with the `basicCatalog` from `@a2ui/web_core`, feeds it a sequence of hardcoded messages, and renders the resulting surface.
50+
The example below creates a processor with the `basicCatalog` from `@a2ui/web_core/catalogs/basic/v1`, feeds it a sequence of hardcoded messages, and renders the resulting surface.
5151

5252
```tsx
5353
import {useState, useEffect} from 'react';
5454
import {MessageProcessor} from '@a2ui/web_core';
55-
import {basicCatalog} from '@a2ui/web_core/v0_9/basic_catalog';
55+
import {basicCatalog} from '@a2ui/web_core/catalogs/basic/v1';
5656
import {A2uiSurface} from '@a2ui/react';
5757

5858
export default function App() {
@@ -92,22 +92,22 @@ export default function App() {
9292
// Here we hardcode them to show the message format.
9393
const sampleAgentMessages = [
9494
{
95-
version: 'v0.9' as const,
95+
version: '1.0' as const,
9696
createSurface: {surfaceId: 'main-chat', catalogId: basicCatalog.id},
9797
},
9898
{
99-
version: 'v0.9' as const,
99+
version: '1.0' as const,
100100
updateComponents: {
101101
surfaceId: 'main-chat',
102102
components: [
103103
{id: 'root', component: 'Column', children: ['greeting', 'description']},
104-
{id: 'greeting', component: 'Text', text: {path: '/title'}},
105-
{id: 'description', component: 'Text', text: {path: '/body'}},
104+
{id: 'greeting', component: 'Text', text: {'@path': '/title'}},
105+
{id: 'description', component: 'Text', text: {'@path': '/body'}},
106106
],
107107
},
108108
},
109109
{
110-
version: 'v0.9' as const,
110+
version: '1.0' as const,
111111
updateDataModel: {
112112
surfaceId: 'main-chat',
113113
path: '/',
@@ -122,31 +122,31 @@ const sampleAgentMessages = [
122122

123123
Running this example should display "Hello from A2UI!". The example demonstrates three message types:
124124

125-
- [`createSurface`](../../../specification/v0_9/docs/a2ui_protocol.md#createsurface) initializes the rendering surface.
126-
- [`updateComponents`](../../../specification/v0_9/docs/a2ui_protocol.md#updatecomponents) defines the UI tree. Here, a `Column` containing two `Text` components.
127-
- [`updateDataModel`](../../../specification/v0_9/docs/a2ui_protocol.md#updatedatamodel) provides the data that the components reference via [`path` bindings](../../../specification/v0_9/docs/a2ui_protocol.md#path-resolution--scope) (e.g. `{ path: '/title' }` resolves to the `title` field in the data model).
125+
- [`createSurface`](../../../specification/v1_0/docs/a2ui_protocol.md#createsurface) initializes the rendering surface.
126+
- [`updateComponents`](../../../specification/v1_0/docs/a2ui_protocol.md#updatecomponents) defines the UI tree. Here, a `Column` containing two `Text` components.
127+
- [`updateDataModel`](../../../specification/v1_0/docs/a2ui_protocol.md#updatedatamodel) provides the data that the components reference via [`@path` bindings](../../../specification/v1_0/docs/a2ui_protocol.md#path-resolution--scope) (e.g. `{ '@path': '/title' }` resolves to the `title` field in the data model).
128128

129129
## Defining Custom Components
130130

131-
A2UI v0.9 strictly separates a component's API (Schema) from its implementation.
131+
A2UI separates a component's API (Schema) from its implementation.
132132

133133
### 1. Define the Component API
134134

135-
Use Zod to define the properties. Using `CommonSchemas` from `web_core` enables automatic binding for A2UI primitives.
135+
Use Zod to define the properties. Using `CommonSchemas` from `@a2ui/web_core/v1_0` (or `@a2ui/web_core/v0_9` for v0.9 catalogs) enables automatic binding for A2UI primitives.
136136

137137
```typescript
138138
import {z} from 'zod';
139-
import {CommonSchemas} from '@a2ui/web_core/v0_9';
139+
import {CommonSchemas} from '@a2ui/web_core/v1_0';
140140

141141
export const MyProfileApi = {
142142
name: 'Profile',
143143
schema: z.object({
144-
username: CommonSchemas.DynamicString, // Can be literal "Alice" or {path: "/user/name"}
144+
username: CommonSchemas.DynamicString, // Can be literal "Alice" or {'@path': "/user/name"}
145145
bio: CommonSchemas.DynamicString,
146146
avatarUrl: CommonSchemas.DynamicString,
147147
onEdit: CommonSchemas.Action, // Resolves to a clickable () => void
148148
isEditable: CommonSchemas.DynamicBoolean,
149-
// Add 'checks' if you want validation support (standard in v0.9 interactive components)
149+
// Add 'checks' if you want validation support
150150
checks: CommonSchemas.Checkable.shape.checks,
151151
}),
152152
};
@@ -280,15 +280,15 @@ const myCheckFunc = createFunctionImplementation(
280280
// 2. Compose the catalog
281281
export const myCatalog = new Catalog(
282282
'https://example.com/catalogs/v1.json',
283-
'v0.9', // Protocol version the catalog targets
283+
'1.0', // Protocol version the catalog targets
284284
[MyProfile, RawInspector], // List of ReactComponentImplementation
285285
[myCheckFunc], // List of FunctionImplementation
286286
);
287287
```
288288

289289
## Basic Catalog Components
290290

291-
`@a2ui/web_core/v0_9/basic_catalog` (v0.9) and `@a2ui/web_core/catalogs/basic/v1` (v1.0) each provide a `basicCatalog` with the same standard components. They are W3C Custom Elements, and the React renderer renders them as elements:
291+
`@a2ui/web_core/catalogs/basic/v1` (v1.0) and `@a2ui/web_core/v0_9/basic_catalog` (v0.9 and v0.9.1) each provide a `basicCatalog` with the same standard components. They are W3C Custom Elements, and the React renderer renders them as elements:
292292

293293
- **Layout**: `Row`, `Column`, `List`, `Card`, `Tabs`, `Modal`, `Divider`
294294
- **Content**: `Text`, `Image`, `Icon`, `Video`, `AudioPlayer`
@@ -341,7 +341,7 @@ export const MyComponent = createComponentImplementation(MyComponentApi, ({props
341341

342342
## Legacy Support (v0.8)
343343

344-
A2UI v0.8 is deprecated and maintained only for backward compatibility. It is available from the `@a2ui/react/v0_8` entry point. New projects should use the package root, which supports v0.9 and v1.0 with type-safe binders and logic functions.
344+
A2UI v0.8 is deprecated and maintained only for backward compatibility. It is available from the `@a2ui/react/v0_8` entry point. New projects should use the package root (`@a2ui/react`), which supports v1.0, v0.9.1, and v0.9 with type-safe binders and logic functions.
345345

346346
### Import and Usage
347347

@@ -365,7 +365,7 @@ function LegacyApp() {
365365
}
366366
```
367367

368-
### Key Differences (v0.8 vs v0.9)
368+
### Key Differences (v0.8 vs v0.9 and later)
369369

370370
| Feature | v0.8 (Deprecated) | v0.9 and later |
371371
| :-------------- | :-------------------------------------- | :--------------------------------------------------------------- |
@@ -387,7 +387,7 @@ function TextField({node, surfaceId}) {
387387
}
388388
```
389389

390-
In v0.9, this is handled by the **Generic Binder** before the component even renders, resulting in cleaner, framework-native view code.
390+
In v0.9 and later, this is handled by the **Generic Binder** before the component even renders, resulting in cleaner, framework-native view code.
391391

392392
## Security
393393

@@ -411,7 +411,7 @@ yarn install
411411

412412
```bash
413413
yarn build # Build the package
414-
yarn dev # Watch mode
414+
yarn demo # Launch the interactive React explorer
415415
```
416416

417417
### Type Check
@@ -434,24 +434,7 @@ Uses [Vitest](https://vitest.dev/) +
434434
[React Testing Library](https://testing-library.com/docs/react-testing-library/intro/).
435435

436436
```bash
437-
yarn test # Run once
437+
yarn test # Run typecheck, unit tests, and integration tests
438+
yarn test:unit # Run unit tests once
438439
yarn test:watch # Watch mode
439440
```
440-
441-
**Structure:** `tests/ ├── setup.ts # Initializes component catalog ├──
442-
helpers.tsx # TestWrapper, TestRenderer, message creators └── components/ #
443-
Component tests (*.test.tsx)`
444-
445-
**Example:** ```tsx import { render, screen, fireEvent } from
446-
'@testing-library/react'; import { TestWrapper, TestRenderer,
447-
createSimpleMessages } from '../helpers';
448-
449-
it('should dispatch action on click', () => { const onAction = vi.fn(); const
450-
messages = createSimpleMessages('btn-1', 'Button', { child: 'text-1', action: {
451-
name: 'submit' }, });
452-
453-
render( <TestWrapper onAction={onAction}> <TestRenderer messages={messages} />
454-
</TestWrapper> );
455-
456-
fireEvent.click(screen.getByRole('button'));
457-
expect(onAction).toHaveBeenCalled(); }); ```

‎typescript/renderers/react/a2ui_explorer/karma.conf.cjs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ module.exports = function (config) {
4141
format: 'iife',
4242
sourcemap: true,
4343
alias: {
44-
'@a2ui/react/v1_0': path.resolve(__dirname, '../src/v1_0/index.ts'),
4544
'@a2ui/react/v0_9': path.resolve(__dirname, '../src/v0_9/index.ts'),
4645
'@a2ui/react/v0_8': path.resolve(__dirname, '../src/v0_8/index.ts'),
4746
'@a2ui/react/styles': path.resolve(__dirname, '../src/styles/index.ts'),

‎typescript/renderers/react/a2ui_explorer/src/App.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
*/
1616

1717
import {useState, useEffect, useCallback, useRef} from 'react';
18-
import {compareSemVer} from '@a2ui/web_core';
19-
import {MessageProcessor, type A2uiClientAction} from '@a2ui/web_core/v0_9';
18+
import {compareSemVer, MessageProcessor} from '@a2ui/web_core';
19+
import type {A2uiClientAction} from '@a2ui/web_core/v0_9';
2020
import {A2uiSurface, MarkdownContext, type ReactCatalogComponent} from '@a2ui/react';
2121
import {mcpCatalog} from '@a2ui/catalog-mcp';
2222
import {basicCatalog as basicCatalogV10} from '@a2ui/web_core/catalogs/basic/v1';

‎typescript/renderers/react/a2ui_explorer/src/custom-grid.tsx‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@
1414
* limitations under the License.
1515
*/
1616

17-
import {createComponentImplementation} from '@a2ui/react/v0_9';
17+
import {createComponentImplementation} from '@a2ui/react';
1818
import z from 'zod';
19-
import {type ComponentApi, DynamicStringSchema, ChildListSchema} from '@a2ui/web_core/v0_9';
19+
import type {ComponentApi} from '@a2ui/web_core';
20+
import {DynamicStringSchema, ChildListSchema} from '@a2ui/web_core/v0_9';
2021
import './custom-grid.css';
2122

2223
export const customGridApi = {

‎typescript/renderers/react/a2ui_explorer/src/custom-slider.tsx‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515
*/
1616

1717
import type {ChangeEvent} from 'react';
18-
import {createComponentImplementation} from '@a2ui/react/v0_9';
18+
import {createComponentImplementation} from '@a2ui/react';
1919
import z from 'zod';
20-
import {type ComponentApi, DynamicStringSchema, DynamicNumberSchema} from '@a2ui/web_core/v0_9';
20+
import type {ComponentApi} from '@a2ui/web_core';
21+
import {DynamicStringSchema, DynamicNumberSchema} from '@a2ui/web_core/v0_9';
2122

2223
export const customSliderApi = {
2324
name: 'CustomSlider',

0 commit comments

Comments
 (0)