Documentation
¶
Index ¶
Constants ¶
const ConfigFile = ".herdos.yml"
Variables ¶
This section is empty.
Functions ¶
func CodexSubscriptionEnvSet ¶ added in v0.8.9
func CodexSubscriptionEnvSet() bool
CodexSubscriptionEnvSet reports whether any CODEX_AUTH_JSON or CODEX_AUTH_JSON_<n> env var is present (non-empty after trimming). A set value signals ChatGPT-subscription auth, which requires one auth.json per runner; an empty environment signals plain API-key auth, which has no shared-auth.json constraint.
func MissingCodexAuthJSONSlots ¶ added in v0.8.9
MissingCodexAuthJSONSlots returns the names of the CODEX_AUTH_JSON_<i> env vars (for i in 1..n) that are unset or empty after trimming. Multi-replica subscription mode requires one independent seed per replica, so a populated result signals an incomplete configuration. The slice preserves index order; an empty (non-nil) slice means all n slots are populated.
Types ¶
type Agent ¶
type Agent struct {
Provider string `yaml:"provider"`
Binary string `yaml:"binary"`
Model string `yaml:"model"`
MaxTurns int `yaml:"max_turns"` // Max agentic turns for headless mode (0 = agent default)
Exec string `yaml:"exec"` // local | docker (empty = local). Where `herd plan` runs the agent.
ExecImage string `yaml:"exec_image"` // Override image for exec=docker (empty = default ghcr.io/herd-os/herd-runner-base:<version>)
// CodexReasoningEffort controls the Codex provider's reasoning depth.
// One of minimal|low|medium|high (Codex provider only; default medium).
// Maps to `-c model_reasoning_effort=<value>` on every Codex invocation.
CodexReasoningEffort string `yaml:"codex_reasoning_effort"`
// CodexReplicas controls how many runner replicas are generated for the
// Codex subscription setup. default 1; >1 generates N runner replicas
// (Codex subscription mode).
CodexReplicas int `yaml:"codex_replicas"`
}
type Config ¶
type Config struct {
Version int `yaml:"version"`
Platform Platform `yaml:"platform"`
Agent Agent `yaml:"agent"`
Workers Workers `yaml:"workers"`
Integrator Integrator `yaml:"integrator"`
Monitor Monitor `yaml:"monitor"`
PullRequests PullRequests `yaml:"pull_requests"`
}
type Integrator ¶
type Integrator struct {
Strategy string `yaml:"strategy"`
OnConflict string `yaml:"on_conflict"`
MaxConflictResolutionAttempts int `yaml:"max_conflict_resolution_attempts"`
RequireCI bool `yaml:"require_ci"`
Review bool `yaml:"review"`
ReviewMaxFixCycles int `yaml:"review_max_fix_cycles"`
ReviewStrictness string `yaml:"review_strictness"` // "standard", "strict", "lenient"
ReviewFixSeverity string `yaml:"review_fix_severity"` // minimum severity to fix: "high", "medium", "low" (default: "medium")
CIMaxFixCycles int `yaml:"ci_max_fix_cycles"`
}
type Monitor ¶
type Monitor struct {
PatrolIntervalMinutes int `yaml:"patrol_interval_minutes"`
StaleThresholdMinutes int `yaml:"stale_threshold_minutes"`
MaxPRHAgeHours int `yaml:"max_pr_age_hours"`
AutoRedispatch bool `yaml:"auto_redispatch"`
MaxRedispatchAttempts int `yaml:"max_redispatch_attempts"`
NotifyOnFailure bool `yaml:"notify_on_failure"`
NotifyUsers []string `yaml:"notify_users"`
}
type PullRequests ¶
type ValidationError ¶
ValidationError holds one or more validation errors.
func Validate ¶
func Validate(cfg *Config) *ValidationError
Validate checks the config for invalid values. Returns a *ValidationError if there are errors (warnings alone don't cause an error).
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
type Workers ¶
type Workers struct {
MaxConcurrent int `yaml:"max_concurrent"`
RunnerLabel string `yaml:"runner_label"`
TimeoutMinutes int `yaml:"timeout_minutes"`
ProgressIntervalSeconds int `yaml:"progress_interval_seconds"` // how often to post progress updates (0 = disabled)
ExtraEnv []string `yaml:"extra_env"` // GitHub Actions secret names to pass through to workers
}