Repository navigation
feat(claude-code): verify Cowork source composition - #660
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Windows 实机只读验证结果: 该命令仅执行 discovery、读取与内存比较;未运行 |
如何验证 Cowork 数据推荐按下面的路径逐步验证;绝大多数情况下,第一步就会结束: 绝大多数情况下,只需要更新到包含本 PR 的 memu-claude-code cowork verify如果看到与下面类似的结果,验证就完成了,不需要修改任何配置或代码: 具体数量因机器而异。主要确认:Cowork sessions 能被发现且全部可读、两个 source 没有重叠、composite 数量可加、mtime 顺序正常,最终为
只有自动发现与实际情况不符时,才需要继续如果本机没有使用过 Cowork,那么 只有在本机确实使用过 Cowork,Desktop 观测本地会话不为空,但自动验证仍显示 0 sessions 时,才需要找到 Claude Desktop 的实际数据根目录,并临时用 memu-claude-code cowork verify --root "/path/to/Claude-or-Claude-3p"root 应当是包含 memu-claude-code cowork verify --root "/path/one" --root "/path/two"当前自动检查的 Windows、macOS 和 Linux 候选目录定义在
|
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
macOS field verification found one concrete compatibility gap and I opened a patch against this PR branch: XnneHangLab-Mirror#1 Automatic discovery found 5 Cowork sessions and all 5 were readable, but 31 of 32 normalized Cowork messages had The patch preserves a normal message timestamp when present and falls back to Focused verification: 23 tests passed; Ruff format/check, mypy, and diff check passed. Only aggregate counts were inspected or reported; no transcript content or fingerprint was printed. |
fix(claude-code): fall back to Cowork audit timestamps
📝 Pull Request Summary
为
memu-claude-code增加一个只读的 Cowork 组合数据验证命令:用户更新
memu-cli后,可通过一个命令验证 Cowork 数据是否可读、是否与 Claude Code 数据重叠,以及组合后的文件级时间线是否满足当前契约。✅ What does this PR do?
HostSpec.register_extra扩展点注册cowork verify,不向共享host_cli.py添加 Cowork 特例。(timestamp, role, content)SHA-256 fingerprint 检查精确消息重叠。--root PATH,供 staging 和非标准 Claude Desktop 安装执行一次性显式探测。prepare、不推进 cursor、不访问 memory backend,也不修改 scheduler/config。WARN且退出码为 0;读取或组合契约失败表示为FAIL且退出码为 1;参数错误保持 argparse 的退出码 2。🤔 Why is this change needed?
#639 将 Cowork audit 数据作为独立只读 source 合入 Claude Code bridge,但用户更新
memu-cli后,当前只能通过运行prepare或导入 Python 内部接口来确认 discovery 和 composition 是否正确。这个命令提供一个小而明确的只读验证入口,使用户和 staging 测试者无需触发 ingestion,就能直接检查 Cowork reader 与 Claude Code composite source 的关键契约。
Closes #657