project

package
v0.3.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: May 16, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package project provides per-project configuration management

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByteSize

type ByteSize int64

ByteSize represents a size in bytes (supports KB, MB, GB suffixes in TOML)

func (ByteSize) Bytes

func (b ByteSize) Bytes() int64

Bytes returns the size in bytes

func (ByteSize) String

func (b ByteSize) String() string

String returns a human-readable representation

func (*ByteSize) UnmarshalText

func (b *ByteSize) UnmarshalText(text []byte) error

UnmarshalText parses byte sizes from TOML (e.g., "250KB", "1MB")

type Config

type Config struct {
	// Agent configuration
	Agent       string        `toml:"agent"`
	MaxWorkers  int           `toml:"max_workers"`
	TaskTimeout time.Duration `toml:"task_timeout"`
	MaxAttempts int           `toml:"max_attempts"`

	// Context settings
	TaskContextCount  int           `toml:"task_context_count"`
	TaskContextMaxAge time.Duration `toml:"task_context_max_age"`

	// Size thresholds
	MaxDescriptionSize ByteSize `toml:"max_description_size"`
	MaxDiffSize        ByteSize `toml:"max_diff_size"`
	MaxFileSize        ByteSize `toml:"max_file_size"`

	// Project-specific guidelines
	Guidelines string `toml:"guidelines"`

	// Labels to apply to all tasks
	DefaultLabels []string `toml:"default_labels"`
	// contains filtered or unexported fields
}

Config holds per-project Drover configuration

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns a default configuration

func Load

func Load(projectDir string) (*Config, error)

Load loads the project configuration from the project directory If no .drover.toml exists, returns a default config

func (*Config) ConfigPath

func (c *Config) ConfigPath() string

ConfigPath returns the path to the config file

func (*Config) GetGuidelines

func (c *Config) GetGuidelines() string

GetGuidelines returns the project guidelines formatted for prompt inclusion

func (*Config) GetLabels

func (c *Config) GetLabels() []string

GetLabels returns the default labels

func (*Config) HasLabels

func (c *Config) HasLabels() bool

HasLabels returns true if default labels are configured

func (*Config) MergeWithGlobal

func (c *Config) MergeWithGlobal(agent string, workers int, timeout time.Duration, maxAttempts int)

MergeWith merges project config with global config values Global config takes precedence for values not set in project config

func (*Config) Save

func (c *Config) Save() error

Save saves the configuration to .drover.toml

func (*Config) Validate

func (c *Config) Validate() error

Validate checks if the configuration is valid

Jump to

Keyboard shortcuts

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