rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:Big-Dao/dsh-plugin-wsl-env
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English · 中文
Turns a WSL 2 distro into the execution environment of a DeepSeek Harness desktop session: commands, files and the terminal all run inside the distro, while the harness stays on Windows. DeepSeek Harness ships in two forms — an npm CLI with a web UI, and a desktop app for macOS and Windows; this plugin serves one combination only, the desktop app on Windows with the project in a WSL 2 distro. No service installed in the distro, no port opened; confined commands run under the bubblewrap sandbox.
New here? Start with docs/QUICKSTART.md.
"When the agent keeps failing on a WSL project, make the desktop app work directly in the distro's environment — no moving, no service, no giving up the sandbox."
wsl.exe wrapping that loses environment and state. This plugin runs the scripts unchanged in a persistent distro session.PATH, nvm, cargo, pyenv and rc files all apply.~/.cache/dsh-wsl/agent/.bubblewrap by default; without bwrap the command fails, never runs unconfined.The full argument (why Linux rather than PowerShell, value and costs) is in docs/VALUE.md.
The desktop app has no dsh executable; the plugin installs through the in-app Plugins page. Three steps:
wsl.exe -d <distro> -u root -- apt-get install -y bubblewrapdsh-plugin-wsl-env, enable it./wsl-doctor (host-side) for a ready/blocked verdict.Remaining prerequisites (no Node.js needed inside the distro):
| Prerequisite | Notes |
|---|---|
| Windows 10/11 + WSL 2 + ≥1 distro | wsl.exe -l -v shows VERSION 2; otherwise wsl.exe --install |
| systemd + Linger (default session sandbox) | [boot] systemd=true in /etc/wsl.conf, wsl --shutdown, run loginctl enable-linger "$USER" once; without systemd set sessionSandbox to auto or false |
Optional: ripgrep, git, inotify-tools |
pnpm run bootstrap <distro> prints the install commands |
The plugin never edits the installed resources/app.asar. Upgrade = install again and restart; uninstall on the Plugins page, then ~/.cache/dsh-wsl can be deleted. Details in docs/QUICKSTART.md.
If the harness can run entirely inside the distro, skip this plugin: install the CLI in the distro (commands in QUICKSTART §0). Use this plugin when the harness must stay on Windows:
| Setup | What to use |
|---|---|
| a terminal or browser UI is enough | the CLI inside the distro |
| the Windows desktop app, commands and files in the distro | this plugin |
| one session reaching both Windows and WSL folders | this plugin |
One trap: the desktop profile name is owned by the Electron app, and the npm CLI refuses to manage its plugins — use the in-app Plugins page. Full comparison in docs/VALUE.md.
Open a distro folder as the workspace, e.g. \\wsl.localhost\ubuntu\home\you\project.
/home/you/x and \\wsl.localhost\ubuntu\home\you\x are the same file.read-only / workspace-write (default) / danger-full-access; only the last runs without the sandbox.| Desktop remote (VS Code, ZCode) | This plugin | |
|---|---|---|
| Inside the distro | a helper server | one cached agent binary |
| Network | a listening port | none |
| Command sandbox | none | bubblewrap |
| Removal | delete the server | delete the cache |
A desktop remote is more mature; a CLI inside WSL is simpler. This plugin is for: the harness stays on Windows and commands must be sandboxed.
Settings live on named rows in $DSH_HOME/profiles/<name>/cordis.patch.yml. wsl-shell/wsl-fs are nested inside preset-wsl; overriding them by id does not work — override the whole row. Every key and recipe is in docs/CONFIGURATION.md; cordis.patch.yml is the commented reference for the shipped values.
app level (per process)
├─ directory-picker-wsl, workspace-files, subprocess-wsl
├─ fs-routing: root filesystem routed by path
└─ auto-preset: binds the wsl preset when a session opens a distro folder
wsl preset (per session)
├─ wsl-shell: commands
└─ wsl-fs: file operations
Commands and file operations go through a resident agent in the distro (systemd user scope + bubblewrap profile). Distro UNC paths route to the distro; drive-letter paths stay on the host. See docs/ARCHITECTURE.md.
| Mode | What a command can do |
|---|---|
read-only |
read the whole distro; only a fresh /dev is mounted, nothing else writable |
workspace-write |
plus the session workspace and any configured writableRoots |
danger-full-access |
no sandbox |
Without bubblewrap, confined commands report SANDBOX_UNAVAILABLE and do not run. Enforcement is partial: a process inside the distro can still start Windows programs through /mnt/c. See docs/ARCHITECTURE.md and SECURITY.md.
| Symptom | Fix |
|---|---|
every command reports SANDBOX_UNAVAILABLE |
install bubblewrap in the distro, or set sandbox: false |
| the session refuses before the first command | run pnpm run doctor; enable systemd and linger, or set sessionSandbox to auto or false on wsl-shell and wsl-fs |
glob and grep are slow in the distro, or fail with exit 127 (no rg) |
run pnpm run bootstrap <distro> and use its printed install command to install ripgrep; a user-local install under ~/.local/bin is not on the PATH commands run with |
npm install / pnpm add fail with EROFS |
the sandbox grants only the workspace by default; configure writableRoots on wsl-shell and wsl-fs (e.g. ~/.npm, ~/.cache, ~/.local/share/pnpm); see CONFIGURATION |
| the Plugins page finishes without feedback | trust the profile's package.json and its dsh.profile.bundles entry: the plugin listed there is installed |
a profile patch for wsl-shell/wsl-fs changes nothing |
those rows are nested inside preset-wsl. Run pnpm run preset --check <patch>; it fails with the complete block to paste |
changes under lib/ have no effect |
run pnpm run sync:windows, then restart the app |
More error codes in docs/ARCHITECTURE.md; what the plugin does not do is in docs/LIMITATIONS.md.
pnpm install # development dependencies
pnpm run build # compile src/ into lib/ (lib/ is committed)
pnpm test # style, links, requirement citations, doc consistency, syntax, build consistency, types, unit tests
pnpm run test:coverage # unit tests with coverage thresholds
pnpm run sync:windows # update the Windows-side copy the app loads
Node ^22.19.0 || >=24.0.0; src/ is TypeScript, lib/ is the committed build output. Real-machine probes run on Windows + WSL only. See CONTRIBUTING.md and test/probe/.
| Document | Content |
|---|---|
| docs/QUICKSTART.md | first run, recipes, compatibility |
| docs/PERFORMANCE.md | ext4 agent vs 9p, measured latency, how to reproduce |
| docs/MIGRATION.md | upgrading from earlier versions, release gates |
| docs/COMPATIBILITY.md | the tested Windows/WSL/distro matrix and scope decisions |
| docs/API.md | the package's subpath exports at a glance |
| docs/CONFIGURATION.md | every configuration key and how to override it |
| docs/ARCHITECTURE.md | services, path routing, sandbox, error codes |
| docs/LIMITATIONS.md | what the plugin does not do |
| docs/ROADMAP.md | current plan and deferred work |
| docs/ROADMAP-1.0.md | the 1.0 and ecosystem plan |
| docs/VALUE.md | value and trade-offs |
| CONTRIBUTING.md | development loop, gates, probes |
| SECURITY.md | private vulnerability reporting |
| SUPPORT.md | supported versions and support channels |
| docs/RELEASING.md | release checklist |
MIT. See LICENSE.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek、deepseek-harness。