@midscene/computer 1.8.1-beta-20260513084557.0 → 1.8.1
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 +325 -374
- package/dist/es/index.mjs +379 -385
- package/dist/es/mcp-server.mjs +325 -374
- package/dist/lib/cli.js +323 -372
- package/dist/lib/index.js +381 -384
- package/dist/lib/mcp-server.js +324 -373
- package/dist/types/index.d.ts +18 -4
- package/dist/types/mcp-server.d.ts +9 -4
- package/package.json +3 -3
package/dist/types/index.d.ts
CHANGED
|
@@ -3,11 +3,12 @@ import { Agent } from '@midscene/core/agent';
|
|
|
3
3
|
import { AgentOpt } from '@midscene/core/agent';
|
|
4
4
|
import { BaseMidsceneTools } from '@midscene/shared/mcp/base-tools';
|
|
5
5
|
import { ChildProcessWithoutNullStreams } from 'node:child_process';
|
|
6
|
-
import {
|
|
6
|
+
import { ComputerInputPrimitives } from '@midscene/core/device';
|
|
7
|
+
import type { DeviceAction } from '@midscene/core';
|
|
7
8
|
import { InitArgSpec } from '@midscene/shared/mcp/base-tools';
|
|
8
|
-
import { InterfaceType } from '@midscene/core';
|
|
9
|
+
import type { InterfaceType } from '@midscene/core';
|
|
9
10
|
import { overrideAIConfig } from '@midscene/shared/env';
|
|
10
|
-
import { Size } from '@midscene/core';
|
|
11
|
+
import type { Size } from '@midscene/core';
|
|
11
12
|
import { SpawnOptionsWithoutStdio } from 'node:child_process';
|
|
12
13
|
import type { ToolDefinition } from '@midscene/shared/mcp/types';
|
|
13
14
|
|
|
@@ -41,6 +42,15 @@ export declare function checkAccessibilityPermission(promptIfNeeded?: boolean):
|
|
|
41
42
|
*/
|
|
42
43
|
export declare function checkComputerEnvironment(): Promise<EnvironmentCheck>;
|
|
43
44
|
|
|
45
|
+
/**
|
|
46
|
+
* Check if macOS Screen Recording permission is granted (required for screencapture).
|
|
47
|
+
* Accessibility and Screen Recording are independent TCC permissions — granting
|
|
48
|
+
* one does not grant the other. On non-macOS platforms, always returns true.
|
|
49
|
+
*
|
|
50
|
+
* @param promptIfNeeded - If true, will trigger system prompt and open settings when permission is not granted (macOS only)
|
|
51
|
+
*/
|
|
52
|
+
export declare function checkScreenRecordingPermission(promptIfNeeded?: boolean): AccessibilityCheckResult;
|
|
53
|
+
|
|
44
54
|
/**
|
|
45
55
|
* Check if Xvfb is installed on the system
|
|
46
56
|
*/
|
|
@@ -67,6 +77,7 @@ export declare class ComputerDevice implements AbstractInterface {
|
|
|
67
77
|
*/
|
|
68
78
|
private useAppleScript;
|
|
69
79
|
uri?: string;
|
|
80
|
+
readonly inputPrimitives: ComputerInputPrimitives;
|
|
70
81
|
constructor(options?: ComputerDeviceOpt);
|
|
71
82
|
describe(): string;
|
|
72
83
|
/**
|
|
@@ -97,6 +108,9 @@ export declare class ComputerDevice implements AbstractInterface {
|
|
|
97
108
|
* which can swallow characters or convert them when a non-English IME is active.
|
|
98
109
|
*/
|
|
99
110
|
private smartTypeString;
|
|
111
|
+
private selectAllAndDelete;
|
|
112
|
+
private pressKeyboardShortcut;
|
|
113
|
+
private performScroll;
|
|
100
114
|
actionSpace(): DeviceAction<any>[];
|
|
101
115
|
destroy(): Promise<void>;
|
|
102
116
|
url(): Promise<string>;
|
|
@@ -267,6 +281,7 @@ export declare class RDPDevice implements AbstractInterface {
|
|
|
267
281
|
private destroyed;
|
|
268
282
|
private cursorPosition?;
|
|
269
283
|
uri?: string;
|
|
284
|
+
readonly inputPrimitives: ComputerInputPrimitives;
|
|
270
285
|
constructor(options: RDPDeviceOpt);
|
|
271
286
|
describe(): string;
|
|
272
287
|
connect(): Promise<void>;
|
|
@@ -276,7 +291,6 @@ export declare class RDPDevice implements AbstractInterface {
|
|
|
276
291
|
actionSpace(): DeviceAction<any>[];
|
|
277
292
|
private assertConnected;
|
|
278
293
|
private throwIfDestroyed;
|
|
279
|
-
private requireLocate;
|
|
280
294
|
private moveToElement;
|
|
281
295
|
private clearInput;
|
|
282
296
|
private edgeScrollDirection;
|
|
@@ -2,12 +2,13 @@ import { AbstractInterface } from '@midscene/core/device';
|
|
|
2
2
|
import { Agent } from '@midscene/core/agent';
|
|
3
3
|
import { BaseMCPServer } from '@midscene/shared/mcp';
|
|
4
4
|
import { BaseMidsceneTools } from '@midscene/shared/mcp/base-tools';
|
|
5
|
-
import {
|
|
5
|
+
import { ComputerInputPrimitives } from '@midscene/core/device';
|
|
6
|
+
import type { DeviceAction } from '@midscene/core';
|
|
6
7
|
import { InitArgSpec } from '@midscene/shared/mcp/base-tools';
|
|
7
|
-
import { InterfaceType } from '@midscene/core';
|
|
8
|
+
import type { InterfaceType } from '@midscene/core';
|
|
8
9
|
import { LaunchMCPServerOptions } from '@midscene/shared/mcp';
|
|
9
10
|
import { LaunchMCPServerResult } from '@midscene/shared/mcp';
|
|
10
|
-
import { Size } from '@midscene/core';
|
|
11
|
+
import type { Size } from '@midscene/core';
|
|
11
12
|
import { Tool } from '@midscene/shared/mcp';
|
|
12
13
|
import type { ToolDefinition } from '@midscene/shared/mcp/types';
|
|
13
14
|
|
|
@@ -28,6 +29,7 @@ declare class ComputerDevice implements AbstractInterface {
|
|
|
28
29
|
*/
|
|
29
30
|
private useAppleScript;
|
|
30
31
|
uri?: string;
|
|
32
|
+
readonly inputPrimitives: ComputerInputPrimitives;
|
|
31
33
|
constructor(options?: ComputerDeviceOpt);
|
|
32
34
|
describe(): string;
|
|
33
35
|
/**
|
|
@@ -58,6 +60,9 @@ declare class ComputerDevice implements AbstractInterface {
|
|
|
58
60
|
* which can swallow characters or convert them when a non-English IME is active.
|
|
59
61
|
*/
|
|
60
62
|
private smartTypeString;
|
|
63
|
+
private selectAllAndDelete;
|
|
64
|
+
private pressKeyboardShortcut;
|
|
65
|
+
private performScroll;
|
|
61
66
|
actionSpace(): DeviceAction<any>[];
|
|
62
67
|
destroy(): Promise<void>;
|
|
63
68
|
url(): Promise<string>;
|
|
@@ -192,6 +197,7 @@ declare class RDPDevice implements AbstractInterface {
|
|
|
192
197
|
private destroyed;
|
|
193
198
|
private cursorPosition?;
|
|
194
199
|
uri?: string;
|
|
200
|
+
readonly inputPrimitives: ComputerInputPrimitives;
|
|
195
201
|
constructor(options: RDPDeviceOpt);
|
|
196
202
|
describe(): string;
|
|
197
203
|
connect(): Promise<void>;
|
|
@@ -201,7 +207,6 @@ declare class RDPDevice implements AbstractInterface {
|
|
|
201
207
|
actionSpace(): DeviceAction<any>[];
|
|
202
208
|
private assertConnected;
|
|
203
209
|
private throwIfDestroyed;
|
|
204
|
-
private requireLocate;
|
|
205
210
|
private moveToElement;
|
|
206
211
|
private clearInput;
|
|
207
212
|
private edgeScrollDirection;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midscene/computer",
|
|
3
|
-
"version": "1.8.1
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"description": "Midscene.js Computer Desktop Automation",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"@computer-use/libnut": "^4.2.0",
|
|
39
39
|
"clipboardy": "^4.0.0",
|
|
40
40
|
"screenshot-desktop": "^1.15.3",
|
|
41
|
-
"@midscene/core": "1.8.1
|
|
42
|
-
"@midscene/shared": "1.8.1
|
|
41
|
+
"@midscene/core": "1.8.1",
|
|
42
|
+
"@midscene/shared": "1.8.1"
|
|
43
43
|
},
|
|
44
44
|
"optionalDependencies": {
|
|
45
45
|
"node-mac-permissions": "2.5.0"
|