dsh-windows-parallel-mcp 0.12.0-rc.1 → 0.12.0-rc.2

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.de.md CHANGED
@@ -37,6 +37,21 @@ pid, serial wall time, zero restarts); `plugin-test` pins the idle-status render
37
37
  fields and the `engine_busy` split land with rc.2/rc.3.
38
38
 
39
39
 
40
+ ## 0.12.0-rc.2 — 2026-11-29 (prerelease)
41
+
42
+ **Queueing and wedging are different failures, and now they have different deadlines.**
43
+ `WorkerClient` takes `queueTimeoutMs` (default 5000): a request that waits that long behind an
44
+ in-flight action is refused with the new `engine_busy` code and **never written** -- the worker
45
+ survives, and so does the call it is running (pre-0.12.0 the queued request's own timer eventually
46
+ fired `child.kill()` and took the in-flight call down: F5/G4). `requestTimeoutMs` keeps its old
47
+ meaning, silent-in-flight -> latch, kill, restart. `engine_busy` joins the three-source refusal
48
+ vocabulary (20 codes) as a HOST-emitted runtime code -- retry is the right advice here, unlike
49
+ `worker_wedged` -- and the tool layer maps the rejection to the code instead of `action_failed`.
50
+ `test/worker-smoke.mjs` §10 is the P0-e scenario finally driven for real: a 2.5s injected-slow
51
+ worker plus a 600ms queue deadline -> queued caller refused, in-flight call completes, zero
52
+ restarts, client still serves afterwards.
53
+
54
+
40
55
  ## 0.11.0 — 2026-11-29
41
56
 
42
57
  **State and recovery: the restart counter has teeth, and a kill cleans up.** Promotes the
package/CHANGELOG.es.md CHANGED
@@ -37,6 +37,21 @@ pid, serial wall time, zero restarts); `plugin-test` pins the idle-status render
37
37
  fields and the `engine_busy` split land with rc.2/rc.3.
38
38
 
39
39
 
40
+ ## 0.12.0-rc.2 — 2026-11-29 (prerelease)
41
+
42
+ **Queueing and wedging are different failures, and now they have different deadlines.**
43
+ `WorkerClient` takes `queueTimeoutMs` (default 5000): a request that waits that long behind an
44
+ in-flight action is refused with the new `engine_busy` code and **never written** -- the worker
45
+ survives, and so does the call it is running (pre-0.12.0 the queued request's own timer eventually
46
+ fired `child.kill()` and took the in-flight call down: F5/G4). `requestTimeoutMs` keeps its old
47
+ meaning, silent-in-flight -> latch, kill, restart. `engine_busy` joins the three-source refusal
48
+ vocabulary (20 codes) as a HOST-emitted runtime code -- retry is the right advice here, unlike
49
+ `worker_wedged` -- and the tool layer maps the rejection to the code instead of `action_failed`.
50
+ `test/worker-smoke.mjs` §10 is the P0-e scenario finally driven for real: a 2.5s injected-slow
51
+ worker plus a 600ms queue deadline -> queued caller refused, in-flight call completes, zero
52
+ restarts, client still serves afterwards.
53
+
54
+
40
55
  ## 0.11.0 — 2026-11-29
41
56
 
42
57
  **State and recovery: the restart counter has teeth, and a kill cleans up.** Promotes the
package/CHANGELOG.fr.md CHANGED
@@ -37,6 +37,21 @@ pid, serial wall time, zero restarts); `plugin-test` pins the idle-status render
37
37
  fields and the `engine_busy` split land with rc.2/rc.3.
38
38
 
39
39
 
40
+ ## 0.12.0-rc.2 — 2026-11-29 (prerelease)
41
+
42
+ **Queueing and wedging are different failures, and now they have different deadlines.**
43
+ `WorkerClient` takes `queueTimeoutMs` (default 5000): a request that waits that long behind an
44
+ in-flight action is refused with the new `engine_busy` code and **never written** -- the worker
45
+ survives, and so does the call it is running (pre-0.12.0 the queued request's own timer eventually
46
+ fired `child.kill()` and took the in-flight call down: F5/G4). `requestTimeoutMs` keeps its old
47
+ meaning, silent-in-flight -> latch, kill, restart. `engine_busy` joins the three-source refusal
48
+ vocabulary (20 codes) as a HOST-emitted runtime code -- retry is the right advice here, unlike
49
+ `worker_wedged` -- and the tool layer maps the rejection to the code instead of `action_failed`.
50
+ `test/worker-smoke.mjs` §10 is the P0-e scenario finally driven for real: a 2.5s injected-slow
51
+ worker plus a 600ms queue deadline -> queued caller refused, in-flight call completes, zero
52
+ restarts, client still serves afterwards.
53
+
54
+
40
55
  ## 0.11.0 — 2026-11-29
41
56
 
42
57
  **State and recovery: the restart counter has teeth, and a kill cleans up.** Promotes the
package/CHANGELOG.it.md CHANGED
@@ -37,6 +37,21 @@ pid, serial wall time, zero restarts); `plugin-test` pins the idle-status render
37
37
  fields and the `engine_busy` split land with rc.2/rc.3.
38
38
 
39
39
 
40
+ ## 0.12.0-rc.2 — 2026-11-29 (prerelease)
41
+
42
+ **Queueing and wedging are different failures, and now they have different deadlines.**
43
+ `WorkerClient` takes `queueTimeoutMs` (default 5000): a request that waits that long behind an
44
+ in-flight action is refused with the new `engine_busy` code and **never written** -- the worker
45
+ survives, and so does the call it is running (pre-0.12.0 the queued request's own timer eventually
46
+ fired `child.kill()` and took the in-flight call down: F5/G4). `requestTimeoutMs` keeps its old
47
+ meaning, silent-in-flight -> latch, kill, restart. `engine_busy` joins the three-source refusal
48
+ vocabulary (20 codes) as a HOST-emitted runtime code -- retry is the right advice here, unlike
49
+ `worker_wedged` -- and the tool layer maps the rejection to the code instead of `action_failed`.
50
+ `test/worker-smoke.mjs` §10 is the P0-e scenario finally driven for real: a 2.5s injected-slow
51
+ worker plus a 600ms queue deadline -> queued caller refused, in-flight call completes, zero
52
+ restarts, client still serves afterwards.
53
+
54
+
40
55
  ## 0.11.0 — 2026-11-29
41
56
 
42
57
  **State and recovery: the restart counter has teeth, and a kill cleans up.** Promotes the
package/CHANGELOG.ja.md CHANGED
@@ -37,6 +37,21 @@ pid, serial wall time, zero restarts); `plugin-test` pins the idle-status render
37
37
  fields and the `engine_busy` split land with rc.2/rc.3.
38
38
 
39
39
 
40
+ ## 0.12.0-rc.2 — 2026-11-29 (prerelease)
41
+
42
+ **Queueing and wedging are different failures, and now they have different deadlines.**
43
+ `WorkerClient` takes `queueTimeoutMs` (default 5000): a request that waits that long behind an
44
+ in-flight action is refused with the new `engine_busy` code and **never written** -- the worker
45
+ survives, and so does the call it is running (pre-0.12.0 the queued request's own timer eventually
46
+ fired `child.kill()` and took the in-flight call down: F5/G4). `requestTimeoutMs` keeps its old
47
+ meaning, silent-in-flight -> latch, kill, restart. `engine_busy` joins the three-source refusal
48
+ vocabulary (20 codes) as a HOST-emitted runtime code -- retry is the right advice here, unlike
49
+ `worker_wedged` -- and the tool layer maps the rejection to the code instead of `action_failed`.
50
+ `test/worker-smoke.mjs` §10 is the P0-e scenario finally driven for real: a 2.5s injected-slow
51
+ worker plus a 600ms queue deadline -> queued caller refused, in-flight call completes, zero
52
+ restarts, client still serves afterwards.
53
+
54
+
40
55
  ## 0.11.0 — 2026-11-29
41
56
 
42
57
  **State and recovery: the restart counter has teeth, and a kill cleans up.** Promotes the
package/CHANGELOG.ko.md CHANGED
@@ -37,6 +37,21 @@ pid, serial wall time, zero restarts); `plugin-test` pins the idle-status render
37
37
  fields and the `engine_busy` split land with rc.2/rc.3.
38
38
 
39
39
 
40
+ ## 0.12.0-rc.2 — 2026-11-29 (prerelease)
41
+
42
+ **Queueing and wedging are different failures, and now they have different deadlines.**
43
+ `WorkerClient` takes `queueTimeoutMs` (default 5000): a request that waits that long behind an
44
+ in-flight action is refused with the new `engine_busy` code and **never written** -- the worker
45
+ survives, and so does the call it is running (pre-0.12.0 the queued request's own timer eventually
46
+ fired `child.kill()` and took the in-flight call down: F5/G4). `requestTimeoutMs` keeps its old
47
+ meaning, silent-in-flight -> latch, kill, restart. `engine_busy` joins the three-source refusal
48
+ vocabulary (20 codes) as a HOST-emitted runtime code -- retry is the right advice here, unlike
49
+ `worker_wedged` -- and the tool layer maps the rejection to the code instead of `action_failed`.
50
+ `test/worker-smoke.mjs` §10 is the P0-e scenario finally driven for real: a 2.5s injected-slow
51
+ worker plus a 600ms queue deadline -> queued caller refused, in-flight call completes, zero
52
+ restarts, client still serves afterwards.
53
+
54
+
40
55
  ## 0.11.0 — 2026-11-29
41
56
 
42
57
  **State and recovery: the restart counter has teeth, and a kill cleans up.** Promotes the
package/CHANGELOG.md CHANGED
@@ -34,6 +34,21 @@ pid, serial wall time, zero restarts); `plugin-test` pins the idle-status render
34
34
  fields and the `engine_busy` split land with rc.2/rc.3.
35
35
 
36
36
 
37
+ ## 0.12.0-rc.2 — 2026-11-29 (prerelease)
38
+
39
+ **Queueing and wedging are different failures, and now they have different deadlines.**
40
+ `WorkerClient` takes `queueTimeoutMs` (default 5000): a request that waits that long behind an
41
+ in-flight action is refused with the new `engine_busy` code and **never written** -- the worker
42
+ survives, and so does the call it is running (pre-0.12.0 the queued request's own timer eventually
43
+ fired `child.kill()` and took the in-flight call down: F5/G4). `requestTimeoutMs` keeps its old
44
+ meaning, silent-in-flight -> latch, kill, restart. `engine_busy` joins the three-source refusal
45
+ vocabulary (20 codes) as a HOST-emitted runtime code -- retry is the right advice here, unlike
46
+ `worker_wedged` -- and the tool layer maps the rejection to the code instead of `action_failed`.
47
+ `test/worker-smoke.mjs` §10 is the P0-e scenario finally driven for real: a 2.5s injected-slow
48
+ worker plus a 600ms queue deadline -> queued caller refused, in-flight call completes, zero
49
+ restarts, client still serves afterwards.
50
+
51
+
37
52
  ## 0.11.0 — 2026-11-29
38
53
 
39
54
  **State and recovery: the restart counter has teeth, and a kill cleans up.** Promotes the
package/CHANGELOG.pt.md CHANGED
@@ -37,6 +37,21 @@ pid, serial wall time, zero restarts); `plugin-test` pins the idle-status render
37
37
  fields and the `engine_busy` split land with rc.2/rc.3.
38
38
 
39
39
 
40
+ ## 0.12.0-rc.2 — 2026-11-29 (prerelease)
41
+
42
+ **Queueing and wedging are different failures, and now they have different deadlines.**
43
+ `WorkerClient` takes `queueTimeoutMs` (default 5000): a request that waits that long behind an
44
+ in-flight action is refused with the new `engine_busy` code and **never written** -- the worker
45
+ survives, and so does the call it is running (pre-0.12.0 the queued request's own timer eventually
46
+ fired `child.kill()` and took the in-flight call down: F5/G4). `requestTimeoutMs` keeps its old
47
+ meaning, silent-in-flight -> latch, kill, restart. `engine_busy` joins the three-source refusal
48
+ vocabulary (20 codes) as a HOST-emitted runtime code -- retry is the right advice here, unlike
49
+ `worker_wedged` -- and the tool layer maps the rejection to the code instead of `action_failed`.
50
+ `test/worker-smoke.mjs` §10 is the P0-e scenario finally driven for real: a 2.5s injected-slow
51
+ worker plus a 600ms queue deadline -> queued caller refused, in-flight call completes, zero
52
+ restarts, client still serves afterwards.
53
+
54
+
40
55
  ## 0.11.0 — 2026-11-29
41
56
 
42
57
  **State and recovery: the restart counter has teeth, and a kill cleans up.** Promotes the
package/CHANGELOG.ru.md CHANGED
@@ -37,6 +37,21 @@ pid, serial wall time, zero restarts); `plugin-test` pins the idle-status render
37
37
  fields and the `engine_busy` split land with rc.2/rc.3.
38
38
 
39
39
 
40
+ ## 0.12.0-rc.2 — 2026-11-29 (prerelease)
41
+
42
+ **Queueing and wedging are different failures, and now they have different deadlines.**
43
+ `WorkerClient` takes `queueTimeoutMs` (default 5000): a request that waits that long behind an
44
+ in-flight action is refused with the new `engine_busy` code and **never written** -- the worker
45
+ survives, and so does the call it is running (pre-0.12.0 the queued request's own timer eventually
46
+ fired `child.kill()` and took the in-flight call down: F5/G4). `requestTimeoutMs` keeps its old
47
+ meaning, silent-in-flight -> latch, kill, restart. `engine_busy` joins the three-source refusal
48
+ vocabulary (20 codes) as a HOST-emitted runtime code -- retry is the right advice here, unlike
49
+ `worker_wedged` -- and the tool layer maps the rejection to the code instead of `action_failed`.
50
+ `test/worker-smoke.mjs` §10 is the P0-e scenario finally driven for real: a 2.5s injected-slow
51
+ worker plus a 600ms queue deadline -> queued caller refused, in-flight call completes, zero
52
+ restarts, client still serves afterwards.
53
+
54
+
40
55
  ## 0.11.0 — 2026-11-29
41
56
 
42
57
  **State and recovery: the restart counter has teeth, and a kill cleans up.** Promotes the
package/CHANGELOG.zh.md CHANGED
@@ -37,6 +37,21 @@ pid, serial wall time, zero restarts); `plugin-test` pins the idle-status render
37
37
  fields and the `engine_busy` split land with rc.2/rc.3.
38
38
 
39
39
 
40
+ ## 0.12.0-rc.2 — 2026-11-29 (prerelease)
41
+
42
+ **Queueing and wedging are different failures, and now they have different deadlines.**
43
+ `WorkerClient` takes `queueTimeoutMs` (default 5000): a request that waits that long behind an
44
+ in-flight action is refused with the new `engine_busy` code and **never written** -- the worker
45
+ survives, and so does the call it is running (pre-0.12.0 the queued request's own timer eventually
46
+ fired `child.kill()` and took the in-flight call down: F5/G4). `requestTimeoutMs` keeps its old
47
+ meaning, silent-in-flight -> latch, kill, restart. `engine_busy` joins the three-source refusal
48
+ vocabulary (20 codes) as a HOST-emitted runtime code -- retry is the right advice here, unlike
49
+ `worker_wedged` -- and the tool layer maps the rejection to the code instead of `action_failed`.
50
+ `test/worker-smoke.mjs` §10 is the P0-e scenario finally driven for real: a 2.5s injected-slow
51
+ worker plus a 600ms queue deadline -> queued caller refused, in-flight call completes, zero
52
+ restarts, client still serves afterwards.
53
+
54
+
40
55
  ## 0.11.0 — 2026-11-29
41
56
 
42
57
  **State and recovery: the restart counter has teeth, and a kill cleans up.** Promotes the
package/README.de.md CHANGED
@@ -5,7 +5,7 @@
5
5
  > Ein DSH-Plugin, mit dem ein Agent **seine eigenen** Windows-Fenster steuert — standardmäßig still, auf Anfrage sichtbar. Wenn ein Fenster Windows-Nachrichten akzeptiert, wird der Fokus nie entzogen. Wenn nur UI Automation es erreicht, gibt es einen einzigen begrenzten Fokus-Blitz, der automatisch rückgängig gemacht wird. Wenn Sie den Takeover-Modus ausdrücklich anfordern, bewegt sich der Cursor zum Aktionspunkt und wird immer wiederhergestellt; ein HUD bietet drei Möglichkeiten zum Abbruch. Überall anders wird mit Code und Grund abgelehnt.
6
6
 
7
7
  > **English canonical text follows.** The localized summary above is the orientation; the text below is the authoritative specification (structure, commands and numbers are identical across all 10 languages).
8
- > **Current release: 0.12.0-rc.1** — this document describes the contract as of that version. What
8
+ > **Current release: 0.12.0-rc.2** — this document describes the contract as of that version. What
9
9
  > changed in it, and in every version before it, is in [CHANGELOG.md](CHANGELOG.md), newest first.
10
10
 
11
11
  A DSH plugin that lets an agent drive **its own** Windows windows — quietly by default, and visibly
package/README.es.md CHANGED
@@ -5,7 +5,7 @@
5
5
  > Un plugin DSH que permite a un agente controlar **sus propias** ventanas de Windows — silencioso por defecto, visible cuando se pide. Cuando una ventana acepta mensajes de Windows, el foco nunca se pierde. Cuando solo UI Automation puede alcanzarla, el foco sufre un único destello acotado que se revierte automáticamente. Cuando pides explícitamente el modo takeover, el cursor se mueve al punto de acción y siempre se restaura, con un HUD que ofrece tres formas de interrumpir. En cualquier otro caso, rechaza con un código y una razón.
6
6
 
7
7
  > **English canonical text follows.** The localized summary above is the orientation; the text below is the authoritative specification (structure, commands and numbers are identical across all 10 languages).
8
- > **Current release: 0.12.0-rc.1** — this document describes the contract as of that version. What
8
+ > **Current release: 0.12.0-rc.2** — this document describes the contract as of that version. What
9
9
  > changed in it, and in every version before it, is in [CHANGELOG.md](CHANGELOG.md), newest first.
10
10
 
11
11
  A DSH plugin that lets an agent drive **its own** Windows windows — quietly by default, and visibly
package/README.fr.md CHANGED
@@ -5,7 +5,7 @@
5
5
  > Un plugin DSH qui laisse un agent piloter **ses propres** fenêtres Windows — discrètement par défaut, visiblement sur demande. Quand une fenêtre accepte un message Windows, le focus n'est jamais volé. Quand seule l'UI Automation peut l'atteindre, le focus connaît un seul flash borné, automatiquement réversible. Quand vous demandez explicitement le mode takeover, le curseur se déplace vers le point d'action et est toujours restauré, avec un HUD offrant trois façons d'interrompre. Partout ailleurs, le plugin refuse avec un code et une raison.
6
6
 
7
7
  > **English canonical text follows.** The localized summary above is the orientation; the text below is the authoritative specification (structure, commands and numbers are identical across all 10 languages).
8
- > **Current release: 0.12.0-rc.1** — this document describes the contract as of that version. What
8
+ > **Current release: 0.12.0-rc.2** — this document describes the contract as of that version. What
9
9
  > changed in it, and in every version before it, is in [CHANGELOG.md](CHANGELOG.md), newest first.
10
10
 
11
11
  A DSH plugin that lets an agent drive **its own** Windows windows — quietly by default, and visibly
package/README.it.md CHANGED
@@ -5,7 +5,7 @@
5
5
  > Un plugin DSH che consente a un agente di pilotare **le proprie** finestre Windows — silenzioso per impostazione predefinita, visibile su richiesta. Quando una finestra accetta un messaggio Windows, il focus non viene mai sottratto. Quando solo UI Automation può raggiungerla, il focus subisce un solo lampo limitato e viene ripristinato automaticamente. Quando richiedi esplicitamente la modalità takeover, il cursore si sposta sul punto di azione e viene sempre ripristinato, con un HUD che offre tre modi per interrompere. In tutti gli altri casi rifiuta con un codice e una ragione.
6
6
 
7
7
  > **English canonical text follows.** The localized summary above is the orientation; the text below is the authoritative specification (structure, commands and numbers are identical across all 10 languages).
8
- > **Current release: 0.12.0-rc.1** — this document describes the contract as of that version. What
8
+ > **Current release: 0.12.0-rc.2** — this document describes the contract as of that version. What
9
9
  > changed in it, and in every version before it, is in [CHANGELOG.md](CHANGELOG.md), newest first.
10
10
 
11
11
  A DSH plugin that lets an agent drive **its own** Windows windows — quietly by default, and visibly
package/README.ja.md CHANGED
@@ -5,7 +5,7 @@
5
5
  > エージェントが**自分の** Windows ウィンドウを操作するための DSH プラグインです。既定では静默、要求があれば可視化します。ウィンドウがウィンドウメッセージを受け付ける場合、フォーカスは一切奪われません。UI Automation 経由でしか届かない場合、フォーカスは一度だけ有界なフラッシュで移り自動で戻ります。明示的にテイクオーバーを要求した場合、カーソルは操作点へ移動し常に復元され、HUD が三つの中断手段を提供します。それ以外はコードと理由を添えて拒否します。
6
6
 
7
7
  > **English canonical text follows.** The localized summary above is the orientation; the text below is the authoritative specification (structure, commands and numbers are identical across all 10 languages).
8
- > **Current release: 0.12.0-rc.1** — this document describes the contract as of that version. What
8
+ > **Current release: 0.12.0-rc.2** — this document describes the contract as of that version. What
9
9
  > changed in it, and in every version before it, is in [CHANGELOG.md](CHANGELOG.md), newest first.
10
10
 
11
11
  A DSH plugin that lets an agent drive **its own** Windows windows — quietly by default, and visibly
package/README.ko.md CHANGED
@@ -5,7 +5,7 @@
5
5
  > 에이전트가 **자신의** Windows 창을 조작하도록 하는 DSH 플러그인입니다. 기본은 조용히, 요청 시에는 눈에 보이게 동작합니다. 창이 창 메시지를 받으면 포커스를 전혀 빼앗지 않고, UI Automation으로만 도달 가능하면 포커스가 한 번의 제한된 플래시로 이동한 뒤 자동 복구됩니다. 테이크오버를 명시적으로 요청하면 커서가 동작 지점으로 이동해 항상 복원되며 HUD가 세 가지 중단 수단을 제공합니다. 그 밖의 경우에는 코드와 이유를 붙여 거부합니다.
6
6
 
7
7
  > **English canonical text follows.** The localized summary above is the orientation; the text below is the authoritative specification (structure, commands and numbers are identical across all 10 languages).
8
- > **Current release: 0.12.0-rc.1** — this document describes the contract as of that version. What
8
+ > **Current release: 0.12.0-rc.2** — this document describes the contract as of that version. What
9
9
  > changed in it, and in every version before it, is in [CHANGELOG.md](CHANGELOG.md), newest first.
10
10
 
11
11
  A DSH plugin that lets an agent drive **its own** Windows windows — quietly by default, and visibly
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # dsh-windows-parallel-mcp
2
2
 
3
3
  **English** · [中文](README.zh.md) · [日本語](README.ja.md) · [한국어](README.ko.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Italiano](README.it.md) · [Español](README.es.md) · [Português](README.pt.md) · [Русский](README.ru.md)
4
- > **Current release: 0.12.0-rc.1** — this document describes the contract as of that version. What
4
+ > **Current release: 0.12.0-rc.2** — this document describes the contract as of that version. What
5
5
  > changed in it, and in every version before it, is in [CHANGELOG.md](CHANGELOG.md), newest first.
6
6
 
7
7
  A DSH plugin that lets an agent drive **its own** Windows windows — quietly by default, and visibly
package/README.pt.md CHANGED
@@ -5,7 +5,7 @@
5
5
  > Um plugin DSH que permite a um agente controlar **as suas próprias** janelas Windows — silencioso por padrão, visível sob demanda. Quando uma janela aceita mensagens do Windows, o foco nunca é roubado. Quando apenas a Automação de UI a alcança, o foco sofre um único lampejo limitado, revertido automaticamente. Quando você solicita explicitamente o modo takeover, o cursor move-se para o ponto de ação e é sempre restaurado, com um HUD que oferece três formas de interrupção. Em todos os outros casos, recusa com um código e um motivo.
6
6
 
7
7
  > **English canonical text follows.** The localized summary above is the orientation; the text below is the authoritative specification (structure, commands and numbers are identical across all 10 languages).
8
- > **Current release: 0.12.0-rc.1** — this document describes the contract as of that version. What
8
+ > **Current release: 0.12.0-rc.2** — this document describes the contract as of that version. What
9
9
  > changed in it, and in every version before it, is in [CHANGELOG.md](CHANGELOG.md), newest first.
10
10
 
11
11
  A DSH plugin that lets an agent drive **its own** Windows windows — quietly by default, and visibly
package/README.ru.md CHANGED
@@ -5,7 +5,7 @@
5
5
  > Плагин DSH, позволяющий агенту управлять **своими** окнами Windows — по умолчанию тихо, по запросу видимо. Когда окно принимает сообщения Windows, фокус никогда не перехватывается. Когда доступен только UI Automation, фокус претерпевает одну ограниченную вспышку и автоматически возвращается. При явном запросе режима takeover курсор перемещается в точку действия и всегда восстанавливается, а HUD предлагает три способа прерывания. Во всех остальных случаях действие отклоняется с кодом и причиной.
6
6
 
7
7
  > **English canonical text follows.** The localized summary above is the orientation; the text below is the authoritative specification (structure, commands and numbers are identical across all 10 languages).
8
- > **Current release: 0.12.0-rc.1** — this document describes the contract as of that version. What
8
+ > **Current release: 0.12.0-rc.2** — this document describes the contract as of that version. What
9
9
  > changed in it, and in every version before it, is in [CHANGELOG.md](CHANGELOG.md), newest first.
10
10
 
11
11
  A DSH plugin that lets an agent drive **its own** Windows windows — quietly by default, and visibly
package/README.zh.md CHANGED
@@ -5,7 +5,7 @@
5
5
  > 一个让代理驱动**自己**的 Windows 窗口的 DSH 插件——默认静默,按需可见。窗口接受窗口消息时完全不夺焦点;只有 UI Automation 可达时,焦点仅发生一次有界闪烁并自动还原;显式请求接管档时,光标移动到目标点并始终还原,HUD 提供三种中断方式。其他情况一律拒绝,并给出代码与原因。
6
6
 
7
7
  > **English canonical text follows.** The localized summary above is the orientation; the text below is the authoritative specification (structure, commands and numbers are identical across all 10 languages).
8
- > **Current release: 0.12.0-rc.1** — this document describes the contract as of that version. What
8
+ > **Current release: 0.12.0-rc.2** — this document describes the contract as of that version. What
9
9
  > changed in it, and in every version before it, is in [CHANGELOG.md](CHANGELOG.md), newest first.
10
10
 
11
11
  A DSH plugin that lets an agent drive **its own** Windows windows — quietly by default, and visibly
package/docs/refusals.md CHANGED
@@ -42,11 +42,11 @@ R2′ 把「拒绝」当成本产品的**正常结果**(`engine.ps1` 首段注
42
42
  | `takeover_unavailable` | `decide.ps1`(`facts.takeoverRequested && !facts.hudReady`);宿主侧 `lib/index.js` 在 `takeoverAllowed=false` 时直接拒,零 worker 请求 | 要求接管档,但**接管面不存在**:HUD 没起来,或设置里 `takeoverAllowed` 关着 | 在设置里打开 `takeoverAllowed`;HUD 是**硬前置**,不是装饰。不想接管就**去掉 `takeover:true`** 走静默档——本码存在的意义正是「绝不静默降级」 | **REAL** — `test/plugin-test.mjs`(宿主闸:默认关 + `takeover:true` ⇒ 该码且工作进程 0 请求);`test/takeover-test.ps1` 决策臂 |
43
43
  | `keyinject_unavailable` | `decide.ps1`(注入不在接管档内/`keyInjectAllowed` 关/目标不是前台且抬不起来);`engine.ps1`(发送瞬间前台已变) | 要求键盘注入,但注入会打到**别的窗口**或没被授权。依据是实测:`SendInput` 只写前台(`scripts/probe-sendinput-unicode.ps1` arm B:文本落在前台窗 B,而不是调用方以为的 A) | 先自己把目标切到前台(或用 `focus` 动作把它抬上来),或关掉 `keyInput` 用静默档;不允许「盲注入」 | **REAL** — `test/keyinject-test.ps1` K1(非前台拒绝,注入零次)、K5(双闸独立);判定层两条用例 |
44
44
 
45
- ## 运行时失败层(9 码,含 `invalid_argument` 与 `worker_wedged` 两道宿主闸)
45
+ ## 运行时失败层(10 码,含 `invalid_argument`、`worker_wedged` 与 `engine_busy` 三道宿主闸)
46
46
 
47
- 其中 `worker_wedged` 由宿主 JS 半(`lib/engine.js`)发出,其余出处见表;宿主既然替引擎
48
- 决定「不再重启」,这个码的所有权就在宿主,`scripts/check-refusals.mjs` 把 `lib/engine.js`
49
- 一并纳入扫描正是为此(0.11.0)。
47
+ 其中 `worker_wedged` 与 `engine_busy` 由宿主 JS 半(`lib/engine.js`)发出,其余出处见表;宿主既然替引擎
48
+ 决定「不再重启」与「排队超时不发送」,这两个码的所有权就在宿主,`scripts/check-refusals.mjs` 把 `lib/engine.js`
49
+ 一并纳入扫描正是为此(0.11.0 起,0.12.0 追加 `engine_busy`)。
50
50
 
51
51
  | 码 | 触发条件 | 语义 | 下一步动作 | 实测状态 |
52
52
  |---|---|---|---|---|
@@ -58,7 +58,8 @@ R2′ 把「拒绝」当成本产品的**正常结果**(`engine.ps1` 首段注
58
58
  | `policy_denied` | `lib/index.js`(前 worker 闸)、`decide.ps1`(引擎侧二道) | 这个动作声明的最低档(`tools.json#requiresTier`)高于 `policy` 设置允许的天花板。十一个动作对一个旋钮:新增能力不需要新增开关 | 唯一正确的下一步是**改设置**(readonly < quiet < balanced < full),而不是重试同一个调用;结果里已写出需要哪一档、当前允许到哪一档。拒绝时零 worker 请求、不弹 HUD | **REAL** — `policy-ceiling-readonly`(readonly 天花板 + quiet 需求)与 `policy-ceiling-takeover`(两个 launch 开关都满足、仍因天花板不足被拒 ⇒ 证明两条轴真的正交)|
59
59
  | `user_active` | `decide.ps1`(仅对需要 takeover 档的动作) | 主人**正在用电脑**:`GetLastInputInfo` 测到的间隔小于 `policyIdleMs`(默认 3000ms)。与上游 Windows-MCP 的有意差异:上游即使你在用也会弹一个 10 秒倒计时对话框;我们不弹——弹框本身就是第二次打扰,而不是同意 | 等空闲后重试(或先 `action=status` 看 `lastHumanInputAgeMs`);确实需要在有人时用,就显式传 `forceUserActive:true`,它会进审计日志并标 `forced` | **REAL** — `test/refusals-test.ps1` 的 `user-active-takeover`(决策表:age=100 / idle=3000);引擎侧实测见 `test/takeover-test.ps1`(长文本中途中断臂) |
60
60
  | `invalid_argument` | `lib/index.js`(`refuseOutOfRange`,前 worker)、`engine.ps1`(`Invoke-WpmAction` / `Invoke-WpmDesktopAction` 边界块,与宿主平行二道) | 0.9.0 参数契约:数字参数越出本表声明的区间(或该取整处来了小数)。0.9.0 之前是**静默改写**——`maxElements:0` 变 1、`maxWidth:-5` 变「不限」、`label:2.7` 变 3,调用方拿着被改过的值行动却毫不知情 | 按声明区间重发(`snapshot.maxElements∈[1,5000]`、`screenshot.maxWidth∈[0,7680]`、`launch.waitMs∈[0,30000]`、`takeoverMaxMs∈[500,60000]`、`label` 为 ≥1 整数);不要原样重试 | **REAL** — `test/refusals-test.ps1` 的 `snapshot-max-elements-out-of-range` / `screenshot-max-width-negative` / `launch-wait-ms-over-max` 三例;宿主侧断言见 `test/plugin-test.mjs`(refuseOutOfRange 臂) |
61
- | `worker_wedged` | `lib/engine.js`(`start()` 的 `maxRestarts` 闸,0.11.0 G3)——**唯一由宿主 JS 半发出的码**,引擎半不可能报它(引擎正是那个已经不在了的东西) | worker 已死到重启预算(默认 3 次)的上限,宿主拒绝再 spawn 新进程;本次调用**什么都没执行**。0.11.0 之前计数器存在但无人读:卡死的 worker 无限重生,每次调用都重新付满超时,调用方看不出这是第几次 | **停止重试,去读日志**:插件日志里的 worker stderr tail(`stderrTail` 末尾几行)会指出反复杀死 worker 的原因——通常是某个让 UIA 挂死的靶窗或破损的安装。`action=status` 的 `restarts=N/max` 字段可在未彻底卡死前就看到预算消耗 | **REAL** — `test/worker-smoke.mjs` §7 用故意自杀的 worker 真实驱动到上限(第 4 次拒绝 `worker_wedged`);`test/plugin-test.mjs` 钉住工具层映射;`test/refusals-test.ps1` 钉住该码**不在**决策表里(宿主所有权) |
61
+ | `worker_wedged` | `lib/engine.js`(`start()` 的 `maxRestarts` 闸,0.11.0 G3)——**最早由宿主 JS 半发出的码**,引擎半不可能报它(引擎正是那个已经不在了的东西) | worker 已死到重启预算(默认 3 次)的上限,宿主拒绝再 spawn 新进程;本次调用**什么都没执行**。0.11.0 之前计数器存在但无人读:卡死的 worker 无限重生,每次调用都重新付满超时,调用方看不出这是第几次 | **停止重试,去读日志**:插件日志里的 worker stderr tail(`stderrTail` 末尾几行)会指出反复杀死 worker 的原因——通常是某个让 UIA 挂死的靶窗或破损的安装。`action=status` 的 `restarts=N/max` 字段可在未彻底卡死前就看到预算消耗 | **REAL** — `test/worker-smoke.mjs` §7 用故意自杀的 worker 真实驱动到上限(第 4 次拒绝 `worker_wedged`);`test/plugin-test.mjs` 钉住工具层映射;`test/refusals-test.ps1` 钉住该码**不在**决策表里(宿主所有权) |
62
+ | `engine_busy` | `lib/engine.js`(请求 FIFO 的 `queueTimeoutMs` 闸,默认 5000ms,0.12.0 G4)——同为宿主 JS 半发出的码:请求在客户端排队时就超时了,**根本没到引擎** | 串行 worker 正被一个在飞动作占着,本次调用排队超过队列期限后被拒——什么都没执行,worker 也**没有被杀**。0.12.0 之前每个请求的计时器从自己写入 stdin 那一刻就开始跑:一个 19 秒的合法慢动作会让排在后面的调用到点开 `child.kill()`,把正在正常执行的在飞调用一起带走(G4/F5)| **等一会儿重试**(引擎是健康的,这和 `worker_wedged` 相反);先 `action=status` 读 `workerBusy` / `queueDepth` / `lastActionAgeMs` 看谁占着串行循环;长期拥挤就调大 `queueTimeoutMs` | **REAL** — `test/worker-smoke.mjs` §10(2.5s 慢 worker + 600ms 队列期限:排队者被拒、在飞者跑完、零重启);`test/plugin-test.mjs` 钉住工具层映射;`test/refusals-test.ps1` 钉住该码**不在**决策表里 |
62
63
 
63
64
  ## 三个诚实的缺口(写在文档里,而不是留白)
64
65
 
package/dsh.plugin.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "dsh-external/dsh-windows-parallel-mcp",
3
- "version": "0.12.0-rc.1",
3
+ "version": "0.12.0-rc.2",
4
4
  "main": "./lib/index.js",
5
5
  "description": "One tool, eleven actions: drive a Windows window quietly by default, read the target as a numbered element frame, and since 0.7.0 start a whitelisted program, touch the clipboard, and change one named window. Prefers window messages (zero foreground change); falls back to UI Automation with a bounded, self-reversing focus flash (measured net return 15-95 ms); offers an opt-in takeover tier (policy:'full' AND takeoverAllowed) where the cursor moves to the action point and is always restored, with a mandatory three-phase HUD and three interruption paths; adds snapshot/screenshot/preview, where labels address the UIA element itself and image coordinates are converted by the engine; reads a write back (effect=readback-verified only when the field's own value matches a prediction built from the control's measurements) with caretPosition, disabled/focus reporting and a BitBlt capture path named as captureBackend; and gates everything through one ceiling (policy) plus a per-program launch whitelist, an idle check that refuses instead of interrupting, and an append-only JSONL audit log. Since 0.8.0 the same engine also answers as an MCP server over stdio (bin: wpm-mcp), with the tool list generated from the same contract file.",
6
6
  "engines": {
package/lib/engine.js CHANGED
@@ -82,6 +82,7 @@ export class WorkerClient {
82
82
  * @param {string} [options.powershellPath]
83
83
  * @param {string} [options.script]
84
84
  * @param {number} [options.requestTimeoutMs]
85
+ * @param {number} [options.queueTimeoutMs]
85
86
  * @param {number} [options.maxRestarts]
86
87
  * @param {(line: string) => void} [options.onStderr]
87
88
  * @param {(info: {restarted: boolean, code: number|null, signal: string|null}) => void} [options.onExit]
@@ -91,6 +92,10 @@ export class WorkerClient {
91
92
  this.powershellPath = resolvePowerShell(options.powershellPath);
92
93
  this.script = options.script ?? workerScript();
93
94
  this.requestTimeoutMs = options.requestTimeoutMs ?? 20000;
95
+ // 0.12.0 G4: WAITING for the worker and being IGNORED by it are different failures, and one
96
+ // deadline cannot describe both. Queue time past this bound is refusal `engine_busy` (retry
97
+ // later, the worker is fine); only a SILENT in-flight request earns the kill.
98
+ this.queueTimeoutMs = options.queueTimeoutMs ?? 5000;
94
99
  this.maxRestarts = options.maxRestarts ?? 3;
95
100
  this.onStderr = options.onStderr ?? (() => {});
96
101
  this.onExit = options.onExit ?? (() => {});
@@ -343,16 +348,63 @@ export class WorkerClient {
343
348
  const bus = this.busyness();
344
349
  if (!bus.workerBusy) this.lastActionAt = Date.now();
345
350
  this.queueDepth += 1;
351
+ const enqueuedAt = Date.now();
352
+ let dequeued = false;
353
+ let abandoned = false; // caller left via the queue deadline -- never write the stale request
354
+ /** @type {(err: any) => void} */
355
+ let rejectOuter = () => {};
346
356
  const task = this.queueTail.then(() => {
357
+ dequeued = true;
347
358
  this.queueDepth -= 1;
359
+ if (abandoned) {
360
+ // The caller was refused with engine_busy; sending now would execute an action nobody is
361
+ // waiting for -- a click that lands after its own deadline is the G1 disease returned.
362
+ const err = new Error('request abandoned at its queue deadline; it was never sent');
363
+ /** @type {any} */
364
+ (err).refusal = 'engine_busy';
365
+ throw err;
366
+ }
348
367
  this.start();
349
368
  const id = String(++this.seq);
350
369
  return this.#send(id, JSON.stringify({ id, ...payload }) + '\n', payload?.action);
351
370
  });
371
+ // The queue deadline is its OWN timer (0.12.0): the request-timeout arm above starts only when
372
+ // the line is actually written, so before this split a long legitimate action made every
373
+ // waiting caller kill the worker -- "busy" was reported as "broken", and the in-flight call
374
+ // died with it. clearImmediate-equivalent via the dequeued flag: a request that reached its
375
+ // turn is now governed by requestTimeoutMs alone.
376
+ const queueTimer = setTimeout(() => {
377
+ if (dequeued) return;
378
+ abandoned = true;
379
+ this.queueDepth -= 1;
380
+ const err = new Error(
381
+ `engine worker is busy: this request waited ${Date.now() - enqueuedAt} ms behind an in-flight action (queueTimeoutMs=${this.queueTimeoutMs}) and was never sent. Nothing was executed and the worker was NOT killed -- retry later, or read action=status (workerBusy/queueDepth) to see what is holding the serial loop`,
382
+ );
383
+ /** @type {any} */
384
+ (err).refusal = 'engine_busy';
385
+ rejectOuter(err);
386
+ }, this.queueTimeoutMs);
387
+ // The caller sees whichever settles first: its own turn's answer, or the queue deadline.
388
+ // Once answered the other path is inert -- a timed-out caller must not resurrect when the
389
+ // abandoned slot eventually runs, and a resolved answer must not be followed by a stray
390
+ // rejection. `task` keeps its chain slot either way (the FIFO drains regardless).
391
+ const out = new Promise((resolvePromise, rejectPromiseOuter) => {
392
+ let settled = false;
393
+ rejectOuter = (/** @type {any} */ err) => {
394
+ if (settled) return;
395
+ settled = true;
396
+ clearTimeout(queueTimer);
397
+ rejectPromiseOuter(err);
398
+ };
399
+ task.then(
400
+ (/** @type {any} */ msg) => { if (!settled) { settled = true; clearTimeout(queueTimer); resolvePromise(msg); } },
401
+ (/** @type {any} */ err) => { rejectOuter(err); },
402
+ );
403
+ });
352
404
  // The chain must survive a rejected request: swallow the failure once for sequencing purposes
353
- // and let the caller-facing promise keep rejecting with the original error.
405
+ // and let the caller-facing promise above carry the original error.
354
406
  this.queueTail = task.then(() => {}, () => {});
355
- return task;
407
+ return out;
356
408
  }
357
409
 
358
410
  /** Clean shutdown: close stdin (the worker exits its read loop), then make sure it is gone. */
package/lib/index.js CHANGED
@@ -695,6 +695,12 @@ export function apply(ctx, config = {}) {
695
695
  return finish(result(args.action, false, 'worker_wedged',
696
696
  `engine worker is wedged: ${/** @type {Error} */ (err).message} restarts=${client.restarts}/${client.maxRestarts}`));
697
697
  }
698
+ // 0.12.0 G4: a queue timeout is BUSY, not BROKEN -- the request was never sent and the
699
+ // worker was not killed. Folding it into `action_failed` would tell the caller to fear a
700
+ // dead engine when the honest instruction is "wait and retry" (or read status).
701
+ if (/** @type {WpmError} */ (err)?.refusal === 'engine_busy') {
702
+ return finish(result(args.action, false, 'engine_busy', /** @type {Error} */ (err).message));
703
+ }
698
704
  // The worker layer failed (crash, timeout, missing engine). This is not a refusal code: the
699
705
  // engine never got to decide. Say exactly that instead of borrowing a code it does not own.
700
706
  // Cast inline for the same reason as above. No `String(...)` wrapper and no `?.` are added:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-windows-parallel-mcp",
3
- "version": "0.12.0-rc.1",
3
+ "version": "0.12.0-rc.2",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "tag": "latest",
package/server.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "name": "io.github.drscrewdriver/dsh-windows-parallel-mcp",
4
4
  "title": "Windows Parallel",
5
5
  "description": "Drive a Windows window over MCP stdio: quiet by default, one policy ceiling, coded refusals.",
6
- "version": "0.12.0-rc.1",
6
+ "version": "0.12.0-rc.2",
7
7
  "repository": {
8
8
  "url": "https://github.com/drscrewdriver/dsh-windows-parallel-mcp",
9
9
  "source": "github"
@@ -14,7 +14,7 @@
14
14
  "registryType": "npm",
15
15
  "registryBaseUrl": "https://registry.npmjs.org",
16
16
  "identifier": "dsh-windows-parallel-mcp",
17
- "version": "0.12.0-rc.1",
17
+ "version": "0.12.0-rc.2",
18
18
  "transport": {
19
19
  "type": "stdio"
20
20
  },
@@ -80,7 +80,8 @@
80
80
  { "code": "policy_denied", "layer": "decision", "summary": "the action's declared tier is above what the `policy` setting allows, so it was refused before the worker was reached. The next step is named: raise `policy`, do not retry the same call. A refusal here is the setting doing its job, not a failure of the target" },
81
81
  { "code": "user_active", "layer": "decision", "summary": "the last PHYSICAL input is younger than policyIdleMs and the action needs the takeover tier, so the owner is at the keyboard and was NOT interrupted. Unlike the upstream design this product does not pop a countdown dialog at someone who is typing: a dialog is a second disturbance dressed as consent. The next step is to wait for idle, or to pass forceUserActive:true explicitly (which is recorded in the audit log as forced)" },
82
82
  { "code": "invalid_argument", "layer": "runtime", "summary": "0.9.0: a numeric argument arrived outside the bounds this file declares (or a fraction where an integer is required), so the call is refused naming the sent value instead of being silently clamped or rounded. Pre-0.9.0 this was the G1/G2 shape: maxElements:0 became 1, maxWidth:-5 became 'no limit', label:2.7 became 3. The next step is re-sending inside the stated range, not retrying the same call", "uncoveredReason": "covered by three engine cases above (snapshot-max-elements-out-of-range, screenshot-max-width-negative, launch-wait-ms-over-max); declared here for tools whose out-of-bounds field the harness cannot smuggle past their own required args" },
83
- { "code": "worker_wedged", "layer": "runtime", "summary": "0.11.0: the worker died as many times as the restart budget (maxRestarts, default 3) allows, so the HOST refuses to spawn another one until a human reads the log; no action was attempted. Emitted only from lib/engine.js -- the engine cannot report its own absence. Pre-0.11.0 this was the G3 shape: the counter existed but nobody read it, so a wedging worker respawned forever and every call silently paid the full timeout again. The next step is reading the worker stderr tail, not retrying", "uncoveredReason": "covered for real by test/worker-smoke.mjs section 7 (a deliberately-dying worker driven past the cap) and by the tool-layer mapping arm in test/plugin-test.mjs; it is not an engine.ps1 case because the code fires precisely when the engine is gone -- test/refusals-test.ps1 asserts the decision layer must NOT claim it" }
83
+ { "code": "worker_wedged", "layer": "runtime", "summary": "0.11.0: the worker died as many times as the restart budget (maxRestarts, default 3) allows, so the HOST refuses to spawn another one until a human reads the log; no action was attempted. Emitted only from lib/engine.js -- the engine cannot report its own absence. Pre-0.11.0 this was the G3 shape: the counter existed but nobody read it, so a wedging worker respawned forever and every call silently paid the full timeout again. The next step is reading the worker stderr tail, not retrying", "uncoveredReason": "covered for real by test/worker-smoke.mjs section 7 (a deliberately-dying worker driven past the cap) and by the tool-layer mapping arm in test/plugin-test.mjs; it is not an engine.ps1 case because the code fires precisely when the engine is gone -- test/refusals-test.ps1 asserts the decision layer must NOT claim it" },
84
+ { "code": "engine_busy", "layer": "runtime", "summary": "0.12.0: the serial worker was busy with an in-flight action, this request waited past queueTimeoutMs (default 5000ms) inside the client request FIFO, and it was NEVER SENT. Nothing executed and the worker was not killed. Pre-0.12.0 this was the G4 shape: every request timer started at its own write into the worker stdin, so a 19s legitimate action let each queued caller run its deadline out and fire child.kill(), taking the in-flight call down with it. Queueing is the FIFO doing its job; refusing past the queue deadline is what keeps a waiting request from murdering a healthy worker. Unlike worker_wedged the engine is fine -- the next step is retrying, or reading action=status (workerBusy/queueDepth/lastActionAgeMs) to see what holds the serial loop. Emitted only from lib/engine.js; abort requests bypass the queue by design and cannot surface it", "uncoveredReason": "covered for real by test/worker-smoke.mjs section 10 (a slow worker with a short queue deadline: the queued caller is refused, the in-flight call completes, zero restarts) and the tool-layer mapping arm in test/plugin-test.mjs; it is not an engine.ps1 case because the code fires while the engine is BUSY, before the request reaches it -- test/refusals-test.ps1 asserts the decision layer must NOT claim it" }
84
85
  ],
85
86
  "tools": [
86
87
  {
@@ -121,7 +122,7 @@
121
122
  "required": ["hwnd", "x", "y"],
122
123
  "additionalProperties": false
123
124
  },
124
- "refusals": ["no_hwnd", "paused", "elevated_target", "unreachable", "uia_tree_empty", "uia_probe_failed", "terminal_no_door", "stale_ref", "action_failed", "restore_failed", "takeover_unavailable", "keyinject_unavailable", "takeover_aborted", "policy_denied", "user_active", "invalid_argument", "worker_wedged"]
125
+ "refusals": ["no_hwnd", "paused", "elevated_target", "unreachable", "uia_tree_empty", "uia_probe_failed", "terminal_no_door", "stale_ref", "action_failed", "restore_failed", "takeover_unavailable", "keyinject_unavailable", "takeover_aborted", "policy_denied", "user_active", "invalid_argument", "worker_wedged", "engine_busy"]
125
126
  },
126
127
  {
127
128
  "name": "wpm_type",
@@ -148,7 +149,7 @@
148
149
  "additionalProperties": false
149
150
  },
150
151
  "notes_0_6_0": "0.6.0 adds readback + caretPosition and changes nothing in this refusals list: disabled targets, focus movement and a mismatching readback are reported in detail/effect, not as new codes -- they are states of the target, not errors in the call.",
151
- "refusals": ["no_hwnd", "paused", "elevated_target", "unreachable", "uia_tree_empty", "uia_probe_failed", "terminal_no_door", "action_failed", "restore_failed", "takeover_unavailable", "keyinject_unavailable", "takeover_aborted", "policy_denied", "user_active", "invalid_argument", "worker_wedged"]
152
+ "refusals": ["no_hwnd", "paused", "elevated_target", "unreachable", "uia_tree_empty", "uia_probe_failed", "terminal_no_door", "action_failed", "restore_failed", "takeover_unavailable", "keyinject_unavailable", "takeover_aborted", "policy_denied", "user_active", "invalid_argument", "worker_wedged", "engine_busy"]
152
153
  },
153
154
  {
154
155
  "name": "wpm_focus",
@@ -170,7 +171,7 @@
170
171
  "required": ["hwnd", "elementName"],
171
172
  "additionalProperties": false
172
173
  },
173
- "refusals": ["no_hwnd", "paused", "elevated_target", "unreachable", "uia_tree_empty", "uia_probe_failed", "terminal_no_door", "action_failed", "restore_failed", "takeover_unavailable", "takeover_aborted", "policy_denied", "user_active", "invalid_argument", "worker_wedged"]
174
+ "refusals": ["no_hwnd", "paused", "elevated_target", "unreachable", "uia_tree_empty", "uia_probe_failed", "terminal_no_door", "action_failed", "restore_failed", "takeover_unavailable", "takeover_aborted", "policy_denied", "user_active", "invalid_argument", "worker_wedged", "engine_busy"]
174
175
  },
175
176
  {
176
177
  "name": "wpm_status",
@@ -205,7 +206,7 @@
205
206
  "required": ["hwnd"],
206
207
  "additionalProperties": false
207
208
  },
208
- "refusals": ["no_hwnd", "paused", "uia_probe_failed", "stale_ref", "policy_denied", "invalid_argument", "worker_wedged"]
209
+ "refusals": ["no_hwnd", "paused", "uia_probe_failed", "stale_ref", "policy_denied", "invalid_argument", "worker_wedged", "engine_busy"]
209
210
  },
210
211
  {
211
212
  "name": "wpm_screenshot",
@@ -223,7 +224,7 @@
223
224
  "required": [],
224
225
  "additionalProperties": false
225
226
  },
226
- "refusals": ["no_hwnd", "paused", "policy_denied", "invalid_argument", "worker_wedged"]
227
+ "refusals": ["no_hwnd", "paused", "policy_denied", "invalid_argument", "worker_wedged", "engine_busy"]
227
228
  },
228
229
  {
229
230
  "name": "wpm_preview",
@@ -241,7 +242,7 @@
241
242
  "required": ["hwnd", "x", "y"],
242
243
  "additionalProperties": false
243
244
  },
244
- "refusals": ["no_hwnd", "paused", "unreachable", "policy_denied", "worker_wedged"]
245
+ "refusals": ["no_hwnd", "paused", "unreachable", "policy_denied", "worker_wedged", "engine_busy"]
245
246
  },
246
247
  {
247
248
  "name": "wpm_launch",
@@ -259,7 +260,7 @@
259
260
  "required": ["target"],
260
261
  "additionalProperties": false
261
262
  },
262
- "refusals": ["paused", "app_launch_denied", "policy_denied", "action_failed", "invalid_argument", "worker_wedged"]
263
+ "refusals": ["paused", "app_launch_denied", "policy_denied", "action_failed", "invalid_argument", "worker_wedged", "engine_busy"]
263
264
  },
264
265
  {
265
266
  "name": "wpm_clipboard",
@@ -279,7 +280,7 @@
279
280
  "required": ["op"],
280
281
  "additionalProperties": false
281
282
  },
282
- "refusals": ["paused", "policy_denied", "action_failed", "stale_ref", "worker_wedged"]
283
+ "refusals": ["paused", "policy_denied", "action_failed", "stale_ref", "worker_wedged", "engine_busy"]
283
284
  },
284
285
  {
285
286
  "name": "wpm_window",
@@ -300,7 +301,7 @@
300
301
  "required": ["hwnd", "op"],
301
302
  "additionalProperties": false
302
303
  },
303
- "refusals": ["paused", "no_hwnd", "policy_denied", "action_failed", "worker_wedged"]
304
+ "refusals": ["paused", "no_hwnd", "policy_denied", "action_failed", "worker_wedged", "engine_busy"]
304
305
  }
305
306
  ],
306
307
  "refusalCases": [
@@ -562,6 +563,13 @@
562
563
  "tool": "wpm_click",
563
564
  "expect": "worker_wedged",
564
565
  "note": "host-emitted: fires from lib/engine.js when the restart budget is spent, a state no engine.ps1 invocation can construct (the engine is the thing that is gone). Real coverage is test/worker-smoke.mjs section 7 -- a deliberately-dying worker driven past the cap -- plus the tool-layer mapping arm in test/plugin-test.mjs and the structural arm in test/refusals-test.ps1 that pins the code OUTSIDE the decision table."
566
+ },
567
+ {
568
+ "id": "engine-busy-queue-deadline",
569
+ "mode": "none",
570
+ "tool": "wpm_click",
571
+ "expect": "engine_busy",
572
+ "note": "host-emitted: fires from the lib/engine.js request FIFO when a request waits past queueTimeoutMs behind an in-flight action -- a state no engine.ps1 invocation can construct (the request never reaches the engine). Real coverage is test/worker-smoke.mjs section 10 (slow worker + short queue deadline: the queued caller refused with the code, the in-flight call completed, no kill, no restart) plus the tool-layer mapping arm in test/plugin-test.mjs and the structural arm in test/refusals-test.ps1 that pins the code OUTSIDE the decision table. wpm_status cannot surface it: it answers from the client snapshot."
565
573
  }
566
574
  ]
567
575
  }
package/types/index.d.ts CHANGED
@@ -44,7 +44,12 @@ export type RefusalCode =
44
44
  // 0.11.0. The worker died as many times as the restart budget allows, so the HOST stopped
45
45
  // restarting it. Emitted from lib/engine.js, never from the engine — the engine is the thing
46
46
  // that is gone. The next step is reading the log, not retrying.
47
- | 'worker_wedged';
47
+ | 'worker_wedged'
48
+ // 0.12.0. The serial worker was busy with an in-flight action and this request waited past
49
+ // queueTimeoutMs, so it was never sent -- the request FIFO refuses instead of letting a queued
50
+ // deadline kill the worker (the G4 shape). Unlike worker_wedged, the engine is healthy: the
51
+ // next step is retrying, or reading action=status (workerBusy/queueDepth) first.
52
+ | 'engine_busy';
48
53
 
49
54
  export type KeyInputMode = 'none' | 'inject';
50
55