dsh-staging-guard:用 pre-execute 钩子把「成果区」设为只读
dsh-staging-guard 是 mdl233 发布的 DSH admin-security 插件,在 tools/pre-execute 阶段拦截 write/edit/str_replace_editor 对受保护根下成果区的写入,引导 agent 只改草稿区。受保护根由 roots.json 与会话 cwd 并集决定;定稿需人在宿主外运行 promote.mjs。支持环境变量配置、disabled 应急放行与 test-scope.mjs 离线测试。作者明确其为防手滑软边界而非安全边界。安装可用 node install.mjs 或 dsh plugin add dsh-staging-guard。MIT 1.0.0。
阅读全文