Repository navigation
feat(images): turn on the Hermes browser tools in the tools image - #76
Merged
Merged
Conversation
In tools.1, uvx is on PATH and browser.backend is unset, so Hermes uses the Browser Use CLI: the model gets browser_exec, which first fetches browser-use from PyPI with `uvx browser-use`. Hermes' built-in browser tools would not work either, because Chromium exits in an OpenShell sandbox without extra flags. The tools layer now sets browser.backend to "off" so Hermes runs its built-in browser tools on the pinned agent-browser and the image's Chromium, and seals config.yaml again the way the base image does. /etc/chromium.d/nemoclaw-openshell adds --no-sandbox, --no-zygote, and --disable-gpu, which OpenShell's seccomp requires. Network access still needs a policy rule for /usr/lib/chromium/chromium. The agent_browser fixture now runs agent-browser with no settings of its own, and a new hermes_browser_backend fixture checks the backend, the config seal, and that Hermes offers the built-in tools. Refs #74 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
讓 Hermes tools 映像的 browser 工具在 OpenShell 0.1.x 可用。tools.1 有
uvx且browser.backend未設定,Hermes 因此走 Browser Use CLI:模型拿到browser_exec,第一次使用時以uvx browser-use從 PyPI 下載套件;改用內建 browser 工具時,Chromium 在 OpenShell 裡又會啟動即結束。本 PR 讓 Hermes 改用內建的 browser 工具(映像內鎖版本的 agent-browser 與 Chromium),並加上 OpenShell 需要的 Chromium 參數。Related Issue
Refs #74(Slice 2。合併後發布
tools.2並實機驗收,再回報 #74。)Changes
agents/hermes-01x/Dockerfile.tools:/etc/chromium.d/nemoclaw-openshell(root、644),讓 Debian 的/usr/bin/chromium包裝腳本加上--no-sandbox --no-zygote --disable-gpu。OpenShell 的 seccomp 不允許 Chromium 自己的 sandbox 與 zygote 建立 user namespace;Hermes 只在 root 或 Docker 下才會自己加--no-sandbox。放在/etc/chromium.d而不是 Hermes 的.env:不改映像Env、不受 ClawShell 改寫設定影響。agents/hermes-01x/configure-tools-browser.py在config.yaml加入browser.backend: "off",再依agents/hermes-01x/Dockerfile的方式重算/etc/nemoclaw/hermes.config-hash與/sandbox/.hermes/.config-hash;MCP digest 由 base 的build-hermes-mcp-digest.py重新計算並要求與原值相同。建置時也以 Hermes 自己的get_browser_backend()/is_browser_use_cli_mode()確認結果。仍是 3 個 RUN,不新增 layer。agents/hermes-01x/configure-tools-browser.py:只在唯一的頂層browser:區塊後插入一行,保留註解與順序;已設定 backend、沒有或重複的browser:區塊、空區塊都拒絕且不改檔案。由test/hermes-tools-browser-config.test.ts保護。agent_browser:不帶任何 agent-browser 設定開頁,並確認 Chromium process 帶著--no-sandbox --no-zygote、參數檔為root:root 644。hermes_browser_backend(Hermes 才執行):backend: "off"、設定 hash 相符、兩份 hash 相同、Hermes 提供內建 browser 工具而非 Browser Use CLI。docs/modification/2026-11-17-hermes-tools-image.md第 3.3 節(設定、network policy 規則寫法與tls: skip、Hermes 本機模式不需 SSRF 例外、關閉 Chromium sandbox 的代價、tools.1 的限制)與實機驗收結果;agents/hermes-01x/README.md。Type of Change
Quality Gates
Documentation Writer Review
docs-updateddocs/modification/2026-11-17-hermes-tools-image.md,agents/hermes-01x/README.mdDGX Station Hardware Evidence
Verification
Signed-off-by:line and every commit appears asVerifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run validate:prpassed after refreshingorigin/mainwhen hooks were skipped or unavailablenpx vitest run test/hermes-tools-browser-config.test.ts test/hermes-tools-image-release.test.ts→ 36 passed。OpenShell 0.1.7 實機(Podman、arm64,tools.1 加上本 PR 相同的建置步驟):phase 2/3 fixture 0 failed;sandbox 到running(啟動時設定完整性檢查通過);ClawShell 寫入模型設定後browser.backend仍為 off;Hermesbrowser_navigate開放行的網站得到Example Domain,未放行的網站得到net::ERR_NETWORK_ACCESS_DENIEDnpm testfor broad runtime/test-harness changes;npm run checkfor repo-wide validation/coverage changes — command/result:npm run docsbuilds without warnings (doc changes only)安全考量:關閉 Chromium 自己的 sandbox 後,renderer 被攻破時取得的是 sandbox 使用者(uid 998)在 sandbox 內的權限;外層仍由 OpenShell 的 seccomp、Landlock、
no_new_privs(實測NoNewPrivs: 1)與 network policy 隔離,每個網站都要明確放行,API profile 一律拒絕 browser 工具。本 PR 不新增 network policy;規則由 ClawShell 管理。Signed-off-by: Derek Hsu derekhsu@hotmail.com
🤖 Generated with Claude Code