Documentation
¶
Index ¶
Constants ¶
View Source
const OutputAgeUnknown = time.Duration(-1)
OutputAgeUnknown signals that output timing is not available.
View Source
const RecentOutputThreshold = 3 * time.Second
RecentOutputThreshold is the duration within which PTY output implies the agent is actively working. Used as a fallback when pattern matching cannot determine the state.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AgentStatus ¶
type AgentStatus string
const ( StatusActive AgentStatus = "active" StatusReady AgentStatus = "ready" StatusUnknown AgentStatus = "unknown" )
type Detector ¶
type Detector struct {
// contains filtered or unexported fields
}
func (*Detector) DetectWithRecentWindow ¶ added in v0.69.1
func (d *Detector) DetectWithRecentWindow(content string, outputAge, recentWindow time.Duration) AgentStatus
DetectWithRecentWindow returns the detected status based on terminal content and how recently the PTY produced output. The caller supplies the recent-output window so the daemon can honour the configurable [detection] recent_output_window (issue #1241). A recentWindow <= 0 disables the output-recency fallback: an inconclusive scrape then stays StatusUnknown regardless of output age.
Click to show internal directories.
Click to hide internal directories.