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>)
| 279 | /// If an agent with the same name is already registered, the new one |
| 280 | /// replaces it. |
| 281 | pub fn register(&mut self, agent: Box<dyn AgentHook>) { |
| 282 | // Replace existing agent with the same name |
| 283 | self.agents.retain(|a| a.name() != agent.name()); |
| 284 | self.agents.push(agent); |
| 285 | } |
| 286 | |
| 287 | /// Look up an agent adapter by name. |
| 288 | /// |