Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
Rust agentai-agentapplecomputer-usecomputer-use-agentcontainerizationcuadesktop-automationhacktoberfestlumemacosmanusoperatorswiftvirtualizationvirtualization-frameworkwindowswindows-sandbox
fix(cua-driver): make Agent View opt-in by default
Francesco Bonacci8d942610dc6c
diff --git a/libs/cua-driver/docs/agent-view.md b/libs/cua-driver/docs/agent-view.mdindex 8aadd34382..e5f1144d10 100644--- a/libs/cua-driver/docs/agent-view.md+++ b/libs/cua-driver/docs/agent-view.md@@ -2,17 +2,18 @@Agent View is an optional, always-on-top miniature desktop that shows the exactapplication windows and browser tabs traversed by one Cua Driver agent session.-It is enabled by default on supported interactive desktops. Disable it for one-daemon invocation with:+It is disabled by default. Enable it for one daemon invocation with:```console-cua-driver --no-agent-view+cua-driver --agent-view```-`--agent-view` remains accepted as an explicit enable for compatibility. The-durable config equivalent is `{"agent_view": false}` in+The durable config equivalent is `{"agent_view": true}` in`~/.cua-driver/config.json`.+`--no-agent-view` remains available to override a persisted enable for one+daemon invocation.+Use `--agent-view-geometry WxH[+X+Y]` to override its initial size and optionaltop-left position. The default is `640x420` near the top-right of the maindisplay. The view is resizable on macOS, Windows, and Linux X11/XWayland.diff --git a/libs/cua-driver/rust/crates/cua-driver/src/cli.rs b/libs/cua-driver/rust/crates/cua-driver/src/cli.rsindex 125e1aacb3..3ebccb4efb 100644--- a/libs/cua-driver/rust/crates/cua-driver/src/cli.rs+++ b/libs/cua-driver/rust/crates/cua-driver/src/cli.rs@@ -641,7 +641,7 @@ pub fn parse_command() -> Command {);println!(" cua-driver history enable Opt in and initialize encrypted local history.");println!(" cua-driver history status|pause|resume|flush|list|show|disable|delete");- println!(" --agent-view Show the Agent View (enabled by default).");+ println!(" --agent-view Enable the optional Agent View.");println!(" Exact native windows and");println!(" Chrome tabs traversed through Cua Driver become cards."@@ -662,7 +662,7 @@ pub fn parse_command() -> Command {" Native presentation is available on macOS, Windows,");println!(" and Linux (X11/XWayland).");- println!(" --no-agent-view Disable Agent View for this daemon invocation.");+ println!(" --no-agent-view Disable Agent View, including a persisted enable.");println!(" --agent-view-geometry WxH[+X+Y] Override window size (and optional top-left");println!(" origin). Defaults to 640x420 in the top-right");println!(" corner of the main display.");diff --git a/libs/cua-driver/rust/crates/pip-preview/src/lib.rs b/libs/cua-driver/rust/crates/pip-preview/src/lib.rsindex afd4ad38b6..22f453f4a8 100644--- a/libs/cua-driver/rust/crates/pip-preview/src/lib.rs+++ b/libs/cua-driver/rust/crates/pip-preview/src/lib.rs@@ -21,7 +21,7 @@ pub use desktop_layout::{};pub use session_tabs::{layout_session_tabs, session_accent, SessionTab, SessionTabsLayout};-pub const AGENT_VIEW_DEFAULT_ENABLED: bool = true;+pub const AGENT_VIEW_DEFAULT_ENABLED: bool = false;/// Canonical `~/.cua-driver/config.json` path matching what the per-platform/// `set_config` tools write to. Resolves `$HOME` first (Unix/macOS) and falls@@ -1104,10 +1104,10 @@ mod tests {}#[test]- fn explicit_no_agent_view_overrides_the_default() {- let cfg = PipConfig::parse(&["--no-agent-view".to_owned()]);+ fn agent_view_is_disabled_by_default() {+ let cfg = PipConfig::parse(&[]);assert!(!cfg.enabled);- assert!(PipConfig::default().enabled);+ assert!(!PipConfig::default().enabled);}#[test]@@ -1118,7 +1118,7 @@ mod tests {"640x420".to_owned(),"--pip".to_owned(),]);- assert!(cfg.enabled);+ assert!(!cfg.enabled);assert_eq!(cfg.geometry.width, PipGeometry::default().width);assert_eq!(cfg.geometry.height, PipGeometry::default().height);}@@ -1167,6 +1167,20 @@ mod tests {let _ = std::fs::remove_file(path);}+ #[test]+ fn agent_view_cli_overrides_disabled_config_file() {+ let path = std::env::temp_dir().join(format!(+ "cua-agent-view-config-{}-cli-enable.json",+ std::process::id()+ ));+ std::fs::write(&path, r#"{"agent_view":false}"#).unwrap();++ let cfg = PipConfig::from_file_and_args(&path, &["--agent-view".to_owned()]);+ assert!(cfg.enabled);++ let _ = std::fs::remove_file(path);+ }+#[test]fn cli_flags_override_config_file_values() {let path = std::env::temp_dir().join(format!(@@ -1209,7 +1223,7 @@ mod tests {.unwrap();let cfg = PipConfig::from_args_and_file(&path);- assert!(cfg.enabled);+ assert!(!cfg.enabled);assert_eq!(cfg.geometry.width, PipGeometry::default().width);assert_eq!(cfg.geometry.height, PipGeometry::default().height);