Releases: AaronWong1999/hermesclaw
Release list
v0.4.0: macOS Support
Added native macOS support via launchd in install.sh. Fixes #7.
HermesClaw v0.3.6 — macOS bash 3 compat + curl|bash stdin fix
修复
🐛 macOS 安装失败 — mapfile: command not found
macOS 自带 bash 3.2(GPL 授权限制),不支持 bash 4+ 内置的 mapfile。安装脚本里所有 3 处 mapfile 调用均已替换为 while IFS= read -r 循环,macOS 开箱可用。
🐛 curl | bash 安装静默中止
set -euo pipefail 下,裸 read 在 stdin 为管道(curl 输出)时返回非零,触发 set -e 立即退出,导致Aborted.出现在用户还没来得及输入任何内容之前。
修复:检测到非 tty stdin 时,把所有交互提示重定向到 /dev/tty,用户仍可正常回答;若 /dev/tty 也不可用(CI / Docker 无终端),则 fallback 到 auto-yes。全部 3 处 read 同时加了 || VAR="" 兜底。
🧪 5 个回归测试
新增 tests/test_install_sh.py,覆盖 mapfile 缺失、bash 语法、read 保底、tty 检测及非交互式 stdin 场景。
感谢 @ShxxxNewBee、@siasbaily、@csloz 报告并诊断这些问题 🙏
HermesClaw v0.3.5 — 遗留服务冲突自动检测
修复
🐛 install.sh:自动检测并禁用旧版 hermes-weixin-bridge 服务
根因:hermes-weixin-bridge.service(旧版 bridge.py)带有 WantedBy=multi-user.target,每次服务器启动都会自动拉起。安装 HermesClaw v3 后如果旧服务仍处于 enabled 状态,会导致新旧两个桥同时运行,出现微信消息重复处理、iLink token 冲突等问题。
修复内容(install.sh):新增 detect_and_disable_legacy_services() 函数,在安装流程的摘要之后、安装依赖之前执行:
- 检测
hermes-weixin-bridge.service是否处于enabled/enabled-runtime/active状态 -y/HERMESCLAW_YES=1(自动模式):自动执行systemctl disable --now- 交互模式:询问用户确认,默认 Y
- disable 后二次验证是否真的生效,失败则打印 warning 并给出手动命令
hermes.service/openclaw.service(gateway 服务)不受影响
注:这是安装脚本级修复,不改变运行时代码,121 tests 全绿。
HermesClaw v0.3.4 — OpenCode 权限修复
v0.3.4 — OpenCode 权限修复
问题
通过微信调用 OpenCode 时,OpenCode 反馈无权限对服务器文件做任何修改,AI 编程功能完全失效。
根因
systemd 服务单元有 ProtectHome=read-only,导致 OpenCode(hermesclaw 的子进程)无法向 /home/ubuntu/ 下任何项目目录写文件,内核直接返回 EPERM。
修复内容
1. systemd 服务单元(install.sh 生成模板)
- 移除
ProtectHome=read-only - 简化
ReadWritePaths=${HOME}(覆盖所有用户项目目录) - 保留
ProtectSystem=strict(系统目录仍受保护)和NoNewPrivileges=true
2. OpenCode 全局配置自动创建(install.sh)
- 安装时自动写入
~/.config/opencode/opencode.json:"permission": "allow" - 消除所有 ACP
session/request_permission提示,无需等待人工确认
3. ACP 策略默认值升级
OPENCODE_PERMISSION_STRATEGY默认值allow_once→allow_always(.env模板和hermesclaw.py代码默认值同步更新)- 即使 ACP 层收到权限请求,也在整个 session 内持久授权
4. ACP 权限选项安全回退修复
- 修复
_select_permission_option的危险回退逻辑:当无法识别任何 option kind 时,原代码会 fallback 到options[0],可能意外选中reject_always - 改为返回
None(outcome: cancelled)并记录 warning,避免静默误操作
升级方式
cd ~/hermesclaw && git pull && sudo systemctl daemon-reload && sudo systemctl restart hermesclaw
# 手动补充 opencode.json(如首次启用 OpenCode):
mkdir -p ~/.config/opencode
echo '{"\":"https://opencode.ai/config.json","permission":"allow"}' > ~/.config/opencode/opencode.json已有安装的用户还需手动更新 /etc/systemd/system/hermesclaw.service,将 ProtectHome=read-only 行删除,并将 ReadWritePaths 改为 /home/ubuntu。
HermesClaw v0.3.3 — ACP 稳定性修复 + 媒体类型精准识别
v0.3.3 Bug Fixes
修复内容
Bug 2:OpenCode ACP 频繁崩溃(cascade 报错)
_get_or_create移出锁外,并增加 最多 3 次、间隔 2 秒的重试机制——对应opencode acp首次启动时 SQLite 数据库初始化失败导致的静默崩溃prompt_blocks超时后设alive=False,下条消息自动创建新 session,不再复用已挂起的进程- ACP
initialize超时从 15 秒提高到 30 秒,兼容 opencode 启动较慢的情况
Bug 1:OpenCode 把文件当成视频描述
build_opencode_prompt改为优先检查file_item/video_item/image_item子键,比 type 数字更可靠_media_mime对文件类型附件(type=5)强制排除video/*MIME,防止 .mp4 文件名导致 LLM 误判
新增测试(4 个)
test_file_item_overrides_video_type_numbertest_prompt_blocks_timeout_marks_session_deadtest_get_or_create_retries_on_crashtest_get_or_create_raises_after_three_failures
121 个测试全绿
注意
Bug 3(OpenClaw 返回 TOOLCALL) 和 Bug 4(OpenClaw 图片 404 NO endpoints) 经日志确认均为 OpenClaw 配置问题,非 HermesClaw 代码 bug——详见 Bug 4 说明。
HermesClaw v0.3.2
v0.3.2 is a follow-up fix release on the current main branch.
- Keeps OpenClaw model configuration under the user's existing OpenClaw settings. HermesClaw does not rewrite the selected OpenClaw model.
- Retains the OpenCode ACP fixes: headless allow-once permission handling, typing indicator, and media/resource forwarding.
- Previous releases remain available: v0.3.1 and v0.3.0.
HermesClaw v0.3.1
Fix release for the v0.3 OpenCode bridge.
- Fix OpenCode ACP headless permission prompts so long tool runs can answer repeated allow-once requests.
- Add OpenCode typing indicators in /opencode and /three modes.
- Forward image/video/file payloads to OpenCode as ACP image/resource blocks where supported, returning OpenCode's own model feedback.
- Keep OpenClaw model configuration under the user's existing OpenClaw settings; HermesClaw does not rewrite OpenClaw's selected model.
- Expand tests to cover /hermes, /openclaw, /opencode, /both, /three, /whoami across text, voice, image, video, and file payloads.
Previous v0.3.0 remains available at the v0.3.0 tag for users who need the earlier behavior.
HermesClaw v0.3.0 — OpenCode ACP Bridge
🆕 What's New in v0.3.0
OpenCode Integration
/opencode— Route messages exclusively to OpenCode CLI for AI coding assistance/three— Broadcast to all three agents simultaneously: Hermes + OpenClaw + OpenCode- Automatic free model selection (
opencode/minimax-m2.5-free) — no API key required - Graceful "not installed" detection: if OpenCode isn't found, users get an install hint
- Persistent per-user ACP subprocess sessions with automatic restart on failure
Architecture
OpenCode uses a direct JSON-RPC 2.0 over NDJSON (ACP) subprocess bridge — no WeChat gateway needed. Hermes and OpenClaw continue to use the existing HTTP proxy queue approach unchanged.
Commands (all 5)
| Command | Action |
|---|---|
/hermes |
Hermes Agent only |
/openclaw |
OpenClaw only |
/opencode |
OpenCode CLI only |
/both |
Hermes + OpenClaw |
/three |
All three |
Tests
76 tests (up from 58), all green, verified locally and on server.
⬅️ Previous Version
If you'd like to stay on v0.2.1 (Hermes + OpenClaw only), you can download it from the v0.2.1 release or check it out:
git checkout v0.2.1
Installation
Run the installer (handles OpenCode detection automatically):
curl -fsSL https://raw.githubusercontent.com/AaronWong1999/hermesclaw/main/install.sh | bashOr manually install OpenCode first:
npm install -g opencode-aiv0.1.0
Full Changelog: https://github.com/AaronWong1999/hermesclaw/commits/v0.1.0