store

package
v0.2.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBranchDeleted    = errors.New("branch deleted")
	ErrBranchMissing    = errors.New("branch missing")
	ErrBaseMissing      = errors.New("base missing")
	ErrCommitMissing    = errors.New("commit missing")
	ErrMergeBaseMissing = errors.New("merge-base missing")
	ErrGitNotRepo       = errors.New("not a git repository")
)

Functions

This section is empty.

Types

type Changes

type Changes struct {
	Added   int
	Removed int
	Status  ChangesStatus
	Err     error
}

type ChangesStatus

type ChangesStatus string
const (
	ChangesStatusApplied ChangesStatus = "applied"
	ChangesStatusMissing ChangesStatus = "missing"
)

type Commits

type Commits struct {
	Count int
	Err   error
}

type GetOptions

type GetOptions struct{}

type ListOptions

type ListOptions struct {
	All bool
	// TargetCount only applies when All is false. If zero, the store uses a default.
	TargetCount int
}

type ListResult

type ListResult struct {
	Tasks               []TaskListItem
	Errors              []TaskLoadError
	Workspaces          []workspace.Entry
	AvailableWorkspaces int
}

type Store

type Store interface {
	List(ctx context.Context, opts ListOptions) (ListResult, error)
	Get(ctx context.Context, name string, opts GetOptions) (TaskView, error)
}

func New

func New() Store

type TaskListItem

type TaskListItem struct {
	Name         string
	Title        string
	FollowUp     string
	BaseBranch   string
	BaseCommit   string
	TaskStatus   task.TaskStatus
	WorkerStatus task.WorkerStatus
	Stage        string

	Workspace  string
	StartedAt  time.Time
	LastActive time.Time
	ToolCalls  int

	ProgressDone  int
	ProgressTotal int

	LastRunDurationMS int
	LastError         string

	Changes Changes
}

type TaskLoadError

type TaskLoadError struct {
	Name string
	Err  error
}

type TaskView

type TaskView struct {
	Task         *task.Task
	BaseCommit   string
	State        *task.State
	ProgressMeta *task.Progress
	Workflow     *workflow.Workflow

	TaskStatus   task.TaskStatus
	WorkerStatus task.WorkerStatus
	Stage        string

	LastHistoryNS int64
	LastRunMS     int

	Model     string
	Reasoning string

	ProgressSteps []task.ProgressStep
	TaskFiles     []string

	Changes Changes
	Commits Commits

	ConflictFiles []string
}

Jump to

Keyboard shortcuts

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