Documentation
¶
Index ¶
- Constants
- func ActionID(namespace KeyNamespace, action string) string
- func DetectGithubOwner() string
- func FindAvailablePort(basePort int) int
- func GetDefaultKeybindings() map[string]KeyBindingEntry
- func IsKnownAgent(name string) bool
- func ListKnownAgents() []string
- func ParseModel(model string) (provider, modelName string)
- func ResolveEnvironmentVariables(value string) string
- type A2AAgentInfo
- type A2ACacheConfig
- type A2AConfig
- type A2ATaskConfig
- type A2AToolsConfig
- type AgentConfig
- type AgentDefaults
- type AgentEntry
- type AgentsConfig
- type BackgroundShellsConfig
- type BashToolConfig
- type ChatConfig
- type ClientConfig
- type CompactConfig
- type Config
- func (c *Config) GetAPIKey() string
- func (c *Config) GetAgentConfig() *AgentConfig
- func (c *Config) GetDefaultModel() string
- func (c *Config) GetExcludeModels() []string
- func (c *Config) GetGatewayURL() string
- func (c *Config) GetIncludeModels() []string
- func (c *Config) GetOutputDirectory() string
- func (c *Config) GetProtectedPaths() []string
- func (c *Config) GetSandboxDirectories() []string
- func (c *Config) GetSystemPrompt() string
- func (c *Config) GetTheme() string
- func (c *Config) GetTimeout() int
- func (c *Config) IsA2AToolsEnabled() bool
- func (c *Config) IsApprovalRequired(toolName string) bool
- func (c *Config) IsBashCommandWhitelisted(command string) bool
- func (c *Config) ValidatePathInSandbox(path string) error
- type ContainerRuntimeConfig
- type ConversationConfig
- type ConversationTitleConfig
- type DeleteToolConfig
- type DownloadArtifactsToolConfig
- type EditToolConfig
- type ExportConfig
- type FetchCacheConfig
- type FetchSafetyConfig
- type GatewayConfig
- type GitCommitMessageConfig
- type GitConfig
- type GithubSafetyConfig
- type GithubToolConfig
- type GrepToolConfig
- type ImageConfig
- type InitConfig
- type KeyBindingEntry
- type KeyNamespace
- type KeybindingsConfig
- type LoggingConfig
- type MCPConfig
- type MCPServerEntry
- type PostgresStorageConfig
- type QueryAgentToolConfig
- type QueryTaskToolConfig
- type ReadToolConfig
- type RedisStorageConfig
- type RetryConfig
- type SCMCleanupConfig
- type SCMConfig
- type SCMPRCreateConfig
- type SQLiteStorageConfig
- type SafetyConfig
- type SandboxConfig
- type StorageConfig
- type StorageType
- type SubmitTaskToolConfig
- type SystemRemindersConfig
- type TodoWriteToolConfig
- type ToolWhitelistConfig
- type ToolsConfig
- type TreeToolConfig
- type WebFetchToolConfig
- type WebSearchToolConfig
- type WriteToolConfig
Constants ¶
const ( AgentsFileName = "agents.yaml" DefaultAgentsPath = ConfigDirName + "/" + AgentsFileName )
const ( ConfigDirName = ".infer" ConfigFileName = "config.yaml" GitignoreFileName = ".gitignore" LogsDirName = "logs" DefaultConfigPath = ConfigDirName + "/" + ConfigFileName DefaultLogsPath = ConfigDirName + "/" + LogsDirName )
const ( MCPFileName = "mcp.yaml" DefaultMCPPath = ConfigDirName + "/" + MCPFileName )
Variables ¶
This section is empty.
Functions ¶
func ActionID ¶ added in v0.77.0
func ActionID(namespace KeyNamespace, action string) string
ActionID constructs a namespaced action ID from namespace and action name Format: "namespace_action" (e.g., "global_quit", "chat_enter_key_handler")
func DetectGithubOwner ¶ added in v0.66.0
func DetectGithubOwner() string
DetectGithubOwner attempts to detect the GitHub owner from the git remote URL Returns empty string if not a git repository or not a GitHub remote
func FindAvailablePort ¶ added in v0.80.0
FindAvailablePort finds the next available port starting from basePort It checks up to 100 ports after the base port Binds to all interfaces (0.0.0.0) to match Docker's behavior
func GetDefaultKeybindings ¶ added in v0.77.0
func GetDefaultKeybindings() map[string]KeyBindingEntry
GetDefaultKeybindings returns the default keybinding configuration Users can override these in their config file, and any missing entries will fall back to these defaults
func IsKnownAgent ¶ added in v0.67.0
IsKnownAgent returns true if the agent name has default configuration
func ListKnownAgents ¶ added in v0.67.0
func ListKnownAgents() []string
ListKnownAgents returns a list of all known agent names
func ParseModel ¶ added in v0.54.0
ParseModel parses a model string in the format "provider/model" and returns the provider and model separately. If the format is invalid, returns empty strings.
func ResolveEnvironmentVariables ¶ added in v0.31.0
ResolveEnvironmentVariables resolves environment variable references in the format %VAR_NAME%
Types ¶
type A2AAgentInfo ¶ added in v0.49.0
type A2AAgentInfo struct {
Name string `yaml:"name" mapstructure:"name"`
URL string `yaml:"url" mapstructure:"url"`
APIKey string `yaml:"api_key" mapstructure:"api_key"`
Description string `yaml:"description,omitempty" mapstructure:"description,omitempty"`
Timeout int `yaml:"timeout" mapstructure:"timeout"`
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
Metadata map[string]string `yaml:"metadata,omitempty" mapstructure:"metadata,omitempty"`
}
A2AAgentInfo contains information about an A2A agent connection
type A2ACacheConfig ¶ added in v0.49.0
type A2ACacheConfig struct {
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
TTL int `yaml:"ttl" mapstructure:"ttl"`
}
A2ACacheConfig contains settings for A2A agent card caching
type A2AConfig ¶ added in v0.49.0
type A2AConfig struct {
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
Agents []string `yaml:"agents,omitempty" mapstructure:"agents"`
Cache A2ACacheConfig `yaml:"cache" mapstructure:"cache"`
Task A2ATaskConfig `yaml:"task" mapstructure:"task"`
Tools A2AToolsConfig `yaml:"tools" mapstructure:"tools"`
}
A2AConfig contains A2A agent configuration
type A2ATaskConfig ¶ added in v0.49.0
type A2ATaskConfig struct {
StatusPollSeconds int `yaml:"status_poll_seconds" mapstructure:"status_poll_seconds"`
PollingStrategy string `yaml:"polling_strategy" mapstructure:"polling_strategy"`
InitialPollIntervalSec int `yaml:"initial_poll_interval_sec" mapstructure:"initial_poll_interval_sec"`
MaxPollIntervalSec int `yaml:"max_poll_interval_sec" mapstructure:"max_poll_interval_sec"`
BackoffMultiplier float64 `yaml:"backoff_multiplier" mapstructure:"backoff_multiplier"`
BackgroundMonitoring bool `yaml:"background_monitoring" mapstructure:"background_monitoring"`
CompletedTaskRetention int `yaml:"completed_task_retention" mapstructure:"completed_task_retention"`
}
A2ATaskConfig contains configuration for A2A task processing
type A2AToolsConfig ¶ added in v0.51.0
type A2AToolsConfig struct {
QueryAgent QueryAgentToolConfig `yaml:"query_agent" mapstructure:"query_agent"`
QueryTask QueryTaskToolConfig `yaml:"query_task" mapstructure:"query_task"`
SubmitTask SubmitTaskToolConfig `yaml:"submit_task" mapstructure:"submit_task"`
DownloadArtifacts DownloadArtifactsToolConfig `yaml:"download_artifacts" mapstructure:"download_artifacts"`
}
A2AToolsConfig contains A2A-specific tool configurations
type AgentConfig ¶ added in v0.36.0
type AgentConfig struct {
Model string `yaml:"model" mapstructure:"model"`
SystemPrompt string `yaml:"system_prompt" mapstructure:"system_prompt"`
SystemPromptPlan string `yaml:"system_prompt_plan" mapstructure:"system_prompt_plan"`
SystemReminders SystemRemindersConfig `yaml:"system_reminders" mapstructure:"system_reminders"`
VerboseTools bool `yaml:"verbose_tools" mapstructure:"verbose_tools"`
MaxTurns int `yaml:"max_turns" mapstructure:"max_turns"`
MaxTokens int `yaml:"max_tokens" mapstructure:"max_tokens"`
MaxConcurrentTools int `yaml:"max_concurrent_tools" mapstructure:"max_concurrent_tools"`
}
AgentConfig contains agent command-specific settings
type AgentDefaults ¶ added in v0.67.0
type AgentDefaults struct {
URL string
ArtifactsURL string
OCI string
Run bool
Model string
Environment map[string]string
}
AgentDefaults contains default configuration for a known agent type
func GetAgentDefaults ¶ added in v0.67.0
func GetAgentDefaults(name string) *AgentDefaults
GetAgentDefaults returns the default configuration for a known agent with dynamically assigned available ports to avoid collisions. Returns nil if the agent is not known.
type AgentEntry ¶ added in v0.54.0
type AgentEntry struct {
Name string `yaml:"name" mapstructure:"name"`
URL string `yaml:"url" mapstructure:"url"`
ArtifactsURL string `yaml:"artifacts_url,omitempty" mapstructure:"artifacts_url,omitempty"`
OCI string `yaml:"oci,omitempty" mapstructure:"oci,omitempty"`
Run bool `yaml:"run" mapstructure:"run"`
Model string `yaml:"model,omitempty" mapstructure:"model,omitempty"`
Environment map[string]string `yaml:"environment,omitempty" mapstructure:"environment,omitempty"`
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
}
AgentEntry represents a single A2A agent configuration
func (*AgentEntry) GetEnvironmentWithModel ¶ added in v0.54.0
func (a *AgentEntry) GetEnvironmentWithModel() map[string]string
GetEnvironmentWithModel returns the environment variables with model-related variables added if a model is specified.
type AgentsConfig ¶ added in v0.54.0
type AgentsConfig struct {
Agents []AgentEntry `yaml:"agents" mapstructure:"agents"`
}
AgentsConfig represents the agents.yaml configuration file
func DefaultAgentsConfig ¶ added in v0.54.0
func DefaultAgentsConfig() *AgentsConfig
DefaultAgentsConfig returns a default agents configuration
type BackgroundShellsConfig ¶ added in v0.81.0
type BackgroundShellsConfig struct {
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
MaxConcurrent int `yaml:"max_concurrent" mapstructure:"max_concurrent"`
MaxOutputBufferMB int `yaml:"max_output_buffer_mb" mapstructure:"max_output_buffer_mb"`
RetentionMinutes int `yaml:"retention_minutes" mapstructure:"retention_minutes"`
}
BackgroundShellsConfig contains background shell execution settings
type BashToolConfig ¶ added in v0.14.1
type BashToolConfig struct {
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
Timeout int `yaml:"timeout" mapstructure:"timeout"`
Whitelist ToolWhitelistConfig `yaml:"whitelist" mapstructure:"whitelist"`
RequireApproval *bool `yaml:"require_approval,omitempty" mapstructure:"require_approval,omitempty"`
BackgroundShells BackgroundShellsConfig `yaml:"background_shells" mapstructure:"background_shells"`
}
BashToolConfig contains bash-specific tool settings
type ChatConfig ¶ added in v0.8.0
type ChatConfig struct {
Theme string `yaml:"theme" mapstructure:"theme"`
Keybindings KeybindingsConfig `yaml:"keybindings" mapstructure:"keybindings"`
}
ChatConfig contains chat interface settings
type ClientConfig ¶ added in v0.36.0
type ClientConfig struct {
Timeout int `yaml:"timeout" mapstructure:"timeout"`
Retry RetryConfig `yaml:"retry" mapstructure:"retry"`
}
ClientConfig contains HTTP client settings
type CompactConfig ¶ added in v0.2.0
type CompactConfig struct {
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
AutoAt int `yaml:"auto_at" mapstructure:"auto_at"`
}
CompactConfig contains conversation compaction settings
type Config ¶
type Config struct {
ContainerRuntime ContainerRuntimeConfig `yaml:"container_runtime" mapstructure:"container_runtime"`
Gateway GatewayConfig `yaml:"gateway" mapstructure:"gateway"`
Client ClientConfig `yaml:"client" mapstructure:"client"`
Logging LoggingConfig `yaml:"logging" mapstructure:"logging"`
Tools ToolsConfig `yaml:"tools" mapstructure:"tools"`
Image ImageConfig `yaml:"image" mapstructure:"image"`
Export ExportConfig `yaml:"export" mapstructure:"export"`
Agent AgentConfig `yaml:"agent" mapstructure:"agent"`
Git GitConfig `yaml:"git" mapstructure:"git"`
SCM SCMConfig `yaml:"scm" mapstructure:"scm"`
Storage StorageConfig `yaml:"storage" mapstructure:"storage"`
Conversation ConversationConfig `yaml:"conversation" mapstructure:"conversation"`
Chat ChatConfig `yaml:"chat" mapstructure:"chat"`
A2A A2AConfig `yaml:"a2a" mapstructure:"a2a"`
MCP MCPConfig `yaml:"mcp" mapstructure:"mcp"`
Init InitConfig `yaml:"init" mapstructure:"init"`
Compact CompactConfig `yaml:"compact" mapstructure:"compact"`
}
Config represents the CLI configuration
func (*Config) GetAgentConfig ¶ added in v0.48.0
func (c *Config) GetAgentConfig() *AgentConfig
func (*Config) GetDefaultModel ¶ added in v0.27.0
func (*Config) GetExcludeModels ¶ added in v0.57.1
func (*Config) GetGatewayURL ¶ added in v0.27.0
func (*Config) GetIncludeModels ¶ added in v0.57.1
func (*Config) GetOutputDirectory ¶ added in v0.27.0
func (*Config) GetProtectedPaths ¶ added in v0.45.3
func (*Config) GetSandboxDirectories ¶ added in v0.45.3
func (*Config) GetSystemPrompt ¶ added in v0.27.0
func (*Config) GetTimeout ¶ added in v0.27.0
func (*Config) IsA2AToolsEnabled ¶ added in v0.51.0
IsA2AToolsEnabled checks if A2A tools should be enabled A2A tools are enabled when a2a.enabled is true, regardless of tools.enabled
func (*Config) IsApprovalRequired ¶ added in v0.14.1
IsApprovalRequired checks if approval is required for a specific tool It returns true if tool-specific approval is set to true, or if global approval is true and tool-specific is not set to false ConfigService interface implementation
func (*Config) IsBashCommandWhitelisted ¶ added in v0.56.0
IsBashCommandWhitelisted checks if a specific bash command is whitelisted
func (*Config) ValidatePathInSandbox ¶ added in v0.29.0
ValidatePathInSandbox checks if a path is within the configured sandbox directories
type ContainerRuntimeConfig ¶ added in v0.82.0
type ContainerRuntimeConfig struct {
Type string `yaml:"type" mapstructure:"type"` // "docker", "podman", or "" for auto-detect
}
ContainerRuntimeConfig contains container runtime settings
type ConversationConfig ¶ added in v0.46.0
type ConversationConfig struct {
TitleGeneration ConversationTitleConfig `yaml:"title_generation" mapstructure:"title_generation"`
}
ConversationConfig contains conversation-specific settings
type ConversationTitleConfig ¶ added in v0.46.0
type ConversationTitleConfig struct {
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
Model string `yaml:"model" mapstructure:"model"`
SystemPrompt string `yaml:"system_prompt" mapstructure:"system_prompt"`
BatchSize int `yaml:"batch_size" mapstructure:"batch_size"`
Interval int `yaml:"interval" mapstructure:"interval"`
}
ConversationTitleConfig contains settings for AI-generated conversation titles
type DeleteToolConfig ¶ added in v0.18.0
type DeleteToolConfig struct {
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
RequireApproval *bool `yaml:"require_approval,omitempty" mapstructure:"require_approval,omitempty"`
}
DeleteToolConfig contains delete-specific tool settings
type DownloadArtifactsToolConfig ¶ added in v0.52.0
type DownloadArtifactsToolConfig struct {
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
DownloadDir string `yaml:"download_dir" mapstructure:"download_dir"`
TimeoutSeconds int `yaml:"timeout_seconds" mapstructure:"timeout_seconds"`
RequireApproval *bool `yaml:"require_approval,omitempty" mapstructure:"require_approval,omitempty"`
}
DownloadArtifactsToolConfig contains DownloadArtifacts-specific tool settings
type EditToolConfig ¶ added in v0.21.0
type EditToolConfig struct {
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
RequireApproval *bool `yaml:"require_approval,omitempty" mapstructure:"require_approval,omitempty"`
}
EditToolConfig contains edit-specific tool settings
type ExportConfig ¶ added in v0.63.0
type ExportConfig struct {
OutputDir string `yaml:"output_dir" mapstructure:"output_dir"`
SummaryModel string `yaml:"summary_model" mapstructure:"summary_model"`
}
ExportConfig contains settings for export command
type FetchCacheConfig ¶ added in v0.11.0
type FetchCacheConfig struct {
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
TTL int `yaml:"ttl" mapstructure:"ttl"`
MaxSize int64 `yaml:"max_size" mapstructure:"max_size"`
}
FetchCacheConfig contains cache settings for fetch operations
type FetchSafetyConfig ¶ added in v0.11.0
type FetchSafetyConfig struct {
MaxSize int64 `yaml:"max_size" mapstructure:"max_size"`
Timeout int `yaml:"timeout" mapstructure:"timeout"`
AllowRedirect bool `yaml:"allow_redirect" mapstructure:"allow_redirect"`
}
FetchSafetyConfig contains safety settings for fetch operations
type GatewayConfig ¶
type GatewayConfig struct {
URL string `yaml:"url" mapstructure:"url"`
APIKey string `yaml:"api_key" mapstructure:"api_key"`
Timeout int `yaml:"timeout" mapstructure:"timeout"`
OCI string `yaml:"oci,omitempty" mapstructure:"oci,omitempty"`
Run bool `yaml:"run" mapstructure:"run"`
StandaloneBinary bool `yaml:"standalone_binary" mapstructure:"standalone_binary"`
Debug bool `yaml:"debug,omitempty" mapstructure:"debug,omitempty"`
IncludeModels []string `yaml:"include_models,omitempty" mapstructure:"include_models,omitempty"`
ExcludeModels []string `yaml:"exclude_models,omitempty" mapstructure:"exclude_models,omitempty"`
VisionEnabled bool `yaml:"vision_enabled" mapstructure:"vision_enabled"`
}
GatewayConfig contains gateway connection settings
type GitCommitMessageConfig ¶ added in v0.42.0
type GitCommitMessageConfig struct {
Model string `yaml:"model" mapstructure:"model"`
SystemPrompt string `yaml:"system_prompt" mapstructure:"system_prompt"`
}
GitCommitMessageConfig contains settings for AI-generated commit messages
type GitConfig ¶ added in v0.42.0
type GitConfig struct {
CommitMessage GitCommitMessageConfig `yaml:"commit_message" mapstructure:"commit_message"`
}
GitConfig contains git shortcut-specific settings
type GithubSafetyConfig ¶ added in v0.31.0
type GithubSafetyConfig struct {
MaxSize int64 `yaml:"max_size" mapstructure:"max_size"`
Timeout int `yaml:"timeout" mapstructure:"timeout"`
}
GithubSafetyConfig contains safety settings for GitHub fetch operations
type GithubToolConfig ¶ added in v0.31.0
type GithubToolConfig struct {
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
Token string `yaml:"token" mapstructure:"token"`
BaseURL string `yaml:"base_url" mapstructure:"base_url"`
Owner string `yaml:"owner" mapstructure:"owner"`
Repo string `yaml:"repo,omitempty" mapstructure:"repo,omitempty"`
Safety GithubSafetyConfig `yaml:"safety" mapstructure:"safety"`
RequireApproval *bool `yaml:"require_approval,omitempty" mapstructure:"require_approval,omitempty"`
}
GithubToolConfig contains GitHub fetch-specific tool settings
type GrepToolConfig ¶ added in v0.19.0
type GrepToolConfig struct {
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
Backend string `yaml:"backend" mapstructure:"backend"`
RequireApproval *bool `yaml:"require_approval,omitempty" mapstructure:"require_approval,omitempty"`
}
GrepToolConfig contains grep-specific tool settings
type ImageConfig ¶ added in v0.72.0
type ImageConfig struct {
MaxSize int64 `yaml:"max_size" mapstructure:"max_size"`
Timeout int `yaml:"timeout" mapstructure:"timeout"`
}
ImageConfig contains image service settings
type InitConfig ¶ added in v0.59.0
type InitConfig struct {
Prompt string `yaml:"prompt" mapstructure:"prompt"`
}
InitConfig contains settings for the /init shortcut
type KeyBindingEntry ¶ added in v0.77.0
type KeyBindingEntry struct {
Keys []string `yaml:"keys" mapstructure:"keys"`
Description string `yaml:"description,omitempty" mapstructure:"description,omitempty"`
Category string `yaml:"category,omitempty" mapstructure:"category,omitempty"`
Enabled *bool `yaml:"enabled,omitempty" mapstructure:"enabled,omitempty"`
}
KeyBindingEntry defines a complete keybinding with its properties
type KeyNamespace ¶ added in v0.77.0
type KeyNamespace string
KeyNamespace represents the namespace for key binding actions
const ( NamespaceGlobal KeyNamespace = "global" NamespaceChat KeyNamespace = "chat" NamespaceClipboard KeyNamespace = "clipboard" NamespaceDisplay KeyNamespace = "display" NamespaceHelp KeyNamespace = "help" NamespaceMode KeyNamespace = "mode" NamespacePlanApproval KeyNamespace = "plan_approval" NamespaceSelection KeyNamespace = "selection" NamespaceTextEditing KeyNamespace = "text_editing" NamespaceTools KeyNamespace = "tools" )
Namespace constants for organizing key binding actions
type KeybindingsConfig ¶ added in v0.77.0
type KeybindingsConfig struct {
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
Bindings map[string]KeyBindingEntry `yaml:"bindings,omitempty" mapstructure:"bindings,omitempty"`
}
KeybindingsConfig contains settings for customizing keybindings
type LoggingConfig ¶ added in v0.29.4
type LoggingConfig struct {
Debug bool `yaml:"debug" mapstructure:"debug"`
Dir string `yaml:"dir" mapstructure:"dir"`
}
LoggingConfig contains logging settings
type MCPConfig ¶ added in v0.79.0
type MCPConfig struct {
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
ConnectionTimeout int `yaml:"connection_timeout,omitempty" mapstructure:"connection_timeout,omitempty"`
DiscoveryTimeout int `yaml:"discovery_timeout,omitempty" mapstructure:"discovery_timeout,omitempty"`
LivenessProbeEnabled bool `yaml:"liveness_probe_enabled,omitempty" mapstructure:"liveness_probe_enabled,omitempty"`
LivenessProbeInterval int `yaml:"liveness_probe_interval,omitempty" mapstructure:"liveness_probe_interval,omitempty"`
Servers []MCPServerEntry `yaml:"servers" mapstructure:"servers"`
}
MCPConfig represents the mcp.yaml configuration file
func DefaultMCPConfig ¶ added in v0.79.0
func DefaultMCPConfig() *MCPConfig
DefaultMCPConfig returns a default MCP configuration
type MCPServerEntry ¶ added in v0.79.0
type MCPServerEntry struct {
Name string `yaml:"name" mapstructure:"name"`
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
Timeout int `yaml:"timeout,omitempty" mapstructure:"timeout,omitempty"`
Description string `yaml:"description,omitempty" mapstructure:"description,omitempty"`
IncludeTools []string `yaml:"include_tools,omitempty" mapstructure:"include_tools,omitempty"`
ExcludeTools []string `yaml:"exclude_tools,omitempty" mapstructure:"exclude_tools,omitempty"`
Run bool `yaml:"run" mapstructure:"run"`
Host string `yaml:"host,omitempty" mapstructure:"host,omitempty"`
Scheme string `yaml:"scheme,omitempty" mapstructure:"scheme,omitempty"`
Port int `yaml:"port,omitempty" mapstructure:"port,omitempty"`
Ports []string `yaml:"ports,omitempty" mapstructure:"ports,omitempty"`
Path string `yaml:"path,omitempty" mapstructure:"path,omitempty"`
OCI string `yaml:"oci,omitempty" mapstructure:"oci,omitempty"`
Entrypoint []string `yaml:"entrypoint,omitempty" mapstructure:"entrypoint,omitempty"`
Command []string `yaml:"command,omitempty" mapstructure:"command,omitempty"`
Args []string `yaml:"args,omitempty" mapstructure:"args,omitempty"`
Env map[string]string `yaml:"env,omitempty" mapstructure:"env,omitempty"`
Volumes []string `yaml:"volumes,omitempty" mapstructure:"volumes,omitempty"`
StartupTimeout int `yaml:"startup_timeout,omitempty" mapstructure:"startup_timeout,omitempty"`
HealthCmd string `yaml:"health_cmd,omitempty" mapstructure:"health_cmd,omitempty"`
}
MCPServerEntry represents a single MCP server configuration
func (*MCPServerEntry) GetPrimaryPort ¶ added in v0.80.0
func (e *MCPServerEntry) GetPrimaryPort() int
GetPrimaryPort returns the primary (first) host port Priority: port field > ports array > 0
func (*MCPServerEntry) GetStartupTimeout ¶ added in v0.80.0
func (e *MCPServerEntry) GetStartupTimeout() int
GetStartupTimeout returns the effective startup timeout for this server
func (*MCPServerEntry) GetTimeout ¶ added in v0.79.0
func (e *MCPServerEntry) GetTimeout(globalTimeout int) int
GetTimeout returns the effective timeout for this server
func (*MCPServerEntry) GetURL ¶ added in v0.80.0
func (e *MCPServerEntry) GetURL() string
GetURL returns the full URL for the server Builds from host, scheme, ports, and path
func (*MCPServerEntry) ShouldIncludeTool ¶ added in v0.79.0
func (e *MCPServerEntry) ShouldIncludeTool(toolName string) bool
ShouldIncludeTool determines if a tool should be included based on include/exclude lists
type PostgresStorageConfig ¶ added in v0.45.0
type PostgresStorageConfig struct {
Host string `yaml:"host" mapstructure:"host"`
Port int `yaml:"port" mapstructure:"port"`
Database string `yaml:"database" mapstructure:"database"`
Username string `yaml:"username" mapstructure:"username"`
Password string `yaml:"password" mapstructure:"password"`
SSLMode string `yaml:"ssl_mode" mapstructure:"ssl_mode"`
}
PostgresStorageConfig contains Postgres-specific configuration
type QueryAgentToolConfig ¶ added in v0.51.0
type QueryAgentToolConfig struct {
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
RequireApproval *bool `yaml:"require_approval,omitempty" mapstructure:"require_approval,omitempty"`
}
QueryAgentToolConfig contains Query-specific tool settings
type QueryTaskToolConfig ¶ added in v0.51.0
type QueryTaskToolConfig struct {
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
RequireApproval *bool `yaml:"require_approval,omitempty" mapstructure:"require_approval,omitempty"`
}
QueryTaskToolConfig contains QueryTask-specific tool settings
type ReadToolConfig ¶ added in v0.14.1
type ReadToolConfig struct {
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
RequireApproval *bool `yaml:"require_approval,omitempty" mapstructure:"require_approval,omitempty"`
}
ReadToolConfig contains read-specific tool settings
type RedisStorageConfig ¶ added in v0.45.0
type RedisStorageConfig struct {
Host string `yaml:"host" mapstructure:"host"`
Port int `yaml:"port" mapstructure:"port"`
Password string `yaml:"password" mapstructure:"password"`
DB int `yaml:"db" mapstructure:"db"`
}
RedisStorageConfig contains Redis-specific configuration
type RetryConfig ¶ added in v0.36.0
type RetryConfig struct {
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
MaxAttempts int `yaml:"max_attempts" mapstructure:"max_attempts"`
InitialBackoffSec int `yaml:"initial_backoff_sec" mapstructure:"initial_backoff_sec"`
MaxBackoffSec int `yaml:"max_backoff_sec" mapstructure:"max_backoff_sec"`
BackoffMultiplier int `yaml:"backoff_multiplier" mapstructure:"backoff_multiplier"`
RetryableStatusCodes []int `yaml:"retryable_status_codes" mapstructure:"retryable_status_codes"`
}
RetryConfig contains retry logic settings
type SCMCleanupConfig ¶ added in v0.62.0
type SCMCleanupConfig struct {
ReturnToBase bool `yaml:"return_to_base" mapstructure:"return_to_base"`
DeleteLocalBranch bool `yaml:"delete_local_branch" mapstructure:"delete_local_branch"`
}
SCMCleanupConfig contains settings for cleanup after PR creation
type SCMConfig ¶ added in v0.62.0
type SCMConfig struct {
PRCreate SCMPRCreateConfig `yaml:"pr_create" mapstructure:"pr_create"`
Cleanup SCMCleanupConfig `yaml:"cleanup" mapstructure:"cleanup"`
}
SCMConfig contains settings for source control management shortcuts
type SCMPRCreateConfig ¶ added in v0.62.0
type SCMPRCreateConfig struct {
Prompt string `yaml:"prompt" mapstructure:"prompt"`
BaseBranch string `yaml:"base_branch" mapstructure:"base_branch"`
BranchPrefix string `yaml:"branch_prefix" mapstructure:"branch_prefix"`
Model string `yaml:"model" mapstructure:"model"`
}
SCMPRCreateConfig contains settings for the /scm pr create shortcut
type SQLiteStorageConfig ¶ added in v0.45.0
type SQLiteStorageConfig struct {
Path string `yaml:"path" mapstructure:"path"`
}
SQLiteStorageConfig contains SQLite-specific configuration
type SafetyConfig ¶ added in v0.3.0
type SafetyConfig struct {
RequireApproval bool `yaml:"require_approval" mapstructure:"require_approval"`
}
SafetyConfig contains safety approval settings
type SandboxConfig ¶ added in v0.29.0
type SandboxConfig struct {
Directories []string `yaml:"directories" mapstructure:"directories"`
ProtectedPaths []string `yaml:"protected_paths" mapstructure:"protected_paths"`
}
SandboxConfig contains sandbox directory settings
type StorageConfig ¶ added in v0.45.0
type StorageConfig struct {
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
Type StorageType `yaml:"type" mapstructure:"type"`
SQLite SQLiteStorageConfig `yaml:"sqlite,omitempty" mapstructure:"sqlite,omitempty"`
Postgres PostgresStorageConfig `yaml:"postgres,omitempty" mapstructure:"postgres,omitempty"`
Redis RedisStorageConfig `yaml:"redis,omitempty" mapstructure:"redis,omitempty"`
}
StorageConfig contains storage backend configuration
type StorageType ¶ added in v0.45.0
type StorageType string
StorageType represents the type of storage backend
const ( StorageTypeMemory StorageType = "memory" StorageTypeSQLite StorageType = "sqlite" StorageTypePostgres StorageType = "postgres" StorageTypeRedis StorageType = "redis" )
type SubmitTaskToolConfig ¶ added in v0.51.0
type SubmitTaskToolConfig struct {
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
RequireApproval *bool `yaml:"require_approval,omitempty" mapstructure:"require_approval,omitempty"`
}
SubmitTaskToolConfig contains SubmitTask-specific tool settings
type SystemRemindersConfig ¶ added in v0.35.0
type SystemRemindersConfig struct {
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
Interval int `yaml:"interval" mapstructure:"interval"`
ReminderText string `yaml:"reminder_text" mapstructure:"reminder_text"`
}
SystemRemindersConfig contains settings for dynamic system reminders
type TodoWriteToolConfig ¶ added in v0.20.0
type TodoWriteToolConfig struct {
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
RequireApproval *bool `yaml:"require_approval,omitempty" mapstructure:"require_approval,omitempty"`
}
TodoWriteToolConfig contains TodoWrite-specific tool settings
type ToolWhitelistConfig ¶
type ToolWhitelistConfig struct {
Commands []string `yaml:"commands" mapstructure:"commands"`
Patterns []string `yaml:"patterns" mapstructure:"patterns"`
}
ToolWhitelistConfig contains whitelisted commands and patterns
type ToolsConfig ¶
type ToolsConfig struct {
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
Sandbox SandboxConfig `yaml:"sandbox" mapstructure:"sandbox"`
Bash BashToolConfig `yaml:"bash" mapstructure:"bash"`
Read ReadToolConfig `yaml:"read" mapstructure:"read"`
Write WriteToolConfig `yaml:"write" mapstructure:"write"`
Edit EditToolConfig `yaml:"edit" mapstructure:"edit"`
Delete DeleteToolConfig `yaml:"delete" mapstructure:"delete"`
Grep GrepToolConfig `yaml:"grep" mapstructure:"grep"`
Tree TreeToolConfig `yaml:"tree" mapstructure:"tree"`
WebFetch WebFetchToolConfig `yaml:"web_fetch" mapstructure:"web_fetch"`
WebSearch WebSearchToolConfig `yaml:"web_search" mapstructure:"web_search"`
Github GithubToolConfig `yaml:"github" mapstructure:"github"`
TodoWrite TodoWriteToolConfig `yaml:"todo_write" mapstructure:"todo_write"`
Safety SafetyConfig `yaml:"safety" mapstructure:"safety"`
}
ToolsConfig contains tool execution settings
type TreeToolConfig ¶ added in v0.16.0
type TreeToolConfig struct {
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
RequireApproval *bool `yaml:"require_approval,omitempty" mapstructure:"require_approval,omitempty"`
}
TreeToolConfig contains tree-specific tool settings
type WebFetchToolConfig ¶ added in v0.24.1
type WebFetchToolConfig struct {
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
WhitelistedDomains []string `yaml:"whitelisted_domains" mapstructure:"whitelisted_domains"`
Safety FetchSafetyConfig `yaml:"safety" mapstructure:"safety"`
Cache FetchCacheConfig `yaml:"cache" mapstructure:"cache"`
RequireApproval *bool `yaml:"require_approval,omitempty" mapstructure:"require_approval,omitempty"`
}
WebFetchToolConfig contains fetch-specific tool settings
type WebSearchToolConfig ¶ added in v0.14.1
type WebSearchToolConfig struct {
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
DefaultEngine string `yaml:"default_engine" mapstructure:"default_engine"`
MaxResults int `yaml:"max_results" mapstructure:"max_results"`
Engines []string `yaml:"engines" mapstructure:"engines"`
Timeout int `yaml:"timeout" mapstructure:"timeout"`
RequireApproval *bool `yaml:"require_approval,omitempty" mapstructure:"require_approval,omitempty"`
}
WebSearchToolConfig contains web search-specific tool settings
type WriteToolConfig ¶ added in v0.17.0
type WriteToolConfig struct {
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
RequireApproval *bool `yaml:"require_approval,omitempty" mapstructure:"require_approval,omitempty"`
}
WriteToolConfig contains write-specific tool settings