oxios_kernel/resilience/mod.rs
1//! Resilience layer (RFC-029) — failure classification and recovery
2//! coordination.
3//!
4//! # Layers
5//!
6//! - [`classify`] — maps a provider error to a [`FailureClass`].
7//! - [`budget`] — `AttemptBudget`, bounds total retries.
8//! - [`coordinator`] — `RecoveryCoordinator`, the OTP-style recovery
9//! ladder (L1 backoff → L2 model swap → terminal).
10//!
11//! # Honest limitation
12//!
13//! The typed `oxi_ai::ProviderError` is stringified at the oxi-agent
14//! boundary. Downcasting across that boundary is not possible today, so
15//! `classify` uses Display-string heuristics. See [`classify`] for the
16//! pattern list and its caveats.
17
18pub mod budget;
19pub mod classify;
20pub mod coordinator;
21pub mod error;
22pub mod health;
23
24pub use budget::AttemptBudget;
25pub use classify::classify;
26pub use coordinator::{RecoveryCoordinator, ResilienceConfig};
27pub use error::AgentRunError;
28pub use health::{BreakerConfig, ProviderHealthRegistry};
29pub use oxios_ouroboros::FailureClass;