dsh-windows-parallel-mcp 0.1.2 → 0.1.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.md +64 -1
- package/README.md +32 -7
- package/lib/index.js +22 -2
- package/lib/proof-window.mjs +53 -2
- package/package.json +9 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,70 @@ Dates are the registry `time` values for each version, not git commit dates —
|
|
|
4
4
|
when someone typed, a publish time records when a version became installable, and only the second
|
|
5
5
|
one is a promise to anyone installing it.
|
|
6
6
|
|
|
7
|
-
## 0.1.
|
|
7
|
+
## 0.1.4 — 2026-11-21
|
|
8
|
+
|
|
9
|
+
(Registry time is the authority for the timestamp; same convention as below.)
|
|
10
|
+
|
|
11
|
+
The source became reachable. Until now the package had **no repository, homepage or bugs field** —
|
|
12
|
+
not an oversight at authoring time, but a consequence of the repo not existing: there was no URL to
|
|
13
|
+
put there. `git remote -v` was empty through 0.1.0–0.1.3, so every claim in the README pointed at a
|
|
14
|
+
tarball and nowhere else. Creating the repository is what unblocks this, and it is the only reason
|
|
15
|
+
this release exists.
|
|
16
|
+
|
|
17
|
+
**Added**
|
|
18
|
+
- `repository`, `homepage` and `bugs` in `package.json`, so npmjs.com links to the source and to an
|
|
19
|
+
issue tracker instead of leaving a reader with a download and no way to report a refusal that
|
|
20
|
+
should not have happened.
|
|
21
|
+
- README now names the repository in its opening section, next to the non-affiliation notice.
|
|
22
|
+
|
|
23
|
+
**Unchanged**
|
|
24
|
+
- No behaviour. `lib/`, `src/engine/` and the schema are byte-identical to 0.1.3 — this release only
|
|
25
|
+
makes the existing artifact findable. The gate is still green (12 checks), and the profile on the
|
|
26
|
+
authoring machine keeps running 0.1.3 code with an identical `lib` hash.
|
|
27
|
+
|
|
28
|
+
## 0.1.3 — 2026-11-21
|
|
29
|
+
|
|
30
|
+
(Registry time `2026-11-21T01:20:58Z` UTC (= `2026-11-21 09:20` Beijing; the date follows the same UTC convention as the entries below — the publish time is the promise.)
|
|
31
|
+
|
|
32
|
+
0.1.2 shipped a proof that answered "did we disturb you". It never answered "did the thing happen" —
|
|
33
|
+
the engine computed `effect` on every action call and the Node half dropped it on the floor, so
|
|
34
|
+
`proof=pass` could mean *"clicked, and the app ignored it"*. This release closes that link, and then
|
|
35
|
+
closes the hole the missing link was hiding.
|
|
36
|
+
|
|
37
|
+
**Added**
|
|
38
|
+
- `effect=` in every action result's text and `effect` in the structured output, with three values
|
|
39
|
+
that name the SPEAKER rather than the confidence: `unverified` (nobody), `reported-by-send` (the
|
|
40
|
+
message was delivered), `reported-by-pattern` (the UIA call returned). README carries the table;
|
|
41
|
+
the code comment above the branch pins the same three lines. A refusal reports no effect at all —
|
|
42
|
+
no action ran, so nobody can have spoken.
|
|
43
|
+
- `lib/proof-window.mjs` gains an effect dimension: `evaluateProof(samples, { effect, actions })`.
|
|
44
|
+
A call whose channel reported nothing is capped at `inconclusive`; a batch caller whose every
|
|
45
|
+
attempt failed gets `fail` regardless of displacement. Both are opt-in — omitting `effect` leaves
|
|
46
|
+
every pre-0.1.3 caller's behaviour untouched, which is why the 32 pre-existing arms did not move.
|
|
47
|
+
|
|
48
|
+
**Corrected**
|
|
49
|
+
- The gate could read a total no-op as a green light: zero cursor displacement, zero foreground
|
|
50
|
+
switches, nothing accomplished => `pass`. The old plan named the case ("50 failed calls, zero
|
|
51
|
+
displacement, FAIL") and never landed it. It is landed now, with the arms that fail in the
|
|
52
|
+
direction that matters: `unverified` + a still desktop is not a pass, and 50 failed attempts is a
|
|
53
|
+
`fail` whose reason says 动作未生效.
|
|
54
|
+
- Word boundaries: `reported-by-send` says the message was DELIVERED. It does not say the application
|
|
55
|
+
processed it, and `reported-by-pattern` does not say the interface changed. Single `reported-by-*`
|
|
56
|
+
evidence still passes (it is real, just not independent) and the reason says so out loud: 未独立验证.
|
|
57
|
+
|
|
58
|
+
**Verified**
|
|
59
|
+
- `node test/proof-window-test.mjs` — 40 arms, 0 failed (32 carried over unchanged, 8 new).
|
|
60
|
+
- `node test/plugin-test.mjs` — 54 arms, 0 failed, including a real `no_hwnd` refusal carrying no
|
|
61
|
+
effect and the three legal values round-tripping through the shipped projection.
|
|
62
|
+
- `node scripts/check.mjs` — 12 gates green, including the marker end-to-end gate, which on this
|
|
63
|
+
machine's real desktop printed
|
|
64
|
+
`proof=pass [cursor=pass fg=pass focus=pass] :: effect=reported-by-send: a channel reported the call
|
|
65
|
+
returned -- 未独立验证`.
|
|
66
|
+
|
|
67
|
+
## 0.1.2 — 2026-11-20
|
|
68
|
+
|
|
69
|
+
(Registry time `2026-11-20T17:15:15Z` UTC = `2026-11-21 01:15` Beijing; the date follows the same
|
|
70
|
+
UTC convention as the entries below, because the header's rule is "the publish time is the promise".)
|
|
8
71
|
|
|
9
72
|
The proof chain became real: what started as "the README says the cursor never moves" ended as a
|
|
10
73
|
per-call measurement, a build-time guarantee, and — recorded honestly — three judgment designs that
|
package/README.md
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
# dsh-windows-parallel-mcp
|
|
2
2
|
|
|
3
|
-
> **0.1.
|
|
4
|
-
> under a weaker claim (see [CHANGELOG.md](CHANGELOG.md)); the claim below
|
|
5
|
-
> 0.1.1 is 0.1.0's behaviour with a corrected packaging chain; 0.1.2
|
|
6
|
-
>
|
|
7
|
-
> your own call.
|
|
3
|
+
> **0.1.3 — the proof now says who reported the success, not just that you were undisturbed.** The
|
|
4
|
+
> name was reserved earlier under a weaker claim (see [CHANGELOG.md](CHANGELOG.md)); the claim below
|
|
5
|
+
> is the measured one. 0.1.1 is 0.1.0's behaviour with a corrected packaging chain; 0.1.2 added the
|
|
6
|
+
> runtime proof chain (`proof=` verdict and `proofDimensions`, measured against the desktop around
|
|
7
|
+
> your own call); 0.1.3 adds the second half — `effect=` — and lets it enter the judgment, so a call
|
|
8
|
+
> that accomplished nothing can no longer read as `proof=pass`.
|
|
8
9
|
|
|
9
10
|
A DSH plugin that lets an agent drive **its own** Windows windows without moving your cursor. Where
|
|
10
11
|
a window accepts a window message, you never lose focus at all. Where it only exposes UI Automation,
|
|
11
12
|
you lose focus for one bounded flash that is reversed automatically. Everywhere else it refuses, with
|
|
12
13
|
a code and a reason.
|
|
13
14
|
|
|
15
|
+
Source, the measurement scripts behind every number below, and the release history live at
|
|
16
|
+
**<https://github.com/drscrewdriver/dsh-windows-parallel-mcp>** — issues are the right place for
|
|
17
|
+
"this target refused and I think it should not have".
|
|
18
|
+
|
|
14
19
|
Not affiliated with `dsh-windows-mcp`. Different plugin, different trade-off: that one is a carrier
|
|
15
20
|
bundle with a broad tool surface; this one is a single action tool whose entire design is about
|
|
16
21
|
*not* disturbing the desktop.
|
|
@@ -30,7 +35,9 @@ One tool, five actions:
|
|
|
30
35
|
The engine picks the cheapest available door per call:
|
|
31
36
|
|
|
32
37
|
- **quiet tier** — a classic child window receives the click/text as a window message. Measured:
|
|
33
|
-
0 foreground changes in 6 of 6 rounds,
|
|
38
|
+
0 foreground changes in 6 of 6 rounds, cursor moved 0 px. (Those 6 rounds also read the target
|
|
39
|
+
app's own state to confirm the click landed — that was a *separate* experiment, not the `effect=`
|
|
40
|
+
field, which says only who reported the call returned; see the table below.)
|
|
34
41
|
- **bounded-flash tier** — only UI Automation can reach the control, which raises the target. The
|
|
35
42
|
engine records the focus table *before* acting, reverses it **once** afterwards, and never pulls
|
|
36
43
|
focus from a window you chose. Measured net return **15–95 ms** from three independent
|
|
@@ -62,7 +69,7 @@ next step — see [docs/refusals.md](docs/refusals.md).
|
|
|
62
69
|
verdict plus a `proofDimensions` field (cursor / foreground / focus). Around your call the engine
|
|
63
70
|
samples cursor position, foreground window, keyboard focus and last-physical-input age — in a short
|
|
64
71
|
pre-action control window (when, by construction, nothing was running) and inside the settle wait it
|
|
65
|
-
already pays. The judgment is one pure function (`lib/proof-window.mjs`, unit-tested against
|
|
72
|
+
already pays. The judgment is one pure function (`lib/proof-window.mjs`, unit-tested against 40
|
|
66
73
|
synthetic windows whose answers are known by construction). What it honestly can and cannot say:
|
|
67
74
|
a switch of foreground on a quiet tier fails — the control shows the desktop was not doing it, so it
|
|
68
75
|
is the action's to explain; a cursor jump is *reported*, never accused, because with nothing running
|
|
@@ -72,6 +79,24 @@ gate asserts no shipped file contains `SetCursorPos`/`SendInput`/`mouse_event`/`
|
|
|
72
79
|
regression that adds cursor control fails at build time with certainty instead of being hunted at
|
|
73
80
|
runtime among ambient motion.
|
|
74
81
|
|
|
82
|
+
**And it says who reported the success.** Every action result carries `effect=` in the text and
|
|
83
|
+
`effect` in the structured output. The three values are not degrees of confidence in the
|
|
84
|
+
application — they name the speaker:
|
|
85
|
+
|
|
86
|
+
| `effect` | who is speaking | it proves | it does **not** prove |
|
|
87
|
+
|---|---|---|---|
|
|
88
|
+
| `unverified` | nobody | nothing | anything |
|
|
89
|
+
| `reported-by-send` | the window-message channel | the message was **delivered** | that the target app processed it |
|
|
90
|
+
| `reported-by-pattern` | the UI Automation pattern call | the call **returned** without throwing | that the interface actually changed |
|
|
91
|
+
|
|
92
|
+
Since 0.1.3 the effect also enters the judgment, which closes the one honest gap 0.1.2 still had:
|
|
93
|
+
a still desktop could outvote a total no-op. A call whose channel reported nothing is capped at
|
|
94
|
+
`inconclusive` — never `pass`. A batch caller that passes its per-attempt results (`actions`) gets
|
|
95
|
+
`fail` when **no** attempt took effect, however few pixels moved. Displacement proves we did not
|
|
96
|
+
disturb you; it never proves we accomplished anything. A single `reported-by-*` stays a `pass` with
|
|
97
|
+
the caveat spelled out in the reason field (`未独立验证` — nobody observed the app), because turning
|
|
98
|
+
weak-but-real evidence into a red would train its readers to ignore the verdict.
|
|
99
|
+
|
|
75
100
|
## What it does not do
|
|
76
101
|
|
|
77
102
|
- **No synthetic input.** There is no `physical` option: it is absent from the schema, not disabled
|
package/lib/index.js
CHANGED
|
@@ -352,10 +352,19 @@ function format(action, r) {
|
|
|
352
352
|
return result(action, false, code, `${code}${reason}`);
|
|
353
353
|
}
|
|
354
354
|
|
|
355
|
+
// WHO REPORTED THE SUCCESS. The engine sets `effect` when a channel call RETURNS without throwing;
|
|
356
|
+
// this file never upgrades it, and the three values are not degrees of confidence in the app -- they
|
|
357
|
+
// name who is speaking (README's table states the same three lines, keep them in step):
|
|
358
|
+
// unverified no channel reported success at all;
|
|
359
|
+
// reported-by-send the window message was DELIVERED -- nothing here proves the target app
|
|
360
|
+
// processed it;
|
|
361
|
+
// reported-by-pattern the UIA pattern call RETURNED -- nothing here proves the interface changed.
|
|
362
|
+
// Read as "who says it worked", never as "the application's state is confirmed".
|
|
355
363
|
const bits = [
|
|
356
364
|
`${action} ok`,
|
|
357
365
|
`channel=${r.channel || '?'}`,
|
|
358
366
|
`tier=${r.tier || '?'}`,
|
|
367
|
+
`effect=${r.effect || 'unverified'}`,
|
|
359
368
|
`focusTaken=${r.focusTaken === 'true' || r.focusTaken === true}`,
|
|
360
369
|
];
|
|
361
370
|
// THE PROOF. The engine sampled cursor/foreground/focus/last-input-age in TWO windows: a short
|
|
@@ -376,13 +385,22 @@ function format(action, r) {
|
|
|
376
385
|
const proof = evaluateProof(r.proofSamples || [], {
|
|
377
386
|
control: r.proofControl || [],
|
|
378
387
|
declaredFlash: r.tier === 'bounded-flash',
|
|
388
|
+
// The effect travels into the judgment, not just into the text. Without this, "nothing worked"
|
|
389
|
+
// still reads as proof=pass whenever the desktop happened to stay still (R2 in the plan). One call
|
|
390
|
+
// is one action, so `actions` is left to batch callers; a channel that reported NOTHING here caps
|
|
391
|
+
// the verdict at inconclusive rather than inventing a red on a single quiet call.
|
|
392
|
+
effect: r.effect || 'unverified',
|
|
379
393
|
});
|
|
380
394
|
bits.push(`proof=${proof.verdict}(${proof.reason})`);
|
|
381
395
|
if (r.restoreOutcome) bits.push(`restore=${r.restoreOutcome}`);
|
|
382
396
|
if (r.flashMs !== undefined) bits.push(`flashMs=${r.flashMs}`);
|
|
383
397
|
if (r.latencyMs !== undefined) bits.push(`latencyMs=${r.latencyMs}`);
|
|
384
398
|
if (r.detail) bits.push(`detail=${r.detail}`);
|
|
385
|
-
return result(action, true, '', bits.join(' '), {
|
|
399
|
+
return result(action, true, '', bits.join(' '), {
|
|
400
|
+
proof: proof.verdict,
|
|
401
|
+
proofDimensions: proof.dimensions,
|
|
402
|
+
effect: r.effect || 'unverified',
|
|
403
|
+
});
|
|
386
404
|
}
|
|
387
405
|
|
|
388
406
|
function truncate(s, n) {
|
|
@@ -390,4 +408,6 @@ function truncate(s, n) {
|
|
|
390
408
|
}
|
|
391
409
|
|
|
392
410
|
// Exported for tests: the projection from the five contract actions to this one tool.
|
|
393
|
-
|
|
411
|
+
// `formatResult` is here so the effect dimension can be asserted on the SHIPPED projection, with
|
|
412
|
+
// hand-authored engine results, without a desktop that has to cooperate.
|
|
413
|
+
export const _internals = { PARAMETERS, ACTIONS, TOOL_NAME, clampSettle, CONFIG_DEFAULTS, formatResult: format };
|
package/lib/proof-window.mjs
CHANGED
|
@@ -63,10 +63,16 @@ export function isHumanGap(b, a, humanGapFactor = 0.6) {
|
|
|
63
63
|
/**
|
|
64
64
|
* Evaluate one proof window. Pure.
|
|
65
65
|
* @param {Array} samples the ACTION window
|
|
66
|
-
* @param {{minSamples?:number, humanGapFactor?:number, control?:Array
|
|
66
|
+
* @param {{minSamples?:number, humanGapFactor?:number, control?:Array, declaredFlash?:boolean,
|
|
67
|
+
* effect?:string, actions?:Array}} [opts]
|
|
67
68
|
* control = the pre-action window (sampled while nothing was done). It cannot excuse motion in the
|
|
68
69
|
* action window -- the structural rule already handles that -- but it decides whether the
|
|
69
70
|
* foreground/focus dimensions are evaluable at all.
|
|
71
|
+
* effect = the engine's own word on who reported success ('unverified' | 'reported-by-send' |
|
|
72
|
+
* 'reported-by-pattern'). Omitted => no effect dimension, so every pre-existing caller keeps its
|
|
73
|
+
* old behaviour byte for byte.
|
|
74
|
+
* actions = optional per-attempt results ({ ok, effect }); when EVERY attempt failed to take
|
|
75
|
+
* effect the verdict is fail regardless of how still the desktop stayed.
|
|
70
76
|
*/
|
|
71
77
|
export function evaluateProof(samples, opts = {}) {
|
|
72
78
|
const minSamples = opts.minSamples ?? 3;
|
|
@@ -137,7 +143,11 @@ export function evaluateProof(samples, opts = {}) {
|
|
|
137
143
|
if (c.attribution) control = c.attribution;
|
|
138
144
|
}
|
|
139
145
|
|
|
140
|
-
const v = verdictFor(attribution, control, r.length, {
|
|
146
|
+
const v = verdictFor(attribution, control, r.length, {
|
|
147
|
+
declaredFlash: opts.declaredFlash === true,
|
|
148
|
+
effect: opts.effect,
|
|
149
|
+
actions: opts.actions,
|
|
150
|
+
});
|
|
141
151
|
return {
|
|
142
152
|
samples: r.length,
|
|
143
153
|
windowMs: r[r.length - 1].ts - r[0].ts,
|
|
@@ -176,8 +186,46 @@ export function evaluateProof(samples, opts = {}) {
|
|
|
176
186
|
* owns it, surfacing restore_failed separately). Reported,
|
|
177
187
|
* not failed.
|
|
178
188
|
* unreadable instrument on most gaps => inconclusive (silence is not innocence)
|
|
189
|
+
* effect : absent => the dimension does not exist (every pre-0.1.3 caller unchanged)
|
|
190
|
+
* reported-by-send => pass, and the reason says 未独立验证: a channel reported that
|
|
191
|
+
* reported-by-pattern the call RETURNED; nobody observed the application react
|
|
192
|
+
* unverified / unknown => inconclusive (no channel reported anything, so a still
|
|
193
|
+
* cursor cannot be read as "the action landed")
|
|
194
|
+
* actions : every attempt failed => fail (动作未生效), however still the desktop stayed. This is
|
|
195
|
+
* the case the pre-0.1.3 gate could read as a green light: 50 failed calls, zero
|
|
196
|
+
* displacement. Displacement proves we did not disturb; it never proves we accomplished.
|
|
179
197
|
* Overall = worst dimension: fail > inconclusive > pass.
|
|
180
198
|
*/
|
|
199
|
+
function judgeEffect(effect, actions) {
|
|
200
|
+
const list = Array.isArray(actions) ? actions.filter(Boolean) : [];
|
|
201
|
+
const reported = (a) => a.ok !== false
|
|
202
|
+
&& (a.effect === 'reported-by-send' || a.effect === 'reported-by-pattern');
|
|
203
|
+
|
|
204
|
+
// Every attempt failed to take effect => fail, whatever the samples say. A displacement-free window
|
|
205
|
+
// is the ABSENCE of disturbance, not the PRESENCE of accomplishment; letting it outvote a total
|
|
206
|
+
// no-op is exactly the self-deception this dimension exists to stop.
|
|
207
|
+
if (list.length > 0 && !list.some(reported)) {
|
|
208
|
+
return {
|
|
209
|
+
dim: 'fail',
|
|
210
|
+
note: `动作未生效 (none of ${list.length} action attempt(s) took effect: no channel ever reported success, so the clean window below proves only that we did nothing loudly)`,
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
// No effect supplied at all => no dimension. This keeps the module's old contract for every caller
|
|
214
|
+
// that predates it (the 32 pre-existing arms must not move).
|
|
215
|
+
if (effect === undefined || effect === null || effect === '') return null;
|
|
216
|
+
if (effect === 'reported-by-send' || effect === 'reported-by-pattern') {
|
|
217
|
+
return {
|
|
218
|
+
dim: 'pass',
|
|
219
|
+
note: `effect=${effect}: a channel reported the call returned -- 未独立验证 (not independently verified: the application's own handling was never observed)`,
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
// 'unverified', and anything this module does not know, cannot be laundered into a pass.
|
|
223
|
+
return {
|
|
224
|
+
dim: 'inconclusive',
|
|
225
|
+
note: `effect='${effect}': no channel reported success, so the clean window below cannot be read as the action having landed`,
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
|
|
181
229
|
export function verdictFor(attribution, control, sampleCount, opts = {}) {
|
|
182
230
|
const a = attribution || {};
|
|
183
231
|
const unreadableCap = opts.unreadableCap ?? Math.max(1, Math.floor((sampleCount - 1) * 0.3));
|
|
@@ -215,6 +263,9 @@ export function verdictFor(attribution, control, sampleCount, opts = {}) {
|
|
|
215
263
|
if (dims.focus === 'fail') parts.push(`${aFc} unexplained focus change(s) with a clean control`);
|
|
216
264
|
if (dims.focus === 'inconclusive') parts.push(`${aFc} focus change(s) mirroring the desktop's own behaviour during the control`);
|
|
217
265
|
|
|
266
|
+
const eff = judgeEffect(opts.effect, opts.actions);
|
|
267
|
+
if (eff) { dims.effect = eff.dim; parts.push(eff.note); }
|
|
268
|
+
|
|
218
269
|
const values = Object.values(dims);
|
|
219
270
|
// 'declared' is informational, never the worst value: it cannot drag the verdict down on its own.
|
|
220
271
|
const verdict = values.includes('fail') ? 'fail' : values.includes('inconclusive') ? 'inconclusive' : 'pass';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-windows-parallel-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"tag": "latest"
|
|
@@ -18,6 +18,14 @@
|
|
|
18
18
|
"computer-use"
|
|
19
19
|
],
|
|
20
20
|
"license": "MIT",
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git+https://github.com/drscrewdriver/dsh-windows-parallel-mcp.git"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://github.com/drscrewdriver/dsh-windows-parallel-mcp#readme",
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/drscrewdriver/dsh-windows-parallel-mcp/issues"
|
|
28
|
+
},
|
|
21
29
|
"type": "module",
|
|
22
30
|
"main": "lib/index.js",
|
|
23
31
|
"exports": {
|