dsh-windows-parallel-mcp 0.11.0 → 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 +31 -0
- package/CHANGELOG.es.md +31 -0
- package/CHANGELOG.fr.md +31 -0
- package/CHANGELOG.it.md +31 -0
- package/CHANGELOG.ja.md +31 -0
- package/CHANGELOG.ko.md +31 -0
- package/CHANGELOG.md +31 -0
- package/CHANGELOG.pt.md +31 -0
- package/CHANGELOG.ru.md +31 -0
- package/CHANGELOG.zh.md +31 -0
- package/README.de.md +1 -1
- package/README.es.md +1 -1
- package/README.fr.md +1 -1
- package/README.it.md +1 -1
- package/README.ja.md +1 -1
- package/README.ko.md +1 -1
- package/README.md +1 -1
- package/README.pt.md +1 -1
- package/README.ru.md +1 -1
- package/README.zh.md +1 -1
- package/docs/refusals.md +6 -5
- package/dsh.plugin.json +1 -1
- package/lib/engine.js +139 -15
- package/lib/index.js +15 -0
- package/package.json +1 -1
- package/server.json +2 -2
- package/src/schema/tools.json +18 -10
- package/types/index.d.ts +6 -1
package/CHANGELOG.de.md
CHANGED
|
@@ -21,6 +21,37 @@ one is a promise to anyone installing it.
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
+
## 0.12.0-rc.1 — 2026-11-29 (prerelease)
|
|
27
|
+
|
|
28
|
+
**Requests are queued on the client, not inside the worker's stdin.** G4/F5: the worker is one
|
|
29
|
+
serial loop (`worker.ps1` reads a line, answers, reads the next), yet every request timer started
|
|
30
|
+
at its WRITE moment -- a slow action let a QUEUED request run its deadline out and `kill()` the
|
|
31
|
+
worker out from under the request actually running. `WorkerClient.request()` now chains through a
|
|
32
|
+
promise FIFO: one request is in flight at a time, its deadline starts when its line is really
|
|
33
|
+
written, and the wait is observable. `action=status` carries three new client-side facts --
|
|
34
|
+
`workerBusy`, `queueDepth`, `lastActionAgeMs` -- because a busy worker cannot answer questions
|
|
35
|
+
about its own busyness. `abort` deliberately bypasses the queue (queue-jumping cancellation is
|
|
36
|
+
the whole point; the latch file remains the second channel). `test/worker-smoke.mjs` §9 drives a
|
|
37
|
+
slow real worker with two concurrent requests (busy/queued observed, both answered by the same
|
|
38
|
+
pid, serial wall time, zero restarts); `plugin-test` pins the idle-status rendering. The schema
|
|
39
|
+
fields and the `engine_busy` split land with rc.2/rc.3.
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## 0.12.0-rc.2 — 2026-11-29 (prerelease)
|
|
43
|
+
|
|
44
|
+
**Queueing and wedging are different failures, and now they have different deadlines.**
|
|
45
|
+
`WorkerClient` takes `queueTimeoutMs` (default 5000): a request that waits that long behind an
|
|
46
|
+
in-flight action is refused with the new `engine_busy` code and **never written** -- the worker
|
|
47
|
+
survives, and so does the call it is running (pre-0.12.0 the queued request's own timer eventually
|
|
48
|
+
fired `child.kill()` and took the in-flight call down: F5/G4). `requestTimeoutMs` keeps its old
|
|
49
|
+
meaning, silent-in-flight -> latch, kill, restart. `engine_busy` joins the three-source refusal
|
|
50
|
+
vocabulary (20 codes) as a HOST-emitted runtime code -- retry is the right advice here, unlike
|
|
51
|
+
`worker_wedged` -- and the tool layer maps the rejection to the code instead of `action_failed`.
|
|
52
|
+
`test/worker-smoke.mjs` §10 is the P0-e scenario finally driven for real: a 2.5s injected-slow
|
|
53
|
+
worker plus a 600ms queue deadline -> queued caller refused, in-flight call completes, zero
|
|
54
|
+
restarts, client still serves afterwards.
|
|
55
|
+
|
|
56
|
+
|
|
26
57
|
## 0.11.0 — 2026-11-29
|
|
27
58
|
|
|
28
59
|
**State and recovery: the restart counter has teeth, and a kill cleans up.** Promotes the
|
package/CHANGELOG.es.md
CHANGED
|
@@ -21,6 +21,37 @@ one is a promise to anyone installing it.
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
+
## 0.12.0-rc.1 — 2026-11-29 (prerelease)
|
|
27
|
+
|
|
28
|
+
**Requests are queued on the client, not inside the worker's stdin.** G4/F5: the worker is one
|
|
29
|
+
serial loop (`worker.ps1` reads a line, answers, reads the next), yet every request timer started
|
|
30
|
+
at its WRITE moment -- a slow action let a QUEUED request run its deadline out and `kill()` the
|
|
31
|
+
worker out from under the request actually running. `WorkerClient.request()` now chains through a
|
|
32
|
+
promise FIFO: one request is in flight at a time, its deadline starts when its line is really
|
|
33
|
+
written, and the wait is observable. `action=status` carries three new client-side facts --
|
|
34
|
+
`workerBusy`, `queueDepth`, `lastActionAgeMs` -- because a busy worker cannot answer questions
|
|
35
|
+
about its own busyness. `abort` deliberately bypasses the queue (queue-jumping cancellation is
|
|
36
|
+
the whole point; the latch file remains the second channel). `test/worker-smoke.mjs` §9 drives a
|
|
37
|
+
slow real worker with two concurrent requests (busy/queued observed, both answered by the same
|
|
38
|
+
pid, serial wall time, zero restarts); `plugin-test` pins the idle-status rendering. The schema
|
|
39
|
+
fields and the `engine_busy` split land with rc.2/rc.3.
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## 0.12.0-rc.2 — 2026-11-29 (prerelease)
|
|
43
|
+
|
|
44
|
+
**Queueing and wedging are different failures, and now they have different deadlines.**
|
|
45
|
+
`WorkerClient` takes `queueTimeoutMs` (default 5000): a request that waits that long behind an
|
|
46
|
+
in-flight action is refused with the new `engine_busy` code and **never written** -- the worker
|
|
47
|
+
survives, and so does the call it is running (pre-0.12.0 the queued request's own timer eventually
|
|
48
|
+
fired `child.kill()` and took the in-flight call down: F5/G4). `requestTimeoutMs` keeps its old
|
|
49
|
+
meaning, silent-in-flight -> latch, kill, restart. `engine_busy` joins the three-source refusal
|
|
50
|
+
vocabulary (20 codes) as a HOST-emitted runtime code -- retry is the right advice here, unlike
|
|
51
|
+
`worker_wedged` -- and the tool layer maps the rejection to the code instead of `action_failed`.
|
|
52
|
+
`test/worker-smoke.mjs` §10 is the P0-e scenario finally driven for real: a 2.5s injected-slow
|
|
53
|
+
worker plus a 600ms queue deadline -> queued caller refused, in-flight call completes, zero
|
|
54
|
+
restarts, client still serves afterwards.
|
|
55
|
+
|
|
56
|
+
|
|
26
57
|
## 0.11.0 — 2026-11-29
|
|
27
58
|
|
|
28
59
|
**State and recovery: the restart counter has teeth, and a kill cleans up.** Promotes the
|
package/CHANGELOG.fr.md
CHANGED
|
@@ -21,6 +21,37 @@ one is a promise to anyone installing it.
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
+
## 0.12.0-rc.1 — 2026-11-29 (prerelease)
|
|
27
|
+
|
|
28
|
+
**Requests are queued on the client, not inside the worker's stdin.** G4/F5: the worker is one
|
|
29
|
+
serial loop (`worker.ps1` reads a line, answers, reads the next), yet every request timer started
|
|
30
|
+
at its WRITE moment -- a slow action let a QUEUED request run its deadline out and `kill()` the
|
|
31
|
+
worker out from under the request actually running. `WorkerClient.request()` now chains through a
|
|
32
|
+
promise FIFO: one request is in flight at a time, its deadline starts when its line is really
|
|
33
|
+
written, and the wait is observable. `action=status` carries three new client-side facts --
|
|
34
|
+
`workerBusy`, `queueDepth`, `lastActionAgeMs` -- because a busy worker cannot answer questions
|
|
35
|
+
about its own busyness. `abort` deliberately bypasses the queue (queue-jumping cancellation is
|
|
36
|
+
the whole point; the latch file remains the second channel). `test/worker-smoke.mjs` §9 drives a
|
|
37
|
+
slow real worker with two concurrent requests (busy/queued observed, both answered by the same
|
|
38
|
+
pid, serial wall time, zero restarts); `plugin-test` pins the idle-status rendering. The schema
|
|
39
|
+
fields and the `engine_busy` split land with rc.2/rc.3.
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## 0.12.0-rc.2 — 2026-11-29 (prerelease)
|
|
43
|
+
|
|
44
|
+
**Queueing and wedging are different failures, and now they have different deadlines.**
|
|
45
|
+
`WorkerClient` takes `queueTimeoutMs` (default 5000): a request that waits that long behind an
|
|
46
|
+
in-flight action is refused with the new `engine_busy` code and **never written** -- the worker
|
|
47
|
+
survives, and so does the call it is running (pre-0.12.0 the queued request's own timer eventually
|
|
48
|
+
fired `child.kill()` and took the in-flight call down: F5/G4). `requestTimeoutMs` keeps its old
|
|
49
|
+
meaning, silent-in-flight -> latch, kill, restart. `engine_busy` joins the three-source refusal
|
|
50
|
+
vocabulary (20 codes) as a HOST-emitted runtime code -- retry is the right advice here, unlike
|
|
51
|
+
`worker_wedged` -- and the tool layer maps the rejection to the code instead of `action_failed`.
|
|
52
|
+
`test/worker-smoke.mjs` §10 is the P0-e scenario finally driven for real: a 2.5s injected-slow
|
|
53
|
+
worker plus a 600ms queue deadline -> queued caller refused, in-flight call completes, zero
|
|
54
|
+
restarts, client still serves afterwards.
|
|
55
|
+
|
|
56
|
+
|
|
26
57
|
## 0.11.0 — 2026-11-29
|
|
27
58
|
|
|
28
59
|
**State and recovery: the restart counter has teeth, and a kill cleans up.** Promotes the
|
package/CHANGELOG.it.md
CHANGED
|
@@ -21,6 +21,37 @@ one is a promise to anyone installing it.
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
+
## 0.12.0-rc.1 — 2026-11-29 (prerelease)
|
|
27
|
+
|
|
28
|
+
**Requests are queued on the client, not inside the worker's stdin.** G4/F5: the worker is one
|
|
29
|
+
serial loop (`worker.ps1` reads a line, answers, reads the next), yet every request timer started
|
|
30
|
+
at its WRITE moment -- a slow action let a QUEUED request run its deadline out and `kill()` the
|
|
31
|
+
worker out from under the request actually running. `WorkerClient.request()` now chains through a
|
|
32
|
+
promise FIFO: one request is in flight at a time, its deadline starts when its line is really
|
|
33
|
+
written, and the wait is observable. `action=status` carries three new client-side facts --
|
|
34
|
+
`workerBusy`, `queueDepth`, `lastActionAgeMs` -- because a busy worker cannot answer questions
|
|
35
|
+
about its own busyness. `abort` deliberately bypasses the queue (queue-jumping cancellation is
|
|
36
|
+
the whole point; the latch file remains the second channel). `test/worker-smoke.mjs` §9 drives a
|
|
37
|
+
slow real worker with two concurrent requests (busy/queued observed, both answered by the same
|
|
38
|
+
pid, serial wall time, zero restarts); `plugin-test` pins the idle-status rendering. The schema
|
|
39
|
+
fields and the `engine_busy` split land with rc.2/rc.3.
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## 0.12.0-rc.2 — 2026-11-29 (prerelease)
|
|
43
|
+
|
|
44
|
+
**Queueing and wedging are different failures, and now they have different deadlines.**
|
|
45
|
+
`WorkerClient` takes `queueTimeoutMs` (default 5000): a request that waits that long behind an
|
|
46
|
+
in-flight action is refused with the new `engine_busy` code and **never written** -- the worker
|
|
47
|
+
survives, and so does the call it is running (pre-0.12.0 the queued request's own timer eventually
|
|
48
|
+
fired `child.kill()` and took the in-flight call down: F5/G4). `requestTimeoutMs` keeps its old
|
|
49
|
+
meaning, silent-in-flight -> latch, kill, restart. `engine_busy` joins the three-source refusal
|
|
50
|
+
vocabulary (20 codes) as a HOST-emitted runtime code -- retry is the right advice here, unlike
|
|
51
|
+
`worker_wedged` -- and the tool layer maps the rejection to the code instead of `action_failed`.
|
|
52
|
+
`test/worker-smoke.mjs` §10 is the P0-e scenario finally driven for real: a 2.5s injected-slow
|
|
53
|
+
worker plus a 600ms queue deadline -> queued caller refused, in-flight call completes, zero
|
|
54
|
+
restarts, client still serves afterwards.
|
|
55
|
+
|
|
56
|
+
|
|
26
57
|
## 0.11.0 — 2026-11-29
|
|
27
58
|
|
|
28
59
|
**State and recovery: the restart counter has teeth, and a kill cleans up.** Promotes the
|
package/CHANGELOG.ja.md
CHANGED
|
@@ -21,6 +21,37 @@ one is a promise to anyone installing it.
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
+
## 0.12.0-rc.1 — 2026-11-29 (prerelease)
|
|
27
|
+
|
|
28
|
+
**Requests are queued on the client, not inside the worker's stdin.** G4/F5: the worker is one
|
|
29
|
+
serial loop (`worker.ps1` reads a line, answers, reads the next), yet every request timer started
|
|
30
|
+
at its WRITE moment -- a slow action let a QUEUED request run its deadline out and `kill()` the
|
|
31
|
+
worker out from under the request actually running. `WorkerClient.request()` now chains through a
|
|
32
|
+
promise FIFO: one request is in flight at a time, its deadline starts when its line is really
|
|
33
|
+
written, and the wait is observable. `action=status` carries three new client-side facts --
|
|
34
|
+
`workerBusy`, `queueDepth`, `lastActionAgeMs` -- because a busy worker cannot answer questions
|
|
35
|
+
about its own busyness. `abort` deliberately bypasses the queue (queue-jumping cancellation is
|
|
36
|
+
the whole point; the latch file remains the second channel). `test/worker-smoke.mjs` §9 drives a
|
|
37
|
+
slow real worker with two concurrent requests (busy/queued observed, both answered by the same
|
|
38
|
+
pid, serial wall time, zero restarts); `plugin-test` pins the idle-status rendering. The schema
|
|
39
|
+
fields and the `engine_busy` split land with rc.2/rc.3.
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## 0.12.0-rc.2 — 2026-11-29 (prerelease)
|
|
43
|
+
|
|
44
|
+
**Queueing and wedging are different failures, and now they have different deadlines.**
|
|
45
|
+
`WorkerClient` takes `queueTimeoutMs` (default 5000): a request that waits that long behind an
|
|
46
|
+
in-flight action is refused with the new `engine_busy` code and **never written** -- the worker
|
|
47
|
+
survives, and so does the call it is running (pre-0.12.0 the queued request's own timer eventually
|
|
48
|
+
fired `child.kill()` and took the in-flight call down: F5/G4). `requestTimeoutMs` keeps its old
|
|
49
|
+
meaning, silent-in-flight -> latch, kill, restart. `engine_busy` joins the three-source refusal
|
|
50
|
+
vocabulary (20 codes) as a HOST-emitted runtime code -- retry is the right advice here, unlike
|
|
51
|
+
`worker_wedged` -- and the tool layer maps the rejection to the code instead of `action_failed`.
|
|
52
|
+
`test/worker-smoke.mjs` §10 is the P0-e scenario finally driven for real: a 2.5s injected-slow
|
|
53
|
+
worker plus a 600ms queue deadline -> queued caller refused, in-flight call completes, zero
|
|
54
|
+
restarts, client still serves afterwards.
|
|
55
|
+
|
|
56
|
+
|
|
26
57
|
## 0.11.0 — 2026-11-29
|
|
27
58
|
|
|
28
59
|
**State and recovery: the restart counter has teeth, and a kill cleans up.** Promotes the
|
package/CHANGELOG.ko.md
CHANGED
|
@@ -21,6 +21,37 @@ one is a promise to anyone installing it.
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
+
## 0.12.0-rc.1 — 2026-11-29 (prerelease)
|
|
27
|
+
|
|
28
|
+
**Requests are queued on the client, not inside the worker's stdin.** G4/F5: the worker is one
|
|
29
|
+
serial loop (`worker.ps1` reads a line, answers, reads the next), yet every request timer started
|
|
30
|
+
at its WRITE moment -- a slow action let a QUEUED request run its deadline out and `kill()` the
|
|
31
|
+
worker out from under the request actually running. `WorkerClient.request()` now chains through a
|
|
32
|
+
promise FIFO: one request is in flight at a time, its deadline starts when its line is really
|
|
33
|
+
written, and the wait is observable. `action=status` carries three new client-side facts --
|
|
34
|
+
`workerBusy`, `queueDepth`, `lastActionAgeMs` -- because a busy worker cannot answer questions
|
|
35
|
+
about its own busyness. `abort` deliberately bypasses the queue (queue-jumping cancellation is
|
|
36
|
+
the whole point; the latch file remains the second channel). `test/worker-smoke.mjs` §9 drives a
|
|
37
|
+
slow real worker with two concurrent requests (busy/queued observed, both answered by the same
|
|
38
|
+
pid, serial wall time, zero restarts); `plugin-test` pins the idle-status rendering. The schema
|
|
39
|
+
fields and the `engine_busy` split land with rc.2/rc.3.
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## 0.12.0-rc.2 — 2026-11-29 (prerelease)
|
|
43
|
+
|
|
44
|
+
**Queueing and wedging are different failures, and now they have different deadlines.**
|
|
45
|
+
`WorkerClient` takes `queueTimeoutMs` (default 5000): a request that waits that long behind an
|
|
46
|
+
in-flight action is refused with the new `engine_busy` code and **never written** -- the worker
|
|
47
|
+
survives, and so does the call it is running (pre-0.12.0 the queued request's own timer eventually
|
|
48
|
+
fired `child.kill()` and took the in-flight call down: F5/G4). `requestTimeoutMs` keeps its old
|
|
49
|
+
meaning, silent-in-flight -> latch, kill, restart. `engine_busy` joins the three-source refusal
|
|
50
|
+
vocabulary (20 codes) as a HOST-emitted runtime code -- retry is the right advice here, unlike
|
|
51
|
+
`worker_wedged` -- and the tool layer maps the rejection to the code instead of `action_failed`.
|
|
52
|
+
`test/worker-smoke.mjs` §10 is the P0-e scenario finally driven for real: a 2.5s injected-slow
|
|
53
|
+
worker plus a 600ms queue deadline -> queued caller refused, in-flight call completes, zero
|
|
54
|
+
restarts, client still serves afterwards.
|
|
55
|
+
|
|
56
|
+
|
|
26
57
|
## 0.11.0 — 2026-11-29
|
|
27
58
|
|
|
28
59
|
**State and recovery: the restart counter has teeth, and a kill cleans up.** Promotes the
|
package/CHANGELOG.md
CHANGED
|
@@ -18,6 +18,37 @@ one is a promise to anyone installing it.
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
+
## 0.12.0-rc.1 — 2026-11-29 (prerelease)
|
|
24
|
+
|
|
25
|
+
**Requests are queued on the client, not inside the worker's stdin.** G4/F5: the worker is one
|
|
26
|
+
serial loop (`worker.ps1` reads a line, answers, reads the next), yet every request timer started
|
|
27
|
+
at its WRITE moment -- a slow action let a QUEUED request run its deadline out and `kill()` the
|
|
28
|
+
worker out from under the request actually running. `WorkerClient.request()` now chains through a
|
|
29
|
+
promise FIFO: one request is in flight at a time, its deadline starts when its line is really
|
|
30
|
+
written, and the wait is observable. `action=status` carries three new client-side facts --
|
|
31
|
+
`workerBusy`, `queueDepth`, `lastActionAgeMs` -- because a busy worker cannot answer questions
|
|
32
|
+
about its own busyness. `abort` deliberately bypasses the queue (queue-jumping cancellation is
|
|
33
|
+
the whole point; the latch file remains the second channel). `test/worker-smoke.mjs` §9 drives a
|
|
34
|
+
slow real worker with two concurrent requests (busy/queued observed, both answered by the same
|
|
35
|
+
pid, serial wall time, zero restarts); `plugin-test` pins the idle-status rendering. The schema
|
|
36
|
+
fields and the `engine_busy` split land with rc.2/rc.3.
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
## 0.12.0-rc.2 — 2026-11-29 (prerelease)
|
|
40
|
+
|
|
41
|
+
**Queueing and wedging are different failures, and now they have different deadlines.**
|
|
42
|
+
`WorkerClient` takes `queueTimeoutMs` (default 5000): a request that waits that long behind an
|
|
43
|
+
in-flight action is refused with the new `engine_busy` code and **never written** -- the worker
|
|
44
|
+
survives, and so does the call it is running (pre-0.12.0 the queued request's own timer eventually
|
|
45
|
+
fired `child.kill()` and took the in-flight call down: F5/G4). `requestTimeoutMs` keeps its old
|
|
46
|
+
meaning, silent-in-flight -> latch, kill, restart. `engine_busy` joins the three-source refusal
|
|
47
|
+
vocabulary (20 codes) as a HOST-emitted runtime code -- retry is the right advice here, unlike
|
|
48
|
+
`worker_wedged` -- and the tool layer maps the rejection to the code instead of `action_failed`.
|
|
49
|
+
`test/worker-smoke.mjs` §10 is the P0-e scenario finally driven for real: a 2.5s injected-slow
|
|
50
|
+
worker plus a 600ms queue deadline -> queued caller refused, in-flight call completes, zero
|
|
51
|
+
restarts, client still serves afterwards.
|
|
52
|
+
|
|
53
|
+
|
|
23
54
|
## 0.11.0 — 2026-11-29
|
|
24
55
|
|
|
25
56
|
**State and recovery: the restart counter has teeth, and a kill cleans up.** Promotes the
|
package/CHANGELOG.pt.md
CHANGED
|
@@ -21,6 +21,37 @@ one is a promise to anyone installing it.
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
+
## 0.12.0-rc.1 — 2026-11-29 (prerelease)
|
|
27
|
+
|
|
28
|
+
**Requests are queued on the client, not inside the worker's stdin.** G4/F5: the worker is one
|
|
29
|
+
serial loop (`worker.ps1` reads a line, answers, reads the next), yet every request timer started
|
|
30
|
+
at its WRITE moment -- a slow action let a QUEUED request run its deadline out and `kill()` the
|
|
31
|
+
worker out from under the request actually running. `WorkerClient.request()` now chains through a
|
|
32
|
+
promise FIFO: one request is in flight at a time, its deadline starts when its line is really
|
|
33
|
+
written, and the wait is observable. `action=status` carries three new client-side facts --
|
|
34
|
+
`workerBusy`, `queueDepth`, `lastActionAgeMs` -- because a busy worker cannot answer questions
|
|
35
|
+
about its own busyness. `abort` deliberately bypasses the queue (queue-jumping cancellation is
|
|
36
|
+
the whole point; the latch file remains the second channel). `test/worker-smoke.mjs` §9 drives a
|
|
37
|
+
slow real worker with two concurrent requests (busy/queued observed, both answered by the same
|
|
38
|
+
pid, serial wall time, zero restarts); `plugin-test` pins the idle-status rendering. The schema
|
|
39
|
+
fields and the `engine_busy` split land with rc.2/rc.3.
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## 0.12.0-rc.2 — 2026-11-29 (prerelease)
|
|
43
|
+
|
|
44
|
+
**Queueing and wedging are different failures, and now they have different deadlines.**
|
|
45
|
+
`WorkerClient` takes `queueTimeoutMs` (default 5000): a request that waits that long behind an
|
|
46
|
+
in-flight action is refused with the new `engine_busy` code and **never written** -- the worker
|
|
47
|
+
survives, and so does the call it is running (pre-0.12.0 the queued request's own timer eventually
|
|
48
|
+
fired `child.kill()` and took the in-flight call down: F5/G4). `requestTimeoutMs` keeps its old
|
|
49
|
+
meaning, silent-in-flight -> latch, kill, restart. `engine_busy` joins the three-source refusal
|
|
50
|
+
vocabulary (20 codes) as a HOST-emitted runtime code -- retry is the right advice here, unlike
|
|
51
|
+
`worker_wedged` -- and the tool layer maps the rejection to the code instead of `action_failed`.
|
|
52
|
+
`test/worker-smoke.mjs` §10 is the P0-e scenario finally driven for real: a 2.5s injected-slow
|
|
53
|
+
worker plus a 600ms queue deadline -> queued caller refused, in-flight call completes, zero
|
|
54
|
+
restarts, client still serves afterwards.
|
|
55
|
+
|
|
56
|
+
|
|
26
57
|
## 0.11.0 — 2026-11-29
|
|
27
58
|
|
|
28
59
|
**State and recovery: the restart counter has teeth, and a kill cleans up.** Promotes the
|
package/CHANGELOG.ru.md
CHANGED
|
@@ -21,6 +21,37 @@ one is a promise to anyone installing it.
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
+
## 0.12.0-rc.1 — 2026-11-29 (prerelease)
|
|
27
|
+
|
|
28
|
+
**Requests are queued on the client, not inside the worker's stdin.** G4/F5: the worker is one
|
|
29
|
+
serial loop (`worker.ps1` reads a line, answers, reads the next), yet every request timer started
|
|
30
|
+
at its WRITE moment -- a slow action let a QUEUED request run its deadline out and `kill()` the
|
|
31
|
+
worker out from under the request actually running. `WorkerClient.request()` now chains through a
|
|
32
|
+
promise FIFO: one request is in flight at a time, its deadline starts when its line is really
|
|
33
|
+
written, and the wait is observable. `action=status` carries three new client-side facts --
|
|
34
|
+
`workerBusy`, `queueDepth`, `lastActionAgeMs` -- because a busy worker cannot answer questions
|
|
35
|
+
about its own busyness. `abort` deliberately bypasses the queue (queue-jumping cancellation is
|
|
36
|
+
the whole point; the latch file remains the second channel). `test/worker-smoke.mjs` §9 drives a
|
|
37
|
+
slow real worker with two concurrent requests (busy/queued observed, both answered by the same
|
|
38
|
+
pid, serial wall time, zero restarts); `plugin-test` pins the idle-status rendering. The schema
|
|
39
|
+
fields and the `engine_busy` split land with rc.2/rc.3.
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## 0.12.0-rc.2 — 2026-11-29 (prerelease)
|
|
43
|
+
|
|
44
|
+
**Queueing and wedging are different failures, and now they have different deadlines.**
|
|
45
|
+
`WorkerClient` takes `queueTimeoutMs` (default 5000): a request that waits that long behind an
|
|
46
|
+
in-flight action is refused with the new `engine_busy` code and **never written** -- the worker
|
|
47
|
+
survives, and so does the call it is running (pre-0.12.0 the queued request's own timer eventually
|
|
48
|
+
fired `child.kill()` and took the in-flight call down: F5/G4). `requestTimeoutMs` keeps its old
|
|
49
|
+
meaning, silent-in-flight -> latch, kill, restart. `engine_busy` joins the three-source refusal
|
|
50
|
+
vocabulary (20 codes) as a HOST-emitted runtime code -- retry is the right advice here, unlike
|
|
51
|
+
`worker_wedged` -- and the tool layer maps the rejection to the code instead of `action_failed`.
|
|
52
|
+
`test/worker-smoke.mjs` §10 is the P0-e scenario finally driven for real: a 2.5s injected-slow
|
|
53
|
+
worker plus a 600ms queue deadline -> queued caller refused, in-flight call completes, zero
|
|
54
|
+
restarts, client still serves afterwards.
|
|
55
|
+
|
|
56
|
+
|
|
26
57
|
## 0.11.0 — 2026-11-29
|
|
27
58
|
|
|
28
59
|
**State and recovery: the restart counter has teeth, and a kill cleans up.** Promotes the
|
package/CHANGELOG.zh.md
CHANGED
|
@@ -21,6 +21,37 @@ one is a promise to anyone installing it.
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
+
## 0.12.0-rc.1 — 2026-11-29 (prerelease)
|
|
27
|
+
|
|
28
|
+
**Requests are queued on the client, not inside the worker's stdin.** G4/F5: the worker is one
|
|
29
|
+
serial loop (`worker.ps1` reads a line, answers, reads the next), yet every request timer started
|
|
30
|
+
at its WRITE moment -- a slow action let a QUEUED request run its deadline out and `kill()` the
|
|
31
|
+
worker out from under the request actually running. `WorkerClient.request()` now chains through a
|
|
32
|
+
promise FIFO: one request is in flight at a time, its deadline starts when its line is really
|
|
33
|
+
written, and the wait is observable. `action=status` carries three new client-side facts --
|
|
34
|
+
`workerBusy`, `queueDepth`, `lastActionAgeMs` -- because a busy worker cannot answer questions
|
|
35
|
+
about its own busyness. `abort` deliberately bypasses the queue (queue-jumping cancellation is
|
|
36
|
+
the whole point; the latch file remains the second channel). `test/worker-smoke.mjs` §9 drives a
|
|
37
|
+
slow real worker with two concurrent requests (busy/queued observed, both answered by the same
|
|
38
|
+
pid, serial wall time, zero restarts); `plugin-test` pins the idle-status rendering. The schema
|
|
39
|
+
fields and the `engine_busy` split land with rc.2/rc.3.
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## 0.12.0-rc.2 — 2026-11-29 (prerelease)
|
|
43
|
+
|
|
44
|
+
**Queueing and wedging are different failures, and now they have different deadlines.**
|
|
45
|
+
`WorkerClient` takes `queueTimeoutMs` (default 5000): a request that waits that long behind an
|
|
46
|
+
in-flight action is refused with the new `engine_busy` code and **never written** -- the worker
|
|
47
|
+
survives, and so does the call it is running (pre-0.12.0 the queued request's own timer eventually
|
|
48
|
+
fired `child.kill()` and took the in-flight call down: F5/G4). `requestTimeoutMs` keeps its old
|
|
49
|
+
meaning, silent-in-flight -> latch, kill, restart. `engine_busy` joins the three-source refusal
|
|
50
|
+
vocabulary (20 codes) as a HOST-emitted runtime code -- retry is the right advice here, unlike
|
|
51
|
+
`worker_wedged` -- and the tool layer maps the rejection to the code instead of `action_failed`.
|
|
52
|
+
`test/worker-smoke.mjs` §10 is the P0-e scenario finally driven for real: a 2.5s injected-slow
|
|
53
|
+
worker plus a 600ms queue deadline -> queued caller refused, in-flight call completes, zero
|
|
54
|
+
restarts, client still serves afterwards.
|
|
55
|
+
|
|
56
|
+
|
|
26
57
|
## 0.11.0 — 2026-11-29
|
|
27
58
|
|
|
28
59
|
**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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
-
## 运行时失败层(
|
|
45
|
+
## 运行时失败层(10 码,含 `invalid_argument`、`worker_wedged` 与 `engine_busy` 三道宿主闸)
|
|
46
46
|
|
|
47
|
-
其中 `worker_wedged` 由宿主 JS 半(`lib/engine.js`)发出,其余出处见表;宿主既然替引擎
|
|
48
|
-
|
|
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
|
|
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.
|
|
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 ?? (() => {});
|
|
@@ -98,9 +103,22 @@ export class WorkerClient {
|
|
|
98
103
|
|
|
99
104
|
/** @type {import('node:child_process').ChildProcess | null} */
|
|
100
105
|
this.child = null;
|
|
101
|
-
/** Pending requests keyed by id.
|
|
106
|
+
/** Pending requests keyed by id. With the 0.12.0 FIFO exactly one entry is ever in flight;
|
|
107
|
+
* the map stays the id->entry index the stdout reader resolves answers against. */
|
|
102
108
|
this.pending = new Map();
|
|
103
109
|
this.seq = 0;
|
|
110
|
+
// 0.12.0 G4: the worker is a single serial loop (worker.ps1 reads one line, answers, reads
|
|
111
|
+
// the next), so concurrent requests are NOT actually concurrent -- before this they just
|
|
112
|
+
// queued inside stdin while each caller's own deadline ran from its WRITE moment. A slow
|
|
113
|
+
// action therefore used to kill the worker on a QUEUED request's timeout and take the
|
|
114
|
+
// in-flight normal call down with it (F5). The chain makes queueing explicit: one request
|
|
115
|
+
// is in flight at a time, its timer starts when it is actually written, and everything
|
|
116
|
+
// else waits with observable depth (busyness()).
|
|
117
|
+
/** @type {Promise<void>} */
|
|
118
|
+
this.queueTail = Promise.resolve();
|
|
119
|
+
this.queueDepth = 0; // requests waiting for the in-flight one to finish
|
|
120
|
+
this.inFlight = false; // true while a request is written and awaiting its answer
|
|
121
|
+
this.lastActionAt = 0; // ms epoch of the last written action (0 = none this process)
|
|
104
122
|
/** Set once the worker has been started, so a restart is distinguishable from a first start. */
|
|
105
123
|
this.started = false;
|
|
106
124
|
this.restarts = 0;
|
|
@@ -114,6 +132,20 @@ export class WorkerClient {
|
|
|
114
132
|
return this.child !== null && this.child.exitCode === null && !this.child.killed;
|
|
115
133
|
}
|
|
116
134
|
|
|
135
|
+
/**
|
|
136
|
+
* Client-side queue snapshot (0.12.0). These facts live HERE, not in the worker: a busy worker
|
|
137
|
+
* cannot answer a question about its own busyness, and "was anything queued behind the call I
|
|
138
|
+
* just made" is exactly what turns a slow stretch into a diagnosable one. 0 = never happened.
|
|
139
|
+
* @returns {{workerBusy: boolean, queueDepth: number, lastActionAgeMs: number}}
|
|
140
|
+
*/
|
|
141
|
+
busyness() {
|
|
142
|
+
return {
|
|
143
|
+
workerBusy: this.inFlight,
|
|
144
|
+
queueDepth: this.queueDepth,
|
|
145
|
+
lastActionAgeMs: this.lastActionAt ? Date.now() - this.lastActionAt : 0,
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
|
|
117
149
|
/**
|
|
118
150
|
* Start the worker if it is not running. Costs one PowerShell launch on first call; a no-op
|
|
119
151
|
* afterwards. Throws if the script is missing, because a missing engine is a broken install and
|
|
@@ -221,6 +253,9 @@ export class WorkerClient {
|
|
|
221
253
|
|
|
222
254
|
/** @param {string} reason */
|
|
223
255
|
#failAll(reason) {
|
|
256
|
+
// A dead worker answers nothing, so whatever was in flight is over: the flag must not stay
|
|
257
|
+
// true until the next timeout wraps a perfectly healthy restart.
|
|
258
|
+
this.inFlight = false;
|
|
224
259
|
for (const [id, entry] of this.pending) {
|
|
225
260
|
clearTimeout(entry.timer);
|
|
226
261
|
entry.reject(new Error(reason));
|
|
@@ -229,21 +264,15 @@ export class WorkerClient {
|
|
|
229
264
|
}
|
|
230
265
|
|
|
231
266
|
/**
|
|
232
|
-
*
|
|
233
|
-
*
|
|
234
|
-
* @param {
|
|
267
|
+
* Write one already-started request and await its response envelope. Only ever called from
|
|
268
|
+
* inside the FIFO chain, so `id`/`line` are minted by request() before queueing.
|
|
269
|
+
* @param {string} id @param {string} line @param {string} [action] name only, for the kill audit
|
|
235
270
|
* @returns {Promise<any>}
|
|
236
271
|
*/
|
|
237
|
-
|
|
238
|
-
this.start();
|
|
239
|
-
const id = String(++this.seq);
|
|
240
|
-
const line = JSON.stringify({ id, ...payload }) + '\n';
|
|
241
|
-
// `start()` above either established a live child or threw, so this cast states a fact the
|
|
242
|
-
// method just enforced rather than suppressing an unknown. The same holds for `stdin`: this
|
|
243
|
-
// class spawns with stdio 'pipe', and narrowing it here keeps the runtime path byte-identical
|
|
244
|
-
// (a defensive `if (!stdin) throw` would add a branch that can never run).
|
|
272
|
+
#send(id, line, action) {
|
|
245
273
|
const child = /** @type {import('node:child_process').ChildProcess} */ (this.child);
|
|
246
274
|
return new Promise((resolvePromise, rejectPromise) => {
|
|
275
|
+
this.inFlight = true;
|
|
247
276
|
const timer = setTimeout(() => {
|
|
248
277
|
this.pending.delete(id);
|
|
249
278
|
// The worker is presumed wedged. It is killed rather than left running: a wedged STA thread
|
|
@@ -264,12 +293,16 @@ export class WorkerClient {
|
|
|
264
293
|
} catch { /* a latch the disk refuses still dies by kill */ }
|
|
265
294
|
}
|
|
266
295
|
rejectPromise(new Error(
|
|
267
|
-
`engine worker did not answer within ${this.requestTimeoutMs} ms (action=${
|
|
296
|
+
`engine worker did not answer within ${this.requestTimeoutMs} ms (action=${action}); the worker was killed and will be restarted on the next call`,
|
|
268
297
|
));
|
|
269
298
|
try { child.kill(); } catch { /* already gone */ }
|
|
270
|
-
try { this.onTimeoutKill({ pid, action
|
|
299
|
+
try { this.onTimeoutKill({ pid, action }); } catch { /* audit is best-effort by design */ }
|
|
271
300
|
}, this.requestTimeoutMs);
|
|
272
|
-
this.pending.set(id, {
|
|
301
|
+
this.pending.set(id, {
|
|
302
|
+
resolve: (/** @type {any} */ msg) => { this.inFlight = false; resolvePromise(msg); },
|
|
303
|
+
reject: (/** @type {any} */ err) => { this.inFlight = false; rejectPromise(err); },
|
|
304
|
+
timer,
|
|
305
|
+
});
|
|
273
306
|
// The cast sits at the call site rather than in a `const stdin = ...` line so the emitted
|
|
274
307
|
// JavaScript keeps exactly the statements it had: this file's shape is reviewed as a document,
|
|
275
308
|
// and a typing exercise is not allowed to restructure it. `stdin` is `Writable | null` upstream
|
|
@@ -278,11 +311,102 @@ export class WorkerClient {
|
|
|
278
311
|
if (!err) return;
|
|
279
312
|
this.pending.delete(id);
|
|
280
313
|
clearTimeout(timer);
|
|
314
|
+
this.inFlight = false;
|
|
281
315
|
rejectPromise(new Error(`could not write to the engine worker: ${err.message}`));
|
|
282
316
|
});
|
|
283
317
|
});
|
|
284
318
|
}
|
|
285
319
|
|
|
320
|
+
/**
|
|
321
|
+
* Send one request and await its response object. Resolves with the whole envelope, so the caller
|
|
322
|
+
* decides what a refusal means; this layer never turns a refusal into an exception.
|
|
323
|
+
*
|
|
324
|
+
* 0.12.0 G4: the write goes through a FIFO chain -- with a serial worker a second concurrent
|
|
325
|
+
* request could only ever wait in the stdin buffer, so making that wait explicit costs nothing
|
|
326
|
+
* and buys two things: the request deadline now starts when the line is actually written (not
|
|
327
|
+
* when an earlier call started to hog the STA thread), and the wait is observable via
|
|
328
|
+
* busyness(). `abort` bypasses the queue by design: it is the request sent WHILE a slow action
|
|
329
|
+
* is in flight, and a queue-jumping abort is the whole cancellation story (the worker polls the
|
|
330
|
+
* latch file as the belt-and-braces channel -- see armAbort in lib/index.js).
|
|
331
|
+
* @param {any} payload
|
|
332
|
+
* @returns {Promise<any>}
|
|
333
|
+
*/
|
|
334
|
+
request(payload) {
|
|
335
|
+
if (payload?.action === 'abort') {
|
|
336
|
+
// Written against whatever child exists right now; start() would only wait for the cap check.
|
|
337
|
+
try {
|
|
338
|
+
this.start();
|
|
339
|
+
} catch (err) {
|
|
340
|
+
return Promise.reject(err);
|
|
341
|
+
}
|
|
342
|
+
const id = String(++this.seq);
|
|
343
|
+
return this.#send(id, JSON.stringify({ id, ...payload }) + '\n', payload?.action).catch((err) => {
|
|
344
|
+
// Fire-and-forget caller (lib/index.js armAbort); keep the rejection handled.
|
|
345
|
+
void err;
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
const bus = this.busyness();
|
|
349
|
+
if (!bus.workerBusy) this.lastActionAt = Date.now();
|
|
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 = () => {};
|
|
356
|
+
const task = this.queueTail.then(() => {
|
|
357
|
+
dequeued = true;
|
|
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
|
+
}
|
|
367
|
+
this.start();
|
|
368
|
+
const id = String(++this.seq);
|
|
369
|
+
return this.#send(id, JSON.stringify({ id, ...payload }) + '\n', payload?.action);
|
|
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
|
+
});
|
|
404
|
+
// The chain must survive a rejected request: swallow the failure once for sequencing purposes
|
|
405
|
+
// and let the caller-facing promise above carry the original error.
|
|
406
|
+
this.queueTail = task.then(() => {}, () => {});
|
|
407
|
+
return out;
|
|
408
|
+
}
|
|
409
|
+
|
|
286
410
|
/** Clean shutdown: close stdin (the worker exits its read loop), then make sure it is gone. */
|
|
287
411
|
async dispose() {
|
|
288
412
|
const child = this.child;
|
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:
|
|
@@ -716,9 +722,12 @@ export function apply(ctx, config = {}) {
|
|
|
716
722
|
// The restart budget travels with status (0.11.0). "Which attempt number is this" is the
|
|
717
723
|
// fact that turns an unexplained hang into a wedge someone can act on, and the counter
|
|
718
724
|
// lives client-side, so the engine's own answer cannot carry it.
|
|
725
|
+
// 0.12.0 G4: neither can the queue facts -- a busy worker cannot answer a question about
|
|
726
|
+
// its own busyness, so workerBusy/queueDepth/lastActionAgeMs are read from the client.
|
|
719
727
|
if (request.action === 'status' && r && typeof r === 'object') {
|
|
720
728
|
r.workerRestarts = client.restarts;
|
|
721
729
|
r.workerMaxRestarts = client.maxRestarts;
|
|
730
|
+
Object.assign(r, client.busyness());
|
|
722
731
|
}
|
|
723
732
|
if (request.action === 'click' && r && r.ok !== false && !r.refusal) {
|
|
724
733
|
// With space:'image' the request coordinates are IMAGE pixels; the engine reports the screen
|
|
@@ -882,6 +891,12 @@ function format(action, r) {
|
|
|
882
891
|
// fallbacks only fire when a caller synthesises a status result without the tool layer
|
|
883
892
|
// attaching the client facts (unit tests); on every real path the fields are present.
|
|
884
893
|
bits.push(`restarts=${r.workerRestarts ?? 0}/${r.workerMaxRestarts ?? 3}`);
|
|
894
|
+
// 0.12.0 G4: the queue is client-side truth, and "is something still running, and how many
|
|
895
|
+
// are waiting behind it" is what makes a slow call diagnosable instead of mysterious.
|
|
896
|
+
// The fallbacks mirror the restart ones: synthesised status results (unit tests) read idle.
|
|
897
|
+
bits.push(`workerBusy=${r.workerBusy === true}`);
|
|
898
|
+
bits.push(`queueDepth=${r.queueDepth ?? 0}`);
|
|
899
|
+
bits.push(`lastActionAgeMs=${r.lastActionAgeMs ?? 0}`);
|
|
885
900
|
if (r.stance) bits.push(`stance: ${r.stance}`);
|
|
886
901
|
return result(action, true, '', bits.join('\n'));
|
|
887
902
|
}
|
package/package.json
CHANGED
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.
|
|
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.
|
|
17
|
+
"version": "0.12.0-rc.2",
|
|
18
18
|
"transport": {
|
|
19
19
|
"type": "stdio"
|
|
20
20
|
},
|
package/src/schema/tools.json
CHANGED
|
@@ -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
|
|