dsh-windows-parallel-mcp 0.5.0 → 0.6.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/CHANGELOG.de.md +7 -1
- package/CHANGELOG.es.md +7 -1
- package/CHANGELOG.fr.md +7 -1
- package/CHANGELOG.it.md +7 -1
- package/CHANGELOG.ja.md +6 -0
- package/CHANGELOG.ko.md +6 -0
- package/CHANGELOG.md +82 -3
- package/CHANGELOG.pt.md +7 -1
- package/CHANGELOG.ru.md +7 -1
- package/CHANGELOG.zh.md +6 -0
- package/README.de.md +94 -5
- package/README.es.md +94 -5
- package/README.fr.md +94 -5
- package/README.it.md +94 -5
- package/README.ja.md +94 -5
- package/README.ko.md +94 -5
- package/README.md +94 -5
- package/README.pt.md +94 -5
- package/README.ru.md +94 -5
- package/README.zh.md +94 -5
- package/dsh.plugin.json +2 -2
- package/lib/host-tools.js +15 -0
- package/lib/index.js +25 -6
- package/package.json +2 -2
- package/src/engine/engine.ps1 +159 -4
- package/src/engine/win.ps1 +230 -6
- package/src/engine/worker.ps1 +5 -0
- package/src/schema/tools.json +3 -1
- package/types/index.d.ts +29 -2
package/src/schema/tools.json
CHANGED
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"name": "wpm_type",
|
|
99
99
|
"action": "type",
|
|
100
100
|
"engine": "Invoke-WpmAction -Action type",
|
|
101
|
-
"description": "Write text into the named window: either the first editable classic child (quiet tier) or a UIA element named by the caller (bounded-flash tier). No keystrokes are synthesized; the text is delivered through the window message or the pattern itself.",
|
|
101
|
+
"description": "Write text into the named window: either the first editable classic child (quiet tier) or a UIA element named by the caller (bounded-flash tier). No keystrokes are synthesized; the text is delivered through the window message or the pattern itself. WHAT HAPPENS AFTER THE WRITE IS READ BACK: the engine reads the control's value again (WM_GETTEXT on the message door, ValuePattern/LegacyIAccessible Current.Value on UIA) and only reports effect=readback-verified when the value it read equals the value predicted from what the control itself reported. A field that does not expose its text yields readback=unavailable and no upgrade; a value that came back different yields readbackMismatch=true while the effect stays what the write earned -- the application may legitimately reformat input, so a mismatch is data, not a refusal.",
|
|
102
102
|
"inputSchema": {
|
|
103
103
|
"type": "object",
|
|
104
104
|
"properties": {
|
|
@@ -108,6 +108,7 @@
|
|
|
108
108
|
"label": { "type": "integer", "minimum": 1, "description": "Element number from wpm_snapshot: write into that element through its UIA pattern. A faster, unambiguous alternative to elementName on a tree you have already read." },
|
|
109
109
|
"snapId": { "type": "string", "description": "The snapId the label came from; a superseded snapId is refused with stale_ref." },
|
|
110
110
|
"replace": { "type": "boolean", "default": false, "description": "Replace the existing value instead of appending to it." },
|
|
111
|
+
"caretPosition": { "type": "string", "enum": ["idle", "start", "end"], "default": "idle", "description": "Message door only: where the caret should be before the characters are sent. 'idle' touches nothing (the caret is wherever the control left it, which for a never-focused field is position 0 -- measured). 'start' is EM_SETSEL(0,0); 'end' is EM_SETSEL(len,len) with len read from the control, because EM_SETSEL(-1,-1) is documented as document-end and measured as no-op on WinForms EDIT. On a value containing newlines the numeric end can land inside the buffer, so the result reports the requested and the applied pair and the readback judges. The UIA value channel replaces the whole value and has no caret to move: it answers caretIgnored=value-pattern instead of pretending." },
|
|
111
112
|
"settleMs": { "type": "integer", "minimum": 0, "maximum": 2000, "default": 350, "description": "How long to let the app commit its state before the effect is judged." },
|
|
112
113
|
"takeover": { "type": "boolean", "default": false, "description": "Take the takeover tier: the HUD is shown, the focus is held until the action ends, and (with keyInput) text may be typed into the foreground target." },
|
|
113
114
|
"takeoverMaxMs": { "type": "integer", "minimum": 500, "maximum": 60000, "default": 10000, "description": "Takeover only: how long the action may hold the cursor/focus." },
|
|
@@ -116,6 +117,7 @@
|
|
|
116
117
|
"required": ["hwnd", "text"],
|
|
117
118
|
"additionalProperties": false
|
|
118
119
|
},
|
|
120
|
+
"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.",
|
|
119
121
|
"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"]
|
|
120
122
|
},
|
|
121
123
|
{
|
package/types/index.d.ts
CHANGED
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
// Type declarations for dsh-windows-parallel-mcp (public API surface).
|
|
2
|
-
// Mirrors lib/index.js + lib/host-tools.js + src/schema/tools.json (v0.
|
|
2
|
+
// Mirrors lib/index.js + lib/host-tools.js + src/schema/tools.json (v0.6.0).
|
|
3
3
|
|
|
4
4
|
export type WpmAction =
|
|
5
5
|
| 'windows' | 'click' | 'type' | 'focus' | 'status'
|
|
6
6
|
| 'snapshot' | 'screenshot' | 'preview';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* WHO REPORTED THE SUCCESS. The first three name a messenger, not a degree of confidence (see the
|
|
10
|
+
* `effect` block in lib/index.js). `readback-verified` is the fourth and the only one that is about the
|
|
11
|
+
* application rather than about the call: the value was read back after the settle window and equals
|
|
12
|
+
* what the control's own measurements predicted. A masked field never reaches it (readback=unavailable)
|
|
13
|
+
* and a reformatted value never reaches it (readbackMismatch=true) -- the engine does not upgrade on
|
|
14
|
+
* "the call came back".
|
|
15
|
+
*/
|
|
16
|
+
export type WpmEffect =
|
|
17
|
+
| 'unverified' | 'reported-by-send' | 'reported-by-pattern' | 'readback-verified';
|
|
18
|
+
|
|
19
|
+
/** Where the caret sits before the message door types. `idle` touches nothing. */
|
|
20
|
+
export type WpmCaretPosition = 'idle' | 'start' | 'end';
|
|
21
|
+
|
|
8
22
|
export type RefusalCode =
|
|
9
23
|
| 'no_hwnd' | 'paused' | 'elevated_target' | 'unreachable'
|
|
10
24
|
| 'uia_tree_empty' | 'uia_probe_failed' | 'terminal_no_door' | 'needs_facts'
|
|
@@ -19,6 +33,15 @@ export type WpmPointSpace = 'screen' | 'image';
|
|
|
19
33
|
/** Frame source of a captured screenRect. `dwm` is the DWM extended frame; `win32` is the fallback. */
|
|
20
34
|
export type WpmFrameSource = 'dwm' | 'win32';
|
|
21
35
|
|
|
36
|
+
/**
|
|
37
|
+
* WHICH CAPTURE PATH produced a screenshot. `bitblt` is the cheap GDI path (measured 16-21ms against
|
|
38
|
+
* 22-33ms for the other); `gdiplus` is `Graphics.CopyFromScreen`, either the explicit choice or the
|
|
39
|
+
* fallback after BitBlt was refused. The two are measured equivalent on a still scene, but they are not
|
|
40
|
+
* the same call and the field is never omitted -- a path that changed silently is the failure mode this
|
|
41
|
+
* repo has already been caught by once with `frame`.
|
|
42
|
+
*/
|
|
43
|
+
export type WpmCaptureBackend = 'bitblt' | 'gdiplus';
|
|
44
|
+
|
|
22
45
|
export interface WpmWindow {
|
|
23
46
|
hwnd: string; title: string; class: string; pid: number;
|
|
24
47
|
rect: { left: number; top: number; right: number; bottom: number };
|
|
@@ -44,6 +67,7 @@ export interface WpmShot {
|
|
|
44
67
|
scale: number;
|
|
45
68
|
identity: boolean;
|
|
46
69
|
frame: WpmFrameSource;
|
|
70
|
+
captureBackend?: WpmCaptureBackend;
|
|
47
71
|
dpiAware: boolean;
|
|
48
72
|
}
|
|
49
73
|
|
|
@@ -55,6 +79,7 @@ export interface WpmArgs {
|
|
|
55
79
|
text?: string;
|
|
56
80
|
elementName?: string;
|
|
57
81
|
replace?: boolean;
|
|
82
|
+
caretPosition?: WpmCaretPosition;
|
|
58
83
|
settleMs?: number;
|
|
59
84
|
takeover?: boolean;
|
|
60
85
|
takeoverMaxMs?: number;
|
|
@@ -77,7 +102,7 @@ export interface WpmResult {
|
|
|
77
102
|
refusal?: RefusalCode;
|
|
78
103
|
channel?: string;
|
|
79
104
|
tier?: string;
|
|
80
|
-
effect?:
|
|
105
|
+
effect?: WpmEffect;
|
|
81
106
|
proof?: 'pass' | 'fail' | 'inconclusive';
|
|
82
107
|
focusTaken?: boolean;
|
|
83
108
|
takeover?: 'on' | 'off';
|
|
@@ -102,6 +127,8 @@ export interface WpmResult {
|
|
|
102
127
|
scale?: number;
|
|
103
128
|
identity?: boolean;
|
|
104
129
|
frame?: WpmFrameSource;
|
|
130
|
+
captureBackend?: WpmCaptureBackend;
|
|
131
|
+
captureNote?: string;
|
|
105
132
|
dpiAware?: boolean;
|
|
106
133
|
// ---- preview ----
|
|
107
134
|
preview?: { x: number; y: number; name: string; controlType: string; automationId: string };
|