The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
simplify(compat): tools-A — repoint 4 stale docstring references (tools.approval.*, tools.transcription_tools.*) to the defining modules
Tekniumb92308b1d234
diff --git a/agent/tool_executor.py b/agent/tool_executor.pyindex fa04770c6be..a7fbd13384e 100644--- a/agent/tool_executor.py+++ b/agent/tool_executor.py@@ -115,12 +115,12 @@ _AUTHORIZATION_GATE_LOCK_TIMEOUT_S = 360.0def _authorization_gate_lock_timeout() -> float:- """Authorization-lock bound = ``tools.approval.human_wait_ceiling`` (approval timeout ++ """Authorization-lock bound = ``tools.approval_human_wait.human_wait_ceiling`` (approval timeout +margin, capped so it can't overflow Lock.acquire): never break serialization while aprompt is answerable, never let a wedged holder park workers forever. Deliberately NOTmin()'d with the fallback so the gate never gives up early.- Delegates to ``tools.approval.human_wait_ceiling`` — the same bound that clamps a human-wait window's+ Delegates to ``tools.approval_human_wait.human_wait_ceiling`` — the same bound that clamps a human-wait window'sdeadline contribution — so the two can't drift. Long enough that serialization is never broken while alegitimate approval prompt is still answerable; short enough that a wedged holder (hanging``pre_tool_call`` plugin, dead approval client) cannot park other workers forever (#79719). Resolveddiff --git a/hermes_cli/web_server_config.py b/hermes_cli/web_server_config.pyindex 5810b0e4679..d8fc58ed9d6 100644--- a/hermes_cli/web_server_config.py+++ b/hermes_cli/web_server_config.py@@ -243,7 +243,7 @@ def _is_command_provider_block(value: Any) -> bool:"""True when *value* declares a command-type voice provider.Mirrors the runtime discriminators (``tools.tts_command_provider._is_command_provider_config`` /- ``tools.transcription_tools._is_command_stt_provider_config``) and the desktop's+ ``tools.transcription_command._is_command_stt_provider_config``) and the desktop's``isCommandProvider``: ``type`` is OPTIONAL and case/space-insensitive (absent ornormalizing to ``"command"``); ``command`` MUST be a non-empty string."""diff --git a/tests/run_agent/test_authorization_gate.py b/tests/run_agent/test_authorization_gate.pyindex 354731914ed..28faf3d3a41 100644--- a/tests/run_agent/test_authorization_gate.py+++ b/tests/run_agent/test_authorization_gate.py@@ -13,7 +13,7 @@ away — had two coupled failure modes:``remaining = (deadline + (now - window_started)) - now = deadline - window_started``.The fix moves deadline exclusion to the source of the human wait-(``tools.approval.human_wait_window`` around the CLI prompt and the gateway+(``tools.approval_human_wait.human_wait_window`` around the CLI prompt and the gatewayapproval poll loop) and bounds the serialization lock acquire. A wedgedplugin now contributes nothing to the exclusion, so the batch times outnormally; a genuine approval wait is still excluded in full.diff --git a/tests/run_agent/test_tool_executor_contextvar_propagation.py b/tests/run_agent/test_tool_executor_contextvar_propagation.pyindex 613295a61c9..ad9bb39435c 100644--- a/tests/run_agent/test_tool_executor_contextvar_propagation.py+++ b/tests/run_agent/test_tool_executor_contextvar_propagation.py@@ -4,7 +4,7 @@ propagation into concurrent tool worker threads.Background----------Gateway adapters (Slack, Telegram, Discord, ...) set-``tools.approval._approval_session_key`` as a ContextVar before calling+``tools.approval_context._approval_session_key`` as a ContextVar before calling``agent.run_conversation`` so that dangerous-command approval prompts routeback to the channel/session that initiated the tool call. When the agentdispatches multiple tools in parallel, it uses@@ -77,7 +77,7 @@ def test_run_tool_worker_sees_parent_approval_session_key():Mirrors the exact shape of the fixed call site in``run_agent.py::_execute_tool_calls_concurrent`` — a``ThreadPoolExecutor`` with ``executor.submit(ctx.run, fn, *args)``.- Sets the real ``tools.approval._approval_session_key`` ContextVar+ Sets the real ``tools.approval_context._approval_session_key`` ContextVarin the caller and asserts the worker observes it via``tools.approval.get_current_session_key()``.