dsh-wsl-tool 1.10.10 → 1.10.12

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/PUBLISHING.md CHANGED
@@ -117,6 +117,22 @@ both that the entry stays relative and that it resolves.
117
117
  artifact, not just the metadata. Scripted requests to `npmjs.com`'s HTML hit a
118
118
  Cloudflare challenge; the registry API is the source of truth.
119
119
 
120
+ Two things make a published release look unpublished, so rule them out before
121
+ believing a negative:
122
+
123
+ - **A green run is not proof that npm was published.** The `Publish to npm`
124
+ step exits 0 with a warning when `NPM_TOKEN` is absent, so the run stays
125
+ green while npm is skipped. Ask the jobs API whether the step really ran —
126
+ a real run has `started_at`; a skipped one has `conclusion: skipped` and no
127
+ timestamp — and ask the registry what actually handles the version
128
+ (`time[<version>]` on the packument).
129
+
130
+ - **A failing `npm whoami` says nothing about the release.** A stale token in
131
+ `~/.npmrc` only means that machine cannot publish by hand; CI has its own
132
+ credential. Release state lives in the three artifacts — the tag's commit,
133
+ the release asset, and the registry tarball — so compare their bytes rather
134
+ than your credentials.
135
+
120
136
  Expect the registry's caches to lag a publish by minutes, and to lag
121
137
  *inconsistently*: the full packument, the abbreviated (install) packument,
122
138
  `/-/package/<name>/dist-tags` and the tarball URL each cache separately, so one
package/README.md CHANGED
@@ -119,9 +119,26 @@ specifier you install under.
119
119
 
120
120
  3. Restart DSH.
121
121
 
122
+ The settings panel is the one optional piece: its form needs
123
+ `@deepseek-ai/schemastery`, which most profiles already have (any plugin that
124
+ depends on it brings it in — add it to the profile's dependencies if yours does
125
+ not). Without it, the three tools and the panel's 「WSL 终端启动路径」 field work
126
+ as usual and only the switches are absent — the panel says so instead of waiting
127
+ forever.
128
+
122
129
  ## Compatibility
123
130
 
124
- Verified against DSH **0.1.7-rc.2** (and 0.1.5-rc.2 before it): the tool schemas
131
+ The manifest declares the DSH it needs — `"engines": { "dsh": ">=0.1.7-rc.2" }` —
132
+ which is the floor this section documents. The plugin market reads that
133
+ declaration from the published manifest and shows it as a requirement on the
134
+ entry (`DSH >=0.1.7-rc.2`), warning before an install or update onto an older
135
+ host; DSH itself ignores `engines`, so the declaration is advice, not a gate.
136
+ The `-rc.2` is load-bearing: `>=0.1.7` alone excludes the `0.1.7-rc.2` release
137
+ this line was verified on, and the market would then report the plugin as
138
+ incompatible with its own verified host.
139
+
140
+ Verified against DSH **0.1.7-rc.2** (earlier releases of this plugin were verified
141
+ on 0.1.5-rc.2): the tool schemas
125
142
  pass DSH's own `assertSupportedJsonSchema`, the subprocess seam is exercised
126
143
  against the real provider rather than a shim, and the background-job path is
127
144
  checked against the real job registry, including the session-id ownership fence
@@ -149,7 +166,9 @@ explanation.
149
166
  | `wsl-env` 能力体检 | registers the `wsl-env` tool |
150
167
  | 后台任务 | whether `wsl` accepts `runInBackground` |
151
168
  | 自动转换路径 | the default for the per-call `translatePaths` |
152
- | 默认跟随会话工作区 | start in the session's directory instead of `~` when `workdir` is omitted |
169
+ | 默认跟随会话工作区 | start in the session's directory instead of `~` when `workdir` is omitted. **On by default**: with it off, every relative path an agent writes lands in the Linux home, which is invisible from Explorer and grows the WSL disk image |
170
+ | Linux 默认工作目录 | a fixed Linux directory (for example `/mnt/d/project`) used when `workdir` is omitted. Filling it in wins over the switch above; clearing it goes back to following the session |
171
+ | WSL 终端启动路径 | the optional sidebar terminal's startup directory — `--cd <dir>` on the `terminal-controller` row of your **profile patch** (see [Optional: a WSL terminal in the sidebar](#optional-a-wsl-terminal-in-the-sidebar)). Empty clears it, and the panel reads the current value from the same file |
153
172
  | 危险命令守卫 | whether a destructive command needs an explicit `allowDangerous` |
154
173
 
155
174
  The panel edits the plugin's own configuration, so the same values can be written
@@ -159,6 +178,11 @@ environment, then the built-in defaults** — and a switch left at its default l
159
178
  the layer below decide, which is why `DSH_WSL_WORKDIR=session` keeps working for
160
179
  someone who never opened the panel.
161
180
 
181
+ 「WSL 终端启动路径」 is the one exception: the sidebar terminal belongs to another
182
+ plugin, so that field edits your profile's patch layer instead — the file is backed
183
+ up before every write, only the terminal row's `args` line is rewritten, and the
184
+ result is read back and undone if it is not exactly that one line.
185
+
162
186
  **A change takes effect at the next DSH start**: the host reads this configuration
163
187
  once per mount, and the panel says so. Distro and timeout are values rather than
164
188
  features — set them in the patch or with `DSH_WSL_DISTRO` / `DSH_WSL_TIMEOUT_MS`,
@@ -188,6 +212,14 @@ To turn it on, copy that entry into your profile's own patch layer
188
212
  (`$DSH_HOME/profiles/<profile>/cordis.patch.yml`); a CLI launch can instead pass
189
213
  `--patch <path to the installed file>`. It applies at the next app start.
190
214
 
215
+ The panel can set the startup directory for you: 「WSL 终端启动路径」 (beside 「默认
216
+ Linux 工作目录」) reads the current value out of that file and writes `--cd <dir>` onto
217
+ the row's `args` line — backing the patch up first, changing only that one line, and
218
+ checking what landed before it is kept. Clearing the field removes the flag, which puts
219
+ the terminal back on the session workspace (the Windows directory it is started from,
220
+ translated to `/mnt/…`); `~` pins it to the Linux home. It takes effect at the next app
221
+ start too.
222
+
191
223
  ```yaml
192
224
  - id: terminal-controller
193
225
  config:
package/README.zh-CN.md CHANGED
@@ -103,9 +103,19 @@ launcher: WSL 版本: 2.6.3.0 · 内核版本: 6.6.87.2-1 · WSLg 版本: 1.0.71
103
103
 
104
104
  3. 重启 DSH。
105
105
 
106
+ 设置面板是唯一可选的一块:它的表单需要 `@deepseek-ai/schemastery`,多数 profile 已经有了
107
+ (只要装过任何依赖它的插件;没有的话把它加进 profile 的依赖即可)。没有它时,三个工具与
108
+ 面板里的「WSL 终端启动路径」照常可用,只是开关不显示 —— 面板会直接说明这一点,不会一直转圈等待。
109
+
106
110
  ## 兼容性
107
111
 
108
- 已在 DSH **0.1.7-rc.2** 上验证(此前为 0.1.5-rc.2):工具 schema 通过 DSH 自己的
112
+ 清单里声明了它需要的 DSH —— `"engines": { "dsh": ">=0.1.7-rc.2" }`,也就是本节记录的
113
+ 下限。插件市场会从已发布的清单读取这条声明,在条目上标成要求(`DSH >=0.1.7-rc.2`),并在
114
+ 装到更老的宿主上之前给出提醒;DSH 自身不读 `engines`,所以它是提示而不是门禁。那个
115
+ `-rc.2` 不能省:只写 `>=0.1.7` 会把本条验证过的 `0.1.7-rc.2` 排除掉,市场于是会把插件
116
+ 判成与它自己验证过的宿主不兼容。
117
+
118
+ 已在 DSH **0.1.7-rc.2** 上验证(本插件的更早版本曾在 0.1.5-rc.2 上验证):工具 schema 通过 DSH 自己的
109
119
  `assertSupportedJsonSchema`;subprocess 接缝是跑在**真实 provider** 上而非替身;后台任务
110
120
  路径跑在**真实 job 注册表**上,包含 0.1.7 收紧的「会话 id 属主围栏」。这套检查就是
111
121
  `test/real-seam.mjs`,约一分钟即可重验一个新宿主——升级后把它指向新的 DSH 安装即可:
@@ -130,13 +140,19 @@ DSH_SUBPROCESS_LOCAL=/path/to/dsh/node_modules npm run test:real
130
140
  | `wsl-env` 能力体检 | 是否注册 `wsl-env` 工具 |
131
141
  | 后台任务 | `wsl` 是否接受 `runInBackground` |
132
142
  | 自动转换路径 | 每次调用的 `translatePaths` 默认值 |
133
- | 默认跟随会话工作区 | 未传 `workdir` 时从会话目录开始,而不是 `~` |
143
+ | 默认跟随会话工作区 | 未传 `workdir` 时从会话目录开始,而不是 `~`。**默认开**:关掉的话,agent 写的相对路径都会落进 Linux 家目录 —— 那儿在资源管理器里看不见,还会撑大 WSL 磁盘镜像 |
144
+ | Linux 默认工作目录 | 未传 `workdir` 时使用的固定 Linux 目录(如 `/mnt/d/project`)。填了就优先于上面的开关;清空则回到跟随会话 |
145
+ | WSL 终端启动路径 | 可选的侧边栏终端从哪个目录启动 —— 写进你 **profile patch** 里 `terminal-controller` 那一行的 `--cd <目录>`(见[可选:在侧边栏开一个 WSL 终端](#可选在侧边栏开一个-wsl-终端))。留空则删掉该参数;当前值也是从这个文件读的 |
134
146
  | 危险命令守卫 | 危险命令是否必须显式 `allowDangerous` |
135
147
 
136
148
  面板改的是插件自己的配置,所以同样的值也可以手写进 profile patch(`- id: tool-wsl` 加 `config:`)
137
149
  或用环境变量设。优先级由 `lib/config.js` 定:**插件配置 > 环境变量 > 内置默认值**;开关停在默认值时
138
150
  下层说了算 —— 这正是"从没打开过面板的人,`DSH_WSL_WORKDIR=session` 依然生效"的原因。
139
151
 
152
+ 「WSL 终端启动路径」是唯一的例外:侧边栏终端属于另一个插件,所以那个输入框改的是你 profile 的
153
+ patch 层 —— 每次写入前先备份该文件,只重写终端那一行的 `args`,写后还会读回来核对,只要不是"只改了
154
+ 这一行"就当场还原。
155
+
140
156
  **改动在下次启动 DSH 后生效**:宿主每次挂载只读一次该配置,面板里也写着这句。发行版与超时属于"值"
141
157
  而不是"功能":在 patch 里或用 `DSH_WSL_DISTRO` / `DSH_WSL_TIMEOUT_MS` 设置,面板只显示当前生效值。
142
158
 
@@ -158,6 +174,11 @@ DSH_SUBPROCESS_LOCAL=/path/to/dsh/node_modules npm run test:real
158
174
  (`$DSH_HOME/profiles/<profile>/cordis.patch.yml`);命令行启动也可以改成
159
175
  `--patch <已安装文件路径>`。**下次启动应用时生效。**
160
176
 
177
+ 这个启动目录也能在面板里设:顶部的「WSL 终端启动路径」(挨着「默认 Linux 工作目录」)会从那个
178
+ 文件读出当前值,再把 `--cd <目录>` 写到该行 `args` 上 —— 写前先备份 patch 文件,只改这一行,
179
+ 写后读回来核对。**清空**则删掉该参数,终端回到跟随会话工作区(启动时的 Windows 目录会被翻译成
180
+ `/mnt/…`);填 `~` 固定到 Linux 家目录。改完同样**重启 DSH 生效**。
181
+
161
182
  ```yaml
162
183
  - id: terminal-controller
163
184
  config:
package/SUPPORT.md ADDED
@@ -0,0 +1,36 @@
1
+ # 支持与反馈 / Support and feedback
2
+
3
+ 这个插件只有一个维护者,所以"发对地方"能省掉一轮来回。
4
+ This plugin has one maintainer, so getting the report to the right place saves a round trip.
5
+
6
+ ## 去哪儿反馈什么 / Where to report what
7
+
8
+ | 你遇到的问题 / What you hit | 发到哪儿 / Where |
9
+ |---|---|
10
+ | **插件的 bug**:命令失败、路径转换不对、面板开关无效、后台任务异常… / A **plugin** bug | **[本仓库的 Issue](https://github.com/XINY11451/dsh-wsl/issues/new/choose)**(有模板,会问你环境)/ **Issues here** (templates ask for the environment) |
11
+ | **功能建议**:想要一个新能力 / A **feature request** | **[本仓库的 Issue](https://github.com/XINY11451/dsh-wsl/issues/new/choose)**,选「功能建议」模板 / Issues here, the feature template |
12
+ | **用法问题、想法、经验分享** / Usage questions, ideas, war stories | **[Discussions](https://github.com/XINY11451/dsh-wsl/discussions)** |
13
+ | **DSH 本体的问题**(与 WSL 无关的界面、会话、模型…)/ **DSH itself** | [deepseek-ai/deepseek-harness](https://github.com/deepseek-ai/deepseek-harness/issues) |
14
+ | **插件市场的界面问题**(浏览、安装按钮、列表渲染…)/ The **market UI** | [dsh-market](https://github.com/dsh-market/dsh-market/issues) |
15
+ | **收录/目录问题**(列表文案、分类、截图没更新…)/ The **catalog listing** | [awesome-dsh-plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin/issues) —— 注意:那里的 Issue 只处理列表与站点本身,插件 bug 发过去会被关掉 / Note: Issues there cover the list and its site only; plugin bugs are closed |
16
+
17
+ ## 提交 bug 前,先把这几件事准备好 / Before filing a bug
18
+
19
+ 1. **插件版本** —— 面板底部的「复制插件信息」会替你读出来(来自 `package.json`),或 `npm ls dsh-wsl-tool` / The plugin version, read out by 「复制插件信息」 in the panel (from `package.json`), or `npm ls dsh-wsl-tool`
20
+ 2. **DSH 版本** —— 同一个按钮也会读出来(从应用自己的 manifest),设置里也能看到 / The same button reads it out (from the application's own manifest); Settings shows it too
21
+ 3. **WSL 发行版与内核** —— 同一个按钮会替你探测(默认发行版、内核、systemd/docker/GPU 等能力标记);也可用 `wsl -l -v` 或 `wsl-env` 工具 / The same button probes them (default distribution, kernel, capability flags such as systemd, docker and GPU); `wsl -l -v` or one `wsl-env` call work too
22
+ 4. **原文**:完整命令、完整报错、界面上出现的话 —— 不要转述 / The exact command, the exact error, the exact UI text — not a paraphrase
23
+
24
+ 侧边栏面板底部是**一个**反馈入口:旁边写着提交指南(标题怎么起、正文写哪三段、粘到哪个字段),以及一个「复制插件信息」按钮。点它会由宿主半**自动读取**:包名、版本、仓库(来自本包的 `package.json`)、Node 与平台、它正运行在哪个 DSH 构建里、以及 WSL 的默认发行版/内核/能力标记 —— 再配上当前生效的配置和各开关状态,一次复制完。粘进 Issue 的「补充」栏即可。读取要跑几次 WSL 探测,所以按钮会先显示「正在读取…」;读不到的项会写明"未能读取",不会编造。它**不会**自己发送任何东西。
25
+ The panel ends with **one** feedback entry: a submission guide beside it (how to title it, which three paragraphs the body needs, which field to paste into) and a 「复制插件信息」 button. The host half **reads it all in**: package name, version and repository (from this package's `package.json`), Node and the platform, the DSH build it is running inside, and WSL's default distribution, kernel and capability flags — plus the effective configuration and the switch states. Paste that into the issue's 「补充」 field. A few WSL probes run first, so the button reads 「正在读取…」; anything unreadable says so instead of guessing. It sends nothing by itself.
26
+
27
+ ## 关于隐私 / Privacy
28
+
29
+ - 插件**不做任何静默上报**:不点反馈入口,就不会有网络请求。/ The plugin reports nothing by itself — no request happens unless you open the feedback entry.
30
+ - 面板复制出来的文本只含**版本号、包名、仓库、Node 与平台、发行版名、超时,以及你面板里各开关的状态**;不含完整路径、主机名、用户名或任何凭据。/ The copied block contains versions, the package name, the repository, Node and the platform, the distribution name, the timeout and your switch states — no full paths, host names, user names or credentials.
31
+ - Issue 是**公开**的。提交前请自己过一眼,把不想公开的删掉。/ Issues are **public**. Read it once before submitting and delete what you would rather not publish.
32
+
33
+ ## 修复的节奏 / How fixes happen
34
+
35
+ 报告 → 复现(必要时我会请你补 `wsl-env` 输出)→ 改代码 → 测试(这个插件有 347 项宿主检查 + 76 项客户端检查)→ 发版(npm + 市场资产同一次发布,逐字节一致)→ 你升级后回帖确认 → 关闭。
36
+ Report → reproduce (I may ask for a full `wsl-env`) → fix → tests (the plugin ships with 347 host checks and 76 client checks) → release (npm and the market asset go out byte-identical in one run) → you confirm after upgrading → close.