fix(agent): provide current workspace access before model requests

This commit is contained in:
Xubin Ren committed 2026-10-11 17:06:39 +08:00
1 parent d7d4b97df3
commit 1d69f630d7
17 files changed
+265 -44

No files matched your search

+13
View File
@@ -6,6 +6,19 @@ import time
from nanobot.agent.loop import AgentLoop
from nanobot.agent.subagent_status import SubagentStatus
from nanobot.bus.events import InboundMessage
from nanobot.runtime_context import (
RUNTIME_CONTEXT_HISTORY_META,
RUNTIME_CONTEXT_MESSAGE_META,
public_history_message,
)
def visible_message(message: dict) -> dict:
"""Project raw runner or persisted messages without model-only context."""
marker = message.get("_meta", {}).get(RUNTIME_CONTEXT_MESSAGE_META)
if marker is not None:
message = {**message, RUNTIME_CONTEXT_HISTORY_META: marker}
return public_history_message(message)
def save_completed_subagent(loop: AgentLoop, task_id: str, owner: str) -> None: