Expand description
The three JSON Schema documents that describe a surface, and surgery on them.
A2UI v0.9 splits its schema into three files that travel together:
- server-to-client — the message envelopes;
- common types —
ComponentId,ChildList, theDynamic*bindings; - catalog — the components and functions themselves.
SchemaBundle holds all three, because everything you do with one you do
with all three: put them in a prompt, restrict them to a subset of
components, hand them to a validator.
§Why prune
The whole point of the v0.9 “prompt-first” design is that the schema goes
into the model’s context. That context is finite, and an agent usually wants
the model to use ten components rather than the catalog’s eighty. Pruning is
how you say so: SchemaBundle::prune keeps the components (or messages)
you allow and then walks $refs to drop every type that nothing kept still
refers to — including transitively, so a shared type survives exactly as long
as something still points at it.
Structs§
- Schema
Bundle - The three schema documents describing one surface contract.
Constants§
- SCHEMA_
BLOCK_ END - Closing marker of the prompt’s schema block.
- SCHEMA_
BLOCK_ START - Markers around the schema block in a generated prompt.
Functions§
- load_
examples - Loads few-shot examples for a prompt.
- remove_
strict_ validation - Removes every
additionalProperties: false, recursively.