oagi 0.6.1__tar.gz → 0.6.2__tar.gz

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.

Files changed (63) hide show
  1. {oagi-0.6.1 → oagi-0.6.2}/PKG-INFO +1 -1
  2. {oagi-0.6.1 → oagi-0.6.2}/pyproject.toml +1 -1
  3. {oagi-0.6.1 → oagi-0.6.2}/src/oagi/pil_image.py +2 -1
  4. {oagi-0.6.1 → oagi-0.6.2}/tests/test_pil_image.py +1 -1
  5. {oagi-0.6.1 → oagi-0.6.2}/tests/test_screenshot_maker.py +8 -8
  6. {oagi-0.6.1 → oagi-0.6.2}/uv.lock +1 -1
  7. {oagi-0.6.1 → oagi-0.6.2}/.github/workflows/ci.yml +0 -0
  8. {oagi-0.6.1 → oagi-0.6.2}/.github/workflows/release.yml +0 -0
  9. {oagi-0.6.1 → oagi-0.6.2}/.gitignore +0 -0
  10. {oagi-0.6.1 → oagi-0.6.2}/.python-version +0 -0
  11. {oagi-0.6.1 → oagi-0.6.2}/CONTRIBUTING.md +0 -0
  12. {oagi-0.6.1 → oagi-0.6.2}/LICENSE +0 -0
  13. {oagi-0.6.1 → oagi-0.6.2}/Makefile +0 -0
  14. {oagi-0.6.1 → oagi-0.6.2}/README.md +0 -0
  15. {oagi-0.6.1 → oagi-0.6.2}/examples/async_google_weather.py +0 -0
  16. {oagi-0.6.1 → oagi-0.6.2}/examples/continued_session.py +0 -0
  17. {oagi-0.6.1 → oagi-0.6.2}/examples/execute_task_auto.py +0 -0
  18. {oagi-0.6.1 → oagi-0.6.2}/examples/execute_task_manual.py +0 -0
  19. {oagi-0.6.1 → oagi-0.6.2}/examples/google_weather.py +0 -0
  20. {oagi-0.6.1 → oagi-0.6.2}/examples/hotel_booking.py +0 -0
  21. {oagi-0.6.1 → oagi-0.6.2}/examples/screenshot_with_config.py +0 -0
  22. {oagi-0.6.1 → oagi-0.6.2}/examples/single_step.py +0 -0
  23. {oagi-0.6.1 → oagi-0.6.2}/src/oagi/__init__.py +0 -0
  24. {oagi-0.6.1 → oagi-0.6.2}/src/oagi/async_pyautogui_action_handler.py +0 -0
  25. {oagi-0.6.1 → oagi-0.6.2}/src/oagi/async_screenshot_maker.py +0 -0
  26. {oagi-0.6.1 → oagi-0.6.2}/src/oagi/async_single_step.py +0 -0
  27. {oagi-0.6.1 → oagi-0.6.2}/src/oagi/client/__init__.py +0 -0
  28. {oagi-0.6.1 → oagi-0.6.2}/src/oagi/client/async_.py +0 -0
  29. {oagi-0.6.1 → oagi-0.6.2}/src/oagi/client/base.py +0 -0
  30. {oagi-0.6.1 → oagi-0.6.2}/src/oagi/client/sync.py +0 -0
  31. {oagi-0.6.1 → oagi-0.6.2}/src/oagi/exceptions.py +0 -0
  32. {oagi-0.6.1 → oagi-0.6.2}/src/oagi/logging.py +0 -0
  33. {oagi-0.6.1 → oagi-0.6.2}/src/oagi/pyautogui_action_handler.py +0 -0
  34. {oagi-0.6.1 → oagi-0.6.2}/src/oagi/screenshot_maker.py +0 -0
  35. {oagi-0.6.1 → oagi-0.6.2}/src/oagi/single_step.py +0 -0
  36. {oagi-0.6.1 → oagi-0.6.2}/src/oagi/task/__init__.py +0 -0
  37. {oagi-0.6.1 → oagi-0.6.2}/src/oagi/task/async_.py +0 -0
  38. {oagi-0.6.1 → oagi-0.6.2}/src/oagi/task/async_short.py +0 -0
  39. {oagi-0.6.1 → oagi-0.6.2}/src/oagi/task/base.py +0 -0
  40. {oagi-0.6.1 → oagi-0.6.2}/src/oagi/task/short.py +0 -0
  41. {oagi-0.6.1 → oagi-0.6.2}/src/oagi/task/sync.py +0 -0
  42. {oagi-0.6.1 → oagi-0.6.2}/src/oagi/types/__init__.py +0 -0
  43. {oagi-0.6.1 → oagi-0.6.2}/src/oagi/types/action_handler.py +0 -0
  44. {oagi-0.6.1 → oagi-0.6.2}/src/oagi/types/async_action_handler.py +0 -0
  45. {oagi-0.6.1 → oagi-0.6.2}/src/oagi/types/async_image_provider.py +0 -0
  46. {oagi-0.6.1 → oagi-0.6.2}/src/oagi/types/image.py +0 -0
  47. {oagi-0.6.1 → oagi-0.6.2}/src/oagi/types/image_provider.py +0 -0
  48. {oagi-0.6.1 → oagi-0.6.2}/src/oagi/types/models/__init__.py +0 -0
  49. {oagi-0.6.1 → oagi-0.6.2}/src/oagi/types/models/action.py +0 -0
  50. {oagi-0.6.1 → oagi-0.6.2}/src/oagi/types/models/client.py +0 -0
  51. {oagi-0.6.1 → oagi-0.6.2}/src/oagi/types/models/image_config.py +0 -0
  52. {oagi-0.6.1 → oagi-0.6.2}/src/oagi/types/models/step.py +0 -0
  53. {oagi-0.6.1 → oagi-0.6.2}/tests/__init__.py +0 -0
  54. {oagi-0.6.1 → oagi-0.6.2}/tests/conftest.py +0 -0
  55. {oagi-0.6.1 → oagi-0.6.2}/tests/test_async_client.py +0 -0
  56. {oagi-0.6.1 → oagi-0.6.2}/tests/test_async_handlers.py +0 -0
  57. {oagi-0.6.1 → oagi-0.6.2}/tests/test_async_task.py +0 -0
  58. {oagi-0.6.1 → oagi-0.6.2}/tests/test_logging.py +0 -0
  59. {oagi-0.6.1 → oagi-0.6.2}/tests/test_pyautogui_action_handler.py +0 -0
  60. {oagi-0.6.1 → oagi-0.6.2}/tests/test_short_task.py +0 -0
  61. {oagi-0.6.1 → oagi-0.6.2}/tests/test_single_step.py +0 -0
  62. {oagi-0.6.1 → oagi-0.6.2}/tests/test_sync_client.py +0 -0
  63. {oagi-0.6.1 → oagi-0.6.2}/tests/test_task.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: oagi
3
- Version: 0.6.1
3
+ Version: 0.6.2
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>
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "oagi"
7
- version = "0.6.1"
7
+ version = "0.6.2"
8
8
  description = "Official API of OpenAGI Foundation"
9
9
  readme = "README.md"
10
10
  license = { file = "LICENSE" }
@@ -9,7 +9,6 @@
9
9
  import io
10
10
  from typing import Optional
11
11
 
12
- import pyautogui
13
12
  from PIL import Image as PILImageLib
14
13
 
15
14
  from .types.models.image_config import ImageConfig
@@ -39,6 +38,8 @@ class PILImage:
39
38
  @classmethod
40
39
  def from_screenshot(cls, config: ImageConfig | None = None) -> "PILImage":
41
40
  """Create PILImage from screenshot."""
41
+ import pyautogui # noqa: PLC0415, avoid no DISPLAY issue in headless environment
42
+
42
43
  screenshot = pyautogui.screenshot()
43
44
  return cls(screenshot, config)
44
45
 
@@ -224,7 +224,7 @@ class TestPILImageFactoryMethods:
224
224
  assert isinstance(result, PILImage)
225
225
  assert result.image is mock_image
226
226
 
227
- @patch("oagi.pil_image.pyautogui.screenshot")
227
+ @patch("pyautogui.screenshot")
228
228
  def test_from_screenshot(self, mock_screenshot):
229
229
  mock_image = MagicMock()
230
230
  mock_screenshot.return_value = mock_image
@@ -27,7 +27,7 @@ def mock_screenshot_image():
27
27
 
28
28
 
29
29
  class TestScreenshotMaker:
30
- @patch("oagi.pil_image.pyautogui.screenshot")
30
+ @patch("pyautogui.screenshot")
31
31
  def test_screenshot_maker_takes_screenshot(
32
32
  self, mock_screenshot, mock_screenshot_image
33
33
  ):
@@ -42,7 +42,7 @@ class TestScreenshotMaker:
42
42
  assert isinstance(result, PILImage)
43
43
  assert result.image is mock_resized_image
44
44
 
45
- @patch("oagi.pil_image.pyautogui.screenshot")
45
+ @patch("pyautogui.screenshot")
46
46
  def test_screenshot_maker_stores_last_screenshot(self, mock_screenshot):
47
47
  def create_mock_image():
48
48
  mock = MagicMock()
@@ -66,7 +66,7 @@ class TestScreenshotMaker:
66
66
  assert maker.last_image() is second
67
67
  assert maker.last_image() is not first
68
68
 
69
- @patch("oagi.pil_image.pyautogui.screenshot")
69
+ @patch("pyautogui.screenshot")
70
70
  def test_screenshot_maker_last_image_creates_if_none(
71
71
  self, mock_screenshot, mock_screenshot_image
72
72
  ):
@@ -79,7 +79,7 @@ class TestScreenshotMaker:
79
79
  mock_screenshot.assert_called_once()
80
80
  assert isinstance(result, PILImage)
81
81
 
82
- @patch("oagi.pil_image.pyautogui.screenshot")
82
+ @patch("pyautogui.screenshot")
83
83
  def test_screenshot_image_returns_png_bytes(self, mock_screenshot):
84
84
  pil_image = PILImageLib.new("RGB", (10, 10), color="red")
85
85
  mock_screenshot.return_value = pil_image
@@ -99,7 +99,7 @@ class TestScreenshotMaker:
99
99
  (None, 600, (1920, 600)), # Uses original width
100
100
  ],
101
101
  )
102
- @patch("oagi.pil_image.pyautogui.screenshot")
102
+ @patch("pyautogui.screenshot")
103
103
  def test_screenshot_maker_resize_dimensions(
104
104
  self, mock_screenshot, mock_screenshot_image, width, height, expected_size
105
105
  ):
@@ -123,7 +123,7 @@ class TestScreenshotMaker:
123
123
  ("PNG", b"\x89PNG\r\n\x1a\n"),
124
124
  ],
125
125
  )
126
- @patch("oagi.pil_image.pyautogui.screenshot")
126
+ @patch("pyautogui.screenshot")
127
127
  def test_screenshot_maker_format_output(
128
128
  self, mock_screenshot, format_name, expected_signature
129
129
  ):
@@ -140,7 +140,7 @@ class TestScreenshotMaker:
140
140
  result_image = PILImageLib.open(BytesIO(image_bytes))
141
141
  assert result_image.format == format_name
142
142
 
143
- @patch("oagi.pil_image.pyautogui.screenshot")
143
+ @patch("pyautogui.screenshot")
144
144
  def test_screenshot_maker_default_resize_1260x700(
145
145
  self, mock_screenshot, mock_screenshot_image
146
146
  ):
@@ -156,7 +156,7 @@ class TestScreenshotMaker:
156
156
  assert isinstance(result, PILImage)
157
157
  assert result.image is mock_resized_image
158
158
 
159
- @patch("oagi.pil_image.pyautogui.screenshot")
159
+ @patch("pyautogui.screenshot")
160
160
  def test_resize_happens_before_format_conversion(self, mock_screenshot):
161
161
  original_image = PILImageLib.new("RGB", (2000, 1000), color="green")
162
162
  mock_screenshot.return_value = original_image
@@ -138,7 +138,7 @@ sdist = { url = "https://files.pythonhosted.org/packages/28/fa/b2ba8229b9381e8f6
138
138
 
139
139
  [[package]]
140
140
  name = "oagi"
141
- version = "0.6.1"
141
+ version = "0.6.2"
142
142
  source = { editable = "." }
143
143
  dependencies = [
144
144
  { name = "httpx" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes