the runtime your coding agents live on
Rust agentagent-orchestrationaiai-agentsclaude-codeclicodexcoding-agentsdeveloper-toolsdevtoolsmultiplexerrustterminalterminal-multiplexerterminal-uitmuxtuiworkspace-manager
fix: detect npm-installed omp on windows (#4502)
JJ Liebigcd8306d7f35d
diff --git a/src/detect/mod.rs b/src/detect/mod.rsindex 7fe15d111..3dae571b2 100644--- a/src/detect/mod.rs+++ b/src/detect/mod.rs@@ -648,6 +648,15 @@ fn agent_name_from_known_package_path(path: &str) -> Option<String> {]) {return Some(agent_label(Agent::Pi).to_string());}+ if ends_with(&[+ "node_modules",+ "@oh-my-pi",+ "pi-coding-agent",+ "dist",+ "cli.js",+ ]) {+ return Some(agent_label(Agent::Omp).to_string());+ }if ends_with(&["node_modules","@moonshot-ai",@@ -1433,19 +1442,36 @@ mod tests {#[test]fn identify_agent_in_job_detects_bun_wrapped_omp() {- let job = crate::platform::ForegroundJob {+ for (runtime, script) in [+ ("bun", "/home/can/.bun/bin/omp"),+ (+ "bun.exe",+ r"C:\Users\herdr\AppData\Roaming\npm\node_modules\@oh-my-pi\pi-coding-agent\dist\cli.js",+ ),+ ] {+ let job = crate::platform::ForegroundJob {+ process_group_id: 123,+ processes: vec![foreground_process(123, runtime, &[runtime, script])],+ };+ assert_eq!(+ identify_agent_in_job(&job),+ Some((Agent::Omp, "omp".to_string())),+ "script: {script}"+ );+ }++ let other_script = crate::platform::ForegroundJob {process_group_id: 123,processes: vec![foreground_process(123,- "bun",- &["bun", "/home/can/.bun/bin/omp"],+ "bun.exe",+ &[+ "bun.exe",+ r"C:\Users\herdr\AppData\Roaming\npm\node_modules\@oh-my-pi\pi-coding-agent\dist\setup.js",+ ],)],};-- assert_eq!(- identify_agent_in_job(&job),- Some((Agent::Omp, "omp".to_string()))- );+ assert_eq!(identify_agent_in_job(&other_script), None);}#[test]