Introduction¶
In DeepSeek Harness (DSH), when an Agent executes commands via tools like pwsh or bash, it often triggers an “escalation” (エスカレーション): requiring the user to click allow or deny in the panel every time. When the development pace quickens and similar commands appear repeatedly, this easily turns into “approval hell”—either clicking continuously or relying on memory to modify global policies, which often leads to rules that are too broad or too narrow.
The community plugin dsh-command-permission (maintainer: yukieiji, category: admin-security) adds two capabilities on top of DSH’s built-in approval workflow: “one-click registration of the current command as an allowed pattern” and “maintaining allow/deny lists per workspace.” Below, we introduce what it does, how to install and use it, as well as the matching order and limitations.
What is this?¶
dsh-command-permission is a DSH plugin (npm package: @yukieiji/dsh-command-permission, version 0.2.0 in the materials, MIT License). It does not alter the DSH core; instead, it extends the UI and rule storage within the command escalation approval and the sidebar workspace menu. This allows you to decide once—either at the moment of approval or in the workspace settings—whether a specific command needs to be queried again in the future.
Rules are written to .dsh/command-permissions.json under each workspace; session-level permissions are persisted by Session ID (retained after a host restart and isolated from other sessions).
Core Features¶
1. One-click Allow buttons in the Approval Panel¶
When an escalation approval for pwsh / bash pops up, two rows of allow buttons appear below the command string (the README uses uv run app.py as an example):
- Session Row: Allows “uv run app.py”, “uv run *“, “uv *“, or other granularities within the current session.
- Workspace Row: Sets the workspace allow list to one of the patterns like “uv run app.py”, “uv run *“, or “uv *“.
Clicking any of these registers the corresponding pattern and immediately returns “Allow” for the current approval, eliminating the need to click “Allow” on the main panel.
- Session permissions are written to the
sessionsection of.dsh/command-permissions.json, saved keyed by Session ID. - Workspace permissions apply to all sessions within that workspace.
2. Command Permissions in the Workspace “…” Menu¶
In the sidebar workspace row, the “…” menu (alongside items like Rename and Delete, with the new item added at the bottom) → “コマンド権限…” (Command Permissions; interface text depends on the plugin locale) allows editing the workspace-specific lists:
- Allow List: Matching command escalation approvals are automatically passed (no prompt).
- Blacklist: Matching commands are automatically denied (no prompt; priority is higher than the Allow list).
3. Pattern Syntax and Matching Order¶
Storage location: <workspace>/.dsh/command-permissions.json. Example structure:
{
"allow": ["uv run *", "git status"],
"deny": ["git push", "rm *"],
"session": {
"s0123456789abcdef": ["uv run app.py"]
}
}
One pattern per line: if there is no *, it is a exact match; * is a wildcard that can be used at any position. Whitespace is normalized before comparison (e.g., git push and git push are treated as identical). Except for *, characters like . and + are treated as normal characters.
| Pattern | Matches | Does Not Match |
|---|---|---|
uv run app.py |
Only uv run app.py |
uv run other.py |
uv run * |
uv run app.py, uv run anything deep.py |
uv run (trailing space required, see README table) |
uv * |
uv add requests |
uvx add x |
* --force |
git push --force |
git push |
git * origin |
git push origin |
git push |
When a command escalation occurs, the matching order is:
- Workspace Deny List
- Workspace Allow List
- Session Allow
- If none match, prompt the user according to default DSH behavior.
4. /cmdperm Session Commands¶
The following commands can be used in DSH sessions to manage the lists (writing to the same JSON file as the UI):
| Command | Meaning |
|---|---|
/cmdperm session list |
List allow patterns for the current session |
/cmdperm session add <pattern> |
Add session allow (persisted) |
/cmdperm session remove <pattern> |
Remove |
/cmdperm session clear |
Clear entries related to this session |
/cmdperm workspace allow add <pattern> |
Add to workspace allow list |
/cmdperm workspace deny add <pattern> |
Add to workspace deny list |
/cmdperm workspace <id> list |
View lists for a specific workspace |
/cmdperm workspace <id> save <json> |
Save lists (for internal dialog usage) |
Installation and Activation¶
The plugin runs with the permissions of the current DSH process; before installation, it is recommended to read the GitHub repository source code and the MIT License to ensure compliance with your security policies.
The Git repository installation method provided in the official README is: use “Path/URL specification” in the Plugin Manager:
github:yukieiji/dsh-command-permission
For local development builds, the README explains that after cloning the repository, you can run pnpm install && pnpm build, then in Plugin Manager → Add → Specify Path point to that directory → Enable → Refresh Page. Daily users can simply install via URL.
The DSH ecosystem emphasizes “Everything is a plugin”; the SkillHub Directory Page is a community site and has no official affiliation with DeepSeek / High-Flyer.
Typical Usage¶
- After installing and enabling the plugin, when the Agent triggers an approval for
uv run app.pyfor the first time, click the “uv run *” in the Workspace row or a narrower pattern in the Session row below the command to complete this approval and register the rule. - For operations that must be prohibited (such as
git push,rm *), open the workspace “…” → Command Permissions, and add them to the Deny list; subsequent commands of the same type will be automatically denied. - To temporarily relax restrictions only for the current session: use
/cmdperm session add 'uv run tests/*', and clear it with/cmdperm session clearwhen the session ends.
Use Cases and Notes¶
Suitable for: Repeatedly running tests, package management, read-only git commands, etc., in the same workspace where you want to reduce repetitive clicking but require finer workspace/session boundaries than simply “globally allowing everything.”
Limitations (from README):
- Workspace menu items are implemented via DOM injection (ui-workspace currently lacks a dedicated slot); if the DSH frontend DOM changes, menu items may disappear, requiring a plugin update.
- Patterns only apply to shell-type tools with a
commandparameter; escalation approvals for filesystem tools still follow the default inquiry. - The
sessionsection accumulates entries by Session ID; use/cmdperm session clearor manually edit the JSON when no longer needed.
Conclusion¶
dsh-command-permission connects “registering patterns at the moment of approval” and “workspace allow/deny tables” to the existing DSH escalation workflow, using a clear matching order to prevent conflicts between allow/deny. If your main pain point is the repeated pop-ups for bash/pwsh commands, you can view the introduction on the directory page and try installing it using the github:yukieiji/dsh-command-permission command above.
- Directory Page: https://www.skillhub.cn/plugins/yukieiji/dsh-command-permission
- GitHub: https://github.com/yukieiji/dsh-command-permission