dsh-windows-parallel-mcp 0.9.0-rc.2 → 0.9.0-rc.4
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 +28 -12
- 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/CHANGELOG.de.md
CHANGED
|
@@ -9,7 +9,27 @@ when someone typed, a publish time records when a version became installable, an
|
|
|
9
9
|
one is a promise to anyone installing it.
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
14
18
|
|
|
19
|
+
## 0.9.0-rc.4 — 2026-11-29 (prerelease)
|
|
20
|
+
|
|
21
|
+
**A fractional `label` is now refused, not rounded.** `Math.round(args.label)` at the click/type/focus
|
|
22
|
+
build sites turned `label: 2.7` into `3` and then acted on the element BELOW the one the caller named —
|
|
23
|
+
G2, and the worst of the silent rewrites because a rounded label is a different TARGET, not a different
|
|
24
|
+
number. The three sites collapse into one `labelField` helper that accepts only a whole number > 0,
|
|
25
|
+
forwards nothing when the caller is addressing by coordinates/elementName, and throws `invalid_argument`
|
|
26
|
+
naming the sent fraction. validateArguments (rc.1) already rejects a fractional label on the shim path;
|
|
27
|
+
this closes the buildRequest path the same way, so both delivery forms refuse identically.
|
|
28
|
+
## 0.9.0-rc.3 — 2026-11-29 (prerelease)
|
|
29
|
+
|
|
30
|
+
**The out-of-range refusal is now a first-class code and the applied cap is echoed.** `invalid_argument`
|
|
31
|
+
joins the refusal vocabulary (decide.ps1 table, `src/schema/tools.json`, `docs/refusals.md`) with three
|
|
32
|
+
executable engine cases — `snapshot maxElements:0`, `screenshot maxWidth:-5`, `launch waitMs:999999` —
|
|
33
|
+
so the gate proves the code fires, not just that it is named. Snapshot and screenshot results now carry
|
|
34
|
+
an `...=N applied` segment showing the cap that actually ran, closing the last way a caller could act on
|
|
35
|
+
a value it did not send. The layer is `runtime` by this repo's convention (the code physically fires
|
|
36
|
+
from `engine.ps1`, the read paths bypass `decide.ps1`), the same shape as the pre-worker `stale_ref`.
|
|
15
37
|
## 0.9.0-rc.2 — 2026-11-29 (prerelease)
|
|
16
38
|
|
|
17
39
|
**`clampNumber` is now two functions with two different promises.** `clampSetting` keeps the tolerant
|
package/CHANGELOG.es.md
CHANGED
|
@@ -9,7 +9,27 @@ when someone typed, a publish time records when a version became installable, an
|
|
|
9
9
|
one is a promise to anyone installing it.
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
14
18
|
|
|
19
|
+
## 0.9.0-rc.4 — 2026-11-29 (prerelease)
|
|
20
|
+
|
|
21
|
+
**A fractional `label` is now refused, not rounded.** `Math.round(args.label)` at the click/type/focus
|
|
22
|
+
build sites turned `label: 2.7` into `3` and then acted on the element BELOW the one the caller named —
|
|
23
|
+
G2, and the worst of the silent rewrites because a rounded label is a different TARGET, not a different
|
|
24
|
+
number. The three sites collapse into one `labelField` helper that accepts only a whole number > 0,
|
|
25
|
+
forwards nothing when the caller is addressing by coordinates/elementName, and throws `invalid_argument`
|
|
26
|
+
naming the sent fraction. validateArguments (rc.1) already rejects a fractional label on the shim path;
|
|
27
|
+
this closes the buildRequest path the same way, so both delivery forms refuse identically.
|
|
28
|
+
## 0.9.0-rc.3 — 2026-11-29 (prerelease)
|
|
29
|
+
|
|
30
|
+
**The out-of-range refusal is now a first-class code and the applied cap is echoed.** `invalid_argument`
|
|
31
|
+
joins the refusal vocabulary (decide.ps1 table, `src/schema/tools.json`, `docs/refusals.md`) with three
|
|
32
|
+
executable engine cases — `snapshot maxElements:0`, `screenshot maxWidth:-5`, `launch waitMs:999999` —
|
|
33
|
+
so the gate proves the code fires, not just that it is named. Snapshot and screenshot results now carry
|
|
34
|
+
an `...=N applied` segment showing the cap that actually ran, closing the last way a caller could act on
|
|
35
|
+
a value it did not send. The layer is `runtime` by this repo's convention (the code physically fires
|
|
36
|
+
from `engine.ps1`, the read paths bypass `decide.ps1`), the same shape as the pre-worker `stale_ref`.
|
|
15
37
|
## 0.9.0-rc.2 — 2026-11-29 (prerelease)
|
|
16
38
|
|
|
17
39
|
**`clampNumber` is now two functions with two different promises.** `clampSetting` keeps the tolerant
|
package/CHANGELOG.fr.md
CHANGED
|
@@ -9,7 +9,27 @@ when someone typed, a publish time records when a version became installable, an
|
|
|
9
9
|
one is a promise to anyone installing it.
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
14
18
|
|
|
19
|
+
## 0.9.0-rc.4 — 2026-11-29 (prerelease)
|
|
20
|
+
|
|
21
|
+
**A fractional `label` is now refused, not rounded.** `Math.round(args.label)` at the click/type/focus
|
|
22
|
+
build sites turned `label: 2.7` into `3` and then acted on the element BELOW the one the caller named —
|
|
23
|
+
G2, and the worst of the silent rewrites because a rounded label is a different TARGET, not a different
|
|
24
|
+
number. The three sites collapse into one `labelField` helper that accepts only a whole number > 0,
|
|
25
|
+
forwards nothing when the caller is addressing by coordinates/elementName, and throws `invalid_argument`
|
|
26
|
+
naming the sent fraction. validateArguments (rc.1) already rejects a fractional label on the shim path;
|
|
27
|
+
this closes the buildRequest path the same way, so both delivery forms refuse identically.
|
|
28
|
+
## 0.9.0-rc.3 — 2026-11-29 (prerelease)
|
|
29
|
+
|
|
30
|
+
**The out-of-range refusal is now a first-class code and the applied cap is echoed.** `invalid_argument`
|
|
31
|
+
joins the refusal vocabulary (decide.ps1 table, `src/schema/tools.json`, `docs/refusals.md`) with three
|
|
32
|
+
executable engine cases — `snapshot maxElements:0`, `screenshot maxWidth:-5`, `launch waitMs:999999` —
|
|
33
|
+
so the gate proves the code fires, not just that it is named. Snapshot and screenshot results now carry
|
|
34
|
+
an `...=N applied` segment showing the cap that actually ran, closing the last way a caller could act on
|
|
35
|
+
a value it did not send. The layer is `runtime` by this repo's convention (the code physically fires
|
|
36
|
+
from `engine.ps1`, the read paths bypass `decide.ps1`), the same shape as the pre-worker `stale_ref`.
|
|
15
37
|
## 0.9.0-rc.2 — 2026-11-29 (prerelease)
|
|
16
38
|
|
|
17
39
|
**`clampNumber` is now two functions with two different promises.** `clampSetting` keeps the tolerant
|
package/CHANGELOG.it.md
CHANGED
|
@@ -9,7 +9,27 @@ when someone typed, a publish time records when a version became installable, an
|
|
|
9
9
|
one is a promise to anyone installing it.
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
14
18
|
|
|
19
|
+
## 0.9.0-rc.4 — 2026-11-29 (prerelease)
|
|
20
|
+
|
|
21
|
+
**A fractional `label` is now refused, not rounded.** `Math.round(args.label)` at the click/type/focus
|
|
22
|
+
build sites turned `label: 2.7` into `3` and then acted on the element BELOW the one the caller named —
|
|
23
|
+
G2, and the worst of the silent rewrites because a rounded label is a different TARGET, not a different
|
|
24
|
+
number. The three sites collapse into one `labelField` helper that accepts only a whole number > 0,
|
|
25
|
+
forwards nothing when the caller is addressing by coordinates/elementName, and throws `invalid_argument`
|
|
26
|
+
naming the sent fraction. validateArguments (rc.1) already rejects a fractional label on the shim path;
|
|
27
|
+
this closes the buildRequest path the same way, so both delivery forms refuse identically.
|
|
28
|
+
## 0.9.0-rc.3 — 2026-11-29 (prerelease)
|
|
29
|
+
|
|
30
|
+
**The out-of-range refusal is now a first-class code and the applied cap is echoed.** `invalid_argument`
|
|
31
|
+
joins the refusal vocabulary (decide.ps1 table, `src/schema/tools.json`, `docs/refusals.md`) with three
|
|
32
|
+
executable engine cases — `snapshot maxElements:0`, `screenshot maxWidth:-5`, `launch waitMs:999999` —
|
|
33
|
+
so the gate proves the code fires, not just that it is named. Snapshot and screenshot results now carry
|
|
34
|
+
an `...=N applied` segment showing the cap that actually ran, closing the last way a caller could act on
|
|
35
|
+
a value it did not send. The layer is `runtime` by this repo's convention (the code physically fires
|
|
36
|
+
from `engine.ps1`, the read paths bypass `decide.ps1`), the same shape as the pre-worker `stale_ref`.
|
|
15
37
|
## 0.9.0-rc.2 — 2026-11-29 (prerelease)
|
|
16
38
|
|
|
17
39
|
**`clampNumber` is now two functions with two different promises.** `clampSetting` keeps the tolerant
|
package/CHANGELOG.ja.md
CHANGED
|
@@ -9,7 +9,27 @@ when someone typed, a publish time records when a version became installable, an
|
|
|
9
9
|
one is a promise to anyone installing it.
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
14
18
|
|
|
19
|
+
## 0.9.0-rc.4 — 2026-11-29 (prerelease)
|
|
20
|
+
|
|
21
|
+
**A fractional `label` is now refused, not rounded.** `Math.round(args.label)` at the click/type/focus
|
|
22
|
+
build sites turned `label: 2.7` into `3` and then acted on the element BELOW the one the caller named —
|
|
23
|
+
G2, and the worst of the silent rewrites because a rounded label is a different TARGET, not a different
|
|
24
|
+
number. The three sites collapse into one `labelField` helper that accepts only a whole number > 0,
|
|
25
|
+
forwards nothing when the caller is addressing by coordinates/elementName, and throws `invalid_argument`
|
|
26
|
+
naming the sent fraction. validateArguments (rc.1) already rejects a fractional label on the shim path;
|
|
27
|
+
this closes the buildRequest path the same way, so both delivery forms refuse identically.
|
|
28
|
+
## 0.9.0-rc.3 — 2026-11-29 (prerelease)
|
|
29
|
+
|
|
30
|
+
**The out-of-range refusal is now a first-class code and the applied cap is echoed.** `invalid_argument`
|
|
31
|
+
joins the refusal vocabulary (decide.ps1 table, `src/schema/tools.json`, `docs/refusals.md`) with three
|
|
32
|
+
executable engine cases — `snapshot maxElements:0`, `screenshot maxWidth:-5`, `launch waitMs:999999` —
|
|
33
|
+
so the gate proves the code fires, not just that it is named. Snapshot and screenshot results now carry
|
|
34
|
+
an `...=N applied` segment showing the cap that actually ran, closing the last way a caller could act on
|
|
35
|
+
a value it did not send. The layer is `runtime` by this repo's convention (the code physically fires
|
|
36
|
+
from `engine.ps1`, the read paths bypass `decide.ps1`), the same shape as the pre-worker `stale_ref`.
|
|
15
37
|
## 0.9.0-rc.2 — 2026-11-29 (prerelease)
|
|
16
38
|
|
|
17
39
|
**`clampNumber` is now two functions with two different promises.** `clampSetting` keeps the tolerant
|
package/CHANGELOG.ko.md
CHANGED
|
@@ -9,7 +9,27 @@ when someone typed, a publish time records when a version became installable, an
|
|
|
9
9
|
one is a promise to anyone installing it.
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
14
18
|
|
|
19
|
+
## 0.9.0-rc.4 — 2026-11-29 (prerelease)
|
|
20
|
+
|
|
21
|
+
**A fractional `label` is now refused, not rounded.** `Math.round(args.label)` at the click/type/focus
|
|
22
|
+
build sites turned `label: 2.7` into `3` and then acted on the element BELOW the one the caller named —
|
|
23
|
+
G2, and the worst of the silent rewrites because a rounded label is a different TARGET, not a different
|
|
24
|
+
number. The three sites collapse into one `labelField` helper that accepts only a whole number > 0,
|
|
25
|
+
forwards nothing when the caller is addressing by coordinates/elementName, and throws `invalid_argument`
|
|
26
|
+
naming the sent fraction. validateArguments (rc.1) already rejects a fractional label on the shim path;
|
|
27
|
+
this closes the buildRequest path the same way, so both delivery forms refuse identically.
|
|
28
|
+
## 0.9.0-rc.3 — 2026-11-29 (prerelease)
|
|
29
|
+
|
|
30
|
+
**The out-of-range refusal is now a first-class code and the applied cap is echoed.** `invalid_argument`
|
|
31
|
+
joins the refusal vocabulary (decide.ps1 table, `src/schema/tools.json`, `docs/refusals.md`) with three
|
|
32
|
+
executable engine cases — `snapshot maxElements:0`, `screenshot maxWidth:-5`, `launch waitMs:999999` —
|
|
33
|
+
so the gate proves the code fires, not just that it is named. Snapshot and screenshot results now carry
|
|
34
|
+
an `...=N applied` segment showing the cap that actually ran, closing the last way a caller could act on
|
|
35
|
+
a value it did not send. The layer is `runtime` by this repo's convention (the code physically fires
|
|
36
|
+
from `engine.ps1`, the read paths bypass `decide.ps1`), the same shape as the pre-worker `stale_ref`.
|
|
15
37
|
## 0.9.0-rc.2 — 2026-11-29 (prerelease)
|
|
16
38
|
|
|
17
39
|
**`clampNumber` is now two functions with two different promises.** `clampSetting` keeps the tolerant
|
package/CHANGELOG.md
CHANGED
|
@@ -6,7 +6,27 @@ when someone typed, a publish time records when a version became installable, an
|
|
|
6
6
|
one is a promise to anyone installing it.
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
11
15
|
|
|
16
|
+
## 0.9.0-rc.4 — 2026-11-29 (prerelease)
|
|
17
|
+
|
|
18
|
+
**A fractional `label` is now refused, not rounded.** `Math.round(args.label)` at the click/type/focus
|
|
19
|
+
build sites turned `label: 2.7` into `3` and then acted on the element BELOW the one the caller named —
|
|
20
|
+
G2, and the worst of the silent rewrites because a rounded label is a different TARGET, not a different
|
|
21
|
+
number. The three sites collapse into one `labelField` helper that accepts only a whole number > 0,
|
|
22
|
+
forwards nothing when the caller is addressing by coordinates/elementName, and throws `invalid_argument`
|
|
23
|
+
naming the sent fraction. validateArguments (rc.1) already rejects a fractional label on the shim path;
|
|
24
|
+
this closes the buildRequest path the same way, so both delivery forms refuse identically.
|
|
25
|
+
## 0.9.0-rc.3 — 2026-11-29 (prerelease)
|
|
26
|
+
|
|
27
|
+
**The out-of-range refusal is now a first-class code and the applied cap is echoed.** `invalid_argument`
|
|
28
|
+
joins the refusal vocabulary (decide.ps1 table, `src/schema/tools.json`, `docs/refusals.md`) with three
|
|
29
|
+
executable engine cases — `snapshot maxElements:0`, `screenshot maxWidth:-5`, `launch waitMs:999999` —
|
|
30
|
+
so the gate proves the code fires, not just that it is named. Snapshot and screenshot results now carry
|
|
31
|
+
an `...=N applied` segment showing the cap that actually ran, closing the last way a caller could act on
|
|
32
|
+
a value it did not send. The layer is `runtime` by this repo's convention (the code physically fires
|
|
33
|
+
from `engine.ps1`, the read paths bypass `decide.ps1`), the same shape as the pre-worker `stale_ref`.
|
|
12
34
|
## 0.9.0-rc.2 — 2026-11-29 (prerelease)
|
|
13
35
|
|
|
14
36
|
**`clampNumber` is now two functions with two different promises.** `clampSetting` keeps the tolerant
|
package/CHANGELOG.pt.md
CHANGED
|
@@ -9,7 +9,27 @@ when someone typed, a publish time records when a version became installable, an
|
|
|
9
9
|
one is a promise to anyone installing it.
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
14
18
|
|
|
19
|
+
## 0.9.0-rc.4 — 2026-11-29 (prerelease)
|
|
20
|
+
|
|
21
|
+
**A fractional `label` is now refused, not rounded.** `Math.round(args.label)` at the click/type/focus
|
|
22
|
+
build sites turned `label: 2.7` into `3` and then acted on the element BELOW the one the caller named —
|
|
23
|
+
G2, and the worst of the silent rewrites because a rounded label is a different TARGET, not a different
|
|
24
|
+
number. The three sites collapse into one `labelField` helper that accepts only a whole number > 0,
|
|
25
|
+
forwards nothing when the caller is addressing by coordinates/elementName, and throws `invalid_argument`
|
|
26
|
+
naming the sent fraction. validateArguments (rc.1) already rejects a fractional label on the shim path;
|
|
27
|
+
this closes the buildRequest path the same way, so both delivery forms refuse identically.
|
|
28
|
+
## 0.9.0-rc.3 — 2026-11-29 (prerelease)
|
|
29
|
+
|
|
30
|
+
**The out-of-range refusal is now a first-class code and the applied cap is echoed.** `invalid_argument`
|
|
31
|
+
joins the refusal vocabulary (decide.ps1 table, `src/schema/tools.json`, `docs/refusals.md`) with three
|
|
32
|
+
executable engine cases — `snapshot maxElements:0`, `screenshot maxWidth:-5`, `launch waitMs:999999` —
|
|
33
|
+
so the gate proves the code fires, not just that it is named. Snapshot and screenshot results now carry
|
|
34
|
+
an `...=N applied` segment showing the cap that actually ran, closing the last way a caller could act on
|
|
35
|
+
a value it did not send. The layer is `runtime` by this repo's convention (the code physically fires
|
|
36
|
+
from `engine.ps1`, the read paths bypass `decide.ps1`), the same shape as the pre-worker `stale_ref`.
|
|
15
37
|
## 0.9.0-rc.2 — 2026-11-29 (prerelease)
|
|
16
38
|
|
|
17
39
|
**`clampNumber` is now two functions with two different promises.** `clampSetting` keeps the tolerant
|
package/CHANGELOG.ru.md
CHANGED
|
@@ -9,7 +9,27 @@ when someone typed, a publish time records when a version became installable, an
|
|
|
9
9
|
one is a promise to anyone installing it.
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
14
18
|
|
|
19
|
+
## 0.9.0-rc.4 — 2026-11-29 (prerelease)
|
|
20
|
+
|
|
21
|
+
**A fractional `label` is now refused, not rounded.** `Math.round(args.label)` at the click/type/focus
|
|
22
|
+
build sites turned `label: 2.7` into `3` and then acted on the element BELOW the one the caller named —
|
|
23
|
+
G2, and the worst of the silent rewrites because a rounded label is a different TARGET, not a different
|
|
24
|
+
number. The three sites collapse into one `labelField` helper that accepts only a whole number > 0,
|
|
25
|
+
forwards nothing when the caller is addressing by coordinates/elementName, and throws `invalid_argument`
|
|
26
|
+
naming the sent fraction. validateArguments (rc.1) already rejects a fractional label on the shim path;
|
|
27
|
+
this closes the buildRequest path the same way, so both delivery forms refuse identically.
|
|
28
|
+
## 0.9.0-rc.3 — 2026-11-29 (prerelease)
|
|
29
|
+
|
|
30
|
+
**The out-of-range refusal is now a first-class code and the applied cap is echoed.** `invalid_argument`
|
|
31
|
+
joins the refusal vocabulary (decide.ps1 table, `src/schema/tools.json`, `docs/refusals.md`) with three
|
|
32
|
+
executable engine cases — `snapshot maxElements:0`, `screenshot maxWidth:-5`, `launch waitMs:999999` —
|
|
33
|
+
so the gate proves the code fires, not just that it is named. Snapshot and screenshot results now carry
|
|
34
|
+
an `...=N applied` segment showing the cap that actually ran, closing the last way a caller could act on
|
|
35
|
+
a value it did not send. The layer is `runtime` by this repo's convention (the code physically fires
|
|
36
|
+
from `engine.ps1`, the read paths bypass `decide.ps1`), the same shape as the pre-worker `stale_ref`.
|
|
15
37
|
## 0.9.0-rc.2 — 2026-11-29 (prerelease)
|
|
16
38
|
|
|
17
39
|
**`clampNumber` is now two functions with two different promises.** `clampSetting` keeps the tolerant
|
package/CHANGELOG.zh.md
CHANGED
|
@@ -9,7 +9,27 @@ when someone typed, a publish time records when a version became installable, an
|
|
|
9
9
|
one is a promise to anyone installing it.
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
14
18
|
|
|
19
|
+
## 0.9.0-rc.4 — 2026-11-29 (prerelease)
|
|
20
|
+
|
|
21
|
+
**A fractional `label` is now refused, not rounded.** `Math.round(args.label)` at the click/type/focus
|
|
22
|
+
build sites turned `label: 2.7` into `3` and then acted on the element BELOW the one the caller named —
|
|
23
|
+
G2, and the worst of the silent rewrites because a rounded label is a different TARGET, not a different
|
|
24
|
+
number. The three sites collapse into one `labelField` helper that accepts only a whole number > 0,
|
|
25
|
+
forwards nothing when the caller is addressing by coordinates/elementName, and throws `invalid_argument`
|
|
26
|
+
naming the sent fraction. validateArguments (rc.1) already rejects a fractional label on the shim path;
|
|
27
|
+
this closes the buildRequest path the same way, so both delivery forms refuse identically.
|
|
28
|
+
## 0.9.0-rc.3 — 2026-11-29 (prerelease)
|
|
29
|
+
|
|
30
|
+
**The out-of-range refusal is now a first-class code and the applied cap is echoed.** `invalid_argument`
|
|
31
|
+
joins the refusal vocabulary (decide.ps1 table, `src/schema/tools.json`, `docs/refusals.md`) with three
|
|
32
|
+
executable engine cases — `snapshot maxElements:0`, `screenshot maxWidth:-5`, `launch waitMs:999999` —
|
|
33
|
+
so the gate proves the code fires, not just that it is named. Snapshot and screenshot results now carry
|
|
34
|
+
an `...=N applied` segment showing the cap that actually ran, closing the last way a caller could act on
|
|
35
|
+
a value it did not send. The layer is `runtime` by this repo's convention (the code physically fires
|
|
36
|
+
from `engine.ps1`, the read paths bypass `decide.ps1`), the same shape as the pre-worker `stale_ref`.
|
|
15
37
|
## 0.9.0-rc.2 — 2026-11-29 (prerelease)
|
|
16
38
|
|
|
17
39
|
**`clampNumber` is now two functions with two different promises.** `clampSetting` keeps the tolerant
|
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.4** — 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.4** — 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.4** — 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.4** — 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.4** — 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.4** — 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.4** — 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.4** — 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.4** — 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.4** — 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.4",
|
|
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
|
@@ -439,9 +439,7 @@ export function apply(ctx, config = {}) {
|
|
|
439
439
|
action: 'click', hwnd: args.hwnd, x: Math.round(/** @type {number} */ (args.x)), y: Math.round(/** @type {number} */ (args.y)), settleMs,
|
|
440
440
|
...authFields,
|
|
441
441
|
...(space === 'image' ? { space: 'image', shotId: args.shotId } : {}),
|
|
442
|
-
...(
|
|
443
|
-
? { label: Math.round(args.label), snapId: typeof args.snapId === 'string' ? args.snapId : '' }
|
|
444
|
-
: {}),
|
|
442
|
+
...labelField(args),
|
|
445
443
|
...takeoverFields,
|
|
446
444
|
};
|
|
447
445
|
case 'type':
|
|
@@ -462,9 +460,7 @@ export function apply(ctx, config = {}) {
|
|
|
462
460
|
// validated call. The drop is logged into the result by the engine's own caret= field, which
|
|
463
461
|
// always reports what was applied.
|
|
464
462
|
caretPosition: args.caretPosition === 'start' || args.caretPosition === 'end' ? args.caretPosition : 'idle',
|
|
465
|
-
...(
|
|
466
|
-
? { label: Math.round(args.label), snapId: typeof args.snapId === 'string' ? args.snapId : '' }
|
|
467
|
-
: {}),
|
|
463
|
+
...labelField(args),
|
|
468
464
|
...takeoverFields,
|
|
469
465
|
};
|
|
470
466
|
case 'focus':
|
|
@@ -473,9 +469,7 @@ export function apply(ctx, config = {}) {
|
|
|
473
469
|
return {
|
|
474
470
|
action: 'focus', hwnd: args.hwnd, elementName: args.elementName ?? '', settleMs,
|
|
475
471
|
...authFields,
|
|
476
|
-
...(
|
|
477
|
-
? { label: Math.round(args.label), snapId: typeof args.snapId === 'string' ? args.snapId : '' }
|
|
478
|
-
: {}),
|
|
472
|
+
...labelField(args),
|
|
479
473
|
...takeoverFields,
|
|
480
474
|
};
|
|
481
475
|
case 'launch': {
|
|
@@ -557,7 +551,8 @@ export function apply(ctx, config = {}) {
|
|
|
557
551
|
+ 'needs no picture. Refusals carry a code (no_hwnd, '
|
|
558
552
|
+ 'paused, elevated_target, unreachable, uia_tree_empty, uia_probe_failed, terminal_no_door, needs_facts, action_failed, '
|
|
559
553
|
+ 'restore_failed, takeover_unavailable, keyinject_unavailable, takeover_aborted, stale_ref, app_launch_denied, '
|
|
560
|
-
+ 'policy_denied, user_active) and a reason. '
|
|
554
|
+
+ 'policy_denied, user_active, invalid_argument) and a reason. invalid_argument is the 0.9.0 argument '
|
|
555
|
+
+ 'contract: a numeric outside the declared bounds is refused naming the sent value, never clamped. '
|
|
561
556
|
+ 'THREE DESKTOP ACTIONS exist since 0.7.0 and are gated by settings rather than by the target: launch needs '
|
|
562
557
|
+ 'appLaunchAllowed AND an exact appLaunchAllow entry (an empty whitelist means nothing, and no wildcard exists); '
|
|
563
558
|
+ 'clipboard reads and writes the system clipboard, reporting lengths and never contents; window changes one '
|
|
@@ -1024,6 +1019,10 @@ function formatSnapshot(r) {
|
|
|
1024
1019
|
+ (truncated ? ` (truncated at ${count} of ${total})` : '')
|
|
1025
1020
|
+ (delta ? ` (delta vs ${delta.sinceSnapId}: +${added.length} -${removed.length} ~${changed.length})` : '');
|
|
1026
1021
|
const meta = [`snapId=${r.snapId || '?'}`, `frame=${r.frame || '?'}`, `frameCheck=${r.frameCheck || '?'}`, `total=${total}`];
|
|
1022
|
+
// 0.9.0 applied echo: the caller sees the cap that actually ran, so a clamped/rounded value could
|
|
1023
|
+
// never hide again -- refuseOutOfRange means it can no longer silently change, and this line proves
|
|
1024
|
+
// what the engine used. Only echoed when the engine reported it (snapshot path).
|
|
1025
|
+
if (Number.isFinite(r.maxElements)) meta.push(`maxElements=${r.maxElements} applied`);
|
|
1027
1026
|
if (r.frameInset && typeof r.frameInset === 'object') {
|
|
1028
1027
|
meta.push(`frameInset=${r.frameInset.left ?? '?'},${r.frameInset.top ?? '?'},${r.frameInset.right ?? '?'},${r.frameInset.bottom ?? '?'}`);
|
|
1029
1028
|
}
|
|
@@ -1086,7 +1085,8 @@ function formatScreenshot(r) {
|
|
|
1086
1085
|
`file=${r.file || '?'}`,
|
|
1087
1086
|
`shotId=${r.shotId || '?'}`,
|
|
1088
1087
|
`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 ?? '?'}
|
|
1088
|
+
+ `imageSize=${size.width ?? '?'}x${size.height ?? '?'} bytes=${r.bytes ?? '?'} shotsKeep=${r.shotsKeep ?? '?'} latencyMs=${r.latencyMs ?? '?'}`
|
|
1089
|
+
+ (Number.isFinite(r.maxWidth) ? ` maxWidth=${r.maxWidth} applied` : ''),
|
|
1090
1090
|
'mapping: screenX = screenRect.left + round(imageX / scale); screenY = screenRect.top + round(imageY / scale). '
|
|
1091
1091
|
+ `The ENGINE applies this when a click passes space:"image" with shotId=${r.shotId || '?'}; do not multiply it yourself.`,
|
|
1092
1092
|
];
|
|
@@ -1256,6 +1256,22 @@ function refuseOutOfRange(value, min, max, fallback, name, integer = true) {
|
|
|
1256
1256
|
return n;
|
|
1257
1257
|
}
|
|
1258
1258
|
|
|
1259
|
+
/**
|
|
1260
|
+
* The label field for click/type/focus, decided once. `label` is an ELEMENT NUMBER, so a fraction is
|
|
1261
|
+
* not a value to round -- rounding 2.7 to 3 would act on the element BELOW the one the caller named
|
|
1262
|
+
* (this was G2: pre-0.9.0 `Math.round(args.label)` did exactly that, silently). Absent/<=0 means "no
|
|
1263
|
+
* label, address by coordinates/elementName" and forwards nothing. Non-integer > 0 is refused.
|
|
1264
|
+
* @param {WpmArgs} args
|
|
1265
|
+
* @returns {{label?: number, snapId?: string}}
|
|
1266
|
+
*/
|
|
1267
|
+
function labelField(args) {
|
|
1268
|
+
if (typeof args.label !== 'number' || args.label <= 0) return {};
|
|
1269
|
+
if (!Number.isInteger(args.label)) {
|
|
1270
|
+
throw refusal('invalid_argument', `'label' must be a whole element number (got ${args.label}); it is refused, not rounded, because rounding points at a DIFFERENT element than the one you named`);
|
|
1271
|
+
}
|
|
1272
|
+
return { label: args.label, snapId: typeof args.snapId === 'string' ? args.snapId : '' };
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1259
1275
|
/** The same latch path the engine computes: %LOCALAPPDATA%\wpm\takeover-abort.<worker pid>. */
|
|
1260
1276
|
/** @param {number|string} pid @returns {string} */
|
|
1261
1277
|
function abortLatchPath(pid) {
|
|
@@ -1272,4 +1288,4 @@ function hwndHint(args) {
|
|
|
1272
1288
|
// Exported for tests: the projection from the five contract actions to this one tool.
|
|
1273
1289
|
// `formatResult` is here so the effect dimension can be asserted on the SHIPPED projection, with
|
|
1274
1290
|
// hand-authored engine results, without a desktop that has to cooperate.
|
|
1275
|
-
export const _internals = { PARAMETERS, ACTIONS, TOOL_NAME, clampSettle, clampSetting, refuseOutOfRange, CONFIG_DEFAULTS, formatResult: format };
|
|
1291
|
+
export const _internals = { PARAMETERS, ACTIONS, TOOL_NAME, clampSettle, clampSetting, refuseOutOfRange, labelField, 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.4",
|
|
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.4",
|
|
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
|
}
|