tluoluo/dsh-persist
DeepSeek Harness 的持久记忆:按会话笔记、选择性注入、项目记忆、语义 Vault 搜索与自动检索。
Project Overview项目介绍
dsh-persist is a native DSH plugin that adds persistent long-term memory to DeepSeek Harness agents. It is distributed as a standard DSH bundle, and can be installed directly via the DSH plugin command line tool. To install the plugin, run dsh plugin --profile web add dsh-persist in your terminal, then restart your DSH instance to activate the plugin. You can also install it directly from the GitHub repository by running dsh plugin --profile web add github:tluoluo/dsh-persist, though this requires pnpm to authorize the build script after installation. The published npm package already includes pre-built assets, so end users do not need to run any extra build steps.
This plugin is designed for any DSH user that works across multiple conversations and wants to retain persistent context between sessions. After installation and restart, open any conversation in the DSH web interface, and you will see the Memory tab next to the Trajectory tab at the top of the page. By default, no memory is injected into new conversations to avoid wasting context space, so you need to manually check the boxes next to the memory blocks you want to inject for that conversation. To have the agent remember something, you can simply tell it to "remember this", and it will automatically write the content to the current conversation's memory block. Project memory is shared across all conversations in the same working directory, so you can reuse project-specific context across multiple sessions.
dsh-persist is released under the open-source MIT license, and requires Node.js version 22.6 or higher to work correctly. The optional Vault semantic search feature can be enabled by adding a free SiliconFlow API key to your environment variables, and if no key is provided, the feature automatically falls back to keyword search with no loss of core functionality. Static memory blocks have a 100-line truncation limit for injection, so any content beyond 100 lines will not be added to the conversation context. There are also multiple environment variables you can set to customize the plugin's behavior, such as disabling automatic injection or forcing global auto-retrieval settings.
dsh-persist 是专门为 DeepSeek Harness 开发的原生持久化记忆插件,解决了 DSH 默认代理切换对话就会丢失上下文记忆的问题。它将记忆分层存储在本地文件系统中,分为用户画像与长期记忆、关键速查记忆、单对话工作记忆、项目共享记忆、Vault 语义记忆五层,每层支持不同的按需注入规则。安装后会在用户根目录创建 ~/.dsh-memory 存储目录,所有记忆均为纯文本格式,用户可直接读写、备份和迁移。
该插件面向使用 DSH 进行日常开发、项目管理或对话任务的用户,支持开箱即用,安装完成后只需重启 DSH 即可生效。用户打开对话后可在顶部「记忆」标签页勾选需要注入的记忆块,默认不自动注入任何内容,避免占用不必要的上下文空间。用户可直接让代理记住指定内容,代理会自动写入对应记忆层,也支持手动编辑所有记忆文件,同一工作目录还可按项目名分隔记忆,满足隔离需求。
该插件采用 MIT 许可证开源,要求 Node.js 版本不低于 22.6,推荐使用 24 及以上版本。Vault 语义检索功能为可选,用户可免费申请硅基流动的 API key 开启,不配置 key 会自动降级为关键词搜索,不影响基础功能使用。静态记忆块有 100 行的注入截断限制,超出部分不会被注入,Vault 检索默认每次返回 top 3 结果,无长度限制。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-persist(tluoluo/dsh-persist)
仓库:https://github.com/tluoluo/dsh-persist
本站详情页:https://www.yhbd.top/plugins/tluoluo-dsh-persist/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 3 · 最近提交 2026-08-16 · 主语言 TypeScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add dsh-persist
把 tluoluo/dsh-persist 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-persist
English | 简体中文
给 DeepSeek Harness 的 agent 装上"不会失忆"的长期记忆。 Persistent memory for DeepSeek Harness agents.
它解决什么问题
默认情况下 DSH 的 agent 换对话就失忆——上下文一关,什么都不记得。dsh-persist 把记忆做成 文件系统上的分层结构,每个对话按需注入:
| 层 | 存储 | 对标 | 怎么被读取 |
|---|---|---|---|
| 用户画像 + 长期记忆 | USER.md / MEMORY.md |
长期记忆(LTM) | 每对话可选注入 |
| 关键记忆 | memory.json |
速查卡片 | 每对话可选注入;工具读写 |
| 对话记忆 | sessions/<id>/memory.md |
工作记忆 | 只注入本对话 |
| 项目记忆 | projects/<key>/memory.md |
PARA 的 Project 层 | 按项目勾选注入 |
| Vault 语义记忆 | vault.md + vault.db |
Zettelkasten 卡片盒 | 按需语义召回(工具或「自动检索」开关,不静态注入) |
特性
- 对话独有记忆——每个对话一本"不会丢的笔记本",其他对话看不到、不注入
- 选择性注入——勾选什么才注入什么;新对话默认零注入,不占上下文
- 项目记忆互通——同一工作目录共享项目经验;命名项目可把同目录的多项目分开
- Vault 语义检索——配一个免费 key 就能"按意思"找记忆;不配自动降级为关键词搜索
- 自动召回(三态模式)——记忆 tab 里选择自动检索模式:
关闭(默认)/智能(纯本地规则过滤闲聊,提到历史/项目/主题才查,零外发)/LLM 判断(调用模型判断是否需要检索,更准但会把消息发给模型提供商,超时/失败自动降级为智能) - 记忆 tab——对话顶部可视化编辑 + 注入配置 + 实时预览(所见即所得);tab 右上角的「打开记忆管理页」在新标签打开完整管理页(全部会话/项目/Vault/全局文件)
- 全部纯文本——
~/.dsh-memory/下每个文件人类可读可改,随时备份、迁移、导出
快速上手
dsh plugin --profile web add dsh-persist # 1. 安装
# 2. 重启 DSH(dsh --profile web)
# 3. 打开对话 → 顶部「记忆」tab → 勾选要注入的块
想让 agent 记住什么,直接对它说"记住这个",它会自动写入本对话记忆。
要开语义搜索:在 硅基流动免费申请 key,设置环境变量
SILICONFLOW_API_KEY=... 后重启即可(不配也能用,自动降级为关键词搜索)。
怎么装?
曾用名
dsh-memory(npm 名已被占用,故改名dsh-persist)。存储路径~/.dsh-memory/、路由/dsh-memory/不变,旧数据无需迁移。
环境要求:Node.js >= 22.6(推荐 24+;测试用 --experimental-strip-types 自 22.6 起可用)。Vault 层用内置 node:sqlite:23.4+ 默认可用,22.6–23.3 需 --experimental-sqlite 标志;更低版本插件照常加载,仅 Vault 工具自动降级禁用(记忆/注入/UI 不受影响)。宿主为 DeepSeek Harness(需提供 tools / systemPrompt / webServer / sessions / agents 服务与 conversation.view UI 槽位)。
dsh-persist 是一个标准 DSH 组合包(bundle):声明了 dsh.bundle,通过 dsh plugin 装进任意 profile。@deepseek-ai/* 是 optional peer 依赖,由 DSH 宿主在运行时提供,npm 不会、也不需要安装它们。
从 npm 安装(自带构建好的 lib/,无需构建):
# 装进你的 web profile(首选)
dsh plugin --profile web add dsh-persist
# 或装进别的 profile
dsh plugin --profile demo add dsh-persist
安装后重启(dsh --profile web),插件即生效。
从 GitHub 安装(会拉源码并跑 prepare 构建,见下文):
dsh plugin --profile web add github:tluoluo/dsh-persist
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
vshulcz/deja-vu
adoresever/graph-memory
mnemon-dev/mnemon
Phant0Meow/dsh-meow-memory
slow-stack/mneme
Aik358/dsh-auto-memory