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)
| 361 | /// } |
| 362 | /// ``` |
| 363 | pub fn detect(&self, repo_root: &Path) -> Vec<&str> { |
| 364 | self.agents |
| 365 | .iter() |
| 366 | .filter(|a| a.detect_presence(repo_root)) |
| 367 | .map(|a| a.name()) |
| 368 | .collect() |
| 369 | } |
| 370 | |
| 371 | /// Returns all agents that have hooks currently installed. |
| 372 | pub fn installed(&self, repo_root: &Path) -> Vec<&str> { |