diff options
Diffstat (limited to 'src/detect/mod.rs')
| -rw-r--r-- | src/detect/mod.rs | 103 |
1 files changed, 0 insertions, 103 deletions
diff --git a/src/detect/mod.rs b/src/detect/mod.rs index 0c773f0e..4ed32344 100644 --- a/src/detect/mod.rs +++ b/src/detect/mod.rs @@ -893,14 +893,6 @@ mod tests { std::env::temp_dir().join(unique) } - #[test] - fn moved_agent_detection_routes_through_production_dispatch() { - let detection = detect_agent(Some(Agent::Pi), "Working..."); - - assert_eq!(detection.state, AgentState::Working); - assert!(detection.visible_working); - } - // ---- Agent identification ---- #[test] @@ -1279,101 +1271,6 @@ mod tests { } #[test] - fn letta_manifest_detects_observed_working_and_idle_chrome() { - let empty = manifest::explain(Agent::Letta, ""); - assert_eq!(empty.state, AgentState::Unknown); - assert_eq!( - empty.matched_rule.as_ref().map(|rule| rule.id.as_str()), - Some("no_live_state_evidence") - ); - for screen in [ - "✻ Thinking…\nTutor is reflecting… (esc to interrupt · 2m 3s)", - "My Tutor is thinking about thinking… (esc to interrupt · 3s)", - "Tutor is calibrating… (interrupting)", - "• Run Compile the integration\n└ Running... (1s)", - ] { - assert_eq!( - detect_state(Some(Agent::Letta), screen), - AgentState::Working - ); - } - assert_eq!( - detect_state( - Some(Agent::Letta), - "────────────────\n› Try \"debug this error\"\n────────────────\nTutor · No model selected" - ), - AgentState::Idle - ); - assert_eq!( - detect_state( - Some(Agent::Letta), - "────────────────\n› explain this code\n────────────────\nTutor · No model selected" - ), - AgentState::Unknown - ); - let selector = manifest::explain( - Agent::Letta, - "8 pinned agents available.\n\n> Resume Bob (pinned)\n View all 8 profiles\n Create a new agent (--new)\n\n ↑↓ navigate · Enter select · Esc exit", - ); - assert_eq!(selector.state, AgentState::Unknown); - assert_eq!( - selector.matched_rule.as_ref().map(|rule| rule.id.as_str()), - Some("profile_selector") - ); - } - - #[test] - fn letta_manifest_uses_osc_activity_and_approval_signals() { - let idle_screen = - "────────────────\n› Try \"debug this error\"\n────────────────\nTutor · GPT-5.5"; - - for title in ["⠋ Tutor", "project | ⠏ Tutor"] { - let detection = detect_agent_with_osc(Some(Agent::Letta), idle_screen, title, ""); - assert_eq!(detection.state, AgentState::Working); - assert!(detection.visible_working); - } - - for title in [ - "[ ! ] Action Required | Tutor", - "[ . ] Action Required | Tutor", - ] { - let detection = detect_agent_with_osc(Some(Agent::Letta), idle_screen, title, ""); - assert_eq!(detection.state, AgentState::Blocked); - assert!(detection.visible_blocker); - } - - let detection = detect_agent_with_osc(Some(Agent::Letta), idle_screen, "Tutor", "4;3;0"); - assert_eq!(detection.state, AgentState::Blocked); - assert!(detection.visible_blocker); - } - - #[test] - fn letta_manifest_detects_observed_command_approval() { - let approval = r#"✻ Thinking… - -──────────────────────────────────────────────────────────────── -Run this command? - - $ rm -f /var/tmp/herdr-blocked-capture-never-created - -❯ 1. Yes - 2. No, and tell Letta Code what to do differently - -Enter to select · Esc to cancel"#; - assert_eq!( - detect_state(Some(Agent::Letta), approval), - AgentState::Blocked - ); - assert_eq!( - detect_state( - Some(Agent::Letta), - "The user asked: Run this command?\n›\n────\nTutor · No model selected" - ), - AgentState::Idle - ); - } - - #[test] fn identify_agent_in_job_detects_windows_cursor_install() { let job = crate::platform::ForegroundJob { process_group_id: 123, |
