@muou000/dsh-wsl 0.0.0-stage → 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/.github/workflows/publish.yml +26 -0
- package/LICENSE +21 -0
- package/README.md +15 -2
- package/client/wsl.js +691 -0
- package/client.js +692 -0
- package/cordis.patch.yml +8 -0
- package/icon.svg +7 -0
- package/index.mjs +2 -0
- package/lib/binding.js +8 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +13 -4
- package/vendor/wsl/LICENSE +21 -0
- package/vendor/wsl/UPSTREAM.md +16 -0
- package/vendor/wsl/icon.svg +7 -0
- package/vendor/wsl/index.mjs +691 -0
- package/vendor/wsl/locale +6 -0
package/cordis.patch.yml
ADDED
package/icon.svg
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64">
|
|
2
|
+
<path d="M6 16a5 5 0 0 1 5-5h14l6 6h22a5 5 0 0 1 5 5v26a5 5 0 0 1-5 5H11a5 5 0 0 1-5-5z" fill="#3b82c4"/>
|
|
3
|
+
<path d="M6 24h52v24a5 5 0 0 1-5 5H11a5 5 0 0 1-5-5z" fill="#4f9be0"/>
|
|
4
|
+
<path d="M17 31l7 6-7 6" fill="none" stroke="#ffffff" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
+
<path d="M28 44h13" fill="none" stroke="#ffffff" stroke-width="3.5" stroke-linecap="round"/>
|
|
6
|
+
<circle cx="50" cy="36" r="4" fill="#f5a623"/>
|
|
7
|
+
</svg>
|
package/index.mjs
ADDED
package/lib/binding.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { homedir } from 'node:os'
|
|
2
|
+
import path from 'node:path'
|
|
3
|
+
|
|
4
|
+
export function dataDirectory() {
|
|
5
|
+
const dir = process.env.DSH_SSH_DATA_DIR ?? path.join(homedir(), '.dsh-ssh')
|
|
6
|
+
if (!path.isAbsolute(dir)) throw new Error('DSH_SSH_DATA_DIR must be an absolute path')
|
|
7
|
+
return path.resolve(dir)
|
|
8
|
+
}
|
package/locale/en.json
ADDED
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@muou000/dsh-wsl",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "WSL workspace picker and Windows filesystem integrations for DeepSeek Harness.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": { "type": "git", "url": "https://github.com/muou000/dsh-wsl.git" },
|
|
8
|
+
"publishConfig": { "access": "public", "registry": "https://registry.npmjs.org" },
|
|
9
|
+
"exports": { ".": "./index.mjs", "./client": "./client.js", "./package.json": "./package.json", "./icon": "./icon.svg", "./locale/*.json": "./locale/*.json" },
|
|
10
|
+
"files": ["index.mjs", "client.js", "client/wsl.js", "vendor/wsl", "lib", "icon.svg", "locale", "README.md", "LICENSE", ".github", "cordis.patch.yml"],
|
|
11
|
+
"scripts": { "check": "node --check client.js && node --check client/wsl.js && node --check vendor/wsl/index.mjs", "build:client": "node scripts/build-client.mjs" },
|
|
12
|
+
"engines": { "node": ">=22", "dsh": ">=0.2.2-rc.5 <0.3.0" },
|
|
13
|
+
"dsh": { "bundle": { "patch": "./cordis.patch.yml" }, "client": { "platform": "web", "inject": ["@muou000/dsh-workspace-chooser"] } },
|
|
14
|
+
"dependencies": { "@muou000/dsh-workspace-chooser": "^0.1.0" }
|
|
15
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 lvyuxin
|
|
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.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# WSL integration
|
|
2
|
+
|
|
3
|
+
This directory includes the Host, picker, icon and English and Chinese metadata from `dsh-wsl-folder` 1.1.1 by LyuYuxin. The pinned commit is `ada27a1921a17646197c408c8564d00e1c4e4276`. The MIT copyright and permission notice for these files and the adapted upstream tests is included here. [Pinned upstream source](https://github.com/LyuYuxin/dsh-wsl-folder/tree/ada27a1921a17646197c408c8564d00e1c4e4276) · [License](./LICENSE)
|
|
4
|
+
|
|
5
|
+
## Changes for DSH 0.2.2-rc.5
|
|
6
|
+
|
|
7
|
+
- The root `dsh-ssh` package publishes the client factory. The `dsh-ssh/wsl` Host entry provides the Windows integration. The picker waits for an affirmative Host capability response before registering the sidebar, hero and reusable workspace-directory flows. Its Windows action uses the configured native or browse picker backend. Opening the WSL browser lets the user select a distribution, navigate Linux paths, see hidden directories, and select a mounted Windows drive.
|
|
8
|
+
- The `api/dsh-ssh/wsl` endpoints run on DSH Connection's authenticated, owner-only exact Fetch routes. An additional HTTP check limits requests to socket loopback by default. The row's `remote: true` permits authenticated owners over the network. The capability probe performs no WSL operation. WSL directory access begins when the user opens the WSL browser or selects a recent WSL location.
|
|
9
|
+
- The WSL origin of a selected Windows drive folder is stored in `wsl-folders.json` under `DSH_SSH_DATA_DIR` (by default `~/.dsh-ssh`). The latest selection for a folder provides its distro for future user terminals. Its descendants inherit that selection. Custom `[automount] root` is supported. Disabling automount in the distro's configuration keeps those paths in the distro.
|
|
10
|
+
- `terminal: true` adapts the current DSH `TerminalController.userLaunch` result. Windows supplies the PTY working directory. The `wsl.exe -d <distro> --cd <Linux path>` argument vector places the user shell in the selected directory. Agent terminals keep the execution profile and sandbox policy chosen by DSH.
|
|
11
|
+
- `write: true` adapts the local provider's publication primitives for WSL share destinations in write, edit, patch and move operations. The sandbox subclass still checks each target. New-file publication uses exclusive copy, so another observer may briefly see partial contents. Existing files use rename. Regular Windows volumes retain native publication.
|
|
12
|
+
- `paths: true` repairs an incomplete WSL UNC spelling at the DSH local provider's `resolve` and `lstat` methods when the operation's working directory belongs to that distribution. Components that call Node's filesystem directly receive Node's standard behavior. Unloading the Host feature releases its registrations and method adaptations.
|
|
13
|
+
|
|
14
|
+
## Regression coverage
|
|
15
|
+
|
|
16
|
+
The package test suite uses temporary binding data and service contexts. On a Windows DSH installation it also loads the installed Connection, terminal controller and filesystem provider. Set `DSH_SSH_WSL_TEST_DISTRO` to an existing distro to run the optional real-WSL checks. That probe uses a unique Windows temporary directory for drive mapping and verifies that `/dev/shm` is a `tmpfs` before creating its temporary UNC test directory. The test removes both directories on completion. The terminal check exercises the actual user and agent launch paths. DSH's local Windows ConPTY provider runs `pwd` in the selected distribution with its redirected argv and no login profile.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64">
|
|
2
|
+
<path d="M6 16a5 5 0 0 1 5-5h14l6 6h22a5 5 0 0 1 5 5v26a5 5 0 0 1-5 5H11a5 5 0 0 1-5-5z" fill="#3b82c4"/>
|
|
3
|
+
<path d="M6 24h52v24a5 5 0 0 1-5 5H11a5 5 0 0 1-5-5z" fill="#4f9be0"/>
|
|
4
|
+
<path d="M17 31l7 6-7 6" fill="none" stroke="#ffffff" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
+
<path d="M28 44h13" fill="none" stroke="#ffffff" stroke-width="3.5" stroke-linecap="round"/>
|
|
6
|
+
<circle cx="50" cy="36" r="4" fill="#f5a623"/>
|
|
7
|
+
</svg>
|