dsh-mem
v0.1.1 · 4 天前发布
Cross-session long-term memory for DeepSeek Harness (dsh): durable JSON-file memory store with memory_save / memory_recall / memory_forget / memory_list model tools, installable as a dsh bundle.
README
dsh-mem — 跨会话记忆能力接缝
一个面向 DeepSeek Harness(dsh)的树外 bundle 插件,实现完整的能力接缝(capability seam)三件套:Service Definition + Service Provider + Consumer(模型工具)。它给 Agent 提供跨会话的长期记忆:memory_save / memory_recall / memory_forget / memory_list 四个工具,把事实、偏好、决策存入 $DSH_HOME/memory/memory.json,任何会话都能检索。
接缝三件套
| 角色 | 模块 | 挂载行 | 说明 |
|---|---|---|---|
| Service Definition | src/memory.ts(dsh-mem/memory) | —(不是插件行) | 抽象类 MemoryService,声明 ctx.memory 契约与类型;直接加载会报错 |
| Service Provider | src/provider.ts(dsh-mem/provider) | memory | MemoryFile extends MemoryService,JSON 文件持久化,原子写入 |
| Consumer | src/tool.ts(dsh-mem/tool) | tool-memory | 函数插件,在 ctx.tools 上注册四个工具;每次调用经 ctx.get('memory') 解析服务 |
参考 dsh 仓库里的同类结构:ctx.jobs(D
版本兼容矩阵
| DSH 版本 | 状态 | 说明 |
|---|---|---|
dsh@0.1.0-rc.6 | ✅ 兼容 | cordis patch ✅ |
dsh@0.1.0 | ✅ 兼容 | 标准 patch ✅ |
dsh@0.2.0 | ⚠️ 待验证 | 待实测(API 可能在变) |
dsh@0.3.0+ | ❓ 未知 | 尚未发布 |
💡 兼容矩阵每周末自动跑实测,欢迎 PR 修正
元数据
- License
- MIT
- npm
- dsh-mem
- Repo
- —
- Engines
{}- Weekly DL
- 0
- Monthly DL
- 0
- dsh.bundle
{"bundle":{"patch":"./cordis.patch.yml"}}