DDDFXYqiming/dsh-layered-memory
DeepSeek Harness 的跨会话长期记忆插件
Project Overview项目介绍
This is a native long-term memory plugin built exclusively for DeepSeek Harness (DSH). It addresses the core limitation of default DSH that all session context is cleared once a conversation ends. By persisting valuable information from completed sessions to local disk files, it allows the agent to retrieve relevant memory on demand in future conversations. To install the plugin directly from GitHub, you can run the command dsh plugin --profile web add github:DDDFXYqiming/dsh-layered-memory in your DSH command line interface. Local development can also be done by adding the local repository directory directly.
The plugin offers 14 different tools that are progressively mounted only after the agent calls the memory_activate tool. It injects the L1 index into the system prompt of every model turn in real time, so any changes to the index take effect immediately. Core functions include namespace isolation, layered memory management, BM25 full-text search, near-duplicate content deduplication, memory rollback, automatic maintenance, and cross-namespace experience promotion. Users can perform read, write, update, archive, search, and statistics operations on all stored memory entries via the provided tools.
The plugin is released under the open-source MIT license, and stores all memory data in the ~/.dsh/memory directory by default. Users can customize multiple configuration parameters including memory storage directory, maximum character count for L1 index, automatic namespace behavior, and automatic maintenance frequency. The plugin follows core design axioms: only store information that has been verified by actions, never physically delete verified content, and do not store volatile temporary state. For local development and testing, you can run pnpm install, pnpm build and pnpm test to complete the build and unit tests.
这是专为 DeepSeek Harness(DSH)打造的分层长期记忆原生插件,用于解决DSH默认会话结束后上下文被清空的问题。它会将会话中值得留存的信息写入本地磁盘文件,供后续会话按需调用读取。核心功能涵盖命名空间隔离、分层记忆存储、BM25全文检索、内容级近重复去重、溯源归档回滚、自动维护以及渐进式工具暴露。
插件一共提供14个工具,在渐进式模式下需要由Agent调用memory_activate后才会挂载进工具列表。它支持将L1索引实时注入每轮模型上下文,修改能够即时生效。用户可通过工具完成记忆的列出、读取、检索、写入、更新、归档、回滚、统计与维护,还支持经验跨命名空间提升。
安装可直接通过DSH命令行执行dsh plugin --profile web add github:DDDFXYqiming/dsh-layered-memory完成。插件以MIT协议开源,默认将记忆存储在用户目录下的.dsh/memory路径,支持自定义配置记忆目录、L1字符预算、自动命名空间等多项参数。它遵循只存已验证信息、不物理删除已验证内容等核心设计公理。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-layered-memory(DDDFXYqiming/dsh-layered-memory)
仓库:https://github.com/DDDFXYqiming/dsh-layered-memory
本站详情页:https://www.yhbd.top/plugins/dddfxyqiming-dsh-layered-memory/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 3 · 最近提交 2026-09-29 · 主语言 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 github:DDDFXYqiming/dsh-layered-memory
把 DDDFXYqiming/dsh-layered-memory 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
简体中文 | English
dsh-layered-memory
Cross-session memory for DeepSeek Harness (DSH).
A DSH session loses its context the moment it ends. Come back to the same project tomorrow and you explain the environment again, and rediscover how you worked around that error last time. This plugin writes that kind of information to files on disk and pulls it back when a later session needs it.
Memory has three layers: an index, environment facts, and task experience. The L1 / L2 / L3 labels in the tool list below refer to those three.
What it looks like in use
Once installed, you just tell the agent.
The build command for this project is ```pnpm build && pnpm test~~, and the tests take about forty seconds. Remember that.
It writes the line into the memory store. Open a fresh session the next day and say "run the tests for me", and the command is already known.
It works the other way too. If you forget the flags a service needs, ask the agent to look them up in memory instead of scrolling back through old chats.
Install
dsh plugin --profile web add github:DDDFXYqiming/dsh-layered-memory
The plugin creates its directories and template files under <home>/.dsh/memory.
Usage
The agent decides when to read and write memory. The plugin registers one memory skill and 14 tools. Under progressive mode those tools stay hidden until the agent calls memory_activate once.
| Tool | Purpose |
|---|---|
memory_list |
List all memory (L2 facts + L3 sops + pending + L1 chars/budget) |
memory_read |
Read one entry (index / fact topic / sop filename) with provenance meta and related links; oversized entries return an outline plus head/tail excerpts, with full and from_line/to_line for the rest |
memory_search |
BM25 full-text search over facts, sops and archived entries |
memory_write |
Write a memory (fact/sop, evidence required, name collision snapshots the old version; evidence is quoted line by line and suspected secrets in it are redacted; plain-text secrets in the body are refused) |
memory_index |
Rebuild the L1 index auto-segment, keeping the [RULES] manual segment |
memory_pending |
List distilled candidates (fail-then-retry sequences) |
memory_accept |
Promote a pending candidate into a real entry |
memory_update |
Update an entry, keeping a history snapshot (body and provenance meta snapshotted together); new measurements can pass sourceSession/sourceSeqs, wording-only edits inherit the original source |
memory_archive |
Archive an entry (hidden from L1 and memory_read, file stays in place, still searchable, current version snapshotted first); unarchive: true restores visibility |
memory_rollback |
Roll back to the most recent .history/ snapshot (body and provenance meta restored together) |
memory_expand |
Expand the original events behind sourceSession / sourceSeqs |
memory_stats |
Counts for L2 / L3 / pending / archived and total size |
memory_maintain |
Merge same-name duplicate sections, exact/near-duplicate candidates, index audit, stats, merge candidates, cold-entry review |
memory_promote |
Promote project-local experience to the global namespace |
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
Aik358/dsh-auto-memory
QIANLING-0831/dsh-memory-plus
knqiufan/powercontext-dsh
paulalesius/dsh-hindsight-advanced
Spirtxiaoqi7/mindspace-dsh-session-memory