DeepSeek Harness Plugin

wojiao42/dsh-long-term-memory

Stars ★ 0 Category Memory Added 2026-11-16

Long-term memory for DSH: injects your Markdown memory file at each session start, adds read/write/recall/undo tools with backup and audit, and lists your detailed profile files (interests / profile / project notes) with guidance on when to read them. Zero dependencies; never opens a network connection.

Install

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:wojiao42/dsh-long-term-memory

Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).

README

Renamed from dsh-memory-file in v2.0.0. Data format and config are fully compatible.

简体中文(完整版) · English (abridged)

This is an abridged English version. The Chinese README is the source of truth; details that change often (design notes, changelog, screenshots) live there.

File-backed long-term memory for DeepSeek Harness: injects your own Markdown memory file at each session start, and adds tools to write it, queue uncertain lines for review, undo a bad write, and audit what it actually read. Reads no conversations by default, never opens a network connection, never deletes files.

What it does

  • Injects your Markdown memory file once per session (the first pre-step), so it is not re-sent on every turn.
  • 7 agent tools: memory_add, memory_recall, memory_list, memory_undo, memory_pending, memory_scan, memory_status.
  • Every write is backed up in full first; memory_undo restores the previous file; low-confidence lines go to MEMORY.pending.md instead of the memory file.
  • Optional autoScan (default off): reads local session logs only to surface your own recent lines, so the agent can file them.
  • memory_status reports DSH_HOME and session counts, so a moved harness home does not look like "all history is gone".

Quick start

GUI (recommended on desktop): Settings (Ctrl+,) → Plugin market → Custom install → github:wojiao42/dsh-long-term-memory, then restart DSH.

The desktop profile is app-managed: running dsh plugin --profile desktop add may be rejected; if it is, use the GUI step above.

Command line (Web profile):

dsh plugin --profile web add github:wojiao42/dsh-long-term-memory

Refresh the page afterwards.

Local source: Plugin market → Custom install → the absolute path on your machine; restart DSH after code changes (the install is a copy, not a link).

Key limits

  • Reads no messages: the only subscription is agent/pre-step, whose arguments never destructure them.
  • Session logs are not read unless autoScan: true; that scan is read-only, capped at 8MB per file and 32MB per run.
  • No network calls, no child_process, no rm / rename / chmod.
  • Writes only to the memory file, its backup/, MEMORY.pending.md and .autoscan.json; all paths are derived, never passed in.
  • memory_recall is literal keyword search, not semantic search. memory_add does not deduplicate. memory_undo rolls back the whole file, not one line.

Compatibility

  • Install sources: npm / github / local path.
  • Host-side plugin for DSH Desktop and DSH Web; no client UI, so no dsh.client (enabled via dsh.bundle.patch).
  • Dependencies: only @deepseek-ai/dsh-llm and @deepseek-ai/dsh-tools, both provided by the host. No third-party packages.
  • No engines or peerDependencies declared. Node must provide zlib.zstdDecompressSync (Node 22.15 / 23.8+).
  • Self-test, both offline: node smoke.mjs (51 assertions) and node tools/publish-test.mjs (25 assertions).

License

MIT. See LICENSE.

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.