dsh-wsl-workspace 0.4.2 → 0.4.3

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/README.md CHANGED
@@ -1,90 +1,100 @@
1
- # dsh-wsl-workspace
2
-
3
- [![dsh.so security](https://www.dsh.so/badge/dsh-wsl-workspace.svg)](https://www.dsh.so/artifact/dsh-wsl-workspace)
4
- [![dsh.so install](https://www.dsh.so/badge/install/dsh-wsl-workspace.svg)](https://www.dsh.so/artifact/dsh-wsl-workspace)
5
-
6
- [English](README.md) · [中文](README.zh.md) · [日本語](README.ja.md) · [한국어](README.ko.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Español](README.es.md) · [Português](README.pt.md) · [Русский](README.ru.md)
7
- ![alt text](image-3.png)
8
- 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. The session can reach both WSL and Windows at the same time: bash commands run inside the WSL distribution, while Windows files stay accessible via `/mnt/<drive>` (for example `/mnt/c/Users/...`).
9
-
10
- ## Install
11
-
12
- Pick one of the three ways below, then restart `dsh web`:
13
-
14
- ```powershell
15
- # 1) npm package
16
- dsh plugin --profile web add dsh-wsl-workspace
17
-
18
- # 2) GitHub repository (ships the prebuilt lib/, no local build required)
19
- dsh plugin --profile web add https://github.com/6Mikao9/dsh-wsl-workspace
20
-
21
- # 3) Local directory (development / self-hosted)
22
- dsh plugin --profile web add D:\path\to\dsh-wsl-workspace
23
- ```
24
-
25
- After restarting `dsh web`, a W button appears beside Settings at the sidebar foot.
26
-
27
- ## Usage
28
-
29
- 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 dialog follows the DeepSeek Harness UI language. 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.
30
-
31
- 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 (the WSL variant entries in the picker are bilingual, e.g. `WSL · Standard mode(标准模式)`), and Windows files stay reachable from inside the session under `/mnt/<drive>` (for example `/mnt/c/Users/...`).
32
- ![alt text](image-2.png)
33
- ## Behavior notes
34
-
35
- - **bash tool**: runs inside the WSL distribution as the configured username (empty = the distro default user, often `root`), so it can read and write anywhere in the distro. The Windows ACL sandbox cannot wrap `wsl.exe` — its children run on the Linux kernel side — so WSL itself is the isolation boundary and the DSH file policy does not apply to bash.
36
- - **File tools (`read`/`write`/`edit`)**: go through the Windows-side WSL 9P share and run under the DSH file policy. Under `workspace-write`, reads work anywhere but writes are restricted to the session workspace; switch the file policy to `danger-full-access` to also allow writes outside it. The username field does not affect the file tools.
37
- - **Skill catalog**: the session's skill catalog is discovered starting at the session cwd's nearest `.git` ancestor (falling back to the cwd itself), then scanning downward for `.dsh/skills` / `.agents/skills` — including nested projects — bounded to 4 directory levels, 64 skill directories and 4096 visited directories. Register the workspace at the project root you work in; if the registered workspace itself sits inside a larger git repository, the scan starts at that repository's root (matching the host's own rule) and sibling projects may surface. Results are cached for 10 seconds per scan root, so freshly added skills appear within that window; skill bodies always load live. One substrate limit to know: the Windows-side `\\wsl.localhost` share cannot resolve Linux symlinks (they read back as unresolvable entries), so a project linked into the workspace via `ln -s` is not discoverable — the scan walks past it without failing; register the workspace at a level that contains the real project directories instead.
38
- - The garbled `localhost` port-forwarding banner `wsl.exe` prints to stderr when the distro was not running yet is harmless.
39
-
40
- ## Changelog
41
-
42
- ### 0.4.2 — 2026-09-10
43
-
44
- - **Create & open in a `0.1.2-rc.1` workspace**: the session starter is now resolved when the dialog writes, not when the plugin applies. This plugin applies *before* the UI domain that publishes `uiWorkspace` registers its service, so the lookup cached at apply time stayed `undefined` for the whole page life: `Create & open` created the workspace and then silently opened no session, leaving `sessionIds` empty while the dialog reported success. A release exposing neither `uiWorkspace.startSession` nor `workspaces.startSession` now fails *before* anything is written, instead of leaving an orphaned workspace behind.
45
- - **Skill body integrity**: skill bodies no longer lose their first character. `findFrontmatterEnd` already returns the index of the body's first character (the closing delimiter's newline plus one), so the slice must start there; the previous offset dropped that character and made the one after the delimiter look like the body. The existing fixtures always put a blank line after the delimiter, which is exactly what hid it.
46
- - **UTF-8 BOM skills are no longer dropped**: a `SKILL.md` saved with a leading BOM (Notepad, VS Code's "UTF-8 with BOM", PowerShell redirection) did not match the opening `---` and disappeared from the catalog entirely. The parser strips the BOM before the fence check, as the 0.4.2 line did.- **Binding converges on late inputs**: the agent-preset roster and the registered `/mnt/<drive>` workspace set are both inputs to binding, and both land asynchronously after the plugin's first pass. Each now re-runs the pass when it arrives instead of waiting for a session-store event that may never come.
47
- - **Compatibility manifest corrected**: `0.1.3-alpha.1` is not published (`npm view @deepseek-ai/dsh@0.1.3-alpha.1` is a 404), so the declaration could never be verified; it is replaced by the published `0.1.3-alpha.2`.
48
- - **Closed-loop tests**: `tests/client-lifecycle.test.mjs` drives the browser half through the shipped `lib/client.js` for both service shapes — legacy (`connection.api.agentPresets` + `workspaces.startSession`) and current (`remote.agentPresets` + `uiWorkspace`) — and asserts `Create & open` for the normal, late-registration and no-starter cases. The skill tests now cover a body that starts on the delimiter's next line, for LF and CRLF files.
49
-
50
-
51
- - **DSH v0.1.2-rc.1 compatibility**: Added backward compatibility support for DSH v0.1.2-rc.1 and later versions through feature detection and compatibility wrappers. The plugin now automatically detects the DSH version at runtime and uses the appropriate API:
52
- - `uiWorkspace.startSession()` for v0.1.2-rc.1+
53
- - `workspaces.startSession()` for v0.1.1-rc.2 and earlier
54
- - `summary.projectionValues?.agentPreset` for v0.1.2-rc.1+
55
- - `summary.agentPreset` for v0.1.1-rc.2 and earlier
56
- - Projection-based auto-sync for v0.1.2-rc.1+
57
- - `sessions.noteAgentPreset()` for v0.1.1-rc.2 and earlier
58
- - **Updated compatibility manifest**: Added v0.1.2-rc.1 to the `dsh.compatibility.dshReleases` declaration.
59
- - **Fixed `without inject` crash on v0.1.2-rc.1+**: the agent-preset roster is read through the `remote.agentPresets` namespace service via `ctx.get('remote.agentPresets')` (topology-free store lookup) instead of the `remote` aggregate's `agentPresets` property, which Cordis' associate proxy rejects when the dotted property is not declared in `inject`. `inject` stays limited to the services both DSH generations share (`slots`, `locale`, `sessions`, `workspaces`).
60
- - **Compatibility manifest**: declared v0.1.3-alpha.1 compatible (its plugin-facing API surface matches v0.1.2-rc.1). Final adaptation notes consolidated in `docs/COMPATIBILITY_SUMMARY.md` (supersedes the root-level draft plans).
61
-
62
- ### 0.4.0 — 2026-08-29
63
-
64
- Follow-ups from the [#12](https://github.com/6Mikao9/dsh-wsl-workspace/issues/12) limitation list and the [#13](https://github.com/6Mikao9/dsh-wsl-workspace/issues/13) compatibility work:
65
-
66
- - **Lookup cache**: completed skill-catalog lookups are cached per scan root for 10 seconds, so repeated catalog builds no longer rescan the workspace over the slow 9P share; `get()` keeps reading skill bodies live, and freshly added skills appear within the TTL window.
67
- - **Symlinked projects — investigated, substrate-limited**: the discovery walk now recognizes directory symlinks explicitly and prunes them safely (no crashes, no loops). Following them is not possible over the `\\wsl.localhost` 9P share — the Windows side cannot resolve Linux symlink targets (probed: `readlink` → `EISDIR`, `stat`/`readdir` → `ENOENT`) — so a project linked into the workspace via `ln -s` stays undiscoverable; a name+body fingerprint dedupe also guarantees aliased skill files can never publish twice on substrates that do resolve links.
68
- - **Block-scalar frontmatter**: `description:` / `whenToUse:` written as YAML block scalars (`|` literal, `>` folded) now parse — such skills were silently dropped before.
69
- - **Compatibility manifest**: `dsh.compatibility.dshReleases` declares per-release compatibility with the official DSH versions, backed by reproducible disposable-Profile install/start/uninstall evidence (`scripts/verify-dsh-compat.sh`), and `engines` declares the Node.js floor.
70
- - **Guard scripts**: `scripts/check-rank-parity.mjs` fails the release when the copied project-rank constants drift from the host's `dsh-skill-filesystem`.
71
-
72
- ### 0.3.2 — 2026-08-29
73
-
74
- - **WSL workspace sessions now inject nested-project skill catalogs** ([#10](https://github.com/6Mikao9/dsh-wsl-workspace/issues/10)): `.dsh/skills` and `.agents/skills` directories of projects nested below the registered workspace root are discovered and published with the host's project ranks and sources, so the model sees the same skill catalog it would see when the session cwd is the project folder itself. Discovery is depth- and budget-bounded, prunes `node_modules`/dot-directories, and leaves non-WSL sessions untouched.
75
- - **Host-parity scan root**: lookups from inside a project subtree resolve the nearest `.git` ancestor first, so the enclosing project's skills stay visible from deeper cwds; skills above that ancestor do not leak.
76
- - **Hardening**: the skill-root budget is enforced per push, and the `skills.registerProvider` call is guarded so a host whose `skills` service has a different shape can no longer break plugin load.
77
- - **Housekeeping**: removed stale prebuilt `lib/` chunks that shipped dead vendor code (including an inlined schemastery copy that triggered dsh.so's `new Function` static rule); added `scripts/repro-setup.sh` plus a nested skill-catalog regression suite, and a matching TESTING.md section.
78
-
79
- ## License & attribution
80
-
81
- MIT — see [LICENSE](LICENSE) and [NOTICE](NOTICE). The NOTICE precisely lists:
82
-
83
- - **Adapted/inherited source code**: DeepSeek Harness (MIT) — `dsh-bash-local` (executor mechanics), `dsh-fs-local` (`WslFileSystem` subclasses it), and the shipped agent presets (read and transformed by the variant generator);
84
- - **Design references (no source copied)**: [dsh-bash-terminal](https://github.com/MAXeaglet/dsh-bash-terminal) (MIT, wsl argv / WSLENV approach), [dsh-side-panel](https://github.com/ccq1/dsh-side-panel) (BSD-3-Clause, host-route pattern), [vpshub](https://github.com/Sdongmaker/vpshub) (MIT, roadmap reference).
85
-
86
- Keep `LICENSE` and `NOTICE` when redistributing.
87
-
88
- ## Acknowledgments
89
-
90
- Special thanks to [dsh-deep-whale](https://github.com/Small-tailqwq/dsh-deep-whale) (DSH Web 鲸鱼娘 skin series · 深海女仆工坊 maid-atelier, CC BY-NC-SA 4.0): the whale girl skin plugin brings a full set of adorable skins to the DeepSeek Harness Web UI and makes daily use of DSH a warmer experience.
1
+ # dsh-wsl-workspace
2
+
3
+ [![dsh.so security](https://www.dsh.so/badge/dsh-wsl-workspace.svg)](https://www.dsh.so/artifact/dsh-wsl-workspace)
4
+ [![dsh.so install](https://www.dsh.so/badge/install/dsh-wsl-workspace.svg)](https://www.dsh.so/artifact/dsh-wsl-workspace)
5
+
6
+ [English](README.md) · [中文](README.zh.md) · [日本語](README.ja.md) · [한국어](README.ko.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Español](README.es.md) · [Português](README.pt.md) · [Русский](README.ru.md)
7
+ ![alt text](image-3.png)
8
+ 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. The session can reach both WSL and Windows at the same time: bash commands run inside the WSL distribution, while Windows files stay accessible via `/mnt/<drive>` (for example `/mnt/c/Users/...`).
9
+
10
+ ## Install
11
+
12
+ Pick one of the three ways below, then restart `dsh web`:
13
+
14
+ ```powershell
15
+ # 1) npm package
16
+ dsh plugin --profile web add dsh-wsl-workspace
17
+
18
+ # 2) GitHub repository (ships the prebuilt lib/, no local build required)
19
+ dsh plugin --profile web add https://github.com/6Mikao9/dsh-wsl-workspace
20
+
21
+ # 3) Local directory (development / self-hosted)
22
+ dsh plugin --profile web add D:\path\to\dsh-wsl-workspace
23
+ ```
24
+
25
+ After restarting `dsh web`, a W button appears beside Settings at the sidebar foot.
26
+
27
+ ## Usage
28
+
29
+ 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 dialog follows the DeepSeek Harness UI language. 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.
30
+
31
+ 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 (the WSL variant entries in the picker are bilingual, e.g. `WSL · Standard mode(标准模式)`), and Windows files stay reachable from inside the session under `/mnt/<drive>` (for example `/mnt/c/Users/...`). The dialog's "?" button opens a panel with the DSH releases this build declares, how the plugin is used, and the limitations it cannot fix.
32
+ ![alt text](image-2.png)
33
+ ## Behavior notes
34
+
35
+ - **bash tool**: runs inside the WSL distribution as the configured username (empty = the distro default user, often `root`), so it can read and write anywhere in the distro. The Windows ACL sandbox cannot wrap `wsl.exe` — its children run on the Linux kernel side — so WSL itself is the isolation boundary and the DSH file policy does not apply to bash.
36
+ - **File tools (`read`/`write`/`edit`)**: go through the Windows-side WSL 9P share and run under the DSH file policy. Under `workspace-write`, reads work anywhere but writes are restricted to the session workspace; switch the file policy to `danger-full-access` to also allow writes outside it. The username field does not affect the file tools.
37
+ - **Skill catalog**: the session's skill catalog is discovered starting at the session cwd's nearest `.git` ancestor (falling back to the cwd itself), then scanning downward for `.dsh/skills` / `.agents/skills` — including nested projects — bounded to 4 directory levels, 64 skill directories and 4096 visited directories. Register the workspace at the project root you work in; if the registered workspace itself sits inside a larger git repository, the scan starts at that repository's root (matching the host's own rule) and sibling projects may surface. Results are cached for 10 seconds per scan root, so freshly added skills appear within that window; skill bodies always load live. One substrate limit to know: the Windows-side `\\wsl.localhost` share cannot resolve Linux symlinks (they read back as unresolvable entries), so a project linked into the workspace via `ln -s` is not discoverable — the scan walks past it without failing; register the workspace at a level that contains the real project directories instead. **Fixed in 0.4.3:** a UNC workspace used to deliver *no* catalog at all. The host skill provider watches the workspace with `fs.watch`, which fails with `EISDIR` on `\\wsl.localhost\...`; that observation is then reported incomplete and `dsh-tool-skill` withholds the whole catalog message while a snapshot is incomplete. The generated preset therefore pins `watch: false` on the `skill-filesystem` row, so the catalog is scanned once at session start and injected as usual. The only trade-off is live refresh: a skill added while a session is running shows up in the next session, not in the running one (skill bodies are still read live by `get`).
38
+ - The garbled `localhost` port-forwarding banner `wsl.exe` prints to stderr when the distro was not running yet is harmless.
39
+
40
+ ## Changelog
41
+
42
+ ### 0.4.3 — 2026-09-11
43
+
44
+ - **The persona text moved in `0.1.3-alpha.2`** ([#22](https://github.com/6Mikao9/dsh-wsl-workspace/issues/22)): DSH renamed the persona's model-facing scalar from `text` to an inline `suffix` plus a folded `prefix`, and the variant generator only recognised `text: >-`. On that line the WSL environment sentence was never appended - the session still ran inside the distribution, but the model was never told that its working directory is a Linux path reachable from Windows as `/mnt/<drive>`. The generator now amends `suffix`, `text` or `prefix` (folding an inline scalar into a block scalar when needed, so the sentence joins the working-directory line exactly where the legacy `text` block put it), and a persona carrying `complete: true` is still left alone. Verified on seven releases: the five older ones keep their persona block byte-identical, and the two newer ones now carry the sentence into the model's system message.
45
+ - **Help panel**: the dialog gained a "?" button that opens an in-place panel - the DSH releases this build declares (read from `package.json` through the host route, so the list can never drift from the manifest), how the plugin is used, its features, and the limitations it cannot fix.
46
+ - **The skill catalog now reaches UNC workspaces**: the host skill provider watches a workspace through `chokidar`, and watching a `\\wsl.localhost\...` path fails; the failed watcher makes the skill snapshot report `complete: false`, and `dsh-tool-skill` withholds the *entire* catalog message while a snapshot is incomplete — so a WSL session's model saw no skills at all, not even the ones the plugin had discovered. The variant generator now pins `watch: false` on the `skill-filesystem` row (merged into an existing `config:` block when there is one, and left alone when the source declares `watch` itself), which makes the host collect the catalog once at session start instead. Verified end to end on `0.1.5-rc.2`: the model's context carries the `<available_skills>` list. Trade-off: a skill added mid-session appears in the next session rather than the running one; skill bodies are still read live.
47
+ - **`verify-lib` hardening**: its comment/string stripper could pair a lone apostrophe inside a comment with a later one and swallow the rest of the bundle, which made every `node:*` import look tree-shaken. The quote rules now stop at a newline, exactly as a JavaScript string does.
48
+
49
+ ### 0.4.2 — 2026-09-10
50
+
51
+ - **Create & open in a `0.1.2-rc.1` workspace**: the session starter is now resolved when the dialog writes, not when the plugin applies. This plugin applies *before* the UI domain that publishes `uiWorkspace` registers its service, so the lookup cached at apply time stayed `undefined` for the whole page life: `Create & open` created the workspace and then silently opened no session, leaving `sessionIds` empty while the dialog reported success. A release exposing neither `uiWorkspace.startSession` nor `workspaces.startSession` now fails *before* anything is written, instead of leaving an orphaned workspace behind.
52
+ - **Skill body integrity**: skill bodies no longer lose their first character. `findFrontmatterEnd` already returns the index of the body's first character (the closing delimiter's newline plus one), so the slice must start there; the previous offset dropped that character and made the one after the delimiter look like the body. The existing fixtures always put a blank line after the delimiter, which is exactly what hid it.
53
+ - **UTF-8 BOM skills are no longer dropped**: a `SKILL.md` saved with a leading BOM (Notepad, VS Code's "UTF-8 with BOM", PowerShell redirection) did not match the opening `---` and disappeared from the catalog entirely. The parser strips the BOM before the fence check.
54
+ - **Binding converges on late inputs**: the agent-preset roster and the registered `/mnt/<drive>` workspace set are both inputs to binding, and both land asynchronously after the plugin's first pass. Each now re-runs the pass when it arrives instead of waiting for a session-store event that may never come.
55
+ - **Compatibility manifest corrected**: `0.1.3-alpha.1` is not published (`npm view @deepseek-ai/dsh@0.1.3-alpha.1` is a 404), so the declaration could never be verified; it is replaced by the published `0.1.3-alpha.2`.
56
+ - **Reproducible publishes**: a new `.gitattributes` (`* text=auto eol=lf`, `lib/** -text`) pins line endings. `core.autocrlf=true` used to rewrite text files to CRLF on checkout, and since `lib/` is committed and published verbatim the same commit produced different npm tarballs depending on the machine; the repository already stored LF, so no renormalisation was needed.
57
+ - **Closed-loop tests**: `tests/client-lifecycle.test.mjs` drives the browser half through the shipped `lib/client.js` for both service shapes — legacy (`connection.api.agentPresets` + `workspaces.startSession`) and current (`remote.agentPresets` + `uiWorkspace`) — and asserts `Create & open` for the normal, late-registration and no-starter cases. The skill tests now cover a body that starts on the delimiter's next line, for LF and CRLF files.
58
+
59
+ ### 0.4.1 — 2026-09-03
60
+
61
+ - **DSH v0.1.2-rc.1 compatibility**: Added backward compatibility support for DSH v0.1.2-rc.1 and later versions through feature detection and compatibility wrappers. The plugin now automatically detects the DSH version at runtime and uses the appropriate API:
62
+ - `uiWorkspace.startSession()` for v0.1.2-rc.1+
63
+ - `workspaces.startSession()` for v0.1.1-rc.2 and earlier
64
+ - `summary.projectionValues?.agentPreset` for v0.1.2-rc.1+
65
+ - `summary.agentPreset` for v0.1.1-rc.2 and earlier
66
+ - Projection-based auto-sync for v0.1.2-rc.1+
67
+ - `sessions.noteAgentPreset()` for v0.1.1-rc.2 and earlier
68
+ - **Updated compatibility manifest**: Added v0.1.2-rc.1 to the `dsh.compatibility.dshReleases` declaration.
69
+ - **Fixed `without inject` crash on v0.1.2-rc.1+**: the agent-preset roster is read through the `remote.agentPresets` namespace service via `ctx.get('remote.agentPresets')` (topology-free store lookup) instead of the `remote` aggregate's `agentPresets` property, which Cordis' associate proxy rejects when the dotted property is not declared in `inject`. `inject` stays limited to the services both DSH generations share (`slots`, `locale`, `sessions`, `workspaces`).
70
+ - **Compatibility manifest**: declared v0.1.3-alpha.1 compatible (its plugin-facing API surface matches v0.1.2-rc.1). Final adaptation notes consolidated in `docs/COMPATIBILITY_SUMMARY.md` (supersedes the root-level draft plans).
71
+
72
+ ### 0.4.0 — 2026-08-29
73
+
74
+ Follow-ups from the [#12](https://github.com/6Mikao9/dsh-wsl-workspace/issues/12) limitation list and the [#13](https://github.com/6Mikao9/dsh-wsl-workspace/issues/13) compatibility work:
75
+
76
+ - **Lookup cache**: completed skill-catalog lookups are cached per scan root for 10 seconds, so repeated catalog builds no longer rescan the workspace over the slow 9P share; `get()` keeps reading skill bodies live, and freshly added skills appear within the TTL window.
77
+ - **Symlinked projects — investigated, substrate-limited**: the discovery walk now recognizes directory symlinks explicitly and prunes them safely (no crashes, no loops). Following them is not possible over the `\\wsl.localhost` 9P share — the Windows side cannot resolve Linux symlink targets (probed: `readlink` → `EISDIR`, `stat`/`readdir` → `ENOENT`) — so a project linked into the workspace via `ln -s` stays undiscoverable; a name+body fingerprint dedupe also guarantees aliased skill files can never publish twice on substrates that do resolve links.
78
+ - **Block-scalar frontmatter**: `description:` / `whenToUse:` written as YAML block scalars (`|` literal, `>` folded) now parse — such skills were silently dropped before.
79
+ - **Compatibility manifest**: `dsh.compatibility.dshReleases` declares per-release compatibility with the official DSH versions, backed by reproducible disposable-Profile install/start/uninstall evidence (`scripts/verify-dsh-compat.sh`), and `engines` declares the Node.js floor.
80
+ - **Guard scripts**: `scripts/check-rank-parity.mjs` fails the release when the copied project-rank constants drift from the host's `dsh-skill-filesystem`.
81
+
82
+ ### 0.3.2 — 2026-08-29
83
+
84
+ - **WSL workspace sessions now inject nested-project skill catalogs** ([#10](https://github.com/6Mikao9/dsh-wsl-workspace/issues/10)): `.dsh/skills` and `.agents/skills` directories of projects nested below the registered workspace root are discovered and published with the host's project ranks and sources, so the model sees the same skill catalog it would see when the session cwd is the project folder itself. Discovery is depth- and budget-bounded, prunes `node_modules`/dot-directories, and leaves non-WSL sessions untouched.
85
+ - **Host-parity scan root**: lookups from inside a project subtree resolve the nearest `.git` ancestor first, so the enclosing project's skills stay visible from deeper cwds; skills above that ancestor do not leak.
86
+ - **Hardening**: the skill-root budget is enforced per push, and the `skills.registerProvider` call is guarded so a host whose `skills` service has a different shape can no longer break plugin load.
87
+ - **Housekeeping**: removed stale prebuilt `lib/` chunks that shipped dead vendor code (including an inlined schemastery copy that triggered dsh.so's `new Function` static rule); added `scripts/repro-setup.sh` plus a nested skill-catalog regression suite, and a matching TESTING.md section.
88
+
89
+ ## License & attribution
90
+
91
+ MIT — see [LICENSE](LICENSE) and [NOTICE](NOTICE). The NOTICE precisely lists:
92
+
93
+ - **Adapted/inherited source code**: DeepSeek Harness (MIT) — `dsh-bash-local` (executor mechanics), `dsh-fs-local` (`WslFileSystem` subclasses it), and the shipped agent presets (read and transformed by the variant generator);
94
+ - **Design references (no source copied)**: [dsh-bash-terminal](https://github.com/MAXeaglet/dsh-bash-terminal) (MIT, wsl argv / WSLENV approach), [dsh-side-panel](https://github.com/ccq1/dsh-side-panel) (BSD-3-Clause, host-route pattern), [vpshub](https://github.com/Sdongmaker/vpshub) (MIT, roadmap reference).
95
+
96
+ Keep `LICENSE` and `NOTICE` when redistributing.
97
+
98
+ ## Acknowledgments
99
+
100
+ Special thanks to [dsh-deep-whale](https://github.com/Small-tailqwq/dsh-deep-whale) (DSH Web 鲸鱼娘 skin series · 深海女仆工坊 maid-atelier, CC BY-NC-SA 4.0): the whale girl skin plugin brings a full set of adorable skins to the DeepSeek Harness Web UI and makes daily use of DSH a warmer experience.
package/README.pt.md CHANGED
@@ -1,52 +1,52 @@
1
- # dsh-wsl-workspace
2
-
3
- [![dsh.so security](https://www.dsh.so/badge/dsh-wsl-workspace.svg)](https://www.dsh.so/artifact/dsh-wsl-workspace)
4
- [![dsh.so install](https://www.dsh.so/badge/install/dsh-wsl-workspace.svg)](https://www.dsh.so/artifact/dsh-wsl-workspace)
5
-
6
- [English](README.md) · [中文](README.zh.md) · [日本語](README.ja.md) · [한국어](README.ko.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Español](README.es.md) · [Português](README.pt.md) · [Русский](README.ru.md)
7
-
8
- ![alt text](image-3.png)
9
- Adicione um espaço de trabalho WSL a partir da interface web do DeepSeek Harness e execute toda a sessão do agente — comandos bash e leitura/escrita de arquivos — dentro de uma distribuição WSL local com caminhos em formato Linux. Não é necessário instalar nada dentro do WSL. A sessão pode acessar WSL e Windows ao mesmo tempo: os comandos bash são executados dentro da distribuição WSL, enquanto os arquivos do Windows continuam acessíveis via `/mnt/<unidade>` (por exemplo `/mnt/c/Users/...`).
10
-
11
- ## Instalação
12
-
13
- Escolha um dos três métodos abaixo e reinicie o `dsh web`:
14
-
15
- ```powershell
16
- # 1) Pacote npm
17
- dsh plugin --profile web add dsh-wsl-workspace
18
-
19
- # 2) Repositório GitHub (inclui lib/ pré-compilado, sem build local)
20
- dsh plugin --profile web add https://github.com/6Mikao9/dsh-wsl-workspace
21
-
22
- # 3) Diretório local (desenvolvimento / uso próprio)
23
- dsh plugin --profile web add D:\path\to\dsh-wsl-workspace
24
- ```
25
-
26
- Após reiniciar o `dsh web`, um botão W aparece ao lado de Settings na parte inferior da barra lateral.
27
-
28
- ## Uso
29
-
30
- Clique no botão W ao lado de Settings na parte inferior da barra lateral para abrir o diálogo "Add WSL workspace". Escolha uma distribuição, navegue pela árvore de diretórios ou digite um caminho Linux absoluto (por exemplo `/home/me/proj`) — o botão Check verifica se o caminho existe antes de criar o espaço de trabalho. O diálogo segue o idioma da interface do DeepSeek Harness. O campo nome de usuário é opcional: deixe vazio para executar os comandos com o usuário padrão da distribuição, ou informe um usuário Linux dessa distribuição para executar a sessão como esse usuário (equivalente a `wsl.exe -u <usuário>`). O nome de usuário só altera a identidade de execução da ferramenta bash — as ferramentas de arquivo passam pelo compartilhamento WSL do lado do Windows e não são afetadas. O nome de usuário de cada espaço de trabalho fica em `<dshHome>/wsl-workspaces.json`; exclua a entrada (ou recrie o espaço de trabalho pelo diálogo) para voltar ao usuário padrão.
31
-
32
- Clique em "Create & open" para iniciar uma nova sessão no espaço de trabalho. Na nova sessão, a ferramenta bash executa comandos dentro da distribuição escolhida e `read`/`write`/`edit` operam nos arquivos WSL, portanto cada caminho visto pelo modelo é um caminho Linux. O seletor de modos continua funcionando normalmente: Standard, PTC, Minimal e Creative caem automaticamente na sua variante WSL (as entradas de variante WSL no seletor são bilíngues, ex. `WSL · Standard mode(标准模式)`), e os arquivos do Windows continuam acessíveis a partir da sessão sob `/mnt/<unidade>` (por exemplo `/mnt/c/Users/...`).
33
-
34
- ![alt text](image-2.png)
35
- ## Notas de comportamento
36
-
37
- - **Ferramenta bash**: é executada dentro da distribuição WSL com o nome de usuário configurado (vazio = usuário padrão da distribuição, geralmente `root`), podendo ler e escrever em qualquer lugar da distribuição. O sandbox de ACL do Windows não consegue envolver o `wsl.exe` — seus processos filhos rodam no lado do kernel Linux — então o WSL em si é a fronteira de isolamento e a política de arquivos do DSH não se aplica ao bash.
38
- - **Ferramentas de arquivo (`read`/`write`/`edit`)**: passam pelo compartilhamento WSL 9P do lado do Windows e ficam sujeitas à política de arquivos do DSH. Com `workspace-write`, leituras funcionam em qualquer lugar, mas escritas ficam restritas ao espaço de trabalho da sessão; mude a política para `danger-full-access` para permitir também escritas fora dele. O campo nome de usuário não afeta as ferramentas de arquivo.
39
- - O banner de encaminhamento de porta `localhost` (texto ilegível) que o `wsl.exe` imprime em stderr quando a distribuição ainda não estava em execução é inofensivo.
40
-
41
- ## Licença e atribuição
42
-
43
- MIT — veja [LICENSE](LICENSE) e [NOTICE](NOTICE). O NOTICE lista com precisão:
44
-
45
- - **Código-fonte adaptado/herdado**: DeepSeek Harness (MIT) — `dsh-bash-local` (mecânica do executor), `dsh-fs-local` (`WslFileSystem` o subclassifica) e os agent presets fornecidos (lidos e transformados pelo gerador de variantes);
46
- - **Referências de design (nenhum código copiado)**: [dsh-bash-terminal](https://github.com/MAXeaglet/dsh-bash-terminal) (MIT, abordagem wsl argv/WSLENV), [dsh-side-panel](https://github.com/ccq1/dsh-side-panel) (BSD-3-Clause, padrão de rota do host), [vpshub](https://github.com/Sdongmaker/vpshub) (MIT, referência de roadmap).
47
-
48
- Mantenha `LICENSE` e `NOTICE` ao redistribuir.
49
-
50
- ## Agradecimentos
51
-
52
- Agradecimento especial a [dsh-deep-whale](https://github.com/Small-tailqwq/dsh-deep-whale) (série de skins 鲸鱼娘 para DSH Web · 深海女仆工坊 maid-atelier, CC BY-NC-SA 4.0): o plugin de skins da garota-baleia traz um conjunto completo de skins adoráveis para a interface web do DeepSeek Harness e torna o uso diário do DSH mais acolhedor.
1
+ # dsh-wsl-workspace
2
+
3
+ [![dsh.so security](https://www.dsh.so/badge/dsh-wsl-workspace.svg)](https://www.dsh.so/artifact/dsh-wsl-workspace)
4
+ [![dsh.so install](https://www.dsh.so/badge/install/dsh-wsl-workspace.svg)](https://www.dsh.so/artifact/dsh-wsl-workspace)
5
+
6
+ [English](README.md) · [中文](README.zh.md) · [日本語](README.ja.md) · [한국어](README.ko.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Español](README.es.md) · [Português](README.pt.md) · [Русский](README.ru.md)
7
+
8
+ ![alt text](image-3.png)
9
+ Adicione um espaço de trabalho WSL a partir da interface web do DeepSeek Harness e execute toda a sessão do agente — comandos bash e leitura/escrita de arquivos — dentro de uma distribuição WSL local com caminhos em formato Linux. Não é necessário instalar nada dentro do WSL. A sessão pode acessar WSL e Windows ao mesmo tempo: os comandos bash são executados dentro da distribuição WSL, enquanto os arquivos do Windows continuam acessíveis via `/mnt/<unidade>` (por exemplo `/mnt/c/Users/...`).
10
+
11
+ ## Instalação
12
+
13
+ Escolha um dos três métodos abaixo e reinicie o `dsh web`:
14
+
15
+ ```powershell
16
+ # 1) Pacote npm
17
+ dsh plugin --profile web add dsh-wsl-workspace
18
+
19
+ # 2) Repositório GitHub (inclui lib/ pré-compilado, sem build local)
20
+ dsh plugin --profile web add https://github.com/6Mikao9/dsh-wsl-workspace
21
+
22
+ # 3) Diretório local (desenvolvimento / uso próprio)
23
+ dsh plugin --profile web add D:\path\to\dsh-wsl-workspace
24
+ ```
25
+
26
+ Após reiniciar o `dsh web`, um botão W aparece ao lado de Settings na parte inferior da barra lateral.
27
+
28
+ ## Uso
29
+
30
+ Clique no botão W ao lado de Settings na parte inferior da barra lateral para abrir o diálogo "Add WSL workspace". Escolha uma distribuição, navegue pela árvore de diretórios ou digite um caminho Linux absoluto (por exemplo `/home/me/proj`) — o botão Check verifica se o caminho existe antes de criar o espaço de trabalho. O diálogo segue o idioma da interface do DeepSeek Harness. O campo nome de usuário é opcional: deixe vazio para executar os comandos com o usuário padrão da distribuição, ou informe um usuário Linux dessa distribuição para executar a sessão como esse usuário (equivalente a `wsl.exe -u <usuário>`). O nome de usuário só altera a identidade de execução da ferramenta bash — as ferramentas de arquivo passam pelo compartilhamento WSL do lado do Windows e não são afetadas. O nome de usuário de cada espaço de trabalho fica em `<dshHome>/wsl-workspaces.json`; exclua a entrada (ou recrie o espaço de trabalho pelo diálogo) para voltar ao usuário padrão.
31
+
32
+ Clique em "Create & open" para iniciar uma nova sessão no espaço de trabalho. Na nova sessão, a ferramenta bash executa comandos dentro da distribuição escolhida e `read`/`write`/`edit` operam nos arquivos WSL, portanto cada caminho visto pelo modelo é um caminho Linux. O seletor de modos continua funcionando normalmente: Standard, PTC, Minimal e Creative caem automaticamente na sua variante WSL (as entradas de variante WSL no seletor são bilíngues, ex. `WSL · Standard mode(标准模式)`), e os arquivos do Windows continuam acessíveis a partir da sessão sob `/mnt/<unidade>` (por exemplo `/mnt/c/Users/...`).
33
+
34
+ ![alt text](image-2.png)
35
+ ## Notas de comportamento
36
+
37
+ - **Ferramenta bash**: é executada dentro da distribuição WSL com o nome de usuário configurado (vazio = usuário padrão da distribuição, geralmente `root`), podendo ler e escrever em qualquer lugar da distribuição. O sandbox de ACL do Windows não consegue envolver o `wsl.exe` — seus processos filhos rodam no lado do kernel Linux — então o WSL em si é a fronteira de isolamento e a política de arquivos do DSH não se aplica ao bash.
38
+ - **Ferramentas de arquivo (`read`/`write`/`edit`)**: passam pelo compartilhamento WSL 9P do lado do Windows e ficam sujeitas à política de arquivos do DSH. Com `workspace-write`, leituras funcionam em qualquer lugar, mas escritas ficam restritas ao espaço de trabalho da sessão; mude a política para `danger-full-access` para permitir também escritas fora dele. O campo nome de usuário não afeta as ferramentas de arquivo.
39
+ - O banner de encaminhamento de porta `localhost` (texto ilegível) que o `wsl.exe` imprime em stderr quando a distribuição ainda não estava em execução é inofensivo.
40
+
41
+ ## Licença e atribuição
42
+
43
+ MIT — veja [LICENSE](LICENSE) e [NOTICE](NOTICE). O NOTICE lista com precisão:
44
+
45
+ - **Código-fonte adaptado/herdado**: DeepSeek Harness (MIT) — `dsh-bash-local` (mecânica do executor), `dsh-fs-local` (`WslFileSystem` o subclassifica) e os agent presets fornecidos (lidos e transformados pelo gerador de variantes);
46
+ - **Referências de design (nenhum código copiado)**: [dsh-bash-terminal](https://github.com/MAXeaglet/dsh-bash-terminal) (MIT, abordagem wsl argv/WSLENV), [dsh-side-panel](https://github.com/ccq1/dsh-side-panel) (BSD-3-Clause, padrão de rota do host), [vpshub](https://github.com/Sdongmaker/vpshub) (MIT, referência de roadmap).
47
+
48
+ Mantenha `LICENSE` e `NOTICE` ao redistribuir.
49
+
50
+ ## Agradecimentos
51
+
52
+ Agradecimento especial a [dsh-deep-whale](https://github.com/Small-tailqwq/dsh-deep-whale) (série de skins 鲸鱼娘 para DSH Web · 深海女仆工坊 maid-atelier, CC BY-NC-SA 4.0): o plugin de skins da garota-baleia traz um conjunto completo de skins adoráveis para a interface web do DeepSeek Harness e torna o uso diário do DSH mais acolhedor.
package/README.ru.md CHANGED
@@ -1,52 +1,52 @@
1
- # dsh-wsl-workspace
2
-
3
- [![dsh.so security](https://www.dsh.so/badge/dsh-wsl-workspace.svg)](https://www.dsh.so/artifact/dsh-wsl-workspace)
4
- [![dsh.so install](https://www.dsh.so/badge/install/dsh-wsl-workspace.svg)](https://www.dsh.so/artifact/dsh-wsl-workspace)
5
-
6
- [English](README.md) · [中文](README.zh.md) · [日本語](README.ja.md) · [한국어](README.ko.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Español](README.es.md) · [Português](README.pt.md) · [Русский](README.ru.md)
7
-
8
- ![alt text](image-3.png)
9
- Добавьте рабочее пространство WSL из веб-интерфейса DeepSeek Harness и запустите всю сессию агента — команды bash и чтение/запись файлов — внутри локального дистрибутива WSL с путями в формате Linux. Ничего не нужно устанавливать внутри WSL. Сессия может одновременно обращаться и к WSL, и к Windows: команды bash выполняются внутри дистрибутива WSL, а файлы Windows остаются доступными через `/mnt/<диск>` (например `/mnt/c/Users/...`).
10
-
11
- ## Установка
12
-
13
- Выберите один из трёх способов ниже, затем перезапустите `dsh web`:
14
-
15
- ```powershell
16
- # 1) npm-пакет
17
- dsh plugin --profile web add dsh-wsl-workspace
18
-
19
- # 2) Репозиторий GitHub (включает предсобранный lib/, локальная сборка не нужна)
20
- dsh plugin --profile web add https://github.com/6Mikao9/dsh-wsl-workspace
21
-
22
- # 3) Локальная папка (разработка / личное использование)
23
- dsh plugin --profile web add D:\path\to\dsh-wsl-workspace
24
- ```
25
-
26
- После перезапуска `dsh web` рядом с Settings внизу боковой панели появится кнопка W.
27
-
28
- ## Использование
29
-
30
- Нажмите кнопку W рядом с Settings внизу боковой панели, чтобы открыть диалог «Add WSL workspace». Выберите дистрибутив, просмотрите дерево каталогов или введите абсолютный путь Linux (например `/home/me/proj`) — кнопка Check проверяет существование пути перед созданием. Язык диалога следует языку интерфейса DeepSeek Harness. Поле имени пользователя необязательно: оставьте его пустым, чтобы выполнять команды от пользователя дистрибутива по умолчанию, или укажите пользователя Linux этого дистрибутива, чтобы сессия выполнялась от его имени (эквивалент `wsl.exe -u <пользователь>`). Имя пользователя меняет только учётную запись, под которой работает инструмент bash, — инструменты файлов идут через общую папку WSL со стороны Windows и не зависят от него. Имя пользователя каждого рабочего пространства хранится в `<dshHome>/wsl-workspaces.json`; удалите запись (или пересоздайте рабочее пространство через диалог), чтобы вернуться к пользователю по умолчанию.
31
-
32
- Нажмите «Create & open», чтобы запустить новую сессию в рабочем пространстве. В новой сессии инструмент bash выполняет команды внутри выбранного дистрибутива, а `read`/`write`/`edit` работают с файлами WSL, поэтому каждый путь, который видит модель, — это путь Linux. Выбор режима работает как обычно: Standard, PTC, Minimal и Creative автоматически попадают на свой вариант WSL (записи вариантов WSL в селекторе двуязычные, напр. `WSL · Standard mode(标准模式)`), а файлы Windows остаются доступными из сессии через `/mnt/<диск>` (например `/mnt/c/Users/...`).
33
-
34
- ![alt text](image-2.png)
35
- ## Примечания о поведении
36
-
37
- - **Инструмент bash**: выполняется внутри дистрибутива WSL под настроенным именем пользователя (пусто = пользователь по умолчанию, часто `root`), поэтому может читать и писать в любом месте дистрибутива. Песочница Windows ACL не может обернуть `wsl.exe` — его дочерние процессы работают на стороне ядра Linux — поэтому сама WSL является границей изоляции, и политика файлов DSH не применяется к bash.
38
- - **Инструменты файлов (`read`/`write`/`edit`)**: идут через общую папку WSL 9P со стороны Windows и подчиняются политике файлов DSH. При `workspace-write` чтение работает где угодно, но запись ограничена рабочим пространством сессии; переключите политику на `danger-full-access`, чтобы разрешить запись и за его пределами. Поле имени пользователя не влияет на инструменты файлов.
39
- - Искажённый баннер пересылки порта `localhost`, который `wsl.exe` печатает в stderr, когда дистрибутив ещё не был запущен, безвреден.
40
-
41
- ## Лицензия и атрибуция
42
-
43
- MIT — см. [LICENSE](LICENSE) и [NOTICE](NOTICE). В NOTICE точно перечислено:
44
-
45
- - **Адаптированный/унаследованный исходный код**: DeepSeek Harness (MIT) — `dsh-bash-local` (механика исполнителя), `dsh-fs-local` (`WslFileSystem` наследует его) и поставляемые agent presets (читаются и преобразуются генератором вариантов);
46
- - **Ссылки на дизайн (код не копировался)**: [dsh-bash-terminal](https://github.com/MAXeaglet/dsh-bash-terminal) (MIT, подход wsl argv/WSLENV), [dsh-side-panel](https://github.com/ccq1/dsh-side-panel) (BSD-3-Clause, паттерн маршрута хоста), [vpshub](https://github.com/Sdongmaker/vpshub) (MIT, ссылка на дорожную карту).
47
-
48
- Сохраняйте `LICENSE` и `NOTICE` при распространении.
49
-
50
- ## Благодарности
51
-
52
- Особая благодарность [dsh-deep-whale](https://github.com/Small-tailqwq/dsh-deep-whale) (серия скинов 鲸鱼娘 для DSH Web · 深海女仆工坊 maid-atelier, CC BY-NC-SA 4.0): плагин скинов девушки-кита приносит в веб-интерфейс DeepSeek Harness целый набор очаровательных скинов и делает повседневное использование DSH теплее.
1
+ # dsh-wsl-workspace
2
+
3
+ [![dsh.so security](https://www.dsh.so/badge/dsh-wsl-workspace.svg)](https://www.dsh.so/artifact/dsh-wsl-workspace)
4
+ [![dsh.so install](https://www.dsh.so/badge/install/dsh-wsl-workspace.svg)](https://www.dsh.so/artifact/dsh-wsl-workspace)
5
+
6
+ [English](README.md) · [中文](README.zh.md) · [日本語](README.ja.md) · [한국어](README.ko.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Español](README.es.md) · [Português](README.pt.md) · [Русский](README.ru.md)
7
+
8
+ ![alt text](image-3.png)
9
+ Добавьте рабочее пространство WSL из веб-интерфейса DeepSeek Harness и запустите всю сессию агента — команды bash и чтение/запись файлов — внутри локального дистрибутива WSL с путями в формате Linux. Ничего не нужно устанавливать внутри WSL. Сессия может одновременно обращаться и к WSL, и к Windows: команды bash выполняются внутри дистрибутива WSL, а файлы Windows остаются доступными через `/mnt/<диск>` (например `/mnt/c/Users/...`).
10
+
11
+ ## Установка
12
+
13
+ Выберите один из трёх способов ниже, затем перезапустите `dsh web`:
14
+
15
+ ```powershell
16
+ # 1) npm-пакет
17
+ dsh plugin --profile web add dsh-wsl-workspace
18
+
19
+ # 2) Репозиторий GitHub (включает предсобранный lib/, локальная сборка не нужна)
20
+ dsh plugin --profile web add https://github.com/6Mikao9/dsh-wsl-workspace
21
+
22
+ # 3) Локальная папка (разработка / личное использование)
23
+ dsh plugin --profile web add D:\path\to\dsh-wsl-workspace
24
+ ```
25
+
26
+ После перезапуска `dsh web` рядом с Settings внизу боковой панели появится кнопка W.
27
+
28
+ ## Использование
29
+
30
+ Нажмите кнопку W рядом с Settings внизу боковой панели, чтобы открыть диалог «Add WSL workspace». Выберите дистрибутив, просмотрите дерево каталогов или введите абсолютный путь Linux (например `/home/me/proj`) — кнопка Check проверяет существование пути перед созданием. Язык диалога следует языку интерфейса DeepSeek Harness. Поле имени пользователя необязательно: оставьте его пустым, чтобы выполнять команды от пользователя дистрибутива по умолчанию, или укажите пользователя Linux этого дистрибутива, чтобы сессия выполнялась от его имени (эквивалент `wsl.exe -u <пользователь>`). Имя пользователя меняет только учётную запись, под которой работает инструмент bash, — инструменты файлов идут через общую папку WSL со стороны Windows и не зависят от него. Имя пользователя каждого рабочего пространства хранится в `<dshHome>/wsl-workspaces.json`; удалите запись (или пересоздайте рабочее пространство через диалог), чтобы вернуться к пользователю по умолчанию.
31
+
32
+ Нажмите «Create & open», чтобы запустить новую сессию в рабочем пространстве. В новой сессии инструмент bash выполняет команды внутри выбранного дистрибутива, а `read`/`write`/`edit` работают с файлами WSL, поэтому каждый путь, который видит модель, — это путь Linux. Выбор режима работает как обычно: Standard, PTC, Minimal и Creative автоматически попадают на свой вариант WSL (записи вариантов WSL в селекторе двуязычные, напр. `WSL · Standard mode(标准模式)`), а файлы Windows остаются доступными из сессии через `/mnt/<диск>` (например `/mnt/c/Users/...`).
33
+
34
+ ![alt text](image-2.png)
35
+ ## Примечания о поведении
36
+
37
+ - **Инструмент bash**: выполняется внутри дистрибутива WSL под настроенным именем пользователя (пусто = пользователь по умолчанию, часто `root`), поэтому может читать и писать в любом месте дистрибутива. Песочница Windows ACL не может обернуть `wsl.exe` — его дочерние процессы работают на стороне ядра Linux — поэтому сама WSL является границей изоляции, и политика файлов DSH не применяется к bash.
38
+ - **Инструменты файлов (`read`/`write`/`edit`)**: идут через общую папку WSL 9P со стороны Windows и подчиняются политике файлов DSH. При `workspace-write` чтение работает где угодно, но запись ограничена рабочим пространством сессии; переключите политику на `danger-full-access`, чтобы разрешить запись и за его пределами. Поле имени пользователя не влияет на инструменты файлов.
39
+ - Искажённый баннер пересылки порта `localhost`, который `wsl.exe` печатает в stderr, когда дистрибутив ещё не был запущен, безвреден.
40
+
41
+ ## Лицензия и атрибуция
42
+
43
+ MIT — см. [LICENSE](LICENSE) и [NOTICE](NOTICE). В NOTICE точно перечислено:
44
+
45
+ - **Адаптированный/унаследованный исходный код**: DeepSeek Harness (MIT) — `dsh-bash-local` (механика исполнителя), `dsh-fs-local` (`WslFileSystem` наследует его) и поставляемые agent presets (читаются и преобразуются генератором вариантов);
46
+ - **Ссылки на дизайн (код не копировался)**: [dsh-bash-terminal](https://github.com/MAXeaglet/dsh-bash-terminal) (MIT, подход wsl argv/WSLENV), [dsh-side-panel](https://github.com/ccq1/dsh-side-panel) (BSD-3-Clause, паттерн маршрута хоста), [vpshub](https://github.com/Sdongmaker/vpshub) (MIT, ссылка на дорожную карту).
47
+
48
+ Сохраняйте `LICENSE` и `NOTICE` при распространении.
49
+
50
+ ## Благодарности
51
+
52
+ Особая благодарность [dsh-deep-whale](https://github.com/Small-tailqwq/dsh-deep-whale) (серия скинов 鲸鱼娘 для DSH Web · 深海女仆工坊 maid-atelier, CC BY-NC-SA 4.0): плагин скинов девушки-кита приносит в веб-интерфейс DeepSeek Harness целый набор очаровательных скинов и делает повседневное использование DSH теплее.
package/README.zh.md CHANGED
@@ -1,49 +1,50 @@
1
- # dsh-wsl-workspace
2
-
3
- [![dsh.so security](https://www.dsh.so/badge/dsh-wsl-workspace.svg)](https://www.dsh.so/artifact/dsh-wsl-workspace)
4
- [![dsh.so install](https://www.dsh.so/badge/install/dsh-wsl-workspace.svg)](https://www.dsh.so/artifact/dsh-wsl-workspace)
5
-
6
- [English](README.md) · [中文](README.zh.md) · [日本語](README.ja.md) · [한국어](README.ko.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Español](README.es.md) · [Português](README.pt.md) · [Русский](README.ru.md)
7
- ![alt text](image-3.png)
8
- 在 DeepSeek Harness Web GUI 中「添加 WSL 工作区」:让 agent 会话的 bash 命令与文件读写都运行在本机 WSL 发行版里,路径均为 Linux 形式,WSL 内无需安装任何工具链。会话可同时访问 WSL 与 Windows 两个系统——bash 命令在 WSL 发行版内执行,Windows 文件随时可通过 `/mnt/<drive>`(如 `/mnt/c/Users/...`)访问。
9
-
10
- ## 安装
11
-
12
- 三种方式任选其一,然后重启 `dsh web`:
13
-
14
- ```powershell
15
- # 1) npm 包
16
- dsh plugin --profile web add dsh-wsl-workspace
17
-
18
- # 2) GitHub 仓库(仓库内已含预构建 lib/,无需本地构建)
19
- dsh plugin --profile web add https://github.com/6Mikao9/dsh-wsl-workspace
20
-
21
- # 3) 本地目录(开发/自用)
22
- dsh plugin --profile web add D:\path\to\dsh-wsl-workspace
23
- ```
24
-
25
- 重启 `dsh web` 后,侧栏底部 Settings 旁出现 W 按钮。
26
-
27
- ## 使用
28
- 点侧栏底部 Settings 旁的 W 按钮,打开「添加 WSL 工作区」对话框。先从下拉框选择一个发行版,再浏览目录树或直接输入 Linux 绝对路径(如 `/home/me/proj`),可以点「检查」确认路径存在。对话框文案跟随 DSH 界面语言。用户名是可选项:留空则以该发行版的默认用户运行,填写该发行版里的某个 Linux 用户名则以该用户运行(等价于 `wsl.exe -u <用户名>`)。用户名只影响 bash 命令的运行身份,文件工具通过 Windows 侧的 WSL 共享访问、不受其影响;每个工作区填写的用户名保存在 `<dshHome>/wsl-workspaces.json`,删除对应条目(或重开对话框重建工作区)即可恢复默认用户。
29
-
30
- 点「创建并打开」后,新会话随即运行在 WSL:`bash` 工具在所选发行版内执行命令,`read`/`write`/`edit` 读写 WSL 文件,模型看到的所有路径都是 Linux 形式。模式选择器照常可用——标准、PTC、极简、创造都会自动落到对应的 WSL 变体(选择器里的 WSL 变体条目为中英双语,如 `WSL · Standard mode(标准模式)`);会话内仍可通过 `/mnt/<drive>`(如 `/mnt/c/Users/...`)访问 Windows 文件。
31
- ![alt text](image-2.png)
32
- ## 行为与权限说明
33
-
34
- - **bash 工具**:以配置的用户名在 WSL 发行版内运行(留空 = 发行版默认用户,通常为 root),可对发行版内任意路径读写。Windows 的 ACL 沙箱无法包裹 `wsl.exe`(子进程运行在 Linux 内核侧),WSL 自身即隔离边界,DSH 文件策略不作用于 bash。
35
- - **文件工具(read/write/edit)**:经 Windows 侧的 WSL 9P 共享访问,受 DSH 文件策略约束。`workspace-write` 下读可到任意位置、写仅限会话工作区;改为 `danger-full-access` 后工作区外也可写入。用户名设置不影响文件工具。
36
- - `wsl.exe` 在发行版尚未启动时向 stderr 打印的 localhost 端口转发提示(乱码但无害)可忽略。
37
-
38
- ## 许可与出处
39
-
40
- MIT,详见 [LICENSE](LICENSE) 与 [NOTICE](NOTICE),NOTICE 精确列明:
41
-
42
- - **改编/继承源码**:DeepSeek Harness(MIT)的 `dsh-bash-local`(执行器机制)、`dsh-fs-local`(`WslFileSystem` 子类化)、shipped agent presets(变体生成读取/变换);
43
- - **设计参考(未复制源码)**:[dsh-bash-terminal](https://github.com/MAXeaglet/dsh-bash-terminal)(MIT,wsl argv/WSLENV 思路)、[dsh-side-panel](https://github.com/ccq1/dsh-side-panel)(BSD-3-Clause,Host 路由模式)、[vpshub](https://github.com/Sdongmaker/vpshub)(MIT,路线图参考)。
44
-
45
- 发布/再分发时请保留 LICENSE 与 NOTICE。
46
-
47
- ## 致谢
48
-
49
- 特别感谢 [dsh-deep-whale](https://github.com/Small-tailqwq/dsh-deep-whale)(DSH Web 鲸鱼娘皮肤系列 · 深海女仆工坊 maid-atelier,CC BY-NC-SA 4.0):鲸鱼娘皮肤插件为 DeepSeek Harness Web 界面带来了一整套可爱的皮肤,让 DSH 的日常使用更有温度。
1
+ # dsh-wsl-workspace
2
+
3
+ [![dsh.so security](https://www.dsh.so/badge/dsh-wsl-workspace.svg)](https://www.dsh.so/artifact/dsh-wsl-workspace)
4
+ [![dsh.so install](https://www.dsh.so/badge/install/dsh-wsl-workspace.svg)](https://www.dsh.so/artifact/dsh-wsl-workspace)
5
+
6
+ [English](README.md) · [中文](README.zh.md) · [日本語](README.ja.md) · [한국어](README.ko.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Español](README.es.md) · [Português](README.pt.md) · [Русский](README.ru.md)
7
+ ![alt text](image-3.png)
8
+ 在 DeepSeek Harness Web GUI 中「添加 WSL 工作区」:让 agent 会话的 bash 命令与文件读写都运行在本机 WSL 发行版里,路径均为 Linux 形式,WSL 内无需安装任何工具链。会话可同时访问 WSL 与 Windows 两个系统——bash 命令在 WSL 发行版内执行,Windows 文件随时可通过 `/mnt/<drive>`(如 `/mnt/c/Users/...`)访问。
9
+
10
+ ## 安装
11
+
12
+ 三种方式任选其一,然后重启 `dsh web`:
13
+
14
+ ```powershell
15
+ # 1) npm 包
16
+ dsh plugin --profile web add dsh-wsl-workspace
17
+
18
+ # 2) GitHub 仓库(仓库内已含预构建 lib/,无需本地构建)
19
+ dsh plugin --profile web add https://github.com/6Mikao9/dsh-wsl-workspace
20
+
21
+ # 3) 本地目录(开发/自用)
22
+ dsh plugin --profile web add D:\path\to\dsh-wsl-workspace
23
+ ```
24
+
25
+ 重启 `dsh web` 后,侧栏底部 Settings 旁出现 W 按钮。
26
+
27
+ ## 使用
28
+ 点侧栏底部 Settings 旁的 W 按钮,打开「添加 WSL 工作区」对话框。先从下拉框选择一个发行版,再浏览目录树或直接输入 Linux 绝对路径(如 `/home/me/proj`),可以点「检查」确认路径存在。对话框文案跟随 DSH 界面语言。用户名是可选项:留空则以该发行版的默认用户运行,填写该发行版里的某个 Linux 用户名则以该用户运行(等价于 `wsl.exe -u <用户名>`)。用户名只影响 bash 命令的运行身份,文件工具通过 Windows 侧的 WSL 共享访问、不受其影响;每个工作区填写的用户名保存在 `<dshHome>/wsl-workspaces.json`,删除对应条目(或重开对话框重建工作区)即可恢复默认用户。
29
+
30
+ 点「创建并打开」后,新会话随即运行在 WSL:`bash` 工具在所选发行版内执行命令,`read`/`write`/`edit` 读写 WSL 文件,模型看到的所有路径都是 Linux 形式。模式选择器照常可用——标准、PTC、极简、创造都会自动落到对应的 WSL 变体(选择器里的 WSL 变体条目为中英双语,如 `WSL · Standard mode(标准模式)`);会话内仍可通过 `/mnt/<drive>`(如 `/mnt/c/Users/...`)访问 Windows 文件。对话框右上角的「?」按钮会展开一页说明:这份构建声明兼容的 DSH 版本、插件的用法与特性,以及它无法绕过的已知限制。
31
+ ![alt text](image-2.png)
32
+ ## 行为与权限说明
33
+
34
+ - **bash 工具**:以配置的用户名在 WSL 发行版内运行(留空 = 发行版默认用户,通常为 root),可对发行版内任意路径读写。Windows 的 ACL 沙箱无法包裹 `wsl.exe`(子进程运行在 Linux 内核侧),WSL 自身即隔离边界,DSH 文件策略不作用于 bash。
35
+ - **文件工具(read/write/edit)**:经 Windows 侧的 WSL 9P 共享访问,受 DSH 文件策略约束。`workspace-write` 下读可到任意位置、写仅限会话工作区;改为 `danger-full-access` 后工作区外也可写入。用户名设置不影响文件工具。
36
+ - **技能目录(skill catalog)**:从会话 cwd 最近的 `.git` 祖先开始(没有 `.git` 祖先则用 cwd 本身)向下扫描 `.dsh/skills` 与 `.agents/skills`(含嵌套项目),上限为 4 层目录、64 个技能目录、4096 个已访问目录;结果按扫描根缓存 10 秒,技能正文始终实时读取。一个底层限制不是本插件能修的:Windows 侧的 `\\wsl.localhost` 共享**无法解析 Linux 符号链接**(用 `ln -s` 链进来的项目发现不了,扫描会跳过而不报错,请把工作区注册在真实项目目录所在的层级)。**0.4.3 已修复**:UNC 工作区原先**收不到技能目录**——宿主技能提供者用 `fs.watch` 监视该共享,对 `\\wsl.localhost\...` 会抛 `EISDIR`,该次观测被判为不完整,而 `dsh-tool-skill` 在快照不完整时会丢弃整条目录消息。现在生成预设时会把 `skill-filesystem` 行的 `watch` 固定为 `false`,目录在会话启动时扫描一次并照常注入。唯一代价是不再实时刷新:会话运行中途新加入的技能要等下一个会话才出现在目录里(技能正文仍由 `get` 实时读取)。
37
+ - `wsl.exe` 在发行版尚未启动时向 stderr 打印的 localhost 端口转发提示(乱码但无害)可忽略。
38
+
39
+ ## 许可与出处
40
+
41
+ MIT,详见 [LICENSE](LICENSE) 与 [NOTICE](NOTICE),NOTICE 精确列明:
42
+
43
+ - **改编/继承源码**:DeepSeek Harness(MIT)的 `dsh-bash-local`(执行器机制)、`dsh-fs-local`(`WslFileSystem` 子类化)、shipped agent presets(变体生成读取/变换);
44
+ - **设计参考(未复制源码)**:[dsh-bash-terminal](https://github.com/MAXeaglet/dsh-bash-terminal)(MIT,wsl argv/WSLENV 思路)、[dsh-side-panel](https://github.com/ccq1/dsh-side-panel)(BSD-3-Clause,Host 路由模式)、[vpshub](https://github.com/Sdongmaker/vpshub)(MIT,路线图参考)。
45
+
46
+ 发布/再分发时请保留 LICENSE 与 NOTICE。
47
+
48
+ ## 致谢
49
+
50
+ 特别感谢 [dsh-deep-whale](https://github.com/Small-tailqwq/dsh-deep-whale)(DSH Web 鲸鱼娘皮肤系列 · 深海女仆工坊 maid-atelier,CC BY-NC-SA 4.0):鲸鱼娘皮肤插件为 DeepSeek Harness Web 界面带来了一整套可爱的皮肤,让 DSH 的日常使用更有温度。