Skip to content

chore!: depend on a2ui_core 0.2.2; bump genui and genui_a2a to 0.11.0 - #1054

Open
andrewkolos wants to merge 20 commits into
flutter:mainfrom
andrewkolos:a2ui-core-0.2.2
Open

andrewkolos wants to merge 20 commits into
flutter:mainfrom
andrewkolos:a2ui-core-0.2.2

Conversation

@andrewkolos

@andrewkolos andrewkolos commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

a2ui_agent 0.0.1-wip004 requires a2ui_core: ^0.2.2 and genui requires ^0.1.0, so an app that depends on both cannot resolve. This moves genui, genui_a2a and the workspace apps to a2ui_core 0.2.2, and bumps genui and genui_a2a up anothe minor version because the message type in their API is renamed.

What changes for users is in the genui CHANGELOG and the new migration guide (docs/usage/migration/migration_0.10.x_to_0.11.0.md). In short:

  • A2uiMessage is AgentToRendererMessage in A2uiMessageSink, Transport, A2uiTransportAdapter, A2uiMessageEvent and A2uiAgentConnector.stream.
  • a2ui_core validates each message before applying it, so a message with a component that does not match its catalog's schema is rejected whole instead of rendered. Duplicate ids, cycles through child or children, over-deep nesting and invalid data paths are rejected too. Each is reported to the agent as VALIDATION_FAILED with a path.
  • A surface whose catalog the controller does not hold renders nothing instead of a fallback widget, and each component update sent to it is reported.
  • Tabs items accept the specification's title/child as well as genui's label/content.
  • Smaller data model changes: a write below a primitive throws, and subscribers no longer fire for an unchanged value.

Misc: The weatherForecast sample (catalog_gallery and composer) used icon names that are in no catalog (cloud, wbSunny, rainy), so a2ui_core rejected it; it now shows each day's condition as text.

Tested: flutter analyze --fatal-infos and flutter test pass in every workspace package, and tool/e2e passes.

  • I signed the CLA.
  • I read the Contributors Guide.
  • I have added updates to the changelog.
  • I updated/added relevant documentation (doc comments with ///).
  • If my PR is a fork PR, I've checked that e2e tests passed.

a2ui_agent 0.0.1-wip004 requires a2ui_core ^0.2.2, and genui's ^0.1.0
constraint keeps an app that depends on both from resolving.

- A2uiMessage is AgentToRendererMessage, Catalog takes a function type
  parameter, and MessageProcessor takes the protocol version and a
  message payload. The controller runs it with the relaxed graph checks,
  because a surface reaches it one message at a time.
- The processor validates each message before applying it, so a schema
  error now arrives as a core A2uiValidationError. The controller reports
  it with the component path genui's own validation gave, and maps every
  other core error to VALIDATION_FAILED.
- Tests follow the core's contracts: a write below a primitive throws, a
  surface naming an unknown catalog is reported instead of rendered as a
  fallback, and surfaces name a catalog the controller holds. Four
  catalog_gallery samples that do not match genui's schemas (spec-named
  Tabs items, an icon outside the enum) are skipped with the reason.
Keeps 0.11.0 above main's 0.10.6 and 0.10.5 in the genui CHANGELOG, and version 0.11.0 in its pubspec.
VALIDATION_FAILED requires a path, but duplicate ids, cycles and invalid
path syntax reached the agent without one. Report the component an error
names, else the data path, else the part of the message that failed.
…docs

The CHANGELOG now lists every behavior change the a2ui_core 0.2.2 upgrade
brings to genui and links the migration guide. The READMEs, genui_a2a's
design notes and the contributing design doc use AgentToRendererMessage.
genui's Tabs schema named the item fields label and content, while the
v0.9 basic catalog names them title and child. Now that a2ui_core
rejects a message that does not match the schema, Tabs from an agent
following the specification were dropped. The three gallery samples
that use the specification's names render again.
Keeps 0.11.0 above main's 0.10.7 in the genui CHANGELOG, and version 0.11.0 in its pubspec.
A message with one invalid component leaves the surface unchanged, and an update that omits the component type is still applied.
The Tabs entry says what changed rather than implying 0.10.x rejected the specification's names, the rejection list names the cycle, depth and nesting limits and that cycles through children lists go undetected, and data model updates to an unknown catalog still apply. The migration guide says every app should check its agent's output against the stricter validation.
# Conflicts:
#	packages/genui/CHANGELOG.md
#	packages/genui/pubspec.yaml
The sample's day icons used names that are in no catalog (cloud,
wbSunny, rainy), so a2ui_core rejected the message and the sample
rendered nothing. Show each day's condition as a Text label instead, in
both the gallery and composer copies, and render every sample again.
The state, validation and data error branches built the same report as the A2uiError branch below them.
The schema requires title and child, and a2ui_core rejects any other spelling before the widget builds, so the label and content fallbacks could not run.
…d child

The schema now takes either the specification's title and child or the
label and content genui used before, so agents that learned genui's
earlier schema keep working. The specification's names come first.
…y validation is for

processMessages throws only a2ui_core errors, so the A2uiValidationException branch never ran.
…ough them

genui's children schema was an inline list-or-template that a2ui_core did
not recognize as component references, so a cycle through Row, Column or
List children passed validation and overflowed the stack when built. It
now references the specification's ChildList, which accepts the same
shapes, and the cycle is rejected and reported.

@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 upgrades the a2ui_core dependency to ^0.2.2 and updates genui and genui_a2a to version 0.11.0. The key changes include renaming A2uiMessage to AgentToRendererMessage across the codebase, introducing stricter message validation in SurfaceController with detailed error path reporting, and updating the Tabs component to support title and child properties while maintaining backward compatibility for label and content. Feedback on the changes suggests correcting a test description in error_reporting_test.dart to accurately reflect that AgentToRendererMessage.fromJson asserts A2uiValidationError rather than A2uiValidationException.

Note: Security Review did not run due to the size of the PR.

Comment thread packages/genui/test/error_reporting_test.dart Outdated
The workspace constraint check counted packages/archive/a2ui_core (0.1.0)
as the local a2ui_core, so raising genui's constraint to ^0.2.2 failed it.
The archived packages are not workspace members.
@andrewkolos
andrewkolos marked this pull request as ready for review October 2, 2026 14:51
@andrewkolos
andrewkolos requested a review from polina-c October 2, 2026 14:53

@polina-c polina-c left a comment

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.

Thank you!

@davidlondono davidlondono left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LFTM

This branch has not been deployed

No deployments
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.

3 participants