Expand description
The headless surface runtime: what a renderer does, without drawing.
A surface is its components and its data model. The runtime applies the
agent’s messages to them, resolves each component’s dynamic values
(bindings, function calls, templates), evaluates its checks, writes user
input back, and builds the action a user’s gesture sends. A renderer (the
terminal interface, a text fallback, a test) draws from the resolved values;
one that draws itself (a React app with Google’s renderer) does not need it.
Behavior follows the specification and its shared conformance suites
(conformance/core/ upstream), which tests/runtime_conformance.rs replays.
Re-exports§
pub use data::DataError;pub use data::DataModel;pub use data::WatchId;pub use data::MAX_ARRAY_INDEX;pub use expr::ExpressionError;pub use expr::Part;pub use functions::coerce_bool;pub use functions::Effect;pub use functions::EvalError;pub use functions::Evaluator;pub use functions::LocalFunction;pub use functions::Scope;pub use surface::ActionError;pub use surface::Dispatch;pub use surface::Gesture;pub use surface::Node;pub use surface::Runtime;
Modules§
- data
- A surface’s data model: a JSON value addressed by JSON Pointers (RFC 6901),
with the rules every A2UI SDK shares (the specification’s conformance suite,
core/data_model.yaml): - expr
formatString’s template language: literal text with${...}interpolations, each a literal, a data binding, or a function call.- format
- Formatting for the basic catalog’s functions, in the
en-USlocale every reference SDK defaults to: numbers and currency asIntl.NumberFormatwrites them, dates by TR35 pattern, plural categories, and the string forms JavaScript gives values (String(value)), so output is the same on every renderer. - functions
- Evaluating dynamic values: data bindings, function calls, and the basic
catalog’s functions, with the specification’s coercion rules
(“
DynamicBooleanandCheckRuleCoercion”) and catalog resolution (“Mixable catalogs and component resolution logic”). - regex
- The A2UI regex dialect (the specification’s “The
regexfunction”): a portable subset of ECMAScript patterns in Unicode mode, a static safety check before anything runs, and search semantics. - surface
- Surfaces: the state a renderer keeps for each surface, and what it derives from it.