monitor

package
v0.13.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: 11 Imported by: 0

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
}

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

New creates a Monitor. dockerClient may be nil when Docker is unavailable.

func (*Monitor) FetchFull

func (m *Monitor) FetchFull(ctx context.Context) *Snapshot

FetchFull performs complete discovery, JSONL parsing, and hook event reading.

func (*Monitor) FetchQuick

func (m *Monitor) FetchQuick(ctx context.Context, prev *Snapshot) *Snapshot

FetchQuick updates daemon status, pane states, and hook-based working/idle on an existing snapshot. Instances, sessions, agents, and tasks are carried forward to avoid flicker.

type Snapshot

type Snapshot struct {
	FetchedAt  time.Time
	Err        error
	Daemon     DaemonState
	Telegram   string
	Slack      string
	Instances  []InstanceView
	Panes      []claude.TmuxPane
	TotalUsage *claude.UsageSummary
	// contains filtered or unexported fields
}

Snapshot holds the complete TUI display state at a point in time.

Jump to

Keyboard shortcuts

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