Skip to content

The agent that grows with you

Merge branch 'simp/r2-tools-b' (tools wave 2 net-deletion: approval/delegate/skills_hub/terminal/computer_use) into simp/integration3

Teknium75934b89c872
diff --cc tools/computer_use/cua_backend_daemon.py
index e3792711134,52b69f6b7db..c1f0a545d77
--- a/tools/computer_use/cua_backend_daemon.py
+++ b/tools/computer_use/cua_backend_daemon.py
@@@ -49,8 -48,7 +48,7 @@@ def _validate_cua_driver_app_signature(
if not codesign:
raise RuntimeError("codesign is required to verify CuaDriver.app before launching it.")
try:
- proc = subprocess.run([codesign, "-dv", app_path], capture_output=True, text=True, encoding="utf-8",
- errors="replace", timeout=15, stdin=subprocess.DEVNULL)
- proc = _cb()._run_quiet([codesign, "-dv", app_path], timeout=15, stdin=None)
++ proc = _cb()._run_quiet([codesign, "-dv", app_path], timeout=15)
except (OSError, subprocess.TimeoutExpired) as exc:
raise RuntimeError(f"could not verify CuaDriver.app signature: {exc}") from exc
if proc.returncode != 0:
diff --cc tools/computer_use/doctor.py
index 514b520d947,c7db1631186..49cacef4686
--- a/tools/computer_use/doctor.py
+++ b/tools/computer_use/doctor.py
@@@ -38,13 -33,17 +33,17 @@@ _Row = Tuple[str, str, Report] # (stat
class HealthReportUnavailable(RuntimeError):
"""health_report denied or non-schema payload — ``run_doctor`` falls back to probes."""
-
- # ── CLI probes ───────────────────────────────────────────────────────────────
-
def _run_cli(binary: str, *args: str, timeout: float) -> subprocess.CompletedProcess:
"""Run ``<binary> args`` with UTF-8 capture + sanitized env (raises on failure)."""
- return subprocess.run([binary, *args], capture_output=True, text=True, encoding="utf-8",
- errors="replace", timeout=timeout, env=_sanitized_cua_env(), stdin=subprocess.DEVNULL)
+ return subprocess.run([binary, *args], capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=timeout,
- env=_sanitized_cua_env())
++ env=_sanitized_cua_env(), stdin=subprocess.DEVNULL)
+
+ def _cli_text(binary: str, *args: str, timeout: float, exc_types: Tuple[type, ...] = _IO_EXC) -> Union[subprocess.CompletedProcess, BaseException]:
+ """``_run_cli`` that returns (not raises) any exception in *exc_types*."""
+ try:
+ return _run_cli(binary, *args, timeout=timeout)
+ except exc_types as e:
+ return e
def _combined_output(completed: subprocess.CompletedProcess) -> str:
return ((completed.stdout or "") + (completed.stderr or "")).strip()