config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 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"`
}

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
	Services  map[string]map[string]any
	TUI       TUIConfig `toml:"tui"`
}

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

type ProviderConfig

type ProviderConfig struct {
	ID      string `toml:"id"`
	BaseURL string `toml:"base_url"`
	APIKey  string
}

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

Jump to

Keyboard shortcuts

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