Back to directory

dsh-memory

In a curated listMaintenance: Active

restregular/dsh-memory

Provides local-first long-term memory, optional vector recall, model-facing memory tools, automatic injection, and a management panel.

View on GitHubHomepage
$ dsh plugin --profile web add @restregular/dsh-memory

21

stars

2

forks

JavaScript

Language

MIT

License

2026-10-10

Created

2026-11-20

Last push

MIT-licensed, TypeScript DSH host plugin that keeps long-term memory in local JSONL with dual-channel (lexical + local llama-server) retrieval, per-turn recall, hard rules, rule hook scripts and a five-tab panel — no vector service required, no network requests unless you configure one.

DSH integration

Native runtime

Author-claimed

Safety audit

Unaudited

Last verified

2026-11-18

License

MIT

01What can it help you accomplish?

  • Keep a DSH session connected to the conclusions of earlier sessions

    Memories stored as local JSONL, a project / global digest injected at the first step of a new session, and per-turn recall that hands back impressions until the model asks `memory_get` for the full text

    Developers who run the same project across many DeepSeek Harness sessions and keep re-deriving the same conclusions

  • Turn team conventions and procedures into rules the model actually sees every turn

    A persistent rules block in the system prompt (`kind: rule`), a procedure index keyed by workspace and trigger words, and optional hook scripts that can reject a save, observe it, or rewrite / drop it before injection

    Teams that want hard rules and SOPs enforced rather than re-explained in every session

  • Review, search, back up and audit everything the memory system did

    A five-tab panel (service / records / memory tree / settings / audit) with a semantic-search switch, scope-level purpose and alias editing, and plain-JSON export that carries no vectors

    Users who want to check by hand what was stored, what was recalled, and take the data with them

02How to install into DeepSeek Harness

Prerequisites

  • Node.js 22.13 or newer — the README's Node.js badge declares ≥22.13
  • A DSH profile to install into: desktop (`~/.dsh/profiles/desktop`) or web (`~/.dsh/profiles/web`)

Installation steps

  1. 01

    $ dsh plugin --profile web add @restregular/dsh-memory

  2. 02

    In the profile directory: `pnpm add @restregular/dsh-memory` — the package ships a `cordis.patch.yml` that registers the single entry.

  3. 03

    Open 设置页 →「记忆系统」, or switch on the sidebar entry from 设置 → 侧栏入口.

  4. 04

    For semantic recall, install the local llama.cpp backend from the panel's 服务 → 向量服务 tab; without it retrieval stays lexical.

Verify the integration

Not specified by the author

Rollback

  • pnpm remove @restregular/dsh-memory
  • Then delete the `dsh-memory` entry from the profile's patch.
  • Uninstalling leaves the vector service and the memory files in `<storeDir>` / `<installRoot>`; clear them from the panel's 服务 → 维护 tab before you uninstall.

03DSH integration and capability boundaries

DSH integrationNative runtime

Native DSH host plugin: a single `cordis.patch.yml` entry in the profile provides the `memory` service, eight `memory_*` tools, the `agent/pre-step` injection chain and the `/memory/api` panel, while the client half registers the 「记忆系统」 settings page.

  • Eight memory tools for the model

    content to save, query strings, scope names, record ids→impressions (8-char id / scope / kind / tags / short summary) from `memory_search`, full text and metadata from `memory_get`, plus scope directory, block and hook management

    writes JSONL records under `storeDir`records what was returned in the session dedup state
  • Dual-channel retrieval (lexical + local vectors)

    a query string→memories ranked by relevance, with a relevance score when the vector channel is active

    calls the local llama-server `/v1/embeddings` endpoint when one is configuredwrites a `.vec` sidecar next to each scope file
  • Automatic recall and injection

    the current user question, the first step of a session, tool failures and tagged behaviours→injected digests, an impression per memory, a resident rules block and a procedure index

    inserts memory summaries into the system prompt and the conversation contextwrites the per-session dedup state under `<cwd>/.dsh/dsh-memory/sessions/`
  • Per-session memory permissions with out-of-scope approval

    the scope checkboxes, the read / write flags and the restriction level (absolute / normal / unrestricted)→tools only touch the authorised scopes; out-of-scope hits return a scope-only index and an approval card appears above that session's composer

    writes `<storeDir>/visibility/<session>.json` and `<storeDir>/grants/<session>.json`blocks the session row with a pending-approval badge while the card waits
  • Rule code (hook scripts)

    a JS snippet with a `hookPhase` of `before-save`, `after-save` or `before-inject`→a rejected save with a reason handed back to the model, an observation note, or a rewritten / dropped memory before it reaches the context

    stores code in `<storeDir>/hooks.json`, outside retrievalruns in a node:vm sandbox with no require / process / network and a 120ms timeout

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

Good for

  • Developers who run the same project across many DeepSeek Harness sessions and keep re-deriving the same conclusions
  • Teams that want hard rules and SOPs enforced rather than re-explained in every session
  • Users who want to check by hand what was stored, what was recalled, and take the data with them

Not for

  • Memory data stays on this machine as unencrypted JSONL, and exported files are plain text too — protecting the store directory is your job. The vector endpoint defaults to loopback.

05Compatibility, maintenance and safety notes

  • Memory data stays on this machine as unencrypted JSONL, and exported files are plain text too — protecting the store directory is your job. The vector endpoint defaults to loopback.
  • Audit entries live in memory only by default: capacity 2000 in total and 200 per session, keeping the digest / rules / delivery / error channels first — they are gone after a restart.
  • Same-content dedup is still decided inside one process, so two processes writing exactly identical content at the same time can in theory leave two records. Cross-process write locking itself is per scope.
  • The plugin only touches the network when an `endpoint` is set, `spawn` is configured, or the local backend was installed from the panel; otherwise it sends no requests and retrieval stays lexical.
2026-10-102026-11-12Not specified by the author

MIT · README on branch main · no tagged release, last push 2026-11-12

06Frequently asked questions

Do I need a vector model for dsh-memory to work?

No. The README states that without a vector service retrieval degrades to lexical search (IDF plus Chinese bigram) and no network requests are made. Semantic recall needs a local llama-server backend, which the panel can install in one click with per-model `dims` and `pooling` already paired.

Where does dsh-memory put my data?

Under `storeDir`, which defaults to `.dsh-memory` relative to the launch directory — the README recommends configuring an absolute path instead. Records are plain JSONL with `.vec` sidecars, scope metadata lives in `scope-meta/`, and the panel settings go to `settings.json`.

How do I install it into a DSH profile?

Run `dsh plugin --profile web add @restregular/dsh-memory`, or add the package to the profile's dependencies manually. Either way the package's own `cordis.patch.yml` registers exactly one entry. The README explains that the host allows only one package name and one resolution source, which is why the panel and the server side live in a single package.

What happens if a new session still cannot see my memories?

Check that `inject.recall` / auto-recall is on, that the current scope is inside the recall range (tag-triggered recall only covers global, the current session and the current workspace), and that the tags really matched. The panel's 审计 tab shows candidates, filtering, budget and delivery status for each injection.

How do I remove it, and does that delete my memories?

Run `pnpm remove @restregular/dsh-memory` and delete the entry from the profile patch. Uninstalling does not remove the configured vector service or the memory files — they live in `<storeDir>` and `<installRoot>`, so clear them from the panel's 服务 → 维护 tab first, because the panel is gone once the plugin is uninstalled.

08Data and sources

  • Author-claimedgithub.comabda402c0b9a…

    包自带 `cordis.patch.yml`,注册**唯一一条** entry:

  • Author-claimedgithub.comabda402c0b9a…

    面板分五个标签:**服务 / 记录 / 记忆树 / 设置 / 审计**。

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.