diff --git a/hermes_cli/web_server.py b/hermes_cli/web_server.py index b733d7ad79c9..a9a4a0e3f746 100644 --- a/hermes_cli/web_server.py +++ b/hermes_cli/web_server.py @@ -671,7 +671,7 @@ _SCHEMA_OVERRIDES: Dict[str, Dict[str, Any]] = { "approvals.mode": { "type": "select", "description": "Dangerous command approval mode", - "options": ["ask", "yolo", "deny"], + "options": ["manual", "smart", "off"], }, "context.engine": { "type": "select", diff --git a/tests/hermes_cli/test_web_server.py b/tests/hermes_cli/test_web_server.py index 8caffe2dbdb3..16c13450534a 100644 --- a/tests/hermes_cli/test_web_server.py +++ b/tests/hermes_cli/test_web_server.py @@ -3539,6 +3539,26 @@ class TestBuildSchemaFromConfig: assert "options" in entry assert "local" in entry["options"] + def test_approvals_mode_options_match_config_values(self): + """approvals.mode select options must match the values accepted by config.py. + + Previously the dashboard showed ['ask', 'yolo', 'deny'] which are stale + names that don't correspond to any real config value. The correct values + are 'manual', 'smart', and 'off' (see hermes_cli/config.py). + 'smart' was missing entirely, making it unreachable from the UI. + """ + from hermes_cli.web_server import CONFIG_SCHEMA + entry = CONFIG_SCHEMA["approvals.mode"] + assert entry["type"] == "select" + options = entry["options"] + assert "manual" in options, "'manual' missing from approvals.mode options" + assert "smart" in options, "'smart' missing from approvals.mode options" + assert "off" in options, "'off' missing from approvals.mode options" + # Stale names that were previously shown but don't match config values + assert "ask" not in options, "stale option 'ask' should not appear" + assert "yolo" not in options, "stale option 'yolo' should not appear" + assert "deny" not in options, "stale option 'deny' should not appear" + def test_empty_prefix_produces_correct_keys(self): from hermes_cli.web_server import _build_schema_from_config test_config = {"model": "test", "nested": {"key": "val"}}