Skip to content

The agent that grows with you

fix(plugins): say a live disable leaves wired platform hooks until a restart

unsupportedpastels01337cd1d0b9
diff --git a/hermes_cli/plugins_activation.py b/hermes_cli/plugins_activation.py
index cb834a2ed46..7cbc1d5483f 100644
--- a/hermes_cli/plugins_activation.py
+++ b/hermes_cli/plugins_activation.py
@@ -137,9 +137,11 @@ def reload_running_gateway() -> Optional[dict[str, Any]]:
def gateway_reload_hint(answer: Optional[dict[str, Any]], name: str) -> str:
"""One honest sentence after disabling plugin ``name``, a change only the gateway's re-discovery
- applies (an open session stops running its commands at once)."""
+ applies (an open session stops running its commands at once). Callbacks the plugin already
+ wired into platform adapters outlive a reload (the plugin guide), so a restart still ends those."""
if answer and answer.get("reloaded"):
- return f"The running gateway reloaded its plugins and unloaded {name}."
+ return (f"The running gateway reloaded its plugins and unloaded {name}; platform hooks it already "
+ "wired up stay until a gateway restart (hermes gateway restart).")
if answer is not None: # a gateway answered and refused: say so, with its reason
return (f"The running gateway refused to reload its plugins: {answer.get('error') or 'no reason given'}.\n"
"Only the saved config changed; restart the gateway serving this profile to apply it:\n"
diff --git a/tests/hermes_cli/test_plugins_disable_reaches_gateway.py b/tests/hermes_cli/test_plugins_disable_reaches_gateway.py
index 43474f55061..cd0d8c9172d 100644
--- a/tests/hermes_cli/test_plugins_disable_reaches_gateway.py
+++ b/tests/hermes_cli/test_plugins_disable_reaches_gateway.py
@@ -141,6 +141,8 @@ def test_disable_says_the_running_gateway_unloaded_it(home, monkeypatch, capsys)
out = " ".join(capsys.readouterr().out.split())
assert "running gateway reloaded its plugins and unloaded probe" in out, out
assert "new sessions" not in out, out
+ # callbacks the plugin already wired into platform adapters outlive the reload (plugin guide)
+ assert "platform hooks it already wired up stay until" in out and "hermes gateway restart" in out, out
@pytest.mark.parametrize("reloaded", [True, False])