@midscene/computer 1.9.0 → 1.9.1-beta-20260605030736.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/dist/es/cli.mjs +12 -9
- package/dist/es/index.mjs +12 -9
- package/dist/es/mcp-server.mjs +12 -9
- package/dist/lib/cli.js +12 -9
- package/dist/lib/index.js +12 -9
- package/dist/lib/mcp-server.js +12 -9
- package/dist/types/index.d.ts +6 -0
- package/dist/types/mcp-server.d.ts +6 -0
- package/package.json +3 -3
package/dist/es/cli.mjs
CHANGED
|
@@ -520,7 +520,7 @@ Available Displays: ${displays.length > 0 ? displays.map((d)=>d.name).join(', ')
|
|
|
520
520
|
}
|
|
521
521
|
async healthCheck() {
|
|
522
522
|
console.log('[HealthCheck] Starting health check...');
|
|
523
|
-
console.log("[HealthCheck] @midscene/computer v1.9.0");
|
|
523
|
+
console.log("[HealthCheck] @midscene/computer v1.9.1-beta-20260605030736.0");
|
|
524
524
|
console.log('[HealthCheck] Taking screenshot...');
|
|
525
525
|
const screenshotTimeout = 15000;
|
|
526
526
|
let timeoutId;
|
|
@@ -550,11 +550,11 @@ Available Displays: ${displays.length > 0 ? displays.map((d)=>d.name).join(', ')
|
|
|
550
550
|
const msg = `[HealthCheck] WARNING: Mouse control may not be working. Expected (${targetX}, ${targetY}), got (${movedPos.x}, ${movedPos.y}), delta=(${deltaX}, ${deltaY})`;
|
|
551
551
|
console.warn(msg);
|
|
552
552
|
debugDevice(msg);
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
553
|
+
}
|
|
554
|
+
if ('win32' === process.platform && !this.isRunningAsAdmin()) {
|
|
555
|
+
const hint = "Heads-up: Midscene is not running as Administrator. If clicks appear to do nothing while the cursor still moves to the right position, your target app is likely elevated (admin) and Windows UIPI is dropping the injected input — run your terminal or Node.js as Administrator.";
|
|
556
|
+
console.warn(`[HealthCheck] ${hint}`);
|
|
557
|
+
debugDevice(hint);
|
|
558
558
|
}
|
|
559
559
|
this.inputDriver.moveMouse(startPos.x, startPos.y);
|
|
560
560
|
console.log(`[HealthCheck] Mouse restored to (${startPos.x}, ${startPos.y})`);
|
|
@@ -571,14 +571,16 @@ Available Displays: ${displays.length > 0 ? displays.map((d)=>d.name).join(', ')
|
|
|
571
571
|
}
|
|
572
572
|
isRunningAsAdmin() {
|
|
573
573
|
if ('win32' !== process.platform) return false;
|
|
574
|
+
if (void 0 !== this.adminCheckCache) return this.adminCheckCache;
|
|
574
575
|
try {
|
|
575
576
|
execSync('net session', {
|
|
576
577
|
stdio: 'pipe'
|
|
577
578
|
});
|
|
578
|
-
|
|
579
|
+
this.adminCheckCache = true;
|
|
579
580
|
} catch {
|
|
580
|
-
|
|
581
|
+
this.adminCheckCache = false;
|
|
581
582
|
}
|
|
583
|
+
return this.adminCheckCache;
|
|
582
584
|
}
|
|
583
585
|
async screenshotBase64() {
|
|
584
586
|
if (this.destroyed) throw new Error('ComputerDevice has been destroyed');
|
|
@@ -811,6 +813,7 @@ Original error: ${lastRawMessage}`);
|
|
|
811
813
|
debug: (message)=>debugDevice(message)
|
|
812
814
|
}));
|
|
813
815
|
device_define_property(this, "useAppleScript", void 0);
|
|
816
|
+
device_define_property(this, "adminCheckCache", void 0);
|
|
814
817
|
device_define_property(this, "uri", void 0);
|
|
815
818
|
device_define_property(this, "inputPrimitives", {
|
|
816
819
|
pointer: {
|
|
@@ -1697,7 +1700,7 @@ class ComputerMidsceneTools extends BaseMidsceneTools {
|
|
|
1697
1700
|
const tools = new ComputerMidsceneTools();
|
|
1698
1701
|
runToolsCLI(tools, 'midscene-computer', {
|
|
1699
1702
|
stripPrefix: 'computer_',
|
|
1700
|
-
version: "1.9.0",
|
|
1703
|
+
version: "1.9.1-beta-20260605030736.0",
|
|
1701
1704
|
extraCommands: createReportCliCommands()
|
|
1702
1705
|
}).catch((e)=>{
|
|
1703
1706
|
process.exit(reportCLIError(e));
|
package/dist/es/index.mjs
CHANGED
|
@@ -520,7 +520,7 @@ Available Displays: ${displays.length > 0 ? displays.map((d)=>d.name).join(', ')
|
|
|
520
520
|
}
|
|
521
521
|
async healthCheck() {
|
|
522
522
|
console.log('[HealthCheck] Starting health check...');
|
|
523
|
-
console.log("[HealthCheck] @midscene/computer v1.9.0");
|
|
523
|
+
console.log("[HealthCheck] @midscene/computer v1.9.1-beta-20260605030736.0");
|
|
524
524
|
console.log('[HealthCheck] Taking screenshot...');
|
|
525
525
|
const screenshotTimeout = 15000;
|
|
526
526
|
let timeoutId;
|
|
@@ -550,11 +550,11 @@ Available Displays: ${displays.length > 0 ? displays.map((d)=>d.name).join(', ')
|
|
|
550
550
|
const msg = `[HealthCheck] WARNING: Mouse control may not be working. Expected (${targetX}, ${targetY}), got (${movedPos.x}, ${movedPos.y}), delta=(${deltaX}, ${deltaY})`;
|
|
551
551
|
console.warn(msg);
|
|
552
552
|
debugDevice(msg);
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
553
|
+
}
|
|
554
|
+
if ('win32' === process.platform && !this.isRunningAsAdmin()) {
|
|
555
|
+
const hint = "Heads-up: Midscene is not running as Administrator. If clicks appear to do nothing while the cursor still moves to the right position, your target app is likely elevated (admin) and Windows UIPI is dropping the injected input — run your terminal or Node.js as Administrator.";
|
|
556
|
+
console.warn(`[HealthCheck] ${hint}`);
|
|
557
|
+
debugDevice(hint);
|
|
558
558
|
}
|
|
559
559
|
this.inputDriver.moveMouse(startPos.x, startPos.y);
|
|
560
560
|
console.log(`[HealthCheck] Mouse restored to (${startPos.x}, ${startPos.y})`);
|
|
@@ -571,14 +571,16 @@ Available Displays: ${displays.length > 0 ? displays.map((d)=>d.name).join(', ')
|
|
|
571
571
|
}
|
|
572
572
|
isRunningAsAdmin() {
|
|
573
573
|
if ('win32' !== process.platform) return false;
|
|
574
|
+
if (void 0 !== this.adminCheckCache) return this.adminCheckCache;
|
|
574
575
|
try {
|
|
575
576
|
execSync('net session', {
|
|
576
577
|
stdio: 'pipe'
|
|
577
578
|
});
|
|
578
|
-
|
|
579
|
+
this.adminCheckCache = true;
|
|
579
580
|
} catch {
|
|
580
|
-
|
|
581
|
+
this.adminCheckCache = false;
|
|
581
582
|
}
|
|
583
|
+
return this.adminCheckCache;
|
|
582
584
|
}
|
|
583
585
|
async screenshotBase64() {
|
|
584
586
|
if (this.destroyed) throw new Error('ComputerDevice has been destroyed');
|
|
@@ -811,6 +813,7 @@ Original error: ${lastRawMessage}`);
|
|
|
811
813
|
debug: (message)=>debugDevice(message)
|
|
812
814
|
}));
|
|
813
815
|
device_define_property(this, "useAppleScript", void 0);
|
|
816
|
+
device_define_property(this, "adminCheckCache", void 0);
|
|
814
817
|
device_define_property(this, "uri", void 0);
|
|
815
818
|
device_define_property(this, "inputPrimitives", {
|
|
816
819
|
pointer: {
|
|
@@ -1738,7 +1741,7 @@ class ComputerMidsceneTools extends BaseMidsceneTools {
|
|
|
1738
1741
|
}
|
|
1739
1742
|
}
|
|
1740
1743
|
function version() {
|
|
1741
|
-
const currentVersion = "1.9.0";
|
|
1744
|
+
const currentVersion = "1.9.1-beta-20260605030736.0";
|
|
1742
1745
|
console.log(`@midscene/computer v${currentVersion}`);
|
|
1743
1746
|
return currentVersion;
|
|
1744
1747
|
}
|
package/dist/es/mcp-server.mjs
CHANGED
|
@@ -520,7 +520,7 @@ Available Displays: ${displays.length > 0 ? displays.map((d)=>d.name).join(', ')
|
|
|
520
520
|
}
|
|
521
521
|
async healthCheck() {
|
|
522
522
|
console.log('[HealthCheck] Starting health check...');
|
|
523
|
-
console.log("[HealthCheck] @midscene/computer v1.9.0");
|
|
523
|
+
console.log("[HealthCheck] @midscene/computer v1.9.1-beta-20260605030736.0");
|
|
524
524
|
console.log('[HealthCheck] Taking screenshot...');
|
|
525
525
|
const screenshotTimeout = 15000;
|
|
526
526
|
let timeoutId;
|
|
@@ -550,11 +550,11 @@ Available Displays: ${displays.length > 0 ? displays.map((d)=>d.name).join(', ')
|
|
|
550
550
|
const msg = `[HealthCheck] WARNING: Mouse control may not be working. Expected (${targetX}, ${targetY}), got (${movedPos.x}, ${movedPos.y}), delta=(${deltaX}, ${deltaY})`;
|
|
551
551
|
console.warn(msg);
|
|
552
552
|
debugDevice(msg);
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
553
|
+
}
|
|
554
|
+
if ('win32' === process.platform && !this.isRunningAsAdmin()) {
|
|
555
|
+
const hint = "Heads-up: Midscene is not running as Administrator. If clicks appear to do nothing while the cursor still moves to the right position, your target app is likely elevated (admin) and Windows UIPI is dropping the injected input — run your terminal or Node.js as Administrator.";
|
|
556
|
+
console.warn(`[HealthCheck] ${hint}`);
|
|
557
|
+
debugDevice(hint);
|
|
558
558
|
}
|
|
559
559
|
this.inputDriver.moveMouse(startPos.x, startPos.y);
|
|
560
560
|
console.log(`[HealthCheck] Mouse restored to (${startPos.x}, ${startPos.y})`);
|
|
@@ -571,14 +571,16 @@ Available Displays: ${displays.length > 0 ? displays.map((d)=>d.name).join(', ')
|
|
|
571
571
|
}
|
|
572
572
|
isRunningAsAdmin() {
|
|
573
573
|
if ('win32' !== process.platform) return false;
|
|
574
|
+
if (void 0 !== this.adminCheckCache) return this.adminCheckCache;
|
|
574
575
|
try {
|
|
575
576
|
execSync('net session', {
|
|
576
577
|
stdio: 'pipe'
|
|
577
578
|
});
|
|
578
|
-
|
|
579
|
+
this.adminCheckCache = true;
|
|
579
580
|
} catch {
|
|
580
|
-
|
|
581
|
+
this.adminCheckCache = false;
|
|
581
582
|
}
|
|
583
|
+
return this.adminCheckCache;
|
|
582
584
|
}
|
|
583
585
|
async screenshotBase64() {
|
|
584
586
|
if (this.destroyed) throw new Error('ComputerDevice has been destroyed');
|
|
@@ -811,6 +813,7 @@ Original error: ${lastRawMessage}`);
|
|
|
811
813
|
debug: (message)=>debugDevice(message)
|
|
812
814
|
}));
|
|
813
815
|
device_define_property(this, "useAppleScript", void 0);
|
|
816
|
+
device_define_property(this, "adminCheckCache", void 0);
|
|
814
817
|
device_define_property(this, "uri", void 0);
|
|
815
818
|
device_define_property(this, "inputPrimitives", {
|
|
816
819
|
pointer: {
|
|
@@ -1701,7 +1704,7 @@ class ComputerMCPServer extends BaseMCPServer {
|
|
|
1701
1704
|
constructor(toolsManager){
|
|
1702
1705
|
super({
|
|
1703
1706
|
name: '@midscene/computer-mcp',
|
|
1704
|
-
version: "1.9.0",
|
|
1707
|
+
version: "1.9.1-beta-20260605030736.0",
|
|
1705
1708
|
description: 'Control the computer desktop using natural language commands'
|
|
1706
1709
|
}, toolsManager);
|
|
1707
1710
|
}
|
package/dist/lib/cli.js
CHANGED
|
@@ -546,7 +546,7 @@ Available Displays: ${displays.length > 0 ? displays.map((d)=>d.name).join(', ')
|
|
|
546
546
|
}
|
|
547
547
|
async healthCheck() {
|
|
548
548
|
console.log('[HealthCheck] Starting health check...');
|
|
549
|
-
console.log("[HealthCheck] @midscene/computer v1.9.0");
|
|
549
|
+
console.log("[HealthCheck] @midscene/computer v1.9.1-beta-20260605030736.0");
|
|
550
550
|
console.log('[HealthCheck] Taking screenshot...');
|
|
551
551
|
const screenshotTimeout = 15000;
|
|
552
552
|
let timeoutId;
|
|
@@ -576,11 +576,11 @@ Available Displays: ${displays.length > 0 ? displays.map((d)=>d.name).join(', ')
|
|
|
576
576
|
const msg = `[HealthCheck] WARNING: Mouse control may not be working. Expected (${targetX}, ${targetY}), got (${movedPos.x}, ${movedPos.y}), delta=(${deltaX}, ${deltaY})`;
|
|
577
577
|
console.warn(msg);
|
|
578
578
|
debugDevice(msg);
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
579
|
+
}
|
|
580
|
+
if ('win32' === process.platform && !this.isRunningAsAdmin()) {
|
|
581
|
+
const hint = "Heads-up: Midscene is not running as Administrator. If clicks appear to do nothing while the cursor still moves to the right position, your target app is likely elevated (admin) and Windows UIPI is dropping the injected input — run your terminal or Node.js as Administrator.";
|
|
582
|
+
console.warn(`[HealthCheck] ${hint}`);
|
|
583
|
+
debugDevice(hint);
|
|
584
584
|
}
|
|
585
585
|
this.inputDriver.moveMouse(startPos.x, startPos.y);
|
|
586
586
|
console.log(`[HealthCheck] Mouse restored to (${startPos.x}, ${startPos.y})`);
|
|
@@ -597,14 +597,16 @@ Available Displays: ${displays.length > 0 ? displays.map((d)=>d.name).join(', ')
|
|
|
597
597
|
}
|
|
598
598
|
isRunningAsAdmin() {
|
|
599
599
|
if ('win32' !== process.platform) return false;
|
|
600
|
+
if (void 0 !== this.adminCheckCache) return this.adminCheckCache;
|
|
600
601
|
try {
|
|
601
602
|
(0, external_node_child_process_namespaceObject.execSync)('net session', {
|
|
602
603
|
stdio: 'pipe'
|
|
603
604
|
});
|
|
604
|
-
|
|
605
|
+
this.adminCheckCache = true;
|
|
605
606
|
} catch {
|
|
606
|
-
|
|
607
|
+
this.adminCheckCache = false;
|
|
607
608
|
}
|
|
609
|
+
return this.adminCheckCache;
|
|
608
610
|
}
|
|
609
611
|
async screenshotBase64() {
|
|
610
612
|
if (this.destroyed) throw new Error('ComputerDevice has been destroyed');
|
|
@@ -837,6 +839,7 @@ Original error: ${lastRawMessage}`);
|
|
|
837
839
|
debug: (message)=>debugDevice(message)
|
|
838
840
|
}));
|
|
839
841
|
device_define_property(this, "useAppleScript", void 0);
|
|
842
|
+
device_define_property(this, "adminCheckCache", void 0);
|
|
840
843
|
device_define_property(this, "uri", void 0);
|
|
841
844
|
device_define_property(this, "inputPrimitives", {
|
|
842
845
|
pointer: {
|
|
@@ -1724,7 +1727,7 @@ class ComputerMidsceneTools extends base_tools_namespaceObject.BaseMidsceneTools
|
|
|
1724
1727
|
const tools = new ComputerMidsceneTools();
|
|
1725
1728
|
(0, cli_namespaceObject.runToolsCLI)(tools, 'midscene-computer', {
|
|
1726
1729
|
stripPrefix: 'computer_',
|
|
1727
|
-
version: "1.9.0",
|
|
1730
|
+
version: "1.9.1-beta-20260605030736.0",
|
|
1728
1731
|
extraCommands: (0, core_namespaceObject.createReportCliCommands)()
|
|
1729
1732
|
}).catch((e)=>{
|
|
1730
1733
|
process.exit((0, cli_namespaceObject.reportCLIError)(e));
|
package/dist/lib/index.js
CHANGED
|
@@ -573,7 +573,7 @@ Available Displays: ${displays.length > 0 ? displays.map((d)=>d.name).join(', ')
|
|
|
573
573
|
}
|
|
574
574
|
async healthCheck() {
|
|
575
575
|
console.log('[HealthCheck] Starting health check...');
|
|
576
|
-
console.log("[HealthCheck] @midscene/computer v1.9.0");
|
|
576
|
+
console.log("[HealthCheck] @midscene/computer v1.9.1-beta-20260605030736.0");
|
|
577
577
|
console.log('[HealthCheck] Taking screenshot...');
|
|
578
578
|
const screenshotTimeout = 15000;
|
|
579
579
|
let timeoutId;
|
|
@@ -603,11 +603,11 @@ Available Displays: ${displays.length > 0 ? displays.map((d)=>d.name).join(', ')
|
|
|
603
603
|
const msg = `[HealthCheck] WARNING: Mouse control may not be working. Expected (${targetX}, ${targetY}), got (${movedPos.x}, ${movedPos.y}), delta=(${deltaX}, ${deltaY})`;
|
|
604
604
|
console.warn(msg);
|
|
605
605
|
debugDevice(msg);
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
606
|
+
}
|
|
607
|
+
if ('win32' === process.platform && !this.isRunningAsAdmin()) {
|
|
608
|
+
const hint = "Heads-up: Midscene is not running as Administrator. If clicks appear to do nothing while the cursor still moves to the right position, your target app is likely elevated (admin) and Windows UIPI is dropping the injected input — run your terminal or Node.js as Administrator.";
|
|
609
|
+
console.warn(`[HealthCheck] ${hint}`);
|
|
610
|
+
debugDevice(hint);
|
|
611
611
|
}
|
|
612
612
|
this.inputDriver.moveMouse(startPos.x, startPos.y);
|
|
613
613
|
console.log(`[HealthCheck] Mouse restored to (${startPos.x}, ${startPos.y})`);
|
|
@@ -624,14 +624,16 @@ Available Displays: ${displays.length > 0 ? displays.map((d)=>d.name).join(', ')
|
|
|
624
624
|
}
|
|
625
625
|
isRunningAsAdmin() {
|
|
626
626
|
if ('win32' !== process.platform) return false;
|
|
627
|
+
if (void 0 !== this.adminCheckCache) return this.adminCheckCache;
|
|
627
628
|
try {
|
|
628
629
|
(0, external_node_child_process_namespaceObject.execSync)('net session', {
|
|
629
630
|
stdio: 'pipe'
|
|
630
631
|
});
|
|
631
|
-
|
|
632
|
+
this.adminCheckCache = true;
|
|
632
633
|
} catch {
|
|
633
|
-
|
|
634
|
+
this.adminCheckCache = false;
|
|
634
635
|
}
|
|
636
|
+
return this.adminCheckCache;
|
|
635
637
|
}
|
|
636
638
|
async screenshotBase64() {
|
|
637
639
|
if (this.destroyed) throw new Error('ComputerDevice has been destroyed');
|
|
@@ -864,6 +866,7 @@ Original error: ${lastRawMessage}`);
|
|
|
864
866
|
debug: (message)=>debugDevice(message)
|
|
865
867
|
}));
|
|
866
868
|
device_define_property(this, "useAppleScript", void 0);
|
|
869
|
+
device_define_property(this, "adminCheckCache", void 0);
|
|
867
870
|
device_define_property(this, "uri", void 0);
|
|
868
871
|
device_define_property(this, "inputPrimitives", {
|
|
869
872
|
pointer: {
|
|
@@ -1796,7 +1799,7 @@ class ComputerMidsceneTools extends base_tools_namespaceObject.BaseMidsceneTools
|
|
|
1796
1799
|
}
|
|
1797
1800
|
const env_namespaceObject = require("@midscene/shared/env");
|
|
1798
1801
|
function version() {
|
|
1799
|
-
const currentVersion = "1.9.0";
|
|
1802
|
+
const currentVersion = "1.9.1-beta-20260605030736.0";
|
|
1800
1803
|
console.log(`@midscene/computer v${currentVersion}`);
|
|
1801
1804
|
return currentVersion;
|
|
1802
1805
|
}
|
package/dist/lib/mcp-server.js
CHANGED
|
@@ -560,7 +560,7 @@ Available Displays: ${displays.length > 0 ? displays.map((d)=>d.name).join(', ')
|
|
|
560
560
|
}
|
|
561
561
|
async healthCheck() {
|
|
562
562
|
console.log('[HealthCheck] Starting health check...');
|
|
563
|
-
console.log("[HealthCheck] @midscene/computer v1.9.0");
|
|
563
|
+
console.log("[HealthCheck] @midscene/computer v1.9.1-beta-20260605030736.0");
|
|
564
564
|
console.log('[HealthCheck] Taking screenshot...');
|
|
565
565
|
const screenshotTimeout = 15000;
|
|
566
566
|
let timeoutId;
|
|
@@ -590,11 +590,11 @@ Available Displays: ${displays.length > 0 ? displays.map((d)=>d.name).join(', ')
|
|
|
590
590
|
const msg = `[HealthCheck] WARNING: Mouse control may not be working. Expected (${targetX}, ${targetY}), got (${movedPos.x}, ${movedPos.y}), delta=(${deltaX}, ${deltaY})`;
|
|
591
591
|
console.warn(msg);
|
|
592
592
|
debugDevice(msg);
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
593
|
+
}
|
|
594
|
+
if ('win32' === process.platform && !this.isRunningAsAdmin()) {
|
|
595
|
+
const hint = "Heads-up: Midscene is not running as Administrator. If clicks appear to do nothing while the cursor still moves to the right position, your target app is likely elevated (admin) and Windows UIPI is dropping the injected input — run your terminal or Node.js as Administrator.";
|
|
596
|
+
console.warn(`[HealthCheck] ${hint}`);
|
|
597
|
+
debugDevice(hint);
|
|
598
598
|
}
|
|
599
599
|
this.inputDriver.moveMouse(startPos.x, startPos.y);
|
|
600
600
|
console.log(`[HealthCheck] Mouse restored to (${startPos.x}, ${startPos.y})`);
|
|
@@ -611,14 +611,16 @@ Available Displays: ${displays.length > 0 ? displays.map((d)=>d.name).join(', ')
|
|
|
611
611
|
}
|
|
612
612
|
isRunningAsAdmin() {
|
|
613
613
|
if ('win32' !== process.platform) return false;
|
|
614
|
+
if (void 0 !== this.adminCheckCache) return this.adminCheckCache;
|
|
614
615
|
try {
|
|
615
616
|
(0, external_node_child_process_namespaceObject.execSync)('net session', {
|
|
616
617
|
stdio: 'pipe'
|
|
617
618
|
});
|
|
618
|
-
|
|
619
|
+
this.adminCheckCache = true;
|
|
619
620
|
} catch {
|
|
620
|
-
|
|
621
|
+
this.adminCheckCache = false;
|
|
621
622
|
}
|
|
623
|
+
return this.adminCheckCache;
|
|
622
624
|
}
|
|
623
625
|
async screenshotBase64() {
|
|
624
626
|
if (this.destroyed) throw new Error('ComputerDevice has been destroyed');
|
|
@@ -851,6 +853,7 @@ Original error: ${lastRawMessage}`);
|
|
|
851
853
|
debug: (message)=>debugDevice(message)
|
|
852
854
|
}));
|
|
853
855
|
device_define_property(this, "useAppleScript", void 0);
|
|
856
|
+
device_define_property(this, "adminCheckCache", void 0);
|
|
854
857
|
device_define_property(this, "uri", void 0);
|
|
855
858
|
device_define_property(this, "inputPrimitives", {
|
|
856
859
|
pointer: {
|
|
@@ -1744,7 +1747,7 @@ class ComputerMCPServer extends mcp_namespaceObject.BaseMCPServer {
|
|
|
1744
1747
|
constructor(toolsManager){
|
|
1745
1748
|
super({
|
|
1746
1749
|
name: '@midscene/computer-mcp',
|
|
1747
|
-
version: "1.9.0",
|
|
1750
|
+
version: "1.9.1-beta-20260605030736.0",
|
|
1748
1751
|
description: 'Control the computer desktop using natural language commands'
|
|
1749
1752
|
}, toolsManager);
|
|
1750
1753
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -77,6 +77,8 @@ export declare class ComputerDevice implements AbstractInterface {
|
|
|
77
77
|
* to avoid focus issues with system overlays (e.g. Spotlight).
|
|
78
78
|
*/
|
|
79
79
|
private useAppleScript;
|
|
80
|
+
/** Cached result of the elevation check; see isRunningAsAdmin(). */
|
|
81
|
+
private adminCheckCache?;
|
|
80
82
|
uri?: string;
|
|
81
83
|
readonly inputPrimitives: ComputerInputPrimitives;
|
|
82
84
|
constructor(options?: ComputerDeviceOpt);
|
|
@@ -90,6 +92,10 @@ export declare class ComputerDevice implements AbstractInterface {
|
|
|
90
92
|
/**
|
|
91
93
|
* Check if the current process is running with Administrator privileges.
|
|
92
94
|
* Uses "net session" which succeeds only when elevated.
|
|
95
|
+
*
|
|
96
|
+
* The result is cached because elevation cannot change during the process
|
|
97
|
+
* lifetime, and the underlying `execSync('net session')` is a blocking
|
|
98
|
+
* subprocess spawn that should not run on every connect / health check.
|
|
93
99
|
*/
|
|
94
100
|
private isRunningAsAdmin;
|
|
95
101
|
screenshotBase64(): Promise<string>;
|
|
@@ -29,6 +29,8 @@ declare class ComputerDevice implements AbstractInterface {
|
|
|
29
29
|
* to avoid focus issues with system overlays (e.g. Spotlight).
|
|
30
30
|
*/
|
|
31
31
|
private useAppleScript;
|
|
32
|
+
/** Cached result of the elevation check; see isRunningAsAdmin(). */
|
|
33
|
+
private adminCheckCache?;
|
|
32
34
|
uri?: string;
|
|
33
35
|
readonly inputPrimitives: ComputerInputPrimitives;
|
|
34
36
|
constructor(options?: ComputerDeviceOpt);
|
|
@@ -42,6 +44,10 @@ declare class ComputerDevice implements AbstractInterface {
|
|
|
42
44
|
/**
|
|
43
45
|
* Check if the current process is running with Administrator privileges.
|
|
44
46
|
* Uses "net session" which succeeds only when elevated.
|
|
47
|
+
*
|
|
48
|
+
* The result is cached because elevation cannot change during the process
|
|
49
|
+
* lifetime, and the underlying `execSync('net session')` is a blocking
|
|
50
|
+
* subprocess spawn that should not run on every connect / health check.
|
|
45
51
|
*/
|
|
46
52
|
private isRunningAsAdmin;
|
|
47
53
|
screenshotBase64(): Promise<string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midscene/computer",
|
|
3
|
-
"version": "1.9.0",
|
|
3
|
+
"version": "1.9.1-beta-20260605030736.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/core": "1.9.0",
|
|
42
|
-
"@midscene/shared": "1.9.0"
|
|
41
|
+
"@midscene/core": "1.9.1-beta-20260605030736.0",
|
|
42
|
+
"@midscene/shared": "1.9.1-beta-20260605030736.0"
|
|
43
43
|
},
|
|
44
44
|
"optionalDependencies": {
|
|
45
45
|
"node-mac-permissions": "2.5.0"
|