DeepSeek Harness plugin

dsh-shared-memory

跨对话记忆系统 v2:分层记忆(MEMORY.md + USER.md 常驻注入 + topics/ 主题库按需加载),memory 工具(target 支持 topic) + 可视化记忆面板(笔记/画像/主题库)

Jump to install

Source facts

Repository
futongxu9-maker/dsh-shared-memory
Latest update
Aug 16, 2026
Category
Memory
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/futongxu9-maker/dsh-shared-memory
Plugin: dsh-shared-memory
Author: futongxu9-maker

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

dsh-shared-memory · 跨对话记忆(Shared Memory)

DeepSeek Harness 的跨对话记忆系统(Hermes 式):把持久化记忆注入每个会话的系统提示词,并提供 memory 工具 + 可视化记忆面板(GUI),让新对话自动知道旧对话沉淀的内容。

> Cross-conversation memory for DeepSeek Harness, Hermes-style: durable memory injected into every session's system prompt, with a memory maintenance tool and a GUI panel.

功能 / Features

  • 分层记忆(索引 + 主题库)

- MEMORY.md(agent 高频笔记,上限 8000 字符)+ USER.md(用户画像,上限 4000 字符)常驻注入每个新会话 - topics/<name>.md(主题文件,如 feishu.md / projects.md,默认上限 12000 字符)不常驻注入——只在 MEMORY.md 文末生成一行主题索引(文件名 + 字符数 + 首条摘要),agent 需要时用 read 按需加载

  • memory 工具add / replace / remove / list 维护记忆条目;target 支持 memory / user / topic:<文件名>;写入自检规则引导只存「原则 / 工作数据 / 持久事实」
  • 记忆面板 GUI:侧边栏「记忆」按钮打开面板——笔记 / 画像 / 主题库三个标签页,浏览、编辑、添加、删除条目,实时显示容量(N 条 · X/上限 字符
  • 条目格式§ 分隔,推荐 [发现]/[决策]/[偏好]/[纠正] 分类前缀
  • 容量可控:环境变量 DSH_MEMORY_CHAR_LIMIT / DSH_MEMORY_USER_CHAR_LIMIT / DSH_MEMORY_TOPIC_CHAR_LIMIT 可调

要求 / Requirements

  • DeepSeek Harness rc.6+(dsh web
  • Windows / macOS / Linux 通用(纯 Node ESM + 浏览器端)

安装 / Install

方式一:dsh 插件命令(推荐)

dsh plugin --profile web add github:futongxu9-maker/dsh-shared-memory

方式二:手动

1. 把 dsh-shared-memory 目录复制到 ~/.dsh/profiles/web/node_modules/dsh-shared-memory/ 2. 在 ~/.dsh/profiles/web/cordis.patch.yml 追加:

- insert:
    - id: shared-memory
      name: 'dsh-shared-memory'

3. 刷新页面(或重启服务)

使用 / Usage

  • 模型侧:每个会话的系统提示词自动带上 MEMORY.md + USER.md + 主题索引(每个主题文件一行摘要);agent 用 memory 工具维护(add 新条目、replace 更新、remove 删除、list 查看用量、target='topic:<名>' 写主题文件)
  • 用户侧:点击侧边栏底部的「记忆」按钮 → 面板里查看/编辑三个标签页(支持增删改、容量提示)
  • 记忆文件位置:~/.dsh/memories/MEMORY.mdUSER.mdtopics/*.md(均可直接手动编辑)

架构 / Architecture

浏览器 (Client)                              Node (Host)
┌──────────────────────────┐              ┌──────────────────────────────┐
│ @local/dsh-memory-ui     │ GET/POST     │ shared-memory.mjs            │
│ 侧边栏「记忆」按钮 + 面板  │──/api/──────▶│ · system-prompt section(注入)│
│(笔记/画像/主题库 3 标签) │ shared-memory│ · memory 工具(model-visible)│
└──────────────────────────┘              │ · /api/shared-memory 路由    │
                                          └──────────────────────────────┘
  • Hostshared-memory.mjs):注册系统提示词 section(注入常驻记忆 + 主题索引)、memory 工具(add/replace/remove/list + target 支持 topic + 容量自检)、HTTP API /api/shared-memory(GET 返回 memory/user/topics,POST 按 target 写入,供 GUI 用)
  • Client@local/dsh-memory-ui):通过 dsh.client 协议注入侧边栏按钮 + overlay 面板,fetch 同源 API 读写记忆

记忆写入自检规则(内置在 memory 工具里)

只写三类:①用户的原则/偏好/决策方式/纠正;②工作数据(Base ID、账号、链接、路径);③环境与项目的持久事实。禁止一次性/临时内容与实现细节;拿不准不写。

License

MIT