DSH Plugins
返回列表
🧩

dsh-preset-tool-guard

admin-security 更新于 2026.10.06

在终端中运行以下命令:

dsh plugin install KouzakiUmi/dsh-preset-tool-guard

将以下提示词粘贴到 DeepSeek Harness 对话框中:

在 DeepSeek Harness 终端执行 dsh plugin install KouzakiUmi/dsh-preset-tool-guard 安装本插件(源码:https://github.com/KouzakiUmi/dsh-preset-tool-guard),安装后重启 DSH。

插件介绍

在 DeepSeek Harness 里,工具沿 agent、preset、global 层层继承。preset 会挂载自己的工具,却不会自动挡住全局层带来的能力。宿主上的电脑操控、浏览器 MCP、图像 Provider 等,常会出现在每一个 preset 的模型工具目录里,连极简预设也被撑大。直接关掉 Provider 会连全功能 preset 一起失去能力。

dsh-preset-tool-guard 在宿主挂载一次,监听 agent 创建与 preset 切换,读取 Agent 实际组合的 preset,并在该 Agent 作用域调用官方 ctx.tools.restrict()。掩码只作用于继承层,Provider 仍保持挂载;被挡工具在 schema 与 PTC 侧不可见,调度返回 UNKNOWN_TOOL。支持按 preset 的 allowlist、全局 deny 与前缀、分组规则,以及 dryRun 先报告再生效。

适合同一 profile 里并存全功能与日常极简 preset 的用户:重型能力全局可用,又让精简 preset 的请求前缀更小。也适合需要报告与 token 量级估算来调校规则的场景。Agent 自身层注册的工具不受 allowlist 约束;allowlist 也不会为尚未挂载的工具预留可见性。

使用场景

  • 极简 preset 需要挡住全局继承的重型工具前缀
  • 同一宿主上混用全功能与日常对话 preset
  • 按 preset 做 allowlist 并先用 dryRun 调规则

适合人员

  • 在桌面 profile 上管理多 preset 的 DSH 用户
  • 关心 tool schema 体积与请求成本的团队
  • 需要继承层工具掩码而非卸载 Provider 的运维