dsh-lite-memory
DiscoveredZero resident memory for the DeepSeek Harness: reads only on a hit, costs nothing when nothing matches.
dsh-lite-memory
没有常驻的记忆正文:不写系统提示,不逐轮注入,命中才读。 No memory in the prompt: nothing injected per turn, read only on a hit.
它是什么 / What it is
给 DeepSeek Harness 的轻量记忆:不写常驻系统提示、不逐轮注入、不扫描文件。记忆只在两种时刻出现——你说「记一下」,或者这句话跟已有条目真有关(最多三条标题,正文仍按需读)。
Lightweight memory for the DeepSeek Harness. No standing system prompt, nothing injected per turn, no file scanning. Memory appears at exactly two moments: you ask it to remember, or the message genuinely overlaps an existing entry (at most three titles; bodies are read on demand).
触发方式 / Triggers
| 场景 | 行为 |
|---|---|
| L0 你明确要求「记住这个」 | 立即写盘,一条确认行 |
| L1 它发现有跨会话价值的经验 | 一行灰字 memory · suggested "X" · sug_x + 一个 keep 按钮;标题加一句话,看得懂才点,不点就永远不写,48 小时内不重复 |
| L2 常识、一次性参数、凭据的值 | 永不写入 |
这些行只属于产生它的那一轮:每轮按那轮自己的工具结果重建,重进会话还能看见,别的轮不会混进来。再记一次时插件自己判是更新还是新增:同层、同前置条件下,标题(或这条用过的旧标题)完全一致就更新原条目,换过说法而标题变了的旧标题记成别名以后也认得。像但不同名的不写:先在结果里回「相近:X」和它的 id,确认要更新就带那个 id 再存,确认是另一条才加 resolution="distinct"。更新时没给的字段保持原值,正文整段替换——旧正文原样留在 versions 里(每字都留,不截断);前置条件不同的同一主题是两条。
写入时分两层:默认只在这个项目生效;用户说「以后所有项目都这样」才进全局层(200 条起提示,硬上限 1000 条),检索时一起查。同一主题在不同前提下用 when 区分,各存一条。
触发词:记住、记一下、上次、规范、约定、路径、凭据怎么取。
真命中看这句话和记忆的标题(含旧标题)、标签、触发词、摘要有没有对得上的词:有就多一行「已有记忆可能相关」,最多三条标题和 id;没对上就不出现,不改命中计数,正文要 memory_read 才读。一条记忆写了触发词,用户说到那个词也算命中。
| Case | Behaviour |
|---|---|
| L0 you ask it to remember | written immediately, one confirmation line |
| L1 it spots something worth keeping | one muted line memory · suggested "X" · sug_x with a single keep button — readable before you click, nothing written unless you click, at most once per two days |
| L2 common sense, one-off parameters, credential values | never written |
Those lines belong to the turn that made them: each turn is rebuilt from its own tool results, so reopening the session shows them again and no other turn leaks in. Saving again updates an entry only when the title (or one of its earlier titles) matches exactly under the same precondition. A merely similar title writes nothing first: the result reports the closest entry and its id, so the caller either updates that id or re-saves with resolution="distinct". An update keeps every field it was not given and replaces the body wholesale; the previous body stays in versions verbatim. The same subject under different preconditions stays two entries.
Writes land in one of two layers: the current project by default, or the global layer (warns past 200, hard ceiling 1000) when the user says the rule holds for every project. Both layers are searched together, and a when field separates the same subject under different preconditions.
点一下就存 / One click, no turn
keep 是同源直写:不产生消息、不动输入框、不打断当前回复。按钮变 kept 就结束了。真写过的行尾才有 ✕,按 id 带着写入时的版本撤销:改过的条目还原成上一版(显示 restored),刚建的条目移入归档(显示 archived);条目后来又改过就停下并提示版本已变,不覆盖后来的修改。没变、需要确认、保存失败的行没有撤销。
keep writes straight to disk from the page: no message, no extra model turn, the input box untouched. The button turns into kept and that is the whole interaction. Only a row that really changed gets the ✕, and it undoes by id with the version it wrote: an edited entry goes back to its previous version (restored), a freshly created one moves to the archive (archived); if the entry changed again it stops and says the version moved instead of overwriting. Noop, needs-confirmation and failed saves get no undo.
每轮引用条 / Per-turn references
每次回复末尾、在「已编辑 N 个文件」下面,按这一轮实际发生的工具结果留几行:本轮参考 N 条 和 本轮更新 N 条。点开是记忆名,再点一条就地展开当前正文;名字、版本都说当前值——改过名显示新名字,改过版本显示「当前第 N 版」,归档的标「已归档」,删掉的显示「已删除」。同一轮同一版本只出现一次;没读过也没写过就整段不出现。切换会话不丢,每轮只按自己的工具结果重建。本轮有更新时另有 准备续聊摘要,只列这一轮的记忆 id、名字和版本,可复制。
Each completed turn keeps a few lines under 「已编辑 N 个文件」, built from that turn's own tool results: 本轮参考 N 条 and 本轮更新 N 条. A line expands to memory names, a name expands to the body as it is now — current title, current version, archived marked, deleted said outright. One row per version per turn; nothing read or written, nothing shown. Switching conversations keeps them, because each turn is rebuilt from its own tool results only. A turn that changed memory also offers 准备续聊摘要, listing just that turn's ids, names and versions, ready to copy.
为什么轻 / Why it stays light
-
0 依赖,存储层无定时器、无监听、无网络,只有同步单文件写;写入用一把有超时的锁,别的进程正在写就明确报「忙」,不抢别人的锁。
-
搜索最多 4 条、400 字;正文只在
memory_read里出现,全文永不进上下文。 -
普通检索只列当前有效的记录;已经归档或被新版本替换的旧说法不混进来,要查历史得在
memory_search里显式要history。 -
上限:单条正文 4096 字节、整库正文 512 KB、每层 1000 条、标题与摘要各 60 字;每层 200 条只当提示线。90 天未用只留
id + 标题。到了硬上限不拒绝新记忆:把同层最久没被读的一条移进归档,保存结果里写明是哪条(正文与完整记录都留着,可人工取回),单条本身超预算才报错;用户明确说「别记」也进归档。文件从不删除。 -
一个项目一个目录,项目之间互相看不见。
-
Zero dependencies. The store has no timers, no listeners, no network — just synchronous single-file writes, guarded by a lock that gives up after 500 ms instead of stealing it.
-
Search returns at most 4 hits and 400 characters. Full text only appears in
memory_read. -
Normal search lists current entries only; archived notes and superseded wording stay out unless
memory_searchasks forhistory. -
Limits: 4096 bytes per body, 512 KB of bodies per store, 1000 entries per layer, 60 characters per title or summary; 200 entries per layer is just a warning line. At the hard ceiling a save is never refused: the least recently read entry in the same layer moves to archive and the result names it (body and full record kept, restorable by hand); only an entry that alone exceeds the budget fails. Saying 「别记」 also archives. Files are never deleted.
-
One directory per project, so projects never see each other's notes.
安装 / Install
Plugin Manager 里搜 dsh-lite-memory 直接装;或 npm pack 后用 Plugin Manager 安装生成的 .tgz。
Install from the DSH Plugin Manager (search dsh-lite-memory), or npm pack and install the resulting .tgz through it.
工具 / Tools
memory_save · memory_suggest · memory_search · memory_read · memory_forget
完整触发规则见 TRIGGERS.md;性能与 UI 门禁的实测数字见 docs/BENCH.md。 / Full trigger rules: TRIGGERS.md; measured performance and UI-gate evidence: docs/BENCH.md.
License
MIT
Comments
Loading…
Similar plugins
by CuteSamurai24
Small file memory for DeepSeek Harness. The model writes markdown, the host injects it.
★ 0
MIT
JavaScript
Aug 18, 2026
dsh plugin --profile web add dsh-md-memoryby topkie
Local memory for DeepSeek Harness: what you write is filed under a topic and linked to related entries, recall ranks results by embedding similarity (word matching when no model is installed), and the
★ 0
MIT
JavaScript
Oct 24, 2026
dsh plugin --profile web add dsh-latticeby AllenWES365
Project-isolated long-term memory for DeepSeek Harness: each project keeps its own bank, and one aggregate view sees them all.
★ 0
MIT
JavaScript
Sep 27, 2026
dsh plugin --profile web add dsh-local-memoryby wilburli
零外部依赖的 LLM 长期记忆插件,专为 [DeepSeek Harness] 设计。
★ 8
TypeScript
Aug 27, 2026
dsh plugin --profile web add only-memoryby hydra-db
Persistent long-term memory for the DeepSeek Harness (dsh), powered by HydraDB.
★ 0
Apache-2.0
JavaScript
Oct 16, 2026
dsh plugin --profile web add dsh-hydradbby 00080000
Read-time project memory plugin for DeepSeek Harness (dsh)
★ 26
↓ 971/wk
MIT
JavaScript
Oct 25, 2026
dsh plugin --profile web add @yolk_vat-y/dsh-project-memory