task

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPendingChildren = errors.New("cannot complete: active child tasks pending")

ErrPendingChildren is returned by UpdateTaskStatus when a task can't be marked completed because it still has active or in-progress children.

Functions

func AddInterval

func AddInterval(t time.Time, interval int, unit byte) time.Time

AddInterval adds N units to the given time, handling month overflow.

func ClipDuration

func ClipDuration(entry ClockEntry, rangeStart, rangeEnd time.Time) time.Duration

ClipDuration returns the duration of a clock entry clipped to [rangeStart, rangeEnd]. Open entries use time.Now() as end. Returns 0 if entry doesn't overlap the range.

func ClockIn

func ClockIn(t *Task) error

ClockIn appends a new open CLOCK entry after the task line. Returns error if task already has an active clock.

func ClockOut

func ClockOut(t *Task) error

ClockOut completes the open CLOCK entry for the task. Returns error if no active clock found.

func CompleteRecurringTask

func CompleteRecurringTask(t *Task, c *config.Config, targetKeyword string) (advanced bool, err error)

CompleteRecurringTask handles advancing a recurring task's date on completion. Returns advanced=true if the task was recurring and the date was advanced. If not recurring, returns false and the caller should proceed with normal completion. Auto-clocks-out if the task has an active clock, then records a LOG transition entry.

func DetectCycles

func DetectCycles(tasks []*Task)

DetectCycles finds all tasks that participate in circular dependencies. It builds a directed graph from task references and uses DFS to detect cycles. Tasks participating in cycles will have their InCycle field set to true.

func FindFiles

func FindFiles(c *config.Config, project string) ([]string, error)

FindFiles finds README.md files in project directories (structured mode) or all .md files in the project tree (unstructured mode)

func FormatDuration

func FormatDuration(d time.Duration) string

FormatDuration formats a duration as H:MM.

func GetAllKeywords

func GetAllKeywords(c *config.Config) map[string][]string

GetAllKeywords returns all configured keywords grouped by category

func GetZettelTitle

func GetZettelTitle(zetDir, zetID string) (string, error)

GetZettelTitle gets the title of a zettel from its README.md file

func HasActiveChildren

func HasActiveChildren(t *Task, c *config.Config) bool

HasActiveChildren returns true if any direct child of t is active or in-progress.

func IsClockActive

func IsClockActive(t *Task) bool

IsClockActive returns true if the task has an open (running) clock entry.

func IsCompletedKeyword

func IsCompletedKeyword(c *config.Config, keyword string) bool

IsCompletedKeyword checks whether the given keyword is in the configured Completed list.

func IsJiraID

func IsJiraID(id string) bool

IsJiraID returns true if the ID matches a JIRA issue key pattern.

func IsKeywordValid

func IsKeywordValid(c *config.Config, keyword string) bool

IsKeywordValid returns true if the keyword is in any configured category.

func IsValidZettelID

func IsValidZettelID(id string) bool

IsValidZettelID checks if a string is a valid zettel ID

func ReadRawBlock

func ReadRawBlock(t *Task) (string, error)

ReadRawBlock reads the raw content of a task from its source file. Returns the task's own line plus all subsequent lines that are indented deeper (regardless of whether they are tasks or plain text).

func RecordCompletion

func RecordCompletion(t *Task) error

RecordCompletion appends a LOG entry after the task line (backward-compatible wrapper).

func RecordStateTransition added in v0.12.0

func RecordStateTransition(t *Task, fromKeyword, toKeyword string) error

RecordStateTransition appends a LOG entry after the task line.

func RenderMarkdownDescription

func RenderMarkdownDescription(description string, taskColor lipgloss.Style) string

RenderMarkdownDescription renders a task description with markdown formatting. Supports: bold, italic, strikethrough, inline code, URLs, and bullet markers.

func SetTaskDate

func SetTaskDate(t *Task, scheduledAt, dueAt string, removeScheduled, removeDue bool) error

SetTaskDate sets, updates, or removes scheduled/due dates on a task's source line. Empty string for scheduledAt/dueAt means no-op for that field. removeScheduled/removeDue=true removes the corresponding token.

func SortByPriority

func SortByPriority(tasks []*Task, c *config.Config)

SortByPriority sorts tasks by their priority order Order: In Progress (1) -> Active (2) -> Someday (3) -> Completed (4) Uses stable sort to preserve relative order of equal-priority tasks

func StripLinePrefix

func StripLinePrefix(line string) (string, int)

StripLinePrefix strips leading whitespace and an optional bullet marker (-, *, +) followed by at least one space. Returns the content after the prefix and the byte offset where that content begins in the original line.

func SummarizeProjects

func SummarizeProjects(c *config.Config) (map[string]int, error)

SummarizeProjects summarizes task counts per project

func SyncFromJira

func SyncFromJira(ctx context.Context, cfg *config.Config, client *jira.Client) (int, error)

SyncFromJira pulls open JIRA tickets assigned to the user, creates or updates corresponding tasks in karya, and handles disappeared tickets. Returns the count of issues found in JIRA.

func TruncateString

func TruncateString(s string, maxWidth int) string

TruncateString truncates s to maxWidth visible characters (ANSI-aware), appending "…" if truncated. Returns s unchanged if it fits.

func UpdateTaskLabels

func UpdateTaskLabels(t *Task, labels []string) error

UpdateTaskLabels updates the tags on a task's line to match JIRA labels.

func UpdateTaskStatus

func UpdateTaskStatus(t *Task, newKeyword string, cfg *config.Config) error

UpdateTaskStatus updates the keyword of a task in its source file. It finds the line matching the task and replaces the keyword with the new one. Returns the updated line number, or an error if the task was not found.

If cfg is non-nil and newKeyword is a completed-category keyword, the task is blocked from completing while it has active or in-progress children — callers must resolve or reassign those first. Pass a nil cfg to skip this check (e.g. in tests that don't care about it).

Types

type AgendaDay

type AgendaDay struct {
	Date  time.Time
	Items []AgendaItem
}

AgendaDay groups agenda items appearing on a single date.

func QueryAgenda

func QueryAgenda(c *config.Config, start, end time.Time, includeOverdue bool) ([]AgendaDay, error)

QueryAgenda loads all tasks and returns agenda items within [start, end], grouped by day. Only tasks with scheduled or due dates are included. When includeOverdue is true, past-due items appear on today's date.

type AgendaItem

type AgendaItem struct {
	Task        *Task
	Date        time.Time
	HasTime     bool
	HasEnd      bool
	EndTime     time.Time
	IsOverdue   bool
	IsDeadline  bool
	Warning     bool
	ClockActive bool
	Schedule    *Schedule
	IsCompleted bool
	CompletedAt time.Time
	TargetState string
}

AgendaItem represents a single entry in the agenda view.

type ClockEntry

type ClockEntry struct {
	Start time.Time
	End   time.Time
	Open  bool
}

func ParseClockEntries

func ParseClockEntries(t *Task) ([]ClockEntry, error)

ParseClockEntries reads a task's sub-lines and extracts CLOCK entries.

type ClockInArgs

type ClockInArgs struct {
	Project string `json:"project" jsonschema:"project name"`
	Keyword string `json:"keyword" jsonschema:"task keyword"`
	Title   string `json:"title" jsonschema:"task title"`
}

type ClockOutArgs

type ClockOutArgs struct {
	Project string `json:"project" jsonschema:"project name"`
	Keyword string `json:"keyword" jsonschema:"task keyword"`
	Title   string `json:"title" jsonschema:"task title"`
}

type ClockProjectResult

type ClockProjectResult struct {
	Project string            `json:"project" jsonschema:"project name"`
	Total   string            `json:"total" jsonschema:"project total time as H:MM"`
	Tasks   []ClockTaskResult `json:"tasks" jsonschema:"per-task breakdown"`
}

type ClockResult

type ClockResult struct {
	Message string `json:"message" jsonschema:"result message"`
	Success bool   `json:"success" jsonschema:"whether the operation succeeded"`
}

type ClockTable

type ClockTable struct {
	GrandTotal time.Duration
	Projects   []ClockTableProject
}

func QueryClockTable

func QueryClockTable(c *config.Config, start, end time.Time) (*ClockTable, error)

QueryClockTable aggregates clock data for all tasks within [start, end].

type ClockTableEntry

type ClockTableEntry struct {
	Task         *Task
	Duration     time.Duration
	WasCompleted bool
}

type ClockTableProject

type ClockTableProject struct {
	Project string
	Total   time.Duration
	Entries []ClockTableEntry
}

type ClockTableResult

type ClockTableResult struct {
	GrandTotal string               `json:"grand_total" jsonschema:"total time as H:MM"`
	Projects   []ClockProjectResult `json:"projects" jsonschema:"per-project breakdown"`
}

type ClockTaskResult

type ClockTaskResult struct {
	Keyword  string `json:"keyword" jsonschema:"task keyword"`
	Title    string `json:"title" jsonschema:"task title"`
	Duration string `json:"duration" jsonschema:"time spent as H:MM"`
}

type CompletionEntry

type CompletionEntry struct {
	Timestamp time.Time
}

func ParseCompletionEntries

func ParseCompletionEntries(t *Task) ([]CompletionEntry, error)

ParseCompletionEntries reads a task's sub-lines and extracts COMPLETED entries. Kept for backward compatibility — prefers ParseStateTransitions for new code.

type CountTasksArgs

type CountTasksArgs struct {
	Project       string `json:"project,omitempty" jsonschema:"optional project name to filter count"`
	ShowCompleted bool   `json:"show_completed,omitempty" jsonschema:"whether to include completed tasks (default: false)"`
}

type CountTasksResult

type CountTasksResult struct {
	Count    int            `json:"count" jsonschema:"total number of tasks"`
	ByStatus map[string]int `json:"by_status" jsonschema:"count of tasks by status category"`
}

type DatePicker

type DatePicker struct {
	Task             *Task
	Field            DatePickerField
	Cursor           time.Time
	Confirmed        bool
	Cancelled        bool
	ClearedScheduled bool
	ClearedDue       bool
	ErrorMsg         string

	// Section navigation
	Section pickerSection

	// Time
	HasTime    bool
	Hour       int
	Minute     int
	HasEndTime bool
	EndHour    int
	EndMinute  int
	TimeFocus  timeFocus

	// Recurrence
	HasRecurrence      bool
	RecurrenceMode     RecurrenceMode
	RecurrenceInterval int
	RecurrenceUnit     byte
	RecFocus           recurrenceFocus

	// Warning
	HasWarning  bool
	WarningDays int
}

func NewDatePicker

func NewDatePicker(t *Task, field DatePickerField) *DatePicker

func (*DatePicker) Result

func (dp *DatePicker) Result() (scheduledAt, dueAt string, removeScheduled, removeDue bool)

func (*DatePicker) Update

func (dp *DatePicker) Update(key string)

func (*DatePicker) View

func (dp *DatePicker) View(width int) string

type DatePickerField

type DatePickerField int
const (
	FieldScheduled DatePickerField = iota
	FieldDue
)

type FilterTasksArgs

type FilterTasksArgs struct {
	Filter        string `json:"filter" jsonschema:"filter expression (e.g., '>> alice' for assignee, '#urgent' for tag, '@2025-01-15' for date)"`
	Project       string `json:"project,omitempty" jsonschema:"optional project name to limit filter"`
	ShowCompleted bool   `json:"show_completed,omitempty" jsonschema:"whether to include completed tasks (default: false)"`
}

type FilterTasksResult

type FilterTasksResult struct {
	Tasks []TaskInfo `json:"tasks" jsonschema:"list of filtered tasks"`
	Count int        `json:"count" jsonschema:"total number of tasks matching filter"`
}

type GetClockTableArgs

type GetClockTableArgs struct {
	Start string `json:"start" jsonschema:"start date (YYYY-MM-DD)"`
	End   string `json:"end" jsonschema:"end date (YYYY-MM-DD)"`
}

type GetCycleTasksArgs

type GetCycleTasksArgs struct {
	Project string `json:"project,omitempty" jsonschema:"optional project name to limit search"`
}

type GetCycleTasksResult

type GetCycleTasksResult struct {
	Tasks []TaskInfo `json:"tasks" jsonschema:"tasks involved in circular dependencies"`
	Count int        `json:"count" jsonschema:"number of tasks in cycles"`
}

type GetDependenciesArgs

type GetDependenciesArgs struct {
	ID      string `json:"id" jsonschema:"task ID to get dependencies for"`
	Project string `json:"project,omitempty" jsonschema:"optional project name to limit search"`
}

type GetDependenciesResult

type GetDependenciesResult struct {
	Task         *TaskInfo  `json:"task,omitempty" jsonschema:"the task being queried"`
	Dependencies []TaskInfo `json:"dependencies" jsonschema:"tasks that this task depends on (referenced via ^id)"`
	Count        int        `json:"count" jsonschema:"number of dependencies"`
}

type GetDependentsArgs

type GetDependentsArgs struct {
	ID      string `json:"id" jsonschema:"task ID to get dependents for"`
	Project string `json:"project,omitempty" jsonschema:"optional project name to limit search"`
}

type GetDependentsResult

type GetDependentsResult struct {
	Task       *TaskInfo  `json:"task,omitempty" jsonschema:"the task being queried"`
	Dependents []TaskInfo `json:"dependents" jsonschema:"tasks that depend on this task (have ^id reference to it)"`
	Count      int        `json:"count" jsonschema:"number of dependents"`
}

type GetKeywordsArgs

type GetKeywordsArgs struct{}

type GetKeywordsResult

type GetKeywordsResult struct {
	Keywords   map[string][]string `json:"keywords" jsonschema:"keywords grouped by category (Active, InProgress, Completed, Someday)"`
	Categories []string            `json:"categories" jsonschema:"list of category names"`
}

type GetProjectsArgs

type GetProjectsArgs struct{}

type GetProjectsResult

type GetProjectsResult struct {
	Projects []ProjectInfo `json:"projects" jsonschema:"list of projects with task counts"`
	Count    int           `json:"count" jsonschema:"total number of projects"`
}

type GetTaskArgs

type GetTaskArgs struct {
	Project string `json:"project" jsonschema:"project name"`
	Keyword string `json:"keyword" jsonschema:"task keyword"`
	Title   string `json:"title" jsonschema:"task title (partial match supported)"`
}

type GetTaskByIDArgs

type GetTaskByIDArgs struct {
	ID      string `json:"id" jsonschema:"task ID to look up"`
	Project string `json:"project,omitempty" jsonschema:"optional project name to limit search"`
}

type GetTaskByIDResult

type GetTaskByIDResult struct {
	Task  *TaskInfo `json:"task,omitempty" jsonschema:"the matching task"`
	Found bool      `json:"found" jsonschema:"whether a task with this ID was found"`
}

type GetTaskResult

type GetTaskResult struct {
	Task  *TaskInfo `json:"task,omitempty" jsonschema:"the matching task"`
	Found bool      `json:"found" jsonschema:"whether a matching task was found"`
}

type KeywordEntry

type KeywordEntry struct {
	Keyword  string
	Category string
}

GetAllKeywordsFlat returns all configured keywords as a flat slice with category labels

func GetAllKeywordsFlat

func GetAllKeywordsFlat(c *config.Config) []KeywordEntry

type ListTasksArgs

type ListTasksArgs struct {
	Project       string `json:"project,omitempty" jsonschema:"project name to filter tasks (optional, empty for all projects)"`
	ShowCompleted bool   `json:"show_completed,omitempty" jsonschema:"whether to include completed tasks (default: false)"`
}

type ListTasksResult

type ListTasksResult struct {
	Tasks []TaskInfo `json:"tasks" jsonschema:"list of tasks"`
	Count int        `json:"count" jsonschema:"total number of tasks returned"`
}

type MCPServer

type MCPServer struct {
	// contains filtered or unexported fields
}

MCPServer wraps the MCP server with task operations

func NewMCPServer

func NewMCPServer(cfg *config.Config) *MCPServer

NewMCPServer creates a new MCP server for task operations

func (*MCPServer) Run

func (s *MCPServer) Run(ctx context.Context) error

Run starts the MCP server on stdio transport, with optional JIRA background sync.

type ProjectInfo

type ProjectInfo struct {
	Name      string `json:"name" jsonschema:"project name"`
	TaskCount int    `json:"task_count" jsonschema:"number of active tasks in the project"`
}

type RecurrenceMode

type RecurrenceMode int
const (
	RecurrenceFixed      RecurrenceMode = iota // +N[dwmy] — advance from original date
	RecurrenceFromDone                         // .+N[dwmy] — advance from completion date
	RecurrenceNextFuture                       // ++N[dwmy] — next future occurrence from series
)

type RecurrenceSpec

type RecurrenceSpec struct {
	Mode     RecurrenceMode
	Interval int
	Unit     byte // 'd', 'w', 'm', 'y'
}

type Schedule

type Schedule struct {
	Date       time.Time
	HasTime    bool
	EndTime    time.Time
	HasEnd     bool
	Recurrence *RecurrenceSpec
	Warning    *WarningSpec
	Raw        string
}

func ParseSchedule

func ParseSchedule(raw string) (*Schedule, error)

ParseSchedule parses a date token (the part after @s: or @d:) into a Schedule. Token grammar: DATE[TTIME][RECURRENCE][WARNING] DATE: YYYY-MM-DD TIME: THH:MM RECURRENCE: +N[dwmyb] | .+N[dwmyb] | ++N[dwmyb] WARNING: !Nd

func (*Schedule) ExpandOccurrences

func (s *Schedule) ExpandOccurrences(rangeStart, rangeEnd time.Time) []time.Time

ExpandOccurrences generates all dates where this recurring schedule appears within [rangeStart, rangeEnd]. For non-recurring schedules, returns the single date if it falls within range. For .+ mode, only returns the stored date (cannot predict future). Range comparisons use calendar-day granularity so timed tasks are included when their day falls within the range, regardless of the time-of-day component.

func (*Schedule) FormatToken

func (s *Schedule) FormatToken() string

FormatToken reconstructs the date token string from the Schedule.

func (*Schedule) NextOccurrence

func (s *Schedule) NextOccurrence(completionDate time.Time) time.Time

NextOccurrence computes the next occurrence date based on the recurrence mode.

type ScheduleTaskArgs

type ScheduleTaskArgs struct {
	Project         string `json:"project" jsonschema:"project name"`
	Keyword         string `json:"keyword" jsonschema:"current task keyword"`
	Title           string `json:"title" jsonschema:"task title to identify the task"`
	ScheduledAt     string `` /* 141-byte string literal not displayed */
	DueAt           string `json:"due_at,omitempty" jsonschema:"due date to set (same format). Omit to leave unchanged."`
	RemoveScheduled bool   `json:"remove_scheduled,omitempty" jsonschema:"if true, removes the existing scheduled date"`
	RemoveDue       bool   `json:"remove_due,omitempty" jsonschema:"if true, removes the existing due date"`
}

type ScheduleTaskResult

type ScheduleTaskResult struct {
	Message string `json:"message" jsonschema:"result message"`
	Success bool   `json:"success" jsonschema:"whether the operation succeeded"`
}

type SearchResult

type SearchResult struct {
	ZettelID string
	Title    string
	LineNum  int
	Line     string
	Path     string
	Project  string
}

SearchResult represents a search result from file content

func SearchInFile

func SearchInFile(filePath, searchTerm string) []SearchResult

SearchInFile searches for a term within a file and returns matching lines

func SearchTasks

func SearchTasks(c *config.Config, project string, searchTerm string) ([]SearchResult, error)

SearchTasks searches for a term across all task files

type SearchResultInfo

type SearchResultInfo struct {
	Project  string `json:"project" jsonschema:"project name"`
	ZettelID string `json:"zettel_id,omitempty" jsonschema:"zettel ID (if structured mode)"`
	Title    string `json:"title" jsonschema:"file/zettel title"`
	LineNum  int    `json:"line_num" jsonschema:"line number of the match"`
	Line     string `json:"line" jsonschema:"the matching line"`
	Path     string `json:"path" jsonschema:"file path"`
}

type SearchTasksArgs

type SearchTasksArgs struct {
	Pattern string `json:"pattern" jsonschema:"search pattern (case-insensitive substring match across all task fields)"`
	Project string `json:"project,omitempty" jsonschema:"optional project name to limit search"`
}

type SearchTasksResult

type SearchTasksResult struct {
	Results []SearchResultInfo `json:"results" jsonschema:"list of search results"`
	Count   int                `json:"count" jsonschema:"total number of matches"`
}

type StateTransition added in v0.12.0

type StateTransition struct {
	From      string
	To        string
	Timestamp time.Time
}

func ParseStateTransitions added in v0.12.0

func ParseStateTransitions(t *Task) ([]StateTransition, error)

ParseStateTransitions reads a task's sub-lines and extracts LOG and legacy COMPLETED entries.

type StatusPicker

type StatusPicker struct {
	Task      *Task
	Config    *config.Config
	Columns   []statusColumn
	ColCursor int
	Confirmed bool
	Cancelled bool
	Selected  string
}

func NewStatusPicker

func NewStatusPicker(t *Task, c *config.Config) *StatusPicker

func (*StatusPicker) Update

func (sp *StatusPicker) Update(key string)

func (*StatusPicker) View

func (sp *StatusPicker) View(width int) string

type SyncJiraArgs

type SyncJiraArgs struct{}

type SyncJiraResult

type SyncJiraResult struct {
	Message string `json:"message"`
}

type Task

type Task struct {
	Keyword     string
	ID          string // Optional unique identifier [id]
	Title       string
	Tags        []string
	References  []string // IDs of tasks this task depends on (^id syntax)
	ScheduledAt string   // @date or @s:date (scheduled date)
	DueAt       string   // @d:date (due date)
	Assignee    string
	Project     string
	Zettel      string
	FilePath    string  // Original file path where this task was found
	InCycle     bool    // True if this task participates in a circular dependency
	IndentLevel int     // Byte offset of first non-whitespace character in source line
	LineNum     int     // 1-based line number in source file
	Parent      *Task   // Parent task, nil for root tasks
	Children    []*Task // Child tasks nested under this task in the source file
}

Task represents a parsed task from a line

func FilterTasks

func FilterTasks(tasks []*Task, filterString string) []*Task

FilterTasks applies field-specific filtering to a slice of tasks

func FindActiveClocks

func FindActiveClocks(tasks []*Task) []*Task

FindActiveClocks returns all tasks that have an open (running) clock entry.

func GetDependencies

func GetDependencies(tasks []*Task, t *Task) []*Task

GetDependencies returns the tasks that the given task depends on

func GetDependents

func GetDependents(tasks []*Task, t *Task) []*Task

GetDependents returns the tasks that depend on the given task

func GetTaskByID

func GetTaskByID(tasks []*Task, id string) *Task

GetTaskByID returns a task by its ID from a slice of tasks. Returns nil if id is empty or not found.

func GroupWithChildren

func GroupWithChildren(tasks []*Task) []*Task

GroupWithChildren reorders a sorted flat task list so each root task is immediately followed by its descendants (depth-first, children in file order). The flat list is unchanged in length; children are simply relocated adjacent to their parent rather than scattered by the sort.

func ListTasks

func ListTasks(c *config.Config, project string, showCompleted bool) ([]*Task, error)

ListTasks lists tasks for a project, filtering by showCompleted This includes tasks from both project files and the inbox file

func ParseLine

func ParseLine(c *config.Config, line, project, zettel, filePath string) *Task

ParseLine parses a task line and returns a Task

func ProcessFile

func ProcessFile(c *config.Config, filePath string) ([]*Task, error)

ProcessFile processes a README.md file and returns tasks

func (*Task) IsActive

func (t *Task) IsActive(c *config.Config) bool

IsActive returns true if the task is active (not completed)

func (*Task) IsCompleted

func (t *Task) IsCompleted(c *config.Config) bool

IsCompleted returns true if the task is completed

func (*Task) IsInProgress

func (t *Task) IsInProgress(c *config.Config) bool

IsInProgress returns true if the task is in progress

func (*Task) IsSomeday

func (t *Task) IsSomeday(c *config.Config) bool

IsSomeday returns true if the task is a someday/maybe task

func (*Task) PendingChildCount

func (t *Task) PendingChildCount(c *config.Config) (done, total int)

PendingChildCount returns the number of completed and total direct children.

func (*Task) Priority

func (t *Task) Priority(c *config.Config) int

Priority returns the sorting priority of the task Lower numbers indicate higher priority 1 = In Progress, 2 = Active, 3 = Someday, 4 = Completed

type TaskInfo

type TaskInfo struct {
	Keyword     string   `json:"keyword" jsonschema:"task status keyword (e.g., TODO, DOING, DONE)"`
	ID          string   `json:"id,omitempty" jsonschema:"task unique identifier"`
	Title       string   `json:"title" jsonschema:"task title/description"`
	Tags        []string `json:"tags,omitempty" jsonschema:"task tags (without #)"`
	References  []string `json:"references,omitempty" jsonschema:"IDs of tasks this task depends on (^id syntax)"`
	ScheduledAt string   `json:"scheduled_at,omitempty" jsonschema:"scheduled date"`
	DueAt       string   `json:"due_at,omitempty" jsonschema:"due date"`
	Assignee    string   `json:"assignee,omitempty" jsonschema:"task assignee"`
	Project     string   `json:"project" jsonschema:"project name"`
	Zettel      string   `json:"zettel,omitempty" jsonschema:"zettel ID (if structured mode)"`
	FilePath    string   `json:"file_path" jsonschema:"file path where task is defined"`
	Priority    int      `json:"priority" jsonschema:"priority level (1=in_progress, 2=active, 3=someday, 4=completed)"`
	Status      string   `json:"status" jsonschema:"status category (active, in_progress, completed, someday)"`
	InCycle     bool     `json:"in_cycle,omitempty" jsonschema:"true if task participates in a circular dependency"`
	ParentID    string   `json:"parent_id,omitempty" jsonschema:"ID of parent task (if this is a sub-task)"`
	ChildCount  int      `json:"child_count,omitempty" jsonschema:"number of direct child tasks"`
	RawContent  string   `json:"raw_content,omitempty" jsonschema:"raw file content of task and all indented lines below it"`
}

type UpdateTaskStatusArgs

type UpdateTaskStatusArgs struct {
	Project    string `json:"project" jsonschema:"project name"`
	Keyword    string `json:"keyword" jsonschema:"current task keyword"`
	Title      string `json:"title" jsonschema:"task title to identify the task"`
	NewKeyword string `json:"new_keyword" jsonschema:"new status keyword to set"`
}

type UpdateTaskStatusResult

type UpdateTaskStatusResult struct {
	Message       string              `json:"message" jsonschema:"status message"`
	Success       bool                `json:"success" jsonschema:"whether the update succeeded"`
	ValidKeywords map[string][]string `json:"valid_keywords" jsonschema:"valid keywords grouped by category (Active, InProgress, Completed, Someday)"`
}

type WarningSpec

type WarningSpec struct {
	Days int
}

Jump to

Keyboard shortcuts

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