Introduction¶
DeepSeek Harness (DSH) allows plugins to be managed by editing the cordis.patch.yml file. However, in real development, repeatedly modifying configuration files or restarting services to test plugin toggles is inefficient. The dsh-plugin-ui-toggle plugin provides a way to control plugin toggles directly in the Web UI, avoiding interruptions caused by manual configuration edits and restarts.
Plugin Overview¶
This is a client-side plugin maintained by Biobuilder-ai. Its core function is to enable or disable any composed plugin entry in the DSH Web interface. By writing disable markers into the configuration file, it achieves immediate effect and persistent storage for toggles.
Core Features¶
- Web UI toggle: Provides visual plugin switches via the settings menu.
- Immediate effect: Changes runtime state immediately after switching, without restarting the service.
- Persistent storage: Writes toggle state to
cordis.patch.yml, so it remains valid after restart. - Zero dependencies: Does not rely on additional runtime components.
Installation and Enablement¶
- Add the plugin using the official installation command:
dsh plugin --profile web add github:Biobuilder-ai/dsh-plugin-ui-toggle
- After installation completes, restart the
dsh webservice to activate the plugin.
Typical Usage¶
Via Web UI¶
Go to Settings → Plugins → Plugin switches in the Web interface. Each item in the list corresponds to an entry in the Loader tree. Click the switch to enable or disable that entry.
Via API¶
The plugin provides same-origin API endpoints:
- List entries: GET /ui-toggle/entries
- Set state: POST /ui-toggle/set, with request body { id, enabled }
How It Works¶
The plugin maintains a managed block at the end of the cordis.patch.yml file. When you toggle a switch in the UI, the plugin writes or removes - id: <entry id> and disabled: true|false lines within this block.
# >>> dsh-plugin-ui-toggle:begin — managed block, edited from the web UI
- id: "web-ui-git-graph"
disabled: true
# <<< dsh-plugin-ui-toggle:end
The DSH HMR service watches for file changes and reapplies the patch, thereby updating the state.
Use Cases and Considerations¶
- Use cases: Suitable for developers who need to frequently test plugin combinations or dynamically adjust feature modules.
- Core limitations: Some core plugins (such as
dsh-plugin-ui-toggleitself, host services, etc.) cannot be disabled. The UI marks them as Required and rejects writes. - Dependencies: Disabling a dependency causes that dependency to disappear (it is removed from the Loader tree).
- Configuration file location: The managed block is fixed at the end of
cordis.patch.yml. Do not manually delete the entire block, or all overrides set through the UI will be cleared.
Summary¶
dsh-plugin-ui-toggle solves plugin state persistence and dynamic adjustment by reading and writing a specific block in cordis.patch.yml, providing DSH developers with a low-invasive, dependency-free debugging tool.
Documentation source: Biobuilder-ai/dsh-plugin-ui-toggle