@mcp-native/a2ui 0.1.0 → 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/README.md +100 -13
- package/dist/binding.d.ts +33 -0
- package/dist/binding.d.ts.map +1 -0
- package/dist/binding.js +83 -0
- package/dist/binding.js.map +1 -0
- package/dist/errors.d.ts +7 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +13 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +9 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -13
- package/dist/index.js.map +1 -1
- package/dist/mime.d.ts +6 -0
- package/dist/mime.d.ts.map +1 -0
- package/dist/mime.js +2 -0
- package/dist/mime.js.map +1 -0
- package/dist/schema-revision.d.ts +3 -0
- package/dist/schema-revision.d.ts.map +1 -0
- package/dist/schema-revision.js +3 -0
- package/dist/schema-revision.js.map +1 -0
- package/dist/v1/action.d.ts +7 -0
- package/dist/v1/action.d.ts.map +1 -0
- package/dist/v1/action.js +86 -0
- package/dist/v1/action.js.map +1 -0
- package/dist/v1/capabilities.d.ts +13 -0
- package/dist/v1/capabilities.d.ts.map +1 -0
- package/dist/v1/capabilities.js +134 -0
- package/dist/v1/capabilities.js.map +1 -0
- package/dist/v1/format-string.d.ts +21 -0
- package/dist/v1/format-string.d.ts.map +1 -0
- package/dist/v1/format-string.js +487 -0
- package/dist/v1/format-string.js.map +1 -0
- package/dist/v1/index.d.ts +13 -0
- package/dist/v1/index.d.ts.map +1 -0
- package/dist/v1/index.js +9 -0
- package/dist/v1/index.js.map +1 -0
- package/dist/v1/parse.d.ts +12 -0
- package/dist/v1/parse.d.ts.map +1 -0
- package/dist/v1/parse.js +96 -0
- package/dist/v1/parse.js.map +1 -0
- package/dist/v1/resolve.d.ts +19 -0
- package/dist/v1/resolve.d.ts.map +1 -0
- package/dist/v1/resolve.js +112 -0
- package/dist/v1/resolve.js.map +1 -0
- package/dist/v1/schemas.d.ts +16 -0
- package/dist/v1/schemas.d.ts.map +1 -0
- package/dist/v1/schemas.js +133 -0
- package/dist/v1/schemas.js.map +1 -0
- package/dist/v1/store.d.ts +21 -0
- package/dist/v1/store.d.ts.map +1 -0
- package/dist/v1/store.js +305 -0
- package/dist/v1/store.js.map +1 -0
- package/dist/v1/types.d.ts +109 -0
- package/dist/v1/types.d.ts.map +1 -0
- package/dist/v1/types.js +10 -0
- package/dist/v1/types.js.map +1 -0
- package/dist/v1/validate.d.ts +26 -0
- package/dist/v1/validate.d.ts.map +1 -0
- package/dist/v1/validate.js +449 -0
- package/dist/v1/validate.js.map +1 -0
- package/dist/v1/vendor/agent_capabilities.json +26 -0
- package/dist/v1/vendor/agent_to_renderer.json +216 -0
- package/dist/v1/vendor/catalog.json +1346 -0
- package/dist/v1/vendor/common_types.json +395 -0
- package/dist/v1/vendor/renderer_capabilities.json +29 -0
- package/dist/v1/vendor/renderer_to_agent.json +161 -0
- package/package.json +5 -2
- package/schemas/7541f953050cd58b80f0bf5d85fe2d63192af305/CHECKSUMS.sha256 +13 -0
- package/schemas/7541f953050cd58b80f0bf5d85fe2d63192af305/PROVENANCE.md +12 -0
- package/schemas/7541f953050cd58b80f0bf5d85fe2d63192af305/catalogs/basic/catalog.json +1346 -0
- package/schemas/7541f953050cd58b80f0bf5d85fe2d63192af305/json/agent_capabilities.json +26 -0
- package/schemas/7541f953050cd58b80f0bf5d85fe2d63192af305/json/agent_to_renderer.json +216 -0
- package/schemas/7541f953050cd58b80f0bf5d85fe2d63192af305/json/agent_to_renderer_list.json +10 -0
- package/schemas/7541f953050cd58b80f0bf5d85fe2d63192af305/json/agent_to_renderer_list_wrapper.json +14 -0
- package/schemas/7541f953050cd58b80f0bf5d85fe2d63192af305/json/catalog_definition.json +267 -0
- package/schemas/7541f953050cd58b80f0bf5d85fe2d63192af305/json/common_types.json +395 -0
- package/schemas/7541f953050cd58b80f0bf5d85fe2d63192af305/json/renderer_capabilities.json +29 -0
- package/schemas/7541f953050cd58b80f0bf5d85fe2d63192af305/json/renderer_data_model.json +22 -0
- package/schemas/7541f953050cd58b80f0bf5d85fe2d63192af305/json/renderer_to_agent.json +161 -0
- package/schemas/7541f953050cd58b80f0bf5d85fe2d63192af305/json/renderer_to_agent_list.json +10 -0
- package/schemas/7541f953050cd58b80f0bf5d85fe2d63192af305/json/renderer_to_agent_list_wrapper.json +14 -0
- package/schemas/7541f953050cd58b80f0bf5d85fe2d63192af305/json/sample.json +22 -0
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://a2ui.org/specification/v1_0/common_types.json",
|
|
4
|
+
"title": "A2UI Common Types",
|
|
5
|
+
"description": "Common type definitions used across A2UI schemas.",
|
|
6
|
+
"$defs": {
|
|
7
|
+
"ComponentId": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "The unique identifier for a component, used for both definitions and references within the same surface."
|
|
10
|
+
},
|
|
11
|
+
"CallId": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "The unique identifier for a function call."
|
|
14
|
+
},
|
|
15
|
+
"AccessibilityAttributes": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"description": "Attributes to enhance accessibility when using assistive technologies like screen readers or model understanding.",
|
|
18
|
+
"properties": {
|
|
19
|
+
"label": {
|
|
20
|
+
"$ref": "#/$defs/DynamicString",
|
|
21
|
+
"description": "A short string, typically 1 to 3 words, used by assistive technologies to convey the purpose or intent of an element. For example, an input field might have an accessible label of 'User ID' or a button might be labeled 'Submit'."
|
|
22
|
+
},
|
|
23
|
+
"description": {
|
|
24
|
+
"$ref": "#/$defs/DynamicString",
|
|
25
|
+
"description": "Additional information provided by assistive technologies about an element such as instructions, format requirements, or result of an action. For example, a mute button might have a label of 'Mute' and a description of 'Silences notifications about this conversation'."
|
|
26
|
+
},
|
|
27
|
+
"live": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"enum": ["off", "polite", "assertive"],
|
|
30
|
+
"default": "off",
|
|
31
|
+
"description": "Controls screen reader announcements for dynamic updates (WAI-ARIA aria-live). 'polite' waits for user pause; 'assertive' interrupts immediately for alerts."
|
|
32
|
+
},
|
|
33
|
+
"hidden": {
|
|
34
|
+
"$ref": "#/$defs/DynamicBoolean",
|
|
35
|
+
"description": "Hides the element and its children from assistive technologies when true. Default is false."
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"additionalProperties": false
|
|
39
|
+
},
|
|
40
|
+
"Extensions": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"description": "Optional extension metadata. Keys MUST be Unicode identifiers (UAX #31). Keys starting with 'a2ui_' are reserved for official extensions.",
|
|
43
|
+
"patternProperties": {
|
|
44
|
+
"^[\\p{XID_Start}_][\\p{XID_Continue}]*$": {}
|
|
45
|
+
},
|
|
46
|
+
"additionalProperties": false
|
|
47
|
+
},
|
|
48
|
+
"ComponentCommon": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"properties": {
|
|
51
|
+
"id": {
|
|
52
|
+
"$ref": "#/$defs/ComponentId"
|
|
53
|
+
},
|
|
54
|
+
"catalogId": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"description": "The catalog ID for this component, overriding any surface-level default catalogId."
|
|
57
|
+
},
|
|
58
|
+
"accessibility": {
|
|
59
|
+
"$ref": "#/$defs/AccessibilityAttributes"
|
|
60
|
+
},
|
|
61
|
+
"metadata": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"description": "Optional component-level metadata for vendor extensions.",
|
|
64
|
+
"properties": {
|
|
65
|
+
"extensions": {
|
|
66
|
+
"$ref": "#/$defs/Extensions"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"additionalProperties": false
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"required": ["id"]
|
|
73
|
+
},
|
|
74
|
+
"Child": {
|
|
75
|
+
"$ref": "#/$defs/ComponentId",
|
|
76
|
+
"description": "A reference to a single child component ID."
|
|
77
|
+
},
|
|
78
|
+
"ChildList": {
|
|
79
|
+
"oneOf": [
|
|
80
|
+
{
|
|
81
|
+
"type": "array",
|
|
82
|
+
"items": {
|
|
83
|
+
"$ref": "#/$defs/ComponentId"
|
|
84
|
+
},
|
|
85
|
+
"description": "A static list of child component IDs."
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"type": "object",
|
|
89
|
+
"description": "A template for generating a dynamic list of children from a data model list. The `componentId` is the component to use as a template.",
|
|
90
|
+
"properties": {
|
|
91
|
+
"componentId": {
|
|
92
|
+
"$ref": "#/$defs/ComponentId"
|
|
93
|
+
},
|
|
94
|
+
"path": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"description": "The path to the list of component property objects in the data model."
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"required": ["componentId", "path"],
|
|
100
|
+
"additionalProperties": false
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
"DataBinding": {
|
|
105
|
+
"type": "object",
|
|
106
|
+
"properties": {
|
|
107
|
+
"path": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"description": "A JSON Pointer path to a value in the data model."
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"required": ["path"],
|
|
113
|
+
"additionalProperties": false
|
|
114
|
+
},
|
|
115
|
+
"DynamicValue": {
|
|
116
|
+
"description": "A value that can be a literal, a path, or a function call returning any type.",
|
|
117
|
+
"oneOf": [
|
|
118
|
+
{
|
|
119
|
+
"type": "string"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"type": "number"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"type": "boolean"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"type": "array"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"type": "object",
|
|
132
|
+
"not": {
|
|
133
|
+
"anyOf": [
|
|
134
|
+
{
|
|
135
|
+
"required": ["path"]
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"required": ["call"]
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"$ref": "#/$defs/DataBinding"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"$ref": "#/$defs/FunctionCall"
|
|
148
|
+
}
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
"DynamicString": {
|
|
152
|
+
"description": "Represents a string",
|
|
153
|
+
"oneOf": [
|
|
154
|
+
{
|
|
155
|
+
"type": "string"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"$ref": "#/$defs/DataBinding"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"$ref": "#/$defs/FunctionCall"
|
|
162
|
+
}
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
"DynamicNumber": {
|
|
166
|
+
"description": "Represents a value that can be either a literal number, a path to a number in the data model, or a function call returning a number.",
|
|
167
|
+
"oneOf": [
|
|
168
|
+
{
|
|
169
|
+
"type": "number"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"$ref": "#/$defs/DataBinding"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"$ref": "#/$defs/FunctionCall"
|
|
176
|
+
}
|
|
177
|
+
]
|
|
178
|
+
},
|
|
179
|
+
"DynamicBoolean": {
|
|
180
|
+
"description": "A boolean value that can be a literal, a path, or a function call returning a boolean.",
|
|
181
|
+
"oneOf": [
|
|
182
|
+
{
|
|
183
|
+
"type": "boolean"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"$ref": "#/$defs/DataBinding"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"$ref": "#/$defs/FunctionCall"
|
|
190
|
+
}
|
|
191
|
+
]
|
|
192
|
+
},
|
|
193
|
+
"DynamicStringList": {
|
|
194
|
+
"description": "Represents a value that can be either a literal array of strings, a path to a string array in the data model, or a function call returning a string array.",
|
|
195
|
+
"oneOf": [
|
|
196
|
+
{
|
|
197
|
+
"type": "array",
|
|
198
|
+
"items": {
|
|
199
|
+
"type": "string"
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"$ref": "#/$defs/DataBinding"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"$ref": "#/$defs/FunctionCall"
|
|
207
|
+
}
|
|
208
|
+
]
|
|
209
|
+
},
|
|
210
|
+
"FunctionCommon": {
|
|
211
|
+
"type": "object",
|
|
212
|
+
"properties": {
|
|
213
|
+
"catalogId": {
|
|
214
|
+
"type": "string",
|
|
215
|
+
"description": "The catalog ID for this function, overriding any surface-level default catalogId."
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"IndexSystemFunction": {
|
|
220
|
+
"type": "object",
|
|
221
|
+
"description": "Returns the 0-based index of the current item when rendering a dynamic list from a template. This function MUST ONLY be available when evaluating template items within a list context.",
|
|
222
|
+
"returnType": "number",
|
|
223
|
+
"properties": {
|
|
224
|
+
"call": {
|
|
225
|
+
"const": "@index"
|
|
226
|
+
},
|
|
227
|
+
"args": {
|
|
228
|
+
"type": "object",
|
|
229
|
+
"properties": {
|
|
230
|
+
"offset": {
|
|
231
|
+
"$ref": "#/$defs/DynamicNumber",
|
|
232
|
+
"description": "Optional. An offset to add to the 0-based index (e.g., 1 for 1-based indexing). Defaults to 0.",
|
|
233
|
+
"default": 0
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
"unevaluatedProperties": false
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"required": ["call"],
|
|
240
|
+
"unevaluatedProperties": false
|
|
241
|
+
},
|
|
242
|
+
"FunctionCall": {
|
|
243
|
+
"type": "object",
|
|
244
|
+
"description": "Invokes a named function.",
|
|
245
|
+
"properties": {
|
|
246
|
+
"call": {
|
|
247
|
+
"type": "string",
|
|
248
|
+
"description": "The name of the function to call."
|
|
249
|
+
},
|
|
250
|
+
"catalogId": {
|
|
251
|
+
"type": "string",
|
|
252
|
+
"description": "The catalog ID for this function, overriding any surface-level default catalogId."
|
|
253
|
+
},
|
|
254
|
+
"args": {
|
|
255
|
+
"type": "object",
|
|
256
|
+
"description": "Arguments passed to the function.",
|
|
257
|
+
"additionalProperties": {
|
|
258
|
+
"anyOf": [
|
|
259
|
+
{
|
|
260
|
+
"$ref": "#/$defs/DynamicValue"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"type": "object",
|
|
264
|
+
"description": "A literal object argument (e.g. configuration)."
|
|
265
|
+
}
|
|
266
|
+
]
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
"required": ["call"],
|
|
271
|
+
"oneOf": [
|
|
272
|
+
{"$ref": "catalog.json#/$defs/anyFunction"},
|
|
273
|
+
{"$ref": "#/$defs/IndexSystemFunction"}
|
|
274
|
+
],
|
|
275
|
+
"unevaluatedProperties": false
|
|
276
|
+
},
|
|
277
|
+
"CheckRule": {
|
|
278
|
+
"type": "object",
|
|
279
|
+
"description": "A single validation check rule applied to an input component. The condition function or path evaluates to a ValidationResult object.",
|
|
280
|
+
"properties": {
|
|
281
|
+
"condition": {
|
|
282
|
+
"oneOf": [{"$ref": "#/$defs/DataBinding"}, {"$ref": "#/$defs/FunctionCall"}],
|
|
283
|
+
"description": "Path or function call evaluating to a ValidationResult object."
|
|
284
|
+
},
|
|
285
|
+
"message": {
|
|
286
|
+
"type": "string",
|
|
287
|
+
"description": "Optional fallback error message."
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
"required": ["condition"],
|
|
291
|
+
"additionalProperties": false
|
|
292
|
+
},
|
|
293
|
+
"Checkable": {
|
|
294
|
+
"description": "Properties for components that support renderer-side checks.",
|
|
295
|
+
"type": "object",
|
|
296
|
+
"properties": {
|
|
297
|
+
"checks": {
|
|
298
|
+
"type": "array",
|
|
299
|
+
"description": "A list of checks to perform. These are function calls that must return a boolean indicating validity.",
|
|
300
|
+
"items": {
|
|
301
|
+
"$ref": "#/$defs/CheckRule"
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
"Action": {
|
|
307
|
+
"description": "Defines an interaction handler that can either trigger an agent-side event or execute a local renderer-side function.",
|
|
308
|
+
"oneOf": [
|
|
309
|
+
{
|
|
310
|
+
"type": "object",
|
|
311
|
+
"description": "Triggers an agent-side event.",
|
|
312
|
+
"properties": {
|
|
313
|
+
"event": {
|
|
314
|
+
"type": "object",
|
|
315
|
+
"description": "The event to dispatch to the agent.",
|
|
316
|
+
"properties": {
|
|
317
|
+
"name": {
|
|
318
|
+
"type": "string",
|
|
319
|
+
"description": "The name of the action to be dispatched to the agent."
|
|
320
|
+
},
|
|
321
|
+
"userMessage": {
|
|
322
|
+
"$ref": "#/$defs/DynamicString",
|
|
323
|
+
"description": "An optional human-readable message describing the action performed by the user, to present in conversation history or user feedback."
|
|
324
|
+
},
|
|
325
|
+
"context": {
|
|
326
|
+
"type": "object",
|
|
327
|
+
"description": "A JSON object containing the key-value pairs for the action context. Values can be literals or paths. Use literal values unless the value must be dynamically bound to the data model. Do NOT use paths for static IDs.",
|
|
328
|
+
"additionalProperties": {
|
|
329
|
+
"$ref": "#/$defs/DynamicValue"
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
"required": ["name"],
|
|
334
|
+
"additionalProperties": false
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
"required": ["event"],
|
|
338
|
+
"additionalProperties": false
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"type": "object",
|
|
342
|
+
"description": "Executes a renderer or agent-side function.",
|
|
343
|
+
"properties": {
|
|
344
|
+
"functionCall": {
|
|
345
|
+
"$ref": "#/$defs/FunctionCall"
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
"required": ["functionCall"],
|
|
349
|
+
"additionalProperties": false
|
|
350
|
+
}
|
|
351
|
+
]
|
|
352
|
+
},
|
|
353
|
+
"Surface": {
|
|
354
|
+
"title": "Surface Container Component",
|
|
355
|
+
"description": "The reserved canonical container component representing an A2UI surface. The Surface component is immutable and always has 'child': 'root'.",
|
|
356
|
+
"type": "object",
|
|
357
|
+
"allowedParents": [],
|
|
358
|
+
"properties": {
|
|
359
|
+
"component": {
|
|
360
|
+
"const": "Surface"
|
|
361
|
+
},
|
|
362
|
+
"child": {
|
|
363
|
+
"const": "root"
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
"additionalProperties": false
|
|
367
|
+
},
|
|
368
|
+
"FunctionResponse": {
|
|
369
|
+
"type": "object",
|
|
370
|
+
"description": "The return response matching a callAgentFunction or callRendererFunction invocation.",
|
|
371
|
+
"properties": {
|
|
372
|
+
"functionCallId": {
|
|
373
|
+
"$ref": "#/$defs/CallId",
|
|
374
|
+
"description": "The unique ID matching the initiating function call."
|
|
375
|
+
},
|
|
376
|
+
"value": {
|
|
377
|
+
"description": "The return value of the function."
|
|
378
|
+
},
|
|
379
|
+
"error": {
|
|
380
|
+
"type": "object",
|
|
381
|
+
"description": "An error object indicating failure of the function execution.",
|
|
382
|
+
"properties": {
|
|
383
|
+
"code": {"type": "string"},
|
|
384
|
+
"message": {"type": "string"}
|
|
385
|
+
},
|
|
386
|
+
"required": ["code", "message"],
|
|
387
|
+
"additionalProperties": false
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
"required": ["functionCallId"],
|
|
391
|
+
"oneOf": [{"required": ["value"]}, {"required": ["error"]}],
|
|
392
|
+
"additionalProperties": false
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://a2ui.org/specification/v1_0/renderer_capabilities.json",
|
|
4
|
+
"title": "A2UI Renderer Capabilities Schema",
|
|
5
|
+
"description": "A schema for the a2uiRendererCapabilities object, which is sent from the renderer to the agent as part of the A2A metadata to describe the renderer's UI rendering capabilities.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"v1.0": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"description": "The capabilities structure for version 1.0 of the A2UI protocol.",
|
|
11
|
+
"properties": {
|
|
12
|
+
"supportedCatalogIds": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"description": "An array of string identifiers for each of the component and function catalogs supported by the renderer. Multiple catalogs can be mixed in a single surface.",
|
|
15
|
+
"items": {"type": "string"}
|
|
16
|
+
},
|
|
17
|
+
"inlineCatalogs": {
|
|
18
|
+
"type": "array",
|
|
19
|
+
"description": "An array of inline catalog definitions, which can contain both components and functions. This should only be provided if the agent declares 'acceptsInlineCatalogs: true' in its capabilities.",
|
|
20
|
+
"items": {
|
|
21
|
+
"$ref": "https://a2ui.org/specification/v1_0/catalog_definition.json"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"required": ["supportedCatalogIds"]
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"required": ["v1.0"]
|
|
29
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://a2ui.org/specification/v1_0/renderer_data_model.json",
|
|
4
|
+
"title": "A2UI Renderer Data Model Schema",
|
|
5
|
+
"description": "Schema for conveying the renderer data models for all active surfaces. This is used for bidirectional data synchronization between the renderer and the agent.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"version": {
|
|
9
|
+
"const": "v1.0"
|
|
10
|
+
},
|
|
11
|
+
"surfaces": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"description": "A map of surface IDs to their current data models.",
|
|
14
|
+
"additionalProperties": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"description": "The current data model for the surface, as a standard JSON object."
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"required": ["version", "surfaces"],
|
|
21
|
+
"additionalProperties": false
|
|
22
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://a2ui.org/specification/v1_0/renderer_to_agent.json",
|
|
4
|
+
"title": "A2UI (Agent to UI) Renderer-to-Agent Event Schema",
|
|
5
|
+
"description": "Describes a JSON payload for a renderer-to-agent event message.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"minProperties": 2,
|
|
8
|
+
"maxProperties": 2,
|
|
9
|
+
"properties": {
|
|
10
|
+
"version": {
|
|
11
|
+
"const": "v1.0"
|
|
12
|
+
},
|
|
13
|
+
"action": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"description": "Reports a user-initiated action from a component.",
|
|
16
|
+
"properties": {
|
|
17
|
+
"name": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "The name of the action, taken from the component's action.event.name property."
|
|
20
|
+
},
|
|
21
|
+
"userMessage": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "An optional human-readable string describing the action performed by the user, taken from the component's action.event.userMessage property after resolving bindings."
|
|
24
|
+
},
|
|
25
|
+
"surfaceId": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"description": "The id of the surface where the event originated. It must be globally unique for the renderer's lifetime."
|
|
28
|
+
},
|
|
29
|
+
"sourceComponentId": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"description": "The id of the component that triggered the event."
|
|
32
|
+
},
|
|
33
|
+
"timestamp": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"format": "date-time",
|
|
36
|
+
"description": "An ISO 8601 timestamp of when the event occurred."
|
|
37
|
+
},
|
|
38
|
+
"context": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"description": "A JSON object containing the key-value pairs from the component's action.event.context, after resolving all data bindings.",
|
|
41
|
+
"additionalProperties": true
|
|
42
|
+
},
|
|
43
|
+
"metadata": {
|
|
44
|
+
"type": "object",
|
|
45
|
+
"description": "Optional client-side metadata to send back to the agent with the action.",
|
|
46
|
+
"properties": {
|
|
47
|
+
"extensions": {
|
|
48
|
+
"$ref": "common_types.json#/$defs/Extensions"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"additionalProperties": false
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"required": ["name", "surfaceId", "sourceComponentId", "timestamp", "context"]
|
|
55
|
+
},
|
|
56
|
+
"callAgentFunction": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"description": "Signals the agent to execute a function remotely on behalf of the renderer.",
|
|
59
|
+
"properties": {
|
|
60
|
+
"surfaceId": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"description": "The surface ID where the call originated."
|
|
63
|
+
},
|
|
64
|
+
"functionCallId": {
|
|
65
|
+
"$ref": "common_types.json#/$defs/CallId",
|
|
66
|
+
"description": "Unique ID for this instance of the function call. The agent MUST copy this ID into the return response."
|
|
67
|
+
},
|
|
68
|
+
"callFunction": {
|
|
69
|
+
"$ref": "common_types.json#/$defs/FunctionCall"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"required": ["surfaceId", "functionCallId", "callFunction"],
|
|
73
|
+
"additionalProperties": false
|
|
74
|
+
},
|
|
75
|
+
"rendererFunctionResponse": {
|
|
76
|
+
"$ref": "common_types.json#/$defs/FunctionResponse"
|
|
77
|
+
},
|
|
78
|
+
"error": {
|
|
79
|
+
"description": "Reports a renderer-side error.",
|
|
80
|
+
"oneOf": [
|
|
81
|
+
{
|
|
82
|
+
"type": "object",
|
|
83
|
+
"title": "Validation Failed Error",
|
|
84
|
+
"properties": {
|
|
85
|
+
"code": {
|
|
86
|
+
"enum": ["VALIDATION_FAILED", "UNALLOWED_PARENT", "UNALLOWED_CHILD"]
|
|
87
|
+
},
|
|
88
|
+
"surfaceId": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"description": "The id of the surface where the error occurred. It must be globally unique for the renderer's lifetime."
|
|
91
|
+
},
|
|
92
|
+
"path": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"description": "The JSON pointer to the field that failed validation (e.g. '/components/0/text')."
|
|
95
|
+
},
|
|
96
|
+
"message": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"description": "A short one or two sentence description of why validation failed."
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"required": ["code", "path", "message", "surfaceId"],
|
|
102
|
+
"additionalProperties": false
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"type": "object",
|
|
106
|
+
"title": "Generic Error",
|
|
107
|
+
"properties": {
|
|
108
|
+
"code": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"not": {
|
|
111
|
+
"enum": ["VALIDATION_FAILED", "UNALLOWED_PARENT", "UNALLOWED_CHILD"]
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"message": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"description": "A short one or two sentence description of why the error occurred."
|
|
117
|
+
},
|
|
118
|
+
"surfaceId": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"description": "The id of the surface where the error occurred. It must be globally unique for the renderer's lifetime."
|
|
121
|
+
},
|
|
122
|
+
"functionCallId": {
|
|
123
|
+
"$ref": "common_types.json#/$defs/CallId",
|
|
124
|
+
"description": "The unique ID of the function invocation, which must be identical to the value specified in the function invocation."
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"required": ["code", "message"],
|
|
128
|
+
"oneOf": [
|
|
129
|
+
{
|
|
130
|
+
"required": ["surfaceId"],
|
|
131
|
+
"not": {
|
|
132
|
+
"required": ["functionCallId"]
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"required": ["functionCallId"],
|
|
137
|
+
"not": {
|
|
138
|
+
"required": ["surfaceId"]
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
"additionalProperties": true
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"oneOf": [
|
|
148
|
+
{
|
|
149
|
+
"required": ["action", "version"]
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"required": ["callAgentFunction", "version"]
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"required": ["rendererFunctionResponse", "version"]
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"required": ["error", "version"]
|
|
159
|
+
}
|
|
160
|
+
]
|
|
161
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://a2ui.org/specification/v1_0/json/renderer_to_agent_list.json",
|
|
4
|
+
"title": "A2UI Renderer-to-Agent Message List",
|
|
5
|
+
"description": "A list of A2UI Renderer-to-Agent messages.",
|
|
6
|
+
"type": "array",
|
|
7
|
+
"items": {
|
|
8
|
+
"$ref": "https://a2ui.org/specification/v1_0/renderer_to_agent.json"
|
|
9
|
+
}
|
|
10
|
+
}
|
package/schemas/7541f953050cd58b80f0bf5d85fe2d63192af305/json/renderer_to_agent_list_wrapper.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://a2ui.org/specification/v1_0/json/renderer_to_agent_list_wrapper.json",
|
|
4
|
+
"title": "A2UI Renderer-to-Agent Message List Wrapper",
|
|
5
|
+
"description": "An object wrapping a list of A2UI Renderer-to-Agent messages. Intended for protocols that require a top-level JSON object instead of a raw array.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"messages": {
|
|
9
|
+
"$ref": "renderer_to_agent_list.json"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"additionalProperties": false,
|
|
13
|
+
"required": ["messages"]
|
|
14
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://a2ui.org/specification/v1_0/sample.json",
|
|
4
|
+
"title": "A2UI Catalog Sample",
|
|
5
|
+
"description": "A sample demonstrating A2UI components and messages.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["name", "description", "messages"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"name": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "The display name of the sample."
|
|
12
|
+
},
|
|
13
|
+
"description": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "A short description of what the sample demonstrates."
|
|
16
|
+
},
|
|
17
|
+
"messages": {
|
|
18
|
+
"$ref": "https://a2ui.org/specification/v1_0/json/agent_to_renderer_list.json",
|
|
19
|
+
"description": "The ordered list of A2UI messages to be processed by the renderer."
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|