|
@@ -0,0 +1,111 @@
|
|
|
|
|
+# 新人环境初始化清单
|
|
|
|
|
+
|
|
|
|
|
+> 版本: v0.1 · 更新: 2026-08-29
|
|
|
|
|
+> 说明: 在新环境(新机器/新容器)中重生时,需要执行的步骤
|
|
|
|
|
+
|
|
|
|
|
+---
|
|
|
|
|
+
|
|
|
|
|
+## 快速重生(5分钟)
|
|
|
|
|
+
|
|
|
|
|
+```bash
|
|
|
|
|
+# 1. 克隆生命仓库
|
|
|
|
|
+git clone https://git.fmode.cn/liuyuyang/agent-yuyang001.git ~/.fmode-harness-agent
|
|
|
|
|
+
|
|
|
|
|
+# 2. 运行引导脚本
|
|
|
|
|
+cd ~/.fmode-harness-agent && bash scripts/bootstrap.sh
|
|
|
|
|
+```
|
|
|
|
|
+
|
|
|
|
|
+## 详细步骤
|
|
|
|
|
+
|
|
|
|
|
+### Step 1: 克隆仓库
|
|
|
|
|
+```bash
|
|
|
|
|
+git clone https://git.fmode.cn/liuyuyang/agent-yuyang001.git ~/.fmode-harness-agent
|
|
|
|
|
+cd ~/.fmode-harness-agent
|
|
|
|
|
+```
|
|
|
|
|
+
|
|
|
|
|
+### Step 2: 配置密钥
|
|
|
|
|
+```bash
|
|
|
|
|
+cp secrets/.env.example .env
|
|
|
|
|
+# 编辑 .env,填入真实密钥
|
|
|
|
|
+# 参考: secrets/MAP.md 了解每个密钥的用途
|
|
|
|
|
+```
|
|
|
|
|
+
|
|
|
|
|
+### Step 3: 运行引导脚本
|
|
|
|
|
+```bash
|
|
|
|
|
+bash scripts/bootstrap.sh
|
|
|
|
|
+```
|
|
|
|
|
+引导脚本自动完成:
|
|
|
|
|
+- [x] 检查系统环境(OS/ARCH)
|
|
|
|
|
+- [x] 检查必要工具(git/curl/python3/node)
|
|
|
|
|
+- [x] 开启 FmodeAgent YOLO 模式(跳过 execute_code 审批)
|
|
|
|
|
+- [x] 配置中文语言环境
|
|
|
|
|
+- [x] 创建/检查 SSH 密钥
|
|
|
|
|
+- [x] 检查环境变量完整性
|
|
|
|
|
+
|
|
|
|
|
+### Step 4: 安装依赖
|
|
|
|
|
+```bash
|
|
|
|
|
+bash scripts/setup.sh
|
|
|
|
|
+```
|
|
|
|
|
+
|
|
|
|
|
+### Step 5: 恢复FmodeAgent配置
|
|
|
|
|
+```bash
|
|
|
|
|
+# 从 config/fmodeagent/ 恢复配置
|
|
|
|
|
+cp config/fmodeagent/config.yaml.example ~/.hermes/config.yaml
|
|
|
|
|
+# 编辑 ~/.hermes/config.yaml 填入真实配置
|
|
|
|
|
+```
|
|
|
|
|
+
|
|
|
|
|
+### Step 6: 创建Profile
|
|
|
|
|
+参考 `life/COMPETENCIES/02-Profile初始化与生命周期.md` 创建7个Profile。
|
|
|
|
|
+
|
|
|
|
|
+### Step 7: 恢复数据
|
|
|
|
|
+```bash
|
|
|
|
|
+bash scripts/restore.sh
|
|
|
|
|
+```
|
|
|
|
|
+
|
|
|
|
|
+### Step 8: 验证
|
|
|
|
|
+```bash
|
|
|
|
|
+# 验证FmodeAgent
|
|
|
|
|
+hermes --version
|
|
|
|
|
+hermes gateway status
|
|
|
|
|
+hermes profile list
|
|
|
|
|
+
|
|
|
|
|
+# 验证Git
|
|
|
|
|
+git remote -v
|
|
|
|
|
+
|
|
|
|
|
+# 验证S3
|
|
|
|
|
+obsutil ls obs://storage-s3-nkkj/ -e=https://obs.cn-north-4.myhuaweicloud.com -i=$CLOUD_SDK_AK -k=$CLOUD_SDK_SK
|
|
|
|
|
+```
|
|
|
|
|
+
|
|
|
|
|
+## 跨平台注意事项
|
|
|
|
|
+
|
|
|
|
|
+### Linux/macOS
|
|
|
|
|
+- `~/.fmode-harness-agent/` 根目录
|
|
|
|
|
+- `~/.bashrc` 添加: `export TZ=Asia/Shanghai`
|
|
|
|
|
+- SSH: `~/.ssh/id_ed25519`
|
|
|
|
|
+
|
|
|
|
|
+### Windows PowerShell
|
|
|
|
|
+- `~\.fmode-harness-agent\` 根目录
|
|
|
|
|
+- `$PROFILE` 添加: `$env:TZ = "Asia/Shanghai"`
|
|
|
|
|
+- SSH: `~\.ssh\id_ed25519`
|
|
|
|
|
+
|
|
|
|
|
+## 验证清单
|
|
|
|
|
+
|
|
|
|
|
+| 项目 | 检查点 |
|
|
|
|
|
+|------|--------|
|
|
|
|
|
+| 仓库克隆 | ✅ `git log` 看到提交历史 |
|
|
|
|
|
+| FmodeAgent | ✅ `hermes --version` 正常 |
|
|
|
|
|
+| YOLO模式 | ✅ `hermes config get approvals.mode` = off |
|
|
|
|
|
+| 中文配置 | ✅ `language: zh` 已配置 |
|
|
|
|
|
+| SSH密钥 | ✅ 已加到git.fmode.cn |
|
|
|
|
|
+| 环境变量 | ✅ `.env` 已填入真实值 |
|
|
|
|
|
+| Profile | ✅ 7个Profile已创建 |
|
|
|
|
|
+| S3 | ✅ 可访问storage-s3-nkkj |
|
|
|
|
|
+| 知识库 | ✅ knowledge/ 目录有内容 |
|
|
|
|
|
+
|
|
|
|
|
+## 如果遇到问题
|
|
|
|
|
+
|
|
|
|
|
+1. **SSH不通** → 用HTTP克隆: `https://fmode:fmgo@git.fmode.cn/liuyuyang/agent-yuyang001.git`
|
|
|
|
|
+2. **FmodeAgent未安装** → 参考FmodeAgent安装文档
|
|
|
|
|
+3. **密钥缺失** → 查看 `secrets/MAP.md` 了解每个密钥的获取方式
|
|
|
|
|
+4. **Profile异常** → 运行 `hermes -p <name> doctor` 测试
|
|
|
|
|
+5. **S3不通** → 检查 `CLOUD_SDK_AK/SK` 是否正确
|