Detect which registered agents are present in the given repository. Calls `detect_presence()` on each registered agent and returns the names of agents that are detected. # Example ```rust,no_run use atomic_agent::hooks::AgentRegistry; use std::path::Path; let registry = AgentRegistry::with_defaults(); let detected = registry.detect(Path::new("/path/to/repo")); for name in detected { println!("
(&self, repo_root: &Path)
| 425 | /// } |
| 426 | /// ``` |
| 427 | pub fn detect(&self, repo_root: &Path) -> Vec<&str> { |
| 428 | self.agents |
| 429 | .iter() |
| 430 | .filter(|a| a.detect_presence(repo_root)) |
| 431 | .map(|a| a.name()) |
| 432 | .collect() |
| 433 | } |
| 434 | |
| 435 | /// Returns all agents that have hooks currently installed. |
| 436 | pub fn installed(&self, repo_root: &Path) -> Vec<&str> { |