Run on
The New Space Run on menu: This Mac, your machines that provide Spaces, and connected clouds.
The New Space Run on menu: This Mac, your machines that provide Spaces, and connected clouds.
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_placement_options lists where a new Space can run: This Mac, each machine that provides Spaces (greyed out with why when offline or at its limit), and, with the Your cloud experiment on, each connected cloud.
app_wizard_placement_options#The "Run on" menu: This Mac, your machines, your clouds.
func appWizardPlacementOptions(state: AppWizardState, env: AppWizardEnv) -> [AppPlacementOption]| Parameter | Type | Default |
|---|---|---|
state | AppWizardState | required |
env | AppWizardEnv | required |
Returns Vec<AppPlacementOption>
app_space_host#One of your machines that provides Spaces (the SDK's Spaces.hosts())
as the wizard reads it.
func appSpaceHost(host: SpacesHost) -> AppSpaceHost| Parameter | Type | Default |
|---|---|---|
host | SpacesHost | required |
Returns AppSpaceHost
AppPlacementOption record#Returned by app_wizard_placement_options.
| Field | Type | Default | Description |
|---|---|---|---|
id | String | What choosing it sets as the create's on: local, cloud, host:<machine>, or a connected cloud's word (aws). | |
label | String | The menu's text: "This Mac", "Mac mini", "Mac mini (offline)", "AWS ยท us-west-2". | |
group | String | Its group, in menu order (a separator between groups): this-mac, hosts, clouds. | |
selected | bool | Chosen. | |
enabled | bool | It can be chosen now (offline, at its limit: not). | |
detail | String | One line: why not, or what it runs (the tooltip). |
AppSpaceHost record#Returned by app_space_host.
| Field | Type | Default | Description |
|---|---|---|---|
id | String | What on="host:<id>" takes: the relay machine id, or the name a direct host was added as. | |
name | String | Its name ("Mac mini"). | |
via | String | relay or direct (its Tailscale or LAN address). | |
online | bool | It answered just now. | |
os | String | Its operating system (macos, linux, windows), when it answered. | |
limits | Vec<AppHostLimit> | Its limits, when it answered. |