fix: plugin toolsets invisible in hermes tools and standalone processes#3457
Merged
fix: plugin toolsets invisible in hermes tools and standalone processes#3457
Conversation
hermes tools and _get_platform_tools() call get_plugin_toolsets() / _get_plugin_toolset_keys() without first ensuring plugins have been discovered. discover_plugins() only runs as a side effect of importing model_tools.py, which hermes tools never does. This means: - hermes tools TUI never shows plugin toolsets (invisible to users) - _get_platform_tools() in standalone processes misses plugin toolsets Fix: call discover_plugins() (idempotent) in both _get_plugin_toolset_keys() and _get_effective_configurable_toolsets() before accessing plugin state. In the gateway/CLI where model_tools.py is already imported, the call is a no-op (discover_and_load checks _discovered flag).
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Plugin toolsets never appeared in the
hermes toolsTUI or any standalone process that reads plugin state without first importingmodel_tools.py.Root cause:
discover_plugins()only runs as a side effect of importingmodel_tools.py(line 181-182). Thehermes toolscommand and_get_platform_tools()callget_plugin_toolsets()/_get_plugin_toolset_keys()without ensuring plugins have been discovered first. The plugin manager singleton exists but has never scanned~/.hermes/plugins/, so_plugin_tool_namesis empty and all plugin queries return[].Impact:
hermes toolsTUI never shows plugin toolsets — users can't see or toggle themmodel_tools.pyis imported misses plugin toolsetsFix: Call
discover_plugins()(idempotent — checks_discoveredflag) in both_get_plugin_toolset_keys()and_get_effective_configurable_toolsets()before accessing plugin state. In the gateway/CLI wheremodel_tools.pyis already imported, the call is a no-op.Context
Reported by community member (pistrie) on Discord — installed two plugins (brave-search, web-extract),
/pluginsshowed them loaded, but they never appeared inhermes toolsoutput or in the agent's tool list.Test plan
python3 -m pytest tests/hermes_cli/test_tools_config.py tests/test_plugins.py -o 'addopts=' -q— 29 passed