Expand description
Layered TOML config resolver — reads /etc/recon/<name>.toml (system)
and ~/.recon/<name>.toml (user), deep-merges them with user winning,
and returns a single toml::Value. Used by src/config.rs and the gh
script binding.
See docs/MANUAL.md “Configuration files” for the public model;
see ~/Development/Starweb/superpowers/recon/specs/2026-05-25-layered-config-design.md
for design rationale.
Structs§
Functions§
- global
- Return the process-wide
LayerOpts, or a default ifinit_globalwas never called (test paths, REPL). - init_
global - Set the process-wide
LayerOptsonce. Subsequent calls are silently ignored — the first call wins, matchingOnceLocksemantics. Returns the stored opts. - load_
layered - Load both layers for
name, deep-merge them (user wins), and return the effectivetoml::Value. Missing files at default paths are silent (returns empty table); missing files at env-var override paths are a hard error. - resolve_
paths - Resolve which system+user paths actually exist for the given config
name. Returns
Nonefor layers that are skipped or have no match.--*-configflags always beat env-var overrides. - system_
candidates - Return the candidate paths for the system layer in priority order
(first match wins). Uses real env vars; for tests, see
system_candidates_with_env. - user_
path - Return the user-layer path for
config.toml(no existence check). Returns None when $HOME is unset.