dsh-brain/docs/mnemon.md

36 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Mnemon 记忆空间集成
> 把 LongMemory 作为 Mnemon 的记忆空间 Provider,长期记忆实时穿透云端。
---
## Mnemon 集成(记忆空间 Provider)
自 0.2.0 起,本包同时是一个 Mnemon 记忆空间 Provider:Mnemon 管本地在场
(运行时记忆每轮注入),长期记忆的每一次读、写都实时穿透到 LongMemory——
云端是真源,本地不留长期副本。因此其他工具(Claude Code、Codex、看板)
刚写进 LongMemory 的记忆,DSH 里立刻能召回。
启用方式:在 Mnemon 的记忆空间来源配置里给 providers 列表加一行
(profile 覆盖或 bundle 配置均可),然后重启 DSH:
```yaml
providers:
- use: dsh-cloud-memory/mnemon-provider
instanceId: longmemory
```
之后在 Mnemon 的插件页会出现 LongMemory 的服务字段(Endpoint / Memory
token),留空即复用本插件已有的 `cloud-memory.json` 配置,一处配置两处生效。
每个记忆空间映射一个 LongMemory 项目:发现流程会自动列出账号下的全部
项目,外加一个不分项目的「全部」空间;也可以在空间上手动填 Project ID。
v1 范围:支持 发现 / 状态 / 搜索 / 浏览 / 写入 / 按 id 读取;暂不支持
删除(LongMemory 客户端接口没有删除操作)与图谱读取(接口未暴露,
返回空图谱且能力声明为关)。离线时长期记忆不可用,Mnemon 的本地
运行时记忆不受影响。
验证:`node verify-mnemon-provider.mjs`(对本地 stub 服务跑通
发现→写入→召回→项目隔离全流程)。