tasklist

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package tasklist implements the task-list tools (create_task_list, add_task_to_task_list, update_task, update_task_list_status, get_task_list). They own all task storage: standalone, labelled lists managed ad-hoc by the model, and the phase-backed lists a plan links to via planengine. The core/tasklist package was decoupled to enable this single ownership.

Each tool lives in its own file holding its model-facing name constant, its provider-neutral definition, and a tool.Tool implementation. Every tool shares one set of Deps (the tasklist store), resolved lazily so the session manager can attach it after toolexec.New; deps via Tools().

update_task is generic: a task_id is globally unique across phase- backed and standalone lists, so one tool serves both. For phase-backed tasks the store's after-mutate hook (wired by the session to planengine.TouchPlanForTask) bumps the owning plan's updated_at; for standalone tasks that hook is a no-op.

Index

Constants

View Source
const ToolAddTask = "add_task_to_task_list"

ToolAddTask is the model-facing name of the add_task_to_task_list tool. It is distinct from the plan package's add_task (which targets a phase) so both surfaces coexist in one dispatch map.

View Source
const ToolCreate = "create_task_list"

ToolCreate is the model-facing name of the create_task_list tool.

View Source
const ToolGet = "get_task_list"

ToolGet is the model-facing name of the get_task_list tool.

View Source
const ToolUpdateListStatus = "update_task_list_status"

ToolUpdateListStatus is the model-facing name of the update_task_list_status tool.

View Source
const ToolUpdateTask = "update_task"

ToolUpdateTask is the model-facing name of the update_task tool. It is the general editor: it changes any subset of a task's body, hint, and status in one call. A task_id is globally unique across phase-backed and standalone lists, so one tool serves both surfaces; the store's after-mutate hook bumps the owning plan's updated_at for phase-backed tasks and no-ops for standalone ones.

Variables

This section is empty.

Functions

func ToolDefs

func ToolDefs() []tooldef.Definition

ToolDefs returns the provider-neutral tool definitions exposed by the task-list package. Session.Manager appends these to the tool list when the session has a task store (a git repo where .jungi/state/ can be written).

func Tools

func Tools(deps func() *Deps) map[string]tool.Tool

Tools returns one tool.Tool per task-list model-facing name, each sharing the given lazy Deps accessor. The map is keyed by model-facing name for toolexec's dispatch map; every entry advertises its own definition (the same one ToolDefs lists) and routes through the shared Deps.

Types

type Deps

type Deps struct {
	Store *coretasklist.Store
}

Deps is the session-specific state every task-list tool shares: the tasklist store. The session manager builds it and attaches it to the executor after toolexec.New, so the tools resolve it lazily through a closure. A nil Deps (or nil Store) means the session has no task store — every tool then returns a clean "unavailable" error rather than nil-dereferencing.

Source Files

  • add_task.go
  • create_task_list.go
  • get_task_list.go
  • preview.go
  • tasklist.go
  • update_task.go
  • update_task_list_status.go

Jump to

Keyboard shortcuts

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