docs: 修复备份任务记录 + 精简 TOOLS.md

This commit is contained in:
2026-03-24 10:15:57 -07:00
parent df7cdffc13
commit 8d416abfa0
3 changed files with 97 additions and 4 deletions

View File

@@ -62,14 +62,22 @@ _这份文件记录持续性项目和重要状态跨会话保留。_
### 2. 工作区自动备份
**状态**: 运行中
**创建**: 2026-03-06
**更新**: 2026-03-12移除脚本改用直接 git 命令
**更新**: 2026-03-24修复agentTurn → systemEvent
**配置**:
- Cron: 每天 00:00PST
- 命令: `git add -A && git commit -m "auto: $(date)" && git push`
- Cron ID: `53c0b2a6-e3b3-4a1d-b2a8-66e216fad753`
- Schedule: 每天 00:00PST
- Target: `main` session通过 heartbeat 触发)
- Payload: `systemEvent` 直接执行 shell
- 远程: `ssh://git@luyanxin.com:8103/lyx/youlu-openclaw-workspace.git`
**关键修复** (2026-03-24):
- **问题**: 原配置使用 `agentTurn`,把 shell 命令发给 kimi-k2.5LLM 只是"理解"了命令意思并编造了"备份完成"回复,**没有真正执行 git**
- **解决**: 改为 `systemEvent` + `exec:` 前缀,直接执行不经过 LLM
- **语法**: `exec:cd ... && git add -A && git diff --cached --quiet || (git commit -m "Daily backup $(date +"%Y-%m-%d %H:%M:%S")" && git push)`
- **注意日期转义**: 外层单引号 + 内层双引号保护 `+` 符号
**功能**:
- 自动提交所有变更到 git
- 自动提交所有变更到 git(包括未追踪文件)
- 自动推送到 origin/main**无需确认**
- 无变更时静默(无通知)
- 仅出错时报告