todotool

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatTodosForContext

func FormatTodosForContext(todos []TodoItem) string

FormatTodosForContext formats todos for inclusion in agent context.

func MarshalTodos

func MarshalTodos(todos []TodoItem) (string, error)

MarshalTodos marshals todos to JSON.

Types

type TodoItem

type TodoItem struct {
	ID      string `json:"id" jsonschema:"required,description=Unique identifier for the todo"`
	Content string `json:"content" jsonschema:"required,description=Description of the task"`
	Status  string `json:"status" jsonschema:"required,description=Current status,enum=pending,enum=in_progress,enum=completed,enum=canceled"`
}

TodoItem represents a single todo item.

type TodoManager

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

TodoManager manages todo state across sessions. It provides both the tool and methods to query todos.

func NewTodoManager

func NewTodoManager() *TodoManager

NewTodoManager creates a new TodoManager.

func (*TodoManager) GetTodos

func (m *TodoManager) GetTodos(sessionID string) []TodoItem

GetTodos returns todos for a session.

func (*TodoManager) GetTodosSummary

func (m *TodoManager) GetTodosSummary(sessionID string) string

GetTodosSummary returns a formatted summary of todos.

func (*TodoManager) Tool

func (m *TodoManager) Tool() (tool.CallableTool, error)

Tool creates a todo_write tool using FunctionTool.

type TodoWriteArgs

type TodoWriteArgs struct {
	Overwrite bool       `` /* 154-byte string literal not displayed */
	Todos     []TodoItem `` /* 177-byte string literal not displayed */
}

TodoWriteArgs defines the parameters for writing todos.

Jump to

Keyboard shortcuts

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