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-cli): make cloud providers an opt-in byoc feature (#4969)
injaneityfa8c81de38c5
diff --git a/.github/workflows/cd-bench-images.yml b/.github/workflows/cd-bench-images.ymlindex 49f4fbd074..ed7aea2481 100644--- a/.github/workflows/cd-bench-images.yml+++ b/.github/workflows/cd-bench-images.yml@@ -169,7 +169,7 @@ jobs:echo "ASSUME=$assume" >>"$GITHUB_ENV"- name: cua CLI and the SDK binding for the smokerun: |- (cd libs/cua && cargo build --release -p cua-sdk -p cua-cli)+ (cd libs/cua && cargo build --release -p cua-sdk -p cua-cli --features cua-cli/byoc)cp libs/cua/target/release/libcua_sdk.so libs/cua/python/src/cua/install -m 0755 libs/cua/target/release/cua "$RUNNER_TEMP/cua"# The later jobs (index, verify, promote) reuse these instead of@@ -234,7 +234,7 @@ jobs:if [ -f "$RUNNER_TEMP/bench-cli/cua" ]; theninstall -m 0755 "$RUNNER_TEMP/bench-cli/cua" "$RUNNER_TEMP/cua"else- (cd libs/cua && cargo build --release -p cua-cli) && install -m 0755 libs/cua/target/release/cua "$RUNNER_TEMP/cua"+ (cd libs/cua && cargo build --release -p cua-cli --features byoc) && install -m 0755 libs/cua/target/release/cua "$RUNNER_TEMP/cua"fi- name: cua images release (publish the indexes as immutable pins)run: |@@ -300,7 +300,7 @@ jobs:cp "$RUNNER_TEMP/bench-cli/libcua_sdk.so" libs/cua/python/src/cua/install -m 0755 "$RUNNER_TEMP/bench-cli/cua" "$RUNNER_TEMP/cua"else- (cd libs/cua && cargo build --release -p cua-sdk -p cua-cli)+ (cd libs/cua && cargo build --release -p cua-sdk -p cua-cli --features cua-cli/byoc)cp libs/cua/target/release/libcua_sdk.so libs/cua/python/src/cua/install -m 0755 libs/cua/target/release/cua "$RUNNER_TEMP/cua"rm -rf libs/cua/target@@ -364,7 +364,7 @@ jobs:if [ -f "$RUNNER_TEMP/bench-cli/cua" ]; theninstall -m 0755 "$RUNNER_TEMP/bench-cli/cua" "$RUNNER_TEMP/cua"else- (cd libs/cua && cargo build --release -p cua-cli) && install -m 0755 libs/cua/target/release/cua "$RUNNER_TEMP/cua"+ (cd libs/cua && cargo build --release -p cua-cli --features byoc) && install -m 0755 libs/cua/target/release/cua "$RUNNER_TEMP/cua"fi- name: cua images release (promote <ver> and <ver>-disk; doctor evidence required)run: |diff --git a/.github/workflows/cd-cua-sdk.yml b/.github/workflows/cd-cua-sdk.ymlindex 2613aa54b1..3a6ad41845 100644--- a/.github/workflows/cd-cua-sdk.yml+++ b/.github/workflows/cd-cua-sdk.yml@@ -181,7 +181,7 @@ jobs:# Windows native packages must load without the VC++ redistributable.RUSTFLAGS: ${{ contains(matrix.target, 'windows') && '-C target-feature=+crt-static' || '' }}run: |- cargo build --locked --release -p cua-sdk -p cua-cli --target ${{ matrix.target }}+ cargo build --locked --release -p cua-sdk -p cua-cli --features cua-cli/byoc --target ${{ matrix.target }}npm --prefix typescript ci --ignore-scriptsnode scripts/build-node-runtime.mjs --target ${{ matrix.target }} \--output "native/${{ matrix.label }}/cua_node_runtime.node"diff --git a/.github/workflows/cd-image-linux.yml b/.github/workflows/cd-image-linux.ymlindex b1b195bae3..3ffd246896 100644--- a/.github/workflows/cd-image-linux.yml+++ b/.github/workflows/cd-image-linux.yml@@ -248,7 +248,7 @@ jobs:key: cli-${{ matrix.arch }}- name: Build the cua CLIworking-directory: libs/cua- run: cargo build --release --locked -p cua-cli+ run: cargo build --release --locked -p cua-cli --features byoc- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4with:name: cua-cli-linux-${{ matrix.arch }}@@ -586,7 +586,7 @@ jobs:if gh run download "$RUN" -R "$GITHUB_REPOSITORY" -n cua-cli-linux-amd64 -D "$RUNNER_TEMP/cli" 2>/dev/null; theninstall -m 0755 "$RUNNER_TEMP/cli/cua" "$RUNNER_TEMP/cua"else- (cd libs/cua && cargo build --release --locked -p cua-cli) && install -m 0755 libs/cua/target/release/cua "$RUNNER_TEMP/cua"+ (cd libs/cua && cargo build --release --locked -p cua-cli --features byoc) && install -m 0755 libs/cua/target/release/cua "$RUNNER_TEMP/cua"fi- uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3with:diff --git a/.github/workflows/cd-image-macos.yml b/.github/workflows/cd-image-macos.ymlindex d0f6c80425..abdbcbd66c 100644--- a/.github/workflows/cd-image-macos.yml+++ b/.github/workflows/cd-image-macos.yml@@ -144,7 +144,7 @@ jobs:- name: Build the cua CLIworking-directory: libs/cuarun: |- cargo build --locked --release -p cua-cli --bin cua+ cargo build --locked --release -p cua-cli --features byoc --bin cuaecho "CUA=$CARGO_TARGET_DIR/release/cua" >>"$GITHUB_ENV"- name: Build and gate the tiers (cua images release)run: |diff --git a/.github/workflows/cd-image-omarchy.yml b/.github/workflows/cd-image-omarchy.ymlindex 0dde4d257b..2c4c6dcfe7 100644--- a/.github/workflows/cd-image-omarchy.yml+++ b/.github/workflows/cd-image-omarchy.yml@@ -158,7 +158,7 @@ jobs:workspaces: libs/cua- name: Build the cua CLIworking-directory: libs/cua- run: cargo build --release --locked -p cua-cli+ run: cargo build --release --locked -p cua-cli --features byoc- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4with:name: cua-cli-linux-amd64diff --git a/.github/workflows/cd-image-windows.yml b/.github/workflows/cd-image-windows.ymlindex f107efa6b0..2bbee71cda 100644--- a/.github/workflows/cd-image-windows.yml+++ b/.github/workflows/cd-image-windows.yml@@ -148,7 +148,7 @@ jobs:key: cli-amd64- name: Build the cua CLIworking-directory: libs/cua- run: cargo build --release --locked -p cua-cli+ run: cargo build --release --locked -p cua-cli --features byoc- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4with:name: cua-cli-linux-amd64diff --git a/.github/workflows/ci-cua-contrib.yml b/.github/workflows/ci-cua-contrib.ymlindex a1620fb669..9ca89e7b0a 100644--- a/.github/workflows/ci-cua-contrib.yml+++ b/.github/workflows/ci-cua-contrib.yml@@ -76,7 +76,11 @@ jobs:cargo test --locked -p cua-contrib --features testing,all&& cargo test --locked -p cua-sandbox-core --test contrib -- --test-threads=4- name: The CLI builds with and without contrib- run: cargo check --locked -p cua-cli && cargo check --locked -p cua-cli --features contrib+ run: |+ if cargo tree --locked -p cua-cli -e normal -i aws-sdk-ec2; then exit 1; fi+ cargo check --locked -p cua-cli+ cargo check --locked -p cua-cli --features contrib+ cargo check --locked -p cua-cli --features byocmodal-helper:name: cua-modal-helper (Modal's Go SDK)diff --git a/.github/workflows/image-doctor.yml b/.github/workflows/image-doctor.ymlindex ed3aac4a43..79cd724a8c 100644--- a/.github/workflows/image-doctor.yml+++ b/.github/workflows/image-doctor.yml@@ -362,7 +362,7 @@ jobs:workspaces: libs/cua- name: Build the cua CLIworking-directory: libs/cua- run: cargo build --release --locked -p cua-cli+ run: cargo build --release --locked -p cua-cli --features byoc- name: Fetch the rootfs artifactif: inputs.rootfs_artifact != ''uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4@@ -428,7 +428,7 @@ jobs:if crane manifest "${{ inputs.windows_ref }}" | jq -e '.annotations["ai.cua.spacesd"] == "true"' >/dev/null; thenecho "the image runs cua-spacesd; no shim needed"; exit 0fi- cargo build --release --locked -p cua-cli+ cargo build --release --locked -p cua-cli --features byoc- name: Boot the Windows disk and run the doctorrun: |cua=(); [ -x libs/cua/target/release/cua ] && cua=(--cua libs/cua/target/release/cua)@@ -452,7 +452,7 @@ jobs:- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4- name: Build the cua CLIworking-directory: libs/cua- run: cargo build --release --locked -p cua-cli+ run: cargo build --release --locked -p cua-cli --features byoc- name: Clone, boot and doctor the macOS image under Lumerun: |scripts/images/image-doctor-lume.sh --image "${{ inputs.macos_ref }}" \diff --git a/libs/cua/crates/cua-cli/Cargo.toml b/libs/cua/crates/cua-cli/Cargo.tomlindex ea1112fcc4..0f1bd2948c 100644--- a/libs/cua/crates/cua-cli/Cargo.toml+++ b/libs/cua/crates/cua-cli/Cargo.toml@@ -18,6 +18,7 @@ path = "src/main.rs"[features]default = []+byoc = ["cua-sdk/byoc", "cua-daemon/byoc"]# Contrib sandbox providers (`--on e2b`, `--on daytona`, `--on modal`),# off by default: `contrib` for every one, `contrib-<name>` for one.contrib = ["cua-sdk/contrib", "cua-daemon/contrib"]@@ -27,11 +28,11 @@ contrib-modal = ["cua-sdk/contrib-modal", "cua-daemon/contrib-modal"][dependencies]cua-home.workspace = true-cua-sdk = { workspace = true, features = ["local", "spaces", "media", "byoc"] }+cua-sdk = { workspace = true, features = ["local", "spaces", "media"] }# `cua auth provider ...`: the contrib catalog and credential store (no# provider is compiled in unless a `contrib` feature is on).cua-contrib.workspace = true-cua-daemon = { workspace = true, features = ["server", "client", "byoc"] }+cua-daemon = { workspace = true, features = ["server", "client"] }cua-spacesd-client.workspace = true# `cua doctor`: resolve the image under test (registry facts).cua-image.workspace = true