The New Space wizard: where it runs, image, engine, address and the create call.
Cua Spaces app export
These APIs are part of the Cua Spaces app export for building Spaces UIs. They are source-available under FSL-1.1-MIT and ship for Swift only (import CuaSpacesFFI); the Rust tab shows the cua-spaces-ffi crate they come from. The open source SDK packages for Python, TypeScript and Kotlin do not include them.
app_wizard_initial starts the wizard, app_wizard_reduce applies an action, and app_wizard_view derives the screen. app_wizard_create_args turns a finished wizard into Spaces.create arguments.
Cua Cloud (the SDK's on="cloud"). The apps do not offer it for new Spaces (CLOUD_SPACES_OFFERED); existing cloud Spaces still list.
Local
This Mac.
Yours
The user's own cloud account (AWS, Google Cloud, Modal), connected with cua cloud connect: the SDK's on is the provider's word (aws), which the wizard carries beside it.
Host
One of the user's machines that provides Spaces (a relay host, or one added by its Tailscale or LAN address): the SDK's on is host:<machine>, which the wizard carries beside it.
Where "Run on" starts (Settings, cua config set default.on).
cloud_available / cloudAvailable
bool
Signed in (or client credentials).
local_available / localAvailable
bool
A local container backend or Lume exists.
local_reason / localReason
Option<String>
Why local is unavailable.
local_backends / localBackends
Option<Vec<String>>
Ready local backends, when known.
local_details / localDetails
Option<HashMap<String, String>>
Why each local backend that is not ready is not (the runtime doctor's detail, by backend name), when known: the wizard names the reason instead of only "This Mac cannot run container Spaces."
max_cpus / maxCpus
u32
Upper bound for the CPU slider.
host_arch / hostArch
Option<String>
This machine's architecture (arm64, amd64), when known.
The GPU option of each runtime that has one (the SDK's gpu_support), when known. A runtime not listed has none: the Resources step shows no GPU row for it.
The disk slider shows (a local VM whose disk can grow).
disk_gb / diskGb
u32
Disk GB (the slider's value).
min_disk_gb / minDiskGb
u32
Disk slider min, GB (the image's size).
max_disk_gb / maxDiskGb
u32
Disk slider max, GB.
disk_text / diskText
String
"150 GB".
disk_note / diskNote
Option<String>
One quiet line under the slider: a VM disk is sparse, so it uses the unpacked size at first, up to the chosen size; and a resize when the chosen size is not the image's.
disk_reset_label / diskResetLabel
Option<String>
"Reset" while the chosen size is not the image's.
disk_help / diskHelp
Option<String>
The slider's tooltip: why it cannot go below the image's disk.
price
Option<String>
What it costs, in one line: About $0.18/hour (cloud, at this account's rates); None on the user's own hardware (this Mac, or a machine added by address) and when the cloud rates are unknown.
The configured default location arrived (ignored once picked). Fields: location: AppLocation
ChooseOs
An OS tile. Fields: os: AppSpaceOs
ChooseImage
A preset picked from the suggestions (fills the field). Fields: image_ref: String
SetImageText
The image field changed (typing): filters the suggestions; a preset's ref selects it, anything else is used as typed. Fields: text: String
OpenImageSuggestions
Show every preset (the field's menu button, or focus).
MoveImageSuggestion
Up (-1) or Down (+1) in the suggestions; opens them when closed. Fields: delta: i32
PickImageSuggestion
Return: picks the highlighted preset, or keeps the typed text.
DismissImageSuggestions
Escape, or the field lost focus.
SetPlacement
A "Run on" tile. Fields: placement: AppLocation
ChooseCloud
A connected cloud: creates there. Fields: cloud: String
ChoosePlacement
An entry of the "Run on" menu (PlacementOption.id): local, cloud, host:<machine> or a connected cloud's word. A disabled entry (offline, at its limit) is ignored. Fields: on: String
ToggleAdvanced
Show or hide Advanced.
ChooseKind
A kind tile (switches to the family's image of that kind). Fields: kind: AppSpaceKind
SetRuntime
The runtime menu. Fields: runtime: AppRuntime
SetCpus
CPU slider. Fields: cpus: u32
SetMemory
Memory slider. Fields: memory_gb: u32
SetDisk
Disk slider (VMs whose disk can grow). Fields: disk_gb: u32
ResetDisk
The disk slider's Reset: back to the image's own disk.
SetGpu
The GPU checkbox. Fields: on: bool
SetName
Name field. Fields: name: String
SetOpenWhenReady
"Open when ready". Fields: on: bool
Next
Continue.
Back
Back.
ShowAddress
"Connect by address..."
HideAddress
Back to create.
SetAddress
Address field. Fields: url: String
SetToken
Token field. Fields: token: String
SetAddressName
Address name field. Fields: name: String
SubmitAddress
"Add Space" pressed (the shell runs the handshake when the view's address.canSubmit was true).
AddressFailed
The handshake failed with this raw error. Fields: error: String