cua-agent 0.4.10__py3-none-any.whl → 0.4.12__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/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]]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cua-agent
3
- Version: 0.4.10
3
+ Version: 0.4.12
4
4
  Summary: CUA (Computer Use) Agent for AI-driven computer interaction
5
5
  Author-Email: TryCua <gh@trycua.com>
6
6
  Requires-Python: >=3.11
@@ -25,16 +25,24 @@ Provides-Extra: uitars
25
25
  Provides-Extra: uitars-mlx
26
26
  Requires-Dist: mlx-vlm>=0.1.27; sys_platform == "darwin" and extra == "uitars-mlx"
27
27
  Provides-Extra: uitars-hf
28
+ Requires-Dist: accelerate; extra == "uitars-hf"
29
+ Requires-Dist: torch; extra == "uitars-hf"
28
30
  Requires-Dist: transformers>=4.54.0; extra == "uitars-hf"
29
31
  Provides-Extra: ui
30
32
  Requires-Dist: gradio>=5.23.3; extra == "ui"
31
33
  Requires-Dist: python-dotenv>=1.0.1; extra == "ui"
32
34
  Provides-Extra: cli
33
35
  Requires-Dist: yaspin>=3.1.0; extra == "cli"
36
+ Provides-Extra: glm45v-hf
37
+ Requires-Dist: accelerate; extra == "glm45v-hf"
38
+ Requires-Dist: torch; extra == "glm45v-hf"
39
+ Requires-Dist: transformers-v4.55.0-GLM-4.5V-preview; extra == "glm45v-hf"
34
40
  Provides-Extra: all
35
41
  Requires-Dist: ultralytics>=8.0.0; extra == "all"
36
42
  Requires-Dist: cua-som<0.2.0,>=0.1.0; extra == "all"
37
43
  Requires-Dist: mlx-vlm>=0.1.27; sys_platform == "darwin" and extra == "all"
44
+ Requires-Dist: accelerate; extra == "all"
45
+ Requires-Dist: torch; extra == "all"
38
46
  Requires-Dist: transformers>=4.54.0; extra == "all"
39
47
  Requires-Dist: gradio>=5.23.3; extra == "all"
40
48
  Requires-Dist: python-dotenv>=1.0.1; extra == "all"
@@ -80,6 +88,7 @@ pip install "cua-agent[omni]" # Omniparser + any LLM support
80
88
  pip install "cua-agent[uitars]" # UI-TARS
81
89
  pip install "cua-agent[uitars-mlx]" # UI-TARS + MLX support
82
90
  pip install "cua-agent[uitars-hf]" # UI-TARS + Huggingface support
91
+ pip install "cua-agent[glm45v-hf]" # GLM-4.5V + Huggingface support
83
92
  pip install "cua-agent[ui]" # Gradio UI support
84
93
  ```
85
94
 
@@ -11,19 +11,20 @@ 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=LDKjahBcZLFjUSq3c4MYELJ3dxJ0n5lgY2WKTC3rXQY,12375
15
- agent/computer_handler.py,sha256=OaBD5QZ86bp-1cMCRX4q5STGtkGUmpvGT8-224VqC3E,4139
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
- agent/loops/__init__.py,sha256=AQ8eLgAo9ZiSaRC8n9nMOudF2IWgIKd8130uWwQlIJg,297
18
- agent/loops/anthropic.py,sha256=joz7ibK6B4rTR3ue8a8rRcY0K0FIAv0TwcH2BL46Nmg,62557
17
+ agent/loops/__init__.py,sha256=Ef8aj07l3osibwDk-DTo80PrpL4_GdKRTP1ikl_b-BQ,328
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
+ agent/loops/glm45v.py,sha256=V1f-5vAifbYcY-qTc7fW2KXVRkAfApQI_EjavH3X2ak,35110
21
22
  agent/loops/gta1.py,sha256=ha5TaUWqUzTffx_ow1WiBU8i3VNP-6FL5XC66ajPFjg,5829
22
23
  agent/loops/model_types.csv,sha256=GmFn4x80yoUpQZuQ-GXtJkPVlOLYWZ5u_5A73HRyeNE,112
23
24
  agent/loops/omniparser.py,sha256=-db8JUL2Orn47ERIaLbuNShAXn4LeIgYzRWphn_9Dg4,15071
24
25
  agent/loops/openai.py,sha256=8Ad_XufpENmLq1nEnhzF3oswPrPK1EPz-C5NU8UOEs0,8035
25
26
  agent/loops/uitars.py,sha256=EDq8AO20lrnwB013uJoWSkkz3TVRU9oG8DQ1VviXltc,31445
26
- agent/responses.py,sha256=ZI1nUYyyDNiiI7PwJpfta4RlGeuxpT-Tm-ptF6-ys9c,27498
27
+ agent/responses.py,sha256=TTJ3wXN_eb0J26GKhO3cVQngOiZ1AgUPIUadozLUQyE,28991
27
28
  agent/telemetry.py,sha256=87ZTyBaT0wEPQn4v76II3g0V3GERuIVbypoX-Ug6FKQ,4786
28
29
  agent/types.py,sha256=zXev_CV9LvlYRkxzO_EmW1ZT70Z8qeGG3iHbzyYmV30,2425
29
30
  agent/ui/__init__.py,sha256=DTZpK85QXscXK2nM9HtpAhVBF13yAamUrtwrQSuV-kM,126
@@ -31,7 +32,7 @@ agent/ui/__main__.py,sha256=vudWXYvGM0aNT5aZ94HPtGW8YXOZ4cLXepHyhUM_k1g,73
31
32
  agent/ui/gradio/__init__.py,sha256=yv4Mrfo-Sj2U5sVn_UJHAuwYCezo-5O4ItR2C9jzNko,145
32
33
  agent/ui/gradio/app.py,sha256=9UOPwuwspLrnHGY91zdzuRqkMH4cmwOBH-f-BC0gVC4,9077
33
34
  agent/ui/gradio/ui_components.py,sha256=hVMGZxAEq1LBHOqKj-RbDXJsj1j0Qw5dOV0ecWIHxmc,35397
34
- cua_agent-0.4.10.dist-info/METADATA,sha256=LnHjNmk8P_E6qKd2L_xWRKAtTpiwrF8Hm-ITs4ku3wc,12062
35
- cua_agent-0.4.10.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
36
- cua_agent-0.4.10.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
37
- cua_agent-0.4.10.dist-info/RECORD,,
35
+ cua_agent-0.4.12.dist-info/METADATA,sha256=V2vFnsnQ8atsj-8B5aVfBp2-5Hpl2df2uPxflc5vNNo,12496
36
+ cua_agent-0.4.12.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
37
+ cua_agent-0.4.12.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
38
+ cua_agent-0.4.12.dist-info/RECORD,,