cua-agent 0.4.11__py3-none-any.whl → 0.4.13__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/types.py CHANGED
@@ -9,7 +9,7 @@ from litellm import ResponseInputParam, ResponsesAPIResponse, ToolParam
9
9
  from collections.abc import Iterable
10
10
 
11
11
  # Agent input types
12
- Messages = str | ResponseInputParam
12
+ Messages = str | ResponseInputParam | List[Dict[str, Any]]
13
13
  Tools = Optional[Iterable[ToolParam]]
14
14
 
15
15
  # Agent output types
@@ -27,55 +27,3 @@ class AgentConfigInfo(BaseModel):
27
27
  def matches_model(self, model: str) -> bool:
28
28
  """Check if this agent config matches the given model"""
29
29
  return bool(re.match(self.models_regex, model))
30
-
31
- # Computer tool interface
32
- class Computer(Protocol):
33
- """Protocol defining the interface for computer interactions."""
34
-
35
- async def get_environment(self) -> Literal["windows", "mac", "linux", "browser"]:
36
- """Get the current environment type."""
37
- ...
38
-
39
- async def get_dimensions(self) -> tuple[int, int]:
40
- """Get screen dimensions as (width, height)."""
41
- ...
42
-
43
- async def screenshot(self) -> str:
44
- """Take a screenshot and return as base64 string."""
45
- ...
46
-
47
- async def click(self, x: int, y: int, button: str = "left") -> None:
48
- """Click at coordinates with specified button."""
49
- ...
50
-
51
- async def double_click(self, x: int, y: int) -> None:
52
- """Double click at coordinates."""
53
- ...
54
-
55
- async def scroll(self, x: int, y: int, scroll_x: int, scroll_y: int) -> None:
56
- """Scroll at coordinates with specified scroll amounts."""
57
- ...
58
-
59
- async def type(self, text: str) -> None:
60
- """Type text."""
61
- ...
62
-
63
- async def wait(self, ms: int = 1000) -> None:
64
- """Wait for specified milliseconds."""
65
- ...
66
-
67
- async def move(self, x: int, y: int) -> None:
68
- """Move cursor to coordinates."""
69
- ...
70
-
71
- async def keypress(self, keys: List[str]) -> None:
72
- """Press key combination."""
73
- ...
74
-
75
- async def drag(self, path: List[Dict[str, int]]) -> None:
76
- """Drag along specified path."""
77
- ...
78
-
79
- async def get_current_url(self) -> str:
80
- """Get current URL (for browser environments)."""
81
- ...
agent/ui/gradio/app.py CHANGED
@@ -39,6 +39,7 @@ global_agent = None
39
39
  global_computer = None
40
40
  SETTINGS_FILE = Path(".gradio_settings.json")
41
41
 
42
+ logging.basicConfig(level=logging.INFO)
42
43
 
43
44
  import dotenv
44
45
  if dotenv.load_dotenv():
@@ -187,7 +187,7 @@ if __name__ == "__main__":
187
187
  """
188
188
  <div style="display: flex; justify-content: center; margin-bottom: 0.5em">
189
189
  <img alt="CUA Logo" style="width: 80px;"
190
- src="https://github.com/trycua/cua/blob/main/img/logo_black.png?raw=true" />
190
+ src="https://github.com/trycua/cua/blob/main/img/logo_white.png?raw=true" />
191
191
  </div>
192
192
  """
193
193
  )
@@ -201,22 +201,33 @@ if __name__ == "__main__":
201
201
  )
202
202
 
203
203
  with gr.Accordion("Computer Configuration", open=True):
204
- computer_os = gr.Radio(
205
- choices=["macos", "linux", "windows"],
206
- label="Operating System",
207
- value="macos",
208
- info="Select the operating system for the computer",
209
- )
210
-
211
204
  is_windows = platform.system().lower() == "windows"
212
205
  is_mac = platform.system().lower() == "darwin"
213
206
 
214
- providers = ["cloud", "localhost"]
207
+ providers = ["cloud", "localhost", "docker"]
215
208
  if is_mac:
216
209
  providers += ["lume"]
217
210
  if is_windows:
218
211
  providers += ["winsandbox"]
219
212
 
213
+ # Remove unavailable options
214
+ # MacOS is unavailable if Lume is not available
215
+ # Windows is unavailable if Winsandbox is not available
216
+ # Linux is always available
217
+ # This should be removed once we support macOS and Windows on the cloud provider
218
+ computer_choices = ["macos", "linux", "windows"]
219
+ if not is_mac or "lume" not in providers:
220
+ computer_choices.remove("macos")
221
+ if not is_windows or "winsandbox" not in providers:
222
+ computer_choices.remove("windows")
223
+
224
+ computer_os = gr.Radio(
225
+ choices=computer_choices,
226
+ label="Operating System",
227
+ value=computer_choices[0],
228
+ info="Select the operating system for the computer",
229
+ )
230
+
220
231
  computer_provider = gr.Radio(
221
232
  choices=providers,
222
233
  label="Provider",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cua-agent
3
- Version: 0.4.11
3
+ Version: 0.4.13
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,20 +25,31 @@ 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"
31
+ Provides-Extra: glm45v-hf
32
+ Requires-Dist: accelerate; extra == "glm45v-hf"
33
+ Requires-Dist: torch; extra == "glm45v-hf"
34
+ Requires-Dist: transformers-v4.55.0-GLM-4.5V-preview; extra == "glm45v-hf"
29
35
  Provides-Extra: ui
30
36
  Requires-Dist: gradio>=5.23.3; extra == "ui"
31
37
  Requires-Dist: python-dotenv>=1.0.1; extra == "ui"
32
38
  Provides-Extra: cli
33
39
  Requires-Dist: yaspin>=3.1.0; extra == "cli"
40
+ Provides-Extra: hud
41
+ Requires-Dist: hud-python==0.2.10; extra == "hud"
34
42
  Provides-Extra: all
35
43
  Requires-Dist: ultralytics>=8.0.0; extra == "all"
36
44
  Requires-Dist: cua-som<0.2.0,>=0.1.0; extra == "all"
37
45
  Requires-Dist: mlx-vlm>=0.1.27; sys_platform == "darwin" and extra == "all"
46
+ Requires-Dist: accelerate; extra == "all"
47
+ Requires-Dist: torch; extra == "all"
38
48
  Requires-Dist: transformers>=4.54.0; extra == "all"
39
49
  Requires-Dist: gradio>=5.23.3; extra == "all"
40
50
  Requires-Dist: python-dotenv>=1.0.1; extra == "all"
41
51
  Requires-Dist: yaspin>=3.1.0; extra == "all"
52
+ Requires-Dist: hud-python==0.2.10; extra == "all"
42
53
  Description-Content-Type: text/markdown
43
54
 
44
55
  <div align="center">
@@ -80,6 +91,7 @@ pip install "cua-agent[omni]" # Omniparser + any LLM support
80
91
  pip install "cua-agent[uitars]" # UI-TARS
81
92
  pip install "cua-agent[uitars-mlx]" # UI-TARS + MLX support
82
93
  pip install "cua-agent[uitars-hf]" # UI-TARS + Huggingface support
94
+ pip install "cua-agent[glm45v-hf]" # GLM-4.5V + Huggingface support
83
95
  pip install "cua-agent[ui]" # Gradio UI support
84
96
  ```
85
97
 
@@ -0,0 +1,50 @@
1
+ agent/__init__.py,sha256=vWbQYgjkzIso7zILSm4OAbNU_vrmN4HyYkfX8vC-Yi0,1547
2
+ agent/__main__.py,sha256=lBUe8Niqa5XoCjwFfXyX7GtnUwjjZXC1-j4V9mvUYSc,538
3
+ agent/adapters/__init__.py,sha256=lNH6srgIMmZOI7dgicJs3LCk_1MeqLF0lou9n7b23Ts,238
4
+ agent/adapters/huggingfacelocal_adapter.py,sha256=Uqjtcohhzd33VFh38Ra2y4Uv_lTghMswoqS1t-KKFkw,8480
5
+ agent/adapters/human_adapter.py,sha256=xT4nnfNXb1z-vnGFlLmFEZN7TMcoMBGS40MtR1Zwv4o,13079
6
+ agent/agent.py,sha256=mEbmN5G6y8jZ0FrlUnHfJQFE7r_GlXrHxqC93twv54k,27881
7
+ agent/callbacks/__init__.py,sha256=yxxBXUqpXQ-jRi_ixJMtmQPxoNRy5Vz1PUBzNNa1Dwg,538
8
+ agent/callbacks/base.py,sha256=UnnnYlh6XCm6HKZZsAPaT_Eyo9LUYLyjyNwF-QRm6Ns,4691
9
+ agent/callbacks/budget_manager.py,sha256=RyKM-7iXQcDotYvrw3eURzeEHEXvQjID-NobtvQWE7k,1832
10
+ agent/callbacks/image_retention.py,sha256=tiuRT5ke9xXTb2eP8Gz-2ITyAMY29LURUH6AbjX3RP8,6165
11
+ agent/callbacks/logging.py,sha256=OOxU97EzrxlnUAtiEnvy9FB7SwCUK90-rdpDFA2Ae4E,10921
12
+ agent/callbacks/pii_anonymization.py,sha256=NEkUTUjQBi82nqus7kT-1E4RaeQ2hQrY7YCnKndLhP8,3272
13
+ agent/callbacks/telemetry.py,sha256=PU7pkK7W1v1xjDN-9gA30lGvn4-WhqK3BPHGW3HpTOc,7497
14
+ agent/callbacks/trajectory_saver.py,sha256=VHbiDQzI_XludkWhZIVqIMrsxgwKfFWwVtqaRot_D4U,12231
15
+ agent/cli.py,sha256=AgaXwywHd3nGQWuqMRj6SbPyFaCPjfo5980Y1ApQOTQ,12413
16
+ agent/computers/__init__.py,sha256=39ISJsaREaQIZckpzxSuLhuR763wUU3TxUux78EKjAg,1477
17
+ agent/computers/base.py,sha256=hZntX4vgc1ahD3EnFeb9lUjtBmgka1vb27hndPl9tKQ,2187
18
+ agent/computers/cua.py,sha256=xp2A34kT2C1NKqSRo2GB6766gkraM-UtpFjRv8LUTSc,4889
19
+ agent/computers/custom.py,sha256=I_CHXvczLg43c_QBk8F_WDOlaSOOzK6b-Tkum2OSRIM,8029
20
+ agent/decorators.py,sha256=n8VvMsififWkmuk75Q7HIpo0xAA2yAeQ6J-OOiwbAKc,1836
21
+ agent/human_tool/__init__.py,sha256=3m5_g-Fo_0yX5vi7eg-A92oTqO0N3aY929Ajp78HKsE,771
22
+ agent/human_tool/__main__.py,sha256=VsW2BAghlonOuqZbP_xuCsaec9bemA1I_ibnDcED9D4,1068
23
+ agent/human_tool/server.py,sha256=ceuL5kw_RjgAi8fueLU3nTjyzOLE25Shv1oTJnSHsoQ,7964
24
+ agent/human_tool/ui.py,sha256=2Jk3Bh-Jctya8GUG-qtYbdi-1qDdwOtcAlUeiIqsoIE,26584
25
+ agent/integrations/hud/__init__.py,sha256=1lqeM6vJAekr38l7yteLNa-Hn3R2eXCusT2FAaY8VPE,2943
26
+ agent/integrations/hud/adapter.py,sha256=M7J71q29Ndr4xXIW7Y6H_HIlJmnp-JlKG_4zKZTuyps,4088
27
+ agent/integrations/hud/agent.py,sha256=vXmI7OBez5lokQ9dCcgWeT8N68xfWpsWT3S36MLhdas,17264
28
+ agent/integrations/hud/computer_handler.py,sha256=N5pVKeKW9bJ-oceYrE7IIHbx6ZrQRQnHItTGrytoHRM,6788
29
+ agent/loops/__init__.py,sha256=Ef8aj07l3osibwDk-DTo80PrpL4_GdKRTP1ikl_b-BQ,328
30
+ agent/loops/anthropic.py,sha256=lvDscOaOcESBWZvnjKntQRWJZ4cEaFJhSsmmFc7J1ow,69562
31
+ agent/loops/base.py,sha256=LK7kSTnc2CB88LI7qr2VP7LMq0eS5r2bSEnrxO6IN5U,2345
32
+ agent/loops/composed_grounded.py,sha256=BgxufIyJCkWnJpp29PE1V2ce4iB9ictGjuVqFDx17B8,12122
33
+ agent/loops/glm45v.py,sha256=V1f-5vAifbYcY-qTc7fW2KXVRkAfApQI_EjavH3X2ak,35110
34
+ agent/loops/gta1.py,sha256=ha5TaUWqUzTffx_ow1WiBU8i3VNP-6FL5XC66ajPFjg,5829
35
+ agent/loops/model_types.csv,sha256=GmFn4x80yoUpQZuQ-GXtJkPVlOLYWZ5u_5A73HRyeNE,112
36
+ agent/loops/omniparser.py,sha256=-db8JUL2Orn47ERIaLbuNShAXn4LeIgYzRWphn_9Dg4,15071
37
+ agent/loops/openai.py,sha256=8Ad_XufpENmLq1nEnhzF3oswPrPK1EPz-C5NU8UOEs0,8035
38
+ agent/loops/uitars.py,sha256=EDq8AO20lrnwB013uJoWSkkz3TVRU9oG8DQ1VviXltc,31445
39
+ agent/responses.py,sha256=TTJ3wXN_eb0J26GKhO3cVQngOiZ1AgUPIUadozLUQyE,28991
40
+ agent/telemetry.py,sha256=87ZTyBaT0wEPQn4v76II3g0V3GERuIVbypoX-Ug6FKQ,4786
41
+ agent/types.py,sha256=ZoWY8a3GZtB8V0SnOzoI7DQy4nP_GRubxJKbuLPOc8c,840
42
+ agent/ui/__init__.py,sha256=DTZpK85QXscXK2nM9HtpAhVBF13yAamUrtwrQSuV-kM,126
43
+ agent/ui/__main__.py,sha256=vudWXYvGM0aNT5aZ94HPtGW8YXOZ4cLXepHyhUM_k1g,73
44
+ agent/ui/gradio/__init__.py,sha256=yv4Mrfo-Sj2U5sVn_UJHAuwYCezo-5O4ItR2C9jzNko,145
45
+ agent/ui/gradio/app.py,sha256=m2yDd6Tua_lMMZT1zCzOty2meYEy756d8OlFF7lpdeU,9117
46
+ agent/ui/gradio/ui_components.py,sha256=vfsqVo_COsFfw11ouMHClib9fdBf3q52G-qbuo0RyOY,36068
47
+ cua_agent-0.4.13.dist-info/METADATA,sha256=Xr2mN1uCE8Mu5TiYskFjb6DpN-FgmihPTyNyPa665yo,12616
48
+ cua_agent-0.4.13.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
49
+ cua_agent-0.4.13.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
50
+ cua_agent-0.4.13.dist-info/RECORD,,
@@ -1,37 +0,0 @@
1
- agent/__init__.py,sha256=vWbQYgjkzIso7zILSm4OAbNU_vrmN4HyYkfX8vC-Yi0,1547
2
- agent/__main__.py,sha256=lBUe8Niqa5XoCjwFfXyX7GtnUwjjZXC1-j4V9mvUYSc,538
3
- agent/adapters/__init__.py,sha256=szM2HMten2WkcqXeRnan__-sXjpyS4eyvIW0LXSfj4U,178
4
- agent/adapters/huggingfacelocal_adapter.py,sha256=CT3dwJnOWItB5eTqpn5i0Y1Ec6yRjaW7zhA14Ot9gz8,8066
5
- agent/agent.py,sha256=PP6UvNq_QYBYuEt97Dhono7g3hz1fQlMIapSQRhw59c,27761
6
- agent/callbacks/__init__.py,sha256=yxxBXUqpXQ-jRi_ixJMtmQPxoNRy5Vz1PUBzNNa1Dwg,538
7
- agent/callbacks/base.py,sha256=UnnnYlh6XCm6HKZZsAPaT_Eyo9LUYLyjyNwF-QRm6Ns,4691
8
- agent/callbacks/budget_manager.py,sha256=RyKM-7iXQcDotYvrw3eURzeEHEXvQjID-NobtvQWE7k,1832
9
- agent/callbacks/image_retention.py,sha256=tiuRT5ke9xXTb2eP8Gz-2ITyAMY29LURUH6AbjX3RP8,6165
10
- agent/callbacks/logging.py,sha256=OOxU97EzrxlnUAtiEnvy9FB7SwCUK90-rdpDFA2Ae4E,10921
11
- agent/callbacks/pii_anonymization.py,sha256=NEkUTUjQBi82nqus7kT-1E4RaeQ2hQrY7YCnKndLhP8,3272
12
- agent/callbacks/telemetry.py,sha256=PU7pkK7W1v1xjDN-9gA30lGvn4-WhqK3BPHGW3HpTOc,7497
13
- agent/callbacks/trajectory_saver.py,sha256=POE8aPT-MBzfW873wr6C7iiVUHtp483KwvLPxC1S3EY,11626
14
- agent/cli.py,sha256=cVMwUzwsLXHK9nA-dR7SFx1WwJdSnaQROLtynjEQhD8,12401
15
- agent/computer_handler.py,sha256=32w0Nnby3TJOSgOtceVhj46ExGIhAPSbwqIqm0HGi0A,4649
16
- agent/decorators.py,sha256=n8VvMsififWkmuk75Q7HIpo0xAA2yAeQ6J-OOiwbAKc,1836
17
- agent/loops/__init__.py,sha256=AQ8eLgAo9ZiSaRC8n9nMOudF2IWgIKd8130uWwQlIJg,297
18
- agent/loops/anthropic.py,sha256=lvDscOaOcESBWZvnjKntQRWJZ4cEaFJhSsmmFc7J1ow,69562
19
- agent/loops/base.py,sha256=LK7kSTnc2CB88LI7qr2VP7LMq0eS5r2bSEnrxO6IN5U,2345
20
- agent/loops/composed_grounded.py,sha256=BgxufIyJCkWnJpp29PE1V2ce4iB9ictGjuVqFDx17B8,12122
21
- agent/loops/gta1.py,sha256=ha5TaUWqUzTffx_ow1WiBU8i3VNP-6FL5XC66ajPFjg,5829
22
- agent/loops/model_types.csv,sha256=GmFn4x80yoUpQZuQ-GXtJkPVlOLYWZ5u_5A73HRyeNE,112
23
- agent/loops/omniparser.py,sha256=-db8JUL2Orn47ERIaLbuNShAXn4LeIgYzRWphn_9Dg4,15071
24
- agent/loops/openai.py,sha256=8Ad_XufpENmLq1nEnhzF3oswPrPK1EPz-C5NU8UOEs0,8035
25
- agent/loops/uitars.py,sha256=EDq8AO20lrnwB013uJoWSkkz3TVRU9oG8DQ1VviXltc,31445
26
- agent/responses.py,sha256=TTJ3wXN_eb0J26GKhO3cVQngOiZ1AgUPIUadozLUQyE,28991
27
- agent/telemetry.py,sha256=87ZTyBaT0wEPQn4v76II3g0V3GERuIVbypoX-Ug6FKQ,4786
28
- agent/types.py,sha256=zXev_CV9LvlYRkxzO_EmW1ZT70Z8qeGG3iHbzyYmV30,2425
29
- agent/ui/__init__.py,sha256=DTZpK85QXscXK2nM9HtpAhVBF13yAamUrtwrQSuV-kM,126
30
- agent/ui/__main__.py,sha256=vudWXYvGM0aNT5aZ94HPtGW8YXOZ4cLXepHyhUM_k1g,73
31
- agent/ui/gradio/__init__.py,sha256=yv4Mrfo-Sj2U5sVn_UJHAuwYCezo-5O4ItR2C9jzNko,145
32
- agent/ui/gradio/app.py,sha256=9UOPwuwspLrnHGY91zdzuRqkMH4cmwOBH-f-BC0gVC4,9077
33
- agent/ui/gradio/ui_components.py,sha256=hVMGZxAEq1LBHOqKj-RbDXJsj1j0Qw5dOV0ecWIHxmc,35397
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,,