Preface

In the DSH web interface, plugins are typically assembled from profiles and bundles. The more plugins are loaded, the more inconvenient it becomes to check one by one whether a specific plugin is enabled or in the running state.

dsh-plugin-toggle is a community-maintained DSH plugin that adds a Plugin Switch page to Settings → Plugins: it lists the package.json description, enabled status, and fiber phase of loaded plugins, and provides fuzzy search along with runtime Start / Stop. It does not rewrite configuration files, making it suitable for observing first, then adjusting plugin states.

What This Is

The repository name for dsh-plugin-toggle is DamonKoy/dsh-plugin-toggle, maintained by DamonKoy, under the MIT license.

It turns loaded DSH plugins into cards within the Plugins tab of Web Settings. You can search, view by group, start or stop at runtime, and record each toggle action to a local JSONL file.

Core Features

Plugin Cards

Each plugin card includes:

  • Title
  • Entry ID
  • Description
  • Enabled tag
  • Phase

The description comes from the plugin’s own package.json.

Grouping

Plugins are grouped into the following categories:

  • core
  • UI
  • theme
  • tools
  • fun
  • other

Groups can be collapsed.

Sorting

Within the same group, the sorting order is:

  1. Togglable plugins first
  2. Sorted by status, running first
  3. Sorted by name

Fuzzy search matches across multiple fields, including category. Tokens can be substrings or subsequences.

Runtime Start / Stop

Start / Stop calls:

entry.update({ disabled })

This is a runtime operation that does not perform tree.write() and does not rewrite cordis.yml.

Core / surface plugins, such as webserver, connection, session, agent, etc., are marked as Core and cannot be stopped from this page. Other plugins require a two-step confirmation to stop.

Usage Logs

Every toggle is persisted to:

~/.dsh/dsh-plugin-toggle.jsonl

The file retains the most recent 1000 records and displays them as a collapsible “Usage Logs” section on the page.

Persistence

The plugin is installed as a composition plugin and remains active after dsh web restarts.

Installation and Enablement

Method 1: Add via dsh plugin

Run:

dsh plugin --profile web add github:DamonKoy/dsh-plugin-toggle

Then restart dsh web and open:

Settings → Plugins → Plugin Switch

Method 2: Add as a Profile Dependency

Add the repository to profile dependencies and include the corresponding bundle:

{
  "dependencies": {
    "dsh-plugin-toggle": "github:DamonKoy/dsh-plugin-toggle"
  },
  "dsh": {
    "profile": {
      "bundles": ["dsh-plugin-toggle"]
    }
  }
}

Then, in the profile directory, run:

pnpm install

And restart dsh web.

Environment and Dependencies

Verified runtime requirements are as follows:

  • engines.node: >=20
  • dsh.client.platform: web

Peer dependencies include:

  • @deepseek-ai/cordis ^4.0.1
  • @deepseek-ai/dsh-client-runtime ^0.1.0-rc.6
  • @deepseek-ai/dsh-host-webserver ^0.1.0-rc.6
  • react ^18.2.0

Typical Usage

  1. Install the plugin and restart dsh web.

  2. Open:

Settings → Plugins → Plugin Switch
  1. Enter a plugin name, module, ID, or description fragment in the search box to filter the target plugin.

  2. Check the enabled tag and phase on the card to confirm the current status.

  3. Click Start / Stop on non-Core plugins; non-Core plugins require a two-step confirmation.

  4. Open “Usage Logs” to review recent actions.

  5. For programmatic access, call the same-origin HTTP API.

HTTP API

The plugin exposes a same-origin HTTP API.

Query Plugin List

GET /plugin-toggle/list

Returns:

{
  "entries": []
}

Query Usage Logs

GET /plugin-toggle/logs

Returns:

{
  "records": []
}

Records are listed newest first.

Set Enabled Status

POST /plugin-toggle/set

Request body:

{
  "entryId": "",
  "enabled": true
}

Returns:

{
  "ok": true
}

Or:

{
  "message": ""
}

This POST request is restricted to same-origin only.

Notes

  • This plugin reads loaded plugin information and provides runtime start/stop; it runs with the current dsh process permissions. It is recommended to review the source code and license before installation.
  • Start / Stop only affects the runtime and does not modify cordis.yml.
  • Core / surface plugins cannot be stopped from this page, preventing the page’s own dependencies from being shut down.
  • POST /plugin-toggle/set is restricted to same-origin only.
  • In client injection configuration, exports.inject uses the service name slots, not the package name; using the package name here will cause the client fiber to hang permanently.

References

The project source code, issues, and license can be found in the GitHub repository:

  • GitHub: https://github.com/DamonKoy/dsh-plugin-toggle