agentteams

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package agentteams is a read model over the on-disk state that Claude Code writes when it runs a multi-agent team: the team roster and the shared task board.

This package deliberately does not create, mutate or kill teams. It observes what a running session has already decided, the same way a build dashboard observes CI. Controlling agents from the UI would be a different feature with a different risk profile.

Everything read here is an undocumented private layout. Parse failures are collected as warnings rather than swallowed, so a format drift surfaces as a visible degraded state instead of an empty panel that looks like "no teams".

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidTeamName = fmt.Errorf("team name must be a single path segment")

ErrInvalidTeamName is returned for a team name that is not a single safe path segment. The name reaches us from the UI and is joined into a filesystem path, so it is an arbitrary-file-read vector if left unchecked.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name        string   `json:"name"`
	Description string   `json:"description,omitempty"`
	CreatedAt   int64    `json:"createdAt,omitempty"`
	LeadAgentID string   `json:"leadAgentId,omitempty"`
	Members     []Member `json:"members"`
}

Config is a team's roster as stored in <team>/config.json.

type Member

type Member struct {
	AgentID   string `json:"agentId"`
	Name      string `json:"name"`
	AgentType string `json:"agentType"`
	Model     string `json:"model,omitempty"`
	JoinedAt  int64  `json:"joinedAt,omitempty"`
	Cwd       string `json:"cwd,omitempty"`
}

Member is one agent in a team. Field names follow the on-disk JSON, which is written by Claude Code and is not ours to rename.

type Snapshot

type Snapshot struct {
	Teams []Team `json:"teams"`
	// Warnings is non-empty when something existed but could not be read or
	// parsed. Warnings with no Teams means the format drifted; no Warnings and
	// no Teams means the user simply has no active teams.
	Warnings []string `json:"warnings,omitempty"`
}

Snapshot is everything visible at one instant.

func ReadSnapshot

func ReadSnapshot() (*Snapshot, error)

ReadSnapshot enumerates every team under ~/.claude/teams together with its task board.

type Task

type Task struct {
	ID         string   `json:"id"`
	Subject    string   `json:"subject"`
	Status     string   `json:"status"`
	Owner      string   `json:"owner,omitempty"`
	BlockedBy  []string `json:"blockedBy,omitempty"`
	ActiveForm string   `json:"activeForm,omitempty"`
}

Task is one entry on a team's task board.

func ReadTasks

func ReadTasks(teamName string) ([]Task, error)

ReadTasks returns one team's task board, sorted so blocked work sinks and in-progress work rises — the order someone scanning the board wants.

type Team

type Team struct {
	// DirName is the directory the team lives in, which is how tasks are
	// addressed. It is not always equal to Config.Name.
	DirName string `json:"dirname"`
	Config  Config `json:"config"`
	Tasks   []Task `json:"tasks"`
}

Team pairs a roster with its task board.

Jump to

Keyboard shortcuts

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