Documentation
¶
Overview ¶
Package tasktool implements TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, and TaskStop tools backed by an in-process task store.
Mirrors src/tools/Task*Tool/ and src/utils/tasks.ts.
Index ¶
- func RenderTaskList(store *Store) string
- type Status
- type Store
- type Task
- type TaskCreateTool
- func (*TaskCreateTool) Description() string
- func (t *TaskCreateTool) Execute(_ context.Context, raw json.RawMessage) (tool.Result, error)
- func (*TaskCreateTool) InputSchema() json.RawMessage
- func (*TaskCreateTool) IsConcurrencySafe(json.RawMessage) bool
- func (*TaskCreateTool) IsReadOnly(json.RawMessage) bool
- func (*TaskCreateTool) Name() string
- type TaskGetTool
- func (*TaskGetTool) Description() string
- func (t *TaskGetTool) Execute(_ context.Context, raw json.RawMessage) (tool.Result, error)
- func (*TaskGetTool) InputSchema() json.RawMessage
- func (*TaskGetTool) IsConcurrencySafe(json.RawMessage) bool
- func (*TaskGetTool) IsReadOnly(json.RawMessage) bool
- func (*TaskGetTool) Name() string
- type TaskListTool
- func (*TaskListTool) Description() string
- func (t *TaskListTool) Execute(_ context.Context, raw json.RawMessage) (tool.Result, error)
- func (*TaskListTool) InputSchema() json.RawMessage
- func (*TaskListTool) IsConcurrencySafe(json.RawMessage) bool
- func (*TaskListTool) IsReadOnly(json.RawMessage) bool
- func (*TaskListTool) Name() string
- type TaskOutputTool
- func (*TaskOutputTool) Description() string
- func (t *TaskOutputTool) Execute(_ context.Context, raw json.RawMessage) (tool.Result, error)
- func (*TaskOutputTool) InputSchema() json.RawMessage
- func (*TaskOutputTool) IsConcurrencySafe(json.RawMessage) bool
- func (*TaskOutputTool) IsReadOnly(json.RawMessage) bool
- func (*TaskOutputTool) Name() string
- type TaskStopTool
- func (*TaskStopTool) Description() string
- func (t *TaskStopTool) Execute(_ context.Context, raw json.RawMessage) (tool.Result, error)
- func (*TaskStopTool) InputSchema() json.RawMessage
- func (*TaskStopTool) IsConcurrencySafe(json.RawMessage) bool
- func (*TaskStopTool) IsReadOnly(json.RawMessage) bool
- func (*TaskStopTool) Name() string
- type TaskUpdateTool
- func (*TaskUpdateTool) Description() string
- func (t *TaskUpdateTool) Execute(_ context.Context, raw json.RawMessage) (tool.Result, error)
- func (*TaskUpdateTool) InputSchema() json.RawMessage
- func (*TaskUpdateTool) IsConcurrencySafe(json.RawMessage) bool
- func (*TaskUpdateTool) IsReadOnly(json.RawMessage) bool
- func (*TaskUpdateTool) Name() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderTaskList ¶
RenderTaskList returns a compact text summary of all tasks (for TUI display).
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is a thread-safe in-memory task store shared across all Task tools within one agent session.
func GlobalStore ¶
func GlobalStore() *Store
GlobalStore returns the shared task store for live UI consumers like the coordinator footer panel. Don't mutate via this handle — use the dedicated tools so updates flow through the same entry points.
type Task ¶
type Task struct {
ID string
Subject string
Description string
Status Status
ActiveForm string // present-continuous form e.g. "Running tests"
Metadata map[string]any
Output string
CreatedAt time.Time
UpdatedAt time.Time
}
Task is one item in the task list.
type TaskCreateTool ¶
type TaskCreateTool struct {
// contains filtered or unexported fields
}
func NewCreate ¶
func NewCreate() *TaskCreateTool
func (*TaskCreateTool) Description ¶
func (*TaskCreateTool) Description() string
func (*TaskCreateTool) Execute ¶
func (t *TaskCreateTool) Execute(_ context.Context, raw json.RawMessage) (tool.Result, error)
func (*TaskCreateTool) InputSchema ¶
func (*TaskCreateTool) InputSchema() json.RawMessage
func (*TaskCreateTool) IsConcurrencySafe ¶
func (*TaskCreateTool) IsConcurrencySafe(json.RawMessage) bool
func (*TaskCreateTool) IsReadOnly ¶
func (*TaskCreateTool) IsReadOnly(json.RawMessage) bool
func (*TaskCreateTool) Name ¶
func (*TaskCreateTool) Name() string
type TaskGetTool ¶
type TaskGetTool struct {
// contains filtered or unexported fields
}
func NewGet ¶
func NewGet() *TaskGetTool
func (*TaskGetTool) Description ¶
func (*TaskGetTool) Description() string
func (*TaskGetTool) Execute ¶
func (t *TaskGetTool) Execute(_ context.Context, raw json.RawMessage) (tool.Result, error)
func (*TaskGetTool) InputSchema ¶
func (*TaskGetTool) InputSchema() json.RawMessage
func (*TaskGetTool) IsConcurrencySafe ¶
func (*TaskGetTool) IsConcurrencySafe(json.RawMessage) bool
func (*TaskGetTool) IsReadOnly ¶
func (*TaskGetTool) IsReadOnly(json.RawMessage) bool
func (*TaskGetTool) Name ¶
func (*TaskGetTool) Name() string
type TaskListTool ¶
type TaskListTool struct {
// contains filtered or unexported fields
}
func NewList ¶
func NewList() *TaskListTool
func (*TaskListTool) Description ¶
func (*TaskListTool) Description() string
func (*TaskListTool) Execute ¶
func (t *TaskListTool) Execute(_ context.Context, raw json.RawMessage) (tool.Result, error)
func (*TaskListTool) InputSchema ¶
func (*TaskListTool) InputSchema() json.RawMessage
func (*TaskListTool) IsConcurrencySafe ¶
func (*TaskListTool) IsConcurrencySafe(json.RawMessage) bool
func (*TaskListTool) IsReadOnly ¶
func (*TaskListTool) IsReadOnly(json.RawMessage) bool
func (*TaskListTool) Name ¶
func (*TaskListTool) Name() string
type TaskOutputTool ¶
type TaskOutputTool struct {
// contains filtered or unexported fields
}
func NewOutput ¶
func NewOutput() *TaskOutputTool
func (*TaskOutputTool) Description ¶
func (*TaskOutputTool) Description() string
func (*TaskOutputTool) Execute ¶
func (t *TaskOutputTool) Execute(_ context.Context, raw json.RawMessage) (tool.Result, error)
func (*TaskOutputTool) InputSchema ¶
func (*TaskOutputTool) InputSchema() json.RawMessage
func (*TaskOutputTool) IsConcurrencySafe ¶
func (*TaskOutputTool) IsConcurrencySafe(json.RawMessage) bool
func (*TaskOutputTool) IsReadOnly ¶
func (*TaskOutputTool) IsReadOnly(json.RawMessage) bool
func (*TaskOutputTool) Name ¶
func (*TaskOutputTool) Name() string
type TaskStopTool ¶
type TaskStopTool struct {
// contains filtered or unexported fields
}
func NewStop ¶
func NewStop() *TaskStopTool
func (*TaskStopTool) Description ¶
func (*TaskStopTool) Description() string
func (*TaskStopTool) Execute ¶
func (t *TaskStopTool) Execute(_ context.Context, raw json.RawMessage) (tool.Result, error)
func (*TaskStopTool) InputSchema ¶
func (*TaskStopTool) InputSchema() json.RawMessage
func (*TaskStopTool) IsConcurrencySafe ¶
func (*TaskStopTool) IsConcurrencySafe(json.RawMessage) bool
func (*TaskStopTool) IsReadOnly ¶
func (*TaskStopTool) IsReadOnly(json.RawMessage) bool
func (*TaskStopTool) Name ¶
func (*TaskStopTool) Name() string
type TaskUpdateTool ¶
type TaskUpdateTool struct {
// contains filtered or unexported fields
}
func NewUpdate ¶
func NewUpdate() *TaskUpdateTool
func (*TaskUpdateTool) Description ¶
func (*TaskUpdateTool) Description() string
func (*TaskUpdateTool) Execute ¶
func (t *TaskUpdateTool) Execute(_ context.Context, raw json.RawMessage) (tool.Result, error)
func (*TaskUpdateTool) InputSchema ¶
func (*TaskUpdateTool) InputSchema() json.RawMessage
func (*TaskUpdateTool) IsConcurrencySafe ¶
func (*TaskUpdateTool) IsConcurrencySafe(json.RawMessage) bool
func (*TaskUpdateTool) IsReadOnly ¶
func (*TaskUpdateTool) IsReadOnly(json.RawMessage) bool
func (*TaskUpdateTool) Name ¶
func (*TaskUpdateTool) Name() string
Click to show internal directories.
Click to hide internal directories.