fix: add AgentRegistry.get_all() method
Routers calling /registry/agents raised AttributeError because get_all() was not defined. Added method returning all registered agents with active status, capabilities and instance flags.
This commit is contained in:
@@ -26,6 +26,18 @@ class AgentRegistry:
|
||||
return [{'agent_key': k, 'capabilities_summary': self._capabilities.get(k, '')}
|
||||
for k in self._active]
|
||||
|
||||
async def get_all(self):
|
||||
"""Return all registered agents with active status and capabilities."""
|
||||
return [
|
||||
{
|
||||
'agent_key': k,
|
||||
'active': k in self._active,
|
||||
'capabilities_summary': self._capabilities.get(k, ''),
|
||||
'has_instance': k in self._agents,
|
||||
}
|
||||
for k in self._agents
|
||||
]
|
||||
|
||||
async def is_active(self, agent_key):
|
||||
return agent_key in self._active
|
||||
|
||||
|
||||
Reference in New Issue
Block a user