SiriLee/dsh-edit-approval ↗★ 3

dsh-edit-approval

Edit and command approval with a line diff · 文件修改与命令执行审批,附行级 diff 适合需要严格控制代码修改和命令执行安全性的用户,提供直观的diff对比。

Package
dsh-edit-approval
Compatibility
Unverified
Harness peer range
^0.2.0-rc.1
Cordis peer range
^4.0.1
Version
0.5.0
License
MIT
Last updated
Sep 28, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:SiriLee/dsh-edit-approval

Usage

  1. Edit approval is on by default. Any write / edit call asks before the file is touched. The panel shows only the changed lines — removals red, additions green — with a right-aligned NN| line-number gutter and a … ellipsis marking skipped context and hunk gaps.
  2. Approve once or reject. allowed-once lets the call proceed; rejected denies it and reports back to the model.
  3. Command approval is off by default — enable it on the plugin's card or with the command below. The panel's white headline is the description (e.g. bash · push to remote); the grey row below is the raw command text, rendered natively by the harness.
  4. Command-line entry: /approval-edit on|off|status and /approval-bash on|off|status — the same document the Plugins panel edits, so the two cannot disagree.
  5. Allow-list (config file): bashAllow holds command prefixes that always pass. Matching is whitespace-normalized (git push hits git push) so a bypass via extra spaces fails. There is deliberately no UI for it yet.

Configuration

The plugin's whole configuration is one profile entry — the dsh-edit-approval row its bundle patch inserts — layered as schema defaults < row config < persisted user layer. The patch ships no config on purpose: the schema defaults in src/index.ts are the single source of truth, so a profile patch restates only the keys it changes: