The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(config): the browser.backend: off notice rides in config_added so quiet hermes update shows it
Teknium5022af1d103a
diff --git a/hermes_cli/config_migrations.py b/hermes_cli/config_migrations.pyindex 893f8161a89..8ed9bd382f6 100644--- a/hermes_cli/config_migrations.py+++ b/hermes_cli/config_migrations.py@@ -773,11 +773,14 @@ def _migrate_to_52(results: dict[str, Any], quiet: bool) -> None:added, messages = [], []if "backend" in browser:backend = browser.pop("backend")- added.append("removed browser.backend")if isinstance(backend, str) and backend.strip().lower() == "off":- messages.append(- " ✓ Removed browser.backend: off — the built-in browser tools are gone and browser_exec is the "- "browser now. To turn browsing off, disable the `browser` toolset in `hermes tools`.")+ # config_added is what `hermes update` re-surfaces on its quiet path, so the notice rides in it.+ note = ("removed browser.backend: off — the built-in browser tools are gone and browser_exec is the "+ "browser now; to turn browsing off, disable the `browser` toolset in `hermes tools`")+ added.append(note)+ messages.append(f" ✓ {note[0].upper()}{note[1:]}.")+ else:+ added.append("removed browser.backend")moved = []for name, value in _agent_browser_env(Path(get_hermes_home())).items():key = dict(_AGENT_BROWSER_ENV_KEYS)[name]diff --git a/tests/hermes_cli/test_config_migration_52_browser.py b/tests/hermes_cli/test_config_migration_52_browser.pyindex cba8e3effd4..9232d3defc0 100644--- a/tests/hermes_cli/test_config_migration_52_browser.py+++ b/tests/hermes_cli/test_config_migration_52_browser.py@@ -53,6 +53,16 @@ def test_backend_off_is_dropped_with_a_notice(tmp_path, monkeypatch, capsys):assert "browser_exec" not in capsys.readouterr().out+def test_quiet_migration_hands_the_notice_to_the_caller(tmp_path, monkeypatch, capsys):+ """`hermes update` migrates quietly and re-prints only ``config_added``; the notice must be in it."""+ monkeypatch.setenv("HERMES_HOME", str(tmp_path / "launch"))+ home = _home(tmp_path / "a", {"_config_version": 51, "browser": {"backend": "off"}})+ results = _migrate(home, quiet=True)+ assert capsys.readouterr().out == ""+ assert any("browser_exec is the browser now" in note and "`browser` toolset" in note+ for note in results["config_added"])++@pytest.mark.parametrize("value", ["", "browser-use", "Browser-Use", None])def test_other_backend_values_are_dropped_silently(tmp_path, monkeypatch, capsys, value):monkeypatch.setenv("HERMES_HOME", str(tmp_path / "launch"))