dsh-tingfeng
tingfeng-droid/dsh-tingfeng
Composable, view-based context for DeepSeek Harness. Pluggable sources and strategies, with layered memory and self-evolving skills out of the box.
Instalar
dsh plugin --profile web add github:tingfeng-droid/dsh-tingfengREADME
dsh-tingfeng
Upstream & License
This project is a fork of omdsh-dev/dsh-mnemon, distributed under the MIT License. The original copyright notice is retained in LICENSE:
Copyright (c) 2026 dsh-external contributors
Thanks to the upstream author for the original work.
English · 简体中文
Composable, view-based context for DeepSeek Harness.
Pluggable sources and strategies, with layered memory out of the box.
Install and start · Watch the demo · Documentation · Build a plugin
Why dsh-tingfeng
An Agent that starts every session from scratch keeps asking what it was already told. Putting everything into one memory store is no better: it either floods each turn or misses what matters. dsh-tingfeng gives DeepSeek Harness memory that is layered, visible and composable, and skills that improve with use.
- The right memory for each turn. Preferences and working facts stay in context. Project documents and long-term evidence are searched only when a question needs them.
- You can see what a turn used. Under each reply, the turn memory bar lists the documents and memories the turn read and wrote, and one click opens each in the Memory System. The Memory System shows everything that is stored and lets you edit it.
- Save to memory in one click. When a conversation turns up a fact worth keeping, the brain mark under the reply hands it to a task Agent, which removes duplicates, distils it and writes it to the right Memory Space, or saves it where you choose: working memory, your profile or a Memory Space. The receipt says where it went.
- Compose it on the Plugins page. Choose a main strategy and optional enhancements, and switch them without moving any data. Every component has its own page for its settings.
- Keep data where you want it. Local by default with Mnemon Native, or one of eight third-party Providers. Storage can be global, per workspace, centralized or in a directory you choose, with ZIP backup.
- Extend it. Sources and Strategies are ordinary DSH plugins built on public SDKs. An installed component gets the same pages and switches as the shipped ones.
See it in action
These recordings come from a real WebUI with the live DeepSeek model answering, on a seeded, fictional project, Lumen. Waits for the model play faster, marked in the lower right corner.
Save a new fact to memory. A reply reports a new measurement. Select the brain mark under it, cut the candidate down to the sentence worth keeping and send it to the task Agent; the receipt names the Memory Space it went to and opens it in one click.
See all memory in one place. Status, runtime memory, Project Documents and Memory Spaces live in the Memory System. The graph links memories through the entities they mention, and Ask Agent answers with the memories it cites, by content.
Compose memory on the Plugins page. One main strategy, its memory sources and optional enhancements, each switch applying at once. Every component has its own page, and storage, backup and interface settings live here too.
Every step is explained in the UI guide; all screens, recordings and the capture environment are in the v0.5.32 gallery.
Three kinds of memory
| Memory | Keep here | How it reaches the Agent |
|---|---|---|
| Runtime memory | Preferences, working agreements, facts needed on the next turn | Injected every turn as compact USER.md and MEMORY.md |
| Project Documents | Designs, investigations, procedures and handoffs | Searched first, then read when relevant |
| Memory Spaces | Durable facts, decisions, entities and their relationships | Recalled on demand from the enabled Providers |
The default Layered strategy keeps runtime memory resident and reads the other two on demand. The General strategy offers every available source within one budget and lets the model decide how to use each. A memory space is one named, Provider-backed scope for long-term evidence; the Chinese product term is 记忆空间.
Quick start
DSH loads the bundled cordis.patch.yml automatically. Do not copy its insert block into your profile: duplicate Mnemon entries prevent Settings from saving. See manual-installation recovery if you already copied it.
New to DSH? Install and start walks from an empty machine to your first memory, with a screenshot for every step. The short version, with Node.js 22.19 or later:
npm install --global pnpm
npx @deepseek-ai/dsh web
- In the page that opens, click Plugins → Add plugin, type
dsh-tingfeng, click Install, then Enable now. - Open Memory System in the sidebar. Status shows each memory component and Provider.
- Tell a conversation something to remember. The turn memory bar under the reply lists what the turn read and wrote, and the brain mark saves a reply to memory.
- For Memory Spaces, install the Mnemon CLI for Mnemon Native with
npm install --global @mnemon-dev/mnemon, or enable another Provider on the Memory Spaces page. - Choose the main strategy and enhancements under Plugins → dsh-tingfeng.
dsh-tingfeng supports published DSH 0.2.2-rc.1 and retains support for the 0.2.1 RC line and 0.2.0-rc.2. RC1 requires Node.js >=24.9.0; older Hosts follow their own Node.js requirements. The same package serves the desktop app's Plugins page, dsh plugin --profile web add dsh-tingfeng on the command line, and Headless with dsh plugin --profile headless add dsh-tingfeng; older hosts keep the release compatibility and upgrades names for them. Getting started continues from here, and compatibility and upgrades covers existing installations.
Three optional memory-hygiene features
In long use the problem is not that memory holds too little. It is that what it holds drifts out of step with reality and nobody notices. Each feature below addresses one form of that drift, and all three are off by default:
| Feature | Problem | What it does |
|---|---|---|
| Short handles | A 36-character UUID cannot be remembered, and every rewrite changes it | One Z001-style label per entry, recognised by the retrieval tools |
| Index generation | A hand-maintained index goes stale silently after a rename | Rewrites the marked region, checks it three ways, writes nothing on failure |
| Write gate | "Read the skill before writing" was executed 39% of the time | Refuses the first write of each turn so the skill actually gets read |
Short handles
Mnemon addresses entries by UUID, and the CLI has no update — a rewrite is a new row plus a soft-delete of the old one, so the UUID always changes. Remembering that UUID therefore stops working the moment the entry is reorganised.
A short handle gives each entry a Z001-style label. It points at the current row rather than naming a stable identity: a rewrite allocates a new handle, a deletion discards it, and numbers are never reused — reusing one would make Z015 in an earlier conversation name a different entry.
The retrieval tools check for a handle before running a normal retrieval and return that one entry when it resolves (mode: handle, score: 1). Anything unrecognised or no longer present falls back to normal retrieval rather than erroring or returning nothing.
Known limit: handles work only inside the plugin's tools. mnemon is a third-party CLI that knows nothing about them, so a shell retrieval still does an ordinary lexical match. Keep using anchor words for batch and scripted work.
Index generation
The index is injected every turn, which makes its failures worse than those of an ordinary generated file: a stale index is repaired by the next successful run, but a wrong index keeps being repeated to the model. The rendered block is therefore checked before it reaches disk, and any failure means nothing is written:
- the number of data rows equals the number of entries read
- every row carries a handle — no blanks, no placeholder dash
- no description merely restates its own title
Writes are deferred by a quiet period: a run that changes the library six times writes the file once, after it stops moving. provider: none calls no model at all and falls back to a summary line in the body or the first heading — usable on a machine without a local model.
Write gate
A skill enters context only when the skill tool opens it. A rule recorded in memory saying "read it before writing" was measured at 39% — having read a rule is not the same as following it.
The gate replaces remembering with being stopped: it refuses the first write of each turn and lets the second through. Refusing every time stalls a turn, and once a turn stalls nobody knows where.
- Writes only: every retrieval and inspection tool is never refused
- Four files only: the two runtime-memory projections and the two rule files; scratch files stay writable
- Shell writes are covered, and the criterion is the destination:
cp index /tmp/bakis allowed because the source is not a destination, whileecho x > indexis refused
Known limit: writing through an interpreter expression or a helper script gets through. Parsing the destination of an arbitrary program is not possible, and every widening costs a false refusal on a read — the gate exists to make the skill be read, not to stop a determined writer.
See the configuration reference.
How it works
- Sources own memory and its operations: Runtime memory, Project Documents and Memory Spaces, whose Providers are its children.
- A Strategy decides how the available Sources take part in a turn: what stays resident, what can be searched, and which tools and budgets apply. Enhancements add to it through standard slots.
- Core validates the result into one immutable View for the turn. The DSH Host pins it to that turn and controls tool access.
The same public contracts serve the shipped plugins and external repositories. Architecture explains ownership, the turn lifecycle and the UI regions components contribute to.
Pairing with dsh-compaction-vcc: rules and memory stay verbatim after compaction
An optional pairing. Each plugin works on its own; you only get the full effect with both.
Background. DSH's default compaction is LLM summarization: when the context nears its threshold, a model rewrites an older span into a summary. The problem is not that it gets shorter — it is that it gets rewritten. The summary reads fluently and looks factual, and the model then treats its own summary as a factual premise. One paraphrased number, one softened constraint, one dropped precondition is enough to put an entire downstream reasoning chain on a false footing.
For dialogue, what that mostly costs is precision. For rules and memory, what it costs is behaviour itself: "when the conclusion conflicts with the evidence, change the conclusion" summarized as "be careful with conclusions" is a different instruction — and the model has no way to notice it was edited.
dsh-compaction-vcc takes the other route: LLM-free conversation compilation. It never calls a model and never rewrites a word; it only moves original tokens, and every elision leaves a (seq N) pointer that the recall tool restores verbatim.
The two plugins connect through one flag:
| Component | Responsibility |
|---|---|
dsh-compaction-vcc | Keeps dialogue verbatim; elisions become (seq N) pointers, recallable |
dsh-tingfeng (this plugin) | Re-injects rules and memory verbatim after compaction; tags injected blocks with its own source.kind |
elideCheckpointInjectedBodies: true | Lets the engine replace the stale memory copy inside an old checkpoint with a one-line pointer — this plugin injects a fresh one anyway |
no summarizer anywhere in the loop — nothing in the context is ever rewritten
What you get: after many compactions, the agent can still quote your rules word for word, still tell a number you measured from a number it estimated, and still recall which conclusions were overturned. With summarization compaction, those three collapse into one fluent paragraph that reads like fact.
Install the compaction half:
dsh plugin --profile web add dsh-compaction-vcc
This plugin works without it — but compaction then still goes through the official summarizer, and rules and memory still get rewritten in long sessions.
Official plugins
The Starter pins a tested combination of independently versioned packages. One main strategy runs at a time; the enhancements are off until you turn them on.
| Package | Role | Default |
|---|---|---|
| dsh-tingfeng-source-runtime | Runtime memory: USER.md, MEMORY.md, revisions and local storage | On |
| dsh-tingfeng-source-documents | Project Documents: Markdown, search, revisions and archiving | On |
| dsh-tingfeng-source-memory-spaces | Memory Spaces: durable evidence and their Providers | On |
| dsh-tingfeng-strategy-default-three-tier | Layered strategy: resident runtime memory, the rest on demand | Selected |
| dsh-tingfeng-strategy-general | General strategy: every available source in one budget | Off |
| dsh-tingfeng-strategy-auto-capture | Active capture: in-turn guidance to keep useful facts | Off |
| dsh-tingfeng-strategy-light-context | Light context: a shared ceiling on resident context | Off |
| dsh-tingfeng-strategy-scoped | Scoped composition: ordered sources and a writable subset | Off |
Memory Spaces Providers: Mnemon Native (default, local, shipped in the package). The external Providers (OpenViking, Honcho, Mem0, Hindsight, Holographic, RetainDB, ByteRover, Supermemory) each publish on their own and install separately — they are neither in this repository nor bundled. See the Provider guide.
Build your own
Define a Source or Strategy with dsh-tingfeng/extension-sdk, add an enhancement through the standard slots, or write a Memory Spaces driver with dsh-tingfeng-source-memory-spaces/provider-sdk. A component can also add its own settings and Status card to the pages dsh-tingfeng shows. Your repository owns its manifest, dependencies, tests and build; DSH installs and mounts it, and choosing it as the main strategy is a separate decision.
Start with the plugin author guide. Discuss new capabilities and Providers in an Issue before a pull request; see CONTRIBUTING.
Data and trust
- Runtime memory and Project Documents are local files; Mnemon Native is local. Third-party Providers use their own services and scopes.
- Turning a component off does not erase its memory, and changing the storage location does not move data. Use ZIP backup to carry it.
- Skills keeps its evolution data (suggestions, test cases and the conversations reviews read, with secrets redacted) in the local storage root, outside backups. An Agent follows a skill from the market as written, so preview it before installing.
- Git sync publishes the same Mnemon Pack payload as readable files to a repository you own, so another machine can pull it, with Sync now, Check remote before anything is written, or Automatic sync. When two machines wrote one subject differently, both wordings stay until you accept and apply a Memory reconciliation plan; see Git repository sync.
- Saved Provider credentials stay on the Host and are never exported. Backups still contain private memory; protect them.
- Sources and Strategies are trusted in-process JavaScript, not sandboxed code. Remembered history never outranks current instructions.
Backup and recovery · Security policy · Release history · Roadmap
Develop and verify
pnpm install --frozen-lockfile
pnpm verify
pnpm verify:plugins
Use Node.js ^22.19.0 || >=24.0.0 and pnpm. node scripts/serve-e2e.mjs starts a disposable real WebUI; add --docs-demo for the seeded project behind these screenshots, and --live-model to have the DeepSeek API answer, with the key read from DEEPSEEK_API_KEY. Mechanical tests are not claims about model accuracy or live cloud Providers. Development and verification.
Star History
License
MIT. Third-party providers keep their own licenses and terms; see Third-party notices.




