config

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReasoningBudgetStandard   = "standard"
	ReasoningBudgetAgent      = "agent"
	ReasoningBudgetAggressive = "aggressive"
)

Variables

This section is empty.

Functions

func EnsurePaths

func EnsurePaths(paths Paths) error

func EnsurePathsWith

func EnsurePathsWith(paths Paths, mkdirAll func(string, os.FileMode) error) error

func Load

func Load() (Config, Paths, error)

func LoadWith

func LoadWith(
	resolve func() (Paths, error),
	ensure func(Paths) error,
	getwd func() (string, error),
	stat func(string) (os.FileInfo, error),
	readFile func(string) ([]byte, error),
) (Config, Paths, error)

func NormalizeReasoningBudgetMode

func NormalizeReasoningBudgetMode(value string) (string, error)

func ResolveReasoningBudgetMode

func ResolveReasoningBudgetMode(value string) string

func Save added in v0.3.0

func Save(paths Paths, cfg Config) error

func SaveWith added in v0.3.0

func SaveWith(
	paths Paths,
	cfg Config,
	ensure func(Paths) error,
	writeFile func(string, []byte, os.FileMode) error,
) error

Types

type Advanced added in v0.4.0

type Advanced struct {
	AggressivePrepareRewrites bool `json:"aggressive_prepare_rewrites"`
	NoisePrefiltering         bool `json:"noise_prefiltering"`
	AdaptiveBudgets           bool `json:"adaptive_budgets"`
	EarlyCaptureStop          bool `json:"early_capture_stop"`
	SemanticCompaction        bool `json:"semantic_compaction"`
	CompressionContract       bool `json:"compression_contract"`
	CompactArtifactRefs       bool `json:"compact_artifact_refs"`
}

type Config

type Config struct {
	TeeOnFailure        bool        `json:"tee_on_failure"`
	MaxPreviewLines     int         `json:"max_preview_lines"`
	MaxMatchGroups      int         `json:"max_match_groups"`
	ReasoningBudgetMode string      `json:"reasoning_budget_mode"`
	Advanced            Advanced    `json:"advanced"`
	UpdateCheck         UpdateCheck `json:"update_check"`
	ProjectRules        rules.File  `json:"-"`
}

func Default

func Default() Config

func Normalize

func Normalize(cfg Config) (Config, error)

type Paths

type Paths struct {
	ConfigDir       string
	ConfigFile      string
	DataDir         string
	HistoryFile     string
	TeeDir          string
	ProjectDir      string
	ProjectRuleFile string
}

func ResolvePaths

func ResolvePaths() (Paths, error)

func ResolvePathsWith

func ResolvePathsWith(
	userConfigDir func() (string, error),
	userCacheDir func() (string, error),
	userHomeDir func() (string, error),
) (Paths, error)

type UpdateCheck added in v0.2.0

type UpdateCheck struct {
	Enabled       bool `json:"enabled"`
	IntervalHours int  `json:"interval_hours"`
	AutoUpdate    bool `json:"auto_update"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL