oagi 0.4.0__tar.gz → 0.4.1__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 (57) hide show
  1. {oagi-0.4.0 → oagi-0.4.1}/PKG-INFO +1 -1
  2. {oagi-0.4.0 → oagi-0.4.1}/pyproject.toml +1 -1
  3. {oagi-0.4.0 → oagi-0.4.1}/src/oagi/pyautogui_action_handler.py +4 -0
  4. {oagi-0.4.0 → oagi-0.4.1}/src/oagi/types/models/action.py +1 -0
  5. {oagi-0.4.0 → oagi-0.4.1}/tests/test_async_task.py +3 -1
  6. {oagi-0.4.0 → oagi-0.4.1}/tests/test_pyautogui_action_handler.py +1 -0
  7. {oagi-0.4.0 → oagi-0.4.1}/tests/test_short_task.py +6 -2
  8. {oagi-0.4.0 → oagi-0.4.1}/uv.lock +1 -1
  9. {oagi-0.4.0 → oagi-0.4.1}/.github/workflows/ci.yml +0 -0
  10. {oagi-0.4.0 → oagi-0.4.1}/.github/workflows/release.yml +0 -0
  11. {oagi-0.4.0 → oagi-0.4.1}/.gitignore +0 -0
  12. {oagi-0.4.0 → oagi-0.4.1}/.python-version +0 -0
  13. {oagi-0.4.0 → oagi-0.4.1}/CONTRIBUTING.md +0 -0
  14. {oagi-0.4.0 → oagi-0.4.1}/LICENSE +0 -0
  15. {oagi-0.4.0 → oagi-0.4.1}/Makefile +0 -0
  16. {oagi-0.4.0 → oagi-0.4.1}/README.md +0 -0
  17. {oagi-0.4.0 → oagi-0.4.1}/examples/async_google_weather.py +0 -0
  18. {oagi-0.4.0 → oagi-0.4.1}/examples/execute_task_auto.py +0 -0
  19. {oagi-0.4.0 → oagi-0.4.1}/examples/execute_task_manual.py +0 -0
  20. {oagi-0.4.0 → oagi-0.4.1}/examples/google_weather.py +0 -0
  21. {oagi-0.4.0 → oagi-0.4.1}/examples/hotel_booking.py +0 -0
  22. {oagi-0.4.0 → oagi-0.4.1}/examples/screenshot_with_config.py +0 -0
  23. {oagi-0.4.0 → oagi-0.4.1}/examples/single_step.py +0 -0
  24. {oagi-0.4.0 → oagi-0.4.1}/src/oagi/__init__.py +0 -0
  25. {oagi-0.4.0 → oagi-0.4.1}/src/oagi/async_client.py +0 -0
  26. {oagi-0.4.0 → oagi-0.4.1}/src/oagi/async_pyautogui_action_handler.py +0 -0
  27. {oagi-0.4.0 → oagi-0.4.1}/src/oagi/async_screenshot_maker.py +0 -0
  28. {oagi-0.4.0 → oagi-0.4.1}/src/oagi/async_short_task.py +3 -3
  29. {oagi-0.4.0 → oagi-0.4.1}/src/oagi/async_single_step.py +0 -0
  30. {oagi-0.4.0 → oagi-0.4.1}/src/oagi/async_task.py +0 -0
  31. {oagi-0.4.0 → oagi-0.4.1}/src/oagi/exceptions.py +0 -0
  32. {oagi-0.4.0 → oagi-0.4.1}/src/oagi/logging.py +0 -0
  33. {oagi-0.4.0 → oagi-0.4.1}/src/oagi/pil_image.py +0 -0
  34. {oagi-0.4.0 → oagi-0.4.1}/src/oagi/screenshot_maker.py +0 -0
  35. {oagi-0.4.0 → oagi-0.4.1}/src/oagi/short_task.py +3 -3
  36. {oagi-0.4.0 → oagi-0.4.1}/src/oagi/single_step.py +0 -0
  37. {oagi-0.4.0 → oagi-0.4.1}/src/oagi/sync_client.py +0 -0
  38. {oagi-0.4.0 → oagi-0.4.1}/src/oagi/task.py +0 -0
  39. {oagi-0.4.0 → oagi-0.4.1}/src/oagi/types/__init__.py +0 -0
  40. {oagi-0.4.0 → oagi-0.4.1}/src/oagi/types/action_handler.py +0 -0
  41. {oagi-0.4.0 → oagi-0.4.1}/src/oagi/types/async_action_handler.py +0 -0
  42. {oagi-0.4.0 → oagi-0.4.1}/src/oagi/types/async_image_provider.py +0 -0
  43. {oagi-0.4.0 → oagi-0.4.1}/src/oagi/types/image.py +0 -0
  44. {oagi-0.4.0 → oagi-0.4.1}/src/oagi/types/image_provider.py +0 -0
  45. {oagi-0.4.0 → oagi-0.4.1}/src/oagi/types/models/__init__.py +0 -0
  46. {oagi-0.4.0 → oagi-0.4.1}/src/oagi/types/models/image_config.py +0 -0
  47. {oagi-0.4.0 → oagi-0.4.1}/src/oagi/types/models/step.py +0 -0
  48. {oagi-0.4.0 → oagi-0.4.1}/tests/__init__.py +0 -0
  49. {oagi-0.4.0 → oagi-0.4.1}/tests/conftest.py +0 -0
  50. {oagi-0.4.0 → oagi-0.4.1}/tests/test_async_client.py +0 -0
  51. {oagi-0.4.0 → oagi-0.4.1}/tests/test_async_handlers.py +0 -0
  52. {oagi-0.4.0 → oagi-0.4.1}/tests/test_logging.py +0 -0
  53. {oagi-0.4.0 → oagi-0.4.1}/tests/test_pil_image.py +0 -0
  54. {oagi-0.4.0 → oagi-0.4.1}/tests/test_screenshot_maker.py +0 -0
  55. {oagi-0.4.0 → oagi-0.4.1}/tests/test_single_step.py +0 -0
  56. {oagi-0.4.0 → oagi-0.4.1}/tests/test_sync_client.py +0 -0
  57. {oagi-0.4.0 → oagi-0.4.1}/tests/test_task.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: oagi
3
- Version: 0.4.0
3
+ Version: 0.4.1
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.4.0"
7
+ version = "0.4.1"
8
8
  description = "Official API of OpenAGI Foundation"
9
9
  readme = "README.md"
10
10
  license = { file = "LICENSE" }
@@ -115,6 +115,10 @@ class PyautoguiActionHandler:
115
115
  x, y = self._parse_coords(arg)
116
116
  pyautogui.doubleClick(x, y)
117
117
 
118
+ case ActionType.LEFT_TRIPLE:
119
+ x, y = self._parse_coords(arg)
120
+ pyautogui.tripleClick(x, y)
121
+
118
122
  case ActionType.RIGHT_SINGLE:
119
123
  x, y = self._parse_coords(arg)
120
124
  pyautogui.rightClick(x, y)
@@ -14,6 +14,7 @@ from pydantic import BaseModel, Field
14
14
  class ActionType(str, Enum):
15
15
  CLICK = "click"
16
16
  LEFT_DOUBLE = "left_double"
17
+ LEFT_TRIPLE = "left_triple"
17
18
  RIGHT_SINGLE = "right_single"
18
19
  DRAG = "drag"
19
20
  HOTKEY = "hotkey"
@@ -175,7 +175,9 @@ class TestAsyncShortTask:
175
175
  )
176
176
 
177
177
  assert result is True
178
- assert mock_executor.call_count == 1
178
+ assert (
179
+ mock_executor.call_count == 2
180
+ ) # Called for both steps including the completed one
179
181
  assert mock_image_provider.call_count == 2
180
182
 
181
183
  await task.close()
@@ -36,6 +36,7 @@ def handler(mock_pyautogui):
36
36
  [
37
37
  (ActionType.CLICK, "500, 300", "click", (960, 324)),
38
38
  (ActionType.LEFT_DOUBLE, "400, 250", "doubleClick", (768, 270)),
39
+ (ActionType.LEFT_TRIPLE, "350, 200", "tripleClick", (672, 216)),
39
40
  (ActionType.RIGHT_SINGLE, "600, 400", "rightClick", (1152, 432)),
40
41
  ],
41
42
  )
@@ -60,7 +60,9 @@ class TestShortTaskAutoMode:
60
60
  )
61
61
 
62
62
  assert result is True
63
- assert mock_executor.call_count == 2 # Called for first 2 steps
63
+ assert (
64
+ mock_executor.call_count == 3
65
+ ) # Called for all 3 steps including the completed one
64
66
  assert mock_image_provider.call_count == 3 # Called for all 3 steps
65
67
 
66
68
  def test_auto_mode_max_steps_reached(self, short_task, sample_llm_response):
@@ -133,7 +135,9 @@ class TestShortTaskAutoMode:
133
135
  )
134
136
 
135
137
  assert result is True
136
- assert mock_executor.call_count == 0 # No actions to execute
138
+ assert (
139
+ mock_executor.call_count == 1
140
+ ) # Actions are executed even when task is complete
137
141
  assert mock_image_provider.call_count == 1
138
142
 
139
143
  def test_auto_mode_with_default_parameters(
@@ -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.4.0"
141
+ version = "0.4.1"
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
@@ -41,14 +41,14 @@ class AsyncShortTask(AsyncTask):
41
41
  logger.debug(f"Async auto mode step {i + 1}/{max_steps}")
42
42
  image = await image_provider()
43
43
  step = await self.step(image)
44
+ if executor:
45
+ logger.debug(f"Executing {len(step.actions)} actions asynchronously")
46
+ await executor(step.actions)
44
47
  if step.stop:
45
48
  logger.info(
46
49
  f"Async auto mode completed successfully after {i + 1} steps"
47
50
  )
48
51
  return True
49
- if executor:
50
- logger.debug(f"Executing {len(step.actions)} actions asynchronously")
51
- await executor(step.actions)
52
52
 
53
53
  logger.warning(
54
54
  f"Async auto mode reached max steps ({max_steps}) without completion"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -41,12 +41,12 @@ class ShortTask(Task):
41
41
  logger.debug(f"Auto mode step {i + 1}/{max_steps}")
42
42
  image = image_provider()
43
43
  step = self.step(image)
44
- if step.stop:
45
- logger.info(f"Auto mode completed successfully after {i + 1} steps")
46
- return True
47
44
  if executor:
48
45
  logger.debug(f"Executing {len(step.actions)} actions")
49
46
  executor(step.actions)
47
+ if step.stop:
48
+ logger.info(f"Auto mode completed successfully after {i + 1} steps")
49
+ return True
50
50
 
51
51
  logger.warning(f"Auto mode reached max steps ({max_steps}) without completion")
52
52
  return False
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