cua-agent 0.2.9__py3-none-any.whl → 0.2.10__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.
Potentially problematic release.
This version of cua-agent might be problematic. Click here for more details.
- agent/core/base.py +1 -2
- agent/core/callbacks.py +2 -4
- agent/core/messages.py +0 -1
- agent/providers/anthropic/utils.py +1 -2
- agent/ui/gradio/app.py +1 -2
- {cua_agent-0.2.9.dist-info → cua_agent-0.2.10.dist-info}/METADATA +1 -1
- {cua_agent-0.2.9.dist-info → cua_agent-0.2.10.dist-info}/RECORD +9 -9
- {cua_agent-0.2.9.dist-info → cua_agent-0.2.10.dist-info}/WHEEL +0 -0
- {cua_agent-0.2.9.dist-info → cua_agent-0.2.10.dist-info}/entry_points.txt +0 -0
agent/core/base.py
CHANGED
|
@@ -5,7 +5,6 @@ import asyncio
|
|
|
5
5
|
from abc import ABC, abstractmethod
|
|
6
6
|
from typing import Any, AsyncGenerator, Dict, List, Optional
|
|
7
7
|
|
|
8
|
-
from agent.providers.omni.parser import ParseResult
|
|
9
8
|
from computer import Computer
|
|
10
9
|
from .messages import StandardMessageManager, ImageRetentionConfig
|
|
11
10
|
from .types import AgentResponse
|
|
@@ -207,7 +206,7 @@ class BaseLoop(ABC):
|
|
|
207
206
|
# EVENT HOOKS / CALLBACKS
|
|
208
207
|
###########################################
|
|
209
208
|
|
|
210
|
-
async def handle_screenshot(self, screenshot_base64: str, action_type: str = "", parsed_screen: Optional[
|
|
209
|
+
async def handle_screenshot(self, screenshot_base64: str, action_type: str = "", parsed_screen: Optional[dict] = None) -> None:
|
|
211
210
|
"""Process a screenshot through callback managers
|
|
212
211
|
|
|
213
212
|
Args:
|
agent/core/callbacks.py
CHANGED
|
@@ -6,8 +6,6 @@ from abc import ABC, abstractmethod
|
|
|
6
6
|
from datetime import datetime
|
|
7
7
|
from typing import Any, Dict, List, Optional, Protocol
|
|
8
8
|
|
|
9
|
-
from agent.providers.omni.parser import ParseResult
|
|
10
|
-
|
|
11
9
|
logger = logging.getLogger(__name__)
|
|
12
10
|
|
|
13
11
|
class ContentCallback(Protocol):
|
|
@@ -117,7 +115,7 @@ class CallbackManager:
|
|
|
117
115
|
for handler in self.handlers:
|
|
118
116
|
await handler.on_error(error, **kwargs)
|
|
119
117
|
|
|
120
|
-
async def on_screenshot(self, screenshot_base64: str, action_type: str = "", parsed_screen: Optional[
|
|
118
|
+
async def on_screenshot(self, screenshot_base64: str, action_type: str = "", parsed_screen: Optional[dict] = None) -> None:
|
|
121
119
|
"""Called when a screenshot is taken.
|
|
122
120
|
|
|
123
121
|
Args:
|
|
@@ -166,7 +164,7 @@ class CallbackHandler(ABC):
|
|
|
166
164
|
pass
|
|
167
165
|
|
|
168
166
|
@abstractmethod
|
|
169
|
-
async def on_screenshot(self, screenshot_base64: str, action_type: str = "", parsed_screen: Optional[
|
|
167
|
+
async def on_screenshot(self, screenshot_base64: str, action_type: str = "", parsed_screen: Optional[dict] = None) -> None:
|
|
170
168
|
"""Called when a screenshot is taken.
|
|
171
169
|
|
|
172
170
|
Args:
|
agent/core/messages.py
CHANGED
|
@@ -4,7 +4,6 @@ import logging
|
|
|
4
4
|
import re
|
|
5
5
|
from typing import Any, Dict, List, Optional, Tuple, cast
|
|
6
6
|
from anthropic.types.beta import BetaMessage
|
|
7
|
-
from ..omni.parser import ParseResult
|
|
8
7
|
from ...core.types import AgentResponse
|
|
9
8
|
from datetime import datetime
|
|
10
9
|
|
|
@@ -188,7 +187,7 @@ def from_anthropic_format(messages: List[Dict[str, Any]]) -> List[Dict[str, Any]
|
|
|
188
187
|
async def to_agent_response_format(
|
|
189
188
|
response: BetaMessage,
|
|
190
189
|
messages: List[Dict[str, Any]],
|
|
191
|
-
parsed_screen: Optional[
|
|
190
|
+
parsed_screen: Optional[dict] = None,
|
|
192
191
|
parser: Optional[Any] = None,
|
|
193
192
|
model: Optional[str] = None,
|
|
194
193
|
) -> AgentResponse:
|
agent/ui/gradio/app.py
CHANGED
|
@@ -41,7 +41,6 @@ from typing import cast
|
|
|
41
41
|
# Import from agent package
|
|
42
42
|
from agent.core.types import AgentResponse
|
|
43
43
|
from agent.core.callbacks import DefaultCallbackHandler
|
|
44
|
-
from agent.providers.omni.parser import ParseResult
|
|
45
44
|
from computer import Computer
|
|
46
45
|
|
|
47
46
|
from agent import ComputerAgent, AgentLoop, LLM, LLMProvider
|
|
@@ -103,7 +102,7 @@ class GradioChatScreenshotHandler(DefaultCallbackHandler):
|
|
|
103
102
|
self,
|
|
104
103
|
screenshot_base64: str,
|
|
105
104
|
action_type: str = "",
|
|
106
|
-
parsed_screen: Optional[
|
|
105
|
+
parsed_screen: Optional[dict] = None,
|
|
107
106
|
) -> None:
|
|
108
107
|
"""Add screenshot to chatbot when a screenshot is taken and update the annotated image.
|
|
109
108
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
agent/__init__.py,sha256=guFGtorDBF6R5hVep0Bvci3_sUJfBlcsq9ss5Kwrej8,1484
|
|
2
2
|
agent/core/__init__.py,sha256=3x4XmLSj40-sjUMOtxOuM82RnOQl0I5AwURk5wW_9GE,514
|
|
3
3
|
agent/core/agent.py,sha256=HUfBe7Uam3TObAmf6KH0GDKuNCNunNmmMcuxS7aZg0Q,8332
|
|
4
|
-
agent/core/base.py,sha256=
|
|
5
|
-
agent/core/callbacks.py,sha256=
|
|
4
|
+
agent/core/base.py,sha256=7hD1rosM-JjyruwSplD4-5YO6BaO1a1bD7bjFYGGUrg,8315
|
|
5
|
+
agent/core/callbacks.py,sha256=uAoJo4rHpVf1d8rzEBFdtSud9jRndPLwDoC4U4uYZlw,6386
|
|
6
6
|
agent/core/experiment.py,sha256=Ywj6q3JZFDKicfPuQsDl0vSN55HS7-Cnk3u3EcUCKe8,8866
|
|
7
7
|
agent/core/factory.py,sha256=zzlCdibctqhf8Uta-SrvE-G7h59wAw-7SGhHiGvS9GY,4608
|
|
8
|
-
agent/core/messages.py,sha256=
|
|
8
|
+
agent/core/messages.py,sha256=OfwelngzxBxwbbWQWcyZ4ViRdhSQ2YbqqWixeqtbePk,12473
|
|
9
9
|
agent/core/provider_config.py,sha256=jB3fLsEsf806HQZ8jtzfSq4bCYGYONBeuCOoog_Nv_Y,768
|
|
10
10
|
agent/core/telemetry.py,sha256=HElPd32k_w2SJ6t-Cc3j_2-AKdLbFwh2YlM8QViDgRw,4790
|
|
11
11
|
agent/core/tools.py,sha256=53aPme3O8U91n122Smu3TGbyGjQQe2zDimaZgKkFNi0,878
|
|
@@ -37,7 +37,7 @@ agent/providers/anthropic/tools/edit.py,sha256=EGRP61MDA4Oue1D7Q-_vLpd6LdGbdBA1Z
|
|
|
37
37
|
agent/providers/anthropic/tools/manager.py,sha256=yNvgTkfEqnOz5isDF0RxvmBMZB0uh2PipFEH-PUXpoY,2020
|
|
38
38
|
agent/providers/anthropic/tools/run.py,sha256=xhXdnBK1di9muaO44CEirL9hpGy3NmKbjfMpyeVmn8Y,1595
|
|
39
39
|
agent/providers/anthropic/types.py,sha256=SF00kOMC1ui8j9Ah56KaeiR2cL394qCHjFIsBpXxt5w,421
|
|
40
|
-
agent/providers/anthropic/utils.py,sha256=
|
|
40
|
+
agent/providers/anthropic/utils.py,sha256=6-lANH2-PjnYcZ_n8uGPbkbk9pqIUad5wh07zzslz3Q,14322
|
|
41
41
|
agent/providers/omni/__init__.py,sha256=5ix67iJdtQNGuGJEjEOF65PwFWO7vdo1QlXD28bRbW4,179
|
|
42
42
|
agent/providers/omni/api_handler.py,sha256=7CpD43lYAqTyNKWfrD8XcM9ekbajqKCTH9p0TWtEQyg,1163
|
|
43
43
|
agent/providers/omni/clients/anthropic.py,sha256=nC_lj3UwrLqx9TIew58yxLqKwrH1_LwJD6EqVSEfp3g,3670
|
|
@@ -79,8 +79,8 @@ agent/providers/uitars/utils.py,sha256=493STTEEJcVhVbQgR0e8rNTI1DjkxUx8IgIv3wkJ1
|
|
|
79
79
|
agent/telemetry.py,sha256=pVGxbj0ewnvq4EGj28CydN4a1iOfvZR_XKL3vIOqhOM,390
|
|
80
80
|
agent/ui/__init__.py,sha256=ohhxJLBin6k1hl5sKcmBST8mgh23WXgAXz3pN4f470E,45
|
|
81
81
|
agent/ui/gradio/__init__.py,sha256=ANKZhv1HqsLheWbLVBlyRQ7Q5qGeXuPi5jDs8vu-ZMo,579
|
|
82
|
-
agent/ui/gradio/app.py,sha256=
|
|
83
|
-
cua_agent-0.2.
|
|
84
|
-
cua_agent-0.2.
|
|
85
|
-
cua_agent-0.2.
|
|
86
|
-
cua_agent-0.2.
|
|
82
|
+
agent/ui/gradio/app.py,sha256=8NGwdng57sAQ2i2vD2THvpWKdOD-Y7BNYeQGAcj3xtA,70616
|
|
83
|
+
cua_agent-0.2.10.dist-info/METADATA,sha256=UVZuW6ZdH47YKe0Cx5Hd_-RdINufw-HnvsDGw6uXe1A,12689
|
|
84
|
+
cua_agent-0.2.10.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
|
|
85
|
+
cua_agent-0.2.10.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
|
|
86
|
+
cua_agent-0.2.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|