Back to directory

dsh-memory-keeper

In a curated listMaintenance: Active

flywalker68/dsh-memory-keeper

Makes the operator's markdown memory store and exported chat history searchable (local bge-small embeddings, optional Qwen embedding+rerank) and shows a memory panel in the Web UI.

View on GitHub
$ git clone https://github.com/flywalker68/dsh-memory-keeper.git ~/.dsh/plugins/dsh-memory-keeper

19

stars

1

forks

JavaScript

Language

MIT

License

2026-11-05

Created

2026-11-15

Last push

MIT cordis plugin that makes a hand-written `.md` memory store and exported chat history searchable inside DeepSeek Harness via BM25 plus local bge-small vectors fused with RRF, with optional Qwen embedding and rerank.

DSH integration

Native runtime

Author-claimed

Safety audit

Unaudited

Last verified

2026-11-18

License

MIT

01What can it help you accomplish?

  • Make a hand-written markdown memory store searchable from a DSH conversation

    `memory_search` results that fuse literal BM25 and vector recall, then restore the whole matched line plus one line of context from the source file

    Operators who already keep persona, diary and project notes as plain `.md` files and want the model to quote them instead of summarising

  • Find an earlier conversation by meaning rather than by keyword

    `chat_search` over exported chat records, understanding phrases like "three days ago" or "last week"

    Users who want to recall what was actually said in past sessions without importing the transcripts first

  • Keep the memory store healthy between sessions

    A status card injected every turn, a `memory_check` health report and a `persona_edit` that backs up before writing

    Long-running personal setups where the persona file and diary need progress, volume and staleness signals

02How to install into DeepSeek Harness

Prerequisites

  • Node 24+ and DSH 0.2.x — the README lists both, and says Windows / macOS / Linux all work
  • A markdown memory store: `.md` files under `~/.dsh/memory/` (the default `memoryDir`); filenames and file count do not matter

Installation steps

  1. 01

    `git clone https://github.com/flywalker68/dsh-memory-keeper.git ~/.dsh/plugins/dsh-memory-keeper`

    $ git clone https://github.com/flywalker68/dsh-memory-keeper.git ~/.dsh/plugins/dsh-memory-keeper

  2. 02

    `cd ~/.dsh/plugins/dsh-memory-keeper` then `npm install`

    $ npm install

  3. 03

    In `~/.dsh/profiles/<your profile>/package.json` add `"dsh-memory-keeper": "link:<absolute path>"` to `dependencies` and `"dsh-memory-keeper"` to `dsh.profile.bundles`

  4. 04

    `cd ~/.dsh/profiles/<your profile>` then `pnpm install`

  5. 05

    Restart DSH

  6. 06

    Set `workspace` to an absolute path in `~/.dsh/profiles/<profile>/cordis.patch.yml` — leaving it empty makes `process.cwd()` resolve to the profile directory, which silently indexes nothing

Verify the integration

  • After DSH starts, `~/.dsh/memory-keeper.log` should contain the line `INFO 已注册工具 memory_search`
  • The header of a `memory_search` result shows `(向量+词面)` when vectors work; a bare `3 条` without that marker means only literal search ran

Rollback

  • Delete `<workspace>/.tools/memory-index.json` and `<workspace>/.tools/memory-vectors.json` to force a clean rebuild on the next search
  • Set `embeddingEnabled: false` to drop vector search entirely — zero downloads, zero API, literal search only

03DSH integration and capability boundaries

DSH integrationNative runtime

A cordis plugin loaded through the DSH profile: add it to the profile `package.json` (`dependencies` plus `dsh.profile.bundles`), run `pnpm install`, restart DSH, and the Host registers `memory_search` and the other tools while the client adds a sidebar memory panel.

  • Two-way memory retrieval

    a query, `top=10` and an optional `beforeDate`→BM25 plus vector candidates fused with RRF, optionally reranked by Qwen, with the full source line and one context line attached

    rebuilds the index under `<workspace>/.tools/` when the source files' path, size or mtime changesends the query and text vectors to Bailian when a Qwen key is configured
  • Index builder

    markdown files in `memoryDir`→one chunk per line with `text` (300 chars), `date`, `file` and `line`

    skips heading lines, quoted lines, separators, lines under 6 characters and entries marked as superseded
  • Status card and post-compaction recall

    the assembled system prompt and the `compaction/summary` event→a per-turn card (days known, diary progress, schedule, half-life candidates, persona drift) and the last 10 turns of verbatim text after a compaction

    adds text to the system prompt on every turn and after each compaction
  • History import script

    a directory of `.jsonl` files or a single jsonl file→one `.md` per input file, one line per turn, prefixed with a date so the line joins time-window filtering

    writes new markdown files into the target memory directory
  • Sidebar memory panel

    the local memory store→an overview of the whole store in the DSH Web UI

    the README notes the panel has not been tried on other people's DSH versions

04Who is it for? When not to use it?

Good for

  • Operators who already keep persona, diary and project notes as plain `.md` files and want the model to quote them instead of summarising
  • Users who want to recall what was actually said in past sessions without importing the transcripts first
  • Long-running personal setups where the persona file and diary need progress, volume and staleness signals

Not for

  • It is a retrieval layer, not a full memory system: turn-by-turn replay, incremental extraction, summarisation and forgetting are out of scope, and the plugin reads what you already write instead of writing it for you. The chunking, index rebuild, fusion, time window, status card and post-compaction recall are guaranteed by code; when to write a diary entry or whether to trim is left to your `AGENTS.md`.
  • Memory data always stays local; only the retrieval query and text vectors go to Bailian, and only when a Qwen key is configured. Without a key, a failure, a timeout or three consecutive failures it falls back to the local bge-small model.
  • `sharp` must actually build: `npm install --ignore-scripts` leaves only source without the libvips binary, `@xenova/transformers` requires it, and vector search then dies silently while the plugin still starts.
  • The README itself lists unverified points: whether `pnpm install` is strictly required, how `link:` paths behave with Windows backslashes, the exact log path, the retrieval quality with `embeddingEnabled` off, and how the panel renders on other DSH versions. The author also says the plugin is lightweight and large memory stores are not optimised yet.

05Compatibility, maintenance and safety notes

  • It is a retrieval layer, not a full memory system: turn-by-turn replay, incremental extraction, summarisation and forgetting are out of scope, and the plugin reads what you already write instead of writing it for you. The chunking, index rebuild, fusion, time window, status card and post-compaction recall are guaranteed by code; when to write a diary entry or whether to trim is left to your `AGENTS.md`.
  • Memory data always stays local; only the retrieval query and text vectors go to Bailian, and only when a Qwen key is configured. Without a key, a failure, a timeout or three consecutive failures it falls back to the local bge-small model.
  • `sharp` must actually build: `npm install --ignore-scripts` leaves only source without the libvips binary, `@xenova/transformers` requires it, and vector search then dies silently while the plugin still starts.
  • The README itself lists unverified points: whether `pnpm install` is strictly required, how `link:` paths behave with Windows backslashes, the exact log path, the retrieval quality with `embeddingEnabled` off, and how the panel renders on other DSH versions. The author also says the plugin is lightweight and large memory stores are not optimised yet.
2026-11-052026-11-15Not specified by the author

MIT · README 分支 main(无 release)

06Frequently asked questions

Why does the plugin index nothing after install?

Almost always because `workspace` is empty. In DSH `process.cwd()` resolves to the profile directory, not your workspace, so the plugin finds zero diaries and searches return nothing without any error. Set `workspace` to an absolute path in `~/.dsh/profiles/<profile>/cordis.patch.yml` — the code now also emits a WARN.

Do I need a Bailian API key?

No. Without a key retrieval uses the local `Xenova/bge-small-zh-v1.5` model (about 24 MB, int8, downloaded to the plugin's `models/` on first search via hf-mirror) and works offline. With a key, `qwen3.7-text-embedding` plus `qwen3.7-text-rerank` take over and any failure, timeout or three consecutive failures fall back to local.

How do I know vector search is actually working?

Look at the `memory_search` result header. `3 条(向量+词面)` means vectors and literal search both ran; a bare `3 条` means only literal search, usually because `sharp` was not built. If `sharp` failed, reinstall with `npm install --ignore-scripts`, then `npm install-scripts approve sharp` and `npm rebuild sharp`.

What does it deliberately not do?

It does not replay turns, extract new memories, summarise or forget. Chunking, index rebuild, two-way retrieval with fusion, time windows, the status card and post-compaction recall are guaranteed by code; when to write a diary entry, whether to record a relationship fragment and what to trim are left to your `AGENTS.md`, and if the model skips them that memory simply does not exist.

How do I reset the index?

Delete `<workspace>/.tools/memory-index.json` and `<workspace>/.tools/memory-vectors.json` — the next search rebuilds them automatically. You normally do not need to: the index compares path, size and mtime of every source file and rebuilds on change.

08Data and sources

  • Author-claimedgithub.com56860da0d1ad…

    - 这是 **DSH(DeepSeek Harness)的 cordis 插件**,**不是把目录丢进 `.dev/` 就生效**

  • Author-claimedgithub.com56860da0d1ad…

    DSH 是通过 **profile 的 `package.json`** 加载插件的,光把目录放进去不会生效。

This page is generated from the project’s public documentation, repository metadata and a structured parse of DSH Plugins; last verified on 2026-11-18. Found an error? Submit a correction.

🏆

Best DeepSeek Harness Plugins

Twelve plugins worth installing first — picked from the whole catalog, across every category.

DSH Plugins is an independent community directory of DeepSeek Harness plugins. Not affiliated with or endorsed by DeepSeek. Third-party plugins are not security-audited — review the source before installing.

New DeepSeek Harness plugins, weekly. No spam.