Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion tests/gateway/test_api_server_toolset.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def test_toolset_includes_web_tools(self):
def test_toolset_includes_core_tools(self):
tools = resolve_toolset("hermes-api-server")
expected = [
"terminal", "process",
"terminal", "process", "read_terminal", "close_terminal",
"read_file", "write_file", "patch", "search_files",
"vision_analyze", "image_generate",
"execute_code", "delegate_task",
Expand All @@ -32,6 +32,25 @@ def test_toolset_includes_core_tools(self):
for tool in expected:
assert tool in tools, f"Missing expected tool: {tool}"

def test_terminal_toolset_is_subset_of_composite(self):
"""Regression #56732: registry-merged terminal tools must appear in the
composite list or _get_platform_tools drops the whole terminal toolset."""
from model_tools import get_tool_definitions # noqa: F401 — register tools

terminal_tools = set(resolve_toolset("terminal"))
api_server_tools = set(resolve_toolset("hermes-api-server"))
assert terminal_tools.issubset(api_server_tools), (
f"hermes-api-server missing terminal members: {terminal_tools - api_server_tools}"
)

def test_api_server_platform_enables_terminal_toolset(self):
"""Default api_server platform config must enable the terminal toolset."""
from hermes_cli.tools_config import _get_platform_tools
from hermes_cli.config import load_config

enabled = _get_platform_tools(load_config(), "api_server")
assert "terminal" in enabled

def test_toolset_includes_browser_tools(self):
tools = resolve_toolset("hermes-api-server")
for tool in ["browser_navigate", "browser_snapshot", "browser_click",
Expand Down
21 changes: 21 additions & 0 deletions tests/toolsets/test_composite_terminal_parity.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
"""Regression: composite hermes-* toolsets must stay in sync with terminal toolset."""

from __future__ import annotations

import pytest


@pytest.fixture(autouse=True)
def _register_tools():
import model_tools # noqa: F401 — force tool discovery


@pytest.mark.parametrize("composite", ["hermes-acp", "hermes-api-server"])
def test_composite_includes_full_terminal_toolset(composite: str) -> None:
from toolsets import resolve_toolset

terminal_tools = set(resolve_toolset("terminal"))
composite_tools = set(resolve_toolset(composite))
assert terminal_tools.issubset(composite_tools), (
f"{composite} missing terminal members: {sorted(terminal_tools - composite_tools)}"
)
4 changes: 2 additions & 2 deletions toolsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@
"description": "Editor integration (VS Code, Zed, JetBrains) — coding-focused tools without messaging, audio, or clarify UI",
"tools": [
"web_search", "web_extract",
"terminal", "process",
"terminal", "process", "read_terminal", "close_terminal",
"read_file", "write_file", "patch", "search_files",
"vision_analyze",
"skills_list", "skill_view", "skill_manage",
Expand All @@ -400,7 +400,7 @@
# Web
"web_search", "web_extract",
# Terminal + process management
"terminal", "process",
"terminal", "process", "read_terminal", "close_terminal",
# File manipulation
"read_file", "write_file", "patch", "search_files",
# Vision + image generation
Expand Down
Loading