tasks

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: May 17, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GWSAvailable

func GWSAvailable() bool

func RenderPrompt

func RenderPrompt(template, title, notes, userPrompt string) string

Types

type GWSProvider

type GWSProvider struct{}

func NewGWSProvider

func NewGWSProvider() (*GWSProvider, error)

func (*GWSProvider) AddNote

func (p *GWSProvider) AddNote(listID, taskID, note string) error

func (*GWSProvider) CompleteTask

func (p *GWSProvider) CompleteTask(listID, taskID string) error

func (*GWSProvider) ListTaskLists

func (p *GWSProvider) ListTaskLists() ([]TaskList, error)

func (*GWSProvider) ListTasks

func (p *GWSProvider) ListTasks(listID string) ([]Task, error)

func (*GWSProvider) ReopenTask

func (p *GWSProvider) ReopenTask(listID, taskID string) error

type MCPProvider

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

MCPProvider implements the Provider interface using an MCP server endpoint

func NewMCPProvider

func NewMCPProvider(endpoint string) (*MCPProvider, error)

NewMCPProvider creates a new MCP provider

func (*MCPProvider) AddNote

func (m *MCPProvider) AddNote(listID, taskID, note string) error

AddNote adds a note to a task

func (*MCPProvider) CompleteTask

func (m *MCPProvider) CompleteTask(listID, taskID string) error

CompleteTask marks a task as completed

func (*MCPProvider) ListTaskLists

func (m *MCPProvider) ListTaskLists() ([]TaskList, error)

ListTaskLists returns all task lists

func (*MCPProvider) ListTasks

func (m *MCPProvider) ListTasks(listID string) ([]Task, error)

ListTasks returns all tasks in a task list

func (*MCPProvider) ReopenTask

func (m *MCPProvider) ReopenTask(listID, taskID string) error

ReopenTask reopens a completed task

type Provider

type Provider interface {
	ListTaskLists() ([]TaskList, error)
	ListTasks(listID string) ([]Task, error)
	CompleteTask(listID, taskID string) error
	ReopenTask(listID, taskID string) error
	AddNote(listID, taskID, note string) error
}

func NewProvider

func NewProvider(backend, mcpEndpoint string) (Provider, error)

NewProvider creates a Provider based on the specified backend. backend can be:

  • "gws": Use the gws CLI backend
  • "mcp": Use the MCP server backend (requires mcpEndpoint)
  • "auto" or "": Auto-detect available backend (prefers gws, falls back to mcp)

Returns an error if the requested backend is unavailable or unknown.

type Task

type Task struct {
	ID       string `json:"id"`
	Title    string `json:"title"`
	Notes    string `json:"notes"`
	Due      string `json:"due"`
	Status   string `json:"status"`
	ListID   string `json:"listID"`
	ListName string `json:"listName"`
	Updated  string `json:"updated"`
}

type TaskList

type TaskList struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

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