fix(registry): use correct Odoo field names (active/agent_name not is_active/agent_key)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -14,11 +14,11 @@ class AgentRegistry:
|
||||
try:
|
||||
rows = await odoo_client.search_read(
|
||||
'ab.ai.agent.registry',
|
||||
[['is_active', '=', True]],
|
||||
['agent_key', 'name', 'capabilities_summary', 'sweep_enabled', 'sweep_interval_hours'])
|
||||
self._active = {r['agent_key'] for r in rows}
|
||||
self._capabilities = {r['agent_key']: r.get('capabilities_summary', '') for r in rows}
|
||||
logger.info('AgentRegistry loaded: active=%s', list(self._active))
|
||||
[['active', '=', True]],
|
||||
['agent_name', 'domain', 'backend'])
|
||||
self._active = {r['agent_name'] for r in rows}
|
||||
self._capabilities = {r['agent_name']: r.get('domain', '') for r in rows}
|
||||
logger.info('AgentRegistry loaded %d agents: %s', len(self._active), list(self._active))
|
||||
except Exception as exc:
|
||||
logger.error('AgentRegistry.load_from_odoo failed: %s', exc)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user