wuying-agentbay-sdk 0.7.0 → 0.9.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.
@@ -0,0 +1,612 @@
1
+
2
+ import { createRequire } from 'module';
3
+ const require = createRequire(import.meta.url);
4
+ (function() {
5
+ if (typeof OpenApi !== 'undefined' && !OpenApi.default) {
6
+ OpenApi.default = OpenApi;
7
+ }
8
+ })();
9
+
10
+ var __create = Object.create;
11
+ var __defProp = Object.defineProperty;
12
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
13
+ var __getOwnPropNames = Object.getOwnPropertyNames;
14
+ var __getProtoOf = Object.getPrototypeOf;
15
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
16
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
17
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
18
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
19
+ }) : x)(function(x) {
20
+ if (typeof require !== "undefined") return require.apply(this, arguments);
21
+ throw Error('Dynamic require of "' + x + '" is not supported');
22
+ });
23
+ var __esm = (fn, res) => function __init() {
24
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
25
+ };
26
+ var __commonJS = (cb, mod) => function __require2() {
27
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
28
+ };
29
+ var __copyProps = (to, from, except, desc) => {
30
+ if (from && typeof from === "object" || typeof from === "function") {
31
+ for (let key of __getOwnPropNames(from))
32
+ if (!__hasOwnProp.call(to, key) && key !== except)
33
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
34
+ }
35
+ return to;
36
+ };
37
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
38
+ // If the importer is in node compatibility mode or this is not an ESM
39
+ // file that has been converted to a CommonJS file using a Babel-
40
+ // compatible transform (i.e. "__esModule" has not been set), then set
41
+ // "default" to the CommonJS "module.exports" for node compatibility.
42
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
43
+ mod
44
+ ));
45
+
46
+ // node_modules/tsup/assets/esm_shims.js
47
+ import path from "path";
48
+ import { fileURLToPath } from "url";
49
+ var init_esm_shims = __esm({
50
+ "node_modules/tsup/assets/esm_shims.js"() {
51
+ "use strict";
52
+ }
53
+ });
54
+
55
+ // src/window/window.ts
56
+ init_esm_shims();
57
+ var _WindowManager = class _WindowManager {
58
+ /**
59
+ * Creates a new WindowManager instance.
60
+ * @param session The session object that provides access to the AgentBay API.
61
+ */
62
+ constructor(session) {
63
+ this.session = session;
64
+ }
65
+ /**
66
+ * Helper method to parse JSON string into Window objects
67
+ * @param jsonStr - JSON string to parse
68
+ * @returns Array of Window objects or single Window object
69
+ */
70
+ parseWindowsFromJSON(jsonStr) {
71
+ try {
72
+ const parsed = JSON.parse(jsonStr);
73
+ return Array.isArray(parsed) ? parsed : [parsed];
74
+ } catch (error) {
75
+ throw new Error(`Failed to parse window data: ${error}`);
76
+ }
77
+ }
78
+ /**
79
+ * Lists all root windows in the system.
80
+ * Corresponds to Python's list_root_windows() method
81
+ *
82
+ * @param timeoutMs - The timeout in milliseconds. Default is 3000ms.
83
+ * @returns WindowListResult with windows array and requestId
84
+ *
85
+ * @deprecated Use session.computer.listRootWindows() instead.
86
+ */
87
+ async listRootWindows(timeoutMs = 3e3) {
88
+ console.warn("\u26A0\uFE0F WindowManager.listRootWindows() is deprecated. Use session.computer.listRootWindows() instead.");
89
+ try {
90
+ const args = {
91
+ timeout_ms: timeoutMs
92
+ };
93
+ const response = await this.session.callMcpTool(
94
+ "list_root_windows",
95
+ args
96
+ );
97
+ if (!response.success) {
98
+ return {
99
+ requestId: response.requestId,
100
+ success: false,
101
+ windows: [],
102
+ errorMessage: response.errorMessage
103
+ };
104
+ }
105
+ const windows = response.data ? this.parseWindowsFromJSON(response.data) : [];
106
+ return {
107
+ requestId: response.requestId,
108
+ success: true,
109
+ windows
110
+ };
111
+ } catch (error) {
112
+ return {
113
+ requestId: "",
114
+ success: false,
115
+ windows: [],
116
+ errorMessage: `Failed to list root windows: ${error}`
117
+ };
118
+ }
119
+ }
120
+ /**
121
+ * Lists all windows in the system.
122
+ * Corresponds to Python's list_all_windows() method
123
+ *
124
+ * @param timeoutMs - The timeout in milliseconds. Default is 3000ms.
125
+ * @returns WindowListResult with windows array and requestId
126
+ *
127
+ * @deprecated Use session.computer.listAllWindows() instead.
128
+ */
129
+ async listAllWindows(timeoutMs = 3e3) {
130
+ console.warn("\u26A0\uFE0F WindowManager.listAllWindows() is deprecated. Use session.computer.listAllWindows() instead.");
131
+ try {
132
+ const args = {
133
+ timeout_ms: timeoutMs
134
+ };
135
+ const response = await this.session.callMcpTool(
136
+ "list_all_windows",
137
+ args
138
+ );
139
+ if (!response.success) {
140
+ return {
141
+ requestId: response.requestId,
142
+ success: false,
143
+ windows: [],
144
+ errorMessage: response.errorMessage
145
+ };
146
+ }
147
+ const windows = response.data ? this.parseWindowsFromJSON(response.data) : [];
148
+ return {
149
+ requestId: response.requestId,
150
+ success: true,
151
+ windows
152
+ };
153
+ } catch (error) {
154
+ return {
155
+ requestId: "",
156
+ success: false,
157
+ windows: [],
158
+ errorMessage: `Failed to list all windows: ${error}`
159
+ };
160
+ }
161
+ }
162
+ /**
163
+ * Gets information about a specific window.
164
+ * Corresponds to Python's get_window_info() method
165
+ *
166
+ * @param windowId - The ID of the window to get information for.
167
+ * @returns WindowInfoResult with window information and requestId
168
+ *
169
+ * @deprecated Use session.computer.getWindowInfo() instead.
170
+ */
171
+ async getWindowInfo(windowId) {
172
+ console.warn("\u26A0\uFE0F WindowManager.getWindowInfo() is deprecated. Use session.computer.getWindowInfo() instead.");
173
+ try {
174
+ const args = {
175
+ window_id: windowId
176
+ };
177
+ const response = await this.session.callMcpTool(
178
+ "get_window_info",
179
+ args
180
+ );
181
+ if (!response.success) {
182
+ return {
183
+ requestId: response.requestId,
184
+ success: false,
185
+ errorMessage: response.errorMessage
186
+ };
187
+ }
188
+ let window = void 0;
189
+ if (response.data) {
190
+ const windows = this.parseWindowsFromJSON(response.data);
191
+ window = windows.length > 0 ? windows[0] : void 0;
192
+ }
193
+ return {
194
+ requestId: response.requestId,
195
+ success: true,
196
+ window
197
+ };
198
+ } catch (error) {
199
+ return {
200
+ requestId: "",
201
+ success: false,
202
+ errorMessage: `Failed to get window info: ${error}`
203
+ };
204
+ }
205
+ }
206
+ /**
207
+ * Activates a window by bringing it to the foreground.
208
+ * Corresponds to Python's activate_window() method
209
+ *
210
+ * @param windowId - The ID of the window to activate.
211
+ * @returns BoolResult with success status and requestId
212
+ *
213
+ * @deprecated Use session.computer.activateWindow() instead.
214
+ */
215
+ async activateWindow(windowId) {
216
+ console.warn("\u26A0\uFE0F WindowManager.activateWindow() is deprecated. Use session.computer.activateWindow() instead.");
217
+ try {
218
+ const args = {
219
+ window_id: windowId
220
+ };
221
+ const response = await this.session.callMcpTool(
222
+ "activate_window",
223
+ args
224
+ );
225
+ if (!response.success) {
226
+ return {
227
+ requestId: response.requestId,
228
+ success: false,
229
+ errorMessage: response.errorMessage
230
+ };
231
+ }
232
+ return {
233
+ requestId: response.requestId,
234
+ success: true,
235
+ data: true
236
+ };
237
+ } catch (error) {
238
+ return {
239
+ requestId: "",
240
+ success: false,
241
+ errorMessage: `Failed to activate window: ${error}`
242
+ };
243
+ }
244
+ }
245
+ /**
246
+ * Maximizes a window.
247
+ * Corresponds to Python's maximize_window() method
248
+ *
249
+ * @param windowId - The ID of the window to maximize.
250
+ * @returns BoolResult with success status and requestId
251
+ *
252
+ * @deprecated Use session.computer.maximizeWindow() instead.
253
+ */
254
+ async maximizeWindow(windowId) {
255
+ console.warn("\u26A0\uFE0F WindowManager.maximizeWindow() is deprecated. Use session.computer.maximizeWindow() instead.");
256
+ try {
257
+ const args = {
258
+ window_id: windowId
259
+ };
260
+ const response = await this.session.callMcpTool(
261
+ "maximize_window",
262
+ args
263
+ );
264
+ if (!response.success) {
265
+ return {
266
+ requestId: response.requestId,
267
+ success: false,
268
+ errorMessage: response.errorMessage
269
+ };
270
+ }
271
+ return {
272
+ requestId: response.requestId,
273
+ success: true,
274
+ data: true
275
+ };
276
+ } catch (error) {
277
+ return {
278
+ requestId: "",
279
+ success: false,
280
+ errorMessage: `Failed to maximize window: ${error}`
281
+ };
282
+ }
283
+ }
284
+ /**
285
+ * Minimizes a window.
286
+ * Corresponds to Python's minimize_window() method
287
+ *
288
+ * @param windowId - The ID of the window to minimize.
289
+ * @returns BoolResult with success status and requestId
290
+ *
291
+ * @deprecated Use session.computer.minimizeWindow() instead.
292
+ */
293
+ async minimizeWindow(windowId) {
294
+ console.warn("\u26A0\uFE0F WindowManager.minimizeWindow() is deprecated. Use session.computer.minimizeWindow() instead.");
295
+ try {
296
+ const args = {
297
+ window_id: windowId
298
+ };
299
+ const response = await this.session.callMcpTool(
300
+ "minimize_window",
301
+ args
302
+ );
303
+ if (!response.success) {
304
+ return {
305
+ requestId: response.requestId,
306
+ success: false,
307
+ errorMessage: response.errorMessage
308
+ };
309
+ }
310
+ return {
311
+ requestId: response.requestId,
312
+ success: true,
313
+ data: true
314
+ };
315
+ } catch (error) {
316
+ return {
317
+ requestId: "",
318
+ success: false,
319
+ errorMessage: `Failed to minimize window: ${error}`
320
+ };
321
+ }
322
+ }
323
+ /**
324
+ * Restores a window by ID.
325
+ * Corresponds to Python's restore_window() method
326
+ *
327
+ * @param windowId The ID of the window to restore.
328
+ * @returns BoolResult with requestId
329
+ */
330
+ async restoreWindow(windowId) {
331
+ try {
332
+ const args = {
333
+ window_id: windowId
334
+ };
335
+ const response = await this.session.callMcpTool(
336
+ "restore_window",
337
+ args
338
+ );
339
+ if (!response.success) {
340
+ return {
341
+ requestId: response.requestId,
342
+ success: false,
343
+ errorMessage: response.errorMessage
344
+ };
345
+ }
346
+ return {
347
+ requestId: response.requestId,
348
+ success: true,
349
+ data: true
350
+ };
351
+ } catch (error) {
352
+ return {
353
+ requestId: "",
354
+ success: false,
355
+ errorMessage: `Failed to restore window: ${error}`
356
+ };
357
+ }
358
+ }
359
+ /**
360
+ * Closes a window.
361
+ * Corresponds to Python's close_window() method
362
+ *
363
+ * @param windowId - The ID of the window to close.
364
+ * @returns BoolResult with success status and requestId
365
+ *
366
+ * @deprecated Use session.computer.closeWindow() instead.
367
+ */
368
+ async closeWindow(windowId) {
369
+ console.warn("\u26A0\uFE0F WindowManager.closeWindow() is deprecated. Use session.computer.closeWindow() instead.");
370
+ try {
371
+ const args = {
372
+ window_id: windowId
373
+ };
374
+ const response = await this.session.callMcpTool(
375
+ "close_window",
376
+ args
377
+ );
378
+ if (!response.success) {
379
+ return {
380
+ requestId: response.requestId,
381
+ success: false,
382
+ errorMessage: response.errorMessage
383
+ };
384
+ }
385
+ return {
386
+ requestId: response.requestId,
387
+ success: true,
388
+ data: true
389
+ };
390
+ } catch (error) {
391
+ return {
392
+ requestId: "",
393
+ success: false,
394
+ errorMessage: `Failed to close window: ${error}`
395
+ };
396
+ }
397
+ }
398
+ /**
399
+ * Sets a window to fullscreen by ID.
400
+ * Corresponds to Python's fullscreen_window() method
401
+ *
402
+ * @param windowId The ID of the window to set to fullscreen.
403
+ * @returns BoolResult with requestId
404
+ */
405
+ async fullscreenWindow(windowId) {
406
+ try {
407
+ const args = {
408
+ window_id: windowId
409
+ };
410
+ const response = await this.session.callMcpTool(
411
+ "fullscreen_window",
412
+ args
413
+ );
414
+ if (!response.success) {
415
+ return {
416
+ requestId: response.requestId,
417
+ success: false,
418
+ errorMessage: response.errorMessage
419
+ };
420
+ }
421
+ return {
422
+ requestId: response.requestId,
423
+ success: true,
424
+ data: true
425
+ };
426
+ } catch (error) {
427
+ return {
428
+ requestId: "",
429
+ success: false,
430
+ errorMessage: `Failed to make window fullscreen: ${error}`
431
+ };
432
+ }
433
+ }
434
+ /**
435
+ * Resizes a window to the specified dimensions.
436
+ * Corresponds to Python's resize_window() method
437
+ *
438
+ * @param windowId - The ID of the window to resize.
439
+ * @param width - The new width of the window.
440
+ * @param height - The new height of the window.
441
+ * @returns BoolResult with success status and requestId
442
+ *
443
+ * @deprecated Use session.computer.resizeWindow() instead.
444
+ */
445
+ async resizeWindow(windowId, width, height) {
446
+ console.warn("\u26A0\uFE0F WindowManager.resizeWindow() is deprecated. Use session.computer.resizeWindow() instead.");
447
+ try {
448
+ const args = {
449
+ window_id: windowId,
450
+ width,
451
+ height
452
+ };
453
+ const response = await this.session.callMcpTool(
454
+ "resize_window",
455
+ args
456
+ );
457
+ if (!response.success) {
458
+ return {
459
+ requestId: response.requestId,
460
+ success: false,
461
+ errorMessage: response.errorMessage
462
+ };
463
+ }
464
+ return {
465
+ requestId: response.requestId,
466
+ success: true,
467
+ data: true
468
+ };
469
+ } catch (error) {
470
+ return {
471
+ requestId: "",
472
+ success: false,
473
+ errorMessage: `Failed to resize window: ${error}`
474
+ };
475
+ }
476
+ }
477
+ /**
478
+ * Moves a window to the specified position.
479
+ * Corresponds to Python's move_window() method
480
+ *
481
+ * @param windowId - The ID of the window to move.
482
+ * @param x - The new x coordinate of the window.
483
+ * @param y - The new y coordinate of the window.
484
+ * @returns BoolResult with success status and requestId
485
+ *
486
+ * @deprecated Use session.computer.moveWindow() instead.
487
+ */
488
+ async moveWindow(windowId, x, y) {
489
+ console.warn("\u26A0\uFE0F WindowManager.moveWindow() is deprecated. Use session.computer.moveWindow() instead.");
490
+ try {
491
+ const args = {
492
+ window_id: windowId,
493
+ x,
494
+ y
495
+ };
496
+ const response = await this.session.callMcpTool(
497
+ "move_window",
498
+ args
499
+ );
500
+ if (!response.success) {
501
+ return {
502
+ requestId: response.requestId,
503
+ success: false,
504
+ errorMessage: response.errorMessage
505
+ };
506
+ }
507
+ return {
508
+ requestId: response.requestId,
509
+ success: true,
510
+ data: true
511
+ };
512
+ } catch (error) {
513
+ return {
514
+ requestId: "",
515
+ success: false,
516
+ errorMessage: `Failed to move window: ${error}`
517
+ };
518
+ }
519
+ }
520
+ /**
521
+ * Enables or disables focus mode.
522
+ * Corresponds to Python's focus_mode() method
523
+ *
524
+ * @param on Whether to enable focus mode.
525
+ * @returns BoolResult with requestId
526
+ */
527
+ async focusMode(on) {
528
+ try {
529
+ const args = {
530
+ on
531
+ };
532
+ const response = await this.session.callMcpTool(
533
+ "focus_mode",
534
+ args
535
+ );
536
+ if (!response.success) {
537
+ return {
538
+ requestId: response.requestId,
539
+ success: false,
540
+ errorMessage: response.errorMessage
541
+ };
542
+ }
543
+ return {
544
+ requestId: response.requestId,
545
+ success: true,
546
+ data: true
547
+ };
548
+ } catch (error) {
549
+ return {
550
+ requestId: "",
551
+ success: false,
552
+ errorMessage: `Failed to toggle focus mode: ${error}`
553
+ };
554
+ }
555
+ }
556
+ /**
557
+ * Gets the currently active window.
558
+ * Corresponds to Python's get_active_window() method
559
+ *
560
+ * @param timeoutMs - The timeout in milliseconds. Default is 3000ms.
561
+ * @returns WindowInfoResult with active window information and requestId
562
+ *
563
+ * @deprecated Use session.computer.getActiveWindow() instead.
564
+ */
565
+ async getActiveWindow(timeoutMs = 3e3) {
566
+ console.warn("\u26A0\uFE0F WindowManager.getActiveWindow() is deprecated. Use session.computer.getActiveWindow() instead.");
567
+ try {
568
+ const args = {
569
+ timeout_ms: timeoutMs
570
+ };
571
+ const response = await this.session.callMcpTool(
572
+ "get_active_window",
573
+ args
574
+ );
575
+ if (!response.success) {
576
+ return {
577
+ requestId: response.requestId,
578
+ success: false,
579
+ errorMessage: response.errorMessage
580
+ };
581
+ }
582
+ let activeWindow = void 0;
583
+ if (response.data) {
584
+ const windows = this.parseWindowsFromJSON(response.data);
585
+ activeWindow = windows.length > 0 ? windows[0] : void 0;
586
+ }
587
+ return {
588
+ requestId: response.requestId,
589
+ success: true,
590
+ window: activeWindow
591
+ };
592
+ } catch (error) {
593
+ return {
594
+ requestId: "",
595
+ success: false,
596
+ errorMessage: `Failed to get active window: ${error}`
597
+ };
598
+ }
599
+ }
600
+ };
601
+ __name(_WindowManager, "WindowManager");
602
+ var WindowManager = _WindowManager;
603
+
604
+ export {
605
+ __name,
606
+ __require,
607
+ __commonJS,
608
+ __toESM,
609
+ init_esm_shims,
610
+ WindowManager
611
+ };
612
+ //# sourceMappingURL=chunk-HKUD6LHR.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../node_modules/tsup/assets/esm_shims.js","../src/window/window.ts"],"sourcesContent":["// Shim globals in esm bundle\nimport path from 'node:path'\nimport { fileURLToPath } from 'node:url'\n\nconst getFilename = () => fileURLToPath(import.meta.url)\nconst getDirname = () => path.dirname(getFilename())\n\nexport const __dirname = /* @__PURE__ */ getDirname()\nexport const __filename = /* @__PURE__ */ getFilename()\n","\nimport {\n WindowListResult,\n WindowInfoResult,\n BoolResult,\n} from \"../types/api-response\";\n\n\n\n/**\n * Represents a window in the system.\n */\nexport interface Window {\n window_id: number;\n title: string;\n absolute_upper_left_x?: number;\n absolute_upper_left_y?: number;\n width?: number;\n height?: number;\n pid?: number;\n pname?: string;\n child_windows?: Window[];\n}\n\n/**\n * Handles window management operations in the AgentBay cloud environment.\n * \n * @deprecated This module is deprecated. Use Computer module instead.\n * - For desktop window operations, use session.computer\n * - Window operations are not available for mobile\n */\nexport class WindowManager {\n private session: {\n getAPIKey(): string;\n getSessionId(): string;\n callMcpTool(toolName: string, args: any): Promise<{\n success: boolean;\n data: string;\n errorMessage: string;\n requestId: string;\n }>;\n };\n\n /**\n * Creates a new WindowManager instance.\n * @param session The session object that provides access to the AgentBay API.\n */\n constructor(session: {\n getAPIKey(): string;\n getSessionId(): string;\n callMcpTool(toolName: string, args: any): Promise<{\n success: boolean;\n data: string;\n errorMessage: string;\n requestId: string;\n }>;\n }) {\n this.session = session;\n }\n\n\n\n /**\n * Helper method to parse JSON string into Window objects\n * @param jsonStr - JSON string to parse\n * @returns Array of Window objects or single Window object\n */\n private parseWindowsFromJSON(jsonStr: string): Window[] {\n try {\n const parsed = JSON.parse(jsonStr);\n return Array.isArray(parsed) ? parsed : [parsed];\n } catch (error) {\n throw new Error(`Failed to parse window data: ${error}`);\n }\n }\n\n /**\n * Lists all root windows in the system.\n * Corresponds to Python's list_root_windows() method\n *\n * @param timeoutMs - The timeout in milliseconds. Default is 3000ms.\n * @returns WindowListResult with windows array and requestId\n * \n * @deprecated Use session.computer.listRootWindows() instead.\n */\n async listRootWindows(timeoutMs = 3000): Promise<WindowListResult> {\n console.warn('⚠️ WindowManager.listRootWindows() is deprecated. Use session.computer.listRootWindows() instead.');\n \n try {\n const args = {\n timeout_ms: timeoutMs,\n };\n\n const response = await this.session.callMcpTool(\n \"list_root_windows\",\n args\n );\n\n if (!response.success) {\n return {\n requestId: response.requestId,\n success: false,\n windows: [],\n errorMessage: response.errorMessage,\n };\n }\n\n const windows = response.data\n ? this.parseWindowsFromJSON(response.data)\n : [];\n\n return {\n requestId: response.requestId,\n success: true,\n windows,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n windows: [],\n errorMessage: `Failed to list root windows: ${error}`,\n };\n }\n }\n\n /**\n * Lists all windows in the system.\n * Corresponds to Python's list_all_windows() method\n *\n * @param timeoutMs - The timeout in milliseconds. Default is 3000ms.\n * @returns WindowListResult with windows array and requestId\n * \n * @deprecated Use session.computer.listAllWindows() instead.\n */\n async listAllWindows(timeoutMs = 3000): Promise<WindowListResult> {\n console.warn('⚠️ WindowManager.listAllWindows() is deprecated. Use session.computer.listAllWindows() instead.');\n \n try {\n const args = {\n timeout_ms: timeoutMs,\n };\n\n const response = await this.session.callMcpTool(\n \"list_all_windows\",\n args\n );\n\n if (!response.success) {\n return {\n requestId: response.requestId,\n success: false,\n windows: [],\n errorMessage: response.errorMessage,\n };\n }\n\n const windows = response.data\n ? this.parseWindowsFromJSON(response.data)\n : [];\n\n return {\n requestId: response.requestId,\n success: true,\n windows,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n windows: [],\n errorMessage: `Failed to list all windows: ${error}`,\n };\n }\n }\n\n /**\n * Gets information about a specific window.\n * Corresponds to Python's get_window_info() method\n *\n * @param windowId - The ID of the window to get information for.\n * @returns WindowInfoResult with window information and requestId\n * \n * @deprecated Use session.computer.getWindowInfo() instead.\n */\n async getWindowInfo(windowId: number): Promise<WindowInfoResult> {\n console.warn('⚠️ WindowManager.getWindowInfo() is deprecated. Use session.computer.getWindowInfo() instead.');\n \n try {\n const args = {\n window_id: windowId,\n };\n\n const response = await this.session.callMcpTool(\n \"get_window_info\",\n args\n );\n\n if (!response.success) {\n return {\n requestId: response.requestId,\n success: false,\n errorMessage: response.errorMessage,\n };\n }\n\n let window: Window | undefined = undefined;\n if (response.data) {\n const windows = this.parseWindowsFromJSON(response.data);\n window = windows.length > 0 ? windows[0] : undefined;\n }\n\n return {\n requestId: response.requestId,\n success: true,\n window,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to get window info: ${error}`,\n };\n }\n }\n\n /**\n * Activates a window by bringing it to the foreground.\n * Corresponds to Python's activate_window() method\n *\n * @param windowId - The ID of the window to activate.\n * @returns BoolResult with success status and requestId\n * \n * @deprecated Use session.computer.activateWindow() instead.\n */\n async activateWindow(windowId: number): Promise<BoolResult> {\n console.warn('⚠️ WindowManager.activateWindow() is deprecated. Use session.computer.activateWindow() instead.');\n \n try {\n const args = {\n window_id: windowId,\n };\n\n const response = await this.session.callMcpTool(\n \"activate_window\",\n args\n );\n\n if (!response.success) {\n return {\n requestId: response.requestId,\n success: false,\n errorMessage: response.errorMessage,\n };\n }\n\n return {\n requestId: response.requestId,\n success: true,\n data: true,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to activate window: ${error}`,\n };\n }\n }\n\n /**\n * Maximizes a window.\n * Corresponds to Python's maximize_window() method\n *\n * @param windowId - The ID of the window to maximize.\n * @returns BoolResult with success status and requestId\n * \n * @deprecated Use session.computer.maximizeWindow() instead.\n */\n async maximizeWindow(windowId: number): Promise<BoolResult> {\n console.warn('⚠️ WindowManager.maximizeWindow() is deprecated. Use session.computer.maximizeWindow() instead.');\n \n try {\n const args = {\n window_id: windowId,\n };\n\n const response = await this.session.callMcpTool(\n \"maximize_window\",\n args\n );\n\n if (!response.success) {\n return {\n requestId: response.requestId,\n success: false,\n errorMessage: response.errorMessage,\n };\n }\n\n return {\n requestId: response.requestId,\n success: true,\n data: true,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to maximize window: ${error}`,\n };\n }\n }\n\n /**\n * Minimizes a window.\n * Corresponds to Python's minimize_window() method\n *\n * @param windowId - The ID of the window to minimize.\n * @returns BoolResult with success status and requestId\n * \n * @deprecated Use session.computer.minimizeWindow() instead.\n */\n async minimizeWindow(windowId: number): Promise<BoolResult> {\n console.warn('⚠️ WindowManager.minimizeWindow() is deprecated. Use session.computer.minimizeWindow() instead.');\n \n try {\n const args = {\n window_id: windowId,\n };\n\n const response = await this.session.callMcpTool(\n \"minimize_window\",\n args\n );\n\n if (!response.success) {\n return {\n requestId: response.requestId,\n success: false,\n errorMessage: response.errorMessage,\n };\n }\n\n return {\n requestId: response.requestId,\n success: true,\n data: true,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to minimize window: ${error}`,\n };\n }\n }\n\n /**\n * Restores a window by ID.\n * Corresponds to Python's restore_window() method\n *\n * @param windowId The ID of the window to restore.\n * @returns BoolResult with requestId\n */\n async restoreWindow(windowId: number): Promise<BoolResult> {\n try {\n const args = {\n window_id: windowId,\n };\n\n const response = await this.session.callMcpTool(\n \"restore_window\",\n args\n );\n\n if (!response.success) {\n return {\n requestId: response.requestId,\n success: false,\n errorMessage: response.errorMessage,\n };\n }\n\n return {\n requestId: response.requestId,\n success: true,\n data: true,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to restore window: ${error}`,\n };\n }\n }\n\n /**\n * Closes a window.\n * Corresponds to Python's close_window() method\n *\n * @param windowId - The ID of the window to close.\n * @returns BoolResult with success status and requestId\n * \n * @deprecated Use session.computer.closeWindow() instead.\n */\n async closeWindow(windowId: number): Promise<BoolResult> {\n console.warn('⚠️ WindowManager.closeWindow() is deprecated. Use session.computer.closeWindow() instead.');\n \n try {\n const args = {\n window_id: windowId,\n };\n\n const response = await this.session.callMcpTool(\n \"close_window\",\n args\n );\n\n if (!response.success) {\n return {\n requestId: response.requestId,\n success: false,\n errorMessage: response.errorMessage,\n };\n }\n\n return {\n requestId: response.requestId,\n success: true,\n data: true,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to close window: ${error}`,\n };\n }\n }\n\n /**\n * Sets a window to fullscreen by ID.\n * Corresponds to Python's fullscreen_window() method\n *\n * @param windowId The ID of the window to set to fullscreen.\n * @returns BoolResult with requestId\n */\n async fullscreenWindow(windowId: number): Promise<BoolResult> {\n try {\n const args = {\n window_id: windowId,\n };\n\n const response = await this.session.callMcpTool(\n \"fullscreen_window\",\n args\n );\n\n if (!response.success) {\n return {\n requestId: response.requestId,\n success: false,\n errorMessage: response.errorMessage,\n };\n }\n\n return {\n requestId: response.requestId,\n success: true,\n data: true,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to make window fullscreen: ${error}`,\n };\n }\n }\n\n /**\n * Resizes a window to the specified dimensions.\n * Corresponds to Python's resize_window() method\n *\n * @param windowId - The ID of the window to resize.\n * @param width - The new width of the window.\n * @param height - The new height of the window.\n * @returns BoolResult with success status and requestId\n * \n * @deprecated Use session.computer.resizeWindow() instead.\n */\n async resizeWindow(windowId: number, width: number, height: number): Promise<BoolResult> {\n console.warn('⚠️ WindowManager.resizeWindow() is deprecated. Use session.computer.resizeWindow() instead.');\n \n try {\n const args = {\n window_id: windowId,\n width,\n height,\n };\n\n const response = await this.session.callMcpTool(\n \"resize_window\",\n args\n );\n\n if (!response.success) {\n return {\n requestId: response.requestId,\n success: false,\n errorMessage: response.errorMessage,\n };\n }\n\n return {\n requestId: response.requestId,\n success: true,\n data: true,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to resize window: ${error}`,\n };\n }\n }\n\n /**\n * Moves a window to the specified position.\n * Corresponds to Python's move_window() method\n *\n * @param windowId - The ID of the window to move.\n * @param x - The new x coordinate of the window.\n * @param y - The new y coordinate of the window.\n * @returns BoolResult with success status and requestId\n * \n * @deprecated Use session.computer.moveWindow() instead.\n */\n async moveWindow(windowId: number, x: number, y: number): Promise<BoolResult> {\n console.warn('⚠️ WindowManager.moveWindow() is deprecated. Use session.computer.moveWindow() instead.');\n \n try {\n const args = {\n window_id: windowId,\n x,\n y,\n };\n\n const response = await this.session.callMcpTool(\n \"move_window\",\n args\n );\n\n if (!response.success) {\n return {\n requestId: response.requestId,\n success: false,\n errorMessage: response.errorMessage,\n };\n }\n\n return {\n requestId: response.requestId,\n success: true,\n data: true,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to move window: ${error}`,\n };\n }\n }\n\n /**\n * Enables or disables focus mode.\n * Corresponds to Python's focus_mode() method\n *\n * @param on Whether to enable focus mode.\n * @returns BoolResult with requestId\n */\n async focusMode(on: boolean): Promise<BoolResult> {\n try {\n const args = {\n on,\n };\n\n const response = await this.session.callMcpTool(\n \"focus_mode\",\n args\n );\n\n if (!response.success) {\n return {\n requestId: response.requestId,\n success: false,\n errorMessage: response.errorMessage,\n };\n }\n\n return {\n requestId: response.requestId,\n success: true,\n data: true,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to toggle focus mode: ${error}`,\n };\n }\n }\n\n /**\n * Gets the currently active window.\n * Corresponds to Python's get_active_window() method\n *\n * @param timeoutMs - The timeout in milliseconds. Default is 3000ms.\n * @returns WindowInfoResult with active window information and requestId\n * \n * @deprecated Use session.computer.getActiveWindow() instead.\n */\n async getActiveWindow(timeoutMs = 3000): Promise<WindowInfoResult> {\n console.warn('⚠️ WindowManager.getActiveWindow() is deprecated. Use session.computer.getActiveWindow() instead.');\n \n try {\n const args = {\n timeout_ms: timeoutMs,\n };\n\n const response = await this.session.callMcpTool(\n \"get_active_window\",\n args\n );\n\n if (!response.success) {\n return {\n requestId: response.requestId,\n success: false,\n errorMessage: response.errorMessage,\n };\n }\n\n let activeWindow: Window | undefined = undefined;\n if (response.data) {\n const windows = this.parseWindowsFromJSON(response.data);\n activeWindow = windows.length > 0 ? windows[0] : undefined;\n }\n\n return {\n requestId: response.requestId,\n success: true,\n window: activeWindow,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to get active window: ${error}`,\n };\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,UAAU;AACjB,SAAS,qBAAqB;AAF9B;AAAA;AAAA;AAAA;AAAA;;;ACAA;AA+BO,IAAM,iBAAN,MAAM,eAAc;AAAA;AAAA;AAAA;AAAA;AAAA,EAgBzB,YAAY,SAST;AACD,SAAK,UAAU;AAAA,EACjB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASQ,qBAAqB,SAA2B;AACtD,QAAI;AACF,YAAM,SAAS,KAAK,MAAM,OAAO;AACjC,aAAO,MAAM,QAAQ,MAAM,IAAI,SAAS,CAAC,MAAM;AAAA,IACjD,SAAS,OAAO;AACd,YAAM,IAAI,MAAM,gCAAgC,KAAK,EAAE;AAAA,IACzD;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAM,gBAAgB,YAAY,KAAiC;AACjE,YAAQ,KAAK,8GAAoG;AAEjH,QAAI;AACF,YAAM,OAAO;AAAA,QACX,YAAY;AAAA,MACd;AAEA,YAAM,WAAW,MAAM,KAAK,QAAQ;AAAA,QAClC;AAAA,QACA;AAAA,MACF;AAEA,UAAI,CAAC,SAAS,SAAS;AACrB,eAAO;AAAA,UACL,WAA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