create-pmos 0.796.0 → 0.798.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.
@@ -0,0 +1,391 @@
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
+ "description": "Controls screen reader announcements for dynamic updates (WAI-ARIA aria-live). 'polite' waits for user pause; 'assertive' interrupts immediately for alerts.",
30
+ "enum": ["off", "polite", "assertive"],
31
+ "default": "off"
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
+ "description": "A static list of child component IDs.",
83
+ "items": {
84
+ "$ref": "#/$defs/ComponentId"
85
+ }
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
+ "propertyNames": {
133
+ "not": {
134
+ "pattern": "^@([^@]|$)"
135
+ }
136
+ },
137
+ "not": {
138
+ "anyOf": [
139
+ {
140
+ "required": ["@path"]
141
+ },
142
+ {
143
+ "required": ["@call"]
144
+ }
145
+ ]
146
+ }
147
+ },
148
+ {
149
+ "$ref": "#/$defs/DataBinding"
150
+ },
151
+ {
152
+ "$ref": "#/$defs/FunctionCall"
153
+ }
154
+ ]
155
+ },
156
+ "DynamicString": {
157
+ "description": "Represents a string",
158
+ "oneOf": [
159
+ {
160
+ "type": "string"
161
+ },
162
+ {
163
+ "$ref": "#/$defs/DataBinding"
164
+ },
165
+ {
166
+ "$ref": "#/$defs/FunctionCall"
167
+ }
168
+ ]
169
+ },
170
+ "DynamicNumber": {
171
+ "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.",
172
+ "oneOf": [
173
+ {
174
+ "type": "number"
175
+ },
176
+ {
177
+ "$ref": "#/$defs/DataBinding"
178
+ },
179
+ {
180
+ "$ref": "#/$defs/FunctionCall"
181
+ }
182
+ ]
183
+ },
184
+ "DynamicBoolean": {
185
+ "description": "A boolean value that can be a literal, a path, or a function call returning a boolean or a validation result object (coerced to its 'valid' boolean).",
186
+ "oneOf": [
187
+ {
188
+ "type": "boolean"
189
+ },
190
+ {
191
+ "$ref": "#/$defs/DataBinding"
192
+ },
193
+ {
194
+ "$ref": "#/$defs/FunctionCall"
195
+ }
196
+ ]
197
+ },
198
+ "DynamicStringList": {
199
+ "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.",
200
+ "oneOf": [
201
+ {
202
+ "type": "array",
203
+ "items": {
204
+ "type": "string"
205
+ }
206
+ },
207
+ {
208
+ "$ref": "#/$defs/DataBinding"
209
+ },
210
+ {
211
+ "$ref": "#/$defs/FunctionCall"
212
+ }
213
+ ]
214
+ },
215
+ "FunctionCommon": {
216
+ "type": "object",
217
+ "description": "Baseline envelope properties common to all function calls. Function-specific argument schemas ('args') are defined individually by each function in the active catalog.",
218
+ "properties": {
219
+ "@call": {
220
+ "type": "string",
221
+ "description": "The name of the function to call."
222
+ },
223
+ "catalogId": {
224
+ "type": "string",
225
+ "description": "The catalog ID for this function, overriding any surface-level default catalogId."
226
+ }
227
+ },
228
+ "required": ["@call"]
229
+ },
230
+ "IndexSystemFunction": {
231
+ "type": "object",
232
+ "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.",
233
+ "properties": {
234
+ "@call": {
235
+ "const": "@index"
236
+ },
237
+ "args": {
238
+ "type": "object",
239
+ "properties": {
240
+ "offset": {
241
+ "$ref": "#/$defs/DynamicNumber",
242
+ "description": "Optional. An offset to add to the 0-based index (e.g., 1 for 1-based indexing). Defaults to 0.",
243
+ "default": 0
244
+ }
245
+ },
246
+ "unevaluatedProperties": false
247
+ }
248
+ },
249
+ "required": ["@call"],
250
+ "unevaluatedProperties": false,
251
+ "returnType": "number"
252
+ },
253
+ "FunctionCall": {
254
+ "type": "object",
255
+ "description": "Invokes a named function, combining common function properties with the catalog function definition.",
256
+ "allOf": [
257
+ {
258
+ "$ref": "#/$defs/FunctionCommon"
259
+ },
260
+ {
261
+ "oneOf": [
262
+ {
263
+ "$ref": "catalog.json#/$defs/anyFunction"
264
+ },
265
+ {
266
+ "$ref": "#/$defs/IndexSystemFunction"
267
+ }
268
+ ]
269
+ }
270
+ ],
271
+ "unevaluatedProperties": false
272
+ },
273
+ "CheckRule": {
274
+ "type": "object",
275
+ "description": "A single validation check rule applied to an input component. The condition function or path evaluates to a structured validation result object or a boolean (which is coerced to a validation result object).",
276
+ "properties": {
277
+ "condition": {
278
+ "description": "Path or function call evaluating to a structured validation result object or a boolean.",
279
+ "oneOf": [{"$ref": "#/$defs/DataBinding"}, {"$ref": "#/$defs/FunctionCall"}]
280
+ },
281
+ "message": {
282
+ "type": "string",
283
+ "description": "Optional fallback error message."
284
+ }
285
+ },
286
+ "required": ["condition"],
287
+ "additionalProperties": false
288
+ },
289
+ "Checkable": {
290
+ "type": "object",
291
+ "description": "Properties for components that support renderer-side checks.",
292
+ "properties": {
293
+ "@checks": {
294
+ "type": "array",
295
+ "description": "A list of validation check rules to perform on the component.",
296
+ "items": {
297
+ "$ref": "#/$defs/CheckRule"
298
+ }
299
+ }
300
+ }
301
+ },
302
+ "Action": {
303
+ "description": "Defines an interaction handler that can either trigger an agent-side event or execute a local renderer-side function.",
304
+ "oneOf": [
305
+ {
306
+ "type": "object",
307
+ "description": "Triggers an agent-side event.",
308
+ "properties": {
309
+ "event": {
310
+ "type": "object",
311
+ "description": "The event to dispatch to the agent.",
312
+ "properties": {
313
+ "name": {
314
+ "type": "string",
315
+ "description": "The name of the action to be dispatched to the agent."
316
+ },
317
+ "userMessage": {
318
+ "$ref": "#/$defs/DynamicString",
319
+ "description": "An optional human-readable message describing the action performed by the user, resolved by the renderer and included in the outbound action message."
320
+ },
321
+ "context": {
322
+ "type": "object",
323
+ "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.",
324
+ "additionalProperties": {
325
+ "$ref": "#/$defs/DynamicValue"
326
+ }
327
+ }
328
+ },
329
+ "required": ["name"],
330
+ "additionalProperties": false
331
+ }
332
+ },
333
+ "required": ["event"],
334
+ "additionalProperties": false
335
+ },
336
+ {
337
+ "type": "object",
338
+ "description": "Executes a renderer or agent-side function.",
339
+ "properties": {
340
+ "functionCall": {
341
+ "$ref": "#/$defs/FunctionCall"
342
+ }
343
+ },
344
+ "required": ["functionCall"],
345
+ "additionalProperties": false
346
+ }
347
+ ]
348
+ },
349
+ "Surface": {
350
+ "title": "Surface Container Component",
351
+ "description": "The reserved canonical container component representing an A2UI surface. The Surface component is immutable and always has 'child': 'root'.",
352
+ "type": "object",
353
+ "allowedParents": [],
354
+ "properties": {
355
+ "component": {
356
+ "const": "Surface"
357
+ },
358
+ "child": {
359
+ "const": "root"
360
+ }
361
+ },
362
+ "additionalProperties": false
363
+ },
364
+ "FunctionResponse": {
365
+ "type": "object",
366
+ "description": "The return response matching a callAgentFunction or callRendererFunction invocation.",
367
+ "properties": {
368
+ "functionCallId": {
369
+ "$ref": "#/$defs/CallId",
370
+ "description": "The unique ID matching the initiating function call."
371
+ },
372
+ "value": {
373
+ "description": "The return value of the function."
374
+ },
375
+ "error": {
376
+ "type": "object",
377
+ "description": "An error object indicating failure of the function execution.",
378
+ "properties": {
379
+ "code": {"type": "string"},
380
+ "message": {"type": "string"}
381
+ },
382
+ "required": ["code", "message"],
383
+ "additionalProperties": false
384
+ }
385
+ },
386
+ "required": ["functionCallId"],
387
+ "oneOf": [{"required": ["value"]}, {"required": ["error"]}],
388
+ "additionalProperties": false
389
+ }
390
+ }
391
+ }
@@ -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 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": "1.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 renderer-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
+ }