dsh-plugin-wsl-env 0.1.1 → 0.1.2

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,13 +12,27 @@ reference below points at that record's numbering.
12
12
 
13
13
  ## [Unreleased]
14
14
 
15
+ ## [0.1.2] - 2026-10-02
16
+
17
+ ### Fixed
18
+
19
+ - The npm package page rendered the Chinese README instead of the English one. npm
20
+ chooses a package's readme by globbing `{README,README.*}` in the package root and
21
+ taking the first `.md` match (`@npmcli/package-json/lib/normalize.js`), so two
22
+ candidate files made the choice depend on directory enumeration order. 0.1.1
23
+ shipped with `readmeFilename: README.zh.md`. The translation now lives at
24
+ `docs/README.zh.md`, which leaves exactly one candidate at the root and removes
25
+ the ambiguity by construction rather than by luck. The English header still links
26
+ to it and it still ships in the tarball through `files`. 0.1.1 remains on the
27
+ registry with the wrong readme; 0.1.2 supersedes it.
28
+
15
29
  ## [0.1.1] - 2026-10-02
16
30
 
17
31
  Documentation only: the README was reorganised for readers and translated into Chinese. No code changed.
18
32
 
19
33
  ### Added
20
34
 
21
- - A Chinese translation of the README, [README.zh.md](README.zh.md), linked from
35
+ - A Chinese translation of the README, [docs/README.zh.md](docs/README.zh.md), linked from
22
36
  the English header (and back). It is a translation, not the second README that
23
37
  was removed earlier: that file's problem was genre — it called itself the current
24
38
  description while contradicting the English one — whereas these two say the same
@@ -234,7 +248,7 @@ performance caveat, unsupported `watch()`, and the missing executable bit on
234
248
  freshly created files.
235
249
  ### Removed
236
250
 
237
- - `README.zh.md` stopped being a README: the file moved to
251
+ - `docs/README.zh.md` stopped being a README: the file moved to
238
252
  `docs/archive/engineering-record.zh.md` and left the package's `files` list, so
239
253
  npm and GitHub now render exactly one README. The reasoning is under Fixed
240
254
  below; nothing was deleted, only renamed out of the slot that made it look
@@ -264,7 +278,7 @@ freshly created files.
264
278
 
265
279
  Documentation that a reader would have acted on, and that was no longer true:
266
280
 
267
- - The repository briefly carried two READMEs. `README.zh.md` called itself the
281
+ - The repository briefly carried two READMEs. `docs/README.zh.md` called itself the
268
282
  current description of the plugin while its conclusions had been superseded
269
283
  three times over — most sharply by the sandbox work below — which is exactly
270
284
  the ambiguity a second README creates. It is now
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # dsh-plugin-wsl-env
2
2
 
3
- **English** · [中文](README.zh.md)
3
+ **English** · [中文](docs/README.zh.md)
4
4
 
5
5
  [![CI](https://github.com/Big-Dao/dsh-plugin-wsl-env/actions/workflows/ci.yml/badge.svg)](https://github.com/Big-Dao/dsh-plugin-wsl-env/actions/workflows/ci.yml)
6
6
  [![npm](https://img.shields.io/npm/v/dsh-plugin-wsl-env)](https://www.npmjs.com/package/dsh-plugin-wsl-env)
@@ -1,10 +1,10 @@
1
1
  # dsh-plugin-wsl-env
2
2
 
3
- [English](README.md) · **中文**
3
+ [English](../README.md) · **中文**
4
4
 
5
5
  [![CI](https://github.com/Big-Dao/dsh-plugin-wsl-env/actions/workflows/ci.yml/badge.svg)](https://github.com/Big-Dao/dsh-plugin-wsl-env/actions/workflows/ci.yml)
6
6
  [![npm](https://img.shields.io/npm/v/dsh-plugin-wsl-env)](https://www.npmjs.com/package/dsh-plugin-wsl-env)
7
- [![license](https://img.shields.io/npm/l/dsh-plugin-wsl-env)](LICENSE)
7
+ [![license](https://img.shields.io/npm/l/dsh-plugin-wsl-env)](../LICENSE)
8
8
 
9
9
  这个插件让 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 直接把 WSL 发行版当作工作环境使用。命令在发行版里执行,模型的文件工具读写发行版里的真实文件,打开文件夹时可以直接选择发行版目录,GUI 终端也开在发行版里,而不是开在 UNC 路径下的 `cmd.exe`。
10
10
 
@@ -41,7 +41,7 @@ dsh --profile wsl # 4. 启动
41
41
 
42
42
  然后在 GUI 里打开 `\\wsl.localhost\<发行版名>\...` 下的文件夹(选择器会在根一级列出每个发行版),或者直接点 **New terminal**。
43
43
 
44
- 这个包是一个 DSH bundle:`package.json` 里声明了 `dsh.bundle.patch`,所以第 2 步会把 [`cordis.patch.yml`](cordis.patch.yml) 作为配置层加入,不需要手工合并补丁。第 1 步用 Web 模板创建 profile,原因是这一层要覆盖几个只有 Web 界面才有的行:组合层的 `subprocess` provider、终端控制器和文件夹选择器。
44
+ 这个包是一个 DSH bundle:`package.json` 里声明了 `dsh.bundle.patch`,所以第 2 步会把 [`cordis.patch.yml`](../cordis.patch.yml) 作为配置层加入,不需要手工合并补丁。第 1 步用 Web 模板创建 profile,原因是这一层要覆盖几个只有 Web 界面才有的行:组合层的 `subprocess` provider、终端控制器和文件夹选择器。
45
45
 
46
46
  还需要在发行版里安装 **bubblewrap**(`sudo apt install bubblewrap`)。没有它时每条命令都会直接失败,原因见[沙箱](#沙箱)。
47
47
 
@@ -64,7 +64,7 @@ dsh --profile wsl # 4. 启动
64
64
 
65
65
  ## 配置
66
66
 
67
- 修改配置的方式是在自己的 profile 层里按 id 覆盖某一行。文件是 `$DSH_HOME/profiles/<名字>/cordis.patch.yml`,示例见 [`examples/profile.cordis.patch.yml`](examples/profile.cordis.patch.yml)。下表中标了 *(shipped)* 的值是 [`cordis.patch.yml`](cordis.patch.yml) 里实际设置的值,其余是 schema 的默认值,列出来是因为它们比较常用。
67
+ 修改配置的方式是在自己的 profile 层里按 id 覆盖某一行。文件是 `$DSH_HOME/profiles/<名字>/cordis.patch.yml`,示例见 [`examples/profile.cordis.patch.yml`](../examples/profile.cordis.patch.yml)。下表中标了 *(shipped)* 的值是 [`cordis.patch.yml`](../cordis.patch.yml) 里实际设置的值,其余是 schema 的默认值,列出来是因为它们比较常用。
68
68
 
69
69
  | 行 | 键 | 默认值 | 说明 |
70
70
  |---|---|---|---|
@@ -199,16 +199,16 @@ docs/archive/ 被本设计替换掉的方案,以及原因
199
199
 
200
200
  ## 设计说明
201
201
 
202
- 有两处设计从 profile YAML 里看不出来。完整推理、实测数据和所有被放弃的方案都在归档工程记录里:[docs/archive/engineering-record.zh.md](docs/archive/engineering-record.zh.md)。它是历史文档,不是第二份 README;如果它与本文冲突,以本文为准。
202
+ 有两处设计从 profile YAML 里看不出来。完整推理、实测数据和所有被放弃的方案都在归档工程记录里:[docs/archive/engineering-record.zh.md](archive/engineering-record.zh.md)。它是历史文档,不是第二份 README;如果它与本文冲突,以本文为准。
203
203
 
204
204
  **为什么终端 provider 放在组合层。** `ctx.shell` 和 `ctx.fs` 是按会话提供的,位于 `wsl` agent preset 的 isolate realm 中。因此宿主工作区继续使用官方受限的 PowerShell 环境,WSL 工作区使用发行版,两者可以在同一个进程里同时存在。
205
205
 
206
206
  终端无法这样提供。`dsh-api-terminal-controller` 通过 `agent.ctx.get("subprocess")` 查找执行环境。Agent 的 context 由 agent loop 创建在**根** realm 之下;preset 的 isolate realm 则由 `dsh-agent-preset-registry` 创建在**注册表自身的** context 之下。这两条作用域链不会相交,所以挂在 `preset-wsl` 里的 `subprocess` provider 对终端窗口不可见。
207
207
 
208
- 因此 [`cordis.patch.yml`](cordis.patch.yml) 替换的是**组合层**的 `subprocess` 行,换成一个只覆写 `spawnTerminal` 的子类。普通的 `spawn()`、Windows 侧的 ripgrep 搜索、pwsh 执行器和 LSP 宿主都仍然走官方实现。代价是终端跟着组合走,而不是跟着会话走,见[已知限制](#已知限制)。
208
+ 因此 [`cordis.patch.yml`](../cordis.patch.yml) 替换的是**组合层**的 `subprocess` 行,换成一个只覆写 `spawnTerminal` 的子类。普通的 `spawn()`、Windows 侧的 ripgrep 搜索、pwsh 执行器和 LSP 宿主都仍然走官方实现。代价是终端跟着组合走,而不是跟着会话走,见[已知限制](#已知限制)。
209
209
 
210
210
  **为什么沙箱放在 Linux 侧。** Windows ACL runner 的受限令牌完全到不了 WSL,所以约束只能在 Windows 侧构造、在发行版内执行。`lib/sandbox.js` 因此照搬 `dsh-sandbox-local` 的 Linux `bwrap` 方案,而不是去用 `ctx.sandbox`;后者 `dsh-tool-bash` 从来不用,它读的是执行器的 `sandboxMode` 和 `ctx.sandboxPolicy`,这两样都由本插件提供。
211
211
 
212
212
  ## 许可
213
213
 
214
- MIT,见 [LICENSE](LICENSE)。
214
+ MIT,见 [LICENSE](../LICENSE)。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-wsl-env",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
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",
5
5
  "keywords": [
6
6
  "deepseek-harness",
@@ -34,7 +34,7 @@
34
34
  "cordis.patch.yml",
35
35
  "examples/**/*.yml",
36
36
  "README.md",
37
- "README.zh.md",
37
+ "docs/README.zh.md",
38
38
  "CHANGELOG.md",
39
39
  "LICENSE"
40
40
  ],