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:
- Togglable plugins first
- Sorted by status, running first
- Sorted by name
Search¶
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:>=20dsh.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.6react ^18.2.0
Typical Usage¶
-
Install the plugin and restart
dsh web. -
Open:
Settings → Plugins → Plugin Switch
-
Enter a plugin name, module, ID, or description fragment in the search box to filter the target plugin.
-
Check the enabled tag and phase on the card to confirm the current status.
-
Click Start / Stop on non-Core plugins; non-Core plugins require a two-step confirmation.
-
Open “Usage Logs” to review recent actions.
-
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
dshprocess 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/setis restricted to same-origin only.- In client injection configuration,
exports.injectuses the service nameslots, 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