Documentation
¶
Index ¶
- Constants
- func Discover(ctx context.Context, startDir string) (string, error)
- func ValidateAgentRecoveryConfig(scope string, cfg AgentRecoveryConfig) error
- func ValidateConflictResolverConfig(scope string, cfg ConflictResolverConfig) error
- func WriteConfig(ctx context.Context, configPath string, cfg ProjectConfig) error
- type AgentRecoveryConfig
- type ConflictResolverConfig
- type Context
- type DefaultsConfig
- type ExecConfig
- type FetchReviewsConfig
- type FixReviewsConfig
- type ParallelTasksConfig
- type ProjectConfig
- func LoadConfig(ctx context.Context, workspaceRoot string) (ProjectConfig, string, error)
- func LoadConfigFile(ctx context.Context, configPath string) (ProjectConfig, bool, error)
- func LoadGlobalConfig(ctx context.Context) (ProjectConfig, string, error)
- func LoadGlobalConfigFile(ctx context.Context, configPath string) (ProjectConfig, bool, error)
- type RunsConfig
- type RuntimeOverrides
- type SoundConfig
- type StallOverrides
- type TaskRunConfig
- type TaskRuntimeByComplexityConfig
- type TaskRuntimeOverrides
- type TasksConfig
- type WatchReviewsConfig
Constants ¶
const ( TaskRunMultipleModeEnqueued = "enqueued" TaskRunMultipleModeParallel = "parallel" // DefaultRunMultipleParallelLimit is the effective parallel multi-run fanout // limit applied when run_multiple_parallel_limit is unset. DefaultRunMultipleParallelLimit = 2 DefaultRecoveryEnabled = false DefaultRecoveryIDE = model.IDECodex DefaultRecoveryModel = model.DefaultCodexModel DefaultRecoveryReasoningEffort = "medium" DefaultRecoveryMaxAttempts = 1 MaxRecoveryAttempts = 3 DefaultParallelTasksEnabled = false DefaultParallelTasksMaxConcurrency = 4 )
Variables ¶
This section is empty.
Functions ¶
func ValidateAgentRecoveryConfig ¶ added in v0.2.11
func ValidateAgentRecoveryConfig(scope string, cfg AgentRecoveryConfig) error
func ValidateConflictResolverConfig ¶ added in v0.2.11
func ValidateConflictResolverConfig(scope string, cfg ConflictResolverConfig) error
func WriteConfig ¶ added in v0.2.11
func WriteConfig(ctx context.Context, configPath string, cfg ProjectConfig) error
Types ¶
type AgentRecoveryConfig ¶ added in v0.2.11
type AgentRecoveryConfig struct {
Enabled *bool `toml:"enabled" json:"enabled,omitempty"`
IDE *string `toml:"ide" json:"ide,omitempty"`
Model *string `toml:"model" json:"model,omitempty"`
ReasoningEffort *string `toml:"reasoning_effort" json:"reasoning_effort,omitempty"`
MaxAttempts *int `toml:"max_attempts" json:"max_attempts,omitempty"`
}
func DefaultAgentRecoveryConfig ¶ added in v0.2.11
func DefaultAgentRecoveryConfig() AgentRecoveryConfig
func (AgentRecoveryConfig) ApplyDefaults ¶ added in v0.2.11
func (cfg AgentRecoveryConfig) ApplyDefaults() AgentRecoveryConfig
type ConflictResolverConfig ¶ added in v0.2.11
type ConflictResolverConfig struct {
Enabled *bool `toml:"enabled" json:"enabled,omitempty"`
IDE *string `toml:"ide" json:"ide,omitempty"`
Model *string `toml:"model" json:"model,omitempty"`
ReasoningEffort *string `toml:"reasoning_effort" json:"reasoning_effort,omitempty"`
MaxAttempts *int `toml:"max_attempts" json:"max_attempts,omitempty"`
ValidationCommand *[]string `toml:"validation_command" json:"validation_command,omitempty"`
}
func DefaultConflictResolverConfig ¶ added in v0.2.11
func DefaultConflictResolverConfig() ConflictResolverConfig
func (ConflictResolverConfig) ApplyDefaults ¶ added in v0.2.11
func (cfg ConflictResolverConfig) ApplyDefaults() ConflictResolverConfig
type Context ¶
type DefaultsConfig ¶
type DefaultsConfig struct {
RuntimeOverrides
ByComplexity TaskRuntimeByComplexityConfig `toml:"by_complexity,omitempty"`
}
func (DefaultsConfig) ComplexityRuntimeRules ¶ added in v0.2.15
func (cfg DefaultsConfig) ComplexityRuntimeRules() []model.TaskRuntimeRule
ComplexityRuntimeRules converts defaults into the shared task-runtime rule representation used by planning. The stable order is the task schema order.
type ExecConfig ¶ added in v0.1.9
type ExecConfig struct {
RuntimeOverrides
Verbose *bool `toml:"verbose,omitempty"`
TUI *bool `toml:"tui,omitempty"`
Persist *bool `toml:"persist,omitempty"`
}
type FetchReviewsConfig ¶
type FixReviewsConfig ¶
type ParallelTasksConfig ¶ added in v0.2.11
type ParallelTasksConfig struct {
Enabled *bool `toml:"enabled" json:"enabled,omitempty"`
MaxConcurrency *int `toml:"max_concurrency" json:"max_concurrency,omitempty"`
ConflictResolver *ConflictResolverConfig `toml:"conflict_resolver" json:"conflict_resolver,omitempty"`
}
func DefaultParallelTasksConfig ¶ added in v0.2.11
func DefaultParallelTasksConfig() ParallelTasksConfig
func (ParallelTasksConfig) ApplyDefaults ¶ added in v0.2.11
func (cfg ParallelTasksConfig) ApplyDefaults() ParallelTasksConfig
type ProjectConfig ¶
type ProjectConfig struct {
Defaults DefaultsConfig `toml:"defaults,omitempty"`
Tasks TasksConfig `toml:"tasks,omitempty"`
FixReviews FixReviewsConfig `toml:"fix_reviews,omitempty"`
FetchReviews FetchReviewsConfig `toml:"fetch_reviews,omitempty"`
WatchReviews WatchReviewsConfig `toml:"watch_reviews,omitempty"`
Exec ExecConfig `toml:"exec,omitempty"`
Runs RunsConfig `toml:"runs,omitempty"`
Recovery AgentRecoveryConfig `toml:"recovery,omitempty"`
Sound SoundConfig `toml:"sound,omitempty"`
}
func LoadConfig ¶
func LoadConfigFile ¶ added in v0.2.11
func LoadGlobalConfig ¶ added in v0.2.0
func LoadGlobalConfig(ctx context.Context) (ProjectConfig, string, error)
func LoadGlobalConfigFile ¶ added in v0.2.12
LoadGlobalConfigFile loads one explicitly resolved global config path without consulting the process environment again.
func (ProjectConfig) Validate ¶
func (cfg ProjectConfig) Validate() error
type RunsConfig ¶ added in v0.2.0
type RuntimeOverrides ¶ added in v0.1.9
type RuntimeOverrides struct {
IDE *string `toml:"ide,omitempty"`
Model *string `toml:"model,omitempty"`
OutputFormat *string `toml:"output_format,omitempty"`
ReasoningEffort *string `toml:"reasoning_effort,omitempty"`
AccessMode *string `toml:"access_mode,omitempty"`
Timeout *string `toml:"timeout,omitempty"`
TailLines *int `toml:"tail_lines,omitempty"`
AddDirs *[]string `toml:"add_dirs,omitempty"`
AutoCommit *bool `toml:"auto_commit,omitempty"`
MaxRetries *int `toml:"max_retries,omitempty"`
RetryBackoffMultiplier *float64 `toml:"retry_backoff_multiplier,omitempty"`
Stall StallOverrides `toml:"stall,omitempty"`
}
type SoundConfig ¶ added in v0.2.0
type SoundConfig struct {
Enabled *bool `toml:"enabled"`
OnCompleted *string `toml:"on_completed"`
OnFailed *string `toml:"on_failed"`
OnParked *string `toml:"on_parked"`
}
SoundConfig controls optional audio notifications on run lifecycle events. Disabled by default; opt-in via `[sound] enabled = true` in .compozy/config.toml.
type StallOverrides ¶ added in v0.2.15
type StallOverrides struct {
Enabled *bool `toml:"enabled,omitempty" json:"enabled,omitempty"`
Timeout *string `toml:"timeout,omitempty" json:"timeout,omitempty"`
ChildTimeout *string `toml:"child_timeout,omitempty" json:"child_timeout,omitempty"`
TerminalCommandTimeout *string `toml:"terminal_command_timeout,omitempty" json:"terminal_command_timeout,omitempty"`
Retries *int `toml:"retries,omitempty" json:"retries,omitempty"`
}
StallOverrides are the optional TOML knobs for stall detection and recovery. Durations are parsed from Go duration strings (e.g. "3m") consistent with the existing timeout override handling. All fields are resolved into model.RuntimeConfig, where defaults and the child > idle invariant are applied.
type TaskRunConfig ¶ added in v0.2.0
type TaskRunConfig struct {
IncludeCompleted *bool `toml:"include_completed"`
Recursive *bool `toml:"recursive"`
OutputFormat *string `toml:"output_format"`
RunMultipleMode *string `toml:"run_multiple_mode"`
RunMultipleParallelLimit *int `toml:"run_multiple_parallel_limit"`
Parallel ParallelTasksConfig `toml:"parallel"`
TUI *bool `toml:"tui"`
TaskRuntimeRules *[]model.TaskRuntimeRule `toml:"task_runtime_rules"`
}
func (TaskRunConfig) EffectiveRunMultipleMode ¶ added in v0.2.7
func (cfg TaskRunConfig) EffectiveRunMultipleMode() string
func (TaskRunConfig) EffectiveRunMultipleParallelLimit ¶ added in v0.2.10
func (cfg TaskRunConfig) EffectiveRunMultipleParallelLimit() int
EffectiveRunMultipleParallelLimit returns the configured parallel multi-run fanout limit, defaulting to DefaultRunMultipleParallelLimit when unset.
type TaskRuntimeByComplexityConfig ¶ added in v0.2.15
type TaskRuntimeByComplexityConfig struct {
Low TaskRuntimeOverrides `toml:"low,omitempty"`
Medium TaskRuntimeOverrides `toml:"medium,omitempty"`
High TaskRuntimeOverrides `toml:"high,omitempty"`
Critical TaskRuntimeOverrides `toml:"critical,omitempty"`
}
TaskRuntimeByComplexityConfig declares optional runtime defaults for the four task complexities accepted by the v2 task schema.
type TaskRuntimeOverrides ¶ added in v0.2.15
type TaskRuntimeOverrides struct {
IDE *string `toml:"ide,omitempty"`
Model *string `toml:"model,omitempty"`
ReasoningEffort *string `toml:"reasoning_effort,omitempty"`
}
TaskRuntimeOverrides are the runtime fields that may vary with task complexity. Execution-wide fields stay in RuntimeOverrides.
type TasksConfig ¶ added in v0.1.7
type TasksConfig struct {
Types *[]string `toml:"types,omitempty"`
Run TaskRunConfig `toml:"run,omitempty"`
}
type WatchReviewsConfig ¶ added in v0.2.0
type WatchReviewsConfig struct {
MaxRounds *int `toml:"max_rounds"`
PollInterval *string `toml:"poll_interval"`
ReviewTimeout *string `toml:"review_timeout"`
QuietPeriod *string `toml:"quiet_period"`
AutoPush *bool `toml:"auto_push"`
UntilClean *bool `toml:"until_clean"`
PushRemote *string `toml:"push_remote"`
PushBranch *string `toml:"push_branch"`
}