fix(plugins): show entry-point plugins in 'hermes plugins list' - #58645
Closed
MrGDCrazy wants to merge 1 commit into
Closed
fix(plugins): show entry-point plugins in 'hermes plugins list'#58645MrGDCrazy wants to merge 1 commit into
MrGDCrazy wants to merge 1 commit into
Conversation
_discover_all_plugins() in plugins_cmd.py only scanned bundled and user directories, missing pip-installed plugins registered via the hermes_agent.plugins entry-point group. PluginManager.discover_and_load() already scans entry points correctly — the display path just didn't match. Added _discover_entry_point_plugins() mirroring _scan_entry_points, and appended its results to the seen dict after directory scanning. Patched 3 existing tests to mock the new function (return []), plus 2 new tests covering entry-point discovery and integration. Fixes #58644
Collaborator
Duplicate of #23814 — same fix: mirror |
9 tasks
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
hermes plugins listwas missing pip-installed plugins that register via thehermes_agent.pluginsentry-point group. The plugins were loaded and active (PluginManager.discover_and_load scans entry points correctly) — they just didn't appear in the list output because the display path (_discover_all_pluginsinplugins_cmd.py) only scanned directories.Root cause
Two separate discovery paths diverged:
plugins.pyPluginManager._scan_entry_pointsplugins_cmd.py_discover_all_pluginsFix
Added
_discover_entry_point_plugins()inplugins_cmd.pymirroringPluginManager._scan_entry_points, and appended its results to the seen dict after directory scanning (entry-points don't override directory plugins on key collision).Testing
_discover_entry_point_plugins(return[]) so they stay isolated from real pip-installed pluginstest_discover_entry_point_plugins_returns_tuples,test_discover_all_plugins_includes_entry_pointstest_plugin_runtime_disable_gate.pyare unrelated (missing pytest-asyncio)Verification
Before:
After:
Fixes #58644