status

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package status reads and writes live agent session status files.

Status files are JSON documents stored under ~/.ttal/status/ with a team-prefixed filename ({team}-{agent}.json). Each file captures context usage percentage, model ID, session ID, and a timestamp so that the manager plane and CLI commands can display current agent health at a glance.

Plane: shared

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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