Repository navigation
feat(a2ui): native Google A2UI 1.0 protocol, render_ui tool, and harness event integration - #26
Merged
Merged
Conversation
…or, and render_ui tool Co-authored-by: Hanzo Dev <dev@hanzo.ai>
…ncoming a2ui.action Co-authored-by: Hanzo Dev <dev@hanzo.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds native Google A2UI 1.0 (
version: "v1.0") protocol support, zero-trust Hanzo catalog validation, therender_uiagent tool (plusgen __a2uistdio MCP server), structured harness event emission, and incominga2ui.actionhandling acrosshanzo-gen.Changes
src/a2ui/):createSurface,updateComponents,updateDataModel,deleteSurface,Component,PathBinding,Action,Envelope, and incomingUserAction(a2ui.action).https://hanzo.ai/a2ui/catalog/v1with 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).version == "v1.0", RFC 6901 JSON Pointers starting with/, allowlisted component types, safe URL schemes (rejectingjavascript:,vbscript:,file:,data:text/html,data:image/svg+xml), prototype pollution rejection (__proto__,constructor,prototype), acyclic graph checks, and declarativeaction: { event: { name, context } }.render_uiTool & Stdio MCP Server (src/a2ui/tool.rs,src/main.rs):createSurface), returns actionable validation errors (isError: true) for model self-correction, and emits both fenced ```a2ui markdown blocks and structuredMapped::a2uievents.gen __a2uilightweight zero-dependency stdio MCP server.src/event.rs,src/stream.rs,src/supervise/mod.rs,src/render.rs,src/embedded/,src/control.rs):render_uitool calls and fenced ```a2ui assistant markdown blocks intoOutcome.surfaces/ `EmbeddedTurnResult.surfaces` and forwards `Kind::Log` (`type: "a2ui"`) session events.a2ui.actionpayloads in bothEmbeddedTurnRequest.a2ui_actionandcontrol::Command::from_wire(failing closed on malformed or prototype-polluted payloads).Verification
cargo build --lockedcargo clippy --locked --all-targets -- -D warningscargo test --lockedunder read-onlyHOME, unsetHOME, and empty writableHOME(437 passed, 0 failed, includingtests/filesize.rs).