Preface¶
The philosophy of DSH is “everything is a plugin.” When plugin management interfaces, agent sessions, or host plugins need to execute plugin changes, if installation, uninstallation, start/stop, rollback, and auditing are scattered across file modifications, command invocations, and status checks, the chain becomes hard to maintain. Below is an introduction to dsh-hotplug-engine: it wraps DSH’s plugin management operations into a service for consumers. Its positioning is the execution layer, not the market.
What is it¶
dsh-hotplug-engine is maintained by AnothetLoice, licensed under MIT, and requires Node >=22.0.0 for engines.
It provides DSH with capabilities for plugin installation, uninstallation, start/stop, rollback, and auditing, and can be called by the market / plugin management interface, agent sessions, and host plugins. Verified capabilities include:
- Installation, uninstallation, start/stop, rollback, auditing
- Modify
cordis.patch.ymlin the profile; takes effect immediately after the loader reflects it (mode:'hot'); prompts for restart if not reflected - Supports streaming / block-style YAML patch line start/stop
- Provides REST write interfaces
install/uninstall/enable/disable/rollback - Provides REST read interfaces
snapshot/status/audit/operations/events(SSE) - Provides tools
hotplug_status/hotplug_install/hotplug_uninstall/hotplug_toggle/hotplug_rollback/hotplug_audit - Supports DSH
0.1.1-rc.2, with asupportReport()version support matrix - Uses the official
dsh pluginCLI whendshPathis explicitly configured; otherwise, uses pnpm direct installation / fallback - DSH default disabled lines are immutable: UI shows a locked prompt, API returns
HOTPLUG.PATCH.DEFAULT_DISABLED - The client panel provides a minimal management panel for viewing, start/stop, rollback, and auditing
It explicitly does not:
- Not a market: no catalog, search, leaderboards, or recommendations;
specis provided by the caller, the engine does not guess - Does not modify official mechanisms: HMR, loader, and patch semantics are official; it only consumes and does not rewrite
- Does not store state separately: uses the official composite tree as the single source of truth; the engine only projects and diffs
- No installation interface: the UI only has a minimal management panel, no
specinput
Installation and Usage¶
First, confirm the environment meets Node >=22.0.0 and prepare the profile according to the target DSH version. Common installation commands:
pnpm --dir <profile-dir> add dsh-hotplug-engine
# or
dsh plugin add dsh-hotplug-engine
After installation or uninstallation, restart the profile; in bundle scenarios, the new client panel refreshes the page to load.
Regarding installation path: if dshPath is explicitly configured, the engine uses the official dsh plugin CLI; otherwise, it uses pnpm direct installation / fallback.
Regarding version support: the target is DSH 0.1.1-rc.2, with a supportReport() version support matrix; 0.1.0-rc.6 is legacy and is no longer an acceptance target.
Security Note: Plugins run with the current dsh process permissions; source code and licenses should be checked before installation.
Typical Use Cases¶
Host Plugin Injection¶
Host plugins can inject services:
inject: ['hotplugEngine']
Subsequently, call methods like install / rollback / enable on ctx.hotplugEngine. The Promise resolves when the operation is complete.
REST Interface¶
The REST prefix is /api/dsh-hotplug and is same-origin.
Write interfaces:
install
uninstall
enable
disable
rollback
Read interfaces:
snapshot
status
audit
operations
events(SSE)
Read interfaces are available for panels, agents, or host plugins to read status, audits, operation logs, and event streams.
Agent Tools¶
The following tools can be used in agent sessions:
hotplug_status
hotplug_install
hotplug_uninstall
hotplug_toggle
hotplug_rollback
hotplug_audit
Write tools go through approval.
DSH Default Disabled Lines¶
DSH default disabled lines are located at the bundle layer and have no patch lines that the engine can modify. When attempting to modify or start/stop such lines, the UI displays a locked prompt (text: “Default Disabled”), and the API returns HOTPLUG.PATCH.DEFAULT_DISABLED.
Applicability and Notes¶
Suitable for:
- Plugin management interfaces need unified calls for installation, start/stop, rollback, and auditing
- Agent sessions need to complete controlled plugin changes via tools
- Host plugins need to call
hotplugEngineonctx - Need to view status, audits, operation logs, and
events(SSE)
Less suitable for:
- Expecting it to provide market capabilities like catalogs, search, leaderboards, and recommendations
- Expecting it to modify official HMR, loader, and patch semantics
- Expecting it to provide a
specinput interface
Notes:
- Plugins run with the current
dshprocess permissions; source code and licenses should be checked before installation - REST is a same-origin interface; write operations change plugin status. Callers should be controlled according to their own permission strategies during integration
- The community directory is an independent site and has no official affiliation with DeepSeek / Hypersphere. Do not interpret it as an official app store
Links¶
GitHub: https://github.com/AnothetLoice/dsh-hotplug-engine
Directory page clue: https://www.skillhub.cn/plugins/AnothetLoice/dsh-hotplug-engine (This URL is not fully confirmed in verified materials; it is recommended to verify with the GitHub repository information)