Skip to content

feat(a2ui): native Google A2UI 1.0 protocol, render_ui tool, and harness event integration - #26

Merged
zeekay merged 2 commits into
mainfrom
feat/a2ui-v1
Nov 28, 2026
Merged

zeekay merged 2 commits into
mainfrom
feat/a2ui-v1

Conversation

@zeekay

@zeekay zeekay commented Nov 28, 2026

Copy link
Copy Markdown
Member

Summary

Adds native Google A2UI 1.0 (version: "v1.0") protocol support, zero-trust Hanzo catalog validation, the render_ui agent tool (plus gen __a2ui stdio MCP server), structured harness event emission, and incoming a2ui.action handling across hanzo-gen.

Changes

  • Canonical A2UI 1.0 Protocol & Validator (src/a2ui/):
    • Wire types for createSurface, updateComponents, updateDataModel, deleteSurface, Component, PathBinding, Action, Envelope, and incoming UserAction (a2ui.action).
    • Default Hanzo catalog https://hanzo.ai/a2ui/catalog/v1 with all 19 allowlisted A2UI 1.0 components (Card, Column, Row, List, Tabs, Modal, Divider, Text, Image, Icon, Badge, Progress, Button, TextField, DateTimeInput, CheckBox, Switch, ChoicePicker, Slider).
    • Zero-trust validator enforcing version == "v1.0", RFC 6901 JSON Pointers starting with /, allowlisted component types, safe URL schemes (rejecting javascript:, vbscript:, file:, data:text/html, data:image/svg+xml), prototype pollution rejection (__proto__, constructor, prototype), acyclic graph checks, and declarative action: { event: { name, context } }.
  • Native render_ui Tool & Stdio MCP Server (src/a2ui/tool.rs, src/main.rs):
    • Validates A2UI 1.0 messages (full messages, batches, or shorthand createSurface), returns actionable validation errors (isError: true) for model self-correction, and emits both fenced ```a2ui markdown blocks and structured Mapped::a2ui events.
    • Exposes gen __a2ui lightweight zero-dependency stdio MCP server.
  • Harness & Embedded Integration (src/event.rs, src/stream.rs, src/supervise/mod.rs, src/render.rs, src/embedded/, src/control.rs):
    • Captures validated A2UI 1.0 surfaces from render_ui tool calls and fenced ```a2ui assistant markdown blocks into Outcome.surfaces / `EmbeddedTurnResult.surfaces` and forwards `Kind::Log` (`type: "a2ui"`) session events.
    • Supports structured incoming a2ui.action payloads in both EmbeddedTurnRequest.a2ui_action and control::Command::from_wire (failing closed on malformed or prototype-polluted payloads).

Verification

  • cargo build --locked
  • cargo clippy --locked --all-targets -- -D warnings
  • cargo test --locked under read-only HOME, unset HOME, and empty writable HOME (437 passed, 0 failed, including tests/filesize.rs).

zeekay and others added 2 commits November 28, 2026 12:00
…or, and render_ui tool

Co-authored-by: Hanzo Dev <dev@hanzo.ai>
…ncoming a2ui.action

Co-authored-by: Hanzo Dev <dev@hanzo.ai>
@zeekay
zeekay merged commit 3665226 into main Nov 28, 2026
6 checks passed
@zeekay
zeekay deleted the feat/a2ui-v1 branch November 28, 2026 20:09
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