config

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dir

func Dir() string

func DirFor

func DirFor(name string) string

func SaveTUI

func SaveTUI(dir string, toolsExpanded, showThinking bool) error

Types

type AgentConfig

type AgentConfig struct {
	Model           string   `toml:"model"`
	MaxToolRounds   int      `toml:"max_tool_rounds"`
	Tools           []string `toml:"tools"`
	Interfaces      []string `toml:"interfaces"`
	Prompt          string   `toml:"prompt"`
	CompactionModel string   `toml:"compaction_model"`
}

type Config

type Config struct {
	Providers []ProviderConfig `toml:"providers"`
	Models    []ModelConfig    `toml:"models"`
	Agent     AgentConfig      `toml:"agent"`
	Subagents []SubagentConfig `toml:"subagents"`
	Session   SessionConfig    `toml:"session"`
	Slack     SlackConfig
	Telegram  TelegramConfig
	Services  map[string]map[string]any
	Memory    MemoryConfig   `toml:"memory"`
	TUI       TUIConfig      `toml:"tui"`
	Schedule  ScheduleConfig `toml:"schedule"`
}

func Default

func Default() Config

func DefaultFor

func DefaultFor(dir string) Config

func Load

func Load() (Config, error)

func LoadFrom

func LoadFrom(dir string) (Config, error)

func (*Config) Merge

func (c *Config) Merge(s Secrets)

type MemoryConfig added in v0.1.2

type MemoryConfig struct {
	Enabled             bool    `toml:"enabled"`
	SubconsciousModel   string  `toml:"subconscious_model"`
	MaxRecall           int     `toml:"max_recall"`
	RecallThreshold     float64 `toml:"recall_threshold"`
	DedupThreshold      float64 `toml:"dedup_threshold"`
	MaxIngest           int     `toml:"max_ingest"`
	ConfidenceThreshold float64 `toml:"confidence_threshold"`
}

type ModelConfig

type ModelConfig struct {
	ID                 string   `toml:"id"`
	Provider           string   `toml:"provider"`
	Name               string   `toml:"name"`
	Description        string   `toml:"description"`
	ContextWindow      int      `toml:"context_window"`
	MaxOutputTokens    int      `toml:"max_output_tokens"`
	ThinkingType       string   `toml:"thinking_type"`
	ReasoningEffort    string   `toml:"reasoning_effort"`
	ReasoningMaxTokens int      `toml:"reasoning_max_tokens"`
	InputPrice         float64  `toml:"input_price"`
	CachedInputPrice   float64  `toml:"cached_input_price"`
	OutputPrice        float64  `toml:"output_price"`
	PromptCache        bool     `toml:"prompt_cache"`
	PromptCacheTTL     string   `toml:"prompt_cache_ttl"`
	FallbackModels     []string `toml:"fallback_models"`
	Route              string   `toml:"route"`
	ProviderSort       string   `toml:"provider_sort"`
}

type ProviderConfig

type ProviderConfig struct {
	ID         string `toml:"id"`
	BaseURL    string `toml:"base_url"`
	Referer    string `toml:"referer"`
	AppTitle   string `toml:"app_title"`
	Categories string `toml:"categories"`
	APIKey     string
}

type ScheduleConfig added in v0.1.1

type ScheduleConfig struct {
	Jobs []ScheduledJob `toml:"jobs"`
}

type ScheduledJob added in v0.1.1

type ScheduledJob struct {
	Cron    string `toml:"cron"`
	Prompt  string `toml:"prompt"`
	Channel string `toml:"channel"`
	Model   string `toml:"model"`
}

type Secrets

type Secrets struct {
	Providers map[string]string `toml:"providers"`
	Slack     struct {
		BotToken string `toml:"bot_token"`
		AppToken string `toml:"app_token"`
	} `toml:"slack"`
	Telegram struct {
		BotToken string `toml:"bot_token"`
	} `toml:"telegram"`
	Services map[string]map[string]any `toml:"services"`
}

type SessionConfig

type SessionConfig struct {
	Dir string `toml:"dir"`
}

type SlackConfig

type SlackConfig struct {
	BotToken string
	AppToken string
}

type SubagentConfig

type SubagentConfig struct {
	ID          string   `toml:"id"`
	Description string   `toml:"description"`
	Model       string   `toml:"model"`
	Tools       []string `toml:"tools"`
	Prompt      string   `toml:"prompt"`
}

type TUIConfig

type TUIConfig struct {
	ToolsExpanded bool `toml:"tools_expanded"`
	ShowThinking  bool `toml:"show_thinking"`
}

type TelegramConfig added in v0.1.1

type TelegramConfig struct {
	BotToken     string
	AllowedUsers []int64 `toml:"allowed_users"`
}

Jump to

Keyboard shortcuts

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