config

package
v0.30.19 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: MIT Imports: 5 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIConfig

type APIConfig struct {
	Enabled bool   `toml:"enabled"`
	Listen  string `toml:"listen"`
}

type AgentConfig

type AgentConfig struct {
	Command    string            `toml:"command"`
	Args       []string          `toml:"args"`
	WorkingDir string            `toml:"working_dir"`
	Env        map[string]string `toml:"env"`
}

type Config

type Config struct {
	Agent    AgentConfig    `toml:"agent"`
	Pool     PoolConfig     `toml:"pool"`
	API      APIConfig      `toml:"api"`
	STT      STTConfig      `toml:"stt"`
	TTS      TTSConfig      `toml:"tts"`
	Markdown MarkdownConfig `toml:"markdown"`
	Discord  DiscordConfig  `toml:"discord"`
	Telegram TelegramConfig `toml:"telegram"`
	Teams    TeamsConfig    `toml:"teams"`
	Cronjob  CronjobConfig  `toml:"cronjob"`
}

func LoadConfig

func LoadConfig(path string) (*Config, error)

type CronjobConfig added in v0.30.0

type CronjobConfig struct {
	Disabled           bool   `toml:"disabled"`
	MaxPerThread       int    `toml:"max_per_thread"`
	MinIntervalSeconds int    `toml:"min_interval_seconds"`
	QueueSize          int    `toml:"queue_size"`
	Timezone           string `toml:"timezone"`
	StorePath          string `toml:"store_path"`
}

CronjobConfig controls user-scheduled prompt fires. The zero value (no [cronjob] block in TOML) means "enabled with defaults". Users opt out with `disabled = true`.

type DiscordConfig

type DiscordConfig struct {
	Enabled         bool     `toml:"enabled"`
	BotToken        string   `toml:"bot_token"`
	AllowedChannels []string `toml:"allowed_channels"`
	// AllowedUserIDs, when non-empty, takes precedence over AllowedChannels:
	// only messages from these Discord user IDs will be processed (regardless of channel).
	// Use ["*"] as a wildcard to allow any user from any channel.
	AllowedUserIDs []string        `toml:"allowed_user_id"`
	Reactions      ReactionsConfig `toml:"reactions"`
}

type MarkdownConfig

type MarkdownConfig struct {
	Tables string `toml:"tables"`
}

MarkdownConfig controls the channel-agnostic markdown rewrite pipeline applied to LLM responses before they are sent to a chat platform.

`tables` accepts "code" (wrap in fenced block, default), "bullets" (one bullet per cell), or "off" (disable conversion).

type PoolConfig

type PoolConfig struct {
	MaxSessions     int `toml:"max_sessions"`
	SessionTTLHours int `toml:"session_ttl_hours"`
}

type ReactionEmojis

type ReactionEmojis struct {
	Queued   string `toml:"queued"`
	Thinking string `toml:"thinking"`
	Tool     string `toml:"tool"`
	Coding   string `toml:"coding"`
	Web      string `toml:"web"`
	Done     string `toml:"done"`
	Error    string `toml:"error"`
}

type ReactionTiming

type ReactionTiming struct {
	DebounceMs  int64 `toml:"debounce_ms"`
	StallSoftMs int64 `toml:"stall_soft_ms"`
	StallHardMs int64 `toml:"stall_hard_ms"`
	DoneHoldMs  int64 `toml:"done_hold_ms"`
	ErrorHoldMs int64 `toml:"error_hold_ms"`
}

type ReactionsConfig

type ReactionsConfig struct {
	Enabled          bool `toml:"enabled"`
	RemoveAfterReply bool `toml:"remove_after_reply"`
	// ToolDisplay controls how ACP tool-call titles are rendered in the
	// streamed chat message. One of:
	//   "full"    — original title (e.g. `Running: curl -s "https://..."`)
	//   "compact" — first whitespace-delimited token only (default)
	//   "none"    — hide tool lines entirely
	ToolDisplay string         `toml:"tool_display"`
	Emojis      ReactionEmojis `toml:"emojis"`
	Timing      ReactionTiming `toml:"timing"`
}

type STTConfig

type STTConfig struct {
	Enabled  bool   `toml:"enabled"`
	Provider string `toml:"provider"`
	APIKey   string `toml:"api_key"`
	Model    string `toml:"model"`
	Language string `toml:"language"`
	Prompt   string `toml:"prompt"`
	BaseURL  string `toml:"base_url"`
}

type TTSConfig

type TTSConfig struct {
	Enabled      bool   `toml:"enabled"`
	Provider     string `toml:"provider"` // "openai" or "gemini" (default: "openai")
	APIKey       string `toml:"api_key"`
	Model        string `toml:"model"`
	Voice        string `toml:"voice"`
	Instructions string `toml:"instructions"` // Voice style/tone instructions
	Style        string `toml:"style"`        // Gemini only: vocal_smile, newscaster, whisper, empathetic, promo_hype, deadpan
	StylePrefix  string `toml:"style_prefix"` // Gemini only: emotion tag prepended to each line, e.g. "[shy]"
	StyleSuffix  string `toml:"style_suffix"` // Gemini only: emotion tag appended to each line, e.g. "[laughs softly]"
	VoiceGender  string `toml:"voice_gender"` // OpenAI only; ignored when provider != "openai"
	BaseURL      string `toml:"base_url"`     // OpenAI only
	TimeoutSec   int    `toml:"timeout_sec"`
}

type TeamsConfig

type TeamsConfig struct {
	Enabled         bool     `toml:"enabled"`
	AppID           string   `toml:"app_id"`
	AppSecret       string   `toml:"app_secret"`
	TenantID        string   `toml:"tenant_id"`
	Listen          string   `toml:"listen"`
	AllowedChannels []string `toml:"allowed_channels"`
	// AllowedUserIDs, when non-empty, takes precedence over AllowedChannels:
	// only messages from these Teams user IDs will be processed (regardless of channel).
	// Use ["*"] as a wildcard to allow any user.
	AllowedUserIDs []string `toml:"allowed_user_id"`
	ToolDisplay    string   `toml:"tool_display"`
	// ServiceURLStorePath persists the per-conversation Bot Framework
	// serviceURL so cron-fired proactive messages survive pod restarts.
	// Empty disables persistence (in-memory only — old behaviour).
	ServiceURLStorePath string `toml:"service_url_store_path"`
}

type TelegramConfig

type TelegramConfig struct {
	Enabled      bool    `toml:"enabled"`
	BotToken     string  `toml:"bot_token"`
	AllowedChats []int64 `toml:"allowed_chats"`
	// AllowedUserIDs, when non-empty, takes precedence over AllowedChats:
	// only messages from these Telegram user IDs will be processed (regardless of chat).
	// Use ["*"] as a wildcard to allow any user from any chat.
	// String type so "*" and numeric IDs can coexist in a single TOML array.
	AllowedUserIDs []string        `toml:"allowed_user_id"`
	Reactions      ReactionsConfig `toml:"reactions"`
	// RichMessages opts into the experimental Bot API 10.1 sendRichMessage path
	// for complex replies (tables/headings/long content). Off by default; the
	// adapter falls back to the parse_mode=HTML path on any failure.
	RichMessages bool `toml:"rich_messages"`
}

Jump to

Keyboard shortcuts

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