feat(macos): add Canvas A2UI renderer

This commit is contained in:
Peter Steinberger
2025-12-17 11:35:06 +01:00
parent 1cdebb68a0
commit cdb5ddb2da
408 changed files with 73598 additions and 32 deletions

79
vendor/a2ui/.github/workflows/docs.yml vendored Normal file
View File

@@ -0,0 +1,79 @@
# Copyright 2025 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: Docs Build and Deploy
on:
push:
branches:
- main
paths:
- ".github/workflows/docs.yml"
- "requirements-docs.txt"
- "mkdocs.yml"
- "docs/**"
pull_request:
branches:
- main
paths:
- ".github/workflows/docs.yml"
- "requirements-docs.txt"
- "mkdocs.yml"
- "docs/**"
jobs:
build_and_deploy:
runs-on: ubuntu-latest
permissions:
contents: write
actions: read
if: github.repository == 'google/A2UI'
steps:
- name: Checkout Code
uses: actions/checkout@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Configure Git Credentials
run: |
git config --global user.name github-actions[bot]
git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: 3.13
- name: Restore pip cache
uses: actions/cache@v4
with:
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-docs.txt') }}
path: ~/.cache/pip
restore-keys: |
${{ runner.os }}-pip-
- name: Install documentation dependencies
run: pip install -r requirements-docs.txt
- name: Build Documentation (PR Check)
if: github.event_name == 'pull_request'
run: mkdocs build
- name: Deploy development version from main branch
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
mkdocs gh-deploy

View File

@@ -0,0 +1,55 @@
# Copyright 2025 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: Editor build
on:
push:
paths:
- 'tools/editor/**'
- 'renderers/lit/**'
- '.github/workflows/editor_build.yml'
pull_request:
paths:
- 'tools/editor/**'
- 'renderers/lit/**'
- '.github/workflows/editor_build.yml'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install lib's deps
working-directory: ./renderers/lit
run: npm ci
- name: Build lib
working-directory: ./renderers/lit
run: npm run build
- name: Install editor deps
working-directory: ./tools/editor
run: npm install
- name: Build editor
working-directory: ./tools/editor
run: npm run build

View File

@@ -0,0 +1,56 @@
# Copyright 2025 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: Inspector build
on:
push:
branches: [ main ]
paths:
- 'tools/inspector/**'
- 'renderers/lit/**'
- '.github/workflows/inspector_build.yml'
pull_request:
paths:
- 'tools/inspector/**'
- 'renderers/lit/**'
- '.github/workflows/inspector_build.yml'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install lib's deps
working-directory: ./renderers/lit
run: npm ci
- name: Build lib
working-directory: ./renderers/lit
run: npm run build
- name: Install inspector deps
working-directory: ./tools/inspector
run: npm install
- name: Build inspector
working-directory: ./tools/inspector
run: npm run build

View File

@@ -0,0 +1,48 @@
# Copyright 2025 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: Java sample build and test
on:
push:
branches:
- main
paths:
- 'a2a_agents/java/**'
pull_request:
paths:
- 'a2a_agents/java/**'
jobs:
build-and-test:
name: Build and test Java agent sample
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
- name: Build with Maven
working-directory: a2a_agents/java
run: mvn clean install
- name: Run Tests
working-directory: a2a_agents/java
run: mvn test

View File

@@ -0,0 +1,54 @@
# Copyright 2025 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: Lit samples build
on:
push:
branches: [ main ]
paths-ignore:
- 'samples/agent/adk/**'
pull_request:
paths-ignore:
- 'samples/agent/adk/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install lib's deps
working-directory: ./renderers/lit
run: npm i
- name: Build lib
working-directory: ./renderers/lit
run: npm run build
- name: Install all lit samples workspaces' dependencies
working-directory: ./samples/client/lit
run: npm install --workspaces
- name: Build all lit samples workspaces
working-directory: ./samples/client/lit
run: npm run build --workspaces

View File

@@ -0,0 +1,72 @@
# Copyright 2025 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: Angular build and test
on:
push:
branches: [ main ]
paths-ignore:
- 'samples/agent/adk/**'
pull_request:
paths-ignore:
- 'samples/agent/adk/**'
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install web lib deps
working-directory: ./renderers/lit
run: npm i
- name: Build web lib
working-directory: ./renderers/lit
run: npm run build
- name: Install renderer deps
working-directory: ./renderers/angular
run: npm i
- name: Build Angular renderer
working-directory: ./renderers/angular
run: npm run build
- name: Install top-level deps
working-directory: ./samples/client/angular
run: npm i
- name: Build contact sample
working-directory: ./samples/client/angular
run: npm run build contact
- name: Build restaurant sample
working-directory: ./samples/client/angular
run: npm run build restaurant
- name: Build Rizzchart sample
working-directory: ./samples/client/angular
run: npm run build rizzcharts
- name: Build Orchestrator
working-directory: ./samples/client/angular
run: npm run build orchestrator

View File

@@ -0,0 +1,62 @@
# Copyright 2025 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: Build python samples
on:
push:
branches:
- main
paths:
- 'samples/agent/adk/**'
- 'a2a_agents/python/a2ui_extension/**'
pull_request:
paths:
- 'samples/agent/adk/**'
- 'a2a_agents/python/a2ui_extension/**'
jobs:
build:
name: Build samples
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install `uv` globally
run: |
python -m pip install --upgrade pip
pip install uv
- name: Build contact_lookup
working-directory: samples/agent/adk/contact_lookup
run: uv build .
- name: Build orchestrator
working-directory: samples/agent/adk/orchestrator
run: uv build .
- name: Build restaurant_finder
working-directory: samples/agent/adk/restaurant_finder
run: uv build .
- name: Build rizzcharts
working-directory: samples/agent/adk/rizzcharts
run: uv build .

View File

@@ -0,0 +1,50 @@
# Copyright 2025 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: Lit renderer build and test
on:
push:
branches: [ main ]
paths:
- 'renderers/lit/**'
- '.github/workflows/web_build_and_test.yml'
pull_request:
paths:
- 'renderers/lit/**'
- '.github/workflows/web_build_and_test.yml'
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Lit renderer dependencies
working-directory: ./renderers/lit
run: npm i
- name: Build Lit renderer
working-directory: ./renderers/lit
run: npm run build
- name: Run Lit renderer tests
working-directory: ./renderers/lit
run: npm test