Returns the agent matching `id`, or an error if unknown.
(id: &str)
| 337 | |
| 338 | /// Returns the agent matching `id`, or an error if unknown. |
| 339 | pub fn get_integration(id: &str) -> Result<Box<dyn AgentIntegration>> { |
| 340 | match id { |
| 341 | "claude" => Ok(Box::new(ClaudeIntegration)), |
| 342 | "opencode" => Ok(Box::new(OpenCodeIntegration)), |
| 343 | "codex" => Ok(Box::new(CodexIntegration)), |
| 344 | "gemini" => Ok(Box::new(GeminiIntegration)), |
| 345 | "copilot" => Ok(Box::new(CopilotIntegration)), |
| 346 | "cursor" => Ok(Box::new(CursorIntegration)), |
| 347 | "hermes" => Ok(Box::new(HermesIntegration)), |
| 348 | "zed" => Ok(Box::new(ZedIntegration)), |
| 349 | "cline" => Ok(Box::new(ClineIntegration)), |
| 350 | "roo-code" => Ok(Box::new(RooCodeIntegration)), |
| 351 | "antigravity" => Ok(Box::new(AntigravityIntegration)), |
| 352 | "kilo" => Ok(Box::new(KiloIntegration)), |
| 353 | "kiro" => Ok(Box::new(KiroIntegration)), |
| 354 | "kimi" => Ok(Box::new(KimiIntegration)), |
| 355 | "vibe" => Ok(Box::new(VibeIntegration)), |
| 356 | _ => Err(TraceDecayError::Config { |
| 357 | message: format!( |
| 358 | "unknown agent: \"{id}\". Available agents: {}", |
| 359 | available_integrations().join(", ") |
| 360 | ), |
| 361 | }), |
| 362 | } |
| 363 | } |
| 364 | |
| 365 | /// Returns all registered agents. |
| 366 | pub fn all_integrations() -> Vec<Box<dyn AgentIntegration>> { |
no outgoing calls