Hermes 文件结构
容器内 /opt/data(映射宿主机 ./data/data)的系统化文件树。另挂载 /www,当前为空。数据截至 2026-07-10。
📊 目录总览
| 目录 | 大小 | 占比 | 类型 | 作用 |
|---|---|---|---|---|
home/ |
4.5G | 63% | 用户 | 项目 + 工具 + 包缓存 |
state.db* |
765M | 11% | Hermes | 会话 DB + WAL |
.pinchtab/ |
718M | 10% | 工具 | PinchTab 浏览器 Profile |
sessions/ |
433M | 6% | Hermes | 768 个会话 JSON 文件 |
cache/ |
383M | 5% | Hermes | 附件缓存 + 临时 venv |
tmp/ |
125M | 2% | 临时 | SPR 报告中间产物 |
lsp/ |
100M | 1% | Hermes | LSP 语言服务器 |
skills/ |
32M | <1% | Hermes | Skill 文件 + 元数据 |
logs/ |
23M | <1% | Hermes | 自动轮转日志 |
bin/ |
11M | <1% | 工具 | tirith 等辅助脚本 |
| 其他 | ~15M | <1% | output/ plugins/ cron/ scripts/ 等 | |
| 总计 | ~7.2G | 缓存可回收 ~3.5G |
🌳 详细文件树
/opt/data/
│
├─ Hermes 核心文件
│ ├─ config.yaml 全量配置(入口脚本首次创建)
│ ├─ .env 环境变量(API keys 等)
│ ├─ auth.json OAuth 模板
│ ├─ SOUL.md 人格提示词模板
│ ├─ state.db 572M 会话索引 SQLite DB
│ ├─ state.db-wal 193M SQLite WAL(重启后回缩)
│ ├─ state.db-shm 416K SQLite 共享内存
│ ├─ memory_store.db 564K 持久记忆 SQLite
│ ├─ response_store.db 20K 响应缓存 DB
│ ├─ projects.db 44K 项目 DB
│ ├─ kanban.db 112K 看板 DB
│ ├─ verification_evidence.db 32K STDD 验证证据
│ ├─ models_dev_cache.json 2.9M 模型探勘缓存
│ ├─ channel_directory.json 频道 ID 映射
│ ├─ gateway_state.json 接入层状态
│ ├─ processes.json 后台进程追踪
│ ├─ gateway.lock / .pid 进程锁 / PID
│ └─ .hermes_history CLI 命令历史
│
├─ 可清理缓存
│ ├─ .pinchtab/ 718M PinchTab 浏览器 Profile
│ │ ├─ bin/ 19M pinchtab 二进制
│ │ └─ profiles/ 699M Chrome 用户数据
│ ├─ cache/ 383M
│ │ └─ documents/ 383M Telegram 附件 + pptx_venv ~200M
│ └─ tmp/ 125M
│ ├─ spr_all/ 121M SPR 报告临时生成
│ └─ fof500/ 3.2M
│
├─ Hermes 运行数据
│ ├─ sessions/ 433M 768 个会话 JSON
│ ├─ skills/ 32M Skill 文件 + 元数据
│ ├─ logs/ 23M 自动轮转日志
│ ├─ lsp/ 100M 语言服务器
│ ├─ output/ 59M pptx2video 54M 等
│ ├─ bin/ 11M tirith 等
│ ├─ cron/ 1K jobs.json + output/
│ ├─ workspace/ 3.7M
│ ├─ plugins/ 1.1M
│ ├─ scripts/ 432K
│ ├─ wind_raw/ 1.5M
│ └─ (plans/ platforms/ sandboxes/ skins/ hooks/ research/) 空目录
│
├─ 用户 HOME — /opt/data/home/ (4.5G)
│
│ ├─ 项目代码
│ │ ├─ hermes-oracle-at/ 35M
│ │ ├─ stdd/ 15M
│ │ ├─ kc-portfolio-algo-v260524/ 6.4M
│ │ ├─ skill-portfolio-report/ 5.6M
│ │ ├─ open-skills/ 820K
│ │ ├─ hermes-agent-self-evolution/ 688K
│ │ ├─ skill-code-auditor/ 328K
│ │ └─ awesome-hermes-agent/ 244K
│ │
│ ├─ 工具运行时
│ │ ├─ bun-new/bun 97M Bun 二进制
│ │ ├─ trilium-mcp/ 77M (node_modules 68M)
│ │ ├─ bin/ 480K spr 等入口
│ │ ├─ scripts/ 280K
│ │ ├─ www/ 29M
│ │ └─ export/ 15M
│ │
│ ├─ 包管理器缓存
│ │ ├─ .npm/ 1.0G _cacache 410M + _npx 592M
│ │ ├─ .cache/ 1.8G uv 989M + puppeteer 439M + pip 344M
│ │ └─ .bun/ 2.0M
│ │
│ ├─ Python 环境
│ │ ├─ .local/ 1.1G pip install 全局
│ │ └─ .spr-venv/ 525M SPR 独立 venv
│ │
│ └─ 工具配置
│ ├─ .pinchtab/ 43M
│ ├─ .stdd/ 19M
│ ├─ .stdd-venv/ 2.9M
│ ├─ .dspy_cache/ 512K
│ ├─ .agents/ 228K
│ ├─ .cron-reports/ 168K
│ ├─ skills/ 224K
│ └─ .config/ / .bashrc / .ssh/ dotfile
│
└─ /www/ ~0 映射空卷
🔍 关键观察
1. 缓存层 ~3.5G 可回收
| 缓存 | 大小 | 清理方式 |
|---|---|---|
home/.cache/uv/ | 989M | uv cache clean |
home/.npm/ | 1.0G | npm cache clean --force |
home/.cache/pip/ | 344M | pip cache purge |
home/.cache/puppeteer/ | 439M | 直接删除(已解压到 .local) |
.pinchtab/ | 718M | PinchTab 内置清理 / 重建 Profile |
| 合计 | ~3.5G |
2. state.db 膨胀
主体 572M + WAL 193M = 765M。WAL 长时间运行不重启导致增长,正常关闭后回缩。可用 PRAGMA wal_checkpoint(TRUNCATE) 主动回缩。
3. 重复缓存
- playwright/node 同时在 uv cache 和 .local 各存一份(~115M × 2)
- Puppeteer Chrome ZIP 下载(439M)和解压后的浏览器共存
4. 文件来源划分
| 来源 | 路径 |
|---|---|
| 入口脚本(空 volume 首次) | config.yaml .env auth.json SOUL.md sessions/ skills/ state.db |
| Hermes 模块(运行时自动) | workspace/ plugins/ scripts/ hooks/ cron/ logs/ bin/ lsp/ memory_store.db ... |
| 用户安装工具 | home/trilium-mcp/ home/bun-new/ home/bin/ home/www/ home/scripts/ |
| 用户项目 git | home/hermes-oracle-at/ home/stdd/ home/skill-portfolio-report/ |
| 包管理器缓存 | home/.npm/ home/.bun/ home/.cache/ home/.local/ home/.spr-venv/ |
| 工具自建数据 | .pinchtab/ home/.pinchtab/ home/.stdd/ home/.dspy_cache/ home/.agents/ |
— Hermes Agent 维护于 Trilium(v5,2026-07-10)