status

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Remove

func Remove(team, name string) error

Remove deletes the status file for an agent (called on session teardown).

func StatusDir

func StatusDir() string

StatusDir returns the consolidated status directory (~/.ttal/status/).

func WriteAgent

func WriteAgent(team string, s AgentStatus) error

WriteAgent atomically writes an agent's status file with team prefix.

Types

type AgentStatus

type AgentStatus struct {
	Agent               string    `json:"agent"`
	ContextUsedPct      float64   `json:"context_used_pct"`
	ContextRemainingPct float64   `json:"context_remaining_pct"`
	ModelID             string    `json:"model_id"`
	ModelName           string    `json:"model_name"`
	SessionID           string    `json:"session_id"`
	CCVersion           string    `json:"cc_version"`
	UpdatedAt           time.Time `json:"updated_at"`
}

AgentStatus represents the live state of an agent's CC session.

func ReadAgent

func ReadAgent(team, name string) (*AgentStatus, error)

ReadAgent reads the status file for a single agent in the given team. Returns nil if no status file exists (agent not running or no data yet).

func ReadAll

func ReadAll(team string) ([]AgentStatus, error)

ReadAll reads status files for all agents in the given team.

func (*AgentStatus) IsStale

func (s *AgentStatus) IsStale(threshold time.Duration) bool

IsStale returns true if the status hasn't been updated in the given duration.

Jump to

Keyboard shortcuts

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