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
refactor(spaces-app): the Spaces desktop app no longer builds a Fleet client or probes the retired API (CUA-1834) (#5439)
Francesco Bonaccidcd233b9732c
diff --git a/apps/cua-spaces-desktop/src/model/backend.ts b/apps/cua-spaces-desktop/src/model/backend.tsindex a631cf98bc..d17fab674b 100644--- a/apps/cua-spaces-desktop/src/model/backend.ts+++ b/apps/cua-spaces-desktop/src/model/backend.ts@@ -398,9 +398,8 @@ export class LiveSpacesBackend implements SpacesBackend {}/**- * No estimate: the rates came from the retired Fleets API- * (`fleet().usagePricing()` on run.cua.ai), and the app does not offer new- * cloud Spaces. New Space never waits on it.+ * No estimate: the rates came from the Cua Cloud API, which has ended, and+ * the app does not offer new cloud Spaces. New Space never waits on it.*/async cloudPricing(): Promise<AppCloudPricing | null> {return null;diff --git a/apps/cua-spaces-desktop/src/model/environment.ts b/apps/cua-spaces-desktop/src/model/environment.tsindex af4d023ee6..9a9cc95668 100644--- a/apps/cua-spaces-desktop/src/model/environment.ts+++ b/apps/cua-spaces-desktop/src/model/environment.ts@@ -184,7 +184,7 @@ export async function makeLiveServices(native: Native, supervisor: DaemonSupervi* The SDK on this app's own daemon (`Cua.auto`: the daemon when it accepts* connections, else embedded). When another build's daemon came up in* between, the SDK refuses it with `DaemonNotRunning`, and one more start- * replaces it. Cua Cloud uses the signed-in session.+ * replaces it. The signed-in session drives the relay account.*/async function makeCua(native: Native, supervisor: DaemonSupervisor | null): Promise<CuaLike> {const config = native.CuaConfig.create({ fleetFromEnv: true, fleetFromSession: true });diff --git a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/AppServices.swift b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/AppServices.swiftindex 371e43420d..e9bac58bd1 100644--- a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/AppServices.swift+++ b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/AppServices.swift@@ -271,9 +271,9 @@ public protocol BillingRunning: AnyObject, Sendable {func status() async throws -> AppBillingStatus}-/// Billing no longer calls the retired Fleets API (`GET /api/billing/status`-/// on run.cua.ai). It reports "billing not enabled" with no network call, so-/// Settings hides the row and a refused cloud Space offers no Add credit.+/// Billing has no service behind it: Cua Cloud has ended. It reports "billing+/// not enabled" with no network call, so Settings hides the row and a refused+/// cloud Space offers no Add credit.public final class LiveBilling: BillingRunning, @unchecked Sendable {let cua: Cuapublic init(cua: Cua) { self.cua = cua }diff --git a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/SpacesBackend.swift b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/SpacesBackend.swiftindex d7d65156b0..3f0d0a84d3 100644--- a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/SpacesBackend.swift+++ b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/SpacesBackend.swift@@ -165,8 +165,8 @@ public final class LiveSpacesBackend: SpacesBackend, @unchecked Sendable {/// `cua daemon` when it accepts connections, else the runtime in this/// process. `Cua.auto` probes the daemon's socket, so files left by a/// daemon that exited (`daemon.json`, `cua.sock`) fall back to embedded- /// instead of failing every call. Cua Cloud uses the signed-in session- /// when no client credentials are set (the Tauri app does the same).+ /// instead of failing every call. The signed-in session drives the relay+ /// account.public static func make() throws -> LiveSpacesBackend {LiveSpacesBackend(cua: try Cua.auto(config: CuaConfig(fleetFromSession: true)))}@@ -402,9 +402,8 @@ public final class LiveSpacesBackend: SpacesBackend, @unchecked Sendable {}.count}- /// No estimate: the rates came from the retired Fleets API- /// (`Fleet.usagePricing()` on run.cua.ai), and the app does not offer- /// new cloud Spaces. New Space never waits on it.+ /// No estimate: the rates came from the Cua Cloud API, which has ended,+ /// and the app does not offer new cloud Spaces. New Space never waits on it.public func cloudPricing() async -> AppCloudPricing? { nil }public func teleportContext(id: String) async throws -> (CuaSpacesFFI.Teleport, CuaSDK.Space)? {diff --git a/apps/cua-spaces/README.md b/apps/cua-spaces/README.mdindex 1207e65ac5..7de2cc10e5 100644--- a/apps/cua-spaces/README.md+++ b/apps/cua-spaces/README.md@@ -37,22 +37,21 @@ view at launch in debug builds (release builds ignore the recording hooks).│ + loopback): media bridge, envshared registry ~/.cua/spaces.json passthrough, MCP│- direct:host:port | cloud:name | local:name+ direct:host:port | relay:id | local:name▼cua-spacesd :3211 in every SpacegRPC + gRPC-Web, /media (wire v2), /mcp, /health```- **cua-spaces** (`libs/cua/crates/cua-spaces`) is the Spaces core: registry,- create / delete in Cua Cloud or on this Mac, files, streams, presence, teleport,+ create / delete on this Mac, files, streams, presence, teleport,hotspot, agents. The app links it directly; `src-tauri` commands are- one-liners over it. There is no cloud REST client, Lume CLI, rcdp client or+ one-liners over it. There is no Cua Cloud client, Lume CLI, rcdp client orWebSocket relay of the app's own any more.- **`cua daemon`** hosts the same SDK runtime out of process. The app connectsto a running daemon or starts one (`cua daemon start`), so the CLI and MCP- clients share Spaces with the app. The daemon's **media bridge**- (`OpenMediaBridge`) serves ticketed WebSockets for Spaces whose socket needs- headers a webview cannot set (the Cua Cloud gateway).+ clients share Spaces with the app. The app attaches to each Space's own+ media ticket directly; it needs no daemon media bridge for any Space.- **MCP**: agents drive Spaces through `cua mcp` (`cua daemon mcp`).Settings → AI agents runs the SDK's agent onboarding (`cua-agent-setup`, sameas `cua agents setup`): it installs the cua skills and registers `cua mcp` in@@ -67,10 +66,10 @@ is a step-by-step sheet:1. **System**: Linux, Windows or macOS, the image (a dropdown of the publishedentries of `libs/images/sandbox-images.json`, the same list the docs show),- and where it runs: This Mac. "Your cloud (AWS, Azure, GCP...)" shows as- coming soon and cannot be picked (the core's `CLOUD_SPACES_OFFERED`; the- cua SDK and CLI still create cloud sandboxes, and cloud Spaces that already- exist still list). **Advanced** picks the kind (container or virtual+ and where it runs: This Mac. Cua Cloud has ended and is not offered (the+ core's `CLOUD_SPACES_OFFERED` is off); `cloud:` Spaces registered before+ still list, answer that it has ended on any action, and can be removed from+ the list. **Advanced** picks the kind (container or virtualmachine, when the image comes in both) and the runtime, offering only whatthe image runs there: containers `auto`, `gvisor`, `runc`; VMs `auto` andthe image's `qemu` or `lume`.@@ -82,7 +81,7 @@ Every create is one `create_space {image, on, kind, runtime, ...}` call.Spaces on this Mac run through`cua-vmm`. The notch "+" drop creates in the default location. **Connect byaddress** adds a machine that already runs cua-spacesd (`host:port` plus its-token). Delete deletes a created Space's sandbox (cloud or local); a Space+token). Delete deletes a created Space's sandbox; a Spaceadded by address is only removed from the list.### First run and "This machine"@@ -94,8 +93,8 @@ asks first and shows its path."This machine" asks what the machine is for:-- **Access other machines**: nothing is installed. Cloud Spaces and the- signed-in account's own machines (`space://relay/<id>`) appear automatically.+- **Access other machines**: nothing is installed. The signed-in account's+ own machines (`relay:<id>`) appear automatically.- **Set up this machine for unattended access**: `cua-host` (the librarybehind `cua host setup`) installs cua-spacesd as a service that joins the Cuarelay (`https://relay.cua.ai`, or `CUA_RELAY_URL`). Direct `ip:port` is@@ -143,19 +142,15 @@ cua-spaces `Approval` (which refuses unacknowledged sensitive items) and`TeleportService`, SHA-256 verified. Files dropped on the Teleport zone landin the Space's `~/Downloads`, digest-verified.-### Cua Cloud configuration+### Configuration-| Variable | Default | Purpose |-| --- | --- | --- |-| `CUA_FLEET_BASE_URL` | none | Legacy Fleets API base URL (run.cua.ai is retired) |-| `CUA_TOKEN_URL` | `https://auth.cua.ai/realms/cyclops-cs/protocol/openid-connect/token` | OAuth token endpoint |-| `CUA_CLIENT_ID` / `CUA_CLIENT_SECRET` | none | client-credentials auth |-| `FLEETS_TOKEN` | none | static bearer token (takes precedence) |--The signed-in user (device grant, Settings → Sign in to Cua) takes precedence-over the environment. The default location is `default.on` in-`$CUA_HOME/config.toml` (Settings → Default location); `CUA_DEFAULT_ON`-overrides it and Settings shows that read-only. `./run-live.sh` loads `~/.env` and starts the daemon.+The app signs in with the device grant (Settings → Sign in to Cua); the session+is the credential store shared with the CLI and the daemon, and it drives the+relay account and this device's enrollment. Cua Cloud has ended, so the app+builds no Cua Cloud client and reads no Cua Cloud credentials from the+environment. The default location is `default.on` in `$CUA_HOME/config.toml`+(Settings → Default location); `CUA_DEFAULT_ON` overrides it and Settings shows+that read-only. `./run-live.sh` starts the daemon.The Tauri command contract is listed in `TELEPORT.md`.diff --git a/apps/cua-spaces/TELEPORT.md b/apps/cua-spaces/TELEPORT.mdindex cd60559d6b..9b41447f1c 100644--- a/apps/cua-spaces/TELEPORT.md+++ b/apps/cua-spaces/TELEPORT.md@@ -23,13 +23,13 @@ rcdp-handoff / computer-server daemons.```bashcd apps/cua-spacespnpm install-./run-live.sh # loads ~/.env (Fleet creds), starts `cua daemon`, prints the launch command+./run-live.sh # starts `cua daemon`, prints the launch command./run-live.sh --launch # same, then `pnpm tauri dev` (opens the app's windows)```-Fleet credentials (`~/.env`, never committed): `CUA_CLIENT_ID`,-`CUA_CLIENT_SECRET`, `CUA_TOKEN_URL`, `CUA_FLEET_BASE_URL`, or `FLEETS_TOKEN`.-Without them Cloud is unavailable; **Add by address** and **Local** still work.+Sign in from the app (Settings → Sign in to Cua) or with `cua auth login` to+see your relay machines. **Add by address** and **Local** need no sign-in. Cua+Cloud has ended.Quick direct Space for manual testing (Docker, gVisor, 4 GiB cap):@@ -50,16 +50,17 @@ Agent CLIs: Settings → AI agents installs the cua skills and registers## 3. Tauri command contract-Space ids are `space://direct/<host:port>`, `space://fleet/<ns>/<claim>`,-`space://local/<name>`.+Space ids are `direct:<host:port>`, `local:<name>` and `relay:<id>`. A `cloud:<name>`+Space registered before Cua Cloud ended still lists, answers that it has ended+on any action, and can be removed from the list.| Area | Commands || --- | --- |-| Roster | `list_spaces`, `space_info(spaceId)`, `add_space(url, token, name)`, `create_space({image, on, kind, runtime, name, …})`, `delete_space`, `remove_space`, `get_default_location`, `set_default_location(on)`, `keep_alive_space`; event `spaces:changed` |-| Status | `fleet_status`, `begin_sign_in`, `sign_out`, `daemon_status`, `ensure_daemon`, `local_status` |+| Roster | `list_spaces`, `space_info(spaceId)`, `add_space(url, token, name)`, `create_space({image, on, kind, runtime, name, …})`, `delete_space`, `remove_space`, `get_default_location`, `set_default_location(on)`; event `spaces:changed` |+| Status | `fleet_status` (who is signed in; reads the local session), `begin_sign_in`, `sign_out`, `daemon_status`, `ensure_daemon`, `local_status` || This machine | `host_status`, `host_setup`, `host_stop_sharing`, `host_start_sharing`, `host_remove`, `onboarding_state`, `complete_onboarding`, `installer_*` || Space ops | `space_screenshot`, `send_files_to_space`, `list_remote_windows`, `remote_window_thumbnail`, `space_app_icon`, `list_space_agents` |-| Streams | `open_space_stream(space, {kind: display|window}, opts)` → ticketed `wsUrl` (direct, or daemon media bridge), `close_space_stream` |+| Streams | `open_space_stream(space, {kind: display|window}, opts)` → ticketed `wsUrl` (the Space's own ticket URL), `close_space_stream` || Teleport an app | `teleport_catalog(spaceId?)`, `teleport_app_icon(path, size)`, `teleport_entry_for_path(path)`, `teleport_parse_drop(items)`, `teleport_plan(spaceId, entry, options)`, `teleport_run(spaceId, plan, consent, onEvent)`, `teleport_choose_files` → the SDK core (`cua_teleport::ux`, `cua_spaces::teleport_app`) || Session teleport | `teleport_manifest(app, scope)`, `teleport_push(app, scope, space, include, acknowledgeSensitive)` → cua-spaces `Approval` + `Space::teleport` (the transfer overlay's Retry) || Hotspot | `start_hotspot`, `stop_hotspot`, `hotspot_status`; event `hotspot:changed` |diff --git a/apps/cua-spaces/run-live.sh b/apps/cua-spaces/run-live.shindex b54ea4bfb7..b2daae2bab 100755--- a/apps/cua-spaces/run-live.sh+++ b/apps/cua-spaces/run-live.sh@@ -2,17 +2,15 @@# SPDX-License-Identifier: FSL-1.1-MIT# Copyright (c) 2026 Cua AI, Inc.-# Prepare a live Cua Spaces session: load Fleet credentials, make sure the-# shared `cua daemon` is running, then print (or, with --launch, run) the-# command that starts the app.+# Prepare a live Cua Spaces session: make sure the shared `cua daemon` is+# running, then print (or, with --launch, run) the command that starts the app.#-# ./run-live.sh # load ~/.env, start `cua daemon`, print the launch command+# ./run-live.sh # start `cua daemon`, print the launch command# ./run-live.sh --launch # ...and exec `pnpm tauri dev` (opens the app's windows)#-# Credentials come from ~/.env (CUA_CLIENT_ID / CUA_CLIENT_SECRET /-# CUA_TOKEN_URL / CUA_FLEET_BASE_URL, or FLEETS_TOKEN). They are exported into-# this process and the daemon; nothing here prints them. Without them the app-# still works with Local and "Add by address" Spaces.+# Local, "Add by address", relay and your own machines' Spaces need no+# credentials here: sign in from the app (Settings -> Account) or with+# `cua auth login`. Cua Cloud has ended.## The daemon is shared: the app, the `cua` CLI and `cua daemon mcp` (Claude,# Codex, OpenClaw) all see the same Spaces registry (~/.cua/spaces.json).@@ -26,20 +24,6 @@ REPO="$(cd "$HERE/../.." && pwd)"LAUNCH=0[ "${1:-}" = "--launch" ] && LAUNCH=1-if [ -f "$HOME/.env" ]; then- set -a- # shellcheck disable=SC1091- . "$HOME/.env"- set +a- if [ -n "${CUA_CLIENT_ID:-}${FLEETS_TOKEN:-}" ]; then- echo "==> Fleet credentials loaded from ~/.env (${CUA_FLEET_BASE_URL:-https://run.cua.ai})"- else- echo "==> ~/.env has no Fleet credentials; Cloud Spaces will be unavailable"- fi-else- echo "==> no ~/.env; Cloud Spaces will be unavailable (Local and Add-by-address still work)"-fi-# Resolve the cua CLI.cua_cmd=()if [ -n "${CUA_BIN:-}" ]; then@@ -69,7 +53,7 @@ The daemon is up. To start the app (this opens its windows on your desktop):cd $HERE && ./run-live.sh --launch-or, in a shell that already has the credentials exported:+or directly:cd $HERE && CUA_BIN=$CUA_BIN pnpm tauri devdiff --git a/apps/cua-spaces/src-tauri/Cargo.lock b/apps/cua-spaces/src-tauri/Cargo.lockindex 4789e62415..05356c205f 100644--- a/apps/cua-spaces/src-tauri/Cargo.lock+++ b/apps/cua-spaces/src-tauri/Cargo.lock@@ -1703,8 +1703,8 @@ dependencies = ["cua-agent-setup","cua-auth","cua-daemon",- "cua-fleet","cua-host",+ "cua-image","cua-keyvault","cua-proto","cua-sandbox-core",diff --git a/apps/cua-spaces/src-tauri/Cargo.toml b/apps/cua-spaces/src-tauri/Cargo.tomlindex 5694e7c31e..9238ce39d7 100644--- a/apps/cua-spaces/src-tauri/Cargo.toml+++ b/apps/cua-spaces/src-tauri/Cargo.toml@@ -56,7 +56,8 @@ cua-spaces = { path = "../../../libs/cua/crates/cua-spaces", default-features ="spaces-agents",] }cua-daemon = { path = "../../../libs/cua/crates/cua-daemon", default-features = false, features = ["client"] }-cua-fleet = { path = "../../../libs/cua/crates/cua-fleet" }+# The canonical image names ("Local" Spaces start from the canonical Linux image).+cua-image = { path = "../../../libs/cua/crates/cua-image" }# Cua Spaces extensions: teleport, the Cua Volume tools and persistent# agents over the Spaces runtime this app hosts.cua-spaces-ext = { path = "../../../libs/cua/crates/cua-spaces-ext" }@@ -85,8 +86,8 @@ cua-auth = { path = "../../../libs/cua/crates/cua-auth" }cua-telemetry = { path = "../../../libs/cua/crates/cua-telemetry" }tokio = { version = "1", features = ["net", "rt", "rt-multi-thread", "sync", "macros", "time", "process"] }# User "Sign in to Cua" device-authorization grant (src/auth.rs): the device-# and token endpoint calls. `async-trait` implements the Fleet SDK's-# `AccessTokenProvider` that drives Fleet from the user token.+# and token endpoint calls. `async-trait` serves the app's async host, device+# and account-token traits.reqwest = { version = "0.12", default-features = false, features = ["rustls-tls-native-roots"] }async-trait = "0.1"futures-util = { version = "0.3", default-features = false, features = ["std"] }@@ -151,7 +152,6 @@ libc = "0.2"tokio-tungstenite = { version = "0.29", default-features = false, features = ["connect", "handshake"] }sha2 = "0.10"cua-spacesd-client = { path = "../../../libs/cua/crates/cua-spacesd-client", features = ["testing"] }-cua-fleet = { path = "../../../libs/cua/crates/cua-fleet", features = ["testing"] }cua-host = { path = "../../../libs/cua/crates/cua-host", features = ["testing"] }# tests/keyvault.rs drives the daemon-hosted `teleport_app` seam# (`cua_spaces_ext::daemon::keyvault::McpSessionBroker`) against the kill switch.diff --git a/apps/cua-spaces/src-tauri/entitlements.plist b/apps/cua-spaces/src-tauri/entitlements.plistindex ee93ef3f57..c1142399d9 100644--- a/apps/cua-spaces/src-tauri/entitlements.plist+++ b/apps/cua-spaces/src-tauri/entitlements.plist@@ -8,7 +8,7 @@would let an attacker load an unsigned dylib on the app's dlopen/RPATH search pathinto a process that still passes the first-party code requirement, defeating the"hardened runtime means no injection" premise the caller-auth story rests on.- Dependencies that are not Cua-team-signed (the Fleet SDK dylib, the rcdp CLI) must+ Dependencies that are not Cua-team-signed (an SDK dylib, the rcdp CLI) mustbe run as separately-signed, team-validated components or out-of-process helpers,never dlopen'd into this vault-facing process. The Keyvault client lives in thedaemon, a separate process, not in this WKWebView host. -->diff --git a/apps/cua-spaces/src-tauri/src/auth.rs b/apps/cua-spaces/src-tauri/src/auth.rsindex fc1d4e2bf9..06cb84f127 100644--- a/apps/cua-spaces/src-tauri/src/auth.rs+++ b/apps/cua-spaces/src-tauri/src/auth.rs@@ -30,9 +30,10 @@ impl std::fmt::Display for TokenError {}}-/// The shared, refreshable user session. [`crate::core::AppTokens`] pulls-/// the Fleet bearer from this one handle; the store is shared with the CLI-/// and the daemon, so a sign-in or sign-out anywhere is seen everywhere.+/// The shared, refreshable user session. The relay account and this+/// device's enrollment draw their bearer from this one handle; the store is+/// shared with the CLI and the daemon, so a sign-in or sign-out anywhere is+/// seen everywhere.pub struct SessionHandle {session: cua_auth::Session,}diff --git a/apps/cua-spaces/src-tauri/src/commands.rs b/apps/cua-spaces/src-tauri/src/commands.rsindex b25f9cecc9..d5c43530f6 100644--- a/apps/cua-spaces/src-tauri/src/commands.rs+++ b/apps/cua-spaces/src-tauri/src/commands.rs@@ -14,7 +14,7 @@ use tauri::{AppHandle, Emitter, State};use crate::agents::SpaceAgentRun;use crate::core::{- AppCore, CmdResult, DaemonStatus, DefaultLocation, FleetStatus, HotspotStatus, LocalStatus,+ AccountStatus, AppCore, CmdResult, DaemonStatus, DefaultLocation, HotspotStatus, LocalStatus,RemoteWindow, SentFile, SpaceCreateConfig, SpaceRow, StreamOpts, StreamTargetArg,StreamTicketInfo, TeleportResult, TransferManifest,};@@ -33,12 +33,11 @@ fn hotspot_changed(app: &AppHandle, status: &HotspotStatus) {// ------------------------------------------------------------- account+/// Who is signed in. Named `fleet_status` for the web UI bridge that still+/// calls it; it reads the local session and makes no network call.#[tauri::command]-pub async fn fleet_status(- state: State<'_, AppState>,- probe: Option<bool>,-) -> CmdResult<FleetStatus> {- Ok(state.0.fleet_status(probe.unwrap_or(false)).await)+pub async fn fleet_status(state: State<'_, AppState>) -> CmdResult<AccountStatus> {+ Ok(state.0.account_status().await)}/// What `begin_sign_in` returns at once; approval arrives as an event.@@ -130,7 +129,7 @@ pub async fn ensure_daemon(state: State<'_, AppState>) -> CmdResult<DaemonStatusOk(state.0.daemon_status(true).await)}-/// This account's Cua Cloud rates, when known (the wizard's estimate).+/// Always `None`: Cua Cloud has ended, so there are no rates to estimate with.#[tauri::command]pub async fn cloud_pricing(state: State<'_, AppState>,@@ -138,7 +137,7 @@ pub async fn cloud_pricing(Ok(state.0.cloud_pricing().await)}-/// The account's Cua Cloud billing (Settings' Billing row).+/// Always `None`: Cua Cloud has ended, so Settings has no Billing row.#[tauri::command]pub async fn billing_status(state: State<'_, AppState>,@@ -341,15 +340,6 @@ pub async fn remove_space(r}-#[tauri::command]-pub async fn keep_alive_space(- state: State<'_, AppState>,- space_id: String,- seconds: u64,-) -> CmdResult<()> {- state.0.keep_alive_space(&space_id, seconds).await-}-// ----------------------------------------------------------- space ops#[tauri::command]diff --git a/apps/cua-spaces/src-tauri/src/core.rs b/apps/cua-spaces/src-tauri/src/core.rsindex 6239357eaf..ee3ffadfb8 100644--- a/apps/cua-spaces/src-tauri/src/core.rs+++ b/apps/cua-spaces/src-tauri/src/core.rs@@ -11,14 +11,13 @@//! `~/.cua/spaces.json` (shared with `cua daemon`, the `cua` CLI and//! `cua daemon mcp`), and the primitives (files, streams, teleport,//! hotspot, agents) are SDK calls. No ssh, no rcdp CLI, no Python.-//! - Fleet is one `cua_fleet::FleetClient` whose bearer comes from the-//! signed-in user when there is one and from the environment-//! credentials otherwise ([`AppTokens`]).-//! - `cua daemon` is connected (or started) for what a webview cannot do by-//! itself: attaching to a Fleet Space's media socket, which needs gateway-//! headers. The daemon's `OpenMediaBridge` hands back a loopback ticket-//! URL instead. Direct and local Spaces need no bridge: their media-//! tickets are safe in a URL.+//! - The signed-in user ([`SessionHandle`], the device-authorization grant)+//! drives the relay account and this device's enrollment. There is no+//! other credential source: Cua Cloud has ended, so the app builds no+//! Fleet client and calls no Cua Cloud API.+//! - `cua daemon` is connected (or started) so CLI and MCP clients share+//! Spaces with the app. Every Space's media tickets are safe in a URL, so+//! the webview attaches to them directly.use std::path::{Path, PathBuf};use std::sync::atomic::{AtomicBool, Ordering};@@ -27,8 +26,6 @@ use std::time::Duration;use base64::Engine;use cua_daemon::client::{DaemonAddress, DaemonClient};-use cua_fleet::sdk::{AccessTokenProvider, AccessTokenProviderError};-use cua_fleet::{FleetClient, FleetConfig};use cua_sandbox_core::placement::{Kind, On, Runtime};use cua_sandbox_core::settings::{Settings, Source};use cua_sandbox_core::LocalRuntime;@@ -43,7 +40,7 @@ use cua_spaces_ext::teleport_app::{SpaceAppTeleport as _, SpaceAppTeleportFactsuse cua_spacesd_client::pb;use serde::{Deserialize, Serialize};-use crate::auth::{Credentials, SessionHandle, Store, TokenError};+use crate::auth::{Credentials, SessionHandle, Store};/// Result type of every command: the error is the user-facing message.pub type CmdResult<T> = Result<T, String>;@@ -78,7 +75,7 @@ const DAEMON_START_BUDGET: Duration = Duration::from_secs(20);/// How the app reaches `cua daemon`.#[derive(Clone, Debug)]pub enum DaemonMode {- /// Never talk to a daemon (tests; Fleet streams then fail clearly).+ /// Never talk to a daemon (tests).Disabled,/// Connect through `<home>/daemon.json`; when nothing answers and/// `cua_bin` is set, run `<cua_bin> daemon start` once.@@ -93,12 +90,6 @@ pub enum DaemonMode {pub struct CoreConfig {/// `~/.cua` (or `$CUA_HOME`): registry, daemon discovery, control file.pub home: PathBuf,- /// Fleet endpoint and environment credentials.- pub fleet: FleetConfig,- /// A ready Fleet client (tests: `FakeFleet`). Replaces [`AppTokens`].- pub fleet_client: Option<FleetClient>,- /// Fleet namespace for claimed Spaces; `None` derives one.- pub fleet_namespace: Option<String>,/// Where the signed-in user's session is persisted.pub token_store: Store,/// Local runtime (`cua-vmm`: containers, gVisor, QEMU, Lume).@@ -144,6 +135,12 @@ pub fn cua_home() -> PathBuf {cua_daemon::cua_home()}+/// The canonical Linux image (`CUA_IMAGE_LINUX` overrides it).+fn canonical_linux_image() -> String {+ use cua_image::canonical::{canonical_for, canonical_image, CanonicalOs};+ canonical_image("linux", None).unwrap_or_else(|_| canonical_for(CanonicalOs::Linux, None))+}+/// The `cua` binary: `$CUA_BIN`, a `cua` next to the app executable/// (bundled sidecar), then `cua` on `PATH`.pub fn find_cua_bin() -> Option<PathBuf> {@@ -168,13 +165,10 @@ pub fn find_cua_bin() -> Option<PathBuf> {}impl CoreConfig {- /// The app's configuration: real host, environment credentials.+ /// The app's configuration: real host, the signed-in user's session.pub fn from_env() -> Self {let home = cua_home();Self {- fleet: FleetConfig::from_env(),- fleet_client: None,- fleet_namespace: non_empty_env("CUA_SPACES_NAMESPACE"),// The credential store shared with the cua CLI and daemon; the// app's former session file moves into it.token_store: {@@ -196,7 +190,7 @@ impl CoreConfig {// The canonical Linux image (`CUA_IMAGE_LINUX` overrides it); kind// `auto` picks its container rootfs variant.local_container_image: non_empty_env("CUA_SPACES_LOCAL_IMAGE")- .unwrap_or_else(|| cua_fleet::canonical_image("linux")),+ .unwrap_or_else(canonical_linux_image),local_macos_image: non_empty_env("CUA_SPACES_MACOS_IMAGE").or_else(|| non_empty_env("CUA_LUME_GOLDEN_IMAGE")).map(|i| {@@ -213,14 +207,11 @@ impl CoreConfig {}}- /// A hermetic configuration rooted at `home`: no Fleet credentials, no+ /// A hermetic configuration rooted at `home`: no signed-in user, no/// local runtime, no daemon, fake teleport host. Tests adjust from here.pub fn hermetic(home: &Path) -> Self {Self {home: home.to_path_buf(),- fleet: FleetConfig::default(),- fleet_client: None,- fleet_namespace: Some("cua-e2e-app".into()),token_store: Store::File(home.join("no-user-session.json")),local_runtime: None,state_dir: Some(home.join("sandboxes")),@@ -240,79 +231,30 @@ impl CoreConfig {}}-// ----------------------------------------------------------- Fleet tokens--/// Fleet bearer source: the signed-in user's token (refreshed as needed),-/// else the environment credentials, else a clear "sign in" error.-pub struct AppTokens {- session: Arc<SessionHandle>,- signed_in: Arc<AtomicBool>,- env: Option<FleetClient>,-}--#[async_trait::async_trait]-impl AccessTokenProvider for AppTokens {- async fn get_access_token(&self, force: bool) -> Result<String, AccessTokenProviderError> {- if self.signed_in.load(Ordering::Relaxed) {- match self.session.get_valid_token(force).await {- Ok(token) => return Ok(token),- Err(TokenError::NoSession) => self.signed_in.store(false, Ordering::Relaxed),- Err(TokenError::Refresh(reason)) => {- tracing::warn!("user session refresh failed, falling back: {reason}");- self.signed_in.store(false, Ordering::Relaxed);- }- }- }- match &self.env {- Some(client) => {- client- .access_token(force)- .await- .map_err(|e| AccessTokenProviderError::Failed {- reason: e.to_string(),- })- }- None => Err(AccessTokenProviderError::Failed {- reason: "Cua Cloud is not configured: sign in to Cua (or run `cua auth login`), \- or set CUA_CLIENT_ID and CUA_CLIENT_SECRET (or FLEETS_TOKEN)"- .into(),- }),- }- }-}-// ------------------------------------------------------------- wire types-/// How the Fleet bearer is obtained (Settings shows it).+/// Whether a user is signed in (Settings and the sidebar show the account).#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize)]#[serde(rename_all = "kebab-case")]pub enum AuthMode {- /// A signed-in user's device-grant token.+ /// A signed-in user's device-grant session.User,- /// `CUA_CLIENT_ID` + `CUA_CLIENT_SECRET`.- ClientCredentials,- /// `FLEETS_TOKEN`.- StaticToken,- /// Nothing.+ /// Nobody is signed in.None,}-/// `fleet_status`.+/// `fleet_status`: the signed-in account. The command keeps its name for+/// the web UI bridge that still calls it; it reads the local session and+/// makes no network call.#[derive(Clone, Debug, Serialize)]#[serde(rename_all = "camelCase")]-pub struct FleetStatus {+pub struct AccountStatus {+ /// A user is signed in.pub configured: bool,pub auth_mode: AuthMode,- pub base_url: String,- pub token_url: String,- #[serde(skip_serializing_if = "Option::is_none")]- pub client_id: Option<String>,+ /// The signed-in user (email or subject), when the session names one.#[serde(skip_serializing_if = "Option::is_none")]pub identity: Option<String>,- #[serde(skip_serializing_if = "Option::is_none")]- pub namespaces: Option<Vec<String>>,- #[serde(skip_serializing_if = "Option::is_none")]- pub probe_error: Option<String>,}/// `daemon_status` / `ensure_daemon`.@@ -507,17 +449,18 @@ impl SpaceRow {#[serde(rename_all = "camelCase")]pub struct SpaceCreateConfig {pub image: Option<String>,- /// `local` or `cloud`.+ /// `local`, or a machine or cloud of your own (`aws`, `gcp`, `modal`).+ /// `cloud` (Cua Cloud) has ended and fails with the SDK's message.pub on: Option<String>,/// `auto`, `container` or `vm`.pub kind: Option<String>,/// `auto`, or an engine the location offers (local: gvisor, runc, qemu,- /// lume; cloud: gvisor, kubevirt).+ /// lume).pub runtime: Option<String>,pub name: Option<String>,- /// vCPUs (local and Cua Cloud, within `cua_fleet::FLEET_ABSOLUTE_CPUS`).+ /// vCPUs.pub cpus: Option<u32>,- /// Memory MB (local and Cua Cloud, within `cua_fleet::FLEET_ABSOLUTE_MEMORY_MB`).+ /// Memory MB.pub memory_mb: Option<u64>,/// Local VMs only: grow the disk to this many GB.pub disk_gb: Option<u32>,@@ -658,7 +601,8 @@ pub struct StreamTicketInfo {pub codec: String,pub wire_version: u32,pub frame_size: [u32; 2],- /// `direct` (spacesd ticket URL) or `daemon` (loopback bridge).+ /// Always `direct`: the spacesd ticket URL, safe in a URL. (`daemon`+ /// named the loopback bridge Cua Cloud streams needed.)pub via: &'static str,pub audio: bool,}@@ -791,11 +735,8 @@ pub struct HotspotStatus {/// The app's SDK state. Cheap to share (`Arc<AppCore>`).pub struct AppCore {home: PathBuf,- fleet_config: FleetConfig,- fleet_client: Option<FleetClient>,session: Arc<SessionHandle>,signed_in: Arc<AtomicBool>,- env_auth: bool,spaces: RwLock<Spaces>,app_sessions: Arc<AppSessions>,teleport_app_roots: Option<Vec<PathBuf>>,@@ -819,7 +760,6 @@ struct SpacesParts {operator_display: Option<Arc<dyn OperatorDisplay>>,download_dir: Option<PathBuf>,probe_timeout: Duration,- fleet_namespace: Option<String>,relay: Option<cua_spaces::RelayAccount>,/// Where this device's relay key lives (the session's vault).device_keys: Store,@@ -831,34 +771,12 @@ impl AppCore {let device_keys = cfg.token_store.clone();let (session, restored) = SessionHandle::new(cfg.token_store);let signed_in = Arc::new(AtomicBool::new(restored));- let env_auth = cfg.fleet.has_auth();- let fleet_client = match cfg.fleet_client {- Some(c) => Some(c),- None => {- let env = if env_auth {- FleetClient::connect(cfg.fleet.clone())- .map_err(|e| tracing::warn!("Fleet credentials rejected: {e}"))- .ok()- } else {- None- };- let tokens = Arc::new(AppTokens {- session: session.clone(),- signed_in: signed_in.clone(),- env,- });- FleetClient::connect_with_token_provider(cfg.fleet.clone(), tokens, None)- .map_err(|e| tracing::warn!("Fleet client: {e}"))- .ok()- }- };let rebuild = SpacesParts {local_runtime: cfg.local_runtime,state_dir: cfg.state_dir,operator_display: cfg.operator_display,download_dir: cfg.download_dir,probe_timeout: cfg.probe_timeout,- fleet_namespace: cfg.fleet_namespace,relay: cfg.relay,device_keys,};@@ -866,11 +784,8 @@ impl AppCore {has_local: rebuild.local_runtime.is_some(),spaces: RwLock::new(Spaces::builder().build()),home: cfg.home,- fleet_config: cfg.fleet,- fleet_client,session,signed_in,- env_auth,app_sessions: cfg.app_sessions,teleport_app_roots: cfg.teleport_app_roots,teleport_recents: cfg.teleport_recents,@@ -882,12 +797,12 @@ impl AppCore {rebuild,device: Mutex::new(None),};- let spaces = core.build_spaces(None);+ let spaces = core.build_spaces();*core.spaces.write().unwrap_or_else(|p| p.into_inner()) = spaces;Arc::new(core)}- fn build_spaces(&self, identity: Option<&str>) -> Spaces {+ fn build_spaces(&self) -> Spaces {let p = &self.rebuild;// The Cua Spaces extensions: teleport over this app's providers, the// Cua Volume tools and persistent agents over the local drive.@@ -899,10 +814,6 @@ impl AppCore {Some(self.app_sessions.clone()),);let mut sandboxes = cua_sandbox_core::Sandboxes::builder();- if let Some(f) = &self.fleet_client {- b = b.fleet(f.clone());- sandboxes = sandboxes.fleet(f.clone());- }if let Some(l) = &p.local_runtime {b = b.local_runtime(l.clone());sandboxes = sandboxes.local(l.clone());@@ -911,15 +822,6 @@ impl AppCore {sandboxes = sandboxes.state_dir(d);}b = b.sandboxes(sandboxes.build());- let ns = p.fleet_namespace.clone().or_else(|| {- identity- .map(cua_spaces::sanitize_label)- .filter(|l| !l.is_empty())- .map(|l| cua_spaces::sanitize_label(&format!("cua-spaces-{l}")))- });- if let Some(ns) = ns {- b = b.fleet_namespace(ns);- }if let Some(d) = &p.operator_display {b = b.operator_display(d.clone());} else {@@ -1003,61 +905,38 @@ impl AppCore {&self.home}- /// Rebuilds the Spaces handle after the Fleet identity changed (the- /// namespace follows the signed-in account). Hotspots stop.+ /// Rebuilds the Spaces handle after the signed-in identity changed (the+ /// relay account follows it). Hotspots stop.async fn identity_changed(&self) {let old = self.spaces();let _ = old.hotspot_stop(None).await;*self.hotspot.lock().unwrap_or_else(|p| p.into_inner()) = None;// A new identity gets a fresh device session.*self.device.lock().unwrap_or_else(|p| p.into_inner()) = None;- let identity = self.session.identity().await;- let fresh = self.build_spaces(identity.as_deref());+ let fresh = self.build_spaces();*self.spaces.write().unwrap_or_else(|p| p.into_inner()) = fresh;}// --------------------------------------------------------- account- fn auth_mode(&self) -> AuthMode {- if self.signed_in.load(Ordering::Relaxed) {- AuthMode::User- } else if self.fleet_config.fleet_token.is_some() {- AuthMode::StaticToken- } else if self.env_auth {- AuthMode::ClientCredentials- } else {- AuthMode::None- }- }-- /// `fleet_status`.- pub async fn fleet_status(&self, probe: bool) -> FleetStatus {- let mode = self.auth_mode();- let identity = if mode == AuthMode::User {+ /// `fleet_status`: who is signed in. Reads the local session; no+ /// network call.+ pub async fn account_status(&self) -> AccountStatus {+ let signed_in = self.signed_in.load(Ordering::Relaxed);+ let identity = if signed_in {self.session.identity().await} else {None};- let mut status = FleetStatus {- configured: mode != AuthMode::None,- auth_mode: mode,- base_url: self.fleet_config.base_url.clone(),- token_url: self.fleet_config.token_url.clone(),- client_id: self.fleet_config.client_id.clone(),+ AccountStatus {+ configured: signed_in,+ auth_mode: if signed_in {+ AuthMode::User+ } else {+ AuthMode::None+ },identity,- namespaces: None,- probe_error: None,- };- if probe && status.configured {- match &self.fleet_client {- Some(f) => match f.sdk().list_namespaces().await {- Ok(ns) => status.namespaces = Some(ns.into_iter().map(|n| n.name).collect()),- Err(e) => status.probe_error = Some(e.to_string()),- },- None => status.probe_error = Some("no Fleet client".into()),- }}- status}/// The shared user session (device-grant sign-in drives it).@@ -1073,7 +952,7 @@ impl AppCore {Ok(identity)}- /// Signs out; environment credentials resume.+ /// Signs out.pub async fn sign_out(&self) {self.session.clear().await;self.signed_in.store(false, Ordering::Relaxed);@@ -1186,15 +1065,14 @@ impl AppCore {// ----------------------------------------------------------- cloud/// `cloud_pricing`: always `None` (no estimate). The rates came from the- /// retired Fleets API (run.cua.ai), and the app does not offer new cloud+ /// Cua Cloud API, which has ended, and the app does not offer new cloud/// Spaces.pub async fn cloud_pricing(&self) -> Option<cua_spaces_app_core::wizard::CloudPricing> {None}- /// `billing_status`: always `None`. The Fleets billing API- /// (`GET /api/billing/status` on run.cua.ai) is retired, so the app no- /// longer calls it and Settings hides the Billing row.+ /// `billing_status`: always `None`. The Cua Cloud billing API has ended,+ /// so the app no longer calls it and Settings hides the Billing row.pub async fn billing_status(&self,) -> CmdResult<Option<cua_spaces_app_core::billing::BillingStatus>> {@@ -1444,9 +1322,9 @@ impl AppCore {.collect()}- /// Deletes a Space the app created (cloud: the sandbox is deleted and- /// metering stops; local: the instance is deleted). A Space added by- /// address is only forgotten.+ /// Deletes a Space the app created (its instance is deleted). A Space+ /// added by address is only forgotten; a legacy Cua Cloud Space answers+ /// the ended message (use [`Self::remove_space`] to drop it).pub async fn delete_space(&self, space: &str) -> CmdResult<String> {let spaces = self.spaces();let id = spaces.resolve(space).map_err(msg)?.to_string();@@ -1479,37 +1357,6 @@ impl AppCore {spaces.remove(&id).await.map(drop).map_err(msg)}- /// Extends a Fleet Space's lease.- pub async fn keep_alive_space(&self, space: &str, seconds: u64) -> CmdResult<()> {- let spaces = self.spaces();- match spaces.resolve(space).map_err(msg)? {- cua_spaces::SpaceId::Cloud { name, namespace } => {- let fleet = self- .fleet_client- .as_ref()- .ok_or("Fleet is not configured")?;- // `cloud:<name>` carries no namespace: find the claim.- let namespace = match namespace {- Some(ns) => ns,- None => fleet- .find_claims(&name)- .await- .map_err(msg)?- .into_iter()- .next()- .map(|c| c.metadata.namespace)- .ok_or_else(|| format!("cloud:{name} not found"))?,- };- fleet- .keep_alive(&namespace, &name, Duration::from_secs(seconds))- .await- .map(drop)- .map_err(msg)- }- other => Err(format!("{other} has no lease to extend")),- }- }-async fn space(&self, space: &str) -> CmdResult<Space> {self.spaces().space(space).await.map_err(msg)}@@ -1773,19 +1620,6 @@ impl AppCore {let s = self.space(space).await?;let req = open_media_request(&s, &target, &opts)?;let audio = req.audio.is_some();- if s.provider() == Provider::Cloud {- // The Fleet gateway needs a bearer + claim header on the media- // socket, which a webview cannot send: bridge through the daemon.- let daemon = self.daemon(true).await?;- let json = serde_json::to_string(&req).map_err(msg)?;- let r = daemon- .open_media_bridge(&s.id().to_string(), Some(json))- .await- .map_err(|e| format!("cua daemon media bridge: {e}"))?;- let raw: pb::OpenMediaResponse =- serde_json::from_str(&r.open_media_response_json).map_err(msg)?;- return Ok(ticket_info(&s, raw, r.ws_url, r.ticket, "daemon", audio));- }let raw = s.spacesd().map_err(msg)?@@ -1801,7 +1635,7 @@ impl AppCore {};let ws_url = s.websocket_url(&ws_path).map_err(msg)?;let ticket = raw.ticket.clone();- Ok(ticket_info(&s, raw, ws_url, ticket, "direct", audio))+ Ok(ticket_info(&s, raw, ws_url, ticket, audio))}/// `CloseMedia`.@@ -2134,7 +1968,6 @@ fn ticket_info(raw: pb::OpenMediaResponse,ws_url: String,ticket: String,- via: &'static str,audio: bool,) -> StreamTicketInfo {let size = raw@@ -2155,7 +1988,7 @@ fn ticket_info(codec: codec_name(raw.codec),wire_version: raw.wire_version,frame_size: size,- via,+ via: "direct",audio,}}diff --git a/apps/cua-spaces/src-tauri/src/lib.rs b/apps/cua-spaces/src-tauri/src/lib.rsindex 9addd60962..8703bb0a3c 100644--- a/apps/cua-spaces/src-tauri/src/lib.rs+++ b/apps/cua-spaces/src-tauri/src/lib.rs@@ -10,8 +10,7 @@//! Beyond the portal window, the shell hosts the cua SDK: [`core`] links//! `cua-spaces` in-process (the shared `~/.cua` Spaces registry, streams,//! files, teleport, hotspot, agents) and connects to or starts `cua daemon`-//! (the webview media bridge for Fleet Spaces, and the process CLI / MCP-//! clients share Spaces through). [`commands`] are thin Tauri wrappers over+//! (the process CLI / MCP clients share Spaces through). [`commands`] are thin Tauri wrappers over//! it; [`viewer_windows`], [`window_drag`] and the notch stay app UI, and//! [`control`] lets `cua daemon mcp` ask the app to present a Space.@@ -463,7 +462,6 @@ pub fn run() {commands::get_default_location,commands::set_default_location,commands::remove_space,- commands::keep_alive_space,commands::space_screenshot,commands::send_files_to_space,commands::list_remote_windows,@@ -663,8 +661,7 @@ pub fn run() {control::spawn(app.handle().clone(), core.clone());// Connect to (or start) `cua daemon` in the background, so CLI and- // MCP clients share Spaces with the app and Fleet streams have- // their media bridge. Failure only disables Fleet streaming.+ // MCP clients share Spaces with the app. A failure is only logged.{let core = core.clone();tauri::async_runtime::spawn(async move {diff --git a/apps/cua-spaces/src-tauri/src/presence.rs b/apps/cua-spaces/src-tauri/src/presence.rsindex 091c228c15..346ea27f88 100644--- a/apps/cua-spaces/src-tauri/src/presence.rs+++ b/apps/cua-spaces/src-tauri/src/presence.rs@@ -245,8 +245,8 @@ pub async fn presence_join(sessions: State<'_, Arc<PresenceSessions>>,space_id: String,) -> CmdResult<JoinInfo> {- // The account's claims only while signed in as a user (not an API key).- let signed_in = state.0.fleet_status(false).await.identity.is_some();+ // The account's claims only while a user is signed in.+ let signed_in = state.0.account_status().await.identity.is_some();let account = signed_in.then(|| state.0.session().profile()).flatten();let os_user = std::env::var("USER").ok();let space = statediff --git a/apps/cua-spaces/src-tauri/tests/commands.rs b/apps/cua-spaces/src-tauri/tests/commands.rsindex c1e6ab95e0..6d584821aa 100644--- a/apps/cua-spaces/src-tauri/tests/commands.rs+++ b/apps/cua-spaces/src-tauri/tests/commands.rs@@ -3,19 +3,18 @@//! The app's command layer (`cua_spaces_lib::core::AppCore`, which every//! Tauri command calls) against SDK fakes: `cua_spacesd_client::testing::MockServer`-//! as a Space's spacesd, `cua_fleet::testing::FakeFleet` as Fleet, and-//! a fake local runtime. Hermetic: temp `~/.cua`, no daemon, no GUI, a-//! `FakeHost` teleport sender, no real user profile or keychain.+//! as a Space's spacesd and a fake local runtime. Hermetic: temp `~/.cua`,+//! no daemon, no GUI, a `FakeHost` teleport sender, no real user profile or+//! keychain.use async_trait::async_trait;-use cua_fleet::testing::FakeFleet;use cua_sandbox_core::{InstanceStatus, LocalEndpoints, LocalInstance, LocalRuntime, LocalStartSpec, LocalSummary,RuntimeError, CLOUD_ENDED,};use cua_spaces::Provider;use cua_spaces_lib::core::{AppCore, CoreConfig, SpaceCreateConfig, StreamOpts, StreamTargetArg};-use cua_spacesd_client::testing::{MockAuth, MockGateway, MockServer};+use cua_spacesd_client::testing::{MockAuth, MockServer};use std::collections::BTreeMap;use std::sync::{Arc, Mutex};use std::time::{Duration, Instant};@@ -272,82 +271,12 @@ async fn an_unreachable_space_is_listed_within_the_probe_bound() {assert_eq!(rows[0].os_pretty_name, row.os_pretty_name);}-#[tokio::test]-#[ignore = "Cua Cloud has ended (CUA-1854); removed with the Fleet provider"]-async fn cloud_spaces_bind_through_the_gateway_and_delete_removes_the_sandbox() {- let home = tempfile::tempdir().unwrap();- let fake = FakeFleet::new();- // The pool name is derived from namespace + runtime + image; compute it- // with a probe core, then emulate the gateway for that sandbox.- let probe = {- let mut c = CoreConfig::hermetic(home.path());- c.fleet_client = Some(fake.client());- AppCore::new(c)- };- let pool = probe- .spaces()- .fleet_pool_name(cua_spaces::contract::inputs::FleetRuntime::Kubevirt, IMAGE);- let srv = MockServer::start(MockAuth {- token: None,- gateway: Some(MockGateway {- prefix: format!("/api/svc/{pool}/sbx-cua-e2e-app-claim-env"),- bearer: "fake-fleet-token".into(),- claim: "cua-e2e-app-claim".into(),- }),- prefix: None,- })- .await;- let mut c = CoreConfig::hermetic(home.path());- c.fleet_client = Some(fake.client_with_base(&srv.url()));- let app = AppCore::new(c);-- let row = app- .create_space(SpaceCreateConfig {- on: Some("cloud".into()),- image: Some(IMAGE.into()),- runtime: Some("kubevirt".into()),- name: Some("cua-e2e-app-claim".into()),- ..Default::default()- })- .await- .unwrap();- assert_eq!(row.id, "cloud:cua-e2e-app-claim");- assert_eq!(row.provider, Provider::Cloud);- assert!(row.reachable);-- // Fleet media needs gateway headers: without a daemon the app says so- // instead of handing the webview a URL it cannot open.- srv.state.advertise(&["desktop_stream"]);- let app2 = {- let mut c = CoreConfig::hermetic(home.path());- c.fleet_client = Some(fake.client_with_base(&srv.url()));- AppCore::new(c)- };- let e = app2- .open_stream(- &row.id,- StreamTargetArg::Display { display_id: None },- StreamOpts::default(),- )- .await- .unwrap_err();- assert!(e.contains("daemon"), "{e}");-- let msg = app.delete_space(&row.id).await.unwrap();- assert!(msg.to_lowercase().contains("deleted"), "{msg}");- assert!(!fake.exists("claim", &pool, "cua-e2e-app-claim"));- assert!(app.list_spaces().await.unwrap().is_empty());-}-#[tokio::test]async fn runtime_image_pairing_errors_come_from_the_sdk() {let home = tempfile::tempdir().unwrap();- let fake = FakeFleet::new();- let mut c = CoreConfig::hermetic(home.path());- c.fleet_client = Some(fake.client());- let app = AppCore::new(c);+ let app = core(home.path());// Cua Cloud has ended: a cloud create fails with the one message, before- // any pairing check and before any Fleet request, whatever the runtime.+ // any pairing check, whatever the runtime.for runtime in [Some("gvisor"), Some("firecracker"), Some("qemu"), None] {let e = app.create_space(SpaceCreateConfig {@@ -360,7 +289,6 @@ async fn runtime_image_pairing_errors_come_from_the_sdk() {.unwrap_err();assert_eq!(e, CLOUD_ENDED, "{runtime:?}: {e}");}- assert!(fake.requests().is_empty(), "refused before any request");// A kind that contradicts the runtime is refused locally too.let e = app.create_space(SpaceCreateConfig {@@ -372,15 +300,15 @@ async fn runtime_image_pairing_errors_come_from_the_sdk() {.await.unwrap_err();assert!(e.contains("qemu"), "{e}");- assert!(fake.requests().is_empty(), "refused before any request");}#[tokio::test]async fn cloud_creates_fail_because_cua_cloud_has_ended() {let home = tempfile::tempdir().unwrap();let app = core(home.path());- let status = app.fleet_status(false).await;+ let status = app.account_status().await;assert!(!status.configured);+ assert!(status.identity.is_none());// Signed in or not, a cloud create says the same thing: Cua Cloud has// ended, with no "sign in" way out.let e = app@@ -398,6 +326,50 @@ async fn cloud_creates_fail_because_cua_cloud_has_ended() {assert!(!e.to_lowercase().contains("claim"), "{e}");}+/// A `cloud:` Space registered before Cua Cloud ended stays in the roster.+/// Every action on it answers the one ended message, with no Fleet client+/// and no network call, and "Remove from List" still forgets it.+#[tokio::test]+async fn a_legacy_cloud_space_is_listed_answers_the_ended_message_and_can_be_removed() {+ let home = tempfile::tempdir().unwrap();+ std::fs::write(+ home.path().join("spaces.json"),+ serde_json::to_vec(&serde_json::json!([+ {"id": "cloud:old-claim", "name": "Old cloud Space"},+ ]))+ .unwrap(),+ )+ .unwrap();+ let app = core(home.path());++ let rows = app.list_spaces().await.unwrap();+ assert_eq!(rows.len(), 1);+ assert_eq!(rows[0].id, "cloud:old-claim");+ assert_eq!(rows[0].provider, Provider::Cloud);+ assert!(!rows[0].reachable);+ assert_eq!(rows[0].error.as_deref(), Some(CLOUD_ENDED));++ let e = app+ .space_screenshot("cloud:old-claim", None)+ .await+ .unwrap_err();+ assert_eq!(e, CLOUD_ENDED, "{e}");+ let e = app+ .open_stream(+ "cloud:old-claim",+ StreamTargetArg::Display { display_id: None },+ StreamOpts::default(),+ )+ .await+ .unwrap_err();+ assert_eq!(e, CLOUD_ENDED, "{e}");+ let e = app.delete_space("cloud:old-claim").await.unwrap_err();+ assert_eq!(e, CLOUD_ENDED, "{e}");++ app.remove_space("cloud:old-claim").await.unwrap();+ assert!(app.list_spaces().await.unwrap().is_empty());+}+#[tokio::test]async fn default_location_is_stored_in_the_cua_home_config() {let home = tempfile::tempdir().unwrap();diff --git a/apps/cua-spaces/src-tauri/tests/live_create.rs b/apps/cua-spaces/src-tauri/tests/live_create.rsindex 90e8a6e0e1..86a7cc8065 100644--- a/apps/cua-spaces/src-tauri/tests/live_create.rs+++ b/apps/cua-spaces/src-tauri/tests/live_create.rs@@ -93,11 +93,8 @@ async fn wizard_plan_creates_a_real_local_space() {/// with `docker rm -f cua-e2e-wizard-keep`.////// Optional: `CUA_SPACES_APP_E2E_KEEP_IMAGE` replaces the wizard's image (a-/// local candidate build, say); `CUA_SPACES_APP_E2E_KEEP_ON=cloud` sends the-/// wizard's Cua Cloud plan instead (Fleet credentials from the environment,-/// namespace `cua-e2e-app`, so launch the app with-/// `CUA_SPACES_NAMESPACE=cua-e2e-app`); `CUA_SPACES_APP_E2E_KEEP_NAME` must-/// start with `cua-e2e-`.+/// local candidate build, say); `CUA_SPACES_APP_E2E_KEEP_NAME` must start+/// with `cua-e2e-`.#[tokio::test(flavor = "multi_thread", worker_threads = 2)]async fn wizard_plan_creates_a_space_kept_for_capture() {let Some(dir) = std::env::var("CUA_SPACES_APP_E2E_KEEP_HOME")@@ -113,7 +110,6 @@ async fn wizard_plan_creates_a_space_kept_for_capture() {name.starts_with("cua-e2e-"),"capture Spaces are named cua-e2e-*");- let cloud = env("CUA_SPACES_APP_E2E_KEEP_ON").as_deref() == Some("cloud");let home = std::path::PathBuf::from(dir);let mut cfg = CoreConfig::hermetic(&home);cfg.state_dir = None;@@ -121,16 +117,7 @@ async fn wizard_plan_creates_a_space_kept_for_capture() {if let Some(image) = env("CUA_SPACES_APP_E2E_KEEP_IMAGE") {plan.image = Some(image);}- if cloud {- // What the wizard sends for Cua Cloud: no cores or memory.- cfg.fleet = cua_fleet::FleetConfig::from_env();- assert!(cfg.fleet.has_auth(), "Cua Cloud needs Fleet credentials");- plan.on = Some("cloud".into());- plan.cpus = None;- plan.memory_mb = None;- } else {- cfg.local_runtime = Some(Arc::new(cua_daemon::local::VmmLocal::default()));- }+ cfg.local_runtime = Some(Arc::new(cua_daemon::local::VmmLocal::default()));let core = AppCore::new(cfg);let row = tokio::time::timeout(Duration::from_secs(900), core.create_space(plan)).awaitdiff --git a/apps/cua-spaces/src-tauri/tests/live_docker.rs b/apps/cua-spaces/src-tauri/tests/live_docker.rsindex 3421f75e3d..7c93be7591 100644--- a/apps/cua-spaces/src-tauri/tests/live_docker.rs+++ b/apps/cua-spaces/src-tauri/tests/live_docker.rs@@ -210,8 +210,8 @@ async fn live_add_send_stream_teleport_delete() {.await.unwrap();- // 4b. The daemon media bridge (what Fleet Spaces use): register this- // Space with the daemon and attach through its loopback ticket URL.+ // 4b. The daemon media bridge: register this Space with the daemon and+ // attach through its loopback ticket URL.let daemon = app.daemon(false).await.unwrap();let name = "cua-e2e-app-direct";daemondiff --git a/apps/cua-spaces/src/App.createDrop.test.tsx b/apps/cua-spaces/src/App.createDrop.test.tsxindex b51413f0f1..1a4e8379bc 100644--- a/apps/cua-spaces/src/App.createDrop.test.tsx+++ b/apps/cua-spaces/src/App.createDrop.test.tsx@@ -103,12 +103,7 @@ function fakeFleet(let created = false;return fakeFleetBridge({isNative: true,- status: async () => ({- configured: true,- authMode: "static-token",- baseUrl: "https://run.cua.ai",- tokenUrl: "",- }),+ status: async () => ({ configured: true, authMode: "user", identity: "[email protected]" }),listSpaces: async () => (created ? [NEW_SPACE] : []),defaultLocation,createSpace: async (config, pendingId) => {diff --git a/apps/cua-spaces/src/components/RadialProgress.tsx b/apps/cua-spaces/src/components/RadialProgress.tsxindex 9ddedc3932..e769350a4c 100644--- a/apps/cua-spaces/src/components/RadialProgress.tsx+++ b/apps/cua-spaces/src/components/RadialProgress.tsx@@ -24,8 +24,9 @@ export function RadialProgress({/** A real 0–1 progress (e.g. bytes sent/total). When set, the pie shows it* directly instead of the time-based estimate. */fraction?: number;- /** Rough time to ~80% for the time-based estimate. Default ~80s (Fleet bind- * time); a Local Lume Space is much faster (~17s to running). */+ /** Rough time to ~80% for the time-based estimate. Default ~80s (a+ * container or VM image pull and boot); a Local Lume Space is much faster+ * (~17s to running). */estimateMs?: number;}) {const [progress, setProgress] = useState(0.04);diff --git a/apps/cua-spaces/src/components/SettingsPanel.test.tsx b/apps/cua-spaces/src/components/SettingsPanel.test.tsxindex f3550b0e50..27a177e645 100644--- a/apps/cua-spaces/src/components/SettingsPanel.test.tsx+++ b/apps/cua-spaces/src/components/SettingsPanel.test.tsx@@ -18,8 +18,6 @@ function renderPanel(overrides: Partial<Parameters<typeof SettingsPanel>[0]> = {const props = {menuBar: false,onMenuBarMode: vi.fn(),- fleetLive: false,- clientId: undefined,onOpenExternal: vi.fn(),onClose: vi.fn(),...overrides,@@ -53,23 +51,13 @@ describe("SettingsPanel notch tab control", () => {});describe("SettingsPanel account section", () => {- it("shows a sign-in button that opens Cua when not live", async () => {+ it("shows a sign-in button that opens Cua when not signed in", async () => {const user = userEvent.setup();- const props = renderPanel({ fleetLive: false });+ const props = renderPanel();const button = screen.getByRole("button", { name: "Sign in to Cua" });await user.click(button);expect(props.onOpenExternal).toHaveBeenCalledWith(SIGN_IN_URL);});-- it("shows the API-key state but still offers account sign-in when env creds are live", () => {- renderPanel({ fleetLive: true, clientId: "client-abc" });- // The env machine key reads as "signed in via API key" with the client id…- expect(screen.getByText("Signed in via API key")).toBeInTheDocument();- expect(screen.getByText("client-abc")).toBeInTheDocument();- // …but it does NOT masquerade as a Cua account, and account sign-in stays available.- expect(screen.queryByText("Signed in to Cua")).toBeNull();- expect(screen.getByRole("button", { name: "Sign in to Cua" })).toBeInTheDocument();- });});describe("SettingsPanel default location", () => {@@ -262,8 +250,6 @@ describe("SettingsPanel AI agents", () => {<PanelmenuBar={false}onMenuBarMode={vi.fn()}- fleetLive={false}- clientId={undefined}onOpenExternal={vi.fn()}onClose={vi.fn()}/>,@@ -472,14 +458,13 @@ describe("SettingsPanel billing and Teams", () => {onSignedOut: vi.fn(async () => () => {}),};const props = renderPanel({- fleetLive: true,signedInIdentity: "[email protected]",auth,billingStatus: async () => ({billingEnabled: true,card: null,credit: { balanceUsdCents: 742 },- billingUrl: "https://run.cua.ai/billing",+ billingUrl: "https://example.com/billing",}),});expect(await screen.findByRole("region", { name: "Teams" })).toBeInTheDocument();diff --git a/apps/cua-spaces/src/components/SettingsPanel.tsx b/apps/cua-spaces/src/components/SettingsPanel.tsxindex e77aa3d1d2..87f1fe3219 100644--- a/apps/cua-spaces/src/components/SettingsPanel.tsx+++ b/apps/cua-spaces/src/components/SettingsPanel.tsx@@ -89,10 +89,6 @@ interface SettingsPanelProps {/** Switch the switcher entry point between the notch tab and a macOS* menu-bar status item. */onMenuBarMode: (enabled: boolean) => void;- /** True when Cua Cloud credentials work (client credentials count). */- fleetLive: boolean;- /** OAuth client id, shown muted for client credentials; absent when unknown. */- clientId?: string;/** Signed-in user identity (email/subject) from a device sign-in, if any. */signedInIdentity?: string;/** Native device-flow sign-in hooks; when absent the button opens the site. */@@ -133,8 +129,6 @@ interface SettingsPanelProps {export function SettingsPanel({menuBar,onMenuBarMode,- fleetLive,- clientId,signedInIdentity,auth,onOpenExternal,@@ -375,12 +369,9 @@ export function SettingsPanel({panelRef.current?.focus({ preventScroll: true });}, []);- // The Account section reflects the USER session (a device sign-in). Env- // client-credentials keep Cua Cloud working, but they're a machine key, not- // a sign-in: they show as "Signed in via API key" beside "Sign in to Cua".+ // The Account section reflects the USER session (a device sign-in).const page = settingsPage({identity: identity ?? null,- apiKeyClient: !identity && fleetLive ? (clientId ?? null) : null,signIn: phase,canSignOut: Boolean(auth) && Boolean(identity),menuBar,diff --git a/apps/cua-spaces/src/components/Thumbnail.tsx b/apps/cua-spaces/src/components/Thumbnail.tsxindex e5f837d780..7f80041a71 100644--- a/apps/cua-spaces/src/components/Thumbnail.tsx+++ b/apps/cua-spaces/src/components/Thumbnail.tsx@@ -30,7 +30,7 @@ interface ThumbnailProps {// Measured Lume lifecycle (avg of 3 clone→ready→teardown cycles): clone ~2s +// boot→running ~15s ≈ ~17s to a streamable/running tile; stop ~7s + delete ~2s-// ≈ ~8s teardown. Cua Cloud keeps the default ~80s estimate.+// ≈ ~8s teardown. Other Spaces keep the default ~80s estimate.const LOCAL_START_ESTIMATE_MS = 17_000;const LOCAL_DELETE_ESTIMATE_MS = 8_000;diff --git a/apps/cua-spaces/src/components/desktop/MainWindow.test.tsx b/apps/cua-spaces/src/components/desktop/MainWindow.test.tsxindex 695a87b9c5..4fd896227d 100644--- a/apps/cua-spaces/src/components/desktop/MainWindow.test.tsx+++ b/apps/cua-spaces/src/components/desktop/MainWindow.test.tsx@@ -36,7 +36,7 @@ function setup(isNative: true,listSpaces: async () => ROWS,localStatus: async () => LOCAL,- status: async () => ({ configured: true, authMode: "user", baseUrl: "", tokenUrl: "", identity: "[email protected]" }),+ status: async () => ({ configured: true, authMode: "user", identity: "[email protected]" }),screenshot: async () => "data:image/png;base64,AAAA",createSpace,setDefaultLocation,@@ -53,7 +53,7 @@ describe("MainWindow", () => {it("first run shows the welcome flow in the window, then the Spaces", async () => {const { host } = setup({}, false);fireEvent.click(await screen.findByRole("button", { name: "Get started" }));- // Already signed in (the fleet status names the account): just continue.+ // Already signed in (the account status names the user): just continue.await screen.findByText("Signed in as [email protected].");fireEvent.click(await screen.findByRole("button", { name: "Continue" }));await screen.findByRole("heading", { name: "AI agents" });diff --git a/apps/cua-spaces/src/components/desktop/MainWindow.tsx b/apps/cua-spaces/src/components/desktop/MainWindow.tsxindex bc21979b28..cab3694902 100644--- a/apps/cua-spaces/src/components/desktop/MainWindow.tsx+++ b/apps/cua-spaces/src/components/desktop/MainWindow.tsx@@ -20,7 +20,6 @@ import {} from '../../model/window';import { createFileSendBridge, type FileSendBridge } from '../../native/fileSend';import {- type CloudPricing,type GpuChoice,createFleetBridge,type FleetBridge,@@ -220,7 +219,6 @@ export function MainWindow({);const [hostStatus, setHostStatus] = useState<HostStatus | null>(null);const [local, setLocal] = useState<LocalStatus | null>(null);- const [cloudPricing, setCloudPricing] = useState<CloudPricing | null>(null);const [gpus, setGpus] = useState<GpuChoice[] | null>(null);const [hosts, setHosts] = useState<SpaceHost[]>([]);// Settings, Experiments: what the window shows (Share, your clouds).@@ -344,20 +342,6 @@ export function MainWindow({};}, [fleet, live, wizard]);- // This account's cloud rates for the estimate, each time New Space opens- // (the SDK reuses an answer for five minutes).- useEffect(() => {- if (!live || !wizard || !sync.fleetConfigured || !fleet.cloudPricing) return;- let cancelled = false;- void fleet- .cloudPricing()- .then((next) => !cancelled && setCloudPricing(next))- .catch(() => {});- return () => {- cancelled = true;- };- }, [fleet, live, wizard, sync.fleetConfigured]);-// The GPU option of each local runtime, each time New Space opens.useEffect(() => {if (!live || !wizard || !fleet.gpuSupport) return;@@ -441,7 +425,8 @@ export function MainWindow({}, [teleport, usageId]);const chrome = mainChrome({identity: sync.identity,- cloudConfigured: sync.fleetConfigured,+ // Cua Cloud has ended: no account signs in with an API key.+ cloudConfigured: false,canSignIn: live,experiments,});@@ -449,7 +434,8 @@ export function MainWindow({// experiment on (the core's `volumeLabel`); off, it shows the Spaces.const volumeShown = Boolean(chrome.volumeLabel);- const cloudAvailable = live ? sync.fleetConfigured : true;+ // Cua Cloud has ended: it is never an available location.+ const cloudAvailable = false;const localAvailable = live ? canRunContainer(local) || canRunMacos(local) : true;const startCreate = useCallback(@@ -833,8 +819,6 @@ export function MainWindow({.then(({ emit }) => emit('settings:changed', { menuBar: enabled })).catch(() => {});}}- fleetLive={sync.fleetConfigured}- clientId={sync.clientId}signedInIdentity={sync.identity}auth={fleet.isNative@@ -953,7 +937,6 @@ export function MainWindow({localBackends={live ? (local?.backends ?? []) : undefined}hostArch={sync.hostArch ?? local?.hostArch}storage={live ? local?.storage : undefined}- cloudPricing={live && sync.fleetConfigured ? cloudPricing : null}gpus={live ? gpus : null}onOpenExternal={(url) => void fleet.openExternal(url).catch(() => {})}startActions={startActions}diff --git a/apps/cua-spaces/src/components/desktop/MainWindow.volume.test.tsx b/apps/cua-spaces/src/components/desktop/MainWindow.volume.test.tsxindex b5cc46da04..d23bf334ac 100644--- a/apps/cua-spaces/src/components/desktop/MainWindow.volume.test.tsx+++ b/apps/cua-spaces/src/components/desktop/MainWindow.volume.test.tsx@@ -24,7 +24,7 @@ function setup() {const fleet = fakeFleetBridge({isNative: true,listSpaces: async () => [],- status: async () => ({ configured: true, authMode: "user", baseUrl: "", tokenUrl: "", identity: "[email protected]" }),+ status: async () => ({ configured: true, authMode: "user", identity: "[email protected]" }),});const host = createFakeHostBridge({ onboarding: { completed: true, mode: "client" } });const agents = createAgentsBridgeOver(async (tool) => {@@ -61,7 +61,7 @@ describe("MainWindow and the menu bar item", () => {const fleet = fakeFleetBridge({isNative: true,listSpaces: async () => [],- status: async () => ({ configured: true, authMode: "user", baseUrl: "", tokenUrl: "", identity: "[email protected]" }),+ status: async () => ({ configured: true, authMode: "user", identity: "[email protected]" }),});const host = createFakeHostBridge({ onboarding: { completed: true, mode: "client" } });const agents = createAgentsBridgeOver(async (tool) => {diff --git a/apps/cua-spaces/src/components/desktop/NewSpaceWizard.tsx b/apps/cua-spaces/src/components/desktop/NewSpaceWizard.tsxindex 726d6c0f62..596031ec83 100644--- a/apps/cua-spaces/src/components/desktop/NewSpaceWizard.tsx+++ b/apps/cua-spaces/src/components/desktop/NewSpaceWizard.tsx@@ -27,7 +27,7 @@ export interface CreatePlan {* can run in `placement`. */runtime: Runtime;name?: string;- /** This Mac only: vCPUs and memory. Cua Cloud sizes its own Spaces. */+ /** This Mac only: vCPUs and memory. */cpus?: number;memoryMb?: number;/** This Mac's VMs only: a disk larger than the image's, in GB. */@@ -43,7 +43,7 @@ export interface NewSpaceWizardProps {/** Where "Run on" starts: the configured default location (Settings,* `cua config set default.on`). */defaultLocation?: Placement;- /** Cua Cloud needs an account (signed in, or client credentials). */+ /** Cua Cloud has ended: the app passes `false`. */cloudAvailable: boolean;/** Local needs a container backend (docker / runsc) or Lume. */localAvailable: boolean;@@ -66,7 +66,7 @@ export interface NewSpaceWizardProps {hostArch?: string;/** Free space where local Spaces are written, and what is pulled. */storage?: LocalStorage | null;- /** This account's Cua Cloud rates (no cloud estimate without). */+ /** Cua Cloud rates (always none: it has ended). */cloudPricing?: CloudPricing | null;/** The GPU option of each runtime that has one (`gpu_support`); a* runtime not listed gets no GPU row. */diff --git a/apps/cua-spaces/src/devtools/agentsShot.tsx b/apps/cua-spaces/src/devtools/agentsShot.tsxindex e71c5eebfa..704b5654cc 100644--- a/apps/cua-spaces/src/devtools/agentsShot.tsx+++ b/apps/cua-spaces/src/devtools/agentsShot.tsx@@ -126,7 +126,7 @@ const fleet = fakeFleetBridge({{ id: "cloud:aurora", name: "aurora", provider: "cloud", spacesdVersion: "0.4.0", features: [], os: "linux", reachable: true },{ id: "cloud:orion", name: "orion", provider: "cloud", spacesdVersion: "0.4.0", features: [], os: "linux", reachable: false },],- status: async () => ({ configured: true, authMode: "user", baseUrl: "", tokenUrl: "", identity: "[email protected]" }),+ status: async () => ({ configured: true, authMode: "user", identity: "[email protected]" }),});const host = document.getElementById("root");diff --git a/apps/cua-spaces/src/native/fleet.ts b/apps/cua-spaces/src/native/fleet.tsindex c1a01e1b76..755b8ba03e 100644--- a/apps/cua-spaces/src/native/fleet.ts+++ b/apps/cua-spaces/src/native/fleet.ts@@ -8,8 +8,8 @@ import type { LocalStatus } from "./local";/*** Typed wrapper over the shell's Spaces commands. The shell is a thin layer over the cua- * SDK (`cua-spaces` + `cua daemon`): every location (Cua Cloud, this Mac,- * Spaces added by address) comes back through one registry.+ * SDK (`cua-spaces` + `cua daemon`): every location (this Mac, your machines+ * and clouds, Spaces added by address) comes back through one registry.** Outside Tauri (browser dev, Vitest) the fallback reports "not native" so the* portal keeps its synthetic fixtures and no network is ever touched.@@ -25,18 +25,13 @@ export interface SignInStart {verificationUri: string;}-/** Cua Cloud account status. */-export interface FleetStatus {+/** Who is signed in to Cua (the shell reads its local session). */+export interface AccountStatus {+ /** A user is signed in. */configured: boolean;- authMode: "user" | "client-credentials" | "static-token" | "none";- baseUrl: string;- tokenUrl: string;- /** OAuth client id, when configured; shown muted in Settings. */- clientId?: string;+ authMode: "user" | "none";/** Signed-in user identity (email/subject), when a user session is active. */identity?: string;- namespaces?: string[];- probeError?: string;}/** The local `cua daemon` the app shares Spaces with (CLI / MCP clients). */@@ -238,10 +233,10 @@ export interface BillingStatus {export interface FleetBridge {readonly isNative: boolean;- status(probe?: boolean): Promise<FleetStatus>;- /** This account's Cua Cloud rates; null when unknown (no estimate; always null in the native app). */+ status(): Promise<AccountStatus>;+ /** Always null in the native app: Cua Cloud has ended, so there are no rates. */cloudPricing?(): Promise<CloudPricing | null>;- /** Always null in the native app: the Fleets billing API is retired. */+ /** Always null in the native app: Cua Cloud has ended, so there is no billing. */billingStatus?(): Promise<BillingStatus | null>;daemonStatus(): Promise<DaemonStatus>;ensureDaemon(): Promise<DaemonStatus>;@@ -282,8 +277,6 @@ export interface FleetBridge {defaultLocation(): Promise<DefaultLocation>;/** Stores the default location in `$CUA_HOME/config.toml`. */setDefaultLocation(on: Location): Promise<DefaultLocation>;- /** Extend a cloud Space's lease. */- keepAliveSpace(spaceId: string, seconds: number): Promise<void>;/** Fires after add/create/delete/remove anywhere in the app. */onSpacesChanged(handler: () => void): Promise<() => void>;/** Returns a `data:image/…;base64,…` URL. */@@ -328,7 +321,7 @@ export interface FleetBridge {* redirect), else a device code. The session is shared with the cua CLI.*/beginSignIn(): Promise<SignInStart>;- /** Clear the signed-in user session; env credentials resume as fallback. */+ /** Clear the signed-in user session. */signOut(): Promise<void>;onSignedIn(handler: (identity?: string) => void): Promise<() => void>;onSignInFailed(handler: (reason: string) => void): Promise<() => void>;@@ -342,12 +335,7 @@ export function createFallbackFleetBridge(): FleetBridge {const noopUnsub = async () => () => {};return {isNative: false,- status: async () => ({- configured: false,- authMode: "none",- baseUrl: "",- tokenUrl: "",- }),+ status: async () => ({ configured: false, authMode: "none" }),daemonStatus: async () => ({ connected: false, error: "not running in the app" }),ensureDaemon: unavailable,localStatus: async () => ({@@ -364,7 +352,6 @@ export function createFallbackFleetBridge(): FleetBridge {removeSpace: unavailable,defaultLocation: async () => BUILTIN_DEFAULT_LOCATION,setDefaultLocation: unavailable,- keepAliveSpace: unavailable,onSpacesChanged: noopUnsub,screenshot: unavailable,openStream: unavailable,@@ -404,7 +391,7 @@ export function createTauriFleetBridge(): FleetBridge {};return {isNative: true,- status: (probe) => invoke<FleetStatus>("fleet_status", { probe: probe ?? false }),+ status: () => invoke<AccountStatus>("fleet_status"),daemonStatus: () => invoke<DaemonStatus>("daemon_status"),ensureDaemon: () => invoke<DaemonStatus>("ensure_daemon"),localStatus: () => invoke<LocalStatus>("local_status"),@@ -426,7 +413,6 @@ export function createTauriFleetBridge(): FleetBridge {removeSpace: (spaceId) => invoke<void>("remove_space", { spaceId }),defaultLocation: () => invoke<DefaultLocation>("get_default_location"),setDefaultLocation: (on) => invoke<DefaultLocation>("set_default_location", { on }),- keepAliveSpace: (spaceId, seconds) => invoke<void>("keep_alive_space", { spaceId, seconds }),onSpacesChanged: (handler) => on<unknown>("spaces:changed", () => handler()),screenshot: (spaceId, maxDimension) =>invoke<string>("space_screenshot", { spaceId, maxDimension: maxDimension ?? null }),diff --git a/apps/cua-spaces/src/state/cloud.tsx b/apps/cua-spaces/src/state/cloud.tsxindex 1e7ac8c92b..42a3450314 100644--- a/apps/cua-spaces/src/state/cloud.tsx+++ b/apps/cua-spaces/src/state/cloud.tsx@@ -6,8 +6,8 @@* bridge plus whether real data is flowing, and a hook that keeps the* reducer's Space list in sync with the cua SDK's Spaces registry.*- * The registry (`list_spaces`) covers every location (Cua Cloud, this Mac,- * Spaces added by address) and works without cloud credentials, so `live`+ * The registry (`list_spaces`) covers every location (this Mac, your machines+ * and clouds, Spaces added by address) and works signed out, so `live`* simply means "running in the native shell". Outside* it (browser dev, Vitest) the portal keeps its synthetic fixtures, which is* also what keeps the existing tests hermetic.@@ -75,10 +75,6 @@ export interface FleetSync {live: boolean;/** Refresh failure; previously loaded rows remain available. */rosterError: string | null;- /** Whether Cua Cloud credentials are configured in the shell. */- fleetConfigured: boolean;- /** OAuth client id reported by the shell, when signed in; shown in Settings. */- clientId?: string;/** Signed-in user identity (email/subject), when a user session is active. */identity?: string;/** Re-read the registry and sync the reducer now. */@@ -131,8 +127,6 @@ export function useFleetSync(const live = fleet.isNative;const [rosterError, setRosterError] = useState<string | null>(null);const rosterLoaded = useRef(false);- const [fleetConfigured, setFleetConfigured] = useState(false);- const [clientId, setClientId] = useState<string | undefined>(undefined);const [identity, setIdentity] = useState<string | undefined>(undefined);const [defaultLocation, setDefaultLocationState] = useState<DefaultLocation>(BUILTIN_DEFAULT_LOCATION);/**@@ -307,8 +301,6 @@ export function useFleetSync(return fleet.status().then((status) => {- setFleetConfigured(status.configured);- setClientId(status.clientId);setIdentity(status.identity);}).catch(() => {});@@ -492,8 +484,6 @@ export function useFleetSync(return {live,rosterError,- fleetConfigured,- clientId,identity,refresh,defaultLocation,diff --git a/apps/cua-spaces/src/styles/app.css b/apps/cua-spaces/src/styles/app.cssindex fb987d4b18..5cb76d7191 100644--- a/apps/cua-spaces/src/styles/app.css+++ b/apps/cua-spaces/src/styles/app.css@@ -1477,13 +1477,6 @@ kbd {align-items: center;gap: 10px;}-/* The "Signed in via API key" row shown above the account sign-in button when- only env credentials are present — same row layout as the signed-in state. */-.settings-account-env {- display: flex;- align-items: center;- gap: 10px;-}.settings-account[data-state="out"] {flex-direction: column;align-items: stretch;@@ -2555,7 +2548,7 @@ select {}/* ---------------------------------------------------------------------------- * Fleet live data: tile pin affordance, real thumbnails+ * Live data: tile pin affordance, real thumbnails* ------------------------------------------------------------------------- */.tile-wrap {diff --git a/apps/cua-spaces/src/styles/desktop.css b/apps/cua-spaces/src/styles/desktop.cssindex f85ae204a0..52b4154b1a 100644--- a/apps/cua-spaces/src/styles/desktop.css+++ b/apps/cua-spaces/src/styles/desktop.css@@ -3,9 +3,9 @@/** The main Cua Spaces window: a plain, opaque desktop app (sidebar, toolbar,- * detail), styled after the Fleets dashboard: neutral greys, hairline- * borders, a light-blue accent used sparingly, white-on-black (or- * black-on-white) primary buttons. The platform system font throughout.+ * detail): neutral greys, hairline borders, a light-blue accent used+ * sparingly, white-on-black (or black-on-white) primary buttons. The+ * platform system font throughout.** Nothing here is translucent: no backdrop-filter, no rgba window* backgrounds. Screenshots of the window come out the same every time.diff --git a/apps/cua-spaces/src/viewer/WindowStream.tsx b/apps/cua-spaces/src/viewer/WindowStream.tsxindex 4e1d7e30c9..248d1b7faf 100644--- a/apps/cua-spaces/src/viewer/WindowStream.tsx+++ b/apps/cua-spaces/src/viewer/WindowStream.tsx@@ -8,8 +8,7 @@** Session setup is gRPC in the shell: `open_space_stream` returns a scoped* media ticket (`wsUrl` carries it, so no token ever reaches the webview and- * no loopback bridge is needed for direct/local Spaces; Cua Cloud Spaces get a- * `cua daemon` media-bridge ticket). `MediaSession` attaches and plays.+ * no loopback bridge is needed). `MediaSession` attaches and plays.** - SINGLE mode (`targetWindow` set): one remote window fills the OS window,* which is sized to the remote and resize-synced when geometry control is