The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(config): drop browser.extension_control (default and v52 migration)
Teknium0f8bbed1ed3b
diff --git a/cli-config.yaml.example b/cli-config.yaml.exampleindex bb85f798629..6cff28aedbf 100644--- a/cli-config.yaml.example+++ b/cli-config.yaml.example@@ -614,11 +614,6 @@ browser:# Inactivity timeout in seconds - browser sessions are automatically closed# after this period of no activity between agent loops (default: 120 = 2 minutes)inactivity_timeout: 120- # Let an authenticated browser extension register as the controller for an- # existing Hermes session. Disabled by default. Local API registration also- # requires the API server bearer key to be configured.- extension_control:- enabled: false# Local Chromium for browser_exec. Empty executable_path = pm's chromium# (`hermes pm install chromium`), the Docker image's build, or a systemdiff --git a/hermes_cli/config_defaults.py b/hermes_cli/config_defaults.pyindex 885aebceb04..69f5eefc2f8 100644--- a/hermes_cli/config_defaults.py+++ b/hermes_cli/config_defaults.py@@ -475,11 +475,6 @@ DEFAULT_CONFIG = {# Read by the `camofox` catalog plugin (Camofox left core). An empty free-form mapping, so# `hermes config set browser.camofox.<key>` is accepted and user values are never stripped."camofox": {},- # Authenticated browser-extension controller lane: a registered extension can become the- # exact controller for a session's browser_cdp calls (fail-closed once bound). Local API- # registration also requires the API server bearer key. developer_mode gates the privileged- # browser_cdp capabilities.- "extension_control": {"enabled": False, "developer_mode": False},},# Stale git worktree lifecycle (`hermes -w`, `/worktree new`, subagent isolation, Desktop). The# sweep runs at `hermes -w` startup and every 6h from the cron ticker over every repo Hermes madediff --git a/hermes_cli/config_migrations.py b/hermes_cli/config_migrations.pyindex 89e0bad8a27..09ceee0c1fc 100644--- a/hermes_cli/config_migrations.py+++ b/hermes_cli/config_migrations.py@@ -781,7 +781,8 @@ def _migrate_to_52(results: dict[str, Any], quiet: bool) -> None:# this home's .env gave agent-browser move to the browser.* keys the launcher reads, never over# a value that already won over them (:func:`_config_decided`). .env itself is left alone. Camofox left core in the same release: a home# running it is recorded now, from its pre-v52 files, so its left-core row converts it later- # while a newer home that installs the camofox plugin itself keeps browser_exec.+ # while a newer home that installs the camofox plugin itself keeps browser_exec. The+ # browser-extension control lane dispatched to the removed tools, so its key goes too.from pathlib import Pathfrom hermes_cli.left_core_migration import record_core_use@@ -801,6 +802,9 @@ def _migrate_to_52(results: dict[str, Any], quiet: bool) -> None:messages.append(f" ✓ {note[0].upper()}{note[1:]}.")else:added.append("removed browser.backend")+ if "extension_control" in browser:+ browser.pop("extension_control")+ added.append("removed browser.extension_control")moved = []for name, value in _agent_browser_env(Path(get_hermes_home())).items():key = dict(_AGENT_BROWSER_ENV_KEYS)[name]@@ -970,7 +974,8 @@ MIGRATIONS: tuple[tuple[int, Callable[[dict[str, Any], bool], None]], ...] = ("admitted to the target profile's running gateway and tracked by receipt, so cron no ""longer runs (or times out) a Bot Chat turn of its own."),extra_guard=lambda raw: "bot_chat_delivery_timeout_seconds" in raw)),- # 51 -> 52: browser.backend dropped, AGENT_BROWSER_* .env settings -> browser.* (see _migrate_to_52).+ # 51 -> 52: browser.backend + browser.extension_control dropped, AGENT_BROWSER_* .env settings ->+ # browser.* (see _migrate_to_52).(52, _migrate_to_52),)diff --git a/scripts/ci/docs_drift_baseline.json b/scripts/ci/docs_drift_baseline.jsonindex 866f5c8de26..8d94ee11904 100644--- a/scripts/ci/docs_drift_baseline.json+++ b/scripts/ci/docs_drift_baseline.json@@ -18,7 +18,6 @@"attachments.storage","bot_mode.turn_wait_seconds","browser.allow_unsafe_evaluate",- "browser.extension_control.developer_mode","compression.abort_on_summary_failure","compression.max_attempts","computer_use.ax_max_elements",diff --git a/tests/hermes_cli/test_config_migration_52_browser.py b/tests/hermes_cli/test_config_migration_52_browser.pyindex 4dae49a327b..f24b1fc3bb9 100644--- a/tests/hermes_cli/test_config_migration_52_browser.py+++ b/tests/hermes_cli/test_config_migration_52_browser.py@@ -184,3 +184,16 @@ def test_profiles_are_islands_a_b_a(tmp_path, monkeypatch, capsys):assert _raw(b)["browser"] == {"inactivity_timeout": 300}assert "browser_exec" not in out_b and "agent-browser" not in out_bassert "browser_exec" not in out_a2 and "agent-browser" not in out_a2++[email protected]("stamp", [51, None])+def test_extension_control_block_is_dropped(tmp_path, monkeypatch, stamp):+ """Browser-extension control left with the built-in browser tools; nothing reads the key now."""+ monkeypatch.setenv("HERMES_HOME", str(tmp_path / "launch"))+ config = {"browser": {"extension_control": {"enabled": True, "developer_mode": False}, "headed": True}}+ if stamp is not None:+ config["_config_version"] = stamp+ home = _home(tmp_path / "a", config)+ results = _migrate(home, quiet=True)+ assert _raw(home)["browser"] == {"headed": True}+ assert "removed browser.extension_control" in results["config_added"]