Skip to content

feat(images): add opt-in Hermes tools image for OpenShell 0.1.x - #75

Merged
derekhsu merged 2 commits into
feat/image-only-clifrom
issue/74-hermes-tools-image
Nov 17, 2026
Merged

derekhsu merged 2 commits into
feat/image-only-clifrom
issue/74-hermes-tools-image

Conversation

@derekhsu

@derekhsu derekhsu commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

Summary

新增可選用的 Hermes tools 映像(OpenShell 0.1.x):把 OpenClaw tools 映像的文件、PDF/OCR、影音、瀏覽器與 workspace 工具疊在以 digest 固定的 Hermes 映像上,並加上 amd64/arm64 驗證與 fork 發布流程。部署端要明確選用才會改用;既有 Hermes 映像與 OpenClaw tools 映像的行為不變。

Related Issue

Refs #74(第一階段。Hermes browser 工具的啟用與網路政策是下一階段,issue 保持開啟。)

Changes

  • agents/hermes-01x/Dockerfile.tools:base 為 openshell01x-hermes-0.21.3-2026.11.13,以 tag 加 index digest 固定。共用 tools/openclaw-tools-image/ 的套件清單,不含 OpenClaw 的 himalaya skill 與 openclaw.json 設定。Python 套件裝在系統 Python,以 /usr/bin/python3 執行。映像的 PATH 把 Hermes venv 放在前面,改 PATH 會讓 Env 與 base 不同;裝進 Hermes venv 又會和 Hermes 鎖定的套件版本衝突。
  • 共用 fixture 加上 agent 參數(run-fixtures.sh IMAGE OUT [openclaw|hermes],預設 openclaw)。需求來源是兩個映像共用同一套工具與檢查;不加參數的話,要複製約 600 行 fixture。Hermes 模式:
    • OpenClaw 專屬的 himalaya_skill_override、browser_config 記為 SKIP。
    • tmux 與 expat 2.9.0 只對 OpenClaw 檢查;Hermes base 沒有 tmux,受控的 expat 是 libexpat1=2.8.3-1,由 controlled_packages 檢查。
    • 新增 hermes_python 檢查(python3 仍是 Hermes venv,且 venv 匯入不到 tools 套件)與 agent_browser 檢查(base 的 agent-browser 能用 /usr/lib/chromium/chromium 開頁並讀取內容)。
  • check-image.sh:版本比對依 agent 執行(openclaw --version 或 hermes --version)。新增特權檔案檢查:tools layer 新增的 setuid、setgid、file capability 檔案必須列在 tools/openclaw-tools-image/privileged-files-added.txt,目前只有 dbus-daemon-launch-helper 與 gst-ptp-helper。OpenClaw 也套用這項檢查。
  • base_security_checks:dpkg --audit 先存進變數再判斷,指令失敗時檢查會失敗(fix(images): tools fixture 的 dpkg --audit 在讀不到 dpkg 資料時仍判定通過 #30)。
  • agents/hermes-01x/check-tools-start.sh:base 與 tools 映像以相同限制啟動(無網路、--cap-drop ALL、no-new-privileges),比對容器狀態、啟動輸出、/tmp/nemoclaw-start.log 與 process 清單。
  • .github/workflows/hermes-tools-image-verify.yaml:PR 時在 amd64/arm64 原生 runner 驗證,不推送映像。
  • .github/workflows/hermes-01x-tools-image.yaml 與 scripts/hermes-tools-image-release.sh:手動發布 <base tag>-tools.<n> 加 -amd64/-arm64。只在 derekhsu/NemoClaw 的 feat/image-only-cli 執行,不覆寫既有 tag,不寫入 base 的 tag;先在未登入的狀態下跑完檢查再推送;layer 上限 115(fix(hermes-01x): 映像 130 層超過 Docker 125 層上限,Docker 主機無法拉取 #70)。由 test/hermes-tools-image-release.test.ts 保護。
  • tools/openclaw-tools-image/python/requirements.lock:只把 soupsieve 從 3.0.4 更新到 4.1.1。CVE-2026-126190(HIGH,4.0.0 修正)讓 OpenClaw 與 Hermes 的 Trivy 關卡都失敗;beautifulsoup4 4.15.0 與 markitdown 0.1.9 在 4.1.1 下可正常解析。
  • 文件:docs/modification/2026-11-17-hermes-tools-image.md、agents/hermes-01x/README.md,以及 OpenClaw tools 文件的共用 fixture 說明。

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • Docs updated for user-facing behavior changes
  • Docs not applicable — justification:
  • Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging)
  • Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification:
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

Documentation Writer Review

  • Documentation writer subagent reviewed the completed changes
  • Result: docs-updated
  • Evidence: docs/modification/2026-11-17-hermes-tools-image.md, docs/modification/2026-10-31-openclaw-tools-image.md, agents/hermes-01x/README.md
  • Agent: Claude Code

DGX Station Hardware Evidence

  • Tested on DGX Station
  • Tested commit:
  • Station profile/scenario:
  • Result:
  • Supporting evidence:

Verification

  • PR description includes a Signed-off-by: line and every commit appears as Verified in GitHub
  • Normal pre-commit, commit-msg, and pre-push hooks passed, or npm run validate:pr passed after refreshing origin/main when hooks were skipped or unavailable
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — command/result or justification: npx vitest run test/hermes-tools-image-release.test.ts test/openclaw-image-release.test.ts → 81 passed;在本機 arm64 試建置映像上:check-image.sh <base> <tools> <out> hermes 通過;check-tools-start.sh → startup matches the base image;run-fixtures.sh <tools> <out> hermes → phase 2、phase 3 皆 0 failed;拿掉允許清單的 dbus 項目後 check-image.sh 失敗(exit 1)
  • Applicable broad gate passed — npm test for broad runtime/test-harness changes; npm run check for repo-wide validation/coverage changes — command/result:
  • Quality Gates section completed with required justifications or waivers
  • No secrets, API keys, or credentials committed
  • npm run docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

尚未完成的驗證:amd64 的 fixture、啟動比對與 agent-browser 由本 PR 的 CI 執行;OpenShell 0.1.7 sandbox 實機驗收(running、managed startup 與 API runtime、NoNewPrivs、LibreOffice process 峰值 #32)在合併後進行。


Signed-off-by: Derek Hsu derekhsu@hotmail.com

🤖 Generated with Claude Code

Add agents/hermes-01x/Dockerfile.tools, which layers the OpenClaw tools
image's document, PDF/OCR, media, browser, and workspace tools onto a
digest-pinned Hermes image. The Python packages go into the system
interpreter and run as /usr/bin/python3, so PATH and the Hermes virtual
environment stay unchanged.

The shared tools fixtures take an agent argument; OpenClaw stays the
default. check-image.sh now compares the agent version and rejects
setuid, setgid, or file-capability files that the tools layer adds
outside privileged-files-added.txt. base_security_checks fails when
dpkg --audit fails (#30).

New workflows verify the image on amd64 and arm64 and publish
<base tag>-tools.<n> from feat/image-only-cli without overwriting tags.
The Hermes browser tool is configured in a later change.

Refs #74

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derekhsu derekhsu self-assigned this Nov 17, 2026
The Trivy gate of both tools image verify workflows rejects soupsieve
3.0.4 (HIGH, fixed in 4.0.0). Update only soupsieve in requirements.lock
to 4.1.1; beautifulsoup4 4.15.0 and markitdown 0.1.9 work with it.

Refs #74

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derekhsu
derekhsu merged commit 0f321f5 into feat/image-only-cli Nov 17, 2026
61 of 63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant