You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/concepts/catalogs.md
+26-26Lines changed: 26 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,15 +57,15 @@ Whether you are building a simple prototype or a complex production application,
57
57
58
58
### The Basic Catalog
59
59
60
-
To help developers get started quickly, the A2UI team maintains the [Basic Catalog](../../specification/v0_9/json/basic_catalog.json).
60
+
To help developers get started quickly, the A2UI team maintains the [Basic Catalog](../../specification/v0_9/catalogs/basic/catalog.json).
61
61
62
62
This is a pre-defined catalog file that contains a basic set of general-purpose components (Buttons, Inputs, Cards) and functions. It is not a special "type" of catalog; it is simply a version of a catalog that we have already written and have open source renderers for.
63
63
64
64
The basic catalog allows you to bootstrap an application or validate A2UI concepts without needing to write your own schema from scratch. It is intentionally sparse to remain easily implementable by different renderers.
65
65
66
66
Since A2UI is designed for LLMs to generate the UI at either design time or runtime, we do not think portability requires a standardized catalog across multiple clients; the LLM can interpret the catalog for each individual frontend.
67
67
68
-
[See the A2UI v0.9 basic catalog](../../specification/v0_9/json/basic_catalog.json)
68
+
[See the A2UI v0.9 basic catalog](../../specification/v0_9/catalogs/basic/catalog.json)
69
69
70
70
### Defining Your Own Catalog
71
71
@@ -163,7 +163,7 @@ where:
163
163
-`--version`: The A2UI specification version to use for official catalog
164
164
fallbacks. Choices are `0.9` or `0.10`. Defaults to `0.9`.
165
165
-`--extend-basic-catalog`: If passed, automatically includes the entirety of
166
-
`basic_catalog.json` in the root output regardless of whether the input
166
+
`catalogs/basic/catalog.json` in the root output regardless of whether the input
167
167
catalogs explicitly reference it.
168
168
-`--out-dir`, `-o`: The directory where the assembled catalog will be saved. Defaults to `dist`.
169
169
-`--verbose`, `-v`: If passed, enables verbose debug logging to help diagnose issues.
@@ -211,7 +211,7 @@ This catalog imports only `Text` from the Basic Catalog to build a simple Popup
@@ -366,18 +366,18 @@ While standard JSON parsers ignore unknown fields, dropping a component in a Ser
366
366
367
367
-**Breaking Changes (Major Version Bump Required)**
368
368
Any change that alters structure in a way that cannot be safely ignored by older clients incrementing the **Major** version in the `catalogId` URI (e.g., `v1` to `v2`).
369
-
-**Adding a container component:** e.g., adding a `Grid` or `Accordion` component. If an older client ignores a container, it will drop all of its children, breaking the UI tree.
370
-
-**Removing a container component:** e.g., removing a `Grid` or `Accordion` component. If an older agent uses the container it would be ignored by the client, and the client would drop all of its children, breaking the UI tree.
371
-
-**Changing field types:** e.g., changing a property from a `string` to an `object`. This will fail JSON Schema validation on older clients.
372
-
-**Adding a required property:** without a default value, as older agents won't know to send it.
369
+
-**Adding a container component:** e.g., adding a `Grid` or `Accordion` component. If an older client ignores a container, it will drop all of its children, breaking the UI tree.
370
+
-**Removing a container component:** e.g., removing a `Grid` or `Accordion` component. If an older agent uses the container it would be ignored by the client, and the client would drop all of its children, breaking the UI tree.
371
+
-**Changing field types:** e.g., changing a property from a `string` to an `object`. This will fail JSON Schema validation on older clients.
372
+
-**Adding a required property:** without a default value, as older agents won't know to send it.
373
373
374
374
-**Non-Breaking Changes (Allowable under Major Version)**
375
375
Changes that can be safely ignored or degrade gracefully without breaking the layout or data model can stay at the current version.
376
-
-**Adding a leaf component (non-container):** e.g., adding `Badge` or `Tooltip`. If ignored, the layout remains intact.
377
-
-**Adding an optional property:** e.g., adding `subtitle` to a Card.
378
-
-**Removing a property:** Safe for the client to ignore if the agent stops sending it.
379
-
-**Adding new functions or styles:** These can generally be ignored without changing the semantic meaning of the component.
380
-
-**Metadata Changes:** Updating `description` fields or fixing typos in docs requires no version bump and has no impact on runtime.
376
+
-**Adding a leaf component (non-container):** e.g., adding `Badge` or `Tooltip`. If ignored, the layout remains intact.
377
+
-**Adding an optional property:** e.g., adding `subtitle` to a Card.
378
+
-**Removing a property:** Safe for the client to ignore if the agent stops sending it.
379
+
-**Adding new functions or styles:** These can generally be ignored without changing the semantic meaning of the component.
380
+
-**Metadata Changes:** Updating `description` fields or fixing typos in docs requires no version bump and has no impact on runtime.
381
381
382
382
### Graceful Degradation
383
383
@@ -388,14 +388,14 @@ While standard JSON parsers ignore unknown fields, dropping a component in a Ser
388
388
Here is how catalog version mismatches are handled in practice:
389
389
390
390
-**An old iOS client is using an older catalog than the agent**
391
-
- The agent sends a new component `Badge` that the old iOS client doesn't know about. The client renders a generic textbox placeholder or safe text description for it, keeping the rest of the interface functional.
392
-
- The agent sends a new property `badge` on a `Button` that an old client doesn't know about. The client safely ignores it and renders the basic button.
393
-
- The agent no longer sends the `Facepile` component that was removed in a later catalog version. This causes no issues for the client.
391
+
- The agent sends a new component `Badge` that the old iOS client doesn't know about. The client renders a generic textbox placeholder or safe text description for it, keeping the rest of the interface functional.
392
+
- The agent sends a new property `badge` on a `Button` that an old client doesn't know about. The client safely ignores it and renders the standard button.
393
+
- The agent no longer sends the `Facepile` component that was removed in a later catalog version. This causes no issues for the client.
394
394
395
395
-**A web client rolls out a new catalog version ahead of the agent**
396
-
- The web client supports the new `Badge` component, but the agent doesn't know about it yet.
397
-
- The web client removed the `badge` property on `Button`, so it ignores it if the agent sends it.
398
-
- The web client added new styles for `Button` that the agent doesn't know about. Again this causes no issues as the agent doesn't use them.
396
+
- The web client supports the new `Badge` component, but the agent doesn't know about it yet.
397
+
- The web client removed the `badge` property on `Button`, so it ignores it if the agent sends it.
398
+
- The web client added new styles for `Button` that the agent doesn't know about. Again this causes no issues as the agent doesn't use them.
399
399
400
400
### Versioning with CatalogId
401
401
@@ -423,11 +423,11 @@ To ensure a stable user experience, A2UI employs a two-phase validation strategy
423
423
### Two-Phase Validation
424
424
425
425
1.**Agent-Side (Pre-Send):** Before transmitting any UI payload, the agent runtime validates the generated JSON against the catalog definition.
426
-
- Purpose: To catch hallucinated properties or malformed structures at the source.
427
-
- Outcome: If validation fails, the agent can attempt to fix or regenerate the A2UI JSON, or it can do graceful degradation such as falling back to text in a conversational app.
426
+
- Purpose: To catch hallucinated properties or malformed structures at the source.
427
+
- Outcome: If validation fails, the agent can attempt to fix or regenerate the A2UI JSON, or it can do graceful degradation such as falling back to text in a conversational app.
428
428
2.**Client-Side:** Upon receiving the payload, the client library validates the JSON against its local definition of the catalog.
429
-
- Purpose: Security and stability. This ensures that the code executing on the user's device strictly conforms to the expected contract, protecting against version mismatches or compromised agent outputs.
430
-
- Outcome: Failures here are reported back to the agent using the “error” client message
429
+
- Purpose: Security and stability. This ensures that the code executing on the user's device strictly conforms to the expected contract, protecting against version mismatches or compromised agent outputs.
430
+
- Outcome: Failures here are reported back to the agent using the “error” client message
Copy file name to clipboardExpand all lines: docs/concepts/components.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -171,7 +171,7 @@ Every component has:
171
171
172
172
## The Basic Catalog
173
173
174
-
To help developers get started quickly, the A2UI team maintains the [Basic Catalog](../../specification/v0_9/json/basic_catalog.json).
174
+
To help developers get started quickly, the A2UI team maintains the [Basic Catalog](../../specification/v0_9/catalogs/basic/catalog.json).
175
175
176
176
This is a pre-defined catalog file that contains a basic set of general-purpose components (Buttons, Inputs, Cards). It is not a special "type" of catalog; it is simply a version of a catalog that has open source renderers available.
0 commit comments