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 ¶
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 ¶
ReadSnapshot enumerates every team under ~/.claude/teams together with its task board.