dsh-windows-parallel-mcp 0.9.0-rc.1 → 0.9.0-rc.3
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 +22 -0
- package/CHANGELOG.es.md +22 -0
- package/CHANGELOG.fr.md +22 -0
- package/CHANGELOG.it.md +22 -0
- package/CHANGELOG.ja.md +22 -0
- package/CHANGELOG.ko.md +22 -0
- package/CHANGELOG.md +22 -0
- package/CHANGELOG.pt.md +22 -0
- package/CHANGELOG.ru.md +22 -0
- package/CHANGELOG.zh.md +22 -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 +1 -0
- package/dsh.plugin.json +1 -1
- package/lib/index.js +48 -16
- package/package.json +1 -1
- package/server.json +2 -2
- package/src/engine/decide.ps1 +3 -0
- package/src/engine/engine.ps1 +36 -0
- package/src/schema/tools.json +33 -7
- package/types/index.d.ts +4 -1
package/CHANGELOG.de.md
CHANGED
|
@@ -8,7 +8,27 @@ Dates are the registry `time` values for each version, not git commit dates —
|
|
|
8
8
|
when someone typed, a publish time records when a version became installable, and only the second
|
|
9
9
|
one is a promise to anyone installing it.
|
|
10
10
|
|
|
11
11
|
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
12
16
|
|
|
17
|
+
## 0.9.0-rc.3 — 2026-11-29 (prerelease)
|
|
18
|
+
|
|
19
|
+
**The out-of-range refusal is now a first-class code and the applied cap is echoed.** `invalid_argument`
|
|
20
|
+
joins the refusal vocabulary (decide.ps1 table, `src/schema/tools.json`, `docs/refusals.md`) with three
|
|
21
|
+
executable engine cases — `snapshot maxElements:0`, `screenshot maxWidth:-5`, `launch waitMs:999999` —
|
|
22
|
+
so the gate proves the code fires, not just that it is named. Snapshot and screenshot results now carry
|
|
23
|
+
an `...=N applied` segment showing the cap that actually ran, closing the last way a caller could act on
|
|
24
|
+
a value it did not send. The layer is `runtime` by this repo's convention (the code physically fires
|
|
25
|
+
from `engine.ps1`, the read paths bypass `decide.ps1`), the same shape as the pre-worker `stale_ref`.
|
|
26
|
+
## 0.9.0-rc.2 — 2026-11-29 (prerelease)
|
|
27
|
+
|
|
28
|
+
**`clampNumber` is now two functions with two different promises.** `clampSetting` keeps the tolerant
|
|
29
|
+
clamp for configuration values (a stale setting must not brick every tool call — schemastery is the
|
|
30
|
+
validation surface, the clamp is only the fallback). `refuseOutOfRange` serves call ARGUMENTS: the
|
|
31
|
+
four sites that forward numbers to the worker (`takeoverMaxMs`, `maxElements`, `maxWidth`, `waitMs`)
|
|
32
|
+
now refuse with `invalid_argument` naming the value that was actually sent, instead of silently
|
|
33
|
+
pressing 99999 into 5000 or -5 into 0. The refusal code is added to the shipped `RefusalCode`
|
|
34
|
+
contract; the schema/docs/case-table catch-up lands with rc.3.
|
|
13
35
|
## 0.9.0-rc.1 — 2026-11-29 (prerelease)
|
|
14
36
|
|
|
15
37
|
**Argument validation now enforces the bounds the contract already declared.** `validateArguments`
|
package/CHANGELOG.es.md
CHANGED
|
@@ -8,7 +8,27 @@ Dates are the registry `time` values for each version, not git commit dates —
|
|
|
8
8
|
when someone typed, a publish time records when a version became installable, and only the second
|
|
9
9
|
one is a promise to anyone installing it.
|
|
10
10
|
|
|
11
11
|
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
12
16
|
|
|
17
|
+
## 0.9.0-rc.3 — 2026-11-29 (prerelease)
|
|
18
|
+
|
|
19
|
+
**The out-of-range refusal is now a first-class code and the applied cap is echoed.** `invalid_argument`
|
|
20
|
+
joins the refusal vocabulary (decide.ps1 table, `src/schema/tools.json`, `docs/refusals.md`) with three
|
|
21
|
+
executable engine cases — `snapshot maxElements:0`, `screenshot maxWidth:-5`, `launch waitMs:999999` —
|
|
22
|
+
so the gate proves the code fires, not just that it is named. Snapshot and screenshot results now carry
|
|
23
|
+
an `...=N applied` segment showing the cap that actually ran, closing the last way a caller could act on
|
|
24
|
+
a value it did not send. The layer is `runtime` by this repo's convention (the code physically fires
|
|
25
|
+
from `engine.ps1`, the read paths bypass `decide.ps1`), the same shape as the pre-worker `stale_ref`.
|
|
26
|
+
## 0.9.0-rc.2 — 2026-11-29 (prerelease)
|
|
27
|
+
|
|
28
|
+
**`clampNumber` is now two functions with two different promises.** `clampSetting` keeps the tolerant
|
|
29
|
+
clamp for configuration values (a stale setting must not brick every tool call — schemastery is the
|
|
30
|
+
validation surface, the clamp is only the fallback). `refuseOutOfRange` serves call ARGUMENTS: the
|
|
31
|
+
four sites that forward numbers to the worker (`takeoverMaxMs`, `maxElements`, `maxWidth`, `waitMs`)
|
|
32
|
+
now refuse with `invalid_argument` naming the value that was actually sent, instead of silently
|
|
33
|
+
pressing 99999 into 5000 or -5 into 0. The refusal code is added to the shipped `RefusalCode`
|
|
34
|
+
contract; the schema/docs/case-table catch-up lands with rc.3.
|
|
13
35
|
## 0.9.0-rc.1 — 2026-11-29 (prerelease)
|
|
14
36
|
|
|
15
37
|
**Argument validation now enforces the bounds the contract already declared.** `validateArguments`
|
package/CHANGELOG.fr.md
CHANGED
|
@@ -8,7 +8,27 @@ Dates are the registry `time` values for each version, not git commit dates —
|
|
|
8
8
|
when someone typed, a publish time records when a version became installable, and only the second
|
|
9
9
|
one is a promise to anyone installing it.
|
|
10
10
|
|
|
11
11
|
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
12
16
|
|
|
17
|
+
## 0.9.0-rc.3 — 2026-11-29 (prerelease)
|
|
18
|
+
|
|
19
|
+
**The out-of-range refusal is now a first-class code and the applied cap is echoed.** `invalid_argument`
|
|
20
|
+
joins the refusal vocabulary (decide.ps1 table, `src/schema/tools.json`, `docs/refusals.md`) with three
|
|
21
|
+
executable engine cases — `snapshot maxElements:0`, `screenshot maxWidth:-5`, `launch waitMs:999999` —
|
|
22
|
+
so the gate proves the code fires, not just that it is named. Snapshot and screenshot results now carry
|
|
23
|
+
an `...=N applied` segment showing the cap that actually ran, closing the last way a caller could act on
|
|
24
|
+
a value it did not send. The layer is `runtime` by this repo's convention (the code physically fires
|
|
25
|
+
from `engine.ps1`, the read paths bypass `decide.ps1`), the same shape as the pre-worker `stale_ref`.
|
|
26
|
+
## 0.9.0-rc.2 — 2026-11-29 (prerelease)
|
|
27
|
+
|
|
28
|
+
**`clampNumber` is now two functions with two different promises.** `clampSetting` keeps the tolerant
|
|
29
|
+
clamp for configuration values (a stale setting must not brick every tool call — schemastery is the
|
|
30
|
+
validation surface, the clamp is only the fallback). `refuseOutOfRange` serves call ARGUMENTS: the
|
|
31
|
+
four sites that forward numbers to the worker (`takeoverMaxMs`, `maxElements`, `maxWidth`, `waitMs`)
|
|
32
|
+
now refuse with `invalid_argument` naming the value that was actually sent, instead of silently
|
|
33
|
+
pressing 99999 into 5000 or -5 into 0. The refusal code is added to the shipped `RefusalCode`
|
|
34
|
+
contract; the schema/docs/case-table catch-up lands with rc.3.
|
|
13
35
|
## 0.9.0-rc.1 — 2026-11-29 (prerelease)
|
|
14
36
|
|
|
15
37
|
**Argument validation now enforces the bounds the contract already declared.** `validateArguments`
|
package/CHANGELOG.it.md
CHANGED
|
@@ -8,7 +8,27 @@ Dates are the registry `time` values for each version, not git commit dates —
|
|
|
8
8
|
when someone typed, a publish time records when a version became installable, and only the second
|
|
9
9
|
one is a promise to anyone installing it.
|
|
10
10
|
|
|
11
11
|
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
12
16
|
|
|
17
|
+
## 0.9.0-rc.3 — 2026-11-29 (prerelease)
|
|
18
|
+
|
|
19
|
+
**The out-of-range refusal is now a first-class code and the applied cap is echoed.** `invalid_argument`
|
|
20
|
+
joins the refusal vocabulary (decide.ps1 table, `src/schema/tools.json`, `docs/refusals.md`) with three
|
|
21
|
+
executable engine cases — `snapshot maxElements:0`, `screenshot maxWidth:-5`, `launch waitMs:999999` —
|
|
22
|
+
so the gate proves the code fires, not just that it is named. Snapshot and screenshot results now carry
|
|
23
|
+
an `...=N applied` segment showing the cap that actually ran, closing the last way a caller could act on
|
|
24
|
+
a value it did not send. The layer is `runtime` by this repo's convention (the code physically fires
|
|
25
|
+
from `engine.ps1`, the read paths bypass `decide.ps1`), the same shape as the pre-worker `stale_ref`.
|
|
26
|
+
## 0.9.0-rc.2 — 2026-11-29 (prerelease)
|
|
27
|
+
|
|
28
|
+
**`clampNumber` is now two functions with two different promises.** `clampSetting` keeps the tolerant
|
|
29
|
+
clamp for configuration values (a stale setting must not brick every tool call — schemastery is the
|
|
30
|
+
validation surface, the clamp is only the fallback). `refuseOutOfRange` serves call ARGUMENTS: the
|
|
31
|
+
four sites that forward numbers to the worker (`takeoverMaxMs`, `maxElements`, `maxWidth`, `waitMs`)
|
|
32
|
+
now refuse with `invalid_argument` naming the value that was actually sent, instead of silently
|
|
33
|
+
pressing 99999 into 5000 or -5 into 0. The refusal code is added to the shipped `RefusalCode`
|
|
34
|
+
contract; the schema/docs/case-table catch-up lands with rc.3.
|
|
13
35
|
## 0.9.0-rc.1 — 2026-11-29 (prerelease)
|
|
14
36
|
|
|
15
37
|
**Argument validation now enforces the bounds the contract already declared.** `validateArguments`
|
package/CHANGELOG.ja.md
CHANGED
|
@@ -8,7 +8,27 @@ Dates are the registry `time` values for each version, not git commit dates —
|
|
|
8
8
|
when someone typed, a publish time records when a version became installable, and only the second
|
|
9
9
|
one is a promise to anyone installing it.
|
|
10
10
|
|
|
11
11
|
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
12
16
|
|
|
17
|
+
## 0.9.0-rc.3 — 2026-11-29 (prerelease)
|
|
18
|
+
|
|
19
|
+
**The out-of-range refusal is now a first-class code and the applied cap is echoed.** `invalid_argument`
|
|
20
|
+
joins the refusal vocabulary (decide.ps1 table, `src/schema/tools.json`, `docs/refusals.md`) with three
|
|
21
|
+
executable engine cases — `snapshot maxElements:0`, `screenshot maxWidth:-5`, `launch waitMs:999999` —
|
|
22
|
+
so the gate proves the code fires, not just that it is named. Snapshot and screenshot results now carry
|
|
23
|
+
an `...=N applied` segment showing the cap that actually ran, closing the last way a caller could act on
|
|
24
|
+
a value it did not send. The layer is `runtime` by this repo's convention (the code physically fires
|
|
25
|
+
from `engine.ps1`, the read paths bypass `decide.ps1`), the same shape as the pre-worker `stale_ref`.
|
|
26
|
+
## 0.9.0-rc.2 — 2026-11-29 (prerelease)
|
|
27
|
+
|
|
28
|
+
**`clampNumber` is now two functions with two different promises.** `clampSetting` keeps the tolerant
|
|
29
|
+
clamp for configuration values (a stale setting must not brick every tool call — schemastery is the
|
|
30
|
+
validation surface, the clamp is only the fallback). `refuseOutOfRange` serves call ARGUMENTS: the
|
|
31
|
+
four sites that forward numbers to the worker (`takeoverMaxMs`, `maxElements`, `maxWidth`, `waitMs`)
|
|
32
|
+
now refuse with `invalid_argument` naming the value that was actually sent, instead of silently
|
|
33
|
+
pressing 99999 into 5000 or -5 into 0. The refusal code is added to the shipped `RefusalCode`
|
|
34
|
+
contract; the schema/docs/case-table catch-up lands with rc.3.
|
|
13
35
|
## 0.9.0-rc.1 — 2026-11-29 (prerelease)
|
|
14
36
|
|
|
15
37
|
**Argument validation now enforces the bounds the contract already declared.** `validateArguments`
|
package/CHANGELOG.ko.md
CHANGED
|
@@ -8,7 +8,27 @@ Dates are the registry `time` values for each version, not git commit dates —
|
|
|
8
8
|
when someone typed, a publish time records when a version became installable, and only the second
|
|
9
9
|
one is a promise to anyone installing it.
|
|
10
10
|
|
|
11
11
|
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
12
16
|
|
|
17
|
+
## 0.9.0-rc.3 — 2026-11-29 (prerelease)
|
|
18
|
+
|
|
19
|
+
**The out-of-range refusal is now a first-class code and the applied cap is echoed.** `invalid_argument`
|
|
20
|
+
joins the refusal vocabulary (decide.ps1 table, `src/schema/tools.json`, `docs/refusals.md`) with three
|
|
21
|
+
executable engine cases — `snapshot maxElements:0`, `screenshot maxWidth:-5`, `launch waitMs:999999` —
|
|
22
|
+
so the gate proves the code fires, not just that it is named. Snapshot and screenshot results now carry
|
|
23
|
+
an `...=N applied` segment showing the cap that actually ran, closing the last way a caller could act on
|
|
24
|
+
a value it did not send. The layer is `runtime` by this repo's convention (the code physically fires
|
|
25
|
+
from `engine.ps1`, the read paths bypass `decide.ps1`), the same shape as the pre-worker `stale_ref`.
|
|
26
|
+
## 0.9.0-rc.2 — 2026-11-29 (prerelease)
|
|
27
|
+
|
|
28
|
+
**`clampNumber` is now two functions with two different promises.** `clampSetting` keeps the tolerant
|
|
29
|
+
clamp for configuration values (a stale setting must not brick every tool call — schemastery is the
|
|
30
|
+
validation surface, the clamp is only the fallback). `refuseOutOfRange` serves call ARGUMENTS: the
|
|
31
|
+
four sites that forward numbers to the worker (`takeoverMaxMs`, `maxElements`, `maxWidth`, `waitMs`)
|
|
32
|
+
now refuse with `invalid_argument` naming the value that was actually sent, instead of silently
|
|
33
|
+
pressing 99999 into 5000 or -5 into 0. The refusal code is added to the shipped `RefusalCode`
|
|
34
|
+
contract; the schema/docs/case-table catch-up lands with rc.3.
|
|
13
35
|
## 0.9.0-rc.1 — 2026-11-29 (prerelease)
|
|
14
36
|
|
|
15
37
|
**Argument validation now enforces the bounds the contract already declared.** `validateArguments`
|
package/CHANGELOG.md
CHANGED
|
@@ -5,7 +5,27 @@ Dates are the registry `time` values for each version, not git commit dates —
|
|
|
5
5
|
when someone typed, a publish time records when a version became installable, and only the second
|
|
6
6
|
one is a promise to anyone installing it.
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
9
13
|
|
|
14
|
+
## 0.9.0-rc.3 — 2026-11-29 (prerelease)
|
|
15
|
+
|
|
16
|
+
**The out-of-range refusal is now a first-class code and the applied cap is echoed.** `invalid_argument`
|
|
17
|
+
joins the refusal vocabulary (decide.ps1 table, `src/schema/tools.json`, `docs/refusals.md`) with three
|
|
18
|
+
executable engine cases — `snapshot maxElements:0`, `screenshot maxWidth:-5`, `launch waitMs:999999` —
|
|
19
|
+
so the gate proves the code fires, not just that it is named. Snapshot and screenshot results now carry
|
|
20
|
+
an `...=N applied` segment showing the cap that actually ran, closing the last way a caller could act on
|
|
21
|
+
a value it did not send. The layer is `runtime` by this repo's convention (the code physically fires
|
|
22
|
+
from `engine.ps1`, the read paths bypass `decide.ps1`), the same shape as the pre-worker `stale_ref`.
|
|
23
|
+
## 0.9.0-rc.2 — 2026-11-29 (prerelease)
|
|
24
|
+
|
|
25
|
+
**`clampNumber` is now two functions with two different promises.** `clampSetting` keeps the tolerant
|
|
26
|
+
clamp for configuration values (a stale setting must not brick every tool call — schemastery is the
|
|
27
|
+
validation surface, the clamp is only the fallback). `refuseOutOfRange` serves call ARGUMENTS: the
|
|
28
|
+
four sites that forward numbers to the worker (`takeoverMaxMs`, `maxElements`, `maxWidth`, `waitMs`)
|
|
29
|
+
now refuse with `invalid_argument` naming the value that was actually sent, instead of silently
|
|
30
|
+
pressing 99999 into 5000 or -5 into 0. The refusal code is added to the shipped `RefusalCode`
|
|
31
|
+
contract; the schema/docs/case-table catch-up lands with rc.3.
|
|
10
32
|
## 0.9.0-rc.1 — 2026-11-29 (prerelease)
|
|
11
33
|
|
|
12
34
|
**Argument validation now enforces the bounds the contract already declared.** `validateArguments`
|
package/CHANGELOG.pt.md
CHANGED
|
@@ -8,7 +8,27 @@ Dates are the registry `time` values for each version, not git commit dates —
|
|
|
8
8
|
when someone typed, a publish time records when a version became installable, and only the second
|
|
9
9
|
one is a promise to anyone installing it.
|
|
10
10
|
|
|
11
11
|
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
12
16
|
|
|
17
|
+
## 0.9.0-rc.3 — 2026-11-29 (prerelease)
|
|
18
|
+
|
|
19
|
+
**The out-of-range refusal is now a first-class code and the applied cap is echoed.** `invalid_argument`
|
|
20
|
+
joins the refusal vocabulary (decide.ps1 table, `src/schema/tools.json`, `docs/refusals.md`) with three
|
|
21
|
+
executable engine cases — `snapshot maxElements:0`, `screenshot maxWidth:-5`, `launch waitMs:999999` —
|
|
22
|
+
so the gate proves the code fires, not just that it is named. Snapshot and screenshot results now carry
|
|
23
|
+
an `...=N applied` segment showing the cap that actually ran, closing the last way a caller could act on
|
|
24
|
+
a value it did not send. The layer is `runtime` by this repo's convention (the code physically fires
|
|
25
|
+
from `engine.ps1`, the read paths bypass `decide.ps1`), the same shape as the pre-worker `stale_ref`.
|
|
26
|
+
## 0.9.0-rc.2 — 2026-11-29 (prerelease)
|
|
27
|
+
|
|
28
|
+
**`clampNumber` is now two functions with two different promises.** `clampSetting` keeps the tolerant
|
|
29
|
+
clamp for configuration values (a stale setting must not brick every tool call — schemastery is the
|
|
30
|
+
validation surface, the clamp is only the fallback). `refuseOutOfRange` serves call ARGUMENTS: the
|
|
31
|
+
four sites that forward numbers to the worker (`takeoverMaxMs`, `maxElements`, `maxWidth`, `waitMs`)
|
|
32
|
+
now refuse with `invalid_argument` naming the value that was actually sent, instead of silently
|
|
33
|
+
pressing 99999 into 5000 or -5 into 0. The refusal code is added to the shipped `RefusalCode`
|
|
34
|
+
contract; the schema/docs/case-table catch-up lands with rc.3.
|
|
13
35
|
## 0.9.0-rc.1 — 2026-11-29 (prerelease)
|
|
14
36
|
|
|
15
37
|
**Argument validation now enforces the bounds the contract already declared.** `validateArguments`
|
package/CHANGELOG.ru.md
CHANGED
|
@@ -8,7 +8,27 @@ Dates are the registry `time` values for each version, not git commit dates —
|
|
|
8
8
|
when someone typed, a publish time records when a version became installable, and only the second
|
|
9
9
|
one is a promise to anyone installing it.
|
|
10
10
|
|
|
11
11
|
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
12
16
|
|
|
17
|
+
## 0.9.0-rc.3 — 2026-11-29 (prerelease)
|
|
18
|
+
|
|
19
|
+
**The out-of-range refusal is now a first-class code and the applied cap is echoed.** `invalid_argument`
|
|
20
|
+
joins the refusal vocabulary (decide.ps1 table, `src/schema/tools.json`, `docs/refusals.md`) with three
|
|
21
|
+
executable engine cases — `snapshot maxElements:0`, `screenshot maxWidth:-5`, `launch waitMs:999999` —
|
|
22
|
+
so the gate proves the code fires, not just that it is named. Snapshot and screenshot results now carry
|
|
23
|
+
an `...=N applied` segment showing the cap that actually ran, closing the last way a caller could act on
|
|
24
|
+
a value it did not send. The layer is `runtime` by this repo's convention (the code physically fires
|
|
25
|
+
from `engine.ps1`, the read paths bypass `decide.ps1`), the same shape as the pre-worker `stale_ref`.
|
|
26
|
+
## 0.9.0-rc.2 — 2026-11-29 (prerelease)
|
|
27
|
+
|
|
28
|
+
**`clampNumber` is now two functions with two different promises.** `clampSetting` keeps the tolerant
|
|
29
|
+
clamp for configuration values (a stale setting must not brick every tool call — schemastery is the
|
|
30
|
+
validation surface, the clamp is only the fallback). `refuseOutOfRange` serves call ARGUMENTS: the
|
|
31
|
+
four sites that forward numbers to the worker (`takeoverMaxMs`, `maxElements`, `maxWidth`, `waitMs`)
|
|
32
|
+
now refuse with `invalid_argument` naming the value that was actually sent, instead of silently
|
|
33
|
+
pressing 99999 into 5000 or -5 into 0. The refusal code is added to the shipped `RefusalCode`
|
|
34
|
+
contract; the schema/docs/case-table catch-up lands with rc.3.
|
|
13
35
|
## 0.9.0-rc.1 — 2026-11-29 (prerelease)
|
|
14
36
|
|
|
15
37
|
**Argument validation now enforces the bounds the contract already declared.** `validateArguments`
|
package/CHANGELOG.zh.md
CHANGED
|
@@ -8,7 +8,27 @@ Dates are the registry `time` values for each version, not git commit dates —
|
|
|
8
8
|
when someone typed, a publish time records when a version became installable, and only the second
|
|
9
9
|
one is a promise to anyone installing it.
|
|
10
10
|
|
|
11
11
|
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
12
16
|
|
|
17
|
+
## 0.9.0-rc.3 — 2026-11-29 (prerelease)
|
|
18
|
+
|
|
19
|
+
**The out-of-range refusal is now a first-class code and the applied cap is echoed.** `invalid_argument`
|
|
20
|
+
joins the refusal vocabulary (decide.ps1 table, `src/schema/tools.json`, `docs/refusals.md`) with three
|
|
21
|
+
executable engine cases — `snapshot maxElements:0`, `screenshot maxWidth:-5`, `launch waitMs:999999` —
|
|
22
|
+
so the gate proves the code fires, not just that it is named. Snapshot and screenshot results now carry
|
|
23
|
+
an `...=N applied` segment showing the cap that actually ran, closing the last way a caller could act on
|
|
24
|
+
a value it did not send. The layer is `runtime` by this repo's convention (the code physically fires
|
|
25
|
+
from `engine.ps1`, the read paths bypass `decide.ps1`), the same shape as the pre-worker `stale_ref`.
|
|
26
|
+
## 0.9.0-rc.2 — 2026-11-29 (prerelease)
|
|
27
|
+
|
|
28
|
+
**`clampNumber` is now two functions with two different promises.** `clampSetting` keeps the tolerant
|
|
29
|
+
clamp for configuration values (a stale setting must not brick every tool call — schemastery is the
|
|
30
|
+
validation surface, the clamp is only the fallback). `refuseOutOfRange` serves call ARGUMENTS: the
|
|
31
|
+
four sites that forward numbers to the worker (`takeoverMaxMs`, `maxElements`, `maxWidth`, `waitMs`)
|
|
32
|
+
now refuse with `invalid_argument` naming the value that was actually sent, instead of silently
|
|
33
|
+
pressing 99999 into 5000 or -5 into 0. The refusal code is added to the shipped `RefusalCode`
|
|
34
|
+
contract; the schema/docs/case-table catch-up lands with rc.3.
|
|
13
35
|
## 0.9.0-rc.1 — 2026-11-29 (prerelease)
|
|
14
36
|
|
|
15
37
|
**Argument validation now enforces the bounds the contract already declared.** `validateArguments`
|
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.9.0-rc.
|
|
8
|
+
> **Current release: 0.9.0-rc.3** — 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.9.0-rc.
|
|
8
|
+
> **Current release: 0.9.0-rc.3** — 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.9.0-rc.
|
|
8
|
+
> **Current release: 0.9.0-rc.3** — 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.9.0-rc.
|
|
8
|
+
> **Current release: 0.9.0-rc.3** — 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.9.0-rc.
|
|
8
|
+
> **Current release: 0.9.0-rc.3** — 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.9.0-rc.
|
|
8
|
+
> **Current release: 0.9.0-rc.3** — 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.9.0-rc.
|
|
4
|
+
> **Current release: 0.9.0-rc.3** — 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.9.0-rc.
|
|
8
|
+
> **Current release: 0.9.0-rc.3** — 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.9.0-rc.
|
|
8
|
+
> **Current release: 0.9.0-rc.3** — 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.9.0-rc.
|
|
8
|
+
> **Current release: 0.9.0-rc.3** — 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
|
@@ -53,6 +53,7 @@ R2′ 把「拒绝」当成本产品的**正常结果**(`engine.ps1` 首段注
|
|
|
53
53
|
| `app_launch_denied` | `lib/index.js`(前 worker 闸)、`decide.ps1`(引擎侧二道) | `launch` 未被授权:`appLaunchAllowed` 关着,或程序名不在 `appLaunchAllow` 精确白名单里(空名单 = 即使开关开着也什么都不能启动) | 这是**所有者的决定**,不是可重试的临时失败:由所有者把精确名称或绝对 exe 路径加入白名单。不存在通配符与前缀匹配;宿主侧拒绝时**零 worker 请求**,因此没有任何进程被启动 | **REAL** — `launch-gate-off`(闸门关)与 `launch-not-whitelisted`(`calc` 不在 `[write-only-probe, notepad]` 里)两臂均跑引擎且断言无 pid |
|
|
54
54
|
| `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 开关都满足、仍因天花板不足被拒 ⇒ 证明两条轴真的正交)|
|
|
55
55
|
| `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`(长文本中途中断臂) |
|
|
56
|
+
| `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 臂) |
|
|
56
57
|
|
|
57
58
|
## 三个诚实的缺口(写在文档里,而不是留白)
|
|
58
59
|
|
package/dsh.plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "dsh-external/dsh-windows-parallel-mcp",
|
|
3
|
-
"version": "0.9.0-rc.
|
|
3
|
+
"version": "0.9.0-rc.3",
|
|
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/index.js
CHANGED
|
@@ -169,14 +169,14 @@ export function apply(ctx, config = {}) {
|
|
|
169
169
|
// because a prompt-level hint is not a switch (same reasoning as `enabled`/`paused`).
|
|
170
170
|
takeoverAllowed: resolveSetting(config.takeoverAllowed, false) === true,
|
|
171
171
|
keyInjectAllowed: resolveSetting(config.keyInjectAllowed, false) === true,
|
|
172
|
-
takeoverMaxMs:
|
|
173
|
-
takeoverArmMs:
|
|
172
|
+
takeoverMaxMs: clampSetting(resolveSetting(config.takeoverMaxMs, 10000), 500, 60000, 10000),
|
|
173
|
+
takeoverArmMs: clampSetting(resolveSetting(config.takeoverArmMs, 800), 0, 5000, 800),
|
|
174
174
|
// ---- 0.5.0 read-path settings. Forwarded, never silently clamped on the caller's behalf: the
|
|
175
175
|
// engine is the one that reports what it actually used (maxElements/shotsKeep ride back on the
|
|
176
176
|
// result), so "the setting took" is observable rather than assumed.
|
|
177
|
-
snapshotMaxElements:
|
|
178
|
-
screenshotMaxWidth:
|
|
179
|
-
shotsKeep:
|
|
177
|
+
snapshotMaxElements: clampSetting(resolveSetting(config.snapshotMaxElements, 300), 1, 5000, 300),
|
|
178
|
+
screenshotMaxWidth: clampSetting(resolveSetting(config.screenshotMaxWidth, 0), 0, 7680, 0),
|
|
179
|
+
shotsKeep: clampSetting(resolveSetting(config.shotsKeep, 10), 1, 200, 10),
|
|
180
180
|
// ---- 0.7.0 desktop gates. Read defensively because a whitelist is a list of AUTHORIZATIONS: a
|
|
181
181
|
// non-array, an empty entry, or a stray space must never turn into "everything is allowed".
|
|
182
182
|
appLaunchAllowed: resolveSetting(config.appLaunchAllowed, false) === true,
|
|
@@ -185,8 +185,8 @@ export function apply(ctx, config = {}) {
|
|
|
185
185
|
// without asking again; the per-action `requiresTier` in src/schema/tools.json is the other axis, so
|
|
186
186
|
// adding an action never means adding a setting.
|
|
187
187
|
policy: normalizePolicy(resolveSetting(config.policy, 'balanced')),
|
|
188
|
-
policyIdleMs:
|
|
189
|
-
auditKeep:
|
|
188
|
+
policyIdleMs: clampSetting(resolveSetting(config.policyIdleMs, 3000), 0, 60000, 3000),
|
|
189
|
+
auditKeep: clampSetting(resolveSetting(config.auditKeep, 2000), 100, 200000, 2000),
|
|
190
190
|
};
|
|
191
191
|
|
|
192
192
|
const logger = ctx.logger ?? console;
|
|
@@ -363,7 +363,7 @@ export function apply(ctx, config = {}) {
|
|
|
363
363
|
const takeoverFields = takeover
|
|
364
364
|
? {
|
|
365
365
|
takeover: true,
|
|
366
|
-
takeoverMaxMs:
|
|
366
|
+
takeoverMaxMs: refuseOutOfRange(args.takeoverMaxMs, 500, 60000, settings.takeoverMaxMs, 'takeoverMaxMs'),
|
|
367
367
|
takeoverArmMs: settings.takeoverArmMs,
|
|
368
368
|
...(keyInput === 'inject' ? { keyInput } : {}),
|
|
369
369
|
}
|
|
@@ -389,7 +389,7 @@ export function apply(ctx, config = {}) {
|
|
|
389
389
|
return {
|
|
390
390
|
action: 'snapshot',
|
|
391
391
|
hwnd: args.hwnd,
|
|
392
|
-
maxElements:
|
|
392
|
+
maxElements: refuseOutOfRange(args.maxElements, 1, 5000, settings.snapshotMaxElements, 'maxElements'),
|
|
393
393
|
interactableOnly: args.interactableOnly !== false,
|
|
394
394
|
sinceSnapId: typeof args.sinceSnapId === 'string' ? args.sinceSnapId : '',
|
|
395
395
|
intent: typeof args.intent === 'string' ? args.intent : '',
|
|
@@ -403,7 +403,7 @@ export function apply(ctx, config = {}) {
|
|
|
403
403
|
action: 'screenshot',
|
|
404
404
|
hwnd: args.fullScreen === true ? (args.hwnd ?? '') : args.hwnd,
|
|
405
405
|
fullScreen: args.fullScreen === true,
|
|
406
|
-
maxWidth:
|
|
406
|
+
maxWidth: refuseOutOfRange(args.maxWidth, 0, 7680, settings.screenshotMaxWidth, 'maxWidth'),
|
|
407
407
|
shotsKeep: settings.shotsKeep,
|
|
408
408
|
};
|
|
409
409
|
case 'preview':
|
|
@@ -487,7 +487,7 @@ export function apply(ctx, config = {}) {
|
|
|
487
487
|
return {
|
|
488
488
|
action: 'launch', target: args.target,
|
|
489
489
|
...(typeof args.args === 'string' && args.args ? { args: args.args } : {}),
|
|
490
|
-
waitMs:
|
|
490
|
+
waitMs: refuseOutOfRange(args.waitMs, 0, 30000, 3000, 'waitMs'),
|
|
491
491
|
policy: settings.policy, policyIdleMs: settings.policyIdleMs,
|
|
492
492
|
launchAllowed: settings.appLaunchAllowed,
|
|
493
493
|
allowList: settings.appLaunchAllow,
|
|
@@ -557,7 +557,8 @@ export function apply(ctx, config = {}) {
|
|
|
557
557
|
+ 'needs no picture. Refusals carry a code (no_hwnd, '
|
|
558
558
|
+ 'paused, elevated_target, unreachable, uia_tree_empty, uia_probe_failed, terminal_no_door, needs_facts, action_failed, '
|
|
559
559
|
+ 'restore_failed, takeover_unavailable, keyinject_unavailable, takeover_aborted, stale_ref, app_launch_denied, '
|
|
560
|
-
+ 'policy_denied, user_active) and a reason. '
|
|
560
|
+
+ 'policy_denied, user_active, invalid_argument) and a reason. invalid_argument is the 0.9.0 argument '
|
|
561
|
+
+ 'contract: a numeric outside the declared bounds is refused naming the sent value, never clamped. '
|
|
561
562
|
+ 'THREE DESKTOP ACTIONS exist since 0.7.0 and are gated by settings rather than by the target: launch needs '
|
|
562
563
|
+ 'appLaunchAllowed AND an exact appLaunchAllow entry (an empty whitelist means nothing, and no wildcard exists); '
|
|
563
564
|
+ 'clipboard reads and writes the system clipboard, reporting lengths and never contents; window changes one '
|
|
@@ -1024,6 +1025,10 @@ function formatSnapshot(r) {
|
|
|
1024
1025
|
+ (truncated ? ` (truncated at ${count} of ${total})` : '')
|
|
1025
1026
|
+ (delta ? ` (delta vs ${delta.sinceSnapId}: +${added.length} -${removed.length} ~${changed.length})` : '');
|
|
1026
1027
|
const meta = [`snapId=${r.snapId || '?'}`, `frame=${r.frame || '?'}`, `frameCheck=${r.frameCheck || '?'}`, `total=${total}`];
|
|
1028
|
+
// 0.9.0 applied echo: the caller sees the cap that actually ran, so a clamped/rounded value could
|
|
1029
|
+
// never hide again -- refuseOutOfRange means it can no longer silently change, and this line proves
|
|
1030
|
+
// what the engine used. Only echoed when the engine reported it (snapshot path).
|
|
1031
|
+
if (Number.isFinite(r.maxElements)) meta.push(`maxElements=${r.maxElements} applied`);
|
|
1027
1032
|
if (r.frameInset && typeof r.frameInset === 'object') {
|
|
1028
1033
|
meta.push(`frameInset=${r.frameInset.left ?? '?'},${r.frameInset.top ?? '?'},${r.frameInset.right ?? '?'},${r.frameInset.bottom ?? '?'}`);
|
|
1029
1034
|
}
|
|
@@ -1086,7 +1091,8 @@ function formatScreenshot(r) {
|
|
|
1086
1091
|
`file=${r.file || '?'}`,
|
|
1087
1092
|
`shotId=${r.shotId || '?'}`,
|
|
1088
1093
|
`screenRect=${rect.left ?? '?'},${rect.top ?? '?'},${rect.right ?? '?'},${rect.bottom ?? '?'} `
|
|
1089
|
-
+ `imageSize=${size.width ?? '?'}x${size.height ?? '?'} bytes=${r.bytes ?? '?'} shotsKeep=${r.shotsKeep ?? '?'} latencyMs=${r.latencyMs ?? '?'}
|
|
1094
|
+
+ `imageSize=${size.width ?? '?'}x${size.height ?? '?'} bytes=${r.bytes ?? '?'} shotsKeep=${r.shotsKeep ?? '?'} latencyMs=${r.latencyMs ?? '?'}`
|
|
1095
|
+
+ (Number.isFinite(r.maxWidth) ? ` maxWidth=${r.maxWidth} applied` : ''),
|
|
1090
1096
|
'mapping: screenX = screenRect.left + round(imageX / scale); screenY = screenRect.top + round(imageY / scale). '
|
|
1091
1097
|
+ `The ENGINE applies this when a click passes space:"image" with shotId=${r.shotId || '?'}; do not multiply it yourself.`,
|
|
1092
1098
|
];
|
|
@@ -1222,14 +1228,40 @@ function parsePoint(s) {
|
|
|
1222
1228
|
return { x: Number(m[1]), y: Number(m[2]) };
|
|
1223
1229
|
}
|
|
1224
1230
|
|
|
1225
|
-
/** Clamp a possibly-undefined number into [min,max], falling back to `fallback` for non-numbers.
|
|
1231
|
+
/** Clamp a possibly-undefined number into [min,max], falling back to `fallback` for non-numbers.
|
|
1232
|
+
* SETTINGS only (0.9.0 split): a bad value on the configuration surface is a typo behind a form that
|
|
1233
|
+
* schemastery already validated, so the tolerant clamp stays -- refusing there would let one stale
|
|
1234
|
+
* setting brick every tool call. Call ARGUMENTS must not ride this function: silently rewriting what
|
|
1235
|
+
* the caller sent is the silent-fake-success shape G1 names. Use refuseOutOfRange there. */
|
|
1226
1236
|
/** @param {any} value @param {number} min @param {number} max @param {number} fallback @returns {number} */
|
|
1227
|
-
function
|
|
1237
|
+
function clampSetting(value, min, max, fallback) {
|
|
1228
1238
|
const n = Number(value);
|
|
1229
1239
|
if (!Number.isFinite(n)) return fallback;
|
|
1230
1240
|
return Math.max(min, Math.min(max, Math.round(n)));
|
|
1231
1241
|
}
|
|
1232
1242
|
|
|
1243
|
+
/**
|
|
1244
|
+
* The argument-side twin: an out-of-range (or non-integer where `integer` is declared, or otherwise
|
|
1245
|
+
* non-numeric) CALL argument is a refusal naming the value the caller actually sent, never a silent
|
|
1246
|
+
* rewrite. `undefined` still means "not asked for" and takes the fallback. This layer is belt-and-braces
|
|
1247
|
+
* behind validateArguments -- the host's own defineTool may skip the shim's validator, so the sites
|
|
1248
|
+
* that forward numbers to the worker re-check the same bounds here.
|
|
1249
|
+
* @param {any} value @param {number} min @param {number} max @param {number|string} fallback
|
|
1250
|
+
* @param {string} name @param {boolean} [integer]
|
|
1251
|
+
* @returns {number|string}
|
|
1252
|
+
*/
|
|
1253
|
+
function refuseOutOfRange(value, min, max, fallback, name, integer = true) {
|
|
1254
|
+
if (value === undefined || value === null) return fallback;
|
|
1255
|
+
const n = Number(value);
|
|
1256
|
+
if (!Number.isFinite(n) || (integer && !Number.isInteger(n))) {
|
|
1257
|
+
throw refusal('invalid_argument', `'${name}' must be ${integer ? 'a whole number' : 'a number'} in [${min}, ${max}] (got ${JSON.stringify(value)}); no worker request was made and the value was not rewritten`);
|
|
1258
|
+
}
|
|
1259
|
+
if (n < min || n > max) {
|
|
1260
|
+
throw refusal('invalid_argument', `'${name}' must be in [${min}, ${max}] (got ${n}); no worker request was made and the value was not clamped`);
|
|
1261
|
+
}
|
|
1262
|
+
return n;
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1233
1265
|
/** The same latch path the engine computes: %LOCALAPPDATA%\wpm\takeover-abort.<worker pid>. */
|
|
1234
1266
|
/** @param {number|string} pid @returns {string} */
|
|
1235
1267
|
function abortLatchPath(pid) {
|
|
@@ -1246,4 +1278,4 @@ function hwndHint(args) {
|
|
|
1246
1278
|
// Exported for tests: the projection from the five contract actions to this one tool.
|
|
1247
1279
|
// `formatResult` is here so the effect dimension can be asserted on the SHIPPED projection, with
|
|
1248
1280
|
// hand-authored engine results, without a desktop that has to cooperate.
|
|
1249
|
-
export const _internals = { PARAMETERS, ACTIONS, TOOL_NAME, clampSettle, CONFIG_DEFAULTS, formatResult: format };
|
|
1281
|
+
export const _internals = { PARAMETERS, ACTIONS, TOOL_NAME, clampSettle, clampSetting, refuseOutOfRange, CONFIG_DEFAULTS, formatResult: format };
|
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.9.0-rc.
|
|
6
|
+
"version": "0.9.0-rc.3",
|
|
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.9.0-rc.
|
|
17
|
+
"version": "0.9.0-rc.3",
|
|
18
18
|
"transport": {
|
|
19
19
|
"type": "stdio"
|
|
20
20
|
},
|
package/src/engine/decide.ps1
CHANGED
|
@@ -54,6 +54,9 @@ $script:WpmRefusals = @{
|
|
|
54
54
|
policy_denied = 'the action''s declared tier is above what the policy setting allows. Next step: raise policy in settings (readonly < quiet < balanced < full) -- NOT retrying this call'
|
|
55
55
|
user_active = 'the owner was at the keyboard when this was asked for (last physical input younger than policyIdleMs) and the action needs the takeover tier. This product does not open a dialog at someone who is typing -- a popup is a second disturbance dressed as consent. Next step: wait for idle, or pass forceUserActive:true explicitly (it is recorded in the audit log as forced)'
|
|
56
56
|
app_launch_denied = 'launch is not authorised: appLaunchAllowed is off, or the program is not on the appLaunchAllow whitelist (an empty whitelist means nothing may launch). Next step: the OWNER adds the exact name to the whitelist; a wildcard does not exist and this refusal is not a transient failure to retry through'
|
|
57
|
+
# ---- 0.9.0 argument contract. The number was outside the bounds the schema declares; pre-0.9.0 the
|
|
58
|
+
# host quietly clamped or rounded it, so the caller acted on a value it never sent.
|
|
59
|
+
invalid_argument = 'a numeric argument is outside the bounds the tool schema declares (or a fraction where an integer is required); the value is refused as sent, never clamped or rounded on the caller''s behalf. Next step: re-send inside the stated range'
|
|
57
60
|
}
|
|
58
61
|
|
|
59
62
|
# THE LADDER, mirrored from lib/policy.js. Two copies of an ordering is normally the bug pattern this
|
package/src/engine/engine.ps1
CHANGED
|
@@ -229,6 +229,28 @@ function Invoke-WpmAction {
|
|
|
229
229
|
abortChord = ''; keysInjected = 0; injectedChars = 0
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
+
# ---- 0.9.0 argument bounds, enforced in parallel with the host ---------------------------------
|
|
233
|
+
# The host refuses an out-of-range number before the worker ever sees it; this is the same contract
|
|
234
|
+
# on the MCP form and any direct worker call. A number that arrived out of bounds must be REFUSED
|
|
235
|
+
# naming what was sent, never quietly pressed into range -- a silent clamp is how maxElements: 0
|
|
236
|
+
# came to mean 1 and maxWidth: -5 came to mean "no limit".
|
|
237
|
+
$bounds = @()
|
|
238
|
+
if ($Action -eq 'snapshot' -and ($MaxElements -lt 1 -or $MaxElements -gt 5000)) {
|
|
239
|
+
$bounds += "maxElements must be in [1, 5000] (got $MaxElements)"
|
|
240
|
+
}
|
|
241
|
+
if ($Action -eq 'screenshot' -and ($MaxWidth -lt 0 -or $MaxWidth -gt 7680)) {
|
|
242
|
+
$bounds += "maxWidth must be in [0, 7680] (got $MaxWidth)"
|
|
243
|
+
}
|
|
244
|
+
if ($Takeover -and ($TakeoverMaxMs -lt 500 -or $TakeoverMaxMs -gt 60000)) {
|
|
245
|
+
$bounds += "takeoverMaxMs must be in [500, 60000] (got $TakeoverMaxMs)"
|
|
246
|
+
}
|
|
247
|
+
if ($bounds.Count) {
|
|
248
|
+
$result.refusal = 'invalid_argument'
|
|
249
|
+
$result.reason = $script:WpmRefusals.invalid_argument + ' [' + ($bounds -join '; ') + ']'
|
|
250
|
+
$result.latencyMs = [DateTimeOffset]::UtcNow.ToUnixTimeMilliseconds() - $started
|
|
251
|
+
return $result
|
|
252
|
+
}
|
|
253
|
+
|
|
232
254
|
# A QUERY IS NOT AN ACTION, and this branch is early on purpose. It used to sit inside the action
|
|
233
255
|
# chain, where 'status' fell through to the UIA branch and INVOKED the pattern it found -- a call
|
|
234
256
|
# whose entire purpose is to report state would click a control. It is also placed before the
|
|
@@ -274,6 +296,9 @@ function Invoke-WpmAction {
|
|
|
274
296
|
}
|
|
275
297
|
$result.channel = 'none'; $result.tier = 'none'
|
|
276
298
|
if ($Action -eq 'snapshot') {
|
|
299
|
+
# 0.9.0 echo: the cap that WAS applied travels back on the result, so "the value I sent is the
|
|
300
|
+
# value that ran" is readable instead of assumed (paired with the host's applied line).
|
|
301
|
+
$result.maxElements = $MaxElements
|
|
277
302
|
try {
|
|
278
303
|
$snap = Get-WpmSnapshotTree -Hwnd $h -MaxElements $MaxElements -InteractableOnly $InteractableOnly `
|
|
279
304
|
-Intent $Intent -SinceSnapId $SinceSnapId
|
|
@@ -315,6 +340,8 @@ function Invoke-WpmAction {
|
|
|
315
340
|
return $result
|
|
316
341
|
}
|
|
317
342
|
if ($Action -eq 'screenshot') {
|
|
343
|
+
# 0.9.0 echo, same rule as snapshot.maxElements: the width cap that actually ran.
|
|
344
|
+
$result.maxWidth = $MaxWidth
|
|
318
345
|
try {
|
|
319
346
|
$shot = Get-WpmScreenshot -Hwnd $h -FullScreen $FullScreen -MaxWidth $MaxWidth -Keep $ShotsKeep
|
|
320
347
|
} catch {
|
|
@@ -1038,6 +1065,15 @@ function Invoke-WpmDesktopAction {
|
|
|
1038
1065
|
$result = @{ ok = $false; action = $Action; hwnd = $Hwnd; refusal = ''; reason = ''; detail = ''
|
|
1039
1066
|
effect = 'unverified'; latencyMs = 0 }
|
|
1040
1067
|
|
|
1068
|
+
if ($Action -eq 'launch' -and ($WaitMs -lt 0 -or $WaitMs -gt 30000)) {
|
|
1069
|
+
# 0.9.0: waitMs out of bounds is refused naming the sent value (the bounds live here rather than
|
|
1070
|
+
# in Invoke-WpmAction's block because launch dispatches to this function; worker.ps1:223).
|
|
1071
|
+
$result.refusal = 'invalid_argument'
|
|
1072
|
+
$result.reason = $script:WpmRefusals.invalid_argument + " [waitMs must be in [0, 30000] (got $WaitMs)]"
|
|
1073
|
+
$result.latencyMs = [DateTimeOffset]::UtcNow.ToUnixTimeMilliseconds() - $started
|
|
1074
|
+
return $result
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1041
1077
|
if ($Action -eq 'launch') {
|
|
1042
1078
|
# The engine re-runs the gate and the whitelist through the SAME table the host used. A permission
|
|
1043
1079
|
# that lives in only one of the two processes is a permission that can be reached around by calling
|
package/src/schema/tools.json
CHANGED
|
@@ -78,7 +78,8 @@
|
|
|
78
78
|
{ "code": "takeover_aborted", "layer": "runtime", "summary": "the owner or the host interrupted a takeover (HUD button, abort chord, host cancellation). Not a fault: the result still carries cursorRestored and injectedChars so the reader knows exactly how far it got", "uncoveredReason": "fires from a real interruption inside a live takeover action; test/takeover-test.ps1 covers the three interruption paths at the engine level (volatile flag, latch file, and the send-time abort probe), and the schema case is declared uncovered because the refusal vocabulary gate needs an executable decision-mode instance and this is a runtime outcome" },
|
|
79
79
|
{ "code": "app_launch_denied", "layer": "decision", "summary": "action=launch was refused before any worker request because appLaunchAllowed is off or the target is not on the appLaunchAllow whitelist. The next step is the owner's decision, not a retry: add the EXACT name to the whitelist (no wildcard exists, and an empty list means nothing may launch even with the gate on). Both switches must be set -- a takeover permission is not a launch permission" },
|
|
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
|
-
{ "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)" }
|
|
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
|
+
{ "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" }
|
|
82
83
|
],
|
|
83
84
|
"tools": [
|
|
84
85
|
{
|
|
@@ -119,7 +120,7 @@
|
|
|
119
120
|
"required": ["hwnd", "x", "y"],
|
|
120
121
|
"additionalProperties": false
|
|
121
122
|
},
|
|
122
|
-
"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"]
|
|
123
|
+
"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"]
|
|
123
124
|
},
|
|
124
125
|
{
|
|
125
126
|
"name": "wpm_type",
|
|
@@ -146,7 +147,7 @@
|
|
|
146
147
|
"additionalProperties": false
|
|
147
148
|
},
|
|
148
149
|
"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.",
|
|
149
|
-
"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"]
|
|
150
|
+
"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"]
|
|
150
151
|
},
|
|
151
152
|
{
|
|
152
153
|
"name": "wpm_focus",
|
|
@@ -168,7 +169,7 @@
|
|
|
168
169
|
"required": ["hwnd", "elementName"],
|
|
169
170
|
"additionalProperties": false
|
|
170
171
|
},
|
|
171
|
-
"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"]
|
|
172
|
+
"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"]
|
|
172
173
|
},
|
|
173
174
|
{
|
|
174
175
|
"name": "wpm_status",
|
|
@@ -203,7 +204,7 @@
|
|
|
203
204
|
"required": ["hwnd"],
|
|
204
205
|
"additionalProperties": false
|
|
205
206
|
},
|
|
206
|
-
"refusals": ["no_hwnd", "paused", "uia_probe_failed", "stale_ref", "policy_denied"]
|
|
207
|
+
"refusals": ["no_hwnd", "paused", "uia_probe_failed", "stale_ref", "policy_denied", "invalid_argument"]
|
|
207
208
|
},
|
|
208
209
|
{
|
|
209
210
|
"name": "wpm_screenshot",
|
|
@@ -221,7 +222,7 @@
|
|
|
221
222
|
"required": [],
|
|
222
223
|
"additionalProperties": false
|
|
223
224
|
},
|
|
224
|
-
"refusals": ["no_hwnd", "paused", "policy_denied"]
|
|
225
|
+
"refusals": ["no_hwnd", "paused", "policy_denied", "invalid_argument"]
|
|
225
226
|
},
|
|
226
227
|
{
|
|
227
228
|
"name": "wpm_preview",
|
|
@@ -257,7 +258,7 @@
|
|
|
257
258
|
"required": ["target"],
|
|
258
259
|
"additionalProperties": false
|
|
259
260
|
},
|
|
260
|
-
"refusals": ["paused", "app_launch_denied", "policy_denied", "action_failed"]
|
|
261
|
+
"refusals": ["paused", "app_launch_denied", "policy_denied", "action_failed", "invalid_argument"]
|
|
261
262
|
},
|
|
262
263
|
{
|
|
263
264
|
"name": "wpm_clipboard",
|
|
@@ -528,6 +529,31 @@
|
|
|
528
529
|
"args": { "op": "write", "format": "text" },
|
|
529
530
|
"expect": "action_failed",
|
|
530
531
|
"note": "An empty text write is refused with the same reasoning `type` uses for an empty write: it cannot be distinguished from a clipboard the owner already cleared, and an 'ok' here would be a claim about nothing."
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
"id": "snapshot-max-elements-out-of-range",
|
|
535
|
+
"mode": "engine",
|
|
536
|
+
"tool": "wpm_snapshot",
|
|
537
|
+
"args": { "hwnd": "$deadHwnd", "maxElements": 0 },
|
|
538
|
+
"expect": "invalid_argument",
|
|
539
|
+
"note": "0.9.0: maxElements:0 declared minimum 1 arrives out of bounds. Pre-0.9.0 the harness default made it 1 silently (the upstream limit=0 shape); now the bounds check runs before the target check, so the refusal names the sent value and no tree is walked."
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
"id": "screenshot-max-width-negative",
|
|
543
|
+
"mode": "engine",
|
|
544
|
+
"tool": "wpm_screenshot",
|
|
545
|
+
"args": { "hwnd": "$deadHwnd", "maxWidth": -5 },
|
|
546
|
+
"expect": "invalid_argument",
|
|
547
|
+
"note": "A negative maxWidth was pressed into 0, which the engine reads as 'no scaling' -- the caller asked for a 0-pixel cap and got a full capture. Declared bounds are [0, 7680]; outside them the call is refused as sent."
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
"id": "launch-wait-ms-over-max",
|
|
551
|
+
"mode": "engine",
|
|
552
|
+
"tool": "wpm_launch",
|
|
553
|
+
"args": { "target": "write-only-probe", "waitMs": 999999 },
|
|
554
|
+
"gate": { "policy": "full", "launchAllowed": true, "allowList": ["write-only-probe"] },
|
|
555
|
+
"expect": "invalid_argument",
|
|
556
|
+
"note": "waitMs above 30000 is refused before the gate runs, so nothing starts: a 16-minute silent wait was the old behavior (clamp to 30000), and both alternatives -- honoring 999999 or hiding the clamp -- misreport what the plugin will do."
|
|
531
557
|
}
|
|
532
558
|
]
|
|
533
559
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -37,7 +37,10 @@ export type RefusalCode =
|
|
|
37
37
|
| 'restore_failed' | 'takeover_aborted' | 'stale_ref'
|
|
38
38
|
// 0.7.0. What separates these three from the fourteen above is the NEXT STEP: each names a SETTING,
|
|
39
39
|
// so retrying the same call is the wrong response and changing the setting is the right one.
|
|
40
|
-
| 'app_launch_denied' | 'policy_denied' | 'user_active'
|
|
40
|
+
| 'app_launch_denied' | 'policy_denied' | 'user_active'
|
|
41
|
+
// 0.9.0. The caller sent a value outside the declared bounds (or a fraction where an integer was
|
|
42
|
+
// declared); the pre-0.9.0 behavior was a silent clamp/round, which is what this code replaces.
|
|
43
|
+
| 'invalid_argument';
|
|
41
44
|
|
|
42
45
|
export type KeyInputMode = 'none' | 'inject';
|
|
43
46
|
|