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

dsh-bonsai

Bonsai

Bonsai (盆栽) — DeepSeek Harness 的可编辑对话树:分支编辑和回收站、规则编辑器、精确的令牌统计、工具裁剪以及零调用历史折叠。

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

npx -y @deepseek-ai/dsh plugin --profile web add dsh-bonsai@0.1.12
README兼容性版本

兼容性与来源证明

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

DSH 兼容范围
*
运行环境
web
发布来源
npm
Registry 更新时间
2026/11/5

版本

0.1.12stable
2026/10/27
0.1.11stable
2026/10/27
0.1.10stable
2026/10/27
查看其余 9 个版本收起版本
0.1.9stable
2026/10/25
0.1.8stable
2026/10/25
0.1.7stable
2026/10/24
0.1.6stable
2026/10/24
0.1.5stable
2026/10/24
0.1.4stable
2026/10/23
0.1.3stable
2026/10/23
0.1.2stable
2026/10/23
0.1.0stable
2026/10/22

相关插件

正在加载相关插件…

最新版
0.1.12
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
1.1 MB
文件数
104
Surface
web
许可证
MIT
发布源
npm
周下载
199
查看源码 ↗项目主页 ↗
README Badge

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

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

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

认领这个 Plugin →
报告问题

相关插件

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

Archive Manager@michengai/dsh-archive-manager归档、恢复、收藏和永久删除会话,并诊断损坏的会话日志。Fish Memorydsh-fish-memory给 DSH 里的会话一份会淡忘的长期记忆,每条都带时间。Memory@furongjun1999/dsh-memory灵枢(Lingshu·líng shū)DeepSeek Harness 插件:完整大脑——长期记忆/知识飞轮/自我认知/递归反思接入 DSH,对话自动沉淀进 md_cg 认知图(md 文档)Reme Dsh Plugin@agentscope-ai/reme-dsh-plugin面向 DeepSeek Harness 的 ReMe 记忆与上下文集成

README

Bonsai / 盆栽

A conversation-tree editor for DeepSeek Harness, plus two switches that really do save tokens.

简体中文 · English

A conversation is drawn as a tree: questions, answers and tool results are nodes you can fork, re-parent, hide, recycle, and jump back to in order to keep growing from an earlier point. The tree also carries exact token accounting, and two ways to keep what no longer belongs out of the model's view.

dsh-bonsai · DeepSeek Harness plugin · no runtime dependencies · MIT · Node ≥ 24

Evidence first

Every number below is measured, not estimated. The raw records live in docs/experiment-context-cache.md.

CapabilityStatusMeasured
Hide toolsOptional (nothing hidden by default)37 → 28 tools: 10,453 → 7,076 tokens/turn (−32%)
Fold historyOn by default, from 40,000 tokensControlled 4 turns: 15,341 → 12,906 tokens (−16%), zero model calls
Effect of folding on the cache—Hit rate 98.2% (98.5% unfolded): no collapse
Graphical tree editing / recycle binDoneFork, re-parent, hide, restore, jump, compare branches; cancelled turns leave the tree on their own
Rule editorDoneHand-written and auto-detected rules as chips, add/edit/delete, sent with the retrieval hint
Exact token accountingDoneOfficial tokenizer; falls back to the bill when no vocabulary is available
Retrieval gain (retrieve_context)Not provenFive experiments found no recall benefit; off by default

Install

Requires DeepSeek Harness (the desktop app or the dsh CLI). Quit the desktop app completely before installing.

dsh plugin --profile desktop add dsh-bonsai

After a restart a 🌳 Bonsai panel sits above the composer, and a “Bonsai” button appears in the session header.

Local development (no npm):

pnpm install; pnpm run build; node scripts/stage.mjs
dsh plugin --profile desktop add "file:<repo>/plugin"

Do not point a link: at the repository root — the desktop app treats that root as a workspace and scans it.

The interface

  • Dock above the composer: canvas on the left, details on the right; it never covers the conversation. Click a node to jump to that turn.
  • The “Bonsai” editor: five tabs — blocks / full tree / graph / recycle bin / settings.
  • Drag one row onto another: re-parents the whole subtree; delete is a soft hide, and the recycle bin restores it.
  • “Continue from here”: your next question attaches under that node (one turn only).

The two token switches

1. Hide tools (optional, the most direct one)

83% of the prompt's characters are tool definitions. The “hide tools” panel in settings reads the real tool list from the host; whatever you tick applies per agent:

37 tools, 34,271 chars → 28 tools, 21,224 chars
prompt  10,453 → 7,076 tokens (−32%, saved every turn)

Nothing is hidden by default, because what you hide is capability. The list has to be right: the host validates every tool name and rejects the whole set when one is unknown (the settings panel shows the raw error).

2. Fold history (on by default)

Session history is derived by the host from the log. The plugin appends one surfaceOp: { op: 'replace', startSeq, endSeq } event, and the covered range stops entering deriveMessages() — not a byte of the original log changes, and the tree still holds the full text.

Default: fold past 40,000 tokens, keep the latest 3 turns, fold whole turns
Keep:    fold past 60,000, keep 4 turns
Save:    fold past 20,000, keep 2 turns, and hide 9 heavy rarely-used tools

Three presets sit at the top of the settings page, and every value is adjustable:

PresetFold aboveTurns keptTools hidden
Keep60,0004none (closest to native behaviour)
Balanced (default)40,0003none
Save20,00029 heavy rarely-used tools
SettingDefaultEffect
foldAboveTokens40000Fold past this; 0 turns it off
foldKeepTurns3Keep this many recent turns verbatim
foldScopeturnsturns folds whole turns, tools folds only tool output
mandatoryContexttrueRetrieval always includes the answer a turn hangs under plus its question: measured dependency recall 43% → 99%
fileRegionautoRetrieval returns the current text of files this session read: auto by budget, digest head only, content always full, off

The placeholder left behind tells the model where the text went:

[folded] The previous turn was removed from the context to save tokens; the full text is kept in the conversation tree — call retrieve_context when you need the details.

How long content is served

Long answers are never summarised (a summary rewrites code and numbers), and are served by size:

<= 800 tokens   the text as is
800-3000        verbatim excerpt: the head plus sentences matching the question
> 3000          one line saying what it is about, the line count, and a pointer to the tree

The long tier giving only a referent line is deliberate: code, numbers and exact wording must be read from the tree with retrieve_context, and the hint says that an excerpt is not the original.

Settings

Everything is editable at runtime and stored in ~/.dsh/token-tree/settings.json (only keys you changed); precedence is settings file > profile config.

KeyDefaultEffect
autoInjectfalsePush the whole retrieval block into the context every turn (about +428 tokens/turn)
retrievalHinttrueAdd one hint line only, about 57 tokens/turn
hintAboveTokens12000Send the hint only once the conversation reaches this size
autoReflecttrueAt turn end, grade the failure, write a reflection, retry a better sibling branch
admitRelevance0.3Retrieval admission threshold; relaxes once when it comes back empty
toolDeny[]Tool names to hide (filled by the checklist)
foldAboveTokens40000Fold threshold, 0 = off
foldKeepTurns3Turns kept verbatim
foldScopeturnsFold scope
tokenizerVersionautoauto / 3 / 4 / off (estimate + calibrate against the bill)
localeautoInterface language: auto / zh / en

API: GET /api/token-tree/settings returns { effective, overrides, path, availableTools, fold, toolRestriction, lastAssembly, … }; POST on the same path writes { key: value } (null clears an override); POST /api/token-tree/preset writes a whole preset at once.

How it works

user/message ─┐
assistant/message ├─▶ TokenTreeService ─▶ MemoryTree (nodes / edge weights / current)
tool/result   ─┘
                          │
              Where does a new question attach?
              ├ a specific term (shared by ≤1/3 of nodes) + semantic similarity
              │   → the answer that introduced that term
              └ only generic words → a new branch under the root
  • The tree is rebuilt entirely from user/message, assistant/message and tool/result; no private events are appended.
  • Reasoning counts towards tokens but is not stored (one answer measured 9,454 output tokens against 369 characters of body text; storing only the body would skew every threshold).
  • Folding writes a single surfaceOp: replace; the log stays append-only.

Honest limits

  • The retrieval gain is not proven. Several experiments found no recall benefit from “tree + retrieve_context” at a 20k context, so the default configuration does not inject.
  • Folding hides the folded text from the model. In the experiment it answered honestly (“that is not in this conversation”) instead of making something up — but it does not always call retrieve_context either.
  • The opening turn is never folded: the first surface node is the system prompt, which only a system message can rewrite.
  • Compaction ≠ data loss: the tree keeps the full text; compaction only shortens the prompt.

Development

pnpm install
pnpm run build      # TypeScript → dist/ + lib/client.js
pnpm test           # 164 cases (140 backend + 24 browser)
pnpm run check      # typecheck + tests

Zero-cost checks (no model needed):

CommandEffect
node scripts/bench-retrieval.mjsRetrieval recall against token cost
node scripts/probe-tree-of.mjs <session>Replay one session's tree offline
node scripts/probe-attach.mjs <session>Attachment score for every decision
node scripts/probe-fold-estimate.mjs <session>How much folding would save
node scripts/inspect-compaction.mjsCount compaction events

Scripts that need a model in the loop are scripts/ab-*.mjs and probe-*.mjs; their results live in docs/experiments/.

Release

The version in the repository is always a test version (x.y.z-test.N); the release script turns it into a stable one:

powershell -File scripts/release.ps1 -DryRun   # rehearsal
powershell -File scripts/release.ps1           # publish and move on to the next test version

It validates, sets x.y.z, publishes ./plugin with --tag latest, advances the repository to x.y.(z+1)-test.0, then commits, tags and pushes. Any failure rolls back.

Layout

PathContents
src/core/Pure algorithms: graph, edge weights, path cost, weighted retrieval, grading and backtracking
src/plugin/The DSH wiring: Config, the session service, tools, event subscriptions, HTTP routes, fold planning
client/client.jsBrowser half: dock, editor, graph view, recycle bin, rule bar, settings panel, preset picker
tests/164 cases, including client tests that mount real React under jsdom
docs/experiment-context-cache.mdEvery measurement (1–15)

License

MIT © 2026 STRlantian