Skip to content

Commit 82d0067

Browse files
committed
Merge branch 'upstream/main' into angular-explorer-08-support
2 parents b4ec164 + e2053ff commit 82d0067

156 files changed

Lines changed: 28979 additions & 508 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
run: |
7777
cp -R specification/* docs/specification/
7878
# Flatten JSON files to version roots to support clean URLs without redirects
79-
for version in v0_8 v0_9; do
79+
for version in v0_8 v0_9 v0_10; do
8080
if [ -d "docs/specification/$version/json" ]; then
8181
cp docs/specification/$version/json/*.json docs/specification/$version/
8282
fi

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@
1919
"options": {
2020
"singleQuote": false
2121
}
22+
},
23+
{
24+
"files": "docs/**/*.md",
25+
"options": {
26+
"embeddedLanguageFormatting": "off",
27+
"tabWidth": 4
28+
}
2229
}
2330
]
2431
}

agent_sdks/python/src/a2ui/basic_catalog/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@
2121
VERSION_0_8: {
2222
CATALOG_SCHEMA_KEY: "specification/v0_8/json/standard_catalog_definition.json"
2323
},
24-
VERSION_0_9: {CATALOG_SCHEMA_KEY: "specification/v0_9/json/basic_catalog.json"},
24+
VERSION_0_9: {CATALOG_SCHEMA_KEY: "specification/v0_9/catalogs/basic/catalog.json"},
2525
}

agent_sdks/python/src/a2ui/schema/catalog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def _with_pruned_common_types(self) -> "A2uiCatalog":
280280

281281
root_common_types = []
282282
for ref in external_refs:
283-
if ref.startswith("common_types.json#/$defs/"):
283+
if "common_types.json#/$defs/" in ref:
284284
root_common_types.append(ref.split("#/$defs/")[-1])
285285

286286
new_common_types_schema = copy.deepcopy(self.common_types_schema)

docs/concepts/actions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ Renderers include an `a2uiClientCapabilities` object in the **metadata** of thei
237237
{
238238
"v0.9": {
239239
"supportedCatalogIds": [
240-
"https://a2ui.org/specification/v0_9/basic_catalog.json",
240+
"https://a2ui.org/specification/v0_9/catalogs/basic/catalog.json",
241241
"https://my-company.com/catalogs/v1/custom.json"
242242
],
243243
"inlineCatalogs": []

docs/concepts/catalogs.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@ Whether you are building a simple prototype or a complex production application,
5757

5858
### The Basic Catalog
5959

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).
6161

6262
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.
6363

6464
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.
6565

6666
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.
6767

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)
6969

7070
### Defining Your Own Catalog
7171

@@ -163,7 +163,7 @@ where:
163163
- `--version`: The A2UI specification version to use for official catalog
164164
fallbacks. Choices are `0.9` or `0.10`. Defaults to `0.9`.
165165
- `--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
167167
catalogs explicitly reference it.
168168
- `--out-dir`, `-o`: The directory where the assembled catalog will be saved. Defaults to `dist`.
169169
- `--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
211211
"$id": "https://github.com/.../hello_world_with_some_basic/v1/catalog.json",
212212
"components": {
213213
"allOf": [
214-
{"$ref": "basic_catalog.json#/components/Text"},
214+
{"$ref": "catalogs/basic/catalog.json#/components/Text"},
215215
{
216216
"Popup": {
217217
"type": "object",
@@ -297,7 +297,7 @@ Example of an A2A AgentCard advertising that the agent supports the basic and ri
297297
"description": "Provides agent driven UI using the A2UI JSON format.",
298298
"params": {
299299
"supportedCatalogIds": [
300-
"https://a2ui.org/specification/v0_9/basic_catalog.json",
300+
"https://a2ui.org/specification/v0_9/catalogs/basic/catalog.json",
301301
"https://github.com/.../rizzcharts_catalog_definition.json"
302302
]
303303
}
@@ -323,7 +323,7 @@ Example of A2A message containing the supportedCatalogIds in metadata
323323
"metadata": {
324324
"a2uiClientCapabilities": {
325325
"supportedCatalogIds": [
326-
"https://a2ui.org/specification/v0_9/basic_catalog.json",
326+
"https://a2ui.org/specification/v0_9/catalogs/basic/catalog.json",
327327
"https://github.com/.../rizzcharts_catalog_definition.json"
328328
]
329329
}
@@ -341,7 +341,7 @@ Example A2UI Message from the agent defining the catalog_id used in a surface
341341
{
342342
"createSurface": {
343343
"surfaceId": "salesDashboard",
344-
"catalogId": "https://a2ui.org/specification/v0_9/basic_catalog.json"
344+
"catalogId": "https://a2ui.org/specification/v0_9/catalogs/basic/catalog.json"
345345
}
346346
}
347347
```
@@ -366,18 +366,18 @@ While standard JSON parsers ignore unknown fields, dropping a component in a Ser
366366

367367
- **Breaking Changes (Major Version Bump Required)**
368368
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.
373373

374374
- **Non-Breaking Changes (Allowable under Major Version)**
375375
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.
381381

382382
### Graceful Degradation
383383

@@ -388,14 +388,14 @@ While standard JSON parsers ignore unknown fields, dropping a component in a Ser
388388
Here is how catalog version mismatches are handled in practice:
389389

390390
- **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.
394394

395395
- **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.
399399

400400
### Versioning with CatalogId
401401

@@ -423,11 +423,11 @@ To ensure a stable user experience, A2UI employs a two-phase validation strategy
423423
### Two-Phase Validation
424424

425425
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.
428428
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
431431

432432
### Graceful Degradation
433433

docs/concepts/components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ Every component has:
171171

172172
## The Basic Catalog
173173

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).
175175

176176
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.
177177

docs/concepts/data-binding.md

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -174,32 +174,33 @@ Adding/removing items automatically updates the rendered components.
174174

175175
Interactive components update the data model bidirectionally:
176176

177-
| Component | Example | User Action | Data Update |
178-
| ------------------ | ------------------------------------------- | ---------------- | ------------------------ |
179-
| **TextField** | `{"text": {"path": "/form/name"}}` | Types "Alice" | `/form/name` = "Alice" |
180-
| **CheckBox** | `{"value": {"path": "/form/agreed"}}` | Checks box | `/form/agreed` = true |
181-
| **MultipleChoice** | `{"selections": {"path": "/form/country"}}` | Selects "Canada" | `/form/country` = ["ca"] |
177+
| Component | Example | User Action | Data Update |
178+
| ------------------ | ------------------------------------------- | ---------------- | -------------------------- |
179+
| **TextField** | `{"text": {"path": "/form/name"}}` | Types "Alice" | `/form/name` = `"Alice"` |
180+
| **CheckBox** | `{"value": {"path": "/form/agreed"}}` | Checks box | `/form/agreed` = `true` |
181+
| **MultipleChoice** | `{"selections": {"path": "/form/country"}}` | Selects "Canada" | `/form/country` = `["ca"]` |
182182

183183
## Best Practices
184184

185185
- **Use granular updates**: Update only changed paths.
186186

187-
```json
188-
{
189-
"dataModelUpdate": {
190-
"path": "/user",
191-
"contents": [{"key": "name", "valueString": "Alice"}]
187+
```json
188+
{
189+
"dataModelUpdate": {
190+
"path": "/user",
191+
"contents": [{"key": "name", "valueString": "Alice"}]
192+
}
192193
}
193-
}
194-
```
194+
```
195195

196196
- **Organize by domain**: Group related data.
197197

198-
```json
199-
{"user": {...}, "cart": {...}, "ui": {...}}
200-
```
198+
```json
199+
{"user": {...}, "cart": {...}, "ui": {...}}
200+
```
201201

202202
- **Pre-compute display values**: Formats data (currency, dates) on the agent before sending.
203-
```json
204-
{"price": "$19.99"} // Not: {"price": 19.99}
205-
```
203+
204+
```json
205+
{"price": "$19.99"} // Not: {"price": 19.99}
206+
```

docs/concepts/data-flow.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ A2UI defines a sequence of JSON messages that describe the UI. When streamed, th
5353
"version": "v0.9",
5454
"createSurface": {
5555
"surfaceId": "main",
56-
"catalogId": "https://a2ui.org/specification/v0_9/basic_catalog.json"
56+
"catalogId": "https://a2ui.org/specification/v0_9/catalogs/basic/catalog.json"
5757
}
5858
}
5959
{
@@ -197,7 +197,7 @@ A sequence of self-contained JSON objects is streaming-friendly, easy for LLMs t
197197
"version": "v0.9",
198198
"createSurface": {
199199
"surfaceId": "booking",
200-
"catalogId": "https://a2ui.org/specification/v0_9/basic_catalog.json"
200+
"catalogId": "https://a2ui.org/specification/v0_9/catalogs/basic/catalog.json"
201201
}
202202
}
203203
```

docs/ecosystem/a2ui-in-the-world.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -166,19 +166,19 @@ The A2UI community is building exciting projects:
166166
### Open Source Examples
167167

168168
- **Restaurant Finder** ([samples/agent/adk/restaurant_finder](https://github.com/google/A2UI/tree/main/samples/agent/adk/restaurant_finder))
169-
- Table reservation with dynamic forms
170-
- Gemini-powered agent
171-
- Full source code available
169+
- Table reservation with dynamic forms
170+
- Gemini-powered agent
171+
- Full source code available
172172

173173
- **Contact Lookup** ([samples/agent/adk/contact_lookup](https://github.com/google/A2UI/tree/main/samples/agent/adk/contact_lookup))
174-
- Search interface with results list
175-
- A2A agent example
176-
- Demonstrates data binding
174+
- Search interface with results list
175+
- A2A agent example
176+
- Demonstrates data binding
177177

178178
- **Component Gallery** ([samples/client/angular - gallery mode](https://github.com/google/A2UI/tree/main/samples/client/angular))
179-
- Interactive showcase of all components
180-
- Live examples with code
181-
- Great for learning
179+
- Interactive showcase of all components
180+
- Live examples with code
181+
- Great for learning
182182

183183
### Third-Party Integrations
184184

0 commit comments

Comments
 (0)