fix(agent): provide current workspace access before model requests
This commit is contained in:
1 parent
d7d4b97df3
commit
1d69f630d7
17 files changed
+265
-44
No files matched your search
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user