dsh-memory-panel
Long-term memory for DeepSeek Harness (dsh): durable, cross-session memory tools plus a sidebar panel that shows what the agent remembers about you.
What it does
memory_save— store a memory (creates or updates by key)memory_recall— search memories by keyword or categorymemory_list— list all memories, optionally filtered by category- Sidebar memory panel — a "记忆" button in the web sidebar opens a panel visualizing the memory store
Memories live in ~/.dsh/memory.json — plain JSON on your machine, nothing leaves it.
Features
- Atomic writes: write-to-temp + rename, readers never see a torn file
- Write serialization: concurrent
memory_savecalls queue instead of clobbering each other - Corruption recovery: a broken
memory.jsonis backed up tomemory.json.corrupt-<ts>before continuing fresh — no silent data loss - Growth control: content capped at 4000 chars, store capped at 500 entries (oldest evicted), recall results capped at 30
- Optional filter:
memory_listworks with or withoutcategory_filter - Tunnel-aware UI: the panel warns when accessed through a tunnel where the browser-trust fence blocks
/api/*
Install
# web profile (interactive GUI)
dsh plugin --profile web add dsh-memory-panel
# headless profile (one-shot runs) — same bundle, separate install
dsh plugin --profile headless add dsh-memory-panel
Install from GitHub directly (no npm needed):
dsh plugin --profile web add github:x2it/dsh-memory-panel
Restart dsh web after installing, then open the sidebar "记忆" button.
Verify
dsh --profile web --dump-config | grep memory-panel
The agent should now list memory_save / memory_recall / memory_list among its tools.
How it works
agent tools (memory_save/recall/list)
│ ctx.tools.register
▼
host plugin (lib/index.js)
│ GET /api/memory (ctx.webServer)
▼
client panel (lib/client.js, sidebar.footer.action slot)
One plugin row (memory-panel) carries both halves: the host loader imports main, the web client loads ./client.
Development
npm install
npm run typecheck # tsc --noEmit
npm run build # esbuild → lib/index.js + lib/client.js
npm pack # tarball
Install the local tarball to test before publishing:
npm pack
dsh plugin --profile web add ./dsh-memory-panel-0.1.0.tgz
Layout
src/index.ts # host half: memory tools + /api/memory endpoint
src/client/index.tsx # client half: sidebar memory panel
lib/ # built artifacts (generated by build.mjs)
cordis.patch.yml # bundle patch (dsh.bundle.patch)
Security
The /api/memory endpoint has no authentication — bind dsh web to localhost or a trusted network. The plugin stores memory content in plaintext at ~/.dsh/memory.json; do not save secrets you would not write to a local file.
License
MIT
No comments yet. Be the first to write one.