Documentation
¶
Overview ¶
Package config loads and resolves the ttal configuration from ~/.config/ttal/config.toml.
The active team is selected via the default_team field (falling back to "default"). Resolved fields (chat ID, paths, runtimes, models, prompt templates) are promoted to a single Config value so callers do not need to know which team is active. Also provides DaemonConfig for loading all teams simultaneously, and helpers for resolving data directories, projects paths, and prompt templates from prompts.toml and roles.toml.
Plane: shared
Index ¶
- Constants
- Variables
- func AgentBotToken(agentName string) string
- func AgentSessionName(team, agent string) string
- func DefaultConfigDir() string
- func DefaultDataDir() string
- func DefaultTaskRC() string
- func DotEnvParts() []string
- func DotEnvPath() (string, error)
- func EnsureWorktreeRoot() string
- func ExpandHome(path string) string
- func FlicknoteHooksDir() (string, error)
- func InjectDotEnvFallback() error
- func LoadDotEnv() (map[string]string, error)
- func Path() (string, error)
- func RenderTemplate(tmpl, taskID string, rt runtime.Runtime) string
- func ResolveDataDir() string
- func ResolveProjectsPath() string
- func ResolveProjectsPathForTeam(teamName string) string
- func SocketPath() string
- func WorktreesRoot() string
- type AgentConfig
- type AskConfig
- type Config
- func (c *Config) AgentModel() string
- func (c *Config) AgentModelFor(_ string) string
- func (c *Config) AgentPath(agentName string) string
- func (c *Config) AgentRuntime() runtime.Runtime
- func (c *Config) AgentRuntimeFor(_ string) runtime.Runtime
- func (c *Config) AskMaxSteps() int
- func (c *Config) AskMaxTokens() int
- func (c *Config) AskModel() string
- func (c *Config) AskOutput() string
- func (c *Config) AskReferencesPath() string
- func (c *Config) BreatheThreshold() float64
- func (c *Config) BuildEnvShellCommand(envParts []string, cmd string) string
- func (c *Config) DataDir() string
- func (c *Config) EmojiReactions() bool
- func (c *Config) GetMergeMode() string
- func (c *Config) GetShell() string
- func (c *Config) HeartbeatPrompt(agentName string) string
- func (c *Config) Prompt(key string) string
- func (c *Config) RenderPrompt(key, taskID string, rt runtime.Runtime) string
- func (c *Config) ReviewerModel() string
- func (c *Config) ReviewerRuntime() runtime.Runtime
- func (c *Config) Roles() *RolesConfig
- func (c *Config) ShellCommand(cmd string) string
- func (c *Config) TaskData() string
- func (c *Config) TaskRC() string
- func (c *Config) TaskSyncURL() string
- func (c *Config) TeamName() string
- func (c *Config) TeamPath() string
- func (c *Config) UserName() string
- func (c *Config) WorkerModel() string
- func (c *Config) WorkerRuntime() runtime.Runtime
- type DaemonConfig
- func (m *DaemonConfig) AgentModelForTeam(teamName, _ string) string
- func (m *DaemonConfig) AgentRuntimeForTeam(teamName, _ string) runtime.Runtime
- func (m *DaemonConfig) AllAgents() []TeamAgent
- func (m *DaemonConfig) DefaultTeamName() string
- func (m *DaemonConfig) FindAgent(agentName string) (*TeamAgent, bool)
- func (m *DaemonConfig) FindAgentInTeam(teamName, agentName string) (*TeamAgent, bool)
- func (d *DaemonConfig) UserNameForTeam(teamName string) string
- func (m *DaemonConfig) WorkerModelForTeam(teamName string) string
- type FlicknoteConfig
- type MatrixAgentConfig
- type MatrixTeamConfig
- type PromptsConfig
- type ResolvedTeam
- type RolesConfig
- type SyncConfig
- type TeamAgent
- type TeamConfig
- type UserConfig
- type VoiceConfig
Constants ¶
const ( DefaultTeamName = "default" DefaultModel = "sonnet" MergeModeAuto = "auto" MergeModeManual = "manual" )
const ( DefaultAskModel = "claude-sonnet-4-6" // AskDefaultMaxSteps is the default for ttal ask / subagent run commands. AskDefaultMaxSteps = 100 // AskDefaultMaxTokens is the default for ttal ask / subagent run commands. AskDefaultMaxTokens = 131072 // AskOutputVerbose selects streaming output mode for ttal ask. AskOutputVerbose = "verbose" // AskOutputQuiet selects quiet output mode for ttal ask (no streaming, final text only). AskOutputQuiet = "quiet" )
const DefaultShell = "zsh"
Variables ¶
var DefaultInlineProjects = []string{"plan"}
DefaultInlineProjects is the default set of flicknote project keywords to inline.
Functions ¶
func AgentBotToken ¶ added in v1.0.0
AgentBotToken returns the bot token for an agent using the naming convention. Looks up {UPPER_NAME}_BOT_TOKEN from the loaded .env vars.
func AgentSessionName ¶
AgentSessionName returns the tmux session name for an agent. Convention: "ttal-<team>-<agent>" (e.g. "ttal-default-athena", "ttal-guion-mira").
This is distinct from worker sessions which use "w-<uuid[:8]>-<slug>" (e.g. "w-e9d4b7c1-fix-auth"). See taskwarrior.Task.SessionName().
func DefaultConfigDir ¶ added in v1.7.0
func DefaultConfigDir() string
DefaultConfigDir returns the path to the ttal configuration directory (~/.config/ttal).
func DefaultDataDir ¶
func DefaultDataDir() string
DefaultDataDir returns the default data directory (~/.ttal).
func DefaultTaskRC ¶
func DefaultTaskRC() string
DefaultTaskRC returns the default taskrc path (~/.taskrc).
func DotEnvParts ¶
func DotEnvParts() []string
DotEnvParts loads .env and returns "KEY=VALUE" strings suitable for appending to an environment variable slice. All errors (missing file, parse failures, unreadable path) are silently ignored — returns nil.
func DotEnvPath ¶
DotEnvPath returns the path to the .env file: ~/.config/ttal/.env
func EnsureWorktreeRoot ¶ added in v1.2.0
func EnsureWorktreeRoot() string
EnsureWorktreeRoot creates the worktrees root directory if it doesn't exist. Returns the root path. Logs a warning to stderr on failure.
func ExpandHome ¶
ExpandHome replaces a leading ~ or ~/ with the user's home directory. Does NOT expand ~username syntax (that would require OS-specific user lookup).
func FlicknoteHooksDir ¶ added in v1.2.0
FlicknoteHooksDir returns the path to the flicknote hooks directory. Currently ~/.config/flicknote/hooks/ — when XDG_CONFIG_HOME support is added to ttal, update this single function.
func InjectDotEnvFallback ¶ added in v1.6.0
func InjectDotEnvFallback() error
InjectDotEnvFallback loads ~/.config/ttal/.env and sets any key that is not already present in the environment. Returns an error if the file cannot be read (callers typically print a warning and continue).
func LoadDotEnv ¶
LoadDotEnv reads ~/.config/ttal/.env and returns key-value pairs. Returns empty map (not error) if file doesn't exist.
func RenderTemplate ¶ added in v1.0.0
RenderTemplate resolves {{skill:name}} and {{task-id}} in an arbitrary template string. All {{skill:xxx}} placeholders are collected and prepended at the start of the result.
func ResolveDataDir ¶
func ResolveDataDir() string
ResolveDataDir returns the data directory for the active team without requiring a full config load. Falls back to ~/.ttal if config is unavailable. Used by path helpers that need to work before config is loaded (e.g. db.DefaultPath). Result is cached after first call.
func ResolveProjectsPath ¶ added in v1.0.0
func ResolveProjectsPath() string
ResolveProjectsPath returns the projects.toml path for the active team. Used by project.Store for default path resolution.
func ResolveProjectsPathForTeam ¶ added in v1.0.0
ResolveProjectsPathForTeam returns the projects.toml path for a specific team.
func SocketPath ¶ added in v1.0.0
func SocketPath() string
SocketPath returns the daemon unix socket path. TTAL_SOCKET_PATH env var overrides the default (~/.ttal/daemon.sock). Shared by daemon and worker packages to avoid circular imports.
func WorktreesRoot ¶ added in v1.2.0
func WorktreesRoot() string
WorktreesRoot returns the directory where ttal worktrees are stored. Defaults to ~/.ttal/worktrees.
Types ¶
type AgentConfig ¶
type AgentConfig struct {
BotToken string `toml:"-" jsonschema:"-"`
BotTokenEnv string `toml:"bot_token_env" jsonschema:"-"`
Port int `toml:"port" jsonschema:"-"`
Runtime string `toml:"runtime" jsonschema:"-"`
Model string `toml:"model" jsonschema:"-"`
HeartbeatInterval string `toml:"heartbeat_interval" jsonschema:"-"`
}
AgentConfig is deprecated. Per-agent config now lives in CLAUDE.md frontmatter and roles.toml. Kept for backward-compatible TOML parsing only — all fields are ignored at runtime. Agents are discovered from the filesystem: any subdir of team_path with CLAUDE.md is an agent.
type AskConfig ¶ added in v1.2.0
type AskConfig struct {
// Local path for cloned OSS reference repos (default: ~/.ttal/references/)
ReferencesPath string `toml:"references_path"`
// Model for the ask subagent (default: claude-sonnet-4-6)
Model string `toml:"model"`
// Maximum agent steps (default: 100)
MaxSteps int `toml:"max_steps"`
// Maximum output tokens per step (default: 131072)
MaxTokens int `toml:"max_tokens"`
// Output verbosity for human CLI use: "verbose" (default) or "quiet"
Output string `toml:"output" jsonschema:"enum=verbose,enum=quiet"`
// Output verbosity for agent sessions (TTAL_AGENT_NAME set).
// Default is quiet. Set to "verbose" to see streaming in agent sessions.
AgentOutput string `toml:"agent_output" jsonschema:"enum=verbose,enum=quiet"`
}
AskConfig holds settings for the `ttal ask` command.
type Config ¶
type Config struct {
// Resolved fields — populated from active team after Load(). Not directly settable in TOML.
ChatID string `toml:"-" json:"-"`
LifecycleAgent string `toml:"-" json:"-"` // Deprecated: use NotificationToken instead
NotificationToken string `toml:"-" json:"-"`
VoiceResolved VoiceConfig `toml:"-" json:"-"`
// Shell for spawning workers
Shell string `toml:"shell" jsonschema:"enum=zsh,enum=fish"`
// Paths for subagent and skill deployment
Sync SyncConfig `toml:"sync"`
// Prompt templates for task routing (loaded from prompts.toml, not config.toml)
Prompts PromptsConfig `toml:"-"`
// Ask subcommand settings
Ask AskConfig `toml:"ask"`
// Flicknote integration settings
Flicknote FlicknoteConfig `toml:"flicknote"`
// Global voice settings (vocabulary, language)
Voice VoiceConfig `toml:"voice"`
// Active team — falls back to "default" if unset
DefaultTeam string `toml:"default_team"` //nolint:lll
// Per-team configuration sections
Teams map[string]TeamConfig `toml:"teams"`
// Human user identity (used by GUI ChatService and message queries)
User UserConfig `toml:"user"`
// contains filtered or unexported fields
}
Config is the top-level structure for ~/.config/ttal/config.toml.
Requires [teams] sections. After Load(), resolved fields are populated from the active team. Callers access ChatID etc. without caring about which team is active.
func Load ¶
Load reads and validates ~/.config/ttal/config.toml. If the config uses [teams], the active team is resolved and its fields are promoted to the top-level Config fields for backward compatibility.
func (*Config) AgentModel ¶ added in v1.0.0
AgentModel returns the team's agent model ("sonnet" if unset).
func (*Config) AgentModelFor ¶
AgentModelFor returns the team-level agent model. Per-agent overrides are no longer supported; configure via team agent_model.
func (*Config) AgentPath ¶
AgentPath returns the workspace path for an agent, derived from team_path.
func (*Config) AgentRuntime ¶
AgentRuntime returns the team's agent runtime ("claude-code" if unset).
func (*Config) AgentRuntimeFor ¶
AgentRuntimeFor returns the team-level agent runtime. Per-agent overrides are no longer supported; configure via team agent_runtime.
func (*Config) AskMaxSteps ¶ added in v1.2.0
AskMaxSteps returns the configured max steps for ask/subagent commands. Defaults to AskDefaultMaxSteps (100) if not set in config.
func (*Config) AskMaxTokens ¶ added in v1.2.0
AskMaxTokens returns the configured max output tokens for ask/subagent commands. Defaults to AskDefaultMaxTokens (131072) if not set in config.
func (*Config) AskModel ¶ added in v1.2.0
AskModel returns the model to use for the ask subagent. Defaults to claude-sonnet-4-6 if not configured.
func (*Config) AskOutput ¶ added in v1.6.0
AskOutput returns the resolved output mode for ttal ask: AskOutputVerbose or AskOutputQuiet. Agents (TTAL_AGENT_NAME set) default to quiet; humans default to verbose. Precedence: flag (handled by caller) > agent detection > config > default.
func (*Config) AskReferencesPath ¶ added in v1.2.0
AskReferencesPath returns the resolved path for cloned reference repos. Defaults to ~/.ttal/references/ if not configured.
func (*Config) BreatheThreshold ¶ added in v1.7.0
BreatheThreshold returns the context usage % below which auto-breathe is skipped.
func (*Config) BuildEnvShellCommand ¶
func (*Config) EmojiReactions ¶ added in v1.0.0
EmojiReactions returns whether emoji reactions on Telegram tool messages are enabled (default: false).
func (*Config) GetMergeMode ¶
GetMergeMode returns the resolved merge mode ("auto" if unset). "auto" merges immediately; "manual" sends a notification instead.
func (*Config) HeartbeatPrompt ¶ added in v1.0.0
HeartbeatPrompt returns the heartbeat_prompt for an agent's role from roles.toml. agentName is used directly as the role key (e.g. "yuki" → [yuki] in roles.toml). Returns empty string if not configured.
func (*Config) Prompt ¶
Prompt returns the prompt template for a given key. Priority: roles.toml[key] > roles.toml[default] > config.toml[prompts] Worker-plane keys (execute, review, re_review, triage) skip roles.toml[default] to prevent manager-plane prompts bleeding into worker sessions.
func (*Config) RenderPrompt ¶
RenderPrompt resolves {{task-id}} and {{skill:name}} placeholders in a prompt template.
func (*Config) ReviewerModel ¶ added in v1.2.0
ReviewerModel returns the team's reviewer model. Falls back to WorkerModel if not set.
func (*Config) ReviewerRuntime ¶ added in v1.2.0
ReviewerRuntime returns the team's reviewer runtime. Falls back to WorkerRuntime if not set.
func (*Config) Roles ¶ added in v1.0.0
func (c *Config) Roles() *RolesConfig
Roles returns the resolved roles config for use by external packages.
func (*Config) ShellCommand ¶
func (*Config) TaskData ¶
TaskData returns the resolved taskwarrior data directory for the active team.
func (*Config) TaskSyncURL ¶
TaskSyncURL returns the TaskChampion sync server URL for the active team.
func (*Config) UserName ¶ added in v1.0.0
UserName returns the configured human name, falling back to the $USER env var.
func (*Config) WorkerModel ¶ added in v1.0.0
WorkerModel returns the team's worker model ("sonnet" if unset).
func (*Config) WorkerRuntime ¶
WorkerRuntime returns the team's worker runtime ("claude-code" if unset).
type DaemonConfig ¶
type DaemonConfig struct {
Global *Config // Raw config (Sync, Shell, Prompts, etc.)
Teams map[string]*ResolvedTeam // team name -> resolved team config
}
DaemonConfig holds all teams' resolved configurations.
func LoadAll ¶
func LoadAll() (*DaemonConfig, error)
LoadAll loads config.toml and resolves ALL teams. Used by the daemon to serve all teams from a single process.
func (*DaemonConfig) AgentModelForTeam ¶
func (m *DaemonConfig) AgentModelForTeam(teamName, _ string) string
AgentModelForTeam returns the team-level agent model. Per-agent overrides are no longer supported; configure via team agent_model.
func (*DaemonConfig) AgentRuntimeForTeam ¶
func (m *DaemonConfig) AgentRuntimeForTeam(teamName, _ string) runtime.Runtime
AgentRuntimeForTeam returns the team-level agent runtime. Per-agent overrides are no longer supported; configure via team agent_runtime.
func (*DaemonConfig) AllAgents ¶
func (m *DaemonConfig) AllAgents() []TeamAgent
AllAgents returns all agents across all teams, sorted by team then agent name. Agents are discovered from the filesystem: any subdir of team_path containing CLAUDE.md.
func (*DaemonConfig) DefaultTeamName ¶ added in v1.0.0
func (m *DaemonConfig) DefaultTeamName() string
DefaultTeamName returns the default team name with fallback to "default".
func (*DaemonConfig) FindAgent ¶
func (m *DaemonConfig) FindAgent(agentName string) (*TeamAgent, bool)
FindAgent looks up which team an agent belongs to by scanning team paths. Returns the first match if agent names are unique across teams. Uses agentfs.HasAgent for discovery.
func (*DaemonConfig) FindAgentInTeam ¶
func (m *DaemonConfig) FindAgentInTeam(teamName, agentName string) (*TeamAgent, bool)
FindAgentInTeam looks up an agent within a specific team by checking the filesystem. Uses agentfs.HasAgent for discovery.
func (*DaemonConfig) UserNameForTeam ¶ added in v1.0.0
func (d *DaemonConfig) UserNameForTeam(teamName string) string
UserNameForTeam returns the human identity for a given team. Falls back to the global [user] name, then $USER.
func (*DaemonConfig) WorkerModelForTeam ¶ added in v1.0.0
func (m *DaemonConfig) WorkerModelForTeam(teamName string) string
WorkerModelForTeam resolves effective model for workers in a team: team worker_model > "sonnet".
type FlicknoteConfig ¶ added in v1.0.0
type FlicknoteConfig struct {
// Project substrings to inline (default: plan)
InlineProjects []string `toml:"inline_projects" jsonschema:"description=Project substrings to inline (default: plan)"`
}
FlicknoteConfig holds flicknote-related settings.
type MatrixAgentConfig ¶ added in v1.3.0
type MatrixAgentConfig struct {
// Env var name for this agent's Matrix access token
AccessTokenEnv string `toml:"access_token_env"`
// Matrix room ID for this agent's chat (e.g. "!abc:example.com")
RoomID string `toml:"room_id"`
}
MatrixAgentConfig holds per-agent Matrix credentials.
type MatrixTeamConfig ¶ added in v1.3.0
type MatrixTeamConfig struct {
// Matrix homeserver URL (e.g. "https://matrix.example.com")
Homeserver string `toml:"homeserver"`
// Room ID for system notifications
NotifyRoom string `toml:"notification_room"`
// Env var name for notification bot access token
NotifyTokenEnv string `toml:"notification_token_env"`
// Matrix user ID of the human owner, invited to all provisioned rooms (e.g. "@neil:ttal.dev")
HumanUserID string `toml:"human_user_id"`
// Per-agent Matrix credentials
Agents map[string]MatrixAgentConfig `toml:"agents"`
}
MatrixTeamConfig holds Matrix-specific configuration for a team.
func (*MatrixTeamConfig) Validate ¶ added in v1.3.0
func (m *MatrixTeamConfig) Validate() error
Validate checks that required Matrix config fields are set and constraints are met.
type PromptsConfig ¶
type PromptsConfig struct {
Execute string `toml:"execute" jsonschema:"description=Prompt prefix for worker spawn"`
Triage string `toml:"triage" jsonschema:"description=Prompt sent to coder after PR review. Supports {{review-file}}"` //nolint:lll
Review string `` //nolint:lll
/* 129-byte string literal not displayed */
ReReview string `toml:"re_review" jsonschema:"description=Re-review prompt sent to reviewer. Supports {{review-scope}} {{coder-comment}}"` //nolint:lll
PlanReview string `toml:"plan_review" jsonschema:"description=Plan reviewer prompt. Supports {{task-id}} {{skill:plan-review}}"` //nolint:lll
PlanReReview string `toml:"plan_re_review" jsonschema:"description=Plan re-review prompt. Supports {{task-id}}"` //nolint:lll
PlanTriage string `toml:"plan_triage" jsonschema:"description=Prompt sent to designer after plan review. Supports {{review-file}}"` //nolint:lll
}
PromptsConfig holds configurable prompt templates for task routing and worker spawn. Supports {{task-id}} and {{skill:name}} template variables. Role-based keys (designer, researcher) come from roles.toml, not config.toml.
func LoadPrompts ¶ added in v1.0.0
func LoadPrompts() (PromptsConfig, error)
LoadPrompts loads prompts from ~/.config/ttal/prompts.toml. Returns zero-value PromptsConfig if file doesn't exist (not an error).
type ResolvedTeam ¶
type ResolvedTeam struct {
Name string
Frontend string // "telegram" or "matrix" (default: "telegram")
TeamPath string
DataDir string
TaskRC string
ChatID string
LifecycleAgent string // Deprecated: use NotificationToken instead
NotificationToken string
AgentRuntime string
WorkerRuntime string
ReviewerRuntime string
AgentModel string
WorkerModel string
ReviewerModel string
MergeMode string
CommentSync string
Voice VoiceConfig
EmojiReactions bool
UserName string // human identity for this team
Matrix *MatrixTeamConfig // nil for telegram teams
}
ResolvedTeam holds one team's fully resolved configuration.
type RolesConfig ¶ added in v1.0.0
type RolesConfig struct {
Roles map[string]string `toml:"-"`
HeartbeatPrompts map[string]string `toml:"-"`
HeartbeatIntervals map[string]string `toml:"-"` // per-role heartbeat interval (e.g. "1h")
}
func LoadRoles ¶ added in v1.0.0
func LoadRoles() (*RolesConfig, error)
func (*RolesConfig) HeartbeatIntervalForRole ¶ added in v1.0.0
func (r *RolesConfig) HeartbeatIntervalForRole(role string) string
HeartbeatIntervalForRole returns the heartbeat interval for a given role. Returns empty string if no interval is configured.
func (*RolesConfig) UnmarshalTOML ¶ added in v1.0.0
func (r *RolesConfig) UnmarshalTOML(data interface{}) error
type SyncConfig ¶
type SyncConfig struct {
// Directories for subagent definitions
SubagentsPaths []string `toml:"subagents_paths"`
// Directories for RULE.md files
RulesPaths []string `toml:"rules_paths"`
// Path to global CLAUDE.md prompt
GlobalPromptPath string `toml:"global_prompt_path"`
}
SyncConfig holds paths for subagent and rule deployment.
type TeamAgent ¶
type TeamAgent struct {
TeamName string
AgentName string
ChatID string // team chat ID (all agents in a team share one chat)
TeamPath string
}
TeamAgent pairs an agent with its team context.
type TeamConfig ¶
type TeamConfig struct {
// Messaging frontend for this team ("telegram" or "matrix"; default: "telegram")
Frontend string `toml:"frontend" jsonschema:"enum=telegram,enum=matrix"`
// Root path for agent workspaces. Agent path = team_path/agent_name
TeamPath string `toml:"team_path"` //nolint:lll
// ttal data directory (default: ~/.ttal/<team>)
DataDir string `toml:"data_dir"` //nolint:lll
// Taskwarrior config file path (default: <data_dir>/taskrc)
TaskRC string `toml:"taskrc"` //nolint:lll
// Telegram chat ID for this team
ChatID string `toml:"chat_id"`
// Deprecated: use notification_token_env instead
LifecycleAgent string `toml:"lifecycle_agent"` //nolint:lll
// Override env var for notification bot token (default: {UPPER_TEAM}_NOTIFICATION_BOT_TOKEN)
NotificationTokenEnv string `toml:"notification_token_env"` //nolint:lll
// Runtime for agent sessions
AgentRuntime string `toml:"agent_runtime" jsonschema:"enum=claude-code"` //nolint:lll
// Runtime for spawned workers
WorkerRuntime string `toml:"worker_runtime" jsonschema:"enum=claude-code,enum=codex"` //nolint:lll
// Model for agent sessions (default: sonnet)
AgentModel string `toml:"agent_model" jsonschema:"enum=haiku,enum=sonnet,enum=opus"` //nolint:lll
// Model for spawned workers (default: sonnet; +hard tag overrides to opus)
WorkerModel string `toml:"worker_model" jsonschema:"enum=haiku,enum=sonnet,enum=opus"` //nolint:lll
// Runtime for spawned reviewers (falls back to worker_runtime)
ReviewerRuntime string `toml:"reviewer_runtime" jsonschema:"enum=claude-code,enum=codex"` //nolint:lll
// Model for spawned reviewers (falls back to worker_model)
ReviewerModel string `toml:"reviewer_model" jsonschema:"enum=haiku,enum=sonnet,enum=opus"` //nolint:lll
// PR merge mode override for this team
MergeMode string `toml:"merge_mode" jsonschema:"enum=auto,enum=manual"` //nolint:lll
// Comment sync mode: "none" (DB only) or "pr" (mirror to PR). Default: "pr".
CommentSync string `toml:"comment_sync" jsonschema:"enum=none,enum=pr,default=pr"` //nolint:lll
// ISO 639-1 language code for Whisper (default: en; auto for auto-detect)
VoiceLanguage string `toml:"voice_language"` //nolint:lll
// Per-agent credentials for this team
Agents map[string]AgentConfig `toml:"agents"` //nolint:lll
// Custom vocabulary words for Whisper transcription accuracy
VoiceVocabulary []string `toml:"voice_vocabulary"` //nolint:lll
// Enable emoji reactions on Telegram tool messages
EmojiReactions *bool `toml:"emoji_reactions" jsonschema:"default=false"`
// TaskChampion sync server URL for ttal doctor --fix
TaskSyncURL string `toml:"task_sync_url"` //nolint:lll
// Optional per-team human identity override (falls back to global [user])
User UserConfig `toml:"user"` //nolint:lll
// Matrix-specific configuration (only used when frontend = "matrix")
Matrix *MatrixTeamConfig `toml:"matrix"`
// Context usage threshold (%) below which auto-breathe is skipped (default: 40).
// Use a pointer so that an explicit 0 (always breathe) is not silently promoted to 40.
BreatheThreshold *float64 `toml:"breathe_threshold"` //nolint:lll
}
TeamConfig holds per-team configuration.
type UserConfig ¶ added in v1.0.0
type UserConfig struct {
// Human's display name (e.g. "neil"). Falls back to $USER env var if empty.
Name string `toml:"name"`
}
UserConfig holds the human user's identity for the GUI and message queries.
type VoiceConfig ¶
type VoiceConfig struct {
// Custom vocabulary words for Whisper
Vocabulary []string `toml:"vocabulary"`
// ISO 639-1 language code (default: en)
Language string `toml:"language"`
}
VoiceConfig holds voice-related settings resolved from the active team.
func (*VoiceConfig) EffectiveVocabulary ¶ added in v1.0.0
func (c *VoiceConfig) EffectiveVocabulary(teamVocabulary []string, allTeamNames, allAgentNames []string) []string
EffectiveVocabulary returns effective vocabulary for a team: global vocabulary + team-specific vocabulary + ALL team names + ALL agent names (team names and agent names are global - included for all teams)