Skip to content

Commit bbaefd0

Browse files
Merge branch 'main' into add-react-renderer
2 parents b27555c + d5580b4 commit bbaefd0

File tree

175 files changed

+17384
-15979
lines changed

Some content is hidden

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

175 files changed

+17384
-15979
lines changed

.gemini/GEMINI.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ The A2UI repository is organized into several key directories:
2525
- `java/`: Java implementation of the A2UI agent library.
2626
- `renderers/`: Contains renderer libraries.
2727
- `lit/`: The shared Lit renderer library used by the Lit clients.
28+
- `web_core/`: The shared core library used by Lit and Angular renderers.
2829
- `tools/`: Helper tools for development.
2930
- `editor/`: A web-based editor for generating and visualizing A2UI.
3031
- `inspector/`: A web-based inspector for A2UI responses.
@@ -69,9 +70,13 @@ Ensure you have your environment variables set up (create a `.env` file if neces
6970
The Lit clients are located in `samples/client/lit/`.
7071

7172
1. **Build the Renderer**:
72-
First, ensure the shared renderer is built:
73+
First, ensure the shared renderers are built:
7374
```bash
74-
cd renderers/lit
75+
cd renderers/web_core
76+
npm install
77+
npm run build
78+
79+
cd ../lit
7580
npm install
7681
npm run build
7782
```
@@ -88,6 +93,18 @@ The Lit clients are located in `samples/client/lit/`.
8893

8994
The Angular clients are located in `samples/client/angular/`.
9095

96+
First, ensure the shared renderers are built (if not already done):
97+
```bash
98+
cd renderers/web_core
99+
npm install
100+
npm run build
101+
102+
cd ../lit
103+
npm install
104+
npm run build
105+
```
106+
107+
Then run the Angular client:
91108
```bash
92109
cd samples/client/angular
93110
npm install

.github/workflows/docs.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ jobs:
6969
- name: Install documentation dependencies
7070
run: pip install -r requirements-docs.txt
7171

72+
- name: Validate documentation conversion script
73+
run: pip install pytest && pytest docs/scripts/test_convert_docs.py
74+
75+
- name: Convert Admonitions in Documentation
76+
run: python docs/scripts/convert_docs.py --mode github-to-mkdocs
77+
7278
- name: Build Documentation (PR Check)
7379
if: github.event_name == 'pull_request'
7480
run: mkdocs build

.github/workflows/editor_build.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ on:
1919
paths:
2020
- 'tools/editor/**'
2121
- 'renderers/lit/**'
22+
- 'renderers/web_core/**'
2223
- '.github/workflows/editor_build.yml'
2324
pull_request:
2425
paths:
2526
- 'tools/editor/**'
2627
- 'renderers/lit/**'
28+
- 'renderers/web_core/**'
2729
- '.github/workflows/editor_build.yml'
2830

2931
jobs:
@@ -38,6 +40,14 @@ jobs:
3840
with:
3941
node-version: '20'
4042

43+
- name: Install web_core deps
44+
working-directory: ./renderers/web_core
45+
run: npm ci
46+
47+
- name: Build web_core
48+
working-directory: ./renderers/web_core
49+
run: npm run build
50+
4151
- name: Install lib's deps
4252
working-directory: ./renderers/lit
4353
run: npm ci

.github/workflows/inspector_build.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@ on:
2020
paths:
2121
- 'tools/inspector/**'
2222
- 'renderers/lit/**'
23+
- 'renderers/web_core/**'
2324
- '.github/workflows/inspector_build.yml'
2425
pull_request:
2526
paths:
2627
- 'tools/inspector/**'
2728
- 'renderers/lit/**'
29+
- 'renderers/web_core/**'
2830
- '.github/workflows/inspector_build.yml'
2931

3032
jobs:
@@ -39,6 +41,14 @@ jobs:
3941
with:
4042
node-version: '20'
4143

44+
- name: Install web_core deps
45+
working-directory: ./renderers/web_core
46+
run: npm ci
47+
48+
- name: Build web_core
49+
working-directory: ./renderers/web_core
50+
run: npm run build
51+
4252
- name: Install lib's deps
4353
working-directory: ./renderers/lit
4454
run: npm ci

.github/workflows/lit_samples_build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ jobs:
3535
with:
3636
node-version: '20'
3737

38+
- name: Install web_core deps
39+
working-directory: ./renderers/web_core
40+
run: npm ci
41+
42+
- name: Build web_core
43+
working-directory: ./renderers/web_core
44+
run: npm run build
45+
3846
- name: Install lib's deps
3947
working-directory: ./renderers/lit
4048
run: npm i

.github/workflows/ng_build_and_test.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ jobs:
3535
with:
3636
node-version: '20'
3737

38+
- name: Install web_core dependencies
39+
working-directory: ./renderers/web_core
40+
run: npm i
41+
42+
- name: Build web_core
43+
working-directory: ./renderers/web_core
44+
run: npm run build
45+
3846
- name: Install web lib deps
3947
working-directory: ./renderers/lit
4048
run: npm i

.github/workflows/web_build_and_test.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ on:
1919
branches: [ main ]
2020
paths:
2121
- 'renderers/lit/**'
22+
- 'renderers/web_core/**'
2223
- '.github/workflows/web_build_and_test.yml'
2324
pull_request:
2425
paths:
2526
- 'renderers/lit/**'
27+
- 'renderers/web_core/**'
2628
- '.github/workflows/web_build_and_test.yml'
2729

2830
jobs:
@@ -37,6 +39,14 @@ jobs:
3739
with:
3840
node-version: '20'
3941

42+
- name: Install web_core dependencies
43+
working-directory: ./renderers/web_core
44+
run: npm i
45+
46+
- name: Build web_core
47+
working-directory: ./renderers/web_core
48+
run: npm run build
49+
4050
- name: Install Lit renderer dependencies
4151
working-directory: ./renderers/lit
4252
run: npm i

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ dist
55
.env
66
.idx
77
.vscode
8+
.idea
89
__pycache__
910
*.pyc
1011
.angular

README.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ to generate or populate rich user interfaces.
99

1010
*A gallery of A2UI rendered cards, showing a variety of UI compositions that A2UI can achieve.*
1111

12-
## ⚠️ Status: Early Stage Public Preview
12+
## ⚠️ Status: Early stage public preview
1313

1414
> **Note:** A2UI is currently in **v0.8 (Public Preview)**. The specification and
1515
implementations are functional but are still evolving. We are opening the project to
@@ -30,7 +30,7 @@ component library (Flutter, Angular, Lit, etc.).
3030
This approach ensures that agent-generated UIs are
3131
**safe like data, but expressive like code**.
3232

33-
## High-Level Philosophy
33+
## High-level philosophy
3434

3535
A2UI was designed to address the specific challenges of interoperable,
3636
cross-platform, generative or template-based UI responses from agents.
@@ -63,7 +63,7 @@ places security firmly in the developer's hands, enabling them to enforce
6363
strict sandboxing policies and "trust ladders" directly within their custom
6464
component logic rather than relying solely on the core system.
6565

66-
## Use Cases
66+
## Use cases
6767

6868
Some of the use cases include:
6969

@@ -98,7 +98,7 @@ A2UI is designed to be a lightweight format, but it fits into a larger ecosystem
9898
* **Host Frameworks:** Requires a host application built in a supported framework
9999
(currently: Web or Flutter).
100100

101-
## Getting Started
101+
## Getting started
102102

103103
The best way to understand A2UI is to run the samples.
104104

@@ -108,7 +108,7 @@ The best way to understand A2UI is to run the samples.
108108
* Python (for agent samples)
109109
* A valid [Gemini API Key](https://aistudio.google.com/) is required for the samples.
110110

111-
### Running the Restaurant Finder Demo
111+
### Running the Restaurant Finder demo
112112

113113
1. **Clone the repository:**
114114

@@ -117,7 +117,7 @@ The best way to understand A2UI is to run the samples.
117117
cd A2UI
118118
```
119119

120-
2. **Set your API Key:**
120+
2. **Set your API key:**
121121

122122
```bash
123123
export GEMINI_API_KEY="your_gemini_api_key"
@@ -134,8 +134,13 @@ The best way to understand A2UI is to run the samples.
134134
Open a new terminal window:
135135

136136
```bash
137+
# Install and build the Web Core library
138+
cd renderers/web_core
139+
npm install
140+
npm run build
141+
137142
# Install and build the Lit renderer
138-
cd renderers/lit
143+
cd ../lit
139144
npm install
140145
npm run build
141146
@@ -155,10 +160,10 @@ to try out as well.
155160

156161
We hope to work with the community on the following:
157162

158-
* **Spec Stabilization:** Moving towards a v1.0 specification.
159-
* **More Renderers:** Adding official support for React, Jetpack Compose, iOS (SwiftUI), and more.
160-
* **Additional Transports:** Support for REST and more.
161-
* **Additional Agent Frameworks:** Genkit, LangGraph, and more.
163+
* **Spec stabilization:** Moving towards a v1.0 specification.
164+
* **More renderers:** Adding official support for React, Jetpack Compose, iOS (SwiftUI), and more.
165+
* **Additional transports:** Support for REST and more.
166+
* **Additional Agent frameworks:** Genkit, LangGraph, and more.
162167

163168
## Contribute
164169

a2a_agents/python/a2ui_agent/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# A2UI Agent Implementation
1+
# A2UI Agent implementation
22

33
The `a2a_agents/python/a2ui_agent/` is the Python implementation of the a2ui agent library.
44

5-
### Extension Components (`src/a2ui/extension`)
5+
### Extension components (`src/a2ui/extension`)
66

77
The `src/a2ui/extension` directory contains the core logic for the A2UI agent extension:
88

99
* **`a2ui_extension.py`**: Core utilities for extension management and A2UI part handling.
1010
* **`a2ui_schema_utils.py`**: Schema manipulation helpers.
1111
* **`send_a2ui_to_client_toolset.py`**: An example implementation of using ADK toolcalls to implement A2UI.
1212

13-
## Running Tests
13+
## Running tests
1414

1515
1. Navigate to the a2ui_agent dir:
1616

@@ -40,4 +40,4 @@ All operational data received from an external agent—including its AgentCard,
4040

4141
Similarly, any UI definition or data stream received must be treated as untrusted. Malicious agents could attempt to spoof legitimate interfaces to deceive users (phishing), inject malicious scripts via property values (XSS), or generate excessive layout complexity to degrade client performance (DoS). If your application supports optional embedded content (such as iframes or web views), additional care must be taken to prevent exposure to malicious external sites.
4242

43-
Developer Responsibility: Failure to properly validate data and strictly sandbox rendered content can introduce severe vulnerabilities. Developers are responsible for implementing appropriate security measures—such as input sanitization, Content Security Policies (CSP), strict isolation for optional embedded content, and secure credential handling—to protect their systems and users.
43+
Developer Responsibility: Failure to properly validate data and strictly sandbox rendered content can introduce severe vulnerabilities. Developers are responsible for implementing appropriate security measures—such as input sanitization, Content Security Policies (CSP), strict isolation for optional embedded content, and secure credential handling—to protect their systems and users.

0 commit comments

Comments
 (0)