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(cli): move the cua CLI off the Fleet client; whoami uses your Cua sign-in and api.cua.ai (CUA-1834) (#5444)

Francesco Bonacci224e95fddd2b
diff --git a/.github/workflows/ci-py-cli-wif-token.yml b/.github/workflows/ci-py-cli-wif-token.yml
deleted file mode 100644
index 4ffde31d57..0000000000
--- a/.github/workflows/ci-py-cli-wif-token.yml
+++ /dev/null
@@ -1,67 +0,0 @@
-name: "CI: cua CLI GitHub WIF token"
-
-# Checks that `cua wif-token github` (Rust CLI) returns a GitHub Actions
-# OIDC token with the Fleets audience. The file name is kept from the
-# former Python CLI.
-
-on:
- push:
- branches: [main]
- paths:
- - "libs/cua/crates/cua-cli/**"
- - ".github/workflows/ci-py-cli-wif-token.yml"
- workflow_dispatch:
-
-permissions:
- contents: read
- id-token: write
-
-env:
- CARGO_NET_RETRY: "10"
- CARGO_HTTP_TIMEOUT: "120"
- CARGO_HTTP_MULTIPLEXING: "false"
- # Cua programs and packages run here never send usage telemetry.
- CUA_TELEMETRY: "0"
- DO_NOT_TRACK: "1"
-
-jobs:
- smoke:
- runs-on: ubuntu-latest
- timeout-minutes: 45
- steps:
- - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- - name: Install protoc
- uses: ./.github/actions/setup-protoc
- - uses: dtolnay/[email protected]
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
- with:
- workspaces: libs/cua
- key: cua-cli-wif-token
- - name: Build the cua CLI
- working-directory: libs/cua
- env:
- CARGO_BUILD_JOBS: "4"
- run: cargo build --locked -p cua-cli
- - name: Validate GitHub WIF token claims
- shell: bash
- run: |
- set -euo pipefail
- FLEETS_TOKEN="$(libs/cua/target/debug/cua wif-token github)"
- export FLEETS_TOKEN
- python3 - <<'PY'
- import base64
- import json
- import os
-
- parts = os.environ["FLEETS_TOKEN"].split(".")
- if len(parts) != 3:
- raise SystemExit("GitHub returned a non-JWT token")
- payload = parts[1] + "=" * (-len(parts[1]) % 4)
- claims = json.loads(base64.urlsafe_b64decode(payload))
- if claims.get("iss") != "https://token.actions.githubusercontent.com":
- raise SystemExit("unexpected issuer")
- aud = claims.get("aud")
- if aud != "fleets" and not (isinstance(aud, list) and "fleets" in aud):
- raise SystemExit("unexpected audience")
- PY
- unset FLEETS_TOKEN
diff --git a/docs/content/docs/cua-cli/guides/authentication.mdx b/docs/content/docs/cua-cli/guides/authentication.mdx
index 301700424a..b6ab92f427 100644
--- a/docs/content/docs/cua-cli/guides/authentication.mdx
+++ b/docs/content/docs/cua-cli/guides/authentication.mdx
@@ -1,6 +1,6 @@
---
title: Authenticate
-description: 'Sign in with cua auth login, see which credential the CLI uses, and create API keys.'
+description: 'Sign in with cua auth login, see who is signed in, and sign out.'
---
import { Callout } from 'fumadocs-ui/components/callout';
@@ -13,7 +13,7 @@ share one credential store. Local sandboxes need no sign-in.
```bash test="cli-shape" id="cua-auth-login"
cua auth login # browser (PKCE, loopback redirect)
cua auth login --remote # device code, for SSH sessions
-cua auth whoami # the credential in use
+cua auth whoami # who is signed in, with plan and teams
cua auth status # session and expiry, no network
cua auth logout # revoke and remove the session
```
@@ -44,30 +44,9 @@ terminal once and choose Always Allow. `CUA_KEYCHAIN_NONINTERACTIVE=1` turns
prompts off, `0` allows them without a terminal, and
`CUA_KEYCHAIN_TIMEOUT_SECS` (default 5) sets how long a call may take.
-## Which credential the CLI uses
-
-The first that is set wins:
-
-| Order | Source | For |
-|-------|--------|-----|
-| 1 | `CUA_CLIENT_ID` + `CUA_CLIENT_SECRET` | An API key, for scripts and servers (`CUA_TOKEN_URL` overrides the endpoint). |
-| 2 | The `cua auth login` session | Interactive use. |
-
-Legacy `key_...` keys belong to the retired VM API and no longer work.
-
-## API keys
-
-Create keys from a login session (an API key cannot manage keys: exit `6`):
-
-```bash test="cli-shape" id="cua-auth-keys"
-cua auth keys create ci-runner # prints CUA_CLIENT_ID and CUA_CLIENT_SECRET once
-cua auth keys ls
-cua auth keys rm <id>
-```
-
<Callout type="warn">
The stored refresh token mints access tokens until revoked. On shared hosts,
- run `cua auth logout` when done, or use an API key.
+ run `cua auth logout` when done, or sign in again when you need it.
</Callout>
## Targeting staging
diff --git a/docs/content/docs/cua-cli/index.mdx b/docs/content/docs/cua-cli/index.mdx
index cd2dfcf973..745d3d85bf 100644
--- a/docs/content/docs/cua-cli/index.mdx
+++ b/docs/content/docs/cua-cli/index.mdx
@@ -24,7 +24,7 @@ flags: [Install Cua Spaces](/spaces/guides/install).
| Group | Alias | Purpose |
|-------|-------|---------|
-| `cua auth` | | Sign in, session, API keys ([Authentication](/cua-cli/guides/authentication)). |
+| `cua auth` | | Sign in, session ([Authentication](/cua-cli/guides/authentication)). |
| `cua agents` | | Install cua skills and the cua MCP server into AI coding agents. |
| `cua sandbox` | `sb` | Create, list and operate sandboxes; `--on local\|aws\|gcp\|modal\|direct:<addr>`, `--kind`, `--runtime`. |
| `cua config` | | User defaults: where sandboxes run (`default.on`), the default kind and runtime. |
@@ -53,7 +53,7 @@ and the [CLI reference](/cua-cli/reference/cli) list every option.
| `1` | Failure. |
| `2` | Invalid argument. |
| `3` | Not found (sandbox, window, skill, image). |
-| `4` | Not supported or not configured (for example no cloud credentials). |
+| `4` | Not supported or not configured (for example no provider credentials). |
| `5` | No cua-spacesd answered, or a transport failure. |
| `6` | Unauthenticated or permission denied. |
| `7` | Not enough free disk for a pull, build or VM create (`cua cache prune`). |
diff --git a/docs/content/docs/cua-cli/quickstart.mdx b/docs/content/docs/cua-cli/quickstart.mdx
index bf9748972f..d277e0e21c 100644
--- a/docs/content/docs/cua-cli/quickstart.mdx
+++ b/docs/content/docs/cua-cli/quickstart.mdx
@@ -57,6 +57,6 @@ cua sb rm desk
## Next
-- [Authentication](/cua-cli/guides/authentication): API keys and CI.
+- [Authentication](/cua-cli/guides/authentication): sign in, check who is signed in, sign out.
- [MCP server](/cua-cli/guides/mcp-server): give an AI agent these sandboxes.
- [CLI reference](/cua-cli/reference/cli): every command and option.
diff --git a/docs/content/docs/cua-cli/reference/cli/agent.mdx b/docs/content/docs/cua-cli/reference/cli/agent.mdx
index 58b39e61b8..e44b965f50 100644
--- a/docs/content/docs/cua-cli/reference/cli/agent.mdx
+++ b/docs/content/docs/cua-cli/reference/cli/agent.mdx
@@ -64,7 +64,7 @@ cua agent run [OPTIONS] <SANDBOX> <HARNESS> <PROMPT>
| Argument | Type | Default | Description |
| --- | --- | --- | --- |
-| `<SANDBOX>` | string | required | Sandbox (`local:NAME`, `cloud:NAME`, `direct:HOST:PORT`, or NAME). |
+| `<SANDBOX>` | string | required | Sandbox (`local:NAME`, `direct:HOST:PORT`, or NAME). |
| `<HARNESS>` | string | required | Harness (`cua agent harnesses`). |
| `<PROMPT>` | string | required | The task. |
@@ -81,7 +81,6 @@ cua agent run [OPTIONS] <SANDBOX> <HARNESS> <PROMPT>
| <span id="cua-agent-run--file"></span>`--file` | | path | | Attach a local file to the prompt (repeatable). |
| <span id="cua-agent-run--label"></span>`--label` | | string | | |
| <span id="cua-agent-run--local"></span>`--local` | | boolean | `false` | Look NAME up among local sandboxes only (same as `local:NAME`). |
-| <span id="cua-agent-run--cloud"></span>`--cloud` | | boolean | `false` | Look NAME up among cloud sandboxes only (same as `cloud:NAME`). |
| <span id="cua-agent-run--no-sandbox-mcp"></span>`--no-sandbox-mcp` | | boolean | `false` | Do not give the agent the sandbox's own MCP tools. |
| <span id="cua-agent-run--no-skills"></span>`--no-skills` | | boolean | `false` | Do not copy the cua skills into the harness. |
| <span id="cua-agent-run--exit-when-idle"></span>`--exit-when-idle` | | boolean | `false` | Stop (resumably) once the prompt is answered. |
@@ -91,7 +90,7 @@ cua agent run [OPTIONS] <SANDBOX> <HARNESS> <PROMPT>
```bash test="cli-shape" id="ref-cua-agent-run"
cua agent run local:dev claude-code "fix the failing test" --env-from-host ANTHROPIC_API_KEY -f
-cua agent run cloud:ci openai-codex "add tests" --repo https://github.com/org/repo --exit-when-idle
+cua agent run local:ci openai-codex "add tests" --repo https://github.com/org/repo --exit-when-idle
```
## `cua agent ls`
@@ -106,12 +105,11 @@ Alias: `cua agent list`.
| Argument | Type | Default | Description |
| --- | --- | --- | --- |
-| `<SANDBOX>` | string | required | Sandbox (`local:NAME`, `cloud:NAME`, `direct:HOST:PORT`, or NAME). |
+| `<SANDBOX>` | string | required | Sandbox (`local:NAME`, `direct:HOST:PORT`, or NAME). |
| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="cua-agent-ls--local"></span>`--local` | boolean | `false` | Look NAME up among local sandboxes only (same as `local:NAME`). |
-| <span id="cua-agent-ls--cloud"></span>`--cloud` | boolean | `false` | Look NAME up among cloud sandboxes only (same as `cloud:NAME`). |
**Examples**
@@ -135,7 +133,6 @@ cua agent logs [OPTIONS] <SANDBOX> <RUN_ID>
| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <span id="cua-agent-logs--local"></span>`--local` | | boolean | `false` | Look NAME up among local sandboxes only (same as `local:NAME`). |
-| <span id="cua-agent-logs--cloud"></span>`--cloud` | | boolean | `false` | Look NAME up among cloud sandboxes only (same as `cloud:NAME`). |
| <span id="cua-agent-logs--follow"></span>`--follow` | `-f` | boolean | `false` | Keep streaming until the turn ends. |
| <span id="cua-agent-logs--raw"></span>`--raw` | | boolean | `false` | Print each event's JSON (raw ACP payload included). |
@@ -162,7 +159,6 @@ cua agent send [OPTIONS] <SANDBOX> <RUN_ID> <TEXT>
| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <span id="cua-agent-send--local"></span>`--local` | | boolean | `false` | Look NAME up among local sandboxes only (same as `local:NAME`). |
-| <span id="cua-agent-send--cloud"></span>`--cloud` | | boolean | `false` | Look NAME up among cloud sandboxes only (same as `cloud:NAME`). |
| <span id="cua-agent-send--follow"></span>`--follow` | `-f` | boolean | `false` | |
**Examples**
@@ -187,7 +183,6 @@ cua agent interrupt [OPTIONS] <SANDBOX> <RUN_ID>
| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="cua-agent-interrupt--local"></span>`--local` | boolean | `false` | Look NAME up among local sandboxes only (same as `local:NAME`). |
-| <span id="cua-agent-interrupt--cloud"></span>`--cloud` | boolean | `false` | Look NAME up among cloud sandboxes only (same as `cloud:NAME`). |
**Examples**
@@ -211,7 +206,6 @@ cua agent stop [OPTIONS] <SANDBOX> <RUN_ID>
| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="cua-agent-stop--local"></span>`--local` | boolean | `false` | Look NAME up among local sandboxes only (same as `local:NAME`). |
-| <span id="cua-agent-stop--cloud"></span>`--cloud` | boolean | `false` | Look NAME up among cloud sandboxes only (same as `cloud:NAME`). |
**Examples**
@@ -235,7 +229,6 @@ cua agent status [OPTIONS] <SANDBOX> <RUN_ID>
| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="cua-agent-status--local"></span>`--local` | boolean | `false` | Look NAME up among local sandboxes only (same as `local:NAME`). |
-| <span id="cua-agent-status--cloud"></span>`--cloud` | boolean | `false` | Look NAME up among cloud sandboxes only (same as `cloud:NAME`). |
**Examples**
@@ -259,7 +252,6 @@ cua agent rm [OPTIONS] <SANDBOX> <RUN_ID>
| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="cua-agent-rm--local"></span>`--local` | boolean | `false` | Look NAME up among local sandboxes only (same as `local:NAME`). |
-| <span id="cua-agent-rm--cloud"></span>`--cloud` | boolean | `false` | Look NAME up among cloud sandboxes only (same as `cloud:NAME`). |
**Examples**
@@ -283,7 +275,6 @@ cua agent ensure [OPTIONS] <SANDBOX> <IDS>...
| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="cua-agent-ensure--local"></span>`--local` | boolean | `false` | Look NAME up among local sandboxes only (same as `local:NAME`). |
-| <span id="cua-agent-ensure--cloud"></span>`--cloud` | boolean | `false` | Look NAME up among cloud sandboxes only (same as `cloud:NAME`). |
**Examples**
@@ -402,7 +393,7 @@ cua agent create [OPTIONS] --harness <HARNESS> --in <SPACE> <NAME>
```bash test="cli-shape" id="ref-cua-agent-create"
cua agent create ada --harness hermes --in local:dev --env-from-host OPENAI_API_KEY
-cua agent create scout --harness claude-code --in cloud:scout --env-from-host ANTHROPIC_API_KEY
+cua agent create scout --harness claude-code --in local:scout --env-from-host ANTHROPIC_API_KEY
```
## `cua agent persistent`
@@ -716,9 +707,9 @@ cua agent notifications --mark-read
| --- | --- |
| `0` | Success. |
| `1` | Failure, or `cua do` reported an error. |
-| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`, `cloud:NAME`). |
+| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`). |
| `3` | Not found: sandbox, window, skill or image (or an image not published yet). |
-| `4` | Not supported, or not configured (for example no cloud credentials). |
+| `4` | Not supported, or not configured (for example no provider credentials). |
| `5` | No cua-spacesd answered, or a transport failure. |
| `6` | Unauthenticated or permission denied (by Cua or your cloud account). |
| `7` | Not enough free disk space (see `cua cache`). |
diff --git a/docs/content/docs/cua-cli/reference/cli/agents.mdx b/docs/content/docs/cua-cli/reference/cli/agents.mdx
index 6025ef264a..4619d83d68 100644
--- a/docs/content/docs/cua-cli/reference/cli/agents.mdx
+++ b/docs/content/docs/cua-cli/reference/cli/agents.mdx
@@ -135,9 +135,9 @@ cua agents update
| --- | --- |
| `0` | Success. |
| `1` | Failure, or `cua do` reported an error. |
-| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`, `cloud:NAME`). |
+| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`). |
| `3` | Not found: sandbox, window, skill or image (or an image not published yet). |
-| `4` | Not supported, or not configured (for example no cloud credentials). |
+| `4` | Not supported, or not configured (for example no provider credentials). |
| `5` | No cua-spacesd answered, or a transport failure. |
| `6` | Unauthenticated or permission denied (by Cua or your cloud account). |
| `7` | Not enough free disk space (see `cua cache`). |
diff --git a/docs/content/docs/cua-cli/reference/cli/auth.mdx b/docs/content/docs/cua-cli/reference/cli/auth.mdx
index 6671b43af4..283dc5f5c9 100644
--- a/docs/content/docs/cua-cli/reference/cli/auth.mdx
+++ b/docs/content/docs/cua-cli/reference/cli/auth.mdx
@@ -1,6 +1,6 @@
---
title: "cua auth"
-description: "Sign in, inspect your Fleet identity, manage API keys and CI tokens."
+description: "Sign in and out, see who is signed in, and store sandbox provider keys."
---
{/*
@@ -12,33 +12,26 @@ description: "Sign in, inspect your Fleet identity, manage API keys and CI token
| Command | Description |
| --- | --- |
-| [`cua auth`](#cua-auth) | Log in to Cua and inspect Fleet identity. |
| [`cua auth login`](#cua-auth-login) | Log in (browser sign-in; `--remote` for a device code), then offer to set up your AI coding agents. |
| [`cua auth logout`](#cua-auth-logout) | Revoke and remove the local session. |
| [`cua auth status`](#cua-auth-status) | Local session state (no network). |
-| [`cua auth whoami`](#cua-auth-whoami) | The active Fleet identity, verified against Fleet. |
-| [`cua auth keys`](#cua-auth-keys) | Fleet user API keys (client credentials). |
-| [`cua auth keys ls`](#cua-auth-keys-ls) | List API keys. |
-| [`cua auth keys create`](#cua-auth-keys-create) | Create an API key (prints CUA_CLIENT_ID / CUA_CLIENT_SECRET once). |
-| [`cua auth keys rm`](#cua-auth-keys-rm) | Delete an API key by id. |
+| [`cua auth whoami`](#cua-auth-whoami) | Who is signed in: the account, its plan and its teams. |
| [`cua auth provider`](#cua-auth-provider) | Keys of the contrib sandbox providers (`--on e2b`, `--on daytona`, `--on modal`). |
| [`cua auth provider ls`](#cua-auth-provider-ls) | Providers, whether this build has them and where their keys come from (never the values). |
| [`cua auth provider set`](#cua-auth-provider-set) | Store a provider key, read from stdin (no echo on a terminal). |
| [`cua auth provider rm`](#cua-auth-provider-rm) | Remove a provider's stored keys. |
-| [`cua wif-token`](#cua-wif-token) | Workload identity federation tokens. |
-| [`cua wif-token github`](#cua-wif-token-github) | Print a GitHub Actions OIDC token for Fleets. |
Every command also accepts the [global options](/cua-cli/reference/cli#global-options).
-## `cua auth`
+<span id="cua-auth"></span>
-Log in to Cua and inspect Fleet identity.
+Log in to Cua and manage the signed-in session.
```text output
cua auth [OPTIONS] <COMMAND>
```
-### `cua auth login`
+## `cua auth login`
Log in (browser sign-in; `--remote` for a device code), then offer to set up your AI coding agents.
@@ -71,7 +64,7 @@ cua auth login --remote
cua auth login --agents claude -y
```
-### `cua auth logout`
+## `cua auth logout`
Revoke and remove the local session.
@@ -85,7 +78,7 @@ cua auth logout [OPTIONS]
cua auth logout
```
-### `cua auth status`
+## `cua auth status`
Local session state (no network).
@@ -100,9 +93,9 @@ cua auth status
cua auth status --json
```
-### `cua auth whoami`
+## `cua auth whoami`
-The active Fleet identity, verified against Fleet.
+Who is signed in: the account, its plan and its teams.
```text output
cua auth whoami [OPTIONS]
@@ -112,76 +105,10 @@ cua auth whoami [OPTIONS]
```bash test="cli-shape" id="ref-cua-auth-whoami"
cua auth whoami
+cua auth whoami --json
```
-### `cua auth keys`
-
-Fleet user API keys (client credentials).
-
-```text output
-cua auth keys [OPTIONS] <COMMAND>
-```
-
-#### `cua auth keys ls`
-
-List API keys.
-
-```text output
-cua auth keys ls [OPTIONS]
-```
-
-Alias: `cua auth keys list`.
-
-**Examples**
-
-```bash test="cli-shape" id="ref-cua-auth-keys-ls"
-cua auth keys ls
-```
-
-#### `cua auth keys create`
-
-Create an API key (prints CUA_CLIENT_ID / CUA_CLIENT_SECRET once).
-
-```text output
-cua auth keys create [OPTIONS] <NAME>
-```
-
-| Argument | Type | Default | Description |
-| --- | --- | --- | --- |
-| `<NAME>` | string | required | Key name. |
-
-| Flag | Type | Default | Description |
-| --- | --- | --- | --- |
-| <span id="cua-auth-keys-create--scope"></span>`--scope` | string | | Scopes (repeatable). |
-
-**Examples**
-
-```bash test="cli-shape" id="ref-cua-auth-keys-create"
-# A key for CI
-cua auth keys create ci
-```
-
-#### `cua auth keys rm`
-
-Delete an API key by id.
-
-```text output
-cua auth keys rm [OPTIONS] <ID>
-```
-
-Alias: `cua auth keys delete`.
-
-| Argument | Type | Default | Description |
-| --- | --- | --- | --- |
-| `<ID>` | string | required | Key id (from `cua auth keys ls`). |
-
-**Examples**
-
-```bash test="cli-shape" id="ref-cua-auth-keys-rm"
-cua auth keys rm <key-id>
-```
-
-### `cua auth provider`
+## `cua auth provider`
Keys of the contrib sandbox providers (`--on e2b`, `--on daytona`, `--on modal`).
@@ -189,7 +116,7 @@ Keys of the contrib sandbox providers (`--on e2b`, `--on daytona`, `--on modal`)
cua auth provider [OPTIONS] <COMMAND>
```
-#### `cua auth provider ls`
+### `cua auth provider ls`
Providers, whether this build has them and where their keys come from (never the values).
@@ -206,7 +133,7 @@ cua auth provider ls
cua auth provider ls --json
```
-#### `cua auth provider set`
+### `cua auth provider set`
Store a provider key, read from stdin (no echo on a terminal). An environment variable of the same name wins over the stored key.
@@ -232,7 +159,7 @@ cua auth provider set e2b
cua auth provider set daytona --var DAYTONA_API_KEY
```
-#### `cua auth provider rm`
+### `cua auth provider rm`
Remove a provider's stored keys.
@@ -252,42 +179,15 @@ Alias: `cua auth provider delete`.
cua auth provider rm e2b
```
-## `cua wif-token`
-
-Workload identity federation tokens.
-
-```text output
-cua wif-token [OPTIONS] <COMMAND>
-```
-
-### `cua wif-token github`
-
-Print a GitHub Actions OIDC token for Fleets.
-
-```text output
-cua wif-token github [OPTIONS]
-```
-
-| Flag | Type | Default | Description |
-| --- | --- | --- | --- |
-| <span id="cua-wif-token-github--audience"></span>`--audience` | string | `fleets` | Token audience. |
-
-**Examples**
-
-```bash test="cli-shape" id="ref-cua-wif-token-github"
-# In a GitHub Actions job with `id-token: write`
-cua wif-token github
-```
-
## Exit codes
| Code | Meaning |
| --- | --- |
| `0` | Success. |
| `1` | Failure, or `cua do` reported an error. |
-| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`, `cloud:NAME`). |
+| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`). |
| `3` | Not found: sandbox, window, skill or image (or an image not published yet). |
-| `4` | Not supported, or not configured (for example no cloud credentials). |
+| `4` | Not supported, or not configured (for example no provider credentials). |
| `5` | No cua-spacesd answered, or a transport failure. |
| `6` | Unauthenticated or permission denied (by Cua or your cloud account). |
| `7` | Not enough free disk space (see `cua cache`). |
diff --git a/docs/content/docs/cua-cli/reference/cli/cache.mdx b/docs/content/docs/cua-cli/reference/cli/cache.mdx
index 433375f133..df37b265d9 100644
--- a/docs/content/docs/cua-cli/reference/cli/cache.mdx
+++ b/docs/content/docs/cua-cli/reference/cli/cache.mdx
@@ -121,9 +121,9 @@ cua cache config --budget 20G --min-free 10G
| --- | --- |
| `0` | Success. |
| `1` | Failure, or `cua do` reported an error. |
-| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`, `cloud:NAME`). |
+| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`). |
| `3` | Not found: sandbox, window, skill or image (or an image not published yet). |
-| `4` | Not supported, or not configured (for example no cloud credentials). |
+| `4` | Not supported, or not configured (for example no provider credentials). |
| `5` | No cua-spacesd answered, or a transport failure. |
| `6` | Unauthenticated or permission denied (by Cua or your cloud account). |
| `7` | Not enough free disk space (see `cua cache`). |
diff --git a/docs/content/docs/cua-cli/reference/cli/cloud.mdx b/docs/content/docs/cua-cli/reference/cli/cloud.mdx
index b0137d1170..a48ee5bb4f 100644
--- a/docs/content/docs/cua-cli/reference/cli/cloud.mdx
+++ b/docs/content/docs/cua-cli/reference/cli/cloud.mdx
@@ -168,9 +168,9 @@ cua cloud sweep --all --delete
| --- | --- |
| `0` | Success. |
| `1` | Failure, or `cua do` reported an error. |
-| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`, `cloud:NAME`). |
+| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`). |
| `3` | Not found: sandbox, window, skill or image (or an image not published yet). |
-| `4` | Not supported, or not configured (for example no cloud credentials). |
+| `4` | Not supported, or not configured (for example no provider credentials). |
| `5` | No cua-spacesd answered, or a transport failure. |
| `6` | Unauthenticated or permission denied (by Cua or your cloud account). |
| `7` | Not enough free disk space (see `cua cache`). |
diff --git a/docs/content/docs/cua-cli/reference/cli/config.mdx b/docs/content/docs/cua-cli/reference/cli/config.mdx
index 66260e42f5..367e27bf85 100644
--- a/docs/content/docs/cua-cli/reference/cli/config.mdx
+++ b/docs/content/docs/cua-cli/reference/cli/config.mdx
@@ -1,6 +1,6 @@
---
title: "cua config"
-description: "User defaults: where sandboxes run (`default.on`), the default kind and runtime, cloud defaults."
+description: "User defaults: where sandboxes run (`default.on`), the default kind and runtime."
---
{/*
@@ -22,7 +22,7 @@ Every command also accepts the [global options](/cua-cli/reference/cli#global-op
<span id="cua-config"></span>
-User defaults (~/.cua/config.toml): where sandboxes run when --on is not given (default.on), the default kind and runtime, cloud defaults.
+User defaults (~/.cua/config.toml): where sandboxes run when --on is not given (default.on), the default kind and runtime.
```text output
cua config [OPTIONS] <COMMAND>
@@ -55,7 +55,7 @@ cua config get [OPTIONS] <KEY>
| Argument | Type | Default | Description |
| --- | --- | --- | --- |
-| `<KEY>` | string | required | Setting (`default.on`, `default.kind`, `default.runtime`, `cloud.warm`, `cloud.max_pool_size`, `cloud.claim_ttl`). |
+| `<KEY>` | string | required | Setting (`default.on`, `default.kind`, `default.runtime`). |
**Examples**
@@ -74,13 +74,13 @@ cua config set [OPTIONS] <KEY> <VALUE>
| Argument | Type | Default | Description |
| --- | --- | --- | --- |
| `<KEY>` | string | required | Setting. |
-| `<VALUE>` | string | required | Value (checked: `default.on` takes local, cloud or a provider). |
+| `<VALUE>` | string | required | Value (checked: `default.on` takes local, aws, gcp, modal or a provider). |
**Examples**
```bash test="cli-shape" id="ref-cua-config-set"
-# Create sandboxes in the cloud unless --on says otherwise
-cua config set default.on cloud
+# Create sandboxes in your AWS account unless --on says otherwise
+cua config set default.on aws
# Back to this machine
cua config set default.on local
@@ -127,9 +127,9 @@ cua config path
| --- | --- |
| `0` | Success. |
| `1` | Failure, or `cua do` reported an error. |
-| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`, `cloud:NAME`). |
+| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`). |
| `3` | Not found: sandbox, window, skill or image (or an image not published yet). |
-| `4` | Not supported, or not configured (for example no cloud credentials). |
+| `4` | Not supported, or not configured (for example no provider credentials). |
| `5` | No cua-spacesd answered, or a transport failure. |
| `6` | Unauthenticated or permission denied (by Cua or your cloud account). |
| `7` | Not enough free disk space (see `cua cache`). |
diff --git a/docs/content/docs/cua-cli/reference/cli/daemon.mdx b/docs/content/docs/cua-cli/reference/cli/daemon.mdx
index 2f3fce9683..7be720dcff 100644
--- a/docs/content/docs/cua-cli/reference/cli/daemon.mdx
+++ b/docs/content/docs/cua-cli/reference/cli/daemon.mdx
@@ -104,9 +104,9 @@ cua daemon mcp --permissions spaces:all
| --- | --- |
| `0` | Success. |
| `1` | Failure, or `cua do` reported an error. |
-| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`, `cloud:NAME`). |
+| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`). |
| `3` | Not found: sandbox, window, skill or image (or an image not published yet). |
-| `4` | Not supported, or not configured (for example no cloud credentials). |
+| `4` | Not supported, or not configured (for example no provider credentials). |
| `5` | No cua-spacesd answered, or a transport failure. |
| `6` | Unauthenticated or permission denied (by Cua or your cloud account). |
| `7` | Not enough free disk space (see `cua cache`). |
diff --git a/docs/content/docs/cua-cli/reference/cli/devices.mdx b/docs/content/docs/cua-cli/reference/cli/devices.mdx
index c7c2b562ca..9ee5445dbc 100644
--- a/docs/content/docs/cua-cli/reference/cli/devices.mdx
+++ b/docs/content/docs/cua-cli/reference/cli/devices.mdx
@@ -196,9 +196,9 @@ cua devices audit --limit 20 --json
| --- | --- |
| `0` | Success. |
| `1` | Failure, or `cua do` reported an error. |
-| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`, `cloud:NAME`). |
+| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`). |
| `3` | Not found: sandbox, window, skill or image (or an image not published yet). |
-| `4` | Not supported, or not configured (for example no cloud credentials). |
+| `4` | Not supported, or not configured (for example no provider credentials). |
| `5` | No cua-spacesd answered, or a transport failure. |
| `6` | Unauthenticated or permission denied (by Cua or your cloud account). |
| `7` | Not enough free disk space (see `cua cache`). |
diff --git a/docs/content/docs/cua-cli/reference/cli/do.mdx b/docs/content/docs/cua-cli/reference/cli/do.mdx
index c8c4cceebc..ceb86d8a42 100644
--- a/docs/content/docs/cua-cli/reference/cli/do.mdx
+++ b/docs/content/docs/cua-cli/reference/cli/do.mdx
@@ -99,7 +99,6 @@ cua do switch [OPTIONS] <TARGET> [NAME]
```bash test="cli-shape" id="ref-cua-do-switch"
cua do switch dev
-cua do switch cloud:dev
cua do switch relay:0123abcd4567ef89
# This machine (after `cua do-host-consent`)
@@ -770,9 +769,9 @@ cua do-host-consent
| --- | --- |
| `0` | Success. |
| `1` | Failure, or `cua do` reported an error. |
-| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`, `cloud:NAME`). |
+| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`). |
| `3` | Not found: sandbox, window, skill or image (or an image not published yet). |
-| `4` | Not supported, or not configured (for example no cloud credentials). |
+| `4` | Not supported, or not configured (for example no provider credentials). |
| `5` | No cua-spacesd answered, or a transport failure. |
| `6` | Unauthenticated or permission denied (by Cua or your cloud account). |
| `7` | Not enough free disk space (see `cua cache`). |
diff --git a/docs/content/docs/cua-cli/reference/cli/doctor.mdx b/docs/content/docs/cua-cli/reference/cli/doctor.mdx
index 3da025b1bf..4f950d530e 100644
--- a/docs/content/docs/cua-cli/reference/cli/doctor.mdx
+++ b/docs/content/docs/cua-cli/reference/cli/doctor.mdx
@@ -23,7 +23,7 @@ cua doctor [OPTIONS] [TARGET]
| Argument | Type | Default | Description |
| --- | --- | --- | --- |
-| `<TARGET>` | string | optional | Sandbox to check: `local:<name>`, `cloud:<name>`, `direct:<host:port>`, a bare name, or a spacesd URL. Omit for the host checks only. |
+| `<TARGET>` | string | optional | Sandbox to check: `local:<name>`, `direct:<host:port>`, a bare name, or a spacesd URL. Omit for the host checks only. |
| Flag | Type | Default | Env var | Description |
| --- | --- | --- | --- | --- |
@@ -53,7 +53,7 @@ cua doctor
cua doctor dev
# CI: fail on warnings, write JUnit XML
-cua doctor cloud:dev --strict --junit doctor.xml
+cua doctor local:dev --strict --junit doctor.xml
```
## `cua doctor parity`
@@ -91,9 +91,9 @@ cua doctor parity local:linux-rootfs local:linux-vm --out parity.json
| --- | --- |
| `0` | Success. |
| `1` | Failure, or `cua do` reported an error. |
-| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`, `cloud:NAME`). |
+| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`). |
| `3` | Not found: sandbox, window, skill or image (or an image not published yet). |
-| `4` | Not supported, or not configured (for example no cloud credentials). |
+| `4` | Not supported, or not configured (for example no provider credentials). |
| `5` | No cua-spacesd answered, or a transport failure. |
| `6` | Unauthenticated or permission denied (by Cua or your cloud account). |
| `7` | Not enough free disk space (see `cua cache`). |
diff --git a/docs/content/docs/cua-cli/reference/cli/host.mdx b/docs/content/docs/cua-cli/reference/cli/host.mdx
index 13403b0d33..92559f8ed4 100644
--- a/docs/content/docs/cua-cli/reference/cli/host.mdx
+++ b/docs/content/docs/cua-cli/reference/cli/host.mdx
@@ -251,9 +251,9 @@ cua host remove --force
| --- | --- |
| `0` | Success. |
| `1` | Failure, or `cua do` reported an error. |
-| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`, `cloud:NAME`). |
+| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`). |
| `3` | Not found: sandbox, window, skill or image (or an image not published yet). |
-| `4` | Not supported, or not configured (for example no cloud credentials). |
+| `4` | Not supported, or not configured (for example no provider credentials). |
| `5` | No cua-spacesd answered, or a transport failure. |
| `6` | Unauthenticated or permission denied (by Cua or your cloud account). |
| `7` | Not enough free disk space (see `cua cache`). |
diff --git a/docs/content/docs/cua-cli/reference/cli/image.mdx b/docs/content/docs/cua-cli/reference/cli/image.mdx
index 5d1401a7c6..ec350c893d 100644
--- a/docs/content/docs/cua-cli/reference/cli/image.mdx
+++ b/docs/content/docs/cua-cli/reference/cli/image.mdx
@@ -1,6 +1,6 @@
---
title: "cua image"
-description: "Pull, build and push OCI images, and manage Fleet image resources; list the image catalog."
+description: "Pull, build and push OCI images; list the image catalog."
---
{/*
@@ -12,16 +12,12 @@ description: "Pull, build and push OCI images, and manage Fleet image resources;
| Command | Description |
| --- | --- |
-| [`cua image`](#cua-image) | Images: local OCI pull/build/push and Fleet image resources. |
+| [`cua image`](#cua-image) | Images: local OCI pull/build/push. |
| [`cua image pull`](#cua-image-pull) | Pull an image into the local cache. |
| [`cua image build`](#cua-image-build) | Build an image from an images.cua.ai/v1alpha1 Image resource (JSON). |
| [`cua image push`](#cua-image-push) | Copy an image (host architecture) to another registry reference. |
-| [`cua image ls`](#cua-image-ls) | List Fleet image resources. |
-| [`cua image info`](#cua-image-info) | Show a Fleet image resource. |
-| [`cua image rm`](#cua-image-rm) | Delete a Fleet image resource. |
-| [`cua image create`](#cua-image-create) | Submit an Image manifest (JSON) to Fleet for a remote build. |
| [`cua images`](#cua-images) | The sandbox image catalog (the images the docs list): which exist, their variants, and which ship cua-spacesd and a browser. |
-| [`cua images ls`](#cua-images-ls) | List the catalog: ref, OS, container or VM, local and cloud runtime, cua-spacesd, browsers, summary. |
+| [`cua images ls`](#cua-images-ls) | List the catalog: ref, OS, container or VM, local runtime, cua-spacesd, browsers, summary. |
| [`cua images info`](#cua-images-info) | Show one catalog entry (a ref or an alias such as `linux`). |
| [`cua images build`](#cua-images-build) | Build a sandbox image definition (a libs/images directory): the rootfs, the bootable VM disk and the KubeVirt containerDisk. |
| [`cua images pack`](#cua-images-pack) | Pack the disks `cua images build --outputs disk` wrote as KubeVirt containerDisks `<repo>:<tag>-<arch>` (push, or load into docker). |
@@ -33,7 +29,7 @@ Every command also accepts the [global options](/cua-cli/reference/cli#global-op
## `cua image`
-Images: local OCI pull/build/push and Fleet image resources.
+Images: local OCI pull/build/push.
```text output
cua image [OPTIONS] <COMMAND>
@@ -103,93 +99,6 @@ cua image push [OPTIONS] <REFERENCE> <DESTINATION>
cua image push linux ghcr.io/acme/desktop:1
```
-### `cua image ls`
-
-List Fleet image resources.
-
-```text output
-cua image ls [OPTIONS]
-```
-
-Alias: `cua image list`.
-
-| Flag | Type | Default | Description |
-| --- | --- | --- | --- |
-| <span id="cua-image-ls--namespace"></span>`--namespace` | string | | Namespace (default: every namespace, or CUA_FLEET_NAMESPACE). |
-
-**Examples**
-
-```bash test="cli-shape" id="ref-cua-image-ls"
-cua image ls
-cua image ls --namespace acme
-```
-
-### `cua image info`
-
-Show a Fleet image resource.
-
-```text output
-cua image info [OPTIONS] <NAME>
-```
-
-| Argument | Type | Default | Description |
-| --- | --- | --- | --- |
-| `<NAME>` | string | required | Image resource name. |
-
-| Flag | Type | Default | Description |
-| --- | --- | --- | --- |
-| <span id="cua-image-info--namespace"></span>`--namespace` | string | | Namespace (default: CUA_FLEET_NAMESPACE). |
-
-**Examples**
-
-```bash test="cli-shape" id="ref-cua-image-info"
-cua image info desktop
-```
-
-### `cua image rm`
-
-Delete a Fleet image resource.
-
-```text output
-cua image rm [OPTIONS] <NAME>
-```
-
-Alias: `cua image delete`.
-
-| Argument | Type | Default | Description |
-| --- | --- | --- | --- |
-| `<NAME>` | string | required | Image resource name. |
-
-| Flag | Type | Default | Description |
-| --- | --- | --- | --- |
-| <span id="cua-image-rm--namespace"></span>`--namespace` | string | | Namespace (default: CUA_FLEET_NAMESPACE). |
-| <span id="cua-image-rm--force"></span>`--force` | boolean | `false` | Do not ask for confirmation. |
-
-**Examples**
-
-```bash test="cli-shape" id="ref-cua-image-rm"
-cua image rm desktop
-```
-
-### `cua image create`
-
-Submit an Image manifest (JSON) to Fleet for a remote build.
-
-```text output
-cua image create [OPTIONS] --file <FILE>
-```
-
-| Flag | Short | Type | Default | Description |
-| --- | --- | --- | --- | --- |
-| <span id="cua-image-create--file"></span>`--file` | `-f` | path | required | Image manifest file (JSON). |
-| <span id="cua-image-create--namespace"></span>`--namespace` | | string | | Namespace (default: CUA_FLEET_NAMESPACE). |
-
-**Examples**
-
-```bash test="cli-shape" id="ref-cua-image-create"
-cua image create -f image.json
-```
-
## `cua images`
The sandbox image catalog (the images the docs list): which exist, their variants, and which ship cua-spacesd and a browser.
@@ -200,7 +109,7 @@ cua images [OPTIONS] <COMMAND>
### `cua images ls`
-List the catalog: ref, OS, container or VM, local and cloud runtime, cua-spacesd, browsers, summary.
+List the catalog: ref, OS, container or VM, local runtime, cua-spacesd, browsers, summary.
```text output
cua images ls [OPTIONS]
@@ -430,9 +339,9 @@ cua images promote pins.json --dry-run
| --- | --- |
| `0` | Success. |
| `1` | Failure, or `cua do` reported an error. |
-| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`, `cloud:NAME`). |
+| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`). |
| `3` | Not found: sandbox, window, skill or image (or an image not published yet). |
-| `4` | Not supported, or not configured (for example no cloud credentials). |
+| `4` | Not supported, or not configured (for example no provider credentials). |
| `5` | No cua-spacesd answered, or a transport failure. |
| `6` | Unauthenticated or permission denied (by Cua or your cloud account). |
| `7` | Not enough free disk space (see `cua cache`). |
diff --git a/docs/content/docs/cua-cli/reference/cli/index.mdx b/docs/content/docs/cua-cli/reference/cli/index.mdx
index 1c0ff1d6ea..b8fe5b89f8 100644
--- a/docs/content/docs/cua-cli/reference/cli/index.mdx
+++ b/docs/content/docs/cua-cli/reference/cli/index.mdx
@@ -20,20 +20,19 @@ Run `cua <command> --help` for the build you have.
### `cua auth`
-Sign in, inspect your Fleet identity, manage API keys and CI tokens. [Reference](/cua-cli/reference/cli/auth).
+Sign in and out, see who is signed in, and store sandbox provider keys. [Reference](/cua-cli/reference/cli/auth).
| Command | Description | Subcommands |
| --- | --- | --- |
-| <span id="cua-auth-login"></span><span id="cua-auth-logout"></span><span id="cua-auth-status"></span><span id="cua-auth-whoami"></span><span id="cua-auth-keys"></span><span id="cua-auth-keys-ls"></span><span id="cua-auth-keys-create"></span><span id="cua-auth-keys-rm"></span><span id="cua-auth-provider"></span><span id="cua-auth-provider-ls"></span><span id="cua-auth-provider-set"></span><span id="cua-auth-provider-rm"></span>[`cua auth`](/cua-cli/reference/cli/auth#cua-auth) | Log in to Cua and inspect Fleet identity. | [`login`](/cua-cli/reference/cli/auth#cua-auth-login), [`logout`](/cua-cli/reference/cli/auth#cua-auth-logout), [`status`](/cua-cli/reference/cli/auth#cua-auth-status), [`whoami`](/cua-cli/reference/cli/auth#cua-auth-whoami), [`keys`](/cua-cli/reference/cli/auth#cua-auth-keys), [`keys ls`](/cua-cli/reference/cli/auth#cua-auth-keys-ls), [`keys create`](/cua-cli/reference/cli/auth#cua-auth-keys-create), [`keys rm`](/cua-cli/reference/cli/auth#cua-auth-keys-rm), [`provider`](/cua-cli/reference/cli/auth#cua-auth-provider), [`provider ls`](/cua-cli/reference/cli/auth#cua-auth-provider-ls), [`provider set`](/cua-cli/reference/cli/auth#cua-auth-provider-set), [`provider rm`](/cua-cli/reference/cli/auth#cua-auth-provider-rm) |
-| <span id="cua-wif-token"></span><span id="cua-wif-token-github"></span>[`cua wif-token`](/cua-cli/reference/cli/auth#cua-wif-token) | Workload identity federation tokens. | [`github`](/cua-cli/reference/cli/auth#cua-wif-token-github) |
+| <span id="cua-auth-login"></span><span id="cua-auth-logout"></span><span id="cua-auth-status"></span><span id="cua-auth-whoami"></span><span id="cua-auth-provider"></span><span id="cua-auth-provider-ls"></span><span id="cua-auth-provider-set"></span><span id="cua-auth-provider-rm"></span>[`cua auth`](/cua-cli/reference/cli/auth#cua-auth) | Log in to Cua and manage the signed-in session. | [`login`](/cua-cli/reference/cli/auth#cua-auth-login), [`logout`](/cua-cli/reference/cli/auth#cua-auth-logout), [`status`](/cua-cli/reference/cli/auth#cua-auth-status), [`whoami`](/cua-cli/reference/cli/auth#cua-auth-whoami), [`provider`](/cua-cli/reference/cli/auth#cua-auth-provider), [`provider ls`](/cua-cli/reference/cli/auth#cua-auth-provider-ls), [`provider set`](/cua-cli/reference/cli/auth#cua-auth-provider-set), [`provider rm`](/cua-cli/reference/cli/auth#cua-auth-provider-rm) |
### `cua sandbox`
-Create, list, connect to, suspend and delete sandboxes, local or in the cloud. [Reference](/cua-cli/reference/cli/sandbox).
+Create, list, connect to, suspend and delete sandboxes, local or on your own machines. [Reference](/cua-cli/reference/cli/sandbox).
| Command | Description | Subcommands |
| --- | --- | --- |
-| <span id="cua-sandbox-create"></span><span id="cua-sandbox-launch"></span><span id="cua-sandbox-connect"></span><span id="cua-sandbox-ls"></span><span id="cua-sandbox-info"></span><span id="cua-sandbox-suspend"></span><span id="cua-sandbox-resume"></span><span id="cua-sandbox-restart"></span><span id="cua-sandbox-keep-alive"></span><span id="cua-sandbox-rm"></span>[`cua sandbox`](/cua-cli/reference/cli/sandbox#cua-sandbox) | Sandboxes: local, cloud or an existing machine (direct). | [`create`](/cua-cli/reference/cli/sandbox#cua-sandbox-create), [`launch`](/cua-cli/reference/cli/sandbox#cua-sandbox-launch), [`connect`](/cua-cli/reference/cli/sandbox#cua-sandbox-connect), [`ls`](/cua-cli/reference/cli/sandbox#cua-sandbox-ls), [`info`](/cua-cli/reference/cli/sandbox#cua-sandbox-info), [`suspend`](/cua-cli/reference/cli/sandbox#cua-sandbox-suspend), [`resume`](/cua-cli/reference/cli/sandbox#cua-sandbox-resume), [`restart`](/cua-cli/reference/cli/sandbox#cua-sandbox-restart), [`keep-alive`](/cua-cli/reference/cli/sandbox#cua-sandbox-keep-alive), [`rm`](/cua-cli/reference/cli/sandbox#cua-sandbox-rm) |
+| <span id="cua-sandbox-create"></span><span id="cua-sandbox-launch"></span><span id="cua-sandbox-connect"></span><span id="cua-sandbox-ls"></span><span id="cua-sandbox-info"></span><span id="cua-sandbox-suspend"></span><span id="cua-sandbox-resume"></span><span id="cua-sandbox-restart"></span><span id="cua-sandbox-rm"></span>[`cua sandbox`](/cua-cli/reference/cli/sandbox#cua-sandbox) | Sandboxes: local or an existing machine (direct). | [`create`](/cua-cli/reference/cli/sandbox#cua-sandbox-create), [`launch`](/cua-cli/reference/cli/sandbox#cua-sandbox-launch), [`connect`](/cua-cli/reference/cli/sandbox#cua-sandbox-connect), [`ls`](/cua-cli/reference/cli/sandbox#cua-sandbox-ls), [`info`](/cua-cli/reference/cli/sandbox#cua-sandbox-info), [`suspend`](/cua-cli/reference/cli/sandbox#cua-sandbox-suspend), [`resume`](/cua-cli/reference/cli/sandbox#cua-sandbox-resume), [`restart`](/cua-cli/reference/cli/sandbox#cua-sandbox-restart), [`rm`](/cua-cli/reference/cli/sandbox#cua-sandbox-rm) |
### Sandbox access
@@ -46,19 +45,19 @@ Run commands, copy files, forward ports, take screenshots, reach the MCP and vie
| <span id="cua-sandbox-cp"></span>[`cua sandbox cp`](/cua-cli/reference/cli/sandbox-access#cua-sandbox-cp) | Copy files: `cp NAME:/guest/path LOCAL` or `cp LOCAL NAME:/guest/path` (NAME may be a ref: `cp local:box:/tmp/x .`). | |
| <span id="cua-sandbox-overlay"></span>[`cua sandbox overlay`](/cua-cli/reference/cli/sandbox-access#cua-sandbox-overlay) | Inject freshly built binaries into a running sandbox (see `create --overlay`): NAME=PATH or NAME=PATH:GUEST_PATH. | |
| <span id="cua-sandbox-logs"></span>[`cua sandbox logs`](/cua-cli/reference/cli/sandbox-access#cua-sandbox-logs) | Show logs: the backend console (QEMU serial, container) when there is one, else the guest system log through the spacesd. | |
-| <span id="cua-sandbox-port-forward"></span>[`cua sandbox port-forward`](/cua-cli/reference/cli/sandbox-access#cua-sandbox-port-forward) | Forward a guest port: `port-forward NAME PORT[:LOCAL]` (a local sandbox's port not published at create, and cloud sandboxes, tunnel through cua-spacesd when the image has it; cloud images without it get HTTP and WebSocket through a loopback proxy to the cloud gateway). | |
-| <span id="cua-sandbox-url"></span>[`cua sandbox url`](/cua-cli/reference/cli/sandbox-access#cua-sandbox-url) | Print a URL for a named service: usable from this machine (default), or `--public` for a shareable URL that expires (`--ttl`, default 1h; cloud: a signed URL; local: a token URL served by the cua daemon). | |
+| <span id="cua-sandbox-port-forward"></span>[`cua sandbox port-forward`](/cua-cli/reference/cli/sandbox-access#cua-sandbox-port-forward) | Forward a guest port: `port-forward NAME PORT[:LOCAL]` (a local sandbox's port not published at create tunnels through cua-spacesd when the image has it). | |
+| <span id="cua-sandbox-url"></span>[`cua sandbox url`](/cua-cli/reference/cli/sandbox-access#cua-sandbox-url) | Print a URL for a named service: usable from this machine (default), or `--public` for a shareable URL that expires (`--ttl`, default 1h; a token URL served by the cua daemon). | |
| <span id="cua-sandbox-screenshot"></span>[`cua sandbox screenshot`](/cua-cli/reference/cli/sandbox-access#cua-sandbox-screenshot) | Save a screenshot (PNG). | |
| <span id="cua-sandbox-mcp"></span><span id="cua-sandbox-mcp-config"></span><span id="cua-sandbox-mcp-info"></span><span id="cua-sandbox-mcp-tools"></span><span id="cua-sandbox-mcp-call"></span><span id="cua-sandbox-mcp-resources"></span><span id="cua-sandbox-mcp-templates"></span><span id="cua-sandbox-mcp-read"></span><span id="cua-sandbox-mcp-prompts"></span><span id="cua-sandbox-mcp-prompt"></span><span id="cua-sandbox-mcp-request"></span>[`cua sandbox mcp`](/cua-cli/reference/cli/sandbox-access#cua-sandbox-mcp) | Talk to an MCP server a sandbox serves: `mcp NAME SERVICE tools`, `mcp NAME SERVICE call TOOL '{"a":1}'`. | [`config`](/cua-cli/reference/cli/sandbox-access#cua-sandbox-mcp-config), [`info`](/cua-cli/reference/cli/sandbox-access#cua-sandbox-mcp-info), [`tools`](/cua-cli/reference/cli/sandbox-access#cua-sandbox-mcp-tools), [`call`](/cua-cli/reference/cli/sandbox-access#cua-sandbox-mcp-call), [`resources`](/cua-cli/reference/cli/sandbox-access#cua-sandbox-mcp-resources), [`templates`](/cua-cli/reference/cli/sandbox-access#cua-sandbox-mcp-templates), [`read`](/cua-cli/reference/cli/sandbox-access#cua-sandbox-mcp-read), [`prompts`](/cua-cli/reference/cli/sandbox-access#cua-sandbox-mcp-prompts), [`prompt`](/cua-cli/reference/cli/sandbox-access#cua-sandbox-mcp-prompt), [`request`](/cua-cli/reference/cli/sandbox-access#cua-sandbox-mcp-request) |
| <span id="cua-sandbox-view"></span>[`cua sandbox view`](/cua-cli/reference/cli/sandbox-access#cua-sandbox-view) | Open the sandbox desktop in the browser (the cua-spacesd HTML5 viewer). | |
### `cua config`
-User defaults: where sandboxes run (`default.on`), the default kind and runtime, cloud defaults. [Reference](/cua-cli/reference/cli/config).
+User defaults: where sandboxes run (`default.on`), the default kind and runtime. [Reference](/cua-cli/reference/cli/config).
| Command | Description | Subcommands |
| --- | --- | --- |
-| <span id="cua-config-list"></span><span id="cua-config-get"></span><span id="cua-config-set"></span><span id="cua-config-unset"></span><span id="cua-config-path"></span>[`cua config`](/cua-cli/reference/cli/config#cua-config) | User defaults (~/.cua/config.toml): where sandboxes run when --on is not given (default.on), the default kind and runtime, cloud defaults. | [`list`](/cua-cli/reference/cli/config#cua-config-list), [`get`](/cua-cli/reference/cli/config#cua-config-get), [`set`](/cua-cli/reference/cli/config#cua-config-set), [`unset`](/cua-cli/reference/cli/config#cua-config-unset), [`path`](/cua-cli/reference/cli/config#cua-config-path) |
+| <span id="cua-config-list"></span><span id="cua-config-get"></span><span id="cua-config-set"></span><span id="cua-config-unset"></span><span id="cua-config-path"></span>[`cua config`](/cua-cli/reference/cli/config#cua-config) | User defaults (~/.cua/config.toml): where sandboxes run when --on is not given (default.on), the default kind and runtime. | [`list`](/cua-cli/reference/cli/config#cua-config-list), [`get`](/cua-cli/reference/cli/config#cua-config-get), [`set`](/cua-cli/reference/cli/config#cua-config-set), [`unset`](/cua-cli/reference/cli/config#cua-config-unset), [`path`](/cua-cli/reference/cli/config#cua-config-path) |
### `cua viewer`
@@ -79,11 +78,11 @@ One-shot computer actions (screenshot, click, type, windows) against a selected
### `cua image`
-Pull, build and push OCI images, and manage Fleet image resources; list the image catalog. [Reference](/cua-cli/reference/cli/image).
+Pull, build and push OCI images; list the image catalog. [Reference](/cua-cli/reference/cli/image).
| Command | Description | Subcommands |
| --- | --- | --- |
-| <span id="cua-image-pull"></span><span id="cua-image-build"></span><span id="cua-image-push"></span><span id="cua-image-ls"></span><span id="cua-image-info"></span><span id="cua-image-rm"></span><span id="cua-image-create"></span>[`cua image`](/cua-cli/reference/cli/image#cua-image) | Images: local OCI pull/build/push and Fleet image resources. | [`pull`](/cua-cli/reference/cli/image#cua-image-pull), [`build`](/cua-cli/reference/cli/image#cua-image-build), [`push`](/cua-cli/reference/cli/image#cua-image-push), [`ls`](/cua-cli/reference/cli/image#cua-image-ls), [`info`](/cua-cli/reference/cli/image#cua-image-info), [`rm`](/cua-cli/reference/cli/image#cua-image-rm), [`create`](/cua-cli/reference/cli/image#cua-image-create) |
+| <span id="cua-image-pull"></span><span id="cua-image-build"></span><span id="cua-image-push"></span>[`cua image`](/cua-cli/reference/cli/image#cua-image) | Images: local OCI pull/build/push. | [`pull`](/cua-cli/reference/cli/image#cua-image-pull), [`build`](/cua-cli/reference/cli/image#cua-image-build), [`push`](/cua-cli/reference/cli/image#cua-image-push) |
| <span id="cua-images"></span><span id="cua-images-ls"></span><span id="cua-images-info"></span><span id="cua-images-build"></span><span id="cua-images-pack"></span><span id="cua-images-publish"></span><span id="cua-images-release"></span><span id="cua-images-promote"></span>[`cua images`](/cua-cli/reference/cli/image#cua-images) | The sandbox image catalog (the images the docs list): which exist, their variants, and which ship cua-spacesd and a browser. | [`ls`](/cua-cli/reference/cli/image#cua-images-ls), [`info`](/cua-cli/reference/cli/image#cua-images-info), [`build`](/cua-cli/reference/cli/image#cua-images-build), [`pack`](/cua-cli/reference/cli/image#cua-images-pack), [`publish`](/cua-cli/reference/cli/image#cua-images-publish), [`release`](/cua-cli/reference/cli/image#cua-images-release), [`promote`](/cua-cli/reference/cli/image#cua-images-promote) |
### `cua mcp`
@@ -266,9 +265,9 @@ Accepted by every command, before or after the subcommand.
| --- | --- |
| `0` | Success. |
| `1` | Failure, or `cua do` reported an error. |
-| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`, `cloud:NAME`). |
+| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`). |
| `3` | Not found: sandbox, window, skill or image (or an image not published yet). |
-| `4` | Not supported, or not configured (for example no cloud credentials). |
+| `4` | Not supported, or not configured (for example no provider credentials). |
| `5` | No cua-spacesd answered, or a transport failure. |
| `6` | Unauthenticated or permission denied (by Cua or your cloud account). |
| `7` | Not enough free disk space (see `cua cache`). |
diff --git a/docs/content/docs/cua-cli/reference/cli/keyvault.mdx b/docs/content/docs/cua-cli/reference/cli/keyvault.mdx
index 861da09296..b638703599 100644
--- a/docs/content/docs/cua-cli/reference/cli/keyvault.mdx
+++ b/docs/content/docs/cua-cli/reference/cli/keyvault.mdx
@@ -225,9 +225,9 @@ cua keyvault deny 5f2c9a0e
| --- | --- |
| `0` | Success. |
| `1` | Failure, or `cua do` reported an error. |
-| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`, `cloud:NAME`). |
+| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`). |
| `3` | Not found: sandbox, window, skill or image (or an image not published yet). |
-| `4` | Not supported, or not configured (for example no cloud credentials). |
+| `4` | Not supported, or not configured (for example no provider credentials). |
| `5` | No cua-spacesd answered, or a transport failure. |
| `6` | Unauthenticated or permission denied (by Cua or your cloud account). |
| `7` | Not enough free disk space (see `cua cache`). |
diff --git a/docs/content/docs/cua-cli/reference/cli/mcp.mdx b/docs/content/docs/cua-cli/reference/cli/mcp.mdx
index 6ff05a5115..613f004dfe 100644
--- a/docs/content/docs/cua-cli/reference/cli/mcp.mdx
+++ b/docs/content/docs/cua-cli/reference/cli/mcp.mdx
@@ -43,9 +43,9 @@ cua mcp --permissions sandbox:readonly,computer:all --sandbox dev
| --- | --- |
| `0` | Success. |
| `1` | Failure, or `cua do` reported an error. |
-| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`, `cloud:NAME`). |
+| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`). |
| `3` | Not found: sandbox, window, skill or image (or an image not published yet). |
-| `4` | Not supported, or not configured (for example no cloud credentials). |
+| `4` | Not supported, or not configured (for example no provider credentials). |
| `5` | No cua-spacesd answered, or a transport failure. |
| `6` | Unauthenticated or permission denied (by Cua or your cloud account). |
| `7` | Not enough free disk space (see `cua cache`). |
diff --git a/docs/content/docs/cua-cli/reference/cli/runtime.mdx b/docs/content/docs/cua-cli/reference/cli/runtime.mdx
index a97fb1874b..71539d1066 100644
--- a/docs/content/docs/cua-cli/reference/cli/runtime.mdx
+++ b/docs/content/docs/cua-cli/reference/cli/runtime.mdx
@@ -69,9 +69,9 @@ cua runtime setup qemu
| --- | --- |
| `0` | Success. |
| `1` | Failure, or `cua do` reported an error. |
-| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`, `cloud:NAME`). |
+| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`). |
| `3` | Not found: sandbox, window, skill or image (or an image not published yet). |
-| `4` | Not supported, or not configured (for example no cloud credentials). |
+| `4` | Not supported, or not configured (for example no provider credentials). |
| `5` | No cua-spacesd answered, or a transport failure. |
| `6` | Unauthenticated or permission denied (by Cua or your cloud account). |
| `7` | Not enough free disk space (see `cua cache`). |
diff --git a/docs/content/docs/cua-cli/reference/cli/sandbox-access.mdx b/docs/content/docs/cua-cli/reference/cli/sandbox-access.mdx
index 2e9ca69f8a..ad6cbbfa21 100644
--- a/docs/content/docs/cua-cli/reference/cli/sandbox-access.mdx
+++ b/docs/content/docs/cua-cli/reference/cli/sandbox-access.mdx
@@ -17,8 +17,8 @@ description: "Run commands, copy files, forward ports, take screenshots, reach t
| [`cua sandbox cp`](#cua-sandbox-cp) | Copy files: `cp NAME:/guest/path LOCAL` or `cp LOCAL NAME:/guest/path` (NAME may be a ref: `cp local:box:/tmp/x .`). |
| [`cua sandbox overlay`](#cua-sandbox-overlay) | Inject freshly built binaries into a running sandbox (see `create --overlay`): NAME=PATH or NAME=PATH:GUEST_PATH. |
| [`cua sandbox logs`](#cua-sandbox-logs) | Show logs: the backend console (QEMU serial, container) when there is one, else the guest system log through the spacesd. |
-| [`cua sandbox port-forward`](#cua-sandbox-port-forward) | Forward a guest port: `port-forward NAME PORT[:LOCAL]` (a local sandbox's port not published at create, and cloud sandboxes, tunnel through cua-spacesd when the image has it; cloud images without it get HTTP and WebSocket through a loopback proxy to the cloud gateway). |
-| [`cua sandbox url`](#cua-sandbox-url) | Print a URL for a named service: usable from this machine (default), or `--public` for a shareable URL that expires (`--ttl`, default 1h; cloud: a signed URL; local: a token URL served by the cua daemon). |
+| [`cua sandbox port-forward`](#cua-sandbox-port-forward) | Forward a guest port: `port-forward NAME PORT[:LOCAL]` (a local sandbox's port not published at create tunnels through cua-spacesd when the image has it). |
+| [`cua sandbox url`](#cua-sandbox-url) | Print a URL for a named service: usable from this machine (default), or `--public` for a shareable URL that expires (`--ttl`, default 1h; a token URL served by the cua daemon). |
| [`cua sandbox screenshot`](#cua-sandbox-screenshot) | Save a screenshot (PNG). |
| [`cua sandbox mcp`](#cua-sandbox-mcp) | Talk to an MCP server a sandbox serves: `mcp NAME SERVICE tools`, `mcp NAME SERVICE call TOOL '{"a":1}'`. |
| [`cua sandbox mcp config`](#cua-sandbox-mcp-config) | The endpoint URL and headers, for any MCP client. |
@@ -45,13 +45,12 @@ cua sandbox exec [OPTIONS] <NAME> <COMMAND>...
| Argument | Type | Default | Description |
| --- | --- | --- | --- |
-| `<NAME>` | string | required | Sandbox name or ref (`local:NAME`, `cloud:NAME`). |
+| `<NAME>` | string | required | Sandbox name or ref (`local:NAME`). |
| `<COMMAND>...` | string | required | Command and arguments. Repeatable. |
| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="cua-sandbox-exec--local"></span>`--local` | boolean | `false` | Look NAME up among local sandboxes only (same as `local:NAME`). |
-| <span id="cua-sandbox-exec--cloud"></span>`--cloud` | boolean | `false` | Look NAME up among cloud sandboxes only (same as `cloud:NAME`). |
**Examples**
@@ -70,7 +69,7 @@ cua sandbox shell [OPTIONS] <NAME> [COMMAND]...
| Argument | Type | Default | Description |
| --- | --- | --- | --- |
-| `<NAME>` | string | required | Sandbox name or ref (`local:NAME`, `cloud:NAME`). |
+| `<NAME>` | string | required | Sandbox name or ref (`local:NAME`). |
| `<COMMAND>...` | string | optional | Command to run instead of the login shell. Repeatable. |
| Flag | Type | Default | Description |
@@ -78,7 +77,6 @@ cua sandbox shell [OPTIONS] <NAME> [COMMAND]...
| <span id="cua-sandbox-shell--cols"></span>`--cols` | integer | | Terminal width (default: this terminal's). |
| <span id="cua-sandbox-shell--rows"></span>`--rows` | integer | | Terminal height (default: this terminal's). |
| <span id="cua-sandbox-shell--local"></span>`--local` | boolean | `false` | Look NAME up among local sandboxes only (same as `local:NAME`). |
-| <span id="cua-sandbox-shell--cloud"></span>`--cloud` | boolean | `false` | Look NAME up among cloud sandboxes only (same as `cloud:NAME`). |
**Examples**
@@ -103,7 +101,6 @@ cua sandbox cp [OPTIONS] <SRC> <DST>
| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="cua-sandbox-cp--local"></span>`--local` | boolean | `false` | Look NAME up among local sandboxes only (same as `local:NAME`). |
-| <span id="cua-sandbox-cp--cloud"></span>`--cloud` | boolean | `false` | Look NAME up among cloud sandboxes only (same as `cloud:NAME`). |
**Examples**
@@ -125,14 +122,13 @@ cua sandbox overlay [OPTIONS] <NAME> <OVERLAYS>...
| Argument | Type | Default | Description |
| --- | --- | --- | --- |
-| `<NAME>` | string | required | Sandbox name or ref (`local:NAME`, `cloud:NAME`). |
+| `<NAME>` | string | required | Sandbox name or ref (`local:NAME`). |
| `<OVERLAYS>...` | string | required | NAME=PATH[:GUEST_PATH] (repeatable). Repeatable. |
| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="cua-sandbox-overlay--timeout"></span>`--timeout` | integer | `180` | Budget for a cua-spacesd restart, in seconds. |
| <span id="cua-sandbox-overlay--local"></span>`--local` | boolean | `false` | Look NAME up among local sandboxes only (same as `local:NAME`). |
-| <span id="cua-sandbox-overlay--cloud"></span>`--cloud` | boolean | `false` | Look NAME up among cloud sandboxes only (same as `cloud:NAME`). |
**Examples**
@@ -155,14 +151,13 @@ cua sandbox logs [OPTIONS] <NAME>
| Argument | Type | Default | Description |
| --- | --- | --- | --- |
-| `<NAME>` | string | required | Sandbox name or ref (`local:NAME`, `cloud:NAME`). |
+| `<NAME>` | string | required | Sandbox name or ref (`local:NAME`). |
| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <span id="cua-sandbox-logs--tail"></span>`--tail` | `-n` | integer | `200` | Lines from the end. |
| <span id="cua-sandbox-logs--source"></span>`--source` | | string | `auto` | auto, console or guest. |
| <span id="cua-sandbox-logs--local"></span>`--local` | | boolean | `false` | Look NAME up among local sandboxes only (same as `local:NAME`). |
-| <span id="cua-sandbox-logs--cloud"></span>`--cloud` | | boolean | `false` | Look NAME up among cloud sandboxes only (same as `cloud:NAME`). |
**Examples**
@@ -173,7 +168,7 @@ cua sb logs dev -n 50 --source guest
## `cua sandbox port-forward`
-Forward a guest port: `port-forward NAME PORT[:LOCAL]` (a local sandbox's port not published at create, and cloud sandboxes, tunnel through cua-spacesd when the image has it; cloud images without it get HTTP and WebSocket through a loopback proxy to the cloud gateway).
+Forward a guest port: `port-forward NAME PORT[:LOCAL]` (a local sandbox's port not published at create tunnels through cua-spacesd when the image has it).
```text output
cua sandbox port-forward [OPTIONS] <NAME> <SPEC>
@@ -183,13 +178,12 @@ Alias: `cua sandbox forward`.
| Argument | Type | Default | Description |
| --- | --- | --- | --- |
-| `<NAME>` | string | required | Sandbox name or ref (`local:NAME`, `cloud:NAME`). |
+| `<NAME>` | string | required | Sandbox name or ref (`local:NAME`). |
| `<SPEC>` | string | required | PORT or PORT:LOCAL_PORT. |
| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="cua-sandbox-port-forward--local"></span>`--local` | boolean | `false` | Look NAME up among local sandboxes only (same as `local:NAME`). |
-| <span id="cua-sandbox-port-forward--cloud"></span>`--cloud` | boolean | `false` | Look NAME up among cloud sandboxes only (same as `cloud:NAME`). |
| <span id="cua-sandbox-port-forward--no-wait"></span>`--no-wait` | boolean | `false` | Print the target and exit instead of forwarding until Ctrl-C. |
**Examples**
@@ -199,12 +193,12 @@ Alias: `cua sandbox forward`.
cua sb port-forward dev 8080
# Guest port 5432 on localhost:15432
-cua sb port-forward cloud:dev 5432:15432
+cua sb port-forward local:dev 5432:15432
```
## `cua sandbox url`
-Print a URL for a named service: usable from this machine (default), or `--public` for a shareable URL that expires (`--ttl`, default 1h; cloud: a signed URL; local: a token URL served by the cua daemon).
+Print a URL for a named service: usable from this machine (default), or `--public` for a shareable URL that expires (`--ttl`, default 1h; a token URL served by the cua daemon).
```text output
cua sandbox url [OPTIONS] <NAME> <SERVICE>
@@ -212,14 +206,13 @@ cua sandbox url [OPTIONS] <NAME> <SERVICE>
| Argument | Type | Default | Description |
| --- | --- | --- | --- |
-| `<NAME>` | string | required | Sandbox name or ref (`local:NAME`, `cloud:NAME`). |
+| `<NAME>` | string | required | Sandbox name or ref (`local:NAME`). |
| `<SERVICE>` | string | required | Service name (from `--service` at create time). |
| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="cua-sandbox-url--ttl"></span>`--ttl` | integer | | Lifetime of a --public URL (`10m`, `1h`, `3600`; 60 s to 24 h). |
| <span id="cua-sandbox-url--local"></span>`--local` | boolean | `false` | Look NAME up among local sandboxes only (same as `local:NAME`). |
-| <span id="cua-sandbox-url--cloud"></span>`--cloud` | boolean | `false` | Look NAME up among cloud sandboxes only (same as `cloud:NAME`). |
| <span id="cua-sandbox-url--public"></span>`--public` | boolean | `false` | A shareable URL that expires. |
**Examples**
@@ -228,7 +221,7 @@ cua sandbox url [OPTIONS] <NAME> <SERVICE>
cua sb url dev web
# A shareable URL for 10 minutes
-cua sb url cloud:dev web --public --ttl 10m
+cua sb url local:dev web --public --ttl 10m
```
## `cua sandbox screenshot`
@@ -241,13 +234,12 @@ cua sandbox screenshot [OPTIONS] <NAME>
| Argument | Type | Default | Description |
| --- | --- | --- | --- |
-| `<NAME>` | string | required | Sandbox name or ref (`local:NAME`, `cloud:NAME`). |
+| `<NAME>` | string | required | Sandbox name or ref (`local:NAME`). |
| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <span id="cua-sandbox-screenshot--output"></span>`--output` | `-o` | path | `screenshot.png` | Output file (PNG). |
| <span id="cua-sandbox-screenshot--local"></span>`--local` | | boolean | `false` | Look NAME up among local sandboxes only (same as `local:NAME`). |
-| <span id="cua-sandbox-screenshot--cloud"></span>`--cloud` | | boolean | `false` | Look NAME up among cloud sandboxes only (same as `cloud:NAME`). |
**Examples**
@@ -257,7 +249,7 @@ cua sb screenshot dev -o desktop.png
## `cua sandbox mcp`
-Talk to an MCP server a sandbox serves: `mcp NAME SERVICE tools`, `mcp NAME SERVICE call TOOL '{"a":1}'`. Generic streamable HTTP over the service (local or cloud); no cua-spacesd needed.
+Talk to an MCP server a sandbox serves: `mcp NAME SERVICE tools`, `mcp NAME SERVICE call TOOL '{"a":1}'`. Generic streamable HTTP over the service; no cua-spacesd needed.
```text output
cua sandbox mcp [OPTIONS] <NAME> <SERVICE> <COMMAND>
@@ -265,14 +257,13 @@ cua sandbox mcp [OPTIONS] <NAME> <SERVICE> <COMMAND>
| Argument | Type | Default | Description |
| --- | --- | --- | --- |
-| `<NAME>` | string | required | Sandbox name or ref (`local:NAME`, `cloud:NAME`). |
+| `<NAME>` | string | required | Sandbox name or ref (`local:NAME`). |
| `<SERVICE>` | string | required | Service name (for example `mcp`, or `port-8765`). |
| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="cua-sandbox-mcp--path"></span>`--path` | string | `/mcp` | Endpoint path on the service. |
| <span id="cua-sandbox-mcp--local"></span>`--local` | boolean | `false` | Look NAME up among local sandboxes only (same as `local:NAME`). |
-| <span id="cua-sandbox-mcp--cloud"></span>`--cloud` | boolean | `false` | Look NAME up among cloud sandboxes only (same as `cloud:NAME`). |
**Examples**
@@ -283,7 +274,7 @@ cua sb mcp dev mcp call echo '{"text":"hi"}'
### `cua sandbox mcp config`
-The endpoint URL and headers, for any MCP client. Credential headers print masked (`Bearer ****`) unless `--show-secrets`; Fleet bearers are short-lived.
+The endpoint URL and headers, for any MCP client. Credential headers print masked (`Bearer ****`) unless `--show-secrets`.
```text output
cua sandbox mcp <NAME> <SERVICE> config [OPTIONS]
@@ -463,7 +454,7 @@ cua sandbox view [OPTIONS] <NAME>
| Argument | Type | Default | Description |
| --- | --- | --- | --- |
-| `<NAME>` | string | required | Sandbox name or ref (`local:NAME`, `cloud:NAME`). |
+| `<NAME>` | string | required | Sandbox name or ref (`local:NAME`). |
| Flag | Type | Default | Description |
| --- | --- | --- | --- |
@@ -473,7 +464,6 @@ cua sandbox view [OPTIONS] <NAME>
| <span id="cua-sandbox-view--view-only"></span>`--view-only` | boolean | `false` | Watch only: no input, clipboard, files or microphone. |
| <span id="cua-sandbox-view--no-open"></span>`--no-open` | boolean | `false` | Print the link without opening a browser. |
| <span id="cua-sandbox-view--local"></span>`--local` | boolean | `false` | Look NAME up among local sandboxes only (same as `local:NAME`). |
-| <span id="cua-sandbox-view--cloud"></span>`--cloud` | boolean | `false` | Look NAME up among cloud sandboxes only (same as `cloud:NAME`). |
**Examples**
@@ -493,9 +483,9 @@ cua sb view old-box --service web
| --- | --- |
| `0` | Success. |
| `1` | Failure, or `cua do` reported an error. |
-| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`, `cloud:NAME`). |
+| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`). |
| `3` | Not found: sandbox, window, skill or image (or an image not published yet). |
-| `4` | Not supported, or not configured (for example no cloud credentials). |
+| `4` | Not supported, or not configured (for example no provider credentials). |
| `5` | No cua-spacesd answered, or a transport failure. |
| `6` | Unauthenticated or permission denied (by Cua or your cloud account). |
| `7` | Not enough free disk space (see `cua cache`). |
diff --git a/docs/content/docs/cua-cli/reference/cli/sandbox.mdx b/docs/content/docs/cua-cli/reference/cli/sandbox.mdx
index aea0681765..beb2edfb72 100644
--- a/docs/content/docs/cua-cli/reference/cli/sandbox.mdx
+++ b/docs/content/docs/cua-cli/reference/cli/sandbox.mdx
@@ -1,6 +1,6 @@
---
title: "cua sandbox"
-description: "Create, list, connect to, suspend and delete sandboxes, local or in the cloud."
+description: "Create, list, connect to, suspend and delete sandboxes, local or on your own machines."
---
{/*
@@ -12,22 +12,21 @@ description: "Create, list, connect to, suspend and delete sandboxes, local or i
| Command | Description |
| --- | --- |
-| [`cua sandbox create`](#cua-sandbox-create) | Create a sandbox: `cua sb create IMAGE [--on local\|cloud\|direct:<addr>] [--kind auto\|container\|vm] [--runtime auto\|gvisor\|runc\|qemu\|lume\|kubevirt]`. |
-| [`cua sandbox launch`](#cua-sandbox-launch) | Deprecated alias of `create` that defaults to `--on cloud`. |
-| [`cua sandbox connect`](#cua-sandbox-connect) | Reattach to a sandbox (NAME or a ref such as `cloud:NAME`) and print it. |
-| [`cua sandbox ls`](#cua-sandbox-ls) | List sandboxes: local, direct and cloud (live Fleet claims) by default, each with its `location`; `--local` or `--cloud` filters. |
-| [`cua sandbox info`](#cua-sandbox-info) | Show one sandbox (or a Fleet pool of that name). |
-| [`cua sandbox suspend`](#cua-sandbox-suspend) | Suspend (local: pause/snapshot; Fleet managed pool: release the claim and keep the record; explicit Fleet pool: scale to zero). |
-| [`cua sandbox resume`](#cua-sandbox-resume) | Resume (Fleet managed pool: claim a fresh sandbox of the same shape). |
+| [`cua sandbox create`](#cua-sandbox-create) | Create a sandbox: `cua sb create IMAGE [--on local\|direct:<addr>] [--kind auto\|container\|vm] [--runtime auto\|gvisor\|runc\|qemu\|lume]`. |
+| [`cua sandbox launch`](#cua-sandbox-launch) | Deprecated alias of `create`. |
+| [`cua sandbox connect`](#cua-sandbox-connect) | Reattach to a sandbox (NAME or a ref such as `local:NAME`) and print it. |
+| [`cua sandbox ls`](#cua-sandbox-ls) | List sandboxes: local and direct, each with its `location`; `--local` filters. |
+| [`cua sandbox info`](#cua-sandbox-info) | Show one sandbox. |
+| [`cua sandbox suspend`](#cua-sandbox-suspend) | Suspend (pause/snapshot). |
+| [`cua sandbox resume`](#cua-sandbox-resume) | Resume. |
| [`cua sandbox restart`](#cua-sandbox-restart) | Restart. |
-| [`cua sandbox keep-alive`](#cua-sandbox-keep-alive) | Extend a Fleet claim's lease. |
-| [`cua sandbox rm`](#cua-sandbox-rm) | Delete a sandbox (Fleet: release the claim; managed pools are kept for reuse). |
+| [`cua sandbox rm`](#cua-sandbox-rm) | Delete a sandbox. |
Every command also accepts the [global options](/cua-cli/reference/cli#global-options).
<span id="cua-sandbox"></span>
-Sandboxes: local, cloud or an existing machine (direct).
+Sandboxes: local or an existing machine (direct).
```text output
cua sandbox [OPTIONS] <COMMAND>
@@ -37,7 +36,7 @@ Alias: `cua sb`.
## `cua sandbox create`
-Create a sandbox: `cua sb create IMAGE [--on local|cloud|direct:<addr>] [--kind auto|container|vm] [--runtime auto|gvisor|runc|qemu|lume|kubevirt]`.
+Create a sandbox: `cua sb create IMAGE [--on local|direct:<addr>] [--kind auto|container|vm] [--runtime auto|gvisor|runc|qemu|lume]`.
```text output
cua sandbox create [OPTIONS] [IMAGE] [-- <COMMAND>...]
@@ -45,40 +44,34 @@ cua sandbox create [OPTIONS] [IMAGE] [-- <COMMAND>...]
| Argument | Type | Default | Description |
| --- | --- | --- | --- |
-| `<IMAGE>` | string | optional | Image: a registry reference (`ghcr.io/org/image:tag`), an alias (`linux`, `ubuntu`, `windows`, `macos[:tahoe\|sequoia]`, `omarchy`), or locally `pool:<name>` to run that cloud pool's template image with its firmware, services and readiness probe (`fleet:<name>` is the deprecated spelling). |
+| `<IMAGE>` | string | optional | Image: a registry reference (`ghcr.io/org/image:tag`), an alias (`linux`, `ubuntu`, `windows`, `macos[:tahoe\|sequoia]`, `omarchy`). |
| `<COMMAND>...` | string | optional | The sandbox's command, after `--` (replaces the image's entrypoint): `cua sb create python:3.12-slim --service mcp=8765 -- python -m srv`. Repeatable. |
| Flag | Type | Default | Env var | Description |
| --- | --- | --- | --- | --- |
-| <span id="cua-sandbox-create--on"></span>`--on` | string | | | Where it runs: local, cloud, direct:&lt;addr&gt; (an existing machine running cua-spacesd), or a registered provider. Default: `cua config get default.on` (`CUA_DEFAULT_ON`), else local. |
+| <span id="cua-sandbox-create--on"></span>`--on` | string | | | Where it runs: local, direct:&lt;addr&gt; (an existing machine running cua-spacesd), or a registered provider. Default: `cua config get default.on` (`CUA_DEFAULT_ON`), else local. |
| <span id="cua-sandbox-create--kind"></span>`--kind` | string | | | What kind of machine: auto (from the image: a container when it has a container rootfs; macOS, Windows and disk-only images are VMs), container or vm. |
-| <span id="cua-sandbox-create--runtime"></span>`--runtime` | string | | | Which engine: auto (the safest available) or one the location offers for the kind. Local: gvisor or runc (containers), qemu or lume (VMs). Cloud: gvisor (containers), kubevirt (VMs). A local sandbox with --sidecar needs `--runtime runc` where gVisor would run (separate gVisor containers cannot share a network namespace). |
+| <span id="cua-sandbox-create--runtime"></span>`--runtime` | string | | | Which engine: auto (the safest available) or one the location offers for the kind. Local: gvisor or runc (containers), qemu or lume (VMs). A local sandbox with --sidecar needs `--runtime runc` where gVisor would run (separate gVisor containers cannot share a network namespace). |
| <span id="cua-sandbox-create--tier"></span>`--tier` | string | | | Image tier for an alias: `slim`, `full` (default) or macOS `xcode`. |
| <span id="cua-sandbox-create--name"></span>`--name` | string | | | Sandbox name (generated when omitted). |
| <span id="cua-sandbox-create--open"></span>`--open` | string | | | With --browser: open this URL. |
| <span id="cua-sandbox-create--install"></span>`--install` | string | | | Install these into the sandbox once it is up: harness ids (`claude-code`) or installables (`blender`, `vscode`, `node`), pinned and checksum-verified (`cua agent ensure` later does the same). Repeatable. |
| <span id="cua-sandbox-create--cpu"></span>`--cpu` | integer | | | vCPUs. Alias: `--cpus`. |
| <span id="cua-sandbox-create--memory"></span>`--memory` | string | | | Memory, e.g. 8GB or 4096MB (a bare number is GB). |
-| <span id="cua-sandbox-create--network"></span>`--network` | `default` \| `none` | | | Guest network: `default` (outbound network, like a Docker container) or `none` (no egress; published ports still work). `none` needs a local QEMU VM; containers, Lume and cloud sandboxes reject it. |
+| <span id="cua-sandbox-create--network"></span>`--network` | `default` \| `none` | | | Guest network: `default` (outbound network, like a Docker container) or `none` (no egress; published ports still work). `none` needs a local QEMU VM; containers and Lume reject it. |
| <span id="cua-sandbox-create--disk"></span>`--disk` | string | | | Disk size (accepted; the image decides today). |
| <span id="cua-sandbox-create--port"></span>`--port` | string | | | Expose a guest port: NAME=PORT (a named service) or PORT (repeatable). Alias: `--service`. |
| <span id="cua-sandbox-create--wait"></span>`--wait` | string | | | Wait until ready: tcp:SERVICE, http:SERVICE/path, a guest port (tcp:PORT, http:PORT/path), or `desktop` (the desktop session takes input: display, window manager and cua-driver) (repeatable). Alias: `--wait-for`. |
| <span id="cua-sandbox-create--ready-timeout"></span>`--ready-timeout` | integer | | | Readiness budget in seconds, counted once the image is downloaded, the wait for the image's cua-spacesd included (default 600, plus up to 120 for cua-spacesd). |
| <span id="cua-sandbox-create--overlay"></span>`--overlay` | string | | | Inject a freshly built binary once the sandbox is up: NAME=PATH (`cua-driver`, `cua-spacesd`) or NAME=PATH:GUEST_PATH (repeatable). It replaces the guest file atomically, is recorded with its sha256 (checked by `cua doctor`) and what runs it is restarted. Needs cua-spacesd in the image. |
| <span id="cua-sandbox-create--env"></span>`--env` | string | | | Environment KEY=VALUE for the sandbox (repeatable). |
-| <span id="cua-sandbox-create--sidecar"></span>`--sidecar` | string | | | A sidecar container, reachable from the sandbox at its name (it reaches the sandbox at `main`): IMAGE[,port=PORT][,env=K=V][,name=NAME] (repeatable; `port=` and `env=` repeat too). Local containers and every cloud sandbox; locally it needs `--runtime runc` where gVisor would run. With sidecars the service names main, sidecars and sc are reserved. |
+| <span id="cua-sandbox-create--sidecar"></span>`--sidecar` | string | | | A sidecar container, reachable from the sandbox at its name (it reaches the sandbox at `main`): IMAGE[,port=PORT][,env=K=V][,name=NAME] (repeatable; `port=` and `env=` repeat too). Local containers; it needs `--runtime runc` where gVisor would run. With sidecars the service names main, sidecars and sc are reserved. |
| <span id="cua-sandbox-create--registry-secret"></span>`--registry-secret` | string | | | Credentials for a private image: env:USER_VAR:PASSWORD_VAR (read from this environment) or aws-ecr[:REGION] (the AWS CLI's login token). |
-| <span id="cua-sandbox-create--max-pool-size"></span>`--max-pool-size` | integer | | | Cloud: most sandboxes of this image at once. |
-| <span id="cua-sandbox-create--claim-ttl"></span>`--claim-ttl` | integer | | | Cloud: how long the sandbox outlives this command without a keep-alive (`15m`, `900`); renewed while the daemon holds it. |
-| <span id="cua-sandbox-create--pool"></span>`--pool` | string | | | Cloud: use this dedicated pool instead of shared capacity. The sandbox fields given (IMAGE, --cmd, --env, --port, --sidecar, --cpu, --memory) must match its template, or creation fails with the diff. |
| <span id="cua-sandbox-create--token"></span>`--token` | string | | `CUA_ENV_TOKEN` | spacesd token (direct: sandboxes). |
| <span id="cua-sandbox-create--gpu"></span>`--gpu` | string | | | A GPU: the runtime's own (`--gpu`), or an option `cua spaces gpus` lists (`paravirtual`: GPU acceleration for a macOS VM on Lume, experimental; `virgl`: QEMU on Linux; `nvidia`: a runc container on Linux; a provider's GPU type). |
| <span id="cua-sandbox-create--browser"></span>`--browser` | boolean | `false` | | Start Chromium in it for the cua-driver browser tools (IMAGE defaults to `linux`). |
-| <span id="cua-sandbox-create--warm"></span>`--warm` | boolean | `false` | | Cloud: keep one warm sandbox of this image ready (the default for the canonical linux/windows/macos images). |
-| <span id="cua-sandbox-create--no-warm"></span>`--no-warm` | boolean | `false` | | Cloud: no warm sandbox, even for a canonical image. |
-| <span id="cua-sandbox-create--apply"></span>`--apply` | boolean | `false` | | Cloud, with --pool: update the pool's template to the given fields instead of failing when they differ. |
| <span id="cua-sandbox-create--view"></span>`--view` | boolean | `false` | | Open the desktop in the HTML5 viewer once the sandbox is ready (`cua sb view`). |
-| <span id="cua-sandbox-create--keep-on-failure"></span>`--keep-on-failure` | boolean | `false` | | Keep the sandbox (its cloud claim, VM or container) when it fails to become ready, to debug it; the ref and how to delete it are printed. Default: a failed create deletes it and releases its claim. |
+| <span id="cua-sandbox-create--keep-on-failure"></span>`--keep-on-failure` | boolean | `false` | | Keep the sandbox (VM or container) when it fails to become ready, to debug it; the ref and how to delete it are printed. Default: a failed create deletes it. |
**Examples**
@@ -89,13 +82,13 @@ cua sb create linux --name dev
# A web server container, ready when its HTTP service answers
cua sb create python:3.12-slim --service web=8000 --wait http:web/ -- python -m http.server 8000
-# The same Linux image in the cloud instead, as a VM
-cua sb create linux --on cloud --kind vm --name dev
+# The same Linux image as a VM
+cua sb create linux --kind vm --name dev
```
## `cua sandbox launch`
-Deprecated alias of `create` that defaults to `--on cloud`.
+Deprecated alias of `create`.
```text output
cua sandbox launch [OPTIONS] [IMAGE]
@@ -104,13 +97,12 @@ cua sandbox launch [OPTIONS] [IMAGE]
**Examples**
```bash test="cli-shape" id="ref-cua-sandbox-launch"
-# A cloud Linux sandbox (same as `cua sb create linux --on cloud`)
cua sb launch linux --name dev
```
## `cua sandbox connect`
-Reattach to a sandbox (NAME or a ref such as `cloud:NAME`) and print it.
+Reattach to a sandbox (NAME or a ref such as `local:NAME`) and print it.
```text output
cua sandbox connect [OPTIONS] <NAME>
@@ -118,23 +110,22 @@ cua sandbox connect [OPTIONS] <NAME>
| Argument | Type | Default | Description |
| --- | --- | --- | --- |
-| `<NAME>` | string | required | Sandbox name or ref (`local:NAME`, `cloud:NAME`). |
+| `<NAME>` | string | required | Sandbox name or ref (`local:NAME`). |
| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="cua-sandbox-connect--local"></span>`--local` | boolean | `false` | Look NAME up among local sandboxes only (same as `local:NAME`). |
-| <span id="cua-sandbox-connect--cloud"></span>`--cloud` | boolean | `false` | Look NAME up among cloud sandboxes only (same as `cloud:NAME`). |
**Examples**
```bash test="cli-shape" id="ref-cua-sandbox-connect"
cua sb connect dev
-cua sb connect cloud:dev
+cua sb connect local:dev
```
## `cua sandbox ls`
-List sandboxes: local, direct and cloud (live Fleet claims) by default, each with its `location`; `--local` or `--cloud` filters.
+List sandboxes: local and direct, each with its `location`; `--local` filters.
```text output
cua sandbox ls [OPTIONS]
@@ -145,19 +136,18 @@ Alias: `cua sandbox list`.
| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="cua-sandbox-ls--local"></span>`--local` | boolean | `false` | Only local sandboxes. |
-| <span id="cua-sandbox-ls--cloud"></span>`--cloud` | boolean | `false` | Only cloud sandboxes, listed live from Fleet. |
| <span id="cua-sandbox-ls--no-size"></span>`--no-size` | boolean | `false` | Skip the SIZE column (disk used by each local sandbox), which reads the VM, container and Lume stores. |
**Examples**
```bash test="cli-shape" id="ref-cua-sandbox-ls"
cua sb ls
-cua sb ls --cloud --json
+cua sb ls --local --json
```
## `cua sandbox info`
-Show one sandbox (or a Fleet pool of that name).
+Show one sandbox.
```text output
cua sandbox info [OPTIONS] <NAME>
@@ -167,23 +157,22 @@ Alias: `cua sandbox get`.
| Argument | Type | Default | Description |
| --- | --- | --- | --- |
-| `<NAME>` | string | required | Sandbox name or ref (`local:NAME`, `cloud:NAME`). |
+| `<NAME>` | string | required | Sandbox name or ref (`local:NAME`). |
| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="cua-sandbox-info--local"></span>`--local` | boolean | `false` | Look NAME up among local sandboxes only (same as `local:NAME`). |
-| <span id="cua-sandbox-info--cloud"></span>`--cloud` | boolean | `false` | Look NAME up among cloud sandboxes only (same as `cloud:NAME`). |
**Examples**
```bash test="cli-shape" id="ref-cua-sandbox-info"
cua sb info dev
-cua sb info cloud:dev --json
+cua sb info local:dev --json
```
## `cua sandbox suspend`
-Suspend (local: pause/snapshot; Fleet managed pool: release the claim and keep the record; explicit Fleet pool: scale to zero).
+Suspend (pause/snapshot).
```text output
cua sandbox suspend [OPTIONS] <NAME>
@@ -191,12 +180,11 @@ cua sandbox suspend [OPTIONS] <NAME>
| Argument | Type | Default | Description |
| --- | --- | --- | --- |
-| `<NAME>` | string | required | Sandbox name or ref (`local:NAME`, `cloud:NAME`). |
+| `<NAME>` | string | required | Sandbox name or ref (`local:NAME`). |
| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="cua-sandbox-suspend--local"></span>`--local` | boolean | `false` | Look NAME up among local sandboxes only (same as `local:NAME`). |
-| <span id="cua-sandbox-suspend--cloud"></span>`--cloud` | boolean | `false` | Look NAME up among cloud sandboxes only (same as `cloud:NAME`). |
**Examples**
@@ -206,7 +194,7 @@ cua sb suspend dev
## `cua sandbox resume`
-Resume (Fleet managed pool: claim a fresh sandbox of the same shape).
+Resume.
```text output
cua sandbox resume [OPTIONS] <NAME>
@@ -214,12 +202,11 @@ cua sandbox resume [OPTIONS] <NAME>
| Argument | Type | Default | Description |
| --- | --- | --- | --- |
-| `<NAME>` | string | required | Sandbox name or ref (`local:NAME`, `cloud:NAME`). |
+| `<NAME>` | string | required | Sandbox name or ref (`local:NAME`). |
| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="cua-sandbox-resume--local"></span>`--local` | boolean | `false` | Look NAME up among local sandboxes only (same as `local:NAME`). |
-| <span id="cua-sandbox-resume--cloud"></span>`--cloud` | boolean | `false` | Look NAME up among cloud sandboxes only (same as `cloud:NAME`). |
**Examples**
@@ -237,12 +224,11 @@ cua sandbox restart [OPTIONS] <NAME>
| Argument | Type | Default | Description |
| --- | --- | --- | --- |
-| `<NAME>` | string | required | Sandbox name or ref (`local:NAME`, `cloud:NAME`). |
+| `<NAME>` | string | required | Sandbox name or ref (`local:NAME`). |
| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="cua-sandbox-restart--local"></span>`--local` | boolean | `false` | Look NAME up among local sandboxes only (same as `local:NAME`). |
-| <span id="cua-sandbox-restart--cloud"></span>`--cloud` | boolean | `false` | Look NAME up among cloud sandboxes only (same as `cloud:NAME`). |
**Examples**
@@ -250,34 +236,9 @@ cua sandbox restart [OPTIONS] <NAME>
cua sb restart dev
```
-## `cua sandbox keep-alive`
-
-Extend a Fleet claim's lease.
-
-```text output
-cua sandbox keep-alive [OPTIONS] <NAME>
-```
-
-| Argument | Type | Default | Description |
-| --- | --- | --- | --- |
-| `<NAME>` | string | required | Sandbox name or ref (`local:NAME`, `cloud:NAME`). |
-
-| Flag | Type | Default | Description |
-| --- | --- | --- | --- |
-| <span id="cua-sandbox-keep-alive--for"></span>`--for` | integer | `15m` | Lease from now (`15m`, `2h`, `900`). |
-| <span id="cua-sandbox-keep-alive--local"></span>`--local` | boolean | `false` | Look NAME up among local sandboxes only (same as `local:NAME`). |
-| <span id="cua-sandbox-keep-alive--cloud"></span>`--cloud` | boolean | `false` | Look NAME up among cloud sandboxes only (same as `cloud:NAME`). |
-
-**Examples**
-
-```bash test="cli-shape" id="ref-cua-sandbox-keep-alive"
-# Keep the claim for two more hours
-cua sb keep-alive cloud:dev --for 2h
-```
-
## `cua sandbox rm`
-Delete a sandbox (Fleet: release the claim; managed pools are kept for reuse).
+Delete a sandbox.
```text output
cua sandbox rm [OPTIONS] <NAME>
@@ -287,13 +248,12 @@ Alias: `cua sandbox delete`.
| Argument | Type | Default | Description |
| --- | --- | --- | --- |
-| `<NAME>` | string | required | Sandbox name or ref (`local:NAME`, `cloud:NAME`). |
+| `<NAME>` | string | required | Sandbox name or ref (`local:NAME`). |
| Flag | Short | Type | Default | Description |
| --- | --- | --- | --- | --- |
| <span id="cua-sandbox-rm--force"></span>`--force` | `-f` | boolean | `false` | Skip the confirmation prompt. Required when there is no terminal to ask on (scripts, agents): without it nothing is deleted. |
| <span id="cua-sandbox-rm--local"></span>`--local` | | boolean | `false` | Look NAME up among local sandboxes only (same as `local:NAME`). |
-| <span id="cua-sandbox-rm--cloud"></span>`--cloud` | | boolean | `false` | Look NAME up among cloud sandboxes only (same as `cloud:NAME`). |
**Examples**
@@ -301,7 +261,7 @@ Alias: `cua sandbox delete`.
cua sb rm dev
# Without the prompt (required in scripts and agents)
-cua sb rm cloud:dev --force
+cua sb rm local:dev --force
```
## Exit codes
@@ -310,9 +270,9 @@ cua sb rm cloud:dev --force
| --- | --- |
| `0` | Success. |
| `1` | Failure, or `cua do` reported an error. |
-| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`, `cloud:NAME`). |
+| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`). |
| `3` | Not found: sandbox, window, skill or image (or an image not published yet). |
-| `4` | Not supported, or not configured (for example no cloud credentials). |
+| `4` | Not supported, or not configured (for example no provider credentials). |
| `5` | No cua-spacesd answered, or a transport failure. |
| `6` | Unauthenticated or permission denied (by Cua or your cloud account). |
| `7` | Not enough free disk space (see `cua cache`). |
diff --git a/docs/content/docs/cua-cli/reference/cli/skills.mdx b/docs/content/docs/cua-cli/reference/cli/skills.mdx
index 45451772c6..f8c3461640 100644
--- a/docs/content/docs/cua-cli/reference/cli/skills.mdx
+++ b/docs/content/docs/cua-cli/reference/cli/skills.mdx
@@ -156,9 +156,9 @@ cua skills record --sandbox dev --name export-invoice
| --- | --- |
| `0` | Success. |
| `1` | Failure, or `cua do` reported an error. |
-| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`, `cloud:NAME`). |
+| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`). |
| `3` | Not found: sandbox, window, skill or image (or an image not published yet). |
-| `4` | Not supported, or not configured (for example no cloud credentials). |
+| `4` | Not supported, or not configured (for example no provider credentials). |
| `5` | No cua-spacesd answered, or a transport failure. |
| `6` | Unauthenticated or permission denied (by Cua or your cloud account). |
| `7` | Not enough free disk space (see `cua cache`). |
diff --git a/docs/content/docs/cua-cli/reference/cli/spaces.mdx b/docs/content/docs/cua-cli/reference/cli/spaces.mdx
index 07b878b5ab..f2f77fc3be 100644
--- a/docs/content/docs/cua-cli/reference/cli/spaces.mdx
+++ b/docs/content/docs/cua-cli/reference/cli/spaces.mdx
@@ -14,10 +14,10 @@ description: "Registered Spaces and your machines on the relay."
| --- | --- |
| [`cua spaces ls`](#cua-spaces-ls) | Registered Spaces and your machines on the relay. |
| [`cua spaces add`](#cua-spaces-add) | Register a Space after a capabilities handshake with its cua-spacesd (or, for another URL, an MCP initialize). |
-| [`cua spaces create`](#cua-spaces-create) | Create Spaces: on this machine, on one of your machines that provides Spaces (`cua host setup --provide-spaces` there), or in the cloud. |
+| [`cua spaces create`](#cua-spaces-create) | Create Spaces: on this machine, on one of your machines that provides Spaces (`cua host setup --provide-spaces` there), or in your own cloud account. |
| [`cua spaces cancel`](#cua-spaces-cancel) | Cancel a create that is still running (here, in the daemon, or in another terminal): it stops and what it made is removed. |
-| [`cua spaces gpus`](#cua-spaces-gpus) | The GPU options each runtime offers on this machine (or in the cloud). |
-| [`cua spaces delete`](#cua-spaces-delete) | Delete a Space's sandbox (on this machine, on the machine that provides it, or in the cloud) and forget it (asks first). |
+| [`cua spaces gpus`](#cua-spaces-gpus) | The GPU options each runtime offers on this machine (or in your own cloud account). |
+| [`cua spaces delete`](#cua-spaces-delete) | Delete a Space's sandbox (on this machine, on the machine that provides it, or in your own cloud account) and forget it (asks first). |
| [`cua spaces stop`](#cua-spaces-stop) | Turn a Space off: a local container or QEMU VM is suspended (its memory is kept), a Lume VM or a Space one of your machines provides is stopped (its disk is kept), and so is a Space in your own cloud (`--on aws`, `gcp`; compute billing stops). |
| [`cua spaces start`](#cua-spaces-start) | Turn a Space back on: resume a suspended one or boot a stopped one. |
| [`cua spaces rm`](#cua-spaces-rm) | Forget a registered Space and its stored token. |
@@ -68,7 +68,7 @@ cua spaces add [OPTIONS] <URL>
| Argument | Type | Default | Description |
| --- | --- | --- | --- |
-| `<URL>` | string | required | The Space's cua-spacesd (`http(s)://host:port`, `host:port`, default port 3211), a Space id (`local:<name>`, `cloud:<name>`), or any MCP endpoint URL. |
+| `<URL>` | string | required | The Space's cua-spacesd (`http(s)://host:port`, `host:port`, default port 3211), a Space id (`local:<name>`), or any MCP endpoint URL. |
| Flag | Type | Default | Env var | Description |
| --- | --- | --- | --- | --- |
@@ -90,7 +90,7 @@ cua spaces add 100.101.102.103:3211 --host --name "Mac mini (spare)" --token "$T
## `cua spaces create`
-Create Spaces: on this machine, on one of your machines that provides Spaces (`cua host setup --provide-spaces` there), or in the cloud.
+Create Spaces: on this machine, on one of your machines that provides Spaces (`cua host setup --provide-spaces` there), or in your own cloud account.
```text output
cua spaces create [OPTIONS] [IMAGE]
@@ -102,7 +102,7 @@ cua spaces create [OPTIONS] [IMAGE]
| Flag | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="cua-spaces-create--on"></span>`--on` | string | | Where: `local`, `cloud`, `host:<machine>`, or a machine name (`mac-mini`, "spare mac mini"). Default: your default location. |
+| <span id="cua-spaces-create--on"></span>`--on` | string | | Where: `local`, `aws`, `gcp`, `host:<machine>`, or a machine name (`mac-mini`, "spare mac mini"). Default: your default location. |
| <span id="cua-spaces-create--count"></span>`--count` | integer | `1` | How many (1 to 8). |
| <span id="cua-spaces-create--name"></span>`--name` | string | | Name (with --count, `-2`, `-3`, ... are appended). |
| <span id="cua-spaces-create--kind"></span>`--kind` | string | | auto \| container \| vm. |
@@ -143,7 +143,7 @@ cua spaces cancel studio
## `cua spaces gpus`
-The GPU options each runtime offers on this machine (or in the cloud).
+The GPU options each runtime offers on this machine (or in your own cloud account).
```text output
cua spaces gpus [OPTIONS]
@@ -151,7 +151,7 @@ cua spaces gpus [OPTIONS]
| Flag | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="cua-spaces-gpus--on"></span>`--on` | string | | `local` (default) or `cloud`. |
+| <span id="cua-spaces-gpus--on"></span>`--on` | string | | `local` (default), `aws`, `gcp` or `modal`. |
**Examples**
@@ -162,7 +162,7 @@ cua spaces gpus --json
## `cua spaces delete`
-Delete a Space's sandbox (on this machine, on the machine that provides it, or in the cloud) and forget it (asks first).
+Delete a Space's sandbox (on this machine, on the machine that provides it, or in your own cloud account) and forget it (asks first).
```text output
cua spaces delete [OPTIONS] <SPACE>
@@ -185,7 +185,7 @@ cua spaces delete local:studio --force
## `cua spaces stop`
-Turn a Space off: a local container or QEMU VM is suspended (its memory is kept), a Lume VM or a Space one of your machines provides is stopped (its disk is kept), and so is a Space in your own cloud (`--on aws`, `gcp`; compute billing stops). Fleet cloud Spaces, Modal sandboxes and Spaces added by address cannot be turned off.
+Turn a Space off: a local container or QEMU VM is suspended (its memory is kept), a Lume VM or a Space one of your machines provides is stopped (its disk is kept), and so is a Space in your own cloud (`--on aws`, `gcp`; compute billing stops). Modal sandboxes and Spaces added by address cannot be turned off.
```text output
cua spaces stop [OPTIONS] <SPACE>
@@ -357,9 +357,9 @@ cua spaces relay-unregister relay:space-0123abcd4567ef89
| --- | --- |
| `0` | Success. |
| `1` | Failure, or `cua do` reported an error. |
-| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`, `cloud:NAME`). |
+| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`). |
| `3` | Not found: sandbox, window, skill or image (or an image not published yet). |
-| `4` | Not supported, or not configured (for example no cloud credentials). |
+| `4` | Not supported, or not configured (for example no provider credentials). |
| `5` | No cua-spacesd answered, or a transport failure. |
| `6` | Unauthenticated or permission denied (by Cua or your cloud account). |
| `7` | Not enough free disk space (see `cua cache`). |
diff --git a/docs/content/docs/cua-cli/reference/cli/spacesd.mdx b/docs/content/docs/cua-cli/reference/cli/spacesd.mdx
index d834cb9737..5891012dce 100644
--- a/docs/content/docs/cua-cli/reference/cli/spacesd.mdx
+++ b/docs/content/docs/cua-cli/reference/cli/spacesd.mdx
@@ -177,9 +177,9 @@ cua spacesd call http://127.0.0.1:3211 SystemService/GetCapabilities
| --- | --- |
| `0` | Success. |
| `1` | Failure, or `cua do` reported an error. |
-| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`, `cloud:NAME`). |
+| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`). |
| `3` | Not found: sandbox, window, skill or image (or an image not published yet). |
-| `4` | Not supported, or not configured (for example no cloud credentials). |
+| `4` | Not supported, or not configured (for example no provider credentials). |
| `5` | No cua-spacesd answered, or a transport failure. |
| `6` | Unauthenticated or permission denied (by Cua or your cloud account). |
| `7` | Not enough free disk space (see `cua cache`). |
diff --git a/docs/content/docs/cua-cli/reference/cli/team.mdx b/docs/content/docs/cua-cli/reference/cli/team.mdx
index e9b7c3d748..051c97efc6 100644
--- a/docs/content/docs/cua-cli/reference/cli/team.mdx
+++ b/docs/content/docs/cua-cli/reference/cli/team.mdx
@@ -368,9 +368,9 @@ cua team delete AIGIS --yes
| --- | --- |
| `0` | Success. |
| `1` | Failure, or `cua do` reported an error. |
-| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`, `cloud:NAME`). |
+| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`). |
| `3` | Not found: sandbox, window, skill or image (or an image not published yet). |
-| `4` | Not supported, or not configured (for example no cloud credentials). |
+| `4` | Not supported, or not configured (for example no provider credentials). |
| `5` | No cua-spacesd answered, or a transport failure. |
| `6` | Unauthenticated or permission denied (by Cua or your cloud account). |
| `7` | Not enough free disk space (see `cua cache`). |
diff --git a/docs/content/docs/cua-cli/reference/cli/telemetry.mdx b/docs/content/docs/cua-cli/reference/cli/telemetry.mdx
index bdd4d3f73c..71a529886f 100644
--- a/docs/content/docs/cua-cli/reference/cli/telemetry.mdx
+++ b/docs/content/docs/cua-cli/reference/cli/telemetry.mdx
@@ -133,9 +133,9 @@ cua telemetry schema --json
| --- | --- |
| `0` | Success. |
| `1` | Failure, or `cua do` reported an error. |
-| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`, `cloud:NAME`). |
+| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`). |
| `3` | Not found: sandbox, window, skill or image (or an image not published yet). |
-| `4` | Not supported, or not configured (for example no cloud credentials). |
+| `4` | Not supported, or not configured (for example no provider credentials). |
| `5` | No cua-spacesd answered, or a transport failure. |
| `6` | Unauthenticated or permission denied (by Cua or your cloud account). |
| `7` | Not enough free disk space (see `cua cache`). |
diff --git a/docs/content/docs/cua-cli/reference/cli/teleport.mdx b/docs/content/docs/cua-cli/reference/cli/teleport.mdx
index f2071aeb71..2ab5385dc4 100644
--- a/docs/content/docs/cua-cli/reference/cli/teleport.mdx
+++ b/docs/content/docs/cua-cli/reference/cli/teleport.mdx
@@ -100,9 +100,9 @@ cua teleport push --app Slack --sandbox dev --all
| --- | --- |
| `0` | Success. |
| `1` | Failure, or `cua do` reported an error. |
-| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`, `cloud:NAME`). |
+| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`). |
| `3` | Not found: sandbox, window, skill or image (or an image not published yet). |
-| `4` | Not supported, or not configured (for example no cloud credentials). |
+| `4` | Not supported, or not configured (for example no provider credentials). |
| `5` | No cua-spacesd answered, or a transport failure. |
| `6` | Unauthenticated or permission denied (by Cua or your cloud account). |
| `7` | Not enough free disk space (see `cua cache`). |
diff --git a/docs/content/docs/cua-cli/reference/cli/trajectory.mdx b/docs/content/docs/cua-cli/reference/cli/trajectory.mdx
index bbe30ecf3d..7997ae0a8f 100644
--- a/docs/content/docs/cua-cli/reference/cli/trajectory.mdx
+++ b/docs/content/docs/cua-cli/reference/cli/trajectory.mdx
@@ -115,9 +115,9 @@ cua traj clean --older-than 7 --yes
| --- | --- |
| `0` | Success. |
| `1` | Failure, or `cua do` reported an error. |
-| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`, `cloud:NAME`). |
+| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`). |
| `3` | Not found: sandbox, window, skill or image (or an image not published yet). |
-| `4` | Not supported, or not configured (for example no cloud credentials). |
+| `4` | Not supported, or not configured (for example no provider credentials). |
| `5` | No cua-spacesd answered, or a transport failure. |
| `6` | Unauthenticated or permission denied (by Cua or your cloud account). |
| `7` | Not enough free disk space (see `cua cache`). |
diff --git a/docs/content/docs/cua-cli/reference/cli/usage.mdx b/docs/content/docs/cua-cli/reference/cli/usage.mdx
index b376df03d5..ab35b41991 100644
--- a/docs/content/docs/cua-cli/reference/cli/usage.mdx
+++ b/docs/content/docs/cua-cli/reference/cli/usage.mdx
@@ -37,9 +37,9 @@ cua usage --json
| --- | --- |
| `0` | Success. |
| `1` | Failure, or `cua do` reported an error. |
-| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`, `cloud:NAME`). |
+| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`). |
| `3` | Not found: sandbox, window, skill or image (or an image not published yet). |
-| `4` | Not supported, or not configured (for example no cloud credentials). |
+| `4` | Not supported, or not configured (for example no provider credentials). |
| `5` | No cua-spacesd answered, or a transport failure. |
| `6` | Unauthenticated or permission denied (by Cua or your cloud account). |
| `7` | Not enough free disk space (see `cua cache`). |
diff --git a/docs/content/docs/cua-cli/reference/cli/viewer.mdx b/docs/content/docs/cua-cli/reference/cli/viewer.mdx
index a2648d6e16..4bb354822f 100644
--- a/docs/content/docs/cua-cli/reference/cli/viewer.mdx
+++ b/docs/content/docs/cua-cli/reference/cli/viewer.mdx
@@ -41,9 +41,9 @@ cua viewer --listen 127.0.0.1:8211 --no-open
| --- | --- |
| `0` | Success. |
| `1` | Failure, or `cua do` reported an error. |
-| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`, `cloud:NAME`). |
+| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`). |
| `3` | Not found: sandbox, window, skill or image (or an image not published yet). |
-| `4` | Not supported, or not configured (for example no cloud credentials). |
+| `4` | Not supported, or not configured (for example no provider credentials). |
| `5` | No cua-spacesd answered, or a transport failure. |
| `6` | Unauthenticated or permission denied (by Cua or your cloud account). |
| `7` | Not enough free disk space (see `cua cache`). |
diff --git a/docs/content/docs/cua-cli/reference/cli/volume.mdx b/docs/content/docs/cua-cli/reference/cli/volume.mdx
index 0448d95c36..226b14999a 100644
--- a/docs/content/docs/cua-cli/reference/cli/volume.mdx
+++ b/docs/content/docs/cua-cli/reference/cli/volume.mdx
@@ -448,9 +448,9 @@ cua volume config set-keys
| --- | --- |
| `0` | Success. |
| `1` | Failure, or `cua do` reported an error. |
-| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`, `cloud:NAME`). |
+| `2` | Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`). |
| `3` | Not found: sandbox, window, skill or image (or an image not published yet). |
-| `4` | Not supported, or not configured (for example no cloud credentials). |
+| `4` | Not supported, or not configured (for example no provider credentials). |
| `5` | No cua-spacesd answered, or a transport failure. |
| `6` | Unauthenticated or permission denied (by Cua or your cloud account). |
| `7` | Not enough free disk space (see `cua cache`). |
diff --git a/docs/content/docs/cua-cli/reference/index.mdx b/docs/content/docs/cua-cli/reference/index.mdx
index 544789847e..a9dfbb3aca 100644
--- a/docs/content/docs/cua-cli/reference/index.mdx
+++ b/docs/content/docs/cua-cli/reference/index.mdx
@@ -15,13 +15,13 @@ description: "Every cua command and every cua MCP tool, generated from the CLI d
| Command group | Description |
| --- | --- |
| [`cua`](/cua-cli/reference/cli) | Synopsis, global options, exit codes and every command. |
-| [`cua auth`](/cua-cli/reference/cli/auth) | Sign in, inspect your Fleet identity, manage API keys and CI tokens. |
-| [`cua sandbox`](/cua-cli/reference/cli/sandbox) | Create, list, connect to, suspend and delete sandboxes, local or in the cloud. |
+| [`cua auth`](/cua-cli/reference/cli/auth) | Sign in and out, see who is signed in, and store sandbox provider keys. |
+| [`cua sandbox`](/cua-cli/reference/cli/sandbox) | Create, list, connect to, suspend and delete sandboxes, local or on your own machines. |
| [Sandbox access](/cua-cli/reference/cli/sandbox-access) | Run commands, copy files, forward ports, take screenshots, reach the MCP and view a sandbox (`cua sandbox exec`, `cp`, `view`, ...). |
-| [`cua config`](/cua-cli/reference/cli/config) | User defaults: where sandboxes run (`default.on`), the default kind and runtime, cloud defaults. |
+| [`cua config`](/cua-cli/reference/cli/config) | User defaults: where sandboxes run (`default.on`), the default kind and runtime. |
| [`cua viewer`](/cua-cli/reference/cli/viewer) | One local browser page that lists every sandbox and opens its viewer. |
| [`cua do`](/cua-cli/reference/cli/do) | One-shot computer actions (screenshot, click, type, windows) against a selected target. |
-| [`cua image`](/cua-cli/reference/cli/image) | Pull, build and push OCI images, and manage Fleet image resources; list the image catalog. |
+| [`cua image`](/cua-cli/reference/cli/image) | Pull, build and push OCI images; list the image catalog. |
| [`cua mcp`](/cua-cli/reference/cli/mcp) | The stdio MCP server for AI assistants. |
| [`cua agent`](/cua-cli/reference/cli/agent) | Run coding agents (Claude Code, Codex, Gemini CLI, ...) inside a sandbox and follow, continue or stop them. |
| [`cua agents`](/cua-cli/reference/cli/agents) | Install cua skills and the cua MCP server into AI coding agents. |
@@ -50,7 +50,7 @@ description: "Every cua command and every cua MCP tool, generated from the CLI d
| [All tools](/cua-cli/reference/mcp-tools) | Every `cua mcp` tool with a one-line summary. |
| [Spaces tools](/cua-cli/reference/mcp-tools/spaces) | The Spaces contract: register, claim and release Spaces, run commands, move files, stream, run agents and teleport. 86 tools. |
| [Image tools](/cua-cli/reference/mcp-tools/images) | The sandbox image catalog: which images exist and which ship a browser. 1 tools. |
-| [Sandbox tools](/cua-cli/reference/mcp-tools/sandbox) | Create and manage sandboxes, local or in the cloud. 11 tools. |
+| [Sandbox tools](/cua-cli/reference/mcp-tools/sandbox) | Create and manage sandboxes, local or on your own machines. 11 tools. |
| [Teleport tools](/cua-cli/reference/mcp-tools/teleport) | Move a signed-in browser session, per site, into a sandbox through the Cua Keyvault, with consent. 1 tools. |
| [Computer tools](/cua-cli/reference/mcp-tools/computer) | Screenshots, input, windows, files and shell on a sandbox desktop. 35 tools. |
| [Skills tools](/cua-cli/reference/mcp-tools/skills) | List, read, record and delete skills (recorded demonstrations). 4 tools. |
diff --git a/docs/content/docs/cua-cli/reference/mcp-tools/computer.mdx b/docs/content/docs/cua-cli/reference/mcp-tools/computer.mdx
index 1584729379..a1fe9187d9 100644
--- a/docs/content/docs/cua-cli/reference/mcp-tools/computer.mdx
+++ b/docs/content/docs/cua-cli/reference/mcp-tools/computer.mdx
@@ -60,7 +60,7 @@ Permission: `computer:screenshot`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="computer_screenshot--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_screenshot--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
## `computer_click`
@@ -71,7 +71,7 @@ Permission: `computer:click`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="computer_click--button"></span>`button` | `string` | | left (default), right or middle. |
-| <span id="computer_click--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_click--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
| <span id="computer_click--x"></span>`x` | `integer` | required | X in screenshot pixels. |
| <span id="computer_click--y"></span>`y` | `integer` | required | Y in screenshot pixels. |
@@ -89,7 +89,7 @@ Permission: `computer:click`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="computer_double_click--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_double_click--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
| <span id="computer_double_click--x"></span>`x` | `integer` | required | X in screenshot pixels. |
| <span id="computer_double_click--y"></span>`y` | `integer` | required | Y in screenshot pixels. |
@@ -107,7 +107,7 @@ Permission: `computer:click`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="computer_move_cursor--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_move_cursor--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
| <span id="computer_move_cursor--x"></span>`x` | `integer` | required | X in screenshot pixels. |
| <span id="computer_move_cursor--y"></span>`y` | `integer` | required | Y in screenshot pixels. |
@@ -126,7 +126,7 @@ Permission: `computer:click`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="computer_mouse_down--button"></span>`button` | `string` | | left, right or middle. |
-| <span id="computer_mouse_down--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_mouse_down--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
| <span id="computer_mouse_down--x"></span>`x` | `integer` | required | X in screenshot pixels. |
| <span id="computer_mouse_down--y"></span>`y` | `integer` | required | Y in screenshot pixels. |
@@ -145,7 +145,7 @@ Permission: `computer:click`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="computer_mouse_up--button"></span>`button` | `string` | | left, right or middle. |
-| <span id="computer_mouse_up--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_mouse_up--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
| <span id="computer_mouse_up--x"></span>`x` | `integer` | required | X in screenshot pixels. |
| <span id="computer_mouse_up--y"></span>`y` | `integer` | required | Y in screenshot pixels. |
@@ -163,7 +163,7 @@ Permission: `computer:type`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="computer_type--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_type--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
| <span id="computer_type--text"></span>`text` | `string` | required | Text. |
**Example arguments**
@@ -181,7 +181,7 @@ Permission: `computer:key`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="computer_key--key"></span>`key` | `string` | required | Key. |
-| <span id="computer_key--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_key--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
**Example arguments**
@@ -198,7 +198,7 @@ Permission: `computer:key`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="computer_key_down--key"></span>`key` | `string` | required | Key. |
-| <span id="computer_key_down--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_key_down--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
**Example arguments**
@@ -215,7 +215,7 @@ Permission: `computer:key`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="computer_key_up--key"></span>`key` | `string` | required | Key. |
-| <span id="computer_key_up--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_key_up--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
**Example arguments**
@@ -232,7 +232,7 @@ Permission: `computer:hotkey`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="computer_hotkey--keys"></span>`keys` | `string` | required | Keys joined by +. |
-| <span id="computer_hotkey--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_hotkey--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
**Example arguments**
@@ -250,7 +250,7 @@ Permission: `computer:scroll`.
| --- | --- | --- | --- |
| <span id="computer_scroll--amount"></span>`amount` | `integer` | | Lines (default 3). |
| <span id="computer_scroll--direction"></span>`direction` | `string` | | down (default), up, left, right. |
-| <span id="computer_scroll--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_scroll--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
## `computer_drag`
@@ -262,7 +262,7 @@ Permission: `computer:drag`.
| --- | --- | --- | --- |
| <span id="computer_drag--end_x"></span>`end_x` | `integer` | required | End X. |
| <span id="computer_drag--end_y"></span>`end_y` | `integer` | required | End Y. |
-| <span id="computer_drag--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_drag--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
| <span id="computer_drag--start_x"></span>`start_x` | `integer` | required | Start X. |
| <span id="computer_drag--start_y"></span>`start_y` | `integer` | required | Start Y. |
@@ -280,7 +280,7 @@ Permission: `computer:clipboard`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="computer_clipboard_get--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_clipboard_get--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
## `computer_clipboard_set`
@@ -290,7 +290,7 @@ Permission: `computer:clipboard`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="computer_clipboard_set--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_clipboard_set--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
| <span id="computer_clipboard_set--text"></span>`text` | `string` | required | Text. |
**Example arguments**
@@ -308,7 +308,7 @@ Permission: `computer:file`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="computer_file_read--path"></span>`path` | `string` | required | Path. |
-| <span id="computer_file_read--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_file_read--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
**Example arguments**
@@ -326,7 +326,7 @@ Permission: `computer:file`.
| --- | --- | --- | --- |
| <span id="computer_file_write--content"></span>`content` | `string` | required | Content. |
| <span id="computer_file_write--path"></span>`path` | `string` | required | Path. |
-| <span id="computer_file_write--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_file_write--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
**Example arguments**
@@ -343,7 +343,7 @@ Permission: `computer:file`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="computer_file_list--path"></span>`path` | `string` | | Path (default .). |
-| <span id="computer_file_list--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_file_list--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
## `computer_shell`
@@ -354,7 +354,7 @@ Permission: `computer:shell`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="computer_shell--command"></span>`command` | `string` | required | Command line. |
-| <span id="computer_shell--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_shell--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
**Example arguments**
@@ -371,7 +371,7 @@ Permission: `computer:window`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="computer_window_list--app"></span>`app` | `string` | | Filter by app or title. |
-| <span id="computer_window_list--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_window_list--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
## `computer_window_open`
@@ -382,7 +382,7 @@ Permission: `computer:window`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="computer_window_open--path"></span>`path` | `string` | required | Path or URL. |
-| <span id="computer_window_open--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_window_open--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
**Example arguments**
@@ -398,7 +398,7 @@ Permission: `computer:window`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="computer_window_focus--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_window_focus--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
| <span id="computer_window_focus--window_id"></span>`window_id` | `string` | required | Window id. |
**Example arguments**
@@ -415,7 +415,7 @@ Permission: `computer:window`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="computer_window_unfocus--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_window_unfocus--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
## `computer_window_minimize`
@@ -425,7 +425,7 @@ Permission: `computer:window`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="computer_window_minimize--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_window_minimize--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
| <span id="computer_window_minimize--window_id"></span>`window_id` | `string` | required | Window id. |
**Example arguments**
@@ -442,7 +442,7 @@ Permission: `computer:window`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="computer_window_maximize--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_window_maximize--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
| <span id="computer_window_maximize--window_id"></span>`window_id` | `string` | required | Window id. |
**Example arguments**
@@ -459,7 +459,7 @@ Permission: `computer:window`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="computer_window_close--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_window_close--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
| <span id="computer_window_close--window_id"></span>`window_id` | `string` | required | Window id. |
**Example arguments**
@@ -477,7 +477,7 @@ Permission: `computer:window`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="computer_window_resize--height"></span>`height` | `integer` | required | Height. |
-| <span id="computer_window_resize--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_window_resize--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
| <span id="computer_window_resize--width"></span>`width` | `integer` | required | Width. |
| <span id="computer_window_resize--window_id"></span>`window_id` | `string` | required | Window id. |
@@ -495,7 +495,7 @@ Permission: `computer:window`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="computer_window_move--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_window_move--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
| <span id="computer_window_move--window_id"></span>`window_id` | `string` | required | Window id. |
| <span id="computer_window_move--x"></span>`x` | `integer` | required | X. |
| <span id="computer_window_move--y"></span>`y` | `integer` | required | Y. |
@@ -514,7 +514,7 @@ Permission: `computer:window`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="computer_window_get_info--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_window_get_info--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
| <span id="computer_window_get_info--window_id"></span>`window_id` | `string` | required | Window id. |
**Example arguments**
@@ -533,7 +533,7 @@ Permission: `computer:window`.
| --- | --- | --- | --- |
| <span id="computer_launch--app"></span>`app` | `string` | required | App name. |
| <span id="computer_launch--args"></span>`args` | `string[]` | | Arguments. |
-| <span id="computer_launch--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_launch--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
**Example arguments**
@@ -549,7 +549,7 @@ Permission: `computer:screenshot`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="computer_get_screen_size--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_get_screen_size--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
## `computer_get_cursor_position`
@@ -559,7 +559,7 @@ Permission: `computer:screenshot`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="computer_get_cursor_position--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_get_cursor_position--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
## `computer_get_current_window`
@@ -569,7 +569,7 @@ Permission: `computer:screenshot`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="computer_get_current_window--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_get_current_window--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
## `computer_get_accessibility_tree`
@@ -580,7 +580,7 @@ Permission: `computer:screenshot`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="computer_get_accessibility_tree--max_depth"></span>`max_depth` | `integer` | | Depth limit. |
-| <span id="computer_get_accessibility_tree--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_get_accessibility_tree--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
| <span id="computer_get_accessibility_tree--window_id"></span>`window_id` | `string` | | Window id. |
## `computer_accessibility_act`
@@ -593,7 +593,7 @@ Permission: `computer:accessibility`.
| --- | --- | --- | --- |
| <span id="computer_accessibility_act--action"></span>`action` | `string` | | press (default), focus, set_value, ... |
| <span id="computer_accessibility_act--element_id"></span>`element_id` | `string` | required | Element id. |
-| <span id="computer_accessibility_act--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
+| <span id="computer_accessibility_act--sandbox"></span>`sandbox` | `string` | | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations (default: --sandbox / CUA_SANDBOX). |
| <span id="computer_accessibility_act--snapshot_id"></span>`snapshot_id` | `string` | | Snapshot id from the tree. |
| <span id="computer_accessibility_act--value"></span>`value` | `string` | | Value for set_value. |
diff --git a/docs/content/docs/cua-cli/reference/mcp-tools/images.mdx b/docs/content/docs/cua-cli/reference/mcp-tools/images.mdx
index 0dfbc75f20..74a7778ebd 100644
--- a/docs/content/docs/cua-cli/reference/mcp-tools/images.mdx
+++ b/docs/content/docs/cua-cli/reference/mcp-tools/images.mdx
@@ -14,7 +14,7 @@ Served by `cua mcp`; see [MCP tools](/cua-cli/reference/mcp-tools) for every too
## `images_list`
-List the sandbox image catalog (the images the docs list): ref, OS, container or VM, local and cloud runtime, whether it ships cua-spacesd and which browsers, its other variants, and the command that creates it. browser_tools=true means the in-sandbox cua-driver browser tools can drive its browser. Call this first to choose an image.
+List the sandbox image catalog (the images the docs list): ref, OS, container or VM, local runtime, whether it ships cua-spacesd and which browsers, its other variants, and the command that creates it. browser_tools=true means the in-sandbox cua-driver browser tools can drive its browser. Call this first to choose an image.
Permission: `images:list`.
diff --git a/docs/content/docs/cua-cli/reference/mcp-tools/index.mdx b/docs/content/docs/cua-cli/reference/mcp-tools/index.mdx
index 1d12de00ce..2137311f48 100644
--- a/docs/content/docs/cua-cli/reference/mcp-tools/index.mdx
+++ b/docs/content/docs/cua-cli/reference/mcp-tools/index.mdx
@@ -113,15 +113,15 @@ The sandbox image catalog: which images exist and which ship a browser. [Referen
| Tool | Description |
| --- | --- |
-| <span id="images_list"></span>[`images_list`](/cua-cli/reference/mcp-tools/images#images_list) | List the sandbox image catalog (the images the docs list): ref, OS, container or VM, local and cloud runtime, whether it ships cua-spacesd and which browsers, its other variants, and the command that creates it. |
+| <span id="images_list"></span>[`images_list`](/cua-cli/reference/mcp-tools/images#images_list) | List the sandbox image catalog (the images the docs list): ref, OS, container or VM, local runtime, whether it ships cua-spacesd and which browsers, its other variants, and the command that creates it. |
## Sandbox tools
-Create and manage sandboxes, local or in the cloud. [Reference](/cua-cli/reference/mcp-tools/sandbox).
+Create and manage sandboxes, local or on your own machines. [Reference](/cua-cli/reference/mcp-tools/sandbox).
| Tool | Description |
| --- | --- |
-| <span id="sandbox_list"></span>[`sandbox_list`](/cua-cli/reference/mcp-tools/sandbox#sandbox_list) | List sandboxes: local, direct and cloud (Fleet) ones by default, each row with location (local, cloud or direct). |
+| <span id="sandbox_list"></span>[`sandbox_list`](/cua-cli/reference/mcp-tools/sandbox#sandbox_list) | List sandboxes: local and direct ones by default, each row with location (local or direct). |
| <span id="sandbox_create"></span>[`sandbox_create`](/cua-cli/reference/mcp-tools/sandbox#sandbox_create) | Create a sandbox from any image. |
| <span id="sandbox_get"></span>[`sandbox_get`](/cua-cli/reference/mcp-tools/sandbox#sandbox_get) | Get details for a sandbox. |
| <span id="sandbox_start"></span>[`sandbox_start`](/cua-cli/reference/mcp-tools/sandbox#sandbox_start) | Start (resume) a sandbox. |
diff --git a/docs/content/docs/cua-cli/reference/mcp-tools/sandbox.mdx b/docs/content/docs/cua-cli/reference/mcp-tools/sandbox.mdx
index 0ccb2f5819..bd59acafd5 100644
--- a/docs/content/docs/cua-cli/reference/mcp-tools/sandbox.mdx
+++ b/docs/content/docs/cua-cli/reference/mcp-tools/sandbox.mdx
@@ -1,6 +1,6 @@
---
title: "Sandbox tools"
-description: "Create and manage sandboxes, local or in the cloud."
+description: "Create and manage sandboxes, local or on your own machines."
---
{/*
@@ -12,7 +12,7 @@ description: "Create and manage sandboxes, local or in the cloud."
| Tool | Description |
| --- | --- |
-| [`sandbox_list`](#sandbox_list) | List sandboxes: local, direct and cloud (Fleet) ones by default, each row with location (local, cloud or direct). |
+| [`sandbox_list`](#sandbox_list) | List sandboxes: local and direct ones by default, each row with location (local or direct). |
| [`sandbox_create`](#sandbox_create) | Create a sandbox from any image. |
| [`sandbox_get`](#sandbox_get) | Get details for a sandbox. |
| [`sandbox_start`](#sandbox_start) | Start (resume) a sandbox. |
@@ -28,17 +28,17 @@ Served by `cua mcp`; see [MCP tools](/cua-cli/reference/mcp-tools) for every too
## `sandbox_list`
-List sandboxes: local, direct and cloud (Fleet) ones by default, each row with location (local, cloud or direct). Pass location to list only one kind. If the cloud cannot be listed, the local rows come back with a warning.
+List sandboxes: local and direct ones by default, each row with location (local or direct). Pass location to list only one kind.
Permission: `sandbox:list`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="sandbox_list--location"></span>`location` | `"local" \| "cloud" \| "direct"` | | Only sandboxes in this location: local, cloud or direct (default: all). |
+| <span id="sandbox_list--location"></span>`location` | `"local" \| "direct"` | | Only sandboxes in this location: local or direct (default: all). |
## `sandbox_create`
-Create a sandbox from any image. `on` says where (local, the default unless the user configured another with `cua config set default.on`; or cloud), `kind` what (auto, container, vm) and `runtime` which engine (auto, or gvisor, runc, qemu, lume locally; gvisor, kubevirt in the cloud); an impossible combination fails and lists the valid values. To browse the web, pass browser=true (and optionally url): it starts the canonical Linux image, registers it as a Space, launches Chromium with a throwaway profile inside it and returns the space, session, target_id and tab_id to pass to call_tool with the in-sandbox browser tools (browser_navigate, get_browser_state, browser_click, browser_type). Pass command, env and services to run a server in it, for example an MCP server: services &#123;"mcp": 8765&#125;. Without browser=true it does not register a Space: to reach its MCP server with list_tools/call_tool (service="mcp"), use create_space instead (same arguments), or add this one with add_space (address local:&lt;name&gt;).
+Create a sandbox from any image. `on` says where (local, the default unless the user configured another with `cua config set default.on`), `kind` what (auto, container, vm) and `runtime` which engine (auto, or gvisor, runc, qemu, lume); an impossible combination fails and lists the valid values. To browse the web, pass browser=true (and optionally url): it starts the canonical Linux image, registers it as a Space, launches Chromium with a throwaway profile inside it and returns the space, session, target_id and tab_id to pass to call_tool with the in-sandbox browser tools (browser_navigate, get_browser_state, browser_click, browser_type). Pass command, env and services to run a server in it, for example an MCP server: services &#123;"mcp": 8765&#125;. Without browser=true it does not register a Space: to reach its MCP server with list_tools/call_tool (service="mcp"), use create_space instead (same arguments), or add this one with add_space (address local:&lt;name&gt;).
Permission: `sandbox:create`.
@@ -50,10 +50,9 @@ Permission: `sandbox:create`.
| <span id="sandbox_create--image"></span>`image` | `string` | | Image reference, any registry (overrides os_type). |
| <span id="sandbox_create--kind"></span>`kind` | `"auto" \| "container" \| "vm"` | | What kind of machine: auto (default; from the image), container or vm. |
| <span id="sandbox_create--name"></span>`name` | `string` | | Sandbox name. |
-| <span id="sandbox_create--on"></span>`on` | `string` | | Where it runs: local or cloud (default: the user's default location, else local). |
+| <span id="sandbox_create--on"></span>`on` | `string` | | Where it runs: local (default: the user's default location, else local). |
| <span id="sandbox_create--os_type"></span>`os_type` | `string` | | linux (default) or macos. |
-| <span id="sandbox_create--pool"></span>`pool` | `string` | | Use this dedicated cloud pool (Fleets advanced; implies on=cloud). |
-| <span id="sandbox_create--runtime"></span>`runtime` | `string` | | Which engine: auto (default) or one the location offers for the kind (local: gvisor, runc, qemu, lume; cloud: gvisor, kubevirt). |
+| <span id="sandbox_create--runtime"></span>`runtime` | `string` | | Which engine: auto (default) or one the location offers for the kind (gvisor, runc, qemu, lume). |
| <span id="sandbox_create--services"></span>`services` | `object` | | Named services: name to guest port, for example &#123;"mcp": 8765&#125;; each is probed for readiness. |
| <span id="sandbox_create--url"></span>`url` | `string` | | With browser=true: open this URL first. |
@@ -65,7 +64,7 @@ Permission: `sandbox:get`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="sandbox_get--name"></span>`name` | `string` | required | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations. |
+| <span id="sandbox_get--name"></span>`name` | `string` | required | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations. |
**Example arguments**
@@ -81,7 +80,7 @@ Permission: `sandbox:start`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="sandbox_start--name"></span>`name` | `string` | required | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations. |
+| <span id="sandbox_start--name"></span>`name` | `string` | required | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations. |
**Example arguments**
@@ -97,7 +96,7 @@ Permission: `sandbox:stop`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="sandbox_stop--name"></span>`name` | `string` | required | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations. |
+| <span id="sandbox_stop--name"></span>`name` | `string` | required | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations. |
**Example arguments**
@@ -113,7 +112,7 @@ Permission: `sandbox:restart`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="sandbox_restart--name"></span>`name` | `string` | required | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations. |
+| <span id="sandbox_restart--name"></span>`name` | `string` | required | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations. |
**Example arguments**
@@ -129,7 +128,7 @@ Permission: `sandbox:suspend`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="sandbox_suspend--name"></span>`name` | `string` | required | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations. |
+| <span id="sandbox_suspend--name"></span>`name` | `string` | required | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations. |
**Example arguments**
@@ -145,7 +144,7 @@ Permission: `sandbox:delete`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="sandbox_delete--name"></span>`name` | `string` | required | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations. |
+| <span id="sandbox_delete--name"></span>`name` | `string` | required | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations. |
**Example arguments**
@@ -161,7 +160,7 @@ Permission: `sandbox:view`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="sandbox_view--name"></span>`name` | `string` | required | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations. |
+| <span id="sandbox_view--name"></span>`name` | `string` | required | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations. |
**Example arguments**
@@ -177,7 +176,7 @@ Permission: `sandbox:view`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="sandbox_vnc--name"></span>`name` | `string` | required | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations. |
+| <span id="sandbox_vnc--name"></span>`name` | `string` | required | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations. |
**Example arguments**
@@ -193,7 +192,7 @@ Permission: `sandbox:browser`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="sandbox_open_browser--name"></span>`name` | `string` | required | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations. |
+| <span id="sandbox_open_browser--name"></span>`name` | `string` | required | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations. |
| <span id="sandbox_open_browser--session"></span>`session` | `string` | | cua-driver session label to use on every later browser call (default: browse). |
| <span id="sandbox_open_browser--url"></span>`url` | `string` | | Open this URL first. |
diff --git a/docs/content/docs/cua-cli/reference/mcp-tools/teleport.mdx b/docs/content/docs/cua-cli/reference/mcp-tools/teleport.mdx
index ef53cc0ffa..86137399e4 100644
--- a/docs/content/docs/cua-cli/reference/mcp-tools/teleport.mdx
+++ b/docs/content/docs/cua-cli/reference/mcp-tools/teleport.mdx
@@ -22,7 +22,7 @@ Permission: `teleport:browser`.
| --- | --- | --- | --- |
| <span id="teleport_browser_session--browser"></span>`browser` | `"firefox" \| "chrome"` | required | firefox or chrome (chromium, brave and edge profiles use chrome). |
| <span id="teleport_browser_session--duration_minutes"></span>`duration_minutes` | `integer` | | How long the sandbox may keep them (default 15, at most 1440). |
-| <span id="teleport_browser_session--name"></span>`name` | `string` | required | Sandbox ref (local:&lt;name&gt;, cloud:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations. |
+| <span id="teleport_browser_session--name"></span>`name` | `string` | required | Sandbox ref (local:&lt;name&gt;, direct:&lt;host:port&gt;) or a name unique across locations. |
| <span id="teleport_browser_session--reason"></span>`reason` | `string` | | Why, in a few words; shown to the user as unverified. |
| <span id="teleport_browser_session--request_id"></span>`request_id` | `string` | | The request_id from the first call, after the user approved it in Cua. |
| <span id="teleport_browser_session--sites"></span>`sites` | `string[]` | required | The exact sites to teleport, for example ["github.com"]. |
diff --git a/libs/cua/Cargo.lock b/libs/cua/Cargo.lock
index c151419026..163755e56f 100644
--- a/libs/cua/Cargo.lock
+++ b/libs/cua/Cargo.lock
@@ -2392,7 +2392,6 @@ dependencies = [
"cua-contrib",
"cua-daemon",
"cua-disk",
- "cua-fleet",
"cua-home",
"cua-host",
"cua-image",
diff --git a/libs/cua/crates/cua-cli/Cargo.toml b/libs/cua/crates/cua-cli/Cargo.toml
index 62308d1a96..42454d6549 100644
--- a/libs/cua/crates/cua-cli/Cargo.toml
+++ b/libs/cua/crates/cua-cli/Cargo.toml
@@ -42,7 +42,6 @@ cua-vmm = { path = "../cua-vmm" }
cua-sandbox-core.workspace = true
image = { version = "0.25", default-features = false, features = ["png", "jpeg"] }
pbjson-types.workspace = true
-cua-fleet.workspace = true
humantime.workspace = true
# `cua host …` (unattended access) and `cua spaces ls` (registry + relay machines).
cua-host.workspace = true
@@ -86,7 +85,6 @@ axum.workspace = true
cua-host = { workspace = true, features = ["testing"] }
cua-daemon = { workspace = true, features = ["server", "client", "test-fixtures"] }
cua-spacesd-client = { workspace = true, features = ["testing"] }
-cua-fleet = { workspace = true, features = ["testing"] }
cua-sandbox-core = { workspace = true, features = ["testing"] }
tempfile.workspace = true
# Drives the interactive onboarding prompts through a real PTY.
diff --git a/libs/cua/crates/cua-cli/src/agent_cmd.rs b/libs/cua/crates/cua-cli/src/agent_cmd.rs
index bcaabe0291..f2d67aa6f9 100644
--- a/libs/cua/crates/cua-cli/src/agent_cmd.rs
+++ b/libs/cua/crates/cua-cli/src/agent_cmd.rs
@@ -24,7 +24,7 @@ pub enum AgentCmd {
/// Start a coding agent in a sandbox (returns at once unless --follow).
#[command(after_help = "Examples:
cua agent run local:dev claude-code \"fix the failing test\" --env-from-host ANTHROPIC_API_KEY -f
- cua agent run cloud:ci openai-codex \"add tests\" --repo https://github.com/org/repo --exit-when-idle")]
+ cua agent run local:ci openai-codex \"add tests\" --repo https://github.com/org/repo --exit-when-idle")]
Run(Box<RunArgs>),
/// List runs in a sandbox.
#[command(
@@ -35,7 +35,7 @@ pub enum AgentCmd {
Ls {
#[command(flatten)]
at: Narrow,
- /// Sandbox (`local:NAME`, `cloud:NAME`, `direct:HOST:PORT`, or NAME).
+ /// Sandbox (`local:NAME`, `direct:HOST:PORT`, or NAME).
sandbox: String,
},
/// Print a run's normalized events (--follow to stream).
@@ -135,7 +135,7 @@ pub enum AgentCmd {
pub struct RunArgs {
#[command(flatten)]
at: Narrow,
- /// Sandbox (`local:NAME`, `cloud:NAME`, `direct:HOST:PORT`, or NAME).
+ /// Sandbox (`local:NAME`, `direct:HOST:PORT`, or NAME).
sandbox: String,
/// Harness (`cua agent harnesses`).
harness: String,
diff --git a/libs/cua/crates/cua-cli/src/auth.rs b/libs/cua/crates/cua-cli/src/auth.rs
index 9c66849761..adcdaa527d 100644
--- a/libs/cua/crates/cua-cli/src/auth.rs
+++ b/libs/cua/crates/cua-cli/src/auth.rs
@@ -1,23 +1,15 @@
-//! `cua auth` and `cua wif-token`: sign-in through `cua-auth` (browser
-//! authorization code + PKCE with a loopback redirect, device code with
-//! `--remote` or when the identity provider does not accept the loopback
-//! redirect yet), the shared credential store, Fleet identity and user API
-//! keys, and GitHub Actions workload identity tokens.
-//!
-//! Fleet credentials resolve in this order (same as cua-sandbox):
-//! `FLEETS_TOKEN`, then `CUA_CLIENT_ID` + `CUA_CLIENT_SECRET`, then the
-//! session stored by `cua auth login` (its access token, refreshed when
-//! needed).
+//! `cua auth`: sign-in through `cua-auth` (browser authorization code +
+//! PKCE with a loopback redirect, device code with `--remote` or when the
+//! identity provider does not accept the loopback redirect yet), who is
+//! signed in (`whoami`) and the shared credential store.
-use crate::util::{self, http, line};
+use crate::util::{self, line};
+use cua_host::spaces_api::SpacesApiClient;
use cua_sdk::CuaError;
-use std::{io::Write, time::Duration};
+use std::io::Write;
pub use cua_auth::{Store, jwt_claims};
-/// GitHub OIDC audience Fleets trusts.
-pub const GITHUB_WIF_AUDIENCE: &str = "fleets";
-
/// Maps a cua-auth error.
pub fn auth_err(e: cua_auth::Error) -> CuaError {
use cua_auth::Error as E;
@@ -47,107 +39,6 @@ pub async fn session_token(_store: &Store) -> Result<Option<String>, CuaError> {
}
}
-// ------------------------------------------------------------------ Fleet
-
-/// Where Fleet credentials come from.
-#[derive(Clone, Debug, PartialEq, Eq)]
-pub enum FleetAuth {
- /// `FLEETS_TOKEN`.
- WorkloadToken,
- /// `CUA_CLIENT_ID` + `CUA_CLIENT_SECRET`.
- ClientCredentials(String),
- /// The `cua auth login` session.
- Session,
-}
-
-impl FleetAuth {
- fn describe(&self) -> String {
- match self {
- FleetAuth::WorkloadToken => "FLEETS_TOKEN".into(),
- FleetAuth::ClientCredentials(id) => format!("client credentials ({id})"),
- FleetAuth::Session => "cua auth login session".into(),
- }
- }
-}
-
-/// Whether Fleet credentials are available without reading the OS
-/// credential vault: `FLEETS_TOKEN` or client credentials in the
-/// environment, or a session the marker (or the file store) says exists.
-/// Implicit Fleet calls (the default `cua sb ls`) check this first.
-pub fn fleet_maybe_configured() -> bool {
- let cfg = cua_fleet::FleetConfig::from_env();
- cfg.fleet_token.is_some()
- || (cfg.client_id.is_some() && cfg.client_secret.is_some())
- || (cfg.accepts_session() && cua_auth::may_have_session())
-}
-
-/// The Fleet configuration from the environment, falling back to the
-/// stored session. `None` when no credentials exist at all.
-pub async fn fleet_config() -> Result<Option<(cua_fleet::FleetConfig, FleetAuth)>, CuaError> {
- let mut cfg = cua_fleet::FleetConfig::from_env();
- if cfg.fleet_token.is_some() {
- return Ok(Some((cfg, FleetAuth::WorkloadToken)));
- }
- if let (Some(id), Some(_)) = (&cfg.client_id, &cfg.client_secret) {
- let id = id.clone();
- return Ok(Some((cfg, FleetAuth::ClientCredentials(id))));
- }
- if !cfg.accepts_session() {
- return Ok(None);
- }
- match session_token(&Store::from_env()).await? {
- Some(t) => {
- cfg.fleet_token = Some(t);
- Ok(Some((cfg, FleetAuth::Session)))
- }
- None => Ok(None),
- }
-}
-
-/// A connected Fleet client. Cua Cloud has ended: always
-/// [`cloud_ended`], so no command reaches Fleet.
-pub async fn fleet_client() -> Result<(cua_fleet::FleetClient, FleetAuth), CuaError> {
- Err(cloud_ended())
-}
-
-/// The "Cua Cloud has ended" error every Cua Cloud command fails with.
-pub fn cloud_ended() -> CuaError {
- CuaError::Unsupported(cua_sandbox_core::CLOUD_ENDED.into())
-}
-
-/// Maps a Fleet error.
-pub fn fleet_err(e: impl Into<cua_fleet::Error>) -> CuaError {
- match e.into() {
- cua_fleet::Error::MissingCredentials => {
- CuaError::ProviderNotConfigured(cua_fleet::MISSING_CREDENTIALS.into())
- }
- cua_fleet::Error::InvalidArgument(m) => CuaError::InvalidArgument(m),
- e @ cua_fleet::Error::AdmissionDenied { .. } => {
- CuaError::FleetAdmissionDenied(e.to_string())
- }
- e @ cua_fleet::Error::CreditExhausted { .. } => {
- CuaError::CloudCreditExhausted(e.to_string())
- }
- cua_fleet::Error::Sdk(e) => {
- use cua_fleet::SdkError as S;
- let m = e.to_string();
- match e {
- S::Status { status: 401, .. } | S::Token { .. } => CuaError::Unauthenticated(m),
- S::Status { status: 403, .. } | S::PoolAccessDenied { .. } => {
- CuaError::PermissionDenied(m)
- }
- S::Status { status: 404, .. } => CuaError::NotFound(m),
- S::Transport { .. } => CuaError::Transport(m),
- S::Configuration { .. } | S::InvalidResourceName { .. } => {
- CuaError::InvalidArgument(m)
- }
- _ => CuaError::Fleet(m),
- }
- }
- other => CuaError::Fleet(other.to_string()),
- }
-}
-
// --------------------------------------------------------------- commands
/// How `cua auth login` signs in.
@@ -299,206 +190,222 @@ pub fn keychain(prompt: bool, forget: bool, out: &mut dyn Write) -> Result<i32,
Ok(0)
}
-/// `cua auth whoami`: the active Fleet identity, verified with a read-only
-/// namespace listing.
+/// `cua auth whoami`: who the signed-in Cua session is. The identity comes
+/// from the access token's claims; the Spaces API adds the plan and the
+/// number of teams, best effort.
pub async fn whoami(json: bool, out: &mut dyn Write) -> Result<i32, CuaError> {
- let Some((cfg, auth)) = fleet_config().await? else {
+ let Some(token) = session_token(&Store::from_env()).await? else {
if json {
util::json_line(out, &serde_json::json!({"authenticated": false}));
} else {
- line(
- out,
- "Not authenticated. Run 'cua auth login', or set CUA_CLIENT_ID and CUA_CLIENT_SECRET, or FLEETS_TOKEN.",
- );
+ line(out, "Not logged in. Run 'cua auth login'.");
}
return Ok(1);
};
- let base = cfg.base_url.clone();
- let client = cua_fleet::FleetClient::connect(cfg).map_err(fleet_err)?;
- let token = client.access_token(false).await.map_err(fleet_err)?;
- let claims = jwt_claims(&token).unwrap_or_default();
- let namespaces = client
- .sdk()
- .list_namespaces()
- .await
- .map_err(|e| fleet_err(cua_fleet::Error::Sdk(e)))?;
- let pick = |k: &str| claims[k].as_str().map(str::to_string);
+ let api = SpacesApiClient::current().map_err(crate::host::host_err)?;
+ whoami_with(&api, &token, json, out).await
+}
+
+/// [`whoami`] for the access token `token`, asking `api` for the account.
+pub async fn whoami_with(
+ api: &SpacesApiClient,
+ token: &str,
+ json: bool,
+ out: &mut dyn Write,
+) -> Result<i32, CuaError> {
+ use cua_host::Error as E;
+ let claims = jwt_claims(token).unwrap_or_default();
+ let pick = |k: &str| {
+ claims[k]
+ .as_str()
+ .filter(|s| !s.is_empty())
+ .map(str::to_string)
+ };
+ // A refused token means the session is no longer valid; any other
+ // failure (offline, a server error, no Teams routes yet) only costs the
+ // plan and team count.
+ let me = match api.me(token).await {
+ Ok(me) => Some(me),
+ Err(e @ (E::Unauthenticated(_) | E::PermissionDenied(_))) => {
+ return Err(CuaError::Unauthenticated(format!(
+ "your Cua sign-in is no longer valid ({e}); run 'cua auth login' again"
+ )));
+ }
+ Err(_) => None,
+ };
let user = pick("preferred_username").or_else(|| pick("email"));
+ let email = pick("email").or_else(|| {
+ me.as_ref()
+ .map(|m| m.email.clone())
+ .filter(|e| !e.is_empty())
+ });
let expires = claims["exp"]
.as_i64()
.and_then(|e| chrono::DateTime::from_timestamp(e, 0))
.map(|d| d.to_rfc3339());
+ let plan = me.as_ref().map(|m| match m.entitlements.plan.as_str() {
+ "" => "free".to_string(),
+ p => p.to_string(),
+ });
+ let teams = me.as_ref().map(|m| m.orgs.len());
if json {
util::json_line(
out,
&serde_json::json!({
"authenticated": true,
- "fleet": base,
- "source": auth.describe(),
"user": user,
+ "email": email,
"subject": pick("sub"),
"client": pick("azp"),
"issuer": pick("iss"),
"expires_at": expires,
- "namespaces": namespaces.len(),
+ "plan": plan,
+ "teams": teams,
}),
);
- } else {
- line(out, format!("Fleet: {base}"));
- line(out, format!("Credential: {}", auth.describe()));
- if let Some(u) = &user {
- line(out, format!("User: {u}"));
- }
- if let Some(c) = pick("azp") {
- line(out, format!("Client: {c}"));
- }
- if let Some(e) = &expires {
- line(out, format!("Expires: {e}"));
+ return Ok(0);
+ }
+ let who = match (&user, &email) {
+ (Some(u), Some(e)) if u != e => format!(" as {u} ({e})"),
+ (Some(u), _) | (None, Some(u)) => format!(" as {u}"),
+ _ => String::new(),
+ };
+ line(out, format!("Logged in to Cua{who}."));
+ match (&plan, teams) {
+ (Some(plan), Some(teams)) => {
+ line(out, format!("Plan: {plan}"));
+ line(out, format!("Teams: {teams}"));
}
- line(out, format!("Namespaces: {}", namespaces.len()));
+ _ => line(
+ out,
+ "Plan and teams are unavailable: the Cua API could not be reached.",
+ ),
}
- Ok(0)
-}
-
-/// `cua auth keys ls`.
-pub async fn keys_list(json: bool, out: &mut dyn Write) -> Result<i32, CuaError> {
- let (c, _) = fleet_client().await?;
- let keys = c
- .sdk()
- .list_user_api_keys()
- .await
- .map_err(|e| fleet_err(cua_fleet::Error::Sdk(e)))?;
- if json {
- util::json_line(out, &serde_json::to_value(&keys)?);
- } else if keys.is_empty() {
- line(out, "No API keys.");
- } else {
- let rows: Vec<Vec<String>> = keys
- .iter()
- .map(|k| {
- vec![
- k.id.clone(),
- k.name.clone(),
- k.client_id.clone(),
- k.scope.join(" "),
- ]
- })
- .collect();
- util::table(out, &["ID", "NAME", "CLIENT ID", "SCOPE"], &rows);
+ if let Some(c) = pick("azp") {
+ line(out, format!("Client: {c}"));
}
- Ok(0)
-}
-
-/// `cua auth keys create`: prints the client id and secret once.
-pub async fn keys_create(
- name: String,
- scope: Vec<String>,
- json: bool,
- out: &mut dyn Write,
-) -> Result<i32, CuaError> {
- let (c, _) = fleet_client().await?;
- let k = c
- .sdk()
- .create_user_api_key(cua_fleet::sdk::CreateUserApiKeyRequest { name, scope })
- .await
- .map_err(|e| fleet_err(cua_fleet::Error::Sdk(e)))?;
- if json {
- util::json_line(out, &serde_json::to_value(&k)?);
- } else {
- line(out, format!("Created API key {}.", k.name));
- line(out, format!("CUA_CLIENT_ID={}", k.client_id));
- line(out, format!("CUA_CLIENT_SECRET={}", k.client_secret));
- line(out, format!("CUA_TOKEN_URL={}", k.token_url));
- line(out, "The secret is shown only once.");
+ if let Some(e) = &expires {
+ line(out, format!("Expires: {e}"));
}
Ok(0)
}
-/// `cua auth keys rm`.
-pub async fn keys_delete(id: String, out: &mut dyn Write) -> Result<i32, CuaError> {
- let (c, _) = fleet_client().await?;
- c.sdk()
- .delete_user_api_key(id.clone())
- .await
- .map_err(|e| fleet_err(cua_fleet::Error::Sdk(e)))?;
- line(out, format!("Deleted API key {id}."));
- Ok(0)
-}
-
-// -------------------------------------------------------------------- WIF
-
-fn with_audience(request_url: &str, audience: &str) -> Result<String, CuaError> {
- let mut u = url::Url::parse(request_url)
- .map_err(|e| CuaError::InvalidArgument(format!("ACTIONS_ID_TOKEN_REQUEST_URL: {e}")))?;
- let kept: Vec<(String, String)> = u
- .query_pairs()
- .filter(|(k, _)| k != "audience")
- .map(|(k, v)| (k.into_owned(), v.into_owned()))
- .collect();
- u.query_pairs_mut()
- .clear()
- .extend_pairs(kept)
- .append_pair("audience", audience);
- Ok(u.to_string())
-}
-
-/// Requests a GitHub Actions OIDC token for Fleets.
-pub async fn github_wif_token(audience: &str) -> Result<String, CuaError> {
- let url = std::env::var("ACTIONS_ID_TOKEN_REQUEST_URL").unwrap_or_default();
- let token = std::env::var("ACTIONS_ID_TOKEN_REQUEST_TOKEN").unwrap_or_default();
- let hint = "run in GitHub Actions with permissions: id-token: write";
- if url.is_empty() {
- return Err(CuaError::ProviderNotConfigured(format!(
- "ACTIONS_ID_TOKEN_REQUEST_URL is missing; {hint}"
- )));
- }
- if token.is_empty() {
- return Err(CuaError::ProviderNotConfigured(format!(
- "ACTIONS_ID_TOKEN_REQUEST_TOKEN is missing; {hint}"
- )));
- }
- let r = http()
- .get(with_audience(&url, audience)?)
- .header("accept", "application/json")
- .header("authorization", format!("bearer {token}"))
- .timeout(Duration::from_secs(15))
- .send()
- .await
- .map_err(|_| CuaError::Http("GitHub OIDC request failed".into()))?;
- let status = r.status().as_u16();
- if status != 200 {
- return Err(CuaError::Http(format!(
- "GitHub OIDC request failed with HTTP {status}"
- )));
- }
- let v: serde_json::Value = r
- .json()
- .await
- .map_err(|_| CuaError::Http("GitHub OIDC endpoint returned invalid JSON".into()))?;
- v["value"]
- .as_str()
- .filter(|s| !s.is_empty())
- .map(str::to_string)
- .ok_or_else(|| CuaError::Http("GitHub OIDC response did not contain a token".into()))
-}
-
#[cfg(test)]
mod tests {
use super::*;
+ use base64::Engine;
+ use cua_host::testing::FakeSpacesApi;
- #[test]
- fn audience_replaces_existing_query_value() {
- let u = with_audience("https://gh.test/token?api-version=2&audience=x", "fleets").unwrap();
- assert!(u.contains("api-version=2"), "{u}");
- assert!(u.ends_with("audience=fleets"), "{u}");
- assert_eq!(u.matches("audience=").count(), 1);
+ fn jwt(claims: serde_json::Value) -> String {
+ let e = |v: &[u8]| base64::engine::general_purpose::URL_SAFE_NO_PAD.encode(v);
+ format!(
+ "{}.{}.sig",
+ e(br#"{"alg":"none"}"#),
+ e(claims.to_string().as_bytes())
+ )
+ }
+
+ async fn run(
+ api: &SpacesApiClient,
+ token: &str,
+ json: bool,
+ ) -> (Result<i32, CuaError>, String) {
+ let mut out = Vec::new();
+ let r = whoami_with(api, token, json, &mut out).await;
+ (r, String::from_utf8(out).unwrap())
}
#[test]
fn jwt_claims_decode_unverified_payload() {
- use base64::Engine;
- let p = base64::engine::general_purpose::URL_SAFE_NO_PAD.encode(br#"{"sub":"u1"}"#);
- assert_eq!(jwt_claims(&format!("h.{p}.s")).unwrap()["sub"], "u1");
+ assert_eq!(
+ jwt_claims(&jwt(serde_json::json!({"sub": "u1"}))).unwrap()["sub"],
+ "u1"
+ );
assert!(jwt_claims("not-a-jwt").is_none());
}
+
+ #[tokio::test]
+ async fn whoami_reads_the_token_and_the_cua_api() {
+ let fake = FakeSpacesApi::start().await;
+ let token = jwt(serde_json::json!({
+ "preferred_username": "ada", "email": "[email protected]", "sub": "u-ada",
+ "azp": "cua-cli", "iss": "https://auth.cua.test/realms/cyclops-cs", "exp": 1_900_000_000,
+ }));
+ fake.add_account(&token, "u-ada", "[email protected]");
+ fake.add_org("aigis", "AIGIS", "u-ada", &["team_machines"]);
+ let api = SpacesApiClient::new(&fake.url).unwrap();
+
+ let (r, o) = run(&api, &token, false).await;
+ assert_eq!(r.unwrap(), 0);
+ assert!(
+ o.starts_with("Logged in to Cua as ada ([email protected]).\n"),
+ "{o}"
+ );
+ assert!(
+ o.contains("Plan: free\n") && o.contains("Teams: 1\n"),
+ "{o}"
+ );
+ assert!(
+ o.contains("Client: cua-cli\n") && o.contains("Expires: 2030-"),
+ "{o}"
+ );
+ for gone in ["Fleet", "Namespaces", "Credential", "run.cua.ai"] {
+ assert!(!o.contains(gone), "{gone}: {o}");
+ }
+
+ let (r, o) = run(&api, &token, true).await;
+ assert_eq!(r.unwrap(), 0);
+ let v: serde_json::Value = serde_json::from_str(o.trim()).unwrap();
+ assert_eq!(
+ (
+ v["authenticated"].clone(),
+ v["user"].clone(),
+ v["email"].clone()
+ ),
+ (true.into(), "ada".into(), "[email protected]".into())
+ );
+ assert_eq!(
+ (v["subject"].as_str(), v["client"].as_str()),
+ (Some("u-ada"), Some("cua-cli"))
+ );
+ assert_eq!(v["issuer"], "https://auth.cua.test/realms/cyclops-cs");
+ assert_eq!(
+ (v["plan"].as_str(), v["teams"].as_u64()),
+ (Some("free"), Some(1))
+ );
+ assert!(
+ v["expires_at"].as_str().unwrap().starts_with("2030-"),
+ "{v}"
+ );
+ for gone in ["fleet", "source", "namespaces"] {
+ assert!(v.get(gone).is_none(), "{gone}: {v}");
+ }
+ }
+
+ #[tokio::test]
+ async fn whoami_without_the_api_still_names_the_user() {
+ // Nothing listens on port 9: the API cannot be reached.
+ let api = SpacesApiClient::new("http://127.0.0.1:9").unwrap();
+ let token = jwt(serde_json::json!({"preferred_username": "ada", "sub": "u-ada"}));
+ let (r, o) = run(&api, &token, false).await;
+ assert_eq!(r.unwrap(), 0);
+ assert!(o.starts_with("Logged in to Cua as ada.\n"), "{o}");
+ assert!(o.contains("the Cua API could not be reached"), "{o}");
+ let (r, o) = run(&api, &token, true).await;
+ assert_eq!(r.unwrap(), 0);
+ let v: serde_json::Value = serde_json::from_str(o.trim()).unwrap();
+ assert_eq!(v["user"], "ada");
+ assert!(v["plan"].is_null() && v["teams"].is_null(), "{v}");
+ }
+
+ #[tokio::test]
+ async fn whoami_fails_when_the_api_refuses_the_session() {
+ let fake = FakeSpacesApi::start().await;
+ let api = SpacesApiClient::new(&fake.url).unwrap();
+ // The fake API knows no account for this token: it answers 401.
+ let token = jwt(serde_json::json!({"preferred_username": "ada"}));
+ let (r, o) = run(&api, &token, false).await;
+ assert!(matches!(r, Err(CuaError::Unauthenticated(_))), "{r:?}");
+ assert!(o.is_empty(), "nothing is printed: {o}");
+ }
}
diff --git a/libs/cua/crates/cua-cli/src/catalog.rs b/libs/cua/crates/cua-cli/src/catalog.rs
index 6a0ff28704..253cf819d0 100644
--- a/libs/cua/crates/cua-cli/src/catalog.rs
+++ b/libs/cua/crates/cua-cli/src/catalog.rs
@@ -56,15 +56,17 @@ fn row(image: &Value, all: &[Value]) -> Value {
.map(|i| json!({"ref": i["ref"], "variant": i["variant"]}))
.collect();
let mut v = image.clone();
+ // The catalog file still records a cloud runtime per image; Cua Cloud
+ // has ended, so it is not shown.
+ if let Some(o) = v.as_object_mut() {
+ o.remove("cloud");
+ }
v["browser_tools"] = json!(browser_tools(image));
v["variants"] = Value::Array(variants);
let mut create = vec![];
if image["local"].is_string() {
create.push(format!("cua sb create {r}"));
}
- if image["cloud"].is_string() {
- create.push(format!("cua sb create {r} --on cloud"));
- }
if browser_tools(image) {
create.push(format!("cua sb create {r} --browser"));
}
@@ -121,19 +123,13 @@ pub fn mcp_result(f: &Filter) -> Value {
})
}
-fn runtimes(i: &Value) -> (String, String) {
- let local = match i["local"].as_str() {
+fn local_runtime(i: &Value) -> &'static str {
+ match i["local"].as_str() {
Some("container") => "container",
Some("qemu") => "qemu vm",
Some("lume") => "lume vm",
_ => "-",
- };
- let cloud = match i["cloud"].as_str() {
- Some("gvisor") => "gvisor",
- Some("kubevirt") => "kubevirt vm",
- _ => "-",
- };
- (local.into(), cloud.into())
+ }
}
/// `cua images ls`.
@@ -146,7 +142,7 @@ pub fn print_list(f: &Filter, json: bool, out: &mut dyn Write) -> Result<i32, Cu
let table: Vec<Vec<String>> = rows
.iter()
.map(|i| {
- let (local, cloud) = runtimes(i);
+ let local = local_runtime(i);
let browsers: Vec<&str> = i["browsers"]
.as_array()
.map(|b| b.iter().filter_map(Value::as_str).collect())
@@ -156,8 +152,7 @@ pub fn print_list(f: &Filter, json: bool, out: &mut dyn Write) -> Result<i32, Cu
i["os"].as_str().unwrap_or_default().to_string(),
i["tier"].as_str().unwrap_or("-").to_string(),
i["variant"].as_str().unwrap_or_default().to_string(),
- local,
- cloud,
+ local.to_string(),
if i["spacesd"].as_bool() == Some(true) {
"yes".into()
} else {
@@ -175,7 +170,7 @@ pub fn print_list(f: &Filter, json: bool, out: &mut dyn Write) -> Result<i32, Cu
util::table(
out,
&[
- "REF", "OS", "TIER", "KIND", "LOCAL", "CLOUD", "SPACESD", "BROWSERS", "SUMMARY",
+ "REF", "OS", "TIER", "KIND", "LOCAL", "SPACESD", "BROWSERS", "SUMMARY",
],
&table,
);
diff --git a/libs/cua/crates/cua-cli/src/config_cmd.rs b/libs/cua/crates/cua-cli/src/config_cmd.rs
index 96ef016634..c0b3b4df64 100644
--- a/libs/cua/crates/cua-cli/src/config_cmd.rs
+++ b/libs/cua/crates/cua-cli/src/config_cmd.rs
@@ -1,6 +1,6 @@
//! `cua config`: the user defaults in `$CUA_HOME/config.toml` (default
//! `~/.cua/config.toml`): where sandboxes run when `--on` is not given,
-//! the default kind and runtime, and the cloud defaults. Each value's
+//! the default kind and runtime. Each value's
//! effective setting and its source (explicit flag > environment > config
//! file > built-in default) is what `list` and `get` print.
@@ -26,14 +26,13 @@ pub enum ConfigCmd {
#[command(after_help = "Examples:
cua config get default.on")]
Get {
- /// Setting (`default.on`, `default.kind`, `default.runtime`,
- /// `cloud.warm`, `cloud.max_pool_size`, `cloud.claim_ttl`).
+ /// Setting (`default.on`, `default.kind`, `default.runtime`).
key: String,
},
/// Write a setting to the config file.
#[command(after_help = "Examples:
- # Create sandboxes in the cloud unless --on says otherwise
- cua config set default.on cloud
+ # Create sandboxes in your AWS account unless --on says otherwise
+ cua config set default.on aws
# Back to this machine
cua config set default.on local
# Prefer VMs when the image offers both
@@ -41,7 +40,7 @@ pub enum ConfigCmd {
Set {
/// Setting.
key: String,
- /// Value (checked: `default.on` takes local, cloud or a provider).
+ /// Value (checked: `default.on` takes local, aws, gcp, modal or a provider).
value: String,
},
/// Remove a setting from the config file (the environment variable or
diff --git a/libs/cua/crates/cua-cli/src/do_cmd.rs b/libs/cua/crates/cua-cli/src/do_cmd.rs
index 06fea7da89..7e49b5ab17 100644
--- a/libs/cua/crates/cua-cli/src/do_cmd.rs
+++ b/libs/cua/crates/cua-cli/src/do_cmd.rs
@@ -4,7 +4,7 @@
//! `~/.cua/do_target.json`; coordinates are in screenshot-image space and
//! are mapped to screen points with the last screenshot's scale and origin.
//!
-//! Targets are SDK sandboxes (Fleet, local or direct) and relay Spaces
+//! Targets are SDK sandboxes (local or direct) and relay Spaces
//! (`relay:<machine-id>`). `host` is a direct sandbox pointing at a
//! cua-spacesd on this machine (default `http://127.0.0.1:3211`), gated
//! behind `cua do-host-consent`.
@@ -22,14 +22,11 @@ use std::{io::Write, path::PathBuf, sync::Arc};
/// Legacy provider words accepted by `cua do switch <provider> <name>`.
const LEGACY_PROVIDERS: &[&str] = &[
- "cloud",
- "cloudv2",
"local",
"lume",
"lumier",
"docker",
"winsandbox",
- "fleet",
"direct",
"sandbox",
];
@@ -51,7 +48,6 @@ pub enum DoAction {
/// `host`, `url <URL>`, or a legacy `<provider> <name>` pair.
#[command(after_help = "Examples:
cua do switch dev
- cua do switch cloud:dev
cua do switch relay:0123abcd4567ef89
# This machine (after `cua do-host-consent`)
cua do switch host")]
@@ -706,7 +702,6 @@ impl Run<'_> {
util::line(out, " host [local]");
return Ok(0);
}
- Some("cloud" | "cloudv2" | "fleet") => Some("cloud"),
Some("local" | "lume" | "lumier" | "docker" | "winsandbox") => Some("local"),
Some("direct" | "url") => Some("direct"),
Some(o) => return fail(&format!("Unknown provider '{o}'")),
@@ -729,11 +724,7 @@ impl Run<'_> {
" {} [{}] {}",
s.name,
format!("{:?}", s.status).to_lowercase(),
- // `cua do ls` keeps its provider words.
- match s.location.as_str() {
- "cloud" => "fleet",
- other => other,
- }
+ s.location
),
);
}
diff --git a/libs/cua/crates/cua-cli/src/doctor/host.rs b/libs/cua/crates/cua-cli/src/doctor/host.rs
index f9243cc607..5d39e44ada 100644
--- a/libs/cua/crates/cua-cli/src/doctor/host.rs
+++ b/libs/cua/crates/cua-cli/src/doctor/host.rs
@@ -51,7 +51,7 @@ fn with_severity(mut check: Check, required: bool) -> Check {
/// sandbox's runtime needs.
/// The user defaults (`cua config`): each effective value and where it
/// comes from, informational. A value that does not parse fails (every
-/// create would); a cloud default without cloud credentials warns.
+/// create would).
pub fn defaults_checks() -> Vec<Check> {
use cua_sandbox_core::settings::Settings;
let settings = match Settings::load() {
@@ -84,20 +84,6 @@ pub fn defaults_checks() -> Vec<Check> {
let failed = check.status == Status::Fail;
checks.push(with_severity(check, failed));
}
- if let Ok((cua_sandbox_core::placement::On::Cloud, source)) = settings.default_on()
- && !crate::auth::fleet_maybe_configured()
- && let Some(hint) = cua_sandbox_core::settings::cloud_default_hint(&source)
- {
- checks.push(with_severity(
- Check::new(
- "host.defaults.cloud_credentials",
- Status::Warn,
- "the default location is cloud, but no cloud credentials are configured",
- )
- .fix(hint),
- false,
- ));
- }
checks
}
diff --git a/libs/cua/crates/cua-cli/src/doctor/mod.rs b/libs/cua/crates/cua-cli/src/doctor/mod.rs
index cc520bf8e4..94bd251918 100644
--- a/libs/cua/crates/cua-cli/src/doctor/mod.rs
+++ b/libs/cua/crates/cua-cli/src/doctor/mod.rs
@@ -5,7 +5,7 @@
//! - **image**: what the registry says (resolved digest, variant, OS,
//! `ai.cua.spacesd`), when the image is known;
//! - **guest**: `SystemService.Diagnose` through the SDK (every ref form:
-//! `local:`, `cloud:`, `direct:`, `relay:`, a bare name or a URL), with
+//! `local:`, `direct:`, `relay:`, a bare name or a URL), with
//! the caller's clock for the skew check; or, for images without
//! cua-spacesd, the doctor shim against the image's own API.
//!
@@ -52,7 +52,7 @@ pub enum EffectsArg {
#[derive(Args, Debug, Clone)]
pub struct DoctorArgs {
- /// Sandbox to check: `local:<name>`, `cloud:<name>`, `direct:<host:port>`,
+ /// Sandbox to check: `local:<name>`, `direct:<host:port>`,
/// a bare name, or a spacesd URL. Omit for the host checks only.
pub target: Option<String>,
/// Image to resolve for the image checks (default: the sandbox's).
@@ -109,8 +109,8 @@ pub struct DoctorArgs {
}
impl DoctorArgs {
- /// Whether resolving the target may need Fleet credentials.
- pub fn needs_fleet(&self) -> bool {
+ /// Whether resolving the target may need the signed-in session (relay Spaces).
+ pub fn needs_session(&self) -> bool {
self.target.as_deref().is_some_and(|t| {
!(t.starts_with("http://")
|| t.starts_with("https://")
@@ -175,7 +175,7 @@ async fn guest_part(
let client = if is_url(&target) {
cua.spacesd(target.clone(), args.token.clone()).await
} else {
- // Refs resolve through the SDK (local/cloud/direct/relay, bare names).
+ // Refs resolve through the SDK (local/direct/relay, bare names).
if let Ok(info) = cua.sandboxes().get(target.clone()).await {
guest.runtime_type = Some(info.runtime_type.clone());
guest.image = info.image.clone();
diff --git a/libs/cua/crates/cua-cli/src/host.rs b/libs/cua/crates/cua-cli/src/host.rs
index 9a9dc74d2b..f2d2579a6c 100644
--- a/libs/cua/crates/cua-cli/src/host.rs
+++ b/libs/cua/crates/cua-cli/src/host.rs
@@ -244,7 +244,7 @@ pub enum SpacesCmd {
cua spaces add 100.101.102.103:3211 --host --name \"Mac mini (spare)\" --token \"$TOKEN\"")]
Add {
/// The Space's cua-spacesd (`http(s)://host:port`, `host:port`,
- /// default port 3211), a Space id (`local:<name>`, `cloud:<name>`),
+ /// default port 3211), a Space id (`local:<name>`),
/// or any MCP endpoint URL.
url: String,
/// spacesd token (or the bearer an MCP endpoint needs).
@@ -264,8 +264,8 @@ pub enum SpacesCmd {
host: bool,
},
/// Create Spaces: on this machine, on one of your machines that
- /// provides Spaces (`cua host setup --provide-spaces` there), or in the
- /// cloud.
+ /// provides Spaces (`cua host setup --provide-spaces` there), or in your
+ /// own cloud account.
#[command(after_help = "Examples:
cua spaces create linux
# Two macOS VMs on your spare Mac mini (matched by name)
@@ -275,7 +275,7 @@ pub enum SpacesCmd {
/// Image: an alias (`linux`, `macos`, `macos:26`) or a registry
/// reference. Default: the canonical Linux image.
image: Option<String>,
- /// Where: `local`, `cloud`, `host:<machine>`, or a machine name
+ /// Where: `local`, `aws`, `gcp`, `host:<machine>`, or a machine name
/// (`mac-mini`, "spare mac mini"). Default: your default location.
#[arg(long)]
on: Option<String>,
@@ -318,18 +318,18 @@ pub enum SpacesCmd {
/// create starts) or its name.
space: String,
},
- /// The GPU options each runtime offers on this machine (or in the
- /// cloud).
+ /// The GPU options each runtime offers on this machine (or in your
+ /// own cloud account).
#[command(after_help = "Examples:
cua spaces gpus
cua spaces gpus --json")]
Gpus {
- /// `local` (default) or `cloud`.
+ /// `local` (default), `aws`, `gcp` or `modal`.
#[arg(long)]
on: Option<String>,
},
/// Delete a Space's sandbox (on this machine, on the machine that
- /// provides it, or in the cloud) and forget it (asks first).
+ /// provides it, or in your own cloud account) and forget it (asks first).
#[command(after_help = "Examples:
cua spaces delete relay:space-0123456789abcdef
cua spaces delete local:studio --force")]
@@ -343,8 +343,8 @@ pub enum SpacesCmd {
/// Turn a Space off: a local container or QEMU VM is suspended (its
/// memory is kept), a Lume VM or a Space one of your machines provides
/// is stopped (its disk is kept), and so is a Space in your own cloud
- /// (`--on aws`, `gcp`; compute billing stops). Fleet cloud Spaces,
- /// Modal sandboxes and Spaces added by address cannot be turned off.
+ /// (`--on aws`, `gcp`; compute billing stops). Modal sandboxes and
+ /// Spaces added by address cannot be turned off.
#[command(after_help = "Examples:
cua spaces stop local:studio
cua spaces stop relay:space-0123456789abcdef --json")]
diff --git a/libs/cua/crates/cua-cli/src/images.rs b/libs/cua/crates/cua-cli/src/images.rs
deleted file mode 100644
index 10425c124b..0000000000
--- a/libs/cua/crates/cua-cli/src/images.rs
+++ /dev/null
@@ -1,156 +0,0 @@
-//! Fleet image resources (`images.cua.ai/v1alpha1 Image`) for
-//! `cua image ls|info|rm|create`. Local OCI pull/build/push live in main.
-
-use crate::{
- auth,
- util::{self, line},
-};
-use cua_sdk::CuaError;
-use std::io::Write;
-
-async fn namespaces(
- c: &cua_fleet::FleetClient,
- ns: Option<String>,
-) -> Result<Vec<String>, CuaError> {
- if let Some(n) = ns.or_else(|| {
- std::env::var("CUA_FLEET_NAMESPACE")
- .ok()
- .filter(|s| !s.is_empty())
- }) {
- return Ok(vec![n]);
- }
- Ok(c.sdk()
- .list_namespaces()
- .await
- .map_err(|e| auth::fleet_err(cua_fleet::Error::Sdk(e)))?
- .into_iter()
- .map(|n| n.name)
- .collect())
-}
-
-fn row(ns: &str, v: &serde_json::Value) -> serde_json::Value {
- let s = |p: &str| {
- v.pointer(p)
- .and_then(|x| x.as_str())
- .unwrap_or("")
- .to_string()
- };
- serde_json::json!({
- "name": s("/metadata/name"),
- "namespace": ns,
- "phase": s("/status/phase"),
- "reference": v.pointer("/status/image").or(v.pointer("/status/reference")).and_then(|x| x.as_str()),
- "created": s("/metadata/creationTimestamp"),
- })
-}
-
-/// `cua image ls`.
-pub async fn list(ns: Option<String>, json: bool, out: &mut dyn Write) -> Result<i32, CuaError> {
- let (c, _) = auth::fleet_client().await?;
- let explicit = ns.is_some();
- let mut rows = vec![];
- let mut skipped = 0;
- for n in namespaces(&c, ns).await? {
- match c.list_images(&n).await.map_err(auth::fleet_err) {
- Ok(images) => rows.extend(images.iter().map(|i| row(&n, i))),
- // Scanning every namespace: skip the ones without image access.
- Err(CuaError::PermissionDenied(_)) if !explicit => skipped += 1,
- Err(e) => return Err(e),
- }
- }
- if skipped > 0 {
- eprintln!("note: skipped {skipped} namespace(s) without permission to list images");
- }
- if json {
- util::json_line(out, &serde_json::Value::Array(rows));
- return Ok(0);
- }
- if rows.is_empty() {
- line(out, "No images found.");
- return Ok(0);
- }
- let s = |v: &serde_json::Value| v.as_str().unwrap_or("-").to_string();
- let t: Vec<Vec<String>> = rows
- .iter()
- .map(|r| {
- vec![
- s(&r["name"]),
- s(&r["namespace"]),
- s(&r["phase"]),
- s(&r["created"]).chars().take(10).collect(),
- ]
- })
- .collect();
- util::table(out, &["NAME", "NAMESPACE", "PHASE", "CREATED"], &t);
- Ok(0)
-}
-
-async fn find(
- c: &cua_fleet::FleetClient,
- name: &str,
- ns: Option<String>,
-) -> Result<(String, serde_json::Value), CuaError> {
- for n in namespaces(c, ns).await? {
- match c.get_image(&n, name).await {
- Ok(v) => return Ok((n, v)),
- Err(e) => match auth::fleet_err(e) {
- CuaError::NotFound(_) => continue,
- e => return Err(e),
- },
- }
- }
- Err(CuaError::NotFound(format!("image not found: {name}")))
-}
-
-/// `cua image info`.
-pub async fn info(name: String, ns: Option<String>, out: &mut dyn Write) -> Result<i32, CuaError> {
- let (c, _) = auth::fleet_client().await?;
- let (_, v) = find(&c, &name, ns).await?;
- util::json_line(out, &v);
- Ok(0)
-}
-
-/// `cua image rm`.
-pub async fn delete(
- name: String,
- ns: Option<String>,
- force: bool,
- out: &mut dyn Write,
-) -> Result<i32, CuaError> {
- let (c, _) = auth::fleet_client().await?;
- let (n, _) = find(&c, &name, ns).await?;
- if !force && !util::confirm(&format!("Delete image {n}/{name}?"), false) {
- line(
- out,
- format!("This will delete {n}/{name}. Use --force to confirm."),
- );
- return Ok(1);
- }
- c.delete_image(&n, &name).await.map_err(auth::fleet_err)?;
- line(out, format!("Deleted: {n}/{name}"));
- Ok(0)
-}
-
-/// `cua image create`: submits an Image manifest (remote build).
-pub async fn create(
- file: std::path::PathBuf,
- ns: Option<String>,
- out: &mut dyn Write,
-) -> Result<i32, CuaError> {
- let raw = std::fs::read_to_string(&file).map_err(util::internal)?;
- let mut v: serde_json::Value = serde_json::from_str(&raw)?;
- let ns = ns
- .or_else(|| {
- v.pointer("/metadata/namespace")
- .and_then(|x| x.as_str())
- .map(str::to_string)
- })
- .ok_or_else(|| {
- CuaError::InvalidArgument("pass --namespace or set metadata.namespace".into())
- })?;
- v["metadata"]["namespace"] = serde_json::json!(ns);
- let (c, _) = auth::fleet_client().await?;
- let r = c.create_image(&ns, v).await.map_err(auth::fleet_err)?;
- line(out, r.to_string());
- Ok(0)
-}
diff --git a/libs/cua/crates/cua-cli/src/lib.rs b/libs/cua/crates/cua-cli/src/lib.rs
index 786e44387c..5e76ed8aca 100644
--- a/libs/cua/crates/cua-cli/src/lib.rs
+++ b/libs/cua/crates/cua-cli/src/lib.rs
@@ -1,16 +1,15 @@
//! `cua`: the Cua command line, on the cua SDK (`cua-sdk` as a Rust
//! library).
//!
-//! - `auth`, `wif-token`: Cua / Fleet identity (browser or device login,
-//! client credentials, `FLEETS_TOKEN`, GitHub Actions OIDC, user API
-//! keys);
+//! - `auth`: Cua sign-in (browser or device login, client credentials) and
+//! contrib provider keys;
//! - `agents`: set up AI coding agents (cua skills, the cua MCP server);
-//! - `sandbox` (`sb`): Fleet, local and direct sandboxes;
+//! - `sandbox` (`sb`): local and direct sandboxes;
//! - `do`, `do-host-consent`: one-shot computer actions for agents;
//! - `mcp` (`serve-mcp`): stdio MCP server for AI assistants;
//! - `skills`, `trajectory` (`traj`): recorded demonstrations and action
//! trajectories;
-//! - `image` (`img`): local OCI images and Fleet image resources;
+//! - `image` (`img`): local OCI images;
//! - `env`, `daemon`, `runtime`: spacesd debugging, the cua daemon and
//! local runtimes;
//! - `host`, `spaces`: set this machine up for unattended access (relay or
@@ -41,11 +40,9 @@ pub mod extension;
mod host;
mod image_build;
mod image_release;
-mod images;
pub mod keyvault_cmd;
mod mcp;
mod persistent_cmd;
-mod pools;
mod providers;
pub mod sandbox;
mod shell;
@@ -98,7 +95,7 @@ struct Cli {
#[derive(Subcommand, Debug)]
enum Command {
- /// Log in to Cua and inspect Fleet identity.
+ /// Log in to Cua and manage the signed-in session.
#[command(subcommand)]
Auth(AuthCmd),
/// AI coding agents on this machine: install cua skills and configure the cua MCP server.
@@ -107,11 +104,11 @@ enum Command {
/// Run coding agents inside a sandbox: run, ls, logs, send, interrupt, stop.
#[command(subcommand)]
Agent(agent_cmd::AgentCmd),
- /// Sandboxes: local, cloud or an existing machine (direct).
+ /// Sandboxes: local or an existing machine (direct).
#[command(subcommand, visible_alias = "sb")]
Sandbox(Box<sandbox::SandboxCmd>),
/// User defaults (~/.cua/config.toml): where sandboxes run when --on is
- /// not given (default.on), the default kind and runtime, cloud defaults.
+ /// not given (default.on), the default kind and runtime.
#[command(subcommand)]
Config(config_cmd::ConfigCmd),
/// Serve the HTML5 viewer for every sandbox on one loopback port.
@@ -167,13 +164,16 @@ enum Command {
/// Recorded `cua do` trajectories.
#[command(subcommand, visible_alias = "traj")]
Trajectory(TrajCmd),
- /// Workload identity federation tokens.
- #[command(subcommand, name = "wif-token")]
- WifToken(WifCmd),
- /// Fleet: managed pools behind `cua sandbox create` without `--pool`.
- #[command(subcommand)]
- Fleet(FleetCmd),
- /// Images: local OCI pull/build/push and Fleet image resources.
+ /// Removed: Cua Cloud has ended.
+ #[command(name = "wif-token", hide = true, disable_help_flag = true)]
+ WifToken(util::EndedArgs),
+ /// Removed: Cua Cloud has ended.
+ #[command(hide = true, disable_help_flag = true)]
+ Fleet(util::EndedArgs),
+ /// Removed: Cua Cloud has ended.
+ #[command(hide = true, disable_help_flag = true)]
+ Pools(util::EndedArgs),
+ /// Images: local OCI pull/build/push.
#[command(subcommand, visible_alias = "img")]
Image(ImageCmd),
/// The sandbox image catalog (the images the docs list): which exist,
@@ -201,7 +201,7 @@ enum Command {
# Host, image and guest checks for the sandbox dev
cua doctor dev
# CI: fail on warnings, write JUnit XML
- cua doctor cloud:dev --strict --junit doctor.xml")]
+ cua doctor local:dev --strict --junit doctor.xml")]
Doctor(Box<doctor::DoctorCmd>),
/// Unattended access to this machine (setup, status, stop, start, remove).
#[command(subcommand)]
@@ -348,6 +348,11 @@ enum AuthCmd {
cua auth status
cua auth status --json")]
Status,
+ /// Who is signed in: the account, its plan and its teams.
+ #[command(after_help = "Examples:
+ cua auth whoami
+ cua auth whoami --json")]
+ Whoami,
/// Whether this cua can read the Cua items in the macOS keychain
/// without a prompt (JSON; for the Spaces app, which asks before it
/// starts anything that reads the session). A Cua-signed cua gives
@@ -362,13 +367,9 @@ enum AuthCmd {
#[arg(long, conflicts_with = "prompt")]
forget: bool,
},
- /// The active Fleet identity, verified against Fleet.
- #[command(after_help = "Examples:
- cua auth whoami")]
- Whoami,
- /// Fleet user API keys (client credentials).
- #[command(subcommand)]
- Keys(KeysCmd),
+ /// Removed: Cua Cloud has ended.
+ #[command(hide = true, disable_help_flag = true)]
+ Keys(util::EndedArgs),
/// Keys of the contrib sandbox providers (`--on e2b`, `--on daytona`,
/// `--on modal`).
#[command(subcommand)]
@@ -414,38 +415,6 @@ enum ProviderCmd {
},
}
-#[derive(Subcommand, Debug)]
-enum KeysCmd {
- /// List API keys.
- #[command(
- visible_alias = "list",
- after_help = "Examples:
- cua auth keys ls"
- )]
- Ls,
- /// Create an API key (prints CUA_CLIENT_ID / CUA_CLIENT_SECRET once).
- #[command(after_help = "Examples:
- # A key for CI
- cua auth keys create ci")]
- Create {
- /// Key name.
- name: String,
- /// Scopes (repeatable).
- #[arg(long = "scope")]
- scope: Vec<String>,
- },
- /// Delete an API key by id.
- #[command(
- visible_alias = "delete",
- after_help = "Examples:
- cua auth keys rm <key-id>"
- )]
- Rm {
- /// Key id (from `cua auth keys ls`).
- id: String,
- },
-}
-
#[derive(Subcommand, Debug)]
enum SkillsCmd {
/// List saved skills.
@@ -570,19 +539,6 @@ enum TrajCmd {
},
}
-#[derive(Subcommand, Debug)]
-enum WifCmd {
- /// Print a GitHub Actions OIDC token for Fleets.
- #[command(after_help = "Examples:
- # In a GitHub Actions job with `id-token: write`
- cua wif-token github")]
- Github {
- /// Token audience.
- #[arg(long, default_value = auth::GITHUB_WIF_AUDIENCE)]
- audience: String,
- },
-}
-
#[derive(Subcommand, Debug)]
enum SpacesdCmd {
/// Print capabilities.
@@ -728,56 +684,6 @@ enum RuntimeCmd {
},
}
-#[derive(Subcommand, Debug)]
-enum FleetCmd {
- /// Managed pools (`cua-auto-*`): reused per image and shape, autoscaled
- /// from zero, garbage-collected when idle.
- #[command(subcommand)]
- Pools(PoolsCmd),
- /// One pool (any pool you own, not only managed ones).
- #[command(subcommand)]
- Pool(PoolCmd),
-}
-
-#[derive(Subcommand, Debug)]
-enum PoolCmd {
- /// Print a pool's spec: the shared sandbox model as JSON, or with
- /// `--terraform` the equivalent `fleets_pool` resource block.
- #[command(after_help = "Examples:
- cua fleet pool export ci-linux
- cua fleet pool export ci-linux --terraform > pool.tf")]
- Export {
- /// Pool name.
- name: String,
- /// Emit Terraform HCL (the cyclops-cs `fleets_pool` resource).
- #[arg(long)]
- terraform: bool,
- },
-}
-
-#[derive(Subcommand, Debug)]
-enum PoolsCmd {
- /// List this account's managed pools.
- #[command(
- visible_alias = "list",
- after_help = "Examples:
- cua fleet pools ls"
- )]
- Ls,
- /// Delete managed pools idle for `--idle` and stuck claims.
- #[command(after_help = "Examples:
- cua fleet pools gc
- cua fleet pools gc --idle 2h")]
- Gc {
- /// Idle threshold (`30m`, `2h`, `1d`).
- #[arg(long, default_value = "30m")]
- idle: String,
- /// Only these pools (repeatable). Default: every managed pool.
- #[arg(long = "pool")]
- pools: Vec<String>,
- },
-}
-
#[derive(Subcommand, Debug)]
enum ImageCmd {
/// Pull an image into the local cache.
@@ -811,60 +717,23 @@ enum ImageCmd {
/// Destination registry reference.
destination: String,
},
- /// List Fleet image resources.
- #[command(
- visible_alias = "list",
- after_help = "Examples:
- cua image ls
- cua image ls --namespace acme"
- )]
- Ls {
- /// Namespace (default: every namespace, or CUA_FLEET_NAMESPACE).
- #[arg(long)]
- namespace: Option<String>,
- },
- /// Show a Fleet image resource.
- #[command(after_help = "Examples:
- cua image info desktop")]
- Info {
- /// Image resource name.
- name: String,
- /// Namespace (default: CUA_FLEET_NAMESPACE).
- #[arg(long)]
- namespace: Option<String>,
- },
- /// Delete a Fleet image resource.
- #[command(
- visible_alias = "delete",
- after_help = "Examples:
- cua image rm desktop"
- )]
- Rm {
- /// Image resource name.
- name: String,
- /// Namespace (default: CUA_FLEET_NAMESPACE).
- #[arg(long)]
- namespace: Option<String>,
- /// Do not ask for confirmation.
- #[arg(long)]
- force: bool,
- },
- /// Submit an Image manifest (JSON) to Fleet for a remote build.
- #[command(after_help = "Examples:
- cua image create -f image.json")]
- Create {
- /// Image manifest file (JSON).
- #[arg(short, long)]
- file: PathBuf,
- /// Namespace (default: CUA_FLEET_NAMESPACE).
- #[arg(long)]
- namespace: Option<String>,
- },
+ /// Removed: Cua Cloud has ended.
+ #[command(alias = "list", hide = true, disable_help_flag = true)]
+ Ls(util::EndedArgs),
+ /// Removed: Cua Cloud has ended.
+ #[command(hide = true, disable_help_flag = true)]
+ Info(util::EndedArgs),
+ /// Removed: Cua Cloud has ended.
+ #[command(alias = "delete", hide = true, disable_help_flag = true)]
+ Rm(util::EndedArgs),
+ /// Removed: Cua Cloud has ended.
+ #[command(hide = true, disable_help_flag = true)]
+ Create(util::EndedArgs),
}
#[derive(Subcommand, Debug)]
enum ImagesCmd {
- /// List the catalog: ref, OS, container or VM, local and cloud runtime,
+ /// List the catalog: ref, OS, container or VM, local runtime,
/// cua-spacesd, browsers, summary.
#[command(
visible_alias = "list",
@@ -1112,7 +981,7 @@ pub(crate) const EXIT_CODES: &[(i32, &str)] = &[
(1, "Failure, or `cua do` reported an error"),
(
2,
- "Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`, `cloud:NAME`)",
+ "Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`)",
),
(
3,
@@ -1120,7 +989,7 @@ pub(crate) const EXIT_CODES: &[(i32, &str)] = &[
),
(
4,
- "Not supported, or not configured (for example no cloud credentials)",
+ "Not supported, or not configured (for example no provider credentials)",
),
(5, "No cua-spacesd answered, or a transport failure"),
(
@@ -1179,11 +1048,9 @@ async fn stranger_daemon() -> Option<cua_daemon::identity::Verdict> {
}
/// The SDK handle. `with_session` passes the `cua auth login` session to
-/// an embedded runtime as its Fleet token when the environment has no
-/// Fleet credentials.
+/// an embedded runtime (relay and hosted Spaces features); the token
+/// refreshes itself.
async fn open(cli: &Cli, with_session: bool) -> Result<Arc<Cua>, CuaError> {
- // The signed-in session (shared credential store) drives Fleet when the
- // environment has no Fleet credentials; the token refreshes itself.
let embedded = move || {
Cua::embedded(CuaConfig {
state_dir: cli.state_dir.clone(),
@@ -1536,13 +1403,9 @@ async fn run(cli: Cli, out: &mut dyn Write) -> Result<i32, CuaError> {
}
AuthCmd::Logout => auth::logout(out).await,
AuthCmd::Status => auth::status(json, out).await,
- AuthCmd::Keychain { prompt, forget } => auth::keychain(*prompt, *forget, out),
AuthCmd::Whoami => auth::whoami(json, out).await,
- AuthCmd::Keys(KeysCmd::Ls) => auth::keys_list(json, out).await,
- AuthCmd::Keys(KeysCmd::Create { name, scope }) => {
- auth::keys_create(name.clone(), scope.clone(), json, out).await
- }
- AuthCmd::Keys(KeysCmd::Rm { id }) => auth::keys_delete(id.clone(), out).await,
+ AuthCmd::Keychain { prompt, forget } => auth::keychain(*prompt, *forget, out),
+ AuthCmd::Keys(_) => Err(util::cloud_ended()),
AuthCmd::Provider(ProviderCmd::Ls) => providers::list(json, out),
AuthCmd::Provider(ProviderCmd::Set { name, var }) => {
providers::set(name, var.as_deref(), out)
@@ -1559,10 +1422,16 @@ async fn run(cli: Cli, out: &mut dyn Write) -> Result<i32, CuaError> {
agents::AgentsCmd::Update => agents::cmd_update(json, out),
};
}
- Command::WifToken(WifCmd::Github { audience }) => {
- let t = auth::github_wif_token(audience).await?;
- line(out, t);
- return Ok(0);
+ // Removed Cua Cloud commands (hidden): the one ended message, before
+ // any sign-in, daemon or network call.
+ Command::Fleet(_)
+ | Command::Pools(_)
+ | Command::WifToken(_)
+ | Command::Image(
+ ImageCmd::Ls(_) | ImageCmd::Info(_) | ImageCmd::Rm(_) | ImageCmd::Create(_),
+ ) => return Err(util::cloud_ended()),
+ Command::Sandbox(cmd) if matches!(**cmd, sandbox::SandboxCmd::KeepAlive(_)) => {
+ return Err(util::cloud_ended());
}
Command::Trajectory(t) => {
return match t {
@@ -1629,45 +1498,6 @@ async fn run(cli: Cli, out: &mut dyn Write) -> Result<i32, CuaError> {
let state_dir = cli.state_dir.clone();
return cache::run(cmd.clone(), state_dir.as_deref(), json, out).await;
}
- // Cua Cloud has ended: Fleet pools and Fleet image resources fail
- // before anything else.
- Command::Fleet(FleetCmd::Pool(PoolCmd::Export { name, terraform })) => {
- Err::<(), _>(auth::cloud_ended())?;
- return pools::export(name, *terraform, out).await;
- }
- Command::Fleet(FleetCmd::Pools(cmd)) => {
- Err::<(), _>(auth::cloud_ended())?;
- let state_dir = cli.state_dir.as_deref();
- return match cmd {
- PoolsCmd::Ls => pools::list(state_dir, json, out).await,
- PoolsCmd::Gc { idle, pools: only } => {
- pools::gc(state_dir, idle, only, json, out).await
- }
- };
- }
- Command::Image(
- i @ (ImageCmd::Ls { .. }
- | ImageCmd::Info { .. }
- | ImageCmd::Rm { .. }
- | ImageCmd::Create { .. }),
- ) => {
- Err::<(), _>(auth::cloud_ended())?;
- return match i {
- ImageCmd::Ls { namespace } => images::list(namespace.clone(), json, out).await,
- ImageCmd::Info { name, namespace } => {
- images::info(name.clone(), namespace.clone(), out).await
- }
- ImageCmd::Rm {
- name,
- namespace,
- force,
- } => images::delete(name.clone(), namespace.clone(), *force, out).await,
- ImageCmd::Create { file, namespace } => {
- images::create(file.clone(), namespace.clone(), out).await
- }
- _ => unreachable!(),
- };
- }
Command::Daemon(DaemonCmd::Start {
foreground,
socket,
@@ -1827,7 +1657,7 @@ async fn run(cli: Cli, out: &mut dyn Write) -> Result<i32, CuaError> {
async fn run_sdk(cli: Cli, out: &mut dyn Write) -> Result<i32, CuaError> {
let json = cli.json;
- let needs_fleet = matches!(
+ let needs_session = matches!(
cli.command,
Command::Sandbox(_)
| Command::Agent(_)
@@ -1842,21 +1672,14 @@ async fn run_sdk(cli: Cli, out: &mut dyn Write) -> Result<i32, CuaError> {
Some(doctor::DoctorSub::Parity(p)) => [&p.a, &p.b].iter().any(|t| {
!(t.starts_with("http") || t.starts_with("direct:") || t.starts_with("local:"))
}),
- None => d.args.needs_fleet(),
+ None => d.args.needs_session(),
},
_ => false,
};
- // The default `cua sb ls` is an implicit Fleet call: it opens the
- // signed-in session only when the session marker says one exists, so it
- // never reads the OS credential vault otherwise.
- let needs_fleet = needs_fleet
- && match &cli.command {
- Command::Sandbox(cmd) => match cmd.as_ref() {
- sandbox::SandboxCmd::Ls { cloud, .. } => *cloud || cua_auth::may_have_session(),
- _ => true,
- },
- _ => true,
- };
+ // `cua sb ls` lists what this machine knows: it never reads the OS
+ // credential vault.
+ let needs_session = needs_session
+ && !matches!(&cli.command, Command::Sandbox(cmd) if matches!(cmd.as_ref(), sandbox::SandboxCmd::Ls { .. }));
if let Some(d) = &cli.state_dir {
let _ = sandbox::STATE_DIR.set(PathBuf::from(d));
}
@@ -1864,17 +1687,6 @@ async fn run_sdk(cli: Cli, out: &mut dyn Write) -> Result<i32, CuaError> {
if matches!(cli.command, Command::Sandbox(_)) {
cache::quick_reap(cli.state_dir.as_deref()).await;
}
- // Fleet sandboxes are held by the daemon so their claim heartbeat
- // outlives this command: start one when none runs.
- if let Command::Sandbox(cmd) = &cli.command
- && sandbox::wants_daemon(cmd)
- && !cli.embedded
- && cli.daemon.is_none()
- && std::env::var_os("CUA_NO_DAEMON_AUTOSTART").is_none()
- && let Err(e) = daemon_start(&cli, false, None, "127.0.0.1:0", &mut std::io::stderr()).await
- {
- eprintln!("note: could not start the cua daemon ({e}); continuing without it");
- }
// `cua daemon mcp` serves the daemon's Spaces runtime: start one when
// none runs (its chatter goes to stderr; stdout is the MCP channel).
if matches!(cli.command, Command::Daemon(DaemonCmd::Mcp { .. }))
@@ -1883,7 +1695,7 @@ async fn run_sdk(cli: Cli, out: &mut dyn Write) -> Result<i32, CuaError> {
{
daemon_start(&cli, false, None, "127.0.0.1:0", &mut std::io::stderr()).await?;
}
- let cua = open(&cli, needs_fleet).await?;
+ let cua = open(&cli, needs_session).await?;
match cli.command {
Command::Sandbox(cmd) => return sandbox::run(&cua, *cmd, json, out).await,
Command::Viewer { listen, no_open } => {
@@ -2117,7 +1929,9 @@ async fn run_sdk(cli: Cli, out: &mut dyn Write) -> Result<i32, CuaError> {
let d = local.push_image(reference, destination.clone()).await?;
line(out, format!("{destination}@{d}"));
}
- _ => unreachable!("handled above"),
+ ImageCmd::Ls(_) | ImageCmd::Info(_) | ImageCmd::Rm(_) | ImageCmd::Create(_) => {
+ unreachable!("handled above")
+ }
}
}
Command::Auth(_)
@@ -2133,6 +1947,7 @@ async fn run_sdk(cli: Cli, out: &mut dyn Write) -> Result<i32, CuaError> {
| Command::Team(_)
| Command::Usage { .. }
| Command::Fleet(_)
+ | Command::Pools(_)
| Command::Teleport(_)
| Command::Cache(_)
| Command::Config(_)
@@ -2355,17 +2170,6 @@ async fn daemon_start(
.embedded_runtime()
.cloned()
.ok_or_else(|| CuaError::Internal("embedded runtime".into()))?;
- // Keep renewing the claims of managed Fleet sandboxes this machine
- // created (for example after a daemon restart).
- {
- let rt = runtime.clone();
- tokio::spawn(async move {
- let held = rt.adopt_managed_fleet_sandboxes().await;
- if !held.is_empty() {
- eprintln!("cua daemon: holding managed Fleet sandboxes {held:?}");
- }
- });
- }
// A local create the last daemon did not finish (it crashed or was
// killed mid-create): register the Space or delete its sandbox, so
// nothing runs that no Space lists.
@@ -2831,22 +2635,6 @@ mod tests {
}
}
- #[test]
- fn pool_apply_and_export_parse() {
- let parse =
- |a: &[&str]| Cli::try_parse_from(std::iter::once("cua").chain(a.iter().copied()));
- assert!(
- parse(&["sandbox", "create", "img", "--apply"]).is_err(),
- "--apply needs --pool"
- );
- assert!(parse(&["sandbox", "create", "--pool", "p", "--name", "n", "--apply"]).is_ok());
- let cli = parse(&["fleet", "pool", "export", "p", "--terraform"]).unwrap();
- assert!(matches!(
- cli.command,
- Command::Fleet(FleetCmd::Pool(PoolCmd::Export { ref name, terraform: true })) if name == "p"
- ));
- }
-
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn spacesd_commands_against_the_mock() {
let env = fixtures::start_env(Some("t"), None).await;
diff --git a/libs/cua/crates/cua-cli/src/mcp.rs b/libs/cua/crates/cua-cli/src/mcp.rs
index 1e5aac9be3..7a2b5f008a 100644
--- a/libs/cua/crates/cua-cli/src/mcp.rs
+++ b/libs/cua/crates/cua-cli/src/mcp.rs
@@ -142,13 +142,13 @@ const SB: (&str, &str, bool, &str) = (
"sandbox",
"string",
false,
- "Sandbox ref (local:<name>, cloud:<name>, direct:<host:port>) or a name unique across locations (default: --sandbox / CUA_SANDBOX)",
+ "Sandbox ref (local:<name>, direct:<host:port>) or a name unique across locations (default: --sandbox / CUA_SANDBOX)",
);
const NAME: (&str, &str, bool, &str) = (
"name",
"string",
true,
- "Sandbox ref (local:<name>, cloud:<name>, direct:<host:port>) or a name unique across locations",
+ "Sandbox ref (local:<name>, direct:<host:port>) or a name unique across locations",
);
const X: (&str, &str, bool, &str) = ("x", "integer", true, "X in screenshot pixels");
const Y: (&str, &str, bool, &str) = ("y", "integer", true, "Y in screenshot pixels");
@@ -158,7 +158,7 @@ const TOOLS: &[Tool] = &[
Tool {
name: "images_list",
permission: "images:list",
- description: "List the sandbox image catalog (the images the docs list): ref, OS, container or VM, local and cloud runtime, whether it ships cua-spacesd and which browsers, its other variants, and the command that creates it. browser_tools=true means the in-sandbox cua-driver browser tools can drive its browser. Call this first to choose an image.",
+ description: "List the sandbox image catalog (the images the docs list): ref, OS, container or VM, local runtime, whether it ships cua-spacesd and which browsers, its other variants, and the command that creates it. browser_tools=true means the in-sandbox cua-driver browser tools can drive its browser. Call this first to choose an image.",
params: &[
(
"os",
@@ -183,18 +183,18 @@ const TOOLS: &[Tool] = &[
Tool {
name: "sandbox_list",
permission: "sandbox:list",
- description: "List sandboxes: local, direct and cloud (Fleet) ones by default, each row with location (local, cloud or direct). Pass location to list only one kind. If the cloud cannot be listed, the local rows come back with a warning.",
+ description: "List sandboxes: local and direct ones by default, each row with location (local or direct). Pass location to list only one kind.",
params: &[(
"location",
"string",
false,
- "Only sandboxes in this location: local, cloud or direct (default: all)",
+ "Only sandboxes in this location: local or direct (default: all)",
)],
},
Tool {
name: "sandbox_create",
permission: "sandbox:create",
- description: "Create a sandbox from any image. `on` says where (local, the default unless the user configured another with `cua config set default.on`; or cloud), `kind` what (auto, container, vm) and `runtime` which engine (auto, or gvisor, runc, qemu, lume locally; gvisor, kubevirt in the cloud); an impossible combination fails and lists the valid values. To browse the web, pass browser=true (and optionally url): it starts the canonical Linux image, registers it as a Space, launches Chromium with a throwaway profile inside it and returns the space, session, target_id and tab_id to pass to call_tool with the in-sandbox browser tools (browser_navigate, get_browser_state, browser_click, browser_type). Pass command, env and services to run a server in it, for example an MCP server: services {\"mcp\": 8765}. Without browser=true it does not register a Space: to reach its MCP server with list_tools/call_tool (service=\"mcp\"), use create_space instead (same arguments), or add this one with add_space (address local:<name>).",
+ description: "Create a sandbox from any image. `on` says where (local, the default unless the user configured another with `cua config set default.on`), `kind` what (auto, container, vm) and `runtime` which engine (auto, or gvisor, runc, qemu, lume); an impossible combination fails and lists the valid values. To browse the web, pass browser=true (and optionally url): it starts the canonical Linux image, registers it as a Space, launches Chromium with a throwaway profile inside it and returns the space, session, target_id and tab_id to pass to call_tool with the in-sandbox browser tools (browser_navigate, get_browser_state, browser_click, browser_type). Pass command, env and services to run a server in it, for example an MCP server: services {\"mcp\": 8765}. Without browser=true it does not register a Space: to reach its MCP server with list_tools/call_tool (service=\"mcp\"), use create_space instead (same arguments), or add this one with add_space (address local:<name>).",
params: &[
(
"browser",
@@ -238,7 +238,7 @@ const TOOLS: &[Tool] = &[
"on",
"string",
false,
- "Where it runs: local or cloud (default: the user's default location, else local)",
+ "Where it runs: local (default: the user's default location, else local)",
),
(
"kind",
@@ -250,13 +250,7 @@ const TOOLS: &[Tool] = &[
"runtime",
"string",
false,
- "Which engine: auto (default) or one the location offers for the kind (local: gvisor, runc, qemu, lume; cloud: gvisor, kubevirt)",
- ),
- (
- "pool",
- "string",
- false,
- "Use this dedicated cloud pool (Fleets advanced; implies on=cloud)",
+ "Which engine: auto (default) or one the location offers for the kind (gvisor, runc, qemu, lume)",
),
],
},
@@ -675,7 +669,7 @@ fn schema(t: &Tool) -> Value {
p["enum"] = json!(["firefox", "chrome"]);
}
if t.name == "sandbox_list" && *n == "location" {
- p["enum"] = json!(["local", "cloud", "direct"]);
+ p["enum"] = json!(["local", "direct"]);
}
props.insert(n.to_string(), p);
if *required {
@@ -1084,26 +1078,29 @@ impl Server {
let n = a["name"].as_str().unwrap_or_default().to_string();
let done = |m: String| jtext(json!({"success": true, "message": m}));
Some(match name {
- "sandbox_list" => async {
- let location = match a["location"].as_str().unwrap_or("") {
- "" | "all" => None,
- l @ ("local" | "cloud" | "direct") => Some(l.to_string()),
- other => {
- return Err(CuaError::InvalidArgument(format!(
- "sandbox_list: location must be local, cloud or direct, not {other:?}"
- )));
+ "sandbox_list" => {
+ async {
+ let location = match a["location"].as_str().unwrap_or("") {
+ "" | "all" => None,
+ "cloud" => return Err(crate::util::cloud_ended()),
+ l @ ("local" | "direct") => Some(l.to_string()),
+ other => {
+ return Err(CuaError::InvalidArgument(format!(
+ "sandbox_list: location must be local or direct, not {other:?}"
+ )));
+ }
+ };
+ let l = sbx.list_with_warnings(location).await?;
+ let mut content = jtext(Value::Array(
+ l.sandboxes.iter().map(sandbox::info_json).collect(),
+ ))?;
+ for w in l.warnings {
+ content.push(json!({"type": "text", "text": format!("warning: {w}")}));
}
- };
- let l = sbx.list_with_warnings(location).await?;
- let mut content = jtext(Value::Array(
- l.sandboxes.iter().map(sandbox::info_json).collect(),
- ))?;
- for w in l.warnings {
- content.push(json!({"type": "text", "text": format!("warning: {w}")}));
+ Ok(content)
}
- Ok(content)
+ .await
}
- .await,
"sandbox_get" => async { jtext(sandbox::info_json(&sbx.get(n).await?)) }.await,
"sandbox_create" => {
async {
@@ -1113,9 +1110,12 @@ impl Server {
None if browser => "linux".to_string(),
None => a["os_type"].as_str().unwrap_or("linux").to_string(),
};
- // The user default unless `on` says; a pool implies the
- // cloud. The SDK resolves the default and validates.
- let pool = a["pool"].as_str().filter(|s| !s.is_empty());
+ // A cloud pool no longer exists: refused, not ignored.
+ if a["pool"].as_str().is_some_and(|p| !p.is_empty()) {
+ return Err(crate::util::cloud_ended());
+ }
+ // The user default unless `on` says. The SDK resolves the
+ // default and validates.
let text = |k: &str| {
a[k].as_str()
.map(str::trim)
@@ -1127,7 +1127,7 @@ impl Server {
.as_str()
.filter(|s| !s.is_empty())
.map(str::to_string);
- o.on = text("on").or_else(|| pool.map(|_| "cloud".to_string()));
+ o.on = text("on");
o.kind = text("kind");
o.runtime = text("runtime");
let (env, services, command) = workload(a)?;
@@ -1152,13 +1152,9 @@ impl Server {
service: None,
});
}
- if let Some(p) = pool {
- o.pool = Some(p.into());
- } else {
- let (img, os) = sandbox::resolve_image(&image, None)?;
- o.image = img;
- o.os = os;
- }
+ let (img, os) = sandbox::resolve_image(&image, None)?;
+ o.image = img;
+ o.os = os;
let i = sbx.create(o).await?.info();
let mut v = json!({
"id": i.id,
@@ -1536,8 +1532,7 @@ impl cua_spaces::mcp::ToolExtension for Server {
fn error_kind(e: &CuaError) -> &'static str {
match e {
- // A pool whose template differs is a bad request for that pool.
- CuaError::InvalidArgument(_) | CuaError::PoolSpecMismatch(_) => "invalid_argument",
+ CuaError::InvalidArgument(_) => "invalid_argument",
CuaError::NotFound(_) | CuaError::ImageNotPublished(_) => "not_found",
CuaError::AmbiguousSandbox(_) => "ambiguous_sandbox",
CuaError::SpacesdNotAvailable(_) => "spacesd_not_available",
@@ -1546,9 +1541,6 @@ fn error_kind(e: &CuaError) -> &'static str {
CuaError::TeleportRefused(_) => "teleport_refused",
CuaError::Timeout(_) | CuaError::ClaimSecretsNotDelivered(_) => "timeout",
CuaError::Unauthenticated(_) => "unauthenticated",
- CuaError::Fleet(_) => "fleet",
- CuaError::FleetAdmissionDenied(_) => "fleet_admission_denied",
- CuaError::CloudCreditExhausted(_) => "cloud_credit_exhausted",
CuaError::Cloud(_) => "cloud",
CuaError::InsufficientDisk(_) => "insufficient_disk",
CuaError::Cancelled(_) => "cancelled",
diff --git a/libs/cua/crates/cua-cli/src/persistent_cmd.rs b/libs/cua/crates/cua-cli/src/persistent_cmd.rs
index b59a6cdc38..bd4f5dfc55 100644
--- a/libs/cua/crates/cua-cli/src/persistent_cmd.rs
+++ b/libs/cua/crates/cua-cli/src/persistent_cmd.rs
@@ -23,7 +23,7 @@ pub enum PersistentCmd {
/// Cua Volume (agents/NAME/) and outlives its Space.
#[command(after_help = "Examples:
cua agent create ada --harness hermes --in local:dev --env-from-host OPENAI_API_KEY
- cua agent create scout --harness claude-code --in cloud:scout --env-from-host ANTHROPIC_API_KEY")]
+ cua agent create scout --harness claude-code --in local:scout --env-from-host ANTHROPIC_API_KEY")]
Create {
name: String,
/// Harness id (`cua agent harnesses`).
diff --git a/libs/cua/crates/cua-cli/src/pools.rs b/libs/cua/crates/cua-cli/src/pools.rs
deleted file mode 100644
index d2c0145a6e..0000000000
--- a/libs/cua/crates/cua-cli/src/pools.rs
+++ /dev/null
@@ -1,275 +0,0 @@
-//! `cua fleet pools ls|gc`: the managed Fleet pools behind
-//! `cua sandbox create` without `--pool`.
-
-use crate::{auth, util::line};
-use cua_fleet::{ManagedPoolInfo, PoolManager};
-use cua_sdk::CuaError;
-use std::{io::Write, path::Path, time::Duration};
-
-async fn manager(state_dir: Option<&str>) -> Result<PoolManager, CuaError> {
- let (client, _) = auth::fleet_client().await?;
- let mut cfg = cua_sandbox_core::settings::auto_pool_config();
- if let Some(d) = state_dir {
- cfg = cfg.with_state_dir(Path::new(d));
- }
- Ok(PoolManager::new(client, cfg))
-}
-
-fn now() -> i64 {
- std::time::SystemTime::now()
- .duration_since(std::time::UNIX_EPOCH)
- .map(|d| d.as_secs() as i64)
- .unwrap_or(0)
-}
-
-fn ago(t: Option<i64>) -> String {
- match t {
- Some(t) => format!(
- "{} ago",
- humantime::format_duration(Duration::from_secs((now() - t).max(0) as u64))
- ),
- None => "-".into(),
- }
-}
-
-fn row(p: &ManagedPoolInfo) -> serde_json::Value {
- serde_json::json!({
- "name": p.name,
- "managed": p.managed,
- "spec_hash": p.spec_hash,
- "image": p.image,
- "replicas": p.replicas,
- "ready_replicas": p.ready_replicas,
- "max_pool_size": p.max_pool_size,
- "claims": p.claims,
- "bound_claims": p.bound_claims,
- "last_used": p.last_used,
- "created": p.created,
- "expires_at": p.expires_at,
- "terminating": p.terminating,
- })
-}
-
-/// `cua fleet pools ls`.
-pub async fn list(
- state_dir: Option<&str>,
- json: bool,
- out: &mut dyn Write,
-) -> Result<i32, CuaError> {
- let pools = manager(state_dir)
- .await?
- .list()
- .await
- .map_err(auth::fleet_err)?;
- if json {
- line(
- out,
- serde_json::Value::Array(pools.iter().map(row).collect()).to_string(),
- );
- return Ok(0);
- }
- if pools.is_empty() {
- line(out, "no managed pools");
- return Ok(0);
- }
- line(
- out,
- format!(
- "{:<36} {:>9} {:>7} {:<18} IMAGE",
- "NAME", "REPLICAS", "CLAIMS", "LAST USED"
- ),
- );
- for p in &pools {
- let replicas = format!(
- "{}/{}",
- p.ready_replicas.unwrap_or(0),
- p.max_pool_size.map_or("-".into(), |m| m.to_string())
- );
- let mut name = p.name.clone();
- if p.terminating {
- name.push_str(" (deleting)");
- }
- line(
- out,
- format!(
- "{name:<36} {replicas:>9} {:>7} {:<18} {}",
- p.claims,
- ago(p.last_used),
- p.image.as_deref().unwrap_or("-")
- ),
- );
- }
- Ok(0)
-}
-
-/// `cua fleet pools gc`.
-pub async fn gc(
- state_dir: Option<&str>,
- idle: &str,
- only: &[String],
- json: bool,
- out: &mut dyn Write,
-) -> Result<i32, CuaError> {
- let idle = humantime::parse_duration(idle)
- .map_err(|e| CuaError::InvalidArgument(format!("--idle {idle:?}: {e}")))?;
- let mgr = manager(state_dir).await?;
- let r = if only.is_empty() {
- mgr.gc(idle).await
- } else {
- mgr.gc_pools(idle, only).await
- }
- .map_err(auth::fleet_err)?;
- if json {
- line(
- out,
- serde_json::json!({
- "deleted_pools": r.deleted_pools,
- "deleted_namespaces": r.deleted_namespaces,
- "deleted_claims": r.deleted_claims,
- "kept": r.kept,
- "errors": r.errors,
- })
- .to_string(),
- );
- } else {
- for p in &r.deleted_pools {
- line(out, format!("deleted pool {p}"));
- }
- for n in &r.deleted_namespaces {
- line(out, format!("deleted namespace {n}"));
- }
- for c in &r.deleted_claims {
- line(out, format!("deleted stuck claim {c}"));
- }
- line(
- out,
- format!(
- "{} deleted, {} kept",
- r.deleted_pools.len() + r.deleted_namespaces.len(),
- r.kept.len()
- ),
- );
- for e in &r.errors {
- line(out, format!("error: {e}"));
- }
- }
- Ok(if r.errors.is_empty() { 0 } else { 1 })
-}
-
-/// `cua fleet pool export NAME [--terraform]`: a pool read back as the
-/// shared sandbox model (JSON), or as the Terraform `fleets_pool` block for
-/// the same fields (sidecars as `sidecar {}` blocks).
-pub async fn export(name: &str, terraform: bool, out: &mut dyn Write) -> Result<i32, CuaError> {
- let (client, _) = auth::fleet_client().await?;
- export_with(&client, name, terraform, out).await
-}
-
-/// [`export`] with a given client (tests use the fake Fleet).
-pub async fn export_with(
- client: &cua_fleet::FleetClient,
- name: &str,
- terraform: bool,
- out: &mut dyn Write,
-) -> Result<i32, CuaError> {
- let (spec, options, runtime) = client.export_pool(name).await.map_err(auth::fleet_err)?;
- if terraform {
- let _ = write!(
- out,
- "{}",
- cua_fleet::terraform_pool_block(name, &spec, &options, &runtime)
- );
- return Ok(0);
- }
- let secs = |d: Option<Duration>| d.map(|d| d.as_secs());
- line(
- out,
- serde_json::json!({
- "name": name,
- "runtime": cua_fleet::runtime_name(&runtime),
- "spec": spec,
- "options": {
- "replicas": options.replicas,
- "warm": options.warm,
- "min_pool_size": options.min_pool_size,
- "max_pool_size": options.max_pool_size,
- "idle_ttl_seconds": secs(options.idle_ttl),
- "ttl_policy": options.ttl_policy.map(|p| p.as_str()),
- "pool_ttl_seconds": secs(options.pool_ttl),
- },
- })
- .to_string(),
- );
- Ok(0)
-}
-
-#[cfg(test)]
-mod tests {
- use super::*;
-
- #[tokio::test]
- async fn export_prints_the_pool_as_terraform_and_json() {
- let fake = cua_fleet::testing::FakeFleet::new();
- let fleet = fake.client();
- let spec = cua_fleet::SandboxSpec {
- command: Some(vec!["python".into(), "-m".into(), "srv".into()]),
- services: [("mcp".to_string(), 8765)].into(),
- cpu: Some(2),
- memory_mb: Some(4096),
- sidecars: vec![cua_fleet::Sidecar {
- name: "db".into(),
- args: Some(vec!["--save".into(), String::new()]),
- ports: vec![6379],
- cpu: Some("250m".into()),
- memory: Some("256Mi".into()),
- ..cua_fleet::Sidecar::new("redis:7-alpine")
- }],
- ..cua_fleet::SandboxSpec::new("ghcr.io/trycua/cua-e2e-x:1")
- };
- let options = cua_fleet::PoolOptions {
- runtime: Some(cua_fleet::RuntimeKind::Gvisor),
- warm: Some(true),
- idle_ttl: Some(Duration::from_secs(3600)),
- ..Default::default()
- };
- fleet.apply("cua-e2e-exp", &spec, &options).await.unwrap();
- let mut hcl = Vec::new();
- assert_eq!(
- export_with(&fleet, "cua-e2e-exp", true, &mut hcl)
- .await
- .unwrap(),
- 0
- );
- let hcl = String::from_utf8(hcl).unwrap();
- for want in [
- "resource \"fleets_pool\" \"cua_e2e_exp\" {",
- " cpu_cores = 2",
- " memory = \"4096Mi\"",
- " runtime = \"gvisor\"",
- " command = [\"python\", \"-m\", \"srv\"]",
- " process_mode = \"Run\"",
- " idle_ttl_seconds = 3600",
- // Read back from the template, written as a provider block.
- "\n sidecar {\n name = \"db\"\n image = \"redis:7-alpine\"\n \
- args = [\"--save\", \"\"]\n ports = [6379]\n cpu = \"250m\"\n \
- memory = \"256Mi\"\n }\n",
- " target_port = 8765",
- " min_pool_size = 1",
- ] {
- assert!(hcl.contains(want), "missing {want:?} in\n{hcl}");
- }
- assert!(!hcl.contains('#'), "nothing is commented out:\n{hcl}");
- let mut js = Vec::new();
- export_with(&fleet, "cua-e2e-exp", false, &mut js)
- .await
- .unwrap();
- let v: serde_json::Value = serde_json::from_slice(&js).unwrap();
- assert_eq!(v["spec"]["command"][2], "srv");
- assert_eq!(v["options"]["idle_ttl_seconds"], 3600);
- assert_eq!(v["runtime"], "gvisor");
- assert!(
- export_with(&fleet, "cua-e2e-missing", true, &mut Vec::new())
- .await
- .is_err()
- );
- }
-}
diff --git a/libs/cua/crates/cua-cli/src/sandbox.rs b/libs/cua/crates/cua-cli/src/sandbox.rs
index 09d03b8f99..7a6468b9db 100644
--- a/libs/cua/crates/cua-cli/src/sandbox.rs
+++ b/libs/cua/crates/cua-cli/src/sandbox.rs
@@ -1,19 +1,18 @@
//! `cua sandbox` (alias `sb`): create/launch, list, inspect, lifecycle,
-//! exec, shell, screenshot and display URLs for Fleet, local and direct
+//! exec, shell, screenshot and display URLs for local and direct
//! sandboxes. Keeps the flags and aliases of the former Python CLI
//! (`launch`, `ls`/`list`, `info`/`get`, `delete`/`rm`, `--local`, `--json`).
use crate::{
- auth,
shell::{self, exit_code},
util::{self, internal, line},
};
use clap::{Args, Subcommand};
use cua_sandbox_core::placement::{Kind, On, Runtime};
use cua_sdk::{Cua, CuaError, ReadinessProbe, SandboxCreateOptions, SandboxInfo};
-use std::{collections::HashMap, io::Write, path::PathBuf, sync::Arc};
+use std::{io::Write, path::PathBuf, sync::Arc};
-/// `--on`: where it runs (`local`, `cloud`, `direct:<addr>`, or a
+/// `--on`: where it runs (`local`, `direct:<addr>`, or a
/// registered provider).
pub fn parse_on(s: &str) -> Result<On, String> {
On::parse(s).map_err(|e| e.message)
@@ -36,46 +35,74 @@ pub fn settings() -> Result<cua_sandbox_core::settings::Settings, CuaError> {
cua_sandbox_core::settings::Settings::load().map_err(|e| CuaError::InvalidArgument(e.0))
}
-/// `--local` / `--cloud`: narrow a bare NAME to one location. NAME can
-/// also be a ref (`local:<name>`, `cloud:<name>`, `direct:<host:port>`); a
-/// bare name must be unique across locations.
+/// `--local`: narrow a bare NAME to local sandboxes. NAME can also be a ref
+/// (`local:<name>`, `direct:<host:port>`); a bare name must be unique across
+/// locations.
#[derive(Args, Clone, Copy, Debug, Default)]
pub struct Narrow {
/// Look NAME up among local sandboxes only (same as `local:NAME`).
- #[arg(long, conflicts_with = "cloud")]
- local: bool,
- /// Look NAME up among cloud sandboxes only (same as `cloud:NAME`).
#[arg(long)]
+ local: bool,
+ /// Removed: Cua Cloud has ended.
+ #[arg(long, hide = true)]
cloud: bool,
}
impl Narrow {
- /// NAME, qualified when a flag narrows it.
+ /// NAME, qualified when the flag narrows it.
pub fn apply(self, name: &str) -> Result<String, CuaError> {
- let local = if self.local {
- Some(true)
- } else if self.cloud {
- Some(false)
- } else {
- None
- };
- if local.is_none() {
+ if self.cloud {
+ return Err(util::cloud_ended());
+ }
+ if !self.local {
return Ok(name.to_string());
}
- cua_sdk::qualify_sandbox_ref(name.to_string(), local)
+ cua_sdk::qualify_sandbox_ref(name.to_string(), Some(true))
+ }
+}
+
+/// The options of the ended Cua Cloud (`--pool`, `--apply`, `--warm`, ...),
+/// still accepted (hidden) so a script that passes one fails with the ended
+/// message instead of a parse error.
+#[derive(Args, Clone, Debug, Default)]
+pub struct EndedCloudArgs {
+ #[arg(long, hide = true)]
+ pool: Option<String>,
+ #[arg(long, hide = true)]
+ apply: bool,
+ #[arg(long, hide = true)]
+ warm: bool,
+ #[arg(long, hide = true)]
+ no_warm: bool,
+ #[arg(long, hide = true)]
+ max_pool_size: Option<u32>,
+ #[arg(long, hide = true)]
+ claim_ttl: Option<String>,
+}
+
+impl EndedCloudArgs {
+ /// The ended message when any of the options was given.
+ fn check(&self) -> Result<(), CuaError> {
+ let given = self.pool.is_some()
+ || self.apply
+ || self.warm
+ || self.no_warm
+ || self.max_pool_size.is_some()
+ || self.claim_ttl.is_some();
+ if given {
+ Err(util::cloud_ended())
+ } else {
+ Ok(())
+ }
}
}
#[derive(Args, Debug, Default)]
pub struct CreateArgs {
/// Image: a registry reference (`ghcr.io/org/image:tag`), an alias
- /// (`linux`, `ubuntu`, `windows`, `macos[:tahoe|sequoia]`, `omarchy`),
- /// or locally
- /// `pool:<name>` to run that cloud pool's template image with its
- /// firmware, services and readiness probe (`fleet:<name>` is the
- /// deprecated spelling).
+ /// (`linux`, `ubuntu`, `windows`, `macos[:tahoe|sequoia]`, `omarchy`).
image: Option<String>,
- /// Where it runs: local, cloud, direct:<addr> (an existing machine
+ /// Where it runs: local, direct:<addr> (an existing machine
/// running cua-spacesd), or a registered provider. Default: `cua config
/// get default.on` (`CUA_DEFAULT_ON`), else local.
#[arg(long, value_parser = parse_on, value_name = "WHERE")]
@@ -87,7 +114,7 @@ pub struct CreateArgs {
kind: Option<Kind>,
/// Which engine: auto (the safest available) or one the location offers
/// for the kind. Local: gvisor or runc (containers), qemu or lume (VMs).
- /// Cloud: gvisor (containers), kubevirt (VMs). A local sandbox with
+ /// A local sandbox with
/// --sidecar needs `--runtime runc` where gVisor would run (separate
/// gVisor containers cannot share a network namespace).
#[arg(long, value_parser = parse_runtime)]
@@ -118,7 +145,7 @@ pub struct CreateArgs {
memory: Option<String>,
/// Guest network: `default` (outbound network, like a Docker container)
/// or `none` (no egress; published ports still work). `none` needs a
- /// local QEMU VM; containers, Lume and cloud sandboxes reject it.
+ /// local QEMU VM; containers and Lume reject it.
#[arg(long, value_parser = ["default", "none"])]
network: Option<String>,
/// Disk size (accepted; the image decides today).
@@ -154,8 +181,7 @@ pub struct CreateArgs {
/// A sidecar container, reachable from the sandbox at its name (it
/// reaches the sandbox at `main`):
/// IMAGE[,port=PORT][,env=K=V][,name=NAME] (repeatable; `port=` and
- /// `env=` repeat too). Local containers and every cloud sandbox; locally
- /// it needs `--runtime runc` where gVisor would run. With sidecars the
+ /// `env=` repeat too). Local containers; it needs `--runtime runc` where gVisor would run. With sidecars the
/// service names main, sidecars and sc are reserved.
#[arg(long = "sidecar", value_parser = parse_sidecar)]
sidecars: Vec<cua_sdk::Container>,
@@ -163,29 +189,6 @@ pub struct CreateArgs {
/// this environment) or aws-ecr[:REGION] (the AWS CLI's login token).
#[arg(long, value_parser = parse_registry_secret)]
registry_secret: Option<cua_sdk::RegistrySecret>,
- /// Cloud: keep one warm sandbox of this image ready (the default for the
- /// canonical linux/windows/macos images).
- #[arg(long, help_heading = "Cloud (advanced)", conflicts_with = "no_warm")]
- warm: bool,
- /// Cloud: no warm sandbox, even for a canonical image.
- #[arg(long, help_heading = "Cloud (advanced)")]
- no_warm: bool,
- /// Cloud: most sandboxes of this image at once.
- #[arg(long, help_heading = "Cloud (advanced)")]
- max_pool_size: Option<u32>,
- /// Cloud: how long the sandbox outlives this command without a
- /// keep-alive (`15m`, `900`); renewed while the daemon holds it.
- #[arg(long, value_parser = parse_secs, help_heading = "Cloud (advanced)")]
- claim_ttl: Option<u32>,
- /// Cloud: use this dedicated pool instead of shared capacity. The
- /// sandbox fields given (IMAGE, --cmd, --env, --port, --sidecar, --cpu,
- /// --memory) must match its template, or creation fails with the diff.
- #[arg(long, help_heading = "Cloud (advanced)")]
- pool: Option<String>,
- /// Cloud, with --pool: update the pool's template to the given fields
- /// instead of failing when they differ.
- #[arg(long, requires = "pool", help_heading = "Cloud (advanced)")]
- apply: bool,
/// spacesd token (direct: sandboxes).
#[arg(long, env = "CUA_ENV_TOKEN", hide_env_values = true)]
token: Option<String>,
@@ -202,9 +205,9 @@ pub struct CreateArgs {
/// (`cua sb view`).
#[arg(long)]
view: bool,
- /// Keep the sandbox (its cloud claim, VM or container) when it fails to
- /// become ready, to debug it; the ref and how to delete it are printed.
- /// Default: a failed create deletes it and releases its claim.
+ /// Keep the sandbox (VM or container) when it fails to become ready, to
+ /// debug it; the ref and how to delete it are printed. Default: a failed
+ /// create deletes it.
#[arg(long)]
keep_on_failure: bool,
/// A GPU: the runtime's own (`--gpu`), or an option `cua spaces gpus`
@@ -213,6 +216,8 @@ pub struct CreateArgs {
/// Linux; a provider's GPU type).
#[arg(long, num_args = 0..=1, default_missing_value = "auto", value_name = "OPTION")]
gpu: Option<String>,
+ #[command(flatten)]
+ ended: EndedCloudArgs,
}
#[derive(Args, Debug)]
@@ -220,14 +225,10 @@ pub struct LaunchArgs {
/// Image: `linux`/`ubuntu`, `macos[:tahoe|sequoia]`, or a registry
/// reference such as `ghcr.io/org/image:tag`.
image: Option<String>,
- /// Use this dedicated cloud pool (requires --name). With --on local, run
- /// that pool's template locally instead.
- #[arg(long)]
- pool: Option<String>,
/// Deprecated: use `--on local`.
#[arg(long, hide = true)]
local: bool,
- /// Where it runs (default cloud for launch; see `sb create --on`).
+ /// Where it runs (see `sb create --on`).
#[arg(long, value_parser = parse_on, value_name = "WHERE", conflicts_with = "local")]
on: Option<On>,
/// Sandbox name.
@@ -251,51 +252,35 @@ pub struct LaunchArgs {
/// Disk size (accepted for compatibility; sized by the image).
#[arg(long, hide = true)]
disk: Option<String>,
- /// Cloud region (accepted for compatibility; the cloud places sandboxes).
+ /// Region (accepted for compatibility; ignored).
#[arg(long, hide = true)]
region: Option<String>,
/// Expose a guest port: NAME=PORT or PORT (repeatable).
#[arg(long = "port", visible_alias = "service", value_parser = parse_port_spec)]
ports: Vec<(Option<String>, u16)>,
- /// Cloud: keep one warm sandbox of this image ready.
- #[arg(long)]
- warm: bool,
- /// Cloud: most sandboxes of this image at once.
- #[arg(long)]
- max_pool_size: Option<u32>,
- /// Cloud: how long the sandbox outlives this command without a
- /// keep-alive (`15m`, `900`).
- #[arg(long, value_parser = parse_secs)]
- claim_ttl: Option<u32>,
/// Keep the sandbox when it fails to become ready (see `sb create
/// --keep-on-failure`).
#[arg(long)]
keep_on_failure: bool,
+ #[command(flatten)]
+ ended: EndedCloudArgs,
}
impl LaunchArgs {
- /// The equivalent `sb create` arguments (launch defaults to the cloud).
+ /// The equivalent `sb create` arguments (launch uses the user default, like create).
fn into_create(self) -> Result<CreateArgs, CuaError> {
- if self.image.is_some() == self.pool.is_some() {
- return Err(CuaError::InvalidArgument(
- "specify exactly one of IMAGE or --pool".into(),
- ));
+ self.ended.check()?;
+ if self.image.is_none() {
+ return Err(CuaError::InvalidArgument("specify IMAGE".into()));
}
let on = if self.local {
eprintln!("warning: `--local` is deprecated; use `--on local`");
- On::Local
+ Some(On::Local)
} else {
- self.on.unwrap_or(On::Cloud)
+ self.on
};
- // A cloud pool sandbox needs a name to reattach; running the pool's
- // template locally does not.
- if self.pool.is_some() && self.name.is_none() && on != On::Local {
- return Err(CuaError::InvalidArgument(
- "--name is required with --pool".into(),
- ));
- }
if self.region.is_some() {
- eprintln!("note: --region is ignored (the cloud places sandboxes)");
+ eprintln!("note: --region is ignored");
}
let kind = if self.vm {
eprintln!("warning: `--vm` is deprecated; use `--kind vm`");
@@ -305,7 +290,7 @@ impl LaunchArgs {
};
Ok(CreateArgs {
image: self.image,
- on: Some(on),
+ on,
kind,
runtime: self.runtime,
name: self.name,
@@ -313,10 +298,6 @@ impl LaunchArgs {
memory: self.memory,
disk: self.disk,
ports: self.ports,
- warm: self.warm,
- max_pool_size: self.max_pool_size,
- claim_ttl: self.claim_ttl,
- pool: self.pool,
keep_on_failure: self.keep_on_failure,
..Default::default()
})
@@ -325,46 +306,45 @@ impl LaunchArgs {
#[derive(Subcommand, Debug)]
pub enum SandboxCmd {
- /// Create a sandbox: `cua sb create IMAGE [--on local|cloud|direct:<addr>]
- /// [--kind auto|container|vm] [--runtime auto|gvisor|runc|qemu|lume|kubevirt]`.
+ /// Create a sandbox: `cua sb create IMAGE [--on local|direct:<addr>]
+ /// [--kind auto|container|vm] [--runtime auto|gvisor|runc|qemu|lume]`.
#[command(after_help = "Examples:
# A Linux desktop on this machine (a gVisor container)
cua sb create linux --name dev
# A web server container, ready when its HTTP service answers
cua sb create python:3.12-slim --service web=8000 --wait http:web/ -- python -m http.server 8000
- # The same Linux image in the cloud instead, as a VM
- cua sb create linux --on cloud --kind vm --name dev")]
+ # The same Linux image as a VM
+ cua sb create linux --kind vm --name dev")]
Create(Box<CreateArgs>),
- /// Deprecated alias of `create` that defaults to `--on cloud`.
+ /// Deprecated alias of `create`.
#[command(after_help = "Examples:
- # A cloud Linux sandbox (same as `cua sb create linux --on cloud`)
cua sb launch linux --name dev")]
Launch(LaunchArgs),
- /// Reattach to a sandbox (NAME or a ref such as `cloud:NAME`) and print
+ /// Reattach to a sandbox (NAME or a ref such as `local:NAME`) and print
/// it.
#[command(after_help = "Examples:
cua sb connect dev
- cua sb connect cloud:dev")]
+ cua sb connect local:dev")]
Connect {
- /// Sandbox name or ref (`local:NAME`, `cloud:NAME`).
+ /// Sandbox name or ref (`local:NAME`).
name: String,
#[command(flatten)]
at: Narrow,
},
- /// List sandboxes: local, direct and cloud (live Fleet claims) by
- /// default, each with its `location`; `--local` or `--cloud` filters.
+ /// List sandboxes: local and direct, each with its `location`; `--local`
+ /// filters.
#[command(
visible_alias = "list",
after_help = "Examples:
cua sb ls
- cua sb ls --cloud --json"
+ cua sb ls --local --json"
)]
Ls {
/// Only local sandboxes.
- #[arg(long, conflicts_with = "cloud")]
- local: bool,
- /// Only cloud sandboxes, listed live from Fleet.
#[arg(long)]
+ local: bool,
+ /// Removed: Cua Cloud has ended.
+ #[arg(long, hide = true)]
cloud: bool,
/// Deprecated: everything is the default.
#[arg(long, hide = true)]
@@ -374,34 +354,33 @@ pub enum SandboxCmd {
#[arg(long)]
no_size: bool,
},
- /// Show one sandbox (or a Fleet pool of that name).
+ /// Show one sandbox.
#[command(
visible_alias = "get",
after_help = "Examples:
cua sb info dev
- cua sb info cloud:dev --json"
+ cua sb info local:dev --json"
)]
Info {
- /// Sandbox name or ref (`local:NAME`, `cloud:NAME`).
+ /// Sandbox name or ref (`local:NAME`).
name: String,
#[command(flatten)]
at: Narrow,
},
- /// Suspend (local: pause/snapshot; Fleet managed pool: release the
- /// claim and keep the record; explicit Fleet pool: scale to zero).
+ /// Suspend (pause/snapshot).
#[command(after_help = "Examples:
cua sb suspend dev")]
Suspend {
- /// Sandbox name or ref (`local:NAME`, `cloud:NAME`).
+ /// Sandbox name or ref (`local:NAME`).
name: String,
#[command(flatten)]
at: Narrow,
},
- /// Resume (Fleet managed pool: claim a fresh sandbox of the same shape).
+ /// Resume.
#[command(after_help = "Examples:
cua sb resume dev")]
Resume {
- /// Sandbox name or ref (`local:NAME`, `cloud:NAME`).
+ /// Sandbox name or ref (`local:NAME`).
name: String,
#[command(flatten)]
at: Narrow,
@@ -410,38 +389,24 @@ pub enum SandboxCmd {
#[command(after_help = "Examples:
cua sb restart dev")]
Restart {
- /// Sandbox name or ref (`local:NAME`, `cloud:NAME`).
- name: String,
- #[command(flatten)]
- at: Narrow,
- },
- /// Extend a Fleet claim's lease.
- #[command(
- name = "keep-alive",
- after_help = "Examples:
- # Keep the claim for two more hours
- cua sb keep-alive cloud:dev --for 2h"
- )]
- KeepAlive {
- /// Sandbox name or ref (`local:NAME`, `cloud:NAME`).
+ /// Sandbox name or ref (`local:NAME`).
name: String,
#[command(flatten)]
at: Narrow,
- /// Lease from now (`15m`, `2h`, `900`).
- #[arg(long = "for", default_value = "15m", value_parser = parse_secs)]
- duration: u32,
},
- /// Delete a sandbox (Fleet: release the claim; managed pools are kept
- /// for reuse).
+ /// Removed: Cua Cloud has ended.
+ #[command(name = "keep-alive", hide = true, disable_help_flag = true)]
+ KeepAlive(util::EndedArgs),
+ /// Delete a sandbox.
#[command(
visible_alias = "delete",
after_help = "Examples:
cua sb rm dev
# Without the prompt (required in scripts and agents)
- cua sb rm cloud:dev --force"
+ cua sb rm local:dev --force"
)]
Rm {
- /// Sandbox name or ref (`local:NAME`, `cloud:NAME`).
+ /// Sandbox name or ref (`local:NAME`).
name: String,
/// Skip the confirmation prompt. Required when there is no terminal
/// to ask on (scripts, agents): without it nothing is deleted.
@@ -459,7 +424,7 @@ pub enum SandboxCmd {
Exec {
#[command(flatten)]
at: Narrow,
- /// Sandbox name or ref (`local:NAME`, `cloud:NAME`).
+ /// Sandbox name or ref (`local:NAME`).
name: String,
/// Command and arguments.
#[arg(trailing_var_arg = true, allow_hyphen_values = true, required = true)]
@@ -478,7 +443,7 @@ pub enum SandboxCmd {
/// Terminal height (default: this terminal's).
#[arg(long)]
rows: Option<u32>,
- /// Sandbox name or ref (`local:NAME`, `cloud:NAME`).
+ /// Sandbox name or ref (`local:NAME`).
name: String,
/// Command to run instead of the login shell.
#[arg(trailing_var_arg = true, allow_hyphen_values = true)]
@@ -508,7 +473,7 @@ pub enum SandboxCmd {
# The daemon too (restarts it and waits for the new build)
cua sb overlay dev cua-spacesd=./target/release/cua-spacesd")]
Overlay {
- /// Sandbox name or ref (`local:NAME`, `cloud:NAME`).
+ /// Sandbox name or ref (`local:NAME`).
name: String,
/// NAME=PATH[:GUEST_PATH] (repeatable).
#[arg(required = true, value_parser = parse_overlay)]
@@ -525,7 +490,7 @@ pub enum SandboxCmd {
cua sb logs dev
cua sb logs dev -n 50 --source guest")]
Logs {
- /// Sandbox name or ref (`local:NAME`, `cloud:NAME`).
+ /// Sandbox name or ref (`local:NAME`).
name: String,
#[command(flatten)]
at: Narrow,
@@ -537,9 +502,8 @@ pub enum SandboxCmd {
source: String,
},
/// Forward a guest port: `port-forward NAME PORT[:LOCAL]` (a local
- /// sandbox's port not published at create, and cloud sandboxes, tunnel
- /// through cua-spacesd when the image has it; cloud images without it
- /// get HTTP and WebSocket through a loopback proxy to the cloud gateway).
+ /// sandbox's port not published at create tunnels through cua-spacesd
+ /// when the image has it).
#[command(
name = "port-forward",
visible_alias = "forward",
@@ -547,10 +511,10 @@ pub enum SandboxCmd {
# Guest port 8080 on localhost:8080 until Ctrl-C
cua sb port-forward dev 8080
# Guest port 5432 on localhost:15432
- cua sb port-forward cloud:dev 5432:15432"
+ cua sb port-forward local:dev 5432:15432"
)]
PortForward {
- /// Sandbox name or ref (`local:NAME`, `cloud:NAME`).
+ /// Sandbox name or ref (`local:NAME`).
name: String,
#[command(flatten)]
at: Narrow,
@@ -562,13 +526,13 @@ pub enum SandboxCmd {
},
/// Print a URL for a named service: usable from this machine (default),
/// or `--public` for a shareable URL that expires (`--ttl`, default 1h;
- /// cloud: a signed URL; local: a token URL served by the cua daemon).
+ /// a token URL served by the cua daemon).
#[command(after_help = "Examples:
cua sb url dev web
# A shareable URL for 10 minutes
- cua sb url cloud:dev web --public --ttl 10m")]
+ cua sb url local:dev web --public --ttl 10m")]
Url {
- /// Sandbox name or ref (`local:NAME`, `cloud:NAME`).
+ /// Sandbox name or ref (`local:NAME`).
name: String,
/// Service name (from `--service` at create time).
service: String,
@@ -586,7 +550,7 @@ pub enum SandboxCmd {
#[command(after_help = "Examples:
cua sb screenshot dev -o desktop.png")]
Screenshot {
- /// Sandbox name or ref (`local:NAME`, `cloud:NAME`).
+ /// Sandbox name or ref (`local:NAME`).
name: String,
#[command(flatten)]
at: Narrow,
@@ -596,12 +560,12 @@ pub enum SandboxCmd {
},
/// Talk to an MCP server a sandbox serves: `mcp NAME SERVICE tools`,
/// `mcp NAME SERVICE call TOOL '{"a":1}'`. Generic streamable HTTP over
- /// the service (local or cloud); no cua-spacesd needed.
+ /// the service; no cua-spacesd needed.
#[command(after_help = "Examples:
cua sb mcp dev mcp tools
cua sb mcp dev mcp call echo '{\"text\":\"hi\"}'")]
Mcp {
- /// Sandbox name or ref (`local:NAME`, `cloud:NAME`).
+ /// Sandbox name or ref (`local:NAME`).
name: String,
/// Service name (for example `mcp`, or `port-8765`).
service: String,
@@ -641,7 +605,7 @@ pub enum SandboxCmd {
/// `cua sb view`.
#[derive(Args, Debug, Clone)]
pub struct ViewArgs {
- /// Sandbox name or ref (`local:NAME`, `cloud:NAME`).
+ /// Sandbox name or ref (`local:NAME`).
pub name: String,
/// Open this web service of the sandbox instead of the viewer (for
/// images without cua-spacesd that serve their own display page).
@@ -668,8 +632,7 @@ pub struct ViewArgs {
#[derive(Subcommand, Debug)]
pub enum McpAction {
/// The endpoint URL and headers, for any MCP client. Credential headers
- /// print masked (`Bearer ****`) unless `--show-secrets`; Fleet bearers
- /// are short-lived.
+ /// print masked (`Bearer ****`) unless `--show-secrets`.
#[command(after_help = "Examples:
cua sb mcp dev mcp config")]
Config {
@@ -1223,8 +1186,7 @@ pub fn info_json(i: &SandboxInfo) -> serde_json::Value {
"ephemeral": i.ephemeral,
"image": i.image,
"services": i.services,
- // Service base URLs from this machine (cloud: gateway URLs that need
- // the Fleet bearer).
+ // Service base URLs from this machine.
"endpoints": i.endpoints,
"provider_details": i.provider_details,
})
@@ -1308,35 +1270,22 @@ fn print(out: &mut dyn Write, v: serde_json::Value, json: bool, text: impl FnOnc
}
/// Where, what kind and which engine `sb create` / `sb launch` use: the
-/// flags, else `--pool` means the cloud, else the user defaults
-/// (`cua config`, `CUA_DEFAULT_*`), each with its source.
+/// flags, else the user defaults (`cua config`, `CUA_DEFAULT_*`), each with
+/// its source.
pub fn resolve_placement(a: &CreateArgs) -> Result<cua_sandbox_core::settings::Resolved, CuaError> {
- // Cua Cloud has ended: `--pool` (a cloud pool, or its template run
- // locally) and `--on cloud`, given or as the default.
- if a.pool.is_some() {
- return Err(auth::cloud_ended());
- }
+ // The options of the ended Cua Cloud (`--pool`, ...) fail first.
+ a.ended.check()?;
let r = settings()?
.resolve(a.on.clone(), a.kind, a.runtime.clone())
.map_err(|e| CuaError::InvalidArgument(e.0))?;
if r.on == On::Cloud {
- return Err(auth::cloud_ended());
+ return Err(util::cloud_ended());
}
cua_sandbox_core::placement::validate(&r.on, r.kind, &r.runtime)
.map_err(|e| CuaError::InvalidPlacement(e.message))?;
Ok(r)
}
-/// Whether this command should run through a (possibly auto-started)
-/// daemon: cloud creations, so the sandbox's keep-alive outlives the CLI.
-pub fn wants_daemon(cmd: &SandboxCmd) -> bool {
- match cmd {
- SandboxCmd::Create(a) => resolve_placement(a).is_ok_and(|r| r.on == On::Cloud),
- SandboxCmd::Launch(a) => !a.local && a.on.as_ref().is_none_or(|o| *o == On::Cloud),
- _ => false,
- }
-}
-
/// Prefixes an error with the backend it came from, keeping its kind.
pub fn on_backend(e: CuaError, backend: &str) -> CuaError {
use CuaError as E;
@@ -1374,37 +1323,16 @@ pub fn on_backend(e: CuaError, backend: &str) -> CuaError {
}
}
-/// Appended when `--on cloud` has no Cua cloud account: Spaces run on
-/// compute you bring, so point at the ways that need no Cua cloud.
-const BYO_COMPUTE_HINT: &str = "Cua Spaces run on computers you bring: this one (`--on local`), \
- a machine you own (`cua auth login`, then `cua host setup --profile spare` on that machine \
- and `--on host:<machine>` here), or your own cloud account (`cua cloud connect \
- aws|gcp|modal`, then `--on aws`)";
-
-/// What a failed create kept: the sandbox ref, its cloud claim (pool and
-/// namespace) when it has one, and how to delete it.
+/// What a failed create kept: the sandbox ref and how to delete it.
fn kept_message(i: &SandboxInfo) -> String {
- let d = |k: &str| i.provider_details.get(k).filter(|v| !v.is_empty());
- let mut claim = String::new();
- if let Some(c) = d("claim").or(i.location.eq("cloud").then_some(&i.name)) {
- claim.push_str(&format!(" (claim {c}"));
- if let Some(p) = d("pool") {
- claim.push_str(&format!(", pool {p}"));
- }
- if let Some(n) = d("namespace").filter(|n| Some(*n) != d("pool")) {
- claim.push_str(&format!(", namespace {n}"));
- }
- claim.push(')');
- }
format!(
- "kept sandbox {}{claim} after the failure (--keep-on-failure); delete it with `cua sb rm {} --force`",
+ "kept sandbox {} after the failure (--keep-on-failure); delete it with `cua sb rm {} --force`",
i.id, i.id
)
}
/// A create that succeeded but failed a later readiness step (overlays,
-/// `--wait desktop`, `--browser`): deletes the sandbox (releasing its
-/// claim) unless `keep`, and returns `e`.
+/// `--wait desktop`, `--browser`): deletes the sandbox unless `keep`, and returns `e`.
async fn failed_after_create(sb: &Arc<cua_sdk::Sandbox>, keep: bool, e: CuaError) -> CuaError {
if keep {
eprintln!("{}", kept_message(&sb.info()));
@@ -1440,9 +1368,9 @@ async fn create(
o.runtime = Some(placement.runtime.to_string());
o.name = a.name.clone();
if let On::Direct(_) = &on {
- if a.pool.is_some() || a.image.is_some() || a.image_flag.is_some() {
+ if a.image.is_some() || a.image_flag.is_some() {
return Err(CuaError::InvalidArgument(format!(
- "--on {label} connects to an existing machine: IMAGE and --pool do not apply"
+ "--on {label} connects to an existing machine: IMAGE does not apply"
)));
}
o.token = a.token.clone();
@@ -1451,26 +1379,12 @@ async fn create(
.image
.clone()
.or(a.image_flag.clone())
- .or_else(|| (a.browser && a.pool.is_none()).then(|| "linux".to_string()));
- if image.is_none() && a.pool.is_none() {
+ .or_else(|| a.browser.then(|| "linux".to_string()));
+ if image.is_none() {
return Err(CuaError::InvalidArgument(format!(
"IMAGE is required for --on {label}"
)));
}
- // Locally, --pool (without an image) runs that cloud pool's
- // template: its image, firmware, services and readiness probe.
- if a.pool.is_some() && !matches!(on, On::Cloud | On::Local) {
- return Err(CuaError::InvalidArgument(
- "--pool is a cloud pool: use it (--on cloud) or run its template locally \
- (--on local)"
- .into(),
- ));
- }
- if a.pool.is_some() && on == On::Local && image.is_some() {
- return Err(CuaError::InvalidArgument(
- "pass IMAGE or --pool, not both (locally --pool runs that pool's template)".into(),
- ));
- }
if let Some(image) = image {
let (resolved, os) = resolve_image(&image, a.tier.as_deref())?;
o.image = resolved;
@@ -1480,7 +1394,6 @@ async fn create(
o.name = Some(generated_name());
}
}
- o.pool = a.pool.clone();
o.cpus = a.cpu;
o.memory_mb = a.memory.as_deref().map(parse_memory).transpose()?;
o.network = a.network.clone();
@@ -1518,27 +1431,11 @@ async fn create(
o.command = (!a.command.is_empty()).then(|| a.command.clone());
o.ready_timeout_ms = a.ready_timeout.map(|s| s.saturating_mul(1000));
o.env = a.env.iter().cloned().collect();
- o.warm = if a.no_warm {
- Some(false)
- } else {
- a.warm.then_some(true)
- };
o.sidecars = a.sidecars.clone();
o.registry_secret = a.registry_secret.clone();
- o.max_pool_size = a.max_pool_size;
- o.fleet_ttl_seconds = a.claim_ttl;
o.keep_on_failure = a.keep_on_failure;
o.gpu = a.gpu.clone();
- if a.apply {
- o.cloud = Some(cua_sdk::CloudOptions {
- apply: true,
- ..Default::default()
- });
- }
let token = o.token.clone();
- if on == On::Cloud {
- eprintln!("Starting a cloud sandbox (first start of an image can take a few minutes)");
- }
let requested_name = o.name.clone();
// Each step of the create on a terminal (never in --json output).
let steps = {
@@ -1594,8 +1491,7 @@ async fn create(
}
let sb = created
.map_err(|e| match e {
- // The cloud came from a default: say how to sign in or go back.
- // The cloud came from a default: say how to sign in or go back
+ // A default placement that is not configured: say how to go back
// (once: some SDK paths have said it already).
CuaError::ProviderNotConfigured(mut m) => {
if let Some(hint) =
@@ -1604,9 +1500,6 @@ async fn create(
{
m = format!("{m}; {hint}");
}
- if on == On::Cloud {
- m = format!("{m}. {BYO_COMPUTE_HINT}");
- }
CuaError::ProviderNotConfigured(m)
}
other => other,
@@ -1697,20 +1590,6 @@ async fn create(
eprintln!(" {p}");
}
}
- if on == On::Cloud && a.pool.is_none() && cua.mode() == cua_sdk::CuaMode::Embedded {
- let ttl = a.claim_ttl.unwrap_or_else(|| {
- cua_sandbox_core::settings::auto_pool_config()
- .claim_ttl
- .as_secs() as u32
- });
- eprintln!(
- "note: no cua daemon holds this sandbox, so it expires {} from now unless you run \
- `cua sb keep-alive {}` (or start `cua daemon start` and `cua sb connect {}`)",
- humantime::format_duration(std::time::Duration::from_secs(u64::from(ttl))),
- i.id,
- i.id
- );
- }
if compat {
print(
out,
@@ -1796,11 +1675,14 @@ pub async fn run(
all,
no_size,
} => {
+ if cloud {
+ return Err(util::cloud_ended());
+ }
let _ = all; // deprecated no-op: everything is the default
- return ls(cua, local, cloud, !no_size, json_global, out).await;
+ return ls(cua, local, !no_size, json_global, out).await;
}
- // Extends a Fleet claim's lease: Cua Cloud has ended.
- SandboxCmd::KeepAlive { .. } => return Err(auth::cloud_ended()),
+ // Extended a Fleet claim's lease: Cua Cloud has ended.
+ SandboxCmd::KeepAlive(_) => return Err(util::cloud_ended()),
SandboxCmd::Cp { src, dst, at } => return cp(cua, &src, &dst, at, json_global, out).await,
SandboxCmd::Url {
name,
@@ -1875,28 +1757,6 @@ pub async fn run(
}
}
}
- Err(CuaError::NotFound(missing)) => {
- // Not a sandbox: maybe a cloud pool. A name that is
- // neither stays "not found" (a local name must not
- // surface a Fleet error, e.g. without cloud access).
- let p = match fleet_pool(&name).await {
- Ok(p) => p,
- Err(_) => return Err(CuaError::NotFound(missing)),
- };
- if json {
- line(out, p.to_string());
- } else {
- line(out, format!("Name: {name} (dedicated cloud capacity)"));
- line(
- out,
- format!(
- "Replicas: {} ready / {} desired",
- p["status"]["readyReplicas"].as_u64().unwrap_or(0),
- p["spec"]["replicas"].as_u64().unwrap_or(0)
- ),
- );
- }
- }
Err(e) => return Err(e),
}
}
@@ -2186,47 +2046,13 @@ fn sh_argv(line: &str) -> Vec<String> {
vec!["/bin/sh".into(), "-c".into(), line.into()]
}
-async fn fleet_pool(name: &str) -> Result<serde_json::Value, CuaError> {
- let (c, _) = auth::fleet_client()
- .await
- .map_err(|_| CuaError::NotFound(format!("no sandbox named {name}")))?;
- let h = c.get_pool(name).await.map_err(auth::fleet_err)?;
- Ok(serde_json::to_value(&h.pool)?)
-}
-
-/// suspend / resume / restart by sandbox name, falling back to a Fleet
-/// pool of that name (as the former CLI did).
+/// suspend / resume / restart by sandbox name.
async fn lifecycle(cua: &Arc<Cua>, name: &str, op: &str) -> Result<(), CuaError> {
- match cua.sandboxes().by_name(name.to_string()).await {
- Ok(sb) => match op {
- "suspend" => sb.suspend().await,
- "resume" => sb.resume().await,
- _ => sb.restart().await,
- },
- Err(CuaError::NotFound(m)) => {
- let Ok((c, _)) = auth::fleet_client().await else {
- return Err(CuaError::NotFound(m));
- };
- let mut h = c
- .get_pool(name)
- .await
- .map_err(|e| match auth::fleet_err(e) {
- CuaError::NotFound(_) => CuaError::NotFound(m.clone()),
- e => e,
- })?;
- let reps: &[u32] = match op {
- "suspend" => &[0],
- "resume" => &[1],
- _ => &[0, 1],
- };
- for r in reps {
- c.set_pool_replicas(&mut h, *r)
- .await
- .map_err(auth::fleet_err)?;
- }
- Ok(())
- }
- Err(e) => Err(e),
+ let sb = cua.sandboxes().by_name(name.to_string()).await?;
+ match op {
+ "suspend" => sb.suspend().await,
+ "resume" => sb.resume().await,
+ _ => sb.restart().await,
}
}
@@ -2253,7 +2079,7 @@ fn state_of(name: &str) -> Option<serde_json::Value> {
/// Backend label of a listing row (`--on` vocabulary).
/// A listing row in portable words: `status` (provisioning, starting,
/// ready, stopped, expired) with the provider's word in `state`, `location`
-/// (local, cloud, direct), and cloud internals moved into
+/// (local, direct), and provider internals moved into
/// `provider_details`.
fn portable_row(r: &mut serde_json::Value) {
let word = r["status"].as_str().unwrap_or("unknown").to_string();
@@ -2282,83 +2108,7 @@ fn portable_row(r: &mut serde_json::Value) {
);
}
-/// Adds `pool`, `managed` and `expires_in_seconds` to Fleet rows (live
-/// claim `shutdownTime`). Best effort.
-async fn annotate_fleet(rows: &mut [serde_json::Value]) {
- let fleet_rows: Vec<usize> = rows
- .iter()
- .enumerate()
- .filter(|(_, r)| r["location"] == "cloud")
- .map(|(i, _)| i)
- .collect();
- if fleet_rows.is_empty() {
- return;
- }
- let mut by_pool: std::collections::BTreeMap<String, Vec<usize>> = Default::default();
- for i in fleet_rows {
- let name = rows[i]["name"].as_str().unwrap_or_default().to_string();
- let pool = rows[i]["namespace"]
- .as_str()
- .map(str::to_string)
- .or_else(|| state_of(&name).and_then(|s| s["pool_name"].as_str().map(str::to_string)));
- if let Some(p) = pool {
- rows[i]["pool"] = serde_json::Value::String(p.clone());
- rows[i]["managed"] = serde_json::Value::Bool(p.starts_with("cua-auto-"));
- by_pool.entry(p).or_default().push(i);
- }
- }
- let Ok((c, _)) = auth::fleet_client().await else {
- return;
- };
- let now = std::time::SystemTime::now();
- for (pool, idx) in by_pool {
- let Ok(claims) = c.list_claims(&pool).await else {
- continue;
- };
- // The pool's runtime says the kind and engine of its sandboxes.
- let runtime = match c.get_pool(&pool).await {
- Ok(p) => c.pool_runtime(&p.pool).await,
- Err(_) => None,
- };
- let placement = match runtime {
- Some(cua_fleet::RuntimeKind::Gvisor) => Some(("container", "gvisor")),
- Some(cua_fleet::RuntimeKind::Kubevirt) => Some(("vm", "kubevirt")),
- _ => None,
- };
- for i in idx {
- if let Some((kind, runtime)) = placement {
- if rows[i]["kind"].as_str().is_none_or(str::is_empty) {
- rows[i]["kind"] = serde_json::Value::String(kind.into());
- }
- if rows[i]["runtime"].as_str().is_none_or(str::is_empty) {
- rows[i]["runtime"] = serde_json::Value::String(runtime.into());
- }
- }
- let name = rows[i]["name"].as_str().unwrap_or_default().to_string();
- let Some(cl) = claims.iter().find(|c| c.metadata.name == name) else {
- let suspended = rows[i]["state"] == "suspended" || rows[i]["status"] == "suspended";
- if !suspended {
- rows[i]["state"] = serde_json::Value::String("expired".into());
- rows[i]["status"] = serde_json::Value::String("expired".into());
- }
- continue;
- };
- if let Some(t) = cl
- .spec
- .lifecycle
- .as_ref()
- .and_then(|l| l.shutdown_time.as_deref())
- .and_then(|t| humantime::parse_rfc3339_weak(t).ok())
- {
- let left = t.duration_since(now).map(|d| d.as_secs()).unwrap_or(0);
- rows[i]["expires_in_seconds"] = serde_json::Value::from(left);
- }
- }
- }
-}
-
-/// Every sandbox this machine knows, of every provider (local, direct and
-/// the Fleet claims it holds); no live Fleet listing (`cua do ls`).
+/// Every sandbox this machine knows, of every provider (local and direct).
pub async fn list_known(cua: &Arc<Cua>) -> Result<Vec<SandboxInfo>, CuaError> {
cua.sandboxes().list_known(None).await
}
@@ -2366,19 +2116,11 @@ pub async fn list_known(cua: &Arc<Cua>) -> Result<Vec<SandboxInfo>, CuaError> {
async fn ls(
cua: &Arc<Cua>,
local: bool,
- cloud: bool,
sizes: bool,
json: bool,
out: &mut dyn Write,
) -> Result<i32, CuaError> {
- // Known sandboxes of the filter; live cloud sandboxes unless local only.
- let known = if cloud {
- Some("cloud")
- } else if local {
- Some("local")
- } else {
- None
- };
+ let known = local.then_some("local");
let mut rows: Vec<serde_json::Value> = cua
.sandboxes()
.list_known(known)
@@ -2386,38 +2128,10 @@ async fn ls(
.iter()
.map(info_json)
.collect();
- let mut warnings: Vec<String> = vec![];
- // The default listing never reads the OS credential vault to find out
- // whether a session exists (the session marker says so).
- if cloud || (known.is_none() && auth::fleet_maybe_configured()) {
- let live = tokio::time::timeout(cua_daemon::LIST_CLOUD_TIMEOUT, fleet_claims()).await;
- match live {
- Ok(Ok(claims)) => {
- // Known Fleet sandboxes already listed stay once.
- for c in claims {
- if !rows.iter().any(|r| r["id"] == c["id"]) {
- rows.push(c);
- }
- }
- }
- // No Fleet credentials: nothing to list in the cloud.
- Ok(Err(CuaError::ProviderNotConfigured(_))) if !cloud => {}
- Ok(Err(e)) => warnings.push(format!("cloud sandboxes not listed: {e}")),
- Err(_) => warnings.push(format!(
- "cloud sandboxes not listed: Fleet did not answer within {}s",
- cua_daemon::LIST_CLOUD_TIMEOUT.as_secs()
- )),
- }
- }
- if warnings.is_empty() {
- // Remaining TTLs of cloud rows (bounded like the listing).
- let _ =
- tokio::time::timeout(cua_daemon::LIST_CLOUD_TIMEOUT, annotate_fleet(&mut rows)).await;
- }
for r in rows.iter_mut() {
portable_row(r);
}
- // Disk used by each local sandbox (cloud and direct ones use none here).
+ // Disk used by each local sandbox (direct ones use none here).
if sizes && rows.iter().any(|r| r["location"] == "local") {
let by_name = cua_disk::Scanner::system(cua_disk::Layout::default())
.await
@@ -2429,9 +2143,6 @@ async fn ls(
}
}
}
- for w in &warnings {
- eprintln!("warning: {w}");
- }
if json {
line(out, serde_json::Value::Array(rows).to_string());
return Ok(0);
@@ -2660,40 +2371,9 @@ async fn port_forward(
let local: Option<u16> = local.map(|l| l.parse().map_err(|_| bad())).transpose()?;
let sb = sandbox_with_token(cua, name).await?;
// Every provider gets a loopback forward: local runtimes through the
- // published port (an unpublished one over the spacesd's /tunnel), cloud
- // and url: sandboxes over the spacesd's /tunnel WebSocket, and cloud
- // images without it through a loopback HTTP proxy to the gateway. A forward without a listener (older daemons) falls
- // back to a signed HTTPS URL for the port's service.
+ // published port (an unpublished one over the spacesd's /tunnel) and
+ // url: sandboxes over the spacesd's /tunnel WebSocket.
let fwd = sb.forward(port).await?;
- if fwd.local_addr().is_none() && sb.location() == "cloud" {
- let _ = fwd.close().await;
- // Reattached handles know service names only; the state file keeps
- // the ports a managed sandbox was created with.
- let recorded: HashMap<String, u16> = state_of(name)
- .and_then(|s| serde_json::from_value(s["services"].clone()).ok())
- .unwrap_or_default();
- let service = sb
- .services()
- .into_iter()
- .chain(recorded)
- .find(|(_, p)| *p == port)
- .map(|(n, _)| n)
- .unwrap_or_else(|| {
- if port == 3211 {
- "env".into()
- } else {
- format!("port-{port}")
- }
- });
- let (url, _) = service_page_url(cua, name, Some(service)).await?;
- print(
- out,
- serde_json::json!({"name": name, "guest_port": port, "url": url}),
- json,
- || format!("Fleet port {port} of {name}: {url}"),
- );
- return Ok(0);
- }
let target = fwd.local_addr();
let listen = match (local, &target) {
(Some(l), Some(t)) => {
@@ -2731,39 +2411,6 @@ async fn port_forward(
Ok(0)
}
-/// Every Fleet claim in the account's namespaces (live, read-only).
-async fn fleet_claims() -> Result<Vec<serde_json::Value>, CuaError> {
- let (c, _) = auth::fleet_client().await?;
- let sdk = c.sdk();
- let nss = sdk
- .clone()
- .list_namespaces()
- .await
- .map_err(|e| auth::fleet_err(cua_fleet::Error::Sdk(e)))?;
- let mut out = vec![];
- for ns in nss {
- let claims = match c.list_claims(&ns.name).await.map_err(auth::fleet_err) {
- Ok(c) => c,
- Err(CuaError::PermissionDenied(_)) => continue,
- Err(e) => return Err(e),
- };
- for cl in claims {
- let v = serde_json::to_value(&cl)?;
- out.push(serde_json::json!({
- "id": format!("cloud:{}", v["metadata"]["name"].as_str().unwrap_or_default()),
- "name": v["metadata"]["name"],
- "location": "cloud",
- "kind": "",
- "runtime": "",
- "runtime_type": format!("fleet/{}", ns.name),
- "status": v["status"]["phase"].as_str().unwrap_or("unknown").to_lowercase(),
- "namespace": ns.name,
- }));
- }
- }
- Ok(out)
-}
-
/// Web display services of images without cua-spacesd, in preference order
/// (`cua sb view --service` picks one explicitly).
pub const LEGACY_DISPLAY_SERVICES: [&str; 3] = ["novnc", "display", "web"];
@@ -2987,7 +2634,7 @@ pub async fn viewer_link(
}
/// A browser URL for a web service of the sandbox (no credentials): the
-/// loopback port locally, a signed service URL (1 h) on Fleet. With no
+/// loopback port locally. With no
/// `service`, the first of the legacy display services an image declares
/// (`novnc`, `display`, `web`).
pub async fn service_page_url(
@@ -3009,54 +2656,25 @@ pub async fn service_page_url(
))
})?,
};
- match i.location.as_str() {
- "cloud" => {
- let ep = i
- .endpoints
- .values()
- .next()
- .cloned()
- .ok_or_else(|| CuaError::NotFound(format!("no Fleet endpoint for {name}")))?;
- let ns = ep
- .split("/api/svc/")
- .nth(1)
- .and_then(|r| r.split('/').next())
- .ok_or_else(|| CuaError::Internal(format!("unexpected Fleet endpoint {ep}")))?
- .to_string();
- let (c, _) = auth::fleet_client().await?;
- let bound = c.attach_claim(&ns, name).await.map_err(auth::fleet_err)?;
- let s = c
- .create_signed_service_url(
- &bound,
- &svc,
- Some("cua sb view".into()),
- std::time::Duration::from_secs(3600),
- )
- .await
- .map_err(auth::fleet_err)?;
- Ok((s.url, None))
- }
- _ => {
- if let Some(u) = i.endpoints.get(&svc) {
- return Ok((u.clone(), None));
- }
- let port = *i.services.get(&svc).ok_or_else(|| {
- CuaError::NotFound(format!("sandbox {name} has no service {svc}"))
- })?;
- let f = cua
- .sandboxes()
- .connect(name.to_string())
- .await?
- .forward(port)
- .await?;
- let url = f
- .url()
- .or_else(|| f.local_addr().map(|a| format!("http://{a}")))
- .ok_or_else(|| CuaError::Internal("port forward has no address".into()))?;
- // The forward lives as long as this process.
- Ok((url, Some(f)))
- }
- }
+ if let Some(u) = i.endpoints.get(&svc) {
+ return Ok((u.clone(), None));
+ }
+ let port = *i
+ .services
+ .get(&svc)
+ .ok_or_else(|| CuaError::NotFound(format!("sandbox {name} has no service {svc}")))?;
+ let f = cua
+ .sandboxes()
+ .connect(name.to_string())
+ .await?
+ .forward(port)
+ .await?;
+ let url = f
+ .url()
+ .or_else(|| f.local_addr().map(|a| format!("http://{a}")))
+ .ok_or_else(|| CuaError::Internal("port forward has no address".into()))?;
+ // The forward lives as long as this process.
+ Ok((url, Some(f)))
}
/// Outcome of a destructive command's confirmation (`cua sandbox rm`,
@@ -3098,6 +2716,7 @@ pub(crate) fn confirm_delete(
#[cfg(test)]
mod tests {
use super::*;
+ use std::collections::HashMap;
#[test]
fn a_space_that_stopped_on_its_own_says_why_in_the_listing() {
@@ -3302,10 +2921,10 @@ mod tests {
a: CreateArgs,
}
let p = |args: &[&str]| T::try_parse_from(["t", "linux"].iter().chain(args));
- let t = p(&["--on", "cloud", "--kind", "vm", "--runtime", "kubevirt"]).unwrap();
- assert_eq!(t.a.on, Some(On::Cloud));
+ let t = p(&["--on", "local", "--kind", "vm", "--runtime", "qemu"]).unwrap();
+ assert_eq!(t.a.on, Some(On::Local));
assert_eq!(t.a.kind, Some(Kind::Vm));
- assert_eq!(t.a.runtime, Some(Runtime::Kubevirt));
+ assert_eq!(t.a.runtime, Some(Runtime::Qemu));
let t = p(&["--on", "direct:[::1]:3211"]).unwrap();
assert_eq!(t.a.on, Some(On::Direct("[::1]:3211".into())));
// Engines and kinds are not locations; the error points at the flag.
@@ -3314,7 +2933,6 @@ mod tests {
("lume", "--runtime lume"),
("docker", "--kind container"),
("vm", "--kind vm"),
- ("fleet", "cloud"),
] {
let e = p(&["--on", bad]).err().unwrap().to_string();
assert!(e.contains(hint), "{bad}: {e}");
@@ -3353,11 +2971,7 @@ mod tests {
.a
};
let c = p(&[]).into_create().unwrap();
- assert_eq!(
- (c.on, c.kind),
- (Some(On::Cloud), None),
- "launch defaults to the cloud"
- );
+ assert_eq!((c.on, c.kind), (None, None), "launch uses the user default");
let c = p(&["--local", "--vm"]).into_create().unwrap();
assert_eq!((c.on, c.kind), (Some(On::Local), Some(Kind::Vm)));
let c = p(&["--on", "local", "--kind", "container"])
@@ -3367,33 +2981,74 @@ mod tests {
}
#[test]
- fn placement_resolves_flags_then_pool_then_defaults() {
+ fn placement_resolves_flags_then_defaults() {
let _env = crate::util::test_env::isolated();
- // Cua Cloud has ended: --pool (either location) and --on cloud.
- let ended = |a: &CreateArgs| {
- let e = resolve_placement(a).unwrap_err();
- assert!(e.to_string().contains("Cua Cloud has ended"), "{e}");
- };
- ended(&CreateArgs {
- pool: Some("p".into()),
- ..Default::default()
- });
- ended(&CreateArgs {
+ let a = CreateArgs {
on: Some(On::Local),
- pool: Some("p".into()),
..Default::default()
- });
- ended(&CreateArgs {
- on: Some(On::Cloud),
- runtime: Some(Runtime::Qemu),
- ..Default::default()
- });
+ };
+ assert_eq!(resolve_placement(&a).unwrap().on, On::Local);
let a = CreateArgs::default();
assert_eq!(resolve_placement(&a).unwrap().on, On::Local);
}
#[test]
- fn keep_on_failure_flag_and_kept_message_name_the_claim() {
+ fn ended_cloud_options_fail_with_the_ended_message() {
+ use clap::Parser;
+ #[derive(Parser)]
+ struct T {
+ #[command(flatten)]
+ a: CreateArgs,
+ }
+ let _env = crate::util::test_env::isolated();
+ let ended = |e: CuaError| {
+ assert!(matches!(e, CuaError::Unsupported(_)), "{e:?}");
+ assert_eq!(
+ e.to_string(),
+ format!("unsupported: {}", cua_sandbox_core::CLOUD_ENDED)
+ );
+ };
+ // Every option of the ended cloud still parses (hidden) and fails
+ // with the one message, whatever else is given.
+ for args in [
+ &["--pool", "p"][..],
+ &["--pool", "p", "--apply"],
+ &["--warm"],
+ &["--no-warm"],
+ &["--max-pool-size", "3"],
+ &["--claim-ttl", "15m"],
+ &["--on", "local", "--pool", "p"],
+ ] {
+ let t = T::try_parse_from(["t", "linux"].iter().chain(args)).unwrap();
+ ended(resolve_placement(&t.a).unwrap_err());
+ }
+ // `--on cloud`, given or as the default.
+ let t = T::try_parse_from(["t", "linux", "--on", "cloud"]).unwrap();
+ ended(resolve_placement(&t.a).unwrap_err());
+ // `sb launch` forwards them too.
+ #[derive(Parser)]
+ struct L {
+ #[command(flatten)]
+ a: LaunchArgs,
+ }
+ let l = L::try_parse_from(["t", "linux", "--pool", "p"]).unwrap();
+ ended(l.a.into_create().unwrap_err());
+ let l = L::try_parse_from(["t", "--pool", "p", "--warm"]).unwrap();
+ ended(l.a.into_create().unwrap_err());
+ // The `--cloud` filter of the name commands and of `sb ls`.
+ ended(
+ Narrow {
+ local: false,
+ cloud: true,
+ }
+ .apply("box")
+ .unwrap_err(),
+ );
+ assert!(Narrow::default().apply("box").is_ok());
+ }
+
+ #[test]
+ fn keep_on_failure_flag_and_kept_message() {
use clap::Parser;
#[derive(Parser)]
struct T {
@@ -3405,7 +3060,6 @@ mod tests {
assert!(p(&["--keep-on-failure"]).unwrap().a.keep_on_failure);
let launch = LaunchArgs {
image: Some("linux".into()),
- pool: None,
local: false,
on: None,
name: Some("cua-e2e-x".into()),
@@ -3417,10 +3071,8 @@ mod tests {
disk: None,
region: None,
ports: vec![],
- warm: false,
- max_pool_size: None,
- claim_ttl: None,
keep_on_failure: true,
+ ended: EndedCloudArgs::default(),
};
assert!(launch.into_create().unwrap().keep_on_failure);
@@ -3428,33 +3080,24 @@ mod tests {
name: "cua-e2e-kept".into(),
kind: "container".into(),
runtime: "gvisor".into(),
- runtime_type: "fleet".into(),
+ runtime_type: "local".into(),
status: cua_sdk::SandboxStatus::Provisioning,
status_detail: None,
ephemeral: false,
services: HashMap::new(),
endpoints: HashMap::new(),
image: None,
- id: "cloud:cua-e2e-kept".into(),
+ id: "local:cua-e2e-kept".into(),
phase: cua_sdk::SandboxPhase::Provisioning,
- location: "cloud".into(),
+ location: "local".into(),
expires_at_unix: None,
- provider_details: HashMap::from([
- ("claim".to_string(), "cua-e2e-kept".to_string()),
- ("pool".to_string(), "cua-auto-abc".to_string()),
- ("namespace".to_string(), "cua-auto-abc".to_string()),
- ]),
+ provider_details: HashMap::new(),
image_info: None,
stop_reason: None,
};
let m = kept_message(&info);
- assert!(m.contains("cloud:cua-e2e-kept"), "{m}");
- assert!(m.contains("claim cua-e2e-kept, pool cua-auto-abc"), "{m}");
- assert!(m.contains("`cua sb rm cloud:cua-e2e-kept --force`"), "{m}");
- assert!(
- !m.contains("namespace"),
- "namespace equal to the pool is not repeated: {m}"
- );
+ assert!(m.contains("local:cua-e2e-kept"), "{m}");
+ assert!(m.contains("`cua sb rm local:cua-e2e-kept --force`"), "{m}");
}
#[test]
@@ -3480,12 +3123,13 @@ mod tests {
#[test]
fn narrow_qualifies_bare_names() {
- let n = |local, cloud| Narrow { local, cloud };
- assert_eq!(n(false, false).apply("box").unwrap(), "box");
- assert_eq!(n(true, false).apply("box").unwrap(), "local:box");
- assert_eq!(n(false, true).apply("box").unwrap(), "cloud:box");
- assert_eq!(n(false, true).apply("cloud:box").unwrap(), "cloud:box");
- assert!(n(true, false).apply("cloud:box").is_err());
+ let n = |local| Narrow {
+ local,
+ cloud: false,
+ };
+ assert_eq!(n(false).apply("box").unwrap(), "box");
+ assert_eq!(n(true).apply("box").unwrap(), "local:box");
+ assert!(n(true).apply("direct:box").is_err());
}
#[test]
@@ -3493,7 +3137,7 @@ mod tests {
assert_eq!(remote("box:/tmp/a"), Some(("box", "/tmp/a")));
// Refs carry colons of their own.
assert_eq!(remote("local:box:/tmp/a"), Some(("local:box", "/tmp/a")));
- assert_eq!(remote("cloud:box:~/a"), Some(("cloud:box", "~/a")));
+ assert_eq!(remote("local:box:~/a"), Some(("local:box", "~/a")));
assert_eq!(
remote("direct:10.0.0.5:3211:/tmp/a"),
Some(("direct:10.0.0.5:3211", "/tmp/a"))
diff --git a/libs/cua/crates/cua-cli/src/stream_probe.rs b/libs/cua/crates/cua-cli/src/stream_probe.rs
index 28cdea7f34..dfdf3644b8 100644
--- a/libs/cua/crates/cua-cli/src/stream_probe.rs
+++ b/libs/cua/crates/cua-cli/src/stream_probe.rs
@@ -32,7 +32,7 @@ use crate::util::internal;
/// `cua sb stream-probe`.
#[derive(Args, Debug, Clone)]
pub struct StreamProbeArgs {
- /// Sandbox name or ref (`local:NAME`, `cloud:NAME`).
+ /// Sandbox name or ref (`local:NAME`).
pub name: String,
/// Stream this window (an id from `cua do window ls`) instead of the
/// primary display.
diff --git a/libs/cua/crates/cua-cli/src/util.rs b/libs/cua/crates/cua-cli/src/util.rs
index 6554bfef95..b950783cfd 100644
--- a/libs/cua/crates/cua-cli/src/util.rs
+++ b/libs/cua/crates/cua-cli/src/util.rs
@@ -7,6 +7,21 @@ use std::{
time::Duration,
};
+/// The "Cua Cloud has ended" error every removed Cua Cloud command and option
+/// fails with (exit code 4, like the SDK).
+pub fn cloud_ended() -> CuaError {
+ CuaError::Unsupported(cua_sandbox_core::CLOUD_ENDED.into())
+}
+
+/// The arguments of a removed Cua Cloud command, accepted and ignored so
+/// that a script still calling it fails with the one ended message instead
+/// of a parse error. Such commands are hidden: not in `--help` or the docs.
+#[derive(clap::Args, Clone, Debug, Default)]
+pub struct EndedArgs {
+ #[arg(trailing_var_arg = true, allow_hyphen_values = true)]
+ _args: Vec<String>,
+}
+
/// `~/.cua` (or `$CUA_HOME`).
pub fn cua_home() -> PathBuf {
cua_daemon::cua_home()
@@ -371,12 +386,7 @@ mod secret_tests {
] {
assert!(is_secret_header(h), "{h}");
}
- for h in [
- "x-cua-fleet-claim",
- "accept",
- "content-type",
- "mcp-session-id",
- ] {
+ for h in ["x-request-id", "accept", "content-type", "mcp-session-id"] {
assert!(!is_secret_header(h), "{h}");
}
assert_eq!(
@@ -389,7 +399,7 @@ mod secret_tests {
);
assert_eq!(header_for_display("x-api-key", "sk-123", false), "****");
assert_eq!(header_for_display("x-api-key", "", false), "");
- assert_eq!(header_for_display("x-cua-fleet-claim", "box", false), "box");
+ assert_eq!(header_for_display("x-request-id", "box", false), "box");
// A scheme-less value with spaces is masked whole.
assert_eq!(mask_secret("a/b c"), "****");
}
diff --git a/libs/cua/crates/cua-cli/tests/auth.rs b/libs/cua/crates/cua-cli/tests/auth.rs
index 6f8f492105..114cc72bad 100644
--- a/libs/cua/crates/cua-cli/tests/auth.rs
+++ b/libs/cua/crates/cua-cli/tests/auth.rs
@@ -1,9 +1,7 @@
-//! `cua auth`, `cua wif-token` against a fake OIDC issuer, a fake GitHub
-//! OIDC endpoint and the fake Fleet API.
+//! `cua auth` against a fake OIDC issuer.
mod common;
use common::*;
-use cua_fleet::testing::FakeFleet;
use serde_json::json;
use std::sync::{
Arc,
@@ -72,16 +70,11 @@ async fn fake_issuer() -> FakeHttp {
}
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
-async fn device_login_session_drives_fleet_then_refresh_and_logout() {
+async fn device_login_then_status_and_logout() {
let issuer = fake_issuer().await;
- let fake = FakeFleet::new();
- fake.add_namespace("team-a");
- fake.add_namespace("team-b");
- let fleet = cua_daemon::fixtures::start_fleet_http(fake.clone()).await;
let mut h = Home::new();
h.set("CUA_OIDC_ISSUER", &issuer.url)
- .set("CUA_OIDC_POLL_UNIT_MS", "5")
- .set("CUA_FLEET_BASE_URL", &fleet.base_url);
+ .set("CUA_OIDC_POLL_UNIT_MS", "5");
let o = h.run(&["auth", "status"]).await;
assert_eq!(o.code, 1);
@@ -114,28 +107,6 @@ async fn device_login_session_drives_fleet_then_refresh_and_logout() {
o.ok();
assert!(o.stdout.contains("Access token expires"), "{o:?}");
- // whoami with no env credentials uses the session token against Fleet.
- let o = h.run(&["--json", "auth", "whoami"]).await;
- o.ok();
- let v = o.json();
- assert_eq!(v["source"], "cua auth login session");
- assert_eq!(v["user"], "tester");
- assert_eq!(v["namespaces"], 2);
- let access = creds["access_token"].as_str().unwrap();
- assert!(fake.requests().iter().any(|r| r.path == "/api/namespaces"
- && r.header("authorization") == Some(&format!("Bearer {access}"))));
-
- // An expired session refreshes and persists the new token.
- let mut expired = creds.clone();
- expired["expires_at"] = json!("2020-01-01T00:00:00+00:00");
- std::fs::write(&cred_file, expired.to_string()).unwrap();
- let o = h.run(&["auth", "status"]).await;
- assert!(o.stdout.contains("expired"), "{o:?}");
- h.run(&["auth", "whoami"]).await.ok();
- let refreshed = read_json(&cred_file);
- assert_ne!(refreshed["access_token"], creds["access_token"]);
- assert_eq!(refreshed["refresh_token"], "rt-1", "refresh token kept");
-
let o = h.run(&["auth", "logout"]).await;
o.ok();
assert!(o.stdout.contains("Logged out."));
@@ -150,107 +121,285 @@ async fn device_login_session_drives_fleet_then_refresh_and_logout() {
assert!(o.stdout.contains("Not logged in."));
}
+/// Stores a signed-in session (the file store) holding `access_token`.
+fn sign_in(h: &Home, access_token: &str) {
+ let expires = (chrono::Utc::now() + chrono::Duration::hours(1)).to_rfc3339();
+ std::fs::create_dir_all(h.cua_home()).unwrap();
+ std::fs::write(
+ h.cua_home().join("credentials.json"),
+ json!({"access_token": access_token, "refresh_token": "rt-1", "expires_at": expires})
+ .to_string(),
+ )
+ .unwrap();
+}
+
+/// A fake Cua API (`GET /v1/me`) for the account behind `token`.
+async fn fake_cua_api(token: &str) -> FakeHttp {
+ let bearer = format!("Bearer {token}");
+ FakeHttp::start(move |r| {
+ if r.method == "GET"
+ && r.path == "/v1/me"
+ && r.headers.get("authorization") == Some(&bearer)
+ {
+ (
+ 200,
+ json!({"sub": "u-ada", "email": "[email protected]",
+ "orgs": [{"id": "o-1", "alias": "aigis", "name": "AIGIS", "role": "owner"}],
+ "entitlements": {"plan": "pro", "status": "active", "warnings": []}}),
+ )
+ } else {
+ (401, json!({"error": "unauthorized"}))
+ }
+ })
+ .await
+}
+
+fn ada_token() -> String {
+ jwt(json!({
+ "preferred_username": "ada", "email": "[email protected]", "sub": "u-ada",
+ "azp": "cua-cli", "iss": "https://auth.cua.test/realms/cyclops-cs",
+ "exp": 4_102_444_800_i64,
+ }))
+}
+
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
-async fn whoami_reports_client_credentials_and_workload_tokens() {
+async fn whoami_reads_the_cua_sign_in_and_only_calls_the_cua_api() {
+ let token = ada_token();
+ let api = fake_cua_api(&token).await;
+ // The identity provider is never asked: the token is still valid.
let issuer = fake_issuer().await;
- let fake = FakeFleet::new();
- fake.add_namespace("ns1");
- let fleet = cua_daemon::fixtures::start_fleet_http(fake.clone()).await;
let mut h = Home::new();
- h.set("CUA_FLEET_BASE_URL", &fleet.base_url);
-
- let o = h.run(&["auth", "whoami"]).await;
- assert_eq!(o.code, 1);
- assert!(o.stdout.contains("Not authenticated"), "{o:?}");
+ h.set("CUA_SPACES_API_URL", &api.url)
+ .set("CUA_OIDC_ISSUER", &issuer.url);
+ sign_in(&h, &token);
- h.set("CUA_CLIENT_ID", "ukey-test")
- .set("CUA_CLIENT_SECRET", "s3cret")
- .set("CUA_TOKEN_URL", format!("{}/token", issuer.url));
let o = h.run(&["auth", "whoami"]).await;
o.ok();
- assert!(o.stdout.contains("client credentials (ukey-test)"), "{o:?}");
- assert!(o.stdout.contains("Namespaces: 1"), "{o:?}");
- assert!(!o.stdout.contains("s3cret") && !o.stderr.contains("s3cret"));
- let cc = issuer
- .requests()
- .into_iter()
- .find(|r| r.form("grant_type").as_deref() == Some("client_credentials"));
- assert!(cc.is_some(), "client-credentials grant used");
-
- h.set("FLEETS_TOKEN", "workload-token");
- let o = h.run(&["--json", "auth", "whoami"]).await;
- o.ok();
- assert_eq!(o.json()["source"], "FLEETS_TOKEN");
assert!(
- fake.requests()
- .iter()
- .any(|r| r.header("authorization") == Some("Bearer workload-token"))
+ o.stdout
+ .starts_with("Logged in to Cua as ada ([email protected]).\n"),
+ "{o:?}"
+ );
+ for line in [
+ "Plan: pro",
+ "Teams: 1",
+ "Client: cua-cli",
+ "Expires: 2100-01-01T00:00:00+00:00",
+ ] {
+ assert!(o.stdout.contains(line), "{line}: {o:?}");
+ }
+ let v = {
+ let o = h.run(&["--json", "auth", "whoami"]).await;
+ o.ok();
+ o.json()
+ };
+ assert_eq!(
+ v,
+ json!({"authenticated": true, "user": "ada", "email": "[email protected]",
+ "subject": "u-ada", "client": "cua-cli",
+ "issuer": "https://auth.cua.test/realms/cyclops-cs",
+ "expires_at": "2100-01-01T00:00:00+00:00", "plan": "pro", "teams": 1})
);
+ // Nothing else was called: the fake API saw the two `/v1/me` reads, with
+ // the session's token, and the identity provider none.
+ let reqs = api.requests();
+ assert_eq!(reqs.len(), 2, "{reqs:?}");
+ assert!(reqs.iter().all(|r| r.path == "/v1/me"), "{reqs:?}");
+ assert!(issuer.requests().is_empty(), "{:?}", issuer.requests());
+ for text in [&o.stdout, &o.stderr] {
+ for gone in ["Fleet", "Namespaces", "Credential", "run.cua.ai"] {
+ assert!(!text.contains(gone), "{gone}: {o:?}");
+ }
+ }
}
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
-#[ignore = "Cua Cloud has ended (CUA-1854); removed with the Fleet provider"]
-async fn fleet_user_api_keys() {
- let fake = FakeFleet::new();
- let fleet = cua_daemon::fixtures::start_fleet_http(fake.clone()).await;
+async fn whoami_without_a_session_says_so() {
+ let h = Home::new();
+ let o = h.run(&["auth", "whoami"]).await;
+ assert_eq!(o.code, 1, "{o:?}");
+ assert_eq!(o.stdout, "Not logged in. Run 'cua auth login'.\n");
+ let o = h.run(&["--json", "auth", "whoami"]).await;
+ assert_eq!(o.code, 1, "{o:?}");
+ assert_eq!(o.json(), json!({"authenticated": false}));
+ // The old Fleet credentials are not a Cua sign-in any more.
let mut h = Home::new();
- h.set("CUA_FLEET_BASE_URL", &fleet.base_url)
- .set("FLEETS_TOKEN", "t");
- let o = h.run(&["auth", "keys", "ls"]).await;
- o.ok();
- assert!(o.stdout.contains("No API keys."));
- let o = h
- .run(&["auth", "keys", "create", "ci", "--scope", "sandboxes"])
- .await;
- o.ok();
- assert!(o.stdout.contains("CUA_CLIENT_ID=ukey-fake1"), "{o:?}");
- assert!(o.stdout.contains("CUA_CLIENT_SECRET=secret-1"), "{o:?}");
- let o = h.run(&["--json", "auth", "keys", "ls"]).await;
- o.ok();
- assert_eq!(o.json()[0]["name"], "ci");
- h.run(&["auth", "keys", "rm", "key-1"]).await.ok();
- assert!(fake.user_keys().is_empty());
- let o = h.run(&["auth", "keys", "rm", "key-1"]).await;
- assert_ne!(o.code, 0);
+ h.set("FLEETS_TOKEN", "t")
+ .set("CUA_CLIENT_ID", "ukey-x")
+ .set("CUA_CLIENT_SECRET", "s3cret");
+ let o = h.run(&["auth", "whoami"]).await;
+ assert_eq!(o.code, 1, "{o:?}");
+ assert!(o.stdout.contains("Not logged in"), "{o:?}");
}
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
-async fn wif_token_github_prints_only_the_token() {
- let gh = FakeHttp::start(|r| {
- if r.headers.get("authorization").map(String::as_str) != Some("bearer req-token") {
- return (401, json!({}));
- }
- if !r.path.contains("audience=fleets") || !r.path.contains("api-version=2.0") {
- return (400, json!({"path": r.path}));
- }
- (200, json!({"value": "gh-oidc-jwt"}))
- })
- .await;
+async fn whoami_keeps_the_claims_when_the_cua_api_is_down_and_fails_when_it_refuses() {
+ let token = ada_token();
let mut h = Home::new();
- let o = h.run(&["wif-token", "github"]).await;
- assert_eq!(o.code, 4, "{o:?}");
+ sign_in(&h, &token);
+ // Nothing listens on port 9.
+ h.set("CUA_SPACES_API_URL", "http://127.0.0.1:9");
+ let o = h.run(&["auth", "whoami"]).await;
+ o.ok();
assert!(
- o.stderr.contains("ACTIONS_ID_TOKEN_REQUEST_URL is missing"),
+ o.stdout
+ .starts_with("Logged in to Cua as ada ([email protected]).\n"),
"{o:?}"
);
- h.set(
- "ACTIONS_ID_TOKEN_REQUEST_URL",
- format!("{}/token?api-version=2.0&audience=other", gh.url),
- );
- let o = h.run(&["wif-token", "github"]).await;
assert!(
- o.stderr
- .contains("ACTIONS_ID_TOKEN_REQUEST_TOKEN is missing"),
+ o.stdout.contains("the Cua API could not be reached"),
"{o:?}"
);
- h.set("ACTIONS_ID_TOKEN_REQUEST_TOKEN", "req-token");
- let o = h.run(&["wif-token", "github"]).await;
+ assert!(!o.stdout.contains("Plan:"), "{o:?}");
+ let o = h.run(&["--json", "auth", "whoami"]).await;
+ o.ok();
+ assert_eq!(o.json()["user"], "ada");
+ assert!(o.json()["plan"].is_null() && o.json()["teams"].is_null());
+
+ // A refused session (401): the same unauthenticated failure as every
+ // other command (exit 6), with nothing printed on stdout.
+ let api = fake_cua_api("another-token").await;
+ h.set("CUA_SPACES_API_URL", &api.url);
+ let o = h.run(&["auth", "whoami"]).await;
+ assert_eq!(o.code, 6, "{o:?}");
+ assert!(o.stdout.is_empty(), "{o:?}");
+ assert!(o.stderr.contains("no longer valid"), "{o:?}");
+}
+
+#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
+async fn status_and_whoami_say_logged_in_to_cua_not_run_cua_ai() {
+ let token = ada_token();
+ let api = fake_cua_api(&token).await;
+ let mut h = Home::new();
+ h.set("CUA_SPACES_API_URL", &api.url);
+ sign_in(&h, &token);
+ for args in [
+ &["auth", "status"][..],
+ &["--json", "auth", "status"],
+ &["auth", "whoami"],
+ &["--json", "auth", "whoami"],
+ ] {
+ let o = h.run(args).await;
+ o.ok();
+ for text in [&o.stdout, &o.stderr] {
+ assert!(
+ !text.contains("run.cua.ai") && !text.contains("Fleet"),
+ "{args:?}: {o:?}"
+ );
+ }
+ }
+ let o = h.run(&["auth", "status"]).await;
+ assert!(o.stdout.contains("Logged in to Cua."), "{o:?}");
+ let o = h.run(&["auth", "whoami"]).await;
+ assert!(o.stdout.starts_with("Logged in to Cua as "), "{o:?}");
+}
+
+/// Commands and options of the ended Cua Cloud stay as hidden stubs: each
+/// fails with the one ended message (exit 4) and they are not in `--help`.
+#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
+async fn removed_cloud_commands_fail_with_the_ended_message() {
+ let h = Home::new();
+ // The error as every command prints it (exit 4, "not supported").
+ let ended = format!("cua: unsupported: {}\n", cua_sandbox_core::CLOUD_ENDED);
+ let families: [(&str, &[&[&str]]); 6] = [
+ (
+ "fleet",
+ &[
+ &["fleet", "pools", "ls"],
+ &["fleet", "pools", "gc", "--idle", "2h"],
+ &["fleet", "pool", "export", "ci", "--terraform"],
+ &["--json", "fleet"],
+ &["fleet", "--help"],
+ ],
+ ),
+ (
+ "pools",
+ &[&["pools", "ls"], &["pools", "gc", "--idle", "1h"]],
+ ),
+ (
+ "auth keys",
+ &[
+ &["auth", "keys", "ls"],
+ &["auth", "keys", "create", "ci", "--scope", "sandboxes"],
+ &["auth", "keys", "rm", "key-1"],
+ ],
+ ),
+ (
+ "image",
+ &[
+ &["image", "ls"],
+ &["img", "list", "--namespace", "ns"],
+ &["image", "info", "desktop"],
+ &["image", "rm", "desktop", "--force"],
+ &["image", "delete", "desktop"],
+ &["image", "create", "-f", "image.json"],
+ ],
+ ),
+ (
+ "sandbox",
+ &[
+ &["sb", "keep-alive", "dev", "--for", "2h"],
+ &["sandbox", "keep-alive", "cloud:dev"],
+ &["sb", "ls", "--cloud"],
+ &["sb", "info", "dev", "--cloud"],
+ &["sb", "exec", "--cloud", "dev", "true"],
+ ],
+ ),
+ ("wif-token", &[&["wif-token", "github"]]),
+ ];
+ for (family, runs) in families {
+ for args in runs {
+ let mut full = vec!["--embedded"];
+ full.extend_from_slice(args);
+ let o = h.run(&full).await;
+ assert_eq!(o.code, 4, "{family} {args:?}: {o:?}");
+ assert!(o.stdout.is_empty(), "{family} {args:?}: {o:?}");
+ assert_eq!(o.stderr, ended, "{family} {args:?}: {o:?}");
+ }
+ }
+}
+
+/// The stubs are hidden: not in the top-level or group help.
+#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
+async fn removed_cloud_commands_are_not_in_help() {
+ let h = Home::new();
+ let lists = |help: &str, name: &str| {
+ help.lines()
+ .any(|l| l.split_whitespace().next() == Some(name))
+ };
+ for (args, hidden) in [
+ (&["--help"][..], &["fleet", "pools", "wif-token"][..]),
+ (&["auth", "--help"], &["keys"]),
+ (
+ &["image", "--help"],
+ &["ls", "info", "rm", "create", "list"],
+ ),
+ (&["sb", "--help"], &["keep-alive"]),
+ ] {
+ let o = h.run(args).await;
+ o.ok();
+ for name in hidden {
+ assert!(
+ !lists(&o.stdout, name),
+ "{args:?} lists {name}: {}",
+ o.stdout
+ );
+ }
+ }
+ let o = h.run(&["sb", "create", "--help"]).await;
+ o.ok();
+ for flag in [
+ "--pool",
+ "--apply",
+ "--warm",
+ "--claim-ttl",
+ "--max-pool-size",
+ ] {
+ assert!(!o.stdout.contains(flag), "{flag}: {}", o.stdout);
+ }
+ let o = h.run(&["sb", "ls", "--help"]).await;
o.ok();
- assert_eq!(o.stdout, "gh-oidc-jwt\n");
- h.set("ACTIONS_ID_TOKEN_REQUEST_TOKEN", "wrong");
- let o = h.run(&["wif-token", "github"]).await;
- assert_ne!(o.code, 0);
- assert!(o.stderr.contains("HTTP 401"), "{o:?}");
+ assert!(!o.stdout.contains("--cloud"), "{}", o.stdout);
}
#[tokio::test]
diff --git a/libs/cua/crates/cua-cli/tests/mcp_skills_images.rs b/libs/cua/crates/cua-cli/tests/mcp_skills_images.rs
index 011f651b3c..e532ea5e7d 100644
--- a/libs/cua/crates/cua-cli/tests/mcp_skills_images.rs
+++ b/libs/cua/crates/cua-cli/tests/mcp_skills_images.rs
@@ -1,9 +1,8 @@
-//! `cua mcp`, `cua skills`, `cua trajectory` and Fleet `cua image`.
+//! `cua mcp`, `cua skills`, and `cua trajectory`.
mod common;
use common::*;
use cua_daemon::fixtures;
-use cua_fleet::testing::FakeFleet;
use serde_json::{Value, json};
use std::time::Duration;
use tokio::io::{AsyncBufReadExt, AsyncWriteExt, BufReader};
@@ -579,57 +578,6 @@ async fn trajectory_view_serves_the_zip_with_cors_then_stops() {
assert!(o.stdout.contains("No trajectory sessions found."), "{o:?}");
}
-#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
-#[ignore = "Cua Cloud has ended (CUA-1854); removed with the Fleet provider"]
-async fn fleet_image_resources() {
- let fake = FakeFleet::new();
- fake.put_object(
- "image",
- "ns1",
- "desktop",
- json!({"apiVersion": "images.cua.ai/v1alpha1", "kind": "Image",
- "metadata": {"name": "desktop", "namespace": "ns1", "creationTimestamp": "2026-09-01T00:00:00Z"},
- "status": {"phase": "Ready"}}),
- );
- fake.add_namespace("ns2");
- let fleet = fixtures::start_fleet_http(fake.clone()).await;
- let mut h = Home::new();
- h.set("CUA_FLEET_BASE_URL", &fleet.base_url)
- .set("FLEETS_TOKEN", "t");
- let o = h.run(&["image", "ls"]).await;
- o.ok();
- assert!(
- o.stdout.contains("desktop ns1 Ready 2026-09-01"),
- "{o:?}"
- );
- let o = h
- .run(&["--json", "img", "list", "--namespace", "ns2"])
- .await;
- assert_eq!(o.json(), json!([]));
- let o = h.run(&["image", "info", "desktop"]).await;
- o.ok();
- assert_eq!(o.json()["status"]["phase"], "Ready");
- let manifest = h.dir.path().join("img.json");
- std::fs::write(&manifest, json!({"apiVersion": "images.cua.ai/v1alpha1", "kind": "Image", "metadata": {"name": "built"}, "spec": {}}).to_string()).unwrap();
- h.run(&[
- "image",
- "create",
- "-f",
- manifest.to_str().unwrap(),
- "--namespace",
- "ns2",
- ])
- .await
- .ok();
- assert!(fake.exists("image", "ns2", "built"));
- let o = h.run(&["image", "rm", "desktop"]).await;
- assert_eq!(o.code, 1, "needs --force non-interactively: {o:?}");
- h.run(&["image", "delete", "desktop", "--force"]).await.ok();
- assert!(!fake.exists("image", "ns1", "desktop"));
- let o = h.run(&["image", "info", "desktop"]).await;
- assert_eq!(o.code, 3, "{o:?}");
-}
-
/// A Space another account shared through the relay (CUA-1418): the guest
/// drives `relay:<id>` with the `computer_*` MCP tools and `cua do`, which
/// resolve it through the Spaces API, not the sandboxes API ("not supported
diff --git a/libs/cua/crates/cua-cli/tests/sandbox_do.rs b/libs/cua/crates/cua-cli/tests/sandbox_do.rs
index ab418ef5c5..4643d2eee3 100644
--- a/libs/cua/crates/cua-cli/tests/sandbox_do.rs
+++ b/libs/cua/crates/cua-cli/tests/sandbox_do.rs
@@ -1,11 +1,9 @@
-#![allow(deprecated)] // also exercises the deprecated `apply_pool` wrapper
//! `cua sandbox` and `cua do` against the mock spacesd (direct
-//! sandboxes), relay Spaces, and the fake Fleet API.
+//! sandboxes), and relay Spaces.
mod common;
use common::*;
use cua_daemon::fixtures;
-use cua_fleet::testing::FakeFleet;
use cua_host::testing::FakeRelay;
use serde_json::json;
@@ -38,8 +36,7 @@ async fn sandbox_lifecycle_exec_and_compat_aliases() {
h.set("DOCKER_HOST", "unix:///nonexistent/cua-test-no-docker.sock");
direct(&h, &env.url, "dev").await;
- // `ls` lists everything with its location (no Fleet credentials here:
- // no cloud rows and no warning); a direct URL is not local.
+ // `ls` lists everything with its location (no warning); a direct URL is not local.
let o = h.run(&["--embedded", "--json", "sb", "ls"]).await;
o.ok();
assert_eq!(o.json()[0]["name"], "dev");
@@ -54,16 +51,6 @@ async fn sandbox_lifecycle_exec_and_compat_aliases() {
.await;
o.ok();
assert_eq!(o.json(), serde_json::json!([]));
- // --cloud without credentials: empty, with the reason, exit 0.
- let o = h
- .run(&["--embedded", "--json", "sb", "ls", "--cloud"])
- .await;
- o.ok();
- assert_eq!(o.json(), serde_json::json!([]));
- assert!(
- o.stderr.contains("warning: cloud sandboxes not listed:"),
- "{o:?}"
- );
// `list` alias and `get` alias.
let o = h.run(&["--embedded", "sandbox", "list"]).await;
o.ok();
@@ -149,22 +136,9 @@ async fn sandbox_lifecycle_exec_and_compat_aliases() {
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn launch_validates_arguments() {
let h = Home::new();
- let o = h
- .run(&[
- "--embedded",
- "sb",
- "launch",
- "linux",
- "--pool",
- "p",
- "--name",
- "x",
- ])
- .await;
- assert_eq!(o.code, 2, "{o:?}");
- let o = h.run(&["--embedded", "sb", "launch", "--pool", "p"]).await;
+ let o = h.run(&["--embedded", "sb", "launch", "--name", "x"]).await;
assert_eq!(o.code, 2, "{o:?}");
- assert!(o.stderr.contains("--name is required"), "{o:?}");
+ assert!(o.stderr.contains("specify IMAGE"), "{o:?}");
let o = h
.run(&[
"--embedded",
@@ -178,83 +152,23 @@ async fn launch_validates_arguments() {
])
.await;
assert_eq!(o.code, 2, "{o:?}");
- // Cua Cloud has ended: launch's cloud default and --pool fail with it.
- let o = h
- .run(&["--embedded", "sb", "launch", "--pool", "p", "--name", "x"])
- .await;
- assert_eq!(o.code, 4, "{o:?}");
- assert!(o.stderr.contains("Cua Cloud has ended"), "{o:?}");
-}
-
-#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
-#[ignore = "Cua Cloud has ended (CUA-1854); removed with the Fleet provider"]
-async fn fleet_pool_launch_list_suspend_and_release() {
- let fake = FakeFleet::new();
- let fleet = fixtures::start_fleet_http(fake.clone()).await;
- fake.client()
- .apply_pool(&cua_fleet::PoolSpec::new(
- "smoke-pool",
- "ghcr.io/trycua/cua-desktop-linux:test",
- ))
- .await
- .unwrap();
- let mut h = Home::new();
- h.set("CUA_FLEET_BASE_URL", &fleet.base_url)
- .set("FLEETS_TOKEN", "fake-fleet-token");
-
- let o = h
- .run(&[
- "--embedded",
- "--json",
- "sb",
- "launch",
- "--pool",
- "smoke-pool",
- "--name",
- "claim-1",
- ])
- .await;
- o.ok();
- assert_eq!(o.json(), json!({"name": "claim-1", "status": "ready"}));
- assert!(fake.exists("claim", "smoke-pool", "claim-1"));
-
- // Live Fleet listing (the Python CLI could not list Fleet sandboxes).
- let o = h
- .run(&["--embedded", "--json", "sb", "ls", "--cloud"])
- .await;
- o.ok();
- let rows = o.json();
- assert!(
- rows.as_array()
- .unwrap()
- .iter()
- .any(|r| r["name"] == "claim-1" && r["location"] == "cloud"),
- "{rows}"
- );
-
- // `sb suspend <pool>` (used by the scheduled smoke) scales the pool.
- h.run(&["--embedded", "sb", "suspend", "smoke-pool"])
- .await
- .ok();
- let pool = fake.object("pool", "smoke-pool", "smoke-pool").unwrap();
- assert_eq!(pool["spec"]["replicas"], 0);
- h.run(&["--embedded", "sb", "resume", "smoke-pool"])
- .await
- .ok();
- assert_eq!(
- fake.object("pool", "smoke-pool", "smoke-pool").unwrap()["spec"]["replicas"],
- 1
- );
- let o = h.run(&["--embedded", "sb", "info", "smoke-pool"]).await;
- o.ok();
- assert!(o.stdout.contains("(dedicated cloud capacity)"), "{o:?}");
-
- h.run(&["--embedded", "sb", "delete", "claim-1", "--force"])
- .await
- .ok();
- assert!(!fake.exists("claim", "smoke-pool", "claim-1"));
- let o = h.run(&["--embedded", "sb", "suspend", "nope"]).await;
- assert_eq!(o.code, 3, "{o:?}");
+ // The options of the ended Cua Cloud still parse (hidden) and fail with
+ // the one message.
+ for args in [
+ &["--pool", "p", "--name", "x"][..],
+ &["linux", "--pool", "p"],
+ &["linux", "--warm"],
+ &["linux", "--claim-ttl", "15m"],
+ ] {
+ let o = h
+ .run(&[&["--embedded", "sb", "launch"][..], args].concat())
+ .await;
+ assert_eq!(o.code, 4, "{args:?}: {o:?}");
+ assert!(
+ o.stderr.contains(cua_sandbox_core::CLOUD_ENDED),
+ "{args:?}: {o:?}"
+ );
+ }
}
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
@@ -859,95 +773,32 @@ async fn sandbox_mcp_tools_call_and_content() {
assert!(o.json()["protocolVersion"].as_str().is_some(), "{o:?}");
}
-/// The default `sb ls` reads the signed-in session from the OS credential
-/// vault only when the session marker says one is stored (a stand-in vault
-/// here; it counts its reads).
+/// `sb ls` lists what this machine knows: it never reads the signed-in
+/// session from the OS credential vault (a stand-in vault here; it counts its
+/// reads).
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
-#[ignore = "Cua Cloud has ended (CUA-1854); removed with the Fleet provider"]
-async fn default_ls_reads_a_keychain_session_only_with_the_marker() {
- let fake = FakeFleet::new();
- let fleet = fixtures::start_fleet_http(fake.clone()).await;
- fake.client()
- .apply_pool(&cua_fleet::PoolSpec::new(
- "marker-pool",
- "ghcr.io/trycua/cua-desktop-linux:test",
- ))
- .await
- .unwrap();
- // Another machine holds the claim: only a live Fleet listing shows it.
- let mut other = Home::new();
- other
- .set("CUA_FLEET_BASE_URL", &fleet.base_url)
- .set("FLEETS_TOKEN", "fake-fleet-token");
- other
- .run(&[
- "--embedded",
- "sb",
- "launch",
- "--pool",
- "marker-pool",
- "--name",
- "held-elsewhere",
- ])
- .await
- .ok();
-
+async fn sb_ls_never_reads_the_credential_vault() {
let vault = tempfile::tempdir().unwrap();
let mut h = Home::new();
- h.set("CUA_FLEET_BASE_URL", &fleet.base_url).set(
+ h.set(
"CUA_CREDENTIAL_STORE",
format!("test-keychain:{}", vault.path().display()),
);
- // A signed-in session in the (stand-in) vault, stored before markers.
+ // A signed-in session in the (stand-in) vault.
let expires = (chrono::Utc::now() + chrono::Duration::hours(1)).to_rfc3339();
std::fs::write(
vault.path().join("vault.json"),
- json!({"access_token": "fake-fleet-token", "expires_at": expires}).to_string(),
+ json!({"access_token": "a-session-token", "expires_at": expires}).to_string(),
)
.unwrap();
- let reads = || {
- std::fs::read_to_string(vault.path().join("reads"))
- .ok()
- .and_then(|s| s.trim().parse::<u64>().ok())
- .unwrap_or(0)
- };
- let names = |o: &Out| -> Vec<String> {
- o.json()
- .as_array()
- .unwrap()
- .iter()
- .map(|r| r["name"].as_str().unwrap_or_default().to_string())
- .collect()
- };
-
- // No marker: the vault is never probed and no cloud rows are listed.
let o = h.run(&["--embedded", "--json", "sb", "ls"]).await;
o.ok();
- assert!(!names(&o).contains(&"held-elsewhere".to_string()), "{o:?}");
- assert_eq!(reads(), 0, "the vault was read without a marker");
-
- // An explicit cloud listing reads the session and writes the marker.
- let o = h
- .run(&["--embedded", "--json", "sb", "ls", "--cloud"])
- .await;
- o.ok();
- assert!(names(&o).contains(&"held-elsewhere".to_string()), "{o:?}");
- let marker = std::fs::read_to_string(h.cua_home().join("session.json")).unwrap();
- assert!(marker.contains("\"keychain\"") && !marker.contains("fake-fleet-token"));
-
- // With the marker, the default listing includes the cloud rows.
- let before = reads();
- let o = h.run(&["--embedded", "--json", "sb", "ls"]).await;
- o.ok();
- let rows = o.json();
- let row = rows
- .as_array()
- .unwrap()
- .iter()
- .find(|r| r["name"] == "held-elsewhere")
- .unwrap_or_else(|| panic!("{rows}"));
- assert_eq!(row["location"], "cloud");
- assert!(reads() > before);
+ assert_eq!(o.json(), json!([]), "{o:?}");
+ let reads = std::fs::read_to_string(vault.path().join("reads"))
+ .ok()
+ .and_then(|s| s.trim().parse::<u64>().ok())
+ .unwrap_or(0);
+ assert_eq!(reads, 0, "the vault was read by `sb ls`");
}
/// `cua do` drives a relay Space: switch, screenshot, click, type and shell
diff --git a/libs/cua/crates/cua-cli/tests/sandbox_on.rs b/libs/cua/crates/cua-cli/tests/sandbox_on.rs
index 8d8961f239..1deef38956 100644
--- a/libs/cua/crates/cua-cli/tests/sandbox_on.rs
+++ b/libs/cua/crates/cua-cli/tests/sandbox_on.rs
@@ -1,58 +1,11 @@
-//! `cua sb` with `--on`: managed Fleet pools (fake Fleet API plus a mock
-//! spacesd behind its gateway), `url:` direct sandboxes, the daemon that
-//! keeps Fleet claims alive, and argument validation for the local
-//! backends (nothing here starts a VM or container).
+//! `cua sb` with `--on`: `direct:` sandboxes and argument validation for the
+//! local backends (nothing here starts a VM or container).
mod common;
use common::*;
use cua_daemon::fixtures;
-use cua_fleet::testing::FakeFleet;
-use cua_sandbox_core::{CreateOptions, ProviderKind};
use serde_json::Value;
-/// A digest-pinned image: no registry lookups.
-const IMAGE: &str = "registry.example.com/cua-e2e-cli@sha256:0123";
-
-/// The managed pool the CLI will pick for `IMAGE` on gVisor with the
-/// default shape plus `extra` services.
-async fn managed_pool(extra: &[(&str, u16)]) -> String {
- cua_fleet::testing::install_image_fixtures();
- let mut o = CreateOptions::new(ProviderKind::Fleet, IMAGE);
- o.fleet.runtime = Some(cua_fleet::RuntimeKind::Gvisor);
- for (n, p) in extra {
- o.services.insert(n.to_string(), *p);
- }
- let tenant = cua_fleet::autopool::tenant_from_token(fixtures::FAKE_FLEET_TOKEN);
- cua_fleet::autopool::candidate_names(&tenant, &o.fleet_pool_key().await.unwrap().spec_hash())[0]
- .clone()
-}
-
-struct FleetWorld {
- fake: FakeFleet,
- _fleet: fixtures::FleetHttpFixture,
- _gw: fixtures::SpacesdFixture,
- pool: String,
- h: Home,
-}
-
-async fn fleet_world(claim: &str, extra: &[(&str, u16)]) -> FleetWorld {
- let pool = managed_pool(extra).await;
- let gw = fixtures::start_env(None, Some(fixtures::fake_gateway(&pool, claim))).await;
- let fake = FakeFleet::new();
- let fleet = fixtures::start_fleet_http_with_gateway(fake.clone(), Some(gw.url.clone())).await;
- let mut h = Home::new();
- h.set("CUA_FLEET_BASE_URL", &fleet.base_url)
- .set("FLEETS_TOKEN", fixtures::FAKE_FLEET_TOKEN)
- .set("CUA_FLEET_POOL_IDLE_GC", "off");
- FleetWorld {
- fake,
- _fleet: fleet,
- _gw: gw,
- pool,
- h,
- }
-}
-
/// A loopback echo server; returns its port.
async fn echo_server() -> u16 {
let l = tokio::net::TcpListener::bind("127.0.0.1:0").await.unwrap();
@@ -109,382 +62,6 @@ fn row<'a>(rows: &'a Value, name: &str) -> &'a Value {
.unwrap_or_else(|| panic!("{name} not in {rows}"))
}
-#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
-#[ignore = "Cua Cloud has ended (CUA-1854); removed with the Fleet provider"]
-async fn fleet_managed_pool_full_lifecycle() {
- let w = fleet_world("box", &[("web", 8080)]).await;
- let h = &w.h;
- let e = |args: &[&str]| {
- let mut v = vec!["--embedded", "--json", "sb"];
- v.extend_from_slice(args);
- v.into_iter().map(str::to_string).collect::<Vec<_>>()
- };
- let run = |args: Vec<String>| async move {
- let a: Vec<&str> = args.iter().map(String::as_str).collect();
- h.run(&a).await
- };
-
- // create --on cloud: no --pool, so shared capacity.
- let o = run(e(&[
- "create",
- IMAGE,
- "--on",
- "cloud",
- "--name",
- "box",
- "--kind",
- "container",
- "--port",
- "web=8080",
- "--max-pool-size",
- "4",
- "--claim-ttl",
- "10m",
- ]))
- .await;
- o.ok();
- let v = o.json();
- assert_eq!(
- (v["name"].as_str(), v["location"].as_str()),
- (Some("box"), Some("cloud"))
- );
- // How `auto` resolved is part of the output.
- assert_eq!(
- (v["kind"].as_str(), v["runtime"].as_str()),
- (Some("container"), Some("gvisor"))
- );
- assert!(o.stderr.contains("cua sb keep-alive cloud:box"), "{o:?}");
- assert_eq!(v["id"], "cloud:box");
- assert!(
- o.stderr
- .contains("Starting a cloud sandbox (first start of an image can take a few minutes)"),
- "{o:?}"
- );
- assert!(
- !o.stderr.contains("claim") && !o.stderr.contains("pool"),
- "{o:?}"
- );
- assert_eq!(v["location"], "cloud");
- assert!(v.get("where").is_none() && v.get("on").is_none(), "{v}");
- assert_eq!(v["status"], "ready");
- let p = w
- .fake
- .object("pool", &w.pool, &w.pool)
- .expect("managed pool");
- assert_eq!(p["spec"]["autoscaling"]["maxPoolSize"], 4);
- assert_eq!(p["spec"]["autoscaling"]["minPoolSize"], 0);
- let c = w.fake.object("claim", &w.pool, "box").unwrap();
- assert_eq!(c["spec"]["ttlSecondsAfterCreated"], 600);
-
- // ls --local leaves the cloud out.
- let o = run(e(&["ls", "--local"])).await;
- o.ok();
- let local = o.json();
- assert!(
- !local.as_array().unwrap().iter().any(|r| r["name"] == "box"),
- "{local}"
- );
- // ls (everything by default): pool and TTL remaining.
- let o = run(e(&["ls"])).await;
- o.ok();
- let rows = o.json();
- let r = row(&rows, "box");
- assert_eq!(r["location"], "cloud");
- assert_eq!(r["status"], "ready");
- // Fleet internals stay out of the portable fields.
- assert!(
- r.get("pool").is_none() && r.get("namespace").is_none(),
- "{r}"
- );
- assert_eq!(r["provider_details"]["pool"], w.pool.as_str());
- assert_eq!(r["provider_details"]["managed"], true);
- let left = r["expires_in_seconds"].as_u64().unwrap();
- assert!((500..=600).contains(&left), "{left}");
- let o = run(e(&["ls", "--cloud"])).await;
- row(&o.json(), "box");
-
- // exec / cp through the Fleet gateway.
- let o = h
- .run(&["--embedded", "sb", "exec", "box", "echo", "managed"])
- .await;
- o.ok();
- assert_eq!(o.stdout, "managed\n");
- // The driver answered uninitialized (bootstrap mode, as Fleet images
- // start): the CLI installed a token and keeps it owner-only.
- let state = h.cua_home().join("sandboxes").join("box.json");
- let st = read_json(&state);
- assert_eq!(st["env_token"].as_str().map(str::len), Some(32), "{st}");
- #[cfg(unix)]
- {
- use std::os::unix::fs::PermissionsExt as _;
- let mode = std::fs::metadata(&state).unwrap().permissions().mode() & 0o777;
- assert_eq!(mode, 0o600);
- }
- let local = h.dir.path().join("up.txt");
- std::fs::write(&local, b"hello fleet").unwrap();
- run(e(&["cp", local.to_str().unwrap(), "box:/tmp/up.txt"]))
- .await
- .ok();
- let back = h.dir.path().join("down.txt");
- let o = run(e(&["cp", "box:/tmp/up.txt", back.to_str().unwrap()])).await;
- o.ok();
- assert_eq!(o.json()["direction"], "download");
- assert_eq!(std::fs::read(&back).unwrap(), b"hello fleet");
-
- // keep-alive moves shutdownTime.
- let before =
- w.fake.object("claim", &w.pool, "box").unwrap()["spec"]["lifecycle"]["shutdownTime"]
- .clone();
- let o = run(e(&["keep-alive", "box", "--for", "2h"])).await;
- o.ok();
- let after =
- w.fake.object("claim", &w.pool, "box").unwrap()["spec"]["lifecycle"]["shutdownTime"]
- .clone();
- assert_ne!(before, after);
-
- // `sb view --service` (an image without cua-spacesd) and `sb url`:
- // signed service URLs; port-forward without the driver's tunnel: a
- // loopback proxy through the gateway.
- let o = h
- .run(&[
- "--embedded",
- "sb",
- "view",
- "box",
- "--service",
- "web",
- "--no-open",
- ])
- .await;
- o.ok();
- assert!(o.stdout.contains("https://signed.fleet.test/"), "{o:?}");
- let o = run(e(&["url", "box", "web"])).await;
- o.ok();
- assert!(
- o.json()["url"]
- .as_str()
- .unwrap()
- .starts_with("https://signed.fleet.test/"),
- "{o:?}"
- );
- let o = run(e(&["url", "box", "web", "--public", "--ttl", "10m"])).await;
- o.ok();
- assert!(o.json()["expires_at"].is_string(), "{o:?}");
-
- // `sb mcp config`: the Fleet bearer prints masked unless --show-secrets.
- let o = run(e(&["mcp", "box", "web", "config"])).await;
- o.ok();
- let v = o.json();
- assert_eq!(v["headers"]["authorization"], "Bearer ****", "{o:?}");
- assert_eq!(v["headers"]["x-cua-fleet-claim"], "box", "{o:?}");
- assert!(!o.stdout.contains(fixtures::FAKE_FLEET_TOKEN), "{o:?}");
- assert!(v["url"].as_str().unwrap().ends_with("/mcp"), "{o:?}");
- let o = run(e(&["mcp", "box", "web", "config", "--show-secrets"])).await;
- o.ok();
- assert_eq!(
- o.json()["headers"]["authorization"],
- format!("Bearer {}", fixtures::FAKE_FLEET_TOKEN),
- "{o:?}"
- );
- let o = run(e(&["port-forward", "box", "8080", "--no-wait"])).await;
- o.ok();
- assert!(
- o.json()["url"]
- .as_str()
- .unwrap()
- .starts_with("http://127.0.0.1:"),
- "{o:?}"
- );
- // With the driver's tunnel: a real loopback TCP forward over the
- // spacesd's /tunnel WebSocket, through the gateway.
- w._gw
- .mock
- .state
- .advertise(&[cua_spacesd_client::tunnel::TUNNEL_FORWARD_FEATURE]);
- let echo = echo_server().await;
- let mut child = h.spawn(&[
- "--embedded",
- "--json",
- "sb",
- "port-forward",
- "box",
- &echo.to_string(),
- ]);
- let local = forward_addr(&mut child).await;
- for i in 0..3u8 {
- assert_eq!(echo_through(&local, i).await, vec![b'a' + i; 4096]);
- }
- let _ = child.kill().await;
- let attaches = w._gw.mock.state.tunnel_attaches();
- assert_eq!(attaches.len(), 3, "{attaches:?}");
- for a in &attaches {
- assert!(a.accepted, "{a:?}");
- assert_eq!(a.claim.as_deref(), Some("box"));
- assert_eq!(
- a.authorization.as_deref(),
- Some(format!("Bearer {}", fixtures::FAKE_FLEET_TOKEN).as_str())
- );
- }
-
- // Fleet cannot suspend one sandbox and a shared pool is never resized:
- // suspend and restart fail with a typed error and leave the claim.
- let replicas = w.fake.object("pool", &w.pool, &w.pool).unwrap()["spec"]["replicas"].clone();
- for op in ["suspend", "restart"] {
- let o = h.run(&["--embedded", "sb", op, "box"]).await;
- assert_eq!(o.code, 4, "{o:?}");
- assert!(
- o.stderr.contains("cannot suspend a single sandbox"),
- "{o:?}"
- );
- }
- assert!(w.fake.exists("claim", &w.pool, "box"));
- // resume of a running claim reattaches.
- h.run(&["--embedded", "sb", "resume", "box"]).await.ok();
- let o = h
- .run(&["--embedded", "sb", "exec", "box", "echo", "back"])
- .await;
- o.ok();
- assert_eq!(o.stdout, "back\n");
- assert_eq!(
- w.fake.object("pool", &w.pool, &w.pool).unwrap()["spec"]["replicas"],
- replicas,
- "a shared pool is never resized"
- );
-
- // rm releases the claim; the pool stays for reuse, then GC removes it.
- h.run(&["--embedded", "sb", "rm", "box", "--force"])
- .await
- .ok();
- assert!(!w.fake.exists("claim", &w.pool, "box"));
- let o = h.run(&["--json", "fleet", "pools", "ls"]).await;
- o.ok();
- let pools = o.json();
- assert_eq!(pools[0]["name"], w.pool.as_str());
- assert_eq!(pools[0]["claims"], 0);
- let o = h.run(&["fleet", "pools", "ls"]).await;
- o.ok();
- assert!(
- o.stdout.contains(&w.pool) && o.stdout.contains("CLAIMS"),
- "{o:?}"
- );
- let o = h
- .run(&["--json", "fleet", "pools", "gc", "--idle", "0s"])
- .await;
- o.ok();
- assert_eq!(o.json()["deleted_pools"][0], w.pool.as_str());
- assert!(!w.fake.exists("pool", &w.pool, &w.pool));
-}
-
-#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
-#[ignore = "Cua Cloud has ended (CUA-1854); removed with the Fleet provider"]
-async fn launch_is_a_create_alias_on_fleet_with_generated_names() {
- let w = fleet_world("unused", &[]).await;
- let h = &w.h;
- // launch defaults to the cloud; no --name generates one. (This pinned
- // test image has no readable manifest, so the kind is given.)
- let o = h
- .run(&[
- "--embedded",
- "--json",
- "sb",
- "launch",
- IMAGE,
- "--kind",
- "container",
- "--cpu",
- "2",
- "--warm",
- ])
- .await;
- o.ok();
- let v = o.json();
- assert_eq!(v["status"], "ready");
- let name = v["name"].as_str().unwrap().to_string();
- assert!(name.starts_with("sb-"), "{name}");
- assert!(
- w.fake.exists("claim", &w.pool, &name),
- "{:?}",
- w.fake.all_namespaces()
- );
- let p = w.fake.object("pool", &w.pool, &w.pool).unwrap();
- assert_eq!(p["spec"]["replicas"], 1, "--warm");
- let t = w.fake.object("template", &w.pool, &w.pool).unwrap();
- assert_eq!(t["spec"]["vmTemplate"]["runtime"], "gvisor");
- // A second launch of the same image reuses the pool.
- let o = h
- .run(&[
- "--embedded",
- "--json",
- "sb",
- "launch",
- IMAGE,
- "--kind",
- "container",
- "--name",
- "two",
- ])
- .await;
- o.ok();
- assert!(w.fake.exists("claim", &w.pool, "two"));
- assert_eq!(
- w.fake
- .all_namespaces()
- .iter()
- .filter(|n| n.starts_with("cua-auto-"))
- .count(),
- 1
- );
- for n in [name.as_str(), "two"] {
- h.run(&["--embedded", "sb", "rm", n, "--force"]).await.ok();
- }
-}
-
-#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
-#[ignore = "Cua Cloud has ended (CUA-1854); removed with the Fleet provider"]
-async fn the_daemon_is_started_and_holds_fleet_claims() {
- let w = fleet_world("held", &[]).await;
- let mut h = w.h;
- struct Stop<'a>(&'a Home);
- impl Drop for Stop<'_> {
- fn drop(&mut self) {
- let mut c = std::process::Command::new(env!("CARGO_BIN_EXE_cua"));
- c.envs(&self.0.env).args(["daemon", "stop"]);
- let _ = c.output();
- }
- }
- h.set("CUA_DAEMON_NO_RELAY", "1");
- let _stop = Stop(&h);
- let o = h
- .run(&[
- "--json",
- "sb",
- "create",
- IMAGE,
- "--on",
- "cloud",
- "--kind",
- "container",
- "--name",
- "held",
- ])
- .await;
- o.ok();
- assert!(o.stderr.contains("cua daemon started"), "{o:?}");
- assert!(
- !o.stderr.contains("keep-alive"),
- "the daemon holds it: {o:?}"
- );
- assert!(w.fake.exists("claim", &w.pool, "held"));
- // The CLI has exited; the daemon renews the claim.
- let o = h.run(&["daemon", "status"]).await;
- o.ok();
- let o = h.run(&["sb", "exec", "held", "echo", "via-daemon"]).await;
- o.ok();
- assert_eq!(o.stdout, "via-daemon\n");
- h.run(&["sb", "rm", "held", "--force"]).await.ok();
- assert!(!w.fake.exists("claim", &w.pool, "held"));
-}
-
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn url_sandboxes_and_uniform_ops() {
let env = fixtures::start_env(Some("t"), None).await;
@@ -514,10 +91,8 @@ async fn url_sandboxes_and_uniform_ops() {
let o = h
.run(&["--embedded", "--json", "sb", "ls", "--cloud"])
.await;
- assert!(
- o.code != 0 || !o.stdout.contains("\"dev\""),
- "--cloud leaves direct sandboxes out: {o:?}"
- );
+ assert_eq!(o.code, 4, "--cloud is the ended Cua Cloud: {o:?}");
+ assert!(o.stderr.contains(cua_sandbox_core::CLOUD_ENDED), "{o:?}");
// cp both ways.
let f = h.dir.path().join("a.bin");
std::fs::write(&f, [7u8; 4096]).unwrap();
@@ -591,7 +166,7 @@ async fn url_sandboxes_and_uniform_ops() {
assert!(o.stderr.contains("no console log"), "{o:?}");
let o = h.run(&["--embedded", "sb", "logs", "dev", "-n", "5"]).await;
o.ok();
- // Fleet-only verbs name the backend.
+ // A removed Cua Cloud verb fails with the ended message.
let o = h.run(&["--embedded", "sb", "keep-alive", "dev"]).await;
assert_eq!(o.code, 4, "{o:?}");
// The token is remembered under the name and the direct ref...
@@ -688,6 +263,44 @@ async fn create_validates_on_and_flags() {
.await;
assert_eq!(o.code, 4, "{o:?}");
assert!(o.stderr.contains("Cua Cloud has ended"), "{o:?}");
+ // The other options of the ended cloud still parse (hidden) and fail the same way.
+ for args in [
+ &["img", "--apply"][..],
+ &["img", "--warm"],
+ &["img", "--no-warm"],
+ &["img", "--max-pool-size", "3"],
+ &["img", "--claim-ttl", "15m"],
+ &["--pool", "p", "--apply"],
+ ] {
+ let o = h
+ .run(&[&["--embedded", "sb", "create"][..], args].concat())
+ .await;
+ assert_eq!(o.code, 4, "{args:?}: {o:?}");
+ assert!(
+ o.stderr.contains(cua_sandbox_core::CLOUD_ENDED),
+ "{args:?}: {o:?}"
+ );
+ }
+ let o = h
+ .run(&["--embedded", "sb", "create", "--on", "local"])
+ .await;
+ assert_eq!(o.code, 2, "{o:?}");
+ assert!(
+ o.stderr.contains("IMAGE is required for --on local"),
+ "{o:?}"
+ );
+ // An existing machine takes no image.
+ let o = h
+ .run(&[
+ "--embedded",
+ "sb",
+ "create",
+ "img",
+ "--on",
+ "direct:127.0.0.1:1",
+ ])
+ .await;
+ assert_eq!(o.code, 2, "{o:?}");
// The flags `create` never shipped are gone.
for gone in ["--vm", "--container", "--provider", "--url", "--local"] {
let o = h.run(&["--embedded", "sb", "create", "img", gone]).await;
@@ -704,10 +317,6 @@ async fn create_validates_on_and_flags() {
"--disk",
"--port",
"--wait",
- "--warm",
- "--max-pool-size",
- "--claim-ttl",
- "--pool",
"--token",
"--name",
] {
@@ -718,15 +327,7 @@ async fn create_validates_on_and_flags() {
}
let o = h.run(&["sb", "launch", "--help"]).await;
o.ok();
- for flag in [
- "--warm",
- "--max-pool-size",
- "--claim-ttl",
- "--kind",
- "--runtime",
- "--cpu",
- "--memory",
- ] {
+ for flag in ["--kind", "--runtime", "--cpu", "--memory"] {
assert!(
o.stdout.contains(flag),
"{flag} missing from sb launch --help"
@@ -734,8 +335,8 @@ async fn create_validates_on_and_flags() {
}
}
-/// The default location comes from `cua config` / `CUA_DEFAULT_ON`, and a
-/// cloud default without credentials says how to sign in or go back.
+/// The default location comes from `cua config` / `CUA_DEFAULT_ON`, and the
+/// environment beats the config file.
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn the_default_location_is_configurable() {
let mut h = Home::new();
diff --git a/libs/cua/crates/cua-telemetry/src/cli_commands.in b/libs/cua/crates/cua-telemetry/src/cli_commands.in
index d6bc3f999d..a0e821266a 100644
--- a/libs/cua/crates/cua-telemetry/src/cli_commands.in
+++ b/libs/cua/crates/cua-telemetry/src/cli_commands.in
@@ -87,8 +87,7 @@
"doctor",
"doctor.parity",
"dump-docs",
- "fleet.pool",
- "fleet.pools",
+ "fleet",
"host.config",
"host.pair",
"host.remove",
@@ -122,6 +121,7 @@
"keyvault.status",
"keyvault.unlock",
"mcp",
+ "pools",
"runtime.doctor",
"runtime.setup",
"sandbox.connect",
@@ -221,6 +221,6 @@
"volume.rm",
"volume.status",
"volume.unmount",
- "wif-token.github",
+ "wif-token",
"other",
]
diff --git a/scripts/docs-generators/cli-specs/cua.json b/scripts/docs-generators/cli-specs/cua.json
index f3bea47e94..4405f92b1c 100644
--- a/scripts/docs-generators/cli-specs/cua.json
+++ b/scripts/docs-generators/cli-specs/cua.json
@@ -2,7 +2,7 @@
"abstract": "Cua: sandboxes, computer actions, MCP, skills and the cua daemon",
"commands": [
{
- "abstract": "Log in to Cua and inspect Fleet identity",
+ "abstract": "Log in to Cua and manage the signed-in session",
"aliases": [],
"arguments": [],
"flags": [],
@@ -185,6 +185,20 @@
"subcommands": [],
"usage": "cua auth status [OPTIONS]"
},
+ {
+ "abstract": "Who is signed in: the account, its plan and its teams",
+ "after_help": "Examples:\n cua auth whoami\n cua auth whoami --json",
+ "aliases": [],
+ "arguments": [],
+ "flags": [],
+ "hidden": false,
+ "hidden_aliases": [],
+ "name": "whoami",
+ "options": [],
+ "subcommand_optional": false,
+ "subcommands": [],
+ "usage": "cua auth whoami [OPTIONS]"
+ },
{
"abstract": "Whether this cua can read the Cua items in the macOS keychain without a prompt (JSON; for the Spaces app, which asks before it starts anything that reads the session). A Cua-signed cua gives every item it reads the Cua access list, so later Cua builds read it without a prompt",
"aliases": [],
@@ -222,117 +236,28 @@
"usage": "cua auth keychain [OPTIONS]"
},
{
- "abstract": "The active Fleet identity, verified against Fleet",
- "after_help": "Examples:\n cua auth whoami",
- "aliases": [],
- "arguments": [],
- "flags": [],
- "hidden": false,
- "hidden_aliases": [],
- "name": "whoami",
- "options": [],
- "subcommand_optional": false,
- "subcommands": [],
- "usage": "cua auth whoami [OPTIONS]"
- },
- {
- "abstract": "Fleet user API keys (client credentials)",
+ "abstract": "Removed: Cua Cloud has ended",
"aliases": [],
- "arguments": [],
+ "arguments": [
+ {
+ "default_value": null,
+ "help": "",
+ "hidden": false,
+ "is_optional": true,
+ "name": "ARGS",
+ "possible_values": [],
+ "repeatable": true,
+ "type": "string"
+ }
+ ],
"flags": [],
- "hidden": false,
+ "hidden": true,
"hidden_aliases": [],
"name": "keys",
"options": [],
"subcommand_optional": false,
- "subcommands": [
- {
- "abstract": "List API keys",
- "after_help": "Examples:\n cua auth keys ls",
- "aliases": [
- "list"
- ],
- "arguments": [],
- "flags": [],
- "hidden": false,
- "hidden_aliases": [],
- "name": "ls",
- "options": [],
- "subcommand_optional": false,
- "subcommands": [],
- "usage": "cua auth keys ls [OPTIONS]"
- },
- {
- "abstract": "Create an API key (prints CUA_CLIENT_ID / CUA_CLIENT_SECRET once)",
- "after_help": "Examples:\n # A key for CI\n cua auth keys create ci",
- "aliases": [],
- "arguments": [
- {
- "default_value": null,
- "help": "Key name",
- "hidden": false,
- "is_optional": false,
- "name": "NAME",
- "possible_values": [],
- "repeatable": false,
- "type": "string"
- }
- ],
- "flags": [],
- "hidden": false,
- "hidden_aliases": [],
- "name": "create",
- "options": [
- {
- "aliases": [],
- "default_value": null,
- "env": null,
- "help": "Scopes (repeatable)",
- "hidden": false,
- "is_optional": true,
- "multiple_values": false,
- "name": "scope",
- "possible_values": [],
- "repeatable": true,
- "short_name": null,
- "takes_value": true,
- "type": "string",
- "value_name": "SCOPE"
- }
- ],
- "subcommand_optional": false,
- "subcommands": [],
- "usage": "cua auth keys create [OPTIONS] <NAME>"
- },
- {
- "abstract": "Delete an API key by id",
- "after_help": "Examples:\n cua auth keys rm <key-id>",
- "aliases": [
- "delete"
- ],
- "arguments": [
- {
- "default_value": null,
- "help": "Key id (from `cua auth keys ls`)",
- "hidden": false,
- "is_optional": false,
- "name": "ID",
- "possible_values": [],
- "repeatable": false,
- "type": "string"
- }
- ],
- "flags": [],
- "hidden": false,
- "hidden_aliases": [],
- "name": "rm",
- "options": [],
- "subcommand_optional": false,
- "subcommands": [],
- "usage": "cua auth keys rm [OPTIONS] <ID>"
- }
- ],
- "usage": "cua auth keys [OPTIONS] <COMMAND>"
+ "subcommands": [],
+ "usage": "cua auth keys [OPTIONS] [ARGS]..."
},
{
"abstract": "Keys of the contrib sandbox providers (`--on e2b`, `--on daytona`, `--on modal`)",
@@ -677,12 +602,12 @@
"subcommands": [
{
"abstract": "Start a coding agent in a sandbox (returns at once unless --follow)",
- "after_help": "Examples:\n cua agent run local:dev claude-code \"fix the failing test\" --env-from-host ANTHROPIC_API_KEY -f\n cua agent run cloud:ci openai-codex \"add tests\" --repo https://github.com/org/repo --exit-when-idle",
+ "after_help": "Examples:\n cua agent run local:dev claude-code \"fix the failing test\" --env-from-host ANTHROPIC_API_KEY -f\n cua agent run local:ci openai-codex \"add tests\" --repo https://github.com/org/repo --exit-when-idle",
"aliases": [],
"arguments": [
{
"default_value": null,
- "help": "Sandbox (`local:NAME`, `cloud:NAME`, `direct:HOST:PORT`, or NAME)",
+ "help": "Sandbox (`local:NAME`, `direct:HOST:PORT`, or NAME)",
"hidden": false,
"is_optional": false,
"name": "SANDBOX",
@@ -727,8 +652,8 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Look NAME up among cloud sandboxes only (same as `cloud:NAME`)",
- "hidden": false,
+ "help": "Removed: Cua Cloud has ended",
+ "hidden": true,
"name": "cloud",
"repeatable": false,
"short_name": null,
@@ -957,7 +882,7 @@
"arguments": [
{
"default_value": null,
- "help": "Sandbox (`local:NAME`, `cloud:NAME`, `direct:HOST:PORT`, or NAME)",
+ "help": "Sandbox (`local:NAME`, `direct:HOST:PORT`, or NAME)",
"hidden": false,
"is_optional": false,
"name": "SANDBOX",
@@ -982,8 +907,8 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Look NAME up among cloud sandboxes only (same as `cloud:NAME`)",
- "hidden": false,
+ "help": "Removed: Cua Cloud has ended",
+ "hidden": true,
"name": "cloud",
"repeatable": false,
"short_name": null,
@@ -1040,8 +965,8 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Look NAME up among cloud sandboxes only (same as `cloud:NAME`)",
- "hidden": false,
+ "help": "Removed: Cua Cloud has ended",
+ "hidden": true,
"name": "cloud",
"repeatable": false,
"short_name": null,
@@ -1130,8 +1055,8 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Look NAME up among cloud sandboxes only (same as `cloud:NAME`)",
- "hidden": false,
+ "help": "Removed: Cua Cloud has ended",
+ "hidden": true,
"name": "cloud",
"repeatable": false,
"short_name": null,
@@ -1199,8 +1124,8 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Look NAME up among cloud sandboxes only (same as `cloud:NAME`)",
- "hidden": false,
+ "help": "Removed: Cua Cloud has ended",
+ "hidden": true,
"name": "cloud",
"repeatable": false,
"short_name": null,
@@ -1257,8 +1182,8 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Look NAME up among cloud sandboxes only (same as `cloud:NAME`)",
- "hidden": false,
+ "help": "Removed: Cua Cloud has ended",
+ "hidden": true,
"name": "cloud",
"repeatable": false,
"short_name": null,
@@ -1315,8 +1240,8 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Look NAME up among cloud sandboxes only (same as `cloud:NAME`)",
- "hidden": false,
+ "help": "Removed: Cua Cloud has ended",
+ "hidden": true,
"name": "cloud",
"repeatable": false,
"short_name": null,
@@ -1373,8 +1298,8 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Look NAME up among cloud sandboxes only (same as `cloud:NAME`)",
- "hidden": false,
+ "help": "Removed: Cua Cloud has ended",
+ "hidden": true,
"name": "cloud",
"repeatable": false,
"short_name": null,
@@ -1431,8 +1356,8 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Look NAME up among cloud sandboxes only (same as `cloud:NAME`)",
- "hidden": false,
+ "help": "Removed: Cua Cloud has ended",
+ "hidden": true,
"name": "cloud",
"repeatable": false,
"short_name": null,
@@ -1559,7 +1484,7 @@
},
{
"abstract": "Create a persistent agent: a named harness whose memory lives in the Cua Volume (agents/NAME/) and outlives its Space",
- "after_help": "Examples:\n cua agent create ada --harness hermes --in local:dev --env-from-host OPENAI_API_KEY\n cua agent create scout --harness claude-code --in cloud:scout --env-from-host ANTHROPIC_API_KEY",
+ "after_help": "Examples:\n cua agent create ada --harness hermes --in local:dev --env-from-host OPENAI_API_KEY\n cua agent create scout --harness claude-code --in local:scout --env-from-host ANTHROPIC_API_KEY",
"aliases": [],
"arguments": [
{
@@ -2221,7 +2146,7 @@
"usage": "cua agent [OPTIONS] <COMMAND>"
},
{
- "abstract": "Sandboxes: local, cloud or an existing machine (direct)",
+ "abstract": "Sandboxes: local or an existing machine (direct)",
"aliases": [
"sb"
],
@@ -2234,13 +2159,13 @@
"subcommand_optional": false,
"subcommands": [
{
- "abstract": "Create a sandbox: `cua sb create IMAGE [--on local|cloud|direct:<addr>] [--kind auto|container|vm] [--runtime auto|gvisor|runc|qemu|lume|kubevirt]`",
- "after_help": "Examples:\n # A Linux desktop on this machine (a gVisor container)\n cua sb create linux --name dev\n # A web server container, ready when its HTTP service answers\n cua sb create python:3.12-slim --service web=8000 --wait http:web/ -- python -m http.server 8000\n # The same Linux image in the cloud instead, as a VM\n cua sb create linux --on cloud --kind vm --name dev",
+ "abstract": "Create a sandbox: `cua sb create IMAGE [--on local|direct:<addr>] [--kind auto|container|vm] [--runtime auto|gvisor|runc|qemu|lume]`",
+ "after_help": "Examples:\n # A Linux desktop on this machine (a gVisor container)\n cua sb create linux --name dev\n # A web server container, ready when its HTTP service answers\n cua sb create python:3.12-slim --service web=8000 --wait http:web/ -- python -m http.server 8000\n # The same Linux image as a VM\n cua sb create linux --kind vm --name dev",
"aliases": [],
"arguments": [
{
"default_value": null,
- "help": "Image: a registry reference (`ghcr.io/org/image:tag`), an alias (`linux`, `ubuntu`, `windows`, `macos[:tahoe|sequoia]`, `omarchy`), or locally `pool:<name>` to run that cloud pool's template image with its firmware, services and readiness probe (`fleet:<name>` is the deprecated spelling)",
+ "help": "Image: a registry reference (`ghcr.io/org/image:tag`), an alias (`linux`, `ubuntu`, `windows`, `macos[:tahoe|sequoia]`, `omarchy`)",
"hidden": false,
"is_optional": true,
"name": "IMAGE",
@@ -2275,9 +2200,9 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Cloud: keep one warm sandbox of this image ready (the default for the canonical linux/windows/macos images)",
+ "help": "Open the desktop in the HTML5 viewer once the sandbox is ready (`cua sb view`)",
"hidden": false,
- "name": "warm",
+ "name": "view",
"repeatable": false,
"short_name": null,
"takes_value": false
@@ -2286,9 +2211,9 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Cloud: no warm sandbox, even for a canonical image",
+ "help": "Keep the sandbox (VM or container) when it fails to become ready, to debug it; the ref and how to delete it are printed. Default: a failed create deletes it",
"hidden": false,
- "name": "no-warm",
+ "name": "keep-on-failure",
"repeatable": false,
"short_name": null,
"takes_value": false
@@ -2297,8 +2222,8 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Cloud, with --pool: update the pool's template to the given fields instead of failing when they differ",
- "hidden": false,
+ "help": "",
+ "hidden": true,
"name": "apply",
"repeatable": false,
"short_name": null,
@@ -2308,9 +2233,9 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Open the desktop in the HTML5 viewer once the sandbox is ready (`cua sb view`)",
- "hidden": false,
- "name": "view",
+ "help": "",
+ "hidden": true,
+ "name": "warm",
"repeatable": false,
"short_name": null,
"takes_value": false
@@ -2319,9 +2244,9 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Keep the sandbox (its cloud claim, VM or container) when it fails to become ready, to debug it; the ref and how to delete it are printed. Default: a failed create deletes it and releases its claim",
- "hidden": false,
- "name": "keep-on-failure",
+ "help": "",
+ "hidden": true,
+ "name": "no-warm",
"repeatable": false,
"short_name": null,
"takes_value": false
@@ -2335,7 +2260,7 @@
"aliases": [],
"default_value": null,
"env": null,
- "help": "Where it runs: local, cloud, direct:<addr> (an existing machine running cua-spacesd), or a registered provider. Default: `cua config get default.on` (`CUA_DEFAULT_ON`), else local",
+ "help": "Where it runs: local, direct:<addr> (an existing machine running cua-spacesd), or a registered provider. Default: `cua config get default.on` (`CUA_DEFAULT_ON`), else local",
"hidden": false,
"is_optional": true,
"multiple_values": false,
@@ -2367,7 +2292,7 @@
"aliases": [],
"default_value": null,
"env": null,
- "help": "Which engine: auto (the safest available) or one the location offers for the kind. Local: gvisor or runc (containers), qemu or lume (VMs). Cloud: gvisor (containers), kubevirt (VMs). A local sandbox with --sidecar needs `--runtime runc` where gVisor would run (separate gVisor containers cannot share a network namespace)",
+ "help": "Which engine: auto (the safest available) or one the location offers for the kind. Local: gvisor or runc (containers), qemu or lume (VMs). A local sandbox with --sidecar needs `--runtime runc` where gVisor would run (separate gVisor containers cannot share a network namespace)",
"hidden": false,
"is_optional": true,
"multiple_values": false,
@@ -2481,7 +2406,7 @@
"aliases": [],
"default_value": null,
"env": null,
- "help": "Guest network: `default` (outbound network, like a Docker container) or `none` (no egress; published ports still work). `none` needs a local QEMU VM; containers, Lume and cloud sandboxes reject it",
+ "help": "Guest network: `default` (outbound network, like a Docker container) or `none` (no egress; published ports still work). `none` needs a local QEMU VM; containers and Lume reject it",
"hidden": false,
"is_optional": true,
"multiple_values": false,
@@ -2600,7 +2525,7 @@
"aliases": [],
"default_value": null,
"env": null,
- "help": "A sidecar container, reachable from the sandbox at its name (it reaches the sandbox at `main`): IMAGE[,port=PORT][,env=K=V][,name=NAME] (repeatable; `port=` and `env=` repeat too). Local containers and every cloud sandbox; locally it needs `--runtime runc` where gVisor would run. With sidecars the service names main, sidecars and sc are reserved",
+ "help": "A sidecar container, reachable from the sandbox at its name (it reaches the sandbox at `main`): IMAGE[,port=PORT][,env=K=V][,name=NAME] (repeatable; `port=` and `env=` repeat too). Local containers; it needs `--runtime runc` where gVisor would run. With sidecars the service names main, sidecars and sc are reserved",
"hidden": false,
"is_optional": true,
"multiple_values": false,
@@ -2631,130 +2556,130 @@
{
"aliases": [],
"default_value": null,
- "env": null,
- "help": "Cloud: most sandboxes of this image at once",
+ "env": "CUA_ENV_TOKEN",
+ "help": "spacesd token (direct: sandboxes)",
"hidden": false,
"is_optional": true,
"multiple_values": false,
- "name": "max-pool-size",
+ "name": "token",
"possible_values": [],
"repeatable": false,
"short_name": null,
"takes_value": true,
- "type": "integer",
- "value_name": "MAX_POOL_SIZE"
+ "type": "string",
+ "value_name": "TOKEN"
},
{
"aliases": [],
"default_value": null,
"env": null,
- "help": "Cloud: how long the sandbox outlives this command without a keep-alive (`15m`, `900`); renewed while the daemon holds it",
- "hidden": false,
+ "help": "Deprecated: use IMAGE",
+ "hidden": true,
"is_optional": true,
"multiple_values": false,
- "name": "claim-ttl",
+ "name": "image",
"possible_values": [],
"repeatable": false,
"short_name": null,
"takes_value": true,
- "type": "integer",
- "value_name": "CLAIM_TTL"
+ "type": "string",
+ "value_name": "IMAGE_FLAG"
},
{
"aliases": [],
"default_value": null,
"env": null,
- "help": "Cloud: use this dedicated pool instead of shared capacity. The sandbox fields given (IMAGE, --cmd, --env, --port, --sidecar, --cpu, --memory) must match its template, or creation fails with the diff",
- "hidden": false,
+ "help": "Deprecated: use --wait tcp:PORT",
+ "hidden": true,
"is_optional": true,
"multiple_values": false,
- "name": "pool",
+ "name": "wait-tcp",
"possible_values": [],
- "repeatable": false,
+ "repeatable": true,
"short_name": null,
"takes_value": true,
- "type": "string",
- "value_name": "POOL"
+ "type": "integer",
+ "value_name": "WAIT_TCP"
},
{
"aliases": [],
"default_value": null,
- "env": "CUA_ENV_TOKEN",
- "help": "spacesd token (direct: sandboxes)",
- "hidden": false,
+ "env": null,
+ "help": "Deprecated: use --wait http:PORT/path",
+ "hidden": true,
"is_optional": true,
"multiple_values": false,
- "name": "token",
+ "name": "wait-http",
"possible_values": [],
- "repeatable": false,
+ "repeatable": true,
"short_name": null,
"takes_value": true,
"type": "string",
- "value_name": "TOKEN"
+ "value_name": "WAIT_HTTP"
},
{
"aliases": [],
"default_value": null,
"env": null,
- "help": "Deprecated: use IMAGE",
- "hidden": true,
+ "help": "A GPU: the runtime's own (`--gpu`), or an option `cua spaces gpus` lists (`paravirtual`: GPU acceleration for a macOS VM on Lume, experimental; `virgl`: QEMU on Linux; `nvidia`: a runc container on Linux; a provider's GPU type)",
+ "hidden": false,
"is_optional": true,
"multiple_values": false,
- "name": "image",
+ "name": "gpu",
"possible_values": [],
"repeatable": false,
"short_name": null,
"takes_value": true,
"type": "string",
- "value_name": "IMAGE_FLAG"
+ "value_name": "OPTION"
},
{
"aliases": [],
"default_value": null,
"env": null,
- "help": "Deprecated: use --wait tcp:PORT",
+ "help": "",
"hidden": true,
"is_optional": true,
"multiple_values": false,
- "name": "wait-tcp",
+ "name": "pool",
"possible_values": [],
- "repeatable": true,
+ "repeatable": false,
"short_name": null,
"takes_value": true,
- "type": "integer",
- "value_name": "WAIT_TCP"
+ "type": "string",
+ "value_name": "POOL"
},
{
"aliases": [],
"default_value": null,
"env": null,
- "help": "Deprecated: use --wait http:PORT/path",
+ "help": "",
"hidden": true,
"is_optional": true,
"multiple_values": false,
- "name": "wait-http",
+ "name": "max-pool-size",
"possible_values": [],
- "repeatable": true,
+ "repeatable": false,
"short_name": null,
"takes_value": true,
- "type": "string",
- "value_name": "WAIT_HTTP"
+ "type": "integer",
+ "value_name": "MAX_POOL_SIZE"
},
{
"aliases": [],
"default_value": null,
"env": null,
- "help": "A GPU: the runtime's own (`--gpu`), or an option `cua spaces gpus` lists (`paravirtual`: GPU acceleration for a macOS VM on Lume, experimental; `virgl`: QEMU on Linux; `nvidia`: a runc container on Linux; a provider's GPU type)",
- "hidden": false,
+ "help": "",
+ "hidden": true,
"is_optional": true,
"multiple_values": false,
- "name": "gpu",
+ "name": "claim-ttl",
"possible_values": [],
"repeatable": false,
"short_name": null,
"takes_value": true,
"type": "string",
- "value_name": "OPTION"
+ "value_name": "CLAIM_TTL"
}
],
"subcommand_optional": false,
@@ -2762,8 +2687,8 @@
"usage": "cua sandbox create [OPTIONS] [IMAGE] [-- <COMMAND>...]"
},
{
- "abstract": "Deprecated alias of `create` that defaults to `--on cloud`",
- "after_help": "Examples:\n # A cloud Linux sandbox (same as `cua sb create linux --on cloud`)\n cua sb launch linux --name dev",
+ "abstract": "Deprecated alias of `create`",
+ "after_help": "Examples:\n cua sb launch linux --name dev",
"aliases": [],
"arguments": [
{
@@ -2804,8 +2729,30 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Cloud: keep one warm sandbox of this image ready",
+ "help": "Keep the sandbox when it fails to become ready (see `sb create --keep-on-failure`)",
"hidden": false,
+ "name": "keep-on-failure",
+ "repeatable": false,
+ "short_name": null,
+ "takes_value": false
+ },
+ {
+ "aliases": [],
+ "default_value": false,
+ "env": null,
+ "help": "",
+ "hidden": true,
+ "name": "apply",
+ "repeatable": false,
+ "short_name": null,
+ "takes_value": false
+ },
+ {
+ "aliases": [],
+ "default_value": false,
+ "env": null,
+ "help": "",
+ "hidden": true,
"name": "warm",
"repeatable": false,
"short_name": null,
@@ -2815,9 +2762,9 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Keep the sandbox when it fails to become ready (see `sb create --keep-on-failure`)",
- "hidden": false,
- "name": "keep-on-failure",
+ "help": "",
+ "hidden": true,
+ "name": "no-warm",
"repeatable": false,
"short_name": null,
"takes_value": false
@@ -2831,27 +2778,11 @@
"aliases": [],
"default_value": null,
"env": null,
- "help": "Use this dedicated cloud pool (requires --name). With --on local, run that pool's template locally instead",
+ "help": "Where it runs (see `sb create --on`)",
"hidden": false,
"is_optional": true,
"multiple_values": false,
- "name": "pool",
- "possible_values": [],
- "repeatable": false,
- "short_name": null,
- "takes_value": true,
- "type": "string",
- "value_name": "POOL"
- },
- {
- "aliases": [],
- "default_value": null,
- "env": null,
- "help": "Where it runs (default cloud for launch; see `sb create --on`)",
- "hidden": false,
- "is_optional": true,
- "multiple_values": false,
- "name": "on",
+ "name": "on",
"possible_values": [],
"repeatable": false,
"short_name": null,
@@ -2961,7 +2892,7 @@
"aliases": [],
"default_value": null,
"env": null,
- "help": "Cloud region (accepted for compatibility; the cloud places sandboxes)",
+ "help": "Region (accepted for compatibility; ignored)",
"hidden": true,
"is_optional": true,
"multiple_values": false,
@@ -2995,8 +2926,24 @@
"aliases": [],
"default_value": null,
"env": null,
- "help": "Cloud: most sandboxes of this image at once",
- "hidden": false,
+ "help": "",
+ "hidden": true,
+ "is_optional": true,
+ "multiple_values": false,
+ "name": "pool",
+ "possible_values": [],
+ "repeatable": false,
+ "short_name": null,
+ "takes_value": true,
+ "type": "string",
+ "value_name": "POOL"
+ },
+ {
+ "aliases": [],
+ "default_value": null,
+ "env": null,
+ "help": "",
+ "hidden": true,
"is_optional": true,
"multiple_values": false,
"name": "max-pool-size",
@@ -3011,8 +2958,8 @@
"aliases": [],
"default_value": null,
"env": null,
- "help": "Cloud: how long the sandbox outlives this command without a keep-alive (`15m`, `900`)",
- "hidden": false,
+ "help": "",
+ "hidden": true,
"is_optional": true,
"multiple_values": false,
"name": "claim-ttl",
@@ -3020,7 +2967,7 @@
"repeatable": false,
"short_name": null,
"takes_value": true,
- "type": "integer",
+ "type": "string",
"value_name": "CLAIM_TTL"
}
],
@@ -3029,13 +2976,13 @@
"usage": "cua sandbox launch [OPTIONS] [IMAGE]"
},
{
- "abstract": "Reattach to a sandbox (NAME or a ref such as `cloud:NAME`) and print it",
- "after_help": "Examples:\n cua sb connect dev\n cua sb connect cloud:dev",
+ "abstract": "Reattach to a sandbox (NAME or a ref such as `local:NAME`) and print it",
+ "after_help": "Examples:\n cua sb connect dev\n cua sb connect local:dev",
"aliases": [],
"arguments": [
{
"default_value": null,
- "help": "Sandbox name or ref (`local:NAME`, `cloud:NAME`)",
+ "help": "Sandbox name or ref (`local:NAME`)",
"hidden": false,
"is_optional": false,
"name": "NAME",
@@ -3060,8 +3007,8 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Look NAME up among cloud sandboxes only (same as `cloud:NAME`)",
- "hidden": false,
+ "help": "Removed: Cua Cloud has ended",
+ "hidden": true,
"name": "cloud",
"repeatable": false,
"short_name": null,
@@ -3077,8 +3024,8 @@
"usage": "cua sandbox connect [OPTIONS] <NAME>"
},
{
- "abstract": "List sandboxes: local, direct and cloud (live Fleet claims) by default, each with its `location`; `--local` or `--cloud` filters",
- "after_help": "Examples:\n cua sb ls\n cua sb ls --cloud --json",
+ "abstract": "List sandboxes: local and direct, each with its `location`; `--local` filters",
+ "after_help": "Examples:\n cua sb ls\n cua sb ls --local --json",
"aliases": [
"list"
],
@@ -3099,8 +3046,8 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Only cloud sandboxes, listed live from Fleet",
- "hidden": false,
+ "help": "Removed: Cua Cloud has ended",
+ "hidden": true,
"name": "cloud",
"repeatable": false,
"short_name": null,
@@ -3138,15 +3085,15 @@
"usage": "cua sandbox ls [OPTIONS]"
},
{
- "abstract": "Show one sandbox (or a Fleet pool of that name)",
- "after_help": "Examples:\n cua sb info dev\n cua sb info cloud:dev --json",
+ "abstract": "Show one sandbox",
+ "after_help": "Examples:\n cua sb info dev\n cua sb info local:dev --json",
"aliases": [
"get"
],
"arguments": [
{
"default_value": null,
- "help": "Sandbox name or ref (`local:NAME`, `cloud:NAME`)",
+ "help": "Sandbox name or ref (`local:NAME`)",
"hidden": false,
"is_optional": false,
"name": "NAME",
@@ -3171,8 +3118,8 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Look NAME up among cloud sandboxes only (same as `cloud:NAME`)",
- "hidden": false,
+ "help": "Removed: Cua Cloud has ended",
+ "hidden": true,
"name": "cloud",
"repeatable": false,
"short_name": null,
@@ -3188,13 +3135,13 @@
"usage": "cua sandbox info [OPTIONS] <NAME>"
},
{
- "abstract": "Suspend (local: pause/snapshot; Fleet managed pool: release the claim and keep the record; explicit Fleet pool: scale to zero)",
+ "abstract": "Suspend (pause/snapshot)",
"after_help": "Examples:\n cua sb suspend dev",
"aliases": [],
"arguments": [
{
"default_value": null,
- "help": "Sandbox name or ref (`local:NAME`, `cloud:NAME`)",
+ "help": "Sandbox name or ref (`local:NAME`)",
"hidden": false,
"is_optional": false,
"name": "NAME",
@@ -3219,8 +3166,8 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Look NAME up among cloud sandboxes only (same as `cloud:NAME`)",
- "hidden": false,
+ "help": "Removed: Cua Cloud has ended",
+ "hidden": true,
"name": "cloud",
"repeatable": false,
"short_name": null,
@@ -3236,13 +3183,13 @@
"usage": "cua sandbox suspend [OPTIONS] <NAME>"
},
{
- "abstract": "Resume (Fleet managed pool: claim a fresh sandbox of the same shape)",
+ "abstract": "Resume",
"after_help": "Examples:\n cua sb resume dev",
"aliases": [],
"arguments": [
{
"default_value": null,
- "help": "Sandbox name or ref (`local:NAME`, `cloud:NAME`)",
+ "help": "Sandbox name or ref (`local:NAME`)",
"hidden": false,
"is_optional": false,
"name": "NAME",
@@ -3267,8 +3214,8 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Look NAME up among cloud sandboxes only (same as `cloud:NAME`)",
- "hidden": false,
+ "help": "Removed: Cua Cloud has ended",
+ "hidden": true,
"name": "cloud",
"repeatable": false,
"short_name": null,
@@ -3290,7 +3237,7 @@
"arguments": [
{
"default_value": null,
- "help": "Sandbox name or ref (`local:NAME`, `cloud:NAME`)",
+ "help": "Sandbox name or ref (`local:NAME`)",
"hidden": false,
"is_optional": false,
"name": "NAME",
@@ -3315,8 +3262,8 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Look NAME up among cloud sandboxes only (same as `cloud:NAME`)",
- "hidden": false,
+ "help": "Removed: Cua Cloud has ended",
+ "hidden": true,
"name": "cloud",
"repeatable": false,
"short_name": null,
@@ -3332,80 +3279,39 @@
"usage": "cua sandbox restart [OPTIONS] <NAME>"
},
{
- "abstract": "Extend a Fleet claim's lease",
- "after_help": "Examples:\n # Keep the claim for two more hours\n cua sb keep-alive cloud:dev --for 2h",
+ "abstract": "Removed: Cua Cloud has ended",
"aliases": [],
"arguments": [
{
"default_value": null,
- "help": "Sandbox name or ref (`local:NAME`, `cloud:NAME`)",
+ "help": "",
"hidden": false,
- "is_optional": false,
- "name": "NAME",
+ "is_optional": true,
+ "name": "ARGS",
"possible_values": [],
- "repeatable": false,
+ "repeatable": true,
"type": "string"
}
],
- "flags": [
- {
- "aliases": [],
- "default_value": false,
- "env": null,
- "help": "Look NAME up among local sandboxes only (same as `local:NAME`)",
- "hidden": false,
- "name": "local",
- "repeatable": false,
- "short_name": null,
- "takes_value": false
- },
- {
- "aliases": [],
- "default_value": false,
- "env": null,
- "help": "Look NAME up among cloud sandboxes only (same as `cloud:NAME`)",
- "hidden": false,
- "name": "cloud",
- "repeatable": false,
- "short_name": null,
- "takes_value": false
- }
- ],
- "hidden": false,
+ "flags": [],
+ "hidden": true,
"hidden_aliases": [],
"name": "keep-alive",
- "options": [
- {
- "aliases": [],
- "default_value": "15m",
- "env": null,
- "help": "Lease from now (`15m`, `2h`, `900`)",
- "hidden": false,
- "is_optional": true,
- "multiple_values": false,
- "name": "for",
- "possible_values": [],
- "repeatable": false,
- "short_name": null,
- "takes_value": true,
- "type": "integer",
- "value_name": "DURATION"
- }
- ],
+ "options": [],
"subcommand_optional": false,
"subcommands": [],
- "usage": "cua sandbox keep-alive [OPTIONS] <NAME>"
+ "usage": "cua sandbox keep-alive [OPTIONS] [ARGS]..."
},
{
- "abstract": "Delete a sandbox (Fleet: release the claim; managed pools are kept for reuse)",
- "after_help": "Examples:\n cua sb rm dev\n # Without the prompt (required in scripts and agents)\n cua sb rm cloud:dev --force",
+ "abstract": "Delete a sandbox",
+ "after_help": "Examples:\n cua sb rm dev\n # Without the prompt (required in scripts and agents)\n cua sb rm local:dev --force",
"aliases": [
"delete"
],
"arguments": [
{
"default_value": null,
- "help": "Sandbox name or ref (`local:NAME`, `cloud:NAME`)",
+ "help": "Sandbox name or ref (`local:NAME`)",
"hidden": false,
"is_optional": false,
"name": "NAME",
@@ -3441,8 +3347,8 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Look NAME up among cloud sandboxes only (same as `cloud:NAME`)",
- "hidden": false,
+ "help": "Removed: Cua Cloud has ended",
+ "hidden": true,
"name": "cloud",
"repeatable": false,
"short_name": null,
@@ -3464,7 +3370,7 @@
"arguments": [
{
"default_value": null,
- "help": "Sandbox name or ref (`local:NAME`, `cloud:NAME`)",
+ "help": "Sandbox name or ref (`local:NAME`)",
"hidden": false,
"is_optional": false,
"name": "NAME",
@@ -3499,8 +3405,8 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Look NAME up among cloud sandboxes only (same as `cloud:NAME`)",
- "hidden": false,
+ "help": "Removed: Cua Cloud has ended",
+ "hidden": true,
"name": "cloud",
"repeatable": false,
"short_name": null,
@@ -3522,7 +3428,7 @@
"arguments": [
{
"default_value": null,
- "help": "Sandbox name or ref (`local:NAME`, `cloud:NAME`)",
+ "help": "Sandbox name or ref (`local:NAME`)",
"hidden": false,
"is_optional": false,
"name": "NAME",
@@ -3557,8 +3463,8 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Look NAME up among cloud sandboxes only (same as `cloud:NAME`)",
- "hidden": false,
+ "help": "Removed: Cua Cloud has ended",
+ "hidden": true,
"name": "cloud",
"repeatable": false,
"short_name": null,
@@ -3648,8 +3554,8 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Look NAME up among cloud sandboxes only (same as `cloud:NAME`)",
- "hidden": false,
+ "help": "Removed: Cua Cloud has ended",
+ "hidden": true,
"name": "cloud",
"repeatable": false,
"short_name": null,
@@ -3671,7 +3577,7 @@
"arguments": [
{
"default_value": null,
- "help": "Sandbox name or ref (`local:NAME`, `cloud:NAME`)",
+ "help": "Sandbox name or ref (`local:NAME`)",
"hidden": false,
"is_optional": false,
"name": "NAME",
@@ -3706,8 +3612,8 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Look NAME up among cloud sandboxes only (same as `cloud:NAME`)",
- "hidden": false,
+ "help": "Removed: Cua Cloud has ended",
+ "hidden": true,
"name": "cloud",
"repeatable": false,
"short_name": null,
@@ -3746,7 +3652,7 @@
"arguments": [
{
"default_value": null,
- "help": "Sandbox name or ref (`local:NAME`, `cloud:NAME`)",
+ "help": "Sandbox name or ref (`local:NAME`)",
"hidden": false,
"is_optional": false,
"name": "NAME",
@@ -3771,8 +3677,8 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Look NAME up among cloud sandboxes only (same as `cloud:NAME`)",
- "hidden": false,
+ "help": "Removed: Cua Cloud has ended",
+ "hidden": true,
"name": "cloud",
"repeatable": false,
"short_name": null,
@@ -3821,15 +3727,15 @@
"usage": "cua sandbox logs [OPTIONS] <NAME>"
},
{
- "abstract": "Forward a guest port: `port-forward NAME PORT[:LOCAL]` (a local sandbox's port not published at create, and cloud sandboxes, tunnel through cua-spacesd when the image has it; cloud images without it get HTTP and WebSocket through a loopback proxy to the cloud gateway)",
- "after_help": "Examples:\n # Guest port 8080 on localhost:8080 until Ctrl-C\n cua sb port-forward dev 8080\n # Guest port 5432 on localhost:15432\n cua sb port-forward cloud:dev 5432:15432",
+ "abstract": "Forward a guest port: `port-forward NAME PORT[:LOCAL]` (a local sandbox's port not published at create tunnels through cua-spacesd when the image has it)",
+ "after_help": "Examples:\n # Guest port 8080 on localhost:8080 until Ctrl-C\n cua sb port-forward dev 8080\n # Guest port 5432 on localhost:15432\n cua sb port-forward local:dev 5432:15432",
"aliases": [
"forward"
],
"arguments": [
{
"default_value": null,
- "help": "Sandbox name or ref (`local:NAME`, `cloud:NAME`)",
+ "help": "Sandbox name or ref (`local:NAME`)",
"hidden": false,
"is_optional": false,
"name": "NAME",
@@ -3864,8 +3770,8 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Look NAME up among cloud sandboxes only (same as `cloud:NAME`)",
- "hidden": false,
+ "help": "Removed: Cua Cloud has ended",
+ "hidden": true,
"name": "cloud",
"repeatable": false,
"short_name": null,
@@ -3892,13 +3798,13 @@
"usage": "cua sandbox port-forward [OPTIONS] <NAME> <SPEC>"
},
{
- "abstract": "Print a URL for a named service: usable from this machine (default), or `--public` for a shareable URL that expires (`--ttl`, default 1h; cloud: a signed URL; local: a token URL served by the cua daemon)",
- "after_help": "Examples:\n cua sb url dev web\n # A shareable URL for 10 minutes\n cua sb url cloud:dev web --public --ttl 10m",
+ "abstract": "Print a URL for a named service: usable from this machine (default), or `--public` for a shareable URL that expires (`--ttl`, default 1h; a token URL served by the cua daemon)",
+ "after_help": "Examples:\n cua sb url dev web\n # A shareable URL for 10 minutes\n cua sb url local:dev web --public --ttl 10m",
"aliases": [],
"arguments": [
{
"default_value": null,
- "help": "Sandbox name or ref (`local:NAME`, `cloud:NAME`)",
+ "help": "Sandbox name or ref (`local:NAME`)",
"hidden": false,
"is_optional": false,
"name": "NAME",
@@ -3933,8 +3839,8 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Look NAME up among cloud sandboxes only (same as `cloud:NAME`)",
- "hidden": false,
+ "help": "Removed: Cua Cloud has ended",
+ "hidden": true,
"name": "cloud",
"repeatable": false,
"short_name": null,
@@ -3984,7 +3890,7 @@
"arguments": [
{
"default_value": null,
- "help": "Sandbox name or ref (`local:NAME`, `cloud:NAME`)",
+ "help": "Sandbox name or ref (`local:NAME`)",
"hidden": false,
"is_optional": false,
"name": "NAME",
@@ -4009,8 +3915,8 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Look NAME up among cloud sandboxes only (same as `cloud:NAME`)",
- "hidden": false,
+ "help": "Removed: Cua Cloud has ended",
+ "hidden": true,
"name": "cloud",
"repeatable": false,
"short_name": null,
@@ -4043,13 +3949,13 @@
"usage": "cua sandbox screenshot [OPTIONS] <NAME>"
},
{
- "abstract": "Talk to an MCP server a sandbox serves: `mcp NAME SERVICE tools`, `mcp NAME SERVICE call TOOL '{\"a\":1}'`. Generic streamable HTTP over the service (local or cloud); no cua-spacesd needed",
+ "abstract": "Talk to an MCP server a sandbox serves: `mcp NAME SERVICE tools`, `mcp NAME SERVICE call TOOL '{\"a\":1}'`. Generic streamable HTTP over the service; no cua-spacesd needed",
"after_help": "Examples:\n cua sb mcp dev mcp tools\n cua sb mcp dev mcp call echo '{\"text\":\"hi\"}'",
"aliases": [],
"arguments": [
{
"default_value": null,
- "help": "Sandbox name or ref (`local:NAME`, `cloud:NAME`)",
+ "help": "Sandbox name or ref (`local:NAME`)",
"hidden": false,
"is_optional": false,
"name": "NAME",
@@ -4084,8 +3990,8 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Look NAME up among cloud sandboxes only (same as `cloud:NAME`)",
- "hidden": false,
+ "help": "Removed: Cua Cloud has ended",
+ "hidden": true,
"name": "cloud",
"repeatable": false,
"short_name": null,
@@ -4116,7 +4022,7 @@
"subcommand_optional": false,
"subcommands": [
{
- "abstract": "The endpoint URL and headers, for any MCP client. Credential headers print masked (`Bearer ****`) unless `--show-secrets`; Fleet bearers are short-lived",
+ "abstract": "The endpoint URL and headers, for any MCP client. Credential headers print masked (`Bearer ****`) unless `--show-secrets`",
"after_help": "Examples:\n cua sb mcp dev mcp config",
"aliases": [],
"arguments": [],
@@ -4385,7 +4291,7 @@
"arguments": [
{
"default_value": null,
- "help": "Sandbox name or ref (`local:NAME`, `cloud:NAME`)",
+ "help": "Sandbox name or ref (`local:NAME`)",
"hidden": false,
"is_optional": false,
"name": "NAME",
@@ -4432,8 +4338,8 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Look NAME up among cloud sandboxes only (same as `cloud:NAME`)",
- "hidden": false,
+ "help": "Removed: Cua Cloud has ended",
+ "hidden": true,
"name": "cloud",
"repeatable": false,
"short_name": null,
@@ -4503,7 +4409,7 @@
"arguments": [
{
"default_value": null,
- "help": "Sandbox name or ref (`local:NAME`, `cloud:NAME`)",
+ "help": "Sandbox name or ref (`local:NAME`)",
"hidden": false,
"is_optional": false,
"name": "NAME",
@@ -4550,8 +4456,8 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Look NAME up among cloud sandboxes only (same as `cloud:NAME`)",
- "hidden": false,
+ "help": "Removed: Cua Cloud has ended",
+ "hidden": true,
"name": "cloud",
"repeatable": false,
"short_name": null,
@@ -4621,7 +4527,7 @@
"arguments": [
{
"default_value": null,
- "help": "Sandbox name or ref (`local:NAME`, `cloud:NAME`)",
+ "help": "Sandbox name or ref (`local:NAME`)",
"hidden": false,
"is_optional": false,
"name": "NAME",
@@ -4657,8 +4563,8 @@
"aliases": [],
"default_value": false,
"env": null,
- "help": "Look NAME up among cloud sandboxes only (same as `cloud:NAME`)",
- "hidden": false,
+ "help": "Removed: Cua Cloud has ended",
+ "hidden": true,
"name": "cloud",
"repeatable": false,
"short_name": null,
@@ -4838,7 +4744,7 @@
"usage": "cua sandbox [OPTIONS] <COMMAND>"
},
{
- "abstract": "User defaults (~/.cua/config.toml): where sandboxes run when --on is not given (default.on), the default kind and runtime, cloud defaults",
+ "abstract": "User defaults (~/.cua/config.toml): where sandboxes run when --on is not given (default.on), the default kind and runtime",
"aliases": [],
"arguments": [],
"flags": [],
@@ -4871,7 +4777,7 @@
"arguments": [
{
"default_value": null,
- "help": "Setting (`default.on`, `default.kind`, `default.runtime`, `cloud.warm`, `cloud.max_pool_size`, `cloud.claim_ttl`)",
+ "help": "Setting (`default.on`, `default.kind`, `default.runtime`)",
"hidden": false,
"is_optional": false,
"name": "KEY",
@@ -4891,7 +4797,7 @@
},
{
"abstract": "Write a setting to the config file",
- "after_help": "Examples:\n # Create sandboxes in the cloud unless --on says otherwise\n cua config set default.on cloud\n # Back to this machine\n cua config set default.on local\n # Prefer VMs when the image offers both\n cua config set default.kind vm",
+ "after_help": "Examples:\n # Create sandboxes in your AWS account unless --on says otherwise\n cua config set default.on aws\n # Back to this machine\n cua config set default.on local\n # Prefer VMs when the image offers both\n cua config set default.kind vm",
"aliases": [],
"arguments": [
{
@@ -4906,7 +4812,7 @@
},
{
"default_value": null,
- "help": "Value (checked: `default.on` takes local, cloud or a provider)",
+ "help": "Value (checked: `default.on` takes local, aws, gcp, modal or a provider)",
"hidden": false,
"is_optional": false,
"name": "VALUE",
@@ -5035,7 +4941,7 @@
"subcommands": [
{
"abstract": "Select the target: a sandbox name or ref, a relay Space (`relay:<id>`), `host`, `url <URL>`, or a legacy `<provider> <name>` pair",
- "after_help": "Examples:\n cua do switch dev\n cua do switch cloud:dev\n cua do switch relay:0123abcd4567ef89\n # This machine (after `cua do-host-consent`)\n cua do switch host",
+ "after_help": "Examples:\n cua do switch dev\n cua do switch relay:0123abcd4567ef89\n # This machine (after `cua do-host-consent`)\n cua do switch host",
"aliases": [],
"arguments": [
{
@@ -6749,194 +6655,79 @@
"usage": "cua trajectory [OPTIONS] <COMMAND>"
},
{
- "abstract": "Workload identity federation tokens",
+ "abstract": "Removed: Cua Cloud has ended",
"aliases": [],
- "arguments": [],
+ "arguments": [
+ {
+ "default_value": null,
+ "help": "",
+ "hidden": false,
+ "is_optional": true,
+ "name": "ARGS",
+ "possible_values": [],
+ "repeatable": true,
+ "type": "string"
+ }
+ ],
"flags": [],
- "hidden": false,
+ "hidden": true,
"hidden_aliases": [],
"name": "wif-token",
"options": [],
"subcommand_optional": false,
- "subcommands": [
+ "subcommands": [],
+ "usage": "cua wif-token [OPTIONS] [ARGS]..."
+ },
+ {
+ "abstract": "Removed: Cua Cloud has ended",
+ "aliases": [],
+ "arguments": [
{
- "abstract": "Print a GitHub Actions OIDC token for Fleets",
- "after_help": "Examples:\n # In a GitHub Actions job with `id-token: write`\n cua wif-token github",
- "aliases": [],
- "arguments": [],
- "flags": [],
+ "default_value": null,
+ "help": "",
"hidden": false,
- "hidden_aliases": [],
- "name": "github",
- "options": [
- {
- "aliases": [],
- "default_value": "fleets",
- "env": null,
- "help": "Token audience",
- "hidden": false,
- "is_optional": true,
- "multiple_values": false,
- "name": "audience",
- "possible_values": [],
- "repeatable": false,
- "short_name": null,
- "takes_value": true,
- "type": "string",
- "value_name": "AUDIENCE"
- }
- ],
- "subcommand_optional": false,
- "subcommands": [],
- "usage": "cua wif-token github [OPTIONS]"
+ "is_optional": true,
+ "name": "ARGS",
+ "possible_values": [],
+ "repeatable": true,
+ "type": "string"
}
],
- "usage": "cua wif-token [OPTIONS] <COMMAND>"
- },
- {
- "abstract": "Fleet: managed pools behind `cua sandbox create` without `--pool`",
- "aliases": [],
- "arguments": [],
"flags": [],
- "hidden": false,
+ "hidden": true,
"hidden_aliases": [],
"name": "fleet",
"options": [],
"subcommand_optional": false,
- "subcommands": [
- {
- "abstract": "Managed pools (`cua-auto-*`): reused per image and shape, autoscaled from zero, garbage-collected when idle",
- "aliases": [],
- "arguments": [],
- "flags": [],
- "hidden": false,
- "hidden_aliases": [],
- "name": "pools",
- "options": [],
- "subcommand_optional": false,
- "subcommands": [
- {
- "abstract": "List this account's managed pools",
- "after_help": "Examples:\n cua fleet pools ls",
- "aliases": [
- "list"
- ],
- "arguments": [],
- "flags": [],
- "hidden": false,
- "hidden_aliases": [],
- "name": "ls",
- "options": [],
- "subcommand_optional": false,
- "subcommands": [],
- "usage": "cua fleet pools ls [OPTIONS]"
- },
- {
- "abstract": "Delete managed pools idle for `--idle` and stuck claims",
- "after_help": "Examples:\n cua fleet pools gc\n cua fleet pools gc --idle 2h",
- "aliases": [],
- "arguments": [],
- "flags": [],
- "hidden": false,
- "hidden_aliases": [],
- "name": "gc",
- "options": [
- {
- "aliases": [],
- "default_value": "30m",
- "env": null,
- "help": "Idle threshold (`30m`, `2h`, `1d`)",
- "hidden": false,
- "is_optional": true,
- "multiple_values": false,
- "name": "idle",
- "possible_values": [],
- "repeatable": false,
- "short_name": null,
- "takes_value": true,
- "type": "string",
- "value_name": "IDLE"
- },
- {
- "aliases": [],
- "default_value": null,
- "env": null,
- "help": "Only these pools (repeatable). Default: every managed pool",
- "hidden": false,
- "is_optional": true,
- "multiple_values": false,
- "name": "pool",
- "possible_values": [],
- "repeatable": true,
- "short_name": null,
- "takes_value": true,
- "type": "string",
- "value_name": "POOLS"
- }
- ],
- "subcommand_optional": false,
- "subcommands": [],
- "usage": "cua fleet pools gc [OPTIONS]"
- }
- ],
- "usage": "cua fleet pools [OPTIONS] <COMMAND>"
- },
+ "subcommands": [],
+ "usage": "cua fleet [OPTIONS] [ARGS]..."
+ },
+ {
+ "abstract": "Removed: Cua Cloud has ended",
+ "aliases": [],
+ "arguments": [
{
- "abstract": "One pool (any pool you own, not only managed ones)",
- "aliases": [],
- "arguments": [],
- "flags": [],
+ "default_value": null,
+ "help": "",
"hidden": false,
- "hidden_aliases": [],
- "name": "pool",
- "options": [],
- "subcommand_optional": false,
- "subcommands": [
- {
- "abstract": "Print a pool's spec: the shared sandbox model as JSON, or with `--terraform` the equivalent `fleets_pool` resource block",
- "after_help": "Examples:\n cua fleet pool export ci-linux\n cua fleet pool export ci-linux --terraform > pool.tf",
- "aliases": [],
- "arguments": [
- {
- "default_value": null,
- "help": "Pool name",
- "hidden": false,
- "is_optional": false,
- "name": "NAME",
- "possible_values": [],
- "repeatable": false,
- "type": "string"
- }
- ],
- "flags": [
- {
- "aliases": [],
- "default_value": false,
- "env": null,
- "help": "Emit Terraform HCL (the cyclops-cs `fleets_pool` resource)",
- "hidden": false,
- "name": "terraform",
- "repeatable": false,
- "short_name": null,
- "takes_value": false
- }
- ],
- "hidden": false,
- "hidden_aliases": [],
- "name": "export",
- "options": [],
- "subcommand_optional": false,
- "subcommands": [],
- "usage": "cua fleet pool export [OPTIONS] <NAME>"
- }
- ],
- "usage": "cua fleet pool [OPTIONS] <COMMAND>"
+ "is_optional": true,
+ "name": "ARGS",
+ "possible_values": [],
+ "repeatable": true,
+ "type": "string"
}
],
- "usage": "cua fleet [OPTIONS] <COMMAND>"
+ "flags": [],
+ "hidden": true,
+ "hidden_aliases": [],
+ "name": "pools",
+ "options": [],
+ "subcommand_optional": false,
+ "subcommands": [],
+ "usage": "cua pools [OPTIONS] [ARGS]..."
},
{
- "abstract": "Images: local OCI pull/build/push and Fleet image resources",
+ "abstract": "Images: local OCI pull/build/push",
"aliases": [
"img"
],
@@ -7067,182 +6858,104 @@
"usage": "cua image push [OPTIONS] <REFERENCE> <DESTINATION>"
},
{
- "abstract": "List Fleet image resources",
- "after_help": "Examples:\n cua image ls\n cua image ls --namespace acme",
- "aliases": [
- "list"
- ],
- "arguments": [],
- "flags": [],
- "hidden": false,
- "hidden_aliases": [],
- "name": "ls",
- "options": [
+ "abstract": "Removed: Cua Cloud has ended",
+ "aliases": [],
+ "arguments": [
{
- "aliases": [],
"default_value": null,
- "env": null,
- "help": "Namespace (default: every namespace, or CUA_FLEET_NAMESPACE)",
+ "help": "",
"hidden": false,
"is_optional": true,
- "multiple_values": false,
- "name": "namespace",
+ "name": "ARGS",
"possible_values": [],
- "repeatable": false,
- "short_name": null,
- "takes_value": true,
- "type": "string",
- "value_name": "NAMESPACE"
+ "repeatable": true,
+ "type": "string"
}
],
+ "flags": [],
+ "hidden": true,
+ "hidden_aliases": [
+ "list"
+ ],
+ "name": "ls",
+ "options": [],
"subcommand_optional": false,
"subcommands": [],
- "usage": "cua image ls [OPTIONS]"
+ "usage": "cua image ls [OPTIONS] [ARGS]..."
},
{
- "abstract": "Show a Fleet image resource",
- "after_help": "Examples:\n cua image info desktop",
+ "abstract": "Removed: Cua Cloud has ended",
"aliases": [],
"arguments": [
{
"default_value": null,
- "help": "Image resource name",
+ "help": "",
"hidden": false,
- "is_optional": false,
- "name": "NAME",
+ "is_optional": true,
+ "name": "ARGS",
"possible_values": [],
- "repeatable": false,
+ "repeatable": true,
"type": "string"
}
],
"flags": [],
- "hidden": false,
+ "hidden": true,
"hidden_aliases": [],
"name": "info",
- "options": [
- {
- "aliases": [],
- "default_value": null,
- "env": null,
- "help": "Namespace (default: CUA_FLEET_NAMESPACE)",
- "hidden": false,
- "is_optional": true,
- "multiple_values": false,
- "name": "namespace",
- "possible_values": [],
- "repeatable": false,
- "short_name": null,
- "takes_value": true,
- "type": "string",
- "value_name": "NAMESPACE"
- }
- ],
+ "options": [],
"subcommand_optional": false,
"subcommands": [],
- "usage": "cua image info [OPTIONS] <NAME>"
+ "usage": "cua image info [OPTIONS] [ARGS]..."
},
{
- "abstract": "Delete a Fleet image resource",
- "after_help": "Examples:\n cua image rm desktop",
- "aliases": [
- "delete"
- ],
+ "abstract": "Removed: Cua Cloud has ended",
+ "aliases": [],
"arguments": [
{
"default_value": null,
- "help": "Image resource name",
+ "help": "",
"hidden": false,
- "is_optional": false,
- "name": "NAME",
+ "is_optional": true,
+ "name": "ARGS",
"possible_values": [],
- "repeatable": false,
+ "repeatable": true,
"type": "string"
}
],
- "flags": [
- {
- "aliases": [],
- "default_value": false,
- "env": null,
- "help": "Do not ask for confirmation",
- "hidden": false,
- "name": "force",
- "repeatable": false,
- "short_name": null,
- "takes_value": false
- }
+ "flags": [],
+ "hidden": true,
+ "hidden_aliases": [
+ "delete"
],
- "hidden": false,
- "hidden_aliases": [],
"name": "rm",
- "options": [
- {
- "aliases": [],
- "default_value": null,
- "env": null,
- "help": "Namespace (default: CUA_FLEET_NAMESPACE)",
- "hidden": false,
- "is_optional": true,
- "multiple_values": false,
- "name": "namespace",
- "possible_values": [],
- "repeatable": false,
- "short_name": null,
- "takes_value": true,
- "type": "string",
- "value_name": "NAMESPACE"
- }
- ],
+ "options": [],
"subcommand_optional": false,
"subcommands": [],
- "usage": "cua image rm [OPTIONS] <NAME>"
+ "usage": "cua image rm [OPTIONS] [ARGS]..."
},
{
- "abstract": "Submit an Image manifest (JSON) to Fleet for a remote build",
- "after_help": "Examples:\n cua image create -f image.json",
+ "abstract": "Removed: Cua Cloud has ended",
"aliases": [],
- "arguments": [],
- "flags": [],
- "hidden": false,
- "hidden_aliases": [],
- "name": "create",
- "options": [
- {
- "aliases": [],
- "default_value": null,
- "env": null,
- "help": "Image manifest file (JSON)",
- "hidden": false,
- "is_optional": false,
- "multiple_values": false,
- "name": "file",
- "possible_values": [],
- "repeatable": false,
- "short_name": "f",
- "takes_value": true,
- "type": "path",
- "value_name": "FILE"
- },
+ "arguments": [
{
- "aliases": [],
"default_value": null,
- "env": null,
- "help": "Namespace (default: CUA_FLEET_NAMESPACE)",
+ "help": "",
"hidden": false,
"is_optional": true,
- "multiple_values": false,
- "name": "namespace",
+ "name": "ARGS",
"possible_values": [],
- "repeatable": false,
- "short_name": null,
- "takes_value": true,
- "type": "string",
- "value_name": "NAMESPACE"
+ "repeatable": true,
+ "type": "string"
}
],
+ "flags": [],
+ "hidden": true,
+ "hidden_aliases": [],
+ "name": "create",
+ "options": [],
"subcommand_optional": false,
"subcommands": [],
- "usage": "cua image create [OPTIONS] --file <FILE>"
+ "usage": "cua image create [OPTIONS] [ARGS]..."
}
],
"usage": "cua image [OPTIONS] <COMMAND>"
@@ -7259,7 +6972,7 @@
"subcommand_optional": false,
"subcommands": [
{
- "abstract": "List the catalog: ref, OS, container or VM, local and cloud runtime, cua-spacesd, browsers, summary",
+ "abstract": "List the catalog: ref, OS, container or VM, local runtime, cua-spacesd, browsers, summary",
"after_help": "Examples:\n cua images ls\n # Images whose browser the cua-driver browser tools drive\n cua images ls --browser\n cua images ls --all --json",
"aliases": [
"list"
@@ -8854,12 +8567,12 @@
},
{
"abstract": "Check the host, an image and a sandbox's guest in one report (`cua doctor [REF]`), or eval parity between two variants (`cua doctor parity A B`)",
- "after_help": "Examples:\n # Host checks only\n cua doctor\n # Host, image and guest checks for the sandbox dev\n cua doctor dev\n # CI: fail on warnings, write JUnit XML\n cua doctor cloud:dev --strict --junit doctor.xml",
+ "after_help": "Examples:\n # Host checks only\n cua doctor\n # Host, image and guest checks for the sandbox dev\n cua doctor dev\n # CI: fail on warnings, write JUnit XML\n cua doctor local:dev --strict --junit doctor.xml",
"aliases": [],
"arguments": [
{
"default_value": null,
- "help": "Sandbox to check: `local:<name>`, `cloud:<name>`, `direct:<host:port>`, a bare name, or a spacesd URL. Omit for the host checks only",
+ "help": "Sandbox to check: `local:<name>`, `direct:<host:port>`, a bare name, or a spacesd URL. Omit for the host checks only",
"hidden": false,
"is_optional": true,
"name": "TARGET",
@@ -9953,7 +9666,7 @@
"arguments": [
{
"default_value": null,
- "help": "The Space's cua-spacesd (`http(s)://host:port`, `host:port`, default port 3211), a Space id (`local:<name>`, `cloud:<name>`), or any MCP endpoint URL",
+ "help": "The Space's cua-spacesd (`http(s)://host:port`, `host:port`, default port 3211), a Space id (`local:<name>`), or any MCP endpoint URL",
"hidden": false,
"is_optional": false,
"name": "URL",
@@ -10033,7 +9746,7 @@
"usage": "cua spaces add [OPTIONS] <URL>"
},
{
- "abstract": "Create Spaces: on this machine, on one of your machines that provides Spaces (`cua host setup --provide-spaces` there), or in the cloud",
+ "abstract": "Create Spaces: on this machine, on one of your machines that provides Spaces (`cua host setup --provide-spaces` there), or in your own cloud account",
"after_help": "Examples:\n cua spaces create linux\n # Two macOS VMs on your spare Mac mini (matched by name)\n cua spaces create macos:26 --on \"spare mac mini\" --count 2\n cua spaces create --on host:0123abcd4567ef89 linux --json",
"aliases": [],
"arguments": [
@@ -10057,7 +9770,7 @@
"aliases": [],
"default_value": null,
"env": null,
- "help": "Where: `local`, `cloud`, `host:<machine>`, or a machine name (`mac-mini`, \"spare mac mini\"). Default: your default location",
+ "help": "Where: `local`, `aws`, `gcp`, `host:<machine>`, or a machine name (`mac-mini`, \"spare mac mini\"). Default: your default location",
"hidden": false,
"is_optional": true,
"multiple_values": false,
@@ -10228,7 +9941,7 @@
"usage": "cua spaces cancel [OPTIONS] <SPACE>"
},
{
- "abstract": "The GPU options each runtime offers on this machine (or in the cloud)",
+ "abstract": "The GPU options each runtime offers on this machine (or in your own cloud account)",
"after_help": "Examples:\n cua spaces gpus\n cua spaces gpus --json",
"aliases": [],
"arguments": [],
@@ -10241,7 +9954,7 @@
"aliases": [],
"default_value": null,
"env": null,
- "help": "`local` (default) or `cloud`",
+ "help": "`local` (default), `aws`, `gcp` or `modal`",
"hidden": false,
"is_optional": true,
"multiple_values": false,
@@ -10259,7 +9972,7 @@
"usage": "cua spaces gpus [OPTIONS]"
},
{
- "abstract": "Delete a Space's sandbox (on this machine, on the machine that provides it, or in the cloud) and forget it (asks first)",
+ "abstract": "Delete a Space's sandbox (on this machine, on the machine that provides it, or in your own cloud account) and forget it (asks first)",
"after_help": "Examples:\n cua spaces delete relay:space-0123456789abcdef\n cua spaces delete local:studio --force",
"aliases": [],
"arguments": [
@@ -10296,7 +10009,7 @@
"usage": "cua spaces delete [OPTIONS] <SPACE>"
},
{
- "abstract": "Turn a Space off: a local container or QEMU VM is suspended (its memory is kept), a Lume VM or a Space one of your machines provides is stopped (its disk is kept), and so is a Space in your own cloud (`--on aws`, `gcp`; compute billing stops). Fleet cloud Spaces, Modal sandboxes and Spaces added by address cannot be turned off",
+ "abstract": "Turn a Space off: a local container or QEMU VM is suspended (its memory is kept), a Lume VM or a Space one of your machines provides is stopped (its disk is kept), and so is a Space in your own cloud (`--on aws`, `gcp`; compute billing stops). Modal sandboxes and Spaces added by address cannot be turned off",
"after_help": "Examples:\n cua spaces stop local:studio\n cua spaces stop relay:space-0123456789abcdef --json",
"aliases": [],
"arguments": [
@@ -13563,7 +13276,7 @@
},
{
"code": 2,
- "meaning": "Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`, `cloud:NAME`)"
+ "meaning": "Invalid argument, or an ambiguous sandbox name (qualify it: `local:NAME`)"
},
{
"code": 3,
@@ -13571,7 +13284,7 @@
},
{
"code": 4,
- "meaning": "Not supported, or not configured (for example no cloud credentials)"
+ "meaning": "Not supported, or not configured (for example no provider credentials)"
},
{
"code": 5,
diff --git a/scripts/docs-generators/cua-cli.ts b/scripts/docs-generators/cua-cli.ts
index ed3d73e008..4188f72ff2 100644
--- a/scripts/docs-generators/cua-cli.ts
+++ b/scripts/docs-generators/cua-cli.ts
@@ -92,13 +92,13 @@ export interface CuaDumpDocs {
/** Command groups: one page each, in the order readers meet them. */
export const CLI_GROUPS: CliGroup[] = [
- { slug: 'auth', title: 'cua auth', summary: 'Sign in, inspect your Fleet identity, manage API keys and CI tokens', commands: ['auth', 'wif-token'] },
+ { slug: 'auth', title: 'cua auth', summary: 'Sign in and out, see who is signed in, and store sandbox provider keys', commands: ['auth'] },
{
slug: 'sandbox',
title: 'cua sandbox',
- summary: 'Create, list, connect to, suspend and delete sandboxes, local or in the cloud',
+ summary: 'Create, list, connect to, suspend and delete sandboxes, local or on your own machines',
commands: ['sandbox'],
- subcommands: ['create', 'launch', 'connect', 'ls', 'info', 'suspend', 'resume', 'restart', 'keep-alive', 'rm'],
+ subcommands: ['create', 'launch', 'connect', 'ls', 'info', 'suspend', 'resume', 'restart', 'rm'],
},
{
slug: 'sandbox-access',
@@ -107,10 +107,10 @@ export const CLI_GROUPS: CliGroup[] = [
commands: ['sandbox'],
subcommands: ['exec', 'shell', 'cp', 'overlay', 'logs', 'port-forward', 'url', 'screenshot', 'mcp', 'view'],
},
- { slug: 'config', title: 'cua config', summary: 'User defaults: where sandboxes run (`default.on`), the default kind and runtime, cloud defaults', commands: ['config'] },
+ { slug: 'config', title: 'cua config', summary: 'User defaults: where sandboxes run (`default.on`), the default kind and runtime', commands: ['config'] },
{ slug: 'viewer', title: 'cua viewer', summary: 'One local browser page that lists every sandbox and opens its viewer', commands: ['viewer'] },
{ slug: 'do', title: 'cua do', summary: 'One-shot computer actions (screenshot, click, type, windows) against a selected target', commands: ['do', 'do-host-consent'] },
- { slug: 'image', title: 'cua image', summary: 'Pull, build and push OCI images, and manage Fleet image resources; list the image catalog', commands: ['image', 'images'] },
+ { slug: 'image', title: 'cua image', summary: 'Pull, build and push OCI images; list the image catalog', commands: ['image', 'images'] },
{ slug: 'mcp', title: 'cua mcp', summary: 'The stdio MCP server for AI assistants', commands: ['mcp'] },
{ slug: 'agent', title: 'cua agent', summary: 'Run coding agents (Claude Code, Codex, Gemini CLI, ...) inside a sandbox and follow, continue or stop them', commands: ['agent'] },
{ slug: 'agents', title: 'cua agents', summary: 'Install cua skills and the cua MCP server into AI coding agents', commands: ['agents'] },
@@ -138,8 +138,6 @@ export function cliReference(cli: CLIDocumentation): CliReference {
product: 'cua-cli',
cli,
groups: CLI_GROUPS,
- // `cua fleet` manages the retired Cua Cloud (Fleets) pools; the command stays until cua 0.5.0.
- omit: ['fleet'],
generator: REGENERATE,
source: 'cua dump-docs --type cli',
intro: readHeader('cua-cli', 'cli'),
@@ -189,7 +187,7 @@ function mcpCategories(spaces: SpacesLinks): McpCategory[] {
canonicalSection: (tool) => spaces.sections.get(tool)!,
},
{ slug: 'images', title: 'Image tools', summary: 'The sandbox image catalog: which images exist and which ship a browser' },
- { slug: 'sandbox', title: 'Sandbox tools', summary: 'Create and manage sandboxes, local or in the cloud' },
+ { slug: 'sandbox', title: 'Sandbox tools', summary: 'Create and manage sandboxes, local or on your own machines' },
{
slug: 'teleport',
title: 'Teleport tools',
diff --git a/scripts/images/image-refs-allowlist.json b/scripts/images/image-refs-allowlist.json
index d33e1622ee..49b6ad26a3 100644
--- a/scripts/images/image-refs-allowlist.json
+++ b/scripts/images/image-refs-allowlist.json
@@ -253,7 +253,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-cli/tests/sandbox_do.rs",
"libs/cua/crates/cua-sdk/tests/refs.rs",
"libs/cua/crates/cua-sdk/tests/topologies.rs"
]
@@ -266,12 +265,6 @@
"libs/python/cua-sandbox/tests/test_pool_spec.py"
]
},
- "ghcr.io/trycua/cua-e2e-x:1": {
- "reason": "synthetic tag or digest in a test (parser, resolver or tag-safety input), never pulled",
- "paths": [
- "libs/cua/crates/cua-cli/src/pools.rs"
- ]
- },
"ghcr.io/trycua/cua-plain-ubuntu-server:existing": {
"reason": "synthetic tag or digest in a test (parser, resolver or tag-safety input), never pulled",
"paths": [
@@ -644,7 +637,6 @@
"libs/cua/bench/streaming/results/baseline-macos-arm64.json",
"libs/cua/bench/streaming/results/baseline-macos-arm64.md",
"libs/cua/crates/cua-cli/src/image_build.rs",
- "libs/cua/crates/cua-cli/tests/sandbox_do.rs",
"libs/cua/crates/cua-fleet/src/runtime.rs",
"libs/cua/crates/cua-fleet/tests/claim_secrets.rs",
"libs/cua/crates/cua-fleet/tests/fixtures/image-variants.json",