Register a new agent adapter. If an agent with the same name is already registered, the new one replaces it.
(&mut self, agent: Box<dyn AgentHook>)
| 366 | /// If an agent with the same name is already registered, the new one |
| 367 | /// replaces it. |
| 368 | pub fn register(&mut self, agent: Box<dyn AgentHook>) { |
| 369 | // Replace existing agent with the same name |
| 370 | self.agents.retain(|a| a.name() != agent.name()); |
| 371 | self.agents.push(agent); |
| 372 | } |
| 373 | |
| 374 | /// Look up an agent adapter by name. |
| 375 | /// |