Skip to content

Commit fbc588b

Browse files
committed
docs: refactor MCP Apps guide to use standalone sample and fix conflicts
2 parents 80855cc + a67a0c2 commit fbc588b

625 files changed

Lines changed: 50530 additions & 39448 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.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Copyright 2026 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: A2UI Issue Auto-Assignment
16+
17+
on:
18+
issues:
19+
types: [opened]
20+
21+
permissions:
22+
contents: read
23+
issues: write
24+
25+
jobs:
26+
auto-assign:
27+
runs-on: ubuntu-latest
28+
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v4
32+
33+
- name: Run auto-assignment script
34+
uses: actions/github-script@v7
35+
with:
36+
script: |
37+
const path = require('path');
38+
const { pathToFileURL } = require('url');
39+
40+
const filePath = path.resolve('./scripts/auto-assignment.mjs');
41+
const fileUrl = pathToFileURL(filePath).href;
42+
43+
const importedModule = await import(fileUrl);
44+
await importedModule.default({ github, context });

.github/workflows/composer_build_and_test.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,14 @@ on:
1818
push:
1919
paths:
2020
- 'tools/composer/**'
21+
- 'renderers/react/**'
22+
- 'renderers/web_core/**'
2123
- '.github/workflows/composer_build_and_test.yml'
2224
pull_request:
2325
paths:
2426
- 'tools/composer/**'
27+
- 'renderers/react/**'
28+
- 'renderers/web_core/**'
2529
- '.github/workflows/composer_build_and_test.yml'
2630

2731
jobs:
@@ -43,6 +47,14 @@ jobs:
4347
cache: 'pnpm'
4448
cache-dependency-path: 'tools/composer/pnpm-lock.yaml'
4549

50+
- name: Build web_core (dependency of @a2ui/react)
51+
working-directory: ./renderers/web_core
52+
run: npm ci && npm run build
53+
54+
- name: Build React renderer (local file dependency)
55+
working-directory: ./renderers/react
56+
run: npm ci && npm run build
57+
4658
- name: Install dependencies
4759
working-directory: ./tools/composer
4860
run: pnpm install

.github/workflows/ng_build_and_test.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ jobs:
4343
working-directory: ./samples/client/angular
4444
run: npm run build:renderer
4545

46-
- name: Build contact sample
47-
working-directory: ./samples/client/angular
48-
run: npm run build contact
49-
5046
- name: Build restaurant sample
5147
working-directory: ./samples/client/angular
5248
run: npm run build restaurant

.github/workflows/python_agent_sdk_build_and_test.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@ on:
2121
paths:
2222
- 'agent_sdks/python/**'
2323
- 'specification/**/json/**'
24+
- 'agent_sdks/conformance/**'
2425
pull_request:
2526
paths:
2627
- 'agent_sdks/python/**'
2728
- 'specification/**/json/**'
29+
- 'agent_sdks/conformance/**'
2830

2931
jobs:
3032
build-and-test:
@@ -48,10 +50,18 @@ jobs:
4850
working-directory: agent_sdks/python
4951
run: uv run pyink --check .
5052

53+
- name: Check Formatting for Conformance
54+
working-directory: agent_sdks/conformance
55+
run: uv run --with pyink pyink --check tests/
56+
5157
- name: Run unit tests
5258
working-directory: agent_sdks/python
5359
run: uv run --with pytest pytest tests/
5460

61+
- name: Run conformance YAML validation
62+
working-directory: agent_sdks/conformance
63+
run: uv run pytest
64+
5565
- name: Build the python SDK
5666
working-directory: agent_sdks/python
5767
run: uv build .

.github/workflows/python_samples_build.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@ jobs:
5555
run: |
5656
PYTHONPATH=agent_sdks/python/src uv run --project agent_sdks/python pytest -vv samples/agent/adk/tests/test_examples_validation.py
5757
58-
- name: Build contact_lookup
59-
working-directory: samples/agent/adk/contact_lookup
60-
run: uv build .
61-
6258
- name: Build orchestrator
6359
working-directory: samples/agent/adk/orchestrator
6460
run: uv build .
@@ -68,5 +64,5 @@ jobs:
6864
run: uv build .
6965

7066
- name: Build rizzcharts
71-
working-directory: samples/agent/adk/rizzcharts
67+
working-directory: samples/agent/adk/rizzcharts/python
7268
run: uv build .

.github/workflows/react_renderer.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ jobs:
4747
npm ci
4848
npm run build
4949
50+
- name: Build markdown-it dependency
51+
working-directory: ./renderers/markdown/markdown-it
52+
run: |
53+
npm ci
54+
npm run build
55+
5056
- name: Install React renderer deps
5157
working-directory: ./renderers/react
5258
run: npm ci
@@ -76,6 +82,12 @@ jobs:
7682
npm ci
7783
npm run build
7884
85+
- name: Build markdown-it dependency
86+
working-directory: ./renderers/markdown/markdown-it
87+
run: |
88+
npm ci
89+
npm run build
90+
7991
- name: Install React renderer deps
8092
working-directory: ./renderers/react
8193
run: npm ci
@@ -105,6 +117,12 @@ jobs:
105117
npm ci
106118
npm run build
107119
120+
- name: Build markdown-it dependency
121+
working-directory: ./renderers/markdown/markdown-it
122+
run: |
123+
npm ci
124+
npm run build
125+
108126
- name: Install React renderer deps
109127
working-directory: ./renderers/react
110128
run: npm ci

.github/workflows/web_build_and_test.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,15 @@ jobs:
4545
working-directory: ./renderers/web_core
4646
run: npm run build
4747

48+
- name: Lint web_core
49+
working-directory: ./renderers/web_core
50+
run: npm run lint
51+
4852
- name: Test web_core
4953
working-directory: ./renderers/web_core
5054
run: npm run test
51-
lint:
55+
test-scripts:
56+
runs-on: ubuntu-latest
5257
steps:
5358
- uses: actions/checkout@v6
5459

@@ -57,14 +62,5 @@ jobs:
5762
with:
5863
node-version: '20'
5964

60-
- name: Install web_core dependencies
61-
working-directory: ./renderers/web_core
62-
run: npm i
63-
64-
- name: Build web_core
65-
working-directory: ./renderers/web_core
66-
run: npm run build
67-
68-
- name: Lint web_core
69-
working-directory: ./renderers/web_core
70-
run: npm run lint
65+
- name: Run publish script integration test
66+
run: node --test renderers/scripts/publish_npm.test.mjs

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,7 @@ a2a_agents/python/a2ui_agent/src/a2ui/assets/**/*.json
2424
agent_sdks/python/src/a2ui/assets/**/*.json
2525
## Generated files for sandbox frame.
2626
samples/client/angular/projects/mcp_calculator/public/mcp_apps_inner_iframe/
27+
28+
## Generated files for a2ui-in-mcpapps
29+
samples/agent/mcp/a2ui-in-mcpapps/server/apps/dist
30+
samples/agent/mcp/a2ui-in-mcpapps/server/apps/public

agent_sdks/agent_sdk_guide.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ Implement `CatalogConfig` (and its `Provider`), `A2uiCatalog`, and an `Inference
245245
Implement `generateSystemPrompt`. Verify that it outputs valid Markdown with embedded JSON schemas and examples.
246246

247247
### Step 3: Parsing & Validation
248-
Implement `parseResponse` and validation. Hook up a standard JSON Schema validator for your language. Write unit tests to check if it rejects bad JSON and accepts good JSON.
248+
Implement `parseResponse` and validation. Hook up a standard JSON Schema validator for your language. Use the centralized YAML conformance suite in `agent_sdks/conformance/` to verify that your implementation handles streaming and validation edge cases identically to the reference implementation.
249249

250250
### Step 4: Transport (A2A)
251251
Create the helper utilities to wrap JSON in transport Parts (if needed for your ecosystem).
@@ -268,3 +268,11 @@ The A2UI Agent SDK is a multi-language ecosystem. While features may be implemen
268268
2. **File Sync Issues**: The author or reviewer of the feature **must file issues** for the equivalent feature requests in all other supported languages to ensure they are tracked.
269269
3. **Cross-Referencing**: Link these new issues back to the original Pull Request or issue for context and reference.
270270
4. **Consistency Over Clones**: While implementations should be idiomatic to the target language, they must follow the same architectural patterns (Inference Strategies, Validators, Streaming Parsers) and protocol standards defined in this guide.
271+
272+
---
273+
274+
## 12. Conformance Testing
275+
276+
To ensure behavioral parity across all SDK implementations (Python, Kotlin, etc.), the project maintains a language-agnostic conformance suite.
277+
278+
For detailed information on the suite structure and how to use it in your SDK implementation, see the [Conformance Testing README](conformance/README.md).

agent_sdks/conformance/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Conformance Testing
2+
3+
To ensure behavioral parity across all SDK implementations (Python, Kotlin, etc.), the project maintains a language-agnostic conformance suite in this directory.
4+
5+
## Suite Structure
6+
* `parser.yaml`: Contains test cases for the `A2uiStreamParser`, verifying chunk buffering, incremental yielding, and edge cases like cut tokens.
7+
* `validator.yaml`: Contains test cases for the `A2uiValidator`, verifying structural integrity, cycle detection, and reachability.
8+
* `conformance_schema.json`: The JSON schema that validates the structure of the YAML test files themselves.
9+
10+
## Usage in SDKs
11+
Each language SDK must implement a test harness that:
12+
1. Reads the YAML files.
13+
2. Feeds the inputs to the language's specific implementation of the parser/validator.
14+
3. Asserts that the output matches the expected results defined in the YAML.
15+
16+
Refer to `agent_sdks/python/tests/conformance/test_conformance.py` for a reference implementation of a harness.

0 commit comments

Comments
 (0)