taskcontext

package
v0.0.0-...-5f22abe Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DepEntry

type DepEntry struct {
	ID     string `json:"id" yaml:"id"`
	Title  string `json:"title" yaml:"title"`
	Status string `json:"status" yaml:"status"`
}

DepEntry represents a dependency task in the context output.

type FileEntry

type FileEntry struct {
	Path      string `json:"path" yaml:"path"`
	Source    string `json:"source" yaml:"source"`
	Exists    bool   `json:"exists" yaml:"exists"`
	IsDir     bool   `json:"is_dir,omitempty" yaml:"is_dir,omitempty"`
	Binary    bool   `json:"binary,omitempty" yaml:"binary,omitempty"`
	Generated bool   `json:"generated,omitempty" yaml:"generated,omitempty"`
	Content   string `json:"content,omitempty" yaml:"content,omitempty"`
	Lines     int    `json:"lines,omitempty" yaml:"lines,omitempty"`
}

FileEntry represents a single file in the resolved context.

type Options

type Options struct {
	Scopes         ScopeMap
	ProjectRoot    string
	Resolve        bool // expand directory paths to individual files
	IncludeContent bool
	MaxFiles       int
}

Options configures context resolution behavior.

type Result

type Result struct {
	TaskID       string      `json:"task_id" yaml:"task_id"`
	Title        string      `json:"title" yaml:"title"`
	TaskBody     string      `json:"task_body,omitempty" yaml:"task_body,omitempty"`
	Files        []FileEntry `json:"files" yaml:"files"`
	Dependencies []DepEntry  `json:"dependencies,omitempty" yaml:"dependencies,omitempty"`
}

Result holds the resolved context for a task.

func Resolve

func Resolve(task *model.Task, opts Options) (*Result, error)

Resolve builds the context result for a task.

type ScopeMap

type ScopeMap map[string][]string

ScopeMap maps scope names to their file paths.

Jump to

Keyboard shortcuts

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