Skip to content

The agent that grows with you

simplify(compat): tools/browser_tool — drop the last warm_agent_browser_npx_cache re-export, repoint 1 caller (update_cmd_deps internal import) + 1 test file

Tekniuma2a82077116b
diff --git a/hermes_cli/update_cmd_deps.py b/hermes_cli/update_cmd_deps.py
index b573b22b4a2..2e63135fe21 100644
--- a/hermes_cli/update_cmd_deps.py
+++ b/hermes_cli/update_cmd_deps.py
@@ -584,7 +584,7 @@ def _update_node_dependencies() -> list[str]:
# See #43564.
print("→ Warming npx cache for agent-browser...")
with suppress(Exception):
- from tools.browser_tool import warm_agent_browser_npx_cache
+ from tools.browser_tool_install import warm_agent_browser_npx_cache
warm_agent_browser_npx_cache()
if not _m()._npm_lockfile_changed(shared_hermes_root):
diff --git a/tests/hermes_cli/test_cmd_update.py b/tests/hermes_cli/test_cmd_update.py
index 13a2beae7ad..834b13cee98 100644
--- a/tests/hermes_cli/test_cmd_update.py
+++ b/tests/hermes_cli/test_cmd_update.py
@@ -1078,7 +1078,7 @@ class TestNodeRuntimeNpmResolution:
)
with patch(
- "tools.browser_tool.warm_agent_browser_npx_cache", return_value=True
+ "tools.browser_tool_install.warm_agent_browser_npx_cache", return_value=True
):
failed = hm._update_node_dependencies()
assert failed == ["ui-tui, web workspaces"]
@@ -1280,7 +1280,7 @@ class TestUpdateNodeDependencies:
"""The npx cache warm-up is covered by its own dedicated test below;
stub it out everywhere else so it doesn't add a spurious npm/npx
call to the workspace-install assertions in this class."""
- with patch("tools.browser_tool.warm_agent_browser_npx_cache", return_value=True):
+ with patch("tools.browser_tool_install.warm_agent_browser_npx_cache", return_value=True):
yield
def _npm_calls(self, mock_run):
@@ -1468,7 +1468,7 @@ class TestUpdateNodeDependencies:
mock_popen.side_effect = self._make_popen([], returncode=1, stderr_lines=["npm ERR!\n"])
with patch(
- "tools.browser_tool.warm_agent_browser_npx_cache", return_value=True
+ "tools.browser_tool_install.warm_agent_browser_npx_cache", return_value=True
) as mock_warm:
hm._update_node_dependencies()