Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

refactor(sdk): the SDK, daemon and Spaces no longer build a Fleet client; drop the cloud drive backend (CUA-1834) (#5451)

Francesco Bonaccib8d0e97bb8b5
diff --git a/apps/cua-spaces-desktop/src/native/generated/cua_sdk.ts b/apps/cua-spaces-desktop/src/native/generated/cua_sdk.ts
index 65924d1a89..41ce5a1252 100644
--- a/apps/cua-spaces-desktop/src/native/generated/cua_sdk.ts
+++ b/apps/cua-spaces-desktop/src/native/generated/cua_sdk.ts
@@ -3643,8 +3643,7 @@ export type CloudOptions = {
pool?: string,
/**
* With `pool`: update the pool's template to the given fields instead
- * of failing on a mismatch (`Fleet.apply` semantics for the template;
- * the pool's capacity is kept). Managed pools refuse it.
+ * of failing on a mismatch. Cua Cloud has ended: ignored.
*/
apply: boolean
}
@@ -4231,29 +4230,28 @@ const FfiConverterTypeContainer = (() => {
})();
/**
- * Fleet credentials and endpoints. Unset fields fall back to the
- * environment (`CUA_FLEET_BASE_URL`, `CUA_TOKEN_URL`, `CUA_CLIENT_ID`,
- * `CUA_CLIENT_SECRET`, `FLEETS_TOKEN`) when `CuaConfig.fleet_from_env`.
+ * Fleet credentials and endpoints. Ignored: Cua Cloud has ended, so nothing
+ * reads them any more. Kept so existing callers still compile.
*/
export type FleetSettings = {
/**
- * Fleet API base URL.
+ * Ignored.
*/
baseUrl?: string,
/**
- * OAuth token URL.
+ * Ignored.
*/
tokenUrl?: string,
/**
- * OAuth client id.
+ * Ignored.
*/
clientId?: string,
/**
- * OAuth client secret.
+ * Ignored.
*/
clientSecret?: string,
/**
- * Static Fleet token (wins over client credentials).
+ * Ignored.
*/
token?: string
}
@@ -4319,11 +4317,11 @@ export type CuaConfig = {
*/
stateDir?: string,
/**
- * Fleet settings (merged over the environment).
+ * Ignored: Cua Cloud has ended.
*/
fleet?: FleetSettings,
/**
- * Read Fleet settings from the environment.
+ * Ignored: Cua Cloud has ended.
*/
fleetFromEnv: boolean,
/**
@@ -4340,14 +4338,15 @@ export type CuaConfig = {
*/
teleportHome?: string,
/**
- * When the settings and environment carry no Fleet credentials, use
- * the signed-in session (`Cua.auth()`, `cua auth login`) from the
- * shared credential store, refreshed as needed.
+ * Use the signed-in session (`Cua.auth()`, `cua auth login`) from the
+ * shared credential store, refreshed as needed, for the relay account
+ * the runtime lists the account's machines with ("My machines"). The
+ * name is historical: it no longer builds a Fleet client, because Cua
+ * Cloud has ended.
*/
fleetFromSession: boolean,
/**
- * Where managed Fleet pools keep their name cache and machine-wide GC
- * lock (default: `$CUA_HOME` or `~/.cua`, or next to `state_dir`).
+ * Ignored: Cua Cloud has ended, so there are no managed pools.
*/
fleetPoolHome?: string
}
@@ -8774,7 +8773,7 @@ const FfiConverterTypeGpuOption = (() => {
*/
export type GpuSupport = {
/**
- * `lume`, `qemu`, `container`, `gvisor`, `fleet`, a provider's name.
+ * `lume`, `qemu`, `container`, `gvisor`, a provider's name.
*/
runtime: string,
/**
@@ -9968,10 +9967,10 @@ const FfiConverterTypeImageLayer = (() => {
})();
/**
- * Image layers built on top of a sandbox's image. Cloud: a remote build
- * (Fleet images API). Local: a build into the container engine (container
- * images only; VM images take no layers here). Both are cached by the same
- * content hash (`cua-b-<hash>`), so an identical spec never rebuilds.
+ * Image layers built on top of a sandbox's image. Local: a build into the
+ * container engine (container images only; VM images take no layers here),
+ * cached by a content hash (`cua-b-<hash>`), so an identical spec never
+ * rebuilds. (Cua Cloud's remote build has ended.)
*/
export type ImageBuild = {
/**
@@ -10484,7 +10483,7 @@ const FfiConverterTypeMcpConfig = (() => {
export type MediaBridge = {
/**
* Loopback `ws://` URL carrying a short-lived bridge ticket. Speaks
- * rcdp wire v2 unchanged; no Fleet bearer or env token is exposed.
+ * rcdp wire v2 unchanged; no env token is exposed.
*/
wsUrl: string,
/**
@@ -12460,9 +12459,8 @@ export type SandboxCreateOptions = {
*/
token?: string,
/**
- * Fleet: claim from this existing (user-owned) pool. Unset: a managed,
- * autoscaled pool keyed by image and shape. Local (with an empty
- * image): run this Fleet pool's template locally.
+ * Cua Cloud has ended: a pool fails with the "Cua Cloud has ended"
+ * error.
*/
pool?: string,
/**
@@ -12478,7 +12476,7 @@ export type SandboxCreateOptions = {
*/
memoryMb?: bigint,
/**
- * Extra guest ports (local: published; Fleet: `port-<n>` services).
+ * Extra guest ports (local: published).
*/
ports: Array<number>,
/**
@@ -12494,13 +12492,13 @@ export type SandboxCreateOptions = {
*/
readyTimeoutMs?: number,
/**
- * Guest environment (local: container environment or cloud-init;
- * cloud: the template environment with `processMode: Run`, on gVisor
- * and KubeVirt; values are not secrets).
+ * Guest environment (local: container environment or cloud-init; values
+ * are not secrets).
*/
env: Map<string, string>,
/**
- * Deprecated: initial replicas of a new managed pool (> 0 = warm).
+ * Deprecated, and Cua Cloud has ended: initial replicas of a new
+ * managed pool (> 0 = warm).
*/
fleetReplicas?: number,
/**
@@ -12841,8 +12839,9 @@ export type SandboxInfo = {
*/
runtime: string,
/**
- * `runtime_type` as persisted (`fleet`, `direct`, `gvisor`, `qemu`,
- * ...); prefer `location`, `kind` and `runtime`.
+ * `runtime_type` as persisted (`direct`, `gvisor`, `qemu`, ...; `fleet`
+ * for a record of the Cua Cloud that has ended); prefer `location`,
+ * `kind` and `runtime`.
*/
runtimeType: string,
/**
@@ -12862,8 +12861,7 @@ export type SandboxInfo = {
*/
services: Map<string, number>,
/**
- * Service base URLs by name (Fleet: gateway URLs that need the Fleet
- * bearer).
+ * Service base URLs by name.
*/
endpoints: Map<string, string>,
/**
@@ -14015,14 +14013,11 @@ export type SpaceCreateOptions = {
*/
name?: string,
/**
- * vCPUs. Local default 2; cloud 1-64 (most accounts run 1-8; Fleet
- * decides), default the pool template's (4).
+ * vCPUs. Local default 2.
*/
cpus?: number,
/**
- * Memory in MiB. Local default 4096; cloud 512 up to 524288 (most
- * accounts run 1024-32768; Fleet decides), default the pool
- * template's (4096).
+ * Memory in MiB. Local default 4096.
*/
memoryMb?: bigint,
/**
@@ -15475,8 +15470,8 @@ export type SpaceStreamTicket = {
*/
height: number,
/**
- * Attaching needs [`Space::websocket_headers`] (Fleet gateway or the
- * daemon passthrough).
+ * Attaching needs [`Space::websocket_headers`] (a gateway or the daemon
+ * passthrough).
*/
needsHeaders: boolean
}
@@ -16668,8 +16663,8 @@ export type SpacesdHttpRequest = {
*/
path: string,
/**
- * Extra headers. Credentials (`authorization`, the env and Fleet claim
- * headers) are the client's and cannot be set here.
+ * Extra headers. Credentials (`authorization` and the env headers) are
+ * the client's and cannot be set here.
*/
headers: Array<SpacesdHttpHeader>,
/**
@@ -17830,10 +17825,10 @@ export const CuaError = (() => {
}
}
/**
- * The provider is not configured (for example no Fleet credentials).
+ * The provider is not configured (for example no credentials for it).
*
- * Fix: Set `FLEETS_TOKEN`, or `CUA_CLIENT_ID` and `CUA_CLIENT_SECRET`, or
- * run `cua auth login` and create the client with `fleet_from_session`.
+ * Fix: Set the credentials the message names (for a contrib provider, its
+ * environment variable or `cua auth provider set <name>`).
*/
class ProviderNotConfigured extends UniffiError {
/**
@@ -17950,10 +17945,11 @@ export const CuaError = (() => {
}
}
/**
- * Fleet API failure.
+ * Fleet API failure. Cua Cloud has ended, so the SDK no longer raises
+ * this.
*
- * Fix: Read the status in the message. Retry a transient failure; check
- * the credentials and the account's capacity otherwise.
+ * Fix: Use a local sandbox or your own machine; see the Cua Cloud has
+ * ended guide.
*/
class Fleet extends UniffiError {
/**
@@ -17980,13 +17976,11 @@ export const CuaError = (() => {
}
}
/**
- * Fleet's admission refused the request: a sandbox or pool size over
- * this account's limits, or a template its policy does not admit. The
- * message is Fleet's own and names the limit.
+ * Fleet's admission refused the request. Cua Cloud has ended, so the SDK
+ * no longer raises this.
*
- * Fix: Pick a size within the limit the message names (most accounts
- * run 1-8 vCPUs and 1-32 GiB per sandbox), or contact Cua support to
- * raise the account's limits.
+ * Fix: Use a local sandbox or your own machine; see the Cua Cloud has
+ * ended guide.
*/
class FleetAdmissionDenied extends UniffiError {
/**
@@ -18138,8 +18132,7 @@ export const CuaError = (() => {
/**
* Missing or wrong token or ticket.
*
- * Fix: Pass the sandbox's env token, refresh the Fleet credentials, or run
- * `cua auth login` again.
+ * Fix: Pass the sandbox's env token, or run `cua auth login` again.
*/
class Unauthenticated extends UniffiError {
/**
@@ -18381,9 +18374,10 @@ export const CuaError = (() => {
}
/**
* A named cloud pool's template differs from the requested sandbox
- * fields; the message holds the diff (pass `apply` to update it).
+ * fields. Cua Cloud has ended, so the SDK no longer raises this.
*
- * Fix: Pass the pool's own fields, or pass `apply` to update its template.
+ * Fix: Use a local sandbox or your own machine; see the Cua Cloud has
+ * ended guide.
*/
class PoolSpecMismatch extends UniffiError {
/**
@@ -18411,10 +18405,11 @@ export const CuaError = (() => {
}
/**
* A claim bound but its per-claim secrets (the env token) never
- * reached the sandbox within the bounded wait; the claim was released.
+ * reached the sandbox. Cua Cloud has ended, so the SDK no longer raises
+ * this.
*
- * Fix: Retry. If it keeps failing, check the pool's claim-secrets setup
- * and the Fleet status.
+ * Fix: Use a local sandbox or your own machine; see the Cua Cloud has
+ * ended guide.
*/
class ClaimSecretsNotDelivered extends UniffiError {
/**
@@ -22092,7 +22087,8 @@ const uniffiTypeFleetPoolsObjectFactory: UniffiObjectFactory<FleetPoolsLike> = (
const FfiConverterTypeFleetPools = new FfiConverterObject(uniffiTypeFleetPoolsObjectFactory);
/**
- * Fleet control plane.
+ * Fleet control plane. Cua Cloud has ended: `Cua.fleet()` never returns
+ * one, so none of its methods can be called.
*/
export interface FleetLike {
@@ -22241,7 +22237,8 @@ export type FleetInterface = FleetLike;
/**
- * Fleet control plane.
+ * Fleet control plane. Cua Cloud has ended: `Cua.fleet()` never returns
+ * one, so none of its methods can be called.
*/
export class Fleet extends UniffiAbstractObject implements FleetLike {
@@ -23697,7 +23694,7 @@ export interface PortForwardLike {
*/
localAddr(): string | undefined;
/**
- * URL to use (loopback URL, or the Fleet gateway URL).
+ * URL to use (a loopback URL).
*/
url(): string | undefined;
}
@@ -23790,7 +23787,7 @@ private constructor(pointer: UniffiHandle) {
}
/**
- * URL to use (loopback URL, or the Fleet gateway URL).
+ * URL to use (a loopback URL).
*/
url(): string | undefined {
return ((__rb: Uint8Array) => {
@@ -24626,16 +24623,14 @@ export interface ServiceLike {
/**
* A shareable URL for this service that stops working after
* `ttl_seconds` (60 s to 24 h, default 1 h): the same as
- * `Sandbox.public_url(name, ...)`. Cloud: a Fleet signed service URL.
- * Local: a loopback URL with its own token, served by the cua daemon.
+ * `Sandbox.public_url(name, ...)`: a loopback URL with its own token,
+ * served by the cua daemon.
*/
publicUrl(ttlSeconds: number | undefined, label: string | undefined, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<PublicUrl>;
/**
- * One HTTP request to `path` on the service. Credentials (Fleet bearer
- * and claim) are attached by the runtime. `headers` are sent as given
- * (for example `content-type`, or `accept` and `mcp-session-id` for
- * MCP over Fleet); `authorization` is refused on Fleet, where the
- * gateway bearer owns it.
+ * One HTTP request to `path` on the service. Credentials are attached by
+ * the runtime. `headers` are sent as given (for example `content-type`,
+ * or `accept` and `mcp-session-id` for MCP).
*/
request(method: string, path: string, body: ArrayBuffer | undefined, timeoutMs: number | undefined, headers: Array<HttpHeader> | undefined, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<HttpResponse>;
/**
@@ -24800,8 +24795,8 @@ private constructor(pointer: UniffiHandle) {
/**
* A shareable URL for this service that stops working after
* `ttl_seconds` (60 s to 24 h, default 1 h): the same as
- * `Sandbox.public_url(name, ...)`. Cloud: a Fleet signed service URL.
- * Local: a loopback URL with its own token, served by the cua daemon.
+ * `Sandbox.public_url(name, ...)`: a loopback URL with its own token,
+ * served by the cua daemon.
*/
async publicUrl(ttlSeconds: number | undefined = undefined, label: string | undefined = undefined, asyncOpts_?: { signal: AbortSignal }): Promise<PublicUrl> /*throws*/ {
const __stack = uniffiIsDebug ? new Error().stack : undefined;
@@ -24836,11 +24831,9 @@ private constructor(pointer: UniffiHandle) {
}
/**
- * One HTTP request to `path` on the service. Credentials (Fleet bearer
- * and claim) are attached by the runtime. `headers` are sent as given
- * (for example `content-type`, or `accept` and `mcp-session-id` for
- * MCP over Fleet); `authorization` is refused on Fleet, where the
- * gateway bearer owns it.
+ * One HTTP request to `path` on the service. Credentials are attached by
+ * the runtime. `headers` are sent as given (for example `content-type`,
+ * or `accept` and `mcp-session-id` for MCP).
*/
async request(method: string, path: string, body: ArrayBuffer | undefined, timeoutMs: number | undefined, headers: Array<HttpHeader> | undefined = undefined, asyncOpts_?: { signal: AbortSignal }): Promise<HttpResponse> /*throws*/ {
const __stack = uniffiIsDebug ? new Error().stack : undefined;
@@ -27725,20 +27718,19 @@ export interface SandboxLike {
*/
agents(asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<AgentsLike>;
/**
- * Deletes (Fleet: releases the claim and an ephemeral pool).
+ * Deletes (local: removes it; direct: forgets it; your cloud: deletes
+ * the machine).
*/
delete_(asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<void>;
/**
- * Managed Fleet claims: stop renewing the claim and forget the handle;
- * the claim runs until its current shutdown time. Embedded runtime
- * only (a daemon holds its claims by design).
+ * Forgets the handle this runtime holds (a Cua Cloud claim used to
+ * stop renewing; Cua Cloud has ended). Embedded runtime only.
*/
detach() /*throws*/: void;
/**
* Forwards a loopback port to guest `port`: a TCP forward locally (and
- * over cua-spacesd's tunnel when the image has it); in the cloud
- * without cua-spacesd, a loopback HTTP/WebSocket proxy through the
- * Fleet gateway. Either way `url()` is a loopback URL.
+ * over cua-spacesd's tunnel when the image has it). `url()` is a
+ * loopback URL.
*/
forward(port: number, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<PortForwardLike>;
/**
@@ -27781,7 +27773,7 @@ export interface SandboxLike {
*/
isEphemeral(): boolean;
/**
- * Extends a Fleet lease by `seconds`.
+ * Extends the sandbox's lease by `seconds`, for a provider that has one.
*/
keepAlive(seconds: number, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<void>;
/**
@@ -27807,9 +27799,8 @@ export interface SandboxLike {
/**
* Where the MCP server behind `service` is (URL of its endpoint at
* `path`, default `/mcp`, plus the headers every request needs), for
- * any MCP client. Embedded: the service route itself (loopback, or the
- * Fleet gateway with a fresh bearer and claim header). Daemon: the
- * daemon's streaming passthrough with its loopback bearer.
+ * any MCP client. Embedded: the service route itself (loopback).
+ * Daemon: the daemon's streaming passthrough with its loopback bearer.
*/
mcpConfig(service: string, path: string | undefined, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<McpConfig>;
/**
@@ -27833,9 +27824,8 @@ export interface SandboxLike {
overlay(overlays: Array<Overlay>, timeoutMs: number | undefined, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<Array<OverlayResult>>;
/**
* A shareable URL for `service` that stops working after `ttl_seconds`
- * (60 s to 24 h, default 1 h). Cloud: a Fleet signed service URL.
- * Local: a loopback URL with its own token, served by the cua daemon
- * (started if needed; `CUA_BIN` names the CLI).
+ * (60 s to 24 h, default 1 h): a loopback URL with its own token, served
+ * by the cua daemon (started if needed; `CUA_BIN` names the CLI).
*/
publicUrl(service: string, ttlSeconds: number | undefined, label: string | undefined, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<PublicUrl>;
/**
@@ -27956,7 +27946,8 @@ private constructor(pointer: UniffiHandle) {
}
/**
- * Deletes (Fleet: releases the claim and an ephemeral pool).
+ * Deletes (local: removes it; direct: forgets it; your cloud: deletes
+ * the machine).
*/
async delete_(asyncOpts_?: { signal: AbortSignal }): Promise<void> /*throws*/ {
const __stack = uniffiIsDebug ? new Error().stack : undefined;
@@ -27986,9 +27977,8 @@ private constructor(pointer: UniffiHandle) {
}
/**
- * Managed Fleet claims: stop renewing the claim and forget the handle;
- * the claim runs until its current shutdown time. Embedded runtime
- * only (a daemon holds its claims by design).
+ * Forgets the handle this runtime holds (a Cua Cloud claim used to
+ * stop renewing; Cua Cloud has ended). Embedded runtime only.
*/
detach(): void /*throws*/ {uniffiCaller.rustCallWithError(
/*liftError:*/ FfiConverterTypeCuaError.lift.bind(FfiConverterTypeCuaError),
@@ -28002,9 +27992,8 @@ private constructor(pointer: UniffiHandle) {
/**
* Forwards a loopback port to guest `port`: a TCP forward locally (and
- * over cua-spacesd's tunnel when the image has it); in the cloud
- * without cua-spacesd, a loopback HTTP/WebSocket proxy through the
- * Fleet gateway. Either way `url()` is a loopback URL.
+ * over cua-spacesd's tunnel when the image has it). `url()` is a
+ * loopback URL.
*/
async forward(port: number, asyncOpts_?: { signal: AbortSignal }): Promise<PortForwardLike> /*throws*/ {
const __stack = uniffiIsDebug ? new Error().stack : undefined;
@@ -28229,7 +28218,7 @@ private constructor(pointer: UniffiHandle) {
}
/**
- * Extends a Fleet lease by `seconds`.
+ * Extends the sandbox's lease by `seconds`, for a provider that has one.
*/
async keepAlive(seconds: number, asyncOpts_?: { signal: AbortSignal }): Promise<void> /*throws*/ {
const __stack = uniffiIsDebug ? new Error().stack : undefined;
@@ -28354,9 +28343,8 @@ private constructor(pointer: UniffiHandle) {
/**
* Where the MCP server behind `service` is (URL of its endpoint at
* `path`, default `/mcp`, plus the headers every request needs), for
- * any MCP client. Embedded: the service route itself (loopback, or the
- * Fleet gateway with a fresh bearer and claim header). Daemon: the
- * daemon's streaming passthrough with its loopback bearer.
+ * any MCP client. Embedded: the service route itself (loopback).
+ * Daemon: the daemon's streaming passthrough with its loopback bearer.
*/
async mcpConfig(service: string, path: string | undefined = undefined, asyncOpts_?: { signal: AbortSignal }): Promise<McpConfig> /*throws*/ {
const __stack = uniffiIsDebug ? new Error().stack : undefined;
@@ -28489,9 +28477,8 @@ private constructor(pointer: UniffiHandle) {
/**
* A shareable URL for `service` that stops working after `ttl_seconds`
- * (60 s to 24 h, default 1 h). Cloud: a Fleet signed service URL.
- * Local: a loopback URL with its own token, served by the cua daemon
- * (started if needed; `CUA_BIN` names the CLI).
+ * (60 s to 24 h, default 1 h): a loopback URL with its own token, served
+ * by the cua daemon (started if needed; `CUA_BIN` names the CLI).
*/
async publicUrl(service: string, ttlSeconds: number | undefined = undefined, label: string | undefined = undefined, asyncOpts_?: { signal: AbortSignal }): Promise<PublicUrl> /*throws*/ {
const __stack = uniffiIsDebug ? new Error().stack : undefined;
@@ -28966,13 +28953,13 @@ export interface SandboxesLike {
connect(name: string, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<SandboxLike>;
/**
* Connects directly to a machine by URL (`http(s)://host:port`, bare
- * `host:port`, a Fleet service URL or a relay URL) with an optional
- * spacesd token. No daemon is assumed and nothing is probed.
+ * `host:port` or a relay URL) with an optional spacesd token. No daemon is assumed and nothing is probed.
*/
connectUrl(url: string, token: string | undefined, name: string | undefined, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<SandboxLike>;
/**
- * Creates (Fleet, local) or connects (direct) a sandbox and waits for
- * the provider and every readiness probe.
+ * Creates (local, your cloud, a provider) or connects (direct) a sandbox
+ * and waits for the provider and every readiness probe. `on: "cloud"`
+ * fails with the "Cua Cloud has ended" error.
*/
create(options: SandboxCreateOptions, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<SandboxLike>;
/**
@@ -28988,10 +28975,8 @@ export interface SandboxesLike {
* all of them, local, direct and the account's live cloud sandboxes,
* whatever the default location is. `"local"`, `"cloud"` or
* `"direct"`: only those.
- * Cloud sandboxes never fail the listing: without Fleet credentials
- * they are left out silently, and when Fleet fails or takes longer than
- * 5 s they are left out with a warning (logged here;
- * [`Sandboxes::list_with_warnings`] returns it).
+ * Cua Cloud has ended: its sandboxes are never listed, and listing
+ * never asks Fleet.
*/
list(location: string | undefined, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<Array<SandboxInfo>>;
/**
@@ -29108,8 +29093,7 @@ private constructor(pointer: UniffiHandle) {
/**
* Connects directly to a machine by URL (`http(s)://host:port`, bare
- * `host:port`, a Fleet service URL or a relay URL) with an optional
- * spacesd token. No daemon is assumed and nothing is probed.
+ * `host:port` or a relay URL) with an optional spacesd token. No daemon is assumed and nothing is probed.
*/
async connectUrl(url: string, token: string | undefined, name: string | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<SandboxLike> /*throws*/ {
const __stack = uniffiIsDebug ? new Error().stack : undefined;
@@ -29144,8 +29128,9 @@ private constructor(pointer: UniffiHandle) {
}
/**
- * Creates (Fleet, local) or connects (direct) a sandbox and waits for
- * the provider and every readiness probe.
+ * Creates (local, your cloud, a provider) or connects (direct) a sandbox
+ * and waits for the provider and every readiness probe. `on: "cloud"`
+ * fails with the "Cua Cloud has ended" error.
*/
async create(options: SandboxCreateOptions, asyncOpts_?: { signal: AbortSignal }): Promise<SandboxLike> /*throws*/ {
const __stack = uniffiIsDebug ? new Error().stack : undefined;
@@ -29249,10 +29234,8 @@ private constructor(pointer: UniffiHandle) {
* all of them, local, direct and the account's live cloud sandboxes,
* whatever the default location is. `"local"`, `"cloud"` or
* `"direct"`: only those.
- * Cloud sandboxes never fail the listing: without Fleet credentials
- * they are left out silently, and when Fleet fails or takes longer than
- * 5 s they are left out with a warning (logged here;
- * [`Sandboxes::list_with_warnings`] returns it).
+ * Cua Cloud has ended: its sandboxes are never listed, and listing
+ * never asks Fleet.
*/
async list(location: string | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<Array<SandboxInfo>> /*throws*/ {
const __stack = uniffiIsDebug ? new Error().stack : undefined;
@@ -32623,8 +32606,8 @@ const uniffiTypeSpaceObjectFactory: UniffiObjectFactory<SpaceLike> = (() => {
const FfiConverterTypeSpace = new FfiConverterObject(uniffiTypeSpaceObjectFactory);
/**
- * The Spaces registry: add a machine by URL, claim a Fleet Space,
- * provision a local one, and get [`Space`] handles.
+ * The Spaces registry: add a machine by URL, provision a local one, and get
+ * [`Space`] handles.
*/
export interface SpacesLike {
@@ -32956,8 +32939,8 @@ export type SpacesInterface = SpacesLike;
/**
- * The Spaces registry: add a machine by URL, claim a Fleet Space,
- * provision a local one, and get [`Space`] handles.
+ * The Spaces registry: add a machine by URL, provision a local one, and get
+ * [`Space`] handles.
*/
export class Spaces extends UniffiAbstractObject implements SpacesLike {
@@ -35397,8 +35380,8 @@ const FfiConverterTypeSpaces = new FfiConverterObject(uniffiTypeSpacesObjectFact
/**
* The entry point of the SDK: create one with `Cua::embedded` or
- * `Cua::connect`, then reach sandboxes, Fleet, Spaces and the rest
- * through its accessors.
+ * `Cua::connect`, then reach sandboxes, Spaces and the rest through its
+ * accessors.
*/
export interface CuaLike {
@@ -35413,9 +35396,8 @@ export interface CuaLike {
*/
auth(): AuthLike;
/**
- * Fleet pools, templates, claims and images. Always talks to Fleet
- * from this process with this SDK's credentials (in daemon mode, from
- * the environment).
+ * Fleet pools, templates, claims and images. Cua Cloud has ended: this
+ * always fails with the "Cua Cloud has ended" error and never connects.
*/
fleet() /*throws*/: FleetLike;
/**
@@ -35432,7 +35414,7 @@ export interface CuaLike {
*/
mode(): CuaMode;
/**
- * Sandboxes (Fleet, local, direct).
+ * Sandboxes (local, direct, your own cloud).
*/
sandboxes(): SandboxesLike;
/**
@@ -35444,8 +35426,8 @@ export interface CuaLike {
*/
spaces(): SpacesLike;
/**
- * Connects to cua-spacesd at `url` (`host:port`, `http(s)://…`, a
- * Fleet service URL or a relay URL) without a sandbox.
+ * Connects to cua-spacesd at `url` (`host:port`, `http(s)://…` or a
+ * relay URL) without a sandbox.
*/
spacesd(url: string, token: string | undefined, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<SpacesdClientLike>;
}
@@ -35457,8 +35439,8 @@ export type CuaInterface = CuaLike;
/**
* The entry point of the SDK: create one with `Cua::embedded` or
- * `Cua::connect`, then reach sandboxes, Fleet, Spaces and the rest
- * through its accessors.
+ * `Cua::connect`, then reach sandboxes, Spaces and the rest through its
+ * accessors.
*/
export class Cua extends UniffiAbstractObject implements CuaLike {
@@ -35525,7 +35507,9 @@ private constructor(pointer: UniffiHandle) {
/**
* Runs the SDK runtime in this process. Performs no I/O beyond
- * reading the credential store when `fleet_from_session` is set.
+ * reading the credential store when `fleet_from_session` is set (for
+ * the relay account). It never builds a Fleet client: Cua Cloud has
+ * ended.
*/
static embedded(config: CuaConfig): CuaLike /*throws*/ {
return FfiConverterTypeCua.lift(uniffiCaller.rustCallWithError(
@@ -35572,9 +35556,8 @@ private constructor(pointer: UniffiHandle) {
}
/**
- * Fleet pools, templates, claims and images. Always talks to Fleet
- * from this process with this SDK's credentials (in daemon mode, from
- * the environment).
+ * Fleet pools, templates, claims and images. Cua Cloud has ended: this
+ * always fails with the "Cua Cloud has ended" error and never connects.
*/
fleet(): FleetLike /*throws*/ {
return FfiConverterTypeFleet.lift(uniffiCaller.rustCallWithError(
@@ -35659,7 +35642,7 @@ private constructor(pointer: UniffiHandle) {
}
/**
- * Sandboxes (Fleet, local, direct).
+ * Sandboxes (local, direct, your own cloud).
*/
sandboxes(): SandboxesLike {
return FfiConverterTypeSandboxes.lift(uniffiCaller.rustCall(
@@ -35717,8 +35700,8 @@ private constructor(pointer: UniffiHandle) {
}
/**
- * Connects to cua-spacesd at `url` (`host:port`, `http(s)://…`, a
- * Fleet service URL or a relay URL) without a sandbox.
+ * Connects to cua-spacesd at `url` (`host:port`, `http(s)://…` or a
+ * relay URL) without a sandbox.
*/
async spacesd(url: string, token: string | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<SpacesdClientLike> /*throws*/ {
const __stack = uniffiIsDebug ? new Error().stack : undefined;
@@ -37308,7 +37291,7 @@ function uniffiEnsureInitialized() {
if (nativeModule().uniffi_cua_sdk_checksum_constructor_cua_connect() !== 19646) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_constructor_cua_connect");
}
- if (nativeModule().uniffi_cua_sdk_checksum_constructor_cua_embedded() !== 36838) {
+ if (nativeModule().uniffi_cua_sdk_checksum_constructor_cua_embedded() !== 26623) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_constructor_cua_embedded");
}
if (nativeModule().uniffi_cua_sdk_checksum_method_cua_agent_setup() !== 50422) {
@@ -37317,7 +37300,7 @@ function uniffiEnsureInitialized() {
if (nativeModule().uniffi_cua_sdk_checksum_method_cua_auth() !== 19106) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_cua_auth");
}
- if (nativeModule().uniffi_cua_sdk_checksum_method_cua_fleet() !== 40955) {
+ if (nativeModule().uniffi_cua_sdk_checksum_method_cua_fleet() !== 45933) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_cua_fleet");
}
if (nativeModule().uniffi_cua_sdk_checksum_method_cua_info() !== 11159) {
@@ -37329,7 +37312,7 @@ function uniffiEnsureInitialized() {
if (nativeModule().uniffi_cua_sdk_checksum_method_cua_mode() !== 63626) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_cua_mode");
}
- if (nativeModule().uniffi_cua_sdk_checksum_method_cua_sandboxes() !== 8394) {
+ if (nativeModule().uniffi_cua_sdk_checksum_method_cua_sandboxes() !== 892) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_cua_sandboxes");
}
if (nativeModule().uniffi_cua_sdk_checksum_method_cua_shutdown_daemon() !== 57559) {
@@ -37338,7 +37321,7 @@ function uniffiEnsureInitialized() {
if (nativeModule().uniffi_cua_sdk_checksum_method_cua_spaces() !== 35262) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_cua_spaces");
}
- if (nativeModule().uniffi_cua_sdk_checksum_method_cua_spacesd() !== 28670) {
+ if (nativeModule().uniffi_cua_sdk_checksum_method_cua_spacesd() !== 62689) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_cua_spacesd");
}
if (nativeModule().uniffi_cua_sdk_checksum_method_devices_approve() !== 49147) {
@@ -37620,7 +37603,7 @@ function uniffiEnsureInitialized() {
if (nativeModule().uniffi_cua_sdk_checksum_method_portforward_local_addr() !== 55098) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_portforward_local_addr");
}
- if (nativeModule().uniffi_cua_sdk_checksum_method_portforward_url() !== 43553) {
+ if (nativeModule().uniffi_cua_sdk_checksum_method_portforward_url() !== 60604) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_portforward_url");
}
if (nativeModule().uniffi_cua_sdk_checksum_constructor_presenceview_new() !== 9981) {
@@ -37674,13 +37657,13 @@ function uniffiEnsureInitialized() {
if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_agents() !== 53699) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_sandbox_agents");
}
- if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_delete() !== 55409) {
+ if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_delete() !== 17492) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_sandbox_delete");
}
- if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_detach() !== 34045) {
+ if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_detach() !== 26534) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_sandbox_detach");
}
- if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_forward() !== 37775) {
+ if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_forward() !== 19019) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_sandbox_forward");
}
if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_guest_display() !== 23945) {
@@ -37704,7 +37687,7 @@ function uniffiEnsureInitialized() {
if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_is_ephemeral() !== 27021) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_sandbox_is_ephemeral");
}
- if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_keep_alive() !== 63020) {
+ if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_keep_alive() !== 3593) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_sandbox_keep_alive");
}
if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_kind() !== 13493) {
@@ -37719,7 +37702,7 @@ function uniffiEnsureInitialized() {
if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_mcp() !== 8773) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_sandbox_mcp");
}
- if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_mcp_config() !== 43800) {
+ if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_mcp_config() !== 64194) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_sandbox_mcp_config");
}
if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_name() !== 58395) {
@@ -37731,7 +37714,7 @@ function uniffiEnsureInitialized() {
if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_overlay() !== 32673) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_sandbox_overlay");
}
- if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_public_url() !== 36853) {
+ if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_public_url() !== 6460) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_sandbox_public_url");
}
if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_refresh() !== 45835) {
@@ -37776,10 +37759,10 @@ function uniffiEnsureInitialized() {
if (nativeModule().uniffi_cua_sdk_checksum_method_sandboxes_connect() !== 12250) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_sandboxes_connect");
}
- if (nativeModule().uniffi_cua_sdk_checksum_method_sandboxes_connect_url() !== 55493) {
+ if (nativeModule().uniffi_cua_sdk_checksum_method_sandboxes_connect_url() !== 19950) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_sandboxes_connect_url");
}
- if (nativeModule().uniffi_cua_sdk_checksum_method_sandboxes_create() !== 63062) {
+ if (nativeModule().uniffi_cua_sdk_checksum_method_sandboxes_create() !== 52749) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_sandboxes_create");
}
if (nativeModule().uniffi_cua_sdk_checksum_method_sandboxes_delete() !== 43939) {
@@ -37788,7 +37771,7 @@ function uniffiEnsureInitialized() {
if (nativeModule().uniffi_cua_sdk_checksum_method_sandboxes_get() !== 32181) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_sandboxes_get");
}
- if (nativeModule().uniffi_cua_sdk_checksum_method_sandboxes_list() !== 18675) {
+ if (nativeModule().uniffi_cua_sdk_checksum_method_sandboxes_list() !== 6497) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_sandboxes_list");
}
if (nativeModule().uniffi_cua_sdk_checksum_method_sandboxes_list_all() !== 9098) {
@@ -37809,10 +37792,10 @@ function uniffiEnsureInitialized() {
if (nativeModule().uniffi_cua_sdk_checksum_method_service_name() !== 19159) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_service_name");
}
- if (nativeModule().uniffi_cua_sdk_checksum_method_service_public_url() !== 16809) {
+ if (nativeModule().uniffi_cua_sdk_checksum_method_service_public_url() !== 37714) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_service_public_url");
}
- if (nativeModule().uniffi_cua_sdk_checksum_method_service_request() !== 12324) {
+ if (nativeModule().uniffi_cua_sdk_checksum_method_service_request() !== 31558) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_service_request");
}
if (nativeModule().uniffi_cua_sdk_checksum_method_service_url() !== 25888) {
diff --git a/apps/cua-spaces/src-tauri/Cargo.lock b/apps/cua-spaces/src-tauri/Cargo.lock
index 05356c205f..0fd2af4b07 100644
--- a/apps/cua-spaces/src-tauri/Cargo.lock
+++ b/apps/cua-spaces/src-tauri/Cargo.lock
@@ -1347,7 +1347,6 @@ dependencies = [
"axum",
"base64 0.22.1",
"bytes",
- "cua-auth",
"cua-disk",
"cua-fleet",
"cua-home",
@@ -1772,7 +1771,6 @@ dependencies = [
"cua-auth",
"cua-chromium-storage",
"cua-daemon",
- "cua-fleet",
"cua-home",
"cua-keyvault",
"cua-media-client",
diff --git a/docs/content/docs/cua-cli/reference/cli/volume.mdx b/docs/content/docs/cua-cli/reference/cli/volume.mdx
index 226b14999a..37097ce764 100644
--- a/docs/content/docs/cua-cli/reference/cli/volume.mdx
+++ b/docs/content/docs/cua-cli/reference/cli/volume.mdx
@@ -28,7 +28,7 @@ description: "Cua Volume: files, versions, grants, access requests and audit of
| [`cua volume mount`](#cua-volume-mount) | Show the drive as a volume (Finder on macOS, FUSE on Linux). |
| [`cua volume unmount`](#cua-volume-unmount) | Turn the volume off (files still uploading land first). |
| [`cua volume status`](#cua-volume-status) | The volume, sync across devices, and the block cache. |
-| [`cua volume config`](#cua-volume-config) | Which store the drive uses (fs, s3, cloud). |
+| [`cua volume config`](#cua-volume-config) | Which store the drive uses (fs, s3). |
| [`cua volume config show`](#cua-volume-config-show) | The backend and bucket settings in effect (never keys). |
| [`cua volume config set`](#cua-volume-config-set) | Choose the backend. |
| [`cua volume config set-keys`](#cua-volume-config-set-keys) | Save S3 keys in the credential store: the access key id and the secret, one per line on stdin. |
@@ -384,7 +384,7 @@ cua volume status --json
## `cua volume config`
-Which store the drive uses (fs, s3, cloud).
+Which store the drive uses (fs, s3).
```text output
cua volume config [OPTIONS] <COMMAND>
@@ -414,7 +414,7 @@ cua volume config set [OPTIONS] --backend <BACKEND>
| Flag | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="cua-volume-config-set--backend"></span>`--backend` | string | required | `fs` (default), `s3`, or `cloud` (off unless the Cua cloud enables it). |
+| <span id="cua-volume-config-set--backend"></span>`--backend` | string | required | `fs` (default) or `s3`. |
| <span id="cua-volume-config-set--endpoint"></span>`--endpoint` | string | | |
| <span id="cua-volume-config-set--region"></span>`--region` | string | | |
| <span id="cua-volume-config-set--bucket"></span>`--bucket` | string | | |
diff --git a/docs/content/docs/cua-sdk/reference/cua.mdx b/docs/content/docs/cua-sdk/reference/cua.mdx
index e6aff1d372..3e3f47e9dd 100644
--- a/docs/content/docs/cua-sdk/reference/cua.mdx
+++ b/docs/content/docs/cua-sdk/reference/cua.mdx
@@ -24,8 +24,8 @@ Every program starts from one `Cua` handle, embedded in the process or connected
## `Cua`
The entry point of the SDK: create one with `Cua::embedded` or
-`Cua::connect`, then reach sandboxes, Fleet, Spaces and the rest
-through its accessors.
+`Cua::connect`, then reach sandboxes, Spaces and the rest through its
+accessors.
| Method | Description |
| --- | --- |
@@ -35,7 +35,7 @@ through its accessors.
| [`fleet`](#cuafleet) | Fleet pools, templates, claims and images. |
| [`info`](#cuainfo) | SDK (and daemon) identity. |
| [`shutdown_daemon`](#cuashutdown_daemon) | Asks a connected daemon to stop (daemon mode only). |
-| [`spacesd`](#cuaspacesd) | Connects to cua-spacesd at `url` (`host:port`, `http(s)://…`, a Fleet service URL or a relay URL) without a sandbox. |
+| [`spacesd`](#cuaspacesd) | Connects to cua-spacesd at `url` (`host:port`, `http(s)://…` or a relay URL) without a sandbox. |
| Accessor | Returns | Description |
| --- | --- | --- |
@@ -43,7 +43,7 @@ through its accessors.
| `auth()` | [`Auth`](/cua-sdk/reference/auth#auth) | Sign-in and the shared session (`CUA_OIDC_ISSUER`, `CUA_CREDENTIAL_STORE`, `CUA_HOME` apply). |
| `local()` | [`Local`](/cua-sdk/reference/local#local) | Local runtimes (doctor and setup) and local images. |
| `mode()` | [`CuaMode`](#cuamode-enum) | Topology. |
-| `sandboxes()` | [`Sandboxes`](/cua-sdk/reference/sandbox#sandboxes) | Sandboxes (Fleet, local, direct). |
+| `sandboxes()` | [`Sandboxes`](/cua-sdk/reference/sandbox#sandboxes) | Sandboxes (local, direct, your own cloud). |
| `spaces()` | [`Spaces`](/cua-sdk/reference/spaces#spaces) | Spaces: the registry and every Space primitive. |
### `Cua.auto`
@@ -169,7 +169,9 @@ pub fn connect(address: Option<String>, token: Option<String>) -> Result<Arc<Cua
### `Cua.embedded`
Runs the SDK runtime in this process. Performs no I/O beyond
-reading the credential store when `fleet_from_session` is set.
+reading the credential store when `fleet_from_session` is set (for
+the relay account). It never builds a Fleet client: Cua Cloud has
+ended.
<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>
<Tab value="Python">
@@ -268,9 +270,8 @@ println(cua.mode())
### `Cua.fleet`
-Fleet pools, templates, claims and images. Always talks to Fleet
-from this process with this SDK's credentials (in daemon mode, from
-the environment).
+Fleet pools, templates, claims and images. Cua Cloud has ended: this
+always fails with the "Cua Cloud has ended" error and never connects.
<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>
<Tab value="Python">
@@ -406,8 +407,8 @@ pub async fn shutdown_daemon(&self) -> Result<(), CuaError>
### `Cua.spacesd`
-Connects to cua-spacesd at `url` (`host:port`, `http(s)://…`, a
-Fleet service URL or a relay URL) without a sandbox.
+Connects to cua-spacesd at `url` (`host:port`, `http(s)://…` or a
+relay URL) without a sandbox.
<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>
<Tab value="Python">
@@ -462,27 +463,26 @@ Configuration of an embedded SDK runtime.
| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `state_dir` / `stateDir` | `Option<String>` | `None` | State directory for sandbox state files (default `~/.cua/sandboxes`). |
-| `fleet` | [`Option<FleetSettings>`](#fleetsettings-record) | `None` | Fleet settings (merged over the environment). |
-| `fleet_from_env` / `fleetFromEnv` | `bool` | `true` | Read Fleet settings from the environment. |
+| `fleet` | [`Option<FleetSettings>`](#fleetsettings-record) | `None` | Ignored: Cua Cloud has ended. |
+| `fleet_from_env` / `fleetFromEnv` | `bool` | `true` | Ignored: Cua Cloud has ended. |
| `env_probe_timeout_ms` / `envProbeTimeoutMs` | `Option<u32>` | `None` | spacesd probe timeout (default 15 s). |
| `spaces_home` / `spacesHome` | `Option<String>` | `None` | Spaces registry directory (default `$CUA_HOME` or `~/.cua`). |
| `teleport_home` / `teleportHome` | `Option<String>` | `None` | Teleport reads app sessions under this home directory with no host side effects (tests, CI). Default: the real host. |
-| `fleet_from_session` / `fleetFromSession` | `bool` | `false` | When the settings and environment carry no Fleet credentials, use the signed-in session (`Cua.auth()`, `cua auth login`) from the shared credential store, refreshed as needed. |
-| `fleet_pool_home` / `fleetPoolHome` | `Option<String>` | `None` | Where managed Fleet pools keep their name cache and machine-wide GC lock (default: `$CUA_HOME` or `~/.cua`, or next to `state_dir`). |
+| `fleet_from_session` / `fleetFromSession` | `bool` | `false` | Use the signed-in session (`Cua.auth()`, `cua auth login`) from the shared credential store, refreshed as needed, for the relay account the runtime lists the account's machines with ("My machines"). The name is historical: it no longer builds a Fleet client, because Cua Cloud has ended. |
+| `fleet_pool_home` / `fleetPoolHome` | `Option<String>` | `None` | Ignored: Cua Cloud has ended, so there are no managed pools. |
## `FleetSettings` record
-Fleet credentials and endpoints. Unset fields fall back to the
-environment (`CUA_FLEET_BASE_URL`, `CUA_TOKEN_URL`, `CUA_CLIENT_ID`,
-`CUA_CLIENT_SECRET`, `FLEETS_TOKEN`) when `CuaConfig.fleet_from_env`.
+Fleet credentials and endpoints. Ignored: Cua Cloud has ended, so nothing
+reads them any more. Kept so existing callers still compile.
| Field | Type | Default | Description |
| --- | --- | --- | --- |
-| `base_url` / `baseUrl` | `Option<String>` | `None` | Fleet API base URL. |
-| `token_url` / `tokenUrl` | `Option<String>` | `None` | OAuth token URL. |
-| `client_id` / `clientId` | `Option<String>` | `None` | OAuth client id. |
-| `client_secret` / `clientSecret` | `Option<String>` | `None` | OAuth client secret. |
-| `token` | `Option<String>` | `None` | Static Fleet token (wins over client credentials). |
+| `base_url` / `baseUrl` | `Option<String>` | `None` | Ignored. |
+| `token_url` / `tokenUrl` | `Option<String>` | `None` | Ignored. |
+| `client_id` / `clientId` | `Option<String>` | `None` | Ignored. |
+| `client_secret` / `clientSecret` | `Option<String>` | `None` | Ignored. |
+| `token` | `Option<String>` | `None` | Ignored. |
## `CuaInfo` record
diff --git a/docs/content/docs/cua-sdk/reference/errors.mdx b/docs/content/docs/cua-sdk/reference/errors.mdx
index e69a140e51..553c082f48 100644
--- a/docs/content/docs/cua-sdk/reference/errors.mdx
+++ b/docs/content/docs/cua-sdk/reference/errors.mdx
@@ -103,12 +103,12 @@ try {
| [`InvalidArgument`](#invalidargument) | `invalid argument: <detail>` | Bad input. |
| [`InvalidPlacement`](#invalidplacement) | `invalid placement: <detail>` | A location, kind or runtime that does not exist, or a combination of them (or with the image) that does not. |
| [`NotFound`](#notfound) | `not found: <detail>` | No such sandbox, process, path, forward or session. |
-| [`ProviderNotConfigured`](#providernotconfigured) | `provider not configured: <detail>` | The provider is not configured (for example no Fleet credentials). |
+| [`ProviderNotConfigured`](#providernotconfigured) | `provider not configured: <detail>` | The provider is not configured (for example no credentials for it). |
| [`Unsupported`](#unsupported) | `unsupported: <detail>` | Not supported by this provider, guest or build. |
| [`SpacesdNotAvailable`](#spacesdnotavailable) | `cua-spacesd is not available: <detail>` | No cua-spacesd answered in the sandbox or at the URL. |
| [`Timeout`](#timeout) | `timed out: <detail>` | A deadline elapsed. |
| [`Fleet`](#fleet) | `fleet: <detail>` | Fleet API failure. |
-| [`FleetAdmissionDenied`](#fleetadmissiondenied) | `fleet admission denied: <detail>` | Fleet's admission refused the request: a sandbox or pool size over this account's limits, or a template its policy does not admit. |
+| [`FleetAdmissionDenied`](#fleetadmissiondenied) | `fleet admission denied: <detail>` | Fleet's admission refused the request. |
| [`CloudCreditExhausted`](#cloudcreditexhausted) | `<detail>` | The account is out of Cua Cloud credit: no credit left, and no card or plan. |
| [`Runtime`](#runtime) | `local runtime: <detail>` | Local runtime failure. |
| [`Env`](#env) | `env: <detail>` | spacesd call failure. |
@@ -121,8 +121,8 @@ try {
| [`CapabilityMissing`](#capabilitymissing) | `capability missing: <detail>` | The Space's spacesd reports a feature this call needs as unsupported (the message names it). |
| [`HostCapabilityMissing`](#hostcapabilitymissing) | `host capability missing: <detail>` | A host-side prerequisite (app-session providers, an operator display, a local runtime) is not available. |
| [`TeleportRefused`](#teleportrefused) | `teleport refused: <detail>` | The teleport consent gate refused (or the approver declined). |
-| [`PoolSpecMismatch`](#poolspecmismatch) | `pool spec mismatch: <detail>` | A named cloud pool's template differs from the requested sandbox fields; the message holds the diff (pass `apply` to update it). |
-| [`ClaimSecretsNotDelivered`](#claimsecretsnotdelivered) | `claim secrets not delivered: <detail>` | A claim bound but its per-claim secrets (the env token) never reached the sandbox within the bounded wait; the claim was released. |
+| [`PoolSpecMismatch`](#poolspecmismatch) | `pool spec mismatch: <detail>` | A named cloud pool's template differs from the requested sandbox fields. |
+| [`ClaimSecretsNotDelivered`](#claimsecretsnotdelivered) | `claim secrets not delivered: <detail>` | A claim bound but its per-claim secrets (the env token) never reached the sandbox. |
| [`Internal`](#internal) | `internal: <detail>` | Bug or I/O failure. |
| [`AmbiguousSandbox`](#ambiguoussandbox) | `ambiguous sandbox name: <detail>` | A bare sandbox name matches sandboxes in more than one location. |
| [`InsufficientDisk`](#insufficientdisk) | `insufficient disk: <detail>` | A pull, build or VM create would leave less than the configured minimum free disk space (`CUA_DISK_MIN_FREE`, default 5 GiB); nothing was written. |
@@ -168,10 +168,10 @@ sandboxes this client can see.
## `ProviderNotConfigured`
-**Cause** The provider is not configured (for example no Fleet credentials).
+**Cause** The provider is not configured (for example no credentials for it).
-**Fix** Set `FLEETS_TOKEN`, or `CUA_CLIENT_ID` and `CUA_CLIENT_SECRET`, or
-run `cua auth login` and create the client with `fleet_from_session`.
+**Fix** Set the credentials the message names (for a contrib provider, its
+environment variable or `cua auth provider set <name>`).
**Message** `provider not configured: <detail>`
@@ -208,22 +208,21 @@ the sandbox or service actually starts.
## `Fleet`
-**Cause** Fleet API failure.
+**Cause** Fleet API failure. Cua Cloud has ended, so the SDK no longer raises
+this.
-**Fix** Read the status in the message. Retry a transient failure; check
-the credentials and the account's capacity otherwise.
+**Fix** Use a local sandbox or your own machine; see the Cua Cloud has
+ended guide.
**Message** `fleet: <detail>`
## `FleetAdmissionDenied`
-**Cause** Fleet's admission refused the request: a sandbox or pool size over
-this account's limits, or a template its policy does not admit. The
-message is Fleet's own and names the limit.
+**Cause** Fleet's admission refused the request. Cua Cloud has ended, so the SDK
+no longer raises this.
-**Fix** Pick a size within the limit the message names (most accounts
-run 1-8 vCPUs and 1-32 GiB per sandbox), or contact Cua support to
-raise the account's limits.
+**Fix** Use a local sandbox or your own machine; see the Cua Cloud has
+ended guide.
**Message** `fleet admission denied: <detail>`
@@ -272,8 +271,7 @@ HTTP.
**Cause** Missing or wrong token or ticket.
-**Fix** Pass the sandbox's env token, refresh the Fleet credentials, or run
-`cua auth login` again.
+**Fix** Pass the sandbox's env token, or run `cua auth login` again.
**Message** `unauthenticated: <detail>`
@@ -357,9 +355,10 @@ scope.
## `PoolSpecMismatch`
**Cause** A named cloud pool's template differs from the requested sandbox
-fields; the message holds the diff (pass `apply` to update it).
+fields. Cua Cloud has ended, so the SDK no longer raises this.
-**Fix** Pass the pool's own fields, or pass `apply` to update its template.
+**Fix** Use a local sandbox or your own machine; see the Cua Cloud has
+ended guide.
**Message** `pool spec mismatch: <detail>`
@@ -368,10 +367,11 @@ fields; the message holds the diff (pass `apply` to update it).
## `ClaimSecretsNotDelivered`
**Cause** A claim bound but its per-claim secrets (the env token) never
-reached the sandbox within the bounded wait; the claim was released.
+reached the sandbox. Cua Cloud has ended, so the SDK no longer raises
+this.
-**Fix** Retry. If it keeps failing, check the pool's claim-secrets setup
-and the Fleet status.
+**Fix** Use a local sandbox or your own machine; see the Cua Cloud has
+ended guide.
**Message** `claim secrets not delivered: <detail>`
diff --git a/docs/content/docs/cua-sdk/reference/fleet/index.mdx b/docs/content/docs/cua-sdk/reference/fleet/index.mdx
index fd7caa959e..ad92e9e240 100644
--- a/docs/content/docs/cua-sdk/reference/fleet/index.mdx
+++ b/docs/content/docs/cua-sdk/reference/fleet/index.mdx
@@ -18,7 +18,8 @@ Python programs usually use the high-level API instead: [`cua_sandbox.Pool`](/cu
## `Fleet`
-Fleet control plane.
+Fleet control plane. Cua Cloud has ended: `Cua.fleet()` never returns
+one, so none of its methods can be called.
Returned by [`Cua.fleet`](/cua-sdk/reference/cua#cuafleet).
diff --git a/docs/content/docs/cua-sdk/reference/image.mdx b/docs/content/docs/cua-sdk/reference/image.mdx
index f77d395e7a..d19b421979 100644
--- a/docs/content/docs/cua-sdk/reference/image.mdx
+++ b/docs/content/docs/cua-sdk/reference/image.mdx
@@ -433,10 +433,10 @@ Returned by [`Fleet.pool_image_info`](/cua-sdk/reference/fleet#fleetpool_image_i
## `ImageBuild` record
-Image layers built on top of a sandbox's image. Cloud: a remote build
-(Fleet images API). Local: a build into the container engine (container
-images only; VM images take no layers here). Both are cached by the same
-content hash (`cua-b-<hash>`), so an identical spec never rebuilds.
+Image layers built on top of a sandbox's image. Local: a build into the
+container engine (container images only; VM images take no layers here),
+cached by a content hash (`cua-b-<hash>`), so an identical spec never
+rebuilds. (Cua Cloud's remote build has ended.)
| Field | Type | Default | Description |
| --- | --- | --- | --- |
diff --git a/docs/content/docs/cua-sdk/reference/rust/cua-spaces.mdx b/docs/content/docs/cua-sdk/reference/rust/cua-spaces.mdx
index a2146c8dc4..b8b916f66e 100644
--- a/docs/content/docs/cua-sdk/reference/rust/cua-spaces.mdx
+++ b/docs/content/docs/cua-sdk/reference/rust/cua-spaces.mdx
@@ -1308,8 +1308,7 @@ How a declared service is reached.
```rust
pub enum ServiceSource {
- Sandbox(Service),
- Fleet { fleet: FleetClient, bound: BoundSandbox, service: String },
+ Sandbox(Box<Service>),
Url(ServiceEndpoint),
}
```
@@ -1664,7 +1663,6 @@ impl Spaces {
fn builder() -> SpacesBuilder;
fn home_dir(&self) -> &Path;
fn registry(&self) -> &Registry;
- fn fleet(&self) -> Option<&FleetClient>;
fn sandboxes(&self) -> &Sandboxes;
fn operator_display(&self) -> &Arc<dyn OperatorDisplay>;
fn fleet_namespace(&self) -> &str;
diff --git a/docs/content/docs/cua-sdk/reference/sandbox/index.mdx b/docs/content/docs/cua-sdk/reference/sandbox/index.mdx
index 65794a1506..09fa469ca5 100644
--- a/docs/content/docs/cua-sdk/reference/sandbox/index.mdx
+++ b/docs/content/docs/cua-sdk/reference/sandbox/index.mdx
@@ -38,8 +38,8 @@ Returned by [`Cua.sandboxes`](/cua-sdk/reference/cua#cua).
| --- | --- |
| [`cancel_create`](#sandboxescancel_create) | Cancels the create of the named sandbox `name` that is still running (in this process or the daemon): the work in flight stops (an image download, a boot, a claim) and what the create made is deleted; a sandbox of that name that existed before is never touched. |
| [`connect`](#sandboxesconnect) | Reattaches to a sandbox by ref (`local:<name>`, `cloud:<name>`, `direct:<host:port>`, a legacy id) or by a name that is unique across locations (else `AmbiguousSandbox`, listing the qualified refs). |
-| [`connect_url`](#sandboxesconnect_url) | Connects directly to a machine by URL (`http(s)://host:port`, bare `host:port`, a Fleet service URL or a relay URL) with an optional spacesd token. |
-| [`create`](#sandboxescreate) | Creates (Fleet, local) or connects (direct) a sandbox and waits for the provider and every readiness probe. |
+| [`connect_url`](#sandboxesconnect_url) | Connects directly to a machine by URL (`http(s)://host:port`, bare `host:port` or a relay URL) with an optional spacesd token. |
+| [`create`](#sandboxescreate) | Creates (local, your cloud, a provider) or connects (direct) a sandbox and waits for the provider and every readiness probe. |
| [`delete`](#sandboxesdelete) | Deletes a sandbox by ref or unique name. |
| [`get`](#sandboxesget) | One sandbox's info, by ref or unique name. |
| [`list`](#sandboxeslist) | Sandboxes, each tagged with its `location`. |
@@ -155,8 +155,7 @@ pub async fn connect(&self, name: String) -> Result<Arc<Sandbox>, CuaError>
### `Sandboxes.connect_url`
Connects directly to a machine by URL (`http(s)://host:port`, bare
-`host:port`, a Fleet service URL or a relay URL) with an optional
-spacesd token. No daemon is assumed and nothing is probed.
+`host:port` or a relay URL) with an optional spacesd token. No daemon is assumed and nothing is probed.
<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>
<Tab value="Python">
@@ -271,8 +270,9 @@ println(out.stdout.decodeToString())
### `Sandboxes.create`
-Creates (Fleet, local) or connects (direct) a sandbox and waits for
-the provider and every readiness probe.
+Creates (local, your cloud, a provider) or connects (direct) a sandbox
+and waits for the provider and every readiness probe. `on: "cloud"`
+fails with the "Cua Cloud has ended" error.
<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>
<Tab value="Python">
@@ -517,10 +517,8 @@ Sandboxes, each tagged with its `location`. `None` (the default):
all of them, local, direct and the account's live cloud sandboxes,
whatever the default location is. `"local"`, `"cloud"` or
`"direct"`: only those.
-Cloud sandboxes never fail the listing: without Fleet credentials
-they are left out silently, and when Fleet fails or takes longer than
-5 s they are left out with a warning (logged here;
-`Sandboxes.list_with_warnings` returns it).
+Cua Cloud has ended: its sandboxes are never listed, and listing
+never asks Fleet.
<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>
<Tab value="Python">
@@ -674,17 +672,17 @@ Returned by [`Sandboxes.connect`](#sandboxesconnect), [`Sandboxes.connect_url`](
| [`spacesd`](#sandboxspacesd) | Attaches to cua-spacesd inside the sandbox (the `env` service or guest port 3211). |
| [`viewer_url`](#sandboxviewer_url) | A browser link to this sandbox's desktop in the cua-spacesd HTML5 viewer (`/viewer` on the `env` service): video, audio, input, clipboard, file drop and folder sharing, in any modern browser. |
| [`agents`](/cua-sdk/reference/agents#sandboxagents) | Coding agents inside this sandbox (needs cua-spacesd): run a harness over ACP, stream normalized events, follow up, interrupt, collect results; runs outlive this handle. |
-| [`delete`](/cua-sdk/reference/sandbox/lifecycle#sandboxdelete) | Deletes (Fleet: releases the claim and an ephemeral pool). |
-| [`detach`](/cua-sdk/reference/sandbox/lifecycle#sandboxdetach) | Managed Fleet claims: stop renewing the claim and forget the handle; the claim runs until its current shutdown time. |
-| [`forward`](/cua-sdk/reference/services#sandboxforward) | Forwards a loopback port to guest `port`: a TCP forward locally (and over cua-spacesd's tunnel when the image has it); in the cloud without cua-spacesd, a loopback HTTP/WebSocket proxy through the Fleet gateway. |
+| [`delete`](/cua-sdk/reference/sandbox/lifecycle#sandboxdelete) | Deletes (local: removes it; direct: forgets it; your cloud: deletes the machine). |
+| [`detach`](/cua-sdk/reference/sandbox/lifecycle#sandboxdetach) | Forgets the handle this runtime holds (a Cua Cloud claim used to stop renewing; Cua Cloud has ended). |
+| [`forward`](/cua-sdk/reference/services#sandboxforward) | Forwards a loopback port to guest `port`: a TCP forward locally (and over cua-spacesd's tunnel when the image has it). |
| [`guest_display`](/cua-sdk/reference/sandbox/without-spacesd#sandboxguest_display) | The guest display without cua-spacesd: the VM's VNC endpoint and a host command that opens it (`lume attach`). |
| [`guest_screenshot`](/cua-sdk/reference/sandbox/without-spacesd#sandboxguest_screenshot) | Captures the guest framebuffer as PNG without cua-spacesd. |
| [`guest_sh`](/cua-sdk/reference/sandbox/without-spacesd#sandboxguest_sh) | Runs `line` with `/bin/sh -c` in the guest without cua-spacesd, to completion (default timeout 120 s). |
-| [`keep_alive`](/cua-sdk/reference/sandbox/lifecycle#sandboxkeep_alive) | Extends a Fleet lease by `seconds`. |
+| [`keep_alive`](/cua-sdk/reference/sandbox/lifecycle#sandboxkeep_alive) | Extends the sandbox's lease by `seconds`, for a provider that has one. |
| [`mcp`](/cua-sdk/reference/services#sandboxmcp) | An MCP client (the official Rust SDK) for the MCP server behind `service` at `path` (default `/mcp`). |
| [`mcp_config`](/cua-sdk/reference/services#sandboxmcp_config) | Where the MCP server behind `service` is (URL of its endpoint at `path`, default `/mcp`, plus the headers every request needs), for any MCP client. |
| [`open_media_bridge`](/cua-sdk/reference/spacesd/media#sandboxopen_media_bridge) | Opens a media session and returns a loopback WebSocket bridge for a webview (daemon mode). |
-| [`public_url`](/cua-sdk/reference/services#sandboxpublic_url) | A shareable URL for `service` that stops working after `ttl_seconds` (60 s to 24 h, default 1 h). |
+| [`public_url`](/cua-sdk/reference/services#sandboxpublic_url) | A shareable URL for `service` that stops working after `ttl_seconds` (60 s to 24 h, default 1 h): a loopback URL with its own token, served by the cua daemon (started if needed; `CUA_BIN` names the CLI). |
| [`refresh`](/cua-sdk/reference/sandbox/lifecycle#sandboxrefresh) | Fresh info (status from the provider). |
| [`restart`](/cua-sdk/reference/sandbox/lifecycle#sandboxrestart) | Restarts. |
| [`resume`](/cua-sdk/reference/sandbox/lifecycle#sandboxresume) | Resumes. |
@@ -875,12 +873,12 @@ Returned by [`Sandbox.info`](#sandbox), [`Sandbox.refresh`](/cua-sdk/reference/s
| `name` | `String` | | Name. |
| `kind` | `String` | | What kind of machine: `container` or `vm` (empty when not known: an existing machine, or a cloud sandbox this client did not create). |
| `runtime` | `String` | | The engine that runs it: `gvisor`, `runc`, `qemu`, `lume` or `kubevirt` (empty when not known). |
-| `runtime_type` / `runtimeType` | `String` | | `runtime_type` as persisted (`fleet`, `direct`, `gvisor`, `qemu`, ...); prefer `location`, `kind` and `runtime`. |
+| `runtime_type` / `runtimeType` | `String` | | `runtime_type` as persisted (`direct`, `gvisor`, `qemu`, ...; `fleet` for a record of the Cua Cloud that has ended); prefer `location`, `kind` and `runtime`. |
| `status` | [`SandboxStatus`](#sandboxstatus-enum) | | Status. |
| `status_detail` / `statusDetail` | `Option<String>` | | Provider's word for an unknown status. |
| `ephemeral` | `bool` | | No state file; torn down on delete. |
| `services` | `HashMap<String, u16>` | | Declared services: name → guest port (0 = only the name is known). |
-| `endpoints` | `HashMap<String, String>` | | Service base URLs by name (Fleet: gateway URLs that need the Fleet bearer). |
+| `endpoints` | `HashMap<String, String>` | | Service base URLs by name. |
| `image` | `Option<String>` | | Image, when known. |
| `id` | `String` | | Qualified ref, the same kind of value local and in the cloud: `local:<name>`, `cloud:<name>` or `direct:<host:port>`. Every call that takes a sandbox name accepts it. |
| `phase` | [`SandboxPhase`](#sandboxphase-enum) | | Portable phase: provisioning, starting, ready or stopped. |
diff --git a/docs/content/docs/cua-sdk/reference/sandbox/lifecycle.mdx b/docs/content/docs/cua-sdk/reference/sandbox/lifecycle.mdx
index 741f3cf0f2..cd55079015 100644
--- a/docs/content/docs/cua-sdk/reference/sandbox/lifecycle.mdx
+++ b/docs/content/docs/cua-sdk/reference/sandbox/lifecycle.mdx
@@ -117,7 +117,7 @@ pub async fn refresh(&self) -> Result<SandboxInfo, CuaError>
### `Sandbox.keep_alive`
-Extends a Fleet lease by `seconds`.
+Extends the sandbox's lease by `seconds`, for a provider that has one.
<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>
<Tab value="Python">
@@ -301,9 +301,8 @@ pub async fn restart(&self) -> Result<(), CuaError>
### `Sandbox.detach`
-Managed Fleet claims: stop renewing the claim and forget the handle;
-the claim runs until its current shutdown time. Embedded runtime
-only (a daemon holds its claims by design).
+Forgets the handle this runtime holds (a Cua Cloud claim used to
+stop renewing; Cua Cloud has ended). Embedded runtime only.
<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>
<Tab value="Python">
@@ -348,7 +347,8 @@ pub fn detach(&self) -> Result<(), CuaError>
### `Sandbox.delete`
-Deletes (Fleet: releases the claim and an ephemeral pool).
+Deletes (local: removes it; direct: forgets it; your cloud: deletes
+the machine).
<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>
<Tab value="Python">
diff --git a/docs/content/docs/cua-sdk/reference/sandbox/options.mdx b/docs/content/docs/cua-sdk/reference/sandbox/options.mdx
index e2d9321f14..0c3adc173e 100644
--- a/docs/content/docs/cua-sdk/reference/sandbox/options.mdx
+++ b/docs/content/docs/cua-sdk/reference/sandbox/options.mdx
@@ -28,16 +28,16 @@ Options for `Sandboxes.create`.
| `image` | `String` | `""` | Image reference. Locally, `pool:<name>` runs that cloud pool's template image. |
| `name` | `Option<String>` | `None` | Name. `None`: ephemeral (cloud: released with the sandbox; the managed capacity stays for reuse). |
| `token` | `Option<String>` | `None` | spacesd token. |
-| `pool` | `Option<String>` | `None` | Fleet: claim from this existing (user-owned) pool. Unset: a managed, autoscaled pool keyed by image and shape. Local (with an empty image): run this Fleet pool's template locally. |
+| `pool` | `Option<String>` | `None` | Cua Cloud has ended: a pool fails with the "Cua Cloud has ended" error. |
| `os` | `Option<String>` | `None` | Guest OS (`linux`, `macos`, `windows`). |
| `cpus` | `Option<u32>` | `None` | vCPUs. |
| `memory_mb` / `memoryMb` | `Option<u64>` | `None` | Memory (MiB). |
-| `ports` | `Vec<u16>` | `[]` | Extra guest ports (local: published; Fleet: `port-<n>` services). |
+| `ports` | `Vec<u16>` | `[]` | Extra guest ports (local: published). |
| `services` | `HashMap<String, u16>` | `[:]` | Named services (name → guest port). `env` defaults to 3211. |
| `wait_for` / `waitFor` | [`Vec<ReadinessProbe>`](#readinessprobe-record) | `[]` | Readiness probes. |
| `ready_timeout_ms` / `readyTimeoutMs` | `Option<u32>` | `None` | Readiness budget (default 10 min). |
-| `env` | `HashMap<String, String>` | `[:]` | Guest environment (local: container environment or cloud-init; cloud: the template environment with `processMode: Run`, on gVisor and KubeVirt; values are not secrets). |
-| `fleet_replicas` / `fleetReplicas` | `Option<u32>` | `None` | Deprecated: initial replicas of a new managed pool (&gt; 0 = warm). |
+| `env` | `HashMap<String, String>` | `[:]` | Guest environment (local: container environment or cloud-init; values are not secrets). |
+| `fleet_replicas` / `fleetReplicas` | `Option<u32>` | `None` | Deprecated, and Cua Cloud has ended: initial replicas of a new managed pool (&gt; 0 = warm). |
| `fleet_ttl_seconds` / `fleetTtlSeconds` | `Option<u32>` | `None` | Deprecated: use `cloud.claim_ttl_seconds`. |
| `warm` | `Option<bool>` | `None` | Deprecated: use `cloud.warm`. |
| `max_pool_size` / `maxPoolSize` | `Option<u32>` | `None` | Deprecated: use `cloud.max_pool_size`. |
@@ -63,7 +63,7 @@ unset means the cloud; with `on = "local"` they are an error.
| `max_pool_size` / `maxPoolSize` | `Option<u32>` | `None` | Most sandboxes of this image at once (default 10). |
| `claim_ttl_seconds` / `claimTtlSeconds` | `Option<u32>` | `None` | Seconds the sandbox outlives this process without a keep-alive (renewed while held; default 15 min). |
| `pool` | `Option<String>` | `None` | Dedicated capacity: claim from this existing pool. The sandbox fields given alongside (image, command, env, services, sidecars, cpus, memory) must match its template, or creation fails with `PoolSpecMismatch` and a diff. |
-| `apply` | `bool` | `false` | With `pool`: update the pool's template to the given fields instead of failing on a mismatch (`Fleet.apply` semantics for the template; the pool's capacity is kept). Managed pools refuse it. |
+| `apply` | `bool` | `false` | With `pool`: update the pool's template to the given fields instead of failing on a mismatch. Cua Cloud has ended: ignored. |
## `ReadinessProbe` record
diff --git a/docs/content/docs/cua-sdk/reference/services.mdx b/docs/content/docs/cua-sdk/reference/services.mdx
index 9784b64173..34e14e13fa 100644
--- a/docs/content/docs/cua-sdk/reference/services.mdx
+++ b/docs/content/docs/cua-sdk/reference/services.mdx
@@ -123,9 +123,8 @@ pub fn services(&self) -> HashMap<String, u16>
### `Sandbox.forward`
Forwards a loopback port to guest `port`: a TCP forward locally (and
-over cua-spacesd's tunnel when the image has it); in the cloud
-without cua-spacesd, a loopback HTTP/WebSocket proxy through the
-Fleet gateway. Either way `url()` is a loopback URL.
+over cua-spacesd's tunnel when the image has it). `url()` is a
+loopback URL.
<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>
<Tab value="Python">
@@ -175,9 +174,8 @@ pub async fn forward(&self, port: u16) -> Result<Arc<PortForward>, CuaError>
### `Sandbox.public_url`
A shareable URL for `service` that stops working after `ttl_seconds`
-(60 s to 24 h, default 1 h). Cloud: a Fleet signed service URL.
-Local: a loopback URL with its own token, served by the cua daemon
-(started if needed; `CUA_BIN` names the CLI).
+(60 s to 24 h, default 1 h): a loopback URL with its own token, served
+by the cua daemon (started if needed; `CUA_BIN` names the CLI).
<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>
<Tab value="Python">
@@ -279,9 +277,8 @@ pub async fn revoke_public_url(&self, id: String) -> Result<(), CuaError>
Where the MCP server behind `service` is (URL of its endpoint at
`path`, default `/mcp`, plus the headers every request needs), for
-any MCP client. Embedded: the service route itself (loopback, or the
-Fleet gateway with a fresh bearer and claim header). Daemon: the
-daemon's streaming passthrough with its loopback bearer.
+any MCP client. Embedded: the service route itself (loopback).
+Daemon: the daemon's streaming passthrough with its loopback bearer.
<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>
<Tab value="Python">
@@ -391,7 +388,7 @@ Returned by [`Sandbox.service`](#sandboxservice).
| [`endpoint`](#serviceendpoint) | Where this service is reachable from this process: base URL plus the headers every request needs. |
| [`mcp`](#servicemcp) | An MCP client (the official Rust SDK) for this service's endpoint at `path` (default `/mcp`). |
| [`mcp_config`](#servicemcp_config) | The MCP endpoint of this service at `path` (default `/mcp`). |
-| [`public_url`](#servicepublic_url) | A shareable URL for this service that stops working after `ttl_seconds` (60 s to 24 h, default 1 h): the same as `Sandbox.public_url(name, ...)`. |
+| [`public_url`](#servicepublic_url) | A shareable URL for this service that stops working after `ttl_seconds` (60 s to 24 h, default 1 h): the same as `Sandbox.public_url(name, ...)`: a loopback URL with its own token, served by the cua daemon. |
| [`request`](#servicerequest) | One HTTP request to `path` on the service. |
| [`url`](#serviceurl) | A URL for the service usable from this machine with no credentials (no trailing slash): the published loopback port locally, a signed service URL (1 h, renewed on later calls) in the cloud. |
@@ -549,8 +546,8 @@ pub async fn mcp_config(&self, path: Option<String>) -> Result<McpConfig, CuaErr
A shareable URL for this service that stops working after
`ttl_seconds` (60 s to 24 h, default 1 h): the same as
-`Sandbox.public_url(name, ...)`. Cloud: a Fleet signed service URL.
-Local: a loopback URL with its own token, served by the cua daemon.
+`Sandbox.public_url(name, ...)`: a loopback URL with its own token,
+served by the cua daemon.
<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>
<Tab value="Python">
@@ -600,11 +597,9 @@ pub async fn public_url(&self, ttl_seconds: Option<u32>, label: Option<String>)
### `Service.request`
-One HTTP request to `path` on the service. Credentials (Fleet bearer
-and claim) are attached by the runtime. `headers` are sent as given
-(for example `content-type`, or `accept` and `mcp-session-id` for
-MCP over Fleet); `authorization` is refused on Fleet, where the
-gateway bearer owns it.
+One HTTP request to `path` on the service. Credentials are attached by
+the runtime. `headers` are sent as given (for example `content-type`,
+or `accept` and `mcp-session-id` for MCP).
<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>
<Tab value="Python">
@@ -750,7 +745,7 @@ Returned by [`Sandbox.forward`](#sandboxforward).
| --- | --- | --- |
| `guest_port()` | `u16` | Guest port. |
| `local_addr()` | `Option<String>` | Loopback `host:port` accepting connections (local/direct). |
-| `url()` | `Option<String>` | URL to use (loopback URL, or the Fleet gateway URL). |
+| `url()` | `Option<String>` | URL to use (a loopback URL). |
### `PortForward.close`
diff --git a/docs/content/docs/cua-sdk/reference/spaces/create.mdx b/docs/content/docs/cua-sdk/reference/spaces/create.mdx
index a2dfa64fc9..beb94bfd0e 100644
--- a/docs/content/docs/cua-sdk/reference/spaces/create.mdx
+++ b/docs/content/docs/cua-sdk/reference/spaces/create.mdx
@@ -27,8 +27,8 @@ as sandboxes.
| `kind` | `Option<String>` | `None` | `auto` (default), `container` or `vm`. |
| `runtime` | `Option<String>` | `None` | `auto` (default) or an engine the location offers for the kind. |
| `name` | `Option<String>` | `None` | Name (default `space-<hex>`). |
-| `cpus` | `Option<u32>` | `None` | vCPUs. Local default 2; cloud 1-64 (most accounts run 1-8; Fleet decides), default the pool template's (4). |
-| `memory_mb` / `memoryMb` | `Option<u64>` | `None` | Memory in MiB. Local default 4096; cloud 512 up to 524288 (most accounts run 1024-32768; Fleet decides), default the pool template's (4096). |
+| `cpus` | `Option<u32>` | `None` | vCPUs. Local default 2. |
+| `memory_mb` / `memoryMb` | `Option<u64>` | `None` | Memory in MiB. Local default 4096. |
| `disk_gb` / `diskGb` | `Option<u32>` | `None` | Grow the VM's disk to this many GiB (local VMs; default: the image's size, never smaller). Lume grows the macOS APFS container before the first boot; Linux images grow their root partition at boot. Containers and cloud Spaces refuse it. |
| `timeout_ms` / `timeoutMs` | `Option<u64>` | `None` | Readiness budget (local; default 600 s). |
| `wait` | `Option<bool>` | `None` | Wait until ready (default true). |
@@ -147,7 +147,7 @@ Returned by [`Spaces.gpu_support`](/cua-sdk/reference/spaces#spacesgpu_support).
| Field | Type | Default | Description |
| --- | --- | --- | --- |
-| `runtime` | `String` | | `lume`, `qemu`, `container`, `gvisor`, `fleet`, a provider's name. |
+| `runtime` | `String` | | `lume`, `qemu`, `container`, `gvisor`, a provider's name. |
| `options` | [`Vec<GpuOption>`](#gpuoption-record) | | Its options. |
| `reason` | `String` | | Why it has none. |
diff --git a/docs/content/docs/cua-sdk/reference/spaces/index.mdx b/docs/content/docs/cua-sdk/reference/spaces/index.mdx
index 6d0b49dde8..c42ef31a77 100644
--- a/docs/content/docs/cua-sdk/reference/spaces/index.mdx
+++ b/docs/content/docs/cua-sdk/reference/spaces/index.mdx
@@ -16,8 +16,8 @@ import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
## `Spaces`
-The Spaces registry: add a machine by URL, claim a Fleet Space,
-provision a local one, and get `Space` handles.
+The Spaces registry: add a machine by URL, provision a local one, and get
+`Space` handles.
Returned by [`Cua.spaces`](/cua-sdk/reference/cua#cua).
diff --git a/docs/content/docs/cua-sdk/reference/spaces/streams.mdx b/docs/content/docs/cua-sdk/reference/spaces/streams.mdx
index 8df44f2a8a..7b48467658 100644
--- a/docs/content/docs/cua-sdk/reference/spaces/streams.mdx
+++ b/docs/content/docs/cua-sdk/reference/spaces/streams.mdx
@@ -564,7 +564,7 @@ Returned by [`Space.open_stream`](#spaceopen_stream).
| `wire_version` / `wireVersion` | `u32` | | Media wire version. |
| `width` | `u32` | | Initial width. |
| `height` | `u32` | | Initial height. |
-| `needs_headers` / `needsHeaders` | `bool` | | Attaching needs `Space.websocket_headers` (Fleet gateway or the daemon passthrough). |
+| `needs_headers` / `needsHeaders` | `bool` | | Attaching needs `Space.websocket_headers` (a gateway or the daemon passthrough). |
## `SpaceStreamStats` record
diff --git a/docs/content/docs/cua-sdk/reference/spacesd/index.mdx b/docs/content/docs/cua-sdk/reference/spacesd/index.mdx
index 5129ba9e7b..aeb9e4fe82 100644
--- a/docs/content/docs/cua-sdk/reference/spacesd/index.mdx
+++ b/docs/content/docs/cua-sdk/reference/spacesd/index.mdx
@@ -512,7 +512,7 @@ A plain-HTTP request to the spacesd port (for example MCP at `/mcp`).
| --- | --- | --- | --- |
| `method` | `String` | | Method, for example `POST`. |
| `path` | `String` | | Absolute path under the endpoint, for example `/mcp`. Never a URL. |
-| `headers` | [`Vec<SpacesdHttpHeader>`](#spacesdhttpheader-record) | `[]` | Extra headers. Credentials (`authorization`, the env and Fleet claim headers) are the client's and cannot be set here. |
+| `headers` | [`Vec<SpacesdHttpHeader>`](#spacesdhttpheader-record) | `[]` | Extra headers. Credentials (`authorization` and the env headers) are the client's and cannot be set here. |
| `body` | `Vec<u8>` | | Request body (empty for none). |
| `timeout_ms` / `timeoutMs` | `Option<u32>` | `None` | Whole-request timeout; 30 s when unset. |
| `max_response_bytes` / `maxResponseBytes` | `Option<u64>` | `None` | Response body cap; 16 MiB when unset. |
diff --git a/docs/content/docs/cua-sdk/reference/spacesd/media.mdx b/docs/content/docs/cua-sdk/reference/spacesd/media.mdx
index 8ef9a0768b..5f4a1dbe2a 100644
--- a/docs/content/docs/cua-sdk/reference/spacesd/media.mdx
+++ b/docs/content/docs/cua-sdk/reference/spacesd/media.mdx
@@ -413,7 +413,7 @@ Returned by [`Sandbox.open_media_bridge`](#sandboxopen_media_bridge).
| Field | Type | Default | Description |
| --- | --- | --- | --- |
-| `ws_url` / `wsUrl` | `String` | | Loopback `ws://` URL carrying a short-lived bridge ticket. Speaks rcdp wire v2 unchanged; no Fleet bearer or env token is exposed. |
+| `ws_url` / `wsUrl` | `String` | | Loopback `ws://` URL carrying a short-lived bridge ticket. Speaks rcdp wire v2 unchanged; no env token is exposed. |
| `ticket` | `String` | | The bridge ticket (also accepted as subprotocol `cua.ticket.<ticket>`). |
| `open_media_response_json` / `openMediaResponseJson` | `String` | | `cua.env.v1.OpenMediaResponse` as proto3 JSON (upstream ticket removed). |
diff --git a/docs/content/docs/cua-sdk/reference/types.mdx b/docs/content/docs/cua-sdk/reference/types.mdx
index 27d1b286ac..c7ecdbd78a 100644
--- a/docs/content/docs/cua-sdk/reference/types.mdx
+++ b/docs/content/docs/cua-sdk/reference/types.mdx
@@ -113,7 +113,7 @@ The 781 items of the Cua Spaces app export (source-available, FSL-1.1-MIT, Swift
| [`ConfigEntry`](/cua-sdk/reference/cua#configentry-record) | record | One setting's effective value. |
| [`Container`](/cua-sdk/reference/sandbox/options#container-record) | record | An extra container next to a sandbox (a compose-style sidecar), addressed by name on every runtime: the sandbox reaches it at its `name` (on its `ports`), it reaches the sandbox at `main`, and `services` may name its ports (`{"db": 5432}`). |
| [`contrib_providers_built`](/cua-sdk/reference/sandbox#contrib_providers_built) | function | The contrib providers this build includes (empty unless built with the `contrib` feature). |
-| [`Cua`](/cua-sdk/reference/cua#cua) | object | The entry point of the SDK: create one with `Cua::embedded` or `Cua::connect`, then reach sandboxes, Fleet, Spaces and the rest through its accessors. |
+| [`Cua`](/cua-sdk/reference/cua#cua) | object | The entry point of the SDK: create one with `Cua::embedded` or `Cua::connect`, then reach sandboxes, Spaces and the rest through its accessors. |
| [`cua_sdk_version`](/cua-sdk/reference/cua#cua_sdk_version) | function | Version of the SDK library. |
| [`CuaConfig`](/cua-sdk/reference/cua#cuaconfig-record) | record | Configuration of an embedded SDK runtime. |
| [`CuaError`](/cua-sdk/reference/errors) | error | Every error the SDK raises. |
@@ -290,7 +290,7 @@ The 781 items of the Cua Spaces app export (source-available, FSL-1.1-MIT, Swift
| [`SpacePowerReport`](/cua-sdk/reference/spaces#spacepowerreport-record) | record | What `Spaces.stop` or `Spaces.start` did. |
| [`SpacePresence`](/cua-sdk/reference/spaces/streams#spacepresence) | object | A joined presence session. |
| [`SpaceRelayRegistration`](/cua-sdk/reference/spaces/space#spacerelayregistration-record) | record | A Space published on the relay (`Spaces.relay_register`). |
-| [`Spaces`](/cua-sdk/reference/spaces#spaces) | object | The Spaces registry: add a machine by URL, claim a Fleet Space, provision a local one, and get `Space` handles. |
+| [`Spaces`](/cua-sdk/reference/spaces#spaces) | object | The Spaces registry: add a machine by URL, provision a local one, and get `Space` handles. |
| [`spaces_tool_methods`](/cua-sdk/reference/spaces#spaces_tool_methods) | function | Which SDK method covers each Spaces contract tool. |
| [`SpacesdCapabilities`](/cua-sdk/reference/spacesd#spacesdcapabilities-record) | record | `SystemService.GetCapabilities`, summarized. |
| [`SpacesdClient`](/cua-sdk/reference/spacesd#spacesdclient) | object | Client for one cua-spacesd. |
diff --git a/examples/streaming/rust/Cargo.lock b/examples/streaming/rust/Cargo.lock
index 639736c6fe..6d5a1c8440 100644
--- a/examples/streaming/rust/Cargo.lock
+++ b/examples/streaming/rust/Cargo.lock
@@ -1318,7 +1318,6 @@ dependencies = [
"async-trait",
"base64 0.22.1",
"bytes",
- "cua-auth",
"cua-byoc",
"cua-disk",
"cua-fleet",
@@ -1568,7 +1567,6 @@ dependencies = [
"futures-util",
"hex",
"http",
- "js-sys",
"pbjson-types",
"prost",
"serde",
@@ -1582,9 +1580,6 @@ dependencies = [
"tonic-web-wasm-client",
"tracing",
"uniffi",
- "wasm-bindgen",
- "wasm-bindgen-futures",
- "web-sys",
]
[[package]]
diff --git a/libs/cua-spacesd/tests/spaces-e2e/Cargo.lock b/libs/cua-spacesd/tests/spaces-e2e/Cargo.lock
index 5ac50c4621..313d666f65 100644
--- a/libs/cua-spacesd/tests/spaces-e2e/Cargo.lock
+++ b/libs/cua-spacesd/tests/spaces-e2e/Cargo.lock
@@ -2085,7 +2085,6 @@ dependencies = [
"axum",
"base64 0.22.1",
"bytes",
- "cua-auth",
"cua-byoc",
"cua-disk",
"cua-fleet",
@@ -2512,7 +2511,6 @@ dependencies = [
"futures-util",
"hex",
"http",
- "js-sys",
"pbjson-types",
"prost",
"serde",
@@ -2526,9 +2524,6 @@ dependencies = [
"tonic-web-wasm-client",
"tracing",
"uniffi",
- "wasm-bindgen",
- "wasm-bindgen-futures",
- "web-sys",
]
[[package]]
@@ -2630,7 +2625,6 @@ dependencies = [
"cua-auth",
"cua-chromium-storage",
"cua-daemon",
- "cua-fleet",
"cua-home",
"cua-keyvault",
"cua-media-client",
diff --git a/libs/cua/Cargo.lock b/libs/cua/Cargo.lock
index 163755e56f..f6bc9b3a12 100644
--- a/libs/cua/Cargo.lock
+++ b/libs/cua/Cargo.lock
@@ -2459,7 +2459,6 @@ dependencies = [
"axum",
"base64 0.22.1",
"bytes",
- "cua-auth",
"cua-byoc",
"cua-contrib",
"cua-disk",
@@ -2861,7 +2860,6 @@ dependencies = [
"hex",
"http",
"http-body-util",
- "js-sys",
"pbjson-types",
"prost",
"prost-types",
@@ -2877,9 +2875,6 @@ dependencies = [
"tonic-web-wasm-client",
"tracing",
"uniffi",
- "wasm-bindgen",
- "wasm-bindgen-futures",
- "web-sys",
]
[[package]]
@@ -2998,7 +2993,6 @@ dependencies = [
"cua-auth",
"cua-chromium-storage",
"cua-daemon",
- "cua-fleet",
"cua-home",
"cua-host",
"cua-keyvault",
@@ -3288,7 +3282,6 @@ dependencies = [
"nfsserve",
"rand 0.9.5",
"regex",
- "reqwest 0.12.28",
"serde",
"serde_json",
"sha2 0.10.9",
diff --git a/libs/cua/crates/cua-cli/src/drive_cmd.rs b/libs/cua/crates/cua-cli/src/drive_cmd.rs
index a77f48d0b1..7899d5bd13 100644
--- a/libs/cua/crates/cua-cli/src/drive_cmd.rs
+++ b/libs/cua/crates/cua-cli/src/drive_cmd.rs
@@ -175,7 +175,7 @@ pub enum DriveCmd {
cua volume status
cua volume status --json")]
Status,
- /// Which store the drive uses (fs, s3, cloud).
+ /// Which store the drive uses (fs, s3).
#[command(subcommand)]
Config(ConfigCmd),
}
@@ -192,7 +192,7 @@ pub enum ConfigCmd {
cua volume config set --backend fs
cua volume config set --backend s3 --endpoint http://127.0.0.1:9000 --bucket cua-volume --path-style")]
Set {
- /// `fs` (default), `s3`, or `cloud` (off unless the Cua cloud enables it).
+ /// `fs` (default) or `s3`.
#[arg(long)]
backend: String,
#[arg(long)]
diff --git a/libs/cua/crates/cua-daemon/Cargo.toml b/libs/cua/crates/cua-daemon/Cargo.toml
index 3ddb7e26e1..d386b74f5d 100644
--- a/libs/cua/crates/cua-daemon/Cargo.toml
+++ b/libs/cua/crates/cua-daemon/Cargo.toml
@@ -27,9 +27,9 @@ contrib-modal = ["dep:cua-contrib", "cua-contrib/modal"]
# Your own cloud account as a location (`--on aws|gcp|modal`): the cua-byoc
# providers and `cua cloud`.
byoc = ["dep:cua-byoc", "cua-byoc/all"]
-# `fixtures`: a MockServer spacesd plus a fake Fleet API on loopback,
-# for tests and the `cua-test-fixtures` binary behind the language-binding
-# smoke tests (libs/cua-spacesd/tests/spaces-e2e). Never shipped.
+# `fixtures`: a MockServer spacesd plus a fake Fleet API on loopback, for tests
+# and the `cua-test-fixtures` binary behind the language-binding smoke tests
+# (libs/cua-spacesd/tests/spaces-e2e). Never shipped.
test-fixtures = ["server", "spaces", "cua-spacesd-client/testing", "cua-fleet/testing", "tokio-tungstenite/handshake", "dep:tempfile"]
[dependencies]
@@ -38,8 +38,6 @@ cua-byoc = { workspace = true, optional = true }
cua-proto = { workspace = true, features = ["client", "server", "serde"] }
cua-spacesd-client.workspace = true
cua-fleet.workspace = true
-# Fleet through the signed-in user's shared session.
-cua-auth.workspace = true
cua-sandbox-core.workspace = true
cua-contrib = { workspace = true, optional = true }
cua-vmm = { path = "../cua-vmm" }
diff --git a/libs/cua/crates/cua-daemon/src/client.rs b/libs/cua/crates/cua-daemon/src/client.rs
index 8e1689cef2..dc35a980b6 100644
--- a/libs/cua/crates/cua-daemon/src/client.rs
+++ b/libs/cua/crates/cua-daemon/src/client.rs
@@ -479,7 +479,7 @@ impl DaemonClient {
}
/// `ListSandboxes`: the known sandboxes of `provider` (all when
- /// `None`), plus live Fleet claims with `include_cloud` (see
+ /// `None`). `include_cloud` is ignored: Cua Cloud has ended (see
/// [`crate::Runtime::list_filtered`]).
#[allow(deprecated)]
pub async fn list_filtered(
@@ -507,7 +507,7 @@ impl DaemonClient {
})
}
- /// `ListSandboxes` of the known sandboxes only (no live Fleet listing).
+ /// `ListSandboxes` of the known sandboxes only.
pub async fn list(&self, provider: Option<ProviderKind>) -> Result<Vec<SandboxRecord>> {
Ok(self.list_filtered(provider, false).await?.sandboxes)
}
diff --git a/libs/cua/crates/cua-daemon/src/extension.rs b/libs/cua/crates/cua-daemon/src/extension.rs
index 71805bc042..8e3d218ba0 100644
--- a/libs/cua/crates/cua-daemon/src/extension.rs
+++ b/libs/cua/crates/cua-daemon/src/extension.rs
@@ -19,7 +19,6 @@ use std::any::Any;
use std::path::{Path, PathBuf};
use std::sync::{Arc, Mutex};
-use cua_fleet::FleetClient;
use cua_spaces::SpacesBuilder;
/// What an extension sees of the runtime being built.
@@ -30,8 +29,6 @@ pub struct ExtensionContext<'a> {
/// Whether `home` was set explicitly (tests and fixtures) rather than
/// defaulted.
pub home_explicit: bool,
- /// The Fleet client, when configured.
- pub fleet: Option<&'a FleetClient>,
/// A fixture home standing in for the host's app data
/// (`RuntimeConfig::teleport_home`): nothing may read the real machine.
pub teleport_home: Option<&'a Path>,
diff --git a/libs/cua/crates/cua-daemon/src/lib.rs b/libs/cua/crates/cua-daemon/src/lib.rs
index 7bbf208a5f..06f7e8a506 100644
--- a/libs/cua/crates/cua-daemon/src/lib.rs
+++ b/libs/cua/crates/cua-daemon/src/lib.rs
@@ -1,8 +1,8 @@
//! `cua daemon`: the cua SDK runtime hosted out of process.
//!
//! - [`Runtime`] is *the* SDK runtime: one [`cua_sandbox_core::Sandboxes`]
-//! (Fleet, local, direct), a Fleet client, cached sandbox handles and
-//! spacesd connections. `cua-sdk` embeds it in-process
+//! (local, direct, your own cloud), cached sandbox handles and spacesd
+//! connections. It never builds a Fleet client: Cua Cloud has ended. `cua-sdk` embeds it in-process
//! (`Cua::embedded`); the daemon hosts the same value.
//! - [`server`] serves `cua.daemon.v1` on a Unix socket (`~/.cua/cua.sock`,
//! mode 0600, no token) and/or loopback TCP (bearer token). The loopback
@@ -13,7 +13,7 @@
//! daemon, including the `/media` WebSocket;
//! - the **media bridge** `/v1/bridge/media?ticket=<bridge ticket>` for
//! webviews: a short-lived bridge ticket from `OpenMediaBridge`, so a
-//! browser never sees a Fleet bearer or an env token.
+//! browser never sees an env token.
//! - [`client::DaemonClient`] is the typed client `Cua::connect` uses.
//!
//! Errors cross the wire as `google.rpc.Status` with a packed
@@ -44,7 +44,6 @@ mod passthrough;
mod runtime;
#[cfg(feature = "server")]
pub mod server;
-pub mod session;
pub mod shares;
#[cfg(feature = "server")]
mod spaces_svc;
@@ -98,7 +97,7 @@ pub enum Error {
/// The accepted values.
valid: Vec<String>,
},
- /// Provider not configured (for example no Fleet credentials).
+ /// Provider not configured (for example a missing provider credential).
#[error("provider not configured: {0}")]
ProviderNotConfigured(String),
/// The provider or this build cannot do this.
diff --git a/libs/cua/crates/cua-daemon/src/runtime.rs b/libs/cua/crates/cua-daemon/src/runtime.rs
index 2aa31b8a46..daf1fefb7a 100644
--- a/libs/cua/crates/cua-daemon/src/runtime.rs
+++ b/libs/cua/crates/cua-daemon/src/runtime.rs
@@ -1,7 +1,7 @@
//! The SDK runtime shared by the embedded and daemon topologies.
use crate::{Error, Result};
-use cua_fleet::{AutoPoolConfig, FleetClient, FleetConfig, PoolManager};
+use cua_fleet::{AutoPoolConfig, FleetClient, FleetConfig};
use cua_sandbox_core::{
CreateOptions, Forward, LocalRuntime, Location, PortTarget, Probe, ProviderKind, Sandbox,
SandboxRef, Sandboxes, Status,
@@ -19,18 +19,17 @@ use std::{
pub struct RuntimeConfig {
/// State directory (default `~/.cua/sandboxes`).
pub state_dir: Option<PathBuf>,
- /// Managed Fleet pool settings (default [`cua_sandbox_core::settings::auto_pool_config`],
- /// home `~/.cua` or next to `state_dir`).
+ /// Ignored: Cua Cloud has ended, so there are no managed pools. Kept so
+ /// existing callers still compile.
pub auto_pools: Option<AutoPoolConfig>,
- /// Fleet configuration. `None` disables the Fleet provider; a config
- /// without credentials also disables it (calls then fail with
- /// `ProviderNotConfigured`).
+ /// Ignored: Cua Cloud has ended and the runtime never builds a Fleet
+ /// client. Kept so existing callers still compile.
pub fleet: Option<FleetConfig>,
- /// A ready Fleet client (tests, foreign HTTP clients, a refreshing
- /// session bearer). Wins over `fleet`.
+ /// Ignored: the runtime never uses a Fleet client (Cua Cloud has ended).
+ /// Kept so existing callers still compile.
pub fleet_client: Option<FleetClient>,
- /// Resolve image tags to digests for managed pools. Default: on, except
- /// with an injected `fleet_client` (tests never reach a registry).
+ /// Ignored: there are no managed pools to pin to digests. Kept so
+ /// existing callers still compile.
pub resolve_image_digests: Option<bool>,
/// Local VM / container runtime. Wins over `vmm` for sandboxes.
pub local: Option<Arc<dyn LocalRuntime>>,
@@ -56,7 +55,6 @@ impl std::fmt::Debug for RuntimeConfig {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("RuntimeConfig")
.field("state_dir", &self.state_dir)
- .field("fleet", &self.fleet)
.field("local", &self.local.is_some())
.finish_non_exhaustive()
}
@@ -184,8 +182,9 @@ pub struct SandboxRecord {
pub stop_reason: Option<String>,
}
-/// How long a listing waits for Fleet before it lists without the cloud
-/// sandboxes (and says so).
+/// How long a listing waited for Cua Cloud before it listed without the
+/// cloud sandboxes (and said so). Unused since Cua Cloud ended; kept for the
+/// callers that still name it.
pub const LIST_CLOUD_TIMEOUT: Duration = Duration::from_secs(5);
/// A sandbox listing and what it could not include.
@@ -197,70 +196,6 @@ pub struct Listing {
pub warnings: Vec<String>,
}
-/// The account's live Fleet claims as records (`location` `cloud`).
-/// Namespaces this principal may not read are skipped. Unused since Cua
-/// Cloud ended; removed with the Fleet runtime.
-#[allow(dead_code)]
-async fn cloud_claims(fleet: &FleetClient) -> Result<Vec<SandboxRecord>> {
- let namespaces = fleet
- .sdk()
- .list_namespaces()
- .await
- .map_err(|e| Error::from(cua_fleet::Error::Sdk(e)))?;
- let mut out = Vec::new();
- for ns in namespaces {
- let claims = match fleet.list_claims(&ns.name).await {
- Ok(c) => c,
- Err(cua_fleet::Error::Sdk(
- cua_fleet::SdkError::Status { status: 403, .. }
- | cua_fleet::SdkError::PoolAccessDenied { .. },
- )) => continue,
- Err(e) => return Err(e.into()),
- };
- for claim in claims {
- let v = serde_json::to_value(&claim).unwrap_or_default();
- let Some(name) = v["metadata"]["name"].as_str().map(str::to_string) else {
- continue;
- };
- let phase = v["status"]["phase"]
- .as_str()
- .unwrap_or("")
- .to_ascii_lowercase();
- let status = match phase.as_str() {
- "bound" => Status::Running,
- "" | "pending" => Status::Provisioning,
- "failed" | "released" => Status::Stopped,
- other => Status::Unknown(other.to_string()),
- };
- out.push(SandboxRecord {
- id: format!("cloud:{name}"),
- location: location_of(ProviderKind::Fleet).into(),
- kind: String::new(),
- runtime: String::new(),
- name: name.clone(),
- provider: ProviderKind::Fleet,
- runtime_type: "fleet".into(),
- status,
- ephemeral: false,
- services: BTreeMap::new(),
- image: None,
- labels: BTreeMap::new(),
- endpoints: BTreeMap::new(),
- created_at: None,
- expires_at: None,
- provider_details: BTreeMap::from([
- ("pool".to_string(), ns.name.clone()),
- ("namespace".to_string(), ns.name.clone()),
- ("claim".to_string(), name),
- ]),
- image_info: None,
- stop_reason: None,
- });
- }
- }
- Ok(out)
-}
-
/// The names of the contrib providers this build includes (empty without
/// the `contrib` features).
pub fn contrib_provider_names() -> Vec<String> {
@@ -309,29 +244,11 @@ pub fn location_of(p: ProviderKind) -> &'static str {
pub struct SpacesdAttachment {
/// Connected client.
pub client: SpacesdClient,
- /// Extra headers for WebSocket upgrades (Fleet bearer + claim).
+ /// Extra headers for WebSocket upgrades. Always empty now: only a Cua
+ /// Cloud sandbox needed them, and Cua Cloud has ended.
pub ws_headers: Vec<(String, String)>,
}
-/// WebSocket upgrade headers for a Fleet sandbox: the bearer and the claim.
-fn fleet_ws_headers(token: &str, claim: &str) -> Vec<(String, String)> {
- vec![
- ("authorization".into(), format!("Bearer {token}")),
- (
- cua_spacesd_client::transport::FLEET_CLAIM_HEADER.into(),
- claim.to_owned(),
- ),
- ]
-}
-
-/// The Fleet claim in WebSocket headers built by [`fleet_ws_headers`].
-fn fleet_claim_of(headers: &[(String, String)]) -> Option<&str> {
- headers
- .iter()
- .find(|(k, _)| k.eq_ignore_ascii_case(cua_spacesd_client::transport::FLEET_CLAIM_HEADER))
- .map(|(_, v)| v.as_str())
-}
-
/// An active port forward.
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct ForwardInfo {
@@ -388,8 +305,6 @@ impl Incarnation {
struct Inner {
sandboxes: Sandboxes,
- fleet: Option<FleetClient>,
- fleet_error: Option<String>,
vmm: Option<Arc<crate::local::VmmLocal>>,
env_probe_timeout: Duration,
handles: Mutex<HashMap<String, Handle>>,
@@ -400,9 +315,6 @@ struct Inner {
shares: crate::shares::Shares,
/// This runtime is the daemon's: it hosts local public URLs itself.
share_host: std::sync::atomic::AtomicBool,
- /// Cloud service URLs handed out by `service_url` (signed, reused until
- /// near expiry), by (sandbox, service).
- service_urls: Mutex<HashMap<(String, String), (String, SystemTime)>>,
#[cfg(feature = "spaces")]
spaces: cua_spaces::Spaces,
/// The attached extensions (the Keyvault broker, when the Cua Spaces
@@ -422,9 +334,7 @@ pub struct Runtime {
impl std::fmt::Debug for Runtime {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("Runtime")
- .field("fleet", &self.inner.fleet.is_some())
- .finish_non_exhaustive()
+ f.debug_struct("Runtime").finish_non_exhaustive()
}
}
@@ -433,46 +343,7 @@ impl Runtime {
/// local state, such as the Keyvault header; none unlocks anything).
pub fn new(config: RuntimeConfig) -> Result<Self> {
cua_spacesd_client::transport::ensure_crypto_provider();
- let resolve_default = config
- .resolve_image_digests
- .unwrap_or(config.fleet_client.is_none());
- let (fleet, fleet_error) = match (config.fleet_client, config.fleet) {
- (Some(c), _) => (Some(c), None),
- (None, Some(cfg)) if cfg.has_auth() => match FleetClient::connect(cfg) {
- Ok(c) => (Some(c), None),
- Err(e) => (None, Some(e.to_string())),
- },
- (None, _) => (None, None),
- };
- // One pool manager per runtime: in daemon mode every client's
- // sandboxes share its pool cache, locks and claim heartbeats.
- let pools = fleet.as_ref().map(|f| {
- let mut cfg = config
- .auto_pools
- .clone()
- .unwrap_or_else(cua_sandbox_core::settings::auto_pool_config);
- if config.auto_pools.is_none()
- && let Some(dir) = &config.state_dir
- {
- cfg = cfg.with_state_dir(dir);
- }
- let mgr = PoolManager::new(f.clone(), cfg);
- // Tags resolve to digests so a moved tag gets a fresh pool.
- // Injected (test) clients never reach a registry.
- let resolve = std::env::var("CUA_FLEET_RESOLVE_DIGESTS").map_or(true, |v| v != "0");
- if resolve_default && resolve {
- mgr.with_resolver(Arc::new(RegistryDigests::default()))
- } else {
- mgr
- }
- });
let mut builder = Sandboxes::builder();
- if let Some(f) = &fleet {
- builder = builder.fleet(f.clone());
- }
- if let Some(p) = &pools {
- builder = builder.pool_manager(p.clone());
- }
let local = config
.local
.or_else(|| config.vmm.clone().map(|v| v as Arc<dyn LocalRuntime>));
@@ -503,9 +374,6 @@ impl Runtime {
#[cfg(feature = "spaces")]
let (spaces, attached, extension_names) = {
let mut b = cua_spaces::Spaces::builder().sandboxes(sandboxes.clone());
- if let Some(f) = &fleet {
- b = b.fleet(f.clone());
- }
if let Some(h) = &config.spaces_home {
b = b.home(h.clone());
}
@@ -513,7 +381,6 @@ impl Runtime {
let cx = crate::extension::ExtensionContext {
home: &home,
home_explicit,
- fleet: fleet.as_ref(),
teleport_home: config.teleport_home.as_deref(),
};
let mut extensions = crate::extension::registered();
@@ -542,8 +409,6 @@ impl Runtime {
#[cfg(feature = "spaces")]
extension_names,
sandboxes,
- fleet,
- fleet_error,
vmm: config.vmm,
env_probe_timeout: config.env_probe_timeout.unwrap_or(Duration::from_secs(15)),
handles: Mutex::new(HashMap::new()),
@@ -551,7 +416,6 @@ impl Runtime {
forwards: Mutex::new(HashMap::new()),
shares: Default::default(),
share_host: std::sync::atomic::AtomicBool::new(false),
- service_urls: Mutex::new(HashMap::new()),
}),
})
}
@@ -576,7 +440,7 @@ impl Runtime {
}
/// The Spaces runtime (registry, primitives, MCP tools), sharing this
- /// runtime's sandboxes and Fleet client.
+ /// runtime's sandboxes.
#[cfg(feature = "spaces")]
pub fn spaces(&self) -> &cua_spaces::Spaces {
&self.inner.spaces
@@ -611,24 +475,6 @@ impl Runtime {
self.inner.attached.iter().find_map(|a| a.session_broker())
}
- /// The Fleet client, or `ProviderNotConfigured`.
- pub fn fleet(&self) -> Result<&FleetClient> {
- self.inner.fleet.as_ref().ok_or_else(|| {
- Error::ProviderNotConfigured(
- self.inner
- .fleet_error
- .clone()
- .unwrap_or_else(|| cua_fleet::MISSING_CREDENTIALS.into()),
- )
- })
- }
-
- /// The managed Fleet pool manager, or `ProviderNotConfigured`.
- pub fn pools(&self) -> Result<&PoolManager> {
- self.fleet()?;
- Ok(self.inner.sandboxes.pools()?)
- }
-
/// The cua-vmm backends, or `ProviderNotConfigured`.
pub fn vmm(&self) -> Result<&Arc<crate::local::VmmLocal>> {
self.inner.vmm.as_ref().ok_or_else(|| {
@@ -638,7 +484,8 @@ impl Runtime {
// ------------------------------------------------------------ lifecycle
- /// Creates (Fleet/local) or connects (direct) a sandbox.
+ /// Creates (local, your cloud, a provider) or connects (direct) a
+ /// sandbox. `on="cloud"` fails with [`cua_sandbox_core::CLOUD_ENDED`].
pub async fn create(&self, mut req: CreateRequest) -> Result<SandboxRecord> {
use cua_sandbox_core::placement::{Kind, On, Runtime};
let non_empty = |s: &Option<String>| {
@@ -720,18 +567,6 @@ impl Runtime {
ProviderKind::Contrib
}
};
- if provider == ProviderKind::Fleet
- && self.inner.fleet.is_none()
- && let Some(hint) = cua_sandbox_core::settings::cloud_default_hint(&resolved.on_source)
- {
- return Err(Error::ProviderNotConfigured(format!(
- "{}; {hint}",
- self.inner
- .fleet_error
- .clone()
- .unwrap_or_else(|| cua_fleet::MISSING_CREDENTIALS.into())
- )));
- }
if provider == ProviderKind::Direct {
cua_sandbox_core::placement::validate(&resolved.on, resolved.kind, &resolved.runtime)?;
let url = req
@@ -871,14 +706,13 @@ impl Runtime {
})
}
- /// Drops what is cached for `key` (the handle, its env connection, its
- /// public URLs and signed service URLs) when the sandbox it was made
- /// for is gone or was created again under the same name; returns
- /// whether it did. The Spaces runtime deletes a local Space by name in
- /// the sandbox manager ([`cua_spaces::Spaces::delete`]), which these
- /// caches never see, so without this check the new sandbox (new port,
- /// new token) was reached through the old connection until the daemon
- /// restarted.
+ /// Drops what is cached for `key` (the handle, its env connection and its
+ /// public URLs) when the sandbox it was made for is gone or was created
+ /// again under the same name; returns whether it did. The Spaces runtime
+ /// deletes a local Space by name in the sandbox manager
+ /// ([`cua_spaces::Spaces::delete`]), which these caches never see, so
+ /// without this check the new sandbox (new port, new token) was reached
+ /// through the old connection until the daemon restarted.
async fn evict_if_stale(&self, key: &str) -> bool {
let held = match self.inner.handles.lock().unwrap().get(key) {
Some(h) => h.incarnation.clone(),
@@ -907,11 +741,6 @@ impl Runtime {
async fn evict(&self, key: &str) {
self.forget(key).await;
self.inner.shares.revoke_sandbox(key);
- self.inner
- .service_urls
- .lock()
- .unwrap()
- .retain(|(sb, _), _| sb != key);
}
/// Resolves any accepted spelling of a sandbox (a qualified ref, a
@@ -1024,18 +853,28 @@ impl Runtime {
.unwrap_or_else(|_| key.to_string())
}
+ /// Whether the state file named like `key` describes `key` itself: a
+ /// local and a cloud sandbox of one name share one state file, so the
+ /// name alone does not say whose it is.
+ fn owns_state(&self, key: &str) -> bool {
+ self.inner
+ .sandboxes
+ .state()
+ .load(&Self::state_name(key))
+ .is_some_and(|s| s.sandbox_ref().to_string() == key)
+ }
+
/// Current record (with a fresh status).
pub async fn record(&self, name: &str) -> Result<SandboxRecord> {
let key = self.key(name).await?;
let sandbox = match self.handle(&key).await {
Ok(s) => s,
Err(e) => {
- // A suspended managed Fleet sandbox has no claim to attach
- // to, a stopped local VM or container is not connected to
- // until it is resumed (nor is a stopped VM in your cloud), and
- // a local record whose VM or container is gone (`missing`)
- // has nothing to connect to: report any of them from its
- // record.
+ // A suspended sandbox has nothing to attach to, a stopped
+ // local VM or container is not connected to until it is
+ // resumed (nor is a stopped VM in your cloud), and a local
+ // record whose VM or container is gone (`missing`) has
+ // nothing to connect to: report any of them from its record.
if let Ok(info) = self.inner.sandboxes.get(&Self::state_name(&key)).await
&& (info.status == Status::Suspended
|| (matches!(info.provider, ProviderKind::Local | ProviderKind::Contrib)
@@ -1179,8 +1018,6 @@ impl Runtime {
})
}
- /// Deletes (Fleet: release + ephemeral pool; local: remove; direct:
- /// forget).
/// Stops a named create still running here and waits until what it
/// made is deleted (`None`: no create of that name was running).
pub async fn cancel_create(&self, name: &str) -> Result<Option<String>> {
@@ -1192,6 +1029,8 @@ impl Runtime {
Ok(self.inner.sandboxes.cancel_create(&name).await?)
}
+ /// Deletes (local: remove; direct: forget; your cloud: delete the
+ /// machine).
pub async fn delete(&self, name: &str) -> Result<()> {
let key = self.key(name).await?;
let sandbox = match self.handle(&key).await {
@@ -1201,9 +1040,7 @@ impl Runtime {
// instance with no state file: the manager removes what is left.
Err(e) => {
let state_name = Self::state_name(&key);
- if self.inner.sandboxes.state().load(&state_name).is_some()
- || key.starts_with("local:")
- {
+ if self.owns_state(&key) || key.starts_with("local:") {
self.forget(&key).await;
return match self.inner.sandboxes.delete(&state_name).await {
Err(cua_sandbox_core::Error::NotFound(_)) => Err(e),
@@ -1229,15 +1066,18 @@ impl Runtime {
Ok(())
}
- /// Suspends. A managed Fleet sandbox's handle is dropped with it (its
- /// claim is released; `resume` claims a new one).
+ /// Suspends.
pub async fn suspend(&self, name: &str) -> Result<()> {
let key = self.key(name).await?;
let sandbox = match self.handle(&key).await {
Ok(s) => s,
- // Already suspended (no claim to attach to): nothing to do but
- // go through the manager, which knows.
- Err(_) => {
+ // Already suspended (nothing to attach to): nothing to do but go
+ // through the manager, which knows. Only when its record is this
+ // sandbox's own: a `cloud:box` ref never suspends `local:box`.
+ Err(e) => {
+ if !self.owns_state(&key) {
+ return Err(e);
+ }
return Ok(self
.inner
.sandboxes
@@ -1245,28 +1085,12 @@ impl Runtime {
.await?);
}
};
- sandbox.suspend().await?;
- if sandbox.provider() == ProviderKind::Fleet {
- self.forget(&key).await;
- }
- Ok(())
+ Ok(sandbox.suspend().await?)
}
- /// Resumes (managed Fleet: the new claim is held by this runtime).
+ /// Resumes.
pub async fn resume(&self, name: &str) -> Result<()> {
let key = self.key(name).await?;
- let state_name = Self::state_name(&key);
- let fleet_state = key.starts_with("cloud:")
- && matches!(
- self.inner.sandboxes.state().load(&state_name),
- Some(cua_sandbox_core::SandboxState::Fleet(_))
- );
- if fleet_state {
- self.forget(&key).await;
- self.inner.sandboxes.resume(&state_name).await?;
- self.connect(&key).await?;
- return Ok(());
- }
match self.handle(&key).await {
Ok(sandbox) => Ok(sandbox.resume().await?),
// A stopped local VM or container is not connected to (connect
@@ -1294,8 +1118,7 @@ impl Runtime {
.then_some(state_name)
}
- /// Stops holding a managed Fleet claim: no more renewals, the claim
- /// runs until its current shutdown time. The handle is dropped. Needs a
+ /// Drops the handle of a sandbox (the runtime stops holding it). Needs a
/// Tokio runtime context (the cached env connection is dropped on it).
pub fn detach(&self, name: &str) {
// No lookup here (it is sync): a bare name detaches the one handle
@@ -1336,26 +1159,15 @@ impl Runtime {
self.inner.handles.lock().unwrap().remove(name);
}
- /// Reattached every running named sandbox on a managed Fleet pool after
- /// a restart. Cua Cloud has ended: holds nothing.
+ /// Used to reattach managed Cua Cloud sandboxes after a restart. Cua
+ /// Cloud has ended: holds nothing.
pub async fn adopt_managed_fleet_sandboxes(&self) -> Vec<String> {
- // Cua Cloud has ended: nothing to reattach, and Fleet is never called.
vec![]
}
/// Restarts.
pub async fn restart(&self, name: &str) -> Result<()> {
let key = self.key(name).await?;
- if key.starts_with("cloud:")
- && matches!(
- self.inner.sandboxes.state().load(&Self::state_name(&key)),
- Some(cua_sandbox_core::SandboxState::Fleet(ref f))
- if f.pool_name.starts_with(cua_fleet::autopool::AUTO_POOL_PREFIX)
- )
- {
- self.suspend(&key).await?;
- return self.resume(&key).await;
- }
self.inner.envs.lock().await.remove(&key);
match self.handle(&key).await {
Ok(sandbox) => Ok(sandbox.restart().await?),
@@ -1366,7 +1178,7 @@ impl Runtime {
}
}
- /// Extends a Fleet lease.
+ /// Extends a sandbox lease (a no-op where the sandbox has none).
pub async fn keep_alive(&self, name: &str, duration: Duration) -> Result<()> {
Ok(self.handle(name).await?.keep_alive(duration).await?)
}
@@ -1410,46 +1222,18 @@ impl Runtime {
.await?)
}
- /// A URL for `service` usable from this machine with no credentials:
- /// the published loopback port locally, a signed service URL (1 h,
- /// reused until 5 min before it expires) in the cloud.
+ /// A URL for `service` usable from this machine with no credentials: the
+ /// published loopback port.
pub async fn service_url(&self, name: &str, service: &str) -> Result<String> {
let name = self.key(name).await?;
let sandbox = self.handle(&name).await?;
let svc = sandbox.service(service)?;
- let Some(bound) = sandbox.fleet_sandbox() else {
- return Ok(svc.url().trim_end_matches('/').to_string());
- };
- let key = (name.clone(), service.to_string());
- let now = SystemTime::now();
- if let Some((url, exp)) = self.inner.service_urls.lock().unwrap().get(&key)
- && *exp > now + Duration::from_secs(300)
- {
- return Ok(url.clone());
- }
- let signed = self
- .fleet()?
- .create_signed_service_url(
- bound,
- service,
- Some("cua service url".into()),
- crate::shares::DEFAULT_TTL,
- )
- .await?;
- let exp = parse_rfc3339(&signed.expires_at).unwrap_or(now + crate::shares::DEFAULT_TTL);
- let url = signed.url.trim_end_matches('/').to_string();
- self.inner
- .service_urls
- .lock()
- .unwrap()
- .insert(key, (url.clone(), exp));
- Ok(url)
+ Ok(svc.url().trim_end_matches('/').to_string())
}
/// A shareable URL for `service` that stops working after `ttl` (60 s to
- /// 24 h, default 1 h): a Fleet signed service URL in the cloud; locally a
- /// loopback proxy URL with its own token, hosted by the cua daemon
- /// (started if needed).
+ /// 24 h, default 1 h): a loopback proxy URL with its own token, hosted by
+ /// the cua daemon (started if needed).
pub async fn public_url(
&self,
name: &str,
@@ -1457,6 +1241,7 @@ impl Runtime {
ttl: Option<Duration>,
label: Option<String>,
) -> Result<crate::shares::PublicUrl> {
+ let _ = label;
let ttl = ttl.unwrap_or(crate::shares::DEFAULT_TTL);
if ttl < Duration::from_secs(60) || ttl > crate::shares::MAX_TTL {
return Err(Error::InvalidArgument(format!(
@@ -1467,30 +1252,6 @@ impl Runtime {
let name = &self.key(name).await?;
let sandbox = self.handle(name).await?;
let svc = sandbox.service(service)?;
- if let Some(bound) = sandbox.fleet_sandbox() {
- let s = self
- .fleet()?
- .create_signed_service_url(bound, service, label.clone(), ttl)
- .await?;
- let mut details: BTreeMap<String, String> = [
- ("provider".to_string(), "fleet".to_string()),
- ("namespace".into(), s.namespace.clone()),
- ("claim".into(), s.claim.clone()),
- ("sandbox".into(), s.sandbox.clone()),
- ]
- .into();
- if let Some(l) = s.label.clone() {
- details.insert("label".into(), l);
- }
- return Ok(crate::shares::PublicUrl {
- id: s.id,
- url: s.url,
- expires_at: parse_rfc3339(&s.expires_at).unwrap_or(SystemTime::now() + ttl),
- sandbox: name.to_string(),
- service: service.to_string(),
- provider_details: details,
- });
- }
let upstream = svc.url().trim_end_matches('/').to_string();
self.share(&upstream, ttl, name, service).await
}
@@ -1531,7 +1292,7 @@ impl Runtime {
self.inner.shares.create(upstream, ttl, name, service).await
}
- /// Revokes a public URL (cloud: the signed URL; local: the share).
+ /// Revokes a public URL (a local share).
pub async fn revoke_public_url(&self, name: &str, id: &str) -> Result<()> {
if self.inner.shares.revoke(id) {
return Ok(());
@@ -1544,18 +1305,7 @@ impl Runtime {
{
return d.revoke_public_url(name, id).await;
}
- let sandbox = self.handle(name).await?;
- let Some(bound) = sandbox.fleet_sandbox() else {
- return Err(Error::NotFound(format!("public URL {id} not found")));
- };
- let fleet = self.fleet()?;
- let url = fleet
- .list_signed_service_urls(bound)
- .await?
- .into_iter()
- .find(|u| u.id == id)
- .ok_or_else(|| Error::NotFound(format!("public URL {id} not found")))?;
- Ok(fleet.revoke_signed_service_url(url).await?)
+ Err(Error::NotFound(format!("public URL {id} not found")))
}
/// Where a guest port is reachable.
@@ -1602,15 +1352,7 @@ impl Runtime {
let key = self.key(name).await?;
let name = key.as_str();
let cached = self.inner.envs.lock().await.get(name).cloned();
- if let Some(mut a) = cached {
- // The client is reused; the WebSocket bearer is not: Fleet access
- // tokens are short-lived, and a bearer kept with the attachment
- // made every media bridge to a cloud Space fail (the gateway
- // answers 302) a few minutes after the daemon first connected.
- if let Some(claim) = fleet_claim_of(&a.ws_headers).map(str::to_owned) {
- let token = self.fleet()?.access_token(false).await?;
- a.ws_headers = fleet_ws_headers(&token, &claim);
- }
+ if let Some(a) = cached {
return Ok(a);
}
let sandbox = self.handle(name).await?;
@@ -1619,14 +1361,10 @@ impl Runtime {
probe_timeout: Some(probe_timeout.unwrap_or(self.inner.env_probe_timeout)),
})
.await?;
- let ws_headers = match sandbox.fleet_sandbox() {
- Some(bound) => {
- let token = self.fleet()?.access_token(false).await?;
- fleet_ws_headers(&token, &bound.claim)
- }
- None => vec![],
+ let a = SpacesdAttachment {
+ client,
+ ws_headers: vec![],
};
- let a = SpacesdAttachment { client, ws_headers };
self.inner
.envs
.lock()
@@ -1701,97 +1439,7 @@ fn record_of(key: &str, h: &Handle, status: Status) -> SandboxRecord {
}
}
-/// RFC 3339 timestamps as Fleet writes them (`Z` or `+00:00`).
-fn parse_rfc3339(s: &str) -> Option<SystemTime> {
- let s = s.trim();
- let s = s
- .strip_suffix("+00:00")
- .map_or_else(|| s.to_string(), |b| format!("{b}Z"));
- humantime::parse_rfc3339_weak(&s).ok()
-}
-
-/// Resolves image tags to `repo@sha256:...` through the registry (anonymous
-/// or docker-config credentials, like `cua image pull`). Failures keep the
-/// tag.
-#[derive(Default)]
-struct RegistryDigests(cua_image::RegistryClient);
-
-#[async_trait::async_trait]
-impl cua_fleet::ImageResolver for RegistryDigests {
- async fn resolve(&self, image: &str) -> Option<String> {
- let repo = strip_tag(image)?;
- match tokio::time::timeout(Duration::from_secs(10), self.0.manifest(image)).await {
- Ok(Ok((_, digest))) if digest.starts_with("sha256:") => {
- Some(format!("{repo}@{digest}"))
- }
- Ok(Ok(_)) => None,
- Ok(Err(e)) => {
- tracing::debug!(image, error = %e, "could not resolve image digest; using the tag");
- None
- }
- Err(_) => None,
- }
- }
-}
-
-/// `registry/repo:tag` -> `registry/repo` (`None` when already a digest).
-fn strip_tag(image: &str) -> Option<String> {
- if image.contains('@') {
- return None;
- }
- let (head, last) = image.rsplit_once('/').unwrap_or(("", image));
- let name = last.split(':').next().unwrap_or(last);
- Some(if head.is_empty() {
- name.to_string()
- } else {
- format!("{head}/{name}")
- })
-}
-
/// Parses a Fleet runtime name.
pub fn parse_runtime_kind(s: &str) -> Result<cua_fleet::RuntimeKind> {
cua_fleet::parse_runtime(s)?.ok_or_else(|| Error::InvalidArgument("empty Fleet runtime".into()))
}
-
-#[cfg(test)]
-mod tests {
- #[test]
- fn fleet_ws_headers_carry_the_claim_for_a_fresh_bearer() {
- let first = super::fleet_ws_headers("old-token", "claim-1");
- assert_eq!(super::fleet_claim_of(&first), Some("claim-1"));
- // What `env` does for a cached attachment: same claim, new bearer.
- let claim = super::fleet_claim_of(&first).unwrap().to_owned();
- let fresh = super::fleet_ws_headers("new-token", &claim);
- assert!(fresh.contains(&("authorization".into(), "Bearer new-token".into())));
- assert_eq!(super::fleet_claim_of(&fresh), Some("claim-1"));
- assert_eq!(
- super::fleet_claim_of(&[]),
- None,
- "local sandboxes send no Fleet headers"
- );
- }
-
- use super::strip_tag;
-
- #[test]
- fn fleet_timestamps_parse() {
- let a = super::parse_rfc3339("2026-09-23T10:00:00Z").unwrap();
- assert_eq!(super::parse_rfc3339("2026-09-23T10:00:00+00:00"), Some(a));
- assert!(super::parse_rfc3339("2026-09-23T10:00:00.5Z").is_some());
- assert_eq!(super::parse_rfc3339("nope"), None);
- }
-
- #[test]
- fn strip_tag_keeps_registry_ports_and_digests() {
- assert_eq!(
- strip_tag("public.ecr.aws/k5j5w0x5/cua-ubuntu-24.04:docker-main").as_deref(),
- Some("public.ecr.aws/k5j5w0x5/cua-ubuntu-24.04")
- );
- assert_eq!(
- strip_tag("localhost:5000/img:1").as_deref(),
- Some("localhost:5000/img")
- );
- assert_eq!(strip_tag("ubuntu").as_deref(), Some("ubuntu"));
- assert_eq!(strip_tag("x/y@sha256:ab"), None);
- }
-}
diff --git a/libs/cua/crates/cua-daemon/src/server.rs b/libs/cua/crates/cua-daemon/src/server.rs
index 075df42781..f1cac6c9c2 100644
--- a/libs/cua/crates/cua-daemon/src/server.rs
+++ b/libs/cua/crates/cua-daemon/src/server.rs
@@ -640,9 +640,8 @@ impl Svc {
/// The env connection and WebSocket headers a media bridge for `name`
/// relays to: a registered Space (a `relay:` or legacy `space://…` id, or
- /// a name the Spaces
- /// registry resolves when no sandbox has it), with its gateway headers
- /// (Fleet bearer, claim, env token), else a sandbox.
+ /// a name the Spaces registry resolves when no sandbox has it), with its
+ /// gateway headers (relay or env token), else a sandbox.
async fn media_upstream(
&self,
name: &str,
diff --git a/libs/cua/crates/cua-daemon/src/session.rs b/libs/cua/crates/cua-daemon/src/session.rs
deleted file mode 100644
index ee1635da28..0000000000
--- a/libs/cua/crates/cua-daemon/src/session.rs
+++ /dev/null
@@ -1,44 +0,0 @@
-//! Fleet through the signed-in user's session (`cua auth login`, the SDK's
-//! `Auth`, the Spaces app): a refreshing bearer from the shared credential
-//! store (`cua-auth`), so every process sees the same, current token.
-
-use cua_fleet::sdk::{AccessTokenProvider, AccessTokenProviderError};
-use cua_fleet::{FleetClient, FleetConfig};
-use std::sync::Arc;
-
-/// A Fleet bearer from a `cua-auth` session.
-pub struct SessionTokens(pub Arc<cua_auth::Session>);
-
-#[async_trait::async_trait]
-impl AccessTokenProvider for SessionTokens {
- async fn get_access_token(
- &self,
- force_refresh: bool,
- ) -> std::result::Result<String, AccessTokenProviderError> {
- self.0
- .access_token(force_refresh)
- .await
- .map_err(|e| AccessTokenProviderError::Failed {
- reason: e.to_string(),
- })
- }
-}
-
-/// A Fleet client on the stored session when `config` carries no
-/// credentials of its own and a session exists; `None` otherwise (the
-/// Fleet provider then stays unconfigured, as before), and `None` when
-/// the session belongs to another `CUA_ENV` than this Fleet
-/// ([`FleetConfig::accepts_session`]).
-pub fn session_fleet_client(config: &FleetConfig) -> Option<FleetClient> {
- if config.has_auth() || !config.accepts_session() {
- return None;
- }
- let session = cua_auth::Session::from_env();
- session.credentials().ok().flatten()?;
- FleetClient::connect_with_token_provider(
- config.clone(),
- Arc::new(SessionTokens(Arc::new(session))),
- None,
- )
- .ok()
-}
diff --git a/libs/cua/crates/cua-daemon/src/spaces_svc.rs b/libs/cua/crates/cua-daemon/src/spaces_svc.rs
index f82319d98e..7c9da9c766 100644
--- a/libs/cua/crates/cua-daemon/src/spaces_svc.rs
+++ b/libs/cua/crates/cua-daemon/src/spaces_svc.rs
@@ -1,5 +1,5 @@
//! `cua.daemon.v1.SpaceService`: a thin adapter over the runtime's
-//! [`cua_spaces::Spaces`]. The registry, Fleet claims, local provisioning
+//! [`cua_spaces::Spaces`]. The registry, local provisioning
//! and every MCP tool are `cua-spaces` code; this module only converts
//! messages. Without the `spaces` feature every call is `Unsupported`.
diff --git a/libs/cua/crates/cua-daemon/tests/cloud_ended.rs b/libs/cua/crates/cua-daemon/tests/cloud_ended.rs
new file mode 100644
index 0000000000..f602ab26e1
--- /dev/null
+++ b/libs/cua/crates/cua-daemon/tests/cloud_ended.rs
@@ -0,0 +1,59 @@
+//! Cua Cloud has ended: the runtime never builds or uses a Fleet client,
+//! whatever its config carries. A Fleet configured by base URL, token or an
+//! injected client is ignored, a cloud create fails with the one message,
+//! and nothing connects to the configured Fleet.
+
+use cua_daemon::{CreateRequest, Error, Runtime, RuntimeConfig};
+use cua_fleet::FleetConfig;
+use cua_fleet::testing::FakeFleet;
+
+#[tokio::test]
+async fn a_configured_fleet_is_ignored_and_never_called() {
+ let fleet = std::net::TcpListener::bind("127.0.0.1:0").unwrap();
+ fleet.set_nonblocking(true).unwrap();
+ let dirs = tempfile::tempdir().unwrap();
+ let fake = FakeFleet::new();
+ let rt = Runtime::new(RuntimeConfig {
+ state_dir: Some(dirs.path().join("sandboxes")),
+ spaces_home: Some(dirs.path().join("cua")),
+ fleet: Some(FleetConfig {
+ base_url: format!("http://{}", fleet.local_addr().unwrap()),
+ fleet_token: Some("not-a-token".into()),
+ ..Default::default()
+ }),
+ fleet_client: Some(fake.client()),
+ ..Default::default()
+ })
+ .unwrap();
+
+ // Creating in the cloud fails with the one message.
+ for req in [
+ CreateRequest {
+ location: Some("cloud".into()),
+ image: "linux".into(),
+ ..Default::default()
+ },
+ CreateRequest {
+ location: Some("cloud".into()),
+ pool: Some("a-pool".into()),
+ ..Default::default()
+ },
+ ] {
+ let e = rt.create(req).await.unwrap_err();
+ assert!(
+ matches!(&e, Error::Unsupported(m) if m == cua_sandbox_core::CLOUD_ENDED),
+ "{e:?}"
+ );
+ }
+
+ // Listings never ask Fleet, and say nothing about it.
+ let l = rt.list_filtered(None, true).await.unwrap();
+ assert!(l.warnings.is_empty(), "{:?}", l.warnings);
+ assert!(l.sandboxes.iter().all(|s| s.location != "cloud"));
+ assert!(rt.adopt_managed_fleet_sandboxes().await.is_empty());
+
+ assert!(
+ matches!(fleet.accept(), Err(e) if e.kind() == std::io::ErrorKind::WouldBlock),
+ "something connected to the Fleet URL"
+ );
+}
diff --git a/libs/cua/crates/cua-sdk/Cargo.toml b/libs/cua/crates/cua-sdk/Cargo.toml
index 8d945cc264..accd1cf1cb 100644
--- a/libs/cua/crates/cua-sdk/Cargo.toml
+++ b/libs/cua/crates/cua-sdk/Cargo.toml
@@ -91,7 +91,6 @@ cua-spaces = { path = "../cua-spaces" }
cua-host = { workspace = true, features = ["testing"] }
serde_json.workspace = true
cua-spacesd-client = { workspace = true, features = ["testing"] }
-cua-fleet = { workspace = true, features = ["testing"] }
cua-daemon = { workspace = true, features = ["server", "client", "test-fixtures"] }
tempfile.workspace = true
# Paused time for the keyframe ticker test.
@@ -99,12 +98,6 @@ tokio = { workspace = true, features = ["test-util"] }
prost-types.workspace = true
[target.'cfg(target_arch = "wasm32")'.dependencies]
-# `GlobalFetch`: cyclops-sdk's HttpClient over globalThis.fetch (Node, workers).
-async-trait = "0.1"
-js-sys = "0.3"
-wasm-bindgen = "0.2"
-wasm-bindgen-futures = "0.4"
-web-sys = { version = "0.3", features = ["AbortSignal", "Headers", "ReadableStream", "ReadableStreamDefaultReader", "Request", "RequestInit", "RequestRedirect", "RequestCredentials", "Response"] }
tonic = { workspace = true, default-features = false, features = ["codegen"] }
tonic-prost.workspace = true
tonic-web-wasm-client = "0.9"
diff --git a/libs/cua/crates/cua-sdk/src/lib.rs b/libs/cua/crates/cua-sdk/src/lib.rs
index 04e0297f47..e34d492893 100644
--- a/libs/cua/crates/cua-sdk/src/lib.rs
+++ b/libs/cua/crates/cua-sdk/src/lib.rs
@@ -13,11 +13,11 @@
//!
//! | Object | Module |
//! |---|---|
-//! | [`Sandboxes`] / [`Sandbox`] / [`Service`] / [`PortForward`] | daemon-agnostic sandboxes (Fleet, local, direct) |
+//! | [`Sandboxes`] / [`Sandbox`] / [`Service`] / [`PortForward`] | daemon-agnostic sandboxes (local, direct, your own cloud) |
//! | [`SpacesdClient`] / [`SpacesdProcess`] / [`MediaSession`] | cua-spacesd (`cua.env.v1`), including a JSON escape hatch |
-//! | [`Fleet`] | pools, templates, claims, images (cyclops-sdk) |
+//! | [`Fleet`] | pools, templates, claims, images of Cua Cloud, which has ended (every call fails with the "Cua Cloud has ended" error) |
//! | [`Local`] | local runtimes and images (cua-vmm, cua-image) |
-//! | [`Spaces`] / [`Space`] / [`SpaceStreamSession`] / [`SpacePresence`] | Spaces: registry, Fleet/local/direct Spaces, exec, files, services, streams, presence, teleport, hotspot, agents |
+//! | [`Spaces`] / [`Space`] / [`SpaceStreamSession`] / [`SpacePresence`] | Spaces: registry, local/direct/relay Spaces, exec, files, services, streams, presence, teleport, hotspot, agents |
//! | `Teleport` (feature `teleport`) | move a desktop app session from this machine into a sandbox (cua-teleport) |
//! | [`Auth`] / [`LoginAttempt`] | sign in to Cua (browser PKCE or device code) and the shared credential store (cua-auth) |
//! | [`AgentSetup`] | AI coding agents on this machine: cua skills and the cua MCP server (cua-agent-setup) |
@@ -111,10 +111,10 @@ pub enum CuaError {
/// sandboxes this client can see.
#[error("not found: {0}")]
NotFound(String),
- /// The provider is not configured (for example no Fleet credentials).
+ /// The provider is not configured (for example no credentials for it).
///
- /// Fix: Set `FLEETS_TOKEN`, or `CUA_CLIENT_ID` and `CUA_CLIENT_SECRET`, or
- /// run `cua auth login` and create the client with `fleet_from_session`.
+ /// Fix: Set the credentials the message names (for a contrib provider, its
+ /// environment variable or `cua auth provider set <name>`).
#[error("provider not configured: {0}")]
ProviderNotConfigured(String),
/// Not supported by this provider, guest or build.
@@ -135,19 +135,18 @@ pub enum CuaError {
/// the sandbox or service actually starts.
#[error("timed out: {0}")]
Timeout(String),
- /// Fleet API failure.
+ /// Fleet API failure. Cua Cloud has ended, so the SDK no longer raises
+ /// this.
///
- /// Fix: Read the status in the message. Retry a transient failure; check
- /// the credentials and the account's capacity otherwise.
+ /// Fix: Use a local sandbox or your own machine; see the Cua Cloud has
+ /// ended guide.
#[error("fleet: {0}")]
Fleet(String),
- /// Fleet's admission refused the request: a sandbox or pool size over
- /// this account's limits, or a template its policy does not admit. The
- /// message is Fleet's own and names the limit.
+ /// Fleet's admission refused the request. Cua Cloud has ended, so the SDK
+ /// no longer raises this.
///
- /// Fix: Pick a size within the limit the message names (most accounts
- /// run 1-8 vCPUs and 1-32 GiB per sandbox), or contact Cua support to
- /// raise the account's limits.
+ /// Fix: Use a local sandbox or your own machine; see the Cua Cloud has
+ /// ended guide.
#[error("fleet admission denied: {0}")]
FleetAdmissionDenied(String),
/// The account is out of Cua Cloud credit: no credit left, and no card
@@ -179,8 +178,7 @@ pub enum CuaError {
Http(String),
/// Missing or wrong token or ticket.
///
- /// Fix: Pass the sandbox's env token, refresh the Fleet credentials, or run
- /// `cua auth login` again.
+ /// Fix: Pass the sandbox's env token, or run `cua auth login` again.
#[error("unauthenticated: {0}")]
Unauthenticated(String),
/// The guest OS denied permission.
@@ -230,16 +228,18 @@ pub enum CuaError {
#[error("teleport refused: {0}")]
TeleportRefused(String),
/// A named cloud pool's template differs from the requested sandbox
- /// fields; the message holds the diff (pass `apply` to update it).
+ /// fields. Cua Cloud has ended, so the SDK no longer raises this.
///
- /// Fix: Pass the pool's own fields, or pass `apply` to update its template.
+ /// Fix: Use a local sandbox or your own machine; see the Cua Cloud has
+ /// ended guide.
#[error("pool spec mismatch: {0}")]
PoolSpecMismatch(String),
/// A claim bound but its per-claim secrets (the env token) never
- /// reached the sandbox within the bounded wait; the claim was released.
+ /// reached the sandbox. Cua Cloud has ended, so the SDK no longer raises
+ /// this.
///
- /// Fix: Retry. If it keeps failing, check the pool's claim-secrets setup
- /// and the Fleet status.
+ /// Fix: Use a local sandbox or your own machine; see the Cua Cloud has
+ /// ended guide.
#[error("claim secrets not delivered: {0}")]
ClaimSecretsNotDelivered(String),
/// Bug or I/O failure.
diff --git a/libs/cua/crates/cua-sdk/src/native/auth.rs b/libs/cua/crates/cua-sdk/src/native/auth.rs
index 3c241b61d1..adace45493 100644
--- a/libs/cua/crates/cua-sdk/src/native/auth.rs
+++ b/libs/cua/crates/cua-sdk/src/native/auth.rs
@@ -208,7 +208,7 @@ impl Auth {
Arc::new(Auth { session })
}
- /// The underlying session (Rust hosts: a Fleet token provider).
+ /// The underlying session (Rust hosts).
pub fn session(&self) -> Arc<cua_auth::Session> {
self.session.clone()
}
diff --git a/libs/cua/crates/cua-sdk/src/native/cua.rs b/libs/cua/crates/cua-sdk/src/native/cua.rs
index 772b953649..2ffb121f05 100644
--- a/libs/cua/crates/cua-sdk/src/native/cua.rs
+++ b/libs/cua/crates/cua-sdk/src/native/cua.rs
@@ -3,27 +3,25 @@
use super::{Fleet, Sandboxes, SpacesdClient, run, runtime};
use crate::{CuaError, Result};
use cua_daemon::{Runtime, RuntimeConfig, client::DaemonAddress, client::DaemonClient};
-use cua_fleet::FleetConfig;
use std::{path::PathBuf, sync::Arc};
-/// Fleet credentials and endpoints. Unset fields fall back to the
-/// environment (`CUA_FLEET_BASE_URL`, `CUA_TOKEN_URL`, `CUA_CLIENT_ID`,
-/// `CUA_CLIENT_SECRET`, `FLEETS_TOKEN`) when `CuaConfig.fleet_from_env`.
+/// Fleet credentials and endpoints. Ignored: Cua Cloud has ended, so nothing
+/// reads them any more. Kept so existing callers still compile.
#[derive(Debug, Clone, Default, PartialEq, Eq, uniffi::Record)]
pub struct FleetSettings {
- /// Fleet API base URL.
+ /// Ignored.
#[uniffi(default = None)]
pub base_url: Option<String>,
- /// OAuth token URL.
+ /// Ignored.
#[uniffi(default = None)]
pub token_url: Option<String>,
- /// OAuth client id.
+ /// Ignored.
#[uniffi(default = None)]
pub client_id: Option<String>,
- /// OAuth client secret.
+ /// Ignored.
#[uniffi(default = None)]
pub client_secret: Option<String>,
- /// Static Fleet token (wins over client credentials).
+ /// Ignored.
#[uniffi(default = None)]
pub token: Option<String>,
}
@@ -34,10 +32,10 @@ pub struct CuaConfig {
/// State directory for sandbox state files (default `~/.cua/sandboxes`).
#[uniffi(default = None)]
pub state_dir: Option<String>,
- /// Fleet settings (merged over the environment).
+ /// Ignored: Cua Cloud has ended.
#[uniffi(default = None)]
pub fleet: Option<FleetSettings>,
- /// Read Fleet settings from the environment.
+ /// Ignored: Cua Cloud has ended.
#[uniffi(default = true)]
pub fleet_from_env: bool,
/// spacesd probe timeout (default 15 s).
@@ -50,13 +48,14 @@ pub struct CuaConfig {
/// side effects (tests, CI). Default: the real host.
#[uniffi(default = None)]
pub teleport_home: Option<String>,
- /// When the settings and environment carry no Fleet credentials, use
- /// the signed-in session (`Cua.auth()`, `cua auth login`) from the
- /// shared credential store, refreshed as needed.
+ /// Use the signed-in session (`Cua.auth()`, `cua auth login`) from the
+ /// shared credential store, refreshed as needed, for the relay account
+ /// the runtime lists the account's machines with ("My machines"). The
+ /// name is historical: it no longer builds a Fleet client, because Cua
+ /// Cloud has ended.
#[uniffi(default = false)]
pub fleet_from_session: bool,
- /// Where managed Fleet pools keep their name cache and machine-wide GC
- /// lock (default: `$CUA_HOME` or `~/.cua`, or next to `state_dir`).
+ /// Ignored: Cua Cloud has ended, so there are no managed pools.
#[uniffi(default = None)]
pub fleet_pool_home: Option<String>,
}
@@ -76,36 +75,6 @@ impl Default for CuaConfig {
}
}
-impl CuaConfig {
- pub(crate) fn fleet_config(&self) -> FleetConfig {
- let mut c = if self.fleet_from_env {
- FleetConfig::from_env()
- } else {
- FleetConfig::default()
- };
- if let Some(f) = &self.fleet {
- let set = |dst: &mut String, v: &Option<String>| {
- if let Some(v) = v.as_ref().filter(|v| !v.is_empty()) {
- *dst = v.trim_end_matches('/').to_string();
- }
- };
- set(&mut c.base_url, &f.base_url);
- set(&mut c.token_url, &f.token_url);
- let opt = |v: &Option<String>| v.clone().filter(|v| !v.is_empty());
- if let Some(v) = opt(&f.client_id) {
- c.client_id = Some(v);
- }
- if let Some(v) = opt(&f.client_secret) {
- c.client_secret = Some(v);
- }
- if let Some(v) = opt(&f.token) {
- c.fleet_token = Some(v);
- }
- }
- c
- }
-}
-
/// Where the SDK runtime lives.
#[derive(Debug, Clone, Copy, PartialEq, Eq, uniffi::Enum)]
pub enum CuaMode {
@@ -163,21 +132,19 @@ pub(crate) fn features() -> Vec<String> {
}
/// The entry point of the SDK: create one with `Cua::embedded` or
-/// `Cua::connect`, then reach sandboxes, Fleet, Spaces and the rest
-/// through its accessors.
+/// `Cua::connect`, then reach sandboxes, Spaces and the rest through its
+/// accessors.
#[derive(uniffi::Object)]
pub struct Cua {
pub(crate) backend: Backend,
- pub(crate) config: CuaConfig,
}
impl Cua {
- /// Rust hosts: an embedded SDK over a caller-built runtime (tests,
- /// custom Fleet HTTP clients, local runtimes).
+ /// Rust hosts: an embedded SDK over a caller-built runtime (tests, local
+ /// runtimes).
pub fn from_runtime(runtime: Runtime) -> Arc<Self> {
Arc::new(Self {
backend: Backend::Embedded(runtime),
- config: CuaConfig::default(),
})
}
@@ -219,27 +186,13 @@ fn session_relay_account(home: &std::path::Path) -> cua_spaces::RelayAccount {
#[uniffi::export]
impl Cua {
/// Runs the SDK runtime in this process. Performs no I/O beyond
- /// reading the credential store when `fleet_from_session` is set.
+ /// reading the credential store when `fleet_from_session` is set (for
+ /// the relay account). It never builds a Fleet client: Cua Cloud has
+ /// ended.
#[uniffi::constructor]
pub fn embedded(config: CuaConfig) -> Result<Arc<Self>> {
- let fleet = config.fleet_config();
- let fleet_client = if config.fleet_from_session {
- cua_daemon::session::session_fleet_client(&fleet)
- } else {
- None
- };
let rc = RuntimeConfig {
state_dir: config.state_dir.clone().map(PathBuf::from),
- fleet: Some(fleet),
- fleet_client,
- auto_pools: config.fleet_pool_home.as_ref().map(|h| {
- let mut c = cua_sandbox_core::settings::auto_pool_config();
- c.home = PathBuf::from(h);
- c
- }),
- // Session users get an injected (refreshing) client; still pin
- // managed-pool images to digests.
- resolve_image_digests: Some(true),
local: None,
vmm: Some(Arc::new(cua_daemon::local::VmmLocal::default())),
env_probe_timeout: config.env_probe_timeout_ms.map(super::millis),
@@ -266,7 +219,6 @@ impl Cua {
}
Ok(Arc::new(Self {
backend: Backend::Embedded(rt),
- config,
}))
}
@@ -299,7 +251,6 @@ impl Cua {
}
Ok(Arc::new(Self {
backend: Backend::Daemon(client),
- config,
}))
}
None => Self::embedded(config),
@@ -322,7 +273,6 @@ impl Cua {
};
Ok(Arc::new(Self {
backend: Backend::Daemon(client),
- config: CuaConfig::default(),
}))
}
@@ -362,53 +312,21 @@ impl Cua {
.await
}
- /// Sandboxes (Fleet, local, direct).
+ /// Sandboxes (local, direct, your own cloud).
pub fn sandboxes(&self) -> Arc<Sandboxes> {
Arc::new(Sandboxes {
backend: self.backend.clone(),
})
}
- /// Fleet pools, templates, claims and images. Always talks to Fleet
- /// from this process with this SDK's credentials (in daemon mode, from
- /// the environment).
+ /// Fleet pools, templates, claims and images. Cua Cloud has ended: this
+ /// always fails with the "Cua Cloud has ended" error and never connects.
pub fn fleet(&self) -> Result<Arc<Fleet>> {
- // Cua Cloud has ended: fails with the "Cua Cloud has ended" message
- // and never connects. (Doc comment unchanged: it is in the bindings.)
- Err::<(), _>(CuaError::Unsupported(cua_sandbox_core::CLOUD_ENDED.into()))?;
- let (client, pools) = match &self.backend {
- Backend::Embedded(rt) => (rt.fleet()?.clone(), rt.pools()?.clone()),
- Backend::Daemon(_) => {
- let cfg = self.config.fleet_config();
- let _guard = runtime().enter();
- // No credentials in the settings or environment: the
- // signed-in session, when the config asks for it (the apps).
- let client = if cfg.has_auth() {
- cua_fleet::FleetClient::connect(cfg)?
- } else {
- self.config
- .fleet_from_session
- .then(|| cua_daemon::session::session_fleet_client(&cfg))
- .flatten()
- .ok_or_else(|| {
- CuaError::ProviderNotConfigured(cua_fleet::MISSING_CREDENTIALS.into())
- })?
- };
- // Listing and GC talk to Fleet directly; the cache and GC
- // lock are the same files the daemon's manager uses.
- let mut auto = cua_sandbox_core::settings::auto_pool_config();
- if let Some(dir) = &self.config.state_dir {
- auto = auto.with_state_dir(std::path::Path::new(dir));
- }
- let pools = cua_fleet::PoolManager::new(client.clone(), auto);
- (client, pools)
- }
- };
- Ok(Arc::new(Fleet { client, pools }))
+ Err(CuaError::Unsupported(cua_sandbox_core::CLOUD_ENDED.into()))
}
- /// Connects to cua-spacesd at `url` (`host:port`, `http(s)://…`, a
- /// Fleet service URL or a relay URL) without a sandbox.
+ /// Connects to cua-spacesd at `url` (`host:port`, `http(s)://…` or a
+ /// relay URL) without a sandbox.
pub async fn spacesd(&self, url: String, token: Option<String>) -> Result<Arc<SpacesdClient>> {
let backend = self.backend.clone();
run(async move {
@@ -478,25 +396,3 @@ fn check_identity(client: &DaemonClient) -> Result<()> {
_ => Ok(()),
}
}
-
-#[cfg(test)]
-mod tests {
- use super::*;
-
- #[test]
- fn explicit_fleet_settings_override_environment() {
- let cfg = CuaConfig {
- fleet_from_env: false,
- fleet: Some(FleetSettings {
- base_url: Some("https://fleet.example/".into()),
- token: Some("t".into()),
- ..Default::default()
- }),
- ..Default::default()
- };
- let f = cfg.fleet_config();
- assert_eq!(f.base_url, "https://fleet.example");
- assert_eq!(f.fleet_token.as_deref(), Some("t"));
- assert!(f.has_auth());
- }
-}
diff --git a/libs/cua/crates/cua-sdk/src/native/fleet.rs b/libs/cua/crates/cua-sdk/src/native/fleet.rs
index 6d62aec971..73ab2e6ce8 100644
--- a/libs/cua/crates/cua-sdk/src/native/fleet.rs
+++ b/libs/cua/crates/cua-sdk/src/native/fleet.rs
@@ -1,4 +1,7 @@
-//! `Fleet`: pools, templates, claims and images (cyclops-sdk via cua-fleet).
+//! `Fleet`: pools, templates, claims and images of Cua Cloud (cyclops-sdk via
+//! cua-fleet). Cua Cloud has ended: [`Cua::fleet`](super::Cua::fleet) fails
+//! with the "Cua Cloud has ended" error and never returns one, so these
+//! types are kept only for the shape of the bindings.
//!
//! Resources cross as small records plus their full JSON (`json`), so the
//! Fleet schema can evolve without regenerating every binding.
@@ -474,7 +477,8 @@ pub fn fleet_size_limits() -> FleetSizeLimits {
}
}
-/// Fleet control plane.
+/// Fleet control plane. Cua Cloud has ended: `Cua.fleet()` never returns
+/// one, so none of its methods can be called.
#[derive(uniffi::Object)]
pub struct Fleet {
pub(crate) client: FleetClient,
diff --git a/libs/cua/crates/cua-sdk/src/native/sandbox.rs b/libs/cua/crates/cua-sdk/src/native/sandbox.rs
index 15499ce465..3a0beae5f4 100644
--- a/libs/cua/crates/cua-sdk/src/native/sandbox.rs
+++ b/libs/cua/crates/cua-sdk/src/native/sandbox.rs
@@ -97,8 +97,9 @@ pub struct SandboxInfo {
/// The engine that runs it: `gvisor`, `runc`, `qemu`, `lume` or
/// `kubevirt` (empty when not known).
pub runtime: String,
- /// `runtime_type` as persisted (`fleet`, `direct`, `gvisor`, `qemu`,
- /// ...); prefer `location`, `kind` and `runtime`.
+ /// `runtime_type` as persisted (`direct`, `gvisor`, `qemu`, ...; `fleet`
+ /// for a record of the Cua Cloud that has ended); prefer `location`,
+ /// `kind` and `runtime`.
pub runtime_type: String,
/// Status.
pub status: SandboxStatus,
@@ -108,8 +109,7 @@ pub struct SandboxInfo {
pub ephemeral: bool,
/// Declared services: name → guest port (0 = only the name is known).
pub services: HashMap<String, u16>,
- /// Service base URLs by name (Fleet: gateway URLs that need the Fleet
- /// bearer).
+ /// Service base URLs by name.
pub endpoints: HashMap<String, String>,
/// Image, when known.
pub image: Option<String>,
@@ -270,8 +270,7 @@ pub struct CloudOptions {
#[uniffi(default = None)]
pub pool: Option<String>,
/// With `pool`: update the pool's template to the given fields instead
- /// of failing on a mismatch (`Fleet.apply` semantics for the template;
- /// the pool's capacity is kept). Managed pools refuse it.
+ /// of failing on a mismatch. Cua Cloud has ended: ignored.
#[uniffi(default = false)]
pub apply: bool,
}
@@ -506,10 +505,10 @@ pub struct BuildFile {
pub destination: String,
}
-/// Image layers built on top of a sandbox's image. Cloud: a remote build
-/// (Fleet images API). Local: a build into the container engine (container
-/// images only; VM images take no layers here). Both are cached by the same
-/// content hash (`cua-b-<hash>`), so an identical spec never rebuilds.
+/// Image layers built on top of a sandbox's image. Local: a build into the
+/// container engine (container images only; VM images take no layers here),
+/// cached by a content hash (`cua-b-<hash>`), so an identical spec never
+/// rebuilds. (Cua Cloud's remote build has ended.)
#[derive(Debug, Clone, Default, PartialEq, Eq, uniffi::Record)]
pub struct ImageBuild {
/// Steps, in order.
@@ -585,9 +584,8 @@ pub struct SandboxCreateOptions {
/// spacesd token.
#[uniffi(default = None)]
pub token: Option<String>,
- /// Fleet: claim from this existing (user-owned) pool. Unset: a managed,
- /// autoscaled pool keyed by image and shape. Local (with an empty
- /// image): run this Fleet pool's template locally.
+ /// Cua Cloud has ended: a pool fails with the "Cua Cloud has ended"
+ /// error.
#[uniffi(default = None)]
pub pool: Option<String>,
/// Guest OS (`linux`, `macos`, `windows`).
@@ -599,7 +597,7 @@ pub struct SandboxCreateOptions {
/// Memory (MiB).
#[uniffi(default = None)]
pub memory_mb: Option<u64>,
- /// Extra guest ports (local: published; Fleet: `port-<n>` services).
+ /// Extra guest ports (local: published).
#[uniffi(default = [])]
pub ports: Vec<u16>,
/// Named services (name → guest port). `env` defaults to 3211.
@@ -611,12 +609,12 @@ pub struct SandboxCreateOptions {
/// Readiness budget (default 10 min).
#[uniffi(default = None)]
pub ready_timeout_ms: Option<u32>,
- /// Guest environment (local: container environment or cloud-init;
- /// cloud: the template environment with `processMode: Run`, on gVisor
- /// and KubeVirt; values are not secrets).
+ /// Guest environment (local: container environment or cloud-init; values
+ /// are not secrets).
#[uniffi(default)]
pub env: HashMap<String, String>,
- /// Deprecated: initial replicas of a new managed pool (> 0 = warm).
+ /// Deprecated, and Cua Cloud has ended: initial replicas of a new
+ /// managed pool (> 0 = warm).
#[uniffi(default = None)]
pub fleet_replicas: Option<u32>,
/// Deprecated: use `cloud.claim_ttl_seconds`.
@@ -961,7 +959,7 @@ impl From<cua_daemon::shares::PublicUrl> for PublicUrl {
#[derive(Debug, Clone, PartialEq, Eq, uniffi::Record)]
pub struct MediaBridge {
/// Loopback `ws://` URL carrying a short-lived bridge ticket. Speaks
- /// rcdp wire v2 unchanged; no Fleet bearer or env token is exposed.
+ /// rcdp wire v2 unchanged; no env token is exposed.
pub ws_url: String,
/// The bridge ticket (also accepted as subprotocol
/// `cua.ticket.<ticket>`).
@@ -1033,8 +1031,9 @@ impl Sandboxes {
#[uniffi::export]
impl Sandboxes {
- /// Creates (Fleet, local) or connects (direct) a sandbox and waits for
- /// the provider and every readiness probe.
+ /// Creates (local, your cloud, a provider) or connects (direct) a sandbox
+ /// and waits for the provider and every readiness probe. `on: "cloud"`
+ /// fails with the "Cua Cloud has ended" error.
pub async fn create(&self, options: SandboxCreateOptions) -> Result<Arc<Sandbox>> {
self.create_reported(options, None).await
}
@@ -1102,8 +1101,7 @@ impl Sandboxes {
#[uniffi::export]
impl Sandboxes {
/// Connects directly to a machine by URL (`http(s)://host:port`, bare
- /// `host:port`, a Fleet service URL or a relay URL) with an optional
- /// spacesd token. No daemon is assumed and nothing is probed.
+ /// `host:port` or a relay URL) with an optional spacesd token. No daemon is assumed and nothing is probed.
pub async fn connect_url(
&self,
url: String,
@@ -1143,10 +1141,8 @@ impl Sandboxes {
/// all of them, local, direct and the account's live cloud sandboxes,
/// whatever the default location is. `"local"`, `"cloud"` or
/// `"direct"`: only those.
- /// Cloud sandboxes never fail the listing: without Fleet credentials
- /// they are left out silently, and when Fleet fails or takes longer than
- /// 5 s they are left out with a warning (logged here;
- /// [`Sandboxes::list_with_warnings`] returns it).
+ /// Cua Cloud has ended: its sandboxes are never listed, and listing
+ /// never asks Fleet.
pub async fn list(&self, location: Option<String>) -> Result<Vec<SandboxInfo>> {
let listing = self.list_with_warnings(location).await?;
for w in &listing.warnings {
@@ -1225,8 +1221,7 @@ impl Sandboxes {
impl Sandboxes {
/// The sandboxes this machine knows (state files, local backends,
- /// connected URLs, Fleet claims it holds) of `provider` (all when
- /// `None`), without asking Fleet for live claims. Rust only; the CLI's
+ /// connected URLs) of `provider` (all when `None`). Rust only; the CLI's
/// `cua do ls` uses it.
pub async fn list_known(&self, location: Option<&str>) -> Result<Vec<SandboxInfo>> {
let backend = self.backend.clone();
@@ -1355,20 +1350,9 @@ impl Sandbox {
match &backend {
Backend::Embedded(rt) => {
let a = rt.env(&name, timeout).await?;
- let fleet = !a.ws_headers.is_empty();
- let client = SpacesdClient::new(a.client, a.ws_headers).at(&location);
- if !fleet {
- return Ok(Arc::new(client));
- }
- // A cloud Space: the Fleet bearer in the headers expires
- // within minutes, so each socket re-reads the attachment,
- // which re-mints it (cached until it expires).
- let (rt, name) = (rt.clone(), name.clone());
- let refresh: super::spacesd::WsHeaderRefresh = Arc::new(move || {
- let (rt, name) = (rt.clone(), name.clone());
- Box::pin(async move { Ok(rt.env(&name, timeout).await?.ws_headers) })
- });
- Ok(Arc::new(client.with_ws_refresh(refresh)))
+ Ok(Arc::new(
+ SpacesdClient::new(a.client, a.ws_headers).at(&location),
+ ))
}
Backend::Daemon(d) => {
let ep = d.env_endpoint(&name, timeout).await?;
@@ -1478,9 +1462,8 @@ impl Sandbox {
/// Where the MCP server behind `service` is (URL of its endpoint at
/// `path`, default `/mcp`, plus the headers every request needs), for
- /// any MCP client. Embedded: the service route itself (loopback, or the
- /// Fleet gateway with a fresh bearer and claim header). Daemon: the
- /// daemon's streaming passthrough with its loopback bearer.
+ /// any MCP client. Embedded: the service route itself (loopback).
+ /// Daemon: the daemon's streaming passthrough with its loopback bearer.
#[uniffi::method(default(path = None))]
pub async fn mcp_config(
&self,
@@ -1502,9 +1485,8 @@ impl Sandbox {
}
/// A shareable URL for `service` that stops working after `ttl_seconds`
- /// (60 s to 24 h, default 1 h). Cloud: a Fleet signed service URL.
- /// Local: a loopback URL with its own token, served by the cua daemon
- /// (started if needed; `CUA_BIN` names the CLI).
+ /// (60 s to 24 h, default 1 h): a loopback URL with its own token, served
+ /// by the cua daemon (started if needed; `CUA_BIN` names the CLI).
#[uniffi::method(default(ttl_seconds = None, label = None))]
pub async fn public_url(
&self,
@@ -1539,9 +1521,8 @@ impl Sandbox {
}
/// Forwards a loopback port to guest `port`: a TCP forward locally (and
- /// over cua-spacesd's tunnel when the image has it); in the cloud
- /// without cua-spacesd, a loopback HTTP/WebSocket proxy through the
- /// Fleet gateway. Either way `url()` is a loopback URL.
+ /// over cua-spacesd's tunnel when the image has it). `url()` is a
+ /// loopback URL.
pub async fn forward(&self, port: u16) -> Result<Arc<PortForward>> {
let started = std::time::Instant::now();
let r: Result<Arc<PortForward>> = async move {
@@ -1586,7 +1567,7 @@ impl Sandbox {
.await
}
- /// Extends a Fleet lease by `seconds`.
+ /// Extends the sandbox's lease by `seconds`, for a provider that has one.
pub async fn keep_alive(&self, seconds: u32) -> Result<()> {
let backend = self.backend.clone();
let name = self.info.id.clone();
@@ -1615,9 +1596,8 @@ impl Sandbox {
self.lifecycle(Op::Restart).await
}
- /// Managed Fleet claims: stop renewing the claim and forget the handle;
- /// the claim runs until its current shutdown time. Embedded runtime
- /// only (a daemon holds its claims by design).
+ /// Forgets the handle this runtime holds (a Cua Cloud claim used to
+ /// stop renewing; Cua Cloud has ended). Embedded runtime only.
pub fn detach(&self) -> Result<()> {
match &self.backend {
Backend::Embedded(rt) => {
@@ -1626,12 +1606,13 @@ impl Sandbox {
Ok(())
}
Backend::Daemon(_) => Err(CuaError::Unsupported(
- "detach: the cua daemon holds Fleet claims; use delete or keep_alive".into(),
+ "detach: the cua daemon holds the handles; use delete or keep_alive".into(),
)),
}
}
- /// Deletes (Fleet: releases the claim and an ephemeral pool).
+ /// Deletes (local: removes it; direct: forgets it; your cloud: deletes
+ /// the machine).
pub async fn delete(&self) -> Result<()> {
let backend = self.backend.clone();
let name = self.info.id.clone();
@@ -1933,8 +1914,8 @@ impl Service {
/// A shareable URL for this service that stops working after
/// `ttl_seconds` (60 s to 24 h, default 1 h): the same as
- /// `Sandbox.public_url(name, ...)`. Cloud: a Fleet signed service URL.
- /// Local: a loopback URL with its own token, served by the cua daemon.
+ /// `Sandbox.public_url(name, ...)`: a loopback URL with its own token,
+ /// served by the cua daemon.
#[uniffi::method(default(ttl_seconds = None, label = None))]
pub async fn public_url(
&self,
@@ -2005,11 +1986,9 @@ impl Service {
.await
}
- /// One HTTP request to `path` on the service. Credentials (Fleet bearer
- /// and claim) are attached by the runtime. `headers` are sent as given
- /// (for example `content-type`, or `accept` and `mcp-session-id` for
- /// MCP over Fleet); `authorization` is refused on Fleet, where the
- /// gateway bearer owns it.
+ /// One HTTP request to `path` on the service. Credentials are attached by
+ /// the runtime. `headers` are sent as given (for example `content-type`,
+ /// or `accept` and `mcp-session-id` for MCP).
#[uniffi::method(default(headers = None))]
pub async fn request(
&self,
@@ -2083,7 +2062,7 @@ impl PortForward {
self.info.local_addr.clone()
}
- /// URL to use (loopback URL, or the Fleet gateway URL).
+ /// URL to use (a loopback URL).
pub fn url(&self) -> Option<String> {
self.info.url.clone()
}
@@ -2263,40 +2242,6 @@ mod tests {
assert!(err.contains("daytona"), "{err}");
}
- #[test]
- #[ignore = "Cua Cloud has ended (CUA-1854); removed with the Fleet provider"]
- fn cloud_options_win_over_the_deprecated_flat_fields() {
- let mut o = SandboxCreateOptions::new("cloud", "python:3.12-slim");
- o.warm = Some(false);
- o.max_pool_size = Some(2);
- o.command = Some(vec!["python".into(), "/srv.py".into()]);
- o.services.insert("mcp".into(), 8765);
- o.wait_for = vec![ReadinessProbe::tcp("mcp")];
- let r = o.to_request().unwrap();
- assert_eq!(r.fleet_warm, Some(false));
- assert_eq!(r.fleet_max_pool_size, Some(2));
- assert_eq!(r.command, o.command);
- assert_eq!(r.wait_for, vec![Probe::Tcp(8765)]);
- o.cloud = Some(CloudOptions {
- warm: Some(true),
- max_pool_size: Some(5),
- claim_ttl_seconds: Some(600),
- pool: None,
- apply: true,
- });
- o.runtime = Some("gvisor".into());
- let r = o.to_request().unwrap();
- assert!(r.fleet_apply);
- assert_eq!(
- (r.fleet_warm, r.fleet_max_pool_size, r.fleet_ttl_seconds),
- (Some(true), Some(5), Some(600))
- );
- assert_eq!(r.runtime.as_deref(), Some("gvisor"));
- // An empty argv is no command.
- o.command = Some(vec![]);
- assert_eq!(o.to_request().unwrap().command, None);
- }
-
#[test]
fn phases_are_portable() {
assert_eq!(
diff --git a/libs/cua/crates/cua-sdk/src/native/spaces.rs b/libs/cua/crates/cua-sdk/src/native/spaces.rs
index 4343e872a2..3dca7bef87 100644
--- a/libs/cua/crates/cua-sdk/src/native/spaces.rs
+++ b/libs/cua/crates/cua-sdk/src/native/spaces.rs
@@ -351,13 +351,10 @@ pub struct SpaceCreateOptions {
/// Name (default `space-<hex>`).
#[uniffi(default = None)]
pub name: Option<String>,
- /// vCPUs. Local default 2; cloud 1-64 (most accounts run 1-8; Fleet
- /// decides), default the pool template's (4).
+ /// vCPUs. Local default 2.
#[uniffi(default = None)]
pub cpus: Option<u32>,
- /// Memory in MiB. Local default 4096; cloud 512 up to 524288 (most
- /// accounts run 1024-32768; Fleet decides), default the pool
- /// template's (4096).
+ /// Memory in MiB. Local default 4096.
#[uniffi(default = None)]
pub memory_mb: Option<u64>,
/// Grow the VM's disk to this many GiB (local VMs; default: the
@@ -500,7 +497,7 @@ impl From<dpb::SpacesHost> for SpacesHost {
/// none.
#[derive(Debug, Clone, PartialEq, uniffi::Record)]
pub struct GpuSupport {
- /// `lume`, `qemu`, `container`, `gvisor`, `fleet`, a provider's name.
+ /// `lume`, `qemu`, `container`, `gvisor`, a provider's name.
pub runtime: String,
/// Its options.
pub options: Vec<GpuOption>,
@@ -944,8 +941,8 @@ pub struct SpaceStreamTicket {
pub width: u32,
/// Initial height.
pub height: u32,
- /// Attaching needs [`Space::websocket_headers`] (Fleet gateway or the
- /// daemon passthrough).
+ /// Attaching needs [`Space::websocket_headers`] (a gateway or the daemon
+ /// passthrough).
pub needs_headers: bool,
}
@@ -2206,8 +2203,8 @@ impl SpacesToolCaller {
// ------------------------------------------------------------ Spaces
-/// The Spaces registry: add a machine by URL, claim a Fleet Space,
-/// provision a local one, and get [`Space`] handles.
+/// The Spaces registry: add a machine by URL, provision a local one, and get
+/// [`Space`] handles.
#[derive(uniffi::Object)]
pub struct Spaces {
host: Host,
diff --git a/libs/cua/crates/cua-sdk/src/native/spacesd.rs b/libs/cua/crates/cua-sdk/src/native/spacesd.rs
index a56e5355a0..d89cdb5c3f 100644
--- a/libs/cua/crates/cua-sdk/src/native/spacesd.rs
+++ b/libs/cua/crates/cua-sdk/src/native/spacesd.rs
@@ -337,8 +337,8 @@ pub struct SpacesdHttpRequest {
pub method: String,
/// Absolute path under the endpoint, for example `/mcp`. Never a URL.
pub path: String,
- /// Extra headers. Credentials (`authorization`, the env and Fleet claim
- /// headers) are the client's and cannot be set here.
+ /// Extra headers. Credentials (`authorization` and the env headers) are
+ /// the client's and cannot be set here.
#[uniffi(default = [])]
pub headers: Vec<SpacesdHttpHeader>,
/// Request body (empty for none).
@@ -362,10 +362,10 @@ pub struct SpacesdHttpResponse {
pub body: Vec<u8>,
}
-/// Re-mints the WebSocket upgrade headers when a socket is opened. Fleet
-/// access tokens are short-lived (about five minutes), so a bearer taken when
-/// the client was created makes the gateway refuse (302) every media socket
-/// opened later on a long-lived client.
+/// Re-mints the WebSocket upgrade headers when a socket is opened. A gateway's
+/// access tokens are short-lived, so a bearer taken when the client was
+/// created makes the gateway refuse every media socket opened later on a
+/// long-lived client.
pub(crate) type WsHeaderRefresh = Arc<
dyn Fn() -> futures_util::future::BoxFuture<'static, Result<Vec<(String, String)>>>
+ Send
@@ -380,10 +380,11 @@ pub struct SpacesdClient {
/// creation.
#[cfg_attr(not(feature = "media"), allow(dead_code))]
pub(crate) ws_headers: Vec<(String, String)>,
- /// Fresh headers at use (cloud Spaces); `None` when they never expire.
+ /// Fresh headers at use (a Space behind a gateway); `None` when they never
+ /// expire.
#[cfg_attr(not(feature = "media"), allow(dead_code))]
pub(crate) ws_refresh: Option<WsHeaderRefresh>,
- /// Where the spacesd runs (`local`, `cloud`, `direct`, `relay`), for
+ /// Where the spacesd runs (`local`, `direct`, `relay`, your cloud), for
/// agent-run telemetry. `direct` (reached by address) unless set.
pub(crate) location: String,
}
@@ -408,7 +409,7 @@ impl SpacesdClient {
}
/// A client whose WebSocket headers are re-minted by `refresh` each time
- /// a socket is opened (a cloud Space's Fleet bearer).
+ /// a socket is opened (a Space behind a gateway).
pub(crate) fn with_ws_refresh(mut self, refresh: WsHeaderRefresh) -> Self {
self.ws_refresh = Some(refresh);
self
@@ -416,16 +417,16 @@ impl SpacesdClient {
/// Rust hosts: headers WebSocket upgrades on this route need, as of
/// creation. Prefer [`SpacesdClient::current_ws_headers`] for a socket
- /// opened later: a cloud Space's bearer expires within minutes.
+ /// opened later: a gateway's bearer expires within minutes.
pub fn ws_headers(&self) -> Vec<(String, String)> {
self.ws_headers.clone()
}
/// Rust hosts: headers a WebSocket upgrade opened now needs, with a
- /// fresh Fleet bearer for a cloud Space.
+ /// fresh bearer for a Space behind a gateway.
pub async fn current_ws_headers(&self) -> Result<Vec<(String, String)>> {
match &self.ws_refresh {
- // On the SDK runtime: the refresh may do Fleet I/O.
+ // On the SDK runtime: the refresh may do I/O.
Some(refresh) => run(refresh()).await,
None => Ok(self.ws_headers.clone()),
}
@@ -935,8 +936,8 @@ mod tests {
}
}
- /// A long-lived client to a cloud Space: its Fleet bearer expires while
- /// the client is held, so every media socket must carry the bearer
+ /// A long-lived client to a Space behind a gateway: its bearer expires
+ /// while the client is held, so every media socket must carry the bearer
/// current when the socket opens, never the one from creation.
#[tokio::test]
async fn media_sockets_carry_the_bearer_current_at_open() {
diff --git a/libs/cua/crates/cua-sdk/src/web/fetch.rs b/libs/cua/crates/cua-sdk/src/web/fetch.rs
deleted file mode 100644
index e2bd5f2ec6..0000000000
--- a/libs/cua/crates/cua-sdk/src/web/fetch.rs
+++ /dev/null
@@ -1,117 +0,0 @@
-//! A cyclops-sdk `HttpClient` over the global `fetch` (`globalThis.fetch`).
-//!
-//! cyclops-sdk's own browser transport calls `window.fetch`, so it fails
-//! wherever there is no `window`: Node, Deno, Bun, web and service workers.
-//! This one looks `fetch` up on the global object instead and keeps the
-//! same contract: no redirects, no ambient credentials, only the supplied
-//! headers and body, and `max_response_bytes` enforced while streaming.
-
-use cyclops_sdk::{HttpClient, HttpError, HttpRequest, HttpResponse};
-use wasm_bindgen::{JsCast, JsValue};
-use wasm_bindgen_futures::JsFuture;
-
-/// `fetch` from the global object (browser page, worker or Node).
-pub(crate) struct GlobalFetch;
-
-fn err(e: JsValue) -> HttpError {
- let reason = e
- .as_string()
- .or_else(|| {
- e.dyn_ref::<js_sys::Error>()
- .map(|e| String::from(e.message()))
- })
- .unwrap_or_else(|| format!("fetch failed: {e:?}"));
- HttpError::Transport { reason }
-}
-
-fn transport(reason: impl Into<String>) -> HttpError {
- HttpError::Transport {
- reason: reason.into(),
- }
-}
-
-/// `AbortSignal.timeout(ms)` when the host has it (browsers, Node >= 17.3).
-fn timeout_signal(secs: u64) -> Option<web_sys::AbortSignal> {
- let global = js_sys::global();
- let ctor = js_sys::Reflect::get(&global, &"AbortSignal".into()).ok()?;
- let f = js_sys::Reflect::get(&ctor, &"timeout".into())
- .ok()?
- .dyn_into::<js_sys::Function>()
- .ok()?;
- let ms = JsValue::from_f64((secs.saturating_mul(1000)) as f64);
- f.call1(&ctor, &ms).ok()?.dyn_into().ok()
-}
-
-#[async_trait::async_trait(?Send)]
-impl HttpClient for GlobalFetch {
- async fn execute(&self, request: HttpRequest) -> Result<HttpResponse, HttpError> {
- let init = web_sys::RequestInit::new();
- init.set_method(&request.method);
- init.set_redirect(web_sys::RequestRedirect::Error);
- init.set_credentials(web_sys::RequestCredentials::Omit);
- if let Some(body) = &request.body {
- init.set_body(&js_sys::Uint8Array::from(body.as_slice()).into());
- }
- if let Some(secs) = request.timeout_secs
- && let Some(signal) = timeout_signal(secs)
- {
- init.set_signal(Some(&signal));
- }
- let req = web_sys::Request::new_with_str_and_init(&request.url, &init).map_err(err)?;
- let headers = req.headers();
- for h in &request.headers {
- headers.set(&h.name, &h.value).map_err(err)?;
- }
-
- let global = js_sys::global();
- let fetch = js_sys::Reflect::get(&global, &"fetch".into())
- .map_err(err)?
- .dyn_into::<js_sys::Function>()
- .map_err(|_| transport("globalThis.fetch is unavailable"))?;
- let promise = fetch
- .call1(&global, &req)
- .map_err(err)?
- .dyn_into::<js_sys::Promise>()
- .map_err(|_| transport("fetch did not return a Promise"))?;
- let response = JsFuture::from(promise)
- .await
- .map_err(err)?
- .dyn_into::<web_sys::Response>()
- .map_err(|_| transport("fetch did not resolve to a Response"))?;
-
- let mut body = Vec::new();
- if let Some(stream) = response.body() {
- let reader = stream
- .get_reader()
- .dyn_into::<web_sys::ReadableStreamDefaultReader>()
- .map_err(|_| transport("response body has no default reader"))?;
- loop {
- let chunk = JsFuture::from(reader.read()).await.map_err(err)?;
- let done = js_sys::Reflect::get(&chunk, &"done".into())
- .map_err(err)?
- .as_bool()
- .unwrap_or(false);
- if done {
- break;
- }
- let value = js_sys::Reflect::get(&chunk, &"value".into()).map_err(err)?;
- let bytes = js_sys::Uint8Array::new(&value);
- let next = body.len() as u64 + u64::from(bytes.length());
- if request.max_response_bytes.is_some_and(|max| next > max) {
- let _ = JsFuture::from(reader.cancel()).await;
- return Err(transport(format!(
- "response body exceeds {} bytes",
- request.max_response_bytes.unwrap_or_default()
- )));
- }
- body.extend_from_slice(&bytes.to_vec());
- }
- reader.release_lock();
- }
- Ok(HttpResponse {
- status: response.status(),
- headers: vec![],
- body,
- })
- }
-}
diff --git a/libs/cua/crates/cua-sdk/src/web/mod.rs b/libs/cua/crates/cua-sdk/src/web/mod.rs
index eadfe0bdeb..816d856083 100644
--- a/libs/cua/crates/cua-sdk/src/web/mod.rs
+++ b/libs/cua/crates/cua-sdk/src/web/mod.rs
@@ -3,13 +3,12 @@
//! The subset that makes sense in a browser tab, with the same names as the
//! native API:
//!
-//! - `Cua.embedded(config)`: Fleet settings only (static bearer; OAuth client
-//! secrets never belong in a browser);
+//! - `Cua.embedded(config)`: the browser runtime;
//! - `Cua.spacesd(url, token)` → [`SpacesdClient`] over gRPC-Web (`fetch`):
//! capabilities, health, run/sh, screenshot, pointer and keyboard,
//! clipboard and the proto3-JSON escape hatch for every unary RPC;
-//! - `Cua.fleet()` → [`Fleet`]: pools, claims and service URLs through
-//! cyclops-sdk over `globalThis.fetch` (pages, workers and Node).
+//! - `Cua.fleet()` → [`Fleet`]: Cua Cloud has ended, so it always fails
+//! with the "Cua Cloud has ended" error and never connects.
//!
//! Media in the browser goes through WebCodecs on the page, fed by the
//! daemon's media bridge or the spacesd's `/media` socket directly.
@@ -28,9 +27,6 @@ use std::{collections::HashMap, sync::Arc};
const CLOUD_ENDED: &str = "Cua Cloud has ended; use a local sandbox or your own machine. \
See https://cua.ai/docs/cua-sdk/guides/cua-cloud-ended";
-#[cfg(target_arch = "wasm32")]
-mod fetch;
-
/// On wasm32 futures need not be `Send` (single-threaded). On the host this
/// module is only compiled for binding metadata (feature `web`), where
/// UniFFI still demands `Send`; the wrapper asserts it there. Host builds
@@ -96,13 +92,13 @@ fn status(e: tonic::Status) -> CuaError {
}
}
-/// Fleet settings for the browser (static bearer only).
+/// Fleet settings for the browser. Ignored: Cua Cloud has ended.
#[derive(Debug, Clone, Default, PartialEq, Eq, uniffi::Record)]
pub struct FleetSettings {
- /// Fleet API base URL.
+ /// Ignored.
#[uniffi(default = None)]
pub base_url: Option<String>,
- /// Bearer token.
+ /// Ignored.
#[uniffi(default = None)]
pub token: Option<String>,
}
@@ -110,23 +106,22 @@ pub struct FleetSettings {
/// Configuration of the browser SDK.
#[derive(Debug, Clone, Default, PartialEq, Eq, uniffi::Record)]
pub struct CuaConfig {
- /// Fleet settings.
+ /// Ignored: Cua Cloud has ended.
#[uniffi(default = None)]
pub fleet: Option<FleetSettings>,
}
/// The cua SDK (browser build).
#[derive(uniffi::Object)]
-pub struct Cua {
- config: CuaConfig,
-}
+pub struct Cua {}
#[uniffi::export]
impl Cua {
/// The browser runtime.
#[uniffi::constructor]
pub fn embedded(config: CuaConfig) -> Arc<Self> {
- Arc::new(Self { config })
+ let _ = config;
+ Arc::new(Self {})
}
/// Connects to cua-spacesd at `url` over gRPC-Web.
@@ -155,39 +150,10 @@ impl Cua {
.await
}
- /// Fleet control plane.
+ /// Cua Cloud has ended: always fails with the "Cua Cloud has ended"
+ /// error.
pub fn fleet(&self) -> Result<Arc<Fleet>> {
- // Cua Cloud has ended: fails with the "Cua Cloud has ended" message
- // and never connects.
- Err::<(), _>(CuaError::Unsupported(CLOUD_ENDED.into()))?;
- let f = self.config.fleet.clone().unwrap_or_default();
- let token = f.token.filter(|t| !t.is_empty()).ok_or_else(|| {
- CuaError::ProviderNotConfigured("the browser Fleet client needs a token".into())
- })?;
- let cfg = cyclops_sdk::CyclopsTokenProviderConfiguration {
- base_url: f
- .base_url
- .unwrap_or_else(|| "https://run.cua.ai".into())
- .trim_end_matches('/')
- .to_string(),
- pool_poll_interval_ms: 2000,
- pool_poll_limit: 300,
- claim_poll_interval_ms: 2000,
- claim_poll_limit: 300,
- };
- // globalThis.fetch, not window.fetch: the same build runs in Node
- // and in workers.
- #[cfg(target_arch = "wasm32")]
- let sdk = cyclops_sdk::CyclopsClient::connect_with_access_token(
- cfg,
- token,
- Arc::new(fetch::GlobalFetch),
- )
- .map_err(|e| CuaError::Fleet(e.to_string()))?;
- #[cfg(not(target_arch = "wasm32"))]
- let sdk = cyclops_sdk::CyclopsClient::connect_browser_with_access_token(cfg, token)
- .map_err(|e| CuaError::Fleet(e.to_string()))?;
- Ok(Arc::new(Fleet { sdk }))
+ Err(CuaError::Unsupported(CLOUD_ENDED.into()))
}
}
@@ -578,7 +544,8 @@ pub struct FleetSandbox {
pub services: Vec<String>,
}
-/// Fleet control plane (browser transport).
+/// Fleet control plane (browser transport). Cua Cloud has ended:
+/// [`Cua::fleet`] never returns one.
#[derive(uniffi::Object)]
pub struct Fleet {
sdk: Arc<cyclops_sdk::CyclopsClient>,
diff --git a/libs/cua/crates/cua-sdk/tests/embedded_relay.rs b/libs/cua/crates/cua-sdk/tests/embedded_relay.rs
index 626dcf2ad4..d3a8e948d8 100644
--- a/libs/cua/crates/cua-sdk/tests/embedded_relay.rs
+++ b/libs/cua/crates/cua-sdk/tests/embedded_relay.rs
@@ -5,11 +5,15 @@
//! no relay account and never refreshed the directory, so "My machines"
//! went empty while `cua spaces ls` still listed them.
//!
+//! The signed-in session only sets up that relay account: Cua Cloud has
+//! ended, so the embedded runtime never builds a Fleet client from it and
+//! never makes a Fleet request, even when Fleet settings are given.
+//!
//! One test (it sets process environment): a temp `CUA_HOME`, the file
//! credential store and a loopback fake relay; nothing real is touched.
use cua_host::testing::FakeRelay;
-use cua_sdk::{Cua, CuaConfig};
+use cua_sdk::{Cua, CuaConfig, FleetSettings};
/// cua.local as the user's Mac saw it: online, sharing, desktop not shared
/// (spacesd 0.2.2 from an older app), and the user's Mac itself, not sharing.
@@ -42,8 +46,16 @@ async fn embedded_runtime_on_the_session_lists_your_relay_machines() {
relay.set_online(OTHER_MAC, true, "0.2.2");
relay.set_online(THIS_MAC, true, "0.2.0");
+ // A "Fleet" that must never be called: it is named by the environment
+ // and by the config, and any connection to it would be a request.
+ let fleet = std::net::TcpListener::bind("127.0.0.1:0").unwrap();
+ fleet.set_nonblocking(true).unwrap();
+ let fleet_url = format!("http://{}", fleet.local_addr().unwrap());
+
let home = tempfile::tempdir().unwrap();
unsafe {
+ std::env::set_var("CUA_FLEET_BASE_URL", &fleet_url);
+ std::env::set_var("FLEETS_TOKEN", "not-a-token");
std::env::set_var("CUA_HOME", home.path());
std::env::set_var("CUA_CREDENTIAL_STORE", "file");
std::env::set_var("CUA_RELAY_URL", &relay.url);
@@ -61,12 +73,17 @@ async fn embedded_runtime_on_the_session_lists_your_relay_machines() {
})
.unwrap();
- // The app's configuration (`CuaConfig(fleetFromSession: true)`).
+ // The app's configuration (`CuaConfig(fleetFromSession: true)`), with
+ // Fleet settings that would have been used before Cua Cloud ended.
let cua = Cua::embedded(CuaConfig {
state_dir: Some(home.path().join("sandboxes").display().to_string()),
spaces_home: Some(home.path().display().to_string()),
- fleet_pool_home: Some(home.path().join("pools").display().to_string()),
- fleet_from_env: false,
+ fleet: Some(FleetSettings {
+ base_url: Some(fleet_url.clone()),
+ token: Some("not-a-token".into()),
+ ..Default::default()
+ }),
+ fleet_from_env: true,
fleet_from_session: true,
..Default::default()
})
@@ -82,12 +99,22 @@ async fn embedded_runtime_on_the_session_lists_your_relay_machines() {
assert!(ids.contains(&format!("relay:{OTHER_MAC}")), "{ids:?}");
assert!(ids.contains(&format!("relay:{THIS_MAC}")), "{ids:?}");
+ // No Fleet client exists: the cloud entry points fail with the one
+ // message and listing sandboxes never asks Fleet.
+ let e = cua.fleet().err().expect("Cua.fleet() fails");
+ assert!(e.to_string().contains("Cua Cloud has ended"), "{e}");
+ let listed = cua.sandboxes().list_with_warnings(None).await.unwrap();
+ assert!(listed.warnings.is_empty(), "{listed:?}");
+ assert!(
+ matches!(fleet.accept(), Err(e) if e.kind() == std::io::ErrorKind::WouldBlock),
+ "something connected to the Fleet URL"
+ );
+
// Without the session (`fleet_from_session` off) nothing reaches the
// relay: an SDK user who did not ask for the session gets none of it.
let bare = Cua::embedded(CuaConfig {
state_dir: Some(home.path().join("sandboxes2").display().to_string()),
spaces_home: Some(home.path().join("bare").display().to_string()),
- fleet_pool_home: Some(home.path().join("pools2").display().to_string()),
fleet_from_env: false,
fleet_from_session: false,
..Default::default()
@@ -101,4 +128,8 @@ async fn embedded_runtime_on_the_session_lists_your_relay_machines() {
.iter()
.all(|s| !s.id.starts_with("relay:"))
);
+ assert!(
+ matches!(fleet.accept(), Err(e) if e.kind() == std::io::ErrorKind::WouldBlock),
+ "something connected to the Fleet URL"
+ );
}
diff --git a/libs/cua/crates/cua-sdk/tests/ffi_threads.rs b/libs/cua/crates/cua-sdk/tests/ffi_threads.rs
index 095bba2857..4bf086e0f5 100644
--- a/libs/cua/crates/cua-sdk/tests/ffi_threads.rs
+++ b/libs/cua/crates/cua-sdk/tests/ffi_threads.rs
@@ -5,9 +5,9 @@
//! runtime (`run`) panics with "there is no reactor running" here.
//!
//! Two checks:
-//! - dynamic: env, Fleet, sandboxes, Spaces and presence methods against
-//! in-process fakes (MockServer spacesd with presence, FakeFleet), in
-//! the embedded and daemon topologies;
+//! - dynamic: env, sandboxes, Spaces and presence methods against
+//! in-process fakes (MockServer spacesd with presence), in the embedded
+//! and daemon topologies;
//! - static: every `pub async fn` in an exported impl either goes through
//! the runtime (`run(`, `env_call!`, `fleet_call!`) or only delegates to
//! methods that do, so new methods cannot skip it silently.
@@ -19,7 +19,6 @@ use cua_daemon::{
fixtures::{self, SpacesdFixture},
server::{self, DaemonHandle, ServerConfig},
};
-use cua_fleet::testing::FakeFleet;
use cua_sdk::{
Cua, CuaConfig, PresenceCursor, PresenceIdentity, PresencePoint, SandboxCreateOptions,
SpacesdCommand, presence_now_ms,
@@ -35,7 +34,6 @@ use std::{
};
const TOKEN: &str = "env-token";
-const POOL: &str = "cua-e2e-ffi";
/// Polls `f` on the current thread, parking between wakeups. No Tokio.
fn block_on<F: Future>(f: F) -> F::Output {
@@ -132,7 +130,6 @@ fn direct(url: &str, name: &str) -> SandboxCreateOptions {
struct World {
rt: tokio::runtime::Runtime,
env: SpacesdFixture,
- _gw: SpacesdFixture,
_dirs: tempfile::TempDir,
_daemon: Option<DaemonHandle>,
}
@@ -144,24 +141,21 @@ fn world(daemon: bool) -> (World, Arc<Cua>) {
.build()
.unwrap();
let dirs = tempfile::tempdir().unwrap();
- let (env, gw, cua, handle) = rt.block_on(async {
+ let (env, cua, handle) = rt.block_on(async {
let env = fixtures::start_env(Some(TOKEN), None).await;
env.mock
.state
.advertise(&["presence", cua_spacesd_client::TUNNEL_FORWARD_FEATURE]);
- let gw = fixtures::start_env(None, Some(fixtures::fake_gateway(POOL, POOL))).await;
- let fake = FakeFleet::new();
let runtime = Runtime::new(RuntimeConfig {
state_dir: Some(dirs.path().join("sandboxes")),
spaces_home: Some(dirs.path().join("cua")),
teleport_home: Some(dirs.path().join("host-home")),
- fleet_client: Some(fake.client_with_base(&gw.url)),
env_probe_timeout: Some(Duration::from_secs(5)),
..Default::default()
})
.unwrap();
if !daemon {
- return (env, gw, Cua::from_runtime(runtime), None);
+ return (env, Cua::from_runtime(runtime), None);
}
let h = server::start(
runtime,
@@ -177,13 +171,12 @@ fn world(daemon: bool) -> (World, Arc<Cua>) {
.unwrap();
// `Cua::connect` itself is exercised on the foreign thread below.
let cua = Cua::connect(h.loopback_url.clone(), Some(h.token.clone())).unwrap();
- (env, gw, cua, Some(h))
+ (env, cua, Some(h))
});
(
World {
rt,
env,
- _gw: gw,
_dirs: dirs,
_daemon: handle,
},
@@ -191,7 +184,7 @@ fn world(daemon: bool) -> (World, Arc<Cua>) {
)
}
-async fn exercise(cua: Arc<Cua>, env_url: String, with_fleet: bool) {
+async fn exercise(cua: Arc<Cua>, env_url: String) {
// ---- Cua
let _ = cua.info().await.unwrap();
@@ -237,10 +230,8 @@ async fn exercise(cua: Arc<Cua>, env_url: String, with_fleet: bool) {
.unwrap();
// ---- Fleet: Cua Cloud has ended, so the client never connects.
- if with_fleet {
- let e = cua.fleet().err().expect("Cua.fleet() fails");
- assert!(e.to_string().contains("Cua Cloud has ended"), "{e}");
- }
+ let e = cua.fleet().err().expect("Cua.fleet() fails");
+ assert!(e.to_string().contains("Cua Cloud has ended"), "{e}");
// ---- sandboxes (direct)
let sbx = cua.sandboxes();
@@ -337,7 +328,7 @@ fn exported_methods_run_without_a_tokio_runtime_embedded() {
})
.unwrap();
block_on(other.info()).unwrap();
- block_on(exercise(cua, url, true));
+ block_on(exercise(cua, url));
});
drop(w.rt);
}
@@ -346,7 +337,7 @@ fn exported_methods_run_without_a_tokio_runtime_embedded() {
fn exported_methods_run_without_a_tokio_runtime_daemon() {
let (w, cua) = world(true);
let url = w.env.url.clone();
- on_foreign_thread("ffi-daemon", move || block_on(exercise(cua, url, false)));
+ on_foreign_thread("ffi-daemon", move || block_on(exercise(cua, url)));
drop(w.rt);
}
diff --git a/libs/cua/crates/cua-sdk/tests/fleet_billing.rs b/libs/cua/crates/cua-sdk/tests/fleet_billing.rs
deleted file mode 100644
index c5890e1c66..0000000000
--- a/libs/cua/crates/cua-sdk/tests/fleet_billing.rs
+++ /dev/null
@@ -1,63 +0,0 @@
-//! Cua Cloud billing through the exported SDK over `FakeFleet`: the status
-//! the Spaces apps' Settings show, and a cloud create refused for want of
-//! credit as a typed `CloudCreditExhausted` (nothing reaches Stripe).
-
-use cua_daemon::{Runtime, RuntimeConfig};
-use cua_fleet::testing::FakeFleet;
-use cua_sdk::{Cua, CuaError, SandboxCreateOptions};
-use serde_json::json;
-use std::time::Duration;
-
-fn cua(fake: &FakeFleet, dirs: &tempfile::TempDir) -> std::sync::Arc<Cua> {
- let runtime = Runtime::new(RuntimeConfig {
- state_dir: Some(dirs.path().join("sandboxes")),
- spaces_home: Some(dirs.path().join("cua")),
- fleet_client: Some(fake.client()),
- env_probe_timeout: Some(Duration::from_secs(5)),
- ..Default::default()
- })
- .unwrap();
- Cua::from_runtime(runtime)
-}
-
-#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
-#[ignore = "Cua Cloud has ended (CUA-1854); removed with the Fleet provider"]
-async fn the_status_carries_the_credit_and_the_billing_page() {
- let fake = FakeFleet::new();
- fake.faults.lock().unwrap().billing = Some(json!({
- "billing_enabled": true, "payment_method_present": false, "card": null,
- "plan": "none", "payg_available": true,
- "credit": {"balance_usd_cents": 742, "signup_grant_usd_cents": 100, "signup_grant_unused": false},
- "billing_url": "https://run.cua.ai/billing"
- }));
- let dirs = tempfile::tempdir().unwrap();
- let s = cua(&fake, &dirs)
- .fleet()
- .unwrap()
- .billing_status()
- .await
- .unwrap();
- assert_eq!(s.credit.as_ref().map(|c| c.balance_usd_cents), Some(742));
- assert_eq!(s.billing_url.as_deref(), Some("https://run.cua.ai/billing"));
-}
-
-#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
-#[ignore = "Cua Cloud has ended (CUA-1854); removed with the Fleet provider"]
-async fn a_cloud_create_out_of_credit_is_a_typed_error_with_the_billing_page() {
- let fake = FakeFleet::new();
- fake.faults.lock().unwrap().credit_exhausted = Some("https://run.cua.ai/billing".into());
- let dirs = tempfile::tempdir().unwrap();
- let cua = cua(&fake, &dirs);
- let mut o = SandboxCreateOptions::new("cloud", "ghcr.io/trycua/linux:24.04");
- o.kind = Some("vm".into());
- match cua.sandboxes().create(o).await {
- Err(CuaError::CloudCreditExhausted(m)) => {
- assert_eq!(
- m,
- "You're out of Cua Cloud credit. Add credit at https://run.cua.ai/billing"
- );
- }
- Err(e) => panic!("expected CloudCreditExhausted, got {e:?}"),
- Ok(_) => panic!("expected CloudCreditExhausted, got a sandbox"),
- }
-}
diff --git a/libs/cua/crates/cua-sdk/tests/fleet_token_refresh.rs b/libs/cua/crates/cua-sdk/tests/fleet_token_refresh.rs
deleted file mode 100644
index b2904f7095..0000000000
--- a/libs/cua/crates/cua-sdk/tests/fleet_token_refresh.rs
+++ /dev/null
@@ -1,150 +0,0 @@
-//! A cloud Space's `SpacesdClient` held past the Fleet access token's
-//! lifetime: media sockets opened later must carry a fresh bearer (the
-//! gateway answers 302 to an expired one). In-process fakes only
-//! (`FakeFleet`, a `MockServer` behind the gateway emulation); every wait is
-//! bounded.
-
-use cua_daemon::{Runtime, RuntimeConfig, fixtures};
-use cua_fleet::sdk::{AccessTokenProvider, AccessTokenProviderError};
-use cua_fleet::testing::FakeFleet;
-use cua_sdk::{Cua, FrameSink, MediaEvent, MediaOpenOptions, SandboxCreateOptions, VideoFrame};
-use std::{
- collections::HashMap,
- sync::{Arc, Mutex},
- time::Duration,
-};
-
-const POOL: &str = "cua-e2e-gw";
-const IMAGE: &str = "ghcr.io/trycua/linux:24.04";
-
-/// The signed-in account's bearer: replaced when it expires.
-struct Rotating(Arc<Mutex<String>>);
-
-#[async_trait::async_trait]
-impl AccessTokenProvider for Rotating {
- async fn get_access_token(&self, _force: bool) -> Result<String, AccessTokenProviderError> {
- Ok(self.0.lock().unwrap().clone())
- }
-}
-
-struct Discard;
-
-impl FrameSink for Discard {
- fn on_frame(&self, _: VideoFrame) {}
- fn on_event(&self, _: MediaEvent) {}
-}
-
-fn cloud(name: &str) -> SandboxCreateOptions {
- SandboxCreateOptions {
- on: Some("cloud".into()),
- kind: None,
- runtime: None,
- image: IMAGE.into(),
- name: Some(name.into()),
- token: None,
- pool: Some(POOL.into()),
- os: None,
- cpus: None,
- memory_mb: None,
- ports: vec![],
- services: HashMap::new(),
- wait_for: vec![],
- ready_timeout_ms: None,
- env: HashMap::new(),
- fleet_replicas: None,
- fleet_ttl_seconds: None,
- warm: None,
- max_pool_size: None,
- command: None,
- cloud: None,
- sidecars: vec![],
- registry_secret: None,
- build: None,
- network: None,
- overlays: vec![],
- keep_on_failure: false,
- gpu: None,
- }
-}
-
-fn bearer(headers: &[(String, String)]) -> Option<&str> {
- headers
- .iter()
- .find(|(k, _)| k.eq_ignore_ascii_case("authorization"))
- .map(|(_, v)| v.as_str())
-}
-
-#[tokio::test]
-#[ignore = "Cua Cloud has ended (CUA-1854); removed with the Fleet provider"]
-async fn a_held_cloud_spacesd_client_opens_media_with_a_fresh_fleet_bearer() {
- let gw = fixtures::start_env(None, Some(fixtures::fake_gateway(POOL, POOL))).await;
- let fake = FakeFleet::new();
- let token = Arc::new(Mutex::new(fixtures::FAKE_FLEET_TOKEN.to_string()));
- let fleet = cua_fleet::FleetClient::connect_with_token_provider(
- cua_fleet::FleetConfig {
- base_url: gw.url.clone(),
- pool_poll_interval_ms: 1,
- claim_poll_interval_ms: 1,
- claim_poll_limit: 50,
- ..Default::default()
- },
- Arc::new(Rotating(token.clone())),
- Some(Arc::new(fake.clone())),
- )
- .unwrap();
- let dirs = tempfile::tempdir().unwrap();
- let runtime = Runtime::new(RuntimeConfig {
- state_dir: Some(dirs.path().join("sandboxes")),
- // Never the real ~/.cua registry.
- spaces_home: Some(dirs.path().join("cua")),
- fleet_client: Some(fleet.clone()),
- env_probe_timeout: Some(Duration::from_secs(5)),
- ..Default::default()
- })
- .unwrap();
- runtime.mark_share_host();
- let cua = Cua::from_runtime(runtime);
- #[allow(deprecated)] // the fixture pool, as in tests/topologies.rs
- fleet
- .apply_pool(&cua_fleet::PoolSpec::new(POOL, IMAGE))
- .await
- .unwrap();
- let sandbox = cua.sandboxes().create(cloud(POOL)).await.unwrap();
- assert_eq!(sandbox.location(), "cloud");
-
- // Held for the whole test, like an app keeping its connection object.
- let env = sandbox.spacesd(Some(5_000)).await.unwrap();
- let options = || MediaOpenOptions {
- display: None,
- window_handle: None,
- max_fps: 0,
- max_dimension: 0,
- audio: false,
- disable_video: false,
- request_json: None,
- };
- let session = env.open_media(options(), Arc::new(Discard)).await.unwrap();
- let first = gw.media.lock().unwrap().last_authorization.clone();
- assert_eq!(
- first.as_deref(),
- Some(format!("Bearer {}", fixtures::FAKE_FLEET_TOKEN).as_str())
- );
- drop(session);
-
- // The access token expires and the account's provider mints a new one.
- *token.lock().unwrap() = "rotated-fleet-token".into();
- let fresh = env.current_ws_headers().await.unwrap();
- assert_eq!(bearer(&fresh), Some("Bearer rotated-fleet-token"));
- assert!(
- fresh
- .iter()
- .any(|(k, v)| k == "x-cua-fleet-claim" && v == POOL),
- "{fresh:?}"
- );
- // What the client was created with is the expired bearer; the media
- // path must not use it.
- assert_eq!(
- bearer(&env.ws_headers()),
- Some(format!("Bearer {}", fixtures::FAKE_FLEET_TOKEN).as_str())
- );
-}
diff --git a/libs/cua/crates/cua-sdk/tests/image_info.rs b/libs/cua/crates/cua-sdk/tests/image_info.rs
deleted file mode 100644
index 8516e8751c..0000000000
--- a/libs/cua/crates/cua-sdk/tests/image_info.rs
+++ /dev/null
@@ -1,90 +0,0 @@
-//! The exported `Sandbox::image_info` / `SandboxInfo.image_info`, embedded
-//! runtime over `FakeFleet` and an in-memory registry (no network, nothing
-//! started). Its own binary: it installs a process-wide registry source.
-
-use cua_daemon::{Runtime, RuntimeConfig, fixtures};
-use cua_fleet::testing::FakeFleet;
-use cua_image::testing::FakeRegistry;
-use cua_sdk::{CloudOptions, Cua, ImageInfo, SandboxCreateOptions};
-use std::{sync::Arc, time::Duration};
-
-#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
-#[ignore = "Cua Cloud has ended (CUA-1854); removed with the Fleet provider"]
-async fn fleet_managed_sandboxes_report_the_pinned_image_and_direct_ones_none() {
- let fake = FakeFleet::new();
- // The in-memory registry, not the fixtures' inspector (which sends
- // references as given, unresolved).
- cua_fleet::set_image_inspector(None);
- let mut r = FakeRegistry::default();
- let disk = r.index(
- "ghcr.io/trycua/linux:24.04-disk",
- &["amd64", "arm64"],
- true,
- None,
- );
- r.index(
- "ghcr.io/trycua/linux:24.04",
- &["amd64", "arm64"],
- false,
- None,
- );
- cua_image::resolve::set_source(Some(Arc::new(r)));
- let dirs = tempfile::tempdir().unwrap();
- let runtime = Runtime::new(RuntimeConfig {
- state_dir: Some(dirs.path().join("sandboxes")),
- spaces_home: Some(dirs.path().join("cua")),
- fleet_client: Some(fake.client()),
- env_probe_timeout: Some(Duration::from_secs(5)),
- ..Default::default()
- })
- .unwrap();
- runtime.mark_share_host();
- let cua = Cua::from_runtime(runtime);
- let sandboxes = cua.sandboxes();
-
- // A VM in the cloud (KubeVirt) picks the containerDisk sibling, pinned.
- let mut o = SandboxCreateOptions::new("cloud", "ghcr.io/trycua/linux:24.04");
- o.kind = Some("vm".into());
- let sb = sandboxes.create(o).await.unwrap();
- let want = ImageInfo {
- reference: "ghcr.io/trycua/linux:24.04".into(),
- pinned_ref: format!("ghcr.io/trycua/linux@{disk}"),
- digest: disk.clone(),
- variant: "containerdisk".into(),
- arch: Some("amd64".into()),
- os: "linux".into(),
- emulated: false,
- spacesd: None,
- };
- assert_eq!(sb.image_info(), Some(want.clone()));
- assert_eq!(sb.info().image_info, Some(want.clone()));
-
- // A claim on the same pool by name reports its template's (pinned)
- // image, and `Fleet.pool_image_info` answers the same.
- let pool = sb.info().provider_details["namespace"].clone();
- let mut o = SandboxCreateOptions::new("cloud", "");
- o.cloud = Some(CloudOptions {
- pool: Some(pool.clone()),
- ..Default::default()
- });
- let named = sandboxes.create(o).await.unwrap();
- let got = named.image_info().expect("named pool image info");
- assert_eq!(got.pinned_ref, want.pinned_ref);
- assert_eq!(got.digest, disk);
- assert_eq!(got.variant, "containerdisk");
- assert_eq!(named.info().image_info, Some(got.clone()));
- let direct_info = cua.fleet().unwrap().pool_image_info(pool).await.unwrap();
- assert_eq!(direct_info, Some(got));
- sandboxes.delete(named.name()).await.unwrap();
- sandboxes.delete(sb.name()).await.unwrap();
- cua_image::resolve::set_source(None);
-
- // Direct: a machine by URL; nothing was resolved.
- let env = fixtures::start_env(None, None).await;
- let direct = sandboxes
- .connect_url(env.url.clone(), None, None)
- .await
- .unwrap();
- assert_eq!(direct.image_info(), None);
- assert_eq!(direct.info().image_info, None);
-}
diff --git a/libs/cua/crates/cua-sdk/tests/listing.rs b/libs/cua/crates/cua-sdk/tests/listing.rs
index b49a02ac7d..becab1d07a 100644
--- a/libs/cua/crates/cua-sdk/tests/listing.rs
+++ b/libs/cua/crates/cua-sdk/tests/listing.rs
@@ -1,18 +1,15 @@
-//! The default sandbox listing includes cloud sandboxes, and the cloud part
-//! never fails it: no Fleet credentials leave it out silently, an
-//! unreachable Fleet leaves it out with a warning, bounded in time. Nothing
-//! here reaches a real Fleet or the credential store (`fleet_from_env` and
-//! `fleet_from_session` are off; the "unreachable" Fleet is a closed
-//! loopback port).
+//! The default sandbox listing: Cua Cloud has ended, so cloud sandboxes are
+//! never listed (quietly, with no warning) and listing never asks Fleet,
+//! even when Fleet settings are given. Nothing here reaches a real Fleet or
+//! the credential store (`fleet_from_env` and `fleet_from_session` are off;
+//! the Fleet named below is a loopback port that must see no connection).
use cua_sdk::{Cua, CuaConfig, FleetSettings};
-use std::time::{Duration, Instant};
fn cua(dir: &tempfile::TempDir, fleet: Option<FleetSettings>) -> std::sync::Arc<Cua> {
Cua::embedded(CuaConfig {
state_dir: Some(dir.path().join("sandboxes").display().to_string()),
spaces_home: Some(dir.path().join("cua").display().to_string()),
- fleet_pool_home: Some(dir.path().join("pools").display().to_string()),
fleet,
fleet_from_env: false,
fleet_from_session: false,
@@ -22,85 +19,41 @@ fn cua(dir: &tempfile::TempDir, fleet: Option<FleetSettings>) -> std::sync::Arc<
}
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
-async fn no_fleet_credentials_list_local_silently() {
- let dir = tempfile::tempdir().unwrap();
- let c = cua(&dir, None);
- let l = c.sandboxes().list_with_warnings(None).await.unwrap();
- assert!(l.warnings.is_empty(), "{l:?}");
- assert!(l.sandboxes.iter().all(|s| s.location != "cloud"));
- // Cua Cloud has ended: asking for cloud sandboxes lists none, quietly.
- let l = c
- .sandboxes()
- .list_with_warnings(Some("cloud".into()))
- .await
- .unwrap();
- assert!(l.sandboxes.is_empty());
- assert!(l.warnings.is_empty(), "{l:?}");
-}
-
-#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
-#[ignore = "Cua Cloud has ended (CUA-1854); removed with the Fleet provider"]
-async fn unreachable_fleet_is_a_warning_not_an_error() {
- // A port nothing listens on.
- let port = std::net::TcpListener::bind("127.0.0.1:0")
- .unwrap()
- .local_addr()
- .unwrap()
- .port();
+async fn a_configured_fleet_is_never_asked_and_cloud_sandboxes_are_not_listed() {
+ let fleet = std::net::TcpListener::bind("127.0.0.1:0").unwrap();
+ fleet.set_nonblocking(true).unwrap();
let dir = tempfile::tempdir().unwrap();
let c = cua(
&dir,
Some(FleetSettings {
- base_url: Some(format!("http://127.0.0.1:{port}")),
- token_url: None,
- client_id: None,
- client_secret: None,
- token: Some("cua-e2e-not-a-token".into()),
+ base_url: Some(format!("http://{}", fleet.local_addr().unwrap())),
+ token: Some("not-a-token".into()),
+ ..Default::default()
}),
);
- let t = Instant::now();
let l = c.sandboxes().list_with_warnings(None).await.unwrap();
- assert!(t.elapsed() < Duration::from_secs(20), "bounded");
- assert_eq!(l.warnings.len(), 1, "{l:?}");
+ assert!(l.warnings.is_empty(), "{l:?}");
+ assert!(l.sandboxes.iter().all(|s| s.location != "cloud"));
+ assert!(c.sandboxes().list(None).await.is_ok());
assert!(
- l.warnings[0].starts_with("cloud sandboxes not listed:"),
- "{l:?}"
+ matches!(fleet.accept(), Err(e) if e.kind() == std::io::ErrorKind::WouldBlock),
+ "something connected to the Fleet URL"
);
- // `list` logs the warning and still returns the rows.
- assert!(c.sandboxes().list(None).await.is_ok());
- // Local-only listings never ask Fleet.
- let l = c
- .sandboxes()
- .list_with_warnings(Some("local".into()))
- .await
- .unwrap();
- assert!(l.warnings.is_empty(), "{l:?}");
}
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
-#[ignore = "Cua Cloud has ended (CUA-1854); removed with the Fleet provider"]
-async fn a_hanging_fleet_is_cut_off_after_the_listing_timeout() {
- // Accepts connections (the kernel backlog) and never answers.
- let silent = std::net::TcpListener::bind("127.0.0.1:0").unwrap();
- let port = silent.local_addr().unwrap().port();
+async fn no_fleet_credentials_list_local_silently() {
let dir = tempfile::tempdir().unwrap();
- let c = cua(
- &dir,
- Some(FleetSettings {
- base_url: Some(format!("http://127.0.0.1:{port}")),
- token_url: None,
- client_id: None,
- client_secret: None,
- token: Some("cua-e2e-not-a-token".into()),
- }),
- );
- let t = Instant::now();
+ let c = cua(&dir, None);
let l = c.sandboxes().list_with_warnings(None).await.unwrap();
- let took = t.elapsed();
- assert!(
- took >= Duration::from_secs(4) && took < Duration::from_secs(10),
- "{took:?}"
- );
- assert!(l.warnings[0].contains("did not answer within 5s"), "{l:?}");
- drop(silent);
+ assert!(l.warnings.is_empty(), "{l:?}");
+ assert!(l.sandboxes.iter().all(|s| s.location != "cloud"));
+ // Cua Cloud has ended: asking for cloud sandboxes lists none, quietly.
+ let l = c
+ .sandboxes()
+ .list_with_warnings(Some("cloud".into()))
+ .await
+ .unwrap();
+ assert!(l.sandboxes.is_empty());
+ assert!(l.warnings.is_empty(), "{l:?}");
}
diff --git a/libs/cua/crates/cua-sdk/tests/mcp.rs b/libs/cua/crates/cua-sdk/tests/mcp.rs
index f0a8449e76..7286dd5831 100644
--- a/libs/cua/crates/cua-sdk/tests/mcp.rs
+++ b/libs/cua/crates/cua-sdk/tests/mcp.rs
@@ -1,16 +1,14 @@
-#![allow(deprecated)] // also exercises the deprecated `apply_pool` wrapper
//! MCP and the service pipe through the exported API, embedded and through
//! `cua daemon` (loopback): `Sandbox.mcp_config` / `Sandbox.mcp` (rmcp),
//! `Service.endpoint` streaming through the daemon passthrough (SSE that
-//! never ends, headers, a large binary body), a Fleet sandbox behind an
-//! emulated gateway, and a Space added by its MCP URL. Servers are
+//! never ends, headers, a large binary body), and a Space added by its MCP
+//! URL. Servers are
//! in-process (`cua_sandbox_core::testing`); waits are bounded.
use cua_daemon::{
Runtime, RuntimeConfig,
server::{self, ServerConfig},
};
-use cua_fleet::testing::FakeFleet;
use cua_sandbox_core::testing::{McpTestServer, PipeTestServer, expected_result, png_bytes};
use cua_sdk::{Cua, CuaError, SandboxCreateOptions};
use http_body_util::BodyExt;
@@ -184,26 +182,9 @@ async fn suite(daemon: bool) {
let dirs = tempfile::tempdir().unwrap();
let mcp_server = McpTestServer::start("").await.unwrap();
let pipe_server = PipeTestServer::start("").await.unwrap();
- // Fleet: the gateway base is a loopback MCP server under the claim's
- // service path (the fake binds claim X to sandbox `sbx-X`).
- let gw = McpTestServer::start(&format!("/api/svc/{CLAIM}/sbx-{CLAIM}-mcp"))
- .await
- .unwrap();
- let fleet = FakeFleet::new();
- cua_fleet::testing::set_image_variant(IMAGE, cua_fleet::ImageVariant::Rootfs);
- fleet
- .client_with_base(&gw.url)
- .apply_pool(
- &cua_fleet::PoolSpec::new(CLAIM, IMAGE)
- .runtime(cua_fleet::RuntimeKind::Gvisor)
- .services([("mcp", 8765u16)]),
- )
- .await
- .unwrap();
let runtime = Runtime::new(RuntimeConfig {
state_dir: Some(dirs.path().join("sandboxes")),
spaces_home: Some(dirs.path().join("cua")),
- fleet_client: Some(fleet.client_with_base(&gw.url)),
env_probe_timeout: Some(Duration::from_secs(2)),
..Default::default()
})
@@ -259,7 +240,7 @@ async fn suite(daemon: bool) {
assert_pipe(sb.service("env".into()).unwrap().endpoint().await.unwrap()).await;
sb.delete().await.unwrap();
- // Cua Cloud has ended: a cloud create fails before reaching Fleet.
+ // Cua Cloud has ended: a cloud create fails with the one message.
let mut o = opts("cloud", CLAIM);
o.pool = Some(CLAIM.into());
o.image = IMAGE.into();
diff --git a/libs/cua/crates/cua-sdk/tests/mcp_live.rs b/libs/cua/crates/cua-sdk/tests/mcp_live.rs
index 78d74de949..4b30a55929 100644
--- a/libs/cua/crates/cua-sdk/tests/mcp_live.rs
+++ b/libs/cua/crates/cua-sdk/tests/mcp_live.rs
@@ -10,14 +10,10 @@
//! cua-spacesd serves cua-driver's own MCP at `/mcp`; a screenshot comes
//! back as an intact image block. Never the host: the desktop is the
//! container's own Xvfb.
-//! - `CUA_E2E_MCP_FLEET=1` (+ Fleet credentials): the everything server on
-//! a Fleet gVisor Space (`node:22-slim` + `command`), through the gateway.
use base64::Engine;
use cua_daemon::server::{self, ServerConfig};
-use cua_sdk::{
- Cua, CuaConfig, HttpHeader, McpClient, ReadinessProbe, SandboxCreateOptions, SpaceCreateOptions,
-};
+use cua_sdk::{Cua, CuaConfig, HttpHeader, McpClient, ReadinessProbe, SandboxCreateOptions};
use futures_util::FutureExt;
use serde_json::{Value, json};
use std::{collections::HashMap, panic::AssertUnwindSafe, sync::Arc, time::Duration};
@@ -32,12 +28,11 @@ fn suffix() -> String {
)
}
-fn cua(dirs: &tempfile::TempDir, fleet: bool) -> Arc<Cua> {
+fn cua(dirs: &tempfile::TempDir) -> Arc<Cua> {
Cua::embedded(CuaConfig {
state_dir: Some(dirs.path().join("sandboxes").display().to_string()),
spaces_home: Some(dirs.path().join("cua").display().to_string()),
- fleet_pool_home: Some(dirs.path().join("pools").display().to_string()),
- fleet_from_env: fleet,
+ fleet_from_env: false,
..Default::default()
})
.unwrap()
@@ -154,7 +149,7 @@ async fn everything_server_local_daemon_and_space() {
return;
};
let dirs = tempfile::tempdir().unwrap();
- let cua = cua(&dirs, false);
+ let cua = cua(&dirs);
let name = format!("cua-e2e-mcp-everything-{}", suffix());
let sb = cua
.sandboxes()
@@ -241,7 +236,7 @@ async fn cua_driver_mcp_returns_an_intact_screenshot() {
return;
};
let dirs = tempfile::tempdir().unwrap();
- let cua = cua(&dirs, false);
+ let cua = cua(&dirs);
let name = format!("cua-e2e-mcp-driver-{}", suffix());
let token = format!("{:032x}", rand_u128());
let mut o = local(
@@ -323,92 +318,3 @@ async fn cua_driver_mcp_returns_an_intact_screenshot() {
std::panic::resume_unwind(p);
}
}
-
-#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
-async fn everything_server_on_fleet_through_the_gateway() {
- if std::env::var("CUA_E2E_MCP_FLEET").as_deref() != Ok("1") {
- eprintln!("skipped: set CUA_E2E_MCP_FLEET=1 with Fleet credentials");
- return;
- }
- let dirs = tempfile::tempdir().unwrap();
- let ns = format!("cua-e2e-mcp-{}", suffix());
- // SAFETY: set before the runtime reads it; the other tests never do.
- unsafe { std::env::set_var("CUA_SPACES_NAMESPACE", &ns) };
- let cua = cua(&dirs, true);
- let spaces = cua.spaces();
- let claim = format!("{ns}-claim");
- let image = "docker.io/library/node:22-slim";
- let command: Vec<String> = [
- "npx",
- "-y",
- "@modelcontextprotocol/[email protected]",
- "streamableHttp",
- ]
- .map(String::from)
- .to_vec();
- let pool = cua_spaces::Spaces::builder()
- .home(dirs.path().join("names"))
- .fleet_namespace(ns.clone())
- .build()
- .fleet_pool_name(
- cua_spaces::contract::inputs::FleetRuntime::Gvisor,
- &cua_spaces::pool_key(
- image,
- Some(&command),
- &Default::default(),
- &[("mcp".to_string(), 3001u16)].into(),
- ),
- );
- let r = spaces
- .create(SpaceCreateOptions {
- on: Some("cloud".into()),
- image: Some(image.into()),
- runtime: Some("gvisor".into()),
- name: Some(claim.clone()),
- wait: Some(true),
- command: Some(command.clone()),
- services: HashMap::from([("mcp".to_string(), 3001u16)]),
- spacesd: Some(false),
- ..Default::default()
- })
- .await;
- let run = AssertUnwindSafe(async {
- let info = r.unwrap().space.expect("bound");
- let space = spaces.space(info.id.clone()).await.unwrap();
- let r = space
- .call_tool(
- "get-tiny-image".into(),
- None,
- Some("mcp".into()),
- Some(60_000),
- )
- .await
- .unwrap();
- let content: Value = serde_json::from_str(&r.content_json).unwrap();
- let img = content
- .as_array()
- .unwrap()
- .iter()
- .find(|c| c["type"] == "image")
- .expect("image");
- let png = base64::engine::general_purpose::STANDARD
- .decode(img["data"].as_str().unwrap())
- .unwrap();
- assert_eq!(&png[..8], b"\x89PNG\r\n\x1a\n");
- spaces.delete(info.id).await.unwrap();
- })
- .catch_unwind();
- let run = tokio::time::timeout(Duration::from_secs(300), run).await;
- let fleet = cua_fleet::FleetClient::from_env().unwrap();
- let _ = fleet.release(&pool, &claim).await;
- match fleet.get_pool(&pool).await {
- Ok(h) => match fleet.delete_pool(h).await {
- Ok(()) => eprintln!("deleted pool {pool}"),
- Err(e) => eprintln!("LEFT BEHIND: pool {pool}: {e}"),
- },
- Err(e) => eprintln!("pool {pool}: {e}"),
- }
- if let Err(p) = run.expect("Fleet run timed out") {
- std::panic::resume_unwind(p);
- }
-}
diff --git a/libs/cua/crates/cua-sdk/tests/refs.rs b/libs/cua/crates/cua-sdk/tests/refs.rs
index cb66b01913..77a1e1ac89 100644
--- a/libs/cua/crates/cua-sdk/tests/refs.rs
+++ b/libs/cua/crates/cua-sdk/tests/refs.rs
@@ -1,16 +1,15 @@
-#![allow(deprecated)] // `apply_pool` sets up the fake pools
//! Unified sandbox refs through the SDK, embedded and through the daemon:
-//! qualified ids (`local:`, `cloud:`, `direct:`) that round-trip, a typed
-//! `AmbiguousSandbox` for a bare name in two locations, narrowing, and the
-//! legacy spellings. In-memory fakes only (a fake local runtime, FakeFleet,
-//! a loopback MockServer spacesd); nothing touches host apps or `~/.cua`.
+//! qualified ids (`local:`, `direct:`) that round-trip, a typed
+//! `AmbiguousSandbox` for a bare name in two locations, narrowing, the
+//! legacy spellings, and `cloud:` refs, which parse but answer "Cua Cloud has
+//! ended". In-memory fakes only (a fake local runtime, a loopback MockServer
+//! spacesd); nothing touches host apps or `~/.cua`.
use async_trait::async_trait;
use cua_daemon::{
Runtime, RuntimeConfig, fixtures,
server::{self, ServerConfig},
};
-use cua_fleet::testing::FakeFleet;
use cua_sandbox_core::{
InstanceStatus, LocalEndpoints, LocalInstance, LocalRuntime, LocalStartSpec, LocalSummary,
RuntimeError, RuntimeResult,
@@ -106,29 +105,12 @@ fn local(name: &str) -> SandboxCreateOptions {
}
}
-fn cloud(name: &str) -> SandboxCreateOptions {
- SandboxCreateOptions {
- name: Some(name.into()),
- pool: Some(POOL.into()),
- ..SandboxCreateOptions::new("cloud", "ghcr.io/trycua/cua-desktop-linux:test")
- }
-}
-
async fn suite(daemon: bool) {
let env = fixtures::start_env(None, None).await;
- let fake = FakeFleet::new();
- fake.client()
- .apply_pool(&cua_fleet::PoolSpec::new(
- POOL,
- "ghcr.io/trycua/cua-desktop-linux:test",
- ))
- .await
- .unwrap();
let dirs = tempfile::tempdir().unwrap();
let runtime = Runtime::new(RuntimeConfig {
state_dir: Some(dirs.path().join("sandboxes")),
spaces_home: Some(dirs.path().join("cua")),
- fleet_client: Some(fake.client()),
local: Some(Arc::new(Instances::default())),
env_probe_timeout: Some(Duration::from_secs(2)),
..Default::default()
@@ -164,22 +146,26 @@ async fn suite(daemon: bool) {
let only = sbx.get("box".into()).await.unwrap();
assert_eq!(only.id, "local:box", "a unique bare name resolves");
- let cb = sbx.create(cloud("box")).await.unwrap();
- assert_eq!(cb.id(), "cloud:box");
- assert_eq!(cb.info().location, "cloud");
- assert!(
- !cb.id().contains(POOL),
- "pools and namespaces never show in ids"
- );
+ // A direct machine's id is its address.
+ let url = env.url.clone();
+ let authority = url.trim_start_matches("http://").to_string();
+ let db = sbx
+ .connect_url(url.clone(), None, Some("box".into()))
+ .await
+ .unwrap();
+ assert_eq!(db.id(), format!("direct:{authority}"));
+ assert_eq!(db.name(), "box");
// A bare name in two locations is a typed error listing both refs.
let err = sbx.get("box".into()).await.unwrap_err();
let CuaError::AmbiguousSandbox(message) = &err else {
panic!("{err:?}")
};
+ let mut candidates = ambiguous_sandbox_candidates(message.clone());
+ candidates.sort();
assert_eq!(
- ambiguous_sandbox_candidates(message.clone()),
- vec!["local:box".to_string(), "cloud:box".to_string()]
+ candidates,
+ vec![format!("direct:{authority}"), "local:box".to_string()]
);
assert!(matches!(
sbx.connect("box".into()).await,
@@ -187,13 +173,10 @@ async fn suite(daemon: bool) {
));
// Qualified refs and narrowing pick one; ids round-trip.
- for id in [lb.id(), cb.id()] {
+ for id in [lb.id(), db.id()] {
assert_eq!(sbx.get(id.clone()).await.unwrap().id, id);
assert_eq!(sbx.connect(id.clone()).await.unwrap().id(), id);
}
- let narrowed = qualify_sandbox_ref("box".into(), Some(false)).unwrap();
- assert_eq!(narrowed, "cloud:box");
- assert_eq!(sbx.get(narrowed).await.unwrap().id, "cloud:box");
assert_eq!(
qualify_sandbox_ref("box".into(), Some(true)).unwrap(),
"local:box"
@@ -204,12 +187,6 @@ async fn suite(daemon: bool) {
));
// Legacy spellings still resolve; output uses the new form.
- for legacy in [
- format!("fleet:{POOL}:box"),
- format!("space://fleet/{POOL}/box"),
- ] {
- assert_eq!(sbx.get(legacy).await.unwrap().id, "cloud:box");
- }
assert_eq!(
sbx.get("space://local/box".into()).await.unwrap().id,
"local:box"
@@ -220,7 +197,27 @@ async fn suite(daemon: bool) {
(Some("cloud"), "box", "cloud:box")
);
- // Listings carry both, by id.
+ // Cua Cloud has ended: a cloud ref parses, then fails with the one
+ // message wherever it is used.
+ for cloud in ["cloud:box", &format!("fleet:{POOL}:box")] {
+ let e = sbx.get(cloud.into()).await.unwrap_err();
+ assert!(
+ e.to_string().contains("Cua Cloud has ended"),
+ "{cloud}: {e}"
+ );
+ let e = sbx.connect(cloud.into()).await.err().expect("fails");
+ assert!(
+ e.to_string().contains("Cua Cloud has ended"),
+ "{cloud}: {e}"
+ );
+ let e = sbx.delete(cloud.into()).await.unwrap_err();
+ assert!(
+ e.to_string().contains("Cua Cloud has ended"),
+ "{cloud}: {e}"
+ );
+ }
+
+ // Listings carry the local and direct ones, by id, and no cloud one.
let ids: Vec<String> = sbx
.list(None)
.await
@@ -229,67 +226,21 @@ async fn suite(daemon: bool) {
.map(|s| s.id)
.collect();
assert!(ids.contains(&"local:box".to_string()), "{ids:?}");
- assert!(ids.contains(&"cloud:box".to_string()), "{ids:?}");
-
- // A cloud claim this machine did not create is reachable by its ref.
- fake.client()
- .claim(
- &fake.client().get_pool(POOL).await.unwrap().pool,
- cua_fleet::ClaimOptions {
- name: Some("elsewhere".into()),
- ..Default::default()
- },
- )
- .await
- .unwrap();
- assert_eq!(
- sbx.connect("elsewhere".into()).await.unwrap().id(),
- "cloud:elsewhere"
- );
-
- // Cloud names are unique across the account's pools.
- fake.client()
- .apply_pool(&cua_fleet::PoolSpec::new(
- "cua-e2e-refs-2",
- "ghcr.io/trycua/cua-desktop-linux:test",
- ))
- .await
- .unwrap();
- let mut other_pool = cloud("box");
- other_pool.pool = Some("cua-e2e-refs-2".into());
- let Err(err) = sbx.create(other_pool).await else {
- panic!("a second cloud:box was created")
- };
- assert!(
- matches!(&err, CuaError::InvalidArgument(m) if m.contains("cloud:box")),
- "{err:?}"
- );
+ assert!(ids.contains(&db.id()), "{ids:?}");
+ assert!(ids.iter().all(|i| !i.starts_with("cloud:")), "{ids:?}");
- // A direct machine's id is its address.
- let url = env.url.clone();
- let authority = url.trim_start_matches("http://").to_string();
- let d = sbx
- .connect_url(url.clone(), None, Some("dev".into()))
- .await
- .unwrap();
- assert_eq!(d.id(), format!("direct:{authority}"));
- assert_eq!(d.name(), "dev");
+ // A remembered connection is found by its name once it is unambiguous.
+ sbx.delete("local:box".into()).await.unwrap();
assert_eq!(
- sbx.get("dev".into()).await.unwrap().id,
- d.id(),
+ sbx.get("box".into()).await.unwrap().id,
+ db.id(),
"a remembered connection is found by its name"
);
assert_eq!(
sbx.get(format!("url:{authority}")).await.unwrap().id,
- d.id()
+ db.id()
);
-
- // Delete by ref: the other location's sandbox of the same name stays.
- sbx.delete("local:box".into()).await.unwrap();
- assert_eq!(sbx.get("box".into()).await.unwrap().id, "cloud:box");
- sbx.delete("cloud:box".into()).await.unwrap();
- sbx.delete("cloud:elsewhere".into()).await.unwrap();
- sbx.delete(d.id()).await.unwrap();
+ sbx.delete(db.id()).await.unwrap();
assert!(matches!(
sbx.get("box".into()).await,
Err(CuaError::NotFound(_))
@@ -298,7 +249,6 @@ async fn suite(daemon: bool) {
}
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
-#[ignore = "Cua Cloud has ended (CUA-1854); removed with the Fleet provider"]
async fn embedded() {
tokio::time::timeout(Duration::from_secs(120), suite(false))
.await
@@ -306,7 +256,6 @@ async fn embedded() {
}
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
-#[ignore = "Cua Cloud has ended (CUA-1854); removed with the Fleet provider"]
async fn daemon() {
tokio::time::timeout(Duration::from_secs(120), suite(true))
.await
diff --git a/libs/cua/crates/cua-sdk/tests/topologies.rs b/libs/cua/crates/cua-sdk/tests/topologies.rs
index 0a56712521..eebbd4a5b6 100644
--- a/libs/cua/crates/cua-sdk/tests/topologies.rs
+++ b/libs/cua/crates/cua-sdk/tests/topologies.rs
@@ -1,7 +1,7 @@
#![allow(deprecated)] // also exercises the deprecated `apply_pool` wrapper
//! One suite, three topologies: embedded, daemon over the Unix socket, and
//! daemon over loopback + token. Everything runs against in-process fakes
-//! (`MockServer` spacesd with a scripted `/media` socket, `FakeFleet`);
+//! (`MockServer` spacesd with a scripted `/media` socket);
//! nothing touches host apps. Every wait loop is bounded.
use cua_daemon::{
@@ -9,7 +9,6 @@ use cua_daemon::{
fixtures::{self, SpacesdFixture},
server::{self, DaemonHandle, ServerConfig},
};
-use cua_fleet::testing::FakeFleet;
use cua_sdk::{
AudioPacket, AudioSink, Cua, CuaError, CuaMode, FrameSink, MediaEvent, MediaOpenOptions,
MediaSession, ProcessEventKind, ReadinessProbe, SandboxCreateOptions, SpacesdCommand,
@@ -26,11 +25,6 @@ const POOL: &str = "cua-e2e-gw";
struct World {
env: SpacesdFixture,
- // Held for the test's lifetime; unused since Cua Cloud ended.
- #[allow(dead_code)]
- gw: SpacesdFixture,
- #[allow(dead_code)]
- fake: FakeFleet,
_dirs: tempfile::TempDir,
daemon: Option<DaemonHandle>,
}
@@ -57,14 +51,11 @@ async fn world_with_relay(
env.mock
.state
.advertise(&[cua_spacesd_client::TUNNEL_FORWARD_FEATURE]);
- let gw = fixtures::start_env(None, Some(fixtures::fake_gateway(POOL, POOL))).await;
- let fake = FakeFleet::new();
let dirs = tempfile::tempdir().unwrap();
let runtime = Runtime::new(RuntimeConfig {
state_dir: Some(dirs.path().join("sandboxes")),
// Never the real ~/.cua registry.
spaces_home: Some(dirs.path().join("cua")),
- fleet_client: Some(fake.client_with_base(&gw.url)),
env_probe_timeout: Some(Duration::from_secs(5)),
..Default::default()
})
@@ -100,8 +91,6 @@ async fn world_with_relay(
(
World {
env,
- gw,
- fake,
_dirs: dirs,
daemon,
},
@@ -470,8 +459,8 @@ async fn suite(t: Topology) {
"{t:?}"
);
- // ----------------------------------------------------------- fleet
- // Cua Cloud has ended: a cloud create fails before reaching Fleet, in
+ // ----------------------------------------------------------- cloud
+ // Cua Cloud has ended: a cloud create fails with the one message, in
// every topology.
let mut o = direct("", POOL, None);
o.on = Some("cloud".into());
diff --git a/libs/cua/crates/cua-spaces-ext/Cargo.toml b/libs/cua/crates/cua-spaces-ext/Cargo.toml
index f2ab1deb45..666c5de3d1 100644
--- a/libs/cua/crates/cua-spaces-ext/Cargo.toml
+++ b/libs/cua/crates/cua-spaces-ext/Cargo.toml
@@ -10,8 +10,8 @@ repository.workspace = true
publish = false
[features]
-# The Cua Volume on an S3-compatible bucket or the Cua cloud (the AWS SDK);
-# the local store needs no feature.
+# The Cua Volume on an S3-compatible bucket (the AWS SDK); the local store
+# needs no feature.
s3 = ["cua-volume/s3"]
# This machine's mount of Cua Volume: the localhost NFS server macOS mounts,
# FUSE on Linux. (A Space's guest mount needs neither: NFS for macOS guests
@@ -27,7 +27,6 @@ cua-keyvault.workspace = true
# Persistent-agent adoption counts (fixed words only).
cua-telemetry.workspace = true
cua-daemon = { workspace = true, features = ["server", "client", "spaces"] }
-cua-fleet.workspace = true
cua-auth.workspace = true
cua-teleport.workspace = true
cua-chromium-storage.workspace = true
diff --git a/libs/cua/crates/cua-spaces-ext/src/daemon/drive.rs b/libs/cua/crates/cua-spaces-ext/src/daemon/drive.rs
index bf4aef24f4..213c076bd6 100644
--- a/libs/cua/crates/cua-spaces-ext/src/daemon/drive.rs
+++ b/libs/cua/crates/cua-spaces-ext/src/daemon/drive.rs
@@ -7,9 +7,9 @@
//! The backend comes from `$CUA_HOME/volume/config.json` and `CUA_DRIVE_*`
//! ([`cua_volume::config`]): the local store by default; an S3-compatible
//! bucket with keys from the credential store (`drive-keys`) or the
-//! environment; or, only when configured, the Cua cloud's bucket with keys
-//! vended for the signed-in account. Nothing here does network I/O or reads
-//! a key at startup: S3 keys and cloud vends are fetched on first use.
+//! environment. A config that names the removed `cloud` backend (Cua Cloud
+//! has ended) is served as unavailable. Nothing here does network I/O or
+//! reads a key at startup: S3 keys are fetched on first use.
//!
//! A backend this build cannot serve (`s3` without the `s3` feature of cua-spaces-ext)
//! is served as [`cua_volume::backend::Unavailable`], so every call names
@@ -34,7 +34,7 @@ impl Presence for KeyvaultPresence {
#[cfg(feature = "s3")]
mod s3 {
- use cua_volume::s3::{CredentialSource, S3Credentials, TokenSource};
+ use cua_volume::s3::{CredentialSource, S3Credentials};
use cua_volume::{Error, Result};
/// Static keys read on first use from the credential store (`drive-keys`,
@@ -105,28 +105,10 @@ mod s3 {
.map_err(|e| Error::Backend(format!("credential store: {e}")))
}
}
-
- /// The Fleet client's bearer (the signed-in account, or client
- /// credentials).
- pub struct FleetTokens(pub cua_fleet::FleetClient);
-
- #[async_trait::async_trait]
- impl TokenSource for FleetTokens {
- async fn token(&self) -> Result<String> {
- self.0
- .access_token(false)
- .await
- .map_err(|e| Error::Forbidden(format!("Cua cloud sign-in: {e}")))
- }
- }
}
-/// The backend `config` names, for a runtime whose Fleet client is `fleet`.
-pub fn backend(
- config: &DriveConfig,
- home: &Path,
- fleet: Option<&cua_fleet::FleetClient>,
-) -> Arc<dyn cua_volume::Backend> {
+/// The backend `config` names.
+pub fn backend(config: &DriveConfig, home: &Path) -> Arc<dyn cua_volume::Backend> {
let data = cua_volume::state_dir(home).join("data");
match config.backend {
BackendKind::Fs => Arc::new(cua_volume::fs::FsBackend::new(data)),
@@ -150,36 +132,10 @@ pub fn backend(
Err(e) => Arc::new(cua_volume::backend::Unavailable(e.to_string())),
}
}
- #[cfg(feature = "s3")]
- BackendKind::Cloud => {
- use cua_volume::s3::{CloudBackend, CloudVendor, VendRequest};
- let Some(fleet) = fleet else {
- return Arc::new(cua_volume::backend::Unavailable(
- "the drive is set to cloud but this runtime is not signed in to Cua (`cua auth login`)".into(),
- ));
- };
- let vendor = CloudVendor::new(
- &fleet.config().base_url,
- Arc::new(s3::FleetTokens(fleet.clone())),
- VendRequest {
- principal: "user".into(),
- space: None,
- ttl_secs: config.cloud_ttl_secs(),
- },
- );
- match vendor {
- Ok(v) => Arc::new(CloudBackend::new(Arc::new(v))),
- Err(e) => Arc::new(cua_volume::backend::Unavailable(e.to_string())),
- }
- }
#[cfg(not(feature = "s3"))]
- other => {
- let _ = fleet;
- Arc::new(cua_volume::backend::Unavailable(format!(
- "the drive is set to {} but this build has no S3 support; use the `cua` daemon",
- other.as_str()
- )))
- }
+ BackendKind::S3 => Arc::new(cua_volume::backend::Unavailable(
+ "the drive is set to s3 but this build has no S3 support; use the `cua` daemon".into(),
+ )),
}
}
@@ -198,18 +154,19 @@ pub fn keys() -> Arc<dyn cua_volume::service::KeyStore> {
/// The drive of the cua home `home`: the configured backend, grants and
/// audit under `<home>/volume`, and `presence` for widening access.
-pub fn open(
- home: &Path,
- fleet: Option<&cua_fleet::FleetClient>,
- presence: Arc<dyn Presence>,
-) -> Drive {
+pub fn open(home: &Path, presence: Arc<dyn Presence>) -> Drive {
let backend: Arc<dyn cua_volume::Backend> = match DriveConfig::load(home) {
- Ok(config) => backend(&config, home, fleet),
+ Ok(config) => backend(&config, home),
Err(e) => {
tracing::warn!(error = %e, "drive: config unreadable; the drive refuses every call");
- Arc::new(cua_volume::backend::Unavailable(format!(
- "drive/config.json: {e}"
- )))
+ // The ended cloud backend says so in its own words.
+ let why = match &e {
+ cua_volume::Error::Invalid(m) if m == cua_volume::config::CLOUD_BACKEND_ENDED => {
+ m.clone()
+ }
+ _ => format!("drive/config.json: {e}"),
+ };
+ Arc::new(cua_volume::backend::Unavailable(why))
}
};
Drive::new(backend, cua_volume::state_dir(home)).with_presence(presence)
@@ -229,19 +186,37 @@ mod tests {
#[test]
fn the_local_store_is_the_default_and_bad_config_is_loud() {
let home = tempfile::tempdir().unwrap();
- let d = open(home.path(), None, Arc::new(Yes));
+ let d = open(home.path(), Arc::new(Yes));
assert_eq!(d.backend().kind(), "fs");
std::fs::create_dir_all(home.path().join("volume")).unwrap();
std::fs::write(home.path().join("volume/config.json"), "{not json").unwrap();
- let d = open(home.path(), None, Arc::new(Yes));
+ let d = open(home.path(), Arc::new(Yes));
assert_eq!(d.backend().kind(), "unavailable");
+ }
+
+ /// A config that still names the removed `cloud` backend is served as
+ /// unavailable, with the reason in its own words (never another store).
+ #[tokio::test]
+ async fn the_ended_cloud_backend_is_unavailable_with_a_clear_message() {
+ let home = tempfile::tempdir().unwrap();
+ std::fs::create_dir_all(home.path().join("volume")).unwrap();
std::fs::write(
home.path().join("volume/config.json"),
- r#"{"backend":"cloud"}"#,
+ r#"{"backend":"cloud","cloud_ttl_secs":900}"#,
)
.unwrap();
- let d = open(home.path(), None, Arc::new(Yes));
- assert_eq!(d.backend().kind(), "unavailable", "cloud needs a sign-in");
+ let d = open(home.path(), Arc::new(Yes));
+ assert_eq!(d.backend().kind(), "unavailable");
+ let e = d
+ .backend()
+ .head("agents/ada/x")
+ .await
+ .expect_err("an unavailable backend refuses every call");
+ assert!(
+ e.to_string()
+ .contains("the Cua cloud drive backend has ended; use fs or s3"),
+ "{e}"
+ );
}
/// Opt-in (run by `crates/cua-volume/tests/run-minio.sh`, which sets a
@@ -264,9 +239,8 @@ mod tests {
root: format!("daemon-{:08x}/", rand::random::<u32>()),
path_style: true,
}),
- cloud_ttl_secs: None,
};
- let b = backend(&config, home.path(), None);
+ let b = backend(&config, home.path());
assert_eq!(b.kind(), "s3");
let d = Drive::new(b, home.path().join("volume")).with_presence(Arc::new(Yes));
let s = d.session(cua_volume::Context::agent("ada", None));
diff --git a/libs/cua/crates/cua-spaces-ext/src/daemon/mod.rs b/libs/cua/crates/cua-spaces-ext/src/daemon/mod.rs
index 6a9d2d09b5..260f001fc2 100644
--- a/libs/cua/crates/cua-spaces-ext/src/daemon/mod.rs
+++ b/libs/cua/crates/cua-spaces-ext/src/daemon/mod.rs
@@ -4,7 +4,7 @@
//! The Cua Spaces daemon extension: what `cua daemon` hosts in the Cua
//! Spaces build, registered through [`cua_daemon::extension`].
//!
-//! - The Cua Volume (local, S3-compatible or the Cua cloud) behind the drive
+//! - The Cua Volume (local or S3-compatible) behind the drive
//! tools and persistent agents ([`crate::DriveExtension`]), asking for the
//! same user presence as the Keyvault before it widens access.
//! - Teleport ([`crate::TeleportExtension`]) over the host's app-session
@@ -100,7 +100,7 @@ impl DaemonExtension for CuaSpacesDaemon {
// widens anyone's access.
let drive_presence: Arc<dyn cua_volume::Presence> =
Arc::new(drive::KeyvaultPresence(self.presence()));
- let drive = drive::open(cx.home, cx.fleet, drive_presence);
+ let drive = drive::open(cx.home, drive_presence);
let sessions = Arc::new(match self.fake_host(cx) {
Some(h) => crate::teleport::AppSessions::with_host(h),
None => crate::teleport::AppSessions::builtin(),
diff --git a/libs/cua/crates/cua-spaces-ffi/tests/fleet_billing_app.rs b/libs/cua/crates/cua-spaces-ffi/tests/fleet_billing_app.rs
deleted file mode 100644
index 7b85c07dab..0000000000
--- a/libs/cua/crates/cua-spaces-ffi/tests/fleet_billing_app.rs
+++ /dev/null
@@ -1,78 +0,0 @@
-// SPDX-License-Identifier: FSL-1.1-MIT
-// Copyright (c) 2026 Cua AI, Inc.
-
-//! Cua Cloud billing as the Spaces apps show it: the SDK's status and a
-//! refused cloud create over `FakeFleet`, through the app core's billing
-//! line and credit notice (nothing reaches Stripe). The SDK side alone is
-//! `cua-sdk/tests/fleet_billing.rs`.
-
-use cua_daemon::{Runtime, RuntimeConfig};
-use cua_fleet::testing::FakeFleet;
-use cua_sdk::{Cua, CuaError, SandboxCreateOptions};
-use serde_json::json;
-use std::time::Duration;
-
-fn cua(fake: &FakeFleet, dirs: &tempfile::TempDir) -> std::sync::Arc<Cua> {
- let runtime = Runtime::new(RuntimeConfig {
- state_dir: Some(dirs.path().join("sandboxes")),
- spaces_home: Some(dirs.path().join("cua")),
- fleet_client: Some(fake.client()),
- env_probe_timeout: Some(Duration::from_secs(5)),
- ..Default::default()
- })
- .unwrap();
- Cua::from_runtime(runtime)
-}
-
-#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
-#[ignore = "Cua Cloud has ended (CUA-1854); removed with the Fleet provider"]
-async fn the_status_carries_the_credit_and_the_billing_page() {
- let fake = FakeFleet::new();
- fake.faults.lock().unwrap().billing = Some(json!({
- "billing_enabled": true, "payment_method_present": false, "card": null,
- "plan": "none", "payg_available": true,
- "credit": {"balance_usd_cents": 742, "signup_grant_usd_cents": 100, "signup_grant_unused": false},
- "billing_url": "https://run.cua.ai/billing"
- }));
- let dirs = tempfile::tempdir().unwrap();
- let s = cua(&fake, &dirs)
- .fleet()
- .unwrap()
- .billing_status()
- .await
- .unwrap();
- assert_eq!(s.credit.as_ref().map(|c| c.balance_usd_cents), Some(742));
- assert_eq!(s.billing_url.as_deref(), Some("https://run.cua.ai/billing"));
- {
- let app = cua_spaces_ffi::app_billing_status(s);
- assert_eq!(
- cua_spaces_app_core::billing::billing_line(&app),
- "$7.42 credit left"
- );
- }
-}
-
-#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
-#[ignore = "Cua Cloud has ended (CUA-1854); removed with the Fleet provider"]
-async fn a_cloud_create_out_of_credit_is_a_typed_error_with_the_billing_page() {
- let fake = FakeFleet::new();
- fake.faults.lock().unwrap().credit_exhausted = Some("https://run.cua.ai/billing".into());
- let dirs = tempfile::tempdir().unwrap();
- let cua = cua(&fake, &dirs);
- let mut o = SandboxCreateOptions::new("cloud", "ghcr.io/trycua/linux:24.04");
- o.kind = Some("vm".into());
- match cua.sandboxes().create(o).await {
- Err(CuaError::CloudCreditExhausted(m)) => {
- assert_eq!(
- m,
- "You're out of Cua Cloud credit. Add credit at https://run.cua.ai/billing"
- );
- assert_eq!(
- cua_spaces_app_core::billing::credit_notice(&m).map(|n| n.url),
- Some("https://app.cua.ai/billing".into())
- );
- }
- Err(e) => panic!("expected CloudCreditExhausted, got {e:?}"),
- Ok(_) => panic!("expected CloudCreditExhausted, got a sandbox"),
- }
-}
diff --git a/libs/cua/crates/cua-spaces/README.md b/libs/cua/crates/cua-spaces/README.md
index a5725d2fb4..61dd7bae3c 100644
--- a/libs/cua/crates/cua-spaces/README.md
+++ b/libs/cua/crates/cua-spaces/README.md
@@ -5,7 +5,7 @@ the primitives a person or agent uses on them, and the Spaces MCP server.
Space ids are sandbox refs: `cloud:<name>`, `local:<vm>`,
`direct:<host:port>` and `relay:<machine-id>` (legacy `space://...` ids still
parse).
-Everything goes through the cua SDK crates (`cua-spacesd-client`, `cua-fleet`,
+Everything goes through the cua SDK crates (`cua-spacesd-client`,
`cua-sandbox-core`): no ssh, no `/cmd`, no base64 through a shell, no
Python.
@@ -15,10 +15,9 @@ for bindings, and the Tauri app links it directly.
## API (for `cua-daemon`, `cua-sdk` and the Tauri app)
```rust
-use cua_spaces::{Spaces, FleetClaim, LocalProvision};
+use cua_spaces::Spaces;
let spaces = Spaces::builder()
- .fleet(cua_fleet::FleetClient::from_env()?) // optional: cloud Spaces
.local_runtime(daemon_local_runtime) // optional: Arc<dyn cua_sandbox_core::LocalRuntime>
.app_sessions(Arc::new(cua_spaces::teleport::AppSessions::builtin())) // teleport sender (real host)
.agent_credentials(cua_spaces::agents::HostCredentials::from_home(home)) // host creds copied for agents
@@ -29,9 +28,9 @@ let spaces = Spaces::builder()
| Call | What |
|---|---|
-| `spaces.add(url, token, name)` | `GetCapabilities` handshake, then stored. `url` is `http(s)://host:port`, `host:port`, or a Space id (`local:<name>`, `cloud:<name>`). |
+| `spaces.add(url, token, name)` | `GetCapabilities` handshake, then stored. `url` is `http(s)://host:port`, `host:port`, or a Space id (`local:<name>`). |
| `spaces.list()` / `spaces.resolve(s)` / `spaces.remove(s)` | Registry. `resolve` accepts ids, legacy `space://...` / `fleet:ns:claim`, URLs, names; a name in two locations is `AmbiguousSandbox`. |
-| `spaces.create(SpaceCreate{image, on, kind, runtime, name, reuse, wait, ..})` | A new sandbox registered as a Space, where `on` says (`None`: `default.on`, `CUA_DEFAULT_ON`, else local). Placement is validated once (`InvalidPlacement` lists the valid values); cloud Spaces get warm capacity per (image, runtime) and a fresh env token. `reuse` returns a reachable registered Space in the same location first. |
+| `spaces.create(SpaceCreate{image, on, kind, runtime, name, reuse, wait, ..})` | A new sandbox registered as a Space, where `on` says (`None`: `default.on`, `CUA_DEFAULT_ON`, else local). Placement is validated once (`InvalidPlacement` lists the valid values); `on="cloud"` fails with the "Cua Cloud has ended" error. `reuse` returns a reachable registered Space in the same location first. |
| `spaces.delete(s)` | Deletes the Space's sandbox and forgets it. A Space added by address is only forgotten. |
| `spaces.space(s) -> Space` | A cached, connected handle. |
| `spaces.hotspot_start / hotspot_stop / hotspot_statuses` | Hotspots kept alive by this process. |
@@ -124,13 +123,14 @@ tool is JSON-RPC `-32601` (the CLI used `-32602`), and tool failures carry
## In `cua daemon` and the SDK
-`cua_daemon::Runtime` owns one `Spaces` (sharing its sandboxes and Fleet
-client). `cua.daemon.v1.SpaceService` is a thin adapter: `AddSpace`,
-`ListSpaces`, `ResolveSpace`, `RemoveSpace`, `ClaimFleetSpace`,
-`ProvisionLocalSpace`, `ReleaseSpace`, `ListSpaceTools`, `CallSpaceTool`,
-and `ConnectSpace`, which returns a loopback env passthrough
-(`/v1/spaces/<base64url id>/env`, daemon bearer only; the Space's env token
-and Fleet credentials are attached inside the daemon, WebSockets included).
+`cua_daemon::Runtime` owns one `Spaces` (sharing its sandboxes).
+`cua.daemon.v1.SpaceService` is a thin adapter: `AddSpace`, `ListSpaces`,
+`ResolveSpace`, `RemoveSpace`, `ClaimFleetSpace` (Cua Cloud has ended: it
+fails with the "Cua Cloud has ended" error), `ProvisionLocalSpace`,
+`ReleaseSpace`, `ListSpaceTools`, `CallSpaceTool`, and `ConnectSpace`, which
+returns a loopback env passthrough (`/v1/spaces/<base64url id>/env`, daemon
+bearer only; the Space's env token is attached inside the daemon, WebSockets
+included).
`OpenMediaBridge` accepts Space ids too. `cua-sdk` exposes `Spaces` /
`Space` to every language in both topologies (see its crate docs).
@@ -147,7 +147,6 @@ All on by default: `spaces-files`, `spaces-stream`, `spaces-presence`,
cargo test -p cua-spaces # unit + in-process env-server + fakes + MCP conformance
tests/e2e/run-docker-e2e.sh [--runtime runsc] [--driver PATH] # live linux, --memory=4g
tests/e2e/run-relay-account-e2e.sh # host joins cua-relay, client lists and streams it
-CUA_E2E_FLEET=1 CUA_E2E_FLEET_IMAGE=<public spacesd image> cargo test -p cua-spaces --test e2e_fleet
cargo run -p cua-spaces --bin cua-spaces-control-fixtures -- --check
```
diff --git a/libs/cua/crates/cua-spaces/src/creating.rs b/libs/cua/crates/cua-spaces/src/creating.rs
index 72b2ae9513..b2baf9c111 100644
--- a/libs/cua/crates/cua-spaces/src/creating.rs
+++ b/libs/cua/crates/cua-spaces/src/creating.rs
@@ -576,13 +576,11 @@ impl Spaces {
.registry
.remove(&crate::SpaceId::Local { name: name.clone() }.to_string());
}
- Made::FleetClaim { namespace, name } => match self.inner.fleet.as_ref() {
- Some(f) => match f.release(namespace, name).await {
- Ok(()) => done.push("released its cloud sandbox".into()),
- Err(e) => failed.push(format!("cloud:{name}: {e}")),
- },
- None => failed.push(format!("cloud:{name}: Fleet is not configured here")),
- },
+ // A claim an earlier version made: Cua Cloud has ended, so
+ // there is nothing left to release.
+ Made::FleetClaim { namespace: _, name } => done.push(format!(
+ "dropped its record of cloud:{name} (Cua Cloud has ended)"
+ )),
Made::HostSpace { host, machine } => {
match crate::host_spaces::cancel_on_host(self, host, machine).await {
Ok(m) => done.push(m),
diff --git a/libs/cua/crates/cua-spaces/src/error.rs b/libs/cua/crates/cua-spaces/src/error.rs
index 4f2f241164..e92f5c7dbb 100644
--- a/libs/cua/crates/cua-spaces/src/error.rs
+++ b/libs/cua/crates/cua-spaces/src/error.rs
@@ -44,7 +44,7 @@ pub enum Error {
/// The driver's own limitation text, if any.
limitation: String,
},
- /// A host-side prerequisite (Fleet credentials, a local runtime, an
+ /// A host-side prerequisite (a local runtime, an
/// operator display, app-session providers) is not configured.
#[error("{what} is not available on this host: {why}")]
HostCapabilityMissing {
@@ -83,7 +83,7 @@ pub enum Error {
/// spacesd RPC failure.
#[error(transparent)]
Env(#[from] cua_spacesd_client::Error),
- /// Fleet control-plane failure.
+ /// Fleet control-plane failure. Cua Cloud has ended: no longer raised.
#[error(transparent)]
Fleet(#[from] cua_fleet::Error),
/// Sandbox lifecycle failure.
diff --git a/libs/cua/crates/cua-spaces/src/lib.rs b/libs/cua/crates/cua-spaces/src/lib.rs
index be1bc1c68a..57c30929f6 100644
--- a/libs/cua/crates/cua-spaces/src/lib.rs
+++ b/libs/cua/crates/cua-spaces/src/lib.rs
@@ -4,8 +4,9 @@
//!
//! This crate replaces `apps/cua-spaces/mcp/spaces_mcp.py` (and
//! `agent_harness.py`) as the Spaces core. It is plain async Rust over the cua
-//! SDK crates: [`cua_spacesd_client`] for every guest call, [`cua_fleet`] for Fleet
-//! claims, [`cua_sandbox_core`] for local sandboxes. `cua-daemon` hosts it
+//! SDK crates: [`cua_spacesd_client`] for every guest call,
+//! [`cua_sandbox_core`] for local sandboxes. Cua Cloud (`cloud:<name>`) has
+//! ended: its Spaces fail with [`cua_sandbox_core::CLOUD_ENDED`]. `cua-daemon` hosts it
//! (and serves [`mcp`] as `cua daemon mcp`); `cua-sdk` wraps it for UniFFI;
//! the Tauri app links it directly.
//!
diff --git a/libs/cua/crates/cua-spaces/src/space.rs b/libs/cua/crates/cua-spaces/src/space.rs
index 821aa8a134..a38a8db168 100644
--- a/libs/cua/crates/cua-spaces/src/space.rs
+++ b/libs/cua/crates/cua-spaces/src/space.rs
@@ -67,24 +67,14 @@ pub fn unreported_feature_limitation(version: &str, feature: &str) -> String {
#[derive(Clone)]
pub enum ServiceSource {
/// A sandbox service (local loopback or any other sandbox route).
- Sandbox(cua_sandbox_core::Service),
- /// A Fleet claim's service, through the gateway.
- Fleet {
- /// Client (mints the gateway bearer).
- fleet: cua_fleet::FleetClient,
- /// The claim.
- bound: cua_fleet::BoundSandbox,
- /// Service name.
- service: String,
- },
+ Sandbox(Box<cua_sandbox_core::Service>),
/// A fixed URL and headers (a Space added by its MCP URL, or a `cua
/// daemon` passthrough).
Url(ServiceEndpoint),
}
/// A service a Space declares (an MCP server, a web app, ...), reachable
-/// through a protocol-transparent pipe: loopback locally, the Fleet gateway
-/// on Fleet, or a URL.
+/// through a protocol-transparent pipe: loopback locally, or a URL.
#[derive(Clone)]
pub struct SpaceService {
/// How requests reach it.
@@ -102,25 +92,10 @@ impl std::fmt::Debug for SpaceService {
}
impl SpaceService {
- /// Where the service is reachable from this process (URL and headers,
- /// freshly minted for Fleet).
+ /// Where the service is reachable from this process (URL and headers).
pub async fn endpoint(&self) -> Result<ServiceEndpoint> {
match &self.source {
ServiceSource::Sandbox(s) => Ok(s.endpoint().await?),
- ServiceSource::Fleet {
- fleet,
- bound,
- service,
- } => {
- let token = fleet.access_token(false).await?;
- Ok(ServiceEndpoint {
- url: fleet.service_url(bound, service)?,
- headers: vec![
- ("authorization".into(), format!("Bearer {token}")),
- ("x-cua-fleet-claim".into(), bound.claim.clone()),
- ],
- })
- }
ServiceSource::Url(e) => Ok(e.clone()),
}
}
@@ -131,14 +106,10 @@ impl SpaceService {
}
}
-/// Media / tunnel WebSockets through the Fleet gateway need the gateway's own
+/// Media / tunnel WebSockets through a gateway need the gateway's own
/// credentials next to the ticket.
#[derive(Clone)]
pub(crate) enum Gateway {
- Fleet {
- fleet: cua_fleet::FleetClient,
- claim: String,
- },
/// Fixed headers (a `cua daemon` env passthrough: its loopback bearer).
Headers(Vec<(String, String)>),
}
@@ -477,30 +448,10 @@ impl Space {
}
/// Headers a WebSocket to this Space's spacesd needs besides its
- /// ticket (the Fleet gateway's bearer and claim).
+ /// ticket (a `cua daemon` passthrough's loopback bearer).
pub async fn websocket_headers(&self) -> Result<Vec<(String, String)>> {
match &self.inner.gateway {
None => Ok(vec![]),
- Some(Gateway::Fleet { fleet, claim }) => {
- let bearer = fleet.access_token(false).await?;
- let mut h = vec![
- (
- cua_proto::metadata::AUTHORIZATION.into(),
- format!("Bearer {bearer}"),
- ),
- ("x-cua-fleet-claim".into(), claim.clone()),
- ];
- // The gateway consumes `authorization`; the env token rides
- // in its own header (MEDIA.md: tickets still authenticate
- // the socket, this lets a gateway-side check pass too).
- if let Some(t) = self.inner.token.as_deref().filter(|t| !t.is_empty()) {
- h.push((
- cua_proto::metadata::ENV_AUTHORIZATION.into(),
- format!("Bearer {t}"),
- ));
- }
- Ok(h)
- }
Some(Gateway::Headers(h)) => Ok(h.clone()),
}
}
diff --git a/libs/cua/crates/cua-spaces/src/spaces.rs b/libs/cua/crates/cua-spaces/src/spaces.rs
index 1a98d7d060..9a291ac3ad 100644
--- a/libs/cua/crates/cua-spaces/src/spaces.rs
+++ b/libs/cua/crates/cua-spaces/src/spaces.rs
@@ -4,13 +4,12 @@
//! create; [`Spaces::remove`] forgets a Space without touching it.
use crate::error::{Error, Result};
-use crate::fleet_runtime;
use crate::id::{Provider, SpaceId, authority};
use crate::operator::{ControlServerDisplay, OperatorDisplay};
use crate::registry::{Credential, Registry, cua_home};
-use crate::space::{Gateway, Space, SpaceInfo, SpacePower};
use crate::space::{ServiceSource, SpaceService};
-use cua_fleet::{ClaimOptions, FleetClient, PoolSpec};
+use crate::space::{Space, SpaceInfo, SpacePower};
+use cua_fleet::FleetClient;
use cua_proto::daemon::v1 as dpb;
use cua_sandbox_core::placement::{Kind, On, Runtime};
use cua_sandbox_core::{CreateOptions, LocalRuntime, PortTarget, Probe, ProviderKind, Sandboxes};
@@ -137,77 +136,6 @@ impl SpaceCreated {
}
}
-/// Options for a cloud Space (see [`Spaces::create`]).
-#[derive(Clone, Debug, Default)]
-pub(crate) struct FleetClaim {
- /// Image. Default: [`fleet_runtime::default_image`].
- pub image: Option<String>,
- /// Runtime. Default: from the image's registry manifest (a container
- /// rootfs runs on gVisor, a containerDisk on KubeVirt); an explicit one
- /// must match it.
- pub runtime: Option<FleetRuntime>,
- /// Claim name. Default `space-<hex>`.
- pub name: Option<String>,
- /// Wait for the claim to bind and the spacesd to answer. Default true.
- pub wait: Option<bool>,
- /// The spacesd token baked into the image, if any. When the driver
- /// runs in bootstrap mode (no token), a fresh token is installed with
- /// `SystemService.Init` and stored.
- pub env_token: Option<String>,
- /// Entrypoint override (Fleet: `processMode: Run` on gVisor and
- /// KubeVirt).
- pub command: Option<Vec<String>>,
- /// Guest environment (Fleet: the template's `env`, not secrets).
- pub env: BTreeMap<String, String>,
- /// Named services (name → guest port), for example `{"mcp": 8765}`.
- pub services: BTreeMap<String, u16>,
- /// Whether the image runs cua-spacesd. Default: yes for the Spaces
- /// images (and no image), no for any other image. Only decides how long
- /// to wait for the driver after the sandbox is ready; a Space without
- /// it is still a Space.
- pub spacesd: Option<bool>,
- /// vCPUs (`vmTemplate.cpuCores`). Default: the template's.
- pub cpus: Option<u32>,
- /// Memory in MiB (`vmTemplate.memory`). Default: the template's.
- pub memory_mb: Option<u32>,
-}
-
-/// What [`Spaces::finish_fleet_claim`] needs from [`Spaces::claim_fleet`].
-struct FleetFinish {
- claim: cua_fleet::Claim,
- runtime: cua_fleet::RuntimeKind,
- claim_token: Option<String>,
- env_token: Option<String>,
- expect_env: bool,
-}
-
-/// The spacesd token a cloud Space's claim delivers, or `None` when no
-/// cua-spacesd is expected (or the guest is Windows, which has no claim
-/// token channel; `guest_os` from [`fleet_runtime::guest_os`]).
-///
-/// A Spaces image in Fleet (the published `linux:24.04`, whose daemon is
-/// still the pre-rename cua-guestd, and every newer one) mints a random
-/// token of its own at boot unless Fleet mounts the claim's Secret at
-/// `/run/cua`; no client could learn that token, so every call failed with
-/// `missing or invalid bearer token`. The claim therefore carries this token
-/// in its Secret (the template opts in with `claimSecrets`): the caller's,
-/// else a fresh one.
-fn fleet_claim_token(
- guest_os: &str,
- expect_env: bool,
- given: Option<&str>,
-) -> Result<Option<String>> {
- if !expect_env || guest_os == "windows" {
- return Ok(None);
- }
- let token = given
- .filter(|t| !t.is_empty())
- .map(str::to_string)
- .unwrap_or_else(cua_fleet::claim_secrets::generate_claim_token);
- cua_fleet::claim_secrets::validate_claim_token(&token)?;
- Ok(Some(token))
-}
-
/// Options for a local Space (see [`Spaces::create`]).
#[derive(Clone, Debug, Default)]
pub(crate) struct LocalProvision {
@@ -233,7 +161,10 @@ pub(crate) struct LocalProvision {
pub env: BTreeMap<String, String>,
/// Named services (name → guest port), for example `{"mcp": 8765}`.
pub services: BTreeMap<String, u16>,
- /// Whether the image runs cua-spacesd (see [`FleetClaim::spacesd`]).
+ /// Whether the image runs cua-spacesd. Default: yes for the Spaces
+ /// images (and no image), no for any other image. Only decides how long
+ /// to wait for the driver after the sandbox is ready; a Space without
+ /// it is still a Space.
pub spacesd: Option<bool>,
/// A GPU option ([`SpaceCreate::gpu`]).
pub gpu: Option<String>,
@@ -252,7 +183,6 @@ pub struct PendingSpace {
#[derive(Default)]
pub struct SpacesBuilder {
home: Option<PathBuf>,
- fleet: Option<FleetClient>,
local: Option<Arc<dyn LocalRuntime>>,
sandboxes: Option<Sandboxes>,
fleet_namespace: Option<String>,
@@ -299,9 +229,10 @@ impl SpacesBuilder {
self
}
- /// Enables Fleet Spaces.
- pub fn fleet(mut self, fleet: FleetClient) -> Self {
- self.fleet = Some(fleet);
+ /// Ignored: Cua Cloud has ended, so Spaces never uses a Fleet client.
+ /// Kept so existing callers still compile.
+ pub fn fleet(self, fleet: FleetClient) -> Self {
+ let _ = fleet;
self
}
@@ -312,15 +243,16 @@ impl SpacesBuilder {
self
}
- /// Uses an existing sandbox manager (overrides `fleet` / `local_runtime`
- /// for sandbox lifecycle; `fleet` is still used for claims).
+ /// Uses an existing sandbox manager (overrides `local_runtime` for
+ /// sandbox lifecycle).
pub fn sandboxes(mut self, sandboxes: Sandboxes) -> Self {
self.sandboxes = Some(sandboxes);
self
}
- /// Base name of the Fleet pools Spaces claims from. Default:
- /// `$CUA_SPACES_NAMESPACE`, else `cua-spaces-<client id>`.
+ /// Base name of [`Spaces::fleet_pool_name`]. Default:
+ /// `$CUA_SPACES_NAMESPACE`, else `cua-spaces`. Cua Cloud has ended, so
+ /// no pool is claimed from.
pub fn fleet_namespace(mut self, ns: impl Into<String>) -> Self {
self.fleet_namespace = Some(ns.into());
self
@@ -350,21 +282,14 @@ impl SpacesBuilder {
let home = self.home.unwrap_or_else(cua_home);
let sandboxes = self.sandboxes.unwrap_or_else(|| {
let mut b = Sandboxes::builder();
- if let Some(f) = &self.fleet {
- b = b.fleet(f.clone());
- }
if let Some(l) = &self.local {
b = b.local(l.clone());
}
b.build()
});
- let namespace = self.fleet_namespace.unwrap_or_else(|| {
- default_namespace(
- self.fleet
- .as_ref()
- .and_then(|f| f.config().client_id.clone()),
- )
- });
+ let namespace = self
+ .fleet_namespace
+ .unwrap_or_else(|| default_namespace(None));
let operator_display = self.operator_display.unwrap_or_else(|| {
Arc::new(ControlServerDisplay::new(home.join("spaces-control.json")))
});
@@ -385,7 +310,6 @@ impl SpacesBuilder {
#[cfg(feature = "spaces-agents")]
share_consent: std::sync::RwLock::new(self.share_consent),
registry: Registry::new(home),
- fleet: self.fleet,
has_local: self.local.is_some(),
sandboxes,
namespace,
@@ -423,65 +347,6 @@ fn default_namespace(client_id: Option<String>) -> String {
}
}
-/// The namespace of the account's cloud sandbox (Fleet claim) `name`.
-async fn cloud_namespace(fleet: &FleetClient, name: &str) -> Result<String> {
- let mut found = fleet.find_claims(name).await?;
- match found.len() {
- 0 => Err(Error::NotFound(format!("cloud:{name}"))),
- 1 => Ok(found.remove(0).metadata.namespace),
- n => Err(Error::invalid(format!(
- "cloud:{name} names claims in {n} pools (created before names were unique); \
- delete one of them"
- ))),
- }
-}
-
-/// How long reading a cloud Space's image may take before the Space is
-/// connected without one.
-const CLOUD_IMAGE_TIMEOUT: Duration = Duration::from_secs(10);
-
-/// The image a cloud Space runs, from what the SDK already has: this
-/// machine's record of the sandbox (the requested reference and its
-/// resolved digest), else the claim's template (the reference as the
-/// template names it; the digest only when that reference is pinned). No
-/// registry read; best effort and bounded: a Space connects without it.
-async fn cloud_image(
- sandboxes: &Sandboxes,
- fleet: &FleetClient,
- namespace: &str,
- claim: &str,
-) -> Option<(String, String)> {
- if let Some(info) = sandboxes
- .recorded_cloud_image(claim, namespace)
- .filter(|i| !i.reference.trim().is_empty())
- {
- return Some((info.reference, info.digest));
- }
- match tokio::time::timeout(CLOUD_IMAGE_TIMEOUT, fleet.claim_image(namespace, claim)).await {
- Ok(Ok(Some((reference, _runtime)))) => Some(image_with_pinned_digest(reference)),
- Ok(Ok(None)) => None,
- Ok(Err(error)) => {
- tracing::debug!(claim, %error, "the cloud Space's image was not read");
- None
- }
- Err(_) => {
- tracing::debug!(claim, "reading the cloud Space's image timed out");
- None
- }
- }
-}
-
-/// `(reference, digest)`: the digest of a `repo@sha256:…` reference, else
-/// empty (a tag names no variant).
-pub(crate) fn image_with_pinned_digest(reference: String) -> (String, String) {
- let digest = reference
- .find("@sha256:")
- .map(|at| reference[at + 1..].to_string())
- .filter(|d| d.len() > "sha256:".len())
- .unwrap_or_default();
- (reference, digest)
-}
-
/// A relay machine as a Space row (capabilities are known after connecting).
pub(crate) fn relay_info(m: &crate::relay::RelayMachine) -> SpaceInfo {
SpaceInfo {
@@ -652,7 +517,6 @@ pub(crate) struct Inner {
pub(crate) extensions: Vec<Arc<dyn crate::extension::SpacesExtension>>,
#[cfg(feature = "spaces-agents")]
pub(crate) share_consent: std::sync::RwLock<Option<Arc<dyn crate::share::ShareConsent>>>,
- pub(crate) fleet: Option<FleetClient>,
has_local: bool,
pub(crate) sandboxes: Sandboxes,
namespace: String,
@@ -691,7 +555,6 @@ impl std::fmt::Debug for Spaces {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("Spaces")
.field("home", &self.inner.registry.dir())
- .field("fleet", &self.inner.fleet.is_some())
.field("local", &self.inner.has_local)
.field("relay", &self.relay_account().map(|r| r.url))
.finish()
@@ -714,11 +577,6 @@ impl Spaces {
&self.inner.registry
}
- /// The Fleet client, when configured.
- pub fn fleet(&self) -> Option<&FleetClient> {
- self.inner.fleet.as_ref()
- }
-
/// The sandbox manager Local Spaces are provisioned with.
pub fn sandboxes(&self) -> &Sandboxes {
&self.inner.sandboxes
@@ -729,17 +587,12 @@ impl Spaces {
&self.inner.operator_display
}
- /// Base name of the Fleet pools Spaces claims from.
+ /// Base name of [`Spaces::fleet_pool_name`] (Cua Cloud has ended: no pool
+ /// is claimed from).
pub fn fleet_namespace(&self) -> &str {
&self.inner.namespace
}
- /// Cua Cloud has ended: every cloud Space call fails with
- /// [`cua_sandbox_core::CLOUD_ENDED`] instead of reaching Fleet.
- fn fleet_client(&self) -> Result<&FleetClient> {
- Err(cua_sandbox_core::Error::CloudEnded.into())
- }
-
// ------------------------------------------------------------ registry
/// Every registered Space, plus the relay machines of the last
@@ -1520,39 +1373,8 @@ impl Spaces {
(None, None)
}
}
- SpaceId::Cloud { name, namespace } => {
- let fleet = self.fleet_client()?;
- let namespace = match namespace.clone().or_else(|| credential.namespace.clone()) {
- Some(ns) => ns,
- None => cloud_namespace(fleet, name).await?,
- };
- let claim = name;
- let bound = fleet.attach_claim(&namespace, claim).await?;
- image = cloud_image(&self.inner.sandboxes, fleet, &namespace, claim).await;
- for svc in bound.services.iter().filter(|s| s.as_str() != "env") {
- services.insert(
- svc.clone(),
- SpaceService {
- source: ServiceSource::Fleet {
- fleet: fleet.clone(),
- bound: bound.clone(),
- service: svc.clone(),
- },
- mcp_path: cua_sandbox_core::mcp::DEFAULT_PATH.into(),
- },
- );
- }
- let gateway = Some(Gateway::Fleet {
- fleet: fleet.clone(),
- claim: claim.clone(),
- });
- if bound.services.iter().any(|s| s == "env") {
- let o = fleet.env_connect_options(&bound, "env", credential.token.clone())?;
- (Some(o), gateway)
- } else {
- (None, gateway)
- }
- }
+ // Cua Cloud has ended: a legacy `cloud:` Space cannot connect.
+ SpaceId::Cloud { .. } => return Err(cua_sandbox_core::Error::CloudEnded.into()),
SpaceId::Relay { machine_id } => {
let relay = self.relay()?;
// The WireGuard®-based mesh first (end to end, direct when
@@ -1609,7 +1431,7 @@ impl Spaces {
services.insert(
svc.clone(),
SpaceService {
- source: ServiceSource::Sandbox(service),
+ source: ServiceSource::Sandbox(Box::new(service)),
mcp_path: cua_sandbox_core::mcp::DEFAULT_PATH.into(),
},
);
@@ -1654,8 +1476,7 @@ impl Spaces {
Some(options) => match SpacesdClient::connect(options.probe_timeout(probe)).await {
Ok(env) => Some(env),
Err(cua_spacesd_client::Error::SpacesdNotAvailable { endpoint, reason }) => {
- let generic_ok = matches!(id, SpaceId::Local { .. } | SpaceId::Cloud { .. })
- || !services.is_empty();
+ let generic_ok = matches!(id, SpaceId::Local { .. }) || !services.is_empty();
if let SpaceId::Relay { machine_id } = &id
&& crate::host_spaces::is_stopped_sharing(&reason)
{
@@ -1762,229 +1583,6 @@ impl Spaces {
// ---------------------------------------------------------- provisioning
- /// Claims a Fleet Space: validates the runtime/image pairing (the one
- /// place it is validated), reconciles a warm pool for the image and its
- /// command/env/services, claims from it, waits for the claim to bind
- /// (Fleet readiness: the spacesd port for the Spaces images, else the
- /// first declared service, else none), connects, and registers the
- /// Space. An image without cua-spacesd becomes a Space of its
- /// declared services within the handshake timeout.
- pub(crate) async fn claim_fleet(
- &self,
- opts: FleetClaim,
- ) -> Result<std::result::Result<SpaceInfo, PendingSpace>> {
- let fleet = self.fleet_client()?.clone();
- let expect_env = expects_spacesd(opts.image.as_deref(), opts.spacesd);
- let (runtime, image, kind, resolved_os) = match (opts.runtime, opts.image.clone()) {
- (Some(r), image) => {
- let image = image.unwrap_or_else(|| fleet_runtime::default_image(r));
- let got = fleet_runtime::resolve_image(Some(r), &image).await?;
- let os = got.resolved.map(|i| i.os);
- (r, image, got.runtime, os)
- }
- // No runtime: the image's manifest decides (a container rootfs
- // runs on gVisor, a containerDisk on KubeVirt), so the default
- // image (rootfs + disk) is a gVisor container.
- (None, image) => {
- let image =
- image.unwrap_or_else(|| fleet_runtime::default_image(FleetRuntime::Gvisor));
- let got = fleet_runtime::resolve_image(None, &image).await?;
- let os = got.resolved.map(|i| i.os);
- let kind = got.runtime;
- let r = match kind {
- cua_fleet::RuntimeKind::Kubevirt => FleetRuntime::Kubevirt,
- cua_fleet::RuntimeKind::Gvisor => FleetRuntime::Gvisor,
- other => {
- return Err(Error::invalid(format!(
- "{image} needs the Fleet runtime {other:?}, which Spaces do not claim"
- )));
- }
- };
- (r, image, kind, os)
- }
- };
- let guest_os = fleet_runtime::guest_os(&image, resolved_os.as_deref());
- // command and env run on both runtimes: the template carries them
- // with `processMode: Run` (see `cua_fleet::SandboxSpec`).
- let command = opts.command.clone().filter(|c| !c.is_empty());
- let mut services = opts.services.clone();
- services.remove("env");
- // The spacesd token, delivered with the claim (see
- // `fleet_claim_token`). The pool keeps its name: `apply` turns on
- // the template's claimSecrets, and Fleet binds only replicas of the
- // current template, so none started without the Secret mount.
- let claim_token = fleet_claim_token(&guest_os, expect_env, opts.env_token.as_deref())?;
- let key = sized_pool_key(
- &image,
- command.as_deref(),
- &opts.env,
- &services,
- opts.cpus,
- opts.memory_mb,
- );
- let pool_name = self.pool_name(runtime, &key);
- let mut spec = PoolSpec::new(pool_name, &image).runtime(kind.clone());
- spec.cpu = opts.cpus;
- spec.memory_mb = opts.memory_mb;
- spec.command = command;
- spec.env = opts.env.clone();
- spec.claim_secrets = claim_token.is_some();
- spec.readiness_tcp_port = if expect_env {
- Some(cua_proto::SPACESD_DEFAULT_PORT)
- } else {
- services.values().next().copied()
- };
- if expect_env {
- services.insert("env".into(), cua_proto::SPACESD_DEFAULT_PORT);
- }
- spec.services = services;
- let (sandbox, pool_options) = spec.parts();
- let pool = fleet.apply(&spec.name, &sandbox, &pool_options).await?;
- let claim_name = sanitize_label(
- &opts
- .name
- .clone()
- .unwrap_or_else(|| format!("space-{}", random_suffix())),
- );
- cua_sandbox_core::progress::report(cua_sandbox_core::progress::Progress::phase(
- cua_sandbox_core::progress::Phase::Creating,
- ));
- let (claim, created) = fleet
- .claim(
- &pool.pool,
- ClaimOptions {
- name: Some(claim_name.clone()),
- claim_token: claim_token.clone(),
- ..Default::default()
- },
- )
- .await?;
- if created {
- crate::creating::record(crate::creating::Made::FleetClaim {
- namespace: claim.metadata.namespace.clone(),
- name: claim.metadata.name.clone(),
- });
- }
- let finish = FleetFinish {
- claim,
- runtime: kind,
- // An existing claim of that name keeps the token it was
- // created with; ours never reached it.
- claim_token: claim_token.filter(|_| created),
- env_token: opts.env_token.clone(),
- expect_env,
- };
- if !opts.wait.unwrap_or(true) {
- // Finish (bind, token delivery, connect, register) in the
- // background, like a local Space: the token lives only in this
- // process until the Space is registered with it.
- let id = SpaceId::Cloud {
- name: finish.claim.metadata.name.clone(),
- namespace: Some(finish.claim.metadata.namespace.clone()),
- };
- let spaces = self.clone();
- let sink = cua_sandbox_core::progress::current();
- tokio::spawn(cua_sandbox_core::progress::carry(sink, async move {
- match spaces.finish_fleet_claim(fleet, finish).await {
- Ok(_) => cua_sandbox_core::progress::report(
- cua_sandbox_core::progress::Progress::phase(
- cua_sandbox_core::progress::Phase::Ready,
- ),
- ),
- Err(e) => tracing::warn!(error = %e, "background cloud Space create failed"),
- }
- }));
- return Ok(Err(PendingSpace {
- id: id.to_string(),
- phase: "starting",
- }));
- }
- self.finish_fleet_claim(fleet, finish).await.map(Ok)
- }
-
- /// The rest of [`Self::claim_fleet`] once the claim exists: waits for it
- /// to bind and for its token to reach the driver, connects and
- /// registers the Space. The claim is released on any failure.
- async fn finish_fleet_claim(&self, fleet: FleetClient, f: FleetFinish) -> Result<SpaceInfo> {
- let FleetFinish {
- claim,
- runtime,
- claim_token,
- env_token,
- expect_env,
- } = f;
- cua_sandbox_core::progress::report(cua_sandbox_core::progress::Progress::phase(
- cua_sandbox_core::progress::Phase::Booting,
- ));
- let bound = match fleet.wait_claim(&claim).await {
- Ok(b) => b,
- Err(e) => {
- let _ = fleet
- .release(&claim.metadata.namespace, &claim.metadata.name)
- .await;
- return Err(e.into());
- }
- };
- if let Some(token) = &claim_token
- && let Err(e) = fleet.await_claim_secrets(&bound, token, &runtime).await
- {
- let _ = fleet.release(&bound.namespace, &bound.claim).await;
- return Err(e.into());
- }
- let id = SpaceId::Cloud {
- name: bound.claim.clone(),
- namespace: Some(bound.namespace.clone()),
- };
- let mut credential = Credential {
- url: None,
- token: claim_token.or(env_token),
- ..Default::default()
- };
- // The pool's readiness probe already waited for the driver's port;
- // this only covers the driver finishing its start.
- cua_sandbox_core::progress::report(cua_sandbox_core::progress::Progress::phase(
- cua_sandbox_core::progress::Phase::Connecting,
- ));
- let space = match self
- .connect_when_ready(&id, &credential, None, Duration::from_secs(120), expect_env)
- .await
- {
- Ok(s) => s,
- Err(e) => {
- let _ = fleet.release(&bound.namespace, &bound.claim).await;
- return Err(e);
- }
- };
- let space = if space.has_spacesd()
- && !space.capabilities().initialized
- && credential.token.is_none()
- {
- // Bootstrap mode: install our own token so the Space is never
- // left open, then reconnect with it.
- let token = format!("{:032x}", rand::random::<u128>());
- space
- .spacesd()?
- .init(pb::InitRequest {
- token: token.clone(),
- ..Default::default()
- })
- .await?;
- credential.token = Some(token);
- self.connect(&id, &credential, None).await?
- } else {
- space
- };
- self.store(&space, credential)?;
- self.inner
- .connections
- .lock()
- .await
- .insert(id.to_string(), space);
- #[cfg(feature = "mcp")]
- self.notify_connected(&id);
- self.info(&id)
- }
-
/// A registered Space in `provider` that is reachable and has what was
/// asked for (the declared `services`; a healthy cua-spacesd when one is
/// expected).
@@ -1994,10 +1592,6 @@ impl Spaces {
services: &BTreeMap<String, u16>,
expect_env: bool,
) -> Result<Option<SpaceInfo>> {
- let opts = FleetClaim {
- services: services.clone(),
- ..Default::default()
- };
for info in self.list()? {
if info.provider != provider {
continue;
@@ -2006,8 +1600,7 @@ impl Spaces {
continue;
};
// Reuse only a Space that has what was asked for.
- if !opts
- .services
+ if !services
.keys()
.filter(|s| s.as_str() != "env")
.all(|s| space.declared_services().contains_key(s))
@@ -2020,7 +1613,7 @@ impl Spaces {
Err(_) => false,
}
} else {
- !opts.services.is_empty()
+ !services.is_empty()
};
if usable {
return Ok(Some(info));
@@ -2043,7 +1636,7 @@ impl Spaces {
use cua_sandbox_core::progress::{Phase, Progress, report};
refuse_windows_on_mac(opts.image.as_deref(), cfg!(target_os = "macos"))?;
let sink = opts.progress.take().map(|p| p.0);
- let (key, on) = self.create_key(&mut opts)?;
+ let key = self.create_key(&mut opts)?;
// Every report names the Space it is about.
let target = key.id.clone();
let sink: Option<cua_sandbox_core::progress::Sink> = sink.map(|s| {
@@ -2058,11 +1651,9 @@ impl Spaces {
}
}) as cua_sandbox_core::progress::Sink
});
- if opts.wait == Some(false) && on != On::Cloud {
+ if opts.wait == Some(false) {
// The whole create runs in the background (still cancellable);
- // the caller gets the id it will have. A cloud create returns
- // once its claim is accepted (its errors, such as no credit,
- // reach the caller) and finishes binding in the background.
+ // the caller gets the id it will have.
let flight = crate::creating::register(self.home_dir(), &key)?;
let spaces = self.clone();
let id = key.id.clone();
@@ -2104,7 +1695,7 @@ impl Spaces {
/// Names the create before it starts (a generated name is chosen now,
/// so a cancel and a crash recovery know what to look for) and says
/// how it is found.
- fn create_key(&self, opts: &mut SpaceCreate) -> Result<(crate::creating::CreateKey, On)> {
+ fn create_key(&self, opts: &mut SpaceCreate) -> Result<crate::creating::CreateKey> {
let on = match opts.on.clone() {
Some(on) => on,
None => {
@@ -2147,20 +1738,6 @@ impl Spaces {
generated,
}
}
- On::Cloud => {
- let name = named(opts);
- crate::creating::CreateKey {
- id: SpaceId::Cloud {
- name: name.clone(),
- namespace: None,
- }
- .to_string(),
- stem: format!("cloud.{name}"),
- name,
- create_id,
- generated,
- }
- }
_ => crate::creating::CreateKey {
id: String::new(),
name: opts.name.clone().unwrap_or_default(),
@@ -2169,7 +1746,7 @@ impl Spaces {
generated,
},
};
- Ok((key, on))
+ Ok(key)
}
/// [`Spaces::create`] once registered: runs it with its journal, and
@@ -2181,9 +1758,7 @@ impl Spaces {
flight: crate::creating::Flight,
) -> Result<SpaceCreated> {
use crate::creating::{CancelOutcome, CancelState};
- let kind = if key.stem.starts_with("cloud.") {
- "cloud"
- } else if key.stem.starts_with("other.") {
+ let kind = if key.stem.starts_with("other.") {
"host"
} else {
"local"
@@ -2238,23 +1813,15 @@ impl Spaces {
async fn create_inner(&self, opts: SpaceCreate) -> Result<SpaceCreated> {
use cua_sandbox_core::placement;
- let (on, source) = match opts.on.clone() {
- Some(on) => (on, cua_sandbox_core::settings::Source::Explicit),
- None => cua_sandbox_core::settings::Settings::load()
- .and_then(|s| s.default_on())
- .map_err(|e| Error::invalid(e.to_string()))?,
+ let on = match opts.on.clone() {
+ Some(on) => on,
+ None => {
+ cua_sandbox_core::settings::Settings::load()
+ .and_then(|s| s.default_on())
+ .map_err(|e| Error::invalid(e.to_string()))?
+ .0
+ }
};
- if on == On::Cloud
- && self.inner.fleet.is_none()
- && let Some(hint) = cua_sandbox_core::settings::cloud_default_hint(&source)
- {
- return Err(Error::host(
- cua_spaces_contract::host::FLEET,
- format!(
- "set CUA_CLIENT_ID/CUA_CLIENT_SECRET (or CUA_TOKEN) to use cloud Spaces; {hint}"
- ),
- ));
- }
let place = |e: placement::PlacementError| {
Error::Sandbox(cua_sandbox_core::Error::InvalidPlacement(e))
};
@@ -2303,7 +1870,8 @@ impl Spaces {
let expect_env = expects_spacesd(opts.image.as_deref(), opts.spacesd);
let provider = match &on {
On::Local => Provider::Local,
- On::Cloud => Provider::Cloud,
+ // Cua Cloud has ended ([`Spaces::create`] refuses it up front).
+ On::Cloud => return Err(cua_sandbox_core::Error::CloudEnded.into()),
other => {
return Err(Error::HostCapabilityMissing {
what: format!("provider {}", other.location()),
@@ -2316,82 +1884,32 @@ impl Spaces {
{
return Ok(SpaceCreated::Ready { info, reused: true });
}
- match on {
- On::Cloud => {
- if opts.gpu.is_some() {
- return Err(Error::invalid(format!(
- "gpu: {}",
- cua_sandbox_core::FLEET_NO_GPU_REASON
- )));
- }
- if opts.disk_gb.is_some_and(|g| g > 0) {
- return Err(Error::invalid(
- "disk_gb sizes local VMs only: Cua Cloud boots the image's disk",
- ));
- }
- // Refused here, before any pool is written.
- let memory_mb = opts.memory_mb.map(|m| u32::try_from(m).unwrap_or(u32::MAX));
- cua_fleet::check_cloud_size(opts.cpus, memory_mb)
- .map_err(|e| Error::invalid(e.to_string()))?;
- let runtime = match (&opts.runtime, opts.kind) {
- (Runtime::Gvisor, _) | (Runtime::Auto, Kind::Container) => {
- Some(FleetRuntime::Gvisor)
- }
- (Runtime::Kubevirt, _) | (Runtime::Auto, Kind::Vm) => {
- Some(FleetRuntime::Kubevirt)
- }
- _ => None,
- };
- let claim = FleetClaim {
- image: opts.image,
- runtime,
- name: opts.name,
- wait: opts.wait,
- env_token: opts.env_token,
- command: opts.command,
- env: opts.env,
- services: opts.services,
- spacesd: opts.spacesd,
- cpus: opts.cpus,
- memory_mb,
- };
- Ok(match self.claim_fleet(claim).await? {
- Ok(info) => SpaceCreated::Ready {
- info,
- reused: false,
- },
- Err(p) => SpaceCreated::Starting(p),
- })
- }
- _ => {
- let name = sanitize_label(
- &opts
- .name
- .unwrap_or_else(|| format!("space-{}", random_suffix())),
- );
- let local = LocalProvision {
- image: opts.image,
- kind: opts.kind,
- runtime: opts.runtime,
- name: Some(name.clone()),
- cpus: opts.cpus,
- memory_mb: opts.memory_mb,
- disk_gb: opts.disk_gb,
- timeout: opts.timeout,
- command: opts.command,
- env: opts.env,
- services: opts.services,
- spacesd: opts.spacesd,
- gpu: opts.gpu,
- };
- // `create` runs a `wait = false` create in the background
- // itself, so here it always waits.
- Ok(SpaceCreated::Ready {
- info: self.provision_local(local).await?,
- reused: false,
- })
- }
- }
+ let name = sanitize_label(
+ &opts
+ .name
+ .unwrap_or_else(|| format!("space-{}", random_suffix())),
+ );
+ let local = LocalProvision {
+ image: opts.image,
+ kind: opts.kind,
+ runtime: opts.runtime,
+ name: Some(name.clone()),
+ cpus: opts.cpus,
+ memory_mb: opts.memory_mb,
+ disk_gb: opts.disk_gb,
+ timeout: opts.timeout,
+ command: opts.command,
+ env: opts.env,
+ services: opts.services,
+ spacesd: opts.spacesd,
+ gpu: opts.gpu,
+ };
+ // `create` runs a `wait = false` create in the background
+ // itself, so here it always waits.
+ Ok(SpaceCreated::Ready {
+ info: self.provision_local(local).await?,
+ reused: false,
+ })
}
/// The warm pool Spaces claims `image` on `runtime` from:
@@ -2663,23 +2181,9 @@ impl Spaces {
return Ok(format!("Deleted {id} (sandbox {sandbox} in your cloud)."));
}
let what = match &id {
- SpaceId::Cloud { name, namespace } => {
- let fleet = self.fleet_client()?;
- let namespace = match namespace.clone() {
- Some(ns) => ns,
- None => match self
- .inner
- .registry
- .credential(&id.to_string())?
- .and_then(|c| c.namespace)
- {
- Some(ns) => ns,
- None => cloud_namespace(fleet, name).await?,
- },
- };
- fleet.release(&namespace, name).await?;
- format!("Deleted {id} (cloud sandbox {name}).")
- }
+ // Cua Cloud has ended: a legacy `cloud:` Space has nothing to
+ // delete. `remove` forgets its record.
+ SpaceId::Cloud { .. } => return Err(cua_sandbox_core::Error::CloudEnded.into()),
SpaceId::Local { name } => {
// By name: a stopped or unreachable Space deletes too (a
// handle needs it running), with no connect round trip.
@@ -2955,9 +2459,10 @@ impl Spaces {
/// suspends it, keeping its memory (a container, a QEMU VM), or stops
/// it, keeping its disk (a Lume VM, a Space one of your machines
/// provides, which that machine stops; a Space in your own cloud, whose
- /// instance stops). Streams and hotspots on it end first. A Fleet cloud
- /// Space, a Space added by address and your own computers on the relay
- /// cannot be turned off.
+ /// instance stops). Streams and hotspots on it end first. A Space added
+ /// by address and your own computers on the relay cannot be turned off,
+ /// and a legacy `cloud:` Space fails with
+ /// [`cua_sandbox_core::CLOUD_ENDED`].
pub async fn stop(&self, space: &str) -> Result<SpacePower> {
self.set_power(space, false).await
}
@@ -3032,7 +2537,8 @@ impl Spaces {
None => Err(refuse("relay (only a Space one of your machines provides)")),
}
}
- SpaceId::Cloud { .. } => Err(refuse("cloud")),
+ // Cua Cloud has ended: there is no cloud Space to turn on or off.
+ SpaceId::Cloud { .. } => Err(cua_sandbox_core::Error::CloudEnded.into()),
// A Space a direct host created: that host turns it off or on.
SpaceId::Direct { .. } => match self.inner.registry.direct_host_of(&id.to_string())? {
Some((host, on_host)) => {
@@ -3280,23 +2786,6 @@ mod tests {
}
}
- #[test]
- fn a_pinned_cloud_image_carries_its_digest_a_tag_none() {
- let d = format!("sha256:{}", "a".repeat(64));
- assert_eq!(
- image_with_pinned_digest(format!("ghcr.io/trycua/linux@{d}")),
- (format!("ghcr.io/trycua/linux@{d}"), d.clone())
- );
- assert_eq!(
- image_with_pinned_digest("ghcr.io/trycua/linux:24.04".into()),
- ("ghcr.io/trycua/linux:24.04".into(), String::new())
- );
- assert_eq!(
- image_with_pinned_digest("repo@sha256:".into()).1,
- String::new()
- );
- }
-
#[test]
fn a_runtime_prefix_does_not_hide_a_canonical_image() {
assert!(expects_spacesd(Some("ghcr.io/trycua/linux:24.04"), None));
diff --git a/libs/cua/crates/cua-spaces/tests/cancel.rs b/libs/cua/crates/cua-spaces/tests/cancel.rs
index 16856494f7..3cdfef1c10 100644
--- a/libs/cua/crates/cua-spaces/tests/cancel.rs
+++ b/libs/cua/crates/cua-spaces/tests/cancel.rs
@@ -7,7 +7,6 @@
//! (or one after a daemon restart) is harmless.
use async_trait::async_trait;
-use cua_fleet::testing::FakeFleet;
use cua_sandbox_core::placement::On;
use cua_sandbox_core::{
InstanceStatus, LocalEndpoints, LocalInstance, LocalRuntime, LocalStartSpec, LocalSummary,
@@ -303,49 +302,6 @@ async fn a_cancel_after_a_restart_undoes_the_journal() {
assert_eq!(e.rt.deleted.lock().unwrap().as_slice(), ["orphan"]);
}
-/// A cloud create cancelled while its claim waits to bind releases the
-/// claim it made.
-#[tokio::test]
-#[ignore = "Cua Cloud has ended (CUA-1854); removed with the Fleet provider"]
-async fn a_cancelled_cloud_create_releases_its_claim() {
- let reg = tempfile::tempdir().unwrap();
- let fake = FakeFleet::new();
- let spaces = Spaces::builder()
- .home(reg.path())
- .fleet(fake.client())
- .fleet_namespace("cua-e2e-cx")
- .build();
- let pool = spaces.fleet_pool_name(
- cua_spaces::contract::inputs::FleetRuntime::Kubevirt,
- "ghcr.io/trycua/linux:24.04-disk",
- );
- // No replica ever becomes ready: the claim waits to bind.
- let s = spaces.clone();
- let create = tokio::spawn(async move {
- s.create(SpaceCreate {
- on: Some(On::Cloud),
- image: Some("ghcr.io/trycua/linux:24.04-disk".into()),
- name: Some("cua-e2e-cancel".into()),
- ..Default::default()
- })
- .await
- });
- until("the claim exists", || {
- fake.exists("claim", &pool, "cua-e2e-cancel")
- })
- .await;
- let o = spaces.cancel_create("cloud:cua-e2e-cancel").await.unwrap();
- assert_eq!(o.state, CancelState::Cancelled, "{o:?}");
- assert!(
- o.message.contains("released its cloud sandbox"),
- "{}",
- o.message
- );
- assert_eq!(create.await.unwrap().unwrap_err().tag(), "cancelled");
- assert!(!fake.exists("claim", &pool, "cua-e2e-cancel"), "released");
- assert!(spaces.list().unwrap().is_empty());
-}
-
/// Cancelled after the instance is up, while the create waits for its
/// cua-spacesd: the Spaces layer removes the instance it made.
#[tokio::test]
@@ -436,22 +392,13 @@ async fn a_failed_create_never_deletes_an_existing_space_of_that_name() {
);
}
+/// A create journal an earlier version left for a Cua Cloud claim: recovery
+/// clears it without any Fleet client (Cua Cloud has ended, so there is
+/// nothing left to release).
#[tokio::test]
-async fn interrupted_nonlocal_recovery_still_releases_its_claim() {
+async fn an_interrupted_cloud_create_journal_is_cleared_without_a_client() {
let reg = tempfile::tempdir().unwrap();
- let fake = FakeFleet::new();
- let spaces = Spaces::builder()
- .home(reg.path())
- .fleet(fake.client())
- .build();
- fake.put_object(
- "claim",
- "test-pool",
- "claim",
- serde_json::json!({
- "metadata": {"name": "claim", "namespace": "test-pool"}, "spec": {}
- }),
- );
+ let spaces = Spaces::builder().home(reg.path()).build();
let dir = reg.path().join("creating");
std::fs::create_dir_all(&dir).unwrap();
let mut child = std::process::Command::new("true").spawn().unwrap();
@@ -470,9 +417,8 @@ async fn interrupted_nonlocal_recovery_still_releases_its_claim() {
.recover_interrupted_creates(Duration::from_millis(20))
.await;
assert!(
- matches!(got.as_slice(), [r] if matches!(r.outcome, cua_spaces::RecoveryOutcome::Deleted(_))),
+ matches!(got.as_slice(), [r] if matches!(&r.outcome, cua_spaces::RecoveryOutcome::Deleted(m) if m.contains("Cua Cloud has ended") && !m.contains("not configured"))),
"{got:?}"
);
- assert!(!fake.exists("claim", "test-pool", "claim"));
assert!(!dir.join("claim.json").exists());
}
diff --git a/libs/cua/crates/cua-spaces/tests/cloud_ended.rs b/libs/cua/crates/cua-spaces/tests/cloud_ended.rs
index a5d025788d..e9d5e0fb78 100644
--- a/libs/cua/crates/cua-spaces/tests/cloud_ended.rs
+++ b/libs/cua/crates/cua-spaces/tests/cloud_ended.rs
@@ -18,3 +18,64 @@ async fn creating_a_cloud_space_fails_with_the_ended_message() {
.expect_err("a cloud create fails");
assert_eq!(e.to_string(), cua_sandbox_core::CLOUD_ENDED);
}
+
+fn ended(e: impl std::fmt::Display) -> bool {
+ e.to_string() == cua_sandbox_core::CLOUD_ENDED
+}
+
+/// A `cloud:` Space an earlier version registered: every operation that
+/// needed Cua Cloud answers with the one message and no Fleet client exists
+/// to reach, and `remove` still forgets the stale record locally.
+#[tokio::test]
+async fn a_registered_cloud_space_answers_cloud_ended_and_can_be_forgotten() {
+ let home = tempfile::tempdir().unwrap();
+ let spaces = Spaces::builder().home(home.path()).build();
+ spaces
+ .registry()
+ .upsert(
+ cua_proto::daemon::v1::Space {
+ id: "cloud:old".into(),
+ name: "old".into(),
+ ..Default::default()
+ },
+ Default::default(),
+ )
+ .unwrap();
+
+ // Local registry reads need no client.
+ assert_eq!(
+ spaces.resolve("cloud:old").unwrap().to_string(),
+ "cloud:old"
+ );
+ assert_eq!(spaces.find("cloud:old").await.unwrap().id, "cloud:old");
+
+ // Everything that needed the cloud says it ended.
+ assert!(ended(spaces.space("cloud:old").await.unwrap_err()));
+ assert!(ended(spaces.start("cloud:old").await.unwrap_err()));
+ assert!(ended(spaces.stop("cloud:old").await.unwrap_err()));
+ assert!(ended(spaces.delete("cloud:old").await.unwrap_err()));
+ assert!(ended(
+ spaces.add("cloud:old", None, None).await.unwrap_err()
+ ));
+
+ // The failed calls left the record alone; `remove` forgets it.
+ assert!(spaces.registry().get("cloud:old").unwrap().is_some());
+ let removed = spaces.remove("cloud:old").await.unwrap();
+ assert_eq!(removed.id, "cloud:old");
+ assert!(spaces.registry().get("cloud:old").unwrap().is_none());
+}
+
+#[tokio::test]
+async fn a_cloud_create_in_the_background_still_fails_up_front() {
+ let home = tempfile::tempdir().unwrap();
+ let spaces = Spaces::builder().home(home.path()).build();
+ let e = spaces
+ .create(SpaceCreate {
+ on: Some(On::Cloud),
+ wait: Some(false),
+ ..Default::default()
+ })
+ .await
+ .expect_err("a cloud create fails");
+ assert!(ended(e));
+}
diff --git a/libs/cua/crates/cua-spaces/tests/e2e_fleet.rs b/libs/cua/crates/cua-spaces/tests/e2e_fleet.rs
deleted file mode 100644
index c701cf1cdb..0000000000
--- a/libs/cua/crates/cua-spaces/tests/e2e_fleet.rs
+++ /dev/null
@@ -1,131 +0,0 @@
-//! Live Fleet e2e, gated: needs `CUA_E2E_FLEET=1`, Fleet credentials
-//! (`CUA_CLIENT_ID`/`CUA_CLIENT_SECRET` or `CUA_TOKEN`), and
-//! `CUA_E2E_FLEET_IMAGE`: a **publicly pullable** image that ships
-//! cua-spacesd (the plain `cua-ubuntu-24.04` image does not, so it cannot
-//! be a Space). `CUA_E2E_FLEET_RUNTIME` picks `kubevirt` (containerDisk tag)
-//! or `gvisor` (`docker-` tag); the pairing is validated before claiming.
-//!
-//! Resources are named `cua-e2e-spaces-*` and released even when an
-//! assertion fails; the claim is checked gone afterwards.
-//!
-//! ```sh
-//! set -a; source ~/.env; set +a
-//! CUA_E2E_FLEET=1 CUA_E2E_FLEET_IMAGE=ghcr.io/trycua/linux:24.04 \
-//! CUA_E2E_FLEET_RUNTIME=gvisor \
-//! cargo test -p cua-spaces --test e2e_fleet -- --nocapture
-//! ```
-
-use cua_sandbox_core::placement::{On, Runtime};
-use cua_spaces::contract::inputs::FleetRuntime;
-use cua_spaces::{SpaceCreate, Spaces};
-use std::time::Duration;
-
-#[tokio::test]
-async fn e2e_fleet_claim_bash_send_file_release() {
- if std::env::var("CUA_E2E_FLEET").as_deref() != Ok("1") {
- eprintln!(
- "skipped: set CUA_E2E_FLEET=1 and CUA_E2E_FLEET_IMAGE (an image with cua-spacesd)"
- );
- return;
- }
- let Ok(image) = std::env::var("CUA_E2E_FLEET_IMAGE") else {
- eprintln!("skipped: CUA_E2E_FLEET_IMAGE is unset (no public spacesd image to claim)");
- return;
- };
- // The spacesd token reaches the guest through the claim's Secret
- // (`claimSecrets`), which the published `ghcr.io/trycua/linux:24.04`
- // (pre-rename cua-guestd) and newer images both read.
- let runtime = match std::env::var("CUA_E2E_FLEET_RUNTIME").as_deref() {
- Ok("gvisor") => FleetRuntime::Gvisor,
- _ => FleetRuntime::Kubevirt,
- };
- let fleet = cua_fleet::FleetClient::from_env().expect("Fleet credentials");
- let reg = tempfile::tempdir().unwrap();
- // A run-private `cua-e2e-*` namespace so the shared per-image pool Spaces
- // creates is ours to delete (Spaces leaves pools warm on release).
- let namespace = format!("cua-e2e-spaces-{:08x}", rand::random::<u32>());
- let pool = {
- use sha2::Digest;
- let rt = match runtime {
- FleetRuntime::Gvisor => "gvisor",
- _ => "kubevirt",
- };
- let digest = hex::encode(sha2::Sha256::digest(image.as_bytes()));
- format!("{namespace}-{rt}-{}", &digest[..8])
- };
- let spaces = Spaces::builder()
- .home(reg.path())
- .fleet(fleet.clone())
- .fleet_namespace(namespace.clone())
- .build();
- let name = format!("cua-e2e-spaces-{:08x}", rand::random::<u32>());
- let claimed = spaces
- .create(SpaceCreate {
- on: Some(On::Cloud),
- image: Some(image),
- runtime: match runtime {
- FleetRuntime::Gvisor => Runtime::Gvisor,
- _ => Runtime::Kubevirt,
- },
- name: Some(name.clone()),
- ..Default::default()
- })
- .await;
- let delete_pool = || async {
- if let Ok(handle) = fleet.get_pool(&pool).await {
- let _ = fleet.delete_pool(handle).await;
- eprintln!("deleted pool {pool}");
- }
- };
- let info = match claimed.map(|c| c.ready()) {
- Ok(Ok(info)) => info,
- Ok(Err(p)) => {
- delete_pool().await;
- panic!("still pending: {}", p.id)
- }
- Err(e) => {
- delete_pool().await;
- panic!("claim failed: {e}")
- }
- };
- let result: cua_spaces::Result<()> = async {
- let space = spaces.space(&info.id).await?;
- let out = space.bash("uname -s", Duration::from_secs(60)).await?;
- assert!(out.stdout.starts_with("Linux"), "{}", out.render());
- let shot = space
- .spacesd()?
- .screenshot(Default::default())
- .await
- .map_err(cua_spaces::Error::from)?;
- assert!(shot.width > 0 && shot.height > 0 && !shot.image.is_empty());
- eprintln!(
- "screenshot {}x{} ({} bytes)",
- shot.width,
- shot.height,
- shot.image.len()
- );
- if let Ok(path) = std::env::var("CUA_E2E_FLEET_SCREENSHOT") {
- std::fs::write(&path, &shot.image).unwrap();
- eprintln!("wrote {path}");
- }
- let dir = tempfile::tempdir().unwrap();
- std::fs::write(dir.path().join("hello.txt"), "from the e2e").unwrap();
- let r = space
- .send_file(&dir.path().join("hello.txt"), Default::default())
- .await?;
- assert!(r.verified);
- Ok(())
- }
- .await;
- let released = spaces.delete(&info.id).await;
- let claims_left = fleet
- .sdk()
- .list_claims(pool.clone())
- .await
- .map(|c| c.iter().any(|c| c.metadata.name == name));
- delete_pool().await;
- result.unwrap();
- released.unwrap();
- assert_eq!(claims_left.ok(), Some(false), "the claim was released");
- eprintln!("released claim {name}");
-}
diff --git a/libs/cua/crates/cua-spaces/tests/generic.rs b/libs/cua/crates/cua-spaces/tests/generic.rs
index 99e32d0623..6969e05797 100644
--- a/libs/cua/crates/cua-spaces/tests/generic.rs
+++ b/libs/cua/crates/cua-spaces/tests/generic.rs
@@ -1,11 +1,10 @@
//! Spaces on images without cua-spacesd: a Space is any sandbox, its
//! capability set is empty, its declared services answer generic MCP, and
//! spacesd primitives fail at once with `capability_missing`. The MCP
-//! servers are `cua_sandbox_core::testing::McpTestServer` (rmcp); Fleet is
-//! `FakeFleet`; nothing starts a VM, container or claim.
+//! servers are `cua_sandbox_core::testing::McpTestServer` (rmcp); nothing
+//! starts a VM or container.
use async_trait::async_trait;
-use cua_fleet::testing::FakeFleet;
use cua_sandbox_core::placement::On;
use cua_sandbox_core::testing::{McpTestServer, expected_result};
use cua_sandbox_core::{
@@ -373,135 +372,3 @@ async fn an_spacesd_space_also_reaches_its_declared_services() {
assert!(space.services().contains(&"tools".to_string()));
spaces.delete(&info.id).await.unwrap();
}
-
-#[tokio::test]
-#[ignore = "Cua Cloud has ended (CUA-1854); removed with the Fleet provider"]
-async fn claim_fleet_plain_image_is_ready_without_spacesd() {
- {
- let reg = tempfile::tempdir().unwrap();
- let fleet = FakeFleet::new();
- cua_fleet::testing::set_image_variant(PLAIN, cua_fleet::ImageVariant::Rootfs);
- // The gateway is a loopback server serving the claim's `mcp` service
- // at `/api/svc/<pool>/sbx-<claim>-mcp/mcp`; the pool name comes from
- // the image and workload (command and env, as the template has them).
- let names = Spaces::builder()
- .home(reg.path().join("names"))
- .fleet_namespace("cua-e2e-gen")
- .build();
- let command: Vec<String> = ["python", "/srv/mcp.py"].map(String::from).to_vec();
- let pool = names.fleet_pool_name(
- cua_spaces::contract::inputs::FleetRuntime::Gvisor,
- &cua_spaces::pool_key(
- PLAIN,
- Some(&command),
- &[("MCP_PORT".to_string(), "8765".to_string())].into(),
- &[("mcp".to_string(), 8765u16)].into(),
- ),
- );
- let server = McpTestServer::start(&format!("/api/svc/{pool}/sbx-cua-e2e-gen-claim-mcp"))
- .await
- .unwrap();
- let spaces = Spaces::builder()
- .home(reg.path())
- .fleet(fleet.client_with_base(&server.url))
- .fleet_namespace("cua-e2e-gen")
- .build();
- let started = Instant::now();
- let info = spaces
- .create(SpaceCreate {
- on: Some(On::Cloud),
- image: Some(PLAIN.into()),
- name: Some("cua-e2e-gen-claim".into()),
- command: Some(vec!["python".into(), "/srv/mcp.py".into()]),
- env: [("MCP_PORT".to_string(), "8765".to_string())].into(),
- services: [("mcp".to_string(), 8765u16)].into(),
- ..Default::default()
- })
- .await
- .unwrap()
- .ready()
- .expect("waited");
- assert!(
- started.elapsed() < Duration::from_secs(20),
- "no 300 s wait for 3211: {:?}",
- started.elapsed()
- );
- assert!(info.features.is_empty());
- assert_eq!(info.services, ["mcp"]);
- // The pool template: gVisor from the manifest, the command and env
- // (processMode Run), readiness on the declared service, no env port.
- let pools: Vec<_> = fleet
- .all_namespaces()
- .into_iter()
- .filter(|n| n.starts_with("cua-e2e-gen-gvisor-"))
- .collect();
- assert_eq!(pools.len(), 1, "{pools:?}");
- let template = fleet.object("template", &pools[0], &pools[0]).unwrap();
- let t = template.to_string();
- let vm = &template["spec"]["vmTemplate"];
- assert_eq!(vm["env"]["MCP_PORT"], "8765", "{t}");
- assert_eq!(vm["command"][1], "/srv/mcp.py", "{t}");
- assert_eq!(vm["processMode"], "Run", "{t}");
- assert!(!t.contains("3211"), "no spacesd port: {t}");
- assert_mcp_service_works(&spaces, &info.id, Some("mcp")).await;
- assert_env_primitives_fail_fast(&spaces, &info.id).await;
- spaces.delete(&info.id).await.unwrap();
- }
-}
-
-#[tokio::test]
-#[ignore = "Cua Cloud has ended (CUA-1854); removed with the Fleet provider"]
-async fn fleet_env_and_commands_run_on_both_runtimes() {
- let reg = tempfile::tempdir().unwrap();
- let fleet = FakeFleet::new();
- cua_fleet::testing::set_image_variant(PLAIN, cua_fleet::ImageVariant::Rootfs);
- let spaces = Spaces::builder()
- .home(reg.path())
- .fleet(fleet.client())
- .build();
- let template_of = |prefix: &str| {
- let ns = fleet
- .all_namespaces()
- .into_iter()
- .find(|n| n.contains(prefix))
- .unwrap_or_else(|| panic!("no {prefix} pool"));
- fleet.object("template", &ns, &ns).unwrap()
- };
- // env without a command: the image's entrypoint runs with it.
- // `wait: false`: the fake has no sandbox to wait for; the template is
- // what is checked.
- let pending = spaces
- .create(SpaceCreate {
- on: Some(On::Cloud),
- image: Some(PLAIN.into()),
- env: [("A".to_string(), "b".to_string())].into(),
- wait: Some(false),
- ..Default::default()
- })
- .await
- .unwrap()
- .ready();
- assert!(pending.is_err(), "wait: false returns the pending claim");
- let vm = template_of("-gvisor-")["spec"]["vmTemplate"].clone();
- assert_eq!(vm["env"]["A"], "b");
- assert_eq!(vm["processMode"], "Run");
- assert!(vm.get("command").is_none_or(|c| c.is_null()), "{vm}");
- // A command on a VM image runs too (processMode Run, cloud-init).
- let image = "ghcr.io/trycua/cua-desktop-linux:latest";
- cua_fleet::testing::set_image_variant(image, cua_fleet::ImageVariant::ContainerDisk);
- let pending = spaces
- .create(SpaceCreate {
- on: Some(On::Cloud),
- image: Some(image.into()),
- command: Some(vec!["true".into()]),
- wait: Some(false),
- ..Default::default()
- })
- .await
- .unwrap()
- .ready();
- assert!(pending.is_err(), "wait: false returns the pending claim");
- let vm = template_of("-kubevirt-")["spec"]["vmTemplate"].clone();
- assert_eq!(vm["command"], serde_json::json!(["true"]));
- assert_eq!(vm["processMode"], "Run");
-}
diff --git a/libs/cua/crates/cua-spaces/tests/providers.rs b/libs/cua/crates/cua-spaces/tests/providers.rs
index b4216570d7..9c0de48f55 100644
--- a/libs/cua/crates/cua-spaces/tests/providers.rs
+++ b/libs/cua/crates/cua-spaces/tests/providers.rs
@@ -1,215 +1,20 @@
-//! Fleet and Local provisioning against fakes: `cua_fleet::testing::FakeFleet`
-//! for the control plane and `cua_spacesd_client::testing::MockServer` as the guest's
-//! spacesd (behind an emulated Fleet gateway for claims).
+//! Local provisioning against fakes: a fake local runtime and
+//! `cua_spacesd_client::testing::MockServer` as the guest's spacesd.
use async_trait::async_trait;
-use cua_fleet::testing::FakeFleet;
-use cua_sandbox_core::placement::{On, Runtime};
+use cua_sandbox_core::placement::On;
use cua_sandbox_core::{
InstanceStatus, LocalEndpoints, LocalInstance, LocalRuntime, LocalStartSpec, LocalSummary,
RuntimeError,
};
-use cua_spaces::contract::inputs::FleetRuntime;
-use cua_spaces::{Provider, SpaceCreate, Spaces};
-use cua_spacesd_client::testing::{MockAuth, MockGateway, MockServer};
+use cua_spaces::{SpaceCreate, Spaces};
+use cua_spacesd_client::testing::{MockAuth, MockServer};
use std::collections::BTreeMap;
use std::sync::{Arc, Mutex};
use std::time::Duration;
const IMAGE: &str = "ghcr.io/trycua/linux:24.04-disk";
-#[tokio::test]
-#[ignore = "Cua Cloud has ended (CUA-1854); removed with the Fleet provider"]
-async fn create_in_the_cloud_binds_connects_through_the_gateway_and_registers() {
- let reg = tempfile::tempdir().unwrap();
- let fake = FakeFleet::new();
- let probe = Spaces::builder()
- .home(reg.path())
- .fleet(fake.client())
- .fleet_namespace("cua-e2e-sp")
- .build();
- let pool = probe.fleet_pool_name(FleetRuntime::Kubevirt, IMAGE);
- let srv = MockServer::start(MockAuth {
- token: None,
- gateway: Some(MockGateway {
- prefix: format!("/api/svc/{pool}/sbx-cua-e2e-claim-env"),
- bearer: "fake-fleet-token".into(),
- claim: "cua-e2e-claim".into(),
- }),
- prefix: None,
- })
- .await;
- let spaces = Spaces::builder()
- .home(reg.path())
- .fleet(fake.client_with_base(&srv.url()))
- .fleet_namespace("cua-e2e-sp")
- .build();
- let info = spaces
- .create(SpaceCreate {
- on: Some(On::Cloud),
- image: Some(IMAGE.into()),
- name: Some("cua-e2e-claim".into()),
- ..Default::default()
- })
- .await
- .unwrap()
- .ready()
- .expect("waited");
- assert_eq!(info.id, "cloud:cua-e2e-claim");
- assert_eq!(info.provider, Provider::Cloud);
- assert!(
- fake.exists("pool", &pool, &pool),
- "a warm pool per image and runtime"
- );
- // The Image row: the claim's template names the image (a tag, so no
- // digest), recorded with the Space.
- assert_eq!(
- (info.image.as_str(), info.image_digest.as_str()),
- (IMAGE, "")
- );
-
- // Commands go through the gateway (gRPC-Web + claim header).
- let space = spaces.space(&info.id).await.unwrap();
- assert_eq!(
- space.spacesd().unwrap().transport(),
- cua_spacesd_client::Transport::GrpcWeb
- );
- let out = space
- .bash("echo through-the-gateway", Duration::from_secs(10))
- .await
- .unwrap();
- assert_eq!(out.stdout, "through-the-gateway\n");
- // The token travelled with the claim, in its Secret (the image reads
- // it from /run/cua/env-token): the template opts in, the claim names
- // the Secret, and the Space holds the same token.
- let cred = spaces.registry().credential(&info.id).unwrap().unwrap();
- let token = cred.token.clone().expect("a cloud Space holds its token");
- assert_eq!(token.len(), 64);
- let t = fake.object("template", &pool, &pool).unwrap();
- assert_eq!(t["spec"]["vmTemplate"]["claimSecrets"], true);
- let claim = fake.object("claim", &pool, "cua-e2e-claim").unwrap();
- assert_eq!(
- claim["spec"]["secretRef"]["name"],
- "cua-claim-cua-e2e-claim"
- );
- let secret = fake
- .object("secret", &pool, "cua-claim-cua-e2e-claim")
- .unwrap();
- let held = base64::Engine::decode(
- &base64::engine::general_purpose::STANDARD,
- secret["data"]["env-token"].as_str().unwrap(),
- )
- .unwrap();
- assert_eq!(held, token.as_bytes());
-
- // `reuse` returns it instead of creating another.
- let again = spaces
- .create(SpaceCreate {
- on: Some(On::Cloud),
- reuse: true,
- ..Default::default()
- })
- .await
- .unwrap();
- assert!(again.reused());
- assert_eq!(again.ready().unwrap().id, info.id);
-
- // A registry written before the unified refs (a `space://fleet/...` id,
- // no namespace hint) still reaches it: the namespace is looked up by
- // the claim name. A bare name in two locations is ambiguous (typed).
- let legacy = tempfile::tempdir().unwrap();
- std::fs::write(
- legacy.path().join("spaces.json"),
- serde_json::to_vec(&serde_json::json!([
- {"id": format!("space://fleet/{pool}/cua-e2e-claim"), "name": "old"},
- {"id": "space://local/cua-e2e-claim", "name": "twin"},
- ]))
- .unwrap(),
- )
- .unwrap();
- std::fs::write(
- legacy.path().join("spaces-credentials.json"),
- serde_json::to_vec(&serde_json::json!({"cloud:cua-e2e-claim": {"token": cred.token}}))
- .unwrap(),
- )
- .unwrap();
- let old = Spaces::builder()
- .home(legacy.path())
- .fleet(fake.client_with_base(&srv.url()))
- .build();
- let ids: Vec<String> = old.list().unwrap().into_iter().map(|i| i.id).collect();
- assert_eq!(ids, ["cloud:cua-e2e-claim", "local:cua-e2e-claim"]);
- let e = old.resolve("cua-e2e-claim").unwrap_err();
- assert_eq!(e.tag(), "ambiguous_sandbox", "{e}");
- assert!(
- e.to_string()
- .contains("local:cua-e2e-claim, cloud:cua-e2e-claim"),
- "{e}"
- );
- let reached = old.space("cloud:cua-e2e-claim").await.unwrap();
- // Reached from another machine's registry: the image comes from the
- // claim all the same.
- assert_eq!(reached.image(), Some((IMAGE, "")));
- assert_eq!(
- reached
- .bash("echo legacy", Duration::from_secs(10))
- .await
- .unwrap()
- .stdout,
- "legacy\n"
- );
-
- // Delete deletes the claim (stops metering) and unregisters.
- spaces.delete(&info.id).await.unwrap();
- assert!(!fake.exists("claim", &pool, "cua-e2e-claim"));
- assert!(!fake.exists("secret", &pool, "cua-claim-cua-e2e-claim"));
- assert!(spaces.list().unwrap().is_empty());
-}
-
-#[tokio::test]
-#[ignore = "Cua Cloud has ended (CUA-1854); removed with the Fleet provider"]
-async fn a_runtime_image_mismatch_is_refused_before_any_request() {
- let reg = tempfile::tempdir().unwrap();
- let fake = FakeFleet::new();
- // What the image is comes from its manifest (a fixture here).
- cua_fleet::testing::set_image_variant(IMAGE, cua_fleet::ImageVariant::ContainerDisk);
- let spaces = Spaces::builder()
- .home(reg.path())
- .fleet(fake.client())
- .build();
- let e = spaces
- .create(SpaceCreate {
- on: Some(On::Cloud),
- image: Some(IMAGE.into()),
- runtime: Runtime::Gvisor,
- ..Default::default()
- })
- .await
- .unwrap_err();
- assert_eq!(e.tag(), "invalid_argument");
- assert!(e.to_string().contains("containerDisk"), "{e}");
- assert!(
- fake.requests().is_empty(),
- "nothing claimed, nothing pulled"
- );
-}
-
-#[tokio::test]
-#[ignore = "Cua Cloud has ended (CUA-1854); removed with the Fleet provider"]
-async fn fleet_tools_without_credentials_name_the_missing_host_capability() {
- let reg = tempfile::tempdir().unwrap();
- let spaces = Spaces::builder().home(reg.path()).build();
- let e = spaces
- .create(SpaceCreate {
- on: Some(On::Cloud),
- ..Default::default()
- })
- .await
- .unwrap_err();
- assert_eq!(e.tag(), "host_capability_missing");
- assert!(e.to_string().contains("CUA_CLIENT_ID"));
-}
-
/// A local runtime whose one "instance" is a MockServer on loopback.
struct FakeRuntime {
port: u16,
@@ -762,140 +567,6 @@ async fn a_stopped_local_space_deletes() {
assert!(left.is_empty(), "{left:?}");
}
-#[tokio::test]
-#[ignore = "Cua Cloud has ended (CUA-1854); removed with the Fleet provider"]
-async fn a_cloud_space_gets_the_size_asked_for_within_the_absolute_ceiling() {
- let reg = tempfile::tempdir().unwrap();
- let fake = FakeFleet::new();
- let spaces = Spaces::builder()
- .home(reg.path())
- .fleet(fake.client())
- .fleet_namespace("cua-e2e-size")
- .build();
- let created = spaces
- .create(SpaceCreate {
- on: Some(On::Cloud),
- image: Some(IMAGE.into()),
- name: Some("sized".into()),
- cpus: Some(4),
- memory_mb: Some(8192),
- wait: Some(false),
- ..Default::default()
- })
- .await
- .unwrap();
- assert!(!created.reused());
- // Its own pool (an unsized Space keeps the image's), whose template
- // reserves what was asked for: what Fleet meters and bills.
- let plain = spaces.fleet_pool_name(FleetRuntime::Kubevirt, IMAGE);
- assert!(!fake.exists("pool", &plain, &plain));
-
- let templates: Vec<serde_json::Value> = fake
- .requests()
- .into_iter()
- .filter(|r| r.method == "POST" && r.path.ends_with("/osgymsandboxtemplates"))
- .filter_map(|r| r.body)
- .collect();
- assert_eq!(templates.len(), 1, "{templates:?}");
- let vm = &templates[0]["spec"]["vmTemplate"];
- assert_eq!(
- (vm["cpuCores"].as_u64(), vm["memory"].as_str()),
- (Some(4), Some("8192Mi"))
- );
-
- // Nonsense never reaches Fleet (sizes above the everyday range do:
- // Fleet decides what the account may run).
- let before = fake.requests().len();
- for (cpus, memory_mb) in [
- (Some(65), None),
- (Some(0), None),
- (None, Some(256)),
- (None, Some(1 << 40)),
- ] {
- let e = spaces
- .create(SpaceCreate {
- on: Some(On::Cloud),
- image: Some(IMAGE.into()),
- cpus,
- memory_mb,
- wait: Some(false),
- ..Default::default()
- })
- .await
- .map(|_| ())
- .unwrap_err()
- .to_string();
- assert!(e.contains("a Cua Cloud sandbox has"), "{e}");
- }
- assert_eq!(fake.requests().len(), before);
-
- // Above the everyday range: written as asked (an exempt account).
- let big = || SpaceCreate {
- on: Some(On::Cloud),
- image: Some(IMAGE.into()),
- cpus: Some(16),
- memory_mb: Some(64 * 1024),
- wait: Some(false),
- ..Default::default()
- };
- spaces.create(big()).await.unwrap();
- let last = fake
- .requests()
- .into_iter()
- .rev()
- .find(|r| r.method == "POST" && r.path.ends_with("/osgymsandboxtemplates"))
- .and_then(|r| r.body)
- .unwrap();
- assert_eq!(last["spec"]["vmTemplate"]["cpuCores"], 16);
- assert_eq!(last["spec"]["vmTemplate"]["memory"], "65536Mi");
-
- // An account under Fleet's size cap: Fleet's denial, typed, with its
- // message.
- fake.faults.lock().unwrap().size_cap = Some((8, 32 * 1024));
- let e = spaces
- .create(SpaceCreate {
- cpus: Some(12),
- ..big()
- })
- .await
- .map(|_| ())
- .unwrap_err();
- assert_eq!(e.tag(), "fleet_admission_denied", "{e}");
- assert!(
- e.to_string()
- .contains(cua_fleet::testing::SIZE_LIMIT_MESSAGE),
- "{e}"
- );
-}
-
-#[tokio::test]
-#[ignore = "Cua Cloud has ended (CUA-1854); removed with the Fleet provider"]
-async fn a_cloud_space_out_of_credit_fails_typed_and_leaves_local_alone() {
- let reg = tempfile::tempdir().unwrap();
- let fake = FakeFleet::new();
- fake.faults.lock().unwrap().credit_exhausted = Some("https://run.cua.ai/billing".into());
- let spaces = Spaces::builder()
- .home(reg.path())
- .fleet(fake.client())
- .fleet_namespace("cua-e2e-credit")
- .build();
- let e = spaces
- .create(SpaceCreate {
- on: Some(On::Cloud),
- image: Some(IMAGE.into()),
- wait: Some(false),
- ..Default::default()
- })
- .await
- .map(|_| ())
- .unwrap_err();
- assert_eq!(e.tag(), "cloud_credit_exhausted");
- assert_eq!(
- e.to_string(),
- "You're out of Cua Cloud credit. Add credit at https://run.cua.ai/billing"
- );
-}
-
/// A local runtime whose start makes the instance, then fails readiness
/// (what a Lume VM whose guest this process cannot reach does).
#[derive(Default)]
diff --git a/libs/cua/crates/cua-volume/Cargo.toml b/libs/cua/crates/cua-volume/Cargo.toml
index 16b6c316ec..782bbbf515 100644
--- a/libs/cua/crates/cua-volume/Cargo.toml
+++ b/libs/cua/crates/cua-volume/Cargo.toml
@@ -12,8 +12,8 @@ publish = false
[features]
default = []
# The S3-compatible backend (AWS S3, Cloudflare R2, MinIO) through the
-# official AWS SDK for Rust, and the Cua cloud credential vendor.
-s3 = ["dep:aws-sdk-s3", "dep:aws-credential-types", "dep:aws-smithy-types", "dep:reqwest"]
+# official AWS SDK for Rust.
+s3 = ["dep:aws-sdk-s3", "dep:aws-credential-types", "dep:aws-smithy-types"]
# The localhost NFSv3 server macOS mounts natively (no kernel or system
# extension), through nfsserve (BSD-3-Clause).
nfs = ["dep:nfsserve"]
@@ -35,7 +35,6 @@ regex = "1"
aws-sdk-s3 = { version = "1.150", default-features = false, features = ["rt-tokio", "default-https-client", "behavior-version-latest"], optional = true }
aws-credential-types = { version = "1.3", optional = true }
aws-smithy-types = { version = "1.8", optional = true }
-reqwest = { version = "0.12", default-features = false, features = ["rustls-tls-native-roots", "json"], optional = true }
nfsserve = { version = "0.11", optional = true }
[target.'cfg(unix)'.dependencies]
diff --git a/libs/cua/crates/cua-volume/src/config.rs b/libs/cua/crates/cua-volume/src/config.rs
index 9257e18068..96afc41336 100644
--- a/libs/cua/crates/cua-volume/src/config.rs
+++ b/libs/cua/crates/cua-volume/src/config.rs
@@ -9,11 +9,11 @@
//! |---|---|---|
//! | `fs` (default) | `$CUA_HOME/volume/data` | none |
//! | `s3` | a versioned bucket (AWS S3, R2, MinIO, BYO) | the credential store's `drive-keys` secret, else `CUA_DRIVE_S3_ACCESS_KEY_ID` / `CUA_DRIVE_S3_SECRET_ACCESS_KEY` |
-//! | `cloud` | the Cua cloud bucket | short-lived keys vended by `POST /api/drive/credentials` for the signed-in account |
//!
-//! `cloud` is off by default and needs both this setting and the server
-//! side's flag; the server answers `drive_disabled` until then. `s3` and
-//! `cloud` need a build with the `s3` feature (the `cua` CLI and daemon).
+//! `s3` needs a build with the `s3` feature (the `cua` CLI and daemon). The
+//! Cua cloud backend (`cloud`) has ended: a config or environment that names
+//! it fails with [`CLOUD_BACKEND_ENDED`], and the drive is served as
+//! unavailable until it names `fs` or `s3`.
//!
//! ```json
//! {"backend": "s3", "s3": {"endpoint": "http://127.0.0.1:9000", "region": "us-east-1",
@@ -26,12 +26,15 @@ use serde::{Deserialize, Serialize};
use crate::{Error, Result};
-/// Environment variable naming the backend (`fs`, `s3`, `cloud`).
+/// Environment variable naming the backend (`fs`, `s3`).
pub const BACKEND_ENV: &str = "CUA_DRIVE_BACKEND";
/// The credential-store secret holding static S3 keys
/// (`{"access_key_id": "...", "secret_access_key": "..."}`).
pub const S3_SECRET_NAME: &str = "drive-keys";
+/// What a config or environment that names the removed `cloud` backend gets.
+pub const CLOUD_BACKEND_ENDED: &str = "the Cua cloud drive backend has ended; use fs or s3";
+
/// The backend kinds.
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
@@ -39,7 +42,6 @@ pub enum BackendKind {
#[default]
Fs,
S3,
- Cloud,
}
impl BackendKind {
@@ -47,9 +49,9 @@ impl BackendKind {
match s.trim() {
"fs" | "local" => Ok(BackendKind::Fs),
"s3" => Ok(BackendKind::S3),
- "cloud" => Ok(BackendKind::Cloud),
+ "cloud" => Err(Error::Invalid(CLOUD_BACKEND_ENDED.into())),
other => Err(Error::Invalid(format!(
- "drive backend {other:?}: use fs, s3 or cloud"
+ "drive backend {other:?}: use fs or s3"
))),
}
}
@@ -58,7 +60,6 @@ impl BackendKind {
match self {
BackendKind::Fs => "fs",
BackendKind::S3 => "s3",
- BackendKind::Cloud => "cloud",
}
}
}
@@ -89,9 +90,6 @@ pub struct DriveConfig {
pub backend: BackendKind,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub s3: Option<S3Settings>,
- /// Seconds a vended cloud key lives (15 to 60 minutes; default 900).
- #[serde(default, skip_serializing_if = "Option::is_none")]
- pub cloud_ttl_secs: Option<u64>,
}
impl DriveConfig {
@@ -103,8 +101,7 @@ impl DriveConfig {
/// Reads the file (default when absent), then applies the environment.
pub fn load(cua_home: &Path) -> Result<DriveConfig> {
let mut c = match std::fs::read(Self::path(cua_home)) {
- Ok(b) => serde_json::from_slice(&b)
- .map_err(|e| Error::Invalid(format!("drive/config.json: {e}")))?,
+ Ok(b) => Self::parse(&b)?,
Err(e) if e.kind() == std::io::ErrorKind::NotFound => DriveConfig::default(),
Err(e) => return Err(e.into()),
};
@@ -112,6 +109,17 @@ impl DriveConfig {
Ok(c)
}
+ /// Parses the file's bytes. A file that names the removed `cloud`
+ /// backend fails with [`CLOUD_BACKEND_ENDED`].
+ fn parse(bytes: &[u8]) -> Result<DriveConfig> {
+ let bad = |e: serde_json::Error| Error::Invalid(format!("drive/config.json: {e}"));
+ let value: serde_json::Value = serde_json::from_slice(bytes).map_err(bad)?;
+ if value.get("backend").and_then(|b| b.as_str()) == Some("cloud") {
+ return Err(Error::Invalid(CLOUD_BACKEND_ENDED.into()));
+ }
+ serde_json::from_value(value).map_err(bad)
+ }
+
/// Applies `CUA_DRIVE_*` overrides read through `get`.
pub fn apply_env(&mut self, get: impl Fn(&str) -> Option<String>) -> Result<()> {
if let Some(b) = get(BACKEND_ENV) {
@@ -148,11 +156,6 @@ impl DriveConfig {
Ok(())
}
- /// The vended key lifetime, clamped to 15-60 minutes.
- pub fn cloud_ttl_secs(&self) -> u64 {
- self.cloud_ttl_secs.unwrap_or(900).clamp(900, 3600)
- }
-
/// Writes the file.
pub fn save(&self, cua_home: &Path) -> Result<()> {
let p = Self::path(cua_home);
@@ -197,13 +200,28 @@ mod tests {
c.apply_env(|k| (k == BACKEND_ENV).then(|| "ftp".into()))
.is_err()
);
+ }
+
+ #[test]
+ fn the_ended_cloud_backend_is_refused_with_its_own_message() {
+ let ended = Error::Invalid(CLOUD_BACKEND_ENDED.into());
+ assert_eq!(BackendKind::parse("cloud").unwrap_err(), ended);
+ let mut c = DriveConfig::default();
+ assert_eq!(
+ c.apply_env(|k| (k == BACKEND_ENV).then(|| "cloud".into()))
+ .unwrap_err(),
+ ended
+ );
+ assert_eq!(
+ DriveConfig::parse(br#"{"backend":"cloud","cloud_ttl_secs":900}"#).unwrap_err(),
+ ended
+ );
+ // An old file's unrelated keys do not matter.
assert_eq!(
- DriveConfig {
- cloud_ttl_secs: Some(10),
- ..c.clone()
- }
- .cloud_ttl_secs(),
- 900
+ DriveConfig::parse(br#"{"backend":"fs","cloud_ttl_secs":900}"#)
+ .unwrap()
+ .backend,
+ BackendKind::Fs
);
}
}
diff --git a/libs/cua/crates/cua-volume/src/lib.rs b/libs/cua/crates/cua-volume/src/lib.rs
index c87c5c5415..b4a04d614b 100644
--- a/libs/cua/crates/cua-volume/src/lib.rs
+++ b/libs/cua/crates/cua-volume/src/lib.rs
@@ -4,9 +4,9 @@
//! Cua Volume: one drive per account, shared by every Space and agent in it.
//!
//! A persistent agent's memory, identity and outputs must outlive its Space:
-//! a cloud Space is a Fleet claim whose disk goes back to the pool, so an
-//! agent that keeps its memory on its own disk forgets everything on
-//! release. The drive is where that state lives instead.
+//! a Space's disk goes away when the Space is deleted, so an agent that
+//! keeps its memory on its own disk forgets everything then. The drive is
+//! where that state lives instead.
//!
//! ```text
//! public/ shared reference: read by everyone, written by the user
@@ -20,7 +20,7 @@
//! | [`acl`] | principals, the default access table, grants |
//! | [`backend`] | the object-store trait: versioned puts with preconditions |
//! | [`fs`] | the local backend (`$CUA_HOME/volume`), versioned on disk |
-//! | `s3` | the S3-compatible backend (feature `s3`): AWS S3, R2, MinIO, and the Cua cloud's vended keys |
+//! | `s3` | the S3-compatible backend (feature `s3`): AWS S3, R2, MinIO |
//! | [`config`] | which backend a cua home uses (`$CUA_HOME/volume/config.json`, `CUA_DRIVE_*`) |
//! | [`audit`] | the hash-chained audit log |
//! | [`scan`] | the secret scanner run on writes under `agents/` |
diff --git a/libs/cua/crates/cua-volume/src/s3.rs b/libs/cua/crates/cua-volume/src/s3.rs
index e2bf98d839..a39b760f7a 100644
--- a/libs/cua/crates/cua-volume/src/s3.rs
+++ b/libs/cua/crates/cua-volume/src/s3.rs
@@ -15,13 +15,7 @@
//! `a/b`); AWS S3 and R2 can. The drive layout never needs both.
//!
//! Credentials come from a [`CredentialSource`]: static keys for MinIO or a
-//! bring-your-own bucket, or [`CloudVendor`], which asks the Cua cloud for
-//! short-lived keys scoped to the session's folders (trycua/cloud: STS
-//! AssumeRole with a session policy per prefix set, 15 to 60 minutes, at
-//! most 12 prefixes). The cloud vendor is off unless it is configured
-//! explicitly (see [`crate::config`]); the server answers `drive_disabled`
-//! (404) while its flag is off and `drive_unavailable` (503) while it has no
-//! bucket.
+//! bring-your-own bucket (see [`crate::config`]).
use std::sync::Arc;
use std::time::{Duration, UNIX_EPOCH};
@@ -39,8 +33,6 @@ use crate::{Error, Result, now_ms};
/// Objects listed at most by one `list` (a guard against runaway listings).
pub const MAX_LIST: usize = 200_000;
-/// Refresh vended credentials this long before they expire.
-pub const REFRESH_BEFORE: Duration = Duration::from_secs(120);
/// Where the bucket is.
#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
@@ -108,188 +100,6 @@ impl CredentialSource for StaticCredentials {
}
}
-/// A bearer token for the Cua cloud API.
-#[async_trait::async_trait]
-pub trait TokenSource: Send + Sync {
- async fn token(&self) -> Result<String>;
-}
-
-/// `POST /api/drive/credentials` body.
-#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
-pub struct VendRequest {
- /// `user`, `agent:<name>` or `space:<id>`.
- pub principal: String,
- #[serde(default)]
- pub space: Option<String>,
- pub ttl_secs: u64,
-}
-
-/// One folder the vended keys reach.
-#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
-pub struct VendedPrefix {
- pub prefix: String,
- /// `r` or `rw`.
- pub mode: String,
-}
-
-/// `POST /api/drive/credentials` response.
-#[derive(Clone, PartialEq, Eq, Serialize, Deserialize)]
-pub struct Vended {
- pub endpoint: String,
- pub region: String,
- pub bucket: String,
- pub root: String,
- pub access_key_id: String,
- pub secret_access_key: String,
- #[serde(default)]
- pub session_token: Option<String>,
- /// RFC 3339.
- pub expires_at: String,
- #[serde(default)]
- pub prefixes: Vec<VendedPrefix>,
-}
-
-impl std::fmt::Debug for Vended {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("Vended")
- .field("endpoint", &self.endpoint)
- .field("bucket", &self.bucket)
- .field("root", &self.root)
- .field("expires_at", &self.expires_at)
- .field("prefixes", &self.prefixes)
- .finish_non_exhaustive()
- }
-}
-
-impl Vended {
- /// The bucket these keys reach.
- pub fn config(&self) -> S3Config {
- S3Config {
- endpoint: Some(self.endpoint.clone()),
- region: self.region.clone(),
- bucket: self.bucket.clone(),
- root: self.root.clone(),
- path_style: false,
- }
- }
-
- fn credentials(&self) -> Result<S3Credentials> {
- Ok(S3Credentials {
- access_key_id: self.access_key_id.clone(),
- secret_access_key: self.secret_access_key.clone(),
- session_token: self.session_token.clone(),
- expires_ms: Some(parse_rfc3339_ms(&self.expires_at)?),
- })
- }
-}
-
-/// Parses `2026-09-29T12:00:00Z` (or with a fraction / offset) to Unix ms.
-pub fn parse_rfc3339_ms(s: &str) -> Result<u64> {
- let dt = aws_smithy_types::DateTime::from_str(s, aws_smithy_types::date_time::Format::DateTime)
- .map_err(|e| Error::Backend(format!("expires_at {s:?}: {e}")))?;
- dt.to_millis()
- .map(|ms| ms.max(0) as u64)
- .map_err(|e| Error::Backend(format!("expires_at {s:?}: {e}")))
-}
-
-/// Short-lived keys from the Cua cloud, scoped to one session's folders.
-pub struct CloudVendor {
- http: reqwest::Client,
- api: String,
- tokens: Arc<dyn TokenSource>,
- request: VendRequest,
- cache: tokio::sync::Mutex<Option<Vended>>,
-}
-
-impl CloudVendor {
- /// A vendor for `request` against the API at `api` (the cyclops-cs base
- /// URL the Fleet client uses).
- pub fn new(
- api: &str,
- tokens: Arc<dyn TokenSource>,
- request: VendRequest,
- ) -> Result<CloudVendor> {
- let http = reqwest::Client::builder()
- .timeout(Duration::from_secs(30))
- .build()
- .map_err(|e| Error::Backend(format!("http client: {e}")))?;
- Ok(CloudVendor {
- http,
- api: api.trim_end_matches('/').to_string(),
- tokens,
- request,
- cache: tokio::sync::Mutex::new(None),
- })
- }
-
- /// The URL keys are vended from.
- pub fn url(&self) -> String {
- format!("{}/api/drive/credentials", self.api)
- }
-
- /// Asks the cloud for fresh keys.
- pub async fn vend(&self) -> Result<Vended> {
- let token = self.tokens.token().await?;
- let resp = self
- .http
- .post(self.url())
- .bearer_auth(token)
- .json(&self.request)
- .send()
- .await
- .map_err(|e| Error::Backend(format!("drive credentials: {e}")))?;
- let status = resp.status();
- let body = resp
- .bytes()
- .await
- .map_err(|e| Error::Backend(format!("drive credentials: {e}")))?;
- if status.is_success() {
- return serde_json::from_slice(&body)
- .map_err(|e| Error::Backend(format!("drive credentials: {e}")));
- }
- let kind = serde_json::from_slice::<serde_json::Value>(&body)
- .ok()
- .and_then(|v| v["error"].as_str().map(str::to_string))
- .unwrap_or_default();
- Err(match (status.as_u16(), kind.as_str()) {
- (404, "drive_disabled") => Error::Forbidden(
- "Cua Volume is not enabled for this account in the cloud (drive_disabled)".into(),
- ),
- (503, "drive_unavailable") => Error::Backend(
- "Cua Volume is enabled but the cloud has no storage configured yet (drive_unavailable)"
- .into(),
- ),
- (422, _) => Error::Invalid(format!(
- "drive credentials: the session reaches too many folders for one key ({kind})"
- )),
- (401 | 403, _) => Error::Forbidden(format!("drive credentials refused ({status})")),
- _ => Error::Backend(format!("drive credentials: HTTP {status} {kind}")),
- })
- }
-
- /// The cached keys, refreshed when they are within [`REFRESH_BEFORE`]
- /// of expiring.
- pub async fn current(&self) -> Result<Vended> {
- let mut c = self.cache.lock().await;
- if let Some(v) = c.as_ref()
- && let Ok(exp) = parse_rfc3339_ms(&v.expires_at)
- && exp > now_ms() + REFRESH_BEFORE.as_millis() as u64
- {
- return Ok(v.clone());
- }
- let v = self.vend().await?;
- *c = Some(v.clone());
- Ok(v)
- }
-}
-
-#[async_trait::async_trait]
-impl CredentialSource for CloudVendor {
- async fn credentials(&self) -> Result<S3Credentials> {
- self.current().await?.credentials()
- }
-}
-
/// Adapts a [`CredentialSource`] to the SDK's provider (whose identity
/// cache calls it again before an expiring key lapses).
#[derive(Clone)]
@@ -418,13 +228,6 @@ impl S3Backend {
})
}
- /// A backend on the Cua cloud's bucket, with keys vended for
- /// `vendor`'s session (the first vend learns where the bucket is).
- pub async fn cloud(vendor: Arc<CloudVendor>) -> Result<S3Backend> {
- let v = vendor.current().await?;
- S3Backend::new(v.config(), vendor)
- }
-
pub fn config(&self) -> &S3Config {
&self.config
}
@@ -1109,84 +912,15 @@ impl S3Backend {
}
}
-/// The Cua cloud's bucket, opened on first use: the first vend says where
-/// the bucket is, so a runtime can be built without network I/O.
-pub struct CloudBackend {
- vendor: Arc<CloudVendor>,
- inner: tokio::sync::OnceCell<S3Backend>,
-}
-
-impl CloudBackend {
- pub fn new(vendor: Arc<CloudVendor>) -> CloudBackend {
- CloudBackend {
- vendor,
- inner: tokio::sync::OnceCell::new(),
- }
- }
-
- async fn s3(&self) -> Result<&S3Backend> {
- self.inner
- .get_or_try_init(|| S3Backend::cloud(self.vendor.clone()))
- .await
- }
-}
-
-#[async_trait::async_trait]
-impl Backend for CloudBackend {
- fn kind(&self) -> &'static str {
- "cloud"
- }
- async fn put(&self, key: &str, bytes: Vec<u8>, cond: Condition) -> Result<ObjectMeta> {
- self.s3().await?.put(key, bytes, cond).await
- }
- async fn get(&self, key: &str, version: Option<&str>) -> Result<(Vec<u8>, ObjectMeta)> {
- self.s3().await?.get(key, version).await
- }
- async fn head(&self, key: &str) -> Result<Option<ObjectMeta>> {
- self.s3().await?.head(key).await
- }
- async fn list(&self, prefix: &str) -> Result<Vec<ObjectMeta>> {
- self.s3().await?.list(prefix).await
- }
- async fn delete(&self, key: &str, cond: Condition) -> Result<()> {
- self.s3().await?.delete(key, cond).await
- }
- async fn versions(&self, key: &str) -> Result<Vec<VersionInfo>> {
- self.s3().await?.versions(key).await
- }
-}
-
#[cfg(test)]
mod tests {
use super::*;
#[test]
- fn config_and_vended_shapes() {
+ fn config_shape() {
let c: S3Config = serde_json::from_str(r#"{"bucket":"b"}"#).unwrap();
assert_eq!(c.region, "us-east-1");
assert!(!c.path_style);
- let v: Vended = serde_json::from_str(
- r#"{"endpoint":"https://x.r2.example","region":"auto","bucket":"cua-volume",
- "root":"acct-1/","access_key_id":"AK","secret_access_key":"SECRETVALUE",
- "session_token":"TOKENVALUE","expires_at":"2026-09-29T12:00:00Z",
- "prefixes":[{"prefix":"public/","mode":"r"}]}"#,
- )
- .unwrap();
- assert_eq!(v.config().root, "acct-1/");
- let dbg = format!("{v:?} {:?}", v.credentials().unwrap());
- assert!(
- !dbg.contains("SECRETVALUE") && !dbg.contains("TOKENVALUE"),
- "{dbg}"
- );
- assert_eq!(
- parse_rfc3339_ms("2026-09-29T12:00:00Z").unwrap(),
- 1_790_683_200_000
- );
- assert_eq!(
- parse_rfc3339_ms("2026-09-29T12:00:00.500Z").unwrap(),
- 1_790_683_200_500
- );
- assert!(parse_rfc3339_ms("yesterday").is_err());
}
#[test]
@@ -1222,101 +956,4 @@ mod tests {
.is_err()
);
}
-
- struct Tok;
- #[async_trait::async_trait]
- impl TokenSource for Tok {
- async fn token(&self) -> Result<String> {
- Ok("bearer-x".into())
- }
- }
-
- /// A one-shot HTTP server answering every request with `status` and
- /// `body`, recording the requests it saw.
- async fn serve(status: u16, body: String) -> (String, Arc<std::sync::Mutex<Vec<String>>>) {
- use tokio::io::{AsyncReadExt, AsyncWriteExt};
- let l = tokio::net::TcpListener::bind("127.0.0.1:0").await.unwrap();
- let addr = l.local_addr().unwrap();
- let seen = Arc::new(std::sync::Mutex::new(vec![]));
- let seen2 = seen.clone();
- tokio::spawn(async move {
- for _ in 0..4 {
- let Ok((mut s, _)) = l.accept().await else {
- return;
- };
- let mut buf = vec![0u8; 16 * 1024];
- let n = s.read(&mut buf).await.unwrap_or(0);
- seen2
- .lock()
- .unwrap()
- .push(String::from_utf8_lossy(&buf[..n]).into_owned());
- let resp = format!(
- "HTTP/1.1 {status} X\r\ncontent-type: application/json\r\ncontent-length: {}\r\nconnection: close\r\n\r\n{body}",
- body.len()
- );
- let _ = s.write_all(resp.as_bytes()).await;
- }
- });
- (format!("http://{addr}"), seen)
- }
-
- #[tokio::test]
- async fn the_vendor_speaks_the_contract_and_caches() {
- let body = serde_json::json!({
- "endpoint":"https://x.example","region":"auto","bucket":"b","root":"acct/",
- "access_key_id":"AK","secret_access_key":"SK","session_token":"ST",
- "expires_at":"2999-01-01T00:00:00Z","prefixes":[{"prefix":"agents/ada/","mode":"rw"}]
- })
- .to_string();
- let (api, seen) = serve(200, body).await;
- let v = CloudVendor::new(
- &api,
- Arc::new(Tok),
- VendRequest {
- principal: "agent:ada".into(),
- space: Some("cloud:ada".into()),
- ttl_secs: 900,
- },
- )
- .unwrap();
- let c = v.credentials().await.unwrap();
- assert_eq!(c.session_token.as_deref(), Some("ST"));
- v.credentials().await.unwrap();
- let seen = seen.lock().unwrap();
- assert_eq!(seen.len(), 1, "cached until near expiry");
- assert!(
- seen[0].starts_with("POST /api/drive/credentials"),
- "{}",
- seen[0]
- );
- assert!(
- seen[0]
- .to_ascii_lowercase()
- .contains("authorization: bearer bearer-x")
- );
- assert!(
- seen[0].contains(r#""principal":"agent:ada""#),
- "{}",
- seen[0]
- );
- assert!(seen[0].contains(r#""ttl_secs":900"#));
- }
-
- #[tokio::test]
- async fn a_disabled_cloud_says_so() {
- let (api, _) = serve(404, r#"{"error":"drive_disabled"}"#.into()).await;
- let v = CloudVendor::new(
- &api,
- Arc::new(Tok),
- VendRequest {
- principal: "user".into(),
- space: None,
- ttl_secs: 900,
- },
- )
- .unwrap();
- let e = v.vend().await.unwrap_err();
- assert_eq!(e.tag(), "forbidden");
- assert!(e.to_string().contains("drive_disabled"), "{e}");
- }
}
diff --git a/libs/cua/crates/cua-volume/src/service.rs b/libs/cua/crates/cua-volume/src/service.rs
index c0d35066c1..c617322418 100644
--- a/libs/cua/crates/cua-volume/src/service.rs
+++ b/libs/cua/crates/cua-volume/src/service.rs
@@ -71,6 +71,7 @@ pub struct StorageInfo {
pub fs_path: String,
pub s3: Option<S3Settings>,
pub has_keys: bool,
+ /// Always false: the Cua cloud drive backend has ended.
pub cloud_available: bool,
}
@@ -332,11 +333,6 @@ impl DriveService {
let backend: Arc<dyn Backend>;
let mut check = StorageCheck::default();
match kind {
- BackendKind::Cloud => {
- return Err(Error::Invalid(
- "the Cua cloud drive is not available in this release; use fs or s3".into(),
- ));
- }
BackendKind::Fs => {
backend = Arc::new(crate::fs::FsBackend::new(
state_dir(&self.home).join("data"),
@@ -796,7 +792,7 @@ mod tests {
let info = svc.storage().unwrap();
assert_eq!(info.backend, "fs");
assert!(!info.cloud_available);
- // Cloud stays off.
+ // The cloud backend has ended.
let e = svc
.set_storage(StorageUpdate {
backend: "cloud".into(),
@@ -805,6 +801,7 @@ mod tests {
.await
.unwrap_err();
assert_eq!(e.tag(), "invalid_argument");
+ assert!(e.to_string().contains("has ended"), "{e}");
// S3 without keys says so before touching the network.
let e = svc
.set_storage(StorageUpdate {
diff --git a/libs/cua/kotlin/src/main/kotlin/ai/cua/sdk/cua_sdk.kt b/libs/cua/kotlin/src/main/kotlin/ai/cua/sdk/cua_sdk.kt
index 47859a286b..dc5c532deb 100644
--- a/libs/cua/kotlin/src/main/kotlin/ai/cua/sdk/cua_sdk.kt
+++ b/libs/cua/kotlin/src/main/kotlin/ai/cua/sdk/cua_sdk.kt
@@ -3084,7 +3084,7 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
if (lib.uniffi_cua_sdk_checksum_method_cua_auth() != 19106.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
- if (lib.uniffi_cua_sdk_checksum_method_cua_fleet() != 40955.toShort()) {
+ if (lib.uniffi_cua_sdk_checksum_method_cua_fleet() != 45933.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_cua_sdk_checksum_method_cua_info() != 11159.toShort()) {
@@ -3096,7 +3096,7 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
if (lib.uniffi_cua_sdk_checksum_method_cua_mode() != 63626.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
- if (lib.uniffi_cua_sdk_checksum_method_cua_sandboxes() != 8394.toShort()) {
+ if (lib.uniffi_cua_sdk_checksum_method_cua_sandboxes() != 892.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_cua_sdk_checksum_method_cua_shutdown_daemon() != 57559.toShort()) {
@@ -3105,7 +3105,7 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
if (lib.uniffi_cua_sdk_checksum_method_cua_spaces() != 35262.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
- if (lib.uniffi_cua_sdk_checksum_method_cua_spacesd() != 28670.toShort()) {
+ if (lib.uniffi_cua_sdk_checksum_method_cua_spacesd() != 62689.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_cua_sdk_checksum_method_fleet_acquire() != 16535.toShort()) {
@@ -3390,7 +3390,7 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
if (lib.uniffi_cua_sdk_checksum_method_portforward_local_addr() != 55098.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
- if (lib.uniffi_cua_sdk_checksum_method_portforward_url() != 43553.toShort()) {
+ if (lib.uniffi_cua_sdk_checksum_method_portforward_url() != 60604.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_cua_sdk_checksum_method_sandbox_overlay() != 32673.toShort()) {
@@ -3399,13 +3399,13 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
if (lib.uniffi_cua_sdk_checksum_method_sandbox_agents() != 53699.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
- if (lib.uniffi_cua_sdk_checksum_method_sandbox_delete() != 55409.toShort()) {
+ if (lib.uniffi_cua_sdk_checksum_method_sandbox_delete() != 17492.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
- if (lib.uniffi_cua_sdk_checksum_method_sandbox_detach() != 34045.toShort()) {
+ if (lib.uniffi_cua_sdk_checksum_method_sandbox_detach() != 26534.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
- if (lib.uniffi_cua_sdk_checksum_method_sandbox_forward() != 37775.toShort()) {
+ if (lib.uniffi_cua_sdk_checksum_method_sandbox_forward() != 19019.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_cua_sdk_checksum_method_sandbox_guest_display() != 23945.toShort()) {
@@ -3429,7 +3429,7 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
if (lib.uniffi_cua_sdk_checksum_method_sandbox_is_ephemeral() != 27021.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
- if (lib.uniffi_cua_sdk_checksum_method_sandbox_keep_alive() != 63020.toShort()) {
+ if (lib.uniffi_cua_sdk_checksum_method_sandbox_keep_alive() != 3593.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_cua_sdk_checksum_method_sandbox_kind() != 13493.toShort()) {
@@ -3444,7 +3444,7 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
if (lib.uniffi_cua_sdk_checksum_method_sandbox_mcp() != 8773.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
- if (lib.uniffi_cua_sdk_checksum_method_sandbox_mcp_config() != 43800.toShort()) {
+ if (lib.uniffi_cua_sdk_checksum_method_sandbox_mcp_config() != 64194.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_cua_sdk_checksum_method_sandbox_name() != 58395.toShort()) {
@@ -3453,7 +3453,7 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
if (lib.uniffi_cua_sdk_checksum_method_sandbox_open_media_bridge() != 27610.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
- if (lib.uniffi_cua_sdk_checksum_method_sandbox_public_url() != 36853.toShort()) {
+ if (lib.uniffi_cua_sdk_checksum_method_sandbox_public_url() != 6460.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_cua_sdk_checksum_method_sandbox_refresh() != 45835.toShort()) {
@@ -3498,10 +3498,10 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
if (lib.uniffi_cua_sdk_checksum_method_sandboxes_connect() != 12250.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
- if (lib.uniffi_cua_sdk_checksum_method_sandboxes_connect_url() != 55493.toShort()) {
+ if (lib.uniffi_cua_sdk_checksum_method_sandboxes_connect_url() != 19950.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
- if (lib.uniffi_cua_sdk_checksum_method_sandboxes_create() != 63062.toShort()) {
+ if (lib.uniffi_cua_sdk_checksum_method_sandboxes_create() != 52749.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_cua_sdk_checksum_method_sandboxes_delete() != 43939.toShort()) {
@@ -3510,7 +3510,7 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
if (lib.uniffi_cua_sdk_checksum_method_sandboxes_get() != 32181.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
- if (lib.uniffi_cua_sdk_checksum_method_sandboxes_list() != 18675.toShort()) {
+ if (lib.uniffi_cua_sdk_checksum_method_sandboxes_list() != 6497.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_cua_sdk_checksum_method_sandboxes_list_all() != 9098.toShort()) {
@@ -3531,10 +3531,10 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
if (lib.uniffi_cua_sdk_checksum_method_service_name() != 19159.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
- if (lib.uniffi_cua_sdk_checksum_method_service_public_url() != 16809.toShort()) {
+ if (lib.uniffi_cua_sdk_checksum_method_service_public_url() != 37714.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
- if (lib.uniffi_cua_sdk_checksum_method_service_request() != 12324.toShort()) {
+ if (lib.uniffi_cua_sdk_checksum_method_service_request() != 31558.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_cua_sdk_checksum_method_service_url() != 25888.toShort()) {
@@ -4113,7 +4113,7 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
if (lib.uniffi_cua_sdk_checksum_constructor_cua_connect() != 19646.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
- if (lib.uniffi_cua_sdk_checksum_constructor_cua_embedded() != 36838.toShort()) {
+ if (lib.uniffi_cua_sdk_checksum_constructor_cua_embedded() != 26623.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_cua_sdk_checksum_constructor_host_new() != 62533.toShort()) {
@@ -7239,8 +7239,8 @@ public object FfiConverterTypeAuth: FfiConverter<Auth, Long> {
/**
* The entry point of the SDK: create one with `Cua::embedded` or
- * `Cua::connect`, then reach sandboxes, Fleet, Spaces and the rest
- * through its accessors.
+ * `Cua::connect`, then reach sandboxes, Spaces and the rest through its
+ * accessors.
*/
public interface CuaInterface {
@@ -7257,9 +7257,8 @@ public interface CuaInterface {
fun `auth`(): Auth
/**
- * Fleet pools, templates, claims and images. Always talks to Fleet
- * from this process with this SDK's credentials (in daemon mode, from
- * the environment).
+ * Fleet pools, templates, claims and images. Cua Cloud has ended: this
+ * always fails with the "Cua Cloud has ended" error and never connects.
*/
fun `fleet`(): Fleet
@@ -7280,7 +7279,7 @@ public interface CuaInterface {
fun `mode`(): CuaMode
/**
- * Sandboxes (Fleet, local, direct).
+ * Sandboxes (local, direct, your own cloud).
*/
fun `sandboxes`(): Sandboxes
@@ -7295,8 +7294,8 @@ public interface CuaInterface {
fun `spaces`(): Spaces
/**
- * Connects to cua-spacesd at `url` (`host:port`, `http(s)://…`, a
- * Fleet service URL or a relay URL) without a sandbox.
+ * Connects to cua-spacesd at `url` (`host:port`, `http(s)://…` or a
+ * relay URL) without a sandbox.
*/
suspend fun `spacesd`(`url`: kotlin.String, `token`: kotlin.String?): SpacesdClient
@@ -7305,8 +7304,8 @@ public interface CuaInterface {
/**
* The entry point of the SDK: create one with `Cua::embedded` or
- * `Cua::connect`, then reach sandboxes, Fleet, Spaces and the rest
- * through its accessors.
+ * `Cua::connect`, then reach sandboxes, Spaces and the rest through its
+ * accessors.
*/
open class Cua: Disposable, AutoCloseable, CuaInterface
{
@@ -7440,9 +7439,8 @@ open class Cua: Disposable, AutoCloseable, CuaInterface
/**
- * Fleet pools, templates, claims and images. Always talks to Fleet
- * from this process with this SDK's credentials (in daemon mode, from
- * the environment).
+ * Fleet pools, templates, claims and images. Cua Cloud has ended: this
+ * always fails with the "Cua Cloud has ended" error and never connects.
*/
@Throws(CuaException::class)override fun `fleet`(): Fleet {
return FfiConverterTypeFleet.lift(
@@ -7516,7 +7514,7 @@ open class Cua: Disposable, AutoCloseable, CuaInterface
/**
- * Sandboxes (Fleet, local, direct).
+ * Sandboxes (local, direct, your own cloud).
*/override fun `sandboxes`(): Sandboxes {
return FfiConverterTypeSandboxes.lift(
callWithHandle {
@@ -7573,8 +7571,8 @@ open class Cua: Disposable, AutoCloseable, CuaInterface
/**
- * Connects to cua-spacesd at `url` (`host:port`, `http(s)://…`, a
- * Fleet service URL or a relay URL) without a sandbox.
+ * Connects to cua-spacesd at `url` (`host:port`, `http(s)://…` or a
+ * relay URL) without a sandbox.
*/
@Throws(CuaException::class)
@Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
@@ -7655,7 +7653,9 @@ open class Cua: Disposable, AutoCloseable, CuaInterface
/**
* Runs the SDK runtime in this process. Performs no I/O beyond
- * reading the credential store when `fleet_from_session` is set.
+ * reading the credential store when `fleet_from_session` is set (for
+ * the relay account). It never builds a Fleet client: Cua Cloud has
+ * ended.
*/
@Throws(CuaException::class) fun `embedded`(`config`: CuaConfig): Cua {
return FfiConverterTypeCua.lift(
@@ -8400,7 +8400,8 @@ public object FfiConverterTypeDevices: FfiConverter<Devices, Long> {
/**
- * Fleet control plane.
+ * Fleet control plane. Cua Cloud has ended: `Cua.fleet()` never returns
+ * one, so none of its methods can be called.
*/
public interface FleetInterface {
@@ -8575,7 +8576,8 @@ public interface FleetInterface {
}
/**
- * Fleet control plane.
+ * Fleet control plane. Cua Cloud has ended: `Cua.fleet()` never returns
+ * one, so none of its methods can be called.
*/
open class Fleet: Disposable, AutoCloseable, FleetInterface
{
@@ -12863,7 +12865,7 @@ public interface PortForwardInterface {
fun `localAddr`(): kotlin.String?
/**
- * URL to use (loopback URL, or the Fleet gateway URL).
+ * URL to use (a loopback URL).
*/
fun `url`(): kotlin.String?
@@ -13028,7 +13030,7 @@ open class PortForward: Disposable, AutoCloseable, PortForwardInterface
/**
- * URL to use (loopback URL, or the Fleet gateway URL).
+ * URL to use (a loopback URL).
*/override fun `url`(): kotlin.String? {
return FfiConverterOptionalString.lift(
callWithHandle {
@@ -14054,22 +14056,21 @@ public interface SandboxInterface {
suspend fun `agents`(): Agents
/**
- * Deletes (Fleet: releases the claim and an ephemeral pool).
+ * Deletes (local: removes it; direct: forgets it; your cloud: deletes
+ * the machine).
*/
suspend fun `delete`()
/**
- * Managed Fleet claims: stop renewing the claim and forget the handle;
- * the claim runs until its current shutdown time. Embedded runtime
- * only (a daemon holds its claims by design).
+ * Forgets the handle this runtime holds (a Cua Cloud claim used to
+ * stop renewing; Cua Cloud has ended). Embedded runtime only.
*/
fun `detach`()
/**
* Forwards a loopback port to guest `port`: a TCP forward locally (and
- * over cua-spacesd's tunnel when the image has it); in the cloud
- * without cua-spacesd, a loopback HTTP/WebSocket proxy through the
- * Fleet gateway. Either way `url()` is a loopback URL.
+ * over cua-spacesd's tunnel when the image has it). `url()` is a
+ * loopback URL.
*/
suspend fun `forward`(`port`: kotlin.UShort): PortForward
@@ -14120,7 +14121,7 @@ public interface SandboxInterface {
fun `isEphemeral`(): kotlin.Boolean
/**
- * Extends a Fleet lease by `seconds`.
+ * Extends the sandbox's lease by `seconds`, for a provider that has one.
*/
suspend fun `keepAlive`(`seconds`: kotlin.UInt)
@@ -14151,9 +14152,8 @@ public interface SandboxInterface {
/**
* Where the MCP server behind `service` is (URL of its endpoint at
* `path`, default `/mcp`, plus the headers every request needs), for
- * any MCP client. Embedded: the service route itself (loopback, or the
- * Fleet gateway with a fresh bearer and claim header). Daemon: the
- * daemon's streaming passthrough with its loopback bearer.
+ * any MCP client. Embedded: the service route itself (loopback).
+ * Daemon: the daemon's streaming passthrough with its loopback bearer.
*/
suspend fun `mcpConfig`(`service`: kotlin.String, `path`: kotlin.String? = null): McpConfig
@@ -14171,9 +14171,8 @@ public interface SandboxInterface {
/**
* A shareable URL for `service` that stops working after `ttl_seconds`
- * (60 s to 24 h, default 1 h). Cloud: a Fleet signed service URL.
- * Local: a loopback URL with its own token, served by the cua daemon
- * (started if needed; `CUA_BIN` names the CLI).
+ * (60 s to 24 h, default 1 h): a loopback URL with its own token, served
+ * by the cua daemon (started if needed; `CUA_BIN` names the CLI).
*/
suspend fun `publicUrl`(`service`: kotlin.String, `ttlSeconds`: kotlin.UInt? = null, `label`: kotlin.String? = null): PublicUrl
@@ -14403,7 +14402,8 @@ open class Sandbox: Disposable, AutoCloseable, SandboxInterface
/**
- * Deletes (Fleet: releases the claim and an ephemeral pool).
+ * Deletes (local: removes it; direct: forgets it; your cloud: deletes
+ * the machine).
*/
@Throws(CuaException::class)
@Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
@@ -14428,9 +14428,8 @@ open class Sandbox: Disposable, AutoCloseable, SandboxInterface
/**
- * Managed Fleet claims: stop renewing the claim and forget the handle;
- * the claim runs until its current shutdown time. Embedded runtime
- * only (a daemon holds its claims by design).
+ * Forgets the handle this runtime holds (a Cua Cloud claim used to
+ * stop renewing; Cua Cloud has ended). Embedded runtime only.
*/
@Throws(CuaException::class)override fun `detach`()
=
@@ -14447,9 +14446,8 @@ open class Sandbox: Disposable, AutoCloseable, SandboxInterface
/**
* Forwards a loopback port to guest `port`: a TCP forward locally (and
- * over cua-spacesd's tunnel when the image has it); in the cloud
- * without cua-spacesd, a loopback HTTP/WebSocket proxy through the
- * Fleet gateway. Either way `url()` is a loopback URL.
+ * over cua-spacesd's tunnel when the image has it). `url()` is a
+ * loopback URL.
*/
@Throws(CuaException::class)
@Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
@@ -14620,7 +14618,7 @@ open class Sandbox: Disposable, AutoCloseable, SandboxInterface
/**
- * Extends a Fleet lease by `seconds`.
+ * Extends the sandbox's lease by `seconds`, for a provider that has one.
*/
@Throws(CuaException::class)
@Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
@@ -14723,9 +14721,8 @@ open class Sandbox: Disposable, AutoCloseable, SandboxInterface
/**
* Where the MCP server behind `service` is (URL of its endpoint at
* `path`, default `/mcp`, plus the headers every request needs), for
- * any MCP client. Embedded: the service route itself (loopback, or the
- * Fleet gateway with a fresh bearer and claim header). Daemon: the
- * daemon's streaming passthrough with its loopback bearer.
+ * any MCP client. Embedded: the service route itself (loopback).
+ * Daemon: the daemon's streaming passthrough with its loopback bearer.
*/
@Throws(CuaException::class)
@Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
@@ -14792,9 +14789,8 @@ open class Sandbox: Disposable, AutoCloseable, SandboxInterface
/**
* A shareable URL for `service` that stops working after `ttl_seconds`
- * (60 s to 24 h, default 1 h). Cloud: a Fleet signed service URL.
- * Local: a loopback URL with its own token, served by the cua daemon
- * (started if needed; `CUA_BIN` names the CLI).
+ * (60 s to 24 h, default 1 h): a loopback URL with its own token, served
+ * by the cua daemon (started if needed; `CUA_BIN` names the CLI).
*/
@Throws(CuaException::class)
@Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
@@ -15244,14 +15240,14 @@ public interface SandboxesInterface {
/**
* Connects directly to a machine by URL (`http(s)://host:port`, bare
- * `host:port`, a Fleet service URL or a relay URL) with an optional
- * spacesd token. No daemon is assumed and nothing is probed.
+ * `host:port` or a relay URL) with an optional spacesd token. No daemon is assumed and nothing is probed.
*/
suspend fun `connectUrl`(`url`: kotlin.String, `token`: kotlin.String?, `name`: kotlin.String?): Sandbox
/**
- * Creates (Fleet, local) or connects (direct) a sandbox and waits for
- * the provider and every readiness probe.
+ * Creates (local, your cloud, a provider) or connects (direct) a sandbox
+ * and waits for the provider and every readiness probe. `on: "cloud"`
+ * fails with the "Cua Cloud has ended" error.
*/
suspend fun `create`(`options`: SandboxCreateOptions): Sandbox
@@ -15270,10 +15266,8 @@ public interface SandboxesInterface {
* all of them, local, direct and the account's live cloud sandboxes,
* whatever the default location is. `"local"`, `"cloud"` or
* `"direct"`: only those.
- * Cloud sandboxes never fail the listing: without Fleet credentials
- * they are left out silently, and when Fleet fails or takes longer than
- * 5 s they are left out with a warning (logged here;
- * [`Sandboxes::list_with_warnings`] returns it).
+ * Cua Cloud has ended: its sandboxes are never listed, and listing
+ * never asks Fleet.
*/
suspend fun `list`(`location`: kotlin.String?): List<SandboxInfo>
@@ -15449,8 +15443,7 @@ open class Sandboxes: Disposable, AutoCloseable, SandboxesInterface
/**
* Connects directly to a machine by URL (`http(s)://host:port`, bare
- * `host:port`, a Fleet service URL or a relay URL) with an optional
- * spacesd token. No daemon is assumed and nothing is probed.
+ * `host:port` or a relay URL) with an optional spacesd token. No daemon is assumed and nothing is probed.
*/
@Throws(CuaException::class)
@Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
@@ -15474,8 +15467,9 @@ open class Sandboxes: Disposable, AutoCloseable, SandboxesInterface
/**
- * Creates (Fleet, local) or connects (direct) a sandbox and waits for
- * the provider and every readiness probe.
+ * Creates (local, your cloud, a provider) or connects (direct) a sandbox
+ * and waits for the provider and every readiness probe. `on: "cloud"`
+ * fails with the "Cua Cloud has ended" error.
*/
@Throws(CuaException::class)
@Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
@@ -15552,10 +15546,8 @@ open class Sandboxes: Disposable, AutoCloseable, SandboxesInterface
* all of them, local, direct and the account's live cloud sandboxes,
* whatever the default location is. `"local"`, `"cloud"` or
* `"direct"`: only those.
- * Cloud sandboxes never fail the listing: without Fleet credentials
- * they are left out silently, and when Fleet fails or takes longer than
- * 5 s they are left out with a warning (logged here;
- * [`Sandboxes::list_with_warnings`] returns it).
+ * Cua Cloud has ended: its sandboxes are never listed, and listing
+ * never asks Fleet.
*/
@Throws(CuaException::class)
@Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
@@ -15791,17 +15783,15 @@ public interface ServiceInterface {
/**
* A shareable URL for this service that stops working after
* `ttl_seconds` (60 s to 24 h, default 1 h): the same as
- * `Sandbox.public_url(name, ...)`. Cloud: a Fleet signed service URL.
- * Local: a loopback URL with its own token, served by the cua daemon.
+ * `Sandbox.public_url(name, ...)`: a loopback URL with its own token,
+ * served by the cua daemon.
*/
suspend fun `publicUrl`(`ttlSeconds`: kotlin.UInt? = null, `label`: kotlin.String? = null): PublicUrl
/**
- * One HTTP request to `path` on the service. Credentials (Fleet bearer
- * and claim) are attached by the runtime. `headers` are sent as given
- * (for example `content-type`, or `accept` and `mcp-session-id` for
- * MCP over Fleet); `authorization` is refused on Fleet, where the
- * gateway bearer owns it.
+ * One HTTP request to `path` on the service. Credentials are attached by
+ * the runtime. `headers` are sent as given (for example `content-type`,
+ * or `accept` and `mcp-session-id` for MCP).
*/
suspend fun `request`(`method`: kotlin.String, `path`: kotlin.String, `body`: kotlin.ByteArray?, `timeoutMs`: kotlin.UInt?, `headers`: List<HttpHeader>? = null): HttpResponse
@@ -16009,8 +15999,8 @@ open class Service: Disposable, AutoCloseable, ServiceInterface
/**
* A shareable URL for this service that stops working after
* `ttl_seconds` (60 s to 24 h, default 1 h): the same as
- * `Sandbox.public_url(name, ...)`. Cloud: a Fleet signed service URL.
- * Local: a loopback URL with its own token, served by the cua daemon.
+ * `Sandbox.public_url(name, ...)`: a loopback URL with its own token,
+ * served by the cua daemon.
*/
@Throws(CuaException::class)
@Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
@@ -16034,11 +16024,9 @@ open class Service: Disposable, AutoCloseable, ServiceInterface
/**
- * One HTTP request to `path` on the service. Credentials (Fleet bearer
- * and claim) are attached by the runtime. `headers` are sent as given
- * (for example `content-type`, or `accept` and `mcp-session-id` for
- * MCP over Fleet); `authorization` is refused on Fleet, where the
- * gateway bearer owns it.
+ * One HTTP request to `path` on the service. Credentials are attached by
+ * the runtime. `headers` are sent as given (for example `content-type`,
+ * or `accept` and `mcp-session-id` for MCP).
*/
@Throws(CuaException::class)
@Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
@@ -19022,8 +19010,8 @@ public object FfiConverterTypeSpaceStreamSession: FfiConverter<SpaceStreamSessio
/**
- * The Spaces registry: add a machine by URL, claim a Fleet Space,
- * provision a local one, and get [`Space`] handles.
+ * The Spaces registry: add a machine by URL, provision a local one, and get
+ * [`Space`] handles.
*/
public interface SpacesInterface {
@@ -19417,8 +19405,8 @@ public interface SpacesInterface {
}
/**
- * The Spaces registry: add a machine by URL, claim a Fleet Space,
- * provision a local one, and get [`Space`] handles.
+ * The Spaces registry: add a machine by URL, provision a local one, and get
+ * [`Space`] handles.
*/
open class Spaces: Disposable, AutoCloseable, SpacesInterface
{
@@ -25601,8 +25589,7 @@ data class CloudOptions (
,
/**
* With `pool`: update the pool's template to the given fields instead
- * of failing on a mismatch (`Fleet.apply` semantics for the template;
- * the pool's capacity is kept). Managed pools refuse it.
+ * of failing on a mismatch. Cua Cloud has ended: ignored.
*/
var `apply`: kotlin.Boolean = false
@@ -26386,12 +26373,12 @@ data class CuaConfig (
var `stateDir`: kotlin.String? = null
,
/**
- * Fleet settings (merged over the environment).
+ * Ignored: Cua Cloud has ended.
*/
var `fleet`: FleetSettings? = null
,
/**
- * Read Fleet settings from the environment.
+ * Ignored: Cua Cloud has ended.
*/
var `fleetFromEnv`: kotlin.Boolean = true
,
@@ -26412,15 +26399,16 @@ data class CuaConfig (
var `teleportHome`: kotlin.String? = null
,
/**
- * When the settings and environment carry no Fleet credentials, use
- * the signed-in session (`Cua.auth()`, `cua auth login`) from the
- * shared credential store, refreshed as needed.
+ * Use the signed-in session (`Cua.auth()`, `cua auth login`) from the
+ * shared credential store, refreshed as needed, for the relay account
+ * the runtime lists the account's machines with ("My machines"). The
+ * name is historical: it no longer builds a Fleet client, because Cua
+ * Cloud has ended.
*/
var `fleetFromSession`: kotlin.Boolean = false
,
/**
- * Where managed Fleet pools keep their name cache and machine-wide GC
- * lock (default: `$CUA_HOME` or `~/.cua`, or next to `state_dir`).
+ * Ignored: Cua Cloud has ended, so there are no managed pools.
*/
var `fleetPoolHome`: kotlin.String? = null
@@ -29408,33 +29396,32 @@ public object FfiConverterTypeFleetSandbox: FfiConverterRustBuffer<FleetSandbox>
/**
- * Fleet credentials and endpoints. Unset fields fall back to the
- * environment (`CUA_FLEET_BASE_URL`, `CUA_TOKEN_URL`, `CUA_CLIENT_ID`,
- * `CUA_CLIENT_SECRET`, `FLEETS_TOKEN`) when `CuaConfig.fleet_from_env`.
+ * Fleet credentials and endpoints. Ignored: Cua Cloud has ended, so nothing
+ * reads them any more. Kept so existing callers still compile.
*/
data class FleetSettings (
/**
- * Fleet API base URL.
+ * Ignored.
*/
var `baseUrl`: kotlin.String? = null
,
/**
- * OAuth token URL.
+ * Ignored.
*/
var `tokenUrl`: kotlin.String? = null
,
/**
- * OAuth client id.
+ * Ignored.
*/
var `clientId`: kotlin.String? = null
,
/**
- * OAuth client secret.
+ * Ignored.
*/
var `clientSecret`: kotlin.String? = null
,
/**
- * Static Fleet token (wins over client credentials).
+ * Ignored.
*/
var `token`: kotlin.String? = null
@@ -29733,7 +29720,7 @@ public object FfiConverterTypeGpuOption: FfiConverterRustBuffer<GpuOption> {
*/
data class GpuSupport (
/**
- * `lume`, `qemu`, `container`, `gvisor`, `fleet`, a provider's name.
+ * `lume`, `qemu`, `container`, `gvisor`, a provider's name.
*/
var `runtime`: kotlin.String
,
@@ -30677,10 +30664,10 @@ public object FfiConverterTypeHttpResponse: FfiConverterRustBuffer<HttpResponse>
/**
- * Image layers built on top of a sandbox's image. Cloud: a remote build
- * (Fleet images API). Local: a build into the container engine (container
- * images only; VM images take no layers here). Both are cached by the same
- * content hash (`cua-b-<hash>`), so an identical spec never rebuilds.
+ * Image layers built on top of a sandbox's image. Local: a build into the
+ * container engine (container images only; VM images take no layers here),
+ * cached by a content hash (`cua-b-<hash>`), so an identical spec never
+ * rebuilds. (Cua Cloud's remote build has ended.)
*/
data class ImageBuild (
/**
@@ -31116,7 +31103,7 @@ public object FfiConverterTypeMcpConfig: FfiConverterRustBuffer<McpConfig> {
data class MediaBridge (
/**
* Loopback `ws://` URL carrying a short-lived bridge ticket. Speaks
- * rcdp wire v2 unchanged; no Fleet bearer or env token is exposed.
+ * rcdp wire v2 unchanged; no env token is exposed.
*/
var `wsUrl`: kotlin.String
,
@@ -33612,9 +33599,8 @@ data class SandboxCreateOptions (
var `token`: kotlin.String? = null
,
/**
- * Fleet: claim from this existing (user-owned) pool. Unset: a managed,
- * autoscaled pool keyed by image and shape. Local (with an empty
- * image): run this Fleet pool's template locally.
+ * Cua Cloud has ended: a pool fails with the "Cua Cloud has ended"
+ * error.
*/
var `pool`: kotlin.String? = null
,
@@ -33634,7 +33620,7 @@ data class SandboxCreateOptions (
var `memoryMb`: kotlin.ULong? = null
,
/**
- * Extra guest ports (local: published; Fleet: `port-<n>` services).
+ * Extra guest ports (local: published).
*/
var `ports`: List<kotlin.UShort> = listOf()
,
@@ -33654,14 +33640,14 @@ data class SandboxCreateOptions (
var `readyTimeoutMs`: kotlin.UInt? = null
,
/**
- * Guest environment (local: container environment or cloud-init;
- * cloud: the template environment with `processMode: Run`, on gVisor
- * and KubeVirt; values are not secrets).
+ * Guest environment (local: container environment or cloud-init; values
+ * are not secrets).
*/
var `env`: Map<kotlin.String, kotlin.String> = mapOf()
,
/**
- * Deprecated: initial replicas of a new managed pool (> 0 = warm).
+ * Deprecated, and Cua Cloud has ended: initial replicas of a new
+ * managed pool (> 0 = warm).
*/
var `fleetReplicas`: kotlin.UInt? = null
,
@@ -33877,8 +33863,9 @@ data class SandboxInfo (
var `runtime`: kotlin.String
,
/**
- * `runtime_type` as persisted (`fleet`, `direct`, `gvisor`, `qemu`,
- * ...); prefer `location`, `kind` and `runtime`.
+ * `runtime_type` as persisted (`direct`, `gvisor`, `qemu`, ...; `fleet`
+ * for a record of the Cua Cloud that has ended); prefer `location`,
+ * `kind` and `runtime`.
*/
var `runtimeType`: kotlin.String
,
@@ -33903,8 +33890,7 @@ data class SandboxInfo (
var `services`: Map<kotlin.String, kotlin.UShort>
,
/**
- * Service base URLs by name (Fleet: gateway URLs that need the Fleet
- * bearer).
+ * Service base URLs by name.
*/
var `endpoints`: Map<kotlin.String, kotlin.String>
,
@@ -35116,15 +35102,12 @@ data class SpaceCreateOptions (
var `name`: kotlin.String? = null
,
/**
- * vCPUs. Local default 2; cloud 1-64 (most accounts run 1-8; Fleet
- * decides), default the pool template's (4).
+ * vCPUs. Local default 2.
*/
var `cpus`: kotlin.UInt? = null
,
/**
- * Memory in MiB. Local default 4096; cloud 512 up to 524288 (most
- * accounts run 1024-32768; Fleet decides), default the pool
- * template's (4096).
+ * Memory in MiB. Local default 4096.
*/
var `memoryMb`: kotlin.ULong? = null
,
@@ -36555,8 +36538,8 @@ data class SpaceStreamTicket (
var `height`: kotlin.UInt
,
/**
- * Attaching needs [`Space::websocket_headers`] (Fleet gateway or the
- * daemon passthrough).
+ * Attaching needs [`Space::websocket_headers`] (a gateway or the daemon
+ * passthrough).
*/
var `needsHeaders`: kotlin.Boolean
@@ -37719,8 +37702,8 @@ data class SpacesdHttpRequest (
var `path`: kotlin.String
,
/**
- * Extra headers. Credentials (`authorization`, the env and Fleet claim
- * headers) are the client's and cannot be set here.
+ * Extra headers. Credentials (`authorization` and the env headers) are
+ * the client's and cannot be set here.
*/
var `headers`: List<SpacesdHttpHeader> = listOf()
,
@@ -38910,10 +38893,10 @@ sealed class CuaException(message: String): kotlin.Exception(message) {
class NotFound(message: String) : CuaException(message)
/**
- * The provider is not configured (for example no Fleet credentials).
+ * The provider is not configured (for example no credentials for it).
*
- * Fix: Set `FLEETS_TOKEN`, or `CUA_CLIENT_ID` and `CUA_CLIENT_SECRET`, or
- * run `cua auth login` and create the client with `fleet_from_session`.
+ * Fix: Set the credentials the message names (for a contrib provider, its
+ * environment variable or `cua auth provider set <name>`).
*/
class ProviderNotConfigured(message: String) : CuaException(message)
@@ -38942,21 +38925,20 @@ sealed class CuaException(message: String): kotlin.Exception(message) {
class Timeout(message: String) : CuaException(message)
/**
- * Fleet API failure.
+ * Fleet API failure. Cua Cloud has ended, so the SDK no longer raises
+ * this.
*
- * Fix: Read the status in the message. Retry a transient failure; check
- * the credentials and the account's capacity otherwise.
+ * Fix: Use a local sandbox or your own machine; see the Cua Cloud has
+ * ended guide.
*/
class Fleet(message: String) : CuaException(message)
/**
- * Fleet's admission refused the request: a sandbox or pool size over
- * this account's limits, or a template its policy does not admit. The
- * message is Fleet's own and names the limit.
+ * Fleet's admission refused the request. Cua Cloud has ended, so the SDK
+ * no longer raises this.
*
- * Fix: Pick a size within the limit the message names (most accounts
- * run 1-8 vCPUs and 1-32 GiB per sandbox), or contact Cua support to
- * raise the account's limits.
+ * Fix: Use a local sandbox or your own machine; see the Cua Cloud has
+ * ended guide.
*/
class FleetAdmissionDenied(message: String) : CuaException(message)
@@ -38998,8 +38980,7 @@ sealed class CuaException(message: String): kotlin.Exception(message) {
/**
* Missing or wrong token or ticket.
*
- * Fix: Pass the sandbox's env token, refresh the Fleet credentials, or run
- * `cua auth login` again.
+ * Fix: Pass the sandbox's env token, or run `cua auth login` again.
*/
class Unauthenticated(message: String) : CuaException(message)
@@ -39065,18 +39046,20 @@ sealed class CuaException(message: String): kotlin.Exception(message) {
/**
* A named cloud pool's template differs from the requested sandbox
- * fields; the message holds the diff (pass `apply` to update it).
+ * fields. Cua Cloud has ended, so the SDK no longer raises this.
*
- * Fix: Pass the pool's own fields, or pass `apply` to update its template.
+ * Fix: Use a local sandbox or your own machine; see the Cua Cloud has
+ * ended guide.
*/
class PoolSpecMismatch(message: String) : CuaException(message)
/**
* A claim bound but its per-claim secrets (the env token) never
- * reached the sandbox within the bounded wait; the claim was released.
+ * reached the sandbox. Cua Cloud has ended, so the SDK no longer raises
+ * this.
*
- * Fix: Retry. If it keeps failing, check the pool's claim-secrets setup
- * and the Fleet status.
+ * Fix: Use a local sandbox or your own machine; see the Cua Cloud has
+ * ended guide.
*/
class ClaimSecretsNotDelivered(message: String) : CuaException(message)
diff --git a/libs/cua/python/src/cua/_native.py b/libs/cua/python/src/cua/_native.py
index baa6848ec9..ec63ec2e2e 100644
--- a/libs/cua/python/src/cua/_native.py
+++ b/libs/cua/python/src/cua/_native.py
@@ -669,13 +669,13 @@ def _uniffi_check_api_checksums(lib):
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
if lib.uniffi_cua_sdk_checksum_constructor_cua_connect() != 19646:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
- if lib.uniffi_cua_sdk_checksum_constructor_cua_embedded() != 36838:
+ if lib.uniffi_cua_sdk_checksum_constructor_cua_embedded() != 26623:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
if lib.uniffi_cua_sdk_checksum_method_cua_agent_setup() != 50422:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
if lib.uniffi_cua_sdk_checksum_method_cua_auth() != 19106:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
- if lib.uniffi_cua_sdk_checksum_method_cua_fleet() != 40955:
+ if lib.uniffi_cua_sdk_checksum_method_cua_fleet() != 45933:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
if lib.uniffi_cua_sdk_checksum_method_cua_info() != 11159:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
@@ -683,13 +683,13 @@ def _uniffi_check_api_checksums(lib):
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
if lib.uniffi_cua_sdk_checksum_method_cua_mode() != 63626:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
- if lib.uniffi_cua_sdk_checksum_method_cua_sandboxes() != 8394:
+ if lib.uniffi_cua_sdk_checksum_method_cua_sandboxes() != 892:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
if lib.uniffi_cua_sdk_checksum_method_cua_shutdown_daemon() != 57559:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
if lib.uniffi_cua_sdk_checksum_method_cua_spaces() != 35262:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
- if lib.uniffi_cua_sdk_checksum_method_cua_spacesd() != 28670:
+ if lib.uniffi_cua_sdk_checksum_method_cua_spacesd() != 62689:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
if lib.uniffi_cua_sdk_checksum_method_devices_approve() != 49147:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
@@ -877,7 +877,7 @@ def _uniffi_check_api_checksums(lib):
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
if lib.uniffi_cua_sdk_checksum_method_portforward_local_addr() != 55098:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
- if lib.uniffi_cua_sdk_checksum_method_portforward_url() != 43553:
+ if lib.uniffi_cua_sdk_checksum_method_portforward_url() != 60604:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
if lib.uniffi_cua_sdk_checksum_constructor_presenceview_new() != 9981:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
@@ -913,11 +913,11 @@ def _uniffi_check_api_checksums(lib):
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
if lib.uniffi_cua_sdk_checksum_method_sandbox_agents() != 53699:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
- if lib.uniffi_cua_sdk_checksum_method_sandbox_delete() != 55409:
+ if lib.uniffi_cua_sdk_checksum_method_sandbox_delete() != 17492:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
- if lib.uniffi_cua_sdk_checksum_method_sandbox_detach() != 34045:
+ if lib.uniffi_cua_sdk_checksum_method_sandbox_detach() != 26534:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
- if lib.uniffi_cua_sdk_checksum_method_sandbox_forward() != 37775:
+ if lib.uniffi_cua_sdk_checksum_method_sandbox_forward() != 19019:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
if lib.uniffi_cua_sdk_checksum_method_sandbox_guest_display() != 23945:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
@@ -933,7 +933,7 @@ def _uniffi_check_api_checksums(lib):
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
if lib.uniffi_cua_sdk_checksum_method_sandbox_is_ephemeral() != 27021:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
- if lib.uniffi_cua_sdk_checksum_method_sandbox_keep_alive() != 63020:
+ if lib.uniffi_cua_sdk_checksum_method_sandbox_keep_alive() != 3593:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
if lib.uniffi_cua_sdk_checksum_method_sandbox_kind() != 13493:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
@@ -943,7 +943,7 @@ def _uniffi_check_api_checksums(lib):
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
if lib.uniffi_cua_sdk_checksum_method_sandbox_mcp() != 8773:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
- if lib.uniffi_cua_sdk_checksum_method_sandbox_mcp_config() != 43800:
+ if lib.uniffi_cua_sdk_checksum_method_sandbox_mcp_config() != 64194:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
if lib.uniffi_cua_sdk_checksum_method_sandbox_name() != 58395:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
@@ -951,7 +951,7 @@ def _uniffi_check_api_checksums(lib):
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
if lib.uniffi_cua_sdk_checksum_method_sandbox_overlay() != 32673:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
- if lib.uniffi_cua_sdk_checksum_method_sandbox_public_url() != 36853:
+ if lib.uniffi_cua_sdk_checksum_method_sandbox_public_url() != 6460:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
if lib.uniffi_cua_sdk_checksum_method_sandbox_refresh() != 45835:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
@@ -981,15 +981,15 @@ def _uniffi_check_api_checksums(lib):
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
if lib.uniffi_cua_sdk_checksum_method_sandboxes_connect() != 12250:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
- if lib.uniffi_cua_sdk_checksum_method_sandboxes_connect_url() != 55493:
+ if lib.uniffi_cua_sdk_checksum_method_sandboxes_connect_url() != 19950:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
- if lib.uniffi_cua_sdk_checksum_method_sandboxes_create() != 63062:
+ if lib.uniffi_cua_sdk_checksum_method_sandboxes_create() != 52749:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
if lib.uniffi_cua_sdk_checksum_method_sandboxes_delete() != 43939:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
if lib.uniffi_cua_sdk_checksum_method_sandboxes_get() != 32181:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
- if lib.uniffi_cua_sdk_checksum_method_sandboxes_list() != 18675:
+ if lib.uniffi_cua_sdk_checksum_method_sandboxes_list() != 6497:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
if lib.uniffi_cua_sdk_checksum_method_sandboxes_list_all() != 9098:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
@@ -1003,9 +1003,9 @@ def _uniffi_check_api_checksums(lib):
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
if lib.uniffi_cua_sdk_checksum_method_service_name() != 19159:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
- if lib.uniffi_cua_sdk_checksum_method_service_public_url() != 16809:
+ if lib.uniffi_cua_sdk_checksum_method_service_public_url() != 37714:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
- if lib.uniffi_cua_sdk_checksum_method_service_request() != 12324:
+ if lib.uniffi_cua_sdk_checksum_method_service_request() != 31558:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
if lib.uniffi_cua_sdk_checksum_method_service_url() != 25888:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
@@ -9101,9 +9101,8 @@ class _UniffiFfiConverterTypeContainer(_UniffiConverterRustBuffer):
@dataclass
class FleetSettings:
"""
- Fleet credentials and endpoints. Unset fields fall back to the
- environment (`CUA_FLEET_BASE_URL`, `CUA_TOKEN_URL`, `CUA_CLIENT_ID`,
- `CUA_CLIENT_SECRET`, `FLEETS_TOKEN`) when `CuaConfig.fleet_from_env`.
+ Fleet credentials and endpoints. Ignored: Cua Cloud has ended, so nothing
+ reads them any more. Kept so existing callers still compile.
"""
def __init__(self, *, base_url:typing.Optional[str] = _DEFAULT, token_url:typing.Optional[str] = _DEFAULT, client_id:typing.Optional[str] = _DEFAULT, client_secret:typing.Optional[str] = _DEFAULT, token:typing.Optional[str] = _DEFAULT):
if base_url is _DEFAULT:
@@ -14923,10 +14922,10 @@ class _UniffiFfiConverterSequenceTypeBuildFile(_UniffiConverterRustBuffer):
@dataclass
class ImageBuild:
"""
- Image layers built on top of a sandbox's image. Cloud: a remote build
- (Fleet images API). Local: a build into the container engine (container
- images only; VM images take no layers here). Both are cached by the same
- content hash (`cua-b-<hash>`), so an identical spec never rebuilds.
+ Image layers built on top of a sandbox's image. Local: a build into the
+ container engine (container images only; VM images take no layers here),
+ cached by a content hash (`cua-b-<hash>`), so an identical spec never
+ rebuilds. (Cua Cloud's remote build has ended.)
"""
def __init__(self, *, layers:typing.List[ImageLayer] = _DEFAULT, env:dict[str, str] = _DEFAULT, ports:typing.List[int] = _DEFAULT, files:typing.List[BuildFile] = _DEFAULT, timeout_ms:typing.Optional[int] = _DEFAULT):
if layers is _DEFAULT:
@@ -21909,10 +21908,10 @@ class CuaError: # type: ignore
_UniffiTempCuaError.NotFound = NotFound # type: ignore
class ProviderNotConfigured(_UniffiTempCuaError):
"""
- The provider is not configured (for example no Fleet credentials).
+ The provider is not configured (for example no credentials for it).
- Fix: Set `FLEETS_TOKEN`, or `CUA_CLIENT_ID` and `CUA_CLIENT_SECRET`, or
- run `cua auth login` and create the client with `fleet_from_session`.
+ Fix: Set the credentials the message names (for a contrib provider, its
+ environment variable or `cua auth provider set <name>`).
"""
def __repr__(self):
return "CuaError.ProviderNotConfigured({})".format(repr(str(self)))
@@ -21949,23 +21948,22 @@ class CuaError: # type: ignore
_UniffiTempCuaError.Timeout = Timeout # type: ignore
class Fleet(_UniffiTempCuaError):
"""
- Fleet API failure.
+ Fleet API failure. Cua Cloud has ended, so the SDK no longer raises
+ this.
- Fix: Read the status in the message. Retry a transient failure; check
- the credentials and the account's capacity otherwise.
+ Fix: Use a local sandbox or your own machine; see the Cua Cloud has
+ ended guide.
"""
def __repr__(self):
return "CuaError.Fleet({})".format(repr(str(self)))
_UniffiTempCuaError.Fleet = Fleet # type: ignore
class FleetAdmissionDenied(_UniffiTempCuaError):
"""
- Fleet's admission refused the request: a sandbox or pool size over
- this account's limits, or a template its policy does not admit. The
- message is Fleet's own and names the limit.
+ Fleet's admission refused the request. Cua Cloud has ended, so the SDK
+ no longer raises this.
- Fix: Pick a size within the limit the message names (most accounts
- run 1-8 vCPUs and 1-32 GiB per sandbox), or contact Cua support to
- raise the account's limits.
+ Fix: Use a local sandbox or your own machine; see the Cua Cloud has
+ ended guide.
"""
def __repr__(self):
return "CuaError.FleetAdmissionDenied({})".format(repr(str(self)))
@@ -22017,8 +22015,7 @@ class CuaError: # type: ignore
"""
Missing or wrong token or ticket.
- Fix: Pass the sandbox's env token, refresh the Fleet credentials, or run
- `cua auth login` again.
+ Fix: Pass the sandbox's env token, or run `cua auth login` again.
"""
def __repr__(self):
return "CuaError.Unauthenticated({})".format(repr(str(self)))
@@ -22100,9 +22097,10 @@ class CuaError: # type: ignore
class PoolSpecMismatch(_UniffiTempCuaError):
"""
A named cloud pool's template differs from the requested sandbox
- fields; the message holds the diff (pass `apply` to update it).
+ fields. Cua Cloud has ended, so the SDK no longer raises this.
- Fix: Pass the pool's own fields, or pass `apply` to update its template.
+ Fix: Use a local sandbox or your own machine; see the Cua Cloud has
+ ended guide.
"""
def __repr__(self):
return "CuaError.PoolSpecMismatch({})".format(repr(str(self)))
@@ -22110,10 +22108,11 @@ class CuaError: # type: ignore
class ClaimSecretsNotDelivered(_UniffiTempCuaError):
"""
A claim bound but its per-claim secrets (the env token) never
- reached the sandbox within the bounded wait; the claim was released.
+ reached the sandbox. Cua Cloud has ended, so the SDK no longer raises
+ this.
- Fix: Retry. If it keeps failing, check the pool's claim-secrets setup
- and the Fleet status.
+ Fix: Use a local sandbox or your own machine; see the Cua Cloud has
+ ended guide.
"""
def __repr__(self):
return "CuaError.ClaimSecretsNotDelivered({})".format(repr(str(self)))
@@ -25195,7 +25194,8 @@ class _UniffiFfiConverterOptionalTypeFleetUsagePricing(_UniffiConverterRustBuffe
class FleetProtocol(typing.Protocol):
"""
- Fleet control plane.
+ Fleet control plane. Cua Cloud has ended: `Cua.fleet()` never returns
+ one, so none of its methods can be called.
"""
async def acquire(self, pool: str,name: typing.Optional[str],ttl_seconds: typing.Optional[int]) -> FleetSandbox:
@@ -25368,7 +25368,8 @@ class FleetProtocol(typing.Protocol):
class Fleet(FleetProtocol):
"""
- Fleet control plane.
+ Fleet control plane. Cua Cloud has ended: `Cua.fleet()` never returns
+ one, so none of its methods can be called.
"""
_handle: ctypes.c_uint64
@@ -26381,7 +26382,7 @@ class PortForwardProtocol(typing.Protocol):
raise NotImplementedError
def url(self, ) -> typing.Optional[str]:
"""
- URL to use (loopback URL, or the Fleet gateway URL).
+ URL to use (a loopback URL).
"""
raise NotImplementedError
@@ -26468,7 +26469,7 @@ class PortForward(PortForwardProtocol):
return _uniffi_lift_return(_uniffi_ffi_result)
def url(self, ) -> typing.Optional[str]:
"""
- URL to use (loopback URL, or the Fleet gateway URL).
+ URL to use (a loopback URL).
"""
_uniffi_lowered_args = (
self._uniffi_clone_handle(),
@@ -27102,17 +27103,15 @@ class ServiceProtocol(typing.Protocol):
"""
A shareable URL for this service that stops working after
`ttl_seconds` (60 s to 24 h, default 1 h): the same as
- `Sandbox.public_url(name, ...)`. Cloud: a Fleet signed service URL.
- Local: a loopback URL with its own token, served by the cua daemon.
+ `Sandbox.public_url(name, ...)`: a loopback URL with its own token,
+ served by the cua daemon.
"""
raise NotImplementedError
async def request(self, method: str,path: str,body: typing.Optional[bytes],timeout_ms: typing.Optional[int],headers: typing.Union[object, typing.Optional[typing.List[HttpHeader]]] = _DEFAULT) -> HttpResponse:
"""
- One HTTP request to `path` on the service. Credentials (Fleet bearer
- and claim) are attached by the runtime. `headers` are sent as given
- (for example `content-type`, or `accept` and `mcp-session-id` for
- MCP over Fleet); `authorization` is refused on Fleet, where the
- gateway bearer owns it.
+ One HTTP request to `path` on the service. Credentials are attached by
+ the runtime. `headers` are sent as given (for example `content-type`,
+ or `accept` and `mcp-session-id` for MCP).
"""
raise NotImplementedError
async def url(self, ) -> str:
@@ -27240,8 +27239,8 @@ class Service(ServiceProtocol):
"""
A shareable URL for this service that stops working after
`ttl_seconds` (60 s to 24 h, default 1 h): the same as
- `Sandbox.public_url(name, ...)`. Cloud: a Fleet signed service URL.
- Local: a loopback URL with its own token, served by the cua daemon.
+ `Sandbox.public_url(name, ...)`: a loopback URL with its own token,
+ served by the cua daemon.
"""
if ttl_seconds is _DEFAULT:
@@ -27268,11 +27267,9 @@ class Service(ServiceProtocol):
)
async def request(self, method: str,path: str,body: typing.Optional[bytes],timeout_ms: typing.Optional[int],headers: typing.Union[object, typing.Optional[typing.List[HttpHeader]]] = _DEFAULT) -> HttpResponse:
"""
- One HTTP request to `path` on the service. Credentials (Fleet bearer
- and claim) are attached by the runtime. `headers` are sent as given
- (for example `content-type`, or `accept` and `mcp-session-id` for
- MCP over Fleet); `authorization` is refused on Fleet, where the
- gateway bearer owns it.
+ One HTTP request to `path` on the service. Credentials are attached by
+ the runtime. `headers` are sent as given (for example `content-type`,
+ or `accept` and `mcp-session-id` for MCP).
"""
_UniffiFfiConverterString.check_lower(method)
@@ -29477,22 +29474,21 @@ class SandboxProtocol(typing.Protocol):
raise NotImplementedError
async def delete(self, ) -> None:
"""
- Deletes (Fleet: releases the claim and an ephemeral pool).
+ Deletes (local: removes it; direct: forgets it; your cloud: deletes
+ the machine).
"""
raise NotImplementedError
def detach(self, ) -> None:
"""
- Managed Fleet claims: stop renewing the claim and forget the handle;
- the claim runs until its current shutdown time. Embedded runtime
- only (a daemon holds its claims by design).
+ Forgets the handle this runtime holds (a Cua Cloud claim used to
+ stop renewing; Cua Cloud has ended). Embedded runtime only.
"""
raise NotImplementedError
async def forward(self, port: int) -> PortForward:
"""
Forwards a loopback port to guest `port`: a TCP forward locally (and
- over cua-spacesd's tunnel when the image has it); in the cloud
- without cua-spacesd, a loopback HTTP/WebSocket proxy through the
- Fleet gateway. Either way `url()` is a loopback URL.
+ over cua-spacesd's tunnel when the image has it). `url()` is a
+ loopback URL.
"""
raise NotImplementedError
async def guest_display(self, ) -> GuestDisplay:
@@ -29543,7 +29539,7 @@ class SandboxProtocol(typing.Protocol):
raise NotImplementedError
async def keep_alive(self, seconds: int) -> None:
"""
- Extends a Fleet lease by `seconds`.
+ Extends the sandbox's lease by `seconds`, for a provider that has one.
"""
raise NotImplementedError
def kind(self, ) -> str:
@@ -29574,9 +29570,8 @@ class SandboxProtocol(typing.Protocol):
"""
Where the MCP server behind `service` is (URL of its endpoint at
`path`, default `/mcp`, plus the headers every request needs), for
- any MCP client. Embedded: the service route itself (loopback, or the
- Fleet gateway with a fresh bearer and claim header). Daemon: the
- daemon's streaming passthrough with its loopback bearer.
+ any MCP client. Embedded: the service route itself (loopback).
+ Daemon: the daemon's streaming passthrough with its loopback bearer.
"""
raise NotImplementedError
def name(self, ) -> str:
@@ -29604,9 +29599,8 @@ class SandboxProtocol(typing.Protocol):
async def public_url(self, service: str,ttl_seconds: typing.Union[object, typing.Optional[int]] = _DEFAULT,label: typing.Union[object, typing.Optional[str]] = _DEFAULT) -> PublicUrl:
"""
A shareable URL for `service` that stops working after `ttl_seconds`
- (60 s to 24 h, default 1 h). Cloud: a Fleet signed service URL.
- Local: a loopback URL with its own token, served by the cua daemon
- (started if needed; `CUA_BIN` names the CLI).
+ (60 s to 24 h, default 1 h): a loopback URL with its own token, served
+ by the cua daemon (started if needed; `CUA_BIN` names the CLI).
"""
raise NotImplementedError
async def refresh(self, ) -> SandboxInfo:
@@ -29732,7 +29726,8 @@ class Sandbox(SandboxProtocol):
)
async def delete(self, ) -> None:
"""
- Deletes (Fleet: releases the claim and an ephemeral pool).
+ Deletes (local: removes it; direct: forgets it; your cloud: deletes
+ the machine).
"""
_uniffi_lowered_args = (
self._uniffi_clone_handle(),
@@ -29749,9 +29744,8 @@ class Sandbox(SandboxProtocol):
)
def detach(self, ) -> None:
"""
- Managed Fleet claims: stop renewing the claim and forget the handle;
- the claim runs until its current shutdown time. Embedded runtime
- only (a daemon holds its claims by design).
+ Forgets the handle this runtime holds (a Cua Cloud claim used to
+ stop renewing; Cua Cloud has ended). Embedded runtime only.
"""
_uniffi_lowered_args = (
self._uniffi_clone_handle(),
@@ -29767,9 +29761,8 @@ class Sandbox(SandboxProtocol):
async def forward(self, port: int) -> PortForward:
"""
Forwards a loopback port to guest `port`: a TCP forward locally (and
- over cua-spacesd's tunnel when the image has it); in the cloud
- without cua-spacesd, a loopback HTTP/WebSocket proxy through the
- Fleet gateway. Either way `url()` is a loopback URL.
+ over cua-spacesd's tunnel when the image has it). `url()` is a
+ loopback URL.
"""
_UniffiFfiConverterUInt16.check_lower(port)
@@ -29919,7 +29912,7 @@ class Sandbox(SandboxProtocol):
return _uniffi_lift_return(_uniffi_ffi_result)
async def keep_alive(self, seconds: int) -> None:
"""
- Extends a Fleet lease by `seconds`.
+ Extends the sandbox's lease by `seconds`, for a provider that has one.
"""
_UniffiFfiConverterUInt32.check_lower(seconds)
@@ -30015,9 +30008,8 @@ class Sandbox(SandboxProtocol):
"""
Where the MCP server behind `service` is (URL of its endpoint at
`path`, default `/mcp`, plus the headers every request needs), for
- any MCP client. Embedded: the service route itself (loopback, or the
- Fleet gateway with a fresh bearer and claim header). Daemon: the
- daemon's streaming passthrough with its loopback bearer.
+ any MCP client. Embedded: the service route itself (loopback).
+ Daemon: the daemon's streaming passthrough with its loopback bearer.
"""
_UniffiFfiConverterString.check_lower(service)
@@ -30110,9 +30102,8 @@ class Sandbox(SandboxProtocol):
async def public_url(self, service: str,ttl_seconds: typing.Union[object, typing.Optional[int]] = _DEFAULT,label: typing.Union[object, typing.Optional[str]] = _DEFAULT) -> PublicUrl:
"""
A shareable URL for `service` that stops working after `ttl_seconds`
- (60 s to 24 h, default 1 h). Cloud: a Fleet signed service URL.
- Local: a loopback URL with its own token, served by the cua daemon
- (started if needed; `CUA_BIN` names the CLI).
+ (60 s to 24 h, default 1 h): a loopback URL with its own token, served
+ by the cua daemon (started if needed; `CUA_BIN` names the CLI).
"""
_UniffiFfiConverterString.check_lower(service)
@@ -30420,14 +30411,14 @@ class SandboxesProtocol(typing.Protocol):
async def connect_url(self, url: str,token: typing.Optional[str],name: typing.Optional[str]) -> Sandbox:
"""
Connects directly to a machine by URL (`http(s)://host:port`, bare
- `host:port`, a Fleet service URL or a relay URL) with an optional
- spacesd token. No daemon is assumed and nothing is probed.
+ `host:port` or a relay URL) with an optional spacesd token. No daemon is assumed and nothing is probed.
"""
raise NotImplementedError
async def create(self, options: SandboxCreateOptions) -> Sandbox:
"""
- Creates (Fleet, local) or connects (direct) a sandbox and waits for
- the provider and every readiness probe.
+ Creates (local, your cloud, a provider) or connects (direct) a sandbox
+ and waits for the provider and every readiness probe. `on: "cloud"`
+ fails with the "Cua Cloud has ended" error.
"""
raise NotImplementedError
async def delete(self, name: str) -> None:
@@ -30446,10 +30437,8 @@ class SandboxesProtocol(typing.Protocol):
all of them, local, direct and the account's live cloud sandboxes,
whatever the default location is. `"local"`, `"cloud"` or
`"direct"`: only those.
- Cloud sandboxes never fail the listing: without Fleet credentials
- they are left out silently, and when Fleet fails or takes longer than
- 5 s they are left out with a warning (logged here;
- [`Sandboxes::list_with_warnings`] returns it).
+ Cua Cloud has ended: its sandboxes are never listed, and listing
+ never asks Fleet.
"""
raise NotImplementedError
async def list_all(self, ) -> typing.List[SandboxInfo]:
@@ -30549,8 +30538,7 @@ class Sandboxes(SandboxesProtocol):
async def connect_url(self, url: str,token: typing.Optional[str],name: typing.Optional[str]) -> Sandbox:
"""
Connects directly to a machine by URL (`http(s)://host:port`, bare
- `host:port`, a Fleet service URL or a relay URL) with an optional
- spacesd token. No daemon is assumed and nothing is probed.
+ `host:port` or a relay URL) with an optional spacesd token. No daemon is assumed and nothing is probed.
"""
_UniffiFfiConverterString.check_lower(url)
@@ -30576,8 +30564,9 @@ class Sandboxes(SandboxesProtocol):
)
async def create(self, options: SandboxCreateOptions) -> Sandbox:
"""
- Creates (Fleet, local) or connects (direct) a sandbox and waits for
- the provider and every readiness probe.
+ Creates (local, your cloud, a provider) or connects (direct) a sandbox
+ and waits for the provider and every readiness probe. `on: "cloud"`
+ fails with the "Cua Cloud has ended" error.
"""
_UniffiFfiConverterTypeSandboxCreateOptions.check_lower(options)
@@ -30641,10 +30630,8 @@ class Sandboxes(SandboxesProtocol):
all of them, local, direct and the account's live cloud sandboxes,
whatever the default location is. `"local"`, `"cloud"` or
`"direct"`: only those.
- Cloud sandboxes never fail the listing: without Fleet credentials
- they are left out silently, and when Fleet fails or takes longer than
- 5 s they are left out with a warning (logged here;
- [`Sandboxes::list_with_warnings`] returns it).
+ Cua Cloud has ended: its sandboxes are never listed, and listing
+ never asks Fleet.
"""
_UniffiFfiConverterOptionalString.check_lower(location)
@@ -33832,8 +33819,8 @@ class _UniffiFfiConverterSequenceTypeDriveAccessRequest(_UniffiConverterRustBuff
class SpacesProtocol(typing.Protocol):
"""
- The Spaces registry: add a machine by URL, claim a Fleet Space,
- provision a local one, and get [`Space`] handles.
+ The Spaces registry: add a machine by URL, provision a local one, and get
+ [`Space`] handles.
"""
async def add(self, url: str,token: typing.Optional[str],name: typing.Optional[str]) -> SpaceInfo:
@@ -34225,8 +34212,8 @@ class SpacesProtocol(typing.Protocol):
class Spaces(SpacesProtocol):
"""
- The Spaces registry: add a machine by URL, claim a Fleet Space,
- provision a local one, and get [`Space`] handles.
+ The Spaces registry: add a machine by URL, provision a local one, and get
+ [`Space`] handles.
"""
_handle: ctypes.c_uint64
@@ -35779,8 +35766,8 @@ class _UniffiFfiConverterTypeSpaces:
class CuaProtocol(typing.Protocol):
"""
The entry point of the SDK: create one with `Cua::embedded` or
- `Cua::connect`, then reach sandboxes, Fleet, Spaces and the rest
- through its accessors.
+ `Cua::connect`, then reach sandboxes, Spaces and the rest through its
+ accessors.
"""
def agent_setup(self, ) -> AgentSetup:
@@ -35797,9 +35784,8 @@ class CuaProtocol(typing.Protocol):
raise NotImplementedError
def fleet(self, ) -> Fleet:
"""
- Fleet pools, templates, claims and images. Always talks to Fleet
- from this process with this SDK's credentials (in daemon mode, from
- the environment).
+ Fleet pools, templates, claims and images. Cua Cloud has ended: this
+ always fails with the "Cua Cloud has ended" error and never connects.
"""
raise NotImplementedError
async def info(self, ) -> CuaInfo:
@@ -35820,7 +35806,7 @@ class CuaProtocol(typing.Protocol):
raise NotImplementedError
def sandboxes(self, ) -> Sandboxes:
"""
- Sandboxes (Fleet, local, direct).
+ Sandboxes (local, direct, your own cloud).
"""
raise NotImplementedError
async def shutdown_daemon(self, ) -> None:
@@ -35835,16 +35821,16 @@ class CuaProtocol(typing.Protocol):
raise NotImplementedError
async def spacesd(self, url: str,token: typing.Optional[str]) -> SpacesdClient:
"""
- Connects to cua-spacesd at `url` (`host:port`, `http(s)://…`, a
- Fleet service URL or a relay URL) without a sandbox.
+ Connects to cua-spacesd at `url` (`host:port`, `http(s)://…` or a
+ relay URL) without a sandbox.
"""
raise NotImplementedError
class Cua(CuaProtocol):
"""
The entry point of the SDK: create one with `Cua::embedded` or
- `Cua::connect`, then reach sandboxes, Fleet, Spaces and the rest
- through its accessors.
+ `Cua::connect`, then reach sandboxes, Spaces and the rest through its
+ accessors.
"""
_handle: ctypes.c_uint64
@@ -35910,7 +35896,9 @@ class Cua(CuaProtocol):
def embedded(cls, config: CuaConfig) -> Cua:
"""
Runs the SDK runtime in this process. Performs no I/O beyond
- reading the credential store when `fleet_from_session` is set.
+ reading the credential store when `fleet_from_session` is set (for
+ the relay account). It never builds a Fleet client: Cua Cloud has
+ ended.
"""
_UniffiFfiConverterTypeCuaConfig.check_lower(config)
@@ -35987,9 +35975,8 @@ class Cua(CuaProtocol):
return _uniffi_lift_return(_uniffi_ffi_result)
def fleet(self, ) -> Fleet:
"""
- Fleet pools, templates, claims and images. Always talks to Fleet
- from this process with this SDK's credentials (in daemon mode, from
- the environment).
+ Fleet pools, templates, claims and images. Cua Cloud has ended: this
+ always fails with the "Cua Cloud has ended" error and never connects.
"""
_uniffi_lowered_args = (
self._uniffi_clone_handle(),
@@ -36052,7 +36039,7 @@ class Cua(CuaProtocol):
return _uniffi_lift_return(_uniffi_ffi_result)
def sandboxes(self, ) -> Sandboxes:
"""
- Sandboxes (Fleet, local, direct).
+ Sandboxes (local, direct, your own cloud).
"""
_uniffi_lowered_args = (
self._uniffi_clone_handle(),
@@ -36099,8 +36086,8 @@ class Cua(CuaProtocol):
return _uniffi_lift_return(_uniffi_ffi_result)
async def spacesd(self, url: str,token: typing.Optional[str]) -> SpacesdClient:
"""
- Connects to cua-spacesd at `url` (`host:port`, `http(s)://…`, a
- Fleet service URL or a relay URL) without a sandbox.
+ Connects to cua-spacesd at `url` (`host:port`, `http(s)://…` or a
+ relay URL) without a sandbox.
"""
_UniffiFfiConverterString.check_lower(url)
diff --git a/libs/cua/swift/Sources/CuaSDK/CuaSDK.swift b/libs/cua/swift/Sources/CuaSDK/CuaSDK.swift
index b252c95afa..9183ed82b8 100644
--- a/libs/cua/swift/Sources/CuaSDK/CuaSDK.swift
+++ b/libs/cua/swift/Sources/CuaSDK/CuaSDK.swift
@@ -2218,8 +2218,8 @@ public func FfiConverterTypeAuth_lower(_ value: Auth) -> UInt64 {
/**
* The entry point of the SDK: create one with `Cua::embedded` or
- * `Cua::connect`, then reach sandboxes, Fleet, Spaces and the rest
- * through its accessors.
+ * `Cua::connect`, then reach sandboxes, Spaces and the rest through its
+ * accessors.
*/
public protocol CuaProtocol: AnyObject, Sendable {
@@ -2236,9 +2236,8 @@ public protocol CuaProtocol: AnyObject, Sendable {
func auth() -> Auth
/**
- * Fleet pools, templates, claims and images. Always talks to Fleet
- * from this process with this SDK's credentials (in daemon mode, from
- * the environment).
+ * Fleet pools, templates, claims and images. Cua Cloud has ended: this
+ * always fails with the "Cua Cloud has ended" error and never connects.
*/
func fleet() throws -> Fleet
@@ -2259,7 +2258,7 @@ public protocol CuaProtocol: AnyObject, Sendable {
func mode() -> CuaMode
/**
- * Sandboxes (Fleet, local, direct).
+ * Sandboxes (local, direct, your own cloud).
*/
func sandboxes() -> Sandboxes
@@ -2274,16 +2273,16 @@ public protocol CuaProtocol: AnyObject, Sendable {
func spaces() -> Spaces
/**
- * Connects to cua-spacesd at `url` (`host:port`, `http(s)://…`, a
- * Fleet service URL or a relay URL) without a sandbox.
+ * Connects to cua-spacesd at `url` (`host:port`, `http(s)://…` or a
+ * relay URL) without a sandbox.
*/
func spacesd(url: String, token: String?) async throws -> SpacesdClient
}
/**
* The entry point of the SDK: create one with `Cua::embedded` or
- * `Cua::connect`, then reach sandboxes, Fleet, Spaces and the rest
- * through its accessors.
+ * `Cua::connect`, then reach sandboxes, Spaces and the rest through its
+ * accessors.
*/
open class Cua: CuaProtocol, @unchecked Sendable {
fileprivate let handle: UInt64
@@ -2380,7 +2379,9 @@ public static func connect(address: String?, token: String?)throws -> Cua {
/**
* Runs the SDK runtime in this process. Performs no I/O beyond
- * reading the credential store when `fleet_from_session` is set.
+ * reading the credential store when `fleet_from_session` is set (for
+ * the relay account). It never builds a Fleet client: Cua Cloud has
+ * ended.
*/
public static func embedded(config: CuaConfig)throws -> Cua {
return try FfiConverterTypeCua_lift(try rustCallWithError(FfiConverterTypeCuaError_lift) {
@@ -2417,9 +2418,8 @@ open func auth() -> Auth {
}
/**
- * Fleet pools, templates, claims and images. Always talks to Fleet
- * from this process with this SDK's credentials (in daemon mode, from
- * the environment).
+ * Fleet pools, templates, claims and images. Cua Cloud has ended: this
+ * always fails with the "Cua Cloud has ended" error and never connects.
*/
open func fleet()throws -> Fleet {
return try FfiConverterTypeFleet_lift(try rustCallWithError(FfiConverterTypeCuaError_lift) {
@@ -2473,7 +2473,7 @@ open func mode() -> CuaMode {
}
/**
- * Sandboxes (Fleet, local, direct).
+ * Sandboxes (local, direct, your own cloud).
*/
open func sandboxes() -> Sandboxes {
return try! FfiConverterTypeSandboxes_lift(try! rustCall() {
@@ -2515,8 +2515,8 @@ open func spaces() -> Spaces {
}
/**
- * Connects to cua-spacesd at `url` (`host:port`, `http(s)://…`, a
- * Fleet service URL or a relay URL) without a sandbox.
+ * Connects to cua-spacesd at `url` (`host:port`, `http(s)://…` or a
+ * relay URL) without a sandbox.
*/
open func spacesd(url: String, token: String?)async throws -> SpacesdClient {
return
@@ -3013,7 +3013,8 @@ public func FfiConverterTypeDevices_lower(_ value: Devices) -> UInt64 {
/**
- * Fleet control plane.
+ * Fleet control plane. Cua Cloud has ended: `Cua.fleet()` never returns
+ * one, so none of its methods can be called.
*/
public protocol FleetProtocol: AnyObject, Sendable {
@@ -3186,7 +3187,8 @@ public protocol FleetProtocol: AnyObject, Sendable {
}
/**
- * Fleet control plane.
+ * Fleet control plane. Cua Cloud has ended: `Cua.fleet()` never returns
+ * one, so none of its methods can be called.
*/
open class Fleet: FleetProtocol, @unchecked Sendable {
fileprivate let handle: UInt64
@@ -6004,7 +6006,7 @@ public protocol PortForwardProtocol: AnyObject, Sendable {
func localAddr() -> String?
/**
- * URL to use (loopback URL, or the Fleet gateway URL).
+ * URL to use (a loopback URL).
*/
func url() -> String?
@@ -6108,7 +6110,7 @@ open func localAddr() -> String? {
}
/**
- * URL to use (loopback URL, or the Fleet gateway URL).
+ * URL to use (a loopback URL).
*/
open func url() -> String? {
return try! FfiConverterOptionString.lift(try! rustCall() {
@@ -6734,22 +6736,21 @@ public protocol SandboxProtocol: AnyObject, Sendable {
func agents() async throws -> Agents
/**
- * Deletes (Fleet: releases the claim and an ephemeral pool).
+ * Deletes (local: removes it; direct: forgets it; your cloud: deletes
+ * the machine).
*/
func delete() async throws
/**
- * Managed Fleet claims: stop renewing the claim and forget the handle;
- * the claim runs until its current shutdown time. Embedded runtime
- * only (a daemon holds its claims by design).
+ * Forgets the handle this runtime holds (a Cua Cloud claim used to
+ * stop renewing; Cua Cloud has ended). Embedded runtime only.
*/
func detach() throws
/**
* Forwards a loopback port to guest `port`: a TCP forward locally (and
- * over cua-spacesd's tunnel when the image has it); in the cloud
- * without cua-spacesd, a loopback HTTP/WebSocket proxy through the
- * Fleet gateway. Either way `url()` is a loopback URL.
+ * over cua-spacesd's tunnel when the image has it). `url()` is a
+ * loopback URL.
*/
func forward(port: UInt16) async throws -> PortForward
@@ -6800,7 +6801,7 @@ public protocol SandboxProtocol: AnyObject, Sendable {
func isEphemeral() -> Bool
/**
- * Extends a Fleet lease by `seconds`.
+ * Extends the sandbox's lease by `seconds`, for a provider that has one.
*/
func keepAlive(seconds: UInt32) async throws
@@ -6831,9 +6832,8 @@ public protocol SandboxProtocol: AnyObject, Sendable {
/**
* Where the MCP server behind `service` is (URL of its endpoint at
* `path`, default `/mcp`, plus the headers every request needs), for
- * any MCP client. Embedded: the service route itself (loopback, or the
- * Fleet gateway with a fresh bearer and claim header). Daemon: the
- * daemon's streaming passthrough with its loopback bearer.
+ * any MCP client. Embedded: the service route itself (loopback).
+ * Daemon: the daemon's streaming passthrough with its loopback bearer.
*/
func mcpConfig(service: String, path: String?) async throws -> McpConfig
@@ -6851,9 +6851,8 @@ public protocol SandboxProtocol: AnyObject, Sendable {
/**
* A shareable URL for `service` that stops working after `ttl_seconds`
- * (60 s to 24 h, default 1 h). Cloud: a Fleet signed service URL.
- * Local: a loopback URL with its own token, served by the cua daemon
- * (started if needed; `CUA_BIN` names the CLI).
+ * (60 s to 24 h, default 1 h): a loopback URL with its own token, served
+ * by the cua daemon (started if needed; `CUA_BIN` names the CLI).
*/
func publicUrl(service: String, ttlSeconds: UInt32?, label: String?) async throws -> PublicUrl
@@ -7029,7 +7028,8 @@ open func agents()async throws -> Agents {
}
/**
- * Deletes (Fleet: releases the claim and an ephemeral pool).
+ * Deletes (local: removes it; direct: forgets it; your cloud: deletes
+ * the machine).
*/
open func delete()async throws {
return
@@ -7049,9 +7049,8 @@ open func delete()async throws {
}
/**
- * Managed Fleet claims: stop renewing the claim and forget the handle;
- * the claim runs until its current shutdown time. Embedded runtime
- * only (a daemon holds its claims by design).
+ * Forgets the handle this runtime holds (a Cua Cloud claim used to
+ * stop renewing; Cua Cloud has ended). Embedded runtime only.
*/
open func detach()throws {try rustCallWithError(FfiConverterTypeCuaError_lift) {
uniffi_cua_sdk_fn_method_sandbox_detach(
@@ -7062,9 +7061,8 @@ open func detach()throws {try rustCallWithError(FfiConverterTypeCuaError_lift)
/**
* Forwards a loopback port to guest `port`: a TCP forward locally (and
- * over cua-spacesd's tunnel when the image has it); in the cloud
- * without cua-spacesd, a loopback HTTP/WebSocket proxy through the
- * Fleet gateway. Either way `url()` is a loopback URL.
+ * over cua-spacesd's tunnel when the image has it). `url()` is a
+ * loopback URL.
*/
open func forward(port: UInt16)async throws -> PortForward {
return
@@ -7199,7 +7197,7 @@ open func isEphemeral() -> Bool {
}
/**
- * Extends a Fleet lease by `seconds`.
+ * Extends the sandbox's lease by `seconds`, for a provider that has one.
*/
open func keepAlive(seconds: UInt32)async throws {
return
@@ -7278,9 +7276,8 @@ open func mcp(service: String, path: String? = nil)async throws -> McpClient {
/**
* Where the MCP server behind `service` is (URL of its endpoint at
* `path`, default `/mcp`, plus the headers every request needs), for
- * any MCP client. Embedded: the service route itself (loopback, or the
- * Fleet gateway with a fresh bearer and claim header). Daemon: the
- * daemon's streaming passthrough with its loopback bearer.
+ * any MCP client. Embedded: the service route itself (loopback).
+ * Daemon: the daemon's streaming passthrough with its loopback bearer.
*/
open func mcpConfig(service: String, path: String? = nil)async throws -> McpConfig {
return
@@ -7334,9 +7331,8 @@ open func openMediaBridge(openMediaJson: String?)async throws -> MediaBridge {
/**
* A shareable URL for `service` that stops working after `ttl_seconds`
- * (60 s to 24 h, default 1 h). Cloud: a Fleet signed service URL.
- * Local: a loopback URL with its own token, served by the cua daemon
- * (started if needed; `CUA_BIN` names the CLI).
+ * (60 s to 24 h, default 1 h): a loopback URL with its own token, served
+ * by the cua daemon (started if needed; `CUA_BIN` names the CLI).
*/
open func publicUrl(service: String, ttlSeconds: UInt32? = nil, label: String? = nil)async throws -> PublicUrl {
return
@@ -7642,14 +7638,14 @@ public protocol SandboxesProtocol: AnyObject, Sendable {
/**
* Connects directly to a machine by URL (`http(s)://host:port`, bare
- * `host:port`, a Fleet service URL or a relay URL) with an optional
- * spacesd token. No daemon is assumed and nothing is probed.
+ * `host:port` or a relay URL) with an optional spacesd token. No daemon is assumed and nothing is probed.
*/
func connectUrl(url: String, token: String?, name: String?) async throws -> Sandbox
/**
- * Creates (Fleet, local) or connects (direct) a sandbox and waits for
- * the provider and every readiness probe.
+ * Creates (local, your cloud, a provider) or connects (direct) a sandbox
+ * and waits for the provider and every readiness probe. `on: "cloud"`
+ * fails with the "Cua Cloud has ended" error.
*/
func create(options: SandboxCreateOptions) async throws -> Sandbox
@@ -7668,10 +7664,8 @@ public protocol SandboxesProtocol: AnyObject, Sendable {
* all of them, local, direct and the account's live cloud sandboxes,
* whatever the default location is. `"local"`, `"cloud"` or
* `"direct"`: only those.
- * Cloud sandboxes never fail the listing: without Fleet credentials
- * they are left out silently, and when Fleet fails or takes longer than
- * 5 s they are left out with a warning (logged here;
- * [`Sandboxes::list_with_warnings`] returns it).
+ * Cua Cloud has ended: its sandboxes are never listed, and listing
+ * never asks Fleet.
*/
func list(location: String?) async throws -> [SandboxInfo]
@@ -7793,8 +7787,7 @@ open func connect(name: String)async throws -> Sandbox {
/**
* Connects directly to a machine by URL (`http(s)://host:port`, bare
- * `host:port`, a Fleet service URL or a relay URL) with an optional
- * spacesd token. No daemon is assumed and nothing is probed.
+ * `host:port` or a relay URL) with an optional spacesd token. No daemon is assumed and nothing is probed.
*/
open func connectUrl(url: String, token: String?, name: String?)async throws -> Sandbox {
return
@@ -7814,8 +7807,9 @@ open func connectUrl(url: String, token: String?, name: String?)async throws ->
}
/**
- * Creates (Fleet, local) or connects (direct) a sandbox and waits for
- * the provider and every readiness probe.
+ * Creates (local, your cloud, a provider) or connects (direct) a sandbox
+ * and waits for the provider and every readiness probe. `on: "cloud"`
+ * fails with the "Cua Cloud has ended" error.
*/
open func create(options: SandboxCreateOptions)async throws -> Sandbox {
return
@@ -7879,10 +7873,8 @@ open func get(name: String)async throws -> SandboxInfo {
* all of them, local, direct and the account's live cloud sandboxes,
* whatever the default location is. `"local"`, `"cloud"` or
* `"direct"`: only those.
- * Cloud sandboxes never fail the listing: without Fleet credentials
- * they are left out silently, and when Fleet fails or takes longer than
- * 5 s they are left out with a warning (logged here;
- * [`Sandboxes::list_with_warnings`] returns it).
+ * Cua Cloud has ended: its sandboxes are never listed, and listing
+ * never asks Fleet.
*/
open func list(location: String?)async throws -> [SandboxInfo] {
return
@@ -8023,17 +8015,15 @@ public protocol ServiceProtocol: AnyObject, Sendable {
/**
* A shareable URL for this service that stops working after
* `ttl_seconds` (60 s to 24 h, default 1 h): the same as
- * `Sandbox.public_url(name, ...)`. Cloud: a Fleet signed service URL.
- * Local: a loopback URL with its own token, served by the cua daemon.
+ * `Sandbox.public_url(name, ...)`: a loopback URL with its own token,
+ * served by the cua daemon.
*/
func publicUrl(ttlSeconds: UInt32?, label: String?) async throws -> PublicUrl
/**
- * One HTTP request to `path` on the service. Credentials (Fleet bearer
- * and claim) are attached by the runtime. `headers` are sent as given
- * (for example `content-type`, or `accept` and `mcp-session-id` for
- * MCP over Fleet); `authorization` is refused on Fleet, where the
- * gateway bearer owns it.
+ * One HTTP request to `path` on the service. Credentials are attached by
+ * the runtime. `headers` are sent as given (for example `content-type`,
+ * or `accept` and `mcp-session-id` for MCP).
*/
func request(method: String, path: String, body: Data?, timeoutMs: UInt32?, headers: [HttpHeader]?) async throws -> HttpResponse
@@ -8178,8 +8168,8 @@ open func name() -> String {
/**
* A shareable URL for this service that stops working after
* `ttl_seconds` (60 s to 24 h, default 1 h): the same as
- * `Sandbox.public_url(name, ...)`. Cloud: a Fleet signed service URL.
- * Local: a loopback URL with its own token, served by the cua daemon.
+ * `Sandbox.public_url(name, ...)`: a loopback URL with its own token,
+ * served by the cua daemon.
*/
open func publicUrl(ttlSeconds: UInt32? = nil, label: String? = nil)async throws -> PublicUrl {
return
@@ -8199,11 +8189,9 @@ open func publicUrl(ttlSeconds: UInt32? = nil, label: String? = nil)async throws
}
/**
- * One HTTP request to `path` on the service. Credentials (Fleet bearer
- * and claim) are attached by the runtime. `headers` are sent as given
- * (for example `content-type`, or `accept` and `mcp-session-id` for
- * MCP over Fleet); `authorization` is refused on Fleet, where the
- * gateway bearer owns it.
+ * One HTTP request to `path` on the service. Credentials are attached by
+ * the runtime. `headers` are sent as given (for example `content-type`,
+ * or `accept` and `mcp-session-id` for MCP).
*/
open func request(method: String, path: String, body: Data?, timeoutMs: UInt32?, headers: [HttpHeader]? = nil)async throws -> HttpResponse {
return
@@ -10334,8 +10322,8 @@ public func FfiConverterTypeSpaceStreamSession_lower(_ value: SpaceStreamSession
/**
- * The Spaces registry: add a machine by URL, claim a Fleet Space,
- * provision a local one, and get [`Space`] handles.
+ * The Spaces registry: add a machine by URL, provision a local one, and get
+ * [`Space`] handles.
*/
public protocol SpacesProtocol: AnyObject, Sendable {
@@ -10727,8 +10715,8 @@ public protocol SpacesProtocol: AnyObject, Sendable {
}
/**
- * The Spaces registry: add a machine by URL, claim a Fleet Space,
- * provision a local one, and get [`Space`] handles.
+ * The Spaces registry: add a machine by URL, provision a local one, and get
+ * [`Space`] handles.
*/
open class Spaces: SpacesProtocol, @unchecked Sendable {
fileprivate let handle: UInt64
@@ -16667,8 +16655,7 @@ public struct CloudOptions: Equatable, Hashable {
public var pool: String?
/**
* With `pool`: update the pool's template to the given fields instead
- * of failing on a mismatch (`Fleet.apply` semantics for the template;
- * the pool's capacity is kept). Managed pools refuse it.
+ * of failing on a mismatch. Cua Cloud has ended: ignored.
*/
public var apply: Bool
@@ -16693,8 +16680,7 @@ public struct CloudOptions: Equatable, Hashable {
*/pool: String? = nil,
/**
* With `pool`: update the pool's template to the given fields instead
- * of failing on a mismatch (`Fleet.apply` semantics for the template;
- * the pool's capacity is kept). Managed pools refuse it.
+ * of failing on a mismatch. Cua Cloud has ended: ignored.
*/apply: Bool = false) {
self.warm = warm
self.maxPoolSize = maxPoolSize
@@ -17712,11 +17698,11 @@ public struct CuaConfig: Equatable, Hashable {
*/
public var stateDir: String?
/**
- * Fleet settings (merged over the environment).
+ * Ignored: Cua Cloud has ended.
*/
public var fleet: FleetSettings?
/**
- * Read Fleet settings from the environment.
+ * Ignored: Cua Cloud has ended.
*/
public var fleetFromEnv: Bool
/**
@@ -17733,14 +17719,15 @@ public struct CuaConfig: Equatable, Hashable {
*/
public var teleportHome: String?
/**
- * When the settings and environment carry no Fleet credentials, use
- * the signed-in session (`Cua.auth()`, `cua auth login`) from the
- * shared credential store, refreshed as needed.
+ * Use the signed-in session (`Cua.auth()`, `cua auth login`) from the
+ * shared credential store, refreshed as needed, for the relay account
+ * the runtime lists the account's machines with ("My machines"). The
+ * name is historical: it no longer builds a Fleet client, because Cua
+ * Cloud has ended.
*/
public var fleetFromSession: Bool
/**
- * Where managed Fleet pools keep their name cache and machine-wide GC
- * lock (default: `$CUA_HOME` or `~/.cua`, or next to `state_dir`).
+ * Ignored: Cua Cloud has ended, so there are no managed pools.
*/
public var fleetPoolHome: String?
@@ -17751,10 +17738,10 @@ public struct CuaConfig: Equatable, Hashable {
* State directory for sandbox state files (default `~/.cua/sandboxes`).
*/stateDir: String? = nil,
/**
- * Fleet settings (merged over the environment).
+ * Ignored: Cua Cloud has ended.
*/fleet: FleetSettings? = nil,
/**
- * Read Fleet settings from the environment.
+ * Ignored: Cua Cloud has ended.
*/fleetFromEnv: Bool = true,
/**
* spacesd probe timeout (default 15 s).
@@ -17767,13 +17754,14 @@ public struct CuaConfig: Equatable, Hashable {
* side effects (tests, CI). Default: the real host.
*/teleportHome: String? = nil,
/**
- * When the settings and environment carry no Fleet credentials, use
- * the signed-in session (`Cua.auth()`, `cua auth login`) from the
- * shared credential store, refreshed as needed.
+ * Use the signed-in session (`Cua.auth()`, `cua auth login`) from the
+ * shared credential store, refreshed as needed, for the relay account
+ * the runtime lists the account's machines with ("My machines"). The
+ * name is historical: it no longer builds a Fleet client, because Cua
+ * Cloud has ended.
*/fleetFromSession: Bool = false,
/**
- * Where managed Fleet pools keep their name cache and machine-wide GC
- * lock (default: `$CUA_HOME` or `~/.cua`, or next to `state_dir`).
+ * Ignored: Cua Cloud has ended, so there are no managed pools.
*/fleetPoolHome: String? = nil) {
self.stateDir = stateDir
self.fleet = fleet
@@ -21721,29 +21709,28 @@ public func FfiConverterTypeFleetSandbox_lower(_ value: FleetSandbox) -> RustBuf
/**
- * Fleet credentials and endpoints. Unset fields fall back to the
- * environment (`CUA_FLEET_BASE_URL`, `CUA_TOKEN_URL`, `CUA_CLIENT_ID`,
- * `CUA_CLIENT_SECRET`, `FLEETS_TOKEN`) when `CuaConfig.fleet_from_env`.
+ * Fleet credentials and endpoints. Ignored: Cua Cloud has ended, so nothing
+ * reads them any more. Kept so existing callers still compile.
*/
public struct FleetSettings: Equatable, Hashable {
/**
- * Fleet API base URL.
+ * Ignored.
*/
public var baseUrl: String?
/**
- * OAuth token URL.
+ * Ignored.
*/
public var tokenUrl: String?
/**
- * OAuth client id.
+ * Ignored.
*/
public var clientId: String?
/**
- * OAuth client secret.
+ * Ignored.
*/
public var clientSecret: String?
/**
- * Static Fleet token (wins over client credentials).
+ * Ignored.
*/
public var token: String?
@@ -21751,19 +21738,19 @@ public struct FleetSettings: Equatable, Hashable {
// declare one manually.
public init(
/**
- * Fleet API base URL.
+ * Ignored.
*/baseUrl: String? = nil,
/**
- * OAuth token URL.
+ * Ignored.
*/tokenUrl: String? = nil,
/**
- * OAuth client id.
+ * Ignored.
*/clientId: String? = nil,
/**
- * OAuth client secret.
+ * Ignored.
*/clientSecret: String? = nil,
/**
- * Static Fleet token (wins over client credentials).
+ * Ignored.
*/token: String? = nil) {
self.baseUrl = baseUrl
self.tokenUrl = tokenUrl
@@ -22176,7 +22163,7 @@ public func FfiConverterTypeGpuOption_lower(_ value: GpuOption) -> RustBuffer {
*/
public struct GpuSupport: Equatable, Hashable {
/**
- * `lume`, `qemu`, `container`, `gvisor`, `fleet`, a provider's name.
+ * `lume`, `qemu`, `container`, `gvisor`, a provider's name.
*/
public var runtime: String
/**
@@ -22192,7 +22179,7 @@ public struct GpuSupport: Equatable, Hashable {
// declare one manually.
public init(
/**
- * `lume`, `qemu`, `container`, `gvisor`, `fleet`, a provider's name.
+ * `lume`, `qemu`, `container`, `gvisor`, a provider's name.
*/runtime: String,
/**
* Its options.
@@ -23462,10 +23449,10 @@ public func FfiConverterTypeHttpResponse_lower(_ value: HttpResponse) -> RustBuf
/**
- * Image layers built on top of a sandbox's image. Cloud: a remote build
- * (Fleet images API). Local: a build into the container engine (container
- * images only; VM images take no layers here). Both are cached by the same
- * content hash (`cua-b-<hash>`), so an identical spec never rebuilds.
+ * Image layers built on top of a sandbox's image. Local: a build into the
+ * container engine (container images only; VM images take no layers here),
+ * cached by a content hash (`cua-b-<hash>`), so an identical spec never
+ * rebuilds. (Cua Cloud's remote build has ended.)
*/
public struct ImageBuild: Equatable, Hashable {
/**
@@ -24071,7 +24058,7 @@ public func FfiConverterTypeMcpConfig_lower(_ value: McpConfig) -> RustBuffer {
public struct MediaBridge: Equatable, Hashable {
/**
* Loopback `ws://` URL carrying a short-lived bridge ticket. Speaks
- * rcdp wire v2 unchanged; no Fleet bearer or env token is exposed.
+ * rcdp wire v2 unchanged; no env token is exposed.
*/
public var wsUrl: String
/**
@@ -24090,7 +24077,7 @@ public struct MediaBridge: Equatable, Hashable {
public init(
/**
* Loopback `ws://` URL carrying a short-lived bridge ticket. Speaks
- * rcdp wire v2 unchanged; no Fleet bearer or env token is exposed.
+ * rcdp wire v2 unchanged; no env token is exposed.
*/wsUrl: String,
/**
* The bridge ticket (also accepted as subprotocol
@@ -27451,9 +27438,8 @@ public struct SandboxCreateOptions: Equatable, Hashable {
*/
public var token: String?
/**
- * Fleet: claim from this existing (user-owned) pool. Unset: a managed,
- * autoscaled pool keyed by image and shape. Local (with an empty
- * image): run this Fleet pool's template locally.
+ * Cua Cloud has ended: a pool fails with the "Cua Cloud has ended"
+ * error.
*/
public var pool: String?
/**
@@ -27469,7 +27455,7 @@ public struct SandboxCreateOptions: Equatable, Hashable {
*/
public var memoryMb: UInt64?
/**
- * Extra guest ports (local: published; Fleet: `port-<n>` services).
+ * Extra guest ports (local: published).
*/
public var ports: [UInt16]
/**
@@ -27485,13 +27471,13 @@ public struct SandboxCreateOptions: Equatable, Hashable {
*/
public var readyTimeoutMs: UInt32?
/**
- * Guest environment (local: container environment or cloud-init;
- * cloud: the template environment with `processMode: Run`, on gVisor
- * and KubeVirt; values are not secrets).
+ * Guest environment (local: container environment or cloud-init; values
+ * are not secrets).
*/
public var env: [String: String]
/**
- * Deprecated: initial replicas of a new managed pool (> 0 = warm).
+ * Deprecated, and Cua Cloud has ended: initial replicas of a new
+ * managed pool (> 0 = warm).
*/
public var fleetReplicas: UInt32?
/**
@@ -27599,9 +27585,8 @@ public struct SandboxCreateOptions: Equatable, Hashable {
* spacesd token.
*/token: String? = nil,
/**
- * Fleet: claim from this existing (user-owned) pool. Unset: a managed,
- * autoscaled pool keyed by image and shape. Local (with an empty
- * image): run this Fleet pool's template locally.
+ * Cua Cloud has ended: a pool fails with the "Cua Cloud has ended"
+ * error.
*/pool: String? = nil,
/**
* Guest OS (`linux`, `macos`, `windows`).
@@ -27613,7 +27598,7 @@ public struct SandboxCreateOptions: Equatable, Hashable {
* Memory (MiB).
*/memoryMb: UInt64? = nil,
/**
- * Extra guest ports (local: published; Fleet: `port-<n>` services).
+ * Extra guest ports (local: published).
*/ports: [UInt16] = [],
/**
* Named services (name → guest port). `env` defaults to 3211.
@@ -27625,12 +27610,12 @@ public struct SandboxCreateOptions: Equatable, Hashable {
* Readiness budget (default 10 min).
*/readyTimeoutMs: UInt32? = nil,
/**
- * Guest environment (local: container environment or cloud-init;
- * cloud: the template environment with `processMode: Run`, on gVisor
- * and KubeVirt; values are not secrets).
+ * Guest environment (local: container environment or cloud-init; values
+ * are not secrets).
*/env: [String: String] = [:],
/**
- * Deprecated: initial replicas of a new managed pool (> 0 = warm).
+ * Deprecated, and Cua Cloud has ended: initial replicas of a new
+ * managed pool (> 0 = warm).
*/fleetReplicas: UInt32? = nil,
/**
* Deprecated: use `cloud.claim_ttl_seconds`.
@@ -27831,8 +27816,9 @@ public struct SandboxInfo: Equatable, Hashable {
*/
public var runtime: String
/**
- * `runtime_type` as persisted (`fleet`, `direct`, `gvisor`, `qemu`,
- * ...); prefer `location`, `kind` and `runtime`.
+ * `runtime_type` as persisted (`direct`, `gvisor`, `qemu`, ...; `fleet`
+ * for a record of the Cua Cloud that has ended); prefer `location`,
+ * `kind` and `runtime`.
*/
public var runtimeType: String
/**
@@ -27852,8 +27838,7 @@ public struct SandboxInfo: Equatable, Hashable {
*/
public var services: [String: UInt16]
/**
- * Service base URLs by name (Fleet: gateway URLs that need the Fleet
- * bearer).
+ * Service base URLs by name.
*/
public var endpoints: [String: String]
/**
@@ -27911,8 +27896,9 @@ public struct SandboxInfo: Equatable, Hashable {
* `kubevirt` (empty when not known).
*/runtime: String,
/**
- * `runtime_type` as persisted (`fleet`, `direct`, `gvisor`, `qemu`,
- * ...); prefer `location`, `kind` and `runtime`.
+ * `runtime_type` as persisted (`direct`, `gvisor`, `qemu`, ...; `fleet`
+ * for a record of the Cua Cloud that has ended); prefer `location`,
+ * `kind` and `runtime`.
*/runtimeType: String,
/**
* Status.
@@ -27927,8 +27913,7 @@ public struct SandboxInfo: Equatable, Hashable {
* Declared services: name → guest port (0 = only the name is known).
*/services: [String: UInt16],
/**
- * Service base URLs by name (Fleet: gateway URLs that need the Fleet
- * bearer).
+ * Service base URLs by name.
*/endpoints: [String: String],
/**
* Image, when known.
@@ -29535,14 +29520,11 @@ public struct SpaceCreateOptions: Equatable, Hashable {
*/
public var name: String?
/**
- * vCPUs. Local default 2; cloud 1-64 (most accounts run 1-8; Fleet
- * decides), default the pool template's (4).
+ * vCPUs. Local default 2.
*/
public var cpus: UInt32?
/**
- * Memory in MiB. Local default 4096; cloud 512 up to 524288 (most
- * accounts run 1024-32768; Fleet decides), default the pool
- * template's (4096).
+ * Memory in MiB. Local default 4096.
*/
public var memoryMb: UInt64?
/**
@@ -29616,13 +29598,10 @@ public struct SpaceCreateOptions: Equatable, Hashable {
* Name (default `space-<hex>`).
*/name: String? = nil,
/**
- * vCPUs. Local default 2; cloud 1-64 (most accounts run 1-8; Fleet
- * decides), default the pool template's (4).
+ * vCPUs. Local default 2.
*/cpus: UInt32? = nil,
/**
- * Memory in MiB. Local default 4096; cloud 512 up to 524288 (most
- * accounts run 1024-32768; Fleet decides), default the pool
- * template's (4096).
+ * Memory in MiB. Local default 4096.
*/memoryMb: UInt64? = nil,
/**
* Grow the VM's disk to this many GiB (local VMs; default: the
@@ -31510,8 +31489,8 @@ public struct SpaceStreamTicket: Equatable, Hashable {
*/
public var height: UInt32
/**
- * Attaching needs [`Space::websocket_headers`] (Fleet gateway or the
- * daemon passthrough).
+ * Attaching needs [`Space::websocket_headers`] (a gateway or the daemon
+ * passthrough).
*/
public var needsHeaders: Bool
@@ -31547,8 +31526,8 @@ public struct SpaceStreamTicket: Equatable, Hashable {
* Initial height.
*/height: UInt32,
/**
- * Attaching needs [`Space::websocket_headers`] (Fleet gateway or the
- * daemon passthrough).
+ * Attaching needs [`Space::websocket_headers`] (a gateway or the daemon
+ * passthrough).
*/needsHeaders: Bool) {
self.space = space
self.mediaSessionId = mediaSessionId
@@ -33137,8 +33116,8 @@ public struct SpacesdHttpRequest: Equatable, Hashable {
*/
public var path: String
/**
- * Extra headers. Credentials (`authorization`, the env and Fleet claim
- * headers) are the client's and cannot be set here.
+ * Extra headers. Credentials (`authorization` and the env headers) are
+ * the client's and cannot be set here.
*/
public var headers: [SpacesdHttpHeader]
/**
@@ -33164,8 +33143,8 @@ public struct SpacesdHttpRequest: Equatable, Hashable {
* Absolute path under the endpoint, for example `/mcp`. Never a URL.
*/path: String,
/**
- * Extra headers. Credentials (`authorization`, the env and Fleet claim
- * headers) are the client's and cannot be set here.
+ * Extra headers. Credentials (`authorization` and the env headers) are
+ * the client's and cannot be set here.
*/headers: [SpacesdHttpHeader] = [],
/**
* Request body (empty for none).
@@ -34828,10 +34807,10 @@ public enum CuaError: Swift.Error, Equatable, Hashable, Foundation.LocalizedErro
case NotFound(message: String)
/**
- * The provider is not configured (for example no Fleet credentials).
+ * The provider is not configured (for example no credentials for it).
*
- * Fix: Set `FLEETS_TOKEN`, or `CUA_CLIENT_ID` and `CUA_CLIENT_SECRET`, or
- * run `cua auth login` and create the client with `fleet_from_session`.
+ * Fix: Set the credentials the message names (for a contrib provider, its
+ * environment variable or `cua auth provider set <name>`).
*/
case ProviderNotConfigured(message: String)
@@ -34860,21 +34839,20 @@ public enum CuaError: Swift.Error, Equatable, Hashable, Foundation.LocalizedErro
case Timeout(message: String)
/**
- * Fleet API failure.
+ * Fleet API failure. Cua Cloud has ended, so the SDK no longer raises
+ * this.
*
- * Fix: Read the status in the message. Retry a transient failure; check
- * the credentials and the account's capacity otherwise.
+ * Fix: Use a local sandbox or your own machine; see the Cua Cloud has
+ * ended guide.
*/
case Fleet(message: String)
/**
- * Fleet's admission refused the request: a sandbox or pool size over
- * this account's limits, or a template its policy does not admit. The
- * message is Fleet's own and names the limit.
+ * Fleet's admission refused the request. Cua Cloud has ended, so the SDK
+ * no longer raises this.
*
- * Fix: Pick a size within the limit the message names (most accounts
- * run 1-8 vCPUs and 1-32 GiB per sandbox), or contact Cua support to
- * raise the account's limits.
+ * Fix: Use a local sandbox or your own machine; see the Cua Cloud has
+ * ended guide.
*/
case FleetAdmissionDenied(message: String)
@@ -34916,8 +34894,7 @@ public enum CuaError: Swift.Error, Equatable, Hashable, Foundation.LocalizedErro
/**
* Missing or wrong token or ticket.
*
- * Fix: Pass the sandbox's env token, refresh the Fleet credentials, or run
- * `cua auth login` again.
+ * Fix: Pass the sandbox's env token, or run `cua auth login` again.
*/
case Unauthenticated(message: String)
@@ -34983,18 +34960,20 @@ public enum CuaError: Swift.Error, Equatable, Hashable, Foundation.LocalizedErro
/**
* A named cloud pool's template differs from the requested sandbox
- * fields; the message holds the diff (pass `apply` to update it).
+ * fields. Cua Cloud has ended, so the SDK no longer raises this.
*
- * Fix: Pass the pool's own fields, or pass `apply` to update its template.
+ * Fix: Use a local sandbox or your own machine; see the Cua Cloud has
+ * ended guide.
*/
case PoolSpecMismatch(message: String)
/**
* A claim bound but its per-claim secrets (the env token) never
- * reached the sandbox within the bounded wait; the claim was released.
+ * reached the sandbox. Cua Cloud has ended, so the SDK no longer raises
+ * this.
*
- * Fix: Retry. If it keeps failing, check the pool's claim-secrets setup
- * and the Fleet status.
+ * Fix: Use a local sandbox or your own machine; see the Cua Cloud has
+ * ended guide.
*/
case ClaimSecretsNotDelivered(message: String)
@@ -40450,7 +40429,7 @@ private let initializationResult: InitializationResult = {
if (uniffi_cua_sdk_checksum_method_cua_auth() != 19106) {
return InitializationResult.apiChecksumMismatch
}
- if (uniffi_cua_sdk_checksum_method_cua_fleet() != 40955) {
+ if (uniffi_cua_sdk_checksum_method_cua_fleet() != 45933) {
return InitializationResult.apiChecksumMismatch
}
if (uniffi_cua_sdk_checksum_method_cua_info() != 11159) {
@@ -40462,7 +40441,7 @@ private let initializationResult: InitializationResult = {
if (uniffi_cua_sdk_checksum_method_cua_mode() != 63626) {
return InitializationResult.apiChecksumMismatch
}
- if (uniffi_cua_sdk_checksum_method_cua_sandboxes() != 8394) {
+ if (uniffi_cua_sdk_checksum_method_cua_sandboxes() != 892) {
return InitializationResult.apiChecksumMismatch
}
if (uniffi_cua_sdk_checksum_method_cua_shutdown_daemon() != 57559) {
@@ -40471,7 +40450,7 @@ private let initializationResult: InitializationResult = {
if (uniffi_cua_sdk_checksum_method_cua_spaces() != 35262) {
return InitializationResult.apiChecksumMismatch
}
- if (uniffi_cua_sdk_checksum_method_cua_spacesd() != 28670) {
+ if (uniffi_cua_sdk_checksum_method_cua_spacesd() != 62689) {
return InitializationResult.apiChecksumMismatch
}
if (uniffi_cua_sdk_checksum_method_fleet_acquire() != 16535) {
@@ -40756,7 +40735,7 @@ private let initializationResult: InitializationResult = {
if (uniffi_cua_sdk_checksum_method_portforward_local_addr() != 55098) {
return InitializationResult.apiChecksumMismatch
}
- if (uniffi_cua_sdk_checksum_method_portforward_url() != 43553) {
+ if (uniffi_cua_sdk_checksum_method_portforward_url() != 60604) {
return InitializationResult.apiChecksumMismatch
}
if (uniffi_cua_sdk_checksum_method_sandbox_overlay() != 32673) {
@@ -40765,13 +40744,13 @@ private let initializationResult: InitializationResult = {
if (uniffi_cua_sdk_checksum_method_sandbox_agents() != 53699) {
return InitializationResult.apiChecksumMismatch
}
- if (uniffi_cua_sdk_checksum_method_sandbox_delete() != 55409) {
+ if (uniffi_cua_sdk_checksum_method_sandbox_delete() != 17492) {
return InitializationResult.apiChecksumMismatch
}
- if (uniffi_cua_sdk_checksum_method_sandbox_detach() != 34045) {
+ if (uniffi_cua_sdk_checksum_method_sandbox_detach() != 26534) {
return InitializationResult.apiChecksumMismatch
}
- if (uniffi_cua_sdk_checksum_method_sandbox_forward() != 37775) {
+ if (uniffi_cua_sdk_checksum_method_sandbox_forward() != 19019) {
return InitializationResult.apiChecksumMismatch
}
if (uniffi_cua_sdk_checksum_method_sandbox_guest_display() != 23945) {
@@ -40795,7 +40774,7 @@ private let initializationResult: InitializationResult = {
if (uniffi_cua_sdk_checksum_method_sandbox_is_ephemeral() != 27021) {
return InitializationResult.apiChecksumMismatch
}
- if (uniffi_cua_sdk_checksum_method_sandbox_keep_alive() != 63020) {
+ if (uniffi_cua_sdk_checksum_method_sandbox_keep_alive() != 3593) {
return InitializationResult.apiChecksumMismatch
}
if (uniffi_cua_sdk_checksum_method_sandbox_kind() != 13493) {
@@ -40810,7 +40789,7 @@ private let initializationResult: InitializationResult = {
if (uniffi_cua_sdk_checksum_method_sandbox_mcp() != 8773) {
return InitializationResult.apiChecksumMismatch
}
- if (uniffi_cua_sdk_checksum_method_sandbox_mcp_config() != 43800) {
+ if (uniffi_cua_sdk_checksum_method_sandbox_mcp_config() != 64194) {
return InitializationResult.apiChecksumMismatch
}
if (uniffi_cua_sdk_checksum_method_sandbox_name() != 58395) {
@@ -40819,7 +40798,7 @@ private let initializationResult: InitializationResult = {
if (uniffi_cua_sdk_checksum_method_sandbox_open_media_bridge() != 27610) {
return InitializationResult.apiChecksumMismatch
}
- if (uniffi_cua_sdk_checksum_method_sandbox_public_url() != 36853) {
+ if (uniffi_cua_sdk_checksum_method_sandbox_public_url() != 6460) {
return InitializationResult.apiChecksumMismatch
}
if (uniffi_cua_sdk_checksum_method_sandbox_refresh() != 45835) {
@@ -40864,10 +40843,10 @@ private let initializationResult: InitializationResult = {
if (uniffi_cua_sdk_checksum_method_sandboxes_connect() != 12250) {
return InitializationResult.apiChecksumMismatch
}
- if (uniffi_cua_sdk_checksum_method_sandboxes_connect_url() != 55493) {
+ if (uniffi_cua_sdk_checksum_method_sandboxes_connect_url() != 19950) {
return InitializationResult.apiChecksumMismatch
}
- if (uniffi_cua_sdk_checksum_method_sandboxes_create() != 63062) {
+ if (uniffi_cua_sdk_checksum_method_sandboxes_create() != 52749) {
return InitializationResult.apiChecksumMismatch
}
if (uniffi_cua_sdk_checksum_method_sandboxes_delete() != 43939) {
@@ -40876,7 +40855,7 @@ private let initializationResult: InitializationResult = {
if (uniffi_cua_sdk_checksum_method_sandboxes_get() != 32181) {
return InitializationResult.apiChecksumMismatch
}
- if (uniffi_cua_sdk_checksum_method_sandboxes_list() != 18675) {
+ if (uniffi_cua_sdk_checksum_method_sandboxes_list() != 6497) {
return InitializationResult.apiChecksumMismatch
}
if (uniffi_cua_sdk_checksum_method_sandboxes_list_all() != 9098) {
@@ -40897,10 +40876,10 @@ private let initializationResult: InitializationResult = {
if (uniffi_cua_sdk_checksum_method_service_name() != 19159) {
return InitializationResult.apiChecksumMismatch
}
- if (uniffi_cua_sdk_checksum_method_service_public_url() != 16809) {
+ if (uniffi_cua_sdk_checksum_method_service_public_url() != 37714) {
return InitializationResult.apiChecksumMismatch
}
- if (uniffi_cua_sdk_checksum_method_service_request() != 12324) {
+ if (uniffi_cua_sdk_checksum_method_service_request() != 31558) {
return InitializationResult.apiChecksumMismatch
}
if (uniffi_cua_sdk_checksum_method_service_url() != 25888) {
@@ -41479,7 +41458,7 @@ private let initializationResult: InitializationResult = {
if (uniffi_cua_sdk_checksum_constructor_cua_connect() != 19646) {
return InitializationResult.apiChecksumMismatch
}
- if (uniffi_cua_sdk_checksum_constructor_cua_embedded() != 36838) {
+ if (uniffi_cua_sdk_checksum_constructor_cua_embedded() != 26623) {
return InitializationResult.apiChecksumMismatch
}
if (uniffi_cua_sdk_checksum_constructor_host_new() != 62533) {
diff --git a/libs/cua/typescript/src/native/cua_sdk.ts b/libs/cua/typescript/src/native/cua_sdk.ts
index 687666e498..408af4d41f 100644
--- a/libs/cua/typescript/src/native/cua_sdk.ts
+++ b/libs/cua/typescript/src/native/cua_sdk.ts
@@ -3637,8 +3637,7 @@ export type CloudOptions = {
pool?: string,
/**
* With `pool`: update the pool's template to the given fields instead
- * of failing on a mismatch (`Fleet.apply` semantics for the template;
- * the pool's capacity is kept). Managed pools refuse it.
+ * of failing on a mismatch. Cua Cloud has ended: ignored.
*/
apply: boolean
}
@@ -4225,29 +4224,28 @@ const FfiConverterTypeContainer = (() => {
})();
/**
- * Fleet credentials and endpoints. Unset fields fall back to the
- * environment (`CUA_FLEET_BASE_URL`, `CUA_TOKEN_URL`, `CUA_CLIENT_ID`,
- * `CUA_CLIENT_SECRET`, `FLEETS_TOKEN`) when `CuaConfig.fleet_from_env`.
+ * Fleet credentials and endpoints. Ignored: Cua Cloud has ended, so nothing
+ * reads them any more. Kept so existing callers still compile.
*/
export type FleetSettings = {
/**
- * Fleet API base URL.
+ * Ignored.
*/
baseUrl?: string,
/**
- * OAuth token URL.
+ * Ignored.
*/
tokenUrl?: string,
/**
- * OAuth client id.
+ * Ignored.
*/
clientId?: string,
/**
- * OAuth client secret.
+ * Ignored.
*/
clientSecret?: string,
/**
- * Static Fleet token (wins over client credentials).
+ * Ignored.
*/
token?: string
}
@@ -4313,11 +4311,11 @@ export type CuaConfig = {
*/
stateDir?: string,
/**
- * Fleet settings (merged over the environment).
+ * Ignored: Cua Cloud has ended.
*/
fleet?: FleetSettings,
/**
- * Read Fleet settings from the environment.
+ * Ignored: Cua Cloud has ended.
*/
fleetFromEnv: boolean,
/**
@@ -4334,14 +4332,15 @@ export type CuaConfig = {
*/
teleportHome?: string,
/**
- * When the settings and environment carry no Fleet credentials, use
- * the signed-in session (`Cua.auth()`, `cua auth login`) from the
- * shared credential store, refreshed as needed.
+ * Use the signed-in session (`Cua.auth()`, `cua auth login`) from the
+ * shared credential store, refreshed as needed, for the relay account
+ * the runtime lists the account's machines with ("My machines"). The
+ * name is historical: it no longer builds a Fleet client, because Cua
+ * Cloud has ended.
*/
fleetFromSession: boolean,
/**
- * Where managed Fleet pools keep their name cache and machine-wide GC
- * lock (default: `$CUA_HOME` or `~/.cua`, or next to `state_dir`).
+ * Ignored: Cua Cloud has ended, so there are no managed pools.
*/
fleetPoolHome?: string
}
@@ -8768,7 +8767,7 @@ const FfiConverterTypeGpuOption = (() => {
*/
export type GpuSupport = {
/**
- * `lume`, `qemu`, `container`, `gvisor`, `fleet`, a provider's name.
+ * `lume`, `qemu`, `container`, `gvisor`, a provider's name.
*/
runtime: string,
/**
@@ -9962,10 +9961,10 @@ const FfiConverterTypeImageLayer = (() => {
})();
/**
- * Image layers built on top of a sandbox's image. Cloud: a remote build
- * (Fleet images API). Local: a build into the container engine (container
- * images only; VM images take no layers here). Both are cached by the same
- * content hash (`cua-b-<hash>`), so an identical spec never rebuilds.
+ * Image layers built on top of a sandbox's image. Local: a build into the
+ * container engine (container images only; VM images take no layers here),
+ * cached by a content hash (`cua-b-<hash>`), so an identical spec never
+ * rebuilds. (Cua Cloud's remote build has ended.)
*/
export type ImageBuild = {
/**
@@ -10478,7 +10477,7 @@ const FfiConverterTypeMcpConfig = (() => {
export type MediaBridge = {
/**
* Loopback `ws://` URL carrying a short-lived bridge ticket. Speaks
- * rcdp wire v2 unchanged; no Fleet bearer or env token is exposed.
+ * rcdp wire v2 unchanged; no env token is exposed.
*/
wsUrl: string,
/**
@@ -12454,9 +12453,8 @@ export type SandboxCreateOptions = {
*/
token?: string,
/**
- * Fleet: claim from this existing (user-owned) pool. Unset: a managed,
- * autoscaled pool keyed by image and shape. Local (with an empty
- * image): run this Fleet pool's template locally.
+ * Cua Cloud has ended: a pool fails with the "Cua Cloud has ended"
+ * error.
*/
pool?: string,
/**
@@ -12472,7 +12470,7 @@ export type SandboxCreateOptions = {
*/
memoryMb?: bigint,
/**
- * Extra guest ports (local: published; Fleet: `port-<n>` services).
+ * Extra guest ports (local: published).
*/
ports: Array<number>,
/**
@@ -12488,13 +12486,13 @@ export type SandboxCreateOptions = {
*/
readyTimeoutMs?: number,
/**
- * Guest environment (local: container environment or cloud-init;
- * cloud: the template environment with `processMode: Run`, on gVisor
- * and KubeVirt; values are not secrets).
+ * Guest environment (local: container environment or cloud-init; values
+ * are not secrets).
*/
env: Map<string, string>,
/**
- * Deprecated: initial replicas of a new managed pool (> 0 = warm).
+ * Deprecated, and Cua Cloud has ended: initial replicas of a new
+ * managed pool (> 0 = warm).
*/
fleetReplicas?: number,
/**
@@ -12835,8 +12833,9 @@ export type SandboxInfo = {
*/
runtime: string,
/**
- * `runtime_type` as persisted (`fleet`, `direct`, `gvisor`, `qemu`,
- * ...); prefer `location`, `kind` and `runtime`.
+ * `runtime_type` as persisted (`direct`, `gvisor`, `qemu`, ...; `fleet`
+ * for a record of the Cua Cloud that has ended); prefer `location`,
+ * `kind` and `runtime`.
*/
runtimeType: string,
/**
@@ -12856,8 +12855,7 @@ export type SandboxInfo = {
*/
services: Map<string, number>,
/**
- * Service base URLs by name (Fleet: gateway URLs that need the Fleet
- * bearer).
+ * Service base URLs by name.
*/
endpoints: Map<string, string>,
/**
@@ -14009,14 +14007,11 @@ export type SpaceCreateOptions = {
*/
name?: string,
/**
- * vCPUs. Local default 2; cloud 1-64 (most accounts run 1-8; Fleet
- * decides), default the pool template's (4).
+ * vCPUs. Local default 2.
*/
cpus?: number,
/**
- * Memory in MiB. Local default 4096; cloud 512 up to 524288 (most
- * accounts run 1024-32768; Fleet decides), default the pool
- * template's (4096).
+ * Memory in MiB. Local default 4096.
*/
memoryMb?: bigint,
/**
@@ -15469,8 +15464,8 @@ export type SpaceStreamTicket = {
*/
height: number,
/**
- * Attaching needs [`Space::websocket_headers`] (Fleet gateway or the
- * daemon passthrough).
+ * Attaching needs [`Space::websocket_headers`] (a gateway or the daemon
+ * passthrough).
*/
needsHeaders: boolean
}
@@ -16662,8 +16657,8 @@ export type SpacesdHttpRequest = {
*/
path: string,
/**
- * Extra headers. Credentials (`authorization`, the env and Fleet claim
- * headers) are the client's and cannot be set here.
+ * Extra headers. Credentials (`authorization` and the env headers) are
+ * the client's and cannot be set here.
*/
headers: Array<SpacesdHttpHeader>,
/**
@@ -17824,10 +17819,10 @@ export const CuaError = (() => {
}
}
/**
- * The provider is not configured (for example no Fleet credentials).
+ * The provider is not configured (for example no credentials for it).
*
- * Fix: Set `FLEETS_TOKEN`, or `CUA_CLIENT_ID` and `CUA_CLIENT_SECRET`, or
- * run `cua auth login` and create the client with `fleet_from_session`.
+ * Fix: Set the credentials the message names (for a contrib provider, its
+ * environment variable or `cua auth provider set <name>`).
*/
class ProviderNotConfigured extends UniffiError {
/**
@@ -17944,10 +17939,11 @@ export const CuaError = (() => {
}
}
/**
- * Fleet API failure.
+ * Fleet API failure. Cua Cloud has ended, so the SDK no longer raises
+ * this.
*
- * Fix: Read the status in the message. Retry a transient failure; check
- * the credentials and the account's capacity otherwise.
+ * Fix: Use a local sandbox or your own machine; see the Cua Cloud has
+ * ended guide.
*/
class Fleet extends UniffiError {
/**
@@ -17974,13 +17970,11 @@ export const CuaError = (() => {
}
}
/**
- * Fleet's admission refused the request: a sandbox or pool size over
- * this account's limits, or a template its policy does not admit. The
- * message is Fleet's own and names the limit.
+ * Fleet's admission refused the request. Cua Cloud has ended, so the SDK
+ * no longer raises this.
*
- * Fix: Pick a size within the limit the message names (most accounts
- * run 1-8 vCPUs and 1-32 GiB per sandbox), or contact Cua support to
- * raise the account's limits.
+ * Fix: Use a local sandbox or your own machine; see the Cua Cloud has
+ * ended guide.
*/
class FleetAdmissionDenied extends UniffiError {
/**
@@ -18132,8 +18126,7 @@ export const CuaError = (() => {
/**
* Missing or wrong token or ticket.
*
- * Fix: Pass the sandbox's env token, refresh the Fleet credentials, or run
- * `cua auth login` again.
+ * Fix: Pass the sandbox's env token, or run `cua auth login` again.
*/
class Unauthenticated extends UniffiError {
/**
@@ -18375,9 +18368,10 @@ export const CuaError = (() => {
}
/**
* A named cloud pool's template differs from the requested sandbox
- * fields; the message holds the diff (pass `apply` to update it).
+ * fields. Cua Cloud has ended, so the SDK no longer raises this.
*
- * Fix: Pass the pool's own fields, or pass `apply` to update its template.
+ * Fix: Use a local sandbox or your own machine; see the Cua Cloud has
+ * ended guide.
*/
class PoolSpecMismatch extends UniffiError {
/**
@@ -18405,10 +18399,11 @@ export const CuaError = (() => {
}
/**
* A claim bound but its per-claim secrets (the env token) never
- * reached the sandbox within the bounded wait; the claim was released.
+ * reached the sandbox. Cua Cloud has ended, so the SDK no longer raises
+ * this.
*
- * Fix: Retry. If it keeps failing, check the pool's claim-secrets setup
- * and the Fleet status.
+ * Fix: Use a local sandbox or your own machine; see the Cua Cloud has
+ * ended guide.
*/
class ClaimSecretsNotDelivered extends UniffiError {
/**
@@ -22086,7 +22081,8 @@ const uniffiTypeFleetPoolsObjectFactory: UniffiObjectFactory<FleetPoolsLike> = (
const FfiConverterTypeFleetPools = new FfiConverterObject(uniffiTypeFleetPoolsObjectFactory);
/**
- * Fleet control plane.
+ * Fleet control plane. Cua Cloud has ended: `Cua.fleet()` never returns
+ * one, so none of its methods can be called.
*/
export interface FleetLike {
@@ -22235,7 +22231,8 @@ export type FleetInterface = FleetLike;
/**
- * Fleet control plane.
+ * Fleet control plane. Cua Cloud has ended: `Cua.fleet()` never returns
+ * one, so none of its methods can be called.
*/
export class Fleet extends UniffiAbstractObject implements FleetLike {
@@ -23691,7 +23688,7 @@ export interface PortForwardLike {
*/
localAddr(): string | undefined;
/**
- * URL to use (loopback URL, or the Fleet gateway URL).
+ * URL to use (a loopback URL).
*/
url(): string | undefined;
}
@@ -23784,7 +23781,7 @@ private constructor(pointer: UniffiHandle) {
}
/**
- * URL to use (loopback URL, or the Fleet gateway URL).
+ * URL to use (a loopback URL).
*/
url(): string | undefined {
return ((__rb: Uint8Array) => {
@@ -24620,16 +24617,14 @@ export interface ServiceLike {
/**
* A shareable URL for this service that stops working after
* `ttl_seconds` (60 s to 24 h, default 1 h): the same as
- * `Sandbox.public_url(name, ...)`. Cloud: a Fleet signed service URL.
- * Local: a loopback URL with its own token, served by the cua daemon.
+ * `Sandbox.public_url(name, ...)`: a loopback URL with its own token,
+ * served by the cua daemon.
*/
publicUrl(ttlSeconds: number | undefined, label: string | undefined, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<PublicUrl>;
/**
- * One HTTP request to `path` on the service. Credentials (Fleet bearer
- * and claim) are attached by the runtime. `headers` are sent as given
- * (for example `content-type`, or `accept` and `mcp-session-id` for
- * MCP over Fleet); `authorization` is refused on Fleet, where the
- * gateway bearer owns it.
+ * One HTTP request to `path` on the service. Credentials are attached by
+ * the runtime. `headers` are sent as given (for example `content-type`,
+ * or `accept` and `mcp-session-id` for MCP).
*/
request(method: string, path: string, body: ArrayBuffer | undefined, timeoutMs: number | undefined, headers: Array<HttpHeader> | undefined, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<HttpResponse>;
/**
@@ -24794,8 +24789,8 @@ private constructor(pointer: UniffiHandle) {
/**
* A shareable URL for this service that stops working after
* `ttl_seconds` (60 s to 24 h, default 1 h): the same as
- * `Sandbox.public_url(name, ...)`. Cloud: a Fleet signed service URL.
- * Local: a loopback URL with its own token, served by the cua daemon.
+ * `Sandbox.public_url(name, ...)`: a loopback URL with its own token,
+ * served by the cua daemon.
*/
async publicUrl(ttlSeconds: number | undefined = undefined, label: string | undefined = undefined, asyncOpts_?: { signal: AbortSignal }): Promise<PublicUrl> /*throws*/ {
const __stack = uniffiIsDebug ? new Error().stack : undefined;
@@ -24830,11 +24825,9 @@ private constructor(pointer: UniffiHandle) {
}
/**
- * One HTTP request to `path` on the service. Credentials (Fleet bearer
- * and claim) are attached by the runtime. `headers` are sent as given
- * (for example `content-type`, or `accept` and `mcp-session-id` for
- * MCP over Fleet); `authorization` is refused on Fleet, where the
- * gateway bearer owns it.
+ * One HTTP request to `path` on the service. Credentials are attached by
+ * the runtime. `headers` are sent as given (for example `content-type`,
+ * or `accept` and `mcp-session-id` for MCP).
*/
async request(method: string, path: string, body: ArrayBuffer | undefined, timeoutMs: number | undefined, headers: Array<HttpHeader> | undefined = undefined, asyncOpts_?: { signal: AbortSignal }): Promise<HttpResponse> /*throws*/ {
const __stack = uniffiIsDebug ? new Error().stack : undefined;
@@ -27719,20 +27712,19 @@ export interface SandboxLike {
*/
agents(asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<AgentsLike>;
/**
- * Deletes (Fleet: releases the claim and an ephemeral pool).
+ * Deletes (local: removes it; direct: forgets it; your cloud: deletes
+ * the machine).
*/
delete_(asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<void>;
/**
- * Managed Fleet claims: stop renewing the claim and forget the handle;
- * the claim runs until its current shutdown time. Embedded runtime
- * only (a daemon holds its claims by design).
+ * Forgets the handle this runtime holds (a Cua Cloud claim used to
+ * stop renewing; Cua Cloud has ended). Embedded runtime only.
*/
detach() /*throws*/: void;
/**
* Forwards a loopback port to guest `port`: a TCP forward locally (and
- * over cua-spacesd's tunnel when the image has it); in the cloud
- * without cua-spacesd, a loopback HTTP/WebSocket proxy through the
- * Fleet gateway. Either way `url()` is a loopback URL.
+ * over cua-spacesd's tunnel when the image has it). `url()` is a
+ * loopback URL.
*/
forward(port: number, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<PortForwardLike>;
/**
@@ -27775,7 +27767,7 @@ export interface SandboxLike {
*/
isEphemeral(): boolean;
/**
- * Extends a Fleet lease by `seconds`.
+ * Extends the sandbox's lease by `seconds`, for a provider that has one.
*/
keepAlive(seconds: number, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<void>;
/**
@@ -27801,9 +27793,8 @@ export interface SandboxLike {
/**
* Where the MCP server behind `service` is (URL of its endpoint at
* `path`, default `/mcp`, plus the headers every request needs), for
- * any MCP client. Embedded: the service route itself (loopback, or the
- * Fleet gateway with a fresh bearer and claim header). Daemon: the
- * daemon's streaming passthrough with its loopback bearer.
+ * any MCP client. Embedded: the service route itself (loopback).
+ * Daemon: the daemon's streaming passthrough with its loopback bearer.
*/
mcpConfig(service: string, path: string | undefined, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<McpConfig>;
/**
@@ -27827,9 +27818,8 @@ export interface SandboxLike {
overlay(overlays: Array<Overlay>, timeoutMs: number | undefined, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<Array<OverlayResult>>;
/**
* A shareable URL for `service` that stops working after `ttl_seconds`
- * (60 s to 24 h, default 1 h). Cloud: a Fleet signed service URL.
- * Local: a loopback URL with its own token, served by the cua daemon
- * (started if needed; `CUA_BIN` names the CLI).
+ * (60 s to 24 h, default 1 h): a loopback URL with its own token, served
+ * by the cua daemon (started if needed; `CUA_BIN` names the CLI).
*/
publicUrl(service: string, ttlSeconds: number | undefined, label: string | undefined, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<PublicUrl>;
/**
@@ -27950,7 +27940,8 @@ private constructor(pointer: UniffiHandle) {
}
/**
- * Deletes (Fleet: releases the claim and an ephemeral pool).
+ * Deletes (local: removes it; direct: forgets it; your cloud: deletes
+ * the machine).
*/
async delete_(asyncOpts_?: { signal: AbortSignal }): Promise<void> /*throws*/ {
const __stack = uniffiIsDebug ? new Error().stack : undefined;
@@ -27980,9 +27971,8 @@ private constructor(pointer: UniffiHandle) {
}
/**
- * Managed Fleet claims: stop renewing the claim and forget the handle;
- * the claim runs until its current shutdown time. Embedded runtime
- * only (a daemon holds its claims by design).
+ * Forgets the handle this runtime holds (a Cua Cloud claim used to
+ * stop renewing; Cua Cloud has ended). Embedded runtime only.
*/
detach(): void /*throws*/ {uniffiCaller.rustCallWithError(
/*liftError:*/ FfiConverterTypeCuaError.lift.bind(FfiConverterTypeCuaError),
@@ -27996,9 +27986,8 @@ private constructor(pointer: UniffiHandle) {
/**
* Forwards a loopback port to guest `port`: a TCP forward locally (and
- * over cua-spacesd's tunnel when the image has it); in the cloud
- * without cua-spacesd, a loopback HTTP/WebSocket proxy through the
- * Fleet gateway. Either way `url()` is a loopback URL.
+ * over cua-spacesd's tunnel when the image has it). `url()` is a
+ * loopback URL.
*/
async forward(port: number, asyncOpts_?: { signal: AbortSignal }): Promise<PortForwardLike> /*throws*/ {
const __stack = uniffiIsDebug ? new Error().stack : undefined;
@@ -28223,7 +28212,7 @@ private constructor(pointer: UniffiHandle) {
}
/**
- * Extends a Fleet lease by `seconds`.
+ * Extends the sandbox's lease by `seconds`, for a provider that has one.
*/
async keepAlive(seconds: number, asyncOpts_?: { signal: AbortSignal }): Promise<void> /*throws*/ {
const __stack = uniffiIsDebug ? new Error().stack : undefined;
@@ -28348,9 +28337,8 @@ private constructor(pointer: UniffiHandle) {
/**
* Where the MCP server behind `service` is (URL of its endpoint at
* `path`, default `/mcp`, plus the headers every request needs), for
- * any MCP client. Embedded: the service route itself (loopback, or the
- * Fleet gateway with a fresh bearer and claim header). Daemon: the
- * daemon's streaming passthrough with its loopback bearer.
+ * any MCP client. Embedded: the service route itself (loopback).
+ * Daemon: the daemon's streaming passthrough with its loopback bearer.
*/
async mcpConfig(service: string, path: string | undefined = undefined, asyncOpts_?: { signal: AbortSignal }): Promise<McpConfig> /*throws*/ {
const __stack = uniffiIsDebug ? new Error().stack : undefined;
@@ -28483,9 +28471,8 @@ private constructor(pointer: UniffiHandle) {
/**
* A shareable URL for `service` that stops working after `ttl_seconds`
- * (60 s to 24 h, default 1 h). Cloud: a Fleet signed service URL.
- * Local: a loopback URL with its own token, served by the cua daemon
- * (started if needed; `CUA_BIN` names the CLI).
+ * (60 s to 24 h, default 1 h): a loopback URL with its own token, served
+ * by the cua daemon (started if needed; `CUA_BIN` names the CLI).
*/
async publicUrl(service: string, ttlSeconds: number | undefined = undefined, label: string | undefined = undefined, asyncOpts_?: { signal: AbortSignal }): Promise<PublicUrl> /*throws*/ {
const __stack = uniffiIsDebug ? new Error().stack : undefined;
@@ -28960,13 +28947,13 @@ export interface SandboxesLike {
connect(name: string, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<SandboxLike>;
/**
* Connects directly to a machine by URL (`http(s)://host:port`, bare
- * `host:port`, a Fleet service URL or a relay URL) with an optional
- * spacesd token. No daemon is assumed and nothing is probed.
+ * `host:port` or a relay URL) with an optional spacesd token. No daemon is assumed and nothing is probed.
*/
connectUrl(url: string, token: string | undefined, name: string | undefined, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<SandboxLike>;
/**
- * Creates (Fleet, local) or connects (direct) a sandbox and waits for
- * the provider and every readiness probe.
+ * Creates (local, your cloud, a provider) or connects (direct) a sandbox
+ * and waits for the provider and every readiness probe. `on: "cloud"`
+ * fails with the "Cua Cloud has ended" error.
*/
create(options: SandboxCreateOptions, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<SandboxLike>;
/**
@@ -28982,10 +28969,8 @@ export interface SandboxesLike {
* all of them, local, direct and the account's live cloud sandboxes,
* whatever the default location is. `"local"`, `"cloud"` or
* `"direct"`: only those.
- * Cloud sandboxes never fail the listing: without Fleet credentials
- * they are left out silently, and when Fleet fails or takes longer than
- * 5 s they are left out with a warning (logged here;
- * [`Sandboxes::list_with_warnings`] returns it).
+ * Cua Cloud has ended: its sandboxes are never listed, and listing
+ * never asks Fleet.
*/
list(location: string | undefined, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<Array<SandboxInfo>>;
/**
@@ -29102,8 +29087,7 @@ private constructor(pointer: UniffiHandle) {
/**
* Connects directly to a machine by URL (`http(s)://host:port`, bare
- * `host:port`, a Fleet service URL or a relay URL) with an optional
- * spacesd token. No daemon is assumed and nothing is probed.
+ * `host:port` or a relay URL) with an optional spacesd token. No daemon is assumed and nothing is probed.
*/
async connectUrl(url: string, token: string | undefined, name: string | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<SandboxLike> /*throws*/ {
const __stack = uniffiIsDebug ? new Error().stack : undefined;
@@ -29138,8 +29122,9 @@ private constructor(pointer: UniffiHandle) {
}
/**
- * Creates (Fleet, local) or connects (direct) a sandbox and waits for
- * the provider and every readiness probe.
+ * Creates (local, your cloud, a provider) or connects (direct) a sandbox
+ * and waits for the provider and every readiness probe. `on: "cloud"`
+ * fails with the "Cua Cloud has ended" error.
*/
async create(options: SandboxCreateOptions, asyncOpts_?: { signal: AbortSignal }): Promise<SandboxLike> /*throws*/ {
const __stack = uniffiIsDebug ? new Error().stack : undefined;
@@ -29243,10 +29228,8 @@ private constructor(pointer: UniffiHandle) {
* all of them, local, direct and the account's live cloud sandboxes,
* whatever the default location is. `"local"`, `"cloud"` or
* `"direct"`: only those.
- * Cloud sandboxes never fail the listing: without Fleet credentials
- * they are left out silently, and when Fleet fails or takes longer than
- * 5 s they are left out with a warning (logged here;
- * [`Sandboxes::list_with_warnings`] returns it).
+ * Cua Cloud has ended: its sandboxes are never listed, and listing
+ * never asks Fleet.
*/
async list(location: string | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<Array<SandboxInfo>> /*throws*/ {
const __stack = uniffiIsDebug ? new Error().stack : undefined;
@@ -32617,8 +32600,8 @@ const uniffiTypeSpaceObjectFactory: UniffiObjectFactory<SpaceLike> = (() => {
const FfiConverterTypeSpace = new FfiConverterObject(uniffiTypeSpaceObjectFactory);
/**
- * The Spaces registry: add a machine by URL, claim a Fleet Space,
- * provision a local one, and get [`Space`] handles.
+ * The Spaces registry: add a machine by URL, provision a local one, and get
+ * [`Space`] handles.
*/
export interface SpacesLike {
@@ -32950,8 +32933,8 @@ export type SpacesInterface = SpacesLike;
/**
- * The Spaces registry: add a machine by URL, claim a Fleet Space,
- * provision a local one, and get [`Space`] handles.
+ * The Spaces registry: add a machine by URL, provision a local one, and get
+ * [`Space`] handles.
*/
export class Spaces extends UniffiAbstractObject implements SpacesLike {
@@ -35391,8 +35374,8 @@ const FfiConverterTypeSpaces = new FfiConverterObject(uniffiTypeSpacesObjectFact
/**
* The entry point of the SDK: create one with `Cua::embedded` or
- * `Cua::connect`, then reach sandboxes, Fleet, Spaces and the rest
- * through its accessors.
+ * `Cua::connect`, then reach sandboxes, Spaces and the rest through its
+ * accessors.
*/
export interface CuaLike {
@@ -35407,9 +35390,8 @@ export interface CuaLike {
*/
auth(): AuthLike;
/**
- * Fleet pools, templates, claims and images. Always talks to Fleet
- * from this process with this SDK's credentials (in daemon mode, from
- * the environment).
+ * Fleet pools, templates, claims and images. Cua Cloud has ended: this
+ * always fails with the "Cua Cloud has ended" error and never connects.
*/
fleet() /*throws*/: FleetLike;
/**
@@ -35426,7 +35408,7 @@ export interface CuaLike {
*/
mode(): CuaMode;
/**
- * Sandboxes (Fleet, local, direct).
+ * Sandboxes (local, direct, your own cloud).
*/
sandboxes(): SandboxesLike;
/**
@@ -35438,8 +35420,8 @@ export interface CuaLike {
*/
spaces(): SpacesLike;
/**
- * Connects to cua-spacesd at `url` (`host:port`, `http(s)://…`, a
- * Fleet service URL or a relay URL) without a sandbox.
+ * Connects to cua-spacesd at `url` (`host:port`, `http(s)://…` or a
+ * relay URL) without a sandbox.
*/
spacesd(url: string, token: string | undefined, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<SpacesdClientLike>;
}
@@ -35451,8 +35433,8 @@ export type CuaInterface = CuaLike;
/**
* The entry point of the SDK: create one with `Cua::embedded` or
- * `Cua::connect`, then reach sandboxes, Fleet, Spaces and the rest
- * through its accessors.
+ * `Cua::connect`, then reach sandboxes, Spaces and the rest through its
+ * accessors.
*/
export class Cua extends UniffiAbstractObject implements CuaLike {
@@ -35519,7 +35501,9 @@ private constructor(pointer: UniffiHandle) {
/**
* Runs the SDK runtime in this process. Performs no I/O beyond
- * reading the credential store when `fleet_from_session` is set.
+ * reading the credential store when `fleet_from_session` is set (for
+ * the relay account). It never builds a Fleet client: Cua Cloud has
+ * ended.
*/
static embedded(config: CuaConfig): CuaLike /*throws*/ {
return FfiConverterTypeCua.lift(uniffiCaller.rustCallWithError(
@@ -35566,9 +35550,8 @@ private constructor(pointer: UniffiHandle) {
}
/**
- * Fleet pools, templates, claims and images. Always talks to Fleet
- * from this process with this SDK's credentials (in daemon mode, from
- * the environment).
+ * Fleet pools, templates, claims and images. Cua Cloud has ended: this
+ * always fails with the "Cua Cloud has ended" error and never connects.
*/
fleet(): FleetLike /*throws*/ {
return FfiConverterTypeFleet.lift(uniffiCaller.rustCallWithError(
@@ -35653,7 +35636,7 @@ private constructor(pointer: UniffiHandle) {
}
/**
- * Sandboxes (Fleet, local, direct).
+ * Sandboxes (local, direct, your own cloud).
*/
sandboxes(): SandboxesLike {
return FfiConverterTypeSandboxes.lift(uniffiCaller.rustCall(
@@ -35711,8 +35694,8 @@ private constructor(pointer: UniffiHandle) {
}
/**
- * Connects to cua-spacesd at `url` (`host:port`, `http(s)://…`, a
- * Fleet service URL or a relay URL) without a sandbox.
+ * Connects to cua-spacesd at `url` (`host:port`, `http(s)://…` or a
+ * relay URL) without a sandbox.
*/
async spacesd(url: string, token: string | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<SpacesdClientLike> /*throws*/ {
const __stack = uniffiIsDebug ? new Error().stack : undefined;
@@ -37302,7 +37285,7 @@ function uniffiEnsureInitialized() {
if (nativeModule().uniffi_cua_sdk_checksum_constructor_cua_connect() !== 19646) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_constructor_cua_connect");
}
- if (nativeModule().uniffi_cua_sdk_checksum_constructor_cua_embedded() !== 36838) {
+ if (nativeModule().uniffi_cua_sdk_checksum_constructor_cua_embedded() !== 26623) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_constructor_cua_embedded");
}
if (nativeModule().uniffi_cua_sdk_checksum_method_cua_agent_setup() !== 50422) {
@@ -37311,7 +37294,7 @@ function uniffiEnsureInitialized() {
if (nativeModule().uniffi_cua_sdk_checksum_method_cua_auth() !== 19106) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_cua_auth");
}
- if (nativeModule().uniffi_cua_sdk_checksum_method_cua_fleet() !== 40955) {
+ if (nativeModule().uniffi_cua_sdk_checksum_method_cua_fleet() !== 45933) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_cua_fleet");
}
if (nativeModule().uniffi_cua_sdk_checksum_method_cua_info() !== 11159) {
@@ -37323,7 +37306,7 @@ function uniffiEnsureInitialized() {
if (nativeModule().uniffi_cua_sdk_checksum_method_cua_mode() !== 63626) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_cua_mode");
}
- if (nativeModule().uniffi_cua_sdk_checksum_method_cua_sandboxes() !== 8394) {
+ if (nativeModule().uniffi_cua_sdk_checksum_method_cua_sandboxes() !== 892) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_cua_sandboxes");
}
if (nativeModule().uniffi_cua_sdk_checksum_method_cua_shutdown_daemon() !== 57559) {
@@ -37332,7 +37315,7 @@ function uniffiEnsureInitialized() {
if (nativeModule().uniffi_cua_sdk_checksum_method_cua_spaces() !== 35262) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_cua_spaces");
}
- if (nativeModule().uniffi_cua_sdk_checksum_method_cua_spacesd() !== 28670) {
+ if (nativeModule().uniffi_cua_sdk_checksum_method_cua_spacesd() !== 62689) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_cua_spacesd");
}
if (nativeModule().uniffi_cua_sdk_checksum_method_devices_approve() !== 49147) {
@@ -37614,7 +37597,7 @@ function uniffiEnsureInitialized() {
if (nativeModule().uniffi_cua_sdk_checksum_method_portforward_local_addr() !== 55098) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_portforward_local_addr");
}
- if (nativeModule().uniffi_cua_sdk_checksum_method_portforward_url() !== 43553) {
+ if (nativeModule().uniffi_cua_sdk_checksum_method_portforward_url() !== 60604) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_portforward_url");
}
if (nativeModule().uniffi_cua_sdk_checksum_constructor_presenceview_new() !== 9981) {
@@ -37668,13 +37651,13 @@ function uniffiEnsureInitialized() {
if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_agents() !== 53699) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_sandbox_agents");
}
- if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_delete() !== 55409) {
+ if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_delete() !== 17492) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_sandbox_delete");
}
- if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_detach() !== 34045) {
+ if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_detach() !== 26534) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_sandbox_detach");
}
- if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_forward() !== 37775) {
+ if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_forward() !== 19019) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_sandbox_forward");
}
if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_guest_display() !== 23945) {
@@ -37698,7 +37681,7 @@ function uniffiEnsureInitialized() {
if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_is_ephemeral() !== 27021) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_sandbox_is_ephemeral");
}
- if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_keep_alive() !== 63020) {
+ if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_keep_alive() !== 3593) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_sandbox_keep_alive");
}
if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_kind() !== 13493) {
@@ -37713,7 +37696,7 @@ function uniffiEnsureInitialized() {
if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_mcp() !== 8773) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_sandbox_mcp");
}
- if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_mcp_config() !== 43800) {
+ if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_mcp_config() !== 64194) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_sandbox_mcp_config");
}
if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_name() !== 58395) {
@@ -37725,7 +37708,7 @@ function uniffiEnsureInitialized() {
if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_overlay() !== 32673) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_sandbox_overlay");
}
- if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_public_url() !== 36853) {
+ if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_public_url() !== 6460) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_sandbox_public_url");
}
if (nativeModule().uniffi_cua_sdk_checksum_method_sandbox_refresh() !== 45835) {
@@ -37770,10 +37753,10 @@ function uniffiEnsureInitialized() {
if (nativeModule().uniffi_cua_sdk_checksum_method_sandboxes_connect() !== 12250) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_sandboxes_connect");
}
- if (nativeModule().uniffi_cua_sdk_checksum_method_sandboxes_connect_url() !== 55493) {
+ if (nativeModule().uniffi_cua_sdk_checksum_method_sandboxes_connect_url() !== 19950) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_sandboxes_connect_url");
}
- if (nativeModule().uniffi_cua_sdk_checksum_method_sandboxes_create() !== 63062) {
+ if (nativeModule().uniffi_cua_sdk_checksum_method_sandboxes_create() !== 52749) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_sandboxes_create");
}
if (nativeModule().uniffi_cua_sdk_checksum_method_sandboxes_delete() !== 43939) {
@@ -37782,7 +37765,7 @@ function uniffiEnsureInitialized() {
if (nativeModule().uniffi_cua_sdk_checksum_method_sandboxes_get() !== 32181) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_sandboxes_get");
}
- if (nativeModule().uniffi_cua_sdk_checksum_method_sandboxes_list() !== 18675) {
+ if (nativeModule().uniffi_cua_sdk_checksum_method_sandboxes_list() !== 6497) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_sandboxes_list");
}
if (nativeModule().uniffi_cua_sdk_checksum_method_sandboxes_list_all() !== 9098) {
@@ -37803,10 +37786,10 @@ function uniffiEnsureInitialized() {
if (nativeModule().uniffi_cua_sdk_checksum_method_service_name() !== 19159) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_service_name");
}
- if (nativeModule().uniffi_cua_sdk_checksum_method_service_public_url() !== 16809) {
+ if (nativeModule().uniffi_cua_sdk_checksum_method_service_public_url() !== 37714) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_service_public_url");
}
- if (nativeModule().uniffi_cua_sdk_checksum_method_service_request() !== 12324) {
+ if (nativeModule().uniffi_cua_sdk_checksum_method_service_request() !== 31558) {
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_sdk_checksum_method_service_request");
}
if (nativeModule().uniffi_cua_sdk_checksum_method_service_url() !== 25888) {
diff --git a/samples/openkoalabot-example-tauri/src-tauri/Cargo.lock b/samples/openkoalabot-example-tauri/src-tauri/Cargo.lock
index b9a5fcf0a9..5d2e1377ae 100644
--- a/samples/openkoalabot-example-tauri/src-tauri/Cargo.lock
+++ b/samples/openkoalabot-example-tauri/src-tauri/Cargo.lock
@@ -1338,7 +1338,6 @@ dependencies = [
"axum",
"base64 0.22.1",
"bytes",
- "cua-auth",
"cua-disk",
"cua-fleet",
"cua-home",
@@ -1701,7 +1700,6 @@ dependencies = [
"cua-auth",
"cua-chromium-storage",
"cua-daemon",
- "cua-fleet",
"cua-home",
"cua-keyvault",
"cua-media-client",
diff --git a/scripts/docs-generators/cli-specs/cua.json b/scripts/docs-generators/cli-specs/cua.json
index 4405f92b1c..4952d06367 100644
--- a/scripts/docs-generators/cli-specs/cua.json
+++ b/scripts/docs-generators/cli-specs/cua.json
@@ -12951,7 +12951,7 @@
"usage": "cua volume status [OPTIONS]"
},
{
- "abstract": "Which store the drive uses (fs, s3, cloud)",
+ "abstract": "Which store the drive uses (fs, s3)",
"aliases": [],
"arguments": [],
"flags": [],
@@ -13001,7 +13001,7 @@
"aliases": [],
"default_value": null,
"env": null,
- "help": "`fs` (default), `s3`, or `cloud` (off unless the Cua cloud enables it)",
+ "help": "`fs` (default) or `s3`",
"hidden": false,
"is_optional": false,
"multiple_values": false,
diff --git a/scripts/images/image-refs-allowlist.json b/scripts/images/image-refs-allowlist.json
index 325723d850..9b61965b38 100644
--- a/scripts/images/image-refs-allowlist.json
+++ b/scripts/images/image-refs-allowlist.json
@@ -236,7 +236,6 @@
"paths": [
"libs/cua/crates/cua-fleet/tests/fixtures/image-variants.json",
"libs/cua/crates/cua-image/src/canonical.rs",
- "libs/cua/crates/cua-spaces/tests/generic.rs",
"scripts/images/docs-image-refs-baseline.json",
"scripts/images/test-check-tag-safety.sh"
]
@@ -250,7 +249,6 @@
"ghcr.io/trycua/cua-desktop-linux:test": {
"reason": "legacy name of ghcr.io/trycua/linux (frozen, read-only: never pushed or re-tagged); historical tests of legacy refs and tag safety",
"paths": [
- "libs/cua/crates/cua-sdk/tests/refs.rs",
"libs/cua/crates/cua-sdk/tests/topologies.rs"
]
},
@@ -518,7 +516,6 @@
"public.ecr.aws/k5j5w0x5/cua-ubuntu-24.04:docker-main": {
"reason": "cloud-built Fleet workspace image (owned and gated by the cloud repo's image doctor); pinned by live tests, fixtures and the qualified-image facts",
"paths": [
- "libs/cua/crates/cua-daemon/src/runtime.rs",
"libs/cua/crates/cua-fleet/tests/fixtures/image-variants.json"
]
},
@@ -621,7 +618,6 @@
"libs/cua/crates/cua-image/src/canonical.rs",
"libs/cua/crates/cua-image/src/publish.rs",
"libs/cua/crates/cua-sandbox-core/tests/providers.rs",
- "libs/cua/crates/cua-sdk/tests/refs.rs",
"libs/cua/crates/cua-sdk/tests/topologies.rs",
"libs/cua/crates/cua-spaces/tests/generic.rs",
"libs/cua/crates/cua-spacesd-client/src/manifest.rs",
diff --git a/tests/e2e/cua-sdk/rust/Cargo.lock b/tests/e2e/cua-sdk/rust/Cargo.lock
index 3639c5b703..08f34bff74 100644
--- a/tests/e2e/cua-sdk/rust/Cargo.lock
+++ b/tests/e2e/cua-sdk/rust/Cargo.lock
@@ -1318,7 +1318,6 @@ dependencies = [
"async-trait",
"base64 0.22.1",
"bytes",
- "cua-auth",
"cua-byoc",
"cua-disk",
"cua-fleet",
@@ -1568,7 +1567,6 @@ dependencies = [
"futures-util",
"hex",
"http",
- "js-sys",
"pbjson-types",
"prost",
"serde",
@@ -1582,9 +1580,6 @@ dependencies = [
"tonic-web-wasm-client",
"tracing",
"uniffi",
- "wasm-bindgen",
- "wasm-bindgen-futures",
- "web-sys",
]
[[package]]
diff --git a/tests/e2e/local-runtimes/Cargo.lock b/tests/e2e/local-runtimes/Cargo.lock
index 351b8cf747..a7125f87cf 100644
--- a/tests/e2e/local-runtimes/Cargo.lock
+++ b/tests/e2e/local-runtimes/Cargo.lock
@@ -776,7 +776,6 @@ dependencies = [
"async-trait",
"base64 0.22.1",
"bytes",
- "cua-auth",
"cua-disk",
"cua-fleet",
"cua-home",