@exponential-at/ui 0.0.0-stage → 0.1.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/LICENSE +201 -0
- package/NOTICE +54 -0
- package/README.md +360 -2
- package/catalog/a11y.json +668 -0
- package/catalog/basic-map.json +104 -0
- package/catalog/code.json +58 -0
- package/catalog/core.catalog.json +4752 -0
- package/catalog/core.schema.json +22667 -0
- package/catalog/host.json +64 -0
- package/catalog/layout.json +20 -0
- package/catalog/limits.json +9 -0
- package/catalog/locale.json +48 -0
- package/catalog/macros.json +3417 -0
- package/catalog/recipes.json +61 -0
- package/catalog/strings.json +72 -0
- package/catalog/style.json +128 -0
- package/catalog/theme.schema.json +42543 -0
- package/catalog/tokens.json +47 -0
- package/conformance/README.md +217 -0
- package/conformance/baseline.ts +101 -0
- package/conformance/browser-page.ts +146 -0
- package/conformance/browser-suites.ts +683 -0
- package/conformance/compare.ts +201 -0
- package/conformance/dom.ts +96 -0
- package/conformance/dump.ts +163 -0
- package/conformance/fonts.json +154 -0
- package/conformance/manifest.json +224 -0
- package/conformance/parity-compare.ts +191 -0
- package/conformance/parity-report.schema.json +73 -0
- package/conformance/parity.ts +412 -0
- package/conformance/pixel.ts +177 -0
- package/conformance/primitives-page.ts +49 -0
- package/conformance/report.schema.json +66 -0
- package/conformance/run.ts +118 -0
- package/dist/chunks/index-98npjvsd.js +3940 -0
- package/dist/chunks/index-98npjvsd.js.map +27 -0
- package/dist/chunks/index-gwkt14w3.js +7314 -0
- package/dist/chunks/index-gwkt14w3.js.map +10 -0
- package/dist/chunks/index-njt7yzzm.js +134 -0
- package/dist/chunks/index-njt7yzzm.js.map +9 -0
- package/dist/chunks/index-we7va6v6.js +7984 -0
- package/dist/chunks/index-we7va6v6.js.map +15 -0
- package/dist/chunks/index-xrm6f7wc.js +2563 -0
- package/dist/chunks/index-xrm6f7wc.js.map +10 -0
- package/dist/conformance.js +182749 -0
- package/dist/conformance.js.map +10 -0
- package/dist/entries/prompt.js +251 -0
- package/dist/entries/prompt.js.map +11 -0
- package/dist/entries/schema.js +1725 -0
- package/dist/entries/schema.js.map +11 -0
- package/dist/host/index.js +122 -0
- package/dist/host/index.js.map +9 -0
- package/dist/index.js +3213 -0
- package/dist/index.js.map +27 -0
- package/dist/types/src/a11y.d.ts +21 -0
- package/dist/types/src/animation.d.ts +76 -0
- package/dist/types/src/basic-map.d.ts +38 -0
- package/dist/types/src/builder.d.ts +50 -0
- package/dist/types/src/catalog.d.ts +54 -0
- package/dist/types/src/catalog.described.d.ts +33 -0
- package/dist/types/src/catalog.generated.d.ts +829 -0
- package/dist/types/src/chart.d.ts +46 -0
- package/dist/types/src/code.d.ts +44 -0
- package/dist/types/src/color.d.ts +20 -0
- package/dist/types/src/conformance.d.ts +39 -0
- package/dist/types/src/connector/app.d.ts +14 -0
- package/dist/types/src/connector/connector.d.ts +77 -0
- package/dist/types/src/connector/index.d.ts +4 -0
- package/dist/types/src/css.d.ts +29 -0
- package/dist/types/src/define.d.ts +66 -0
- package/dist/types/src/direction.d.ts +16 -0
- package/dist/types/src/dynamic.d.ts +159 -0
- package/dist/types/src/entries/prompt.d.ts +11 -0
- package/dist/types/src/entries/schema.d.ts +8 -0
- package/dist/types/src/expr.d.ts +71 -0
- package/dist/types/src/extension.d.ts +4 -0
- package/dist/types/src/format.d.ts +112 -0
- package/dist/types/src/geometry.d.ts +40 -0
- package/dist/types/src/host/contract.d.ts +188 -0
- package/dist/types/src/host/decoders.d.ts +61 -0
- package/dist/types/src/host/index.d.ts +11 -0
- package/dist/types/src/host/package.d.ts +58 -0
- package/dist/types/src/host/policy.d.ts +105 -0
- package/dist/types/src/host/router.d.ts +34 -0
- package/dist/types/src/host/runtime.d.ts +205 -0
- package/dist/types/src/host/sources.d.ts +15 -0
- package/dist/types/src/host/transports.d.ts +109 -0
- package/dist/types/src/index.d.ts +63 -0
- package/dist/types/src/layout.d.ts +20 -0
- package/dist/types/src/limits.d.ts +21 -0
- package/dist/types/src/list.d.ts +133 -0
- package/dist/types/src/locale.d.ts +22 -0
- package/dist/types/src/macros.d.ts +29 -0
- package/dist/types/src/overlay.d.ts +27 -0
- package/dist/types/src/prompt.d.ts +44 -0
- package/dist/types/src/recipes.d.ts +17 -0
- package/dist/types/src/reducer.d.ts +41 -0
- package/dist/types/src/resizable.d.ts +38 -0
- package/dist/types/src/schema.d.ts +7 -0
- package/dist/types/src/strings.d.ts +13 -0
- package/dist/types/src/style.d.ts +201 -0
- package/dist/types/src/test-preload.d.ts +1 -0
- package/dist/types/src/text-shimmer.d.ts +24 -0
- package/dist/types/src/theme-types.d.ts +162 -0
- package/dist/types/src/theme.d.ts +73 -0
- package/dist/types/src/themes.d.ts +22 -0
- package/dist/types/src/tree-guides.d.ts +17 -0
- package/dist/types/src/types.d.ts +314 -0
- package/dist/types/src/validate.d.ts +31 -0
- package/dist/types/src/web/base-css.d.ts +1 -0
- package/dist/types/src/web/box-css.d.ts +55 -0
- package/dist/types/src/web/coerce.d.ts +32 -0
- package/dist/types/src/web/data.d.ts +105 -0
- package/dist/types/src/web/dates.d.ts +12 -0
- package/dist/types/src/web/form.d.ts +44 -0
- package/dist/types/src/web/host-types.d.ts +119 -0
- package/dist/types/src/web/index.d.ts +28 -0
- package/dist/types/src/web/inputs.d.ts +55 -0
- package/dist/types/src/web/list.d.ts +13 -0
- package/dist/types/src/web/listbox.d.ts +14 -0
- package/dist/types/src/web/markdown.d.ts +96 -0
- package/dist/types/src/web/media.d.ts +62 -0
- package/dist/types/src/web/parts.d.ts +4 -0
- package/dist/types/src/web/primitives/alert-dialog.d.ts +10 -0
- package/dist/types/src/web/primitives/alert.d.ts +9 -0
- package/dist/types/src/web/primitives/avatar-color.d.ts +2 -0
- package/dist/types/src/web/primitives/avatar.d.ts +13 -0
- package/dist/types/src/web/primitives/badge.d.ts +10 -0
- package/dist/types/src/web/primitives/breadcrumb.d.ts +10 -0
- package/dist/types/src/web/primitives/button.d.ts +6 -0
- package/dist/types/src/web/primitives/calendar.d.ts +43 -0
- package/dist/types/src/web/primitives/card.d.ts +9 -0
- package/dist/types/src/web/primitives/checkbox.d.ts +5 -0
- package/dist/types/src/web/primitives/choice-tiles.d.ts +32 -0
- package/dist/types/src/web/primitives/cn.d.ts +3 -0
- package/dist/types/src/web/primitives/code-block.d.ts +24 -0
- package/dist/types/src/web/primitives/command.d.ts +134 -0
- package/dist/types/src/web/primitives/context-ring.d.ts +24 -0
- package/dist/types/src/web/primitives/dialog-arms.d.ts +6 -0
- package/dist/types/src/web/primitives/dialog.d.ts +24 -0
- package/dist/types/src/web/primitives/disclosure-header.d.ts +5 -0
- package/dist/types/src/web/primitives/dock.d.ts +42 -0
- package/dist/types/src/web/primitives/dropdown-menu.d.ts +14 -0
- package/dist/types/src/web/primitives/empty-state.d.ts +15 -0
- package/dist/types/src/web/primitives/glass-card.d.ts +4 -0
- package/dist/types/src/web/primitives/hover-card.d.ts +7 -0
- package/dist/types/src/web/primitives/icon-disc.d.ts +12 -0
- package/dist/types/src/web/primitives/index.d.ts +48 -0
- package/dist/types/src/web/primitives/input.d.ts +5 -0
- package/dist/types/src/web/primitives/kbd.d.ts +4 -0
- package/dist/types/src/web/primitives/label.d.ts +3 -0
- package/dist/types/src/web/primitives/menu-surface.d.ts +17 -0
- package/dist/types/src/web/primitives/meter.d.ts +21 -0
- package/dist/types/src/web/primitives/popover.d.ts +3 -0
- package/dist/types/src/web/primitives/progress-ring.d.ts +5 -0
- package/dist/types/src/web/primitives/progress.d.ts +8 -0
- package/dist/types/src/web/primitives/scroll-area.d.ts +49 -0
- package/dist/types/src/web/primitives/segmented-control.d.ts +5 -0
- package/dist/types/src/web/primitives/select.d.ts +47 -0
- package/dist/types/src/web/primitives/separator.d.ts +3 -0
- package/dist/types/src/web/primitives/sheet-chrome.d.ts +4 -0
- package/dist/types/src/web/primitives/sheet.d.ts +20 -0
- package/dist/types/src/web/primitives/skeleton.d.ts +3 -0
- package/dist/types/src/web/primitives/spinner.d.ts +3 -0
- package/dist/types/src/web/primitives/switch.d.ts +4 -0
- package/dist/types/src/web/primitives/table.d.ts +11 -0
- package/dist/types/src/web/primitives/tabs.d.ts +13 -0
- package/dist/types/src/web/primitives/textarea.d.ts +3 -0
- package/dist/types/src/web/primitives/toast.d.ts +163 -0
- package/dist/types/src/web/primitives/tooltip.d.ts +3 -0
- package/dist/types/src/web/primitives/truncate.d.ts +7 -0
- package/dist/types/src/web/primitives/typeahead-portal.d.ts +12 -0
- package/dist/types/src/web/share.d.ts +6 -0
- package/dist/types/src/web/table.d.ts +20 -0
- package/dist/types/src/web/theme-css.d.ts +69 -0
- package/dist/types/src/web/urls.d.ts +21 -0
- package/dist/web/index.js +2303 -0
- package/dist/web/index.js.map +26 -0
- package/dist/web/primitives/index.js +1450 -0
- package/dist/web/primitives/index.js.map +57 -0
- package/docs/components.generated.json +6238 -0
- package/docs/round-1-contract.md +679 -0
- package/docs/round-2-contract.md +476 -0
- package/docs/round-3-contract.md +174 -0
- package/docs/themes.generated.json +3503 -0
- package/fixtures/animations.json +2890 -0
- package/fixtures/bench-list.json +58 -0
- package/fixtures/bind-time.json +30664 -0
- package/fixtures/catalog-basic-map.json +1692 -0
- package/fixtures/catalog-components.json +9323 -0
- package/fixtures/catalog-extension.json +620 -0
- package/fixtures/catalog-macros.json +36370 -0
- package/fixtures/code-tokens.json +1993 -0
- package/fixtures/conformance-baseline.json +55544 -0
- package/fixtures/conformance-cases.json +49 -0
- package/fixtures/conformance-known.json +2123 -0
- package/fixtures/control-geometry.json +4200 -0
- package/fixtures/dashboard.data.json +74 -0
- package/fixtures/dashboard.json +752 -0
- package/fixtures/demo-surface.json +47 -0
- package/fixtures/format.json +870 -0
- package/fixtures/host-policy.json +1067 -0
- package/fixtures/host-router.json +1152 -0
- package/fixtures/host-transport.json +590 -0
- package/fixtures/interactions-round1.json +773 -0
- package/fixtures/kitchen-sink.expanded.json +10844 -0
- package/fixtures/kitchen-sink.json +3049 -0
- package/fixtures/layout-geometry-round1.json +7278 -0
- package/fixtures/layout-geometry.json +2072 -0
- package/fixtures/overlay-geometry.json +272 -0
- package/fixtures/primitive-specimens.json +58 -0
- package/fixtures/prompt-budget.json +33 -0
- package/fixtures/resizable.json +714 -0
- package/fixtures/round4-contract.json +2985 -0
- package/fixtures/specimens.json +9832 -0
- package/fixtures/style-conditions.json +336 -0
- package/fixtures/template-items.json +2215 -0
- package/fixtures/text-direction.json +309 -0
- package/fixtures/text-shimmer.json +96 -0
- package/fixtures/theme-extends.json +573 -0
- package/fixtures/theme-invalid.json +1296 -0
- package/fixtures/theme-recipes.json +58600 -0
- package/fixtures/theme-resolved.json +23949 -0
- package/fixtures/toast-stack.json +215 -0
- package/fixtures/tree-guides.json +224 -0
- package/fixtures/virtual-list.json +733 -0
- package/generated/ExponentialUICatalog.generated.kt +67 -0
- package/generated/ExponentialUICatalog.generated.swift +67 -0
- package/generated/ExponentialUIThemes.generated.kt +23 -0
- package/generated/ExponentialUIThemes.generated.swift +23 -0
- package/generated/catalog.descriptions.generated.rs +6 -0
- package/generated/catalog.generated.rs +80 -0
- package/generated/catalog.themes.generated.rs +34 -0
- package/generated/core.descriptions.json +2505 -0
- package/generated/core.runtime.json +3609 -0
- package/package.json +87 -4
- package/themes/exponential.recipes.json +49 -0
- package/themes/exponential.theme.json +755 -0
- package/themes/neutral.theme.json +5676 -0
- package/themes/orange.theme.json +43 -0
- package/themes/playful.theme.json +219 -0
- package/vendor/a2ui/LICENSE.txt +203 -0
- package/vendor/a2ui/README.md +27 -0
- package/vendor/a2ui/v0_9/basic_catalog.json +1387 -0
- package/vendor/a2ui/v0_9/basic_catalog_rules.txt +5 -0
- package/vendor/a2ui/v0_9/client_capabilities.json +97 -0
- package/vendor/a2ui/v0_9/client_to_server.json +104 -0
- package/vendor/a2ui/v0_9/common_types.json +315 -0
- package/vendor/a2ui/v0_9/server_to_client.json +132 -0
- package/vendor/json-render/LICENSE.txt +201 -0
- package/vendor/json-render/README.md +13 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
**REQUIRED PROPERTIES:** You MUST include ALL required properties for every component, even if they are inside a template or will be bound to data.
|
|
2
|
+
- For 'Text', you MUST provide 'text'. If dynamic, use { "path": "..." }.
|
|
3
|
+
- For 'Image', you MUST provide 'url'. If dynamic, use { "path": "..." }.
|
|
4
|
+
- For 'Button', you MUST provide 'action'.
|
|
5
|
+
- For 'TextField', 'CheckBox', etc., you MUST provide 'label'.
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://a2ui.org/specification/v0_9/client_capabilities.json",
|
|
4
|
+
"title": "A2UI Client Capabilities Schema",
|
|
5
|
+
"description": "A schema for the a2uiClientCapabilities object, which is sent from the client to the server as part of the A2A metadata to describe the client's UI rendering capabilities.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"v0.9": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"description": "The capabilities structure for version 0.9 of the A2UI protocol.",
|
|
11
|
+
"properties": {
|
|
12
|
+
"supportedCatalogIds": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"description": "The URI of each of the component and function catalogs that is supported by the client.",
|
|
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": { "$ref": "#/$defs/Catalog" }
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"required": ["supportedCatalogIds"]
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"required": ["v0.9"],
|
|
27
|
+
"$defs": {
|
|
28
|
+
"FunctionDefinition": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"description": "Describes a function's interface.",
|
|
31
|
+
"properties": {
|
|
32
|
+
"name": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"description": "The unique name of the function."
|
|
35
|
+
},
|
|
36
|
+
"description": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"description": "A human-readable description of what the function does and how to use it."
|
|
39
|
+
},
|
|
40
|
+
"parameters": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"description": "A JSON Schema describing the expected arguments (args) for this function.",
|
|
43
|
+
"$ref": "https://json-schema.org/draft/2020-12/schema"
|
|
44
|
+
},
|
|
45
|
+
"returnType": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"enum": [
|
|
48
|
+
"string",
|
|
49
|
+
"number",
|
|
50
|
+
"boolean",
|
|
51
|
+
"array",
|
|
52
|
+
"object",
|
|
53
|
+
"any",
|
|
54
|
+
"void"
|
|
55
|
+
],
|
|
56
|
+
"description": "The type of value this function returns."
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"required": ["name", "parameters", "returnType"],
|
|
60
|
+
"additionalProperties": false
|
|
61
|
+
},
|
|
62
|
+
"Catalog": {
|
|
63
|
+
"type": "object",
|
|
64
|
+
"description": "A collection of component and function definitions.",
|
|
65
|
+
"properties": {
|
|
66
|
+
"catalogId": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"description": "Unique identifier for this catalog."
|
|
69
|
+
},
|
|
70
|
+
"components": {
|
|
71
|
+
"type": "object",
|
|
72
|
+
"description": "Definitions for UI components supported by this catalog.",
|
|
73
|
+
"additionalProperties": {
|
|
74
|
+
"$ref": "https://json-schema.org/draft/2020-12/schema"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"functions": {
|
|
78
|
+
"type": "array",
|
|
79
|
+
"description": "Definitions for functions supported by this catalog.",
|
|
80
|
+
"items": {
|
|
81
|
+
"$ref": "#/$defs/FunctionDefinition"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"theme": {
|
|
85
|
+
"title": "A2UI Theme",
|
|
86
|
+
"description": "A schema that defines a catalog of A2UI theme properties. Each key is a theme property name (e.g. 'primaryColor'), and each value is the JSON schema for that property.",
|
|
87
|
+
"type": "object",
|
|
88
|
+
"additionalProperties": {
|
|
89
|
+
"$ref": "https://json-schema.org/draft/2020-12/schema"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"required": ["catalogId"],
|
|
94
|
+
"additionalProperties": false
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "A2UI (Agent to UI) Client-to-Server Event Schema",
|
|
3
|
+
"description": "Describes a JSON payload for a client-to-server event message.",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"minProperties": 2,
|
|
6
|
+
"maxProperties": 2,
|
|
7
|
+
"properties": {
|
|
8
|
+
"version": {
|
|
9
|
+
"const": "v0.9"
|
|
10
|
+
},
|
|
11
|
+
"action": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"description": "Reports a user-initiated action from a component.",
|
|
14
|
+
"properties": {
|
|
15
|
+
"name": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "The name of the action, taken from the component's action.event.name property."
|
|
18
|
+
},
|
|
19
|
+
"surfaceId": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "The id of the surface where the event originated."
|
|
22
|
+
},
|
|
23
|
+
"sourceComponentId": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"description": "The id of the component that triggered the event."
|
|
26
|
+
},
|
|
27
|
+
"timestamp": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"format": "date-time",
|
|
30
|
+
"description": "An ISO 8601 timestamp of when the event occurred."
|
|
31
|
+
},
|
|
32
|
+
"context": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"description": "A JSON object containing the key-value pairs from the component's action.event.context, after resolving all data bindings.",
|
|
35
|
+
"additionalProperties": true
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"required": [
|
|
39
|
+
"name",
|
|
40
|
+
"surfaceId",
|
|
41
|
+
"sourceComponentId",
|
|
42
|
+
"timestamp",
|
|
43
|
+
"context"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"error": {
|
|
47
|
+
"description": "Reports a client-side error.",
|
|
48
|
+
"oneOf": [
|
|
49
|
+
{
|
|
50
|
+
"type": "object",
|
|
51
|
+
"title": "Validation Failed Error",
|
|
52
|
+
"properties": {
|
|
53
|
+
"code": {
|
|
54
|
+
"const": "VALIDATION_FAILED"
|
|
55
|
+
},
|
|
56
|
+
"surfaceId": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"description": "The id of the surface where the error occurred."
|
|
59
|
+
},
|
|
60
|
+
"path": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"description": "The JSON pointer to the field that failed validation (e.g. '/components/0/text')."
|
|
63
|
+
},
|
|
64
|
+
"message": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"description": "A short one or two sentence description of why validation failed."
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"required": ["code", "path", "message", "surfaceId"],
|
|
70
|
+
"additionalProperties": false
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"type": "object",
|
|
74
|
+
"title": "Generic Error",
|
|
75
|
+
"properties": {
|
|
76
|
+
"code": {
|
|
77
|
+
"not": {
|
|
78
|
+
"const": "VALIDATION_FAILED"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"message": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"description": "A short one or two sentence description of why the error occurred."
|
|
84
|
+
},
|
|
85
|
+
"surfaceId": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"description": "The id of the surface where the error occurred."
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"required": ["code", "surfaceId", "message"],
|
|
91
|
+
"additionalProperties": true
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"oneOf": [
|
|
97
|
+
{
|
|
98
|
+
"required": ["action", "version"]
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"required": ["error", "version"]
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
}
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://a2ui.org/specification/v0_9/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
|
+
"AccessibilityAttributes": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"description": "Attributes to enhance accessibility when using assistive technologies like screen readers.",
|
|
14
|
+
"properties": {
|
|
15
|
+
"label": {
|
|
16
|
+
"$ref": "#/$defs/DynamicString",
|
|
17
|
+
"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'."
|
|
18
|
+
},
|
|
19
|
+
"description": {
|
|
20
|
+
"$ref": "#/$defs/DynamicString",
|
|
21
|
+
"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'."
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"ComponentCommon": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"properties": {
|
|
28
|
+
"id": {
|
|
29
|
+
"$ref": "#/$defs/ComponentId"
|
|
30
|
+
},
|
|
31
|
+
"accessibility": {
|
|
32
|
+
"$ref": "#/$defs/AccessibilityAttributes"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"required": ["id"]
|
|
36
|
+
},
|
|
37
|
+
"ChildList": {
|
|
38
|
+
"oneOf": [
|
|
39
|
+
{
|
|
40
|
+
"type": "array",
|
|
41
|
+
"items": {
|
|
42
|
+
"$ref": "#/$defs/ComponentId"
|
|
43
|
+
},
|
|
44
|
+
"description": "A static list of child component IDs."
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"type": "object",
|
|
48
|
+
"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.",
|
|
49
|
+
"properties": {
|
|
50
|
+
"componentId": {
|
|
51
|
+
"$ref": "#/$defs/ComponentId"
|
|
52
|
+
},
|
|
53
|
+
"path": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"description": "The path to the list of component property objects in the data model."
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"required": ["componentId", "path"],
|
|
59
|
+
"additionalProperties": false
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
"DataBinding": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"properties": {
|
|
66
|
+
"path": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"description": "A JSON Pointer path to a value in the data model."
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"required": ["path"],
|
|
72
|
+
"additionalProperties": false
|
|
73
|
+
},
|
|
74
|
+
"DynamicValue": {
|
|
75
|
+
"description": "A value that can be a literal, a path, or a function call returning any type.",
|
|
76
|
+
"oneOf": [
|
|
77
|
+
{
|
|
78
|
+
"type": "string"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"type": "number"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"type": "boolean"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"type": "array"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"$ref": "#/$defs/DataBinding"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"$ref": "#/$defs/FunctionCall"
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
"DynamicString": {
|
|
98
|
+
"description": "Represents a string",
|
|
99
|
+
"oneOf": [
|
|
100
|
+
{
|
|
101
|
+
"type": "string"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"$ref": "#/$defs/DataBinding"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"allOf": [
|
|
108
|
+
{
|
|
109
|
+
"$ref": "#/$defs/FunctionCall"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"properties": {
|
|
113
|
+
"returnType": {
|
|
114
|
+
"const": "string"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
"DynamicNumber": {
|
|
123
|
+
"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.",
|
|
124
|
+
"oneOf": [
|
|
125
|
+
{
|
|
126
|
+
"type": "number"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"$ref": "#/$defs/DataBinding"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"allOf": [
|
|
133
|
+
{
|
|
134
|
+
"$ref": "#/$defs/FunctionCall"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"properties": {
|
|
138
|
+
"returnType": {
|
|
139
|
+
"const": "number"
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
]
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
},
|
|
147
|
+
"DynamicBoolean": {
|
|
148
|
+
"description": "A boolean value that can be a literal, a path, or a function call returning a boolean.",
|
|
149
|
+
"oneOf": [
|
|
150
|
+
{
|
|
151
|
+
"type": "boolean"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"$ref": "#/$defs/DataBinding"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"allOf": [
|
|
158
|
+
{
|
|
159
|
+
"$ref": "#/$defs/FunctionCall"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"properties": {
|
|
163
|
+
"returnType": {
|
|
164
|
+
"const": "boolean"
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
]
|
|
171
|
+
},
|
|
172
|
+
"DynamicStringList": {
|
|
173
|
+
"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.",
|
|
174
|
+
"oneOf": [
|
|
175
|
+
{
|
|
176
|
+
"type": "array",
|
|
177
|
+
"items": {
|
|
178
|
+
"type": "string"
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"$ref": "#/$defs/DataBinding"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"allOf": [
|
|
186
|
+
{
|
|
187
|
+
"$ref": "#/$defs/FunctionCall"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"properties": {
|
|
191
|
+
"returnType": {
|
|
192
|
+
"const": "array"
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
]
|
|
197
|
+
}
|
|
198
|
+
]
|
|
199
|
+
},
|
|
200
|
+
"FunctionCall": {
|
|
201
|
+
"type": "object",
|
|
202
|
+
"description": "Invokes a named function on the client.",
|
|
203
|
+
"properties": {
|
|
204
|
+
"call": {
|
|
205
|
+
"type": "string",
|
|
206
|
+
"description": "The name of the function to call."
|
|
207
|
+
},
|
|
208
|
+
"args": {
|
|
209
|
+
"type": "object",
|
|
210
|
+
"description": "Arguments passed to the function.",
|
|
211
|
+
"additionalProperties": {
|
|
212
|
+
"anyOf": [
|
|
213
|
+
{
|
|
214
|
+
"$ref": "#/$defs/DynamicValue"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"type": "object",
|
|
218
|
+
"description": "A literal object argument (e.g. configuration)."
|
|
219
|
+
}
|
|
220
|
+
]
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
"returnType": {
|
|
224
|
+
"type": "string",
|
|
225
|
+
"description": "The expected return type of the function call.",
|
|
226
|
+
"enum": [
|
|
227
|
+
"string",
|
|
228
|
+
"number",
|
|
229
|
+
"boolean",
|
|
230
|
+
"array",
|
|
231
|
+
"object",
|
|
232
|
+
"any",
|
|
233
|
+
"void"
|
|
234
|
+
],
|
|
235
|
+
"default": "boolean"
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
"required": ["call"],
|
|
239
|
+
"oneOf": [
|
|
240
|
+
{ "$ref": "catalog.json#/$defs/anyFunction" }
|
|
241
|
+
]
|
|
242
|
+
},
|
|
243
|
+
"CheckRule": {
|
|
244
|
+
"type": "object",
|
|
245
|
+
"description": "A single validation rule applied to an input component.",
|
|
246
|
+
"properties": {
|
|
247
|
+
"condition": {
|
|
248
|
+
"$ref": "#/$defs/DynamicBoolean"
|
|
249
|
+
},
|
|
250
|
+
"message": {
|
|
251
|
+
"type": "string",
|
|
252
|
+
"description": "The error message to display if the check fails."
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
"required": ["condition", "message"],
|
|
256
|
+
"additionalProperties": false
|
|
257
|
+
},
|
|
258
|
+
"Checkable": {
|
|
259
|
+
"description": "Properties for components that support client-side checks.",
|
|
260
|
+
"type": "object",
|
|
261
|
+
"properties": {
|
|
262
|
+
"checks": {
|
|
263
|
+
"type": "array",
|
|
264
|
+
"description": "A list of checks to perform. These are function calls that must return a boolean indicating validity.",
|
|
265
|
+
"items": {
|
|
266
|
+
"$ref": "#/$defs/CheckRule"
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
"Action": {
|
|
272
|
+
"description": "Defines an interaction handler that can either trigger a server-side event or execute a local client-side function.",
|
|
273
|
+
"oneOf": [
|
|
274
|
+
{
|
|
275
|
+
"type": "object",
|
|
276
|
+
"description": "Triggers a server-side event.",
|
|
277
|
+
"properties": {
|
|
278
|
+
"event": {
|
|
279
|
+
"type": "object",
|
|
280
|
+
"description": "The event to dispatch to the server.",
|
|
281
|
+
"properties": {
|
|
282
|
+
"name": {
|
|
283
|
+
"type": "string",
|
|
284
|
+
"description": "The name of the action to be dispatched to the server."
|
|
285
|
+
},
|
|
286
|
+
"context": {
|
|
287
|
+
"type": "object",
|
|
288
|
+
"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.",
|
|
289
|
+
"additionalProperties": {
|
|
290
|
+
"$ref": "#/$defs/DynamicValue"
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
"required": ["name"],
|
|
295
|
+
"additionalProperties": false
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
"required": ["event"],
|
|
299
|
+
"additionalProperties": false
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"type": "object",
|
|
303
|
+
"description": "Executes a local client-side function.",
|
|
304
|
+
"properties": {
|
|
305
|
+
"functionCall": {
|
|
306
|
+
"$ref": "#/$defs/FunctionCall"
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
"required": ["functionCall"],
|
|
310
|
+
"additionalProperties": false
|
|
311
|
+
}
|
|
312
|
+
]
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://a2ui.org/specification/v0_9/server_to_client.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
|
+
],
|
|
13
|
+
"$defs": {
|
|
14
|
+
"CreateSurfaceMessage": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"properties": {
|
|
17
|
+
"version": {
|
|
18
|
+
"const": "v0.9"
|
|
19
|
+
},
|
|
20
|
+
"createSurface": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"description": "Signals the client to create a new surface and begin rendering it. When this message is sent, the client will expect 'updateComponents' and/or 'updateDataModel' messages for the same surfaceId that define the component tree.",
|
|
23
|
+
"properties": {
|
|
24
|
+
"surfaceId": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "The unique identifier for the UI surface to be rendered."
|
|
27
|
+
},
|
|
28
|
+
"catalogId": {
|
|
29
|
+
"description": "A string that uniquely identifies this catalog. It is recommended to prefix this with an internet domain that you own, to avoid conflicts e.g. mycompany.com:somecatalog'.",
|
|
30
|
+
"type": "string"
|
|
31
|
+
},
|
|
32
|
+
"theme": {
|
|
33
|
+
"$ref": "catalog.json#/$defs/theme",
|
|
34
|
+
"description": "Theme parameters for the surface (e.g., {'primaryColor': '#FF0000'}). These must validate against the 'theme' schema defined in the catalog."
|
|
35
|
+
},
|
|
36
|
+
"sendDataModel": {
|
|
37
|
+
"type": "boolean",
|
|
38
|
+
"description": "If true, the client will send the full data model of this surface in the metadata of every A2A message sent to the server that created the surface. Defaults to false."
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"required": ["surfaceId", "catalogId"],
|
|
42
|
+
"additionalProperties": false
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"required": ["createSurface", "version"],
|
|
46
|
+
"additionalProperties": false
|
|
47
|
+
},
|
|
48
|
+
"UpdateComponentsMessage": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"properties": {
|
|
51
|
+
"version": {
|
|
52
|
+
"const": "v0.9"
|
|
53
|
+
},
|
|
54
|
+
"updateComponents": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"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 with the 'catalogId' that is in this message.",
|
|
57
|
+
"properties": {
|
|
58
|
+
"surfaceId": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"description": "The unique identifier for the UI surface to be updated."
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
"components": {
|
|
64
|
+
"type": "array",
|
|
65
|
+
"description": "A list containing all UI components for the surface.",
|
|
66
|
+
"minItems": 1,
|
|
67
|
+
"items": {
|
|
68
|
+
"$ref": "catalog.json#/$defs/anyComponent"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"required": ["surfaceId", "components"],
|
|
73
|
+
"additionalProperties": false
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"required": ["updateComponents", "version"],
|
|
77
|
+
"additionalProperties": false
|
|
78
|
+
},
|
|
79
|
+
"UpdateDataModelMessage": {
|
|
80
|
+
"type": "object",
|
|
81
|
+
"properties": {
|
|
82
|
+
"version": {
|
|
83
|
+
"const": "v0.9"
|
|
84
|
+
},
|
|
85
|
+
"updateDataModel": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"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 with the 'catalogId' that is in this message.",
|
|
88
|
+
"properties": {
|
|
89
|
+
"surfaceId": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"description": "The unique identifier for the UI surface this data model update applies to."
|
|
92
|
+
},
|
|
93
|
+
"path": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"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."
|
|
96
|
+
},
|
|
97
|
+
"value": {
|
|
98
|
+
"description": "The data to be updated in the data model. If present, the value at 'path' is replaced (or created). If omitted, the key at 'path' is removed.",
|
|
99
|
+
"additionalProperties": true
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"required": ["surfaceId"],
|
|
103
|
+
"additionalProperties": false
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"required": ["updateDataModel", "version"],
|
|
107
|
+
"additionalProperties": false
|
|
108
|
+
},
|
|
109
|
+
"DeleteSurfaceMessage": {
|
|
110
|
+
"type": "object",
|
|
111
|
+
"properties": {
|
|
112
|
+
"version": {
|
|
113
|
+
"const": "v0.9"
|
|
114
|
+
},
|
|
115
|
+
"deleteSurface": {
|
|
116
|
+
"type": "object",
|
|
117
|
+
"description": "Signals the client to delete the surface identified by 'surfaceId'. The createSurface message MUST have been previously sent with the 'catalogId' that is in this message.",
|
|
118
|
+
"properties": {
|
|
119
|
+
"surfaceId": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"description": "The unique identifier for the UI surface to be deleted."
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"required": ["surfaceId"],
|
|
125
|
+
"additionalProperties": false
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"required": ["deleteSurface", "version"],
|
|
129
|
+
"additionalProperties": false
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|