dsh-plugin-wsl-env 0.25.0 → 0.26.1
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 +142 -0
- package/CODE_OF_CONDUCT.md +85 -0
- package/CODE_OF_CONDUCT.zh.md +85 -0
- package/CONTRIBUTING.md +19 -3
- package/CONTRIBUTING.zh.md +200 -0
- package/README.md +55 -149
- package/SECURITY.md +2 -0
- package/SECURITY.zh.md +108 -0
- package/SUPPORT.md +4 -2
- package/SUPPORT.zh.md +99 -0
- package/client.js +409 -8
- package/cordis.patch.yml +13 -0
- package/docs/AGENT-PROTOCOL-V7.md +2 -2
- package/docs/API.md +2 -0
- package/docs/API.zh.md +38 -0
- package/docs/ARCHITECTURE.md +15 -4
- package/docs/ARCHITECTURE.zh.md +518 -0
- package/docs/COMPATIBILITY.md +2 -0
- package/docs/COMPATIBILITY.zh.md +117 -0
- package/docs/CONFIGURATION.md +7 -10
- package/docs/CONFIGURATION.zh.md +7 -9
- package/docs/DIAGNOSTICS.md +24 -0
- package/docs/DIAGNOSTICS.zh.md +13 -0
- package/docs/LIMITATIONS.md +43 -5
- package/docs/LIMITATIONS.zh.md +34 -6
- package/docs/MIGRATION.md +10 -4
- package/docs/MIGRATION.zh.md +94 -0
- package/docs/PEER-PARITY.md +75 -47
- package/docs/PERFORMANCE.md +2 -0
- package/docs/PERFORMANCE.zh.md +59 -0
- package/docs/QUICKSTART.md +29 -15
- package/docs/QUICKSTART.zh.md +25 -17
- package/docs/README.zh.md +69 -150
- package/docs/RELEASING.md +4 -3
- package/docs/REQUIREMENTS.zh.md +4 -2
- package/docs/ROADMAP-1.0.md +2 -2
- package/docs/UPSTREAM-FILE-REFERENCE-SEAM.md +1 -1
- package/docs/UPSTREAM-OPEN-IN-APP.md +33 -11
- package/docs/UPSTREAM-SESSION-NOTICE.md +7 -0
- package/docs/VALUE.md +173 -0
- package/docs/VALUE.zh.md +42 -13
- package/docs/screenshots/with-plugin.png +0 -0
- package/docs/screenshots/with-plugin.svg +59 -0
- package/docs/screenshots/with-plugin.zh.png +0 -0
- package/docs/screenshots/with-plugin.zh.svg +56 -0
- package/docs/screenshots/without-plugin.png +0 -0
- package/docs/screenshots/without-plugin.svg +50 -0
- package/docs/screenshots/without-plugin.zh.png +0 -0
- package/docs/screenshots/without-plugin.zh.svg +45 -0
- package/lib/auto-preset-seam.d.ts +45 -0
- package/lib/auto-preset-seam.js +47 -0
- package/lib/auto-preset.d.ts +33 -10
- package/lib/auto-preset.js +148 -44
- package/lib/doctor-live.d.ts +30 -0
- package/lib/doctor-live.js +37 -0
- package/lib/doctor-report.js +10 -3
- package/lib/messages.d.ts +19 -0
- package/lib/messages.js +28 -0
- package/lib/open-in-app.d.ts +206 -0
- package/lib/open-in-app.js +300 -0
- package/lib/peer-versions.d.ts +53 -0
- package/lib/peer-versions.js +137 -0
- package/lib/preset-choice.d.ts +13 -0
- package/lib/preset-choice.js +18 -1
- package/lib/status.js +2 -1
- package/lib/update-check.d.ts +2 -2
- package/lib/update-check.js +2 -2
- package/lib/wsl-doctor-command.js +4 -2
- package/package.json +55 -25
- package/scripts/doctor.mjs +127 -9
package/docs/PEER-PARITY.md
CHANGED
|
@@ -7,25 +7,25 @@ same refusal dialect on both substrates. The **read path** holds end to end;
|
|
|
7
7
|
the **edit path** carries two declared divergences, listed at the end. This
|
|
8
8
|
file records the verification against the real peers.
|
|
9
9
|
|
|
10
|
-
- Peers: `@deepseek-ai/dsh-fs-local@0.2.2-rc.
|
|
11
|
-
devDependencies pin, and the floor the peer range `>=0.2.2-rc.
|
|
12
|
-
verified against), plus `@deepseek-ai/dsh-fs@0.2.2-rc.
|
|
10
|
+
- Peers: `@deepseek-ai/dsh-fs-local@0.2.2-rc.2` (the exact version the
|
|
11
|
+
devDependencies pin, and the floor the peer range `>=0.2.2-rc.2` was
|
|
12
|
+
verified against), plus `@deepseek-ai/dsh-fs@0.2.2-rc.2` for the
|
|
13
13
|
`FsVersion` brand the local package imports. Divergence 2 is measured
|
|
14
|
-
against a third peer, `@deepseek-ai/dsh-bash-local@0.2.2-rc.
|
|
14
|
+
against a third peer, `@deepseek-ai/dsh-bash-local@0.2.2-rc.2` — the shell
|
|
15
15
|
executor carries the collect-budget/spill machinery; `spill` and
|
|
16
16
|
`maxSpillBytes` do not appear in `dsh-fs-local` at all.
|
|
17
|
-
- The `0.2.2-rc.
|
|
18
|
-
to
|
|
19
|
-
|
|
20
|
-
Every replicated string survived verbatim;
|
|
21
|
-
to end and the **edit path** carries the same
|
|
22
|
-
at the end. The
|
|
23
|
-
|
|
17
|
+
- The `0.2.2-rc.2` move shrinks `dsh-fs-local`'s shipped `lib/index.js` from
|
|
18
|
+
1048 to 1035 lines: the local peer now routes permission/IO faults through
|
|
19
|
+
`fsErrorFromErrno` (imported from `dsh-fs`) instead of its own
|
|
20
|
+
`listingIoError`/pass-through arms. Every replicated string survived verbatim;
|
|
21
|
+
the fsio **read path** holds end to end and the **edit path** carries the same
|
|
22
|
+
two declared divergences, listed at the end. The `FS_ERROR_CODES` export with
|
|
23
|
+
`FS_PATCH_MISMATCH`/`FS_SAME_TARGET` remains. The plugin serves those
|
|
24
24
|
operations for real over protocol v7 — see the new-peer-operations section
|
|
25
|
-
at the end.
|
|
26
|
-
`dsh-bash-local@0.2.2-rc.
|
|
27
|
-
`0.2.1-rc.3`'s
|
|
28
|
-
|
|
25
|
+
at the end. The references below were re-walked on 2026-11-12.
|
|
26
|
+
`dsh-bash-local@0.2.2-rc.2`'s `lib/index.js` is byte-identical to
|
|
27
|
+
`0.2.1-rc.3`'s and to `0.2.2-rc.1`'s, so its references stand.
|
|
28
|
+
`dsh-fs@0.2.2-rc.2` still has no `./invariant` export subpath; this
|
|
29
29
|
plugin imports neither it nor `dsh-invariants`.
|
|
30
30
|
- What "not imported" means: the peer's **fsio module** is not reachable from
|
|
31
31
|
the package's exports, so `lib/fsio-text.js` reimplements it and imports
|
|
@@ -41,26 +41,27 @@ file records the verification against the real peers.
|
|
|
41
41
|
|
|
42
42
|
```sh
|
|
43
43
|
mkdir -p /tmp/peer-audit && cd /tmp/peer-audit
|
|
44
|
-
npm pack @deepseek-ai/dsh-fs-local@0.2.2-rc.
|
|
45
|
-
openssl dgst -sha512 -binary deepseek-ai-dsh-fs-local-0.2.2-rc.
|
|
46
|
-
tar xzf deepseek-ai-dsh-fs-local-0.2.2-rc.
|
|
47
|
-
wc -l package/lib/index.js # expect
|
|
44
|
+
npm pack @deepseek-ai/dsh-fs-local@0.2.2-rc.2 @deepseek-ai/dsh-fs@0.2.2-rc.2 --pack-destination .
|
|
45
|
+
openssl dgst -sha512 -binary deepseek-ai-dsh-fs-local-0.2.2-rc.2.tgz | base64 -w0
|
|
46
|
+
tar xzf deepseek-ai-dsh-fs-local-0.2.2-rc.2.tgz # -> package/lib/index.js
|
|
47
|
+
wc -l package/lib/index.js # expect 1035
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
The tarballs this audit compared, by content — the same values
|
|
51
|
-
`npm view <pkg>@0.2.2-rc.
|
|
52
|
-
the `0.2.
|
|
51
|
+
`npm view <pkg>@0.2.2-rc.2 dist.integrity` reports (re-recorded 2026-11-12;
|
|
52
|
+
the `0.2.2-rc.1` values they supersede are in git history):
|
|
53
53
|
|
|
54
54
|
```
|
|
55
|
-
@deepseek-ai/dsh-fs-local@0.2.2-rc.
|
|
56
|
-
@deepseek-ai/dsh-fs@0.2.2-rc.
|
|
55
|
+
@deepseek-ai/dsh-fs-local@0.2.2-rc.2 sha512-QjzwjFskmTXVg9fUFvs8k/1lHti4JOGnu/ABF6UWUwZjqYFwDQIkbJbi5nTuz0mE50DQup7yyv0D9STgC1eEKA==
|
|
56
|
+
@deepseek-ai/dsh-fs@0.2.2-rc.2 sha512-y3ocU0T1mZgFIAfgqAo+4l61zqvNpdsmRM0Pp2Ek8xDu6XvtIcsur3ST/iUsudtz1m/ope8t27jeEgtTefn/TQ==
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
Each row of the table below names the peer's `lib/index.js` line and the
|
|
60
60
|
literal both sides must produce. Verified 2026-10-03; the read/edit split
|
|
61
61
|
re-verified 2026-10-06; the whole table re-checked against `0.2.1-rc.2`,
|
|
62
|
-
2026-10-17, against `0.2.1-rc.3`, 2026-10-26,
|
|
63
|
-
2026-11-05 (line numbers shifted; strings
|
|
62
|
+
2026-10-17, against `0.2.1-rc.3`, 2026-10-26, against `0.2.2-rc.1`,
|
|
63
|
+
2026-11-05, and against `0.2.2-rc.2`, 2026-11-12 (line numbers shifted; strings
|
|
64
|
+
identical).
|
|
64
65
|
|
|
65
66
|
## Verdict
|
|
66
67
|
|
|
@@ -77,22 +78,22 @@ declared extensions, listed at the end.
|
|
|
77
78
|
|
|
78
79
|
| Item | Evidence (peer `lib/index.js`) | Ours |
|
|
79
80
|
|---|---|---|
|
|
80
|
-
| `normalizeLineEndings` | `:
|
|
81
|
-
| `detectLineEndings` | `:
|
|
82
|
-
| `restoreLineEndings` | `:
|
|
83
|
-
| occurrence counting | `:
|
|
84
|
-
| `applyLiteralEdit` | `:
|
|
85
|
-
| edit refusal strings | `:
|
|
86
|
-
| invalid UTF-8, read path | `:
|
|
87
|
-
| binary detection, read path | `:99`/`:
|
|
88
|
-
| size caps | `:
|
|
89
|
-
| `writeText` guards | `:
|
|
90
|
-
| `editText` guards — not-regular and stale version | `:
|
|
91
|
-
| `editText` guards — missing file | `:
|
|
92
|
-
| `listDir` refusal | `:
|
|
93
|
-
| diff-basis gate | `:
|
|
94
|
-
| outcome shapes | `:
|
|
95
|
-
| version join | `:
|
|
81
|
+
| `normalizeLineEndings` | `:614` `content.replaceAll("\r\n", "\n")` | identical |
|
|
82
|
+
| `detectLineEndings` | `:617` 4096-char sample; `crlf > lf - crlf` | identical |
|
|
83
|
+
| `restoreLineEndings` | `:630` LF unchanged; CRLF re-normalizes then `\n` → `\r\n` | identical (`replaceAll` vs `split/join` — equivalent) |
|
|
84
|
+
| occurrence counting | `:633` non-overlapping left-to-right | `split(needle).length - 1` — equivalent |
|
|
85
|
+
| `applyLiteralEdit` | `:728` empty needle, not-found, and ambiguous refusals; single-pass `split/join` without rescanning | identical |
|
|
86
|
+
| edit refusal strings | `:730`, `:733`, `:734` — `old_string must be a non-empty string` (`FS_EDIT_NOT_FOUND`); ``old_string was not found in "${displayPath}"``; ``old_string matched ${n} times in "${displayPath}"; provide a more specific old_string or set replace_all to true`` (`FS_AMBIGUOUS_EDIT`) | identical |
|
|
87
|
+
| invalid UTF-8, read path | `:331` — ``cannot ${verb} "${displayPath}": invalid UTF-8 text`` (`FS_NOT_TEXT`), verb `read` | identical (the edit path's verb differs; see 4) |
|
|
88
|
+
| binary detection, read path | `:99`/`:373` (sample const, guard), stream at `:457-459` — 8192-byte sample, NUL check; ``cannot read "${displayPath}": binary file`` (`FS_NOT_TEXT`) | identical — both accept a NUL at offset 8500, past the sample; the edit path's bound differs, see 4 |
|
|
89
|
+
| size caps | `:389`, `:400` — ``cannot read "${displayPath}": ${size} bytes exceeds the ${maxBytes}-byte limit`` and ``content exceeds the ${maxBytes}-byte limit`` (`FS_TOO_LARGE`) | identical |
|
|
90
|
+
| `writeText` guards | `:493`, `:495` — not-regular (`FS_NOT_REGULAR_FILE`), `file no longer exists` / `file changed since it was read` (`FS_STALE_VERSION`) via `writeTarget` at `:1006-1010`, ``cannot overwrite existing "${displayPath}" without reading it first`` (`FS_NOT_OBSERVED`) | identical |
|
|
91
|
+
| `editText` guards — not-regular and stale version | `:924`, `:925` — ``cannot edit "${displayPath}": not a regular file`` (`FS_NOT_REGULAR_FILE`); `file changed since it was read` (`FS_STALE_VERSION`) when the expected version differs (`requireFile` at `:1015-1019`) | identical |
|
|
92
|
+
| `editText` guards — missing file | `:924` — one refusal for every caller: `file changed since it was read` (`FS_STALE_VERSION`), with or without an expected version | **diverges by design** — we split on the caller's evidence: with an expected version `file no longer exists` (`FS_STALE_VERSION`), without one `file does not exist` (`FS_NOT_FOUND`). See 5 |
|
|
93
|
+
| `listDir` refusal | `:298` — ``cannot list "${displayPath}": not a directory`` (`FS_NOT_DIRECTORY`) | identical |
|
|
94
|
+
| diff-basis gate | `:907` — `existing !== null && Buffer.byteLength(content) < diffBasisMaxBytes` — keyed on the NEW content's size, `null` above the cap (the move path inherits the same keying at `:966`/`:979`) | identical — the gate's new-size keying is inherited by design, not a divergence |
|
|
95
|
+
| outcome shapes | `:914`, `:979` — `operation: "update" \| "create"`, the `missing:${targetKey}` sentinel version (`:1031`), `before`/`after` | identical |
|
|
96
|
+
| version join | `:146` — `` `${info.dev}:${info.ino}:${info.size}:${info.mtimeNs}:${info.ctimeNs}` `` (branded by `dsh-fs`'s `FsVersion`) | `versionOf` — identical shape |
|
|
96
97
|
|
|
97
98
|
## Deliberate divergences (declared, not drift)
|
|
98
99
|
|
|
@@ -103,7 +104,7 @@ declared extensions, listed at the end.
|
|
|
103
104
|
2. **Per-stream truncation flags.** The EXEC frame carries an output budget;
|
|
104
105
|
the RES line reports which streams the agent cut, surfaced as honest
|
|
105
106
|
`truncated` flags. The collect-budget/spill machinery of the shell peer,
|
|
106
|
-
`@deepseek-ai/dsh-bash-local@0.2.2-rc.
|
|
107
|
+
`@deepseek-ai/dsh-bash-local@0.2.2-rc.2` (`lib/index.js:30`, `:110`), is the
|
|
107
108
|
spill-file path we deliberately do not run.
|
|
108
109
|
3. **The transport around the ops** (ACK, KILL, the confined resident) is
|
|
109
110
|
protocol this package owns; the peer has no agent.
|
|
@@ -112,10 +113,10 @@ declared extensions, listed at the end.
|
|
|
112
113
|
dialect, but a divergence all the same, so it is declared: an edit refused
|
|
113
114
|
for its bytes reads ``cannot read "…": binary file`` or
|
|
114
115
|
``cannot read "…": invalid UTF-8 text`` — verb `read`, where the peer's
|
|
115
|
-
`readForEdit` (`lib/index.js:
|
|
116
|
+
`readForEdit` (`lib/index.js:651`) says ``cannot edit "…": …``. The NUL
|
|
116
117
|
check is likewise the read path's 8192-byte sample
|
|
117
118
|
(`src/fsio-agent.ts:377-384`, guard at `:380`), where the peer scans the
|
|
118
|
-
whole buffer (`lib/index.js:
|
|
119
|
+
whole buffer (`lib/index.js:655`): a file whose first 8192 bytes are clean
|
|
119
120
|
but that carries a NUL later is edited by us and refused by the peer.
|
|
120
121
|
Measured on a 9000-byte fixture with a NUL at offset 8500 — ours `EDITED`,
|
|
121
122
|
the peer `FS_NOT_TEXT: cannot edit "…"`.
|
|
@@ -125,7 +126,7 @@ declared extensions, listed at the end.
|
|
|
125
126
|
behind it names a file that never answered the stat, so it takes the read
|
|
126
127
|
path's missing-file dialect (`cannot edit "…": file does not exist`,
|
|
127
128
|
`FS_NOT_FOUND`). The peer throws `file changed since it was read`
|
|
128
|
-
(`FS_STALE_VERSION`, `lib/index.js:
|
|
129
|
+
(`FS_STALE_VERSION`, `lib/index.js:924` via `requireFile` at `:1015`) for
|
|
129
130
|
both. Pinned by `test/fs-substrate.test.mjs`.
|
|
130
131
|
6. **Publication durability (shell agent, 2026-11-06).** After the publish
|
|
131
132
|
rename, the shell agent fsyncs the destination's containing directory
|
|
@@ -146,9 +147,20 @@ declared extensions, listed at the end.
|
|
|
146
147
|
always sends numerics, so this is drift-hardening at the trust boundary,
|
|
147
148
|
not a behavioral change for any caller.
|
|
148
149
|
|
|
149
|
-
|
|
150
|
+
8. **Permission classification on the distro path.** The rc.2 local peer routes
|
|
151
|
+
`EACCES`/`EPERM` through `fsErrorFromErrno` to `FS_PERMISSION_DENIED` with
|
|
152
|
+
``cannot <op> "<path>": permission denied``. The WSL agent keeps ordinary
|
|
153
|
+
permission refusals at `FS_IO_ERROR` with the agent's stderr text; only the
|
|
154
|
+
sandbox's read-only-bind denial is classified as `FS_SANDBOX_DENIED`. This is
|
|
155
|
+
pinned by `test/fsio-agent.test.mjs` ("a write refused on ordinary
|
|
156
|
+
permissions keeps its I/O classification"). A consumer that switches between
|
|
157
|
+
the host and distro backends will see both the code and the text differ for a
|
|
158
|
+
plain permission refusal: the distro path carries the agent's stderr text,
|
|
159
|
+
not the peer's `cannot <op> "<path>": …` shape.
|
|
150
160
|
|
|
151
|
-
|
|
161
|
+
## The peer's 0.2.2 operations: implemented over protocol v7
|
|
162
|
+
|
|
163
|
+
The `0.2.2` line added three operations to the peer's `FileSystem` base —
|
|
152
164
|
`patchText` (hunks via `@deepseek-ai/dsh-fs-patch`, refusal
|
|
153
165
|
`FS_PATCH_MISMATCH`), `deleteFile`, and `moveFile` (same-target refusal
|
|
154
166
|
`FS_SAME_TARGET`). 0.18.0 shipped them as an honest refusal (an inherited
|
|
@@ -180,6 +192,22 @@ and `test/agent-protocol.test.mjs` (HELLO caps, FSERR, FSB encoding).
|
|
|
180
192
|
Divergence 4's binary/UTF-8 dialect note now also covers the patch path, which
|
|
181
193
|
re-reads through `readForEdit`.
|
|
182
194
|
|
|
195
|
+
## The check that reports this set
|
|
196
|
+
|
|
197
|
+
`peers.versions` names the versions the plugin is loaded against, which is not
|
|
198
|
+
always what a native lookup beside the runtime mirror finds. The host's profile
|
|
199
|
+
resolution projects this package's declared peers onto the installation's single
|
|
200
|
+
copies (a linked plugin's own `node_modules` is the input, not the answer), and
|
|
201
|
+
the in-app doctor spawners pass that resolved map to the CLI in
|
|
202
|
+
`DSH_WSL_DOCTOR_PEERS`; the variable's presence is authoritative even when the
|
|
203
|
+
map is partial or empty, so a peer the host could not resolve is unchecked
|
|
204
|
+
rather than looked up beside the mirror. The standalone CLI has no projection,
|
|
205
|
+
so it counts only a copy at the plugin's own peer position and reports every
|
|
206
|
+
other peer as unchecked instead of failing it — a stale `node_modules` above the
|
|
207
|
+
mirror (the previous harness installation's tree, for example) is not this
|
|
208
|
+
plugin's peer set. The versions above remain the ones the
|
|
209
|
+
standalone `pnpm run doctor` reports from this checkout's pinned dev set.
|
|
210
|
+
|
|
183
211
|
## Maintenance
|
|
184
212
|
|
|
185
213
|
When a peer floor or dev pin moves in `package.json`, re-run the comparison
|
package/docs/PERFORMANCE.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Performance: ext4 agent vs the 9p share
|
|
2
2
|
|
|
3
|
+
[中文](PERFORMANCE.zh.md)
|
|
4
|
+
|
|
3
5
|
The plugin's reason to exist is not only correctness: a WSL workspace served
|
|
4
6
|
through the Windows 9p share is measurably slower than the same files read on
|
|
5
7
|
the distro's ext4 through the resident agent. This page records the measurements
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# 性能:ext4 agent 对比 9p 共享
|
|
2
|
+
|
|
3
|
+
[English](PERFORMANCE.md)
|
|
4
|
+
|
|
5
|
+
本插件存在的理由不只是正确性:通过 Windows 9p 共享提供的 WSL 工作区,
|
|
6
|
+
明显慢于经常驻 agent 在发行版 ext4 上读取同样的文件。本页记录测量结果及
|
|
7
|
+
复现方法;不对测量范围之外做推断。
|
|
8
|
+
|
|
9
|
+
## 两种 substrate
|
|
10
|
+
|
|
11
|
+
| | 9p 共享(`\\wsl.localhost\...`) | 本插件 |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| 文件 I/O | 宿主栈每次操作都跨越 VM 边界 | 常驻 agent 在发行版内、目标的后备文件系统上提供读写 |
|
|
14
|
+
| 变更通知 | 轮询该共享 | 可用时对无界目录使用 inotify,否则轮询 |
|
|
15
|
+
| 命令 | 宿主进程 | 经 `wsl.exe` 的发行版登录 shell |
|
|
16
|
+
|
|
17
|
+
插件的根文件系统将每条 WSL 路径路由到发行版后端(`fs-routing`),因此
|
|
18
|
+
GUI 文件树、预览和模型的文件工具都走 agent 路径。设计与权衡见
|
|
19
|
+
[root-fs-routing.md](root-fs-routing.md);已知限制见
|
|
20
|
+
[LIMITATIONS.zh.md](LIMITATIONS.zh.md)。
|
|
21
|
+
|
|
22
|
+
## 测量数字
|
|
23
|
+
|
|
24
|
+
机器:Windows 11 + WSL 2,Ubuntu,x86_64,即本项目的开发机。绝对数字
|
|
25
|
+
取决于机器;比例和预算才是重点。
|
|
26
|
+
|
|
27
|
+
| 场景 | 9p 共享 | Agent(ext4) | 来源 |
|
|
28
|
+
|---|---|---|---|
|
|
29
|
+
| 16 个并发共享读取,shell agent 对比 native agent | — | shell:342–614 ms(排队最高 583 ms);native:A7 之后 **2.4–4.1 ms**,首次启动约 70 ms(仅一次) | [ADR 0002 fs 队列](adr/0002-native-agent.md#fs-queue-measurement-a6-2026-10-18) |
|
|
30
|
+
| 单次 FS 操作(宿主往返) | — | p95 ≈ 22 ms | [ROADMAP-1.0.md](ROADMAP-1.0.md#7-metrics) |
|
|
31
|
+
| GUI 预览后端:`stat` | — | p95 **2.7 ms** | `pnpm run probe:gui-preview`(20 次迭代,2026-10-19) |
|
|
32
|
+
| GUI 预览后端:目录列举 | — | p95 **5.1 ms** | 同上 |
|
|
33
|
+
| GUI 预览后端:1 MiB 页面 | — | p95 **63.5 ms/MiB** | 同上 |
|
|
34
|
+
|
|
35
|
+
GUI 预览数字覆盖一次预览所支付的、经路由的后端操作。随包的
|
|
36
|
+
`workspace-files` 服务会在其上追加自己的调用;该服务的形态在
|
|
37
|
+
[LIMITATIONS.zh.md](LIMITATIONS.zh.md) 中保持定性描述。1 s/MiB 预算余量
|
|
38
|
+
很大,因此这些测量并不构成进一步优化(被推迟的 v6 FS 并发)的理由。
|
|
39
|
+
|
|
40
|
+
## 复现
|
|
41
|
+
|
|
42
|
+
在发行版内,使用该 checkout:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pnpm run probe:gui-preview # stat / listDir / 1 MiB page read, p50/p95
|
|
46
|
+
node test/probe/fs-queue.mjs # the agent queue, sequential vs concurrent, with per-op latency
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
两者都需要 WSL 互操作、可用的发行版和 Node;都不启动 harness。队列测量还
|
|
50
|
+
需要 systemd 和可用的原生二进制;它打印实际耗时和队列指标,但不强制延迟
|
|
51
|
+
预算。GUI 预览探针报告 p50/p95/max,并在超出预算时失败。
|
|
52
|
+
|
|
53
|
+
## 未测量的内容
|
|
54
|
+
|
|
55
|
+
- 端到端 GUI 绘制时间(浏览器和服务自身的工作不在这些探针范围内)。
|
|
56
|
+
- 大文件或大量小文件的 9p 数字;A6 比较的是 shell 与 native agent,而不是
|
|
57
|
+
Windows 侧的 9p 共享。
|
|
58
|
+
- 物理 aarch64 硬件上的 WSL 延迟(原生 18 项检查套件在 CI 中于 qemu 下
|
|
59
|
+
运行;那是功能正确性,不是宿主往返测量)。
|
package/docs/QUICKSTART.md
CHANGED
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
# Quickstart
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[中文](QUICKSTART.zh.md)
|
|
4
4
|
|
|
5
5
|
Steps from a Windows + WSL 2 machine to a working WSL session.
|
|
6
6
|
This page is the entry point; every claim links to the document that owns it.
|
|
7
7
|
|
|
8
8
|
## 0. Do you need this plugin?
|
|
9
9
|
|
|
10
|
-
If the harness can run inside the distro, installing the CLI there
|
|
11
|
-
|
|
12
|
-
[README's decision table](../README.md#do-i-need-this-plugin) has the cases
|
|
10
|
+
If the harness can run inside the distro, installing the CLI there and
|
|
11
|
+
skipping this plugin is simpler — the
|
|
12
|
+
[README's decision table](../README.md#do-i-need-this-plugin) has the cases:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
# inside the distro; the CLI needs Node >= 24.9
|
|
16
|
+
npm install -g @deepseek-ai/dsh
|
|
17
|
+
dsh web # browser UI, reached through WSL's localhost forwarding
|
|
18
|
+
dsh headless "run the tests" # one task, one answer, exit
|
|
19
|
+
```
|
|
20
|
+
|
|
13
21
|
The rest of this page assumes the desktop app stays on Windows and this plugin
|
|
14
22
|
supplies the WSL environment.
|
|
15
23
|
|
|
@@ -59,25 +67,23 @@ The desktop app has no `dsh` command; open **Plugins** in the sidebar, choose
|
|
|
59
67
|
**Add plugin**, and enter the exact package name `dsh-plugin-wsl-env`. That
|
|
60
68
|
writes the profile's `package.json` and its `dsh.profile.bundles` entry.
|
|
61
69
|
|
|
62
|
-
With the CLI distribution (`dsh` on `PATH`), from Windows PowerShell:
|
|
63
|
-
|
|
64
|
-
```powershell
|
|
65
|
-
dsh plugin --profile <profile> add dsh-plugin-wsl-env
|
|
66
|
-
# if it resolves to a stale version (same-day registry metadata cache), pin it:
|
|
67
|
-
# dsh plugin --profile <profile> add dsh-plugin-wsl-env@<latest>
|
|
68
|
-
dsh --profile <profile> --dump-config # the plugin rows must be there
|
|
69
|
-
```
|
|
70
|
-
|
|
71
70
|
For a profile that already overrides the preset, keep the override as the full
|
|
72
71
|
`preset-wsl` block — `pnpm run preset --check <patch>` fails loudly when a layer
|
|
73
72
|
targets `wsl-shell`/`wsl-fs` by id.
|
|
74
73
|
|
|
74
|
+
The plugin never edits the installed `resources/app.asar`: an app upgrade
|
|
75
|
+
cannot drop the bridge, and a plugin update only needs a reinstall and restart.
|
|
76
|
+
Upgrade = install again on the Plugins page, then restart (the harness has no
|
|
77
|
+
hot reload); uninstall happens on the same page, after which `~/.cache/dsh-wsl`
|
|
78
|
+
can be deleted. If you added a local `workspace-files-wsl` workaround to your
|
|
79
|
+
profile to restore previews, remove it after upgrading: the plugin no longer
|
|
80
|
+
mounts that row.
|
|
81
|
+
|
|
75
82
|
## 3. Open a WSL workspace
|
|
76
83
|
|
|
77
84
|
Start the desktop app the way its Start-menu shortcut does: `DeepSeek Harness.exe`,
|
|
78
85
|
no arguments — it opens the profile the app is configured with (the Plugins page
|
|
79
|
-
writes into that one).
|
|
80
|
-
profile of that name.)
|
|
86
|
+
writes into that one).
|
|
81
87
|
|
|
82
88
|
In the GUI, open a folder through the picker (`\\wsl.localhost\<distro>\home\<you>\proj`)
|
|
83
89
|
or an UNC path directly. The session's commands, file tools, terminal and previews
|
|
@@ -101,6 +107,9 @@ WSL** (the default — commands, files and the terminal all run in the distro) o
|
|
|
101
107
|
**Windows access** (the folder as an ordinary Windows share over 9p, without the
|
|
102
108
|
Linux toolchain). The choice is recorded in the `auto-preset` row's
|
|
103
109
|
`windowsWorkspaces` and applies to later sessions in that workspace too.
|
|
110
|
+
A Windows-access directory is called out in the session itself: a distro workspace
|
|
111
|
+
running a non-WSL preset keeps a warning above the composer, with a one-click switch
|
|
112
|
+
while the session is still blank and the access-record fix once a turn has started.
|
|
104
113
|
Two distros can be open at once, each with its own environment.
|
|
105
114
|
|
|
106
115
|
### Open the workspace in VS Code (Remote-WSL)
|
|
@@ -120,6 +129,11 @@ code --folder-uri "vscode-remote://wsl+ubuntu/home/me/proj"
|
|
|
120
129
|
Requires the `code` shim on PATH (VS Code installer adds it) and the
|
|
121
130
|
Remote-WSL extension.
|
|
122
131
|
|
|
132
|
+
In the desktop GUI, the Session header menu also carries
|
|
133
|
+
**在 VS Code 中打开(WSL)**: it converts the Session workspace to the same URI
|
|
134
|
+
and launches the editor with a cleaned environment, so it does not depend on a
|
|
135
|
+
patched `app.asar`.
|
|
136
|
+
|
|
123
137
|

|
|
124
138
|
|
|
125
139
|
The terminal panel runs in the same distro — `uname -a` answers with the
|
package/docs/QUICKSTART.zh.md
CHANGED
|
@@ -1,16 +1,23 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 快速开始
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[English](QUICKSTART.md)
|
|
4
4
|
|
|
5
5
|
从一台 Windows + WSL 2 机器到可用的 WSL 会话,只需以下步骤。
|
|
6
6
|
本页是入口;每条说明都链接到负责该主题的文档。
|
|
7
7
|
|
|
8
8
|
## 0. 需要这个插件吗?
|
|
9
9
|
|
|
10
|
-
如果 harness 可以整个跑在发行版里,把 CLI
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
如果 harness 可以整个跑在发行版里,把 CLI 装进去并跳过本插件会更简单——
|
|
11
|
+
判断表见 [README](README.zh.md#需要这个插件吗):
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# 在发行版内执行;CLI 要求 Node >= 24.9
|
|
15
|
+
npm install -g @deepseek-ai/dsh
|
|
16
|
+
dsh web # 浏览器界面,经 WSL 的 localhost 转发访问
|
|
17
|
+
dsh headless "run the tests" # 单任务、输出答案后退出
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
本页其余部分假定桌面应用留在 Windows,由本插件提供 WSL 环境。
|
|
14
21
|
|
|
15
22
|
## 1. 前置条件
|
|
16
23
|
|
|
@@ -51,24 +58,19 @@ agent 缓存,两者都会复检;以及确认后的 Windows git 信任)或
|
|
|
51
58
|
`dsh-plugin-wsl-env` 安装。这一步写入该 profile 的 `package.json` 与
|
|
52
59
|
`dsh.profile.bundles`。
|
|
53
60
|
|
|
54
|
-
使用 CLI 发行版(`dsh` 在 `PATH` 上)时,在 Windows PowerShell 中:
|
|
55
|
-
|
|
56
|
-
```powershell
|
|
57
|
-
dsh plugin --profile <profile> add dsh-plugin-wsl-env
|
|
58
|
-
# 若解析到旧版本(发布当天的元数据缓存),显式指定:
|
|
59
|
-
# dsh plugin --profile <profile> add dsh-plugin-wsl-env@<latest>
|
|
60
|
-
dsh --profile <profile> --dump-config # 输出中必须包含插件的行
|
|
61
|
-
```
|
|
62
|
-
|
|
63
61
|
如果 profile 已覆盖 preset,请保持覆盖为完整的
|
|
64
62
|
`preset-wsl` 块——当某个层直接按 id 指向 `wsl-shell`/`wsl-fs` 时,
|
|
65
63
|
`pnpm run preset --check <patch>` 会明确报错。
|
|
66
64
|
|
|
65
|
+
插件不修改已安装的 `resources/app.asar`:应用升级不受影响,插件升级只需重新
|
|
66
|
+
安装并重启。升级 = 在 Plugins 页重新安装后重启(harness 无热重载);卸载也在
|
|
67
|
+
Plugins 页,之后可删 `~/.cache/dsh-wsl`。曾为恢复预览加过 `workspace-files-wsl`
|
|
68
|
+
临时覆盖的,升级后删除:插件不再挂载该行。
|
|
69
|
+
|
|
67
70
|
## 3. 打开 WSL 工作区
|
|
68
71
|
|
|
69
72
|
启动桌面应用的方式与它安装的快捷方式一致:`DeepSeek Harness.exe`,不带参数——
|
|
70
|
-
它打开的是应用自己配置的 profile(也就是 Plugins
|
|
71
|
-
发行版:`dsh --profile <名字>` 启动指定名字的 profile。)
|
|
73
|
+
它打开的是应用自己配置的 profile(也就是 Plugins 页面写入的那个)。
|
|
72
74
|
|
|
73
75
|
在 GUI 中,通过选择器打开文件夹(`\\wsl.localhost\<distro>\home\<you>\proj`),
|
|
74
76
|
或直接打开 UNC 路径。会话的命令、文件工具、终端和预览
|
|
@@ -86,6 +88,8 @@ scope 或损坏的 agent 缓存)时标为 **修复**,否则标为 **完整
|
|
|
86
88
|
文件与终端都在发行版内)或 **Windows 访问**(把该文件夹当作普通 Windows 共享,经 9p
|
|
87
89
|
读写,没有 Linux 工具链)。选择记录在 `auto-preset` 行的 `windowsWorkspaces` 里,
|
|
88
90
|
对该工作区之后新建的会话同样生效。
|
|
91
|
+
Windows 访问目录也会在会话内被点明:运行非 WSL preset 的发行版工作区在输入框上方
|
|
92
|
+
常驻一条警示;会话尚未开始时一键切换,已开始后修正访问记录。
|
|
89
93
|
|
|
90
94
|
### 在 VS Code 中打开工作区(Remote-WSL)
|
|
91
95
|
|
|
@@ -104,6 +108,10 @@ code --folder-uri "vscode-remote://wsl+ubuntu/home/me/proj"
|
|
|
104
108
|
要求 PATH 上有 `code` shim(VS Code 安装器会添加),以及
|
|
105
109
|
Remote-WSL 扩展。
|
|
106
110
|
|
|
111
|
+
桌面 GUI 的会话头部菜单还提供 **在 VS Code 中打开(WSL)**:它把会话工作区
|
|
112
|
+
转换成同一个 URI,并在清理过的环境里启动编辑器,因此不依赖打过补丁的
|
|
113
|
+
`app.asar`。
|
|
114
|
+
|
|
107
115
|

|
|
108
116
|
|
|
109
117
|
终端面板运行在同一个发行版中——`uname -a` 返回的是
|