Skip to content

fix(plugins): show entry-point plugins in 'hermes plugins list' (#58644) - #59234

Closed
iacker wants to merge 1 commit into
NousResearch:mainfrom
iacker:fix/58644-plugins-list-entry-points
Closed

fix(plugins): show entry-point plugins in 'hermes plugins list' (#58644)#59234
iacker wants to merge 1 commit into
NousResearch:mainfrom
iacker:fix/58644-plugins-list-entry-points

Conversation

@iacker

@iacker iacker commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

hermes plugins list did not show pip-installed plugins registered via the
hermes_agent.plugins entry-point group. Those plugins are loaded and
active
(the real loader PluginManager.discover_and_load() scans entry
points) — they were just invisible in the listing, including --json and
--plain output.

Root cause: two separate discovery paths. The loader scans directories and
entry points; the display helper _discover_all_plugins() in
hermes_cli/plugins_cmd.py scanned only bundled + user directories.

Related Issue

Fixes #58644

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)

Changes Made

  • hermes_cli/plugins_cmd.py_discover_all_plugins() now also scans
    entry-point plugins by reusing PluginManager._scan_entry_points()
    (rather than duplicating the importlib.metadata logic). Entry-point
    plugins have no directory, so their tuple carries dir_path=None; the
    render, filter, and resolve paths already ignore that element. setdefault
    keeps directory plugins winning on key collision, matching
    discover_and_load() precedence.
  • tests/hermes_cli/test_plugins_cmd_list.py — regression test asserting an
    entry-point plugin surfaces in the display path and resolves for
    enable/disable, with dir_path=None.

How to Test

Reproduce (before fix): a pip plugin registering a hermes_agent.plugins
entry point (e.g. rtk-hermes) is loaded and rewriting commands, but absent
from hermes plugins list / --json / --plain.

Automated:

pytest tests/hermes_cli/test_plugins_cmd_list.py -q

The new test_discover_all_plugins_includes_entry_points fails on main
(entry points never reach the display path) and passes with this change.

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix
  • I've run the impacted tests and all pass (125 passed across the three
    plugins_cmd suites)
  • I've added tests for my changes
  • I've tested on my platform: macOS 26.5.1, Python 3.13

Documentation & Housekeeping

  • N/A — no docs/config/schema/tool-behavior changes

_discover_all_plugins() (the display path for 'hermes plugins list')
scanned only bundled and user directories, so pip-installed plugins
registered via the hermes_agent.plugins entry-point group were loaded
and active but invisible in the listing (--json and --plain included).

Reuse the loader's PluginManager._scan_entry_points() instead of
duplicating the importlib.metadata logic. Entry-point plugins have no
directory, so their tuple carries dir_path=None; the render, filter, and
resolve paths already ignore that element, so listing/JSON/enable all
work. setdefault keeps directory plugins winning on key collision,
matching discover_and_load() precedence.
@alt-glitch alt-glitch added type/bug Something isn't working comp/cli CLI entry point, hermes_cli/, setup wizard comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have duplicate This issue or pull request already exists labels Jul 5, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Duplicate of #23814 (earliest-open canonical) — same fix: mirror PluginManager._scan_entry_points() into _discover_all_plugins() so pip-installed entry-point plugins show in hermes plugins list. This is also the exact same change as the same-day twin #58645. Consolidating on #23814; keeping #58644 open as the issue.

@iacker

iacker commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

Closing as duplicate of #23814 per triage bot — canonical PR addresses the same issue.

@iacker iacker closed this Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/plugins Plugin system and bundled plugins duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(plugins): entry-point plugins missing from 'hermes plugins list'

2 participants