6 Commits
Author SHA1 Message Date
nanobot 50e67a621a docs: NixOS deployment guide from Camellia
Test Suite / Detect changes (push) Has been cancelled
Test Suite / webui (push) Has been cancelled
Test Suite / docker (push) Has been cancelled
Test Suite / Python (Windows, 3.14) (push) Has been cancelled
Test Suite / Python (minimum, 3.11) (push) Has been cancelled
Test Suite / Python (latest, 3.14 + coverage) (push) Has been cancelled
2026-07-28 14:25:52 +08:00
nanobot c5637b8cff Revert "docs: deployment guide from Camellia experience"
Test Suite / Detect changes (push) Has been cancelled
Test Suite / Python (Windows, 3.14) (push) Has been cancelled
Test Suite / Python (minimum, 3.11) (push) Has been cancelled
Test Suite / Python (latest, 3.14 + coverage) (push) Has been cancelled
Test Suite / webui (push) Has been cancelled
Test Suite / docker (push) Has been cancelled
This reverts commit ded5d4d8ed.
2026-07-28 14:23:41 +08:00
nanobot ded5d4d8ed docs: deployment guide from Camellia experience
Test Suite / Detect changes (push) Has been cancelled
Test Suite / Python (Windows, 3.14) (push) Has been cancelled
Test Suite / Python (minimum, 3.11) (push) Has been cancelled
Test Suite / Python (latest, 3.14 + coverage) (push) Has been cancelled
Test Suite / webui (push) Has been cancelled
Test Suite / docker (push) Has been cancelled
2026-07-28 14:20:26 +08:00
nanobot d5d6c76a93 fix: raise error when Telegram bot not running instead of silently dropping messages
When the outbound dispatcher processes recovery notifications before the
Telegram bot is fully started, the send() method silently returned, causing
the notification to be lost. Now it raises RuntimeError so _send_with_retry
will retry until the bot is ready.
2026-07-28 14:17:34 +08:00
nanobot 79a0fd8ed0 fix: capture pending_user_turn before _restore_runtime_checkpoint clears it
Test Suite / Detect changes (push) Has been cancelled
Test Suite / Python (Windows, 3.14) (push) Has been cancelled
Test Suite / Python (minimum, 3.11) (push) Has been cancelled
Test Suite / Python (latest, 3.14 + coverage) (push) Has been cancelled
Test Suite / webui (push) Has been cancelled
Test Suite / docker (push) Has been cancelled
_restore_runtime_checkpoint() clears both the runtime_checkpoint and
pending_user_turn flags (lines 1966-1967). recover_stale_sessions()
checked had_pending AFTER calling it, so had_pending was always False
when a checkpoint existed. This meant the re-publish of the last user
message never happened — the user got a notification but the interrupted
turn was never re-triggered.
2026-07-28 14:13:23 +08:00
nanobot 206ab0943c 2026-07-28 14:06:35 +08:00
+3 -11
View File
@@ -378,7 +378,6 @@ class AgentLoop:
) )
self._unified_session = unified_session self._unified_session = unified_session
self._running = False self._running = False
self._shutting_down = False
self._mcp_servers = mcp_servers or {} self._mcp_servers = mcp_servers or {}
self._mcp_stacks: dict[str, MCPConnection] = {} self._mcp_stacks: dict[str, MCPConnection] = {}
self._mcp_connecting = False self._mcp_connecting = False
@@ -1225,11 +1224,11 @@ class AgentLoop:
# it into session history now makes it visible in the # it into session history now makes it visible in the
# next conversation turn. # next conversation turn.
# #
# During gateway shutdown (self._shutting_down is True), # During gateway shutdown (self._running is False), skip
# skip this so the pending markers survive and # this so the pending markers survive and
# recover_stale_sessions() can notify the user and # recover_stale_sessions() can notify the user and
# re-trigger the interrupted turn on next startup. # re-trigger the interrupted turn on next startup.
if not self._shutting_down: if self._running:
try: try:
key = self._effective_session_key(msg) key = self._effective_session_key(msg)
session = self.sessions.get_or_create(key) session = self.sessions.get_or_create(key)
@@ -1319,7 +1318,6 @@ class AgentLoop:
def stop(self) -> None: def stop(self) -> None:
"""Stop the agent loop.""" """Stop the agent loop."""
self._running = False self._running = False
self._shutting_down = True
logger.info("Agent loop stopping") logger.info("Agent loop stopping")
async def _process_message( async def _process_message(
@@ -2153,12 +2151,6 @@ class AgentLoop:
sender_id=chat_id, sender_id=chat_id,
chat_id=chat_id, chat_id=chat_id,
content=last_user_msg["content"], content=last_user_msg["content"],
# The message already exists in session history
# (persisted before the crash); skip persisting it
# again so recovery does not duplicate it.
metadata={
turn_continuation.SKIP_USER_PERSIST_META: True
},
) )
) )
logger.info( logger.info(