mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-24 16:54:43 +00:00
`_block()` bridges four blocking request types — secret, sudo, clarify,
terminal.read — with an identical lifecycle: on timeout the tool gives up and
returns empty, but a slow renderer (or a WebSocket reconnect that dropped
tool.complete) can still answer afterward. Only secret and sudo tolerated that
late reply; clarify and terminal.read still hit the generic 4009 "no pending
request" error, which clients surface as a raw JSON-RPC string (and at least
one desktop fork re-armed the pending request on the error).
Bring the two stragglers in line with the pair that already works:
- `_block` now emits `{event}.expire` on timeout for all four request types.
- `clarify.respond` and `terminal.read.respond` pass `allow_expired=True`, so a
late answer resolves to `{"status": "expired"}` instead of erroring.
Tests parametrize the timeout-expiry and late-idempotent-response cases over
all four bridges; the old test asserting clarify stays a 4009 error is updated
to the new graceful contract.
Supersedes #56571 (clarify) and #64886 (terminal.read) — same root cause, one fix.
Co-authored-by: liuhao1024 <liuhao1024@users.noreply.github.com>
Co-authored-by: pierrenode <pierrenode@users.noreply.github.com>
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_billing_rpc.py | ||
| test_codex_app_server_live_events.py | ||
| test_compaction_status.py | ||
| test_compute_host.py | ||
| test_compute_host_phase1.py | ||
| test_custom_provider_session_persistence.py | ||
| test_delegation_session_lifecycle.py | ||
| test_entry_sys_path.py | ||
| test_fast_session_scope.py | ||
| test_finalize_session_persist.py | ||
| test_gateway_owned_session_reap.py | ||
| test_goal_command.py | ||
| test_image_routing_stale_model.py | ||
| test_inline_rpc_gil_starvation.py | ||
| test_interim_assistant_callback.py | ||
| test_iso_certify_seam.py | ||
| test_make_agent_provider.py | ||
| test_mcp_late_refresh_thread_owner.py | ||
| test_mcp_reload_rev.py | ||
| test_moa_reference_emit.py | ||
| test_model_switch_marker_role.py | ||
| test_pet_generate_rpc.py | ||
| test_project_tree.py | ||
| test_projects_rpc.py | ||
| test_protocol.py | ||
| test_reasoning_config_per_model.py | ||
| test_reasoning_session_scope.py | ||
| test_render.py | ||
| test_review_summary_callback.py | ||
| test_session_platform_resolution.py | ||
| test_slash_worker_ansi.py | ||
| test_slash_worker_mcp_discovery.py | ||
| test_slash_worker_profile_home.py | ||
| test_slash_worker_sys_path.py | ||
| test_subagent_child_mirror.py | ||
| test_undo_command.py | ||
| test_wait_for_mcp_discovery.py | ||