Introduction¶
DSH’s philosophy is “everything is a plugin”. The community directory is an independent site, with no official affiliation to DeepSeek / Fangyuan. For developers using DSH, when agents call write, edit, str_replace_editor, or bash, they usually need to confirm current changes and decide whether to allow them.
dsh-edit-approval provides this type of approval: before write / edit / str_replace_editor calls write to a file, red/green line-level diffs are shown; before bash commands run, approval can also be initiated. Bash approval is disabled by default.
What is this¶
dsh-edit-approval is a DeepSeek Harness plugin maintained by SiriLee, licensed under MIT. It targets two types of tool calls:
write,edit,str_replace_editor: Approval before writing files, panel shows red deleted lines and green added lines (line-level diff).bash: Approval before command runs, disabled by default.
Approval results support allowed-once and rejected. Settings → General provides Edit approval and Bash approval main switches.
Core Features¶
Edit Approval¶
Edit approval is enabled by default. When write, edit, or str_replace_editor is called, the plugin initiates approval before writing the file. The approval panel shows red deleted lines and green added lines (line-level diff).
Users can choose allowed-once to let the current call proceed; they can also choose rejected to deny the call.
Bash Approval¶
Bash approval is disabled by default. When enabled, approval is initiated before bash commands run. You can open Bash approval in Settings → General, or use a command to toggle it.
allow in the bash-approval settings namespace can configure the command prefix whitelist. The whitelist currently has no UI.
Bash approval does not read/write the file system, and sandbox upgrade calls will not ask repeatedly.
never Policy¶
When the session approval policy is never, the plugin delegates via next(), keeping the full-access session available. The plugin does not extend access permissions or change the sandbox mode.
Installation and Enablement¶
First, install the plugin:
dsh plugin --profile web add dsh-edit-approval
After installation, restart dsh web (--profile web).
The runtime environment requires Node ^22.19.0 || >=24.0.0.
Contributors can install using a fixed commit:
dsh plugin --profile web add github:SiriLee/dsh-edit-approval#<sha>
If the first run fails when installing from git, you need to add the allowBuilds key in the profile’s pnpm-workspace.yaml. npm pack runs prepare, and the generated tarball carries the pre-built lib/ and LICENSE.
Typical Usage¶
-
Edit approval is enabled by default. Red/green line-level diffs are shown before any
write,edit, orstr_replace_editorcall; chooseallowed-onceorrejected. -
When needing to approve bash commands, open
Bash approvalinSettings → General, or run:
/approval-bash on
- View or turn off approval switches:
/approval-edit status
/approval-bash status
/approval-edit off
/approval-bash off
-
Configure whitelist for bash approval: Configure command prefixes that are always allowed in
allowwithin thebash-approvalsettings namespace. -
Under
neverapproval policy, the plugin delegates to the sandbox, does not extend access permissions, or change sandbox mode.
Use Cases and Notes¶
Suitable for developers who wish to confirm file writes and command executions one by one in the DSH web profile. Especially suitable for scenarios requiring viewing edit diffs, preserving full-access session availability, or setting prefix whitelists for bash commands.
Pre-use notes:
- The plugin runs with the current dsh process permissions; source code and license should be checked before installation.
Bash approvalis disabled by default; if not enabled, command calls will not enter this approval.allowwhitelist currently has no UI, needs configuration via settings namespace.- Node version requirement is
^22.19.0 || >=24.0.0. - First run from git installation might need
allowBuildsinpnpm-workspace.yaml.
Getting¶
The value of dsh-edit-approval is to make file writes and command approvals explicit: edits have red/green diffs, commands have independent switches and whitelists, and the policy delegates to the sandbox.
GitHub: https://github.com/SiriLee/dsh-edit-approval
Community directory can be searched by dsh-edit-approval; this article does not attach unverified directory page URLs.