# A2UICore v0.1.1 - Table of Contents ## Pages - [A2UICore](readme.md) - [Changelog](changelog.md) - [LICENSE](license.md) - Guides - [Processing messages](processing_messages.md) ## Modules - [A2UICore.Catalog.Document](A2UICore.Catalog.Document.md): Reads a catalog document into the parts of an `A2UICore.Catalog` (`parse/2`) and writes those parts back as a document (`build/1`), so that `build(parse(document))` equals `document`, apart from the components and functions that `$defs.anyComponent` / `$defs.anyFunction` leave out. - [A2UICore.Catalog.MCP](A2UICore.Catalog.MCP.md): The A2UI MCP catalog, ready to evaluate: the catalog through which a surface calls [Model Context Protocol](https://modelcontextprotocol.io) tools. - [A2UICore.Catalog.Refs](A2UICore.Catalog.Refs.md): `$ref` handling for catalog documents. - [A2UICore.Catalog.SchemaCleaner](A2UICore.Catalog.SchemaCleaner.md): Normalizes the schema nodes a catalog's validation schema is assembled from, as the reference catalog does before bundling common types - [A2UICore.Catalog.ValidationSchema](A2UICore.Catalog.ValidationSchema.md): Builds a catalog's validation schema: the self-contained JSON Schema messages are validated against (the reference's `Catalog.validation_schema`). - [A2UICore.Functions.MCP](A2UICore.Functions.MCP.md): Implementations of the MCP catalog's functions (see `A2UICore.Catalog.MCP`). - [A2UICore.JMESPath](A2UICore.JMESPath.md): [JMESPath](https://jmespath.org/specification.html) queries over JSON data: the engine behind the MCP catalog's `jmespath` function. - [A2UICore.KeyOrder](A2UICore.KeyOrder.md): JSON values whose objects keep their key order, as `Jason.OrderedObject`s, for writing a document in a given order: `Jason.encode!/1` writes an ordered object's keys in order, and a map's in the map's own order. - [A2UICore.MCP](A2UICore.MCP.md): Reading A2UI out of [Model Context Protocol](https://modelcontextprotocol.io) values: the A2UI messages a tool result or a resource carries, the UI resources a tool or a result names, and the MCP Apps a resource holds. - [A2UICore.MCP.Client](A2UICore.MCP.Client.md): A connection to a [Model Context Protocol](https://modelcontextprotocol.io) server, as the MCP catalog's functions use it. - [A2UICore.Validation.NestedCalls](A2UICore.Validation.NestedCalls.md): Checks the function calls nested in a v1.0 `updateComponents` batch against the catalogs they run in, before anything is committed. - Processing - [A2UICore](A2UICore.md): Elixir implementation of the [A2UI protocol](https://a2ui.org/) core engine: versioned message envelopes, catalog schemas, surface state, data model, and processing of agent-to-renderer updates. - [A2UICore.Error](A2UICore.Error.md): The single error struct used across the A2UI packages. - [A2UICore.Error.Detail](A2UICore.Error.Detail.md): A single structured diagnostic entry attached to an `A2UICore.Error`. - [A2UICore.Processor](A2UICore.Processor.md): Applies agent→renderer messages to a set of surfaces. - [A2UICore.RPC](A2UICore.RPC.md): The function RPC of protocol v1.0, as a value. - Messages - [A2UICore.Message](A2UICore.Message.md): Wire messages: decode raw agent→renderer payloads into canonical `A2UICore.Message.Operation` structs, and encode operations back to wire-format maps. - [A2UICore.Message.Adapter](A2UICore.Message.Adapter.md): Version adapter behaviour and the shared envelope-extraction pipeline. - [A2UICore.Message.AdapterRegistry](A2UICore.Message.AdapterRegistry.md): Resolves version adapters from version strings and raw payloads — a faithful port of the reference `VersionAdapterFactory`, including its error detail paths (`messages.0.version`, …). - [A2UICore.Message.Operation](A2UICore.Message.Operation.md): Version-neutral operations: what `A2UICore.Message.decode/2` returns and `A2UICore.Processor.apply_operations/3` applies. - [A2UICore.Message.Operation.AgentFunctionResponse](A2UICore.Message.Operation.AgentFunctionResponse.md): An `agentFunctionResponse` message (v1.0): the agent's answer to the renderer's call `function_call_id`, either a `value` or an `error` map with `"code"` and `"message"`. - [A2UICore.Message.Operation.CallRendererFunction](A2UICore.Message.Operation.CallRendererFunction.md): A `callRendererFunction` message (v1.0): the agent asks the renderer to run function `call` with `args`, from the catalog `catalog_id`, in the context of surface `surface_id` (or of no surface when `nil`). The answer must carry `function_call_id`. - [A2UICore.Message.Operation.CreateSurface](A2UICore.Message.Operation.CreateSurface.md): A `createSurface` message: a new surface, the catalog it uses (`catalog_id`) and whether the renderer sends its data model back (`send_data_model`). `theme` is kept for v0.9 messages only. A v1.0 message may carry the surface's first `components` and `data_model`. - [A2UICore.Message.Operation.DeleteSurface](A2UICore.Message.Operation.DeleteSurface.md): A `deleteSurface` message. - [A2UICore.Message.Operation.UpdateComponents](A2UICore.Message.Operation.UpdateComponents.md): An `updateComponents` message: components to add to a surface or replace in it, as the wire maps. - [A2UICore.Message.Operation.UpdateDataModel](A2UICore.Message.Operation.UpdateDataModel.md): An `updateDataModel` message: `value` written at `path` (the root by default) of a surface's data model. A `nil` value deletes. - [A2UICore.Message.RendererToAgent](A2UICore.Message.RendererToAgent.md): Builders for the messages a renderer sends to the agent (`renderer_to_agent.json`) - Catalogs - [A2UICore.Catalog](A2UICore.Catalog.md): A versioned set of component and function definitions: the model of a catalog document. - [A2UICore.Catalog.Basic](A2UICore.Catalog.Basic.md): The basic catalog of a protocol version, ready to evaluate. - [A2UICore.Catalog.Component](A2UICore.Catalog.Component.md): A component a catalog declares: the name a message uses and its JSON Schema as the catalog document writes it (with its `allOf` mixins and references), plus the v1.0 composition constraints (`allowedParents`, `allowedChildren`). - [A2UICore.Catalog.Function](A2UICore.Catalog.Function.md): A function a catalog declares: its schema plus, when the catalog can evaluate it, an implementation. - [A2UICore.Catalog.RefSpec](A2UICore.Catalog.RefSpec.md): Which properties of a component refer to other components, and how to pull those references out of a component's properties. - [A2UICore.Catalog.ReferenceMap](A2UICore.Catalog.ReferenceMap.md): Derives, from a catalog's component schemas, which properties are child references — the data `A2UICore.Catalog.RefSpec` extracts from. - [A2UICore.Formatter](A2UICore.Formatter.md): Locale-sensitive formatting for the basic catalog's `formatNumber`, `formatCurrency`, `formatDate` and `pluralize` functions. - [A2UICore.Formatter.Default](A2UICore.Formatter.Default.md): The built-in `A2UICore.Formatter`: `en-US` conventions for every locale. - [A2UICore.Functions.Basic](A2UICore.Functions.Basic.md): Implementations of the basic catalog's functions. - [A2UICore.Functions.System](A2UICore.Functions.System.md): Functions the runtime supplies to every catalog: the `@` namespace. - State - [A2UICore.State.Component](A2UICore.State.Component.md): One component instance on a surface: its id, catalog type, and properties. - [A2UICore.State.Components](A2UICore.State.Components.md): The set of components on a surface, keyed by id. - [A2UICore.State.DataModel](A2UICore.State.DataModel.md): The reactive JSON data store behind a surface — an immutable port of the reference `DataModel` (RFC 6901 pointers, auto-vivifying writes, cascading change notifications). - [A2UICore.State.Surface](A2UICore.State.Surface.md): The state of one UI surface: its identity, catalog selection, theme, data model and components. - [A2UICore.State.SurfaceGroup](A2UICore.State.SurfaceGroup.md): All live surfaces of a session, keyed by surface id. - Resolution - [A2UICore.Accessibility](A2UICore.Accessibility.md): What a component tells assistive technology. - [A2UICore.Expression](A2UICore.Expression.md): Parser for A2UI expression templates — the `${…}` interpolation language used by `formatString` and by dynamic string values. - [A2UICore.Resolution.Action](A2UICore.Resolution.Action.md): An action property of a resolved component. - [A2UICore.Resolution.Binder](A2UICore.Resolution.Binder.md): Resolves a component's properties to the values a renderer displays. - [A2UICore.Resolution.Binding](A2UICore.Resolution.Binding.md): A resolved dynamic property: the value it currently holds and, when the component bound it to a data path, the absolute path a write goes to. - [A2UICore.Resolution.DataContext](A2UICore.Resolution.DataContext.md): A data-binding scope: the absolute path relative bindings resolve against, the collection-template iteration index, and — when built for a surface — what is needed to evaluate dynamic values. - [A2UICore.Resolution.Node](A2UICore.Resolution.Node.md): One mounted position of a resolved component tree. - [A2UICore.Resolution.NodeResolver](A2UICore.Resolution.NodeResolver.md): Resolves a surface's flat component dictionary into a tree of `A2UICore.Resolution.Node`s. - Validation - [A2UICore.CommonTypes](A2UICore.CommonTypes.md): Validates values against the protocol's shared type definitions — the `$defs` of each version's `common_types.json` (`DynamicValue`, `FunctionCall`, `ChildList`, `Action`, v1.0 `Extensions`, …). - [A2UICore.Schema](A2UICore.Schema.md): JSON Schema **Draft 2020-12** validator used by A2UI's catalog, envelope, and payload validation. - [A2UICore.Schema.ECMA262](A2UICore.Schema.ECMA262.md): ECMA-262 → PCRE regex translation for the `pattern` and `patternProperties` keywords. - [A2UICore.Schema.Source](A2UICore.Schema.Source.md): Loads the A2UI protocol's own JSON Schema documents — vendored under `priv/` from a pinned revision of the specification — plus the shipped basic catalogs. - [A2UICore.Validation.ComponentsUpdate](A2UICore.Validation.ComponentsUpdate.md): Validates a batch of incoming components against the surface they update, before any of them is committed. - [A2UICore.Validation.Config](A2UICore.Validation.Config.md): Options controlling how strictly a component graph and its payloads are validated — the reference `ValidationConfig`. - [A2UICore.Validation.Integrity](A2UICore.Validation.Integrity.md): Payload preflight checks that run before schema validation: global nesting depth, nested function-call depth, and JSON-pointer path syntax. Ported verbatim from the reference's `validate_recursion_and_paths`. - [A2UICore.Validation.Payload](A2UICore.Validation.Payload.md): Validates component, function-call and theme payloads against a catalog. - [A2UICore.Validation.ReservedKeys](A2UICore.Validation.ReservedKeys.md): The v1.0 reserved-key rule for dynamic objects. - [A2UICore.Validation.Topology](A2UICore.Validation.Topology.md): Component-graph validation: root presence, dangling references, self-references, cycles, depth, unreachable components, and catalog composition constraints. - Primitives - [A2UICore.Coerce](A2UICore.Coerce.md): Value coercions shared by the catalog functions: truthiness, text and number conversion. - [A2UICore.Identifier](A2UICore.Identifier.md): UAX #31 identifier validation for catalog entity names, with the upstream pattern `^[\p{XID_Start}_][\p{XID_Continue}]*$`, compiled like a schema pattern by `A2UICore.Schema.ECMA262`: exact on Erlang/OTP 28 and later, an approximation on older PCRE. - [A2UICore.Pointer](A2UICore.Pointer.md): RFC 6901 JSON Pointer parsing, building, and resolution. - [A2UICore.SemVer](A2UICore.SemVer.md): Semantic Versioning 2.0.0 parsing and comparison. - [A2UICore.Version](A2UICore.Version.md): A2UI protocol-version registry and catalog compatibility rules.