liangxiaobing520/dsh-local-vector-memory
Fully local vector memory plugin for DeepSeek Harness: local embeddings, SQLite storage, automatic recall injection, dedup with conflict detection, soft-delete recycle bin, online backup.
Project Overview项目介绍
This is a local-first vector memory plugin built natively for DeepSeek Harness (DSH). It stores all vector memory data in a local single-file SQLite database and runs all embedding processes on local infrastructure to keep user memory data fully private. Before every DSH agent inference step, it automatically retrieves the top-K most relevant memories and injects them into the conversation context wrapped in a <local-memory> tag. It supports three methods of adding new memories: manual addition via the memory_add tool, automatic capture when user messages have trigger keywords, and automatic extraction at the end of a full conversation.
It comes with built-in memory conflict detection to prevent duplicate and contradictory entries. When new memory has a similarity score of 0.86 or higher with an existing entry but is not an exact duplicate, the plugin prompts the user to update the existing entry via memory_update instead of adding a new duplicate. It also implements a soft delete system for forgotten memories: deleted entries go to a recycle bin that can be restored via memory_restore, and only the purge=true flag triggers permanent deletion. It also creates automatic online backups of the SQLite database, retaining the 5 most recent snapshots by default.
Installation is straightforward via the DSH CLI: run the command dsh plugin --profile web add dsh-local-vector-memory and restart DSH Web to activate the plugin. To run the plugin, you need Node.js 22.5 or newer, because it relies on the built-in native node:sqlite module added in that version. You also need to run a local OpenAI-compatible embedding service, which the project recommends to be Qwen3-Embedding-0.6B hosted via llama-server. DeepSeek cloud API with deepseek-v4-pro is optional for automatic extraction, v0.3.4+ adds low-value filtering, and the project is open under the MIT license.
这是一款专为DeepSeek Harness(DSH)打造的原生本地向量记忆插件,采用本地Embedding向量化加SQLite单文件存储方案,会在Agent每次推理前自动检索并注入相关Top-K记忆,还可在会话结束后调用DeepSeek云端的deepseek-v4-pro自动从整段对话提取记忆。它支持三种记忆写入途径:手动添加、命中记忆关键词时自动捕获、会话结束自动提取。
该插件具备防矛盾记忆检测能力:当新记忆与已有记忆相似度≥0.86但未达到完全重复时,会提示用户调用memory_update更新旧记忆,而非新增重复条目。它默认对memory_forget操作做软删除,被删除的记忆会进入回收站,可通过memory_restore恢复,仅当指定purge=true参数时才会永久删除。插件还支持在线备份,默认保留最近5份备份,若嵌入服务不可用则自动退化为关键词匹配。
你可以通过DSH命令行工具一键安装:执行dsh plugin --profile web add dsh-local-vector-memory,重启DSH Web即可生效。运行依赖Node.js≥22.5,需要搭配一个兼容OpenAPI格式的本地嵌入服务,推荐使用Qwen3-Embedding-0.6B加llama-server,DeepSeek云端API用于提取记忆,属于可选配置。从v0.3.4版本起新增低价值内容过滤功能,项目采用MIT许可证开源。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-local-vector-memory(liangxiaobing520/dsh-local-vector-memory)
仓库:https://github.com/liangxiaobing520/dsh-local-vector-memory
本站详情页:https://www.yhbd.top/plugins/liangxiaobing520-dsh-local-vector-memory/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 3 · 最近提交 2026-09-21 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【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-local-vector-memory
把 liangxiaobing520/dsh-local-vector-memory 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-local-vector-memory
本地向量记忆插件 for DeepSeek Harness(DSH)。本地 embedding 向量化 + SQLite 单文件存储,对话自动召回注入;会话结束由 DeepSeek 云端 deepseek-v4-pro 自动提取。
A local-first vector memory plugin for DeepSeek Harness: local embeddings, SQLite storage, automatic recall injection, and DeepSeek cloud v4-pro extraction at session flush.
特性
- 写入三条路:手动
memory_add;用户消息命中记忆线索(记住/以后/偏好/约定/不要…)时毫秒级自动捕获;DeepSeek 云端 deepseek-v4-pro 在会话结束时从整段对话提取记忆(autoExtract,默认开) - 防矛盾记忆:写入时检测与已有记忆的冲突/过时(相似度 ≥0.86 但未达完全重复),提示改用
memory_update更新旧记忆而不是新增重复条目 - 回收站:
memory_forget默认软删除,memory_restore可恢复;purge=true才永久删除 - 在线备份:
memory_backup用 SQLiteVACUUM INTO生成一致性快照(安全于手工复制 WAL 库),默认保留 5 份 - 自动召回:每次 agent 推理前检索 top-K 相关记忆注入上下文(
<local-memory>标签),会话内 LRU 去重 - 批量向量化:提取/重建索引一次 HTTP 批量请求,失败自动逐条回退
- 关键词兜底:embedding 服务不可用时退化为中英文关键词匹配,写入照常
- 本地存储:向量库是单个 SQLite 文件(
node:sqlite,Node ≥22.5);embedding 全本地,提取走 DeepSeek 云端
需求
- DSH(DeepSeek Harness),web profile
- Node.js ≥ 22.5(内置
node:sqlite) - OpenAI 兼容的本地 embedding 服务(见下文,推荐 Qwen3-Embedding-0.6B + llama-server)
- DeepSeek 官方云端 API(
deepseek-v4-pro)用于提取(可选;默认走线索自动捕获) - ⚠️ 不要把 API key 写进任何会被提交的文件。key 只放在本机,支持三种写法:
仓库内的extractionApiKey: "${DEEPSEEK_API_KEY}" # 1. 环境变量 extractionApiKey: "dsh:DEEPSEEK_API_KEY" # 2. DSH 凭据库(~/.dsh/.credentials.yaml) extractionApiKey: "local-no-auth" # 3. 明文占位(仅限免认证的本地服务)cordis.patch.yml只是 bundle 挂载声明,不含任何凭据;profiles/<profile>/cordis.patch.yml用于覆盖配置,请勿在其中写明文 key(会留在磁盘上,也可能被 UI 回显)。
安装
dsh plugin --profile web add dsh-local-vector-memory
插件声明 dsh.bundle.patch,安装后 dsh.profile.bundles 自动追加,无需手改 package.json。重启 DSH Web 生效。
工具(12 个)
| 工具 | 作用 |
|---|---|
memory_add |
写入一条长期记忆(用户说"记住…"时;自动去重 + 冲突检测) |
memory_search |
向量检索(embedding 挂了自动关键词兜底;支持 tag 过滤) |
memory_list |
浏览记忆,支持 tag/source 过滤;includeDeleted=true 看回收站 |
memory_update |
按 id 更新文本/标签(自动重向量化),纠正过时/冲突记忆 |
memory_forget |
按 id 删除,默认软删除(可恢复);purge=true 永久删除 |
memory_restore |
恢复被软删除的记忆(回收站) |
memory_backup |
SQLite 在线备份到 ~/.dsh/backups/memory,自动保留最近 5 份 |
memory_stats |
库状态 + 软删除数 + 服务地址 |
memory_reindex |
给未向量化条目补向量(批量) |
memory_extract |
调用提取模型从一段文本提炼记忆入库(仅短文本,建议 ≤2000 字) |
memory_merge |
合并重复/同主题记忆:保留一条,其余软删除并标记"已被取代" |
memory_health |
健康报告:条数/软删/未向量化/置顶分布 + 重复对检测与合并建议 |
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
ruvnet/ruflo
Tencent/WeKnora
EverMind-AI/EverOS
MemTensor/MemOS
plastic-labs/honcho
agentscope-ai/ReMe
zilliztech/memsearch
vshulcz/deja-vu