config

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package config manages MAXAM configuration in ~/.maxam/

Index

Constants

View Source
const DefaultAnalysisMinMessages = 10

DefaultAnalysisMinMessages is the default minimum message count for analysis

Variables

View Source
var DefaultAgents = []string{"mei", "yuki", "rin", "shiori", "priya", "amara"}

DefaultAgents is the list of default agents to install

Functions

func AgentsDir

func AgentsDir() (string, error)

AgentsDir returns the path to ~/.maxam/agents/

func ConfigDir

func ConfigDir() (string, error)

ConfigDir returns the path to ~/.maxam/

func EnsureInitialized

func EnsureInitialized(embeddedAgents map[string]string) error

EnsureInitialized sets up ~/.maxam/ if not present and copies default agents from the embedded data

func GetAgentClaudeMD

func GetAgentClaudeMD(name string) (string, error)

GetAgentClaudeMD returns the path to an agent's CLAUDE.md

func GetAgentDir

func GetAgentDir(name string) (string, error)

GetAgentDir returns the directory for an agent

func GetEmbeddedAgents

func GetEmbeddedAgents() (map[string]string, error)

GetEmbeddedAgents returns a map of agent name to CLAUDE.md content

func ListAgents

func ListAgents() ([]string, error)

ListAgents returns agent names from ~/.maxam/agents/

func Save

func Save(cfg *Config) error

Save writes configuration to ~/.maxam/config.yaml

Types

type AgentConfig

type AgentConfig struct {
	Name     string `yaml:"name"`
	FullName string `yaml:"full_name"`
	Role     string `yaml:"role"`
	Model    string `yaml:"model,omitempty"` // opus, sonnet, haiku
}

AgentConfig represents an agent configuration

type Config

type Config struct {
	Version             string        `yaml:"version"`
	DefaultAgent        string        `yaml:"default_agent,omitempty"`
	Agents              []AgentConfig `yaml:"agents"`
	AnalysisMinMessages int           `yaml:"analysis_min_messages,omitempty"`
	ContextMode         ContextMode   `yaml:"context_mode,omitempty"`
	YOLOMode            bool          `yaml:"yolo_mode,omitempty"`
}

Config represents the MAXAM configuration

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns the default configuration

func Load

func Load() (*Config, error)

Load reads configuration from ~/.maxam/config.yaml

func (*Config) GetAnalysisMinMessages added in v0.3.0

func (c *Config) GetAnalysisMinMessages() int

GetAnalysisMinMessages returns the analysis minimum messages with default fallback

func (*Config) GetContextMode added in v0.3.0

func (c *Config) GetContextMode() ContextMode

GetContextMode returns the context mode with default fallback

func (*Config) IsSummaryMode added in v0.3.0

func (c *Config) IsSummaryMode() bool

IsSummaryMode returns true if context mode is summary

type ContextMode added in v0.3.0

type ContextMode string

ContextMode represents the context mode for system prompts

const (
	ContextModeFull    ContextMode = "full"
	ContextModeSummary ContextMode = "summary"
)

Jump to

Keyboard shortcuts

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