修复综合模式历史会话泄漏内部指令。

将综合模式执行文本与用户落库文本彻底解耦,确保只持久化用户真实输入;同时在消息读取接口增加旧脏数据过滤,并补充回归测试,避免内部派单指令再次作为用户消息展示。

Made-with: Cursor
This commit is contained in:
oliver 2026-04-29 00:02:30 +08:00
parent 048e8ec1c1
commit 8b8265eb46
7 changed files with 254 additions and 12 deletions

View file

@ -47,6 +47,7 @@ class AgentCoreRunInput:
oclaw_worker_id: str | None = None
skill_binding_role: str | None = None
wire_policy_role: str | None = None
persisted_user_text: str | None = None
@dataclass(frozen=True)
@ -218,6 +219,7 @@ def run_agent_core(*, store: Any, data: AgentCoreRunInput) -> AgentCoreRunOutput
wire_policy_role=data.wire_policy_role,
prompt_build_context=(dict(data.msg.metadata or {}) if isinstance(data.msg.metadata, dict) else None),
turn_uuid=user_turn_uuid,
persisted_user_text=data.persisted_user_text,
),
)
attempts.append(out.state)