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:
2026-05-12 23:08:45 +00:00
parent c215b9bf0c
commit b6d5e6ee57

View File

@@ -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