dsh-wsl-workspace 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/NOTICE +68 -0
- package/README.md +30 -0
- package/README.zh.md +30 -0
- package/cordis.patch.yml +7 -0
- package/lib/client.js +982 -0
- package/lib/client.js.map +1 -0
- package/lib/fs.js +175 -0
- package/lib/fs.js.map +1 -0
- package/lib/index.js +493 -0
- package/lib/index.js.map +1 -0
- package/lib/paths-DBaSmi7x.js +105 -0
- package/lib/paths-DBaSmi7x.js.map +1 -0
- package/lib/shell.js +382 -0
- package/lib/shell.js.map +1 -0
- package/lib/wsl-GjkUifnx.js +179 -0
- package/lib/wsl-GjkUifnx.js.map +1 -0
- package/package.json +57 -0
- package/src/client/AddWslWorkspace.tsx +346 -0
- package/src/client/api.ts +104 -0
- package/src/client/index.ts +193 -0
- package/src/client/locales.ts +68 -0
- package/src/client/styles.ts +282 -0
- package/src/fs.ts +228 -0
- package/src/host/variants.ts +199 -0
- package/src/index.ts +410 -0
- package/src/shared/paths.ts +159 -0
- package/src/shared/wsl-credentials.ts +85 -0
- package/src/shared/wsl.ts +105 -0
- package/src/shell.ts +441 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 dsh-wsl-workspace contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
This plugin is published under the MIT License (see [LICENSE](LICENSE)). It
|
|
4
|
+
adapts source code and references the design of the following projects. All
|
|
5
|
+
are permissive licenses (MIT / BSD-3-Clause) that permit modification and
|
|
6
|
+
redistribution with attribution. Where source code was adapted or inherited,
|
|
7
|
+
the original copyright and license notices are preserved in the adapted
|
|
8
|
+
sources.
|
|
9
|
+
|
|
10
|
+
## Adapted / inherited source code
|
|
11
|
+
|
|
12
|
+
### DeepSeek Harness (MIT) — https://github.com/deepseek-ai/deepseek-harness
|
|
13
|
+
|
|
14
|
+
Copyright (c) DeepSeek (Beijing) Intelligent Technology Co., Ltd.
|
|
15
|
+
|
|
16
|
+
This plugin is part of the DeepSeek Harness ecosystem and directly adapts or
|
|
17
|
+
inherits source code from the upstream repository:
|
|
18
|
+
|
|
19
|
+
- `@deepseek-ai/dsh-bash-local` (packages/shell/bash-local) — the executor
|
|
20
|
+
mechanics of `WslShellExecutor` (`src/shell.ts`) are adapted from this
|
|
21
|
+
package: the fused timeout/abort deadline, bounded collect output with
|
|
22
|
+
spill files, the background-process adaptation, and the `ENV_OVERRIDES`
|
|
23
|
+
model-friendly environment set. The WSL argv, WSLENV translation, and
|
|
24
|
+
workdir planning are original to this plugin.
|
|
25
|
+
- `@deepseek-ai/dsh-fs-local` (packages/fs/fs-local) — `WslFileSystem`
|
|
26
|
+
(`src/fs.ts`) subclasses `LocalFileSystem` unchanged for realpath target
|
|
27
|
+
identity, per-target write locks, atomic staging, and version guards, and
|
|
28
|
+
overrides the atomic-publication primitives (rename-based, since the WSL
|
|
29
|
+
9P share has no hard links) plus the path-world translation.
|
|
30
|
+
- `apps/cli/config/agent-presets/{standard,minimal,code,cordis}/agent.cordis.yml`
|
|
31
|
+
— the preset-variant generator (`src/host/variants.ts`) reads and
|
|
32
|
+
transforms these shipped compositions; the variant persona text is
|
|
33
|
+
rewritten from the `standard` persona.
|
|
34
|
+
|
|
35
|
+
The upstream license text is included in the repository at `LICENSE` (root)
|
|
36
|
+
and applies to the adapted portions above.
|
|
37
|
+
|
|
38
|
+
## Design references (no source code copied)
|
|
39
|
+
|
|
40
|
+
### dsh-bash-terminal (MIT) — https://github.com/MAXeaglet/dsh-bash-terminal
|
|
41
|
+
|
|
42
|
+
Copyright (c) MAXeaglet. The `wsl.exe` argument construction
|
|
43
|
+
(`wsl -d <distro> --cd <dir> -e bash -lc`), the WSLENV environment-passing
|
|
44
|
+
approach, and the documented ConPTY/wsl.exe interactive-terminal caveats
|
|
45
|
+
(0x8007072c) informed `src/shell.ts` and the design. No source files were
|
|
46
|
+
copied.
|
|
47
|
+
|
|
48
|
+
### dsh-side-panel (BSD-3-Clause) — https://github.com/ccq1/dsh-side-panel
|
|
49
|
+
|
|
50
|
+
Copyright (c) ccq1. The pattern of a third-party plugin serving its own data
|
|
51
|
+
route to the browser informed the `/wsl-workspace/api` route
|
|
52
|
+
(`src/index.ts`) and the dialog's stylesheet-injection approach
|
|
53
|
+
(`src/client/styles.ts`). The implementation is original to this plugin; no
|
|
54
|
+
source files were copied.
|
|
55
|
+
|
|
56
|
+
### vpshub (MIT) — https://github.com/Sdongmaker/vpshub
|
|
57
|
+
|
|
58
|
+
Copyright (c) Sdongmaker. The SSH-ledger model (connections as first-class
|
|
59
|
+
entries, credentials as path references) is the reference for the planned SSH
|
|
60
|
+
remote-workspace extension (roadmap M4). No source files were copied.
|
|
61
|
+
|
|
62
|
+
## Dependency licenses (runtime, resolved from the hosting harness)
|
|
63
|
+
|
|
64
|
+
At runtime this plugin imports `@deepseek-ai/cordis`, `@deepseek-ai/dsh-fs`,
|
|
65
|
+
`@deepseek-ai/dsh-fs-local`, `@deepseek-ai/dsh-shell`,
|
|
66
|
+
`@deepseek-ai/dsh-subprocess`, and `@deepseek-ai/dsh-timeout` as peer
|
|
67
|
+
dependencies provided by the DeepSeek Harness installation (MIT). No
|
|
68
|
+
third-party runtime dependency is bundled inside this package.
|
package/README.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# dsh-wsl-workspace
|
|
2
|
+
|
|
3
|
+
[中文](README.zh.md)
|
|
4
|
+
|
|
5
|
+
Add a WSL workspace from the DeepSeek Harness web GUI and run the whole agent session — bash commands and file reads/writes — inside a local WSL distribution with Linux paths. Nothing needs to be installed inside WSL.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
Pick one of the three ways below, then restart `dsh web`:
|
|
10
|
+
|
|
11
|
+
```powershell
|
|
12
|
+
# 1) npm package
|
|
13
|
+
dsh plugin --profile web add dsh-wsl-workspace
|
|
14
|
+
|
|
15
|
+
# 2) GitHub repository (ships the prebuilt lib/, no local build required)
|
|
16
|
+
dsh plugin --profile web add https://github.com/6Mikao9/dsh-wsl-workspace
|
|
17
|
+
|
|
18
|
+
# 3) Local directory (development / self-hosted)
|
|
19
|
+
dsh plugin --profile web add D:\path\to\dsh-wsl-workspace
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
After restarting `dsh web`, a W button appears beside Settings at the sidebar foot.
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
Click the W button beside Settings at the sidebar foot to open the "Add WSL workspace" dialog. Pick a distribution from the list, then browse the directory tree or type an absolute Linux path (for example `/home/me/proj`) — use the Check button to verify the path exists before creating the workspace. The username field is optional: leave it empty to run commands as the distribution's default user, or name a Linux user of that distribution to run the session as that user instead (equivalent to `wsl.exe -u <username>`). The username only changes the bash tool's run identity — the file tools go through the Windows-side WSL share and are unaffected. Each workspace's username is kept in `<dshHome>/wsl-workspaces.json`; delete the entry (or recreate the workspace from the dialog) to return to the default user.
|
|
27
|
+
|
|
28
|
+
Click "Create & open" to start a new session in the workspace. In the new session the bash tool executes commands inside the chosen distribution and `read`/`write`/`edit` operate on WSL files, so every path the model sees is a Linux path. The mode picker keeps working as usual: Standard, PTC, Minimal and Creative each land on their WSL variant automatically, and Windows files stay reachable from inside the session under `/mnt/<drive>` (for example `/mnt/c/Users/...`).
|
|
29
|
+
|
|
30
|
+
License: MIT.
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# dsh-wsl-workspace
|
|
2
|
+
|
|
3
|
+
[English](README.md)
|
|
4
|
+
|
|
5
|
+
在 DeepSeek Harness Web GUI 中「添加 WSL 工作区」:让 agent 会话的 bash 命令与文件读写都运行在本机 WSL 发行版里,路径均为 Linux 形式,WSL 内无需安装任何工具链。
|
|
6
|
+
|
|
7
|
+
## 安装
|
|
8
|
+
|
|
9
|
+
三种方式任选其一,然后重启 `dsh web`:
|
|
10
|
+
|
|
11
|
+
```powershell
|
|
12
|
+
# 1) npm 包
|
|
13
|
+
dsh plugin --profile web add dsh-wsl-workspace
|
|
14
|
+
|
|
15
|
+
# 2) GitHub 仓库(仓库内已含预构建 lib/,无需本地构建)
|
|
16
|
+
dsh plugin --profile web add https://github.com/6Mikao9/dsh-wsl-workspace
|
|
17
|
+
|
|
18
|
+
# 3) 本地目录(开发/自用)
|
|
19
|
+
dsh plugin --profile web add D:\path\to\dsh-wsl-workspace
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
重启 `dsh web` 后,侧栏底部 Settings 旁出现 W 按钮。
|
|
23
|
+
|
|
24
|
+
## 使用
|
|
25
|
+
|
|
26
|
+
点侧栏底部 Settings 旁的 W 按钮,打开「添加 WSL 工作区」对话框。先从下拉框选择一个发行版,再浏览目录树或直接输入 Linux 绝对路径(如 `/home/me/proj`),可以点「检查」确认路径存在。用户名是可选项:留空则以该发行版的默认用户运行,填写该发行版里的某个 Linux 用户名则以该用户运行(等价于 `wsl.exe -u <用户名>`)。用户名只影响 bash 命令的运行身份,文件工具通过 Windows 侧的 WSL 共享访问、不受其影响;每个工作区填写的用户名保存在 `<dshHome>/wsl-workspaces.json`,删除对应条目(或重开对话框重建工作区)即可恢复默认用户。
|
|
27
|
+
|
|
28
|
+
点「创建并打开」后,新会话随即运行在 WSL:`bash` 工具在所选发行版内执行命令,`read`/`write`/`edit` 读写 WSL 文件,模型看到的所有路径都是 Linux 形式。模式选择器照常可用——标准、PTC、极简、创造都会自动落到对应的 WSL 变体;会话内仍可通过 `/mnt/<drive>`(如 `/mnt/c/Users/...`)访问 Windows 文件。
|
|
29
|
+
|
|
30
|
+
许可:MIT。
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# dsh-wsl-workspace bundle patch: inserts the host row into the profile's plugin
|
|
2
|
+
# roster. The browser half rides the package's `dsh.client` manifest (the client
|
|
3
|
+
# registry serves lib/client.js), and the host row materializes the `wsl` agent
|
|
4
|
+
# preset on boot. Install with `dsh plugin --profile <name> add <path-or-git-url>`.
|
|
5
|
+
- insert:
|
|
6
|
+
- id: wsl-workspace
|
|
7
|
+
name: 'dsh-wsl-workspace'
|