Make Matrix agent registry immutable
This commit is contained in:
parent
2fb6c10a5a
commit
25aa5d9313
2 changed files with 38 additions and 2 deletions
|
|
@ -19,8 +19,8 @@ class AgentDefinition:
|
|||
|
||||
class AgentRegistry:
|
||||
def __init__(self, agents: list[AgentDefinition]) -> None:
|
||||
self.agents = agents
|
||||
self._by_id = {agent.agent_id: agent for agent in agents}
|
||||
self.agents = tuple(agents)
|
||||
self._by_id = {agent.agent_id: agent for agent in self.agents}
|
||||
|
||||
def get(self, agent_id: str) -> AgentDefinition:
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue