Expand description
Wire-contract constants shared across every A2UI toolkit.
§These values are a cross-language wire contract
Every shipping A2UI toolkit (TypeScript, .NET, Python) hard-codes the same strings, and the .NET constants file declares them a “cross-language wire contract” that “must not diverge”. A renderer written against the TypeScript toolkit will silently fail to see this crate’s output if any of them change.
Do not change these to match a newer spec revision on its own. The A2UI
specification is at v1.0, but the interoperable toolkits still stamp
PROTOCOL_VERSION "v0.9" — so this crate does too. Changing a value here
is a breaking protocol change that has to land in every language at once.
Constants§
- A2UI_
CLOSE_ TAG - Closing tag an LLM wraps a raw A2UI JSON block in.
- A2UI_
OPEN_ TAG - Opening tag an LLM wraps a raw A2UI JSON block in.
- A2UI_
OPERATIONS_ KEY - Envelope key carrying a batch of A2UI operations over the transport.
- A2UI_
RECOVERY_ ACTIVITY_ TYPE - Activity type used to report recovery-loop progress to the caller.
- BASIC_
CATALOG_ ID catalogIdfor the standard basic component catalog.- DEFAULT_
SURFACE_ ID surfaceIdused when the caller does not supply one.- GENERATE_
A2UI_ TOOL_ NAME - Planner-facing tool name: “build me a surface for this request”.
- MAX_
A2UI_ ATTEMPTS - Total generation attempts before the recovery loop gives up.
- MIME_
TYPE - MIME type for a standalone A2UI payload (A2A parts, MCP resources, HTTP bodies).
- PROTOCOL_
VERSION - Value stamped into the
versionfield of every message this crate emits. - RENDER_
A2UI_ TOOL_ NAME - Inner structured-output tool name the generating model calls to emit a surface.
- ROOT_ID
- The
idthe root of a surface’s component tree must have. - SURFACE_
COMPONENT - Component type name reserved for the implicit surface container.