Documentation
¶
Overview ¶
Package binaries provides per-binary BinaryDetector implementations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClassifyOSCTitle ¶ added in v1.49.0
ClassifyOSCTitle inspects a Claude Code OSC window-title payload (already extracted via pkg/ansi.ExtractLastOSC) and returns a definitive OSC-derived status, or ok=false for an unrecognized title (callers fall back to text-pattern detection). Spinner is checked before the idle glyph: treating an ambiguous title as "still executing" is the lower-cost mistake.
Types ¶
type AgyDetector ¶
type AgyDetector struct{}
AgyDetector implements dtypes.BinaryDetector for the Agy (Antigravity) CLI. Agy uses the same TUI codebase as Gemini CLI, so the patterns are equivalent but use an "agy_" prefix to keep names unique within the registry.
func (*AgyDetector) FilterContent ¶
func (d *AgyDetector) FilterContent(content string) string
FilterContent returns content unchanged.
func (*AgyDetector) Patterns ¶
func (d *AgyDetector) Patterns() dtypes.StatusPatterns
Patterns returns Agy-specific status patterns. The pattern strings are identical to GeminiDetector because agy shares the same TUI codebase; only the Names differ (agy_ prefix) so they remain unique.
type AiderDetector ¶
type AiderDetector struct{}
AiderDetector implements dtypes.BinaryDetector for the Aider CLI.
func NewAiderDetector ¶
func NewAiderDetector() *AiderDetector
NewAiderDetector returns a new AiderDetector.
func (*AiderDetector) FilterContent ¶
func (d *AiderDetector) FilterContent(content string) string
FilterContent returns content unchanged.
func (*AiderDetector) Patterns ¶
func (d *AiderDetector) Patterns() dtypes.StatusPatterns
Patterns returns Aider-specific status patterns.
type ClaudeDetector ¶
type ClaudeDetector struct{}
ClaudeDetector implements dtypes.BinaryDetector for the Claude Code CLI.
func NewClaudeDetector ¶
func NewClaudeDetector() *ClaudeDetector
NewClaudeDetector returns a new ClaudeDetector.
func (*ClaudeDetector) FilterContent ¶
func (d *ClaudeDetector) FilterContent(content string) string
FilterContent returns content unchanged (no binary-specific filtering for Claude).
func (*ClaudeDetector) Patterns ¶
func (d *ClaudeDetector) Patterns() dtypes.StatusPatterns
Patterns returns the Claude Code-specific status patterns. This is the single source of truth for Claude's default pattern set: session/detection's generic getDefaultPatterns() (used as the fallback for any program with no registered per-binary detector) delegates to this method rather than maintaining its own copy — see detector.go's getDefaultPatterns() doc comment. Historically this method held its own hand-copied, materially thinner subset that drifted out of sync with getDefaultPatterns() (missing WaitingForAgent entirely, a glyph-tolerant esc_to_interrupt variant, the ✦ spinner glyph, bracket_insert_mode, claude_accept_edits, and cross-tool Ready/Processing/NeedsApproval patterns) — that drift regressed any claude session resolved through the built-in registry entry onto a worse pattern set than sessions falling back to NewStatusDetector(). Keeping exactly one literal (here) makes that class of drift impossible.
type GeminiDetector ¶
type GeminiDetector struct{}
GeminiDetector implements dtypes.BinaryDetector for the Gemini CLI.
func NewGeminiDetector ¶
func NewGeminiDetector() *GeminiDetector
NewGeminiDetector returns a new GeminiDetector.
func (*GeminiDetector) FilterContent ¶
func (d *GeminiDetector) FilterContent(content string) string
FilterContent returns content unchanged.
func (*GeminiDetector) Patterns ¶
func (d *GeminiDetector) Patterns() dtypes.StatusPatterns
Patterns returns Gemini CLI-specific status patterns.
type OpencodeDetector ¶
type OpencodeDetector struct{}
OpencodeDetector implements dtypes.BinaryDetector for the OpenCode CLI.
func NewOpencodeDetector ¶
func NewOpencodeDetector() *OpencodeDetector
NewOpencodeDetector returns a new OpencodeDetector.
func (*OpencodeDetector) FilterContent ¶
func (d *OpencodeDetector) FilterContent(content string) string
FilterContent returns content unchanged.
func (*OpencodeDetector) Patterns ¶
func (d *OpencodeDetector) Patterns() dtypes.StatusPatterns
Patterns returns OpenCode-specific status patterns.
type PiDetector ¶ added in v1.52.0
type PiDetector struct{}
PiDetector implements dtypes.BinaryDetector for the pi coding-agent CLI. pi's live status is tracked via a separate `pi --mode json` side-channel subprocess (session/instance_pi_status.go), not by pane scraping, so Patterns() is empty -- mirrors AiderDetector's shape before its own approval pattern was added.
func NewPiDetector ¶ added in v1.52.0
func NewPiDetector() *PiDetector
NewPiDetector returns a new PiDetector.
func (*PiDetector) FilterContent ¶ added in v1.52.0
func (d *PiDetector) FilterContent(content string) string
FilterContent returns content unchanged.
func (*PiDetector) Patterns ¶ added in v1.52.0
func (d *PiDetector) Patterns() dtypes.StatusPatterns
Patterns returns an empty pattern set -- see the type doc comment. The zero value's nil slices behave identically to explicit empty ones for every caller (len/range), so there's no need to allocate one per field.