Foreword¶
On Windows, pointing the DeepSeek Harness (DSH) workspace to WSL often involves using UNC paths like \\wsl.localhost\<distro>\.... However, this path is often impassable for agents: 9p shares do not support the “temp file + rename” write pattern commonly used on the Windows side, and writing from UNC in a read-only sandbox fails stably. Additionally, before tagging a workspace, ACL handling is required, but 9p does not return security descriptors, causing Get-Acl to throw errors, and the host shell struggles to start normally in such a workspace. Furthermore, a single Windows process can only “represent” one distro, making cross-distro path parsing prone to errors.
Below is an introduction to the community plugin dsh-wsl-sidebar (maintainer WangJialong19, npm package name dsh-wsl-sidebar, current version 1.7.2, MIT license). It does not rely on UNC for agents to write directly to disk; instead, it executes native commands via wsl.exe within the specified Linux distro, accompanied by a settings page, new session directory selection, and six wslx-* tools, making “using WSL in DSH” a repeatable operational path.
What is it¶
One-sentence positioning: A WSL companion client plugin for DSH running on Windows — manage distributions and configurations in the Harness Web interface, open workspaces using Linux paths, and let tools complete read, write, modify, search, and command execution within the distro.
The plugin is categorized as “Client” in the SkillHub directory; the repository is available at GitHub, and the directory page at SkillHub. The DSH ecosystem emphasizes “everything is a plugin”; SkillHub is a community-independent site with no official affiliation to DeepSeek or Hyperion. Please read the source code and license before installing.
Design Rationale: Why Not UNC for File Writing¶
The design principles in the README are: agents never write files via \\wsl.localhost. Every read, write, modify, and search corresponds to a wsl.exe -d <distro> -e bash -lc <script>, with actual operations occurring on the Linux side, mirroring the behavior of normal bash commands.
Architecturally, it is split into Host and Client, interfacing via Harness’s Web server:
- Host (
index.js,lib/*.js): Registers routes for distro lists, directory browsing, management actions, configuration read/write, runtime state, logs, etc., under/__wsl_plugin__/, and registers sixwslx-*tools; requests from non-owner Web sessions are rejected. - Client (
client.js): Renders the Settings → WSL page and new session entry, using the page’s existing session to call the aforementioned routes.
The distro resolution order is: explicit distro (validated against wsl -l -q) → current workspace’s distro (parsed from UNC path) → environment variable DSH_WSL_DISTRO → wsl.exe default value; tool outputs indicate the actual distro used. Working directory mapping rules include: /home/... kept as-is, C:\... converted to /mnt/c/..., and UNC paths mapped to Linux forms.
Interface Capabilities¶
Settings Page (Settings → WSL)¶
Three tabs:
| Tab | Function |
|---|---|
| Distro | View status and WSL version, start, stop, set default, switch between WSL 1/2 |
| Config | Edit .wslconfig and /etc/wsl.conf (memory, CPU, swap, network, localhost forwarding, systemd, default user, etc.), with both form and raw view |
| Runtime | Per-distro memory, disk, load, uptime, listening ports, process count, and background task list |
Writes to disk only on save: .wslconfig uses temp files and atomic rename, /etc/wsl.conf is written via wsl.exe -u root; saving does not automatically restart WSL, and the page provides a restart entry, with wsl --shutdown requiring confirmation. Backup files with dates are retained for each write. When the deployment default permission is not danger-full-access, operations like stopping the distro, switching versions, exporting the disk, and global shutdown require page confirmation (acknowledge). Stopped distros are not implicitly started; users must explicitly start them before reading configuration or browsing directories.
New Session & Workspace¶
The new session page provides a WSL Directory entry: after selecting a distro and folder, it creates a \\wsl.localhost\<distro>\<path> workspace and switches to a draft session, behaving similarly to the built-in Windows directory picker. The picker supports creating new folders, editable path lines, and auto-completion based on the current list; it can directly submit deep paths not opened layer-by-layer in the tree or paths from other distros.
When the workspace is located in WSL, a WSL Terminal entry appears above the Composer: it opens an independent terminal in the corresponding distro and current working directory (prioritizing Windows Terminal). This window is unrelated to the Harness session lifecycle.
wslx-* Tools & Background Tasks¶
Six tools (names prefixed with wslx- to avoid conflicts with other bundles):
| Tool | Function |
|---|---|
wslx-run |
Execute bash commands in the distro, optional workdir, timeoutMs; after timeout, the command moves to the background rather than being killed |
wslx-read |
Read file with line numbers, max 2000 lines |
wslx-write |
Write entire file via Linux side stdin |
wslx-edit |
Precise text replacement, preserving file mode and owner |
wslx-search |
Prioritize rg regex search, otherwise grep -E, max 250 matches |
wslx-bg |
Cross-call process keep-alive: start (command or mode=shell interactive bash), output, input, kill, list |
Each tool supports asRoot: true, executing a single call as root in the distro via wsl.exe -u root. wslx-bg tasks persist as long as the Harness process exists, defaulting to a ~30-minute idle TTL, with a max of 1 MiB per output. No pseudo-terminal is used, so it is not suitable for full-screen TUIs like vim, top, but line-by-line interactive programs work. The Settings page Runtime tab can view and terminate background tasks.
Dangerous commands and root privilege escalation are constrained by DSH permissions and user confirmation (see “Permissions and Dangerous Commands” section in the repository).
Installation & Enablement¶
The plugin is native ESM, with no build steps required. The official documentation provides two ways; choose one:
Install from GitHub:
dsh plugin add github:WangJialong19/dsh-wsl-sidebar
Install from npm:
dsh plugin add dsh-wsl-sidebar
After installation, restart Harness (the client is bundled at startup, so refreshing the page is not enough). The plugin provides full capabilities only on Windows; on other platforms, the Host returns supported: false and displays an explanation.
Installation and runtime permissions match the current DSH process; the plugin calls wsl.exe and can modify .wslconfig and distro configurations. Please verify the repository’s MIT license and your own security strategy before use.
Typical Usage¶
Follow the README for quick start, in the following order:
- Open Settings → WSL → Distro, confirm the target distro is started, and set it as default if necessary.
- In the Config tab, fill in common
.wslconfig//etc/wsl.confitems, save, and restart the distro as instructed on the page. - In New Session, click WSL Directory, select a Linux folder, and the session will work on the
\\wsl.localhost\...workspace. - Ask the agent for tasks that need to be completed in the Linux environment (e.g., listing directories, running tests); the agent should execute them via
wslx-run,wslx-search, etc., within the workspace’s distro, rather than relying on UNC direct writes.
If the workspace is on a Windows path but you want to pin a specific distro, you can set the environment variable DSH_WSL_DISTRO.
Scenarios & Notes¶
Who is it for: Using DSH on Windows 11, with main projects inside a WSL 2 distro, wanting the agent to use the Linux toolchain (rg, git, python3, make, etc.) while avoiding UNC/9p write and ACL issues; and also wanting to manage distributions, .wslconfig, and runtime in a single interface.
Must know:
- Only supports Windows + WSL; WSL 1 distros have no UNC paths, so directory selection requires WSL 2.
- Tools run as the Linux user inside the distro (or root when
asRootis used), with no extra sandbox other than DSH’s built-in dangerous commands and approval mechanism. - Destructive operations like stopping the distro, unregistering the distro,
wsl --shutdown, etc., require explicit confirmation under default permissions to avoid accidental triggers. - The directory picker and config reading will not implicitly start a stopped distro.
For common issues (empty distro list, UNC paths not opening, no entry in settings page after installation, ACL errors, etc.) and their handling, see the “Troubleshooting” section in the repository README.
Conclusion¶
dsh-wsl-sidebar pulls WSL from “only usable as a UNC drive letter” back to “doing work with Linux commands inside the distro”: the settings page manages distributions and configurations, the new session entry opens a Linux workspace, and the six wslx-* tools handle read/write and execution. If you are running DSH on Windows and your main environment is WSL, you can install it using the commands above, restart Harness, and try it out from the settings page and new session entry.
- Directory page: https://www.skillhub.cn/plugins/WangJialong19/dsh-wsl-sidebar
- Source code and docs: https://github.com/WangJialong19/dsh-wsl-sidebar