Files
dev/config.toml.example
T
James PeterandClaude cab2392423 feat: add configurable agent support via config.toml
- Add AgentConfig struct to define agent settings (name, command, args, read-only, enabled, env)
- Update Config and Session to include agent configurations
- Modify agent_tool.rs to use configured agents with their settings
- Update slash commands to dynamically use enabled agents from config
- Create comprehensive config.toml.example with agent examples
- Support both configured and unconfigured agents for backward compatibility
- Allow per-agent read-only override and environment variables
- Pass agent configuration through Session for proper access control

This allows users to:
- Define which AI agents are available
- Set custom commands and arguments for each agent
- Control read-only/write permissions per agent
- Enable/disable specific agents
- Configure environment variables for agents

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
2025-08-11 08:00:09 +10:00

98 lines
2.3 KiB
TOML

# Codex Configuration Example
# Copy this file to config.toml and customize as needed
# Agent Configuration
# Configure which external AI models are available and their settings
[[agents]]
name = "claude"
command = "claude"
enabled = true
read-only = false
description = "Claude AI assistant with full capabilities"
args = ["--dangerously-skip-permissions"]
[[agents]]
name = "claude-safe"
command = "claude"
enabled = true
read-only = true
description = "Claude AI assistant in read-only mode"
args = []
[[agents]]
name = "gemini"
command = "gemini"
enabled = true
read-only = false
description = "Google Gemini AI assistant"
args = ["-y"]
[[agents]]
name = "gemini-safe"
command = "gemini"
enabled = true
read-only = true
description = "Google Gemini AI assistant in read-only mode"
args = []
[[agents]]
name = "codex"
command = "codex"
enabled = true
read-only = false
description = "Codex AI assistant (self-referential)"
args = ["-s", "workspace-write", "-a", "never"]
[[agents]]
name = "gpt-4"
command = "gpt"
enabled = false
read-only = false
description = "OpenAI GPT-4 assistant"
args = ["--model", "gpt-4"]
# Optional environment variables for the agent
# env = { OPENAI_API_KEY = "your-key-here" }
# Custom agent example
[[agents]]
name = "custom-llm"
command = "/usr/local/bin/custom-llm"
enabled = false
read-only = false
description = "Custom LLM implementation"
args = ["--config", "/path/to/config.json"]
env = { MODEL_PATH = "/models/custom.bin", TEMP = "0.7" }
# Sandbox Configuration
# Controls file system access and permissions
sandbox-mode = "workspace-write"
[sandbox-workspace-write]
writable-roots = ["."]
network-access = true
exclude-tmpdir-env-var = false
exclude-slash-tmp = false
# Shell Environment Configuration
[shell-environment-policy]
inherit = "all"
ignore-default-excludes = false
# Exclude sensitive environment variables
exclude = ["*SECRET*", "*PASSWORD*", "*CREDENTIAL*"]
# Set custom environment variables
set = { EDITOR = "vim", PAGER = "less" }
# History Configuration
[history]
persistence = "save-all"
max-bytes = 10485760 # 10MB
# MCP Server Configuration
# Example MCP server configurations
[mcp-servers.example-server]
command = "npx"
args = ["-y", "@example/mcp-server"]
env = { API_KEY = "your-api-key" }
# File Opener Configuration
file-opener = "vscode" # Options: vscode, vscode-insiders, windsurf, cursor, none