services/config/config

Config service — loads .env + agent.toml and exports typed accessors. This is the single entry point for all configuration. Each domain’s cfg.gleam module is called from here; consumers import only this module.

Values

pub fn get(key: String) -> Result(String, Nil)
pub fn get_api_key() -> Result(String, Nil)
pub fn get_approval_mode() -> String
pub fn get_approval_timeout_seconds() -> Int
pub fn get_auto_prune_enabled() -> Bool
pub fn get_auto_prune_min_interval_hours() -> Int
pub fn get_auto_prune_retention_days() -> Int
pub fn get_crash_recovery_enabled() -> Bool
pub fn get_crash_recovery_max_age() -> Int
pub fn get_default_persona() -> String
pub fn get_or(key: String, default: String) -> String
pub fn get_restrict_to_working_dir() -> Bool
pub fn get_timezone() -> String
pub fn get_working_dir() -> String
pub fn load_env() -> Nil

Load .env (secrets) and agent.toml (configuration). Call once at startup.

pub fn require(key: String) -> String
Search Document