@midscene/computer 1.8.7 → 1.8.8-beta-20260601092817.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 CHANGED
@@ -4,7 +4,7 @@ import { getDebug } from "@midscene/shared/logger";
4
4
  import { BaseMidsceneTools } from "@midscene/shared/mcp/base-tools";
5
5
  import { Agent } from "@midscene/core/agent";
6
6
  import { execFileSync, execSync, spawn, spawnSync } from "node:child_process";
7
- import { existsSync } from "node:fs";
7
+ import { chmodSync, existsSync, statSync } from "node:fs";
8
8
  import { createRequire } from "node:module";
9
9
  import { dirname, resolve as external_node_path_resolve } from "node:path";
10
10
  import { fileURLToPath } from "node:url";
@@ -380,6 +380,15 @@ function getPhasedScrollBinary() {
380
380
  phasedScrollBinaryPath = null;
381
381
  return null;
382
382
  }
383
+ try {
384
+ const st = statSync(binPath);
385
+ if ((73 & st.mode) === 0) {
386
+ chmodSync(binPath, 493);
387
+ debugDevice('phased-scroll: restored executable bit on', binPath);
388
+ }
389
+ } catch (err) {
390
+ debugDevice('phased-scroll: chmod self-heal failed', err);
391
+ }
383
392
  phasedScrollBinaryPath = binPath;
384
393
  return binPath;
385
394
  }
@@ -398,9 +407,10 @@ function runPhasedScroll(direction, pixels, steps) {
398
407
  if (0 === res.status) return true;
399
408
  if (!phasedScrollExecWarned) {
400
409
  phasedScrollExecWarned = true;
401
- console.warn(`[@midscene/computer] phased-scroll helper exited with status ${res.status}; falling back to keyboard/libnut. This usually means Accessibility permission has not been granted to the host process.`);
410
+ const hint = null === res.status ? `signal ${res.signal ?? 'unknown'}; the binary may not be executable (npm tarball extraction can drop the +x bit) or may be blocked by quarantine. Try: chmod +x "${bin}"` : 'this usually means Accessibility permission has not been granted to the host process (System Settings → Privacy & Security → Accessibility)';
411
+ console.warn(`[@midscene/computer] phased-scroll helper failed (exit=${res.status}, signal=${res.signal ?? 'none'}); falling back to keyboard/libnut. ${hint}`);
402
412
  }
403
- debugDevice('phased-scroll exited non-zero', res.status, res.error);
413
+ debugDevice('phased-scroll exited non-zero', res.status, res.signal, res.error);
404
414
  return false;
405
415
  } catch (err) {
406
416
  if (!phasedScrollExecWarned) {
@@ -520,7 +530,7 @@ Available Displays: ${displays.length > 0 ? displays.map((d)=>d.name).join(', ')
520
530
  }
521
531
  async healthCheck() {
522
532
  console.log('[HealthCheck] Starting health check...');
523
- console.log("[HealthCheck] @midscene/computer v1.8.7");
533
+ console.log("[HealthCheck] @midscene/computer v1.8.8-beta-20260601092817.0");
524
534
  console.log('[HealthCheck] Taking screenshot...');
525
535
  const screenshotTimeout = 15000;
526
536
  let timeoutId;
@@ -1697,7 +1707,7 @@ class ComputerMidsceneTools extends BaseMidsceneTools {
1697
1707
  const tools = new ComputerMidsceneTools();
1698
1708
  runToolsCLI(tools, 'midscene-computer', {
1699
1709
  stripPrefix: 'computer_',
1700
- version: "1.8.7",
1710
+ version: "1.8.8-beta-20260601092817.0",
1701
1711
  extraCommands: createReportCliCommands()
1702
1712
  }).catch((e)=>{
1703
1713
  process.exit(reportCLIError(e));
package/dist/es/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { execFileSync, execSync, spawn, spawnSync } from "node:child_process";
2
- import { existsSync } from "node:fs";
2
+ import { chmodSync, existsSync, statSync } from "node:fs";
3
3
  import { createRequire } from "node:module";
4
4
  import { dirname, resolve as external_node_path_resolve } from "node:path";
5
5
  import { fileURLToPath } from "node:url";
@@ -380,6 +380,15 @@ function getPhasedScrollBinary() {
380
380
  phasedScrollBinaryPath = null;
381
381
  return null;
382
382
  }
383
+ try {
384
+ const st = statSync(binPath);
385
+ if ((73 & st.mode) === 0) {
386
+ chmodSync(binPath, 493);
387
+ debugDevice('phased-scroll: restored executable bit on', binPath);
388
+ }
389
+ } catch (err) {
390
+ debugDevice('phased-scroll: chmod self-heal failed', err);
391
+ }
383
392
  phasedScrollBinaryPath = binPath;
384
393
  return binPath;
385
394
  }
@@ -398,9 +407,10 @@ function runPhasedScroll(direction, pixels, steps) {
398
407
  if (0 === res.status) return true;
399
408
  if (!phasedScrollExecWarned) {
400
409
  phasedScrollExecWarned = true;
401
- console.warn(`[@midscene/computer] phased-scroll helper exited with status ${res.status}; falling back to keyboard/libnut. This usually means Accessibility permission has not been granted to the host process.`);
410
+ const hint = null === res.status ? `signal ${res.signal ?? 'unknown'}; the binary may not be executable (npm tarball extraction can drop the +x bit) or may be blocked by quarantine. Try: chmod +x "${bin}"` : 'this usually means Accessibility permission has not been granted to the host process (System Settings → Privacy & Security → Accessibility)';
411
+ console.warn(`[@midscene/computer] phased-scroll helper failed (exit=${res.status}, signal=${res.signal ?? 'none'}); falling back to keyboard/libnut. ${hint}`);
402
412
  }
403
- debugDevice('phased-scroll exited non-zero', res.status, res.error);
413
+ debugDevice('phased-scroll exited non-zero', res.status, res.signal, res.error);
404
414
  return false;
405
415
  } catch (err) {
406
416
  if (!phasedScrollExecWarned) {
@@ -520,7 +530,7 @@ Available Displays: ${displays.length > 0 ? displays.map((d)=>d.name).join(', ')
520
530
  }
521
531
  async healthCheck() {
522
532
  console.log('[HealthCheck] Starting health check...');
523
- console.log("[HealthCheck] @midscene/computer v1.8.7");
533
+ console.log("[HealthCheck] @midscene/computer v1.8.8-beta-20260601092817.0");
524
534
  console.log('[HealthCheck] Taking screenshot...');
525
535
  const screenshotTimeout = 15000;
526
536
  let timeoutId;
@@ -1738,7 +1748,7 @@ class ComputerMidsceneTools extends BaseMidsceneTools {
1738
1748
  }
1739
1749
  }
1740
1750
  function version() {
1741
- const currentVersion = "1.8.7";
1751
+ const currentVersion = "1.8.8-beta-20260601092817.0";
1742
1752
  console.log(`@midscene/computer v${currentVersion}`);
1743
1753
  return currentVersion;
1744
1754
  }
@@ -1,7 +1,7 @@
1
1
  import { BaseMCPServer, createMCPServerLauncher } from "@midscene/shared/mcp";
2
2
  import { Agent } from "@midscene/core/agent";
3
3
  import { execFileSync, execSync, spawn, spawnSync } from "node:child_process";
4
- import { existsSync } from "node:fs";
4
+ import { chmodSync, existsSync, statSync } from "node:fs";
5
5
  import { createRequire } from "node:module";
6
6
  import { dirname, resolve as external_node_path_resolve } from "node:path";
7
7
  import { fileURLToPath } from "node:url";
@@ -380,6 +380,15 @@ function getPhasedScrollBinary() {
380
380
  phasedScrollBinaryPath = null;
381
381
  return null;
382
382
  }
383
+ try {
384
+ const st = statSync(binPath);
385
+ if ((73 & st.mode) === 0) {
386
+ chmodSync(binPath, 493);
387
+ debugDevice('phased-scroll: restored executable bit on', binPath);
388
+ }
389
+ } catch (err) {
390
+ debugDevice('phased-scroll: chmod self-heal failed', err);
391
+ }
383
392
  phasedScrollBinaryPath = binPath;
384
393
  return binPath;
385
394
  }
@@ -398,9 +407,10 @@ function runPhasedScroll(direction, pixels, steps) {
398
407
  if (0 === res.status) return true;
399
408
  if (!phasedScrollExecWarned) {
400
409
  phasedScrollExecWarned = true;
401
- console.warn(`[@midscene/computer] phased-scroll helper exited with status ${res.status}; falling back to keyboard/libnut. This usually means Accessibility permission has not been granted to the host process.`);
410
+ const hint = null === res.status ? `signal ${res.signal ?? 'unknown'}; the binary may not be executable (npm tarball extraction can drop the +x bit) or may be blocked by quarantine. Try: chmod +x "${bin}"` : 'this usually means Accessibility permission has not been granted to the host process (System Settings → Privacy & Security → Accessibility)';
411
+ console.warn(`[@midscene/computer] phased-scroll helper failed (exit=${res.status}, signal=${res.signal ?? 'none'}); falling back to keyboard/libnut. ${hint}`);
402
412
  }
403
- debugDevice('phased-scroll exited non-zero', res.status, res.error);
413
+ debugDevice('phased-scroll exited non-zero', res.status, res.signal, res.error);
404
414
  return false;
405
415
  } catch (err) {
406
416
  if (!phasedScrollExecWarned) {
@@ -520,7 +530,7 @@ Available Displays: ${displays.length > 0 ? displays.map((d)=>d.name).join(', ')
520
530
  }
521
531
  async healthCheck() {
522
532
  console.log('[HealthCheck] Starting health check...');
523
- console.log("[HealthCheck] @midscene/computer v1.8.7");
533
+ console.log("[HealthCheck] @midscene/computer v1.8.8-beta-20260601092817.0");
524
534
  console.log('[HealthCheck] Taking screenshot...');
525
535
  const screenshotTimeout = 15000;
526
536
  let timeoutId;
@@ -1701,7 +1711,7 @@ class ComputerMCPServer extends BaseMCPServer {
1701
1711
  constructor(toolsManager){
1702
1712
  super({
1703
1713
  name: '@midscene/computer-mcp',
1704
- version: "1.8.7",
1714
+ version: "1.8.8-beta-20260601092817.0",
1705
1715
  description: 'Control the computer desktop using natural language commands'
1706
1716
  }, toolsManager);
1707
1717
  }
package/dist/lib/cli.js CHANGED
@@ -406,6 +406,15 @@ function getPhasedScrollBinary() {
406
406
  phasedScrollBinaryPath = null;
407
407
  return null;
408
408
  }
409
+ try {
410
+ const st = (0, external_node_fs_namespaceObject.statSync)(binPath);
411
+ if ((73 & st.mode) === 0) {
412
+ (0, external_node_fs_namespaceObject.chmodSync)(binPath, 493);
413
+ debugDevice('phased-scroll: restored executable bit on', binPath);
414
+ }
415
+ } catch (err) {
416
+ debugDevice('phased-scroll: chmod self-heal failed', err);
417
+ }
409
418
  phasedScrollBinaryPath = binPath;
410
419
  return binPath;
411
420
  }
@@ -424,9 +433,10 @@ function runPhasedScroll(direction, pixels, steps) {
424
433
  if (0 === res.status) return true;
425
434
  if (!phasedScrollExecWarned) {
426
435
  phasedScrollExecWarned = true;
427
- console.warn(`[@midscene/computer] phased-scroll helper exited with status ${res.status}; falling back to keyboard/libnut. This usually means Accessibility permission has not been granted to the host process.`);
436
+ const hint = null === res.status ? `signal ${res.signal ?? 'unknown'}; the binary may not be executable (npm tarball extraction can drop the +x bit) or may be blocked by quarantine. Try: chmod +x "${bin}"` : 'this usually means Accessibility permission has not been granted to the host process (System Settings → Privacy & Security → Accessibility)';
437
+ console.warn(`[@midscene/computer] phased-scroll helper failed (exit=${res.status}, signal=${res.signal ?? 'none'}); falling back to keyboard/libnut. ${hint}`);
428
438
  }
429
- debugDevice('phased-scroll exited non-zero', res.status, res.error);
439
+ debugDevice('phased-scroll exited non-zero', res.status, res.signal, res.error);
430
440
  return false;
431
441
  } catch (err) {
432
442
  if (!phasedScrollExecWarned) {
@@ -546,7 +556,7 @@ Available Displays: ${displays.length > 0 ? displays.map((d)=>d.name).join(', ')
546
556
  }
547
557
  async healthCheck() {
548
558
  console.log('[HealthCheck] Starting health check...');
549
- console.log("[HealthCheck] @midscene/computer v1.8.7");
559
+ console.log("[HealthCheck] @midscene/computer v1.8.8-beta-20260601092817.0");
550
560
  console.log('[HealthCheck] Taking screenshot...');
551
561
  const screenshotTimeout = 15000;
552
562
  let timeoutId;
@@ -1724,7 +1734,7 @@ class ComputerMidsceneTools extends base_tools_namespaceObject.BaseMidsceneTools
1724
1734
  const tools = new ComputerMidsceneTools();
1725
1735
  (0, cli_namespaceObject.runToolsCLI)(tools, 'midscene-computer', {
1726
1736
  stripPrefix: 'computer_',
1727
- version: "1.8.7",
1737
+ version: "1.8.8-beta-20260601092817.0",
1728
1738
  extraCommands: (0, core_namespaceObject.createReportCliCommands)()
1729
1739
  }).catch((e)=>{
1730
1740
  process.exit((0, cli_namespaceObject.reportCLIError)(e));
package/dist/lib/index.js CHANGED
@@ -433,6 +433,15 @@ function getPhasedScrollBinary() {
433
433
  phasedScrollBinaryPath = null;
434
434
  return null;
435
435
  }
436
+ try {
437
+ const st = (0, external_node_fs_namespaceObject.statSync)(binPath);
438
+ if ((73 & st.mode) === 0) {
439
+ (0, external_node_fs_namespaceObject.chmodSync)(binPath, 493);
440
+ debugDevice('phased-scroll: restored executable bit on', binPath);
441
+ }
442
+ } catch (err) {
443
+ debugDevice('phased-scroll: chmod self-heal failed', err);
444
+ }
436
445
  phasedScrollBinaryPath = binPath;
437
446
  return binPath;
438
447
  }
@@ -451,9 +460,10 @@ function runPhasedScroll(direction, pixels, steps) {
451
460
  if (0 === res.status) return true;
452
461
  if (!phasedScrollExecWarned) {
453
462
  phasedScrollExecWarned = true;
454
- console.warn(`[@midscene/computer] phased-scroll helper exited with status ${res.status}; falling back to keyboard/libnut. This usually means Accessibility permission has not been granted to the host process.`);
463
+ const hint = null === res.status ? `signal ${res.signal ?? 'unknown'}; the binary may not be executable (npm tarball extraction can drop the +x bit) or may be blocked by quarantine. Try: chmod +x "${bin}"` : 'this usually means Accessibility permission has not been granted to the host process (System Settings → Privacy & Security → Accessibility)';
464
+ console.warn(`[@midscene/computer] phased-scroll helper failed (exit=${res.status}, signal=${res.signal ?? 'none'}); falling back to keyboard/libnut. ${hint}`);
455
465
  }
456
- debugDevice('phased-scroll exited non-zero', res.status, res.error);
466
+ debugDevice('phased-scroll exited non-zero', res.status, res.signal, res.error);
457
467
  return false;
458
468
  } catch (err) {
459
469
  if (!phasedScrollExecWarned) {
@@ -573,7 +583,7 @@ Available Displays: ${displays.length > 0 ? displays.map((d)=>d.name).join(', ')
573
583
  }
574
584
  async healthCheck() {
575
585
  console.log('[HealthCheck] Starting health check...');
576
- console.log("[HealthCheck] @midscene/computer v1.8.7");
586
+ console.log("[HealthCheck] @midscene/computer v1.8.8-beta-20260601092817.0");
577
587
  console.log('[HealthCheck] Taking screenshot...');
578
588
  const screenshotTimeout = 15000;
579
589
  let timeoutId;
@@ -1796,7 +1806,7 @@ class ComputerMidsceneTools extends base_tools_namespaceObject.BaseMidsceneTools
1796
1806
  }
1797
1807
  const env_namespaceObject = require("@midscene/shared/env");
1798
1808
  function version() {
1799
- const currentVersion = "1.8.7";
1809
+ const currentVersion = "1.8.8-beta-20260601092817.0";
1800
1810
  console.log(`@midscene/computer v${currentVersion}`);
1801
1811
  return currentVersion;
1802
1812
  }
@@ -420,6 +420,15 @@ function getPhasedScrollBinary() {
420
420
  phasedScrollBinaryPath = null;
421
421
  return null;
422
422
  }
423
+ try {
424
+ const st = (0, external_node_fs_namespaceObject.statSync)(binPath);
425
+ if ((73 & st.mode) === 0) {
426
+ (0, external_node_fs_namespaceObject.chmodSync)(binPath, 493);
427
+ debugDevice('phased-scroll: restored executable bit on', binPath);
428
+ }
429
+ } catch (err) {
430
+ debugDevice('phased-scroll: chmod self-heal failed', err);
431
+ }
423
432
  phasedScrollBinaryPath = binPath;
424
433
  return binPath;
425
434
  }
@@ -438,9 +447,10 @@ function runPhasedScroll(direction, pixels, steps) {
438
447
  if (0 === res.status) return true;
439
448
  if (!phasedScrollExecWarned) {
440
449
  phasedScrollExecWarned = true;
441
- console.warn(`[@midscene/computer] phased-scroll helper exited with status ${res.status}; falling back to keyboard/libnut. This usually means Accessibility permission has not been granted to the host process.`);
450
+ const hint = null === res.status ? `signal ${res.signal ?? 'unknown'}; the binary may not be executable (npm tarball extraction can drop the +x bit) or may be blocked by quarantine. Try: chmod +x "${bin}"` : 'this usually means Accessibility permission has not been granted to the host process (System Settings → Privacy & Security → Accessibility)';
451
+ console.warn(`[@midscene/computer] phased-scroll helper failed (exit=${res.status}, signal=${res.signal ?? 'none'}); falling back to keyboard/libnut. ${hint}`);
442
452
  }
443
- debugDevice('phased-scroll exited non-zero', res.status, res.error);
453
+ debugDevice('phased-scroll exited non-zero', res.status, res.signal, res.error);
444
454
  return false;
445
455
  } catch (err) {
446
456
  if (!phasedScrollExecWarned) {
@@ -560,7 +570,7 @@ Available Displays: ${displays.length > 0 ? displays.map((d)=>d.name).join(', ')
560
570
  }
561
571
  async healthCheck() {
562
572
  console.log('[HealthCheck] Starting health check...');
563
- console.log("[HealthCheck] @midscene/computer v1.8.7");
573
+ console.log("[HealthCheck] @midscene/computer v1.8.8-beta-20260601092817.0");
564
574
  console.log('[HealthCheck] Taking screenshot...');
565
575
  const screenshotTimeout = 15000;
566
576
  let timeoutId;
@@ -1744,7 +1754,7 @@ class ComputerMCPServer extends mcp_namespaceObject.BaseMCPServer {
1744
1754
  constructor(toolsManager){
1745
1755
  super({
1746
1756
  name: '@midscene/computer-mcp',
1747
- version: "1.8.7",
1757
+ version: "1.8.8-beta-20260601092817.0",
1748
1758
  description: 'Control the computer desktop using natural language commands'
1749
1759
  }, toolsManager);
1750
1760
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midscene/computer",
3
- "version": "1.8.7",
3
+ "version": "1.8.8-beta-20260601092817.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.8.7",
42
- "@midscene/shared": "1.8.7"
41
+ "@midscene/core": "1.8.8-beta-20260601092817.0",
42
+ "@midscene/shared": "1.8.8-beta-20260601092817.0"
43
43
  },
44
44
  "optionalDependencies": {
45
45
  "node-mac-permissions": "2.5.0"