@midscene/computer 1.8.0 → 1.8.1-beta-20260513084557.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.
@@ -124,10 +124,20 @@ export declare interface ComputerDeviceOpt {
124
124
  xvfbResolution?: string;
125
125
  }
126
126
 
127
- declare type ComputerInitArgs = Pick<ComputerDeviceOpt, 'displayId' | 'headless'>;
127
+ /**
128
+ * Discriminated union describing the two ways `computer_*` tools can spawn an
129
+ * agent. `mode` is filled in by `initArgSpec.adapt` based on whether `host` is
130
+ * set, so callers (CLI/MCP/YAML) never have to provide it explicitly.
131
+ */
132
+ declare type ComputerInitArgs = ComputerLocalInitArgs | ComputerRDPInitArgs;
128
133
 
129
134
  export declare type ComputerInterface = ComputerDevice | RDPDevice;
130
135
 
136
+ /** Init args for the local desktop agent (macOS/Windows/Linux). */
137
+ declare type ComputerLocalInitArgs = {
138
+ mode: 'local';
139
+ } & Pick<ComputerDeviceOpt, 'displayId' | 'headless'>;
140
+
131
141
  /**
132
142
  * Computer-specific tools manager
133
143
  * Extends BaseMidsceneTools to provide desktop automation tools
@@ -143,6 +153,11 @@ export declare class ComputerMidsceneTools extends BaseMidsceneTools<ComputerAge
143
153
  protected preparePlatformTools(): ToolDefinition[];
144
154
  }
145
155
 
156
+ /** Init args for the RDP remote-desktop agent. */
157
+ declare type ComputerRDPInitArgs = {
158
+ mode: 'rdp';
159
+ } & RDPConnectionConfig;
160
+
146
161
  export declare function createDefaultRDPBackendClient(): RDPBackendClient;
147
162
 
148
163
  export declare interface DisplayInfo {
@@ -85,10 +85,20 @@ declare interface ComputerDeviceOpt {
85
85
  xvfbResolution?: string;
86
86
  }
87
87
 
88
- declare type ComputerInitArgs = Pick<ComputerDeviceOpt, 'displayId' | 'headless'>;
88
+ /**
89
+ * Discriminated union describing the two ways `computer_*` tools can spawn an
90
+ * agent. `mode` is filled in by `initArgSpec.adapt` based on whether `host` is
91
+ * set, so callers (CLI/MCP/YAML) never have to provide it explicitly.
92
+ */
93
+ declare type ComputerInitArgs = ComputerLocalInitArgs | ComputerRDPInitArgs;
89
94
 
90
95
  declare type ComputerInterface = ComputerDevice | RDPDevice;
91
96
 
97
+ /** Init args for the local desktop agent (macOS/Windows/Linux). */
98
+ declare type ComputerLocalInitArgs = {
99
+ mode: 'local';
100
+ } & Pick<ComputerDeviceOpt, 'displayId' | 'headless'>;
101
+
92
102
  /**
93
103
  * Computer MCP Server
94
104
  * Provides MCP tools for computer desktop automation
@@ -113,6 +123,11 @@ declare class ComputerMidsceneTools extends BaseMidsceneTools<ComputerAgent, Com
113
123
  protected preparePlatformTools(): ToolDefinition[];
114
124
  }
115
125
 
126
+ /** Init args for the RDP remote-desktop agent. */
127
+ declare type ComputerRDPInitArgs = {
128
+ mode: 'rdp';
129
+ } & RDPConnectionConfig;
130
+
116
131
  declare interface DisplayInfo {
117
132
  id: string;
118
133
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midscene/computer",
3
- "version": "1.8.0",
3
+ "version": "1.8.1-beta-20260513084557.0",
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/shared": "1.8.0",
42
- "@midscene/core": "1.8.0"
41
+ "@midscene/core": "1.8.1-beta-20260513084557.0",
42
+ "@midscene/shared": "1.8.1-beta-20260513084557.0"
43
43
  },
44
44
  "optionalDependencies": {
45
45
  "node-mac-permissions": "2.5.0"