Documentation
¶
Overview ¶
Package config loads neo's single configuration file (neo.yaml / ~/.neo/config.yaml / embedded default).
Index ¶
- Constants
- type Backend
- type Compaction
- type Config
- func (c *Config) AgentsFileEnabled() bool
- func (c *Config) NamedPhases() []phase.Definition
- func (c *Config) PromptCachingEnabled() bool
- func (c *Config) SkillsEnabled() bool
- func (c *Config) Source() string
- func (c *Config) SubagentsConfigured() bool
- func (c *Config) SubscriptionAuth() bool
- func (c *Config) VerboseEnabled() bool
- type Features
- type Output
Constants ¶
const ( // OpenAI auth modes (the openai_auth config key). OpenAIAuthAPIKey = "api_key" OpenAIAuthSubscription = "subscription" )
Resolution paths and embedded fallback.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶ added in v0.3.0
Backend optionally pins chat-spawned subagents to a provider and model. A zero value means subagents follow the coordinator's active backend.
type Compaction ¶ added in v0.2.0
type Compaction struct {
// ContextWindowTokens is an optional manual override for the active model's
// context window. When omitted, chat startup uses the compact package's
// conservative default.
ContextWindowTokens int `yaml:"context_window_tokens"`
}
Compaction configures when long transcripts are summarized.
type Config ¶
type Config struct {
// Provider selects the LLM backend: "anthropic" (default), "openai", "openrouter", or "google".
Provider string `yaml:"provider"`
// OpenAIAuth selects how the "openai" provider authenticates: "api_key"
// (default, uses OPENAI_API_KEY) or "subscription" (ChatGPT/Codex
// device-code credentials via `neo login`). This also applies when OpenAI
// is selected through /model while another provider is the startup default.
OpenAIAuth string `yaml:"openai_auth"`
Model string `yaml:"model"`
Subagents Backend `yaml:"subagents"`
Features Features `yaml:"features"`
Compaction Compaction `yaml:"compaction"`
// ToolApprovals lists optional interactive tool names and Bash prefixes.
ToolApprovals []string `yaml:"tool_approvals"`
Output Output `yaml:"output"`
// Phases overrides Neo's built-in named prompts by name or adds custom
// prompts. Resolution always retains defaults that are not overridden.
Phases map[string]phase.Definition `yaml:"phases"`
// contains filtered or unexported fields
}
Config is the parsed neo.yaml.
func Load ¶
Load reads the first available config file:
./neo.yaml → ~/.neo/config.yaml → embedded default
First hit wins — no merging.
func (*Config) AgentsFileEnabled ¶
AgentsFileEnabled reports whether AGENTS.md loading is on (default: true).
func (*Config) NamedPhases ¶ added in v0.6.0
func (c *Config) NamedPhases() []phase.Definition
NamedPhases returns Neo's defaults with configured definitions overlaid. Config loading validates this data, so the error is unreachable for loaded configurations. Programmatically constructed zero values still get defaults.
func (*Config) PromptCachingEnabled ¶ added in v0.2.0
PromptCachingEnabled reports whether the static system prompt is marked for provider-side prompt caching (default: true).
func (*Config) SkillsEnabled ¶
SkillsEnabled reports whether skill loading is on (default: true).
func (*Config) Source ¶
Source describes where this Config was loaded from (a file path or "embedded"). Useful in error messages and diagnostics.
func (*Config) SubagentsConfigured ¶ added in v0.3.0
SubagentsConfigured reports whether subagents use a backend independent of the coordinator. parseConfig fills either missing half when one is supplied.
func (*Config) SubscriptionAuth ¶ added in v0.2.0
SubscriptionAuth reports whether the openai provider should authenticate via a ChatGPT/Codex subscription rather than an API key.
func (*Config) VerboseEnabled ¶ added in v0.3.0
VerboseEnabled reports whether full tool output rendering is on (default: false).
type Features ¶
type Features struct {
AgentsFile *bool `yaml:"agents_file"` // load AGENTS.md into the chat system prompt
Skills *bool `yaml:"skills"` // discover and expand $name and /name skills
PromptCaching *bool `yaml:"prompt_caching"` // cache the static system prompt prefix
}
Features toggles optional, layered capabilities. The core agent loop is never gated by a feature — only capabilities built on top of it. Each flag is a tri-state *bool: nil ("absent from config") falls back to a built-in default, so a minimal neo.yaml still gets the full experience; set a flag to false to turn the capability off explicitly.
type Output ¶ added in v0.3.0
type Output struct {
// Verbose restores the full tool call/result rendering (complete file
// contents, command output, etc). Defaults to false: Neo shows live activity
// and concise completed receipts while still surfacing errors in full.
Verbose *bool `yaml:"verbose"`
}
Output configures how Neo renders tool activity during a chat session.