@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.
Files changed (83) hide show
  1. package/README.md +100 -13
  2. package/dist/binding.d.ts +33 -0
  3. package/dist/binding.d.ts.map +1 -0
  4. package/dist/binding.js +83 -0
  5. package/dist/binding.js.map +1 -0
  6. package/dist/errors.d.ts +7 -0
  7. package/dist/errors.d.ts.map +1 -0
  8. package/dist/errors.js +13 -0
  9. package/dist/errors.js.map +1 -0
  10. package/dist/index.d.ts +9 -12
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +7 -13
  13. package/dist/index.js.map +1 -1
  14. package/dist/mime.d.ts +6 -0
  15. package/dist/mime.d.ts.map +1 -0
  16. package/dist/mime.js +2 -0
  17. package/dist/mime.js.map +1 -0
  18. package/dist/schema-revision.d.ts +3 -0
  19. package/dist/schema-revision.d.ts.map +1 -0
  20. package/dist/schema-revision.js +3 -0
  21. package/dist/schema-revision.js.map +1 -0
  22. package/dist/v1/action.d.ts +7 -0
  23. package/dist/v1/action.d.ts.map +1 -0
  24. package/dist/v1/action.js +86 -0
  25. package/dist/v1/action.js.map +1 -0
  26. package/dist/v1/capabilities.d.ts +13 -0
  27. package/dist/v1/capabilities.d.ts.map +1 -0
  28. package/dist/v1/capabilities.js +134 -0
  29. package/dist/v1/capabilities.js.map +1 -0
  30. package/dist/v1/format-string.d.ts +21 -0
  31. package/dist/v1/format-string.d.ts.map +1 -0
  32. package/dist/v1/format-string.js +487 -0
  33. package/dist/v1/format-string.js.map +1 -0
  34. package/dist/v1/index.d.ts +13 -0
  35. package/dist/v1/index.d.ts.map +1 -0
  36. package/dist/v1/index.js +9 -0
  37. package/dist/v1/index.js.map +1 -0
  38. package/dist/v1/parse.d.ts +12 -0
  39. package/dist/v1/parse.d.ts.map +1 -0
  40. package/dist/v1/parse.js +96 -0
  41. package/dist/v1/parse.js.map +1 -0
  42. package/dist/v1/resolve.d.ts +19 -0
  43. package/dist/v1/resolve.d.ts.map +1 -0
  44. package/dist/v1/resolve.js +112 -0
  45. package/dist/v1/resolve.js.map +1 -0
  46. package/dist/v1/schemas.d.ts +16 -0
  47. package/dist/v1/schemas.d.ts.map +1 -0
  48. package/dist/v1/schemas.js +133 -0
  49. package/dist/v1/schemas.js.map +1 -0
  50. package/dist/v1/store.d.ts +21 -0
  51. package/dist/v1/store.d.ts.map +1 -0
  52. package/dist/v1/store.js +305 -0
  53. package/dist/v1/store.js.map +1 -0
  54. package/dist/v1/types.d.ts +109 -0
  55. package/dist/v1/types.d.ts.map +1 -0
  56. package/dist/v1/types.js +10 -0
  57. package/dist/v1/types.js.map +1 -0
  58. package/dist/v1/validate.d.ts +26 -0
  59. package/dist/v1/validate.d.ts.map +1 -0
  60. package/dist/v1/validate.js +449 -0
  61. package/dist/v1/validate.js.map +1 -0
  62. package/dist/v1/vendor/agent_capabilities.json +26 -0
  63. package/dist/v1/vendor/agent_to_renderer.json +216 -0
  64. package/dist/v1/vendor/catalog.json +1346 -0
  65. package/dist/v1/vendor/common_types.json +395 -0
  66. package/dist/v1/vendor/renderer_capabilities.json +29 -0
  67. package/dist/v1/vendor/renderer_to_agent.json +161 -0
  68. package/package.json +5 -2
  69. package/schemas/7541f953050cd58b80f0bf5d85fe2d63192af305/CHECKSUMS.sha256 +13 -0
  70. package/schemas/7541f953050cd58b80f0bf5d85fe2d63192af305/PROVENANCE.md +12 -0
  71. package/schemas/7541f953050cd58b80f0bf5d85fe2d63192af305/catalogs/basic/catalog.json +1346 -0
  72. package/schemas/7541f953050cd58b80f0bf5d85fe2d63192af305/json/agent_capabilities.json +26 -0
  73. package/schemas/7541f953050cd58b80f0bf5d85fe2d63192af305/json/agent_to_renderer.json +216 -0
  74. package/schemas/7541f953050cd58b80f0bf5d85fe2d63192af305/json/agent_to_renderer_list.json +10 -0
  75. package/schemas/7541f953050cd58b80f0bf5d85fe2d63192af305/json/agent_to_renderer_list_wrapper.json +14 -0
  76. package/schemas/7541f953050cd58b80f0bf5d85fe2d63192af305/json/catalog_definition.json +267 -0
  77. package/schemas/7541f953050cd58b80f0bf5d85fe2d63192af305/json/common_types.json +395 -0
  78. package/schemas/7541f953050cd58b80f0bf5d85fe2d63192af305/json/renderer_capabilities.json +29 -0
  79. package/schemas/7541f953050cd58b80f0bf5d85fe2d63192af305/json/renderer_data_model.json +22 -0
  80. package/schemas/7541f953050cd58b80f0bf5d85fe2d63192af305/json/renderer_to_agent.json +161 -0
  81. package/schemas/7541f953050cd58b80f0bf5d85fe2d63192af305/json/renderer_to_agent_list.json +10 -0
  82. package/schemas/7541f953050cd58b80f0bf5d85fe2d63192af305/json/renderer_to_agent_list_wrapper.json +14 -0
  83. 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,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
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcp-native/a2ui",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "A2UI parsing and bindings for MCP Native.",
5
5
  "keywords": [
6
6
  "a2ui",
@@ -21,6 +21,7 @@
21
21
  },
22
22
  "files": [
23
23
  "dist",
24
+ "schemas",
24
25
  "README.md"
25
26
  ],
26
27
  "type": "module",
@@ -37,6 +38,8 @@
37
38
  "access": "public"
38
39
  },
39
40
  "dependencies": {
40
- "@mcp-native/core": "^0.1.0"
41
+ "@mcp-native/core": "^0.3.0",
42
+ "ajv": "^8.20.0",
43
+ "ajv-formats": "^3.0.1"
41
44
  }
42
45
  }
@@ -0,0 +1,13 @@
1
+ 29e01ac2cf69dc5860ad060f5a60c67fa5cdaa8a78ecab1018f531b178fa5c00 catalogs/basic/catalog.json
2
+ 86318a04b2fda504bededba936880e1d9cd5bcbb856b6aac6377f60e0426fbe9 json/agent_capabilities.json
3
+ 468c8e544dbe0b02d5d5586ebcdca399ecfa6d07a7b875d887089ce3bd2df160 json/agent_to_renderer.json
4
+ 3d3fef882fe5cc22932d3a91713defaeeb329126200954c06bf9f2c56df51c56 json/agent_to_renderer_list.json
5
+ e306af2521e731db673415115d55b3d0e66453945c071e34298b4cb1dff88014 json/agent_to_renderer_list_wrapper.json
6
+ a41e8b4dfa9a88377e6563f578222eee16642d22bbbc7e47d117dba8e9143be2 json/catalog_definition.json
7
+ 169ff987a7f8fb93a040ca33352ae4aeb684ff9742bff8cf5925b5cd2612e7d8 json/common_types.json
8
+ 923293ac283424ca08b68a951bc110f8885350baf4c8a9cb678c1647f0b22b3b json/renderer_capabilities.json
9
+ be0890fce16c10f903bd30808e0ec012c7766212fb95c983319db73faac485eb json/renderer_data_model.json
10
+ b23e1ca3e311f20d8a3b48620f4ca2e13a4188acd55de973075db421a0ed7e69 json/renderer_to_agent.json
11
+ 98899d7d16222207af3bfd9aab12aa7b8f68dc8b5267dcf76d867236235ec5d8 json/renderer_to_agent_list.json
12
+ a0dbcaf2340def4485c287c19888aa81041ddee75e5717129457d4a39fbcc593 json/renderer_to_agent_list_wrapper.json
13
+ 7df58a955dfcd5241bfd5631df8fd291eb02d66f2f9a12304d5395517d64202f json/sample.json
@@ -0,0 +1,12 @@
1
+ # A2UI schema provenance
2
+
3
+ | Field | Value |
4
+ | --- | --- |
5
+ | Upstream | https://github.com/a2ui-project/a2ui |
6
+ | Commit | `7541f953050cd58b80f0bf5d85fe2d63192af305` |
7
+ | Paths | `specification/v1_0/json/*`, `specification/v1_0/catalogs/basic/catalog.json` |
8
+ | Fetched | 2026-08-26 |
9
+
10
+ These files are an exact pin of the A2UI v1.0 Candidate revision used by MCP Native's project-owned binding (`A2UI_MCP_SCHEMA_REVISION`). `CHECKSUMS.sha256` records every pinned JSON file. `npm run schemas:verify` checks those hashes, rejects untracked JSON, verifies the exported revision, and requires the runtime copies to remain byte-for-byte identical.
11
+
12
+ Runtime validation embeds copies of `common_types.json`, `agent_to_renderer.json`, `renderer_to_agent.json`, and `catalogs/basic/catalog.json` under `packages/a2ui/src/v1/vendor/` for static import. Do not silently retarget a moving branch; bump the pin, checksums, runtime copies, and documentation through a reviewed protocol change.