Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 22 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
insert_final_newline = true
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any chance of enabling format-on-save or similar? Does the formatting config require running the formatting script, or can it be started from the IDE?

99 changes: 51 additions & 48 deletions .gemini/GEMINI.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,40 +6,40 @@ This document serves as a guide for using the Gemini agent within the A2UI repos

The A2UI repository is organized into several key directories:

- `specification/`: Contains the A2UI protocol specifications.
- `v0_8/`: The stable protocol version.
- `docs/`: Human-readable documentation.
- `json/`: JSON schema definitions.
- `eval/`: Genkit-based evaluation framework.
- `v0_9/`: The draft protocol version (in development).
- `docs/`: Human-readable documentation.
- `json/`: JSON schema definitions.
- `eval/`: Genkit-based evaluation framework.
- `v0_10/`: The proposed protocol version (next version).
- `docs/`: Human-readable documentation.
- `json/`: JSON schema definitions.
- `eval/`: Genkit-based evaluation framework.
- `samples/`: Contains sample implementations.
- `agent/`:
- `adk/`: Python-based ADK agent samples (e.g., `contact_lookup`, `restaurant_finder`, `rizzcharts`, `orchestrator`).
- `mcp/`: MCP server sample (A2UI over MCP).
- `client/`: Web client implementations.
- `lit/`: Clients using Lit and Vite (e.g., `contact`, `shell`).
- `angular/`: Clients using Angular (e.g., `contact`, `orchestrator`).
- `personalized_learning/`: Personalized learning sample implementation.
- `agent_sdks/`: Contains source code for Agent integrations.
- `python/`: Python implementation of the A2UI agent library.
- `kotlin/`: Kotlin implementation of the A2UI agent library.
- `renderers/`: Contains renderer libraries.
- `lit/`: The shared Lit renderer library used by the Lit clients.
- `angular/`: The shared Angular renderer library used by the Angular clients.
- `web_core/`: The shared core library used by web renderers.
- `markdown/`: Markdown rendering utilities.
- `tools/`: Helper tools for development.
- `editor/`: A web-based editor for generating and visualizing A2UI.
- `inspector/`: A web-based inspector for A2UI responses.
- `composer/`: Visual composer tool.
- `build_catalog/`: Catalog building utility.
- `specification/`: Contains the A2UI protocol specifications.
- `v0_8/`: The stable protocol version.
- `docs/`: Human-readable documentation.
- `json/`: JSON schema definitions.
- `eval/`: Genkit-based evaluation framework.
- `v0_9/`: The draft protocol version (in development).
- `docs/`: Human-readable documentation.
- `json/`: JSON schema definitions.
- `eval/`: Genkit-based evaluation framework.
- `v0_10/`: The proposed protocol version (next version).
- `docs/`: Human-readable documentation.
- `json/`: JSON schema definitions.
- `eval/`: Genkit-based evaluation framework.
- `samples/`: Contains sample implementations.
- `agent/`:
- `adk/`: Python-based ADK agent samples (e.g., `contact_lookup`, `restaurant_finder`, `rizzcharts`, `orchestrator`).
- `mcp/`: MCP server sample (A2UI over MCP).
- `client/`: Web client implementations.
- `lit/`: Clients using Lit and Vite (e.g., `contact`, `shell`).
- `angular/`: Clients using Angular (e.g., `contact`, `orchestrator`).
- `personalized_learning/`: Personalized learning sample implementation.
- `agent_sdks/`: Contains source code for Agent integrations.
- `python/`: Python implementation of the A2UI agent library.
- `kotlin/`: Kotlin implementation of the A2UI agent library.
- `renderers/`: Contains renderer libraries.
- `lit/`: The shared Lit renderer library used by the Lit clients.
- `angular/`: The shared Angular renderer library used by the Angular clients.
- `web_core/`: The shared core library used by web renderers.
- `markdown/`: Markdown rendering utilities.
- `tools/`: Helper tools for development.
- `editor/`: A web-based editor for generating and visualizing A2UI.
- `inspector/`: A web-based inspector for A2UI responses.
- `composer/`: Visual composer tool.
- `build_catalog/`: Catalog building utility.

## A2UI Specification Overview

Expand All @@ -49,17 +49,17 @@ The A2UI protocol is a JSONL-based, streaming UI protocol designed to be easily

The core concepts of the A2UI protocol are detailed in the main specification document. Refer to the authoritative source for the current version (0.9):

- **A2UI Protocol Specification**: `@specification/v0_9/docs/a2ui_protocol.md`
- **A2UI Protocol Specification**: `@specification/v0_9/docs/a2ui_protocol.md`

This document covers the design philosophy, architecture, data flow, and core concepts of the protocol.

### Schemas

The formal, machine-readable definitions of the protocol are maintained as JSON schemas. For version 0.9:

- **Server-to-Client Schema**: `@specification/v0_9/json/server_to_client.json`
- **Client-to-Server Schema**: `@specification/v0_9/json/client_to_server.json`
- **Basic Catalog**: `@specification/v0_9/json/basic_catalog.json`
- **Server-to-Client Schema**: `@specification/v0_9/json/server_to_client.json`
- **Client-to-Server Schema**: `@specification/v0_9/json/client_to_server.json`
- **Basic Catalog**: `@specification/v0_9/json/basic_catalog.json`

## Running the Demos

Expand All @@ -82,6 +82,7 @@ The Lit clients are located in `samples/client/lit/`.

1. **Build the Renderer**:
First, ensure the shared renderers are built:

```bash
cd renderers/markdown/markdown-it
npm install
Expand Down Expand Up @@ -109,6 +110,7 @@ The Lit clients are located in `samples/client/lit/`.
The Angular clients are located in `samples/client/angular/`.

First, ensure the shared renderers are built (if not already done):

```bash
cd renderers/markdown/markdown-it
npm install
Expand All @@ -124,6 +126,7 @@ npm run build
```

Then run the Angular client:

```bash
cd samples/client/angular
npm install
Expand All @@ -132,25 +135,25 @@ npm start -- contact # Replace 'contact' with the desired project name (e.g., r

### Running Tools

- **Editor**: Located in `tools/editor`. Run with `npm install && npm run dev`.
- Requires a Gemini API key in `.env` (`GEMINI_API_KEY=<key>`).
- **Inspector**: Located in `tools/inspector`. Run with `npm install && npm run dev`.
- **Editor**: Located in `tools/editor`. Run with `npm install && npm run dev`.
- Requires a Gemini API key in `.env` (`GEMINI_API_KEY=<key>`).
- **Inspector**: Located in `tools/inspector`. Run with `npm install && npm run dev`.

## Renderers

There are three renderers available for A2UI:

- **Web (Lit)**: Located in `renderers/lit`, this is the primary web renderer used by the demos in `web/`.
- **Angular**: Located in `renderers/angular`, this is an alternative web renderer for Angular applications.
- **Flutter**: The Flutter renderer is in a separate repository: [https://github.com/flutter/genui](https://github.com/flutter/genui). There is a placeholder renderer folder with a README.md file at `renderers/flutter`.
- **Web (Lit)**: Located in `renderers/lit`, this is the primary web renderer used by the demos in `web/`.
- **Angular**: Located in `renderers/angular`, this is an alternative web renderer for Angular applications.
- **Flutter**: The Flutter renderer is in a separate repository: [https://github.com/flutter/genui](https://github.com/flutter/genui). There is a placeholder renderer folder with a README.md file at `renderers/flutter`.

## Keeping This Guide Updated

This document is intended to be a living guide for the repository. As the repository evolves, it's important to keep this file up-to-date. When making changes to the repository, please consider the following:

- **New Demos or Clients**: If you add a new demo or client in `samples/`, add it to the "Running the Demos" section.
- **Specification Changes**: If you make significant changes to the A2UI protocol, ensure that the "A2UI Specification Overview" section is updated.
- **Repository Structure Changes**: If you change the directory structure of the repository, update the "Repository Structure" section.
- **New Demos or Clients**: If you add a new demo or client in `samples/`, add it to the "Running the Demos" section.
- **Specification Changes**: If you make significant changes to the A2UI protocol, ensure that the "A2UI Specification Overview" section is updated.
- **Repository Structure Changes**: If you change the directory structure of the repository, update the "Repository Structure" section.

To get this file back in sync, you can run the following commands:

Expand All @@ -160,4 +163,4 @@ To get this file back in sync, you can run the following commands:

## Change descriptions

If you (the agent) are generating a pull request summary, pull request description, or change description, avoid flowery or hyperbolic terms (e.g. "significantly improves", "greatly enhances", "is an incredible improvement"). Be factual and avoid marketing language: you're not selling the PR, you're describing it.
If you (the agent) are generating a pull request summary, pull request description, or change description, avoid flowery or hyperbolic terms (e.g. "significantly improves", "greatly enhances", "is an incredible improvement"). Be factual and avoid marketing language: you're not selling the PR, you're describing it.
3 changes: 0 additions & 3 deletions .github/ISSUE_TEMPLATE/sprint-task.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,4 @@ about: An issue to track a task used in a sprint
title: ''
labels: P2, sprint ready
assignees: ''

---


2 changes: 1 addition & 1 deletion .github/workflows/auto-assignment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ jobs:
const fileUrl = pathToFileURL(filePath).href;

const importedModule = await import(fileUrl);
await importedModule.default({ github, context });
await importedModule.default({ github, context });
2 changes: 1 addition & 1 deletion .github/workflows/check_license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '1.21'
go-version: "1.21"

- name: Install addlicense
run: go install github.com/google/addlicense@latest
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/composer_build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ name: Composer
on:
push:
paths:
- 'tools/composer/**'
- 'renderers/react/**'
- 'renderers/web_core/**'
- '.github/workflows/composer_build_and_test.yml'
- "tools/composer/**"
- "renderers/react/**"
- "renderers/web_core/**"
- ".github/workflows/composer_build_and_test.yml"
pull_request:
paths:
- 'tools/composer/**'
- 'renderers/react/**'
- 'renderers/web_core/**'
- '.github/workflows/composer_build_and_test.yml'
- "tools/composer/**"
- "renderers/react/**"
- "renderers/web_core/**"
- ".github/workflows/composer_build_and_test.yml"

jobs:
build-and-test:
Expand All @@ -43,9 +43,9 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: '22'
cache: 'pnpm'
cache-dependency-path: 'tools/composer/pnpm-lock.yaml'
node-version: "22"
cache: "pnpm"
cache-dependency-path: "tools/composer/pnpm-lock.yaml"

- name: Build web_core (dependency of @a2ui/react)
working-directory: ./renderers/web_core
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/cpp_agent_sdk_build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ name: A2UI-agent C++ SDK
on:
push:
branches:
- '*'
- "*"
paths:
- 'agent_sdks/cpp/**'
- 'specification/**/json/**'
- 'agent_sdks/conformance/**'
- "agent_sdks/cpp/**"
- "specification/**/json/**"
- "agent_sdks/conformance/**"
pull_request:
paths:
- 'agent_sdks/cpp/**'
- 'specification/**/json/**'
- 'agent_sdks/conformance/**'
- "agent_sdks/cpp/**"
- "specification/**/json/**"
- "agent_sdks/conformance/**"

jobs:
build-and-test:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name: E2E Tests

on:
push:
push:
# Workflow runs on push to any branch in the repo (not forks).
schedule:
- cron: "0 * * * *" # hourly
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/editor_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ name: Editor
on:
push:
paths:
- 'tools/editor/**'
- 'renderers/lit/**'
- 'renderers/web_core/**'
- '.github/workflows/editor_build.yml'
- "tools/editor/**"
- "renderers/lit/**"
- "renderers/web_core/**"
- ".github/workflows/editor_build.yml"
pull_request:
paths:
- 'tools/editor/**'
- 'renderers/lit/**'
- 'renderers/web_core/**'
- '.github/workflows/editor_build.yml'
- "tools/editor/**"
- "renderers/lit/**"
- "renderers/web_core/**"
- ".github/workflows/editor_build.yml"

jobs:
build:
Expand All @@ -38,7 +38,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: '22'
node-version: "22"

- name: Install web_core deps
working-directory: ./renderers/web_core
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/enforce-formatting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Enforce Formatting

on:
push:
branches: [main]
pull_request:

jobs:
enforce-formatting:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6

- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: "22"

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.x"

- name: Install `uv` globally
run: |
python -m pip install --upgrade pip
pip install uv

- name: Run enforce-formatting script
run: ./scripts/fix_format.sh --check
4 changes: 2 additions & 2 deletions .github/workflows/flutter_packages_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ on:
workflow_dispatch:
push:
branches:
- main
- main
pull_request:
branches:
- main
schedule:
# Tests may fail due to new dependency releases.
# Regular execution provides early detection of such regressions.
- cron: '0 * * * *' # hourly
- cron: "0 * * * *" # hourly

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
Loading
Loading