config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 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
	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 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"`
	InputPrice       float64 `toml:"input_price"`
	CachedInputPrice float64 `toml:"cached_input_price"`
	OutputPrice      float64 `toml:"output_price"`
}

type ProviderConfig

type ProviderConfig struct {
	ID      string `toml:"id"`
	BaseURL string `toml:"base_url"`
	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