uwonbot 1.1.9 → 1.2.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/agent.js +7 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uwonbot",
3
- "version": "1.1.9",
3
+ "version": "1.2.0",
4
4
  "description": "Uwonbot AI Assistant CLI — Your AI controls your computer",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/agent.js CHANGED
@@ -93,6 +93,13 @@ async function loadNativeModules() {
93
93
  }
94
94
 
95
95
  async function getScreenSize() {
96
+ if (platform === 'darwin') {
97
+ try {
98
+ const { stdout } = await execAsync(`osascript -e 'tell application "Finder" to get bounds of window of desktop' 2>/dev/null || osascript -e 'tell application "System Events" to get {0, 0, 1920, 1080}'`);
99
+ const nums = stdout.trim().split(/[,\s]+/).map(Number);
100
+ if (nums.length >= 4) return { width: nums[2], height: nums[3] };
101
+ } catch {}
102
+ }
96
103
  if (robot?.screen?.width) {
97
104
  const w = await robot.screen.width();
98
105
  const h = await robot.screen.height();