Preface¶
When using WSL workspaces in DSH, a common issue is inconsistent tool behavior: shell, file read/write, and search tools still run in the Windows environment, while the actual code logic lives inside a Linux distribution. This causes path mismatches, line-ending inconsistencies, and the need to remember extra wsl.exe prefixes or wrapper commands when making cross-platform tool calls.
DSH’s plugin architecture allows behavior to be extended outside the host process. This plugin registers variants and provides a zero-dependency in-terminal agent that passes through the agent’s shell, file read/write, and search tools to run inside a WSL distribution, using the same tool names. Users don’t need to learn new commands, don’t need to prepend wsl before every call, and don’t need to manually adjust paths in prompts.
What It Is¶
This is a WSL passthrough plugin designed for DeepSeek Harness (DSH). The maintainer is l fys. It registers wsl-<id> variants for each configured preset, pointing the shell and filesystem backends to an agent running inside a WSL distribution. When a workspace path is a \\wsl.localhost\... UNC path, the plugin automatically selects the WSL variant for that session, so the agent’s bash, file read/write/edit, and search tools execute directly inside the distribution with the same tool names.
Core Features¶
- Preset variant registration: Registers a
wsl-<id>variant for each configured preset, isolatingshellandfsin its world group so that native Bash and file tools run inside the distribution. A single variant serves all installed distributions. - In-terminal agent: A zero-dependency
agent.mjsruns inside the distribution and communicates via a JSON Lines protocol overwsl.exe --exec. Writes use atomic operations (temp file + rename) and preserve file mode; edits keep CRLF bytes intact and diff only on LF; execution runs in a background process group with timeout termination. - Terminal & session defaults: Host terminal launches are wrapped so that the sidebar terminal for WSL workspaces is a real Linux pty (with
--cdtargeting the session directory); new sessions on WSL workspaces default to the WSL variant. - Zero private state: Workspaces are registered directly in the harness workspace registry as
\\wsl.localhostUNC paths, with no separate storage maintained.
Installation & Activation¶
The plugin requires the host environment to meet the following conditions:
- Windows 10/11 with WSL2 installed, and at least one installed distribution.
- Node.js installed inside the distribution, callable via the
nodecommand (no login shell required). nvm users must configurenodePathas an absolute path. - ripgrep installed inside the distribution, used by the
grepandglobtools.
Installation command (from the plugin repository):
dsh plugin add github:lfys/dsh-wsl-overlay
After installation, DSH loads the plugin and registers the WSL variants.
Typical Usage¶
- Place your project on the Linux filesystem inside the distribution (e.g.
/home/you/project), making sure the directory exists./mntcannot be used as a workspace root.
wsl -d Ubuntu-24.04 -- mkdir -p /home/you/project
- Register the workspace: click WSL Workspaces in the left sidebar (select a distribution, enter the Linux path, click Register), or let the agent use the plugin’s
WSLWorkspacetool, or register via the loopback API.
POST /dsh-wsl-overlay/api/createWorkspace {"path": "/home/you/project", "distro": "Ubuntu-24.04"}
- Switch the workspace selector to this workspace and start a session. After startup, the banner displays “The same agent, with its shell and file tools running inside WSL.” The sidebar panel shows live status: distribution, published variants, active agent channels.
Within a session, Windows drives are accessible as /mnt/<drive>.
Configuration¶
| Key | Default | Meaning |
|---|---|---|
defaultPreset |
wsl-standard |
Auto-preset for new sessions on WSL workspaces; empty string disables the auto default |
nodePath |
node |
Node executable used to launch the in-distribution agent; must be an absolute path for nvm setups |
bootTimeoutMs |
60000 |
Timeout for WSL cold start + first agent ping |
idleTtlMs |
600000 |
Agent channel idle lifetime; the next request will transparently reopen it |
Use Cases & Caveats¶
This plugin is suitable for teams that need to work directly on projects inside a WSL distribution via DSH and want shell and file tool behavior to be consistent with the distribution. Before use, confirm that the host meets the prerequisites and review the source code and license within the DSH process permission scope.
This plugin coexists with plugins that add explicit wsl* tools without conflicts: they use different tool names and mechanisms. In WSL variant sessions, the passthrough backend is the primary path; explicit wsl tools remain available, but their execution bypasses the harness file policy (a limitation documented in the docs).
Short Conclusion¶
This plugin uses variant registration and an in-terminal agent to pass through DSH’s shell and file tools to run inside a WSL distribution, keeping tool names consistent and eliminating the need for extra wrapper commands. It is ideal for scenarios where you need to work on WSL projects through DSH on Windows. See below for the catalog page and repository links.
- Catalog page: https://www.skillhub.cn/plugins/lfys/dsh-wsl-overlay
- GitHub: https://github.com/lfys/dsh-wsl-overlay