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.

docs(sdk): regenerate the reference for host pause/resume and the account fields (#4579)

dduponta7b1e34217e5
diff --git a/docs/content/docs/cua-sdk/reference/index.mdx b/docs/content/docs/cua-sdk/reference/index.mdx
index 26a62795fb..c8a35745b2 100644
--- a/docs/content/docs/cua-sdk/reference/index.mdx
+++ b/docs/content/docs/cua-sdk/reference/index.mdx
@@ -137,6 +137,6 @@ Pages marked *Cua Spaces app export* document the APIs the Cua Spaces apps are b
| --- | --- |
| [Protocol](/cua-sdk/reference/protocol) | The gRPC contracts of cua-spacesd (`cua.env.v1`) and the cua daemon (`cua.daemon.v1`). |
-290 items, 379 methods. The [Types](/cua-sdk/reference/types) page lists them.
+290 items, 381 methods. The [Types](/cua-sdk/reference/types) page lists them.
-The Cua Spaces app export adds 719 items and 38 methods.
+The Cua Spaces app export adds 723 items and 38 methods.
diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/index.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/index.mdx
index e72962f29b..0a69556326 100644
--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/index.mdx
+++ b/docs/content/docs/cua-sdk/reference/spaces/app-core/index.mdx
@@ -81,7 +81,7 @@ pub fn app_menu_input_from_json(json: String) -> Result<AppMenuInput, CuaError>
## All items
-602 items, across this page and its subpages, grouped by page. Methods are listed on their object.
+606 items, across this page and its subpages, grouped by page. Methods are listed on their object.
**About, updates and launch**: [`app_about_after_launch`](/cua-sdk/reference/spaces/app-core/about#app_about_after_launch), [`app_about_allowed_channels`](/cua-sdk/reference/spaces/app-core/about#app_about_allowed_channels), [`app_about_input_from_json`](/cua-sdk/reference/spaces/app-core/about#app_about_input_from_json), [`app_about_refresh_notice`](/cua-sdk/reference/spaces/app-core/about#app_about_refresh_notice), [`app_about_restart_daemon`](/cua-sdk/reference/spaces/app-core/about#app_about_restart_daemon), [`app_about_view`](/cua-sdk/reference/spaces/app-core/about#app_about_view), [`app_daemon_check_from_json`](/cua-sdk/reference/spaces/app-core/about#app_daemon_check_from_json), [`app_launch_input_from_json`](/cua-sdk/reference/spaces/app-core/about#app_launch_input_from_json), [`app_refresh_report_from_json`](/cua-sdk/reference/spaces/app-core/about#app_refresh_report_from_json), [`AppAboutInput`](/cua-sdk/reference/spaces/app-core/about#appaboutinput-record), [`AppAboutLink`](/cua-sdk/reference/spaces/app-core/about#appaboutlink-record), [`AppAboutLinkId`](/cua-sdk/reference/spaces/app-core/about#appaboutlinkid-enum), [`AppAboutUpdates`](/cua-sdk/reference/spaces/app-core/about#appaboutupdates-record), [`AppAboutView`](/cua-sdk/reference/spaces/app-core/about#appaboutview-record), [`AppCliInstaller`](/cua-sdk/reference/spaces/app-core/about#appcliinstaller), [`AppCliInstallPlan`](/cua-sdk/reference/spaces/app-core/about#appcliinstallplan-record), [`AppCliInstallRequest`](/cua-sdk/reference/spaces/app-core/about#appcliinstallrequest-record), [`AppDaemonCheck`](/cua-sdk/reference/spaces/app-core/about#appdaemoncheck-record), [`AppInstallMethod`](/cua-sdk/reference/spaces/app-core/about#appinstallmethod-enum), [`AppLaunchInput`](/cua-sdk/reference/spaces/app-core/about#applaunchinput-record), [`AppLaunchPlan`](/cua-sdk/reference/spaces/app-core/about#applaunchplan-record), [`AppRefreshReport`](/cua-sdk/reference/spaces/app-core/about#apprefreshreport-record), [`AppUpdateChannel`](/cua-sdk/reference/spaces/app-core/about#appupdatechannel-enum)
@@ -109,7 +109,7 @@ pub fn app_menu_input_from_json(json: String) -> Result<AppMenuInput, CuaError>
**Experiments**: [`app_experiments_choose`](/cua-sdk/reference/spaces/app-core/experiments#app_experiments_choose), [`app_experiments_from_json`](/cua-sdk/reference/spaces/app-core/experiments#app_experiments_from_json), [`app_experiments_page`](/cua-sdk/reference/spaces/app-core/experiments#app_experiments_page), [`app_settings_with_storage`](/cua-sdk/reference/spaces/app-core/experiments#app_settings_with_storage), [`app_telemetry_experiments_changed`](/cua-sdk/reference/spaces/app-core/experiments#app_telemetry_experiments_changed), [`app_telemetry_experiments_on`](/cua-sdk/reference/spaces/app-core/experiments#app_telemetry_experiments_on), [`AppExperiments`](/cua-sdk/reference/spaces/app-core/experiments#appexperiments-record)
-**This machine**: [`app_host_arch`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_arch), [`app_host_form_action_from_json`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_form_action_from_json), [`app_host_form_initial`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_form_initial), [`app_host_form_reduce`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_form_reduce), [`app_host_form_view`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_form_view), [`app_host_looks_like_listen`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_looks_like_listen), [`app_host_panel`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_panel), [`app_host_parse_allow_list`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_parse_allow_list), [`app_host_permission_rows`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_permission_rows), [`app_host_setting_change`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_setting_change), [`app_host_setup`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_setup), [`app_host_state`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_state), [`app_host_state_from_json`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_state_from_json), [`app_host_summary_input`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_summary_input), [`app_host_validate_setup`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_validate_setup), [`app_with_this_machine`](/cua-sdk/reference/spaces/app-core/this-machine#app_with_this_machine), [`AppHostAccess`](/cua-sdk/reference/spaces/app-core/this-machine#apphostaccess-record), [`AppHostAccessRow`](/cua-sdk/reference/spaces/app-core/this-machine#apphostaccessrow-record), [`AppHostAction`](/cua-sdk/reference/spaces/app-core/this-machine#apphostaction-record), [`AppHostActionId`](/cua-sdk/reference/spaces/app-core/this-machine#apphostactionid-enum), [`AppHostClient`](/cua-sdk/reference/spaces/app-core/this-machine#apphostclient-record), [`AppHostConfirm`](/cua-sdk/reference/spaces/app-core/this-machine#apphostconfirm-record), [`AppHostFormAction`](/cua-sdk/reference/spaces/app-core/this-machine#apphostformaction-enum), [`AppHostFormChoice`](/cua-sdk/reference/spaces/app-core/this-machine#apphostformchoice-record), [`AppHostFormField`](/cua-sdk/reference/spaces/app-core/this-machine#apphostformfield-record), [`AppHostFormState`](/cua-sdk/reference/spaces/app-core/this-machine#apphostformstate-record), [`AppHostFormView`](/cua-sdk/reference/spaces/app-core/this-machine#apphostformview-record), [`AppHostLimit`](/cua-sdk/reference/spaces/app-core/this-machine#apphostlimit-record), [`AppHostPanelView`](/cua-sdk/reference/spaces/app-core/this-machine#apphostpanelview-record), [`AppHostPermissionInput`](/cua-sdk/reference/spaces/app-core/this-machine#apphostpermissioninput-record), [`AppHostProvidedSpace`](/cua-sdk/reference/spaces/app-core/this-machine#apphostprovidedspace-record), [`AppHostSettingChange`](/cua-sdk/reference/spaces/app-core/this-machine#apphostsettingchange-record), [`AppHostSetupChoice`](/cua-sdk/reference/spaces/app-core/this-machine#apphostsetupchoice-record), [`AppHostSetupRequest`](/cua-sdk/reference/spaces/app-core/this-machine#apphostsetuprequest-record), [`AppHostSpacesAudit`](/cua-sdk/reference/spaces/app-core/this-machine#apphostspacesaudit-record), [`AppHostState`](/cua-sdk/reference/spaces/app-core/this-machine#apphoststate-record), [`AppHostToggle`](/cua-sdk/reference/spaces/app-core/this-machine#apphosttoggle-record), [`AppPermissionRow`](/cua-sdk/reference/spaces/app-core/this-machine#apppermissionrow-record)
+**This machine**: [`app_host_account_key`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_account_key), [`app_host_account_step`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_account_step), [`app_host_arch`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_arch), [`app_host_form_action_from_json`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_form_action_from_json), [`app_host_form_initial`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_form_initial), [`app_host_form_reduce`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_form_reduce), [`app_host_form_view`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_form_view), [`app_host_looks_like_listen`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_looks_like_listen), [`app_host_panel`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_panel), [`app_host_parse_allow_list`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_parse_allow_list), [`app_host_permission_rows`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_permission_rows), [`app_host_setting_change`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_setting_change), [`app_host_setup`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_setup), [`app_host_state`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_state), [`app_host_state_from_json`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_state_from_json), [`app_host_summary_input`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_summary_input), [`app_host_validate_setup`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_validate_setup), [`app_with_this_machine`](/cua-sdk/reference/spaces/app-core/this-machine#app_with_this_machine), [`AppHostAccess`](/cua-sdk/reference/spaces/app-core/this-machine#apphostaccess-record), [`AppHostAccessRow`](/cua-sdk/reference/spaces/app-core/this-machine#apphostaccessrow-record), [`AppHostAccount`](/cua-sdk/reference/spaces/app-core/this-machine#apphostaccount-record), [`AppHostAccountStep`](/cua-sdk/reference/spaces/app-core/this-machine#apphostaccountstep-enum), [`AppHostAction`](/cua-sdk/reference/spaces/app-core/this-machine#apphostaction-record), [`AppHostActionId`](/cua-sdk/reference/spaces/app-core/this-machine#apphostactionid-enum), [`AppHostClient`](/cua-sdk/reference/spaces/app-core/this-machine#apphostclient-record), [`AppHostConfirm`](/cua-sdk/reference/spaces/app-core/this-machine#apphostconfirm-record), [`AppHostFormAction`](/cua-sdk/reference/spaces/app-core/this-machine#apphostformaction-enum), [`AppHostFormChoice`](/cua-sdk/reference/spaces/app-core/this-machine#apphostformchoice-record), [`AppHostFormField`](/cua-sdk/reference/spaces/app-core/this-machine#apphostformfield-record), [`AppHostFormState`](/cua-sdk/reference/spaces/app-core/this-machine#apphostformstate-record), [`AppHostFormView`](/cua-sdk/reference/spaces/app-core/this-machine#apphostformview-record), [`AppHostLimit`](/cua-sdk/reference/spaces/app-core/this-machine#apphostlimit-record), [`AppHostPanelView`](/cua-sdk/reference/spaces/app-core/this-machine#apphostpanelview-record), [`AppHostPermissionInput`](/cua-sdk/reference/spaces/app-core/this-machine#apphostpermissioninput-record), [`AppHostProvidedSpace`](/cua-sdk/reference/spaces/app-core/this-machine#apphostprovidedspace-record), [`AppHostSettingChange`](/cua-sdk/reference/spaces/app-core/this-machine#apphostsettingchange-record), [`AppHostSetupChoice`](/cua-sdk/reference/spaces/app-core/this-machine#apphostsetupchoice-record), [`AppHostSetupRequest`](/cua-sdk/reference/spaces/app-core/this-machine#apphostsetuprequest-record), [`AppHostSpacesAudit`](/cua-sdk/reference/spaces/app-core/this-machine#apphostspacesaudit-record), [`AppHostState`](/cua-sdk/reference/spaces/app-core/this-machine#apphoststate-record), [`AppHostToggle`](/cua-sdk/reference/spaces/app-core/this-machine#apphosttoggle-record), [`AppPermissionRow`](/cua-sdk/reference/spaces/app-core/this-machine#apppermissionrow-record)
**Spaces app core**: [`app_menu_input_from_json`](#app_menu_input_from_json), [`AppRuntimeSwitch`](#appruntimeswitch-record), [`cua_spaces_register`](#cua_spaces_register)
diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/spaces.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/spaces.mdx
index a625568e41..d96079d2a4 100644
--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/spaces.mdx
+++ b/docs/content/docs/cua-sdk/reference/spaces/app-core/spaces.mdx
@@ -122,6 +122,7 @@ Returned by [`app_host_summary_input`](/cua-sdk/reference/spaces/app-core/this-m
| `clients` | `u32` | | Connected clients. |
| `mode` | `Option<String>` | | `relay` or `direct`. |
| `online` | `Option<bool>` | | Relay presence. |
+| `paused_signed_out` / `pausedSignedOut` | `bool` | | Relay sharing is paused while signed out. |
## `app_agent_name`
diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/this-machine.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/this-machine.mdx
index 82b6d8adf4..b973b1d7a1 100644
--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/this-machine.mdx
+++ b/docs/content/docs/cua-sdk/reference/spaces/app-core/this-machine.mdx
@@ -75,6 +75,14 @@ Returned by [`app_host_permission_rows`](#app_host_permission_rows).
| `text` | `String` | | "Ada · Files". |
| `at_ms` / `atMs` | `i64` | | Epoch ms (each shell shows it relative, natively). |
+## `AppHostAccount` record
+
+| Field | Type | Default | Description |
+| --- | --- | --- | --- |
+| `id` | `Option<String>` | | The account id (the session's `sub`). |
+| `email` | `Option<String>` | | Its email. |
+| `display` | `Option<String>` | | What the app shows for it (a display name, else the email). |
+
## `AppHostAction` record
| Field | Type | Default | Description |
@@ -83,6 +91,8 @@ Returned by [`app_host_permission_rows`](#app_host_permission_rows).
| `label` | `String` | | Label. |
| `destructive` | `bool` | | Drawn as destructive. |
| `confirm` | [`Option<AppHostConfirm>`](#apphostconfirm-record) | | Ask this first; the action runs only when the user confirms. |
+| `enabled` | `bool` | | Can be pressed now (Resume sharing is not while nothing is on to share). |
+| `help` | `Option<String>` | | The tooltip, when it says something the label does not. |
## `AppHostClient` record
@@ -174,13 +184,18 @@ Returned by [`app_host_panel`](#app_host_panel).
| --- | --- | --- | --- |
| `title` | `String` | | "This machine". |
| `summary` | `String` | | One line: how it is shared, or that it is not. |
+| `notice` | `Option<String>` | | Why relay sharing is paused, one line over the page (signed out, or signed in to another account). |
+| `notice_action` / `noticeAction` | [`Option<AppHostAction>`](#apphostaction-record) | | The notice's button ("Sign In"). |
| `configured` | `bool` | | Set up for access. |
| `facts` | [`Vec<AppFact>`](/cua-sdk/reference/spaces/app-core/window#appfact-record) | | Name, Access, Service. |
| `clients_title` / `clientsTitle` | `Option<String>` | | "Connected now" (configured only). |
| `clients` | `Vec<String>` | | One line per client. |
| `clients_empty` / `clientsEmpty` | `Option<String>` | | "Nobody" when nobody is connected. |
| `recent_title` / `recentTitle` | `Option<String>` | | "Recent access" (configured, when the log has any). |
-| `recent` | [`Vec<AppHostAccessRow>`](#apphostaccessrow-record) | | Who reached this machine recently, newest first. |
+| `recent` | [`Vec<AppHostAccessRow>`](#apphostaccessrow-record) | | Who reached this machine recently, newest first: the first `LOG_PREVIEW_ROWS` of `Self.recent_all`. |
+| `recent_more` / `recentMore` | `Option<String>` | | "Show All…" when `recent_all` has more than `recent` shows. |
+| `recent_all` / `recentAll` | [`Vec<AppHostAccessRow>`](#apphostaccessrow-record) | | Every recent access (connections, refusals, other people's thumbnails), repeats collapsed: the "Show All" sheet. |
+| `recent_with_background` / `recentWithBackground` | [`Vec<AppHostAccessRow>`](#apphostaccessrow-record) | | The same with background probes and the owner's thumbnails too (the sheet's "Include background activity"). |
| `access_warning` / `accessWarning` | `Option<String>` | | Set when the access log does not verify. |
| `toggles` | [`Vec<AppHostToggle>`](#apphosttoggle-record) | | The two settings (configured only). |
| `limits` | `Option<String>` | | The limits, one line ("Up to 4 Spaces \u&#123;b7&#125; 2 macOS VMs"), while providing Spaces. |
@@ -188,7 +203,9 @@ Returned by [`app_host_panel`](#app_host_panel).
| `provided` | [`Vec<AppHostAccessRow>`](#apphostaccessrow-record) | | One row per Space this machine provides. |
| `provided_empty` / `providedEmpty` | `Option<String>` | | "None yet" when it provides none. |
| `activity_title` / `activityTitle` | `Option<String>` | | "Spaces activity" (when the audit has any). |
-| `activity` | [`Vec<AppHostAccessRow>`](#apphostaccessrow-record) | | Remote creates, deletes and refusals, newest first. |
+| `activity` | [`Vec<AppHostAccessRow>`](#apphostaccessrow-record) | | Remote creates, deletes and refusals, newest first: the first `LOG_PREVIEW_ROWS` of `Self.activity_all`. |
+| `activity_more` / `activityMore` | `Option<String>` | | "Show All…" when `activity_all` has more than `activity` shows. |
+| `activity_all` / `activityAll` | [`Vec<AppHostAccessRow>`](#apphostaccessrow-record) | | The whole Spaces activity, repeats collapsed. |
| `activity_warning` / `activityWarning` | `Option<String>` | | Set when the Spaces audit does not verify. |
| `permissions_title` / `permissionsTitle` | `Option<String>` | | Heading over the permission rows, when any is left to grant. |
| `permissions` | [`Vec<AppPermissionRow>`](#apppermissionrow-record) | | Panes still to grant. |
@@ -290,6 +307,10 @@ Returned by [`app_host_state`](#app_host_state), [`app_host_state_from_json`](#a
| `provided_spaces` / `providedSpaces` | [`Vec<AppHostProvidedSpace>`](#apphostprovidedspace-record) | | The Spaces this machine provides now. |
| `spaces_audit` / `spacesAudit` | [`Vec<AppHostSpacesAudit>`](#apphostspacesaudit-record) | | Remote creates, deletes and refusals, and settings changes, newest first. |
| `spaces_audit_error` / `spacesAuditError` | `Option<String>` | | Set when the Spaces audit does not verify. |
+| `paused_signed_out` / `pausedSignedOut` | `bool` | | Relay sharing is paused until the owner signs in again (the host left the relay; its setup stays). |
+| `owner` | `Option<String>` | | The account this machine is registered to (relay mode): its id. |
+| `owner_email` / `ownerEmail` | `Option<String>` | | The owner's email, when the relay gave one. |
+| `account` | [`Option<AppHostAccount>`](#apphostaccount-record) | | Who is signed in to Cua in this app (`None`: nobody, or the shell does not say). The shell fills it; the host does not know. |
## `AppHostToggle` record
@@ -302,6 +323,35 @@ Returned by [`app_host_state`](#app_host_state), [`app_host_state_from_json`](#a
| `enabled` | `bool` | | Can be flipped (the last setting on cannot be turned off; Spaces need the relay). |
| `action` | [`AppHostActionId`](#apphostactionid-enum) | | What flipping it runs. |
+## `AppHostAccountStep` enum
+
+<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>
+<Tab value="Swift">
+
+```swift
+.keep
+.pause
+.resume
+```
+
+</Tab>
+<Tab value="Rust">
+
+```rust
+AppHostAccountStep::Keep
+AppHostAccountStep::Pause
+AppHostAccountStep::Resume
+```
+
+</Tab>
+</Tabs>
+
+| Variant | Description |
+| --- | --- |
+| `Keep` | Nothing to do. |
+| `Pause` | Pause relay sharing (signed out, or signed in to another account). |
+| `Resume` | Resume the paused relay sharing (its owner is signed in again). |
+
## `AppHostActionId` enum
<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>
@@ -316,6 +366,7 @@ Returned by [`app_host_state`](#app_host_state), [`app_host_state_from_json`](#a
.hideDesktop
.provideSpaces
.stopProvidingSpaces
+.signIn
```
</Tab>
@@ -330,6 +381,7 @@ AppHostActionId::ShareDesktop
AppHostActionId::HideDesktop
AppHostActionId::ProvideSpaces
AppHostActionId::StopProvidingSpaces
+AppHostActionId::SignIn
```
</Tab>
@@ -345,6 +397,7 @@ AppHostActionId::StopProvidingSpaces
| `HideDesktop` | Stop sharing this machine's own desktop (Spaces keep running). |
| `ProvideSpaces` | Create Spaces for your other devices. |
| `StopProvidingSpaces` | Stop creating Spaces for your other devices. |
+| `SignIn` | Sign in to Cua (relay sharing paused while signed out resumes). |
## `AppHostFormAction` enum
@@ -393,6 +446,62 @@ AppHostFormAction::Failed { error: String }
| `Submit` | "Set up for access" pressed (ignored unless it can submit). |
| `Failed` | Setup failed. Fields: `error: String` |
+## `app_host_account_key`
+
+The account id (else email) host resume names the signed-in account by.
+
+<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>
+<Tab value="Swift">
+
+```swift
+func appHostAccountKey(account: AppHostAccount) -> String
+```
+
+</Tab>
+<Tab value="Rust">
+
+```rust
+pub fn app_host_account_key(account: AppHostAccount) -> String
+```
+
+</Tab>
+</Tabs>
+
+| Parameter | Type | Default |
+| --- | --- | --- |
+| `account` | [`AppHostAccount`](#apphostaccount-record) | required |
+
+**Returns** `String`
+
+## `app_host_account_step`
+
+What to do with the host when the signed-in account changes (`None`:
+nobody is signed in; never pass `None` for "could not tell").
+
+<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>
+<Tab value="Swift">
+
+```swift
+func appHostAccountStep(state: AppHostState, account: AppHostAccount?) -> AppHostAccountStep
+```
+
+</Tab>
+<Tab value="Rust">
+
+```rust
+pub fn app_host_account_step(state: AppHostState, account: Option<AppHostAccount>) -> AppHostAccountStep
+```
+
+</Tab>
+</Tabs>
+
+| Parameter | Type | Default |
+| --- | --- | --- |
+| `state` | [`AppHostState`](#apphoststate-record) | required |
+| `account` | [`Option<AppHostAccount>`](#apphostaccount-record) | required |
+
+**Returns** [`AppHostAccountStep`](#apphostaccountstep-enum)
+
## `app_host_arch`
This machine's CPU architecture as the Spaces apps pass it to the core
diff --git a/docs/content/docs/cua-sdk/reference/spaces/host.mdx b/docs/content/docs/cua-sdk/reference/spaces/host.mdx
index c9d0efa7f7..3f1d75cef4 100644
--- a/docs/content/docs/cua-sdk/reference/spaces/host.mdx
+++ b/docs/content/docs/cua-sdk/reference/spaces/host.mdx
@@ -22,7 +22,9 @@ This machine as an unattended-access host.
| --- | --- |
| [`new`](#hostnew) | Host state under `cua_home` (default `$CUA_HOME` or `~/.cua`). |
| [`configure`](#hostconfigure) | Changes what this machine shares: its own desktop, and whether it creates Spaces for your other devices (and their limits). |
+| [`pause_signed_out`](#hostpause_signed_out) | Pause relay sharing while nobody is signed in to the owner's account: the host leaves the relay and stays off it (also across a restart) with its setup kept. |
| [`remove`](#hostremove) | Unregister, uninstall the service and delete the host state. |
+| [`resume_signed_in`](#hostresume_signed_in) | Resume relay sharing paused by `Host.pause_signed_out` once `account` (the signed-in account's id or email) is signed in; refused when it is not the machine's owner. |
| [`setup`](#hostsetup) | Installs and starts the host service (relay mode needs `account_token`). |
| [`start_sharing`](#hoststart_sharing) | Start sharing again. |
| [`status`](#hoststatus) | Current state. |
@@ -127,6 +129,53 @@ pub async fn configure(&self, change: HostSettingsChange) -> Result<HostStatus,
**Returns** [`HostStatus`](#hoststatus-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)
+### `Host.pause_signed_out`
+
+Pause relay sharing while nobody is signed in to the owner's
+account: the host leaves the relay and stays off it (also across a
+restart) with its setup kept. Direct mode is left alone.
+
+<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>
+<Tab value="Python">
+
+```python
+async def pause_signed_out(self) -> HostStatus
+```
+
+</Tab>
+<Tab value="TypeScript">
+
+```ts
+pauseSignedOut(asyncOpts_?: { signal: AbortSignal }): Promise<HostStatus>
+```
+
+</Tab>
+<Tab value="Swift">
+
+```swift
+func pauseSignedOut() async throws -> HostStatus
+```
+
+</Tab>
+<Tab value="Kotlin">
+
+```kotlin
+@Throws(CuaException::class)
+suspend fun pauseSignedOut(): HostStatus
+```
+
+</Tab>
+<Tab value="Rust">
+
+```rust
+pub async fn pause_signed_out(&self) -> Result<HostStatus, CuaError>
+```
+
+</Tab>
+</Tabs>
+
+**Returns** [`HostStatus`](#hoststatus-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)
+
### `Host.remove`
Unregister, uninstall the service and delete the host state.
@@ -172,6 +221,57 @@ pub async fn remove(&self) -> Result<(), CuaError>
**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)
+### `Host.resume_signed_in`
+
+Resume relay sharing paused by `Host.pause_signed_out` once
+`account` (the signed-in account's id or email) is signed in; refused
+when it is not the machine's owner.
+
+<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>
+<Tab value="Python">
+
+```python
+async def resume_signed_in(self, account: str) -> HostStatus
+```
+
+</Tab>
+<Tab value="TypeScript">
+
+```ts
+resumeSignedIn(account: string, asyncOpts_?: { signal: AbortSignal }): Promise<HostStatus>
+```
+
+</Tab>
+<Tab value="Swift">
+
+```swift
+func resumeSignedIn(account: String) async throws -> HostStatus
+```
+
+</Tab>
+<Tab value="Kotlin">
+
+```kotlin
+@Throws(CuaException::class)
+suspend fun resumeSignedIn(account: String): HostStatus
+```
+
+</Tab>
+<Tab value="Rust">
+
+```rust
+pub async fn resume_signed_in(&self, account: String) -> Result<HostStatus, CuaError>
+```
+
+</Tab>
+</Tabs>
+
+| Parameter | Type | Default |
+| --- | --- | --- |
+| `account` | `String` | required |
+
+**Returns** [`HostStatus`](#hoststatus-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)
+
### `Host.setup`
Installs and starts the host service (relay mode needs
@@ -751,7 +851,7 @@ refusals and settings changes).
Host status.
-Returned by [`Host.configure`](#hostconfigure), [`Host.setup`](#hostsetup), [`Host.start_sharing`](#hoststart_sharing), [`Host.status`](#hoststatus), [`Host.stop_sharing`](#hoststop_sharing).
+Returned by [`Host.configure`](#hostconfigure), [`Host.pause_signed_out`](#hostpause_signed_out), [`Host.resume_signed_in`](#hostresume_signed_in), [`Host.setup`](#hostsetup), [`Host.start_sharing`](#hoststart_sharing), [`Host.status`](#hoststatus), [`Host.stop_sharing`](#hoststop_sharing).
| Field | Type | Default | Description |
| --- | --- | --- | --- |
@@ -780,6 +880,9 @@ Returned by [`Host.configure`](#hostconfigure), [`Host.setup`](#hostsetup), [`Ho
| `provided_spaces` / `providedSpaces` | [`Vec<HostProvidedSpace>`](#hostprovidedspace-record) | `[]` | The Spaces this machine provides now. |
| `spaces_audit` / `spacesAudit` | [`Vec<HostSpacesAuditRecord>`](#hostspacesauditrecord-record) | `[]` | The Spaces audit, newest first. |
| `spaces_audit_error` / `spacesAuditError` | `Option<String>` | `None` | Set when the Spaces audit does not verify. |
+| `paused_signed_out` / `pausedSignedOut` | `bool` | `false` | Relay sharing is paused until the owner signs in again (`Host.pause_signed_out`). |
+| `owner` | `Option<String>` | `None` | The account this machine is registered to (relay mode): its id. |
+| `owner_email` / `ownerEmail` | `Option<String>` | `None` | The owner's email, when the relay gave one. |
## `RelayClientInfo` record
diff --git a/docs/content/docs/cua-sdk/reference/types.mdx b/docs/content/docs/cua-sdk/reference/types.mdx
index f1fef1ba30..af61a86ad4 100644
--- a/docs/content/docs/cua-sdk/reference/types.mdx
+++ b/docs/content/docs/cua-sdk/reference/types.mdx
@@ -50,7 +50,7 @@ Renamed members: in Kotlin, objects implement `AutoCloseable`, whose `close()` f
291 items. Methods are listed on their object.
-The 719 items of the Cua Spaces app export (source-available, FSL-1.1-MIT, Swift only) are listed on their pages: [Decoded media](/cua-sdk/reference/spaces/decoded-media), [Host teleport](/cua-sdk/reference/spaces/teleport-host), [Teleport an app](/cua-sdk/reference/spaces/teleport-apps), [Spaces app core](/cua-sdk/reference/spaces/app-core#all-items), [App core: Cua Volume storage, mount and sync](/cua-sdk/reference/spaces/volume-app-core#all-items), [App core: agents, drive, notifications](/cua-sdk/reference/spaces/agents-app-core#all-items).
+The 723 items of the Cua Spaces app export (source-available, FSL-1.1-MIT, Swift only) are listed on their pages: [Decoded media](/cua-sdk/reference/spaces/decoded-media), [Host teleport](/cua-sdk/reference/spaces/teleport-host), [Teleport an app](/cua-sdk/reference/spaces/teleport-apps), [Spaces app core](/cua-sdk/reference/spaces/app-core#all-items), [App core: Cua Volume storage, mount and sync](/cua-sdk/reference/spaces/volume-app-core#all-items), [App core: agents, drive, notifications](/cua-sdk/reference/spaces/agents-app-core#all-items).
| Item | Kind | Summary |
| --- | --- | --- |