dsh-memory-plugin
August 22, 2026 · View on GitHub
A local, privacy-first memory plugin for DeepSeek Harness.
Behavior
- Stores normalized memories in TSV under
DSH_MEMORY_HOME(default~/.dsh/memory). - Injects only relevant rows at session start and before each step, bounded by
maxInjectedBytes. - Discovers Cursor, Copilot, Cline/Roo, Windsurf, Lingma, Zed, Qwen,
AGENTS.md, andCLAUDE.mdfiles without reading them by default. - Optional external import summarizes a source once into project memory; it is disabled by default.
- After
turn/end, sends a redacted, bounded transcript to a configured OpenAI-compatible extractor and validates changes before writing. - API credentials are read only from the environment named by
apiKeyEnv.
Local setup
cd /home/admin1/program/dsh
npm install
npm run build
export MIMO_API_KEY='...'
Add cordis.patch.yml to a local profile patch (or copy its row into the profile's patch), then restart the Harness. The patch uses the local path and is intentionally not published.
Data files
user-memory.tsv contains user-scoped rows. Project rows live in projects/<sha256-of-workspace>/memory.tsv; manifest.json records the schema version. Writes are atomic and previous files are copied into archive/ before replacement.
The memory extractor is advisory: invalid responses, low-confidence candidates, or provider failures do not affect the task result. Current user instructions always outrank injected memories.
Explicit external import
The first version exposes the import behavior through configuration (autoImportExternal: true) for controlled local testing. Keep it false during ordinary use to satisfy the “discover, don't read” policy; a future command/UI can request individual source paths explicitly.
MiMo test
Use only a sanitized fixture and keep the key out of files/logs:
MIMO_API_KEY="$MIMO_API_KEY" npm run test:api
Rotate any API key pasted into a chat or shell history after testing.