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
- 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
- 02
`cd ~/.dsh/plugins/dsh-memory-keeper` then `npm install`
$ npm install
- 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`
- 04
`cd ~/.dsh/profiles/<your profile>` then `pnpm install`
- 05
Restart DSH
- 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
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 configuredIndex 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 supersededStatus 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 compactionHistory 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 directorySidebar 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.
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.
07Related DSH workflows
dsh-univer-office
by dream-num
Give DeepSeek Harness a real office environment. Univer Office Plugin brings spreadsheets, docs, slides, canvases, relational tables, and more into one runtime — with connected data, validation, versioned changes, and isolated worktrees for multi-agent collaboration.
clearai-dsh
by clearailhc
Brings an evidence-checked epistemic loop to DSH: research sessions settle into a browsable domain ontology with evidence chains and support levels; contradictory readings are surfaced for human adjudication.
dsh-fish-memory
by yuuyuko-uu
Stores time-stamped, decaying per-session memories, recalls relevant items, and optionally distills imported local archives through the configured DSH model.
dsh-trading
by zhu1090093659
Agent-native trading terminal built on DeepSeek Harness. Crypto, US, CN and HK in one three-column GUI, 19+ hot-swappable connectors, dry-run by default with human approval on every live order. BYOK, no data redistribution.
08Data and sources
- 这是 **DSH(DeepSeek Harness)的 cordis 插件**,**不是把目录丢进 `.dev/` 就生效**
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.
