diff --git a/a2a_agents/python/a2ui_agent/src/a2ui/extension/a2ui_extension.py b/a2a_agents/python/a2ui_agent/src/a2ui/extension/a2ui_extension.py index 1ade02318..150607b92 100644 --- a/a2a_agents/python/a2ui_agent/src/a2ui/extension/a2ui_extension.py +++ b/a2a_agents/python/a2ui_agent/src/a2ui/extension/a2ui_extension.py @@ -29,7 +29,9 @@ SUPPORTED_CATALOG_IDS_KEY = "supportedCatalogIds" INLINE_CATALOGS_KEY = "inlineCatalogs" -STANDARD_CATALOG_ID = "https://github.com/google/A2UI/blob/main/specification/v0_8/json/standard_catalog_definition.json" +STANDARD_CATALOG_ID = ( + "https://a2ui.org/specification/v0_8/standard_catalog_definition.json" +) def create_a2ui_part(a2ui_data: dict[str, Any]) -> Part: diff --git a/docs/reference/components.md b/docs/reference/components.md index 29a63fb4b..9e81a937c 100644 --- a/docs/reference/components.md +++ b/docs/reference/components.md @@ -1,6 +1,6 @@ # Component Gallery -This page showcases all standard A2UI components with examples and usage patterns. For the complete technical specification, see the [Standard Catalog Definition](https://github.com/google/A2UI/blob/main/specification/v0_8/json/standard_catalog_definition.json). +This page showcases all standard A2UI components with examples and usage patterns. For the complete technical specification, see the [Standard Catalog Definition](https://a2ui.org/specification/v0_8/standard_catalog_definition.json). ## Layout Components diff --git a/docs/reference/messages.md b/docs/reference/messages.md index d3dd21ba5..2396cf317 100644 --- a/docs/reference/messages.md +++ b/docs/reference/messages.md @@ -386,8 +386,8 @@ Remove a surface and all its components and data. All messages should be validated against: -- **[server_to_client.json](https://github.com/google/A2UI/blob/main/specification/v0_8/json/server_to_client.json)**: Message envelope schema -- **[standard_catalog_definition.json](https://github.com/google/A2UI/blob/main/specification/v0_8/json/standard_catalog_definition.json)**: Component schemas +- **[server_to_client.json](https://a2ui.org/specification/v0_8/server_to_client.json)**: Message envelope schema +- **[standard_catalog_definition.json](https://a2ui.org/specification/v0_8/standard_catalog_definition.json)**: Component schemas ## Further Reading diff --git a/mkdocs.yaml b/mkdocs.yaml index f6ba4667b..c24df32da 100644 --- a/mkdocs.yaml +++ b/mkdocs.yaml @@ -183,6 +183,17 @@ plugins: # sections: # "Specification": # - a2ui_protocol.md - # - redirects: - # redirect_maps: - # "index.md": "a2ui_protocol.md" + - redirects: + redirect_maps: + "specification/v0_9/server_to_client.json": "specification/v0_9/json/server_to_client.json" + "specification/v0_9/client_to_server.json": "specification/v0_9/json/client_to_server.json" + "specification/v0_9/common_types.json": "specification/v0_9/json/common_types.json" + "specification/v0_9/standard_catalog.json": "specification/v0_9/json/standard_catalog.json" + "specification/v0_9/a2ui_client_capabilities.json": "specification/v0_9/json/a2ui_client_capabilities.json" + "specification/v0_9/a2ui_client_data_model.json": "specification/v0_9/json/a2ui_client_data_model.json" + "specification/v0_8/a2ui_client_capabilities_schema.json": "specification/v0_8/json/a2ui_client_capabilities_schema.json" + "specification/v0_8/catalog_description_schema.json": "specification/v0_8/json/catalog_description_schema.json" + "specification/v0_8/client_to_server.json": "specification/v0_8/json/client_to_server.json" + "specification/v0_8/server_to_client.json": "specification/v0_8/json/server_to_client.json" + "specification/v0_8/server_to_client_with_standard_catalog.json": "specification/v0_8/json/server_to_client_with_standard_catalog.json" + "specification/v0_8/standard_catalog_definition.json": "specification/v0_8/json/standard_catalog_definition.json" diff --git a/samples/client/angular/projects/orchestrator/src/server.ts b/samples/client/angular/projects/orchestrator/src/server.ts index 70472047c..f949ce552 100644 --- a/samples/client/angular/projects/orchestrator/src/server.ts +++ b/samples/client/angular/projects/orchestrator/src/server.ts @@ -62,7 +62,7 @@ app.post('/a2a', (req, res) => { metadata: { a2uiClientCapabilities: { supportedCatalogIds: [ - 'https://github.com/google/A2UI/blob/main/specification/v0_8/json/standard_catalog_definition.json', + 'https://a2ui.org/specification/v0_8/standard_catalog_definition.json', ], }, }, diff --git a/samples/client/angular/projects/rizzcharts/src/components/toolbar/toolbar.ts b/samples/client/angular/projects/rizzcharts/src/components/toolbar/toolbar.ts index cc0719827..15c9b4101 100644 --- a/samples/client/angular/projects/rizzcharts/src/components/toolbar/toolbar.ts +++ b/samples/client/angular/projects/rizzcharts/src/components/toolbar/toolbar.ts @@ -27,7 +27,15 @@ import { FormsModule } from '@angular/forms'; @Component({ selector: 'app-toolbar', - imports: [MatButtonModule, MatIconModule, MatToolbarModule, MatSelectModule, MatFormFieldModule, MatInputModule, FormsModule], + imports: [ + MatButtonModule, + MatIconModule, + MatToolbarModule, + MatSelectModule, + MatFormFieldModule, + MatInputModule, + FormsModule, + ], templateUrl: './toolbar.html', styleUrl: './toolbar.scss', }) @@ -37,22 +45,22 @@ export class Toolbar { catalogs = [ { - value: 'https://github.com/google/A2UI/blob/main/specification/v0_8/json/standard_catalog_definition.json', - viewValue: 'Standard' + value: 'https://a2ui.org/specification/v0_8/standard_catalog_definition.json', + viewValue: 'Standard', }, { - value: 'https://github.com/google/A2UI/blob/main/samples/agent/adk/rizzcharts/rizzcharts_catalog_definition.json', - viewValue: 'Rizzcharts Custom' + value: + 'https://github.com/google/A2UI/blob/main/samples/agent/adk/rizzcharts/rizzcharts_catalog_definition.json', + viewValue: 'Rizzcharts Custom', }, ]; ngOnInit() { - this.selectedCatalogs = this.catalogs.map(c => c.value); + this.selectedCatalogs = this.catalogs.map((c) => c.value); this.updateCatalogService(); } updateCatalogService() { this.catalogService.catalogUris = this.selectedCatalogs; } - } diff --git a/specification/v0_8/docs/a2ui_extension_specification.md b/specification/v0_8/docs/a2ui_extension_specification.md index 8afa7976a..e1569a43d 100644 --- a/specification/v0_8/docs/a2ui_extension_specification.md +++ b/specification/v0_8/docs/a2ui_extension_specification.md @@ -41,7 +41,7 @@ Example AgentExtension block: "required": false, "params": { "supportedCatalogIds": [ - "https://github.com/google/A2UI/blob/main/specification/v0_8/json/standard_catalog_definition.json", + "https://a2ui.org/specification/v0_8/standard_catalog_definition.json", "https://my-company.com/a2ui/v0.8/my_custom_catalog.json" ], "acceptsInlineCatalogs": true diff --git a/specification/v0_8/docs/a2ui_protocol.md b/specification/v0_8/docs/a2ui_protocol.md index 58b37ffb4..967eee8f3 100644 --- a/specification/v0_8/docs/a2ui_protocol.md +++ b/specification/v0_8/docs/a2ui_protocol.md @@ -167,7 +167,7 @@ A2UI's component model is designed for flexibility, separating the protocol from A **Catalog** defines the contract between the server and the client for the UI that can be rendered. It contains a list of supported component types (e.g., `Row`, `Text`), their properties, and available styles. A catalog is defined by a **Catalog Definition Document**. -There is a **Standard Catalog** associated with each version of the A2UI protocol. For v0.8, its identifier is `https://github.com/google/A2UI/blob/main/specification/v0_8/json/standard_catalog_definition.json`. +There is a **Standard Catalog** associated with each version of the A2UI protocol. For v0.8, its identifier is `https://a2ui.org/specification/v0_8/standard_catalog_definition.json`. Catalog IDs are simple string identifiers. While they can be anything, it is conventional to use a URI within a domain that you own, to simplify debugging, avoid confusion, and avoid name collisions. Furthermore, if any changes are made to a catalog that could break compatibility between an agent and renderer, a new `catalogId` **must** be assigned. This ensures clear versioning and prevents unexpected behavior if an agent has changes but the client does not, or vice versa. @@ -192,7 +192,7 @@ The server (agent) advertises its capabilities in its Agent Card as part of the "uri": "https://a2ui.org/a2a-extension/a2ui/v0.8", "params": { "supportedCatalogIds": [ - "https://github.com/google/A2UI/blob/main/specification/v0_8/json/standard_catalog_definition.json", + "https://a2ui.org/specification/v0_8/standard_catalog_definition.json", "https://my-company.com/a2ui/v0.8/my_custom_catalog.json" ], "acceptsInlineCatalogs": true @@ -218,7 +218,7 @@ In **every** message sent to the server, the client includes an `a2uiClientCapab "metadata": { "a2uiClientCapabilities": { "supportedCatalogIds": [ - "https://github.com/google/A2UI/blob/main/specification/v0_8/json/standard_catalog_definition.json", + "https://a2ui.org/specification/v0_8/standard_catalog_definition.json", "https://my-company.com/a2ui_catalogs/custom-reporting-catalog-1.2" ], "inlineCatalogs": [ @@ -249,7 +249,7 @@ The server receives the client's capabilities and chooses a catalog to use for a - `catalogId` (string, optional): The identifier of the chosen catalog. This ID must be one of the `supportedCatalogIds` or the `catalogId` from one of the `inlineCatalogs` provided by the client. -If the `catalogId` is omitted, the client **MUST** default to the standard catalog for the protocol version (`https://github.com/google/A2UI/blob/main/specification/v0_8/json/standard_catalog_definition.json`). +If the `catalogId` is omitted, the client **MUST** default to the standard catalog for the protocol version (`https://a2ui.org/specification/v0_8/standard_catalog_definition.json`). **Example `beginRendering` Message:** ```json @@ -279,7 +279,7 @@ resolved_schema["properties"]["surfaceUpdate"]["properties"]["components"]["item resolved_schema["properties"]["beginRendering"]["properties"]["styles"]["properties"] = style_properties ``` -See `server_to_client_with_standard_catalog.json` for an example of a resolved +See `server_to_client_with_standard_catalog.json` for an example of a resolved schema which has the components substituted in. ### 2.2. The `surfaceUpdate` Message diff --git a/specification/v0_8/docs/custom_catalog_changes.md b/specification/v0_8/docs/custom_catalog_changes.md index e1f2bd142..0f83166aa 100644 --- a/specification/v0_8/docs/custom_catalog_changes.md +++ b/specification/v0_8/docs/custom_catalog_changes.md @@ -7,19 +7,19 @@ The previous mechanism, which involved a single, one-time `clientUiCapabilities` ## Key changes to the protocol 1. **Agent capability advertisement (`supportedCatalogIds`, `acceptsInlineCatalogs`)**: The agent's role in negotiation has been expanded. It now can declare a list of supported catalog IDs, in addition to whether it is capable of processing catalogs defined "inline" by the client. - * **Relevant Doc**: [`a2ui_extension_specification.md`](./a2ui_extension_specification.md) + - **Relevant Doc**: [`a2ui_extension_specification.md`](./a2ui_extension_specification.md) 2. **Client capabilities via A2A metadata**: The client now sends its capabilities in an `a2uiClientCapabilities` object. Crucially, this is no longer a standalone message but is included in the `metadata` field of **every** A2A message sent to the agent. - * This object contains `supportedCatalogIds` (an array of known catalog IDs) and an optional `inlineCatalogs` (an array of full catalog definitions). - * **Relevant doc**: The new process is explained in the [`a2ui_protocol.md`](./a2ui_protocol.md#catalog-negotiation) section on Catalog Negotiation. - * **Relevant schema**: [`a2ui_client_capabilities_schema.json`](../json/a2ui_client_capabilities_schema.json) + - This object contains `supportedCatalogIds` (an array of known catalog IDs) and an optional `inlineCatalogs` (an array of full catalog definitions). + - **Relevant doc**: The new process is explained in the [`a2ui_protocol.md`](./a2ui_protocol.md#catalog-negotiation) section on Catalog Negotiation. + - **Relevant schema**: [`a2ui_client_capabilities_schema.json`](../json/a2ui_client_capabilities_schema.json) 3. **Per-Surface catalog selection (`beginRendering`)**: The agent is now responsible for selecting which catalog to use for each UI surface. It signals its choice using the new optional `catalogId` field in the `beginRendering` message. If this field is omitted, the client must default to the Standard Catalog. - * **Relevant doc**: [`a2ui_protocol.md`](./a2ui_protocol.md#catalog-negotiation) - * **Relevant schema**: The change is reflected in [`server_to_client.json`](../json/server_to_client.json). + - **Relevant doc**: [`a2ui_protocol.md`](./a2ui_protocol.md#catalog-negotiation) + - **Relevant schema**: The change is reflected in [`server_to_client.json`](../json/server_to_client.json). 4. **Catalog definition ID (`catalogId`)**: To facilitate identification, the catalog definition schema itself now has a required `catalogId` field. - * **Relevant schema**: [`catalog_description_schema.json`](../json/catalog_description_schema.json) + - **Relevant schema**: [`catalog_description_schema.json`](../json/catalog_description_schema.json) --- @@ -45,14 +45,14 @@ Your responsibilities are to accurately declare your capabilities and render sur 1. **Declare capabilities on every request**: For every A2A message your application sends, your library must inject the `a2uiClientCapabilities` object into the top-level `metadata` field. -2. **Populate `supportedCatalogIds`**: In the capabilities object, populate this array with the string identifiers of all pre-compiled catalogs your renderer supports. If your renderer supports the standard catalog for v0.8, you **should** include its ID: `https://github.com/google/A2UI/blob/main/specification/v0_8/json/standard_catalog_definition.json`. +2. **Populate `supportedCatalogIds`**: In the capabilities object, populate this array with the string identifiers of all pre-compiled catalogs your renderer supports. If your renderer supports the standard catalog for v0.8, you **should** include its ID: `https://a2ui.org/specification/v0_8/standard_catalog_definition.json`. 3. **Provide `inlineCatalogs` (optional)**: If your renderer supports dynamically generating or defining catalogs at runtime, include their full, valid Catalog Definition Documents in the `inlineCatalogs` array. 4. **Process `beginRendering`**: When your renderer receives a `beginRendering` message, it must inspect the new `catalogId` field. 5. **Select Catalog for surface**: - * If `catalogId` is present, use the corresponding catalog to render that surface. Your renderer must be able to look up the catalog from its pre-compiled list or from the inline definitions it just sent. - * If `catalogId` is **absent**, you **must** default to using the Standard Catalog for v0.8 for that surface. + - If `catalogId` is present, use the corresponding catalog to render that surface. Your renderer must be able to look up the catalog from its pre-compiled list or from the inline definitions it just sent. + - If `catalogId` is **absent**, you **must** default to using the Standard Catalog for v0.8 for that surface. 6. **Manage multiple Catalogs**: Your renderer must be architected to handle multiple surfaces being rendered with different catalogs simultaneously. A dictionary mapping `surfaceId` to the chosen `catalog` is a common approach. diff --git a/specification/v0_8/json/a2ui_client_capabilities_schema.json b/specification/v0_8/json/a2ui_client_capabilities_schema.json index 519f0e9e6..e5dc311bf 100644 --- a/specification/v0_8/json/a2ui_client_capabilities_schema.json +++ b/specification/v0_8/json/a2ui_client_capabilities_schema.json @@ -6,7 +6,7 @@ "properties": { "supportedCatalogIds": { "type": "array", - "description": "The URI of each of the catalogs that is supported by the client. The standard catalog for v0.8 is 'https://github.com/google/A2UI/blob/main/specification/v0_8/json/standard_catalog_definition.json'.", + "description": "The URI of each of the catalogs that is supported by the client. The standard catalog for v0.8 is 'https://a2ui.org/specification/v0_8/standard_catalog_definition.json'.", "items": { "type": "string" } diff --git a/specification/v0_8/json/server_to_client.json b/specification/v0_8/json/server_to_client.json index ba189470d..3b73b754f 100644 --- a/specification/v0_8/json/server_to_client.json +++ b/specification/v0_8/json/server_to_client.json @@ -15,7 +15,7 @@ }, "catalogId": { "type": "string", - "description": "The identifier of the component catalog to use for this surface. If omitted, the client MUST default to the standard catalog for this A2UI version (https://github.com/google/A2UI/blob/main/specification/v0_8/json/standard_catalog_definition.json)." + "description": "The identifier of the component catalog to use for this surface. If omitted, the client MUST default to the standard catalog for this A2UI version (https://a2ui.org/specification/v0_8/standard_catalog_definition.json)." }, "root": { "type": "string", @@ -24,7 +24,7 @@ "styles": { "type": "object", "description": "Styling information for the UI.", - "additionalProperties": true + "additionalProperties": true } }, "required": ["root", "surfaceId"] @@ -145,4 +145,4 @@ "required": ["surfaceId"] } } -} \ No newline at end of file +} diff --git a/specification/v0_9/docs/a2ui_extension_specification.md b/specification/v0_9/docs/a2ui_extension_specification.md index 40c1d1d4f..37b3f2db5 100644 --- a/specification/v0_9/docs/a2ui_extension_specification.md +++ b/specification/v0_9/docs/a2ui_extension_specification.md @@ -40,7 +40,7 @@ Example AgentExtension block: "required": false, "params": { "supportedCatalogIds": [ - "https://a2ui.dev/specification/v0_9/standard_catalog.json", + "https://a2ui.org/specification/v0_9/standard_catalog.json", "https://my-company.com/a2ui/v0.9/my_custom_catalog.json" ], "acceptsInlineCatalogs": true @@ -88,7 +88,7 @@ Example `createSurface` DataPart: "data": { "createSurface": { "surfaceId": "user_profile_surface", - "catalogId": "https://a2ui.dev/specification/v0_9/standard_catalog.json" + "catalogId": "https://a2ui.org/specification/v0_9/standard_catalog.json" } }, "kind": "data", diff --git a/specification/v0_9/docs/a2ui_protocol.md b/specification/v0_9/docs/a2ui_protocol.md index 7f55ca2d6..6c3b0fba5 100644 --- a/specification/v0_9/docs/a2ui_protocol.md +++ b/specification/v0_9/docs/a2ui_protocol.md @@ -191,7 +191,7 @@ This message signals the client to create a new surface and begin rendering it. { "createSurface": { "surfaceId": "user_profile_card", - "catalogId": "https://a2ui.dev/specification/v0_9/standard_catalog.json", + "catalogId": "https://a2ui.org/specification/v0_9/standard_catalog.json", "theme": { "primaryColor": "#00BFFF" }, @@ -281,7 +281,7 @@ This message instructs the client to remove a surface and all its associated com The following example demonstrates a complete interaction to render a Contact Form, expressed as a JSONL stream. ```jsonl -{"createSurface":{"surfaceId":"contact_form_1","catalogId":"https://a2ui.dev/specification/v0_9/standard_catalog.json"}} +{"createSurface":{"surfaceId":"contact_form_1","catalogId":"https://a2ui.org/specification/v0_9/standard_catalog.json"}} {"updateComponents":{"surfaceId":"contact_form_1","components":[{"id":"root","component":"Card","child":"form_container"},{"id":"form_container","component":"Column","children":["header_row","name_row","email_group","phone_group","pref_group","divider_1","newsletter_checkbox","submit_button"],"justify":"start","align":"stretch"},{"id":"header_row","component":"Row","children":["header_icon","header_text"],"align":"center"},{"id":"header_icon","component":"Icon","name":"mail"},{"id":"header_text","component":"Text","text":"# Contact Us","variant":"h2"},{"id":"name_row","component":"Row","children":["first_name_group","last_name_group"],"justify":"spaceBetween"},{"id":"first_name_group","component":"Column","children":["first_name_label","first_name_field"],"weight":1},{"id":"first_name_label","component":"Text","text":"First Name","variant":"caption"},{"id":"first_name_field","component":"TextField","label":"First Name","value":{"path":"/contact/firstName"},"variant":"shortText"},{"id":"last_name_group","component":"Column","children":["last_name_label","last_name_field"],"weight":1},{"id":"last_name_label","component":"Text","text":"Last Name","variant":"caption"},{"id":"last_name_field","component":"TextField","label":"Last Name","value":{"path":"/contact/lastName"},"variant":"shortText"},{"id":"email_group","component":"Column","children":["email_label","email_field"]},{"id":"email_label","component":"Text","text":"Email Address","variant":"caption"},{"id":"email_field","component":"TextField","label":"Email","value":{"path":"/contact/email"},"variant":"shortText","checks":[{"call":"required","args":{"value":{"path":"/contact/email"}},"message":"Email is required."},{"call":"email","args":{"value":{"path":"/contact/email"}},"message":"Please enter a valid email address."}]},{"id":"phone_group","component":"Column","children":["phone_label","phone_field"]},{"id":"phone_label","component":"Text","text":"Phone Number","variant":"caption"},{"id":"phone_field","component":"TextField","label":"Phone","value":{"path":"/contact/phone"},"variant":"shortText","checks":[{"call":"regex","args":{"value":{"path":"/contact/phone"},"pattern":"^\\d{10}$"},"message":"Phone number must be 10 digits."}]},{"id":"pref_group","component":"Column","children":["pref_label","pref_picker"]},{"id":"pref_label","component":"Text","text":"Preferred Contact Method","variant":"caption"},{"id":"pref_picker","component":"ChoicePicker","variant":"mutuallyExclusive","options":[{"label":"Email","value":"email"},{"label":"Phone","value":"phone"},{"label":"SMS","value":"sms"}],"value":{"path":"/contact/preference"}},{"id":"divider_1","component":"Divider","axis":"horizontal"},{"id":"newsletter_checkbox","component":"CheckBox","label":"Subscribe to our newsletter","value":{"path":"/contact/subscribe"}},{"id":"submit_button_label","component":"Text","text":"Send Message"},{"id":"submit_button","component":"Button","child":"submit_button_label","variant":"primary","action":{"event":{"name":"submitContactForm","context":{"formId":"contact_form_1","clientTime":{"call":"now","args":{},"returnType":"string"},"isNewsletterSubscribed":{"path":"/contact/subscribe"}}}}}]}} {"updateDataModel":{"surfaceId":"contact_form_1","path":"/contact","value":{"firstName":"John","lastName":"Doe","email":"john.doe@example.com","phone":"1234567890","preference":["email"],"subscribe":true}}} {"deleteSurface":{"surfaceId":"contact_form_1"}} diff --git a/specification/v0_9/docs/evolution_guide.md b/specification/v0_9/docs/evolution_guide.md index ab566f52b..4ba8518ac 100644 --- a/specification/v0_9/docs/evolution_guide.md +++ b/specification/v0_9/docs/evolution_guide.md @@ -105,7 +105,7 @@ Version 0.9 represents a fundamental philosophical shift from "Structured Output { "createSurface": { "surfaceId": "user_profile_card", - "catalogId": "https://a2ui.dev/specification/v0_9/standard_catalog.json", + "catalogId": "https://a2ui.org/specification/v0_9/standard_catalog.json", "theme": { "primaryColor": "#007bff" } diff --git a/specification/v0_9/eval/src/generation_flow.ts b/specification/v0_9/eval/src/generation_flow.ts index a5d9018aa..81d73d775 100644 --- a/specification/v0_9/eval/src/generation_flow.ts +++ b/specification/v0_9/eval/src/generation_flow.ts @@ -41,7 +41,7 @@ export const componentGeneratorFlow = ai.defineFlow( The output MUST be a series of JSON objects, each enclosed in a markdown code block (or a single block with multiple objects). Standard Instructions: -1. Generate a 'createSurface' message with surfaceId 'main' and catalogId 'https://a2ui.dev/specification/v0_9/standard_catalog.json'. +1. Generate a 'createSurface' message with surfaceId 'main' and catalogId 'https://a2ui.org/specification/v0_9/standard_catalog.json'. 2. Generate a 'updateComponents' message with surfaceId 'main' containing the requested UI. 3. Ensure all component children are referenced by ID (using the 'children' or 'child' property with IDs), NOT nested inline as objects. 4. If the request involves data binding, you may also generate 'updateDataModel' messages. diff --git a/specification/v0_9/eval/src/prompts.ts b/specification/v0_9/eval/src/prompts.ts index a192a03c3..f44b1f2d7 100644 --- a/specification/v0_9/eval/src/prompts.ts +++ b/specification/v0_9/eval/src/prompts.ts @@ -394,7 +394,7 @@ Each activity in the inner lists should be a 'Row' containing a 'CheckBox' (to m description: "A button that opens an external URL.", promptText: `Create a 'createSurface' and 'updateComponents' message. Surface ID 'main'. Include a 'Button' labeled "Visit Website". - The button's action should be a client-side function call to 'openUrl' with the argument 'url': 'https://a2ui.dev'.`, + The button's action should be a client-side function call to 'openUrl' with the argument 'url': 'https://a2ui.org'.`, }, { name: "nestedLayoutRecursive", diff --git a/specification/v0_9/eval/src/validator.ts b/specification/v0_9/eval/src/validator.ts index 0839f6f7e..695e43661 100644 --- a/specification/v0_9/eval/src/validator.ts +++ b/specification/v0_9/eval/src/validator.ts @@ -36,7 +36,7 @@ export class Validator { this.ajv.addSchema(schema, name); } this.validateFn = this.ajv.getSchema( - "https://a2ui.dev/specification/v0_9/server_to_client.json" + "https://a2ui.org/specification/v0_9/server_to_client.json", ); // Populate standard functions from the catalog schema @@ -85,7 +85,7 @@ export class Validator { // to avoid noisy "oneOf" errors. let validated = false; const schemaUri = - "https://a2ui.dev/specification/v0_9/server_to_client.json"; + "https://a2ui.org/specification/v0_9/server_to_client.json"; if (message.createSurface) { validated = this.ajv.validate( @@ -307,7 +307,7 @@ export class Validator { if (this.ajv && c.component) { const componentType = c.component; const schemaUri = - "https://a2ui.dev/specification/v0_9/standard_catalog.json"; + "https://a2ui.org/specification/v0_9/standard_catalog.json"; const defRef = `${schemaUri}#/components/${componentType}`; diff --git a/specification/v0_9/json/a2ui_client_capabilities.json b/specification/v0_9/json/a2ui_client_capabilities.json index 3d13488f3..1a64e51fd 100644 --- a/specification/v0_9/json/a2ui_client_capabilities.json +++ b/specification/v0_9/json/a2ui_client_capabilities.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://a2ui.dev/specification/v0_9/a2ui_client_capabilities.json", + "$id": "https://a2ui.org/specification/v0_9/a2ui_client_capabilities.json", "title": "A2UI Client Capabilities Schema", "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.", "type": "object", @@ -37,7 +37,15 @@ }, "returnType": { "type": "string", - "enum": ["string", "number", "boolean", "array", "object", "any", "void"], + "enum": [ + "string", + "number", + "boolean", + "array", + "object", + "any", + "void" + ], "description": "The type of value this function returns." } }, diff --git a/specification/v0_9/json/a2ui_client_data_model.json b/specification/v0_9/json/a2ui_client_data_model.json index e1bb67cc5..3284686f0 100644 --- a/specification/v0_9/json/a2ui_client_data_model.json +++ b/specification/v0_9/json/a2ui_client_data_model.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://a2ui.dev/specification/v0_9/a2ui_client_data_model.json", + "$id": "https://a2ui.org/specification/v0_9/a2ui_client_data_model.json", "title": "A2UI Client Data Model Schema", "description": "Schema for attaching the client data model to A2A message metadata. This object should be placed in the `a2uiClientDataModel` field of the metadata.", "type": "object", diff --git a/specification/v0_9/json/common_types.json b/specification/v0_9/json/common_types.json index ffb569ae5..b1a670da3 100644 --- a/specification/v0_9/json/common_types.json +++ b/specification/v0_9/json/common_types.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://a2ui.dev/specification/v0_9/common_types.json", + "$id": "https://a2ui.org/specification/v0_9/common_types.json", "title": "A2UI Common Types", "description": "Common type definitions used across A2UI schemas.", "$defs": { diff --git a/specification/v0_9/json/server_to_client.json b/specification/v0_9/json/server_to_client.json index 1fa142e42..c4921eeee 100644 --- a/specification/v0_9/json/server_to_client.json +++ b/specification/v0_9/json/server_to_client.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://a2ui.dev/specification/v0_9/server_to_client.json", + "$id": "https://a2ui.org/specification/v0_9/server_to_client.json", "title": "A2UI Message Schema", "description": "Describes a JSON payload for an A2UI (Agent to UI) message, which is used to dynamically construct and update user interfaces.", "type": "object", diff --git a/specification/v0_9/json/standard_catalog.json b/specification/v0_9/json/standard_catalog.json index 13c877f72..06cb4637a 100644 --- a/specification/v0_9/json/standard_catalog.json +++ b/specification/v0_9/json/standard_catalog.json @@ -1,9 +1,9 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://a2ui.dev/specification/v0_9/standard_catalog.json", + "$id": "https://a2ui.org/specification/v0_9/standard_catalog.json", "title": "A2UI Standard Catalog", "description": "Unified catalog of standard A2UI components and functions.", - "catalogId": "https://a2ui.dev/specification/v0_9/standard_catalog.json", + "catalogId": "https://a2ui.org/specification/v0_9/standard_catalog.json", "components": { "Text": { "type": "object", diff --git a/specification/v0_9/test/cases/contact_form_example.jsonl b/specification/v0_9/test/cases/contact_form_example.jsonl index 52549e983..a47b2a2ea 100644 --- a/specification/v0_9/test/cases/contact_form_example.jsonl +++ b/specification/v0_9/test/cases/contact_form_example.jsonl @@ -1,4 +1,4 @@ -{"createSurface":{"surfaceId":"contact_form_1","catalogId":"https://a2ui.dev/specification/v0_9/standard_catalog.json"}} +{"createSurface":{"surfaceId":"contact_form_1","catalogId":"https://a2ui.org/specification/v0_9/standard_catalog.json"}} {"updateComponents":{"surfaceId":"contact_form_1","components":[{"id":"root","component":"Card","child":"form_container"},{"id":"form_container","component":"Column","children":["header_row","name_row","email_group","phone_group","pref_group","divider_1","newsletter_checkbox","submit_button"],"justify":"start","align":"stretch"},{"id":"header_row","component":"Row","children":["header_icon","header_text"],"align":"center"},{"id":"header_icon","component":"Icon","name":"mail"},{"id":"header_text","component":"Text","text":"# Contact Us","variant":"h2"},{"id":"name_row","component":"Row","children":["first_name_group","last_name_group"],"justify":"spaceBetween"},{"id":"first_name_group","component":"Column","children":["first_name_label","first_name_field"],"weight":1},{"id":"first_name_label","component":"Text","text":"First Name","variant":"caption"},{"id":"first_name_field","component":"TextField","label":"First Name","value":{"path":"/contact/firstName"},"variant":"shortText"},{"id":"last_name_group","component":"Column","children":["last_name_label","last_name_field"],"weight":1},{"id":"last_name_label","component":"Text","text":"Last Name","variant":"caption"},{"id":"last_name_field","component":"TextField","label":"Last Name","value":{"path":"/contact/lastName"},"variant":"shortText"},{"id":"email_group","component":"Column","children":["email_label","email_field"]},{"id":"email_label","component":"Text","text":"Email Address","variant":"caption"},{"id":"email_field","component":"TextField","label":"Email","value":{"path":"/contact/email"},"variant":"shortText","checks":[{"call":"required","args":{"value":{"path":"/contact/email"}},"message":"Email is required."},{"call":"email","args":{"value":{"path":"/contact/email"}},"message":"Please enter a valid email address."}]},{"id":"phone_group","component":"Column","children":["phone_label","phone_field"]},{"id":"phone_label","component":"Text","text":"Phone Number","variant":"caption"},{"id":"phone_field","component":"TextField","label":"Phone","value":{"path":"/contact/phone"},"variant":"shortText","checks":[{"call":"regex","args":{"value":{"path":"/contact/phone"},"pattern":"^\\d{10}$"},"message":"Phone number must be 10 digits."}]},{"id":"pref_group","component":"Column","children":["pref_label","pref_picker"]},{"id":"pref_label","component":"Text","text":"Preferred Contact Method","variant":"caption"},{"id":"pref_picker","component":"ChoicePicker","variant":"mutuallyExclusive","options":[{"label":"Email","value":"email"},{"label":"Phone","value":"phone"},{"label":"SMS","value":"sms"}],"value":{"path":"/contact/preference"}},{"id":"divider_1","component":"Divider","axis":"horizontal"},{"id":"newsletter_checkbox","component":"CheckBox","label":"Subscribe to our newsletter","value":{"path":"/contact/subscribe"}},{"id":"submit_button_label","component":"Text","text":"Send Message"},{"id":"submit_button","component":"Button","child":"submit_button_label","variant":"primary","action":{"event":{"name":"submitContactForm","context":{"formId":"contact_form_1","clientTime":{"call":"now","args":{},"returnType":"string"},"isNewsletterSubscribed":{"path":"/contact/subscribe"}}}}}]}} {"updateDataModel":{"surfaceId":"contact_form_1","path":"/contact","value":{"firstName":"John","lastName":"Doe","email":"john.doe@example.com","phone":"1234567890","preference":["email"],"subscribe":true}}} {"deleteSurface":{"surfaceId":"contact_form_1"}} \ No newline at end of file diff --git a/specification/v0_9/test/cases/contact_form_example_test.json b/specification/v0_9/test/cases/contact_form_example_test.json index 35c10a30f..2e9371ae0 100644 --- a/specification/v0_9/test/cases/contact_form_example_test.json +++ b/specification/v0_9/test/cases/contact_form_example_test.json @@ -7,7 +7,7 @@ "data": { "createSurface": { "surfaceId": "contact_form_1", - "catalogId": "https://a2ui.dev/specification/v0_9/standard_catalog.json" + "catalogId": "https://a2ui.org/specification/v0_9/standard_catalog.json" } } },