DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins
M

dsh-memory-tree

Memory Tree

DeepSeek Harness (DSH) 的 AST 软决策树长期记忆:SQLite + 嵌入,按项目限定,支持跨会话召回。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:qinghuaju/dsh-memory-tree#1c2a239a9e14b0d63b219514847664f8d0269a8f
README兼容性版本

兼容性与来源证明

Memory Tree 以 dsh-memory-tree 发布,当前版本为 0.4.2。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
github
Registry 更新时间
2026/11/2

版本

0.4.2stable
2026/11/2
0.4.1stable
2026/10/31
0.4.0stable
2026/10/31
查看其余 1 个版本收起版本
0.3.0stable
2026/10/29

相关插件

正在加载相关插件…

最新版
0.4.2
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
any
许可证
MIT
发布源
github
GitHub
★ 2
周下载
0
最近提交
2026/11/2
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 memory-context 分类下经过校验的插件。

Experimental Session Search@deepseek-ai/dsh-experimental-session-search为 Agents 提供搜索和读取当前工作区早期会话的工具。Hindsight Coding Agents@vectorize-io/hindsight-coding-agents面向编程代理的仅反思式 Hindsight 长期记忆(可插拔支持多种运行框架:opencode、……),自动在后台导入(无需设置 CLI)。Contextdsh-context用于上下文洞察和管理的 DeepSeek Harness 插件,提供上下文仪表板和上下文命令,帮助了解上下文的构成及其演变过程。Memory Plugin@openviking/dsh-memory-plugin适用于 DeepSeek Harness 的 OpenViking 记忆与上下文套件

README

dsh-memory-tree

Long-term memory for DeepSeek Harness — an AST-indexed, tiered SQLite brain that survives sessions.

English | 中文


Your agent forgets. A task ends, the context is gone, the compaction summary dies with the session, and a new task in the same project starts from zero. Notes you saved last month never surface when a new idea connects to them.

This plugin makes memory an asset on disk instead of a consumable in the context window:

  • captures every user/assistant exchange in the background,
  • indexes it as an AST tree of addressable nodes with embeddings and soft similarity links,
  • recalls relevant nodes before each turn and injects one bounded <memory-recall> block,
  • tiers the data into hot/warm/cold SQLite files so the active file never grows with age,
  • and exposes mem_recall, mem_store, mem_stats, mem_dream, mem_rotate as tools.

No external service. No native build. One directory you can copy, inspect, back up, or delete.

Quick start

# 1) get the embedding key into place (never into the repo)
echo '{"apiKey":"sk-..."}' > "$DSH_HOME/memory-tree/credentials.json"

# 2) install into the profile the app actually loads, then restart DSH
#    desktop app → ~/.dsh/profiles/desktop   dsh web → ~/.dsh/profiles/web
node scripts/install.mjs --profile "$DSH_HOME/profiles/desktop" --copy-to

# 3) verify inside DSH
#    ask the agent: call mem_stats

Chat two turns and ask about the first one from a new session — the recall block appears.

Other machines, npm/tarball, offline mode: docs/DEPLOY.md.

Install from Git

git clone https://github.com/qinghuaju/dsh-memory-tree.git
cd dsh-memory-tree

# pick the profile your DSH loads (desktop app vs `dsh web`)
node scripts/install.mjs --profile "$DSH_HOME/profiles/desktop" --copy-to

# restart DSH, then ask the agent to call mem_stats

The installer is idempotent, backs up cordis.patch.yml, and never touches your keys. Without --profile it targets the profile it finds and warns when both desktop and web exist.

Install from the plugin market

DSH 0.2.1-rc.3 ships the market off by default and with no index URL. To publish or consume a listing, generate market/index.json and add its URL in Settings → Plugins → Discover:

node scripts/market-index.mjs --owner qinghuaju --commit <40-hex-sha> --npm
node scripts/check-market.mjs

Full schema, hosting and the official-listing status: docs/MARKET.md.

Compatibility

Tested with DSH 0.2.1-rc.3 (bundled Node 24) on Windows and Linux CI, Node 22 and 24; Node ≥ 22.5 for CLI use. The plugin has no native build and no runtime dependency tree of its own — it resolves DSH's @deepseek-ai/* packages from the profile.

package.json declares engines.dsh (^0.2.1-alpha.2), and npm run compat in CI asserts the session-format injection rules too, so a DSH rule change turns CI red instead of breaking an install.

DSH-side changes degrade capability by capability rather than all at once:

What breaksWhat happens
The host rejects the injected message (e.g. another source-kind change)auto-recall is switched off after that turn and logged; capture and the mem_recall tool keep working
agent/pre-step is renamed or goneauto-recall is off, everything else stays
session/event is gonecapture is off, the tools and recall stay
The engine child process crashesit restarts; the conversation is unaffected

mem_stats prints a compat: line showing normal, degraded or off.

Why not just a vector store?

NeedFlat chunk RAGThis project
Find similar text✅✅ embeddings
Address a memory ("the optogenetics idea")❌ anonymous chunks✅ unique AST paths
Surface a hit's section / siblings❌✅ one-hop tree activation
Explain why something was recalled❌ one cosine number✅ six named score terms + audit rows
Bound the active database❌ grows forever✅ hot/warm/cold rotation
Work offline / no vendordepends✅ Ollama or a deterministic fake embedder
Be inspected by a humandepends✅ Markdown mirror beside SQLite

Details and the failures that shaped the design: docs/PRINCIPLES.md.

How it works

session/event ──▶ capture buffer (per session, coalesced per exchange)
                    │
                    ▼
              AST parse ──▶ nodes (path, kind, title, content)
                    │
                    ▼
              embeddings ──▶ float32 vectors + similar edges (cos ≥ 0.72)
                    │
                    ▼
   memory.db (hot, <30d) ──rotate──▶ memory-warm.db (30–180d) ──▶ memory-cold.db (>180d)
                    │
   agent/pre-step ──▶ query ──▶ vector ∪ FTS candidates ──▶ blended score ──▶ <memory-recall>

Scoring (see PRINCIPLES for why each term exists):

base = (0.55·cosine + 0.20·lexical + 0.25·rank-agreement) × tier-weight
     + one hop: parent ×0.55, similar neighbour ×0.55·similarity
     + priors: 0.06·importance + 0.05·recency(45d) + 0.03·usage

Measured behaviour

node scripts/bench.mjs --sizes 1000,10000,30000 on this machine (Windows, Node 24, fake embedder so the numbers measure storage + retrieval, not the network):

nodesDB sizerecall p50recall p95rotationhot file after rotation
1,0015.4 MB11.6 ms15.2 ms137 docs, 0.5 s0.36 MB
10,00354.1 MB55.9 ms68.4 ms1,370 docs, 6.0 s2.48 MB
30,002162.6 MB191.2 ms258.3 ms4,109 docs, 25.6 s7.23 MB
  • ~5.4 KB per node (1024-dim vector ≈ 4 KB of it);
  • the hot file only holds the retention window — that is the point of tiering;
  • rotation moves documents, not copies; compact() reclaims the freed pages;
  • real-world recall adds one embedding round trip; auto-recall is capped by recall.timeoutMs (1.5 s) and silently skipped when slow.

Storage tiers

TierFileDefault ageVectorsRecall weight
hotmemory.db< 30 dayskept1.00
warmmemory-warm.db30–180 dayskept0.90
coldmemory-cold.db> 180 dayskept (dropColdVectors: true to drop)0.78

Rotation runs on a timer (6 h), after startup, and on demand via mem_rotate. Whole documents move with their nodes and embeddings; nothing is deleted. Dropping cold vectors keeps the archive keyword-searchable at a fraction of the size.

Set storage.tiered: false for the old single-file behaviour.

Configuration

- insert:
    - id: dsh-memory-tree
      name: 'dsh-memory-tree'
      config:
        embedding:
          preset: pollinations     # pollinations | dashscope | openai | ollama | custom
          dimensions: 1024
        capture:
          enabled: true
        recall:
          autoInject: true
          maxNodes: 6
          timeoutMs: 1500
        storage:
          tiered: true
          hotDays: 30
          warmDays: 180

Every key with defaults: docs/PHASE1.md (bilingual table); the Chinese reference is in README.zh.md.

The same configuration can live in $DSH_HOME/memory-tree/config.json, shared by the CLI and the plugin (patch config still wins). Environment: MEMORY_TREE_API_KEY, MEMORY_TREE_DATA_DIR, MEMORY_TREE_EMBED_PRESET.

Tools

ToolPurpose
mem_recallsearch project + global memory, optional path filter
mem_storepersist a durable note (scope: global for cross-project facts)
mem_statstiers, sizes, pending embeddings, spaces
mem_dreamdedupe nodes, rebuild soft edges
mem_rotatemove aged memories between tiers now

Parameter tables, return shapes, the engine API and CLI flags: docs/TOOLS.md.

Safety by default

  • process isolation: the engine (SQLite, embeddings, rotation) runs in a forked child process; if it dies, the conversation keeps going, the client restarts it, and the incident lands in $DSH_HOME/memory-tree/plugin.log;
  • local-only storage; the only egress is the text sent for embedding;
  • recalled content is framed as untrusted reference material and frame tags are escaped;
  • injected messages are tagged and never re-captured (memory cannot remember itself);
  • keys live in env / credentials.json, never in logs, prompts, or the patch file (scripts/check-secrets.mjs enforces this in CI);
  • no posting, commenting, emailing, or arbitrary network calls — see SECURITY.md.

CLI

The same database is usable outside DSH:

node scripts/demo.mjs index ./notes --scope project
node scripts/demo.mjs recall "optogenetics art installation" --limit 5
node scripts/demo.mjs stats
node scripts/demo.mjs rotate

FAQ

Does it slow down as memory grows? Recall is a scan over the active spaces: 12 ms at 1k, 56 ms at 10k, 191 ms at 30k nodes on this machine. Tiering keeps the hot file small; past ~50k nodes, wire up sqlite-vec behind store.listVectors (the seam exists for it).

Can I use it without a cloud key? Yes. embedding.preset: ollama with bge-m3 runs fully local, and embedding.fake: true gives a deterministic offline embedder for demos and tests.

What if I change embedding models? Vectors from different models are incomparable. Use a new dataDir (or delete the tier files) and let it re-index; the Markdown mirror keeps the raw text.

Two machines? Copy $DSH_HOME/memory-tree/ once, then never let both write the same SQLite file. One-way sync or git on the Markdown mirror only. Multi-writer CRDT sync is on the roadmap.

Does it replace AGENTS.md / CLAUDE.md? No — those are instructions you maintain; this is history the agent accumulates. They complement each other.

Is my conversation sent anywhere? Only the text chunks you capture, to your configured embedding endpoint. No telemetry, no upload of the database.

Roadmap

  • Phase 1 — AST + embeddings + SQLite, capture, auto-recall, tools, tiered files
  • Phase 2 — offline consolidation: summaries, merge, conflict detection (supersedes), BM25
  • Phase 3 — parameterized memory: rollbackable LoRA adapters trained from recall/decision logs
  • Phase 4 — MCP server for non-DSH clients, CRDT multi-machine sync, 3D memory graph

Details: docs/PHASE1.md.

Contributing

Issues and PRs welcome — start with CONTRIBUTING.md. The engine must stay dependency-free, every behaviour change needs an offline check, and check-secrets must stay green. If this saved you a session, a star helps other DSH users find it.

License

MIT