oagi-core 0.9.1__py3-none-any.whl → 0.10.0__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/__init__.py +76 -33
- oagi/agent/__init__.py +2 -0
- oagi/agent/default.py +45 -12
- oagi/agent/factories.py +22 -3
- oagi/agent/observer/__init__.py +38 -0
- oagi/agent/observer/agent_observer.py +99 -0
- oagi/agent/observer/events.py +28 -0
- oagi/agent/observer/exporters.py +445 -0
- oagi/agent/observer/protocol.py +12 -0
- oagi/agent/registry.py +2 -2
- oagi/agent/tasker/models.py +1 -0
- oagi/agent/tasker/planner.py +41 -9
- oagi/agent/tasker/taskee_agent.py +178 -86
- oagi/agent/tasker/tasker_agent.py +25 -14
- oagi/cli/agent.py +50 -9
- oagi/cli/tracking.py +27 -17
- oagi/cli/utils.py +11 -4
- oagi/client/base.py +3 -7
- oagi/handler/_macos.py +55 -0
- oagi/handler/pyautogui_action_handler.py +19 -2
- oagi/server/agent_wrappers.py +5 -5
- oagi/server/config.py +3 -3
- oagi/server/models.py +2 -2
- oagi/server/session_store.py +2 -2
- oagi/server/socketio_server.py +1 -1
- oagi/task/async_.py +13 -34
- oagi/task/async_short.py +2 -2
- oagi/task/base.py +41 -7
- oagi/task/short.py +2 -2
- oagi/task/sync.py +11 -34
- oagi/types/__init__.py +24 -4
- oagi/types/async_image_provider.py +3 -2
- oagi/types/image_provider.py +3 -2
- oagi/types/step_observer.py +75 -16
- oagi/types/url.py +3 -0
- {oagi_core-0.9.1.dist-info → oagi_core-0.10.0.dist-info}/METADATA +38 -25
- oagi_core-0.10.0.dist-info/RECORD +68 -0
- oagi/types/url_image.py +0 -47
- oagi_core-0.9.1.dist-info/RECORD +0 -62
- {oagi_core-0.9.1.dist-info → oagi_core-0.10.0.dist-info}/WHEEL +0 -0
- {oagi_core-0.9.1.dist-info → oagi_core-0.10.0.dist-info}/entry_points.txt +0 -0
- {oagi_core-0.9.1.dist-info → oagi_core-0.10.0.dist-info}/licenses/LICENSE +0 -0
oagi/types/step_observer.py
CHANGED
|
@@ -6,29 +6,88 @@
|
|
|
6
6
|
# Licensed under the MIT License.
|
|
7
7
|
# -----------------------------------------------------------------------------
|
|
8
8
|
|
|
9
|
-
from
|
|
9
|
+
from datetime import datetime
|
|
10
|
+
from typing import Literal, Protocol
|
|
10
11
|
|
|
11
|
-
from
|
|
12
|
+
from pydantic import BaseModel, Field
|
|
12
13
|
|
|
14
|
+
from .models import Action, Step
|
|
13
15
|
|
|
14
|
-
class AsyncStepObserver(Protocol):
|
|
15
|
-
"""Protocol for observing agent step execution.
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
class BaseEvent(BaseModel):
|
|
18
|
+
"""Base class for all observer events with automatic timestamp."""
|
|
19
|
+
|
|
20
|
+
timestamp: datetime = Field(default_factory=datetime.now)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class ImageEvent(BaseEvent):
|
|
24
|
+
"""Event emitted when a screenshot is captured."""
|
|
25
|
+
|
|
26
|
+
type: Literal["image"] = "image"
|
|
27
|
+
step_num: int
|
|
28
|
+
image: bytes | str
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class StepEvent(BaseEvent):
|
|
32
|
+
"""Event emitted when LLM returns a step decision."""
|
|
33
|
+
|
|
34
|
+
type: Literal["step"] = "step"
|
|
35
|
+
step_num: int
|
|
36
|
+
image: bytes | str
|
|
37
|
+
step: Step
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class ActionEvent(BaseEvent):
|
|
41
|
+
"""Event emitted after actions are executed."""
|
|
42
|
+
|
|
43
|
+
type: Literal["action"] = "action"
|
|
44
|
+
step_num: int
|
|
45
|
+
actions: list[Action]
|
|
46
|
+
error: str | None = None
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class LogEvent(BaseEvent):
|
|
50
|
+
"""Event for custom log messages."""
|
|
51
|
+
|
|
52
|
+
type: Literal["log"] = "log"
|
|
53
|
+
message: str
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class SplitEvent(BaseEvent):
|
|
57
|
+
"""Event for visual separators in exported reports."""
|
|
58
|
+
|
|
59
|
+
type: Literal["split"] = "split"
|
|
60
|
+
label: str = ""
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class PlanEvent(BaseEvent):
|
|
64
|
+
"""Event emitted for planner activities (planning, reflection, summary)."""
|
|
65
|
+
|
|
66
|
+
type: Literal["plan"] = "plan"
|
|
67
|
+
phase: Literal["initial", "reflection", "summary"]
|
|
68
|
+
image: bytes | str | None = None
|
|
69
|
+
reasoning: str
|
|
70
|
+
result: str | None = None
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
ObserverEvent = ImageEvent | StepEvent | ActionEvent | LogEvent | SplitEvent | PlanEvent
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
class AsyncObserver(Protocol):
|
|
77
|
+
"""Protocol for observing agent execution events.
|
|
78
|
+
|
|
79
|
+
Observers receive events during agent execution, enabling
|
|
80
|
+
recording, tracking, logging, or other side effects.
|
|
19
81
|
"""
|
|
20
82
|
|
|
21
|
-
async def
|
|
22
|
-
|
|
23
|
-
step_num: int,
|
|
24
|
-
reasoning: str | None,
|
|
25
|
-
actions: list[Action],
|
|
26
|
-
) -> None:
|
|
27
|
-
"""Called when an agent executes a step.
|
|
83
|
+
async def on_event(self, event: ObserverEvent) -> None:
|
|
84
|
+
"""Called when an agent execution event occurs.
|
|
28
85
|
|
|
29
86
|
Args:
|
|
30
|
-
|
|
31
|
-
reasoning: The reasoning/thinking for this step (if available)
|
|
32
|
-
actions: The list of actions being executed in this step
|
|
87
|
+
event: The event that occurred during agent execution.
|
|
33
88
|
"""
|
|
34
89
|
...
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
# Deprecated: Use AsyncObserver instead
|
|
93
|
+
AsyncStepObserver = AsyncObserver
|
oagi/types/url.py
ADDED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: oagi-core
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.10.0
|
|
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>
|
|
@@ -32,6 +32,7 @@ Requires-Dist: rich>=13.0.0
|
|
|
32
32
|
Provides-Extra: desktop
|
|
33
33
|
Requires-Dist: pillow>=11.3.0; extra == 'desktop'
|
|
34
34
|
Requires-Dist: pyautogui>=0.9.54; extra == 'desktop'
|
|
35
|
+
Requires-Dist: pyobjc-framework-quartz>=9.0; (sys_platform == 'darwin') and extra == 'desktop'
|
|
35
36
|
Provides-Extra: server
|
|
36
37
|
Requires-Dist: fastapi[standard]>=0.115.0; extra == 'server'
|
|
37
38
|
Requires-Dist: pydantic-settings>=2.0.0; extra == 'server'
|
|
@@ -72,8 +73,8 @@ pip install oagi-core[server] # Server support
|
|
|
72
73
|
|
|
73
74
|
Set your API credentials:
|
|
74
75
|
```bash
|
|
75
|
-
export OAGI_API_KEY="your-api-key"
|
|
76
|
-
export OAGI_BASE_URL="https://api.
|
|
76
|
+
export OAGI_API_KEY="your-api-key" # get your API key from https://developer.openagi.org/
|
|
77
|
+
# export OAGI_BASE_URL="https://api.agiopen.org/", # optional, defaults to production endpoint
|
|
77
78
|
```
|
|
78
79
|
|
|
79
80
|
### Automated Task Execution
|
|
@@ -81,21 +82,25 @@ export OAGI_BASE_URL="https://api.oagi.com" # or your server URL
|
|
|
81
82
|
Run tasks automatically with screenshot capture and action execution:
|
|
82
83
|
|
|
83
84
|
```python
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
)
|
|
85
|
+
import asyncio
|
|
86
|
+
from oagi import AsyncDefaultAgent, AsyncPyautoguiActionHandler, AsyncScreenshotMaker
|
|
87
|
+
|
|
88
|
+
async def main():
|
|
89
|
+
agent = AsyncDefaultAgent(max_steps=10)
|
|
90
|
+
completed = await agent.execute(
|
|
91
|
+
"Search weather on Google",
|
|
92
|
+
action_handler=AsyncPyautoguiActionHandler(), # Executes mouse/keyboard actions
|
|
93
|
+
image_provider=AsyncScreenshotMaker(), # Captures screenshots
|
|
94
|
+
)
|
|
95
|
+
return completed
|
|
96
|
+
|
|
97
|
+
asyncio.run(main())
|
|
93
98
|
```
|
|
94
99
|
|
|
95
100
|
Configure PyAutoGUI behavior with custom settings:
|
|
96
101
|
|
|
97
102
|
```python
|
|
98
|
-
from oagi import
|
|
103
|
+
from oagi import AsyncPyautoguiActionHandler, PyautoguiConfig
|
|
99
104
|
|
|
100
105
|
# Customize action behavior
|
|
101
106
|
config = PyautoguiConfig(
|
|
@@ -107,8 +112,7 @@ config = PyautoguiConfig(
|
|
|
107
112
|
capslock_mode="session" # Caps lock mode: 'session' or 'system' (default: 'session')
|
|
108
113
|
)
|
|
109
114
|
|
|
110
|
-
|
|
111
|
-
task.auto_mode("Complete form", executor=executor, image_provider=ScreenshotMaker())
|
|
115
|
+
action_handler = AsyncPyautoguiActionHandler(config=config)
|
|
112
116
|
```
|
|
113
117
|
|
|
114
118
|
### Image Processing
|
|
@@ -129,20 +133,28 @@ config = ImageConfig(
|
|
|
129
133
|
compressed = image.transform(config)
|
|
130
134
|
```
|
|
131
135
|
|
|
132
|
-
###
|
|
136
|
+
### Manual Control with Actor
|
|
133
137
|
|
|
134
|
-
|
|
138
|
+
For step-by-step control over task execution:
|
|
135
139
|
|
|
136
140
|
```python
|
|
137
141
|
import asyncio
|
|
138
|
-
from oagi import
|
|
142
|
+
from oagi import AsyncActor, AsyncPyautoguiActionHandler, AsyncScreenshotMaker
|
|
139
143
|
|
|
140
144
|
async def main():
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
145
|
+
async with AsyncActor() as actor:
|
|
146
|
+
await actor.init_task("Complete the form")
|
|
147
|
+
image_provider = AsyncScreenshotMaker()
|
|
148
|
+
action_handler = AsyncPyautoguiActionHandler()
|
|
149
|
+
|
|
150
|
+
for _ in range(10):
|
|
151
|
+
image = await image_provider()
|
|
152
|
+
step = await actor.step(image)
|
|
153
|
+
|
|
154
|
+
if step.stop:
|
|
155
|
+
break
|
|
156
|
+
|
|
157
|
+
await action_handler(step.actions)
|
|
146
158
|
|
|
147
159
|
asyncio.run(main())
|
|
148
160
|
```
|
|
@@ -150,9 +162,10 @@ asyncio.run(main())
|
|
|
150
162
|
## Examples
|
|
151
163
|
|
|
152
164
|
See the [`examples/`](examples/) directory for more usage patterns:
|
|
153
|
-
- `
|
|
165
|
+
- `execute_task_auto.py` - Automated task execution with `AsyncDefaultAgent`
|
|
166
|
+
- `execute_task_manual.py` - Manual step-by-step control with `Actor`
|
|
167
|
+
- `continued_session.py` - Continuing tasks across sessions
|
|
154
168
|
- `screenshot_with_config.py` - Image compression and optimization
|
|
155
|
-
- `execute_task_auto.py` - Automated task execution
|
|
156
169
|
- `socketio_server_basic.py` - Socket.IO server example
|
|
157
170
|
- `socketio_client_example.py` - Socket.IO client implementation
|
|
158
171
|
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
oagi/__init__.py,sha256=xI--F3inDKuNQ2caI4Xx0rdFuUxO24cEeAX6WoGi170,4836
|
|
2
|
+
oagi/exceptions.py,sha256=Rco37GQTPYUfc2vRO3hozxPF_s8mKFDpFvBg2UKWo3Y,3066
|
|
3
|
+
oagi/logging.py,sha256=YT3KCMFj5fzO98R9xlDDgfSotUuz1xRD6OZeYM2rKoo,1760
|
|
4
|
+
oagi/agent/__init__.py,sha256=KTVLUMhbjgpTJoOWMUZkkiqwhgumvbOZV2tJ9XCLfao,901
|
|
5
|
+
oagi/agent/default.py,sha256=VaDiYISM0Y3l_xhSvWcIZQDiUj_ebHg9tgWLnr-OWuY,4116
|
|
6
|
+
oagi/agent/factories.py,sha256=WP4ONu9JBDaJYmK18OuFihAX7YKCeOKgOh981lYguXo,2113
|
|
7
|
+
oagi/agent/protocol.py,sha256=IQJGiMN4yZIacrh5e9JQsoM9TyHb8wJRQR4LAk8dSA0,1615
|
|
8
|
+
oagi/agent/registry.py,sha256=7bMA2-pH3xQ9ZavrHB_mnc2fOGSMeICPbOGtHoM7It0,4851
|
|
9
|
+
oagi/agent/observer/__init__.py,sha256=YZ4qvR22pFB0mSDMX6iKKLbBA1dB-nqC7HZVvdMIVGw,909
|
|
10
|
+
oagi/agent/observer/agent_observer.py,sha256=fBs4X2_YKhYVThJocjMM-65JAHQSCLJPvzy8OXMt5pY,2864
|
|
11
|
+
oagi/agent/observer/events.py,sha256=xc3Z1UGpX69BqhO9cQiGmnRhDZbMYya1kuXm6bXtjWI,625
|
|
12
|
+
oagi/agent/observer/exporters.py,sha256=im1aK8UkGfWbRnVIYdsoCKVX_JYrcEvzRMDD2CK3gcM,15245
|
|
13
|
+
oagi/agent/observer/protocol.py,sha256=jyRXoCG4CdvaPaDASar1rSbwc7vdpkar39KkGpwf8jw,411
|
|
14
|
+
oagi/agent/tasker/__init__.py,sha256=faOC5ONY8ZKr4CjofC6HYg1WKWc1UiaGB9VHy8W280M,800
|
|
15
|
+
oagi/agent/tasker/memory.py,sha256=JsJjUMpnJoKW4VFzd8FI4M-FhnEihTecL61KVgO_YBI,6051
|
|
16
|
+
oagi/agent/tasker/models.py,sha256=eQ6BrRS9v5ZSmgyK8Ji5iXEyB3OvSIKBvB8Ge1FoGdY,2266
|
|
17
|
+
oagi/agent/tasker/planner.py,sha256=XbaL_O5ENKzeOijqEfRqeO6fzzYMmwfjQQlOTxCoK_Y,14810
|
|
18
|
+
oagi/agent/tasker/taskee_agent.py,sha256=b2oHkHrZak3S5gMVffjht7ra8et8xDAADoDlfZFy_os,16731
|
|
19
|
+
oagi/agent/tasker/tasker_agent.py,sha256=2DM3XEPNTd-SJjW9nNXJHoDCM735Uz_Ya1hr-O87mX8,11303
|
|
20
|
+
oagi/cli/__init__.py,sha256=aDnJViTseShpo5fdGPTj-ELysZhmdvB6Z8mEj2D-_N4,359
|
|
21
|
+
oagi/cli/agent.py,sha256=daHCF06rMp-hIOd6AUT1YOtEGu2yhOZb-uDKJu_WrUU,5933
|
|
22
|
+
oagi/cli/display.py,sha256=rkAxuHa40ZtKdmvwARev1rgyfsNyVvQ-J6RdjOZIPwc,1729
|
|
23
|
+
oagi/cli/main.py,sha256=faHns0HaQCGyylDn2YZLpjQESuEiMYjoQVoMkt8FsH4,2292
|
|
24
|
+
oagi/cli/server.py,sha256=Z1ic8r55yaeQBFRCsMNZStC1jRiJdnDGqe9On9LmFzQ,3031
|
|
25
|
+
oagi/cli/tracking.py,sha256=TdrAcNq_-OjgXltFCoFc8NsO_k6yHbdzHnMn3vAAvKA,1707
|
|
26
|
+
oagi/cli/utils.py,sha256=BI6C7WvC51NBsXEsjDONjSNwqdD4i0nHA_rsfpyLwmA,2986
|
|
27
|
+
oagi/client/__init__.py,sha256=F9DShPUdb6vZYmN1fpM1VYzp4MWqUao_e_R1KYmM4Q4,410
|
|
28
|
+
oagi/client/async_.py,sha256=t-GPHcz6xbHx_RPFv1V_hwZ1_f-O9ONH-Ahr0w-Nz8M,11046
|
|
29
|
+
oagi/client/base.py,sha256=4ZfhouEyIcldStJG5ipxpxpD6iVRGrMUZruQX0WKiXE,16934
|
|
30
|
+
oagi/client/sync.py,sha256=QKd6nTUXtyn1Am8YlFcpsoLh1KuHhQgbMemIkb7r39g,10882
|
|
31
|
+
oagi/handler/__init__.py,sha256=Ha11L42K33K3L9S4lQ10UC0DnD5g6egtQUsJpS_tKgg,835
|
|
32
|
+
oagi/handler/_macos.py,sha256=aHkp-xGzvWL_SBjuS690i9jf93OITFJfGHzHeYCK65I,1957
|
|
33
|
+
oagi/handler/async_pyautogui_action_handler.py,sha256=hQzseR1yBD0QMpgsEVNsUmuApGVAIIyGYD06BXd82Dc,1615
|
|
34
|
+
oagi/handler/async_screenshot_maker.py,sha256=8QCtUV59ozpOpvkqhUMb8QDI2qje2gsoFT1qB60tfJM,1689
|
|
35
|
+
oagi/handler/pil_image.py,sha256=yUcAoGBL-aZ0PCjSaAmQsDwtyzjldXHqXQp_OYRk6e4,4080
|
|
36
|
+
oagi/handler/pyautogui_action_handler.py,sha256=VOD1CwdFHUQsk8nDIZUetdWZTH8Ig3xgKR5ljzaKSJ8,10592
|
|
37
|
+
oagi/handler/screenshot_maker.py,sha256=j1jTW-awx3vAnb1N5_FIMBC0Z-rNVQbiBP-S6Gh5dlE,1284
|
|
38
|
+
oagi/server/__init__.py,sha256=uZx8u3vJUb87kkNzwmmVrgAgbqRu0WxyMIQCLSx56kk,452
|
|
39
|
+
oagi/server/agent_wrappers.py,sha256=j8va0A7u80bzOM82nndAplK1uaO_T3kufHWScK6kfWM,3263
|
|
40
|
+
oagi/server/config.py,sha256=2gJ-pDpYAxNUubwSsGKOieGcOtNX9b5YGuSqtf6g2P0,1607
|
|
41
|
+
oagi/server/main.py,sha256=jnTxk7Prc5CzlsUnkBNJp4MOoYN-7HN_Be_m1d3COa8,4829
|
|
42
|
+
oagi/server/models.py,sha256=7zsmjvnIZ0JUcCpE8F2A1OqX4_kGJydraRkbvPHnvn8,2593
|
|
43
|
+
oagi/server/session_store.py,sha256=922Sz00_Ao-9fA0dhA1lrzs7yd6wo7xpdYJH4hZmEaI,3634
|
|
44
|
+
oagi/server/socketio_server.py,sha256=NFw5Zu7yCFLW-gOu9OX8k6mNFaCN2jtX1Tob_9w5YM0,14344
|
|
45
|
+
oagi/task/__init__.py,sha256=g_8_7ZLDLKuCGzyrB42OzY3gSOjd_SxzkJW3_pf-PXs,662
|
|
46
|
+
oagi/task/async_.py,sha256=ev1jnuOQIYahjjMlSCFwtaeyOliePZCpEVt3ocsZXAI,3124
|
|
47
|
+
oagi/task/async_short.py,sha256=VMIBKcTQMjadWXPHiJXWlYZqr5v4MeGVYnuKOs7dS3Y,2752
|
|
48
|
+
oagi/task/base.py,sha256=D4e4N1cWoObMzaGcXyXGBPKyNbzmxABIjxbHiVrK548,5664
|
|
49
|
+
oagi/task/short.py,sha256=xSR5_9BX35UMfITXtCgKXRLU92f4vnqa06c-HSjUO0A,2561
|
|
50
|
+
oagi/task/sync.py,sha256=ciDkQYJQZkQyp8buNIKXU9Oy6kD7WIezCh2L0trLDDc,2958
|
|
51
|
+
oagi/types/__init__.py,sha256=TCdHA8zPJAzpo-jgkfcWTWmbrWglOpShGQFcLoxV_xw,1187
|
|
52
|
+
oagi/types/action_handler.py,sha256=NH8E-m5qpGqWcXzTSWfF7W0Xdp8SkzJsbhCmQ0B96cg,1075
|
|
53
|
+
oagi/types/async_action_handler.py,sha256=k1AaqSkFcXlxwW8sn-w0WFHGsIqHFLbcOPrkknmSVug,1116
|
|
54
|
+
oagi/types/async_image_provider.py,sha256=UwDl7VOCA3tiSP5k1fnxK86iEa84Yr57MVaoBSa3hOE,1203
|
|
55
|
+
oagi/types/image.py,sha256=KgPCCTJ6D5vHIaGZdbTE7eQEa1WlT6G9tf59ZuUCV2U,537
|
|
56
|
+
oagi/types/image_provider.py,sha256=IhKEnwCGZ5l_rO3AvJ6xv5RZMTmTDmqsFRynI9h0R_M,1145
|
|
57
|
+
oagi/types/step_observer.py,sha256=wXuChzsof7Rh4azvDTIQ22gAwZAYjMAOVIuL8ZGtw-M,2315
|
|
58
|
+
oagi/types/url.py,sha256=Q-1jf5L_4rad4dxyLTg4MXadGgpkH3w4dcoVrVupW-A,54
|
|
59
|
+
oagi/types/models/__init__.py,sha256=I86Z2moM8hCog_1K1FG_uATcBmWFv_UFetLAjzPzWAY,742
|
|
60
|
+
oagi/types/models/action.py,sha256=hh6mRRSSWgrW4jpZo71zGMCOcZpV5_COu4148uG6G48,967
|
|
61
|
+
oagi/types/models/client.py,sha256=fCN18DBq5XDjNyYB8w-2dFeQ_K9ywwdyh-rXa0GToU4,1357
|
|
62
|
+
oagi/types/models/image_config.py,sha256=tl6abVg_-IAPLwpaWprgknXu7wRWriMg-AEVyUX73v0,1567
|
|
63
|
+
oagi/types/models/step.py,sha256=RSI4H_2rrUBq_xyCoWKaq7JHdJWNobtQppaKC1l0aWU,471
|
|
64
|
+
oagi_core-0.10.0.dist-info/METADATA,sha256=7eAQXcjWgxixmcwQkherH_ytEoV6Jy3RwYQJWsfopcQ,8161
|
|
65
|
+
oagi_core-0.10.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
66
|
+
oagi_core-0.10.0.dist-info/entry_points.txt,sha256=zzgsOSWX6aN3KUB0Z1it8DMxFFBJBqmZVqMVAJRjYuw,44
|
|
67
|
+
oagi_core-0.10.0.dist-info/licenses/LICENSE,sha256=sy5DLA2M29jFT4UfWsuBF9BAr3FnRkYtnAu6oDZiIf8,1075
|
|
68
|
+
oagi_core-0.10.0.dist-info/RECORD,,
|
oagi/types/url_image.py
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"""URLImage implementation for handling images via URLs."""
|
|
2
|
-
|
|
3
|
-
from typing import Optional
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class URLImage:
|
|
7
|
-
"""Image implementation that supports URLs.
|
|
8
|
-
|
|
9
|
-
This is useful when the image is already uploaded to a URL (e.g., S3)
|
|
10
|
-
and we want to pass the URL reference instead of downloading bytes.
|
|
11
|
-
"""
|
|
12
|
-
|
|
13
|
-
def __init__(self, url: str, cached_bytes: Optional[bytes] = None):
|
|
14
|
-
"""Initialize URLImage with a URL.
|
|
15
|
-
|
|
16
|
-
Args:
|
|
17
|
-
url: URL of the image
|
|
18
|
-
cached_bytes: Optional cached bytes of the image
|
|
19
|
-
"""
|
|
20
|
-
self.url = url
|
|
21
|
-
self._cached_bytes = cached_bytes
|
|
22
|
-
|
|
23
|
-
def read(self) -> bytes:
|
|
24
|
-
"""Read the image data as bytes.
|
|
25
|
-
|
|
26
|
-
For URL-based images, this returns empty bytes by default since
|
|
27
|
-
the image is already uploaded. Subclasses can override to fetch
|
|
28
|
-
the actual bytes from the URL if needed.
|
|
29
|
-
|
|
30
|
-
Returns:
|
|
31
|
-
Image bytes (empty for URL-only images)
|
|
32
|
-
"""
|
|
33
|
-
if self._cached_bytes is not None:
|
|
34
|
-
return self._cached_bytes
|
|
35
|
-
return b""
|
|
36
|
-
|
|
37
|
-
def get_url(self) -> str:
|
|
38
|
-
"""Get the URL of the image.
|
|
39
|
-
|
|
40
|
-
Returns:
|
|
41
|
-
The image URL
|
|
42
|
-
"""
|
|
43
|
-
return self.url
|
|
44
|
-
|
|
45
|
-
def __repr__(self) -> str:
|
|
46
|
-
"""String representation of URLImage."""
|
|
47
|
-
return f"URLImage(url='{self.url}')"
|
oagi_core-0.9.1.dist-info/RECORD
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
oagi/__init__.py,sha256=cSqJ61OyscGJLHBCn53cS4PrCKC4DQl5xRDNkGR0TXo,3041
|
|
2
|
-
oagi/exceptions.py,sha256=Rco37GQTPYUfc2vRO3hozxPF_s8mKFDpFvBg2UKWo3Y,3066
|
|
3
|
-
oagi/logging.py,sha256=YT3KCMFj5fzO98R9xlDDgfSotUuz1xRD6OZeYM2rKoo,1760
|
|
4
|
-
oagi/agent/__init__.py,sha256=JU9zuWuDzpzitsVJB4z5ddvx8RMm5nbP-bjUCL1Sfvo,834
|
|
5
|
-
oagi/agent/default.py,sha256=FaaNTssDt5rcuEUppznATqNOTTEJFThcxbBpPChzwnU,3108
|
|
6
|
-
oagi/agent/factories.py,sha256=eE0hcXyJX4dk2nvRRlEvQPJqkBraeIaT7nXiED2lH_Q,1605
|
|
7
|
-
oagi/agent/protocol.py,sha256=IQJGiMN4yZIacrh5e9JQsoM9TyHb8wJRQR4LAk8dSA0,1615
|
|
8
|
-
oagi/agent/registry.py,sha256=4oG65E_bV47Xl6F-HX9KaVoV0pcoC1uRRDU4RT_m3uU,4841
|
|
9
|
-
oagi/agent/tasker/__init__.py,sha256=faOC5ONY8ZKr4CjofC6HYg1WKWc1UiaGB9VHy8W280M,800
|
|
10
|
-
oagi/agent/tasker/memory.py,sha256=JsJjUMpnJoKW4VFzd8FI4M-FhnEihTecL61KVgO_YBI,6051
|
|
11
|
-
oagi/agent/tasker/models.py,sha256=VzvHB5hLv6qyYcyNiojVIEDlTzeGE4Quswk4EVIbzoI,2180
|
|
12
|
-
oagi/agent/tasker/planner.py,sha256=j0Zhk6kw0LFtxkpjFhmeaTBxZfKLf3qqCNpGAuMuODw,13650
|
|
13
|
-
oagi/agent/tasker/taskee_agent.py,sha256=9t_uIilH2KCnkv013mIfk2VPPNKz6wJtTyjEJLvZOzQ,14093
|
|
14
|
-
oagi/agent/tasker/tasker_agent.py,sha256=d4khAfd1_Ra1KP7Y2un8BwUBeGh-Frwp2xWc7prI6F4,10954
|
|
15
|
-
oagi/cli/__init__.py,sha256=aDnJViTseShpo5fdGPTj-ELysZhmdvB6Z8mEj2D-_N4,359
|
|
16
|
-
oagi/cli/agent.py,sha256=q0dLyjrzT3PkZreaXSqpHN_rH5fAB_jHyLonPy-V6hk,4453
|
|
17
|
-
oagi/cli/display.py,sha256=rkAxuHa40ZtKdmvwARev1rgyfsNyVvQ-J6RdjOZIPwc,1729
|
|
18
|
-
oagi/cli/main.py,sha256=faHns0HaQCGyylDn2YZLpjQESuEiMYjoQVoMkt8FsH4,2292
|
|
19
|
-
oagi/cli/server.py,sha256=Z1ic8r55yaeQBFRCsMNZStC1jRiJdnDGqe9On9LmFzQ,3031
|
|
20
|
-
oagi/cli/tracking.py,sha256=jPH6QDUUwnfZ8bjQU6deofBmBflTEOOCINwinQJz9OI,1147
|
|
21
|
-
oagi/cli/utils.py,sha256=QvDyoP0nU9aq4ORjnvJJAGRECmjh9WAmilKuk6zOGM8,2615
|
|
22
|
-
oagi/client/__init__.py,sha256=F9DShPUdb6vZYmN1fpM1VYzp4MWqUao_e_R1KYmM4Q4,410
|
|
23
|
-
oagi/client/async_.py,sha256=t-GPHcz6xbHx_RPFv1V_hwZ1_f-O9ONH-Ahr0w-Nz8M,11046
|
|
24
|
-
oagi/client/base.py,sha256=TlZk4LaYFlOQFmTTgTDzZ1XRAixqNO0pCwgJ7VhZOSU,17101
|
|
25
|
-
oagi/client/sync.py,sha256=QKd6nTUXtyn1Am8YlFcpsoLh1KuHhQgbMemIkb7r39g,10882
|
|
26
|
-
oagi/handler/__init__.py,sha256=Ha11L42K33K3L9S4lQ10UC0DnD5g6egtQUsJpS_tKgg,835
|
|
27
|
-
oagi/handler/async_pyautogui_action_handler.py,sha256=hQzseR1yBD0QMpgsEVNsUmuApGVAIIyGYD06BXd82Dc,1615
|
|
28
|
-
oagi/handler/async_screenshot_maker.py,sha256=8QCtUV59ozpOpvkqhUMb8QDI2qje2gsoFT1qB60tfJM,1689
|
|
29
|
-
oagi/handler/pil_image.py,sha256=yUcAoGBL-aZ0PCjSaAmQsDwtyzjldXHqXQp_OYRk6e4,4080
|
|
30
|
-
oagi/handler/pyautogui_action_handler.py,sha256=rhQAes81-hR5KoFiB4Ph6Cw5r04vYiqvZx64eA31pBw,9954
|
|
31
|
-
oagi/handler/screenshot_maker.py,sha256=j1jTW-awx3vAnb1N5_FIMBC0Z-rNVQbiBP-S6Gh5dlE,1284
|
|
32
|
-
oagi/server/__init__.py,sha256=uZx8u3vJUb87kkNzwmmVrgAgbqRu0WxyMIQCLSx56kk,452
|
|
33
|
-
oagi/server/agent_wrappers.py,sha256=4f6ZKvqy9TDA57QRHGjAQVhpHmPE5QNeewmmURg5Ajo,3288
|
|
34
|
-
oagi/server/config.py,sha256=RstTWbPwWCfW9ZRJcns3uCbdhXxuUnerKjxR1pCGbqY,1602
|
|
35
|
-
oagi/server/main.py,sha256=jnTxk7Prc5CzlsUnkBNJp4MOoYN-7HN_Be_m1d3COa8,4829
|
|
36
|
-
oagi/server/models.py,sha256=E0R80zIz-YLpwx4VQyADQEnM89ZY9bXmjuswfhCuqMc,2595
|
|
37
|
-
oagi/server/session_store.py,sha256=UI14NiApAwvZWmMOG4SvPE2WkbGkNTHToZhTXQjN2_U,3624
|
|
38
|
-
oagi/server/socketio_server.py,sha256=UeNm9bemYMZqtYWp3i09BLUyEWW6t8yTkl2pjpSeT_M,14359
|
|
39
|
-
oagi/task/__init__.py,sha256=g_8_7ZLDLKuCGzyrB42OzY3gSOjd_SxzkJW3_pf-PXs,662
|
|
40
|
-
oagi/task/async_.py,sha256=IwoLy0SHLNI7k6I5Ja0WmWa8U-SDLogoM-qHFjbVISU,3924
|
|
41
|
-
oagi/task/async_short.py,sha256=LjgWotSxyuTRpNNFsAhAP0Y0raze0GHyoWqthLaPoS8,2755
|
|
42
|
-
oagi/task/base.py,sha256=Udp_Yl5GVUWR7RtayrQlwa8Yg_Nrsyal3mGEkaG8FmE,4447
|
|
43
|
-
oagi/task/short.py,sha256=mgXao6AXuR8XvHwnf3KjzsCm1PZRLzKg1R-2JmS2yoM,2564
|
|
44
|
-
oagi/task/sync.py,sha256=Ag171gJxcWkLgmna4X5Ipgf3qEDDj2JnZEQ9b-mH0mM,3787
|
|
45
|
-
oagi/types/__init__.py,sha256=Vz6JArE8XvBWlES8CVLy-Nx97gooh1OSsltBL6iaFiM,884
|
|
46
|
-
oagi/types/action_handler.py,sha256=NH8E-m5qpGqWcXzTSWfF7W0Xdp8SkzJsbhCmQ0B96cg,1075
|
|
47
|
-
oagi/types/async_action_handler.py,sha256=k1AaqSkFcXlxwW8sn-w0WFHGsIqHFLbcOPrkknmSVug,1116
|
|
48
|
-
oagi/types/async_image_provider.py,sha256=wnhRyPtTmuALt45Qore74-RCkP5yxU9sZGjvOzFqzOk,1170
|
|
49
|
-
oagi/types/image.py,sha256=KgPCCTJ6D5vHIaGZdbTE7eQEa1WlT6G9tf59ZuUCV2U,537
|
|
50
|
-
oagi/types/image_provider.py,sha256=oYFdOYznrK_VOR9egzOjw5wFM5w8EY2sY01pH0ANAgU,1112
|
|
51
|
-
oagi/types/step_observer.py,sha256=KDw7yQxA_I6T2DqElspAOMa8rBJTYFWBNHfC-9NmasM,1025
|
|
52
|
-
oagi/types/url_image.py,sha256=iOwtXj2uwY6dVtDP7uvQLPvK-aTxkdrzhw_R4C6GwBw,1334
|
|
53
|
-
oagi/types/models/__init__.py,sha256=I86Z2moM8hCog_1K1FG_uATcBmWFv_UFetLAjzPzWAY,742
|
|
54
|
-
oagi/types/models/action.py,sha256=hh6mRRSSWgrW4jpZo71zGMCOcZpV5_COu4148uG6G48,967
|
|
55
|
-
oagi/types/models/client.py,sha256=fCN18DBq5XDjNyYB8w-2dFeQ_K9ywwdyh-rXa0GToU4,1357
|
|
56
|
-
oagi/types/models/image_config.py,sha256=tl6abVg_-IAPLwpaWprgknXu7wRWriMg-AEVyUX73v0,1567
|
|
57
|
-
oagi/types/models/step.py,sha256=RSI4H_2rrUBq_xyCoWKaq7JHdJWNobtQppaKC1l0aWU,471
|
|
58
|
-
oagi_core-0.9.1.dist-info/METADATA,sha256=zJ3xNe4fGIUHAff90wp0s_d98QsjEunz848CWcoQd2w,7543
|
|
59
|
-
oagi_core-0.9.1.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
60
|
-
oagi_core-0.9.1.dist-info/entry_points.txt,sha256=zzgsOSWX6aN3KUB0Z1it8DMxFFBJBqmZVqMVAJRjYuw,44
|
|
61
|
-
oagi_core-0.9.1.dist-info/licenses/LICENSE,sha256=sy5DLA2M29jFT4UfWsuBF9BAr3FnRkYtnAu6oDZiIf8,1075
|
|
62
|
-
oagi_core-0.9.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|