@threadplane/a2ui 0.0.56 → 0.0.58
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/package.json +1 -1
- package/src/index.d.ts +5 -2
- package/src/index.d.ts.map +1 -1
- package/src/index.js +4 -1
- package/src/lib/functions.d.ts +29 -0
- package/src/lib/functions.d.ts.map +1 -0
- package/src/lib/functions.js +418 -0
- package/src/lib/guards.d.ts +4 -11
- package/src/lib/guards.d.ts.map +1 -1
- package/src/lib/guards.js +4 -11
- package/src/lib/parser.d.ts +9 -5
- package/src/lib/parser.d.ts.map +1 -1
- package/src/lib/parser.js +14 -7
- package/src/lib/pointer.d.ts.map +1 -1
- package/src/lib/pointer.js +6 -0
- package/src/lib/resolve.d.ts +15 -6
- package/src/lib/resolve.d.ts.map +1 -1
- package/src/lib/resolve.js +33 -32
- package/src/lib/types.d.ts +189 -183
- package/src/lib/types.d.ts.map +1 -1
- package/src/lib/types.js +7 -1
package/src/lib/resolve.d.ts
CHANGED
|
@@ -1,20 +1,29 @@
|
|
|
1
|
+
import { type A2uiFunctionRegistry } from './functions.js';
|
|
1
2
|
export interface A2uiScope {
|
|
2
3
|
basePath: string;
|
|
3
4
|
item: unknown;
|
|
4
5
|
}
|
|
5
6
|
/**
|
|
6
|
-
* Resolves an A2UI dynamic value against a client data model.
|
|
7
|
+
* Resolves an A2UI v0.9 dynamic value against a client data model.
|
|
7
8
|
*
|
|
8
|
-
*
|
|
9
|
-
* from the model by JSON-pointer path, arrays resolve
|
|
10
|
-
*
|
|
9
|
+
* Bare literals (strings, numbers, booleans) pass through unchanged, `{ path }`
|
|
10
|
+
* references read from the model by JSON-pointer path, arrays resolve
|
|
11
|
+
* element-wise, and client-side function calls (`{ call }`) execute through the
|
|
12
|
+
* provided function registry — argument values resolve recursively, so args may
|
|
13
|
+
* themselves be bindings or nested calls. Without a registry (or for unknown
|
|
14
|
+
* function names) calls resolve to `undefined`. Unrecognized plain objects pass
|
|
15
|
+
* through unchanged.
|
|
11
16
|
*
|
|
12
17
|
* @example
|
|
13
18
|
* ```ts
|
|
14
19
|
* const model = { customer: { name: 'Ada' } };
|
|
15
20
|
* resolveDynamic({ path: '/customer/name' }, model); // 'Ada'
|
|
16
|
-
* resolveDynamic(
|
|
21
|
+
* resolveDynamic('Checkout', model); // 'Checkout'
|
|
22
|
+
* resolveDynamic(
|
|
23
|
+
* { call: 'formatString', args: { value: 'Hi ${/customer/name}' } },
|
|
24
|
+
* model, undefined, createA2uiFunctionRegistry(),
|
|
25
|
+
* ); // 'Hi Ada'
|
|
17
26
|
* ```
|
|
18
27
|
*/
|
|
19
|
-
export declare function resolveDynamic(value: unknown, model: Record<string, unknown>, scope?: A2uiScope): unknown;
|
|
28
|
+
export declare function resolveDynamic(value: unknown, model: Record<string, unknown>, scope?: A2uiScope, registry?: A2uiFunctionRegistry): unknown;
|
|
20
29
|
//# sourceMappingURL=resolve.d.ts.map
|
package/src/lib/resolve.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../../../../libs/a2ui/src/lib/resolve.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;CACf;
|
|
1
|
+
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../../../../libs/a2ui/src/lib/resolve.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,gBAAgB,CAAC;AAExB,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;CACf;AAaD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,KAAK,CAAC,EAAE,SAAS,EACjB,QAAQ,CAAC,EAAE,oBAAoB,GAC9B,OAAO,CA0BT"}
|
package/src/lib/resolve.js
CHANGED
|
@@ -1,20 +1,7 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
import { getByPointer } from './pointer.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
function isLiteralString(v) {
|
|
7
|
-
return typeof v === 'object' && v !== null && 'literalString' in v;
|
|
8
|
-
}
|
|
9
|
-
function isLiteralNumber(v) {
|
|
10
|
-
return typeof v === 'object' && v !== null && 'literalNumber' in v;
|
|
11
|
-
}
|
|
12
|
-
function isLiteralBoolean(v) {
|
|
13
|
-
return typeof v === 'object' && v !== null && 'literalBoolean' in v;
|
|
14
|
-
}
|
|
15
|
-
function isLiteralArray(v) {
|
|
16
|
-
return typeof v === 'object' && v !== null && 'literalArray' in v;
|
|
17
|
-
}
|
|
3
|
+
import { isFunctionCall, isPathRef } from './guards.js';
|
|
4
|
+
import { withActiveRegistry, warnUnknownA2uiFunction, } from './functions.js';
|
|
18
5
|
function resolvePathRef(ref, model, scope) {
|
|
19
6
|
const path = ref.path;
|
|
20
7
|
if (path.startsWith('/'))
|
|
@@ -24,36 +11,50 @@ function resolvePathRef(ref, model, scope) {
|
|
|
24
11
|
return getByPointer(model, '/' + path);
|
|
25
12
|
}
|
|
26
13
|
/**
|
|
27
|
-
* Resolves an A2UI dynamic value against a client data model.
|
|
14
|
+
* Resolves an A2UI v0.9 dynamic value against a client data model.
|
|
28
15
|
*
|
|
29
|
-
*
|
|
30
|
-
* from the model by JSON-pointer path, arrays resolve
|
|
31
|
-
*
|
|
16
|
+
* Bare literals (strings, numbers, booleans) pass through unchanged, `{ path }`
|
|
17
|
+
* references read from the model by JSON-pointer path, arrays resolve
|
|
18
|
+
* element-wise, and client-side function calls (`{ call }`) execute through the
|
|
19
|
+
* provided function registry — argument values resolve recursively, so args may
|
|
20
|
+
* themselves be bindings or nested calls. Without a registry (or for unknown
|
|
21
|
+
* function names) calls resolve to `undefined`. Unrecognized plain objects pass
|
|
22
|
+
* through unchanged.
|
|
32
23
|
*
|
|
33
24
|
* @example
|
|
34
25
|
* ```ts
|
|
35
26
|
* const model = { customer: { name: 'Ada' } };
|
|
36
27
|
* resolveDynamic({ path: '/customer/name' }, model); // 'Ada'
|
|
37
|
-
* resolveDynamic(
|
|
28
|
+
* resolveDynamic('Checkout', model); // 'Checkout'
|
|
29
|
+
* resolveDynamic(
|
|
30
|
+
* { call: 'formatString', args: { value: 'Hi ${/customer/name}' } },
|
|
31
|
+
* model, undefined, createA2uiFunctionRegistry(),
|
|
32
|
+
* ); // 'Hi Ada'
|
|
38
33
|
* ```
|
|
39
34
|
*/
|
|
40
|
-
export function resolveDynamic(value, model, scope) {
|
|
35
|
+
export function resolveDynamic(value, model, scope, registry) {
|
|
41
36
|
if (value == null)
|
|
42
37
|
return value;
|
|
43
38
|
if (Array.isArray(value))
|
|
44
|
-
return value.map(item => resolveDynamic(item, model, scope));
|
|
45
|
-
//
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
39
|
+
return value.map(item => resolveDynamic(item, model, scope, registry));
|
|
40
|
+
// Client-side function call. Checked before path refs so
|
|
41
|
+
// `{ call, args: { path: ... } }`-style args never masquerade as bindings.
|
|
42
|
+
if (isFunctionCall(value)) {
|
|
43
|
+
if (!registry)
|
|
44
|
+
return undefined;
|
|
45
|
+
const impl = registry.get(value.call);
|
|
46
|
+
if (!impl) {
|
|
47
|
+
warnUnknownA2uiFunction(value.call);
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
50
|
+
const args = (value.args ?? {});
|
|
51
|
+
return withActiveRegistry(registry, () => impl(args, {
|
|
52
|
+
resolveArg: (v) => resolveDynamic(v, model, scope, registry),
|
|
53
|
+
}));
|
|
54
|
+
}
|
|
54
55
|
// Path reference
|
|
55
56
|
if (isPathRef(value))
|
|
56
57
|
return resolvePathRef(value, model, scope);
|
|
57
|
-
//
|
|
58
|
+
// Bare literal passthrough (string, number, boolean, plain object)
|
|
58
59
|
return value;
|
|
59
60
|
}
|
package/src/lib/types.d.ts
CHANGED
|
@@ -1,262 +1,268 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
path: string;
|
|
10
|
-
};
|
|
11
|
-
export type DynamicNumber = {
|
|
12
|
-
literalNumber: number;
|
|
13
|
-
} | {
|
|
14
|
-
path: string;
|
|
15
|
-
};
|
|
16
|
-
export type DynamicBoolean = {
|
|
17
|
-
literalBoolean: boolean;
|
|
18
|
-
} | {
|
|
1
|
+
/** Wire version stamped on every A2UI v0.9-family envelope. */
|
|
2
|
+
export declare const A2UI_WIRE_VERSION = "v0.9";
|
|
3
|
+
/** MIME type for A2UI payloads, standardized in the v0.9.1 release. */
|
|
4
|
+
export declare const A2UI_MIME_TYPE = "application/a2ui+json";
|
|
5
|
+
/** Catalog id of the standard A2UI basic component catalog. */
|
|
6
|
+
export declare const A2UI_BASIC_CATALOG_ID = "https://a2ui.org/specification/v0_9/catalogs/basic/catalog.json";
|
|
7
|
+
/** JSON-pointer data-model binding. Absolute (`/a/b`) or relative inside templates. */
|
|
8
|
+
export interface A2uiPathRef {
|
|
19
9
|
path: string;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
10
|
+
}
|
|
11
|
+
/** Client-side function invocation (e.g. `formatString`, `required`). */
|
|
12
|
+
export interface A2uiFunctionCall {
|
|
13
|
+
call: string;
|
|
14
|
+
args?: Record<string, unknown>;
|
|
15
|
+
returnType?: 'string' | 'number' | 'boolean' | 'array' | 'object' | 'any' | 'void';
|
|
16
|
+
}
|
|
17
|
+
export type DynamicString = string | A2uiPathRef | A2uiFunctionCall;
|
|
18
|
+
export type DynamicNumber = number | A2uiPathRef | A2uiFunctionCall;
|
|
19
|
+
export type DynamicBoolean = boolean | A2uiPathRef | A2uiFunctionCall;
|
|
20
|
+
export type DynamicStringList = string[] | A2uiPathRef | A2uiFunctionCall;
|
|
21
|
+
/** Any dynamic value position where the concrete type is component-defined. */
|
|
22
|
+
export type DynamicValue = unknown;
|
|
23
|
+
/** Static child-id list, or a template stamped per element of a data-model list. */
|
|
24
|
+
export type A2uiChildren = string[] | {
|
|
24
25
|
path: string;
|
|
26
|
+
componentId: string;
|
|
25
27
|
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
dataBinding: string;
|
|
28
|
+
/** Dispatches a named event (with optional context) to the agent. */
|
|
29
|
+
export interface A2uiEventAction {
|
|
30
|
+
event: {
|
|
31
|
+
name: string;
|
|
32
|
+
context?: Record<string, DynamicValue>;
|
|
32
33
|
};
|
|
33
|
-
};
|
|
34
|
-
export interface A2uiActionContextEntry {
|
|
35
|
-
key: string;
|
|
36
|
-
value: DynamicString | DynamicNumber | DynamicBoolean;
|
|
37
34
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
/** Executes a client-side function locally (e.g. `openUrl`). */
|
|
36
|
+
export interface A2uiFunctionAction {
|
|
37
|
+
functionCall: A2uiFunctionCall;
|
|
38
|
+
}
|
|
39
|
+
export type A2uiAction = A2uiEventAction | A2uiFunctionAction;
|
|
40
|
+
export interface A2uiCheck {
|
|
41
|
+
/** A DynamicBoolean — typically a validator function call (`required`,
|
|
42
|
+
* `regex`, `length`, `numeric`, `email`) or a logic combinator. The rule
|
|
43
|
+
* passes when the condition resolves to `true`. */
|
|
44
|
+
condition: DynamicValue;
|
|
45
|
+
/** Error message displayed when the check fails. */
|
|
46
|
+
message: string;
|
|
47
|
+
}
|
|
48
|
+
export interface A2uiComponentBase {
|
|
49
|
+
id: string;
|
|
50
|
+
component: string;
|
|
51
|
+
/** Overrides the surface's default catalog for this component. */
|
|
52
|
+
catalogId?: string;
|
|
53
|
+
/** Flex-grow-like weight; only valid as a direct child of Row/Column. */
|
|
54
|
+
weight?: number;
|
|
55
|
+
/** Accessibility attributes (spec `AccessibilityAttributes`). */
|
|
56
|
+
accessibility?: Record<string, unknown>;
|
|
57
|
+
}
|
|
58
|
+
/** Mixin for input components that support client-side validation checks. */
|
|
59
|
+
export interface A2uiCheckable {
|
|
60
|
+
checks?: A2uiCheck[];
|
|
41
61
|
}
|
|
42
|
-
export interface A2uiText {
|
|
62
|
+
export interface A2uiText extends A2uiComponentBase {
|
|
63
|
+
component: 'Text';
|
|
43
64
|
text: DynamicString;
|
|
44
|
-
|
|
65
|
+
variant?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'caption' | 'body';
|
|
45
66
|
}
|
|
46
|
-
export interface A2uiImage {
|
|
67
|
+
export interface A2uiImage extends A2uiComponentBase {
|
|
68
|
+
component: 'Image';
|
|
47
69
|
url: DynamicString;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
70
|
+
description?: DynamicString;
|
|
71
|
+
fit?: 'contain' | 'cover' | 'fill' | 'none' | 'scaleDown';
|
|
72
|
+
variant?: 'icon' | 'avatar' | 'smallFeature' | 'mediumFeature' | 'largeFeature' | 'header';
|
|
51
73
|
}
|
|
52
|
-
export interface A2uiIcon {
|
|
53
|
-
|
|
54
|
-
|
|
74
|
+
export interface A2uiIcon extends A2uiComponentBase {
|
|
75
|
+
component: 'Icon';
|
|
76
|
+
name: DynamicString | {
|
|
77
|
+
svgPath: string;
|
|
78
|
+
};
|
|
55
79
|
}
|
|
56
|
-
export interface A2uiVideo {
|
|
80
|
+
export interface A2uiVideo extends A2uiComponentBase {
|
|
81
|
+
component: 'Video';
|
|
57
82
|
url: DynamicString;
|
|
58
|
-
autoPlay?: boolean;
|
|
59
|
-
controls?: boolean;
|
|
60
83
|
}
|
|
61
|
-
export interface A2uiAudioPlayer {
|
|
84
|
+
export interface A2uiAudioPlayer extends A2uiComponentBase {
|
|
85
|
+
component: 'AudioPlayer';
|
|
62
86
|
url: DynamicString;
|
|
63
|
-
|
|
64
|
-
controls?: boolean;
|
|
87
|
+
description?: DynamicString;
|
|
65
88
|
}
|
|
66
|
-
|
|
89
|
+
type A2uiJustify = 'start' | 'center' | 'end' | 'spaceAround' | 'spaceBetween' | 'spaceEvenly' | 'stretch';
|
|
90
|
+
type A2uiAlign = 'start' | 'center' | 'end' | 'stretch';
|
|
91
|
+
export interface A2uiRow extends A2uiComponentBase {
|
|
92
|
+
component: 'Row';
|
|
67
93
|
children: A2uiChildren;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
distribution?: 'start' | 'center' | 'end' | 'space-between' | 'space-around';
|
|
94
|
+
justify?: A2uiJustify;
|
|
95
|
+
align?: A2uiAlign;
|
|
71
96
|
}
|
|
72
|
-
export interface A2uiColumn {
|
|
97
|
+
export interface A2uiColumn extends A2uiComponentBase {
|
|
98
|
+
component: 'Column';
|
|
73
99
|
children: A2uiChildren;
|
|
74
|
-
|
|
75
|
-
|
|
100
|
+
justify?: A2uiJustify;
|
|
101
|
+
align?: A2uiAlign;
|
|
76
102
|
}
|
|
77
|
-
export interface A2uiList {
|
|
103
|
+
export interface A2uiList extends A2uiComponentBase {
|
|
104
|
+
component: 'List';
|
|
78
105
|
children: A2uiChildren;
|
|
79
106
|
direction?: 'vertical' | 'horizontal';
|
|
107
|
+
align?: A2uiAlign;
|
|
80
108
|
}
|
|
81
|
-
export interface A2uiCard {
|
|
109
|
+
export interface A2uiCard extends A2uiComponentBase {
|
|
110
|
+
component: 'Card';
|
|
82
111
|
child: string;
|
|
83
112
|
}
|
|
84
|
-
export interface
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
113
|
+
export interface A2uiTabs extends A2uiComponentBase {
|
|
114
|
+
component: 'Tabs';
|
|
115
|
+
tabs: {
|
|
116
|
+
title: DynamicString;
|
|
117
|
+
child: string;
|
|
118
|
+
}[];
|
|
90
119
|
}
|
|
91
|
-
export interface
|
|
92
|
-
|
|
120
|
+
export interface A2uiModal extends A2uiComponentBase {
|
|
121
|
+
component: 'Modal';
|
|
122
|
+
trigger: string;
|
|
123
|
+
content: string;
|
|
93
124
|
}
|
|
94
|
-
export interface
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
title?: DynamicString;
|
|
125
|
+
export interface A2uiDivider extends A2uiComponentBase {
|
|
126
|
+
component: 'Divider';
|
|
127
|
+
axis?: 'horizontal' | 'vertical';
|
|
98
128
|
}
|
|
99
|
-
export interface A2uiButton {
|
|
129
|
+
export interface A2uiButton extends A2uiComponentBase {
|
|
130
|
+
component: 'Button';
|
|
100
131
|
child: string;
|
|
101
|
-
|
|
132
|
+
variant?: 'default' | 'primary' | 'borderless';
|
|
102
133
|
action: A2uiAction;
|
|
103
134
|
}
|
|
104
|
-
export interface A2uiCheckBox {
|
|
135
|
+
export interface A2uiCheckBox extends A2uiComponentBase, A2uiCheckable {
|
|
136
|
+
component: 'CheckBox';
|
|
105
137
|
label: DynamicString;
|
|
106
|
-
|
|
107
|
-
action?: A2uiAction;
|
|
138
|
+
value: DynamicBoolean;
|
|
108
139
|
}
|
|
109
|
-
export interface A2uiTextField {
|
|
140
|
+
export interface A2uiTextField extends A2uiComponentBase, A2uiCheckable {
|
|
141
|
+
component: 'TextField';
|
|
110
142
|
label: DynamicString;
|
|
111
|
-
|
|
112
|
-
|
|
143
|
+
value?: DynamicString;
|
|
144
|
+
variant?: 'shortText' | 'longText' | 'number' | 'obscured';
|
|
113
145
|
validationRegexp?: string;
|
|
114
146
|
}
|
|
115
|
-
export interface A2uiDateTimeInput {
|
|
116
|
-
|
|
117
|
-
value
|
|
147
|
+
export interface A2uiDateTimeInput extends A2uiComponentBase, A2uiCheckable {
|
|
148
|
+
component: 'DateTimeInput';
|
|
149
|
+
/** ISO 8601 value. */
|
|
150
|
+
value: DynamicString;
|
|
118
151
|
enableDate?: boolean;
|
|
119
152
|
enableTime?: boolean;
|
|
153
|
+
min?: DynamicString;
|
|
154
|
+
max?: DynamicString;
|
|
155
|
+
label?: DynamicString;
|
|
120
156
|
}
|
|
121
|
-
export interface
|
|
122
|
-
|
|
157
|
+
export interface A2uiChoicePicker extends A2uiComponentBase, A2uiCheckable {
|
|
158
|
+
component: 'ChoicePicker';
|
|
123
159
|
options: {
|
|
124
160
|
label: DynamicString;
|
|
125
161
|
value: string;
|
|
126
162
|
}[];
|
|
127
|
-
|
|
163
|
+
value: DynamicStringList;
|
|
164
|
+
variant?: 'mutuallyExclusive' | 'multipleSelection';
|
|
165
|
+
displayStyle?: 'checkbox' | 'chips';
|
|
166
|
+
filterable?: boolean;
|
|
128
167
|
label?: DynamicString;
|
|
129
168
|
}
|
|
130
|
-
export interface A2uiSlider {
|
|
169
|
+
export interface A2uiSlider extends A2uiComponentBase, A2uiCheckable {
|
|
170
|
+
component: 'Slider';
|
|
131
171
|
value: DynamicNumber;
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
step?: number;
|
|
172
|
+
max: number;
|
|
173
|
+
min?: number;
|
|
135
174
|
label?: DynamicString;
|
|
136
175
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
Row: A2uiRow;
|
|
149
|
-
} | {
|
|
150
|
-
Column: A2uiColumn;
|
|
151
|
-
} | {
|
|
152
|
-
List: A2uiList;
|
|
153
|
-
} | {
|
|
154
|
-
Card: A2uiCard;
|
|
155
|
-
} | {
|
|
156
|
-
Tabs: A2uiTabs;
|
|
157
|
-
} | {
|
|
158
|
-
Divider: A2uiDivider;
|
|
159
|
-
} | {
|
|
160
|
-
Modal: A2uiModal;
|
|
161
|
-
} | {
|
|
162
|
-
Button: A2uiButton;
|
|
163
|
-
} | {
|
|
164
|
-
CheckBox: A2uiCheckBox;
|
|
165
|
-
} | {
|
|
166
|
-
TextField: A2uiTextField;
|
|
167
|
-
} | {
|
|
168
|
-
DateTimeInput: A2uiDateTimeInput;
|
|
169
|
-
} | {
|
|
170
|
-
MultipleChoice: A2uiMultipleChoice;
|
|
171
|
-
} | {
|
|
172
|
-
Slider: A2uiSlider;
|
|
173
|
-
};
|
|
174
|
-
export interface A2uiComponent {
|
|
175
|
-
id: string;
|
|
176
|
-
weight?: number;
|
|
177
|
-
component: A2uiComponentDef;
|
|
176
|
+
/** Union of the basic-catalog component shapes. */
|
|
177
|
+
export type A2uiCatalogComponent = A2uiText | A2uiImage | A2uiIcon | A2uiVideo | A2uiAudioPlayer | A2uiRow | A2uiColumn | A2uiList | A2uiCard | A2uiTabs | A2uiModal | A2uiDivider | A2uiButton | A2uiCheckBox | A2uiTextField | A2uiDateTimeInput | A2uiChoicePicker | A2uiSlider;
|
|
178
|
+
/**
|
|
179
|
+
* Any component, including non-basic-catalog types. Renderers treat unknown
|
|
180
|
+
* `component` strings as unrenderable and fall back gracefully.
|
|
181
|
+
*/
|
|
182
|
+
export type A2uiComponent = A2uiCatalogComponent | (A2uiComponentBase & Record<string, unknown>);
|
|
183
|
+
export interface A2uiTheme {
|
|
184
|
+
primaryColor?: string;
|
|
185
|
+
iconUrl?: string;
|
|
186
|
+
agentDisplayName?: string;
|
|
178
187
|
}
|
|
179
|
-
export interface
|
|
188
|
+
export interface A2uiCreateSurface {
|
|
180
189
|
surfaceId: string;
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
valueString?: string;
|
|
186
|
-
valueNumber?: number;
|
|
187
|
-
valueBoolean?: boolean;
|
|
188
|
-
valueMap?: A2uiDataModelEntry[];
|
|
190
|
+
catalogId: string;
|
|
191
|
+
theme?: A2uiTheme;
|
|
192
|
+
/** When true, the client attaches the surface's full data model to every outbound message. */
|
|
193
|
+
sendDataModel?: boolean;
|
|
189
194
|
}
|
|
190
|
-
export interface
|
|
195
|
+
export interface A2uiUpdateComponents {
|
|
191
196
|
surfaceId: string;
|
|
192
|
-
|
|
193
|
-
contents: A2uiDataModelEntry[];
|
|
197
|
+
components: A2uiComponent[];
|
|
194
198
|
}
|
|
195
|
-
export interface
|
|
199
|
+
export interface A2uiUpdateDataModel {
|
|
196
200
|
surfaceId: string;
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
};
|
|
201
|
+
/** JSON pointer into the data model. Omitted or `/` targets the whole model. */
|
|
202
|
+
path?: string;
|
|
203
|
+
/** Replacement value at `path`. Omitted value deletes the key at `path`. */
|
|
204
|
+
value?: unknown;
|
|
202
205
|
}
|
|
203
206
|
export interface A2uiDeleteSurface {
|
|
204
207
|
surfaceId: string;
|
|
205
208
|
}
|
|
206
|
-
|
|
207
|
-
|
|
209
|
+
interface A2uiEnvelopeBase {
|
|
210
|
+
/** Wire version; `v0.9` for the stable family. */
|
|
211
|
+
version: string;
|
|
212
|
+
}
|
|
213
|
+
export type A2uiMessage = A2uiEnvelopeBase & ({
|
|
214
|
+
createSurface: A2uiCreateSurface;
|
|
208
215
|
} | {
|
|
209
|
-
|
|
216
|
+
updateComponents: A2uiUpdateComponents;
|
|
210
217
|
} | {
|
|
211
|
-
|
|
218
|
+
updateDataModel: A2uiUpdateDataModel;
|
|
212
219
|
} | {
|
|
213
220
|
deleteSurface: A2uiDeleteSurface;
|
|
214
|
-
};
|
|
215
|
-
export interface A2uiSurface {
|
|
216
|
-
surfaceId: string;
|
|
217
|
-
catalogId: string;
|
|
218
|
-
theme?: A2uiTheme;
|
|
219
|
-
sendDataModel?: boolean;
|
|
220
|
-
components: Map<string, A2uiComponent>;
|
|
221
|
-
dataModel: Record<string, unknown>;
|
|
222
|
-
/** Styles set by the agent via `beginRendering.styles`. The
|
|
223
|
-
* canonical v1 spec defines exactly two fields: `font` (primary
|
|
224
|
-
* font for the UI) and `primaryColor` (hex `#RRGGBB`). The renderer
|
|
225
|
-
* applies these as CSS custom properties on the surface root,
|
|
226
|
-
* overriding any consumer-set defaults for the duration of the
|
|
227
|
-
* surface's life. Anything richer (typography scale, spacing,
|
|
228
|
-
* elevation, etc.) is the renderer's private vocabulary and not
|
|
229
|
-
* communicated through this field. */
|
|
230
|
-
styles?: {
|
|
231
|
-
font?: string;
|
|
232
|
-
primaryColor?: string;
|
|
233
|
-
};
|
|
234
|
-
}
|
|
221
|
+
});
|
|
235
222
|
export interface A2uiClientDataModel {
|
|
236
|
-
version: 'v1';
|
|
237
223
|
surfaces: Record<string, Record<string, unknown>>;
|
|
238
224
|
}
|
|
225
|
+
export interface A2uiClientCapabilities {
|
|
226
|
+
supportedCatalogIds: string[];
|
|
227
|
+
inlineCatalogs?: unknown[];
|
|
228
|
+
}
|
|
239
229
|
export interface A2uiActionMessage {
|
|
240
|
-
version:
|
|
230
|
+
version: string;
|
|
241
231
|
action: {
|
|
242
232
|
name: string;
|
|
243
233
|
surfaceId: string;
|
|
244
234
|
sourceComponentId: string;
|
|
245
235
|
timestamp: string;
|
|
246
|
-
context
|
|
236
|
+
context?: Record<string, unknown>;
|
|
247
237
|
/**
|
|
248
|
-
*
|
|
249
|
-
* from the source component's authored text (e.g. a
|
|
250
|
-
* Text
|
|
251
|
-
*
|
|
252
|
-
* Used by the chat-lib's transcript renderer to label the user
|
|
253
|
-
* bubble; backends may ignore. See spec
|
|
238
|
+
* Threadplane extension: optional human-friendly label for the action —
|
|
239
|
+
* typically derived from the source component's authored text (e.g. a
|
|
240
|
+
* Button's child Text). Used by the chat-lib's transcript renderer to
|
|
241
|
+
* label the user bubble; backends may ignore. See spec
|
|
254
242
|
* 2026-05-19-llm-generated-labels-design.md.
|
|
255
243
|
*/
|
|
256
244
|
label?: string;
|
|
257
245
|
};
|
|
258
246
|
metadata?: {
|
|
259
|
-
a2uiClientDataModel
|
|
247
|
+
a2uiClientDataModel?: A2uiClientDataModel;
|
|
260
248
|
};
|
|
261
249
|
}
|
|
250
|
+
export interface A2uiErrorMessage {
|
|
251
|
+
version: string;
|
|
252
|
+
error: {
|
|
253
|
+
code: string;
|
|
254
|
+
surfaceId?: string;
|
|
255
|
+
path?: string;
|
|
256
|
+
message?: string;
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
export interface A2uiSurface {
|
|
260
|
+
surfaceId: string;
|
|
261
|
+
catalogId: string;
|
|
262
|
+
theme?: A2uiTheme;
|
|
263
|
+
sendDataModel?: boolean;
|
|
264
|
+
components: Map<string, A2uiComponent>;
|
|
265
|
+
dataModel: Record<string, unknown>;
|
|
266
|
+
}
|
|
267
|
+
export {};
|
|
262
268
|
//# sourceMappingURL=types.d.ts.map
|
package/src/lib/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../libs/a2ui/src/lib/types.ts"],"names":[],"mappings":"AAIA,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../libs/a2ui/src/lib/types.ts"],"names":[],"mappings":"AAIA,+DAA+D;AAC/D,eAAO,MAAM,iBAAiB,SAAS,CAAC;AACxC,uEAAuE;AACvE,eAAO,MAAM,cAAc,0BAA0B,CAAC;AACtD,+DAA+D;AAC/D,eAAO,MAAM,qBAAqB,oEACiC,CAAC;AAMpE,uFAAuF;AACvF,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,yEAAyE;AACzE,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,UAAU,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;CACpF;AAED,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,WAAW,GAAG,gBAAgB,CAAC;AACpE,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAC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GED
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
|
|
2
|
+
// --- Protocol constants ---
|
|
3
|
+
/** Wire version stamped on every A2UI v0.9-family envelope. */
|
|
4
|
+
export const A2UI_WIRE_VERSION = 'v0.9';
|
|
5
|
+
/** MIME type for A2UI payloads, standardized in the v0.9.1 release. */
|
|
6
|
+
export const A2UI_MIME_TYPE = 'application/a2ui+json';
|
|
7
|
+
/** Catalog id of the standard A2UI basic component catalog. */
|
|
8
|
+
export const A2UI_BASIC_CATALOG_ID = 'https://a2ui.org/specification/v0_9/catalogs/basic/catalog.json';
|