config

package
v0.132.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AgentsFileName    = "agents.yaml"
	DefaultAgentsPath = ConfigDirName + "/" + AgentsFileName
)
View Source
const (
	ChannelsFileName    = "channels.yaml"
	DefaultChannelsPath = ConfigDirName + "/" + ChannelsFileName
)
View Source
const (
	ComputerUseFileName    = "computer_use.yaml"
	DefaultComputerUsePath = ConfigDirName + "/" + ComputerUseFileName
)
View Source
const (
	ConfigDirName       = ".infer"
	AgentsDirName       = ".agents"
	ConfigFileName      = "config.yaml"
	GitignoreFileName   = ".gitignore"
	LogsDirName         = "logs"
	MemoryDirName       = "memory"
	MemoryIndexFileName = "MEMORY.md"

	DefaultConfigPath     = ConfigDirName + "/" + ConfigFileName
	DefaultLogsPath       = ConfigDirName + "/" + LogsDirName
	DefaultMemoryMaxChars = 4000
)
View Source
const (
	ApprovalBehaviourPrompt = "prompt"
	ApprovalBehaviourIPC    = "ipc"
	ApprovalBehaviourBlock  = "block"
)

Approval-behaviour values for SafetyConfig.ApprovalBehaviour - they select HOW a tool that needs approval is delivered (see SafetyConfig for full semantics).

View Source
const (
	HeartbeatFileName    = "heartbeat.yaml"
	DefaultHeartbeatPath = ConfigDirName + "/" + HeartbeatFileName
)
View Source
const (
	HooksFileName    = "hooks.yaml"
	DefaultHooksPath = ConfigDirName + "/" + HooksFileName
)
View Source
const (
	KeybindingsFileName    = "keybindings.yaml"
	DefaultKeybindingsPath = ConfigDirName + "/" + KeybindingsFileName
)
View Source
const (
	MCPFileName    = "mcp.yaml"
	DefaultMCPPath = ConfigDirName + "/" + MCPFileName
)
View Source
const (
	MemoryConfigFileName    = "memory.yaml"
	DefaultMemoryConfigPath = ConfigDirName + "/" + MemoryConfigFileName
)
View Source
const (
	MemoryBackendLocal = "local"
	MemoryBackendGit   = "git"
)

Memory backend types selected by memory.backend.type.

View Source
const (
	MemorySyncPull = "pull"
	MemorySyncPush = "push"
	MemorySyncOff  = "off"
)

Memory git sync actions (memory.backend.git.sync.on_start / on_finish).

View Source
const (
	DefaultMemoryGitBranch        = "main"
	DefaultMemoryGitCommitMessage = "chore(memory): sync"
	DefaultMemoryGitTimeout       = 60
)

Defaults for the git backend, applied by the Effective* helpers when a (possibly partial) memory.yaml leaves them blank - LoadMemory unmarshals into a zero struct when the file exists, so struct-level defaults do not merge in.

View Source
const (
	PromptsFileName    = "prompts.yaml"
	DefaultPromptsPath = ConfigDirName + "/" + PromptsFileName
)
View Source
const (
	RemindersFileName    = "reminders.yaml"
	DefaultRemindersPath = ConfigDirName + "/" + RemindersFileName
)
View Source
const DefaultContextWindow = 8192

DefaultContextWindow is the fallback context window size when no pattern matches.

View Source
const DefaultHooksYAML = `` /* 740-byte string literal not displayed */

DefaultHooksYAML is what `infer init` writes to a fresh hooks.yaml. Hooks ship disabled with NO active entry: the example is commented out so the shape is discoverable without anything running until the user opts in (and allow-lists the command). `infer` drives any project, not just Go ones, so there is no language-specific default hook. DefaultHooksConfig is the in-memory equivalent (empty list); this template only adds the human-facing example and guidance.

View Source
const DefaultModeChangeReminderName = "mode-change-reminder"
View Source
const DefaultModeChangeReminderText = `` /* 184-byte string literal not displayed */
View Source
const InferGitignoreContent = `` /* 169-byte string literal not displayed */

InferGitignoreContent is the .gitignore seeded into a project-local ./.infer/ so runtime artifacts (logs, conversations, downloaded binaries, backups) are never committed. Shared by `infer init` and the runtime auto-provisioner so both stay in lockstep.

Variables

View Source
var ContextMatchers = []ModelMatcher{
	{Patterns: []string{"fable"}, ContextWindow: 1000000},
	{Patterns: []string{"claude-opus-4-7", "claude-opus-4-8"}, ContextWindow: 1000000},
	{Patterns: []string{"claude-opus-4", "claude-sonnet-4", "claude-haiku-4"}, ContextWindow: 200000},
	{Patterns: []string{"claude"}, ContextWindow: 200000},
	{Patterns: []string{"gemini-3"}, ContextWindow: 1048576},
	{Patterns: []string{"gemini-2", "gemini-1.5"}, ContextWindow: 1000000},
	{Patterns: []string{"gemini-pro", "gemini-flash"}, ContextWindow: 1000000},
	{Patterns: []string{"gemini"}, ContextWindow: 32768},
	{Patterns: []string{"deep-research"}, ContextWindow: 1048576},
	{Patterns: []string{"gemma-3-1b", "gemma3:1b", "gemma-3n", "gemma3n"}, ContextWindow: 32768},
	{Patterns: []string{"gemma-3", "gemma3", "gemma-4", "gemma4"}, ContextWindow: 131072},
	{Patterns: []string{"gpt-oss"}, ContextWindow: 131072},
	{Patterns: []string{"deepseek-v4"}, ContextWindow: 1000000},
	{Patterns: []string{"deepseek-v3"}, ContextWindow: 131072},
	{Patterns: []string{"deepseek"}, ContextWindow: 131072},
	{Patterns: []string{"qwen3", "qwen-3"}, ContextWindow: 262144},
	{Patterns: []string{"qwen2.5", "qwen-2.5"}, ContextWindow: 131072},
	{Patterns: []string{"qwen"}, ContextWindow: 128000},
	{Patterns: []string{"ministral-3"}, ContextWindow: 256000},
	{Patterns: []string{"ministral"}, ContextWindow: 131072},
	{Patterns: []string{"mistral-large"}, ContextWindow: 131072},
	{Patterns: []string{"devstral"}, ContextWindow: 131072},
	{Patterns: []string{"mistral", "mixtral"}, ContextWindow: 32768},
	{Patterns: []string{"minimax-m2"}, ContextWindow: 204800},
	{Patterns: []string{"minimax-m3"}, ContextWindow: 1000000},
	{Patterns: []string{"glm-4", "glm-5"}, ContextWindow: 200000},
	{Patterns: []string{"nemotron-3"}, ContextWindow: 262144},
	{Patterns: []string{"kimi-k2", "kimi-latest"}, ContextWindow: 262144},
	{Patterns: []string{"moonshot-v1-128k"}, ContextWindow: 131072},
	{Patterns: []string{"moonshot-v1-32k"}, ContextWindow: 32768},
	{Patterns: []string{"moonshot-v1-8k", "moonshot-v1-auto"}, ContextWindow: 8192},
}

ContextMatchers defines all model patterns in priority order. More specific patterns must come before less specific ones because matching uses strings.Contains (e.g. "gemma-3-1b" must precede "gemma-3", and "gemini-3" must precede "gemini-2"/"gemini").

Coverage tracks the model IDs the gateway actually returns from /v1/models; model families that aren't served are intentionally omitted to keep the list small and the View output truthful.

View Source
var DefaultModelPricing = map[string]ModelPricing{}/* 126 elements not displayed */

DefaultModelPricing contains hardcoded pricing for common models. Prices are based on publicly available pricing as of December 2024. Users can override these in their config files.

ReminderTriggers is the canonical catalog, used for config validation.

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 BashCommandRejectionHint added in v0.121.0

func BashCommandRejectionHint(command string) string

BashCommandRejectionHint returns a short, actionable explanation when command is rejected by the clean-command guard (substitution, a compound/piped command, an env-var leak, a file-write redirect, or a dangerous find action), so the model gets precise feedback it can act on rather than a bare "not allowed". It returns "" when the command is simply not in the allow-list with no structural reason - the bare message ("command not allowed: <cmd>") already tells the model to try a different command. Callers surface it only alongside an actual rejection.

func DefaultKeybindingActionIDs added in v0.128.0

func DefaultKeybindingActionIDs() map[string]struct{}

DefaultKeybindingActionIDs returns the set of every action ID present in the default keybindings, including the namespace-path actions (chat_focus_attachments, diff_viewer_*, explorer_*) that components resolve directly via ResolveNamespaceBindings and that the runtime key registry never registers. Callers use it to tell a legitimate (if unregistered) action from a typo.

func EnsureProjectGitignore added in v0.126.0

func EnsureProjectGitignore() error

EnsureProjectGitignore writes ./.infer/.gitignore if it is absent, creating ./.infer/ if needed. It is idempotent: an existing file is left untouched so `infer init --project` output and user edits are preserved.

It targets the bare project-relative ConfigDirName (not GetConfigDir()) on purpose: the runtime artifacts it guards - logs, conversations, the gateway binary, backups - always land in the project-local ./.infer/ regardless of where config itself resolves.

func FindAvailablePort added in v0.80.0

func FindAvailablePort(basePort int) int

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 Thread-safe: uses global port registry to prevent race conditions

func GetAgentURLs added in v0.104.1

func GetAgentURLs(path string) ([]string, error)

GetAgentURLs returns URLs of all configured agents.

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 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

func ParseModel(model string) (provider, modelName string)

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 ResolveAgentsPath added in v0.111.0

func ResolveAgentsPath() string

ResolveAgentsPath returns the path agents.yaml should be loaded from, matching A2AAgentService's lookup order: project-level `.infer/agents.yaml` wins if present, otherwise the userspace `~/.infer/agents.yaml`, otherwise the project default (which may not exist yet - LoadAgents handles that gracefully).

func ResolveApprovalDelivery added in v0.121.0

func ResolveApprovalDelivery(behaviour string, brokerAttached, isChat bool) string

ResolveApprovalDelivery decides the effective action for a tool that needs approval, given the configured tools.safety.approval_behaviour, whether an IPC approval broker is attached (headless under the channel manager, i.e. `--require-approval`), and whether we are in interactive chat. It returns one of the ApprovalBehaviour* values (prompt | ipc | block) - the same vocabulary as the config - applying the "channel not reachable -> block" fallback so the chat policy and the headless executor agree on a single safe rule.

  • "block": always reject.
  • "ipc": deliver over IPC if a broker is attached, otherwise block (there is no IPC broker in chat, so this blocks there - a chat user should use the default "prompt" instead).
  • "prompt" (and any unrecognised value, which resolves to this safe default): a TUI prompt in chat; otherwise IPC if a broker is attached (the channel manager relays the prompt to the user); otherwise block (e.g. CI/heartbeat with no approver).

func ResolveConfigDir added in v0.104.1

func ResolveConfigDir() string

ResolveConfigDir searches the standard project then userspace locations for an existing config.yaml and returns its directory. Falls back to the default project directory name when nothing is found on disk.

func ResolveNamespaceBindings added in v0.118.0

func ResolveNamespaceBindings(cfg KeybindingsConfig, ns KeyNamespace) map[string][]string

ResolveNamespaceBindings returns the effective key lists for every default action in the namespace, applying any user overrides from cfg (and skipping actions the user explicitly disabled). Action IDs absent from cfg fall back to their built-in default keys, so the result is complete even for keybindings.yaml files written before the namespace existed.

func SaveAgents added in v0.104.1

func SaveAgents(path string, cfg *AgentsConfig) error

SaveAgents writes the agents configuration to disk, creating any missing parent directories.

func SaveChannels added in v0.104.1

func SaveChannels(path string, cfg *ChannelsConfig) error

SaveChannels writes the channels configuration to disk, creating any missing parent directories. The file holds bot tokens / access tokens, so callers should ensure it is also listed in tools.sandbox.protected_paths.

func SaveComputerUse added in v0.104.1

func SaveComputerUse(path string, cfg *ComputerUseConfig) error

SaveComputerUse writes the computer_use configuration to disk, creating any missing parent directories.

func SaveHeartbeat added in v0.108.0

func SaveHeartbeat(path string, cfg *HeartbeatConfig) error

SaveHeartbeat writes the heartbeat configuration to disk, creating any missing parent directories.

func SaveHooks added in v0.125.0

func SaveHooks(path string, cfg *HooksConfig) error

SaveHooks writes the hooks configuration to disk, creating any missing parent directories.

func SaveKeybindings added in v0.104.1

func SaveKeybindings(path string, cfg *KeybindingsConfig) error

SaveKeybindings writes the keybindings configuration to disk, creating any missing parent directories.

func SaveMCP added in v0.104.1

func SaveMCP(path string, cfg *MCPConfig) error

SaveMCP writes the MCP configuration to disk, creating any missing parent directories.

func SaveMemory added in v0.126.0

func SaveMemory(path string, cfg *MemoryConfig) error

SaveMemory writes the memory configuration to disk, creating any missing parent directories.

func SavePrompts added in v0.104.1

func SavePrompts(path string, cfg *PromptsConfig) error

SavePrompts writes the prompts configuration to disk, creating any missing parent directories.

func SaveReminders added in v0.125.0

func SaveReminders(path string, cfg *RemindersConfig) error

SaveReminders writes the reminders configuration to disk, creating any missing parent directories.

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"`
	AgentModeMaxWaitSeconds int     `yaml:"agent_mode_max_wait_seconds" mapstructure:"agent_mode_max_wait_seconds"`
}

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"`
}

A2AToolsConfig contains A2A-specific tool configurations

type ActivateAppToolConfig added in v0.96.0

type ActivateAppToolConfig struct {
	Enabled bool `yaml:"enabled" mapstructure:"enabled"`
}

ActivateAppToolConfig contains activate app-specific tool settings

type AgentConfig added in v0.36.0

type AgentConfig struct {
	Model                    string             `yaml:"model" mapstructure:"model"`
	SystemPromptWithDefaults bool               `yaml:"system_prompt_with_defaults" mapstructure:"system_prompt_with_defaults"`
	Context                  AgentContextConfig `yaml:"context" mapstructure:"context"`
	Skills                   AgentSkillsConfig  `yaml:"skills" mapstructure:"skills"`
	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. All system prompts, custom instructions, and system reminder settings live in prompts.yaml and are read from cfg.Prompts.Agent.* at runtime.

type AgentContextConfig added in v0.99.0

type AgentContextConfig struct {
	GitContextEnabled      bool `yaml:"git_context_enabled" mapstructure:"git_context_enabled"`
	WorkingDirEnabled      bool `yaml:"working_dir_enabled" mapstructure:"working_dir_enabled"`
	GitContextRefreshTurns int  `yaml:"git_context_refresh_turns" mapstructure:"git_context_refresh_turns"`
}

AgentContextConfig contains settings for agent context enrichment

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 AgentInteractiveConfig added in v0.124.0

type AgentInteractiveConfig struct {
	Multiplexer string `yaml:"multiplexer" mapstructure:"multiplexer"` // tmux (only supported value)
	Layout      string `yaml:"layout" mapstructure:"layout"`           // vertical | horizontal | window
	Fallback    string `yaml:"fallback" mapstructure:"fallback"`       // headless | error (when not inside tmux)
}

AgentInteractiveConfig configures the tmux-backed interactive surface for subagents (used when mode is "interactive").

type AgentSkillsConfig added in v0.109.0

type AgentSkillsConfig struct {
	Enabled        bool     `yaml:"enabled" mapstructure:"enabled"`
	DisabledSkills []string `yaml:"disabled_skills,omitempty" mapstructure:"disabled_skills"`
}

AgentSkillsConfig controls Agent Skills loading. Skills follow the SKILL.md / YAML-frontmatter contract shared by the official spec, so existing skill folders drop into .infer/skills/ unchanged. Enabled by default - disable via agent.skills.enabled=false in config. When off, no scan runs and nothing is injected into the system prompt.

type AgentToolConfig added in v0.124.0

type AgentToolConfig struct {
	Enabled            bool                   `yaml:"enabled" mapstructure:"enabled"`
	RequireApproval    *bool                  `yaml:"require_approval,omitempty" mapstructure:"require_approval,omitempty"`
	Mode               string                 `yaml:"mode" mapstructure:"mode"`                 // headless | interactive
	Wait               bool                   `yaml:"wait" mapstructure:"wait"`                 // false => async (fire-and-forget + notify)
	MaxParallel        int                    `yaml:"max_parallel" mapstructure:"max_parallel"` // cap on concurrent subagents per call
	MaxDepth           int                    `yaml:"max_depth" mapstructure:"max_depth"`       // recursion guard (a subagent is itself an `infer agent`)
	Model              string                 `yaml:"model,omitempty" mapstructure:"model,omitempty"`
	Interactive        AgentInteractiveConfig `yaml:"interactive" mapstructure:"interactive"`
	CompletedRetention int                    `yaml:"completed_retention" mapstructure:"completed_retention"`
}

AgentToolConfig contains settings for the Agent tool, which spawns local subagents (each an `infer agent` subprocess) in parallel and folds their results back into the main context. Unlike the A2A tools it needs no agent server. Subagents run either headless (background) or interactive (in a tmux pane the user can watch).

type AgentsConfig added in v0.54.0

type AgentsConfig struct {
	Agents []AgentEntry `yaml:"agents" mapstructure:"agents"`
	// contains filtered or unexported fields
}

AgentsConfig represents the agents.yaml configuration file

func DefaultAgentsConfig added in v0.54.0

func DefaultAgentsConfig() *AgentsConfig

DefaultAgentsConfig returns a default agents configuration

func LoadAgents added in v0.104.1

func LoadAgents(path string) (*AgentsConfig, error)

LoadAgents reads agents.yaml from disk. When the file is missing it returns the in-code defaults so callers can treat absence as "use defaults" without special-casing.

func (*AgentsConfig) CreateEntry added in v0.104.1

func (c *AgentsConfig) CreateEntry(entry AgentEntry) error

CreateEntry implements CollectionConfig.

func (*AgentsConfig) DeleteEntry added in v0.104.1

func (c *AgentsConfig) DeleteEntry(name string) error

DeleteEntry implements CollectionConfig.

func (*AgentsConfig) ListEntries added in v0.104.1

func (c *AgentsConfig) ListEntries() []AgentEntry

ListEntries implements CollectionConfig.

func (*AgentsConfig) ReadEntry added in v0.104.1

func (c *AgentsConfig) ReadEntry(name string) (*AgentEntry, error)

ReadEntry implements CollectionConfig.

func (*AgentsConfig) UpdateEntry added in v0.104.1

func (c *AgentsConfig) UpdateEntry(entry AgentEntry) error

UpdateEntry implements CollectionConfig.

type AskUserQuestionToolConfig added in v0.124.0

type AskUserQuestionToolConfig struct {
	Enabled bool `yaml:"enabled" mapstructure:"enabled"`
}

AskUserQuestionToolConfig contains AskUserQuestion-specific tool settings. The tool is read-only and plan-mode only, so it carries no approval flag.

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"`
	CompletedRetention int  `yaml:"completed_retention" mapstructure:"completed_retention"`
}

BackgroundShellsConfig contains background shell execution settings

type BashModeAllowConfig added in v0.121.0

type BashModeAllowConfig struct {
	Allow []string `yaml:"allow" mapstructure:"allow"`
}

BashModeAllowConfig is the per-mode bash allow-list. Each entry is a Go regex matched against the WHOLE command (anchored as \A(?:entry)\z), so a bare token like "gh" matches only "gh" and never "gh issue list" - write "gh issue.*" to allow arguments. The single sentinel ".*" (or "^.*$"/".+") means "allow any single command" and additionally skips the clean-command guard, i.e. full autonomy (used by mode.auto so headless `infer agent` can act unattended).

type BashModesConfig added in v0.121.0

type BashModesConfig struct {
	All      BashModeAllowConfig `yaml:"all" mapstructure:"all"`
	Plan     BashModeAllowConfig `yaml:"plan" mapstructure:"plan"`
	Standard BashModeAllowConfig `yaml:"standard" mapstructure:"standard"`
	Auto     BashModeAllowConfig `yaml:"auto" mapstructure:"auto"`
}

BashModesConfig holds the bash allow-list for each agent mode. The effective allow-list for a mode is mode.all.allow unioned with that mode's own list, so "all" is the baseline shared by every mode (standard, plan, auto). A command not matched by the effective list is default-denied: it falls through to approval in chat mode, or is rejected with an actionable reason in headless agent mode. There is no separate deny list - anything not allowed is denied.

type BashToolConfig added in v0.14.1

type BashToolConfig struct {
	Enabled          bool                   `yaml:"enabled" mapstructure:"enabled"`
	Timeout          int                    `yaml:"timeout" mapstructure:"timeout"`
	Mode             BashModesConfig        `yaml:"mode" mapstructure:"mode"`
	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 ChannelsConfig added in v0.101.0

type ChannelsConfig struct {
	Enabled         bool                  `yaml:"enabled" mapstructure:"enabled"`
	MaxWorkers      int                   `yaml:"max_workers" mapstructure:"max_workers"`
	ImageRetention  int                   `yaml:"image_retention" mapstructure:"image_retention"`
	RequireApproval bool                  `yaml:"require_approval" mapstructure:"require_approval"`
	Telegram        TelegramChannelConfig `yaml:"telegram" mapstructure:"telegram"`
	WhatsApp        WhatsAppChannelConfig `yaml:"whatsapp" mapstructure:"whatsapp"`
}

ChannelsConfig contains configuration for external messaging channels

func DefaultChannelsConfig added in v0.104.1

func DefaultChannelsConfig() *ChannelsConfig

DefaultChannelsConfig returns the in-code default channels configuration used when no channels.yaml file exists. `infer init` seeds the file from this and the runtime falls back to it when the file is absent.

func LoadChannels added in v0.104.1

func LoadChannels(path string) (*ChannelsConfig, error)

LoadChannels reads channels.yaml from disk. When the file is missing it returns the in-code defaults so callers can treat absence as "use defaults" without special-casing. The file body is run through os.ExpandEnv so `${BOT_TOKEN}`-style references resolve from the environment.

type ChatConfig added in v0.8.0

type ChatConfig struct {
	Theme       string            `yaml:"theme" mapstructure:"theme"`
	Keybindings KeybindingsConfig `yaml:"-" mapstructure:"-"`
	StatusBar   StatusBarConfig   `yaml:"status_bar" mapstructure:"status_bar"`
}

ChatConfig contains chat interface settings

type ClaudeCodeConfig added in v0.100.0

type ClaudeCodeConfig struct {
	Enabled         bool   `yaml:"enabled" mapstructure:"enabled"`
	CLIPath         string `yaml:"cli_path" mapstructure:"cli_path"`
	Timeout         int    `yaml:"timeout" mapstructure:"timeout"`
	MaxOutputTokens int    `yaml:"max_output_tokens" mapstructure:"max_output_tokens"`
	ThinkingBudget  int    `yaml:"thinking_budget" mapstructure:"thinking_budget"`
}

ClaudeCodeConfig contains Claude Code CLI integration 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 ClipboardImageOptimizeConfig added in v0.89.0

type ClipboardImageOptimizeConfig struct {
	Enabled     bool `yaml:"enabled" mapstructure:"enabled"`
	MaxWidth    int  `yaml:"max_width" mapstructure:"max_width"`
	MaxHeight   int  `yaml:"max_height" mapstructure:"max_height"`
	Quality     int  `yaml:"quality" mapstructure:"quality"`
	ConvertJPEG bool `yaml:"convert_jpeg" mapstructure:"convert_jpeg"`
}

ClipboardImageOptimizeConfig contains clipboard image optimization settings

type CollectionConfig added in v0.104.1

type CollectionConfig[E any] interface {
	CreateEntry(entry E) error
	ReadEntry(name string) (*E, error)
	UpdateEntry(entry E) error
	DeleteEntry(name string) error
	ListEntries() []E
}

CollectionConfig is implemented by file-backed configs whose payload is a named, mutable collection of entries. MCPConfig (collection of MCPServerEntry) and AgentsConfig (collection of AgentEntry) implement it.

Methods mutate the file on disk; the in-memory receiver stays in sync. Implementations must remember the file path they were loaded from so each call can persist back to the same location.

type CompactConfig added in v0.2.0

type CompactConfig struct {
	Enabled               bool `yaml:"enabled" mapstructure:"enabled"`
	AutoAt                int  `yaml:"auto_at" mapstructure:"auto_at"`
	KeepFirstMessages     int  `yaml:"keep_first_messages" mapstructure:"keep_first_messages"`
	RolloverOnIdleMinutes int  `yaml:"rollover_on_idle_minutes" mapstructure:"rollover_on_idle_minutes"`
	SummaryMaxTokens      int  `yaml:"summary_max_tokens" mapstructure:"summary_max_tokens"`
}

CompactConfig contains conversation compaction settings

type ComputerUseConfig added in v0.96.0

type ComputerUseConfig struct {
	Enabled        bool                   `yaml:"enabled" mapstructure:"enabled"`
	FloatingWindow FloatingWindowConfig   `yaml:"floating_window" mapstructure:"floating_window"`
	Screenshot     ScreenshotToolConfig   `yaml:"screenshot" mapstructure:"screenshot"`
	RateLimit      RateLimitConfig        `yaml:"rate_limit" mapstructure:"rate_limit"`
	Tools          ComputerUseToolsConfig `yaml:"tools" mapstructure:"tools"`
}

ComputerUseConfig contains computer use tool settings

func DefaultComputerUseConfig added in v0.104.1

func DefaultComputerUseConfig() *ComputerUseConfig

DefaultComputerUseConfig returns the in-code default computer_use configuration used when no computer_use.yaml file exists. `infer init` seeds the file from this and the runtime falls back to it when the file is absent.

func LoadComputerUse added in v0.104.1

func LoadComputerUse(path string) (*ComputerUseConfig, error)

LoadComputerUse reads computer_use.yaml from disk. When the file is missing it returns the in-code defaults so callers can treat absence as "use defaults" without special-casing. The file body is run through os.ExpandEnv so `${VAR}`-style references resolve from the environment.

type ComputerUseToolsConfig added in v0.97.0

type ComputerUseToolsConfig struct {
	MouseMove     MouseMoveToolConfig     `yaml:"mouse_move" mapstructure:"mouse_move"`
	MouseClick    MouseClickToolConfig    `yaml:"mouse_click" mapstructure:"mouse_click"`
	MouseScroll   MouseScrollToolConfig   `yaml:"mouse_scroll" mapstructure:"mouse_scroll"`
	KeyboardType  KeyboardTypeToolConfig  `yaml:"keyboard_type" mapstructure:"keyboard_type"`
	GetFocusedApp GetFocusedAppToolConfig `yaml:"get_focused_app" mapstructure:"get_focused_app"`
	ActivateApp   ActivateAppToolConfig   `yaml:"activate_app" mapstructure:"activate_app"`
}

ComputerUseToolsConfig contains individual computer use tool settings

type Config

type Config struct {
	ContainerRuntime ContainerRuntimeConfig `yaml:"container_runtime" mapstructure:"container_runtime"`
	Gateway          GatewayConfig          `yaml:"gateway" mapstructure:"gateway"`
	ClaudeCode       ClaudeCodeConfig       `yaml:"claude_code" mapstructure:"claude_code"`
	SpeechToText     SpeechToTextConfig     `yaml:"speech_to_text" mapstructure:"speech_to_text"`
	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"`
	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"`
	Pricing          PricingConfig          `yaml:"pricing" mapstructure:"pricing"`
	Compact          CompactConfig          `yaml:"compact" mapstructure:"compact"`
	Web              WebConfig              `yaml:"web" mapstructure:"web"`
	ComputerUse      ComputerUseConfig      `yaml:"-" mapstructure:"-"`
	Channels         ChannelsConfig         `yaml:"-" mapstructure:"-"`
	Heartbeat        HeartbeatConfig        `yaml:"-" mapstructure:"-"`
	Prompts          PromptsConfig          `yaml:"-" mapstructure:"-"`
	Reminders        RemindersConfig        `yaml:"-" mapstructure:"-"`
	Memory           MemoryConfig           `yaml:"-" mapstructure:"-"`
	Hooks            HooksConfig            `yaml:"-" mapstructure:"-"`
	// contains filtered or unexported fields
}

Config represents the CLI configuration

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns a default configuration

func (*Config) ApprovalBehaviourFor added in v0.121.0

func (c *Config) ApprovalBehaviourFor(toolName string) string

ApprovalBehaviourFor returns how an approval-requiring action should be delivered for toolName: one of ApprovalBehaviourPrompt (default), ApprovalBehaviourIPC, or ApprovalBehaviourBlock. It reads the global tools.safety.approval_behaviour; toolName is reserved for a future per-tool override. An empty or unrecognised value resolves to the safe default (prompt). This decides HOW to handle an action that needs approval; IsApprovalRequired decides WHETHER it does.

func (*Config) BashAllowedCommands added in v0.121.0

func (c *Config) BashAllowedCommands(mode string) []string

BashAllowedCommands returns the effective allow-list entries for mode. It is used to surface the model's bash sandbox in the system prompt so the agent knows up front what it may run unattended.

func (*Config) GetAPIKey added in v0.27.0

func (c *Config) GetAPIKey() string

func (*Config) GetAgentConfig added in v0.48.0

func (c *Config) GetAgentConfig() *AgentConfig

func (*Config) GetConfigDir added in v0.90.0

func (c *Config) GetConfigDir() string

GetConfigDir returns the configuration directory path

func (*Config) GetDefaultModel added in v0.27.0

func (c *Config) GetDefaultModel() string

func (*Config) GetExcludeModels added in v0.57.1

func (c *Config) GetExcludeModels() []string

func (*Config) GetGatewayURL added in v0.27.0

func (c *Config) GetGatewayURL() string

func (*Config) GetIncludeModels added in v0.57.1

func (c *Config) GetIncludeModels() []string

func (*Config) GetOutputDirectory added in v0.27.0

func (c *Config) GetOutputDirectory() string

func (*Config) GetProtectedPaths added in v0.45.3

func (c *Config) GetProtectedPaths() []string

func (*Config) GetSandboxDirectories added in v0.45.3

func (c *Config) GetSandboxDirectories() []string

func (*Config) GetTheme added in v0.47.0

func (c *Config) GetTheme() string

func (*Config) GetTimeout added in v0.27.0

func (c *Config) GetTimeout() int

func (*Config) IsA2AToolsEnabled added in v0.51.0

func (c *Config) IsA2AToolsEnabled() bool

IsA2AToolsEnabled checks if A2A tools should be enabled A2A tools are enabled when a2a.enabled is true, regardless of tools.enabled

func (*Config) IsAgentToolEnabled added in v0.124.0

func (c *Config) IsAgentToolEnabled() bool

IsAgentToolEnabled reports whether the Agent tool (local subagents) is on.

func (*Config) IsApprovalRequired added in v0.14.1

func (c *Config) IsApprovalRequired(toolName string) bool

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

func (*Config) IsBashCommandAllowed added in v0.121.0

func (c *Config) IsBashCommandAllowed(command, mode string) bool

IsBashCommandAllowed reports whether command is auto-approved in the given agent mode ("all", "plan", "standard", or "auto"). The model is a pure allow-list with no separate deny list: anything the effective list does not match is denied - in chat mode it falls through to user approval, in headless agent mode it is rejected with a reason (see BashCommandRejectionHint).

  • If the effective allow-list contains the sentinel ".*" the mode is UNRESTRICTED: any single command is allowed and the clean-command guard is skipped (full autonomy - this is what mode.auto / headless `infer agent` uses). Tighten mode.auto.allow to a curated list to re-enable the guard.
  • Otherwise the clean-command guard runs first and rejects, regardless of the list: command substitution ($(...), backticks, <()/>()), multi-command chains/pipelines (top-level &&, ||, |, ;, &, newline), a surviving file-write redirect (>, >>), dangerous find actions (-exec/-delete/...), and printing/publishing an expanded $VAR (echo/printf/gh ... $SECRET, which would leak the value).
  • The single clean command is then matched WHOLE against each allow entry (anchored as \A(?:entry)\z), so a bare "gh" allows only "gh" - an entry must opt into arguments explicitly (e.g. "gh issue.*").

It is the single source of truth consulted by the Bash tool, the approval policy, and agent auto-approval, so all three agree on exactly what runs without prompting.

func (*Config) IsClaudeCodeMode added in v0.100.0

func (c *Config) IsClaudeCodeMode() bool

IsClaudeCodeMode checks if Claude Code CLI mode is enabled When enabled, the CLI will use Claude Max/Pro subscription instead of gateway

func (*Config) IsSpeechToTextEnabled added in v0.116.0

func (c *Config) IsSpeechToTextEnabled() bool

IsSpeechToTextEnabled checks if speech-to-text (Whisper) is enabled. When enabled, the /voice chat shortcut and Telegram voice-message transcription become available.

func (*Config) ResolveMemoryDir added in v0.126.0

func (c *Config) ResolveMemoryDir() (string, error)

ResolveMemoryDir resolves the directory that holds the memory index (MEMORY.md) and the individual fact-files. It honors an explicit Memory.Dir override and otherwise defaults to the global userspace ~/.infer/memory. The store is intentionally global (shared across all projects), so there is no project-local branch.

func (*Config) SetConfigDir added in v0.90.0

func (c *Config) SetConfigDir(dir string)

SetConfigDir sets the configuration directory path

func (*Config) Validate added in v0.121.0

func (c *Config) Validate() error

Validate checks cross-cutting config invariants after load so a typo fails fast instead of silently falling back. It currently validates tools.safety.approval_behaviour; extend it as new validated settings are added.

func (*Config) ValidatePathInSandbox added in v0.29.0

func (c *Config) ValidatePathInSandbox(path string) error

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"`
	BatchSize int    `yaml:"batch_size" mapstructure:"batch_size"`
	Interval  int    `yaml:"interval" mapstructure:"interval"`
}

ConversationTitleConfig contains settings for AI-generated conversation titles. The system prompt lives in prompts.yaml under conversation.title_generation.system_prompt.

type CustomPricing added in v0.86.0

type CustomPricing struct {
	InputPricePerMToken  float64 `yaml:"input_price_per_mtoken" mapstructure:"input_price_per_mtoken"`
	OutputPricePerMToken float64 `yaml:"output_price_per_mtoken" mapstructure:"output_price_per_mtoken"`
	// RequiresPro marks a model as gated behind a paid Pro subscription
	// (e.g. some Ollama Cloud models). Such models have no per-token price
	// but are not freely available. Omitting this in a custom entry resets
	// it to false, overriding any default flag for that model.
	RequiresPro bool `yaml:"requires_pro" mapstructure:"requires_pro"`
}

CustomPricing allows users to override default pricing for specific models.

type D1StorageConfig added in v0.123.0

type D1StorageConfig struct {
	AccountID  string `yaml:"account_id" mapstructure:"account_id"`
	DatabaseID string `yaml:"database_id" mapstructure:"database_id"`
	APIToken   string `yaml:"api_token" mapstructure:"api_token"`
	BaseURL    string `yaml:"base_url,omitempty" mapstructure:"base_url,omitempty"`
}

D1StorageConfig contains Cloudflare D1-specific configuration. D1 is SQLite over an HTTP query API; the api_token is a secret and is normally injected via INFER_STORAGE_D1_API_TOKEN rather than written to the config file.

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 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"`
	StrictWhitespace bool  `yaml:"strict_whitespace" mapstructure:"strict_whitespace"`
}

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 FloatingWindowConfig added in v0.96.0

type FloatingWindowConfig struct {
	Enabled        bool   `yaml:"enabled" mapstructure:"enabled"`
	RespawnOnClose bool   `yaml:"respawn_on_close" mapstructure:"respawn_on_close"`
	Position       string `yaml:"position" mapstructure:"position"`
	AlwaysOnTop    bool   `yaml:"always_on_top" mapstructure:"always_on_top"`
}

FloatingWindowConfig contains floating progress window settings

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 GetFocusedAppToolConfig added in v0.96.0

type GetFocusedAppToolConfig struct {
	Enabled bool `yaml:"enabled" mapstructure:"enabled"`
}

GetFocusedAppToolConfig contains get focused app-specific tool settings

type GitCommitMessageConfig added in v0.42.0

type GitCommitMessageConfig struct {
	Model string `yaml:"model" mapstructure:"model"`
}

GitCommitMessageConfig contains settings for AI-generated commit messages. The system prompt lives in prompts.yaml under git.commit_message.system_prompt.

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 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 HeartbeatConfig added in v0.108.0

type HeartbeatConfig struct {
	Enabled      bool   `yaml:"enabled" mapstructure:"enabled"`
	Interval     string `yaml:"interval" mapstructure:"interval"`
	InitialDelay string `yaml:"initial_delay" mapstructure:"initial_delay"`
	Model        string `yaml:"model" mapstructure:"model"`
	Prompt       string `yaml:"prompt" mapstructure:"prompt"`
}

HeartbeatConfig configures the periodic "wake-up" tick that spawns `infer agent` with a tailored system prompt so the agent can check for pending work without waiting for user input. Disabled by default.

The companion system prompt lives at PromptsConfig.Agent.SystemPromptHeartbeat in prompts.yaml - keeping runtime knobs (interval, model) here separate from prompt text.

func DefaultHeartbeatConfig added in v0.108.0

func DefaultHeartbeatConfig() *HeartbeatConfig

DefaultHeartbeatConfig returns the in-code default heartbeat configuration used when no heartbeat.yaml file exists. `infer init` seeds the file from this and the runtime falls back to it when the file is absent.

func LoadHeartbeat added in v0.108.0

func LoadHeartbeat(path string) (*HeartbeatConfig, error)

LoadHeartbeat reads heartbeat.yaml from disk. When the file is missing it returns the in-code defaults so callers can treat absence as "use defaults" without special-casing. The file body is run through os.ExpandEnv so `${VAR}`-style references resolve from the environment.

type HookCommandConfig added in v0.125.0

type HookCommandConfig struct {
	Name    string           `yaml:"name" mapstructure:"name"`
	Hook    domain.HookPoint `yaml:"hook" mapstructure:"hook"`
	Command string           `yaml:"command" mapstructure:"command"`
	Timeout int              `yaml:"timeout,omitempty" mapstructure:"timeout"` // seconds; 0 -> default
}

HookCommandConfig is one named command hook: a shell command run at a pre-defined agent-loop hook point with a wall-clock timeout. It is the command-action counterpart of ReminderConfig (the text-injection action).

type HooksConfig added in v0.125.0

type HooksConfig struct {
	Enabled bool                `yaml:"enabled" mapstructure:"enabled"`
	Hooks   []HookCommandConfig `yaml:"hooks" mapstructure:"hooks"`
}

HooksConfig is the content of hooks.yaml: the master switch plus the list of command hooks. Each hook attaches a shell command to a pre-defined hook point (domain.HookPoint). HooksConfig implements domain.HookCommandProvider. It is the executable sibling of RemindersConfig (reminders.yaml): "run code" and "inject text" stay separate concerns in separate files. Off by default; commands still face the bash allow-list when the agent runs them.

func DefaultHooksConfig added in v0.125.0

func DefaultHooksConfig() *HooksConfig

DefaultHooksConfig returns the in-code default used when no hooks.yaml exists: disabled, with no command hooks. The on-disk file generated by `infer init` carries a commented-out example (DefaultHooksYAML) for discoverability, but the effective default ships nothing active - no language-specific hook is assumed.

func LoadHooks added in v0.125.0

func LoadHooks(path string) (*HooksConfig, error)

LoadHooks reads hooks.yaml from disk. When the file is missing it returns the in-code defaults so callers can treat absence as "use defaults".

func (HooksConfig) CommandsDue added in v0.125.0

func (h HooksConfig) CommandsDue(hook domain.HookPoint) []domain.HookCommand

CommandsDue implements domain.HookCommandProvider: it returns every command hook attached to the given hook point. Multiple commands on the same point stack (all are returned, in config order). Command hooks need no trigger - the hook point's own cadence is the cadence (e.g. post_session fires once per run). The agent gates each returned command on the bash allow-list before running it.

func (HooksConfig) Validate added in v0.125.0

func (h HooksConfig) Validate() error

Validate checks each command hook for a name, a command, and an explicit valid hook point, plus a non-negative timeout. It returns an error describing the first invalid entry.

type ImageConfig added in v0.72.0

type ImageConfig struct {
	MaxSize           int64                        `yaml:"max_size" mapstructure:"max_size"`
	Timeout           int                          `yaml:"timeout" mapstructure:"timeout"`
	ClipboardOptimize ClipboardImageOptimizeConfig `yaml:"clipboard_optimize" mapstructure:"clipboard_optimize"`
}

ImageConfig contains image service settings

type JsonlStorageConfig added in v0.92.6

type JsonlStorageConfig struct {
	Path string `yaml:"path" mapstructure:"path"`
}

JsonlStorageConfig contains JSONL-specific configuration

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"
	NamespaceNavigation   KeyNamespace = "navigation"
	NamespacePlanApproval KeyNamespace = "plan_approval"
	NamespaceSelection    KeyNamespace = "selection"
	NamespaceTextEditing  KeyNamespace = "text_editing"
	NamespaceTools        KeyNamespace = "tools"
	NamespaceDiffViewer   KeyNamespace = "diff_viewer"
	NamespaceExplorer     KeyNamespace = "explorer"
)

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

func DefaultKeybindingsConfig added in v0.104.1

func DefaultKeybindingsConfig() *KeybindingsConfig

DefaultKeybindingsConfig returns the default keybindings config used when no file exists. Callers (init, reset) use it to seed a fresh file.

func LoadKeybindings added in v0.104.1

func LoadKeybindings(path string) (*KeybindingsConfig, error)

LoadKeybindings reads keybindings.yaml from disk. When the file is missing it returns the in-code defaults so callers can treat absence as "use defaults" without special-casing. The file body is run through os.ExpandEnv - any literal `${…}` token in a customised binding must be escaped as `$$…`.

type KeyboardTypeToolConfig added in v0.96.0

type KeyboardTypeToolConfig struct {
	Enabled       bool `yaml:"enabled" mapstructure:"enabled"`
	MaxTextLength int  `yaml:"max_text_length" mapstructure:"max_text_length"`
	TypingDelayMs int  `yaml:"typing_delay_ms" mapstructure:"typing_delay_ms"`
}

KeyboardTypeToolConfig contains keyboard type-specific tool settings

type LoggingConfig added in v0.29.4

type LoggingConfig struct {
	Debug  bool   `yaml:"debug" mapstructure:"debug"`
	Dir    string `yaml:"dir" mapstructure:"dir"`
	Stdout bool   `yaml:"stdout" mapstructure:"stdout"`
}

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"`
	MaxRetries            int              `yaml:"max_retries,omitempty" mapstructure:"max_retries,omitempty"`
	Servers               []MCPServerEntry `yaml:"servers" mapstructure:"servers"`
	// contains filtered or unexported fields
}

MCPConfig represents the mcp.yaml configuration file

func DefaultMCPConfig added in v0.79.0

func DefaultMCPConfig() *MCPConfig

DefaultMCPConfig returns a default MCP configuration

func LoadMCP added in v0.104.1

func LoadMCP(path string) (*MCPConfig, error)

LoadMCP reads mcp.yaml from disk. When the file is missing it returns the in-code defaults so callers can treat absence as "use defaults" without special-casing.

func (*MCPConfig) CreateEntry added in v0.104.1

func (c *MCPConfig) CreateEntry(entry MCPServerEntry) error

CreateEntry implements CollectionConfig.

func (*MCPConfig) DeleteEntry added in v0.104.1

func (c *MCPConfig) DeleteEntry(name string) error

DeleteEntry implements CollectionConfig.

func (*MCPConfig) ListEntries added in v0.104.1

func (c *MCPConfig) ListEntries() []MCPServerEntry

ListEntries implements CollectionConfig.

func (*MCPConfig) ReadEntry added in v0.104.1

func (c *MCPConfig) ReadEntry(name string) (*MCPServerEntry, error)

ReadEntry implements CollectionConfig.

func (*MCPConfig) UpdateEntry added in v0.104.1

func (c *MCPConfig) UpdateEntry(entry MCPServerEntry) error

UpdateEntry implements CollectionConfig.

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 MemoryBackendConfig added in v0.127.0

type MemoryBackendConfig struct {
	Type string          `yaml:"type" mapstructure:"type"` // local (default) | git
	Git  MemoryGitConfig `yaml:"git" mapstructure:"git"`
}

MemoryBackendConfig selects how the memory directory is synced. type: local (the default) keeps today's behavior exactly (no remote, no-op). type: git backs the directory with a git remote: pull on run start, commit + push when a fact changes.

type MemoryConfig added in v0.126.0

type MemoryConfig struct {
	Enabled  bool                `yaml:"enabled" mapstructure:"enabled"`
	Dir      string              `yaml:"dir" mapstructure:"dir"`             // "" => ~/.infer/memory
	MaxChars int                 `yaml:"max_chars" mapstructure:"max_chars"` // cap on the injected MEMORY.md index
	Backend  MemoryBackendConfig `yaml:"backend" mapstructure:"backend"`
}

MemoryConfig configures the agent's persistent, cross-session memory. When enabled, durable facts are stored as individual Markdown fact-files under a global directory (~/.infer/memory by default), catalogued by an index file (MEMORY.md) that the Memory tool keeps in sync. The index is injected into context at session start; the agent reads individual facts on demand.

Runtime knobs live here (in memory.yaml); the tool's LLM-facing description lives at PromptsConfig.Tools.Memory.Description in prompts.yaml, and the session reminder lives in reminders.yaml - keeping each concern in its own file, like Heartbeat/ComputerUse/Channels.

func DefaultMemoryConfig added in v0.126.0

func DefaultMemoryConfig() *MemoryConfig

DefaultMemoryConfig returns the in-code default memory configuration used when no memory.yaml file exists. `infer init` seeds the file from this and the runtime falls back to it when the file is absent. Memory is enabled by default; the backend defaults to local so behavior is unchanged until a user opts into git.

func LoadMemory added in v0.126.0

func LoadMemory(path string) (*MemoryConfig, error)

LoadMemory reads memory.yaml from disk. When the file is missing it returns the in-code defaults so callers can treat absence as "use defaults".

func (MemoryConfig) Validate added in v0.127.0

func (m MemoryConfig) Validate() error

Validate checks the memory config, including the backend selection. It is called from Config.Validate so a bad backend fails config load rather than degrading silently at runtime.

type MemoryGitConfig added in v0.127.0

type MemoryGitConfig struct {
	Repo          string              `yaml:"repo" mapstructure:"repo"`
	Branch        string              `yaml:"branch" mapstructure:"branch"`
	CommitMessage string              `yaml:"commit_message" mapstructure:"commit_message"`
	Timeout       int                 `yaml:"timeout" mapstructure:"timeout"` // seconds per git op
	Sync          MemoryGitSyncConfig `yaml:"sync" mapstructure:"sync"`
}

MemoryGitConfig configures the git backend. Auth uses the ambient git credential chain (ssh-agent, credential helper, GIT_* env) - the backend injects no git/ssh env and does not override the ssh command.

func (MemoryGitConfig) EffectiveBranch added in v0.127.0

func (g MemoryGitConfig) EffectiveBranch() string

EffectiveBranch returns the configured branch or the default when blank.

func (MemoryGitConfig) EffectiveCommitMessage added in v0.127.0

func (g MemoryGitConfig) EffectiveCommitMessage() string

EffectiveCommitMessage returns the configured commit message or the default.

func (MemoryGitConfig) EffectiveTimeout added in v0.127.0

func (g MemoryGitConfig) EffectiveTimeout() time.Duration

EffectiveTimeout returns the per-operation git timeout, defaulting when unset.

func (MemoryGitConfig) PullOnStart added in v0.127.0

func (g MemoryGitConfig) PullOnStart() bool

PullOnStart reports whether SyncIn should pull (empty => default on).

func (MemoryGitConfig) PushOnFinish added in v0.127.0

func (g MemoryGitConfig) PushOnFinish() bool

PushOnFinish reports whether SyncOut should push (empty => default on).

type MemoryGitSyncConfig added in v0.127.0

type MemoryGitSyncConfig struct {
	OnStart  string `yaml:"on_start" mapstructure:"on_start"`   // pull (default) | off
	OnFinish string `yaml:"on_finish" mapstructure:"on_finish"` // push (default) | off
}

MemoryGitSyncConfig gates the two sync directions. Empty values fall back to the enabled defaults (pull / push); "off" disables that direction.

type ModelMatcher added in v0.98.0

type ModelMatcher struct {
	Patterns      []string
	ContextWindow int
}

ModelMatcher defines a pattern match for context window estimation.

type ModelPricing added in v0.86.0

type ModelPricing struct {
	Provider             string
	Model                string
	InputPricePerMToken  float64
	OutputPricePerMToken float64
	Currency             string
	// RequiresPro marks a model as gated behind a paid Pro subscription
	// (e.g. some Ollama Cloud models) even though it has no per-token price.
	RequiresPro bool
}

ModelPricing represents pricing information for a specific model. Prices are per million tokens to align with common pricing conventions.

type MouseClickToolConfig added in v0.96.0

type MouseClickToolConfig struct {
	Enabled bool `yaml:"enabled" mapstructure:"enabled"`
}

MouseClickToolConfig contains mouse click-specific tool settings

type MouseMoveToolConfig added in v0.96.0

type MouseMoveToolConfig struct {
	Enabled bool `yaml:"enabled" mapstructure:"enabled"`
}

MouseMoveToolConfig contains mouse move-specific tool settings

type MouseScrollToolConfig added in v0.96.0

type MouseScrollToolConfig struct {
	Enabled bool `yaml:"enabled" mapstructure:"enabled"`
}

MouseScrollToolConfig contains mouse scroll-specific tool settings

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 PricingConfig added in v0.86.0

type PricingConfig struct {
	Enabled      bool                     `yaml:"enabled" mapstructure:"enabled"`
	Currency     string                   `yaml:"currency" mapstructure:"currency"`
	CustomPrices map[string]CustomPricing `yaml:"custom_prices" mapstructure:"custom_prices"`
}

PricingConfig holds configuration for model pricing and cost tracking.

func GetDefaultPricingConfig added in v0.86.0

func GetDefaultPricingConfig() PricingConfig

GetDefaultPricingConfig returns the default pricing configuration.

type PromptsAgentConfig added in v0.104.1

type PromptsAgentConfig struct {
	SystemPrompt          string `yaml:"system_prompt" mapstructure:"system_prompt"`
	SystemPromptPlan      string `yaml:"system_prompt_plan" mapstructure:"system_prompt_plan"`
	SystemPromptAuto      string `yaml:"system_prompt_auto" mapstructure:"system_prompt_auto"`
	SystemPromptRemote    string `yaml:"system_prompt_remote" mapstructure:"system_prompt_remote"`
	SystemPromptHeartbeat string `yaml:"system_prompt_heartbeat" mapstructure:"system_prompt_heartbeat"`
	CustomInstructions    string `yaml:"custom_instructions" mapstructure:"custom_instructions"`
}

type PromptsConfig added in v0.104.1

type PromptsConfig struct {
	Agent        PromptsAgentConfig        `yaml:"agent" mapstructure:"agent"`
	Git          PromptsGitConfig          `yaml:"git" mapstructure:"git"`
	Conversation PromptsConversationConfig `yaml:"conversation" mapstructure:"conversation"`
	Init         PromptsInitConfig         `yaml:"init" mapstructure:"init"`
	Tools        PromptsToolsConfig        `yaml:"tools" mapstructure:"tools"`
}

PromptsConfig holds every customisable LLM prompt the CLI ships with. It mirrors the nested key structure those prompts had when they lived under .infer/config.yaml so users can move existing values verbatim.

func DefaultPromptsConfig added in v0.104.1

func DefaultPromptsConfig() *PromptsConfig

DefaultPromptsConfig returns the in-code default prompts. This is the single source of truth - `infer init` seeds prompts.yaml from this and the runtime overlay falls back to it when fields are missing.

func LoadPrompts added in v0.104.1

func LoadPrompts(path string) (*PromptsConfig, error)

LoadPrompts reads prompts.yaml from disk. When the file is missing it returns the in-code defaults so callers can treat absence as "use defaults" without special-casing. The file body is run through os.ExpandEnv - any literal `${…}` token in a customised prompt must be escaped as `$$…`.

Any field left empty in a partial prompts.yaml is backfilled from DefaultPromptsConfig() so callers always get a fully populated config. CustomInstructions is intentionally excluded from backfill - empty is a meaningful user choice there.

type PromptsConversationConfig added in v0.104.1

type PromptsConversationConfig struct {
	TitleGeneration PromptsConversationTitleConfig `yaml:"title_generation" mapstructure:"title_generation"`
}

type PromptsConversationTitleConfig added in v0.104.1

type PromptsConversationTitleConfig struct {
	SystemPrompt string `yaml:"system_prompt" mapstructure:"system_prompt"`
}

type PromptsGitCommitMessageConfig added in v0.104.1

type PromptsGitCommitMessageConfig struct {
	SystemPrompt string `yaml:"system_prompt" mapstructure:"system_prompt"`
}

type PromptsGitConfig added in v0.104.1

type PromptsGitConfig struct {
	CommitMessage PromptsGitCommitMessageConfig `yaml:"commit_message" mapstructure:"commit_message"`
}

type PromptsInitConfig added in v0.104.1

type PromptsInitConfig struct {
	Prompt string `yaml:"prompt" mapstructure:"prompt"`
}

type PromptsToolDescription added in v0.104.1

type PromptsToolDescription struct {
	Description string `yaml:"description" mapstructure:"description"`
}

PromptsToolDescription holds a single tool's LLM-visible description. It is wrapped in a struct (rather than being a bare string) so future fields - e.g. per-parameter description overrides - can be added without breaking existing prompts.yaml files.

type PromptsToolsConfig added in v0.104.1

type PromptsToolsConfig struct {
	Bash                PromptsToolDescription `yaml:"Bash" mapstructure:"Bash"`
	BashOutput          PromptsToolDescription `yaml:"BashOutput" mapstructure:"BashOutput"`
	KillShell           PromptsToolDescription `yaml:"KillShell" mapstructure:"KillShell"`
	ListShells          PromptsToolDescription `yaml:"ListShells" mapstructure:"ListShells"`
	Read                PromptsToolDescription `yaml:"Read" mapstructure:"Read"`
	Write               PromptsToolDescription `yaml:"Write" mapstructure:"Write"`
	Edit                PromptsToolDescription `yaml:"Edit" mapstructure:"Edit"`
	MultiEdit           PromptsToolDescription `yaml:"MultiEdit" mapstructure:"MultiEdit"`
	Delete              PromptsToolDescription `yaml:"Delete" mapstructure:"Delete"`
	Grep                PromptsToolDescription `yaml:"Grep" mapstructure:"Grep"`
	Tree                PromptsToolDescription `yaml:"Tree" mapstructure:"Tree"`
	TodoWrite           PromptsToolDescription `yaml:"TodoWrite" mapstructure:"TodoWrite"`
	RequestPlanApproval PromptsToolDescription `yaml:"RequestPlanApproval" mapstructure:"RequestPlanApproval"`
	AskUserQuestion     PromptsToolDescription `yaml:"AskUserQuestion" mapstructure:"AskUserQuestion"`
	WebFetch            PromptsToolDescription `yaml:"WebFetch" mapstructure:"WebFetch"`
	WebSearch           PromptsToolDescription `yaml:"WebSearch" mapstructure:"WebSearch"`
	Schedule            PromptsToolDescription `yaml:"Schedule" mapstructure:"Schedule"`
	Agent               PromptsToolDescription `yaml:"Agent" mapstructure:"Agent"`
	ListSubagents       PromptsToolDescription `yaml:"ListSubagents" mapstructure:"ListSubagents"`
	GetSubagentResult   PromptsToolDescription `yaml:"GetSubagentResult" mapstructure:"GetSubagentResult"`
	CloseSubagent       PromptsToolDescription `yaml:"CloseSubagent" mapstructure:"CloseSubagent"`
	ReadSubagentScreen  PromptsToolDescription `yaml:"ReadSubagentScreen" mapstructure:"ReadSubagentScreen"`
	SendSubagentInput   PromptsToolDescription `yaml:"SendSubagentInput" mapstructure:"SendSubagentInput"`
	ApproveSubagent     PromptsToolDescription `yaml:"ApproveSubagent" mapstructure:"ApproveSubagent"`
	A2AQueryAgent       PromptsToolDescription `yaml:"A2A_QueryAgent" mapstructure:"A2A_QueryAgent"`
	A2AQueryTask        PromptsToolDescription `yaml:"A2A_QueryTask" mapstructure:"A2A_QueryTask"`
	A2ASubmitTask       PromptsToolDescription `yaml:"A2A_SubmitTask" mapstructure:"A2A_SubmitTask"`
	MouseMove           PromptsToolDescription `yaml:"MouseMove" mapstructure:"MouseMove"`
	MouseClick          PromptsToolDescription `yaml:"MouseClick" mapstructure:"MouseClick"`
	MouseScroll         PromptsToolDescription `yaml:"MouseScroll" mapstructure:"MouseScroll"`
	KeyboardType        PromptsToolDescription `yaml:"KeyboardType" mapstructure:"KeyboardType"`
	GetFocusedApp       PromptsToolDescription `yaml:"GetFocusedApp" mapstructure:"GetFocusedApp"`
	ActivateApp         PromptsToolDescription `yaml:"ActivateApp" mapstructure:"ActivateApp"`
	GetLatestScreenshot PromptsToolDescription `yaml:"GetLatestScreenshot" mapstructure:"GetLatestScreenshot"`
	Memory              PromptsToolDescription `yaml:"Memory" mapstructure:"Memory"`
}

PromptsToolsConfig groups every tool whose description is exposed to the LLM. MCP tools are intentionally excluded - their descriptions come from the MCP server at runtime and overriding them here would drift from whatever the server reports. Tools that ship with the binary but only register conditionally (e.g. background-shell tools, computer-use tools) still get a default so the override slot exists regardless of whether the tool is enabled in this run.

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 RateLimitConfig added in v0.96.0

type RateLimitConfig struct {
	Enabled             bool `yaml:"enabled" mapstructure:"enabled"`
	MaxActionsPerMinute int  `yaml:"max_actions_per_minute" mapstructure:"max_actions_per_minute"`
	WindowSeconds       int  `yaml:"window_seconds" mapstructure:"window_seconds"`
}

RateLimitConfig contains rate limiting 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 ReminderConfig added in v0.125.0

type ReminderConfig struct {
	Name      string            `yaml:"name" mapstructure:"name"`
	Text      string            `yaml:"text" mapstructure:"text"`
	Hook      domain.HookPoint  `yaml:"hook" mapstructure:"hook"`
	Trigger   ReminderTrigger   `yaml:"trigger" mapstructure:"trigger"`
	Interval  int               `yaml:"interval,omitempty" mapstructure:"interval"`
	Threshold int               `yaml:"threshold,omitempty" mapstructure:"threshold"`
	Guidance  map[string]string `yaml:"guidance,omitempty" mapstructure:"guidance"`
}

ReminderConfig is one named reminder: text injected at a pre-defined hook point, gated by a trigger.

Guidance is consulted only by the on_mode_change trigger: it maps a mode key ("standard"/"plan"/"auto", the same keys as tools.bash.mode.<key>) to the text substituted for the {guidance} placeholder when that mode is entered. Keys the user omits keep their built-in defaults (per-key merge).

func MemoryReminders added in v0.127.0

func MemoryReminders() []ReminderConfig

MemoryReminders returns the built-in reminders coupled to the memory feature: memory-consult (turn-1 orientation) and memory-hygiene (a periodic nudge to record durable facts). They are the single source of truth used to seed reminders.yaml (fresh init or init --overwrite) and to identify which reminders to prune when memory is disabled (see pruneMemoryRemindersIfDisabled).

type ReminderTrigger added in v0.125.0

type ReminderTrigger string

ReminderTrigger gates which firings of a hook point a reminder acts on.

const (
	ReminderTriggerAlways         ReminderTrigger = "always"
	ReminderTriggerInterval       ReminderTrigger = "interval"
	ReminderTriggerTurnsBeforeMax ReminderTrigger = "turns_before_max"
	ReminderTriggerOnce           ReminderTrigger = "once"
	ReminderTriggerOnFailure      ReminderTrigger = "on_failure"
	ReminderTriggerOnModeChange   ReminderTrigger = "on_mode_change"
)

func (ReminderTrigger) Valid added in v0.125.0

func (t ReminderTrigger) Valid() bool

Valid reports whether t is one of the pre-defined triggers.

type RemindersConfig added in v0.125.0

type RemindersConfig struct {
	Enabled   bool             `yaml:"enabled" mapstructure:"enabled"`
	Merge     bool             `yaml:"merge,omitempty" mapstructure:"merge"`
	Reminders []ReminderConfig `yaml:"reminders" mapstructure:"reminders"`
}

RemindersConfig is the content of reminders.yaml: the master switch plus the list of named reminders. Each reminder attaches to a pre-defined agent-loop hook point (domain.HookPoint) with a trigger. RemindersConfig implements domain.SystemReminderProvider. The companion executable hooks (#270) get their own hooks.yaml so "inject text" and "run code" stay separate concerns.

When Merge is true, the file's reminders are merged onto the built-in defaults by name: a supplied entry with a built-in name overrides that entry; new names are appended. When false (default), the file's reminders fully replace defaults.

func DefaultRemindersConfig added in v0.125.0

func DefaultRemindersConfig() *RemindersConfig

DefaultRemindersConfig returns the in-code default reminders configuration used when no reminders.yaml exists (and to seed the file on init). Reminders ship enabled by default with a todo-hygiene reminder plus the built-in memory reminders (see MemoryReminders); the memory ones are pruned at load time when memory is disabled (see pruneMemoryRemindersIfDisabled).

func LoadReminders added in v0.125.0

func LoadReminders(path string) (*RemindersConfig, error)

LoadReminders reads reminders.yaml from disk. When the file is missing it returns the in-code defaults so callers can treat absence as "use defaults".

func ParseReminders added in v0.129.0

func ParseReminders(data []byte) (*RemindersConfig, error)

ParseReminders parses inline reminders YAML (e.g. the INFER_REMINDERS_CONFIG env var) into a RemindersConfig, so embedded consumers can supply reminders without writing reminders.yaml to disk. Environment references in the body are expanded, mirroring the file loader (LoadYAML); the result is validated by the caller through Config.Validate.

func (RemindersConfig) MergeWithDefaults added in v0.130.0

func (r RemindersConfig) MergeWithDefaults() *RemindersConfig

MergeWithDefaults returns a new RemindersConfig with the receiver's entries merged on top of DefaultRemindersConfig by name. A supplied entry whose Name matches a built-in overrides it; entries with new names are appended. The receiver's Enabled value is preserved so the consumer's intent wins.

func (RemindersConfig) RemindersDue added in v0.125.0

RemindersDue implements domain.SystemReminderProvider: it returns every reminder attached to q.Hook whose trigger fires. Multiple reminders on the same hook stack (all are returned). The interval trigger keys off q.SessionTurn (cumulative across the chat session) so it fires on every Nth conversational turn; turns_before_max keys off q.Turn/q.MaxTurns (the current run's loop budget). q.Fired is consulted only by the `once` trigger and is never written here - the caller marks names fired after injecting. A nil q.Fired is treated as "nothing fired yet".

func (RemindersConfig) Validate added in v0.125.0

func (r RemindersConfig) Validate() error

Validate checks each reminder against the pre-defined hook and trigger catalogs and the per-trigger requirements. It returns an error describing the first invalid entry. An empty Hook/Trigger is allowed (defaulted by effective); only non-empty values are checked against the catalog.

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 SQLiteStorageConfig added in v0.45.0

type SQLiteStorageConfig struct {
	Path string `yaml:"path" mapstructure:"path"`
}

SQLiteStorageConfig contains SQLite-specific configuration

type SSHServerConfig added in v0.95.0

type SSHServerConfig struct {
	Name        string   `yaml:"name" mapstructure:"name"`
	ID          string   `yaml:"id" mapstructure:"id"`
	RemoteHost  string   `yaml:"remote_host" mapstructure:"remote_host"`
	RemotePort  int      `yaml:"remote_port" mapstructure:"remote_port"`
	RemoteUser  string   `yaml:"remote_user" mapstructure:"remote_user"`
	CommandPath string   `yaml:"command_path" mapstructure:"command_path"`
	CommandArgs []string `yaml:"command_args" mapstructure:"command_args"`
	AutoInstall *bool    `yaml:"auto_install,omitempty" mapstructure:"auto_install"`
	InstallPath string   `yaml:"install_path" mapstructure:"install_path"`
	Description string   `yaml:"description" mapstructure:"description"`
	Tags        []string `yaml:"tags" mapstructure:"tags"`
}

SSHServerConfig contains configuration for a single remote SSH server

type SafetyConfig added in v0.3.0

type SafetyConfig struct {
	RequireApproval bool `yaml:"require_approval" mapstructure:"require_approval"`
	// ApprovalBehaviour selects HOW a tool that needs approval is handled:
	//   "prompt" (default): ask an interactive approver via whatever channel is
	//       attached - a TUI prompt in chat, IPC under the channel-manager; if none
	//       is reachable (CI/heartbeat) the action is blocked with a reason.
	//   "ipc":   force stdin/stdout IPC approval; blocked if no IPC broker.
	//   "block": reject immediately with a reason, never ask.
	// It governs delivery only - whether a tool needs approval at all is decided by
	// RequireApproval / the per-tool require_approval override / the per-mode bash
	// allow-list. Resolve via ApprovalBehaviourFor; validated by Config.Validate.
	ApprovalBehaviour string `yaml:"approval_behaviour" mapstructure:"approval_behaviour"`
}

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 ScheduleToolConfig added in v0.104.0

type ScheduleToolConfig struct {
	Enabled         bool   `yaml:"enabled" mapstructure:"enabled"`
	RequireApproval *bool  `yaml:"require_approval,omitempty" mapstructure:"require_approval,omitempty"`
	StorageDir      string `yaml:"storage_dir,omitempty" mapstructure:"storage_dir,omitempty"`
	MaxJobs         int    `yaml:"max_jobs,omitempty" mapstructure:"max_jobs,omitempty"`
}

ScheduleToolConfig contains schedule-specific tool settings. When enabled, the tool lets the LLM create recurring jobs that fire on a cron schedule and deliver their output through a configured channel (e.g. Telegram). Jobs are persisted as YAML files under StorageDir and hot-reloaded by the channels-manager daemon.

type ScreenshotToolConfig added in v0.96.0

type ScreenshotToolConfig struct {
	Enabled          bool   `yaml:"enabled" mapstructure:"enabled"`
	MaxWidth         int    `yaml:"max_width" mapstructure:"max_width"`
	MaxHeight        int    `yaml:"max_height" mapstructure:"max_height"`
	TargetWidth      int    `yaml:"target_width" mapstructure:"target_width"`
	TargetHeight     int    `yaml:"target_height" mapstructure:"target_height"`
	Format           string `yaml:"format" mapstructure:"format"`
	Quality          int    `yaml:"quality" mapstructure:"quality"`
	StreamingEnabled bool   `yaml:"streaming_enabled" mapstructure:"streaming_enabled"`
	CaptureInterval  int    `yaml:"capture_interval" mapstructure:"capture_interval"`
	BufferSize       int    `yaml:"buffer_size" mapstructure:"buffer_size"`
	TempDir          string `yaml:"temp_dir" mapstructure:"temp_dir"`
	LogCaptures      bool   `yaml:"log_captures" mapstructure:"log_captures"`
	ShowOverlay      bool   `yaml:"show_overlay" mapstructure:"show_overlay"`
}

ScreenshotToolConfig contains screenshot-specific tool settings

type SpeechToTextConfig added in v0.116.0

type SpeechToTextConfig struct {
	Enabled             bool   `yaml:"enabled" mapstructure:"enabled"`
	Engine              string `yaml:"engine" mapstructure:"engine"`                               // "whisper.cpp" (only engine for now)
	BinaryPath          string `yaml:"binary_path" mapstructure:"binary_path"`                     // "" -> resolve whisper-cli/whisper-cpp on PATH
	Model               string `yaml:"model" mapstructure:"model"`                                 // "tiny" (->ggml-tiny.bin); base/small/medium/large/*.en accepted
	ModelsDir           string `yaml:"models_dir" mapstructure:"models_dir"`                       // "" -> ~/.infer/models/whisper
	Language            string `yaml:"language" mapstructure:"language"`                           // "" -> auto-detect
	AutoDownload        bool   `yaml:"auto_download" mapstructure:"auto_download"`                 // download model on first use if missing
	Timeout             int    `yaml:"timeout" mapstructure:"timeout"`                             // transcription timeout (seconds)
	MaxRecordingSeconds int    `yaml:"max_recording_seconds" mapstructure:"max_recording_seconds"` // chat /voice recording cap
	SilenceTimeout      int    `yaml:"silence_timeout" mapstructure:"silence_timeout"`             // stop /voice after N s of silence (0 = record full cap)
	FFmpegPath          string `yaml:"ffmpeg_path" mapstructure:"ffmpeg_path"`                     // "" -> resolve ffmpeg on PATH
	InputDevice         string `yaml:"input_device" mapstructure:"input_device"`                   // "" -> platform default mic
	RetainRecordings    int    `yaml:"retain_recordings" mapstructure:"retain_recordings"`         // keep last N inbound voice/audio files (0 = keep none)
	RecordingsDir       string `yaml:"recordings_dir" mapstructure:"recordings_dir"`               // "" -> ~/.infer/voice
}

SpeechToTextConfig contains speech-to-text (Whisper) integration settings. It is an opt-in feature flag: when Enabled, the /voice chat shortcut and inbound Telegram voice-message transcription become available. Transcription shells out to a local whisper.cpp binary (whisper-cli/whisper-cpp) and uses ffmpeg for audio capture and OGG->WAV conversion; the GGML model is downloaded on first use. None of this adds CGO to the Go binary.

func (SpeechToTextConfig) ResolveRecordingsDir added in v0.125.0

func (c SpeechToTextConfig) ResolveRecordingsDir() (string, error)

ResolveRecordingsDir returns the directory where retained inbound voice/audio recordings are stored, defaulting to ~/.infer/voice when RecordingsDir is unset.

type StatusBarConfig added in v0.83.0

type StatusBarConfig struct {
	Enabled    bool                `yaml:"enabled" mapstructure:"enabled"`
	Indicators StatusBarIndicators `yaml:"indicators" mapstructure:"indicators"`
}

StatusBarConfig contains settings for the chat status bar The status bar displays model information and system status indicators

func GetDefaultStatusBarConfig added in v0.83.0

func GetDefaultStatusBarConfig() StatusBarConfig

GetDefaultStatusBarConfig returns the default status bar configuration All indicators are enabled by default except MaxOutput to maintain current behavior

type StatusBarIndicators added in v0.83.0

type StatusBarIndicators struct {
	Model            bool `yaml:"model" mapstructure:"model"`
	Theme            bool `yaml:"theme" mapstructure:"theme"`
	MaxOutput        bool `yaml:"max_output" mapstructure:"max_output"`
	A2AAgents        bool `yaml:"a2a_agents" mapstructure:"a2a_agents"`
	Tools            bool `yaml:"tools" mapstructure:"tools"`
	BackgroundShells bool `yaml:"background_shells" mapstructure:"background_shells"`
	A2ATasks         bool `yaml:"a2a_tasks" mapstructure:"a2a_tasks"`
	MCP              bool `yaml:"mcp" mapstructure:"mcp"`
	ContextUsage     bool `yaml:"context_usage" mapstructure:"context_usage"`
	SessionTokens    bool `yaml:"session_tokens" mapstructure:"session_tokens"`
	Cost             bool `yaml:"cost" mapstructure:"cost"`
	GitBranch        bool `yaml:"git_branch" mapstructure:"git_branch"`
}

StatusBarIndicators contains individual enable/disable toggles for each indicator All indicators are enabled by default to maintain current behavior

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"`
	Jsonl    JsonlStorageConfig    `yaml:"jsonl,omitempty" mapstructure:"jsonl,omitempty"`
	D1       D1StorageConfig       `yaml:"d1,omitempty" mapstructure:"d1,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"
	StorageTypeJsonl    StorageType = "jsonl"
	StorageTypeD1       StorageType = "d1"
)

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 TelegramChannelConfig added in v0.101.0

type TelegramChannelConfig struct {
	Enabled      bool     `yaml:"enabled" mapstructure:"enabled"`
	BotToken     string   `yaml:"bot_token" mapstructure:"bot_token"`
	AllowedUsers []string `yaml:"allowed_users" mapstructure:"allowed_users"`
	PollTimeout  int      `yaml:"poll_timeout" mapstructure:"poll_timeout"`
}

TelegramChannelConfig contains Telegram bot settings

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 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"`
	TodoWrite       TodoWriteToolConfig       `yaml:"todo_write" mapstructure:"todo_write"`
	Schedule        ScheduleToolConfig        `yaml:"schedule" mapstructure:"schedule"`
	Agent           AgentToolConfig           `yaml:"agent" mapstructure:"agent"`
	AskUserQuestion AskUserQuestionToolConfig `yaml:"ask_user_question" mapstructure:"ask_user_question"`

	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 WebConfig added in v0.94.0

type WebConfig struct {
	Enabled               bool              `yaml:"enabled" mapstructure:"enabled"`
	Port                  int               `yaml:"port" mapstructure:"port"`
	Host                  string            `yaml:"host" mapstructure:"host"`
	SessionInactivityMins int               `yaml:"session_inactivity_mins" mapstructure:"session_inactivity_mins"`
	Tmux                  bool              `yaml:"tmux" mapstructure:"tmux"`
	SSH                   WebSSHConfig      `yaml:"ssh" mapstructure:"ssh"`
	Servers               []SSHServerConfig `yaml:"servers" mapstructure:"servers"`
}

WebConfig contains web terminal settings

type WebFetchToolConfig added in v0.24.1

type WebFetchToolConfig struct {
	Enabled         bool              `yaml:"enabled" mapstructure:"enabled"`
	AllowedDomains  []string          `yaml:"allowed_domains" mapstructure:"allowed_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 WebSSHConfig added in v0.95.0

type WebSSHConfig struct {
	Enabled        bool   `yaml:"enabled" mapstructure:"enabled"`
	UseSSHConfig   bool   `yaml:"use_ssh_config" mapstructure:"use_ssh_config"`
	KnownHostsPath string `yaml:"known_hosts_path" mapstructure:"known_hosts_path"`
	AutoInstall    bool   `yaml:"auto_install" mapstructure:"auto_install"`
	InstallVersion string `yaml:"install_version" mapstructure:"install_version"`
	InstallDir     string `yaml:"install_dir" mapstructure:"install_dir"`
}

WebSSHConfig contains SSH connection settings for remote servers

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 WhatsAppChannelConfig added in v0.101.0

type WhatsAppChannelConfig struct {
	Enabled       bool     `yaml:"enabled" mapstructure:"enabled"`
	PhoneNumberID string   `yaml:"phone_number_id" mapstructure:"phone_number_id"`
	AccessToken   string   `yaml:"access_token" mapstructure:"access_token"`
	VerifyToken   string   `yaml:"verify_token" mapstructure:"verify_token"`
	WebhookPort   int      `yaml:"webhook_port" mapstructure:"webhook_port"`
	AllowedUsers  []string `yaml:"allowed_users" mapstructure:"allowed_users"`
}

WhatsAppChannelConfig contains WhatsApp Business API 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

Directories

Path Synopsis
Package utils provides generic file-IO helpers shared by every sub-config in package config.
Package utils provides generic file-IO helpers shared by every sub-config in package config.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL