词元之母TOK.MOM - 平台充值汇率 1:1 即 1 人民币充值到账 1 美元,支持一个 Key 调用近 600+ 海内外模型,限时特价模型低至 1 折,欢迎上岸!
| 要求 | 说明 |
|---|---|
| Git | 需支持 --recurse-submodules,并安装 git-lfs 扩展 |
| Python 3.11+ | 若未安装,uv 会自动安装 |
| uv | 高速 Python 包管理器(安装) |
| Node.js 20+ | 可选 — 浏览器工具和 WhatsApp bridge 需要(与根目录 package.json engines 字段一致) |
logger.warning()/logger.error() 并设置 exc_info=True~/.hermes — 代码路径使用 hermes_constants 中的 get_hermes_home(),面向用户的消息使用 display_hermes_home()。完整规则参见 AGENTS.md。/chat 标签页)仅支持 WSL2。原生 Windows 路径较新且迭代较快 — 如果您主要在 Windows 上开发,请做好遇到并修复粗糙边缘的准备。signal.SIGKILL 引用。 Windows 上未定义该信号。请通过 gateway.status.terminate_pid(pid, force=True)(集中式原语,Windows 上执行 taskkill /T /F,POSIX 上发送 SIGKILL)路由,或使用 getattr(signal, "SIGKILL", signal.SIGTERM) 回退。os.kill(pid, 0) 探测时同时捕获 OSError 和 ProcessLookupError。 Windows 对已消失的 PID 抛出 OSError(WinError 87,"参数不正确"),而非 ProcessLookupError。os.setsid、os.killpg、os.getpgid、os.fork 在 Windows 上均会抛出异常 — 使用 if sys.platform != "win32": 或 if os.name != "nt": 进行条件判断。encoding="utf-8"。 Windows 上 Python 默认使用系统区域设置(通常为 cp1252),处理非拉丁字符时会出现乱码或崩溃。pathlib.Path / os.path.join,不得手动用 / 拼接路径。 这对我们构造后传给子进程的字符串尤为重要,而非 OS 返回给我们的字符串。termios 和 fcntl 仅适用于 UnixImportError 和 NotImplementedError:.env 文件:os.setsid()、os.killpg() 以及信号处理在各平台间存在差异:pathlib.Path 代替用 / 进行字符串拼接。| 层级 | 实现方式 |
|---|---|
| sudo 密码管道 | 使用 shlex.quote() 防止 shell 注入 |
| 危险命令检测 | tools/approval.py 中的正则表达式模式,配合用户审批流程 |
| Cron prompt 注入 | 扫描器阻断指令覆盖模式 |
| 写入拒绝列表 | 受保护路径通过 os.path.realpath() 解析,防止符号链接绕过 |
| Skill 守卫 | 对 hub 安装的 skill 进行安全扫描 |
| 代码执行沙箱 | 子进程运行时剥离 API 密钥 |
| 容器加固 | Docker:删除所有 capability, 禁止权限提升,限制 PID 数量 |
shlex.quote()os.path.realpath() 解析符号链接fix/description # Bug 修复
feat/description # 新功能
docs/description # 文档
test/description # 测试
refactor/description # 代码重构pytest tests/ -vhermes 并验证您修改的代码路径<type>(<scope>): <description>| 类型 | 适用场景 |
|---|---|
fix | Bug 修复 |
feat | 新功能 |
docs | 文档 |
test | 测试 |
refactor | 代码重构 |
chore | 构建、CI、依赖更新 |
cli、gateway、tools、skills、agent、install、whatsapp、securityfix(cli): prevent crash in save_config_value when model is a string
feat(gateway): add WhatsApp multi-user session isolation
fix(security): prevent shell injection in sudo password pipinghermes version)、完整错误堆栈