docs: add upgrade recovery guide and troubleshooting table

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-17 06:05:10 +10:00
co-authored by Claude Opus 4.6
parent 9b1b99ea21
commit d61c242e9f
+42 -1
View File
@@ -1,6 +1,6 @@
# memory-continuity
**Current release:** `v2.1.0`
**Current release:** `v2.3.0`
OpenClaw **lifecycle plugin** for short-term working continuity. Preserves structured in-flight work state across `/new`, reset, gateway restarts, model fallback, and context compaction.
@@ -157,6 +157,47 @@ scp $WORKSPACE/memory/CURRENT_STATE.md newhost:$WORKSPACE/memory/
No database, no vector embeddings, no API keys to transfer.
## OpenClaw 升级后恢复
OpenClaw 升级(`npm update -g openclaw`**不会覆盖** `~/.openclaw/openclaw.json` 用户配置。但如果插件行为异常,按以下步骤排查和恢复:
### 快速诊断
```bash
# 检查插件是否加载
openclaw gateway restart 2>&1 | grep memory-continuity
# 应输出: [memory-continuity] Plugin registered successfully
# 检查配置是否完整
cat ~/.openclaw/openclaw.json | grep -A2 memory-continuity
```
### 常见故障与恢复
| 症状 | 原因 | 恢复方法 |
|------|------|---------|
| 启动日志无 `Plugin registered` | 插件文件缺失或配置丢失 | 重跑 `bash scripts/post-install.sh` |
| `plugins.allow is empty` 警告 | `openclaw.json``plugins.allow` 被清空 | 添加 `"plugins.allow": ["memory-continuity"]` |
| `loaded without provenance` 警告 | `plugins.installs` 记录丢失 | 添加 `"plugins.installs": {"memory-continuity": {"source": "path"}}` |
| 新版本改了钩子 API | OpenClaw breaking change | 查看 [CHANGELOG](CHANGELOG.md),更新 `index.js` |
| 状态不恢复但无报错 | Session 缓存了旧的 skillsSnapshot | `/new` 开新 session,或重跑 `post-install.sh`(会清缓存) |
### 一键恢复
出现任何问题,重跑安装脚本即可(幂等,可重复执行):
```bash
cd ~/.openclaw/projects/memory-continuity # 或你 clone 的位置
git pull # 拉取最新版本
bash scripts/post-install.sh # 重新安装 + 重启 gateway
```
### 升级前备份(推荐)
```bash
cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak
```
## Architecture: Plugin vs Skill
Previous versions (v0.x) shipped as a **skill** — a markdown file that asked the model to read/write `CURRENT_STATE.md`. This was unreliable because models could ignore the instructions.