DeepSeek Harness plugin

dsh-wsl-keepalive

WSL keep-alive toggle (static plugin): provides a dbus-daemon keep-alive toggle under WebUI Settings → General; the Host exposes status/set via /api/wsl-keepalive/* and the config is stored in

Jump to install

Source facts

Repository
TheColdWorld/dsh-wsl-keepalive
Latest update
Aug 17, 2026
Category
Tools & Capabilities
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/TheColdWorld/dsh-wsl-keepalive
Plugin: dsh-wsl-keepalive
Author: TheColdWorld

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.eng.mdSource · read only
README language

wsl-keepalive — WSL Keep-Alive Toggle Plugin

中文 | English

> [!IMPORTANT] > This is an unofficial third-party project. This project is not an official DeepSeek product, and is not developed, published, endorsed, or supported by DeepSeek, nor does it represent DeepSeek's position. DeepSeek, DeepSeek Harness, dsh and related names, logos, and trademarks belong to their respective owners. For keep-alive issues, please submit them to this repository; do not contact DeepSeek official support. > <br>This plugin is completely AI-generated and distributed under the MIT license.

Provides a Keep-Alive toggle in the DSH WebUI settings to prevent WSL distros from being automatically shut down by Windows when idle. When toggled, the DSH host starts/stops/queries the dbus-daemon via wsl.exe and shows the current dbus-daemon PID in the settings UI.

---

1. Features

CapabilityDescription
Keep-Alive toggleAdds a Keep-Alive row under Settings → Plugins; flip it to enable/disable WSL keep-alive
Status / PID displayThe subtitle shows Enabled · PID <dbus-daemon> or Disabled in real time, plus the distro name (e.g. Enabled · PID 498 · Arch)
Duplicate-start protectionRuns pgrep -x dbus-daemon before enabling; if already running, returns immediately without starting a duplicate
Precise stopOn disable, kills only the dbus-daemon PIDs recorded in memory / detected, without indiscriminately killing all dbus-daemon processes
Auto-detect wsl.exeWhen wsl-exec-path is not configured, auto-detects /mnt/c/Windows/System32/wsl.exe and writes it to the config if present
Config persistenceConfig is stored at ~/.dsh/wsl-keepalive.json (same directory as the dsh-ssh plugin), persists across restarts / sessions
Localized UIWebUI display text supports Chinese (zh) and English (en), defaulting/falling back to English; the dictionary is registered into the DSH locale service and follows DSH UI language switches in real time

2. Requirements (Prerequisites)

The machine running DSH Web must satisfy:

1. WSL Interop: This plugin works by launching dbus-daemon through wsl.exe to prevent the distro from going idle; it needs WSL Interop so that wsl.exe --exec can be called from within WSL. 2. wsl.exe accessible: /mnt/c/Windows/System32/wsl.exe, or set wsl-exec-path to its absolute path under the Linux environment. 3. dbus-launch: dbus-launch (/usr/bin/dbus-launch) must be installed inside the target distro. 4. DSH Web: The plugin must be installed via the Web profile (see "Installation").

5. Node.js: Required for the build toolchain (^22.19.0 || >=24.0.0).

> Note: Stopping keep-alive only kills the dbus-daemon PIDs recorded/detected by the plugin; it never indiscriminately terminates all dbus-daemon processes in the target.

3. Configuration ~/.dsh/wsl-keepalive.json

Read at plugin startup; missing fields or a missing file are treated as empty values, and the file is auto-created / written when needed.

{
  "wsl-dist-name": "",
  "wsl-exec-path": "/mnt/c/Windows/System32/wsl.exe"
}
FieldTypeMeaning
wsl-dist-namestringThe target distro name. When non-empty, the start command appends -d ${wsl-dist-name}; when empty, the default distro is used
wsl-exec-pathstringAbsolute path to wsl.exe on the Linux filesystem. When empty, /mnt/c/Windows/System32/wsl.exe is auto-detected at startup and written to the config if present; if neither exists it errors and enters an error state

4. Installation

Option A — Install via dsh plugin add

The content repository is at https://github.com/TheColdWorld/dsh-wsl-keepalive.git and can be installed directly from the repository URL:

# 1. Install directly from the repository URL
dsh plugin --profile web add "github:TheColdWorld/dsh-wsl-keepalive"
#    Or use an explicit git URL:
#    dsh plugin --profile web add "git+https://github.com/TheColdWorld/dsh-wsl-keepalive.git"

# 2. Restart DSH

Option B — Build locally

git clone https://github.com/TheColdWorld/dsh-wsl-keepalive.git
cd dsh-wsl-keepalive
pnpm install .          # install build deps
pnpm build              # produce lib/index.js and lib/client.js
dsh plugin --profile web add link:$(pwd)
# restart dsh after this

After the restart, the Keep-Alive toggle appears under Settings → Plugins in the WebUI.

Uninstall

dsh plugin --profile web remove wsl-keepalive
# restart dsh

The config file ~/.dsh/wsl-keepalive.json is retained; delete it manually if needed.

5. How It Works

  • Communication: The plugin Host exposes two JSON endpoints /api/wsl-keepalive/status and /api/wsl-keepalive/set via ctx.webServer.register; the browser half calls them with fetch.
  • Explicit service references: Host services (webServer/shell/fs) and browser services (slots/locale) are accessed as typed properties via the real @deepseek-ai/* contracts — the Context from @deepseek-ai/cordis plus the type augmentations from dsh-host-webserver/dsh-shell/dsh-fs/dsh-client-* — e.g. ctx.webServer, ctx.shell, ctx.fs, scope.slots, instead of the former implicit string-keyed ctx.get('...') list against local structural types (src/types.ts). Types are erased at build time; runtime dependencies come from the DSH @deepseek-ai/* packages.
  • PID tracking: dbus-daemon PIDs are recorded by the Host in memory after each query and live for the plugin's lifetime; the real state is re-queried after a restart.

6. Directory Structure

wsl-keepalive-static/
├── package.json            # dsh.bundle.patch + dsh.client declarations
├── tsconfig.json           # TypeScript build config
├── tsdown.config.ts        # tsdown build entry
├── cordis.patch.yml        # plugin row declaration (injected on `dsh plugin add`)
├── README.md               # this document (Chinese original)
├── README.eng.md           # this document (English translation)
├── shared/                 # common build helpers
└── src/
    ├── index.ts            # Host plugin entry: registers /api/wsl-keepalive/* routes (explicit webServer/shell/fs refs)
    ├── service.ts          # keep-alive core: config read/write, PID tracking, status/start/stop
    ├── routes.ts           # HTTP routes (status / set)
    └── client/
        ├── index.ts        # Client module: registers the plugin config tab under "Settings → Plugins"
        ├── KeepAliveToggle.tsx
        ├── i18n.ts           # localization dictionaries (en / zh), registered into the DSH locale service
        ├── keepalive.module.css
        └── css-modules.d.ts