dsh-tiered-memory
Manifest validTiered persistent memory (user/env/project) with per-tier char budgets and semantic query routing; full layers refuse writes instead of silently evicting.
dsh-tiered-memory
分层记忆 + 预算管理(Tiered memory with per-tier budgets)。 移植 Hermes Agent 的记忆纪律:dsh 生态约 65 个记忆插件全是单层存储,本插件是 分层 + 预算概念的首个实现。
What it does
三个 tier(user / env / project)+ 每层 char 预算:
- mem_set — 写稳定事实到层(tier + key + content)。同 key upsert。层满拒绝写。
- mem_get — 按 key 精确读。
- mem_query — 语义查询:自动路由到对应层(用户特征词→user,环境词→env,项目词→project),只在档案真有时返回。
- tier_summary — 各层用量 + 驱逐候选(冷/旧条目)。
- mem_delete — 显式删除(淘汰权交模型,不自动删)。
Hermes 纪律的移植点
| Hermes | 本插件 |
|---|---|
| 四层记忆(user/memory/wiki/skills) | 三层 tier(user/env/project),每层预算 |
| 满层拒绝 → 替换/合并 | add 返回 tier full — delete or merge first |
| 只写稳定事实(不写过程) | content 声明式事实,单条 cap(默认 400) |
| 查询时机:只在真有用时查 | mem_query 无命中返回 [],不编造 |
| 淘汰:满了替换/合并 | tier_summary 列候选,mem_delete 显式删 |
验证
单测 node --test(tiers.js 行覆盖 98.5%);真实 headless e2e:
- 三层写入 + 跨层查询路由正确(user→user / env→env,未跨层)
- 预算拒绝闭环:第二写被拒 → tier_summary 看候选 → mem_delete 冷条目 → 重写成功
安装/开发
# from GitHub (requires dsh CLI)
dsh plugin --profile web add "github:leetom314/dsh-tiered-memory#main"
# or clone and verify locally first
git clone https://github.com/leetom314/dsh-tiered-memory.git
cd dsh-tiered-memory && ./setup.sh && npm test && ./verify.sh # e2e 隔离 DSH_HOME,不碰真实记忆
verify.sh 动态生成临时 overlay($HERE/index.js 路径),不需要仓库内 overlay 文件——overlay*.yml 已 gitignore(含本机绝对路径,不随版本库分发)。
Comments
Loading…
Similar plugins
by pomelotea-yuzu
Layered (global + per-project) bounded file-backed memory for DeepSeek Harness — model-curated with user intervention, versioned writes, TTL expiry, session search, and an in-chat memory panel
★ 0
MIT
TypeScript
Aug 24, 2026
dsh plugin --profile web add @deepseek-ai/dsh-memory-layeredUser-authored tiered long-term memory for DeepSeek Harness: injected as a system-prompt section, with a Chinese panel to view and edit it. The AI never writes to memory on its own.
★ 1
MIT
JavaScript
dsh plugin --profile web add dsh-user-memoryby tluoluo
Persistent memory for DeepSeek Harness: per-conversation notes, selective injection, project memory, semantic Vault search + automatic retrieval.
★ 4
↓ 115/wk
MIT
TypeScript
Aug 16, 2026
dsh plugin --profile web add dsh-persistby guyuefangyuanl
Cross-session persistent memory for the DeepSeek Harness: a model-facing memory tool, an always-on index section, and a bundled maintenance skill.
★ 3
↓ 370/wk
MIT
JavaScript
Aug 21, 2026
dsh plugin --profile web add dsh-memoryby kovey
Layered memory plugin for DeepSeek Harness: strictly separated project/global memory, host-driven recall before tasks and continuous learning after them.
★ 0
NOASSERTION
TypeScript
Sep 30, 2026
dsh plugin --profile web add dsh-memoryby xingzoudefengye
Bounded, git-committable project memory for DeepSeek Harness: five whitelisted .ai/ files with capacity budgets, structured entries, tiered retention, and a stable prompt section.
★ 0
MIT
JavaScript
Oct 18, 2026
dsh plugin --profile web add dsh-project-memory