Documentation
¶
Index ¶
- func ConfigDir() string
- func ConfigFilePath() string
- func DataDir() string
- func EnsureDirs() error
- func LogDir() string
- func LogFilePath() string
- func Save(cfg Config) error
- func SaveToPath(cfg Config, path string) error
- func SessionDir() string
- type ApprovalConfig
- type Config
- type GatewayConfig
- type MCPConfig
- type MCPServerConfig
- type OllamaConfig
- type PermissionsConfig
- type ProviderConfig
- type SessionConfig
- type ShellConfig
- type ToolsConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigFilePath ¶
func ConfigFilePath() string
func EnsureDirs ¶
func EnsureDirs() error
func LogFilePath ¶ added in v0.2.0
func LogFilePath() string
func SaveToPath ¶ added in v0.2.0
SaveToPath writes the configuration to a specific file path.
func SessionDir ¶
func SessionDir() string
Types ¶
type ApprovalConfig ¶
type ApprovalConfig struct {
AutoApproveReads bool `toml:"auto_approve_reads"`
AutoApproveWrites bool `toml:"auto_approve_writes"`
AutoApproveShell bool `toml:"auto_approve_shell"`
}
ApprovalConfig specifies tool approval thresholds (deprecated in favor of Permissions).
type Config ¶
type Config struct {
Provider ProviderConfig `toml:"provider"`
Approval ApprovalConfig `toml:"approval"`
Permissions PermissionsConfig `toml:"permissions"`
Session SessionConfig `toml:"session"`
Tools ToolsConfig `toml:"tools"`
MCP MCPConfig `toml:"mcp"`
}
Config represents top-level configuration options.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns default configuration values.
func LoadFromPath ¶ added in v0.2.0
LoadFromPath reads configuration from a specific file path.
type GatewayConfig ¶
type GatewayConfig struct {
BaseURL string `toml:"base_url"`
APIKey string `toml:"api_key"`
APIKeyEnv string `toml:"api_key_env"`
DefaultModel string `toml:"default_model"`
}
GatewayConfig configures an OpenAI-compatible gateway or cloud provider endpoint.
type MCPConfig ¶ added in v0.2.0
type MCPConfig struct {
Servers map[string]MCPServerConfig `toml:"servers"`
}
MCPConfig specifies Model Context Protocol server configurations.
type MCPServerConfig ¶ added in v0.2.0
type MCPServerConfig struct {
Command string `toml:"command"`
Args []string `toml:"args"`
Env map[string]string `toml:"env,omitempty"`
}
MCPServerConfig defines an individual MCP server command and arguments.
type OllamaConfig ¶
OllamaConfig configures local Ollama instance.
type PermissionsConfig ¶ added in v0.2.0
type PermissionsConfig struct {
AutoApprove []string `toml:"auto_approve"`
Deny []string `toml:"deny"`
SensitivePatterns []string `toml:"sensitive_patterns"`
}
PermissionsConfig specifies granular tool permissions.
type ProviderConfig ¶
type ProviderConfig struct {
Default string `toml:"default"`
Ollama OllamaConfig `toml:"ollama"`
OmniRoute GatewayConfig `toml:"omniroute"`
OpenAI GatewayConfig `toml:"openai"`
Gemini GatewayConfig `toml:"gemini"`
Groq GatewayConfig `toml:"groq"`
OpenRouter GatewayConfig `toml:"openrouter"`
Anthropic GatewayConfig `toml:"anthropic"`
Qwen GatewayConfig `toml:"qwen"`
Kimi GatewayConfig `toml:"kimi"`
Custom map[string]GatewayConfig `toml:"custom"`
}
ProviderConfig specifies provider settings.
type SessionConfig ¶
SessionConfig specifies session settings.
type ShellConfig ¶
type ShellConfig struct {
TimeoutSeconds int `toml:"timeout_seconds"`
}
type ToolsConfig ¶
type ToolsConfig struct {
Shell ShellConfig `toml:"shell"`
}