aurum_core/runtime/mod.rs
1//! Runtime lifecycle, concurrency, and resource governance (JOE-1573).
2//!
3//! Modules:
4//! - [`op_context`] — per-operation cancel/deadline/progress
5//! - [`governor`] — process/engine admission permits and overload policy
6//! - [`singleflight`] — per-key load coalescing
7//! - [`registry`] — weighted model residency and eviction
8//! - [`lifecycle`] — Running → ShuttingDown → Stopped (for FFI / process)
9//!
10//! ## Profiles
11//!
12//! [`GovernorConfig::default`] is a conservative desktop profile. Use
13//! [`GovernorConfig::mobile`] or [`GovernorConfig::server`] for known deployments.
14//! Process-global defaults live on [`ResourceGovernor::process_global`].
15
16pub mod governor;
17pub mod lifecycle;
18pub mod op_context;
19pub mod registry;
20pub mod singleflight;
21
22pub use governor::{GovernorConfig, GovernorStats, PermitKind, ResourceGovernor, ResourcePermit};
23pub use lifecycle::{AdmissionError, Lifecycle, LifecycleState, OpAdmission, ShutdownError};
24pub use op_context::{OpContext, OpProgress, ProgressSink};
25pub use registry::{
26 ModelRegistry, RegistryConfig, RegistryEntry, RegistryPin, RegistrySnapshot, ResidencyWeight,
27};
28pub use singleflight::{BeginLoad, LeaderGuard, LoadKey, Singleflight};