store

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IdeaScopeRoot    = "root"
	IdeaScopeProject = "project"
	IdeaScopeAll     = "all"
)
View Source
const (
	MatchAuto     = "auto"
	MatchExact    = "exact"
	MatchPrefix   = "prefix"
	MatchContains = "contains"
	MatchSearch   = "search"
)

Variables

View Source
var (
	ErrNotFound = errors.New("not found")
	ErrConflict = errors.New("conflict")
	ErrInvalid  = errors.New("invalid")
)

Functions

func ParseIdeaContent added in v0.2.0

func ParseIdeaContent(text string) (string, []string, string)

ParseIdeaContent exposes the idea parser for CLI stdin capture.

Types

type AddIdeaInput added in v0.2.0

type AddIdeaInput struct {
	Title   string
	Project string
	Tags    []string
	Body    string
}

type AddTaskInput

type AddTaskInput struct {
	Title       string
	Project     string
	Column      string
	Due         string
	Priority    string
	Tags        []string
	Description string
}

type AgentConfig

type AgentConfig struct {
	RequireExplicit bool   `json:"require_explicit"`
	DefaultProject  string `json:"default_project"`
	DefaultView     string `json:"default_view"` // today|week
	WeekDays        int    `json:"week_days"`
	OpenOnly        bool   `json:"open_only"`
	SummaryGroup    string `json:"summary_group"`  // none|project|column
	SummaryTotals   bool   `json:"summary_totals"` // show per-group counts
}

type ColumnDef

type ColumnDef struct {
	ID     string `json:"id"`
	Name   string `json:"name"`
	Dir    string `json:"dir"`
	Status string `json:"status"` // open|doing|blocked|done|archived
}

type Config

type Config struct {
	Schema  int          `json:"schema"`
	Columns []ColumnDef  `json:"columns"`
	Agent   *AgentConfig `json:"agent,omitempty"`
}

type Idea added in v0.2.0

type Idea struct {
	IdeaMeta `json:",inline"`
	Path     string `json:"path"`
	Body     string `json:"-"`
}

func (*Idea) RenderHuman added in v0.2.0

func (i *Idea) RenderHuman() string

type IdeaListFilter added in v0.2.0

type IdeaListFilter struct {
	Project string
	Scope   string
	Tag     string
	Search  string
}

type IdeaMatchConflictError added in v0.2.0

type IdeaMatchConflictError struct {
	Reason  string
	Matches []Idea
}

IdeaMatchConflictError provides details when a selector matches multiple ideas. It still satisfies errors.Is(err, ErrConflict).

func (*IdeaMatchConflictError) Error added in v0.2.0

func (e *IdeaMatchConflictError) Error() string

func (*IdeaMatchConflictError) Is added in v0.2.0

func (e *IdeaMatchConflictError) Is(target error) bool

type IdeaMeta added in v0.2.0

type IdeaMeta struct {
	ID        string     `json:"id"`
	Title     string     `json:"title"`
	Project   string     `json:"project"`
	Tags      []string   `json:"tags"`
	CreatedAt *time.Time `json:"created_at"`
	UpdatedAt *time.Time `json:"updated_at"`
}

type IdeaSelectorFilter added in v0.2.0

type IdeaSelectorFilter struct {
	Project string
	Scope   string
	Match   string
}

type ListFilter

type ListFilter struct {
	Project string
	Column  string
	Status  string
	Tag     string
	Search  string
	All     bool
}

type MatchConflictError added in v0.1.2

type MatchConflictError struct {
	Reason  string
	Matches []Task
}

MatchConflictError provides details when a selector matches multiple tasks. It still satisfies errors.Is(err, ErrConflict).

func (*MatchConflictError) Error added in v0.1.2

func (e *MatchConflictError) Error() string

func (*MatchConflictError) Is added in v0.1.2

func (e *MatchConflictError) Is(target error) bool

type Project

type Project struct {
	Schema    int       `json:"schema"`
	ID        string    `json:"id"`
	Name      string    `json:"name"`
	Slug      string    `json:"slug"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type SelectorFilter added in v0.1.3

type SelectorFilter struct {
	Project         string
	Column          string
	Status          string
	IncludeArchived bool
	Match           string
}

type Task

type Task struct {
	TaskMeta `json:",inline"`
	Path     string `json:"path"`
	Body     string `json:"-"`
}

func (*Task) IDShort

func (t *Task) IDShort(n int) string

func (*Task) PriorityAbbrev

func (t *Task) PriorityAbbrev() string

func (*Task) RenderHuman

func (t *Task) RenderHuman() string

func (*Task) StatusAbbrev

func (t *Task) StatusAbbrev() string

type TaskMeta

type TaskMeta struct {
	Schema      int        `yaml:"schema" json:"schema"`
	ID          string     `yaml:"id" json:"id"`
	Title       string     `yaml:"title" json:"title"`
	Status      string     `yaml:"status" json:"status"`
	Project     string     `yaml:"project" json:"project"`
	Column      string     `yaml:"column" json:"column"`
	Priority    string     `yaml:"priority" json:"priority"`
	Tags        []string   `yaml:"tags" json:"tags"`
	Due         string     `yaml:"due" json:"due"`
	CreatedAt   *time.Time `yaml:"created_at" json:"created_at"`
	UpdatedAt   *time.Time `yaml:"updated_at" json:"updated_at"`
	CompletedAt *time.Time `yaml:"completed_at" json:"completed_at"`
	ArchivedAt  *time.Time `yaml:"archived_at" json:"archived_at"`
}

type Workspace

type Workspace struct {
	Root string
	// contains filtered or unexported fields
}

func Open

func Open(root string) (*Workspace, error)

Open opens a workspace rooted at root. It does not create files until Init is called.

func (*Workspace) AddIdea added in v0.2.0

func (w *Workspace) AddIdea(in AddIdeaInput) (*Idea, error)

func (*Workspace) AddIdeaNote added in v0.2.0

func (w *Workspace) AddIdeaNote(idea *Idea, note string) (*Idea, error)

func (*Workspace) AddNote

func (w *Workspace) AddNote(prefix string, note string) (*Task, error)

func (*Workspace) AddTask

func (w *Workspace) AddTask(in AddTaskInput) (*Task, error)

func (*Workspace) Config

func (w *Workspace) Config() Config

func (*Workspace) CreateProject

func (w *Workspace) CreateProject(name string) (*Project, error)

func (*Workspace) DeleteIdea added in v0.2.0

func (w *Workspace) DeleteIdea(idea *Idea) error

func (*Workspace) GetIdeaBySelectorFiltered added in v0.2.0

func (w *Workspace) GetIdeaBySelectorFiltered(selector string, filter IdeaSelectorFilter) (*Idea, error)

func (*Workspace) GetTaskByPrefix

func (w *Workspace) GetTaskByPrefix(prefix string) (*Task, error)

func (*Workspace) GetTaskBySelector added in v0.1.2

func (w *Workspace) GetTaskBySelector(selector string, project string) (*Task, error)

func (*Workspace) GetTaskBySelectorFiltered added in v0.1.3

func (w *Workspace) GetTaskBySelectorFiltered(selector string, filter SelectorFilter) (*Task, error)

func (*Workspace) Init

func (w *Workspace) Init(defaultProject string) error

func (*Workspace) ListIdeas added in v0.2.0

func (w *Workspace) ListIdeas(f IdeaListFilter) ([]Idea, error)

func (*Workspace) ListProjects

func (w *Workspace) ListProjects() ([]Project, error)

func (*Workspace) ListTasks

func (w *Workspace) ListTasks(f ListFilter) ([]Task, error)

func (*Workspace) MoveTask

func (w *Workspace) MoveTask(prefix string, toColumnID string) (*Task, error)

func (*Workspace) RenderAgenda

func (w *Workspace) RenderAgenda(project string, days int, openOnly bool, groupBy string, showTotals bool, format string) (string, error)

func (*Workspace) RenderBoard

func (w *Workspace) RenderBoard(project string, ascii bool, format string, openOnly bool) (string, error)

func (*Workspace) RenderToday

func (w *Workspace) RenderToday(project string, openOnly bool, groupBy string, showTotals bool, format string) (string, error)

func (*Workspace) ResolveIdeas added in v0.2.0

func (w *Workspace) ResolveIdeas(selector string, filter IdeaSelectorFilter) ([]Idea, error)

func (*Workspace) ResolveTasks added in v0.1.3

func (w *Workspace) ResolveTasks(selector string, filter SelectorFilter) ([]Task, error)

func (*Workspace) SaveConfig

func (w *Workspace) SaveConfig(cfg Config) error

Jump to

Keyboard shortcuts

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