cua-agent 0.4.10__py3-none-any.whl → 0.4.11__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/cli.py +4 -4
- agent/computer_handler.py +12 -2
- agent/loops/anthropic.py +601 -504
- agent/responses.py +45 -0
- {cua_agent-0.4.10.dist-info → cua_agent-0.4.11.dist-info}/METADATA +1 -1
- {cua_agent-0.4.10.dist-info → cua_agent-0.4.11.dist-info}/RECORD +8 -8
- {cua_agent-0.4.10.dist-info → cua_agent-0.4.11.dist-info}/WHEEL +0 -0
- {cua_agent-0.4.10.dist-info → cua_agent-0.4.11.dist-info}/entry_points.txt +0 -0
agent/responses.py
CHANGED
|
@@ -206,6 +206,51 @@ def make_wait_item(call_id: Optional[str] = None) -> ResponseComputerToolCallPar
|
|
|
206
206
|
type="computer_call"
|
|
207
207
|
)
|
|
208
208
|
|
|
209
|
+
# Extra anthropic computer calls
|
|
210
|
+
def make_left_mouse_down_item(x: Optional[int] = None, y: Optional[int] = None, call_id: Optional[str] = None) -> Dict[str, Any]:
|
|
211
|
+
return {
|
|
212
|
+
"id": random_id(),
|
|
213
|
+
"call_id": call_id if call_id else random_id(),
|
|
214
|
+
"action": {
|
|
215
|
+
"type": "left_mouse_down",
|
|
216
|
+
"x": x,
|
|
217
|
+
"y": y
|
|
218
|
+
},
|
|
219
|
+
"pending_safety_checks": [],
|
|
220
|
+
"status": "completed",
|
|
221
|
+
"type": "computer_call"
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
def make_left_mouse_up_item(x: Optional[int] = None, y: Optional[int] = None, call_id: Optional[str] = None) -> Dict[str, Any]:
|
|
225
|
+
return {
|
|
226
|
+
"id": random_id(),
|
|
227
|
+
"call_id": call_id if call_id else random_id(),
|
|
228
|
+
"action": {
|
|
229
|
+
"type": "left_mouse_up",
|
|
230
|
+
"x": x,
|
|
231
|
+
"y": y
|
|
232
|
+
},
|
|
233
|
+
"pending_safety_checks": [],
|
|
234
|
+
"status": "completed",
|
|
235
|
+
"type": "computer_call"
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
def make_failed_tool_call_items(tool_name: str, tool_kwargs: Dict[str, Any], error_message: str, call_id: Optional[str] = None) -> List[Dict[str, Any]]:
|
|
239
|
+
call_id = call_id if call_id else random_id()
|
|
240
|
+
return [
|
|
241
|
+
{
|
|
242
|
+
"type": "function_call",
|
|
243
|
+
"id": random_id(),
|
|
244
|
+
"call_id": call_id,
|
|
245
|
+
"name": tool_name,
|
|
246
|
+
"arguments": json.dumps(tool_kwargs),
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"type": "function_call_output",
|
|
250
|
+
"call_id": call_id,
|
|
251
|
+
"output": json.dumps({"error": error_message}),
|
|
252
|
+
}
|
|
253
|
+
]
|
|
209
254
|
|
|
210
255
|
# Conversion functions between element descriptions and coordinates
|
|
211
256
|
def convert_computer_calls_desc2xy(responses_items: List[Dict[str, Any]], desc2xy: Dict[str, tuple]) -> List[Dict[str, Any]]:
|
|
@@ -11,11 +11,11 @@ agent/callbacks/logging.py,sha256=OOxU97EzrxlnUAtiEnvy9FB7SwCUK90-rdpDFA2Ae4E,10
|
|
|
11
11
|
agent/callbacks/pii_anonymization.py,sha256=NEkUTUjQBi82nqus7kT-1E4RaeQ2hQrY7YCnKndLhP8,3272
|
|
12
12
|
agent/callbacks/telemetry.py,sha256=PU7pkK7W1v1xjDN-9gA30lGvn4-WhqK3BPHGW3HpTOc,7497
|
|
13
13
|
agent/callbacks/trajectory_saver.py,sha256=POE8aPT-MBzfW873wr6C7iiVUHtp483KwvLPxC1S3EY,11626
|
|
14
|
-
agent/cli.py,sha256=
|
|
15
|
-
agent/computer_handler.py,sha256=
|
|
14
|
+
agent/cli.py,sha256=cVMwUzwsLXHK9nA-dR7SFx1WwJdSnaQROLtynjEQhD8,12401
|
|
15
|
+
agent/computer_handler.py,sha256=32w0Nnby3TJOSgOtceVhj46ExGIhAPSbwqIqm0HGi0A,4649
|
|
16
16
|
agent/decorators.py,sha256=n8VvMsififWkmuk75Q7HIpo0xAA2yAeQ6J-OOiwbAKc,1836
|
|
17
17
|
agent/loops/__init__.py,sha256=AQ8eLgAo9ZiSaRC8n9nMOudF2IWgIKd8130uWwQlIJg,297
|
|
18
|
-
agent/loops/anthropic.py,sha256=
|
|
18
|
+
agent/loops/anthropic.py,sha256=lvDscOaOcESBWZvnjKntQRWJZ4cEaFJhSsmmFc7J1ow,69562
|
|
19
19
|
agent/loops/base.py,sha256=LK7kSTnc2CB88LI7qr2VP7LMq0eS5r2bSEnrxO6IN5U,2345
|
|
20
20
|
agent/loops/composed_grounded.py,sha256=BgxufIyJCkWnJpp29PE1V2ce4iB9ictGjuVqFDx17B8,12122
|
|
21
21
|
agent/loops/gta1.py,sha256=ha5TaUWqUzTffx_ow1WiBU8i3VNP-6FL5XC66ajPFjg,5829
|
|
@@ -23,7 +23,7 @@ agent/loops/model_types.csv,sha256=GmFn4x80yoUpQZuQ-GXtJkPVlOLYWZ5u_5A73HRyeNE,1
|
|
|
23
23
|
agent/loops/omniparser.py,sha256=-db8JUL2Orn47ERIaLbuNShAXn4LeIgYzRWphn_9Dg4,15071
|
|
24
24
|
agent/loops/openai.py,sha256=8Ad_XufpENmLq1nEnhzF3oswPrPK1EPz-C5NU8UOEs0,8035
|
|
25
25
|
agent/loops/uitars.py,sha256=EDq8AO20lrnwB013uJoWSkkz3TVRU9oG8DQ1VviXltc,31445
|
|
26
|
-
agent/responses.py,sha256=
|
|
26
|
+
agent/responses.py,sha256=TTJ3wXN_eb0J26GKhO3cVQngOiZ1AgUPIUadozLUQyE,28991
|
|
27
27
|
agent/telemetry.py,sha256=87ZTyBaT0wEPQn4v76II3g0V3GERuIVbypoX-Ug6FKQ,4786
|
|
28
28
|
agent/types.py,sha256=zXev_CV9LvlYRkxzO_EmW1ZT70Z8qeGG3iHbzyYmV30,2425
|
|
29
29
|
agent/ui/__init__.py,sha256=DTZpK85QXscXK2nM9HtpAhVBF13yAamUrtwrQSuV-kM,126
|
|
@@ -31,7 +31,7 @@ agent/ui/__main__.py,sha256=vudWXYvGM0aNT5aZ94HPtGW8YXOZ4cLXepHyhUM_k1g,73
|
|
|
31
31
|
agent/ui/gradio/__init__.py,sha256=yv4Mrfo-Sj2U5sVn_UJHAuwYCezo-5O4ItR2C9jzNko,145
|
|
32
32
|
agent/ui/gradio/app.py,sha256=9UOPwuwspLrnHGY91zdzuRqkMH4cmwOBH-f-BC0gVC4,9077
|
|
33
33
|
agent/ui/gradio/ui_components.py,sha256=hVMGZxAEq1LBHOqKj-RbDXJsj1j0Qw5dOV0ecWIHxmc,35397
|
|
34
|
-
cua_agent-0.4.
|
|
35
|
-
cua_agent-0.4.
|
|
36
|
-
cua_agent-0.4.
|
|
37
|
-
cua_agent-0.4.
|
|
34
|
+
cua_agent-0.4.11.dist-info/METADATA,sha256=1p7PMFl8RGa085pc9bMQxp0Z5oi1T_Tny1wzx-9o3P0,12062
|
|
35
|
+
cua_agent-0.4.11.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
|
|
36
|
+
cua_agent-0.4.11.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
|
|
37
|
+
cua_agent-0.4.11.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|