Introduction¶
DeepSeek Harness (DSH) embraces a “everything is a plugin” philosophy — plugins can be installed or uninstalled at any time. However, feature-heavy plugins with a large number of MCP tools, like dsh-rea, when installed as a profile-level bundle, inject their tool definitions into every session — even when you’re just writing a script or having a casual chat, those tens of thousands of tokens of schema get stuffed into the request, wasting context, slowing down time-to-first-token, and inflating costs.
The ideal scenario is: this kind of plugin should only appear in sessions that actually need it. This plugin does exactly that — it installs a plugin into a same-named “mode” (agent preset). When you need it, simply pick a session from the mode selector that has the required capabilities; if you don’t pick it, it stays invisible and consumes zero context.
What It Is¶
dsh-plugin2preset is a DSH plugin that wraps feature-heavy, scenario-specific plugins (e.g., the dsh-rea reverse engineering suite) into a same-named mode. This way, its tools and schemas are only loaded in sessions where you explicitly select that mode, resulting in zero context overhead for all other sessions.
The plugin is developed by maintainer emo3o, currently at version 1.1.0, licensed under MIT.
Core Features¶
Mode-Based Loading¶
When a plugin is installed as a same-named mode, it is marked as an enabled: false dependency, excluded from global bundles, and does not load on the root plane. The mode declaration is written into the managed section of the profile’s cordis.patch.yml and stored in <profile>/storages/dsh-plugin2preset/modes.json. After restarting the host, the mode appears in the mode selector; when creating a new session, selecting it triggers the plugin’s tools to load in that session; if you don’t select it, other sessions remain at zero overhead.
Aggregating Multiple Plugins into One Mode¶
Since v1.1.0, multiple plugins can be aggregated into the same mode. In practice, you often need a group of plugins (e.g., for reverse engineering you might want dsh-rea + canvas + a binary analysis plugin). The “Target Mode” option in the dialog supports two choices:
- Create a new same-named mode: the original behavior — one plugin, one mode.
- Append to an existing mode: pick an existing mode from the dropdown and add this plugin to it. The mode’s
pluginslist gains an entry; when selected, the entire group of tools loads together; when not selected, the group remains at zero overhead for other sessions.
Legacy single-plugin data in older modes.json files is automatically migrated to a plugin array, and previously generated mode declarations remain compatible. To remove a plugin from a mode, call the Host API /dsh-plugin2preset/api/remove-from-mode ({ id, packageName }); when the last plugin is removed, the mode is automatically deleted.
Installation & Activation¶
Method 1: Install Directly from GitHub (Recommended)¶
Enter the GitHub URL in DSH’s “Add Plugin” dialog:
github:emo3o/dsh-plugin2preset
Method 2: Local Link to Profile¶
Add the following to the dependencies in profiles/<profile>/package.json:
"dsh-plugin2preset": "link:C:\\path\\to\\dsh-plugin2preset"
And add "dsh-plugin2preset" to bundles.
After installation, a host restart is required. A prompt will appear in the dialog.
Typical Usage¶
Create a Same-Named Mode for a Plugin¶
- Click “Convert to Same-Named Mode” in “Add Plugin” or on an installed plugin’s detail page.
- In the dialog, select “Create as Same-Named Mode.”
- Choose “Create a new same-named mode” or “Append to an existing mode.”
- After restarting the host, the mode appears in the mode selector; when creating a new session, select it to load the plugin’s tools in that session.
Aggregate a Group of Plugins into One Mode¶
- First, create a same-named mode for one of the plugins (or select an existing mode).
- For the remaining plugins, choose “Append to an existing mode.”
- When the new mode is selected, all plugin tools under that mode load together; when not selected, they remain at zero overhead for other sessions.
Use Cases & Notes¶
Suitable for DSH Desktop / Web. Wrap feature-heavy, scenario-specific plugins into same-named modes, and only select them in sessions that require the relevant capabilities when needed.
Notes:
- Only packages that declare dsh.bundle are wrapped; pure dependency libraries are rejected.
- Mode installation/modification goes through the host’s pluginManager; this plugin does not manually edit the profile’s package.json.
- A dialog prompt will notify you when a host restart is required.
- When migrating from the legacy dsh-as-mode, reading the old managed section automatically rewrites it with the new marker.
The plugin runs with the current dsh process permissions. Review the source code and license before installing.
Summary¶
This plugin solves the problem of “feature-heavy plugins persisting globally and wasting context.” By installing plugins as same-named modes and only selecting the mode when needed, you can keep different sessions lightweight, loading heavy tools only when they’re truly required. After installation, restart the host and the mode will be available in the mode selector.
- Plugin homepage: https://github.com/emo3o/dsh-plugin2preset
- Category: Workflow