dsh-plugin-localhost: Register agent-launched local services into a list for inspection and termination.

Introduction

Running pnpm dev, python -m http.server, or opening static previews from dist/ within DSH is a daily routine for agents. These processes often outlive the conversation: hours later, the port is still active, but the directory and “who started it” are guesswork. The community plugin dsh-plugin-localhost (maintainer kjx-talesofai) turns “starting a service” into a single registration event. It provides a sidebar panel on the desktop client showing the port, directory, originating session, and a one-click stop button, preventing temporary localhost services from becoming unmanaged background processes.

What is this

dsh-plugin-localhost is a client-side plugin for DeepSeek Harness. It functions as a panel that answers: “What is currently running on this machine, in which directory, started by which session, and how do I stop it?” It does not replace processes you start casually via bash in the terminal—it only manages two types of resources that the plugin itself registers and has the authority to stop.

Type Who is running it Lifecycle
Static Page (static) A small server on 127.0.0.1 by the plugin Closes with DSH
Command (spawned) Started by the plugin via Harness subprocess service Can be stopped; all stop when DSH exits
Other Processes Started by agent via bash Not in the panel; unkillable processes are not shown as “Running”

The plugin is listed in the SkillHub Directory, with source code and documentation on GitHub. The license is MIT (© 2026 Jiaxin Kou). The current package version is 0.4.0.

Core Features

The serve Tool for Agents

Instead of a pile of shells, the agent side uses a single tool supporting actions like register, list, start, stop, remove, and logs. Upon registration, the plugin assigns a port within the 8840–8899 range (agents do not choose their own). The response includes the port and url, facilitating answers to “Which services have been opened for this workspace?”.

logs returns recent output for easier troubleshooting; remove deletes the registration and stops the process, eliminating the need to manually edit registries.

The panel is located in the sidebar, directly below Tailscale Remote Access. Each row displays a status dot, name, type, port, and status. Expanding a row reveals the directory (openable in Finder on macOS), the entry file for the static page, the Originating Session (jumping back to the conversation where the service was started), and recent logs (up to ~400 lines, which update live if running).

Row actions include open, start, stop, auto-start, and collapse. At the bottom of the expanded view, there is a “Remove” button (requires double confirmation; the process is stopped before deletion).

Registry and Persistence

The single source of truth is the file ~/.dsh/localhost/services.json; the memory state is merely a mirror. If you manually delete a row, it disappears from the panel on the next read and will not be written back by the save logic (In v0.3.0 and earlier, memory took precedence, so deleted rows might “resurrect,” requiring a restart). You can set "autoStart": true during registration or click “Auto-Start” in the panel. After DSH exits, entries are marked as stopped; by default, they will not auto-start, only those marked for auto-start will be attempted on the next launch.

Integration with Tailscale

The panel reads tailscale serve status and appends remote addresses to ports that have been published to the tailnet. Clicking “Open” on a mobile phone will access that address in the phone’s browser. Ports that are not published do not offer an “Open” option on mobile, with a note indicating they are only accessible locally. For external sharing, use Tailscale; do not treat unauthenticated ports on 127.0.0.1 as sharing endpoints.

Installation and Enablement

The installation command follows the README:

github:kjx-talesofai/dsh-plugin-localhost#v0.4.0

After installation, restart the DSH Desktop (the host side only loads at startup).

package.json requires Node >=22 and peer dependency @deepseek-ai/dsh in the range >=0.2.0-rc.1 <0.3.0-0. The README specifies the tested environment as macOS (Apple Silicon) + DSH Desktop 0.2.1-rc.2. The plugin runs with the permissions of the current DSH process; please review the source code and MIT license before installing.

Typical Usage

The following examples come from the README, demonstrating how to register command-based services and static directories via register.

Register a dev server (use $PORT in the command to accept the port assigned by the plugin):

{ "action": "register", "kind": "spawned", "name": "preview",
  "dir": "/path/to/project", "cmd": "pnpm dev --port $PORT",
  "path": "/" }

Register a static page directory (content hosted directly by the plugin; changing dir takes effect immediately, deleting the directory results in 404):

{ "action": "register", "kind": "static", "name": "deck",
  "dir": "/path/to/dist" }

If you want it to attempt to launch automatically after the next DSH start, add "autoStart": true to the registration parameters, or enable auto-start later in the panel.

Applicable Scenarios and Notes

Who is it for: Developers who frequently have agents start previews, static sites, or dev servers within DSH, and want traceability for ports, directories, and sessions, along with one-click shut down.

Boundaries (README “Honestly” section):

  1. Only registers processes started by the plugin itself; services started via bash are invisible to the panel and will not be mistakenly reported as manageable.
  2. DSH exit equals stopping everything; manual start is required after a restart unless auto-start is configured.
  3. Auto-start failures will not crash DSH (e.g., port occupied, directory not found); they are simply displayed in the corresponding row.
  4. Ports are assigned by the plugin; do not hardcode 8840 in other scripts. If fixed logic is required, use $PORT in cmd.
  5. Static pages only listen on 127.0.0.1 and have no authentication; SPA fallback only applies to browser navigation (Accept: text/html) to avoid mistaking missing files for routes.

The community plugin directory (SkillHub) is not officially affiliated with DeepSeek or High-Flyer; the DSH ecosystem philosophy is “Everything is a plugin,” and this article introduces one such community-maintained client plugin.

Conclusion

dsh-plugin-localhost consolidates services started by agents on localhost—previously a matter of “guessing ports, finding directories, and being unable to stop them”—into an actionable registry and sidebar panel. Install using the official pinned version command, register via serve in the agent, and open, view logs, return to session, or stop via the panel.

  • Directory Page: https://www.skillhub.cn/plugins/kjx-talesofai/dsh-plugin-localhost
  • GitHub: https://github.com/kjx-talesofai/dsh-plugin-localhost
羽毛球分组比赛记分
小程序二维码

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

Xiaoye