mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-11-06 05:17:15 +00:00
chore(mcp): drop the imports the deleted MCP death supervisor left behind
`sys` and `_get_mcp_stderr_log` in tools/mcp_tool.py were used only by _spawn_death_supervisor, which this branch deleted (ruff: two new F401 against base). Three tests patched tools.mcp_tool._get_mcp_stderr_log, which nothing reads now (the stdio transport reads mcp_tool_config's directly, as it did on base), so those patches did nothing and go too. One slash worker test still set HERMES_SLASH_WATCHDOG_GRACE_S/POLL_S, which nothing reads since the watchdog knobs were removed.
This commit is contained in:
1 parent
edbb589c60
commit
fff9f581b2
5 files changed
+1
-8
No files matched your search
@@ -619,7 +619,6 @@ def _stdio_connection(child_pid, fake_supervisor):
|
||||
side_effect=[set(), {child_pid}],
|
||||
),
|
||||
patch("tools.mcp_tool_config._write_stderr_log_header"),
|
||||
patch("tools.mcp_tool._get_mcp_stderr_log", return_value=None),
|
||||
patch(
|
||||
"hermes_cli.process_identity._spawn_supervisor",
|
||||
return_value=fake_supervisor,
|
||||
|
||||
@@ -147,8 +147,6 @@ class TestStdioPidTracking:
|
||||
patch("tools.mcp_tool_config._resolve_stdio_command",
|
||||
return_value=("echo", {})), \
|
||||
patch("tools.mcp_tool_config._write_stderr_log_header"), \
|
||||
patch("tools.mcp_tool._get_mcp_stderr_log",
|
||||
return_value=None), \
|
||||
patch("tools.mcp_tool.check_package_for_malware",
|
||||
return_value=None, create=True), \
|
||||
patch("tools.osv_check.check_package_for_malware",
|
||||
|
||||
@@ -45,7 +45,6 @@ class TestStdioEncodingErrorHandler:
|
||||
patch("tools.mcp_tool.ClientSession", return_value=mock_session_cm),
|
||||
patch("tools.mcp_tool_lifecycle._snapshot_child_pids", return_value=set()),
|
||||
patch("tools.mcp_tool_config._write_stderr_log_header"),
|
||||
patch("tools.mcp_tool._get_mcp_stderr_log", return_value=None),
|
||||
):
|
||||
server = MCPServerTask("test-encoding")
|
||||
await server.start({
|
||||
|
||||
@@ -71,8 +71,6 @@ def test_profile_local_mcp_tool_is_visible_in_slash_worker(tmp_path):
|
||||
env.pop(key)
|
||||
env["HERMES_HOME"] = str(profile_home)
|
||||
env["PYTHONPATH"] = str(Path(__file__).resolve().parents[2])
|
||||
env["HERMES_SLASH_WATCHDOG_GRACE_S"] = "0"
|
||||
env["HERMES_SLASH_WATCHDOG_POLL_S"] = "0.05"
|
||||
proc = subprocess.Popen(
|
||||
[
|
||||
sys.executable,
|
||||
|
||||
+1
-2
@@ -16,7 +16,6 @@ import importlib.util
|
||||
import inspect
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
import threading
|
||||
import time
|
||||
from typing import Any, Callable, Dict, List, Optional, Set
|
||||
@@ -24,7 +23,7 @@ from typing import Any, Callable, Dict, List, Optional, Set
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
from tools.mcp_tool_common import _DEFAULT_TOOL_TIMEOUT, mcp_field
|
||||
from tools.mcp_tool_config import _get_mcp_stderr_log, _npx_cached_bin, _packaged_npx_entry
|
||||
from tools.mcp_tool_config import _npx_cached_bin, _packaged_npx_entry
|
||||
from tools.mcp_tool_sampling import ElicitationHandler, SamplingHandler
|
||||
from tools.mcp_tool_transport import MCPServerTransportMixin
|
||||
from tools.mcp_tool_server_run import MCPServerRunMixin
|
||||
|
||||
Reference in new issue
Block a user