Add /background <prompt> to the gateway, allowing users on Telegram, Discord, Slack, etc. to fire off a prompt in a separate agent session. The result is delivered back to the same chat when done, without modifying the active conversation history. Implementation: - _handle_background_command: validates input, spawns asyncio task - _run_background_task: creates AIAgent in executor thread, delivers result (text, images, media files) back via the platform adapter - Inherits model, toolsets, provider routing from gateway config - Error handling with user-visible failure messages Also adds /background to hermes_cli/commands.py registry so it appears in /help and autocomplete. Tests: 15 new tests covering usage, task creation, uniqueness, multi-platform, error paths, and help/autocomplete integration.
12 KiB
12 KiB