todo

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package todo provides LLM tools for managing a todo list.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Create

type Create struct {
	tool.Base
	// contains filtered or unexported fields
}

Create implements the TodoCreate tool.

func NewCreate

func NewCreate(list *todo.List) *Create

NewCreate creates a new TodoCreate tool with the given list.

func (*Create) Execute

func (t *Create) Execute(_ context.Context, args map[string]any) (string, error)

Execute creates or updates the todo list.

func (*Create) Name

func (t *Create) Name() string

Name returns the tool's identifier.

func (*Create) Parallel

func (t *Create) Parallel() bool

Parallel returns false because TodoCreate mutates the shared todo list without synchronization.

func (*Create) Sandboxable

func (t *Create) Sandboxable() bool

Sandboxable returns false as todo tools manage in-memory state.

func (*Create) Schema

func (t *Create) Schema() tool.Schema

Schema returns the tool definition.

type CreateInput

type CreateInput struct {
	Summary string            `json:"summary,omitempty" jsonschema:"description=Executive summary describing the overall goal"`
	Items   []CreateItemInput `json:"items,omitempty"   jsonschema:"description=List of tasks to create"                       validate:"omitempty,dive"`
}

CreateInput defines the parameters for the TodoCreate tool.

type CreateItemInput

type CreateItemInput struct {
	Content string `json:"content" jsonschema:"required,description=Brief description of the task" validate:"required"`
}

CreateItemInput defines a single todo item for creation.

type List

type List struct {
	tool.Base
	// contains filtered or unexported fields
}

List implements the TodoList tool.

func NewList

func NewList(list *todo.List) *List

NewList creates a new TodoList tool with the given list.

func (*List) Execute

func (t *List) Execute(_ context.Context, _ map[string]any) (string, error)

Execute returns the current todo list.

func (*List) Name

func (t *List) Name() string

Name returns the tool's identifier.

func (*List) Sandboxable

func (t *List) Sandboxable() bool

Sandboxable returns false as todo tools manage in-memory state.

func (*List) Schema

func (t *List) Schema() tool.Schema

Schema returns the tool definition.

type ListInput

type ListInput struct{}

ListInput defines the parameters for the TodoList tool.

type Progress

type Progress struct {
	tool.Base
	// contains filtered or unexported fields
}

Progress implements the TodoProgress tool.

func NewProgress

func NewProgress(list *todo.List) *Progress

NewProgress creates a new TodoProgress tool with the given list.

func (*Progress) Execute

func (t *Progress) Execute(_ context.Context, args map[string]any) (string, error)

Execute updates todo item statuses.

func (*Progress) Name

func (t *Progress) Name() string

Name returns the tool's identifier.

func (*Progress) Parallel

func (t *Progress) Parallel() bool

Parallel returns false because TodoProgress mutates the shared todo list without synchronization.

func (*Progress) Sandboxable

func (t *Progress) Sandboxable() bool

Sandboxable returns false as todo tools manage in-memory state.

func (*Progress) Schema

func (t *Progress) Schema() tool.Schema

Schema returns the tool definition.

type ProgressInput

type ProgressInput struct {
	Updates []ProgressUpdateInput `json:"updates" jsonschema:"required,description=List of status updates" validate:"required,min=1,dive"`
}

ProgressInput defines the parameters for the TodoProgress tool.

type ProgressUpdateInput

type ProgressUpdateInput struct {
	Index  int    `` /* 142-byte string literal not displayed */
	Status string `` /* 172-byte string literal not displayed */
}

ProgressUpdateInput defines a single status update.

Jump to

Keyboard shortcuts

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