Preface¶
When running agents in DeepSeek Harness (DSH), whether tool calls execute and when approval prompts appear are often left to the built-in permission modes to decide for you. Read Only and Workspace Write are “approve-on-demand” — each tool decides for itself whether to ask; Full access is “never approve”. If you want every single tool call (including file reads, grep, glob, and web searches) to show you the full parameters before you decide to allow it, none of the three built-in modes fill that gap. Below we introduce the community plugin dsh-manual-approval (maintainer yknBugs, categorized under admin-security), which adds a fourth preset to Harness: Manual.
What Is This¶
dsh-manual-approval is a DeepSeek Harness plugin: in a Manual session, all tool calls return an ask and pop up an approval card before actually executing; the call only proceeds after you confirm. The plugin extends the permission preset table via a bundle patch without changing the shape of model-side tool calls — parameters are byte-for-byte identical to other modes. After installation, select Manual in the permission selector, or run /permission manual.
Comparison with the Three Built-in Modes¶
| Mode | Sandbox | Approval |
|---|---|---|
| Read Only | read-only |
On demand |
| Workspace Write | workspace-write |
On demand |
| Full access | danger-full-access |
Never |
| Manual (this plugin) | None (bundles danger-full-access) |
Every time |
“On demand” means the tool itself decides whether to ask; if it doesn’t ask, it executes immediately. Manual is not decided by individual tools — every single time you decide at the card, with parameters shown line by line, without summarized omissions.
Core Features¶
Confirm Before Every Call¶
When Manual is the active mode, the plugin returns ask for all tool calls before other pre-execute listeners. Shell-type tools also display the one-line description the model filled in (explaining what the command does) in the details.
Optional Feedback Written into Results¶
The approval card has an optional feedback box. When allowing, your input is attached as a note to that call’s result; when denying, the same content is returned to the model as the denial reason, making it easy to convey your judgment “at the step being executed”.
Fail Closed¶
Closing the card, having no approval path, or an approval error — none of these will execute the call.
Automatic Rules (Settings → Manual mode rules)¶
When Manual is active, every call is first matched against your configured ordered rule list; the first matching rule takes effect, and if none match, the normal approval card is shown.
A rule consists of several conditions (all must be satisfied) plus one action. Each condition picks a target and matches with a regular expression:
| Target | Regex Matched Against |
|---|---|
| Tool name | Full tool name, e.g. ^pwsh$ |
| Parameter name | Each parameter name, e.g. ^(command\|cmd)$ |
| Parameter value | Each parameter value, e.g. rm\s+-rf |
| Action | Effect |
|---|---|
| Allow | Execute immediately, no prompt |
| Deny | Do not execute; the reason is returned to the model in the same format as a manual denial |
| Warn at approval | Still prompts; the card shows your configured warning text in red |
| Network judge | POSTs the call to your configured endpoint and decides based on the response |
Rules can be reordered. If you put a catch-all rule “tool name .* + Allow” first, Manual can behave like Full access, serving as an escape hatch.
Rule denials and manual denials written in the card go through the same formatting path; the model cannot distinguish whether a denial came from an automatic rule.
Network Judge¶
The decision is made from the Host process (not the browser), so http://127.0.0.1:…, intranet HTTP, and endpoints without lenient CORS can all be used. The default is POST with content-type: application/json, and the request body is the merged JSON document of the entire call (including optional cwd and each tool’s parameters). The response is read via decisionPath (required) for "approve", "deny", or "ask"; an optional reasonPath retrieves the reason string. Any failure (unreachable, non-2xx, invalid JSON, missing path, timeout, etc.) shows the specific error and falls back to human approval — it does not fail open.
UI Language¶
The approval panel and the rules settings page register English and Simplified Chinese via DSH’s ctx.locale, following Settings → General → Language; switching languages updates the text without reloading. Regular expressions and JSON field names in rules remain in their technical original form.
Installation and Activation¶
Installation adds the package, chains the plugin into the profile, and applies the bundle patch; the new preset and Host-side logic take effect on the next profile start. After installation, you need to restart dsh web (or your profile).
Official installation command:
dsh plugin --profile web add dsh-manual-approval
To install from a local checkout (you need to clone the repo to a local directory yourself):
git clone <this repo> dsh-manual-approval
dsh plugin --profile web add ./dsh-manual-approval
dsh --profile web --dump-config # verify composition
Uninstall:
dsh plugin --profile web remove dsh-manual-approval
To verify the composition, check that the output of dsh --profile web --dump-config contains a manual-approval line, and that id: permission has been patched by dsh-manual-approval. The plugin ships with cordis.patch.yml, so there is no need to manually edit the Host composition; uninstalling the plugin removes the patch as well.
Typical Usage¶
- Install the plugin for the
webprofile using the command above and restart DSH Web. - Select Manual in the permission selector, or run
/permission manualinside a session. - When the agent initiates any tool call, view the tool name and each parameter line in the card, choose to allow or deny, and fill in feedback if necessary.
- If there are many repetitive operations, add Allow / Deny / Warn / Network judge rules in Settings → Manual mode rules and adjust their order; to fully open everything you can use a catch-all Allow rule (evaluate the risk yourself).
Developers can use the following commands inside the repo for offline and boot verification (excerpted from the README):
npm test
npm run test:boot
Use Cases and Notes¶
Who it’s for: Users and teams who need high-control auditing, training demos, or — when not fully trusting the default “approve-on-demand” strategy — want to review parameters case by case before granting permission in DSH.
Permissions and sandbox: Manual bundles danger-full-access and has no sandbox; a single approved call has full execution privileges, including writes outside the workspace. The plugin has no platform-specific code; behavior is consistent across Linux, macOS, and Windows.
Security and trust: The plugin runs with the current DSH process’s privileges; Network judge sends call details to the URL you configure. Before installing, read the source code and MIT license of the GitHub repository, and understand that the bundle patch modifies the permission preset table (if Harness adds a fifth built-in preset in the future, this patch file will need to be updated alongside the version).
Environment: package.json requires Node ^22.19.0 || >=24.0.0; peer dependency @deepseek-ai/cordis ^4.0.2 (optional). The current package version is 0.1.0.
Ecosystem note: DSH adopts an “everything is a plugin” extension approach; the community catalog site has no official affiliation with DeepSeek / HFSC, and this plugin comes from community maintainer yknBugs.
Conclusion¶
dsh-manual-approval adds Manual on top of Harness’s three built-in permission modes: every tool call first goes through an approval card, with transparent parameters, optional feedback, and the ability to use ordered rules and Network judge for automated trade-offs. If you want to enable it in the Web profile, remember to restart the profile after installation and use dump-config to verify the patch is in effect.
- Community catalog: https://www.skillhub.cn/plugins/yknBugs/dsh-manual-approval
- Source code and documentation: https://github.com/yknBugs/dsh-manual-approval