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
P

@huanlin/dsh-plugin-tools-manager

Plugin Tools Manager

按来源插件以树形结构列出所有已注册工具,并支持全局禁用单个工具;插件页面的行配置卡片(通过 /tools-manager/api HTTP 路由)可切换工具的启用/禁用状态。

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

npx -y @deepseek-ai/dsh plugin --profile web add github:HuanLinOTO/dsh-plugin-tools-manager#daba12eca502b339912a0556c634e55a4c3a70c9
README兼容性版本

兼容性与来源证明

Plugin Tools Manager 以 @huanlin/dsh-plugin-tools-manager 发布,当前版本为 0.4.2。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
web
发布来源
github
Registry 更新时间
2026/10/18

版本

0.4.2stable
2026/10/18
0.4.1stable
2026/9/30
0.4.0stable
2026/9/24
查看其余 3 个版本收起版本
0.3.2stable
2026/9/24
0.3.1stable
2026/9/11
0.3.0stable
2026/9/10

相关插件

正在加载相关插件…

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

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

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

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

认领这个 Plugin →
报告问题

相关插件

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

Web App@deepseek-ai/dsh-web-appdsh 浏览器界面捆绑包:位于 dsh-base 之上的 Web 补丁层,加上运行时粘合插件(提供前端 dist、Web 界面提示符、bash 运行时变量和 URL 行)Sdk Minimal@deepseek-ai/dsh-sdk-minimal独立的最小 SDK 配置包:JSON-RPC、一个 DeepSeek 适配器、持久化 Shell 和 JSONL 会话Sdk App@deepseek-ai/dsh-sdk-appdsh SDK 配置包:基于 dsh-base 提供 stdio JSON-RPC 服务和进程生命周期管理Experimental Inspector@deepseek-ai/dsh-experimental-inspector用于 Host 调试和 Client Runtime 检查的实验性跨 realm CDP hub

README

dsh-tools-manager

DSH 插件:以 tree 形式列出「插件 → 工具」,并支持全局启停单个工具。

  • Tree 列出工具:按来源插件分组,展示每个插件注册的全部工具(name / description)。
  • 全局启停:对任意工具一键禁用/启用,跨会话持久化,立即生效(模型不可见 + 执行被拒,两层一致)。
  • UI 入口:插件页(Plugins)→ 本插件 bundle 行的「配置」入口(plugins.row.config keyed slot,key = @huanlin/dsh-plugin-tools-manager#tools-manager,行 id 与 cordis.patch.yml insert 行 id 逐字一致;0.1.7-alpha.1 起 settings.plugin.item 退役、settings.section 独立 Tab 不再使用)。

架构

工具来源归属(tree 数据基础)

  • 归因算法(零源码修改):
    1. 启动时快照 ctx.tools.schemas() 作基线,归到 (baseline) 分组。
    2. 监听 Cordis internal/plugin(fiber.name = 插件名)→ 维护 pendingPlugins 栈。
    3. 监听 tools/change(register/unregister/restriction 均触发,unfiltered)→ 对 ctx.tools.schemas() 做 diff:
      • 新增工具 → 归因到栈顶(最近加载)插件;
      • 移除工具 → 从归属表删除。
    4. 插件卸载(internal/status DISPOSED)→ 其工具随 effect 自动注销,diff 自然移除。

全局启停(两层一致,缺一不可)

层缝实现
隐藏(模型不可见)system-prompt/assemble(waterfall)过滤 assembly.tools 中 disabled 工具,返回变换后的 assembly
拒执行(防绕过)全局 ctx.tools.guard()(plain ctx)disabled 工具返回 reason(如 tool "X" is disabled by tools-manager: "X")
  • 同一个 disabled: Set<string> 驱动两层,保证 prompt 与执行语义一致。
  • 覆盖场景:模型直调(guard 兜底)、run_code SDK 子调用(guard 兜底)、隐藏后模型不再发起。
  • 不依赖 ctx.tools.restrict()(其强制 scoped ctx,不能做全局过滤)。

持久化

  • disabled 列表持久化在 profile cordis.patch.yml 的 tools-manager entry Config 中(DSH 0.1.7 起;字段标 .volatile(),settings.configure({ auto: false }) 声明插件自管配置页),跨会话生效。
  • Config:{ disabled: string[] }(Schemastery schema,默认 [])。
  • 运行时编辑经 settings.update('tools-manager', { disabled }) 提交,Loader 原地更新 volatile 引用,即时应用(guard/assemble 读同一份 disabled 状态,无需重启)。

Host↔Client 通道

  • 宿主 HTTP 路由:ctx.webServer.register({ kind: 'prefix', path: '/tools-manager/api', handler })。
  • 接口(JSON envelope):
    • POST /tools-manager/api/list → { ok, value: { plugins: [{ name, tools: [{ name, description, disabled }] }] } }
    • POST /tools-manager/api/set body { toolName, disabled } → { ok, value: { plugins: [...] } }
    • 错误:{ ok: false, error: { code, message } }

开发

pnpm install          # 安装依赖(link: 指向 ~/.dsh/source/current/)
pnpm run typecheck    # tsc --noEmit
pnpm test             # vitest run
pnpm run build        # tsc (host) + build-client.mjs (client bundle) + tsc (types)

目录结构

src/
├── index.ts              # Host 入口:name, inject, apply(registry + policy + gateway)
├── config.ts             # Config schema (schemastery), ResolvedConfig, resolveConfig
├── registry.ts           # ToolRegistry: 归因 diff(internal/plugin + tools/change)
├── policy.ts             # installPolicy: system-prompt/assemble 过滤 + tools.guard
├── settings.ts           # installToolsManagerSettings: 注册 namespace,返回 bridge
├── gateway.ts            # registerHttpGateway: /tools-manager/api 前缀路由(list/set)
└── client/
    ├── index.ts              # Client 入口:plugins.row.config keyed slot 注册行配置卡片
    ├── row-config-key.ts     # key 派生(包名#行 id)与三 id 一致性注释
    ├── ToolsManagerPanel.tsx # 行配置卡片(summary 一行简介 / page 工具树,inline styles)
    └── prefixTree.ts         # 前缀树构建工具(`__`/`_` 分割)

运行

本地安装

dsh plugin --profile web add "link:D:/Projects/deepseek-harness/dsh-tools-manager"

配置

默认配置(cordis.patch.yml):

disabled: []    # 预置禁用的工具名列表(默认空)

运行时通过插件页本插件行配置卡片修改(plugins.row.config,注册由 configForms.whileServed 门控:行停用/Host 不供配置时入口随之消失,view:'page' 且 form 缺失时卡片显示不可用提示),持久化到 profile cordis.patch.yml 的 tools-manager entry。

检查

pnpm run typecheck && pnpm test && pnpm run build

验证 lib/ 产物:

  • lib/index.js — host bundle(ESM)
  • lib/client.js — client bundle(CJS,window.__ModuleLoader__.load 包裹)
  • lib/types/ — TypeScript 声明文件
  • cordis.patch.yml — bundle 配置层

已知边界

风险影响缓解
归因偏移(插件运行期动态注册工具)tree 中工具挂错插件记录 Known Limitations;list 接口对未归属工具归到 (unknown) 分组
system-prompt/assemble 多监听时序其他插件也可能变换 tools本项目过滤只删 disabled,next() 委托其余;序靠后仍正确
guard 与 assemble 双层不同步隐藏与拒执行不一致单一 disabled 状态源;单测断言两缝读同一状态
settings 服务缺失启停不持久降级为内存态(仅本次运行生效),set 返回明确错误
run_code 模式模型经 SDK 子调用禁用工具guard 全局兜底拒绝;文档说明"禁用=执行不可达"