Preface¶
When developing with DSH, a common annoyance is that local services are scattered everywhere: some hidden in installation directories, some are listening port processes, some are command wrapper scripts under npm or user bin directories, and some are casual batch files. To stop a service, you have to remember where it’s installed, what the startup script is called, and where the logs are written.
Below is an introduction to liuhuan007/dsh-service-hub. It registers local services, one-time scripts, and terminal tools into a list, and then provides operations like start, stop, restart, view logs, and refresh in the DSH sidebar, so you don’t have to remember where the launchers are.
It is a client-side categorized plugin maintained by liuhuan007, licensed under MIT. The package version can be found in package.json in the README.
What is this¶
One-sentence positioning: A DSH service panel plugin used to start, stop, and monitor services, scripts, and terminal tools you have registered on your local machine.
The core problem it solves is scattered entry points. The README states that this way you don’t need to remember where every launcher is placed. The plugin comes with a zero-dependency console daemon (console/, using only the Node standard library). Once installed, it is ready to use without needing to install other tools separately, and there are no machine-related hardcoded paths to download or configure.
Core Features¶
After activation, the Host starts the built-in console daemon on 127.0.0.1:3999; it stops when the plugin is uninstalled. Registered data and logs are stored in ~/.dsh-service-hub/, so the service list remains after upgrading or reinstalling the plugin.
The DSH sidebar gains a Service tab, listing each registered entry, displaying real-time status, health info, ports, and shortcut URLs, while providing start / stop / restart / logs / refresh buttons, and a LAN address viewable on mobile.
Since process control belongs to the daemon, started services will continue to run even if you close the panel.
Starting from version 0.3.0, the plugin comes with a built-in console, no third-party plugins needed.
Discovery and Registration¶
The panel supports scanning unregistered executables and listening ports. Scan suggests a type for each candidate: programs and shortcuts in installation directories are app, programs listening on ports are service, command wrappers in npm or user bin directories are terminal, and other batch files are script. The discovery dialog includes a type selector, so this guess can always be overridden. System directories (e.g., C:\Windows\...) are skipped.
Security Boundaries¶
The boundaries specified in the README are as follows, all design constraints that can be cross-referenced:
- The client bundle only makes
fetchrequests tohttp://127.0.0.1:3999(localhost). - The built-in daemon only binds to
127.0.0.1, no external interfaces. - The plugin itself does not do telemetry or make external network requests.
- The daemon only starts/stops commands you have registered; it does not run anything on its own. Each command is visible in the panel and stored in
~/.dsh-service-hub/data/registry.json.
Protection Details¶
The built-in console only listens on 127.0.0.1 and adds protection against accidental usage:
- It does not return CORS headers, so browser requests from other origins will fail the preflight phase; random websites cannot read
/api/stateor invoke modification interfaces. - Origin / Sec-Fetch / Host checks intercept cross-site requests initiated by scripts and return
403; top-level navigation and iframe navigation are still allowed, so the panel can be embedded in pages. - Entry IDs are limited to
[A-Za-z0-9._-]{1,64}; log paths are parsed entirely within the log directory, so/api/items/<id>/logscannot read other files. /healthzonly exposes{ ok, version, pid }and theX-LC-Daemonheader; the Host uses this to confirm it is connected to this plugin’s daemon, rather than some unrelated process that happens to be occupying port 3999.
These guarantees have corresponding regression tests; run npm test to verify.
Installation and Enablement¶
Official installation command, as per the official README:
dsh plugin --profile desktop add dsh-service-hub
Then restart DeepSeek Harness (or reload the window) and open the Service tab.
Before the official npm release, the command to install from source is:
dsh plugin --profile desktop add github:liuhuan007/dsh-service-hub
Prerequisites¶
| Requirement | Reason |
|---|---|
| DeepSeek Harness 0.2.1+ with Web/Desktop UI | The client bundle targets platform: web |
dsh-better-sidebar |
The panel registers sidebar tabs via this service’s mechanism |
| Node 18+ | To run the built-in console daemon (desktop apps have one built-in) |
| Windows | Process management uses PowerShell and tasklist/netstat |
The port 3999 must be free. If another console is already listening on that port, the plugin will reuse it instead of starting another.
Typical Usage¶
Follow the reproducible path in the README below.
- Install the plugin and reload the window.
dsh plugin --profile desktop add dsh-service-hub
-
Scan local candidates in the panel. The discovery dialog lists unregistered executables and listening ports, each with a suggested type that can be modified on the spot.
-
Add the needed services to the list. The command for each entry is visible in the panel and written to
~/.dsh-service-hub/data/registry.json. -
Manage processes via the start / stop / restart buttons in the panel, view logs, and refresh status.
-
To view regression tests and the release file list:
npm test
npm pack --dry-run
Note: Running with current dsh process privileges¶
The plugin runs with the privileges of the current dsh process, allowing it to start and stop commands you have registered. Before installing, you should check the source code and license to ensure the commands registered in registry.json meet your expectations, then start or stop them as needed.
Other known limitations from the official README:
- The panel opens from the session header (⚙ Service). Installing
dsh-better-sidebaradds another panel tab to the left sidebar; this step is optional. - Panel text is currently only in Chinese;
locale/contains both English and Chinese versions ofmeta.title/meta.descriptionfor use in the plugin manifest. - The console URL is fixed to
127.0.0.1:3999.
In terms of compatibility, the range given in the README is DSH >=0.2.1, UI: Web / Desktop (sidebar tab), no effect on TUI and headless profile, OS: Windows.
Summary¶
The value of this plugin lies in bringing local service entry points into the DSH sidebar, providing a unified view of status, health, ports, and logs, while using a built-in daemon bound only to localhost to handle process control. If your service list is currently scattered across installation directories, bin directories, and batch files, you can try the installation command above first, then register them gradually using Scan.
Plugin directory page: https://www.skillhub.cn/plugins/liuhuan007/dsh-service-hub
Source code: https://github.com/liuhuan007/dsh-service-hub