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.
- {oagi-0.4.0 → oagi-0.4.1}/PKG-INFO +1 -1
- {oagi-0.4.0 → oagi-0.4.1}/pyproject.toml +1 -1
- {oagi-0.4.0 → oagi-0.4.1}/src/oagi/pyautogui_action_handler.py +4 -0
- {oagi-0.4.0 → oagi-0.4.1}/src/oagi/types/models/action.py +1 -0
- {oagi-0.4.0 → oagi-0.4.1}/tests/test_async_task.py +3 -1
- {oagi-0.4.0 → oagi-0.4.1}/tests/test_pyautogui_action_handler.py +1 -0
- {oagi-0.4.0 → oagi-0.4.1}/tests/test_short_task.py +6 -2
- {oagi-0.4.0 → oagi-0.4.1}/uv.lock +1 -1
- {oagi-0.4.0 → oagi-0.4.1}/.github/workflows/ci.yml +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/.github/workflows/release.yml +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/.gitignore +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/.python-version +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/CONTRIBUTING.md +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/LICENSE +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/Makefile +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/README.md +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/examples/async_google_weather.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/examples/execute_task_auto.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/examples/execute_task_manual.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/examples/google_weather.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/examples/hotel_booking.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/examples/screenshot_with_config.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/examples/single_step.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/src/oagi/__init__.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/src/oagi/async_client.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/src/oagi/async_pyautogui_action_handler.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/src/oagi/async_screenshot_maker.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/src/oagi/async_short_task.py +3 -3
- {oagi-0.4.0 → oagi-0.4.1}/src/oagi/async_single_step.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/src/oagi/async_task.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/src/oagi/exceptions.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/src/oagi/logging.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/src/oagi/pil_image.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/src/oagi/screenshot_maker.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/src/oagi/short_task.py +3 -3
- {oagi-0.4.0 → oagi-0.4.1}/src/oagi/single_step.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/src/oagi/sync_client.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/src/oagi/task.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/src/oagi/types/__init__.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/src/oagi/types/action_handler.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/src/oagi/types/async_action_handler.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/src/oagi/types/async_image_provider.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/src/oagi/types/image.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/src/oagi/types/image_provider.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/src/oagi/types/models/__init__.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/src/oagi/types/models/image_config.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/src/oagi/types/models/step.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/tests/__init__.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/tests/conftest.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/tests/test_async_client.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/tests/test_async_handlers.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/tests/test_logging.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/tests/test_pil_image.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/tests/test_screenshot_maker.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/tests/test_single_step.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/tests/test_sync_client.py +0 -0
- {oagi-0.4.0 → oagi-0.4.1}/tests/test_task.py +0 -0
|
@@ -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)
|
|
@@ -175,7 +175,9 @@ class TestAsyncShortTask:
|
|
|
175
175
|
)
|
|
176
176
|
|
|
177
177
|
assert result is True
|
|
178
|
-
assert
|
|
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
|
|
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
|
|
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(
|
|
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
|
|
@@ -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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|