cua-driver 0.7.1__py3-none-win_amd64.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.
- cua_driver/__init__.py +11 -0
- cua_driver/__main__.py +20 -0
- cua_driver/bin/cua-driver-uia.exe +0 -0
- cua_driver/bin/cua-driver.exe +0 -0
- cua_driver/wrapper.py +71 -0
- cua_driver-0.7.1.dist-info/METADATA +81 -0
- cua_driver-0.7.1.dist-info/RECORD +9 -0
- cua_driver-0.7.1.dist-info/WHEEL +4 -0
- cua_driver-0.7.1.dist-info/entry_points.txt +2 -0
cua_driver/__init__.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"""Python wrapper for cua-driver - cross-platform MCP server.
|
|
2
|
+
|
|
3
|
+
This package provides a thin Python wrapper around the cua-driver Rust binary,
|
|
4
|
+
enabling pip-installable access to the MCP server for computer-use automation.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
__version__ = "0.7.1"
|
|
8
|
+
|
|
9
|
+
from .wrapper import run_cua_driver, get_binary_path
|
|
10
|
+
|
|
11
|
+
__all__ = ["run_cua_driver", "get_binary_path", "__version__"]
|
cua_driver/__main__.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"""CLI entry point for cua-driver Python wrapper.
|
|
2
|
+
|
|
3
|
+
This module is invoked when running:
|
|
4
|
+
python -m cua_driver [args...]
|
|
5
|
+
or via the installed script:
|
|
6
|
+
cua-driver [args...]
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import sys
|
|
10
|
+
from .wrapper import run_cua_driver
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def main() -> None:
|
|
14
|
+
"""Main entry point for the cua-driver CLI."""
|
|
15
|
+
exit_code = run_cua_driver()
|
|
16
|
+
sys.exit(exit_code)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
if __name__ == "__main__":
|
|
20
|
+
main()
|
|
Binary file
|
|
Binary file
|
cua_driver/wrapper.py
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"""Subprocess wrapper for cua-driver binary with stdio passthrough."""
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import sys
|
|
5
|
+
import subprocess
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
from typing import Optional
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def get_binary_path() -> Path:
|
|
11
|
+
"""Get the path to the bundled cua-driver binary.
|
|
12
|
+
|
|
13
|
+
Returns:
|
|
14
|
+
Path to the cua-driver executable.
|
|
15
|
+
|
|
16
|
+
Raises:
|
|
17
|
+
FileNotFoundError: If the binary is not found in the package.
|
|
18
|
+
"""
|
|
19
|
+
# Binary is bundled in the package at: cua_driver/bin/cua-driver[.exe]
|
|
20
|
+
package_dir = Path(__file__).parent
|
|
21
|
+
|
|
22
|
+
if sys.platform == "win32":
|
|
23
|
+
binary_name = "cua-driver.exe"
|
|
24
|
+
else:
|
|
25
|
+
binary_name = "cua-driver"
|
|
26
|
+
|
|
27
|
+
binary_path = package_dir / "bin" / binary_name
|
|
28
|
+
|
|
29
|
+
if not binary_path.exists():
|
|
30
|
+
raise FileNotFoundError(
|
|
31
|
+
f"cua-driver binary not found at {binary_path}. "
|
|
32
|
+
f"This package may not have been built correctly for {sys.platform}."
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
# Ensure binary is executable on Unix
|
|
36
|
+
if sys.platform != "win32":
|
|
37
|
+
os.chmod(binary_path, 0o755)
|
|
38
|
+
|
|
39
|
+
return binary_path
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def run_cua_driver(args: Optional[list[str]] = None) -> int:
|
|
43
|
+
"""Execute cua-driver binary with stdio passthrough.
|
|
44
|
+
|
|
45
|
+
Args:
|
|
46
|
+
args: Command-line arguments to pass to cua-driver.
|
|
47
|
+
If None, uses sys.argv[1:].
|
|
48
|
+
|
|
49
|
+
Returns:
|
|
50
|
+
Exit code from the cua-driver process.
|
|
51
|
+
"""
|
|
52
|
+
if args is None:
|
|
53
|
+
args = sys.argv[1:]
|
|
54
|
+
|
|
55
|
+
binary_path = get_binary_path()
|
|
56
|
+
|
|
57
|
+
try:
|
|
58
|
+
# Run with direct stdio inheritance - no buffering, no capturing
|
|
59
|
+
result = subprocess.run(
|
|
60
|
+
[str(binary_path), *args],
|
|
61
|
+
stdin=sys.stdin,
|
|
62
|
+
stdout=sys.stdout,
|
|
63
|
+
stderr=sys.stderr,
|
|
64
|
+
)
|
|
65
|
+
return result.returncode
|
|
66
|
+
except KeyboardInterrupt:
|
|
67
|
+
# Standard SIGINT exit code
|
|
68
|
+
return 130
|
|
69
|
+
except Exception as e:
|
|
70
|
+
print(f"Error executing cua-driver: {e}", file=sys.stderr)
|
|
71
|
+
return 1
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cua-driver
|
|
3
|
+
Version: 0.7.1
|
|
4
|
+
Summary: Python wrapper for cua-driver - cross-platform MCP server for computer-use automation
|
|
5
|
+
Project-URL: Homepage, https://github.com/trycua/cua
|
|
6
|
+
Project-URL: Documentation, https://github.com/trycua/cua/tree/main/libs/cua-driver
|
|
7
|
+
Project-URL: Repository, https://github.com/trycua/cua
|
|
8
|
+
Project-URL: Issues, https://github.com/trycua/cua/issues
|
|
9
|
+
Author-email: TryCua <hello@trycua.com>
|
|
10
|
+
License: MIT
|
|
11
|
+
Keywords: accessibility,automation,computer-use,mcp,screen-capture
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Operating System :: MacOS
|
|
16
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
17
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Provides-Extra: test
|
|
26
|
+
Requires-Dist: pytest; extra == 'test'
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
|
|
29
|
+
# cua-driver
|
|
30
|
+
|
|
31
|
+
Python wrapper for [cua-driver](https://github.com/trycua/cua/tree/main/libs/cua-driver) - a cross-platform MCP (Model Context Protocol) server for computer-use automation.
|
|
32
|
+
|
|
33
|
+
## Installation
|
|
34
|
+
|
|
35
|
+
Install and usage docs live at https://cua.ai/docs/how-to-guides/driver/install
|
|
36
|
+
and https://cua.ai/docs/reference/cua-driver/mcp-tools.
|
|
37
|
+
|
|
38
|
+
## Usage
|
|
39
|
+
|
|
40
|
+
The package provides a `cua-driver` command that wraps the native Rust binary.
|
|
41
|
+
See the canonical tool reference at https://cua.ai/docs/reference/cua-driver/mcp-tools.
|
|
42
|
+
|
|
43
|
+
## Python API
|
|
44
|
+
|
|
45
|
+
You can also use the Python API directly:
|
|
46
|
+
|
|
47
|
+
```python
|
|
48
|
+
from cua_driver import run_cua_driver, get_binary_path
|
|
49
|
+
|
|
50
|
+
# Run with custom args
|
|
51
|
+
exit_code = run_cua_driver(["mcp"])
|
|
52
|
+
|
|
53
|
+
# Get path to bundled binary
|
|
54
|
+
binary_path = get_binary_path()
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Features
|
|
58
|
+
|
|
59
|
+
- **Cross-platform**: Works on macOS (universal), Linux (x86_64), and Windows (x86_64/ARM64)
|
|
60
|
+
- **Zero dependencies**: Pure Python wrapper with no external dependencies
|
|
61
|
+
- **Stdio passthrough**: Transparent piping for MCP protocol communication
|
|
62
|
+
- **Bundled binary**: No separate installation required - the Rust binary is included in the wheel
|
|
63
|
+
|
|
64
|
+
## Platform Support
|
|
65
|
+
|
|
66
|
+
| Platform | Architecture | Status |
|
|
67
|
+
|----------|-------------|---------|
|
|
68
|
+
| macOS | Universal (ARM64 + x86_64) | ✅ Supported |
|
|
69
|
+
| Linux | x86_64 | ✅ Supported |
|
|
70
|
+
| Windows | x86_64 | ✅ Supported |
|
|
71
|
+
| Windows | ARM64 | ✅ Supported |
|
|
72
|
+
|
|
73
|
+
## License
|
|
74
|
+
|
|
75
|
+
MIT License - see [LICENSE](https://github.com/trycua/cua/blob/main/LICENSE.md)
|
|
76
|
+
|
|
77
|
+
## Links
|
|
78
|
+
|
|
79
|
+
- [GitHub Repository](https://github.com/trycua/cua)
|
|
80
|
+
- [Documentation](https://cua.ai/docs)
|
|
81
|
+
- [Issue Tracker](https://github.com/trycua/cua/issues)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
cua_driver/__init__.py,sha256=BnME7jzfKCvZv2NwucKHXJJQraMxw3NeuXEhfhXIFQw,366
|
|
2
|
+
cua_driver/__main__.py,sha256=OfPyccifehP2Kwc4K5JVl6hUz9pSOYuIbDHZQHv2F4E,419
|
|
3
|
+
cua_driver/wrapper.py,sha256=qj2gjkP1a_pnvMPly5zOGxYGLf248WYnMt_GFdYtad8,1985
|
|
4
|
+
cua_driver/bin/cua-driver-uia.exe,sha256=xuZ0jwX6dOaKu-pTuOjv8fqYGrcIUQT3Rt-yeha6pc0,7640576
|
|
5
|
+
cua_driver/bin/cua-driver.exe,sha256=buVWWjZpLuT0QTu9czbDkNKMfL31wux0KAJKLnGaVPc,11498496
|
|
6
|
+
cua_driver-0.7.1.dist-info/METADATA,sha256=9FOm4Jvidq-TvskfKvNOaj3xrQld1uJ_QJzxfRVTgR4,2889
|
|
7
|
+
cua_driver-0.7.1.dist-info/WHEEL,sha256=THPaOYRwJrp5fq_kO4FXfug4mAwzOMPTtR1n4yCKCdg,94
|
|
8
|
+
cua_driver-0.7.1.dist-info/entry_points.txt,sha256=4isuiuj2kkshAu09Tuf1Pg-ZEyKNk8vfNCsfUYxm1CE,56
|
|
9
|
+
cua_driver-0.7.1.dist-info/RECORD,,
|