@midscene/computer 1.12.2-beta-20260828072235.0 → 1.12.2
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/dist/es/cli.mjs +152 -283
- package/dist/es/index.mjs +149 -282
- package/dist/lib/cli.js +152 -283
- package/dist/lib/index.js +149 -282
- package/dist/types/index.d.ts +20 -6
- package/package.json +3 -3
package/dist/types/index.d.ts
CHANGED
|
@@ -73,7 +73,7 @@ export declare class ComputerDevice implements AbstractInterface {
|
|
|
73
73
|
private destroyed;
|
|
74
74
|
private xvfbInstance?;
|
|
75
75
|
private xvfbCleanup?;
|
|
76
|
-
private
|
|
76
|
+
private xvfbSignalCleanup?;
|
|
77
77
|
private readonly inputDriver;
|
|
78
78
|
/**
|
|
79
79
|
* On macOS, use AppleScript for keyboard operations by default
|
|
@@ -85,8 +85,6 @@ export declare class ComputerDevice implements AbstractInterface {
|
|
|
85
85
|
uri?: string;
|
|
86
86
|
readonly inputPrimitives: ComputerInputPrimitives;
|
|
87
87
|
constructor(options?: ComputerDeviceOpt);
|
|
88
|
-
private moveGlobalPointer;
|
|
89
|
-
private moveDisplayPointer;
|
|
90
88
|
private focusKeyboardTarget;
|
|
91
89
|
describe(): string;
|
|
92
90
|
/**
|
|
@@ -117,9 +115,10 @@ export declare class ComputerDevice implements AbstractInterface {
|
|
|
117
115
|
* the exact .NET-compiler dependency this PR removes by dropping
|
|
118
116
|
* screenshot-desktop's polyglot .bat — so it is intentionally avoided here.
|
|
119
117
|
* As a result, captures on a scaled display come back at logical (scaled)
|
|
120
|
-
* resolution.
|
|
121
|
-
*
|
|
122
|
-
*
|
|
118
|
+
* resolution. That is sufficient for the #2150 fix (the health check only
|
|
119
|
+
* needs a successful capture). Per-monitor DPI / coordinate accuracy is a
|
|
120
|
+
* separate Windows concern to be addressed in a follow-up with real-device
|
|
121
|
+
* verification.
|
|
123
122
|
*/
|
|
124
123
|
private screenshotViaPowershell;
|
|
125
124
|
size(): Promise<Size>;
|
|
@@ -182,6 +181,14 @@ export declare interface ComputerDeviceOpt extends ComputerDeviceInputOpt {
|
|
|
182
181
|
* Resolution for Xvfb virtual display (default '1920x1080x24')
|
|
183
182
|
*/
|
|
184
183
|
xvfbResolution?: string;
|
|
184
|
+
/**
|
|
185
|
+
* Keep a managed Xvfb server alive until process exit.
|
|
186
|
+
*
|
|
187
|
+
* @internal The foreground CLI uses this because libnut keeps a process-wide
|
|
188
|
+
* X11 connection open. Stopping Xvfb during normal CLI teardown would make
|
|
189
|
+
* Xlib terminate an otherwise successful command with exit code 1.
|
|
190
|
+
*/
|
|
191
|
+
keepXvfbAliveUntilProcessExit?: boolean;
|
|
185
192
|
}
|
|
186
193
|
|
|
187
194
|
/**
|
|
@@ -203,7 +210,9 @@ declare type ComputerLocalInitArgs = {
|
|
|
203
210
|
* Extends BaseMidsceneTools to provide desktop automation tools
|
|
204
211
|
*/
|
|
205
212
|
export declare class ComputerMidsceneTools extends BaseMidsceneTools<ComputerAgent, ComputerInitArgs> {
|
|
213
|
+
private readonly options;
|
|
206
214
|
private lastInitArgsSignature?;
|
|
215
|
+
constructor(options?: ComputerMidsceneToolsOptions);
|
|
207
216
|
protected getCliReportSessionName(): string;
|
|
208
217
|
protected readonly initArgSpec: InitArgSpec<ComputerInitArgs>;
|
|
209
218
|
protected createTemporaryDevice(): ComputerDevice;
|
|
@@ -214,6 +223,11 @@ export declare class ComputerMidsceneTools extends BaseMidsceneTools<ComputerAge
|
|
|
214
223
|
protected preparePlatformTools(): ToolDefinition[];
|
|
215
224
|
}
|
|
216
225
|
|
|
226
|
+
declare interface ComputerMidsceneToolsOptions {
|
|
227
|
+
/** Keep CLI-owned Xvfb alive until process exit so Xlib clients stay valid. */
|
|
228
|
+
keepXvfbAliveUntilProcessExit?: boolean;
|
|
229
|
+
}
|
|
230
|
+
|
|
217
231
|
/** Init args for the RDP remote-desktop agent. */
|
|
218
232
|
declare type ComputerRDPInitArgs = {
|
|
219
233
|
mode: 'rdp';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midscene/computer",
|
|
3
|
-
"version": "1.12.2
|
|
3
|
+
"version": "1.12.2",
|
|
4
4
|
"description": "Midscene.js Computer Desktop Automation",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"@computer-use/libnut": "^4.2.0",
|
|
34
34
|
"clipboardy": "^4.0.0",
|
|
35
35
|
"screenshot-desktop": "^1.15.3",
|
|
36
|
-
"@midscene/core": "1.12.2
|
|
37
|
-
"@midscene/shared": "1.12.2
|
|
36
|
+
"@midscene/core": "1.12.2",
|
|
37
|
+
"@midscene/shared": "1.12.2"
|
|
38
38
|
},
|
|
39
39
|
"optionalDependencies": {
|
|
40
40
|
"node-mac-permissions": "2.5.0"
|