Introduction¶
The model behavior in DeepSeek Harness is jointly determined by the system prompt and runtime context. dsh-armor-switch registers rules at both levels and can optionally sanitize fixed text in the host and Profile. It provides a reversible control plane for managing delivery contracts.
What This Is¶
This is a reversible delivery contract plugin for DeepSeek Harness. It provides persistent real-time contracts, validated Electron host sanitization (handled with original-fs), Profile sanitization, and settings cards.
Installation¶
The installation process is completed with a PowerShell script, which syncs the plugin to a local directory and modifies the Profile configuration.
# Clone the plugin to the DSH plugin directory
git clone https://github.com/571242/dsh-armor-switch "$env:USERPROFILE\.dsh\plugins\dsh-armor-switch"
cd "$env:USERPROFILE\.dsh\plugins\dsh-armor-switch"
# Preview the changes without writing them to disk
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\install.ps1 -WhatIf
# Run the installation
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\install.ps1
After installation, you need to restart DSH Desktop. A control chip will appear above the input box; click it to toggle the plugin in the plugin page.
Core Features¶
- Reversible Delivery Contract: Registers rules in the system prompt and runtime context, with activation and deactivation controlled by a toggle.
- Persistent Real-Time Contract: Runtime contracts take effect on the next request and support hot switching without restarting the process.
- Validated Electron Host Sanitization: Uses
original-fsto process Electron.asarfiles and ensures sanitization operations are executed correctly. - Profile Sanitization: Sanitizes the relevant configuration blocks in the Profile.
- Plugin Page Controls: Provides a graphical interface for managing toggles.
- Zero External Dependencies: Relies only on the DSH built-in runtime and requires no extra build steps.
How It Works and Limitations¶
The plugin controls prompt generation through registration functions. When the toggle is off, the registration surface returns an empty string, so the prompt received by the model is byte-for-byte identical to the official one.
Timing Differences for Activation:
* Runtime contracts: The toggle state exists only in memory and takes effect on the next request.
* Host sanitization: The bytes are written to disk immediately, but the DSH host process has already read the constants into memory at startup; therefore, to make the model read the new wording, you must restart DSH.
* Profile blocks: Take effect in the next new session.
Known Limitations:
1. Minimal preset: Under the minimal preset, the plugin does not take effect at all.
2. Host sanitization dependency: Uses original-fs to process Electron .asar files to bypass Electron’s filesystem interception mechanism.
3. Permission restoration: When full permissions are enabled, the restoration target is the Profile’s defaultPreset, not a hardcoded value.
Conclusion¶
This plugin gives DSH users fine-grained control over model behavior at the registration surface and host level, without introducing any external build dependencies. For detailed documentation or source code, please visit its GitHub repository.
- GitHub: https://github.com/571242/dsh-armor-switch
- Catalog page: https://www.skillhub.cn/plugins/571242/dsh-armor-switch