dsh-preset-tool-guard:按 Agent preset 限制工具可見性
2026-10-21
DeepSeek Harness 插件
DeepSeek
DSH
dsh-preset-tool-guard
admin-security
DeepSeek Harness 插件
dsh 的工具解析沿 agent→preset→global 繼承,preset 無法單獨收窄 global 掛載的工具,minimal 等預設也會看到宿主側全部 provider。KouzakiUmi 的 dsh-preset-tool-guard 在宿主掛載一次,於 agent/created 讀取組合 preset,在 Agent 自有 scope 調用 ctx.tools.restrict(),按 allowlists、deny 與前綴做 per-preset 白名單,被遮工具返回 UNKNOWN_TOOL 且不影響其他 Agent。安裝需 Node ^22.19 或 >=24,dsh plugin --profile 添加後重啓;配置寫在 profile 的 cordis.patch.yml,調參可先用 dryRun。
閱讀全文