dsh-wsl
已验证 · 实测可装 WODE25500
功能简介
WSL (Windows Subsystem for Linux) 的 DeepSeek Harness 桥接插件 — 跑 Linux 命令、管理发行版、路径转换与跨系统复制
可用 — 实测通过,早期项目
WSL (Windows Subsystem for Linux) 的 DeepSeek Harness 桥接插件 — 跑 Linux 命令、管理发行版、路径转换与跨系统复制 实测能干净安装、正常启动。早期项目,但功能可用。
「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。
README
dsh-wsl
WSL (Windows Subsystem for Linux) 的 DeepSeek Harness (dsh) 桥接插件 —— 让 dsh 智能体在 WSL 里运行
Linux 命令、管理发行版、转换 Windows↔WSL 路径、跨系统复制文件。
独立社区项目,非官方。基于微软 WSL(MIT)。
特性
- 5 个原生 dsh 工具:
wsl_run/wsl_distro_list/wsl_status/wsl_path_convert/wsl_copy - 自动处理 WSL 的 UTF-16LE 输出编码(WSL 管道输出是 UTF-16,插件统一转 UTF-8——这是最容易踩的坑)
- 发行版指定(
distro参数)、默认发行版配置 wslpath封装(路径转换可靠,不用手写/mnt/c映射)- Schemastery 配置 + bundle patch 层
- 明确的错误处理(虚拟化未启用等 WSL 常见故障如实返回)
前置要求
- DeepSeek Harness(dsh)
- Windows 10 2004+ / Windows 11,WSL 已安装(
wsl --version) - WSL2 需启用"虚拟机平台"(
wsl --install --no-distribution可启用;未启用时命令会报错)
安装
作为 bundle 加入 profile
- insert:
- id: wsl
name: './src/index.js'
config:
wslPath: wsl
defaultDistro: Ubuntu
timeoutMs: 120000
本地 patch 临时加载
pnpm dsh web --patch ./dsh-wsl/cordis.patch.yml
然后问 agent:"用 wsl_status 查看 WSL 状态,wsl_run 跑 python3 --version"。
工具
| 工具 | 行为 |
|---|---|
wsl_run |
在 WSL 跑 Linux 命令(wsl -e sh -lc "<cmd>") |
wsl_distro_list |
列出发行版(状态/版本) |
wsl_status |
WSL 状态与警告 |
wsl_path_convert |
Windows ↔ WSL 路径转换(wslpath -u/-w/-r) |
wsl_copy |
跨系统复制(WSL 侧 cp + wslpath) |
配置项
| 键 | 默认 | 说明 |
|---|---|---|
wslPath |
wsl |
wsl.exe 路径 |
defaultDistro |
— | 默认发行版(多发行版时建议设置) |
timeoutMs |
120000 |
单次调用超时 |
已知限制
- 虚拟化未启用时 WSL2 无法启动,命令返回
HCS_E_SERVICE_NOT_AVAILABLE——这是环境问题,非插件 bug wsl_run是sh -lc语义:交互输入、TUI 程序不适用- WSL 输出编码混合(UTF-8 中文错误 + UTF-16 正文),插件做了双重解码兜底
目录结构
dsh-wsl/
src/index.js # 插件入口:5 个工具 + 编码处理 + 配置
skills/wsl/SKILL.md # agent 技能
docs/ # 文档
cordis.patch.yml # bundle patch 层
许可
MIT。
安装
装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:
dsh plugin add dshbase-catalog 然后对 agent 说「帮我装 dsh-wsl」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。
该插件是 GitHub 源码(未发 npm)——直接从仓库装:
Web profile:
dsh plugin --profile web add github:WODE25500/dsh-wsl Headless(CLI)profile:
dsh plugin --profile headless add github:WODE25500/dsh-wsl 实测报告
验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。