Skip to main contentCrate agent_doc_config
Source Expand description
§Crate: agent-doc-config
§Spec
- Defines
Config: global user configuration loaded from ~/.config/agent-doc/config.toml
(or $XDG_CONFIG_HOME/agent-doc/config.toml). Fields: default_agent, agents map,
agent_args, claude_args, codex_args, opencode_args (harness aliases),
execution_mode, terminal.
- Defines
AgentConfig: per-named-agent settings (command, args, result_path,
session_path).
- Defines
TerminalConfig: command template for launching an external terminal; supports
{tmux_command} substitution.
- Defines
ExecutionMode enum: Hybrid (default — first doc direct, rest subagent),
Parallel (always subagent), Sequential (fully serial).
load() reads and parses the global config file; returns Config::default() when the
file is absent. Propagates I/O and parse errors via anyhow::Result.
- Project-level configuration types live in
agent-doc-frontmatter;
file-backed helpers live in agent-doc-project-config-io.
§Agentic Contracts
- Never panics on missing config:
load() returns defaults when the file is absent.
- env
- Module: env
- AgentConfig
- Config
- TerminalConfig
- ExecutionMode
- Execution mode for skill-level parallelism.
- load
- Load config from ~/.config/agent-doc/config.toml, or return defaults.