Bundle
dsh-auto-review-plugin
Codex-style Guardian reviews, audit, and manual override for DeepSeek Harness
- Source
- Xinlong-Wu
- stars
- 1 stars
- License
- MIT
- Updated
- Updated 6 days ago
Readme
# dsh-auto-review 中文 | [English](README.en.md) `dsh-auto-review` 为 DeepSeek Harness 增加 `auto-review` 权限预设。它对可证明的工作区只读操作直接放行,并让独立 Guardian 模型审查 Shell、网络、MCP、沙箱升级和其他扩展审批。 > 这是插件层实现,不修改 DSH 内核,也不声称与其他产品的原生审批协议完全等价。 ## 核心安全承诺 - 所有批准最多返回一次性的 `allowed-once`,不会建立永久授权。 - `critical` 风险永不自动批准;`high` 风险需要直接用户对精确目标给出充分授权。 - 不明确的 call、工具不匹配、证据超限、Reviewer 故障、非法输出和无法还原精确动作的通用审批都会 fail closed。 - 启用审计时,任何批准都必须先成功追加并 `fsync` 最终 JSONL 记录。 - 人工覆盖复用 DSH 原生“拒绝 / 允许一次”面板,不再显示包含完整参数的大段问题 UI。 - 输入框上方的 Guardian 卡片不保存原始参数或证据;除枚举状态外,只显示一条最多 240 字符、经常见凭据和 URL query 脱敏的 Guardian 判断原因。 详细模型见[安全与审计](docs/security-and-audit.md)。 ## 安装 npm 包名与 Client 模块身份为 `dsh-auto-review-plugin`;Host 插件运行时名称仍为 `dsh-auto-review`。 ```bash cd dsh-auto-review pnpm install pnpm build dsh plugin --profile web add "$PWD" dsh --profile web --dump-config ``` 使用 pnpm 11 时,如果安装报告 `ERR_PNPM_IGNORED_BUILDS` 并列出 `@deepseek-ai/dsh-subprocess-local`、`koffi`,这是依赖构建脚本审批机制,不是 lockfile 损坏。审核依赖来源后运行: ```bash pnpm approve-builds @deepseek-ai/dsh-subprocess-local koffi pnpm rebuild @deepseek-ai/dsh-subprocess-local koffi ``` 不要在未审核所有候选依赖时使用 `pnpm approve-builds --all`。详细说明见[开发文档](docs/development.md#pnpm-依赖构建脚本审批)。 卸载: ```bash dsh plugin --profile web remove dsh-auto-review-plugin ``` Bundle 保留 DSH 自带的 `read-only`、`workspace-write`、`danger-full-access`,并增加 `auto-review`。Cordis patch 会替换 `permission.config.presets` 整张表;已有自定义 preset 时,请在后续 Profile patch 中重新声明,并始终用 `--dump-config` 检查组合结果。 ## 快速配置 可在 **设置 → 插件 → Auto Review** 中配置。设置卡默认折叠;展开后按审查模型、审查范围、证据预算、人工审批和审计分组。保存仅写实际变化的字段,Reviewer route 原子更新,失败时回滚。兼容字段 `trajectoryEnabled` 仍由 Host 接受,但当前 Web 设置已隐藏。 也可使用环境变量: ```bash export DSH_AUTO_REVIEW_PROVIDER=deepseek export DSH_AUTO_REVIEW_MODEL=deepseek-chat export DSH_AUTO_REVIEW_MANUAL_OVERRIDE=denied-and-unavailable export DSH_AUTO_REVIEW_AUDIT_DETAIL=summary ``` Provider 与 Model 必须同时设置或同时留空。完整字段、默认值和范围见[配置参考](docs/configuration.md)。 ## 审查体验 1. 明确、安全且位于 workspace 内的只读操作可直接执行。 2. 其他目标进入 Guardian Review;输入框上方的卡片依次显示 Reviewing、Awaiting approval 和最终状态。 3. Guardian 拒绝或不可用且策略允许时,DSH 显示原生单次审批面板。 4. 卡片默认折叠;当前 Session 使用 `auto-review` 时持续显示最近一次结果。刷新、切换 Session 或 Client 插件重载会从 Host 快照恢复;Host 重启后从当前审计 JSONL 恢复最近一条已持久化结果;关闭审计或审计失败的结果只在当前 Host 生命周期保留。 5. 插件不写入自定义 Session UI 事件;JSONL 每次审查仍只写一条最终记录。 详见[审查流程与 Web UI](docs/review-flow.md)。 ## 文档 - [配置参考](docs/configuration.md) - [审查流程与 Web UI](docs/review-flow.md) - [安全与审计](docs/security-and-audit.md) - [开发、验证和已知限制](docs/development.md) - [English README](README.en.md) ## 开发 要求 Node `^22.19.0 || >=24`。源码、测试和构建配置均使用 TypeScript;生成的 JavaScript 仅位于被 Git 忽略的 `lib/`。 ```bash pnpm install pnpm verify ``` 更多命令、架构和发布说明见[开发文档](docs/development.md)。 ## 许可证 MIT
Install
dsh plugin --profile web add github:Xinlong-Wu/dsh-auto-review
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-auto-review-plugin from the hub
- This package builds from source on install. pnpm will ask you to allow its build script — that is permission to run the package’s code on your machine, outside the agent sandbox. Only allow sources you trust.
- This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.