cua-computer 0.2.13__tar.gz → 0.3.1__tar.gz
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.
- {cua_computer-0.2.13 → cua_computer-0.3.1}/PKG-INFO +7 -7
- {cua_computer-0.2.13 → cua_computer-0.3.1}/computer/interface/base.py +39 -6
- cua_computer-0.2.13/computer/interface/macos.py → cua_computer-0.3.1/computer/interface/generic.py +517 -427
- cua_computer-0.3.1/computer/interface/linux.py +8 -0
- cua_computer-0.3.1/computer/interface/macos.py +12 -0
- {cua_computer-0.2.13 → cua_computer-0.3.1}/computer/interface/models.py +12 -0
- cua_computer-0.3.1/computer/interface/windows.py +8 -0
- {cua_computer-0.2.13 → cua_computer-0.3.1}/computer/providers/winsandbox/provider.py +22 -5
- {cua_computer-0.2.13 → cua_computer-0.3.1}/pyproject.toml +9 -9
- cua_computer-0.2.13/computer/interface/linux.py +0 -688
- cua_computer-0.2.13/computer/interface/windows.py +0 -687
- {cua_computer-0.2.13 → cua_computer-0.3.1}/README.md +0 -0
- {cua_computer-0.2.13 → cua_computer-0.3.1}/computer/__init__.py +0 -0
- {cua_computer-0.2.13 → cua_computer-0.3.1}/computer/computer.py +0 -0
- {cua_computer-0.2.13 → cua_computer-0.3.1}/computer/diorama_computer.py +0 -0
- {cua_computer-0.2.13 → cua_computer-0.3.1}/computer/helpers.py +0 -0
- {cua_computer-0.2.13 → cua_computer-0.3.1}/computer/interface/__init__.py +0 -0
- {cua_computer-0.2.13 → cua_computer-0.3.1}/computer/interface/factory.py +0 -0
- {cua_computer-0.2.13 → cua_computer-0.3.1}/computer/logger.py +0 -0
- {cua_computer-0.2.13 → cua_computer-0.3.1}/computer/models.py +0 -0
- {cua_computer-0.2.13 → cua_computer-0.3.1}/computer/providers/__init__.py +0 -0
- {cua_computer-0.2.13 → cua_computer-0.3.1}/computer/providers/base.py +0 -0
- {cua_computer-0.2.13 → cua_computer-0.3.1}/computer/providers/cloud/__init__.py +0 -0
- {cua_computer-0.2.13 → cua_computer-0.3.1}/computer/providers/cloud/provider.py +0 -0
- {cua_computer-0.2.13 → cua_computer-0.3.1}/computer/providers/factory.py +0 -0
- {cua_computer-0.2.13 → cua_computer-0.3.1}/computer/providers/lume/__init__.py +0 -0
- {cua_computer-0.2.13 → cua_computer-0.3.1}/computer/providers/lume/provider.py +0 -0
- {cua_computer-0.2.13 → cua_computer-0.3.1}/computer/providers/lume_api.py +0 -0
- {cua_computer-0.2.13 → cua_computer-0.3.1}/computer/providers/lumier/__init__.py +0 -0
- {cua_computer-0.2.13 → cua_computer-0.3.1}/computer/providers/lumier/provider.py +0 -0
- {cua_computer-0.2.13 → cua_computer-0.3.1}/computer/providers/winsandbox/__init__.py +0 -0
- {cua_computer-0.2.13 → cua_computer-0.3.1}/computer/providers/winsandbox/setup_script.ps1 +0 -0
- {cua_computer-0.2.13 → cua_computer-0.3.1}/computer/telemetry.py +0 -0
- {cua_computer-0.2.13 → cua_computer-0.3.1}/computer/ui/__init__.py +0 -0
- {cua_computer-0.2.13 → cua_computer-0.3.1}/computer/ui/__main__.py +0 -0
- {cua_computer-0.2.13 → cua_computer-0.3.1}/computer/ui/gradio/__init__.py +0 -0
- {cua_computer-0.2.13 → cua_computer-0.3.1}/computer/ui/gradio/app.py +0 -0
- {cua_computer-0.2.13 → cua_computer-0.3.1}/computer/utils.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: cua-computer
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.3.1
|
4
4
|
Summary: Computer-Use Interface (CUI) framework powering Cua
|
5
5
|
Author-Email: TryCua <gh@trycua.com>
|
6
6
|
Requires-Python: >=3.11
|
@@ -13,13 +13,13 @@ Requires-Dist: pydantic>=2.11.1
|
|
13
13
|
Provides-Extra: lume
|
14
14
|
Provides-Extra: lumier
|
15
15
|
Provides-Extra: ui
|
16
|
-
Requires-Dist: gradio
|
17
|
-
Requires-Dist: python-dotenv
|
18
|
-
Requires-Dist: datasets
|
16
|
+
Requires-Dist: gradio>=5.23.3; extra == "ui"
|
17
|
+
Requires-Dist: python-dotenv>=1.0.1; extra == "ui"
|
18
|
+
Requires-Dist: datasets>=3.6.0; extra == "ui"
|
19
19
|
Provides-Extra: all
|
20
|
-
Requires-Dist: gradio
|
21
|
-
Requires-Dist: python-dotenv
|
22
|
-
Requires-Dist: datasets
|
20
|
+
Requires-Dist: gradio>=5.23.3; extra == "all"
|
21
|
+
Requires-Dist: python-dotenv>=1.0.1; extra == "all"
|
22
|
+
Requires-Dist: datasets>=3.6.0; extra == "all"
|
23
23
|
Description-Content-Type: text/markdown
|
24
24
|
|
25
25
|
<div align="center">
|
@@ -3,8 +3,7 @@
|
|
3
3
|
from abc import ABC, abstractmethod
|
4
4
|
from typing import Optional, Dict, Any, Tuple, List
|
5
5
|
from ..logger import Logger, LogLevel
|
6
|
-
from .models import MouseButton
|
7
|
-
|
6
|
+
from .models import MouseButton, CommandResult
|
8
7
|
|
9
8
|
class BaseComputerInterface(ABC):
|
10
9
|
"""Base class for computer control interfaces."""
|
@@ -209,8 +208,14 @@ class BaseComputerInterface(ABC):
|
|
209
208
|
pass
|
210
209
|
|
211
210
|
@abstractmethod
|
212
|
-
async def read_bytes(self, path: str) -> bytes:
|
213
|
-
"""Read file binary contents.
|
211
|
+
async def read_bytes(self, path: str, offset: int = 0, length: Optional[int] = None) -> bytes:
|
212
|
+
"""Read file binary contents with optional seeking support.
|
213
|
+
|
214
|
+
Args:
|
215
|
+
path: Path to the file
|
216
|
+
offset: Byte offset to start reading from (default: 0)
|
217
|
+
length: Number of bytes to read (default: None for entire file)
|
218
|
+
"""
|
214
219
|
pass
|
215
220
|
|
216
221
|
@abstractmethod
|
@@ -234,8 +239,36 @@ class BaseComputerInterface(ABC):
|
|
234
239
|
pass
|
235
240
|
|
236
241
|
@abstractmethod
|
237
|
-
async def
|
238
|
-
"""
|
242
|
+
async def get_file_size(self, path: str) -> int:
|
243
|
+
"""Get the size of a file in bytes."""
|
244
|
+
pass
|
245
|
+
|
246
|
+
@abstractmethod
|
247
|
+
async def run_command(self, command: str) -> CommandResult:
|
248
|
+
"""Run shell command and return structured result.
|
249
|
+
|
250
|
+
Executes a shell command using subprocess.run with shell=True and check=False.
|
251
|
+
The command is run in the target environment and captures both stdout and stderr.
|
252
|
+
|
253
|
+
Args:
|
254
|
+
command (str): The shell command to execute
|
255
|
+
|
256
|
+
Returns:
|
257
|
+
CommandResult: A structured result containing:
|
258
|
+
- stdout (str): Standard output from the command
|
259
|
+
- stderr (str): Standard error from the command
|
260
|
+
- returncode (int): Exit code from the command (0 indicates success)
|
261
|
+
|
262
|
+
Raises:
|
263
|
+
RuntimeError: If the command execution fails at the system level
|
264
|
+
|
265
|
+
Example:
|
266
|
+
result = await interface.run_command("ls -la")
|
267
|
+
if result.returncode == 0:
|
268
|
+
print(f"Output: {result.stdout}")
|
269
|
+
else:
|
270
|
+
print(f"Error: {result.stderr}, Exit code: {result.returncode}")
|
271
|
+
"""
|
239
272
|
pass
|
240
273
|
|
241
274
|
# Accessibility Actions
|