mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-18 04:41:56 +00:00
fix(browser): honor pre-set AGENT_BROWSER_ARGS and document the bypass
Follow-up to the sandbox-bypass env-var fix: - Update the opt-out gate so a user-provided AGENT_BROWSER_ARGS is also respected, not just the legacy AGENT_BROWSER_CHROME_FLAGS. Previously the gate only checked the broken legacy var, so a user who pre-set AGENT_BROWSER_ARGS would still get clobbered by Hermes's auto-injection. - Document AGENT_BROWSER_ARGS in .env.example, the browser feature page, and the env var reference, with notes about the auto-injection on AppArmor-restricted systems (Ubuntu 23.10+, DGX Spark, containers). - Add Anadi Jaggia to AUTHOR_MAP.
This commit is contained in:
parent
8ed2ef6f46
commit
4695d2716f
5 changed files with 23 additions and 1 deletions
|
|
@ -1873,7 +1873,13 @@ def _run_browser_command(
|
|||
# - Ubuntu 23.10+ / AppArmor systems: unprivileged user namespaces
|
||||
# are restricted, causing Chromium to exit with "No usable sandbox"
|
||||
# even for non-root users running under systemd or containers.
|
||||
if "AGENT_BROWSER_CHROME_FLAGS" not in browser_env:
|
||||
# Honour either the legacy AGENT_BROWSER_CHROME_FLAGS (never consumed by
|
||||
# agent-browser itself, but documented in older notes) or the real
|
||||
# AGENT_BROWSER_ARGS — if the user pre-sets either, don't overwrite it.
|
||||
if (
|
||||
"AGENT_BROWSER_ARGS" not in browser_env
|
||||
and "AGENT_BROWSER_CHROME_FLAGS" not in browser_env
|
||||
):
|
||||
_needs_sandbox_bypass = False
|
||||
if hasattr(os, "geteuid") and os.geteuid() == 0:
|
||||
_needs_sandbox_bypass = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue