sdf-jkl-gh/dsh-memory-panel ↗★ 0
dsh-memory-panel
Persistent memory plugin for DeepSeek Harness: memory_* model tools, automatic memory:recall prompt injection, /memory/api JSON routes, and a 设置→记忆 (Settings → Memory) management panel.
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:sdf-jkl-gh/dsh-memory-panel说明文档
阅读完整 README ↗dsh-memory-panel
DeepSeek Harness 的持久记忆插件:面向模型的
memory_*工具、自动memory:recall提示注入、/memory/apiJSON 路由,以及「设置 → 记忆」管理面板。
功能
dsh-memory-panel 为所有 agent 会话提供持久、可检索的记忆,进程重启后依然保留:
| 能力 | 位置 | 说明 |
|---|---|---|
memory_save | 模型工具 | 新建或更新一条记忆(标题 + 内容 + 标签 + 重要度) |
memory_search | 模型工具 | 排序检索——英文整词 + 中文 bigram 双重评分 |
memory_list | 模型工具 | 按更新时间倒序列出,可按标签过滤,附标签/重要度统计 |
memory_get | 模型工具 | 按 id 读取单条完整记忆 |
memory_delete | 模型工具 | 按 id 删除记忆 |
memory:recall | 系统提示 | 组装提示时自动注入前 6 条记忆(高重要度优先) |
/memory/api/* | 宿主路由 | 供设置面板调用的 JSON API |
| 设置 → 记忆 | Web 面板 | 在 GUI 中浏览、搜索、新建、编辑、删除记忆 |
插件挂在 DSH profile 组合的用户层,因此无论当前启用哪个 agent 预设,其工具对所有会话可见。
工作原理
┌────────────────────────── DSH 宿主进程 ───────────────────────────────┐
│ │
│ tools 注册表 ◄── memory_save/search/list/get/delete(面向模型) │
│ ▲ │
│ │ createMemoryStore (src/store.js) │
│ │ ┌──────────────────────────────────┐ │
│ │ │ 纯逻辑:评分、回忆渲染、 │ │
│ └──── 执行 ──────────│ 串行化写入链 │ │
│ └───────────────┬──────────────────┘ │
│ │ load / persist(注入) │
│ /memory/api/* 路由 ◄── POST ──┐ ▼ │
│ ▲ │ fs 服务 │
│ │ │ │ │
│ systemPrompt.memory:recall ◄─┘ ▼ │
│ ▲ /.dsh-memory/memories.json │
│ │ (30 秒兜底刷新 + 每次保存/删除后即时刷新) │
└────────┴──────────────────────────────────────────────────────────────────┘
┌──────────────────────────── 浏览器(Web 客户端) ────────────────────────┐
│ 设置 → 记忆 面板 ── fetch('/memory/api/', { method: 'POST' }) │
└────────────────────────────────────────────────────────────────────────────┘