inmny/dsh-subagent-effort

本地 DeepSeek Harness 插件,为 spawn / fork 前台一次性子代理工具增加父 Agent 可选的 reasoningeffort 参数。父 Agent 在创建 child 之前选择 effort,插件验证目标模型能力并把 selection 安装到 child 的首个模型请求。

catalog descriptioncatalog 简介 / catalog description:为 spawn / fork 前台一次性子代理工具增加父 Agent 可选的 reasoning_effort 参数。

Project Overview项目介绍

This is a native plugin built exclusively for DeepSeek Harness (DSH), that extends the built-in spawn and fork one-shot foreground subagent tools with an optional reasoning_effort parameter. Before a parent agent spawns a new child subagent, users can specify a reasoning effort level for the child to use. The plugin validates that the target model supports the selected effort level before the child is created, then applies the selection to the child’s very first model request. It only works with DSH’s in-process spawn and fork providers, explicitly blocks background execution, and waits for the child to finish before releasing the run context.

The plugin ships with five default reasoning effort levels: low, medium, high, xhigh, and max, each mapped to a specific category of common tasks. Low effort is recommended for simple jobs like information search and data extraction, while higher levels are intended for complex work like cross-file analysis, architecture design, and security reviews. If the user does not specify an explicit effort level, the plugin defaults to medium, and it will throw an error instead of silently falling back to a default if the selected level is not supported by the target model. This plugin is ideal for DSH users who want granular control over their subagents’ reasoning cost and output quality per task.

This plugin relies on the synchronous event publishing order introduced in DSH version 0.1.0-rc.6, so the DSH dependency version is strictly pinned, and you must re-test and re-validate the plugin after upgrading DSH. To install, you add it as a dependency to the profile that uses its preset, rather than adding it to the host bundle list, then rebuild dependencies, restart the DSH web server, and create a new session to start using it. It is released under the open source MIT license, and includes a full test suite that covers all core functionality including validation, selection logic, and concurrency isolation.

这是一个专为 DeepSeek Harness 开发的原生插件,为 DSH 内建的 spawn 和 fork 前台一次性子代理工具添加了可选的 reasoning_effort 参数。父代理创建子代理前可以选择推理强度等级,插件会提前验证目标模型是否支持该等级,并将选择结果应用到子代理的首个模型请求中。插件仅支持 DSH 内置的进程内 spawn 和 fork 提供者,明确不支持后台运行模式。

插件预定义了低、中、高、极高、最大五个默认推理强度等级,不同等级对应不同复杂度的工作任务,比如低等级适合搜索抽取类简单任务,高等级适合跨文件分析、架构设计这类复杂工作。未显式指定等级时默认使用中等强度,若目标模型不支持指定等级会直接报错,不会静默降级处理。适合需要精细化控制子代理推理成本和输出质量的 DSH 用户使用。

该插件依赖 DSH 0.1.0-rc.6 版本的事件发布顺序,因此对 DSH 版本有精确要求,升级 DSH 后需要重新测试验证。安装时需要将其添加为使用对应预设的 profile 依赖,不要加入宿主捆绑包列表,构建依赖后重启 DSH 并新建会话即可生效。代码基于 MIT 许可证开源,提供完整测试用例覆盖全部核心功能。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 2 warnings2 项注意
  • Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
  • No DSH plugin manifest detected - it may only carry the dsh-plugin topic, so the install method must be confirmed on the spot未检测到 DSH 插件清单:可能只是打了 dsh-plugin 话题,安装方式要现场确认
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:inmny/dsh-subagent-effort

把 inmny/dsh-subagent-effort 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-subagent-effort

本地 DeepSeek Harness 插件,为 spawn / fork 前台一次性子代理工具增加父 Agent 可选的 reasoning_effort 参数。父 Agent 在创建 child 之前选择 effort,插件验证目标模型能力并把 selection 安装到 child 的首个模型请求。

行为

  • 工具只支持 DSH 内建的进程内 spawn 和 fork provider。
  • 工具不暴露 run_in_background,并拒绝显式传入 run_in_background: true。
  • 每次调用都等待 child 完成,随后释放 run。
  • reasoning_effort 可选值默认为 low、medium、high、xhigh、max。
  • 参数省略时默认选择 medium。
  • 若目标模型不支持 medium,省略值会先按允许列表向上选择,再向下选择。例如只支持 max 的模型会选择 max。
  • 显式选择不受支持的 effort 时,在 child 创建前失败,不静默降级。
  • 模型没有 reasoning capability 元数据,或与允许列表没有交集时,在 child 创建前失败。
  • 并发工具调用使用独立的 AsyncLocalStorage 创建链,不共享可变的全局 effort 状态。

建议的选择标准:

Effort 适用工作
low 搜索、抽取、简单检查
medium 常规且范围明确的实现、测试、文档
high 多文件分析、调试、代码审查
xhigh 架构、迁移、并发、安全或跨模块歧义工作
max 高风险最终验证,或较低 effort 已失败后的升级

实现方式

插件复用 DSH 原有的 SubagentRuntime 和 in-process driver,不复制 provider。标准 spawn / fork 在发布 child 时同步触发 agent/created;该事件发生在 child 完成 preset 组合之后、首个 followup() 之前。插件在此边界调用 installModelSelection()。

每个工具调用携带一次性 pending selection。事件监听器还会验证 child 的运行时 owner 以及最终 provider/model,只有精确匹配的 child 才能消费 selection。若 provider 返回前没有发布预期的本地 child,插件释放该 run 并报错。

该实现依赖 DSH 0.1.0-rc.6 的同步发布顺序,因此依赖版本被精确固定;升级 DSH 后必须重新执行测试和 live mount 验证。

Preset 配置

- id: subagent-task
  name: dsh-subagent-effort
  config:
    provider: spawn
    toolName: subagent_task
    enableRunInBackground: false
    backgroundMode: one-shot
    reasoningEffort:
      mode: model-select
      allowed: [low, medium, high, xhigh, max]
      default: medium
      onUnavailable: error

- id: subagent-fork
  name: dsh-subagent-effort
  config:
    provider: fork
    toolName: subagent_fork
    enableRunInBackground: false
    backgroundMode: one-shot
    reasoningEffort:
      mode: model-select
      allowed: [low, medium, high, xhigh, max]
      default: medium
      onUnavailable: error

可选的 agentOptions、persona、toolFilter 和 maxDepth 与 DSH 内建 subagent 工具的前台一次性路径一致。默认 maxDepth 为 3。

本地安装

把包作为运行该 preset 的 profile 依赖安装,不要加入 Host bundle 列表。插件行本身位于 Agent preset plane;它不发布共享 Host service。

{
  "dependencies": {
    "dsh-subagent-effort": "link:C:/Users/Inmny/source/repos/dsh-plugins/dsh-subagent-effort"
  }
}

构建包、刷新 profile 依赖后重启 dsh web,并新建会话。既有会话仍使用创建时绑定的旧 preset generation。

开发验证

pnpm install
pnpm run typecheck
pnpm test
pnpm run pack:check

测试覆盖配置校验、精确 effort 选择、默认回退、真实 installModelSelection() 请求注入、创建前 capability 失败、强制后台拒绝、并发隔离、owner 校验、route 漂移、provider 生命周期和 run 清理。

License

MIT

← 上一个 Prev dsh-shortcuts 下一个 Next dsh-auto-review →