@twinsearth/w2m-dsh-plugin 1.5.5 → 1.6.0
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 +3 -3
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +10 -0
- package/codex/mcp-servers.toml +1 -1
- package/docs/MULTI-FLEET.md +38 -0
- package/docs/acceptance/1.6.0/N-FLEET.json +21 -0
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/src/plugin/bootstrap.mjs +13 -3
- package/src/plugin/tools.mjs +1 -1
|
@@ -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.
|
|
8
|
+
"version": "1.6.0"
|
|
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.
|
|
15
|
+
"version": "1.6.0",
|
|
16
16
|
"author": {
|
|
17
17
|
"name": "TwinsEarth"
|
|
18
18
|
},
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
]
|
|
27
27
|
}
|
|
28
28
|
],
|
|
29
|
-
"version": "1.
|
|
29
|
+
"version": "1.6.0"
|
|
30
30
|
}
|
|
@@ -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.
|
|
4
|
+
"version": "1.6.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "TwinsEarth"
|
|
7
7
|
},
|
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,16 @@
|
|
|
7
7
|
|
|
8
8
|
All notable changes to this project are documented here.
|
|
9
9
|
|
|
10
|
+
## [1.6.0] — 2026-10-24
|
|
11
|
+
|
|
12
|
+
**一台 relay 承载 N 个编队:每个 DeepSeek 账号一个编队,共享 relay 但互相隔离。**
|
|
13
|
+
|
|
14
|
+
- bootstrap 答案从"单个编队的归属"改为"relay 拓扑声明":签名与有效期仍严格,fleet_id 不匹配不再拒绝
|
|
15
|
+
(`strictFleet: true` 保留旧行为)。一份 operator 签名即可服务全部编队,新账号机器无需人工重签。
|
|
16
|
+
- `scripts/verify-fleet-isolation.mjs` 扩展到 **3 个编队** 14 项检查(设备枚举/任务/聊天/记忆),全过。
|
|
17
|
+
- 新增 `docs/MULTI-FLEET.md`:编排模型、运维视图、零人工接入新账号、配额与边界。
|
|
18
|
+
- 测试:bootstrap 6/6(含拓扑答案用例)、fleet isolation 14/14;证据 `docs/acceptance/1.6.0/N-FLEET.json`
|
|
19
|
+
(fleet task `01M5ANYMVLBU716`)。
|
|
10
20
|
## [1.5.5] — 2026-10-23
|
|
11
21
|
|
|
12
22
|
**跨编队隔离:同 relay 上的另一账号机器不再出现在本编队的枚举/任务/聊天/记忆里。**
|
package/codex/mcp-servers.toml
CHANGED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# 多编队(N Fleets):每个 DeepSeek 账号一个编队
|
|
2
|
+
|
|
3
|
+
一台 relay 可以同时承载多个编队。编队身份**不需要注册**:每个账号派生自己的 fleet key,
|
|
4
|
+
`sha256(fleet_key)` 就是它的 fleet id;任意机器配对时携带自己的 fleet key,relay 就把它记进对应编队。
|
|
5
|
+
|
|
6
|
+
## 一、编排模型
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
DeepSeek 账号 A ── fleet_key_A ── sha256 ──► fleet_id_A ──┐
|
|
10
|
+
DeepSeek 账号 B ── fleet_key_B ── sha256 ──► fleet_id_B ──┼── 同一台 relay(共享基础设施)
|
|
11
|
+
DeepSeek 账号 C ── fleet_key_C ── sha256 ──► fleet_id_C ──┘
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
- **每账号一个编队**:fleet_id 不同即不同编队,机器之间在设备列表、任务、聊天、共享记忆四个面互相不可见(v1.5.5 隔离)。
|
|
15
|
+
- **relay 无状态注册**:不需要预创建编队、不需要分配名额;第一台机器配对即产生该编队。
|
|
16
|
+
- **operator 只签一次**:bootstrap 签名描述的是 relay 拓扑(哪些 relay 节点),一份签名服务全部编队(v1.6.0)。
|
|
17
|
+
需要把某台机器强制绑定到指定 fleet 时,用 `strictFleet: true` 保留旧行为。
|
|
18
|
+
|
|
19
|
+
## 二、运维视图
|
|
20
|
+
|
|
21
|
+
- 查看编队成员:`GET /v1/devices`(按调用者编队过滤);relay 侧的 `devices.json` 里每个设备带 `fleet_id` / `fleet_source`。
|
|
22
|
+
- 编队聊天:`/v1/fleet/messages`,POST 的 fleet 取自已认证设备,GET 只返回本编队消息。
|
|
23
|
+
- 共享记忆:`/v1/fleet/memory/<doc>`,文档按 `fleet_id` 前缀隔离存储。
|
|
24
|
+
- 任务:记录携带 `fleet_id`,`GET /v1/tasks` 只列本编队;operator token 的派发是 relay 级权限。
|
|
25
|
+
- 配额:relay 级限制(任务/结果/配对码等)按 relay 计数;每编队建议自行控制设备数量(例如 ≤50),
|
|
26
|
+
以便故障时 lease 与任务表保持可读。
|
|
27
|
+
|
|
28
|
+
## 三、接入新账号(零人工)
|
|
29
|
+
|
|
30
|
+
1. 机器安装插件 **1.6.0+**(内置 bootstrap 端点 + operator 公钥);
|
|
31
|
+
2. 该机器登录对应 DeepSeek 账号 → 账号派生 fleet key → 自动配对到自己的编队;
|
|
32
|
+
3. `w2m_status` 的 `bootstrap` 字段会显示 `source`、`relays`、`fleet_mismatch`(拓扑答案跨编队时)与 `last_error`。
|
|
33
|
+
|
|
34
|
+
## 四、边界与注意
|
|
35
|
+
|
|
36
|
+
- 跨编队不共享任何**读写面**;共享的只有 relay 进程、磁盘与网络带宽。
|
|
37
|
+
- 运维账号(operator token)是 relay 级凭据,可跨编队派发任务/管理 grant——它不等同于任一编队成员。
|
|
38
|
+
- 清理编队:删除该编队的设备记录即可(设备 token 失效后需重新配对);relay 不保留编队级历史数据。
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.6.0",
|
|
3
|
+
"case": "N-FLEET",
|
|
4
|
+
"kind": "positive",
|
|
5
|
+
"machines": [
|
|
6
|
+
"b53a37f4-1464-4512-9259-33a7df091e3e"
|
|
7
|
+
],
|
|
8
|
+
"executed_at": "2026-10-23T18:52:24.400Z",
|
|
9
|
+
"executor": "lead",
|
|
10
|
+
"requirement": "one relay hosts N fleets (one per DeepSeek account) isolated from each other, and one operator-signed bootstrap answer serves all of them",
|
|
11
|
+
"task_id": "01M5ANYMVLBU716",
|
|
12
|
+
"result": {
|
|
13
|
+
"outcome": "ok",
|
|
14
|
+
"assertions": {
|
|
15
|
+
"verify_script": "14/14 checks over 3 fleets",
|
|
16
|
+
"bootstrap_suite": "6/6",
|
|
17
|
+
"topology_answer": "fleet mismatch tolerated unless strictFleet"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"note": "real relay process, three fleets paired with three fleet keys"
|
|
21
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twinsearth/w2m-dsh-plugin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Run one project across your own Windows and macOS machines from a single DeepSeek account, through 11 w2m_* tools. Four coordination modes (replicate, split, broadcast, pipeline) and six aggregate verdicts (consistent, divergent, divergent-platform, failed, partial, unverifiable). P2P hole punching by default, with a bundled relay, STUN responder and ledger fallback, so the fleet needs no third-party service. Joining needs a pairing code plus autoStartAgent: true; installing alone does not join.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
package/plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
3
|
"name": "twinsearth-w2m-dsh",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.6.0",
|
|
5
5
|
"description": "Run one project across your own Windows and macOS machines from a single DeepSeek account, through 12 w2m_* tools. Four coordination modes (replicate, split, broadcast, pipeline) and six aggregate verdicts (consistent, divergent, divergent-platform, failed, partial, unverifiable). P2P hole punching by default, with a bundled relay, STUN responder and ledger fallback, so the fleet needs no third-party service. Joining needs a pairing code plus autoStartAgent: true; installing alone does not join.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"keywords": [
|
package/src/plugin/bootstrap.mjs
CHANGED
|
@@ -155,8 +155,18 @@ export function verifyBootstrapAnswer(answer, input) {
|
|
|
155
155
|
// v1.5.3: when the machine cannot derive a fleet key yet, it still must not be stranded: the
|
|
156
156
|
// signed relay list is public routing information, so a signature-only answer is adopted for relay
|
|
157
157
|
// assignment. Joining the fleet still needs the account-derived key, which is a separate step.
|
|
158
|
-
|
|
159
|
-
|
|
158
|
+
/**
|
|
159
|
+
* v1.6.0: a signed answer states relay topology, not one fleet's identity.
|
|
160
|
+
*
|
|
161
|
+
* Every DeepSeek account derives its own fleet key and therefore its own fleet id; on a shared
|
|
162
|
+
* relay those fleets coexist and are isolated per fleet (v1.5.5). The relay list is the same for
|
|
163
|
+
* all of them, so one operator-signed answer can serve N fleets -- refusing it for a fleet id
|
|
164
|
+
* mismatch would require the operator to re-sign per account, which is exactly the manual step
|
|
165
|
+
* this release removes. The signature and expiry remain strict; only the fleet binding relaxes.
|
|
166
|
+
*/
|
|
167
|
+
const fleetMismatch = typeof input.fleetId === 'string' && answer.fleet_id !== input.fleetId;
|
|
168
|
+
if (fleetMismatch && input.strictFleet === true) {
|
|
169
|
+
return refuse(BOOTSTRAP_REFUSAL.WRONG_FLEET, 'the answer names a different fleet and strictFleet is set');
|
|
160
170
|
}
|
|
161
171
|
const relays = Array.isArray(answer.relays)
|
|
162
172
|
? [...new Set(answer.relays.filter((url) => typeof url === 'string' && url.trim() !== '').map((url) => url.trim().replace(/\/+$/, '')))]
|
|
@@ -194,7 +204,7 @@ export function verifyBootstrapAnswer(answer, input) {
|
|
|
194
204
|
if (!verifiedSignatureOk(signatureOk)) {
|
|
195
205
|
return refuse(BOOTSTRAP_REFUSAL.BAD_SIGNATURE, 'the answer signature does not match the pinned operator key and the canonical payload');
|
|
196
206
|
}
|
|
197
|
-
return { ok: true, relays, issued_at: answer.issued_at, expires_at: answer.expires_at };
|
|
207
|
+
return { ok: true, relays, issued_at: answer.issued_at, expires_at: answer.expires_at, answer_fleet_id: typeof answer.fleet_id === 'string' ? answer.fleet_id : null, fleet_mismatch: fleetMismatch };
|
|
198
208
|
}
|
|
199
209
|
|
|
200
210
|
/** Kept separate so a test can assert the failure branch without a real crypto fault. */
|
package/src/plugin/tools.mjs
CHANGED
|
@@ -277,7 +277,7 @@ const MAX_STAGES = 16;
|
|
|
277
277
|
* `package.json` during `scripts/pack.mjs` rather than hand-maintained, and `W2M_PLUGIN_VERSION`
|
|
278
278
|
* overrides it at runtime for tests and packagers.
|
|
279
279
|
*/
|
|
280
|
-
const PLUGIN_VERSION = '1.
|
|
280
|
+
const PLUGIN_VERSION = '1.6.0';
|
|
281
281
|
|
|
282
282
|
/** How long any single HTTP call may take before it is aborted, in milliseconds. */
|
|
283
283
|
const DEFAULT_REQUEST_TIMEOUT_MS = 15_000;
|