osp_cli/config/mod.rs
1//! Configuration exists so the app can answer three questions consistently:
2//! what keys are legal, which source wins, and what file edits are allowed.
3//!
4//! The mental model is:
5//!
6//! - [`crate::config::LoaderPipeline`] materializes source layers from files,
7//! environment, and in-memory overrides.
8//! - [`crate::config::ConfigResolver`] applies source precedence, scope
9//! precedence, interpolation, and schema adaptation.
10//! - [`crate::config::RuntimeConfig`] lowers the resolved config into the
11//! smaller runtime view used by the app and REPL.
12//! - [`crate::config::set_scoped_value_in_toml`] edits TOML-backed config files
13//! while preserving the same schema and scope rules used at runtime.
14//!
15//! Read this module when you need to answer "where did this config value come
16//! from?", "why did this value win?", or "what writes are legal for this key?".
17//!
18//! Contract:
19//!
20//! - source precedence and scope precedence are defined here, not in callers
21//! - schema validation and config-store editing should stay aligned
22//! - other modules should not hand-roll config merging or scope filtering
23
24mod bootstrap;
25mod core;
26mod error;
27mod explain;
28mod interpolate;
29mod loader;
30mod resolver;
31mod runtime;
32mod selector;
33mod store;
34
35pub use core::*;
36pub use error::*;
37pub use loader::*;
38pub use resolver::*;
39pub use runtime::*;
40pub use store::*;