agentactivity

package
v0.93.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2026 License: MIT Imports: 3 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 agentactivity classifies live agent terminal observations without depending on tmux, Bubble Tea, or persistent conversation storage.

Index

Constants

View Source
const IdleDebounce = 400 * time.Millisecond

Variables

This section is empty.

Functions

This section is empty.

Types

type Observation

type Observation struct {
	Agent          string
	Screen         string
	PaneTitle      string
	CurrentCommand string
	CapturedAt     time.Time
}

type Region

type Region string
const (
	RegionScreen    Region = "screen"
	RegionLastLines Region = "last_lines"
	RegionCurrent   Region = "current_bottom"
	RegionTitle     Region = "pane_title"
)

type Result

type Result struct {
	State           State
	Evidence        string
	VisibleIdle     bool
	VisibleWorking  bool
	VisibleBlocker  bool
	SkipStateUpdate bool
	// FallbackIdle distinguishes provider-owned explicit idle evidence from the
	// conservative no-match policy for a positively identified live process.
	// Fallback idle may establish/display idle, but cannot announce completion.
	FallbackIdle bool
}

func Detect

func Detect(ob Observation) Result

Detect dispatches an observation to the expected provider probe. Keeping dispatch here lets the workspace poll remain product-neutral while each provider owns its evidence table.

func DetectAmp

func DetectAmp(ob Observation) Result

func DetectAntigravity

func DetectAntigravity(ob Observation) Result

func DetectClaude

func DetectClaude(ob Observation) Result

func DetectCodex

func DetectCodex(ob Observation) Result

DetectCodex requires live process identity before evaluating Codex-owned UI. tmux commonly reports "node" for the npm-installed Codex launcher.

func DetectCopilot

func DetectCopilot(ob Observation) Result

func DetectCursor

func DetectCursor(ob Observation) Result

func DetectGrok

func DetectGrok(ob Observation) Result

func DetectOpenCode

func DetectOpenCode(ob Observation) Result

func DetectPi

func DetectPi(ob Observation) Result

func Evaluate

func Evaluate(ob Observation, rules []Rule) Result

Evaluate applies rules in caller-supplied priority order. Rules are kept deliberately small: provider files own their evidence and ordering.

type Rule

type Rule struct {
	ID       string
	State    State
	Region   Region
	Contains []string
	Regexp   *regexp.Regexp
	Not      []string
	LastN    int
	Skip     bool
}

type State

type State string
const (
	StateUnknown State = "unknown"
	StateIdle    State = "idle"
	StateWorking State = "working"
	StateBlocked State = "blocked"
)

type Tracker

type Tracker struct {
	State     State
	Evidence  string
	ChangedAt time.Time
	Seen      bool
	// contains filtered or unexported fields
}

Tracker owns transition policy while Evaluate remains state-free.

func (*Tracker) Acknowledge

func (t *Tracker) Acknowledge()

func (*Tracker) Apply

func (t *Tracker) Apply(result Result, now time.Time) bool

func (Tracker) DisplayState

func (t Tracker) DisplayState() string

Jump to

Keyboard shortcuts

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