DeepSeek Harness plugin

dsh-memory-panel

Persistent memory plugin for DeepSeek Harness: memory_* model tools, automatic memory:recall prompt injection, /memory/api JSON routes, and a 设置→记忆 (Settings → Memory) management panel.

Jump to install

Source facts

Repository
sdf-jkl-gh/dsh-memory-panel
Latest update
Aug 15, 2026
Category
Memory
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/sdf-jkl-gh/dsh-memory-panel
Plugin: dsh-memory-panel
Author: sdf-jkl-gh

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer4 files
README.mdSource · read only
README language

dsh-memory-panel

> Persistent memory plugin for DeepSeek Harness: model-facing memory_* tools, automatic memory:recall prompt injection, /memory/api JSON routes, and a Settings → 记忆 (Memory) management panel.

![License: MIT](LICENSE) ![Node](package.json) ![CI](https://github.com/sdf-jkl-gh/dsh-memory-panel/actions/workflows/ci.yml)

中文说明 · [Design](./docs/design.md) · [FAQ](./docs/FAQ.md)

---

What it does

dsh-memory-panel gives every agent session a durable, searchable memory that survives process restarts:

CapabilityWhereDescription
memory_savemodel toolCreate or update a memory entry (title + content + tags + importance)
memory_searchmodel toolRanked keyword search — Latin whole-word plus CJK bigram scoring
memory_listmodel toolList entries newest-first, optionally filtered by tag, with tag/importance stats
memory_getmodel toolRead one full entry by id
memory_deletemodel toolDelete an entry by id
memory:recallsystem promptTop 6 memories (high-importance first) are auto-injected into every agent's prompt at assembly time
/memory/api/*host routeJSON API used by the settings panel
Settings → 记忆web panelBrowse, search, create, edit, and delete memories in the GUI

The plugin is mounted at the user layer of the DSH profile composition, so its tools are visible to every session regardless of which agent preset is active.

How it works

┌────────────────────────────  DSH host process  ───────────────────────────┐
│                                                                           │
│  tools registry  ◄── memory_save/search/list/get/delete  (model-facing)   │
│        ▲                                                                  │
│        │                     createMemoryStore (src/store.js)             │
│        │                     ┌──────────────────────────────────┐         │
│        │                     │ pure logic: scoring, recall,     │         │
│        └──── execute ────────│ serialized write chain           │         │
│                              └───────────────┬──────────────────┘         │
│                                              │ load / persist (injected)  │
│  /memory/api/* routes ◄── POST ──┐           ▼                            │
│        ▲                        │   fs service                            │
│        │                        │        │                                │
│  systemPrompt.memory:recall ◄───┘        ▼                                │
│        ▲                           <home>/.dsh-memory/memories.json      │
│        │ (30s guarded refresh +                                        │
│        │  refresh on every save/delete)                                 │
└────────┴───────────────────────────────────────────────────────────────────┘

┌──────────────────────────  browser (web client)  ─────────────────────────┐
│  Settings → 记忆 panel ── fetch('/memory/api/<method>', { method: 'POST' })│
└────────────────────────────────────────────────────────────────────────────┘
  • Storage: memories.json under <user home>/.dsh-memory/ — resolved from

the host sandboxPolicy.workspaceRoot, i.e. the user home, not the session workspace. Created on first save; survives restarts.

  • Concurrency: every mutation goes through a serialized write chain, so

concurrent saves/deletes can never interleave on the backing file.

  • Recall: the memory:recall system-prompt section renders a plain-string

cache synchronously (the section text hook is sync, ctx.fs is async); the cache is rebuilt after every save/delete and on a guarded 30s timer.

  • Scoring: title (×3) > tags (×2) > content (×1); CJK queries additionally

score every overlapping bigram, so short Chinese queries still hit long entries; high-importance entries get a flat +2 (and thus surface even on no-hit queries).

Installation

Option A — official CLI (bundle channel, recommended)

dsh plugin --profile <profile-name> add dsh-memory-panel

The package declares dsh.bundle.patch: ./cordis.patch.yml; the CLI reconciles the profile bundle stack and the patch inserts the plugin row, so no profile file edits are needed.

Option B — manual patch

Copy the package anywhere DSH can resolve it, then append to your profile's cordis.patch.yml:

- insert:
    - id: tool-memory
      name: 'dsh-memory-panel'

Restart DSH. New entries must be added with insert (an id-less override is ignored by the patch loader).

> Upgrading from an older manual mount: if your profile already mounts the > plugin row in its own cordis.patch.yml, remove that line before switching > to the bundle channel to avoid double-mounting (two host halves, duplicated > tools and routes).

Usage

As a model

Just talk naturally — or call the tools directly:

memory_save(title="User prefers Chinese thinking", content="...", tags=["preference"], importance="high")
memory_search(query="Chinese thinking")
memory_list(tag="preference")
memory_get(id="m...")
memory_delete(id="m...")

Every agent automatically sees the top saved memories through the memory:recall section (marked [重要] when high importance) and is told to call memory_search for the full picture.

In the GUI

Open Settings → 记忆 (Memory): browse all entries with stats, search, create/edit/delete. The panel talks to the host through POST /memory/api/* JSON routes.

Development

npm test          # node:test — pure-logic + plugin-level integration tests
src/
  index.js        Host half: tools, routes, recall injection (Cordis plugin)
  client.js       Client half: Settings → 记忆 panel (module-loader bundle)
  store.js        Pure logic: scoring, recall builder, injected store factory
test/
  store.test.js   Unit tests for src/store.js
  index.test.js   Integration tests with a mocked Cordis ctx + in-memory fs
docs/
  design.md       Architecture and data-flow deep dive
  FAQ.md          Common questions

License

[MIT](./LICENSE) © 2026 dsh-memory-panel contributors