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>)
| 343 | /// If an agent with the same name is already registered, the new one |
| 344 | /// replaces it. |
| 345 | pub fn register(&mut self, agent: Box<dyn AgentHook>) { |
| 346 | // Replace existing agent with the same name |
| 347 | self.agents.retain(|a| a.name() != agent.name()); |
| 348 | self.agents.push(agent); |
| 349 | } |
| 350 | |
| 351 | /// Look up an agent adapter by name. |
| 352 | /// |