cua-agent 0.2.14__py3-none-any.whl → 0.2.15__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.

@@ -50,8 +50,8 @@ class BashTool(BaseBashTool, BaseAnthropicTool):
50
50
 
51
51
  try:
52
52
  async with asyncio.timeout(self._timeout):
53
- stdout, stderr = await self.computer.interface.run_command(command)
54
- return CLIResult(output=stdout or "", error=stderr or "")
53
+ result = await self.computer.interface.run_command(command)
54
+ return CLIResult(output=result.stdout or "", error=result.stderr or "")
55
55
  except asyncio.TimeoutError as e:
56
56
  raise ToolError(f"Command timed out after {self._timeout} seconds") from e
57
57
  except Exception as e:
@@ -95,13 +95,13 @@ class EditTool(BaseEditTool, BaseAnthropicTool):
95
95
  result = await self.computer.interface.run_command(
96
96
  f'[ -e "{str(path)}" ] && echo "exists" || echo "not exists"'
97
97
  )
98
- exists = result[0].strip() == "exists"
98
+ exists = result.stdout.strip() == "exists"
99
99
 
100
100
  if exists:
101
101
  result = await self.computer.interface.run_command(
102
102
  f'[ -d "{str(path)}" ] && echo "dir" || echo "file"'
103
103
  )
104
- is_dir = result[0].strip() == "dir"
104
+ is_dir = result.stdout.strip() == "dir"
105
105
  else:
106
106
  is_dir = False
107
107
 
@@ -126,7 +126,7 @@ class EditTool(BaseEditTool, BaseAnthropicTool):
126
126
  result = await self.computer.interface.run_command(
127
127
  f'[ -d "{str(path)}" ] && echo "dir" || echo "file"'
128
128
  )
129
- is_dir = result[0].strip() == "dir"
129
+ is_dir = result.stdout.strip() == "dir"
130
130
 
131
131
  if is_dir:
132
132
  if view_range:
@@ -136,7 +136,7 @@ class EditTool(BaseEditTool, BaseAnthropicTool):
136
136
 
137
137
  # List directory contents using ls
138
138
  result = await self.computer.interface.run_command(f'ls -la "{str(path)}"')
139
- contents = result[0]
139
+ contents = result.stdout
140
140
  if contents:
141
141
  stdout = f"Here's the files and directories in {path}:\n{contents}\n"
142
142
  else:
@@ -272,9 +272,9 @@ class EditTool(BaseEditTool, BaseAnthropicTool):
272
272
  """Read the content of a file using cat command."""
273
273
  try:
274
274
  result = await self.computer.interface.run_command(f'cat "{str(path)}"')
275
- if result[1]: # If there's stderr output
276
- raise ToolError(f"Error reading file: {result[1]}")
277
- return result[0]
275
+ if result.stderr: # If there's stderr output
276
+ raise ToolError(f"Error reading file: {result.stderr}")
277
+ return result.stdout
278
278
  except Exception as e:
279
279
  raise ToolError(f"Failed to read {path}: {str(e)}")
280
280
 
@@ -291,8 +291,8 @@ class EditTool(BaseEditTool, BaseAnthropicTool):
291
291
  {content}
292
292
  EOFCUA"""
293
293
  result = await self.computer.interface.run_command(cmd)
294
- if result[1]: # If there's stderr output
295
- raise ToolError(f"Error writing file: {result[1]}")
294
+ if result.stderr: # If there's stderr output
295
+ raise ToolError(f"Error writing file: {result.stderr}")
296
296
  except Exception as e:
297
297
  raise ToolError(f"Failed to write to {path}: {str(e)}")
298
298
 
@@ -1,73 +1,73 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cua-agent
3
- Version: 0.2.14
3
+ Version: 0.2.15
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
7
- Requires-Dist: httpx<0.29.0,>=0.27.0
8
- Requires-Dist: aiohttp<4.0.0,>=3.9.3
7
+ Requires-Dist: httpx>=0.27.0
8
+ Requires-Dist: aiohttp>=3.9.3
9
9
  Requires-Dist: asyncio
10
- Requires-Dist: anyio<5.0.0,>=4.4.1
11
- Requires-Dist: typing-extensions<5.0.0,>=4.12.2
12
- Requires-Dist: pydantic<3.0.0,>=2.6.4
13
- Requires-Dist: rich<14.0.0,>=13.7.1
14
- Requires-Dist: python-dotenv<2.0.0,>=1.0.1
15
- Requires-Dist: cua-computer<0.3.0,>=0.2.0
10
+ Requires-Dist: anyio>=4.4.1
11
+ Requires-Dist: typing-extensions>=4.12.2
12
+ Requires-Dist: pydantic>=2.6.4
13
+ Requires-Dist: rich>=13.7.1
14
+ Requires-Dist: python-dotenv>=1.0.1
15
+ Requires-Dist: cua-computer<0.4.0,>=0.3.0
16
16
  Requires-Dist: cua-core<0.2.0,>=0.1.0
17
17
  Requires-Dist: certifi>=2024.2.2
18
18
  Provides-Extra: anthropic
19
19
  Requires-Dist: anthropic>=0.49.0; extra == "anthropic"
20
- Requires-Dist: boto3<2.0.0,>=1.35.81; extra == "anthropic"
20
+ Requires-Dist: boto3>=1.35.81; extra == "anthropic"
21
21
  Provides-Extra: openai
22
- Requires-Dist: openai<2.0.0,>=1.14.0; extra == "openai"
23
- Requires-Dist: httpx<0.29.0,>=0.27.0; extra == "openai"
22
+ Requires-Dist: openai>=1.14.0; extra == "openai"
23
+ Requires-Dist: httpx>=0.27.0; extra == "openai"
24
24
  Provides-Extra: uitars
25
- Requires-Dist: httpx<0.29.0,>=0.27.0; extra == "uitars"
25
+ Requires-Dist: httpx>=0.27.0; extra == "uitars"
26
26
  Provides-Extra: uitars-mlx
27
27
  Requires-Dist: mlx-vlm>=0.1.27; sys_platform == "darwin" and extra == "uitars-mlx"
28
28
  Provides-Extra: ui
29
- Requires-Dist: gradio<6.0.0,>=5.23.3; extra == "ui"
30
- Requires-Dist: python-dotenv<2.0.0,>=1.0.1; extra == "ui"
29
+ Requires-Dist: gradio>=5.23.3; extra == "ui"
30
+ Requires-Dist: python-dotenv>=1.0.1; extra == "ui"
31
31
  Provides-Extra: som
32
32
  Requires-Dist: torch>=2.2.1; extra == "som"
33
33
  Requires-Dist: torchvision>=0.17.1; extra == "som"
34
34
  Requires-Dist: ultralytics>=8.0.0; extra == "som"
35
35
  Requires-Dist: transformers>=4.38.2; extra == "som"
36
36
  Requires-Dist: cua-som<0.2.0,>=0.1.0; extra == "som"
37
- Requires-Dist: anthropic<0.47.0,>=0.46.0; extra == "som"
38
- Requires-Dist: boto3<2.0.0,>=1.35.81; extra == "som"
39
- Requires-Dist: openai<2.0.0,>=1.14.0; extra == "som"
40
- Requires-Dist: groq<0.5.0,>=0.4.0; extra == "som"
41
- Requires-Dist: dashscope<2.0.0,>=1.13.0; extra == "som"
42
- Requires-Dist: requests<3.0.0,>=2.31.0; extra == "som"
37
+ Requires-Dist: anthropic>=0.46.0; extra == "som"
38
+ Requires-Dist: boto3>=1.35.81; extra == "som"
39
+ Requires-Dist: openai>=1.14.0; extra == "som"
40
+ Requires-Dist: groq>=0.4.0; extra == "som"
41
+ Requires-Dist: dashscope>=1.13.0; extra == "som"
42
+ Requires-Dist: requests>=2.31.0; extra == "som"
43
43
  Provides-Extra: omni
44
44
  Requires-Dist: torch>=2.2.1; extra == "omni"
45
45
  Requires-Dist: torchvision>=0.17.1; extra == "omni"
46
46
  Requires-Dist: ultralytics>=8.0.0; extra == "omni"
47
47
  Requires-Dist: transformers>=4.38.2; extra == "omni"
48
48
  Requires-Dist: cua-som<0.2.0,>=0.1.0; extra == "omni"
49
- Requires-Dist: anthropic<0.47.0,>=0.46.0; extra == "omni"
50
- Requires-Dist: boto3<2.0.0,>=1.35.81; extra == "omni"
51
- Requires-Dist: openai<2.0.0,>=1.14.0; extra == "omni"
52
- Requires-Dist: groq<0.5.0,>=0.4.0; extra == "omni"
53
- Requires-Dist: dashscope<2.0.0,>=1.13.0; extra == "omni"
54
- Requires-Dist: requests<3.0.0,>=2.31.0; extra == "omni"
55
- Requires-Dist: ollama<0.5.0,>=0.4.7; extra == "omni"
49
+ Requires-Dist: anthropic>=0.46.0; extra == "omni"
50
+ Requires-Dist: boto3>=1.35.81; extra == "omni"
51
+ Requires-Dist: openai>=1.14.0; extra == "omni"
52
+ Requires-Dist: groq>=0.4.0; extra == "omni"
53
+ Requires-Dist: dashscope>=1.13.0; extra == "omni"
54
+ Requires-Dist: requests>=2.31.0; extra == "omni"
55
+ Requires-Dist: ollama>=0.4.7; extra == "omni"
56
56
  Provides-Extra: all
57
57
  Requires-Dist: torch>=2.2.1; extra == "all"
58
58
  Requires-Dist: torchvision>=0.17.1; extra == "all"
59
59
  Requires-Dist: ultralytics>=8.0.0; extra == "all"
60
60
  Requires-Dist: transformers>=4.38.2; extra == "all"
61
61
  Requires-Dist: cua-som<0.2.0,>=0.1.0; extra == "all"
62
- Requires-Dist: anthropic<0.47.0,>=0.46.0; extra == "all"
63
- Requires-Dist: boto3<2.0.0,>=1.35.81; extra == "all"
64
- Requires-Dist: openai<2.0.0,>=1.14.0; extra == "all"
65
- Requires-Dist: groq<0.5.0,>=0.4.0; extra == "all"
66
- Requires-Dist: dashscope<2.0.0,>=1.13.0; extra == "all"
67
- Requires-Dist: requests<3.0.0,>=2.31.0; extra == "all"
68
- Requires-Dist: ollama<0.5.0,>=0.4.7; extra == "all"
69
- Requires-Dist: gradio<6.0.0,>=5.23.3; extra == "all"
70
- Requires-Dist: python-dotenv<2.0.0,>=1.0.1; extra == "all"
62
+ Requires-Dist: anthropic>=0.46.0; extra == "all"
63
+ Requires-Dist: boto3>=1.35.81; extra == "all"
64
+ Requires-Dist: openai>=1.14.0; extra == "all"
65
+ Requires-Dist: groq>=0.4.0; extra == "all"
66
+ Requires-Dist: dashscope>=1.13.0; extra == "all"
67
+ Requires-Dist: requests>=2.31.0; extra == "all"
68
+ Requires-Dist: ollama>=0.4.7; extra == "all"
69
+ Requires-Dist: gradio>=5.23.3; extra == "all"
70
+ Requires-Dist: python-dotenv>=1.0.1; extra == "all"
71
71
  Requires-Dist: mlx-vlm>=0.1.27; sys_platform == "darwin" and extra == "all"
72
72
  Description-Content-Type: text/markdown
73
73
 
@@ -30,10 +30,10 @@ agent/providers/anthropic/prompts.py,sha256=EaqyvUb90yybv75VsBYzu4sroga7eMACys0u
30
30
  agent/providers/anthropic/response_handler.py,sha256=ZTprV4NTP9Eb9jQ7QgEKZBX0L6rMj5nqBRiE3Zfws8I,8008
31
31
  agent/providers/anthropic/tools/__init__.py,sha256=JyZwuVtPUnZwRSZBSCdQv9yxbLCsygm3l8Ywjjt9qTQ,661
32
32
  agent/providers/anthropic/tools/base.py,sha256=WnRDbqO25tQzLpS2RU2ZXTLF5wd5IqU7SiyRAglQat4,2752
33
- agent/providers/anthropic/tools/bash.py,sha256=QODuFjWuHM4GgGTqK2HizSyYqGqQwX70AdwrFiGSp2Q,2218
33
+ agent/providers/anthropic/tools/bash.py,sha256=bAx5RpXdMCWnEQcp7DaytQ82rqJdgV5QQveWu84oG5I,2224
34
34
  agent/providers/anthropic/tools/collection.py,sha256=RBK_6hxfHExR-EOxadiLl0OznmFj07nyIUjFgaYZ6Eo,960
35
35
  agent/providers/anthropic/tools/computer.py,sha256=GRmEOyZGQ6Sw7jNx39-WEWdYqQ0X0E5hW2nE2z-52a8,16979
36
- agent/providers/anthropic/tools/edit.py,sha256=EGRP61MDA4Oue1D7Q-_vLpd6LdGbdBA1Z4HSZ66DbmI,13465
36
+ agent/providers/anthropic/tools/edit.py,sha256=5XzzUhXKzGWxhygIiHw51GC7lfOB97ipwsRlfa_5WVk,13501
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
@@ -81,7 +81,7 @@ agent/ui/__init__.py,sha256=ohhxJLBin6k1hl5sKcmBST8mgh23WXgAXz3pN4f470E,45
81
81
  agent/ui/__main__.py,sha256=Ah2575SAf7hI8QCsCKx-W4A6QcFsnFPdqMArmJ4H9ic,299
82
82
  agent/ui/gradio/__init__.py,sha256=ANKZhv1HqsLheWbLVBlyRQ7Q5qGeXuPi5jDs8vu-ZMo,579
83
83
  agent/ui/gradio/app.py,sha256=7T0IDS9jxMKf9a6KcxdGLmsIEkJ65n0rkCJMILQv_1Q,70605
84
- cua_agent-0.2.14.dist-info/METADATA,sha256=7_HfoeNB2hTdor0H4uTJ8doMOmAFcj4HE_t4OFZcP3U,12656
85
- cua_agent-0.2.14.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
86
- cua_agent-0.2.14.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
87
- cua_agent-0.2.14.dist-info/RECORD,,
84
+ cua_agent-0.2.15.dist-info/METADATA,sha256=dxmS8E0KUHNKo4agV1bkKpSJ1vppCFNz2RMrcr9x0TY,12404
85
+ cua_agent-0.2.15.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
86
+ cua_agent-0.2.15.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
87
+ cua_agent-0.2.15.dist-info/RECORD,,