oagi-core 0.10.1__py3-none-any.whl → 0.10.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.
- oagi/agent/default.py +16 -3
- oagi/agent/factories.py +26 -10
- oagi/agent/observer/exporters.py +142 -251
- oagi/agent/observer/report_template.html +455 -0
- oagi/agent/tasker/planner.py +2 -1
- oagi/agent/tasker/taskee_agent.py +19 -4
- oagi/agent/tasker/tasker_agent.py +15 -4
- oagi/cli/agent.py +35 -12
- oagi/cli/display.py +2 -1
- oagi/cli/server.py +1 -1
- oagi/cli/utils.py +4 -3
- oagi/client/async_.py +19 -6
- oagi/client/base.py +14 -16
- oagi/client/sync.py +19 -6
- oagi/constants.py +43 -0
- oagi/handler/pyautogui_action_handler.py +14 -23
- oagi/server/config.py +6 -3
- oagi/server/models.py +5 -3
- oagi/server/session_store.py +6 -4
- oagi/server/socketio_server.py +22 -20
- oagi/task/async_.py +4 -3
- oagi/task/async_short.py +3 -2
- oagi/task/base.py +2 -1
- oagi/task/short.py +3 -2
- oagi/task/sync.py +4 -3
- oagi/types/__init__.py +12 -1
- oagi/types/models/__init__.py +10 -1
- oagi/types/models/action.py +51 -0
- {oagi_core-0.10.1.dist-info → oagi_core-0.10.3.dist-info}/METADATA +1 -1
- {oagi_core-0.10.1.dist-info → oagi_core-0.10.3.dist-info}/RECORD +33 -31
- {oagi_core-0.10.1.dist-info → oagi_core-0.10.3.dist-info}/WHEEL +0 -0
- {oagi_core-0.10.1.dist-info → oagi_core-0.10.3.dist-info}/entry_points.txt +0 -0
- {oagi_core-0.10.1.dist-info → oagi_core-0.10.3.dist-info}/licenses/LICENSE +0 -0
oagi/task/sync.py
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
import warnings
|
|
10
10
|
|
|
11
11
|
from ..client import SyncClient
|
|
12
|
+
from ..constants import DEFAULT_MAX_STEPS, MODEL_ACTOR
|
|
12
13
|
from ..types import URL, Image, Step
|
|
13
14
|
from .base import BaseActor
|
|
14
15
|
|
|
@@ -20,7 +21,7 @@ class Actor(BaseActor):
|
|
|
20
21
|
self,
|
|
21
22
|
api_key: str | None = None,
|
|
22
23
|
base_url: str | None = None,
|
|
23
|
-
model: str =
|
|
24
|
+
model: str = MODEL_ACTOR,
|
|
24
25
|
temperature: float | None = None,
|
|
25
26
|
):
|
|
26
27
|
super().__init__(api_key, base_url, model, temperature)
|
|
@@ -31,7 +32,7 @@ class Actor(BaseActor):
|
|
|
31
32
|
def init_task(
|
|
32
33
|
self,
|
|
33
34
|
task_desc: str,
|
|
34
|
-
max_steps: int =
|
|
35
|
+
max_steps: int = DEFAULT_MAX_STEPS,
|
|
35
36
|
):
|
|
36
37
|
"""Initialize a new task with the given description.
|
|
37
38
|
|
|
@@ -87,7 +88,7 @@ class Task(Actor):
|
|
|
87
88
|
self,
|
|
88
89
|
api_key: str | None = None,
|
|
89
90
|
base_url: str | None = None,
|
|
90
|
-
model: str =
|
|
91
|
+
model: str = MODEL_ACTOR,
|
|
91
92
|
temperature: float | None = None,
|
|
92
93
|
):
|
|
93
94
|
warnings.warn(
|
oagi/types/__init__.py
CHANGED
|
@@ -11,7 +11,15 @@ from .async_action_handler import AsyncActionHandler
|
|
|
11
11
|
from .async_image_provider import AsyncImageProvider
|
|
12
12
|
from .image import Image
|
|
13
13
|
from .image_provider import ImageProvider
|
|
14
|
-
from .models import
|
|
14
|
+
from .models import (
|
|
15
|
+
Action,
|
|
16
|
+
ActionType,
|
|
17
|
+
ImageConfig,
|
|
18
|
+
Step,
|
|
19
|
+
parse_coords,
|
|
20
|
+
parse_drag_coords,
|
|
21
|
+
parse_scroll,
|
|
22
|
+
)
|
|
15
23
|
from .step_observer import (
|
|
16
24
|
ActionEvent,
|
|
17
25
|
AsyncObserver,
|
|
@@ -47,4 +55,7 @@ __all__ = [
|
|
|
47
55
|
"ImageProvider",
|
|
48
56
|
"AsyncImageProvider",
|
|
49
57
|
"URL",
|
|
58
|
+
"parse_coords",
|
|
59
|
+
"parse_drag_coords",
|
|
60
|
+
"parse_scroll",
|
|
50
61
|
]
|
oagi/types/models/__init__.py
CHANGED
|
@@ -6,7 +6,13 @@
|
|
|
6
6
|
# Licensed under the MIT License.
|
|
7
7
|
# -----------------------------------------------------------------------------
|
|
8
8
|
|
|
9
|
-
from .action import
|
|
9
|
+
from .action import (
|
|
10
|
+
Action,
|
|
11
|
+
ActionType,
|
|
12
|
+
parse_coords,
|
|
13
|
+
parse_drag_coords,
|
|
14
|
+
parse_scroll,
|
|
15
|
+
)
|
|
10
16
|
from .client import (
|
|
11
17
|
ErrorDetail,
|
|
12
18
|
ErrorResponse,
|
|
@@ -29,4 +35,7 @@ __all__ = [
|
|
|
29
35
|
"Step",
|
|
30
36
|
"UploadFileResponse",
|
|
31
37
|
"Usage",
|
|
38
|
+
"parse_coords",
|
|
39
|
+
"parse_drag_coords",
|
|
40
|
+
"parse_scroll",
|
|
32
41
|
]
|
oagi/types/models/action.py
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
# Licensed under the MIT License.
|
|
7
7
|
# -----------------------------------------------------------------------------
|
|
8
8
|
|
|
9
|
+
import re
|
|
9
10
|
from enum import Enum
|
|
10
11
|
|
|
11
12
|
from pydantic import BaseModel, Field
|
|
@@ -31,3 +32,53 @@ class Action(BaseModel):
|
|
|
31
32
|
count: int | None = Field(
|
|
32
33
|
default=1, ge=1, description="Number of times to repeat the action"
|
|
33
34
|
)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def parse_coords(args_str: str) -> tuple[int, int] | None:
|
|
38
|
+
"""Extract x, y coordinates from argument string.
|
|
39
|
+
|
|
40
|
+
Args:
|
|
41
|
+
args_str: Argument string in format "x, y" (normalized 0-1000 range)
|
|
42
|
+
|
|
43
|
+
Returns:
|
|
44
|
+
Tuple of (x, y) coordinates, or None if parsing fails
|
|
45
|
+
"""
|
|
46
|
+
match = re.match(r"(\d+),\s*(\d+)", args_str)
|
|
47
|
+
if not match:
|
|
48
|
+
return None
|
|
49
|
+
return int(match.group(1)), int(match.group(2))
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def parse_drag_coords(args_str: str) -> tuple[int, int, int, int] | None:
|
|
53
|
+
"""Extract x1, y1, x2, y2 coordinates from drag argument string.
|
|
54
|
+
|
|
55
|
+
Args:
|
|
56
|
+
args_str: Argument string in format "x1, y1, x2, y2" (normalized 0-1000 range)
|
|
57
|
+
|
|
58
|
+
Returns:
|
|
59
|
+
Tuple of (x1, y1, x2, y2) coordinates, or None if parsing fails
|
|
60
|
+
"""
|
|
61
|
+
match = re.match(r"(\d+),\s*(\d+),\s*(\d+),\s*(\d+)", args_str)
|
|
62
|
+
if not match:
|
|
63
|
+
return None
|
|
64
|
+
return (
|
|
65
|
+
int(match.group(1)),
|
|
66
|
+
int(match.group(2)),
|
|
67
|
+
int(match.group(3)),
|
|
68
|
+
int(match.group(4)),
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def parse_scroll(args_str: str) -> tuple[int, int, str] | None:
|
|
73
|
+
"""Extract x, y, direction from scroll argument string.
|
|
74
|
+
|
|
75
|
+
Args:
|
|
76
|
+
args_str: Argument string in format "x, y, direction" (normalized 0-1000 range)
|
|
77
|
+
|
|
78
|
+
Returns:
|
|
79
|
+
Tuple of (x, y, direction) where direction is "up" or "down", or None if parsing fails
|
|
80
|
+
"""
|
|
81
|
+
match = re.match(r"(\d+),\s*(\d+),\s*(\w+)", args_str)
|
|
82
|
+
if not match:
|
|
83
|
+
return None
|
|
84
|
+
return int(match.group(1)), int(match.group(2)), match.group(3).lower()
|
|
@@ -1,54 +1,56 @@
|
|
|
1
1
|
oagi/__init__.py,sha256=xI--F3inDKuNQ2caI4Xx0rdFuUxO24cEeAX6WoGi170,4836
|
|
2
|
+
oagi/constants.py,sha256=ZhlY_g3Z8w8njvoVykuGe3nty8A1LoGpRo5oJPh6qS0,1142
|
|
2
3
|
oagi/exceptions.py,sha256=Rco37GQTPYUfc2vRO3hozxPF_s8mKFDpFvBg2UKWo3Y,3066
|
|
3
4
|
oagi/logging.py,sha256=YT3KCMFj5fzO98R9xlDDgfSotUuz1xRD6OZeYM2rKoo,1760
|
|
4
5
|
oagi/agent/__init__.py,sha256=KTVLUMhbjgpTJoOWMUZkkiqwhgumvbOZV2tJ9XCLfao,901
|
|
5
|
-
oagi/agent/default.py,sha256=
|
|
6
|
-
oagi/agent/factories.py,sha256=
|
|
6
|
+
oagi/agent/default.py,sha256=zHcTGyMv5QKE2tqwAsKsN6YyMWeSxCGCMzmv2PHdzMk,4520
|
|
7
|
+
oagi/agent/factories.py,sha256=i-GIOEYmwBiiTq4W8UzKfZPkuZcMuOrlc_8dkxM1zLs,2727
|
|
7
8
|
oagi/agent/protocol.py,sha256=IQJGiMN4yZIacrh5e9JQsoM9TyHb8wJRQR4LAk8dSA0,1615
|
|
8
9
|
oagi/agent/registry.py,sha256=7bMA2-pH3xQ9ZavrHB_mnc2fOGSMeICPbOGtHoM7It0,4851
|
|
9
10
|
oagi/agent/observer/__init__.py,sha256=YZ4qvR22pFB0mSDMX6iKKLbBA1dB-nqC7HZVvdMIVGw,909
|
|
10
11
|
oagi/agent/observer/agent_observer.py,sha256=fBs4X2_YKhYVThJocjMM-65JAHQSCLJPvzy8OXMt5pY,2864
|
|
11
12
|
oagi/agent/observer/events.py,sha256=xc3Z1UGpX69BqhO9cQiGmnRhDZbMYya1kuXm6bXtjWI,625
|
|
12
|
-
oagi/agent/observer/exporters.py,sha256=
|
|
13
|
+
oagi/agent/observer/exporters.py,sha256=uwVMIvsa5HR4VatvxJscvRErr7sUdjFtR5GOA6xms1w,11830
|
|
13
14
|
oagi/agent/observer/protocol.py,sha256=jyRXoCG4CdvaPaDASar1rSbwc7vdpkar39KkGpwf8jw,411
|
|
15
|
+
oagi/agent/observer/report_template.html,sha256=NOp280_-P2g_4TYbtqPhYxv-y_x3PwovoDUt_CajdoY,14729
|
|
14
16
|
oagi/agent/tasker/__init__.py,sha256=1iTEFe7lzcqh96TL9R0QADPpLJLrUP0shtZ4DlZSv_8,764
|
|
15
17
|
oagi/agent/tasker/memory.py,sha256=NR13l5yxRA8GUE-oupAP4W1n80ZNG0SxpUfxsNltkUY,5033
|
|
16
18
|
oagi/agent/tasker/models.py,sha256=sMQgwIMKhT1tvVF2yoc1hh8GwEiJ6i6qPMy9WoiA8JM,2137
|
|
17
|
-
oagi/agent/tasker/planner.py,sha256=
|
|
18
|
-
oagi/agent/tasker/taskee_agent.py,sha256=
|
|
19
|
-
oagi/agent/tasker/tasker_agent.py,sha256=
|
|
19
|
+
oagi/agent/tasker/planner.py,sha256=RxDilAGJAaC8gu9EkTwBATDLv7lQlzc3LMyxs0KMR74,14516
|
|
20
|
+
oagi/agent/tasker/taskee_agent.py,sha256=MHl_ZH0p8fJ9iSG-VZe_4WUzdyjg4cLZbvEnccQcV2w,17263
|
|
21
|
+
oagi/agent/tasker/tasker_agent.py,sha256=P0O4Ned8U0JfMFLWT2JCYXyfuHbU8XziPSotrRuNzMM,11157
|
|
20
22
|
oagi/cli/__init__.py,sha256=aDnJViTseShpo5fdGPTj-ELysZhmdvB6Z8mEj2D-_N4,359
|
|
21
|
-
oagi/cli/agent.py,sha256=
|
|
22
|
-
oagi/cli/display.py,sha256=
|
|
23
|
+
oagi/cli/agent.py,sha256=eFwdVZdZcG9ZTMupwoH_JqKSRKDAto3j3z4Xqz5XH7g,10225
|
|
24
|
+
oagi/cli/display.py,sha256=Y8_Dn5RIEfRqZUHVGF6URItW0C3XC7bPLWoAmmhvBS0,1829
|
|
23
25
|
oagi/cli/main.py,sha256=faHns0HaQCGyylDn2YZLpjQESuEiMYjoQVoMkt8FsH4,2292
|
|
24
|
-
oagi/cli/server.py,sha256=
|
|
26
|
+
oagi/cli/server.py,sha256=JFpzCOeaftITxesz8Ya-_Efs03bgotBg7aYwmMZhPwU,3033
|
|
25
27
|
oagi/cli/tracking.py,sha256=TdrAcNq_-OjgXltFCoFc8NsO_k6yHbdzHnMn3vAAvKA,1707
|
|
26
|
-
oagi/cli/utils.py,sha256=
|
|
28
|
+
oagi/cli/utils.py,sha256=zIkTrr-ai__3cGSaxiXY-OJs69Fcxd1sHb2FoeyHFtE,3034
|
|
27
29
|
oagi/client/__init__.py,sha256=F9DShPUdb6vZYmN1fpM1VYzp4MWqUao_e_R1KYmM4Q4,410
|
|
28
|
-
oagi/client/async_.py,sha256=
|
|
29
|
-
oagi/client/base.py,sha256=
|
|
30
|
-
oagi/client/sync.py,sha256=
|
|
30
|
+
oagi/client/async_.py,sha256=Z8DyQHEl_XAyw1Fs0o3qQzEX9lGlZhqCTSEtQh5XHSw,11204
|
|
31
|
+
oagi/client/base.py,sha256=tKYmhJufg7sqEOOp7nn0S9jv4hDYfM-pBuluh0pqew0,16756
|
|
32
|
+
oagi/client/sync.py,sha256=CcesgCk_b26v_DF9OKpjfSHKSMjK0N2ywAxwaGnJ4fo,11040
|
|
31
33
|
oagi/handler/__init__.py,sha256=Ha11L42K33K3L9S4lQ10UC0DnD5g6egtQUsJpS_tKgg,835
|
|
32
34
|
oagi/handler/_macos.py,sha256=aHkp-xGzvWL_SBjuS690i9jf93OITFJfGHzHeYCK65I,1957
|
|
33
35
|
oagi/handler/async_pyautogui_action_handler.py,sha256=hQzseR1yBD0QMpgsEVNsUmuApGVAIIyGYD06BXd82Dc,1615
|
|
34
36
|
oagi/handler/async_screenshot_maker.py,sha256=8QCtUV59ozpOpvkqhUMb8QDI2qje2gsoFT1qB60tfJM,1689
|
|
35
37
|
oagi/handler/pil_image.py,sha256=yUcAoGBL-aZ0PCjSaAmQsDwtyzjldXHqXQp_OYRk6e4,4080
|
|
36
|
-
oagi/handler/pyautogui_action_handler.py,sha256=
|
|
38
|
+
oagi/handler/pyautogui_action_handler.py,sha256=vxSkD_Xsshxb6cfoFFd_zpAwQm21cYTk4w1BGenKZes,10604
|
|
37
39
|
oagi/handler/screenshot_maker.py,sha256=j1jTW-awx3vAnb1N5_FIMBC0Z-rNVQbiBP-S6Gh5dlE,1284
|
|
38
40
|
oagi/server/__init__.py,sha256=uZx8u3vJUb87kkNzwmmVrgAgbqRu0WxyMIQCLSx56kk,452
|
|
39
41
|
oagi/server/agent_wrappers.py,sha256=j8va0A7u80bzOM82nndAplK1uaO_T3kufHWScK6kfWM,3263
|
|
40
|
-
oagi/server/config.py,sha256=
|
|
42
|
+
oagi/server/config.py,sha256=AJ1PLKuxrc6pRuur1hm5DwG2g2otxPwOCfKgzIACkSk,1691
|
|
41
43
|
oagi/server/main.py,sha256=jnTxk7Prc5CzlsUnkBNJp4MOoYN-7HN_Be_m1d3COa8,4829
|
|
42
|
-
oagi/server/models.py,sha256=
|
|
43
|
-
oagi/server/session_store.py,sha256=
|
|
44
|
-
oagi/server/socketio_server.py,sha256=
|
|
44
|
+
oagi/server/models.py,sha256=DXjuf5icpCOgCUGMzzoLfRCoreM541KBWKBZnCk5_S0,2688
|
|
45
|
+
oagi/server/session_store.py,sha256=319CDqGT9bnqaHK5JiLCG2mKxJmIbq1eH3BpjhWLxdI,3685
|
|
46
|
+
oagi/server/socketio_server.py,sha256=0JUf8Y6r9Y7gmltznnsGsEeTp1FhT7AxohSHeBuH3R8,14233
|
|
45
47
|
oagi/task/__init__.py,sha256=g_8_7ZLDLKuCGzyrB42OzY3gSOjd_SxzkJW3_pf-PXs,662
|
|
46
|
-
oagi/task/async_.py,sha256=
|
|
47
|
-
oagi/task/async_short.py,sha256=
|
|
48
|
-
oagi/task/base.py,sha256=
|
|
49
|
-
oagi/task/short.py,sha256=
|
|
50
|
-
oagi/task/sync.py,sha256=
|
|
51
|
-
oagi/types/__init__.py,sha256=
|
|
48
|
+
oagi/task/async_.py,sha256=12BrdE-51bEz2-PZv5X2VW__I_nwq2K1YxGfD3wFxos,3190
|
|
49
|
+
oagi/task/async_short.py,sha256=wVMYpsKGbvqYIe2Ws7cMf8-t7SZKmtrgjW1x_RENMgg,2820
|
|
50
|
+
oagi/task/base.py,sha256=6F_nmJsb2Zw6nUibJyAEW0uQBY_jHiQINUbd_jT5wkQ,5696
|
|
51
|
+
oagi/task/short.py,sha256=D5VX8QGy0o8W7njy74jx95PxU0Rv2Nvoa-2T17aBaZQ,2629
|
|
52
|
+
oagi/task/sync.py,sha256=pKRpIFcetm1n2BgmYGWQeWgV3kKLAQRG9xPlBVQ_pho,3024
|
|
53
|
+
oagi/types/__init__.py,sha256=nhxQBaDssygtscetliQa3AaryvuNZhkVmBYsVcuR-qg,1332
|
|
52
54
|
oagi/types/action_handler.py,sha256=NH8E-m5qpGqWcXzTSWfF7W0Xdp8SkzJsbhCmQ0B96cg,1075
|
|
53
55
|
oagi/types/async_action_handler.py,sha256=k1AaqSkFcXlxwW8sn-w0WFHGsIqHFLbcOPrkknmSVug,1116
|
|
54
56
|
oagi/types/async_image_provider.py,sha256=UwDl7VOCA3tiSP5k1fnxK86iEa84Yr57MVaoBSa3hOE,1203
|
|
@@ -56,13 +58,13 @@ oagi/types/image.py,sha256=KgPCCTJ6D5vHIaGZdbTE7eQEa1WlT6G9tf59ZuUCV2U,537
|
|
|
56
58
|
oagi/types/image_provider.py,sha256=IhKEnwCGZ5l_rO3AvJ6xv5RZMTmTDmqsFRynI9h0R_M,1145
|
|
57
59
|
oagi/types/step_observer.py,sha256=wXuChzsof7Rh4azvDTIQ22gAwZAYjMAOVIuL8ZGtw-M,2315
|
|
58
60
|
oagi/types/url.py,sha256=Q-1jf5L_4rad4dxyLTg4MXadGgpkH3w4dcoVrVupW-A,54
|
|
59
|
-
oagi/types/models/__init__.py,sha256=
|
|
60
|
-
oagi/types/models/action.py,sha256=
|
|
61
|
+
oagi/types/models/__init__.py,sha256=gnFh4TddritHjT0Chy-4fv3KZIC6bYCUyGmWm_2IuZw,879
|
|
62
|
+
oagi/types/models/action.py,sha256=Q14xfYJrj9IsrqxDpEIzd6iWS-gLmNHfIX6Ef8k0O9E,2497
|
|
61
63
|
oagi/types/models/client.py,sha256=1xIKBgLSheHfqYbcyRKMDOLQJaKijaKQ5l-COc6e7_k,1471
|
|
62
64
|
oagi/types/models/image_config.py,sha256=tl6abVg_-IAPLwpaWprgknXu7wRWriMg-AEVyUX73v0,1567
|
|
63
65
|
oagi/types/models/step.py,sha256=RSI4H_2rrUBq_xyCoWKaq7JHdJWNobtQppaKC1l0aWU,471
|
|
64
|
-
oagi_core-0.10.
|
|
65
|
-
oagi_core-0.10.
|
|
66
|
-
oagi_core-0.10.
|
|
67
|
-
oagi_core-0.10.
|
|
68
|
-
oagi_core-0.10.
|
|
66
|
+
oagi_core-0.10.3.dist-info/METADATA,sha256=XvsZ9dqWB1fDxdazYcT5u8-k9aeKqZBmtmmm_x0JEMo,8269
|
|
67
|
+
oagi_core-0.10.3.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
68
|
+
oagi_core-0.10.3.dist-info/entry_points.txt,sha256=zzgsOSWX6aN3KUB0Z1it8DMxFFBJBqmZVqMVAJRjYuw,44
|
|
69
|
+
oagi_core-0.10.3.dist-info/licenses/LICENSE,sha256=sy5DLA2M29jFT4UfWsuBF9BAr3FnRkYtnAu6oDZiIf8,1075
|
|
70
|
+
oagi_core-0.10.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|