oagi 0.4.2__py3-none-any.whl → 0.4.3__py3-none-any.whl

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.

Potentially problematic release.


This version of oagi might be problematic. Click here for more details.

@@ -101,9 +101,26 @@ class PyautoguiActionHandler:
101
101
  self.caps_manager = CapsLockManager(mode=self.config.capslock_mode)
102
102
 
103
103
  def _denormalize_coords(self, x: float, y: float) -> tuple[int, int]:
104
- """Convert coordinates from 0-1000 range to actual screen coordinates."""
104
+ """Convert coordinates from 0-1000 range to actual screen coordinates.
105
+
106
+ Also handles corner coordinates to prevent PyAutoGUI fail-safe trigger.
107
+ Corner coordinates (0,0), (0,max), (max,0), (max,max) are offset by 1 pixel.
108
+ """
105
109
  screen_x = int(x * self.screen_width / 1000)
106
110
  screen_y = int(y * self.screen_height / 1000)
111
+
112
+ # Prevent fail-safe by adjusting corner coordinates
113
+ # Check if coordinates are at screen corners (with small tolerance)
114
+ if screen_x < 1:
115
+ screen_x = 1
116
+ elif screen_x > self.screen_width - 1:
117
+ screen_x = self.screen_width - 1
118
+
119
+ if screen_y < 1:
120
+ screen_y = 1
121
+ elif screen_y > self.screen_height - 1:
122
+ screen_y = self.screen_height - 1
123
+
107
124
  return screen_x, screen_y
108
125
 
109
126
  def _parse_coords(self, args_str: str) -> tuple[int, int]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: oagi
3
- Version: 0.4.2
3
+ Version: 0.4.3
4
4
  Summary: Official API of OpenAGI Foundation
5
5
  Project-URL: Homepage, https://github.com/agiopen-org/oagi
6
6
  Author-email: OpenAGI Foundation <contact@agiopen.org>
@@ -8,7 +8,7 @@ oagi/async_task.py,sha256=bclqtgg7mI2WAp-62jOz044tVk4wruycpn9NYDncnA8,4145
8
8
  oagi/exceptions.py,sha256=VMwVS8ouE9nHhBpN3AZMYt5_U2kGcihWaTnBhoQLquo,1662
9
9
  oagi/logging.py,sha256=CWe89mA5MKTipIvfrqSYkv2CAFNBSwHMDQMDkG_g64g,1350
10
10
  oagi/pil_image.py,sha256=Zp7YNwyE_AT25ZEFsWKbzMxbO8JOQsJ1Espph5ye8k8,3804
11
- oagi/pyautogui_action_handler.py,sha256=11-xObprbuJYjoLD1AKbR_4OTdjvXO5ixKaTi_I4gwA,9211
11
+ oagi/pyautogui_action_handler.py,sha256=8IFbU4p907L4b3TV3Eeh0-c-pYL2lYw-_qf1r8TtPTw,9811
12
12
  oagi/screenshot_maker.py,sha256=sVuW7jn-K4FmLhmYI-akdNI-UVcTeBzh9P1_qJhoq1s,1282
13
13
  oagi/short_task.py,sha256=9l1PDX70vDUEX2CIJ66yaAtb96P3mK_m95JffspnYFI,1779
14
14
  oagi/single_step.py,sha256=djhGOHzA5Y3-9_ity9QiJr_ObZZ04blSmNZsLXXXfkg,2939
@@ -24,7 +24,7 @@ oagi/types/models/__init__.py,sha256=bVzzGxb6lVxAQyJpy0Z1QknSe-xC3g4OIDr7t-p_3Ys
24
24
  oagi/types/models/action.py,sha256=hh6mRRSSWgrW4jpZo71zGMCOcZpV5_COu4148uG6G48,967
25
25
  oagi/types/models/image_config.py,sha256=tl6abVg_-IAPLwpaWprgknXu7wRWriMg-AEVyUX73v0,1567
26
26
  oagi/types/models/step.py,sha256=RSI4H_2rrUBq_xyCoWKaq7JHdJWNobtQppaKC1l0aWU,471
27
- oagi-0.4.2.dist-info/METADATA,sha256=6s93KoSnU41E_vp-CVyPykBA2zxHrTatFs-Ru5OztBc,4799
28
- oagi-0.4.2.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
29
- oagi-0.4.2.dist-info/licenses/LICENSE,sha256=sy5DLA2M29jFT4UfWsuBF9BAr3FnRkYtnAu6oDZiIf8,1075
30
- oagi-0.4.2.dist-info/RECORD,,
27
+ oagi-0.4.3.dist-info/METADATA,sha256=fdp0bxPUM_ajJpP1pGxC8OVQy24kgvCQTHckH85XGZI,4799
28
+ oagi-0.4.3.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
29
+ oagi-0.4.3.dist-info/licenses/LICENSE,sha256=sy5DLA2M29jFT4UfWsuBF9BAr3FnRkYtnAu6oDZiIf8,1075
30
+ oagi-0.4.3.dist-info/RECORD,,
File without changes