From e834ee8971dfd6576f5b31700a9ba8279d11b07a Mon Sep 17 00:00:00 2001 From: "jinli.yl" Date: Wed, 16 Sep 2026 15:22:27 +0800 Subject: [PATCH] feat(plugins): list ReMe and align manifest install support --- hermes_cli/plugins_cmd.py | 9 +++------ plugin-catalog/reme.yaml | 15 +++++++++++++++ tests/hermes_cli/test_plugin_manifest_v2.py | 14 ++++++++++++++ 3 files changed, 32 insertions(+), 6 deletions(-) create mode 100644 plugin-catalog/reme.yaml diff --git a/hermes_cli/plugins_cmd.py b/hermes_cli/plugins_cmd.py index b09b20f303..ee8fea1c92 100644 --- a/hermes_cli/plugins_cmd.py +++ b/hermes_cli/plugins_cmd.py @@ -20,6 +20,7 @@ from hermes_cli._subprocess_compat import noninteractive_git_env from hermes_cli.cli_output import line_input from hermes_cli.config import cfg_get from hermes_cli.plugin_capabilities import _child_dict +from hermes_cli.plugins_manifest import SUPPORTED_MANIFEST_VERSION from hermes_cli.secret_prompt import masked_secret_prompt from utils import atomic_write_text @@ -165,10 +166,6 @@ def _scan_plugin_tree(plugin_dir: Path, identifier: str, *, force: bool, scan_de return result -# Highest ``manifest_version`` this installer understands; breaking schema changes bump it. -_SUPPORTED_MANIFEST_VERSION = 1 - - def _plugins_dir() -> Path: """Return the user plugins directory, creating it if needed.""" plugins = get_hermes_home() / "plugins" @@ -595,11 +592,11 @@ def _check_manifest_version(manifest: dict, plugin_name: str) -> None: raise PluginOperationError( f"Plugin '{plugin_name}' has invalid manifest_version '{mv}' (expected an integer).", ) from None - if mv_int > _SUPPORTED_MANIFEST_VERSION: + if mv_int > SUPPORTED_MANIFEST_VERSION: from hermes_cli.config import recommended_update_command raise PluginOperationError( f"Plugin '{plugin_name}' requires manifest_version {mv}, " - f"but this installer only supports up to {_SUPPORTED_MANIFEST_VERSION}. " + f"but this installer only supports up to {SUPPORTED_MANIFEST_VERSION}. " f"Run {recommended_update_command()} to update Hermes.", ) from None diff --git a/plugin-catalog/reme.yaml b/plugin-catalog/reme.yaml new file mode 100644 index 0000000000..5f64420ba9 --- /dev/null +++ b/plugin-catalog/reme.yaml @@ -0,0 +1,15 @@ +name: reme +repo: https://github.com/agentscope-ai/ReMe +sha: 9ebe17a89d41c599a1c0cef6a67810ba2711717c +subdir: integrations/hermes_agent +description: Local-first, file-native long-term memory with HTTP and embedded ReMe backends. +maintainer: agentscope-ai +tier: community +category: memory +requires_hermes: ">=0.21" +docs_url: https://github.com/agentscope-ai/ReMe/tree/main/integrations/hermes_agent +capabilities: + provides_tools: [] + provides_hooks: [] + provides_middleware: [] + requires_env: [] diff --git a/tests/hermes_cli/test_plugin_manifest_v2.py b/tests/hermes_cli/test_plugin_manifest_v2.py index d31385dbaf..1e8887d9e4 100644 --- a/tests/hermes_cli/test_plugin_manifest_v2.py +++ b/tests/hermes_cli/test_plugin_manifest_v2.py @@ -18,6 +18,7 @@ from hermes_cli.plugins import ( resolve_plugin_load_order, validate_config_schema, ) +from hermes_cli.plugins_cmd import PluginOperationError, _check_manifest_version def _write_plugin(base, name, manifest_extra=None, register_body="pass"): @@ -85,6 +86,19 @@ class TestV1Regression: class TestV2Parsing: + def test_installer_accepts_the_manifest_version_the_loader_supports(self): + _check_manifest_version( + {"manifest_version": SUPPORTED_MANIFEST_VERSION}, + "modern", + ) + + def test_installer_rejects_future_manifest_versions(self): + with pytest.raises(PluginOperationError, match="only supports up to"): + _check_manifest_version( + {"manifest_version": SUPPORTED_MANIFEST_VERSION + 1}, + "future", + ) + def test_v2_fields_parse(self, hermes_home): _write_plugin( hermes_home / "plugins", "modern",