Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

Expose Computer SDK instance via public property in RemoteDesktopSession (#844)

Fizza Mukhtarf333a5788515
diff --git a/libs/cua-bench/cua_bench/computers/remote.py b/libs/cua-bench/cua_bench/computers/remote.py
index d7b492a469..5f6ce2fd0a 100644
--- a/libs/cua-bench/cua_bench/computers/remote.py
+++ b/libs/cua-bench/cua_bench/computers/remote.py
@@ -175,6 +175,13 @@ class RemoteDesktopSession:
# Track PIDs of windows launched via bench_ui (pywebview)
self._webview_pids: set[int] = set()
+ @property
+ def computer(self):
+ """Get the Computer SDK instance for advanced operations."""
+ if self._computer is None:
+ raise RuntimeError("Session not initialized. Call start() first.")
+ return self._computer
+
async def step(self, action: Action) -> None:
"""Execute an action (alias for execute_action, for env.step() compatibility)."""
await self.execute_action(action)