DSH Plugin plugin-switch: Enable or Disable Plugins Directly in the Plugin Manifest

Preface

For DSH users who frequently need to adjust plugin combinations, manually editing configuration and restarting services is inconvenient. plugin-switch turns “enable/disable plugins” into a simple slider operation on the page.

It adds slider toggles to the DeepSeek Harness (DSH) plugin inventory page: click to enable or disable any plugin, taking effect immediately without restarting the server, and the state persists after restart.

What This Is

plugin-switch is maintained by cynch18, with the package name dsh-profile-plugin-switch, package version 0.5.1, and licensed under MIT.

It is a local web profile plugin for DSH, with the main entry point being the “Plugin Inventory” page in Settings.

Core Features

  • Real-time enable/disable: Takes effect through an active replay channel, bypassing the platform watcher deadlock for deterministic results.
  • List management: Supports grouping by system / third-party / local, with status filtering, sorting, and search.
  • Batch operations: Supports batch enable/disable; batch actions are processed as a single transaction, with one backup and one-step undo for full rollback.
  • Undo and backup: Provides an “↺ Undo” button; automatic backup before every toggle, keeping the latest 20 copies.
  • Risk alerts: Strong confirmation for critical entries, dependency warnings, disable confirmation warnings, layered disable sources, config preview, and failure diagnostics.
  • Other capabilities: Real-time multi-tab sync, CLI recovery tool, bilingual interface, and animations.

Installation and Activation

Prerequisites

DSH must be running with the web profile, and Node ≥ 22 is required. To run with the web profile:

npx @deepseek-ai/dsh web

Install using the dsh plugin command:

dsh plugin --profile web add github:cynch18/plugin-switch

After installation, restart dsh web, press Ctrl+Shift+R to force-refresh the browser, then open:

Settings → Plugins → Plugin Inventory

A slider toggle will appear on the right side of the plugin.

Alternative Installation Methods

If you are using a PowerShell environment, the following methods are also available. Choose one of the three installation methods—do not install repeatedly; installing twice in the same profile will create duplicate entries and cause errors on restart.

Download plugin-switch.zip directly and run:

powershell -ExecutionPolicy Bypass -File .\install.ps1

Or clone via git and run:

git clone https://github.com/cynch18/plugin-switch.git
cd plugin-switch
powershell -ExecutionPolicy Bypass -File .\scripts\install.ps1

The PowerShell scripts for methods two and three support the following parameters:

  • -KeepOriginal: Keeps the original read-only inventory and only enables the HTTP API.
  • -Dev: Creates a junction pointing to the source code so code changes take effect directly.

Typical Usage

Temporarily Enabling or Disabling Plugins

Navigate to:

Settings → Plugins → Plugin Inventory

Find the target plugin and click the slider on the right to enable or disable it. The state takes effect immediately—no need to restart dsh web.

Batch Adjustments

Multiple plugins can be enabled or disabled in batch. Batch actions use a single transaction: one backup, and undo rolls everything back in one step.

Undo After Mistakes

If you click incorrectly, use the “↺ Undo” button on the page to restore the configuration to its state before the last toggle. A backup is automatically created before every toggle, keeping the latest 20 copies.

Recovery After the Toggle Page Disappears

If you disable “Plugin Switch” itself, the toggle page will disappear. Open:

%USERPROFILE%\.dsh\profiles\web\cordis.patch.yml

Find the plugin-switch entry, change disabled: true back to false, and save to restore the toggle page.

Recovery Using the CLI

If the GUI cannot be opened, run the CLI recovery tool:

node scripts/dsh-plugin-fix.mjs list
node scripts/dsh-plugin-fix.mjs enable <id>
node scripts/dsh-plugin-fix.mjs disable <id>
node scripts/dsh-plugin-fix.mjs undo
node scripts/dsh-plugin-fix.mjs backups

Restoring the Original Read-Only Inventory

To return to DSH’s original read-only plugin inventory, change disabled: true back to false for ui-settings-plugin-inventory and plugin-inventory in %USERPROFILE%\.dsh\profiles\web\cordis.patch.yml, and delete the plugin-switch entry at the same time.

Complete Uninstallation

Delete the plugin directory:

%USERPROFILE%\.dsh\profiles\web\node_modules\dsh-profile-plugin-switch

And remove the relevant entry from:

%USERPROFILE%\.dsh\profiles\web\cordis.patch.yml

Applicable Scenarios and Notes

Suitable for those who run DSH with the web profile locally, need to frequently adjust plugin combinations, and want to reduce restarts and manual configuration edits.

Notes before use:

  • plugin-switch runs as a local web profile plugin.
  • /plugin-switch is an unauthenticated local HTTP route, trusted at the same level as DSH’s built-in /plugins/..., and is for personal local use only.
  • The plugin runs with the current dsh process permissions; review the source code and the MIT license before installation.
  • Do not run the three installation methods repeatedly.
  • If you modify index.js inside the package, you need to restart dsh; if you only modify client.js, a page refresh is sufficient.
  • Batch operations and critical entries will have confirmation or risk prompts; check the config preview before enabling/disabling.

Getting It

GitHub repository: https://github.com/cynch18/plugin-switch

Directory page: Refer to the search results in the DSH community directory you are using. The DSH community directory is an independent site and has no official affiliation with DeepSeek / High-Flyer.

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

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

Xiaoye