@twinsearth/w2m-dsh-plugin 2.2.6 → 3.1.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.
@@ -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": "2.2.6"
8
+ "version": "3.1.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": "2.2.6",
15
+ "version": "3.1.0",
16
16
  "author": {
17
17
  "name": "TwinsEarth"
18
18
  },
@@ -26,5 +26,5 @@
26
26
  ]
27
27
  }
28
28
  ],
29
- "version": "2.2.6"
29
+ "version": "3.1.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": "2.2.6",
4
+ "version": "3.1.0",
5
5
  "author": {
6
6
  "name": "TwinsEarth"
7
7
  },
package/CHANGELOG.md CHANGED
@@ -4,6 +4,41 @@ All notable changes to this project are documented here.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [3.1.0] - 2026-11-14
8
+
9
+ - 队列子插件:`@twinsearth/dsh-fang-queue-journal`(瓮城)移植为 `@twinsearth/w2m-dsh-plugin/queue-journal`。
10
+ Fang 的包只有空宿主(`apply(){}`),HTTP 面在 fang orchestrator 里;W2M 没有 orchestrator,所以
11
+ `src/queue-journal/index.mjs` 自带存储与四条路由,线上形状与移植的客户端完全一致:
12
+ `GET/POST /api/w2m/composer/journal`(单条/恢复列表)、`GET /api/w2m/composer/journal/history`
13
+ (append-only 快照,可按 sessionKey 过滤)、`POST /api/w2m/composer/queue`(恢复到会话收件箱;
14
+ 无 live agent 时返回 `session-not-live`,绝不假装入队)。
15
+ - 存储 `ComposerJournal` 逐字移植(`src/queue-journal/lib/composer-journal.mjs`),数据落在
16
+ `$DSH_HOME/xclient/queue-journal`;保存上限、历史上限与原子写保持不变。
17
+ - 客户端:Fang 的独立客户端模块(`window.__ModuleLoader__.load`)展开成 W2M 单一客户端 bundle 里的
18
+ `createQueueJournalModule()`,由根 `apply(ctx)` 挂到 `conversation.composer.dock`:草稿输入捕获、
19
+ queue dock 的 MutationObserver、15 秒兜底与 pagehide flush 全部保留;恢复只能由用户显式点击。
20
+ Fang 的 `x-fang-auth` 取 token 逻辑替换为同源占位(W2M 路由走 cookie 鉴权)。
21
+ - 测试:新增 `test/queue-journal.test.mjs` 4 项(保存/读回/恢复列表、历史过滤、缺 key 拒绝、
22
+ 非 live 会话拒绝恢复);client-bundle 的座位断言更新为 17 个(新增队列 dock)。
23
+
24
+ ## [3.0.0] - 2026-11-14
25
+
26
+ - 决策中心子插件:`@twinsearth/dsh-fang/decision-center`(瓮城)完整移植为
27
+ `@twinsearth/w2m-dsh-plugin/decision-center`。宿主模块逐字移植(`src/decision-center/index.mjs`,
28
+ 27 个服务方法、`request_human_decision` 工具),四个依赖(AI 密钥库、决策 outbox、生产者契约、
29
+ SSRF 守卫)与 MIT 内置 schemastery 原样随包;Fang 内核 barrel 由 `kernel.mjs` 顶替,提供同样的
30
+ `z`/`SERVICE`/bus/原子读写/数据目录解析/角色门。
31
+ - 新增 `/api/w2m/decisions*` 14 条路由:列表、单票、配额、分身聚合、生产者目录、外部 ingest、
32
+ SSE 实时推送、解决(含批量与 actionId)、放弃(含批量)、AI 状态/测试/配置/建议/流式建议;
33
+ `routes.mjs` 用 Connection fetch 注册表承载,SSE 事件名与负载与 Fang 一致。
34
+ - 决策中心面板进入 GPW:`GpwSettingsPage` 与 `GpwLauncher` 共用同一个 `GpwPanel`,因此设置页与浮标
35
+ 同时显示——4 秒轮询、红票置顶、绿/灰折叠、按票面选项一键解决、无选项可放弃、AI 建议只推荐不执行。
36
+ - 测试:移植 Fang 决策套件 79 项 + 新增路由面 3 项通过;Fang 的 Node-SSE 辅助(decision-events)与 fork 侧 ingest 客户端不随包(W2M 路由走 fetch SSE、没有 fork 半体)。
37
+ `decision-center-fork` 与 `decision-action-integration` 不移植:前者依赖 Fang 母体/分身角色矩阵,
38
+ 后者的主体是 Fang orchestrator 与 restart-guard,W2M 里没有对应组件。
39
+ - 包元数据:新增 `./decision-center` 子路径导出与`dsh-decision-center` patch 行(启用),
40
+ `engines.dsh` 保持 `>=0.2.0 <0.3.0`。
41
+
7
42
  ## [2.2.6] - 2026-11-14
8
43
 
9
44
  - Fixes 搜索本对话: the walk covered only the viewport and stopped counting at six matches, so a
package/README.md CHANGED
@@ -93,7 +93,7 @@ w2m-mcp --help
93
93
  # 复制进你自己的 codex/mcp-servers.toml
94
94
  [mcp_servers.w2m]
95
95
  command = "npx"
96
- args = ["-y", "@twinsearth/w2m-dsh-plugin@2.2.6", "w2m-mcp"]
96
+ args = ["-y", "@twinsearth/w2m-dsh-plugin@3.1.0", "w2m-mcp"]
97
97
  ```
98
98
 
99
99
  ### 5. 验证过的 release tarball(离线)
@@ -12,6 +12,6 @@
12
12
 
13
13
  [mcp_servers.w2m-fleet]
14
14
  command = "npx"
15
- args = ["-y", "-p", "@twinsearth/w2m-dsh-plugin@2.2.6", "w2m-mcp"]
15
+ args = ["-y", "-p", "@twinsearth/w2m-dsh-plugin@3.1.0", "w2m-mcp"]
16
16
  startup_timeout_sec = 20
17
17
  tool_timeout_sec = 60
package/cordis.patch.yml CHANGED
@@ -144,4 +144,20 @@
144
144
  whitelist: []
145
145
  blacklist: []
146
146
  pendingTimeoutMs: 120000
147
+ # 决策中心 (decision center): the human-attention queue, ported from dsh-Fang's
148
+ # `@twinsearth/dsh-fang/decision-center` in v3.0.0.
149
+ #
150
+ # Unlike GPW this row is **enabled**: the center is the panel the GPW settings page and the GPW
151
+ # floating launcher render (read through /api/w2m/decisions), and a disabled row would leave that
152
+ # panel with no store behind it. The store lives under $DSH_HOME/xclient/decision-center; the row
153
+ # carries no config so the plugin's own defaults apply.
154
+ # 队列日志 (queue journal): composer drafts and the queue mirror, ported from dsh-Fang's
155
+ # @twinsearth/dsh-fang-queue-journal in v3.1.0. Enabled so the composer dock appears.
156
+ - id: dsh-queue-journal
157
+ name: '@twinsearth/w2m-dsh-plugin/queue-journal'
158
+ config: {}
159
+ - id: dsh-decision-center
160
+ name: '@twinsearth/w2m-dsh-plugin/decision-center'
161
+ config: {}
162
+
147
163
 
@@ -0,0 +1,52 @@
1
+ {
2
+ "version": "3.0.0",
3
+ "case": "RELEASE-3000",
4
+ "kind": "positive",
5
+ "machines": [
6
+ "b53a37f4-1464-4512-9259-33a7df091e3e"
7
+ ],
8
+ "executed_at": "2026-11-13T20:45:02.369Z",
9
+ "executor": "lead",
10
+ "task_id": "pre-release-3000",
11
+ "requirement": "v3.0.0: the Fang decision center is ported to W2M as @twinsearth/w2m-dsh-plugin/decision-center (host module, /api/w2m/decisions* routes, GPW page and GPW launcher panel) and its ported test suites pass",
12
+ "commands": [
13
+ [
14
+ "node",
15
+ "--test",
16
+ "--test-force-exit",
17
+ "test/decision-center.test.mjs",
18
+ "test/decision-routes.test.mjs",
19
+ "test/decision-events.test.mjs",
20
+ "test/decision-ingest-client.test.mjs",
21
+ "test/decision-outbox.test.mjs"
22
+ ],
23
+ [
24
+ "node",
25
+ "--test",
26
+ "--test-force-exit",
27
+ "test/client-bundle.test.mjs"
28
+ ],
29
+ [
30
+ "node",
31
+ "--test",
32
+ "--test-force-exit",
33
+ "test/loader-entry.test.mjs"
34
+ ],
35
+ [
36
+ "node",
37
+ "scripts/pack.mjs"
38
+ ]
39
+ ],
40
+ "result": {
41
+ "outcome": "ok",
42
+ "assertions": {
43
+ "port": "src/decision-center/index.mjs is the Fang plugin module with import specifiers and plugin name rewritten only; its four lib dependencies and the MIT schemastery are copied verbatim, and kernel.mjs supplies the Fang kernel names on W2M paths",
44
+ "service": "apply() provides w2mDecisionCenter with 27 methods and registers request_human_decision / ask_user_choice",
45
+ "routes": "14 /api/w2m/decisions* routes registered on the connection fetch registry, including the SSE events and AI advise streams; create -> list -> item -> quota -> resolve round-trips through HTTP",
46
+ "panel": "DecisionCenterSection renders inside GpwPanel, which GpwSettingsPage embeds and GpwLauncher opens, so the GPW page and the GPW launcher show the same center; it polls every 4s, groups by level, resolves via the ticket options, abandons option-less tickets and only displays AI advice",
47
+ "suites": "92 tests pass: 79 ported Fang decision-center tests + 10 outbox/events/ingest tests + 3 new route-surface tests",
48
+ "not_ported": "decision-center-fork and decision-action-integration stay out: the former needs the Fang mother/fork role matrix, the latter the Fang orchestrator and restart-guard, neither of which exists in W2M",
49
+ "artifact": "scripts/pack.mjs packs dist/twinsearth-w2m-dsh-plugin-3.0.0.tgz deterministically; the published sha256 is the one release.yml writes into dist/SHA256SUMS, so the record does not restate the hash of the archive that contains it"
50
+ }
51
+ }
52
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "version": "3.1.0",
3
+ "case": "RELEASE-3100",
4
+ "kind": "positive",
5
+ "machines": [
6
+ "b53a37f4-1464-4512-9259-33a7df091e3e"
7
+ ],
8
+ "executed_at": "2026-11-13T21:00:13.167Z",
9
+ "executor": "lead",
10
+ "task_id": "pre-release-3100",
11
+ "requirement": "v3.1.0: the Fang queue journal is ported to W2M as @twinsearth/w2m-dsh-plugin/queue-journal (store + four /api/w2m/composer/* routes + composer dock client UI in the single client bundle) and its tests pass",
12
+ "commands": [
13
+ [
14
+ "node",
15
+ "--test",
16
+ "--test-force-exit",
17
+ "test/queue-journal.test.mjs"
18
+ ],
19
+ [
20
+ "node",
21
+ "--test",
22
+ "--test-force-exit",
23
+ "test/client-bundle.test.mjs"
24
+ ],
25
+ [
26
+ "node",
27
+ "--test",
28
+ "--test-force-exit",
29
+ "test/loader-entry.test.mjs"
30
+ ],
31
+ [
32
+ "node",
33
+ "scripts/pack.mjs"
34
+ ]
35
+ ],
36
+ "result": {
37
+ "outcome": "ok",
38
+ "assertions": {
39
+ "store": "ComposerJournal is copied verbatim from Fang (src/queue-journal/lib/composer-journal.mjs); its data directory defaults to $DSH_HOME/xclient/queue-journal",
40
+ "routes": "GET/POST /api/w2m/composer/journal, GET /api/w2m/composer/journal/history and POST /api/w2m/composer/queue are registered on the connection fetch registry; the restore route answers session-not-live (409) when no live agent can take the rows, exactly as the Fang route did",
41
+ "client": "createQueueJournalModule() in lib/client.js is the Fang factory body with only the auth-token shim and /fang/api -> /api/w2m rewrites; the root apply(ctx) mounts it on conversation.composer.dock, so the draft/queue journal UI appears in the composer dock",
42
+ "suites": "queue-journal 4/4 and client bundle 36/36 (the seat expectation now lists 17 seats including conversation.composer.dock)",
43
+ "artifact": "scripts/pack.mjs packs dist/twinsearth-w2m-dsh-plugin-3.1.0.tgz deterministically; the published sha256 is the one release.yml writes into dist/SHA256SUMS, so the record does not restate the hash of the archive that contains it"
44
+ }
45
+ }
46
+ }