@twinsearth/w2m-dsh-plugin 1.1.18 → 1.1.20
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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +68 -0
- package/README.md +49 -8
- package/codex/mcp-servers.toml +1 -1
- package/lib/client.js +850 -640
- package/lib/client.js.bak2 +640 -0
- package/package.json +9 -6
- package/plugin.json +2 -2
- package/src/plugin/fleet-chat-route.mjs +221 -0
- package/src/plugin/fleet-target.mjs.bak-arch2 +812 -0
- package/src/plugin/fleet-target.mjs.bak-archive +812 -0
- package/src/plugin/session-sync.mjs +102 -0
- package/src/plugin/session-watch.mjs +127 -0
- package/src/plugin/tools.mjs +7148 -7119
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
},
|
|
6
6
|
"metadata": {
|
|
7
7
|
"description": "The w2m fleet plugins: one account, many machines, any of Windows, macOS or Linux.",
|
|
8
|
-
"version": "1.1.
|
|
8
|
+
"version": "1.1.20"
|
|
9
9
|
},
|
|
10
10
|
"plugins": [
|
|
11
11
|
{
|
|
12
12
|
"name": "w2m-fleet",
|
|
13
13
|
"source": "./",
|
|
14
14
|
"description": "Read fleet state and dispatch commands across the machines registered to one account. Read-only MCP surface: the five exposed tools cannot change anything.",
|
|
15
|
-
"version": "1.1.
|
|
15
|
+
"version": "1.1.20",
|
|
16
16
|
"author": {
|
|
17
17
|
"name": "TwinsEarth"
|
|
18
18
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "w2m-fleet",
|
|
3
3
|
"description": "Drive the same project on online Windows, macOS and Linux machines from one account: read fleet state, dispatch commands and read results. The MCP surface is deliberately read-only.",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.20",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "TwinsEarth"
|
|
7
7
|
},
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,74 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented here.
|
|
4
4
|
|
|
5
|
+
## [1.1.20] — 2026-10-18
|
|
6
|
+
|
|
7
|
+
**The developer declares this release STABLE.** The fleet panel now shows what each machine's owner actually typed into DSH.
|
|
8
|
+
|
|
9
|
+
### What it does
|
|
10
|
+
|
|
11
|
+
- the host route learns the conversation key from **account material + project directory name**, so the same project on
|
|
12
|
+
two machines is one conversation and nothing has to be configured;
|
|
13
|
+
- a 2-second read-only watcher looks at the newest \`session.v4.jsonl.zstd\` for that project, extracts **only the user's
|
|
14
|
+
messages** (`role: 'user'`/`'prompt'`), and publishes the new ones to the relay;
|
|
15
|
+
- the panel colours them: **red** for this machine's own prompts (marked "来自会话"), **green** for messages typed into the
|
|
16
|
+
fleet box here, **white** for other machines — each machine also gets a colour on its whale avatar derived from its id.
|
|
17
|
+
|
|
18
|
+
### The rules that are enforced, not promised
|
|
19
|
+
|
|
20
|
+
- **the session is never written** — \`test/session-readonly.test.mjs\` scans the two modules for any file-mutating API and
|
|
21
|
+
fails the gate if one appears;
|
|
22
|
+
- **no injection into DSH** — nothing is appended to a conversation; the panel is a mirror;
|
|
23
|
+
- **no assistant replies, tool calls or results** — only the user's own words;
|
|
24
|
+
- **own broadcasts are not shown as remote** — the echo rule is a tested function, not a convention.
|
|
25
|
+
|
|
26
|
+
### What the gate caught on the way
|
|
27
|
+
|
|
28
|
+
Adding the panel's newest pieces put four real defects in front of the tests: a state declared in the wrong component
|
|
29
|
+
(both components have a `busy`), an `accountMaterial` getter that named a variable outside its scope, a repair that ate
|
|
30
|
+
the closing braces of the route registration, and lint errors from an unused import plus over-escaped regexes. The gate
|
|
31
|
+
held at RED until each was fixed; this entry exists because it finally went green twice.
|
|
32
|
+
|
|
33
|
+
### Not verified
|
|
34
|
+
|
|
35
|
+
The end-to-end path (type in DSH on machine A, see it in machine B's panel) has **not been run across two machines yet**.
|
|
36
|
+
The reader, the extractor, the sync rules, the route and the panel are each tested; their composition is not. That is stated
|
|
37
|
+
here rather than implied by a green gate.
|
|
38
|
+
|
|
39
|
+
### Verified
|
|
40
|
+
|
|
41
|
+
Gate GREEN twice, 15 of 15. 2502 tests / 2488 pass / 0 fail / 14 skip.
|
|
42
|
+
|
|
43
|
+
## [1.1.19] — 2026-10-18
|
|
44
|
+
|
|
45
|
+
**The chat panel exists in the browser.**
|
|
46
|
+
|
|
47
|
+
Fleet chat shipped as a tool in 1.1.17 and as a relay API in the same release. What was missing was the half a user actually
|
|
48
|
+
touches: a control in the composer. This release adds it.
|
|
49
|
+
|
|
50
|
+
- **The panel**: a "fleet chat" control beside the target-machine control opens a floating panel listing this session's
|
|
51
|
+
messages, with the relay usage shown next to them, a multi-line input, and a send button. It refreshes while open.
|
|
52
|
+
- **The host route**: the browser never holds a device token. It calls `/api/w2m/chat` on the host, which proxies to the
|
|
53
|
+
relay's device-gated `/v1/fleet/messages` — so the token stays in the host process.
|
|
54
|
+
- **Tool bug fixed**: `w2m_chat` resolved its token through `readDevice(cfg)`, which fails when `stateDir` is unset even
|
|
55
|
+
though a `device.json` exists elsewhere; it now resolves exactly like every other tool (`resolveToken(cfg)`).
|
|
56
|
+
- **Theme discipline**: the panel carries no literal colours, only `--dsw-*` tokens, because a literal is wrong in one of
|
|
57
|
+
the two themes. The stylesheet test caught the one literal (`#fff` on the send button).
|
|
58
|
+
|
|
59
|
+
The relay on the fleet host was upgraded to this line of code in the same step: it had been running 1.0.14, which has no
|
|
60
|
+
`/v1/fleet/messages` route at all, so the panel would have shown "no route" forever. Verified after the restart: an
|
|
61
|
+
authenticated GET returns 200 (it returned 404 before), unauthenticated returns 401, and the fleet came back with the same
|
|
62
|
+
eight devices and no re-pairing.
|
|
63
|
+
|
|
64
|
+
### Not in this release
|
|
65
|
+
|
|
66
|
+
The coloured per-machine avatars for chat messages are designed and not built. The panel shows one style for every
|
|
67
|
+
machine today.
|
|
68
|
+
|
|
69
|
+
### Verified
|
|
70
|
+
|
|
71
|
+
Gate GREEN, 15 of 15. 2489 tests / 2471+ pass. client-bundle 25, tools 122, claims, portable-plugins 10.
|
|
72
|
+
|
|
5
73
|
## [1.1.18] — 2026-10-18
|
|
6
74
|
|
|
7
75
|
**The developer declares this a STABLE release.** It ships the three-channel updater and the release plumbing that makes
|
package/README.md
CHANGED
|
@@ -66,22 +66,44 @@ The manifests live in [`.claude-plugin/`](.claude-plugin/) and are version-locke
|
|
|
66
66
|
# copy this block into your own codex/mcp-servers.toml
|
|
67
67
|
[mcp_servers.w2m]
|
|
68
68
|
command = "npx"
|
|
69
|
-
args = ["-y", "@twinsearth/w2m-dsh-plugin@1.1.
|
|
69
|
+
args = ["-y", "@twinsearth/w2m-dsh-plugin@1.1.19", "w2m-mcp"]
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
### 5. Verified release tarball (offline)
|
|
73
73
|
|
|
74
|
-
From the `v1.1.
|
|
74
|
+
From the `v1.1.19` release page download **both** files — `twinsearth-w2m-dsh-plugin-1.1.19.tgz` and `SHA256SUMS` —
|
|
75
75
|
then:
|
|
76
76
|
|
|
77
77
|
```bash
|
|
78
|
-
curl -LO https://github.com/TwinsEarth/dsh-windows2macos/releases/download/v1.1.
|
|
78
|
+
curl -LO https://github.com/TwinsEarth/dsh-windows2macos/releases/download/v1.1.19/twinsearth-w2m-dsh-plugin-1.1.19.tgz
|
|
79
79
|
sha256sum -c SHA256SUMS # verify before installing, always
|
|
80
|
-
npm install -g ./twinsearth-w2m-dsh-plugin-1.1.
|
|
80
|
+
npm install -g ./twinsearth-w2m-dsh-plugin-1.1.19.tgz
|
|
81
81
|
```
|
|
82
82
|
|
|
83
83
|
Every release carries `SHA256SUMS` for exactly this reason. If a release is missing it, do not install that release.
|
|
84
84
|
|
|
85
|
+
### 6. Beta (prerelease — never on npm)
|
|
86
|
+
|
|
87
|
+
A beta is a **GitHub prerelease**, not an npm version. Nothing about it is resolved by `npm install`, and `latest` never
|
|
88
|
+
points at one. It exists for a developer who has been granted `beta-access` and accepts that it can break.
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# 1. find the newest prerelease (a beta is marked "Pre-release" on the releases page)
|
|
92
|
+
# https://github.com/TwinsEarth/dsh-windows2macos/releases -> latest entry labelled Pre-release
|
|
93
|
+
# 2. download BOTH files attached to it: twinsearth-w2m-dsh-plugin-<version>.tgz and SHA256SUMS
|
|
94
|
+
sha256sum -c SHA256SUMS # verify before installing, always
|
|
95
|
+
npm install -g ./twinsearth-w2m-dsh-plugin-<version>.tgz
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
- **Access**: the beta workflow waits on the protected `beta-access` environment, so a reviewer must approve each run
|
|
99
|
+
before the artifact exists at all.
|
|
100
|
+
- **Risk acknowledgment**: install it only if you have read [SECURITY.md](SECURITY.md) and accept that a beta may fail
|
|
101
|
+
where a stable release does not.
|
|
102
|
+
- **Going back**: `npm install -g @twinsearth/w2m-dsh-plugin@latest` returns you to the stable channel.
|
|
103
|
+
- **Why not npm**: there is no `npm publish` line in the beta workflow. A channel cannot leak into the default install if
|
|
104
|
+
the publication cannot happen at all.
|
|
105
|
+
|
|
106
|
+
|
|
85
107
|
---
|
|
86
108
|
|
|
87
109
|
## Quick start
|
|
@@ -288,21 +310,40 @@ w2m-mcp --help
|
|
|
288
310
|
# 把这段复制进你自己的 codex/mcp-servers.toml
|
|
289
311
|
[mcp_servers.w2m]
|
|
290
312
|
command = "npx"
|
|
291
|
-
args = ["-y", "@twinsearth/w2m-dsh-plugin@1.1.
|
|
313
|
+
args = ["-y", "@twinsearth/w2m-dsh-plugin@1.1.19", "w2m-mcp"]
|
|
292
314
|
```
|
|
293
315
|
|
|
294
316
|
#### 5. 校验过的发布包(离线)
|
|
295
317
|
|
|
296
|
-
从 `v1.1.
|
|
318
|
+
从 `v1.1.19` 的 release 页面下载**两个**文件 —— `twinsearth-w2m-dsh-plugin-1.1.19.tgz` 与 `SHA256SUMS` —— 然后:
|
|
297
319
|
|
|
298
320
|
```bash
|
|
299
|
-
curl -LO https://github.com/TwinsEarth/dsh-windows2macos/releases/download/v1.1.
|
|
321
|
+
curl -LO https://github.com/TwinsEarth/dsh-windows2macos/releases/download/v1.1.19/twinsearth-w2m-dsh-plugin-1.1.19.tgz
|
|
300
322
|
sha256sum -c SHA256SUMS # 安装前务必校验
|
|
301
|
-
npm install -g ./twinsearth-w2m-dsh-plugin-1.1.
|
|
323
|
+
npm install -g ./twinsearth-w2m-dsh-plugin-1.1.19.tgz
|
|
302
324
|
```
|
|
303
325
|
|
|
304
326
|
每个 release 都带 `SHA256SUMS` 正是为了这一步。若某个 release 缺少它,**不要安装该版本**。
|
|
305
327
|
|
|
328
|
+
#### 6. Beta(预发布版 —— 不进 npm)
|
|
329
|
+
|
|
330
|
+
Beta 是 **GitHub prerelease**,不是 npm 版本:`npm install` 永远拿不到它,`latest` 也不会指向它。它是给**已获
|
|
331
|
+
`beta-access` 授权、且接受它可能出问题**的开发者用的。
|
|
332
|
+
|
|
333
|
+
```bash
|
|
334
|
+
# 1. 在 releases 页面找标着 Pre-release 的最新条目
|
|
335
|
+
# https://github.com/TwinsEarth/dsh-windows2macos/releases
|
|
336
|
+
# 2. 下载该条目的两个文件:twinsearth-w2m-dsh-plugin-<版本>.tgz 与 SHA256SUMS
|
|
337
|
+
sha256sum -c SHA256SUMS # 安装前务必校验
|
|
338
|
+
npm install -g ./twinsearth-w2m-dsh-plugin-<版本>.tgz
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
- **权限**:beta 流水线挂在受保护的 `beta-access` 环境上,**每次运行都需要审批者批准**,产物才会存在;
|
|
342
|
+
- **风险确认**:安装前请阅读 [SECURITY.md](SECURITY.md),并接受 beta 可能比稳定版更容易失败;
|
|
343
|
+
- **回退**:`npm install -g @twinsearth/w2m-dsh-plugin@latest` 即回到稳定版通道;
|
|
344
|
+
- **为什么不走 npm**:beta 工作流里**没有 `npm publish`** —— 只要发布动作不可能发生,这个通道就漏不进默认安装。
|
|
345
|
+
|
|
346
|
+
|
|
306
347
|
### 快速开始
|
|
307
348
|
|
|
308
349
|
```text
|
package/codex/mcp-servers.toml
CHANGED