Documentation
¶
Index ¶
- Constants
- func Load(path string) (Config, ValidationResult, error)
- type AdapterConfig
- type AgentsConfig
- type ConcurrencyConfig
- type Config
- type ConfigDiagnostic
- type CursorConfig
- type DiagnosticSeverity
- type ModelPolicy
- type ProcessConfig
- type ProviderConfig
- type RoutingConfig
- type RuntimeConfig
- type ServerConfig
- type SkillsConfig
- type SpritesConfig
- type ValidationResult
Constants ¶
const ( DiagnosticCodeRoutingDefaultsMissing = "routing_defaults_missing" DiagnosticCodeAgentDirMissing = "agent_dir_missing" DiagnosticCodeAdapterSkillMissing = "adapter_skill_missing" DiagnosticCodeAdapterScriptEmpty = "adapter_script_empty" DiagnosticCodeAdapterScriptMissing = "adapter_script_missing" DiagnosticCodeProviderUnknown = "provider_unknown" DiagnosticCodeRuntimeDefaultUnknown = "runtime_default_unknown" DiagnosticCodeNoBacklogAdapter = "no_backlog_adapter" DiagnosticCodeConfigFieldRemoved = "config_field_removed" DiagnosticCodeConfigFieldUnknown = "config_field_unknown" DiagnosticCodeConfigValueNormalized = "config_value_normalized" )
const (
DefaultConfigPath = ".noodle.toml"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AdapterConfig ¶
type AgentsConfig ¶
type AgentsConfig struct {
Claude ProviderConfig `toml:"claude"`
Codex ProviderConfig `toml:"codex"`
}
type ConcurrencyConfig ¶
type ConcurrencyConfig struct {
MaxConcurrency int `toml:"max_concurrency"`
}
type Config ¶
type Config struct {
Adapters map[string]AdapterConfig `toml:"adapters"`
Routing RoutingConfig `toml:"routing"`
Skills SkillsConfig `toml:"skills"`
Mode string `toml:"mode"`
Concurrency ConcurrencyConfig `toml:"concurrency"`
Agents AgentsConfig `toml:"agents"`
Runtime RuntimeConfig `toml:"runtime"`
Server ServerConfig `toml:"server"`
}
Config is the top-level .noodle.toml contract for runtime wiring.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns the full no-config-file defaults.
func (Config) AvailableRuntimes ¶
type ConfigDiagnostic ¶
type CursorConfig ¶
type CursorConfig struct {
APIKeyEnv string `toml:"api_key_env"`
BaseURL string `toml:"base_url"`
Repository string `toml:"repository"`
MaxConcurrent int `toml:"max_concurrent"`
}
func (CursorConfig) APIKey ¶
func (c CursorConfig) APIKey() string
type DiagnosticSeverity ¶
type DiagnosticSeverity string
const ( DiagnosticSeverityRepairable DiagnosticSeverity = "repairable" DiagnosticSeverityFatal DiagnosticSeverity = "fatal" DiagnosticSeverityWarning DiagnosticSeverity = "warning" )
type ModelPolicy ¶
type ProcessConfig ¶
type ProcessConfig struct {
MaxConcurrent int `toml:"max_concurrent"`
}
type ProviderConfig ¶
type RoutingConfig ¶
type RoutingConfig struct {
Defaults ModelPolicy `toml:"defaults"`
}
type RuntimeConfig ¶
type RuntimeConfig struct {
Default string `toml:"default"` // runtime kind, defaults to process
Process ProcessConfig `toml:"process"`
Sprites SpritesConfig `toml:"sprites"`
Cursor CursorConfig `toml:"cursor"`
// contains filtered or unexported fields
}
RuntimeConfig controls the default runtime for spawned cook sessions.
func (RuntimeConfig) MaxConcurrentFor ¶
func (c RuntimeConfig) MaxConcurrentFor(name string) int
MaxConcurrentFor returns the per-runtime concurrency cap for a given runtime name. Returns 0 when unlimited (no per-runtime cap; the global MaxConcurrency ceiling applies).
type ServerConfig ¶
type ServerConfig struct {
Port int `toml:"port"`
Enabled *bool `toml:"enabled"` // nil = auto (enabled in interactive terminals)
}
ServerConfig controls the web UI server.
type SkillsConfig ¶
type SkillsConfig struct {
Paths []string `toml:"paths"`
}
type SpritesConfig ¶
type SpritesConfig struct {
TokenEnv string `toml:"token_env"`
BaseURL string `toml:"base_url"`
SpriteName string `toml:"sprite_name"`
GitTokenEnv string `toml:"git_token_env"`
MaxConcurrent int `toml:"max_concurrent"`
}
func (SpritesConfig) GitToken ¶
func (c SpritesConfig) GitToken() string
func (SpritesConfig) Token ¶
func (c SpritesConfig) Token() string
type ValidationResult ¶
type ValidationResult struct {
Diagnostics []ConfigDiagnostic
}
func Validate ¶
func Validate(config Config) ValidationResult
Validate classifies repairable and fatal runtime diagnostics.
func (ValidationResult) CanSpawn ¶
func (r ValidationResult) CanSpawn() bool
func (ValidationResult) Fatals ¶
func (r ValidationResult) Fatals() []ConfigDiagnostic
func (ValidationResult) Repairables ¶
func (r ValidationResult) Repairables() []ConfigDiagnostic
func (ValidationResult) Warnings ¶
func (r ValidationResult) Warnings() []ConfigDiagnostic