Expand description
Configuration loading and merging.
This module consolidates user configuration, project configuration, local project overrides, and CLI overrides into a single strongly-typed configuration object ready for startup.
Structs§
- Base
Prompt Config File - Bash
Tool Config - Capabilities
Config - Top-level capability configuration entry point.
- CliConfig
- CliOverrides
- Config
Layer Entry - Config
Layer Stack - Effective
Config - Fetch
Tool Config - Configuration for the local fetch tool.
- FsTool
Config - Hook
Entry - A single hook configuration: matcher + handler + source layer.
- Hook
Matcher - Event matcher. Empty fields match all triggers under that event; see the hooks trust model.
- Hook
Prompt Spec - Hooks
Config - Valid configuration for the hook system: pipelines are grouped by step
event_nameand executed in declaration order within each group. - Http
Client Config - Typed configuration for the HTTP client stack.
- Http
Proxy Config - Http
Proxy Settings - Langfuse
Config - Langfuse upload configuration.
- Load
Config Options - Loaded
Config - McpConfig
- McpRemote
Server Config - McpStdio
Server Config - Otlp
Tracing Config - Profile
Spec - A parsed subagent profile.
- Prompt
Config File - Provider
AwsConfig File - Provider
Capability Overrides - Overrides for global capabilities under a single provider.
- Provider
Config File - Provider
Configs - Sandbox
Config - Search
Tool Config - Configuration for the local search tool.
- Skill
Spec - A parsed skill.
- Tools
Config - Tracing
Config
Enums§
- Config
Error - Config
Source - Config
Warning - Fetch
Format - Hook
Command Spec - Hook
Handler Spec - Handler spec — three variants.
- Hook
Prompt Render - Hook
Shell Kind - Http
Proxy Mode - LogFormat
- Output format for the tracing-subscriber log sink (stderr).
- McpServer
Config - Model
Entry - A model candidate configuration declaration.
- Provider
Kind - Provider
Protocol - Reasoning
Effort - Values for the
reasoning_effortparameter in the OpenAI-compatible protocol. - Sandbox
Mode - Thinking
Format - Anthropic Messages thinking wire format for a model.
Functions§
- discover_
profiles - Discover and parse all available profiles.
- discover_
skills - Discover and parse all available skills.
- find_
repo_ root - load_
config - Loads and merges the effective configuration for
defect. - load_
dotenv_ compat - Reads
cwd/.envcompatibly, only filling in missing environment variables. - parse_
cli_ override - Parse a single CLI override in
KEY=VALUEform. - user_
config_ path - Resolve the user-level (global)
config.tomlpath using the same XDG/HOME priority as the loader:$XDG_CONFIG_HOME/defect/config.toml, else$HOME/.config/....