DeepSeek Harness Plugin: dsh-bundle-presets

Introduction

In DeepSeek Harness (DSH), bundle combinations directly determine runtime capabilities. Switching bundle lists typically requires enabling or disabling each bundle individually in the Installed tab, which is cumbersome and error-prone. The dsh-bundle-presets plugin provides preset management for these operations.

What Is This

dsh-bundle-presets is a client-side plugin for DeepSeek Harness, developed by maintainer ZY-WANG-0304. It adds a Presets tab to DSH, allowing you to save, edit, apply, and revert bundle combinations.

The core value: save the current bundle list as a named preset, then quickly switch between combinations via presets, with a diff preview before applying.

Core Features

The plugin adds a Presets tab to the Plugins page, providing the following capabilities:

  1. Save Current Combination
    Save the bundle list currently running in your active profile (not a template), identified by a name.

  2. Edit Presets
    In the Presets tab, each bundle displays its icon, localized title, package name, description, and the native 36×20 toggle switch. You can check or uncheck items directly to modify the preset contents.

  3. Preview Diff
    Before applying a preset, a diff is displayed: which bundles the preset will enable and which it will disable.

  4. One-Click Apply
    After clicking Apply, the plugin first enables the bundles in the preset, then disables the remaining ones. Browser bundles stay enabled during the transition to avoid runtime interruption.

  5. Undo Last Switch
    After applying a preset, you can roll back to the previous state via Undo last switch. A snapshot is only written when the manifest actually changes.

  6. Sidebar Quick Switch
    At the bottom of the plugin manager sidebar (above Settings), there is a Presets row. Hovering reveals a right-side panel listing all presets with the currently active one marked. Click to switch; press Esc to close the panel and return focus.

  7. Conflict Handling
    Attempting to overwrite an existing preset name returns a 409 name-exists error first, requiring user confirmation.

  8. Permissions & Compatibility
    Switching is implemented via pluginManager.setBundleEnabled(), inheriting the profile’s write lock, version compatibility checks, HMR recomposition, and the plugin manager’s protected bundle rejection mechanism.

If any step cannot be executed (e.g., a bundle file is missing, a patch is unreadable, or a protected bundle requires disabling), the entire switch is rejected (409 unappliable), with each bundle’s reason listed in the error message. If a step has already been written to the manifest but a subsequent step fails, an immediate rollback occurs.

Installation & Enablement

Run the following in the command line:

dsh plugin --profile <your-profile> add dsh-bundle-presets

Or in the DSH application UI: Plugins → Add plugin → search for dsh-bundle-presets.

The plugin requires a web interface (web or desktop). Headless, SDK, and ACP profiles will not mount it. If the host’s HMR is disabled, a profile restart is required after installation.

Typical Usage

  1. Set up the desired bundle combination in the Plugins → Installed tab.

  2. Open Plugins → Presets, enter a preset name, and click Save preset.

  3. When you need to switch later, select a preset and click Apply. A diff preview is shown before application; confirm and click apply. To roll back, click Undo last switch.

  4. Hover over the Presets row at the bottom of the sidebar for a quick way to view and switch presets.

The Current set card lists the currently active bundles (in hierarchy order, read-only). Editing a preset modifies which bundles it includes.

Use Cases & Notes

Suitable for developers or testers who need to frequently switch between multiple bundle combinations, e.g., preparing different bundle configurations for different scenarios.

Note: This plugin runs with the permissions of the current DSH process. Switching bundles modifies the profile’s manifest file. Review the source code and license before installing.

The plugin only switches bundle combinations within a single profile; it does not involve switching profiles, sessions, settings, or credentials. Presets store package names rather than versions. After upgrading or removing a bundle, missing entries are skipped and listed in the editor.

Routing is restricted to loopback by the Host header. Access via a reverse proxy or LAN address will return 403. Add your own authentication when exposing it externally.

State files are stored at <profile dir>/bundle-presets.json, protected by a cross-process lock.

Conclusion

dsh-bundle-presets transforms bundle combination switching from manual operations into preset-based management, reducing errors and improving efficiency. For more information, refer to the official catalog or the GitHub repository.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye