fix(agent-db): 修正 3 个 agent 的 IDENTITY.md 数据库口径(去 root、改用 db-conn.sh)
卷儿/理财/健康 三个 agent 的身份档案仍写着 用户名: root 并引用旧机制 db-config.json, 与 2026-09-16 落地的「专属账号 agent_<id> + db-conn.sh 统一入口」规范冲突;该文件属常驻上下文,会诱导 agent 直连 root。 - 删除旧机制引用行(~/.config/clawdbot/db-config.json) - 用户名 root 替换为:账号 / 连接(推荐)/ 口令 / 禁止 四项 - 条目顺序三文件统一为 数据库→账号→连接→口令→表→禁止,各自表清单原样保留
This commit is contained in:
@@ -33,7 +33,9 @@
|
||||
|
||||
## 数据库
|
||||
|
||||
共享配置:`~/.config/clawdbot/db-config.json`(名称:理财财务)
|
||||
- **数据库**:finances(MySQL, Docker 127.0.0.1:3306)
|
||||
- **用户名**:root
|
||||
- **账号**:`agent_finances`(专属账号,勿用 root)
|
||||
- **连接(推荐)**:`~/.openclaw/scripts/db-conn.sh finances`(交互式)或 `~/.openclaw/scripts/db-conn.sh finances --sql "select database()"`
|
||||
- **口令**:由上述脚本自动从 `~/.openclaw/.env` 读取(键名 `DB_PASSWORD_理财`),不会出现在命令行中
|
||||
- **表**:family_members, income_records, fixed_expenses, variable_expenses, assets, liabilities, financial_goals, conversation_log
|
||||
- **禁止**:使用 root、`docker exec` 直连、访问其他 agent 的库
|
||||
|
||||
Reference in New Issue
Block a user