config

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultRelationTypes = []string{"blocked_by", "relates_to", "duplicate_of"}

DefaultRelationTypes returns the default relation types

Functions

func FindProjectRoot

func FindProjectRoot() (string, error)

FindProjectRoot searches for an existing project root by looking for mcp-tasks.yaml or a tasks directory, starting from cwd and moving up. Returns the directory containing the config/tasks, or empty string if not found.

Types

type AutoArchiveConfig added in v1.2.0

type AutoArchiveConfig struct {
	Enabled   bool `yaml:"enabled"`
	AfterDays int  `yaml:"after_days"`
}

AutoArchiveConfig holds configuration for automatic task archiving

type Config

type Config struct {
	TaskTypes     []string          `yaml:"task_types"`
	RelationTypes []string          `yaml:"relation_types,omitempty"`
	AutoArchive   AutoArchiveConfig `yaml:"auto_archive"`
	DataDir       string            `yaml:"-"` // Set from env or default
	ProjectFound  bool              `yaml:"-"` // Whether an existing project was discovered
}

Config holds application configuration

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns configuration with defaults

func Load

func Load() (*Config, error)

Load loads configuration from file and environment

func (*Config) IsValidRelationType added in v1.1.0

func (c *Config) IsValidRelationType(t string) bool

IsValidRelationType checks if relation type is in configured list

func (*Config) IsValidTaskType

func (c *Config) IsValidTaskType(t string) bool

IsValidTaskType checks if task type is in configured list

func (*Config) TasksDir

func (c *Config) TasksDir() string

TasksDir returns the full path to the tasks directory

Jump to

Keyboard shortcuts

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