Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DaemonState ¶
type DaemonState struct {
PID int
Alive bool
ProxyAddr string // proxy listen address from daemon.json
ProxyActiveConns int64 // number of currently active proxy connections
}
DaemonState holds the daemon liveness info.
type InstanceView ¶
type InstanceView struct {
Usage claude.InstanceUsage
Session *logparser.SessionState // nil if no session matched
}
InstanceView pairs a discovered instance with its matched session (if any).
type Monitor ¶
type Monitor struct {
// contains filtered or unexported fields
}
Monitor owns the data-fetching and state-reconciliation cycle for the TUI.
func New ¶
func New(finder claude.InstanceFinder, dc claude.DockerClient) *Monitor
New creates a Monitor. dockerClient may be nil when Docker is unavailable.
func (*Monitor) FetchFull ¶
FetchFull performs complete discovery, JSONL parsing, and hook event reading. Used for periodic full refreshes after the initial skeleton+heavy load.
func (*Monitor) FetchHeavy ¶
FetchHeavy performs discovery, daemon RPCs, and JSONL parsing on top of a skeleton snapshot. Independent daemon RPCs run in parallel with instance discovery so the total time is max(discovery, RPCs) rather than a sum.
func (*Monitor) FetchSkeleton ¶
FetchSkeleton returns a minimal snapshot from cheap local file reads. The TUI renders immediately from this so the user sees the dashboard layout (daemon status, status line) while heavier work runs in the background via FetchHeavy.
type Snapshot ¶
type Snapshot struct {
FetchedAt time.Time
Err error
Daemon DaemonState
Telegram string
Slack string
Trackers []tracker.TrackerStatus
Instances []InstanceView
Panes []claude.TmuxPane
TotalUsage *claude.UsageSummary
// NetworkEvents is the deduplicated ambient network activity list
// from the daemon store, in insertion order (oldest first). The
// renderer reverses this for newest-on-top display.
NetworkEvents []daemon.NetworkEvent
// ToolStats holds pre-aggregated historical tool call statistics
// fetched from the daemon's SQLite store. Populated on fullTick only.
ToolStats *stats.ToolStats
// contains filtered or unexported fields
}
Snapshot holds the complete TUI display state at a point in time.