dsh-wsl-bridge
其他 活跃维护

dsh-wsl-bridge

ch1bug/dsh-wsl-bridge

为WSL代理提供Windows侧访问工具集合,内置文件浏览、读写、命令执行、路径解析、磁盘枚举等能力,无需额外配置即可在WSL环境中直接操作Windows侧资源。

1
Stars 标星
0
Forks 分支
1
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
13 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:ch1bug/dsh-wsl-bridge
git clone https://github.com/ch1bug/dsh-wsl-bridge.git
git clone git@github.com:ch1bug/dsh-wsl-bridge.git
README.md main

wsl-bridge

DSH (DeepSeek Harness) Cordis plugin that lets an agent running inside WSL
(Windows Subsystem for Linux) access and invoke Windows-side files and
programs
.

Built for agents that live in WSL but need the Windows host: read/write files
on C:\, run .exe programs, open things in Explorer, list drives, convert
paths.

Tools

Tool Purpose
win_ls List a Windows directory (accepts C:\... or /mnt/c/...)
win_read Read a Windows text file (utf8/gbk, line offset/limit)
win_write Write UTF-8 text to a Windows file (creates parent dirs)
win_run Run a Windows program (cmd / powershell / direct interop)
win_open Open a file/folder with the default Windows handler
win_path Convert between C:\... and /mnt/c/... (wslpath)
win_drives List mounted Windows drives

Optional (when codebase-memory-mcp is installed):
codebase_search, codebase_arch — knowledge-graph code search.

How it works

Everything runs through the host shell service (the same seam the built-in
bash tool uses) with the calling session's sandbox policy applied per call.
Path normalization handles both C:\Users\me and /mnt/c/Users/me forms.
win_run writes temp .bat/.ps1 files to C:\Windows\Temp and cleans up
after itself; PowerShell output is forced to UTF-8 console encoding.

Install (DSH bundle)

Standard DSH bundle — install with the official plugin command (auto-inits
the profile, pnpm-installs, and appends the bundle layer per
dsh.bundle.patch):

dsh plugin --profile web add /path/to/dsh-wsl-bridge
# or: dsh plugin --profile web add github:you/dsh-wsl-bridge
# Restart dsh web; the tools mount automatically.

Dependencies are declared as peerDependencies (ecosystem convention —
@deepseek-ai/dsh-tools is already loaded in the DSH process). Optional env
vars at apply time: CODEBASE_MEMORY_BIN for the codebase-memory tools
(default /usr/local/bin/codebase-memory-mcp; they error if absent).

Requirements

  • WSL with Windows interop enabled (cmd.exe, powershell.exe, wslpath,
    explorer.exe reachable — standard on WSL1/WSL2)
  • DSH host with the shell and sandboxPolicy services

License

MIT