fix: support packaged memory provider skills - #18842
Conversation
|
+1 |
185c521 to
c54ee88
Compare
|
Rebased this PR onto current Local verification on the rebased commit python -m pytest tests/agent/test_memory_provider.py tests/test_plugin_skills.py -q -o 'addopts='
# 126 passed, 1 warning in 5.30s
python -m ruff check plugins/memory/__init__.py tools/skills_tool.py tests/agent/test_memory_provider.py tests/test_plugin_skills.py
# All checks passed!GitHub still reports no checks for the branch, but the PR is now mergeable ( |
teknium1
left a comment
There was a problem hiding this comment.
Thanks for closing the gap between the documented pip-entry-point path and memory-provider skill registration. The current-main premise is verified: plugins/memory/__init__.py:124-205 only resolves directory providers, while CONTRIBUTING.md:72-80 already describes pip entry-point discovery.
Problems
- The new tests do not cover the combined behavior this PR adds.
tests/agent/test_memory_provider.pytests entry-point loading, andtests/test_plugin_skills.pytests a directory provider registering a skill, but neither verifies an activehermes_agent.memory_providersentry point whoseregister(ctx)callsregister_skill()can be resolved byskill_view("provider:skill").
Suggested changes
- Add that combined regression case using the existing fake-entry-point fixture.
- Document the
hermes_agent.memory_providersgroup and provider-packagedregister_skill()support inwebsite/docs/developer-guide/memory-provider-plugin.md, whose current directory-only layout begins at line 15.
Automated hermes-sweeper review.
| @@ -679,6 +679,92 @@ def test_provider_load_after_cli_discovery(self, tmp_path, monkeypatch): | |||
| assert p.name == "extcliload" | |||
|
|
|||
|
|
|||
| class TestEntryPointMemoryProviderDiscovery: | |||
There was a problem hiding this comment.
Please add an integration regression here for the actual promised combination: an active fake hermes_agent.memory_providers entry point whose register(ctx) invokes both register_memory_provider() and register_skill(), followed by skill_view("entrymem:maintenance"). The separate entry-point and directory-provider skill tests do not cover that path.
c54ee88 to
bc23d41
Compare
|
Thanks for the thorough review — I rebased the PR onto current
Verification: 138 focused provider/skill tests, 15 dashboard memory-provider tests, and 4 agent-initialization tests passed; Ruff and Thanks again for catching the missing end-to-end coverage. |
Summary
hermes_agent.memory_providersentry-point discovery/loading for pip-installed memory providersregister_skill(...)into the plugin skill registryskill_view("provider:skill")misses the plugin registryWhy
Memory providers use the exclusive
plugins.memoryactivation path rather than the generalPluginManager. That means provider packages can register a memory provider, but provider-packaged skills are not visible toskill_view()unless the provider is loaded through another path. This also makes pip-installed memory providers less complete than directory-installed plugins.This keeps the exclusive provider model intact while letting packaged memory providers expose read-only skills such as maintenance/runbook workflows.
Test Plan
python -m pytest tests/test_plugin_skills.py tests/agent/test_memory_provider.py -qruff check plugins/memory/__init__.py tools/skills_tool.py tests/test_plugin_skills.py tests/agent/test_memory_provider.pypython -m compileall -q plugins/memory tools/skills_tool.py tests/test_plugin_skills.py tests/agent/test_memory_provider.pygit diff --check -- plugins/memory/__init__.py tools/skills_tool.py tests/test_plugin_skills.py tests/agent/test_memory_provider.py