dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
Long-term memory plugin for DeepSeek Harness (DSH): layered memory library + session distillation + deep-sleep consolidation + settings panel. 守藏记忆插件。
Give your DeepSeek Harness (DSH) assistant persistent memory across sessions: it sediments, reflects, recalls and forgets automatically — fully local, zero upload.
Shoucang (守藏): "to guard and preserve — collect well, never forget." Install it and forget about it — the plugin keeps memory tidied for you.
| Without memory | With Shoucang |
|---|---|
| Amnesia every session: same pitfalls re-stepped, preferences re-explained | The distiller sediments "what is worth remembering" from your real sessions — no manual upkeep |
| Hand-written memory files rot and grow, choking the context window | Dual personas + capacity gates: oversized entries are rejected at the write gate; stale ones auto-demote and archive |
| RAG remembers documents, not you | The memory source is your own sessions; recall goes situation-first (what you're doing / who is involved), then content similarity |
| Context bloats as memory piles up | Only a light index is injected per turn (budgeted); details are fetched on demand via pointers |
dsh plugin --profile web add github:Fishsb/dsh-shoucang-memory
dsh web
Three things you should see right after install:
Optional: install Ollama, pull bge-m3, and semantic recall turns on automatically — no config needed; without it, lexical retrieval works alone.
🧠 Recent growth (last deep-sleep consolidation, with verifiable source pointers):
[Principle] Verify pattern-derived sets · enumerate glob-matched targets before execution → notes/lessons.md §deletion-boundaries
[Shoucang · Hot memory] Three-layer criteria (when to do what):
· Mid/action layer: stop and backtrack after 2 consecutive no-progress attempts
- [Principle] Trust outcome evidence, not success codes → notes/lessons.md §false-green
Only lightweight index lines stay resident (budgeted, rotated on demand); details are fetched from the library via pointers — more memory, less context bloat.
flowchart LR
A[Session] -->|"idle ~10min"| B["Distiller<br/>pre-filter → LLM verdict → write gate"]
B --> M[("Memory library<br/>AGENT / USER / MEMORY<br/>+ notes")]
M -->|hot-memory index| A
M -->|"on-demand recall · lexical+vector"| A
A -->|"all stalled ≥3h"| C["Deep sleep<br/>principles & playbooks"]
C -->|atomic write| M
A <-.->|"MCL coaching"| M
Reliability: watermark-based crash safety (host restarts neither repeat nor lose runs), retry on transient failures, and per-item write-gate audits (even rejections are logged and visible).
| Layer | File | Content |
|---|---|---|
| Persona | AGENT.md | The agent's self-model: role / steady practices / boundaries / learned principles / task playbooks |
| Persona | USER.md | Your profile — preferences, habits, red lines |
| Index | MEMORY.md | Knowledge index: one pointer per line into details, loaded lightly each turn |
| Details | notes/*.md | Topic files (tools / flows / lessons / env / user / agent), fetched via pointers |
Sidebar entry in the DSH web UI (pure-frontend; theme follows the host):
Flat single-layer config; defaults mean "works out of the box":
| Key | Default | Description |
|---|---|---|
enableDistill | on | Distillation master switch |
idleWakeMs | 10 min | Idle threshold after a session |
distillPrescan | on | Signal-word pre-filter |
distillModel / sleepModel | inherit main | Per-pass subagent model overrides |
enableDeepSleep | on | Deep-sleep master switch |
deepSleepIdleMs | 3 h | All-stalled trigger threshold |
embedEnabled | on | Vector recall; auto-fallback when endpoint unreachable |
embedBaseUrl / embedModel | Ollama :11434 / bge-m3 | OpenAI-compatible embedding endpoint |
mclEnabled | on | Cognitive-loop first-step coaching |
capAgent / capUser / capMemory | 3000 / 3000 / 5000 | Write-gate character caps |
activityWarmDays / ColdDays / ArchiveDays | 14 / 44 / 90 | Forgetting cadence (days) |
bankGit | on | Local git snapshots of the library |
See the panel's Raw config view for the full list.
~/.dsh/suite/memory; override with MEMORY_ROOT) — never committed, published or uploadedscripts/check-public-tree.mjs — run it manually before pushing; it must PASS (no git hook, no CI automation — do not assume it runs itself)npm install --legacy-peer-deps
npm run typecheck && npm run build
npm test # single entry: full gate + behavior suite (check-runner)
Architecture overview: docs/ARCHITECTURE.md — privacy red lines and distillation criteria are all machine-checked in the npm test chain.
License: Apache-2.0