Skip to content

The agent that grows with you

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.py
index fa04770c6be..a7fbd13384e 100644
--- a/agent/tool_executor.py
+++ b/agent/tool_executor.py
@@ -115,12 +115,12 @@ _AUTHORIZATION_GATE_LOCK_TIMEOUT_S = 360.0
def _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 a
prompt is answerable, never let a wedged holder park workers forever. Deliberately NOT
min()'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's
deadline contribution — so the two can't drift. Long enough that serialization is never broken while a
legitimate 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). Resolved
diff --git a/hermes_cli/web_server_config.py b/hermes_cli/web_server_config.py
index 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 or
normalizing 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.py
index 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 gateway
approval poll loop) and bounds the serialization lock acquire. A wedged
plugin now contributes nothing to the exclusion, so the batch times out
normally; 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.py
index 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 route
back to the channel/session that initiated the tool call. When the agent
dispatches 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`` ContextVar
in the caller and asserts the worker observes it via
``tools.approval.get_current_session_key()``.