dsh-windows-mcp 0.2.0 → 0.2.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 +24 -0
- package/README.md +12 -1
- package/README.zh.md +12 -1
- package/lib/client.js +594 -1
- package/lib/dependency.js +66 -5
- package/lib/index.js +119 -6
- package/lib/mirrors.js +9 -1
- package/lib/settings.js +251 -0
- package/lib/updater.js +9 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,30 @@ All notable changes to this project are documented here. The format follows
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project uses
|
|
5
5
|
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [0.2.1] - 2026-10-29
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **Settings page** (`lib/settings.js`, the `settings.section` slot): a new
|
|
12
|
+
**Settings → Desktop** entry whose page groups the knobs into
|
|
13
|
+
**Bridge** (`toolCallTimeoutMs`, screenshot scale/backend, flash overlay,
|
|
14
|
+
the excludable tools), **Updates** (check on boot, preferred mirror) and
|
|
15
|
+
**About** (version, repository, a **Star** button). Values are validated and
|
|
16
|
+
clamped, stored atomically in `$DSH_HOME/dsh-windows-mcp.settings.json`, and
|
|
17
|
+
bridge changes are written into the profile's bridge row with a backup; the
|
|
18
|
+
page reports when a restart is needed.
|
|
19
|
+
- `preferredMirror`: the update check can pin a mirror while `auto` keeps the
|
|
20
|
+
measured ranking.
|
|
21
|
+
- The settings entry now wears a monitor-and-cursor glyph instead of the
|
|
22
|
+
shell's gear: the `settings.section` slot has no icon field, so the icon is
|
|
23
|
+
painted as a `currentColor` mask on the settings nav row, matched by the
|
|
24
|
+
entry's own localized label.
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- Reading the bridge row now treats a missing `WINDOWS_MCP_DISABLE_FLASH`
|
|
29
|
+
inside the machine-written block as "flash enabled", not as unknown.
|
|
30
|
+
- `mirrorOrder` had a stray spacing glitch on its declaration line.
|
|
7
31
|
## [0.2.0] - 2026-10-24
|
|
8
32
|
|
|
9
33
|
### Added
|
package/README.md
CHANGED
|
@@ -118,6 +118,15 @@ Only the managed installs are touched: until you install one, the bridge keeps u
|
|
|
118
118
|
|
|
119
119
|
The check measures all seven candidates — PyPI plus the USTC, Aliyun, Tencent Cloud, Huawei Cloud, Nanjing University and TUNA mirrors — with a 96 KiB ranged read, and ranks them by throughput. An install uses the fastest mirror that works and falls back to the next one when a mirror fails, with `UV_CONCURRENT_DOWNLOADS=4`, `UV_HTTP_RETRIES=3` and `UV_HTTP_TIMEOUT=600`, because mirrors rate-limit uv's default of eight parallel downloads (HTTP 429). A mirror that has blocked this network is ranked out instead of failing the install; the measured speed is shown per mirror in the panel.
|
|
120
120
|
|
|
121
|
+
### Settings page and the star button
|
|
122
|
+
|
|
123
|
+
Everything above, plus a few knobs that do not belong on a plugin card, lives in **Settings → Desktop** — a new entry in the settings sidebar, next to the other plugins' pages:
|
|
124
|
+
|
|
125
|
+
- **Bridge** — `toolCallTimeoutMs`, the screenshot scale, the capture backend, upstream's flash overlay, and the three tools the bridge may exclude (`App`, `PowerShell`, `FileSystem`). These are written into the bridge row of your profile's `cordis.patch.yml` (timestamped backup first), so **they apply after DSH restarts**; the page states which row is in effect.
|
|
126
|
+
- **Updates** — whether the plugin checks for a newer Windows-MCP on boot, and the mirror policy: `auto` keeps the measured ranking, an explicit mirror pins it, and the official index always stays as the last resort.
|
|
127
|
+
- **About** — the plugin version, the repository link, and a **Star** button that opens the project on GitHub in a new tab.
|
|
128
|
+
|
|
129
|
+
Saving is atomic (`$DSH_HOME/dsh-windows-mcp.settings.json`). A value out of range is clamped to its default and reported instead of being written silently, and a change that leaves the bridge row untouched does not rewrite the patch layer at all. **Revert** restores the defaults in the form.
|
|
121
130
|
## Verify
|
|
122
131
|
|
|
123
132
|
```text
|
|
@@ -319,9 +328,11 @@ lib/pypi.js PyPI index parsing and version maths (pure functions)
|
|
|
319
328
|
lib/mirrors.js mirror candidates, ranged speed probe, ranking
|
|
320
329
|
lib/installs.js per-version tool roots and the versions state file
|
|
321
330
|
lib/updater.js version manager: check / install / activate / roll back
|
|
322
|
-
lib/
|
|
331
|
+
lib/settings.js user settings: validation, storage, bridge round-trip
|
|
332
|
+
lib/client.js web half: composer switch, plugin panel, settings page
|
|
323
333
|
test/plugin.test.mjs patch composition + hostile-context + panel tests
|
|
324
334
|
test/update.test.mjs version maths, mirror ranking, isolation and rollback state machine
|
|
335
|
+
test/settings.test.mjs settings validation, bridge round-trip, settings route
|
|
325
336
|
scripts/dump-config.mjs dev helper for composing against a scratch profile
|
|
326
337
|
tools/ zero-dependency debug probes (not published to npm)
|
|
327
338
|
```
|
package/README.zh.md
CHANGED
|
@@ -114,6 +114,15 @@ Windows-MCP 本身是个 Python 程序,所以 **设置 → 插件 → dsh-wind
|
|
|
114
114
|
|
|
115
115
|
检查阶段会用 96 KiB 的 range 读取量一遍七个候选——PyPI 官方,加上中科大、阿里云、腾讯云、华为云、南京大学、清华 TUNA——按实测吞吐量排序。安装时用最快且能用的镜像,失败就回退到下一个;同时固定 `UV_CONCURRENT_DOWNLOADS=4`、`UV_HTTP_RETRIES=3`、`UV_HTTP_TIMEOUT=600`,因为镜像会限流 uv 默认的 8 并发(HTTP 429)。对当前网络直接封锁的镜像(本机 TUNA 现在返回 403)会被排到后面而不是让安装失败;每个镜像的实测速度都显示在面板上。
|
|
116
116
|
|
|
117
|
+
### 设置页与 Star 按钮
|
|
118
|
+
|
|
119
|
+
除了插件卡片上的这些,还有几个不属于卡片的小开关,集中在 **设置 → 桌面控制** —— 设置界面左边栏里新增的一页,和别的插件页并列:
|
|
120
|
+
|
|
121
|
+
- **桥接** —— `toolCallTimeoutMs`、截图缩放、截图后端、上游的闪光提示层,以及桥允许排除的三个工具(`App`、`PowerShell`、`FileSystem`)。这些会写进你 profile 的 `cordis.patch.yml` 桥行(先做时间戳备份),所以 **重启 DSH 后才生效**;页面上会写明当前生效的是哪一行。
|
|
122
|
+
- **更新** —— 是否在启动时自动检查新版 Windows-MCP,以及镜像策略:`auto` 用实测排序,指定镜像则固定用它(官方源始终留作最后的兜底)。
|
|
123
|
+
- **关于** —— 插件版本、仓库链接,以及一个「点个 Star」按钮,点开在新标签页打开 GitHub 仓库。
|
|
124
|
+
|
|
125
|
+
保存是原子的(`$DSH_HOME/dsh-windows-mcp.settings.json`)。越界的值会被夹到默认值并告知,而不是悄悄写坏;只改插件参数、不涉及桥行时不会重写补丁层。**还原** 把表单恢复成默认值。
|
|
117
126
|
## 验证
|
|
118
127
|
|
|
119
128
|
```text
|
|
@@ -269,9 +278,11 @@ lib/pypi.js PyPI 索引解析与版本比较(纯函数)
|
|
|
269
278
|
lib/mirrors.js 镜像候选、限速探测与排序
|
|
270
279
|
lib/installs.js 按版本隔离的工具目录 + 版本状态文件
|
|
271
280
|
lib/updater.js 版本管理:检查 / 安装 / 激活 / 回退
|
|
272
|
-
lib/
|
|
281
|
+
lib/settings.js 用户设置:校验、落盘、桥行往返
|
|
282
|
+
lib/client.js 网页半边:输入框开关 + 插件面板 + 设置页
|
|
273
283
|
test/plugin.test.mjs 补丁合成测试 + 恶意 ctx 测试 + 面板测试
|
|
274
284
|
test/update.test.mjs 版本解析、镜像排序、版本隔离与回退状态机测试
|
|
285
|
+
test/settings.test.mjs 设置校验、桥行往返、设置路由测试
|
|
275
286
|
scripts/dump-config.mjs 面向影子 profile 的合成调试脚本
|
|
276
287
|
tools/ 零依赖调试探针(不发布到 npm)
|
|
277
288
|
```
|