@mcp-native/a2ui 0.0.3 → 0.2.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 +110 -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 +26 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +157 -37
- 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/format-string.d.ts +8 -0
- package/dist/v1/format-string.d.ts.map +1 -0
- package/dist/v1/format-string.js +377 -0
- package/dist/v1/format-string.js.map +1 -0
- package/dist/v1/index.d.ts +9 -0
- package/dist/v1/index.d.ts.map +1 -0
- package/dist/v1/index.js +6 -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 +7 -0
- package/dist/v1/schemas.d.ts.map +1 -0
- package/dist/v1/schemas.js +92 -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 +301 -0
- package/dist/v1/store.js.map +1 -0
- package/dist/v1/types.d.ts +58 -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 +434 -0
- package/dist/v1/validate.js.map +1 -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/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,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://a2ui.org/specification/v1_0/agent_capabilities.json",
|
|
4
|
+
"title": "A2UI Agent Capabilities Schema",
|
|
5
|
+
"description": "A schema for the agent capabilities object, which is used by an A2UI Agent to advertise its supported UI features to renderers. This can be embedded in an Agent Card for A2A or used in other transport protocols like MCP.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"v1.0": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"description": "The agent capabilities structure for version 1.0 of the A2UI protocol.",
|
|
11
|
+
"properties": {
|
|
12
|
+
"supportedCatalogIds": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"description": "An array of strings, where each is an ID identifying a Catalog for which the agent can generate content. This is not a resolvable URI. Multiple catalogs can be mixed in a single surface.",
|
|
15
|
+
"items": {"type": "string"}
|
|
16
|
+
},
|
|
17
|
+
"acceptsInlineCatalogs": {
|
|
18
|
+
"type": "boolean",
|
|
19
|
+
"description": "A boolean indicating if the agent can accept an 'inlineCatalogs' array in the renderer's a2uiRendererCapabilities. If omitted, this defaults to false.",
|
|
20
|
+
"default": false
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"required": ["v1.0"]
|
|
26
|
+
}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://a2ui.org/specification/v1_0/agent_to_renderer.json",
|
|
4
|
+
"title": "A2UI Message Schema",
|
|
5
|
+
"description": "Describes a JSON payload for an A2UI (Agent to UI) message, which is used to dynamically construct and update user interfaces.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"oneOf": [
|
|
8
|
+
{"$ref": "#/$defs/CreateSurfaceMessage"},
|
|
9
|
+
{"$ref": "#/$defs/UpdateComponentsMessage"},
|
|
10
|
+
{"$ref": "#/$defs/UpdateDataModelMessage"},
|
|
11
|
+
{"$ref": "#/$defs/DeleteSurfaceMessage"},
|
|
12
|
+
{"$ref": "#/$defs/CallRendererFunctionMessage"},
|
|
13
|
+
{"$ref": "#/$defs/AgentFunctionResponseMessage"}
|
|
14
|
+
],
|
|
15
|
+
"$defs": {
|
|
16
|
+
"CreateSurfaceMessage": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"properties": {
|
|
19
|
+
"version": {
|
|
20
|
+
"const": "v1.0"
|
|
21
|
+
},
|
|
22
|
+
"createSurface": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"description": "Signals the renderer to create a new surface and begin rendering it. Creating a surface implicitly instantiates the canonical 'Surface' container component ('common_types.json#/$defs/Surface') with 'child': 'root'. It is an error to try to create a surface with an existing ID without first deleting it; surfaceId MUST be globally unique for the renderer's lifetime. When this message is sent, the renderer expects 'updateComponents' and/or 'updateDataModel' messages for the same surfaceId to define the component tree.",
|
|
25
|
+
"properties": {
|
|
26
|
+
"surfaceId": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"description": "The unique identifier for the UI surface to be rendered. It must be globally unique for the renderer's lifetime."
|
|
29
|
+
},
|
|
30
|
+
"catalogId": {
|
|
31
|
+
"description": "A string that uniquely identifies the default catalog for this surface. It is recommended to prefix this with an internet domain that you own, to avoid conflicts e.g. 'mycompany.com:somecatalog'. Components and function calls that do not explicitly specify a catalogId will use this surface-level default catalogId.",
|
|
32
|
+
"type": "string"
|
|
33
|
+
},
|
|
34
|
+
"sendDataModel": {
|
|
35
|
+
"type": "boolean",
|
|
36
|
+
"description": "If true, the renderer will send the full data model of this surface in the metadata of every A2A message sent to the agent that created the surface. Defaults to false."
|
|
37
|
+
},
|
|
38
|
+
"components": {
|
|
39
|
+
"$ref": "#/$defs/ComponentsList"
|
|
40
|
+
},
|
|
41
|
+
"dataModel": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"description": "The initial root data model object for the surface.",
|
|
44
|
+
"additionalProperties": true
|
|
45
|
+
},
|
|
46
|
+
"metadata": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"description": "Optional surface-level metadata.",
|
|
49
|
+
"properties": {
|
|
50
|
+
"extensions": {
|
|
51
|
+
"$ref": "common_types.json#/$defs/Extensions"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"additionalProperties": false
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"required": ["surfaceId"],
|
|
58
|
+
"additionalProperties": false
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"required": ["createSurface", "version"],
|
|
62
|
+
"additionalProperties": false
|
|
63
|
+
},
|
|
64
|
+
"Component": {
|
|
65
|
+
"description": "A UI component for the surface, combining baseline envelope properties with the catalog component definition.",
|
|
66
|
+
"allOf": [
|
|
67
|
+
{
|
|
68
|
+
"$ref": "common_types.json#/$defs/ComponentCommon"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"$ref": "catalog.json#/$defs/anyComponent"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"type": "object",
|
|
75
|
+
"properties": {
|
|
76
|
+
"component": {
|
|
77
|
+
"not": {
|
|
78
|
+
"const": "Surface"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"unevaluatedProperties": false
|
|
85
|
+
},
|
|
86
|
+
"ComponentsList": {
|
|
87
|
+
"type": "array",
|
|
88
|
+
"description": "A list containing UI components for the surface.",
|
|
89
|
+
"minItems": 1,
|
|
90
|
+
"items": {
|
|
91
|
+
"$ref": "#/$defs/Component"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"UpdateComponentsMessage": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"properties": {
|
|
97
|
+
"version": {
|
|
98
|
+
"const": "v1.0"
|
|
99
|
+
},
|
|
100
|
+
"updateComponents": {
|
|
101
|
+
"type": "object",
|
|
102
|
+
"description": "Updates a surface with a new set of components. This message can be sent multiple times to update the component tree of an existing surface. One of the components in one of the components lists MUST have an 'id' of 'root' to serve as the root of the component tree. The createSurface message MUST have been previously sent for this surfaceId.",
|
|
103
|
+
"properties": {
|
|
104
|
+
"surfaceId": {
|
|
105
|
+
"type": "string",
|
|
106
|
+
"description": "The unique identifier for the UI surface to be updated. It must be globally unique for the renderer's lifetime."
|
|
107
|
+
},
|
|
108
|
+
"components": {
|
|
109
|
+
"$ref": "#/$defs/ComponentsList"
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"required": ["surfaceId", "components"],
|
|
113
|
+
"additionalProperties": false
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"required": ["updateComponents", "version"],
|
|
117
|
+
"additionalProperties": false
|
|
118
|
+
},
|
|
119
|
+
"UpdateDataModelMessage": {
|
|
120
|
+
"type": "object",
|
|
121
|
+
"properties": {
|
|
122
|
+
"version": {
|
|
123
|
+
"const": "v1.0"
|
|
124
|
+
},
|
|
125
|
+
"updateDataModel": {
|
|
126
|
+
"type": "object",
|
|
127
|
+
"description": "Updates the data model for an existing surface. This message can be sent multiple times to update the data model. The createSurface message MUST have been previously sent for this surfaceId.",
|
|
128
|
+
"properties": {
|
|
129
|
+
"surfaceId": {
|
|
130
|
+
"type": "string",
|
|
131
|
+
"description": "The unique identifier for the UI surface this data model update applies to. It must be globally unique for the renderer's lifetime."
|
|
132
|
+
},
|
|
133
|
+
"path": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"description": "An optional path to a location within the data model (e.g., '/user/name'). If omitted, or set to '/', refers to the entire data model."
|
|
136
|
+
},
|
|
137
|
+
"value": {
|
|
138
|
+
"description": "The data to be updated in the data model. To delete the key/value at 'path', set 'value' explicitly to null."
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"required": ["surfaceId", "value"],
|
|
142
|
+
"additionalProperties": false
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"required": ["updateDataModel", "version"],
|
|
146
|
+
"additionalProperties": false
|
|
147
|
+
},
|
|
148
|
+
"DeleteSurfaceMessage": {
|
|
149
|
+
"type": "object",
|
|
150
|
+
"properties": {
|
|
151
|
+
"version": {
|
|
152
|
+
"const": "v1.0"
|
|
153
|
+
},
|
|
154
|
+
"deleteSurface": {
|
|
155
|
+
"type": "object",
|
|
156
|
+
"description": "Signals the renderer to delete the surface identified by 'surfaceId'. The createSurface message MUST have been previously sent for this surfaceId.",
|
|
157
|
+
"properties": {
|
|
158
|
+
"surfaceId": {
|
|
159
|
+
"type": "string",
|
|
160
|
+
"description": "The unique identifier for the UI surface to be deleted. It must be globally unique for the renderer's lifetime."
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"required": ["surfaceId"],
|
|
164
|
+
"additionalProperties": false
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"required": ["deleteSurface", "version"],
|
|
168
|
+
"additionalProperties": false
|
|
169
|
+
},
|
|
170
|
+
"CallRendererFunctionMessage": {
|
|
171
|
+
"type": "object",
|
|
172
|
+
"properties": {
|
|
173
|
+
"version": {
|
|
174
|
+
"const": "v1.0"
|
|
175
|
+
},
|
|
176
|
+
"callRendererFunction": {
|
|
177
|
+
"type": "object",
|
|
178
|
+
"description": "Signals the renderer to execute a function locally on behalf of the agent.",
|
|
179
|
+
"properties": {
|
|
180
|
+
"functionCallId": {
|
|
181
|
+
"$ref": "common_types.json#/$defs/CallId",
|
|
182
|
+
"description": "Unique ID for this instance of the function call. The renderer MUST copy this ID into the return response."
|
|
183
|
+
},
|
|
184
|
+
"callFunction": {
|
|
185
|
+
"allOf": [
|
|
186
|
+
{
|
|
187
|
+
"$ref": "common_types.json#/$defs/FunctionCall"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"required": ["catalogId"]
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"required": ["functionCallId", "callFunction"],
|
|
196
|
+
"additionalProperties": false
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"required": ["callRendererFunction", "version"],
|
|
200
|
+
"additionalProperties": false
|
|
201
|
+
},
|
|
202
|
+
"AgentFunctionResponseMessage": {
|
|
203
|
+
"type": "object",
|
|
204
|
+
"properties": {
|
|
205
|
+
"version": {
|
|
206
|
+
"const": "v1.0"
|
|
207
|
+
},
|
|
208
|
+
"agentFunctionResponse": {
|
|
209
|
+
"$ref": "common_types.json#/$defs/FunctionResponse"
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
"required": ["agentFunctionResponse", "version"],
|
|
213
|
+
"additionalProperties": false
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://a2ui.org/specification/v1_0/json/agent_to_renderer_list.json",
|
|
4
|
+
"title": "A2UI Agent-to-Renderer Message List",
|
|
5
|
+
"description": "A list of A2UI Agent-to-Renderer messages.",
|
|
6
|
+
"type": "array",
|
|
7
|
+
"items": {
|
|
8
|
+
"$ref": "https://a2ui.org/specification/v1_0/agent_to_renderer.json"
|
|
9
|
+
}
|
|
10
|
+
}
|
package/schemas/7541f953050cd58b80f0bf5d85fe2d63192af305/json/agent_to_renderer_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/agent_to_renderer_list_wrapper.json",
|
|
4
|
+
"title": "A2UI Agent-to-Renderer Message List Wrapper",
|
|
5
|
+
"description": "An object wrapping a list of A2UI Agent-to-Renderer 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": "agent_to_renderer_list.json"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"additionalProperties": false,
|
|
13
|
+
"required": ["messages"]
|
|
14
|
+
}
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://a2ui.org/specification/v1_0/catalog_definition.json",
|
|
4
|
+
"title": "A2UI Catalog Definition Schema",
|
|
5
|
+
"description": "A collection of component and function definitions.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"$schema": {"type": "string"},
|
|
9
|
+
"$id": {"type": "string"},
|
|
10
|
+
"protocolVersion": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(?:\\.(0|[1-9][0-9]*))?(?:-((?:0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
|
|
13
|
+
"default": "0.9",
|
|
14
|
+
"description": "The A2UI specification version of this catalog definition (e.g. '1.0'). Defaults to '0.9' if omitted."
|
|
15
|
+
},
|
|
16
|
+
"$defs": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"description": "Standardized schema definitions referenced from outside the catalog file.",
|
|
19
|
+
"properties": {
|
|
20
|
+
"anyComponent": {
|
|
21
|
+
"title": "A2UI Any Component Schema",
|
|
22
|
+
"description": "Unified validation schema for all components.",
|
|
23
|
+
"$ref": "https://json-schema.org/draft/2020-12/schema"
|
|
24
|
+
},
|
|
25
|
+
"anyFunction": {
|
|
26
|
+
"title": "A2UI Any Function Schema",
|
|
27
|
+
"description": "Unified validation schema for all functions.",
|
|
28
|
+
"$ref": "https://json-schema.org/draft/2020-12/schema"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"required": ["anyComponent", "anyFunction"],
|
|
32
|
+
"additionalProperties": false
|
|
33
|
+
},
|
|
34
|
+
"title": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "The title of the catalog."
|
|
37
|
+
},
|
|
38
|
+
"description": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"description": "A human-readable description of the catalog."
|
|
41
|
+
},
|
|
42
|
+
"catalogId": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"description": "Unique identifier for this catalog."
|
|
45
|
+
},
|
|
46
|
+
"instructions": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"description": "Markdown-formatted design guidelines or instructions specific to this catalog."
|
|
49
|
+
},
|
|
50
|
+
"components": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"description": "Definitions for UI components supported by this catalog.",
|
|
53
|
+
"propertyNames": {
|
|
54
|
+
"not": {
|
|
55
|
+
"const": "Surface"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"additionalProperties": {
|
|
59
|
+
"$ref": "#/$defs/ComponentDefinition"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"functions": {
|
|
63
|
+
"type": "object",
|
|
64
|
+
"description": "Definitions for functions supported by this catalog.",
|
|
65
|
+
"additionalProperties": {
|
|
66
|
+
"$ref": "#/$defs/FunctionDefinition"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"required": ["catalogId"],
|
|
71
|
+
"additionalProperties": false,
|
|
72
|
+
"$defs": {
|
|
73
|
+
"FunctionCallValidationSchema": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"description": "JSON Schema structure that validates a wire-level FunctionCall object.",
|
|
76
|
+
"oneOf": [
|
|
77
|
+
{
|
|
78
|
+
"type": "object",
|
|
79
|
+
"properties": {
|
|
80
|
+
"type": {
|
|
81
|
+
"const": "object"
|
|
82
|
+
},
|
|
83
|
+
"description": {
|
|
84
|
+
"type": "string"
|
|
85
|
+
},
|
|
86
|
+
"properties": {
|
|
87
|
+
"type": "object",
|
|
88
|
+
"properties": {
|
|
89
|
+
"call": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"properties": {
|
|
92
|
+
"const": {"type": "string"}
|
|
93
|
+
},
|
|
94
|
+
"required": ["const"]
|
|
95
|
+
},
|
|
96
|
+
"catalogId": {
|
|
97
|
+
"type": "object",
|
|
98
|
+
"description": "Optional catalog ID override for this function call."
|
|
99
|
+
},
|
|
100
|
+
"args": {
|
|
101
|
+
"type": "object",
|
|
102
|
+
"description": "A JSON Schema describing the expected arguments (args) for this function.",
|
|
103
|
+
"$ref": "https://json-schema.org/draft/2020-12/schema"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"required": ["call"],
|
|
107
|
+
"additionalProperties": false
|
|
108
|
+
},
|
|
109
|
+
"required": {
|
|
110
|
+
"type": "array",
|
|
111
|
+
"items": {"type": "string"},
|
|
112
|
+
"contains": {"const": "call"}
|
|
113
|
+
},
|
|
114
|
+
"unevaluatedProperties": {
|
|
115
|
+
"type": "boolean"
|
|
116
|
+
},
|
|
117
|
+
"additionalProperties": {
|
|
118
|
+
"type": "boolean"
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"required": ["type", "properties", "required"]
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"type": "object",
|
|
125
|
+
"properties": {
|
|
126
|
+
"type": {
|
|
127
|
+
"const": "object"
|
|
128
|
+
},
|
|
129
|
+
"description": {
|
|
130
|
+
"type": "string"
|
|
131
|
+
},
|
|
132
|
+
"allOf": {
|
|
133
|
+
"type": "array",
|
|
134
|
+
"items": {"type": "object"},
|
|
135
|
+
"minItems": 1
|
|
136
|
+
},
|
|
137
|
+
"unevaluatedProperties": {
|
|
138
|
+
"type": "boolean"
|
|
139
|
+
},
|
|
140
|
+
"additionalProperties": {
|
|
141
|
+
"type": "boolean"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"required": ["type", "allOf"]
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
"FunctionDefinition": {
|
|
149
|
+
"type": "object",
|
|
150
|
+
"description": "Describes a function's validation schema and interface metadata.",
|
|
151
|
+
"allOf": [
|
|
152
|
+
{
|
|
153
|
+
"$ref": "#/$defs/FunctionCallValidationSchema"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"type": "object",
|
|
157
|
+
"properties": {
|
|
158
|
+
"returnType": {
|
|
159
|
+
"type": "string",
|
|
160
|
+
"enum": [
|
|
161
|
+
"string",
|
|
162
|
+
"number",
|
|
163
|
+
"boolean",
|
|
164
|
+
"array",
|
|
165
|
+
"object",
|
|
166
|
+
"validationResult",
|
|
167
|
+
"any",
|
|
168
|
+
"void"
|
|
169
|
+
],
|
|
170
|
+
"description": "The type of value this function returns."
|
|
171
|
+
},
|
|
172
|
+
"allowedCallers": {
|
|
173
|
+
"type": "string",
|
|
174
|
+
"enum": ["rendererOnly", "agentOnly", "rendererOrAgent"],
|
|
175
|
+
"default": "rendererOnly",
|
|
176
|
+
"description": "Specifies which roles are authorized to invoke this function."
|
|
177
|
+
},
|
|
178
|
+
"requiresUserActivation": {
|
|
179
|
+
"type": "boolean",
|
|
180
|
+
"default": false,
|
|
181
|
+
"description": "Specifies whether this function requires a user activation context to execute."
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"required": ["returnType"]
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"if": {
|
|
188
|
+
"properties": {
|
|
189
|
+
"requiresUserActivation": {"const": true}
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"then": {
|
|
193
|
+
"properties": {
|
|
194
|
+
"allowedCallers": {"enum": ["rendererOnly"]}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
],
|
|
199
|
+
"unevaluatedProperties": false
|
|
200
|
+
},
|
|
201
|
+
"ComponentDefinition": {
|
|
202
|
+
"type": "object",
|
|
203
|
+
"description": "Describes a component's validation schema and composition constraints.",
|
|
204
|
+
"allOf": [
|
|
205
|
+
{
|
|
206
|
+
"$ref": "https://json-schema.org/draft/2020-12/schema"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"type": "object",
|
|
210
|
+
"properties": {
|
|
211
|
+
"allowedParents": {
|
|
212
|
+
"type": "array",
|
|
213
|
+
"items": {
|
|
214
|
+
"type": "string"
|
|
215
|
+
},
|
|
216
|
+
"description": "The list of parent component type names that can contain this component type. If omitted, all parent component types are allowed. To restrict a component so it can appear only as the top-level component (id='root') of a surface, set \"allowedParents\": [\"Surface\"]. To allow a component as either the top-level component of a surface or a child of a specific container, specify both (e.g., \"allowedParents\": [\"Surface\", \"CanvasContainer\"]).",
|
|
217
|
+
"uniqueItems": true
|
|
218
|
+
},
|
|
219
|
+
"allowedChildren": {
|
|
220
|
+
"type": "array",
|
|
221
|
+
"items": {
|
|
222
|
+
"type": "string"
|
|
223
|
+
},
|
|
224
|
+
"description": "The list of child component type names allowed inside this container or slot. If omitted, all child component types are allowed.",
|
|
225
|
+
"uniqueItems": true
|
|
226
|
+
},
|
|
227
|
+
"metadata": {
|
|
228
|
+
"type": "object",
|
|
229
|
+
"description": "Optional static metadata.",
|
|
230
|
+
"properties": {
|
|
231
|
+
"extensions": {
|
|
232
|
+
"$ref": "common_types.json#/$defs/Extensions"
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
"additionalProperties": false
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
]
|
|
240
|
+
},
|
|
241
|
+
"ValidationResult": {
|
|
242
|
+
"type": "object",
|
|
243
|
+
"description": "Dynamic validation result object returned by a validation condition function or data binding.",
|
|
244
|
+
"properties": {
|
|
245
|
+
"valid": {
|
|
246
|
+
"type": "boolean",
|
|
247
|
+
"description": "Whether the check passed."
|
|
248
|
+
},
|
|
249
|
+
"code": {
|
|
250
|
+
"type": "string",
|
|
251
|
+
"description": "Machine-readable error code (e.g. EXPIRED_CARD, OUT_OF_RANGE)."
|
|
252
|
+
},
|
|
253
|
+
"message": {
|
|
254
|
+
"type": "string",
|
|
255
|
+
"description": "Human-readable error or warning message."
|
|
256
|
+
},
|
|
257
|
+
"severity": {
|
|
258
|
+
"type": "string",
|
|
259
|
+
"enum": ["error", "warning", "info"],
|
|
260
|
+
"default": "error",
|
|
261
|
+
"description": "Severity level of the validation result."
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
"required": ["valid"]
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|