pub struct Registry { /* private fields */ }Expand description
An immutable, shareable static registry and provider set.
Implementations§
Source§impl Registry
impl Registry
Sourcepub async fn resolve_step(
&self,
transcript: Snapshot,
cancellation: &Token,
) -> Result<StepResolution, StepResolutionError>
pub async fn resolve_step( &self, transcript: Snapshot, cancellation: &Token, ) -> Result<StepResolution, StepResolutionError>
Resolves every provider once against one frozen transcript snapshot, validates the full set, and then freezes one owned Step snapshot that reuses that exact transcript version.
Providers are resolved in registration order, one await at a time. The order is the registration order for the same reason the hook fan-outs use it — it is the only order a composition layer declared — and the sequencing is deliberate rather than incidental: a concurrent fan-out would make the diagnostic order of degraded providers depend on which remote answered first, and this value is compared in tests and logs.
Every validated registration is exposed. Narrowing the roster is a
composition-layer decision taken one rail earlier, in what a Provider
returns, or one rail later, in what an
OnBeforeModel
registration leaves in Request::tools; ADR-027 records why core
publishes neither a filter nor a mount point for one.
§Errors
Returns StepResolutionError::Collision before any model request, gate
consultation, or executor dispatch can observe the ambiguity.