Skip to content

feat(python): generate and register v0.8 pydantic models and basic catalog - #2303

Open
nan-yu wants to merge 1 commit into
v1_0from
v1_0_firing_python_5_v08
Open

feat(python): generate and register v0.8 pydantic models and basic catalog#2303
nan-yu wants to merge 1 commit into
v1_0from
v1_0_firing_python_5_v08

Conversation

@nan-yu

@nan-yu nan-yu commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

This PR is part of a stacked PR chain for Python multi-version protocol support:


Description

  • Generates strongly typed Pydantic v2 data models for A2UI spec v0.8 under python/a2ui_core/src/a2ui/core/schema/v0_8/ (constants.py, common_types.py, server_to_client.py, client_to_server.py, client_capabilities.py, __init__.py).
  • Generates standard basic catalog definitions for v0.8 under python/a2ui_core/src/a2ui/core/basic_catalog/v0_8/ (components.py, function_apis.py, styles.py, __init__.py).
  • Registers V0_8 = "v0.8" in A2uiProtocolVersion enum and updates multi-version envelope unions AgentToRendererMessage and RendererToAgentMessage in python/a2ui_core/src/a2ui/core/schema/__init__.py.
  • Deduplicates catalog initialization generator in codegen_pydantic.py and conditions function implementation imports on whether the specification version defines catalog functions (dir_name != "v0_8").

TAG=agy
CONV=707c9b6b-b2da-4940-ba6e-67f0b4f1d563

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds support for version v0.8 of the A2UI protocol schema and basic catalog, updating the Pydantic model generator to conditionally handle versions without function implementations. Feedback on these changes suggests dynamically checking for the presence of functions in the generator instead of hardcoding a version check, and updating the generator to skip creating empty function_apis.py files to avoid linter errors due to unused imports.

Comment thread .agents/skills/a2ui-generate-pydantic-models/scripts/codegen_pydantic.py Outdated
Comment thread python/a2ui_core/src/a2ui/core/basic_catalog/v0_8/function_apis.py Outdated
@nan-yu
nan-yu force-pushed the v1_0_firing_python_5_v08 branch 2 times, most recently from 64948a0 to a933915 Compare August 17, 2026 18:15
@nan-yu
nan-yu force-pushed the v1_0_firing_python_5_v08 branch from a933915 to 06131a0 Compare August 17, 2026 21:40
@nan-yu
nan-yu force-pushed the v1_0_firing_python_5_v08 branch from 06131a0 to 5f75801 Compare August 17, 2026 21:57
@nan-yu
nan-yu force-pushed the v1_0_firing_python_5_v08 branch from 5f75801 to d8ee64d Compare August 17, 2026 22:00
@nan-yu
nan-yu force-pushed the v1_0_firing_python_5_v08 branch from d8ee64d to 9701458 Compare August 17, 2026 22:03
@nan-yu
nan-yu force-pushed the v1_0_firing_python_5_v08 branch from 9701458 to 4746d91 Compare August 17, 2026 22:07
@nan-yu
nan-yu force-pushed the v1_0_firing_python_5_v08 branch from 4746d91 to b50373f Compare August 17, 2026 22:31
@nan-yu
nan-yu force-pushed the v1_0_firing_python_5_v08 branch 2 times, most recently from 609d626 to 9298327 Compare August 17, 2026 22:39
@nan-yu
nan-yu force-pushed the v1_0_firing_python_5_v08 branch from 9298327 to 7de06a1 Compare August 17, 2026 22:42
@nan-yu
nan-yu force-pushed the v1_0_firing_python_5_v08 branch from 7de06a1 to 38d9e02 Compare August 17, 2026 23:38
@nan-yu
nan-yu force-pushed the v1_0_firing_python_5_v08 branch from 38d9e02 to 46ad2cf Compare August 18, 2026 00:43
@nan-yu
nan-yu force-pushed the v1_0_firing_python_5_v08 branch from 46ad2cf to 12b9236 Compare August 18, 2026 01:18
@nan-yu
nan-yu force-pushed the v1_0_firing_python_5_v08 branch from 12b9236 to ba9f68f Compare August 18, 2026 04:07
@nan-yu
nan-yu force-pushed the v1_0_firing_python_5_v08 branch from ba9f68f to f727a2e Compare August 18, 2026 04:11
@nan-yu
nan-yu force-pushed the v1_0_firing_python_5_v08 branch from f727a2e to 8d96fc1 Compare August 18, 2026 04:26
@nan-yu
nan-yu force-pushed the v1_0_firing_python_5_v08 branch from 8d96fc1 to 8a5849d Compare August 18, 2026 04:36
Base automatically changed from v1_0_firing_python_4_v09 to v1_0 August 18, 2026 04:47
…talog

- Generated strongly typed Pydantic v2 data models for A2UI spec v0.8 under `python/a2ui_core/src/a2ui/core/schema/v0_8/` (`constants.py`, `common_types.py`, `server_to_client.py`, `client_to_server.py`, `client_capabilities.py`, `__init__.py`).
- Generated standard basic catalog definitions for v0.8 under `python/a2ui_core/src/a2ui/core/basic_catalog/v0_8/` (`components.py`, `styles.py`, `__init__.py`).
- Registered `V0_8 = "v0.8"` in `A2uiProtocolVersion` enum and updated multi-version envelope unions `AgentToRendererMessage` and `RendererToAgentMessage` in `python/a2ui_core/src/a2ui/core/schema/__init__.py`.
- Deduplicated catalog initialization generation in `codegen_pydantic.py`, dynamically checked catalog function definitions via `bool(functions)`, and skipped generating empty `function_apis.py`.

TAG=agy
CONV=707c9b6b-b2da-4940-ba6e-67f0b4f1d563
@nan-yu
nan-yu force-pushed the v1_0_firing_python_5_v08 branch from 8a5849d to 67176e9 Compare August 18, 2026 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant