dsh-memory
ben7am1n
Durable cross-session SQLite memory for DeepSeek Harness
PROJECT TOPICS
PROJECT README
A one-section DeepSeek Harness bundle that pins the language an agent thinks, reasons, and replies in. The shipped default is Chinese mode: once installed, every agent composed by the deployment gets an ordered system-prompt section right after its persona telling the model to think and answer in Chinese.
It works on any DeepSeek Harness deployment (Web UI, headless, ACP) because it only contributes a system-prompt section — no tools, no shell access, no model changes.
dsh plugin --profile <name> add dsh-thinking-language
That installs the package into the profile and appends the bundle layer (the package declares dsh.bundle, so dsh plugin activates it automatically). Then:
dsh --profile <name>
The layer registers the thinking-language row, whose default config is the Chinese instruction. No further setup is needed. Verify the layer first without starting:
dsh --profile <name> --dump-config # shows a "# == dsh-thinking-language" layer
One row, three fields:
| Key | Default | Meaning |
|---|---|---|
text |
the Chinese instruction below | The instruction rendered as the thinking:language section. A template: complete {{…}} groups interpolate strictly against registered prompt variables ({{model}} and {{cwd}} are registered by the shipped agent loop). Empty text drops the section at render. |
complete |
false |
Make this section the complete system prompt, suppressing every other section. Leave off unless the language instruction must stand alone. |
The default text is:
请始终使用中文进行思考、推理与回复:你的思考过程(reasoning)与所有输出一律使用中文,包括对工具调用结果的解读与最终回答。
Patch layers replace the targeted row's whole config, so an override restates every key it wants. Put this in your profile's cordis.patch.yml (or a --patch overlay) to switch to English:
- id: thinking-language
config:
text: >-
Always think, reason, and reply in English.
The plugin exports the standard plugin contract (name, inject: ['systemPrompt'], Config type and Schemastery schema, apply) and registers one section:
thinking:language (exported as THINKING_LANGUAGE_SECTION).1 — immediately after the deployment persona (0), before the tool-guidance band (100–199), so the model reads the language instruction at the start of the prompt body.@deepseek-ai/dsh-persona) and this plugin coexist in the same composition.请始终使用中文进行思考、推理与回复:你的思考过程(reasoning)与所有输出一律使用中文,包括对工具调用结果的解读与最终回答。 — every request, for every agent on the deployment.pnpm install
pnpm test # vitest
pnpm typecheck # tsc --noEmit
pnpm build # tsdown -> lib/
pnpm smoke # mounts lib/ against the real peers and asserts the rendered prompt
The prepare script runs tsdown with a self-contained config, so installing from git (dsh plugin add github:you/dsh-thinking-language) also produces the published entry. @deepseek-ai/dsh-system-prompt and @deepseek-ai/cordis are peer dependencies resolved from the dsh installation the profile runs on.
pnpm publish (the files list ships lib/, cordis.patch.yml, and both READMEs; dsh.bundle points at the patch layer).pnpm pack, then dsh plugin add ./dsh-thinking-language-0.1.0.tgz.dsh plugin add github:you/dsh-thinking-language — pnpm runs prepare after install, which builds lib/ from source (users must allow the build for git dependencies).complete: true on a persona row), it suppresses this section along with every other section.^0.1.0-rc.2 targets the current rc series of @deepseek-ai/dsh-system-prompt; a future major may rename exports, which a peer bump would address.CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。