bushizhanghan/dsh-arg-guard ↗★ 1

@bushizhanghan/dsh-arg-guard

Validate every tool call against the schema the tool declared. The host checks tool output but never tool input, so a wrong type reaches the tool body and comes back as a raw Node TypeError; this guard denies the call in tools/pre-execute with the exact JSON path and expected type, so the model can fix it. 工具入参 schema 守卫:在调用前按 parameters 校验,把裸 TypeError 变成一句可修正的拒绝理由。

패키지
@bushizhanghan/dsh-arg-guard
호환성
미검증
버전
0.1.0
라이선스
MIT
최근 업데이트
2026. 11. 8.

설치

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:bushizhanghan/dsh-arg-guard

配置

- id: arg-guard
  name: "@bushizhanghan/dsh-arg-guard"
  config:
    enabled: true        # 总开关,默认 true
    mode: deny           # deny = 拦截;warn = 只记录、放行
    skip: []             # 不检查的工具名,例如 [bash]

上线顺序建议:先 mode: warn 跑一段时间,用 arg_guard_status 看 violations 里有没有误报(工具声明的 schema 比真实契约更严时会误报), 确认干净再切 deny。