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
ci: drop the cua-fleet release workflow, the gateway conformance tests and the Terraform smoke lane (CUA-1836) (#5490)
Francesco Bonaccidfe1323553de
diff --git a/.github/scripts/tests/test_cua_fleet_release_wiring.py b/.github/scripts/tests/test_cua_fleet_release_wiring.pydeleted file mode 100644index ecea1b635d..0000000000--- a/.github/scripts/tests/test_cua_fleet_release_wiring.py+++ /dev/null@@ -1,30 +0,0 @@-"""Regression tests for the canonical cua-fleet PyPI release workflow."""--from pathlib import Path-import unittest--REPO_ROOT = Path(__file__).resolve().parents[3]---class TestCuaFleetReleaseWiring(unittest.TestCase):- """Keep Fleet's promotion workflow aligned with canonical SDK wheels."""-- def test_publisher_promotes_cua_fleet_0_1_17(self) -> None:- workflow = (REPO_ROOT / ".github/workflows/cd-py-fleet.yml").read_text()- expected_sources = {- "cua_fleet-0.1.17-py3-none-manylinux_2_34_x86_64.whl": "4cdbc89e850d841481713abf1e8bf9719b2e33b3c31f26bbea5f63e1ead3c6c0",- "cua_fleet-0.1.17-py3-none-manylinux_2_34_aarch64.whl": "bda49298c77c65eb349e8420f9237f6b7fb2fd25203747df98a9513b98fd5d73",- "cua_fleet-0.1.17-py3-none-macosx_10_12_x86_64.whl": "a8908b5c7f0f3c75d09b908b58867d43270f69d3726bb0d90316443f2265d0e3",- "cua_fleet-0.1.17-py3-none-macosx_11_0_arm64.whl": "6aea577f21343326aeb06df03c07df65df8dd2f3b0097e02f25a7bc6b9d2c458",- "cua_fleet-0.1.17-py3-none-win_amd64.whl": "ee4c139b1c0cebe1702114a34fd0fd60d216c5862d9fdc3472bb8b9879ac9eae",- }-- self.assertIn("https://wheels.cua.ai/simple/cua-fleet/$WHEEL", workflow)- self.assertNotIn("repackage_cua_train_wheel.py", workflow)- self.assertNotIn("unsupported-windows", workflow)- for wheel, digest in expected_sources.items():- self.assertIn(f"wheel: {wheel}\n sha256: {digest}", workflow)---if __name__ == "__main__":- unittest.main()diff --git a/.github/workflows/cd-py-fleet.yml b/.github/workflows/cd-py-fleet.ymldeleted file mode 100644index 41c7e6ee8b..0000000000--- a/.github/workflows/cd-py-fleet.yml+++ /dev/null@@ -1,335 +0,0 @@-name: "CD: cua-fleet (PyPI)"--on:- push:- tags:- - "fleet-v*"- workflow_dispatch:- inputs:- version:- description: "Canonical cua-fleet version to publish"- required: true- default: "0.1.17"- workflow_call:- inputs:- version:- description: "Canonical cua-fleet version to publish"- required: true- type: string- secrets:- PYPI_TOKEN:- required: true--permissions:- contents: write--jobs:- prepare:- runs-on: ubuntu-latest- outputs:- version: ${{ steps.get-version.outputs.version }}- steps:- - name: Determine and validate canonical version- id: get-version- env:- EVENT_NAME: ${{ github.event_name }}- INPUT_VERSION: ${{ inputs.version }}- DISPATCH_VERSION: ${{ github.event.inputs.version }}- GITHUB_REF: ${{ github.ref }}- run: |- set -euo pipefail- if [[ -n "$INPUT_VERSION" ]]; then- VERSION="$INPUT_VERSION"- elif [[ "$EVENT_NAME" == "push" && "$GITHUB_REF" =~ ^refs/tags/fleet-v([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then- VERSION="${BASH_REMATCH[1]}"- elif [[ -n "$DISPATCH_VERSION" ]]; then- VERSION="$DISPATCH_VERSION"- else- echo "::error::No cua-fleet version was provided."- exit 1- fi-- if [[ "$VERSION" != "0.1.17" ]]; then- echo "::error::This workflow promotes the hash-pinned cua-fleet 0.1.17 wheel set, not $VERSION."- exit 1- fi- echo "version=$VERSION" >> "$GITHUB_OUTPUT"-- promote:- needs: prepare- name: Promote ${{ matrix.platform }} wheel- runs-on: ${{ matrix.runner }}- strategy:- fail-fast: false- matrix:- include:- - platform: linux-x86_64- runner: ubuntu-22.04- wheel: cua_fleet-0.1.17-py3-none-manylinux_2_34_x86_64.whl- sha256: 4cdbc89e850d841481713abf1e8bf9719b2e33b3c31f26bbea5f63e1ead3c6c0- native_library: libcyclops_sdk.so- audit: auditwheel- - platform: linux-aarch64- runner: ubuntu-24.04-arm- wheel: cua_fleet-0.1.17-py3-none-manylinux_2_34_aarch64.whl- sha256: bda49298c77c65eb349e8420f9237f6b7fb2fd25203747df98a9513b98fd5d73- native_library: libcyclops_sdk.so- audit: auditwheel- - platform: macos-x86_64- runner: macos-15-intel- wheel: cua_fleet-0.1.17-py3-none-macosx_10_12_x86_64.whl- sha256: a8908b5c7f0f3c75d09b908b58867d43270f69d3726bb0d90316443f2265d0e3- native_library: libcyclops_sdk.dylib- audit: delocate- - platform: macos-arm64- runner: macos-14- wheel: cua_fleet-0.1.17-py3-none-macosx_11_0_arm64.whl- sha256: 6aea577f21343326aeb06df03c07df65df8dd2f3b0097e02f25a7bc6b9d2c458- native_library: libcyclops_sdk.dylib- audit: delocate- - platform: windows-x86_64- runner: windows-latest- wheel: cua_fleet-0.1.17-py3-none-win_amd64.whl- sha256: ee4c139b1c0cebe1702114a34fd0fd60d216c5862d9fdc3472bb8b9879ac9eae- native_library: cyclops_sdk.dll- audit: none- steps:- - uses: actions/checkout@v4-- - uses: actions/setup-python@v5- with:- python-version: "3.11"-- - name: Download and verify canonical native wheel- shell: bash- env:- WHEEL: ${{ matrix.wheel }}- SHA256: ${{ matrix.sha256 }}- run: |- set -euo pipefail- mkdir -p dist- curl --fail --location --retry 3 \- --output "dist/$WHEEL" \- "https://wheels.cua.ai/simple/cua-fleet/$WHEEL"- python - "$SHA256" "dist/$WHEEL" <<'PY'- import hashlib- from pathlib import Path- import sys-- expected, wheel_path = sys.argv[1:]- actual = hashlib.sha256(Path(wheel_path).read_bytes()).hexdigest()- if actual != expected:- raise SystemExit(f"SHA-256 mismatch for {wheel_path}: expected {expected}, got {actual}")- PY-- - name: Audit native dependencies without modifying the wheel- if: matrix.audit != 'none'- shell: bash- env:- AUDIT: ${{ matrix.audit }}- WHEEL: ${{ matrix.wheel }}- run: |- set -euo pipefail- if [[ "$AUDIT" == "auditwheel" ]]; then- python -m pip install --upgrade auditwheel- auditwheel show "dist/$WHEEL"- else- python -m pip install --upgrade delocate- delocate-listdeps "dist/$WHEEL"- fi-- - name: Install promoted wheel and load native bindings- shell: bash- env:- WHEEL: ${{ matrix.wheel }}- NATIVE_LIBRARY: ${{ matrix.native_library }}- run: |- set -euo pipefail- python -m pip install --no-index --no-deps --target wheel-smoke "dist/$WHEEL"- PYTHONPATH=wheel-smoke python - "$NATIVE_LIBRARY" <<'PY'- import ctypes- import os- from pathlib import Path- import sys-- import fleet_sdk- from fleet_sdk import (- CreateClaimRequest,- CreatePoolRequest,- CyclopsClient,- CyclopsConfiguration,- CyclopsCredentials,- Firmware,- HttpHeader,- HttpRequest,- OsGymSandboxTemplateSpec,- OsGymSandboxWarmPoolSpec,- RuntimeKind,- SandboxService,- )-- package = Path(fleet_sdk.__file__).resolve().parent- dll_directory = None- if os.name == "nt":- dll_directory = os.add_dll_directory(str(package))- native = package / sys.argv[1]- assert native.is_file(), native- ctypes.CDLL(str(native))- assert all((- CreateClaimRequest,- CreatePoolRequest,- CyclopsClient,- CyclopsConfiguration,- CyclopsCredentials,- Firmware,- HttpHeader,- HttpRequest,- OsGymSandboxTemplateSpec,- OsGymSandboxWarmPoolSpec,- RuntimeKind,- SandboxService,- ))- PY-- - name: Exercise example startup boundary without credentials- shell: bash- run: |- set -euo pipefail- PYTHONPATH=wheel-smoke python - <<'PY'- import os- from pathlib import Path- import subprocess- import sys-- environment = os.environ.copy()- environment.pop("CUA_CLIENT_ID", None)- environment.pop("CUA_CLIENT_SECRET", None)- result = subprocess.run(- [sys.executable, "libs/fleet/sdk-bindings/examples/python/live_app_controlled.py"],- env=environment,- capture_output=True,- text=True,- )- assert result.returncode != 0, result.stdout- assert "KeyError: 'CUA_CLIENT_ID'" in result.stderr, result.stderr- native_errors = ("ModuleNotFoundError", "cannot open shared object", "Library not loaded")- assert not any(error in result.stderr for error in native_errors), result.stderr- PY-- - uses: actions/upload-artifact@v4- with:- name: cua-fleet-${{ matrix.platform }}- path: dist/*.whl- if-no-files-found: error-- validate:- needs: [prepare, promote]- runs-on: ubuntu-latest- steps:- - uses: actions/setup-python@v5- with:- python-version: "3.11"- - uses: actions/download-artifact@v4- with:- path: dist- merge-multiple: true- - name: Verify five promoted wheels and packaging metadata- run: |- set -euo pipefail- python -m pip install --upgrade twine- python -m twine check dist/*.whl- python - "${{ needs.prepare.outputs.version }}" dist <<'PY'- import hashlib- from pathlib import Path- import sys- from zipfile import ZipFile-- version, dist_directory = sys.argv[1:]- expected = {- f"cua_fleet-{version}-py3-none-manylinux_2_34_x86_64.whl": "4cdbc89e850d841481713abf1e8bf9719b2e33b3c31f26bbea5f63e1ead3c6c0",- f"cua_fleet-{version}-py3-none-manylinux_2_34_aarch64.whl": "bda49298c77c65eb349e8420f9237f6b7fb2fd25203747df98a9513b98fd5d73",- f"cua_fleet-{version}-py3-none-macosx_10_12_x86_64.whl": "a8908b5c7f0f3c75d09b908b58867d43270f69d3726bb0d90316443f2265d0e3",- f"cua_fleet-{version}-py3-none-macosx_11_0_arm64.whl": "6aea577f21343326aeb06df03c07df65df8dd2f3b0097e02f25a7bc6b9d2c458",- f"cua_fleet-{version}-py3-none-win_amd64.whl": "ee4c139b1c0cebe1702114a34fd0fd60d216c5862d9fdc3472bb8b9879ac9eae",- }- wheels = {wheel.name: wheel for wheel in Path(dist_directory).glob("*.whl")}- assert set(wheels) == set(expected), (set(wheels), set(expected))- for name, digest in expected.items():- wheel = wheels[name]- assert hashlib.sha256(wheel.read_bytes()).hexdigest() == digest, name- with ZipFile(wheel) as archive:- metadata_name = next(- candidate for candidate in archive.namelist() if candidate.endswith(".dist-info/METADATA")- )- metadata = archive.read(metadata_name).decode()- assert "Name: cua-fleet\n" in metadata, name- assert f"Version: {version}\n" in metadata, name- PY-- publish:- needs: [prepare, validate]- runs-on: ubuntu-latest- environment: pypi-fleet- steps:- - uses: actions/download-artifact@v4- with:- path: dist- merge-multiple: true- - name: Reconcile PyPI state before publishing- env:- VERSION: ${{ needs.prepare.outputs.version }}- run: |- set -euo pipefail- curl --fail --silent --show-error --location \- https://pypi.org/pypi/cua-fleet/json > /tmp/cua-fleet-pypi.json- python - "$VERSION" dist /tmp/cua-fleet-pypi.json <<'PY'- import hashlib- import json- from pathlib import Path- import sys-- version, dist_dir, metadata_path = sys.argv[1:]- expected = {- wheel.name: hashlib.sha256(wheel.read_bytes()).hexdigest()- for wheel in Path(dist_dir).glob("*.whl")- }- releases = json.load(open(metadata_path))["releases"]- existing = {- item["filename"]: item["digests"]["sha256"]- for item in releases.get(version, [])- }- unexpected = set(existing) - set(expected)- mismatched = {name for name, digest in existing.items() if expected.get(name) != digest}- if unexpected or mismatched:- raise SystemExit(- f"PyPI {version} conflicts: unexpected={unexpected}, mismatched={mismatched}"- )- missing = sorted(set(expected) - set(existing))- Path("/tmp/cua-fleet-missing-wheels.txt").write_text("\n".join(missing))- PY- - name: Publish only missing verified wheels- env:- PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}- run: |- set -euo pipefail- mapfile -t missing < /tmp/cua-fleet-missing-wheels.txt- if [[ "${#missing[@]}" -eq 0 ]]; then- echo "All cua-fleet wheels are already published with matching hashes."- exit 0- fi- python -m pip install --upgrade twine- files=()- for wheel in "${missing[@]}"; do- files+=("dist/$wheel")- done- TWINE_USERNAME="__token__" TWINE_PASSWORD="$PYPI_TOKEN" \- python -m twine upload --verbose "${files[@]}"-- create-release:- needs: [prepare, publish]- uses: ./.github/workflows/release-github-reusable.yml- with:- tag_name: "fleet-v${{ needs.prepare.outputs.version }}"- release_name: "cua-fleet v${{ needs.prepare.outputs.version }}"- module_path: "libs/fleet"- body: ""diff --git a/.github/workflows/ci-check-docs-image-refs.yml b/.github/workflows/ci-check-docs-image-refs.ymlindex d00f1732ff..730a18aa4f 100644--- a/.github/workflows/ci-check-docs-image-refs.yml+++ b/.github/workflows/ci-check-docs-image-refs.yml@@ -5,7 +5,7 @@ name: "CI: Check Docs Image Refs"# passing image-doctor ledger entry (the image-doctor-ledger branch, written# only by the image workflows). Refs published before the gate existed live in# scripts/images/docs-image-refs-baseline.json, which may only shrink. Also-# runs nightly: a nightly Fleet regression flips a ledger entry and turns this+# runs nightly: a nightly image regression flips a ledger entry and turns this# red until the image is fixed or the guide changes.on:diff --git a/.github/workflows/ci-cua-sdk.yml b/.github/workflows/ci-cua-sdk.ymlindex 0a4466b73e..2053ea1935 100644--- a/.github/workflows/ci-cua-sdk.yml+++ b/.github/workflows/ci-cua-sdk.yml@@ -14,8 +14,6 @@ on:- "libs/cua/**"- "libs/spaces-sdk-swift/**"- "libs/cua-spacesd/tests/spaces-e2e/**"- - "libs/fleet/sdk/**"- - "libs/fleet/sdk-schema/**"- ".github/workflows/ci-cua-sdk.yml"push:branches: [main]@@ -25,8 +23,6 @@ on:# cua-test-fixtures and the Spaces suites link a real driver core.- "libs/cua-spacesd/**"- "libs/cua-driver/rust/**"- - "libs/fleet/sdk/**"- - "libs/fleet/sdk-schema/**"- ".github/workflows/ci-cua-sdk.yml"schedule:- cron: "41 18 * * *"diff --git a/.github/workflows/ci-public-containerdisk-refs.yml b/.github/workflows/ci-public-containerdisk-refs.ymlindex 9bbc16e761..6521401800 100644--- a/.github/workflows/ci-public-containerdisk-refs.yml+++ b/.github/workflows/ci-public-containerdisk-refs.yml@@ -5,7 +5,6 @@ on:paths:- ".github/workflows/ci-public-containerdisk-refs.yml"- "docs/content/docs/how-to-guides/sandbox/**"- - "libs/fleet/backend/auth/**"- "tests/test_public_containerdisk_refs.py"permissions:diff --git a/.github/workflows/ci-test-python.yml b/.github/workflows/ci-test-python.ymlindex 767566fe6c..2337d8f995 100644--- a/.github/workflows/ci-test-python.yml+++ b/.github/workflows/ci-test-python.yml@@ -96,7 +96,7 @@ jobs:# cua-sandbox drives sandboxes through the cua SDK (UniFFI over cua-sdk),# so the native library and the MockServer fixture are built first. The# hermetic suite never touches the host or a cloud;- # the live runtime/Fleet suites are excluded (they are gated separately).+ # the live runtime suites are excluded (they are gated separately).name: Test cua-sandbox (hermetic, on the cua SDK)runs-on: ubuntu-latesttimeout-minutes: 60diff --git a/.github/workflows/docs-nightly.yml b/.github/workflows/docs-nightly.ymlindex 6450c664b1..103051e122 100644--- a/.github/workflows/docs-nightly.yml+++ b/.github/workflows/docs-nightly.yml@@ -3,7 +3,7 @@ name: "Docs: nightly host lanes"# Docs code blocks that need a real host of their kind run here, nightly and# alert-only (a failure opens or updates one issue). The pull-request lanes# (lint, cli-shape, config, docs, container) run in ci-check-docs-links.yml and-# e2e-cua-sdk.yml; the live Fleet and QEMU lanes, docs blocks included, run+# e2e-cua-sdk.yml; the live QEMU lanes, docs blocks included, run# in e2e-cua-sdk.yml's nightly job.## windows PowerShell blocks tagged test="windows" on windows-latestdiff --git a/.github/workflows/e2e-cua-sdk.yml b/.github/workflows/e2e-cua-sdk.ymlindex ab985fc8f3..ec548f0452 100644--- a/.github/workflows/e2e-cua-sdk.yml+++ b/.github/workflows/e2e-cua-sdk.yml@@ -34,8 +34,8 @@ on:description: "Lanes (comma list: hermetic,container,qemu,cua-sandbox,conformance)"default: "hermetic,container"langs:- description: "Languages (py,ts,rust,go)"- default: "py,ts,rust,go"+ description: "Languages (py,ts,rust)"+ default: "py,ts,rust"permissions:contents: read@@ -92,9 +92,6 @@ jobs:with:node-version: "22"- uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6- - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5- with:- go-version: "1.24"- name: Log in to Docker Hub (docs blocks read image manifests)if: env.DOCKERHUB_USERNAME != ''uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3@@ -114,7 +111,7 @@ jobs:- name: Run the suiteenv:LANES: ${{ github.event_name == 'workflow_dispatch' && inputs.lanes || 'hermetic,container' }}- LANGS: ${{ github.event_name == 'workflow_dispatch' && inputs.langs || 'py,ts,rust,go' }}+ LANGS: ${{ github.event_name == 'workflow_dispatch' && inputs.langs || 'py,ts,rust' }}CUA_E2E_PLAYWRIGHT_DIR: ${{ runner.temp }}/pw# cua keeps 5 GiB free by default. On this disposable runner, after# the setup and the Rust half's own debug build, that refused the@@ -163,9 +160,6 @@ jobs:with:node-version: "22"- uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6- - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5- with:- go-version: "1.24"- name: Build the SDK, fixtures, bindings, images, disks and runtimesrun: tests/e2e/cua-sdk/ci-setup.sh --images --disks# Cua Cloud has ended (CUA-1854): Fleet refuses the old live lane, so@@ -173,7 +167,7 @@ jobs:- name: Run the suiterun: >python3 tests/e2e/cua-sdk/run.py --lanes cua-sandbox,qemu- --langs py,ts,rust,go --strict --out "$RUNNER_TEMP/cua-e2e"+ --langs py,ts,rust --strict --out "$RUNNER_TEMP/cua-e2e"- name: Matrix summaryif: always()run: |diff --git a/AGENTS.md b/AGENTS.mdindex 29ff06ccf8..e04ae23ac8 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -63,7 +63,7 @@ that are easy to miss:- Sandboxes are daemon-agnostic: lifecycle and readiness must not assumecua-spacesd or any other in-guest service.- `libs/fleet` is a read-only mirror. Never edit it.-- Tests that start VMs, containers, Fleet claims, or host input are opt-in+- Tests that start VMs, containers, or host input are opt-in(off by default) and clean up what they create.## Cross-platform Cua Driver behaviordiff --git a/Development.md b/Development.mdindex 26f39e1324..0c860d4eb5 100644--- a/Development.md+++ b/Development.md@@ -32,8 +32,8 @@ Two boundaries to keep in mind:- `libs/cua-spacesd` is server-only (it runs inside the sandbox). Clientcode, including wire formats and media clients, lives in `libs/cua`, and thedriver depends on it, never the reverse. CI enforces this.-- `libs/fleet` is a read-only mirror of the Fleet SDK. `libs/cua` depends on it- by path; never edit it here.+- `libs/fleet` is a read-only mirror of the retired Fleet SDK. Nothing builds it+ any more; never edit it here.## Common Setupdiff --git a/TESTING.md b/TESTING.mdindex 2988bea8f6..2e4f753ac5 100644--- a/TESTING.md+++ b/TESTING.md@@ -12,14 +12,14 @@ truth.| cua SDK and CLI (`libs/cua`) | Cargo tests, proto lint/breaking, binding drift, per-language smoke tests | `tests/e2e/cua-sdk` (**E2E: cua SDK**) || cua-spacesd | Cargo tests and the in-process conformance suite | Linux core tests and relay E2E in Docker || Python SDKs | Package `tests/` directories with pytest | Package-specific integration tests and `tests/integration` |-| cua-sandbox | Hermetic pytest suite on the cua SDK | **Periodic: Cua Sandbox Live Fleet E2E** |+| cua-sandbox | Hermetic pytest suite on the cua SDK | **E2E: cua SDK** (`cua-sandbox` lane) || TypeScript SDKs | Package Vitest/typecheck scripts | Package-owned integration tests || cua-driver | Rust unit, schema, protocol, and compile tests | Canonical Rust desktop harnesses on Windows, macOS, Linux X11, and Linux Wayland || Lume | Swift package tests | VM and unattended-setup checks documented by Lume || Cua Spaces app | Vitest, Tauri Rust tests | **CI: Cua Spaces** || Installers | `scripts/install/tests` | **CI: Installers** smoke jobs on Linux, macOS, and Windows || Public docs | Generator drift, hygiene, links, and production build | Rendered Fumadocs site |-| Images and sandboxes | Component build and schema tests; **CI: Check Image Refs** (`python3 scripts/images/check-image-refs.py`: every image ref comes from `libs/images/sandbox-images.json`, a bench lock or the allowlist; frozen legacy names only in their listed paths) | **CD: Image linux**, **E2E: Fleet images, local**, image smoke tests |+| Images and sandboxes | Component build and schema tests; **CI: Check Image Refs** (`python3 scripts/images/check-image-refs.py`: every image ref comes from `libs/images/sandbox-images.json`, a bench lock or the allowlist; frozen legacy names only in their listed paths) | **CD: Image linux**, image smoke tests |Path-filtered CI avoids running unrelated operating systems, so a green job forone component does not validate another component.@@ -74,9 +74,9 @@ package README under `libs/cua/{python,typescript,swift,kotlin}` and in[`.github/workflows/ci-cua-sdk.yml`](.github/workflows/ci-cua-sdk.yml).The cross-language E2E suite runs each guide scenario in Python, TypeScript,-Rust, and Go, per lane (`hermetic`, `container`, `qemu`, `lume`, `fleet`,-`fleet-env`, `cua-sandbox`, `conformance`). Lanes other than `hermetic` start-containers, VMs, or Fleet claims and are opt-in:+and Rust, per lane (`hermetic`, `container`, `qemu`, `lume`, `cua-sandbox`,+`conformance`). Lanes other than `hermetic` start containers or VMs and are+opt-in:```bashtests/e2e/cua-sdk/ci-setup.sh --imagesdiff --git a/libs/cua-bench-s1/python/src/cua_bench_s1/agentic/cua_bench_basic_env.py b/libs/cua-bench-s1/python/src/cua_bench_s1/agentic/cua_bench_basic_env.pyindex d144974b2a..31d51110dd 100644--- a/libs/cua-bench-s1/python/src/cua_bench_s1/agentic/cua_bench_basic_env.py+++ b/libs/cua-bench-s1/python/src/cua_bench_s1/agentic/cua_bench_basic_env.py@@ -23,8 +23,7 @@ exactly three things:### Where episodes runcua-bench 0.3 runs every task in a real sandbox: the bundled envs declare-`provider: "native"` and run in the local Linux container by default (`--on-cloud` / `CUA_BENCH_ON=cloud` for Fleet). The pages open with+`provider: "native"` and run in the local Linux container by default. The pages open with`session.launch_window`, which needs bench-ui in the image. cua-bench'sPlaywright `simulated` provider was removed in 0.3 (a task that still asksfor it runs on the Linux container with a deprecation warning), sodiff --git a/libs/cua-driver/docs/why-cua-driver-uses-mcp-instead-of-uniffi.md b/libs/cua-driver/docs/why-cua-driver-uses-mcp-instead-of-uniffi.mdindex b26e46830a..7f07c2926f 100644--- a/libs/cua-driver/docs/why-cua-driver-uses-mcp-instead-of-uniffi.md+++ b/libs/cua-driver/docs/why-cua-driver-uses-mcp-instead-of-uniffi.md@@ -148,47 +148,45 @@ while UniFFI bindings can let application developers host or compose the Rustserver/client implementation. Removing MCP is neither required nor desirablefor adopting UniFFI.-## Why Fleet is useful precedent+## Why a shared Rust client is useful precedent-Fleet places substantial portable client behavior in a Rust library loaded by-the host application:+An earlier Cua SDK for a hosted service (since retired) placed substantial+portable client behavior in a Rust library loaded by the host application:```textapplication-> generated UniFFI binding- -> libcyclops_sdk+ -> shared Rust client library- authentication and token refresh- resource lifecycle and polling- route construction and validation- concurrency control-> host-provided HttpClient- -> remote Fleet API+ -> remote service API```-Fleet's Rust SDK contains behavior that would otherwise be repeated in every-language. For example, `client.rs` owns client-configuration and namespace lifecycle locks. `transport.rs`-owns OAuth token caching and refresh. The pool, claim, and service modules own-polling, request construction, validation, and lifecycle rules.--The host language supplies an `HttpClient`-callback. This lets Python, Swift, Kotlin, Ruby, or TypeScript use a suitable-HTTP implementation while Rust keeps the product behavior. UniFFI therefore-replaces substantial duplicated implementations, and the shared library is the-component the language API is meant to call.--Fleet also has a mature checked-in generation path for Python, Kotlin, Swift,-and Ruby. Its `generate-sdk-bindings.sh`-script pins UniFFI through the Rust workspace, generates into temporary roots,-tracks owned files, and checks drift.--Fleet's Node and browser artifacts also establish an important fact: TypeScript-UniFFI is not limited to WASM. The checked-in Node path uses+That Rust SDK contained behavior that would otherwise be repeated in every+language: client configuration and lifecycle locks, OAuth token caching and+refresh, and the polling, request construction, validation, and lifecycle rules+of each resource.++The host language supplied an `HttpClient` callback. This let Python, Swift,+Kotlin, Ruby, or TypeScript use a suitable HTTP implementation while Rust kept+the product behavior. UniFFI therefore replaced substantial duplicated+implementations, and the shared library was the component the language API was+meant to call.++It also had a mature checked-in generation path for Python, Kotlin, Swift, and+Ruby. A single script pinned UniFFI through the Rust workspace, generated into+temporary roots, tracked owned files, and checked drift.++Its Node and browser artifacts also established an important fact: TypeScript+UniFFI is not limited to WASM. The checked-in Node path used`uniffi-bindgen-react-native`, `@ubjs/core`, `@ubjs/node`, and native platformpackages. That path proved feasibility and informed Cua's generated loader andoptional npm platform-package matrix.-Fleet therefore demonstrates the relevant architecture: bindings are for+That SDK therefore demonstrated the relevant architecture: bindings are forconsumers that want the shared implementation, including consumers that maycreate a server. MCP clients do not need those bindings merely to call analready-running MCP server.@@ -384,13 +382,9 @@ agents regardless of either SDK decision.This decision used:-- Fleet commit `c2ba0b5e94d0f2c06d0c7efb0913803ca0a616af`, which added the checked-in- Go and TypeScript UniFFI artifacts;+- the retired hosted-service SDK's checked-in Go and TypeScript UniFFI+ artifacts, as a precedent for the binding pipeline;- Cua Driver SDK commit `896172754074f8c7ac26745685989df661714da6` before thisexplanatory document;- the implementation measurements and adoption gates in the[Rust source-of-truth and UniFFI evaluation](sdk-rust-source-of-truth-and-uniffi-evaluation-plan.md).--The Fleet source had not changed between its cited commit and the latest-`main` inspected on 2026-07-21. Recheck the generation and packaging claims if-Fleet's binding pipeline changes.diff --git a/tests/e2e/cua-sdk/fleet_gateway_conformance.py b/tests/e2e/cua-sdk/fleet_gateway_conformance.pydeleted file mode 100644index c8b77d8819..0000000000--- a/tests/e2e/cua-sdk/fleet_gateway_conformance.py+++ /dev/null@@ -1,278 +0,0 @@-#!/usr/bin/env python3-"""The env-server conformance suite against a Fleet-claimed cua-spacesd,-through the Fleet gateway.-- CUA_E2E_FLEET_ENV_IMAGE=<rootfs ref> tests/e2e/cua-sdk/fleet_gateway_conformance.py --runtime gvisor--Applies a `cua-e2e-*` pool of the spacesd image, claims it with the cua SDK,-then runs `cargo test -p cua-spacesd-server --test conformance` with-CUA_ENV_TEST_TARGET = the claim's gateway service URL, the Fleet bearer in-`authorization` (CUA_ENV_TEST_GATEWAY_BEARER_FILE) and the env token in-`x-cua-env-authorization`. The pool is deleted in `finally`.--The Fleet bearer lives ~900 s and the suite can run far longer, so the bearer-is cached with its expiry and re-minted at 80% of its lifetime by a background-thread into a private temp file the harness re-reads-(CUA_ENV_TEST_GATEWAY_BEARER_FILE). The bearer is never printed.--gVisor only for now: Fleet pools have no per-claim secret field yet, so the env-token reaches a gVisor pod through an entrypoint override (the image reads-/etc/cua/env-token); a KubeVirt containerDisk guest has no such hook.--Needs Fleet OAuth credentials (CUA_CLIENT_ID/SECRET, CUA_TOKEN_URL) and the-cua Python package with its native library on PYTHONPATH.-"""--from __future__ import annotations--import argparse-import asyncio-import json-import os-import secrets-import subprocess-import sys-import tempfile-import threading-import time-import urllib.parse-import urllib.request-from pathlib import Path--import cua--REPO = Path(__file__).resolve().parents[3]-KUBEVIRT_ENV_SKIP = (- "KubeVirt spacesd lane needs a per-claim secret field (cloud PR): no way to "- "deliver the env token to a containerDisk guest yet"-)---def fleet_bearer() -> tuple[str, int]:- """A client-credentials access token and its lifetime (s)."""- url = (- os.environ.get("CUA_TOKEN_URL")- or "https://auth.cua.ai/realms/cyclops-cs/protocol/openid-connect/token"- )- body = urllib.parse.urlencode(- {- "grant_type": "client_credentials",- "client_id": os.environ["CUA_CLIENT_ID"],- "client_secret": os.environ["CUA_CLIENT_SECRET"],- }- ).encode()- with urllib.request.urlopen(urllib.request.Request(url, data=body), timeout=30) as r:- doc = json.load(r)- return doc["access_token"], int(doc.get("expires_in", 0))---class RefreshingBearer:- """A Fleet bearer cached with its expiry and re-minted before it lapses.-- ``start()`` writes the current bearer to a 0600 temp file and keeps it- fresh from a daemon thread (refresh at ``refresh_fraction`` of the- lifetime); ``stop()`` ends the thread and deletes the file.- """-- def __init__(self, mint=fleet_bearer, refresh_fraction: float = 0.8, clock=time.monotonic):- self._mint = mint- self._fraction = refresh_fraction- self._clock = clock- self._lock = threading.Lock()- self._token = ""- self._lifetime = 0- self._refresh_at = 0.0- self._stop = threading.Event()- self._thread: threading.Thread | None = None- self.path: Path | None = None-- @property- def lifetime(self) -> int:- return self._lifetime-- def _refresh_delay(self, lifetime: int) -> float:- # Unknown lifetime: assume the documented 900 s.- return max(1.0, (lifetime or 900) * self._fraction)-- def _renew(self) -> None:- token, lifetime = self._mint()- with self._lock:- self._token, self._lifetime = token, lifetime- self._refresh_at = self._clock() + self._refresh_delay(lifetime)- if self.path is not None:- tmp = self.path.with_suffix(".tmp")- fd = os.open(tmp, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0o600)- with os.fdopen(fd, "w") as f:- f.write(token)- os.replace(tmp, self.path)-- def get(self) -> str:- """The current bearer, re-minted first when it is due."""- with self._lock:- due = not self._token or self._clock() >= self._refresh_at- if due:- self._renew()- with self._lock:- return self._token-- def _run(self) -> None:- while True:- with self._lock:- wait = max(1.0, self._refresh_at - self._clock())- if self._stop.wait(wait):- return- try:- self._renew()- except Exception as e: # keep the old bearer; retry shortly- print(- f"bearer refresh failed ({type(e).__name__}); retrying",- file=sys.stderr,- flush=True,- )- with self._lock:- self._refresh_at = self._clock() + 30-- def start(self) -> Path:- directory = Path(tempfile.mkdtemp(prefix="cua-e2e-bearer-"))- self.path = directory / "bearer"- self._renew()- self._thread = threading.Thread(target=self._run, name="bearer-refresh", daemon=True)- self._thread.start()- return self.path-- def stop(self) -> None:- self._stop.set()- if self._thread is not None:- self._thread.join(timeout=5)- if self.path is not None:- for p in (self.path, self.path.with_suffix(".tmp")):- p.unlink(missing_ok=True)- try:- self.path.parent.rmdir()- except OSError:- pass---def env_token_command(token: str) -> list[str]:- return [- "/bin/sh",- "-c",- f"mkdir -p /etc/cua && printf %s {token} >/etc/cua/env-token && "- "exec /opt/cua/desktop/entrypoint.sh",- ]---async def main(runtime: str, image: str, test_filter: list[str]) -> int:- if runtime != "gvisor":- print(f"skip: {KUBEVIRT_ENV_SKIP}")- return 0- c = cua.embedded(fleet_from_env=True)- fleet = c.fleet()- run = os.environ.get("CUA_E2E_RUN") or secrets.token_hex(3)- pool = f"cua-e2e-{run}-conf-{runtime}"[:63]- token = secrets.token_hex(16)- sb = None- bearer = RefreshingBearer()- t0 = time.monotonic()- try:- await fleet.apply_pool(- cua.FleetPoolSpec(- name=pool,- image=image,- runtime=runtime,- replicas=1,- cpu=2,- memory_mb=4096,- services={"env": 3211},- command=env_token_command(token),- ttl_seconds_after_created=7200,- )- )- sb = await c.sandboxes().create(- cua.SandboxCreateOptions(- on="cloud",- pool=pool,- name=f"{pool}-c",- token=token,- ready_timeout_ms=1_200_000,- )- )- bound = await fleet.attach_claim(pool, f"{pool}-c")- url = fleet.service_url(bound, "env")- bearer_file = bearer.start()- # Wait for the driver behind the gateway (plain /health, no SDK).- for attempt in range(60):- req = urllib.request.Request(- url + "/health",- headers={- "authorization": f"Bearer {bearer.get()}",- "x-cua-fleet-claim": bound.claim,- },- )- try:- with urllib.request.urlopen(req, timeout=20) as r:- if r.status < 300:- break- except OSError:- pass- if attempt == 59:- raise RuntimeError("spacesd /health never answered through the gateway")- await asyncio.sleep(5)- print(- f"claimed {bound.claim} in {time.monotonic() - t0:.0f}s; gateway {url}; "- f"bearer lifetime {bearer.lifetime}s (refreshed at 80%)",- flush=True,- )- env = dict(- os.environ,- CUA_ENV_TEST_TARGET=url,- CUA_ENV_TEST_TOKEN=token,- CUA_ENV_TEST_GATEWAY_BEARER_FILE=str(bearer_file),- CUA_ENV_TEST_GATEWAY_CLAIM=bound.claim,- CUA_ENV_TEST_BIG_BYTES=os.environ.get("CUA_ENV_TEST_BIG_BYTES", str(64 << 20)),- CUA_ENV_TEST_LONG_SECS=os.environ.get("CUA_ENV_TEST_LONG_SECS", "60"),- CARGO_BUILD_JOBS=os.environ.get("CARGO_BUILD_JOBS", "4"),- )- t1 = time.monotonic()- code = subprocess.run(- [- "timeout",- "2700",- "cargo",- "test",- "-p",- "cua-spacesd-server",- "--test",- "conformance",- "--",- "--test-threads=4",- *test_filter,- ],- cwd=REPO / "libs" / "cua-spacesd",- env=env,- ).returncode- print(f"conformance ({runtime}) exit {code} in {time.monotonic() - t1:.0f}s", flush=True)- return code- finally:- bearer.stop()- if sb is not None:- try:- await sb.delete()- except cua.CuaError as e:- print(f"sandbox delete: {e}", file=sys.stderr)- try:- await fleet.delete_pool(pool)- print(f"deleted pool {pool}", flush=True)- except cua.CuaError as e:- print(f"pool delete: {e}", file=sys.stderr)---if __name__ == "__main__":- ap = argparse.ArgumentParser(description=__doc__.split("\n")[0])- ap.add_argument("--runtime", choices=["gvisor", "kubevirt"], default="gvisor")- ap.add_argument("--image", default=os.environ.get("CUA_E2E_FLEET_ENV_IMAGE"))- ap.add_argument("filter", nargs="*", help="cargo test name filters")- a = ap.parse_args()- if not a.image:- sys.exit("set CUA_E2E_FLEET_ENV_IMAGE (the rootfs ref) or pass --image")- sys.exit(asyncio.run(main(a.runtime, a.image, a.filter)))diff --git a/tests/e2e/cua-sdk/go/terraform-smoke.sh b/tests/e2e/cua-sdk/go/terraform-smoke.shdeleted file mode 100755index b9ddb69027..0000000000--- a/tests/e2e/cua-sdk/go/terraform-smoke.sh+++ /dev/null@@ -1,53 +0,0 @@-#!/usr/bin/env bash-# configure-pool-with-terraform, smoke only (plan §3.5): the provider in the-# read-only libs/fleet mirror is unchanged; we build its native Fleet SDK,-# run its unit tests, and (when TF_ACC=1 and KUBEBUILDER_ASSETS are set) its-# existing envtest acceptance test. Never edits libs/fleet.-#-# Records one line into $CUA_E2E_RESULTS/go.jsonl.-set -uo pipefail-HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"-REPO="$(cd "$HERE/../../../.." && pwd)"-PROVIDER="$REPO/libs/fleet/terraform-provider-fleets"-RUN="${CUA_E2E_RUN:-$(od -An -tx1 -N3 /dev/urandom | tr -d ' \n')}"-TARGET="${CUA_E2E_FLEET_SDK_TARGET:-$HERE/.target}"-t0=$SECONDS-lane="hermetic"; [ "${TF_ACC:-}" = 1 ] && lane="fleet"--record() { # status reason- [ -n "${CUA_E2E_RESULTS:-}" ] || return 0- mkdir -p "$CUA_E2E_RESULTS"- python3 - "$1" "$2" "$((SECONDS - t0))" "$lane" "$RUN" >>"$CUA_E2E_RESULTS/go.jsonl" <<'PY'-import json, sys-status, reason, secs, lane, run = sys.argv[1:6]-print(json.dumps({"scenario": "configure-pool-with-terraform", "lang": "go", "lane": lane,- "test": "provider unit tests" + (" + acceptance" if lane == "fleet" else ""),- "status": status, "secs": float(secs), "reason": reason, "run": run}))-PY-}--command -v go >/dev/null || { echo "skip: go not installed"; record skip "go is not installed"; exit 0; }-echo "==> building cyclops-sdk (native) from libs/fleet into $TARGET"-if ! CARGO_BUILD_JOBS="${CARGO_BUILD_JOBS:-4}" cargo build --locked --manifest-path "$REPO/libs/fleet/Cargo.toml" \- -p cyclops-sdk --target-dir "$TARGET" >&2; then- record fail "cyclops-sdk native build failed"; exit 1-fi-lib="$TARGET/debug"-export CGO_CFLAGS="-I$REPO/libs/fleet/sdk-bindings/go-uniffi/fleet_sdk -I$REPO/libs/fleet/sdk-bindings/go-uniffi/cyclops_sdk_schema"-export CGO_LDFLAGS="-L$lib -lcyclops_sdk -Wl,-rpath,$lib"-export LD_LIBRARY_PATH="$lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"-cd "$PROVIDER"-echo "==> go test ./internal/provider (unit)"-if ! timeout 900 go test ./internal/provider/; then record fail "provider unit tests failed"; exit 1; fi-if [ "${TF_ACC:-}" = 1 ]; then- if [ -z "${KUBEBUILDER_ASSETS:-}" ]; then- KUBEBUILDER_ASSETS="$(go run sigs.k8s.io/controller-runtime/tools/[email protected] use 1.31.0 -p path)" || {- record fail "setup-envtest failed"; exit 1; }- export KUBEBUILDER_ASSETS- fi- echo "==> acceptance (envtest)"- if ! timeout 1800 go test -tags=acceptance ./internal/provider -run TestAccPoolLifecycle -v; then- record fail "acceptance test failed"; exit 1- fi-fi-record pass ""diff --git a/tests/e2e/cua-sdk/test_fleet_gateway_conformance_bearer.py b/tests/e2e/cua-sdk/test_fleet_gateway_conformance_bearer.pydeleted file mode 100644index 2d5a662e36..0000000000--- a/tests/e2e/cua-sdk/test_fleet_gateway_conformance_bearer.py+++ /dev/null@@ -1,109 +0,0 @@-"""Hermetic tests for the conformance runner's refreshing Fleet bearer.--No network, no Fleet: the mint function and the clock are fakes, and the-`cua` package is stubbed so the runner module imports without its native-library.-- python -m pytest tests/e2e/cua-sdk/test_fleet_gateway_conformance_bearer.py-"""--from __future__ import annotations--import importlib.util-import stat-import sys-import types-from pathlib import Path--HERE = Path(__file__).resolve().parent---def _load_runner():- sys.modules.setdefault("cua", types.ModuleType("cua"))- spec = importlib.util.spec_from_file_location(- "fleet_gateway_conformance", HERE / "fleet_gateway_conformance.py"- )- module = importlib.util.module_from_spec(spec)- spec.loader.exec_module(module)- return module---runner = _load_runner()---class FakeClock:- def __init__(self) -> None:- self.now = 1000.0-- def __call__(self) -> float:- return self.now---def _minter(lifetime: int = 900):- minted = []-- def mint():- minted.append(f"bearer-{len(minted)}")- return minted[-1], lifetime-- return mint, minted---def test_bearer_is_cached_until_80_percent_of_its_lifetime():- clock = FakeClock()- mint, minted = _minter(900)- bearer = runner.RefreshingBearer(mint=mint, clock=clock)-- assert bearer.get() == "bearer-0"- clock.now += 719 # just under 80% of 900 s- assert bearer.get() == "bearer-0"- assert len(minted) == 1-- clock.now += 1 # 720 s = 80%- assert bearer.get() == "bearer-1"- assert bearer.lifetime == 900---def test_unknown_lifetime_assumes_900_seconds():- clock = FakeClock()- mint, minted = _minter(0)- bearer = runner.RefreshingBearer(mint=mint, clock=clock)- bearer.get()- clock.now += 700- bearer.get()- assert len(minted) == 1- clock.now += 20- bearer.get()- assert len(minted) == 2---def test_bearer_file_is_private_rewritten_on_refresh_and_removed_on_stop():- clock = FakeClock()- mint, _ = _minter(900)- bearer = runner.RefreshingBearer(mint=mint, clock=clock)- path = bearer.start()- try:- assert path.read_text() == "bearer-0"- assert stat.S_IMODE(path.stat().st_mode) == 0o600- clock.now += 900- bearer.get()- assert path.read_text() == "bearer-1"- finally:- bearer.stop()- assert not path.exists()- assert not path.parent.exists()---def test_background_thread_refreshes_before_expiry():- # Real clock, 2 s lifetime: the thread re-mints after ~1.6 s.- mint, minted = _minter(2)- bearer = runner.RefreshingBearer(mint=mint)- path = bearer.start()- try:- deadline = runner.time.monotonic() + 10- while len(minted) < 2 and runner.time.monotonic() < deadline:- runner.time.sleep(0.1)- assert len(minted) >= 2- assert path.read_text() == minted[-1]- finally:- bearer.stop()