//! In-process UI-improvement agent for the adaptive A2UI rendering
//! loop. Consumes `RenderReport` telemetry from the renderer
//! (Parslee-ai/car#180), runs a library of rendering strategies, and
//! returns a `Decision` (typically a `PatchComponents` envelope) the
//! caller routes through `car-a2ui`'s surface store.
//!
//! The agent is structured as a library, not a service. Pattern
//! mirrors `car-meeting::MemgineIngestSink`: a struct with a sync
//! callback that the runtime invokes from its async context. No A2A
//! observer registration; no outbound emission code — the call site
//! in `car-server-core` routes the returned envelope through the
//! existing surface store apply path.
//!
//! Reference Swift shape:
//! `a2ui-shader/Sources/A2UIShaderAgent/UIImprovementAgent.swift`.
//! Loop semantics — `in_response_to` correlation, hard-stop on
//! `placeholder_count > 0`, stability-window termination, no double-
//! patch at the same sequence — port across without change.

pub mod agent;
pub mod errors;
pub mod state;
pub mod strategies;
pub mod types;

pub use agent::UIImprovementAgent;
pub use errors::UIAgentError;
pub use strategies::{
    BuiltInStrategies, CompactDenseColumn, RenderingStrategy, TagSmallListDomain,
};
pub use types::{Decision, IntentSignature};
