重构主控编排与运行时预热链路,统一工作区提示词/专家调度协议并补齐 wiki 记忆注入与写回闭环。

同时收敛启动与运维脚本默认行为(含 wiki worker)、更新 Admin 可观测性与相关测试,降低首轮时延并提高运行稳定性。

Made-with: Cursor
This commit is contained in:
oliver 2026-04-26 08:34:33 +08:00
parent 4a23b715a2
commit dbbe3add6a
14438 changed files with 2693620 additions and 2546 deletions

View file

@ -40,6 +40,12 @@ def build_gateway_context(
if not sid or not txt:
return False
rid = str(run_id or "").strip() or uuid.uuid4().hex
try:
existing = store.oclaw_run_get(run_id=rid)
if existing is not None:
return True
except Exception:
pass
with abort_lock:
active_run_session[rid] = sid
p = dict(params or {})
@ -61,7 +67,11 @@ def build_gateway_context(
"acp_child_run_id": str(p.get("acp_child_run_id") or ""),
"runId": rid,
}
asyncio.create_task(run_agent_turn("server_methods.chat.send", agent_params, session_id=sid, send_response=False))
async def _delayed() -> None:
await asyncio.sleep(0.05)
await run_agent_turn("server_methods.chat.send", agent_params, session_id=sid, send_response=False)
asyncio.create_task(_delayed())
return True
def _run_agent(params: dict[str, Any]) -> dict[str, Any]:
@ -89,7 +99,11 @@ def build_gateway_context(
}
with abort_lock:
active_run_session[str(run_id)] = str(session_id)
asyncio.create_task(run_agent_turn("server_methods.agent", agent_params, session_id=session_id, send_response=False))
async def _delayed() -> None:
await asyncio.sleep(0.05)
await run_agent_turn("server_methods.agent", agent_params, session_id=session_id, send_response=False)
asyncio.create_task(_delayed())
return {"runId": run_id, "status": "started"}
def _enqueue_session_send(session_key: str, message: str, params: dict[str, Any]) -> dict[str, Any]: