Skip to main content

Module classifier

Module classifier 

Source
Expand description

State classifiers: determine agent state from virtual screen content.

Each agent type (Claude, Codex, Kiro, Generic) has different prompt patterns, spinner indicators, and context exhaustion messages.

Structs§

Classification

Enums§

AgentType
Agent type selector for the shim classifier.
NarrationLineKind
How a single output line should be treated by narration enforcement.
ScreenVerdict
What the classifier thinks the agent is doing.

Constants§

MIN_CLASSIFIER_CONFIDENCE

Functions§

classify
Classify screen content based on agent type.
classify_narration_line
Classify a single output line for narration-loop detection.
classify_with_confidence
Classify screen content and return a confidence score for the match.
detect_claude_dialog
Legacy alias for backward compatibility in tests.
detect_meta_conversation
Detect meta-conversation patterns where the agent keeps planning or narrating without moving to concrete execution.
detect_narration_pattern
Detect whether the current screen content looks like narration instead of concrete execution. This is intentionally screen-level so daemon health checks can count consecutive narration polls.
detect_startup_dialog
Detect known startup dialogs that should be auto-dismissed by the shim. Works for Claude, Codex, and other agents that show trust prompts.