pub struct Config {Show 15 fields
pub github: Option<GitHubConfig>,
pub gitlab: Option<GitLabConfig>,
pub clickup: Option<ClickUpConfig>,
pub jira: Option<JiraConfig>,
pub fireflies: Option<FirefliesConfig>,
pub confluence: Option<ConfluenceConfig>,
pub slack: Option<SlackConfig>,
pub contexts: BTreeMap<String, ContextConfig>,
pub active_context: Option<String>,
pub proxy_mcp_servers: Vec<ProxyMcpServerConfig>,
pub builtin_tools: BuiltinToolsConfig,
pub format_pipeline: Option<FormatPipelineConfig>,
pub proxy: ProxyConfig,
pub sentry: Option<SentryConfig>,
pub remote_config: Option<RemoteConfigSettings>,
}Expand description
Main configuration structure.
Fields§
§github: Option<GitHubConfig>§gitlab: Option<GitLabConfig>§clickup: Option<ClickUpConfig>§jira: Option<JiraConfig>§fireflies: Option<FirefliesConfig>Fireflies.ai configuration (meeting notes)
confluence: Option<ConfluenceConfig>Confluence self-hosted configuration (knowledge base)
slack: Option<SlackConfig>Slack configuration (messenger)
contexts: BTreeMap<String, ContextConfig>Named contexts (profiles) configuration.
active_context: Option<String>Currently active context name.
proxy_mcp_servers: Vec<ProxyMcpServerConfig>Upstream MCP servers to proxy.
builtin_tools: BuiltinToolsConfigBuilt-in tools filtering configuration.
format_pipeline: Option<FormatPipelineConfig>Format pipeline configuration (TOON encoding, budget trimming, strategies).
proxy: ProxyConfigTransparent proxy configuration: routing strategy, secrets cache, telemetry. Applies across all upstream MCP servers unless overridden per-server.
sentry: Option<SentryConfig>Sentry error reporting configuration (optional, disabled by default).
remote_config: Option<RemoteConfigSettings>Remote configuration endpoint (optional). Fetches TOML config from a URL on startup and merges with local config.
Implementations§
Source§impl Config
impl Config
Sourcepub const DEFAULT_CONTEXT_NAME: &'static str = "default"
pub const DEFAULT_CONTEXT_NAME: &'static str = "default"
Name of the implicit context for legacy top-level provider configuration.
Sourcepub fn config_dir() -> Result<PathBuf>
pub fn config_dir() -> Result<PathBuf>
Get the configuration directory path.
Sourcepub fn config_path() -> Result<PathBuf>
pub fn config_path() -> Result<PathBuf>
Get the configuration file path.
Sourcepub fn load() -> Result<Self>
pub fn load() -> Result<Self>
Load configuration from the default location.
Returns a default (empty) config if the file doesn’t exist.
Sourcepub fn load_from(path: &PathBuf) -> Result<Self>
pub fn load_from(path: &PathBuf) -> Result<Self>
Load configuration from a specific path.
Returns a default (empty) config if the file doesn’t exist.
Sourcepub fn sanitize(&mut self)
pub fn sanitize(&mut self)
Normalize cosmetic “null-equivalents” that TOML/serde can’t express on their
own — currently just: proxy.telemetry.endpoint = "" collapses to None, so
hand-edited TOML matches the CLI semantics (where an empty value clears the
field rather than leaving an invalid URL in place). Called by Self::load_from
immediately before Self::validate.
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Run post-deserialization validation on the config.
Covers invariants that TOML/serde deserializers can’t express by themselves:
URL shape for telemetry endpoint, bool coercions, etc. Safe to call at any time.
Note: an empty-string endpoint is rejected here — callers that want “empty
means clear” semantics should run Self::sanitize first (which load_from
does automatically).
Sourcepub fn has_any_provider(&self) -> bool
pub fn has_any_provider(&self) -> bool
Check if any provider is configured.
Sourcepub fn configured_providers(&self) -> Vec<&'static str>
pub fn configured_providers(&self) -> Vec<&'static str>
Get a list of configured provider names.
Sourcepub fn context_names(&self) -> Vec<String>
pub fn context_names(&self) -> Vec<String>
Get all context names, including implicit legacy default context when applicable.
Sourcepub fn get_context(&self, name: &str) -> Option<ContextConfig>
pub fn get_context(&self, name: &str) -> Option<ContextConfig>
Get context config by name, including implicit legacy default context.
Sourcepub fn resolve_active_context_name(&self) -> Option<String>
pub fn resolve_active_context_name(&self) -> Option<String>
Resolve the currently active context name.
Sourcepub fn set_active_context(&mut self, name: &str) -> Result<()>
pub fn set_active_context(&mut self, name: &str) -> Result<()>
Set active context if it exists.
Sourcepub fn legacy_default_context(&self) -> Option<ContextConfig>
pub fn legacy_default_context(&self) -> Option<ContextConfig>
Return the implicit legacy context from top-level provider fields.