feat(config): add configurable timezone for runtime context

Add agent-level timezone configuration with a UTC default, propagate it into runtime context and heartbeat prompts, and document valid IANA timezone usage in the README.
This commit is contained in:
Xubin Ren
2026-03-25 22:07:14 +08:00
committed by Xubin Ren
parent ef10df9acb
commit 13d6c0ae52
7 changed files with 56 additions and 11 deletions
+2 -1
View File
@@ -65,6 +65,7 @@ class AgentLoop:
session_manager: SessionManager | None = None,
mcp_servers: dict | None = None,
channels_config: ChannelsConfig | None = None,
timezone: str | None = None,
):
from nanobot.config.schema import ExecToolConfig, WebSearchConfig
@@ -83,7 +84,7 @@ class AgentLoop:
self._start_time = time.time()
self._last_usage: dict[str, int] = {}
self.context = ContextBuilder(workspace)
self.context = ContextBuilder(workspace, timezone=timezone)
self.sessions = session_manager or SessionManager(workspace)
self.tools = ToolRegistry()
self.subagents = SubagentManager(