SiriLee/dsh-edit-approval ↗★ 3
dsh-edit-approval
Edit and command approval with a line diff · 文件修改与命令执行审批,附行级 diff 适合需要严格控制代码修改和命令执行安全性的用户,提供直观的diff对比。
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:SiriLee/dsh-edit-approvalREADME
Read the full README ↗Usage
- Edit approval is on by default. Any
write/editcall asks before the file is touched. The panel shows only the changed lines — removals red, additions green — with a right-alignedNN|line-number gutter and a…ellipsis marking skipped context and hunk gaps. - Approve once or reject.
allowed-oncelets the call proceed;rejecteddenies it and reports back to the model. - 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. - Command-line entry:
/approval-edit on|off|statusand/approval-bash on|off|status— the same document the Plugins panel edits, so the two cannot disagree. - Allow-list (config file):
bashAllowholds command prefixes that always pass. Matching is whitespace-normalized (git pushhitsgit 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: