sync update from LAN repo (source ji @ 85078a31)

This commit is contained in:
gozeros committed 2026-10-21 15:09:16 +08:00
1 parent 5d6627af50
commit e602d88695
864 files changed
+99150 -6346

No files matched your search

@@ -348,6 +348,7 @@ async def _run_agent_turn(
diag: DiagnosticsRecorder | None = None,
stage: str = "step2_seat",
cycle: int | None = None,
on_started=None,
) -> list[dict[str, Any]]:
"""进程内驱动 agent_name 在 thread_id 上跑一轮(发 message),阻塞到完成,返回最终 messages。
@@ -408,6 +409,8 @@ async def _run_agent_turn(
agent_name=agent_name, cycle=cycle,
)
raise
if on_started is not None:
await on_started(record)
# idle 超时守护:慢但持续产出的生成一直等;只有连续 _SEAT_IDLE_TIMEOUT_S 秒**毫无输出**
# (真卡死)才取消并抛错。绝不因「这轮总耗时长」而打断(除非显式配了 _SEAT_MAX_TOTAL_S)。
await _await_run_with_idle_guard(