Documentation
¶
Overview ¶
Package task defines the unified Task model and loaders for both Redis (K8s agents) and local filesystem (Claude Code teams). This is a core package — it must not import bubbletea, lipgloss, or any TUI package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFullResult ¶
GetFullResult retrieves the full result for a task. The result_ref field contains either a git branch reference or OTEL span ID pointing to the complete output, while result_summary is truncated to 500 chars.
Types ¶
type Task ¶
type Task struct {
ID string
Status Status
Prompt string
RequiredRole string
Assignee string
DependsOn []string
ResultSummary string
ResultRef string
SourceBranch string
Error string
RetryCount int
CreatedAt time.Time
CompletedAt time.Time
Location Location
}
Task is the unified task model shared across local and K8s sources.
func LoadFromLocalFiles ¶
LoadFromLocalFiles reads all task JSON files from a team's task directory. The directory is typically ~/.claude/tasks/{teamID}/. It reads both task-*.json and *.json files (Claude Code uses both patterns).
func LoadFromRedis ¶
LoadFromRedis loads all tasks for a team by scanning Redis for task hash keys. It uses SCAN (not KEYS) to avoid blocking Redis on large datasets.
func (*Task) IsTerminal ¶
IsTerminal returns true if the task is in a final state.