从linux实例导出,注入windows实例

整体架构

┌──────────────────────────────────────────────────────────────────────────┐
│                          Hermes 实例迁移全景                              │
├─────────────────────────────────────┬────────────────────────────────────┤
│     🐧 Linux 源实例 (全配置)         │     🪟 Windows 新实例 (刚装)       │
├─────────────────────────────────────┼────────────────────────────────────┤
│                                     │                                    │
│  ┌─────────────────────────────┐    │  ┌─────────────────────────────┐   │
│  │  🧠 脑 (可导出=profile)     │    │  │  🧠 脑 (待导入=profile)     │   │
│  │                             │    │  │                             │   │
│  │  config.yaml    .env        │    │  │  ┌─────────────────────┐   │   │
│  │  skills/        sessions/   │    │  │  │ hermes profile     │   │   │
│  │  memories/      cron/       │    │  │  │ import export.tar  │   │   │
│  │  auth.json      SOUL.md     │    │  │  └─────────┬───────────┘   │   │
│  │  memory_store.db            │    │  │           │                │   │
│  └──────────┬──────────────────┘    │  │           ▼                │   │
│             │                       │  │  config.yaml ✓            │   │
│  ┌──────────▼──────────────────┐    │  │  skills/      ✓            │   │
│  │  🔌 外设 (不可导出)          │    │  │  sessions/    ✓            │   │
│  │                             │    │  │  memories/    ✓            │   │
│  │  MCP 二进制 (trilium-mcp,  │    │  │  cron/jobs    ✓ (缺脚本)   │   │
│  │         pinchtab)           │    │  │                             │   │
│  │  cron 脚本 (*.sh)           │    │  │  ─── 缺失待补 ───           │   │
│  │  Hermes 源码 (版本)         │    │  │  .env           ❌ (排除)   │   │
│  └─────────────────────────────┘    │  │  auth.json      ❌ (排除)   │   │
│                                     │  │  MCP 二进制     ❌ (需重装)  │   │
│                                     │  │  cron *.sh      ❌ (需复制)  │   │
│                                     │  └─────────────────────────────┘   │
│                                     │                                    │
└─────────────────────────────────────┴────────────────────────────────────┘

profile export 包含/排除明细

┌─────────────────────────────────────────────────────────────────────────┐
│                     hermes profile export default                        │
├─────────────────────────────────┬───────────────────────────────────────┤
│          ✅ 打包带走              │          ❌ 留在原地                    │
├─────────────────────────────────┼───────────────────────────────────────┤
│                                 │                                        │
│  📄 config.yaml                 │  🔒 .env (安全策略排除)                 │
│    └ provider/model/MCP/tools   │    └ API key / bot token / 密码      │
│                                 │                                        │
│  📂 skills/                     │  🔒 auth.json (安全策略排除)            │
│    └ 所有安装的 skill SKILL.md  │    └ OAuth 登录态 / credential pool  │
│                                 │                                        │
│  📂 sessions/                   │  📦 MCP 服务器 node_modules            │
│    └ 全部对话历史 (.jsonl)      │    └ trilium-mcp / pinchtab 等二进制  │
│                                 │                                        │
│  📂 memories/                   │  📜 cron 脚本 (*.sh)                   │
│    └ MEMORY.md + USER.md        │    └ jobs.json 引用但文件本身不在     │
│                                 │                                        │
│  🗄️  memory_store.db            │  📦 Hermes 源码版本                    │
│    └ 海马体事实库                │    └ 需安装时 -Tag 指定同版本         │
│                                 │                                        │
│  ⏰  cron/jobs.json             │                                        │
│    └ 任务定义 (时间+指令)       │                                        │
│                                 │                                        │
│  🧾  SOUL.md                    │                                        │
│    └ 灵魂文件                   │                                        │
│                                 │                                        │
└─────────────────────────────────┴───────────────────────────────────────┘

迁移后的脑区对照

迁移前 (Linux)             迁移方式                 迁移后 (Windows)
═══════════════════════════ ════════════════════════ ═══════════════════════
🧬 神经递质 → config.yaml   profile 导入 ✅         🧬 神经递质 → config.yaml
🔥 前额叶   → MEMORY.md     profile 导入 ✅         🔥 前额叶   → MEMORY.md
🌡️ 海马体   → memory_store  profile 导入 ✅         🌡️ 海马体   → memory_store
🔥 基底核   → skills/       profile 导入 ✅         🔥 基底核   → skills/
🌤️ 颞叶记忆 → sessions/     profile 导入 ✅         🌤️ 颞叶记忆 → sessions/

🔌 MCP 外设 → node_modules  手动重装                🔌 MCP 外设 → 需要 npm i
🔑 API Key  → .env          手动填写                🔑 API Key  → 需要写 .env
⏰ cron     → jobs.json    手动转 scripts           ⏰ cron     → 需复制脚本

迁移后 Windows 上完整的后续操作清单

┌─ 步骤 1 ───────────────────────────────────────────────────────────────┐
│  iex "& { $(irm ...) } -Tag v2026.7.7.2 -HermesHome D:\hermes         │
│  → 装和 Linux 同版本的 Hermes                                          │
└────────────────────────────────────────────────────────────────────────┘
         │
         ▼
┌─ 步骤 2 ───────────────────────────────────────────────────────────────┐
│  hermes profile import default-20260718.tar.gz                         │
│  → config, skills, sessions, memories, cron 定义全部恢复               │
└────────────────────────────────────────────────────────────────────────┘
         │
         ▼
┌─ 步骤 3 ───────────────────────────────────────────────────────────────┐
│  写 D:\hermes\.env                                                     │
│  → TELEGRAM_BOT_TOKEN、OPENCODE_GO_API_KEY 等                          │
└────────────────────────────────────────────────────────────────────────┘
         │
         ▼
┌─ 步骤 4 ───────────────────────────────────────────────────────────────┐
│  安装 MCP 服务器                                                       │
│  → 让 Agent 装 trilium-mcp、pinchtab 等                                 │
└────────────────────────────────────────────────────────────────────────┘
         │
         ▼
┌─ 步骤 5 ───────────────────────────────────────────────────────────────┐
│  复制 cron 脚本                                                        │
│  → 从 Linux 把 ~/.hermes/scripts/ 下的 *.sh 复制过来                   │
└────────────────────────────────────────────────────────────────────────┘
         │
         ▼
┌─ 步骤 6 ───────────────────────────────────────────────────────────────┐
│  hermes gateway restart                                                │
│  → 所有配置生效                                                        │
└────────────────────────────────────────────────────────────────────────┘