dsh-windows-parallel-mcp 0.6.0 → 0.7.0

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/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.6.0** — this document describes the contract as of that version. What
8
+ > **Current release: 0.7.0** — 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
@@ -13,7 +13,7 @@ on request. Where a window accepts a window message, you never lose focus at all
13
13
  exposes UI Automation, you lose focus for one bounded flash that is reversed automatically. Where you
14
14
  explicitly ask for the takeover tier, the cursor moves to the point and is always restored, with a
15
15
  HUD that can stop it three ways. Everywhere else it refuses, with a code and a reason — never with
16
- silence: every refusal carries a code from a closed set of fourteen and the next step.
16
+ silence: every refusal carries a code from a closed set of seventeen and the next step.
17
17
 
18
18
  **The takeover tier defaults off, and that is structural.** The cursor is only ever moved because you
19
19
  opened `takeoverAllowed` **and** asked for it on the call (`takeover:true`), so an upgrade cannot
@@ -31,7 +31,7 @@ bundle with a broad tool surface; this one is a single action tool whose entire
31
31
 
32
32
  ## What it does
33
33
 
34
- One tool, eight actions:
34
+ One tool, eleven actions:
35
35
 
36
36
  | action | what it returns |
37
37
  |---|---|
@@ -43,6 +43,9 @@ One tool, eight actions:
43
43
  | `snapshot` | the accessibility tree as a NUMBERED element table: continuous `label`, control type, name, automation id, screen rect, patterns |
44
44
  | `screenshot` | the window rect captured to a PNG, plus the coordinate mapping as data (`screenRect`, `imageSize`, `scale`, `identity`, `frame`, `dpiAware`) |
45
45
  | `preview` | the marker drawn at a point, and the element under it reported as TEXT — no picture needed |
46
+ | `launch` | start a whitelisted program; reports the pid, and the window only once it really exists |
47
+ | `clipboard` | read or write the system clipboard — a read reports lengths and never the payload |
48
+ | `window` | minimize / restore / move / resize / topmost ONE named window, verified by reading its state back |
46
49
 
47
50
  The engine picks the cheapest available door per call:
48
51
 
@@ -278,6 +281,93 @@ click. Success is reported as `effect=reported-by-send`, never as "verified". Un
278
281
  carries no hardware scancode, which is why a rare scancode-only target would ignore it — documented,
279
282
  not a bug.
280
283
 
284
+ ## Desktop actions: launch, clipboard, window (0.7.0)
285
+
286
+ Three capabilities that were missing outright — "you cannot even start a program" was the honest answer
287
+ — and none of them is a door action. They choose no channel, cost no tier, and produce no proof window,
288
+ so they live beside `Invoke-WpmAction` rather than inside it, and the door discipline (point ownership,
289
+ the restore table, the proof window) is not widened by any of them.
290
+
291
+ **`launch` — two switches, neither of which implies the other.** `appLaunchAllowed` opens the
292
+ capability; `appLaunchAllow` lists the exact program names or absolute paths that may run, and an
293
+ **empty list means nothing may launch even with the gate on**. Matching is exact and case-folded: there
294
+ is no wildcard, and `notepad` does not authorise `notepad-helper.exe` — a whitelist that grows by prefix
295
+ is a whitelist that authorises more than it says. A refusal is `app_launch_denied` and is raised before
296
+ any worker request, so a refused launch started nothing (asserted with a request counter in
297
+ `test/plugin-test.mjs` and re-checked inside the engine against the same table). The engine's own
298
+ vocabulary for the window is the interesting part: `Process.Start` returns while the app is still
299
+ loading (measured: `MainWindowHandle=0` for 1348 ms on a cold notepad), so a program that has not
300
+ published a window yet answers `ok:true` with `hwnd=""` and `detail=window-not-yet` — neither a fake
301
+ failure nor a fake readiness. Arguments are passed through as given and written to the audit log,
302
+ because listing a program does not vouch for what it is told to do.
303
+
304
+ **`clipboard` — the most private read in this product.** What is on the clipboard may be a password or
305
+ a token the owner copied seconds ago, so a text read reports its **length**, its result text never
306
+ contains the payload, the audit line records `op`/`format`/`chars`, and values are capped at 64 KB with
307
+ `truncated` stated rather than silently cut. An image write accepts a `shotId`, so a screenshot can go
308
+ straight into the clipboard without the caller handling pixels; the read-back compares the size the
309
+ clipboard reports against the size the shot recorded. A clipboard holding neither is refused with the
310
+ format names it did find — an empty success would be indistinguishable from "the clipboard is empty".
311
+
312
+ **`window` — one named window, five ops, each verified by reading the window back.** `IsIconic`,
313
+ `GetWindowRect`, the `WS_EX_TOPMOST` bit — not `ShowWindow`'s return value, because a syscall's answer
314
+ describes the CALL and this product has been burned repeatedly by reporting that as a state. `move` and
315
+ `resize` pass `SWP_NOACTIVATE`, and the result carries `foregroundTaken=true|false` measured on both
316
+ sides of that specific call: `restore` activates by definition (that is what restoring is), and the
317
+ honest answer is to report it, not to hide it or to refuse the op the caller asked for. There is no
318
+ "all windows" op and no `#32770` discovery: acting on a window nobody named is not a convenience.
319
+
320
+ ### One ceiling, eleven actions
321
+
322
+ The old shape of this problem was a boolean per capability, which does not scale past the number of
323
+ settings anyone will actually read. Instead the two axes are independent:
324
+
325
+ ```
326
+ the action declares the lowest rung it can ever need (src/schema/tools.json#requiresTier)
327
+ the owner sets one ceiling (settings: policy)
328
+
329
+ readonly < quiet < flash < takeover
330
+ reads message bounded-UIA real cursor / held focus / launch
331
+ door flash
332
+ ```
333
+
334
+ | `policy` | permits | refuses |
335
+ |---|---|---|
336
+ | `readonly` | `windows`, `status`, `snapshot`, `screenshot`, `preview`, `clipboard` read | every write |
337
+ | `quiet` | + `click` / `type` / `focus` through the message door | the flash tier, `clipboard` write, `window`, `launch` |
338
+ | `balanced` *(default)* | + the bounded-flash tier, `clipboard` write, `window` ops | `takeover:true`, `keyInput:"inject"`, `launch` |
339
+ | `full` | + the takeover tier and `launch` | nothing extra |
340
+
341
+ Above the ceiling a call is refused with **`policy_denied`** and the reason names both numbers (what the
342
+ action needed, what the policy allows), because the correct next step is a settings change and the wrong
343
+ one is a retry. The gate order is `paused → policy → takeoverAllowed/keyInjectAllowed → launch gate +
344
+ whitelist → idle check → the door table`, and every step in it is tested by making two gates disagree
345
+ about which one spoke (`test/plugin-test.mjs`). Two consequences are worth stating plainly rather than
346
+ leaving to discovery: **`takeover:true` now needs `policy:'full'` as well as `takeoverAllowed`** (0.7.0
347
+ raised the bar for the loudest tier on purpose), and `clipboard`'s halves are graded separately
348
+ (`requiresTierFor`), so a `readonly` owner can still read.
349
+
350
+ **Idle instead of a dialog.** When the last *physical* input is younger than `policyIdleMs` (default
351
+ 3000 ms) and the action needs the takeover tier, it is refused with **`user_active`** and nothing is
352
+ clicked — no popup, no countdown. The upstream design asks the owner to consent by interrupting them;
353
+ an interrupt presented as consent is just a second disturbance. The escape hatch is explicit
354
+ (`forceUserActive:true`), it does not bypass any other gate, and the audit line records `forced:true` so
355
+ an interruption caused on purpose stays distinguishable from one caused by accident. An unattended run
356
+ is never blocked by this: with nobody typing, the age grows past the window and the call goes through.
357
+
358
+ ### The audit log
359
+
360
+ Every action appends one JSONL line to `%LOCALAPPDATA%\wpm\audit.log` — allow **and** deny, because a
361
+ trail that records only refusals documents the times the guard worked and is silent about the times it
362
+ had nothing to do with. Fields: `ts, action, hwnd, tier, policy, decision, code, userActiveAgeMs,
363
+ effect, latencyMs`, plus `target`/`args` for a launch and `op`/`format`/`chars` for a clipboard call.
364
+ What is deliberately absent is content: no typed text, no clipboard payload — the second copy of a
365
+ secret is the one nobody protects. `auditKeep` (default 2000) bounds the file, pruning oldest-first when
366
+ a write pushes it past budget. An audit that cannot be written is reported (`auditNote=n write(s)
367
+ failed`) rather than swallowed: a log that looks complete and is not is worse than one that admits it
368
+ is missing lines. This is the only artifact that survives a call, and it is the one thing that can
369
+ answer "what did the agent do to this machine" after the fact.
370
+
281
371
  ## What it does not do
282
372
 
283
373
  - **No mouse injection.** `MOUSEEVENTF_*`, `mouse_event` and `keybd_event` are banned in every
@@ -314,9 +404,10 @@ degradation.
314
404
  ## Typed surface
315
405
 
316
406
  `types/index.d.ts` is written by hand, not emitted from an implementation. It covers the whole
317
- contract: the eight actions, every argument including the takeover fields, the image-space / label
318
- surface and 0.6.0's `caretPosition`, all fourteen refusal codes as a closed union, and `effect` as its
319
- own four-value union (`WpmEffect`) beside `WpmCaptureBackend` and `WpmFrameSource`.
407
+ contract: the eleven actions, every argument including the takeover fields, the image-space / label
408
+ surface, 0.6.0's `caretPosition` and 0.7.0's `target`/`op`/`format`/`forceUserActive`, all seventeen
409
+ refusal codes as a closed union, and `effect` as its own four-value union (`WpmEffect`) beside
410
+ `WpmCaptureBackend`, `WpmClipboardOp`, `WpmWindowOp`, `WpmPolicy` and `WpmFrameSource`.
320
411
 
321
412
  Its wiring is measured in both resolution modes a consumer can use, rather than assumed from the
322
413
  presence of a file:
@@ -351,6 +442,11 @@ when one is present, and the gate reports a named SKIP rather than a red when on
351
442
  | `snapshotMaxElements` | `300` | cap on elements per snapshot (1–5000); a tighter cap is a smaller frame for a deciding subagent |
352
443
  | `screenshotMaxWidth` | `0` | downscale captures to this width; `0` means no scaling and `scale=1` — a resized image is a different coordinate system, so it is never chosen silently |
353
444
  | `shotsKeep` | `10` | how many PNGs stay in `%LOCALAPPDATA%\wpm\shots`; older files are deleted after each capture |
445
+ | `policy` | `balanced` | the ceiling over all eleven actions: `readonly` < `quiet` < `balanced` < `full`. Above it a call is refused with `policy_denied`, whose next step is to raise THIS setting and not to retry. An unrecognizable value falls back to `balanced`, never to `full` |
446
+ | `policyIdleMs` | `3000` | how recently a physical input counts as "the owner is here". A takeover-tier call then refuses with `user_active` and opens no dialog; `0` disables the check |
447
+ | `appLaunchAllowed` | `false` | allow `action=launch` at all. Independent of `takeoverAllowed`: being allowed to move a pointer is not being allowed to start a program |
448
+ | `appLaunchAllow` | `[]` | the launch whitelist — exact names or absolute paths, matched case-insensitively and in full. Empty means nothing may launch even with the gate on; no wildcard, no prefix |
449
+ | `auditKeep` | `2000` | how many lines `%LOCALAPPDATA%\wpm\audit.log` holds before the oldest are pruned |
354
450
 
355
451
  ## What measurement established
356
452
 
@@ -439,6 +535,32 @@ unmeasured end-to-end and is stated as such in [docs/refusals.md](docs/refusals.
439
535
  exercised `replace:true` through the message door, which is why the fix ships with an arm that does
440
536
  (`test/readback-truth.mjs` A1). Found by running the import instead of trusting its name.
441
537
 
538
+ ### 0.7.0's measurements
539
+
540
+ - **A cold `Process.Start` has no window for over a second** — notepad: pid present,
541
+ `MainWindowHandle=0`, **1348 ms**, and the window only reachable by polling the pid. Hence
542
+ `waitMs`/`window-not-yet` rather than an hwnd claim at return time.
543
+ - **The STA clipboard works in the worker and is not instant** — text write+read identical, first call
544
+ **138 ms**; `SetDataObject`/`GetDataObject` for images (40×20 verified). `Clipboard.Flush()` does NOT
545
+ exist on Windows PowerShell 5.1's runtime (.NET Framework): the first version of this branch threw
546
+ "Clipboard does not contain a method named 'Flush'", which is a method present in the documentation
547
+ people read and absent from the platform the product targets. `SetDataObject($v, $true)` is the
548
+ supported way to make the data outlive the process.
549
+ - **`SW_RESTORE` activates.** Measured around a restore on a real notepad window:
550
+ `foregroundBefore=<other> foregroundAfter=<target>`. Reported as `foregroundTaken=true` on that call
551
+ instead of being attributed to something else; `move`/`resize`/`topmost` measured
552
+ `foregroundTaken=false` with `SWP_NOACTIVATE`.
553
+ - **The whitelist is only a whitelist if it is exact.** `notepad` against `notepad-helper.exe`: a
554
+ prefix or substring rule authorises the second one, so membership is a case-folded full-string test
555
+ and `test/plugin-test.mjs` asserts the refusal for an unlisted name while the gate is on.
556
+ - **The refusal vocabulary is unchanged in shape by `requiresTier`** — a rung comparison is arithmetic
557
+ over one ordered list, so the cost of an action's classification is one number, not one new code per
558
+ action. Three codes were added for the whole batch (`app_launch_denied`, `policy_denied`,
559
+ `user_active`), each naming a setting rather than a symptom.
560
+ - `Check-no-cursor-control` is still green with the same two whitelisted primitive uses and an
561
+ unchanged whitelist file list: adding `launch`/`window` did not open a door to `MOUSEEVENTF_*`,
562
+ `mouse_event` or `keybd_event`.
563
+
442
564
  ## Verifying the copy you actually installed
443
565
 
444
566
  Every test above imports the repository checkout, so a package that installs to the wrong place or ships
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.6.0** — this document describes the contract as of that version. What
8
+ > **Current release: 0.7.0** — 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
@@ -13,7 +13,7 @@ on request. Where a window accepts a window message, you never lose focus at all
13
13
  exposes UI Automation, you lose focus for one bounded flash that is reversed automatically. Where you
14
14
  explicitly ask for the takeover tier, the cursor moves to the point and is always restored, with a
15
15
  HUD that can stop it three ways. Everywhere else it refuses, with a code and a reason — never with
16
- silence: every refusal carries a code from a closed set of fourteen and the next step.
16
+ silence: every refusal carries a code from a closed set of seventeen and the next step.
17
17
 
18
18
  **The takeover tier defaults off, and that is structural.** The cursor is only ever moved because you
19
19
  opened `takeoverAllowed` **and** asked for it on the call (`takeover:true`), so an upgrade cannot
@@ -31,7 +31,7 @@ bundle with a broad tool surface; this one is a single action tool whose entire
31
31
 
32
32
  ## What it does
33
33
 
34
- One tool, eight actions:
34
+ One tool, eleven actions:
35
35
 
36
36
  | action | what it returns |
37
37
  |---|---|
@@ -43,6 +43,9 @@ One tool, eight actions:
43
43
  | `snapshot` | the accessibility tree as a NUMBERED element table: continuous `label`, control type, name, automation id, screen rect, patterns |
44
44
  | `screenshot` | the window rect captured to a PNG, plus the coordinate mapping as data (`screenRect`, `imageSize`, `scale`, `identity`, `frame`, `dpiAware`) |
45
45
  | `preview` | the marker drawn at a point, and the element under it reported as TEXT — no picture needed |
46
+ | `launch` | start a whitelisted program; reports the pid, and the window only once it really exists |
47
+ | `clipboard` | read or write the system clipboard — a read reports lengths and never the payload |
48
+ | `window` | minimize / restore / move / resize / topmost ONE named window, verified by reading its state back |
46
49
 
47
50
  The engine picks the cheapest available door per call:
48
51
 
@@ -278,6 +281,93 @@ click. Success is reported as `effect=reported-by-send`, never as "verified". Un
278
281
  carries no hardware scancode, which is why a rare scancode-only target would ignore it — documented,
279
282
  not a bug.
280
283
 
284
+ ## Desktop actions: launch, clipboard, window (0.7.0)
285
+
286
+ Three capabilities that were missing outright — "you cannot even start a program" was the honest answer
287
+ — and none of them is a door action. They choose no channel, cost no tier, and produce no proof window,
288
+ so they live beside `Invoke-WpmAction` rather than inside it, and the door discipline (point ownership,
289
+ the restore table, the proof window) is not widened by any of them.
290
+
291
+ **`launch` — two switches, neither of which implies the other.** `appLaunchAllowed` opens the
292
+ capability; `appLaunchAllow` lists the exact program names or absolute paths that may run, and an
293
+ **empty list means nothing may launch even with the gate on**. Matching is exact and case-folded: there
294
+ is no wildcard, and `notepad` does not authorise `notepad-helper.exe` — a whitelist that grows by prefix
295
+ is a whitelist that authorises more than it says. A refusal is `app_launch_denied` and is raised before
296
+ any worker request, so a refused launch started nothing (asserted with a request counter in
297
+ `test/plugin-test.mjs` and re-checked inside the engine against the same table). The engine's own
298
+ vocabulary for the window is the interesting part: `Process.Start` returns while the app is still
299
+ loading (measured: `MainWindowHandle=0` for 1348 ms on a cold notepad), so a program that has not
300
+ published a window yet answers `ok:true` with `hwnd=""` and `detail=window-not-yet` — neither a fake
301
+ failure nor a fake readiness. Arguments are passed through as given and written to the audit log,
302
+ because listing a program does not vouch for what it is told to do.
303
+
304
+ **`clipboard` — the most private read in this product.** What is on the clipboard may be a password or
305
+ a token the owner copied seconds ago, so a text read reports its **length**, its result text never
306
+ contains the payload, the audit line records `op`/`format`/`chars`, and values are capped at 64 KB with
307
+ `truncated` stated rather than silently cut. An image write accepts a `shotId`, so a screenshot can go
308
+ straight into the clipboard without the caller handling pixels; the read-back compares the size the
309
+ clipboard reports against the size the shot recorded. A clipboard holding neither is refused with the
310
+ format names it did find — an empty success would be indistinguishable from "the clipboard is empty".
311
+
312
+ **`window` — one named window, five ops, each verified by reading the window back.** `IsIconic`,
313
+ `GetWindowRect`, the `WS_EX_TOPMOST` bit — not `ShowWindow`'s return value, because a syscall's answer
314
+ describes the CALL and this product has been burned repeatedly by reporting that as a state. `move` and
315
+ `resize` pass `SWP_NOACTIVATE`, and the result carries `foregroundTaken=true|false` measured on both
316
+ sides of that specific call: `restore` activates by definition (that is what restoring is), and the
317
+ honest answer is to report it, not to hide it or to refuse the op the caller asked for. There is no
318
+ "all windows" op and no `#32770` discovery: acting on a window nobody named is not a convenience.
319
+
320
+ ### One ceiling, eleven actions
321
+
322
+ The old shape of this problem was a boolean per capability, which does not scale past the number of
323
+ settings anyone will actually read. Instead the two axes are independent:
324
+
325
+ ```
326
+ the action declares the lowest rung it can ever need (src/schema/tools.json#requiresTier)
327
+ the owner sets one ceiling (settings: policy)
328
+
329
+ readonly < quiet < flash < takeover
330
+ reads message bounded-UIA real cursor / held focus / launch
331
+ door flash
332
+ ```
333
+
334
+ | `policy` | permits | refuses |
335
+ |---|---|---|
336
+ | `readonly` | `windows`, `status`, `snapshot`, `screenshot`, `preview`, `clipboard` read | every write |
337
+ | `quiet` | + `click` / `type` / `focus` through the message door | the flash tier, `clipboard` write, `window`, `launch` |
338
+ | `balanced` *(default)* | + the bounded-flash tier, `clipboard` write, `window` ops | `takeover:true`, `keyInput:"inject"`, `launch` |
339
+ | `full` | + the takeover tier and `launch` | nothing extra |
340
+
341
+ Above the ceiling a call is refused with **`policy_denied`** and the reason names both numbers (what the
342
+ action needed, what the policy allows), because the correct next step is a settings change and the wrong
343
+ one is a retry. The gate order is `paused → policy → takeoverAllowed/keyInjectAllowed → launch gate +
344
+ whitelist → idle check → the door table`, and every step in it is tested by making two gates disagree
345
+ about which one spoke (`test/plugin-test.mjs`). Two consequences are worth stating plainly rather than
346
+ leaving to discovery: **`takeover:true` now needs `policy:'full'` as well as `takeoverAllowed`** (0.7.0
347
+ raised the bar for the loudest tier on purpose), and `clipboard`'s halves are graded separately
348
+ (`requiresTierFor`), so a `readonly` owner can still read.
349
+
350
+ **Idle instead of a dialog.** When the last *physical* input is younger than `policyIdleMs` (default
351
+ 3000 ms) and the action needs the takeover tier, it is refused with **`user_active`** and nothing is
352
+ clicked — no popup, no countdown. The upstream design asks the owner to consent by interrupting them;
353
+ an interrupt presented as consent is just a second disturbance. The escape hatch is explicit
354
+ (`forceUserActive:true`), it does not bypass any other gate, and the audit line records `forced:true` so
355
+ an interruption caused on purpose stays distinguishable from one caused by accident. An unattended run
356
+ is never blocked by this: with nobody typing, the age grows past the window and the call goes through.
357
+
358
+ ### The audit log
359
+
360
+ Every action appends one JSONL line to `%LOCALAPPDATA%\wpm\audit.log` — allow **and** deny, because a
361
+ trail that records only refusals documents the times the guard worked and is silent about the times it
362
+ had nothing to do with. Fields: `ts, action, hwnd, tier, policy, decision, code, userActiveAgeMs,
363
+ effect, latencyMs`, plus `target`/`args` for a launch and `op`/`format`/`chars` for a clipboard call.
364
+ What is deliberately absent is content: no typed text, no clipboard payload — the second copy of a
365
+ secret is the one nobody protects. `auditKeep` (default 2000) bounds the file, pruning oldest-first when
366
+ a write pushes it past budget. An audit that cannot be written is reported (`auditNote=n write(s)
367
+ failed`) rather than swallowed: a log that looks complete and is not is worse than one that admits it
368
+ is missing lines. This is the only artifact that survives a call, and it is the one thing that can
369
+ answer "what did the agent do to this machine" after the fact.
370
+
281
371
  ## What it does not do
282
372
 
283
373
  - **No mouse injection.** `MOUSEEVENTF_*`, `mouse_event` and `keybd_event` are banned in every
@@ -314,9 +404,10 @@ degradation.
314
404
  ## Typed surface
315
405
 
316
406
  `types/index.d.ts` is written by hand, not emitted from an implementation. It covers the whole
317
- contract: the eight actions, every argument including the takeover fields, the image-space / label
318
- surface and 0.6.0's `caretPosition`, all fourteen refusal codes as a closed union, and `effect` as its
319
- own four-value union (`WpmEffect`) beside `WpmCaptureBackend` and `WpmFrameSource`.
407
+ contract: the eleven actions, every argument including the takeover fields, the image-space / label
408
+ surface, 0.6.0's `caretPosition` and 0.7.0's `target`/`op`/`format`/`forceUserActive`, all seventeen
409
+ refusal codes as a closed union, and `effect` as its own four-value union (`WpmEffect`) beside
410
+ `WpmCaptureBackend`, `WpmClipboardOp`, `WpmWindowOp`, `WpmPolicy` and `WpmFrameSource`.
320
411
 
321
412
  Its wiring is measured in both resolution modes a consumer can use, rather than assumed from the
322
413
  presence of a file:
@@ -351,6 +442,11 @@ when one is present, and the gate reports a named SKIP rather than a red when on
351
442
  | `snapshotMaxElements` | `300` | cap on elements per snapshot (1–5000); a tighter cap is a smaller frame for a deciding subagent |
352
443
  | `screenshotMaxWidth` | `0` | downscale captures to this width; `0` means no scaling and `scale=1` — a resized image is a different coordinate system, so it is never chosen silently |
353
444
  | `shotsKeep` | `10` | how many PNGs stay in `%LOCALAPPDATA%\wpm\shots`; older files are deleted after each capture |
445
+ | `policy` | `balanced` | the ceiling over all eleven actions: `readonly` < `quiet` < `balanced` < `full`. Above it a call is refused with `policy_denied`, whose next step is to raise THIS setting and not to retry. An unrecognizable value falls back to `balanced`, never to `full` |
446
+ | `policyIdleMs` | `3000` | how recently a physical input counts as "the owner is here". A takeover-tier call then refuses with `user_active` and opens no dialog; `0` disables the check |
447
+ | `appLaunchAllowed` | `false` | allow `action=launch` at all. Independent of `takeoverAllowed`: being allowed to move a pointer is not being allowed to start a program |
448
+ | `appLaunchAllow` | `[]` | the launch whitelist — exact names or absolute paths, matched case-insensitively and in full. Empty means nothing may launch even with the gate on; no wildcard, no prefix |
449
+ | `auditKeep` | `2000` | how many lines `%LOCALAPPDATA%\wpm\audit.log` holds before the oldest are pruned |
354
450
 
355
451
  ## What measurement established
356
452
 
@@ -439,6 +535,32 @@ unmeasured end-to-end and is stated as such in [docs/refusals.md](docs/refusals.
439
535
  exercised `replace:true` through the message door, which is why the fix ships with an arm that does
440
536
  (`test/readback-truth.mjs` A1). Found by running the import instead of trusting its name.
441
537
 
538
+ ### 0.7.0's measurements
539
+
540
+ - **A cold `Process.Start` has no window for over a second** — notepad: pid present,
541
+ `MainWindowHandle=0`, **1348 ms**, and the window only reachable by polling the pid. Hence
542
+ `waitMs`/`window-not-yet` rather than an hwnd claim at return time.
543
+ - **The STA clipboard works in the worker and is not instant** — text write+read identical, first call
544
+ **138 ms**; `SetDataObject`/`GetDataObject` for images (40×20 verified). `Clipboard.Flush()` does NOT
545
+ exist on Windows PowerShell 5.1's runtime (.NET Framework): the first version of this branch threw
546
+ "Clipboard does not contain a method named 'Flush'", which is a method present in the documentation
547
+ people read and absent from the platform the product targets. `SetDataObject($v, $true)` is the
548
+ supported way to make the data outlive the process.
549
+ - **`SW_RESTORE` activates.** Measured around a restore on a real notepad window:
550
+ `foregroundBefore=<other> foregroundAfter=<target>`. Reported as `foregroundTaken=true` on that call
551
+ instead of being attributed to something else; `move`/`resize`/`topmost` measured
552
+ `foregroundTaken=false` with `SWP_NOACTIVATE`.
553
+ - **The whitelist is only a whitelist if it is exact.** `notepad` against `notepad-helper.exe`: a
554
+ prefix or substring rule authorises the second one, so membership is a case-folded full-string test
555
+ and `test/plugin-test.mjs` asserts the refusal for an unlisted name while the gate is on.
556
+ - **The refusal vocabulary is unchanged in shape by `requiresTier`** — a rung comparison is arithmetic
557
+ over one ordered list, so the cost of an action's classification is one number, not one new code per
558
+ action. Three codes were added for the whole batch (`app_launch_denied`, `policy_denied`,
559
+ `user_active`), each naming a setting rather than a symptom.
560
+ - `Check-no-cursor-control` is still green with the same two whitelisted primitive uses and an
561
+ unchanged whitelist file list: adding `launch`/`window` did not open a door to `MOUSEEVENTF_*`,
562
+ `mouse_event` or `keybd_event`.
563
+
442
564
  ## Verifying the copy you actually installed
443
565
 
444
566
  Every test above imports the repository checkout, so a package that installs to the wrong place or ships
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.6.0** — this document describes the contract as of that version. What
8
+ > **Current release: 0.7.0** — 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
@@ -13,7 +13,7 @@ on request. Where a window accepts a window message, you never lose focus at all
13
13
  exposes UI Automation, you lose focus for one bounded flash that is reversed automatically. Where you
14
14
  explicitly ask for the takeover tier, the cursor moves to the point and is always restored, with a
15
15
  HUD that can stop it three ways. Everywhere else it refuses, with a code and a reason — never with
16
- silence: every refusal carries a code from a closed set of fourteen and the next step.
16
+ silence: every refusal carries a code from a closed set of seventeen and the next step.
17
17
 
18
18
  **The takeover tier defaults off, and that is structural.** The cursor is only ever moved because you
19
19
  opened `takeoverAllowed` **and** asked for it on the call (`takeover:true`), so an upgrade cannot
@@ -31,7 +31,7 @@ bundle with a broad tool surface; this one is a single action tool whose entire
31
31
 
32
32
  ## What it does
33
33
 
34
- One tool, eight actions:
34
+ One tool, eleven actions:
35
35
 
36
36
  | action | what it returns |
37
37
  |---|---|
@@ -43,6 +43,9 @@ One tool, eight actions:
43
43
  | `snapshot` | the accessibility tree as a NUMBERED element table: continuous `label`, control type, name, automation id, screen rect, patterns |
44
44
  | `screenshot` | the window rect captured to a PNG, plus the coordinate mapping as data (`screenRect`, `imageSize`, `scale`, `identity`, `frame`, `dpiAware`) |
45
45
  | `preview` | the marker drawn at a point, and the element under it reported as TEXT — no picture needed |
46
+ | `launch` | start a whitelisted program; reports the pid, and the window only once it really exists |
47
+ | `clipboard` | read or write the system clipboard — a read reports lengths and never the payload |
48
+ | `window` | minimize / restore / move / resize / topmost ONE named window, verified by reading its state back |
46
49
 
47
50
  The engine picks the cheapest available door per call:
48
51
 
@@ -278,6 +281,93 @@ click. Success is reported as `effect=reported-by-send`, never as "verified". Un
278
281
  carries no hardware scancode, which is why a rare scancode-only target would ignore it — documented,
279
282
  not a bug.
280
283
 
284
+ ## Desktop actions: launch, clipboard, window (0.7.0)
285
+
286
+ Three capabilities that were missing outright — "you cannot even start a program" was the honest answer
287
+ — and none of them is a door action. They choose no channel, cost no tier, and produce no proof window,
288
+ so they live beside `Invoke-WpmAction` rather than inside it, and the door discipline (point ownership,
289
+ the restore table, the proof window) is not widened by any of them.
290
+
291
+ **`launch` — two switches, neither of which implies the other.** `appLaunchAllowed` opens the
292
+ capability; `appLaunchAllow` lists the exact program names or absolute paths that may run, and an
293
+ **empty list means nothing may launch even with the gate on**. Matching is exact and case-folded: there
294
+ is no wildcard, and `notepad` does not authorise `notepad-helper.exe` — a whitelist that grows by prefix
295
+ is a whitelist that authorises more than it says. A refusal is `app_launch_denied` and is raised before
296
+ any worker request, so a refused launch started nothing (asserted with a request counter in
297
+ `test/plugin-test.mjs` and re-checked inside the engine against the same table). The engine's own
298
+ vocabulary for the window is the interesting part: `Process.Start` returns while the app is still
299
+ loading (measured: `MainWindowHandle=0` for 1348 ms on a cold notepad), so a program that has not
300
+ published a window yet answers `ok:true` with `hwnd=""` and `detail=window-not-yet` — neither a fake
301
+ failure nor a fake readiness. Arguments are passed through as given and written to the audit log,
302
+ because listing a program does not vouch for what it is told to do.
303
+
304
+ **`clipboard` — the most private read in this product.** What is on the clipboard may be a password or
305
+ a token the owner copied seconds ago, so a text read reports its **length**, its result text never
306
+ contains the payload, the audit line records `op`/`format`/`chars`, and values are capped at 64 KB with
307
+ `truncated` stated rather than silently cut. An image write accepts a `shotId`, so a screenshot can go
308
+ straight into the clipboard without the caller handling pixels; the read-back compares the size the
309
+ clipboard reports against the size the shot recorded. A clipboard holding neither is refused with the
310
+ format names it did find — an empty success would be indistinguishable from "the clipboard is empty".
311
+
312
+ **`window` — one named window, five ops, each verified by reading the window back.** `IsIconic`,
313
+ `GetWindowRect`, the `WS_EX_TOPMOST` bit — not `ShowWindow`'s return value, because a syscall's answer
314
+ describes the CALL and this product has been burned repeatedly by reporting that as a state. `move` and
315
+ `resize` pass `SWP_NOACTIVATE`, and the result carries `foregroundTaken=true|false` measured on both
316
+ sides of that specific call: `restore` activates by definition (that is what restoring is), and the
317
+ honest answer is to report it, not to hide it or to refuse the op the caller asked for. There is no
318
+ "all windows" op and no `#32770` discovery: acting on a window nobody named is not a convenience.
319
+
320
+ ### One ceiling, eleven actions
321
+
322
+ The old shape of this problem was a boolean per capability, which does not scale past the number of
323
+ settings anyone will actually read. Instead the two axes are independent:
324
+
325
+ ```
326
+ the action declares the lowest rung it can ever need (src/schema/tools.json#requiresTier)
327
+ the owner sets one ceiling (settings: policy)
328
+
329
+ readonly < quiet < flash < takeover
330
+ reads message bounded-UIA real cursor / held focus / launch
331
+ door flash
332
+ ```
333
+
334
+ | `policy` | permits | refuses |
335
+ |---|---|---|
336
+ | `readonly` | `windows`, `status`, `snapshot`, `screenshot`, `preview`, `clipboard` read | every write |
337
+ | `quiet` | + `click` / `type` / `focus` through the message door | the flash tier, `clipboard` write, `window`, `launch` |
338
+ | `balanced` *(default)* | + the bounded-flash tier, `clipboard` write, `window` ops | `takeover:true`, `keyInput:"inject"`, `launch` |
339
+ | `full` | + the takeover tier and `launch` | nothing extra |
340
+
341
+ Above the ceiling a call is refused with **`policy_denied`** and the reason names both numbers (what the
342
+ action needed, what the policy allows), because the correct next step is a settings change and the wrong
343
+ one is a retry. The gate order is `paused → policy → takeoverAllowed/keyInjectAllowed → launch gate +
344
+ whitelist → idle check → the door table`, and every step in it is tested by making two gates disagree
345
+ about which one spoke (`test/plugin-test.mjs`). Two consequences are worth stating plainly rather than
346
+ leaving to discovery: **`takeover:true` now needs `policy:'full'` as well as `takeoverAllowed`** (0.7.0
347
+ raised the bar for the loudest tier on purpose), and `clipboard`'s halves are graded separately
348
+ (`requiresTierFor`), so a `readonly` owner can still read.
349
+
350
+ **Idle instead of a dialog.** When the last *physical* input is younger than `policyIdleMs` (default
351
+ 3000 ms) and the action needs the takeover tier, it is refused with **`user_active`** and nothing is
352
+ clicked — no popup, no countdown. The upstream design asks the owner to consent by interrupting them;
353
+ an interrupt presented as consent is just a second disturbance. The escape hatch is explicit
354
+ (`forceUserActive:true`), it does not bypass any other gate, and the audit line records `forced:true` so
355
+ an interruption caused on purpose stays distinguishable from one caused by accident. An unattended run
356
+ is never blocked by this: with nobody typing, the age grows past the window and the call goes through.
357
+
358
+ ### The audit log
359
+
360
+ Every action appends one JSONL line to `%LOCALAPPDATA%\wpm\audit.log` — allow **and** deny, because a
361
+ trail that records only refusals documents the times the guard worked and is silent about the times it
362
+ had nothing to do with. Fields: `ts, action, hwnd, tier, policy, decision, code, userActiveAgeMs,
363
+ effect, latencyMs`, plus `target`/`args` for a launch and `op`/`format`/`chars` for a clipboard call.
364
+ What is deliberately absent is content: no typed text, no clipboard payload — the second copy of a
365
+ secret is the one nobody protects. `auditKeep` (default 2000) bounds the file, pruning oldest-first when
366
+ a write pushes it past budget. An audit that cannot be written is reported (`auditNote=n write(s)
367
+ failed`) rather than swallowed: a log that looks complete and is not is worse than one that admits it
368
+ is missing lines. This is the only artifact that survives a call, and it is the one thing that can
369
+ answer "what did the agent do to this machine" after the fact.
370
+
281
371
  ## What it does not do
282
372
 
283
373
  - **No mouse injection.** `MOUSEEVENTF_*`, `mouse_event` and `keybd_event` are banned in every
@@ -314,9 +404,10 @@ degradation.
314
404
  ## Typed surface
315
405
 
316
406
  `types/index.d.ts` is written by hand, not emitted from an implementation. It covers the whole
317
- contract: the eight actions, every argument including the takeover fields, the image-space / label
318
- surface and 0.6.0's `caretPosition`, all fourteen refusal codes as a closed union, and `effect` as its
319
- own four-value union (`WpmEffect`) beside `WpmCaptureBackend` and `WpmFrameSource`.
407
+ contract: the eleven actions, every argument including the takeover fields, the image-space / label
408
+ surface, 0.6.0's `caretPosition` and 0.7.0's `target`/`op`/`format`/`forceUserActive`, all seventeen
409
+ refusal codes as a closed union, and `effect` as its own four-value union (`WpmEffect`) beside
410
+ `WpmCaptureBackend`, `WpmClipboardOp`, `WpmWindowOp`, `WpmPolicy` and `WpmFrameSource`.
320
411
 
321
412
  Its wiring is measured in both resolution modes a consumer can use, rather than assumed from the
322
413
  presence of a file:
@@ -351,6 +442,11 @@ when one is present, and the gate reports a named SKIP rather than a red when on
351
442
  | `snapshotMaxElements` | `300` | cap on elements per snapshot (1–5000); a tighter cap is a smaller frame for a deciding subagent |
352
443
  | `screenshotMaxWidth` | `0` | downscale captures to this width; `0` means no scaling and `scale=1` — a resized image is a different coordinate system, so it is never chosen silently |
353
444
  | `shotsKeep` | `10` | how many PNGs stay in `%LOCALAPPDATA%\wpm\shots`; older files are deleted after each capture |
445
+ | `policy` | `balanced` | the ceiling over all eleven actions: `readonly` < `quiet` < `balanced` < `full`. Above it a call is refused with `policy_denied`, whose next step is to raise THIS setting and not to retry. An unrecognizable value falls back to `balanced`, never to `full` |
446
+ | `policyIdleMs` | `3000` | how recently a physical input counts as "the owner is here". A takeover-tier call then refuses with `user_active` and opens no dialog; `0` disables the check |
447
+ | `appLaunchAllowed` | `false` | allow `action=launch` at all. Independent of `takeoverAllowed`: being allowed to move a pointer is not being allowed to start a program |
448
+ | `appLaunchAllow` | `[]` | the launch whitelist — exact names or absolute paths, matched case-insensitively and in full. Empty means nothing may launch even with the gate on; no wildcard, no prefix |
449
+ | `auditKeep` | `2000` | how many lines `%LOCALAPPDATA%\wpm\audit.log` holds before the oldest are pruned |
354
450
 
355
451
  ## What measurement established
356
452
 
@@ -439,6 +535,32 @@ unmeasured end-to-end and is stated as such in [docs/refusals.md](docs/refusals.
439
535
  exercised `replace:true` through the message door, which is why the fix ships with an arm that does
440
536
  (`test/readback-truth.mjs` A1). Found by running the import instead of trusting its name.
441
537
 
538
+ ### 0.7.0's measurements
539
+
540
+ - **A cold `Process.Start` has no window for over a second** — notepad: pid present,
541
+ `MainWindowHandle=0`, **1348 ms**, and the window only reachable by polling the pid. Hence
542
+ `waitMs`/`window-not-yet` rather than an hwnd claim at return time.
543
+ - **The STA clipboard works in the worker and is not instant** — text write+read identical, first call
544
+ **138 ms**; `SetDataObject`/`GetDataObject` for images (40×20 verified). `Clipboard.Flush()` does NOT
545
+ exist on Windows PowerShell 5.1's runtime (.NET Framework): the first version of this branch threw
546
+ "Clipboard does not contain a method named 'Flush'", which is a method present in the documentation
547
+ people read and absent from the platform the product targets. `SetDataObject($v, $true)` is the
548
+ supported way to make the data outlive the process.
549
+ - **`SW_RESTORE` activates.** Measured around a restore on a real notepad window:
550
+ `foregroundBefore=<other> foregroundAfter=<target>`. Reported as `foregroundTaken=true` on that call
551
+ instead of being attributed to something else; `move`/`resize`/`topmost` measured
552
+ `foregroundTaken=false` with `SWP_NOACTIVATE`.
553
+ - **The whitelist is only a whitelist if it is exact.** `notepad` against `notepad-helper.exe`: a
554
+ prefix or substring rule authorises the second one, so membership is a case-folded full-string test
555
+ and `test/plugin-test.mjs` asserts the refusal for an unlisted name while the gate is on.
556
+ - **The refusal vocabulary is unchanged in shape by `requiresTier`** — a rung comparison is arithmetic
557
+ over one ordered list, so the cost of an action's classification is one number, not one new code per
558
+ action. Three codes were added for the whole batch (`app_launch_denied`, `policy_denied`,
559
+ `user_active`), each naming a setting rather than a symptom.
560
+ - `Check-no-cursor-control` is still green with the same two whitelisted primitive uses and an
561
+ unchanged whitelist file list: adding `launch`/`window` did not open a door to `MOUSEEVENTF_*`,
562
+ `mouse_event` or `keybd_event`.
563
+
442
564
  ## Verifying the copy you actually installed
443
565
 
444
566
  Every test above imports the repository checkout, so a package that installs to the wrong place or ships
package/docs/refusals.md CHANGED
@@ -50,6 +50,9 @@ R2′ 把「拒绝」当成本产品的**正常结果**(`engine.ps1` 首段注
50
50
  | `stale_ref` | `engine.ps1`(`space:"image"` 的 `shotId` 不在本进程的截图表里;`label`+`snapId` 不是最新帧;宿主侧 `lib/index.js` 对 `space:"image"` 缺 `shotId` 做前置拒绝) | **引用过期**:这次调用指的是引擎上一代产物(一张已被保留策略删掉的截图,或一帧已被新快照取代的编号表)。编号只在印出它的那一帧里有意义 | 重新 `snapshot` / `screenshot` 拿新 id 再动作。**不要**把图像像素当屏幕像素直接用——那正是本码要挡的「看起来对」的位置错误 | **REAL** — `test/refusals-test.ps1` 执行 `click-stale-shot`:未发过的 `shotId` ⇒ 该码且不进探测 |
51
51
  | `restore_failed` | `engine.ps1`(表判 restore、OS 拒绝 SetForegroundWindow) | 所有者被留在了一个不是他选的窗口里 | 立刻上报;不要静默重试,也不要启动看门狗抢第三次 | **NOT-COVERED** — 需提权窗配合,属 task_52 |
52
52
  | `takeover_aborted` | `engine.ps1`(HUD 按钮/中断键/宿主取消,三路汇聚后置位) | 接管被**人**或**宿主**中止了。这不是故障,是 R3 承诺的能力:结果里仍带 `cursorRestored` 与 `injectedChars`,让读者知道做到哪一步 | 读 `injectedChars` 判断已写入多少;要接着做就**重新发起**一次动作(不会从断点续写)。不要把它当成失败来重试 | **REAL** — `test/takeover-test.ps1` 三臂(volatile 标志/latch 文件/长文本中途中断),每臂都断言光标回位 |
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
+ | `policy_denied` | `lib/index.js`(前 worker 闸)、`decide.ps1`(引擎侧二道) | 这个动作声明的最低档(`tools.json#requiresTier`)高于 `policy` 设置允许的天花板。十一个动作对一个旋钮:新增能力不需要新增开关 | 唯一正确的下一步是**改设置**(readonly &lt; quiet &lt; balanced &lt; full),而不是重试同一个调用;结果里已写出需要哪一档、当前允许到哪一档。拒绝时零 worker 请求、不弹 HUD | **REAL** — `policy-ceiling-readonly`(readonly 天花板 + quiet 需求)与 `policy-ceiling-takeover`(两个 launch 开关都满足、仍因天花板不足被拒 ⇒ 证明两条轴真的正交)|
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`(长文本中途中断臂) |
53
56
 
54
57
  ## 三个诚实的缺口(写在文档里,而不是留白)
55
58
 
package/dsh.plugin.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "id": "dsh-external/dsh-windows-parallel-mcp",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "main": "./lib/index.js",
5
- "description": "One tool, eight actions: drive a Windows window quietly by default, and read the target as a numbered element frame. 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 (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; and since 0.6.0 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 in every screenshot as captureBackend.",
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.",
6
6
  "engines": {
7
7
  "dsh": ">=0.1.7-0 <0.3.0-0"
8
8
  },