Skip to content
Merged
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
11 changes: 10 additions & 1 deletion tests/hermes_cli/test_tools_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,16 @@ def test_get_platform_tools_preserves_explicit_empty_selection():

enabled = _get_platform_tools(config, "cli")

assert enabled == set()
# An explicit empty list disables every CONFIGURABLE toolset (web,
# terminal, memory, …). Non-configurable platform toolsets that ride
# along on the platform's default composite (e.g. `kanban`, whose tools
# live in _HERMES_CORE_TOOLS but aren't user-toggleable) are still
# auto-recovered by _get_platform_tools so saving via `hermes tools`
# doesn't silently drop them. The contract this test guards is the
# configurable side: nothing the user could have checked in the TUI
# checklist should reappear here.
configurable = {ts_key for ts_key, _, _ in CONFIGURABLE_TOOLSETS}
assert enabled.isdisjoint(configurable)


def test_apply_toolset_change_from_default_does_not_enable_default_off_toolsets():
Expand Down
7 changes: 5 additions & 2 deletions tests/test_tui_gateway_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ def test_load_enabled_toolsets_rejects_disabled_mcp_env(monkeypatch, capsys):
)
monkeypatch.setattr(config_mod, "load_config", lambda: {"platform_toolsets": {"cli": ["memory"]}})

assert server._load_enabled_toolsets() == ["memory"]
# Sorted: ["kanban", "memory"]. `kanban` is auto-recovered by
# _get_platform_tools because it's a non-configurable platform toolset
# whose tools live in hermes-cli's universe (see toolsets.py).
assert server._load_enabled_toolsets() == ["kanban", "memory"]
err = capsys.readouterr().err
assert "ignoring disabled MCP servers" in err
assert "mcp-off" in err
Expand All @@ -134,7 +137,7 @@ def test_load_enabled_toolsets_falls_back_when_tui_env_invalid(monkeypatch, caps

monkeypatch.setattr(config_mod, "load_config", lambda: {"platform_toolsets": {"cli": ["memory"]}})

assert server._load_enabled_toolsets() == ["memory"]
assert server._load_enabled_toolsets() == ["kanban", "memory"]
assert "using configured CLI toolsets" in capsys.readouterr().err


Expand Down
1 change: 1 addition & 0 deletions tests/tools/test_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ def test_matches_previous_manual_builtin_tool_set(self):
"tools.file_tools",
"tools.homeassistant_tool",
"tools.image_generation_tool",
"tools.kanban_tools",
"tools.memory_tool",
"tools.mixture_of_agents_tool",
"tools.process_registry",
Expand Down
Loading