Add autonomy pause mechanism for PLAN_EXEC mode: when execution exceeds timeout (default 30min) or hits consecutive failures (default 3), engine emits `autonomy_paused` event and awaits user resume via resume_handler. - DangerousToolsConfig: add autonomy_timeout_minutes + max_consecutive_failures - ReActEngine: add _check_autonomy_pause() + _track_tool_result_for_autonomy() Called in serial + text-parsed tool paths (between tool_call event and autonomy gate). resume_handler=None → auto-resume (REST/testing). - chat.py: WebSocket `resume` message handler + _resume_handler closure (Future-based, 30min hard timeout). pending_autonomy_resumes cleanup in finally block. autonomy_paused event forwarded to frontend. Tests: 21 new tests (track_result + no_trigger + timeout + failures + config parsing + handler exception). All pass; U1/U2 no regression. |
||
|---|---|---|
| .. | ||
| documents | ||
| e2e | ||
| integration | ||
| manual | ||
| routes | ||
| tools | ||
| unit | ||
| __init__.py | ||
| conftest.py | ||
| test_routing_chain.py | ||