Preface¶
When running agents in DeepSeek Harness (DSH), workspace operations proceed as usual; however, once a one-time sandbox privilege escalation is triggered, a manual approval prompt typically pops up by default. When privilege escalation requests are frequent, similar operations can interrupt you repeatedly, yet fully automatic approval violates DSH’s permission design.
The community plugin dshx-ai-approval (maintainer callaumyan-design, category admin-security) adds an LLM review layer before DSH’s existing approval channel: if the model determines the request is safe, it executes directly; if judged as a denial, timeout, or error, it falls back to the original manual approval, ensuring no automatic privilege violation occurs due to AI-side anomalies.
What is this¶
In short: It adds a permission preset named “AI Approval” to DSH, allowing one-time sandbox privilege escalations to be judged by a review model first, before deciding whether your manual consent is still required.
Sandboxing, permission policies, and approval records remain the responsibility of DSH; the plugin extends permission presets via Cordis patches and injects a settings page into the client (@deepseek-ai/dsh-client-ui-settings) for you to select the review provider and model. It is implemented in pure JavaScript with no build step.
Core Features¶
The review logic is consistent with the README description:
- Model returns ALLOW → Directly approves that escalation;
- Model returns DENY, timeout, or error → Pops up manual approval as usual, without automatic approval.
After installation, new sessions default to this preset (if you have selected a different default permission in settings, your choice takes precedence). In Settings → AI Approval, you can configure the primary and fallback review models (the fallback is used when the primary model errors, cools down, or returns an irrelevant response), and test connectivity with one click.
Each review can be written to the log file ~/.dsh/dshx-ai-approval.log; set the environment variable DSHX_AI_APPROVAL_NO_LOG=1 to disable logging.
Configurable via cordis.patch.yml (if left blank, most items use built-in defaults):
| Field | Default | Description |
|---|---|---|
provider / model |
Empty (uses default model) | Review model |
fallbackProvider / fallbackModel |
Empty | Backup review model |
systemPrompt |
Empty (uses built-in rules) | Custom review rules |
Note: The plugin’s patch rewrites the preset list in the permission line (preserving the three built-in levels and adding ai-approval). If you have modified permission presets yourself, please open the configuration after installation to verify they match your expectations.
Installation & Activation¶
The plugin targets the web and desktop profiles and requires a DSH restart after installation (requiresRestart: true). You can view the entry in the SkillHub plugin directory; for source code and documentation, see the GitHub repository.
The following commands are from the repository README; please choose one based on the profile you are actually using:
# Web profile
dsh plugin --profile web add github:callaumyan-design/dshx-ai-approval
# Desktop (Use the dsh command bundled with DSH Desktop; exit Desktop completely from the tray first)
dsh plugin --profile desktop add github:callaumyan-design/dshx-ai-approval
Restart DSH after installation is complete. Uninstallation example:
dsh plugin --profile <profile> remove dshx-ai-approval
Replace <profile> with web or desktop.
Compatibility note: Developed and used on DeepSeek Harness 0.2.0-rc.2 (desktop / web profile). License: MIT.
Typical Usage¶
After the installation and restart steps above, follow the sequence suggested in the README:
- Confirm if the new session defaults to the “AI Approval” preset; if not, select it in DSH’s permission/preset settings.
- Open Settings → AI Approval, select the review provider/model, configure a backup model if needed, and run a connectivity test.
- Observe behavior when the agent executes tasks that may trigger sandbox privilege escalation: ALLOW should no longer trigger a pop-up; DENY or AI errors should still trigger manual approval.
- To troubleshoot review conclusions, check
~/.dsh/dshx-ai-approval.log(or setDSHX_AI_APPROVAL_NO_LOG=1to disable writing).
To fix the review model or customize rules via a configuration file, simply fill in the fields from the table above in DSH’s cordis.patch.yml; if systemPrompt is empty, the plugin’s built-in review rules are used.
Use Cases & Caveats¶
Suitable for DSH users who wish to reduce repetitive manual clicks in admin-security scenarios without disabling the sandbox approval chain: AI acts only as the “first filter,” while the final fallback remains DSH and yourself.
Please be aware before use:
- The plugin runs with the same permissions as the DSH process. Before installation, it is recommended to read the repository source code and MIT license to ensure the review prompt and model routing comply with your security policies.
- An AI misjudgment of ALLOW will directly approve the escalation; a misjudgment of DENY or model unavailability will only increase manual approval instances and will not silently bypass permissions.
- The DSH ecosystem emphasizes that “everything is a plugin”; SkillHub is a community directory site and has no official affiliation with DeepSeek/High-Flyer. The installation and configuration in this article are based on the plugin’s GitHub README.
Conclusion¶
dshx-ai-approval inserts an LLM review layer before DSH’s original sandbox privilege escalation approval. By using ALLOW/DENY and failing back to manual intervention, it offers a configurable compromise between efficiency and default security. Directory page: https://www.skillhub.cn/plugins/callaumyan-design/dshx-ai-approval; Repository: https://github.com/callaumyan-design/dshx-ai-approval.