x-000001/dsh-memory-plugin ↗★ 0
dsh-plugin-memory
Cross-project long-term memory for DeepSeek Harness: four isolated stores, progressive disclosure, audited habit learning, zero-LLM core. 适合需要跨会话、跨项目持久化存储和召回习惯与知识的用户。
同名パッケージの別リポジトリ
インストール
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:x-000001/dsh-memory-pluginドキュメント
README 全文を読む ↗Minimal usage example (agent side)
// tool call
{ "name": "memory_remember", "arguments": {
"title": "Indentation style",
"content": "This repo uses tabs, never spaces.",
"tags": ["style", "formatting"],
"layer": "project"
} }
// -> { "ok": true, "id": "mem_ab12cd34", "version": 1, "layer": "project", "deduped": false }
{ "name": "memory_recall", "arguments": { "query": "indentation style" } }
// -> { "items": [{ "id": "mem_ab12cd34", "title": "Indentation style", "excerpt": "…", "chars": 41 }],
// "tier": "full", "spentChars": 41, "sessionSpentChars": 41, "dedupedIds": [] }
Every response is plain JSON; the model-facing text is the canonical value rendered by output.render.
Configuration
Loader row defaults live in cordis.patch.yml. All keys are optional and merge over
the defaults in src/config.ts:
| Key | Default | Meaning |
|---|---|---|
projectMemoryDir | .dsh/memory | repo-relative project store |
globalMemoryDir | ~/.dsh/memory | global store (~ = DSH_HOME) |
habitDir | ~/.dsh/storages/habit | habit store |
cacheStable | true | keep the injected prefix byte-stable |
budget.indexMaxLines | 24 | resident index hard cap |
budget.indexMaxLineChars | 150 | one index line cap |
budget.indexMaxChars | 3000 | total index cap |
budget.recallMaxResults | 5 | top-K per recall |
budget.recallMaxCharsPerMemory | 1200 | body cap per recall item |
budget.recallMaxTotalChars | 4000 | total injected chars per call |
budget.recallSessionBudgetChars | 12000 | per-session cumulative recall budget |
budget.habitPromptMaxChars | 800 | habit hint injection cap |
budget.unloadThresholdChars | 16000 | long-output offload threshold |
lifecycle.expireDays | 30 | expiry |
lifecycle.dormantDays | 14 | dormant after |
lifecycle.weakRecallDays | 30 | weak renewal window |
lifecycle.capacity | 500 | entries before eviction |
habit.enabled | true | deterministic observation |
habit.threshold | 3 | corrections per session before one judge call |
habit.maxEvidence | 5 | evidence slices sent to the judge |
habit.judgeEnabled | false | optional judge (off = not a failure) |
habit.judgeProvider / habit.judgeModel | "" | explicit route; never guessed |
habit.judgeTimeoutMs | 4000 | timeout → fail open |
habit.minSessionsForAuto | 2 | distinct sessions required before auto |
guard.blockEnvAssignments | true | also reject FOO_SECRET=… style assignments |
guard.extraDenyPatterns | [] | extra regex sources |