dsh-wsl-tool 1.10.9 → 1.10.11
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 +59 -1
- package/README.zh-CN.md +42 -1
- package/SUPPORT.md +36 -0
- package/index.js +559 -10
- package/lib/client.js +533 -41
- package/lib/config.js +34 -15
- package/lib/terminal-cwd.js +408 -0
- package/lib/tools/wsl-path.js +5 -5
- package/lib/tools/wsl.js +5 -4
- package/package.json +2 -2
- package/screenshots.json +1 -1
- package/assets/market-preview.html +0 -217
- package/assets/market-preview.png +0 -0
- package/assets/screenshot-1.png +0 -0
package/README.md
CHANGED
|
@@ -119,6 +119,13 @@ 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
131
|
Verified against DSH **0.1.7-rc.2** (and 0.1.5-rc.2 before it): the tool schemas
|
|
@@ -149,7 +156,9 @@ explanation.
|
|
|
149
156
|
| `wsl-env` 能力体检 | registers the `wsl-env` tool |
|
|
150
157
|
| 后台任务 | whether `wsl` accepts `runInBackground` |
|
|
151
158
|
| 自动转换路径 | the default for the per-call `translatePaths` |
|
|
152
|
-
| 默认跟随会话工作区 | start in the session's directory instead of `~` when `workdir` is omitted |
|
|
159
|
+
| 默认跟随会话工作区 | 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 |
|
|
160
|
+
| 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 |
|
|
161
|
+
| 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
162
|
| 危险命令守卫 | whether a destructive command needs an explicit `allowDangerous` |
|
|
154
163
|
|
|
155
164
|
The panel edits the plugin's own configuration, so the same values can be written
|
|
@@ -159,6 +168,11 @@ environment, then the built-in defaults** — and a switch left at its default l
|
|
|
159
168
|
the layer below decide, which is why `DSH_WSL_WORKDIR=session` keeps working for
|
|
160
169
|
someone who never opened the panel.
|
|
161
170
|
|
|
171
|
+
「WSL 终端启动路径」 is the one exception: the sidebar terminal belongs to another
|
|
172
|
+
plugin, so that field edits your profile's patch layer instead — the file is backed
|
|
173
|
+
up before every write, only the terminal row's `args` line is rewritten, and the
|
|
174
|
+
result is read back and undone if it is not exactly that one line.
|
|
175
|
+
|
|
162
176
|
**A change takes effect at the next DSH start**: the host reads this configuration
|
|
163
177
|
once per mount, and the panel says so. Distro and timeout are values rather than
|
|
164
178
|
features — set them in the patch or with `DSH_WSL_DISTRO` / `DSH_WSL_TIMEOUT_MS`,
|
|
@@ -168,6 +182,15 @@ The settings surface needs `@deepseek-ai/schemastery`, which the plugin declares
|
|
|
168
182
|
an optional peer dependency: without it the three tools still run on their defaults
|
|
169
183
|
and only the panel is missing.
|
|
170
184
|
|
|
185
|
+
At the bottom of the panel there is one feedback entry, next to it a short
|
|
186
|
+
submission guide, and — see [Feedback](#feedback) — a 「复制插件信息」 button. The
|
|
187
|
+
button asks the host half on `/dsh-wsl-tool/info` for this plugin's own facts (name,
|
|
188
|
+
version and repository read from its manifest, Node, platform), the DSH build it is
|
|
189
|
+
running inside, and the WSL facts `wsl-env` reports (default distribution, kernel,
|
|
190
|
+
capability flags) — then copies the result together with the effective
|
|
191
|
+
configuration. Nothing here is a string a release has to remember to edit, and a
|
|
192
|
+
probe that fails says so instead of inventing a value.
|
|
193
|
+
|
|
171
194
|
## Optional: a WSL terminal in the sidebar
|
|
172
195
|
|
|
173
196
|
The desktop app's sidebar terminal can open WSL instead of a Windows shell. It is
|
|
@@ -179,6 +202,14 @@ To turn it on, copy that entry into your profile's own patch layer
|
|
|
179
202
|
(`$DSH_HOME/profiles/<profile>/cordis.patch.yml`); a CLI launch can instead pass
|
|
180
203
|
`--patch <path to the installed file>`. It applies at the next app start.
|
|
181
204
|
|
|
205
|
+
The panel can set the startup directory for you: 「WSL 终端启动路径」 (beside 「默认
|
|
206
|
+
Linux 工作目录」) reads the current value out of that file and writes `--cd <dir>` onto
|
|
207
|
+
the row's `args` line — backing the patch up first, changing only that one line, and
|
|
208
|
+
checking what landed before it is kept. Clearing the field removes the flag, which puts
|
|
209
|
+
the terminal back on the session workspace (the Windows directory it is started from,
|
|
210
|
+
translated to `/mnt/…`); `~` pins it to the Linux home. It takes effect at the next app
|
|
211
|
+
start too.
|
|
212
|
+
|
|
182
213
|
```yaml
|
|
183
214
|
- id: terminal-controller
|
|
184
215
|
config:
|
|
@@ -427,3 +458,30 @@ documented in [`PUBLISHING.md`](PUBLISHING.md).
|
|
|
427
458
|
|
|
428
459
|
The repository carries the `dsh-plugin` topic and is listed under the `wsl`
|
|
429
460
|
category of the awesome-dsh-plugin community list.
|
|
461
|
+
|
|
462
|
+
## Feedback
|
|
463
|
+
|
|
464
|
+
The sidebar panel ends with one feedback entry, and it sends nothing by itself.
|
|
465
|
+
|
|
466
|
+
- **A bug or a concrete request** →
|
|
467
|
+
[open an issue](https://github.com/XINY11451/dsh-wsl/issues/new/choose). The
|
|
468
|
+
templates ask for the environment once, which is the difference between a report
|
|
469
|
+
that can be reproduced and a round trip.
|
|
470
|
+
- **Usage questions and ideas** →
|
|
471
|
+
[Discussions](https://github.com/XINY11451/dsh-wsl/discussions).
|
|
472
|
+
- **GitHub unreachable?** The panel's 「复制插件信息」 button asks the host half for
|
|
473
|
+
this package's own facts — name, version and repository straight out of its
|
|
474
|
+
`package.json`, plus Node, the platform and the effective configuration — and
|
|
475
|
+
copies them, together with the switch states the panel is already showing. Paste
|
|
476
|
+
that into the issue's 「补充」 field and only the prose is left to write. The
|
|
477
|
+
submission guide sits next to the button, in the panel.
|
|
478
|
+
|
|
479
|
+
Everything in that block is text you can read and edit before it goes anywhere: no
|
|
480
|
+
paths, host names or credentials are collected, and the plugin makes no request of
|
|
481
|
+
its own — the route the button reads is served by the local host, not the network.
|
|
482
|
+
Problems that belong elsewhere go to their own repositories — DSH itself →
|
|
483
|
+
[deepseek-harness](https://github.com/deepseek-ai/deepseek-harness/issues), the
|
|
484
|
+
market UI →
|
|
485
|
+
[dsh-market](https://github.com/dsh-market/dsh-market/issues), the catalog listing →
|
|
486
|
+
[awesome-dsh-plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin/issues).
|
|
487
|
+
The full routing table is in [SUPPORT.md](SUPPORT.md).
|
package/README.zh-CN.md
CHANGED
|
@@ -103,6 +103,10 @@ 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
112
|
已在 DSH **0.1.7-rc.2** 上验证(此前为 0.1.5-rc.2):工具 schema 通过 DSH 自己的
|
|
@@ -130,19 +134,31 @@ DSH_SUBPROCESS_LOCAL=/path/to/dsh/node_modules npm run test:real
|
|
|
130
134
|
| `wsl-env` 能力体检 | 是否注册 `wsl-env` 工具 |
|
|
131
135
|
| 后台任务 | `wsl` 是否接受 `runInBackground` |
|
|
132
136
|
| 自动转换路径 | 每次调用的 `translatePaths` 默认值 |
|
|
133
|
-
| 默认跟随会话工作区 | 未传 `workdir` 时从会话目录开始,而不是
|
|
137
|
+
| 默认跟随会话工作区 | 未传 `workdir` 时从会话目录开始,而不是 `~`。**默认开**:关掉的话,agent 写的相对路径都会落进 Linux 家目录 —— 那儿在资源管理器里看不见,还会撑大 WSL 磁盘镜像 |
|
|
138
|
+
| Linux 默认工作目录 | 未传 `workdir` 时使用的固定 Linux 目录(如 `/mnt/d/project`)。填了就优先于上面的开关;清空则回到跟随会话 |
|
|
139
|
+
| WSL 终端启动路径 | 可选的侧边栏终端从哪个目录启动 —— 写进你 **profile patch** 里 `terminal-controller` 那一行的 `--cd <目录>`(见[可选:在侧边栏开一个 WSL 终端](#可选在侧边栏开一个-wsl-终端))。留空则删掉该参数;当前值也是从这个文件读的 |
|
|
134
140
|
| 危险命令守卫 | 危险命令是否必须显式 `allowDangerous` |
|
|
135
141
|
|
|
136
142
|
面板改的是插件自己的配置,所以同样的值也可以手写进 profile patch(`- id: tool-wsl` 加 `config:`)
|
|
137
143
|
或用环境变量设。优先级由 `lib/config.js` 定:**插件配置 > 环境变量 > 内置默认值**;开关停在默认值时
|
|
138
144
|
下层说了算 —— 这正是"从没打开过面板的人,`DSH_WSL_WORKDIR=session` 依然生效"的原因。
|
|
139
145
|
|
|
146
|
+
「WSL 终端启动路径」是唯一的例外:侧边栏终端属于另一个插件,所以那个输入框改的是你 profile 的
|
|
147
|
+
patch 层 —— 每次写入前先备份该文件,只重写终端那一行的 `args`,写后还会读回来核对,只要不是"只改了
|
|
148
|
+
这一行"就当场还原。
|
|
149
|
+
|
|
140
150
|
**改动在下次启动 DSH 后生效**:宿主每次挂载只读一次该配置,面板里也写着这句。发行版与超时属于"值"
|
|
141
151
|
而不是"功能":在 patch 里或用 `DSH_WSL_DISTRO` / `DSH_WSL_TIMEOUT_MS` 设置,面板只显示当前生效值。
|
|
142
152
|
|
|
143
153
|
这个设置界面需要 `@deepseek-ai/schemastery`(插件把它声明为可选 peer 依赖):没有它三个工具照常按
|
|
144
154
|
默认值工作,只是没有面板。
|
|
145
155
|
|
|
156
|
+
面板**最底部**是一个反馈入口,旁边跟着一段简短的提交指南,以及一个「复制插件信息」按钮(详见
|
|
157
|
+
[反馈](#反馈))。按钮会向宿主半的 `/dsh-wsl-tool/info` 索取本插件自己的信息 —— 包名、版本、仓库
|
|
158
|
+
(都从 `package.json` 读出)、Node 与平台 —— 外加**它正运行在哪个 DSH 构建里**、以及 `wsl-env`
|
|
159
|
+
那一套 WSL 事实(默认发行版、内核、能力标记),然后连同当前生效的配置一起复制出来。
|
|
160
|
+
这些值没有一个是"发版时要记得手改"的字符串;探测失败时它写明失败,绝不编造。
|
|
161
|
+
|
|
146
162
|
## 可选:在侧边栏开一个 WSL 终端
|
|
147
163
|
|
|
148
164
|
桌面版侧边栏终端可以开 WSL 而不是 Windows shell。这是**可选**的 —— 装插件**不会**改你终端默认
|
|
@@ -152,6 +168,11 @@ DSH_SUBPROCESS_LOCAL=/path/to/dsh/node_modules npm run test:real
|
|
|
152
168
|
(`$DSH_HOME/profiles/<profile>/cordis.patch.yml`);命令行启动也可以改成
|
|
153
169
|
`--patch <已安装文件路径>`。**下次启动应用时生效。**
|
|
154
170
|
|
|
171
|
+
这个启动目录也能在面板里设:顶部的「WSL 终端启动路径」(挨着「默认 Linux 工作目录」)会从那个
|
|
172
|
+
文件读出当前值,再把 `--cd <目录>` 写到该行 `args` 上 —— 写前先备份 patch 文件,只改这一行,
|
|
173
|
+
写后读回来核对。**清空**则删掉该参数,终端回到跟随会话工作区(启动时的 Windows 目录会被翻译成
|
|
174
|
+
`/mnt/…`);填 `~` 固定到 Linux 家目录。改完同样**重启 DSH 生效**。
|
|
175
|
+
|
|
155
176
|
```yaml
|
|
156
177
|
- id: terminal-controller
|
|
157
178
|
config:
|
|
@@ -387,3 +408,23 @@ npm run sync -- /path/to/profiles/<profile>/node_modules/<你的依赖名>
|
|
|
387
408
|
## 收录
|
|
388
409
|
|
|
389
410
|
本仓库带有 `dsh-plugin` topic,并已提交至 awesome-dsh-plugin 社区列表的 `wsl` 分类。
|
|
411
|
+
|
|
412
|
+
## 反馈
|
|
413
|
+
|
|
414
|
+
侧边栏面板最后一段就是反馈入口,它**不会自己发送任何东西**。
|
|
415
|
+
|
|
416
|
+
- **缺陷或明确的需求** → [开一个 Issue](https://github.com/XINY11451/dsh-wsl/issues/new/choose)。
|
|
417
|
+
模板会问一次环境,这决定了报告能不能被复现、要不要多来回一轮。
|
|
418
|
+
- **用法问题与想法** → [Discussions](https://github.com/XINY11451/dsh-wsl/discussions)。
|
|
419
|
+
- **GitHub 打不开?** 面板里的「复制插件信息」按钮会向宿主半索取这个包自己的信息 ——
|
|
420
|
+
包名、版本、仓库(直接读 `package.json`),加上 Node、平台与当前生效的配置 ——
|
|
421
|
+
连同面板正显示着的开关状态一起复制出来。粘进 Issue 的「补充」栏即可,只剩正文要自己写。
|
|
422
|
+
提交指南就在按钮旁边,也在面板里。
|
|
423
|
+
|
|
424
|
+
那段文本在发出去之前你都能看清、都能改:不采集路径、主机名或任何凭据,插件也不对外发起请求 ——
|
|
425
|
+
按钮读的那个路由由本机宿主提供,不走网络。
|
|
426
|
+
属于别处的问题请发到各自的仓库 —— DSH 本体 →
|
|
427
|
+
[deepseek-harness](https://github.com/deepseek-ai/deepseek-harness/issues),市场界面 →
|
|
428
|
+
[dsh-market](https://github.com/dsh-market/dsh-market/issues),收录与目录 →
|
|
429
|
+
[awesome-dsh-plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin/issues)。
|
|
430
|
+
完整分流表见 [SUPPORT.md](SUPPORT.md)。
|
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.
|