Skip to main content

Module constants

Module constants 

Source
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
catalogId for the standard basic component catalog.
DEFAULT_SURFACE_ID
surfaceId used 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 version field 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 id the root of a surface’s component tree must have.
SURFACE_COMPONENT
Component type name reserved for the implicit surface container.