Merge branch 'feat/semantic-beliefs' into feat/extra-agentspeak-functionality

# Conflicts:
#	src/control_backend/agents/bdi/bdi_program_manager.py
This commit is contained in:
2026-01-07 17:20:52 +01:00
8 changed files with 378 additions and 153 deletions

View File

@@ -193,7 +193,16 @@ class BaseAgent(ABC):
:param coro: The coroutine to execute as a task.
"""
task = asyncio.create_task(coro)
async def try_coro(coro_: Coroutine):
try:
await coro_
except asyncio.CancelledError:
self.logger.debug("A behavior was canceled successfully: %s", coro_)
except Exception:
self.logger.warning("An exception occurred in a behavior.", exc_info=True)
task = asyncio.create_task(try_coro(coro))
self._tasks.add(task)
task.add_done_callback(self._tasks.discard)
return task