Lightweight, localized task routing for DeepSeek Harness
- Language
- JavaScript
- License
- MIT
- Branch
- main
Install
$ dsh plugin --profile web add dsh-routing-suiteRun the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial
Install via your agent
Install the DeepSeek Harness plugin dragonbaba/dsh-routing-suite for me: review the repository at https://github.com/dragonbaba/dsh-routing-suite first, then run the install command and verify the plugin loads successfully.
Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.
一句话定位
为 DeepSeek Harness 增加一个「智能路由模式」:保留官方标准模式的全部能力与人设,根据会话首条任务自动选择「先排查根因」或「直接实现」的工作方式,并提供只读的本地化状态页查看当前策略。
核心能力
- 在模式菜单中新增「智能路由模式」,与标准、Code、Minimal、Cordis 等模式并列可选
- 自动判断首条任务的意图:包含「修复/排查/审查/迁移」等关键词时倾向先检查根因,包含「新建/开发/写一个」等关键词时倾向直接实现
- 在保持标准模式完整工具、上下文与人设的前提下,向系统提示追加一段简短的工作方式引导段落
- 提供只读的本地化状态页面,标注当前是否启用、当前策略以及生效范围
- 暴露一个只读的状态查询接口(
/routing-suite/api/status),返回当前启用状态与策略信息
技术实现
- 语言: TypeScript(ESM,
"type": "module"),含少量.mjs与.d.mts路由纯逻辑 - 关键依赖: schemastery(用于声明 bundle 配置 schema)
- 架构模式: 同时提供 Host 与 Client 双面:Host 端通过 Cordis 钩子
system-prompt/assemble在「routing-suite」preset 下追加路由提示,并注册一个prefix路由暴露状态接口;Client 端通过dsh.client.inject注入settings.section,挂载本地化只读 React 视图 - 入口文件:
src/index.ts(Host 运行时)、src/client/index.ts(Web 端状态页)、src/router.mjs(无依赖的纯文本分类器)
适用场景
当你希望 DSH 在面对含糊的请求时能自动调整工作节奏——例如先排查问题再动手——但又不想牺牲标准模式的完整工具和上下文时,可以启用这个模式。它也适合作为团队协作的统一基线:在同一个 preset 下,所有会话都按相同的工作方式引导。
前置依赖与兼容性
| 依赖 | 最低版本 | 说明 |
|---|---|---|
| Node.js | >= 22.19.0 | 由 engines.node 显式声明 |
| 平台 | 跨平台 | 源码未声明 os / cpu 限制;预设内容按平台运行时决定 bash/pwsh 工具启停 |
| 原生模块 | 无 | 运行时只依赖 schemastery,无 node-pty/node:sqlite 等原生绑定 |
| DSH 版本 | 未声明 | package.json#dsh 声明了 bundle.patch、client.inject、desktop.presets,但未指定版本范围 |
安装方式
dsh plugin --profile web add github:dragonbaba/dsh-routing-suite
配置项
| 配置 | 类型 | 说明 | 默认值 |
|---|---|---|---|
enabled | 布尔 | 是否启用任务感知路由提示;关闭后只保留对会话事件的透传,不再注入任何引导段落 | true |
strategy | 字符串 | 路由策略:auto 表示根据首条任务自动分类;inspect-first 强制先检查根因再改;direct 强制直接推进并完成后再验证 | auto |
常见问题
Q: 安装后必须重启 DSH 吗?
A: 必须。安装完成后需要在 DSH 桌面端重启 Harness,重启后模式菜单中才会出现「智能路由模式」。
Q: 使用 dsh plugin --profile web add 安装后还需要做什么?
A: CLI 安装不会自动物化插件自带的 Agent 预设,需要手动把仓库内 preset/routing-suite 目录复制到 ${DSH_HOME:-$HOME/.dsh}/.agent-presets/routing-suite,然后重启 Harness。
Q: 路由提示只在智能路由模式下生效吗?
A: 是。Host 端只有在当前会话选中的 preset 是 routing-suite 时才会向系统提示追加引导段落,其他模式完全不受影响。
Q: 设置页面里能切换策略吗?
A: 不能。客户端状态页是只读视图,只能查看当前启用状态、当前策略与生效范围,配置仍然由 DSH 自身的 bundle / profile 管理。
Q: 「自动判断」对模糊任务会怎么处理?
A: 当首条任务既不匹配检查意图也不匹配创建意图时,分类器返回 neutral,此时不会注入任何路由提示,会话行为与标准模式一致。
Q: 这个插件会修改现有工具或上下文吗?
A: 不会。它只在系统提示里追加一段简短的引导段落,不会裁剪工具、不会清空上下文、也不会替换当前选中的 persona。
Q: 会不会发起额外的模型请求?
A: 不会。分类器是本地的正则匹配,运行时不读取文件、不执行命令,也不产生额外模型调用。
Q: 切换语言或系统区域后设置页会跟随切换吗?
A: 会。状态页会根据浏览器主语言自动渲染简体中文(zh-CN / zh-Hans)或英文文案,路由能力本身不区分语言。
上手难度
入门 — 安装后重启、切换到「智能路由模式」即可使用,无需任何额外配置;如需固定策略,在 DSH 的 bundle 配置里调整 strategy 即可。
已知问题与限制
- CLI 安装不会自动物化插件内携带的
preset/routing-suite,纯命令行用户需要手动复制该目录到${DSH_HOME:-$HOME/.dsh}/.agent-presets/routing-suite,否则模式菜单不会出现新条目(来源:README.md:39) strategy: auto模式下,分类结果完全取决于首条用户文本中的正则命中,不进行语义分析,命中同时包含检查与创建关键词(如「修复并创建」)时倾向保守地选择inspect-first(来源:src/router.mjs:53-63)- 客户端状态页只能读取
/routing-suite/api/status,未提供写入入口,配置变更仍需通过 DSH 自身的 bundle 管理界面完成(来源:src/client/index.ts:75-119 / README.md:54)
A lightweight, selectable smart-routing mode for DeepSeek Harness (DSH).
一个轻量、可在模式菜单中选择的 DeepSeek Harness 智能路由模式。
Community project; not an official DeepSeek product and not endorsed by DeepSeek.
社区项目,并非 DeepSeek 官方产品,也不代表 DeepSeek 官方背书。
Features / 功能
- Adds a real 智能路由模式 / Smart routing mode beside Standard, Code, Minimal, and Cordis modes when installed by a compatible desktop installer.
- Keeps the official Standard preset's persona, contexts, and complete tool catalog.
- Uses the first durable user task to select a stable working style:
- Automatic / 自动判断(推荐)
- Inspect first / 检查优先 for fixes, diagnosis, reviews, and migrations
- Direct execution / 直接执行 for creation and implementation
- Applies routing guidance only while the
routing-suitemode is selected. - Simplified Chinese UI for a primary
zh-CN/zh-Hansmachine locale; English otherwise. - Makes no extra model request and performs no filesystem, process, package, or network management.
Install / 安装
Recommended desktop installation
Install [email protected] from the DeepSeek Harness Desktop plugin manager. It first uses the official fixed plugin command and then safely materializes the package-declared Agent preset in DSH's official user preset root.
Restart Harness after installation, then select 智能路由模式 from the mode menu.
DSH CLI
The official command installs the profile bundle:
dsh plugin --profile web add dsh-routing-suite
DSH's plugin command does not currently materialize package-declared user presets. CLI-only users must additionally copy this package's preset/routing-suite directory to ${DSH_HOME:-$HOME/.dsh}/.agent-presets/routing-suite, then restart Harness. No npm lifecycle script performs this copy.
Configuration / 配置
The bundle configuration accepts:
enabled: true
strategy: auto # auto | inspect-first | direct
auto: classify the first user task; ambiguous tasks remain neutral.inspect-first: always encourage fact and root-cause inspection before changes.direct: always encourage direct implementation followed by verification.
The localized settings page is a read-only React view showing runtime availability, scope, and the active strategy. Configuration remains under DSH's normal bundle/profile management.
Safety / 安全
The Host only participates in system-prompt/assemble for sessions using the routing-suite preset and exposes one read-only status endpoint. It does not:
- remove or restrict tools;
- clear contexts or replace the selected persona;
- read or write files;
- execute commands or manage packages;
- create subagents or make additional LLM calls.
The preset composition is derived from DSH's official Standard preset under MIT. It grants the same normal coding capabilities as Standard mode; the routing plugin itself does not exercise those capabilities.
Development
npm install
npm run verify
npm pack --json --dry-run --ignore-scripts
See SOURCE_PROVENANCE.md, THIRD_PARTY_NOTICES.md, and ACKNOWLEDGEMENTS.md. No upstream Injector or Router implementation is distributed; the official Standard composition is included under MIT.
License
MIT © 2026 rpg_zaun and dsh-routing-suite contributors.
Read the usage guide →
Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.
Listing badge
[](https://deepseek-plugin.org/plugins/dragonbaba/dsh-routing-suite)Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.