lynx-gt/dsh-subagent-tools
DeepSeek 框架子代理委派增强
项目介绍Project Overview
dsh-subagent-tools 是 DeepSeek Harness 的子代理委派增强插件,以标准 bundle 形式替换内置 subagent/subagent_fork,支持每次调用覆盖 model、provider、persona、toolFilter,并可用 @preset: 引用预设人格与 provider/model 复合模型 ID。需要按任务动态切换子代理模型、人格或工具权限时使用。注意:Web 会话需先运行预设适配器并新建会话;@preset 依赖本地预设布局。
dsh-subagent-tools is a DeepSeek Harness plugin that replaces the built-in subagent delegation tools with a standard bundle, adding per-call overrides for model, provider, persona, and toolFilter, plus @preset: persona references and composite provider/model IDs. Use it when child agents need task-specific models, personas, or tool access. Caveat: web sessions require running the preset adapter and starting a new session; @preset references depend on the local preset layout.
请帮我了解并安装插件:【dsh-subagent-tools】【https://github.com/lynx-gt/dsh-subagent-tools】
把上面这条消息直接发给当前会话里的 DSH,让它帮你了解并安装。安装命令不一定准确,发给 DSH 更稳。Send this message to DSH in your current session. CLI install commands may not be accurate across systems — DSH will figure it out for you.
或使用命令行安装(适合开发者)Or use CLI install (for developers)
命令行安装CLI Install
dsh plugin --profile web add dsh-subagent-tools
把 lynx-gt/dsh-subagent-tools 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-subagent-tools
Enhanced subagent delegation tools for DeepSeek Harness (dsh):
per-call model / provider / persona / toolFilter overrides, @preset: persona references, and
provider/model composite model ids — shipped as a standard bundle that patches no official
package file.
What it adds
The stock subagent / subagent_fork tools only accept description, prompt, and run_in_background.
This plugin replaces them with the same surface plus per-call overrides:
| Parameter | Effect |
|---|---|
model |
Override the child's LLM model for this call. Accepts a bare id (k3) or a composite (kimi-code/k3) that also switches the provider. |
provider |
Override the delegation provider for this call (spawn / fork / ...). |
persona |
Override the child's persona for this call — raw text, or @preset:<id> to load a saved agent preset's persona (by display name or directory id). |
toolFilter |
Override the child's tool allow/deny filter for this call. |
All overrides default to the instance configuration, so a bare install behaves exactly like the stock tools.
Installation
dsh plugin --profile web add dsh-subagent-tools # npm
# or: dsh plugin --profile web add github:lynx-gt/dsh-subagent-tools#main
# or: dsh plugin --profile web add ./dsh-subagent-tools # local checkout
Restart dsh --profile web.
Web sessions: also run the preset adapter (important)
In the web profile, agent tools are provided by the mounted agent preset
(the default standard preset composes subagent / subagent_fork pointing at
@deepseek-ai/dsh-tool-subagent), not by the host plane. A bundle patch that
disables the stock rows and inserts its own is invisible to Web sessions — the
stock tools keep loading and this package's per-call overrides never appear
(headless works without this step).
Run the preset adapter to make Web sessions use this package:
powershell -ExecutionPolicy Bypass -File install-preset.ps1 # Windows
# or: ./install-preset.sh # POSIX
It copies the standard preset into $DSH_HOME/.agent-presets/standard-plus,
rewrites its tool-subagent / tool-subagent-fork rows to point at this
package, and switches the default preset. Then restart dsh web and start a
NEW session (presets are read at session creation and cannot be switched in a
live session). To revert: pick standard again in the UI (General > Agent
preset) and delete the standard-plus directory.
headlessand other non-web profiles do not need this step.
Telling the model which presets exist (presetHints)
The persona parameter accepts @preset:<id> references, but the tool schema
does not list which presets exist on your deployment. Set presetHints on the
tool rows (see cordis.patch.yml) to surface them in the schema — the model
then sees "Available presets on this deployment: @preset:翻译员, ..." and can
pick one itself. Omit the key to stay generic (presets differ per machine).
Compatibility
Declares peerDependencies on the public dsh packages (^0.1.0-rc.6). If your dsh version moves out of
the compatible range, pnpm reports a peer conflict and the plugin refuses to load — bump this package
instead of running on a silently broken API.
Verified
Tested against a stock dsh 0.1.0-rc.6 install (no local patches) on Windows via
headless and web profiles:
- per-call
model="kimi-code/k3"composite routing ✅ - per-call
provider="fork"and raw-textpersona✅ @preset:by display name (@preset:审校员) and directory id (@preset:translation-reviewer) ✅presetHintsschema injection ✅- Web profile: the preset adapter (
install-preset.ps1) makes Web sessions use this bundle's tools (verified with the 5 presets above in a live web session)
Example
Delegate a task to a subagent using model kimi-code/k3 with the reviewer persona:
subagent(description="Review the translation", prompt="...", model="kimi-code/k3", persona="@preset:审校员")
Design
- A bundle, not a patched install. This package is a standard dsh bundle
(
dsh.bundlemanifest +cordis.patch.yml): it disables the shippedtool-subagent/tool-subagent-forkrows and inserts its own. No official package file is patched — nothing in the dsh installation is modified. - Independent implementation. The tool is written against the public dsh API
(
defineTool,ctx.subagents.start/startContinuable,settleRun), not a fork of the official source. - Upgrades. The bundle lives in the profile's own
node_modules(pnpm symlink), so a dsh upgrade does not remove it. But dsh is in developer preview (rc.6): if an upgrade changes the public API,peerDependenciesmakes the plugin refuse to load instead of failing silently — bump this package then. - No
cwdparameter here. Per-call working-directory control needs two small patches in the dsh installation's in-process subagent providers (foreground + continuable child creation). That lives in the companion packagedsh-subagent-tools-cwd, which bundles this plugin's functionality plus thecwdparameter plus the required patches. Install one or the other — not both.
Limitations
@preset:depends on the local preset layout.$DSH_HOME/.agent-presetsis where dsh stores user-authored presets; the path is not a hard public contract, so a future dsh release could change discovery. Presets also differ per machine — an@preset:翻译员reference only works where that preset exists.- Web sessions need the preset adapter. The
standardpreset that ships with dsh still points its delegation rows at the official package; until you runinstall-preset.ps1/install-preset.sh, Web sessions keep the stock tools (headless and other non-web profiles use this bundle directly). providermeans the subagent backend, not an LLM provider. To route a child to a different LLM provider use the compositemodelid (kimi-code/k3) or the instanceagentOptions.
License
MIT
omdsh-dev/DSH-better-sidebar
NanmiCoder/dsh-agent-teams
dream-num/dsh-univer-office
cocode-agency/cocode
toolclub/dsh-agent-team-gui
omdsh-dev/dsh_workflow
sandbaseai/sandbase-skills