Documentation
¶
Overview ¶
Package config owns the initech.yaml schema. It reads, parses, validates, and exposes the Project type that all other packages consume.
Config discovery order: explicit --config flag, ./initech.yaml in the current directory, then walk upward to find initech.yaml (like .git discovery). The first match wins.
This package does not know about git, scaffold, or roles. It only knows how to turn a YAML file into a validated Go struct.
Index ¶
Constants ¶
const DefaultPressureThreshold = 85
DefaultPressureThreshold is the RSS percentage above which agents may be auto-suspended. Used when PressureThreshold is zero (unset).
Variables ¶
This section is empty.
Functions ¶
func Discover ¶
Discover finds an initech.yaml file by walking upward from dir. Returns the absolute path to the config file, or an error if none is found.
Types ¶
type BeadsConfig ¶
type BeadsConfig struct {
Prefix string `yaml:"prefix,omitempty"`
}
BeadsConfig holds beads issue tracker settings.
type Project ¶
type Project struct {
Name string `yaml:"project"`
Root string `yaml:"root"`
Repos []Repo `yaml:"repos,omitempty"`
Env map[string]string `yaml:"env,omitempty"`
Beads BeadsConfig `yaml:"beads,omitempty"`
Resource ResourceConfig `yaml:"resource,omitempty"`
Roles []string `yaml:"roles"`
Grid []string `yaml:"grid,omitempty"`
ClaudeCommand []string `yaml:"claude_command,omitempty"`
ClaudeArgs []string `yaml:"claude_args,omitempty"`
RoleOverrides map[string]RoleOverride `yaml:"role_overrides,omitempty"`
// Cross-machine coordination fields.
PeerName string `yaml:"peer_name,omitempty"` // This instance's identity (e.g., "workbench").
Mode string `yaml:"mode,omitempty"` // "" (default TUI) or "headless" (daemon).
Listen string `yaml:"listen,omitempty"` // TCP listen addr for headless mode (e.g., ":7391").
Token string `yaml:"token,omitempty"` // Shared auth token.
Remotes map[string]Remote `yaml:"remotes,omitempty"` // Named remote peers.
}
Project is the top-level config read from initech.yaml.
type Remote ¶ added in v0.23.17
type Remote struct {
Addr string `yaml:"addr"` // host:port of the remote peer.
Token string `yaml:"token,omitempty"` // Auth token for this remote (overrides project-level token).
}
Remote describes a remote initech peer for cross-machine coordination.
type ResourceConfig ¶
type ResourceConfig struct {
AutoSuspend bool `yaml:"auto_suspend,omitempty"`
PressureThreshold int `yaml:"pressure_threshold,omitempty"` // RSS percentage (0-100). Default: 85.
}
ResourceConfig holds resource management settings. When AutoSuspend is true, the TUI runs a memory monitor and can auto-suspend/resume agents under memory pressure. When absent or false, all resource management is dormant.
func (ResourceConfig) EffectivePressureThreshold ¶
func (rc ResourceConfig) EffectivePressureThreshold() int
EffectivePressureThreshold returns the pressure threshold to use, applying the default when the configured value is zero.
type RoleOverride ¶
type RoleOverride struct {
TechStack string `yaml:"tech_stack,omitempty"`
BuildCmd string `yaml:"build_cmd,omitempty"`
TestCmd string `yaml:"test_cmd,omitempty"`
Dir string `yaml:"dir,omitempty"`
RepoName string `yaml:"repo_name,omitempty"`
ClaudeArgs []string `yaml:"claude_args,omitempty"`
}
RoleOverride lets a project customize per-role settings beyond catalog defaults.