dsh-plugin-wsl-env 0.1.8 → 0.1.10

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/CHANGELOG.md CHANGED
@@ -12,6 +12,38 @@ reference below points at that record's numbering.
12
12
 
13
13
  ## [Unreleased]
14
14
 
15
+ ## [0.1.10] - 2026-10-02
16
+
17
+ Metadata and one documentation addition. No behaviour change.
18
+
19
+ ### Changed
20
+
21
+ - The package description now covers all four capabilities — commands, the file tools,
22
+ the folder picker, the GUI terminal — and the confinement, instead of naming only two
23
+ of them. It is the line npm shows under the package name in search results.
24
+
25
+ ### Documentation
26
+
27
+ - The error table in `docs/ARCHITECTURE.md` states exactly what the model sees on a
28
+ filesystem denial: the denial marker and the escalation hint, line for line. It also
29
+ records why that makes `FS_OUTSIDE_DISTRO` worth its own code — a code the tool layer
30
+ does not decorate with those lines.
31
+
32
+
33
+ ## [0.1.9] - 2026-10-02
34
+
35
+ The last test gap from the closure review: the documented opt-out. No runtime change.
36
+
37
+ ### Added
38
+
39
+ - `npm run probe:sandbox-off` turns the sandbox off on **both** providers and asserts
40
+ what the documentation promises: `sandboxMode` disappears on each of them, a command
41
+ outside any workspace root runs, the shell result claims no sandbox, and a filesystem
42
+ write outside the workspace root is not fenced (`operation=create`). Without it the
43
+ opt-out and a backend that is merely broken would look alike from the outside — which
44
+ is what `probe:missing-wsl` covers. 5 checks.
45
+
46
+
15
47
  ## [0.1.8] - 2026-10-02
16
48
 
17
49
  A probe assertion for the one item the closure review had to record as unverifiable.
package/CONTRIBUTING.md CHANGED
@@ -71,7 +71,8 @@ terminal if you would rather not see the prompt.
71
71
  | `npm run probe:terminal` | the terminal provider | yes |
72
72
  | `npm run probe:missing-wsl` | how a `wslPath` that cannot start is reported | yes |
73
73
  | `npm run probe:picker` | the picker's root level, its refusals and its cap | yes |
74
- | `npm run probe:mode` | which POSIX-mode facts survive the share | no; Windows Node |
74
+ | `npm run probe:mode` | which POSIX-mode facts survive the share | no; Windows Node |
75
+ | `npm run probe:sandbox-off` | the documented opt-out on both providers | yes |
75
76
 
76
77
  Every script above is wired in `package.json`. `npm test` runs `lint:style`,
77
78
  `test:syntax` and `test:unit` in that order. `prepublishOnly` runs `npm test` again
@@ -150,8 +151,8 @@ On Windows 11 + WSL2 (Ubuntu 26.04) the following has been verified:
150
151
  Counts: 57 unit assertions on a bare checkout, plus 5 in `test/sandbox.test.mjs` which
151
152
  need the `dsh-sandbox` peer and skip themselves without it; 19 filesystem-probe
152
153
  assertions; 15 shell-probe checks; 9 picker checks; 6 missing-executable checks; 5 mode
153
- checks and 10 sandbox expectations plus the recorded escape; and 3 terminal
154
- assertions.
154
+ checks; 5 opt-out checks and 10 sandbox expectations plus the recorded escape; and 3
155
+ terminal assertions.
155
156
 
156
157
  ## Commit and pull request conventions
157
158
 
package/README.md CHANGED
@@ -104,6 +104,7 @@ npm run probe:terminal # open a PTY through the terminal provider
104
104
  npm run probe:missing-wsl # boot a profile whose wslPath cannot start (Windows + WSL only)
105
105
  npm run probe:picker # list the picker's root level, refusals and its cap (Windows + WSL only)
106
106
  npm run probe:mode # which POSIX-mode facts survive the share (Windows node only)
107
+ npm run probe:sandbox-off # prove sandbox: false unconfines both providers (Windows + WSL only)
107
108
  ```
108
109
 
109
110
  There is nothing to install first: the package has no dependencies, and every module under test imports only Node builtins. CI runs `npm test` on Node 20, 22 and 24, on Linux and Windows, and `npm run test:coverage` on Node 24.
@@ -189,6 +189,14 @@ to be invisible:
189
189
  | the distro is missing, stopped or unregistered | a `Wsl/Service/WSL_E_*` code on **stdout**, UTF-16 on some builds, with an empty stderr and exit 255 | `WslShellExecutor` reads the code with the NULs stripped and fails with the distro name and the remedy. Deliberately not a sandbox code: a wider permission cannot create a distro |
190
190
  | the working directory cannot be entered | a relay line on stderr, exit **0**, and the command runs in `/` | `WslShellExecutor` fails with the directory and the fallback, instead of reporting a success that acted on the wrong tree |
191
191
 
192
+
193
+ What the model actually sees on a filesystem denial is two lines the tool layer
194
+ prepends: `[sandbox: file access denied under <mode> mode]`, then
195
+ `[sandbox: escalation available — retry this exact operation once with
196
+ sandbox_permissions (the narrowest wider mode that suffices) + justification; the
197
+ approval prompt asks the user]`. A code that is not `FS_SANDBOX_DENIED` gets neither
198
+ line — which is the reason `FS_OUTSIDE_DISTRO` has its own code.
199
+
192
200
  ## The runtime mirror
193
201
 
194
202
  The checkout lives inside the distro. A DSH profile can only link a Windows path,
@@ -208,7 +216,7 @@ step with the checkout, and `npm run sync:windows` runs that script.
208
216
  | Syntax pass | [`test/syntax.mjs`](../test/syntax.mjs) | no |
209
217
  | Unit tests | `test/*.test.mjs` | no |
210
218
  | Sandbox probe | [`test/probe/sandbox.sh`](../test/probe/sandbox.sh) | no; it applies the profile arguments directly |
211
- | Harness probes | [`test/probe/run.sh`](../test/probe/run.sh), `terminal.sh`, `sandbox-shell.sh`, `picker.sh`, `missing-wsl.sh` | yes: Windows, WSL2, a mounted profile, and a linked checkout |
219
+ | Harness probes | [`test/probe/run.sh`](../test/probe/run.sh), `terminal.sh`, `sandbox-shell.sh`, `picker.sh`, `missing-wsl.sh`, `sandbox-off.sh` | yes: Windows, WSL2, a mounted profile, and a linked checkout |
212
220
  | Host probes | [`test/probe/mode.sh`](../test/probe/mode.sh) | Windows Node, no harness |
213
221
  | Probe plugins | the `*-probe.mjs` and `*-probe.yml` files in `test/probe/` | loaded by the scripts above |
214
222
 
package/docs/README.zh.md CHANGED
@@ -104,6 +104,7 @@ npm run probe:terminal # 通过终端 provider 打开一个 PTY
104
104
  npm run probe:missing-wsl # 启动一个 wslPath 无法启动的 profile(仅 Windows + WSL)
105
105
  npm run probe:picker # 列出选择器的根级、拒绝路径与上限(仅 Windows + WSL)
106
106
  npm run probe:mode # 哪些 POSIX 权限事实能穿过共享层(仅需 Windows node)
107
+ npm run probe:sandbox-off # 验证 sandbox: false 确实解除两侧约束(仅 Windows + WSL)
107
108
  ```
108
109
 
109
110
  这个包没有依赖,被测模块只 import Node 内置模块,所以不需要先安装任何东西。CI 在 Linux 和 Windows 上用 Node 20、22、24 运行 `npm test`,并在 Node 24 上运行 `npm run test:coverage`。
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-plugin-wsl-env",
3
- "version": "0.1.8",
4
- "description": "Run a DeepSeek Harness session against a WSL distro: a ctx.shell executor that runs commands inside the distro and a ctx.fs backend over its UNC share",
3
+ "version": "0.1.10",
4
+ "description": "Run a DeepSeek Harness session against a WSL distro: commands and the model's file tools run inside it, the folder picker and the GUI terminal open there, and commands are confined by bubblewrap inside the distro",
5
5
  "keywords": [
6
6
  "deepseek-harness",
7
7
  "dsh",
@@ -55,6 +55,7 @@
55
55
  "probe:missing-wsl": "bash test/probe/missing-wsl.sh",
56
56
  "probe:mode": "bash test/probe/mode.sh",
57
57
  "probe:picker": "bash test/probe/picker.sh",
58
+ "probe:sandbox-off": "bash test/probe/sandbox-off.sh",
58
59
  "probe:terminal": "bash test/probe/terminal.sh",
59
60
  "probe:sandbox": "bash test/probe/sandbox.sh",
60
61
  "probe:sandbox-shell": "bash test/probe/sandbox-shell.sh",