Documentation
¶
Overview ¶
Package todo exposes the single todo_write tool. It owns the in-session todo list — a flat list of {content, activeForm, status} entries that the agent rewrites in one shot every time the plan changes.
Replaces the previous six-tool task package. Background-process tools (Monitor, the future task_output / task_stop pair) live elsewhere; this package is purely about ephemeral planning.
Index ¶
Constants ¶
const Domain = "todo"
Domain is the observable.Change.Domain value every todo-store change carries. Consumers switch on this string and type-assert Payload to []todo.Todo.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Status ¶
type Status string
Status enumerates the lifecycle states a todo can be in. There is no "deleted" state — full-list-replacement makes removal implicit (omit the entry from the next write).
type Todo ¶
Todo is one entry in the session todo list. content is the imperative form ("Run tests"); activeForm is the present-continuous variant ("Running tests") rendered in the spinner while the entry is in_progress.
type TodoStore ¶
type TodoStore struct {
observable.Observable
// contains filtered or unexported fields
}
TodoStore is the per-agent backing store for the todo_write tool. The agent constructs one via toolset.ToolState.TodoStore() and threads it into the tool's constructor.
Mutations are guarded by mu; Notify fires after the lock is released so observers may freely call back into the store. Safe for concurrent access.
func NewTodoStore ¶
func NewTodoStore() *TodoStore
NewTodoStore returns an empty store ready for use.
func (*TodoStore) Clear ¶
func (s *TodoStore) Clear()
Clear empties the list. Emits one "replaced" change with an empty payload so the TUI's auto-fold path collapses the panel without any special-case handling.
func (*TodoStore) Domain ¶
Domain identifies this store on the change stream. Required by the observable.Store interface.
type WriteTool ¶
type WriteTool struct {
// contains filtered or unexported fields
}
WriteTool implements the single `todo_write` tool. Full-list-replacement semantics: every call overwrites the session's todo list with the payload.
Description is a near-verbatim port of ref/src/tools/TodoWriteTool/prompt.ts — the only divergence is interpolating evva's edit tool name in place of the upstream ${FILE_EDIT_TOOL_NAME} placeholder.
func (*WriteTool) Description ¶
func (*WriteTool) Schema ¶
func (t *WriteTool) Schema() json.RawMessage