Documentation
¶
Index ¶
- Variables
- func ClearAgentPreferences(agentName string) error
- func DescribeCredentialSource(name string, cfg *ProviderConfig) (string, bool)
- func Exists() bool
- func GetBuiltInProviderNames() []string
- func GetConfigDir() (string, error)
- func GetConfigPath() (string, error)
- func GetDebugLogsDir() string
- func GetDefaults() map[string]any
- func GetDiagnosticsDir() string
- func IsKnownKey(keyPath string) bool
- func NeedsSetup() bool
- func NormalizeVeniceAPIKey(apiKey string) string
- func ParseProviderModel(s string) (provider, model string)
- func ResolveValue(value string) (string, error)
- func Save(cfg *Config) error
- func SetAgentPreference(agentName, key, value string) ([]string, error)
- func SetServeTelegramConfig(c TelegramServeConfig) error
- func SetServeWebPushConfig(c WebPushConfig) error
- type AgentPreference
- type AgentsConfig
- type AgentsMdConfig
- type AskConfig
- type ChatConfig
- type Config
- type DebugLogsConfig
- type DiagnosticsConfig
- type EditConfig
- type EmbedConfig
- type EmbedGeminiConfig
- type EmbedJinaConfig
- type EmbedOllamaConfig
- type EmbedOpenAIConfig
- type EmbedVoyageConfig
- type ExecConfig
- type ImageConfig
- type ImageDebugConfig
- type ImageFluxConfig
- type ImageGeminiConfig
- type ImageOpenAIConfig
- type ImageOpenRouterConfig
- type ImageVeniceConfig
- type ImageXAIConfig
- type ProviderConfig
- type ProviderType
- type SearchBraveConfig
- type SearchConfig
- type SearchExaConfig
- type SearchGoogleConfig
- type SearchPerplexityConfig
- type SearchTavilyConfig
- type ServeConfig
- type SessionsConfig
- type SkillsConfig
- type TelegramServeConfig
- type ThemeConfig
- type ToolsConfig
- type TranscriptionConfig
- type WebPushConfig
Constants ¶
This section is empty.
Variables ¶
var KnownAgentPreferenceKeys = map[string]bool{ "provider": true, "model": true, "tools_enabled": true, "tools_disabled": true, "shell_allow": true, "shell_auto_run": true, "spawn_max_parallel": true, "spawn_max_depth": true, "spawn_timeout": true, "spawn_allowed_agents": true, "max_turns": true, "search": true, }
KnownAgentPreferenceKeys contains valid keys for agent preference configurations
var KnownKeys = map[string]bool{}/* 131 elements not displayed */
KnownKeys contains all valid configuration key paths Dynamic keys like providers.* and image.* have their subkeys validated separately
var KnownProviderKeys = map[string]bool{ "type": true, "api_key": true, "model": true, "fast_model": true, "fast_provider": true, "models": true, "credentials": true, "env": true, "use_native_search": true, "base_url": true, "url": true, "app_url": true, "app_title": true, "context_window": true, "max_output_tokens": true, "enable_hooks": true, }
KnownProviderKeys contains valid keys for provider configurations
Functions ¶
func ClearAgentPreferences ¶ added in v0.0.42
ClearAgentPreferences removes all preferences for a specific agent.
func DescribeCredentialSource ¶ added in v0.0.82
func DescribeCredentialSource(name string, cfg *ProviderConfig) (string, bool)
DescribeCredentialSource returns a human-readable description of which credential source will be used for the given provider. This is used by `config show` to help users understand where their credentials are coming from. Returns a short label (e.g., "ANTHROPIC_API_KEY env") and whether any credential was found.
func GetBuiltInProviderNames ¶ added in v0.0.29
func GetBuiltInProviderNames() []string
GetBuiltInProviderNames returns a list of all built-in provider type names.
func GetConfigDir ¶
GetConfigDir returns the XDG config directory for term-llm. Uses $XDG_CONFIG_HOME if set, otherwise ~/.config
func GetConfigPath ¶
GetConfigPath returns the path where the config file should be located
func GetDebugLogsDir ¶ added in v0.0.34
func GetDebugLogsDir() string
GetDebugLogsDir returns the XDG data directory for term-llm debug logs. Uses $XDG_DATA_HOME if set, otherwise ~/.local/share
func GetDefaults ¶ added in v0.0.38
GetDefaults returns a map of all default configuration values
func GetDiagnosticsDir ¶ added in v0.0.11
func GetDiagnosticsDir() string
GetDiagnosticsDir returns the XDG data directory for term-llm diagnostics. Uses $XDG_DATA_HOME if set, otherwise ~/.local/share
func IsKnownKey ¶ added in v0.0.38
IsKnownKey checks if a key path is a known configuration key For provider keys (providers.*), validates the sub-keys For agent preference keys (agents.preferences.*), validates the sub-keys
func NormalizeVeniceAPIKey ¶ added in v0.0.131
NormalizeVeniceAPIKey trims whitespace and strips an accidental "Bearer " prefix from a Venice API key. Shared across llm, image, and video packages.
func ParseProviderModel ¶ added in v0.0.42
ParseProviderModel splits "provider:model" into separate parts. Returns (provider, model). Model will be empty if not specified. This is a simple version that doesn't validate against configured providers.
func ResolveValue ¶ added in v0.0.15
ResolveValue handles magic URL schemes in config values: - op://vault/item/field -> 1Password secret (via `op read`) - srv://record/path -> DNS SRV lookup + path (always HTTPS) - file://path -> file contents (trimmed) - file://path#key or file://path#nested.path -> JSON field from file contents - $(...) -> shell command output - ${VAR} or $VAR -> environment variable - literal string -> returned as-is
func SetAgentPreference ¶ added in v0.0.42
SetAgentPreference sets a preference for a specific agent. Uses viper to merge with existing config. Supports "provider:model" format for the provider key (e.g., "chatgpt:gpt-5.2-codex"). Returns a list of keys that were set (may be multiple for provider:model format).
func SetServeTelegramConfig ¶ added in v0.0.83
func SetServeTelegramConfig(c TelegramServeConfig) error
SetServeTelegramConfig saves Telegram bot configuration using viper. Merges with existing config rather than overwriting.
func SetServeWebPushConfig ¶ added in v0.0.114
func SetServeWebPushConfig(c WebPushConfig) error
SetServeWebPushConfig saves Web Push VAPID configuration using viper.
Types ¶
type AgentPreference ¶ added in v0.0.42
type AgentPreference struct {
// Model preferences
Provider string `mapstructure:"provider,omitempty" yaml:"provider,omitempty"`
Model string `mapstructure:"model,omitempty" yaml:"model,omitempty"`
// Tool configuration
ToolsEnabled []string `mapstructure:"tools_enabled,omitempty" yaml:"tools_enabled,omitempty"`
ToolsDisabled []string `mapstructure:"tools_disabled,omitempty" yaml:"tools_disabled,omitempty"`
// Shell settings
ShellAllow []string `mapstructure:"shell_allow,omitempty" yaml:"shell_allow,omitempty"`
ShellAutoRun *bool `mapstructure:"shell_auto_run,omitempty" yaml:"shell_auto_run,omitempty"`
// Spawn settings
SpawnMaxParallel *int `mapstructure:"spawn_max_parallel,omitempty" yaml:"spawn_max_parallel,omitempty"`
SpawnMaxDepth *int `mapstructure:"spawn_max_depth,omitempty" yaml:"spawn_max_depth,omitempty"`
SpawnTimeout *int `mapstructure:"spawn_timeout,omitempty" yaml:"spawn_timeout,omitempty"`
SpawnAllowedAgents []string `mapstructure:"spawn_allowed_agents,omitempty" yaml:"spawn_allowed_agents,omitempty"`
// Behavior
MaxTurns *int `mapstructure:"max_turns,omitempty" yaml:"max_turns,omitempty"`
Search *bool `mapstructure:"search,omitempty" yaml:"search,omitempty"`
}
AgentPreference allows overriding agent settings via config.yaml. All fields are optional - only set fields override the agent's defaults.
func GetAgentPreference ¶ added in v0.0.42
func GetAgentPreference(agentName string) (AgentPreference, bool)
GetAgentPreference returns the preferences for a specific agent.
type AgentsConfig ¶ added in v0.0.33
type AgentsConfig struct {
UseBuiltin bool `mapstructure:"use_builtin"` // Enable built-in agents (default true)
SearchPaths []string `mapstructure:"search_paths"` // Additional directories to search for agents
Preferences map[string]AgentPreference `mapstructure:"preferences"` // Per-agent preference overrides
}
AgentsConfig configures the agent system
type AgentsMdConfig ¶ added in v0.0.37
type AgentsMdConfig struct {
Enabled bool `mapstructure:"enabled"` // Load AGENTS.md into system prompt
}
AgentsMdConfig configures optional AGENTS.md loading
type AskConfig ¶
type AskConfig struct {
Provider string `mapstructure:"provider"` // Override provider for ask only
Model string `mapstructure:"model"` // Override model for ask only
Instructions string `mapstructure:"instructions"` // Custom system prompt for ask
MaxTurns int `mapstructure:"max_turns"` // Max agentic turns (default 20)
}
type ChatConfig ¶ added in v0.0.29
type ChatConfig struct {
Provider string `mapstructure:"provider"` // Override provider for chat only
Model string `mapstructure:"model"` // Override model for chat only
Instructions string `mapstructure:"instructions"` // Custom system prompt for chat
MaxTurns int `mapstructure:"max_turns"` // Max agentic turns (default 200)
}
type Config ¶
type Config struct {
DefaultProvider string `mapstructure:"default_provider"`
Providers map[string]ProviderConfig `mapstructure:"providers"`
Diagnostics DiagnosticsConfig `mapstructure:"diagnostics"`
DebugLogs DebugLogsConfig `mapstructure:"debug_logs"`
Sessions SessionsConfig `mapstructure:"sessions"`
Exec ExecConfig `mapstructure:"exec"`
Ask AskConfig `mapstructure:"ask"`
Chat ChatConfig `mapstructure:"chat"`
Edit EditConfig `mapstructure:"edit"`
Image ImageConfig `mapstructure:"image"`
Transcription TranscriptionConfig `mapstructure:"transcription"`
Embed EmbedConfig `mapstructure:"embed"`
Search SearchConfig `mapstructure:"search"`
Theme ThemeConfig `mapstructure:"theme"`
Tools ToolsConfig `mapstructure:"tools"`
Agents AgentsConfig `mapstructure:"agents"`
Skills SkillsConfig `mapstructure:"skills"`
AgentsMd AgentsMdConfig `mapstructure:"agents_md"`
AutoCompact bool `mapstructure:"auto_compact"`
Serve ServeConfig `mapstructure:"serve"`
}
func (*Config) ApplyOverrides ¶ added in v0.0.6
ApplyOverrides applies provider and model overrides to the config. If provider is non-empty, it overrides the global provider. If model is non-empty, it overrides the model for the active provider.
func (*Config) GetActiveProviderConfig ¶ added in v0.0.15
func (c *Config) GetActiveProviderConfig() *ProviderConfig
GetActiveProviderConfig returns the config for the default provider. Returns nil if the default provider is not configured.
func (*Config) GetProviderConfig ¶ added in v0.0.15
func (c *Config) GetProviderConfig(name string) *ProviderConfig
GetProviderConfig returns the config for the specified provider name. Returns nil if the provider is not configured.
type DebugLogsConfig ¶ added in v0.0.34
type DebugLogsConfig struct {
Enabled bool `mapstructure:"enabled"` // Enable debug logging
Dir string `mapstructure:"dir"` // Override default directory (defaults to ~/.local/share/term-llm/debug/)
}
DebugLogsConfig configures debug logging of LLM requests and responses
type DiagnosticsConfig ¶ added in v0.0.11
type DiagnosticsConfig struct {
Enabled bool `mapstructure:"enabled"` // Enable diagnostic data collection
Dir string `mapstructure:"dir"` // Override default directory
}
DiagnosticsConfig configures diagnostic data collection
type EditConfig ¶ added in v0.0.5
type EditConfig struct {
Provider string `mapstructure:"provider"` // Override provider for edit
Model string `mapstructure:"model"` // Override model for edit
Instructions string `mapstructure:"instructions"` // Custom instructions for edits
ShowLineNumbers bool `mapstructure:"show_line_numbers"` // Show line numbers in diff
ContextLines int `mapstructure:"context_lines"` // Lines of context in diff
Editor string `mapstructure:"editor"` // Override $EDITOR
DiffFormat string `mapstructure:"diff_format"` // "auto", "udiff", or "replace" (default: auto)
}
type EmbedConfig ¶ added in v0.0.83
type EmbedConfig struct {
Provider string `mapstructure:"provider"` // default embedding provider: gemini, openai, jina, voyage, ollama
OpenAI EmbedOpenAIConfig `mapstructure:"openai"`
Gemini EmbedGeminiConfig `mapstructure:"gemini"`
Jina EmbedJinaConfig `mapstructure:"jina"`
Voyage EmbedVoyageConfig `mapstructure:"voyage"`
Ollama EmbedOllamaConfig `mapstructure:"ollama"`
}
EmbedConfig configures text embedding generation
type EmbedGeminiConfig ¶ added in v0.0.83
type EmbedGeminiConfig struct {
APIKey string `mapstructure:"api_key"`
Model string `mapstructure:"model"` // gemini-embedding-001 (default)
}
EmbedGeminiConfig configures Gemini embedding generation
type EmbedJinaConfig ¶ added in v0.0.83
type EmbedJinaConfig struct {
APIKey string `mapstructure:"api_key"`
Model string `mapstructure:"model"` // jina-embeddings-v3 (default), jina-embeddings-v4
}
EmbedJinaConfig configures Jina AI embedding generation
type EmbedOllamaConfig ¶ added in v0.0.83
type EmbedOllamaConfig struct {
BaseURL string `mapstructure:"base_url"` // default: http://localhost:11434
Model string `mapstructure:"model"` // nomic-embed-text (default)
}
EmbedOllamaConfig configures Ollama embedding generation
type EmbedOpenAIConfig ¶ added in v0.0.83
type EmbedOpenAIConfig struct {
APIKey string `mapstructure:"api_key"`
Model string `mapstructure:"model"` // text-embedding-3-small (default), text-embedding-3-large
}
EmbedOpenAIConfig configures OpenAI embedding generation
type EmbedVoyageConfig ¶ added in v0.0.83
type EmbedVoyageConfig struct {
APIKey string `mapstructure:"api_key"`
Model string `mapstructure:"model"` // voyage-3.5 (default), voyage-3-large, voyage-code-3
}
EmbedVoyageConfig configures Voyage AI embedding generation
type ExecConfig ¶
type ExecConfig struct {
Provider string `mapstructure:"provider"` // Override provider for exec
Model string `mapstructure:"model"` // Override model for exec
Suggestions int `mapstructure:"suggestions"` // Number of command suggestions (default 3)
Instructions string `mapstructure:"instructions"` // Custom context for suggestions
}
type ImageConfig ¶ added in v0.0.3
type ImageConfig struct {
Provider string `mapstructure:"provider"` // default image provider: gemini, openai, xai, venice, flux, openrouter, debug
OutputDir string `mapstructure:"output_dir"` // default save directory
Gemini ImageGeminiConfig `mapstructure:"gemini"`
OpenAI ImageOpenAIConfig `mapstructure:"openai"`
XAI ImageXAIConfig `mapstructure:"xai"`
Venice ImageVeniceConfig `mapstructure:"venice"`
Flux ImageFluxConfig `mapstructure:"flux"`
OpenRouter ImageOpenRouterConfig `mapstructure:"openrouter"`
Debug ImageDebugConfig `mapstructure:"debug"`
}
ImageConfig configures image generation settings
type ImageDebugConfig ¶ added in v0.0.39
type ImageDebugConfig struct {
Delay float64 `mapstructure:"delay"` // delay in seconds before returning (e.g., 1.5)
}
ImageDebugConfig configures the debug image provider (local random images)
type ImageFluxConfig ¶ added in v0.0.3
type ImageFluxConfig struct {
APIKey string `mapstructure:"api_key"`
Model string `mapstructure:"model"` // flux-2-pro for generation, flux-kontext-pro for editing
}
ImageFluxConfig configures Flux (Black Forest Labs) image generation
type ImageGeminiConfig ¶ added in v0.0.3
type ImageGeminiConfig struct {
APIKey string `mapstructure:"api_key"`
Model string `mapstructure:"model"`
ImageSize string `mapstructure:"image_size"` // Default image size: 1K, 2K, 4K
}
ImageGeminiConfig configures Gemini image generation
type ImageOpenAIConfig ¶ added in v0.0.3
type ImageOpenAIConfig struct {
APIKey string `mapstructure:"api_key"`
Model string `mapstructure:"model"`
}
ImageOpenAIConfig configures OpenAI image generation
type ImageOpenRouterConfig ¶ added in v0.0.24
type ImageOpenRouterConfig struct {
APIKey string `mapstructure:"api_key"`
Model string `mapstructure:"model"` // e.g., google/gemini-2.5-flash-image
}
ImageOpenRouterConfig configures OpenRouter image generation
type ImageVeniceConfig ¶ added in v0.0.98
type ImageVeniceConfig struct {
APIKey string `mapstructure:"api_key"`
Model string `mapstructure:"model"`
EditModel string `mapstructure:"edit_model"`
Resolution string `mapstructure:"resolution"`
}
ImageVeniceConfig configures Venice AI image generation
type ImageXAIConfig ¶ added in v0.0.31
type ImageXAIConfig struct {
APIKey string `mapstructure:"api_key"`
Model string `mapstructure:"model"` // grok-2-image or grok-2-image-1212
}
ImageXAIConfig configures xAI (Grok) image generation
type ProviderConfig ¶ added in v0.0.15
type ProviderConfig struct {
// Type of provider - inferred from key name for built-ins, required for custom
Type ProviderType `mapstructure:"type"`
// Common fields
APIKey string `mapstructure:"api_key"`
Model string `mapstructure:"model"`
FastModel string `mapstructure:"fast_model"` // Lightweight model for control-plane tasks
FastProvider string `mapstructure:"fast_provider"` // Optional provider key override for FastModel
Models []string `mapstructure:"models"` // Available models for autocomplete
Credentials string `mapstructure:"credentials"` // "api_key", "codex", "gemini-cli"
Env map[string]string `mapstructure:"env"` // Extra subprocess env vars for providers that shell out (e.g. claude-bin)
EnableHooks bool `mapstructure:"enable_hooks"` // Opt in to Claude Code hooks for claude-bin (disabled by default)
// Search behavior - nil means auto (use native if available)
UseNativeSearch *bool `mapstructure:"use_native_search"`
// Model token limits (for custom/self-hosted models not in hardcoded tables)
ContextWindow int `mapstructure:"context_window"`
MaxOutputTokens int `mapstructure:"max_output_tokens"`
// OpenAI-compatible specific
BaseURL string `mapstructure:"base_url"` // Base URL - /chat/completions is appended
URL string `mapstructure:"url"` // Full URL - used as-is without appending endpoint
NoStreamOptions bool `mapstructure:"no_stream_options"` // Don't send stream_options (for servers that reject it)
// OpenRouter specific
AppURL string `mapstructure:"app_url"`
AppTitle string `mapstructure:"app_title"`
// AWS Bedrock specific
Region string `mapstructure:"region"` // AWS region (defaults to AWS_REGION env var)
Profile string `mapstructure:"profile"` // AWS profile from ~/.aws/credentials
AccessKey string `mapstructure:"access_key_id"` // Explicit AWS access key ID
SecretKey string `mapstructure:"secret_access_key"` // Explicit AWS secret access key
SessionToken string `mapstructure:"session_token"` // Optional AWS session token (temporary creds)
ModelMap map[string]string `mapstructure:"model_map"` // Friendly name -> Bedrock model ID/ARN
// Runtime fields (populated after credential resolution)
ResolvedAPIKey string `mapstructure:"-"`
AccountID string `mapstructure:"-"`
OAuthCreds *credentials.GeminiOAuthCredentials `mapstructure:"-"`
ResolvedURL string `mapstructure:"-"` // Resolved URL (after srv:// lookup)
// contains filtered or unexported fields
}
ProviderConfig is a unified configuration for any provider
func (*ProviderConfig) ResolveForInference ¶ added in v0.0.15
func (cfg *ProviderConfig) ResolveForInference() error
ResolveForInference performs lazy resolution of expensive config values (op://, file://, srv://, $()). Call this before creating a provider for inference.
type ProviderType ¶ added in v0.0.15
type ProviderType string
ProviderType defines the supported provider implementations
const ( ProviderTypeAnthropic ProviderType = "anthropic" ProviderTypeOpenAI ProviderType = "openai" ProviderTypeChatGPT ProviderType = "chatgpt" ProviderTypeCopilot ProviderType = "copilot" ProviderTypeGemini ProviderType = "gemini" ProviderTypeGeminiCLI ProviderType = "gemini-cli" ProviderTypeOpenRouter ProviderType = "openrouter" ProviderTypeZen ProviderType = "zen" ProviderTypeClaudeBin ProviderType = "claude-bin" ProviderTypeOpenAICompat ProviderType = "openai_compatible" ProviderTypeXAI ProviderType = "xai" ProviderTypeVenice ProviderType = "venice" ProviderTypeBedrock ProviderType = "bedrock" )
func InferProviderType ¶ added in v0.0.15
func InferProviderType(name string, explicit ProviderType) ProviderType
InferProviderType returns the provider type for a given provider name Explicit type takes precedence, then built-in names, then defaults to openai_compatible
type SearchBraveConfig ¶ added in v0.0.22
type SearchBraveConfig struct {
APIKey string `mapstructure:"api_key"`
}
SearchBraveConfig configures Brave search
type SearchConfig ¶ added in v0.0.22
type SearchConfig struct {
Provider string `mapstructure:"provider"` // exa, perplexity, tavily, brave, google, duckduckgo (default)
ForceExternal bool `mapstructure:"force_external"` // force external search for all providers
Exa SearchExaConfig `mapstructure:"exa"`
Perplexity SearchPerplexityConfig `mapstructure:"perplexity"`
Tavily SearchTavilyConfig `mapstructure:"tavily"`
Brave SearchBraveConfig `mapstructure:"brave"`
Google SearchGoogleConfig `mapstructure:"google"`
}
SearchConfig configures web search providers
type SearchExaConfig ¶ added in v0.0.22
type SearchExaConfig struct {
APIKey string `mapstructure:"api_key"`
}
SearchExaConfig configures Exa search
type SearchGoogleConfig ¶ added in v0.0.22
type SearchGoogleConfig struct {
APIKey string `mapstructure:"api_key"`
CX string `mapstructure:"cx"` // Custom Search Engine ID
}
SearchGoogleConfig configures Google Custom Search
type SearchPerplexityConfig ¶ added in v0.0.117
type SearchPerplexityConfig struct {
APIKey string `mapstructure:"api_key"`
}
SearchPerplexityConfig configures Perplexity search
type SearchTavilyConfig ¶ added in v0.0.117
type SearchTavilyConfig struct {
APIKey string `mapstructure:"api_key"`
}
SearchTavilyConfig configures Tavily search
type ServeConfig ¶ added in v0.0.83
type ServeConfig struct {
Platforms []string `mapstructure:"platforms" yaml:"platforms,omitempty"`
BasePath string `mapstructure:"base_path" yaml:"base_path,omitempty"`
Telegram TelegramServeConfig `mapstructure:"telegram" yaml:"telegram,omitempty"`
WebPush WebPushConfig `mapstructure:"web_push" yaml:"web_push,omitempty"`
}
ServeConfig holds configuration for the serve command platforms.
type SessionsConfig ¶ added in v0.0.39
type SessionsConfig struct {
Enabled bool `mapstructure:"enabled"` // Master switch - set to false to disable all session storage
MaxAgeDays int `mapstructure:"max_age_days"` // Auto-delete sessions older than N days (0=never)
MaxCount int `mapstructure:"max_count"` // Keep at most N sessions, delete oldest (0=unlimited)
Path string `mapstructure:"path"` // Optional SQLite DB path override (supports :memory:)
}
SessionsConfig configures session storage
type SkillsConfig ¶ added in v0.0.37
type SkillsConfig struct {
Enabled bool `mapstructure:"enabled"` // Enable the skills system
AutoInvoke bool `mapstructure:"auto_invoke"` // Allow model-driven activation
MetadataBudgetTokens int `mapstructure:"metadata_budget_tokens"` // Max tokens for skill metadata
MaxActive int `mapstructure:"max_active"` // Max skills in metadata injection
IncludeProjectSkills bool `mapstructure:"include_project_skills"` // Discover from project-local paths
IncludeEcosystemPaths bool `mapstructure:"include_ecosystem_paths"` // Include ~/.codex/skills, ~/.claude/skills, ~/.gemini/skills, .skills/
AlwaysEnabled []string `mapstructure:"always_enabled"` // Always include in metadata
NeverAuto []string `mapstructure:"never_auto"` // Must be explicit activation
}
SkillsConfig configures the Agent Skills system
type TelegramServeConfig ¶ added in v0.0.83
type TelegramServeConfig struct {
Token string `mapstructure:"token" yaml:"token,omitempty"`
AllowedUserIDs []int64 `mapstructure:"allowed_user_ids" yaml:"allowed_user_ids,omitempty"`
AllowedUsernames []string `mapstructure:"allowed_usernames" yaml:"allowed_usernames,omitempty"`
IdleTimeout int `mapstructure:"idle_timeout" yaml:"idle_timeout,omitempty"` // minutes
InterruptTimeout int `mapstructure:"interrupt_timeout" yaml:"interrupt_timeout,omitempty"` // seconds, 0 = default (3)
}
TelegramServeConfig holds configuration for the Telegram bot platform.
type ThemeConfig ¶
type ThemeConfig struct {
Primary string `mapstructure:"primary"` // main accent (commands, highlights)
Secondary string `mapstructure:"secondary"` // secondary accent (headers, borders)
Success string `mapstructure:"success"` // success states
Error string `mapstructure:"error"` // error states
Warning string `mapstructure:"warning"` // warnings
Muted string `mapstructure:"muted"` // dimmed text
Text string `mapstructure:"text"` // primary text
Spinner string `mapstructure:"spinner"` // loading spinner
}
ThemeConfig allows customization of UI colors Colors can be ANSI color numbers (0-255) or hex codes (#RRGGBB)
type ToolsConfig ¶ added in v0.0.25
type ToolsConfig struct {
Enabled []string `mapstructure:"enabled"` // Enabled tool names (CLI names)
ReadDirs []string `mapstructure:"read_dirs"` // Directories for read operations
WriteDirs []string `mapstructure:"write_dirs"` // Directories for write operations
ShellAllow []string `mapstructure:"shell_allow"` // Shell command patterns
ShellAutoRun bool `mapstructure:"shell_auto_run"` // Auto-approve matching shell
ShellAutoRunEnv string `mapstructure:"shell_auto_run_env"` // Env var required for auto-run
ShellNonTTYEnv string `mapstructure:"shell_non_tty_env"` // Env var for non-TTY execution
ImageProvider string `mapstructure:"image_provider"` // Override for image provider
MaxToolOutputChars int `mapstructure:"max_tool_output_chars"` // Global max chars per tool output (default 20000)
}
ToolsConfig configures the local tool system
type TranscriptionConfig ¶ added in v0.0.97
type TranscriptionConfig struct {
Provider string `mapstructure:"provider"` // named provider from providers map; default "openai"
Model string `mapstructure:"model"` // optional model override
SaveDir string `mapstructure:"save_dir"` // if set, persist each uploaded audio file here
}
TranscriptionConfig configures audio transcription settings.
type WebPushConfig ¶ added in v0.0.114
type WebPushConfig struct {
VAPIDPublicKey string `mapstructure:"vapid_public_key" yaml:"vapid_public_key,omitempty"`
VAPIDPrivateKey string `mapstructure:"vapid_private_key" yaml:"vapid_private_key,omitempty"`
Subject string `mapstructure:"subject" yaml:"subject,omitempty"` // mailto: or URL
}
WebPushConfig holds VAPID keys for Web Push notifications.